Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt.tools.base/.project44
-rw-r--r--bundles/org.eclipse.swt.tools.base/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.swt.tools.base/pom.xml4
-rw-r--r--bundles/org.eclipse.swt.tools.spies/.classpath2
-rw-r--r--bundles/org.eclipse.swt.tools.spies/.project56
-rw-r--r--bundles/org.eclipse.swt.tools.spies/.settings/org.eclipse.jdt.core.prefs9
-rw-r--r--bundles/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF12
-rw-r--r--bundles/org.eclipse.swt.tools.spies/build.properties3
-rw-r--r--bundles/org.eclipse.swt.tools.spies/fragment.e4xmi9
-rw-r--r--bundles/org.eclipse.swt.tools.spies/plugin.xml17
-rw-r--r--bundles/org.eclipse.swt.tools.spies/pom.xml4
-rw-r--r--bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/Sleak.java539
-rw-r--r--bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/SpiesConstants.java (renamed from bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/SpiesPlugin.java)6
-rw-r--r--bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SleakView.java54
-rw-r--r--bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SpyView.java23
-rw-r--r--bundles/org.eclipse.swt.tools/.classpath2
-rw-r--r--bundles/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs9
-rw-r--r--bundles/org.eclipse.swt.tools/.settings/org.eclipse.pde.prefs2
-rw-r--r--bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java51
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java27
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java21
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java50
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java5
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java49
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java16
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java11
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java9
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java5
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java8
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java11
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java1
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java2
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java21
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java33
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java49
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java2
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java6
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java2
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java10
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java13
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java6
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java229
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java18
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java38
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java12
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java85
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java5
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java51
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java6
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java36
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java71
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.chromium.lib.properties26
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties4
-rw-r--r--bundles/org.eclipse.swt.tools/JavadocBasher/org/eclipse/swt/tools/internal/JavadocBasher.java1012
-rw-r--r--bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF8
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java21
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java737
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java123
-rw-r--r--bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java9
-rw-r--r--bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup5
-rw-r--r--bundles/org.eclipse.swt.tools/forceQualifierUpdate.txt3
-rwxr-xr-xbundles/org.eclipse.swt.tools/gtk/install_sysdeps.sh4
-rw-r--r--bundles/org.eclipse.swt.tools/plugin.properties1
-rw-r--r--bundles/org.eclipse.swt.tools/plugin.xml32
-rw-r--r--bundles/org.eclipse.swt.tools/pom.xml4
-rw-r--r--bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/Activator.java68
-rw-r--r--bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64CompilationParticipant.java373
-rw-r--r--bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64EnableAction.java40
-rw-r--r--bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java3
-rw-r--r--bundles/org.eclipse.swt/.classpath_cocoa3
-rw-r--r--bundles/org.eclipse.swt/.classpath_gtk3
-rw-r--r--bundles/org.eclipse.swt/.classpath_gtk_win323
-rw-r--r--bundles/org.eclipse.swt/.classpath_win324
-rw-r--r--bundles/org.eclipse.swt/.settings/.api_filters24
-rw-r--r--bundles/org.eclipse.swt/.settings/org.eclipse.jdt.core.prefs9
-rw-r--r--bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs128
-rw-r--r--bundles/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/library/swt_awt.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java54
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java51
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java1066
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java58
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/BrowserFactory.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/BrowserFunction.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/JSON.java286
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/gtk/org/eclipse/swt/browser/BrowserFactory.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/BrowserFactory.java35
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java844
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java106
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java316
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BusyIndicator.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java168
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java124
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java299
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java216
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java105
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/DefaultContent.java83
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java590
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PopupList.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java1927
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextContent.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java68
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java222
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ByteArrayTransfer.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java65
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java69
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/FileTransfer.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ImageTransfer.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TableDragSourceEffect.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TreeDragSourceEffect.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DNDListener.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEvent.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java61
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java289
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java266
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java71
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java71
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeTableCommon.java89
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java74
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java404
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java205
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java132
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java44
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java654
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java247
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java111
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventTable.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java157
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java200
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c74
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java90
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl.c170
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.c102
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.h14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java43
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/WGL.java131
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c1126
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.h6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c235
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h235
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java1270
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.sh7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c7336
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c153
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c788
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h788
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c280
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Lock.java39
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras877
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CALayer.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CTParagraphStyleSetting.java)32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPathElement.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPoint.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGSize.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras39
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras113
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras57
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMDocument.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMEvent.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMKeyboardEvent.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMUIEvent.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras280
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSActionCell.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransform.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransformStruct.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAlert.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppearance.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppleEventDescriptor.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSArray.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAttributedString.java41
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAutoreleasePool.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBezierPath.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java58
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBundle.java29
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java17
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCalendarDate.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java37
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCharacterSet.java39
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSClipView.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCoder.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColor.java84
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorList.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorPanel.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorSpace.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBoxCell.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCursor.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSData.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDate.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDictionary.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDirectoryEnumerator.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEnumerator.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSError.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java56
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileWrapper.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java64
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontManager.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontPanel.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFormatter.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookie.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookieStorage.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImage.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java17
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSIndexSet.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSInputManager.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedArchiver.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedUnarchiver.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLocale.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenu.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableIndexSet.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableSet.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotification.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumber.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumberFormatter.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java60
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLPixelFormat.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenPanel.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOperatingSystemVersion.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COSERVERINFO.java)22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java29
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPanel.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSParagraphStyle.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPoint.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintOperation.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintPanel.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrinter.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProcessInfo.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBrowserCell.java)22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProgressIndicator.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRange.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRect.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunLoop.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunningApplication.java39
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSavePanel.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScrollView.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchFieldCell.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSegmentedCell.java78
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSize.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusItem.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java58
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabView.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderCell.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderView.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java109
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextFieldCell.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextTab.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSThread.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimeZone.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimer.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbar.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbarItem.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTrackingArea.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTypesetter.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLAuthenticationChallenge.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLCredential.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLDownload.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLProtectionSpace.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLRequest.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUserDefaults.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSValue.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java101
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java83
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java29
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java4960
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Protocol.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport2163
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport.extras9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTApplicationDelegate.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTCanvasView.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTDragSourceDelegate.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTOpenSavePanelDelegate.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CFRange.java)16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPanelDelegate.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPrintPanelDelegate.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTScrollView.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabView.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextView.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTView.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTWindowDelegate.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java160
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDataSource.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDocumentRepresentation.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrameView.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebOpenPanelResultListener.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPolicyDecisionListener.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPreferences.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebScriptObject.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebUndefined.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/id.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/objc_super.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java259
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c388
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c49
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h49
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh86
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c2785
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h (renamed from bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.h)14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c277
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h262
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.c555
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.h139
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c1497
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.h (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEMEX.java)20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c172
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h157
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_structs.c (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/FILETIME.java)15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_structs.h19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak69
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c15463
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h579
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c582
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h68
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c2415
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h2415
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c651
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h158
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Lock.java64
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java194
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java2915
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GInterfaceInfo.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java9237
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTypeQuery.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java31
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GeometryInterface.java35
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/Graphene.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java3709
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/package.html4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css)2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java1092
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEvent.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventButton.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventCrossing.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventFocus.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventKey.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java)9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventMotion.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventWindowState.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkGeometry.java92
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkWindowAttr.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GtkTargetEntry.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkTargetEntry.java)7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java563
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat197
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/cancel.icobin0 -> 16398 bytes
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c2774
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.h11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c328
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.cpp430
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c499
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h499
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.c363
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.h50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip.cpp1392
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.cpp112
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.h112
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_structs.cpp20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/javaw.exe.manifest66
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c6016
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c241
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c801
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h801
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c2192
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h224
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/search.icobin0 -> 16398 bytes
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.rc4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Lock.java39
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java47
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/BitmapData.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/Gdip.java385
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/GdiplusStartupInput.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CAUUID.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java853
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CONTROLINFO.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DISPPARAMS.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DVTARGETDEVICE.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/EXCEPINFO.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FORMATETC.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FUNCDESC.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java86
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPointContainer.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2.java134
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Controller.java64
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Cookie.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieList.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieManager.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2DOMContentLoadedEventArgs.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Deferral.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLECMDTEXT.java)19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment2.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2EnvironmentOptions.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2MoveFocusRequestedEventArgs.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationCompletedEventArgs.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationStartingEventArgs.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NewWindowRequestedEventArgs.java54
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Settings.java94
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SourceChangedEventArgs.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SwtCallback.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IMoniker.java)11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SwtHost.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumSTATSTG.java)10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WebMessageReceivedEventArgs.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WindowFeatures.java61
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2_2.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICustomDestinationList.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java21
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java33
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java37
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumFORMATETC.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumTfDisplayAttributeInfo.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumVARIANT.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFileDialog.java84
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IMLangFontLink2.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IObjectArray.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IObjectCollection.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper2.java)15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleCommandTarget.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleControl.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersist.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyBag.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyStore.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo2.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItem.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItemArray.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellLink.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ISpecifyPropertyPages.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java103
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITaskbarList3.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfDisplayAttributeInfo.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFont.java)15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfDisplayAttributeProvider.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfInputProcessorProfiles.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java87
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IViewObject2.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLEINPLACEFRAMEINFO.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STATSTG.java51
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STGMEDIUM.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/TYPEATTR.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/VARDESC.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ACTCTX.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BITMAP.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BP_PAINTPARAMS.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BROWSEINFO.java31
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BUTTON_IMAGELIST.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java33
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSECOLOR.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSEFONT.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CIDA.java (renamed from bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_CONTEXT.java)25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/COMBOBOXINFO.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CREATESTRUCT.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DIBSECTION.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCINFO.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DRAWITEMSTRUCT.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DTTOPTS.java35
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/EXTLOGFONTW.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GCP_RESULTS.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GUITHREADINFO.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDITEM.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDLAYOUT.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HELPINFO.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HIGHCONTRAST.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ICONINFO.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/INPUT.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/KEYBDINPUT.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGBRUSH.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGPEN.java25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LRESULT.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVCOLUMN.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVITEM.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUBARINFO.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUINFO.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUITEMINFO.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MOUSEINPUT.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MSG.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMCUSTOMDRAW.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHDR.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHEADER.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLISTVIEW.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVDISPINFO.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVFINDITEM.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMREBARCHEVRON.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTBCUSTOMDRAW.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTOOLBAR.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTTDISPINFO.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVITEMCHANGE.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NOTIFYICONDATA.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OFNOTIFY.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OPENFILENAME.java53
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java1884
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java76
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PAINTSTRUCT.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PANOSE.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PRINTDLG.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/REBARBANDINFO.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/RECT.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_CONTROL.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_DIGITSUBSTITUTE.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHDRAGIMAGE.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFO.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHFILEINFO.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/STARTUPINFO.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTON.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTONINFO.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCITEM.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOOLINFO.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOUCHINPUT.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TRACKMOUSEEVENT.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVHITTESTINFO.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVSORTCB.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WINDOWPOS.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WNDCLASS.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java31
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java21
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java33
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java161
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java57
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java215
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c2320
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.c6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.c546
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.h76
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c275
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h275
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c79
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java2502
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebkitGDBus.java615
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java53
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java2034
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/swt_webkit.rc48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp786
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.h31
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp106
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp110
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h95
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.cpp100
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.h32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java262
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java760
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java1310
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java217
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java382
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java735
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java49
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java33
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java90
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java54
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java364
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java227
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java133
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java232
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java274
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/ImageLoader.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java41
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java45
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java144
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java59
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java62
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java177
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Caret.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java97
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java105
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java364
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java1110
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java249
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java78
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java56
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java67
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java77
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java77
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java224
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java117
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java413
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java230
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java60
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java144
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java381
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java91
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java486
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c1942
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.h41
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h87
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java281
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SwtCallable.java33
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/DragDetectListener.java17
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/TouchEvent.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/LineAttributes.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java107
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Compatibility.java (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/ExceptionStash.java98
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTEventListener.java (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTEventListener.java)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages.properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties)8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ar._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ar._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_bg._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_bg._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_cs._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_cs._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_da._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_da._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_de._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_de._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_el._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_el._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_en_CA._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_en_CA._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_es._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_es._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_et._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_et._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_eu._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_eu._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fa._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fa._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fi._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fi._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fr._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fr._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_hi._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_hi._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_hu._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_hu._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_id._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_id._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_it._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_it._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_iw._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_iw._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ja._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ja._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ko._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ko._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ku._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ku._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_lt._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_lt._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_lv._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_lv._properties)244
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ml._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ml._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_mn._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_mn._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_nl._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_nl._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_no._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_no._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pl._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pl._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pt._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pt._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pt_BR._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pt_BR._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ro._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ro._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ru._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ru._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sk._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sk._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sl._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sl._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sr._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sr._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sv._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sv._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_th._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_th._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_tr._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_tr._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_uk._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_uk._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_zh._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_zh_TW._properties (renamed from bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh_TW._properties)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/WidgetSpy.java154
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LZWCodec.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngChunk.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java66
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java17
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngIhdrChunk.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFModifiedHuffmanCodec.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java41
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderData.java120
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderLayout.java420
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java49
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java31
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/EventTable.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Item.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/version.txt2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java243
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java150
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java299
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java334
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java212
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/ImageLoader.java118
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java39
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java209
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SWTGeometry.java92
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SessionManagerDBus.java166
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SyncDialogUtil.java83
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java536
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java66
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java93
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java875
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java394
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java1945
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java570
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java84
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java186
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java2106
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java149
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java366
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java212
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java97
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java105
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java179
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java130
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java150
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java569
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java744
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java112
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java144
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java529
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java17
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java191
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java108
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java1097
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java276
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java235
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java278
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java151
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java985
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java115
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java130
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java702
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java254
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java629
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java143
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java165
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java64
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java1100
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java177
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java183
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java652
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java268
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java219
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java556
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java456
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/ImageLoader.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java80
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java495
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java111
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java91
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java318
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java62
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java69
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java438
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java272
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java623
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java93
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java113
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java200
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java937
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java70
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java415
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java99
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java282
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java849
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java256
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java159
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java106
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java97
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java449
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java70
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java211
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java101
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java825
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java177
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java343
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java61
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java450
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java222
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java98
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java1146
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java259
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java420
-rw-r--r--bundles/org.eclipse.swt/META-INF/MANIFEST.MF10
-rw-r--r--bundles/org.eclipse.swt/META-INF/p2.inf10
-rw-r--r--bundles/org.eclipse.swt/Readme.Linux.md44
-rw-r--r--bundles/org.eclipse.swt/Readme.WebView2.md162
-rw-r--r--bundles/org.eclipse.swt/Readme.Win32.md16
-rw-r--r--bundles/org.eclipse.swt/Readme.macOS.md1
-rw-r--r--bundles/org.eclipse.swt/build.xml2
-rw-r--r--bundles/org.eclipse.swt/buildFragment.xml50
-rw-r--r--bundles/org.eclipse.swt/buildInternal.xml30
-rw-r--r--bundles/org.eclipse.swt/buildSWT.xml94
-rw-r--r--bundles/org.eclipse.swt/pom.xml30
1014 files changed, 70586 insertions, 100371 deletions
diff --git a/bundles/org.eclipse.swt.tools.base/.project b/bundles/org.eclipse.swt.tools.base/.project
index e8f1538351..20345e1686 100644
--- a/bundles/org.eclipse.swt.tools.base/.project
+++ b/bundles/org.eclipse.swt.tools.base/.project
@@ -1,22 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.tools.base</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.swt.tools.base</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.swt.tools.base/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt.tools.base/META-INF/MANIFEST.MF
index 9b2cab2724..37f24c445d 100644
--- a/bundles/org.eclipse.swt.tools.base/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt.tools.base/META-INF/MANIFEST.MF
@@ -2,9 +2,8 @@ Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt.tools.base;singleton:=true
-Bundle-Version: 3.107.100.qualifier
+Bundle-Version: 3.107.300.qualifier
Bundle-ManifestVersion: 2
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.ui;bundle-version="3.4.0"
diff --git a/bundles/org.eclipse.swt.tools.base/pom.xml b/bundles/org.eclipse.swt.tools.base/pom.xml
index fbc0b4dc34..0b736e7934 100644
--- a/bundles/org.eclipse.swt.tools.base/pom.xml
+++ b/bundles/org.eclipse.swt.tools.base/pom.xml
@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.swt.localbuild</artifactId>
<groupId>eclipse.platform.swt</groupId>
- <version>4.12.0-SNAPSHOT</version>
+ <version>4.24.0-SNAPSHOT</version>
<relativePath>../../local-build/local-build-parent/</relativePath>
</parent>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.tools.base</artifactId>
- <version>3.107.100-SNAPSHOT</version>
+ <version>3.107.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.swt.tools.spies/.classpath b/bundles/org.eclipse.swt.tools.spies/.classpath
index eca7bdba8f..e801ebfb46 100644
--- a/bundles/org.eclipse.swt.tools.spies/.classpath
+++ b/bundles/org.eclipse.swt.tools.spies/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.swt.tools.spies/.project b/bundles/org.eclipse.swt.tools.spies/.project
index e6501742a7..41790f2b0f 100644
--- a/bundles/org.eclipse.swt.tools.spies/.project
+++ b/bundles/org.eclipse.swt.tools.spies/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.tools.spies</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.swt.tools.spies</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.swt.tools.spies/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.swt.tools.spies/.settings/org.eclipse.jdt.core.prefs
index 8d2948f379..08e528b8d5 100644
--- a/bundles/org.eclipse.swt.tools.spies/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.swt.tools.spies/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -23,6 +23,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -66,6 +67,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -98,4 +100,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/bundles/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF
index 3a609311d6..08b3d9e589 100644
--- a/bundles/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF
@@ -2,14 +2,18 @@ Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt.tools.spies;singleton:=true
-Bundle-Version: 3.106.200.qualifier
+Bundle-Version: 3.108.300.qualifier
Bundle-ManifestVersion: 2
Export-Package: org.eclipse.swt.tools.internal,
org.eclipse.swt.tools.views
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
- org.eclipse.ui;bundle-version="3.4.0",
- org.eclipse.swt.tools.base;bundle-version="3.106.0"
+ org.eclipse.swt.tools.base;bundle-version="3.106.0",
+ org.eclipse.e4.ui.model.workbench;bundle-version="2.1.400",
+ org.eclipse.swt;bundle-version="3.119.0",
+ org.eclipse.ui;bundle-version="3.113.0",
+ org.eclipse.e4.ui.di;bundle-version="1.2.600"
Automatic-Module-Name: org.eclipse.swt.tools.spies
+Import-Package: javax.annotation;version="1.2.0"
diff --git a/bundles/org.eclipse.swt.tools.spies/build.properties b/bundles/org.eclipse.swt.tools.spies/build.properties
index a3baaed2df..64df539f38 100644
--- a/bundles/org.eclipse.swt.tools.spies/build.properties
+++ b/bundles/org.eclipse.swt.tools.spies/build.properties
@@ -16,7 +16,8 @@ bin.includes = about.html,\
plugin.properties,\
META-INF/,\
icons/,\
- .
+ .,\
+ fragment.e4xmi
output.. = bin/
source.. = src/
src.includes = about.html
diff --git a/bundles/org.eclipse.swt.tools.spies/fragment.e4xmi b/bundles/org.eclipse.swt.tools.spies/fragment.e4xmi
new file mode 100644
index 0000000000..ac12910e99
--- /dev/null
+++ b/bundles/org.eclipse.swt.tools.spies/fragment.e4xmi
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/descriptor/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_-LZIEN9kEemzyrbiRClN6A">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="__HWaAN9kEemzyrbiRClN6A" featurename="descriptors" parentElementId="xpath:/">
+ <elements xsi:type="basic:PartDescriptor" xmi:id="_GSP6cN9lEemzyrbiRClN6A" elementId="org.eclipse.swt.tools.spies.partdescriptor.sleak" label="Sleak" iconURI="platform:/plugin/org.eclipse.swt.tools.spies/icons/sleak.png" category="SWT Tools" closeable="true" contributionURI="bundleclass://org.eclipse.swt.tools.spies/org.eclipse.swt.tools.views.SleakView">
+ <persistedState key="persistState" value="true"/>
+ <tags>View</tags>
+ </elements>
+ </fragments>
+</fragment:ModelFragments>
diff --git a/bundles/org.eclipse.swt.tools.spies/plugin.xml b/bundles/org.eclipse.swt.tools.spies/plugin.xml
index 9b81f07d4d..69abd2c858 100644
--- a/bundles/org.eclipse.swt.tools.spies/plugin.xml
+++ b/bundles/org.eclipse.swt.tools.spies/plugin.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.views">
@@ -11,12 +10,14 @@
id="org.eclipse.swt.tools.views.SpyView"
name="%spyViewName">
</view>
- <view
- category="org.eclipse.swt.swt.tools"
- class="org.eclipse.swt.tools.views.SleakView"
- icon="icons/sleak.png"
- id="org.eclipse.swt.tools.views.SleakView"
- name="%sleakViewName">
- </view>
</extension>
+ <extension
+ id="org.eclipse.swt.tools.spies.fragment"
+ point="org.eclipse.e4.workbench.model">
+ <fragment
+ apply="always"
+ uri="fragment.e4xmi">
+ </fragment>
+ </extension>
+
</plugin>
diff --git a/bundles/org.eclipse.swt.tools.spies/pom.xml b/bundles/org.eclipse.swt.tools.spies/pom.xml
index 089b008435..70b8a6f430 100644
--- a/bundles/org.eclipse.swt.tools.spies/pom.xml
+++ b/bundles/org.eclipse.swt.tools.spies/pom.xml
@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.swt.localbuild</artifactId>
<groupId>eclipse.platform.swt</groupId>
- <version>4.12.0-SNAPSHOT</version>
+ <version>4.24.0-SNAPSHOT</version>
<relativePath>../../local-build/local-build-parent/</relativePath>
</parent>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.tools.spies</artifactId>
- <version>3.106.200-SNAPSHOT</version>
+ <version>3.108.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/Sleak.java b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/Sleak.java
index c2d53dcffc..8d9655d877 100644
--- a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/Sleak.java
+++ b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/Sleak.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,29 +14,43 @@
package org.eclipse.swt.tools.internal;
import java.io.*;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
import org.eclipse.swt.*;
+import org.eclipse.swt.custom.*;
import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.WidgetSpy.*;
+import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.List;
/**
* Instructions on how to use the Sleak tool with a standlaone SWT example:
- *
+ *
* Modify the main method below to launch your application.
* Run Sleak.
- *
+ *
*/
public class Sleak {
List list;
Canvas canvas;
- Button start, stop, check;
+ Button enableTracking, diff, stackTrace, saveAs, save;
+ Combo diffType;
Text text;
- Label label;
-
- Object [] oldObjects = new Object [0];
- Error [] oldErrors = new Error [0];
- Object [] objects = new Object [0];
- Error [] errors = new Error [0];
+
+ String filterPath = "";
+ String fileName = "sleakout";
+ String selectedName;
+ boolean incrementFileNames = true;
+ boolean saveImages = true;
+ int fileCount;
+
+ java.util.List<ObjectWithError> oldObjects = new ArrayList<> ();
+ java.util.List<ObjectWithError> objects = new ArrayList<> ();
+
+ NonDisposedWidgetTracker nonDisposedWidgetTracker = new NonDisposedWidgetTracker();
public static void main (String [] args) {
DeviceData data = new DeviceData();
@@ -47,21 +61,32 @@ public static void main (String [] args) {
shell.setText ("S-Leak");
Point size = shell.getSize ();
shell.setSize (size.x / 2, size.y / 2);
+ GridLayout layout = new GridLayout(2, false);
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 0;
+ shell.setLayout(layout);
sleak.create (shell);
shell.open();
-
+
// Launch your application here
- // e.g.
-// Shell shell = new Shell(display);
-// Button button1 = new Button(shell, SWT.PUSH);
+ // e.g.
+// Shell shell2 = new Shell(display);
+// Button button1 = new Button(shell2, SWT.PUSH);
// button1.setBounds(10, 10, 100, 50);
// button1.setText("Hello World");
// Image image = new Image(display, 20, 20);
-// Button button2 = new Button(shell, SWT.PUSH);
+// Button button2 = new Button(shell2, SWT.PUSH);
// button2.setBounds(10, 70, 100, 50);
// button2.setImage(image);
-// shell.open();
-
+// button1.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
+// Font oldFont = button1.getFont();
+// int style = oldFont.getFontData()[0].getStyle() ^ SWT.BOLD;
+// button1.setFont(new Font(display, "Arial", 10, style));
+// button1.setForeground(new Color(100,200,100));
+// oldFont.dispose();
+// }));
+// shell2.open();
+
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
@@ -69,105 +94,306 @@ public static void main (String [] args) {
}
public void create (Composite parent) {
- list = new List (parent, SWT.BORDER | SWT.V_SCROLL);
- list.addListener (SWT.Selection, event -> refreshObject ());
- text = new Text (parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- canvas = new Canvas (parent, SWT.BORDER);
+
+ SashForm sash = new SashForm(parent, SWT.SMOOTH);
+ sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ sash.setOrientation(SWT.HORIZONTAL);
+ sash.setVisible(true);
+
+ Composite left = new Composite(sash, 0);
+ left.setLayout(new GridLayout());
+ left.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ Composite right = new Composite(sash, 0);
+ right.setLayout(new GridLayout());
+
+ sash.setWeights(new int[] {40,60});
+
+ // Right side
+ canvas = new Canvas (right, SWT.BORDER);
canvas.addListener (SWT.Paint, event -> paintCanvas (event));
- check = new Button (parent, SWT.CHECK);
- check.setText ("Stack");
- check.addListener (SWT.Selection, e -> toggleStackTrace ());
- start = new Button (parent, SWT.PUSH);
- start.setText ("Snap");
- start.addListener (SWT.Selection, event -> refreshAll ());
- stop = new Button (parent, SWT.PUSH);
- stop.setText ("Diff");
- stop.addListener (SWT.Selection, event -> refreshDifference ());
- label = new Label (parent, SWT.BORDER);
- label.setText ("0 object(s)");
- parent.addListener (SWT.Resize, e -> layout ());
- check.setSelection (false);
- text.setVisible (false);
- layout();
+ canvas.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 10));
+ text = new Text (right, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 10));
+ setVisible(text, false);
+
+ // Left side
+ enableTracking = new Button (left, SWT.CHECK);
+ enableTracking.setText ("Enable resource tracking");
+ enableTracking.setToolTipText("Enable Device resource tracking. Only resources allocated once enabled will be tracked. To track devices created before view is created, turn on tracing options, see https://www.eclipse.org/swt/tools.php");
+ enableTracking.addListener (SWT.Selection, e -> toggleEnableTracking ());
+ enableTracking.setSelection(enableTracking.getDisplay().isTracking());
+ enableTracking.setLayoutData(new GridData(SWT.NONE, SWT.NONE, false, false));
+
+ Composite buttons = new Composite(left, 0);
+ buttons.setLayout(new GridLayout(4, false));
+ buttons.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+
+ diff = new Button (buttons, SWT.PUSH);
+ diff.setText ("Snap && Diff");
+ diff.addListener (SWT.Selection, event -> refreshDifference ());
+ GridData diffData = new GridData(SWT.FILL, SWT.NONE, true, false);
+ diffData.horizontalSpan = 2;
+ diff.setLayoutData(diffData);
+
+ save = new Button (buttons, SWT.PUSH);
+ save.setText ("Save");
+ save.setToolTipText("Saves to the previously selected file.");
+ save.addListener (SWT.Selection, event -> saveToFile (false));
+ save.setLayoutData(new GridData(SWT.FILL, SWT.NONE, false, false));
+
+ saveAs = new Button (buttons, SWT.PUSH);
+ saveAs.setText ("Save As...");
+ saveAs.setToolTipText("Saves the contents of the list to a file, optionally with the stack traces if selected.");
+ saveAs.addListener (SWT.Selection, event -> saveToFile (true));
+ saveAs.setLayoutData(new GridData(SWT.FILL, SWT.NONE, false, false));
+
+ Composite checkboxAndCombo = new Composite(left, 0);
+ checkboxAndCombo.setLayout(new GridLayout(2, false));
+ checkboxAndCombo.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+
+ diffType = new Combo (checkboxAndCombo, SWT.CHECK);
+ diffType.add ("Object identity");
+ diffType.add ("Creator class and line");
+ diffType.add ("Creator class");
+ diffType.select(0);
+ diffType.setLayoutData(new GridData(SWT.NONE, SWT.NONE, false, false));
+
+ stackTrace = new Button (checkboxAndCombo, SWT.CHECK);
+ stackTrace.setText ("Show Stack");
+ stackTrace.addListener (SWT.Selection, e -> toggleStackTrace ());
+ stackTrace.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, true, false));
+
+ list = new List (left, SWT.BORDER | SWT.V_SCROLL);
+ list.addListener (SWT.Selection, event -> refreshObject ());
+ list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ stackTrace.setSelection (false);
+ filterNonDisposedWidgetTypes();
}
-void refreshLabel () {
- int colors = 0, cursors = 0, fonts = 0, gcs = 0, images = 0;
- int paths = 0, patterns = 0, regions = 0, textLayouts = 0, transforms= 0;
- for (int i=0; i<objects.length; i++) {
- Object object = objects [i];
- if (object instanceof Color) colors++;
- if (object instanceof Cursor) cursors++;
- if (object instanceof Font) fonts++;
- if (object instanceof GC) gcs++;
- if (object instanceof Image) images++;
- if (object instanceof Path) paths++;
- if (object instanceof Pattern) patterns++;
- if (object instanceof Region) regions++;
- if (object instanceof TextLayout) textLayouts++;
- if (object instanceof Transform) transforms++;
- }
- String string = "";
- if (colors != 0) string += colors + " Color(s)\n";
- if (cursors != 0) string += cursors + " Cursor(s)\n";
- if (fonts != 0) string += fonts + " Font(s)\n";
- if (gcs != 0) string += gcs + " GC(s)\n";
- if (images != 0) string += images + " Image(s)\n";
- if (paths != 0) string += paths + " Paths(s)\n";
- if (patterns != 0) string += patterns + " Pattern(s)\n";
- if (regions != 0) string += regions + " Region(s)\n";
- if (textLayouts != 0) string += textLayouts + " TextLayout(s)\n";
- if (transforms != 0) string += transforms + " Transform(s)\n";
- if (string.length () != 0) {
- string = string.substring (0, string.length () - 1);
+private void toggleEnableTracking() {
+ Display display = enableTracking.getDisplay();
+ boolean tracking = display.isTracking();
+ display.setTracking(!tracking);
+ setWidgetTrackingEnabled(tracking);
+}
+
+void refreshLabel (java.util.List<ObjectWithError> createdObjects, java.util.List<ObjectWithError> deletedObjects) {
+ Function<? super ObjectWithError, ? extends String> classifier = o -> o.object.getClass().getSimpleName();
+
+ Map<String, Long> deleted = deletedObjects.stream().collect(
+ Collectors.groupingBy(classifier, Collectors.counting()));
+
+ Map<String, Long> created = createdObjects.stream().collect(
+ Collectors.groupingBy(classifier, Collectors.counting()));
+
+ StringBuilder sb = new StringBuilder();
+ Stream<String> deletedAndCreated = Stream.concat(deleted.keySet().stream(), created.keySet().stream());
+ deletedAndCreated.distinct().sorted().forEach(type -> addCounts(sb, type, deleted.get(type), created.get(type)));
+
+ String description = sb.length() > 0 ? sb.toString() : "0 object(s)";
+ list.setToolTipText(description);
+}
+
+static void addCounts (StringBuilder string, String type, Long deleted, Long created) {
+ if (deleted != null || created != null) {
+ if (deleted != null) {
+ string.append("-" + deleted);
+ if (created != null) {
+ string.append(" / ");
+ }
+ }
+ if (created != null) {
+ string.append(created);
+ }
+ string.append(" " + type + "(s)\n");
}
- label.setText (string);
}
void refreshDifference () {
Display display = canvas.getDisplay();
+ DeviceData info = getDeviceData(display);
+
+ boolean hasOldData = !oldObjects.isEmpty();
+
+ java.util.List<ObjectWithError> old = new ArrayList<>(oldObjects);
+ java.util.List<ObjectWithError> disposed = new ArrayList<>();
+ java.util.List<ObjectWithError> created = new ArrayList<>();
+ java.util.List<ObjectWithError> same = collectNewObjects(info, old, disposed, created);
+ java.util.List<ObjectWithError> nonDisposedWidgets = getNonDisposedWidgets();
+ created.addAll(nonDisposedWidgets);
+ resetNonDisposedWidgets();
+
+ if (diffType.getSelectionIndex() > 0) {
+ old.removeAll(same);
+ if (!old.isEmpty()) {
+ Iterator<ObjectWithError> createdIter = created.iterator ();
+ while (createdIter.hasNext ()) {
+ ObjectWithError createdObj = createdIter.next ();
+ StackTraceElement stack = createdObj.getCreator ();
+ Iterator<ObjectWithError> oldIter = old.iterator ();
+ while (oldIter.hasNext ()) {
+ ObjectWithError oldObj = oldIter.next();
+ if (creatorEquals(stack, oldObj.getCreator ())) {
+ createdIter.remove ();
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ objects.clear();
+ objects.addAll(created);
+
+ oldObjects.clear();
+ oldObjects.addAll(same);
+ oldObjects.addAll(created);
+
+
+ list.removeAll ();
+ text.setText ("");
+ canvas.redraw ();
+ if(hasOldData) {
+ for (ObjectWithError object : created) {
+ list.add (object.object.toString());
+ }
+ }
+ if(hasOldData) {
+ refreshLabel (created, disposed);
+ } else {
+ refreshLabel (Collections.emptyList(), Collections.emptyList());
+ }
+}
+
+private static java.util.List<ObjectWithError> collectNewObjects(DeviceData info,
+ java.util.List<ObjectWithError> oldObjects,
+ java.util.List<ObjectWithError> disposedObjects,
+ java.util.List<ObjectWithError> createdObjects
+ ) {
+ disposedObjects.addAll(oldObjects);
+ ArrayList<ObjectWithError> sameObjects = new ArrayList<>();
+
+ for (int i=0; i<info.objects.length; i++) {
+ boolean found = false;
+ Iterator<ObjectWithError> oldObject = oldObjects.iterator ();
+ Object infoObject = info.objects [i];
+ if (!(infoObject instanceof Color)) {
+ // Bug 563018: Colors don't require disposal, so exclude them from the list of allocated objects.
+ while (oldObject.hasNext () && !found) {
+ ObjectWithError next = oldObject.next ();
+ if (infoObject == next.object) {
+ sameObjects.add(next);
+ found = true;
+ }
+ }
+ if (!found) {
+ createdObjects.add(new ObjectWithError (infoObject, info.errors[i]));
+ }
+ }
+ }
+ // objects that were not found in new system state are disposed
+ disposedObjects.removeAll(sameObjects);
+ return sameObjects;
+}
+
+private DeviceData getDeviceData(Display display) {
DeviceData info = display.getDeviceData ();
if (!info.tracking) {
Shell shell = canvas.getShell();
- MessageBox dialog = new MessageBox (shell, SWT.ICON_WARNING | SWT.OK);
+ MessageBox dialog = new MessageBox (shell, SWT.ICON_WARNING | SWT.YES | SWT.NO);
dialog.setText (shell.getText ());
- dialog.setMessage ("Warning: Device is not tracking resource allocation");
- dialog.open ();
- }
- Object [] newObjects = info.objects;
- Error [] newErrors = info.errors;
- Object [] diffObjects = new Object [newObjects.length];
- Error [] diffErrors = new Error [newErrors.length];
- int count = 0;
- for (int i=0; i<newObjects.length; i++) {
- int index = 0;
- while (index < oldObjects.length) {
- if (newObjects [i] == oldObjects [index]) break;
- index++;
+ dialog.setMessage ("Warning: Device is not tracking resource allocation\nWould you like to enable tracking now for future created resources?");
+ if (SWT.YES == dialog.open ()) {
+ enableTracking.setSelection(true);
+ toggleEnableTracking();
}
- if (index == oldObjects.length) {
- diffObjects [count] = newObjects [i];
- diffErrors [count] = newErrors [i];
- count++;
+ }
+ return info;
+}
+
+boolean creatorEquals (StackTraceElement first, StackTraceElement second) {
+ switch (diffType.getSelectionIndex()) {
+ case 1: return first.equals(second);
+ case 2: return first.getClassName().equals(second.getClassName());
+ default: throw new IllegalArgumentException();
+ }
+}
+private void saveToFile(boolean prompt) {
+ if (prompt || selectedName == null) {
+ FileDialog dialog = new FileDialog(saveAs.getShell(), SWT.SAVE);
+ dialog.setFilterPath(filterPath);
+ dialog.setFileName(fileName);
+ dialog.setOverwrite(true);
+ selectedName = dialog.open();
+ fileCount = 0;
+ if (selectedName == null) {
+ return;
}
+ filterPath = dialog.getFilterPath();
+ fileName = dialog.getFileName();
+
+ MessageBox msg = new MessageBox(saveAs.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+ msg.setText("Append incrementing file counter?");
+ msg.setMessage("Append an incrementing file count to the file name on each save, starting at 000?");
+ incrementFileNames = msg.open() == SWT.YES;
+
+ msg = new MessageBox(saveAs.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+ msg.setText("Save images for each resource?");
+ msg.setMessage("Save an image (png) for each resource?");
+ saveImages = msg.open() == SWT.YES;
}
- objects = new Object [count];
- errors = new Error [count];
- System.arraycopy (diffObjects, 0, objects, 0, count);
- System.arraycopy (diffErrors, 0, errors, 0, count);
- list.removeAll ();
- text.setText ("");
- canvas.redraw ();
- for (int i=0; i<objects.length; i++) {
- list.add (objects [i].toString());
+
+ String fileName = selectedName;
+ if (incrementFileNames) {
+ fileName = String.format("%s_%03d", fileName, fileCount++);
+ }
+ try (PrintWriter file = new PrintWriter(new FileOutputStream(fileName))) {
+
+ int i = 0;
+ for (ObjectWithError o : objects) {
+ Object object = o.object;
+ Error error = o.error;
+ file.print(object.toString());
+ if (saveImages) {
+ String suffix = String.format("%05d.png", i++);
+ String pngName = String.format("%s_%s", fileName, suffix);
+ Image image = new Image(saveAs.getDisplay(), 100, 100);
+ try {
+ GC gc = new GC(image);
+ try {
+ draw(gc, object);
+ } finally {
+ gc.dispose();
+ }
+ ImageLoader loader = new ImageLoader();
+ loader.data = new ImageData[] { image.getImageData() };
+ loader.save(pngName, SWT.IMAGE_PNG);
+ } finally {
+ image.dispose();
+ }
+
+ file.print(" -> ");
+ file.print(suffix);
+ }
+ file.println();
+ if (stackTrace.getSelection()) {
+ error.printStackTrace(file);
+ System.out.println();
+ }
+ }
+ } catch (IOException e1) {
+ MessageBox msg = new MessageBox(saveAs.getShell(), SWT.ICON_ERROR | SWT.OK);
+ msg.setText("Failed to save");
+ msg.setMessage("Failed to save S-Leak file.\n" + e1.getMessage());
+ msg.open();
}
- refreshLabel ();
- layout ();
}
void toggleStackTrace () {
refreshObject ();
- layout ();
+ canvas.getParent().layout ();
}
void paintCanvas (Event event) {
@@ -175,13 +401,11 @@ void paintCanvas (Event event) {
int index = list.getSelectionIndex ();
if (index == -1) return;
GC gc = event.gc;
- Object object = objects [index];
- if (object instanceof Color) {
- if (((Color)object).isDisposed ()) return;
- gc.setBackground ((Color) object);
- gc.fillRectangle (canvas.getClientArea());
- return;
- }
+ Object object = objects.get(index).object;
+ draw(gc, object);
+}
+
+void draw(GC gc, Object object) {
if (object instanceof Cursor) {
if (((Cursor)object).isDisposed ()) return;
canvas.setCursor ((Cursor) object);
@@ -190,11 +414,9 @@ void paintCanvas (Event event) {
if (object instanceof Font) {
if (((Font)object).isDisposed ()) return;
gc.setFont ((Font) object);
- FontData [] array = gc.getFont ().getFontData ();
String string = "";
String lf = text.getLineDelimiter ();
- for (int i=0; i<array.length; i++) {
- FontData data = array [i];
+ for (FontData data : gc.getFont ().getFontData ()) {
String style = "NORMAL";
int bits = data.getStyle ();
if (bits != 0) {
@@ -249,52 +471,79 @@ void paintCanvas (Event event) {
void refreshObject () {
int index = list.getSelectionIndex ();
if (index == -1) return;
- if (check.getSelection ()) {
- ByteArrayOutputStream stream = new ByteArrayOutputStream ();
- PrintStream s = new PrintStream (stream);
- errors [index].printStackTrace (s);
- text.setText (stream.toString ());
- text.setVisible (true);
- canvas.setVisible (false);
+ if (stackTrace.getSelection ()) {
+ text.setText (objects.get(index).getStack());
+ setVisible(text, true);
+ setVisible(canvas, false);
+ text.getParent().layout();
} else {
- canvas.setVisible (true);
- text.setVisible (false);
+ setVisible(canvas, true);
+ setVisible(text, false);
canvas.redraw ();
}
}
-void refreshAll () {
- oldObjects = new Object [0];
- oldErrors = new Error [0];
- refreshDifference ();
- oldObjects = objects;
- oldErrors = errors;
+private void setVisible(Control control, boolean visible) {
+ control.setVisible(visible);
+ ((GridData)control.getLayoutData()).exclude = !visible;
+}
+
+private void filterNonDisposedWidgetTypes() {
+ java.util.List<Class<? extends Widget>> trackedTypes = Arrays.asList(
+// Composite.class,
+// Menu.class
+ );
+ nonDisposedWidgetTracker.setTrackedTypes(trackedTypes);
+}
+
+private void setWidgetTrackingEnabled(boolean tracking) {
+ nonDisposedWidgetTracker.setTrackingEnabled(tracking);
}
-void layout () {
- Composite parent = canvas.getParent();
- Rectangle rect = parent.getClientArea ();
- int width = 0;
- String [] items = list.getItems ();
- GC gc = new GC (list);
- for (int i=0; i<objects.length; i++) {
- width = Math.max (width, gc.stringExtent (items [i]).x);
+private java.util.List<ObjectWithError> getNonDisposedWidgets() {
+ java.util.List<ObjectWithError> nonDisposedWidgets = new ArrayList<>();
+ nonDisposedWidgetTracker.getNonDisposedWidgets().forEach((w, e) -> nonDisposedWidgets.add(new ObjectWithError(w, e)));
+ return nonDisposedWidgets;
+}
+
+private void resetNonDisposedWidgets() {
+ nonDisposedWidgetTracker.startTracking();
+}
+
+private static final class ObjectWithError {
+ final Object object;
+ final Error error;
+ String stack;
+ StackTraceElement creator;
+
+ ObjectWithError(Object o, Error e) {
+ this.object = o;
+ this.error = e;
+ }
+
+ StackTraceElement getCreator() {
+ if (creator == null) {
+ String objectType = object.getClass().getName();
+ Iterator<StackTraceElement> stack = Arrays.asList(error.getStackTrace()).iterator();
+ while (stack.hasNext()) {
+ StackTraceElement element = stack.next();
+ if (element.getClassName().equals(objectType) && element.getMethodName().equals("<init>")) {
+ creator = stack.hasNext() ? stack.next() : null;
+ break;
+ }
+ }
+ }
+ return creator;
+ }
+
+ String getStack() {
+ if (stack == null) {
+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
+ PrintStream s = new PrintStream(stream);
+ error.printStackTrace(s);
+ stack = stream.toString();
+ }
+ return stack;
}
- gc.dispose ();
- Point size1 = start.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Point size2 = stop.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Point size3 = check.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Point size4 = label.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- width = Math.max (size1.x, Math.max (size2.x, Math.max (size3.x, width)));
- width = Math.max (64, Math.max (size4.x, list.computeSize (width, SWT.DEFAULT).x));
- start.setBounds (0, 0, width, size1.y);
- stop.setBounds (0, size1.y, width, size2.y);
- check.setBounds (0, size1.y + size2.y, width, size3.y);
- label.setBounds (0, rect.height - size4.y, width, size4.y);
- int height = size1.y + size2.y + size3.y;
- list.setBounds (0, height, width, rect.height - height - size4.y);
- text.setBounds (width, 0, rect.width - width, rect.height);
- canvas.setBounds (width, 0, rect.width - width, rect.height);
}
-
}
diff --git a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/SpiesPlugin.java b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/SpiesConstants.java
index d1f7add9a4..17839ee955 100644
--- a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/SpiesPlugin.java
+++ b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/SpiesConstants.java
@@ -12,9 +12,11 @@
package org.eclipse.swt.tools.internal;
/**
- * Class containing constants pertaining to the Spies plug-in.
+ * Interface containing constants for the Spies plug-in.
+ *
*/
-public final class SpiesPlugin {
+
+public interface SpiesConstants {
/**
* Identifies the spies plug-in.
*/
diff --git a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SleakView.java b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SleakView.java
index 59e9876e1b..e3985864e5 100644
--- a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SleakView.java
+++ b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SleakView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2013 IBM Corporation and others.
+ * Copyright (c) 2004, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,60 +10,34 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Lars Vogel <Lars.Vogel@vogella.com> - Converted to e4 view
*******************************************************************************/
package org.eclipse.swt.tools.views;
-import org.eclipse.swt.*;
+import javax.annotation.*;
+
+import org.eclipse.e4.ui.di.*;
import org.eclipse.swt.tools.internal.*;
import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.part.*;
/**
- * This sample class demonstrates how to plug-in a new
- * workbench view. The view shows data obtained from the
- * model. The sample creates a dummy model on the fly,
- * but a real implementation would connect to the model
- * available either in this or another plug-in (e.g. the workspace).
- * The view is connected to the model using a content provider.
- * <p>
- * The view uses a label provider to define how model
- * objects should be presented in the view. Each
- * view can present the same model objects using
- * different labels and icons, if needed. Alternatively,
- * a single label provider can be shared between views
- * in order to ensure that objects of the same type are
- * presented in the same way everywhere.
- * <p>
+ * Sleak view to trace native handler allocation
*/
-public class SleakView extends ViewPart {
-
- Composite parent = null;
- Sleak sleak = null;
+public class SleakView {
- /**
- * The constructor.
- */
- public SleakView() {
- }
+ private Composite composite;
- /**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
- */
- @Override
+ @PostConstruct
public void createPartControl(Composite parent) {
- this.parent = new Composite(parent, SWT.NONE);
- sleak = new Sleak ();
- sleak.create(this.parent);
+ Sleak sleak = new Sleak ();
+ sleak.create(parent);
+ composite = parent;
}
- /**
- * Passing the focus request to the viewer's control.
- */
- @Override
+ @Focus
public void setFocus() {
- parent.setFocus();
+ composite.setFocus();
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SpyView.java b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SpyView.java
index c010ce7830..e1ccca3cfd 100644
--- a/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SpyView.java
+++ b/bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/views/SpyView.java
@@ -37,7 +37,7 @@ public class SpyView extends ViewPart {
static final int TIMEOUT = 100;
private static final ImageDescriptor SPY_IMAGE_DESCRIPTOR = ImageDescriptor.createFromURL(
- FileLocator.find(Platform.getBundle(SpiesPlugin.PLUGIN_ID), new Path("icons/spy.png"), null));
+ FileLocator.find(Platform.getBundle(SpiesConstants.PLUGIN_ID), new Path("icons/spy.png"), null));
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
@@ -79,21 +79,19 @@ public class SpyView extends ViewPart {
text.append("\n");
if (control instanceof Composite) {
text.append("\nChildren:\n");
- Control[] children = ((Composite)control).getChildren();
- for (int i = 0; i < children.length; i++) {
- text.append("\t"+getName(children[i])+"\n");
+ for (Control element : ((Composite)control).getChildren()) {
+ text.append("\t"+getName(element)+"\n");
}
}
Composite parent = control.getParent();
if (parent != null) {
text.append("\nPeers:\n");
- Control[] peers = parent.getChildren();
- for (int i = 0; i < peers.length; i++) {
+ for (Control peer : parent.getChildren()) {
text.append("\t");
- if (peers[i] == control) text.append("*");
- text.append(getName(peers[i])+"@"+getOSHandle(peers[i]));
- text.append(" Layout Data: "+getName(peers[i].getLayoutData()));
- text.append(" Bounds: "+peers[i].getBounds());
+ if (peer == control) text.append("*");
+ text.append(getName(peer)+"@"+getOSHandle(peer));
+ text.append(" Layout Data: "+getName(peer.getLayoutData()));
+ text.append(" Bounds: "+peer.getBounds());
text.append("\n");
}
text.append("\nParent Tree:\n");
@@ -159,10 +157,9 @@ public class SpyView extends ViewPart {
private String getOSHandle(Control control) {
if (field == null) {
- String[] fieldNames = {"handle", "view"};
- for (int i = 0; i < fieldNames.length; i++) {
+ for (String fieldName : new String[]{"handle", "view"}) {
try {
- field = control.getClass().getField(fieldNames[i]);
+ field = control.getClass().getField(fieldName);
if (field != null) break;
} catch (Throwable e) {}
}
diff --git a/bundles/org.eclipse.swt.tools/.classpath b/bundles/org.eclipse.swt.tools/.classpath
index d54b36d91d..9411db6b9a 100644
--- a/bundles/org.eclipse.swt.tools/.classpath
+++ b/bundles/org.eclipse.swt.tools/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="JNI Generation"/>
diff --git a/bundles/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs
index 6c7890ee50..01068ea5e8 100644
--- a/bundles/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs
@@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -26,6 +26,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -71,6 +72,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -106,4 +108,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/bundles/org.eclipse.swt.tools/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.swt.tools/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2d3d6b7f98
--- /dev/null
+++ b/bundles/org.eclipse.swt.tools/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+compilers.p.unresolved-ex-points=1 \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java b/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
index 547a8dc03e..aeb0f9dfe6 100644
--- a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
+++ b/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
@@ -28,11 +28,11 @@ import org.eclipse.swt.*;
*/
public class IconExe {
- /**
+ /**
* Replace the Desktop icons provided in the Windows executable program
* with matching icons provided by the user.
*
- * Takes 2 arguments
+ * Takes 2 arguments
* argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
* argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
*
@@ -144,13 +144,13 @@ public class IconExe {
IconExe iconExe = new IconExe();
IconResInfo[] iconInfo = iconExe.getIcons(raf);
int cnt = 0;
- for (int i = 0; i < iconInfo.length; i++) {
- for (int j = 0; j < icons.length; j++)
- if (iconInfo[i].data.width == icons[j].width &&
- iconInfo[i].data.height == icons[j].height &&
- iconInfo[i].data.depth == icons[j].depth) {
- raf.seek(iconInfo[i].offset);
- unloadIcon(raf, icons[j]);
+ for (IconResInfo element : iconInfo) {
+ for (ImageData icon : icons)
+ if (element.data.width == icon.width &&
+ element.data.height == icon.height &&
+ element.data.depth == icon.depth) {
+ raf.seek(element.offset);
+ unloadIcon(raf, icon);
cnt++;
}
}
@@ -233,15 +233,12 @@ void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffse
imageResourceDirectoryEntries[i] = new IMAGE_RESOURCE_DIRECTORY_ENTRY();
read(raf, imageResourceDirectoryEntries[i]);
}
- for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
- if (imageResourceDirectoryEntries[i].DataIsDirectory) {
- dumpResourceDirectory(raf, imageResourceDirectoryEntries[i].OffsetToDirectory + resourceBase, resourceBase, delta, imageResourceDirectoryEntries[i].Id, level + 1, rt_icon_root ? true : type == RT_ICON);
+ for (IMAGE_RESOURCE_DIRECTORY_ENTRY irde : imageResourceDirectoryEntries) {
+ if (irde.DataIsDirectory) {
+ dumpResourceDirectory(raf, irde.OffsetToDirectory + resourceBase, resourceBase, delta, irde.Id, level + 1, rt_icon_root ? true : type == RT_ICON);
} else {
- // Resource found
- /// pResDirEntry->Name
- IMAGE_RESOURCE_DIRECTORY_ENTRY irde = imageResourceDirectoryEntries[i];
IMAGE_RESOURCE_DATA_ENTRY data = new IMAGE_RESOURCE_DATA_ENTRY();
- raf.seek(imageResourceDirectoryEntries[i].OffsetToData + resourceBase);
+ raf.seek(irde.OffsetToData + resourceBase);
read(raf, data);
if (DEBUG) System.out.println("Resource Id "+irde.Id+" Data Offset RVA "+data.OffsetToData+", Size "+data.Size);
if (rt_icon_root) {
@@ -258,7 +255,7 @@ void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffse
}
}
}
- }
+ }
}
static ImageData parseIcon(RandomAccessFile raf, int offset) throws IOException {
@@ -2616,13 +2613,13 @@ static class LEDataInputStream extends InputStream {
}
/**
- * Reads at most <code>length</code> bytes from this LEDataInputStream and
- * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- * <p>
- * Answer the number of bytes actually read or -1 if no bytes were read and
- * end of stream was encountered. This implementation reads bytes from
- * the pushback buffer first, then the target stream if more bytes are required
- * to satisfy <code>count</code>.
+ * Reads at most <code>length</code> bytes from this LEDataInputStream and
+ * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
+ * <p>
+ * Answer the number of bytes actually read or -1 if no bytes were read and
+ * end of stream was encountered. This implementation reads bytes from
+ * the pushback buffer first, then the target stream if more bytes are required
+ * to satisfy <code>count</code>.
* </p>
* @param buffer the byte array in which to store the read bytes.
* @param offset the offset in <code>buffer</code> to store the read bytes.
@@ -2635,9 +2632,9 @@ static class LEDataInputStream extends InputStream {
private int readData(byte[] buffer, int offset, int length) throws IOException {
if (buf == null) throw new IOException();
if (offset < 0 || offset > buffer.length ||
- length < 0 || (length > buffer.length - offset)) {
- throw new ArrayIndexOutOfBoundsException();
- }
+ length < 0 || (length > buffer.length - offset)) {
+ throw new ArrayIndexOutOfBoundsException();
+ }
int cacheCopied = 0;
int newOffset = offset;
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java
index 351ba2eac9..a9aa666b68 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2017 IBM Corporation and others.
+ * Copyright (c) 2004, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -40,8 +40,8 @@ public class ASTClass extends ASTItem implements JNIClass {
if (file.exists()) {
return file.getAbsolutePath();
}
- for (int i = 0; i < imports.length; i++) {
- file = new File(basePath + imports[i].replace('.', '/') + "/" + simpleName + ".java");
+ for (String imp : imports) {
+ file = new File(basePath + imp.replace('.', '/') + "/" + simpleName + ".java");
if (file.exists()) {
return file.getAbsolutePath();
}
@@ -56,10 +56,10 @@ public class ASTClass extends ASTItem implements JNIClass {
if (file.exists()) {
return packageName + "." + simpleName;
}
- for (int i = 0; i < imports.length; i++) {
- file = new File(basePath + imports[i].replace('.', '/') + "/" + simpleName + ".java");
+ for (String imp : imports) {
+ file = new File(basePath + imp.replace('.', '/') + "/" + simpleName + ".java");
if (file.exists()) {
- return imports[i] + "." + simpleName;
+ return imp + "." + simpleName;
}
}
return simpleName;
@@ -71,7 +71,7 @@ public ASTClass(String sourcePath, MetaData metaData) {
this.metaData = metaData;
String source = JNIGenerator.loadFile(sourcePath);
- ASTParser parser = ASTParser.newParser(AST.JLS8);
+ ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
parser.setSource(source.toCharArray());
CompilationUnit unit = (CompilationUnit)parser.createAST(null);
TypeDeclaration type = (TypeDeclaration)unit.types().get(0);
@@ -100,21 +100,18 @@ public ASTClass(String sourcePath, MetaData metaData) {
}
}
- FieldDeclaration[] fields = type.getFields();
List<ASTField> fid = new ArrayList<>();
- for (int i = 0; i < fields.length; i++) {
- FieldDeclaration field = fields[i];
+ for (FieldDeclaration field : type.getFields()) {
List<VariableDeclarationFragment> fragments = field.fragments();
for (VariableDeclarationFragment fragment : fragments) {
- fid.add(new ASTField(this, source, field, fragment));
+ fid.add(new ASTField(this, field, fragment));
}
}
this.fields = fid.toArray(new ASTField[fid.size()]);
- MethodDeclaration[] methods = type.getMethods();
List<ASTMethod> mid = new ArrayList<>();
- for (int i = 0; i < methods.length; i++) {
- if (methods[i].getReturnType2() == null) continue;
- mid.add(new ASTMethod(this, source, methods[i]));
+ for (MethodDeclaration method : type.getMethods()) {
+ if (method.getReturnType2() == null) continue;
+ mid.add(new ASTMethod(this, method));
}
this.methods = mid.toArray(new ASTMethod[mid.size()]);
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java
index 0696cefe95..061f748477 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java
@@ -21,11 +21,11 @@ public class ASTField extends ASTItem implements JNIField {
ASTClass declaringClass;
String name;
int modifiers;
- ASTType type, type64;
+ ASTType type;
String data;
int start;
-public ASTField(ASTClass declaringClass, String source, FieldDeclaration field, VariableDeclarationFragment fragment) {
+public ASTField(ASTClass declaringClass, FieldDeclaration field, VariableDeclarationFragment fragment) {
this.declaringClass = declaringClass;
name = fragment.getName().getIdentifier();
modifiers = field.getModifiers();
@@ -44,18 +44,6 @@ public ASTField(ASTClass declaringClass, String source, FieldDeclaration field,
}
}
type = new ASTType(declaringClass.resolver, field.getType(), fragment.getExtraDimensions());
- type64 = this.type;
- if (GEN64) {
- String s = source.substring(field.getStartPosition(), field.getStartPosition() + field.getLength());
- if (type.isType("int") && s.indexOf("int /*long*/") != -1) type64 = new ASTType("J");
- else if (type.isType("float") && s.indexOf("float /*double*/") != -1) type64 = new ASTType("D");
- else if (type.isType("[I") && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) type64 = new ASTType("[J");
- else if (type.isType("[F") && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) type64 = new ASTType("[D");
- else if (type.isType("long") && s.indexOf("long /*int*/") != -1) type = new ASTType("I");
- else if (type.isType("double") && s.indexOf("double /*float*/") != -1) type = new ASTType("F");
- else if (type.isType("[J") && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) type = new ASTType("[I");
- else if (type.isType("[D") && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) type = new ASTType("[F");
- }
}
@Override
@@ -91,11 +79,6 @@ public JNIType getType() {
}
@Override
-public JNIType getType64() {
- return type64;
-}
-
-@Override
public String getAccessor() {
return (String)getParam("accessor");
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java
index c3613d746f..b01e79d8f2 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2017 IBM Corporation and others.
+ * Copyright (c) 2004, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -22,14 +22,14 @@ public class ASTMethod extends ASTItem implements JNIMethod {
String name, qualifiedName;
int modifiers;
ASTClass declaringClass;
- ASTType[] paramTypes, paramTypes64;
- ASTType returnType, returnType64;
+ ASTType[] paramTypes;
+ ASTType returnType;
ASTParameter[] parameters;
Boolean unique;
String data;
int start;
-public ASTMethod(ASTClass declaringClass, String source, MethodDeclaration method) {
+public ASTMethod(ASTClass declaringClass, MethodDeclaration method) {
this.declaringClass = declaringClass;
name = method.getName().getIdentifier();
@@ -49,46 +49,22 @@ public ASTMethod(ASTClass declaringClass, String source, MethodDeclaration metho
}
}
returnType = new ASTType(declaringClass.resolver, method.getReturnType2(), method.getExtraDimensions());
- returnType64 = returnType;
- if (GEN64) {
- String s = source.substring(method.getReturnType2().getStartPosition(), method.getName().getStartPosition());
- if (returnType.isType("int") && s.indexOf("int /*long*/") != -1) returnType64 = new ASTType("J");
- else if (returnType.isType("float") && s.indexOf("float /*double*/") != -1) returnType64 = new ASTType("D");
- else if (returnType.isType("[I") && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) returnType64 = new ASTType("[J");
- else if (returnType.isType("[F") && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) returnType64 = new ASTType("[D");
- else if (returnType.isType("long") && s.indexOf("long /*int*/") != -1) returnType = new ASTType("I");
- else if (returnType.isType("double") && s.indexOf("double /*float*/") != -1) returnType = new ASTType("F");
- else if (returnType.isType("[J") && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) returnType = new ASTType("[I");
- else if (returnType.isType("[D") && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) returnType = new ASTType("[F");
- }
List<SingleVariableDeclaration> parameters = method.parameters();
paramTypes = new ASTType[parameters.size()];
- paramTypes64 = new ASTType[parameters.size()];
this.parameters = new ASTParameter[paramTypes.length];
int i = 0;
for (Iterator<SingleVariableDeclaration> iterator = parameters.iterator(); iterator.hasNext(); i++) {
SingleVariableDeclaration param = iterator.next();
paramTypes[i] = new ASTType(declaringClass.resolver, param.getType(), param.getExtraDimensions());
- paramTypes64[i] = paramTypes[i];
this.parameters[i] = new ASTParameter(this, i, param.getName().getIdentifier());
- if (GEN64) {
- String s = source.substring(param.getStartPosition(), param.getStartPosition() + param.getLength());
- if (paramTypes[i].isType("int") && s.indexOf("int /*long*/") != -1) paramTypes64[i] = new ASTType("J");
- else if (paramTypes[i].isType("float") && s.indexOf("float /*double*/") != -1) paramTypes64[i] = new ASTType("D");
- else if (paramTypes[i].isType("[I") && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) paramTypes64[i] = new ASTType("[J");
- else if (paramTypes[i].isType("[F") && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) paramTypes64[i] = new ASTType("[D");
- else if (paramTypes[i].isType("long") && s.indexOf("long /*int*/") != -1) paramTypes[i] = new ASTType("I");
- else if (paramTypes[i].isType("double") && s.indexOf("double /*float*/") != -1) paramTypes[i] = new ASTType("F");
- else if (paramTypes[i].isType("[J") && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) paramTypes[i] = new ASTType("[I");
- else if (paramTypes[i].isType("[D") && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) paramTypes[i] = new ASTType("[F");
- }
+
if (tags != null) {
String name = param.getName().getIdentifier();
for (TagElement tag : tags) {
if ("@param".equals(tag.getTagName())) {
List<?> fragments = tag.fragments();
- if (name.equals(fragments.get(0).toString())) {
+ if (fragments.size() >= 2 && name.equals(fragments.get(0).toString())) {
String data = fragments.get(1).toString();
this.parameters[i].setMetaData(data);
}
@@ -118,9 +94,7 @@ public boolean isNativeUnique() {
if (unique != null) return unique.booleanValue();
boolean result = true;
String name = getName();
- JNIMethod[] methods = declaringClass.getDeclaredMethods();
- for (int i = 0; i < methods.length; i++) {
- JNIMethod mth = methods[i];
+ for (JNIMethod mth : declaringClass.getDeclaredMethods()) {
if ((mth.getModifiers() & Modifier.NATIVE) != 0 &&
this != mth && !this.equals(mth) &&
name.equals(mth.getName()))
@@ -139,11 +113,6 @@ public JNIType[] getParameterTypes() {
}
@Override
-public JNIType[] getParameterTypes64() {
- return paramTypes64;
-}
-
-@Override
public JNIParameter[] getParameters() {
return this.parameters;
}
@@ -154,11 +123,6 @@ public JNIType getReturnType() {
}
@Override
-public JNIType getReturnType64() {
- return returnType64;
-}
-
-@Override
public String getAccessor() {
return (String)getParam("accessor");
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java
index 0ee7a1b37e..2043044f63 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java
@@ -84,11 +84,6 @@ public JNIType getType() {
}
@Override
-public JNIType getType64() {
- return method.getParameterTypes64()[parameter];
-}
-
-@Override
public int getParameter() {
return parameter;
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java
index 440bad990e..1c9cfd55d4 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java
@@ -105,63 +105,56 @@ public String getSimpleName() {
}
@Override
-public String getTypeSignature(boolean define) {
+public String getTypeSignature() {
if (isPrimitive()) {
- if (define) {
- if (name.equals("I")) return "I_J";
- if (name.equals("J")) return "I_J";
- if (name.equals("F")) return "F_D";
- if (name.equals("D")) return "F_D";
- }
return name;
}
if (isArray()) {
- if (define) return getComponentType().getTypeSignature(define) + "Array";
- return "[" + getComponentType().getTypeSignature(define);
+ return "[" + getComponentType().getTypeSignature();
}
return name;
}
@Override
-public String getTypeSignature1(boolean define) {
+public String getTypeSignature1() {
if (isPrimitive()) {
if (name.equals("V")) return "Void";
- if (name.equals("I")) return define ? "IntLong" : "Int";
+ if (name.equals("I")) return "Int";
if (name.equals("Z")) return "Boolean";
- if (name.equals("J")) return define ? "IntLong" : "Long";
+ if (name.equals("J")) return "Long";
if (name.equals("S")) return "Short";
if (name.equals("C")) return "Char";
if (name.equals("B")) return "Byte";
- if (name.equals("F")) return define ? "FloatDouble" : "Float";
- if (name.equals("D")) return define ? "FloatDouble" : "Double";
+ if (name.equals("F")) return "Float";
+ if (name.equals("D")) return "Double";
}
if (name.equals("Ljava/lang/String;")) return "String";
return "Object";
}
@Override
-public String getTypeSignature2(boolean define) {
+public String getTypeSignature2() {
if (isPrimitive()) {
if (name.equals("V")) return "void";
- if (name.equals("I")) return define ? "jintLong" : "jint";
+ if (name.equals("I")) return "jint";
if (name.equals("Z")) return "jboolean";
- if (name.equals("J")) return define ? "jintLong" : "jlong";
+ if (name.equals("J")) return "jlong";
if (name.equals("S")) return "jshort";
if (name.equals("C")) return "jchar";
if (name.equals("B")) return "jbyte";
- if (name.equals("F")) return define ? "jfloatDouble" : "jfloat";
- if (name.equals("D")) return define ? "jfloatDouble" : "jdouble";
+ if (name.equals("F")) return "jfloat";
+ if (name.equals("D")) return "jdouble";
}
if (name.equals("Ljava/lang/String;")) return "jstring";
if (name.equals("Ljava/lang/Class;")) return "jclass";
if (isArray()) {
- return getComponentType().getTypeSignature2(define) + "Array";
+ return getComponentType().getTypeSignature2() + "Array";
}
return "jobject";
}
@Override
-public String getTypeSignature3(boolean define) {
+public String getTypeSignature3() {
if (isPrimitive()) {
if (name.equals("V")) return "void";
if (name.equals("I")) return "int";
@@ -175,27 +168,27 @@ public String getTypeSignature3(boolean define) {
}
if (name.equals("Ljava/lang/String;")) return "String";
if (isArray()) {
- return getComponentType().getTypeSignature3(define) + "[]";
+ return getComponentType().getTypeSignature3() + "[]";
}
return getName();
}
@Override
-public String getTypeSignature4(boolean define, boolean struct) {
+public String getTypeSignature4(boolean struct) {
if (isPrimitive()) {
if (name.equals("V")) return "void";
- if (name.equals("I")) return define ? "jintLong" : "jint";
+ if (name.equals("I")) return "jint";
if (name.equals("Z")) return "jboolean";
- if (name.equals("J")) return define ? "jintLong" : "jlong";
+ if (name.equals("J")) return "jlong";
if (name.equals("S")) return "jshort";
if (name.equals("C")) return "jchar";
if (name.equals("B")) return "jbyte";
- if (name.equals("F")) return define ? "jfloatDouble" : "jfloat";
- if (name.equals("D")) return define ? "jfloatDouble" : "jdouble";
+ if (name.equals("F")) return "jfloat";
+ if (name.equals("D")) return "jdouble";
}
if (name.equals("Ljava/lang/String;")) return "jstring";
if (isArray()) {
- String sig = getComponentType().getTypeSignature4(define, struct);
+ String sig = getComponentType().getTypeSignature4(struct);
return struct ? sig : sig + " *";
}
String sig = getSimpleName();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java
index ed2f1418f7..15aa5ca23f 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java
@@ -34,20 +34,13 @@ public String flatten() {
Set<String> set = params.keySet();
String[] keys = set.toArray(new String[set.size()]);
Arrays.sort(keys);
- for (int j = 0; j < keys.length; j++) {
- String key = keys[j];
+ for (String key : keys) {
Object value = params.get(key);
String valueStr = "";
if (value instanceof String) {
valueStr = (String)value;
} else if (value instanceof String[]) {
- String[] values = (String[])value;
- StringBuilder valueBuffer = new StringBuilder();
- for (int i = 0; i < values.length; i++) {
- if (i != 0) valueBuffer.append(" ");
- valueBuffer.append(values[i]);
- }
- valueStr = valueBuffer.toString();
+ valueStr = String.join(" ", (String[])value);
} else {
valueStr = value.toString();
}
@@ -79,9 +72,8 @@ public String[] getFlags() {
@Override
public boolean getFlag(String flag) {
- String[] flags = getFlags();
- for (int i = 0; i < flags.length; i++) {
- if (flags[i].equals(flag)) return true;
+ for (String f : getFlags()) {
+ if (f.equals(flag)) return true;
}
return false;
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
index 43a9e7035e..70cd627214 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
@@ -37,8 +37,8 @@ String[] getArgNames(JNIMethod method) {
int parantesesStart = classSource.indexOf("(", index);
if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
int parantesesEnd = classSource.indexOf(")", parantesesStart);
- params = classSource.substring(parantesesStart + 1, parantesesEnd);
- break;
+ params = classSource.substring(parantesesStart + 1, parantesesEnd);
+ break;
}
}
String[] names = new String[n_args];
@@ -66,8 +66,8 @@ void loadFiles () {
// BAD - holds on to a lot of memory
if (sourcePath == null) return;
files = new HashMap<> ();
- for (int i = 0; i < sourcePath.length; i++) {
- File file = new File(sourcePath[i]);
+ for (String path : sourcePath) {
+ File file = new File(path);
if (file.exists()) {
if (!file.isDirectory()) {
if (file.getAbsolutePath().endsWith(".java")) {
@@ -102,8 +102,7 @@ void loadDirectory(File file) {
if (entries == null) {
entries = new String[0];
}
- for (int i = 0; i < entries.length; i++) {
- String entry = entries[i];
+ for (String entry : entries) {
File f = new File(file, entry);
if (!f.isDirectory()) {
if (f.getAbsolutePath().endsWith(".java")) {
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
index 19f1147190..871e996a53 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
@@ -27,7 +27,7 @@ String getFieldValue(JNIField field) {
int equalsIndex = classSource.indexOf("=", index);
if (classSource.substring(index + name.length(), equalsIndex).trim().length() == 0) {
int semiIndex = classSource.indexOf(";", equalsIndex);
- return classSource.substring(equalsIndex + 1, semiIndex).trim();
+ return classSource.substring(equalsIndex + 1, semiIndex).trim();
}
}
}
@@ -43,8 +43,7 @@ public void generate(JNIClass clazz) {
public void generate(JNIField[] fields) {
sort(fields);
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : fields) {
if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
generate(field);
}
@@ -53,13 +52,13 @@ public void generate(JNIField[] fields) {
public void generate(JNIField field) {
String name = field.getName();
for (String str : files.values()) {
- if (str.indexOf(name) != -1) {
+ if (str.contains(name)) {
int modifiers = field.getModifiers();
String modifiersStr = Modifier.toString(modifiers);
output("\t");
output(modifiersStr);
if (modifiersStr.length() > 0) output(" ");
- output(field.getType().getTypeSignature3(false));
+ output(field.getType().getTypeSignature3());
output(" " );
output(field.getName());
output(" = ");
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java
index fd2186fa53..44e078dd5e 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java
@@ -32,8 +32,7 @@ public void generate(JNIClass clazz) {
public void generate(JNIMethod[] methods) {
sort(methods);
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
generate(method);
}
@@ -42,7 +41,7 @@ public void generate(JNIMethod[] methods) {
public void generate(JNIMethod method) {
String name = method.getName();
for (String str : files.values()) {
- if (str.indexOf(name) != -1) {
+ if (str.contains(name)) {
// int modifiers = method.getModifiers();
// Class clazz = method.getDeclaringClass();
// String modifiersStr = Modifier.toString(modifiers);
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java
index 79dfaa1d83..f92836c578 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java
@@ -26,8 +26,7 @@ public void generate(JNIClass clazz) {
public void generate(JNIField[] fields) {
sort(fields);
outputln("int main() {");
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : fields) {
if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
generate(field);
}
@@ -37,7 +36,7 @@ public void generate(JNIField[] fields) {
public void generate(JNIField field) {
JNIType type = field.getType();
output("\tprintf(\"public static final ");
- output(field.getType().getTypeSignature3(false));
+ output(field.getType().getTypeSignature3());
output(" ");
output(field.getName());
output(" = ");
@@ -55,8 +54,7 @@ public static void main(String[] args) {
}
try {
ConstantsGenerator gen = new ConstantsGenerator();
- for (int i = 0; i < args.length; i++) {
- String clazzName = args[i];
+ for (String clazzName : args) {
Class<?> clazz = Class.forName(clazzName);
gen.generate(new ReflectClass(clazz));
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java
index 8d977d97c3..0cf02adbb8 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java
@@ -52,8 +52,7 @@ public void generate(JNIClass clazz) {
}
public void generate(JNIField[] fields) {
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : fields) {
int mods = field.getModifiers();
if ((mods & Modifier.PUBLIC) == 0) continue;
if ((mods & Modifier.FINAL) != 0) continue;
@@ -73,8 +72,7 @@ public void generate(JNIField field) {
}
public void generate(JNIMethod[] methods) {
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
generate(method);
}
@@ -86,9 +84,8 @@ public void generate(JNIMethod method) {
if (data != null && data.length() != 0) {
tags.add("@method " + data);
}
- JNIParameter[] params = method.getParameters();
- for (int i = 0; i < params.length; i++) {
- ASTParameter param = (ASTParameter)params[i];
+ for (JNIParameter p : method.getParameters()) {
+ ASTParameter param = (ASTParameter)p;
//wrap cast with parentheses
param.setCast(param.getCast());
data = ((AbstractItem)param).flatten();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java
index cbcff5827c..6b04795919 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java
@@ -39,4 +39,5 @@ public interface Flags {
public static final String FLAG_SETTER = "setter";
public static final String FLAG_GETTER = "getter";
public static final String FLAG_ADDER = "adder";
+ public static final String FLAG_IGNORE_DEPRECATIONS = "ignore_deprecations";
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java
index a1bbbab612..860a42108b 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java
@@ -23,8 +23,6 @@ public int getModifiers();
public JNIType getType();
-public JNIType getType64();
-
public JNIClass getDeclaringClass();
public String getAccessor();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
index 636e0ad81c..c278803a4a 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2018 IBM Corporation and others.
+ * Copyright (c) 2004, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -26,10 +26,9 @@ public abstract class JNIGenerator implements Flags {
PrintStream output;
ProgressMonitor progress;
- static final String JNI64 = "JNI64";
public JNIGenerator() {
- delimiter = System.getProperty("line.separator");
+ delimiter = System.lineSeparator();
output = System.out;
metaData = new MetaData(new Properties());
}
@@ -102,7 +101,7 @@ public static String getDelimiter(String fileName) {
}
} catch (IOException e) {
}
- return System.getProperty("line.separator");
+ return System.lineSeparator();
}
String fixDelimiter(String str) {
@@ -134,9 +133,8 @@ static String getFunctionName(JNIMethod method, JNIType[] paramTypes) {
StringBuilder buffer = new StringBuilder();
buffer.append(function);
buffer.append("__");
- for (int i = 0; i < paramTypes.length; i++) {
- JNIType paramType = paramTypes[i];
- buffer.append(toC(paramType.getTypeSignature(false)));
+ for (JNIType paramType : paramTypes) {
+ buffer.append(toC(paramType.getTypeSignature()));
}
return buffer.toString();
}
@@ -220,8 +218,7 @@ public void generate() {
generateAutoGenNote();
generateIncludes();
sort(classes);
- for (int i = 0; i < classes.length; i++) {
- JNIClass clazz = classes[i];
+ for (JNIClass clazz : classes) {
if (getGenerate(clazz)) generate(clazz);
if (progress != null) progress.step();
}
@@ -241,8 +238,7 @@ public JNIClass[] getClasses() {
}
public boolean getCPP() {
- for (int i = 0; i < classes.length; i++) {
- JNIClass clazz = classes[i];
+ for (JNIClass clazz : classes) {
if (clazz.getFlag(FLAG_CPP)) {
return true;
}
@@ -275,8 +271,7 @@ public String getOutputName() {
}
public boolean getM() {
- for (int i = 0; i < classes.length; i++) {
- JNIClass clazz = classes[i];
+ for (JNIClass clazz : classes) {
if (clazz.getFlag(FLAG_M)) {
return true;
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java
index 8b194b08f6..fbbdce9e4a 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java
@@ -229,11 +229,8 @@ public void generate(ProgressMonitor progress) {
this.progress = progress;
if (progress != null) {
int nativeCount = 0;
- for (int i = 0; i < natives.length; i++) {
- JNIClass clazz = natives[i];
- JNIMethod[] methods = clazz.getDeclaredMethods();
- for (int j = 0; j < methods.length; j++) {
- JNIMethod method = methods[j];
+ for (JNIClass clazz : natives) {
+ for (JNIMethod method : clazz.getDeclaredMethods()) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
nativeCount++;
}
@@ -302,8 +299,7 @@ String[] getClassNames() {
if(entries == null) {
entries = new String[0];
}
- for (int i = 0; i < entries.length; i++) {
- String entry = entries[i];
+ for (String entry : entries) {
File f = new File(file, entry);
if (!f.isDirectory()) {
if (f.getAbsolutePath().endsWith(".class")) {
@@ -357,8 +353,7 @@ JNIClass[] getASTClasses() {
if (files == null) {
files = new File[0];
}
- for (int i = 0; i < files.length; i++) {
- File file = files[i];
+ for (File file : files) {
try {
String path = file.getAbsolutePath().replace('\\', '/');
if (path.endsWith(".java")) {
@@ -371,6 +366,8 @@ JNIClass[] getASTClasses() {
if (cce.getMessage().startsWith(EnumDeclaration.class.getName())) {
// this can be ignored since enums don't affect native files
}
+ } catch (IndexOutOfBoundsException e) {
+ // ignore, can also happen because of enums
}
}
}
@@ -384,11 +381,8 @@ JNIClass[] getASTClasses() {
public JNIClass[] getNativesClasses(JNIClass[] classes) {
if (mainClass == null) return new JNIClass[0];
List<JNIClass> result = new ArrayList<>();
- for (int i = 0; i < classes.length; i++) {
- JNIClass clazz = classes[i];
- JNIMethod[] methods = clazz.getDeclaredMethods();
- for (int j = 0; j < methods.length; j++) {
- JNIMethod method = methods[j];
+ for (JNIClass clazz : classes) {
+ for (JNIMethod method : clazz.getDeclaredMethods()) {
int mods = method.getModifiers();
if ((mods & Modifier.NATIVE) != 0) {
result.add(clazz);
@@ -403,18 +397,13 @@ public JNIClass[] getStructureClasses(JNIClass[] classes) {
if (mainClass == null) return new JNIClass[0];
List<JNIClass> result = new ArrayList<>();
outer:
- for (int i = 0; i < classes.length; i++) {
- JNIClass clazz = classes[i];
- JNIMethod[] methods = clazz.getDeclaredMethods();
- for (int j = 0; j < methods.length; j++) {
- JNIMethod method = methods[j];
+ for (JNIClass clazz : classes) {
+ for (JNIMethod method : clazz.getDeclaredMethods()) {
int mods = method.getModifiers();
if ((mods & Modifier.NATIVE) != 0) continue outer;
}
- JNIField[] fields = clazz.getDeclaredFields();
boolean hasPublicFields = false;
- for (int j = 0; j < fields.length; j++) {
- JNIField field = fields[j];
+ for (JNIField field : clazz.getDeclaredFields()) {
int mods = field.getModifiers();
if ((mods & Modifier.PUBLIC) != 0 && (mods & Modifier.STATIC) == 0) {
hasPublicFields = true;
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java
index 4a95100bf8..96880e9898 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java
@@ -155,8 +155,7 @@ void generateAll() {
shell.setCursor(cursor);
shell.setEnabled(false);
Control[] children = actionsPanel.getChildren();
- for (int i = 0; i < children.length; i++) {
- Control child = children[i];
+ for (Control child : children) {
if (child instanceof Button) child.setEnabled(false);
}
boolean showProgress = true;
@@ -204,8 +203,7 @@ void generateAll() {
while (!done[0]) {
if (!display.readAndDispatch()) display.sleep();
}
- for (int i = 0; i < children.length; i++) {
- Control child = children[i];
+ for (Control child : children) {
if (child instanceof Button) child.setEnabled(true);
}
if (showProgress) {
@@ -243,8 +241,7 @@ JNIMethod[] getSelectedMethods() {
TableItem[] selection = membersLt.getSelection();
JNIMethod[] methods = new JNIMethod[selection.length];
int count = 0;
- for (int i = 0; i < selection.length; i++) {
- TableItem item = selection [i];
+ for (TableItem item : selection) {
Object data = item.getData();
if (data instanceof JNIMethod) {
methods[count++] = (JNIMethod)data;
@@ -262,8 +259,7 @@ JNIField[] getSelectedFields() {
TableItem[] selection = membersLt.getSelection();
JNIField[] fields = new JNIField[selection.length];
int count = 0;
- for (int i = 0; i < selection.length; i++) {
- TableItem item = selection [i];
+ for (TableItem item : selection) {
Object data = item.getData();
if (data instanceof JNIField) {
fields[count++] = (JNIField)data;
@@ -909,7 +905,7 @@ String getPackageString() {
}
String getClassString(JNIType type) {
- String name = type.getTypeSignature3(false);
+ String name = type.getTypeSignature3();
int index = name.lastIndexOf('.');
if (index == -1) return name;
return name.substring(index + 1, name.length());
@@ -917,13 +913,7 @@ String getClassString(JNIType type) {
String getFlagsString(String[] flags) {
if (flags.length == 0) return "";
- StringBuilder buffer = new StringBuilder();
- for (int j = 0; j < flags.length; j++) {
- String flag = flags[j];
- if (buffer.length() != 0) buffer.append(", ");
- buffer.append(flag);
- }
- return buffer.toString();
+ return String.join(", ", flags);
}
String getMethodString(JNIMethod method) {
@@ -935,7 +925,7 @@ String getMethodString(JNIMethod method) {
for (int i = 0; i < params.length; i++) {
JNIParameter param = params[i];
if (i != 0) buffer.append(",");
- String string = param.getType().getTypeSignature3(false);
+ String string = param.getType().getTypeSignature3();
if (string.startsWith(pkgName)) string = string.substring(pkgName.length() + 1);
buffer.append(string);
}
@@ -960,9 +950,7 @@ void updateClasses() {
item.setText(CLASS_FLAGS_COLUMN, getFlagsString(clazz.getFlags()));
item.setChecked(clazz.getGenerate());
}
- TableColumn[] columns = classesLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
+ for (TableColumn column : classesLt.getColumns()) {
column.pack();
}
classesLt.setSelection(mainIndex);
@@ -972,8 +960,7 @@ void updateMembers() {
membersLt.removeAll();
membersLt.setHeaderVisible(false);
TableColumn[] columns = membersLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
+ for (TableColumn column : columns) {
column.dispose();
}
int[] indices = classesLt.getSelectionIndices();
@@ -982,8 +969,7 @@ void updateMembers() {
JNIClass clazz = (JNIClass)classItem.getData();
boolean hasNatives = false;
JNIMethod[] methods = clazz.getDeclaredMethods();
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
int mods = method.getModifiers();
if (hasNatives =((mods & Modifier.NATIVE) != 0)) break;
}
@@ -1001,8 +987,7 @@ void updateMembers() {
column.setText("Exclude");
*/
JNIGenerator.sort(methods);
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
TableItem item = new TableItem(membersLt, SWT.NONE);
item.setData(method);
@@ -1028,9 +1013,7 @@ void updateMembers() {
column = new TableColumn(membersLt, SWT.NONE, FIELD_EXCLUDE_COLUMN);
column.setText("Exclude");
*/
- JNIField[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : clazz.getDeclaredFields()) {
int mods = field.getModifiers();
if (((mods & Modifier.PUBLIC) == 0) ||
((mods & Modifier.FINAL) != 0) ||
@@ -1047,9 +1030,7 @@ void updateMembers() {
*/
}
}
- columns = membersLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
+ for (TableColumn column : membersLt.getColumns()) {
column.pack();
}
membersLt.setHeaderVisible(true);
@@ -1078,9 +1059,7 @@ void updateParameters() {
item.setText(PARAM_CAST_COLUMN, param.getCast());
item.setText(PARAM_FLAGS_COLUMN, getFlagsString(param.getFlags()));
}
- TableColumn[] columns = paramsLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
+ for (TableColumn column : paramsLt.getColumns()) {
column.pack();
}
paramsLt.setRedraw(true);
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java
index 6b10d363c1..4551ffcf1f 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java
@@ -14,8 +14,6 @@
package org.eclipse.swt.tools.internal;
public interface JNIItem extends Flags {
-
- public static final boolean GEN64 = true;
public String[] getFlags();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java
index f5fa89dd22..aabcc6811b 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.tools.internal;
public interface JNIMethod extends JNIItem {
- public static final String[] FLAGS = {FLAG_NO_GEN, FLAG_ADDRESS, FLAG_CONST, FLAG_DYNAMIC, FLAG_JNI, FLAG_CAST, FLAG_CPP, FLAG_NEW, FLAG_DELETE, FLAG_GCNEW, FLAG_OBJECT, FLAG_SETTER, FLAG_GETTER, FLAG_ADDER};
+ public static final String[] FLAGS = {FLAG_NO_GEN, FLAG_ADDRESS, FLAG_CONST, FLAG_DYNAMIC, FLAG_JNI, FLAG_CAST, FLAG_CPP, FLAG_NEW, FLAG_DELETE, FLAG_GCNEW, FLAG_OBJECT, FLAG_SETTER, FLAG_GETTER, FLAG_ADDER, FLAG_IGNORE_DEPRECATIONS};
public String getName();
@@ -27,12 +27,8 @@ public JNIParameter[] getParameters();
public JNIType getReturnType();
-public JNIType getReturnType64();
-
public JNIType[] getParameterTypes();
-public JNIType[] getParameterTypes64();
-
public JNIClass getDeclaringClass();
public String getAccessor();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java
index 68527437bc..6f424721ea 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java
@@ -27,7 +27,5 @@ public JNIClass getTypeClass();
public JNIType getType();
-public JNIType getType64();
-
public void setCast(String str);
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java
index 85e8c3e43d..6108896551 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java
@@ -27,14 +27,14 @@ public String getName();
public String getSimpleName();
-public String getTypeSignature(boolean define);
+public String getTypeSignature();
-public String getTypeSignature1(boolean define);
+public String getTypeSignature1();
-public String getTypeSignature2(boolean define);
+public String getTypeSignature2();
-public String getTypeSignature3(boolean define);
+public String getTypeSignature3();
-public String getTypeSignature4(boolean define, boolean struct);
+public String getTypeSignature4(boolean struct);
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
index e70a747a6f..e74d4220d9 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
@@ -35,8 +35,8 @@ String getParams(JNIMethod method) {
int parantesesStart = classSource.indexOf("(", index);
if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
int parantesesEnd = classSource.indexOf(")", parantesesStart);
- params = classSource.substring(parantesesStart + 1, parantesesEnd);
- break;
+ params = classSource.substring(parantesesStart + 1, parantesesEnd);
+ break;
}
}
return params;
@@ -44,7 +44,7 @@ String getParams(JNIMethod method) {
String getReturn(JNIMethod method) {
JNIType returnType = method.getReturnType();
- if (!returnType.isType("int")) return returnType.getTypeSignature3(false);
+ if (!returnType.isType("int")) return returnType.getTypeSignature3();
String modifierStr = Modifier.toString(method.getModifiers());
String name = method.getName();
Pattern p = Pattern.compile(modifierStr + ".*" + name + ".*(.*)");
@@ -53,10 +53,10 @@ String getReturn(JNIMethod method) {
String methodStr = classSource.substring(m.start(), m.end());
int index = methodStr.indexOf("/*long*/");
if (index != -1 && index < methodStr.indexOf(name)) {
- return new ReflectType(Integer.TYPE).getTypeSignature3(false) + " /*long*/";
+ return new ReflectType(Integer.TYPE).getTypeSignature3() + " /*long*/";
}
}
- return new ReflectType(Integer.TYPE).getTypeSignature3(false);
+ return new ReflectType(Integer.TYPE).getTypeSignature3();
}
@Override
@@ -68,8 +68,7 @@ public void generate(JNIClass clazz) {
public void generate(JNIMethod[] methods) {
sort(methods);
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
generate(method);
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java
index 5bd0579349..290ad3a7bf 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java
@@ -36,8 +36,7 @@ public void generate(JNIClass clazz) {
}
public void generate(JNIField[] fields) {
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : fields) {
int mods = field.getModifiers();
if ((mods & Modifier.PUBLIC) == 0) continue;
if ((mods & Modifier.FINAL) != 0) continue;
@@ -57,8 +56,7 @@ public void generate(JNIField field) {
public void generate(JNIMethod[] methods) {
sort(methods);
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
generate(method);
outputln();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
index 5e67b4285b..7d2575cbff 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
@@ -40,19 +40,27 @@ public void generateIncludes() {
output("#include \"");
output(outputName);
outputln("_stats.h\"");
+
+ /*
+ * Note: Only applies to Linux versions of SWT.
+ * Include common structs shared between multiple GTK versions.
+ * Reference Bug 570533, the initial work for separation between
+ * functions in different GTK versions.
+ */
+ if (outputName.equals("gtk3") || outputName.equals("gtk4")) outputln("#include \"os_structs.h\"");
outputln();
}
public void generate(JNIClass clazz, String methodName) {
JNIMethod[] methods = clazz.getDeclaredMethods();
int count = 0;
- for (int i = 0; i < methods.length; i++) {
- if (methods[i].getName().startsWith(methodName)) count++;
+ for (JNIMethod method : methods) {
+ if (method.getName().startsWith(methodName)) count++;
}
JNIMethod[] result = new JNIMethod[count];
count = 0;
- for (int i = 0; i < methods.length; i++) {
- if (methods[i].getName().startsWith(methodName)) result[count++] = methods[i];
+ for (JNIMethod method : methods) {
+ if (method.getName().startsWith(methodName)) result[count++] = method;
}
generate(result);
}
@@ -74,8 +82,7 @@ public void generate(JNIClass clazz) {
public void generate(JNIMethod[] methods) {
sort(methods);
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
generate(method);
if (progress != null) progress.step();
@@ -83,9 +90,8 @@ public void generate(JNIMethod[] methods) {
}
boolean isStruct(String flagsStr) {
- String[] flags = split(flagsStr, " ");
- for (int i = 0; i < flags.length; i++) {
- if (flags[i].equals(Flags.FLAG_STRUCT)) return true;
+ for (String flag : split(flagsStr, " ")) {
+ if (flag.equals(Flags.FLAG_STRUCT)) return true;
}
return false;
}
@@ -95,7 +101,7 @@ boolean isFloatingPoint(String type) {
}
void generateCallback(JNIMethod method, String function) {
- output("static jintLong ");
+ output("static jlong ");
output(function);
outputln(";");
output("static ");
@@ -163,13 +169,13 @@ void generateCallback(JNIMethod method, String function) {
}
outputln("}");
- output("static jintLong ");
+ output("static jlong ");
output(method.getName());
- outputln("(jintLong func) {");
+ outputln("(jlong func) {");
output("\t");
output(function);
outputln(" = func;");
- output("\treturn (jintLong)proc_");
+ output("\treturn (jlong)proc_");
output(function);
outputln(";");
outputln("}");
@@ -177,44 +183,28 @@ void generateCallback(JNIMethod method, String function) {
public void generate(JNIMethod method) {
if (method.getFlag(FLAG_NO_GEN)) return;
- JNIType returnType = method.getReturnType(), returnType64 = method.getReturnType64();
+ JNIType returnType = method.getReturnType();
if (!(returnType.isType("void") || returnType.isPrimitive() || isSystemClass(returnType) || returnType.isType("java.lang.String"))) {
output("Warning: bad return type. :");
outputln(method.toString());
return;
}
JNIParameter[] params = method.getParameters();
- String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64());
- generateSourceStart(function, function64);
- boolean sameFunction = function.equals(function64);
- if (!sameFunction) {
- output("#ifndef ");
- output(JNI64);
- outputln();
- }
+ String function = getFunctionName(method);
+ generateSourceStart(function);
+ generateIgnoreDeprecationsStart(method);
boolean isCPP = getCPP();
if (isCPP) {
output("extern \"C\" ");
- generateFunctionPrototype(method, function, params, returnType, returnType64, true);
+ generateFunctionPrototype(method, function, params, returnType, true);
outputln(";");
}
if (function.startsWith("CALLBACK_")) {
generateCallback(method, function);
}
- generateFunctionPrototype(method, function, params, returnType, returnType64, !sameFunction);
- if (!function.equals(function64)) {
- outputln();
- outputln("#else");
- if (isCPP) {
- output("extern \"C\" ");
- generateFunctionPrototype(method, function64, params, returnType, returnType64, true);
- outputln(";");
- }
- generateFunctionPrototype(method, function64, params, returnType, returnType64, !sameFunction);
- outputln();
- outputln("#endif");
- }
- generateFunctionBody(method, function, function64, params, returnType, returnType64);
+ generateFunctionPrototype(method, function, params, returnType, false);
+ generateFunctionBody(method, function, params, returnType);
+ generateIgnoreDeprecationsEnd(method);
generateSourceEnd();
outputln();
}
@@ -225,8 +215,7 @@ public void setEnterExitMacro(boolean enterExitMacro) {
void generateExcludes(JNIMethod[] methods) {
HashSet<String> excludes = new HashSet<>();
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
String exclude = method.getExclude();
if (exclude.length() != 0) {
@@ -235,8 +224,7 @@ void generateExcludes(JNIMethod[] methods) {
}
for (String exclude: excludes) {
outputln(exclude);
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
String methodExclude = method.getExclude();
if (exclude.equals(methodExclude)) {
@@ -262,8 +250,8 @@ void generateNativeMacro(JNIClass clazz) {
outputln();
}
-boolean generateGetParameter(JNIMethod method, JNIParameter param, boolean critical, int indent) {
- JNIType paramType = param.getType(), paramType64 = param.getType64();
+boolean generateGetParameter(JNIParameter param, boolean critical, int indent) {
+ JNIType paramType = param.getType();
if (paramType.isPrimitive() || isSystemClass(paramType)) return false;
String iStr = String.valueOf(param.getParameter());
for (int j = 0; j < indent; j++) output("\t");
@@ -279,7 +267,7 @@ boolean generateGetParameter(JNIMethod method, JNIParameter param, boolean criti
if (critical) {
if (isCPP) {
output("(");
- output(componentType.getTypeSignature2(!paramType.equals(paramType64)));
+ output(componentType.getTypeSignature2());
output("*)");
output("env->GetPrimitiveArrayCritical(arg");
} else {
@@ -293,7 +281,7 @@ boolean generateGetParameter(JNIMethod method, JNIParameter param, boolean criti
} else {
output("(*env)->Get");
}
- output(componentType.getTypeSignature1(!paramType.equals(paramType64)));
+ output(componentType.getTypeSignature1());
if (isCPP) {
output("ArrayElements(arg");
} else {
@@ -342,7 +330,7 @@ boolean generateGetParameter(JNIMethod method, JNIParameter param, boolean criti
}
void generateSetParameter(JNIParameter param, boolean critical) {
- JNIType paramType = param.getType(), paramType64 = param.getType64();
+ JNIType paramType = param.getType();
if (paramType.isPrimitive() || isSystemClass(paramType)) return;
String iStr = String.valueOf(param.getParameter());
boolean isCPP = getCPP();
@@ -367,7 +355,7 @@ void generateSetParameter(JNIParameter param, boolean critical) {
} else {
output("(*env)->Release");
}
- output(componentType.getTypeSignature1(!paramType.equals(paramType64)));
+ output(componentType.getTypeSignature1());
if (isCPP) {
output("ArrayElements(arg");
} else {
@@ -429,14 +417,9 @@ void generateSetParameter(JNIParameter param, boolean critical) {
}
}
-void generateEnterExitMacro(JNIMethod method, String function, String function64, boolean enter) {
+void generateEnterExitMacro(JNIMethod method, String function, boolean enter) {
if (!enterExitMacro) return;
boolean tryCatch = method.getFlag(FLAG_TRYCATCH);
- if (!function.equals(function64)) {
- output("#ifndef ");
- output(JNI64);
- outputln();
- }
output("\t");
output(method.getDeclaringClass().getSimpleName());
output("_NATIVE_");
@@ -445,31 +428,19 @@ void generateEnterExitMacro(JNIMethod method, String function, String function64
output("(env, that, ");
output(function);
outputln("_FUNC);");
- if (!function.equals(function64)) {
- outputln("#else");
- output("\t");
- output(method.getDeclaringClass().getSimpleName());
- output("_NATIVE_");
- output(enter ? "ENTER" : "EXIT");
- if (tryCatch) output(enter ? "_TRY" : "_CATCH");
- output("(env, that, ");
- output(function64);
- outputln("_FUNC);");
- outputln("#endif");
- }
}
-boolean generateLocalVars(JNIParameter[] params, JNIType returnType, JNIType returnType64) {
+boolean generateLocalVars(JNIParameter[] params, JNIType returnType) {
boolean needsReturn = enterExitMacro;
for (int i = 0; i < params.length; i++) {
JNIParameter param = params[i];
- JNIType paramType = param.getType(), paramType64 = param.getType64();
+ JNIType paramType = param.getType();
if (paramType.isPrimitive() || isSystemClass(paramType)) continue;
output("\t");
if (paramType.isArray()) {
JNIType componentType = paramType.getComponentType();
if (componentType.isPrimitive()) {
- output(componentType.getTypeSignature2(!paramType.equals(paramType64)));
+ output(componentType.getTypeSignature2());
output(" *lparg" + i);
output("=NULL;");
} else {
@@ -498,29 +469,27 @@ boolean generateLocalVars(JNIParameter[] params, JNIType returnType, JNIType ret
if (needsReturn) {
if (!returnType.isType("void")) {
output("\t");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ output(returnType.getTypeSignature2());
outputln(" rc = 0;");
}
}
return needsReturn;
}
-boolean generateGetters(JNIMethod method, JNIParameter[] params) {
+boolean generateGetters(JNIParameter[] params) {
boolean genFailTag = false;
int criticalCount = 0;
- for (int i = 0; i < params.length; i++) {
- JNIParameter param = params[i];
+ for (JNIParameter param : params) {
if (!isCritical(param)) {
- genFailTag |= generateGetParameter(method, param, false, 1);
+ genFailTag |= generateGetParameter(param, false, 1);
} else {
criticalCount++;
}
}
if (criticalCount != 0) {
- for (int i = 0; i < params.length; i++) {
- JNIParameter param = params[i];
+ for (JNIParameter param : params) {
if (isCritical(param)) {
- genFailTag |= generateGetParameter(method, param, true, 2);
+ genFailTag |= generateGetParameter(param, true, 2);
}
}
}
@@ -552,9 +521,9 @@ void generateSetters(JNIParameter[] params) {
}
}
-void generateDynamicFunctionCall(JNIMethod method, JNIParameter[] params, JNIType returnType, JNIType returnType64, boolean needsReturn) {
+void generateDynamicFunctionCall(JNIMethod method, JNIParameter[] params, JNIType returnType, boolean needsReturn) {
outputln("/*");
- generateFunctionCall(method, params, returnType, returnType64, needsReturn);
+ generateFunctionCall(method, params, returnType, needsReturn);
outputln("*/");
outputln("\t{");
@@ -567,9 +536,9 @@ void generateDynamicFunctionCall(JNIMethod method, JNIParameter[] params, JNITyp
outputln(")");
outputln("\t\tif (fp) {");
output("\t\t");
- generateFunctionCallLeftSide(method, returnType, returnType64, needsReturn);
+ generateFunctionCallLeftSide(method, returnType, needsReturn);
output("((");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ output(returnType.getTypeSignature2());
output(" (CALLING_CONVENTION*)(");
for (int i = 0; i < params.length; i++) {
if (i != 0) output(", ");
@@ -584,8 +553,8 @@ void generateDynamicFunctionCall(JNIMethod method, JNIParameter[] params, JNITyp
}
output(cast);
} else {
- JNIType paramType = param.getType(), paramType64 = param.getType64();
- output(paramType.getTypeSignature4(!paramType.equals(paramType64), isStruct));
+ JNIType paramType = param.getType();
+ output(paramType.getTypeSignature4(isStruct));
}
}
output("))");
@@ -598,7 +567,7 @@ void generateDynamicFunctionCall(JNIMethod method, JNIParameter[] params, JNITyp
outputln("\t}");
}
-void generateFunctionCallLeftSide(JNIMethod method, JNIType returnType, JNIType returnType64, boolean needsReturn) {
+void generateFunctionCallLeftSide(JNIMethod method, JNIType returnType, boolean needsReturn) {
output("\t");
if (!returnType.isType("void")) {
if (needsReturn) {
@@ -607,7 +576,7 @@ void generateFunctionCallLeftSide(JNIMethod method, JNIType returnType, JNIType
output("return ");
}
output("(");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ output(returnType.getTypeSignature2());
output(")");
}
if (method.getFlag(FLAG_ADDRESS)) {
@@ -645,7 +614,7 @@ void generateFunctionCallRightSide(JNIMethod method, JNIParameter[] params, int
}
}
-void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType returnType, JNIType returnType64, boolean needsReturn) {
+void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType returnType, boolean needsReturn) {
String name = method.getName();
String copy = (String)method.getParam("copy");
boolean isCPP = getCPP();
@@ -655,7 +624,7 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
output(copy);
output(" temp = ");
} else {
- generateFunctionCallLeftSide(method, returnType, returnType64, needsReturn);
+ generateFunctionCallLeftSide(method, returnType, needsReturn);
}
int paramStart = 0;
if (name.startsWith("_")) name = name.substring(1);
@@ -673,7 +642,7 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
output(cast);
} else {
output("(");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ output(returnType.getTypeSignature2());
output(" (");
output((String)method.getParam("convention"));
output("*)())");
@@ -682,17 +651,17 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
paramStart = 1;
} else if (name.startsWith("VtblCall") || name.startsWith("_VtblCall")) {
output("((");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ output(returnType.getTypeSignature2());
output(" (STDMETHODCALLTYPE *)(");
for (int i = 1; i < params.length; i++) {
if (i != 1) output(", ");
JNIParameter param = params[i];
- JNIType paramType = param.getType(), paramType64 = param.getType64();
- output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(FLAG_STRUCT)));
+ JNIType paramType = param.getType();
+ output(paramType.getTypeSignature4(param.getFlag(FLAG_STRUCT)));
}
output("))(*(");
- JNIType paramType = params[1].getType(), paramType64 = params[1].getType64();
- output(paramType.getTypeSignature4(!paramType.equals(paramType64), false));
+ JNIType paramType = params[1].getType();
+ output(paramType.getTypeSignature4(false));
output(" **)arg1)[arg0])");
paramStart = 1;
} else if (method.getFlag(FLAG_CPP) || method.getFlag(FLAG_SETTER) || method.getFlag(FLAG_GETTER) || method.getFlag(FLAG_ADDER)) {
@@ -763,7 +732,7 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
output(cast);
} else {
output("(");
- output(name.substring(0, name.indexOf("_")));
+ output(name.substring(0, name.indexOf('_')));
output(" *)");
}
outputln("arg0;");
@@ -774,7 +743,7 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
}
if (method.getFlag(Flags.FLAG_CAST)) {
output("((");
- String returnCast = returnType.getTypeSignature2(!returnType.equals(returnType64));
+ String returnCast = returnType.getTypeSignature2();
if (name.equals("objc_msgSend_bool") && returnCast.equals("jboolean")) {
returnCast = "BOOL";
}
@@ -789,13 +758,13 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
if (cast.endsWith(")")) cast = cast.substring(0, cast.length() - 1);
output(cast);
} else {
- JNIType paramType = param.getType(), paramType64 = param.getType64();
+ JNIType paramType = param.getType();
if (!(paramType.isPrimitive() || paramType.isArray())) {
if (param.getTypeClass().getFlag(FLAG_STRUCT)) {
output("struct ");
}
}
- output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(FLAG_STRUCT)));
+ output(paramType.getTypeSignature4(param.getFlag(FLAG_STRUCT)));
}
}
output("))");
@@ -834,7 +803,7 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
outputln("\t\t*copy = temp;");
output("\t\trc = ");
output("(");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ output(returnType.getTypeSignature2());
output(")");
outputln("copy;");
outputln("\t}");
@@ -854,8 +823,8 @@ void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType retur
void generate_objc_msgSend_stret (JNIParameter[] params, String func) {
output("\t\t*lparg0 = (*(");
- JNIType paramType = params[0].getType(), paramType64 = params[0].getType64();
- output(paramType.getTypeSignature4(!paramType.equals(paramType64), true));
+ JNIType paramType = params[0].getType();
+ output(paramType.getTypeSignature4(true));
output(" (*)(");
for (int i = 1; i < params.length; i++) {
if (i != 1) output(", ");
@@ -866,13 +835,13 @@ void generate_objc_msgSend_stret (JNIParameter[] params, String func) {
if (cast.endsWith(")")) cast = cast.substring(0, cast.length() - 1);
output(cast);
} else {
- paramType = param.getType(); paramType64 = param.getType64();
+ paramType = param.getType();
if (!(paramType.isPrimitive() || paramType.isArray())) {
if (param.getTypeClass().getFlag(FLAG_STRUCT)) {
output("struct ");
}
}
- output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(FLAG_STRUCT)));
+ output(paramType.getTypeSignature4(param.getFlag(FLAG_STRUCT)));
}
}
output("))");
@@ -886,8 +855,8 @@ void generateReturn(JNIType returnType, boolean needsReturn) {
}
}
-void generateMemmove(JNIMethod method, String function, String function64, JNIParameter[] params) {
- generateEnterExitMacro(method, function, function64, true);
+void generateMemmove(JNIMethod method, String function, JNIParameter[] params) {
+ generateEnterExitMacro(method, function, true);
output("\t");
boolean get = params[0].getType().isPrimitive();
String className = params[get ? 1 : 0].getType().getSimpleName();
@@ -897,10 +866,10 @@ void generateMemmove(JNIMethod method, String function, String function64, JNIPa
output(className);
output(get ? " *)arg0)" : " *)arg1)");
outputln(";");
- generateEnterExitMacro(method, function, function64, false);
+ generateEnterExitMacro(method, function, false);
}
-void generateFunctionBody(JNIMethod method, String function, String function64, JNIParameter[] params, JNIType returnType, JNIType returnType64) {
+void generateFunctionBody(JNIMethod method, String function, JNIParameter[] params, JNIType returnType) {
outputln("{");
/* Custom GTK memmoves. */
@@ -908,28 +877,28 @@ void generateFunctionBody(JNIMethod method, String function, String function64,
if (name.startsWith("_")) name = name.substring(1);
boolean isMemove = (name.equals("memmove") || name.equals("MoveMemory")) && params.length == 2 && returnType.isType("void");
if (isMemove) {
- generateMemmove(method, function, function64, params);
+ generateMemmove(method, function, params);
} else {
- boolean needsReturn = generateLocalVars(params, returnType, returnType64);
- generateEnterExitMacro(method, function, function64, true);
- boolean genFailTag = generateGetters(method, params);
+ boolean needsReturn = generateLocalVars(params, returnType);
+ generateEnterExitMacro(method, function, true);
+ boolean genFailTag = generateGetters(params);
if (method.getFlag(FLAG_DYNAMIC)) {
- generateDynamicFunctionCall(method, params, returnType, returnType64, needsReturn);
+ generateDynamicFunctionCall(method, params, returnType, needsReturn);
} else {
- generateFunctionCall(method, params, returnType, returnType64, needsReturn);
+ generateFunctionCall(method, params, returnType, needsReturn);
}
if (genFailTag) outputln("fail:");
generateSetters(params);
- generateEnterExitMacro(method, function, function64, false);
+ generateEnterExitMacro(method, function, false);
generateReturn(returnType, needsReturn);
}
outputln("}");
}
-void generateFunctionPrototype(JNIMethod method, String function, JNIParameter[] params, JNIType returnType, JNIType returnType64, boolean singleLine) {
+void generateFunctionPrototype(JNIMethod method, String function, JNIParameter[] params, JNIType returnType, boolean singleLine) {
output("JNIEXPORT ");
- output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
+ output(returnType.getTypeSignature2());
output(" JNICALL ");
output(method.getDeclaringClass().getSimpleName());
output("_NATIVE(");
@@ -949,35 +918,33 @@ void generateFunctionPrototype(JNIMethod method, String function, JNIParameter[]
output(" that");
for (int i = 0; i < params.length; i++) {
output(", ");
- JNIType paramType = params[i].getType(), paramType64 = params[i].getType64();
- output(paramType.getTypeSignature2(!paramType.equals(paramType64)));
+ JNIType paramType = params[i].getType();
+ output(paramType.getTypeSignature2());
output(" arg" + i);
}
output(")");
if (!singleLine) outputln();
}
-void generateSourceStart(String function, String function64) {
- if (function.equals(function64)) {
- output("#ifndef NO_");
- outputln(function);
- } else {
- output("#if (!defined(NO_");
- output(function);
- output(") && !defined(");
- output(JNI64);
- output(")) || (!defined(NO_");
- output(function64);
- output(") && defined(");
- output(JNI64);
- outputln("))");
- }
+void generateSourceStart(String function) {
+ output("#ifndef NO_");
+ outputln(function);
}
void generateSourceEnd() {
outputln("#endif");
}
+void generateIgnoreDeprecationsStart(JNIMethod method) {
+ if (method.getFlag(Flags.FLAG_IGNORE_DEPRECATIONS))
+ outputln("G_GNUC_BEGIN_IGNORE_DEPRECATIONS");
+}
+
+void generateIgnoreDeprecationsEnd(JNIMethod method) {
+ if (method.getFlag(Flags.FLAG_IGNORE_DEPRECATIONS))
+ outputln("G_GNUC_END_IGNORE_DEPRECATIONS");
+}
+
boolean isCritical(JNIParameter param) {
JNIType paramType = param.getType();
return paramType.isArray() && paramType.getComponentType().isPrimitive() && param.getFlag(FLAG_CRITICAL);
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java
index b3a4ff7184..a5bbe13075 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,22 +38,20 @@ public ReflectClass(Class<?> clazz, MetaData data, String sourcePath) {
void checkMembers() {
if (fields != null) return;
String source = null;
- CompilationUnit unit = null;
- if (JNIItem.GEN64) {
- source = JNIGenerator.loadFile(sourcePath);
- ASTParser parser = ASTParser.newParser(AST.JLS8);
- parser.setSource(source.toCharArray());
- unit = (CompilationUnit)parser.createAST(null);
- }
+ source = JNIGenerator.loadFile(sourcePath);
+ ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
+ parser.setSource(source.toCharArray());
+ parser.createAST(null);
+
Field[] fields = clazz.getDeclaredFields();
this.fields = new ReflectField[fields.length];
for (int i = 0; i < fields.length; i++) {
- this.fields[i] = new ReflectField(this, fields[i], source, unit);
+ this.fields[i] = new ReflectField(this, fields[i]);
}
Method[] methods = clazz.getDeclaredMethods();
this.methods = new ReflectMethod[methods.length];
for (int i = 0; i < methods.length; i++) {
- this.methods[i] = new ReflectMethod(this, methods[i], source, unit);
+ this.methods[i] = new ReflectMethod(this, methods[i]);
}
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java
index c2c48e4b49..f545845b7e 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java
@@ -13,47 +13,18 @@
*******************************************************************************/
package org.eclipse.swt.tools.internal;
-import java.io.*;
import java.lang.reflect.*;
-import java.util.*;
-
-import org.eclipse.jdt.core.dom.*;
public class ReflectField extends ReflectItem implements JNIField {
Field field;
- ReflectType type, type64;
+ ReflectType type;
ReflectClass declaringClass;
-public ReflectField(ReflectClass declaringClass, Field field, String source, CompilationUnit unit) {
+public ReflectField(ReflectClass declaringClass, Field field) {
this.declaringClass = declaringClass;
this.field = field;
Class<?> clazz = field.getType();
type = new ReflectType(clazz);
- type64 = type;
- boolean changes = canChange64(clazz);
- if (changes && new File(declaringClass.sourcePath).exists()) {
- TypeDeclaration type1 = (TypeDeclaration)unit.types().get(0);
- Class<?> result = null;
- FieldDeclaration[] fields = type1.getFields();
- for (int i = 0; i < fields.length && result == null; i++) {
- FieldDeclaration node = fields[i];
- for (Iterator<?> iterator = node.fragments().iterator(); iterator.hasNext();) {
- VariableDeclarationFragment decl = (VariableDeclarationFragment) iterator.next();
- if (decl.getName().getIdentifier().equals(field.getName())) {
- String s = source.substring(node.getStartPosition(), node.getStartPosition() + node.getLength());
- if (clazz == int.class && s.indexOf("int /*long*/") != -1) type64 = new ReflectType(long.class);
- else if (clazz == float.class && s.indexOf("float /*double*/") != -1) type64 = new ReflectType(double.class);
- else if (clazz == int[].class && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) type64 = new ReflectType(long[].class);
- else if (clazz == float[].class && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) type = new ReflectType(double[].class);
- else if (clazz == long.class && s.indexOf("long /*int*/") != -1) type = new ReflectType(int.class);
- else if (clazz == double.class && s.indexOf("double /*float*/") != -1) type = new ReflectType(float.class);
- else if (clazz == long[].class && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) type = new ReflectType(int[].class);
- else if (clazz == double[].class && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) type = new ReflectType(float[].class);
- break;
- }
- }
- }
- }
}
@Override
@@ -88,11 +59,6 @@ public JNIType getType() {
}
@Override
-public JNIType getType64() {
- return type64;
-}
-
-@Override
public String getAccessor() {
return (String)getParam("accessor");
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java
index 91a31a16ea..1a22950b4a 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java
@@ -40,16 +40,4 @@ static boolean convertTo32Bit(JNIType[] paramTypes, boolean floatingPointTypes)
}
return changed;
}
-
-boolean canChange64(Class<?> clazz) {
- if (!GEN64) return false;
- return clazz == Integer.TYPE ||
- clazz == Long.TYPE ||
- clazz == Float.TYPE ||
- clazz == Double.TYPE ||
- clazz == int[].class ||
- clazz == long[].class ||
- clazz == float[].class ||
- clazz == double[].class;
-}
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java
index 08f9ccd6c7..0f9d10d860 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java
@@ -13,89 +13,26 @@
*******************************************************************************/
package org.eclipse.swt.tools.internal;
-import java.io.*;
import java.lang.reflect.*;
-import java.util.*;
-import org.eclipse.jdt.core.dom.*;
import org.eclipse.jdt.core.dom.Modifier;
public class ReflectMethod extends ReflectItem implements JNIMethod {
Method method;
- ReflectType returnType, returnType64;
- ReflectType[] paramTypes, paramTypes64;
+ ReflectType returnType;
+ ReflectType[] paramTypes;
ReflectClass declaringClass;
Boolean unique;
-public ReflectMethod(ReflectClass declaringClass, Method method, String source, CompilationUnit unit) {
+public ReflectMethod(ReflectClass declaringClass, Method method) {
this.method = method;
this.declaringClass = declaringClass;
Class<?> returnType = method.getReturnType();
Class<?>[] paramTypes = method.getParameterTypes();
this.returnType = new ReflectType(returnType);
- this.returnType64 = this.returnType;
this.paramTypes = new ReflectType[paramTypes.length];
- this.paramTypes64 = new ReflectType[paramTypes.length];
for (int i = 0; i < this.paramTypes.length; i++) {
- this.paramTypes[i] = this.paramTypes64[i] = new ReflectType(paramTypes[i]);
- }
- boolean changes = false;
- if ((method.getModifiers() & Modifier.NATIVE) != 0) {
- changes = canChange64(returnType);
- if (!changes) {
- for (int i = 0; i < paramTypes.length && !changes; i++) {
- changes |= canChange64(paramTypes[i]);
- }
- }
- }
- if (changes && new File(declaringClass.sourcePath).exists()) {
- String name = method.getName();
- TypeDeclaration type = (TypeDeclaration)unit.types().get(0);
- MethodDeclaration decl = null;
- MethodDeclaration[] methods = type.getMethods();
- for (int i = 0; i < methods.length && decl == null; i++) {
- MethodDeclaration node = methods[i];
- if (node.getName().getIdentifier().equals(name)) {
- if (!declaringClass.getSimpleName(returnType).equals(node.getReturnType2().toString())) continue;
- List<?> parameters = node.parameters();
- if (parameters.size() != paramTypes.length) continue;
- decl = node;
- for (int j = 0; j < paramTypes.length; j++) {
- if (!declaringClass.getSimpleName(paramTypes[j]).equals(((SingleVariableDeclaration)parameters.get(j)).getType().toString())) {
- decl = null;
- break;
- }
- }
- }
- }
- for (int i = 0; i < paramTypes.length; i++) {
- if (canChange64(paramTypes[i])) {
- Class<?> clazz = paramTypes[i];
- SingleVariableDeclaration node = (SingleVariableDeclaration)decl.parameters().get(i);
- String s = source.substring(node.getStartPosition(), node.getStartPosition() + node.getLength());
- if (clazz == int.class && s.indexOf("int /*long*/") != -1) this.paramTypes64[i] = new ReflectType(long.class);
- else if (clazz == int[].class && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) this.paramTypes64[i] = new ReflectType(long[].class);
- else if (clazz == float.class && s.indexOf("float /*double*/") != -1) this.paramTypes64[i] = new ReflectType(double.class);
- else if (clazz == float[].class && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) this.paramTypes64[i] = new ReflectType(double[].class);
- else if (clazz == long.class && s.indexOf("long /*int*/") != -1) this.paramTypes[i] = new ReflectType(int.class);
- else if (clazz == long[].class && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) this.paramTypes[i] = new ReflectType(int[].class);
- else if (clazz == double.class && s.indexOf("double /*float*/") != -1) this.paramTypes[i] = new ReflectType(float.class);
- else if (clazz == double[].class && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) this.paramTypes[i] = new ReflectType(float[].class);
- }
- }
- if (canChange64(returnType)) {
- Class<?> clazz = returnType;
- ASTNode node = decl.getReturnType2();
- String s = source.substring(node.getStartPosition(), decl.getName().getStartPosition());
- if (clazz == int.class && s.indexOf("int /*long*/") != -1) this.returnType64 = new ReflectType(long.class);
- else if (clazz == int[].class && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) this.returnType64 = new ReflectType(long[].class);
- else if (clazz == float.class && s.indexOf("float /*double*/") != -1) this.returnType64 = new ReflectType(double.class);
- else if (clazz == float[].class && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) this.returnType64 = new ReflectType(double[].class);
- else if (clazz == long.class && s.indexOf("long /*int*/") != -1) this.returnType = new ReflectType(int.class);
- else if (clazz == long[].class && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) this.returnType = new ReflectType(int[].class);
- else if (clazz == double.class && s.indexOf("double /*float*/") != -1) this.returnType = new ReflectType(float.class);
- else if (clazz == double[].class && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) this.returnType = new ReflectType(float[].class);
- }
+ this.paramTypes[i] = new ReflectType(paramTypes[i]);
}
}
@@ -130,9 +67,7 @@ public boolean isNativeUnique() {
if (unique != null) return unique.booleanValue();
boolean result = true;
String name = getName();
- JNIMethod[] methods = declaringClass.getDeclaredMethods();
- for (int i = 0; i < methods.length; i++) {
- JNIMethod mth = methods[i];
+ for (JNIMethod mth : declaringClass.getDeclaredMethods()) {
if ((mth.getModifiers() & Modifier.NATIVE) != 0 &&
this != mth && !this.equals(mth) &&
name.equals(mth.getName()))
@@ -151,11 +86,6 @@ public JNIType[] getParameterTypes() {
}
@Override
-public JNIType[] getParameterTypes64() {
- return paramTypes64;
-}
-
-@Override
public JNIParameter[] getParameters() {
Class<?>[] paramTypes = method.getParameterTypes();
ReflectParameter[] result = new ReflectParameter[paramTypes.length];
@@ -171,11 +101,6 @@ public JNIType getReturnType() {
}
@Override
-public JNIType getReturnType64() {
- return returnType64;
-}
-
-@Override
public String getAccessor() {
return (String)getParam("accessor");
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java
index 2996bba653..dff4498354 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java
@@ -96,11 +96,6 @@ public JNIType getType() {
}
@Override
-public JNIType getType64() {
- return method.getParameterTypes64()[parameter];
-}
-
-@Override
public int getParameter() {
return parameter;
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java
index ba7df6a8d7..81d90b458c 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java
@@ -45,60 +45,59 @@ public String getSimpleName() {
}
@Override
-public String getTypeSignature(boolean define) {
+public String getTypeSignature() {
if (clazz == Void.TYPE) return "V";
- if (clazz == Integer.TYPE) return define ? "I_J" : "I";
+ if (clazz == Integer.TYPE) return "I";
if (clazz == Boolean.TYPE) return "Z";
- if (clazz == Long.TYPE) return define ? "J_J" : "J";
+ if (clazz == Long.TYPE) return "J";
if (clazz == Short.TYPE) return "S";
if (clazz == Character.TYPE) return "C";
if (clazz == Byte.TYPE) return "B";
- if (clazz == Float.TYPE) return define ? "F_D" : "F";
- if (clazz == Double.TYPE) return define ? "F_D" : "D";
+ if (clazz == Float.TYPE) return "F";
+ if (clazz == Double.TYPE) return "D";
if (clazz == String.class) return "Ljava/lang/String;";
if (clazz.isArray()) {
- if (define) return getComponentType().getTypeSignature(define) + "Array";
- return "[" + getComponentType().getTypeSignature(define);
+ return "[" + getComponentType().getTypeSignature();
}
return "L" + clazz.getName().replace('.', '/') + ";";
}
@Override
-public String getTypeSignature1(boolean define) {
+public String getTypeSignature1() {
if (clazz == Void.TYPE) return "Void";
- if (clazz == Integer.TYPE) return define ? "IntLong" : "Int";
+ if (clazz == Integer.TYPE) return "Int";
if (clazz == Boolean.TYPE) return "Boolean";
- if (clazz == Long.TYPE) return define ? "IntLong" : "Long";
+ if (clazz == Long.TYPE) return "Long";
if (clazz == Short.TYPE) return "Short";
if (clazz == Character.TYPE) return "Char";
if (clazz == Byte.TYPE) return "Byte";
- if (clazz == Float.TYPE) return define ? "FloatDouble" : "Float";
- if (clazz == Double.TYPE) return define ? "FloatDouble" : "Double";
+ if (clazz == Float.TYPE) return "Float";
+ if (clazz == Double.TYPE) return "Double";
if (clazz == String.class) return "String";
return "Object";
}
@Override
-public String getTypeSignature2(boolean define) {
+public String getTypeSignature2() {
if (clazz == Void.TYPE) return "void";
- if (clazz == Integer.TYPE) return define ? "jintLong" : "jint";
+ if (clazz == Integer.TYPE) return "jint";
if (clazz == Boolean.TYPE) return "jboolean";
- if (clazz == Long.TYPE) return define ? "jintLong" : "jlong";
+ if (clazz == Long.TYPE) return "jlong";
if (clazz == Short.TYPE) return "jshort";
if (clazz == Character.TYPE) return "jchar";
if (clazz == Byte.TYPE) return "jbyte";
- if (clazz == Float.TYPE) return define ? "jfloatDouble" : "jfloat";
- if (clazz == Double.TYPE) return define ? "jfloatDouble" : "jdouble";
+ if (clazz == Float.TYPE) return "jfloat";
+ if (clazz == Double.TYPE) return "jdouble";
if (clazz == String.class) return "jstring";
if (clazz == Class.class) return "jclass";
if (clazz.isArray()) {
- return getComponentType().getTypeSignature2(define) + "Array";
+ return getComponentType().getTypeSignature2() + "Array";
}
return "jobject";
}
@Override
-public String getTypeSignature3(boolean define) {
+public String getTypeSignature3() {
if (clazz == Void.TYPE) return "void";
if (clazz == Integer.TYPE) return "int";
if (clazz == Boolean.TYPE) return "boolean";
@@ -110,25 +109,25 @@ public String getTypeSignature3(boolean define) {
if (clazz == Double.TYPE) return "double";
if (clazz == String.class) return "String";
if (clazz.isArray()) {
- return getComponentType().getTypeSignature3(define) + "[]";
+ return getComponentType().getTypeSignature3() + "[]";
}
return clazz.getName();
}
@Override
-public String getTypeSignature4(boolean define, boolean struct) {
+public String getTypeSignature4(boolean struct) {
if (clazz == Void.TYPE) return "void";
- if (clazz == Integer.TYPE) return define ? "jintLong" : "jint";
+ if (clazz == Integer.TYPE) return "jint";
if (clazz == Boolean.TYPE) return "jboolean";
- if (clazz == Long.TYPE) return define ? "jintLong" : "jlong";
+ if (clazz == Long.TYPE) return "jlong";
if (clazz == Short.TYPE) return "jshort";
if (clazz == Character.TYPE) return "jchar";
if (clazz == Byte.TYPE) return "jbyte";
- if (clazz == Float.TYPE) return define ? "jfloatDouble" : "jfloat";
- if (clazz == Double.TYPE) return define ? "jfloatDouble" : "jdouble";
+ if (clazz == Float.TYPE) return "jfloat";
+ if (clazz == Double.TYPE) return "jdouble";
if (clazz == String.class) return "jstring";
if (clazz.isArray()) {
- String sig = getComponentType().getTypeSignature4(define, struct);
+ String sig = getComponentType().getTypeSignature4(struct);
return struct ? sig : sig + " *";
}
String sig = getSimpleName();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java
index 7ad5a8b231..fc039da933 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java
@@ -39,8 +39,7 @@ public void generate() {
public void generate(JNIField[] fields) {
sort(fields);
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : fields) {
if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
generate(field);
}
@@ -61,8 +60,7 @@ public static void main(String[] args) {
}
try {
SizeofGenerator gen = new SizeofGenerator();
- for (int i = 0; i < args.length; i++) {
- String clazzName = args[i];
+ for (String clazzName : args) {
Class<?> clazz = Class.forName(clazzName);
gen.generate(new ReflectClass(clazz));
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java
index fa050c3d03..61262dc4ec 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java
@@ -13,7 +13,7 @@
*******************************************************************************/
package org.eclipse.swt.tools.internal;
-import java.lang.reflect.Modifier;
+import java.lang.reflect.*;
public class StatsGenerator extends JNIGenerator {
@@ -113,25 +113,12 @@ void generateSourceFile(JNIClass clazz) {
output(className);
outputln("_nativeFunctionNames[] = {");
sort(methods);
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64());
- if (!function.equals(function64)) {
- output("#ifndef ");
- output(JNI64);
- outputln();
- }
+ String function = getFunctionName(method);
output("\t\"");
output(function);
outputln("\",");
- if (!function.equals(function64)) {
- outputln("#else");
- output("\t\"");
- output(function64);
- outputln("\",");
- outputln("#endif");
- }
if (progress != null) progress.step();
}
outputln("};");
@@ -196,25 +183,12 @@ void generateStatsNatives(String className) {
void generateFunctionEnum(JNIMethod[] methods) {
if (methods.length == 0) return;
outputln("typedef enum {");
- for (int i = 0; i < methods.length; i++) {
- JNIMethod method = methods[i];
+ for (JNIMethod method : methods) {
if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64());
- if (!function.equals(function64)) {
- output("#ifndef ");
- output(JNI64);
- outputln();
- }
+ String function = getFunctionName(method);
output("\t");
output(function);
outputln("_FUNC,");
- if (!function.equals(function64)) {
- outputln("#else");
- output("\t");
- output(function64);
- outputln("_FUNC,");
- outputln("#endif");
- }
if (progress != null) progress.step();
}
JNIClass clazz = methods[0].getDeclaringClass();
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java
index 58766ef994..4324f98444 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java
@@ -66,12 +66,6 @@ public void generate(JNIClass clazz) {
}
@Override
-public void generate() {
- if (!header && getClasses().length == 0) return;
- super.generate();
-}
-
-@Override
public String getExtension() {
return header ? ".h" : super.getExtension();
}
@@ -83,8 +77,7 @@ public String getSuffix() {
void generateExcludes(JNIClass[] classes) {
HashSet<String> excludes = new HashSet<>();
- for (int i = 0; i < classes.length; i++) {
- JNIClass clazz = classes[i];
+ for (JNIClass clazz : classes) {
String exclude = clazz.getExclude();
if (exclude.length() != 0) {
excludes.add(exclude);
@@ -92,8 +85,7 @@ void generateExcludes(JNIClass[] classes) {
}
for (String exclude : excludes) {
outputln(exclude);
- for (int i = 0; i < classes.length; i++) {
- JNIClass clazz = classes[i];
+ for (JNIClass clazz : classes) {
String classExclude = clazz.getExclude();
if (exclude.equals(classExclude)) {
output("#define NO_");
@@ -202,10 +194,8 @@ void generateFIDsStructure(JNIClass clazz) {
outputln("\tint cached;");
outputln("\tjclass clazz;");
output("\tjfieldID ");
- JNIField[] fields = clazz.getDeclaredFields();
boolean first = true;
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : clazz.getDeclaredFields()) {
if (ignoreField(field)) continue;
if (!first) output(", ");
output(field.getName());
@@ -250,9 +240,7 @@ void generateCacheFunction(JNIClass clazz) {
}
}
outputln();
- JNIField[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : clazz.getDeclaredFields()) {
if (ignoreField(field)) continue;
output("\t");
output(clazzName);
@@ -266,11 +254,11 @@ void generateCacheFunction(JNIClass clazz) {
output(clazzName);
output("Fc.clazz, \"");
output(field.getName());
- JNIType type = field.getType(), type64 = field.getType64();
+ JNIType type = field.getType();
output("\", ");
- if (type.equals(type64)) output("\"");
- output(type.getTypeSignature(!type.equals(type64)));
- if (type.equals(type64)) output("\"");
+ output("\"");
+ output(type.getTypeSignature());
+ output("\"");
outputln(");");
}
output("\t");
@@ -295,9 +283,7 @@ void generateGetFields(JNIClass clazz) {
generateGetFields(superclazz);
}
}
- JNIField[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : clazz.getDeclaredFields()) {
if (ignoreField(field)) continue;
String exclude = field.getExclude();
if (exclude.length() != 0) {
@@ -307,7 +293,7 @@ void generateGetFields(JNIClass clazz) {
if (noWinCE) {
outputln("#ifndef _WIN32_WCE");
}
- JNIType type = field.getType(), type64 = field.getType64();
+ JNIType type = field.getType();
String typeName = type.getSimpleName();
String accessor = field.getAccessor();
if (accessor == null || accessor.length() == 0) accessor = field.getName();
@@ -322,7 +308,7 @@ void generateGetFields(JNIClass clazz) {
} else {
output("(*env)->Get");
}
- output(type.getTypeSignature1(!type.equals(type64)));
+ output(type.getTypeSignature1());
if (isCPP) {
output("Field(lpObject, ");
} else {
@@ -333,13 +319,13 @@ void generateGetFields(JNIClass clazz) {
output(field.getName());
output(");");
} else if (type.isArray()) {
- JNIType componentType = type.getComponentType(), componentType64 = type64.getComponentType();
+ JNIType componentType = type.getComponentType();
if (componentType.isPrimitive()) {
outputln("\t{");
output("\t");
- output(type.getTypeSignature2(!type.equals(type64)));
+ output(type.getTypeSignature2());
output(" lpObject1 = (");
- output(type.getTypeSignature2(!type.equals(type64)));
+ output(type.getTypeSignature2());
if (isCPP) {
output(")env->GetObjectField(lpObject, ");
} else {
@@ -354,7 +340,7 @@ void generateGetFields(JNIClass clazz) {
} else {
output("\t(*env)->Get");
}
- output(componentType.getTypeSignature1(!componentType.equals(componentType64)));
+ output(componentType.getTypeSignature1());
if (isCPP) {
output("ArrayRegion(lpObject1, 0, sizeof(lpStruct->");
} else {
@@ -364,11 +350,11 @@ void generateGetFields(JNIClass clazz) {
output(")");
if (!componentType.isType("byte")) {
output(" / sizeof(");
- output(componentType.getTypeSignature2(!componentType.equals(componentType64)));
+ output(componentType.getTypeSignature2());
output(")");
}
output(", (");
- output(type.getTypeSignature4(!type.equals(type64), false));
+ output(type.getTypeSignature4(false));
output(")");
if (field.getFlag(FLAG_STRUCT)) {
output("&");
@@ -449,9 +435,7 @@ void generateSetFields(JNIClass clazz) {
generateSetFields(superclazz);
}
}
- JNIField[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- JNIField field = fields[i];
+ for (JNIField field : clazz.getDeclaredFields()) {
if (ignoreField(field)) continue;
String exclude = field.getExclude();
if (exclude.length() != 0) {
@@ -461,7 +445,7 @@ void generateSetFields(JNIClass clazz) {
if (noWinCE) {
outputln("#ifndef _WIN32_WCE");
}
- JNIType type = field.getType(), type64 = field.getType64();
+ JNIType type = field.getType();
String typeName = type.getSimpleName();
String accessor = field.getAccessor();
if (accessor == null || accessor.length() == 0) accessor = field.getName();
@@ -472,7 +456,7 @@ void generateSetFields(JNIClass clazz) {
} else {
output("\t(*env)->Set");
}
- output(type.getTypeSignature1(!type.equals(type64)));
+ output(type.getTypeSignature1());
if (isCPP) {
output("Field(lpObject, ");
} else {
@@ -482,18 +466,18 @@ void generateSetFields(JNIClass clazz) {
output("Fc.");
output(field.getName());
output(", (");
- output(type.getTypeSignature2(!type.equals(type64)));
+ output(type.getTypeSignature2());
output(")lpStruct->");
output(accessor);
output(");");
} else if (type.isArray()) {
- JNIType componentType = type.getComponentType(), componentType64 = type64.getComponentType();
+ JNIType componentType = type.getComponentType();
if (componentType.isPrimitive()) {
outputln("\t{");
output("\t");
- output(type.getTypeSignature2(!type.equals(type64)));
+ output(type.getTypeSignature2());
output(" lpObject1 = (");
- output(type.getTypeSignature2(!type.equals(type64)));
+ output(type.getTypeSignature2());
if (isCPP) {
output(")env->GetObjectField(lpObject, ");
} else {
@@ -508,7 +492,7 @@ void generateSetFields(JNIClass clazz) {
} else {
output("\t(*env)->Set");
}
- output(componentType.getTypeSignature1(!componentType.equals(componentType64)));
+ output(componentType.getTypeSignature1());
if (isCPP) {
output("ArrayRegion(lpObject1, 0, sizeof(lpStruct->");
} else {
@@ -518,11 +502,11 @@ void generateSetFields(JNIClass clazz) {
output(")");
if (!componentType.isType("byte")) {
output(" / sizeof(");
- output(componentType.getTypeSignature2(!componentType.equals(componentType64)));
+ output(componentType.getTypeSignature2());
output(")");
}
output(", (");
- output(type.getTypeSignature4(!type.equals(type64), false));
+ output(type.getTypeSignature4(false));
output(")");
if (field.getFlag(FLAG_STRUCT)) {
output("&");
@@ -589,6 +573,7 @@ void generateFunctions(JNIClass clazz) {
boolean ignoreField(JNIField field) {
int mods = field.getModifiers();
return
+ field.getFlag(FLAG_NO_GEN) ||
((mods & Modifier.PUBLIC) == 0) ||
((mods & Modifier.FINAL) != 0) ||
((mods & Modifier.STATIC) != 0);
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.chromium.lib.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.chromium.lib.properties
new file mode 100644
index 0000000000..71c192b72b
--- /dev/null
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.chromium.lib.properties
@@ -0,0 +1,26 @@
+################################################################################
+# Copyright (c) 2020 Equo
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License 2.0 which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Guillermo Zunino, Equo - initial implementation
+################################################################################
+swt_copyright=/*******************************************************************************\n \
+* Copyright (c) 2020 Equo\n \
+*\n \
+* This program and the accompanying materials\n \
+* are made available under the terms of the Eclipse Public License 2.0\n \
+* which accompanies this distribution, and is available at\n \
+* https://www.eclipse.org/legal/epl-2.0/\n \
+*\n \
+* SPDX-License-Identifier: EPL-2.0\n \
+*\n \
+* Contributors:\n \
+* Guillermo Zunino, Equo - initial implementation\n \
+*******************************************************************************/\n
+
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties
index 4094046960..7b85efdb12 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties
@@ -40,6 +40,8 @@ swt_properties_copyright=#######################################################
swt_main_classes=\
org.eclipse.swt.internal.accessibility.gtk.ATK,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
org.eclipse.swt.internal.gtk.OS,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
+org.eclipse.swt.internal.gtk3.GTK3,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
+org.eclipse.swt.internal.gtk4.GTK4,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
org.eclipse.swt.internal.ole.win32.COM,../org.eclipse.swt/Eclipse SWT PI/win32/library/,\
org.eclipse.swt.internal.win32.OS,../org.eclipse.swt/Eclipse SWT PI/win32/library/,\
org.eclipse.swt.internal.gdip.Gdip,../org.eclipse.swt/Eclipse SWT PI/win32/library/,\
@@ -49,5 +51,3 @@ org.eclipse.swt.internal.opengl.win32.WGL,../org.eclipse.swt/Eclipse SWT OpenGL/
org.eclipse.swt.internal.C,../org.eclipse.swt/Eclipse SWT PI/common/library/,\
org.eclipse.swt.internal.cocoa.OS,../org.eclipse.swt/Eclipse SWT PI/cocoa/library/,\
org.eclipse.swt.internal.webkit.WebKitGTK,../org.eclipse.swt/Eclipse SWT WebKit/gtk/library/,\
-org.eclipse.swt.internal.webkit.WebKit_win32,../org.eclipse.swt/Eclipse SWT WebKit/win32/library/,\
-org.eclipse.swt.internal.cef3.CEF3,../org.eclipse.swt/Eclipse SWT CEF/win32/library/
diff --git a/bundles/org.eclipse.swt.tools/JavadocBasher/org/eclipse/swt/tools/internal/JavadocBasher.java b/bundles/org.eclipse.swt.tools/JavadocBasher/org/eclipse/swt/tools/internal/JavadocBasher.java
index 0e055fc1e4..7ffbf48288 100644
--- a/bundles/org.eclipse.swt.tools/JavadocBasher/org/eclipse/swt/tools/internal/JavadocBasher.java
+++ b/bundles/org.eclipse.swt.tools/JavadocBasher/org/eclipse/swt/tools/internal/JavadocBasher.java
@@ -1,508 +1,506 @@
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.util.*;
-import java.util.Map.*;
-
-import org.eclipse.jdt.core.dom.*;
-import org.eclipse.jface.text.*;
-
-/**
- * Bashes the javadoc from one source tree into another. Only produces new
- * source files for compilation units that have changed.
- *
- * How to use: 1) make sure you have the latest org.eclipse.swt (master branch)
- * in your workspace, and that you have no outstanding org.eclipse.swt changes
- * 2) create a Bugzilla bug called
- * "Do the annual javadoc/copyright bash for x.x" 3) make a version (tag) of the
- * org.eclipse.swt project before you bash here is a sample tag name:
- * BEFORE_JAVADOC_BASH_FOR_43RC3 use the Bugzilla bug for the tag comment 4)
- * modify the code in main, below, so that 'workspaceDir' and 'outputDir' point
- * to the (git) directory that contains org.eclipse.swt in your workspace,
- * typically C:/git/eclipse.platform.swt/bundles (prior to 3.8/4.2, these
- * pointed to the workspace directory) 5) make sure 'sourceSubdir' (usually
- * win32), 'targetSubdirs' (all others), and 'folders' are correct (note: there
- * are typically a few new targetSubdirs and folders every year... although
- * nothing new for 4.3) 6) run JavadocBasher (for a more verbose output, set
- * fVerbose to true) 7) refresh (F5) the org.eclipse.swt project inside eclipse
- * 8) search for *** in console output to see results of API consistency
- * checking 9) synchronize, carefully reviewing every change. Watch out for: -
- * duplicated comments - // comments that have been removed (if they appear
- * before a javadoc comment) 10) use the Bugzilla bug as the commit comment for
- * javadoc and copyright bash commits 11) make a version of the org.eclipse.swt
- * project after bashing (use tag name AFTER_...)
- *
- * 12) Copyright bash (tag before and after): NOTE: JavadocBasher does not fix
- * copyrights. Use the "Fix Copyrights" tool in org.eclipse.releng.tools for
- * that (always fix copyrights after bash). Use Help->Install New Software... to
- * install "Releng Tools" from the "Eclipse Project Updates" site (for release -
- * 1). Select org.eclipse.swt project and choose "Fix Copyrights" from the
- * context menu. See http://wiki.eclipse.org/Development_Resources/
- * How_to_Use_Eclipse_Copyright_Tool for more info. NOTE: The copyright tool
- * takes about 45 minutes to run (for SWT). NOTE 2: Check console for possible
- * errors/warnings, refresh (F5), synchronize, and browse all changes. Use
- * keyboard (Ctrl+.) for next diff instead of mouse (keyboard is faster because
- * there are fewer focus changes). Only use git History view as needed - if it
- * is open and linked with editor, it gets bogged down and lags behind. NOTE 3:
- * SWT anomalies that confuse the tool: - Some ns*.h files in
- * Mozilla/common/library do not contain the word "copyright" so the tool tries
- * to add one - don't keep it (the text is fine as-is). - Other ns*.h files in
- * Mozilla/common/library have a copyright line that should not be updated
- * (Initial Developer) - don't keep the change suggested by the tool (the text
- * is fine as-is). - The ns*.java and some other *.java files in
- * internal/mozilla have 2 copyright lines and the tool tries to change the 1st
- * - don't keep the 1st change (Netscape 1998-2015), but update the 2nd (IBM)
- * manually.
- *
- * NOTE: JavadocBasher now does a fairly good job of checking API consistency.
- * We used to use org.eclipse.swt.diff for API consistency checking, but it was
- * difficult to maintain.
+package org.eclipse.swt.tools.internal;
+
+import java.io.*;
+import java.util.*;
+import java.util.Map.*;
+
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jface.text.*;
+
+/**
+ * Bashes the javadoc from one source tree into another. Only produces new
+ * source files for compilation units that have changed.
+ *
+ * How to use: 1) make sure you have the latest org.eclipse.swt (master branch)
+ * in your workspace, and that you have no outstanding org.eclipse.swt changes
+ * 2) create a Bugzilla bug called
+ * "Do the annual javadoc/copyright bash for x.x" 3) make a version (tag) of the
+ * org.eclipse.swt project before you bash here is a sample tag name:
+ * BEFORE_JAVADOC_BASH_FOR_43RC3 use the Bugzilla bug for the tag comment 4)
+ * modify the code in main, below, so that 'workspaceDir' and 'outputDir' point
+ * to the (git) directory that contains org.eclipse.swt in your workspace,
+ * typically C:/git/eclipse.platform.swt/bundles (prior to 3.8/4.2, these
+ * pointed to the workspace directory) 5) make sure 'sourceSubdir' (usually
+ * win32), 'targetSubdirs' (all others), and 'folders' are correct (note: there
+ * are typically a few new targetSubdirs and folders every year... although
+ * nothing new for 4.3) 6) run JavadocBasher (for a more verbose output, set
+ * fVerbose to true) 7) refresh (F5) the org.eclipse.swt project inside eclipse
+ * 8) search for *** in console output to see results of API consistency
+ * checking 9) synchronize, carefully reviewing every change. Watch out for: -
+ * duplicated comments - // comments that have been removed (if they appear
+ * before a javadoc comment) 10) use the Bugzilla bug as the commit comment for
+ * javadoc and copyright bash commits 11) make a version of the org.eclipse.swt
+ * project after bashing (use tag name AFTER_...)
+ *
+ * 12) Copyright bash (tag before and after): NOTE: JavadocBasher does not fix
+ * copyrights. Use the "Fix Copyrights" tool in org.eclipse.releng.tools for
+ * that (always fix copyrights after bash). Use Help->Install New Software... to
+ * install "Releng Tools" from the "Eclipse Project Updates" site (for release -
+ * 1). Select org.eclipse.swt project and choose "Fix Copyrights" from the
+ * context menu. See http://wiki.eclipse.org/Development_Resources/
+ * How_to_Use_Eclipse_Copyright_Tool for more info. NOTE: The copyright tool
+ * takes about 45 minutes to run (for SWT). NOTE 2: Check console for possible
+ * errors/warnings, refresh (F5), synchronize, and browse all changes. Use
+ * keyboard (Ctrl+.) for next diff instead of mouse (keyboard is faster because
+ * there are fewer focus changes). Only use git History view as needed - if it
+ * is open and linked with editor, it gets bogged down and lags behind. NOTE 3:
+ * SWT anomalies that confuse the tool: - Some ns*.h files in
+ * Mozilla/common/library do not contain the word "copyright" so the tool tries
+ * to add one - don't keep it (the text is fine as-is). - Other ns*.h files in
+ * Mozilla/common/library have a copyright line that should not be updated
+ * (Initial Developer) - don't keep the change suggested by the tool (the text
+ * is fine as-is). - The ns*.java and some other *.java files in
+ * internal/mozilla have 2 copyright lines and the tool tries to change the 1st
+ * - don't keep the 1st change (Netscape 1998-2015), but update the 2nd (IBM)
+ * manually.
+ *
+ * NOTE: JavadocBasher now does a fairly good job of checking API consistency.
+ * We used to use org.eclipse.swt.diff for API consistency checking, but it was
+ * difficult to maintain.
*/
-public class JavadocBasher {
- static final boolean fVerbose = false; // set to true for verbose output
- List<String> fBashed;
- List<String> fUnchanged;
- List<String> fSkipped;
-
- public JavadocBasher() {
- fBashed = new ArrayList<>();
- fUnchanged = new ArrayList<>();
- fSkipped = new ArrayList<>();
- }
-
- public static class Edit {
- int start, length;
- String text;
-
- public Edit(int start, int length, String text) {
- this.start = start;
- this.length = length;
- this.text = text;
- }
- }
-
- public static void main(String[] args) {
- String workspaceDir = ".."; // use forward slashes, no final slash
- String outputDir = ".."; // can point to another directory for debugging
- String[] folders = new String[] { // commented folders do not need to be
- // bashed
- "Eclipse SWT", "Eclipse SWT Accessibility",
- "Eclipse SWT AWT",
- "Eclipse SWT Browser",
- // "Eclipse SWT Custom Widgets",
- "Eclipse SWT Drag and Drop", "Eclipse SWT Effects",
- // "Eclipse SWT OLE Win32",
- "Eclipse SWT OpenGL",
- // "Eclipse SWT PI",
- "Eclipse SWT Printing", "Eclipse SWT Program",
- "Eclipse SWT Theme", "Eclipse SWT WebKit", };
- String sourceSubdir = "win32";
- String[] targetSubdirs = new String[] { "cairo", // used by gtk
- "cocoa",
- // "common",
- // "common_j2me",
- // "common_j2se",
- "emulated", "emulated/bidi", // used by carbon, cocoa
- "emulated/coolbar", // used by cocoa, gtk
- "emulated/expand", // used by cocoa
- "emulated/taskbar", // used by gtk
- "emulated/tooltip", // used by cocoa (?!)
- "glx", // used by gtk
- "gtk"
- };
-
- System.out.println("==== Start Bashing ====");
- int totalBashed = 0;
- for (int t = 0; t < targetSubdirs.length; t++) {
- for (int f = 0; f < folders.length; f++) {
- String targetSubdir = folders[f] + "/" + targetSubdirs[t];
- File source = new File(workspaceDir + "/org.eclipse.swt/"
- + folders[f] + "/" + sourceSubdir);
- File target = new File(workspaceDir + "/org.eclipse.swt/"
- + targetSubdir);
- File out = new File(outputDir + "/org.eclipse.swt/"
- + targetSubdir);
- JavadocBasher basher = new JavadocBasher();
- System.out.println("\n==== Start Bashing " + targetSubdir);
- basher.bashJavaSourceTree(source, target, out);
- List<String> bashedList = basher.getBashed();
- basher.status("Bashed", bashedList, targetSubdir);
- if (bashedList.size() > 0) {
- totalBashed += bashedList.size();
- if (fVerbose)
- basher.status("Didn't change", basher.getUnchanged(),
- targetSubdir);
- basher.status("Skipped", basher.getSkipped(), targetSubdir);
- }
- System.out.println("==== Done Bashing " + targetSubdir);
- }
- }
- System.out.println("\n==== Done Bashing (Bashed " + totalBashed
- + " files in total) - Be sure to Refresh (F5) project(s) ====");
- }
-
- void status(String label, List<String> list, String targetSubdir) {
- int count = list.size();
- System.out.println(label + " " + count
- + ((count == 1) ? " file" : " files") + " in " + targetSubdir
- + ((count > 0) ? ":" : "."));
- if (count > 0) {
- for(String s : list)
- System.out.println(label + ": " + s);
- System.out.println();
- }
- }
-
- char[] readFile(File file) {
- try (Reader in = new FileReader(file)) {
- CharArrayWriter storage = new CharArrayWriter();
- char[] chars = new char[8192];
- int read = in.read(chars);
- while (read > 0) {
- storage.write(chars, 0, read);
- storage.flush();
- read = in.read(chars);
- }
- return storage.toCharArray();
- } catch (IOException ioe) {
- System.out.println("*** Could not read " + file);
- }
- return null;
- }
-
- void writeFile(char[] contents, File file) {
- try (Writer out = new FileWriter(file)) {
- out.write(contents);
- out.flush();
- } catch (IOException ioe) {
- System.out.println("*** Could not write to " + file);
- if (fVerbose) {
- System.out.println("<dump filename=\"" + file + "\">");
- System.out.println(contents);
- System.out.println("</dump>");
- }
- }
- }
-
- void bashJavaSourceTree(File sourceDir, File targetDir, File outDir) {
- if (fVerbose)
- System.out.println("Reading source javadoc from " + sourceDir);
- if (!sourceDir.exists()) {
- System.out.println("Source: " + sourceDir + " was missing");
- return;
- }
- if (!targetDir.exists()) {
- System.out.println("Target: " + targetDir + " was missing");
- return;
- }
-
- String[] list = sourceDir.list();
- if (list != null) {
- int count = list.length;
- for (int i = 0; i < count; i++) {
- String filename = list[i];
- if (filename.equals("CVS") || filename.equals("internal")
- || filename.equals("library"))
- continue;
- File source = new File(sourceDir, filename);
- File target = new File(targetDir, filename);
- File out = new File(outDir, filename);
- if (source.exists() && target.exists()) {
- if (source.isDirectory()) {
- if (target.isDirectory()) {
- bashJavaSourceTree(source, target, out);
- } else {
- System.out.println("*** " + target
- + " should have been a directory.");
- }
- } else {
- if (filename.toLowerCase().endsWith(".java")) {
- bashFile(source, target, out);
- } else {
- fSkipped.add(source + " (not a java file)");
- }
- }
- } else {
- if (source.exists()) {
- fSkipped.add(target + " (does not exist)");
- } else {
- fSkipped.add(source + " (does not exist)");
- }
- }
- }
- }
- }
-
-
- void bashFile(final File source, final File target, File out) {
- char[] contents = readFile(source);
- if (contents == null) return;
- ASTParser parser = ASTParser.newParser(AST.JLS8);
- final Document sourceDocument = new Document(new String(contents));
- parser.setSource(contents);
- CompilationUnit sourceUnit = (CompilationUnit)parser.createAST(null);
-
- contents = readFile(target);
- if (contents == null) return;
- String targetContents = new String(contents);
- final Document targetDocument = new Document(targetContents);
- parser.setSource(contents);
- CompilationUnit targetUnit = (CompilationUnit)parser.createAST(null);
-
- final HashMap<String, String> comments = new HashMap<>();
- sourceUnit.accept(new ASTVisitor() {
- String prefix = "";
- @Override
- public boolean visit(Block node) {
- return false;
- }
- @Override
- public boolean visit(VariableDeclarationFragment node) {
- FieldDeclaration field = (FieldDeclaration)node.getParent();
- int mods = field.getModifiers();
- if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
- Javadoc javadoc = field.getJavadoc();
- if (field.fragments().size() > 1 && javadoc != null) {
- System.err.println("Field declaration with multiple variables is not supported. -> " + source + " " + node.getName().getFullyQualifiedName());
- }
- try {
- String key = prefix + "." + node.getName().getFullyQualifiedName();
- comments.put(key, javadoc != null ? sourceDocument.get(javadoc.getStartPosition(), getJavadocLength(sourceDocument, javadoc)) : "");
- } catch (BadLocationException e) {}
- return true;
- }
- return false;
- }
- @Override
- public boolean visit(MethodDeclaration node) {
- int mods = node.getModifiers();
- if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
- Javadoc javadoc = node.getJavadoc();
- try {
- String key = prefix + "." + node.getName().getFullyQualifiedName();
- for (Iterator<SingleVariableDeclaration> iterator = node.parameters().iterator(); iterator.hasNext();) {
- SingleVariableDeclaration param = iterator.next();
- key += param.getType().toString();
- }
- comments.put(key, javadoc != null ? sourceDocument.get(javadoc.getStartPosition(), getJavadocLength(sourceDocument, javadoc)) : "");
- } catch (BadLocationException e) {}
- return true;
- }
- return false;
- }
- @Override
- public boolean visit(TypeDeclaration node) {
- int mods = node.getModifiers();
- if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
- Javadoc javadoc = node.getJavadoc();
- try {
- String key = prefix + "." + node.getName().getFullyQualifiedName();
- comments.put(key, javadoc != null ? sourceDocument.get(javadoc.getStartPosition(), getJavadocLength(sourceDocument, javadoc)) : "");
- } catch (BadLocationException e) {}
- prefix = node.getName().getFullyQualifiedName();
- return true;
- }
- return false;
- }
- });
-
-
- final List<Edit> edits = new ArrayList<>();
- targetUnit.accept(new ASTVisitor() {
- String prefix = "";
- @Override
- public boolean visit(Block node) {
- return false;
- }
- @Override
- public boolean visit(VariableDeclarationFragment node) {
- FieldDeclaration field = (FieldDeclaration)node.getParent();
- int mods = field.getModifiers();
- if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
- Javadoc javadoc = field.getJavadoc();
- if (field.fragments().size() > 1 && javadoc != null) {
- System.err.println("Field declaration with multiple variables is not supported. -> " + target + " " + node.getName().getFullyQualifiedName());
- }
- String key = prefix + "." + node.getName().getFullyQualifiedName();
- String newComment = comments.get(key);
- if (newComment != null) {
- comments.remove(key);
- if (javadoc != null) {
- edits.add(new Edit(javadoc.getStartPosition(), getJavadocLength(targetDocument, javadoc), newComment));
- } else {
- edits.add(new Edit(field.getStartPosition(), 0, newComment));
- }
- }
- return true;
- }
- return false;
- }
- @Override
- public boolean visit(MethodDeclaration node) {
- int mods = node.getModifiers();
- if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
- Javadoc javadoc = node.getJavadoc();
- String key = prefix + "." + node.getName().getFullyQualifiedName();
- for (Iterator<SingleVariableDeclaration> iterator = node.parameters().iterator(); iterator.hasNext();) {
- SingleVariableDeclaration param = iterator.next();
- key += param.getType().toString();
- }
- String newComment = comments.get(key);
- if (newComment != null) {
- comments.remove(key);
- if (javadoc != null) {
- edits.add(new Edit(javadoc.getStartPosition(), getJavadocLength(targetDocument, javadoc), newComment));
- } else {
- edits.add(new Edit(node.getStartPosition(), 0, newComment));
- }
- }
- return true;
- }
- return false;
- }
- @Override
- public boolean visit(TypeDeclaration node) {
- int mods = node.getModifiers();
- if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
- Javadoc javadoc = node.getJavadoc();
- String key = prefix + "." + node.getName().getFullyQualifiedName();
- String newComment = comments.get(key);
- if (newComment != null) {
- comments.remove(key);
- if (javadoc != null) {
- edits.add(new Edit(javadoc.getStartPosition(), getJavadocLength(targetDocument, javadoc), newComment));
- } else {
- edits.add(new Edit(node.getStartPosition(), 0, newComment));
- }
- }
- prefix = node.getName().getFullyQualifiedName();
- return true;
- }
- return false;
- }
- });
-
- for (int i = edits.size() - 1; i >=0 ; i--) {
- Edit edit = edits.get(i);
- try {
- targetDocument.replace(edit.start, edit.length, edit.text);
- } catch (BadLocationException e) {
- e.printStackTrace();
- }
- }
- /* Rudimentary API consistency checker.
- * This assumes that:
- * a) the sourceSubdir (typically win32) API is correct
- * b) all sourceSubdir API classes, methods and fields do have a comment
- * c) names that are in the filter list are never API,
- * or they are old API that is defined in the super on some platforms
- */
- if (comments.size() > 0) {
- String [] filter = new String [] {
- "Color.win32_newDeviceint",
- "Cursor.win32_newDeviceint",
- "Device.hPalette",
- "Font.win32_newDevicelong",
- "FontData.data",
- "FontData.win32_newLOGFONTfloat",
- "FontMetrics.handle",
- "FontMetrics.win32_newTEXTMETRIC",
- "GC.win32_newlongGCData",
- "GC.win32_newDrawableGCData",
- "Image.win32_newDeviceintlong",
- "Pattern.handle",
- "Region.win32_newDeviceint",
- "Control.handle",
- "Display.getSystemFont",
- "Display.msg",
- "Menu.handle",
- "Shell.win32_newDisplaylong",
- "Accessible.internal_WM_GETOBJECTlonglong",
- "TransferData.result",
- "TransferData.stgmedium",
- "TransferData.pIDataObject",
- "TransferData.formatetc",
- "Printer.handle",
- "Printer.checkDevice",
- "TableDragSourceEffect.dragFinishedDragSourceEvent",
- "TableDragSourceEffect.dragStartDragSourceEvent",
- "TableDropTargetEffect.dragOverDropTargetEvent",
- "TableDropTargetEffect.dragEnterDropTargetEvent",
- "TableDropTargetEffect.dragLeaveDropTargetEvent",
- "Transfer.validateObject",
- "TransferData.result",
- "TransferData.stgmedium",
- "TransferData.pIDataObject",
- "TransferData.formatetc",
- "TreeDragSourceEffect.dragFinishedDragSourceEvent",
- "TreeDragSourceEffect.dragStartDragSourceEvent",
- "TreeDropTargetEffect.dragLeaveDropTargetEvent",
- "TreeDropTargetEffect.dragEnterDropTargetEvent",
- "TreeDropTargetEffect.dragOverDropTargetEvent",
- "Printer.createDeviceData",
- "Printer.internal_dispose_GClongGCData",
- "Printer.release",
- "Printer.destroy",
- "Image.handle",
- "Display.getClientArea",
- "TreeItem.handle",
- };
- for (Entry<String, String> entry: comments.entrySet()) {
- String name = entry.getKey();
- if (entry.getValue().length() > 0){
- int i = 0;
- for (i = 0; i < filter.length; i++) {
- if (name.equals(filter[i])) break;
- }
- if (i >= filter.length) {
- System.err.println("***No target for " + name);
- }
- }
- }
- }
-
- String newContents = targetDocument.get();
- if (!targetContents.equals(newContents)) {
- if (makeDirectory(out.getParentFile())) {
- writeFile(newContents.toCharArray(), out);
- fBashed.add(target.toString());
- } else {
- System.out.println("*** Could not create " + out.getParent());
- }
- } else {
- fUnchanged.add(target.toString());
- }
- }
-
- int getJavadocLength(Document sourceDocument, Javadoc javadoc) {
- return skipWhitespace(sourceDocument, javadoc.getStartPosition() + javadoc.getLength()) - javadoc.getStartPosition();
- }
-
- int skipWhitespace(Document doc, int offset) {
- try {
- while (Character.isWhitespace(doc.getChar(offset))){
- offset++;
- }
- } catch (BadLocationException e) {
- }
- return offset;
- }
-
- boolean makeDirectory(File directory) {
- if (directory.exists())
- return true;
- return directory.mkdirs();
- }
-
- List<String> getBashed() {
- return fBashed;
- }
-
- List<String> getUnchanged() {
- return fUnchanged;
- }
-
- List<String> getSkipped() {
- return fSkipped;
- }
-}
+public class JavadocBasher {
+ static final boolean fVerbose = false; // set to true for verbose output
+ List<String> fBashed;
+ List<String> fUnchanged;
+ List<String> fSkipped;
+
+ public JavadocBasher() {
+ fBashed = new ArrayList<>();
+ fUnchanged = new ArrayList<>();
+ fSkipped = new ArrayList<>();
+ }
+
+ public static class Edit {
+ int start, length;
+ String text;
+
+ public Edit(int start, int length, String text) {
+ this.start = start;
+ this.length = length;
+ this.text = text;
+ }
+ }
+
+ public static void main(String[] args) {
+ String workspaceDir = ".."; // use forward slashes, no final slash
+ String outputDir = ".."; // can point to another directory for debugging
+ String[] folders = new String[] { // commented folders do not need to be
+ // bashed
+ "Eclipse SWT", "Eclipse SWT Accessibility",
+ "Eclipse SWT AWT",
+ "Eclipse SWT Browser",
+ // "Eclipse SWT Custom Widgets",
+ "Eclipse SWT Drag and Drop", "Eclipse SWT Effects",
+ // "Eclipse SWT OLE Win32",
+ "Eclipse SWT OpenGL",
+ // "Eclipse SWT PI",
+ "Eclipse SWT Printing", "Eclipse SWT Program",
+ "Eclipse SWT Theme", "Eclipse SWT WebKit", };
+ String sourceSubdir = "win32";
+ String[] targetSubdirs = new String[] { "cairo", // used by gtk
+ "cocoa",
+ // "common",
+ "emulated", "emulated/bidi", // used by carbon, cocoa
+ "emulated/coolbar", // used by cocoa, gtk
+ "emulated/expand", // used by cocoa
+ "emulated/taskbar", // used by gtk
+ "emulated/tooltip", // used by cocoa (?!)
+ "glx", // used by gtk
+ "gtk"
+ };
+
+ System.out.println("==== Start Bashing ====");
+ int totalBashed = 0;
+ for (String dir : targetSubdirs) {
+ for (String folder : folders) {
+ String targetSubdir = folder + "/" + dir;
+ File source = new File(workspaceDir + "/org.eclipse.swt/"
+ + folder + "/" + sourceSubdir);
+ File target = new File(workspaceDir + "/org.eclipse.swt/"
+ + targetSubdir);
+ File out = new File(outputDir + "/org.eclipse.swt/"
+ + targetSubdir);
+ JavadocBasher basher = new JavadocBasher();
+ System.out.println("\n==== Start Bashing " + targetSubdir);
+ basher.bashJavaSourceTree(source, target, out);
+ List<String> bashedList = basher.getBashed();
+ basher.status("Bashed", bashedList, targetSubdir);
+ if (bashedList.size() > 0) {
+ totalBashed += bashedList.size();
+ if (fVerbose)
+ basher.status("Didn't change", basher.getUnchanged(),
+ targetSubdir);
+ basher.status("Skipped", basher.getSkipped(), targetSubdir);
+ }
+ System.out.println("==== Done Bashing " + targetSubdir);
+ }
+ }
+ System.out.println("\n==== Done Bashing (Bashed " + totalBashed
+ + " files in total) - Be sure to Refresh (F5) project(s) ====");
+ }
+
+ void status(String label, List<String> list, String targetSubdir) {
+ int count = list.size();
+ System.out.println(label + " " + count
+ + ((count == 1) ? " file" : " files") + " in " + targetSubdir
+ + ((count > 0) ? ":" : "."));
+ if (count > 0) {
+ for(String s : list)
+ System.out.println(label + ": " + s);
+ System.out.println();
+ }
+ }
+
+ char[] readFile(File file) {
+ try (Reader in = new FileReader(file)) {
+ CharArrayWriter storage = new CharArrayWriter();
+ char[] chars = new char[8192];
+ int read = in.read(chars);
+ while (read > 0) {
+ storage.write(chars, 0, read);
+ storage.flush();
+ read = in.read(chars);
+ }
+ return storage.toCharArray();
+ } catch (IOException ioe) {
+ System.out.println("*** Could not read " + file);
+ }
+ return null;
+ }
+
+ void writeFile(char[] contents, File file) {
+ try (Writer out = new FileWriter(file)) {
+ out.write(contents);
+ out.flush();
+ } catch (IOException ioe) {
+ System.out.println("*** Could not write to " + file);
+ if (fVerbose) {
+ System.out.println("<dump filename=\"" + file + "\">");
+ System.out.println(contents);
+ System.out.println("</dump>");
+ }
+ }
+ }
+
+ void bashJavaSourceTree(File sourceDir, File targetDir, File outDir) {
+ if (fVerbose)
+ System.out.println("Reading source javadoc from " + sourceDir);
+ if (!sourceDir.exists()) {
+ System.out.println("Source: " + sourceDir + " was missing");
+ return;
+ }
+ if (!targetDir.exists()) {
+ System.out.println("Target: " + targetDir + " was missing");
+ return;
+ }
+
+ String[] list = sourceDir.list();
+ if (list != null) {
+ int count = list.length;
+ for (int i = 0; i < count; i++) {
+ String filename = list[i];
+ if (filename.equals("CVS") || filename.equals("internal")
+ || filename.equals("library"))
+ continue;
+ File source = new File(sourceDir, filename);
+ File target = new File(targetDir, filename);
+ File out = new File(outDir, filename);
+ if (source.exists() && target.exists()) {
+ if (source.isDirectory()) {
+ if (target.isDirectory()) {
+ bashJavaSourceTree(source, target, out);
+ } else {
+ System.out.println("*** " + target
+ + " should have been a directory.");
+ }
+ } else {
+ if (filename.toLowerCase().endsWith(".java")) {
+ bashFile(source, target, out);
+ } else {
+ fSkipped.add(source + " (not a java file)");
+ }
+ }
+ } else {
+ if (source.exists()) {
+ fSkipped.add(target + " (does not exist)");
+ } else {
+ fSkipped.add(source + " (does not exist)");
+ }
+ }
+ }
+ }
+ }
+
+
+ void bashFile(final File source, final File target, File out) {
+ char[] contents = readFile(source);
+ if (contents == null) return;
+ ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
+ final Document sourceDocument = new Document(new String(contents));
+ parser.setSource(contents);
+ CompilationUnit sourceUnit = (CompilationUnit)parser.createAST(null);
+
+ contents = readFile(target);
+ if (contents == null) return;
+ String targetContents = new String(contents);
+ final Document targetDocument = new Document(targetContents);
+ parser.setSource(contents);
+ CompilationUnit targetUnit = (CompilationUnit)parser.createAST(null);
+
+ final HashMap<String, String> comments = new HashMap<>();
+ sourceUnit.accept(new ASTVisitor() {
+ String prefix = "";
+ @Override
+ public boolean visit(Block node) {
+ return false;
+ }
+ @Override
+ public boolean visit(VariableDeclarationFragment node) {
+ FieldDeclaration field = (FieldDeclaration)node.getParent();
+ int mods = field.getModifiers();
+ if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
+ Javadoc javadoc = field.getJavadoc();
+ if (field.fragments().size() > 1 && javadoc != null) {
+ System.err.println("Field declaration with multiple variables is not supported. -> " + source + " " + node.getName().getFullyQualifiedName());
+ }
+ try {
+ String key = prefix + "." + node.getName().getFullyQualifiedName();
+ comments.put(key, javadoc != null ? sourceDocument.get(javadoc.getStartPosition(), getJavadocLength(sourceDocument, javadoc)) : "");
+ } catch (BadLocationException e) {}
+ return true;
+ }
+ return false;
+ }
+ @Override
+ public boolean visit(MethodDeclaration node) {
+ int mods = node.getModifiers();
+ if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
+ Javadoc javadoc = node.getJavadoc();
+ try {
+ String key = prefix + "." + node.getName().getFullyQualifiedName();
+ for (Iterator<SingleVariableDeclaration> iterator = node.parameters().iterator(); iterator.hasNext();) {
+ SingleVariableDeclaration param = iterator.next();
+ key += param.getType().toString();
+ }
+ comments.put(key, javadoc != null ? sourceDocument.get(javadoc.getStartPosition(), getJavadocLength(sourceDocument, javadoc)) : "");
+ } catch (BadLocationException e) {}
+ return true;
+ }
+ return false;
+ }
+ @Override
+ public boolean visit(TypeDeclaration node) {
+ int mods = node.getModifiers();
+ if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
+ Javadoc javadoc = node.getJavadoc();
+ try {
+ String key = prefix + "." + node.getName().getFullyQualifiedName();
+ comments.put(key, javadoc != null ? sourceDocument.get(javadoc.getStartPosition(), getJavadocLength(sourceDocument, javadoc)) : "");
+ } catch (BadLocationException e) {}
+ prefix = node.getName().getFullyQualifiedName();
+ return true;
+ }
+ return false;
+ }
+ });
+
+
+ final List<Edit> edits = new ArrayList<>();
+ targetUnit.accept(new ASTVisitor() {
+ String prefix = "";
+ @Override
+ public boolean visit(Block node) {
+ return false;
+ }
+ @Override
+ public boolean visit(VariableDeclarationFragment node) {
+ FieldDeclaration field = (FieldDeclaration)node.getParent();
+ int mods = field.getModifiers();
+ if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
+ Javadoc javadoc = field.getJavadoc();
+ if (field.fragments().size() > 1 && javadoc != null) {
+ System.err.println("Field declaration with multiple variables is not supported. -> " + target + " " + node.getName().getFullyQualifiedName());
+ }
+ String key = prefix + "." + node.getName().getFullyQualifiedName();
+ String newComment = comments.get(key);
+ if (newComment != null) {
+ comments.remove(key);
+ if (javadoc != null) {
+ edits.add(new Edit(javadoc.getStartPosition(), getJavadocLength(targetDocument, javadoc), newComment));
+ } else {
+ edits.add(new Edit(field.getStartPosition(), 0, newComment));
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+ @Override
+ public boolean visit(MethodDeclaration node) {
+ int mods = node.getModifiers();
+ if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
+ Javadoc javadoc = node.getJavadoc();
+ String key = prefix + "." + node.getName().getFullyQualifiedName();
+ for (Iterator<SingleVariableDeclaration> iterator = node.parameters().iterator(); iterator.hasNext();) {
+ SingleVariableDeclaration param = iterator.next();
+ key += param.getType().toString();
+ }
+ String newComment = comments.get(key);
+ if (newComment != null) {
+ comments.remove(key);
+ if (javadoc != null) {
+ edits.add(new Edit(javadoc.getStartPosition(), getJavadocLength(targetDocument, javadoc), newComment));
+ } else {
+ edits.add(new Edit(node.getStartPosition(), 0, newComment));
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+ @Override
+ public boolean visit(TypeDeclaration node) {
+ int mods = node.getModifiers();
+ if (Modifier.isPublic(mods) || Modifier.isProtected(mods)) {
+ Javadoc javadoc = node.getJavadoc();
+ String key = prefix + "." + node.getName().getFullyQualifiedName();
+ String newComment = comments.get(key);
+ if (newComment != null) {
+ comments.remove(key);
+ if (javadoc != null) {
+ edits.add(new Edit(javadoc.getStartPosition(), getJavadocLength(targetDocument, javadoc), newComment));
+ } else {
+ edits.add(new Edit(node.getStartPosition(), 0, newComment));
+ }
+ }
+ prefix = node.getName().getFullyQualifiedName();
+ return true;
+ }
+ return false;
+ }
+ });
+
+ for (int i = edits.size() - 1; i >=0 ; i--) {
+ Edit edit = edits.get(i);
+ try {
+ targetDocument.replace(edit.start, edit.length, edit.text);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+ /* Rudimentary API consistency checker.
+ * This assumes that:
+ * a) the sourceSubdir (typically win32) API is correct
+ * b) all sourceSubdir API classes, methods and fields do have a comment
+ * c) names that are in the filter list are never API,
+ * or they are old API that is defined in the super on some platforms
+ */
+ if (comments.size() > 0) {
+ String [] filter = new String [] {
+ "Color.win32_newDeviceint",
+ "Cursor.win32_newDeviceint",
+ "Device.hPalette",
+ "Font.win32_newDevicelong",
+ "FontData.data",
+ "FontData.win32_newLOGFONTfloat",
+ "FontMetrics.handle",
+ "FontMetrics.win32_newTEXTMETRIC",
+ "GC.win32_newlongGCData",
+ "GC.win32_newDrawableGCData",
+ "Image.win32_newDeviceintlong",
+ "Pattern.handle",
+ "Region.win32_newDeviceint",
+ "Control.handle",
+ "Display.getSystemFont",
+ "Display.msg",
+ "Menu.handle",
+ "Shell.win32_newDisplaylong",
+ "Accessible.internal_WM_GETOBJECTlonglong",
+ "TransferData.result",
+ "TransferData.stgmedium",
+ "TransferData.pIDataObject",
+ "TransferData.formatetc",
+ "Printer.handle",
+ "Printer.checkDevice",
+ "TableDragSourceEffect.dragFinishedDragSourceEvent",
+ "TableDragSourceEffect.dragStartDragSourceEvent",
+ "TableDropTargetEffect.dragOverDropTargetEvent",
+ "TableDropTargetEffect.dragEnterDropTargetEvent",
+ "TableDropTargetEffect.dragLeaveDropTargetEvent",
+ "Transfer.validateObject",
+ "TransferData.result",
+ "TransferData.stgmedium",
+ "TransferData.pIDataObject",
+ "TransferData.formatetc",
+ "TreeDragSourceEffect.dragFinishedDragSourceEvent",
+ "TreeDragSourceEffect.dragStartDragSourceEvent",
+ "TreeDropTargetEffect.dragLeaveDropTargetEvent",
+ "TreeDropTargetEffect.dragEnterDropTargetEvent",
+ "TreeDropTargetEffect.dragOverDropTargetEvent",
+ "Printer.createDeviceData",
+ "Printer.internal_dispose_GClongGCData",
+ "Printer.release",
+ "Printer.destroy",
+ "Image.handle",
+ "Display.getClientArea",
+ "TreeItem.handle",
+ };
+ for (Entry<String, String> entry: comments.entrySet()) {
+ String name = entry.getKey();
+ if (entry.getValue().length() > 0){
+ int i = 0;
+ for (i = 0; i < filter.length; i++) {
+ if (name.equals(filter[i])) break;
+ }
+ if (i >= filter.length) {
+ System.err.println("***No target for " + name);
+ }
+ }
+ }
+ }
+
+ String newContents = targetDocument.get();
+ if (!targetContents.equals(newContents)) {
+ if (makeDirectory(out.getParentFile())) {
+ writeFile(newContents.toCharArray(), out);
+ fBashed.add(target.toString());
+ } else {
+ System.out.println("*** Could not create " + out.getParent());
+ }
+ } else {
+ fUnchanged.add(target.toString());
+ }
+ }
+
+ int getJavadocLength(Document sourceDocument, Javadoc javadoc) {
+ return skipWhitespace(sourceDocument, javadoc.getStartPosition() + javadoc.getLength()) - javadoc.getStartPosition();
+ }
+
+ int skipWhitespace(Document doc, int offset) {
+ try {
+ while (Character.isWhitespace(doc.getChar(offset))){
+ offset++;
+ }
+ } catch (BadLocationException e) {
+ }
+ return offset;
+ }
+
+ boolean makeDirectory(File directory) {
+ if (directory.exists())
+ return true;
+ return directory.mkdirs();
+ }
+
+ List<String> getBashed() {
+ return fBashed;
+ }
+
+ List<String> getUnchanged() {
+ return fUnchanged;
+ }
+
+ List<String> getSkipped() {
+ return fSkipped;
+ }
+}
diff --git a/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
index da08e73873..ca6fb419fd 100644
--- a/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
@@ -2,14 +2,12 @@ Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt.tools; singleton:=true
-Bundle-Version: 3.107.400.qualifier
-Bundle-Activator: org.eclipse.swt.tools.Activator
+Bundle-Version: 3.109.300.qualifier
Bundle-ManifestVersion: 2
-Export-Package: org.eclipse.swt.tools,
- org.eclipse.swt.tools.internal; x-internal:=true
+Export-Package: org.eclipse.swt.tools.internal; x-internal:=true
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
org.eclipse.core.resources;bundle-version="3.4.0",
org.eclipse.jdt.core;bundle-version="3.4.0",
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java
index e954d66412..c214d6ffdf 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2018 IBM Corporation and others.
+ * Copyright (c) 2008, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,8 +38,8 @@ public class DOMWriter {
boolean filter(Attr attr) {
if (attributeFilter == null) return false;
String name = attr.getNodeName();
- for (int i = 0; i < attributeFilter.length; i++) {
- if (name.matches(attributeFilter[i])) return false;
+ for (String filteredName : attributeFilter) {
+ if (name.matches(filteredName)) return false;
}
return true;
}
@@ -47,9 +47,8 @@ public class DOMWriter {
Node getIDAttribute(Node node) {
NamedNodeMap attributes = node.getAttributes();
if (attributes == null) return null;
- String[] names = idAttributes;
- for (int i = 0; i < names.length; i++) {
- Node nameAttrib = attributes.getNamedItem(names[i]);
+ for (String name : idAttributes) {
+ Node nameAttrib = attributes.getNamedItem(name);
if (nameAttrib != null) return nameAttrib;
}
return null;
@@ -92,8 +91,7 @@ public class DOMWriter {
for (int i = 0; i < level; i++) print("\t");
print("<");
print(name);
- for (int i = 0; i < attrs.length; i++) {
- Attr attr = attrs[i];
+ for (Attr attr : attrs) {
if (isArg && "name".equals(attr.getNodeName())) continue;
if (filter(attr)) continue;
print(" ");
@@ -112,17 +110,18 @@ public class DOMWriter {
if (child.getNodeType() == Node.ELEMENT_NODE) nodes.add(child);
}
int count = nodes.size();
- Collections.sort(nodes, (a, b) -> {
+ nodes.sort((a, b) -> {
String nameA = a.getNodeName();
String nameB = b.getNodeName();
if ("arg".equals(nameA)) {
return 0;
- }
+ }
int result = nameA.compareTo(nameB);
if (result == 0) {
Node idA = getIDAttribute(a);
Node idB = getIDAttribute(b);
- if (idA == null || idB == null) return 0;
+ if (idA == null || idB == null)
+ return 0;
return idA.getNodeValue().compareTo(idB.getNodeValue());
}
return result;
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
index 90cf587667..a7e023073d 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 IBM Corporation and others.
+ * Copyright (c) 2008, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -16,36 +16,26 @@ package org.eclipse.swt.tools.internal;
import java.io.*;
import java.util.*;
import java.util.Map.*;
-import java.util.stream.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
-import org.w3c.dom.Node;
import org.xml.sax.*;
+
@SuppressWarnings("unchecked")
public class MacGenerator {
String[] xmls;
Document[] documents;
String outputDir, outputLibDir, extrasDir, mainClassName, selectorEnumName;
- String delimiter = System.getProperty("line.separator");
- boolean generate64Code;
+ String delimiter = System.lineSeparator();
PrintWriter out;
+ HashSet<String> knownConstTypes = new HashSet<>();
public static boolean BUILD_C_SOURCE = true;
public static boolean GENERATE_ALLOC = true;
- public static boolean GENERATE_STRUCTS = false;
+ public static boolean GENERATE_STRUCTS = true;
public static boolean USE_SYSTEM_BRIDGE_FILES = false;
- static final char[] INT_LONG = "int /*long*/".toCharArray();
- static final char[] INT_LONG_ARRAY = "int[] /*long[]*/".toCharArray();
- static final char[] FLOAT_DOUBLE = "float /*double*/".toCharArray();
- static final char[] FLOAT_DOUBLE_ARRAY = "float[] /*double[]*/".toCharArray();
- static final char[] LONG_INT = "long /*int*/".toCharArray();
- static final char[] LONG_INT_ARRAY = "long[] /*int[]*/".toCharArray();
- static final char[] DOUBLE_FLOAT = "double /*float*/".toCharArray();
- static final char[] DOUBLE_FLOAT_ARRAY = "double[] /*float[]*/".toCharArray();
-
public MacGenerator() {
}
@@ -53,8 +43,7 @@ static void list(File path, ArrayList<String> list) {
if (path == null) return;
File[] frameworks = path.listFiles();
if (frameworks == null) return;
- for (int i = 0; i < frameworks.length; i++) {
- File file = frameworks[i];
+ for (File file : frameworks) {
String name = file.getName();
int index = name.lastIndexOf(".");
if (index != -1) {
@@ -66,55 +55,9 @@ static void list(File path, ArrayList<String> list) {
}
}
-static int indexOf(final char[] toBeFound, final char[] array, final int start) {
- final int arrayLength = array.length;
- final int toBeFoundLength = toBeFound.length;
- if (toBeFoundLength > arrayLength || start < 0) return -1;
- if (toBeFoundLength == 0) return 0;
- if (toBeFoundLength == arrayLength) {
- for (int i = start; i < arrayLength; i++) {
- if (array[i] != toBeFound[i]) return -1;
- }
- return 0;
- }
- arrayLoop: for (int i = start, max = arrayLength - toBeFoundLength + 1; i < max; i++) {
- if (array[i] == toBeFound[0]) {
- for (int j = 1; j < toBeFoundLength; j++) {
- if (array[i + j] != toBeFound[j]) continue arrayLoop;
- }
- return i;
- }
- }
- return -1;
-}
-
-static boolean replace(char[] source, char[] src, char[] dest) {
- boolean changed = false;
- int start = 0;
- while (start < source.length) {
- int index = indexOf(src, source, start);
- if (index == -1) break;
- changed |= true;
- System.arraycopy(dest, 0, source, index, dest.length);
- start = index + 1;
- }
- return changed;
-}
-
void output(String fileName, char[] source) {
try {
if (source.length > 0) {
- if (generate64Code) {
- replace(source, INT_LONG, LONG_INT);
- replace(source, INT_LONG_ARRAY, LONG_INT_ARRAY);
- replace(source, FLOAT_DOUBLE, DOUBLE_FLOAT);
- replace(source, FLOAT_DOUBLE_ARRAY, DOUBLE_FLOAT_ARRAY);
- } else {
- replace(source, LONG_INT, INT_LONG);
- replace(source, LONG_INT_ARRAY, INT_LONG_ARRAY);
- replace(source, DOUBLE_FLOAT, FLOAT_DOUBLE);
- replace(source, DOUBLE_FLOAT_ARRAY, FLOAT_DOUBLE_ARRAY);
- }
ByteArrayOutputStream out = new ByteArrayOutputStream();
PrintStream stream = new PrintStream(out);
stream.print(source);
@@ -152,14 +95,14 @@ void merge(Document document, Document extraDocument) {
* not found in the document.
*/
ArrayList<Node> sortedNodes = Collections.list(Collections.enumeration(extras.values()));
- Collections.sort(sortedNodes, (arg0, arg1) -> {
+ sortedNodes.sort((arg0, arg1) -> {
int compare = getLevel(arg0) - getLevel(arg1);
if (compare == 0) {
return arg0.getNodeName().compareTo(arg1.getNodeName());
}
return compare;
});
- String delimiter = System.getProperty("line.separator");
+ String delimiter = System.lineSeparator();
for (Node node : sortedNodes) {
String name = node.getNodeName();
if ("arg".equals(name) || "retval".equals(name)) {
@@ -256,8 +199,8 @@ String getParamName(Node param, int i) {
if (swtName != null) {
paramName = swtName.getNodeValue();
} else {
- Node node = paramAttributes.getNamedItem("name");
- if (node != null) paramName = node.getNodeValue();
+ Node node = paramAttributes.getNamedItem("name");
+ if (node != null) paramName = node.getNodeValue();
}
if (paramName.length() == 0) {
Node node = paramAttributes.getNamedItem("index");
@@ -277,39 +220,65 @@ void generateFields(ArrayList<Node> fields) {
for (Node field : fields) {
NamedNodeMap fieldAttributes = field.getAttributes();
String fieldName = fieldAttributes.getNamedItem("name").getNodeValue();
- String type = getJavaType(field), type64 = getJavaType64(field);
- out("\t");
- out("public ");
- out(type);
- if (!type.equals(type64)) {
- out(" /*");
- out(type64);
- out("*/");
+ String fieldType = getJavaType(field);
+ if (!isStruct(field)) {
+ out("\t/** @field cast=(");
+ out(getCType(field));
+ out(") */");
+ outln();
}
+ out("\tpublic ");
+ out(fieldType);
out(" ");
out(fieldName);
if (isStruct(field)) {
out(" = new ");
- String clazz = getDeclaredType(fieldAttributes, field);
- out (clazz);
- out ("()");
+ out(fieldType);
+ out("()");
}
out(";");
outln();
}
}
+void generateToString(String className, ArrayList<Node> fields) {
+ outln();
+ out("\t@Override");
+ outln();
+ out("\tpublic String toString() {");
+ outln();
+ out("\t\treturn \"");
+ out(className);
+ out("{\"");
+ boolean first = true;
+ for (Node field : fields) {
+ if (!first) {
+ out(" + \",\"");
+ }
+ NamedNodeMap fieldAttributes = field.getAttributes();
+ String fieldName = fieldAttributes.getNamedItem("name").getNodeValue();
+ out(" + ");
+ out(fieldName);
+ first = false;
+ }
+ out(" + \"}\";");
+ outln();
+ out("\t}");
+ outln();
+}
+
private String getDeclaredType(NamedNodeMap map, Node location) {
- Node declaredType = map.getNamedItem("declared_type");
- String value = declaredType != null ? declaredType.getNodeValue() : null;
- if(value == null) {
+ Node declaredType = map.getNamedItem("declared_type64");
+ if (declaredType == null) declaredType = map.getNamedItem("declared_type");
+ if (declaredType == null) {
System.err.printf("Unable to detect declared_type. Check bridge file! It might have been removed, inheritance changed, etc. It could also be an issue with gen_bridge_metadata. Location: %s %n", toDebugLocation(location));
return "nodeclaredtype";
}
+ String value = declaredType.getNodeValue();
// strip any _Nullable and _Nonnull annotations
value = value.replace("_Nullable", "").replace("_Nonnull", "").replace("_Null_unspecified", "");
-
+
// strip greater-than (>) sign
value = value.replace(">", "");
@@ -324,7 +293,7 @@ private String getDeclaredType(NamedNodeMap map, Node location) {
value = value.replace("struct ", "");
// also remove any white spaces
- value = value.chars().filter((c)->!Character.isWhitespace(c)).mapToObj(c -> String.valueOf((char)c)).collect(Collectors.joining());
+ value = value.replaceAll("\\s", "");
return value;
}
@@ -334,36 +303,22 @@ void generateMethods(String className, ArrayList<Node> methods) {
NamedNodeMap mthAttributes = method.getAttributes();
String sel = mthAttributes.getNamedItem("selector").getNodeValue();
if ("NSObject".equals(className)) {
- if ("alloc".equals(sel) || "dealloc".equals(sel)) continue;
+ if ("alloc".equals(sel) || "dealloc".equals(sel)) continue;
}
out("public ");
boolean isStatic = isStatic(method);
if (isStatic) out("static ");
- Node returnNode = getReturnNode(method.getChildNodes());
- if (getType(returnNode).equals("void")) returnNode = null;
- String returnType = "", returnType64 = "";
- if (returnNode != null) {
- String type = returnType = getJavaType(returnNode), type64 = returnType64 = getJavaType64(returnNode);
-
- // convert "instancetype" to class name
- if(type.equals("instancetype")) {
- type = returnType = className;
- type64 = returnType64 = className;
- }
-
- out(type);
- if (!type.equals(type64)) {
- out(" /*");
- out(type64);
- out("*/");
- }
- out(" ");
- } else {
- out("void ");
+ Node returnNode = getReturnNode(method);
+ String returnType = getJavaType(returnNode);
+ // convert "instancetype" to class name
+ if (returnType.equals("instancetype")) {
+ returnType = className;
}
+ out(returnType);
+ out(" ");
String methodName = sel;
if (isUnique(method, methods)) {
- int index = methodName.indexOf(":");
+ int index = methodName.indexOf(':');
if (index != -1) methodName = methodName.substring(0, index);
} else {
//TODO improve this selector
@@ -379,21 +334,15 @@ void generateMethods(String className, ArrayList<Node> methods) {
Node param = params.item(k);
if ("arg".equals(param.getNodeName())) {
if (!first) out(", ");
- String type = getJavaType(param), type64 = getJavaType64(param);
- out( type);
- if (!type.equals(type64)) {
- out(" /*");
- out(type64);
- out("*/");
- }
first = false;
+ out(getJavaType(param));
out(" ");
out(getParamName(param, argIndex++));
}
}
out(") {");
outln();
- if (returnNode != null && isStruct(returnNode)) {
+ if (isStruct(returnNode)) {
out("\t");
out(returnType);
out(" result = new ");
@@ -401,33 +350,22 @@ void generateMethods(String className, ArrayList<Node> methods) {
out("();");
outln();
out("\tOS.objc_msgSend_stret(result, ");
- } else if (returnNode != null && isBoolean(returnNode)) {
- out("\treturn ");
- out("OS.objc_msgSend_bool(");
- } else if (returnNode != null && isFloatingPoint(returnNode)) {
- out("\treturn ");
- String type = getType(returnNode), type64 = getType64(returnNode);
- if (type.equals(type64) && type.equals("float")) {
- out("OS.objc_msgSend_floatret(");
- } else {
- if (returnType.equals("float")) out("(float /*double*/)");
- out("OS.objc_msgSend_fpret(");
- }
- } else if (returnNode != null && isObject(returnNode)) {
- out("\tint /*long*/ result = OS.objc_msgSend(");
+ } else if (isObject(returnNode)) {
+ out("\tlong result = OS.objc_msgSend(");
+ } else if (returnType.equals("void")) {
+ out("\tOS.objc_msgSend(");
+ } else if (returnType.equals("boolean")) {
+ out("\treturn OS.objc_msgSend_bool(");
+ } else if (returnType.equals("float")) {
+ out("\treturn OS.objc_msgSend_floatret(");
+ } else if (returnType.equals("double")) {
+ out("\treturn OS.objc_msgSend_fpret(");
} else {
- if (returnNode != null) {
- out("\treturn ");
- if ((returnType.equals("int") && returnType64.equals("int")) || !returnType.equals("int")) {
- out("(");
- out(returnType);
- out(")");
- }
- if (returnType.equals("int") && returnType64.equals("int")) {
- out("/*64*/");
- }
- } else {
- out("\t");
+ out("\treturn ");
+ if (!returnType.equals("long")) {
+ out("(");
+ out(returnType);
+ out(")");
}
out("OS.objc_msgSend(");
}
@@ -460,7 +398,7 @@ void generateMethods(String className, ArrayList<Node> methods) {
out(")");
out(";");
outln();
- if (returnNode != null && isObject(returnNode)) {
+ if (isObject(returnNode)) {
if (!isStatic && returnType.equals(className)) {
out("\treturn result == this.id ? this : (result != 0 ? new ");
out(returnType);
@@ -477,7 +415,7 @@ void generateMethods(String className, ArrayList<Node> methods) {
out("(result) : null;");
}
outln();
- } else if (returnNode != null && isStruct(returnNode)) {
+ } else if (isStruct(returnNode)) {
out("\treturn result;");
outln();
}
@@ -490,35 +428,8 @@ void generateMethods(String className, ArrayList<Node> methods) {
void generateExtraFields(String className) {
/* sizeof field */
out("\t");
- out("public static int sizeof = OS." + className + "_sizeof();");
+ out("public static final int sizeof = OS." + className + "_sizeof();");
outln();
- if ("CGSize".equals(className)) {
- outln();
- out("\tpublic String toString () {");
- outln();
- out("\t\treturn \"CGSize {\" + width + \" \" + height + \"}\";");
- outln();
- out("\t}");
- outln();
- }
- if ("CGRect".equals(className)) {
- outln();
- out("\tpublic String toString () {");
- outln();
- out("\t\treturn \"CGRect {\" + origin.x + \" \" + origin.y + \" \" + size.width + \" \" + size.height + \"}\";");
- outln();
- out("\t}");
- outln();
- }
- if ("CGPoint".equals(className)) {
- outln();
- out("\tpublic String toString () {");
- outln();
- out("\t\treturn \"CGPoint {\" + x + \" \" + y + \"}\";");
- outln();
- out("\t}");
- outln();
- }
}
void generateExtraMethods(String className) {
@@ -535,7 +446,7 @@ void generateExtraMethods(String className) {
/* pointer constructor */
out("public ");
out(className);
- out("(int /*long*/ id) {");
+ out("(long id) {");
outln();
out("\tsuper(id);");
outln();
@@ -571,7 +482,7 @@ void generateExtraMethods(String className) {
/* Get java string */
out("public String getString() {");
outln();
- out("\tchar[] buffer = new char[(int)/*64*/length()];");
+ out("\tchar[] buffer = new char[(int)length()];");
outln();
out("\tgetCharacters(buffer);");
outln();
@@ -670,8 +581,8 @@ TreeMap<String, Object[]> getGeneratedStructs() {
void copyClassMethodsDown(final Map<String, Object[]> classes) {
ArrayList<Object[]> sortedClasses = Collections.list(Collections.enumeration(classes.values()));
- Collections.sort(sortedClasses, new Comparator<Object>() {
- int getHierarchyLevel(Node node) {
+ sortedClasses.sort(new Comparator<>() {
+ private int getHierarchyLevel(Node node) {
String superclass = getSuperclassName(node);
int level = 0;
while (!superclass.equals("id") && !superclass.equals("NSObject")) {
@@ -681,8 +592,8 @@ void copyClassMethodsDown(final Map<String, Object[]> classes) {
return level;
}
@Override
- public int compare(Object arg0, Object arg1) {
- return getHierarchyLevel((Node)((Object[])arg0)[0]) - getHierarchyLevel((Node)((Object[])arg1)[0]);
+ public int compare(Object[] arg0, Object[] arg1) {
+ return getHierarchyLevel((Node)arg0[0]) - getHierarchyLevel((Node)arg1[0]);
}
});
for (Object[] clazz : sortedClasses) {
@@ -690,8 +601,7 @@ void copyClassMethodsDown(final Map<String, Object[]> classes) {
ArrayList<Node> methods = (ArrayList<Node>)clazz[1];
Object[] superclass = classes.get(getSuperclassName(node));
if (superclass != null) {
- for (Iterator<Node> iterator2 = ((ArrayList<Node>)superclass[1]).iterator(); iterator2.hasNext();) {
- Node method = iterator2.next();
+ for (Node method : ((ArrayList<Node>) superclass[1])) {
if (isStatic(method)) {
methods.add(method);
}
@@ -705,7 +615,7 @@ String getSuperclassName (Node node) {
Node superclass = attributes.getNamedItem("swt_superclass");
if (superclass != null) {
return superclass.getNodeValue();
- }
+ }
Node name = attributes.getNamedItem("name");
if (name.getNodeValue().equals("NSObject")) {
return "id";
@@ -765,7 +675,8 @@ void generateStructs() {
String className = structEntry.getKey();
Object[] clazz = structEntry.getValue();
- ArrayList<Node> methods = (ArrayList<Node>)clazz[1];
+ Node field = (Node) clazz[0];
+ ArrayList<Node> fields = (ArrayList<Node>)clazz[1];
out("package ");
String packageName = getPackageName();
out(packageName);
@@ -776,8 +687,11 @@ void generateStructs() {
out(className);
out(" {");
outln();
- generateFields(methods);
+ generateFields(fields);
generateExtraFields(className);
+ if (getGenToString(field)) {
+ generateToString(className, fields);
+ }
out("}");
outln();
@@ -816,7 +730,6 @@ void generateMainClass() {
int end = str.indexOf(section, start);
header = str.substring(0, start);
footer = end == -1 ? "\n}" : str.substring(end);
- generate64Code = str.indexOf("long /*int*/") != -1;
input.close();
} catch (IOException e) {
}
@@ -899,9 +812,9 @@ void generateSelectorEnum() {
outln();
generateSelectorsEnumLiteral();
-
+
out(";"); outln();
-
+
String mainClassShortName = mainClassName.substring(mainClassName.lastIndexOf('.')+1);
out(" final String name;"); outln();
out(" final long value;"); outln();
@@ -915,7 +828,7 @@ void generateSelectorEnum() {
out(" public static Selector valueOf(long value) {"); outln();
out(" return "+mainClassShortName+".getSelector(value);"); outln();
out(" }"); outln();
-
+
out(footer);
this.out.flush();
output(fileName, out.toCharArray());
@@ -955,11 +868,11 @@ public String[] getXmls() {
if(files == null) {
files = new File[0];
}
- for (int i = 0; i < files.length; i++) {
- array.add(files[i].getAbsolutePath());
+ for (File file : files) {
+ array.add(file.getAbsolutePath());
}
}
- Collections.sort(array, (o1, o2) -> new File(o1).getName().compareTo(new File(o2).getName()));
+ array.sort((o1, o2) -> new File(o1).getName().compareTo(new File(o2).getName()));
xmls = array.toArray(new String[array.size()]);
}
return xmls;
@@ -1059,6 +972,8 @@ public String[] getExtraAttributeNames(Node node) {
}
} else if (name.equals("class")) {
return new String[]{"swt_superclass"};
+ } else if (name.equals("struct")) {
+ return new String[]{"swt_gen_memmove", "swt_gen_tostring"};
} else if (name.equals("retval")) {
return new String[]{"swt_java_type", "swt_java_type64", "swt_alloc"};
} else if (name.equals("arg")) {
@@ -1114,9 +1029,8 @@ String getKey (Node node) {
public Node getIDAttribute(Node node) {
NamedNodeMap attributes = node.getAttributes();
if (attributes == null) return null;
- String[] names = getIDAttributeNames();
- for (int i = 0; i < names.length; i++) {
- Node nameAttrib = attributes.getNamedItem(names[i]);
+ for (String name : getIDAttributeNames()) {
+ Node nameAttrib = attributes.getNamedItem(name);
if (nameAttrib != null) return nameAttrib;
}
return null;
@@ -1163,7 +1077,7 @@ void out(String str) {
void outln() {
PrintWriter out = this.out;
- out.println();
+ out.print(delimiter);
}
void generateConstants() {
@@ -1180,18 +1094,13 @@ void generateConstants() {
out("/** @method flags=const */");
outln();
out("public static final native ");
- String type = getType(node), type64 = getType64(node);
- out(type);
- if (!type.equals(type64)) {
- out(" /*");
- out(type64);
- out("*/");
- }
+ out(getType(node));
out(" ");
out(constName);
out("();");
outln();
- if (getDeclaredType(attributes, node).equals("NSString*")) {
+ // Assume that all object-typed constants are strings
+ if (isObject(node)) {
out("public static final NSString ");
out(constName);
out(" = new NSString(");
@@ -1200,9 +1109,13 @@ void generateConstants() {
outln();
}
}
+ if (isObject(node)) {
+ knownConstTypes.add(getCType(node));
+ }
}
}
}
+ knownConstTypes.remove("id");
}
void generateEnums() {
@@ -1215,7 +1128,8 @@ void generateEnums() {
if ("enum".equals(node.getNodeName())) {
if (getGen(node)) {
NamedNodeMap attributes = node.getAttributes();
- Node valueNode = attributes.getNamedItem("value");
+ Node valueNode = attributes.getNamedItem("value64");
+ if (valueNode == null) valueNode = attributes.getNamedItem("value");
if (valueNode != null) {
String value = valueNode.getNodeValue();
out("public static final ");
@@ -1226,6 +1140,9 @@ void generateEnums() {
if (value.equals("4294967295")) {
out("int ");
value = "-1";
+ } else if (value.equals("18446744073709551615")) {
+ out("long ");
+ value = "-1L";
} else {
try {
Integer.parseInt(value);
@@ -1272,6 +1189,20 @@ boolean getGenCallback(Node node) {
return gen != null && !gen.getNodeValue().equals("false");
}
+boolean getGenMemmove(Node node) {
+ NamedNodeMap attributes = node.getAttributes();
+ if (attributes == null) return false;
+ Node gen = attributes.getNamedItem("swt_gen_memmove");
+ return gen != null && !gen.getNodeValue().equals("false");
+}
+
+boolean getGenToString(Node node) {
+ NamedNodeMap attributes = node.getAttributes();
+ if (attributes == null) return false;
+ Node gen = attributes.getNamedItem("swt_gen_tostring");
+ return gen != null && !gen.getNodeValue().equals("false");
+}
+
boolean isStatic(Node node) {
NamedNodeMap attributes = node.getAttributes();
Node isStatic = attributes.getNamedItem("class_method");
@@ -1279,35 +1210,15 @@ boolean isStatic(Node node) {
}
boolean isStruct(Node node) {
- NamedNodeMap attributes = node.getAttributes();
- Node type = attributes.getNamedItem("type");
- if (type == null) return false;
- String code = type.getNodeValue();
- return code.startsWith("{");
+ return getTypeCode(node) == '{';
}
-boolean isFloatingPoint(Node node) {
- NamedNodeMap attributes = node.getAttributes();
- Node type = attributes.getNamedItem("type");
- if (type == null) return false;
- String code = type.getNodeValue();
- return code.equals("f") || code.equals("d");
+boolean isPointer(Node node) {
+ return getTypeCode(node) == '^';
}
boolean isObject(Node node) {
- NamedNodeMap attributes = node.getAttributes();
- Node type = attributes.getNamedItem("type");
- if (type == null) return false;
- String code = type.getNodeValue();
- return code.equals("@");
-}
-
-boolean isBoolean(Node node) {
- NamedNodeMap attributes = node.getAttributes();
- Node type = attributes.getNamedItem("type");
- if (type == null) return false;
- String code = type.getNodeValue();
- return code.equals("B");
+ return getTypeCode(node) == '@';
}
void buildLookup(Node node, HashMap<String, Node> table) {
@@ -1332,7 +1243,7 @@ boolean isUnique(Node method, ArrayList<Node> methods) {
signature += getJavaType(param);
}
}
- int index = methodName.indexOf(":");
+ int index = methodName.indexOf(':');
if (index != -1) methodName = methodName.substring(0, index);
for (Node other : methods) {
NamedNodeMap attributes = other.getAttributes();
@@ -1340,7 +1251,7 @@ boolean isUnique(Node method, ArrayList<Node> methods) {
if (attributes != null) otherSel = attributes.getNamedItem("selector");
if (other != method && otherSel != null) {
String otherName = otherSel.getNodeValue();
- index = otherName.indexOf(":");
+ index = otherName.indexOf(':');
if (index != -1) otherName = otherName.substring(0, index);
if (methodName.equals(otherName)) {
NodeList otherParams = other.getChildNodes();
@@ -1399,7 +1310,7 @@ void generateSelectorsConst() {
out ("}"); outln();
for (String sel : set) {
String selConst = getSelConst(sel);
- out("public static final int /*long*/ ");
+ out("public static final long ");
out(selConst);
out(" = ");
out("Selector."+selConst+".value;");
@@ -1443,17 +1354,26 @@ void generateSelectorsEnumLiteral() {
void generateStructNatives() {
TreeSet<String> set = new TreeSet<>();
+ TreeSet<String> memmoveSet = new TreeSet<>();
for (int x = 0; x < xmls.length; x++) {
Document document = documents[x];
if (document == null) continue;
NodeList list = document.getDocumentElement().getChildNodes();
for (int i = 0; i < list.getLength(); i++) {
Node node = list.item(i);
- if ("struct".equals(node.getNodeName()) && getGen(node)) {
- set.add(getIDAttribute(node).getNodeValue());
+ if ("struct".equals(node.getNodeName())) {
+ String className = getIDAttribute(node).getNodeValue();
+ if (getGen(node)) {
+ set.add(className);
+ }
+ if (getGenMemmove(node)) {
+ memmoveSet.add(className);
+ }
}
}
}
+ set.addAll(memmoveSet);
+
out("/** Sizeof natives */");
outln();
for (String struct : set) {
@@ -1466,95 +1386,68 @@ void generateStructNatives() {
out("/** Memmove natives */");
outln();
outln();
- for (String struct : set) {
+ for (String struct : memmoveSet) {
out("/**");
outln();
- out(" * @param dest cast=(void *),flags=no_in critical");
+ out(" * @param dest cast=(void *)");
outln();
- out(" * @param src cast=(void *),flags=critical");
-// out(" * @param src cast=(void *),flags=no_out critical");
+ out(" * @param src flags=no_out");
outln();
out(" */");
outln();
out("public static final native void memmove(");
- out("int /*long*/ dest, ");
+ out("long dest, ");
out(struct);
- out(" src, int /*long*/ size);");
+ out(" src, long size);");
outln();
out("/**");
outln();
- out(" * @param dest cast=(void *),flags=no_in critical");
+ out(" * @param dest flags=no_in");
outln();
- out(" * @param src cast=(void *),flags=critical");
-// out(" * @param src cast=(void *),flags=no_out critical");
+ out(" * @param src cast=(void *)");
outln();
out(" */");
outln();
out("public static final native void memmove(");
out(struct);
- out(" dest, int /*long*/ src, int /*long*/ size);");
+ out(" dest, long src, long size);");
outln();
}
}
-String buildSend(Node method, boolean tags, boolean only64, boolean superCall) {
- Node returnNode = getReturnNode(method.getChildNodes());
+String buildSend(Node method, boolean superCall) {
+ Node returnNode = getReturnNode(method);
+ String returnType = getJavaType(returnNode);
StringBuilder buffer = new StringBuilder();
buffer.append("public static final native ");
- if (returnNode != null && isStruct(returnNode)) {
+ if (isStruct(returnNode)) {
buffer.append("void ");
buffer.append(superCall ? "objc_msgSendSuper_stret" : "objc_msgSend_stret");
buffer.append("(");
- buffer.append(getJavaType(returnNode));
+ buffer.append(returnType);
buffer.append(" result, ");
- } else if (returnNode != null && isFloatingPoint(returnNode)) {
- String type = getType(returnNode), type64 = getType64(returnNode);
- if (type.equals(type64) && type.equals("float")) {
- buffer.append("float ");
- buffer.append(superCall ? "objc_msgSendSuper_floatret" : "objc_msgSend_floatret");
- } else {
- buffer.append("double ");
- buffer.append(superCall ? "objc_msgSendSuper_fpret" : "objc_msgSend_fpret");
- }
+ } else if (returnType.equals("float")) {
+ buffer.append("float ");
+ buffer.append(superCall ? "objc_msgSendSuper_floatret" : "objc_msgSend_floatret");
+ buffer.append("(");
+ } else if (returnType.equals("double")) {
+ buffer.append("double ");
+ buffer.append(superCall ? "objc_msgSendSuper_fpret" : "objc_msgSend_fpret");
buffer.append("(");
- } else if (returnNode != null && isBoolean(returnNode)) {
+ } else if (returnType.equals("boolean")) {
buffer.append("boolean ");
buffer.append(superCall ? "objc_msgSendSuper_bool" : "objc_msgSend_bool");
buffer.append("(");
} else {
- if (only64) {
- buffer.append("long");
- } else {
- if (tags) {
- buffer.append("int /*long*/");
- } else {
- buffer.append("int");
- }
- }
+ buffer.append("long");
buffer.append(" ");
buffer.append(superCall ? "objc_msgSendSuper" : "objc_msgSend");
buffer.append("(");
}
if (superCall) {
- if (only64) {
- buffer.append("objc_super superId, long sel");
- } else {
- if (tags) {
- buffer.append("objc_super superId, int /*long*/ sel");
- } else {
- buffer.append("objc_super superId, int sel");
- }
- }
+ buffer.append("objc_super superId, long sel");
} else {
- if (only64) {
- buffer.append("long id, long sel");
- } else {
- if (tags) {
- buffer.append("int /*long*/ id, int /*long*/ sel");
- } else {
- buffer.append("int id, int sel");
- }
- }
+ buffer.append("long id, long sel");
}
NodeList params = method.getChildNodes();
boolean first = false;
@@ -1563,20 +1456,10 @@ String buildSend(Node method, boolean tags, boolean only64, boolean superCall) {
Node param = params.item(k);
if ("arg".equals(param.getNodeName())) {
if (!first) buffer.append(", ");
- if (isStruct(param)) {
- buffer.append(getJavaType(param));
- } else {
- String type = getType(param), type64 = getType64(param);
- buffer.append(only64 ? type64 : type);
- if (!only64 && tags && !type.equals(type64)) {
- buffer.append(" /*");
- buffer.append(type64);
- buffer.append("*/");
- }
- }
first = false;
+ buffer.append(getType(param));
buffer.append(" arg");
- buffer.append(String.valueOf(count++));
+ buffer.append(count++);
}
}
buffer.append(");");
@@ -1643,8 +1526,8 @@ void generateCustomCallbacks() {
}
String nativeMth = key.replaceAll(":", "_");
out("/** @method callback_types=");
- Node returnNode = getReturnNode(method.getChildNodes());
- out(returnNode == null ? "void" : getCType(returnNode));
+ Node returnNode = getReturnNode(method);
+ out(getCType(returnNode));
out(";id;SEL;");
NodeList params = method.getChildNodes();
for (int k = 0; k < params.getLength(); k++) {
@@ -1655,7 +1538,7 @@ void generateCustomCallbacks() {
}
}
out(",callback_flags=");
- out(returnNode != null && isStruct(returnNode) ? "struct" : "none");
+ out(isStruct(returnNode) ? "struct" : "none");
out(";none;none;");
for (int k = 0; k < params.getLength(); k++) {
Node param = params.item(k);
@@ -1666,16 +1549,15 @@ void generateCustomCallbacks() {
}
out(" */");
outln();
- out("public static final native int /*long*/ CALLBACK_");
+ out("public static final native long CALLBACK_");
out(nativeMth);
- out("(int /*long*/ func);");
+ out("(long func);");
outln();
}
}
void generateSends(boolean superCall) {
TreeMap<String, Node> set = new TreeMap<>();
- TreeMap<String, Node> set64 = new TreeMap<>();
for (int x = 0; x < xmls.length; x++) {
Document document = documents[x];
if (document == null) continue;
@@ -1687,44 +1569,18 @@ void generateSends(boolean superCall) {
for (int j = 0; j < methods.getLength(); j++) {
Node method = methods.item(j);
if ("method".equals(method.getNodeName()) && getGen(method) && (!superCall || getGenSuper(method))) {
- String code = buildSend(method, false, false, superCall);
- String code64 = buildSend(method, false, true, superCall);
+ String code = buildSend(method, superCall);
if (set.get(code) == null) {
set.put(code, method);
}
- if (set64.get(code64) == null) {
- set64.put(code64, method);
- }
}
}
}
}
}
outln();
- TreeMap<String, Node> tagsSet = new TreeMap<>();
- for (Iterator<String> iterator = set.keySet().iterator(); iterator.hasNext();) {
- String key = iterator.next();
- Node method = set.get(key);
- String tagCode = buildSend(method, false, true, superCall);
- if (set64.get(tagCode) != null) {
- tagsSet.put(key, method);
- iterator.remove();
- set64.remove(tagCode);
- }
- }
- TreeMap<String, Node> all = new TreeMap<>();
- for (String key : tagsSet.keySet()) {
- Node method = tagsSet.get(key);
- all.put(buildSend(method, true, false, superCall), method);
- }
for (String key : set.keySet()) {
- all.put(key, set.get(key));
- }
- for (String key : set64.keySet()) {
- all.put(key, set64.get(key));
- }
- for (String key : all.keySet()) {
- Node method = all.get(key);
+ Node method = set.get(key);
NodeList params = method.getChildNodes();
ArrayList<String> tags = new ArrayList<>();
int count = 0;
@@ -1778,7 +1634,7 @@ void generateClassesConst() {
}
for (String cls : set) {
String clsConst = "class_" + cls;
- out("public static final int /*long*/ ");
+ out("public static final long ");
out(clsConst);
out(" = ");
out("objc_getClass(\"");
@@ -1807,7 +1663,7 @@ void generateProtocolsConst() {
}
for (String cls : set) {
String clsConst = "protocol_" + cls;
- out("public static final int /*long*/ ");
+ out("public static final long ");
out(clsConst);
out(" = ");
out("objc_getProtocol(\"");
@@ -1829,33 +1685,41 @@ String getClassName() {
return mainClassName.substring(dot + 1);
}
-Node getReturnNode(NodeList list) {
+Node getReturnNode(Node method) {
+ NodeList list = method.getChildNodes();
for (int j = 0; j < list.getLength(); j++) {
Node node = list.item(j);
if ("retval".equals(node.getNodeName())) {
return node;
}
}
- return null;
+ return method;
}
+
String getType(Node node) {
+ return getType(node, false);
+}
+
+String getJavaType(Node node) {
+ return getType(node, true);
+}
+
+char getTypeCode(Node node) {
NamedNodeMap attributes = node.getAttributes();
- Node javaType = attributes.getNamedItem("swt_java_type");
- if (javaType != null) return javaType.getNodeValue();
- Node type = attributes.getNamedItem("type");
- if (type == null) {
- System.err.printf("Unable to detect type. Check bridge file! It might have been removed, inheritance changed, etc. Location: %s %n", toDebugLocation(node));
- return "notype";
- }
+ Node type = attributes.getNamedItem("type64");
+ if (type == null) type = attributes.getNamedItem("type");
+ if (type == null) return '?';
String code = type.getNodeValue();
- return getType(code, attributes, false, node);
+ if (code.startsWith("V")) code = code.substring(1);
+ if (code.isEmpty()) return '?';
+ return code.charAt(0);
}
private String toDebugLocation(Node location) {
StringBuilder result = new StringBuilder();
- while(location != null) {
- if(result.length() > 0) {
+ while (location != null) {
+ if (result.length() > 0) {
result.insert(0, " > ");
}
result.insert(0, getNodeInfo(location));
@@ -1885,147 +1749,46 @@ private String getNodeInfo(Node location) {
return location.toString();
}
-String getType64(Node node) {
- NamedNodeMap attributes = node.getAttributes();
- Node javaType = attributes.getNamedItem("swt_java_type");
- if (javaType != null) {
- Node javaType64 = attributes.getNamedItem("swt_java_type64");
- return javaType64 != null ? javaType64.getNodeValue() : javaType.getNodeValue();
- }
- Node attrib = attributes.getNamedItem("type");
- if (attrib == null) return "notype";
- String code = attrib.getNodeValue();
- Node attrib64 = attributes.getNamedItem("type64");
- if (attrib64 != null) code = attrib64.getNodeValue();
- return getType(code, attributes, true, node);
-}
-
-String getType(String code, NamedNodeMap attributes, boolean is64, Node location) {
- if (code.equals("c")) return "byte";
- if (code.equals("i")) return "int";
- if (code.equals("s")) return "short";
- if (code.equals("l")) return "int";
- if (code.equals("q")) return "long";
- if (code.equals("C")) return "byte";
- if (code.equals("I")) return "int";
- if (code.equals("S")) return "short";
- if (code.equals("L")) return "int";
- if (code.equals("Q")) return "long";
- if (code.equals("f")) return "float";
- if (code.equals("d")) return "double";
- if (code.equals("B")) return "boolean";
- if (code.equals("v")) return "void";
- if (code.equals("*")) return is64 ? "long" : "int";
- if (code.equals("@")) return is64 ? "long" : "int";
- if (code.equals("#")) return is64 ? "long" : "int";
- if (code.equals(":")) return is64 ? "long" : "int";
- if (code.startsWith("^")) return is64 ? "long" : "int";
- if (code.startsWith("{")) {
- return getDeclaredType(attributes, location);
- }
- if (code.startsWith("@?")) {
- return is64 ? "long" : "int";
- }
- return "BAD " + code;
-}
-
-String getJNIType(Node node) {
- NamedNodeMap attributes = node.getAttributes();
- String code = attributes.getNamedItem("type").getNodeValue();
- if (code.equals("c")) return "B";
- if (code.equals("i")) return "I";
- if (code.equals("s")) return "S";
- if (code.equals("l")) return "I";
- if (code.equals("q")) return "J";
- if (code.equals("C")) return "B";
- if (code.equals("I")) return "I";
- if (code.equals("S")) return "S";
- if (code.equals("L")) return "I";
- if (code.equals("Q")) return "J";
- if (code.equals("f")) return "F";
- if (code.equals("d")) return "D";
- if (code.equals("B")) return "Z";
- if (code.equals("v")) return "V";
- if (code.equals("*")) return "I";
- if (code.equals("@")) return "I";
- if (code.equals("#")) return "I";
- if (code.equals(":")) return "I";
- if (code.startsWith("^")) return "I";
- if (code.startsWith("@?")) return "I";
- if (code.startsWith("[")) return "BAD " + code;
- if (code.startsWith("{")) {
- return "BAD " + code;
- }
- if (code.startsWith("(")) return "BAD " + code;
- return "BAD " + code;
-}
+String getType(Node node, boolean withObjects) {
+ char typeCode = getTypeCode(node);
+ if (typeCode == '@' && !withObjects) return "long";
-String getJavaType(Node node) {
NamedNodeMap attributes = node.getAttributes();
- Node javaType = attributes.getNamedItem("swt_java_type");
- if (javaType != null) return javaType.getNodeValue().trim();
- Node type = attributes.getNamedItem("type");
- if (type == null) return "notype";
- String code = type.getNodeValue();
- return getJavaType(code, attributes, false, node);
-}
+ Node javaType = attributes.getNamedItem("swt_java_type64");
+ if (javaType == null) javaType = attributes.getNamedItem("swt_java_type");
+ if (javaType != null) return javaType.getNodeValue();
-String getJavaType64(Node node) {
- NamedNodeMap attributes = node.getAttributes();
- Node javaType = attributes.getNamedItem("swt_java_type");
- if (javaType != null) {
- Node javaType64 = attributes.getNamedItem("swt_java_type64");
- return javaType64 != null ? javaType64.getNodeValue() : javaType.getNodeValue();
- }
- Node attrib = attributes.getNamedItem("type");
- if (attrib == null) return "notype";
- String code = attrib.getNodeValue();
- Node attrib64 = attributes.getNamedItem("type64");
- if (attrib64 != null) code = attrib64.getNodeValue();
- return getJavaType(code, attributes, true, node);
-}
-
-String getJavaType(String code, NamedNodeMap attributes, boolean is64, Node location) {
- if (code.equals("c")) return "byte";
- if (code.equals("i")) return "int";
- if (code.equals("s")) return "short";
- if (code.equals("l")) return "int";
- if (code.equals("q")) return "long";
- if (code.equals("C")) return "byte";
- if (code.equals("I")) return "int";
- if (code.equals("S")) return "short";
- if (code.equals("L")) return "int";
- if (code.equals("Q")) return "long";
- if (code.equals("f")) return "float";
- if (code.equals("d")) return "double";
- if (code.equals("B")) return "boolean";
- if (code.equals("v")) return "void";
- if (code.equals("*")) return is64 ? "long" : "int";
- if (code.equals("#")) return is64 ? "long" : "int";
- if (code.equals(":")) return is64 ? "long" : "int";
- if (code.startsWith("^")) return is64 ? "long" : "int";
- if (code.equals("@")) {
- String type = getDeclaredType(attributes, location);
+ switch (typeCode) {
+ case 'v': return "void";
+ case 'B': return "boolean";
+ case 'c': return "byte";
+ case 'C': return "byte";
+ case 's': return "short";
+ case 'S': return "short";
+ case 'i': return "int";
+ case 'I': return "int";
+ case 'l': return "int";
+ case 'L': return "int";
+ case 'q': return "long";
+ case 'Q': return "long";
+ case 'f': return "float";
+ case 'd': return "double";
+ case '*': return "long";
+ case '#': return "long";
+ case ':': return "long";
+ case '^': return "long";
+ case '{': return getDeclaredType(attributes, node);
+ case '@': {
+ String type = getDeclaredType(attributes, node);
int index = type.indexOf('*');
if (index != -1) type = type.substring(0, index);
index = type.indexOf('<');
if (index != -1) type = type.substring(0, index);
- return type.trim();
+ type = type.trim();
+ return knownConstTypes.contains(type) ? "NSString" : type;
}
- if (code.startsWith("{")) {
- return getDeclaredType(attributes, location).trim();
+ default: return "notype";
}
- if (code.startsWith("@?")) return is64 ? "long" : "int";
- return "BAD " + code;
-}
-
-static String[] split(String str, String separator) {
- StringTokenizer tk = new StringTokenizer(str, separator);
- ArrayList<String> result = new ArrayList<>();
- while (tk.hasMoreTokens()) {
- result.add(tk.nextToken());
- }
- return result.toArray(new String[result.size()]);
}
void generateFunctions() {
@@ -2076,19 +1839,9 @@ void generateFunctions() {
outln();
}
out("public static final native ");
- Node returnNode = getReturnNode(node.getChildNodes());
- if (returnNode != null) {
- String type = getType(returnNode), type64 = getType64(returnNode);
- out(type);
- if (!type.equals(type64)) {
- out(" /*");
- out(type64);
- out("*/");
- }
- out(" ");
- } else {
- out("void ");
- }
+ Node returnNode = getReturnNode(node);
+ out(getType(returnNode));
+ out(" ");
out(name);
out("(");
params = node.getChildNodes();
@@ -2099,13 +1852,7 @@ void generateFunctions() {
if ("arg".equals(param.getNodeName())) {
if (!first) out(", ");
first = false;
- String type = getType(param), type64 = getType64(param);
- out(type);
- if (!type.equals(type64)) {
- out(" /*");
- out(type64);
- out("*/");
- }
+ out(getType(param));
out(" ");
out(getParamName(param, argIndex++));
}
@@ -2126,7 +1873,7 @@ void generateVariadics(Node node) {
Node variadicTypes = attributes.getNamedItem("swt_variadic_java_types");
String[] types = null;
if (variadicTypes != null) {
- types = split(variadicTypes.getNodeValue(), ",");
+ types = variadicTypes.getNodeValue().split(",");
}
int varCount = 0;
try {
@@ -2139,7 +1886,7 @@ void generateVariadics(Node node) {
} else if (types != null && types[types.length - 1].equals("*")) {
out(types[types.length - 2]);
} else {
- out("int /*long*/");
+ out("long");
}
out(" varArg");
out("" + j);
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
index 918d05bb35..8b0688f3d9 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
@@ -43,10 +43,9 @@ public class MacGeneratorUI {
if (lastParent != null && !lastParent.isDisposed() && lastParent.getParentItem() == superItem && name.equals(lastParent.getData())) {
parentItem = lastParent;
} else {
- TreeItem[] items = superItem.getItems();
- for (int i = 0; i < items.length; i++) {
- if (name.equals(items[i].getData())) {
- parentItem = items[i];
+ for (TreeItem item : superItem.getItems()) {
+ if (name.equals(item.getData())) {
+ parentItem = item;
break;
}
}
@@ -68,25 +67,25 @@ public class MacGeneratorUI {
}
void checkPath(TreeItem item, boolean checked, boolean grayed) {
- if (item == null) return;
- if (grayed) {
- checked = true;
- } else {
- int index = 0;
- TreeItem[] items = item.getItems();
- while (index < items.length) {
- TreeItem child = items[index];
- if (child.getGrayed() || checked != child.getChecked()) {
- checked = grayed = true;
- break;
- }
- index++;
- }
- }
- item.setChecked(checked);
- item.setGrayed(grayed);
- updateGenAttribute(item);
- checkPath(item.getParentItem(), checked, grayed);
+ if (item == null) return;
+ if (grayed) {
+ checked = true;
+ } else {
+ int index = 0;
+ TreeItem[] items = item.getItems();
+ while (index < items.length) {
+ TreeItem child = items[index];
+ if (child.getGrayed() || checked != child.getChecked()) {
+ checked = grayed = true;
+ break;
+ }
+ index++;
+ }
+ }
+ item.setChecked(checked);
+ item.setGrayed(grayed);
+ updateGenAttribute(item);
+ checkPath(item.getParentItem(), checked, grayed);
}
void checkItem(Node node, TreeItem item) {
@@ -124,37 +123,36 @@ public class MacGeneratorUI {
addChild(childNodes.item(i), item);
}
/* Figure out categories state */
- TreeItem[] items = item.getItems();
- for (int i = 0; i < items.length; i++) {
- TreeItem[] children = items[i].getItems();
+ for (TreeItem child : item.getItems()) {
+ TreeItem[] children = child.getItems();
int checkedCount = 0;
- for (int j = 0; j < children.length; j++) {
- if (children[j].getChecked()) checkedCount++;
- if (children[j].getGrayed()) break;
+ for (TreeItem element : children) {
+ if (element.getChecked()) checkedCount++;
+ if (element.getGrayed()) break;
}
- items[i].setChecked(checkedCount != 0);
- items[i].setGrayed(checkedCount != children.length);
+ child.setChecked(checkedCount != 0);
+ child.setGrayed(checkedCount != children.length);
}
}
}
void checkItems(TreeItem item, boolean checked) {
- item.setGrayed(false);
- item.setChecked(checked);
- updateGenAttribute(item);
- TreeItem[] items = item.getItems();
- if (items.length == 1 && items[0].getData() == null) {
- /* Update model only if view is not created */
+ item.setGrayed(false);
+ item.setChecked(checked);
+ updateGenAttribute(item);
+ TreeItem[] items = item.getItems();
+ if (items.length == 1 && items[0].getData() == null) {
+ /* Update model only if view is not created */
Node node = (Node)item.getData();
NodeList childNodes = node.getChildNodes();
for (int i = 0, length = childNodes.getLength(); i < length; i++) {
checkNodes(childNodes.item(i), checked);
}
- } else {
- for (int i = 0; i < items.length; i++) {
- checkItems(items[i], checked);
- }
- }
+ } else {
+ for (TreeItem item2 : items) {
+ checkItems(item2, checked);
+ }
+ }
}
void checkNodes(Node node, boolean checked) {
@@ -209,9 +207,9 @@ public class MacGeneratorUI {
}
boolean checked = item.getChecked();
item.getParent().setRedraw(false);
- checkItems(item, checked);
- checkPath(item.getParentItem(), checked, false);
- item.getParent().setRedraw(true);
+ checkItems(item, checked);
+ checkPath(item.getParentItem(), checked, false);
+ item.getParent().setRedraw(true);
});
nodesTree.addListener(SWT.Expand, event -> checkChildren((TreeItem)event.item));
@@ -403,13 +401,13 @@ public class MacGeneratorUI {
}
Document[] documents = gen.getDocuments();
if (node == null && documents.length > 0) {
- int index = 0;
- while (index < documents.length && (node = documents[index]) == null) index++;
+ int index = 0;
+ while (index < documents.length && (node = documents[index]) == null) index++;
}
if (flatNodes == null) {
flatNodes = new ArrayList<>();
- for (int i = 0; i < documents.length; i++) {
- if (documents[i] != null) addNodes(documents[i], flatNodes);
+ for (Document document : documents) {
+ if (document != null) addNodes(document, flatNodes);
}
}
int index = 0;
@@ -459,13 +457,12 @@ public class MacGeneratorUI {
}
TreeItem findItem(TreeItem[] items, Node node) {
- for (int i = 0; i < items.length; i++) {
- TreeItem item = items[i];
+ for (TreeItem item : items) {
checkChildren(item);
if (item.getData() == node) return item;
}
- for (int i = 0; i < items.length; i++) {
- TreeItem child = findItem(items[i].getItems(), node);
+ for (TreeItem item : items) {
+ TreeItem child = findItem(item.getItems(), node);
if (child != null) return child;
}
return null;
@@ -486,10 +483,9 @@ public class MacGeneratorUI {
if (!(item.getData() instanceof Node)) return;
Node node = (Node)item.getData();
NamedNodeMap attributes = node.getAttributes();
- String[] extraAttribs = gen.getExtraAttributeNames(node);
- for (int i = 0; i < extraAttribs.length; i++) {
+ for (String extraAttrib : gen.getExtraAttributeNames(node)) {
TableItem attribItem = new TableItem(attribTable, SWT.NONE);
- String attribName = extraAttribs[i];
+ String attribName = extraAttrib;
if (!SHOW_SWT_PREFIX && attribName.startsWith("swt_")) {
attribName = attribName.substring("swt_".length(), attribName.length());
attribItem.setData("swt_", "swt_");
@@ -497,7 +493,7 @@ public class MacGeneratorUI {
attribItem.setText(attribName);
attribItem.setData(node);
attribItem.setForeground(item.getDisplay().getSystemColor(SWT.COLOR_BLUE));
- Node attrib = attributes.getNamedItem(extraAttribs[i]);
+ Node attrib = attributes.getNamedItem(extraAttrib);
if (attrib != null) {
attribItem.setText(1, attrib.getNodeValue());
}
@@ -553,9 +549,8 @@ public class MacGeneratorUI {
checkItem(node, item);
new TreeItem(item, SWT.NONE);
}
- TreeColumn[] columns = nodesTree.getColumns();
- for (int i = 0; i < columns.length; i++) {
- columns[i].pack();
+ for (TreeColumn column : nodesTree.getColumns()) {
+ column.pack();
}
}
@@ -564,10 +559,10 @@ public class MacGeneratorUI {
gen.setXmls(null);
flatNodes = null;
nodesTree.getDisplay().asyncExec(() -> {
- if (nodesTree == null || nodesTree.isDisposed()) return;
- nodesTree.removeAll();
- attribTable.removeAll();
- updateNodes();
+ if (nodesTree == null || nodesTree.isDisposed()) return;
+ nodesTree.removeAll();
+ attribTable.removeAll();
+ updateNodes();
});
}
diff --git a/bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java b/bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java
index 460581a89b..99030a4640 100644
--- a/bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java
+++ b/bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java
@@ -112,16 +112,14 @@ void dump(String className, NativeFunction[] funcs, PrintStream ps) {
if (funcs == null) return;
Arrays.sort(funcs);
int total = 0;
- for (int i = 0; i < funcs.length; i++) {
- NativeFunction func = funcs[i];
+ for (NativeFunction func : funcs) {
total += func.getCallCount();
}
ps.print(className);
ps.print("=");
ps.print(total);
ps.println();
- for (int i = 0; i < funcs.length; i++) {
- NativeFunction func = funcs[i];
+ for (NativeFunction func : funcs) {
if (func.getCallCount() > 0) {
ps.print("\t");
ps.print(func.getName());
@@ -138,8 +136,7 @@ public void reset() {
public Map<String, NativeFunction[]> snapshot() {
Map<String, NativeFunction[]> snapshot = new HashMap<>();
- for (int i = 0; i < classes.length; i++) {
- String className = classes[i];
+ for (String className : classes) {
snapshot(className, snapshot);
}
return snapshot;
diff --git a/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup b/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup
index 3b7f4f2914..e89ab35a27 100644
--- a/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup
+++ b/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup
@@ -161,7 +161,8 @@
</targlet>
</setupTask>
<setupTask
- xsi:type="setup.workingsets:WorkingSetTask">
+ xsi:type="setup.workingsets:WorkingSetTask"
+ id="workingsets.platform.swt">
<workingSet
name="SWT Tools">
<predicate
@@ -207,7 +208,7 @@
project="org.eclipse.swt"/>
<operand
xsi:type="workingsets:ExclusionPredicate"
- excludedWorkingSet="//@setupTasks.7/@workingSets.2 //@setupTasks.7/@workingSets.1 //@setupTasks.7/@workingSets.0"/>
+ excludedWorkingSet="//'workingsets.platform.swt'/@workingSets[name='SWT%20Examples'] //'workingsets.platform.swt'/@workingSets[name='SWT%20Tests'] //'workingsets.platform.swt'/@workingSets[name='SWT%20Tools']"/>
</predicate>
</workingSet>
<workingSet
diff --git a/bundles/org.eclipse.swt.tools/forceQualifierUpdate.txt b/bundles/org.eclipse.swt.tools/forceQualifierUpdate.txt
index fb95a44f54..731813467f 100644
--- a/bundles/org.eclipse.swt.tools/forceQualifierUpdate.txt
+++ b/bundles/org.eclipse.swt.tools/forceQualifierUpdate.txt
@@ -1,2 +1,3 @@
Bug 510973 - Missing source bundle for org.eclipse.swt.tools
-Bug 534597 - Unanticipated comparator errors in I20180511-2000 \ No newline at end of file
+Bug 534597 - Unanticipated comparator errors in I20180511-2000
+Bug 572789 - Comparator errors in I20210412-1800 after moving to compiler from 4.20 M1 \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.tools/gtk/install_sysdeps.sh b/bundles/org.eclipse.swt.tools/gtk/install_sysdeps.sh
index 0b9fb087ca..8af70943f8 100755
--- a/bundles/org.eclipse.swt.tools/gtk/install_sysdeps.sh
+++ b/bundles/org.eclipse.swt.tools/gtk/install_sysdeps.sh
@@ -36,8 +36,8 @@ func_configure_fedora () {
set -x
sudo $INSTALL_CMD -y groups install "C Development Tools and Libraries"
- func_echo_plus "Installing Java 8 development packages that include jni.h for JNI bindings. Update this script to '9' when java 9 comes out"
- sudo $INSTALL_CMD -y install java-1.8.0-openjdk-devel.x86_64
+ func_echo_plus "Installing Java 11 development packages that include jni.h for JNI bindings."
+ sudo $INSTALL_CMD -y install java-11-openjdk-devel.x86_64
func_echo_plus "Installing Gtk3 development packages"
sudo $INSTALL_CMD -y install gtk3-devel
diff --git a/bundles/org.eclipse.swt.tools/plugin.properties b/bundles/org.eclipse.swt.tools/plugin.properties
index ebc363db1d..feb5be16e2 100644
--- a/bundles/org.eclipse.swt.tools/plugin.properties
+++ b/bundles/org.eclipse.swt.tools/plugin.properties
@@ -17,4 +17,3 @@ macViewName = Mac Generator
spyViewName = SWT Spy
sleakViewName = Sleak
jniBuilderName = JNI Builder
-enableCheck64Name = Report 32/64-bit Problems
diff --git a/bundles/org.eclipse.swt.tools/plugin.xml b/bundles/org.eclipse.swt.tools/plugin.xml
index f3393759e6..cc6cd0b9df 100644
--- a/bundles/org.eclipse.swt.tools/plugin.xml
+++ b/bundles/org.eclipse.swt.tools/plugin.xml
@@ -29,36 +29,4 @@
</builder>
</extension>
- <extension
- point="org.eclipse.jdt.core.compilationParticipant">
- <compilationParticipant
- class="org.eclipse.swt.tools.builders.Check64CompilationParticipant"
- id="org.eclipse.swt.tools.Check64CompilationParticipant">
- </compilationParticipant>
- </extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.jdt.core.IJavaProject"
- id="org.eclipse.swt.tools.contribution">
- <menu
- label="%pluginName"
- path="additions"
- id="org.eclipse.swt.tools.menu">
- <separator
- name="group1">
- </separator>
- </menu>
- <action
- label="%enableCheck64Name"
- class="org.eclipse.swt.tools.builders.Check64EnableAction"
- menubarPath="org.eclipse.swt.tools.menu/group1"
- style="toggle"
- enablesFor="1"
- id="org.eclipse.swt.tools.check64EnableAction">
- </action>
- </objectContribution>
- </extension>
-
</plugin>
diff --git a/bundles/org.eclipse.swt.tools/pom.xml b/bundles/org.eclipse.swt.tools/pom.xml
index 1f4aa876a0..93a15ed588 100644
--- a/bundles/org.eclipse.swt.tools/pom.xml
+++ b/bundles/org.eclipse.swt.tools/pom.xml
@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.swt.localbuild</artifactId>
<groupId>eclipse.platform.swt</groupId>
- <version>4.12.0-SNAPSHOT</version>
+ <version>4.24.0-SNAPSHOT</version>
<relativePath>../../local-build/local-build-parent/</relativePath>
</parent>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.tools</artifactId>
- <version>3.107.400-SNAPSHOT</version>
+ <version>3.109.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/Activator.java b/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/Activator.java
deleted file mode 100644
index b60bb5b957..0000000000
--- a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/Activator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2016 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools;
-
-import org.eclipse.jface.resource.*;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.*;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.swt.tools";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64CompilationParticipant.java b/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64CompilationParticipant.java
deleted file mode 100644
index da81c110fc..0000000000
--- a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64CompilationParticipant.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2018 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.builders;
-
-import java.io.*;
-import java.util.*;
-
-import javax.xml.parsers.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.core.compiler.*;
-import org.eclipse.jdt.core.compiler.batch.*;
-import org.eclipse.jdt.core.dom.*;
-import org.eclipse.swt.tools.*;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
-public class Check64CompilationParticipant extends CompilationParticipant {
- HashSet<String> sources;
-
- static final char[] INT_LONG = "int /*long*/".toCharArray();
- static final char[] INT_LONG_ARRAY = "int[] /*long[]*/".toCharArray();
- static final char[] FLOAT_DOUBLE = "float /*double*/".toCharArray();
- static final char[] FLOAT_DOUBLE_ARRAY = "float[] /*double[]*/".toCharArray();
- static final char[] LONG_INT = "long /*int*/".toCharArray();
- static final char[] LONG_INT_ARRAY = "long[] /*int[]*/".toCharArray();
- static final char[] DOUBLE_FLOAT = "double /*float*/".toCharArray();
- static final char[] DOUBLE_FLOAT_ARRAY = "double[] /*float[]*/".toCharArray();
- static final String buildDir = "/.build64/";
- static final String pluginDir = "/org.eclipse.swt/";
- static final String plugin = "org.eclipse.swt";
- static final String SOURCE_ID = "JNI";
- static final String CHECK_64_ENABLED = Activator.PLUGIN_ID + "CHECK_64_ENABLED";
-
-static String loadFile (String file) {
- if (file == null) return null;
- try (FileReader fr = new FileReader(file);
- BufferedReader br = new BufferedReader(fr)) {
- StringBuilder str = new StringBuilder();
- char[] buffer = new char[1024];
- int read;
- while ((read = br.read(buffer)) != -1) {
- str.append(buffer, 0, read);
- }
- fr.close();
- return str.toString();
- } catch (IOException e) {
- throw new RuntimeException("File not found:" + file, e);
- }
-}
-
-void build(IJavaProject project, String root) throws CoreException {
- try {
- StringBuilder sourcePath = new StringBuilder(), cp = new StringBuilder();
- IClasspathEntry[] entries = project.getResolvedClasspath(true);
- for (int i = 0; i < entries.length; i++) {
- IClasspathEntry entry = entries[i];
- String path = entry.getPath().toPortableString();
- if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- if (path.startsWith(pluginDir)) {
- if (sourcePath.length() > 0) sourcePath.append(File.pathSeparatorChar);
- String dir = root + path.substring(pluginDir.length());
- sourcePath.append(dir);
- }
- } else {
- if (cp.length() > 0) cp.append(File.pathSeparator);
- cp.append(path);
- }
- }
- String bin = root + "/bin";
- if (cp.length() > 0) cp.append(File.pathSeparator);
- cp.append(bin);
- ArrayList<String> args = new ArrayList<>();
- args.addAll(Arrays.asList(new String[]{
- "-nowarn",
- "-1.8",
-// "-verbose",
- "-d", bin,
- "-cp", cp.toString(),
- "-log", root + "/log.xml",
- "-sourcepath", sourcePath.toString(),
- }));
- args.addAll(sources);
- try (PrintWriter writer = new PrintWriter(new BufferedOutputStream(new FileOutputStream(root + "/out.txt")))) {
- BatchCompiler.compile(args.toArray(new String[args.size()]), writer, writer, null);
- }
- project.getProject().findMember(new Path(buildDir)).refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Problem building 64-bit code", e));
- }
-}
-
-void create(IContainer file) throws CoreException {
- if (file.exists()) return;
- switch (file.getType()) {
- case IResource.FOLDER:
- create(file.getParent());
- ((IFolder)file).create(true, true, null);
- }
-}
-
-IResource getResourceWithoutErrors(IProject proj, String path, boolean deleteJNI) throws CoreException {
- path = path.replaceAll(buildDir, "/");
- String projPath = proj.getLocation().toPortableString();
- if (path.startsWith(projPath)) {
- path = path.substring(projPath.length());
- }
- IResource resource = proj.findMember(new Path(path));
- boolean hasProblems = false;
- IMarker[] markers = resource.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
- for (int m = 0; m < markers.length; m++) {
- IMarker marker = markers[m];
- if (SOURCE_ID.equals(marker.getAttribute(IMarker.SOURCE_ID))) {
- if (deleteJNI) marker.delete();
- } else {
- Object severity = marker.getAttribute(IMarker.SEVERITY);
- hasProblems |= severity != null && ((Integer)severity).intValue() == IMarker.SEVERITY_ERROR;
- }
- }
- return hasProblems ? null : resource;
-}
-
-void createProblem(IResource resource, String message, int start, int end) throws CoreException {
- IMarker marker = resource.createMarker(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);
- int severity = IMarker.SEVERITY_ERROR;
- marker.setAttributes(
- new String[] {IMarker.MESSAGE, IMarker.SEVERITY, IMarker.CHAR_START, IMarker.CHAR_END, IMarker.SOURCE_ID},
- new Object[] {"[32/64] " + message, Integer.valueOf(severity), Integer.valueOf(start), Integer.valueOf(end), SOURCE_ID});
-}
-
-void createProblems(IJavaProject project, String root) throws CoreException {
- try (InputStream is = new BufferedInputStream(new FileInputStream(root + "/log.xml"))) {
- Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(is));
- is.close();
- IProject proj = project.getProject();
- NodeList sources = doc.getDocumentElement().getElementsByTagName("sources");
- for (int i = 0; i < sources.getLength(); i++) {
- NodeList src = ((Element)sources.item(i)).getElementsByTagName("source");
- for (int j = 0; j < src.getLength(); j++) {
- Element source = (Element)src.item(j);
- String path = source.getAttribute("path").replace('\\', '/');
- IResource resource = getResourceWithoutErrors(proj, path, true);
- if (resource != null) {
- NodeList problems = source.getElementsByTagName("problems");
- for (int k = 0; k < problems.getLength(); k++) {
- NodeList problem = ((Element)problems.item(k)).getElementsByTagName("problem");
- for (int l = 0; l < problem.getLength(); l++) {
- Element node = (Element)problem.item(l);
- if (resource != null) {
- int start = Integer.parseInt(node.getAttribute("charStart"));
- int end = Integer.parseInt(node.getAttribute("charEnd"));
- String message = ((Element)node.getElementsByTagName("message").item(0)).getAttribute("value");
- createProblem(resource, message, start, end);
- }
- }
- }
- }
- }
- }
- } catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Problem creating 64-bit problems", e));
- }
-}
-
-String resolvePath(String sourcePath, String simpleName) {
- String basePath = sourcePath.substring(0, sourcePath.lastIndexOf("/"));
- File file = new File(basePath + "/" + simpleName + ".java");
- if (file.exists()) {
- return file.getAbsolutePath();
- }
-// System.out.println("failed=" + simpleName + " " + sourcePath);
- return null;
-}
-
-TypeDeclaration loadType(HashMap<String, TypeDeclaration> cache, String path) {
- if (path == null) return null;
- Object value = cache.get(path);
- if (value != null) return (TypeDeclaration)value;
- ASTParser parser = ASTParser.newParser(AST.JLS8);
- parser.setSource(loadFile(path).toCharArray());
- CompilationUnit unit = (CompilationUnit)parser.createAST(null);
- TypeDeclaration type = (TypeDeclaration)unit.types().get(0);
- cache.put(path, type);
- return type;
-}
-
-boolean is64Type(String type) {
- return type.equals("int") || type.equals("long") || type.equals("float") || type.equals("double") ||
- type.equals("int[]") || type.equals("long[]") || type.equals("float[]") || type.equals("double[]");
-}
-
-void createBadOverwrittenMethodProblems(IJavaProject project) throws CoreException {
- if (sources == null) return;
- IProject proj = project.getProject();
- HashMap<String, TypeDeclaration> cache = new HashMap<>();
- for (String path: sources) {
- IResource resource = getResourceWithoutErrors(proj, path, false);
- if (resource == null) continue;
- TypeDeclaration type = loadType(cache, path);
- MethodDeclaration[] methods = type.getMethods();
- List<TypeDeclaration> superclasses = new ArrayList<>();
- TypeDeclaration temp = type;
- while (true) {
- Type supertype = temp.getSuperclassType();
- if (supertype == null) break;
- TypeDeclaration stype = loadType(cache, resolvePath(path, supertype.toString()));
- if (stype == null) break;
- superclasses.add(stype);
- temp = stype;
- }
- for (int i = 0; i < methods.length; i++) {
- MethodDeclaration method = methods[i];
- for (TypeDeclaration supertype : superclasses) {
- MethodDeclaration[] supermethods = supertype.getMethods();
- for (int j = 0; j < supermethods.length; j++) {
- MethodDeclaration supermethod = supermethods[j];
- if (method.getName().getIdentifier().equals(supermethod.getName().getIdentifier()) && method.parameters().size() == supermethod.parameters().size()) {
- List<SingleVariableDeclaration> mParams = method.parameters();
- List<SingleVariableDeclaration> sParams = supermethod.parameters();
- for (int k=0; k<sParams.size(); k++) {
- SingleVariableDeclaration p1 = mParams.get(k);
- SingleVariableDeclaration p2 = sParams.get(k);
- String r1 = p1.getType().toString();
- String r2 = p2.getType().toString();
- if (is64Type(r1) && is64Type(r2)) {
- if (!r1.equals(r2) && p1.getName().getIdentifier().equals(p2.getName().getIdentifier())) {
- String message = "\"" + p1.getName().getIdentifier() + "\" parameter type does not match super declaration";
- createProblem(resource, message, p1.getStartPosition(), p1.getStartPosition() + p1.toString().length());
- }
- }
- }
- }
- }
- }
- }
- }
-}
-
-boolean replace(char[] source, char[] src, char[] dest) {
- boolean changed = false;
- int start = 0;
- while (start < source.length) {
- int index = CharOperation.indexOf(src, source, true, start);
- if (index == -1) break;
- changed |= true;
- System.arraycopy(dest, 0, source, index, dest.length);
- start = index + 1;
- }
- return changed;
-}
-
-boolean replace(char[] source) {
- boolean changed = false;
- changed |= replace(source, LONG_INT, INT_LONG);
- changed |= replace(source, LONG_INT_ARRAY, INT_LONG_ARRAY);
- changed |= replace(source, DOUBLE_FLOAT, FLOAT_DOUBLE);
- changed |= replace(source, DOUBLE_FLOAT_ARRAY, FLOAT_DOUBLE_ARRAY);
- if (!changed) {
- changed |= replace(source, INT_LONG, LONG_INT);
- changed |= replace(source, INT_LONG_ARRAY, LONG_INT_ARRAY);
- changed |= replace(source, FLOAT_DOUBLE, DOUBLE_FLOAT);
- changed |= replace(source, FLOAT_DOUBLE_ARRAY, DOUBLE_FLOAT_ARRAY);
- }
- return changed;
-}
-
-public static boolean getEnabled() {
- return Activator.getDefault().getPreferenceStore().getBoolean(CHECK_64_ENABLED);
-}
-
-public static void setEnabled(boolean enabled) {
- Activator.getDefault().getPreferenceStore().setValue(CHECK_64_ENABLED, enabled);
-}
-
-boolean is64bit(IJavaProject project) {
- try {
- IClasspathEntry[] entries = project.getResolvedClasspath(true);
- for (int i = 0; i < entries.length; i++) {
- IClasspathEntry entry = entries[i];
- if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- String path = entry.getPath().toPortableString();
- if (path.equals(pluginDir + "Eclipse SWT PI/win32") ||
- path.equals(pluginDir + "Eclipse SWT PI/cocoa") ||
- path.equals(pluginDir + "Eclipse SWT PI/gtk")
- )
- {
- return true;
- }
- }
- }
- } catch (JavaModelException e) {}
- return false;
-}
-
-@Override
-public void buildFinished(IJavaProject project) {
- try {
- if (sources == null) return;
- if (!getEnabled() || !is64bit(project)) return;
-// long time = System.currentTimeMillis();
- String root = project.getProject().getLocation().toPortableString() + buildDir;
- build(project, root);
- createProblems(project, root);
- createBadOverwrittenMethodProblems(project);
- sources = null;
-// System.out.println("compiling time=" + (System.currentTimeMillis() - time));
- } catch (Exception e) {
- e.printStackTrace();
- }
-}
-
-@Override
-public void buildStarting(BuildContext[] files, boolean isBatch) {
- if (sources == null) sources = new HashSet<>();
-// long time = System.currentTimeMillis();
- for (int i = 0; i < files.length; i++) {
- BuildContext context = files[i];
- IFile file = context.getFile();
- IProject project = file.getProject();
- Path path = new Path(buildDir + file.getProjectRelativePath().toPortableString());
- IFile newFile = project.getFile(path);
- sources.add(newFile.getLocation().toPortableString());
- try {
- if (newFile.exists()) {
- newFile.delete(true, null);
- }
- create(newFile.getParent());
- char[] source = context.getContents();
- replace(source);
- newFile.create(new ByteArrayInputStream(new String(source).getBytes()), true, null);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-// System.out.println("copying time=" + (System.currentTimeMillis() - time));
-}
-
-@Override
-public void cleanStarting(IJavaProject project) {
- if (!isActive(project)) return;
- sources = null;
- IResource resource = project.getProject().findMember(new Path(buildDir));
- if (resource != null) {
- try {
- resource.delete(true, null);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-}
-
-@Override
-public boolean isActive(IJavaProject project) {
- if (project.getProject().getName().equals(plugin)) {
- return true;
- }
- return super.isActive(project);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64EnableAction.java b/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64EnableAction.java
deleted file mode 100644
index 68e3e79b13..0000000000
--- a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64EnableAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.builders;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.ui.*;
-
-public class Check64EnableAction implements IObjectActionDelegate {
-
- public Check64EnableAction() {
- super();
- }
-
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- action.setChecked(Check64CompilationParticipant.getEnabled());
- }
-
- @Override
- public void run(IAction action) {
- Check64CompilationParticipant.setEnabled(action.isChecked());
- }
-
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
-}
diff --git a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java b/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java
index 13bc360ad8..5fc2971108 100644
--- a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java
+++ b/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java
@@ -68,8 +68,7 @@ public class JNIBuilder extends IncrementalProjectBuilder {
return true;
});
final IWorkspaceRoot root = getProject().getWorkspace().getRoot();
- for (int i = 0; i < classes.length; i++) {
- MainClass mainClass = classes[i];
+ for (MainClass mainClass : classes) {
if (mainClass.build) {
mainClass.build = false;
IResource library = root.findMember(mainClass.outputDir);
diff --git a/bundles/org.eclipse.swt/.classpath_cocoa b/bundles/org.eclipse.swt/.classpath_cocoa
index d388d8c435..439cf94f2c 100644
--- a/bundles/org.eclipse.swt/.classpath_cocoa
+++ b/bundles/org.eclipse.swt/.classpath_cocoa
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="src" path="Eclipse SWT/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT/common"/>
- <classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
diff --git a/bundles/org.eclipse.swt/.classpath_gtk b/bundles/org.eclipse.swt/.classpath_gtk
index 1fba334138..3b2003fb80 100644
--- a/bundles/org.eclipse.swt/.classpath_gtk
+++ b/bundles/org.eclipse.swt/.classpath_gtk
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="src" path="Eclipse SWT/gtk"/>
<classpathentry kind="src" path="Eclipse SWT/cairo"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
<classpathentry kind="src" path="Eclipse SWT/common"/>
- <classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
<classpathentry kind="src" path="Eclipse SWT PI/gtk">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="org.eclipse.swt.gtk.linux.x86_64"/>
diff --git a/bundles/org.eclipse.swt/.classpath_gtk_win32 b/bundles/org.eclipse.swt/.classpath_gtk_win32
index b1551b2e74..002c75f81b 100644
--- a/bundles/org.eclipse.swt/.classpath_gtk_win32
+++ b/bundles/org.eclipse.swt/.classpath_gtk_win32
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="src" path="Eclipse SWT/gtk"/>
<classpathentry kind="src" path="Eclipse SWT/cairo"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
<classpathentry kind="src" path="Eclipse SWT/common"/>
- <classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
<classpathentry kind="src" path="Eclipse SWT PI/gtk">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="org.eclipse.swt.gtk.win32.x86_64"/>
diff --git a/bundles/org.eclipse.swt/.classpath_win32 b/bundles/org.eclipse.swt/.classpath_win32
index 5e763c9533..8d59b73c37 100644
--- a/bundles/org.eclipse.swt/.classpath_win32
+++ b/bundles/org.eclipse.swt/.classpath_win32
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="src" path="Eclipse SWT/win32"/>
<classpathentry kind="src" path="Eclipse SWT/common"/>
- <classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
<classpathentry kind="src" path="Eclipse SWT PI/common"/>
<classpathentry kind="src" path="Eclipse SWT PI/win32">
<attributes>
@@ -24,7 +23,6 @@
<classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/>
<classpathentry kind="src" path="Eclipse SWT Browser/common"/>
<classpathentry kind="src" path="Eclipse SWT Browser/win32"/>
- <classpathentry kind="src" path="Eclipse SWT WebKit/win32"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/win32"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/common"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.swt/.settings/.api_filters b/bundles/org.eclipse.swt/.settings/.api_filters
index c54e3ad0d8..715f2c1742 100644
--- a/bundles/org.eclipse.swt/.settings/.api_filters
+++ b/bundles/org.eclipse.swt/.settings/.api_filters
@@ -464,28 +464,4 @@
</message_arguments>
</filter>
</resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.swt.custom.TableTree">
- <filter comment="Bug 475833 - Delete TableTree and related items" id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.swt.custom.TableTree"/>
- <message_argument value="org.eclipse.swt_3.110.100"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.swt.custom.TableTreeEditor">
- <filter comment="Bug 475833 - Delete TableTree and related items" id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.swt.custom.TableTreeEditor"/>
- <message_argument value="org.eclipse.swt_3.110.100"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.swt.custom.TableTreeItem">
- <filter comment="Bug 475833 - Delete TableTree and related items" id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.swt.custom.TableTreeItem"/>
- <message_argument value="org.eclipse.swt_3.110.100"/>
- </message_arguments>
- </filter>
- </resource>
</component>
diff --git a/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.core.prefs
index f0ce081d8a..fdbcf002fa 100644
--- a/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.core.prefs
@@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -27,6 +27,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -85,6 +86,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -120,4 +122,5 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs
index dc92561f1e..f49cccd431 100644
--- a/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs
@@ -1,64 +1,64 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=1
-org.eclipse.jdt.ui.staticondemandthreshold=3
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_functional_interfaces=true
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.insert_inferred_type_arguments=false
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_redundant_type_arguments=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_anonymous_class_creation=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_lambda=true
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-sp_cleanup.use_type_arguments=false
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=1
+org.eclipse.jdt.ui.staticondemandthreshold=3
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=true
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
diff --git a/bundles/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs b/bundles/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs
index 27d508cbad..dfc542e6e4 100644
--- a/bundles/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs
+++ b/bundles/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs
@@ -89,14 +89,14 @@ TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=Enabled
+automatically_removed_unused_problem_filters=Disabled
changed_execution_env=Error
eclipse.preferences.version=1
incompatible_api_component_version=Error
incompatible_api_component_version_include_major_without_breaking_change=Disabled
incompatible_api_component_version_include_minor_without_api_change=Disabled
-incompatible_api_component_version_report_major_without_breaking_change=Warning
-incompatible_api_component_version_report_minor_without_api_change=Warning
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
invalid_since_tag_version=Error
malformed_since_tag=Error
missing_since_tag=Error
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c
index be05c66c7e..7a02052021 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c
@@ -16,57 +16,11 @@
#include "swt.h"
#include "jawt_md.h"
-#ifdef __OBJC__
-#import <AppKit/NSView.h>
-#endif
-
#define SWT_AWT_NATIVE(func) Java_org_eclipse_swt_awt_SWT_1AWT_##func
-/*
- * JAWT version 1.7 does not define the type JAWT_MacOSXDrawingSurfaceInfo.
- */
-#ifdef JAWT_VERSION_1_7
-// Legacy NSView-based rendering
-typedef struct JAWT_MacOSXDrawingSurfaceInfo {
- NSView *cocoaViewRef; // the view is guaranteed to be valid only for the duration of Component.paint method
-}
-JAWT_MacOSXDrawingSurfaceInfo;
-#endif /* #ifdef JAWT_VERSION_1_7 */
-
-
-#ifndef NO_getAWTHandle
-JNIEXPORT jintLong JNICALL SWT_AWT_NATIVE(getAWTHandle)
- (JNIEnv *env, jclass that, jobject canvas)
-{
- jintLong result = 0;
- JAWT awt;
- JAWT_DrawingSurface* ds;
- JAWT_DrawingSurfaceInfo* dsi;
- JAWT_MacOSXDrawingSurfaceInfo* dsi_cocoa;
- jint lock;
-
- awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER;
- if (JAWT_GetAWT(env, &awt) != 0) {
- ds = awt.GetDrawingSurface(env, canvas);
- if (ds != NULL) {
- lock = ds->Lock(ds);
- if ((lock & JAWT_LOCK_ERROR) == 0) {
- dsi = ds->GetDrawingSurfaceInfo(ds);
- dsi_cocoa = (JAWT_MacOSXDrawingSurfaceInfo*)dsi->platformInfo;
- result = (jintLong)dsi_cocoa->cocoaViewRef;
- ds->FreeDrawingSurfaceInfo(dsi);
- ds->Unlock(ds);
- }
- }
- awt.FreeDrawingSurface(ds);
- }
- return result;
-}
-#endif
-
#ifndef NO_initFrame
JNIEXPORT jobject JNICALL Java_org_eclipse_swt_awt_SWT_1AWT_initFrame
- (JNIEnv *env, jclass that, jintLong handle, const char *className)
+ (JNIEnv *env, jclass that, jlong handle, const char *className)
{
jobject object;
jmethodID constructor;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java
index b9f69a5938..6c474f7e4b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java
@@ -58,8 +58,7 @@ public class SWT_AWT {
static boolean loaded, swingInitialized;
- static native final long /*int*/ getAWTHandle (Canvas canvas);
- static native final Object initFrame (long /*int*/ handle, String className);
+ static native final Object initFrame (long handle, String className);
static native final void validateWithBounds (Frame frame, int x, int y, int w, int h);
static native final void synthesizeWindowActivation (Frame frame, boolean doActivate);
@@ -67,15 +66,6 @@ public class SWT_AWT {
if (loaded) return;
loaded = true;
Toolkit.getDefaultToolkit();
- /*
- * Note that the jawt library is loaded explicitly
- * because it cannot be found by the library loader.
- * All exceptions are caught because the library may
- * have been loaded already.
- */
- try {
- System.loadLibrary("jawt");
- } catch (Throwable e) {}
Library.loadLibrary("swt-awt");
}
@@ -137,7 +127,7 @@ public static Frame new_Frame(final Composite parent) {
if ((parent.getStyle() & SWT.EMBEDDED) == 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- final long /*int*/ handle = parent.view.id;
+ final long handle = parent.view.id;
final String className = embeddedFrameClass != null ? embeddedFrameClass : JDK17_FRAME;
try {
if (embeddedFrameClass != null) {
@@ -311,30 +301,8 @@ public static Frame new_Frame(final Composite parent) {
public static Shell new_Shell(final Display display, final Canvas parent) {
if (display == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- long /*int*/ handle = 0;
-
- try {
- loadLibrary ();
- handle = getAWTHandle (parent);
- } catch (Throwable e) {
- SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);
- }
- if (handle == 0) SWT.error (SWT.ERROR_INVALID_ARGUMENT, null, " [peer not created]");
-
- final Shell shell = Shell.cocoa_new (display, handle);
- final ComponentListener listener = new ComponentAdapter () {
- @Override
- public void componentResized (ComponentEvent e) {
- display.asyncExec (() -> {
- if (shell.isDisposed()) return;
- Dimension dim = parent.getSize ();
- shell.setSize (dim.width, dim.height);
- });
- }
- };
- parent.addComponentListener(listener);
- shell.addListener(SWT.Dispose, event -> parent.removeComponentListener(listener));
- shell.setVisible (true);
- return shell;
+ // Since Java 7, AWT widgets don't have a backing NSView, making embedding impossible
+ SWT.error(SWT.ERROR_NOT_IMPLEMENTED, null, "[Embedding SWT in AWT isn't supported on macOS]");
+ return null;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/library/swt_awt.c b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/library/swt_awt.c
index 42ead53dd5..47ea741f47 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/library/swt_awt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/library/swt_awt.c
@@ -18,14 +18,14 @@
#define SWT_AWT_NATIVE(func) Java_org_eclipse_swt_awt_SWT_1AWT_##func
#ifndef NO_getAWTHandle
-JNIEXPORT jintLong JNICALL SWT_AWT_NATIVE(getAWTHandle)
+JNIEXPORT jlong JNICALL SWT_AWT_NATIVE(getAWTHandle)
(JNIEnv *env, jclass that, jobject canvas)
{
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo* dsi;
JAWT_X11DrawingSurfaceInfo* dsi_x11;
- jintLong result = 0;
+ jlong result = 0;
jint lock;
awt.version = JAWT_VERSION_1_3;
@@ -36,7 +36,7 @@ JNIEXPORT jintLong JNICALL SWT_AWT_NATIVE(getAWTHandle)
if ((lock & JAWT_LOCK_ERROR) == 0) {
dsi = ds->GetDrawingSurfaceInfo(ds);
dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;
- result = (jintLong)dsi_x11->drawable;
+ result = (jlong)dsi_x11->drawable;
ds->FreeDrawingSurfaceInfo(dsi);
ds->Unlock(ds);
}
@@ -77,15 +77,15 @@ JNIEXPORT void JNICALL SWT_AWT_NATIVE(setDebug)
#ifndef NO_initFrame
JNIEXPORT jobject JNICALL Java_org_eclipse_swt_awt_SWT_1AWT_initFrame
- (JNIEnv *env, jclass that, jintLong handle)
+ (JNIEnv *env, jclass that, jlong handle)
{
jobject object;
jmethodID constructor;
jclass cls = (*env)->FindClass(env, "sun/awt/X11/XEmbeddedFrame");
if (NULL == cls) return NULL;
- constructor = (*env)->GetMethodID(env, cls, "<init>", "(J)V");
- object = (*env)->NewObject(env, cls, constructor, handle);
+ constructor = (*env)->GetMethodID(env, cls, "<init>", "(JZ)V");
+ object = (*env)->NewObject(env, cls, constructor, handle, JNI_TRUE);
return object;
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
index a23412d396..a633717837 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
@@ -26,6 +26,8 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.widgets.Composite;
@@ -188,7 +190,14 @@ public static Frame new_Frame (final Composite parent) {
Shell shell = parent.getShell();
long awtHandle = getAWTHandle(window);
if (awtHandle == 0) return;
- long xWindow = GDK.gdk_x11_window_get_xid (GTK.gtk_widget_get_window (GTK.gtk_widget_get_toplevel (shell.handle)));
+
+ long xWindow;
+ if (GTK.GTK4) {
+ xWindow = GDK.gdk_x11_surface_get_xid(GTK4.gtk_native_get_surface (GTK4.gtk_widget_get_native(shell.handle)));
+ } else {
+ xWindow = GDK.gdk_x11_window_get_xid (GTK3.gtk_widget_get_window (GTK3.gtk_widget_get_toplevel (shell.handle)));
+ }
+
OS.XSetTransientForHint(GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()), awtHandle, xWindow);
});
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c
index 98aff60d36..736a131bac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c
@@ -18,14 +18,14 @@
#define SWT_AWT_NATIVE(func) Java_org_eclipse_swt_awt_SWT_1AWT_##func
#ifndef NO_getAWTHandle
-JNIEXPORT jintLong JNICALL SWT_AWT_NATIVE(getAWTHandle)
+JNIEXPORT jlong JNICALL SWT_AWT_NATIVE(getAWTHandle)
(JNIEnv *env, jclass that, jobject canvas)
{
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo* dsi;
JAWT_Win32DrawingSurfaceInfo* dsi_win;
- jintLong result = 0;
+ jlong result = 0;
jint lock;
awt.version = JAWT_VERSION_1_3;
@@ -36,7 +36,7 @@ JNIEXPORT jintLong JNICALL SWT_AWT_NATIVE(getAWTHandle)
if ((lock & JAWT_LOCK_ERROR) == 0) {
dsi = ds->GetDrawingSurfaceInfo(ds);
dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
- result = (jintLong)dsi_win->hwnd;
+ result = (jlong)dsi_win->hwnd;
ds->FreeDrawingSurfaceInfo(dsi);
ds->Unlock(ds);
}
@@ -49,7 +49,7 @@ JNIEXPORT jintLong JNICALL SWT_AWT_NATIVE(getAWTHandle)
#ifndef NO_initFrame
JNIEXPORT jobject JNICALL SWT_AWT_NATIVE(initFrame)
- (JNIEnv *env, jclass that, jintLong handle, jstring className)
+ (JNIEnv *env, jclass that, jlong handle, jstring className)
{
jobject object;
jmethodID constructor;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
index c462668d12..0d79248977 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
@@ -53,8 +53,8 @@ public class SWT_AWT {
static boolean loaded, swingInitialized;
-static native final long /*int*/ getAWTHandle (Canvas canvas);
-static native final Object initFrame (long /*int*/ handle, String className);
+static native final long getAWTHandle (Canvas canvas);
+static native final Object initFrame (long handle, String className);
static native final void synthesizeWindowActivation (Frame frame, boolean doActivate);
static synchronized void loadLibrary () {
@@ -131,7 +131,7 @@ public static Frame new_Frame (final Composite parent) {
if ((parent.getStyle () & SWT.EMBEDDED) == 0) {
SWT.error (SWT.ERROR_INVALID_ARGUMENT);
}
- final long /*int*/ handle = parent.handle;
+ final long handle = parent.handle;
final Frame[] result = new Frame[1];
final Throwable[] exception = new Throwable[1];
Runnable runnable = () -> {
@@ -233,21 +233,13 @@ public static Frame new_Frame (final Composite parent) {
case SWT.Activate:
EventQueue.invokeLater(() -> {
if (frame.isActive()) return;
- try {
- Class<?> clazz = frame.getClass();
- Method method = clazz.getMethod("synthesizeWindowActivation", boolean.class);
- if (method != null) method.invoke(frame, Boolean.TRUE);
- } catch (Throwable e1) {}
+ synthesizeWindowActivation(frame, true);
});
break;
case SWT.Deactivate:
EventQueue.invokeLater(() -> {
if (!frame.isActive()) return;
- try {
- Class<?> clazz = frame.getClass();
- Method method = clazz.getMethod("synthesizeWindowActivation", boolean.class);
- if (method != null) method.invoke(frame, Boolean.FALSE);
- } catch (Throwable e1) {}
+ synthesizeWindowActivation(frame, false);
});
break;
}
@@ -286,7 +278,7 @@ public static Frame new_Frame (final Composite parent) {
public static Shell new_Shell (final Display display, final Canvas parent) {
if (display == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- long /*int*/ handle = 0;
+ long handle = 0;
try {
loadLibrary ();
handle = getAWTHandle (parent);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
index 90b50e32d1..24785ba85d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
@@ -150,7 +150,7 @@ public class Accessible {
if (accessible.delegate != null) return accessible.delegate;
if (accessible.control != null) {
NSView view = accessible.control.view;
- long /*int*/ handle = OS.objc_msgSend(view.id, OS.sel_accessibleHandle);
+ long handle = OS.objc_msgSend(view.id, OS.sel_accessibleHandle);
return new id(handle);
}
return null;
@@ -298,10 +298,10 @@ public class Accessible {
* @since 3.7
*/
public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners == null) accessibleEditableTextListeners = new ArrayList<>();
- accessibleEditableTextListeners.add(listener);
+ accessibleEditableTextListeners.add(listener);
}
/**
@@ -444,12 +444,12 @@ public class Accessible {
accessibleAttributeListeners.add(listener);
}
- void addCGColor(double /*float*/ [] comps, NSMutableAttributedString inAttribString, NSString inAttribute, NSRange inRange) {
- long /*int*/ cgColorSpace = OS.CGColorSpaceCreateDeviceRGB();
- long /*int*/ cgColor = OS.CGColorCreate(cgColorSpace, comps);
+ void addCGColor(double [] comps, NSMutableAttributedString inAttribString, NSString inAttribute, NSRange inRange) {
+ long cgColorSpace = OS.CGColorSpaceCreateDeviceRGB();
+ long cgColor = OS.CGColorCreate(cgColorSpace, comps);
OS.CGColorSpaceRelease(cgColorSpace);
inAttribString.addAttribute(inAttribute, new id(cgColor), inRange);
- OS.CGColorRelease(cgColor);
+ OS.CGColorRelease(cgColor);
}
/**
@@ -1268,8 +1268,8 @@ public class Accessible {
if (attribute.isEqualToString(OS.NSAccessibilityHeaderAttribute)) return getHeaderAttribute(childID);
if (attribute.isEqualToString(OS.NSAccessibilityIndexAttribute)) return getIndexAttribute(childID);
if (attribute.isEqualToString(OS.NSAccessibilitySelectedAttribute)) return getSelectedAttribute(childID);
- if (OS.VERSION >= 0x1060 && attribute.isEqualToString(OS.NSAccessibilityRowIndexRangeAttribute)) return getRowIndexRangeAttribute(childID);
- if (OS.VERSION >= 0x1060 && attribute.isEqualToString(OS.NSAccessibilityColumnIndexRangeAttribute)) return getColumnIndexRangeAttribute(childID);
+ if (attribute.isEqualToString(OS.NSAccessibilityRowIndexRangeAttribute)) return getRowIndexRangeAttribute(childID);
+ if (attribute.isEqualToString(OS.NSAccessibilityColumnIndexRangeAttribute)) return getColumnIndexRangeAttribute(childID);
// If this object don't know how to get the value it's up to the control itself to return an attribute value.
return null;
@@ -1296,7 +1296,7 @@ public class Accessible {
if (attribute.isEqualToString(OS.NSAccessibilityRangeForPositionParameterizedAttribute)) return getRangeForPositionParameterizedAttribute(parameter, childID);
if (attribute.isEqualToString(OS.NSAccessibilityAttributedStringForRangeParameterizedAttribute)) return getAttributedStringForRangeParameterizedAttribute(parameter, childID);
if (attribute.isEqualToString(OS.NSAccessibilityStyleRangeForIndexParameterizedAttribute)) return getStyleRangeForIndexAttribute(parameter, childID);
- if (OS.VERSION >= 0x1060 && attribute.isEqualToString(OS.NSAccessibilityCellForColumnAndRowParameterizedAttribute)) return getCellForColumnAndRowParameter(parameter, childID);
+ if (attribute.isEqualToString(OS.NSAccessibilityCellForColumnAndRowParameterizedAttribute)) return getCellForColumnAndRowParameter(parameter, childID);
return null;
}
@@ -1460,7 +1460,7 @@ public class Accessible {
returnValue.addObject(OS.NSAccessibilityStyleRangeForIndexParameterizedAttribute);
break;
case ACC.ROLE_TABLE:
- if (OS.VERSION >= 0x1060) returnValue.addObject(OS.NSAccessibilityCellForColumnAndRowParameterizedAttribute);
+ returnValue.addObject(OS.NSAccessibilityCellForColumnAndRowParameterizedAttribute);
break;
}
@@ -1608,7 +1608,7 @@ public class Accessible {
AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(this);
- event.offset = (int) /*64*/ range.location;
+ event.offset = (int) range.location;
event.start = event.end = -1;
NSRange attributeRange = new NSRange();
@@ -1653,7 +1653,7 @@ public class Accessible {
fontInfoDict.setValue(familyName, OS.NSAccessibilityFontFamilyKey);
NSString displayName = fontUsed.displayName();
fontInfoDict.setValue(displayName, OS.NSAccessibilityVisibleNameKey);
- double /*float*/ fontSize = fontUsed.pointSize();
+ double fontSize = fontUsed.pointSize();
fontInfoDict.setValue(NSNumber.numberWithDouble(fontSize), OS.NSAccessibilityFontSizeKey);
attribString.addAttribute(OS.NSAccessibilityFontTextAttribute, fontInfoDict, attributeRange);
@@ -1753,8 +1753,8 @@ public class Accessible {
if (accessibleTextExtendedListenersSize() > 0) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.childID = childID;
- event.start = (int)/*64*/range.location;
- event.end = (int)/*64*/(range.location + range.length);
+ event.start = (int)range.location;
+ event.end = (int)(range.location + range.length);
for (int i = 0; i < accessibleTextExtendedListenersSize(); i++) {
AccessibleTextExtendedListener listener = accessibleTextExtendedListeners.get(i);
listener.getTextBounds(event);
@@ -1991,12 +1991,12 @@ public class Accessible {
}
if (ace.childID >= ACC.CHILDID_SELF) {
if (role == ACC.ROLE_TABITEM) {
- returnValue = NSNumber.numberWithBool(ace.childID == childID);
+ returnValue = NSNumber.numberWithBool(ace.childID == childID);
} else {
returnValue = new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(ace.childID).id));
}
} else {
- returnValue = NSNumber.numberWithBool(false);
+ returnValue = NSNumber.numberWithBool(false);
}
break;
case ACC.ROLE_COMBOBOX: // text of the currently selected item
@@ -2604,8 +2604,8 @@ public class Accessible {
if (accessibleTextExtendedListenersSize() > 0) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.childID = childID;
- event.start = (int) /*64*/ range.location;
- event.end = (int) /*64*/ (range.location + range.length);
+ event.start = (int) range.location;
+ event.end = (int) (range.location + range.length);
event.type = ACC.TEXT_BOUNDARY_ALL;
for (int i = 0; i < accessibleTextExtendedListenersSize(); i++) {
AccessibleTextExtendedListener listener = accessibleTextExtendedListeners.get(i);
@@ -2623,7 +2623,7 @@ public class Accessible {
String appValue = event.result;
if (appValue != null) {
- returnValue = NSString.stringWith(appValue.substring((int)/*64*/range.location, (int)/*64*/(range.location + range.length)));
+ returnValue = NSString.stringWith(appValue.substring((int)range.location, (int)(range.location + range.length)));
}
}
return returnValue;
@@ -2683,7 +2683,7 @@ public class Accessible {
int index = parameterObject.intValue();
AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(this);
- event.offset = (int) /*64*/ index;
+ event.offset = (int) index;
// Marker values -- if -1 after calling getTextAttributes, no one implemented it.
event.start = event.end = -1;
@@ -2924,8 +2924,8 @@ public class Accessible {
* @since 3.7
*/
public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners != null) {
accessibleEditableTextListeners.remove(listener);
if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
@@ -3345,8 +3345,8 @@ public class Accessible {
if (rangeObj != null) {
NSRange range = new NSValue(rangeObj).rangeValue();
- rangeStart = (int)/*64*/range.location;
- rangeEnd = (int)/*64*/(range.location + range.length);
+ rangeStart = (int)range.location;
+ rangeEnd = (int)(range.location + range.length);
}
if (accessibleEditableTextListenersSize() > 0) {
@@ -3578,7 +3578,7 @@ public class Accessible {
*
* @noreference This method is not intended to be referenced by clients.
*/
- public long /*int*/ internal_addRelationAttributes(long /*int*/ defaultAttributes) {
+ public long internal_addRelationAttributes(long defaultAttributes) {
NSArray attributes = new NSArray(defaultAttributes);
NSMutableArray returnArray = NSMutableArray.arrayWithCapacity(attributes.count());
returnArray.addObjectsFromArray(attributes);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java
index 6b3c893148..fe7bba7767 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java
@@ -31,10 +31,10 @@ class SWTAccessibleDelegate extends NSObject {
static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
static Callback accessible2Args, accessible3Args, accessible4Args;
- static long /*int*/ proc2Args, proc3Args, proc4Args;
+ static long proc2Args, proc3Args, proc4Args;
Accessible accessible;
- long /*int*/ delegateJniRef;
+ long delegateJniRef;
int childID;
NSArray attributeNames = null;
@@ -46,15 +46,12 @@ class SWTAccessibleDelegate extends NSObject {
accessible2Args = new Callback(clazz, "accessibleProc", 2);
proc2Args = accessible2Args.getAddress();
- if (proc2Args == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
accessible3Args = new Callback(clazz, "accessibleProc", 3);
proc3Args = accessible3Args.getAddress();
- if (proc3Args == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
accessible4Args = new Callback(clazz, "accessibleProc", 4);
proc4Args = accessible3Args.getAddress();
- if (proc4Args == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
// Accessible custom controls need to implement the NSAccessibility protocol. To do that,
// we dynamically add the methods to the control's class that are required
@@ -67,7 +64,7 @@ class SWTAccessibleDelegate extends NSObject {
byte[] types = {'*','\0'};
int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
- long /*int*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+ long cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
// Add the NSAccessibility overrides
@@ -176,7 +173,7 @@ class SWTAccessibleDelegate extends NSObject {
return new NSArray(temp2.id);
}
- static long /*int*/ accessibleProc(long /*int*/ id, long /*int*/ sel) {
+ static long accessibleProc(long id, long sel) {
SWTAccessibleDelegate swtAcc = getAccessibleDelegate(id);
if (swtAcc == null) return 0;
@@ -200,7 +197,7 @@ class SWTAccessibleDelegate extends NSObject {
return 0;
}
- static long /*int*/ accessibleProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+ static long accessibleProc(long id, long sel, long arg0) {
SWTAccessibleDelegate swtAcc = getAccessibleDelegate(id);
if (swtAcc == null) return 0;
@@ -228,7 +225,7 @@ class SWTAccessibleDelegate extends NSObject {
return 0;
}
- static long /*int*/ accessibleProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+ static long accessibleProc(long id, long sel, long arg0, long arg1) {
SWTAccessibleDelegate swtAcc = getAccessibleDelegate(id);
if (swtAcc == null) return 0;
@@ -246,9 +243,9 @@ class SWTAccessibleDelegate extends NSObject {
return 0;
}
- static SWTAccessibleDelegate getAccessibleDelegate(long /*int*/ id) {
+ static SWTAccessibleDelegate getAccessibleDelegate(long id) {
if (id == 0) return null;
- long /*int*/ [] jniRef = new long /*int*/ [1];
+ long [] jniRef = new long [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return null;
return (SWTAccessibleDelegate)OS.JNIGetObject(jniRef[0]);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java
index 8de14511a5..8c95b4e1b8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java
@@ -139,7 +139,7 @@ public String toString () {
+ " bottomMargin=" + bottomMargin //$NON-NLS-1$
+ " leftMargin=" + leftMargin //$NON-NLS-1$
+ " rightMargin=" + rightMargin //$NON-NLS-1$
- + " tabStops=" + tabStops //$NON-NLS-1$
+ + " tabStops=" + Arrays.toString(tabStops) //$NON-NLS-1$
+ " justify=" + justify //$NON-NLS-1$
+ " alignment=" + alignment //$NON-NLS-1$
+ " indent=" + indent //$NON-NLS-1$
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java
index 03674e1e1d..76093a90be 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java
@@ -52,7 +52,7 @@ public AccessibleTableCellEvent(Object source) {
@Override
public String toString () {
return "AccessibleTableCellEvent {" //$NON-NLS-1$
- + " accessibles=" + accessibles //$NON-NLS-1$
+ + " accessibles=" + Arrays.toString(accessibles) //$NON-NLS-1$
+ " isSelected=" + isSelected //$NON-NLS-1$
+ " count=" + count //$NON-NLS-1$
+ " index=" + index //$NON-NLS-1$
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java
index 4f55261eab..07b6f412a7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java
@@ -62,13 +62,13 @@ public AccessibleTableEvent(Object source) {
public String toString () {
return "AccessibleTableEvent {" //$NON-NLS-1$
+ "accessible=" + accessible //$NON-NLS-1$
- + " accessibles=" + accessibles //$NON-NLS-1$
+ + " accessibles=" + Arrays.toString(accessibles) //$NON-NLS-1$
+ " string=" + result //$NON-NLS-1$
+ " isSelected=" + isSelected //$NON-NLS-1$
+ " column=" + column //$NON-NLS-1$
+ " count=" + count //$NON-NLS-1$
+ " row=" + row //$NON-NLS-1$
- + " selected=" + selected //$NON-NLS-1$
+ + " selected=" + Arrays.toString(selected) //$NON-NLS-1$
+ "}"; //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java
index 283dc2bb8b..da9c60d3c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java
@@ -19,6 +19,8 @@ import java.util.List;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
import org.eclipse.swt.widgets.*;
/**
@@ -264,10 +266,10 @@ public class Accessible {
* @since 3.7
*/
public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners == null) accessibleEditableTextListeners = new ArrayList<>();
- accessibleEditableTextListeners.add(listener);
+ accessibleEditableTextListeners.add(listener);
}
/**
@@ -493,21 +495,32 @@ public class Accessible {
long getControlHandle () {
long result = control.handle;
+
if (control instanceof Label) {
- long list = GTK.gtk_container_get_children (result);
- if (list != 0) {
- long temp = list;
- while (temp != 0) {
- long widget = OS.g_list_data( temp);
- if (GTK.gtk_widget_get_visible (widget)) {
- result = widget;
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(result); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ if (GTK.gtk_widget_get_visible(child)) {
+ result = child;
break;
}
- temp = OS.g_list_next (temp);
}
- OS.g_list_free (list);
+ } else {
+ long list = GTK3.gtk_container_get_children (result);
+ if (list != 0) {
+ long temp = list;
+ while (temp != 0) {
+ long widget = OS.g_list_data( temp);
+ if (GTK.gtk_widget_get_visible (widget)) {
+ result = widget;
+ break;
+ }
+ temp = OS.g_list_next (temp);
+ }
+ OS.g_list_free (list);
+ }
}
}
+
return result;
}
@@ -553,8 +566,9 @@ public class Accessible {
void release () {
if (children != null) {
- for (int i = 0; i < children.size(); i++) {
- Accessible child = children.get(i);
+ List<Accessible> temp = new ArrayList<>(children);
+ for (int i = 0; i < temp.size(); i++) {
+ Accessible child = temp.get(i);
child.dispose();
}
}
@@ -710,12 +724,12 @@ public class Accessible {
* @since 3.7
*/
public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (accessibleEditableTextListeners != null) {
- accessibleEditableTextListeners.remove(listener);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (accessibleEditableTextListeners != null) {
+ accessibleEditableTextListeners.remove(listener);
if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
- }
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
index c4e3a71bf7..6eeb54a0d2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
@@ -21,6 +21,7 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.accessibility.gtk.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
import org.eclipse.swt.widgets.*;
class AccessibleObject {
@@ -44,20 +45,26 @@ class AccessibleObject {
AccessibleObject (long type, long widget, Accessible accessible, boolean isLightweight) {
super ();
- if (type == OS.swt_fixed_get_type()) {
- if (widget != 0 && !isLightweight) {
- atkHandle = GTK.gtk_widget_get_accessible(widget);
+
+ if (GTK.GTK4) {
+ //TODO: Make use of Accessibility interface of GtkWidget rather than atk object which has been removed
+ } else {
+ if (type == OS.swt_fixed_get_type()) {
+ if (widget != 0 && !isLightweight) {
+ atkHandle = GTK3.gtk_widget_get_accessible(widget);
+ } else {
+ // Lightweight widgets map to no "real" GTK widget, so we
+ // just instantiate a new SwtFixedAccessible
+ atkHandle = OS.g_object_new (OS.swt_fixed_accessible_get_type(), 0);
+ }
+ OS.swt_fixed_accessible_register_accessible(atkHandle, false, widget);
} else {
- // Lightweight widgets map to no "real" GTK widget, so we
- // just instantiate a new SwtFixedAccessible
- atkHandle = OS.g_object_new (OS.swt_fixed_accessible_get_type(), 0);
+ // TODO_a11y: accessibility listeners on the Java side have not yet
+ // been implemented for native GTK widgets on GTK3.
+ atkHandle = GTK3.gtk_widget_get_accessible(widget);
}
- OS.swt_fixed_accessible_register_accessible(atkHandle, false, widget);
- } else {
- // TODO_a11y: accessibility listeners on the Java side have not yet
- // been implemented for native GTK widgets on GTK3.
- atkHandle = GTK.gtk_widget_get_accessible(widget);
}
+
this.accessible = accessible;
this.isLightweight = isLightweight;
AccessibleObjects.put (new LONG (atkHandle), this);
@@ -624,12 +631,6 @@ class AccessibleObject {
if (style.font != null) {
style.font.dispose();
}
- if (style.foreground != null) {
- style.foreground.dispose();
- }
- if (style.background != null) {
- style.background.dispose();
- }
return ACC.OK.equals(event.result) ? 1 : 0;
}
}
@@ -653,7 +654,7 @@ class AccessibleObject {
int r = Integer.parseInt(rgbString.substring(0, comma1));
int g = Integer.parseInt(rgbString.substring(comma1 + 1, comma2));
int b = Integer.parseInt(rgbString.substring(comma2 + 1, rgbString.length()));
- return new Color(display, r, g, b);
+ return new Color(r, g, b);
} catch (NumberFormatException ex) {}
return null;
}
@@ -4529,7 +4530,7 @@ class AccessibleObject {
return 0;
}
if (GTK.GTK4) {
- GDK.gdk_surface_get_origin (gdkResource, origin_x, origin_y);
+ //TODO: GTK4 no gdk_surface_get_origin
} else {
GDK.gdk_window_get_origin (gdkResource, origin_x, origin_y);
}
@@ -4541,18 +4542,18 @@ class AccessibleObject {
}
static void windowPoint (AccessibleObject object, int [] x, int [] y) {
- long widget = GTK.gtk_accessible_get_widget(object.atkHandle);
+ long widget = GTK3.gtk_accessible_get_widget(object.atkHandle);
while (widget == 0 && object.parent != null) {
object = object.parent;
- widget = GTK.gtk_accessible_get_widget(object.atkHandle);
+ widget = GTK3.gtk_accessible_get_widget(object.atkHandle);
}
if (widget == 0) return;
- long topLevel = GTK.gtk_widget_get_toplevel (widget);
+
if (GTK.GTK4) {
- long surface = GTK.gtk_widget_get_surface (topLevel);
- GDK.gdk_surface_get_origin (surface, x, y);
+ //TODO: GTK4 no gdk_surface_get_origin
} else {
- long window = GTK.gtk_widget_get_window (topLevel);
+ long topLevel = GTK3.gtk_widget_get_toplevel (widget);
+ long window = GTK3.gtk_widget_get_window (topLevel);
GDK.gdk_window_get_origin (window, x, y);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
index e895030392..f56d398f46 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
@@ -58,10 +58,10 @@ public class Accessible {
static int UniqueID = -0x10;
int refCount = 0, enumIndex = 0;
Runnable timer;
- COMObject objIAccessible, objIEnumVARIANT, objIServiceProvider, objIAccessible2, objIAccessibleAction,
+ COMObject objIAccessible, objIEnumVARIANT, objIServiceProvider,
objIAccessibleApplication, /*objIAccessibleComponent,*/ objIAccessibleEditableText, objIAccessibleHyperlink,
objIAccessibleHypertext, /*objIAccessibleImage,*/ objIAccessibleTable2, objIAccessibleTableCell,
- objIAccessibleText, objIAccessibleValue; /* objIAccessibleRelation is defined in Relation class */
+ objIAccessibleValue; /* objIAccessibleRelation is defined in Relation class */
IAccessible iaccessible;
List<AccessibleListener> accessibleListeners;
List<AccessibleControlListener> accessibleControlListeners;
@@ -123,11 +123,11 @@ public class Accessible {
Accessible(Control control) {
this.control = control;
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
/* CreateStdAccessibleObject([in] hwnd, [in] idObject, [in] riidInterface, [out] ppvObject).
* AddRef has already been called on ppvObject by the callee and must be released by the caller.
*/
- int result = (int)/*64*/COM.CreateStdAccessibleObject(control.handle, OS.OBJID_CLIENT, COM.IIDIAccessible, ppvObject);
+ int result = (int)COM.CreateStdAccessibleObject(control.handle, OS.OBJID_CLIENT, COM.IIDIAccessible, ppvObject);
/* The object needs to be checked, because if the CreateStdAccessibleObject()
* symbol is not found, the return value is S_OK.
*/
@@ -138,7 +138,7 @@ public class Accessible {
AddRef();
}
- Accessible(Accessible parent, long /*int*/ iaccessible_address) {
+ Accessible(Accessible parent, long iaccessible_address) {
this(parent);
iaccessible = new IAccessible(iaccessible_address);
}
@@ -149,584 +149,388 @@ public class Accessible {
}
void createIAccessible() {
- objIAccessible = new COMObject(new int[] {2,0,0,1,3,5,8,1,1,2,2,2,2,2,2,2,3,2,1,1,2,2,5,3,3,1,2,2}) {
+ objIAccessible = new COMObject(new int[] {2,0,0,/*IA>>*/1,3,5,8,1,1,2,2,2,2,2,2,2,3,2,1,1,2,2,5,3,3,1,2,2,/*<<IA*/1,2,3,1,1,3,3,1,1,1,1,3,3,1,1,1,1,1}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
// method3 GetTypeInfoCount - not implemented
// method4 GetTypeInfo - not implemented
// method5 GetIDsOfNames - not implemented
// method6 Invoke - not implemented
@Override
- public long /*int*/ method7(long /*int*/[] args) {return get_accParent(args[0]);}
+ public long method7(long[] args) {return get_accParent(args[0]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return get_accChildCount(args[0]);}
+ public long method8(long[] args) {return get_accChildCount(args[0]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return get_accChild(args[0], args[1]);}
+ public long method9(long[] args) {return get_accChild(args[0], args[1]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return get_accName(args[0], args[1]);}
+ public long method10(long[] args) {return get_accName(args[0], args[1]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return get_accValue(args[0], args[1]);}
+ public long method11(long[] args) {return get_accValue(args[0], args[1]);}
@Override
- public long /*int*/ method12(long /*int*/[] args) {return get_accDescription(args[0], args[1]);}
+ public long method12(long[] args) {return get_accDescription(args[0], args[1]);}
@Override
- public long /*int*/ method13(long /*int*/[] args) {return get_accRole(args[0], args[1]);}
+ public long method13(long[] args) {return get_accRole(args[0], args[1]);}
@Override
- public long /*int*/ method14(long /*int*/[] args) {return get_accState(args[0], args[1]);}
+ public long method14(long[] args) {return get_accState(args[0], args[1]);}
@Override
- public long /*int*/ method15(long /*int*/[] args) {return get_accHelp(args[0], args[1]);}
+ public long method15(long[] args) {return get_accHelp(args[0], args[1]);}
@Override
- public long /*int*/ method16(long /*int*/[] args) {return get_accHelpTopic(args[0], args[1], args[2]);}
+ public long method16(long[] args) {return get_accHelpTopic(args[0], args[1], args[2]);}
@Override
- public long /*int*/ method17(long /*int*/[] args) {return get_accKeyboardShortcut(args[0], args[1]);}
+ public long method17(long[] args) {return get_accKeyboardShortcut(args[0], args[1]);}
@Override
- public long /*int*/ method18(long /*int*/[] args) {return get_accFocus(args[0]);}
+ public long method18(long[] args) {return get_accFocus(args[0]);}
@Override
- public long /*int*/ method19(long /*int*/[] args) {return get_accSelection(args[0]);}
+ public long method19(long[] args) {return get_accSelection(args[0]);}
@Override
- public long /*int*/ method20(long /*int*/[] args) {return get_accDefaultAction(args[0], args[1]);}
+ public long method20(long[] args) {return get_accDefaultAction(args[0], args[1]);}
@Override
- public long /*int*/ method21(long /*int*/[] args) {return accSelect((int)/*64*/args[0], args[1]);}
+ public long method21(long[] args) {return accSelect((int)args[0], args[1]);}
@Override
- public long /*int*/ method22(long /*int*/[] args) {return accLocation(args[0], args[1], args[2], args[3], args[4]);}
+ public long method22(long[] args) {return accLocation(args[0], args[1], args[2], args[3], args[4]);}
@Override
- public long /*int*/ method23(long /*int*/[] args) {return accNavigate((int)/*64*/args[0], args[1], args[2]);}
+ public long method23(long[] args) {return accNavigate((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method24(long /*int*/[] args) {return accHitTest((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+ public long method24(long[] args) {return accHitTest((int)args[0], (int)args[1], args[2]);}
@Override
- public long /*int*/ method25(long /*int*/[] args) {return accDoDefaultAction(args[0]);}
+ public long method25(long[] args) {return accDoDefaultAction(args[0]);}
@Override
- public long /*int*/ method26(long /*int*/[] args) {return put_accName(args[0], args[1]);}
+ public long method26(long[] args) {return put_accName(args[0], args[1]);}
@Override
- public long /*int*/ method27(long /*int*/[] args) {return put_accValue(args[0], args[1]);}
- };
-
- /* If the callback takes a struct parameter (for example, a VARIANT),
- * then create a custom callback that dereferences the struct and
- * passes a pointer to the original callback.
- */
- long /*int*/ ppVtable = objIAccessible.ppVtable;
- long /*int*/[] pVtable = new long /*int*/[1];
- OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF);
- long /*int*/[] funcs = new long /*int*/[28];
- OS.MoveMemory(funcs, pVtable[0], C.PTR_SIZEOF * funcs.length);
- funcs[9] = COM.get_accChild_CALLBACK(funcs[9]);
- funcs[10] = COM.get_accName_CALLBACK(funcs[10]);
- funcs[11] = COM.get_accValue_CALLBACK(funcs[11]);
- funcs[12] = COM.get_accDescription_CALLBACK(funcs[12]);
- funcs[13] = COM.get_accRole_CALLBACK(funcs[13]);
- funcs[14] = COM.get_accState_CALLBACK(funcs[14]);
- funcs[15] = COM.get_accHelp_CALLBACK(funcs[15]);
- funcs[16] = COM.get_accHelpTopic_CALLBACK(funcs[16]);
- funcs[17] = COM.get_accKeyboardShortcut_CALLBACK(funcs[17]);
- funcs[20] = COM.get_accDefaultAction_CALLBACK(funcs[20]);
- funcs[21] = COM.accSelect_CALLBACK(funcs[21]);
- funcs[22] = COM.accLocation_CALLBACK(funcs[22]);
- funcs[23] = COM.accNavigate_CALLBACK(funcs[23]);
- funcs[25] = COM.accDoDefaultAction_CALLBACK(funcs[25]);
- funcs[26] = COM.put_accName_CALLBACK(funcs[26]);
- funcs[27] = COM.put_accValue_CALLBACK(funcs[27]);
- OS.MoveMemory(pVtable[0], funcs, C.PTR_SIZEOF * funcs.length);
- }
-
- void createIAccessible2() {
- objIAccessible2 = new COMObject(new int[] {2,0,0,/*IA>>*/1,3,5,8,1,1,2,2,2,2,2,2,2,3,2,1,1,2,2,5,3,3,1,2,2,/*<<IA*/1,2,3,1,1,3,3,1,1,1,1,3,3,1,1,1,1,1}) {
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
-
- /*
- * Even though the IA2 spec says "AT's should not rely on IA inheritance",
- * some AT's do rely on it, so we need to implement the IAccessible methods here.
- */
- // method3 GetTypeInfoCount - not implemented
- // method4 GetTypeInfo - not implemented
- // method5 GetIDsOfNames - not implemented
- // method6 Invoke - not implemented
- @Override
- public long /*int*/ method7(long /*int*/[] args) {return get_accParent(args[0]);}
- @Override
- public long /*int*/ method8(long /*int*/[] args) {return get_accChildCount(args[0]);}
- @Override
- public long /*int*/ method9(long /*int*/[] args) {return get_accChild(args[0], args[1]);}
- @Override
- public long /*int*/ method10(long /*int*/[] args) {return get_accName(args[0], args[1]);}
- @Override
- public long /*int*/ method11(long /*int*/[] args) {return get_accValue(args[0], args[1]);}
- @Override
- public long /*int*/ method12(long /*int*/[] args) {return get_accDescription(args[0], args[1]);}
- @Override
- public long /*int*/ method13(long /*int*/[] args) {return get_accRole(args[0], args[1]);}
- @Override
- public long /*int*/ method14(long /*int*/[] args) {return get_accState(args[0], args[1]);}
- @Override
- public long /*int*/ method15(long /*int*/[] args) {return get_accHelp(args[0], args[1]);}
- @Override
- public long /*int*/ method16(long /*int*/[] args) {return get_accHelpTopic(args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method17(long /*int*/[] args) {return get_accKeyboardShortcut(args[0], args[1]);}
- @Override
- public long /*int*/ method18(long /*int*/[] args) {return get_accFocus(args[0]);}
- @Override
- public long /*int*/ method19(long /*int*/[] args) {return get_accSelection(args[0]);}
- @Override
- public long /*int*/ method20(long /*int*/[] args) {return get_accDefaultAction(args[0], args[1]);}
- @Override
- public long /*int*/ method21(long /*int*/[] args) {return accSelect((int)/*64*/args[0], args[1]);}
- @Override
- public long /*int*/ method22(long /*int*/[] args) {return accLocation(args[0], args[1], args[2], args[3], args[4]);}
- @Override
- public long /*int*/ method23(long /*int*/[] args) {return accNavigate((int)/*64*/args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method24(long /*int*/[] args) {return accHitTest((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
- @Override
- public long /*int*/ method25(long /*int*/[] args) {return accDoDefaultAction(args[0]);}
- @Override
- public long /*int*/ method26(long /*int*/[] args) {return put_accName(args[0], args[1]);}
- @Override
- public long /*int*/ method27(long /*int*/[] args) {return put_accValue(args[0], args[1]);}
+ public long method27(long[] args) {return put_accValue(args[0], args[1]);}
// IAccessible2 methods
@Override
- public long /*int*/ method28(long /*int*/[] args) {return get_nRelations(args[0]);}
- @Override
- public long /*int*/ method29(long /*int*/[] args) {return get_relation((int)/*64*/args[0], args[1]);}
- @Override
- public long /*int*/ method30(long /*int*/[] args) {return get_relations((int)/*64*/args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method31(long /*int*/[] args) {return get_role(args[0]);}
+ public long method28(long[] args) {return get_nRelations(args[0]);}
@Override
- public long /*int*/ method32(long /*int*/[] args) {return scrollTo((int)/*64*/args[0]);}
+ public long method29(long[] args) {return get_relation((int)args[0], args[1]);}
@Override
- public long /*int*/ method33(long /*int*/[] args) {return scrollToPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+ public long method30(long[] args) {return get_relations((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method34(long /*int*/[] args) {return get_groupPosition(args[0], args[1], args[2]);}
+ public long method31(long[] args) {return get_role(args[0]);}
@Override
- public long /*int*/ method35(long /*int*/[] args) {return get_states(args[0]);}
+ public long method32(long[] args) {return scrollTo((int)args[0]);}
@Override
- public long /*int*/ method36(long /*int*/[] args) {return get_extendedRole(args[0]);}
+ public long method33(long[] args) {return scrollToPoint((int)args[0], (int)args[1], (int)args[2]);}
@Override
- public long /*int*/ method37(long /*int*/[] args) {return get_localizedExtendedRole(args[0]);}
+ public long method34(long[] args) {return get_groupPosition(args[0], args[1], args[2]);}
@Override
- public long /*int*/ method38(long /*int*/[] args) {return get_nExtendedStates(args[0]);}
+ public long method35(long[] args) {return get_states(args[0]);}
@Override
- public long /*int*/ method39(long /*int*/[] args) {return get_extendedStates((int)/*64*/args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method40(long /*int*/[] args) {return get_localizedExtendedStates((int)/*64*/args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method41(long /*int*/[] args) {return get_uniqueID(args[0]);}
- @Override
- public long /*int*/ method42(long /*int*/[] args) {return get_windowHandle(args[0]);}
- @Override
- public long /*int*/ method43(long /*int*/[] args) {return get_indexInParent(args[0]);}
- @Override
- public long /*int*/ method44(long /*int*/[] args) {return get_locale(args[0]);}
- @Override
- public long /*int*/ method45(long /*int*/[] args) {return get_attributes(args[0]);}
- };
-
- /* If the callback takes a struct parameter (for example, a VARIANT),
- * then create a custom callback that dereferences the struct and
- * passes a pointer to the original callback.
- */
- long /*int*/ ppVtable = objIAccessible2.ppVtable;
- long /*int*/[] pVtable = new long /*int*/[1];
- OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF);
- long /*int*/[] funcs = new long /*int*/[28];
- OS.MoveMemory(funcs, pVtable[0], C.PTR_SIZEOF * funcs.length);
- funcs[9] = COM.get_accChild_CALLBACK(funcs[9]);
- funcs[10] = COM.get_accName_CALLBACK(funcs[10]);
- funcs[11] = COM.get_accValue_CALLBACK(funcs[11]);
- funcs[12] = COM.get_accDescription_CALLBACK(funcs[12]);
- funcs[13] = COM.get_accRole_CALLBACK(funcs[13]);
- funcs[14] = COM.get_accState_CALLBACK(funcs[14]);
- funcs[15] = COM.get_accHelp_CALLBACK(funcs[15]);
- funcs[16] = COM.get_accHelpTopic_CALLBACK(funcs[16]);
- funcs[17] = COM.get_accKeyboardShortcut_CALLBACK(funcs[17]);
- funcs[20] = COM.get_accDefaultAction_CALLBACK(funcs[20]);
- funcs[21] = COM.accSelect_CALLBACK(funcs[21]);
- funcs[22] = COM.accLocation_CALLBACK(funcs[22]);
- funcs[23] = COM.accNavigate_CALLBACK(funcs[23]);
- funcs[25] = COM.accDoDefaultAction_CALLBACK(funcs[25]);
- funcs[26] = COM.put_accName_CALLBACK(funcs[26]);
- funcs[27] = COM.put_accValue_CALLBACK(funcs[27]);
- OS.MoveMemory(pVtable[0], funcs, C.PTR_SIZEOF * funcs.length);
- }
-
- void createIAccessibleAction() {
- objIAccessibleAction = new COMObject(new int[] {2,0,0,1,1,2,4,2,2}) {
+ public long method36(long[] args) {return get_extendedRole(args[0]);}
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method37(long[] args) {return get_localizedExtendedRole(args[0]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method38(long[] args) {return get_nExtendedStates(args[0]);}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method39(long[] args) {return get_extendedStates((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return get_nActions(args[0]);}
+ public long method40(long[] args) {return get_localizedExtendedStates((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return doAction((int)/*64*/args[0]);}
+ public long method41(long[] args) {return get_uniqueID(args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_description((int)/*64*/args[0], args[1]);}
+ public long method42(long[] args) {return get_windowHandle(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_keyBinding((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3]);}
+ public long method43(long[] args) {return get_indexInParent(args[0]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return get_name((int)/*64*/args[0], args[1]);}
+ public long method44(long[] args) {return get_locale(args[0]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return get_localizedName((int)/*64*/args[0], args[1]);}
+ public long method45(long[] args) {return get_attributes(args[0]);}
};
}
void createIAccessibleApplication() {
objIAccessibleApplication = new COMObject(new int[] {2,0,0,1,1,1,1}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return get_appName(args[0]);}
+ public long method3(long[] args) {return get_appName(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return get_appVersion(args[0]);}
+ public long method4(long[] args) {return get_appVersion(args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_toolkitName(args[0]);}
+ public long method5(long[] args) {return get_toolkitName(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_toolkitVersion(args[0]);}
+ public long method6(long[] args) {return get_toolkitVersion(args[0]);}
};
}
// This method is intentionally commented. We are not providing IAccessibleComponent at this time.
// void createIAccessibleComponent() {
// objIAccessibleComponent = new COMObject(new int[] {2,0,0,2,1,1}) {
-// public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
-// public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
-// public long /*int*/ method2(long /*int*/[] args) {return Release();}
-// public long /*int*/ method3(long /*int*/[] args) {return get_locationInParent(args[0], args[1]);}
-// public long /*int*/ method4(long /*int*/[] args) {return get_foreground(args[0]);}
-// public long /*int*/ method5(long /*int*/[] args) {return get_background(args[0]);}
+// public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
+// public long method1(long[] args) {return AddRef();}
+// public long method2(long[] args) {return Release();}
+// public long method3(long[] args) {return get_locationInParent(args[0], args[1]);}
+// public long method4(long[] args) {return get_foreground(args[0]);}
+// public long method5(long[] args) {return get_background(args[0]);}
// };
// }
void createIAccessibleEditableText() {
objIAccessibleEditableText = new COMObject(new int[] {2,0,0,2,2,2,2,1,3,3}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return copyText((int)/*64*/args[0], (int)/*64*/args[1]);}
+ public long method3(long[] args) {return copyText((int)args[0], (int)args[1]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return deleteText((int)/*64*/args[0], (int)/*64*/args[1]);}
+ public long method4(long[] args) {return deleteText((int)args[0], (int)args[1]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return insertText((int)/*64*/args[0], args[1]);}
+ public long method5(long[] args) {return insertText((int)args[0], args[1]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return cutText((int)/*64*/args[0], (int)/*64*/args[1]);}
+ public long method6(long[] args) {return cutText((int)args[0], (int)args[1]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return pasteText((int)/*64*/args[0]);}
+ public long method7(long[] args) {return pasteText((int)args[0]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return replaceText((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+ public long method8(long[] args) {return replaceText((int)args[0], (int)args[1], args[2]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return setAttributes((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+ public long method9(long[] args) {return setAttributes((int)args[0], (int)args[1], args[2]);}
};
}
void createIAccessibleHyperlink() {
objIAccessibleHyperlink = new COMObject(new int[] {2,0,0,/*IAA>>*/1,1,2,4,2,2,/*<<IAA*/2,2,1,1,1}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
// IAccessibleAction
@Override
- public long /*int*/ method3(long /*int*/[] args) {return get_nActions(args[0]);}
+ public long method3(long[] args) {return get_nActions(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return doAction((int)/*64*/args[0]);}
+ public long method4(long[] args) {return doAction((int)args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_description((int)/*64*/args[0], args[1]);}
+ public long method5(long[] args) {return get_description((int)args[0], args[1]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_keyBinding((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3]);}
+ public long method6(long[] args) {return get_keyBinding((int)args[0], (int)args[1], args[2], args[3]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return get_name((int)/*64*/args[0], args[1]);}
+ public long method7(long[] args) {return get_name((int)args[0], args[1]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return get_localizedName((int)/*64*/args[0], args[1]);}
+ public long method8(long[] args) {return get_localizedName((int)args[0], args[1]);}
// IAccessibleHyperlink
@Override
- public long /*int*/ method9(long /*int*/[] args) {return get_anchor((int)/*64*/args[0], args[1]);}
+ public long method9(long[] args) {return get_anchor((int)args[0], args[1]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return get_anchorTarget((int)/*64*/args[0], args[1]);}
+ public long method10(long[] args) {return get_anchorTarget((int)args[0], args[1]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return get_startIndex(args[0]);}
+ public long method11(long[] args) {return get_startIndex(args[0]);}
@Override
- public long /*int*/ method12(long /*int*/[] args) {return get_endIndex(args[0]);}
+ public long method12(long[] args) {return get_endIndex(args[0]);}
@Override
- public long /*int*/ method13(long /*int*/[] args) {return get_valid(args[0]);}
+ public long method13(long[] args) {return get_valid(args[0]);}
};
}
void createIAccessibleHypertext() {
objIAccessibleHypertext = new COMObject(new int[] {2,0,0,/*IAT>>*/2,4,1,6,1,4,3,3,5,5,5,1,1,3,1,3,5,1,1,/*<<IAT*/1,2,2}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
// IAccessibleText
@Override
- public long /*int*/ method3(long /*int*/[] args) {return addSelection((int)/*64*/args[0], (int)/*64*/args[1]);}
+ public long method3(long[] args) {return addSelection((int)args[0], (int)args[1]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return get_attributes((int)/*64*/args[0], args[1], args[2], args[3]);}
+ public long method4(long[] args) {return get_attributes((int)args[0], args[1], args[2], args[3]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_caretOffset(args[0]);}
+ public long method5(long[] args) {return get_caretOffset(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_characterExtents((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4], args[5]);}
+ public long method6(long[] args) {return get_characterExtents((int)args[0], (int)args[1], args[2], args[3], args[4], args[5]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return get_nSelections(args[0]);}
+ public long method7(long[] args) {return get_nSelections(args[0]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return get_offsetAtPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3]);}
+ public long method8(long[] args) {return get_offsetAtPoint((int)args[0], (int)args[1], (int)args[2], args[3]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return get_selection((int)/*64*/args[0], args[1], args[2]);}
+ public long method9(long[] args) {return get_selection((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return get_text((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+ public long method10(long[] args) {return get_text((int)args[0], (int)args[1], args[2]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return get_textBeforeOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+ public long method11(long[] args) {return get_textBeforeOffset((int)args[0], (int)args[1], args[2], args[3], args[4]);}
@Override
- public long /*int*/ method12(long /*int*/[] args) {return get_textAfterOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+ public long method12(long[] args) {return get_textAfterOffset((int)args[0], (int)args[1], args[2], args[3], args[4]);}
@Override
- public long /*int*/ method13(long /*int*/[] args) {return get_textAtOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+ public long method13(long[] args) {return get_textAtOffset((int)args[0], (int)args[1], args[2], args[3], args[4]);}
@Override
- public long /*int*/ method14(long /*int*/[] args) {return removeSelection((int)/*64*/args[0]);}
+ public long method14(long[] args) {return removeSelection((int)args[0]);}
@Override
- public long /*int*/ method15(long /*int*/[] args) {return setCaretOffset((int)/*64*/args[0]);}
+ public long method15(long[] args) {return setCaretOffset((int)args[0]);}
@Override
- public long /*int*/ method16(long /*int*/[] args) {return setSelection((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+ public long method16(long[] args) {return setSelection((int)args[0], (int)args[1], (int)args[2]);}
@Override
- public long /*int*/ method17(long /*int*/[] args) {return get_nCharacters(args[0]);}
+ public long method17(long[] args) {return get_nCharacters(args[0]);}
@Override
- public long /*int*/ method18(long /*int*/[] args) {return scrollSubstringTo((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+ public long method18(long[] args) {return scrollSubstringTo((int)args[0], (int)args[1], (int)args[2]);}
@Override
- public long /*int*/ method19(long /*int*/[] args) {return scrollSubstringToPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4]);}
+ public long method19(long[] args) {return scrollSubstringToPoint((int)args[0], (int)args[1], (int)args[2], (int)args[3], (int)args[4]);}
@Override
- public long /*int*/ method20(long /*int*/[] args) {return get_newText(args[0]);}
+ public long method20(long[] args) {return get_newText(args[0]);}
@Override
- public long /*int*/ method21(long /*int*/[] args) {return get_oldText(args[0]);}
+ public long method21(long[] args) {return get_oldText(args[0]);}
// IAccessibleHypertext
@Override
- public long /*int*/ method22(long /*int*/[] args) {return get_nHyperlinks(args[0]);}
+ public long method22(long[] args) {return get_nHyperlinks(args[0]);}
@Override
- public long /*int*/ method23(long /*int*/[] args) {return get_hyperlink((int)/*64*/args[0], args[1]);}
+ public long method23(long[] args) {return get_hyperlink((int)args[0], args[1]);}
@Override
- public long /*int*/ method24(long /*int*/[] args) {return get_hyperlinkIndex((int)/*64*/args[0], args[1]);}
+ public long method24(long[] args) {return get_hyperlinkIndex((int)args[0], args[1]);}
};
}
// This method is intentionally commented. We are not providing IAccessibleImage at this time.
// void createIAccessibleImage() {
// objIAccessibleImage = new COMObject(new int[] {2,0,0,1,3,2}) {
-// public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
-// public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
-// public long /*int*/ method2(long /*int*/[] args) {return Release();}
-// public long /*int*/ method3(long /*int*/[] args) {return get_description(args[0]);}
-// public long /*int*/ method4(long /*int*/[] args) {return get_imagePosition((int)/*64*/args[0], args[1], args[2]);}
-// public long /*int*/ method5(long /*int*/[] args) {return get_imageSize(args[0], args[1]);}
+// public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
+// public long method1(long[] args) {return AddRef();}
+// public long method2(long[] args) {return Release();}
+// public long method3(long[] args) {return get_description(args[0]);}
+// public long method4(long[] args) {return get_imagePosition((int)args[0], args[1], args[2]);}
+// public long method5(long[] args) {return get_imageSize(args[0], args[1]);}
// };
// }
void createIAccessibleTable2() {
objIAccessibleTable2 = new COMObject(new int[] {2,0,0,3,1,2,1,1,1,1,1,2,2,2,2,1,2,2,1,1,1,1,1}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return get_cellAt((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+ public long method3(long[] args) {return get_cellAt((int)args[0], (int)args[1], args[2]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return get_caption(args[0]);}
+ public long method4(long[] args) {return get_caption(args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_columnDescription((int)/*64*/args[0], args[1]);}
+ public long method5(long[] args) {return get_columnDescription((int)args[0], args[1]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_nColumns(args[0]);}
+ public long method6(long[] args) {return get_nColumns(args[0]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return get_nRows(args[0]);}
+ public long method7(long[] args) {return get_nRows(args[0]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return get_nSelectedCells(args[0]);}
+ public long method8(long[] args) {return get_nSelectedCells(args[0]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return get_nSelectedColumns(args[0]);}
+ public long method9(long[] args) {return get_nSelectedColumns(args[0]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return get_nSelectedRows(args[0]);}
+ public long method10(long[] args) {return get_nSelectedRows(args[0]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return get_rowDescription((int)/*64*/args[0], args[1]);}
+ public long method11(long[] args) {return get_rowDescription((int)args[0], args[1]);}
@Override
- public long /*int*/ method12(long /*int*/[] args) {return get_selectedCells(args[0], args[1]);}
+ public long method12(long[] args) {return get_selectedCells(args[0], args[1]);}
@Override
- public long /*int*/ method13(long /*int*/[] args) {return get_selectedColumns(args[0], args[1]);}
+ public long method13(long[] args) {return get_selectedColumns(args[0], args[1]);}
@Override
- public long /*int*/ method14(long /*int*/[] args) {return get_selectedRows(args[0], args[1]);}
+ public long method14(long[] args) {return get_selectedRows(args[0], args[1]);}
@Override
- public long /*int*/ method15(long /*int*/[] args) {return get_summary(args[0]);}
+ public long method15(long[] args) {return get_summary(args[0]);}
@Override
- public long /*int*/ method16(long /*int*/[] args) {return get_isColumnSelected((int)/*64*/args[0], args[1]);}
+ public long method16(long[] args) {return get_isColumnSelected((int)args[0], args[1]);}
@Override
- public long /*int*/ method17(long /*int*/[] args) {return get_isRowSelected((int)/*64*/args[0], args[1]);}
+ public long method17(long[] args) {return get_isRowSelected((int)args[0], args[1]);}
@Override
- public long /*int*/ method18(long /*int*/[] args) {return selectRow((int)/*64*/args[0]);}
+ public long method18(long[] args) {return selectRow((int)args[0]);}
@Override
- public long /*int*/ method19(long /*int*/[] args) {return selectColumn((int)/*64*/args[0]);}
+ public long method19(long[] args) {return selectColumn((int)args[0]);}
@Override
- public long /*int*/ method20(long /*int*/[] args) {return unselectRow((int)/*64*/args[0]);}
+ public long method20(long[] args) {return unselectRow((int)args[0]);}
@Override
- public long /*int*/ method21(long /*int*/[] args) {return unselectColumn((int)/*64*/args[0]);}
+ public long method21(long[] args) {return unselectColumn((int)args[0]);}
@Override
- public long /*int*/ method22(long /*int*/[] args) {return get_modelChange(args[0]);}
+ public long method22(long[] args) {return get_modelChange(args[0]);}
};
}
void createIAccessibleTableCell() {
objIAccessibleTableCell = new COMObject(new int[] {2,0,0,1,2,1,1,2,1,1,5,1}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return get_columnExtent(args[0]);}
+ public long method3(long[] args) {return get_columnExtent(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return get_columnHeaderCells(args[0], args[1]);}
+ public long method4(long[] args) {return get_columnHeaderCells(args[0], args[1]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_columnIndex(args[0]);}
+ public long method5(long[] args) {return get_columnIndex(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_rowExtent(args[0]);}
+ public long method6(long[] args) {return get_rowExtent(args[0]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return get_rowHeaderCells(args[0], args[1]);}
+ public long method7(long[] args) {return get_rowHeaderCells(args[0], args[1]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return get_rowIndex(args[0]);}
+ public long method8(long[] args) {return get_rowIndex(args[0]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return get_isSelected(args[0]);}
+ public long method9(long[] args) {return get_isSelected(args[0]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return get_rowColumnExtents(args[0], args[1], args[2], args[3], args[4]);}
+ public long method10(long[] args) {return get_rowColumnExtents(args[0], args[1], args[2], args[3], args[4]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return get_table(args[0]);}
- };
- }
-
- void createIAccessibleText() {
- objIAccessibleText = new COMObject(new int[] {2,0,0,2,4,1,6,1,4,3,3,5,5,5,1,1,3,1,3,5,1,1}) {
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- @Override
- public long /*int*/ method3(long /*int*/[] args) {return addSelection((int)/*64*/args[0], (int)/*64*/args[1]);}
- @Override
- public long /*int*/ method4(long /*int*/[] args) {return get_attributes((int)/*64*/args[0], args[1], args[2], args[3]);}
- @Override
- public long /*int*/ method5(long /*int*/[] args) {return get_caretOffset(args[0]);}
- @Override
- public long /*int*/ method6(long /*int*/[] args) {return get_characterExtents((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4], args[5]);}
- @Override
- public long /*int*/ method7(long /*int*/[] args) {return get_nSelections(args[0]);}
- @Override
- public long /*int*/ method8(long /*int*/[] args) {return get_offsetAtPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3]);}
- @Override
- public long /*int*/ method9(long /*int*/[] args) {return get_selection((int)/*64*/args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method10(long /*int*/[] args) {return get_text((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
- @Override
- public long /*int*/ method11(long /*int*/[] args) {return get_textBeforeOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
- @Override
- public long /*int*/ method12(long /*int*/[] args) {return get_textAfterOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
- @Override
- public long /*int*/ method13(long /*int*/[] args) {return get_textAtOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
- @Override
- public long /*int*/ method14(long /*int*/[] args) {return removeSelection((int)/*64*/args[0]);}
- @Override
- public long /*int*/ method15(long /*int*/[] args) {return setCaretOffset((int)/*64*/args[0]);}
- @Override
- public long /*int*/ method16(long /*int*/[] args) {return setSelection((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
- @Override
- public long /*int*/ method17(long /*int*/[] args) {return get_nCharacters(args[0]);}
- @Override
- public long /*int*/ method18(long /*int*/[] args) {return scrollSubstringTo((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
- @Override
- public long /*int*/ method19(long /*int*/[] args) {return scrollSubstringToPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4]);}
- @Override
- public long /*int*/ method20(long /*int*/[] args) {return get_newText(args[0]);}
- @Override
- public long /*int*/ method21(long /*int*/[] args) {return get_oldText(args[0]);}
+ public long method11(long[] args) {return get_table(args[0]);}
};
}
void createIAccessibleValue() {
objIAccessibleValue = new COMObject(new int[] {2,0,0,1,1,1,1}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return get_currentValue(args[0]);}
+ public long method3(long[] args) {return get_currentValue(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return setCurrentValue(args[0]);}
+ public long method4(long[] args) {return setCurrentValue(args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_maximumValue(args[0]);}
+ public long method5(long[] args) {return get_maximumValue(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_minimumValue(args[0]);}
+ public long method6(long[] args) {return get_minimumValue(args[0]);}
};
- /* Dereference VARIANT struct parameters. */
- long /*int*/ ppVtable = objIAccessibleValue.ppVtable;
- long /*int*/[] pVtable = new long /*int*/[1];
- OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF);
- long /*int*/[] funcs = new long /*int*/[7];
- OS.MoveMemory(funcs, pVtable[0], C.PTR_SIZEOF * funcs.length);
- funcs[4] = COM.CALLBACK_setCurrentValue(funcs[4]);
- OS.MoveMemory(pVtable[0], funcs, C.PTR_SIZEOF * funcs.length);
}
void createIEnumVARIANT() {
objIEnumVARIANT = new COMObject(new int[] {2,0,0,3,1,0,1}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return Next((int)/*64*/args[0], args[1], args[2]);}
+ public long method3(long[] args) {return Next((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return Skip((int)/*64*/args[0]);}
+ public long method4(long[] args) {return Skip((int)args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return Reset();}
+ public long method5(long[] args) {return Reset();}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return Clone(args[0]);}
+ public long method6(long[] args) {return Clone(args[0]);}
};
}
void createIServiceProvider() {
objIServiceProvider = new COMObject(new int[] {2,0,0,3}) {
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- @Override
- public long /*int*/ method3(long /*int*/[] args) {return QueryService(args[0], args[1], args[2]);}
+ @Override
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
+ @Override
+ public long method1(long[] args) {return AddRef();}
+ @Override
+ public long method2(long[] args) {return Release();}
+ @Override
+ public long method3(long[] args) {return QueryService(args[0], args[1], args[2]);}
};
}
@@ -891,10 +695,10 @@ public class Accessible {
* @since 3.7
*/
public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners == null) accessibleEditableTextListeners = new ArrayList<>();
- accessibleEditableTextListeners.add(listener);
+ accessibleEditableTextListeners.add(listener);
}
/**
@@ -1078,7 +882,7 @@ public class Accessible {
parent = null;
}
- long /*int*/ getAddress() {
+ long getAddress() {
/* The address of an Accessible is the address of its IAccessible COMObject. */
if (objIAccessible == null) createIAccessible();
return objIAccessible.getAddress();
@@ -1112,9 +916,9 @@ public class Accessible {
}
iaccessible = null;
Release();
- for (int i = 0; i < children.size(); i++) {
- Accessible child = children.get(i);
- child.dispose();
+ List<Accessible> list = new ArrayList<>(children);
+ for (Accessible accChild : list) {
+ accChild.dispose();
}
}
@@ -1130,9 +934,9 @@ public class Accessible {
*
* @noreference This method is not intended to be referenced by clients.
*/
- public long /*int*/ internal_WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
+ public long internal_WM_GETOBJECT (long wParam, long lParam) {
if (objIAccessible == null) return 0;
- if ((int)/*64*/lParam == OS.OBJID_CLIENT) {
+ if ((int)lParam == OS.OBJID_CLIENT) {
/* LresultFromObject([in] riid, [in] wParam, [in] pAcc)
* The argument pAcc is owned by the caller so reference count does not
* need to be incremented.
@@ -1288,12 +1092,12 @@ public class Accessible {
* @since 3.7
*/
public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (accessibleEditableTextListeners != null) {
- accessibleEditableTextListeners.remove(listener);
- if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
- }
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (accessibleEditableTextListeners != null) {
+ accessibleEditableTextListeners.remove(listener);
+ if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
+ }
}
/**
@@ -1799,22 +1603,15 @@ public class Accessible {
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
- int QueryInterface(long /*int*/ iid, long /*int*/ ppvObject) {
+ int QueryInterface(long iid, long ppvObject) {
if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED;
- OS.MoveMemory(ppvObject, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { 0 }, C.PTR_SIZEOF);
GUID guid = new GUID();
COM.MoveMemory(guid, iid, GUID.sizeof);
- if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] { getAddress() }, C.PTR_SIZEOF);
- AddRef();
- if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + getAddress() + hresult(COM.S_OK));
- return COM.S_OK;
- }
-
- if (COM.IsEqualGUID(guid, COM.IIDIDispatch) || COM.IsEqualGUID(guid, COM.IIDIAccessible)) {
+ if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch) || COM.IsEqualGUID(guid, COM.IIDIAccessible)) {
if (objIAccessible == null) createIAccessible();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessible.getAddress() }, C.PTR_SIZEOF);
AddRef();
if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIAccessible.getAddress() + hresult(COM.S_OK));
return COM.S_OK;
@@ -1822,7 +1619,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIEnumVARIANT)) {
if (objIEnumVARIANT == null) createIEnumVARIANT();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIEnumVARIANT.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIEnumVARIANT.getAddress() }, C.PTR_SIZEOF);
AddRef();
enumIndex = 0;
if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIEnumVARIANT.getAddress() + hresult(COM.S_OK));
@@ -1837,7 +1634,7 @@ public class Accessible {
accessibleValueListenersSize() > 0 || accessibleControlListenersSize() > 0 || getRelationCount() > 0
|| (control instanceof Button && ((control.getStyle() & SWT.RADIO) != 0)) || (control instanceof Composite)) {
if (objIServiceProvider == null) createIServiceProvider();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIServiceProvider.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIServiceProvider.getAddress() }, C.PTR_SIZEOF);
AddRef();
if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIServiceProvider.getAddress() + hresult(COM.S_OK));
return COM.S_OK;
@@ -1854,7 +1651,7 @@ public class Accessible {
if (iaccessible != null) {
/* Forward any other GUIDs to the OS proxy. */
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
code = iaccessible.QueryInterface(guid, ppv);
OS.MoveMemory(ppvObject, ppv, C.PTR_SIZEOF);
if (DEBUG) if (interesting(guid)) print("QueryInterface guid=" + guidString(guid) + " returning super" + hresult(code));
@@ -1930,14 +1727,6 @@ public class Accessible {
objIServiceProvider.dispose();
objIServiceProvider = null;
- if (objIAccessible2 != null)
- objIAccessible2.dispose();
- objIAccessible2 = null;
-
- if (objIAccessibleAction != null)
- objIAccessibleAction.dispose();
- objIAccessibleAction = null;
-
if (objIAccessibleApplication != null)
objIAccessibleApplication.dispose();
objIAccessibleApplication = null;
@@ -1972,16 +1761,12 @@ public class Accessible {
objIAccessibleTableCell.dispose();
objIAccessibleTableCell = null;
- if (objIAccessibleText != null)
- objIAccessibleText.dispose();
- objIAccessibleText = null;
-
if (objIAccessibleValue != null)
objIAccessibleValue.dispose();
objIAccessibleValue = null;
- for (int i = 0; i < relations.length; i++) {
- if (relations[i] != null) relations[i].Release();
+ for (Relation relation : relations) {
+ if (relation != null) relation.Release();
}
// TODO: also remove all relations for which 'this' is a target??
}
@@ -1989,18 +1774,18 @@ public class Accessible {
}
/* QueryService([in] guidService, [in] riid, [out] ppvObject) */
- int QueryService(long /*int*/ guidService, long /*int*/ riid, long /*int*/ ppvObject) {
- OS.MoveMemory(ppvObject, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ int QueryService(long guidService, long riid, long ppvObject) {
+ OS.MoveMemory(ppvObject, new long[] { 0 }, C.PTR_SIZEOF);
GUID service = new GUID();
COM.MoveMemory(service, guidService, GUID.sizeof);
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(service, COM.IIDIAccessible)) {
- if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch) | COM.IsEqualGUID(guid, COM.IIDIAccessible)) {
+ if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch) || COM.IsEqualGUID(guid, COM.IIDIAccessible)) {
if (objIAccessible == null) createIAccessible();
if (DEBUG) print(this + ".QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning " + objIAccessible.getAddress() + hresult(COM.S_OK));
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessible.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2021,11 +1806,11 @@ public class Accessible {
if (iaccessible != null) {
/* Forward any other GUIDs to the OS proxy. */
- long /*int*/ [] ppv = new long /*int*/ [1];
+ long [] ppv = new long [1];
int code = iaccessible.QueryInterface(COM.IIDIServiceProvider, ppv);
if (code == COM.S_OK) {
IServiceProvider iserviceProvider = new IServiceProvider(ppv[0]);
- long /*int*/ [] ppvx = new long /*int*/ [1];
+ long [] ppvx = new long [1];
code = iserviceProvider.QueryService(service, guid, ppvx);
OS.MoveMemory(ppvObject, ppvx, C.PTR_SIZEOF);
if (DEBUG) if (interesting(service) && interesting(guid)) print("QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning super" + hresult(code));
@@ -2037,7 +1822,7 @@ public class Accessible {
return COM.E_NOINTERFACE;
}
- int queryAccessible2Interfaces(GUID guid, long /*int*/ ppvObject) {
+ int queryAccessible2Interfaces(GUID guid, long ppvObject) {
if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED;
if (COM.IsEqualGUID(guid, COM.IIDIAccessible2)) {
if (accessibleActionListenersSize() > 0 || accessibleAttributeListenersSize() > 0 ||
@@ -2045,8 +1830,9 @@ public class Accessible {
accessibleTableCellListenersSize() > 0 || accessibleTextExtendedListenersSize() > 0 ||
accessibleValueListenersSize() > 0 || accessibleControlListenersSize() > 0 || getRelationCount() > 0
|| (control instanceof Button && ((control.getStyle() & SWT.RADIO) != 0)) || (control instanceof Composite)) {
- if (objIAccessible2 == null) createIAccessible2();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessible2.getAddress() }, C.PTR_SIZEOF);
+ // NOTE: IAccessible2 vtable is shared with IAccessible
+ if (objIAccessible == null) createIAccessible();
+ OS.MoveMemory(ppvObject, new long[] { objIAccessible.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2055,8 +1841,9 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleAction)) {
if (accessibleActionListenersSize() > 0) {
- if (objIAccessibleAction == null) createIAccessibleAction();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleAction.getAddress() }, C.PTR_SIZEOF);
+ // NOTE: IAccessibleAction vtable is shared with IAccessibleHyperlink
+ if (objIAccessibleHyperlink == null) createIAccessibleHyperlink();
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleHyperlink.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2065,7 +1852,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleApplication)) {
if (objIAccessibleApplication == null) createIAccessibleApplication();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleApplication.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleApplication.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2074,7 +1861,7 @@ public class Accessible {
// The following lines are intentionally commented. We are not supporting IAccessibleComponent at this time.
// if (accessibleControlListenersSize() > 0) { // TO DO: can we reduce the scope of this somehow?
// if (objIAccessibleComponent == null) createIAccessibleComponent();
-// COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleComponent.getAddress() }, OS.PTR_SIZEOF);
+// COM.MoveMemory(ppvObject, new long[] { objIAccessibleComponent.getAddress() }, OS.PTR_SIZEOF);
// AddRef();
// return COM.S_OK;
// }
@@ -2084,7 +1871,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleEditableText)) {
if (accessibleEditableTextListenersSize() > 0) {
if (objIAccessibleEditableText == null) createIAccessibleEditableText();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleEditableText.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleEditableText.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2094,7 +1881,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHyperlink)) {
if (accessibleHyperlinkListenersSize() > 0) {
if (objIAccessibleHyperlink == null) createIAccessibleHyperlink();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleHyperlink.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleHyperlink.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2104,7 +1891,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHypertext)) {
if (accessibleTextExtendedListenersSize() > 0) {
if (objIAccessibleHypertext == null) createIAccessibleHypertext();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleHypertext.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleHypertext.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2115,7 +1902,7 @@ public class Accessible {
// The following lines are intentionally commented. We are not supporting IAccessibleImage at this time.
// if (getRole() == ACC.ROLE_GRAPHIC && (accessibleAccessibleListenersSize() > 0 || accessibleControlListenersSize() > 0)) {
// if (objIAccessibleImage == null) createIAccessibleImage();
-// COM.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleImage.getAddress() }, OS.PTR_SIZEOF);
+// COM.MoveMemory(ppvObject, new long[] { objIAccessibleImage.getAddress() }, OS.PTR_SIZEOF);
// AddRef();
// return COM.S_OK;
// }
@@ -2130,7 +1917,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable2)) {
if (accessibleTableListenersSize() > 0) {
if (objIAccessibleTable2 == null) createIAccessibleTable2();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleTable2.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleTable2.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2140,7 +1927,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTableCell)) {
if (accessibleTableCellListenersSize() > 0) {
if (objIAccessibleTableCell == null) createIAccessibleTableCell();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleTableCell.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleTableCell.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2149,8 +1936,9 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleText)) {
if (accessibleTextExtendedListenersSize() > 0 || accessibleAttributeListenersSize() > 0) {
- if (objIAccessibleText == null) createIAccessibleText();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleText.getAddress() }, C.PTR_SIZEOF);
+ // NOTE: IAccessibleText vtable is shared with IAccessibleHypertext
+ if (objIAccessibleHypertext == null) createIAccessibleHypertext();
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleHypertext.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2160,7 +1948,7 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIAccessibleValue)) {
if (accessibleValueListenersSize() > 0) {
if (objIAccessibleValue == null) createIAccessibleValue();
- OS.MoveMemory(ppvObject, new long /*int*/[] { objIAccessibleValue.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { objIAccessibleValue.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -2171,7 +1959,7 @@ public class Accessible {
}
/* IAccessible::accDoDefaultAction([in] varChild) */
- int accDoDefaultAction(long /*int*/ varChild) {
+ int accDoDefaultAction(long varChild) {
if (DEBUG) print(this + ".IAccessible::accDoDefaultAction");
if (accessibleActionListenersSize() > 0) {
VARIANT v = getVARIANT(varChild);
@@ -2188,9 +1976,9 @@ public class Accessible {
}
/* IAccessible::accHitTest([in] xLeft, [in] yTop, [out] pvarChild) */
- int accHitTest(int xLeft, int yTop, long /*int*/ pvarChild) {
+ int accHitTest(int xLeft, int yTop, long pvarChild) {
int osChild = ACC.CHILDID_NONE;
- long /*int*/ osChildObject = 0;
+ long osChildObject = 0;
if (iaccessible != null) {
/* Get the default child at point (left, top) from the OS. */
int code = iaccessible.accHitTest(xLeft, yTop, pvarChild);
@@ -2240,7 +2028,7 @@ public class Accessible {
}
/* IAccessible::accLocation([out] pxLeft, [out] pyTop, [out] pcxWidth, [out] pcyHeight, [in] varChild) */
- int accLocation(long /*int*/ pxLeft, long /*int*/ pyTop, long /*int*/ pcxWidth, long /*int*/ pcyHeight, long /*int*/ varChild) {
+ int accLocation(long pxLeft, long pyTop, long pcxWidth, long pcyHeight, long varChild) {
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
int osLeft = 0, osTop = 0, osWidth = 0, osHeight = 0;
@@ -2281,7 +2069,7 @@ public class Accessible {
}
/* IAccessible::accNavigate([in] navDir, [in] varStart, [out] pvarEndUpAt) */
- int accNavigate(int navDir, long /*int*/ varStart, long /*int*/ pvarEndUpAt) {
+ int accNavigate(int navDir, long varStart, long pvarEndUpAt) {
if (DEBUG) print(this + ".IAccessible::accNavigate");
/* MSAA: "The accNavigate method is deprecated and should not be used." */
int code = COM.DISP_E_MEMBERNOTFOUND;
@@ -2296,7 +2084,7 @@ public class Accessible {
// TODO: Consider supporting this in future.
/* IAccessible::accSelect([in] flagsSelect, [in] varChild) */
- int accSelect(int flagsSelect, long /*int*/ varChild) {
+ int accSelect(int flagsSelect, long varChild) {
int code = COM.DISP_E_MEMBERNOTFOUND;
if (iaccessible != null) {
/* Currently, we don't expose this as API. Forward to the proxy. */
@@ -2311,13 +2099,13 @@ public class Accessible {
* Ownership of ppdispChild transfers from callee to caller so reference count on ppdispChild
* must be incremented before returning. The caller is responsible for releasing ppdispChild.
*/
- int get_accChild(long /*int*/ varChild, long /*int*/ ppdispChild) {
+ int get_accChild(long varChild, long ppdispChild) {
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
if (v.lVal == COM.CHILDID_SELF) {
if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning " + getAddress() + hresult(COM.S_OK));
AddRef();
- OS.MoveMemory(ppdispChild, new long /*int*/[] { getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppdispChild, new long[] { getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
final int childID = osToChildID(v.lVal);
@@ -2331,11 +2119,10 @@ public class Accessible {
ToolBar toolBar = (ToolBar) control;
final ToolItem item = toolBar.getItem(childID);
if (item != null && (item.getStyle() & SWT.DROP_DOWN) != 0) {
- long /*int*/[] addr = new long /*int*/[1];
+ long[] addr = new long[1];
OS.MoveMemory(addr, ppdispChild, C.PTR_SIZEOF);
boolean found = false;
- for (int i = 0; i < children.size(); i++) {
- Accessible accChild = children.get(i);
+ for (Accessible accChild : children) {
if (accChild.item == item) {
/*
* MSAA uses a new accessible for the child
@@ -2351,8 +2138,8 @@ public class Accessible {
osAccessible.item = item;
if (!found) {
item.addListener(SWT.Dispose, e -> {
- for (int i = 0; i < children.size(); i++) {
- Accessible accChild = children.get(i);
+ List<Accessible> list = new ArrayList<>(children);
+ for (Accessible accChild : list) {
if (accChild.item == item) {
accChild.dispose();
}
@@ -2388,7 +2175,7 @@ public class Accessible {
if (accessible != null) {
if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning " + accessible.getAddress() + hresult(COM.S_OK));
accessible.AddRef();
- OS.MoveMemory(ppdispChild, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppdispChild, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning from super" + hresult(code));
@@ -2396,7 +2183,7 @@ public class Accessible {
}
/* IAccessible::get_accChildCount([out] pcountChildren) */
- int get_accChildCount(long /*int*/ pcountChildren) {
+ int get_accChildCount(long pcountChildren) {
int osChildCount = 0;
if (iaccessible != null) {
/* Get the default child count from the OS. */
@@ -2425,7 +2212,7 @@ public class Accessible {
}
/* IAccessible::get_accDefaultAction([in] varChild, [out] pszDefaultAction) */
- int get_accDefaultAction(long /*int*/ varChild, long /*int*/ pszDefaultAction) {
+ int get_accDefaultAction(long varChild, long pszDefaultAction) {
if (DEBUG) print(this + ".IAccessible::get_accDefaultAction");
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -2437,7 +2224,7 @@ public class Accessible {
if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
if (accessibleControlListenersSize() == 0) return code;
if (code == COM.S_OK) {
- long /*int*/[] pDefaultAction = new long /*int*/[1];
+ long[] pDefaultAction = new long[1];
OS.MoveMemory(pDefaultAction, pszDefaultAction, C.PTR_SIZEOF);
int size = COM.SysStringByteLen(pDefaultAction[0]);
if (size > 0) {
@@ -2465,7 +2252,7 @@ public class Accessible {
}
/* IAccessible::get_accDescription([in] varChild, [out] pszDescription) */
- int get_accDescription(long /*int*/ varChild, long /*int*/ pszDescription) {
+ int get_accDescription(long varChild, long pszDescription) {
/*
* MSAA: "The accDescription property is not supported in the transition to
* UI Automation. MSAA servers and applications should not use it."
@@ -2490,7 +2277,7 @@ public class Accessible {
return code;
}
if (code == COM.S_OK) {
- long /*int*/[] pDescription = new long /*int*/[1];
+ long[] pDescription = new long[1];
OS.MoveMemory(pDescription, pszDescription, C.PTR_SIZEOF);
int size = COM.SysStringByteLen(pDescription[0]);
if (size > 0) {
@@ -2514,11 +2301,11 @@ public class Accessible {
Tree tree = (Tree) control;
int columnCount = tree.getColumnCount ();
if (columnCount > 1) {
- long /*int*/ hwnd = control.handle, hItem = 0;
+ long hwnd = control.handle, hItem = 0;
hItem = OS.SendMessage (hwnd, OS.TVM_MAPACCIDTOHTREEITEM, v.lVal, 0);
Widget widget = tree.getDisplay ().findWidget (hwnd, hItem);
event.result = "";
- if (widget != null && widget instanceof TreeItem) {
+ if (widget instanceof TreeItem) {
TreeItem item = (TreeItem) widget;
for (int i = 1; i < columnCount; i++) {
if (tree.isDisposed() || item.isDisposed()) {
@@ -2547,7 +2334,7 @@ public class Accessible {
* Ownership of pvarChild transfers from callee to caller so reference count on pvarChild
* must be incremented before returning. The caller is responsible for releasing pvarChild.
*/
- int get_accFocus(long /*int*/ pvarChild) {
+ int get_accFocus(long pvarChild) {
int osChild = ACC.CHILDID_NONE;
if (iaccessible != null) {
/* Get the default focus child from the OS. */
@@ -2595,7 +2382,7 @@ public class Accessible {
}
/* IAccessible::get_accHelp([in] varChild, [out] pszHelp) */
- int get_accHelp(long /*int*/ varChild, long /*int*/ pszHelp) {
+ int get_accHelp(long varChild, long pszHelp) {
if (DEBUG) print(this + ".IAccessible::get_accHelp");
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -2607,7 +2394,7 @@ public class Accessible {
if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
if (accessibleListenersSize() == 0) return code;
if (code == COM.S_OK) {
- long /*int*/[] pHelp = new long /*int*/[1];
+ long[] pHelp = new long[1];
OS.MoveMemory(pHelp, pszHelp, C.PTR_SIZEOF);
int size = COM.SysStringByteLen(pHelp[0]);
if (size > 0) {
@@ -2632,7 +2419,7 @@ public class Accessible {
}
/* IAccessible::get_accHelpTopic([out] pszHelpFile, [in] varChild, [out] pidTopic) */
- int get_accHelpTopic(long /*int*/ pszHelpFile, long /*int*/ varChild, long /*int*/ pidTopic) {
+ int get_accHelpTopic(long pszHelpFile, long varChild, long pidTopic) {
if (DEBUG) print(this + ".IAccessible::get_accHelpTopic");
/* MSAA: "The accHelpTopic property is deprecated and should not be used." */
int code = COM.DISP_E_MEMBERNOTFOUND;
@@ -2646,7 +2433,7 @@ public class Accessible {
}
/* IAccessible::get_accKeyboardShortcut([in] varChild, [out] pszKeyboardShortcut) */
- int get_accKeyboardShortcut(long /*int*/ varChild, long /*int*/ pszKeyboardShortcut) {
+ int get_accKeyboardShortcut(long varChild, long pszKeyboardShortcut) {
if (DEBUG) print(this + ".IAccessible::get_accKeyboardShortcut");
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -2659,7 +2446,7 @@ public class Accessible {
/* Process TabFolder even if there are no apps listening. */
if (accessibleListenersSize() == 0 && !(control instanceof TabFolder)) return code;
if (code == COM.S_OK) {
- long /*int*/[] pKeyboardShortcut = new long /*int*/[1];
+ long[] pKeyboardShortcut = new long[1];
OS.MoveMemory(pKeyboardShortcut, pszKeyboardShortcut, C.PTR_SIZEOF);
int size = COM.SysStringByteLen(pKeyboardShortcut[0]);
if (size > 0) {
@@ -2688,7 +2475,7 @@ public class Accessible {
}
/* IAccessible::get_accName([in] varChild, [out] pszName) */
- int get_accName(long /*int*/ varChild, long /*int*/ pszName) {
+ int get_accName(long varChild, long pszName) {
if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED;
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -2698,7 +2485,7 @@ public class Accessible {
/* Get the default name from the OS. */
code = iaccessible.get_accName(varChild, pszName);
if (code == COM.S_OK) {
- long /*int*/[] pName = new long /*int*/[1];
+ long[] pName = new long[1];
OS.MoveMemory(pName, pszName, C.PTR_SIZEOF);
int size = COM.SysStringByteLen(pName[0]);
if (size > 0) {
@@ -2742,7 +2529,7 @@ public class Accessible {
* Ownership of ppdispParent transfers from callee to caller so reference count on ppdispParent
* must be incremented before returning. The caller is responsible for releasing ppdispParent.
*/
- int get_accParent(long /*int*/ ppdispParent) {
+ int get_accParent(long ppdispParent) {
int code = COM.DISP_E_MEMBERNOTFOUND;
if (iaccessible != null) {
/* Currently, we don't expose this as API. Forward to the proxy. */
@@ -2751,7 +2538,7 @@ public class Accessible {
if (parent != null) {
/* For lightweight accessibles, return the accessible's parent. */
parent.AddRef();
- OS.MoveMemory(ppdispParent, new long /*int*/[] { parent.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppdispParent, new long[] { parent.getAddress() }, C.PTR_SIZEOF);
code = COM.S_OK;
}
if (DEBUG) print(this + ".IAccessible::get_accParent() returning" + (parent != null ? " " + parent.getAddress() : " from super") + hresult(code));
@@ -2759,7 +2546,7 @@ public class Accessible {
}
/* IAccessible::get_accRole([in] varChild, [out] pvarRole) */
- int get_accRole(long /*int*/ varChild, long /*int*/ pvarRole) {
+ int get_accRole(long varChild, long pvarRole) {
if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED;
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -2795,10 +2582,10 @@ public class Accessible {
* Ownership of pvarChildren transfers from callee to caller so reference count on pvarChildren
* must be incremented before returning. The caller is responsible for releasing pvarChildren.
*/
- int get_accSelection(long /*int*/ pvarChildren) {
+ int get_accSelection(long pvarChildren) {
if (DEBUG) print(this + ".IAccessible::get_accSelection");
int osChild = ACC.CHILDID_NONE;
- long /*int*/ osChildObject = 0;
+ long osChildObject = 0;
if (iaccessible != null) {
/* Get the default selection from the OS. */
int code = iaccessible.get_accSelection(pvarChildren);
@@ -2850,7 +2637,7 @@ public class Accessible {
}
/* IAccessible::get_accState([in] varChild, [out] pvarState) */
- int get_accState(long /*int*/ varChild, long /*int*/ pvarState) {
+ int get_accState(long varChild, long pvarState) {
if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED;
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -2873,12 +2660,12 @@ public class Accessible {
* images, so we need to determine if the item state is 'checked'. */
if (v.lVal != COM.CHILDID_SELF) {
if (control instanceof Tree && (control.getStyle() & SWT.CHECK) != 0) {
- long /*int*/ hwnd = control.handle;
+ long hwnd = control.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_MAPACCIDTOHTREEITEM, v.lVal, 0);
- long /*int*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ long result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
boolean checked = (result != 0) && (((tvItem.state >> 12) & 1) == 0);
if (checked) event.detail |= ACC.STATE_CHECKED;
grayed = tvItem.state >> 12 > 2;
@@ -2907,7 +2694,7 @@ public class Accessible {
}
/* IAccessible::get_accValue([in] varChild, [out] pszValue) */
- int get_accValue(long /*int*/ varChild, long /*int*/ pszValue) {
+ int get_accValue(long varChild, long pszValue) {
if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED;
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -2917,7 +2704,7 @@ public class Accessible {
/* Get the default value string from the OS. */
code = iaccessible.get_accValue(varChild, pszValue);
if (code == COM.S_OK) {
- long /*int*/[] pValue = new long /*int*/[1];
+ long[] pValue = new long[1];
OS.MoveMemory(pValue, pszValue, C.PTR_SIZEOF);
int size = COM.SysStringByteLen(pValue[0]);
if (size > 0) {
@@ -2958,13 +2745,13 @@ public class Accessible {
}
/* put_accName([in] varChild, [in] szName) */
- int put_accName(long /*int*/ varChild, long /*int*/ szName) {
+ int put_accName(long varChild, long szName) {
/* MSAA: "The IAccessible::put_accName method is no longer supported. Servers should return E_NOTIMPL." */
return COM.E_NOTIMPL;
}
/* put_accValue([in] varChild, [in] szValue) */
- int put_accValue(long /*int*/ varChild, long /*int*/ szValue) {
+ int put_accValue(long varChild, long szValue) {
/* MSAA: this method is supported for some UI elements (usually edit controls). */
VARIANT v = getVARIANT(varChild);
if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
@@ -3011,13 +2798,13 @@ public class Accessible {
* Ownership of rgvar transfers from callee to caller so reference count on rgvar
* must be incremented before returning. The caller is responsible for releasing rgvar.
*/
- int Next(int celt, long /*int*/ rgvar, long /*int*/ pceltFetched) {
+ int Next(int celt, long rgvar, long pceltFetched) {
if (DEBUG) print(this + ".IEnumVARIANT::Next");
/* If there are no listeners, query the proxy for
* its IEnumVariant, and get the Next items from it.
*/
if (iaccessible != null && accessibleControlListenersSize() == 0) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
if (code != COM.S_OK) return code;
IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
@@ -3085,7 +2872,7 @@ public class Accessible {
* for its IEnumVariant, and tell it to Skip.
*/
if (iaccessible != null && accessibleControlListenersSize() == 0) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
if (code != COM.S_OK) return code;
IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
@@ -3110,8 +2897,8 @@ public class Accessible {
* for its IEnumVariant, and tell it to Reset.
*/
if (iaccessible != null && accessibleControlListenersSize() == 0) {
- long /*int*/[] ppvObject = new long /*int*/[1];
- int code = (int)/*64*/iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
+ long[] ppvObject = new long[1];
+ int code = (int)iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
if (code != COM.S_OK) return code;
IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
code = ienumvariant.Reset();
@@ -3127,17 +2914,17 @@ public class Accessible {
* Ownership of ppEnum transfers from callee to caller so reference count on ppEnum
* must be incremented before returning. The caller is responsible for releasing ppEnum.
*/
- int Clone(long /*int*/ ppEnum) {
+ int Clone(long ppEnum) {
if (DEBUG) print(this + ".IEnumVARIANT::Clone");
/* If there are no listeners, query the proxy for
* its IEnumVariant, and get the Clone from it.
*/
if (iaccessible != null && accessibleControlListenersSize() == 0) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
if (code != COM.S_OK) return code;
IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
- long /*int*/ [] pEnum = new long /*int*/ [1];
+ long [] pEnum = new long [1];
code = ienumvariant.Clone(pEnum);
ienumvariant.Release();
OS.MoveMemory(ppEnum, pEnum, C.PTR_SIZEOF);
@@ -3145,13 +2932,13 @@ public class Accessible {
}
if (ppEnum == 0) return COM.E_INVALIDARG;
- OS.MoveMemory(ppEnum, new long /*int*/[] { objIEnumVARIANT.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppEnum, new long[] { objIEnumVARIANT.getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
/* IAccessible2::get_nRelations([out] pNRelations) */
- int get_nRelations(long /*int*/ pNRelations) {
+ int get_nRelations(long pNRelations) {
int count = getRelationCount();
if (DEBUG) print(this + ".IAccessible2::get_nRelations returning " + count + hresult(COM.S_OK));
OS.MoveMemory(pNRelations, new int [] { count }, 4);
@@ -3159,7 +2946,7 @@ public class Accessible {
}
/* IAccessible2::get_relation([in] relationIndex, [out] ppRelation) */
- int get_relation(int relationIndex, long /*int*/ ppRelation) {
+ int get_relation(int relationIndex, long ppRelation) {
int i = -1;
for (int type = 0; type < MAX_RELATION_TYPES; type++) {
Relation relation = relations[type];
@@ -3167,7 +2954,7 @@ public class Accessible {
if (i == relationIndex) {
if (DEBUG) print(this + ".IAccessible2::get_relation(" + relationIndex + ") returning " + relation.getAddress() + hresult(COM.S_OK));
relation.AddRef();
- OS.MoveMemory(ppRelation, new long /*int*/[] { relation.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppRelation, new long[] { relation.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
}
@@ -3176,14 +2963,14 @@ public class Accessible {
}
/* IAccessible2::get_relations([in] maxRelations, [out] ppRelations, [out] pNRelations) */
- int get_relations(int maxRelations, long /*int*/ ppRelations, long /*int*/ pNRelations) {
+ int get_relations(int maxRelations, long ppRelations, long pNRelations) {
int count = 0;
for (int type = 0; type < MAX_RELATION_TYPES; type++) {
if (count == maxRelations) break;
Relation relation = relations[type];
if (relation != null) {
relation.AddRef();
- OS.MoveMemory(ppRelations + count * C.PTR_SIZEOF, new long /*int*/[] { relation.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppRelations + count * C.PTR_SIZEOF, new long[] { relation.getAddress() }, C.PTR_SIZEOF);
count++;
}
}
@@ -3193,7 +2980,7 @@ public class Accessible {
}
/* IAccessible2::get_role([out] pRole) */
- int get_role(long /*int*/ pRole) {
+ int get_role(long pRole) {
int role = getRole();
if (role == 0) role = getDefaultRole();
if (DEBUG) print(this + ".IAccessible2::get_role() returning " + getRoleString(role) + hresult(COM.S_OK));
@@ -3216,7 +3003,7 @@ public class Accessible {
}
/* IAccessible2::get_groupPosition([out] pGroupLevel, [out] pSimilarItemsInGroup, [out] pPositionInGroup) */
- int get_groupPosition(long /*int*/ pGroupLevel, long /*int*/ pSimilarItemsInGroup, long /*int*/ pPositionInGroup) {
+ int get_groupPosition(long pGroupLevel, long pSimilarItemsInGroup, long pPositionInGroup) {
if (control != null && control.isDisposed()) return COM.CO_E_OBJNOTCONNECTED;
AccessibleAttributeEvent event = new AccessibleAttributeEvent(this);
event.groupLevel = event.groupCount = event.groupIndex = -1;
@@ -3230,11 +3017,9 @@ public class Accessible {
if (similarItemsInGroup == 0 && positionInGroup == 0) {
/* Determine position and count for radio buttons. */
if (control instanceof Button && ((control.getStyle() & SWT.RADIO) != 0)) {
- Control [] children = control.getParent().getChildren();
positionInGroup = 1;
similarItemsInGroup = 1;
- for (int i = 0; i < children.length; i++) {
- Control child = children[i];
+ for (Control child : control.getParent().getChildren()) {
if (child instanceof Button && ((child.getStyle() & SWT.RADIO) != 0)) {
if (child == control) positionInGroup = similarItemsInGroup;
else similarItemsInGroup++;
@@ -3251,7 +3036,7 @@ public class Accessible {
}
/* IAccessible2::get_states([out] pStates) */
- int get_states(long /*int*/ pStates) {
+ int get_states(long pStates) {
AccessibleControlEvent event = new AccessibleControlEvent(this);
event.childID = ACC.CHILDID_SELF;
for (int i = 0; i < accessibleControlListenersSize(); i++) {
@@ -3280,28 +3065,28 @@ public class Accessible {
}
/* IAccessible2::get_extendedRole([out] pbstrExtendedRole) */
- int get_extendedRole(long /*int*/ pbstrExtendedRole) {
+ int get_extendedRole(long pbstrExtendedRole) {
/* This feature is not supported. */
setString(pbstrExtendedRole, null);
return COM.S_FALSE;
}
/* IAccessible2::get_localizedExtendedRole([out] pbstrLocalizedExtendedRole) */
- int get_localizedExtendedRole(long /*int*/ pbstrLocalizedExtendedRole) {
+ int get_localizedExtendedRole(long pbstrLocalizedExtendedRole) {
/* This feature is not supported. */
setString(pbstrLocalizedExtendedRole, null);
return COM.S_FALSE;
}
/* IAccessible2::get_nExtendedStates([out] pNExtendedStates) */
- int get_nExtendedStates(long /*int*/ pNExtendedStates) {
+ int get_nExtendedStates(long pNExtendedStates) {
/* This feature is not supported. */
OS.MoveMemory(pNExtendedStates, new int [] { 0 }, 4);
return COM.S_OK;
}
/* IAccessible2::get_extendedStates([in] maxExtendedStates, [out] ppbstrExtendedStates, [out] pNExtendedStates) */
- int get_extendedStates(int maxExtendedStates, long /*int*/ ppbstrExtendedStates, long /*int*/ pNExtendedStates) {
+ int get_extendedStates(int maxExtendedStates, long ppbstrExtendedStates, long pNExtendedStates) {
/* This feature is not supported. */
setString(ppbstrExtendedStates, null);
OS.MoveMemory(pNExtendedStates, new int [] { 0 }, 4);
@@ -3309,7 +3094,7 @@ public class Accessible {
}
/* IAccessible2::get_localizedExtendedStates([in] maxLocalizedExtendedStates, [out] ppbstrLocalizedExtendedStates, [out] pNLocalizedExtendedStates) */
- int get_localizedExtendedStates(int maxLocalizedExtendedStates, long /*int*/ ppbstrLocalizedExtendedStates, long /*int*/ pNLocalizedExtendedStates) {
+ int get_localizedExtendedStates(int maxLocalizedExtendedStates, long ppbstrLocalizedExtendedStates, long pNLocalizedExtendedStates) {
/* This feature is not supported. */
setString(ppbstrLocalizedExtendedStates, null);
OS.MoveMemory(pNLocalizedExtendedStates, new int [] { 0 }, 4);
@@ -3317,22 +3102,22 @@ public class Accessible {
}
/* IAccessible2::get_uniqueID([out] pUniqueID) */
- int get_uniqueID(long /*int*/ pUniqueID) {
+ int get_uniqueID(long pUniqueID) {
if (uniqueID == -1) uniqueID = UniqueID--;
if (DEBUG) print(this + ".IAccessible2::get_uniqueID returning " + uniqueID + hresult(COM.S_OK));
- OS.MoveMemory(pUniqueID, new long /*int*/ [] { uniqueID }, 4);
+ OS.MoveMemory(pUniqueID, new long [] { uniqueID }, 4);
return COM.S_OK;
}
/* IAccessible2::get_windowHandle([out] pWindowHandle) */
- int get_windowHandle(long /*int*/ pWindowHandle) {
+ int get_windowHandle(long pWindowHandle) {
if (DEBUG) print(this + ".IAccessible2::get_windowHandle returning " + control.handle + hresult(COM.S_OK));
- OS.MoveMemory(pWindowHandle, new long /*int*/ [] { control.handle }, C.PTR_SIZEOF);
+ OS.MoveMemory(pWindowHandle, new long [] { control.handle }, C.PTR_SIZEOF);
return COM.S_OK;
}
/* IAccessible2::get_indexInParent([out] pIndexInParent) */
- int get_indexInParent(long /*int*/ pIndexInParent) {
+ int get_indexInParent(long pIndexInParent) {
AccessibleControlEvent event = new AccessibleControlEvent(this);
event.childID = ACC.CHILDID_CHILD_INDEX;
event.detail = -1;
@@ -3350,20 +3135,20 @@ public class Accessible {
// */
// // TODO: finish this. See also get_groupPosition
// this won't work because VARIANT.sizeof isn't big enough on 64-bit machines.
- // just create an long /*int*/ [] ppdispParent - it's not a variant anyhow...
-// long /*int*/ ppdispParent = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+ // just create an long [] ppdispParent - it's not a variant anyhow...
+// long ppdispParent = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
// int code = get_accParent(ppdispParent);
// if (code == COM.S_OK) {
// VARIANT v = getVARIANT(ppdispParent);
// if (v.vt == COM.VT_DISPATCH) {
// IAccessible accParent = new IAccessible(v.lVal);
-// long /*int*/ pcountChildren = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, 4);
+// long pcountChildren = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, 4);
// code = accParent.get_accChildCount(pcountChildren);
// if (code == COM.S_OK) {
// int [] childCount = new int[1];
// OS.MoveMemory(childCount, pcountChildren, 4);
// int[] pcObtained = new int[1];
-// long /*int*/ rgVarChildren = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof * childCount[0]);
+// long rgVarChildren = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof * childCount[0]);
// System.out.println("Asking for AccessibleChildren");
// code = COM.AccessibleChildren(accParent.getAddress(), 0, childCount[0], rgVarChildren, pcObtained);
// if (code == COM.S_OK) {
@@ -3392,28 +3177,28 @@ public class Accessible {
}
/* IAccessible2::get_locale([out] pLocale) */
- int get_locale(long /*int*/ pLocale) {
+ int get_locale(long pLocale) {
/* Return the default locale for the JVM. */
Locale locale = Locale.getDefault();
char[] data = (locale.getLanguage()+"\0").toCharArray();
- long /*int*/ ptr = COM.SysAllocString(data);
- OS.MoveMemory(pLocale, new long /*int*/[] {ptr}, C.PTR_SIZEOF);
+ long ptr = COM.SysAllocString(data);
+ OS.MoveMemory(pLocale, new long[] {ptr}, C.PTR_SIZEOF);
data = (locale.getCountry()+"\0").toCharArray();
ptr = COM.SysAllocString(data);
- OS.MoveMemory(pLocale + C.PTR_SIZEOF, new long /*int*/[] {ptr}, C.PTR_SIZEOF);
+ OS.MoveMemory(pLocale + C.PTR_SIZEOF, new long[] {ptr}, C.PTR_SIZEOF);
data = (locale.getVariant()+"\0").toCharArray();
ptr = COM.SysAllocString(data);
- OS.MoveMemory(pLocale + 2 * C.PTR_SIZEOF, new long /*int*/[] {ptr}, C.PTR_SIZEOF);
+ OS.MoveMemory(pLocale + 2 * C.PTR_SIZEOF, new long[] {ptr}, C.PTR_SIZEOF);
if (DEBUG) print(this + ".IAccessible2::get_locale() returning" + hresult(COM.S_OK));
return COM.S_OK;
}
/* IAccessible2::get_attributes([out] pbstrAttributes) */
- int get_attributes(long /*int*/ pbstrAttributes) {
+ int get_attributes(long pbstrAttributes) {
AccessibleAttributeEvent event = new AccessibleAttributeEvent(this);
for (int i = 0; i < accessibleAttributeListenersSize(); i++) {
AccessibleAttributeListener listener = accessibleAttributeListeners.get(i);
@@ -3425,8 +3210,8 @@ public class Accessible {
attributes += "margin-right:" + event.rightMargin + ";";
attributes += "margin-bottom:" + event.bottomMargin + ";";
if (event.tabStops != null) {
- for (int i = 0; i < event.tabStops.length; i++) {
- attributes += "tab-stop:position=" + event.tabStops[i] + ";";
+ for (int tabStop : event.tabStops) {
+ attributes += "tab-stop:position=" + tabStop + ";";
}
}
if (event.justify) attributes += "text-align:justify;";
@@ -3449,7 +3234,7 @@ public class Accessible {
}
/* IAccessibleAction::get_nActions([out] pNActions) */
- int get_nActions(long /*int*/ pNActions) {
+ int get_nActions(long pNActions) {
AccessibleActionEvent event = new AccessibleActionEvent(this);
for (int i = 0; i < accessibleActionListenersSize(); i++) {
AccessibleActionListener listener = accessibleActionListeners.get(i);
@@ -3474,7 +3259,7 @@ public class Accessible {
}
/* IAccessibleAction::get_description([in] actionIndex, [out] pbstrDescription) */
- int get_description(int actionIndex, long /*int*/ pbstrDescription) {
+ int get_description(int actionIndex, long pbstrDescription) {
AccessibleActionEvent event = new AccessibleActionEvent(this);
event.index = actionIndex;
for (int i = 0; i < accessibleActionListenersSize(); i++) {
@@ -3488,7 +3273,7 @@ public class Accessible {
}
/* IAccessibleAction::get_keyBinding([in] actionIndex, [in] nMaxBindings, [out] ppbstrKeyBindings, [out] pNBindings) */
- int get_keyBinding(int actionIndex, int nMaxBindings, long /*int*/ ppbstrKeyBindings, long /*int*/ pNBindings) {
+ int get_keyBinding(int actionIndex, int nMaxBindings, long ppbstrKeyBindings, long pNBindings) {
AccessibleActionEvent event = new AccessibleActionEvent(this);
event.index = actionIndex;
for (int i = 0; i < accessibleActionListenersSize(); i++) {
@@ -3520,7 +3305,7 @@ public class Accessible {
}
/* IAccessibleAction::get_name([in] actionIndex, [out] pbstrName) */
- int get_name(int actionIndex, long /*int*/ pbstrName) {
+ int get_name(int actionIndex, long pbstrName) {
AccessibleActionEvent event = new AccessibleActionEvent(this);
event.index = actionIndex;
event.localized = false;
@@ -3538,7 +3323,7 @@ public class Accessible {
}
/* IAccessibleAction::get_localizedName([in] actionIndex, [out] pbstrLocalizedName) */
- int get_localizedName(int actionIndex, long /*int*/ pbstrLocalizedName) {
+ int get_localizedName(int actionIndex, long pbstrLocalizedName) {
AccessibleActionEvent event = new AccessibleActionEvent(this);
event.index = actionIndex;
event.localized = true;
@@ -3556,7 +3341,7 @@ public class Accessible {
}
/* IAccessibleApplication::get_appName([out] pbstrName) */
- int get_appName(long /*int*/ pbstrName) {
+ int get_appName(long pbstrName) {
String appName = Display.getAppName();
if (DEBUG) print(this + ".IAccessibleApplication::get_appName() returning " + appName + hresult(appName == null || appName.length() == 0 ? COM.S_FALSE : COM.S_OK));
if (appName == null || appName.length() == 0) {
@@ -3568,7 +3353,7 @@ public class Accessible {
}
/* IAccessibleApplication::get_appVersion([out] pbstrVersion) */
- int get_appVersion(long /*int*/ pbstrVersion) {
+ int get_appVersion(long pbstrVersion) {
String appVersion = Display.getAppVersion();
if (DEBUG) print(this + ".IAccessibleApplication::get_appVersion() returning" + appVersion + hresult(appVersion == null || appVersion.length() == 0 ? COM.S_FALSE : COM.S_OK));
if (appVersion == null || appVersion.length() == 0) {
@@ -3580,7 +3365,7 @@ public class Accessible {
}
/* IAccessibleApplication::get_toolkitName([out] pbstrName) */
- int get_toolkitName(long /*int*/ pbstrName) {
+ int get_toolkitName(long pbstrName) {
String toolkitName = "SWT";
if (DEBUG) print(this + ".IAccessibleApplication::get_toolkitName() returning" + toolkitName + hresult(COM.S_OK));
setString(pbstrName, toolkitName);
@@ -3588,7 +3373,7 @@ public class Accessible {
}
/* IAccessibleApplication::get_toolkitVersion([out] pbstrVersion) */
- int get_toolkitVersion(long /*int*/ pbstrVersion) {
+ int get_toolkitVersion(long pbstrVersion) {
String toolkitVersion = "" + SWT.getVersion(); //$NON-NLS-1$
if (DEBUG) print(this + ".IAccessibleApplication::get_toolkitVersion() returning" + toolkitVersion + hresult(COM.S_OK));
setString(pbstrVersion, toolkitVersion);
@@ -3597,7 +3382,7 @@ public class Accessible {
// The following 3 method are intentionally commented. We are not providing IAccessibleComponent at this time.
// /* IAccessibleComponent::get_locationInParent([out] pX, [out] pY) */
-// int get_locationInParent(long /*int*/ pX, long /*int*/ pY) {
+// int get_locationInParent(long pX, long pY) {
// if (DEBUG) print(this + ".IAccessibleComponent::get_locationInParent");
// // TO DO: support transparently (hard for lightweight parents - screen vs. parent coords)
// AccessibleControlEvent event = new AccessibleControlEvent(this);
@@ -3611,7 +3396,7 @@ public class Accessible {
// }
//
// /* IAccessibleComponent::get_foreground([out] pForeground) */
-// int get_foreground(long /*int*/ pForeground) {
+// int get_foreground(long pForeground) {
// Color color = control.getForeground();
// if (DEBUG) print(this + ".IAccessibleComponent::get_foreground returning " + color.handle);
// COM.MoveMemory(pForeground, new int [] { color.handle }, 4);
@@ -3619,7 +3404,7 @@ public class Accessible {
// }
//
// /* IAccessibleComponent::get_background([out] pBackground) */
-// int get_background(long /*int*/ pBackground) {
+// int get_background(long pBackground) {
// Color color = control.getBackground();
// if (DEBUG) print(this + ".IAccessibleComponent::get_background returning " + color.handle);
// COM.MoveMemory(pBackground, new int [] { color.handle }, 4);
@@ -3656,7 +3441,7 @@ public class Accessible {
}
/* IAccessibleEditableText::insertText([in] offset, [in] pbstrText) */
- int insertText(int offset, long /*int*/ pbstrText) {
+ int insertText(int offset, long pbstrText) {
if (DEBUG) print(this + ".IAccessibleEditableText::insertText, offset=" + offset + ", pbstrText=" + pbstrText);
AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : offset;
@@ -3699,7 +3484,7 @@ public class Accessible {
}
/* IAccessibleEditableText::replaceText([in] startOffset, [in] endOffset, [in] pbstrText) */
- int replaceText(int startOffset, int endOffset, long /*int*/ pbstrText) {
+ int replaceText(int startOffset, int endOffset, long pbstrText) {
if (DEBUG) print(this + ".IAccessibleEditableText::replaceText, start=" + startOffset + ", end=" + endOffset + ", pbstrText=" + pbstrText);
AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
event.start = startOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : startOffset;
@@ -3714,7 +3499,7 @@ public class Accessible {
}
/* IAccessibleEditableText::setAttributes([in] startOffset, [in] endOffset, [in] pbstrAttributes) */
- int setAttributes(int startOffset, int endOffset, long /*int*/ pbstrAttributes) {
+ int setAttributes(int startOffset, int endOffset, long pbstrAttributes) {
if (DEBUG) print(this + ".IAccessibleEditableText::setAttributes, start=" + startOffset + ", end=" + endOffset + ", pbstrAttributes=" + pbstrAttributes);
AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(this);
String string = getString(pbstrAttributes);
@@ -3822,7 +3607,7 @@ public class Accessible {
}
/* IAccessibleHyperlink::get_anchor([in] index, [out] pAnchor) */
- int get_anchor(int index, long /*int*/ pAnchor) {
+ int get_anchor(int index, long pAnchor) {
if (DEBUG) print(this + ".IAccessibleHyperlink::get_anchor");
AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
event.index = index;
@@ -3842,7 +3627,7 @@ public class Accessible {
}
/* IAccessibleHyperlink::get_anchorTarget([in] index, [out] pAnchorTarget) */
- int get_anchorTarget(int index, long /*int*/ pAnchorTarget) {
+ int get_anchorTarget(int index, long pAnchorTarget) {
if (DEBUG) print(this + ".IAccessibleHyperlink::get_anchorTarget");
AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
event.index = index;
@@ -3862,7 +3647,7 @@ public class Accessible {
}
/* IAccessibleHyperlink::get_startIndex([out] pIndex) */
- int get_startIndex(long /*int*/ pIndex) {
+ int get_startIndex(long pIndex) {
if (DEBUG) print(this + ".IAccessibleHyperlink::get_startIndex");
AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
for (int i = 0; i < accessibleHyperlinkListenersSize(); i++) {
@@ -3874,7 +3659,7 @@ public class Accessible {
}
/* IAccessibleHyperlink::get_endIndex([out] pIndex) */
- int get_endIndex(long /*int*/ pIndex) {
+ int get_endIndex(long pIndex) {
if (DEBUG) print(this + ".IAccessibleHyperlink::get_endIndex");
AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
for (int i = 0; i < accessibleHyperlinkListenersSize(); i++) {
@@ -3886,13 +3671,13 @@ public class Accessible {
}
/* IAccessibleHyperlink::get_valid([out] pValid) */
- int get_valid(long /*int*/ pValid) {
+ int get_valid(long pValid) {
/* Deprecated. */
return COM.E_NOTIMPL;
}
/* IAccessibleHypertext::get_nHyperlinks([out] pHyperlinkCount) */
- int get_nHyperlinks(long /*int*/ pHyperlinkCount) {
+ int get_nHyperlinks(long pHyperlinkCount) {
if (DEBUG) print(this + ".IAccessibleHypertext::get_nHyperlinks");
AccessibleTextEvent event = new AccessibleTextEvent(this);
for (int i = 0; i < accessibleTextExtendedListenersSize(); i++) {
@@ -3904,7 +3689,7 @@ public class Accessible {
}
/* IAccessibleHypertext::get_hyperlink([in] index, [out] ppHyperlink) */
- int get_hyperlink(int index, long /*int*/ ppHyperlink) {
+ int get_hyperlink(int index, long ppHyperlink) {
if (DEBUG) print(this + ".IAccessibleHypertext::get_hyperlink");
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.index = index;
@@ -3918,12 +3703,12 @@ public class Accessible {
return COM.E_INVALIDARG;
}
accessible.AddRef();
- OS.MoveMemory(ppHyperlink, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppHyperlink, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
/* IAccessibleHypertext::get_hyperlinkIndex([in] charIndex, [out] pHyperlinkIndex) */
- int get_hyperlinkIndex(int charIndex, long /*int*/ pHyperlinkIndex) {
+ int get_hyperlinkIndex(int charIndex, long pHyperlinkIndex) {
if (DEBUG) print(this + ".IAccessibleHypertext::get_hyperlinkIndex");
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.offset = charIndex;
@@ -3939,7 +3724,7 @@ public class Accessible {
// The following 3 method are intentionally commented. We are not providing IAccessibleImage at this time.
// /* IAccessibleImage::get_description([out] pbstrDescription) */
-// int get_description(long /*int*/ pbstrDescription) {
+// int get_description(long pbstrDescription) {
// if (DEBUG) print(this + ".IAccessibleImage::get_description");
// // TO DO: Does it make sense to just reuse description?
// AccessibleEvent event = new AccessibleEvent(this);
@@ -3954,7 +3739,7 @@ public class Accessible {
// }
//
// /* IAccessibleImage::get_imagePosition([in] coordinateType, [out] pX, [out] pY) */
-// int get_imagePosition(int coordinateType, long /*int*/ pX, long /*int*/ pY) {
+// int get_imagePosition(int coordinateType, long pX, long pY) {
// if (DEBUG) print(this + ".IAccessibleImage::get_imagePosition");
// // TO DO: does it make sense to just reuse getLocation?
// AccessibleControlEvent event = new AccessibleControlEvent(this);
@@ -3969,7 +3754,7 @@ public class Accessible {
// }
//
// /* IAccessibleImage::get_imageSize([out] pHeight, [out] pWidth) */
-// int get_imageSize(long /*int*/ pHeight, long /*int*/ pWidth) {
+// int get_imageSize(long pHeight, long pWidth) {
// if (DEBUG) print(this + ".IAccessibleImage::get_imageSize");
// // TO DO: does it make sense to just reuse getLocation?
// AccessibleControlEvent event = new AccessibleControlEvent(this);
@@ -3983,7 +3768,7 @@ public class Accessible {
// }
/* IAccessibleTable2::get_cellAt([in] row, [in] column, [out] ppCell) */
- int get_cellAt(int row, int column, long /*int*/ ppCell) {
+ int get_cellAt(int row, int column, long ppCell) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
event.row = row;
event.column = column;
@@ -3995,12 +3780,12 @@ public class Accessible {
if (DEBUG) print(this + ".IAccessibleTable2::get_cellAt(row=" + row + ", column=" + column + ") returning " + accessible);
if (accessible == null) return COM.E_INVALIDARG;
accessible.AddRef();
- OS.MoveMemory(ppCell, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppCell, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
/* IAccessibleTable2::get_caption([out] ppAccessible) */
- int get_caption(long /*int*/ ppAccessible) {
+ int get_caption(long ppAccessible) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4009,16 +3794,16 @@ public class Accessible {
Accessible accessible = event.accessible;
if (DEBUG) print(this + ".IAccessibleTable2::get_caption() returning " + accessible);
if (accessible == null) {
- OS.MoveMemory(ppAccessible, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppAccessible, new long[] { 0 }, C.PTR_SIZEOF);
return COM.S_FALSE;
}
accessible.AddRef();
- OS.MoveMemory(ppAccessible, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppAccessible, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
/* IAccessibleTable2::get_columnDescription([in] column, [out] pbstrDescription) */
- int get_columnDescription(int column, long /*int*/ pbstrDescription) {
+ int get_columnDescription(int column, long pbstrDescription) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
event.column = column;
for (int i = 0; i < accessibleTableListenersSize(); i++) {
@@ -4032,7 +3817,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_nColumns([out] pColumnCount) */
- int get_nColumns(long /*int*/ pColumnCount) {
+ int get_nColumns(long pColumnCount) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4044,7 +3829,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_nRows([out] pRowCount) */
- int get_nRows(long /*int*/ pRowCount) {
+ int get_nRows(long pRowCount) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4056,7 +3841,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_nSelectedCells([out] pCellCount) */
- int get_nSelectedCells(long /*int*/ pCellCount) {
+ int get_nSelectedCells(long pCellCount) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4068,7 +3853,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_nSelectedColumns([out] pColumnCount) */
- int get_nSelectedColumns(long /*int*/ pColumnCount) {
+ int get_nSelectedColumns(long pColumnCount) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4080,7 +3865,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_nSelectedRows([out] pRowCount) */
- int get_nSelectedRows(long /*int*/ pRowCount) {
+ int get_nSelectedRows(long pRowCount) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4092,7 +3877,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_rowDescription([in] row, [out] pbstrDescription) */
- int get_rowDescription(int row, long /*int*/ pbstrDescription) {
+ int get_rowDescription(int row, long pbstrDescription) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
event.row = row;
for (int i = 0; i < accessibleTableListenersSize(); i++) {
@@ -4106,7 +3891,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_selectedCells([out] ppCells, [out] pNSelectedCells) */
- int get_selectedCells(long /*int*/ ppCells, long /*int*/ pNSelectedCells) {
+ int get_selectedCells(long ppCells, long pNSelectedCells) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4114,28 +3899,28 @@ public class Accessible {
}
if (DEBUG) print(this + ".IAccessibleTable2::get_selectedCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]"));
if (event.accessibles == null || event.accessibles.length == 0) {
- OS.MoveMemory(ppCells, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppCells, new long[] { 0 }, C.PTR_SIZEOF);
OS.MoveMemory(pNSelectedCells, new int [] { 0 }, 4);
return COM.S_FALSE;
}
int length = event.accessibles.length;
- long /*int*/ pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF);
+ long pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF);
int count = 0;
for (int i = 0; i < length; i++) {
Accessible accessible = event.accessibles[i];
if (accessible != null) {
accessible.AddRef();
- OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
count++;
}
}
- OS.MoveMemory(ppCells, new long /*int*/ [] { pv }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppCells, new long [] { pv }, C.PTR_SIZEOF);
OS.MoveMemory(pNSelectedCells, new int [] { count }, 4);
return COM.S_OK;
}
/* IAccessibleTable2::get_selectedColumns([out] ppSelectedColumns, [out] pNColumns) */
- int get_selectedColumns(long /*int*/ ppSelectedColumns, long /*int*/ pNColumns) {
+ int get_selectedColumns(long ppSelectedColumns, long pNColumns) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4144,19 +3929,19 @@ public class Accessible {
int count = event.selected == null ? 0 : event.selected.length;
if (DEBUG) print(this + ".IAccessibleTable2::get_selectedColumns() returning " + (count == 0 ? "null" : "selected[" + count + "]"));
if (count == 0) {
- OS.MoveMemory(ppSelectedColumns, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppSelectedColumns, new long[] { 0 }, C.PTR_SIZEOF);
OS.MoveMemory(pNColumns, new int [] { 0 }, 4);
return COM.S_FALSE;
}
- long /*int*/ pv = OS.CoTaskMemAlloc(count * 4);
+ long pv = OS.CoTaskMemAlloc(count * 4);
OS.MoveMemory(pv, event.selected, count * 4);
- OS.MoveMemory(ppSelectedColumns, new long /*int*/ [] { pv }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppSelectedColumns, new long [] { pv }, C.PTR_SIZEOF);
OS.MoveMemory(pNColumns, new int [] { count }, 4);
return COM.S_OK;
}
/* IAccessibleTable2::get_selectedRows([out] ppSelectedRows, [out] pNRows) */
- int get_selectedRows(long /*int*/ ppSelectedRows, long /*int*/ pNRows) {
+ int get_selectedRows(long ppSelectedRows, long pNRows) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4165,19 +3950,19 @@ public class Accessible {
int count = event.selected == null ? 0 : event.selected.length;
if (DEBUG) print(this + ".IAccessibleTable2::get_selectedRows() returning " + (count == 0 ? "null" : "selected[" + count + "]"));
if (count == 0) {
- OS.MoveMemory(ppSelectedRows, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppSelectedRows, new long[] { 0 }, C.PTR_SIZEOF);
OS.MoveMemory(pNRows, new int [] { 0 }, 4);
return COM.S_FALSE;
}
- long /*int*/ pv = OS.CoTaskMemAlloc(count * 4);
+ long pv = OS.CoTaskMemAlloc(count * 4);
OS.MoveMemory(pv, event.selected, count * 4);
- OS.MoveMemory(ppSelectedRows, new long /*int*/ [] { pv }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppSelectedRows, new long [] { pv }, C.PTR_SIZEOF);
OS.MoveMemory(pNRows, new int [] { count }, 4);
return COM.S_OK;
}
/* IAccessibleTable2::get_summary([out] ppAccessible) */
- int get_summary(long /*int*/ ppAccessible) {
+ int get_summary(long ppAccessible) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
for (int i = 0; i < accessibleTableListenersSize(); i++) {
AccessibleTableListener listener = accessibleTableListeners.get(i);
@@ -4186,16 +3971,16 @@ public class Accessible {
Accessible accessible = event.accessible;
if (DEBUG) print(this + ".IAccessibleTable2::get_summary() returning " + accessible);
if (accessible == null) {
- OS.MoveMemory(ppAccessible, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppAccessible, new long[] { 0 }, C.PTR_SIZEOF);
return COM.S_FALSE;
}
accessible.AddRef();
- OS.MoveMemory(ppAccessible, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppAccessible, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
/* IAccessibleTable2::get_isColumnSelected([in] column, [out] pIsSelected) */
- int get_isColumnSelected(int column, long /*int*/ pIsSelected) {
+ int get_isColumnSelected(int column, long pIsSelected) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
event.column = column;
for (int i = 0; i < accessibleTableListenersSize(); i++) {
@@ -4208,7 +3993,7 @@ public class Accessible {
}
/* IAccessibleTable2::get_isRowSelected([in] row, [out] pIsSelected) */
- int get_isRowSelected(int row, long /*int*/ pIsSelected) {
+ int get_isRowSelected(int row, long pIsSelected) {
AccessibleTableEvent event = new AccessibleTableEvent(this);
event.row = row;
for (int i = 0; i < accessibleTableListenersSize(); i++) {
@@ -4273,10 +4058,10 @@ public class Accessible {
}
/* IAccessibleTable2::get_modelChange([out] pModelChange) */
- int get_modelChange(long /*int*/ pModelChange) {
+ int get_modelChange(long pModelChange) {
if (DEBUG) print(this + ".IAccessibleTable2::get_modelChange() returning " + (tableChange == null ? "null" : "tableChange=" + tableChange[0] + ", " + tableChange[1] + ", " + tableChange[2] + ", " + tableChange[3]));
if (tableChange == null) {
- OS.MoveMemory(pModelChange, new long /*int*/ [] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(pModelChange, new long [] { 0 }, C.PTR_SIZEOF);
return COM.S_FALSE;
}
OS.MoveMemory(pModelChange, tableChange, tableChange.length * 4);
@@ -4284,7 +4069,7 @@ public class Accessible {
}
/* IAccessibleTableCell::get_columnExtent([out] pNColumnsSpanned) */
- int get_columnExtent(long /*int*/ pNColumnsSpanned) {
+ int get_columnExtent(long pNColumnsSpanned) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4296,7 +4081,7 @@ public class Accessible {
}
/* IAccessibleTableCell::get_columnHeaderCells([out] ppCellAccessibles, [out] pNColumnHeaderCells) */
- int get_columnHeaderCells(long /*int*/ ppCellAccessibles, long /*int*/ pNColumnHeaderCells) {
+ int get_columnHeaderCells(long ppCellAccessibles, long pNColumnHeaderCells) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4304,28 +4089,28 @@ public class Accessible {
}
if (DEBUG) print(this + ".IAccessibleTableCell::get_columnHeaderCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]"));
if (event.accessibles == null || event.accessibles.length == 0) {
- OS.MoveMemory(ppCellAccessibles, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppCellAccessibles, new long[] { 0 }, C.PTR_SIZEOF);
OS.MoveMemory(pNColumnHeaderCells, new int [] { 0 }, 4);
return COM.S_FALSE;
}
int length = event.accessibles.length;
- long /*int*/ pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF);
+ long pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF);
int count = 0;
for (int i = 0; i < length; i++) {
Accessible accessible = event.accessibles[i];
if (accessible != null) {
accessible.AddRef();
- OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
count++;
}
}
- OS.MoveMemory(ppCellAccessibles, new long /*int*/ [] { pv }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppCellAccessibles, new long [] { pv }, C.PTR_SIZEOF);
OS.MoveMemory(pNColumnHeaderCells, new int [] { count }, 4);
return COM.S_OK;
}
/* IAccessibleTableCell::get_columnIndex([out] pColumnIndex) */
- int get_columnIndex(long /*int*/ pColumnIndex) {
+ int get_columnIndex(long pColumnIndex) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4337,7 +4122,7 @@ public class Accessible {
}
/* IAccessibleTableCell::get_rowExtent([out] pNRowsSpanned) */
- int get_rowExtent(long /*int*/ pNRowsSpanned) {
+ int get_rowExtent(long pNRowsSpanned) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4349,7 +4134,7 @@ public class Accessible {
}
/* IAccessibleTableCell::get_rowHeaderCells([out] ppCellAccessibles, [out] pNRowHeaderCells) */
- int get_rowHeaderCells(long /*int*/ ppCellAccessibles, long /*int*/ pNRowHeaderCells) {
+ int get_rowHeaderCells(long ppCellAccessibles, long pNRowHeaderCells) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4357,28 +4142,28 @@ public class Accessible {
}
if (DEBUG) print(this + ".IAccessibleTableCell::get_rowHeaderCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]"));
if (event.accessibles == null || event.accessibles.length == 0) {
- OS.MoveMemory(ppCellAccessibles, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppCellAccessibles, new long[] { 0 }, C.PTR_SIZEOF);
OS.MoveMemory(pNRowHeaderCells, new int [] { 0 }, 4);
return COM.S_FALSE;
}
int length = event.accessibles.length;
- long /*int*/ pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF);
+ long pv = OS.CoTaskMemAlloc(length * C.PTR_SIZEOF);
int count = 0;
for (int i = 0; i < length; i++) {
Accessible accessible = event.accessibles[i];
if (accessible != null) {
accessible.AddRef();
- OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(pv + i * C.PTR_SIZEOF, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
count++;
}
}
- OS.MoveMemory(ppCellAccessibles, new long /*int*/ [] { pv }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppCellAccessibles, new long [] { pv }, C.PTR_SIZEOF);
OS.MoveMemory(pNRowHeaderCells, new int [] { count }, 4);
return COM.S_OK;
}
/* IAccessibleTableCell::get_rowIndex([out] pRowIndex) */
- int get_rowIndex(long /*int*/ pRowIndex) {
+ int get_rowIndex(long pRowIndex) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4390,7 +4175,7 @@ public class Accessible {
}
/* IAccessibleTableCell::get_isSelected([out] pIsSelected) */
- int get_isSelected(long /*int*/ pIsSelected) {
+ int get_isSelected(long pIsSelected) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4402,7 +4187,7 @@ public class Accessible {
}
/* IAccessibleTableCell::get_rowColumnExtents([out] pRow, [out] pColumn, [out] pRowExtents, [out] pColumnExtents, [out] pIsSelected) */
- int get_rowColumnExtents(long /*int*/ pRow, long /*int*/ pColumn, long /*int*/ pRowExtents, long /*int*/ pColumnExtents, long /*int*/ pIsSelected) {
+ int get_rowColumnExtents(long pRow, long pColumn, long pRowExtents, long pColumnExtents, long pIsSelected) {
if (DEBUG) print(this + ".IAccessibleTableCell::get_rowColumnExtents");
// TODO: should we implement this? It is just a convenience function.
return COM.DISP_E_MEMBERNOTFOUND;
@@ -4419,7 +4204,7 @@ public class Accessible {
}
/* IAccessibleTableCell::get_table([out] ppTable) */
- int get_table(long /*int*/ ppTable) {
+ int get_table(long ppTable) {
AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
for (int i = 0; i < accessibleTableCellListenersSize(); i++) {
AccessibleTableCellListener listener = accessibleTableCellListeners.get(i);
@@ -4429,11 +4214,11 @@ public class Accessible {
if (DEBUG) print(this + ".IAccessibleTableCell::get_table() returning " + accessible);
if (accessible == null) {
// TODO: This is not supposed to return S_FALSE. We need to lookup the table role parent and return that.
- OS.MoveMemory(ppTable, new long /*int*/[] { 0 }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppTable, new long[] { 0 }, C.PTR_SIZEOF);
return COM.S_FALSE;
}
accessible.AddRef();
- OS.MoveMemory(ppTable, new long /*int*/[] { accessible.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppTable, new long[] { accessible.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
@@ -4452,7 +4237,7 @@ public class Accessible {
}
/* IAccessibleText::get_attributes([in] offset, [out] pStartOffset, [out] pEndOffset, [out] pbstrTextAttributes) */
- int get_attributes(int offset, long /*int*/ pStartOffset, long /*int*/ pEndOffset, long /*int*/ pbstrTextAttributes) {
+ int get_attributes(int offset, long pStartOffset, long pEndOffset, long pbstrTextAttributes) {
AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(this);
event.offset = offset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : offset;
for (int i = 0; i < accessibleAttributeListenersSize(); i++) {
@@ -4513,7 +4298,7 @@ public class Accessible {
}
/* IAccessibleText::get_caretOffset([out] pOffset) */
- int get_caretOffset(long /*int*/ pOffset) {
+ int get_caretOffset(long pOffset) {
int offset = getCaretOffset();
if (DEBUG) print(this + ".IAccessibleText::get_caretOffset returning " + offset + hresult(offset == -1 ? COM.S_FALSE : COM.S_OK));
OS.MoveMemory(pOffset, new int [] { offset }, 4);
@@ -4522,7 +4307,7 @@ public class Accessible {
}
/* IAccessibleText::get_characterExtents([in] offset, [in] coordType, [out] pX, [out] pY, [out] pWidth, [out] pHeight) */
- int get_characterExtents(int offset, int coordType, long /*int*/ pX, long /*int*/ pY, long /*int*/ pWidth, long /*int*/ pHeight) {
+ int get_characterExtents(int offset, int coordType, long pX, long pY, long pWidth, long pHeight) {
int length = getCharacterCount();
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? length : offset < 0 ? 0 : offset;
@@ -4542,7 +4327,7 @@ public class Accessible {
}
/* IAccessibleText::get_nSelections([out] pNSelections) */
- int get_nSelections(long /*int*/ pNSelections) {
+ int get_nSelections(long pNSelections) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.count = -1;
for (int i = 0; i < accessibleTextExtendedListenersSize(); i++) {
@@ -4565,7 +4350,7 @@ public class Accessible {
}
/* IAccessibleText::get_offsetAtPoint([in] x, [in] y, [in] coordType, [out] pOffset) */
- int get_offsetAtPoint(int x, int y, int coordType, long /*int*/ pOffset) {
+ int get_offsetAtPoint(int x, int y, int coordType, long pOffset) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.x = x;
event.y = y;
@@ -4585,7 +4370,7 @@ public class Accessible {
}
/* IAccessibleText::get_selection([in] selectionIndex, [out] pStartOffset, [out] pEndOffset) */
- int get_selection(int selectionIndex, long /*int*/ pStartOffset, long /*int*/ pEndOffset) {
+ int get_selection(int selectionIndex, long pStartOffset, long pEndOffset) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.index = selectionIndex;
event.start = -1;
@@ -4617,7 +4402,7 @@ public class Accessible {
}
/* IAccessibleText::get_text([in] startOffset, [in] endOffset, [out] pbstrText) */
- int get_text(int startOffset, int endOffset, long /*int*/ pbstrText) {
+ int get_text(int startOffset, int endOffset, long pbstrText) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
event.start = startOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : startOffset;
event.end = endOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : endOffset;
@@ -4653,7 +4438,7 @@ public class Accessible {
}
/* IAccessibleText::get_textBeforeOffset([in] offset, [in] boundaryType, [out] pStartOffset, [out] pEndOffset, [out] pbstrText) */
- int get_textBeforeOffset(int offset, int boundaryType, long /*int*/ pStartOffset, long /*int*/ pEndOffset, long /*int*/ pbstrText) {
+ int get_textBeforeOffset(int offset, int boundaryType, long pStartOffset, long pEndOffset, long pbstrText) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
int charCount = getCharacterCount();
event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? charCount : offset == COM.IA2_TEXT_OFFSET_CARET ? getCaretOffset() : offset;
@@ -4706,7 +4491,7 @@ public class Accessible {
}
/* IAccessibleText::get_textAfterOffset([in] offset, [in] boundaryType, [out] pStartOffset, [out] pEndOffset, [out] pbstrText) */
- int get_textAfterOffset(int offset, int boundaryType, long /*int*/ pStartOffset, long /*int*/ pEndOffset, long /*int*/ pbstrText) {
+ int get_textAfterOffset(int offset, int boundaryType, long pStartOffset, long pEndOffset, long pbstrText) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
int charCount = getCharacterCount();
event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? charCount : offset == COM.IA2_TEXT_OFFSET_CARET ? getCaretOffset() : offset;
@@ -4759,7 +4544,7 @@ public class Accessible {
}
/* IAccessibleText::get_textAtOffset([in] offset, [in] boundaryType, [out] pStartOffset, [out] pEndOffset, [out] pbstrText) */
- int get_textAtOffset(int offset, int boundaryType, long /*int*/ pStartOffset, long /*int*/ pEndOffset, long /*int*/ pbstrText) {
+ int get_textAtOffset(int offset, int boundaryType, long pStartOffset, long pEndOffset, long pbstrText) {
AccessibleTextEvent event = new AccessibleTextEvent(this);
int charCount = getCharacterCount();
event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? charCount : offset == COM.IA2_TEXT_OFFSET_CARET ? getCaretOffset() : offset;
@@ -4860,7 +4645,7 @@ public class Accessible {
}
/* IAccessibleText::get_nCharacters([out] pNCharacters) */
- int get_nCharacters(long /*int*/ pNCharacters) {
+ int get_nCharacters(long pNCharacters) {
int count = getCharacterCount();
OS.MoveMemory(pNCharacters, new int [] { count }, 4);
if (DEBUG) print(this + ".IAccessibleText::get_nCharacters returning " + count);
@@ -4908,7 +4693,7 @@ public class Accessible {
}
/* IAccessibleText::get_newText([out] pNewText) */
- int get_newText(long /*int*/ pNewText) {
+ int get_newText(long pNewText) {
if (DEBUG) print(this + ".IAccessibleText::get_newText");
String text = null;
int start = 0;
@@ -4926,7 +4711,7 @@ public class Accessible {
}
/* IAccessibleText::get_oldText([out] pOldText) */
- int get_oldText(long /*int*/ pOldText) {
+ int get_oldText(long pOldText) {
if (DEBUG) print(this + ".IAccessibleText::get_oldText");
String text = null;
int start = 0;
@@ -4944,7 +4729,7 @@ public class Accessible {
}
/* IAccessibleValue::get_currentValue([out] pCurrentValue) */
- int get_currentValue(long /*int*/ pCurrentValue) {
+ int get_currentValue(long pCurrentValue) {
AccessibleValueEvent event = new AccessibleValueEvent(this);
for (int i = 0; i < accessibleValueListenersSize(); i++) {
AccessibleValueListener listener = accessibleValueListeners.get(i);
@@ -4956,7 +4741,7 @@ public class Accessible {
}
/* IAccessibleValue::setCurrentValue([in] value) */
- int setCurrentValue(long /*int*/ value) {
+ int setCurrentValue(long value) {
if (DEBUG) print(this + ".IAccessibleValue::setCurrentValue");
AccessibleValueEvent event = new AccessibleValueEvent(this);
event.value = getNumberVARIANT(value);
@@ -4969,7 +4754,7 @@ public class Accessible {
}
/* IAccessibleValue::get_maximumValue([out] pMaximumValue) */
- int get_maximumValue(long /*int*/ pMaximumValue) {
+ int get_maximumValue(long pMaximumValue) {
AccessibleValueEvent event = new AccessibleValueEvent(this);
for (int i = 0; i < accessibleValueListenersSize(); i++) {
AccessibleValueListener listener = accessibleValueListeners.get(i);
@@ -4981,7 +4766,7 @@ public class Accessible {
}
/* IAccessibleValue::get_minimumValue([out] pMinimumValue) */
- int get_minimumValue(long /*int*/ pMinimumValue) {
+ int get_minimumValue(long pMinimumValue) {
AccessibleValueEvent event = new AccessibleValueEvent(this);
for (int i = 0; i < accessibleValueListenersSize(); i++) {
AccessibleValueListener listener = accessibleValueListeners.get(i);
@@ -5018,7 +4803,7 @@ public class Accessible {
/* ChildIDs are 1-based indices. */
int osChildID = childID + 1;
if (control instanceof Tree) {
- osChildID = (int)/*64*/OS.SendMessage (control.handle, OS.TVM_MAPHTREEITEMTOACCID, childID, 0);
+ osChildID = (int)OS.SendMessage (control.handle, OS.TVM_MAPHTREEITEMTOACCID, childID, 0);
}
checkUniqueID(osChildID);
return osChildID;
@@ -5035,7 +4820,7 @@ public class Accessible {
* All other childIDs are 1-based indices.
*/
if (!(control instanceof Tree)) return osChildID - 1;
- return (int)/*64*/OS.SendMessage (control.handle, OS.TVM_MAPACCIDTOHTREEITEM, osChildID, 0);
+ return (int)OS.SendMessage (control.handle, OS.TVM_MAPACCIDTOHTREEITEM, osChildID, 0);
}
int stateToOs(int state) {
@@ -5267,9 +5052,9 @@ public class Accessible {
role = COM.ROLE_SYSTEM_CLIENT;
if (iaccessible != null) {
/* Get the default role from the OS. */
- long /*int*/ varChild = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+ long varChild = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
setIntVARIANT(varChild, COM.VT_I4, COM.CHILDID_SELF);
- long /*int*/ pvarRole = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+ long pvarRole = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
int code = iaccessible.get_accRole(varChild, pvarRole);
if (code == COM.S_OK) {
VARIANT v = getVARIANT(pvarRole);
@@ -5281,8 +5066,8 @@ public class Accessible {
return role;
}
- String getString(long /*int*/ psz) {
- long /*int*/ [] ptr = new long /*int*/ [1];
+ String getString(long psz) {
+ long [] ptr = new long [1];
OS.MoveMemory (ptr, psz, C.PTR_SIZEOF);
int size = COM.SysStringByteLen(ptr [0]);
if (size == 0) return "";
@@ -5291,34 +5076,34 @@ public class Accessible {
return new String (buffer);
}
- VARIANT getVARIANT(long /*int*/ variant) {
+ VARIANT getVARIANT(long variant) {
VARIANT v = new VARIANT();
COM.MoveMemory(v, variant, VARIANT.sizeof);
return v;
}
- Number getNumberVARIANT(long /*int*/ variant) {
+ Number getNumberVARIANT(long variant) {
VARIANT v = new VARIANT();
COM.MoveMemory(v, variant, VARIANT.sizeof);
if (v.vt == COM.VT_I8) return Long.valueOf(v.lVal); // TODO: Fix this - v.lVal is an int - don't use struct
return Integer.valueOf(v.lVal);
}
- void setIntVARIANT(long /*int*/ variant, short vt, int lVal) {
+ void setIntVARIANT(long variant, short vt, int lVal) {
if (vt == COM.VT_I4 || vt == COM.VT_EMPTY) {
OS.MoveMemory(variant, new short[] { vt }, 2);
OS.MoveMemory(variant + 8, new int[] { lVal }, 4);
}
}
- void setPtrVARIANT(long /*int*/ variant, short vt, long /*int*/ lVal) {
+ void setPtrVARIANT(long variant, short vt, long lVal) {
if (vt == COM.VT_DISPATCH || vt == COM.VT_UNKNOWN) {
OS.MoveMemory(variant, new short[] { vt }, 2);
- OS.MoveMemory(variant + 8, new long /*int*/ [] { lVal }, C.PTR_SIZEOF);
+ OS.MoveMemory(variant + 8, new long [] { lVal }, C.PTR_SIZEOF);
}
}
- void setNumberVARIANT(long /*int*/ variant, Number number) {
+ void setNumberVARIANT(long variant, Number number) {
if (number == null) {
OS.MoveMemory(variant, new short[] { COM.VT_EMPTY }, 2);
OS.MoveMemory(variant + 8, new int[] { 0 }, 4);
@@ -5337,23 +5122,23 @@ public class Accessible {
}
}
- void setString(long /*int*/ psz, String string) {
- long /*int*/ ptr = 0;
+ void setString(long psz, String string) {
+ long ptr = 0;
if (string != null) {
char[] data = (string + "\0").toCharArray();
ptr = COM.SysAllocString(data);
}
- OS.MoveMemory(psz, new long /*int*/ [] { ptr }, C.PTR_SIZEOF);
+ OS.MoveMemory(psz, new long [] { ptr }, C.PTR_SIZEOF);
}
- void setStringVARIANT(long /*int*/ variant, String string) {
- long /*int*/ ptr = 0;
+ void setStringVARIANT(long variant, String string) {
+ long ptr = 0;
if (string != null) {
char[] data = (string + "\0").toCharArray();
ptr = COM.SysAllocString(data);
}
OS.MoveMemory(variant, new short[] { ptr == 0 ? COM.VT_EMPTY : COM.VT_BSTR }, 2);
- OS.MoveMemory(variant + 8, new long /*int*/ [] { ptr }, C.PTR_SIZEOF);
+ OS.MoveMemory(variant + 8, new long [] { ptr }, C.PTR_SIZEOF);
}
/* checkWidget was copied from Widget, and rewritten to work in this package */
@@ -5441,7 +5226,7 @@ public class Accessible {
}
String getStateString(int state) {
if (state == 0) return " no state bits set";
- StringBuffer stateString = new StringBuffer();
+ StringBuilder stateString = new StringBuilder();
if (DEBUG) {
if ((state & COM.STATE_SYSTEM_SELECTED) != 0) stateString.append(" STATE_SYSTEM_SELECTED");
if ((state & COM.STATE_SYSTEM_SELECTABLE) != 0) stateString.append(" STATE_SYSTEM_SELECTABLE");
@@ -5466,7 +5251,7 @@ public class Accessible {
}
String getIA2StatesString(int ia2States) {
if (ia2States == 0) return " no state bits set";
- StringBuffer stateString = new StringBuffer();
+ StringBuilder stateString = new StringBuilder();
if (DEBUG) {
if ((ia2States & COM.IA2_STATE_ACTIVE) != 0) stateString.append(" IA2_STATE_ACTIVE");
if ((ia2States & COM.IA2_STATE_EDITABLE) != 0) stateString.append(" IA2_STATE_EDITABLE");
@@ -5622,16 +5407,8 @@ public class Accessible {
final GUID IIDIAccPropServer = IIDFromString("{76C0DBBB-15E0-4E7B-B61B-20EEEA2001E0}"); //$NON-NLS-1$
final GUID IIDIAccPropServices = IIDFromString("{6E26E776-04F0-495D-80E4-3330352E3169}"); //$NON-NLS-1$
if (COM.IsEqualGUID(guid, COM.IID_IDropTargetHelper)) return "IID_IDropTargetHelper";
- if (COM.IsEqualGUID(guid, COM.IID_IDragSourceHelper)) return "IID_IDragSourceHelper";
- if (COM.IsEqualGUID(guid, COM.IID_IDragSourceHelper2)) return "IID_IDragSourceHelper2";
if (COM.IsEqualGUID(guid, COM.IIDJavaBeansBridge)) return "IIDJavaBeansBridge";
if (COM.IsEqualGUID(guid, COM.IIDShockwaveActiveXControl)) return "IIDShockwaveActiveXControl";
- if (COM.IsEqualGUID(guid, COM.IIDIEditorSiteTime)) return "IIDIEditorSiteTime";
- if (COM.IsEqualGUID(guid, COM.IIDIEditorSiteProperty)) return "IIDIEditorSiteProperty";
- if (COM.IsEqualGUID(guid, COM.IIDIEditorBaseProperty)) return "IIDIEditorBaseProperty";
- if (COM.IsEqualGUID(guid, COM.IIDIEditorSite)) return "IIDIEditorSite";
- if (COM.IsEqualGUID(guid, COM.IIDIEditorService)) return "IIDIEditorService";
- if (COM.IsEqualGUID(guid, COM.IIDIEditorManager)) return "IIDIEditorManager";
if (COM.IsEqualGUID(guid, COM.IIDIAccessible)) return "IIDIAccessible";
if (COM.IsEqualGUID(guid, IIDIAccessibleHandler)) return "IIDIAccessibleHandler";
if (COM.IsEqualGUID(guid, IIDIAccessor)) return "IIDIAccessor";
@@ -5640,7 +5417,6 @@ public class Accessible {
if (COM.IsEqualGUID(guid, IIDIBindCtx)) return "IIDIBindCtx";
if (COM.IsEqualGUID(guid, COM.IIDIClassFactory)) return "IIDIClassFactory";
if (COM.IsEqualGUID(guid, COM.IIDIClassFactory2)) return "IIDIClassFactory2";
- if (COM.IsEqualGUID(guid, COM.IIDIConnectionPoint)) return "IIDIConnectionPoint";
if (COM.IsEqualGUID(guid, COM.IIDIConnectionPointContainer)) return "IIDIConnectionPointContainer";
if (COM.IsEqualGUID(guid, IIDICreateErrorInfo)) return "IIDICreateErrorInfo";
if (COM.IsEqualGUID(guid, IIDICreateTypeInfo)) return "IIDICreateTypeInfo";
@@ -5666,7 +5442,6 @@ public class Accessible {
if (COM.IsEqualGUID(guid, IIDIErrorInfo)) return "IIDIErrorInfo";
if (COM.IsEqualGUID(guid, IIDIErrorLog)) return "IIDIErrorLog";
if (COM.IsEqualGUID(guid, IIDIExternalConnection)) return "IIDIExternalConnection";
- if (COM.IsEqualGUID(guid, COM.IIDIFont)) return "IIDIFont";
if (COM.IsEqualGUID(guid, IIDIFontDisp)) return "IIDIFontDisp";
// if (COM.IsEqualGUID(guid, COM.IIDIHTMLDocumentEvents2)) return "IIDIHTMLDocumentEvents2";
if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) return "IIDIInternetSecurityManager";
@@ -5684,20 +5459,16 @@ public class Accessible {
if (COM.IsEqualGUID(guid, IIDIOleCacheControl)) return "IIDIOleCacheControl";
if (COM.IsEqualGUID(guid, COM.IIDIOleClientSite)) return "IIDIOleClientSite";
if (COM.IsEqualGUID(guid, COM.IIDIOleCommandTarget)) return "IIDIOleCommandTarget";
- if (COM.IsEqualGUID(guid, COM.IIDIOleContainer)) return "IIDIOleContainer";
if (COM.IsEqualGUID(guid, COM.IIDIOleControl)) return "IIDIOleControl";
if (COM.IsEqualGUID(guid, COM.IIDIOleControlSite)) return "IIDIOleControlSite";
if (COM.IsEqualGUID(guid, COM.IIDIOleDocument)) return "IIDIOleDocument";
if (COM.IsEqualGUID(guid, COM.IIDIOleDocumentSite)) return "IIDIOleDocumentSite";
- if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceActiveObject)) return "IIDIOleInPlaceActiveObject";
if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceFrame)) return "IIDIOleInPlaceFrame";
if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceObject)) return "IIDIOleInPlaceObject";
if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceSite)) return "IIDIOleInPlaceSite";
- if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceUIWindow)) return "IIDIOleInPlaceUIWindow";
if (COM.IsEqualGUID(guid, IIDIOleItemContainer)) return "IIDIOleItemContainer";
if (COM.IsEqualGUID(guid, COM.IIDIOleLink)) return "IIDIOleLink";
if (COM.IsEqualGUID(guid, COM.IIDIOleObject)) return "IIDIOleObject";
- if (COM.IsEqualGUID(guid, COM.IIDIOleWindow)) return "IIDIOleWindow";
if (COM.IsEqualGUID(guid, IIDIParseDisplayName)) return "IIDIParseDisplayName";
if (COM.IsEqualGUID(guid, IIDIPerPropertyBrowsing)) return "IIDIPerPropertyBrowsing";
if (COM.IsEqualGUID(guid, COM.IIDIPersist)) return "IIDIPersist";
@@ -5705,7 +5476,6 @@ public class Accessible {
if (COM.IsEqualGUID(guid, IIDIPersistMemory)) return "IIDIPersistMemory";
if (COM.IsEqualGUID(guid, IIDIPersistPropertyBag)) return "IIDIPersistPropertyBag";
if (COM.IsEqualGUID(guid, COM.IIDIPersistStorage)) return "IIDIPersistStorage";
- if (COM.IsEqualGUID(guid, COM.IIDIPersistStream)) return "IIDIPersistStream";
if (COM.IsEqualGUID(guid, COM.IIDIPersistStreamInit)) return "IIDIPersistStreamInit";
if (COM.IsEqualGUID(guid, IIDIPicture)) return "IIDIPicture";
if (COM.IsEqualGUID(guid, IIDIPictureDisp)) return "IIDIPictureDisp";
@@ -5728,8 +5498,6 @@ public class Accessible {
if (COM.IsEqualGUID(guid, COM.IIDIServiceProvider)) return "IIDIServiceProvider";
if (COM.IsEqualGUID(guid, COM.IIDISpecifyPropertyPages)) return "IIDISpecifyPropertyPages";
if (COM.IsEqualGUID(guid, IIDIStdMarshalInfo)) return "IIDIStdMarshalInfo";
- if (COM.IsEqualGUID(guid, COM.IIDIStorage)) return "IIDIStorage";
- if (COM.IsEqualGUID(guid, COM.IIDIStream)) return "IIDIStream";
if (COM.IsEqualGUID(guid, IIDISupportErrorInfo)) return "IIDISupportErrorInfo";
if (COM.IsEqualGUID(guid, IIDITypeComp)) return "IIDITypeComp";
if (COM.IsEqualGUID(guid, IIDITypeLib)) return "IIDITypeLib";
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java
index e31347744b..82894de190 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java
@@ -66,7 +66,7 @@ class Relation {
AddRef();
}
- long /*int*/ getAddress() {
+ long getAddress() {
/* The address of a Relation is the address of its IAccessibleRelation COMObject. */
if (objIAccessibleRelation == null) createIAccessibleRelation();
return objIAccessibleRelation.getAddress();
@@ -75,21 +75,21 @@ class Relation {
void createIAccessibleRelation() {
objIAccessibleRelation = new COMObject(new int[] {2,0,0,1,1,1,2,3}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return get_relationType(args[0]);}
+ public long method3(long[] args) {return get_relationType(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return get_localizedRelationType(args[0]);}
+ public long method4(long[] args) {return get_localizedRelationType(args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return get_nTargets(args[0]);}
+ public long method5(long[] args) {return get_nTargets(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return get_target((int)/*64*/args[0], args[1]);}
+ public long method6(long[] args) {return get_target((int)args[0], args[1]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return get_targets((int)/*64*/args[0], args[1], args[2]);}
+ public long method7(long[] args) {return get_targets((int)args[0], args[1], args[2]);}
};
}
@@ -97,12 +97,12 @@ class Relation {
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
- int QueryInterface(long /*int*/ iid, long /*int*/ ppvObject) {
+ int QueryInterface(long iid, long ppvObject) {
GUID guid = new GUID();
COM.MoveMemory(guid, iid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIAccessibleRelation)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] { getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] { getAddress() }, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
@@ -127,39 +127,39 @@ class Relation {
}
/* IAccessibleRelation::get_relationType([out] pbstrRelationType) */
- int get_relationType(long /*int*/ pbstrRelationType) {
+ int get_relationType(long pbstrRelationType) {
setString(pbstrRelationType, relationTypeString[type]);
return COM.S_OK;
}
/* IAccessibleRelation::get_localizedRelationType([out] pbstrLocalizedRelationType) */
- int get_localizedRelationType(long /*int*/ pbstrLocalizedRelationType) {
+ int get_localizedRelationType(long pbstrLocalizedRelationType) {
setString(pbstrLocalizedRelationType, localizedRelationTypeString[type]);
return COM.S_OK;
}
/* IAccessibleRelation::get_nTargets([out] pNTargets) */
- int get_nTargets(long /*int*/ pNTargets) {
+ int get_nTargets(long pNTargets) {
OS.MoveMemory(pNTargets, new int [] { targets.length }, 4);
return COM.S_OK;
}
/* IAccessibleRelation::get_target([in] targetIndex, [out] ppTarget) */
- int get_target(int targetIndex, long /*int*/ ppTarget) {
+ int get_target(int targetIndex, long ppTarget) {
if (targetIndex < 0 || targetIndex >= targets.length) return COM.E_INVALIDARG;
Accessible target = targets[targetIndex];
target.AddRef();
- OS.MoveMemory(ppTarget, new long /*int*/[] { target.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppTarget, new long[] { target.getAddress() }, C.PTR_SIZEOF);
return COM.S_OK;
}
/* IAccessibleRelation::get_targets([in] maxTargets, [out] ppTargets, [out] pNTargets) */
- int get_targets(int maxTargets, long /*int*/ ppTargets, long /*int*/ pNTargets) {
+ int get_targets(int maxTargets, long ppTargets, long pNTargets) {
int count = Math.min(targets.length, maxTargets);
for (int i = 0; i < count; i++) {
Accessible target = targets[i];
target.AddRef();
- OS.MoveMemory(ppTargets + i * C.PTR_SIZEOF, new long /*int*/[] { target.getAddress() }, C.PTR_SIZEOF);
+ OS.MoveMemory(ppTargets + i * C.PTR_SIZEOF, new long[] { target.getAddress() }, C.PTR_SIZEOF);
}
OS.MoveMemory(pNTargets, new int [] { count }, 4);
return COM.S_OK;
@@ -173,20 +173,20 @@ class Relation {
targets = newTargets;
}
- boolean containsTarget(Accessible target) {
- for (int i = 0; i < targets.length; i++) {
- if (targets[i] == target) return true;
+ boolean containsTarget(Accessible searched) {
+ for (Accessible target : targets) {
+ if (target == searched) return true;
}
return false;
}
- void removeTarget(Accessible target) {
- if (!containsTarget(target)) return;
+ void removeTarget(Accessible searched) {
+ if (!containsTarget(searched)) return;
Accessible[] newTargets = new Accessible[targets.length - 1];
int j = 0;
- for (int i = 0; i < targets.length; i++) {
- if (targets[i] != target) {
- newTargets[j++] = targets[i];
+ for (Accessible target : targets) {
+ if (target != searched) {
+ newTargets[j++] = target;
}
}
targets = newTargets;
@@ -197,9 +197,9 @@ class Relation {
}
// setString copied from Accessible class
- void setString(long /*int*/ psz, String string) {
+ void setString(long psz, String string) {
char[] data = (string + "\0").toCharArray();
- long /*int*/ ptr = COM.SysAllocString(data);
- OS.MoveMemory(psz, new long /*int*/ [] { ptr }, C.PTR_SIZEOF);
+ long ptr = COM.SysAllocString(data);
+ OS.MoveMemory(psz, new long [] { ptr }, C.PTR_SIZEOF);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/BrowserFactory.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/BrowserFactory.java
index ed2dd24f2b..edaa62e933 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/BrowserFactory.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/BrowserFactory.java
@@ -13,10 +13,38 @@
*******************************************************************************/
package org.eclipse.swt.browser;
+import org.eclipse.swt.*;
+
class BrowserFactory {
+private Class<?> chromiumClass;
+
WebBrowser createWebBrowser (int style) {
+ WebBrowser browser = null;
+ if ((style & SWT.CHROMIUM) != 0) {
+ browser = createChromium();
+ if (browser != null) return browser;
+ }
return new WebKit ();
}
+private WebBrowser createChromium() {
+ if (chromiumClass == null) {
+ try {
+ chromiumClass = Class.forName ("org.eclipse.swt.browser.ChromiumImpl"); //$NON-NLS-1$
+ return (WebBrowser) chromiumClass.newInstance();
+ } catch (ClassNotFoundException e) {
+ /* chromium fragments missing */
+ System.err.println ("SWT.CHROMIUM style was used but chromium.swt fragment/jar is missing from classpath."); //$NON-NLS-1$
+ } catch (NoClassDefFoundError | InstantiationException | IllegalAccessException e) {
+ /* second attempt, do not print */
+ } catch (UnsatisfiedLinkError e) {
+ System.err.println ("SWT.CHROMIUM style was used but chromium.swt " + SWT.getPlatform() + " (or CEF binaries) fragment/jar is missing."); //$NON-NLS-1$
+ } catch (SWTError e) {
+ // a more specific error determined by the implementation.
+ System.err.println (e.getMessage()); //$NON-NLS-1$
+ }
+ }
+ return null;
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
index d344a70817..d69e3d10ad 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2018 IBM Corporation and others.
+ * Copyright (c) 2003, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -31,9 +31,6 @@ import org.eclipse.swt.widgets.*;
* <dd>CloseWindowListener, LocationListener, OpenWindowListener, ProgressListener, StatusTextListener, TitleListener, VisibilityWindowListener</dd>
* </dl>
* <p>
- * Note: MOZILLA is deprecated and is no longer supported.
- * </p>
- * <p>
* IMPORTANT: This class is <em>not</em> intended to be subclassed.
* </p>
*
@@ -144,7 +141,6 @@ static Composite checkParent (Composite parent) {
return parent;
}
-@SuppressWarnings("deprecation")
static int checkStyle(int style) {
String platform = SWT.getPlatform ();
if (DefaultType == SWT.DEFAULT) {
@@ -156,7 +152,7 @@ static int checkStyle(int style) {
* that can arise from having multiple native renderers loaded within the same
* process. A client can do this by setting the
* "org.eclipse.swt.browser.DefaultType" java system property to a value like
- * "ie" or "webkit". Value "mozilla" is ignored now.
+ * "ie" or "webkit".
*/
/*
@@ -187,6 +183,8 @@ static int checkStyle(int style) {
if (current.equalsIgnoreCase ("webkit")) { //$NON-NLS-1$
DefaultType = SWT.WEBKIT;
break;
+ } else if (current.equalsIgnoreCase ("edge") && "win32".equals (platform)) { //$NON-NLS-1$ //$NON-NLS-2$
+ DefaultType = SWT.EDGE;
} else if (current.equalsIgnoreCase ("ie") && "win32".equals (platform)) { //$NON-NLS-1$ //$NON-NLS-2$
DefaultType = SWT.NONE;
break;
@@ -198,27 +196,13 @@ static int checkStyle(int style) {
DefaultType = SWT.NONE;
}
}
-
- /* remove SWT.MOZILLA style if specified */
- if ((style & SWT.MOZILLA) != 0) {
- System.err.println ("Unsupported Browser Type: SWT.MOZILLA style is deprecated.\n" //$NON-NLS-1$
- + "It'll be removed from the user specified style. Browser will be created with the modified style " //$NON-NLS-1$
- + "and if no other style bit is specified, browser with SWT.NONE style will be created"); //$NON-NLS-1$
- style &= ~SWT.MOZILLA;
- }
-
- if ((style & SWT.WEBKIT) == 0) {
+ /* If particular backend isn't specified, use the value from the system property. */
+ if ((style & (SWT.WEBKIT | SWT.EDGE)) == 0) {
style |= DefaultType;
}
- if ((style & SWT.WEBKIT) != 0) {
- return style;
- }
- if ("win32".equals (platform)) { //$NON-NLS-1$
- /*
- * For IE on win32 the border is supplied by the embedded browser, so remove
- * the style so that the parent Composite will not draw a second border.
- */
- return style & ~SWT.BORDER;
+ if ("win32".equals (platform) && (style & SWT.EDGE) != 0) { //$NON-NLS-1$
+ /* Hack to enable Browser to receive focus. */
+ style |= SWT.EMBEDDED;
}
return style;
}
@@ -268,7 +252,7 @@ public static String getCookie (String name, String url) {
* Example value strings:
* <code>foo=bar</code> (basic session cookie)
* <code>foo=bar; path=/; domain=.eclipse.org</code> (session cookie)
- * <code>foo=bar; expires=Thu, 01-Jan-2030 00:00:01 GMT</code> (persistent cookie)
+ * <code>foo=bar; expires=Tue, 01-Jan-2030 00:00:01 GMT</code> (persistent cookie)
* <code>foo=; expires=Thu, 01-Jan-1970 00:00:01 GMT</code> (deletes cookie <code>foo</code>)
*
* @param value the cookie value
@@ -657,9 +641,7 @@ public Object evaluate (String script) throws SWTException {
* An <code>SWTException</code> is thrown if the return value has an
* unsupported type, or if evaluating the script causes a javascript
* error to be thrown.
- * <p>
- * Note: Chrome security context is applicable only to Browsers with style <code>SWT.Mozilla</code>.
- * </p>
+ *
* @param script the script with javascript commands
* @param trusted <code>true</code> or <code>false</code> depending on the security context to be used
*
@@ -705,7 +687,7 @@ public boolean forward () {
/**
* Returns the type of native browser being used by this instance.
- * Examples: "ie", "mozilla", "voyager", "webkit"
+ * Examples: "ie", "webkit"
*
* @return the type of the native browser
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/BrowserFunction.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/BrowserFunction.java
index 2bf403b172..c9abebf763 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/BrowserFunction.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/BrowserFunction.java
@@ -143,8 +143,8 @@ BrowserFunction (Browser browser, String name, boolean top, String[] frameNames,
byte[] bytes = new byte[16];
random.nextBytes (bytes);
StringBuilder buffer = new StringBuilder ();
- for (int i = 0; i < bytes.length; i++) {
- buffer.append (Integer.toHexString (bytes[i] & 0xff));
+ for (byte b : bytes) {
+ buffer.append (Integer.toHexString (b & 0xff));
}
token = buffer.toString ();
if (create) browser.webBrowser.createFunction (this);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/JSON.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/JSON.java
new file mode 100644
index 0000000000..2730297b9f
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/JSON.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.browser;
+
+import java.util.*;
+
+import org.eclipse.swt.*;
+
+class JSON {
+
+// Note: supported types are limited, see Browser.evaluate and BrowserFunction.function.
+
+static class Reader {
+ char[] input;
+ int pos, end;
+ StringBuilder sb;
+
+ public Reader(char[] input, int start, int end) {
+ this.input = input;
+ this.pos = start;
+ this.end = end;
+ }
+
+ static enum Control {
+ END, ARRAY_END, COMMA
+ }
+
+ char nextChar() {
+ return (pos < end) ? input[pos++] : '\0';
+ }
+
+ void error() {
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, " [decoding error at " + (pos - 1) +"]");
+ }
+
+ void readLiteral(String literal) {
+ for (int i = 0, len = literal.length(); i < len; i++) {
+ if (nextChar() != literal.charAt(i)) {
+ error();
+ }
+ }
+ }
+
+ int nextHexDigit() {
+ char c = nextChar();
+ if ('0' <= c && c <= '9') return c - '0';
+ if ('a' <= c && c <= 'f') return c - 'a' + 10;
+ if ('A' <= c && c <= 'F') return c - 'A' + 10;
+ error();
+ return 0;
+ }
+
+ char readEscape() {
+ char c = nextChar();
+ switch (c) {
+ case '"':
+ case '\\':
+ case '/': break;
+ case 'b': c = '\b'; break;
+ case 'f': c = '\f'; break;
+ case 'n': c = '\n'; break;
+ case 'r': c = '\r'; break;
+ case 't': c = '\t'; break;
+ case 'u':
+ c = (char)((nextHexDigit() << 12) | (nextHexDigit() << 8)
+ | (nextHexDigit() << 4) | nextHexDigit());
+ break;
+ default: error();
+ }
+ return c;
+ }
+
+ String readString() {
+ char c;
+ int start = pos;
+ do {
+ c = nextChar();
+ if (c < 0x20) error();
+ if (c == '\\') {
+ if (sb == null) sb = new StringBuilder();
+ sb.append(input, start, pos - start - 1);
+ sb.append(readEscape());
+ start = pos;
+ }
+ } while (c != '"');
+
+ if (sb != null) {
+ sb.append(input, start, pos - 1 - start);
+ String result = sb.toString();
+ sb.setLength(0);
+ return result;
+ }
+ return String.valueOf(input, start, pos - start - 1);
+ }
+
+ double readNumber() {
+ int start = pos - 1;
+ while (true) {
+ char c = nextChar();
+ switch (c) {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case '.':
+ case 'e':
+ case 'E':
+ case '+':
+ case '-': continue;
+ default:
+ pos--;
+ case '\0':
+ try {
+ return Double.parseDouble(String.valueOf(input, start, pos - start));
+ } catch (NumberFormatException e) {
+ error();
+ }
+ }
+ }
+ }
+
+ Object readAny() {
+ while (true) {
+ char c = nextChar();
+ switch (c) {
+ case ' ':
+ case '\t':
+ case '\r':
+ case '\n': continue;
+ case '\0': return Control.END;
+ case '[': return readArray();
+ case ']': return Control.ARRAY_END;
+ case ',': return Control.COMMA;
+ case '"': return readString();
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case '-': return readNumber();
+ case 'n': readLiteral("ull"); return null;
+ case 't': readLiteral("rue"); return true;
+ case 'f': readLiteral("alse"); return false;
+ default: error();
+ }
+ }
+ }
+
+ Object readArray() {
+ Object item = readAny();
+ if (item == Control.ARRAY_END) return new Object[0];
+ if (item instanceof Control) error();
+ List<Object> items = new ArrayList<>();
+ items.add(item);
+ while (true) {
+ Object sep = readAny();
+ if (sep == Control.ARRAY_END) break;
+ if (sep != Control.COMMA) error();
+ item = readAny();
+ if (item instanceof Control) error();
+ items.add(item);
+ }
+ return items.toArray();
+ }
+
+ Object readTop() {
+ Object item = readAny();
+ if (item instanceof Control) error();
+ if (readAny() != Control.END) error();
+ return item;
+ }
+}
+
+static class Writer {
+ static final String[] ESCAPED = new String[96];
+ static {
+ for (int i = 0; i < 0x20; i++) {
+ ESCAPED[i] = String.format("\\u%04x", i);
+ }
+ ESCAPED['\b'] = "\\b";
+ ESCAPED['\f'] = "\\f";
+ ESCAPED['\n'] = "\\n";
+ ESCAPED['\r'] = "\\r";
+ ESCAPED['\t'] = "\\t";
+ ESCAPED['"'] = "\\\"";
+ }
+
+ StringBuilder sb = new StringBuilder();
+
+ public Writer(Object object) {
+ writeAny(object);
+ }
+
+ void writeAny(Object object) {
+ if (object == null) {
+ sb.append("null");
+ } else if (object instanceof Boolean) {
+ sb.append(object.toString());
+ } else if (object instanceof Long) {
+ sb.append((long)object);
+ } else if (object instanceof Integer) {
+ sb.append((int)object);
+ } else if (object instanceof Short) {
+ sb.append((short)object);
+ } else if (object instanceof Byte) {
+ sb.append((byte)object);
+ } else if (object instanceof Double) {
+ sb.append((double)object);
+ } else if (object instanceof Float) {
+ sb.append((float)object);
+ } else if (object instanceof String) {
+ writeString(object.toString());
+ } else if (object instanceof Object[]) {
+ writeArray((Object[])object);
+ } else {
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, " [object not encodable: " + object.getClass() + "]");
+ }
+ }
+
+ void writeString(String s) {
+ sb.append('"');
+ int start = 0;
+ for (int i = 0, len = s.length(); i < len; i++) {
+ char c = s.charAt(i);
+ if (c < ESCAPED.length && ESCAPED[c] != null) {
+ sb.append(s, start, i);
+ sb.append(ESCAPED[c]);
+ start = i + 1;
+ }
+ }
+ sb.append(s, start, s.length());
+ sb.append('"');
+ }
+
+ void writeArray(Object[] array) {
+ sb.append('[');
+ boolean first = true;
+ for (Object item : array) {
+ if (!first) sb.append(',');
+ writeAny(item);
+ first = false;
+ }
+ sb.append(']');
+ }
+
+ @Override
+ public String toString() {
+ return sb.toString();
+ }
+}
+
+public static Object parse(char[] input) {
+ return new Reader(input, 0, input.length).readTop();
+}
+
+public static Object parse(String input) {
+ return parse(input.toCharArray());
+}
+
+public static String stringify(Object object) {
+ return new Writer(object).toString();
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
index 27dd9f5045..dba2d92199 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
@@ -348,9 +348,9 @@ public void createFunction (BrowserFunction function) {
buffer.append ("var frameIds = null;"); //$NON-NLS-1$
if (function.frameNames != null) {
buffer.append ("frameIds = {"); //$NON-NLS-1$
- for (int i = 0; i < function.frameNames.length; i++) {
+ for (String frameName : function.frameNames) {
buffer.append ('\'');
- buffer.append (function.frameNames[i]);
+ buffer.append (frameName);
buffer.append ("':1,"); //$NON-NLS-1$
}
if (function.frameNames.length > 0) {
@@ -732,8 +732,8 @@ public abstract boolean setUrl (String url, String postData, String[] headers);
public abstract void stop ();
int translateKey (int key) {
- for (int i = 0; i < KeyTable.length; i++) {
- if (KeyTable[i][0] == key) return KeyTable[i][1];
+ for (int[] element : KeyTable) {
+ if (element[0] == key) return element[1];
}
return 0;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/gtk/org/eclipse/swt/browser/BrowserFactory.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/gtk/org/eclipse/swt/browser/BrowserFactory.java
index f9a1891dbb..23b75503ef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/gtk/org/eclipse/swt/browser/BrowserFactory.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/gtk/org/eclipse/swt/browser/BrowserFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/BrowserFactory.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/BrowserFactory.java
index 90d181c3f2..464880ab22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/BrowserFactory.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/BrowserFactory.java
@@ -17,11 +17,42 @@ import org.eclipse.swt.*;
class BrowserFactory {
+private Class<?> chromiumClass;
+
WebBrowser createWebBrowser (int style) {
- if ((style & SWT.WEBKIT) != 0) {
- return new WebKit ();
+ // This function can't throw, otherwise the Browser will be left in inconsistent state.
+ WebBrowser browser = null;
+ if ((style & SWT.CHROMIUM) != 0) {
+ browser = createChromium();
+ if (browser != null) return browser;
+ }
+ if ((style & SWT.EDGE) != 0) {
+ try {
+ return new Edge();
+ } catch (SWTError e) {
+ System.err.println(e);
+ }
}
return new IE ();
}
+private WebBrowser createChromium() {
+ if (chromiumClass == null) {
+ try {
+ chromiumClass = Class.forName ("org.eclipse.swt.browser.ChromiumImpl"); //$NON-NLS-1$
+ return (WebBrowser) chromiumClass.newInstance();
+ } catch (ClassNotFoundException e) {
+ /* chromium fragments missing */
+ System.err.println ("SWT.CHROMIUM style was used but chromium.swt fragment/jar is missing from classpath."); //$NON-NLS-1$
+ } catch (NoClassDefFoundError | InstantiationException | IllegalAccessException e) {
+ /* second attempt, do not print */
+ } catch (UnsatisfiedLinkError e) {
+ System.err.println ("SWT.CHROMIUM style was used but chromium.swt " + SWT.getPlatform() + " (or CEF binaries) fragment/jar is missing."); //$NON-NLS-1$
+ } catch (SWTError e) {
+ // a more specific error determined by the implementation.
+ System.err.println (e.getMessage()); //$NON-NLS-1$
+ }
+ }
+ return null;
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java
new file mode 100644
index 0000000000..0f5dec79f9
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java
@@ -0,0 +1,844 @@
+/*******************************************************************************
+ * Copyright (c) 2020, 2021 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.browser;
+
+import java.net.*;
+import java.nio.charset.*;
+import java.time.*;
+import java.util.*;
+import java.util.function.*;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.ole.win32.*;
+import org.eclipse.swt.internal.win32.*;
+import org.eclipse.swt.widgets.*;
+
+class Edge extends WebBrowser {
+ static {
+ Library.loadLibrary("WebView2Loader");
+ }
+
+ // WebView2Loader.dll compatible version. This is NOT the minimal required version.
+ static final String SDK_TARGET_VERSION = "89.0.721.0";
+
+ // Display.getData() keys
+ static final String APPLOCAL_DIR_KEY = "org.eclipse.swt.internal.win32.appLocalDir";
+
+ // System.getProperty() keys
+ static final String BROWSER_DIR_PROP = "org.eclipse.swt.browser.EdgeDir";
+ static final String BROWSER_ARGS_PROP = "org.eclipse.swt.browser.EdgeArgs";
+ static final String DATA_DIR_PROP = "org.eclipse.swt.browser.EdgeDataDir";
+ static final String LANGUAGE_PROP = "org.eclipse.swt.browser.EdgeLanguage";
+ static final String VERSIONT_PROP = "org.eclipse.swt.browser.EdgeVersion";
+
+ static String DataDir;
+ static ICoreWebView2Environment Environment;
+ static ArrayList<Edge> Instances = new ArrayList<>();
+
+ ICoreWebView2 webView;
+ ICoreWebView2_2 webView_2;
+ ICoreWebView2Controller controller;
+ ICoreWebView2Settings settings;
+ ICoreWebView2Environment2 environment2;
+
+ static boolean inCallback;
+ boolean inNewWindow;
+ HashMap<Long, LocationEvent> navigations = new HashMap<>();
+
+ static {
+ NativeClearSessions = () -> {
+ ICoreWebView2CookieManager manager = getCookieManager();
+ if (manager == null) return;
+
+ long[] ppv = new long[1];
+ int hr = callAndWait(ppv, completion -> manager.GetCookies(null, completion));
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ ICoreWebView2CookieList cookieList = new ICoreWebView2CookieList(ppv[0]);
+
+ int[] count = new int[1], isSession = new int[1];
+ cookieList.get_Count(count);
+ for (int i = 0; i < count[0]; i++) {
+ hr = cookieList.GetValueAtIndex(i, ppv);
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ ICoreWebView2Cookie cookie = new ICoreWebView2Cookie(ppv[0]);
+ cookie.get_IsSession(isSession);
+ if (isSession[0] != 0) {
+ manager.DeleteCookie(cookie);
+ }
+ cookie.Release();
+ }
+ cookieList.Release();
+ manager.Release();
+
+ // Bug in WebView2. DeleteCookie is asynchronous. Wait a short while for it to take effect.
+ try {
+ Thread.sleep(5);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
+ };
+
+ NativeGetCookie = () -> {
+ ICoreWebView2CookieManager manager = getCookieManager();
+ if (manager == null) return;
+
+ char[] uri = stringToWstr(CookieUrl);
+ long[] ppv = new long[1];
+ int hr = callAndWait(ppv, completion -> manager.GetCookies(uri, completion));
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ ICoreWebView2CookieList cookieList = new ICoreWebView2CookieList(ppv[0]);
+
+ int[] count = new int[1];
+ cookieList.get_Count(count);
+ for (int i = 0; i < count[0]; i++) {
+ hr = cookieList.GetValueAtIndex(i, ppv);
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ ICoreWebView2Cookie cookie = new ICoreWebView2Cookie(ppv[0]);
+ cookie.get_Name(ppv);
+ String name = wstrToString(ppv[0], true);
+ if (CookieName.equals(name)) {
+ cookie.get_Value(ppv);
+ CookieValue = wstrToString(ppv[0], true);
+ }
+ cookie.Release();
+ if (CookieValue != null) {
+ break;
+ }
+ }
+ cookieList.Release();
+ manager.Release();
+ };
+
+ NativeSetCookie = () -> {
+ HttpCookie parser = HttpCookie.parse(CookieValue).get(0);
+ URL origin;
+ try {
+ origin = new URL(CookieUrl);
+ } catch (MalformedURLException e) {
+ return;
+ }
+ if (parser.getDomain() == null) {
+ parser.setDomain(origin.getHost());
+ }
+ if (parser.getPath() == null) {
+ parser.setPath(origin.getPath());
+ }
+
+ ICoreWebView2CookieManager manager = getCookieManager();
+ if (manager == null) return;
+
+ char[] name = stringToWstr(parser.getName());
+ char[] value = stringToWstr(parser.getValue());
+ char[] domain = stringToWstr(parser.getDomain());
+ char[] path = stringToWstr(parser.getPath());
+ long[] ppv = new long[1];
+ int hr = manager.CreateCookie(name, value, domain, path, ppv);
+ if (hr != COM.S_OK) {
+ manager.Release();
+ return;
+ }
+ ICoreWebView2Cookie cookie = new ICoreWebView2Cookie(ppv[0]);
+
+ if (parser.getMaxAge() != -1) {
+ cookie.put_Expires(Instant.now().getEpochSecond() + parser.getMaxAge());
+ }
+ cookie.put_IsSecure(parser.getSecure());
+ cookie.put_IsHttpOnly(parser.isHttpOnly());
+ hr = manager.AddOrUpdateCookie(cookie);
+ cookie.Release();
+ manager.Release();
+
+ CookieResult = hr >= COM.S_OK;
+ };
+ }
+
+static String wstrToString(long psz, boolean free) {
+ if (psz == 0) return "";
+ int len = OS.wcslen(psz);
+ char[] data = new char[len];
+ OS.MoveMemory(data, psz, len * Character.BYTES);
+ if (free) OS.CoTaskMemFree(psz);
+ return String.valueOf(data);
+}
+
+static String bstrToString(long bstr) {
+ if (bstr == 0) return "";
+ int len = COM.SysStringLen(bstr);
+ char[] data = new char[len];
+ OS.MoveMemory(data, bstr, len * Character.BYTES);
+ return String.valueOf(data);
+}
+
+static char[] stringToWstr(String s) {
+ return (s != null) ? (s + "\0").toCharArray() : null;
+}
+
+static void error(int code, int hr) {
+ SWT.error(code, null, String.format(" [0x%08x]", hr));
+}
+
+static IUnknown newCallback(ICoreWebView2SwtCallback handler) {
+ long punk = COM.CreateSwtWebView2Callback((arg0, arg1) -> {
+ inCallback = true;
+ try {
+ return handler.Invoke(arg0, arg1);
+ } finally {
+ inCallback = false;
+ }
+ });
+ if (punk == 0) error(SWT.ERROR_NO_HANDLES, COM.E_OUTOFMEMORY);
+ return new IUnknown(punk);
+}
+
+IUnknown newHostObject(ICoreWebView2SwtHost handler) {
+ long pdisp = COM.CreateSwtWebView2Host(handler);
+ if (pdisp == 0) error(SWT.ERROR_NO_HANDLES, COM.E_OUTOFMEMORY);
+ return new IUnknown(pdisp);
+}
+
+static int callAndWait(long[] ppv, ToIntFunction<IUnknown> callable) {
+ int[] phr = {COM.S_OK};
+ IUnknown completion = newCallback((result, pv) -> {
+ phr[0] = (int)result;
+ if ((int)result == COM.S_OK) {
+ ppv[0] = pv;
+ new IUnknown(pv).AddRef();
+ }
+ return COM.S_OK;
+ });
+ ppv[0] = 0;
+ phr[0] = callable.applyAsInt(completion);
+ completion.Release();
+ Display display = Display.getCurrent();
+ while (phr[0] == COM.S_OK && ppv[0] == 0) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ return phr[0];
+}
+
+static int callAndWait(String[] pstr, ToIntFunction<IUnknown> callable) {
+ int[] phr = new int[1];
+ IUnknown completion = newCallback((result, pszJson) -> {
+ phr[0] = (int)result;
+ if ((int)result == COM.S_OK) {
+ pstr[0] = wstrToString(pszJson, false);
+ }
+ return COM.S_OK;
+ });
+ pstr[0] = null;
+ phr[0] = callable.applyAsInt(completion);
+ completion.Release();
+ Display display = Display.getCurrent();
+ while (phr[0] == COM.S_OK && pstr[0] == null) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ return phr[0];
+}
+
+static ICoreWebView2CookieManager getCookieManager() {
+ if (Instances.isEmpty()) {
+ SWT.error(SWT.ERROR_NOT_IMPLEMENTED, null, " [WebView2: cookie access requires a Browser instance]");
+ }
+ Edge instance = Instances.get(0);
+ if (instance.webView_2 == null) {
+ SWT.error(SWT.ERROR_NOT_IMPLEMENTED, null, " [WebView2 version 88+ is required to access cookies]");
+ }
+
+ long[] ppv = new long[1];
+ int hr = instance.webView_2.get_CookieManager(ppv);
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ return new ICoreWebView2CookieManager(ppv[0]);
+}
+
+void checkDeadlock() {
+ // Feature in WebView2. All event handlers, completion handlers
+ // and JavaScript callbacks are serialized. An event handler waiting
+ // for a completion of another handler will deadlock. Detect this
+ // situation and throw an exception instead.
+ if (inCallback || inNewWindow) {
+ SWT.error(SWT.ERROR_FAILED_EVALUATE, null, " [WebView2: deadlock detected]");
+ }
+}
+
+ICoreWebView2Environment createEnvironment() {
+ if (Environment != null) return Environment;
+ Display display = Display.getCurrent();
+
+ // Gather customization properties
+ String browserDir = System.getProperty(BROWSER_DIR_PROP);
+ String dataDir = System.getProperty(DATA_DIR_PROP);
+ String browserArgs = System.getProperty(BROWSER_ARGS_PROP);
+ String language = System.getProperty(LANGUAGE_PROP);
+ if (dataDir == null) {
+ // WebView2 will append "\\EBWebView"
+ dataDir = (String)display.getData(APPLOCAL_DIR_KEY);
+ }
+
+ // Initialize options
+ long pOpts = COM.CreateSwtWebView2Options();
+ if (pOpts == 0) error(SWT.ERROR_NO_HANDLES, COM.E_OUTOFMEMORY);
+ ICoreWebView2EnvironmentOptions options = new ICoreWebView2EnvironmentOptions(pOpts);
+ char[] pVersion = stringToWstr(SDK_TARGET_VERSION);
+ options.put_TargetCompatibleBrowserVersion(pVersion);
+ if (browserArgs != null) {
+ char[] pBrowserArgs = stringToWstr(browserArgs);
+ options.put_AdditionalBrowserArguments(pBrowserArgs);
+ }
+ if (language != null) {
+ char[] pLanguage = stringToWstr(language);
+ options.put_Language(pLanguage);
+ }
+
+ // Create the environment
+ char[] pBrowserDir = stringToWstr(browserDir);
+ char[] pDataDir = stringToWstr(dataDir);
+ long[] ppv = new long[1];
+ int hr = callAndWait(ppv, completion -> COM.CreateCoreWebView2EnvironmentWithOptions(
+ pBrowserDir, pDataDir, options.getAddress(), completion.getAddress()));
+ options.Release();
+ if (hr == OS.HRESULT_FROM_WIN32(OS.ERROR_FILE_NOT_FOUND)) {
+ SWT.error(SWT.ERROR_NOT_IMPLEMENTED, null, " [WebView2 runtime not found]");
+ }
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ Environment = new ICoreWebView2Environment(ppv[0]);
+ DataDir = dataDir;
+
+ // Save Edge version for reporting
+ long[] ppVersion = new long[1];
+ Environment.get_BrowserVersionString(ppVersion);
+ String version = wstrToString(ppVersion[0], true);
+ System.setProperty(VERSIONT_PROP, version);
+
+ // Destroy the environment on app exit.
+ display.disposeExec(() -> {
+ Environment.Release();
+ Environment = null;
+ });
+ return Environment;
+}
+
+@Override
+public void create(Composite parent, int style) {
+ checkDeadlock();
+ ICoreWebView2Environment environment = createEnvironment();
+
+ long[] ppv = new long[1];
+ int hr = environment.QueryInterface(COM.IID_ICoreWebView2Environment2, ppv);
+ if (hr == COM.S_OK) environment2 = new ICoreWebView2Environment2(ppv[0]);
+
+ hr = callAndWait(ppv, completion -> environment.CreateCoreWebView2Controller(browser.handle, completion));
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ controller = new ICoreWebView2Controller(ppv[0]);
+
+ controller.get_CoreWebView2(ppv);
+ webView = new ICoreWebView2(ppv[0]);
+ webView.get_Settings(ppv);
+ settings = new ICoreWebView2Settings(ppv[0]);
+ hr = webView.QueryInterface(COM.IID_ICoreWebView2_2, ppv);
+ if (hr == COM.S_OK) webView_2 = new ICoreWebView2_2(ppv[0]);
+
+ long[] token = new long[1];
+ IUnknown handler;
+ handler = newCallback(this::handleCloseRequested);
+ webView.add_WindowCloseRequested(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleNavigationStarting);
+ webView.add_NavigationStarting(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleFrameNavigationStarting);
+ webView.add_FrameNavigationStarting(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleNavigationCompleted);
+ webView.add_NavigationCompleted(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleFrameNavigationCompleted);
+ webView.add_FrameNavigationCompleted(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleDocumentTitleChanged);
+ webView.add_DocumentTitleChanged(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleNewWindowRequested);
+ webView.add_NewWindowRequested(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleSourceChanged);
+ webView.add_SourceChanged(handler, token);
+ handler.Release();
+ handler = newCallback(this::handleMoveFocusRequested);
+ controller.add_MoveFocusRequested(handler, token);
+ handler.Release();
+ if (webView_2 != null) {
+ handler = newCallback(this::handleDOMContentLoaded);
+ webView_2.add_DOMContentLoaded(handler, token);
+ handler.Release();
+ }
+
+ IUnknown hostDisp = newHostObject(this::handleCallJava);
+ long[] hostObj = { COM.VT_DISPATCH, hostDisp.getAddress(), 0 }; // VARIANT
+ webView.AddHostObjectToScript("swt\0".toCharArray(), hostObj);
+ hostDisp.Release();
+
+ browser.addListener(SWT.Dispose, this::browserDispose);
+ browser.addListener(SWT.FocusIn, this::browserFocusIn);
+ browser.addListener(SWT.Resize, this::browserResize);
+ browser.addListener(SWT.Move, this::browserMove);
+
+ Instances.add(this);
+}
+
+void browserDispose(Event event) {
+ Instances.remove(this);
+
+ if (webView_2 != null) webView_2.Release();
+ if (environment2 != null) environment2.Release();
+ settings.Release();
+ webView.Release();
+ webView_2 = null;
+ environment2 = null;
+ settings = null;
+ webView = null;
+
+ // Bug in WebView2. Closing the controller from an event handler results
+ // in a crash. The fix is to delay the closure with asyncExec.
+ if (inCallback) {
+ ICoreWebView2Controller controller1 = controller;
+ controller.put_IsVisible(false);
+ browser.getDisplay().asyncExec(() -> {
+ controller1.Close();
+ controller1.Release();
+ });
+ } else {
+ controller.Close();
+ controller.Release();
+ }
+ controller = null;
+}
+
+void browserFocusIn(Event event) {
+ // TODO: directional traversals
+ controller.MoveFocus(COM.COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC);
+}
+
+void browserMove(Event event) {
+ controller.NotifyParentWindowPositionChanged();
+}
+
+void browserResize(Event event) {
+ RECT rect = new RECT();
+ OS.GetClientRect(browser.handle, rect);
+ controller.put_Bounds(rect);
+ controller.put_IsVisible(true);
+}
+
+@Override
+public Object evaluate(String script) throws SWTException {
+ checkDeadlock();
+
+ // Feature in WebView2. ExecuteScript works regardless of IsScriptEnabled setting.
+ // Disallow programmatic execution manually.
+ if (!jsEnabled) return null;
+
+ String script2 = "(function() {try { " + script + " } catch (e) { return '" + ERROR_ID + "' + e.message; } })();\0";
+ String[] pJson = new String[1];
+ int hr = callAndWait(pJson, completion -> webView.ExecuteScript(script2.toCharArray(), completion));
+ if (hr != COM.S_OK) error(SWT.ERROR_FAILED_EVALUATE, hr);
+
+ Object data = JSON.parse(pJson[0]);
+ if (data instanceof String && ((String) data).startsWith(ERROR_ID)) {
+ String errorMessage = ((String) data).substring(ERROR_ID.length());
+ throw new SWTException (SWT.ERROR_FAILED_EVALUATE, errorMessage);
+ }
+ return data;
+}
+
+@Override
+public boolean execute(String script) {
+ // Feature in WebView2. ExecuteScript works regardless of IsScriptEnabled setting.
+ // Disallow programmatic execution manually.
+ if (!jsEnabled) return false;
+
+ IUnknown completion = newCallback((long result, long json) -> COM.S_OK);
+ int hr = webView.ExecuteScript(stringToWstr(script), completion);
+ completion.Release();
+ return hr == COM.S_OK;
+}
+
+@Override
+public String getBrowserType() {
+ return "edge";
+}
+
+@Override
+String getJavaCallDeclaration() {
+ return "if (!window.callJava) { window.callJava = function(index, token, args) {\n"
+ +"return JSON.parse(window.chrome.webview.hostObjects.sync.swt.CallJava(index, token, JSON.stringify(args)));\n"
+ +"}};\n";
+}
+
+@Override
+public String getText() {
+ return (String)evaluate("return document.documentElement.outerHTML;");
+}
+
+@Override
+public String getUrl() {
+ long ppsz[] = new long[1];
+ webView.get_Source(ppsz);
+ return wstrToString(ppsz[0], true);
+}
+
+int handleCloseRequested(long pView, long pArgs) {
+ browser.getDisplay().asyncExec(() -> {
+ if (browser.isDisposed()) return;
+ WindowEvent event = new WindowEvent(browser);
+ event.display = browser.getDisplay();
+ event.widget = browser;
+ for (CloseWindowListener listener : closeWindowListeners) {
+ listener.close(event);
+ if (browser.isDisposed()) return;
+ }
+ browser.dispose();
+ });
+ return COM.S_OK;
+}
+
+int handleDocumentTitleChanged(long pView, long pArgs) {
+ long[] ppsz = new long[1];
+ webView.get_DocumentTitle(ppsz);
+ String title = wstrToString(ppsz[0], true);
+ browser.getDisplay().asyncExec(() -> {
+ if (browser.isDisposed()) return;
+ TitleEvent event = new TitleEvent(browser);
+ event.display = browser.getDisplay();
+ event.widget = browser;
+ event.title = title;
+ for (TitleListener listener : titleListeners) {
+ listener.changed(event);
+ if (browser.isDisposed()) return;
+ }
+ });
+ return COM.S_OK;
+}
+
+long handleCallJava(int index, long bstrToken, long bstrArgsJson) {
+ Object result = null;
+ String token = bstrToString(bstrToken);
+ BrowserFunction function = functions.get(index);
+ if (function != null && token.equals (function.token)) {
+ try {
+ String argsJson = bstrToString(bstrArgsJson);
+ Object args = (Object[]) JSON.parse(argsJson.toCharArray());
+ result = function.function ((Object[]) args);
+ } catch (Throwable e) {
+ result = WebBrowser.CreateErrorString(e.getLocalizedMessage());
+ }
+ }
+ String json = JSON.stringify(result);
+ return COM.SysAllocStringLen(json.toCharArray(), json.length());
+}
+
+int handleFrameNavigationStarting(long pView, long pArgs) {
+ return handleNavigationStarting(pView, pArgs, false);
+}
+
+int handleNavigationStarting(long pView, long pArgs) {
+ return handleNavigationStarting(pView, pArgs, true);
+}
+
+int handleNavigationStarting(long pView, long pArgs, boolean top) {
+ ICoreWebView2NavigationStartingEventArgs args = new ICoreWebView2NavigationStartingEventArgs(pArgs);
+ long[] ppszUrl = new long[1];
+ int hr = args.get_Uri(ppszUrl);
+ if (hr != COM.S_OK) return hr;
+ String url = wstrToString(ppszUrl[0], true);
+ long[] pNavId = new long[1];
+ args.get_NavigationId(pNavId);
+ LocationEvent event = new LocationEvent(browser);
+ event.display = browser.getDisplay();
+ event.widget = browser;
+ event.location = url;
+ event.top = top;
+ event.doit = true;
+ for (LocationListener listener : locationListeners) {
+ listener.changing(event);
+ if (browser.isDisposed()) return COM.S_OK;
+ }
+ if (event.doit) {
+ // Save location and top for all events that use navigationId.
+ navigations.put(pNavId[0], event);
+ jsEnabled = jsEnabledOnNextPage;
+ settings.put_IsScriptEnabled(jsEnabled);
+ // Register browser functions in the new document.
+ if (!functions.isEmpty()) {
+ StringBuilder sb = new StringBuilder();
+ for (BrowserFunction function : functions.values()) {
+ sb.append(function.functionString);
+ }
+ execute(sb.toString());
+ }
+ } else {
+ args.put_Cancel(true);
+ }
+ return COM.S_OK;
+}
+
+int handleSourceChanged(long pView, long pArgs) {
+ // Feature in WebView2. Navigations to data URIs set the Source
+ // to an empty string. Navigations with NavigateToString set the Source
+ // to about:blank. Initial Source is about:blank. If Source value
+ // is the same between navigations, SourceChanged isn't fired.
+ // TODO: emit missing location changed events
+ long[] ppsz = new long[1];
+ int hr = webView.get_Source(ppsz);
+ if (hr != COM.S_OK) return hr;
+ String url = wstrToString(ppsz[0], true);
+ browser.getDisplay().asyncExec(() -> {
+ if (browser.isDisposed()) return;
+ LocationEvent event = new LocationEvent(browser);
+ event.display = browser.getDisplay();
+ event.widget = browser;
+ event.location = url;
+ event.top = true;
+ for (LocationListener listener : locationListeners) {
+ listener.changed(event);
+ if (browser.isDisposed()) return;
+ }
+ });
+ return COM.S_OK;
+}
+
+void sendProgressCompleted() {
+ browser.getDisplay().asyncExec(() -> {
+ if (browser.isDisposed()) return;
+ ProgressEvent event = new ProgressEvent(browser);
+ event.display = browser.getDisplay();
+ event.widget = browser;
+ for (ProgressListener listener : progressListeners) {
+ listener.completed(event);
+ if (browser.isDisposed()) return;
+ }
+ });
+}
+
+int handleDOMContentLoaded(long pView, long pArgs) {
+ ICoreWebView2DOMContentLoadedEventArgs args = new ICoreWebView2DOMContentLoadedEventArgs(pArgs);
+ long[] pNavId = new long[1];
+ args.get_NavigationId(pNavId);
+ LocationEvent startEvent = navigations.get(pNavId[0]);
+ if (startEvent != null && startEvent.top) {
+ sendProgressCompleted();
+ }
+ return COM.S_OK;
+}
+
+int handleNavigationCompleted(long pView, long pArgs) {
+ return handleNavigationCompleted(pView, pArgs, true);
+}
+
+int handleFrameNavigationCompleted(long pView, long pArgs) {
+ return handleNavigationCompleted(pView, pArgs, false);
+}
+
+int handleNavigationCompleted(long pView, long pArgs, boolean top) {
+ ICoreWebView2NavigationCompletedEventArgs args = new ICoreWebView2NavigationCompletedEventArgs(pArgs);
+ long[] pNavId = new long[1];
+ args.get_NavigationId(pNavId);
+ LocationEvent startEvent = navigations.remove(pNavId[0]);
+ if (webView_2 == null && startEvent != null && startEvent.top) {
+ // If DOMContentLoaded isn't available, fire
+ // ProgressListener.completed from here.
+ sendProgressCompleted();
+ }
+ return COM.S_OK;
+}
+
+void updateWindowFeatures(ICoreWebView2NewWindowRequestedEventArgs args, WindowEvent event) {
+ long[] ppv = new long[1];
+ int hr = args.get_WindowFeatures(ppv);
+ if (hr != COM.S_OK) return;
+ ICoreWebView2WindowFeatures features = new ICoreWebView2WindowFeatures(ppv[0]);
+
+ int[] px = new int[1], py = new int[1];
+ features.get_HasPosition(px);
+ if (px[0] != 0) {
+ features.get_Left(px);
+ features.get_Top(py);
+ event.location = new Point(px[0], py[0]);
+ }
+ features.get_HasSize(px);
+ if (px[0] != 0) {
+ features.get_Width(px);
+ features.get_Height(py);
+ event.size = new Point(px[0], py[0]);
+ }
+ // event.addressBar = ???
+ features.get_ShouldDisplayMenuBar(px);
+ event.menuBar = px[0] != 0;
+ features.get_ShouldDisplayStatus(px);
+ event.statusBar = px[0] != 0;
+ features.get_ShouldDisplayToolbar(px);
+ event.toolBar = px[0] != 0;
+}
+
+int handleNewWindowRequested(long pView, long pArgs) {
+ ICoreWebView2NewWindowRequestedEventArgs args = new ICoreWebView2NewWindowRequestedEventArgs(pArgs);
+ args.AddRef();
+ long[] ppv = new long[1];
+ args.GetDeferral(ppv);
+ ICoreWebView2Deferral deferral = new ICoreWebView2Deferral(ppv[0]);
+ inNewWindow = true;
+ browser.getDisplay().asyncExec(() -> {
+ try {
+ if (browser.isDisposed()) return;
+ WindowEvent openEvent = new WindowEvent(browser);
+ openEvent.display = browser.getDisplay();
+ openEvent.widget = browser;
+ openEvent.required = false;
+ for (OpenWindowListener openListener : openWindowListeners) {
+ openListener.open(openEvent);
+ if (browser.isDisposed()) return;
+ }
+ if (openEvent.browser != null && !openEvent.browser.isDisposed()) {
+ WebBrowser other = openEvent.browser.webBrowser;
+ args.put_Handled(true);
+ if (other instanceof Edge) {
+ args.put_NewWindow(((Edge)other).webView.getAddress());
+
+ // Send show event to the other browser.
+ WindowEvent showEvent = new WindowEvent (other.browser);
+ showEvent.display = browser.getDisplay();
+ showEvent.widget = other.browser;
+ updateWindowFeatures(args, showEvent);
+ for (VisibilityWindowListener showListener : other.visibilityWindowListeners) {
+ showListener.show(showEvent);
+ if (other.browser.isDisposed()) return;
+ }
+ }
+ } else if (openEvent.required) {
+ args.put_Handled(true);
+ }
+ } finally {
+ deferral.Complete();
+ deferral.Release();
+ args.Release();
+ inNewWindow = false;
+ }
+ });
+ return COM.S_OK;
+}
+
+int handleMoveFocusRequested(long pView, long pArgs) {
+ ICoreWebView2MoveFocusRequestedEventArgs args = new ICoreWebView2MoveFocusRequestedEventArgs(pArgs);
+ int[] pReason = new int[1];
+ args.get_Reason(pReason);
+ args.put_Handled(true);
+ switch (pReason[0]) {
+ case COM.COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT:
+ browser.traverse(SWT.TRAVERSE_TAB_NEXT);
+ break;
+ case COM.COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS:
+ browser.traverse(SWT.TRAVERSE_TAB_PREVIOUS);
+ break;
+ }
+ return COM.S_OK;
+}
+
+@Override
+public boolean isBackEnabled() {
+ int[] pval = new int[1];
+ webView.get_CanGoBack(pval);
+ return pval[0] != 0;
+}
+
+@Override
+public boolean isForwardEnabled() {
+ int[] pval = new int[1];
+ webView.get_CanGoForward(pval);
+ return pval[0] != 0;
+}
+
+@Override
+public boolean back() {
+ // Feature in WebView2. GoBack returns S_OK even when CanGoBack is FALSE.
+ return isBackEnabled() && webView.GoBack() == COM.S_OK;
+}
+
+@Override
+public boolean forward() {
+ // Feature in WebView2. GoForward returns S_OK even when CanGoForward is FALSE.
+ return isForwardEnabled() && webView.GoForward() == COM.S_OK;
+}
+
+@Override
+public void refresh() {
+ webView.Reload();
+}
+
+@Override
+public void stop() {
+ webView.Stop();
+}
+
+@Override
+public boolean setText(String html, boolean trusted) {
+ char[] data = new char[html.length() + 1];
+ html.getChars(0, html.length(), data, 0);
+ return webView.NavigateToString(data) == COM.S_OK;
+}
+
+@Override
+public boolean setUrl(String url, String postData, String[] headers) {
+ // Feature in WebView2. Partial URLs like "www.example.com" are not accepted.
+ // Prepend the protocol if it's missing.
+ if (!url.matches("[a-z][a-z0-9+.-]*:.*")) {
+ url = "http://" + url;
+ }
+ int hr;
+ char[] pszUrl = stringToWstr(url);
+ if (postData != null || headers != null) {
+ if (environment2 == null || webView_2 == null) {
+ SWT.error(SWT.ERROR_NOT_IMPLEMENTED, null, " [WebView2 version 88+ is required to set postData and headers]");
+ }
+ long[] ppRequest = new long[1];
+ char[] pszMethod = null;
+ char[] pszHeaders = null;
+ IStream stream = null;
+ if (postData != null) {
+ pszMethod = "POST\0".toCharArray();
+ byte[] postDataBytes = postData.getBytes(StandardCharsets.UTF_8);
+ long pStream = COM.SHCreateMemStream(postDataBytes, postData.length());
+ if (pStream == 0) error(SWT.ERROR_NO_HANDLES, COM.E_OUTOFMEMORY);
+ stream = new IStream(pStream);
+ } else {
+ pszMethod = "GET\0".toCharArray();
+ }
+ if (headers != null) {
+ String hblock = String.join("\r\n", Arrays.asList(headers));
+ pszHeaders = new char[hblock.length() + 1];
+ hblock.getChars(0, hblock.length(), pszHeaders, 0);
+ }
+ hr = environment2.CreateWebResourceRequest(pszUrl, pszMethod, stream, pszHeaders, ppRequest);
+ if (stream != null) stream.Release();
+ if (hr != COM.S_OK) error(SWT.ERROR_NO_HANDLES, hr);
+ IUnknown request = new IUnknown(ppRequest[0]);
+ hr = webView_2.NavigateWithWebResourceRequest(request);
+ request.Release();
+ } else {
+ hr = webView.Navigate(pszUrl);
+ }
+ return hr == COM.S_OK;
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
index 0c0e6409a8..840d258570 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
@@ -38,7 +38,7 @@ class IE extends WebBrowser {
Point location;
Point size;
boolean addressBar = true, menuBar = true, statusBar = true, toolBar = true;
- long /*int*/ globalDispatch;
+ long globalDispatch;
String html, lastNavigateURL, uncRedirect;
Object[] pendingText, pendingUrl;
int style, lastKeyCode, lastCharCode;
@@ -192,7 +192,7 @@ class IE extends WebBrowser {
* version-specific features that can be enabled.
*/
TCHAR key = new TCHAR (0, "Software\\Microsoft\\Internet Explorer", true); //$NON-NLS-1$
- long /*int*/ [] phkResult = new long /*int*/ [1];
+ long [] phkResult = new long [1];
if (OS.RegOpenKeyEx (OS.HKEY_LOCAL_MACHINE, key, 0, OS.KEY_READ, phkResult) == 0) {
int [] lpcbData = new int [1];
TCHAR buffer = new TCHAR (0, "svcVersion", true); //$NON-NLS-1$
@@ -210,7 +210,7 @@ class IE extends WebBrowser {
if (index != -1) {
String majorString = versionString.substring (0, index);
try {
- IEVersion = Integer.valueOf (majorString).intValue ();
+ IEVersion = Integer.parseInt (majorString);
} catch (NumberFormatException e) {
/* just continue, version-specific features will not be enabled */
}
@@ -232,7 +232,7 @@ class IE extends WebBrowser {
* will be embedded to explicitly specify Shell.Explorer.2.
*/
key = new TCHAR (0, "Shell.Explorer\\CLSID", true); //$NON-NLS-1$
- phkResult = new long /*int*/ [1];
+ phkResult = new long [1];
if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult) == 0) {
int [] lpcbData = new int [1];
int result = OS.RegQueryValueEx (phkResult [0], null, 0, null, (TCHAR) null, lpcbData);
@@ -244,7 +244,7 @@ class IE extends WebBrowser {
if (clsid.equals (CLSID_SHELLEXPLORER1)) {
/* Shell.Explorer.1 is the default, ensure that Shell.Explorer.2 is available */
key = new TCHAR (0, "Shell.Explorer.2", true); //$NON-NLS-1$
- long /*int*/ [] phkResult2 = new long /*int*/ [1];
+ long [] phkResult2 = new long [1];
if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult2) == 0) {
/* specify that Shell.Explorer.2 is to be used */
OS.RegCloseKey (phkResult2 [0]);
@@ -283,7 +283,7 @@ public void create(Composite parent, int style) {
version = -1;
} else {
try {
- version = Integer.valueOf(versionProperty).intValue();
+ version = Integer.parseInt(versionProperty);
} catch (NumberFormatException e) {
/*
* An invalid value was specified for the IEVersion java property. Ignore it
@@ -321,7 +321,7 @@ public void create(Composite parent, int style) {
}
if (version != -1) {
- long /*int*/[] key = new long /*int*/[1];
+ long[] key = new long[1];
final TCHAR subkey = new TCHAR(0, "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true); //$NON-NLS-1$
if (OS.RegCreateKeyEx(OS.HKEY_CURRENT_USER, subkey, 0, null, OS.REG_OPTION_VOLATILE, OS.KEY_WRITE | OS.KEY_QUERY_VALUE, 0, key, null) == 0) {
TCHAR lpszFile = new TCHAR(0, OS.MAX_PATH);
@@ -342,7 +342,7 @@ public void create(Composite parent, int style) {
if (result == 0 || result == OS.ERROR_FILE_NOT_FOUND) {
if (OS.RegSetValueEx(key[0], lpValueName, 0, OS.REG_DWORD, new int[] {version}, 4) == 0) {
parent.getDisplay().addListener(SWT.Dispose, event -> {
- long /*int*/[] key1 = new long /*int*/[1];
+ long[] key1 = new long[1];
if (OS.RegOpenKeyEx(OS.HKEY_CURRENT_USER, subkey, 0, OS.KEY_WRITE, key1) == 0) {
OS.RegDeleteValue(key1[0], lpValueName);
}
@@ -388,8 +388,8 @@ public void create(Composite parent, int style) {
*/
if (!frame.isDisposed ()) unhookDOMListeners(documents);
- for (int i = 0; i < documents.length; i++) {
- documents[i].dispose();
+ for (OleAutomation document : documents) {
+ document.dispose();
}
documents = null;
@@ -475,7 +475,7 @@ public void create(Composite parent, int style) {
if (uncRedirect.equals(url1) || (uncRedirect.startsWith(url1) && uncRedirect.indexOf('\\', 2) == url1.length())) {
Variant cancel1 = event.arguments[6];
if (cancel1 != null) {
- long /*int*/ pCancel1 = cancel1.getByRef();
+ long pCancel1 = cancel1.getByRef();
OS.MoveMemory(pCancel1, new short[] {OS.VARIANT_FALSE}, 2);
}
setAboutBlank(false);
@@ -510,7 +510,7 @@ public void create(Composite parent, int style) {
if (url1.startsWith(PROTOCOL_FILE) && _getUrl().startsWith(ABOUT_BLANK) && untrustedText) {
Variant cancel2 = event.arguments[6];
if (cancel2 != null) {
- long /*int*/ pCancel2 = cancel2.getByRef();
+ long pCancel2 = cancel2.getByRef();
OS.MoveMemory(pCancel2, new short[] {OS.VARIANT_TRUE}, 2);
}
break;
@@ -521,13 +521,13 @@ public void create(Composite parent, int style) {
newEvent1.widget = browser;
newEvent1.location = url1;
newEvent1.doit = true;
- for (int i1 = 0; i1 < locationListeners.length; i1++) {
- locationListeners[i1].changing(newEvent1);
+ for (LocationListener locationListener : locationListeners) {
+ locationListener.changing(newEvent1);
}
boolean doit1 = newEvent1.doit && !browser.isDisposed();
Variant cancel3 = event.arguments[6];
if (cancel3 != null) {
- long /*int*/ pCancel3 = cancel3.getByRef();
+ long pCancel3 = cancel3.getByRef();
OS.MoveMemory(pCancel3, new short[] {doit1 ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2);
}
if (doit1) {
@@ -609,8 +609,8 @@ public void create(Composite parent, int style) {
locationEvent.widget = browser;
locationEvent.location = url2;
locationEvent.top = top2.getAddress() == dispatch2.getAddress();
- for (int i2 = 0; i2 < locationListeners.length; i2++) {
- locationListeners[i2].changed(locationEvent);
+ for (LocationListener locationListener : locationListeners) {
+ locationListener.changed(locationEvent);
}
if (browser.isDisposed()) return;
@@ -652,8 +652,8 @@ public void create(Composite parent, int style) {
ProgressEvent progressEvent1 = new ProgressEvent(browser);
progressEvent1.display = browser.getDisplay();
progressEvent1.widget = browser;
- for (int i3 = 0; i3 < progressListeners.length; i3++) {
- progressListeners[i3].completed(progressEvent1);
+ for (ProgressListener progressListener : progressListeners) {
+ progressListener.completed(progressEvent1);
}
}
}
@@ -684,8 +684,8 @@ public void create(Composite parent, int style) {
ProgressEvent progressEvent2 = new ProgressEvent(browser);
progressEvent2.display = browser.getDisplay();
progressEvent2.widget = browser;
- for (int i4 = 0; i4 < progressListeners.length; i4++) {
- progressListeners[i4].completed(progressEvent2);
+ for (ProgressListener progressListener : progressListeners) {
+ progressListener.completed(progressEvent2);
}
break;
@@ -762,8 +762,8 @@ public void create(Composite parent, int style) {
if (isTop) {
/* unhook DOM listeners and unref the last document(s) */
unhookDOMListeners(documents);
- for (int i5 = 0; i5 < documents.length; i5++) {
- documents[i5].dispose();
+ for (OleAutomation document : documents) {
+ document.dispose();
}
documents = new OleAutomation[0];
@@ -800,7 +800,7 @@ public void create(Composite parent, int style) {
final String host = url4.substring(0, index);
Variant cancel4 = event.arguments[4];
if (cancel4 != null) {
- long /*int*/ pCancel4 = cancel4.getByRef();
+ long pCancel4 = cancel4.getByRef();
OS.MoveMemory(pCancel4, new short[] {OS.VARIANT_TRUE}, 2);
}
browser.getDisplay().asyncExec(() -> {
@@ -825,13 +825,13 @@ public void create(Composite parent, int style) {
}
case NewWindow2: {
Variant cancel5 = event.arguments[1];
- long /*int*/ pCancel5 = cancel5.getByRef();
+ long pCancel5 = cancel5.getByRef();
WindowEvent newEvent2 = new WindowEvent(browser);
newEvent2.display = browser.getDisplay();
newEvent2.widget = browser;
newEvent2.required = false;
- for (int i6 = 0; i6 < openWindowListeners.length; i6++) {
- openWindowListeners[i6].open(newEvent2);
+ for (OpenWindowListener openWindowListener : openWindowListeners) {
+ openWindowListener.open(newEvent2);
}
IE browser = null;
if (newEvent2.browser != null && newEvent2.browser.webBrowser instanceof IE) {
@@ -850,8 +850,8 @@ public void create(Composite parent, int style) {
Variant variant5 = new Variant(browser.auto); /* does not need to be disposed */
IDispatch iDispatch = variant5.getDispatch();
Variant ppDisp = event.arguments[0];
- long /*int*/ byref = ppDisp.getByRef();
- if (byref != 0) OS.MoveMemory(byref, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
+ long byref = ppDisp.getByRef();
+ if (byref != 0) OS.MoveMemory(byref, new long[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
}
if (newEvent2.required) {
OS.MoveMemory(pCancel5, new short[]{doit2 ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2);
@@ -914,14 +914,14 @@ public void create(Composite parent, int style) {
newEvent3.toolBar = toolBar;
newEvent3.location = location;
newEvent3.size = size;
- for (int i7 = 0; i7 < visibilityWindowListeners.length; i7++) {
- visibilityWindowListeners[i7].show(newEvent3);
+ for (VisibilityWindowListener visibilityWindowListener : visibilityWindowListeners) {
+ visibilityWindowListener.show(newEvent3);
}
location = null;
size = null;
} else {
- for (int i8 = 0; i8 < visibilityWindowListeners.length; i8++) {
- visibilityWindowListeners[i8].hide(newEvent3);
+ for (VisibilityWindowListener visibilityWindowListener : visibilityWindowListeners) {
+ visibilityWindowListener.hide(newEvent3);
}
}
break;
@@ -940,8 +940,8 @@ public void create(Composite parent, int style) {
newEvent4.current = nProgress;
newEvent4.total = nProgressMax;
if (nProgress != -1) {
- for (int i9 = 0; i9 < progressListeners.length; i9++) {
- progressListeners[i9].changed(newEvent4);
+ for (ProgressListener progressListener : progressListeners) {
+ progressListener.changed(newEvent4);
}
}
break;
@@ -957,8 +957,8 @@ public void create(Composite parent, int style) {
newEvent5.display = browser.getDisplay();
newEvent5.widget = browser;
newEvent5.text = text;
- for (int i10 = 0; i10 < statusTextListeners.length; i10++) {
- statusTextListeners[i10].changed(newEvent5);
+ for (StatusTextListener statusTextListener : statusTextListeners) {
+ statusTextListener.changed(newEvent5);
}
}
break;
@@ -974,8 +974,8 @@ public void create(Composite parent, int style) {
newEvent6.display = browser.getDisplay();
newEvent6.widget = browser;
newEvent6.title = title;
- for (int i11 = 0; i11 < titleListeners.length; i11++) {
- titleListeners[i11].changed(newEvent6);
+ for (TitleListener titleListener : titleListeners) {
+ titleListener.changed(newEvent6);
}
}
break;
@@ -991,13 +991,13 @@ public void create(Composite parent, int style) {
WindowEvent newEvent = new WindowEvent(browser);
newEvent.display = browser.getDisplay();
newEvent.widget = browser;
- for (int i = 0; i < closeWindowListeners.length; i++) {
- closeWindowListeners[i].close(newEvent);
+ for (CloseWindowListener closeWindowListener : closeWindowListeners) {
+ closeWindowListener.close(newEvent);
}
browser.dispose();
});
Variant cancel6 = event.arguments[1];
- long /*int*/ pCancel6 = cancel6.getByRef();
+ long pCancel6 = cancel6.getByRef();
Variant arg15 = event.arguments[0];
boolean isChildWindow = arg15.getBoolean();
OS.MoveMemory(pCancel6, new short[]{isChildWindow ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2);
@@ -1125,12 +1125,12 @@ static Variant createSafeArray(String string) {
/* Create a pointer and copy the data into it */
byte[] bytes = string.getBytes();
int length = bytes.length;
- long /*int*/ pvData = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, length);
+ long pvData = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, length);
C.memmove(pvData, bytes, length);
int cElements1 = length;
/* Create a SAFEARRAY in memory */
- long /*int*/ pSafeArray = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, SAFEARRAY.sizeof);
+ long pSafeArray = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, SAFEARRAY.sizeof);
SAFEARRAY safeArray = new SAFEARRAY();
safeArray.cDims = 1;
safeArray.fFeatures = OS.FADF_FIXEDSIZE;
@@ -1142,10 +1142,10 @@ static Variant createSafeArray(String string) {
OS.MoveMemory (pSafeArray, safeArray, SAFEARRAY.sizeof);
/* Return a Variant that holds the SAFEARRAY */
- long /*int*/ pVariant = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, Variant.sizeof);
+ long pVariant = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, Variant.sizeof);
short vt = (short)(OLE.VT_ARRAY | OLE.VT_UI1);
OS.MoveMemory(pVariant, new short[] {vt}, 2);
- OS.MoveMemory(pVariant + 8, new long /*int*/[] {pSafeArray}, C.PTR_SIZEOF);
+ OS.MoveMemory(pVariant + 8, new long[] {pSafeArray}, C.PTR_SIZEOF);
return new Variant(pVariant, (short)(OLE.VT_BYREF | OLE.VT_VARIANT));
}
@@ -1317,9 +1317,8 @@ boolean navigate(String url, String postData, String headers[], boolean silent)
rgdispidNamedArgs[index++] = rgdispid[2];
}
if (headers != null) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < headers.length; i++) {
- String current = headers[i];
+ StringBuilder buffer = new StringBuilder();
+ for (String current : headers) {
if (current != null) {
int sep = current.indexOf(':');
if (sep != -1) {
@@ -1398,11 +1397,11 @@ void setHTML (String string) {
* prepend the UTF-8 Byte Order Mark signature to the data.
*/
byte[] UTF8BOM = {(byte)0xEF, (byte)0xBB, (byte)0xBF};
- long /*int*/ hGlobal = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, UTF8BOM.length + byteCount);
+ long hGlobal = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, UTF8BOM.length + byteCount);
if (hGlobal != 0) {
OS.MoveMemory(hGlobal, UTF8BOM, UTF8BOM.length);
OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, charCount, hGlobal + UTF8BOM.length, byteCount, null, null);
- long /*int*/ [] ppstm = new long /*int*/ [1];
+ long [] ppstm = new long [1];
/*
* CreateStreamOnHGlobal is called with the flag fDeleteOnRelease.
* If the call succeeds the buffer hGlobal is freed automatically
@@ -1413,7 +1412,7 @@ void setHTML (String string) {
int[] rgdispid = auto.getIDsOfNames(new String[] {PROPERTY_DOCUMENT});
Variant pVarResult = auto.getProperty(rgdispid[0]);
IDispatch dispatchDocument = pVarResult.getDispatch();
- long /*int*/ [] ppvObject = new long /*int*/ [1];
+ long [] ppvObject = new long [1];
int result = dispatchDocument.QueryInterface(COM.IIDIPersistStreamInit, ppvObject);
if (result == OS.S_OK) {
IPersistStreamInit persistStreamInit = new IPersistStreamInit(ppvObject[0]);
@@ -2022,8 +2021,7 @@ void unhookDOMListeners(OleAutomation[] documents) {
char[] buffer = (COM.IIDIHTMLDocumentEvents2 + '\0').toCharArray();
GUID guid = new GUID();
if (COM.IIDFromString(buffer, guid) == COM.S_OK) {
- for (int i = 0; i < documents.length; i++) {
- OleAutomation document = documents[i];
+ for (OleAutomation document : documents) {
site.removeEventListener(document, guid, COM.DISPID_HTMLDOCUMENTEVENTS_ONKEYDOWN, domListener);
site.removeEventListener(document, guid, COM.DISPID_HTMLDOCUMENTEVENTS_ONKEYPRESS, domListener);
site.removeEventListener(document, guid, COM.DISPID_HTMLDOCUMENTEVENTS_ONKEYUP, domListener);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
index a519c655f2..75574d434a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
@@ -47,119 +47,113 @@ protected void createCOMInterfaces () {
super.createCOMInterfaces();
iDocHostUIHandler = new COMObject(new int[]{2, 0, 0, 4, 1, 5, 0, 0, 1, 1, 1, 3, 3, 2, 2, 1, 3, 2}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return ShowContextMenu((int)/*64*/args[0], args[1], args[2], args[3]);}
+ public long method3(long[] args) {return ShowContextMenu((int)args[0], args[1], args[2], args[3]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return GetHostInfo(args[0]);}
+ public long method4(long[] args) {return GetHostInfo(args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return ShowUI((int)/*64*/args[0], args[1], args[2], args[3], args[4]);}
+ public long method5(long[] args) {return ShowUI((int)args[0], args[1], args[2], args[3], args[4]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return HideUI();}
+ public long method6(long[] args) {return HideUI();}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return UpdateUI();}
+ public long method7(long[] args) {return UpdateUI();}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return EnableModeless((int)/*64*/args[0]);}
+ public long method8(long[] args) {return EnableModeless((int)args[0]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return OnDocWindowActivate((int)/*64*/args[0]);}
+ public long method9(long[] args) {return OnDocWindowActivate((int)args[0]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return OnFrameWindowActivate((int)/*64*/args[0]);}
+ public long method10(long[] args) {return OnFrameWindowActivate((int)args[0]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return ResizeBorder(args[0], args[1], (int)/*64*/args[2]);}
+ public long method11(long[] args) {return ResizeBorder(args[0], args[1], (int)args[2]);}
@Override
- public long /*int*/ method12(long /*int*/[] args) {return TranslateAccelerator(args[0], args[1], (int)/*64*/args[2]);}
+ public long method12(long[] args) {return TranslateAccelerator(args[0], args[1], (int)args[2]);}
@Override
- public long /*int*/ method13(long /*int*/[] args) {return GetOptionKeyPath(args[0], (int)/*64*/args[1]);}
+ public long method13(long[] args) {return GetOptionKeyPath(args[0], (int)args[1]);}
@Override
- public long /*int*/ method14(long /*int*/[] args) {return GetDropTarget(args[0], args[1]);}
+ public long method14(long[] args) {return GetDropTarget(args[0], args[1]);}
@Override
- public long /*int*/ method15(long /*int*/[] args) {return GetExternal(args[0]);}
+ public long method15(long[] args) {return GetExternal(args[0]);}
@Override
- public long /*int*/ method16(long /*int*/[] args) {return TranslateUrl((int)/*64*/args[0], args[1], args[2]);}
+ public long method16(long[] args) {return TranslateUrl((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method17(long /*int*/[] args) {return FilterDataObject(args[0], args[1]);}
+ public long method17(long[] args) {return FilterDataObject(args[0], args[1]);}
};
- iDocHostShowUI = new COMObject(new int[]{2, 0, 0, 7, C.PTR_SIZEOF == 4 ? 7 : 6}){
+ iDocHostShowUI = new COMObject(new int[]{2, 0, 0, 7, 6}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return ShowMessage(args[0], args[1], args[2], (int)/*64*/args[3], args[4], (int)/*64*/args[5], args[6]);}
+ public long method3(long[] args) {return ShowMessage(args[0], args[1], args[2], (int)args[3], args[4], (int)args[5], args[6]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {
- if (args.length == 7) {
- return ShowHelp(args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4], (int)/*64*/args[5], args[6]);
- } else {
- return ShowHelp_64(args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4], args[5]);
- }
- }
+ public long method4(long[] args) {return ShowHelp(args[0], args[1], (int)args[2], (int)args[3], args[4], args[5]);}
};
iServiceProvider = new COMObject(new int[]{2, 0, 0, 3}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return QueryService(args[0], args[1], args[2]);}
+ public long method3(long[] args) {return QueryService(args[0], args[1], args[2]);}
};
iInternetSecurityManager = new COMObject(new int[]{2, 0, 0, 1, 1, 3, 4, 8, 7, 3, 3}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return SetSecuritySite(args[0]);}
+ public long method3(long[] args) {return SetSecuritySite(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return GetSecuritySite(args[0]);}
+ public long method4(long[] args) {return GetSecuritySite(args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return MapUrlToZone(args[0], args[1], (int)/*64*/args[2]);}
+ public long method5(long[] args) {return MapUrlToZone(args[0], args[1], (int)args[2]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return GetSecurityId(args[0], args[1], args[2], args[3]);}
+ public long method6(long[] args) {return GetSecurityId(args[0], args[1], args[2], args[3]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return ProcessUrlAction(args[0], (int)/*64*/args[1], args[2], (int)/*64*/args[3], args[4], (int)/*64*/args[5], (int)/*64*/args[6], (int)/*64*/args[7]);}
+ public long method7(long[] args) {return ProcessUrlAction(args[0], (int)args[1], args[2], (int)args[3], args[4], (int)args[5], (int)args[6], (int)args[7]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return QueryCustomPolicy(args[0], args[1], args[2], args[3], args[4], (int)/*64*/args[5], (int)/*64*/args[6]);}
+ public long method8(long[] args) {return QueryCustomPolicy(args[0], args[1], args[2], args[3], args[4], (int)args[5], (int)args[6]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return SetZoneMapping((int)/*64*/args[0], args[1], (int)/*64*/args[2]);}
+ public long method9(long[] args) {return SetZoneMapping((int)args[0], args[1], (int)args[2]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return GetZoneMappings((int)/*64*/args[0], args[1], (int)/*64*/args[2]);}
+ public long method10(long[] args) {return GetZoneMappings((int)args[0], args[1], (int)args[2]);}
};
iOleCommandTarget = new COMObject(new int[]{2, 0, 0, 4, 5}) {
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return QueryStatus(args[0], (int)/*64*/args[1], args[2], args[3]);}
+ public long method3(long[] args) {return QueryStatus(args[0], (int)args[1], args[2], args[3]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return Exec(args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3], args[4]);}
+ public long method4(long[] args) {return Exec(args[0], (int)args[1], (int)args[2], args[3], args[4]);}
};
iAuthenticate = new COMObject(new int[]{2, 0, 0, 3}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return Authenticate(args[0], args[1], args[2]);}
+ public long method3(long[] args) {return Authenticate(args[0], args[1], args[2]);}
};
iDispatch = new COMObject (new int[] {2, 0, 0, 1, 3, 5, 8}) {
@Override
- public long /*int*/ method0 (long /*int*/[] args) {
+ public long method0 (long[] args) {
/*
* IDispatch check must be done here instead of in the shared QueryInterface
* implementation, to avoid answering the superclass's IDispatch implementation
@@ -168,24 +162,24 @@ protected void createCOMInterfaces () {
GUID guid = new GUID ();
COM.MoveMemory (guid, args[0], GUID.sizeof);
if (COM.IsEqualGUID (guid, COM.IIDIDispatch)) {
- OS.MoveMemory (args[1], new long /*int*/[] {iDispatch.getAddress ()}, C.PTR_SIZEOF);
+ OS.MoveMemory (args[1], new long[] {iDispatch.getAddress ()}, C.PTR_SIZEOF);
AddRef ();
return COM.S_OK;
}
return QueryInterface (args[0], args[1]);
}
@Override
- public long /*int*/ method1 (long /*int*/[] args) {return AddRef ();}
+ public long method1 (long[] args) {return AddRef ();}
@Override
- public long /*int*/ method2 (long /*int*/[] args) {return Release ();}
+ public long method2 (long[] args) {return Release ();}
@Override
- public long /*int*/ method3 (long /*int*/[] args) {return GetTypeInfoCount (args[0]);}
+ public long method3 (long[] args) {return GetTypeInfoCount (args[0]);}
@Override
- public long /*int*/ method4 (long /*int*/[] args) {return GetTypeInfo ((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+ public long method4 (long[] args) {return GetTypeInfo ((int)args[0], (int)args[1], args[2]);}
@Override
- public long /*int*/ method5 (long /*int*/[] args) {return GetIDsOfNames ((int)/*64*/args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]);}
+ public long method5 (long[] args) {return GetIDsOfNames ((int)args[0], args[1], (int)args[2], (int)args[3], args[4]);}
@Override
- public long /*int*/ method6 (long /*int*/[] args) {return Invoke ((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4], args[5], args[6], args[7]);}
+ public long method6 (long[] args) {return Invoke ((int)args[0], (int)args[1], (int)args[2], (int)args[3], args[4], args[5], args[6], args[7]);}
};
}
@@ -229,38 +223,38 @@ protected int AddRef() {
}
@Override
-protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+protected int QueryInterface(long riid, long ppvObject) {
int result = super.QueryInterface(riid, ppvObject);
if (result == COM.S_OK) return result;
if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIDocHostUIHandler)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDocHostUIHandler.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iDocHostUIHandler.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIDocHostShowUI)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDocHostShowUI.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iDocHostShowUI.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIServiceProvider)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iServiceProvider.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iServiceProvider.getAddress()}, C.PTR_SIZEOF);
+ AddRef();
+ return COM.S_OK;
+ }
+ if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) {
+ OS.MoveMemory(ppvObject, new long[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
- AddRef();
- return COM.S_OK;
- }
if (COM.IsEqualGUID(guid, COM.IIDIOleCommandTarget)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iOleCommandTarget.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iOleCommandTarget.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -270,21 +264,21 @@ int EnableModeless(int EnableModeless) {
return COM.E_NOTIMPL;
}
-int FilterDataObject(long /*int*/ pDO, long /*int*/ ppDORet) {
+int FilterDataObject(long pDO, long ppDORet) {
return COM.E_NOTIMPL;
}
-int GetDropTarget(long /*int*/ pDropTarget, long /*int*/ ppDropTarget) {
+int GetDropTarget(long pDropTarget, long ppDropTarget) {
return COM.E_NOTIMPL;
}
-int GetExternal(long /*int*/ ppDispatch) {
- OS.MoveMemory (ppDispatch, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
+int GetExternal(long ppDispatch) {
+ OS.MoveMemory (ppDispatch, new long[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
AddRef ();
return COM.S_OK;
}
-int GetHostInfo(long /*int*/ pInfo) {
+int GetHostInfo(long pInfo) {
int info = IE.DOCHOSTUIFLAG_THEME | IE.DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION | IE.DOCHOSTUIFLAG_DPI_AWARE;
IE browser = (IE)((Browser)getParent().getParent()).webBrowser;
if ((browser.style & SWT.BORDER) == 0) info |= IE.DOCHOSTUIFLAG_NO3DOUTERBORDER;
@@ -295,7 +289,7 @@ int GetHostInfo(long /*int*/ pInfo) {
return COM.S_OK;
}
-int GetOptionKeyPath(long /*int*/ pchKey, int dw) {
+int GetOptionKeyPath(long pchKey, int dw) {
return COM.E_NOTIMPL;
}
@@ -317,11 +311,11 @@ protected int Release() {
return super.Release();
}
-int ResizeBorder(long /*int*/ prcBorder, long /*int*/ pUIWindow, int fFrameWindow) {
+int ResizeBorder(long prcBorder, long pUIWindow, int fFrameWindow) {
return COM.E_NOTIMPL;
}
-int ShowContextMenu(int dwID, long /*int*/ ppt, long /*int*/ pcmdtReserved, long /*int*/ pdispReserved) {
+int ShowContextMenu(int dwID, long ppt, long pcmdtReserved, long pdispReserved) {
Browser browser = (Browser)getParent().getParent();
Event event = new Event();
POINT pt = new POINT();
@@ -344,11 +338,11 @@ int ShowContextMenu(int dwID, long /*int*/ ppt, long /*int*/ pcmdtReserved, long
return COM.S_FALSE;
}
-int ShowUI(int dwID, long /*int*/ pActiveObject, long /*int*/ pCommandTarget, long /*int*/ pFrame, long /*int*/ pDoc) {
+int ShowUI(int dwID, long pActiveObject, long pCommandTarget, long pFrame, long pDoc) {
return COM.S_FALSE;
}
-int TranslateAccelerator(long /*int*/ lpMsg, long /*int*/ pguidCmdGroup, int nCmdID) {
+int TranslateAccelerator(long lpMsg, long pguidCmdGroup, int nCmdID) {
/*
* Feature in Internet Explorer. By default the embedded Internet Explorer control runs
* the Internet Explorer shortcuts (e.g. Ctrl+F for Find). This overrides the shortcuts
@@ -358,8 +352,8 @@ int TranslateAccelerator(long /*int*/ lpMsg, long /*int*/ pguidCmdGroup, int nCm
Menu menubar = getShell().getMenuBar();
if (menubar != null && !menubar.isDisposed() && menubar.isEnabled()) {
Shell shell = menubar.getShell();
- long /*int*/ hwnd = shell.handle;
- long /*int*/ hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);
+ long hwnd = shell.handle;
+ long hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);
if (hAccel != 0) {
MSG msg = new MSG();
OS.MoveMemory(msg, lpMsg, MSG.sizeof);
@@ -380,7 +374,7 @@ int TranslateAccelerator(long /*int*/ lpMsg, long /*int*/ pguidCmdGroup, int nCm
MSG msg = new MSG();
OS.MoveMemory(msg, lpMsg, MSG.sizeof);
if (msg.message == OS.WM_KEYDOWN) {
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_F5:
OleAutomation auto = new OleAutomation(this);
int[] rgdispid = auto.getIDsOfNames(new String[] { "LocationURL" }); //$NON-NLS-1$
@@ -410,14 +404,15 @@ int TranslateAccelerator(long /*int*/ lpMsg, long /*int*/ pguidCmdGroup, int nCm
case OS.VK_NEXT:
/* Do not translate/consume IE's keys for scrolling content. */
break;
+ case OS.VK_SPACE:
case OS.VK_BACK:
case OS.VK_RETURN:
/*
- * Translating OS.VK_BACK or OS.VK_RETURN results in the native control
- * handling them twice (eg.- inserting two lines instead of one). So
- * these keys are not translated here, and instead are explicitly handled
- * in the keypress handler.
- */
+ * Translating OS.VK_BACK, OS.VK_RETURN or OS.VK_SPACE results in the native
+ * control handling them twice (eg.- inserting two lines instead of one). So
+ * these keys are not translated here, and instead are explicitly handled
+ * in the keypress handler.
+ */
break;
case OS.VK_L:
case OS.VK_N:
@@ -441,7 +436,7 @@ int TranslateAccelerator(long /*int*/ lpMsg, long /*int*/ pguidCmdGroup, int nCm
case OS.WM_KEYDOWN:
case OS.WM_KEYUP: {
boolean isAccent = false;
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -450,12 +445,12 @@ int TranslateAccelerator(long /*int*/ lpMsg, long /*int*/ pguidCmdGroup, int nCm
case OS.VK_SCROLL:
break;
default: {
- int mapKey = OS.MapVirtualKey ((int)/*64*/msg.wParam, 2);
+ int mapKey = OS.MapVirtualKey ((int)msg.wParam, 2);
if (mapKey != 0) {
isAccent = (mapKey & 0x80000000) != 0;
if (!isAccent) {
- for (int i=0; i<ACCENTS.length; i++) {
- int value = OS.VkKeyScan (ACCENTS [i]);
+ for (short element : ACCENTS) {
+ int value = OS.VkKeyScan (element);
if (value != -1 && (value & 0xFF) == msg.wParam) {
int state = value >> 8;
if ((OS.GetKeyState (OS.VK_SHIFT) < 0) == ((state & 0x1) != 0) &&
@@ -477,7 +472,7 @@ int TranslateAccelerator(long /*int*/ lpMsg, long /*int*/ pguidCmdGroup, int nCm
return result;
}
-int TranslateUrl(int dwTranslate, long /*int*/ pchURLIn, long /*int*/ ppchURLOut) {
+int TranslateUrl(int dwTranslate, long pchURLIn, long ppchURLOut) {
return COM.E_NOTIMPL;
}
@@ -487,24 +482,13 @@ int UpdateUI() {
/* IDocHostShowUI */
-int ShowMessage(long /*int*/ hwnd, long /*int*/ lpstrText, long /*int*/ lpstrCaption, int dwType, long /*int*/ lpstrHelpFile, int dwHelpContext, long /*int*/ plResult) {
+int ShowMessage(long hwnd, long lpstrText, long lpstrCaption, int dwType, long lpstrHelpFile, int dwHelpContext, long plResult) {
boolean ignore = ignoreNextMessage || ignoreAllMessages;
ignoreNextMessage = false;
return ignore ? COM.S_OK : COM.S_FALSE;
}
-int ShowHelp_64(long /*int*/ hwnd, long /*int*/ pszHelpFile, int uCommand, int dwData, long pt, long /*int*/ pDispatchObjectHit) {
- POINT point = new POINT();
- OS.MoveMemory(point, new long[]{pt}, 8);
- return ShowHelp(hwnd, pszHelpFile, uCommand, dwData, point.x, point.y, pDispatchObjectHit);
-}
-
-/* Note. One of the arguments of ShowHelp is a POINT struct and not a pointer to a POINT struct. Because
- * of the way Callback gets int parameters from a va_list of C arguments 2 integer arguments must be declared,
- * ptMouse_x and ptMouse_y. Otherwise the Browser crashes when the user presses F1 to invoke
- * the help.
- */
-int ShowHelp(long /*int*/ hwnd, long /*int*/ pszHelpFile, int uCommand, int dwData, int ptMouse_x, int ptMouse_y, long /*int*/ pDispatchObjectHit) {
+int ShowHelp(long hwnd, long pszHelpFile, int uCommand, int dwData, long pt, long pDispatchObjectHit) {
Browser browser = (Browser)getParent().getParent();
Event event = new Event();
event.type = SWT.Help;
@@ -525,35 +509,35 @@ int ShowHelp(long /*int*/ hwnd, long /*int*/ pszHelpFile, int uCommand, int dwDa
/* IServiceProvider */
-int QueryService(long /*int*/ guidService, long /*int*/ riid, long /*int*/ ppvObject) {
+int QueryService(long guidService, long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIAuthenticate)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iAuthenticate.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iAuthenticate.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
/* IInternetSecurityManager */
-int SetSecuritySite(long /*int*/ pSite) {
+int SetSecuritySite(long pSite) {
return IE.INET_E_DEFAULT_ACTION;
}
-int GetSecuritySite(long /*int*/ ppSite) {
+int GetSecuritySite(long ppSite) {
return IE.INET_E_DEFAULT_ACTION;
}
-int MapUrlToZone(long /*int*/ pwszUrl, long /*int*/ pdwZone, int dwFlags) {
+int MapUrlToZone(long pwszUrl, long pdwZone, int dwFlags) {
/*
* Feature in IE. HTML rendered in memory does not enable local links
* but the same HTML document loaded through a local file is permitted
@@ -567,11 +551,11 @@ int MapUrlToZone(long /*int*/ pwszUrl, long /*int*/ pdwZone, int dwFlags) {
return IE.INET_E_DEFAULT_ACTION;
}
-int GetSecurityId(long /*int*/ pwszUrl, long /*int*/ pbSecurityId, long /*int*/ pcbSecurityId, long /*int*/ dwReserved) {
+int GetSecurityId(long pwszUrl, long pbSecurityId, long pcbSecurityId, long dwReserved) {
return IE.INET_E_DEFAULT_ACTION;
}
-int ProcessUrlAction(long /*int*/ pwszUrl, int dwAction, long /*int*/ pPolicy, int cbPolicy, long /*int*/ pContext, int cbContext, int dwFlags, int dwReserved) {
+int ProcessUrlAction(long pwszUrl, int dwAction, long pPolicy, int cbPolicy, long pContext, int cbContext, int dwFlags, int dwReserved) {
ignoreNextMessage = false;
/*
@@ -579,11 +563,11 @@ int ProcessUrlAction(long /*int*/ pwszUrl, int dwAction, long /*int*/ pPolicy, i
* override default zone elevation settings to allow the action.
*/
if (dwAction == IE.URLACTION_FEATURE_ZONE_ELEVATION) {
- IE ie = (IE)((Browser)getParent().getParent()).webBrowser;
- if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) {
+ IE ie = (IE)((Browser)getParent().getParent()).webBrowser;
+ if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) {
if (cbPolicy >= 4) OS.MoveMemory(pPolicy, new int[] {IE.URLPOLICY_ALLOW}, 4);
return COM.S_OK;
- }
+ }
}
int policy = IE.INET_E_DEFAULT_ACTION;
@@ -655,24 +639,24 @@ boolean canExecuteApplets () {
return canExecuteApplets.booleanValue ();
}
-int QueryCustomPolicy(long /*int*/ pwszUrl, long /*int*/ guidKey, long /*int*/ ppPolicy, long /*int*/ pcbPolicy, long /*int*/ pContext, int cbContext, int dwReserved) {
+int QueryCustomPolicy(long pwszUrl, long guidKey, long ppPolicy, long pcbPolicy, long pContext, int cbContext, int dwReserved) {
return IE.INET_E_DEFAULT_ACTION;
}
-int SetZoneMapping(int dwZone, long /*int*/ lpszPattern, int dwFlags) {
+int SetZoneMapping(int dwZone, long lpszPattern, int dwFlags) {
return IE.INET_E_DEFAULT_ACTION;
}
-int GetZoneMappings(int dwZone, long /*int*/ ppenumString, int dwFlags) {
+int GetZoneMappings(int dwZone, long ppenumString, int dwFlags) {
return COM.E_NOTIMPL;
}
/* IOleCommandTarget */
-int QueryStatus(long /*int*/ pguidCmdGroup, int cCmds, long /*int*/ prgCmds, long /*int*/ pCmdText) {
+int QueryStatus(long pguidCmdGroup, int cCmds, long prgCmds, long pCmdText) {
return COM.E_NOTSUPPORTED;
}
-int Exec(long /*int*/ pguidCmdGroup, int nCmdID, int nCmdExecOpt, long /*int*/ pvaIn, long /*int*/ pvaOut) {
+int Exec(long pguidCmdGroup, int nCmdID, int nCmdExecOpt, long pvaIn, long pvaOut) {
if (pguidCmdGroup != 0) {
GUID guid = new GUID();
COM.MoveMemory(guid, pguidCmdGroup, GUID.sizeof);
@@ -701,74 +685,74 @@ int Exec(long /*int*/ pguidCmdGroup, int nCmdID, int nCmdExecOpt, long /*int*/ p
/* IAuthenticate */
-int Authenticate (long /*int*/ hwnd, long /*int*/ szUsername, long /*int*/ szPassword) {
+int Authenticate (long hwnd, long szUsername, long szPassword) {
IE browser = (IE)((Browser)getParent ().getParent ()).webBrowser;
- for (int i = 0; i < browser.authenticationListeners.length; i++) {
+ for (AuthenticationListener authenticationListener : browser.authenticationListeners) {
AuthenticationEvent event = new AuthenticationEvent (browser.browser);
event.location = browser.lastNavigateURL;
- browser.authenticationListeners[i].authenticate (event);
+ authenticationListener.authenticate (event);
if (!event.doit) return COM.E_ACCESSDENIED;
if (event.user != null && event.password != null) {
TCHAR user = new TCHAR (0, event.user, true);
int size = user.length () * TCHAR.sizeof;
- long /*int*/ userPtr = OS.CoTaskMemAlloc (size);
+ long userPtr = OS.CoTaskMemAlloc (size);
OS.MoveMemory (userPtr, user, size);
TCHAR password = new TCHAR (0, event.password, true);
size = password.length () * TCHAR.sizeof;
- long /*int*/ passwordPtr = OS.CoTaskMemAlloc (size);
+ long passwordPtr = OS.CoTaskMemAlloc (size);
OS.MoveMemory (passwordPtr, password, size);
- C.memmove (hwnd, new long /*int*/[] {0}, C.PTR_SIZEOF);
- C.memmove (szUsername, new long /*int*/[] {userPtr}, C.PTR_SIZEOF);
- C.memmove (szPassword, new long /*int*/[] {passwordPtr}, C.PTR_SIZEOF);
+ C.memmove (hwnd, new long[] {0}, C.PTR_SIZEOF);
+ C.memmove (szUsername, new long[] {userPtr}, C.PTR_SIZEOF);
+ C.memmove (szPassword, new long[] {passwordPtr}, C.PTR_SIZEOF);
return COM.S_OK;
}
}
/* no listener handled the challenge, so defer to the native dialog */
- C.memmove (hwnd, new long /*int*/[] {getShell().handle}, C.PTR_SIZEOF);
+ C.memmove (hwnd, new long[] {getShell().handle}, C.PTR_SIZEOF);
return COM.S_OK;
}
/* IDispatch */
-int GetTypeInfoCount (long /*int*/ pctinfo) {
+int GetTypeInfoCount (long pctinfo) {
C.memmove (pctinfo, new int[] {0}, 4);
return COM.S_OK;
}
-int GetTypeInfo (int iTInfo, int lcid, long /*int*/ ppTInfo) {
+int GetTypeInfo (int iTInfo, int lcid, long ppTInfo) {
return COM.S_OK;
}
-int GetIDsOfNames (int riid, long /*int*/ rgszNames, int cNames, int lcid, long /*int*/ rgDispId) {
- long /*int*/[] ptr = new long /*int*/[1];
- OS.MoveMemory (ptr, rgszNames, C.PTR_SIZEOF);
- int length = OS.wcslen (ptr[0]);
- char[] buffer = new char[length];
- OS.MoveMemory (buffer, ptr[0], length * 2);
- String functionName = String.valueOf (buffer);
- int result = COM.S_OK;
- int[] ids = new int[cNames]; /* DISPIDs */
- if (functionName.equals ("callJava")) { //$NON-NLS-1$
- for (int i = 0; i < cNames; i++) {
- ids[i] = i + 1;
- }
- } else {
- result = COM.DISP_E_UNKNOWNNAME;
- for (int i = 0; i < cNames; i++) {
- ids[i] = COM.DISPID_UNKNOWN;
- }
- }
- OS.MoveMemory (rgDispId, ids, cNames * 4);
+int GetIDsOfNames (int riid, long rgszNames, int cNames, int lcid, long rgDispId) {
+ long[] ptr = new long[1];
+ OS.MoveMemory (ptr, rgszNames, C.PTR_SIZEOF);
+ int length = OS.wcslen (ptr[0]);
+ char[] buffer = new char[length];
+ OS.MoveMemory (buffer, ptr[0], length * 2);
+ String functionName = String.valueOf (buffer);
+ int result = COM.S_OK;
+ int[] ids = new int[cNames]; /* DISPIDs */
+ if (functionName.equals ("callJava")) { //$NON-NLS-1$
+ for (int i = 0; i < cNames; i++) {
+ ids[i] = i + 1;
+ }
+ } else {
+ result = COM.DISP_E_UNKNOWNNAME;
+ for (int i = 0; i < cNames; i++) {
+ ids[i] = COM.DISPID_UNKNOWN;
+ }
+ }
+ OS.MoveMemory (rgDispId, ids, cNames * 4);
return result;
}
-int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*int*/ pDispParams, long /*int*/ pVarResult, long /*int*/ pExcepInfo, long /*int*/ pArgErr) {
+int Invoke (int dispIdMember, long riid, int lcid, int dwFlags, long pDispParams, long pVarResult, long pExcepInfo, long pArgErr) {
IE ie = (IE)((Browser)getParent ().getParent ()).webBrowser;
Map<Integer, BrowserFunction> functions = ie.functions;
if (functions == null) {
if (pVarResult != 0) {
- OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -777,17 +761,17 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
COM.MoveMemory (dispParams, pDispParams, DISPPARAMS.sizeof);
if (dispParams.cArgs != 3) {
if (pVarResult != 0) {
- OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
- long /*int*/ ptr = dispParams.rgvarg + 2 * Variant.sizeof;
+ long ptr = dispParams.rgvarg + 2 * Variant.sizeof;
Variant variant = Variant.win32_new (ptr);
if (variant.getType () != COM.VT_I4) {
variant.dispose ();
if (pVarResult != 0) {
- OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -795,7 +779,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
variant.dispose ();
if (index <= 0) {
if (pVarResult != 0) {
- OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -806,7 +790,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
if (type != COM.VT_BSTR) {
variant.dispose ();
if (pVarResult != 0) {
- OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -963,14 +947,14 @@ Variant convertToJS (Object value) {
Variant arrayType = ihtmlWindow2.getProperty (rgdispid[0]);
ihtmlWindow2.dispose ();
IDispatch arrayTypeDispatch = arrayType.getDispatch ();
- long /*int*/[] result = new long /*int*/[1];
+ long[] result = new long[1];
int rc = arrayTypeDispatch.QueryInterface (COM.IIDIDispatchEx, result);
arrayType.dispose ();
if (rc != COM.S_OK) return new Variant ();
IDispatchEx arrayTypeDispatchEx = new IDispatchEx (result[0]);
result[0] = 0;
- long /*int*/ resultPtr = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+ long resultPtr = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
DISPPARAMS params = new DISPPARAMS ();
rc = arrayTypeDispatchEx.InvokeEx (COM.DISPID_VALUE, COM.LOCALE_USER_DEFAULT, COM.DISPATCH_CONSTRUCT, params, resultPtr, null, 0);
if (rc != COM.S_OK) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java
index 6a5308c4d4..0f3196c0cf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java
@@ -78,7 +78,7 @@ public AnimatedProgress(Composite parent, int style) {
showBorder = (style & SWT.BORDER) != 0;
addControlListener(ControlListener.controlResizedAdapter(e -> redraw()));
- addPaintListener(e -> paint(e));
+ addPaintListener(this::paint);
addDisposeListener(e -> stop());
}
private static int checkStyle (int style) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BusyIndicator.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BusyIndicator.java
index c100fb7500..ee4b668ff6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BusyIndicator.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BusyIndicator.java
@@ -14,6 +14,8 @@
package org.eclipse.swt.custom;
+import java.util.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
@@ -74,7 +76,7 @@ public class BusyIndicator {
shells = display.getShells();
for (Shell shell : shells) {
Integer id = (Integer)shell.getData(BUSYID_NAME);
- if (id == busyId) {
+ if (Objects.equals(id, busyId)) {
setCursorAndId(shell, null, null);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
index 953f4fe284..847bdee279 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -126,8 +126,8 @@ public CBanner(Composite parent, int style) {
}
};
int[] events = new int[] {SWT.Dispose, SWT.MouseDown, SWT.MouseExit, SWT.MouseMove, SWT.MouseUp, SWT.Paint, SWT.Resize};
- for (int i = 0; i < events.length; i++) {
- addListener(events[i], listener);
+ for (int event : events) {
+ addListener(event, listener);
}
}
static int[] bezier(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3, int count) {
@@ -351,11 +351,10 @@ void onPaint(GC gc) {
int red = from.red + 3*(to.red - from.red)/4;
int green = from.green + 3*(to.green - from.green)/4;
int blue = from.blue + 3*(to.blue - from.blue)/4;
- Color color = new Color(getDisplay(), red, green, blue);
+ Color color = new Color(red, green, blue);
gc.setForeground(color);
gc.drawPolyline(line2);
gc.drawPolyline(line3);
- color.dispose();
// draw tail fading to background
int x1 = Math.max(0, curveStart - CURVE_TAIL);
@@ -550,11 +549,11 @@ void updateCurve(int height) {
int h = height - BORDER_STRIPE;
if (simple) {
curve = new int[] {0,h, 1,h, 2,h-1, 3,h-2,
- 3,2, 4,1, 5,0,};
+ 3,2, 4,1, 5,0,};
} else {
curve = bezier(0, h+1, BEZIER_LEFT, h+1,
- curve_width-BEZIER_RIGHT, 0, curve_width, 0,
- curve_width);
+ curve_width-BEZIER_RIGHT, 0, curve_width, 0,
+ curve_width);
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java
index 292f2181a9..2e69b67f87 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java
@@ -107,7 +107,7 @@ int computeTrim(Control c) {
@Override
protected boolean flushCache(Control control) {
Object data = control.getLayoutData();
- if (data != null && data instanceof CLayoutData) ((CLayoutData)data).flushCache();
+ if (data instanceof CLayoutData) ((CLayoutData)data).flushCache();
return true;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
index f21d7cb3ce..77f060a67e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Paul Pazderski - Bug 349112: allow setting alignment on the text field
*******************************************************************************/
package org.eclipse.swt.custom;
@@ -32,8 +33,8 @@ import org.eclipse.swt.widgets.*;
* attempts to set the height of a Combo are ignored. CCombo can be used
* anywhere that having the increased flexibility is more important than
* getting native L&amp;F, but the decision should not be taken lightly.
- * There is no is no strict requirement that CCombo look or behave
- * the same as the native combo box.
+ * There is no strict requirement that CCombo look or behave the same as
+ * the native combo box.
* </p>
* <p>
* Note that although this class is a subclass of <code>Composite</code>,
@@ -41,7 +42,7 @@ import org.eclipse.swt.widgets.*;
* </p>
* <dl>
* <dt><b>Styles:</b>
- * <dd>BORDER, READ_ONLY, FLAT</dd>
+ * <dd>BORDER, READ_ONLY, FLAT, LEAD, LEFT, CENTER, TRAIL, RIGHT</dd>
* <dt><b>Events:</b>
* <dd>DefaultSelection, Modify, Selection, Verify</dd>
* </dl>
@@ -91,20 +92,17 @@ public class CCombo extends Composite {
* @see SWT#BORDER
* @see SWT#READ_ONLY
* @see SWT#FLAT
+ * @see SWT#LEAD
+ * @see SWT#LEFT
+ * @see SWT#CENTER
+ * @see SWT#RIGHT
+ * @see SWT#TRAIL
* @see Widget#getStyle()
*/
public CCombo (Composite parent, int style) {
super (parent, style = checkStyle (style));
_shell = super.getShell ();
- int textStyle = SWT.SINGLE;
- if ((style & SWT.READ_ONLY) != 0) textStyle |= SWT.READ_ONLY;
- if ((style & SWT.FLAT) != 0) textStyle |= SWT.FLAT;
- text = new Text (this, textStyle);
- int arrowStyle = SWT.ARROW | SWT.DOWN;
- if ((style & SWT.FLAT) != 0) arrowStyle |= SWT.FLAT;
- arrow = new Button (this, arrowStyle);
-
listener = event -> {
if (isDisposed ()) return;
if (popup == event.widget) {
@@ -134,6 +132,12 @@ public CCombo (Composite parent, int style) {
});
}
};
+
+ createText(style);
+
+ int arrowStyle = SWT.ARROW | SWT.DOWN;
+ if ((style & SWT.FLAT) != 0) arrowStyle |= SWT.FLAT;
+ arrow = new Button (this, arrowStyle);
filter = event -> {
if (isDisposed ()) return;
if (event.type == SWT.Selection) {
@@ -142,23 +146,22 @@ public CCombo (Composite parent, int style) {
}
return;
}
- Shell shell = ((Control)event.widget).getShell ();
- if (shell == CCombo.this.getShell ()) {
- handleFocus (SWT.FocusOut);
+ if (event.widget instanceof Control) {
+ Shell shell = ((Control)event.widget).getShell ();
+ if (shell == CCombo.this.getShell ()) {
+ handleFocus (SWT.FocusOut);
+ }
}
};
int [] comboEvents = {SWT.Dispose, SWT.FocusIn, SWT.Move, SWT.Resize, SWT.FocusOut};
- for (int i=0; i<comboEvents.length; i++) this.addListener (comboEvents [i], listener);
-
- int [] textEvents = {SWT.DefaultSelection, SWT.DragDetect, SWT.KeyDown, SWT.KeyUp, SWT.MenuDetect, SWT.Modify,
- SWT.MouseDown, SWT.MouseUp, SWT.MouseDoubleClick, SWT.MouseEnter, SWT.MouseExit, SWT.MouseHover,
- SWT.MouseMove, SWT.MouseWheel, SWT.Traverse, SWT.FocusIn, SWT.Verify};
- for (int i=0; i<textEvents.length; i++) text.addListener (textEvents [i], listener);
+ for (int comboEvent : comboEvents)
+ this.addListener (comboEvent, listener);
int [] arrowEvents = {SWT.DragDetect, SWT.MouseDown, SWT.MouseEnter, SWT.MouseExit, SWT.MouseHover,
SWT.MouseMove, SWT.MouseUp, SWT.MouseWheel, SWT.Selection, SWT.FocusIn};
- for (int i=0; i<arrowEvents.length; i++) arrow.addListener (arrowEvents [i], listener);
+ for (int arrowEvent : arrowEvents)
+ arrow.addListener (arrowEvent, listener);
createPopup(null, -1);
if ((style & SWT.SIMPLE) == 0) {
@@ -172,9 +175,58 @@ public CCombo (Composite parent, int style) {
initAccessible();
}
static int checkStyle (int style) {
- int mask = SWT.BORDER | SWT.READ_ONLY | SWT.FLAT | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
+ int mask = SWT.BORDER | SWT.READ_ONLY | SWT.FLAT | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT | SWT.LEAD | SWT.CENTER | SWT.TRAIL;
return SWT.NO_FOCUS | (style & mask);
}
+void createText(int comboStyle) {
+ String textValue = null, tooltip = null;
+ Point selection = null;
+ int limit = 0;
+ boolean enabled = false, focus = false, editable = false;
+ Font font = null;
+ Color fg = null, bg = null;
+ Menu menu = null;
+ if (text != null) {
+ textValue = text.getText();
+ tooltip = text.getToolTipText();
+ selection = text.getSelection();
+ limit = text.getTextLimit();
+ enabled = text.isEnabled();
+ editable = text.getEditable();
+ focus = text.isFocusControl();
+ font = text.getFont();
+ fg = text.getForeground();
+ bg = text.getBackground();
+ menu = text.getMenu();
+ text.dispose();
+ }
+
+ int textStyle = SWT.SINGLE;
+ if ((comboStyle & SWT.READ_ONLY) != 0) textStyle |= SWT.READ_ONLY;
+ if ((comboStyle & SWT.FLAT) != 0) textStyle |= SWT.FLAT;
+ textStyle |= comboStyle & (SWT.LEAD | SWT.CENTER | SWT.TRAIL);
+ text = new Text (this, textStyle);
+ if (textValue != null) {
+ text.setText(textValue);
+ text.setToolTipText(tooltip);
+ if (selection != null) text.setSelection(selection);
+ text.setTextLimit(limit);
+ text.setEnabled(enabled);
+ text.setEditable(editable);
+ if (focus) text.setFocus();
+ if (font != null && !font.isDisposed()) text.setFont(font);
+ if (fg != null && !fg.isDisposed()) text.setForeground(fg);
+ if (bg != null && !bg.isDisposed()) text.setBackground(bg);
+ if (menu != null && !menu.isDisposed()) text.setMenu(menu);
+ internalLayout(true);
+ }
+
+ int [] textEvents = {SWT.DefaultSelection, SWT.DragDetect, SWT.KeyDown, SWT.KeyUp, SWT.MenuDetect, SWT.Modify,
+ SWT.MouseDown, SWT.MouseUp, SWT.MouseDoubleClick, SWT.MouseEnter, SWT.MouseExit, SWT.MouseHover,
+ SWT.MouseMove, SWT.MouseWheel, SWT.Traverse, SWT.FocusIn, SWT.Verify};
+ for (int textEvent : textEvents)
+ text.addListener (textEvent, listener);
+}
/**
* Adds the argument to the end of the receiver's list.
* <p>
@@ -439,12 +491,11 @@ void comboEvent (Event event) {
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
- String[] items = list.getItems ();
GC gc = new GC (text);
int spacer = gc.stringExtent (" ").x; //$NON-NLS-1$
int textWidth = gc.stringExtent (text.getText ()).x;
- for (int i = 0; i < items.length; i++) {
- textWidth = Math.max (gc.stringExtent (items[i]).x, textWidth);
+ for (String item : list.getItems ()) {
+ textWidth = Math.max (gc.stringExtent (item).x, textWidth);
}
gc.dispose ();
Point textSize = text.computeSize (SWT.DEFAULT, SWT.DEFAULT, changed);
@@ -489,9 +540,11 @@ void createPopup(String[] items, int selectionIndex) {
if (background != null) list.setBackground (background);
int [] popupEvents = {SWT.Close, SWT.Paint};
- for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);
+ for (int popupEvent : popupEvents)
+ popup.addListener (popupEvent, listener);
int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
- for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);
+ for (int listEvent : listEvents)
+ list.addListener (listEvent, listener);
if (items != null) list.setItems (items);
if (selectionIndex != -1) list.setSelection (selectionIndex);
@@ -640,7 +693,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
/*
* Return the Label immediately preceding the receiver in the z-order,
@@ -660,6 +713,16 @@ String getAssociatedLabel () {
}
return null;
}
+/**
+ * Returns the horizontal alignment.
+ * The alignment style (LEFT, CENTER or RIGHT) is returned.
+ *
+ * @return SWT.LEFT, SWT.RIGHT or SWT.CENTER
+ * @since 3.113
+ */
+public int getAlignment() {
+ return text.getStyle() & (SWT.LEFT | SWT.CENTER | SWT.RIGHT);
+}
@Override
public Control [] getChildren () {
checkWidget();
@@ -827,6 +890,8 @@ public int getStyle () {
int style = super.getStyle ();
style &= ~SWT.READ_ONLY;
if (!text.getEditable()) style |= SWT.READ_ONLY;
+ style &= ~(SWT.LEFT | SWT.CENTER | SWT.RIGHT);
+ style |= getAlignment();
return style;
}
/**
@@ -1096,9 +1161,9 @@ boolean isDropped () {
@Override
public boolean isFocusControl () {
checkWidget();
- Predicate<Control> checkFocusControl = (control) -> (control != null && !control.isDisposed() && control.isFocusControl ());
+ Predicate<Control> checkFocusControl = control -> (control != null && !control.isDisposed() && control.isFocusControl ());
if (checkFocusControl.test(text) || checkFocusControl.test(arrow) ||
- checkFocusControl.test(list) || checkFocusControl.test(popup)) {
+ checkFocusControl.test(list) || checkFocusControl.test(popup)) {
return true;
}
return super.isFocusControl ();
@@ -1463,6 +1528,25 @@ public void select (int index) {
}
}
}
+
+/**
+ * Set the horizontal alignment of the CCombo.
+ * Use the values LEFT, CENTER and RIGHT to align image and text within the available space.
+ *
+ * @param align the alignment style of LEFT, RIGHT or CENTER
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the value of align is not one of SWT.LEFT, SWT.RIGHT or SWT.CENTER</li>
+ * </ul>
+ * @since 3.113
+ */
+public void setAlignment(int align) {
+ checkWidget();
+ int styleWithoutAlign = getStyle() & ~(SWT.LEFT | SWT.CENTER | SWT.RIGHT);
+ createText(styleWithoutAlign | align);
+}
@Override
public void setBackground (Color color) {
super.setBackground(color);
@@ -1732,7 +1816,7 @@ String stripMnemonic (String string) {
}
index++;
} while (index < length);
- return string;
+ return string;
}
void textEvent (Event event) {
switch (event.type) {
@@ -1939,15 +2023,15 @@ void textEvent (Event event) {
}
@Override
public boolean traverse(int event){
- /*
- * When the traverse event is sent to the CCombo, it will create a list of
- * controls to tab to next. Since the CCombo is a composite, the next control is
- * the Text field which is a child of the CCombo. It will set focus to the text
- * field which really is itself. So, call the traverse next events directly on the text.
- */
- if (event == SWT.TRAVERSE_ARROW_NEXT || event == SWT.TRAVERSE_TAB_NEXT) {
- return text.traverse(event);
- }
- return super.traverse(event);
+ /*
+ * When the traverse event is sent to the CCombo, it will create a list of
+ * controls to tab to next. Since the CCombo is a composite, the next control is
+ * the Text field which is a child of the CCombo. It will set focus to the text
+ * field which really is itself. So, call the traverse next events directly on the text.
+ */
+ if (event == SWT.TRAVERSE_ARROW_NEXT || event == SWT.TRAVERSE_TAB_NEXT) {
+ return text.traverse(event);
+ }
+ return super.traverse(event);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
index 6e441eccb9..0dbe029f63 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
@@ -118,7 +118,7 @@ public CLabel(Composite parent, int style) {
if ((style & SWT.RIGHT) != 0) align = SWT.RIGHT;
if ((style & SWT.LEFT) != 0) align = SWT.LEFT;
- addPaintListener(event -> onPaint(event));
+ addPaintListener(this::onPaint);
addTraverseListener(event -> {
if (event.detail == SWT.TRAVERSE_MNEMONIC) {
@@ -126,7 +126,7 @@ public CLabel(Composite parent, int style) {
}
});
- addListener(SWT.Dispose, event -> onDispose(event));
+ addListener(SWT.Dispose, this::onDispose);
initAccessible();
@@ -184,7 +184,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
/**
* Returns the horizontal alignment.
@@ -443,15 +443,15 @@ void onPaint(PaintEvent event) {
// shorten the text
if (shortenText) {
extent.x = 0;
- for(int i = 0; i < lines.length; i++) {
- Point e = gc.textExtent(lines[i], DRAW_FLAGS);
- if (e.x > availableWidth) {
- lines[i] = shortenText(gc, lines[i], availableWidth);
- extent.x = Math.max(extent.x, getTotalSize(null, lines[i]).x);
- } else {
- extent.x = Math.max(extent.x, e.x);
- }
- }
+ for(int i = 0; i < lines.length; i++) {
+ Point e = gc.textExtent(lines[i], DRAW_FLAGS);
+ if (e.x > availableWidth) {
+ lines[i] = shortenText(gc, lines[i], availableWidth);
+ extent.x = Math.max(extent.x, getTotalSize(null, lines[i]).x);
+ } else {
+ extent.x = Math.max(extent.x, e.x);
+ }
+ }
if (appToolTipText == null) {
super.setToolTipText(text);
}
@@ -550,32 +550,32 @@ void onPaint(PaintEvent event) {
int lineHeight = 0, textHeight = 0, imageHeight = 0;
if (img != null) {
- imageRect = img.getBounds();
- imageHeight = imageRect.height;
+ imageRect = img.getBounds();
+ imageHeight = imageRect.height;
}
if (lines != null) {
- lineHeight = gc.getFontMetrics().getHeight();
- textHeight = lines.length * lineHeight;
+ lineHeight = gc.getFontMetrics().getHeight();
+ textHeight = lines.length * lineHeight;
}
int imageY = 0, midPoint = 0, lineY = 0;
if (imageHeight > textHeight ) {
- if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) imageY = rect.y + (rect.height - imageHeight) / 2;
- else imageY = topMargin;
- midPoint = imageY + imageHeight/2;
- lineY = midPoint - textHeight / 2;
+ if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) imageY = rect.y + (rect.height - imageHeight) / 2;
+ else imageY = topMargin;
+ midPoint = imageY + imageHeight/2;
+ lineY = midPoint - textHeight / 2;
}
else {
- if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) lineY = rect.y + (rect.height - textHeight) / 2;
- else lineY = topMargin;
- midPoint = lineY + textHeight/2;
- imageY = midPoint - imageHeight / 2;
+ if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) lineY = rect.y + (rect.height - textHeight) / 2;
+ else lineY = topMargin;
+ midPoint = lineY + textHeight/2;
+ imageY = midPoint - imageHeight / 2;
}
// draw the image
if (img != null) {
gc.drawImage(img, 0, 0, imageRect.width, imageHeight,
- x, imageY, imageRect.width, imageHeight);
+ x, imageY, imageRect.width, imageHeight);
x += imageRect.width + GAP;
extent.x -= imageRect.width + GAP;
}
@@ -583,19 +583,19 @@ void onPaint(PaintEvent event) {
// draw the text
if (lines != null) {
gc.setForeground(getForeground());
- for (int i = 0; i < lines.length; i++) {
+ for (String line : lines) {
int lineX = x;
if (lines.length > 1) {
if (align == SWT.CENTER) {
- int lineWidth = gc.textExtent(lines[i], DRAW_FLAGS).x;
+ int lineWidth = gc.textExtent(line, DRAW_FLAGS).x;
lineX = x + Math.max(0, (extent.x - lineWidth) / 2);
}
if (align == SWT.RIGHT) {
- int lineWidth = gc.textExtent(lines[i], DRAW_FLAGS).x;
+ int lineWidth = gc.textExtent(line, DRAW_FLAGS).x;
lineX = Math.max(x, rect.x + rect.width - rightMargin - lineWidth);
}
}
- gc.drawText(lines[i], lineX, lineY, DRAW_FLAGS);
+ gc.drawText(line, lineX, lineY, DRAW_FLAGS);
lineY += lineHeight;
}
}
@@ -820,10 +820,10 @@ public void setBackground(Image image) {
* @since 3.6
*/
public void setBottomMargin(int bottomMargin) {
- checkWidget();
- if (this.bottomMargin == bottomMargin || bottomMargin < 0) return;
- this.bottomMargin = bottomMargin;
- redraw();
+ checkWidget();
+ if (this.bottomMargin == bottomMargin || bottomMargin < 0) return;
+ this.bottomMargin = bottomMargin;
+ redraw();
}
@Override
public void setFont(Font font) {
@@ -861,10 +861,10 @@ public void setImage(Image image) {
* @since 3.6
*/
public void setLeftMargin(int leftMargin) {
- checkWidget();
- if (this.leftMargin == leftMargin || leftMargin < 0) return;
- this.leftMargin = leftMargin;
- redraw();
+ checkWidget();
+ if (this.leftMargin == leftMargin || leftMargin < 0) return;
+ this.leftMargin = leftMargin;
+ redraw();
}
/**
* Set the label's margins, in points.
@@ -901,10 +901,10 @@ public void setMargins (int leftMargin, int topMargin, int rightMargin, int bott
* @since 3.6
*/
public void setRightMargin(int rightMargin) {
- checkWidget();
- if (this.rightMargin == rightMargin || rightMargin < 0) return;
- this.rightMargin = rightMargin;
- redraw();
+ checkWidget();
+ if (this.rightMargin == rightMargin || rightMargin < 0) return;
+ this.rightMargin = rightMargin;
+ redraw();
}
/**
* Set the label's text.
@@ -956,10 +956,10 @@ public void setToolTipText (String string) {
* @since 3.6
*/
public void setTopMargin(int topMargin) {
- checkWidget();
- if (this.topMargin == topMargin || topMargin < 0) return;
- this.topMargin = topMargin;
- redraw();
+ checkWidget();
+ if (this.topMargin == topMargin || topMargin < 0) return;
+ this.topMargin = topMargin;
+ redraw();
}
/**
* Shorten the given text <code>t</code> so that its length doesn't exceed
@@ -1001,7 +1001,7 @@ protected String shortenText(GC gc, String t, int width) {
}
String result = mid == 0 ? t : t.substring(0, mid) + ELLIPSIS + t.substring(validateOffset(layout, l-mid), l);
layout.dispose();
- return result;
+ return result;
}
int validateOffset(TextLayout layout, int offset) {
int nextOffset = layout.getNextOffset(offset, SWT.MOVEMENT_CLUSTER);
@@ -1009,21 +1009,21 @@ int validateOffset(TextLayout layout, int offset) {
return offset;
}
private String[] splitString(String text) {
- String[] lines = new String[1];
- int start = 0, pos;
- do {
- pos = text.indexOf('\n', start);
- if (pos == -1) {
- lines[lines.length - 1] = text.substring(start);
- } else {
- boolean crlf = (pos > 0) && (text.charAt(pos - 1) == '\r');
- lines[lines.length - 1] = text.substring(start, pos - (crlf ? 1 : 0));
- start = pos + 1;
- String[] newLines = new String[lines.length+1];
- System.arraycopy(lines, 0, newLines, 0, lines.length);
- lines = newLines;
- }
- } while (pos != -1);
- return lines;
+ String[] lines = new String[1];
+ int start = 0, pos;
+ do {
+ pos = text.indexOf('\n', start);
+ if (pos == -1) {
+ lines[lines.length - 1] = text.substring(start);
+ } else {
+ boolean crlf = (pos > 0) && (text.charAt(pos - 1) == '\r');
+ lines[lines.length - 1] = text.substring(start, pos - (crlf ? 1 : 0));
+ start = pos + 1;
+ String[] newLines = new String[lines.length+1];
+ System.arraycopy(lines, 0, newLines, 0, lines.length);
+ lines = newLines;
+ }
+ } while (pos != -1);
+ return lines;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index ac44a29a6b..022b5f72eb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -62,16 +62,16 @@ public class CTabFolder extends Composite {
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
* that will be placed along the top and bottom edges of the form.
*
* The default value is 0.
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
- /**
+ /**
* A multiple of the tab height that specifies the minimum width to which a tab
* will be compressed before scrolling arrows are used to navigate the tabs.
*
@@ -136,12 +136,12 @@ public class CTabFolder extends Composite {
* <p>
* If there is not enough place for all tabs, tabs starting from the end of
* the {@link #priority} array will be hidden first (independently from the
- * {@link #mru} flag!) => the right most elements have the highest priority
+ * {@link #mru} flag!) =&gt; the right most elements have the highest priority
* to be hidden.
* <p>
* If there is more place to show previously hidden tabs, tabs starting from
* the beginning of the {@link #priority} array will be made visible first
- * (independently from the {@link #mru} flag!) => the left most elements
+ * (independently from the {@link #mru} flag!) =&gt; the left most elements
* have the highest priority to be shown.
* <p>
* The update strategy of the {@link #priority} array however depends on the
@@ -230,6 +230,7 @@ public class CTabFolder extends Composite {
Control[] controls;
int[] controlAlignments;
Rectangle[] controlRects;
+ Rectangle[] bkImageBounds;
Image[] controlBkImages;
int updateFlags;
@@ -362,8 +363,8 @@ void init(int style) {
SWT.Activate,
SWT.Deactivate
};
- for (int i = 0; i < folderEvents.length; i++) {
- addListener(folderEvents[i], listener);
+ for (int folderEvent : folderEvents) {
+ addListener(folderEvent, listener);
}
initAccessible();
@@ -528,6 +529,7 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
int x = borderLeft + SPACING;
int rightWidth = 0;
int allWidth = 0;
+ boolean spacingRight = false;
for (int i = 0; i < controls.length; i++) {
Point ctrlSize = tabControlSize[i] = !controls[i].isDisposed() && controls[i].getVisible() ? controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT) : new Point(0,0);
int alignment = controlAlignments[i];
@@ -539,6 +541,9 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
x += ctrlSize.x;
leftWidth += ctrlSize.x;
} else {
+ if ((alignment & SWT.WRAP) == 0 && ctrlSize.x > 0) {
+ spacingRight = true;
+ }
if ((alignment & (SWT.FILL | SWT.WRAP)) == 0) {
rightWidth += ctrlSize.x;
}
@@ -548,13 +553,13 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
if (leftWidth > 0) leftWidth += SPACING * 2;
int itemWidth = 0;
- for (int i = 0; i < items.length; i++) {
- if (items[i].showing) itemWidth += items[i].width;
+ for (CTabItem item : items) {
+ if (item.showing) itemWidth += item.width;
}
int maxWidth = size.x - borderLeft - leftWidth - borderRight;
int availableWidth = Math.max(0, maxWidth - itemWidth - rightWidth);
- if (rightWidth > 0) availableWidth -= SPACING * 2;
+ if (spacingRight) availableWidth -= SPACING * 2;
x = size.x - borderRight - SPACING;
if (itemWidth + allWidth <= maxWidth) {
//Everything fits
@@ -611,7 +616,7 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
for (int i = 0; i < controls.length; i++) {
int alignment = controlAlignments[i];
if ((alignment & SWT.TRAIL) != 0 && (alignment & SWT.FILL) != 0 && !overflow[i]) {
- fillCount++;
+ fillCount++;
}
}
if (fillCount != 0) {
@@ -749,11 +754,11 @@ void createItem (CTabItem item, int index) {
if (selectedIndex >= index) selectedIndex ++;
int[] newPriority = new int[priority.length + 1];
int next = 0, priorityIndex = priority.length;
- for (int i = 0; i < priority.length; i++) {
- if (!mru && priority[i] == index) {
+ for (int element : priority) {
+ if (!mru && element == index) {
priorityIndex = next++;
}
- newPriority[next++] = priority[i] >= index ? priority[i] + 1 : priority[i];
+ newPriority[next++] = element >= index ? element + 1 : element;
}
newPriority[priorityIndex] = index;
priority = newPriority;
@@ -780,9 +785,8 @@ void destroyItem (CTabItem item) {
control.setVisible(false);
}
setToolTipText(null);
- GC gc = new GC(this);
- setButtonBounds(gc);
- gc.dispose();
+ updateButtons();
+ setButtonBounds();
redraw();
return;
}
@@ -794,9 +798,9 @@ void destroyItem (CTabItem item) {
int[] newPriority = new int[priority.length - 1];
int next = 0;
- for (int i = 0; i < priority.length; i++) {
- if (priority [i] == index) continue;
- newPriority[next++] = priority[i] > index ? priority[i] - 1 : priority [i];
+ for (int element : priority) {
+ if (element == index) continue;
+ newPriority[next++] = element > index ? element - 1 : element;
}
priority = newPriority;
@@ -927,8 +931,8 @@ public CTabItem getItem (Point pt) {
Point size = getSize();
Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
if (size.x <= trim.width) return null;
- for (int i = 0; i < priority.length; i++) {
- CTabItem item = items[priority[i]];
+ for (int element : priority) {
+ CTabItem item = items[element];
Rectangle rect = item.getBounds();
if (rect.contains(pt)) return item;
}
@@ -996,7 +1000,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
String stripMnemonic (String string) {
int index = 0;
@@ -1009,7 +1013,7 @@ String stripMnemonic (String string) {
}
index++;
} while (index < length);
- return string;
+ return string;
}
/**
* Returns <code>true</code> if the receiver is minimized.
@@ -1460,7 +1464,9 @@ void initAccessible() {
pt = getParent().toDisplay(location.x, location.y);
} else {
if (childID >= 0 && childID < items.length && items[childID].showing) {
- location = items[childID].getBounds();
+ if (!items[childID].isDisposed()) {
+ location = items[childID].getBounds();
+ }
}
if (location != null) {
pt = toDisplay(location.x, location.y);
@@ -1632,8 +1638,8 @@ void onKeyDown (Event event) {
e.width = chevronRect.width;
e.height = chevronRect.height;
e.doit = true;
- for (int i = 0; i < folderListeners.length; i++) {
- folderListeners[i].showList(e);
+ for (CTabFolder2Listener folderListener : folderListeners) {
+ folderListener.showList(e);
}
if (e.doit && !isDisposed()) {
showList(chevronRect);
@@ -1716,8 +1722,8 @@ void onDispose(Event event) {
}
void onDragDetect(Event event) {
boolean consume = false;
- for (int i = 0; i < items.length; i++) {
- if (items[i].closeRect.contains(event.x, event.y)) {
+ for (CTabItem item : items) {
+ if (item.closeRect.contains(event.x, event.y)) {
consume = true;
break;
}
@@ -1742,8 +1748,8 @@ boolean onMnemonic (Event event, boolean doit) {
if (mnemonic != '\0') {
if (Character.toLowerCase (key) == mnemonic) {
if (doit) {
- setSelection(i, true);
- forceFocus();
+ setSelection(i, true);
+ forceFocus();
}
return true;
}
@@ -1822,10 +1828,10 @@ void onMouse(Event event) {
Control c = display.getCursorControl();
boolean reschedule = false;
if (c != null) {
- for (int i = 0; i < controls.length; i++) {
+ for (Control control : controls) {
Control temp = c;
do {
- if (temp.equals(controls[i])) {
+ if (temp.equals(control)) {
reschedule = true;
} else {
temp = temp.getParent();
@@ -1856,10 +1862,10 @@ void onMouse(Event event) {
}
}
} else {
- for (int i=0; i<items.length; i++) {
- Rectangle bounds = items[i].getBounds();
+ for (CTabItem tabItem : items) {
+ Rectangle bounds = tabItem.getBounds();
if (bounds.contains(x, y)){
- item = items[i];
+ item = tabItem;
}
}
}
@@ -1872,12 +1878,12 @@ void onMouse(Event event) {
}
int index = indexOf(item);
if (item.showing){
- int oldSelectedIndex = selectedIndex;
- setSelection(index, true);
- if (oldSelectedIndex == selectedIndex) {
- /* If the click is on the selected tabitem, then set focus to the tabfolder */
- forceFocus();
- }
+ int oldSelectedIndex = selectedIndex;
+ setSelection(index, true);
+ if (oldSelectedIndex == selectedIndex) {
+ /* If the click is on the selected tabitem, then set focus to the tabfolder */
+ forceFocus();
+ }
}
return;
}
@@ -1933,10 +1939,10 @@ void onMouse(Event event) {
}
}
} else {
- for (int i=0; i<items.length; i++) {
- Rectangle bounds = items[i].getBounds();
+ for (CTabItem tabItem : items) {
+ Rectangle bounds = tabItem.getBounds();
if (bounds.contains(x, y)){
- item = items[i];
+ item = tabItem;
}
}
}
@@ -1951,12 +1957,10 @@ void onMouse(Event event) {
e.time = event.time;
e.item = item;
e.doit = true;
- for (int j = 0; j < folderListeners.length; j++) {
- CTabFolder2Listener listener = folderListeners[j];
+ for (CTabFolder2Listener listener : folderListeners) {
listener.close(e);
}
- for (int j = 0; j < tabListeners.length; j++) {
- CTabFolderListener listener = tabListeners[j];
+ for (CTabFolderListener listener : tabListeners) {
listener.itemClosed(e);
}
if (e.doit) item.dispose();
@@ -2019,8 +2023,8 @@ void onPageTraversal(Event event) {
e.width = chevronRect.width;
e.height = chevronRect.height;
e.doit = true;
- for (int i = 0; i < folderListeners.length; i++) {
- folderListeners[i].showList(e);
+ for (CTabFolder2Listener folderListener : folderListeners) {
+ folderListener.showList(e);
}
if (e.doit && !isDisposed()) {
showList(chevronRect);
@@ -2149,22 +2153,22 @@ void onSelection(Event event) {
CTabFolderEvent e = new CTabFolderEvent(this);
e.widget = CTabFolder.this;
e.time = event.time;
- for (int i = 0; i < folderListeners.length; i++) {
+ for (CTabFolder2Listener folderListener : folderListeners) {
if (maximized) {
- folderListeners[i].restore(e);
+ folderListener.restore(e);
} else {
- folderListeners[i].maximize(e);
+ folderListener.maximize(e);
}
}
} else if (event.widget == minItem) {
CTabFolderEvent e = new CTabFolderEvent(this);
e.widget = CTabFolder.this;
e.time = event.time;
- for (int i = 0; i < folderListeners.length; i++) {
+ for (CTabFolder2Listener folderListener : folderListeners) {
if (minimized) {
- folderListeners[i].restore(e);
+ folderListener.restore(e);
} else {
- folderListeners[i].minimize(e);
+ folderListener.minimize(e);
}
}
} else if (event.widget == chevronItem) {
@@ -2178,8 +2182,8 @@ void onSelection(Event event) {
e.width = chevronRect.width;
e.height = chevronRect.height;
e.doit = true;
- for (int i = 0; i < folderListeners.length; i++) {
- folderListeners[i].showList(e);
+ for (CTabFolder2Listener folderListener : folderListeners) {
+ folderListener.showList(e);
}
if (e.doit && !isDisposed()) {
showList(chevronRect);
@@ -2339,8 +2343,8 @@ public void removeSelectionListener(SelectionListener listener) {
@Override
public void reskin(int flags) {
super.reskin(flags);
- for (int i = 0; i < items.length; i++) {
- items[i].reskin(flags);
+ for (CTabItem item : items) {
+ item.reskin(flags);
}
}
@@ -2348,7 +2352,7 @@ public void reskin(int flags) {
public void setBackground (Color color) {
super.setBackground(color);
renderer.createAntialiasColors(); //TODO: need better caching strategy
- updateBkImages();
+ updateBkImages(true);
redraw();
}
/**
@@ -2436,18 +2440,18 @@ public void setBackground(Color[] colors, int[] percents, boolean vertical) {
(gradientColors.length == colors.length)) {
boolean same = false;
for (int i = 0; i < gradientColors.length; i++) {
- if (gradientColors[i] == null) {
+ if (gradientColors[i] == null) {
same = colors[i] == null;
- } else {
+ } else {
same = gradientColors[i].equals(colors[i]);
- }
- if (!same) break;
+ }
+ if (!same) break;
}
if (same) {
- for (int i = 0; i < gradientPercents.length; i++) {
+ for (int i = 0; i < gradientPercents.length; i++) {
same = gradientPercents[i] == percents[i];
if (!same) break;
- }
+ }
}
if (same && this.gradientVertical == vertical) return;
}
@@ -2475,9 +2479,9 @@ public void setBackground(Color[] colors, int[] percents, boolean vertical) {
}
@Override
public void setBackgroundImage(Image image) {
- super.setBackgroundImage(image);
- renderer.createAntialiasColors(); //TODO: need better caching strategy
- redraw();
+ super.setBackgroundImage(image);
+ renderer.createAntialiasColors(); //TODO: need better caching strategy
+ redraw();
}
/**
* Toggle the visibility of the border
@@ -2495,8 +2499,11 @@ public void setBorderVisible(boolean show) {
this.borderVisible = show;
updateFolder(REDRAW);
}
-void setButtonBounds(GC gc) {
- Point size = getSize();
+
+/**
+ * Create or dispose min/max buttons.
+ */
+void updateButtons() {
// max button
Display display = getDisplay();
if (showMax) {
@@ -2549,26 +2556,17 @@ void setButtonBounds(GC gc) {
minMaxTb.dispose();
minMaxTb = null;
}
+}
+
+/**
+ * Update button bounds for min/max and update chevron button.
+ */
+void setButtonBounds() {
if (showChevron) {
- int itemCount = items.length;
- int count;
- if (single) {
- count = selectedIndex == -1 ? itemCount : itemCount - 1;
- } else {
- int showCount = 0;
- while (showCount < priority.length && items[priority[showCount]].showing) {
- showCount++;
- }
- count = itemCount - showCount;
- }
- if (count != chevronCount) {
- chevronCount = count;
- if (chevronImage != null) chevronImage.dispose();
- chevronImage = createButtonImage(display, CTabFolderRenderer.PART_CHEVRON_BUTTON);
- chevronItem.setImage(chevronImage);
- }
- }
+ updateChevronImage(false);
+ }
+ Point size = getSize();
boolean[][] overflow = new boolean[1][0];
Rectangle[] rects = computeControlBounds(size, overflow);
if (fixedTabHeight != SWT.DEFAULT) {
@@ -2610,11 +2608,59 @@ void setButtonBounds(GC gc) {
controls[i].setBounds(rects[i].x, rects[i].y, rects[i].width, headerHeight);
}
}
- if (!changed && !rects[i].equals(controlRects[i])) changed = true;
+ if (!changed && !rects[i].equals(controlRects[i])) {
+ changed = true; // also updateBkImages after translation
+ }
}
ignoreResize = false;
controlRects = rects;
- if (changed || hovering) updateBkImages();
+ if (changed || hovering) {
+ updateBkImages(false);
+ }
+}
+
+/**
+ * Get the number of hidden items or the number which is to be drawn in the
+ * chevon item.
+ * <p>
+ * Note: do not confuse this with {@link #chevronCount} which contains the count
+ * from the last time the cached chevron image was drawn. It can be different
+ * from the value returned by this method.
+ * </p>
+ *
+ * @return the chevron count
+ */
+int getChevronCount() {
+ int itemCount = items.length;
+ int count;
+ if (single) {
+ count = selectedIndex == -1 ? itemCount : itemCount - 1;
+ } else {
+ int showCount = 0;
+ while (showCount < priority.length && items[priority[showCount]].showing) {
+ showCount++;
+ }
+ count = itemCount - showCount;
+ }
+ return count;
+}
+
+/**
+ * Update the cached chevron image.
+ *
+ * @param styleChange <code>true</code> if the update is required for changed
+ * appearance of the chevron. In this case the image is not
+ * created if it does not already exist and is updated even
+ * if the drawn number (chevonCount) has not changed.
+ */
+private void updateChevronImage(boolean styleChange) {
+ if (styleChange && chevronImage == null) return;
+ int newCount = getChevronCount();
+ if (!styleChange && chevronCount == newCount) return;
+ if (chevronImage != null) chevronImage.dispose();
+ chevronImage = createButtonImage(getDisplay(), CTabFolderRenderer.PART_CHEVRON_BUTTON);
+ chevronItem.setImage(chevronImage);
+ chevronCount = newCount;
}
@Override
public boolean setFocus () {
@@ -2652,11 +2698,20 @@ public void setFont(Font font) {
if (font != null && font.equals(getFont())) return;
super.setFont(font);
oldFont = getFont();
+ // Chevron painting is cached as image and only recreated if number of hidden tabs changed.
+ // To apply the new font the cached image must be recreated with new font.
+ // Redraw request alone would only redraw the cached image with old font.
+ renderer.resetChevronFont(); // renderer will pickup and adjust(!) the new font automatically
+ updateChevronImage(true);
updateFolder(REDRAW);
}
@Override
public void setForeground (Color color) {
super.setForeground(color);
+ // Chevron painting is cached as image and only recreated if number of hidden tabs changed.
+ // To apply the new foreground color the image must be recreated with new foreground color.
+ // redraw() alone would only redraw the cached image with old color.
+ updateChevronImage(true);
redraw();
}
/**
@@ -2838,8 +2893,8 @@ boolean setItemSize(GC gc) {
// First, try the minimum tab size at full compression.
int minWidth = 0;
int[] minWidths = new int[items.length];
- for (int i = 0; i < priority.length; i++) {
- int index = priority[i];
+ for (int element : priority) {
+ int index = element;
int state = CTabFolderRenderer.MINIMUM_SIZE;
if (index == selectedIndex) state |= SWT.SELECTED;
minWidths[index] = renderer.computeSize(index, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
@@ -3662,14 +3717,12 @@ void showList (Rectangle rect) {
if (showMenu == null || showMenu.isDisposed()) {
showMenu = new Menu(getShell(), getStyle() & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT));
} else {
- MenuItem[] items = showMenu.getItems();
- for (int i = 0; i < items.length; i++) {
- items[i].dispose();
+ for (MenuItem item : showMenu.getItems()) {
+ item.dispose();
}
}
final String id = "CTabFolder_showList_Index"; //$NON-NLS-1$
- for (int i = 0; i < items.length; i++) {
- CTabItem tab = items[i];
+ for (CTabItem tab : items) {
if (tab.showing) continue;
MenuItem item = new MenuItem(showMenu, SWT.NONE);
// Bug 533124 In the case where you have multi line tab text, we force the drop-down menu to have single line entries to ensure consistent behavior across platforms.
@@ -3789,9 +3842,17 @@ boolean updateItems (int showIndex) {
boolean oldShowChevron = showChevron;
boolean changed = setItemSize(gc);
+ updateButtons();
+ boolean chevronChanged = showChevron != oldShowChevron;
+ if (chevronChanged) {
+ if (updateTabHeight(false)) {
+ // Tab height has changed. Item sizes have to be set again.
+ changed |= setItemSize(gc);
+ }
+ }
changed |= setItemLocation(gc);
- setButtonBounds(gc);
- changed |= showChevron != oldShowChevron;
+ setButtonBounds();
+ changed |= chevronChanged;
if (changed && getToolTipText() != null) {
Point pt = getDisplay().getCursorLocation();
pt = toControl(pt);
@@ -3835,6 +3896,7 @@ void runUpdate() {
int flags = updateFlags;
updateFlags = 0;
Rectangle rectBefore = getClientArea();
+ updateButtons();
updateTabHeight(false);
updateItems(selectedIndex);
if ((flags & REDRAW) != 0) {
@@ -3849,8 +3911,14 @@ void runUpdate() {
}
}
-void updateBkImages() {
+void updateBkImages(boolean colorChanged) {
if (controls != null && controls.length > 0) {
+ if (bkImageBounds==null) {
+ bkImageBounds=new Rectangle[controls.length];
+ }
+ if (bkImageBounds.length !=controls.length) {
+ bkImageBounds=new Rectangle[controls.length];
+ }
for (int i = 0; i < controls.length; i++) {
Control control = controls[i];
if (!control.isDisposed()) {
@@ -3865,6 +3933,7 @@ void updateBkImages() {
int height = this.getSize().y;
boolean wrapped = onBottom ? bounds.y + bounds.height < height - tabHeight : bounds.y > tabHeight;
if (wrapped || gradientColors == null) {
+ bkImageBounds[i]=null;
control.setBackgroundImage(null);
control.setBackground(getBackground());
} else {
@@ -3877,13 +3946,17 @@ void updateBkImages() {
bounds.y = -1;
}
bounds.x = 0;
- if (controlBkImages[i] != null) controlBkImages[i].dispose();
- controlBkImages[i] = new Image(control.getDisplay(), bounds);
- GC gc = new GC(controlBkImages[i]);
- renderer.draw(CTabFolderRenderer.PART_BACKGROUND, 0, bounds, gc);
- gc.dispose();
- control.setBackground(null);
- control.setBackgroundImage(controlBkImages[i]);
+ // do not redraw when only translated:
+ if (colorChanged || !bounds.equals(bkImageBounds[i])) {
+ bkImageBounds[i] = bounds;
+ if (controlBkImages[i] != null) controlBkImages[i].dispose();
+ controlBkImages[i] = new Image(control.getDisplay(), bounds);
+ GC gc = new GC(controlBkImages[i]);
+ renderer.draw(CTabFolderRenderer.PART_BACKGROUND, 0, bounds, gc);
+ gc.dispose();
+ control.setBackground(null);
+ control.setBackgroundImage(controlBkImages[i]);
+ }
}
}
}
@@ -3947,8 +4020,8 @@ void addTabControl(Control control, int flags, int index, boolean update) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
//check for duplicates
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] == control) {
+ for (Control ctrl : controls) {
+ if (ctrl == control) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
index f8a0ef3b7b..8bc5afa16e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
@@ -26,24 +26,24 @@ public class CTabFolderEvent extends TypedEvent {
/**
* The tab item for the operation.
*/
- public Widget item;
+ public Widget item;
- /**
+ /**
* A flag indicating whether the operation should be allowed.
* Setting this field to <code>false</code> will cancel the operation.
* Applies to the close and showList events.
*/
- public boolean doit;
+ public boolean doit;
/**
* The widget-relative, x coordinate of the chevron button
* at the time of the event. Applies to the showList event.
*
- * @since 3.0
+ * @since 3.0
*/
- public int x;
- /**
- * The widget-relative, y coordinate of the chevron button
+ public int x;
+ /**
+ * The widget-relative, y coordinate of the chevron button
* at the time of the event. Applies to the showList event.
*
* @since 3.0
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
index 5b653a4936..465b18c56e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
@@ -86,8 +86,8 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
int controlW = 0;
int controlH = 0;
// preferred size of controls in tab items
- for (int i = 0; i < items.length; i++) {
- Control control = items[i].control;
+ for (CTabItem item : items) {
+ Control control = item.control;
if (control != null && !control.isDisposed()){
Point size = control.computeSize (wHint, hHint, flushCache);
controlW = Math.max (controlW, size.x);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
index 6be28cddda..c989b0783e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -51,14 +51,13 @@ public class CTabFolderRenderer {
Color selectedOuterColor = null;
Color selectedInnerColor = null;
Color tabAreaColor = null;
- Color minMaxBorderColor = null;
/*
* Border color that was used in computing the cached anti-alias Colors.
* We have to recompute the colors if the border color changes
*/
Color lastBorderColor = null;
- Font chevronFont = null;
+ private Font chevronFont = null;
//TOP_LEFT_CORNER_HILITE is laid out in reverse (ie. top to bottom)
//so can fade in same direction as right swoop curve
@@ -85,7 +84,7 @@ public class CTabFolderRenderer {
static final int[] SIMPLE_BOTTOM_LEFT_CORNER_BORDERLESS = new int[] {0,-3, 1,-2, 2,-1, 3,0};
static final int[] SIMPLE_BOTTOM_RIGHT_CORNER_BORDERLESS = new int[] {-4,0, -3,-1, -2,-2, -1,-3};
- static final RGB CLOSE_FILL = new RGB(252, 160, 160);
+ static final RGB CLOSE_FILL = new RGB(240, 64, 64);
static final int BUTTON_SIZE = 16;
static final int BUTTON_TRIM = 1;
@@ -459,45 +458,45 @@ public class CTabFolderRenderer {
}
void createAntialiasColors() {
- disposeAntialiasColors();
- lastBorderColor = parent.getDisplay().getSystemColor(BORDER1_COLOR);
- RGB lineRGB = lastBorderColor.getRGB();
- /* compute the selected color */
- RGB innerRGB = parent.selectionBackground.getRGB();
- if (parent.selectionBgImage != null ||
- (parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1)) {
- innerRGB = null;
- }
- RGB outerRGB = parent.getBackground().getRGB();
- if (parent.gradientColors != null && parent.gradientColors.length > 1) {
- outerRGB = null;
- }
- if (outerRGB != null) {
+ disposeAntialiasColors();
+ lastBorderColor = parent.getDisplay().getSystemColor(BORDER1_COLOR);
+ RGB lineRGB = lastBorderColor.getRGB();
+ /* compute the selected color */
+ RGB innerRGB = parent.selectionBackground.getRGB();
+ if (parent.selectionBgImage != null ||
+ (parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1)) {
+ innerRGB = null;
+ }
+ RGB outerRGB = parent.getBackground().getRGB();
+ if (parent.gradientColors != null && parent.gradientColors.length > 1) {
+ outerRGB = null;
+ }
+ if (outerRGB != null) {
RGB from = lineRGB;
RGB to = outerRGB;
int red = from.red + 2*(to.red - from.red)/3;
int green = from.green + 2*(to.green - from.green)/3;
int blue = from.blue + 2*(to.blue - from.blue)/3;
- selectedOuterColor = new Color(parent.getDisplay(), red, green, blue);
- }
- if (innerRGB != null) {
+ selectedOuterColor = new Color(red, green, blue);
+ }
+ if (innerRGB != null) {
RGB from = lineRGB;
RGB to = innerRGB;
int red = from.red + 2*(to.red - from.red)/3;
int green = from.green + 2*(to.green - from.green)/3;
int blue = from.blue + 2*(to.blue - from.blue)/3;
- selectedInnerColor = new Color(parent.getDisplay(), red, green, blue);
- }
- /* compute the tabArea color */
- outerRGB = parent.getParent().getBackground().getRGB();
- if (outerRGB != null) {
+ selectedInnerColor = new Color(red, green, blue);
+ }
+ /* compute the tabArea color */
+ outerRGB = parent.getParent().getBackground().getRGB();
+ if (outerRGB != null) {
RGB from = lineRGB;
RGB to = outerRGB;
int red = from.red + 2*(to.red - from.red)/3;
int green = from.green + 2*(to.green - from.green)/3;
int blue = from.blue + 2*(to.blue - from.blue)/3;
- tabAreaColor = new Color(parent.getDisplay(), red, green, blue);
- }
+ tabAreaColor = new Color(red, green, blue);
+ }
}
/*
@@ -528,7 +527,7 @@ public class CTabFolderRenderer {
int red = (to.red * propTo + from.red * propFrom) / denom;
int green = (to.green * propTo + from.green * propFrom) / denom;
int blue = (to.blue * propTo + from.blue * propFrom) / denom;
- selectionHighlightGradientColorsCache[i] = new Color(parent.getDisplay(), red, green, blue);
+ selectionHighlightGradientColorsCache[i] = new Color(red, green, blue);
}
}
@@ -542,33 +541,20 @@ public class CTabFolderRenderer {
protected void dispose() {
disposeAntialiasColors();
disposeSelectionHighlightGradientColors();
- if (fillColor != null) {
- fillColor.dispose();
- fillColor = null;
- }
+
+ fillColor = null;
+
if (chevronFont != null) {
chevronFont.dispose();
chevronFont = null;
}
- if (minMaxBorderColor != null) {
- minMaxBorderColor.dispose();
- minMaxBorderColor = null;
- }
}
void disposeAntialiasColors() {
- if (tabAreaColor != null) tabAreaColor.dispose();
- if (selectedInnerColor != null) selectedInnerColor.dispose();
- if (selectedOuterColor != null) selectedOuterColor.dispose();
- tabAreaColor = selectedInnerColor = selectedOuterColor = null;
+ tabAreaColor = selectedInnerColor = selectedOuterColor = null;
}
void disposeSelectionHighlightGradientColors() {
- if(selectionHighlightGradientColorsCache == null)
- return;
- for (Color element : selectionHighlightGradientColorsCache) {
- element.dispose();
- }
selectionHighlightGradientColorsCache = null;
}
@@ -605,12 +591,6 @@ public class CTabFolderRenderer {
* @since 3.6
*/
protected void draw (int part, int state, Rectangle bounds, GC gc) {
- if (minMaxBorderColor == null) {
- // this color has to be identical to the colors used in the PNG files of
- // the view drop down menu located in
- // org.eclipse.e4.ui.workbench.renderers.swt/icons/full/elcl16/view_menu.png
- minMaxBorderColor = new Color (gc.getDevice(), 105, 105, 105);
- }
switch (part) {
case PART_BACKGROUND:
this.drawBackground(gc, bounds, state);
@@ -812,7 +792,7 @@ public class CTabFolderRenderer {
int x2 = size.x - borderRight;
int y2 = size.y - borderBottom - tabHeight - highlight_header;
shape = new int[] {x1,y1, x2,y1, x2,y2, x2-highlight_margin,y2,
- x2-highlight_margin, y1+highlight_margin, x1+highlight_margin,y1+highlight_margin,
+ x2-highlight_margin, y1+highlight_margin, x1+highlight_margin,y1+highlight_margin,
x1+highlight_margin,y2, x1,y2};
} else {
int x1 = borderLeft;
@@ -820,7 +800,7 @@ public class CTabFolderRenderer {
int x2 = size.x - borderRight;
int y2 = size.y - borderBottom;
shape = new int[] {x1,y1, x1+highlight_margin,y1, x1+highlight_margin,y2-highlight_margin,
- x2-highlight_margin,y2-highlight_margin, x2-highlight_margin,y1,
+ x2-highlight_margin,y2-highlight_margin, x2-highlight_margin,y1,
x2,y1, x2,y2, x1,y2};
}
// If horizontal gradient, show gradient across the whole area
@@ -829,7 +809,7 @@ public class CTabFolderRenderer {
} else if (selectedIndex == -1 && parent.gradientColors != null && parent.gradientColors.length > 1 && !parent.gradientVertical) {
drawBackground(gc, shape, false);
} else {
- gc.setBackground(selectedIndex == -1 ? parent.getBackground() : parent.selectionBackground);
+ gc.setBackground(selectedIndex != -1 && parent.shouldHighlight() ? parent.selectionBackground : parent.getBackground());
gc.fillPolygon(shape);
}
}
@@ -875,46 +855,25 @@ public class CTabFolderRenderer {
void drawClose(GC gc, Rectangle closeRect, int closeImageState) {
if (closeRect.width == 0 || closeRect.height == 0) return;
- Display display = parent.getDisplay();
- // draw X 9x9
- int x = closeRect.x + Math.max(1, (closeRect.width-9)/2);
- int y = closeRect.y + Math.max(1, (closeRect.height-9)/2);
+ // draw X with length of this constant
+ final int lineLength = 8;
+ int x = closeRect.x + Math.max(1, (closeRect.width-lineLength)/2);
+ int y = closeRect.y + Math.max(1, (closeRect.height-lineLength)/2);
y += parent.onBottom ? -1 : 1;
-
- Color closeBorder = display.getSystemColor(BUTTON_BORDER);
+ int originalLineWidth = gc.getLineWidth();
+ Color originalForeground = gc.getForeground();
switch (closeImageState & (SWT.HOT | SWT.SELECTED | SWT.BACKGROUND)) {
case SWT.NONE: {
- int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y,
- x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
- x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
- x,y+7, x+2,y+5, x+2,y+4, x,y+2};
- gc.setBackground(display.getSystemColor(BUTTON_FILL));
- gc.fillPolygon(shape);
- gc.setForeground(closeBorder);
- gc.drawPolygon(shape);
+ drawCloseLines(gc, x, y , lineLength, false);
break;
}
case SWT.HOT: {
- int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y,
- x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
- x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
- x,y+7, x+2,y+5, x+2,y+4, x,y+2};
- gc.setBackground(getFillColor());
- gc.fillPolygon(shape);
- gc.setForeground(closeBorder);
- gc.drawPolygon(shape);
+ drawCloseLines(gc, x, y , lineLength, true);
break;
}
case SWT.SELECTED: {
- int[] shape = new int[] {x+1,y+1, x+3,y+1, x+5,y+3, x+6,y+3, x+8,y+1, x+10,y+1,
- x+10,y+3, x+8,y+5, x+8,y+6, x+10,y+8, x+10,y+10,
- x+8,y+10, x+6,y+8, x+5,y+8, x+3,y+10, x+1,y+10,
- x+1,y+8, x+3,y+6, x+3,y+5, x+1,y+3};
- gc.setBackground(getFillColor());
- gc.fillPolygon(shape);
- gc.setForeground(closeBorder);
- gc.drawPolygon(shape);
+ drawCloseLines(gc, x, y , lineLength, true);
break;
}
case SWT.BACKGROUND: {
@@ -923,11 +882,22 @@ public class CTabFolderRenderer {
break;
}
}
+ gc.setLineWidth(originalLineWidth);
+ gc.setForeground(originalForeground);
+ }
+
+ private void drawCloseLines(GC gc, int x, int y, int lineLength, boolean hot) {
+ if (hot) {
+ gc.setLineWidth(gc.getLineWidth() + 2);
+ gc.setForeground(getFillColor());
+ }
+ gc.setLineCap(SWT.CAP_ROUND);
+ gc.drawLine(x, y, x + lineLength, y + lineLength);
+ gc.drawLine(x, y + lineLength, x + lineLength, y);
}
void drawChevron(GC gc, Rectangle chevronRect, int chevronImageState) {
if (chevronRect.width == 0 || chevronRect.height == 0) return;
- int selectedIndex = parent.selectedIndex;
// draw chevron (10x7)
Display display = parent.getDisplay();
Font font = getChevronFont(display);
@@ -935,17 +905,7 @@ public class CTabFolderRenderer {
int indent = Math.max(2, (chevronRect.height - fontHeight - 4) /2);
int x = chevronRect.x + 2;
int y = chevronRect.y + indent;
- int count;
- int itemCount = parent.getItemCount();
- if (parent.single) {
- count = selectedIndex == -1 ? itemCount : itemCount - 1;
- } else {
- int showCount = 0;
- while (showCount < parent.priority.length && parent.items[parent.priority[showCount]].showing) {
- showCount++;
- }
- count = itemCount - showCount;
- }
+ int count = parent.getChevronCount();
String chevronString = count > 99 ? CHEVRON_ELLIPSIS : String.valueOf(count);
switch (chevronImageState & (SWT.HOT | SWT.SELECTED)) {
case SWT.NONE: {
@@ -1128,23 +1088,18 @@ public class CTabFolderRenderer {
void drawMaximize(GC gc, Rectangle maxRect, int maxImageState) {
if (maxRect.width == 0 || maxRect.height == 0) return;
- Display display = parent.getDisplay();
// 5x4 or 7x9
int x = maxRect.x + (maxRect.width - 10)/2;
int y = maxRect.y + 3;
- gc.setForeground(minMaxBorderColor);
- gc.setBackground(display.getSystemColor(BUTTON_FILL));
+ gc.setForeground(parent.getForeground());
switch (maxImageState & (SWT.HOT | SWT.SELECTED)) {
case SWT.NONE: {
if (!parent.getMaximized()) {
- gc.fillRectangle(x, y, 9, 9);
gc.drawRectangle(x, y, 9, 9);
gc.drawLine(x, y+2, x+9, y+2);
} else {
- gc.fillRectangle(x, y+3, 5, 4);
- gc.fillRectangle(x+2, y, 5, 4);
gc.drawRectangle(x, y+3, 5, 4);
gc.drawRectangle(x+2, y, 5, 4);
gc.drawLine(x+2, y+1, x+7, y+1);
@@ -1155,12 +1110,9 @@ public class CTabFolderRenderer {
case SWT.HOT: {
drawRoundRectangle(gc, maxRect);
if (!parent.getMaximized()) {
- gc.fillRectangle(x, y, 9, 9);
gc.drawRectangle(x, y, 9, 9);
gc.drawLine(x, y+2, x+9, y+2);
} else {
- gc.fillRectangle(x, y+3, 5, 4);
- gc.fillRectangle(x+2, y, 5, 4);
gc.drawRectangle(x, y+3, 5, 4);
gc.drawRectangle(x+2, y, 5, 4);
gc.drawLine(x+2, y+1, x+7, y+1);
@@ -1171,12 +1123,9 @@ public class CTabFolderRenderer {
case SWT.SELECTED: {
drawRoundRectangle(gc, maxRect);
if (!parent.getMaximized()) {
- gc.fillRectangle(x+1, y+1, 9, 9);
gc.drawRectangle(x+1, y+1, 9, 9);
gc.drawLine(x+1, y+3, x+10, y+3);
} else {
- gc.fillRectangle(x+1, y+4, 5, 4);
- gc.fillRectangle(x+3, y+1, 5, 4);
gc.drawRectangle(x+1, y+4, 5, 4);
gc.drawRectangle(x+3, y+1, 5, 4);
gc.drawLine(x+3, y+2, x+8, y+2);
@@ -1188,22 +1137,17 @@ public class CTabFolderRenderer {
}
void drawMinimize(GC gc, Rectangle minRect, int minImageState) {
if (minRect.width == 0 || minRect.height == 0) return;
- Display display = parent.getDisplay();
// 5x4 or 9x3
int x = minRect.x + (minRect.width - 10)/2;
int y = minRect.y + 3;
- gc.setForeground(minMaxBorderColor);
- gc.setBackground(display.getSystemColor(BUTTON_FILL));
+ gc.setForeground(parent.getForeground());
switch (minImageState & (SWT.HOT | SWT.SELECTED)) {
case SWT.NONE: {
if (!parent.getMinimized()) {
- gc.fillRectangle(x, y, 9, 3);
gc.drawRectangle(x, y, 9, 3);
} else {
- gc.fillRectangle(x, y+3, 5, 4);
- gc.fillRectangle(x+2, y, 5, 4);
gc.drawRectangle(x, y+3, 5, 4);
gc.drawRectangle(x+2, y, 5, 4);
gc.drawLine(x+3, y+1, x+6, y+1);
@@ -1214,11 +1158,8 @@ public class CTabFolderRenderer {
case SWT.HOT: {
drawRoundRectangle(gc, minRect);
if (!parent.getMinimized()) {
- gc.fillRectangle(x, y, 9, 3);
gc.drawRectangle(x, y, 9, 3);
} else {
- gc.fillRectangle(x, y+3, 5, 4);
- gc.fillRectangle(x+2, y, 5, 4);
gc.drawRectangle(x, y+3, 5, 4);
gc.drawRectangle(x+2, y, 5, 4);
gc.drawLine(x+3, y+1, x+6, y+1);
@@ -1229,11 +1170,8 @@ public class CTabFolderRenderer {
case SWT.SELECTED: {
drawRoundRectangle(gc, minRect);
if (!parent.getMinimized()) {
- gc.fillRectangle(x+1, y+1, 9, 3);
gc.drawRectangle(x+1, y+1, 9, 3);
} else {
- gc.fillRectangle(x+1, y+4, 5, 4);
- gc.fillRectangle(x+3, y+1, 5, 4);
gc.drawRectangle(x+1, y+4, 5, 4);
gc.drawRectangle(x+3, y+1, 5, 4);
gc.drawLine(x+4, y+2, x+7, y+2);
@@ -1475,12 +1413,14 @@ public class CTabFolderRenderer {
int textY = y + (height - extent.y) / 2;
textY += parent.onBottom ? -1 : 1;
- gc.setForeground(parent.selectionForeground);
+ gc.setForeground(item.selectionForeground == null ? parent.getSelectionForeground() : item.selectionForeground);
gc.drawText(item.shortenedText, xDraw, textY, FLAGS);
gc.setFont(gcFont);
// draw a Focus rectangle
if (parent.isFocusControl()) {
+ Color orginalForeground = gc.getForeground();
+ Color orginalBackground = gc.getBackground();
Display display = parent.getDisplay();
if (parent.simple || parent.single) {
gc.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
@@ -1490,6 +1430,8 @@ public class CTabFolderRenderer {
gc.setForeground(display.getSystemColor(BUTTON_BORDER));
gc.drawLine(xDraw, textY+extent.y+1, xDraw+extent.x+1, textY+extent.y+1);
}
+ gc.setForeground(orginalForeground);
+ gc.setBackground(orginalBackground);
}
}
if (parent.showClose || item.showClose) drawClose(gc, item.closeRect, item.closeImageState);
@@ -1526,7 +1468,7 @@ public class CTabFolderRenderer {
} else if (selectedIndex == -1 && parent.gradientColors != null && parent.gradientColors.length > 1 && !parent.gradientVertical) {
drawBackground(gc, shape, false);
} else {
- gc.setBackground(selectedIndex == -1 ? parent.getBackground() : parent.selectionBackground);
+ gc.setBackground(selectedIndex != -1 && parent.shouldHighlight() ? parent.selectionBackground : parent.getBackground());
gc.fillPolygon(shape);
}
@@ -1617,8 +1559,8 @@ public class CTabFolderRenderer {
// Draw border line
if (borderLeft > 0) {
- if (! borderColor.equals(lastBorderColor)) createAntialiasColors();
- antialias(shape, null, tabAreaColor, gc);
+ if (! borderColor.equals(lastBorderColor)) createAntialiasColors();
+ antialias(shape, null, tabAreaColor, gc);
gc.setForeground(borderColor);
gc.drawPolyline(shape);
}
@@ -1664,8 +1606,8 @@ public class CTabFolderRenderer {
imageY += parent.onBottom ? -1 : 1;
int imageWidth = imageBounds.width * imageHeight / imageBounds.height;
gc.drawImage(image,
- imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height,
- imageX, imageY, imageWidth, imageHeight);
+ imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height,
+ imageX, imageY, imageWidth, imageHeight);
xDraw += imageWidth + INTERNAL_SPACING;
}
}
@@ -1684,7 +1626,7 @@ public class CTabFolderRenderer {
Point extent = gc.textExtent(item.shortenedText, FLAGS);
int textY = y + (height - extent.y) / 2;
textY += parent.onBottom ? -1 : 1;
- gc.setForeground(parent.getForeground());
+ gc.setForeground(item.foreground == null ? parent.getForeground() : item.foreground);
gc.drawText(item.shortenedText, xDraw, textY, FLAGS);
gc.setFont(gcFont);
}
@@ -1706,7 +1648,7 @@ public class CTabFolderRenderer {
Color getFillColor() {
if (fillColor == null) {
- fillColor = new Color(parent.getDisplay(), CLOSE_FILL);
+ fillColor = new Color(CLOSE_FILL);
}
return fillColor;
}
@@ -1752,6 +1694,13 @@ public class CTabFolderRenderer {
return true;
}
+ void resetChevronFont() {
+ if (chevronFont != null) {
+ chevronFont.dispose();
+ chevronFont = null;
+ }
+ }
+
void setSelectionHighlightGradientColor(Color start) {
//
//Set to null to match all the early return cases.
@@ -1806,18 +1755,19 @@ public class CTabFolderRenderer {
if (this.getClass().getName().equals("org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering")) return;
int tabHeight = parent.tabHeight;
if (tabHeight == lastTabHeight) return;
+ lastTabHeight = tabHeight;
if (parent.onBottom) {
int d = tabHeight - 12;
curve = new int[]{0,13+d, 0,12+d, 2,12+d, 3,11+d, 5,11+d, 6,10+d, 7,10+d, 9,8+d, 10,8+d,
- 11,7+d, 11+d,7,
- 12+d,6, 13+d,6, 15+d,4, 16+d,4, 17+d,3, 19+d,3, 20+d,2, 22+d,2, 23+d,1};
+ 11,7+d, 11+d,7,
+ 12+d,6, 13+d,6, 15+d,4, 16+d,4, 17+d,3, 19+d,3, 20+d,2, 22+d,2, 23+d,1};
curveWidth = 26+d;
curveIndent = curveWidth/3;
} else {
int d = tabHeight - 12;
curve = new int[]{0,0, 0,1, 2,1, 3,2, 5,2, 6,3, 7,3, 9,5, 10,5,
- 11,6, 11+d,6+d,
- 12+d,7+d, 13+d,7+d, 15+d,9+d, 16+d,9+d, 17+d,10+d, 19+d,10+d, 20+d,11+d, 22+d,11+d, 23+d,12+d};
+ 11,6, 11+d,6+d,
+ 12+d,7+d, 13+d,7+d, 15+d,9+d, 16+d,9+d, 17+d,10+d, 19+d,10+d, 20+d,11+d, 22+d,11+d, 23+d,12+d};
curveWidth = 26+d;
curveIndent = curveWidth/3;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index 4437324e43..884c44354d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
@@ -47,6 +47,8 @@ public class CTabItem extends Item {
// Appearance
Font font;
+ Color foreground;
+ Color selectionForeground;
Image disabledImage;
Rectangle closeRect = new Rectangle(0, 0, 0, 0);
@@ -188,6 +190,40 @@ public Image getDisabledImage(){
return disabledImage;
}
/**
+ * Returns the foreground color that the receiver will use to paint textual information.
+ *
+ * @return the receiver's foreground color
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.114
+ */
+public Color getForeground () {
+ checkWidget ();
+ if (foreground != null) return foreground;
+ return parent.getForeground();
+}
+
+/**
+ * Returns the selection foreground color that the receiver will use to paint textual information.
+ *
+ * @return the receiver's selection foreground color
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.114
+ */
+public Color getSelectionForeground () {
+ checkWidget ();
+ if (selectionForeground != null) return selectionForeground;
+ return parent.getSelectionForeground();
+}
+
+/**
* Returns the font that the receiver will use to paint textual information.
*
* @return the receiver's font
@@ -307,14 +343,14 @@ public void setControl (Control control) {
this.control.setBounds(parent.getClientArea ());
this.control.setVisible(true);
} else {
- int selectedIndex = parent.getSelectionIndex();
- Control selectedControl = null;
- if (selectedIndex != -1) {
- selectedControl = parent.getItem(selectedIndex).control;
- }
- if (this.control != selectedControl) {
- this.control.setVisible(false);
- }
+ int selectedIndex = parent.getSelectionIndex();
+ Control selectedControl = null;
+ if (selectedIndex != -1) {
+ selectedControl = parent.getItem(selectedIndex).control;
+ }
+ if (this.control != selectedControl) {
+ this.control.setVisible(false);
+ }
}
}
}
@@ -369,6 +405,59 @@ public void setFont (Font font){
this.font = font;
parent.updateFolder(CTabFolder.UPDATE_TAB_HEIGHT | CTabFolder.REDRAW_TABS);
}
+
+/**
+ * Sets the foreground color that the receiver will use to paint textual information
+ * for this item to the color specified by the argument, or to the default foreground color
+ * for that kind of control if the argument is null.
+ *
+ * @param color the new color (or null)
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.114
+ */
+public void setForeground (Color color) {
+ checkWidget ();
+ if (color != null) {
+ if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ }
+ if (color == foreground) return;
+ foreground = color;
+ parent.updateFolder(CTabFolder.REDRAW_TABS);
+}
+
+/**
+ * Sets the selection foreground color that the receiver will use to paint textual information
+ * for this item to the color specified by the argument, or to the default selection foreground color
+ * for that kind of control if the argument is null.
+ *
+ * @param color the new color (or null)
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.114
+ */
+public void setSelectionForeground (Color color) {
+ checkWidget ();
+ if (color != null) {
+ if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ }
+ if (color == selectionForeground) return;
+ selectionForeground = color;
+ parent.updateFolder(CTabFolder.REDRAW_TABS);
+}
+
@Override
public void setImage (Image image) {
checkWidget();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java
index d9a552224d..bf219b809f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java
@@ -124,11 +124,11 @@ public ControlEditor (Composite parent) {
this.parent = parent;
controlListener = e -> layout ();
- for (int i=0; i<EVENTS.length; i++) {
- parent.addListener (EVENTS [i], controlListener);
+ for (int event : EVENTS) {
+ parent.addListener (event, controlListener);
}
- scrollbarListener = e -> scroll (e);
+ scrollbarListener = this::scroll;
ScrollBar hBar = parent.getHorizontalBar ();
if (hBar != null) hBar.addListener (SWT.Selection, scrollbarListener);
ScrollBar vBar = parent.getVerticalBar ();
@@ -178,8 +178,8 @@ Rectangle computeBounds () {
*/
public void dispose () {
if (parent != null && !parent.isDisposed()) {
- for (int i=0; i<EVENTS.length; i++) {
- parent.removeListener (EVENTS [i], controlListener);
+ for (int event : EVENTS) {
+ parent.removeListener (event, controlListener);
}
ScrollBar hBar = parent.getHorizontalBar ();
if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener);
@@ -213,8 +213,8 @@ public void layout () {
if (editor.getVisible ()) {
hadFocus = editor.isFocusControl();
} // this doesn't work because
- // resizing the column takes the focus away
- // before we get here
+ // resizing the column takes the focus away
+ // before we get here
editor.setBounds (computeBounds ());
if (hadFocus) {
if (editor == null || editor.isDisposed()) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/DefaultContent.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/DefaultContent.java
index ada84d7b1f..7c77fc46b2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/DefaultContent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/DefaultContent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,7 +21,7 @@ import org.eclipse.swt.internal.*;
import org.eclipse.swt.widgets.*;
class DefaultContent implements StyledTextContent {
- private final static String LineDelimiter = System.getProperty("line.separator");
+ private final static String LineDelimiter = System.lineSeparator();
List<StyledTextListener> textListeners = new ArrayList<>(); // stores text listeners for event sending
char[] textStore = new char[0]; // stores the actual text
@@ -37,7 +37,7 @@ class DefaultContent implements StyledTextContent {
int replaceExpandExp = 1; // the expansion exponent, used to increase the lines array exponentially
/**
- * Creates a new DefaultContent and initializes it. A <code>StyledTextContent</> will always have
+ * Creates a new DefaultContent and initializes it. A <code>StyledTextContent</code> will always have
* at least one empty line.
*/
DefaultContent() {
@@ -170,46 +170,55 @@ boolean isDelimiter(char ch) {
if (ch == SWT.LF) return true;
return false;
}
+
+private boolean isInsideCRLF(int pos) {
+ if (pos == 0) return false;
+ if (pos == getCharCount()) return false;
+
+ char charBefore = getTextRange(pos - 1, 1).charAt(0);
+ if (charBefore != '\r') return false;
+
+ char charAfter = getTextRange(pos, 1).charAt(0);
+ if (charAfter != '\n') return false;
+
+ /*
+ * Bug 568033: in case of this.setText("\rxxx\n")
+ * \r and \n are already parsed as separate line endings, so it
+ * shouldn't be wrong to delete 'xxx' and type something there.
+ */
+ if (getLineAtOffset(pos - 1) != getLineAtOffset(pos))
+ return false;
+
+ return true;
+}
+
/**
- * Determine whether or not the replace operation is valid. DefaultContent will not allow
- * the /r/n line delimiter to be split or partially deleted.
+ * Validates the replace operation. DefaultContent will not allow
+ * the \r\n line delimiter to be split or partially deleted.
* <p>
*
- * @param start start offset of text to replace
+ * @param start start offset of text to replace
* @param replaceLength start offset of text to replace
- * @param newText start offset of text to replace
- * @return a boolean specifying whether or not the replace operation is valid
*/
-protected boolean isValidReplace(int start, int replaceLength, String newText){
+private void validateReplace(int start, int replaceLength) {
if (replaceLength == 0) {
// inserting text, see if the \r\n line delimiter is being split
- if (start == 0) return true;
- if (start == getCharCount()) return true;
- char before = getTextRange(start - 1, 1).charAt(0);
- if (before == '\r') {
- char after = getTextRange(start, 1).charAt(0);
- if (after == '\n') return false;
+ if (isInsideCRLF(start)) {
+ String message = " [0: start=" + start + " len=" + replaceLength + "]";
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, message);
}
} else {
// deleting text, see if part of a \r\n line delimiter is being deleted
- char startChar = getTextRange(start, 1).charAt(0);
- if (startChar == '\n') {
- // see if char before delete position is \r
- if (start != 0) {
- char before = getTextRange(start - 1, 1).charAt(0);
- if (before == '\r') return false;
- }
+ if (isInsideCRLF(start)) {
+ String message = " [1: start=" + start + " len=" + replaceLength + "]";
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, message);
}
- char endChar = getTextRange(start + replaceLength - 1, 1).charAt(0);
- if (endChar == '\r') {
- // see if char after delete position is \n
- if (start + replaceLength != getCharCount()) {
- char after = getTextRange(start + replaceLength, 1).charAt(0);
- if (after == '\n') return false;
- }
+
+ if (isInsideCRLF(start + replaceLength)) {
+ String message = " [2: start=" + start + " len=" + replaceLength + "]";
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, message);
}
}
- return true;
}
/**
* Calculates the indexes of each line of text in the given range.
@@ -759,12 +768,12 @@ public void removeTextChangeListener(TextChangeListener listener){
* lines that are going to be inserted and <code>replaceLineCount</code> is
* the number of lines that are going to be deleted, based on the change
* that occurs visually. For example:
+ * </p>
* <ul>
- * <li>(replaceText,newText) ==> (replaceLineCount,newLineCount)
- * <li>("","\n") ==> (0,1)
- * <li>("\n\n","a") ==> (2,0)
+ * <li>(replaceText,newText) ==&gt; (replaceLineCount,newLineCount)
+ * <li>("","\n") ==&gt; (0,1)
+ * <li>("\n\n","a") ==&gt; (2,0)
* </ul>
- * </p>
*
* @param start start offset of text to replace
* @param replaceLength start offset of text to replace
@@ -780,7 +789,7 @@ public void removeTextChangeListener(TextChangeListener listener){
@Override
public void replaceTextRange(int start, int replaceLength, String newText){
// check for invalid replace operations
- if (!isValidReplace(start, replaceLength, newText)) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ validateReplace(start, replaceLength);
// inform listeners
StyledTextEvent event = new StyledTextEvent(this);
@@ -806,8 +815,8 @@ public void replaceTextRange(int start, int replaceLength, String newText){
* Sends the text listeners the TextChanged event.
*/
void sendTextEvent(StyledTextEvent event) {
- for (int i = 0; i < textListeners.size(); i++) {
- textListeners.get(i).handleEvent(event);
+ for (StyledTextListener textListener : textListeners) {
+ textListener.handleEvent(event);
}
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java
index 784b942612..06dd7c5671 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java
@@ -1,294 +1,296 @@
-/**
- * Copyright (c) 2019 Laurent CARON.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation (bug 542777)
- */
-package org.eclipse.swt.custom;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * This class add the following behaviour to <code>StyledText</code> widgets:<br/>
- * When the user clicks on the wheel, a circle with arrows appears. When the user moves the mouse,
- * the StyledText content is scrolled (on the right or on the left for horizontal movements, up or down for vertical movements).<br/>
- *
- * @since 3.110
- */
-class MouseNavigator {
- private final StyledText parent;
- boolean navigationActivated = false;
- private GC gc;
- private static final int CIRCLE_RADIUS = 15;
- private static final int CENTRAL_POINT_RADIUS = 2;
- private Point originalMouseLocation;
- private final Listener mouseDownListener, mouseUpListener, paintListener, mouseMoveListener, focusOutListener;
- private boolean hasHBar, hasVBar;
- private Cursor previousCursor;
-
- MouseNavigator(final StyledText styledText) {
- if (styledText == null) {
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- }
- if (styledText.isDisposed()) {
- SWT.error(SWT.ERROR_WIDGET_DISPOSED);
- }
- parent = styledText;
-
- mouseDownListener = (event) -> {
- onMouseDown(event);
- };
- parent.addListener(SWT.MouseDown, mouseDownListener);
-
- mouseUpListener = (event) -> {
- onMouseUp(event);
- };
- parent.addListener(SWT.MouseUp, mouseUpListener);
-
- paintListener = (event) -> {
- onPaint(event);
- };
- parent.addListener(SWT.Paint, paintListener);
-
- mouseMoveListener = (event) -> {
- onMouseMove(event);
- };
- parent.addListener(SWT.MouseMove, mouseMoveListener);
-
- focusOutListener = (event) -> {
- onFocusOut(event);
- };
- parent.addListener(SWT.FocusOut, focusOutListener);
- }
-
- void onMouseDown(Event e) {
- if ((e.button != 2) || navigationActivated) {
- return;
- }
-
- if (!parent.isVisible() || !parent.getEnabled() || parent.middleClickPressed) {
- return;
- }
-
- // Widget has no bar or bars are not enabled
- initBarState();
-
- if (!hasHBar && !hasVBar) {
- return;
- }
-
- navigationActivated = true;
- previousCursor = parent.getCursor();
- parent.setCursor(parent.getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
- originalMouseLocation = getMouseLocation();
- parent.redraw();
- }
-
- private void initBarState() {
- hasHBar = computeHasHorizontalBar();
- hasVBar = computeHasVerticalBar();
- }
-
- private boolean computeHasHorizontalBar() {
- final ScrollBar horizontalBar = parent.getHorizontalBar();
- final boolean hasHorizontalBar = horizontalBar != null && horizontalBar.isVisible();
- final boolean exceedHorizontalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).x > parent.getSize().x;
- return hasHorizontalBar && exceedHorizontalSpace;
- }
-
- private boolean computeHasVerticalBar() {
- final ScrollBar verticalBar = parent.getVerticalBar();
- final boolean hasVerticalBar = verticalBar != null && verticalBar.isEnabled();
- final boolean exceedVerticalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).y > parent.getSize().y;
- return hasVerticalBar && exceedVerticalSpace;
- }
-
- private void onMouseUp(Event e) {
- if ((computeDist() < CIRCLE_RADIUS) && (computeDist() >= 0)) {
- return;
- }
- deactivate();
- }
-
- public int computeDist() {
- if (originalMouseLocation == null) {
- return -1;
- }
- final Point mouseLocation = getMouseLocation();
- final int deltaX = originalMouseLocation.x - mouseLocation.x;
- final int deltaY = originalMouseLocation.y - mouseLocation.y;
- final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
- return dist;
- }
-
- private void deactivate() {
- parent.setCursor(previousCursor);
- navigationActivated = false;
- originalMouseLocation = null;
- parent.redraw();
- }
-
- private void onFocusOut(Event e) {
- deactivate();
- }
-
- private void onMouseMove(Event e) {
- if (!navigationActivated) {
- return;
- }
-
- final Point mouseLocation = getMouseLocation();
- final int deltaX = originalMouseLocation.x - mouseLocation.x;
- final int deltaY = originalMouseLocation.y - mouseLocation.y;
- final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
- if (dist < CIRCLE_RADIUS) {
- return;
- }
-
- parent.setRedraw(false);
- if (hasHBar) {
- final ScrollBar bar = parent.getHorizontalBar();
- bar.setSelection((int) (bar.getSelection() - deltaX * .1));
- fireSelectionEvent(e, bar);
- }
-
- if (hasVBar) {
- final ScrollBar bar = parent.getVerticalBar();
- bar.setSelection((int) (bar.getSelection() - deltaY * .1));
- fireSelectionEvent(e, bar);
- }
- parent.setRedraw(true);
- parent.redraw();
- }
-
- private void fireSelectionEvent(final Event e, final ScrollBar bar) {
- final Event event = new Event();
- event.widget = bar;
- event.display = parent.getDisplay();
- event.type = SWT.Selection;
- event.time = e.time;
-
- for (final Listener selectionListener : bar.getListeners(SWT.Selection)) {
- selectionListener.handleEvent(event);
- }
- }
-
- private Point getMouseLocation() {
- final Point cursorLocation = Display.getCurrent().getCursorLocation();
- final Point relativeCursorLocation = parent.toControl(cursorLocation);
- return relativeCursorLocation;
- }
-
- private void onPaint(final Event e) {
- if (!navigationActivated) {
- return;
- }
-
- final Rectangle rect = parent.getClientArea();
- if (rect.width == 0 || rect.height == 0) {
- return;
- }
- gc = e.gc;
- gc.setAntialias(SWT.ON);
- gc.setAdvanced(true);
-
- final Color oldForegroundColor = gc.getForeground();
- final Color oldBackgroundColor = gc.getBackground();
- gc.setBackground(parent.getForeground());
-
- drawCircle();
- drawCentralPoint();
-
- drawArrows();
-
- gc.setForeground(oldForegroundColor);
- gc.setBackground(oldBackgroundColor);
- }
-
- private void drawCircle() {
- gc.setBackground(parent.getBackground());
- gc.setForeground(parent.getForeground());
- gc.setAlpha(200);
- gc.fillOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
- gc.setBackground(parent.getForeground());
- gc.setAlpha(255);
- gc.drawOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
- }
-
- private void drawCentralPoint() {
- gc.fillOval(originalMouseLocation.x - CENTRAL_POINT_RADIUS, originalMouseLocation.y - CENTRAL_POINT_RADIUS, CENTRAL_POINT_RADIUS * 2, CENTRAL_POINT_RADIUS * 2);
- }
-
- private void drawArrows() {
- gc.setLineWidth(2);
- if (hasHBar) {
- drawHorizontalArrows();
- }
- if (hasVBar) {
- drawVerticalArrows();
- }
- }
-
- private void drawHorizontalArrows() {
- final int[] points = new int[6];
- // Left
- points[0] = originalMouseLocation.x - 6;
- points[1] = originalMouseLocation.y + 3;
- points[2] = originalMouseLocation.x - 9;
- points[3] = originalMouseLocation.y;
- points[4] = originalMouseLocation.x - 6;
- points[5] = originalMouseLocation.y - 3;
- gc.drawPolyline(points);
-
- // Right
- points[0] = originalMouseLocation.x + 7;
- points[1] = originalMouseLocation.y + 3;
- points[2] = originalMouseLocation.x + 10;
- points[3] = originalMouseLocation.y;
- points[4] = originalMouseLocation.x + 7;
- points[5] = originalMouseLocation.y - 3;
- gc.drawPolyline(points);
- }
-
- private void drawVerticalArrows() {
- final int[] points = new int[6];
- // Upper
- points[0] = originalMouseLocation.x - 3;
- points[1] = originalMouseLocation.y - 6;
- points[2] = originalMouseLocation.x;
- points[3] = originalMouseLocation.y - 10;
- points[4] = originalMouseLocation.x + 3;
- points[5] = originalMouseLocation.y - 6;
- gc.drawPolyline(points);
-
- // Lower
- points[0] = originalMouseLocation.x - 3;
- points[1] = originalMouseLocation.y + 7;
- points[2] = originalMouseLocation.x;
- points[3] = originalMouseLocation.y + 11;
- points[4] = originalMouseLocation.x + 3;
- points[5] = originalMouseLocation.y + 7;
- gc.drawPolyline(points);
-
- }
-
- void dispose() {
- if (parent.isDisposed()) {
- return;
- }
- parent.removeListener(SWT.MouseDown, mouseDownListener);
- parent.removeListener(SWT.MouseUp, mouseUpListener);
- parent.removeListener(SWT.Paint, paintListener);
- parent.removeListener(SWT.MouseMove, mouseMoveListener);
- parent.removeListener(SWT.MouseExit, focusOutListener);
- }
-}
+/**
+ * Copyright (c) 2019 Laurent CARON.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation (bug 542777)
+ */
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * This class add the following behaviour to <code>StyledText</code> widgets:
+ * <p>
+ * When the user clicks on the wheel, a circle with arrows appears. When the user moves the mouse,
+ * the StyledText content is scrolled (on the right or on the left for horizontal movements, up or down for vertical movements).
+ * </p>
+ *
+ * @since 3.110
+ */
+class MouseNavigator {
+ private final StyledText parent;
+ boolean navigationActivated = false;
+ private GC gc;
+ private static final int CIRCLE_RADIUS = 15;
+ private static final int CENTRAL_POINT_RADIUS = 2;
+ private Point originalMouseLocation;
+ private final Listener mouseDownListener, mouseUpListener, paintListener, mouseMoveListener, focusOutListener;
+ private boolean hasHBar, hasVBar;
+ private Cursor previousCursor;
+
+ MouseNavigator(final StyledText styledText) {
+ if (styledText == null) {
+ SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ }
+ if (styledText.isDisposed()) {
+ SWT.error(SWT.ERROR_WIDGET_DISPOSED);
+ }
+ parent = styledText;
+
+ mouseDownListener = event -> {
+ onMouseDown(event);
+ };
+ parent.addListener(SWT.MouseDown, mouseDownListener);
+
+ mouseUpListener = event -> {
+ onMouseUp(event);
+ };
+ parent.addListener(SWT.MouseUp, mouseUpListener);
+
+ paintListener = event -> {
+ onPaint(event);
+ };
+ parent.addListener(SWT.Paint, paintListener);
+
+ mouseMoveListener = event -> {
+ onMouseMove(event);
+ };
+ parent.addListener(SWT.MouseMove, mouseMoveListener);
+
+ focusOutListener = event -> {
+ onFocusOut(event);
+ };
+ parent.addListener(SWT.FocusOut, focusOutListener);
+ }
+
+ void onMouseDown(Event e) {
+ if ((e.button != 2) || navigationActivated) {
+ return;
+ }
+
+ if (!parent.isVisible() || !parent.getEnabled() || parent.middleClickPressed) {
+ return;
+ }
+
+ // Widget has no bar or bars are not enabled
+ initBarState();
+
+ if (!hasHBar && !hasVBar) {
+ return;
+ }
+
+ navigationActivated = true;
+ previousCursor = parent.getCursor();
+ parent.setCursor(parent.getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
+ originalMouseLocation = getMouseLocation();
+ parent.redraw();
+ }
+
+ private void initBarState() {
+ hasHBar = computeHasHorizontalBar();
+ hasVBar = computeHasVerticalBar();
+ }
+
+ private boolean computeHasHorizontalBar() {
+ final ScrollBar horizontalBar = parent.getHorizontalBar();
+ final boolean hasHorizontalBar = horizontalBar != null && horizontalBar.isVisible();
+ final boolean exceedHorizontalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).x > parent.getSize().x;
+ return hasHorizontalBar && exceedHorizontalSpace;
+ }
+
+ private boolean computeHasVerticalBar() {
+ final ScrollBar verticalBar = parent.getVerticalBar();
+ final boolean hasVerticalBar = verticalBar != null && verticalBar.isEnabled();
+ final boolean exceedVerticalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).y > parent.getSize().y;
+ return hasVerticalBar && exceedVerticalSpace;
+ }
+
+ private void onMouseUp(Event e) {
+ if ((computeDist() < CIRCLE_RADIUS) && (computeDist() >= 0)) {
+ return;
+ }
+ deactivate();
+ }
+
+ public int computeDist() {
+ if (originalMouseLocation == null) {
+ return -1;
+ }
+ final Point mouseLocation = getMouseLocation();
+ final int deltaX = originalMouseLocation.x - mouseLocation.x;
+ final int deltaY = originalMouseLocation.y - mouseLocation.y;
+ final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ return dist;
+ }
+
+ private void deactivate() {
+ parent.setCursor(previousCursor);
+ navigationActivated = false;
+ originalMouseLocation = null;
+ parent.redraw();
+ }
+
+ private void onFocusOut(Event e) {
+ deactivate();
+ }
+
+ private void onMouseMove(Event e) {
+ if (!navigationActivated) {
+ return;
+ }
+
+ final Point mouseLocation = getMouseLocation();
+ final int deltaX = originalMouseLocation.x - mouseLocation.x;
+ final int deltaY = originalMouseLocation.y - mouseLocation.y;
+ final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ if (dist < CIRCLE_RADIUS) {
+ return;
+ }
+
+ parent.setRedraw(false);
+ if (hasHBar) {
+ final ScrollBar bar = parent.getHorizontalBar();
+ bar.setSelection((int) (bar.getSelection() - deltaX * .1));
+ fireSelectionEvent(e, bar);
+ }
+
+ if (hasVBar) {
+ final ScrollBar bar = parent.getVerticalBar();
+ bar.setSelection((int) (bar.getSelection() - deltaY * .1));
+ fireSelectionEvent(e, bar);
+ }
+ parent.setRedraw(true);
+ parent.redraw();
+ }
+
+ private void fireSelectionEvent(final Event e, final ScrollBar bar) {
+ final Event event = new Event();
+ event.widget = bar;
+ event.display = parent.getDisplay();
+ event.type = SWT.Selection;
+ event.time = e.time;
+
+ for (final Listener selectionListener : bar.getListeners(SWT.Selection)) {
+ selectionListener.handleEvent(event);
+ }
+ }
+
+ private Point getMouseLocation() {
+ final Point cursorLocation = Display.getCurrent().getCursorLocation();
+ final Point relativeCursorLocation = parent.toControl(cursorLocation);
+ return relativeCursorLocation;
+ }
+
+ private void onPaint(final Event e) {
+ if (!navigationActivated) {
+ return;
+ }
+
+ final Rectangle rect = parent.getClientArea();
+ if (rect.width == 0 || rect.height == 0) {
+ return;
+ }
+ gc = e.gc;
+ gc.setAntialias(SWT.ON);
+ gc.setAdvanced(true);
+
+ final Color oldForegroundColor = gc.getForeground();
+ final Color oldBackgroundColor = gc.getBackground();
+ gc.setBackground(parent.getForeground());
+
+ drawCircle();
+ drawCentralPoint();
+
+ drawArrows();
+
+ gc.setForeground(oldForegroundColor);
+ gc.setBackground(oldBackgroundColor);
+ }
+
+ private void drawCircle() {
+ gc.setBackground(parent.getBackground());
+ gc.setForeground(parent.getForeground());
+ gc.setAlpha(200);
+ gc.fillOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
+ gc.setBackground(parent.getForeground());
+ gc.setAlpha(255);
+ gc.drawOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
+ }
+
+ private void drawCentralPoint() {
+ gc.fillOval(originalMouseLocation.x - CENTRAL_POINT_RADIUS, originalMouseLocation.y - CENTRAL_POINT_RADIUS, CENTRAL_POINT_RADIUS * 2, CENTRAL_POINT_RADIUS * 2);
+ }
+
+ private void drawArrows() {
+ gc.setLineWidth(2);
+ if (hasHBar) {
+ drawHorizontalArrows();
+ }
+ if (hasVBar) {
+ drawVerticalArrows();
+ }
+ }
+
+ private void drawHorizontalArrows() {
+ final int[] points = new int[6];
+ // Left
+ points[0] = originalMouseLocation.x - 6;
+ points[1] = originalMouseLocation.y + 3;
+ points[2] = originalMouseLocation.x - 9;
+ points[3] = originalMouseLocation.y;
+ points[4] = originalMouseLocation.x - 6;
+ points[5] = originalMouseLocation.y - 3;
+ gc.drawPolyline(points);
+
+ // Right
+ points[0] = originalMouseLocation.x + 7;
+ points[1] = originalMouseLocation.y + 3;
+ points[2] = originalMouseLocation.x + 10;
+ points[3] = originalMouseLocation.y;
+ points[4] = originalMouseLocation.x + 7;
+ points[5] = originalMouseLocation.y - 3;
+ gc.drawPolyline(points);
+ }
+
+ private void drawVerticalArrows() {
+ final int[] points = new int[6];
+ // Upper
+ points[0] = originalMouseLocation.x - 3;
+ points[1] = originalMouseLocation.y - 6;
+ points[2] = originalMouseLocation.x;
+ points[3] = originalMouseLocation.y - 10;
+ points[4] = originalMouseLocation.x + 3;
+ points[5] = originalMouseLocation.y - 6;
+ gc.drawPolyline(points);
+
+ // Lower
+ points[0] = originalMouseLocation.x - 3;
+ points[1] = originalMouseLocation.y + 7;
+ points[2] = originalMouseLocation.x;
+ points[3] = originalMouseLocation.y + 11;
+ points[4] = originalMouseLocation.x + 3;
+ points[5] = originalMouseLocation.y + 7;
+ gc.drawPolyline(points);
+
+ }
+
+ void dispose() {
+ if (parent.isDisposed()) {
+ return;
+ }
+ parent.removeListener(SWT.MouseDown, mouseDownListener);
+ parent.removeListener(SWT.MouseUp, mouseUpListener);
+ parent.removeListener(SWT.Paint, paintListener);
+ parent.removeListener(SWT.MouseMove, mouseMoveListener);
+ parent.removeListener(SWT.MouseExit, focusOutListener);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PopupList.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PopupList.java
index 65d0895b7b..59c803db15 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PopupList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PopupList.java
@@ -214,9 +214,9 @@ public void select(String string) {
// find the first entry in the list that starts with the
// specified string
if (string != null){
- for (int i = 0; i < items.length; i++) {
- if (items[i].startsWith(string)){
- int index = list.indexOf(items[i]);
+ for (String item : items) {
+ if (item.startsWith(string)){
+ int index = list.indexOf(item);
list.select(index);
break;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
index 90b067c63d..23a9874a20 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
@@ -86,7 +86,7 @@ public SashForm(Composite parent, int style) {
sashStyle = ((style & SWT.VERTICAL) != 0) ? SWT.HORIZONTAL : SWT.VERTICAL;
if ((style & SWT.BORDER) != 0) sashStyle |= SWT.BORDER;
if ((style & SWT.SMOOTH) != 0) sashStyle |= SWT.SMOOTH;
- sashListener = e -> onDragSash(e);
+ sashListener = this::onDragSash;
}
static int checkStyle (int style) {
int mask = SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
@@ -179,7 +179,7 @@ public int[] getWeights() {
int[] ratios = new int[cArray.length];
for (int i = 0; i < cArray.length; i++) {
Object data = cArray[i].getLayoutData();
- if (data != null && data instanceof SashFormData) {
+ if (data instanceof SashFormData) {
ratios[i] = (int)(((SashFormData)data).weight * 1000 >> 16);
} else {
ratios[i] = 200;
@@ -188,15 +188,14 @@ public int[] getWeights() {
return ratios;
}
Control[] getControls(boolean onlyVisible) {
- Control[] children = getChildren();
Control[] result = new Control[0];
- for (int i = 0; i < children.length; i++) {
- if (children[i] instanceof Sash) continue;
- if (onlyVisible && !children[i].getVisible()) continue;
+ for (Control element : getChildren()) {
+ if (element instanceof Sash) continue;
+ if (onlyVisible && !element.getVisible()) continue;
Control[] newResult = new Control[result.length + 1];
System.arraycopy(result, 0, newResult, 0, result.length);
- newResult[result.length] = children[i];
+ newResult[result.length] = element;
result = newResult;
}
return result;
@@ -336,16 +335,16 @@ public void setOrientation(int orientation) {
public void setBackground (Color color) {
super.setBackground(color);
background = color;
- for (int i = 0; i < sashes.length; i++) {
- sashes[i].setBackground(background);
+ for (Sash sash : sashes) {
+ sash.setBackground(background);
}
}
@Override
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
- for (int i = 0; i < sashes.length; i++) {
- sashes[i].setForeground(foreground);
+ for (Sash sash : sashes) {
+ sash.setForeground(foreground);
}
}
/**
@@ -388,15 +387,15 @@ public void setMaximizedControl(Control control){
if (maxControl != null) {
this.maxControl = null;
layout(false);
- for (int i= 0; i < sashes.length; i++){
- sashes[i].setVisible(true);
+ for (Sash sashe : sashes) {
+ sashe.setVisible(true);
}
}
return;
}
- for (int i= 0; i < sashes.length; i++){
- sashes[i].setVisible(false);
+ for (Sash sash : sashes) {
+ sash.setVisible(false);
}
maxControl = control;
layout(false);
@@ -424,8 +423,8 @@ public void setSashWidth(int width) {
@Override
public void setToolTipText(String string) {
super.setToolTipText(string);
- for (int i = 0; i < sashes.length; i++) {
- sashes[i].setToolTipText(string);
+ for (Sash sash : sashes) {
+ sash.setToolTipText(string);
}
}
/**
@@ -443,7 +442,7 @@ public void setToolTipText(String string) {
* <li>ERROR_INVALID_ARGUMENT - if the weights value is null or of incorrect length (must match the number of children)</li>
* </ul>
*/
-public void setWeights(int[] weights) {
+public void setWeights(int... weights) {
checkWidget();
Control[] cArray = getControls(false);
if (weights == null || weights.length != cArray.length) {
@@ -451,15 +450,16 @@ public void setWeights(int[] weights) {
}
int total = 0;
- for (int i = 0; i < weights.length; i++) {
- if (weights[i] < 0) {
+ for (int weight : weights) {
+ if (weight < 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- total += weights[i];
+ total += weight;
}
if (total == 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
+
for (int i = 0; i < cArray.length; i++) {
Object data = cArray[i].getLayoutData();
if (data == null || !(data instanceof SashFormData)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java
index 5fe4264de2..8c17111d48 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java
@@ -60,7 +60,7 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
long total = 0;
for (int i = 0; i < cArray.length; i++) {
Object data = cArray[i].getLayoutData();
- if (data != null && data instanceof SashFormData) {
+ if (data instanceof SashFormData) {
ratios[i] = ((SashFormData)data).weight;
} else {
data = new SashFormData();
@@ -103,11 +103,11 @@ protected void layout(Composite composite, boolean flushCache) {
Control[] controls = sashForm.controls;
if (sashForm.maxControl != null && !sashForm.maxControl.isDisposed()) {
- for (int i= 0; i < controls.length; i++){
- if (controls[i] != sashForm.maxControl) {
- controls[i].setBounds(-200, -200, 0, 0);
+ for (Control control : controls) {
+ if (control != sashForm.maxControl) {
+ control.setBounds(-200, -200, 0, 0);
} else {
- controls[i].setBounds(area);
+ control.setBounds(area);
}
}
return;
@@ -124,8 +124,8 @@ protected void layout(Composite composite, boolean flushCache) {
}
if (sashForm.sashes.length > controls.length - 1) {
if (controls.length == 0) {
- for (int i = 0; i < sashForm.sashes.length; i++) {
- sashForm.sashes[i].dispose();
+ for (Sash sash : sashForm.sashes) {
+ sash.dispose();
}
sashForm.sashes = new Sash[0];
} else {
@@ -144,7 +144,7 @@ protected void layout(Composite composite, boolean flushCache) {
long total = 0;
for (int i = 0; i < controls.length; i++) {
Object data = controls[i].getLayoutData();
- if (data != null && data instanceof SashFormData) {
+ if (data instanceof SashFormData) {
ratios[i] = ((SashFormData)data).weight;
} else {
data = new SashFormData();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
index 9b23d0c343..5490db532e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
@@ -71,13 +71,13 @@ import org.eclipse.swt.widgets.*;
public class StackLayout extends Layout {
- /**
+ /**
* marginWidth specifies the number of points of horizontal margin
* that will be placed along the left and right edges of the layout.
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
* that will be placed along the top and bottom edges of the layout.
@@ -86,19 +86,18 @@ public class StackLayout extends Layout {
*/
public int marginHeight = 0;
- /**
- * topControl the Control that is displayed at the top of the stack.
- * All other controls that are children of the parent composite will not be visible.
- */
- public Control topControl;
+ /**
+ * topControl the Control that is displayed at the top of the stack.
+ * All other controls that are children of the parent composite will not be visible.
+ */
+ public Control topControl;
@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
- Control children[] = composite.getChildren();
int maxWidth = 0;
int maxHeight = 0;
- for (int i = 0; i < children.length; i++) {
- Point size = children[i].computeSize(wHint, hHint, flushCache);
+ for (Control element : composite.getChildren()) {
+ Point size = element.computeSize(wHint, hHint, flushCache);
maxWidth = Math.max(size.x, maxWidth);
maxHeight = Math.max(size.y, maxHeight);
}
@@ -116,15 +115,14 @@ protected boolean flushCache(Control control) {
@Override
protected void layout(Composite composite, boolean flushCache) {
- Control children[] = composite.getChildren();
Rectangle rect = composite.getClientArea();
rect.x += marginWidth;
rect.y += marginHeight;
rect.width -= 2 * marginWidth;
rect.height -= 2 * marginHeight;
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- children[i].setVisible(children[i] == topControl);
+ for (Control element : composite.getChildren()) {
+ element.setBounds(rect);
+ element.setVisible(element == topControl);
}
}
@@ -143,12 +141,12 @@ String getName () {
*/
@Override
public String toString () {
- String string = getName ()+" {";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (topControl != null) string += "topControl="+topControl+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (topControl != null) string += "topControl="+topControl+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 487e18bfaf..d0dce59089 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -20,6 +20,7 @@ package org.eclipse.swt.custom;
import java.util.*;
import java.util.List;
+import java.util.stream.*;
import org.eclipse.swt.*;
import org.eclipse.swt.accessibility.*;
@@ -89,7 +90,7 @@ import org.eclipse.swt.widgets.*;
*/
public class StyledText extends Canvas {
static final char TAB = '\t';
- static final String PlatformLineDelimiter = System.getProperty("line.separator");
+ static final String PlatformLineDelimiter = System.lineSeparator();
static final int BIDI_CARET_WIDTH = 3;
static final int DEFAULT_WIDTH = 64;
static final int DEFAULT_HEIGHT = 64;
@@ -99,6 +100,8 @@ public class StyledText extends Canvas {
static final int OFFSET_LEADING = 1;
static final String STYLEDTEXT_KEY = "org.eclipse.swt.internal.cocoa.styledtext"; //$NON-NLS-1$
+ private static int getX(Point p) { return p.x; } // workaround p -> p.x lose typing and cannot be chained in comparing...
+ static final Comparator<Point> SELECTION_COMPARATOR = Comparator.comparingInt(StyledText::getX).thenComparingInt(p -> p.y);
Color selectionBackground; // selection background color
Color selectionForeground; // selection foreground color
@@ -122,21 +125,32 @@ public class StyledText extends Canvas {
int bottomMargin;
Color marginColor;
int columnX; // keep track of the horizontal caret position when changing lines/pages. Fixes bug 5935
- int caretOffset;
+ Caret[] carets;
+ int[] caretOffsets = {0};
int caretAlignment;
- Point selection = new Point(0, 0); // x and y are start and end caret offsets of selection (x <= y)
+ Point[] selection = { new Point(0, 0) }; // x and y are start and end caret offsets of selection (x <= y)
+ int[] selectionAnchors = {0}; // position of selection anchor for the selection ranges. 0 based offset from beginning of text
Point clipboardSelection; // x and y are start and end caret offsets of previous selection
- int selectionAnchor; // position of selection anchor. 0 based offset from beginning of text
Point doubleClickSelection; // selection after last mouse double click
boolean editable = true;
boolean wordWrap = false; // text is wrapped automatically
boolean visualWrap = false; // process line breaks inside logical lines (inserted by BidiSegmentEvent)
+ boolean hasStyleWithVariableHeight = false;
+ boolean hasVerticalIndent = false;
boolean doubleClickEnabled = true; // see getDoubleClickEnabled
boolean overwrite = false; // insert/overwrite edit mode
int textLimit = -1; // limits the number of characters the user can type in the widget. Unlimited by default.
Map<Integer, Integer> keyActionMap = new HashMap<>();
Color background = null; // workaround for bug 4791
Color foreground = null; //
+ /** True if a non-default background color is set */
+ boolean customBackground;
+ /** True if a non-default foreground color is set */
+ boolean customForeground;
+ /** False iff the widget is disabled */
+ boolean enabled = true;
+ /** True iff the widget is in the midst of being enabled or disabled */
+ boolean insideSetEnableCall;
Clipboard clipboard;
int clickCount;
int autoScrollDirection = SWT.NULL; // the direction of autoscrolling (up, down, right, left)
@@ -155,7 +169,6 @@ public class StyledText extends Canvas {
int caretWidth = 0;
Caret defaultCaret = null;
boolean updateCaretDirection = true;
- boolean fixedLineHeight;
boolean dragDetect = true;
IME ime;
Cursor cursor;
@@ -214,7 +227,7 @@ public class StyledText extends Canvas {
int startLine; // first (wrapped) line to print
int endLine; // last (wrapped) line to print
boolean singleLine; // widget single line mode
- Point selection = null; // selected text
+ Point[] selection = { new Point(0, 0) }; // x and y are start and end caret offsets of selection (x <= y)
boolean mirrored; // indicates the printing gc should be mirrored
int lineSpacing;
int printMargin;
@@ -223,7 +236,7 @@ public class StyledText extends Canvas {
* Creates an instance of <code>Printing</code>.
* Copies the widget content and rendering data that needs
* to be requested from listeners.
- * </p>
+ *
* @param parent StyledText widget to print.
* @param printer printer device to print on.
* @param printOptions print options
@@ -246,7 +259,7 @@ public class StyledText extends Canvas {
startPage = temp;
}
} else if (scope == PrinterData.SELECTION) {
- selection = styledText.getSelectionRange();
+ selection = Arrays.copyOf(styledText.selection, styledText.selection.length);
}
printerRenderer = new StyledTextRenderer(printer, null);
printerRenderer.setContent(copyContent(styledText.getContent()));
@@ -254,7 +267,7 @@ public class StyledText extends Canvas {
}
/**
* Caches all line data that needs to be requested from a listener.
- * </p>
+ *
* @param printerContent <code>StyledTextContent</code> to request
* line data for.
*/
@@ -300,7 +313,7 @@ public class StyledText extends Canvas {
if (printOptions.printLineBackground) {
Color printerColor = (Color)resources.get(color);
if (printerColor == null) {
- printerColor = new Color (printer, color.getRGB());
+ printerColor = new Color (color.getRGB());
resources.put(color, printerColor);
}
printerRenderer.setLineBackground(i, 1, printerColor);
@@ -330,7 +343,7 @@ public class StyledText extends Canvas {
Color printerColor = (Color)resources.get(color);
if (printOptions.printTextForeground) {
if (printerColor == null) {
- printerColor = new Color (printer, color.getRGB());
+ printerColor = new Color (color.getRGB());
resources.put(color, printerColor);
}
style.foreground = printerColor;
@@ -343,7 +356,7 @@ public class StyledText extends Canvas {
Color printerColor = (Color)resources.get(color);
if (printOptions.printTextBackground) {
if (printerColor == null) {
- printerColor = new Color (printer, color.getRGB());
+ printerColor = new Color (color.getRGB());
resources.put(color, printerColor);
}
style.background = printerColor;
@@ -369,7 +382,7 @@ public class StyledText extends Canvas {
}
/**
* Copies the text of the specified <code>StyledTextContent</code>.
- * </p>
+ *
* @param original the <code>StyledTextContent</code> to copy.
*/
StyledTextContent copyContent(StyledTextContent original) {
@@ -444,9 +457,9 @@ public class StyledText extends Canvas {
int pageSize = clientArea.height / lineHeight;//WRONG
startLine = (startPage - 1) * pageSize;
} else if (scope == PrinterData.SELECTION) {
- startLine = content.getLineAtOffset(selection.x);
- if (selection.y > 0) {
- endLine = content.getLineAtOffset(selection.x + selection.y - 1);
+ startLine = content.getLineAtOffset(selection[0].x);
+ if (selection[0].y > 0) {
+ endLine = content.getLineAtOffset(selection[0].y);
} else {
endLine = startLine - 1;
}
@@ -819,8 +832,7 @@ public class StyledText extends Canvas {
header.append(";");
}
header.append("}}\n{\\colortbl");
- for (int i = 0; i < colorTable.size(); i++) {
- Color color = colorTable.get(i);
+ for (Color color : colorTable) {
header.append("\\red");
header.append(color.getRed());
header.append("\\green");
@@ -1030,11 +1042,11 @@ public class StyledText extends Canvas {
* partial lines, specify the start and length of the desired segment
* during object creation.
* <p>
- * </b>NOTE:</b> <code>toString()</code> is guaranteed to return a valid string only after close()
+ * <b>NOTE:</b> <code>toString()</code> is guaranteed to return a valid string only after close()
* has been called.
* </p>
*/
- class TextWriter {
+ static class TextWriter {
private StringBuilder buffer;
private int startOffset; // offset of first character that will be written
private int endOffset; // offset of last character that will be written.
@@ -1104,7 +1116,7 @@ public class StyledText extends Canvas {
/**
* Inserts the given string to the data at the specified offset.
* <p>
- * Do nothing if "offset" is < 0 or > getCharCount()
+ * Do nothing if "offset" is &lt; 0 or &gt; getCharCount()
* </p>
*
* @param string text to insert
@@ -1212,7 +1224,6 @@ public StyledText(Composite parent, int style) {
super.setForeground(getForeground());
super.setDragDetect(false);
Display display = getDisplay();
- fixedLineHeight = true;
if ((style & SWT.READ_ONLY) != 0) {
setEditable(false);
}
@@ -1238,8 +1249,7 @@ public StyledText(Composite parent, int style) {
int direction = BidiUtil.getKeyboardLanguage() == BidiUtil.KEYBOARD_BIDI ? SWT.RIGHT : SWT.LEFT;
if (direction == caretDirection) return;
if (getCaret() != defaultCaret) return;
- Point newCaretPos = getPointAtOffset(caretOffset);
- setCaretLocation(newCaretPos, direction);
+ setCaretLocations(Arrays.stream(caretOffsets).mapToObj(this::getPointAtOffset).toArray(Point[]::new), direction);
};
BidiUtil.addLanguageListener(this, runnable);
}
@@ -1301,7 +1311,7 @@ public void addBidiSegmentListener(BidiSegmentListener listener) {
if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
addListener(ST.LineGetSegments, new StyledTextListener(listener));
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -1365,7 +1375,7 @@ public void addLineStyleListener(LineStyleListener listener) {
renderer.clearLineStyle(0, content.getLineCount());
}
addListener(ST.LineGetStyle, new StyledTextListener(listener));
- setCaretLocation();
+ setCaretLocations();
}
/**
* Adds a modify listener. A Modify event is sent by the widget when the widget text
@@ -1413,7 +1423,7 @@ public void addPaintObjectListener(PaintObjectListener listener) {
* user changes the selection.
* <p>
* When <code>widgetSelected</code> is called, the event x and y fields contain
- * the start and end caret indices of the selection. The selection values returned are visual
+ * the start and end caret indices of the selection[0]. The selection values returned are visual
* (i.e., x will always always be &lt;= y).
* No event is sent when the caret is moved while the selection length is 0.
* </p><p>
@@ -1561,6 +1571,7 @@ void calculateTopIndex(int delta) {
if (topIndex > 0) {
if (clientAreaHeight > 0) {
int bottomPixel = getVerticalScrollOffset() + clientAreaHeight;
+ topIndexY = getLinePixel(topIndex);
int fullLineTopPixel = topIndex * verticalIncrement;
int fullLineVisibleHeight = bottomPixel - fullLineTopPixel;
// set top index to partially visible line if no line fully fits in
@@ -1580,30 +1591,30 @@ void calculateTopIndex(int delta) {
int lineCount = content.getLineCount();
while (lineIndex < lineCount) {
if (delta <= 0) break;
- delta -= renderer.getLineHeight(lineIndex++);
+ delta -= renderer.getCachedLineHeight(lineIndex++);
}
- if (lineIndex < lineCount && -delta + renderer.getLineHeight(lineIndex) <= clientAreaHeight - topMargin - bottomMargin) {
+ if (lineIndex < lineCount && -delta + renderer.getCachedLineHeight(lineIndex) <= clientAreaHeight - topMargin - bottomMargin) {
topIndex = lineIndex;
topIndexY = -delta;
} else {
topIndex = lineIndex - 1;
- topIndexY = -renderer.getLineHeight(topIndex) - delta;
+ topIndexY = -renderer.getCachedLineHeight(topIndex) - delta;
}
} else {
delta -= topIndexY;
int lineIndex = topIndex;
while (lineIndex > 0) {
- int lineHeight = renderer.getLineHeight(lineIndex - 1);
+ int lineHeight = renderer.getCachedLineHeight(lineIndex - 1);
if (delta + lineHeight > 0) break;
delta += lineHeight;
lineIndex--;
}
- if (lineIndex == 0 || -delta + renderer.getLineHeight(lineIndex) <= clientAreaHeight - topMargin - bottomMargin) {
+ if (lineIndex == 0 || -delta + renderer.getCachedLineHeight(lineIndex) <= clientAreaHeight - topMargin - bottomMargin) {
topIndex = lineIndex;
topIndexY = - delta;
} else {
topIndex = lineIndex - 1;
- topIndexY = - renderer.getLineHeight(topIndex) - delta;
+ topIndexY = - renderer.getCachedLineHeight(topIndex) - delta;
}
}
}
@@ -1692,8 +1703,8 @@ void clearBlockSelection(boolean reset, boolean sendEvent) {
* @param sendEvent a Selection event is sent when set to true and when the selection is actually reset.
*/
void clearSelection(boolean sendEvent) {
- int selectionStart = selection.x;
- int selectionEnd = selection.y;
+ int selectionStart = selection[0].x;
+ int selectionEnd = selection[0].y;
resetSelection();
// redraw old selection, if any
if (selectionEnd - selectionStart > 0) {
@@ -1800,10 +1811,25 @@ boolean copySelection(int type) {
clipboard.setContents(data, types, type);
return true;
}
+ } else if (getSelectionRanges().length > 2) {
+ StringBuilder text = new StringBuilder();
+ int[] ranges = getSelectionRanges();
+ for (int i = 0; i < ranges.length; i += 2) {
+ int offset = ranges[i];
+ int length = ranges[i + 1];
+ text.append(length == 0 ? "" : getText(offset, offset + length - 1));
+ text.append(PlatformLineDelimiter);
+ }
+ text.delete(text.length() - PlatformLineDelimiter.length(), text.length());
+ if (text.length() > 0) {
+ //TODO RTF support
+ clipboard.setContents(new Object[]{text.toString()}, new Transfer[]{TextTransfer.getInstance()}, type);
+ return true;
+ }
} else {
- int length = selection.y - selection.x;
+ int length = selection[0].y - selection[0].x;
if (length > 0) {
- setClipboardContent(selection.x, length, type);
+ setClipboardContent(selection[0].x, length, type);
return true;
}
}
@@ -1826,7 +1852,7 @@ boolean copySelection(int type) {
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
- *
+ *R
* @see #getLineAlignment(int)
*
* @since 3.2
@@ -1965,9 +1991,9 @@ boolean checkDragDetect(Event event) {
return dragDetect(event);
}
} else {
- if (selection.x == selection.y) return false;
+ if (selection[0].x == selection[0].y) return false;
int offset = getOffsetAtPoint(event.x, event.y, null, true);
- if (selection.x <= offset && offset < selection.y) {
+ if (selection[0].x <= offset && offset < selection[0].y) {
return dragDetect(event);
}
@@ -2128,7 +2154,7 @@ public void cut() {
* Otherwise, we've moved back into the widget so end autoscrolling.
*/
void doAutoScroll(Event event) {
- int caretLine = getCaretLine();
+ int caretLine = getFirstCaretLine();
if (event.y > clientAreaHeight - bottomMargin && caretLine != content.getLineCount() - 1) {
doAutoScroll(SWT.DOWN, event.y - (clientAreaHeight - bottomMargin));
} else if (event.y < topMargin && caretLine != 0) {
@@ -2278,38 +2304,46 @@ void doAutoScroll(int direction, int distance) {
void doBackspace() {
Event event = new Event();
event.text = "";
- if (selection.x != selection.y) {
- event.start = selection.x;
- event.end = selection.y;
- sendKeyEvent(event);
- } else if (caretOffset > 0) {
- int lineIndex = content.getLineAtOffset(caretOffset);
- int lineOffset = content.getOffsetAtLine(lineIndex);
- if (caretOffset == lineOffset) {
- lineOffset = content.getOffsetAtLine(lineIndex - 1);
- event.start = lineOffset + content.getLine(lineIndex - 1).length();
- event.end = caretOffset;
- } else {
- boolean isSurrogate = false;
- String lineText = content.getLine(lineIndex);
- char ch = lineText.charAt(caretOffset - lineOffset - 1);
- if (0xDC00 <= ch && ch <= 0xDFFF) {
- if (caretOffset - lineOffset - 2 >= 0) {
- ch = lineText.charAt(caretOffset - lineOffset - 2);
- isSurrogate = 0xD800 <= ch && ch <= 0xDBFF;
+ if (Arrays.stream(selection).anyMatch(p -> p.x != p.y)) { // at least one range to delete
+ for (int i = selection.length - 1; i >= 0; i--) { // from bottom to top to avoid moving ranges
+ Point sel = selection[i];
+ event.start = sel.x;
+ event.end = sel.y;
+ sendKeyEvent(event);
+ }
+ } else {
+ for (int i = caretOffsets.length - 1; i >= 0; i--) { // reverse loop, process from bottom to top
+ int caretOffset = caretOffsets[i];
+ if (caretOffset > 0) {
+ int lineIndex = content.getLineAtOffset(caretOffset);
+ int lineOffset = content.getOffsetAtLine(lineIndex);
+ if (caretOffset == lineOffset) {
+ lineOffset = content.getOffsetAtLine(lineIndex - 1);
+ event.start = lineOffset + content.getLine(lineIndex - 1).length();
+ event.end = caretOffset;
+ } else {
+ boolean isSurrogate = false;
+ String lineText = content.getLine(lineIndex);
+ char ch = lineText.charAt(caretOffset - lineOffset - 1);
+ if (0xDC00 <= ch && ch <= 0xDFFF) {
+ if (caretOffset - lineOffset - 2 >= 0) {
+ ch = lineText.charAt(caretOffset - lineOffset - 2);
+ isSurrogate = 0xD800 <= ch && ch <= 0xDBFF;
+ }
+ }
+ TextLayout layout = renderer.getTextLayout(lineIndex);
+ int start = layout.getPreviousOffset(caretOffset - lineOffset, isSurrogate ? SWT.MOVEMENT_CLUSTER : SWT.MOVEMENT_CHAR);
+ renderer.disposeTextLayout(layout);
+ event.start = start + lineOffset;
+ event.end = caretOffset;
}
+ sendKeyEvent(event);
}
- TextLayout layout = renderer.getTextLayout(lineIndex);
- int start = layout.getPreviousOffset(caretOffset - lineOffset, isSurrogate ? SWT.MOVEMENT_CLUSTER : SWT.MOVEMENT_CHAR);
- renderer.disposeTextLayout(layout);
- event.start = start + lineOffset;
- event.end = caretOffset;
}
- sendKeyEvent(event);
}
}
void doBlockColumn(boolean next) {
- if (blockXLocation == -1) setBlockSelectionOffset(caretOffset, false);
+ if (blockXLocation == -1) setBlockSelectionOffset(caretOffsets[0], false);
int x = blockXLocation - horizontalScrollOffset;
int y = blockYLocation - getVerticalScrollOffset();
int[] trailing = new int[1];
@@ -2338,13 +2372,13 @@ void doBlockColumn(boolean next) {
}
}
void doBlockContentStartEnd(boolean end) {
- if (blockXLocation == -1) setBlockSelectionOffset(caretOffset, false);
+ if (blockXLocation == -1) setBlockSelectionOffset(caretOffsets[0], false);
int offset = end ? content.getCharCount() : 0;
setBlockSelectionOffset(offset, true);
showCaret();
}
void doBlockWord(boolean next) {
- if (blockXLocation == -1) setBlockSelectionOffset(caretOffset, false);
+ if (blockXLocation == -1) setBlockSelectionOffset(caretOffsets[0], false);
int x = blockXLocation - horizontalScrollOffset;
int y = blockYLocation - getVerticalScrollOffset();
int[] trailing = new int[1];
@@ -2380,7 +2414,7 @@ void doBlockWord(boolean next) {
}
}
void doBlockLineVertical(boolean up) {
- if (blockXLocation == -1) setBlockSelectionOffset(caretOffset, false);
+ if (blockXLocation == -1) setBlockSelectionOffset(caretOffsets[0], false);
int y = blockYLocation - getVerticalScrollOffset();
int lineIndex = getLineIndex(y);
if (up) {
@@ -2404,7 +2438,7 @@ void doBlockLineVertical(boolean up) {
}
}
void doBlockLineHorizontal(boolean end) {
- if (blockXLocation == -1) setBlockSelectionOffset(caretOffset, false);
+ if (blockXLocation == -1) setBlockSelectionOffset(caretOffsets[0], false);
int x = blockXLocation - horizontalScrollOffset;
int y = blockYLocation - getVerticalScrollOffset();
int lineIndex = getLineIndex(y);
@@ -2441,15 +2475,15 @@ void doBlockLineHorizontal(boolean end) {
}
}
void doBlockSelection(boolean sendEvent) {
- if (caretOffset > selectionAnchor) {
- selection.x = selectionAnchor;
- selection.y = caretOffset;
+ if (caretOffsets[0] > selectionAnchors[0]) {
+ selection[0].x = selectionAnchors[0];
+ selection[0].y = caretOffsets[0];
} else {
- selection.x = caretOffset;
- selection.y = selectionAnchor;
+ selection[0].x = caretOffsets[0];
+ selection[0].y = selectionAnchors[0];
}
updateCaretVisibility();
- setCaretLocation();
+ setCaretLocations();
super.redraw();
if (sendEvent) {
sendSelectionEvent();
@@ -2466,42 +2500,45 @@ void doBlockSelection(boolean sendEvent) {
*
* @param key the character typed by the user
*/
-void doContent(char key) {
+void doContent(final char key) {
if (blockSelection && blockXLocation != -1) {
insertBlockSelectionText(key, SWT.NULL);
return;
}
- Event event = new Event();
- event.start = selection.x;
- event.end = selection.y;
- // replace a CR line break with the widget line break
- // CR does not make sense on Windows since most (all?) applications
- // don't recognize CR as a line break.
- if (key == SWT.CR || key == SWT.LF) {
- if (!isSingleLine()) {
- event.text = getLineDelimiter();
- }
- } else if (selection.x == selection.y && overwrite && key != TAB) {
- // no selection and overwrite mode is on and the typed key is not a
- // tab character (tabs are always inserted without overwriting)?
- int lineIndex = content.getLineAtOffset(event.end);
- int lineOffset = content.getOffsetAtLine(lineIndex);
- String line = content.getLine(lineIndex);
- // replace character at caret offset if the caret is not at the
- // end of the line
- if (event.end < lineOffset + line.length()) {
- event.end++;
+ for (int i = selection.length - 1; i >= 0; i--) {
+ Point sel = selection[i];
+ Event event = new Event();
+ event.start = sel.x;
+ event.end = sel.y;
+ // replace a CR line break with the widget line break
+ // CR does not make sense on Windows since most (all?) applications
+ // don't recognize CR as a line break.
+ if (key == SWT.CR || key == SWT.LF) {
+ if (!isSingleLine()) {
+ event.text = getLineDelimiter();
+ }
+ } else if (sel.x == sel.y && overwrite && key != TAB) {
+ // no selection and overwrite mode is on and the typed key is not a
+ // tab character (tabs are always inserted without overwriting)?
+ int lineIndex = content.getLineAtOffset(event.end);
+ int lineOffset = content.getOffsetAtLine(lineIndex);
+ String line = content.getLine(lineIndex);
+ // replace character at caret offset if the caret is not at the
+ // end of the line
+ if (event.end < lineOffset + line.length()) {
+ event.end++;
+ }
+ event.text = new String(new char[] {key});
+ } else {
+ event.text = new String(new char[] {key});
}
- event.text = new String(new char[] {key});
- } else {
- event.text = new String(new char[] {key});
- }
- if (event.text != null) {
- if (textLimit > 0 && content.getCharCount() - (event.end - event.start) >= textLimit) {
- return;
+ if (event.text != null) {
+ if (textLimit > 0 && content.getCharCount() - (event.end - event.start) >= textLimit) {
+ return;
+ }
+ sendKeyEvent(event);
}
- sendKeyEvent(event);
}
}
/**
@@ -2514,7 +2551,7 @@ void doContentEnd() {
doLineEnd();
} else {
int length = content.getCharCount();
- setCaretOffset(length, SWT.DEFAULT);
+ setCaretOffsets(new int[] {length}, SWT.DEFAULT);
showCaret();
}
}
@@ -2522,7 +2559,7 @@ void doContentEnd() {
* Moves the caret in front of the first character of the widget content.
*/
void doContentStart() {
- setCaretOffset(0, SWT.DEFAULT);
+ setCaretOffsets(new int[] {0}, SWT.DEFAULT);
showCaret();
}
/**
@@ -2533,8 +2570,8 @@ void doContentStart() {
* @see #doSelectionCursorPrevious
*/
void doCursorPrevious() {
- if (selection.y - selection.x > 0) {
- setCaretOffset(selection.x, OFFSET_LEADING);
+ if (Arrays.stream(selection).anyMatch(p -> p.x != p.y)) {
+ setCaretOffsets(Arrays.stream(selection).mapToInt(sel -> sel.x).toArray(), OFFSET_LEADING);
showCaret();
} else {
doSelectionCursorPrevious();
@@ -2548,8 +2585,8 @@ void doCursorPrevious() {
* @see #doSelectionCursorNext
*/
void doCursorNext() {
- if (selection.y - selection.x > 0) {
- setCaretOffset(selection.y, PREVIOUS_OFFSET_TRAILING);
+ if (Arrays.stream(selection).anyMatch(p -> p.x != p.y)) {
+ setCaretOffsets(Arrays.stream(selection).mapToInt(sel -> sel.y).toArray(), PREVIOUS_OFFSET_TRAILING);
showCaret();
} else {
doSelectionCursorNext();
@@ -2561,54 +2598,67 @@ void doCursorNext() {
void doDelete() {
Event event = new Event();
event.text = "";
- if (selection.x != selection.y) {
- event.start = selection.x;
- event.end = selection.y;
- sendKeyEvent(event);
- } else if (caretOffset < content.getCharCount()) {
- int line = content.getLineAtOffset(caretOffset);
- int lineOffset = content.getOffsetAtLine(line);
- int lineLength = content.getLine(line).length();
- if (caretOffset == lineOffset + lineLength) {
- event.start = caretOffset;
- event.end = content.getOffsetAtLine(line + 1);
- } else {
- event.start = caretOffset;
- event.end = getClusterNext(caretOffset, line);
+ if (Arrays.stream(selection).anyMatch(sel -> sel.x != sel.y)) {
+ for (Point sel : selection) {
+ event.start = sel.x;
+ event.end = sel.y;
+ sendKeyEvent(event);
+ }
+ } else {
+ for (int i = caretOffsets.length - 1; i >= 0; i--) {
+ int caretOffset = caretOffsets[i];
+ if (caretOffset < content.getCharCount()) {
+ int line = content.getLineAtOffset(caretOffset);
+ int lineOffset = content.getOffsetAtLine(line);
+ int lineLength = content.getLine(line).length();
+ if (caretOffset == lineOffset + lineLength) {
+ event.start = caretOffset;
+ event.end = content.getOffsetAtLine(line + 1);
+ } else {
+ event.start = caretOffset;
+ event.end = getClusterNext(caretOffset, line);
+ }
+ sendKeyEvent(event);
+ }
}
- sendKeyEvent(event);
}
}
/**
* Deletes the next word.
*/
void doDeleteWordNext() {
- if (selection.x != selection.y) {
+ if (Arrays.stream(selection).anyMatch(sel -> sel.x != sel.y)) {
// if a selection exists, treat the as if
// only the delete key was pressed
doDelete();
} else {
- Event event = new Event();
- event.text = "";
- event.start = caretOffset;
- event.end = getWordNext(caretOffset, SWT.MOVEMENT_WORD);
- sendKeyEvent(event);
+ for (int i = caretOffsets.length - 1; i >= 0; i--) {
+ int caretOffset = caretOffsets[i];
+ Event event = new Event();
+ event.text = "";
+ event.start = caretOffset;
+ event.end = getWordNext(caretOffset, SWT.MOVEMENT_WORD);
+ sendKeyEvent(event);
+ }
}
}
/**
* Deletes the previous word.
*/
void doDeleteWordPrevious() {
- if (selection.x != selection.y) {
+ if (Arrays.stream(selection).anyMatch(sel -> sel.x != sel.y)) {
// if a selection exists, treat as if
// only the backspace key was pressed
doBackspace();
} else {
- Event event = new Event();
- event.text = "";
- event.start = getWordPrevious(caretOffset, SWT.MOVEMENT_WORD);
- event.end = caretOffset;
- sendKeyEvent(event);
+ for (int i = caretOffsets.length - 1; i >= 0; i--) {
+ int caretOffset = caretOffsets[i];
+ Event event = new Event();
+ event.text = "";
+ event.start = getWordPrevious(caretOffset, SWT.MOVEMENT_WORD);
+ event.end = caretOffset;
+ sendKeyEvent(event);
+ }
}
}
/**
@@ -2618,35 +2668,41 @@ void doDeleteWordPrevious() {
* the end of the text if the caret already is on the last line.
*/
void doLineDown(boolean select) {
- int caretLine = getCaretLine();
+ int[] newCaretOffsets = new int[caretOffsets.length];
int lineCount = content.getLineCount();
- int y = 0;
- boolean lastLine = false;
- if (isWordWrap()) {
- int lineOffset = content.getOffsetAtLine(caretLine);
- int offsetInLine = caretOffset - lineOffset;
- TextLayout layout = renderer.getTextLayout(caretLine);
- int lineIndex = getVisualLineIndex(layout, offsetInLine);
- int layoutLineCount = layout.getLineCount();
- if (lineIndex == layoutLineCount - 1) {
+ int[] alignment = new int[1];
+ for (int i = 0; i < caretOffsets.length; i++) {
+ int caretOffset = caretOffsets[i];
+ int caretLine = content.getLineAtOffset(caretOffset);
+ int x = caretOffsets.length == 1 ? columnX : getPointAtOffset(caretOffset).x;
+ int y = 0;
+ boolean lastLine = false;
+ if (isWordWrap()) {
+ int lineOffset = content.getOffsetAtLine(caretLine);
+ int offsetInLine = caretOffset - lineOffset;
+ TextLayout layout = renderer.getTextLayout(caretLine);
+ int lineIndex = getVisualLineIndex(layout, offsetInLine);
+ int layoutLineCount = layout.getLineCount();
+ if (lineIndex == layoutLineCount - 1) {
+ lastLine = caretLine == lineCount - 1;
+ caretLine++;
+ } else {
+ y = layout.getLineBounds(lineIndex + 1).y;
+ y++; // bug 485722: workaround for fractional line heights
+ }
+ renderer.disposeTextLayout(layout);
+ } else {
lastLine = caretLine == lineCount - 1;
caretLine++;
+ }
+ if (lastLine) {
+ newCaretOffsets[i] = content.getCharCount();
} else {
- y = layout.getLineBounds(lineIndex + 1).y;
- y++; // bug 485722: workaround for fractional line heights
+ newCaretOffsets[i] = getOffsetAtPoint(x, y, caretLine, alignment);
}
- renderer.disposeTextLayout(layout);
- } else {
- lastLine = caretLine == lineCount - 1;
- caretLine++;
- }
- if (lastLine) {
- setCaretOffset(content.getCharCount(), SWT.DEFAULT);
- } else {
- int[] alignment = new int[1];
- int offset = getOffsetAtPoint(columnX, y, caretLine, alignment);
- setCaretOffset(offset, alignment[0]);
}
+ boolean hitLastLine = content.getLineAtOffset(newCaretOffsets[newCaretOffsets.length - 1]) == lineCount - 1;
+ setCaretOffsets(newCaretOffsets, hitLastLine ? SWT.DEFAULT : alignment[0]);
int oldColumnX = columnX;
int oldHScrollOffset = horizontalScrollOffset;
if (select) {
@@ -2663,38 +2719,48 @@ void doLineDown(boolean select) {
* Moves the caret to the end of the line.
*/
void doLineEnd() {
- int caretLine = getCaretLine();
- int lineOffset = content.getOffsetAtLine(caretLine);
- int lineEndOffset;
- if (isWordWrap()) {
- TextLayout layout = renderer.getTextLayout(caretLine);
- int offsetInLine = caretOffset - lineOffset;
- int lineIndex = getVisualLineIndex(layout, offsetInLine);
- int[] offsets = layout.getLineOffsets();
- lineEndOffset = lineOffset + offsets[lineIndex + 1];
- renderer.disposeTextLayout(layout);
- } else {
- int lineLength = content.getLine(caretLine).length();
- lineEndOffset = lineOffset + lineLength;
+ int[] newOffsets = new int[caretOffsets.length];
+ for (int i = 0; i < caretOffsets.length; i++) {
+ int caretOffset = caretOffsets[i];
+ int caretLine = content.getLineAtOffset(caretOffset);
+ int lineOffset = content.getOffsetAtLine(caretLine);
+ int lineEndOffset;
+ if (isWordWrap()) {
+ TextLayout layout = renderer.getTextLayout(caretLine);
+ int offsetInLine = caretOffset - lineOffset;
+ int lineIndex = getVisualLineIndex(layout, offsetInLine);
+ int[] offsets = layout.getLineOffsets();
+ lineEndOffset = lineOffset + offsets[lineIndex + 1];
+ renderer.disposeTextLayout(layout);
+ } else {
+ int lineLength = content.getLine(caretLine).length();
+ lineEndOffset = lineOffset + lineLength;
+ }
+ newOffsets[i] = lineEndOffset;
}
- setCaretOffset(lineEndOffset, PREVIOUS_OFFSET_TRAILING);
+ setCaretOffsets(newOffsets, PREVIOUS_OFFSET_TRAILING);
showCaret();
}
/**
* Moves the caret to the beginning of the line.
*/
void doLineStart() {
- int caretLine = getCaretLine();
- int lineOffset = content.getOffsetAtLine(caretLine);
- if (isWordWrap()) {
- TextLayout layout = renderer.getTextLayout(caretLine);
- int offsetInLine = caretOffset - lineOffset;
- int lineIndex = getVisualLineIndex(layout, offsetInLine);
- int[] offsets = layout.getLineOffsets();
- lineOffset += offsets[lineIndex];
- renderer.disposeTextLayout(layout);
+ int[] newCaretOffsets = new int[caretOffsets.length];
+ for (int i = 0; i < caretOffsets.length; i++) {
+ int caretOffset = caretOffsets[i];
+ int caretLine = content.getLineAtOffset(caretOffset);
+ int lineOffset = content.getOffsetAtLine(caretLine);
+ if (isWordWrap()) {
+ TextLayout layout = renderer.getTextLayout(caretLine);
+ int offsetInLine = caretOffset - lineOffset;
+ int lineIndex = getVisualLineIndex(layout, offsetInLine);
+ int[] offsets = layout.getLineOffsets();
+ lineOffset += offsets[lineIndex];
+ renderer.disposeTextLayout(layout);
+ }
+ newCaretOffsets[i] = lineOffset;
}
- setCaretOffset(lineOffset, OFFSET_LEADING);
+ setCaretOffsets(newCaretOffsets, OFFSET_LEADING);
showCaret();
}
/**
@@ -2704,36 +2770,42 @@ void doLineStart() {
* the beginning of the document if it is already on the first line.
*/
void doLineUp(boolean select) {
- int caretLine = getCaretLine(), y = 0;
- boolean firstLine = false;
- if (isWordWrap()) {
- int lineOffset = content.getOffsetAtLine(caretLine);
- int offsetInLine = caretOffset - lineOffset;
- TextLayout layout = renderer.getTextLayout(caretLine);
- int lineIndex = getVisualLineIndex(layout, offsetInLine);
- if (lineIndex == 0) {
- firstLine = caretLine == 0;
- if (!firstLine) {
- caretLine--;
- y = renderer.getLineHeight(caretLine) - 1;
- y--; // bug 485722: workaround for fractional line heights
+ int[] newCaretOffsets = new int[caretOffsets.length];
+ int[] alignment = new int[1];
+ for (int i = 0; i < caretOffsets.length; i++) {
+ int caretOffset = caretOffsets[i];
+ int caretLine = content.getLineAtOffset(caretOffset);
+ int x = caretOffsets.length == 1 ? columnX : getPointAtOffset(caretOffset).x;
+ int y = 0;
+ boolean firstLine = false;
+ if (isWordWrap()) {
+ int lineOffset = content.getOffsetAtLine(caretLine);
+ int offsetInLine = caretOffset - lineOffset;
+ TextLayout layout = renderer.getTextLayout(caretLine);
+ int lineIndex = getVisualLineIndex(layout, offsetInLine);
+ if (lineIndex == 0) {
+ firstLine = caretLine == 0;
+ if (!firstLine) {
+ caretLine--;
+ y = renderer.getLineHeight(caretLine) - 1;
+ y--; // bug 485722: workaround for fractional line heights
+ }
+ } else {
+ y = layout.getLineBounds(lineIndex - 1).y;
+ y++; // bug 485722: workaround for fractional line heights
}
+ renderer.disposeTextLayout(layout);
+ } else {
+ firstLine = caretLine == 0;
+ caretLine--;
+ }
+ if (firstLine) {
+ newCaretOffsets[i] = 0;
} else {
- y = layout.getLineBounds(lineIndex - 1).y;
- y++; // bug 485722: workaround for fractional line heights
+ newCaretOffsets[i] = getOffsetAtPoint(x, y, caretLine, alignment);
}
- renderer.disposeTextLayout(layout);
- } else {
- firstLine = caretLine == 0;
- caretLine--;
- }
- if (firstLine) {
- setCaretOffset(0, SWT.DEFAULT);
- } else {
- int[] alignment = new int[1];
- int offset = getOffsetAtPoint(columnX, y, caretLine, alignment);
- setCaretOffset(offset, alignment[0]);
}
+ setCaretOffsets(newCaretOffsets, newCaretOffsets[0] == 0 ? SWT.DEFAULT : alignment[0]);
int oldColumnX = columnX;
int oldHScrollOffset = horizontalScrollOffset;
if (select) setMouseWordSelectionAnchor();
@@ -2807,7 +2879,7 @@ void doMouseLocationChange(int x, int y, boolean select) {
} else {
if (select) {
if (blockXLocation == -1) {
- setBlockSelectionOffset(caretOffset, false);
+ setBlockSelectionOffset(caretOffsets[0], false);
}
} else {
clearBlockSelection(true, false);
@@ -2849,14 +2921,14 @@ void doMouseLocationChange(int x, int y, boolean select) {
// a different line? If not the autoscroll selection
// could be incorrectly reset. Fixes 1GKM3XS
boolean vchange = 0 <= y && y < clientAreaHeight || newCaretLine == 0 || newCaretLine == content.getLineCount() - 1;
- boolean hchange = 0 <= x && x < clientAreaWidth || wordWrap || newCaretLine != content.getLineAtOffset(caretOffset);
- if (vchange && hchange && (newCaretOffset != caretOffset || newCaretAlignemnt != caretAlignment)) {
- setCaretOffset(newCaretOffset, newCaretAlignemnt);
+ boolean hchange = 0 <= x && x < clientAreaWidth || wordWrap || newCaretLine != content.getLineAtOffset(caretOffsets[0]);
+ if (vchange && hchange && (newCaretOffset != caretOffsets[0] || newCaretAlignemnt != caretAlignment)) {
+ setCaretOffsets(new int[] {newCaretOffset}, newCaretAlignemnt);
if (select) doMouseSelection();
showCaret();
}
if (!select) {
- setCaretOffset(newCaretOffset, newCaretAlignemnt);
+ setCaretOffsets(new int[] {newCaretOffset}, newCaretAlignemnt);
clearSelection(true);
}
}
@@ -2864,9 +2936,9 @@ void doMouseLocationChange(int x, int y, boolean select) {
* Updates the selection based on the caret position
*/
void doMouseSelection() {
- if (caretOffset <= selection.x ||
- (caretOffset > selection.x &&
- caretOffset < selection.y && selectionAnchor == selection.x)) {
+ if (caretOffsets[0] <= selection[0].x ||
+ (caretOffsets[0] > selection[0].x &&
+ caretOffsets[0] < selection[0].y && selectionAnchors[0] == selection[0].x)) {
doSelection(ST.COLUMN_PREVIOUS);
} else {
doSelection(ST.COLUMN_NEXT);
@@ -2890,14 +2962,14 @@ int doMouseWordSelect(int x, int newCaretOffset, int line) {
// base double click. Always do this here (and don't rely on doAutoScroll)
// because auto scroll only does not cover all possible mouse selections
// (e.g., mouse x < 0 && mouse y > caret line y)
- if (newCaretOffset < selectionAnchor && selectionAnchor == selection.x) {
- selectionAnchor = doubleClickSelection.y;
- } else if (newCaretOffset > selectionAnchor && selectionAnchor == selection.y) {
- selectionAnchor = doubleClickSelection.x;
+ if (newCaretOffset < selectionAnchors[0] && selectionAnchors[0] == selection[0].x) {
+ selectionAnchors[0] = doubleClickSelection.y;
+ } else if (newCaretOffset > selectionAnchors[0] && selectionAnchors[0] == selection[0].y) {
+ selectionAnchors[0] = doubleClickSelection.x;
}
if (0 <= x && x < clientAreaWidth) {
boolean wordSelect = (clickCount & 1) == 0;
- if (caretOffset == selection.x) {
+ if (caretOffsets[0] == selection[0].x) {
if (wordSelect) {
newCaretOffset = getWordPrevious(newCaretOffset, SWT.MOVEMENT_WORD_START);
} else {
@@ -2935,7 +3007,7 @@ void doPageDown(boolean select, int height) {
int oldHScrollOffset = horizontalScrollOffset;
if (isFixedLineHeight()) {
int lineCount = content.getLineCount();
- int caretLine = getCaretLine();
+ int caretLine = getFirstCaretLine();
if (caretLine < lineCount - 1) {
int lineHeight = renderer.getLineHeight();
int lines = (height == -1 ? clientAreaHeight : height) / lineHeight;
@@ -2945,7 +3017,7 @@ void doPageDown(boolean select, int height) {
scrollLines = Math.max(1, scrollLines);
int[] alignment = new int[1];
int offset = getOffsetAtPoint(columnX, getLinePixel(caretLine + scrollLines), alignment);
- setCaretOffset(offset, alignment[0]);
+ setCaretOffsets(new int[] {offset}, alignment[0]);
if (select) {
doSelection(ST.COLUMN_NEXT);
}
@@ -2963,7 +3035,6 @@ void doPageDown(boolean select, int height) {
}
} else {
int lineCount = content.getLineCount();
- int caretLine = getCaretLine();
int lineIndex, lineHeight;
if (height == -1) {
lineIndex = getPartialBottomIndex();
@@ -3006,13 +3077,16 @@ void doPageDown(boolean select, int height) {
}
int caretHeight = height;
if (isWordWrap()) {
- TextLayout layout = renderer.getTextLayout(caretLine);
- int offsetInLine = caretOffset - content.getOffsetAtLine(caretLine);
- lineIndex = getVisualLineIndex(layout, offsetInLine);
- caretHeight += layout.getLineBounds(lineIndex).y;
- renderer.disposeTextLayout(layout);
+ for (int caretOffset : caretOffsets) {
+ int caretLine = content.getLineAtOffset(caretOffset);
+ TextLayout layout = renderer.getTextLayout(caretLine);
+ int offsetInLine = caretOffset - content.getOffsetAtLine(caretLine);
+ lineIndex = getVisualLineIndex(layout, offsetInLine);
+ caretHeight += layout.getLineBounds(lineIndex).y;
+ renderer.disposeTextLayout(layout);
+ }
}
- lineIndex = caretLine;
+ lineIndex = getFirstCaretLine();
lineHeight = renderer.getLineHeight(lineIndex);
while (caretHeight - lineHeight >= 0 && lineIndex < lineCount - 1) {
caretHeight -= lineHeight;
@@ -3020,11 +3094,11 @@ void doPageDown(boolean select, int height) {
}
int[] alignment = new int[1];
int offset = getOffsetAtPoint(columnX, caretHeight, lineIndex, alignment);
- setCaretOffset(offset, alignment[0]);
+ setCaretOffsets(new int[] {offset}, alignment[0]);
if (select) doSelection(ST.COLUMN_NEXT);
height = getAvailableHeightBellow(height);
scrollVertical(height, true);
- if (height == 0) setCaretLocation();
+ if (height == 0) setCaretLocations();
}
showCaret();
int hScrollChange = oldHScrollOffset - horizontalScrollOffset;
@@ -3037,7 +3111,7 @@ void doPageEnd() {
// go to end of line if in single line mode. fixes 5673
if (isSingleLine()) {
doLineEnd();
- } else {
+ } else if (caretOffsets.length == 1) { // pageEnd doesn't make sense with multi-carets
int bottomOffset;
if (isWordWrap()) {
int lineIndex = getPartialBottomIndex();
@@ -3059,8 +3133,8 @@ void doPageEnd() {
int lineIndex = getBottomIndex();
bottomOffset = content.getOffsetAtLine(lineIndex) + content.getLine(lineIndex).length();
}
- if (caretOffset < bottomOffset) {
- setCaretOffset(bottomOffset, OFFSET_LEADING);
+ if (caretOffsets[0] < bottomOffset) {
+ setCaretOffsets(new int[] {bottomOffset}, OFFSET_LEADING);
showCaret();
}
}
@@ -3096,8 +3170,8 @@ void doPageStart() {
} else {
topOffset = content.getOffsetAtLine(topIndex);
}
- if (caretOffset > topOffset) {
- setCaretOffset(topOffset, OFFSET_LEADING);
+ if (caretOffsets[0] > topOffset) {
+ setCaretOffsets(new int[] {topOffset}, OFFSET_LEADING);
showCaret();
}
}
@@ -3114,7 +3188,7 @@ void doPageUp(boolean select, int height) {
int oldHScrollOffset = horizontalScrollOffset;
int oldColumnX = columnX;
if (isFixedLineHeight()) {
- int caretLine = getCaretLine();
+ int caretLine = getFirstCaretLine();
if (caretLine > 0) {
int lineHeight = renderer.getLineHeight();
int lines = (height == -1 ? clientAreaHeight : height) / lineHeight;
@@ -3122,7 +3196,7 @@ void doPageUp(boolean select, int height) {
caretLine -= scrollLines;
int[] alignment = new int[1];
int offset = getOffsetAtPoint(columnX, getLinePixel(caretLine), alignment);
- setCaretOffset(offset, alignment[0]);
+ setCaretOffsets(new int[] {offset}, alignment[0]);
if (select) {
doSelection(ST.COLUMN_PREVIOUS);
}
@@ -3133,7 +3207,6 @@ void doPageUp(boolean select, int height) {
}
}
} else {
- int caretLine = getCaretLine();
int lineHeight, lineIndex;
if (height == -1) {
if (topIndexY == 0) {
@@ -3183,13 +3256,16 @@ void doPageUp(boolean select, int height) {
}
int caretHeight = height;
if (isWordWrap()) {
- TextLayout layout = renderer.getTextLayout(caretLine);
- int offsetInLine = caretOffset - content.getOffsetAtLine(caretLine);
- lineIndex = getVisualLineIndex(layout, offsetInLine);
- caretHeight += layout.getBounds().height - layout.getLineBounds(lineIndex).y;
- renderer.disposeTextLayout(layout);
+ for (int caretOffset : caretOffsets) {
+ int caretLine = content.getLineAtOffset(caretOffset);
+ TextLayout layout = renderer.getTextLayout(caretLine);
+ int offsetInLine = caretOffset - content.getOffsetAtLine(caretLine);
+ lineIndex = getVisualLineIndex(layout, offsetInLine);
+ caretHeight += layout.getBounds().height - layout.getLineBounds(lineIndex).y;
+ renderer.disposeTextLayout(layout);
+ }
}
- lineIndex = caretLine;
+ lineIndex = getFirstCaretLine();
lineHeight = renderer.getLineHeight(lineIndex);
while (caretHeight - lineHeight >= 0 && lineIndex > 0) {
caretHeight -= lineHeight;
@@ -3198,11 +3274,11 @@ void doPageUp(boolean select, int height) {
lineHeight = renderer.getLineHeight(lineIndex);
int[] alignment = new int[1];
int offset = getOffsetAtPoint(columnX, lineHeight - caretHeight, lineIndex, alignment);
- setCaretOffset(offset, alignment[0]);
+ setCaretOffsets(new int[] {offset}, alignment[0]);
if (select) doSelection(ST.COLUMN_PREVIOUS);
height = getAvailableHeightAbove(height);
scrollVertical(-height, true);
- if (height == 0) setCaretLocation();
+ if (height == 0) setCaretLocations();
}
showCaret();
int hScrollChange = oldHScrollOffset - horizontalScrollOffset;
@@ -3212,48 +3288,80 @@ void doPageUp(boolean select, int height) {
* Updates the selection to extend to the current caret position.
*/
void doSelection(int direction) {
- int redrawStart = -1;
- int redrawEnd = -1;
- if (selectionAnchor == -1) {
- selectionAnchor = selection.x;
- }
- if (direction == ST.COLUMN_PREVIOUS) {
- if (caretOffset < selection.x) {
- // grow selection
- redrawEnd = selection.x;
- redrawStart = selection.x = caretOffset;
- // check if selection has reversed direction
- if (selection.y != selectionAnchor) {
- redrawEnd = selection.y;
- selection.y = selectionAnchor;
- }
- // test whether selection actually changed. Fixes 1G71EO1
- } else if (selectionAnchor == selection.x && caretOffset < selection.y) {
- // caret moved towards selection anchor (left side of selection).
- // shrink selection
- redrawEnd = selection.y;
- redrawStart = selection.y = caretOffset;
+ if (caretOffsets.length != selection.length) {
+ return;
+ }
+ if (selectionAnchors.length != selection.length) {
+ selectionAnchors = new int[selection.length];
+ Arrays.fill(selectionAnchors, -1);
+ }
+ boolean selectionChanged = false;
+ Point[] newSelection = Arrays.stream(selection).map(p -> new Point(p.x, p.y)).toArray(Point[]::new);
+ boolean[] caretAtBeginning = new boolean[newSelection.length];
+ for (int i = 0; i < caretOffsets.length; i++) {
+ int caretOffset = caretOffsets[i];
+ Point currentSelection = newSelection[i];
+ int selectionAnchor = selectionAnchors[i];
+ if (selectionAnchor == -1) {
+ selectionAnchor = selectionAnchors[i] = currentSelection.x;
+ }
+ int redrawStart = -1;
+ int redrawEnd = -1;
+ if (direction == ST.COLUMN_PREVIOUS) {
+ if (caretOffset < currentSelection.x) {
+ caretAtBeginning[i] = true;
+ // grow selection
+ redrawEnd = currentSelection.x;
+ redrawStart = currentSelection.x = caretOffset;
+ // check if selection has reversed direction
+ if (currentSelection.y != selectionAnchor) {
+ redrawEnd = currentSelection.y;
+ currentSelection.y = selectionAnchor;
+ }
+ // test whether selection actually changed. Fixes 1G71EO1
+ } else if (selectionAnchor == currentSelection.x && caretOffset < currentSelection.y) {
+ // caret moved towards selection anchor (left side of selection).
+ // shrink selection
+ redrawEnd = currentSelection.y;
+ redrawStart = currentSelection.y = caretOffset;
+ }
+ } else {
+ if (caretOffset > currentSelection.y) {
+ // grow selection
+ redrawStart = currentSelection.y;
+ redrawEnd = currentSelection.y = caretOffset;
+ // check if selection has reversed direction
+ if (currentSelection.x != selectionAnchor) {
+ redrawStart = currentSelection.x;
+ currentSelection.x = selectionAnchor;
+ }
+ // test whether selection actually changed. Fixes 1G71EO1
+ } else if (selectionAnchor == currentSelection.y && caretOffset > currentSelection.x) {
+ // caret moved towards selection anchor (right side of selection).
+ // shrink selection
+ caretAtBeginning[i] = true;
+ redrawStart = currentSelection.x;
+ redrawEnd = currentSelection.x = caretOffset;
+ }
}
- } else {
- if (caretOffset > selection.y) {
- // grow selection
- redrawStart = selection.y;
- redrawEnd = selection.y = caretOffset;
- // check if selection has reversed direction
- if (selection.x != selectionAnchor) {
- redrawStart = selection.x;
- selection.x = selectionAnchor;
- }
- // test whether selection actually changed. Fixes 1G71EO1
- } else if (selectionAnchor == selection.y && caretOffset > selection.x) {
- // caret moved towards selection anchor (right side of selection).
- // shrink selection
- redrawStart = selection.x;
- redrawEnd = selection.x = caretOffset;
- }
- }
- if (redrawStart != -1 && redrawEnd != -1) {
- internalRedrawRange(redrawStart, redrawEnd - redrawStart);
+ if (redrawStart != -1 && redrawEnd != -1) {
+ internalRedrawRange(redrawStart, redrawEnd - redrawStart);
+ selectionChanged = true;
+ }
+ }
+ if (selectionChanged) {
+ int[] regions = new int[newSelection.length * 2];
+ for (int i = 0; i < newSelection.length; i++) {
+ Point p = newSelection[i];
+ if (caretAtBeginning[i]) {
+ regions[2 * i] = p.y;
+ regions[2 * i + 1] = p.x - p.y;
+ } else {
+ regions[2 * i] = p.x;
+ regions[2 * i + 1] = p.y - p.x;
+ }
+ }
+ setSelection(regions, false, blockSelection);
sendSelectionEvent();
}
sendAccessibleTextCaretMoved();
@@ -3263,24 +3371,31 @@ void doSelection(int direction) {
* next line if the cursor is at the end of a line.
*/
void doSelectionCursorNext() {
- int caretLine = getCaretLine();
- int lineOffset = content.getOffsetAtLine(caretLine);
- int offsetInLine = caretOffset - lineOffset;
- int offset, alignment;
- if (offsetInLine < content.getLine(caretLine).length()) {
- TextLayout layout = renderer.getTextLayout(caretLine);
- offsetInLine = layout.getNextOffset(offsetInLine, SWT.MOVEMENT_CLUSTER);
- int lineStart = layout.getLineOffsets()[layout.getLineIndex(offsetInLine)];
- renderer.disposeTextLayout(layout);
- offset = offsetInLine + lineOffset;
- alignment = offsetInLine == lineStart ? OFFSET_LEADING : PREVIOUS_OFFSET_TRAILING;
- setCaretOffset(offset, alignment);
- showCaret();
- } else if (caretLine < content.getLineCount() - 1 && !isSingleLine()) {
- caretLine++;
- offset = content.getOffsetAtLine(caretLine);
- alignment = PREVIOUS_OFFSET_TRAILING;
- setCaretOffset(offset, alignment);
+ int[] newCarets = Arrays.copyOf(caretOffsets, caretOffsets.length);
+ int newAlignment = Integer.MIN_VALUE;
+ for (int i = 0; i < caretOffsets.length; i++) {
+ int caretOffset = caretOffsets[i];
+ int caretLine = content.getLineAtOffset(caretOffset);
+ int lineOffset = content.getOffsetAtLine(caretLine);
+ int offsetInLine = caretOffset - lineOffset;
+ int offset;
+ if (offsetInLine < content.getLine(caretLine).length()) {
+ TextLayout layout = renderer.getTextLayout(caretLine);
+ offsetInLine = layout.getNextOffset(offsetInLine, SWT.MOVEMENT_CLUSTER);
+ int lineStart = layout.getLineOffsets()[layout.getLineIndex(offsetInLine)];
+ renderer.disposeTextLayout(layout);
+ offset = offsetInLine + lineOffset;
+ newAlignment = offsetInLine == lineStart ? OFFSET_LEADING : PREVIOUS_OFFSET_TRAILING;
+ newCarets[i] = offset;
+ } else if (caretLine < content.getLineCount() - 1 && !isSingleLine()) {
+ caretLine++;
+ offset = content.getOffsetAtLine(caretLine);
+ newAlignment = PREVIOUS_OFFSET_TRAILING;
+ newCarets[i] = offset;
+ }
+ }
+ if (newAlignment > Integer.MIN_VALUE) {
+ setCaretOffsets(newCarets, newAlignment);
showCaret();
}
}
@@ -3289,18 +3404,22 @@ void doSelectionCursorNext() {
* line if the cursor is at the beginning of a line.
*/
void doSelectionCursorPrevious() {
- int caretLine = getCaretLine();
- int lineOffset = content.getOffsetAtLine(caretLine);
- int offsetInLine = caretOffset - lineOffset;
- if (offsetInLine > 0) {
- int offset = getClusterPrevious(caretOffset, caretLine);
- setCaretOffset(offset, OFFSET_LEADING);
- showCaret();
- } else if (caretLine > 0) {
- caretLine--;
- lineOffset = content.getOffsetAtLine(caretLine);
- int offset = lineOffset + content.getLine(caretLine).length();
- setCaretOffset(offset, OFFSET_LEADING);
+ int[] newCarets = Arrays.copyOf(caretOffsets, caretOffsets.length);
+ for (int i = 0; i < caretOffsets.length; i++) {
+ int caretOffset = caretOffsets[i];
+ int caretLine = content.getLineAtOffset(caretOffset);
+ int lineOffset = content.getOffsetAtLine(caretLine);
+ int offsetInLine = caretOffset - lineOffset;
+ if (offsetInLine > 0) {
+ newCarets[i] = getClusterPrevious(caretOffset, caretLine);
+ } else if (caretLine > 0) {
+ caretLine--;
+ lineOffset = content.getOffsetAtLine(caretLine);
+ newCarets[i] = lineOffset + content.getLine(caretLine).length();
+ }
+ }
+ if (!Arrays.equals(caretOffsets, newCarets)) {
+ setCaretOffsets(newCarets, OFFSET_LEADING);
showCaret();
}
}
@@ -3315,7 +3434,7 @@ void doSelectionCursorPrevious() {
* direction.
*/
void doSelectionLineDown() {
- int oldColumnX = columnX = getPointAtOffset(caretOffset).x;
+ int oldColumnX = columnX = getPointAtOffset(caretOffsets[0]).x;
doLineDown(true);
columnX = oldColumnX;
}
@@ -3330,7 +3449,7 @@ void doSelectionLineDown() {
* direction.
*/
void doSelectionLineUp() {
- int oldColumnX = columnX = getPointAtOffset(caretOffset).x;
+ int oldColumnX = columnX = getPointAtOffset(caretOffsets[0]).x;
doLineUp(true);
columnX = oldColumnX;
}
@@ -3342,14 +3461,14 @@ void doSelectionLineUp() {
* relative to the top line remains the same. The exception is the end
* of the text where a full page scroll is not possible. In this case
* the caret is moved after the last character.
- * <p></p>
+ * </p><p>
* Adjusts the selection according to the caret change. This can either add
* to or subtract from the old selection, depending on the previous selection
* direction.
* </p>
*/
void doSelectionPageDown(int pixels) {
- int oldColumnX = columnX = getPointAtOffset(caretOffset).x;
+ int oldColumnX = columnX = getPointAtOffset(caretOffsets[0]).x;
doPageDown(true, pixels);
columnX = oldColumnX;
}
@@ -3368,7 +3487,10 @@ void doSelectionPageDown(int pixels) {
* </p>
*/
void doSelectionPageUp(int pixels) {
- int oldColumnX = columnX = getPointAtOffset(caretOffset).x;
+ if (caretOffsets.length > 1) { // operation doesn't make sense for multi-carets
+ return;
+ }
+ int oldColumnX = columnX = getPointAtOffset(caretOffsets[0]).x;
doPageUp(true, pixels);
columnX = oldColumnX;
}
@@ -3376,22 +3498,28 @@ void doSelectionPageUp(int pixels) {
* Moves the caret to the end of the next word .
*/
void doSelectionWordNext() {
- int offset = getWordNext(caretOffset, SWT.MOVEMENT_WORD);
+ int[] offsets = Arrays.stream(caretOffsets).map(offset -> getWordNext(offset, SWT.MOVEMENT_WORD)).toArray();
// don't change caret position if in single line mode and the cursor
// would be on a different line. fixes 5673
- if (!isSingleLine() ||
- content.getLineAtOffset(caretOffset) == content.getLineAtOffset(offset)) {
+ if (!isSingleLine()) {
// Force symmetrical movement for word next and previous. Fixes 14536
- setCaretOffset(offset, OFFSET_LEADING);
+ setCaretOffsets(offsets, OFFSET_LEADING);
showCaret();
+ } else {
+ int[] linesForCurrentCarets = Arrays.stream(caretOffsets).map(offset -> content.getLineAtOffset(offset)).toArray();
+ int[] linesForNewCarets = Arrays.stream(offsets).map(offset -> content.getLineAtOffset(offset)).toArray();
+ if (Arrays.equals(linesForCurrentCarets, linesForNewCarets)) {
+ // Force symmetrical movement for word next and previous. Fixes 14536
+ setCaretOffsets(offsets, OFFSET_LEADING);
+ showCaret();
+ }
}
}
/**
* Moves the caret to the start of the previous word.
*/
void doSelectionWordPrevious() {
- int offset = getWordPrevious(caretOffset, SWT.MOVEMENT_WORD);
- setCaretOffset(offset, OFFSET_LEADING);
+ setCaretOffsets(Arrays.stream(caretOffsets).map(offset -> getWordPrevious(offset, SWT.MOVEMENT_WORD)).toArray(), OFFSET_LEADING);
showCaret();
}
/**
@@ -3401,8 +3529,7 @@ void doSelectionWordPrevious() {
* left (visually left because it's now in a L2R segment).
*/
void doVisualPrevious() {
- int offset = getClusterPrevious(caretOffset, getCaretLine());
- setCaretOffset(offset, SWT.DEFAULT);
+ setCaretOffsets(Arrays.stream(caretOffsets).map(offset -> getClusterPrevious(offset, content.getLineAtOffset(offset))).toArray(), SWT.DEFAULT);
showCaret();
}
/**
@@ -3412,8 +3539,7 @@ void doVisualPrevious() {
* right (visually right because it's now in a L2R segment).
*/
void doVisualNext() {
- int offset = getClusterNext(caretOffset, getCaretLine());
- setCaretOffset(offset, SWT.DEFAULT);
+ setCaretOffsets(Arrays.stream(caretOffsets).map(offset -> getClusterNext(offset, content.getLineAtOffset(offset))).toArray(), SWT.DEFAULT);
showCaret();
}
/**
@@ -3422,8 +3548,8 @@ void doVisualNext() {
* and remove the selection.
*/
void doWordNext() {
- if (selection.y - selection.x > 0) {
- setCaretOffset(selection.y, SWT.DEFAULT);
+ if (Arrays.stream(selection).anyMatch(p -> p.x != p.y)) {
+ setCaretOffsets(Arrays.stream(selection).mapToInt(sel -> sel.y).toArray(), SWT.DEFAULT);
showCaret();
} else {
doSelectionWordNext();
@@ -3435,8 +3561,8 @@ void doWordNext() {
* and remove the selection.
*/
void doWordPrevious() {
- if (selection.y - selection.x > 0) {
- setCaretOffset(selection.x, SWT.DEFAULT);
+ if (Arrays.stream(selection).anyMatch(p -> p.x != p.y)) {
+ setCaretOffsets(Arrays.stream(selection).mapToInt(sel -> sel.x).toArray(), SWT.DEFAULT);
showCaret();
} else {
doSelectionWordPrevious();
@@ -3576,11 +3702,11 @@ public Rectangle getBlockSelectionBounds() {
if (blockSelection && blockXLocation != -1) {
rect = getBlockSelectionRectangle();
} else {
- Point startPoint = getPointAtOffset(selection.x);
- Point endPoint = getPointAtOffset(selection.y);
- int height = getLineHeight(selection.y);
+ Point startPoint = getPointAtOffset(selection[0].x);
+ Point endPoint = getPointAtOffset(selection[0].y);
+ int height = getLineHeight(selection[0].y);
rect = new Rectangle(startPoint.x, startPoint.y, endPoint.x - startPoint.x, endPoint.y + height - startPoint.y);
- if (selection.x == selection.y) {
+ if (selection[0].x == selection[0].y) {
rect.width = getCaretWidth();
}
}
@@ -3680,7 +3806,7 @@ Rectangle getBoundsAtOffset(int offset) {
} else {
bounds = new Rectangle (0, 0, 0, renderer.getLineHeight());
}
- if (offset == caretOffset && !isWordWrap()) {
+ if (Arrays.binarySearch(caretOffsets, offset) >= 0 && !isWordWrap()) {
int lineEnd = lineOffset + line.length();
if (offset == lineEnd) {
bounds.width += getCaretWidth();
@@ -3701,7 +3827,7 @@ Rectangle getBoundsAtOffset(int offset) {
*/
public int getCaretOffset() {
checkWidget();
- return caretOffset;
+ return caretOffsets[0];
}
/**
* Returns the caret width.
@@ -4255,7 +4381,8 @@ public int getLinePixel(int lineIndex) {
int lineHeight = renderer.getLineHeight();
return lineIndex * lineHeight - getVerticalScrollOffset() + topMargin;
}
- if (lineIndex == topIndex) return topIndexY + topMargin;
+ if (lineIndex == topIndex)
+ return topIndexY + topMargin;
int height = topIndexY;
if (lineIndex > topIndex) {
for (int i = topIndex; i < lineIndex; i++) {
@@ -4555,7 +4682,7 @@ int getOffsetAtPoint(int x, int y, int lineIndex, int[] alignment) {
offsetInLine += trailing[0];
if (alignment != null) {
int trailingLevel = layout.getLevel(offsetInLine) & 0x1;
- if ((level ^ trailingLevel) != 0) {
+ if (level != trailingLevel) {
alignment[0] = PREVIOUS_OFFSET_TRAILING;
} else {
alignment[0] = OFFSET_LEADING;
@@ -4751,6 +4878,10 @@ public int getRightMargin() {
* widget that contains N characters, there are N+1 caret positions,
* ranging from 0..N
* </p>
+ * <p>
+ * It is usually better to use {@link #getSelectionRanges()} which better
+ * support multiple selection and carets and block selection.
+ * </p>
*
* @return start and end of the selection, x is the offset of the first
* selected character, y is the offset after the last selected character.
@@ -4758,7 +4889,7 @@ public int getRightMargin() {
* &lt;= y). To determine if a selection is right-to-left (RtoL) vs. left-to-right
* (LtoR), compare the caretOffset to the start and end of the selection
* (e.g., caretOffset == start of selection implies that the selection is RtoL).
- * @see #getSelectionRange
+ * @see #getSelectionRanges
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
@@ -4766,10 +4897,14 @@ public int getRightMargin() {
*/
public Point getSelection() {
checkWidget();
- return new Point(selection.x, selection.y);
+ return new Point(selection[0].x, selection[0].y);
}
/**
* Returns the selection.
+ * <p>
+ * It is usually better to use {@link #getSelectionRanges()} which better
+ * support multiple selection and carets and block selection.
+ * </p>
*
* @return start and length of the selection, x is the offset of the
* first selected character, relative to the first character of the
@@ -4782,17 +4917,21 @@ public Point getSelection() {
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
+ * @see #getSelectionRanges
*/
public Point getSelectionRange() {
checkWidget();
- return new Point(selection.x, selection.y - selection.x);
+ return new Point(selection[0].x, selection[0].y - selection[0].x);
}
/**
- * Returns the ranges of text that are inside the block selection rectangle.
+ * Returns the selected ranges of text.
+ * If block is enabled, return the ranges that are inside the block selection rectangle.
+ * <p>
+ * The ranges array contains start and length pairs.
* <p>
- * The ranges array contains start and length pairs. When the receiver is not
+ * When the receiver is not
* in block selection mode the return arrays contains the start and length of
- * the regular selection.
+ * the regular selections.
*
* @return the ranges array
*
@@ -4802,6 +4941,7 @@ public Point getSelectionRange() {
* </ul>
*
* @since 3.5
+ * @see #setSelectionRanges(int[])
*/
public int[] getSelectionRanges() {
checkWidget();
@@ -4826,7 +4966,13 @@ public int[] getSelectionRanges() {
}
return ranges;
}
- return new int[] {selection.x, selection.y - selection.x};
+ int[] res = new int[2 * selection.length];
+ int index = 0;
+ for (Point p : selection) {
+ res[index++] = p.x;
+ res[index++] = p.y - p.x;
+ }
+ return res;
}
/**
* Returns the receiver's selection background color.
@@ -4860,7 +5006,7 @@ public int getSelectionCount() {
if (blockSelection && blockXLocation != -1) {
return getBlockSelectionText(content.getLineDelimiter()).length();
}
- return getSelectionRange().y;
+ return Arrays.stream(selection).collect(Collectors.summingInt(sel -> sel.y - sel.x));
}
/**
* Returns the receiver's selection foreground color.
@@ -4894,7 +5040,7 @@ public String getSelectionText() {
if (blockSelection && blockXLocation != -1) {
return getBlockSelectionText(content.getLineDelimiter());
}
- return content.getTextRange(selection.x, selection.y - selection.x);
+ return Arrays.stream(selection).map(sel -> content.getTextRange(sel.x, sel.y - sel.x)).collect(Collectors.joining());
}
StyledTextEvent getBidiSegments(int lineOffset, String line) {
if (!isListening(ST.LineGetSegments)) {
@@ -4918,10 +5064,9 @@ StyledTextEvent getBidiSegments(int lineOffset, String line) {
}
}
if (hasSegmentsChars && !visualWrap) {
- for (int i= 0; i < segmentsChars.length; i++) {
- if (segmentsChars[i] == '\n' || segmentsChars[i] == '\r') {
+ for (char segmentsChar : segmentsChars) {
+ if (segmentsChar == '\n' || segmentsChar == '\r') {
visualWrap = true;
- setVariableLineHeight();
break;
}
}
@@ -5391,7 +5536,7 @@ int getVerticalScrollOffset() {
renderer.calculate(0, topIndex);
int height = 0;
for (int i = 0; i < topIndex; i++) {
- height += renderer.getLineHeight(i);
+ height += renderer.getCachedLineHeight(i);
}
height -= topIndexY;
verticalScrollOffset = height;
@@ -5404,10 +5549,10 @@ int getVisualLineIndex(TextLayout layout, int offsetInLine) {
Caret caret = getCaret();
if (caret != null && lineIndex != 0 && offsetInLine == offsets[lineIndex]) {
int lineY = layout.getLineBounds(lineIndex).y;
- int caretY = caret.getLocation().y - getLinePixel(getCaretLine());
+ int caretY = caret.getLocation().y - getLinePixel(getFirstCaretLine());
if (lineY > caretY) lineIndex--;
caretAlignment = OFFSET_LEADING;
- }
+ }
return lineIndex;
}
int getCaretDirection() {
@@ -5415,10 +5560,10 @@ int getCaretDirection() {
if (ime.getCompositionOffset() != -1) return SWT.DEFAULT;
if (!updateCaretDirection && caretDirection != SWT.NULL) return caretDirection;
updateCaretDirection = false;
- int caretLine = getCaretLine();
+ int caretLine = getFirstCaretLine();
int lineOffset = content.getOffsetAtLine(caretLine);
String line = content.getLine(caretLine);
- int offset = caretOffset - lineOffset;
+ int offset = caretOffsets[0] - lineOffset;
int lineLength = line.length();
if (lineLength == 0) return isMirrored() ? SWT.RIGHT : SWT.LEFT;
if (caretAlignment == PREVIOUS_OFFSET_TRAILING && offset > 0) offset--;
@@ -5433,10 +5578,10 @@ int getCaretDirection() {
return ((level & 1) != 0) ? SWT.RIGHT : SWT.LEFT;
}
/*
- * Returns the index of the line the caret is on.
+ * Returns the index of the line the first/top caret is on.
*/
-int getCaretLine() {
- return content.getLineAtOffset(caretOffset);
+int getFirstCaretLine() {
+ return content.getLineAtOffset(caretOffsets[0]);
}
int getWrapWidth () {
if (wordWrap && !isSingleLine()) {
@@ -5569,7 +5714,7 @@ Point getPointAtOffset(int offset) {
// expected, see bug 488172.
// Respect caretAlignment at the caretOffset, unless there's
// a non-empty selection, see bug 488172 comment 6.
- if (wordWrap && !lineBegin && (offset != caretOffset || selection.x != selection.y)) {
+ if (wordWrap && !lineBegin && (Arrays.binarySearch(caretOffsets, offset) < 0 || Arrays.stream(selection).allMatch(p -> p.x == p.y))) {
int[] offsets = layout.getLineOffsets();
for (int i : offsets) {
if (i == offsetInLine) {
@@ -5647,8 +5792,8 @@ int insertBlockSelectionText(String text, boolean fillWithSpaces) {
lines[lineCount++] = text.substring(start);
if (fillWithSpaces) {
int maxLength = 0;
- for (int i = 0; i < lines.length; i++) {
- int length = lines[i].length();
+ for (String line : lines) {
+ int length = line.length();
maxLength = Math.max(maxLength, length);
}
for (int i = 0; i < lines.length; i++) {
@@ -5671,11 +5816,11 @@ int insertBlockSelectionText(String text, boolean fillWithSpaces) {
left = rect.x;
right = rect.width;
} else {
- firstLine = lastLine = getCaretLine();
- left = right = getPointAtOffset(caretOffset).x;
+ firstLine = lastLine = getFirstCaretLine();
+ left = right = getPointAtOffset(caretOffsets[0]).x;
}
- start = caretOffset;
- int caretLine = getCaretLine();
+ start = caretOffsets[0];
+ int caretLine = getFirstCaretLine();
int index = 0, lineIndex = firstLine;
while (lineIndex <= lastLine) {
String string = index < lineCount ? lines[index++] : "";
@@ -5821,10 +5966,10 @@ void installListeners() {
}
});
if (verticalBar != null) {
- verticalBar.addListener(SWT.Selection, event -> handleVerticalScroll(event));
+ verticalBar.addListener(SWT.Selection, this::handleVerticalScroll);
}
if (horizontalBar != null) {
- horizontalBar.addListener(SWT.Selection, event -> handleHorizontalScroll(event));
+ horizontalBar.addListener(SWT.Selection, this::handleHorizontalScroll);
}
}
void internalRedrawRange(int start, int length) {
@@ -5931,8 +6076,8 @@ void handleCompositionSelection (Event event) {
event.text = getTextRange(event.start, event.end - event.start);
}
} else {
- event.start = selection.x;
- event.end = selection.y;
+ event.start = selection[0].x;
+ event.end = selection[0].y;
event.text = getSelectionText();
}
}
@@ -5946,7 +6091,7 @@ void handleCompositionChanged(Event event) {
int length = text.length();
if (length == ime.getCommitCount()) {
content.replaceTextRange(start, end - start, "");
- setCaretOffset(ime.getCompositionOffset(), SWT.DEFAULT);
+ setCaretOffsets(new int[] {ime.getCompositionOffset()}, SWT.DEFAULT);
caretWidth = 0;
caretDirection = SWT.NULL;
} else {
@@ -5954,14 +6099,16 @@ void handleCompositionChanged(Event event) {
int alignment = SWT.DEFAULT;
if (ime.getWideCaret()) {
start = ime.getCompositionOffset();
- int lineIndex = getCaretLine();
- int lineOffset = content.getOffsetAtLine(lineIndex);
- TextLayout layout = renderer.getTextLayout(lineIndex);
- caretWidth = layout.getBounds(start - lineOffset, start + length - 1 - lineOffset).width;
- renderer.disposeTextLayout(layout);
+ for (int caretOffset : caretOffsets) {
+ int lineIndex = content.getLineAtOffset(caretOffset);
+ int lineOffset = content.getOffsetAtLine(lineIndex);
+ TextLayout layout = renderer.getTextLayout(lineIndex);
+ caretWidth = layout.getBounds(start - lineOffset, start + length - 1 - lineOffset).width;
+ renderer.disposeTextLayout(layout);
+ }
alignment = OFFSET_LEADING;
}
- setCaretOffset(ime.getCaretOffset(), alignment);
+ setCaretOffsets(new int[] {ime.getCaretOffset()}, alignment);
}
resetSelection();
showCaret();
@@ -5995,6 +6142,14 @@ void handleDispose(Event event) {
rightCaretBitmap.dispose();
rightCaretBitmap = null;
}
+ if (carets != null) {
+ for (Caret caret : carets) {
+ if (caret != null) {
+ caret.dispose();
+ }
+ }
+ carets = null;
+ }
if (isBidiCaret()) {
BidiUtil.removeLanguageListener(this);
}
@@ -6054,16 +6209,16 @@ void handleKey(Event event) {
// insert a character in the text in this instance). Don't
// ignore CTRL+ALT combinations since that is the Alt Gr
// key on some keyboards. See bug 20953.
- ignore = (event.stateMask ^ SWT.ALT) == 0 ||
- (event.stateMask ^ SWT.CTRL) == 0 ||
- (event.stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 ||
- (event.stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0;
+ ignore = event.stateMask == SWT.ALT ||
+ event.stateMask == SWT.CTRL ||
+ event.stateMask == (SWT.ALT | SWT.SHIFT) ||
+ event.stateMask == (SWT.CTRL | SWT.SHIFT);
}
// -ignore anything below SPACE except for line delimiter keys and tab.
// -ignore DEL
if (!ignore && event.character > 31 && event.character != SWT.DEL ||
- event.character == SWT.CR || event.character == SWT.LF ||
- event.character == TAB) {
+ event.character == SWT.CR || event.character == SWT.LF ||
+ event.character == TAB) {
doContent(event.character);
update();
}
@@ -6079,7 +6234,7 @@ void handleKey(Event event) {
*/
void handleKeyDown(Event event) {
if (clipboardSelection == null) {
- clipboardSelection = new Point(selection.x, selection.y);
+ clipboardSelection = new Point(selection[0].x, selection[0].y);
}
newOrientation = SWT.NONE;
event.stateMask &= SWT.MODIFIER_MASK;
@@ -6105,7 +6260,7 @@ void handleKeyDown(Event event) {
*/
void handleKeyUp(Event event) {
if (clipboardSelection != null) {
- if (clipboardSelection.x != selection.x || clipboardSelection.y != selection.y) {
+ if (clipboardSelection.x != selection[0].x || clipboardSelection.y != selection[0].y) {
copySelection(DND.SELECTION_CLIPBOARD);
}
}
@@ -6130,9 +6285,9 @@ void handleKeyUp(Event event) {
*/
void handleMenuDetect(Event event) {
if (event.detail == SWT.MENU_KEYBOARD) {
- Point point = getDisplay().map(this, null, getPointAtOffset(caretOffset));
+ Point point = getDisplay().map(this, null, getPointAtOffset(caretOffsets[0]));
event.x = point.x;
- event.y = point.y + getLineHeight(caretOffset);
+ event.y = point.y + getLineHeight(caretOffsets[0]);
}
}
/**
@@ -6172,9 +6327,16 @@ void handleMouseDown(Event event) {
return;
}
clickCount = event.count;
+ boolean addSelection = (event.stateMask & SWT.MOD3) != 0;
if (clickCount == 1) {
- boolean select = (event.stateMask & SWT.MOD2) != 0;
- doMouseLocationChange(event.x, event.y, select);
+ if (addSelection && !blockSelection) {
+ int offset = getOffsetAtPoint(event.x, event.y, null);
+ addSelection(offset, 0);
+ sendSelectionEvent();
+ } else {
+ boolean expandSelection = (event.stateMask & SWT.MOD2) != 0;
+ doMouseLocationChange(event.x, event.y, expandSelection);
+ }
} else {
if (doubleClickEnabled) {
boolean wordSelect = (clickCount & 1) == 0;
@@ -6182,11 +6344,26 @@ void handleMouseDown(Event event) {
int lineIndex = content.getLineAtOffset(offset);
int lineOffset = content.getOffsetAtLine(lineIndex);
if (wordSelect) {
+ String line = content.getLine(lineIndex);
+ int lineLength = line.length();
int min = blockSelection ? lineOffset : 0;
- int max = blockSelection ? lineOffset + content.getLine(lineIndex).length() : content.getCharCount();
+ int max = blockSelection ? lineOffset + lineLength : content.getCharCount();
+ final Point offsetPoint = getPointAtOffset(offset);
+ if (event.x > offsetPoint.x
+ && offset < Math.min(max, lineOffset + lineLength) // Not beyond EOL
+ && !Character.isWhitespace(line.charAt(offset - lineOffset))) { // Not on whitespace
+ offset++;
+ }
int start = Math.max(min, getWordPrevious(offset, SWT.MOVEMENT_WORD_START));
int end = Math.min(max, getWordNext(start, SWT.MOVEMENT_WORD_END));
- setSelection(start, end - start, false, true);
+ int[] regions = new int[2];
+ if (addSelection) {
+ int[] current = getSelectionRanges();
+ regions = Arrays.copyOf(current, current.length + 2);
+ }
+ regions[regions.length - 2] = start;
+ regions[regions.length - 1] = end - start;
+ setSelection(regions, false, true);
sendSelectionEvent();
} else {
if (blockSelection) {
@@ -6196,15 +6373,31 @@ void handleMouseDown(Event event) {
if (lineIndex + 1 < content.getLineCount()) {
lineEnd = content.getOffsetAtLine(lineIndex + 1);
}
- setSelection(lineOffset, lineEnd - lineOffset, false, false);
+ int[] regions = new int[2];
+ if (addSelection) {
+ int[] current = getSelectionRanges();
+ regions = Arrays.copyOf(current, current.length + 2);
+ }
+ regions[regions.length - 2] = lineOffset;
+ regions[regions.length - 1] = lineEnd - lineOffset;
+ setSelection(regions, false, false);
sendSelectionEvent();
}
}
- doubleClickSelection = new Point(selection.x, selection.y);
+ doubleClickSelection = new Point(selection[0].x, selection[0].y);
showCaret();
}
}
}
+
+void addSelection(int offset, int length) {
+ int[] ranges = getSelectionRanges();
+ ranges = Arrays.copyOf(ranges, ranges.length + 2);
+ ranges[ranges.length - 2] = offset;
+ ranges[ranges.length - 1] = length;
+ setSelection(ranges, true, true);
+}
+
/**
* Updates the caret location and selection if mouse button 1 is pressed
* during the mouse move.
@@ -6267,6 +6460,18 @@ void handlePaint(Event event) {
gc.setAdvanced(false);
}
}
+ if(carets != null) {
+ for (int i = 1; i < carets.length; i++) { //skip 1st caret that's already drawn
+ Caret caret = carets[i];
+ if (caret.isVisible()) {
+ if (caret.getImage() != null) {
+ gc.drawImage(caret.getImage(), caret.getBounds().x, caret.getBounds().y);
+ } else {
+ gc.drawRectangle(caret.getBounds().x, caret.getBounds().y, caret.getBounds().width, getLineHeight(caretOffsets[i]));
+ }
+ }
+ }
+ }
// fill the margin background
gc.setBackground(marginColor != null ? marginColor : background);
@@ -6309,7 +6514,7 @@ void handleResize(Event event) {
if (oldHeight == 0) topIndexY = 0;
setScrollBars(true);
}
- setCaretLocation();
+ setCaretLocations();
} else {
renderer.calculateClientArea();
setScrollBars(true);
@@ -6433,7 +6638,15 @@ void handleTextChanging(TextChangingEvent event) {
// handleTextChanging and handleTextChanged events and this API sets the
// caretOffset.
int newEndOfText = content.getCharCount() - event.replaceCharCount + event.newCharCount;
- if (caretOffset > newEndOfText) setCaretOffset(newEndOfText, SWT.DEFAULT);
+ int tooBigOffsets = 0;
+ while (tooBigOffsets < caretOffsets.length && caretOffsets[caretOffsets.length - 1 - tooBigOffsets] > newEndOfText) {
+ tooBigOffsets++;
+ }
+ if (tooBigOffsets != 0) {
+ int[] newCaretOffsets = Arrays.copyOf(caretOffsets, caretOffsets.length - tooBigOffsets + 1);
+ newCaretOffsets[newCaretOffsets.length - 1] = newEndOfText;
+ setCaretOffsets(newCaretOffsets, SWT.DEFAULT);
+ }
}
/**
* Called when the widget content is set programmatically, overwriting
@@ -6872,28 +7085,28 @@ void initializeAccessible() {
public void replaceText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.replaceTextRange(e.start, e.end - e.start, e.string);
- e.result = ACC.OK;
+ e.result = ACC.OK;
}
@Override
public void pasteText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.setSelection(e.start);
- st.paste();
- e.result = ACC.OK;
+ st.paste();
+ e.result = ACC.OK;
}
@Override
public void cutText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.setSelection(e.start, e.end);
- st.cut();
- e.result = ACC.OK;
+ st.cut();
+ e.result = ACC.OK;
}
@Override
public void copyText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.setSelection(e.start, e.end);
- st.copy();
- e.result = ACC.OK;
+ st.copy();
+ e.result = ACC.OK;
}
};
acc.addAccessibleEditableTextListener(accEditableTextListener);
@@ -7059,7 +7272,7 @@ String stripMnemonic (String string) {
}
index++;
} while (index < length);
- return string;
+ return string;
}
/*
* Return the lowercase of the first non-'&' character following
@@ -7076,7 +7289,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
/**
* Executes the action.
@@ -7317,7 +7530,7 @@ boolean isBidiCaret() {
return BidiUtil.isBidiPlatform();
}
boolean isFixedLineHeight() {
- return fixedLineHeight;
+ return !isWordWrap() && lineSpacing == 0 && renderer.lineSpacingProvider == null && !hasStyleWithVariableHeight && !hasVerticalIndent;
}
/**
* Returns whether the given offset is inside a multi byte line delimiter.
@@ -7364,7 +7577,7 @@ public boolean isTextSelected() {
Rectangle rect = getBlockSelectionPosition();
return !rect.isEmpty();
}
- return selection.y != selection.x;
+ return Arrays.stream(selection).anyMatch(range -> range.x != range.y);
}
/**
* Returns whether the widget can have only one line.
@@ -7428,7 +7641,13 @@ void modifyContent(Event event, boolean updateCaret) {
// fixes 1GBB8NJ
if (updateCaret && !(blockSelection && blockXLocation != -1)) {
// always update the caret location. fixes 1G8FODP
- setSelection(event.start + event.text.length(), 0, true, false);
+ setSelection(Arrays.stream(selection).map(sel -> {
+ if (sel.y < event.start || sel.x > event.end) {
+ return sel;
+ } else { // current range edited
+ return new Point(event.start + event.text.length(), event.start + event.text.length());
+ }
+ }).flatMapToInt(p -> IntStream.of(p.x, p.y - p.x)).toArray(), true, false);
showCaret();
}
notifyListeners(SWT.Modify, event);
@@ -7470,17 +7689,21 @@ public void paste(){
if (blockSelection) {
boolean fillWithSpaces = isFixedLineHeight() && renderer.fixedPitch;
int offset = insertBlockSelectionText(text, fillWithSpaces);
- setCaretOffset(offset, SWT.DEFAULT);
+ setCaretOffsets(new int[] {offset}, SWT.DEFAULT);
clearBlockSelection(true, true);
- setCaretLocation();
+ setCaretLocations();
+ return;
+ } else if (getSelectionRanges().length / 2 > 1) { // multi selection
+ insertMultiSelectionText(text);
+ setCaretLocations();
return;
}
Event event = new Event();
- event.start = selection.x;
- event.end = selection.y;
+ event.start = selection[0].x;
+ event.end = selection[0].y;
String delimitedText = getModelDelimitedText(text);
if (textLimit > 0) {
- int uneditedTextLength = getCharCount() - (selection.y - selection.x);
+ int uneditedTextLength = getCharCount() - (selection[0].y - selection[0].x);
if ((uneditedTextLength + delimitedText.length()) > textLimit) {
int endIndex = textLimit - uneditedTextLength;
delimitedText = delimitedText.substring(0, Math.max(endIndex, 0));
@@ -7490,6 +7713,22 @@ public void paste(){
sendKeyEvent(event);
}
}
+
+private void insertMultiSelectionText(String text) {
+ String[] blocks = text.split(PlatformLineDelimiter);
+ int[] ranges = getSelectionRanges();
+ for (int i = ranges.length / 2 - 1; i >= 0; i --) {
+ int offset = ranges[2 * i];
+ int length = ranges[2 * i + 1];
+ String toPaste = blocks.length > i ? blocks[i] : blocks[blocks.length - 1];
+ Event event = new Event();
+ event.start = offset;
+ event.end = offset + length;
+ event.text = toPaste;
+ sendKeyEvent(event);
+ }
+}
+
private void pasteOnMiddleClick(Event event) {
String text = (String)getClipboardContent(DND.SELECTION_CLIPBOARD);
if (text != null && text.length() > 0) {
@@ -7497,8 +7736,8 @@ private void pasteOnMiddleClick(Event event) {
doMouseLocationChange(event.x, event.y, false);
// insert text
Event e = new Event();
- e.start = selection.x;
- e.end = selection.y;
+ e.start = selection[0].x;
+ e.end = selection[0].y;
e.text = getModelDelimitedText(text);
sendKeyEvent(e);
}
@@ -7673,8 +7912,8 @@ void redrawLinesBullet (int[] redrawLines) {
if (redrawLines == null) return;
int topIndex = getPartialTopIndex();
int bottomIndex = getPartialBottomIndex();
- for (int i = 0; i < redrawLines.length; i++) {
- int lineIndex = redrawLines[i];
+ for (int redrawLine : redrawLines) {
+ int lineIndex = redrawLine;
if (!(topIndex <= lineIndex && lineIndex <= bottomIndex)) continue;
int width = -1;
Bullet bullet = renderer.getLineBullet(lineIndex, null);
@@ -7761,7 +8000,7 @@ public void removeBidiSegmentListener(BidiSegmentListener listener) {
if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
removeListener(ST.LineGetSegments, listener);
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -7837,7 +8076,7 @@ public void removeLineStyleListener(LineStyleListener listener) {
checkWidget();
if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
removeListener(ST.LineGetStyle, listener);
- setCaretLocation();
+ setCaretLocations();
}
/**
* Removes the specified modify listener.
@@ -7996,8 +8235,8 @@ public void removeWordMovementListener(MovementListener listener) {
public void replaceStyleRanges(int start, int length, StyleRange[] ranges) {
checkWidget();
if (isListening(ST.LineGetStyle)) return;
- if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- setStyleRanges(start, length, null, ranges, false);
+ if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ setStyleRanges(start, length, null, ranges, false);
}
/**
* Replaces the given text range with new text.
@@ -8055,7 +8294,7 @@ public void replaceTextRange(int start, int length, String text) {
void reset() {
ScrollBar verticalBar = getVerticalBar();
ScrollBar horizontalBar = getHorizontalBar();
- setCaretOffset(0, SWT.DEFAULT);
+ setCaretOffsets(new int[] {0}, SWT.DEFAULT);
topIndex = 0;
topIndexY = 0;
verticalScrollOffset = 0;
@@ -8069,13 +8308,13 @@ void reset() {
horizontalBar.setSelection(0);
}
resetCache(0, 0);
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
void resetBidiData() {
caretDirection = SWT.NULL;
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
keyActionMap.clear();
createKeyBindings();
super.redraw();
@@ -8115,8 +8354,8 @@ void resetCache(int firstLine, int count) {
* Resets the selection.
*/
void resetSelection() {
- selection.x = selection.y = caretOffset;
- selectionAnchor = -1;
+ selection = Arrays.stream(caretOffsets).mapToObj(offset -> new Point(offset, offset)).toArray(Point[]::new);
+ selectionAnchors = Arrays.copyOf(caretOffsets, caretOffsets.length);
sendAccessibleTextCaretMoved();
}
@@ -8125,9 +8364,7 @@ public void scroll(int destX, int destY, int x, int y, int width, int height, bo
super.scroll(destX, destY, x, y, width, height, false);
if (all) {
int deltaX = destX - x, deltaY = destY - y;
- Control[] children = getChildren();
- for (int i=0; i<children.length; i++) {
- Control child = children[i];
+ for (Control child : getChildren()) {
Rectangle rect = child.getBounds();
child.setLocation(rect.x + deltaX, rect.y + deltaY);
}
@@ -8137,8 +8374,8 @@ public void scroll(int destX, int destY, int x, int y, int width, int height, bo
/**
* Scrolls the widget horizontally.
*
- * @param pixels number of SWT logical points to scroll, > 0 = scroll left,
- * < 0 scroll right
+ * @param pixels number of SWT logical points to scroll, &gt; 0 = scroll left,
+ * &lt; 0 scroll right
* @param adjustScrollBar
* true= the scroll thumb will be moved to reflect the new scroll offset.
* false = the scroll thumb will not be moved
@@ -8174,7 +8411,7 @@ boolean scrollHorizontal(int pixels, boolean adjustScrollBar) {
}
}
horizontalScrollOffset += pixels;
- setCaretLocation();
+ setCaretLocations();
return true;
}
/**
@@ -8212,8 +8449,7 @@ boolean scrollVertical(int pixels, boolean adjustScrollBar) {
}
}
Control[] children = getChildren();
- for (int i=0; i<children.length; i++) {
- Control child = children[i];
+ for (Control child : children) {
Rectangle rect = child.getBounds();
child.setLocation(rect.x, rect.y + deltaY);
}
@@ -8224,7 +8460,7 @@ boolean scrollVertical(int pixels, boolean adjustScrollBar) {
calculateTopIndex(pixels);
super.redraw();
}
- setCaretLocation();
+ setCaretLocations();
return true;
}
void scrollText(int srcY, int destY) {
@@ -8251,9 +8487,9 @@ void scrollText(int srcY, int destY) {
}
}
void sendAccessibleTextCaretMoved() {
- if (caretOffset != accCaretOffset) {
- accCaretOffset = caretOffset;
- getAccessible().textCaretMoved(caretOffset);
+ if (Arrays.stream(caretOffsets).noneMatch(caretOffset -> caretOffset == accCaretOffset)) {
+ accCaretOffset = caretOffsets[0];
+ getAccessible().textCaretMoved(caretOffsets[0]);
}
}
void sendAccessibleTextChanged(int start, int newCharCount, int replaceCharCount) {
@@ -8339,8 +8575,8 @@ StyledTextEvent sendLineEvent(int eventType, int lineOffset, String line) {
void sendSelectionEvent() {
getAccessible().textSelectionChanged();
Event event = new Event();
- event.x = selection.x;
- event.y = selection.y;
+ event.x = selection[0].x;
+ event.y = selection[selection.length - 1].y;
notifyListeners(SWT.Selection, event);
}
int sendTextEvent(int left, int right, int lineIndex, String text, boolean fillWithSpaces) {
@@ -8429,7 +8665,7 @@ void setAlignment() {
leftMargin += newAlignmentMargin;
alignmentMargin = newAlignmentMargin;
resetCache(0, 1);
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
}
@@ -8458,7 +8694,7 @@ public void setAlignment(int alignment) {
if (alignment == 0 || this.alignment == alignment) return;
this.alignment = alignment;
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
setAlignment();
super.redraw();
}
@@ -8490,10 +8726,23 @@ public void setAlwaysShowScrollBars(boolean show) {
@Override
public void setBackground(Color color) {
checkWidget();
+ boolean backgroundDisabled = false;
+ if (!this.enabled && color == null) {
+ if (background != null) {
+ Color disabledBg = getDisplay().getSystemColor(SWT.COLOR_TEXT_DISABLED_BACKGROUND);
+ if (background.equals(disabledBg)) {
+ return;
+ } else {
+ color = new Color (disabledBg.getRGBA());
+ backgroundDisabled = true;
+ }
+ }
+ }
+ customBackground = color != null && !this.insideSetEnableCall && !backgroundDisabled;
background = color;
super.setBackground(color);
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -8515,8 +8764,8 @@ public void setBlockSelection(boolean blockSelection) {
super.setCursor(display.getSystemCursor(type));
}
if (blockSelection) {
- int start = selection.x;
- int end = selection.y;
+ int start = selection[0].x;
+ int end = selection[0].y;
if (start != end) {
setBlockSelectionOffset(start, end, false);
}
@@ -8570,8 +8819,8 @@ public void setBlockSelectionBounds(int x, int y, int width, int height) {
y -= verticalScrollOffset;
int start = getOffsetAtPoint(x, y, null);
int end = getOffsetAtPoint(x+width-1, y+height-1, null);
- setSelection(start, end - start, false, false);
- setCaretLocation();
+ setSelection(new int[] {start, end - start}, false, false);
+ setCaretLocations();
return;
}
int minY = topMargin;
@@ -8595,11 +8844,11 @@ void setBlockSelectionLocation (int x, int y, boolean sendEvent) {
blockYLocation = y + verticalScrollOffset;
int[] alignment = new int[1];
int offset = getOffsetAtPoint(x, y, alignment);
- setCaretOffset(offset, alignment[0]);
+ setCaretOffsets(new int[] {offset}, alignment[0]);
if (blockXAnchor == -1) {
blockXAnchor = blockXLocation;
blockYAnchor = blockYLocation;
- selectionAnchor = caretOffset;
+ selectionAnchors[0] = caretOffsets[0];
}
doBlockSelection(sendEvent);
}
@@ -8607,7 +8856,7 @@ void setBlockSelectionLocation (int anchorX, int anchorY, int x, int y, boolean
int verticalScrollOffset = getVerticalScrollOffset();
blockXAnchor = anchorX + horizontalScrollOffset;
blockYAnchor = anchorY + verticalScrollOffset;
- selectionAnchor = getOffsetAtPoint(anchorX, anchorY, null);
+ selectionAnchors[0] = getOffsetAtPoint(anchorX, anchorY, null);
setBlockSelectionLocation(x, y, sendEvent);
}
void setBlockSelectionOffset (int offset, boolean sendEvent) {
@@ -8615,11 +8864,11 @@ void setBlockSelectionOffset (int offset, boolean sendEvent) {
int verticalScrollOffset = getVerticalScrollOffset();
blockXLocation = point.x + horizontalScrollOffset;
blockYLocation = point.y + verticalScrollOffset;
- setCaretOffset(offset, SWT.DEFAULT);
+ setCaretOffsets(new int[] {offset}, SWT.DEFAULT);
if (blockXAnchor == -1) {
blockXAnchor = blockXLocation;
blockYAnchor = blockYLocation;
- selectionAnchor = caretOffset;
+ selectionAnchors[0] = caretOffsets[0];
}
doBlockSelection(sendEvent);
}
@@ -8628,9 +8877,10 @@ void setBlockSelectionOffset (int anchorOffset, int offset, boolean sendEvent) {
Point anchorPoint = getPointAtOffset(anchorOffset);
blockXAnchor = anchorPoint.x + horizontalScrollOffset;
blockYAnchor = anchorPoint.y + verticalScrollOffset;
- selectionAnchor = anchorOffset;
+ selectionAnchors[0] = anchorOffset;
setBlockSelectionOffset(offset, sendEvent);
}
+
/**
* Sets the receiver's caret. Set the caret's height and location.
*
@@ -8647,7 +8897,15 @@ public void setCaret(Caret caret) {
super.setCaret(caret);
caretDirection = SWT.NULL;
if (caret != null) {
- setCaretLocation();
+ setCaretLocations();
+ if(carets != null) {
+ for (int i = 1; i < carets.length; i++) {
+ carets[i].dispose();
+ }
+ }
+ carets = new Caret[] {caret};
+ } else {
+ carets = null;
}
}
/**
@@ -8686,95 +8944,119 @@ public void setBottomMargin (int bottomMargin) {
/**
* Moves the Caret to the current caret offset.
*/
-void setCaretLocation() {
- Point newCaretPos = getPointAtOffset(caretOffset);
- setCaretLocation(newCaretPos, getCaretDirection());
-}
-void setCaretLocation(final Point location, int direction) {
- Caret caret = getCaret();
- if (caret != null) {
- final boolean isDefaultCaret = caret == defaultCaret;
- final StyleRange styleAtOffset = content.getCharCount() > 0 ?
- (caretOffset < content.getCharCount() ?
- getStyleRangeAtOffset(caretOffset) :
- getStyleRangeAtOffset(content.getCharCount() - 1)) : // caret after last char: use last char style
- null;
- final int caretLine = getCaretLine();
+void setCaretLocations() {
+ Point[] newCaretPos = Arrays.stream(caretOffsets).mapToObj(this::getPointAtOffset).toArray(Point[]::new);
+ setCaretLocations(newCaretPos, getCaretDirection());
+}
+void setCaretLocations(final Point[] locations, int direction) {
+ Caret firstCaret = getCaret();
+ if (firstCaret != null) {
+ if (carets == null || carets.length == 0) {
+ carets = new Caret[] { firstCaret };
+ }
+ final boolean isDefaultCaret = firstCaret == defaultCaret;
+ if (locations.length > carets.length) {
+ int formerCaretCount = carets.length;
+ carets = Arrays.copyOf(carets, locations.length);
+ for (int i = formerCaretCount; i < carets.length; i++) {
+ carets[i] = new Caret(this, firstCaret.getStyle());
+ carets[i].setImage(firstCaret.getImage());
+ carets[i].setFont(firstCaret.getFont());
+ carets[i].setSize(firstCaret.getSize());
+ }
+ } else if (locations.length < carets.length) {
+ for (int i = locations.length; i < carets.length; i++) {
+ carets[i].dispose();
+ }
+ carets = Arrays.copyOf(carets, locations.length);
+ }
+ for (int i = Math.min(caretOffsets.length, locations.length)-1; i>=0; i--) { // reverse order, seee bug 579028#c7
+ final Caret caret = carets[i];
+ final int caretOffset = caretOffsets[i];
+ final Point location = locations[i];
+ final StyleRange styleAtOffset = content.getCharCount() > 0 ?
+ (caretOffset < content.getCharCount() ?
+ getStyleRangeAtOffset(caretOffset) :
+ getStyleRangeAtOffset(content.getCharCount() - 1)) : // caret after last char: use last char style
+ null;
+ final int caretLine = content.getLineAtOffset(caretOffset);
- int graphicalLineHeight = getLineHeight();
- final int lineStartOffset = getOffsetAtLine(caretLine);
- int graphicalLineFirstOffset = lineStartOffset;
- final int lineEndOffset = lineStartOffset + getLine(caretLine).length();
- int graphicalLineLastOffset = lineEndOffset;
- if (caretLine < getLineCount() && renderer.getLineHeight(caretLine) != getLineHeight()) { // word wrap, metrics, styles...
- graphicalLineHeight = getLineHeight(caretOffset);
- final Rectangle characterBounds = getBoundsAtOffset(caretOffset);
- graphicalLineFirstOffset = getOffsetAtPoint(new Point(leftMargin, characterBounds.y));
- graphicalLineLastOffset = getOffsetAtPoint(new Point(leftMargin, characterBounds.y + graphicalLineHeight)) - 1;
- if (graphicalLineLastOffset < graphicalLineFirstOffset) {
- graphicalLineLastOffset = getCharCount();
+ int graphicalLineHeight = getLineHeight();
+ final int lineStartOffset = getOffsetAtLine(caretLine);
+ int graphicalLineFirstOffset = lineStartOffset;
+ final int lineEndOffset = lineStartOffset + getLine(caretLine).length();
+ int graphicalLineLastOffset = lineEndOffset;
+ if (caretLine < getLineCount() && renderer.getLineHeight(caretLine) != getLineHeight()) { // word wrap, metrics, styles...
+ graphicalLineHeight = getLineHeight(caretOffset);
+ final Rectangle characterBounds = getBoundsAtOffset(caretOffset);
+ graphicalLineFirstOffset = getOffsetAtPoint(new Point(leftMargin, characterBounds.y));
+ graphicalLineLastOffset = getOffsetAtPoint(new Point(leftMargin, characterBounds.y + graphicalLineHeight)) - 1;
+ if (graphicalLineLastOffset < graphicalLineFirstOffset) {
+ graphicalLineLastOffset = getCharCount();
+ }
}
- }
- int caretHeight = getLineHeight();
- boolean isTextAlignedAtBottom = true;
- if (graphicalLineFirstOffset >= 0) {
- for (StyleRange style : getStyleRanges(graphicalLineFirstOffset, graphicalLineLastOffset - graphicalLineFirstOffset)) {
- isTextAlignedAtBottom &= (
- (style.font == null || Objects.equals(style.font, getFont())) &&
- style.rise >= 0 &&
- (style.metrics == null || style.metrics.descent <= 0)
- );
- }
- }
- if (!isTextAlignedAtBottom || (styleAtOffset != null && styleAtOffset.isVariableHeight())) {
- if (isDefaultCaret) {
- direction = SWT.DEFAULT;
- caretHeight = graphicalLineHeight;
- } else {
- caretHeight = caret.getSize().y;
+ int caretHeight = getLineHeight();
+ boolean isTextAlignedAtBottom = true;
+ if (graphicalLineFirstOffset >= 0) {
+ for (StyleRange style : getStyleRanges(graphicalLineFirstOffset, graphicalLineLastOffset - graphicalLineFirstOffset)) {
+ isTextAlignedAtBottom &= (
+ (style.font == null || Objects.equals(style.font, getFont())) &&
+ style.rise >= 0 &&
+ (style.metrics == null || style.metrics.descent <= 0)
+ );
+ }
}
- }
- if (isTextAlignedAtBottom && caretHeight < graphicalLineHeight) {
- location.y += (graphicalLineHeight - caretHeight);
- }
-
- int imageDirection = direction;
- if (isMirrored()) {
- if (imageDirection == SWT.LEFT) {
- imageDirection = SWT.RIGHT;
- } else if (imageDirection == SWT.RIGHT) {
- imageDirection = SWT.LEFT;
+ if (!isTextAlignedAtBottom || (styleAtOffset != null && styleAtOffset.isVariableHeight())) {
+ if (isDefaultCaret) {
+ direction = SWT.DEFAULT;
+ caretHeight = graphicalLineHeight;
+ } else {
+ caretHeight = caret.getSize().y;
+ }
}
- }
- if (isDefaultCaret && imageDirection == SWT.RIGHT) {
- location.x -= (caret.getSize().x - 1);
- }
- if (isDefaultCaret) {
- caret.setBounds(location.x, location.y, caretWidth, caretHeight);
- } else {
- caret.setLocation(location);
- }
- if (direction != caretDirection) {
- caretDirection = direction;
- if (isDefaultCaret) {
- if (imageDirection == SWT.DEFAULT) {
- defaultCaret.setImage(null);
- } else if (imageDirection == SWT.LEFT) {
- defaultCaret.setImage(leftCaretBitmap);
+ if (isTextAlignedAtBottom && caretHeight < graphicalLineHeight) {
+ location.y += (graphicalLineHeight - caretHeight);
+ }
+
+ int imageDirection = direction;
+ if (isMirrored()) {
+ if (imageDirection == SWT.LEFT) {
+ imageDirection = SWT.RIGHT;
} else if (imageDirection == SWT.RIGHT) {
- defaultCaret.setImage(rightCaretBitmap);
+ imageDirection = SWT.LEFT;
}
}
- if (caretDirection == SWT.LEFT) {
- BidiUtil.setKeyboardLanguage(BidiUtil.KEYBOARD_NON_BIDI);
- } else if (caretDirection == SWT.RIGHT) {
- BidiUtil.setKeyboardLanguage(BidiUtil.KEYBOARD_BIDI);
+ if (isDefaultCaret && imageDirection == SWT.RIGHT) {
+ location.x -= (caret.getSize().x - 1);
+ }
+ if (isDefaultCaret) {
+ caret.setBounds(location.x, location.y, caretWidth, caretHeight);
+ } else {
+ caret.setLocation(location);
+ }
+ if (direction != caretDirection) {
+ caretDirection = direction;
+ if (isDefaultCaret) {
+ if (imageDirection == SWT.DEFAULT) {
+ defaultCaret.setImage(null);
+ } else if (imageDirection == SWT.LEFT) {
+ defaultCaret.setImage(leftCaretBitmap);
+ } else if (imageDirection == SWT.RIGHT) {
+ defaultCaret.setImage(rightCaretBitmap);
+ }
+ }
+ if (caretDirection == SWT.LEFT) {
+ BidiUtil.setKeyboardLanguage(BidiUtil.KEYBOARD_NON_BIDI);
+ } else if (caretDirection == SWT.RIGHT) {
+ BidiUtil.setKeyboardLanguage(BidiUtil.KEYBOARD_BIDI);
+ }
}
}
updateCaretVisibility();
+ super.redraw();
}
- columnX = location.x;
+ columnX = locations[0].x;
}
/**
* Sets the caret offset.
@@ -8792,7 +9074,7 @@ void setCaretLocation(final Point location, int direction) {
public void setCaretOffset(int offset) {
checkWidget();
int length = getCharCount();
- if (length > 0 && offset != caretOffset) {
+ if (length > 0 && !Arrays.equals(caretOffsets, new int[] {offset})) {
if (offset < 0) {
offset = 0;
} else if (offset > length) {
@@ -8804,7 +9086,7 @@ public void setCaretOffset(int offset) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
}
- setCaretOffset(offset, PREVIOUS_OFFSET_TRAILING);
+ setCaretOffsets(new int[] {offset}, PREVIOUS_OFFSET_TRAILING);
// clear the selection if the caret is moved.
// don't notify listeners about the selection change.
if (blockSelection) {
@@ -8813,14 +9095,17 @@ public void setCaretOffset(int offset) {
clearSelection(false);
}
}
- setCaretLocation();
+ setCaretLocations();
}
-void setCaretOffset(int offset, int alignment) {
- if (caretOffset != offset) {
- caretOffset = offset;
+void setCaretOffsets(int[] newOffsets, int alignment) {
+ if (newOffsets.length > 1) {
+ newOffsets = Arrays.stream(newOffsets).distinct().sorted().toArray();
+ }
+ if (!Arrays.equals(caretOffsets, newOffsets)) {
+ caretOffsets = newOffsets;
if (isListening(ST.CaretMoved)) {
StyledTextEvent event = new StyledTextEvent(content);
- event.end = caretOffset;
+ event.end = caretOffsets[caretOffsets.length - 1];
notifyListeners(ST.CaretMoved, event);
}
}
@@ -8835,7 +9120,7 @@ void setCaretOffset(int offset, int alignment) {
* @param start start index of the text
* @param length length of text to place in clipboard
*
- * @exception SWTError, see Clipboard.setContents
+ * @exception SWTError
* @see org.eclipse.swt.dnd.Clipboard#setContents
*/
void setClipboardContent(int start, int length, int clipboardType) throws SWTError {
@@ -8934,6 +9219,43 @@ public void setEditable(boolean editable) {
checkWidget();
this.editable = editable;
}
+@Override
+public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ Display display = getDisplay();
+ this.enabled = enabled;
+ this.insideSetEnableCall = true;
+ try {
+ if (enabled && editable) {
+ if (!customBackground) setBackground(display.getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+ if (!customForeground) setForeground(display.getSystemColor(SWT.COLOR_LIST_FOREGROUND));
+ } else if(!enabled) {
+ if (!customBackground) setBackground(display.getSystemColor(SWT.COLOR_TEXT_DISABLED_BACKGROUND));
+ if (!customForeground) setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DISABLED_FOREGROUND));
+ } else if(!editable) {
+ if (!customBackground) setBackground(display.getSystemColor(SWT.COLOR_TEXT_DISABLED_BACKGROUND));
+ if (!customForeground) setForeground(display.getSystemColor(SWT.COLOR_LIST_FOREGROUND));
+ }
+ }
+ finally {
+ this.insideSetEnableCall = false;
+ }
+}
+
+@Override
+public boolean setFocus() {
+ boolean focusGained = super.setFocus();
+ if (focusGained && hasMultipleCarets()) {
+ // Multiple carets need to update their drawing. See bug 579179
+ setCaretLocations();
+ }
+ return focusGained;
+}
+
+private boolean hasMultipleCarets() {
+ return carets != null && carets.length > 1;
+}
+
/**
* Sets a new font to render text with.
* <p>
@@ -8966,16 +9288,29 @@ public void setFont(Font font) {
calculateScrollBars();
if (isBidiCaret()) createCaretBitmaps();
caretDirection = SWT.NULL;
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
@Override
public void setForeground(Color color) {
checkWidget();
+ boolean foregroundDisabled = false;
+ if (!this.enabled && color == null) {
+ if (foreground != null) {
+ Color disabledFg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_DISABLED_FOREGROUND);
+ if (foreground.equals(disabledFg)) {
+ return;
+ } else {
+ color = new Color (disabledFg.getRGBA());
+ foregroundDisabled = true;
+ }
+ }
+ }
+ customForeground = color != null && !this.insideSetEnableCall && !foregroundDisabled;
foreground = color;
- super.setForeground(getForeground());
+ super.setForeground(color);
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -9080,7 +9415,7 @@ public void setIndent(int indent) {
if (this.indent == indent || indent < 0) return;
this.indent = indent;
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -9102,7 +9437,7 @@ public void setJustify(boolean justify) {
if (this.justify == justify) return;
this.justify = justify;
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -9142,20 +9477,20 @@ public void setKeyBinding(int key, int action) {
if (action == SWT.NULL) {
keyActionMap.remove(newKey);
} else {
- keyActionMap.put(newKey, action);
+ keyActionMap.put(newKey, action);
}
ch = Character.toLowerCase(keyChar);
newKey = ch | modifierValue;
if (action == SWT.NULL) {
keyActionMap.remove(newKey);
} else {
- keyActionMap.put(newKey, action);
+ keyActionMap.put(newKey, action);
}
} else {
if (action == SWT.NULL) {
keyActionMap.remove(key);
} else {
- keyActionMap.put(key, action);
+ keyActionMap.put(key, action);
}
}
}
@@ -9220,9 +9555,8 @@ public void setLineAlignment(int startLine, int lineCount, int alignment) {
renderer.setLineAlignment(startLine, lineCount, alignment);
resetCache(startLine, lineCount);
redrawLines(startLine, lineCount, false);
- int caretLine = getCaretLine();
- if (startLine <= caretLine && caretLine < startLine + lineCount) {
- setCaretLocation();
+ if (Arrays.stream(caretOffsets).map(content::getLineAtOffset).anyMatch(caretLine -> startLine <= caretLine && caretLine < startLine + lineCount)) {
+ setCaretLocations();
}
setAlignment();
}
@@ -9317,16 +9651,10 @@ public void setLineBullet(int startLine, int lineCount, Bullet bullet) {
resetCache(startLine, lineCount);
int newBottom = getLinePixel(startLine + lineCount);
redrawLines(startLine, lineCount, oldBottom != newBottom);
- int caretLine = getCaretLine();
- if (startLine <= caretLine && caretLine < startLine + lineCount) {
- setCaretLocation();
+ if (Arrays.stream(caretOffsets).map(content::getLineAtOffset).anyMatch(caretLine -> startLine <= caretLine && caretLine < startLine + lineCount)) {
+ setCaretLocations();
}
}
-void setVariableLineHeight () {
- if (!fixedLineHeight) return;
- fixedLineHeight = false;
- renderer.calculateIdle();
-}
/**
* Returns true if StyledText is in word wrap mode and false otherwise.
*
@@ -9379,9 +9707,8 @@ public void setLineIndent(int startLine, int lineCount, int indent) {
resetCache(startLine, lineCount);
int newBottom = getLinePixel(startLine + lineCount);
redrawLines(startLine, lineCount, oldBottom != newBottom);
- int caretLine = getCaretLine();
- if (startLine <= caretLine && caretLine < startLine + lineCount) {
- setCaretLocation();
+ if (Arrays.stream(caretOffsets).map(content::getLineAtOffset).anyMatch(caretLine -> startLine <= caretLine && caretLine < startLine + lineCount)) {
+ setCaretLocations();
}
}
@@ -9425,21 +9752,47 @@ public void setLineVerticalIndent(int lineIndex, int verticalLineIndent) {
if (lineIndex < 0 || lineIndex >= content.getLineCount()) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- if (verticalLineIndent == renderer.getLineVerticalIndent(lineIndex)) {
- return;
- }
- setVariableLineHeight();
- int oldBottom = getLinePixel(lineIndex + 1);
- if (oldBottom <= getClientArea().height) {
- verticalScrollOffset = -1;
+ int previousVerticalIndent = renderer.getLineVerticalIndent(lineIndex);
+ if (verticalLineIndent == previousVerticalIndent) {
+ return;
}
+ int initialTopPixel = getTopPixel();
+ int initialTopIndex = getPartialTopIndex();
+ int initialBottomIndex = getPartialBottomIndex();
+ int verticalIndentDiff = verticalLineIndent - previousVerticalIndent;
renderer.setLineVerticalIndent(lineIndex, verticalLineIndent);
- resetCache(lineIndex, 1);
- int newBottom = getLinePixel(lineIndex + 1);
- redrawLines(lineIndex, 1, oldBottom != newBottom);
- int caretLine = getCaretLine();
- if (lineIndex <= caretLine && caretLine < lineIndex + 1) {
- setCaretLocation();
+ this.hasVerticalIndent = verticalLineIndent != 0 || renderer.hasVerticalIndent();
+ ScrollBar verticalScrollbar = getVerticalBar();
+ if (lineIndex < initialTopIndex) {
+ verticalScrollOffset += verticalIndentDiff; // just change value, don't actually scroll/redraw
+ if (verticalScrollbar != null) {
+ verticalScrollbar.setSelection(verticalScrollOffset);
+ verticalScrollbar.setMaximum(verticalScrollbar.getMaximum() + verticalIndentDiff);
+ }
+ } else if (lineIndex > initialBottomIndex) {
+ if (verticalScrollbar != null) {
+ verticalScrollbar.setMaximum(verticalScrollbar.getMaximum() + verticalIndentDiff);
+ }
+ } else {
+ resetCache(lineIndex, 1);
+ if((initialTopIndex == 0) && (initialBottomIndex == (content.getLineCount() - 1))) { // not scrollable editor
+ setCaretLocations();
+ redrawLines(lineIndex, getBottomIndex() - lineIndex + 1, true);
+ } else if (getFirstCaretLine() >= initialTopIndex && getFirstCaretLine() <= initialBottomIndex) { // caret line with caret mustn't move
+ if (getFirstCaretLine() < lineIndex) {
+ redrawLines(lineIndex, getPartialBottomIndex() - lineIndex + 1, true);
+ } else {
+ setTopPixel(initialTopPixel + verticalIndentDiff);
+ }
+ } else { // move as few lines as possible
+ if (lineIndex - getTopIndex() < getBottomIndex() - lineIndex) {
+ setTopPixel(initialTopPixel + verticalIndentDiff);
+ } else {
+ // redraw below
+ redrawLines(lineIndex, getPartialBottomIndex() - lineIndex + 1, true);
+ }
+ }
+ setScrollBars(true);
}
}
@@ -9486,9 +9839,8 @@ public void setLineJustify(int startLine, int lineCount, boolean justify) {
renderer.setLineJustify(startLine, lineCount, justify);
resetCache(startLine, lineCount);
redrawLines(startLine, lineCount, false);
- int caretLine = getCaretLine();
- if (startLine <= caretLine && caretLine < startLine + lineCount) {
- setCaretLocation();
+ if (Arrays.stream(caretOffsets).map(content::getLineAtOffset).anyMatch(caretLine -> startLine <= caretLine && caretLine < startLine + lineCount)) {
+ setCaretLocations();
}
}
/**
@@ -9508,9 +9860,8 @@ public void setLineSpacing(int lineSpacing) {
checkWidget();
if (this.lineSpacing == lineSpacing || lineSpacing < 0) return;
this.lineSpacing = lineSpacing;
- setVariableLineHeight();
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -9527,6 +9878,7 @@ public void setLineSpacing(int lineSpacing) {
*/
public void setLineSpacingProvider(StyledTextLineSpacingProvider lineSpacingProvider) {
checkWidget();
+ boolean wasFixedLineHeight = isFixedLineHeight();
if (renderer.getLineSpacingProvider() == null && lineSpacingProvider == null
|| (renderer.getLineSpacingProvider() != null
&& renderer.getLineSpacingProvider().equals(lineSpacingProvider)))
@@ -9534,17 +9886,16 @@ public void setLineSpacingProvider(StyledTextLineSpacingProvider lineSpacingProv
renderer.setLineSpacingProvider(lineSpacingProvider);
// reset lines cache if needed
if (lineSpacingProvider == null) {
- if (!isFixedLineHeight()) {
+ if (!wasFixedLineHeight) {
resetCache(0, content.getLineCount());
}
} else {
- if (isFixedLineHeight()) {
+ if (wasFixedLineHeight) {
int firstLine = -1;
for (int i = 0; i < content.getLineCount(); i++) {
Integer lineSpacing = lineSpacingProvider.getLineSpacing(i);
if (lineSpacing != null && lineSpacing > 0) {
// there is a custom line spacing, set StyledText as variable line height mode
- setVariableLineHeight();
// reset only the line size
renderer.reset(i, 1);
if (firstLine == -1) {
@@ -9558,7 +9909,7 @@ public void setLineSpacingProvider(StyledTextLineSpacingProvider lineSpacingProv
}
}
}
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -9613,9 +9964,8 @@ public void setLineTabStops(int startLine, int lineCount, int[] tabStops) {
}
resetCache(startLine, lineCount);
redrawLines(startLine, lineCount, false);
- int caretLine = getCaretLine();
- if (startLine <= caretLine && caretLine < startLine + lineCount) {
- setCaretLocation();
+ if (Arrays.stream(caretOffsets).map(content::getLineAtOffset).anyMatch(caretLine -> startLine <= caretLine && caretLine < startLine + lineCount)) {
+ setCaretLocations();
}
}
/**
@@ -9662,9 +10012,8 @@ public void setLineWrapIndent(int startLine, int lineCount, int wrapIndent) {
resetCache(startLine, lineCount);
int newBottom = getLinePixel(startLine + lineCount);
redrawLines(startLine, lineCount, oldBottom != newBottom);
- int caretLine = getCaretLine();
- if (startLine <= caretLine && caretLine < startLine + lineCount) {
- setCaretLocation();
+ if (Arrays.stream(caretOffsets).map(content::getLineAtOffset).anyMatch(caretLine -> startLine <= caretLine && caretLine < startLine + lineCount)) {
+ setCaretLocations();
}
}
@@ -9710,7 +10059,7 @@ public void setMargins (int leftMargin, int topMargin, int rightMargin, int bott
this.bottomMargin = Math.max(0, bottomMargin);
resetCache(0, content.getLineCount());
setScrollBars(true);
- setCaretLocation();
+ setCaretLocations();
setAlignment();
super.redraw();
}
@@ -9742,10 +10091,10 @@ public void setMouseNavigatorEnabled(boolean enabled) {
*/
void setMouseWordSelectionAnchor() {
if (doubleClickEnabled && clickCount > 1) {
- if (caretOffset < doubleClickSelection.x) {
- selectionAnchor = doubleClickSelection.y;
- } else if (caretOffset > doubleClickSelection.y) {
- selectionAnchor = doubleClickSelection.x;
+ if (caretOffsets[0] < doubleClickSelection.x) {
+ selectionAnchors[0] = doubleClickSelection.y;
+ } else if (caretOffsets[0] > doubleClickSelection.y) {
+ selectionAnchors[0] = doubleClickSelection.x;
}
}
}
@@ -9898,7 +10247,7 @@ public void setSelectionBackground (Color color) {
}
selectionBackground = color;
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -9927,7 +10276,7 @@ public void setSelectionForeground (Color color) {
}
selectionForeground = color;
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -9962,58 +10311,130 @@ public void setSelection(int start, int end) {
* the selection into view.
* </p>
*
- * @param start offset of the first selected character, start >= 0 must be true.
- * @param length number of characters to select, 0 <= start + length
- * <= getCharCount() must be true.
+ * @param start offset of the first selected character, start &gt;= 0 must be true.
+ * @param length number of characters to select, 0 &lt;= start + length
+ * &lt;= getCharCount() must be true.
* A negative length places the caret at the selection start.
* @param sendEvent a Selection event is sent when set to true and when
* the selection is reset.
*/
-void setSelection(int start, int length, boolean sendEvent, boolean doBlock) {
- int end = start + length;
- if (start > end) {
- int temp = end;
- end = start;
- start = temp;
- }
- // is the selection range different or is the selection direction
- // different?
- if (selection.x != start || selection.y != end ||
- (length > 0 && selectionAnchor != selection.x) ||
- (length < 0 && selectionAnchor != selection.y)) {
- if (blockSelection && doBlock) {
- if (length < 0) {
- setBlockSelectionOffset(end, start, sendEvent);
+void setSelection(int[] regions, boolean sendEvent, boolean doBlock) {
+ if (regions.length == 2 && selection.length == 1) { // single range before/after
+ int start = regions[0];
+ int length = regions[1];
+ int end = start + length;
+ if (start > end) {
+ int temp = end;
+ end = start;
+ start = temp;
+ }
+ int selectionAnchor = selectionAnchors[0];
+ // is the selection range different or is the selection direction
+ // different?
+ if (selection[0].x != start || selection[0].y != end ||
+ (length > 0 && selectionAnchor != selection[0].x) ||
+ (length < 0 && selectionAnchor != selection[0].y)) {
+ if (blockSelection && doBlock) {
+ if (length < 0) {
+ setBlockSelectionOffset(end, start, sendEvent);
+ } else {
+ setBlockSelectionOffset(start, end, sendEvent);
+ }
} else {
- setBlockSelectionOffset(start, end, sendEvent);
+ int oldStart = selection[0].x;
+ int oldLength = selection[0].y - selection[0].x;
+ int charCount = content.getCharCount();
+ // called internally to remove selection after text is removed
+ // therefore make sure redraw range is valid.
+ int redrawX = Math.min(selection[0].x, charCount);
+ int redrawY = Math.min(selection[0].y, charCount);
+ if (length < 0) {
+ selectionAnchors[0] = selectionAnchor = selection[0].y = end;
+ selection[0].x = start;
+ setCaretOffsets(new int[] {start}, PREVIOUS_OFFSET_TRAILING);
+ } else {
+ selectionAnchors[0] = selectionAnchor = selection[0].x = start;
+ selection[0].y = end;
+ setCaretOffsets(new int[] {end}, PREVIOUS_OFFSET_TRAILING);
+ }
+ redrawX = Math.min(redrawX, selection[0].x);
+ redrawY = Math.max(redrawY, selection[0].y);
+ if (redrawY - redrawX > 0) {
+ internalRedrawRange(redrawX, redrawY - redrawX);
+ }
+ if (sendEvent && (oldLength != end - start || (oldLength != 0 && oldStart != start))) {
+ sendSelectionEvent();
+ }
+ sendAccessibleTextCaretMoved();
}
- } else {
- int oldStart = selection.x;
- int oldLength = selection.y - selection.x;
- int charCount = content.getCharCount();
- // called internally to remove selection after text is removed
- // therefore make sure redraw range is valid.
- int redrawX = Math.min(selection.x, charCount);
- int redrawY = Math.min(selection.y, charCount);
- if (length < 0) {
- selectionAnchor = selection.y = end;
- selection.x = start;
- setCaretOffset(start, PREVIOUS_OFFSET_TRAILING);
+ }
+ } else if (!blockSelection || !doBlock) {
+ boolean caretAtEndOfSelection = regions[1] > 0;
+ int charCount = content.getCharCount();
+ Point[] newRanges = new Point[regions.length / 2];
+ for (int i = 0; i < regions.length; i += 2) {
+ int start = regions[i];
+ int length = regions[i + 1];
+ int end = start + length;
+ if (start > end) {
+ int temp = end;
+ end = start;
+ start = temp;
+ }
+ newRanges[i / 2] = new Point(start, end);
+ }
+ Arrays.sort(newRanges, SELECTION_COMPARATOR);
+ // merge contiguous ranges
+ int newRangeIndex = 0;
+ for (Point range : newRanges) {
+ if (newRangeIndex > 0) {
+ Point previousRange = newRanges[newRangeIndex - 1];
+ if (previousRange.y >= range.x) {
+ previousRange.y = Math.max(previousRange.y, range.y);
+ } else {
+ newRanges[newRangeIndex] = range;
+ newRangeIndex++;
+ }
} else {
- selectionAnchor = selection.x = start;
- selection.y = end;
- setCaretOffset(end, PREVIOUS_OFFSET_TRAILING);
- }
- redrawX = Math.min(redrawX, selection.x);
- redrawY = Math.max(redrawY, selection.y);
- if (redrawY - redrawX > 0) {
- internalRedrawRange(redrawX, redrawY - redrawX);
- }
- if (sendEvent && (oldLength != end - start || (oldLength != 0 && oldStart != start))) {
- sendSelectionEvent();
+ newRanges[newRangeIndex] = range;
+ newRangeIndex++;
+ }
+ }
+ Point[] toRedraw = new Point[newRangeIndex + selection.length];
+ System.arraycopy(newRanges, 0, toRedraw, 0, newRangeIndex);
+ System.arraycopy(selection, 0, toRedraw, newRangeIndex, selection.length);
+ Arrays.sort(toRedraw, SELECTION_COMPARATOR);
+ Point[] formerSelection = selection;
+ selection = Arrays.copyOf(newRanges, newRangeIndex);
+ Point currentToRedraw = null;
+ for (Point p : toRedraw) {
+ if (currentToRedraw == null) {
+ currentToRedraw = new Point(p.x, p.y);
+ } else if (currentToRedraw.y >= p.x - 1) {
+ // expand if necessary
+ currentToRedraw = new Point(currentToRedraw.x, Math.max(p.y, currentToRedraw.y));
+ } else {
+ currentToRedraw = new Point(Math.max(0, currentToRedraw.x), Math.min(charCount, currentToRedraw.y));
+ internalRedrawRange(currentToRedraw.x, currentToRedraw.y - currentToRedraw.x);
+ currentToRedraw = null;
}
- sendAccessibleTextCaretMoved();
}
+ if (currentToRedraw != null) {
+ currentToRedraw = new Point(Math.max(0, currentToRedraw.x), Math.min(charCount, currentToRedraw.y));
+ internalRedrawRange(currentToRedraw.x, currentToRedraw.y - currentToRedraw.x);
+ }
+ if (!caretAtEndOfSelection) {
+ selectionAnchors = Arrays.stream(selection).mapToInt(p -> p.y).toArray();
+ setCaretOffsets(Arrays.stream(selection).mapToInt(p -> p.x).toArray(), PREVIOUS_OFFSET_TRAILING);
+ } else {
+ selectionAnchors = Arrays.stream(selection).mapToInt(p -> p.x).toArray();
+ setCaretOffsets(Arrays.stream(selection).mapToInt(p -> p.y).toArray(), PREVIOUS_OFFSET_TRAILING);
+ }
+ setCaretLocations();
+ if (sendEvent && !Arrays.equals(formerSelection, selection)) {
+ sendSelectionEvent();
+ }
+ sendAccessibleTextCaretMoved();
}
}
/**
@@ -10036,24 +10457,59 @@ void setSelection(int start, int length, boolean sendEvent, boolean doBlock) {
* </ul>
*/
public void setSelectionRange(int start, int length) {
+ setSelectionRanges(new int[] { start, length });
+}
+
+/**
+ * Sets the selected locations/ranges.
+ * <p>
+ * The new selection may not be visible. Call showSelection to scroll the selection
+ * into view. A negative length places the caret at the visual start of the selection.
+ * </p>
+ *
+ * @param ranges an array of offset/length pairs.
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT when either the start or the end of one selection range is inside a
+ * multi byte line delimiter (and thus neither clearly in front of or after the line delimiter)</li>
+ * <li>ERROR_INVALID_ARGUMENT when ranges are null or size isn't valid (not pair)</li>
+ * </ul>
+ * @see #getSelectionRanges()
+ * @since 3.117
+ */
+public void setSelectionRanges(int[] ranges) {
checkWidget();
int contentLength = getCharCount();
- start = Math.max(0, Math.min (start, contentLength));
- int end = start + length;
- if (end < 0) {
- length = -start;
- } else {
- if (end > contentLength) length = contentLength - start;
- }
- if (isLineDelimiter(start) || isLineDelimiter(start + length)) {
- // the start offset or end offset of the selection range is inside a
- // multi byte line delimiter. This is an illegal operation and an exception
- // is thrown. Fixes 1GDKK3R
+ if (ranges.length % 2 != 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- setSelection(start, length, false, true);
- setCaretLocation();
+ int[] fixedRanges = Arrays.copyOf(ranges, ranges.length);
+ for (int i = 0; i < ranges.length; i+=2) {
+ int start = ranges[i];
+ start = Math.max(0, Math.min(start, contentLength));
+ int length = ranges[i + 1];
+ int end = start + length;
+ if (end < 0) {
+ length = -start;
+ } else if (end > contentLength) {
+ length = contentLength - start;
+ }
+ if (isLineDelimiter(start) || isLineDelimiter(start + length)) {
+ // the start offset or end offset of the selection range is inside a
+ // multi byte line delimiter. This is an illegal operation and an exception
+ // is thrown. Fixes 1GDKK3R
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ }
+ fixedRanges[i] = start;
+ fixedRanges[i + 1] = length;
+ }
+ setSelection(fixedRanges, false, true);
+ setCaretLocations();
}
+
/**
* Adds the specified style.
* <p>
@@ -10177,10 +10633,15 @@ public void setStyleRanges(int[] ranges, StyleRange[] styles) {
}
}
void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, boolean reset) {
+ int charCount = content.getCharCount();
+ if (reset) {
+ start = 0;
+ length = charCount;
+ }
int[] formerRanges = getRanges(start, length);
StyleRange[] formerStyles = getStyleRanges(start, length);
- int charCount = content.getCharCount();
int end = start + length;
+ final boolean wasFixedLineHeight = isFixedLineHeight();
if (start > end || start < 0) {
SWT.error(SWT.ERROR_INVALID_RANGE);
}
@@ -10192,7 +10653,6 @@ void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, bo
if (ranges.length != styles.length << 1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
int lastOffset = 0;
- boolean variableHeight = false;
for (int i = 0; i < styles.length; i ++) {
if (styles[i] == null) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int rangeStart, rangeLength;
@@ -10206,10 +10666,9 @@ void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, bo
if (rangeLength < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (!(0 <= rangeStart && rangeStart + rangeLength <= charCount)) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (lastOffset > rangeStart) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- variableHeight |= styles[i].isVariableHeight();
+ hasStyleWithVariableHeight |= styles[i].isVariableHeight();
lastOffset = rangeStart + rangeLength;
}
- if (variableHeight) setVariableLineHeight();
}
int rangeStart = start, rangeEnd = end;
if (styles != null && styles.length > 0) {
@@ -10221,6 +10680,8 @@ void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, bo
rangeEnd = styles[styles.length - 1].start + styles[styles.length - 1].length;
}
}
+
+ // This needs to happen before new styles are applied
int expectedBottom = 0;
if (!isFixedLineHeight() && !reset) {
int lineEnd = content.getLineAtOffset(Math.max(end, rangeEnd));
@@ -10239,6 +10700,13 @@ void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, bo
renderer.setStyleRanges(ranges, styles);
}
+ // re-evaluate variable height with all styles (including new ones)
+ hasStyleWithVariableHeight = false;
+ for (StyleRange style : getStyleRanges(false)) {
+ hasStyleWithVariableHeight = style.isVariableHeight();
+ if (hasStyleWithVariableHeight) break;
+ }
+
SortedSet<Integer> modifiedLines = computeModifiedLines(formerRanges, formerStyles, ranges, styles);
resetCache(modifiedLines);
if (reset) {
@@ -10257,14 +10725,14 @@ void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, bo
if (partialTopIndex <= lineEnd && lineEnd <= partialBottomIndex) {
bottom = getLinePixel(lineEnd + 1);
}
- if (!isFixedLineHeight() && bottom != expectedBottom) {
+ if (!(wasFixedLineHeight && isFixedLineHeight()) && bottom != expectedBottom) {
bottom = clientAreaHeight;
}
super.redraw(0, top, clientAreaWidth, bottom - top, false);
}
}
int oldColumnX = columnX;
- setCaretLocation();
+ setCaretLocations();
columnX = oldColumnX;
doMouseLinkCursor();
}
@@ -10273,7 +10741,7 @@ void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, bo
*
* @param referenceRanges former ranges, sorted by order and without overlapping, typically returned {@link #getRanges(int, int)}
* @param referenceStyles
- * @param newRanges former ranges, sorted by order and without overlappingz
+ * @param newRanges former ranges, sorted by order and without overlapping
* @param newStyles
* @return
*/
@@ -10316,9 +10784,9 @@ private SortedSet<Integer> computeModifiedLines(int[] referenceRanges, StyleRang
StyleRange referenceStyleAtCurrentOffset = defaultStyle;
if (isInRange(referenceRanges, referenceRangeIndex, currentOffset)) { // has styling
referenceStyleAtCurrentOffset = referenceStyles[referenceRangeIndex];
- nextMilestoneOffset = Math.min(nextMilestoneOffset, endRangeOffset(referenceRanges, referenceRangeIndex));
- } else if (referenceRangeIndex + 1 < referenceStyles.length) { // no range, default styling
- nextMilestoneOffset = referenceRanges[2 * (referenceRangeIndex + 1)]; // beginning of next range
+ nextMilestoneOffset = endRangeOffset(referenceRanges, referenceRangeIndex);
+ } else if (referenceRangeIndex < referenceStyles.length) { // no range, default styling
+ nextMilestoneOffset = referenceRanges[2 * referenceRangeIndex]; // beginning of next range
}
while (newRangeIndex < newStyles.length && endRangeOffset(newRanges, newRangeIndex) <= currentOffset) {
@@ -10328,8 +10796,8 @@ private SortedSet<Integer> computeModifiedLines(int[] referenceRanges, StyleRang
if (isInRange(newRanges, newRangeIndex, currentOffset)) {
newStyleAtCurrentOffset = newStyles[newRangeIndex];
nextMilestoneOffset = Math.min(nextMilestoneOffset, endRangeOffset(newRanges, newRangeIndex));
- } else if (newRangeIndex + 1 < newStyles.length) {
- nextMilestoneOffset = newRanges[2 * (newRangeIndex + 1)];
+ } else if (newRangeIndex < newStyles.length) {
+ nextMilestoneOffset = Math.min(nextMilestoneOffset, newRanges[2 * newRangeIndex]);
}
if (!referenceStyleAtCurrentOffset.similarTo(newStyleAtCurrentOffset)) {
@@ -10410,7 +10878,7 @@ private int endRangeOffset(int[] ranges, int styleIndex) {
public void setStyleRanges(StyleRange[] ranges) {
checkWidget();
if (isListening(ST.LineGetStyle)) return;
- if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
setStyleRanges(0, 0, null, ranges, true);
}
/**
@@ -10429,7 +10897,7 @@ public void setTabs(int tabs) {
tabLength = tabs;
renderer.setFont(null, tabs);
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
@@ -10445,7 +10913,7 @@ public void setTabs(int tabs) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
* @exception IllegalArgumentException <ul>
- * <li>ERROR_INVALID_ARGUMENT - if a tab stop is negavite or less than the previous stop in the list</li>
+ * <li>ERROR_INVALID_ARGUMENT - if a tab stop is negative or less than the previous stop in the list</li>
* </ul>
*
* @see StyledText#getTabStops()
@@ -10466,7 +10934,7 @@ public void setTabStops(int [] tabs) {
this.tabs = null;
}
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
@@ -10686,7 +11154,6 @@ public void setWordWrap(boolean wrap) {
if (wordWrap == wrap) return;
if (wordWrap && blockSelection) setBlockSelection(false);
wordWrap = wrap;
- setVariableLineHeight();
resetCache(0, content.getLineCount());
horizontalScrollOffset = 0;
ScrollBar horizontalBar = getHorizontalBar();
@@ -10694,7 +11161,7 @@ public void setWordWrap(boolean wrap) {
horizontalBar.setVisible(!wordWrap);
}
setScrollBars(true);
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
/**
@@ -10721,7 +11188,7 @@ public void setWrapIndent(int wrapIndent) {
if (this.wrapIndent == wrapIndent || wrapIndent < 0) return;
this.wrapIndent = wrapIndent;
resetCache(0, content.getLineCount());
- setCaretLocation();
+ setCaretLocations();
super.redraw();
}
boolean showLocation(Rectangle rect, boolean scrollPage) {
@@ -10754,9 +11221,9 @@ boolean showLocation(Rectangle rect, boolean scrollPage) {
* Sets the caret location and scrolls the caret offset into view.
*/
void showCaret() {
- Rectangle bounds = getBoundsAtOffset(caretOffset);
- if (!showLocation(bounds, true)) {
- setCaretLocation();
+ Rectangle bounds = getBoundsAtOffset(caretOffsets[0]);
+ if (!showLocation(bounds, true) || (carets != null && caretOffsets.length != carets.length)) {
+ setCaretLocations();
}
}
/**
@@ -10775,14 +11242,14 @@ void showCaret() {
public void showSelection() {
checkWidget();
// is selection from right-to-left?
- boolean rightToLeft = caretOffset == selection.x;
+ boolean rightToLeft = caretOffsets[0] == selection[0].x;
int startOffset, endOffset;
if (rightToLeft) {
- startOffset = selection.y;
- endOffset = selection.x;
+ startOffset = selection[0].y;
+ endOffset = selection[0].x;
} else {
- startOffset = selection.x;
- endOffset = selection.y;
+ startOffset = selection[0].x;
+ endOffset = selection[0].y;
}
Rectangle startBounds = getBoundsAtOffset(startOffset);
@@ -10799,7 +11266,7 @@ public void showSelection() {
endBounds = getBoundsAtOffset(endOffset);
}
// the character at endOffset is not part of the selection
- endBounds.width = endOffset == caretOffset ? getCaretWidth() : 0;
+ endBounds.width = endOffset == caretOffsets[0] ? getCaretWidth() : 0;
showLocation(endBounds, false);
} else {
// just show the end of the selection since the selection start
@@ -10810,15 +11277,20 @@ public void showSelection() {
void updateCaretVisibility() {
Caret caret = getCaret();
if (caret != null) {
+ if (carets == null || carets.length == 0) {
+ carets = new Caret[] { caret };
+ }
if (blockSelection && blockXLocation != -1) {
- caret.setVisible(false);
+ Arrays.stream(carets).forEach(c -> c.setVisible(false));
} else {
- Point location = caret.getLocation();
- Point size = caret.getSize();
- boolean visible =
- topMargin <= location.y + size.y && location.y <= clientAreaHeight - bottomMargin &&
- leftMargin <= location.x + size.x && location.x <= clientAreaWidth - rightMargin;
- caret.setVisible(visible);
+ Arrays.stream(carets).forEach(c -> {
+ Point location = c.getLocation();
+ Point size = c.getSize();
+ boolean visible =
+ topMargin <= location.y + size.y && location.y <= clientAreaHeight - bottomMargin &&
+ leftMargin <= location.x + size.x && location.x <= clientAreaWidth - rightMargin;
+ c.setVisible(visible);
+ });
}
}
}
@@ -10837,30 +11309,45 @@ void updateCaretVisibility() {
* @param newLength length of new text
*/
void updateSelection(int startOffset, int replacedLength, int newLength) {
- if (selection.y <= startOffset) {
+ if (selection[selection.length - 1].y <= startOffset) {
// selection ends before text change
- if (isWordWrap()) setCaretLocation();
+ if (isWordWrap()) setCaretLocations();
return;
}
- if (selection.x < startOffset) {
- // clear selection fragment before text change
- internalRedrawRange(selection.x, startOffset - selection.x);
- }
- if (selection.y > startOffset + replacedLength && selection.x < startOffset + replacedLength) {
- // clear selection fragment after text change.
- // do this only when the selection is actually affected by the
- // change. Selection is only affected if it intersects the change (1GDY217).
- int netNewLength = newLength - replacedLength;
- int redrawStart = startOffset + newLength;
- internalRedrawRange(redrawStart, selection.y + netNewLength - redrawStart);
- }
- if (selection.y > startOffset && selection.x < startOffset + replacedLength) {
- // selection intersects replaced text. set caret behind text change
- setSelection(startOffset + newLength, 0, true, false);
- } else {
- // move selection to keep same text selected
- setSelection(selection.x + newLength - replacedLength, selection.y - selection.x, true, false);
- }
- setCaretLocation();
+ // clear selection fragment before text change
+ Arrays.stream(selection)
+ .filter(sel -> sel.y > startOffset)
+ .filter(sel -> sel.x < startOffset)
+ .forEach(sel -> internalRedrawRange(sel.x, startOffset - sel.x));
+ Arrays.stream(selection)
+ .filter(sel -> sel.y > startOffset)
+ .filter(sel -> sel.y > startOffset + replacedLength && sel.x < startOffset + replacedLength)
+ .forEach(sel -> {
+ // clear selection fragment after text change.
+ // do this only when the selection is actually affected by the
+ // change. Selection is only affected if it intersects the change (1GDY217).
+ int netNewLength = newLength - replacedLength;
+ int redrawStart = startOffset + newLength;
+ internalRedrawRange(redrawStart, sel.y + netNewLength - redrawStart);
+ });
+ setSelection(Arrays.stream(selection).map(sel -> {
+ if (sel.y <= startOffset) {
+ return sel;
+ } else if (sel.x == startOffset && sel.y == startOffset + replacedLength) {
+ return new Point(startOffset + newLength, startOffset + newLength);
+ } else if (sel.y > startOffset && sel.x < startOffset + replacedLength) {
+ // selection intersects replaced text. set caret behind text change
+ return new Point(startOffset + newLength, startOffset + newLength);
+ } else {
+ // move selection to keep same text selected
+ int x = sel.x + newLength - replacedLength;
+ int y = sel.x + newLength - replacedLength + (sel.y - sel.x);
+
+ return new Point(x < 0 ? 0 : x, y < 0 ? 0 : y);
+ }
+ }).flatMapToInt(p -> IntStream.of(p.x, p.y - p.x))
+ .toArray(), true, false);
+ setCaretLocations();
}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextContent.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextContent.java
index 72a12b0ac2..cd3330cf3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextContent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextContent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -119,7 +119,7 @@ public int getLineCount();
* Return the line delimiter that should be used by the StyledText
* widget when inserting new lines. New lines entered using key strokes
* and paste operations use this line delimiter.
- * Implementors may use System.getProperty("line.separator") to return
+ * Implementors may use System.lineSeparator() to return
* the platform line delimiter.
* <p>
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java
index 8d0474677b..430a77d6b4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java
@@ -1,37 +1,37 @@
-/**
- * Copyright (c) 2017 Angelo ZERR.
+/**
+ * Copyright (c) 2017 Angelo ZERR.
*
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr <angelo.zerr@gmail.com> - Customize different line spacing of StyledText - Bug 522020
- */
-package org.eclipse.swt.custom;
-
-/**
- * Line spacing provider used to customize different line spacing for some lines
- * of {@link StyledText}
- *
- * @since 3.107
- */
-@FunctionalInterface
-public interface StyledTextLineSpacingProvider {
-
- /**
- * Returns the line spacing of the given line index and null otherwise. In this
- * case, it will use the {@link StyledText#getLineSpacing()}.
- *
- * @param lineIndex
- * line index.
- * @return the line spacing of the given line index and null otherwise. In this
- * case, it will use the {@link StyledText#getLineSpacing()}.
- * @since 3.107
- */
- Integer getLineSpacing(int lineIndex);
-
-}
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr <angelo.zerr@gmail.com> - Customize different line spacing of StyledText - Bug 522020
+ */
+package org.eclipse.swt.custom;
+
+/**
+ * Line spacing provider used to customize different line spacing for some lines
+ * of {@link StyledText}
+ *
+ * @since 3.107
+ */
+@FunctionalInterface
+public interface StyledTextLineSpacingProvider {
+
+ /**
+ * Returns the line spacing of the given line index and null otherwise. In this
+ * case, it will use the {@link StyledText#getLineSpacing()}.
+ *
+ * @param lineIndex
+ * line index.
+ * @return the line spacing of the given line index and null otherwise. In this
+ * case, it will use the {@link StyledText#getLineSpacing()}.
+ * @since 3.107
+ */
+ Integer getLineSpacing(int lineIndex);
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
index 98c43dbb3f..1a866a01a5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
@@ -17,6 +17,7 @@ package org.eclipse.swt.custom;
import java.util.*;
+import java.util.List;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
@@ -50,6 +51,8 @@ class StyledTextRenderer {
LineInfo[] lines;
int maxWidth;
int maxWidthLineIndex;
+ float averageLineHeight;
+ int linesInAverageLineHeight;
boolean idleRunning;
/* Bullet */
@@ -296,6 +299,7 @@ void calculate(int startLine, int lineCount) {
Rectangle rect = layout.getBounds();
line.width = rect.width + hTrim;
line.height = rect.height;
+ averageLineHeight += (line.height - Math.round(averageLineHeight)) / ++linesInAverageLineHeight;
disposeTextLayout(layout);
}
if (line.width > maxWidth) {
@@ -410,8 +414,8 @@ void dispose() {
}
void disposeTextLayout (TextLayout layout) {
if (layouts != null) {
- for (int i = 0; i < layouts.length; i++) {
- if (layouts[i] == layout) return;
+ for (TextLayout l : layouts) {
+ if (l == layout) return;
}
}
layout.dispose();
@@ -450,12 +454,6 @@ int drawLine(int lineIndex, int paintX, int paintY, GC gc, Color widgetBackgroun
String line = content.getLine(lineIndex);
int lineOffset = content.getOffsetAtLine(lineIndex);
int lineLength = line.length();
- Point selection = styledText.getSelection();
- int selectionStart = selection.x - lineOffset;
- int selectionEnd = selection.y - lineOffset;
- if (styledText.getBlockSelection()) {
- selectionStart = selectionEnd = 0;
- }
Rectangle client = styledText.getClientArea();
Color lineBackground = getLineBackground(lineIndex, null);
StyledTextEvent event = styledText.getLineBackgroundData(lineOffset, line);
@@ -474,23 +472,23 @@ int drawLine(int lineIndex, int paintX, int paintY, GC gc, Color widgetBackgroun
styledText.drawBackground(gc, client.x, paintY, client.width, height);
}
gc.setForeground(widgetForeground);
- if (selectionStart == selectionEnd || (selectionEnd <= 0 && selectionStart > lineLength - 1)) {
+ Point[] selection = intersectingRelativeNonEmptySelections(lineOffset, lineOffset + lineLength);
+ if (styledText.getBlockSelection() || selection.length == 0) {
layout.draw(gc, paintX, paintY);
} else {
- int start = Math.max(0, selectionStart);
- int end = Math.min(lineLength, selectionEnd);
Color selectionFg = styledText.getSelectionForeground();
Color selectionBg = styledText.getSelectionBackground();
- int flags;
- if ((styledText.getStyle() & SWT.FULL_SELECTION) != 0) {
- flags = SWT.FULL_SELECTION;
- } else {
- flags = SWT.DELIMITER_SELECTION;
- }
- if (selectionStart <= lineLength && lineLength < selectionEnd ) {
- flags |= SWT.LAST_LINE_SELECTION;
+ final int baseFlags = (styledText.getStyle() & SWT.FULL_SELECTION) != 0 ? SWT.FULL_SELECTION : SWT.DELIMITER_SELECTION;
+ for (Point relativeSelection : selection) {
+ int start = Math.max(0, relativeSelection.x);
+ int end = Math.min(lineLength, relativeSelection.y);
+ int flags = baseFlags;
+ if (relativeSelection.x <= lineLength && lineLength < relativeSelection.y ) {
+ flags |= SWT.LAST_LINE_SELECTION;
+ }
+ // TODO calling draw multiple times here prints line multiple times, overriding some colors
+ layout.draw(gc, paintX, paintY, start, end - 1, selectionFg, selectionBg, flags);
}
- layout.draw(gc, paintX, paintY, start, end - 1, selectionFg, selectionBg, flags);
}
// draw objects
@@ -504,8 +502,8 @@ int drawLine(int lineIndex, int paintX, int paintY, GC gc, Color widgetBackgroun
bulletIndex = bulletsIndices[index];
}
} else {
- for (int i = 0; i < bullets.length; i++) {
- bullet = bullets[i];
+ for (Bullet b : bullets) {
+ bullet = b;
bulletIndex = bullet.indexOf(lineIndex);
if (bulletIndex != -1) break;
}
@@ -540,9 +538,27 @@ int drawLine(int lineIndex, int paintX, int paintY, GC gc, Color widgetBackgroun
disposeTextLayout(layout);
return height;
}
+private Point[] intersectingRelativeNonEmptySelections(int fromOffset, int toOffset) {
+ int[] selectionRanges = styledText.getSelectionRanges();
+ int lineLength = toOffset - fromOffset;
+ List<Point> res = new ArrayList<>();
+ for (int i = 0; i < selectionRanges.length; i += 2) {
+ // ranges are assumed to be sorted by start offset, then (positive)length or higher end offset
+ Point relativeSelection = new Point(selectionRanges[i] - fromOffset, selectionRanges[i] + selectionRanges[i + 1] - fromOffset);
+ if (relativeSelection.x != relativeSelection.y &&
+ relativeSelection.x <= lineLength && relativeSelection.y >= 0) {
+ res.add(relativeSelection);
+ }
+ }
+ return res.toArray(new Point[res.size()]);
+}
+
int getBaseline() {
return ascent;
}
+int getCachedLineHeight(int lineIndex) {
+ return getLineHeight(lineIndex, false);
+}
Font getFont(int style) {
switch (style) {
case SWT.BOLD:
@@ -560,8 +576,8 @@ Font getFont(int style) {
}
FontData[] getFontData(int style) {
FontData[] fontDatas = regularFont.getFontData();
- for (int i = 0; i < fontDatas.length; i++) {
- fontDatas[i].setStyle(style);
+ for (FontData fontData : fontDatas) {
+ fontData.setStyle(style);
}
return fontDatas;
}
@@ -604,8 +620,7 @@ boolean hasLink(int offset) {
}
}
} else {
- for (int i = 0; i < styles.length; i++) {
- StyleRange style = styles[i];
+ for (StyleRange style : styles) {
if (style.start <= offset && offset < style.start + style.length && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
return true;
}
@@ -646,8 +661,7 @@ Color getLineBackground(int index, Color defaultBackground) {
Bullet getLineBullet (int index, Bullet defaultBullet) {
if (bullets == null) return defaultBullet;
if (bulletsIndices != null) return defaultBullet;
- for (int i = 0; i < bullets.length; i++) {
- Bullet bullet = bullets[i];
+ for (Bullet bullet : bullets) {
if (bullet.indexOf(index) != -1) return bullet;
}
return defaultBullet;
@@ -656,14 +670,21 @@ int getLineHeight() {
return ascent + descent;
}
int getLineHeight(int lineIndex) {
+ return getLineHeight(lineIndex, true);
+}
+int getLineHeight(int lineIndex, boolean exact) {
LineSizeInfo line = getLineSize(lineIndex);
if (line.needsRecalculateHeight()) {
- // here we are in "variable line height", the call of calculate which uses TextLayout can be very slow
- // check if line can use the default line height.
+ // here we are in "variable line height", the call of calculate which uses TextLayout is very slow
+ // so use the average line height of all calculated lines when many heights are needed e.g. for scrolling.
if (isVariableHeight(lineIndex)) {
- calculate(lineIndex, 1);
+ if (exact) {
+ calculate(lineIndex, 1);
+ } else {
+ return Math.round(averageLineHeight);
+ }
} else {
- line.height = getLineHeight() + getLineSpacing(lineIndex);
+ line.height = getLineHeight() + getLineSpacing(lineIndex) + getLineVerticalIndent(lineIndex);
}
}
return line.height;
@@ -911,8 +932,7 @@ TextLayout getTextLayout(int lineIndex) {
*/
lineSpacingComputing = true;
styledText.resetCache(lineIndex, 1);
- styledText.setVariableLineHeight();
- styledText.setCaretLocation();
+ styledText.setCaretLocations();
styledText.redraw();
} finally {
lineSpacingComputing = false;
@@ -931,6 +951,19 @@ boolean isSameLineSpacing(int lineIndex, int newLineSpacing) {
}
return false;
}
+
+private static final class StyleEntry {
+ public final int start;
+ public final int end;
+ public final TextStyle style;
+
+ public StyleEntry(TextStyle style, int start, int end) {
+ this.style = style;
+ this.start = start;
+ this.end = end;
+ }
+}
+
TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpacing) {
TextLayout layout = null;
if (styledText != null) {
@@ -1035,8 +1068,8 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
if (styledText.isFixedLineHeight()) {
for (int i = 0; i < styleCount; i++) {
if (styles[i].isVariableHeight()) {
+ styledText.hasStyleWithVariableHeight = true;
styledText.verticalScrollOffset = -1;
- styledText.setVariableLineHeight();
styledText.redraw();
break;
}
@@ -1071,9 +1104,9 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
bulletsIndices = null;
}
if (bullets != null) {
- for (int i = 0; i < bullets.length; i++) {
- if (bullets[i].indexOf(lineIndex) != -1) {
- bullet = bullets[i];
+ for (Bullet b : bullets) {
+ if (b.indexOf(lineIndex) != -1) {
+ bullet = b;
break;
}
}
@@ -1092,24 +1125,13 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
GlyphMetrics metrics = style.metrics;
indent += metrics.width;
}
- layout.setFont(regularFont);
- layout.setAscent(ascent);
- layout.setDescent(descent);
- layout.setText(line);
- layout.setOrientation(orientation);
- layout.setSegments(segments);
- layout.setSegmentsChars(segmentChars);
- layout.setWidth(width);
- layout.setSpacing(lineSpacing);
- layout.setTabs(tabs);
- layout.setDefaultTabWidth(tabLength);
- layout.setIndent(indent);
- layout.setVerticalIndent(verticalIndent);
- layout.setWrapIndent(wrapIndent);
- layout.setAlignment(alignment);
- layout.setJustify(justify);
- layout.setTextDirection(textDirection);
+ // prepare styles, as it may change the line content, do it before calling layout.setText()
+ // This needs to happen early to handle the case of GlyphMetrics on \t.
+ // The root cause is that TextLayout doesn't return the right value for the bounds when
+ // GlyphMetrics are applied on \t. A better fix could be implemented directly in (all 3)
+ // TextLayout classes.
+ List<StyleEntry> styleEntries = new ArrayList<>();
int lastOffset = 0;
int length = line.length();
if (styles != null) {
@@ -1126,9 +1148,17 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
}
if (start >= length) break;
if (lastOffset < start) {
- layout.setStyle(null, lastOffset, start - 1);
+ styleEntries.add(new StyleEntry(null, lastOffset, start - 1));
}
- layout.setStyle(getStyleRange(styles[i >> 1]), start, end);
+ TextStyle style = getStyleRange(styles[i >> 1]);
+ int endIndex = Math.max(start, Math.min(length, end + 1));
+ if (style.metrics != null && line.substring(start, endIndex).contains("\t")) {
+ line =
+ line.substring(0, start) +
+ line.substring(start, endIndex).replace('\t', ' ') +
+ (end < line.length() ? line.substring(end + 1, line.length()) : "");
+ }
+ styleEntries.add(new StyleEntry(style, start, end));
lastOffset = Math.max(lastOffset, end);
}
} else {
@@ -1143,14 +1173,45 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
}
if (start >= length) break;
if (lastOffset < start) {
- layout.setStyle(null, lastOffset, start - 1);
+ styleEntries.add(new StyleEntry(null, lastOffset, start - 1));
+ }
+ TextStyle style = getStyleRange(styles[i]);
+ int endIndex = Math.max(start, Math.min(length, end + 1));
+ if (style.metrics != null && line.substring(start, endIndex).contains("\t")) {
+ line =
+ line.substring(0, start) +
+ line.substring(start, endIndex).replace('\t', ' ') +
+ (end < line.length() ? line.substring(end + 1, line.length()) : "");
}
- layout.setStyle(getStyleRange(styles[i]), start, end);
+ styleEntries.add(new StyleEntry(style, start, end));
lastOffset = Math.max(lastOffset, end);
}
}
}
- if (lastOffset < length) layout.setStyle(null, lastOffset, length);
+ if (lastOffset < length) styleEntries.add(new StyleEntry(null, lastOffset, length));
+
+ layout.setFont(regularFont);
+ layout.setAscent(ascent);
+ layout.setDescent(descent);
+ layout.setText(line);
+ layout.setOrientation(orientation);
+ layout.setSegments(segments);
+ layout.setSegmentsChars(segmentChars);
+ layout.setWidth(width);
+ layout.setSpacing(lineSpacing);
+ layout.setTabs(tabs);
+ layout.setDefaultTabWidth(tabLength);
+ layout.setIndent(indent);
+ layout.setVerticalIndent(verticalIndent);
+ layout.setWrapIndent(wrapIndent);
+ layout.setAlignment(alignment);
+ layout.setJustify(justify);
+ layout.setTextDirection(textDirection);
+ // apply styles, must be done after layout.setText()
+ for (StyleEntry styleEntry : styleEntries) {
+ layout.setStyle(styleEntry.style, styleEntry.start, styleEntry.end);
+ }
+
if (styledText != null && styledText.ime != null) {
IME ime = styledText.ime;
int compositionOffset = ime.getCompositionOffset();
@@ -1220,10 +1281,10 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
ascent = metrics.getAscent() + metrics.getLeading();
descent = metrics.getDescent();
if (layouts != null) {
- for (int i = 0; i < layouts.length; i++) {
- if (layouts[i] != null && layouts[i] != layout) {
- layouts[i].setAscent(ascent);
- layouts[i].setDescent(descent);
+ for (TextLayout l : layouts) {
+ if (l != null && l != layout) {
+ l.setAscent(ascent);
+ l.setDescent(descent);
}
}
}
@@ -1242,7 +1303,7 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
}
if (styledText.isBidiCaret()) styledText.createCaretBitmaps();
styledText.caretDirection = SWT.NULL;
- styledText.setCaretLocation();
+ styledText.setCaretLocations();
styledText.redraw();
}
}
@@ -1253,8 +1314,7 @@ int getWidth() {
}
void reset() {
if (layouts != null) {
- for (int i = 0; i < layouts.length; i++) {
- TextLayout layout = layouts[i];
+ for (TextLayout layout : layouts) {
if (layout != null) layout.dispose();
}
layouts = null;
@@ -1289,6 +1349,12 @@ void reset(Set<Integer> lines) {
getLineSize(line.intValue()).resetSize();
}
}
+ if (linesInAverageLineHeight > resetLineCount) {
+ linesInAverageLineHeight -= resetLineCount;
+ } else {
+ linesInAverageLineHeight = 0;
+ averageLineHeight = 0.0f;
+ }
if (lines.contains(Integer.valueOf(maxWidthLineIndex))) {
maxWidth = 0;
maxWidthLineIndex = -1;
@@ -1419,7 +1485,12 @@ void setLineVerticalIndent(int lineIndex, int verticalLineIndent) {
lines[lineIndex] = new LineInfo();
}
lines[lineIndex].flags |= VERTICAL_INDENT;
+ int delta = verticalLineIndent - lines[lineIndex].verticalIndent;
lines[lineIndex].verticalIndent = verticalLineIndent;
+ LineSizeInfo info = getLineSize(lineIndex);
+ if (!info.needsRecalculateHeight()) {
+ info.height += delta;
+ }
}
void setLineWrapIndent(int startLine, int count, int wrapIndent) {
if (lines == null) lines = new LineInfo[lineCount];
@@ -1596,8 +1667,8 @@ void setStyleRanges (int[] newRanges, StyleRange[] newStyles) {
}
modifyEnd = modifyStart;
StyleRange[] mergeStyles = new StyleRange[3];
- for (int i = 0; i < newStyles.length; i++) {
- StyleRange newStyle = newStyles[i], style;
+ for (StyleRange newStyle : newStyles) {
+ StyleRange style;
int newStart = newStyle.start;
int newEnd = newStart + newStyle.length;
if (newStart == newEnd) continue;
@@ -1752,8 +1823,7 @@ void textChanging(TextChangingEvent event) {
void updateBullets(int startLine, int replaceLineCount, int newLineCount, boolean update) {
if (bullets == null) return;
if (bulletsIndices != null) return;
- for (int i = 0; i < bullets.length; i++) {
- Bullet bullet = bullets[i];
+ for (Bullet bullet : bullets) {
int[] lines = bullet.removeIndices(startLine, replaceLineCount, newLineCount, update);
if (lines != null) {
if (redrawLines == null) {
@@ -1767,8 +1837,8 @@ void updateBullets(int startLine, int replaceLineCount, int newLineCount, boolea
}
}
int removed = 0;
- for (int i = 0; i < bullets.length; i++) {
- if (bullets[i].size() == 0) removed++;
+ for (Bullet bullet : bullets) {
+ if (bullet.size() == 0) removed++;
}
if (removed > 0) {
if (removed == bullets.length) {
@@ -1887,5 +1957,11 @@ void updateRanges(int start, int replaceCharCount, int newCharCount) {
}
}
+public boolean hasVerticalIndent() {
+ return Arrays.stream(lines).filter(Objects::nonNull) //
+ .mapToInt(line -> line.verticalIndent) //
+ .anyMatch(n -> n != 0);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
index fac86edaab..a1619c6efb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
@@ -115,8 +115,8 @@ public TableCursor(Table parent, int style) {
}
};
int[] events = new int[] {SWT.Dispose, SWT.FocusIn, SWT.FocusOut, SWT.KeyDown, SWT.Paint, SWT.Traverse};
- for (int i = 0; i < events.length; i++) {
- addListener(events[i], listener);
+ for (int event : events) {
+ addListener(event, listener);
}
tableListener = event -> {
@@ -240,26 +240,26 @@ void keyDown(Event event) {
case SWT.ARROW_DOWN :
setRowColumn(Math.min(rowIndex + 1, table.getItemCount() - 1), columnIndex, true);
break;
- case SWT.ARROW_LEFT :
- case SWT.ARROW_RIGHT :
- {
- int columnCount = table.getColumnCount();
- if (columnCount == 0) break;
- int[] order = table.getColumnOrder();
- int index = 0;
- while (index < order.length) {
- if (order[index] == columnIndex) break;
- index++;
+ case SWT.ARROW_LEFT :
+ case SWT.ARROW_RIGHT :
+ {
+ int columnCount = table.getColumnCount();
+ if (columnCount == 0) break;
+ int[] order = table.getColumnOrder();
+ int index = 0;
+ while (index < order.length) {
+ if (order[index] == columnIndex) break;
+ index++;
}
if (index == order.length) index = 0;
- int leadKey = (getStyle() & SWT.RIGHT_TO_LEFT) != 0 ? SWT.ARROW_RIGHT : SWT.ARROW_LEFT;
- if (event.keyCode == leadKey) {
- setRowColumn(rowIndex, order[Math.max(0, index - 1)], true);
- } else {
- setRowColumn(rowIndex, order[Math.min(columnCount - 1, index + 1)], true);
- }
- break;
- }
+ int leadKey = (getStyle() & SWT.RIGHT_TO_LEFT) != 0 ? SWT.ARROW_RIGHT : SWT.ARROW_LEFT;
+ if (event.keyCode == leadKey) {
+ setRowColumn(rowIndex, order[Math.max(0, index - 1)], true);
+ } else {
+ setRowColumn(rowIndex, order[Math.min(columnCount - 1, index + 1)], true);
+ }
+ break;
+ }
case SWT.HOME :
setRowColumn(0, columnIndex, true);
break;
@@ -633,7 +633,7 @@ public void setSelection(int row, int column) {
int columnCount = table.getColumnCount();
int maxColumnIndex = columnCount == 0 ? 0 : columnCount - 1;
if (row < 0
- || row >= table.getItemCount()
+ || row >= table.getItemCount()
|| column < 0
|| column > maxColumnIndex)
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java
index 7692fbd466..574dd987a5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java
@@ -103,7 +103,7 @@ public TableEditor (Table table) {
layout ();
}
};
- timer = () -> layout ();
+ timer = this::layout;
// To be consistent with older versions of SWT, grabVertical defaults to true
grabVertical = true;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java
index 051dee6e88..a2cc0db0f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java
@@ -131,8 +131,8 @@ public TreeCursor(Tree parent, int style) {
}
};
int[] events = new int[] { SWT.Dispose, SWT.FocusIn, SWT.FocusOut, SWT.KeyDown, SWT.Paint, SWT.Traverse };
- for (int i = 0; i < events.length; i++) {
- addListener(events[i], listener);
+ for (int event : events) {
+ addListener(event, listener);
}
treeListener = event -> {
@@ -280,9 +280,8 @@ int countSubTreePages(TreeItem root) {
if (root == null) return 0;
if (root.getItemCount() == 0) return 1;
if (!root.getExpanded()) return 1;
- TreeItem[] items = root.getItems();
- for (int i = 0; i < items.length; i++) {
- pages += countSubTreePages(items[i]);
+ for (TreeItem item : root.getItems()) {
+ pages += countSubTreePages(item);
}
return pages;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java
index 5ec8f9503a..0f91ee3600 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java
@@ -103,7 +103,7 @@ public TreeEditor (Tree tree) {
layout();
}
};
- timer = () -> layout ();
+ timer = this::layout;
treeListener = new TreeListener () {
final Runnable runnable = () -> {
if (editor == null || editor.isDisposed()) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
index cb5615c579..a1291fdbf8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
@@ -49,29 +49,29 @@ public class ViewForm extends Composite {
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
* that will be placed along the top and bottom edges of the form.
*
* The default value is 0.
*/
- public int marginHeight = 0;
- /**
+ public int marginHeight = 0;
+ /**
* horizontalSpacing specifies the number of points between the right
* edge of one cell and the left edge of its neighbouring cell to
* the right.
*
* The default value is 1.
*/
- public int horizontalSpacing = 1;
+ public int horizontalSpacing = 1;
/**
* verticalSpacing specifies the number of points between the bottom
* edge of one cell and the top edge of its neighbouring cell underneath.
*
* The default value is 1.
*/
- public int verticalSpacing = 1;
+ public int verticalSpacing = 1;
/**
* Color of innermost line of drop shadow border.
@@ -171,8 +171,8 @@ public ViewForm(Composite parent, int style) {
int[] events = new int[] {SWT.Dispose, SWT.Paint, SWT.Resize};
- for (int i = 0; i < events.length; i++) {
- addListener(events[i], listener);
+ for (int event : events) {
+ addListener(event, listener);
}
}
@@ -288,7 +288,7 @@ void onPaint(GC gc) {
int x2 = size.x - 1;
int y2 = size.y - 1;
int[] shape = new int[] {x1,y1, x2,y1, x2,y2, x1,y2, x1,y1+highlight,
- x1+highlight,y1+highlight, x1+highlight,y2-highlight,
+ x1+highlight,y1+highlight, x1+highlight,y2-highlight,
x2-highlight,y2-highlight, x2-highlight,y1+highlight, x1,y1+highlight};
Color highlightColor = getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION);
gc.setBackground(highlightColor);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
index b029028d9f..6ae35e4b42 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
@@ -38,16 +38,16 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
}
Point centerSize = new Point(0, 0);
if (center != null) {
- centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
Point rightSize = new Point(0, 0);
if (right != null) {
- rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
Point size = new Point(0, 0);
// calculate width of title bar
if (form.separateTopCenter ||
- (wHint != SWT.DEFAULT && leftSize.x + centerSize.x + rightSize.x > wHint)) {
+ (wHint != SWT.DEFAULT && leftSize.x + centerSize.x + rightSize.x > wHint)) {
size.x = leftSize.x + rightSize.x;
if (leftSize.x > 0 && rightSize.x > 0) size.x += form.horizontalSpacing;
size.x = Math.max(centerSize.x, size.x);
@@ -104,7 +104,7 @@ int computeTrim(Control c) {
@Override
protected boolean flushCache(Control control) {
Object data = control.getLayoutData();
- if (data != null && data instanceof CLayoutData) ((CLayoutData)data).flushCache();
+ if (data instanceof CLayoutData) ((CLayoutData)data).flushCache();
return true;
}
@@ -124,11 +124,11 @@ protected void layout(Composite composite, boolean flushCache) {
}
Point centerSize = new Point(0, 0);
if (center != null && !center.isDisposed()) {
- centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
Point rightSize = new Point(0, 0);
if (right != null && !right.isDisposed()) {
- rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
int minTopWidth = leftSize.x + centerSize.x + rightSize.x + 2*form.marginWidth + 2*form.highlight;
@@ -200,7 +200,7 @@ protected void layout(Composite composite, boolean flushCache) {
form.separator = y;
y++;
}
- content.setBounds(rect.x + form.marginWidth + form.highlight, y, rect.width - 2 * form.marginWidth - 2*form.highlight, rect.y + rect.height - y - form.marginHeight - form.highlight);
+ content.setBounds(rect.x + form.marginWidth + form.highlight, y, rect.width - 2 * form.marginWidth - 2*form.highlight, rect.y + rect.height - y - form.marginHeight - form.highlight);
}
if (oldSeperator != form.separator) {
int t, b;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ByteArrayTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ByteArrayTransfer.java
index a0a38c9975..80a8018d39 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ByteArrayTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ByteArrayTransfer.java
@@ -180,7 +180,7 @@ protected Object nativeToJava(TransferData transferData) {
if (transferData.data == null) return null;
NSData data = (NSData) transferData.data;
if (data.length() == 0) return null;
- byte[] bytes = new byte[(int)/*64*/data.length()];
+ byte[] bytes = new byte[(int)data.length()];
data.getBytes(bytes);
return bytes;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java
index 567d2e5069..ffedb8f938 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java
@@ -525,7 +525,7 @@ public TransferData[] getAvailableTypes(int clipboards) {
if (pasteboard == null) return new TransferData[0];
NSArray types = pasteboard.types();
if (types == null) return new TransferData[0];
- int count = (int)/*64*/types.count();
+ int count = (int)types.count();
TransferData[] result = new TransferData[count];
for (int i = 0; i < count; i++) {
result[i] = new TransferData();
@@ -556,7 +556,7 @@ public String[] getAvailableTypeNames() {
if (pasteboard == null) return new String[0];
NSArray types = pasteboard.types();
if (types == null) return new String[0];
- int count = (int)/*64*/types.count();
+ int count = (int)types.count();
String[] result = new String[count];
for (int i = 0; i < count; i++) {
result[i] = new NSString(types.objectAtIndex(i)).getString();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java
index 3a4b472907..45c98384d9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java
@@ -110,7 +110,7 @@ public class DragSource extends Widget {
static Callback dragSource2Args, dragSource3Args, dragSource4Args, dragSource5Args, dragSource6Args;
static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
- static long /*int*/ proc2 = 0, proc3 = 0, proc4 = 0, proc5 = 0, proc6 = 0;
+ static long proc2 = 0, proc3 = 0, proc4 = 0, proc5 = 0, proc6 = 0;
String paths[];
boolean exist[];
@@ -122,28 +122,23 @@ public class DragSource extends Widget {
dragSource2Args = new Callback(clazz, "dragSourceProc", 2);
proc2 = dragSource2Args.getAddress();
- if (proc2 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
dragSource3Args = new Callback(clazz, "dragSourceProc", 3);
proc3 = dragSource3Args.getAddress();
- if (proc3 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
dragSource4Args = new Callback(clazz, "dragSourceProc", 4);
proc4 = dragSource4Args.getAddress();
- if (proc4 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
dragSource5Args = new Callback(clazz, "dragSourceProc", 5);
proc5 = dragSource5Args.getAddress();
- if (proc5 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
dragSource6Args = new Callback(clazz, "dragSourceProc", 6);
proc6 = dragSource6Args.getAddress();
- if (proc6 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- long /*int*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+ long cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
- long /*int*/ draggedImage_endedAt_operationProc = OS.CALLBACK_draggedImage_endedAt_operation_(proc5);
+ long draggedImage_endedAt_operationProc = OS.CALLBACK_draggedImage_endedAt_operation_(proc5);
// Add the NSDraggingSource callbacks
OS.class_addMethod(cls, OS.sel_draggingSourceOperationMaskForLocal_, proc3, "@:I");
@@ -168,7 +163,7 @@ public class DragSource extends Widget {
static final String DEFAULT_DRAG_SOURCE_EFFECT = "DEFAULT_DRAG_SOURCE_EFFECT"; //$NON-NLS-1$
- private long /*int*/ delegateJniRef;
+ private long delegateJniRef;
private Point dragOffset;
/**
@@ -248,17 +243,17 @@ public DragSource(Control control, int style) {
// Tables and trees already implement dragging, so we need to override their drag methods instead of creating a dragging source.
if (control instanceof Tree || control instanceof Table) {
- long /*int*/ cls = OS.object_getClass(control.view.id);
+ long cls = OS.object_getClass(control.view.id);
if (cls == 0) {
DND.error(DND.ERROR_CANNOT_INIT_DRAG);
}
// If we already added it, no need to do it again.
- long /*int*/ procPtr = OS.class_getMethodImplementation(cls, OS.sel_draggingSourceOperationMaskForLocal_);
+ long procPtr = OS.class_getMethodImplementation(cls, OS.sel_draggingSourceOperationMaskForLocal_);
if (procPtr == proc3) return;
- long /*int*/ draggedImage_endedAt_operationProc = OS.CALLBACK_draggedImage_endedAt_operation_(proc5);
+ long draggedImage_endedAt_operationProc = OS.CALLBACK_draggedImage_endedAt_operation_(proc5);
// Add the NSDraggingSource overrides.
OS.class_addMethod(cls, OS.sel_draggingSourceOperationMaskForLocal_, proc3, "@:I");
@@ -311,21 +306,21 @@ public void addDragListener(DragSourceListener listener) {
addListener (DND.DragEnd, typedListener);
}
-void dndCallSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1, long /*int*/ arg2) {
+void dndCallSuper(long id, long sel, long arg0, NSPoint arg1, long arg2) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0, arg1, arg2);
}
-void dndCallSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+void dndCallSuper(long id, long sel, long arg0, long arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-long /*int*/ dndCallSuperObject(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
+long dndCallSuperObject(long id, long sel, long arg0, long arg1, long arg2, long arg3) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -403,7 +398,12 @@ void drag(Event dragDetectEvent) {
void dragOutlineViewStart(Event dragDetectEvent) {
DNDEvent event = startDrag(dragDetectEvent);
- if (event == null) return;
+ if (event == null) {
+ // This causes our 'outlineView:writeItems:toPasteboard:' listener
+ // to return NO to cancel drag.
+ dragDetectEvent.doit = false;
+ return;
+ }
// Save off the custom image, if any.
dragImageFromListener = event.image;
@@ -413,13 +413,13 @@ void dragOutlineViewStart(Event dragDetectEvent) {
dragOffset = new Point(event.offsetX, event.offsetY);
}
-void draggedImage_beganAt(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+void draggedImage_beganAt(long id, long sel, long arg0, long arg1) {
if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
dndCallSuper(id, sel, arg0, arg1);
}
}
-void draggedImage_endedAt_operation(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1, long /*int*/ arg2) {
+void draggedImage_endedAt_operation(long id, long sel, long arg0, NSPoint arg1, long arg2) {
int swtOperation = osOpToOp(arg2);
if (paths != null) {
NSFileManager fileManager = NSFileManager.defaultManager();
@@ -452,7 +452,7 @@ void draggedImage_endedAt_operation(long /*int*/ id, long /*int*/ sel, long /*in
}
}
-long /*int*/ dragImageForRowsWithIndexes_tableColumns_event_offset(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
+long dragImageForRowsWithIndexes_tableColumns_event_offset(long id, long sel, long arg0, long arg1, long arg2, long arg3) {
if (dragImageFromListener != null) {
NSPoint point = new NSPoint();
point.x = dragOffset.x;
@@ -467,12 +467,12 @@ long /*int*/ dragImageForRowsWithIndexes_tableColumns_event_offset(long /*int*/
/**
* Cocoa NSDraggingSource implementations
*/
-long /*int*/ draggingSourceOperationMaskForLocal(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long draggingSourceOperationMaskForLocal(long id, long sel, long arg0) {
// Drag operations are same for local or remote drags.
return dragOperations;
}
-static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel) {
+static long dragSourceProc(long id, long sel) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -494,7 +494,7 @@ static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel) {
return 0;
}
-static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+static long dragSourceProc(long id, long sel, long arg0) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -516,7 +516,7 @@ static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel, long /*int
return 0;
}
-static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+static long dragSourceProc(long id, long sel, long arg0, long arg1) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -540,7 +540,7 @@ static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel, long /*int
return 0;
}
-static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+static long dragSourceProc(long id, long sel, long arg0, long arg1, long arg2) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -564,7 +564,7 @@ static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel, long /*int
return 0;
}
-static long /*int*/ dragSourceProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
+static long dragSourceProc(long id, long sel, long arg0, long arg1, long arg2, long arg3) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -658,7 +658,7 @@ public Transfer[] getTransfer(){
/**
* We always want the modifier keys to potentially update the drag.
*/
-boolean ignoreModifierKeysWhileDragging(long /*int*/ id, long /*int*/ sel) {
+boolean ignoreModifierKeysWhileDragging(long id, long sel) {
return false;
}
@@ -701,7 +701,7 @@ int opToOsOp(int operation) {
return osOperation;
}
-int osOpToOp(long /*int*/ osOperation){
+int osOpToOp(long osOperation){
int operation = 0;
if ((osOperation & OS.NSDragOperationCopy) != 0){
operation |= DND.DROP_COPY;
@@ -721,7 +721,7 @@ int osOpToOp(long /*int*/ osOperation){
return operation;
}
-void pasteboard_provideDataForType(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+void pasteboard_provideDataForType(long id, long sel, long arg0, long arg1) {
NSPasteboard pasteboard = new NSPasteboard(arg0);
NSString dataType = new NSString(arg1);
if (pasteboard == null || dataType == null) return;
@@ -756,7 +756,7 @@ void pasteboard_provideDataForType(long /*int*/ id, long /*int*/ sel, long /*int
pasteboard.writeObjects(NSArray.arrayWithObject(url));
} else if (dataType.isEqual(OS.NSFilenamesPboardType) || dataType.isEqual(OS.kUTTypeFileURL)) {
NSArray array = (NSArray) transferData.data;
- int count = (int) /*64*/ array.count();
+ int count = (int) array.count();
paths = new String[count];
exist = new boolean[count];
NSFileManager fileManager = NSFileManager.defaultManager();
@@ -819,6 +819,11 @@ public void setTransfer(Transfer... transferAgents){
this.transferAgents = transferAgents;
}
+boolean canBeginDrag() {
+ if (transferAgents == null || transferAgents.length == 0) return false;
+ return true;
+}
+
DNDEvent startDrag(Event dragEvent) {
DNDEvent event = new DNDEvent();
event.widget = this;
@@ -827,7 +832,7 @@ DNDEvent startDrag(Event dragEvent) {
event.time = dragEvent.time;
event.doit = true;
notifyListeners(DND.DragStart, event);
- if (!event.doit || transferAgents == null || transferAgents.length == 0) return null;
+ if (!event.doit || !canBeginDrag()) return null;
NSPasteboard dragBoard = NSPasteboard.pasteboardWithName(OS.NSDragPboard);
NSMutableArray nativeTypeArray = NSMutableArray.arrayWithCapacity(10);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
index 65b389f56c..988f18dd44 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
@@ -81,7 +81,7 @@ import org.eclipse.swt.widgets.*;
public class DropTarget extends Widget {
static Callback dropTarget2Args, dropTarget3Args, dropTarget6Args;
- static long /*int*/ proc2Args, proc3Args, proc6Args;
+ static long proc2Args, proc3Args, proc6Args;
static final String LOCK_CURSOR = "org.eclipse.swt.internal.lockCursor"; //$NON-NLS-1$
static {
@@ -89,15 +89,12 @@ public class DropTarget extends Widget {
dropTarget2Args = new Callback(clazz, "dropTargetProc", 2);
proc2Args = dropTarget2Args.getAddress();
- if (proc2Args == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
dropTarget3Args = new Callback(clazz, "dropTargetProc", 3);
proc3Args = dropTarget3Args.getAddress();
- if (proc3Args == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
dropTarget6Args = new Callback(clazz, "dropTargetProc", 6);
proc6Args = dropTarget6Args.getAddress();
- if (proc6Args == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
}
static boolean dropNotAllowed = false;
@@ -124,27 +121,27 @@ void addDragHandlers() {
// the types with the Control's NSView and AppKit will call the methods in the protocol
// when a drag goes over the view.
- long /*int*/ cls = OS.object_getClass(control.view.id);
+ long cls = OS.object_getClass(control.view.id);
if (cls == 0) {
DND.error(DND.ERROR_CANNOT_INIT_DROP);
}
// If we already added it, no need to do it again.
- long /*int*/ procPtr = OS.class_getMethodImplementation(cls, OS.sel_draggingEntered_);
+ long procPtr = OS.class_getMethodImplementation(cls, OS.sel_draggingEntered_);
if (procPtr == proc3Args) return;
addDragHandlers(cls);
// If the content view can be image view, then add the dragging methods to image view too.
// This is used by Label so that dragging can work even when the Label has an image set on it.
- long /*int*/ imageView = 0;
+ long imageView = 0;
if ((imageView = OS.objc_msgSend(control.view.id, OS.sel_getImageView)) != 0) {
cls = OS.object_getClass(imageView);
addDragHandlers(cls);
}
}
-void addDragHandlers (long /*int*/ cls) {
+void addDragHandlers (long cls) {
// Add the NSDraggingDestination callbacks
OS.class_addMethod(cls, OS.sel_draggingEntered_, proc3Args, "@:@");
OS.class_addMethod(cls, OS.sel_draggingUpdated_, proc3Args, "@:@");
@@ -206,7 +203,7 @@ public void addDropListener(DropTargetListener listener) {
addListener (DND.DropAccept, typedListener);
}
-long /*int*/ dndCallSuper (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long dndCallSuper (long id, long sel, long arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -227,7 +224,7 @@ protected void checkSubclass () {
}
}
-int draggingEntered(long /*int*/ id, long /*int*/ sel, NSObject sender) {
+int draggingEntered(long id, long sel, NSObject sender) {
if (sender == null) return OS.NSDragOperationNone;
DNDEvent event = new DNDEvent();
@@ -273,12 +270,12 @@ int draggingEntered(long /*int*/ id, long /*int*/ sel, NSObject sender) {
}
if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
- return (int)/*64*/dndCallSuper(id, sel, sender.id);
+ return (int)dndCallSuper(id, sel, sender.id);
}
return opToOsOp(selectedOperation);
}
-void draggingExited(long /*int*/ id, long /*int*/ sel, NSObject sender) {
+void draggingExited(long id, long sel, NSObject sender) {
clearDropNotAllowed();
if (keyOperation == -1) return;
keyOperation = -1;
@@ -294,7 +291,7 @@ void draggingExited(long /*int*/ id, long /*int*/ sel, NSObject sender) {
}
}
-int draggingUpdated(long /*int*/ id, long /*int*/ sel, NSObject sender) {
+int draggingUpdated(long id, long sel, NSObject sender) {
if (sender == null) return OS.NSDragOperationNone;
int oldKeyOperation = keyOperation;
@@ -349,7 +346,7 @@ int draggingUpdated(long /*int*/ id, long /*int*/ sel, NSObject sender) {
}
if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
- return (int)/*64*/dndCallSuper(id, sel, sender.id);
+ return (int)dndCallSuper(id, sel, sender.id);
}
return opToOsOp(selectedOperation);
@@ -417,7 +414,7 @@ public DropTarget(Control control, int style) {
addDragHandlers();
}
-static long /*int*/ dropTargetProc(long /*int*/ id, long /*int*/ sel) {
+static long dropTargetProc(long id, long sel) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -432,7 +429,7 @@ static long /*int*/ dropTargetProc(long /*int*/ id, long /*int*/ sel) {
return 0;
}
-static long /*int*/ dropTargetProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+static long dropTargetProc(long id, long sel, long arg0) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -457,7 +454,7 @@ static long /*int*/ dropTargetProc(long /*int*/ id, long /*int*/ sel, long /*int
return 0;
}
-static long /*int*/ dropTargetProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
+static long dropTargetProc(long id, long sel, long arg0, long arg1, long arg2, long arg3) {
Display display = Display.findDisplay(Thread.currentThread());
if (display == null || display.isDisposed()) return 0;
Widget widget = display.findWidget(id);
@@ -549,12 +546,14 @@ int getOperationFromKeyState() {
// correct Cocoa behavior. Control + Option or Command is NSDragOperationGeneric,
// or DND.DROP_DEFAULT in the SWT.
NSEvent currEvent = NSApplication.sharedApplication().currentEvent();
- long /*int*/ modifiers = currEvent.modifierFlags();
- boolean option = (modifiers & OS.NSAlternateKeyMask) == OS.NSAlternateKeyMask;
- boolean control = (modifiers & OS.NSControlKeyMask) == OS.NSControlKeyMask;
- if (control && option) return DND.DROP_DEFAULT;
- if (control) return DND.DROP_LINK;
- if (option) return DND.DROP_COPY;
+ if (currEvent != null) {
+ long modifiers = currEvent.modifierFlags();
+ boolean option = (modifiers & OS.NSAlternateKeyMask) == OS.NSAlternateKeyMask;
+ boolean control = (modifiers & OS.NSControlKeyMask) == OS.NSControlKeyMask;
+ if (control && option) return DND.DROP_DEFAULT;
+ if (control) return DND.DROP_LINK;
+ if (option) return DND.DROP_COPY;
+ }
return DND.DROP_DEFAULT;
}
@@ -598,7 +597,7 @@ int opToOsOp(int operation) {
return osOperation;
}
-int osOpToOp(long /*int*/ osOperation){
+int osOpToOp(long osOperation){
int operation = 0;
if ((osOperation & OS.NSDragOperationCopy) != 0){
operation |= DND.DROP_COPY;
@@ -732,7 +731,7 @@ boolean drop(NSObject sender) {
return (selectedOperation != DND.DROP_NONE);
}
-boolean performDragOperation(long /*int*/ id, long /*int*/ sel, NSObject sender) {
+boolean performDragOperation(long id, long sel, NSObject sender) {
if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
return dndCallSuper(id, sel, sender.id) != 0;
}
@@ -740,11 +739,11 @@ boolean performDragOperation(long /*int*/ id, long /*int*/ sel, NSObject sender)
return drop (sender);
}
-boolean outlineView_acceptDrop_item_childIndex(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ info, long /*int*/ item, long /*int*/ index) {
+boolean outlineView_acceptDrop_item_childIndex(long id, long sel, long outlineView, long info, long item, long index) {
return drop(new NSObject(info));
}
-long /*int*/ outlineView_validateDrop_proposedItem_proposedChildIndex(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ info, long /*int*/ item, long /*int*/ index) {
+long outlineView_validateDrop_proposedItem_proposedChildIndex(long id, long sel, long outlineView, long info, long item, long index) {
//TODO expansion animation and auto collapse not working because of outlineView:shouldExpandItem:
NSOutlineView widget = new NSOutlineView(outlineView);
NSObject sender = new NSObject(info);
@@ -825,7 +824,7 @@ boolean setEventData(NSObject draggingState, DNDEvent event) {
// get allowed operations
int style = getStyle();
- long /*int*/ allowedActions = draggingState.draggingSourceOperationMask();
+ long allowedActions = draggingState.draggingSourceOperationMask();
int operations = osOpToOp(allowedActions) & style;
if (operations == DND.DROP_NONE) return false;
@@ -833,9 +832,9 @@ boolean setEventData(NSObject draggingState, DNDEvent event) {
int operation = getOperationFromKeyState();
keyOperation = operation;
if (operation == DND.DROP_DEFAULT) {
- if ((style & DND.DROP_DEFAULT) == 0) {
+ if ((style & DND.DROP_DEFAULT) == 0) {
operation = (operations & DND.DROP_MOVE) != 0 ? DND.DROP_MOVE : DND.DROP_NONE;
- }
+ }
} else {
if ((operation & operations) == 0) operation = DND.DROP_NONE;
}
@@ -846,7 +845,7 @@ boolean setEventData(NSObject draggingState, DNDEvent event) {
NSArray draggedTypes = dragPBoard.types();
if (draggedTypes == null) return false;
- long /*int*/ draggedTypeCount = draggedTypes.count();
+ long draggedTypeCount = draggedTypes.count();
TransferData[] dataTypes = new TransferData[(int)draggedTypeCount];
int index = -1;
@@ -961,16 +960,16 @@ void clearDropNotAllowed() {
}
}
-boolean tableView_acceptDrop_row_dropOperation(long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ info, long /*int*/ row, long /*int*/ operation) {
+boolean tableView_acceptDrop_row_dropOperation(long id, long sel, long tableView, long info, long row, long operation) {
return drop(new NSObject(info));
}
-int tableView_validateDrop_proposedRow_proposedDropOperation(long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ info, long /*int*/ row, long /*int*/ operation) {
+int tableView_validateDrop_proposedRow_proposedDropOperation(long id, long sel, long tableView, long info, long row, long operation) {
NSTableView widget = new NSTableView(tableView);
NSObject sender = new NSObject(info);
NSPoint pt = sender.draggingLocation();
pt = widget.convertPoint_fromView_(pt, null);
- long /*int*/ hitRow = widget.rowAtPoint(pt);
+ long hitRow = widget.rowAtPoint(pt);
if (0 <= hitRow && hitRow < widget.numberOfRows()) {
if (feedback == 0) {
widget.setDropRow(-1, OS.NSTableViewDropOn);
@@ -991,7 +990,7 @@ int tableView_validateDrop_proposedRow_proposedDropOperation(long /*int*/ id, lo
}
// By returning true we get draggingUpdated messages even when the mouse isn't moving.
-boolean wantsPeriodicDraggingUpdates(long /*int*/ id, long /*int*/ sel) {
+boolean wantsPeriodicDraggingUpdates(long id, long sel) {
return true;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/FileTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/FileTransfer.java
index db93afbfa9..bbb3596892 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/FileTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/FileTransfer.java
@@ -27,8 +27,8 @@ import org.eclipse.swt.internal.cocoa.*;
* below:</p>
*
* <pre><code>
- * File file1 = new File("C:\temp\file1");
- * File file2 = new File("C:\temp\file2");
+ * File file1 = new File("C:\\temp\\file1");
+ * File file2 = new File("C:\\temp\\file2");
* String[] fileData = new String[2];
* fileData[0] = file1.getAbsolutePath();
* fileData[1] = file2.getAbsolutePath();
@@ -98,7 +98,7 @@ public Object nativeToJava(TransferData transferData) {
if (!isSupportedType(transferData) || transferData.data == null) return null;
NSArray array = (NSArray) transferData.data;
if (array.count() == 0) return null;
- int count = (int)/*64*/array.count();
+ int count = (int)array.count();
String[] fileNames = new String[count];
for (int i=0; i<count; i++) {
NSString string = new NSString(array.objectAtIndex(i));
@@ -109,20 +109,12 @@ public Object nativeToJava(TransferData transferData) {
@Override
protected int[] getTypeIds(){
- if (OS.VERSION >= 0x1060) {
- return new int[] {ID, ID1};
- } else {
- return new int[] {ID};
- }
+ return new int[] {ID, ID1};
}
@Override
protected String[] getTypeNames(){
- if (OS.VERSION >= 0x1060) {
- return new String[] {ID_NAME, ID1_NAME};
- } else {
- return new String[] {ID_NAME};
- }
+ return new String[] {ID_NAME, ID1_NAME};
}
boolean checkFile(Object object) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ImageTransfer.java
index 4aa015162b..1ca1a20cce 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/ImageTransfer.java
@@ -27,8 +27,8 @@ import org.eclipse.swt.widgets.*;
* <p>An example of a java <code>ImageData</code> is shown below:</p>
*
* <pre><code>
- * Image image = new Image(display, "C:\temp\img1.gif");
- * ImageData imgData = image.getImageData();
+ * Image image = new Image(display, "C:\\temp\\img1.gif");
+ * ImageData imgData = image.getImageData();
* </code></pre>
*
* @see Transfer
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TableDragSourceEffect.java
index fea6548f31..e762d514ef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -85,7 +85,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
if (dragSourceImage != null) dragSourceImage.dispose();
dragSourceImage = null;
NSPoint point = new NSPoint();
- long /*int*/ ptr = C.malloc(NSPoint.sizeof);
+ long ptr = C.malloc(NSPoint.sizeof);
OS.memmove(ptr, point, NSPoint.sizeof);
NSEvent nsEvent = NSApplication.sharedApplication().currentEvent();
NSTableView widget = (NSTableView)control.view;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index ca7cc6624e..e1d0311b43 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -84,7 +84,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
if (dragSourceImage != null) dragSourceImage.dispose();
dragSourceImage = null;
NSPoint point = new NSPoint();
- long /*int*/ ptr = C.malloc(NSPoint.sizeof);
+ long ptr = C.malloc(NSPoint.sizeof);
OS.memmove(ptr, point, NSPoint.sizeof);
NSEvent nsEvent = NSApplication.sharedApplication().currentEvent();
NSTableView widget = (NSTableView)control.view;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java
index 97bade5cb1..abaf2bf2e8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java
@@ -91,20 +91,12 @@ public Object nativeToJava(TransferData transferData){
@Override
protected int[] getTypeIds(){
- if (OS.VERSION >= 0x1060) {
- return new int[] {URL_ID, URL_ID1};
- } else {
- return new int[] {URL_ID};
- }
+ return new int[] {URL_ID, URL_ID1};
}
@Override
protected String[] getTypeNames(){
- if (OS.VERSION >= 0x1060) {
- return new String[] {URL, URL1};
- } else {
- return new String[] {URL};
- }
+ return new String[] {URL, URL1};
}
boolean checkURL(Object object) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DNDListener.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DNDListener.java
index 3b341e8e90..c196d85b9a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DNDListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DNDListener.java
@@ -31,11 +31,21 @@ public void handleEvent (Event e) {
switch (e.type) {
case DND.DragStart: {
DragSourceEvent event = new DragSourceEvent((DNDEvent)e);
- DragSourceEffect sourceEffect = ((DragSource) dndWidget).getDragSourceEffect();
- if (sourceEffect != null) {
+ DragSource dragSource = (DragSource) dndWidget;
+ DragSourceEffect sourceEffect = dragSource.getDragSourceEffect();
+
+ // First call user listeners to see if they want to cancel
+ ((DragSourceListener) eventListener).dragStart (event);
+
+ // If drag&drop is canceled, don't call 'sourceEffect.dragStart()':
+ // 1) It may leak resources, because it will never receive a
+ // corresponding 'sourceEffect.dragFinished()'.
+ // 2) It simply makes no sense to prepare drag image if drag&drop
+ // is not going to happen.
+ if (event.doit && dragSource.canBeginDrag() && (sourceEffect != null)) {
sourceEffect.dragStart (event);
}
- ((DragSourceListener) eventListener).dragStart (event);
+
event.updateEvent((DNDEvent)e);
break;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java
index fc328e1df0..3b287c5b09 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java
@@ -31,25 +31,25 @@ public class DragSourceEvent extends TypedEvent {
* @see DND#DROP_LINK
* @see DND#DROP_TARGET_MOVE
*/
- public int detail;
+ public int detail;
- /**
- * In dragStart, the doit field determines if the drag and drop operation
- * should proceed; in dragFinished, the doit field indicates whether
- * the operation was performed successfully.
- * <p>
- * In dragStart:</p>
- * <p>Flag to determine if the drag and drop operation should proceed.
- * The application can set this value to false to prevent the drag from starting.
- * Set to true by default.</p>
- * <p>In dragSetData:</p>
- * <p>This will be set to true when the call to dragSetData is made. Set it to
- * false to cancel the drag.</p>
- * <p>In dragFinished:</p>
- * <p>Flag to indicate if the operation was performed successfully.
- * True if the operation was performed successfully.</p>
- */
- public boolean doit;
+ /**
+ * In dragStart, the doit field determines if the drag and drop operation
+ * should proceed; in dragFinished, the doit field indicates whether
+ * the operation was performed successfully.
+ * <p>
+ * In dragStart:</p>
+ * <p>Flag to determine if the drag and drop operation should proceed.
+ * The application can set this value to false to prevent the drag from starting.
+ * Set to true by default.</p>
+ * <p>In dragSetData:</p>
+ * <p>This will be set to true when the call to dragSetData is made. Set it to
+ * false to cancel the drag.</p>
+ * <p>In dragFinished:</p>
+ * <p>Flag to indicate if the operation was performed successfully.
+ * True if the operation was performed successfully.</p>
+ */
+ public boolean doit;
/**
* In dragStart, the x coordinate (relative to the control) of the
@@ -57,19 +57,19 @@ public class DragSourceEvent extends TypedEvent {
*
* @since 3.2
*/
- public int x;
- /**
+ public int x;
+ /**
* In dragStart, the y coordinate (relative to the control) of the
* position the mouse went down to start the drag.
*
* @since 3.2
*/
- public int y;
+ public int y;
- /**
+ /**
* The type of data requested.
* Data provided in the data field must be of the same type.
- */
+ */
public TransferData dataType;
/**
@@ -86,13 +86,13 @@ public class DragSourceEvent extends TypedEvent {
*
* @since 3.5
*/
- public int offsetX;
+ public int offsetX;
/**
* In dragStart, the y offset (relative to the image) where the drag source image will be displayed.
*
* @since 3.5
*/
- public int offsetY;
+ public int offsetY;
static final long serialVersionUID = 3257002142513770808L;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEvent.java
index c6a3f17f86..aff8d31110 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetEvent.java
@@ -138,8 +138,8 @@ public String toString() {
sb.append(" feedback="); sb.append(feedback);
sb.append(" dataTypes={ ");
if (dataTypes != null) {
- for (int i = 0; i < dataTypes.length; i++) {
- sb.append(dataTypes[i].type); sb.append(' ');
+ for (TransferData dataType : dataTypes) {
+ sb.append(dataType.type); sb.append(' ');
}
}
sb.append('}');
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
index 91667cd011..b5e9e18194 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
@@ -17,6 +17,7 @@ package org.eclipse.swt.dnd;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
import org.eclipse.swt.widgets.*;
/**
@@ -39,10 +40,10 @@ public class Clipboard {
private static long TARGET;
static {
- GTKCLIPBOARD = GTK.GTK4 ? GDK.gdk_display_get_clipboard(GDK.gdk_display_get_default()) : GTK.gtk_clipboard_get (GDK.GDK_NONE);
+ GTKCLIPBOARD = GTK.GTK4 ? GDK.gdk_display_get_clipboard(GDK.gdk_display_get_default()) : GTK3.gtk_clipboard_get (GDK.GDK_NONE);
byte[] buffer = Converter.wcsToMbcs("PRIMARY", true);
long primary = GDK.gdk_atom_intern(buffer, false);
- GTKPRIMARYCLIPBOARD = GTK.GTK4 ? GDK.gdk_display_get_primary_clipboard(GDK.gdk_display_get_default()) : GTK.gtk_clipboard_get(primary);
+ GTKPRIMARYCLIPBOARD = GTK.GTK4 ? GDK.gdk_display_get_primary_clipboard(GDK.gdk_display_get_default()) : GTK3.gtk_clipboard_get(primary);
buffer = Converter.wcsToMbcs("TARGETS", true);
TARGET = GDK.gdk_atom_intern(buffer, false);
}
@@ -294,34 +295,20 @@ public Object getContents(Transfer transfer, int clipboards) {
for (int i = 0; i < typeIds.length; i++) {
if ((clipboards & DND.CLIPBOARD) != 0) {
selection_data = gtk_clipboard_wait_for_contents(GTKCLIPBOARD, typeIds[i]);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
}
if (selection_data != 0) break;
if ((clipboards & DND.SELECTION_CLIPBOARD) != 0) {
selection_data = gtk_clipboard_wait_for_contents(GTKPRIMARYCLIPBOARD, typeIds[i]);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
}
}
if (selection_data == 0) return null;
TransferData tdata = new TransferData();
- tdata.type = GTK.gtk_selection_data_get_data_type(selection_data);
- tdata.pValue = GTK.gtk_selection_data_get_data(selection_data);
- tdata.length = GTK.gtk_selection_data_get_length(selection_data);
- tdata.format = GTK.gtk_selection_data_get_format(selection_data);
+ tdata.type = GTK3.gtk_selection_data_get_data_type(selection_data);
+ tdata.pValue = GTK3.gtk_selection_data_get_data(selection_data);
+ tdata.length = GTK3.gtk_selection_data_get_length(selection_data);
+ tdata.format = GTK3.gtk_selection_data_get_format(selection_data);
Object result = transfer.nativeToJava(tdata);
- GTK.gtk_selection_data_free(selection_data);
+ GTK3.gtk_selection_data_free(selection_data);
return result;
}
@@ -593,24 +580,17 @@ public String[] getAvailableTypeNames() {
private int[] getAvailablePrimaryTypes() {
int[] types = new int[0];
long selection_data = gtk_clipboard_wait_for_contents(GTKPRIMARYCLIPBOARD, TARGET);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
if (selection_data != 0) {
try {
- int length = GTK.gtk_selection_data_get_length(selection_data);
- int format = GTK.gtk_selection_data_get_format(selection_data);
- long data = GTK.gtk_selection_data_get_data(selection_data);
+ int length = GTK3.gtk_selection_data_get_length(selection_data);
+ int format = GTK3.gtk_selection_data_get_format(selection_data);
+ long data = GTK3.gtk_selection_data_get_data(selection_data);
if (length != 0) {
types = new int[length * 8 / format];
C.memmove(types, data, length);
}
} finally {
- GTK.gtk_selection_data_free(selection_data);
+ GTK3.gtk_selection_data_free(selection_data);
}
}
return types;
@@ -618,24 +598,17 @@ private int[] getAvailablePrimaryTypes() {
private int[] getAvailableClipboardTypes () {
int[] types = new int[0];
long selection_data = gtk_clipboard_wait_for_contents(GTKCLIPBOARD, TARGET);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
if (selection_data != 0) {
try {
- int length = GTK.gtk_selection_data_get_length(selection_data);
- int format = GTK.gtk_selection_data_get_format(selection_data);
- long data = GTK.gtk_selection_data_get_data(selection_data);
+ int length = GTK3.gtk_selection_data_get_length(selection_data);
+ int format = GTK3.gtk_selection_data_get_format(selection_data);
+ long data = GTK3.gtk_selection_data_get_data(selection_data);
if (length != 0) {
types = new int[length * 8 / format];
C.memmove(types, data, length);
}
} finally {
- GTK.gtk_selection_data_free(selection_data);
+ GTK3.gtk_selection_data_free(selection_data);
}
}
return types;
@@ -646,7 +619,7 @@ long gtk_clipboard_wait_for_contents(long clipboard, long target) {
String key = "org.eclipse.swt.internal.gtk.dispatchEvent";
Display display = this.display;
display.setData(key, new int[]{GDK.GDK_PROPERTY_NOTIFY, GDK.GDK_SELECTION_CLEAR, GDK.GDK_SELECTION_REQUEST, GDK.GDK_SELECTION_NOTIFY});
- long selection_data = GTK.gtk_clipboard_wait_for_contents(clipboard, target);
+ long selection_data = GTK3.gtk_clipboard_wait_for_contents(clipboard, target);
display.setData(key, null);
long duration = System.currentTimeMillis() - startTime;
if (selection_data == 0 && duration > 5000) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
index 5181782bf9..75de07e91a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
@@ -14,9 +14,10 @@
package org.eclipse.swt.dnd;
-import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
import org.eclipse.swt.widgets.*;
class ClipboardProxy {
@@ -28,7 +29,8 @@ class ClipboardProxy {
Object[] primaryClipboardData;
Transfer[] primaryClipboardDataTypes;
- long clipboardOwner = GTK.gtk_window_new(0);
+ long clipboardOwner = GTK.GTK4 ? GTK4.gtk_window_new() : GTK3.gtk_window_new(GTK.GTK_WINDOW_TOPLEVEL);
+
Display display;
Clipboard activeClipboard = null;
Clipboard activePrimaryClipboard = null;
@@ -42,7 +44,7 @@ static ClipboardProxy _getInstance(final Display display) {
if (proxy != null) return proxy;
proxy = new ClipboardProxy(display);
display.setData(ID, proxy);
- display.addListener(SWT.Dispose, event -> {
+ display.disposeExec(() -> {
ClipboardProxy clipbordProxy = (ClipboardProxy)display.getData(ID);
if (clipbordProxy == null) return;
display.setData(ID, null);
@@ -54,9 +56,7 @@ static ClipboardProxy _getInstance(final Display display) {
ClipboardProxy(Display display) {
this.display = display;
getFunc = new Callback( this, "getFunc", 4); //$NON-NLS-1$
- if (getFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
clearFunc = new Callback( this, "clearFunc", 2); //$NON-NLS-1$
- if (clearFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
void clear (Clipboard owner, int clipboards) {
@@ -72,7 +72,7 @@ void gtk_gdk_clipboard_clear(long clipboard) {
if (GTK.GTK4) {
GDK.gdk_clipboard_set_content(clipboard, 0);
} else {
- GTK.gtk_clipboard_clear(clipboard);
+ GTK3.gtk_clipboard_clear(clipboard);
}
}
@@ -93,10 +93,10 @@ long clearFunc(long clipboard,long user_data_or_owner){
void dispose () {
if (display == null) return;
if (activeClipboard != null) {
- GTK.gtk_clipboard_store(Clipboard.GTKCLIPBOARD);
+ GTK3.gtk_clipboard_store(Clipboard.GTKCLIPBOARD);
}
if (activePrimaryClipboard != null) {
- GTK.gtk_clipboard_store(Clipboard.GTKPRIMARYCLIPBOARD);
+ GTK3.gtk_clipboard_store(Clipboard.GTKPRIMARYCLIPBOARD);
}
display = null;
if (getFunc != null ) getFunc.dispose();
@@ -107,7 +107,13 @@ void dispose () {
clipboardDataTypes = null;
primaryClipboardData = null;
primaryClipboardDataTypes = null;
- if (clipboardOwner != 0) GTK.gtk_widget_destroy (clipboardOwner);
+ if (clipboardOwner != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(clipboardOwner);
+ } else {
+ GTK3.gtk_widget_destroy(clipboardOwner);
+ }
+ }
clipboardOwner = 0;
}
@@ -117,7 +123,7 @@ void dispose () {
*/
long getFunc(long clipboard, long selection_data, long info, long user_data_or_owner){
if (selection_data == 0) return 0;
- long target = GTK.gtk_selection_data_get_target(selection_data);
+ long target = GTK3.gtk_selection_data_get_target(selection_data);
TransferData tdata = new TransferData();
tdata.type = target;
Transfer[] types = (clipboard == Clipboard.GTKCLIPBOARD) ? clipboardDataTypes : primaryClipboardDataTypes;
@@ -134,7 +140,7 @@ long getFunc(long clipboard, long selection_data, long info, long user_data_or_o
if (tdata.format < 8 || tdata.format % 8 != 0) {
return 0;
}
- GTK.gtk_selection_data_set(selection_data, tdata.type, tdata.format, tdata.pValue, tdata.length);
+ GTK3.gtk_selection_data_set(selection_data, tdata.type, tdata.format, tdata.pValue, tdata.length);
OS.g_free(tdata.pValue);
return 1;
}
@@ -164,7 +170,7 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo
pTargetsList = OS.g_malloc(GtkTargetEntry.sizeof * entries.length);
int offset = 0;
for (int i = 0; i < entries.length; i++) {
- OS.memmove(pTargetsList + offset, entries[i], GtkTargetEntry.sizeof);
+ GTK3.memmove(pTargetsList + offset, entries[i], GtkTargetEntry.sizeof);
offset += GtkTargetEntry.sizeof;
}
if ((clipboards & DND.CLIPBOARD) != 0) {
@@ -182,10 +188,10 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo
* though we set the data again. So, this API has to be used whenever we
* are setting the contents.
*/
- if (!GTK.gtk_clipboard_set_with_owner (Clipboard.GTKCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
+ if (!GTK3.gtk_clipboard_set_with_owner (Clipboard.GTKCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
return false;
}
- GTK.gtk_clipboard_set_can_store(Clipboard.GTKCLIPBOARD, 0, 0);
+ GTK3.gtk_clipboard_set_can_store(Clipboard.GTKCLIPBOARD, 0, 0);
activeClipboard = owner;
}
if ((clipboards & DND.SELECTION_CLIPBOARD) != 0) {
@@ -193,10 +199,10 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo
primaryClipboardDataTypes = dataTypes;
long getFuncProc = getFunc.getAddress();
long clearFuncProc = clearFunc.getAddress();
- if (!GTK.gtk_clipboard_set_with_owner (Clipboard.GTKPRIMARYCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
+ if (!GTK3.gtk_clipboard_set_with_owner (Clipboard.GTKPRIMARYCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
return false;
}
- GTK.gtk_clipboard_set_can_store(Clipboard.GTKPRIMARYCLIPBOARD, 0, 0);
+ GTK3.gtk_clipboard_set_can_store(Clipboard.GTKPRIMARYCLIPBOARD, 0, 0);
activePrimaryClipboard = owner;
}
return true;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
index 8cbf16e5f8..a1d584cc23 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
@@ -15,11 +15,15 @@
package org.eclipse.swt.dnd;
+import java.lang.reflect.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.dnd.gtk.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
import org.eclipse.swt.widgets.*;
/**
@@ -118,19 +122,23 @@ public class DragSource extends Widget {
static final String DEFAULT_DRAG_SOURCE_EFFECT = "DEFAULT_DRAG_SOURCE_EFFECT"; //$NON-NLS-1$
- static Callback DragBegin;
- static Callback DragGetData;
- static Callback DragEnd;
- static Callback DragDataDelete;
+ /* GTK4 GtkDragSource event controller signal callbacks */
+ static Callback dragBeginProc, dragPrepareProc, dragEndProc;
+
+ /* GTK3 GtkWidget drag event signal callbacks */
+ static Callback DragBegin, DragGetData, DragEnd, DragDataDelete;
+
static {
- DragBegin = new Callback(DragSource.class, "DragBegin", 2); //$NON-NLS-1$
- if (DragBegin.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- DragGetData = new Callback(DragSource.class, "DragGetData", 5); //$NON-NLS-1$
- if (DragGetData.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- DragEnd = new Callback(DragSource.class, "DragEnd", 2); //$NON-NLS-1$
- if (DragEnd.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- DragDataDelete = new Callback(DragSource.class, "DragDataDelete", 2); //$NON-NLS-1$
- if (DragDataDelete.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
+ if (GTK.GTK4) {
+ dragBeginProc = new Callback(DragSource.class, "dragBeginProc", void.class, new Type[] { long.class, long.class });
+ dragPrepareProc = new Callback(DragSource.class, "dragPrepareProc", long.class, new Type[] { long.class, double.class, double.class });
+ dragEndProc = new Callback(DragSource.class, "dragEndProc", void.class, new Type[] { long.class, long.class, boolean.class });
+ } else {
+ DragBegin = new Callback(DragSource.class, "DragBegin", 2); //$NON-NLS-1$
+ DragGetData = new Callback(DragSource.class, "DragGetData", 5); //$NON-NLS-1$
+ DragEnd = new Callback(DragSource.class, "DragEnd", 2); //$NON-NLS-1$
+ DragDataDelete = new Callback(DragSource.class, "DragDataDelete", 2); //$NON-NLS-1$
+ }
}
/**
@@ -165,48 +173,70 @@ public class DragSource extends Widget {
public DragSource(Control control, int style) {
super (control, checkStyle(style));
this.control = control;
- if (DragGetData == null || DragEnd == null || DragDataDelete == null) {
- DND.error(DND.ERROR_CANNOT_INIT_DRAG);
- }
- if (control.getData(DND.DRAG_SOURCE_KEY) != null) {
- DND.error(DND.ERROR_CANNOT_INIT_DRAG);
- }
- control.setData(DND.DRAG_SOURCE_KEY, this);
- OS.g_signal_connect(control.handle, OS.drag_begin, DragBegin.getAddress(), 0);
- OS.g_signal_connect(control.handle, OS.drag_data_get, DragGetData.getAddress(), 0);
- OS.g_signal_connect(control.handle, OS.drag_end, DragEnd.getAddress(), 0);
- OS.g_signal_connect(control.handle, OS.drag_data_delete, DragDataDelete.getAddress(), 0);
+ if (GTK.GTK4) {
+ if (dragBeginProc == null || dragPrepareProc == null || dragEndProc == null) {
+ DND.error(DND.ERROR_CANNOT_INIT_DRAG);
+ }
+ if (control.getData(DND.DRAG_SOURCE_KEY) != null) {
+ DND.error(DND.ERROR_CANNOT_INIT_DRAG);
+ }
+ control.setData(DND.DRAG_SOURCE_KEY, this);
+ long dragSourceController = GTK4.gtk_drag_source_new();
+ GTK4.gtk_widget_add_controller(control.handle, dragSourceController);
+ OS.g_signal_connect(dragSourceController, OS.drag_begin, dragBeginProc.getAddress(), 0);
+ OS.g_signal_connect(dragSourceController, OS.prepare, dragPrepareProc.getAddress(), 0);
+ OS.g_signal_connect(dragSourceController, OS.drag_end, dragEndProc.getAddress(), 0);
- controlListener = event -> {
- if (event.type == SWT.Dispose) {
- if (!DragSource.this.isDisposed()) {
- DragSource.this.dispose();
- }
+ // Set permitted actions on the GtkDragSource
+ int actions = opToOsOp(style);
+ GTK4.gtk_drag_source_set_actions(dragSourceController, actions);
+ } else {
+ if (DragGetData == null || DragEnd == null || DragDataDelete == null) {
+ DND.error(DND.ERROR_CANNOT_INIT_DRAG);
}
- if (event.type == SWT.DragDetect) {
- if (!DragSource.this.isDisposed()) {
- DragSource.this.drag(event);
+ if (control.getData(DND.DRAG_SOURCE_KEY) != null) {
+ DND.error(DND.ERROR_CANNOT_INIT_DRAG);
+ }
+ control.setData(DND.DRAG_SOURCE_KEY, this);
+
+ OS.g_signal_connect(control.handle, OS.drag_begin, DragBegin.getAddress(), 0);
+ OS.g_signal_connect(control.handle, OS.drag_data_get, DragGetData.getAddress(), 0);
+ OS.g_signal_connect(control.handle, OS.drag_end, DragEnd.getAddress(), 0);
+ OS.g_signal_connect(control.handle, OS.drag_data_delete, DragDataDelete.getAddress(), 0);
+
+
+
+ controlListener = event -> {
+ if (event.type == SWT.Dispose) {
+ if (!DragSource.this.isDisposed()) {
+ DragSource.this.dispose();
+ }
+ }
+ if (event.type == SWT.DragDetect) {
+ if (!DragSource.this.isDisposed()) {
+ DragSource.this.drag(event);
+ }
}
+ };
+ control.addListener (SWT.Dispose, controlListener);
+ control.addListener (SWT.DragDetect, controlListener);
+
+ Object effect = control.getData(DEFAULT_DRAG_SOURCE_EFFECT);
+ if (effect instanceof DragSourceEffect) {
+ dragEffect = (DragSourceEffect) effect;
+ } else if (control instanceof Tree) {
+ dragEffect = new TreeDragSourceEffect((Tree) control);
+ } else if (control instanceof Table) {
+ dragEffect = new TableDragSourceEffect((Table) control);
+ } else if (control instanceof List) {
+ dragEffect = new ListDragSourceEffect((List) control);
}
- };
- control.addListener (SWT.Dispose, controlListener);
- control.addListener (SWT.DragDetect, controlListener);
-
- Object effect = control.getData(DEFAULT_DRAG_SOURCE_EFFECT);
- if (effect instanceof DragSourceEffect) {
- dragEffect = (DragSourceEffect) effect;
- } else if (control instanceof Tree) {
- dragEffect = new TreeDragSourceEffect((Tree) control);
- } else if (control instanceof Table) {
- dragEffect = new TableDragSourceEffect((Table) control);
- } else if (control instanceof List) {
- dragEffect = new ListDragSourceEffect((List) control);
- }
- this.addListener(SWT.Dispose, e -> onDispose());
+ this.addListener(SWT.Dispose, e -> onDispose());
+ }
}
static int checkStyle (int style) {
@@ -214,6 +244,57 @@ static int checkStyle (int style) {
return style;
}
+static void dragBeginProc(long source, long drag) {
+ long widgetHandle = GTK.gtk_event_controller_get_widget(source);
+ DragSource dragSource = FindDragSource(widgetHandle);
+ if (dragSource == null) return;
+
+ dragSource.dragBeginGtk4(source);
+}
+
+void dragBeginGtk4(long source) {
+ DNDEvent event = new DNDEvent();
+ event.widget = this;
+ event.doit = true;
+ notifyListeners(DND.DragStart, event);
+ if (!event.doit || transferAgents == null || transferAgents.length == 0) return;
+
+ // If specified, setup drag icon
+ Image dragIcon = event.image;
+ if (source != 0 && dragIcon != null) {
+ long pixbuf = ImageList.createPixbuf(dragIcon);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_drag_source_set_icon(source, texture, 0, 0);
+ }
+}
+
+static long dragPrepareProc(long source, double x, double y) {
+ long widgetHandle = GTK.gtk_event_controller_get_widget(source);
+ DragSource dragSource = FindDragSource(widgetHandle);
+ if (dragSource == null) return 0;
+
+ return dragSource.dragPrepare();
+}
+
+long dragPrepare() {
+ TransferData transferData = new TransferData();
+
+ DNDEvent event = new DNDEvent();
+ event.widget = this;
+ event.dataType = transferData;
+ notifyListeners(DND.DragSetData, event);
+ if (!event.doit) return 0;
+
+ // TODO: Need to return GdkContentProvider for the data given from event.data
+ // Data from event.data also has to be converted to native through the Transfer class
+ return 0;
+}
+
+static void dragEndProc(long source, long drag, boolean delete_data) {
+
+}
+
static long DragBegin(long widget, long context){
DragSource source = FindDragSource(widget);
if (source == null) return 0;
@@ -298,6 +379,12 @@ protected void checkSubclass () {
}
}
+boolean canBeginDrag() {
+ if (transferAgents == null || transferAgents.length == 0) return false;
+ if (targetList == 0) return false;
+ return true;
+}
+
void drag(Event dragEvent) {
moveData = false;
DNDEvent event = new DNDEvent();
@@ -307,15 +394,14 @@ void drag(Event dragEvent) {
event.time = dragEvent.time;
event.doit = true;
notifyListeners(DND.DragStart, event);
- if (!event.doit || transferAgents == null || transferAgents.length == 0) return;
- if (targetList == 0) return;
+ if (!event.doit || !canBeginDrag()) return;
int actions = opToOsOp(getStyle());
Image image = event.image;
long context;
- context = GTK.gtk_drag_begin_with_coordinates(control.handle, targetList, actions, 1, 0, -1, -1);
+ context = GTK3.gtk_drag_begin_with_coordinates(control.handle, targetList, actions, 1, 0, -1, -1);
if (context != 0 && image != null) {
- GTK.gtk_drag_set_icon_surface(context, image.surface);
+ GTK3.gtk_drag_set_icon_surface(context, image.surface);
}
}
@@ -325,7 +411,7 @@ void dragBegin(long widget, long context) {
* When we recieve the signal from GTK of DragBegin, we will
* notify SWT that a drag has occurred.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && this.control instanceof Text) {
+ if (this.control instanceof Text) {
DNDEvent event = new DNDEvent();
Display display = Display.getCurrent();
Point loc = display.getCursorLocation();
@@ -338,7 +424,7 @@ void dragBegin(long widget, long context) {
if (targetList == 0) return;
Image image = event.image;
if (context != 0 && image != null) {
- GTK.gtk_drag_set_icon_surface(context, image.surface);
+ GTK3.gtk_drag_set_icon_surface(context, image.surface);
}
}
}
@@ -355,22 +441,24 @@ void dragEnd(long widget, long context){
*/
long display;
if (GTK.GTK4) {
- display = GDK.gdk_surface_get_display(GTK.gtk_widget_get_surface(widget));
+ long surface = GTK4.gtk_native_get_surface(GTK4.gtk_widget_get_native (widget));
+ display = GDK.gdk_surface_get_display(surface);
} else {
- display = GDK.gdk_window_get_display(GTK.gtk_widget_get_window(widget));
+ display = GDK.gdk_window_get_display(GTK3.gtk_widget_get_window(widget));
}
long pointer = GDK.gdk_get_pointer(display);
- long keyboard = GDK.gdk_device_get_associated_device(pointer);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- long pointer_seat = GDK.gdk_device_get_seat(pointer);
+
+ if (GTK.GTK4) {
+ //TODO: GTK4, ungrab keyboard seat if different from pointer's seat
+ } else {
+ long keyboard = GDK.gdk_device_get_associated_device(pointer);
long keyboard_seat = GDK.gdk_device_get_seat(keyboard);
- GDK.gdk_seat_ungrab(pointer_seat);
GDK.gdk_seat_ungrab(keyboard_seat);
- } else {
- GDK.gdk_device_ungrab(pointer, GDK.GDK_CURRENT_TIME);
- GDK.gdk_device_ungrab(keyboard, GDK.GDK_CURRENT_TIME);
}
+ long pointer_seat = GDK.gdk_device_get_seat(pointer);
+ GDK.gdk_seat_ungrab(pointer_seat);
+
int operation = DND.DROP_NONE;
if (context != 0) {
long dest_window = 0;
@@ -427,10 +515,10 @@ void dragEnd(long widget, long context){
void dragGetData(long widget, long context, long selection_data, int info, int time){
if (selection_data == 0) return;
- int length = GTK.gtk_selection_data_get_length(selection_data);
- int format = GTK.gtk_selection_data_get_format(selection_data);
- long data = GTK.gtk_selection_data_get_data(selection_data);
- long target = GTK.gtk_selection_data_get_target(selection_data);
+ int length = GTK3.gtk_selection_data_get_length(selection_data);
+ int format = GTK3.gtk_selection_data_get_format(selection_data);
+ long data = GTK3.gtk_selection_data_get_data(selection_data);
+ long target = GTK3.gtk_selection_data_get_target(selection_data);
if (target == 0) return;
TransferData transferData = new TransferData();
@@ -444,7 +532,6 @@ void dragGetData(long widget, long context, long selection_data, int info, int
event.time = time;
event.dataType = transferData;
notifyListeners(DND.DragSetData, event);
-
if (!event.doit) return;
Transfer transfer = null;
for (int i = 0; i < transferAgents.length; i++) {
@@ -457,7 +544,7 @@ void dragGetData(long widget, long context, long selection_data, int info, int
if (transfer == null) return;
transfer.javaToNative(event.data, transferData);
if (transferData.result != 1) return;
- GTK.gtk_selection_data_set(selection_data, transferData.type, transferData.format, transferData.pValue, transferData.length);
+ GTK3.gtk_selection_data_set(selection_data, transferData.type, transferData.format, transferData.pValue, transferData.length);
OS.g_free(transferData.pValue);
return;
}
@@ -538,7 +625,7 @@ public Transfer[] getTransfer(){
void onDispose() {
if (control == null) return;
if (targetList != 0) {
- GTK.gtk_target_list_unref(targetList);
+ GTK3.gtk_target_list_unref(targetList);
}
targetList = 0;
if (controlListener != null) {
@@ -623,41 +710,45 @@ public void setDragSourceEffect(DragSourceEffect effect) {
* dragged from this source
*/
public void setTransfer(Transfer... transferAgents){
- if (targetList != 0) {
- GTK.gtk_target_list_unref(targetList);
- targetList = 0;
- }
- this.transferAgents = transferAgents;
- if (transferAgents == null || transferAgents.length == 0) return;
-
- GtkTargetEntry[] targets = new GtkTargetEntry[0];
- for (int i = 0; i < transferAgents.length; i++) {
- Transfer transfer = transferAgents[i];
- if (transfer != null) {
- int[] typeIds = transfer.getTypeIds();
- String[] typeNames = transfer.getTypeNames();
- for (int j = 0; j < typeIds.length; j++) {
- GtkTargetEntry entry = new GtkTargetEntry();
- byte[] buffer = Converter.wcsToMbcs(typeNames[j], true);
- entry.target = OS.g_malloc(buffer.length);
- C.memmove(entry.target, buffer, buffer.length);
- entry.info = typeIds[j];
- GtkTargetEntry[] newTargets = new GtkTargetEntry[targets.length + 1];
- System.arraycopy(targets, 0, newTargets, 0, targets.length);
- newTargets[targets.length] = entry;
- targets = newTargets;
+ if (GTK.GTK4) {
+ this.transferAgents = transferAgents;
+ } else {
+ if (targetList != 0) {
+ GTK3.gtk_target_list_unref(targetList);
+ targetList = 0;
+ }
+ this.transferAgents = transferAgents;
+ if (transferAgents == null || transferAgents.length == 0) return;
+
+ GtkTargetEntry[] targets = new GtkTargetEntry[0];
+ for (int i = 0; i < transferAgents.length; i++) {
+ Transfer transfer = transferAgents[i];
+ if (transfer != null) {
+ int[] typeIds = transfer.getTypeIds();
+ String[] typeNames = transfer.getTypeNames();
+ for (int j = 0; j < typeIds.length; j++) {
+ GtkTargetEntry entry = new GtkTargetEntry();
+ byte[] buffer = Converter.wcsToMbcs(typeNames[j], true);
+ entry.target = OS.g_malloc(buffer.length);
+ C.memmove(entry.target, buffer, buffer.length);
+ entry.info = typeIds[j];
+ GtkTargetEntry[] newTargets = new GtkTargetEntry[targets.length + 1];
+ System.arraycopy(targets, 0, newTargets, 0, targets.length);
+ newTargets[targets.length] = entry;
+ targets = newTargets;
+ }
}
}
- }
- long pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof);
- for (int i = 0; i < targets.length; i++) {
- OS.memmove(pTargets + i*GtkTargetEntry.sizeof, targets[i], GtkTargetEntry.sizeof);
- }
- targetList = GTK.gtk_target_list_new(pTargets, targets.length);
+ long pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof);
+ for (int i = 0; i < targets.length; i++) {
+ GTK3.memmove(pTargets + i*GtkTargetEntry.sizeof, targets[i], GtkTargetEntry.sizeof);
+ }
+ targetList = GTK3.gtk_target_list_new(pTargets, targets.length);
- for (int i = 0; i < targets.length; i++) {
- OS.g_free(targets[i].target);
+ for (int i = 0; i < targets.length; i++) {
+ OS.g_free(targets[i].target);
+ }
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
index 35e0c4e9f1..9572d065c7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
import org.eclipse.swt.widgets.*;
/**
@@ -109,17 +111,16 @@ public class DropTarget extends Widget {
static Callback Drag_Data_Received;
static Callback Drag_Drop;
- static {
+ static {
Drag_Motion = new Callback(DropTarget.class, "Drag_Motion", 5); //$NON-NLS-1$
- if (Drag_Motion.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
Drag_Leave = new Callback(DropTarget.class, "Drag_Leave", 3); //$NON-NLS-1$
- if (Drag_Leave.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
Drag_Data_Received = new Callback(DropTarget.class, "Drag_Data_Received", 7); //$NON-NLS-1$
- if (Drag_Data_Received.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
Drag_Drop = new Callback(DropTarget.class, "Drag_Drop", 5); //$NON-NLS-1$
- if (Drag_Drop.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
+ /* GTK4 specific */
+ long dropController;
+
/**
* Creates a new <code>DropTarget</code> to allow data to be dropped on the specified
* <code>Control</code>.
@@ -154,85 +155,93 @@ public class DropTarget extends Widget {
public DropTarget(Control control, int style) {
super(control, checkStyle(style));
this.control = control;
- if (Drag_Motion == null || Drag_Leave == null || Drag_Data_Received == null || Drag_Drop == null) {
- DND.error(DND.ERROR_CANNOT_INIT_DROP);
- }
- if (control.getData(DND.DROP_TARGET_KEY) != null) {
- DND.error(DND.ERROR_CANNOT_INIT_DROP);
- }
- control.setData(DND.DROP_TARGET_KEY, this);
- drag_motion_handler = OS.g_signal_connect(control.handle, OS.drag_motion, Drag_Motion.getAddress(), 0);
- drag_leave_handler = OS.g_signal_connect(control.handle, OS.drag_leave, Drag_Leave.getAddress(), 0);
- drag_data_received_handler = OS.g_signal_connect(control.handle, OS.drag_data_received, Drag_Data_Received.getAddress(), 0);
- drag_drop_handler = OS.g_signal_connect(control.handle, OS.drag_drop, Drag_Drop.getAddress(), 0);
+ if (GTK.GTK4) {
+ int actions = opToOsOp(style);
+ dropController = GTK4.gtk_drop_target_async_new(0, actions);
- // Dispose listeners
- controlListener = event -> {
- if (!DropTarget.this.isDisposed()){
- DropTarget.this.dispose();
+ GTK4.gtk_widget_add_controller(control.handle, dropController);
+ } else {
+ if (Drag_Motion == null || Drag_Leave == null || Drag_Data_Received == null || Drag_Drop == null) {
+ DND.error(DND.ERROR_CANNOT_INIT_DROP);
}
- };
- control.addListener(SWT.Dispose, controlListener);
-
- this.addListener(SWT.Dispose, event -> onDispose());
-
- Object effect = control.getData(DEFAULT_DROP_TARGET_EFFECT);
- if (effect instanceof DropTargetEffect) {
- dropEffect = (DropTargetEffect) effect;
- } else if (control instanceof Table) {
- dropEffect = new TableDropTargetEffect((Table) control);
- } else if (control instanceof Tree) {
- dropEffect = new TreeDropTargetEffect((Tree) control);
- }
+ if (control.getData(DND.DROP_TARGET_KEY) != null) {
+ DND.error(DND.ERROR_CANNOT_INIT_DROP);
+ }
+ control.setData(DND.DROP_TARGET_KEY, this);
- dragOverHeartbeat = () -> {
- Control control1 = DropTarget.this.control;
- if (control1 == null || control1.isDisposed() || dragOverStart == 0) return;
- long time = System.currentTimeMillis();
- int delay = DRAGOVER_HYSTERESIS;
- if (time < dragOverStart) {
- delay = (int)(dragOverStart - time);
- } else {
- dragOverEvent.time += DRAGOVER_HYSTERESIS;
- int allowedOperations = dragOverEvent.operations;
- TransferData[] allowedTypes = dragOverEvent.dataTypes;
- //pass a copy of data types in to listeners in case application modifies it
- TransferData[] dataTypes = new TransferData[allowedTypes.length];
- System.arraycopy(allowedTypes, 0, dataTypes, 0, dataTypes.length);
-
- DNDEvent event = new DNDEvent();
- event.widget = dragOverEvent.widget;
- event.x = dragOverEvent.x;
- event.y = dragOverEvent.y;
- event.time = dragOverEvent.time;
- event.feedback = DND.FEEDBACK_SELECT;
- event.dataTypes = dataTypes;
- event.dataType = selectedDataType;
- event.operations = dragOverEvent.operations;
- event.detail = selectedOperation;
- if (dropEffect != null) {
- event.item = dropEffect.getItem(dragOverEvent.x, dragOverEvent.y);
+ drag_motion_handler = OS.g_signal_connect(control.handle, OS.drag_motion, Drag_Motion.getAddress(), 0);
+ drag_leave_handler = OS.g_signal_connect(control.handle, OS.drag_leave, Drag_Leave.getAddress(), 0);
+ drag_data_received_handler = OS.g_signal_connect(control.handle, OS.drag_data_received, Drag_Data_Received.getAddress(), 0);
+ drag_drop_handler = OS.g_signal_connect(control.handle, OS.drag_drop, Drag_Drop.getAddress(), 0);
+
+ // Dispose listeners
+ controlListener = event -> {
+ if (!DropTarget.this.isDisposed()){
+ DropTarget.this.dispose();
}
- selectedDataType = null;
- selectedOperation = DND.DROP_NONE;
- notifyListeners(DND.DragOver, event);
- if (event.dataType != null) {
- for (int i = 0; i < allowedTypes.length; i++) {
- if (allowedTypes[i].type == event.dataType.type) {
- selectedDataType = event.dataType;
- break;
+ };
+ control.addListener(SWT.Dispose, controlListener);
+
+ this.addListener(SWT.Dispose, event -> onDispose());
+
+ Object effect = control.getData(DEFAULT_DROP_TARGET_EFFECT);
+ if (effect instanceof DropTargetEffect) {
+ dropEffect = (DropTargetEffect) effect;
+ } else if (control instanceof Table) {
+ dropEffect = new TableDropTargetEffect((Table) control);
+ } else if (control instanceof Tree) {
+ dropEffect = new TreeDropTargetEffect((Tree) control);
+ }
+
+ dragOverHeartbeat = () -> {
+ Control control1 = DropTarget.this.control;
+ if (control1 == null || control1.isDisposed() || dragOverStart == 0) return;
+ long time = System.currentTimeMillis();
+ int delay = DRAGOVER_HYSTERESIS;
+ if (time < dragOverStart) {
+ delay = (int)(dragOverStart - time);
+ } else {
+ dragOverEvent.time += DRAGOVER_HYSTERESIS;
+ int allowedOperations = dragOverEvent.operations;
+ TransferData[] allowedTypes = dragOverEvent.dataTypes;
+ //pass a copy of data types in to listeners in case application modifies it
+ TransferData[] dataTypes = new TransferData[allowedTypes.length];
+ System.arraycopy(allowedTypes, 0, dataTypes, 0, dataTypes.length);
+
+ DNDEvent event = new DNDEvent();
+ event.widget = dragOverEvent.widget;
+ event.x = dragOverEvent.x;
+ event.y = dragOverEvent.y;
+ event.time = dragOverEvent.time;
+ event.feedback = DND.FEEDBACK_SELECT;
+ event.dataTypes = dataTypes;
+ event.dataType = selectedDataType;
+ event.operations = dragOverEvent.operations;
+ event.detail = selectedOperation;
+ if (dropEffect != null) {
+ event.item = dropEffect.getItem(dragOverEvent.x, dragOverEvent.y);
+ }
+ selectedDataType = null;
+ selectedOperation = DND.DROP_NONE;
+ notifyListeners(DND.DragOver, event);
+ if (event.dataType != null) {
+ for (int i = 0; i < allowedTypes.length; i++) {
+ if (allowedTypes[i].type == event.dataType.type) {
+ selectedDataType = event.dataType;
+ break;
+ }
}
}
+ if (selectedDataType != null && (event.detail & allowedOperations) != 0) {
+ selectedOperation = event.detail;
+ }
}
- if (selectedDataType != null && (event.detail & allowedOperations) != 0) {
- selectedOperation = event.detail;
- }
- }
- control1 = DropTarget.this.control;
- if (control1 == null || control1.isDisposed()) return;
- control1.getDisplay().timerExec(delay, dragOverHeartbeat);
- };
+ control1 = DropTarget.this.control;
+ if (control1 == null || control1.isDisposed()) return;
+ control1.getDisplay().timerExec(delay, dragOverHeartbeat);
+ };
+ }
}
static int checkStyle (int style) {
@@ -341,10 +350,10 @@ void drag_data_received ( long widget, long context, int x, int y, long selectio
// Get data in a Java format
Object object = null;
TransferData transferData = new TransferData();
- int length = GTK.gtk_selection_data_get_length(selection_data);
- int format = GTK.gtk_selection_data_get_format(selection_data);
- long data = GTK.gtk_selection_data_get_data(selection_data);
- long type = GTK.gtk_selection_data_get_data_type(selection_data);
+ int length = GTK3.gtk_selection_data_get_length(selection_data);
+ int format = GTK3.gtk_selection_data_get_format(selection_data);
+ long data = GTK3.gtk_selection_data_get_data(selection_data);
+ long type = GTK3.gtk_selection_data_get_data_type(selection_data);
if (data != 0) {
transferData.type = type;
transferData.length = length;
@@ -374,7 +383,7 @@ void drag_data_received ( long widget, long context, int x, int y, long selectio
OS.g_signal_stop_emission_by_name(widget, OS.drag_data_received);
//notify source of action taken
- GTK.gtk_drag_finish(context, selectedOperation != DND.DROP_NONE, selectedOperation== DND.DROP_MOVE, time);
+ GTK3.gtk_drag_finish(context, selectedOperation != DND.DROP_NONE, selectedOperation== DND.DROP_MOVE, time);
return;
}
@@ -411,7 +420,7 @@ boolean drag_drop(long widget, long context, int x, int y, int time) {
return false;
}
// ask drag source for dropped data
- GTK.gtk_drag_get_data(widget, context, selectedDataType.type, time);
+ GTK3.gtk_drag_get_data(widget, context, selectedDataType.type, time);
return true;
}
@@ -601,7 +610,7 @@ void onDispose(){
OS.g_signal_handler_disconnect(control.handle, drag_data_received_handler);
OS.g_signal_handler_disconnect(control.handle, drag_drop_handler);
if (transferAgents.length != 0)
- GTK.gtk_drag_dest_unset(control.handle);
+ GTK3.gtk_drag_dest_unset(control.handle);
transferAgents = null;
if (controlListener != null)
control.removeListener(SWT.Dispose, controlListener);
@@ -674,51 +683,63 @@ public void removeDropListener(DropTargetListener listener) {
* </ul>
*/
public void setTransfer(Transfer... transferAgents){
- if (transferAgents == null) DND.error(SWT.ERROR_NULL_ARGUMENT);
+ if (GTK.GTK4) {
+ this.transferAgents = transferAgents;
- if (this.transferAgents.length != 0) {
- GTK.gtk_drag_dest_unset(control.handle);
- }
- this.transferAgents = transferAgents;
-
- GtkTargetEntry[] targets = new GtkTargetEntry[0];
- for (int i = 0; i < transferAgents.length; i++) {
- Transfer transfer = transferAgents[i];
- if (transfer != null) {
- int[] typeIds = transfer.getTypeIds();
- String[] typeNames = transfer.getTypeNames();
- for (int j = 0; j < typeIds.length; j++) {
- GtkTargetEntry entry = new GtkTargetEntry();
- byte[] buffer = Converter.wcsToMbcs(typeNames[j], true);
- entry.target = OS.g_malloc(buffer.length);
- C.memmove(entry.target, buffer, buffer.length);
- entry.info = typeIds[j];
- GtkTargetEntry[] newTargets = new GtkTargetEntry[targets.length + 1];
- System.arraycopy(targets, 0, newTargets, 0, targets.length);
- newTargets[targets.length] = entry;
- targets = newTargets;
+ long contentFormatsBuilder = GTK4.gdk_content_formats_builder_new();
+ for (Transfer agent : transferAgents) {
+ for (String typeName : agent.getTypeNames()) {
+ GTK4.gdk_content_formats_builder_add_mime_type(contentFormatsBuilder, Converter.javaStringToCString(typeName));
}
}
- }
+ GTK4.gtk_drop_target_async_set_formats(dropController, contentFormatsBuilder);
+ } else {
+ if (transferAgents == null) DND.error(SWT.ERROR_NULL_ARGUMENT);
- long pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof);
- for (int i = 0; i < targets.length; i++) {
- OS.memmove(pTargets + i*GtkTargetEntry.sizeof, targets[i], GtkTargetEntry.sizeof);
- }
+ if (this.transferAgents.length != 0) {
+ GTK3.gtk_drag_dest_unset(control.handle);
+ }
+ this.transferAgents = transferAgents;
- int actions = opToOsOp(getStyle());
- if (control instanceof Combo) {
- if ((control.getStyle() & SWT.READ_ONLY) == 0) {
- long entryHandle = GTK.gtk_bin_get_child (control.handle);
- if (entryHandle != 0) {
- GTK.gtk_drag_dest_unset(entryHandle);
+ GtkTargetEntry[] targets = new GtkTargetEntry[0];
+ for (int i = 0; i < transferAgents.length; i++) {
+ Transfer transfer = transferAgents[i];
+ if (transfer != null) {
+ int[] typeIds = transfer.getTypeIds();
+ String[] typeNames = transfer.getTypeNames();
+ for (int j = 0; j < typeIds.length; j++) {
+ GtkTargetEntry entry = new GtkTargetEntry();
+ byte[] buffer = Converter.wcsToMbcs(typeNames[j], true);
+ entry.target = OS.g_malloc(buffer.length);
+ C.memmove(entry.target, buffer, buffer.length);
+ entry.info = typeIds[j];
+ GtkTargetEntry[] newTargets = new GtkTargetEntry[targets.length + 1];
+ System.arraycopy(targets, 0, newTargets, 0, targets.length);
+ newTargets[targets.length] = entry;
+ targets = newTargets;
+ }
}
}
- }
- GTK.gtk_drag_dest_set(control.handle, 0, pTargets, targets.length, actions);
- for (int i = 0; i < targets.length; i++) {
- OS.g_free(targets[i].target);
+ long pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof);
+ for (int i = 0; i < targets.length; i++) {
+ GTK3.memmove(pTargets + i*GtkTargetEntry.sizeof, targets[i], GtkTargetEntry.sizeof);
+ }
+
+ int actions = opToOsOp(getStyle());
+ if (control instanceof Combo) {
+ if ((control.getStyle() & SWT.READ_ONLY) == 0) {
+ long entryHandle = GTK3.gtk_bin_get_child (control.handle);
+ if (entryHandle != 0) {
+ GTK3.gtk_drag_dest_unset(entryHandle);
+ }
+ }
+ }
+ GTK3.gtk_drag_dest_set(control.handle, 0, pTargets, targets.length, actions);
+
+ for (int i = 0; i < targets.length; i++) {
+ OS.g_free(targets[i].target);
+ }
}
}
@@ -778,10 +799,9 @@ boolean setEventData(long context, int x, int y, int time, DNDEvent event) {
if (dataTypes.length == 0) return false;
int [] origin_x = new int[1], origin_y = new int[1];
if (GTK.GTK4) {
- long surface = GTK.gtk_widget_get_surface (control.handle);
- GDK.gdk_surface_get_origin(surface, origin_x, origin_y);
+ // TODO: GTK4 no gdk_surface_get_origin
} else {
- long window = GTK.gtk_widget_get_window (control.handle);
+ long window = GTK3.gtk_widget_get_window (control.handle);
GDK.gdk_window_get_origin(window, origin_x, origin_y);
}
Point coordinates = DPIUtil.autoScaleDown(new Point(origin_x[0] + x, origin_y[0] + y));
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java
index c95207eeef..a5682302ef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java
@@ -27,8 +27,8 @@ import org.eclipse.swt.internal.gtk.*;
* below:</p>
*
* <pre><code>
- * File file1 = new File("C:\temp\file1");
- * File file2 = new File("C:\temp\file2");
+ * File file1 = new File("C:\\temp\\file1");
+ * File file2 = new File("C:\\temp\\file2");
* String[] fileData = new String[2];
* fileData[0] = file1.getAbsolutePath();
* fileData[1] = file2.getAbsolutePath();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
index 34fa8fee05..686d328ccf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
@@ -27,8 +27,8 @@ import org.eclipse.swt.widgets.*;
* <p>An example of a java <code>ImageData</code> is shown below:</p>
*
* <pre><code>
- * Image image = new Image(display, "C:\temp\img1.gif");
- * ImageData imgData = image.getImageData();
+ * Image image = new Image(display, "C:\\temp\\img1.gif");
+ * ImageData imgData = image.getImageData();
* </code></pre>
*
* @see Transfer
@@ -91,7 +91,7 @@ public void javaToNative(Object object, TransferData transferData) {
ImageData imgData = (ImageData)object;
if (imgData == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
Image image = new Image(Display.getCurrent(), imgData);
- long pixbuf = ImageList.createPixbuf(image);
+ long pixbuf = ImageList.createPixbuf(image);
if (pixbuf != 0) {
String typeStr = "";
if (transferData.type == JPEG_ID) typeStr = "jpeg";
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
index af900f9731..7dc98a6f7f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -13,10 +13,7 @@
*******************************************************************************/
package org.eclipse.swt.dnd;
-import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.cairo.*;
-import org.eclipse.swt.internal.gtk.*;
import org.eclipse.swt.widgets.*;
/**
@@ -83,73 +80,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
Image getDragSourceImage(DragSourceEvent event) {
if (dragSourceImage != null) dragSourceImage.dispose();
- dragSourceImage = null;
-
- Table table = (Table) control;
- //TEMPORARY CODE
- if (table.isListening(SWT.EraseItem) || table.isListening (SWT.PaintItem)) return null;
-
- /*
- * Bug in GTK. gtk_tree_selection_get_selected_rows() segmentation faults
- * in versions smaller than 2.2.4 if the model is NULL. The fix is
- * to give a valid pointer instead.
- */
- long handle = table.handle;
- long selection = GTK.gtk_tree_view_get_selection (handle);
- long [] model = null;
- long list = GTK.gtk_tree_selection_get_selected_rows (selection, model);
- if (list == 0) return null;
- int count = Math.min(10, OS.g_list_length (list));
- long originalList = list;
-
- Display display = table.getDisplay();
- if (count == 1) {
- long path = OS.g_list_nth_data (list, 0);
- long icon = GTK.gtk_tree_view_create_row_drag_icon (handle, path);
- dragSourceImage = Image.gtk_new (display, SWT.ICON, icon, 0);
- GTK.gtk_tree_path_free (path);
- } else {
- int width = 0, height = 0;
- int[] w = new int[1], h = new int[1];
- int[] yy = new int[count], hh = new int[count];
- long [] icons = new long [count];
- GdkRectangle rect = new GdkRectangle ();
- for (int i=0; i<count; i++) {
- long path = OS.g_list_data (list);
- GTK.gtk_tree_view_get_cell_area (handle, path, 0, rect);
- icons[i] = GTK.gtk_tree_view_create_row_drag_icon(handle, path);
- switch (Cairo.cairo_surface_get_type(icons[i])) {
- case Cairo.CAIRO_SURFACE_TYPE_IMAGE:
- w[0] = Cairo.cairo_image_surface_get_width(icons[i]);
- h[0] = Cairo.cairo_image_surface_get_height(icons[i]);
- break;
- case Cairo.CAIRO_SURFACE_TYPE_XLIB:
- w[0] = Cairo.cairo_xlib_surface_get_width(icons[i]);
- h[0] = Cairo.cairo_xlib_surface_get_height(icons[i]);
- break;
- }
- width = Math.max(width, w[0]);
- height = rect.y + h[0] - yy[0];
- yy[i] = rect.y;
- hh[i] = h[0];
- list = OS.g_list_next (list);
- GTK.gtk_tree_path_free (path);
- }
- long surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height);
- if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long cairo = Cairo.cairo_create(surface);
- if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE);
- for (int i=0; i<count; i++) {
- Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2);
- Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]);
- Cairo.cairo_fill(cairo);
- Cairo.cairo_surface_destroy(icons[i]);
- }
- Cairo.cairo_destroy(cairo);
- dragSourceImage = Image.gtk_new (display, SWT.ICON, surface, 0);
- }
- OS.g_list_free (originalList);
+ dragSourceImage = TreeTableCommon.getDragSourceImage(control);
return dragSourceImage;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java
index b718c66a99..3ff822475e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java
@@ -63,17 +63,17 @@ public class TransferData {
/**
* Specifies the size in bits of a single unit in pValue.
- * (Warning: This field is platform dependent)
+ * (Warning: This field is platform dependent)
* <p>
* <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
* public API. It is marked public only so that it can be shared
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
- *
- * This is most commonly 8 bits.
- *
- * @noreference This field is not intended to be referenced by clients.
+ *
+ * This is most commonly 8 bits.
+ *
+ * @noreference This field is not intended to be referenced by clients.
*/
public int format;
@@ -101,7 +101,7 @@ public class TransferData {
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
- * <p>The value of result is 1 if the conversion was successful.
+ * <p>The value of result is 1 if the conversion was successful.
* The value of result is 0 if the conversion failed.</p>
*
* @noreference This field is not intended to be referenced by clients.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index d48a177f1c..f6eb7614c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -13,10 +13,7 @@
*******************************************************************************/
package org.eclipse.swt.dnd;
-import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.cairo.*;
-import org.eclipse.swt.internal.gtk.*;
import org.eclipse.swt.widgets.*;
/**
@@ -82,73 +79,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
Image getDragSourceImage(DragSourceEvent event) {
if (dragSourceImage != null) dragSourceImage.dispose();
- dragSourceImage = null;
-
- Tree tree = (Tree) control;
- //TEMPORARY CODE
- if (tree.isListening(SWT.EraseItem) || tree.isListening (SWT.PaintItem)) return null;
-
- /*
- * Bug in GTK. gtk_tree_selection_get_selected_rows() segmentation faults
- * in versions smaller than 2.2.4 if the model is NULL. The fix is
- * to give a valid pointer instead.
- */
- long handle = tree.handle;
- long selection = GTK.gtk_tree_view_get_selection (handle);
- long [] model = null;
- long list = GTK.gtk_tree_selection_get_selected_rows (selection, model);
- if (list == 0) return null;
- int count = Math.min(10, OS.g_list_length (list));
- long originalList = list;
-
- Display display = tree.getDisplay();
- if (count == 1) {
- long path = OS.g_list_nth_data (list, 0);
- long icon = GTK.gtk_tree_view_create_row_drag_icon (handle, path);
- dragSourceImage = Image.gtk_new (display, SWT.ICON, icon, 0);
- GTK.gtk_tree_path_free (path);
- } else {
- int width = 0, height = 0;
- int[] w = new int[1], h = new int[1];
- int[] yy = new int[count], hh = new int[count];
- long [] icons = new long [count];
- GdkRectangle rect = new GdkRectangle ();
- for (int i=0; i<count; i++) {
- long path = OS.g_list_data (list);
- GTK.gtk_tree_view_get_cell_area (handle, path, 0, rect);
- icons[i] = GTK.gtk_tree_view_create_row_drag_icon(handle, path);
- switch (Cairo.cairo_surface_get_type(icons[i])) {
- case Cairo.CAIRO_SURFACE_TYPE_IMAGE:
- w[0] = Cairo.cairo_image_surface_get_width(icons[i]);
- h[0] = Cairo.cairo_image_surface_get_height(icons[i]);
- break;
- case Cairo.CAIRO_SURFACE_TYPE_XLIB:
- w[0] = Cairo.cairo_xlib_surface_get_width(icons[i]);
- h[0] = Cairo.cairo_xlib_surface_get_height(icons[i]);
- break;
- }
- width = Math.max(width, w[0]);
- height = rect.y + h[0] - yy[0];
- yy[i] = rect.y;
- hh[i] = h[0];
- list = OS.g_list_next (list);
- GTK.gtk_tree_path_free (path);
- }
- long surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height);
- if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long cairo = Cairo.cairo_create(surface);
- if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE);
- for (int i=0; i<count; i++) {
- Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2);
- Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]);
- Cairo.cairo_fill(cairo);
- Cairo.cairo_surface_destroy(icons[i]);
- }
- Cairo.cairo_destroy(cairo);
- dragSourceImage = Image.gtk_new (display, SWT.ICON, surface, 0);
- }
- OS.g_list_free (originalList);
+ dragSourceImage = TreeTableCommon.getDragSourceImage(control);
return dragSourceImage;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeTableCommon.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeTableCommon.java
new file mode 100644
index 0000000000..24560166d3
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeTableCommon.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.dnd;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cairo.*;
+import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.widgets.*;
+
+class TreeTableCommon {
+ static Image getDragSourceImage(Control control) {
+ Image dragSourceImage;
+
+ /*
+ * Bug in GTK. gtk_tree_selection_get_selected_rows() segmentation faults
+ * in versions smaller than 2.2.4 if the model is NULL. The fix is
+ * to give a valid pointer instead.
+ */
+ long handle = control.handle;
+ long selection = GTK.gtk_tree_view_get_selection (handle);
+ long [] model = null;
+ long list = GTK.gtk_tree_selection_get_selected_rows (selection, model);
+ if (list == 0) return null;
+ int count = Math.min(10, OS.g_list_length (list));
+ long originalList = list;
+
+ Display display = control.getDisplay();
+ if (count == 1) {
+ long path = OS.g_list_nth_data (list, 0);
+ long icon = GTK.gtk_tree_view_create_row_drag_icon (handle, path);
+ dragSourceImage = Image.gtk_new (display, SWT.ICON, icon, 0);
+ GTK.gtk_tree_path_free (path);
+ } else {
+ int width = 0, height = 0;
+ int[] w = new int[1], h = new int[1];
+ int[] yy = new int[count], hh = new int[count];
+ long [] icons = new long [count];
+ GdkRectangle rect = new GdkRectangle ();
+ for (int i=0; i<count; i++) {
+ long path = OS.g_list_data (list);
+ GTK.gtk_tree_view_get_cell_area (handle, path, 0, rect);
+ icons[i] = GTK.gtk_tree_view_create_row_drag_icon(handle, path);
+ switch (Cairo.cairo_surface_get_type(icons[i])) {
+ case Cairo.CAIRO_SURFACE_TYPE_IMAGE:
+ w[0] = Cairo.cairo_image_surface_get_width(icons[i]);
+ h[0] = Cairo.cairo_image_surface_get_height(icons[i]);
+ break;
+ case Cairo.CAIRO_SURFACE_TYPE_XLIB:
+ w[0] = Cairo.cairo_xlib_surface_get_width(icons[i]);
+ h[0] = Cairo.cairo_xlib_surface_get_height(icons[i]);
+ break;
+ }
+ width = Math.max(width, w[0]);
+ height = rect.y + h[0] - yy[0];
+ yy[i] = rect.y;
+ hh[i] = h[0];
+ list = OS.g_list_next (list);
+ GTK.gtk_tree_path_free (path);
+ }
+ long surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height);
+ if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ long cairo = Cairo.cairo_create(surface);
+ if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE);
+ for (int i=0; i<count; i++) {
+ Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2);
+ Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]);
+ Cairo.cairo_fill(cairo);
+ Cairo.cairo_surface_destroy(icons[i]);
+ }
+ Cairo.cairo_destroy(cairo);
+ dragSourceImage = Image.gtk_new (display, SWT.ICON, surface, 0);
+ }
+ OS.g_list_free (originalList);
+ return dragSourceImage;
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
index da236b440b..4a94ddf79f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
@@ -142,13 +142,12 @@ public TransferData[] getSupportedTypes() {
@Override
public boolean isSupportedType(TransferData transferData){
if (transferData == null) return false;
- int[] types = getTypeIds();
- for (int i = 0; i < types.length; i++) {
+ for (int type : getTypeIds()) {
FORMATETC format = transferData.formatetc;
- if (format.cfFormat == types[i] &&
- (format.dwAspect & COM.DVASPECT_CONTENT) == COM.DVASPECT_CONTENT &&
- (format.tymed & COM.TYMED_HGLOBAL) == COM.TYMED_HGLOBAL )
- return true;
+ if (format.cfFormat == type &&
+ (format.dwAspect & COM.DVASPECT_CONTENT) == COM.DVASPECT_CONTENT &&
+ (format.tymed & COM.TYMED_HGLOBAL) == COM.TYMED_HGLOBAL )
+ return true;
}
return false;
}
@@ -172,7 +171,7 @@ protected void javaToNative (Object object, TransferData transferData) {
// The caller of this method must release the data when it is done with it.
byte[] data = (byte[])object;
int size = data.length;
- long /*int*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, size);
+ long newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, size);
OS.MoveMemory(newPtr, data, size);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -203,10 +202,10 @@ protected Object nativeToJava(TransferData transferData) {
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- long /*int*/ hMem = stgmedium.unionField;
+ long hMem = stgmedium.unionField;
int size = OS.GlobalSize(hMem);
byte[] buffer = new byte[size];
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long ptr = OS.GlobalLock(hMem);
OS.MoveMemory(buffer, ptr, size);
OS.GlobalUnlock(hMem);
OS.GlobalFree(hMem);
@@ -214,6 +213,6 @@ protected Object nativeToJava(TransferData transferData) {
}
boolean checkByteArray(Object object) {
- return (object != null && object instanceof byte[] && ((byte[])object).length > 0);
+ return (object instanceof byte[] && ((byte[])object).length > 0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java
index 7a5ef22c0c..e2cbe7d8c5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Paul Pazderski - Bug 418714: Content copied to clipboard lost after dispose
*******************************************************************************/
package org.eclipse.swt.dnd;
@@ -220,9 +221,30 @@ public void dispose () {
* The argument pDataObject is owned by the caller so reference count does not
* need to be incremented.
*/
+ int result = COM.S_OK;
if (COM.OleIsCurrentClipboard(this.iDataObject.getAddress()) == COM.S_OK) {
- COM.OleFlushClipboard();
+ result = COM.OleFlushClipboard();
}
+ /* Just like setContents, flushing the clipboard can fail if another application is
+ * inspecting the clipboard at the exact moment we want to flush our content.
+ * In this case try a few more times before accepting the failure.
+ */
+ int retryCount = 0;
+ while (result != COM.S_OK && retryCount++ < RETRY_LIMIT) {
+ try {
+ Thread.sleep(25);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ break;
+ }
+ if (COM.OleIsCurrentClipboard(this.iDataObject.getAddress()) != COM.S_OK) {
+ break;
+ }
+ MSG msg = new MSG();
+ OS.PeekMessage(msg, 0, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD);
+ result = COM.OleFlushClipboard();
+ }
+
this.Release();
display = null;
}
@@ -319,7 +341,7 @@ public Object getContents(Transfer transfer, int clipboards) {
* the clipboard, use PeekMessage() to enable cross thread
* message sends.
*/
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
int retryCount = 0;
/* OleGetClipboard([out] ppDataObject).
* AddRef has already been called on ppDataObject by the callee and must be released by the caller.
@@ -334,10 +356,8 @@ public Object getContents(Transfer transfer, int clipboards) {
if (result != COM.S_OK) return null;
IDataObject dataObject = new IDataObject(ppv[0]);
try {
- TransferData[] allowed = transfer.getSupportedTypes();
- for (int i = 0; i < allowed.length; i++) {
- if (dataObject.QueryGetData(allowed[i].formatetc) == COM.S_OK) {
- TransferData data = allowed[i];
+ for (TransferData data : transfer.getSupportedTypes()) {
+ if (dataObject.QueryGetData(data.formatetc) == COM.S_OK) {
data.pIDataObject = ppv[0];
return transfer.nativeToJava(data);
}
@@ -522,20 +542,20 @@ private void createCOMInterfaces() {
// register each of the interfaces that this object implements
iDataObject = new COMObject(new int[]{2, 0, 0, 2, 2, 1, 2, 3, 2, 4, 1, 1}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return GetData(args[0], args[1]);}
+ public long method3(long[] args) {return GetData(args[0], args[1]);}
// method4 GetDataHere - not implemented
@Override
- public long /*int*/ method5(long /*int*/[] args) {return QueryGetData(args[0]);}
+ public long method5(long[] args) {return QueryGetData(args[0]);}
// method6 GetCanonicalFormatEtc - not implemented
// method7 SetData - not implemented
@Override
- public long /*int*/ method8(long /*int*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);}
+ public long method8(long[] args) {return EnumFormatEtc((int)args[0], args[1]);}
// method9 DAdvise - not implemented
// method10 DUnadvise - not implemented
// method11 EnumDAdvise - not implemented
@@ -551,13 +571,13 @@ private void disposeCOMInterfaces() {
* Ownership of ppenumFormatetc transfers from callee to caller so reference count on ppenumFormatetc
* must be incremented before returning. Caller is responsible for releasing ppenumFormatetc.
*/
-private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) {
+private int EnumFormatEtc(int dwDirection, long ppenumFormatetc) {
// only allow getting of data - SetData is not currently supported
if (dwDirection == COM.DATADIR_SET) return COM.E_NOTIMPL;
// what types have been registered?
TransferData[] allowedDataTypes = new TransferData[0];
- for (int i = 0; i < transferAgents.length; i++){
- TransferData[] formats = transferAgents[i].getSupportedTypes();
+ for (Transfer transferAgent : transferAgents) {
+ TransferData[] formats = transferAgent.getSupportedTypes();
TransferData[] newAllowedDataTypes = new TransferData[allowedDataTypes.length + formats.length];
System.arraycopy(allowedDataTypes, 0, newAllowedDataTypes, 0, allowedDataTypes.length);
System.arraycopy(formats, 0, newAllowedDataTypes, allowedDataTypes.length, formats.length);
@@ -577,10 +597,10 @@ private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) {
dropeffect.tymed = COM.TYMED_HGLOBAL;
formats[formats.length -1] = dropeffect;
enumFORMATETC.setFormats(formats);
- OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppenumFormatetc, new long[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF);
return COM.S_OK;
}
-private int GetData(long /*int*/ pFormatetc, long /*int*/ pmedium) {
+private int GetData(long pFormatetc, long pmedium) {
/* Called by a data consumer to obtain data from a source data object.
The GetData method renders the data described in the specified FORMATETC
structure and transfers it through the specified STGMEDIUM structure.
@@ -622,7 +642,7 @@ private int GetData(long /*int*/ pFormatetc, long /*int*/ pmedium) {
return transferData.result;
}
-private int QueryGetData(long /*int*/ pFormatetc) {
+private int QueryGetData(long pFormatetc) {
if (transferAgents == null) return COM.E_FAIL;
TransferData transferData = new TransferData();
transferData.formatetc = new FORMATETC();
@@ -630,8 +650,8 @@ private int QueryGetData(long /*int*/ pFormatetc) {
transferData.type = transferData.formatetc.cfFormat;
if (transferData.type == CFSTR_PREFERREDDROPEFFECT) return COM.S_OK;
// is this type supported by the transfer agent?
- for (int i = 0; i < transferAgents.length; i++){
- if (transferAgents[i].isSupportedType(transferData))
+ for (Transfer transferAgent : transferAgents) {
+ if (transferAgent.isSupportedType(transferData))
return COM.S_OK;
}
@@ -641,16 +661,16 @@ private int QueryGetData(long /*int*/ pFormatetc) {
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
-private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+private int QueryInterface(long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDataObject) ) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iDataObject.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
private int Release() {
@@ -775,13 +795,13 @@ public String[] getAvailableTypeNames() {
private FORMATETC[] _getAvailableTypes() {
FORMATETC[] types = new FORMATETC[0];
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
/* OleGetClipboard([out] ppDataObject).
* AddRef has already been called on ppDataObject by the callee and must be released by the caller.
*/
if (COM.OleGetClipboard(ppv) != COM.S_OK) return types;
IDataObject dataObject = new IDataObject(ppv[0]);
- long /*int*/[] ppFormatetc = new long /*int*/[1];
+ long[] ppFormatetc = new long[1];
/* EnumFormatEtc([in] dwDirection, [out] ppenumFormatetc)
* AddRef has already been called on ppenumFormatetc by the callee and must be released by the caller.
*/
@@ -790,7 +810,7 @@ private FORMATETC[] _getAvailableTypes() {
if (rc != COM.S_OK)return types;
IEnumFORMATETC enumFormatetc = new IEnumFORMATETC(ppFormatetc[0]);
// Loop over enumerator and save any types that match what we are looking for
- long /*int*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
+ long rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
int[] pceltFetched = new int[1];
enumFormatetc.Reset();
while (enumFormatetc.Next(1, rgelt, pceltFetched) == COM.S_OK && pceltFetched[0] == 1) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
index b5bbd27b87..fb276dd7f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 497807
+ * Paul Pazderski - Improved implementation of IDataObject for bug 549643, 549661 and 567422
*******************************************************************************/
package org.eclipse.swt.dnd;
@@ -111,12 +112,11 @@ public class DragSource extends Widget {
Transfer[] transferAgents = new Transfer[0];
DragSourceEffect dragEffect;
Composite topControl;
- long /*int*/ hwndDrag;
+ long hwndDrag;
// ole interfaces
- COMObject iDropSource;
- COMObject iDataObject;
- int refCount;
+ COMIDropSource iDropSource;
+ COMIDataObject iDataObject;
//workaround - track the operation performed by the drop target for DragEnd event
int dataEffect = DND.DROP_NONE;
@@ -125,6 +125,213 @@ public class DragSource extends Widget {
static final int CFSTR_PERFORMEDDROPEFFECT = Transfer.registerType("Performed DropEffect"); //$NON-NLS-1$
static final TCHAR WindowClass = new TCHAR (0, "#32770", true);
+ private class COMIDropSource extends COMObject {
+
+ private long refCount = 0;
+
+ /**
+ * Create a new IDropSource COM object. Object is created with one active
+ * reference. (see {@link #Release()})
+ */
+ public COMIDropSource() {
+ super(new int[]{2, 0, 0, 2, 1});
+ AddRef();
+ }
+
+ @Override
+ public long method0(long[] args) {return QueryInterface(this, args[0], args[1]);}
+ @Override
+ public long method1(long[] args) {return AddRef();}
+ @Override
+ public long method2(long[] args) {return Release();}
+ @Override
+ public long method3(long[] args) {return QueryContinueDrag((int)args[0], (int)args[1]);}
+ @Override
+ public long method4(long[] args) {return GiveFeedback((int)args[0]);}
+
+ public long AddRef() {
+ refCount++;
+ return refCount;
+ }
+
+ public long Release() {
+ refCount--;
+ if (refCount == 0) {
+ if (DragSource.this.iDropSource == this) {
+ DragSource.this.iDropSource = null;
+ }
+ this.dispose();
+ if (COM.FreeUnusedLibraries) {
+ COM.CoFreeUnusedLibraries();
+ }
+ }
+ return refCount;
+ }
+ }
+
+ private class COMIDataObject extends COMObject {
+ /*
+ * A SWT application is used to provide the data to drag in an event callback
+ * which is called while the DND operation is performed. However Windows expects
+ * the data to passed around in an object whose lifetime is managed through
+ * reference counting. The drop target can keep a reference on the IDataObject
+ * and even try to query the data long after the DND operation is finished. One
+ * such case is Windows Explorer when showing a Portal Device (see bug 549661).
+ * SWT does two things to support this case:
+ * 1. Implement reference counting as intended. I.e. do not force release the
+ * object after DND is finished but trust that all involved applications are
+ * able to count correctly and will release the object at some point.
+ * 2. Cache the data which was last transfered/generated from the DragSource
+ * to be able to send it again after the DND operation is finished.
+ */
+
+ private long refCount = 0;
+
+ private final Transfer[] transferAgents;
+
+ /**
+ * The most recent data send in a GetData request (or GetDataHere if
+ * implemented). Or from another perspective the data the application returned
+ * in the most recent {@link DND#DragSetData} event.
+ */
+ private Object lastData = null;
+
+ /**
+ * Create a new IDataObject COM object. Objects are created with one active
+ * reference. (see {@link #Release()})
+ *
+ * @param transferAgents should be the transfer agents which are set on
+ * DragSource at the time this object is created.
+ */
+ public COMIDataObject(Transfer[] transferAgents) {
+ super(new int[]{2, 0, 0, 2, 2, 1, 2, 3, 2, 4, 1, 1});
+ AddRef();
+ this.transferAgents = transferAgents;
+ }
+
+ @Override
+ public long method0(long[] args) {return QueryInterface(this, args[0], args[1]);}
+ @Override
+ public long method1(long[] args) {return AddRef();}
+ @Override
+ public long method2(long[] args) {return Release();}
+ @Override
+ public long method3(long[] args) {return GetData(args[0], args[1]);}
+ // method4 GetDataHere - not implemented
+ @Override
+ public long method5(long[] args) {return QueryGetData(transferAgents, args[0]);}
+ // method6 GetCanonicalFormatEtc - not implemented
+ @Override
+ public long method7(long[] args) {return SetData(args[0], args[1], (int)args[2]);}
+ @Override
+ public long method8(long[] args) {return EnumFormatEtc(transferAgents, (int)args[0], args[1]);}
+ // method9 DAdvise - not implemented
+ // method10 DUnadvise - not implemented
+ // method11 EnumDAdvise - not implemented
+
+ public long AddRef() {
+ refCount++;
+ return refCount;
+ }
+
+ public long Release() {
+ refCount--;
+ if (refCount == 0) {
+ if (DragSource.this.iDataObject == this) {
+ DragSource.this.iDataObject = null;
+ }
+ this.dispose();
+ if (COM.FreeUnusedLibraries) {
+ COM.CoFreeUnusedLibraries();
+ }
+ }
+ return refCount;
+ }
+
+ /**
+ * Check if this IDataObject is currently used in a DND operation.
+ *
+ * @return <code>true</true> if this object currently used for DND
+ */
+ private boolean isActive() {
+ return DragSource.this.iDataObject == this;
+ }
+
+ private int GetData(long pFormatetc, long pmedium) {
+ /* Called by a data consumer to obtain data from a source data object.
+ The GetData method renders the data described in the specified FORMATETC
+ structure and transfers it through the specified STGMEDIUM structure.
+ The caller then assumes responsibility for releasing the STGMEDIUM structure.
+ */
+ if (pFormatetc == 0 || pmedium == 0) return COM.E_INVALIDARG;
+
+ if (QueryGetData(transferAgents, pFormatetc) != COM.S_OK) return COM.DV_E_FORMATETC;
+
+ TransferData transferData = new TransferData();
+ transferData.formatetc = new FORMATETC();
+ COM.MoveMemory(transferData.formatetc, pFormatetc, FORMATETC.sizeof);
+ transferData.type = transferData.formatetc.cfFormat;
+ transferData.stgmedium = new STGMEDIUM();
+ transferData.result = COM.E_FAIL;
+
+ final Object data;
+ if (isActive()) {
+ DNDEvent event = new DNDEvent();
+ event.widget = DragSource.this;
+ event.time = OS.GetMessageTime();
+ event.dataType = transferData;
+ notifyListeners(DND.DragSetData,event);
+
+ if (!event.doit) return COM.E_FAIL;
+
+ lastData = event.data;
+ data = event.data;
+ } else {
+ if (lastData == null) {
+ return COM.E_FAIL;
+ }
+ data = lastData;
+ }
+
+ // get matching transfer agent to perform conversion
+ Transfer transfer = null;
+ for (Transfer transferAgent : transferAgents) {
+ if (transferAgent != null && transferAgent.isSupportedType(transferData)){
+ transfer = transferAgent;
+ break;
+ }
+ }
+
+ if (transfer == null) return COM.DV_E_FORMATETC;
+ transfer.javaToNative(data, transferData);
+ if (transferData.result != COM.S_OK) return transferData.result;
+ COM.MoveMemory(pmedium, transferData.stgmedium, STGMEDIUM.sizeof);
+ return transferData.result;
+ }
+
+ private int SetData(long pFormatetc, long pmedium, int fRelease) {
+ if (pFormatetc == 0 || pmedium == 0) return COM.E_INVALIDARG;
+ FORMATETC formatetc = new FORMATETC();
+ COM.MoveMemory(formatetc, pFormatetc, FORMATETC.sizeof);
+ if (formatetc.cfFormat == CFSTR_PERFORMEDDROPEFFECT && formatetc.tymed == COM.TYMED_HGLOBAL) {
+ STGMEDIUM stgmedium = new STGMEDIUM();
+ COM.MoveMemory(stgmedium, pmedium,STGMEDIUM.sizeof);
+ //TODO - this should be GlobalLock()
+ long[] ptrEffect = new long[1];
+ OS.MoveMemory(ptrEffect, stgmedium.unionField, C.PTR_SIZEOF);
+ int[] effect = new int[1];
+ OS.MoveMemory(effect, ptrEffect[0], 4);
+ if (isActive()) {
+ dataEffect = osToOp(effect[0]);
+ }
+ }
+ if (fRelease == 1) {
+ COM.ReleaseStgMedium(pmedium);
+ }
+ return COM.S_OK;
+ }
+ }
+
/**
* Creates a new <code>DragSource</code> to handle dragging from the specified <code>Control</code>.
* Creating an instance of a DragSource may cause system resources to be allocated depending on the platform.
@@ -161,8 +368,6 @@ public DragSource(Control control, int style) {
DND.error(DND.ERROR_CANNOT_INIT_DRAG);
}
control.setData(DND.DRAG_SOURCE_KEY, this);
- createCOMInterfaces();
- this.AddRef();
controlListener = event -> {
if (event.type == SWT.Dispose) {
@@ -235,47 +440,10 @@ public void addDragListener(DragSourceListener listener) {
addListener(DND.DragEnd, typedListener);
}
-private int AddRef() {
- refCount++;
- return refCount;
-}
-
private void createCOMInterfaces() {
- // register each of the interfaces that this object implements
- iDropSource = new COMObject(new int[]{2, 0, 0, 2, 1}){
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- @Override
- public long /*int*/ method3(long /*int*/[] args) {return QueryContinueDrag((int)/*64*/args[0], (int)/*64*/args[1]);}
- @Override
- public long /*int*/ method4(long /*int*/[] args) {return GiveFeedback((int)/*64*/args[0]);}
- };
-
- iDataObject = new COMObject(new int[]{2, 0, 0, 2, 2, 1, 2, 3, 2, 4, 1, 1}){
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- @Override
- public long /*int*/ method3(long /*int*/[] args) {return GetData(args[0], args[1]);}
- // method4 GetDataHere - not implemented
- @Override
- public long /*int*/ method5(long /*int*/[] args) {return QueryGetData(args[0]);}
- // method6 GetCanonicalFormatEtc - not implemented
- @Override
- public long /*int*/ method7(long /*int*/[] args) {return SetData(args[0], args[1], (int)/*64*/args[2]);}
- @Override
- public long /*int*/ method8(long /*int*/[] args) {return EnumFormatEtc((int)/*64*/args[0], args[1]);}
- // method9 DAdvise - not implemented
- // method10 DUnadvise - not implemented
- // method11 EnumDAdvise - not implemented
- };
+ releaseCOMInterfaces();
+ iDropSource = new COMIDropSource();
+ iDataObject = new COMIDataObject(transferAgents);
}
@Override
@@ -287,16 +455,21 @@ protected void checkSubclass() {
}
}
-private void disposeCOMInterfaces() {
+private void releaseCOMInterfaces() {
if (iDropSource != null)
- iDropSource.dispose();
+ iDropSource.Release();
iDropSource = null;
if (iDataObject != null)
- iDataObject.dispose();
+ iDataObject.Release();
iDataObject = null;
}
+boolean canBeginDrag() {
+ if (transferAgents == null || transferAgents.length == 0) return false;
+ return true;
+}
+
private void drag(Event dragEvent) {
DNDEvent event = new DNDEvent();
event.widget = this;
@@ -305,7 +478,7 @@ private void drag(Event dragEvent) {
event.time = OS.GetMessageTime();
event.doit = true;
notifyListeners(DND.DragStart,event);
- if (!event.doit || transferAgents == null || transferAgents.length == 0 ) return;
+ if (!event.doit || !canBeginDrag()) return;
int[] pdwEffect = new int[1];
int operations = opToOs(getStyle());
@@ -347,14 +520,14 @@ private void drag(Event dragEvent) {
OS.ShowWindow (hwndDrag, OS.SW_SHOW);
}
OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offsetX, event.offsetY);
- /*
- * Feature in Windows. When ImageList_DragEnter() is called,
- * it takes a snapshot of the screen If a drag is started
- * when another window is in front, then the snapshot will
- * contain part of the other window, causing pixel corruption.
- * The fix is to force all paints to be delivered before
- * calling ImageList_DragEnter().
- */
+ /*
+ * Feature in Windows. When ImageList_DragEnter() is called,
+ * it takes a snapshot of the screen If a drag is started
+ * when another window is in front, then the snapshot will
+ * contain part of the other window, causing pixel corruption.
+ * The fix is to force all paints to be delivered before
+ * calling ImageList_DragEnter().
+ */
int flags = OS.RDW_UPDATENOW | OS.RDW_ALLCHILDREN;
OS.RedrawWindow (topControl.handle, null, 0, flags);
POINT pt = new POINT ();
@@ -365,10 +538,14 @@ private void drag(Event dragEvent) {
OS.GetWindowRect (hwndDrag, rect);
OS.ImageList_DragEnter(hwndDrag, pt.x - rect.left, pt.y - rect.top);
}
+ String externalLoopKey = "org.eclipse.swt.internal.win32.externalEventLoop";
int result = COM.DRAGDROP_S_CANCEL;
try {
+ createCOMInterfaces();
+ display.setData(externalLoopKey, Boolean.TRUE);
result = COM.DoDragDrop(iDataObject.getAddress(), iDropSource.getAddress(), operations, pdwEffect);
} finally {
+ display.setData(externalLoopKey, Boolean.FALSE);
// ensure that we don't leave transparent window around
if (hwndDrag != 0) {
OS.ImageList_DragLeave(hwndDrag);
@@ -379,6 +556,7 @@ private void drag(Event dragEvent) {
topControl = null;
}
display.setData(key, oldValue);
+ releaseCOMInterfaces();
}
int operation = osToOp(pdwEffect[0]);
if (dataEffect == DND.DROP_MOVE) {
@@ -388,6 +566,7 @@ private void drag(Event dragEvent) {
operation = dataEffect;
}
}
+
event = new DNDEvent();
event.widget = this;
event.time = OS.GetMessageTime();
@@ -401,14 +580,13 @@ private void drag(Event dragEvent) {
* Ownership of ppenumFormatetc transfers from callee to caller so reference count on ppenumFormatetc
* must be incremented before returning. Caller is responsible for releasing ppenumFormatetc.
*/
-private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) {
+private static int EnumFormatEtc(Transfer[] transferAgents, int dwDirection, long ppenumFormatetc) {
// only allow getting of data - SetData is not currently supported
if (dwDirection == COM.DATADIR_SET) return COM.E_NOTIMPL;
// what types have been registered?
TransferData[] allowedDataTypes = new TransferData[0];
- for (int i = 0; i < transferAgents.length; i++){
- Transfer transferAgent = transferAgents[i];
+ for (Transfer transferAgent : transferAgents) {
if (transferAgent != null) {
TransferData[] formats = transferAgent.getSupportedTypes();
TransferData[] newAllowedDataTypes = new TransferData[allowedDataTypes.length + formats.length];
@@ -427,7 +605,7 @@ private int EnumFormatEtc(int dwDirection, long /*int*/ ppenumFormatetc) {
}
enumFORMATETC.setFormats(formats);
- OS.MoveMemory(ppenumFormatetc, new long /*int*/[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppenumFormatetc, new long[] {enumFORMATETC.getAddress()}, C.PTR_SIZEOF);
return COM.S_OK;
}
/**
@@ -440,48 +618,6 @@ public Control getControl() {
return control;
}
-private int GetData(long /*int*/ pFormatetc, long /*int*/ pmedium) {
- /* Called by a data consumer to obtain data from a source data object.
- The GetData method renders the data described in the specified FORMATETC
- structure and transfers it through the specified STGMEDIUM structure.
- The caller then assumes responsibility for releasing the STGMEDIUM structure.
- */
- if (pFormatetc == 0 || pmedium == 0) return COM.E_INVALIDARG;
-
- if (QueryGetData(pFormatetc) != COM.S_OK) return COM.DV_E_FORMATETC;
-
- TransferData transferData = new TransferData();
- transferData.formatetc = new FORMATETC();
- COM.MoveMemory(transferData.formatetc, pFormatetc, FORMATETC.sizeof);
- transferData.type = transferData.formatetc.cfFormat;
- transferData.stgmedium = new STGMEDIUM();
- transferData.result = COM.E_FAIL;
-
- DNDEvent event = new DNDEvent();
- event.widget = this;
- event.time = OS.GetMessageTime();
- event.dataType = transferData;
- notifyListeners(DND.DragSetData,event);
-
- if (!event.doit) return COM.E_FAIL;
-
- // get matching transfer agent to perform conversion
- Transfer transfer = null;
- for (int i = 0; i < transferAgents.length; i++){
- Transfer transferAgent = transferAgents[i];
- if (transferAgent != null && transferAgent.isSupportedType(transferData)){
- transfer = transferAgent;
- break;
- }
- }
-
- if (transfer == null) return COM.DV_E_FORMATETC;
- transfer.javaToNative(event.data, transferData);
- if (transferData.result != COM.S_OK) return transferData.result;
- COM.MoveMemory(pmedium, transferData.stgmedium, STGMEDIUM.sizeof);
- return transferData.result;
-}
-
/**
* Returns an array of listeners who will be notified when a drag and drop
* operation is in progress, by sending it one of the messages defined in
@@ -576,7 +712,7 @@ private int QueryContinueDrag(int fEscapePressed, int grfKeyState) {
private void onDispose() {
if (control == null) return;
- this.Release();
+ releaseCOMInterfaces();
if (controlListener != null){
control.removeListener(SWT.Dispose, controlListener);
control.removeListener(SWT.DragDetect, controlListener);
@@ -615,7 +751,7 @@ private int osToOp(int osOperation){
return operation;
}
-private int QueryGetData(long /*int*/ pFormatetc) {
+private static int QueryGetData(Transfer[] transferAgents, long pFormatetc) {
if (transferAgents == null) return COM.E_FAIL;
TransferData transferData = new TransferData();
transferData.formatetc = new FORMATETC();
@@ -623,9 +759,8 @@ private int QueryGetData(long /*int*/ pFormatetc) {
transferData.type = transferData.formatetc.cfFormat;
// is this type supported by the transfer agent?
- for (int i = 0; i < transferAgents.length; i++){
- Transfer transfer = transferAgents[i];
- if (transfer != null && transfer.isSupportedType(transferData))
+ for (Transfer transferAgent : transferAgents) {
+ if (transferAgent != null && transferAgent.isSupportedType(transferData))
return COM.S_OK;
}
@@ -636,39 +771,24 @@ private int QueryGetData(long /*int*/ pFormatetc) {
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
-private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+private static int QueryInterface(COMObject comObject, long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
- if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDropSource)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDropSource.getAddress()}, C.PTR_SIZEOF);
- AddRef();
+ if (comObject != null && COM.IsEqualGUID(guid, COM.IIDIUnknown)
+ || (COM.IsEqualGUID(guid, COM.IIDIDropSource) && (comObject instanceof COMIDropSource))
+ || (COM.IsEqualGUID(guid, COM.IIDIDataObject) && (comObject instanceof COMIDataObject))) {
+ OS.MoveMemory(ppvObject, new long[] {comObject.getAddress()}, C.PTR_SIZEOF);
+ comObject.method1(null); // AddRef
return COM.S_OK;
}
- if (COM.IsEqualGUID(guid, COM.IIDIDataObject) ) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDataObject.getAddress()}, C.PTR_SIZEOF);
- AddRef();
- return COM.S_OK;
- }
-
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
-private int Release() {
- refCount--;
- if (refCount == 0) {
- disposeCOMInterfaces();
- if (COM.FreeUnusedLibraries) {
- COM.CoFreeUnusedLibraries();
- }
- }
- return refCount;
-}
-
/**
* Removes the listener from the collection of listeners who will
* be notified when a drag and drop operation is in progress.
@@ -694,26 +814,6 @@ public void removeDragListener(DragSourceListener listener) {
removeListener(DND.DragEnd, listener);
}
-private int SetData(long /*int*/ pFormatetc, long /*int*/ pmedium, int fRelease) {
- if (pFormatetc == 0 || pmedium == 0) return COM.E_INVALIDARG;
- FORMATETC formatetc = new FORMATETC();
- COM.MoveMemory(formatetc, pFormatetc, FORMATETC.sizeof);
- if (formatetc.cfFormat == CFSTR_PERFORMEDDROPEFFECT && formatetc.tymed == COM.TYMED_HGLOBAL) {
- STGMEDIUM stgmedium = new STGMEDIUM();
- COM.MoveMemory(stgmedium, pmedium,STGMEDIUM.sizeof);
- //TODO - this should be GlobalLock()
- long /*int*/[] ptrEffect = new long /*int*/[1];
- OS.MoveMemory(ptrEffect, stgmedium.unionField, C.PTR_SIZEOF);
- int[] effect = new int[1];
- OS.MoveMemory(effect, ptrEffect[0], 4);
- dataEffect = osToOp(effect[0]);
- }
- if (fRelease == 1) {
- COM.ReleaseStgMedium(pmedium);
- }
- return COM.S_OK;
-}
-
/**
* Specifies the drag effect for this DragSource. This drag effect will be
* used during a drag and drop operation.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
index 58c13a8f35..38fae8ec95 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -234,35 +234,35 @@ void createCOMInterfaces() {
boolean is32 = C.PTR_SIZEOF == 4;
iDropTarget = new COMObject(new int[]{2, 0, 0, is32 ? 5 : 4, is32 ? 4 : 3, 0, is32 ? 5 : 4}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {
+ public long method3(long[] args) {
if (args.length == 5) {
- return DragEnter(args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]);
+ return DragEnter(args[0], (int)args[1], (int)args[2], (int)args[3], args[4]);
} else {
- return DragEnter_64(args[0], (int)/*64*/args[1], args[2], args[3]);
+ return DragEnter_64(args[0], (int)args[1], args[2], args[3]);
}
}
@Override
- public long /*int*/ method4(long /*int*/[] args) {
+ public long method4(long[] args) {
if (args.length == 4) {
- return DragOver((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3]);
+ return DragOver((int)args[0], (int)args[1], (int)args[2], args[3]);
} else {
- return DragOver_64((int)/*64*/args[0], args[1], args[2]);
+ return DragOver_64((int)args[0], args[1], args[2]);
}
}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return DragLeave();}
+ public long method5(long[] args) {return DragLeave();}
@Override
- public long /*int*/ method6(long /*int*/[] args) {
+ public long method6(long[] args) {
if (args.length == 5) {
- return Drop(args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4]);
+ return Drop(args[0], (int)args[1], (int)args[2], (int)args[3], args[4]);
} else {
- return Drop_64(args[0], (int)/*64*/args[1], args[2], args[3]);
+ return Drop_64(args[0], (int)args[1], args[2], args[3]);
}
}
};
@@ -274,13 +274,13 @@ void disposeCOMInterfaces() {
iDropTarget = null;
}
-int DragEnter_64(long /*int*/ pDataObject, int grfKeyState, long pt, long /*int*/ pdwEffect) {
+int DragEnter_64(long pDataObject, int grfKeyState, long pt, long pdwEffect) {
POINT point = new POINT();
OS.MoveMemory(point, new long[]{pt}, 8);
return DragEnter(pDataObject, grfKeyState, point.x, point.y, pdwEffect);
}
-int DragEnter(long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
+int DragEnter(long pDataObject, int grfKeyState, int pt_x, int pt_y, long pdwEffect) {
pt_x = DPIUtil.autoScaleDown(pt_x);// To Points
pt_y = DPIUtil.autoScaleDown(pt_y);// To Points
selectedDataType = null;
@@ -308,9 +308,9 @@ int DragEnter(long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, lon
}
selectedDataType = null;
- for (int i = 0; i < allowedDataTypes.length; i++) {
- if (TransferData.sameType(allowedDataTypes[i], event.dataType)){
- selectedDataType = allowedDataTypes[i];
+ for (TransferData allowedDataType : allowedDataTypes) {
+ if (TransferData.sameType(allowedDataType, event.dataType)){
+ selectedDataType = allowedDataType;
break;
}
}
@@ -341,13 +341,13 @@ int DragLeave() {
return COM.S_OK;
}
-int DragOver_64(int grfKeyState, long pt, long /*int*/ pdwEffect) {
+int DragOver_64(int grfKeyState, long pt, long pdwEffect) {
POINT point = new POINT();
OS.MoveMemory(point, new long[]{pt}, 8);
return DragOver(grfKeyState, point.x, point.y, pdwEffect);
}
-int DragOver(int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
+int DragOver(int grfKeyState, int pt_x, int pt_y, long pdwEffect) {
pt_x = DPIUtil.autoScaleDown(pt_x);// To Points
pt_y = DPIUtil.autoScaleDown(pt_y);// To Points
if (iDataObject == null) return COM.S_FALSE;
@@ -379,9 +379,9 @@ int DragOver(int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
}
selectedDataType = null;
- for (int i = 0; i < allowedDataTypes.length; i++) {
- if (TransferData.sameType(allowedDataTypes[i], event.dataType)){
- selectedDataType = allowedDataTypes[i];
+ for (TransferData allowedDataType : allowedDataTypes) {
+ if (TransferData.sameType(allowedDataType, event.dataType)){
+ selectedDataType = allowedDataType;
break;
}
}
@@ -395,87 +395,93 @@ int DragOver(int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
return COM.S_OK;
}
-int Drop_64(long /*int*/ pDataObject, int grfKeyState, long pt, long /*int*/ pdwEffect) {
+int Drop_64(long pDataObject, int grfKeyState, long pt, long pdwEffect) {
POINT point = new POINT();
OS.MoveMemory(point, new long[]{pt}, 8);
return Drop(pDataObject, grfKeyState, point.x, point.y, pdwEffect);
}
-int Drop(long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
- pt_x = DPIUtil.autoScaleDown(pt_x);// To Points
- pt_y = DPIUtil.autoScaleDown(pt_y);// To Points
- DNDEvent event = new DNDEvent();
- event.widget = this;
- event.time = OS.GetMessageTime();
- if (dropEffect != null) {
- event.item = dropEffect.getItem(pt_x, pt_y);
- }
- event.detail = DND.DROP_NONE;
- notifyListeners(DND.DragLeave, event);
- refresh();
-
- event = new DNDEvent();
- if (!setEventData(event, pDataObject, grfKeyState, pt_x, pt_y, pdwEffect)) {
+int Drop(long pDataObject, int grfKeyState, int pt_x, int pt_y, long pdwEffect) {
+ try {
+ pt_x = DPIUtil.autoScaleDown(pt_x);// To Points
+ pt_y = DPIUtil.autoScaleDown(pt_y);// To Points
+ DNDEvent event = new DNDEvent();
+ event.widget = this;
+ event.time = OS.GetMessageTime();
+ if (dropEffect != null) {
+ event.item = dropEffect.getItem(pt_x, pt_y);
+ }
+ event.detail = DND.DROP_NONE;
+ notifyListeners(DND.DragLeave, event);
+ refresh();
+
+ event = new DNDEvent();
+ if (!setEventData(event, pDataObject, grfKeyState, pt_x, pt_y, pdwEffect)) {
+ keyOperation = -1;
+ OS.MoveMemory(pdwEffect, new int[] {COM.DROPEFFECT_NONE}, 4);
+ return COM.S_FALSE;
+ }
keyOperation = -1;
- OS.MoveMemory(pdwEffect, new int[] {COM.DROPEFFECT_NONE}, 4);
- return COM.S_FALSE;
- }
- keyOperation = -1;
- int allowedOperations = event.operations;
- TransferData[] allowedDataTypes = new TransferData[event.dataTypes.length];
- System.arraycopy(event.dataTypes, 0, allowedDataTypes, 0, allowedDataTypes.length);
- event.dataType = selectedDataType;
- event.detail = selectedOperation;
- notifyListeners(DND.DropAccept,event);
- refresh();
+ int allowedOperations = event.operations;
+ TransferData[] allowedDataTypes = new TransferData[event.dataTypes.length];
+ System.arraycopy(event.dataTypes, 0, allowedDataTypes, 0, allowedDataTypes.length);
+ event.dataType = selectedDataType;
+ event.detail = selectedOperation;
+ notifyListeners(DND.DropAccept,event);
+ refresh();
+
+ selectedDataType = null;
+ for (TransferData allowedDataType : allowedDataTypes) {
+ if (TransferData.sameType(allowedDataType, event.dataType)){
+ selectedDataType = allowedDataType;
+ break;
+ }
+ }
+ selectedOperation = DND.DROP_NONE;
+ if (selectedDataType != null && (allowedOperations & event.detail) == event.detail) {
+ selectedOperation = event.detail;
+ }
- selectedDataType = null;
- for (int i = 0; i < allowedDataTypes.length; i++) {
- if (TransferData.sameType(allowedDataTypes[i], event.dataType)){
- selectedDataType = allowedDataTypes[i];
- break;
+ if (selectedOperation == DND.DROP_NONE){
+ OS.MoveMemory(pdwEffect, new int[] {COM.DROPEFFECT_NONE}, 4);
+ return COM.S_OK;
}
- }
- selectedOperation = DND.DROP_NONE;
- if (selectedDataType != null && (allowedOperations & event.detail) == event.detail) {
- selectedOperation = event.detail;
- }
- if (selectedOperation == DND.DROP_NONE){
- OS.MoveMemory(pdwEffect, new int[] {COM.DROPEFFECT_NONE}, 4);
- return COM.S_OK;
- }
+ // Get Data in a Java format
+ Object object = null;
+ for (Transfer transfer : transferAgents) {
+ if (transfer != null && transfer.isSupportedType(selectedDataType)){
+ object = transfer.nativeToJava(selectedDataType);
+ break;
+ }
+ }
+ if (object == null){
+ selectedOperation = DND.DROP_NONE;
+ }
- // Get Data in a Java format
- Object object = null;
- for (int i = 0; i < transferAgents.length; i++){
- Transfer transfer = transferAgents[i];
- if (transfer != null && transfer.isSupportedType(selectedDataType)){
- object = transfer.nativeToJava(selectedDataType);
- break;
+ event.detail = selectedOperation;
+ event.dataType = selectedDataType;
+ event.data = object;
+ OS.ImageList_DragShowNolock(false);
+ try {
+ notifyListeners(DND.Drop,event);
+ } finally {
+ OS.ImageList_DragShowNolock(true);
}
- }
- if (object == null){
+ refresh();
selectedOperation = DND.DROP_NONE;
- }
-
- event.detail = selectedOperation;
- event.dataType = selectedDataType;
- event.data = object;
- OS.ImageList_DragShowNolock(false);
- try {
- notifyListeners(DND.Drop,event);
+ if ((allowedOperations & event.detail) == event.detail) {
+ selectedOperation = event.detail;
+ }
+ //notify source of action taken
+ OS.MoveMemory(pdwEffect, new int[] {opToOs(selectedOperation)}, 4);
+ return COM.S_OK;
} finally {
- OS.ImageList_DragShowNolock(true);
- }
- refresh();
- selectedOperation = DND.DROP_NONE;
- if ((allowedOperations & event.detail) == event.detail) {
- selectedOperation = event.detail;
+ if (iDataObject != null) {
+ iDataObject.Release();
+ iDataObject = null;
+ }
}
- //notify source of action taken
- OS.MoveMemory(pdwEffect, new int[] {opToOs(selectedOperation)}, 4);
- return COM.S_OK;
}
/**
@@ -619,19 +625,19 @@ int osToOp(int osOperation){
* Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
* must be incremented before returning. Caller is responsible for releasing ppvObject.
*/
-int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+int QueryInterface(long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDropTarget)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDropTarget.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iDropTarget.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -650,7 +656,7 @@ int Release() {
void refresh() {
if (control == null || control.isDisposed()) return;
- long /*int*/ handle = control.handle;
+ long handle = control.handle;
RECT lpRect = new RECT();
if (OS.GetUpdateRect(handle, lpRect, false)) {
OS.ImageList_DragShowNolock(false);
@@ -700,7 +706,7 @@ public void setDropTargetEffect(DropTargetEffect effect) {
dropEffect = effect;
}
-boolean setEventData(DNDEvent event, long /*int*/ pDataObject, int grfKeyState, int pt_x, int pt_y, long /*int*/ pdwEffect) {
+boolean setEventData(DNDEvent event, long pDataObject, int grfKeyState, int pt_x, int pt_y, long pdwEffect) {
if (pDataObject == 0 || pdwEffect == 0) return false;
// get allowed operations
@@ -726,14 +732,14 @@ boolean setEventData(DNDEvent event, long /*int*/ pDataObject, int grfKeyState,
IDataObject dataObject = new IDataObject(pDataObject);
dataObject.AddRef();
try {
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
if (dataObject.EnumFormatEtc(COM.DATADIR_GET, address) != COM.S_OK) {
return false;
}
IEnumFORMATETC enumFormatetc = new IEnumFORMATETC(address[0]);
try {
// Loop over enumerator and save any types that match what we are looking for
- long /*int*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
+ long rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
try {
int[] pceltFetched = new int[1];
enumFormatetc.Reset();
@@ -743,8 +749,7 @@ boolean setEventData(DNDEvent event, long /*int*/ pDataObject, int grfKeyState,
COM.MoveMemory(transferData.formatetc, rgelt, FORMATETC.sizeof);
transferData.type = transferData.formatetc.cfFormat;
transferData.pIDataObject = pDataObject;
- for (int i = 0; i < transferAgents.length; i++){
- Transfer transfer = transferAgents[i];
+ for (Transfer transfer : transferAgents) {
if (transfer != null && transfer.isSupportedType(transferData)){
TransferData[] newDataTypes = new TransferData[dataTypes.length + 1];
System.arraycopy(dataTypes, 0, newDataTypes, 0, dataTypes.length);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java
index caab8e35bd..651e81b6ad 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/FileTransfer.java
@@ -27,8 +27,8 @@ import org.eclipse.swt.internal.win32.*;
* below:</p>
*
* <pre><code>
- * File file1 = new File("C:\temp\file1");
- * File file2 = new File("C:\temp\file2");
+ * File file1 = new File("C:\\temp\\file1");
+ * File file2 = new File("C:\\temp\\file2");
* String[] fileData = new String[2];
* fileData[0] = file1.getAbsolutePath();
* fileData[1] = file2.getAbsolutePath();
@@ -39,8 +39,10 @@ import org.eclipse.swt.internal.win32.*;
public class FileTransfer extends ByteArrayTransfer {
private static FileTransfer _instance = new FileTransfer();
- private static final String CF_HDROP = "CF_HDROP "; //$NON-NLS-1$
+ private static final String CF_HDROP = "CF_HDROP"; //$NON-NLS-1$
private static final int CF_HDROPID = COM.CF_HDROP;
+ private static final String CFSTR_SHELLIDLIST = "Shell IDList Array"; //$NON-NLS-1$
+ private static final int CFSTR_SHELLIDLISTID = registerType(CFSTR_SHELLIDLIST);
private FileTransfer() {}
@@ -71,30 +73,37 @@ public void javaToNative(Object object, TransferData transferData) {
DND.error(DND.ERROR_INVALID_DATA);
}
String[] fileNames = (String[]) object;
- StringBuffer allFiles = new StringBuffer();
- for (int i = 0; i < fileNames.length; i++) {
- allFiles.append(fileNames[i]);
- allFiles.append('\0'); // each name is null terminated
+ long newPtr = 0;
+ if (transferData.type == CF_HDROPID) {
+ StringBuilder allFiles = new StringBuilder();
+ for (String fileName : fileNames) {
+ allFiles.append(fileName);
+ allFiles.append('\0'); // each name is null terminated
+ }
+ allFiles.append('\0'); // there is an extra null terminator at the very end
+ char [] buffer = new char [allFiles.length()];
+ allFiles.getChars(0, allFiles.length(), buffer, 0);
+ DROPFILES dropfiles = new DROPFILES();
+ dropfiles.pFiles = DROPFILES.sizeof;
+ dropfiles.pt_x = dropfiles.pt_y = 0;
+ dropfiles.fNC = 0;
+ dropfiles.fWide = 1;
+ // Allocate the memory because the caller (DropTarget) has not handed it in
+ // The caller of this method must release the data when it is done with it.
+ int byteCount = buffer.length * TCHAR.sizeof;
+ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, DROPFILES.sizeof + byteCount);
+ if (newPtr != 0) {
+ OS.MoveMemory(newPtr, dropfiles, DROPFILES.sizeof);
+ OS.MoveMemory(newPtr + DROPFILES.sizeof, buffer, byteCount);
+ }
+ } else if (transferData.type == CFSTR_SHELLIDLISTID) {
+ newPtr = generateCidaFromFilepaths(fileNames);
}
- allFiles.append('\0'); // there is an extra null terminator at the very end
- char [] buffer = new char [allFiles.length()];
- allFiles.getChars(0, allFiles.length(), buffer, 0);
- DROPFILES dropfiles = new DROPFILES();
- dropfiles.pFiles = DROPFILES.sizeof;
- dropfiles.pt_x = dropfiles.pt_y = 0;
- dropfiles.fNC = 0;
- dropfiles.fWide = 1;
- // Allocate the memory because the caller (DropTarget) has not handed it in
- // The caller of this method must release the data when it is done with it.
- int byteCount = buffer.length * TCHAR.sizeof;
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, DROPFILES.sizeof + byteCount);
- OS.MoveMemory(newPtr, dropfiles, DROPFILES.sizeof);
- OS.MoveMemory(newPtr + DROPFILES.sizeof, buffer, byteCount);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
transferData.stgmedium.unionField = newPtr;
transferData.stgmedium.pUnkForRelease = 0;
- transferData.result = COM.S_OK;
+ transferData.result = newPtr != 0 ? COM.S_OK : COM.E_FAIL;
}
/**
@@ -141,20 +150,89 @@ public Object nativeToJava(TransferData transferData) {
return fileNames;
}
+/**
+ * Generate {@link CIDA} structure and trailing data to transfer filenames
+ * as {@link #CFSTR_SHELLIDLIST}.
+ * <p>
+ * For more information on the {@link CIDA} structure see also {@link #resolveCidaToFilepaths(long)}.
+ * </p>
+ *
+ * @param fileNames filenames to pack in {@link CIDA}.
+ * @return pointer to global memory chunk filled with generated data or <code>0</code> on failure
+ */
+private long generateCidaFromFilepaths(String[] fileNames) {
+ final int n = fileNames.length;
+ long [] pidls = new long [n];
+ try {
+ CIDA cida = new CIDA();
+ cida.cidl = n;
+ int cidaSize = CIDA.sizeof + 4 * n;
+ cida.aoffset = cidaSize; // offsets are from cida begin so the first is equal to cida size
+
+ int[] pidlOffsets = new int[n];
+ int[] pidlSizes = new int[n];
+ int pidlSizeSum = 2; // initialize with 2 for the empty (but double null terminated) parent pidl
+ for (int i = 0; i < n; i++) {
+ TCHAR szfileName = new TCHAR(0, fileNames[i], true);
+ long [] ppv = new long [1];
+ int hr = COM.PathToPIDL(szfileName.chars, ppv);
+ if (hr != OS.S_OK) {
+ return 0;
+ }
+ pidls[i] = ppv[0];
+ pidlSizes[i] = OS.ILGetSize(pidls[i]);
+ pidlSizeSum += pidlSizes[i];
+
+ if (i == 0) {
+ pidlOffsets[0] = cidaSize + 2;
+ }
+ else {
+ pidlOffsets[i] = pidlOffsets[i - 1] + pidlSizes[i - 1];
+ }
+ }
+
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cidaSize + pidlSizeSum);
+ if (newPtr != 0) {
+ OS.MoveMemory(newPtr, cida, CIDA.sizeof);
+ OS.MoveMemory(newPtr + CIDA.sizeof, pidlOffsets, 4 * cida.cidl);
+ for (int i = 0; i < n; i++) {
+ OS.MoveMemory(newPtr + pidlOffsets[i], pidls[i], pidlSizes[i]);
+ }
+ }
+ return newPtr;
+ } finally {
+ for (int i = 0; i < n; i++) {
+ if (pidls[i] != 0) {
+ OS.CoTaskMemFree(pidls[i]);
+ }
+ }
+ }
+}
+
+@Override
+public boolean isSupportedType(TransferData transferData) {
+ // filter Shell ID List Array transfer only for dropping
+ if (transferData != null && transferData.pIDataObject != 0 && transferData.type == CFSTR_SHELLIDLISTID) {
+ return false;
+ }
+ return super.isSupportedType(transferData);
+}
+
@Override
protected int[] getTypeIds(){
- return new int[] {CF_HDROPID};
+ // Note: FileTransfer adds Shell ID List as transfer type but later
+ // limit this type for dragging only.
+ return new int[] {CF_HDROPID, CFSTR_SHELLIDLISTID};
}
@Override
protected String[] getTypeNames(){
- return new String[] {CF_HDROP};
+ return new String[] {CF_HDROP, CFSTR_SHELLIDLIST};
}
boolean checkFile(Object object) {
if (object == null || !(object instanceof String[]) || ((String[])object).length == 0) return false;
- String[] strings = (String[])object;
- for (int i = 0; i < strings.length; i++) {
- if (strings[i] == null || strings[i].length() == 0) return false;
+ for (String string : (String[])object) {
+ if (string == null || string.length() == 0) return false;
}
return true;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java
index 313c54e01a..c6baa3b2b8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/HTMLTransfer.java
@@ -85,7 +85,7 @@ public void javaToNative (Object object, TransferData transferData){
int endFragment = startFragment + cchMultiByte - 1;
int endHTML = endFragment + SUFFIX.length();
- StringBuffer buffer = new StringBuffer(HEADER);
+ StringBuilder buffer = new StringBuilder(HEADER);
int maxLength = NUMBER.length();
//startHTML
int start = buffer.toString().indexOf(NUMBER);
@@ -112,7 +112,7 @@ public void javaToNative (Object object, TransferData transferData){
chars = new char[count + 1];
buffer.getChars(0, count, chars, 0);
cchMultiByte = OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, -1, null, 0, null, null);
- long /*int*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
+ long lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -143,10 +143,10 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- long /*int*/ hMem = stgmedium.unionField;
+ long hMem = stgmedium.unionField;
try {
- long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
/* NOTE: CF_HTML uses UTF-8 encoding.
@@ -210,7 +210,7 @@ protected String[] getTypeNames(){
return new String[] {HTML_FORMAT};
}
boolean checkHTML(Object object) {
- return (object != null && object instanceof String && ((String)object).length() > 0);
+ return (object instanceof String && ((String)object).length() > 0);
}
@Override
protected boolean validate(Object object) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java
index 8fafa289d4..b80c851884 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ImageTransfer.java
@@ -27,8 +27,8 @@ import org.eclipse.swt.internal.win32.*;
* <p>An example of a java <code>ImageData</code> is shown below:</p>
*
* <pre><code>
- * Image image = new Image(display, "C:\temp\img1.gif");
- * ImageData imgData = image.getImageData();
+ * Image image = new Image(display, "C:\\temp\\img1.gif");
+ * ImageData imgData = image.getImageData();
* </code></pre>
*
* @see Transfer
@@ -93,17 +93,17 @@ public void javaToNative(Object object, TransferData transferData) {
RGB[] rgbs = imgData.palette.getRGBs();
if (rgbs != null && colorSize > 0) {
int offset = BITMAPINFOHEADER.sizeof;
- for (int j = 0; j < rgbs.length; j++) {
- bmi[offset] = (byte)rgbs[j].blue;
- bmi[offset + 1] = (byte)rgbs[j].green;
- bmi[offset + 2] = (byte)rgbs[j].red;
+ for (RGB rgb : rgbs) {
+ bmi[offset] = (byte)rgb.blue;
+ bmi[offset + 1] = (byte)rgb.green;
+ bmi[offset + 2] = (byte)rgb.red;
bmi[offset + 3] = 0;
offset += 4;
}
}
- long /*int*/ newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BITMAPINFOHEADER.sizeof + colorSize + imageSize);
+ long newPtr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BITMAPINFOHEADER.sizeof + colorSize + imageSize);
OS.MoveMemory(newPtr, bmi, bmi.length);
- long /*int*/ pBitDest = newPtr + BITMAPINFOHEADER.sizeof + colorSize;
+ long pBitDest = newPtr + BITMAPINFOHEADER.sizeof + colorSize;
if (imageHeight <= 0) {
OS.MoveMemory(pBitDest, imgData.data, imageSize);
@@ -152,18 +152,18 @@ public Object nativeToJava(TransferData transferData) {
transferData.result = getData(dataObject, formatetc, stgmedium);
if (transferData.result != COM.S_OK) return null;
- long /*int*/ hMem = stgmedium.unionField;
+ long hMem = stgmedium.unionField;
dataObject.Release();
try {
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long ptr = OS.GlobalLock(hMem);
if (ptr == 0) return null;
try {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
OS.MoveMemory(bmiHeader, ptr, BITMAPINFOHEADER.sizeof);
- long /*int*/[] pBits = new long /*int*/[1];
- long /*int*/ memDib = OS.CreateDIBSection(0, ptr, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long[] pBits = new long[1];
+ long memDib = OS.CreateDIBSection(0, ptr, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ bits = ptr + bmiHeader.biSize;
+ long bits = ptr + bmiHeader.biSize;
if (bmiHeader.biBitCount <= 8) {
bits += (bmiHeader.biClrUsed == 0 ? (1 << bmiHeader.biBitCount) : bmiHeader.biClrUsed) * 4;
} else if (bmiHeader.biCompression == OS.BI_BITFIELDS) {
@@ -176,8 +176,8 @@ public Object nativeToJava(TransferData transferData) {
OS.GetObject(memDib, DIBSECTION.sizeof, dib);
int biHeight = dib.biHeight;
int scanline = dib.biSizeImage / biHeight;
- long /*int*/ pDestBits = pBits[0];
- long /*int*/ pSourceBits = bits + scanline * (biHeight - 1);
+ long pDestBits = pBits[0];
+ long pSourceBits = bits + scanline * (biHeight - 1);
for (int i = 0; i < biHeight; i++) {
OS.MoveMemory(pDestBits, pSourceBits, scanline);
pDestBits += scanline;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java
index a8366cd0d9..cb7278f958 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java
@@ -19,7 +19,6 @@ import org.eclipse.swt.internal.win32.*;
final class OleEnumFORMATETC {
- private COMObject iUnknown;
private COMObject iEnumFORMATETC;
private int refCount;
@@ -37,42 +36,28 @@ int AddRef() {
return refCount;
}
private void createCOMInterfaces() {
- // register each of the interfaces that this object implements
- iUnknown = new COMObject(new int[] {2, 0, 0}){
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- };
iEnumFORMATETC = new COMObject(new int[] {2, 0, 0, 3, 1, 0, 1}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return Next((int)/*64*/args[0], args[1], args[2]);}
+ public long method3(long[] args) {return Next((int)args[0], args[1], args[2]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return Skip((int)/*64*/args[0]);}
+ public long method4(long[] args) {return Skip((int)args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return Reset();}
+ public long method5(long[] args) {return Reset();}
// method6 Clone - not implemented
};
}
private void disposeCOMInterfaces() {
-
- if (iUnknown != null)
- iUnknown.dispose();
- iUnknown = null;
-
if (iEnumFORMATETC != null)
iEnumFORMATETC.dispose();
iEnumFORMATETC = null;
}
-long /*int*/ getAddress() {
+long getAddress() {
return iEnumFORMATETC.getAddress();
}
private FORMATETC[] getNextItems(int numItems){
@@ -91,7 +76,7 @@ private FORMATETC[] getNextItems(int numItems){
return items;
}
-private int Next(int celt, long /*int*/ rgelt, long /*int*/ pceltFetched) {
+private int Next(int celt, long rgelt, long pceltFetched) {
/* Retrieves the next celt items in the enumeration sequence.
If there are fewer than the requested number of elements left in the sequence,
it retrieves the remaining elements.
@@ -121,24 +106,19 @@ private int Next(int celt, long /*int*/ rgelt, long /*int*/ pceltFetched) {
}
return COM.S_FALSE;
}
-private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+private int QueryInterface(long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0) return COM.E_NOINTERFACE;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
- if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, C.PTR_SIZEOF);
- AddRef();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID(guid, COM.IIDIEnumFORMATETC)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iEnumFORMATETC.getAddress()}, C.PTR_SIZEOF);
+ if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIEnumFORMATETC)) {
+ OS.MoveMemory(ppvObject, new long[] {iEnumFORMATETC.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
int Release() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
index 48929ebca6..0cff2626dd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
@@ -74,7 +74,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- long /*int*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
+ long lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -105,9 +105,9 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- long /*int*/ hMem = stgmedium.unionField;
+ long hMem = stgmedium.unionField;
try {
- long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();
@@ -135,7 +135,7 @@ protected String[] getTypeNames(){
}
boolean checkRTF(Object object) {
- return (object != null && object instanceof String && ((String)object).length() > 0);
+ return (object instanceof String && ((String)object).length() > 0);
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
index ba16e8c618..8eac76a342 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -94,7 +94,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
event.offsetX = shdi.ptOffset.x;
}
event.offsetY = shdi.ptOffset.y;
- long /*int*/ hImage = shdi.hbmpDragImage;
+ long hImage = shdi.hbmpDragImage;
if (hImage != 0) {
BITMAP bm = new BITMAP ();
OS.GetObject (hImage, BITMAP.sizeof, bm);
@@ -102,10 +102,10 @@ public class TableDragSourceEffect extends DragSourceEffect {
int srcHeight = bm.bmHeight;
/* Create resources */
- long /*int*/ hdc = OS.GetDC (0);
- long /*int*/ srcHdc = OS.CreateCompatibleDC (hdc);
- long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
- long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long hdc = OS.GetDC (0);
+ long srcHdc = OS.CreateCompatibleDC (hdc);
+ long oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
+ long memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = srcWidth;
@@ -115,10 +115,10 @@ public class TableDragSourceEffect extends DragSourceEffect {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
index adbb966ee2..42cb9d6b8f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
@@ -110,7 +110,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
@Override
public void dragLeave(DropTargetEvent event) {
Table table = (Table) control;
- long /*int*/ handle = table.handle;
+ long handle = table.handle;
if (dropHighlight != null) {
LVITEM lvItem = new LVITEM ();
lvItem.stateMask = OS.LVIS_DROPHILITED;
@@ -149,7 +149,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
public void dragOver(DropTargetEvent event) {
Table table = (Table) getControl();
int effect = checkEffect(event.feedback);
- long /*int*/ handle = table.handle;
+ long handle = table.handle;
Point coordinates = new Point(event.x, event.y);
coordinates = DPIUtil.autoScaleUp(table.toControl(coordinates)); // To Pixels
LVHITTESTINFO pinfo = new LVHITTESTINFO();
@@ -162,8 +162,8 @@ public class TableDropTargetEffect extends DropTargetEffect {
} else {
if (pinfo.iItem != -1 && scrollIndex == pinfo.iItem && scrollBeginTime != 0) {
if (System.currentTimeMillis() >= scrollBeginTime) {
- int top = Math.max (0, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int top = Math.max (0, (int)OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
int index = (scrollIndex - 1 < top) ? Math.max(0, scrollIndex - 1) : Math.min(count - 1, scrollIndex + 1);
boolean scroll = true;
if (pinfo.iItem == top) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java
index af2fdef685..25ee927b3a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java
@@ -78,7 +78,7 @@ public void javaToNative (Object object, TransferData transferData){
char[] chars = new char[charCount+1];
string.getChars (0, charCount, chars, 0);
int byteCount = chars.length * 2;
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
OS.MoveMemory(newPtr, chars, byteCount);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -98,7 +98,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- long /*int*/ lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
+ long lpMultiByteStr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -132,7 +132,7 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- long /*int*/ hMem = stgmedium.unionField;
+ long hMem = stgmedium.unionField;
try {
switch (transferData.type) {
case CF_UNICODETEXTID: {
@@ -140,7 +140,7 @@ public Object nativeToJava(TransferData transferData){
int size = OS.GlobalSize(hMem) / 2 * 2;
if (size == 0) return null;
char[] chars = new char[size/2];
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long ptr = OS.GlobalLock(hMem);
if (ptr == 0) return null;
try {
OS.MoveMemory(chars, ptr, size);
@@ -157,7 +157,7 @@ public Object nativeToJava(TransferData transferData){
}
}
case CF_TEXTID: {
- long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();
@@ -188,7 +188,7 @@ protected String[] getTypeNames(){
}
boolean checkText(Object object) {
- return (object != null && object instanceof String && ((String)object).length() > 0);
+ return (object instanceof String && ((String)object).length() > 0);
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
index 82a96b7b1e..80240e23d9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
@@ -87,7 +87,7 @@ public class TransferData {
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
- * <p>The value of result is 1 if the conversion was successful.
+ * <p>The value of result is 1 if the conversion was successful.
* The value of result is 0 if the conversion failed.</p>
*
* @noreference This field is not intended to be referenced by clients.
@@ -107,15 +107,15 @@ public class TransferData {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ pIDataObject;
+ public long pIDataObject;
static boolean sameType(TransferData data1, TransferData data2) {
if (data1 == data2) return true;
if (data1 == null || data2 == null) return false;
return (data1.type == data2.type &&
data1.formatetc.cfFormat == data2.formatetc.cfFormat &&
- data1.formatetc.dwAspect == data2.formatetc.dwAspect &&
- data1.formatetc.tymed == data2.formatetc.tymed);
+ data1.formatetc.dwAspect == data2.formatetc.dwAspect &&
+ data1.formatetc.tymed == data2.formatetc.tymed);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index 411b45559b..363bf9c581 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -93,7 +93,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
event.offsetX = shdi.ptOffset.x;
}
event.offsetY = shdi.ptOffset.y;
- long /*int*/ hImage = shdi.hbmpDragImage;
+ long hImage = shdi.hbmpDragImage;
if (hImage != 0) {
BITMAP bm = new BITMAP ();
OS.GetObject (hImage, BITMAP.sizeof, bm);
@@ -101,10 +101,10 @@ public class TreeDragSourceEffect extends DragSourceEffect {
int srcHeight = bm.bmHeight;
/* Create resources */
- long /*int*/ hdc = OS.GetDC (0);
- long /*int*/ srcHdc = OS.CreateCompatibleDC (hdc);
- long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
- long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long hdc = OS.GetDC (0);
+ long srcHdc = OS.CreateCompatibleDC (hdc);
+ long oldSrcBitmap = OS.SelectObject (srcHdc, hImage);
+ long memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = srcWidth;
@@ -114,10 +114,10 @@ public class TreeDragSourceEffect extends DragSourceEffect {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
index 2b7883de89..87385adfdd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDropTargetEffect.java
@@ -55,10 +55,10 @@ public class TreeDropTargetEffect extends DropTargetEffect {
static final int SCROLL_HYSTERESIS = 200; // milli seconds
static final int EXPAND_HYSTERESIS = 1000; // milli seconds
- long /*int*/ dropIndex;
- long /*int*/ scrollIndex;
+ long dropIndex;
+ long scrollIndex;
long scrollBeginTime;
- long /*int*/ expandIndex;
+ long expandIndex;
long expandBeginTime;
TreeItem insertItem;
boolean insertBefore;
@@ -121,7 +121,7 @@ public class TreeDropTargetEffect extends DropTargetEffect {
@Override
public void dragLeave(DropTargetEvent event) {
Tree tree = (Tree) control;
- long /*int*/ handle = tree.handle;
+ long handle = tree.handle;
if (dropIndex != -1) {
TVITEM tvItem = new TVITEM ();
tvItem.hItem = dropIndex;
@@ -163,22 +163,22 @@ public class TreeDropTargetEffect extends DropTargetEffect {
public void dragOver(DropTargetEvent event) {
Tree tree = (Tree) getControl();
int effect = checkEffect(event.feedback);
- long /*int*/ handle = tree.handle;
+ long handle = tree.handle;
Point coordinates = new Point(event.x, event.y);
coordinates = DPIUtil.autoScaleUp(tree.toControl(coordinates)); // To Pixels
TVHITTESTINFO lpht = new TVHITTESTINFO ();
lpht.x = coordinates.x;
lpht.y = coordinates.y;
OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht);
- long /*int*/ hItem = lpht.hItem;
+ long hItem = lpht.hItem;
if ((effect & DND.FEEDBACK_SCROLL) == 0) {
scrollBeginTime = 0;
scrollIndex = -1;
} else {
if (hItem != -1 && scrollIndex == hItem && scrollBeginTime != 0) {
if (System.currentTimeMillis() >= scrollBeginTime) {
- long /*int*/ topItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
- long /*int*/ nextItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, hItem == topItem ? OS.TVGN_PREVIOUSVISIBLE : OS.TVGN_NEXTVISIBLE, hItem);
+ long topItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long nextItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, hItem == topItem ? OS.TVGN_PREVIOUSVISIBLE : OS.TVGN_NEXTVISIBLE, hItem);
boolean scroll = true;
if (hItem == topItem) {
scroll = nextItem != 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java
index fd1e22e170..1581e80a18 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java
@@ -73,7 +73,7 @@ public void javaToNative (Object object, TransferData transferData){
char[] chars = new char[charCount+1];
url.getChars (0, charCount, chars, 0);
int byteCount = chars.length * 2;
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
OS.MoveMemory(newPtr, chars, byteCount);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -91,7 +91,7 @@ public void javaToNative (Object object, TransferData transferData){
transferData.result = COM.DV_E_STGMEDIUM;
return;
}
- long /*int*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
+ long lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
transferData.stgmedium = new STGMEDIUM();
transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
@@ -122,14 +122,14 @@ public Object nativeToJava(TransferData transferData){
transferData.result = getData(data, formatetc, stgmedium);
data.Release();
if (transferData.result != COM.S_OK) return null;
- long /*int*/ hMem = stgmedium.unionField;
+ long hMem = stgmedium.unionField;
try {
if (transferData.type == CFSTR_INETURLIDW) {
/* Ensure byteCount is a multiple of 2 bytes */
int size = OS.GlobalSize(hMem) / 2 * 2;
if (size == 0) return null;
char[] chars = new char[size/2];
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long ptr = OS.GlobalLock(hMem);
if (ptr == 0) return null;
try {
OS.MoveMemory(chars, ptr, size);
@@ -145,7 +145,7 @@ public Object nativeToJava(TransferData transferData){
OS.GlobalUnlock(hMem);
}
} else if (transferData.type == CFSTR_INETURLID) {
- long /*int*/ lpMultiByteStr = OS.GlobalLock(hMem);
+ long lpMultiByteStr = OS.GlobalLock(hMem);
if (lpMultiByteStr == 0) return null;
try {
int codePage = OS.GetACP();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java
index 722485031c..58da0c6448 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/internal/ole/win32/COMObject.java
@@ -15,13 +15,12 @@ package org.eclipse.swt.internal.ole.win32;
import java.util.*;
-import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.win32.*;
public class COMObject {
- public long /*int*/ ppVtable;
+ public long ppVtable;
static private final int MAX_ARG_COUNT = 12;
static private final int MAX_VTABLE_LENGTH = 80;
@@ -29,21 +28,20 @@ public class COMObject {
static private Map<LONG, COMObject> ObjectMap = new HashMap<>();
public COMObject(int[] argCounts) {
- long /*int*/[] callbackAddresses = new long /*int*/[argCounts.length];
+ long[] callbackAddresses = new long[argCounts.length];
synchronized (Callbacks) {
for (int i = 0, length = argCounts.length; i < length; i++){
if ((Callbacks[i][argCounts[i]]) == null) {
Callbacks[i][argCounts[i]] = new Callback(this.getClass(), "callback"+i, argCounts[i] + 1, true, COM.E_FAIL); //$NON-NLS-1$
- if (Callbacks[i][argCounts[i]].getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
callbackAddresses[i] = Callbacks[i][argCounts[i]].getAddress();
}
}
- long /*int*/ pVtable = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, C.PTR_SIZEOF * argCounts.length);
+ long pVtable = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, C.PTR_SIZEOF * argCounts.length);
OS.MoveMemory(pVtable, callbackAddresses, C.PTR_SIZEOF * argCounts.length);
ppVtable = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, C.PTR_SIZEOF);
- OS.MoveMemory(ppVtable, new long /*int*/[] {pVtable}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppVtable, new long[] {pVtable}, C.PTR_SIZEOF);
ObjectMap.put(new LONG(ppVtable), this);
}
@@ -58,729 +56,729 @@ public static GUID IIDFromString(String lpsz) {
return null;
}
-static long /*int*/ callback0(long /*int*/[] callbackArgs) {
+static long callback0(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method0(args);
}
-static long /*int*/ callback1(long /*int*/[] callbackArgs) {
+static long callback1(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method1(args);
}
-static long /*int*/ callback2(long /*int*/[] callbackArgs) {
+static long callback2(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method2(args);
}
-static long /*int*/ callback3(long /*int*/[] callbackArgs) {
+static long callback3(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method3(args);
}
-static long /*int*/ callback4(long /*int*/[] callbackArgs) {
+static long callback4(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method4(args);
}
-static long /*int*/ callback5(long /*int*/[] callbackArgs) {
+static long callback5(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method5(args);
}
-static long /*int*/ callback6(long /*int*/[] callbackArgs) {
+static long callback6(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method6(args);
}
-static long /*int*/ callback7(long /*int*/[] callbackArgs) {
+static long callback7(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method7(args);
}
-static long /*int*/ callback8(long /*int*/[] callbackArgs) {
+static long callback8(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method8(args);
}
-static long /*int*/ callback9(long /*int*/[] callbackArgs) {
+static long callback9(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method9(args);
}
-static long /*int*/ callback10(long /*int*/[] callbackArgs) {
+static long callback10(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method10(args);
}
-static long /*int*/ callback11(long /*int*/[] callbackArgs) {
+static long callback11(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method11(args);
}
-static long /*int*/ callback12(long /*int*/[] callbackArgs) {
+static long callback12(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method12(args);
}
-static long /*int*/ callback13(long /*int*/[] callbackArgs) {
+static long callback13(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method13(args);
}
-static long /*int*/ callback14(long /*int*/[] callbackArgs) {
+static long callback14(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method14(args);
}
-static long /*int*/ callback15(long /*int*/[] callbackArgs) {
+static long callback15(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method15(args);
}
-static long /*int*/ callback16(long /*int*/[] callbackArgs) {
+static long callback16(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method16(args);
}
-static long /*int*/ callback17(long /*int*/[] callbackArgs) {
+static long callback17(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method17(args);
}
-static long /*int*/ callback18(long /*int*/[] callbackArgs) {
+static long callback18(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method18(args);
}
-static long /*int*/ callback19(long /*int*/[] callbackArgs) {
+static long callback19(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method19(args);
}
-static long /*int*/ callback20(long /*int*/[] callbackArgs) {
+static long callback20(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method20(args);
}
-static long /*int*/ callback21(long /*int*/[] callbackArgs) {
+static long callback21(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method21(args);
}
-static long /*int*/ callback22(long /*int*/[] callbackArgs) {
+static long callback22(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method22(args);
}
-static long /*int*/ callback23(long /*int*/[] callbackArgs) {
+static long callback23(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method23(args);
}
-static long /*int*/ callback24(long /*int*/[] callbackArgs) {
+static long callback24(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method24(args);
}
-static long /*int*/ callback25(long /*int*/[] callbackArgs) {
+static long callback25(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method25(args);
}
-static long /*int*/ callback26(long /*int*/[] callbackArgs) {
+static long callback26(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method26(args);
}
-static long /*int*/ callback27(long /*int*/[] callbackArgs) {
+static long callback27(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method27(args);
}
-static long /*int*/ callback28(long /*int*/[] callbackArgs) {
+static long callback28(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method28(args);
}
-static long /*int*/ callback29(long /*int*/[] callbackArgs) {
+static long callback29(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method29(args);
}
-static long /*int*/ callback30(long /*int*/[] callbackArgs) {
+static long callback30(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method30(args);
}
-static long /*int*/ callback31(long /*int*/[] callbackArgs) {
+static long callback31(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method31(args);
}
-static long /*int*/ callback32(long /*int*/[] callbackArgs) {
+static long callback32(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method32(args);
}
-static long /*int*/ callback33(long /*int*/[] callbackArgs) {
+static long callback33(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method33(args);
}
-static long /*int*/ callback34(long /*int*/[] callbackArgs) {
+static long callback34(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method34(args);
}
-static long /*int*/ callback35(long /*int*/[] callbackArgs) {
+static long callback35(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method35(args);
}
-static long /*int*/ callback36(long /*int*/[] callbackArgs) {
+static long callback36(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method36(args);
}
-static long /*int*/ callback37(long /*int*/[] callbackArgs) {
+static long callback37(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method37(args);
}
-static long /*int*/ callback38(long /*int*/[] callbackArgs) {
+static long callback38(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method38(args);
}
-static long /*int*/ callback39(long /*int*/[] callbackArgs) {
+static long callback39(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method39(args);
}
-static long /*int*/ callback40(long /*int*/[] callbackArgs) {
+static long callback40(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method40(args);
}
-static long /*int*/ callback41(long /*int*/[] callbackArgs) {
+static long callback41(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method41(args);
}
-static long /*int*/ callback42(long /*int*/[] callbackArgs) {
+static long callback42(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method42(args);
}
-static long /*int*/ callback43(long /*int*/[] callbackArgs) {
+static long callback43(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method43(args);
}
-static long /*int*/ callback44(long /*int*/[] callbackArgs) {
+static long callback44(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method44(args);
}
-static long /*int*/ callback45(long /*int*/[] callbackArgs) {
+static long callback45(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method45(args);
}
-static long /*int*/ callback46(long /*int*/[] callbackArgs) {
+static long callback46(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method46(args);
}
-static long /*int*/ callback47(long /*int*/[] callbackArgs) {
+static long callback47(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method47(args);
}
-static long /*int*/ callback48(long /*int*/[] callbackArgs) {
+static long callback48(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method48(args);
}
-static long /*int*/ callback49(long /*int*/[] callbackArgs) {
+static long callback49(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method49(args);
}
-static long /*int*/ callback50(long /*int*/[] callbackArgs) {
+static long callback50(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method50(args);
}
-static long /*int*/ callback51(long /*int*/[] callbackArgs) {
+static long callback51(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method51(args);
}
-static long /*int*/ callback52(long /*int*/[] callbackArgs) {
+static long callback52(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method52(args);
}
-static long /*int*/ callback53(long /*int*/[] callbackArgs) {
+static long callback53(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method53(args);
}
-static long /*int*/ callback54(long /*int*/[] callbackArgs) {
+static long callback54(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method54(args);
}
-static long /*int*/ callback55(long /*int*/[] callbackArgs) {
+static long callback55(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method55(args);
}
-static long /*int*/ callback56(long /*int*/[] callbackArgs) {
+static long callback56(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method56(args);
}
-static long /*int*/ callback57(long /*int*/[] callbackArgs) {
+static long callback57(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method57(args);
}
-static long /*int*/ callback58(long /*int*/[] callbackArgs) {
+static long callback58(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method58(args);
}
-static long /*int*/ callback59(long /*int*/[] callbackArgs) {
+static long callback59(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method59(args);
}
-static long /*int*/ callback60(long /*int*/[] callbackArgs) {
+static long callback60(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method60(args);
}
-static long /*int*/ callback61(long /*int*/[] callbackArgs) {
+static long callback61(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method61(args);
}
-static long /*int*/ callback62(long /*int*/[] callbackArgs) {
+static long callback62(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method62(args);
}
-static long /*int*/ callback63(long /*int*/[] callbackArgs) {
+static long callback63(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method63(args);
}
-static long /*int*/ callback64(long /*int*/[] callbackArgs) {
+static long callback64(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method64(args);
}
-static long /*int*/ callback65(long /*int*/[] callbackArgs) {
+static long callback65(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method65(args);
}
-static long /*int*/ callback66(long /*int*/[] callbackArgs) {
+static long callback66(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method66(args);
}
-static long /*int*/ callback67(long /*int*/[] callbackArgs) {
+static long callback67(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method67(args);
}
-static long /*int*/ callback68(long /*int*/[] callbackArgs) {
+static long callback68(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method68(args);
}
-static long /*int*/ callback69(long /*int*/[] callbackArgs) {
+static long callback69(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method69(args);
}
-static long /*int*/ callback70(long /*int*/[] callbackArgs) {
+static long callback70(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method70(args);
}
-static long /*int*/ callback71(long /*int*/[] callbackArgs) {
+static long callback71(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method71(args);
}
-static long /*int*/ callback72(long /*int*/[] callbackArgs) {
+static long callback72(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method72(args);
}
-static long /*int*/ callback73(long /*int*/[] callbackArgs) {
+static long callback73(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method73(args);
}
-static long /*int*/ callback74(long /*int*/[] callbackArgs) {
+static long callback74(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method74(args);
}
-static long /*int*/ callback75(long /*int*/[] callbackArgs) {
+static long callback75(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method75(args);
}
-static long /*int*/ callback76(long /*int*/[] callbackArgs) {
+static long callback76(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method76(args);
}
-static long /*int*/ callback77(long /*int*/[] callbackArgs) {
+static long callback77(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method77(args);
}
-static long /*int*/ callback78(long /*int*/[] callbackArgs) {
+static long callback78(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method78(args);
}
-static long /*int*/ callback79(long /*int*/[] callbackArgs) {
+static long callback79(long[] callbackArgs) {
// find the object on which this call was invoked
- long /*int*/ address = callbackArgs[0];
+ long address = callbackArgs[0];
COMObject object = ObjectMap.get(new LONG(address));
if (object == null) return COM.E_FAIL;
- long /*int*/[] args = new long /*int*/[callbackArgs.length - 1];
+ long[] args = new long[callbackArgs.length - 1];
System.arraycopy(callbackArgs, 1, args, 0, args.length);
return object.method79(args);
}
public void dispose() {
// free the memory for this reference
- long /*int*/[] pVtable = new long /*int*/[1];
+ long[] pVtable = new long[1];
OS.MoveMemory(pVtable, ppVtable, C.PTR_SIZEOF);
OS.GlobalFree(pVtable[0]);
OS.GlobalFree(ppVtable);
@@ -790,247 +788,247 @@ public void dispose() {
ppVtable = 0;
}
-public long /*int*/ getAddress () {
+public long getAddress () {
return ppVtable;
}
-public long /*int*/ method0(long /*int*/[] args) {
+public long method0(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method1(long /*int*/[] args) {
+public long method1(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method2(long /*int*/[] args) {
+public long method2(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method3(long /*int*/[] args) {
+public long method3(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method4(long /*int*/[] args) {
+public long method4(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method5(long /*int*/[] args) {
+public long method5(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method6(long /*int*/[] args) {
+public long method6(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method7(long /*int*/[] args) {
+public long method7(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method8(long /*int*/[] args) {
+public long method8(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method9(long /*int*/[] args) {
+public long method9(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method10(long /*int*/[] args) {
+public long method10(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method11(long /*int*/[] args) {
+public long method11(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method12(long /*int*/[] args) {
+public long method12(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method13(long /*int*/[] args) {
+public long method13(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method14(long /*int*/[] args) {
+public long method14(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method15(long /*int*/[] args) {
+public long method15(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method16(long /*int*/[] args) {
+public long method16(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method17(long /*int*/[] args) {
+public long method17(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method18(long /*int*/[] args) {
+public long method18(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method19(long /*int*/[] args) {
+public long method19(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method20(long /*int*/[] args) {
+public long method20(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method21(long /*int*/[] args) {
+public long method21(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method22(long /*int*/[] args) {
+public long method22(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method23(long /*int*/[] args) {
+public long method23(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method24(long /*int*/[] args) {
+public long method24(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method25(long /*int*/[] args) {
+public long method25(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method26(long /*int*/[] args) {
+public long method26(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method27(long /*int*/[] args) {
+public long method27(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method28(long /*int*/[] args) {
+public long method28(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method29(long /*int*/[] args) {
+public long method29(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method30(long /*int*/[] args) {
+public long method30(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method31(long /*int*/[] args) {
+public long method31(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method32(long /*int*/[] args) {
+public long method32(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method33(long /*int*/[] args) {
+public long method33(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method34(long /*int*/[] args) {
+public long method34(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method35(long /*int*/[] args) {
+public long method35(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method36(long /*int*/[] args) {
+public long method36(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method37(long /*int*/[] args) {
+public long method37(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method38(long /*int*/[] args) {
+public long method38(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method39(long /*int*/[] args) {
+public long method39(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method40(long /*int*/[] args) {
+public long method40(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method41(long /*int*/[] args) {
+public long method41(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method42(long /*int*/[] args) {
+public long method42(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method43(long /*int*/[] args) {
+public long method43(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method44(long /*int*/[] args) {
+public long method44(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method45(long /*int*/[] args) {
+public long method45(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method46(long /*int*/[] args) {
+public long method46(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method47(long /*int*/[] args) {
+public long method47(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method48(long /*int*/[] args) {
+public long method48(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method49(long /*int*/[] args) {
+public long method49(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method50(long /*int*/[] args) {
+public long method50(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method51(long /*int*/[] args) {
+public long method51(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method52(long /*int*/[] args) {
+public long method52(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method53(long /*int*/[] args) {
+public long method53(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method54(long /*int*/[] args) {
+public long method54(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method55(long /*int*/[] args) {
+public long method55(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method56(long /*int*/[] args) {
+public long method56(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method57(long /*int*/[] args) {
+public long method57(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method58(long /*int*/[] args) {
+public long method58(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method59(long /*int*/[] args) {
+public long method59(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method60(long /*int*/[] args) {
+public long method60(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method61(long /*int*/[] args) {
+public long method61(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method62(long /*int*/[] args) {
+public long method62(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method63(long /*int*/[] args) {
+public long method63(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method64(long /*int*/[] args) {
+public long method64(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method65(long /*int*/[] args) {
+public long method65(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method66(long /*int*/[] args) {
+public long method66(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method67(long /*int*/[] args) {
+public long method67(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method68(long /*int*/[] args) {
+public long method68(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method69(long /*int*/[] args) {
+public long method69(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method70(long /*int*/[] args) {
+public long method70(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method71(long /*int*/[] args) {
+public long method71(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method72(long /*int*/[] args) {
+public long method72(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method73(long /*int*/[] args) {
+public long method73(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method74(long /*int*/[] args) {
+public long method74(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method75(long /*int*/[] args) {
+public long method75(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method76(long /*int*/[] args) {
+public long method76(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method77(long /*int*/[] args) {
+public long method77(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method78(long /*int*/[] args) {
+public long method78(long[] args) {
return COM.E_NOTIMPL;
}
-public long /*int*/ method79(long /*int*/[] args) {
+public long method79(long[] args) {
return COM.E_NOTIMPL;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java
index cc7b0137ef..6e6b314a9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java
@@ -13,11 +13,11 @@
*******************************************************************************/
package org.eclipse.swt.ole.win32;
+import java.io.*;
+
import org.eclipse.swt.*;
-import java.io.File;
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.internal.win32.TCHAR;
+import org.eclipse.swt.internal.ole.win32.*;
+import org.eclipse.swt.internal.win32.*;
/**
@@ -246,7 +246,7 @@ public class OLE extends SWT {
public static final short FUNCFLAG_FREQUESTEDIT = 0x8;
public static final short FUNCFLAG_FDISPLAYBIND = 0x10;
public static final short FUNCFLAG_FDEFAULTBIND = 0x20;
- public static final short FUNCFLAG_FHIDDEN = 0x40;
+ public static final short FUNCFLAG_FHIDDEN = 0x40;
public static final short FUNCFLAG_FUSESGETLASTERROR = 0x80;
public static final short FUNCFLAG_FDEFAULTCOLLELEM = 0x100;
public static final short FUNCFLAG_FUIDEFAULT = 0x200;
@@ -375,7 +375,6 @@ public static String findProgramID (String extension) {
if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$
- /* Use the character encoding for the default locale */
TCHAR extensionKey = new TCHAR(0, extension, true);
String result = getKeyValue(extensionKey);
if (result != null) {
@@ -393,7 +392,7 @@ public static String findProgramID (String extension) {
return ""; //$NON-NLS-1$
}
static String getKeyValue (TCHAR key) {
- long /*int*/ [] phkResult = new long /*int*/ [1];
+ long [] phkResult = new long [1];
if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult) != 0) {
return null;
}
@@ -404,7 +403,6 @@ static String getKeyValue (TCHAR key) {
if (length == 0) {
result = "";
} else {
- /* Use the character encoding for the default locale */
TCHAR lpData = new TCHAR (0, length);
if (OS.RegQueryValueEx (phkResult [0], null, 0, null, lpData, lpcbData) == 0) {
length = Math.max(0, lpData.length () - 1);
@@ -416,7 +414,7 @@ static String getKeyValue (TCHAR key) {
return result;
}
private static boolean getKeyExists (TCHAR key) {
- long /*int*/ [] phkResult = new long /*int*/ [1];
+ long [] phkResult = new long [1];
if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult) != 0) {
return false;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java
index 7ca5ad5239..580fb693b4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java
@@ -98,7 +98,7 @@ OleAutomation(IDispatch idispatch) {
objIDispatch = idispatch;
objIDispatch.AddRef();
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
/* GetTypeInfo([in] iTInfo, [in] lcid, [out] ppTInfo)
* AddRef has already been called on ppTInfo by the callee and must be released by the caller.
*/
@@ -121,7 +121,7 @@ public OleAutomation(OleClientSite clientSite) {
if (clientSite == null) OLE.error(OLE.ERROR_INVALID_INTERFACE_ADDRESS);
objIDispatch = clientSite.getAutomationObject();
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
/* GetTypeInfo([in] iTInfo, [in] lcid, [out] ppTInfo)
* AddRef has already been called on ppTInfo by the callee and must be released by the caller.
*/
@@ -155,7 +155,7 @@ public OleAutomation(String progId) {
OLE.error(OLE.ERROR_INVALID_CLASSID);
}
int flags = COM.CLSCTX_INPROC_SERVER | COM.CLSCTX_LOCAL_SERVER;
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
int result = COM.CoCreateInstance(appClsid, 0, flags, COM.IIDIUnknown, ppvObject);
if (result != COM.S_OK) {
OS.OleUninitialize();
@@ -202,7 +202,7 @@ public void dispose() {
}
objIUnknown = null;
}
-long /*int*/ getAddress() {
+long getAddress() {
return objIDispatch.getAddress();
}
GUID getClassID(String clientName) {
@@ -257,7 +257,7 @@ public String getDocumentation(int dispId) {
*/
public OlePropertyDescription getPropertyDescription(int index) {
if (objITypeInfo == null) return null;
- long /*int*/[] ppVarDesc = new long /*int*/[1];
+ long[] ppVarDesc = new long[1];
int rc = objITypeInfo.GetVarDesc(index, ppVarDesc);
if (rc != OLE.S_OK) return null;
VARDESC vardesc = new VARDESC();
@@ -288,7 +288,7 @@ public OlePropertyDescription getPropertyDescription(int index) {
*/
public OleFunctionDescription getFunctionDescription(int index) {
if (objITypeInfo == null) return null;
- long /*int*/[] ppFuncDesc = new long /*int*/[1];
+ long[] ppFuncDesc = new long[1];
int rc = objITypeInfo.GetFuncDesc(index, ppFuncDesc);
if (rc != OLE.S_OK) return null;
FUNCDESC funcdesc = new FUNCDESC();
@@ -319,7 +319,7 @@ public OleFunctionDescription getFunctionDescription(int index) {
short[] vt = new short[1];
OS.MoveMemory(vt, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof() + C.PTR_SIZEOF, 2);
if (vt[0] == OLE.VT_PTR) {
- long /*int*/ [] pTypedesc = new long /*int*/ [1];
+ long [] pTypedesc = new long [1];
OS.MoveMemory(pTypedesc, funcdesc.lprgelemdescParam + i * COM.ELEMDESC_sizeof(), C.PTR_SIZEOF);
short[] vt2 = new short[1];
OS.MoveMemory(vt2, pTypedesc[0] + C.PTR_SIZEOF, 2);
@@ -350,7 +350,7 @@ public OleFunctionDescription getFunctionDescription(int index) {
*/
public TYPEATTR getTypeInfoAttributes() {
if (objITypeInfo == null) return null;
- long /*int*/ [] ppTypeAttr = new long /*int*/ [1];
+ long [] ppTypeAttr = new long [1];
int rc = objITypeInfo.GetTypeAttr(ppTypeAttr);
if (rc != OLE.S_OK) return null;
TYPEATTR typeattr = new TYPEATTR();
@@ -480,8 +480,8 @@ public boolean equals(Object object) {
if (objIDispatch == null) return false;
OleAutomation oleAutomation = ((OleAutomation) object);
if (oleAutomation.objIDispatch == null) return false;
- long /*int*/ address1 = objIDispatch.getAddress();
- long /*int*/ address2 = oleAutomation.objIDispatch.getAddress();
+ long address1 = objIDispatch.getAddress();
+ long address2 = oleAutomation.objIDispatch.getAddress();
return address1 == address2;
}
return false;
@@ -570,7 +570,7 @@ private int invoke(int dispIdMember, int wFlags, Variant[] rgvarg, int[] rgdispi
// invoke the method
EXCEPINFO excepInfo = new EXCEPINFO();
int[] pArgErr = new int[1];
- long /*int*/ pVarResultAddress = 0;
+ long pVarResultAddress = 0;
if (pVarResult != null) pVarResultAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
int result = objIDispatch.Invoke(dispIdMember, new GUID(), COM.LOCALE_USER_DEFAULT, wFlags, pDispParams, pVarResultAddress, excepInfo, pArgErr);
@@ -733,8 +733,8 @@ public boolean setProperty(int dispIdMember, Variant rgvarg) {
public boolean setProperty(int dispIdMember, Variant[] rgvarg) {
int[] rgdispidNamedArgs = new int[] {COM.DISPID_PROPERTYPUT};
int dwFlags = COM.DISPATCH_PROPERTYPUT;
- for (int i = 0; i < rgvarg.length; i++) {
- if ((rgvarg[i].getType() & COM.VT_BYREF) == COM.VT_BYREF)
+ for (Variant element : rgvarg) {
+ if ((element.getType() & COM.VT_BYREF) == COM.VT_BYREF)
dwFlags = COM.DISPATCH_PROPERTYPUTREF;
}
Variant pVarResult = new Variant();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java
index 7bb333cc59..0cc24ac86f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java
@@ -50,7 +50,6 @@ import org.eclipse.swt.widgets.*;
public class OleClientSite extends Composite {
// Interfaces for this Ole Client Container
- private COMObject iUnknown;
COMObject iOleClientSite;
private COMObject iAdviseSink;
private COMObject iOleInPlaceSite;
@@ -248,14 +247,14 @@ public OleClientSite(Composite parent, int style, String progId) {
tempStorage = createTempStorage();
// Create ole object with storage object
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
/*
* Bug in ICA Client 2.7. The creation of the IOleObject fails if the client
* site is provided to OleCreate(). The fix is to detect that the program
* id is an ICA Client and do not pass a client site to OleCreate().
* IOleObject.SetClientSite() is called later on.
*/
- long /*int*/ clientSite = isICAClient() ? 0 : iOleClientSite.getAddress();
+ long clientSite = isICAClient() ? 0 : iOleClientSite.getAddress();
int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, clientSite, tempStorage.getAddress(), address);
if (result != COM.S_OK)
OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
@@ -336,7 +335,7 @@ void OleCreate(GUID appClsid, GUID fileClsid, char[] fileName, File file) {
// Using the same application that created file, therefore, use default mechanism.
tempStorage = createTempStorage();
// Create ole object with storage object
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
int result = COM.OleCreateFromFile(appClsid, fileName, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, iOleClientSite.getAddress(), tempStorage.getAddress(), address);
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
objIUnknown = new IUnknown(address[0]);
@@ -344,14 +343,14 @@ void OleCreate(GUID appClsid, GUID fileClsid, char[] fileName, File file) {
// Not using the same application that created file, therefore, copy from original file to a new storage file
IStorage storage = null;
if (COM.StgIsStorageFile(fileName) == COM.S_OK) {
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
int mode = COM.STGM_READ | COM.STGM_TRANSACTED | COM.STGM_SHARE_EXCLUSIVE;
int result = COM.StgOpenStorage(fileName, 0, mode, 0, 0, address); //Does an AddRef if successful
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_OPEN_FILE, result);
storage = new IStorage(address[0]);
} else {
// Original file is not a Storage file so copy contents to a stream in a new storage file
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
int mode = COM.STGM_READWRITE | COM.STGM_DIRECT | COM.STGM_SHARE_EXCLUSIVE | COM.STGM_CREATE;
int result = COM.StgCreateDocfile(null, mode | COM.STGM_DELETEONRELEASE, 0, address); // Increments ref count if successful
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_OPEN_FILE, result);
@@ -363,7 +362,7 @@ void OleCreate(GUID appClsid, GUID fileClsid, char[] fileName, File file) {
GUID wordGUID = getClassID(WORDPROGID);
if (wordGUID != null && COM.IsEqualGUID(appClsid, wordGUID)) streamName = "WordDocument"; //$NON-NLS-1$
if (isOffice2007) streamName = "Package"; //$NON-NLS-1$
- address = new long /*int*/[1];
+ address = new long[1];
result = storage.CreateStream(streamName, mode, 0, 0, address); // Increments ref count if successful
if (result != COM.S_OK) {
storage.Release();
@@ -377,7 +376,7 @@ void OleCreate(GUID appClsid, GUID fileClsid, char[] fileName, File file) {
byte[] buffer = new byte[increment];
int count = 0;
while((count = fileInput.read(buffer)) > 0){
- long /*int*/ pv = OS.CoTaskMemAlloc(count);
+ long pv = OS.CoTaskMemAlloc(count);
OS.MoveMemory(pv, buffer, count);
result = stream.Write(pv, count, null) ;
OS.CoTaskMemFree(pv);
@@ -406,12 +405,12 @@ void OleCreate(GUID appClsid, GUID fileClsid, char[] fileName, File file) {
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_OPEN_FILE, result);
// create ole client
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
result = COM.CoCreateInstance(appClsid, 0, COM.CLSCTX_INPROC_HANDLER | COM.CLSCTX_INPROC_SERVER, COM.IIDIUnknown, ppv);
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
objIUnknown = new IUnknown(ppv[0]);
// get the persistent storage of the ole client
- ppv = new long /*int*/[1];
+ ppv = new long[1];
result = objIUnknown.QueryInterface(COM.IIDIPersistStorage, ppv);
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
IPersistStorage iPersistStorage = new IPersistStorage(ppv[0]);
@@ -428,7 +427,7 @@ void OleCreate(GUID appClsid, GUID fileClsid, char[] fileName, File file) {
}
protected void addObjectReferences() {
//
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIPersist, ppvObject) == COM.S_OK) {
IPersist objIPersist = new IPersist(ppvObject[0]);
GUID tempid = new GUID();
@@ -438,7 +437,7 @@ protected void addObjectReferences() {
}
//
- ppvObject = new long /*int*/[1];
+ ppvObject = new long[1];
int result = objIUnknown.QueryInterface(COM.IIDIViewObject2, ppvObject);
if (result != COM.S_OK)
OLE.error(OLE.ERROR_INTERFACE_NOT_FOUND, result);
@@ -446,7 +445,7 @@ protected void addObjectReferences() {
objIViewObject2.SetAdvise(aspect, 0, iAdviseSink.getAddress());
//
- ppvObject = new long /*int*/[1];
+ ppvObject = new long[1];
result = objIUnknown.QueryInterface(COM.IIDIOleObject, ppvObject);
if (result != COM.S_OK)
OLE.error(OLE.ERROR_INTERFACE_NOT_FOUND, result);
@@ -458,7 +457,7 @@ protected void addObjectReferences() {
* during OleCreate. The fix is to check whether the clientSite has already been set
* and set it. Note that setting it twice can result in assert failures.
*/
- long /*int*/[] ppvClientSite = new long /*int*/[1];
+ long[] ppvClientSite = new long[1];
result = objIOleObject.GetClientSite(ppvClientSite);
if (ppvClientSite[0] == 0) {
objIOleObject.SetClientSite(iOleClientSite.getAddress());
@@ -473,13 +472,12 @@ protected void addObjectReferences() {
COM.OleSetContainedObject(objIUnknown.getAddress(), true);
// Is OLE object linked or embedded?
- ppvObject = new long /*int*/[1];
+ ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIOleLink, ppvObject) == COM.S_OK) {
IOleLink objIOleLink = new IOleLink(ppvObject[0]);
- long /*int*/[] ppmk = new long /*int*/[1];
+ long[] ppmk = new long[1];
if (objIOleLink.GetSourceMoniker(ppmk) == COM.S_OK) {
- IMoniker objIMoniker = new IMoniker(ppmk[0]);
- objIMoniker.Release();
+ new IUnknown(ppmk[0]).Release();
type = COM.OLELINKED;
objIOleLink.BindIfRunning();
} else {
@@ -503,102 +501,87 @@ private int ContextSensitiveHelp(int fEnterMode) {
}
protected void createCOMInterfaces() {
- iUnknown = new COMObject(new int[]{2, 0, 0}){
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- };
-
iOleClientSite = new COMObject(new int[]{2, 0, 0, 0, 3, 1, 0, 1, 0}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return SaveObject();}
+ public long method3(long[] args) {return SaveObject();}
// method4 GetMoniker - not implemented
@Override
- public long /*int*/ method5(long /*int*/[] args) {return GetContainer(args[0]);}
+ public long method5(long[] args) {return GetContainer(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return ShowObject();}
+ public long method6(long[] args) {return ShowObject();}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return OnShowWindow((int)/*64*/args[0]);}
+ public long method7(long[] args) {return OnShowWindow((int)args[0]);}
// method8 RequestNewObjectLayout - not implemented
};
iAdviseSink = new COMObject(new int[]{2, 0, 0, 2, 2, 1, 0, 0}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return OnDataChange(args[0], args[1]);}
+ public long method3(long[] args) {return OnDataChange(args[0], args[1]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return OnViewChange((int)/*64*/args[0], (int)/*64*/args[1]);}
+ public long method4(long[] args) {return OnViewChange((int)args[0], (int)args[1]);}
//method5 OnRename - not implemented
@Override
- public long /*int*/ method6(long /*int*/[] args) {OnSave();return 0;}
+ public long method6(long[] args) {OnSave();return 0;}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return OnClose();}
+ public long method7(long[] args) {return OnClose();}
};
- iOleInPlaceSite = new COMObject(new int[]{2, 0, 0, 1, 1, 0, 0, 0, 5, C.PTR_SIZEOF == 4 ? 2 : 1, 1, 0, 0, 0, 1}){
+ iOleInPlaceSite = new COMObject(new int[]{2, 0, 0, 1, 1, 0, 0, 0, 5, 1, 1, 0, 0, 0, 1}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return GetWindow(args[0]);}
+ public long method3(long[] args) {return GetWindow(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return ContextSensitiveHelp((int)/*64*/args[0]);}
+ public long method4(long[] args) {return ContextSensitiveHelp((int)args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return CanInPlaceActivate();}
+ public long method5(long[] args) {return CanInPlaceActivate();}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return OnInPlaceActivate();}
+ public long method6(long[] args) {return OnInPlaceActivate();}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return OnUIActivate();}
+ public long method7(long[] args) {return OnUIActivate();}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return GetWindowContext(args[0], args[1], args[2], args[3], args[4]);}
+ public long method8(long[] args) {return GetWindowContext(args[0], args[1], args[2], args[3], args[4]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {
- if (args.length == 2) {
- return Scroll((int)/*64*/args[0], (int)/*64*/args[1]);
- } else {
- return Scroll_64(args[0]);
- }
- }
+ public long method9(long[] args) {return Scroll(args[0]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return OnUIDeactivate((int)/*64*/args[0]);}
+ public long method10(long[] args) {return OnUIDeactivate((int)args[0]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return OnInPlaceDeactivate();}
+ public long method11(long[] args) {return OnInPlaceDeactivate();}
// method12 DiscardUndoState - not implemented
// method13 DeactivateAndUndoChange - not implemented
@Override
- public long /*int*/ method14(long /*int*/[] args) {return OnPosRectChange(args[0]);}
+ public long method14(long[] args) {return OnPosRectChange(args[0]);}
};
iOleDocumentSite = new COMObject(new int[]{2, 0, 0, 1}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return ActivateMe(args[0]);}
+ public long method3(long[] args) {return ActivateMe(args[0]);}
};
}
protected IStorage createTempStorage() {
- long /*int*/[] tempStorage = new long /*int*/[1];
+ long[] tempStorage = new long[1];
int grfMode = COM.STGM_READWRITE | COM.STGM_SHARE_EXCLUSIVE | COM.STGM_DELETEONRELEASE;
int result = COM.StgCreateDocfile(null, grfMode, 0, tempStorage);
if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_CREATE_FILE, result);
@@ -620,12 +603,8 @@ private void deleteTempStorage() {
tempStorage = null;
}
protected void disposeCOMInterfaces() {
- if (iUnknown != null)
- iUnknown.dispose();
- iUnknown = null;
-
if (iOleClientSite != null)
- iOleClientSite.dispose();
+ iOleClientSite.dispose();
iOleClientSite = null;
if (iAdviseSink != null)
@@ -688,18 +667,18 @@ public int doVerb(int verb) {
public int exec(int cmdID, int options, Variant in, Variant out) {
if (objIOleCommandTarget == null) {
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIOleCommandTarget, address) != COM.S_OK)
return OLE.ERROR_INTERFACE_NOT_FOUND;
objIOleCommandTarget = new IOleCommandTarget(address[0]);
}
- long /*int*/ inAddress = 0;
+ long inAddress = 0;
if (in != null){
inAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
in.getData(inAddress);
}
- long /*int*/ outAddress = 0;
+ long outAddress = 0;
if (out != null){
outAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
out.getData(outAddress);
@@ -720,7 +699,7 @@ public int exec(int cmdID, int options, Variant in, Variant out) {
return result;
}
IDispatch getAutomationObject() {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIDispatch, ppvObject) != COM.S_OK)
return null;
return new IDispatch(ppvObject[0]);
@@ -742,13 +721,13 @@ protected GUID getClassID(String clientName) {
}
return guid;
}
-private int GetContainer(long /*int*/ ppContainer) {
+private int GetContainer(long ppContainer) {
/* Simple containers that do not support links to their embedded
* objects probably do not need to implement this method. Instead,
* they can return E_NOINTERFACE and set ppContainer to NULL.
*/
if (ppContainer != 0)
- OS.MoveMemory(ppContainer, new long /*int*/[]{0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppContainer, new long[]{0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
private SIZE getExtent() {
@@ -756,7 +735,7 @@ private SIZE getExtent() {
// get the current size of the embedded OLENatives object
if (objIOleObject != null) {
if ( objIViewObject2 != null && !COM.OleIsRunning(objIOleObject.getAddress())) {
- objIViewObject2.GetExtent(aspect, -1, null, sizel);
+ objIViewObject2.GetExtent(aspect, -1, 0, sizel);
} else {
objIOleObject.GetExtent(aspect, sizel);
}
@@ -784,11 +763,11 @@ public String getProgramID(){
}
String getProgID(GUID clsid) {
if (clsid != null){
- long /*int*/[] lplpszProgID = new long /*int*/[1];
+ long[] lplpszProgID = new long[1];
if (COM.ProgIDFromCLSID(clsid, lplpszProgID) == COM.S_OK) {
- long /*int*/ hMem = lplpszProgID[0];
+ long hMem = lplpszProgID[0];
int length = OS.GlobalSize(hMem);
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long ptr = OS.GlobalLock(hMem);
char[] buffer = new char[length];
OS.MoveMemory(buffer, ptr, length);
OS.GlobalUnlock(hMem);
@@ -802,9 +781,9 @@ String getProgID(GUID clsid) {
}
return null;
}
-int ActivateMe(long /*int*/ pViewToActivate) {
+int ActivateMe(long pViewToActivate) {
if (pViewToActivate == 0) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIOleDocument, ppvObject) != COM.S_OK) return COM.E_FAIL;
IOleDocument objOleDocument = new IOleDocument(ppvObject[0]);
if (objOleDocument.CreateView(iOleInPlaceSite.getAddress(), 0, 0, ppvObject) != COM.S_OK) return COM.E_FAIL;
@@ -821,16 +800,16 @@ int ActivateMe(long /*int*/ pViewToActivate) {
objDocumentView.Show(1);//TRUE
return COM.S_OK;
}
-protected int GetWindow(long /*int*/ phwnd) {
+protected int GetWindow(long phwnd) {
if (phwnd == 0)
return COM.E_INVALIDARG;
if (frame == null) {
- OS.MoveMemory(phwnd, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(phwnd, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOTIMPL;
}
// Copy the Window's handle into the memory passed in
- OS.MoveMemory(phwnd, new long /*int*/[] {handle}, C.PTR_SIZEOF);
+ OS.MoveMemory(phwnd, new long[] {handle}, C.PTR_SIZEOF);
return COM.S_OK;
}
RECT getRect() {
@@ -842,17 +821,17 @@ RECT getRect() {
rect.bottom = area.y + area.height;
return rect;
}
-private int GetWindowContext(long /*int*/ ppFrame, long /*int*/ ppDoc, long /*int*/ lprcPosRect, long /*int*/ lprcClipRect, long /*int*/ lpFrameInfo) {
+private int GetWindowContext(long ppFrame, long ppDoc, long lprcPosRect, long lprcClipRect, long lpFrameInfo) {
if (frame == null || ppFrame == 0)
return COM.E_NOTIMPL;
// fill in frame handle
- long /*int*/ iOleInPlaceFrame = frame.getIOleInPlaceFrame();
- OS.MoveMemory(ppFrame, new long /*int*/[] {iOleInPlaceFrame}, C.PTR_SIZEOF);
+ long iOleInPlaceFrame = frame.getIOleInPlaceFrame();
+ OS.MoveMemory(ppFrame, new long[] {iOleInPlaceFrame}, C.PTR_SIZEOF);
frame.AddRef();
// null out document handle
- if (ppDoc != 0) OS.MoveMemory(ppDoc, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ if (ppDoc != 0) OS.MoveMemory(ppDoc, new long[] {0}, C.PTR_SIZEOF);
// fill in position and clipping info
RECT rect = getRect();
@@ -867,10 +846,10 @@ private int GetWindowContext(long /*int*/ ppFrame, long /*int*/ ppDoc, long /*in
Shell shell = getShell();
Menu menubar = shell.getMenuBar();
if (menubar != null && !menubar.isDisposed()) {
- long /*int*/ hwnd = shell.handle;
- int cAccel = (int)/*64*/OS.SendMessage(hwnd, OS.WM_APP, 0, 0);
+ long hwnd = shell.handle;
+ int cAccel = (int)OS.SendMessage(hwnd, OS.WM_APP, 0, 0);
if (cAccel != 0) {
- long /*int*/ hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);
+ long hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);
if (hAccel != 0) {
frameInfo.cAccelEntries = cAccel;
frameInfo.haccel = hAccel;
@@ -900,7 +879,7 @@ public boolean isDirty() {
*/
// Get access to the persistent storage mechanism
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
if (objIOleObject.QueryInterface(COM.IIDIPersistFile, address) != COM.S_OK)
return true;
IPersistFile permStorage = new IPersistFile(address[0]);
@@ -913,9 +892,9 @@ public boolean isDirty() {
@Override
public boolean isFocusControl () {
checkWidget ();
- long /*int*/ focusHwnd = OS.GetFocus();
+ long focusHwnd = OS.GetFocus();
if (objIOleInPlaceObject == null) return (handle == focusHwnd);
- long /*int*/[] phwnd = new long /*int*/[1];
+ long[] phwnd = new long[1];
objIOleInPlaceObject.GetWindow(phwnd);
while (focusHwnd != 0) {
if (phwnd[0] == focusHwnd) return true;
@@ -943,7 +922,7 @@ private boolean isOffice2007(boolean program) {
private int OnClose() {
return COM.S_OK;
}
-private int OnDataChange(long /*int*/ pFormatetc, long /*int*/ pStgmed) {
+private int OnDataChange(long pFormatetc, long pStgmed) {
return COM.S_OK;
}
private void onDispose(Event e) {
@@ -972,7 +951,7 @@ private void onDispose(Event e) {
void onFocusIn(Event e) {
if (inDispose) return;
if (state != STATE_UIACTIVE) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIOleInPlaceObject, ppvObject) == COM.S_OK) {
IOleInPlaceObject objIOleInPlaceObject = new IOleInPlaceObject(ppvObject[0]);
objIOleInPlaceObject.Release();
@@ -981,7 +960,7 @@ void onFocusIn(Event e) {
}
if (objIOleInPlaceObject == null) return;
if (isFocusControl()) return;
- long /*int*/[] phwnd = new long /*int*/[1];
+ long[] phwnd = new long[1];
objIOleInPlaceObject.GetWindow(phwnd);
if (phwnd[0] == 0) return;
OS.SetFocus(phwnd[0]);
@@ -993,7 +972,7 @@ private int OnInPlaceActivate() {
frame.setCurrentDocument(this);
if (objIOleObject == null)
return COM.S_OK;
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIOleObject.QueryInterface(COM.IIDIOleInPlaceObject, ppvObject) == COM.S_OK) {
objIOleInPlaceObject = new IOleInPlaceObject(ppvObject[0]);
}
@@ -1010,7 +989,7 @@ private int OnInPlaceDeactivate() {
}
return COM.S_OK;
}
-private int OnPosRectChange(long /*int*/ lprcPosRect) {
+private int OnPosRectChange(long lprcPosRect) {
Point size = DPIUtil.autoScaleUp(getSize()); // To Pixels
setExtent(size.x, size.y);
return COM.S_OK;
@@ -1028,7 +1007,7 @@ private void onPaint(Event e) {
rect.top = area.y; rect.bottom = area.y + size.cy;
}
- long /*int*/ pArea = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, RECT.sizeof);
+ long pArea = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, RECT.sizeof);
OS.MoveMemory(pArea, rect, RECT.sizeof);
COM.OleDraw(objIUnknown.getAddress(), aspect, e.gc.handle, pArea);
OS.GlobalFree(pArea);
@@ -1045,7 +1024,7 @@ private int OnShowWindow(int fShow) {
private int OnUIActivate() {
if (objIOleInPlaceObject == null) return COM.E_FAIL;
state = STATE_UIACTIVE;
- long /*int*/[] phwnd = new long /*int*/[1];
+ long[] phwnd = new long[1];
if (objIOleInPlaceObject.GetWindow(phwnd) == COM.S_OK) {
OS.SetWindowPos(phwnd[0], OS.HWND_TOP, 0, 0, 0, 0, OS.SWP_NOSIZE | OS.SWP_NOMOVE);
}
@@ -1065,7 +1044,7 @@ int OnUIDeactivate(int fUndoable) {
if (menubar == null || menubar.isDisposed())
return COM.S_OK;
- long /*int*/ shellHandle = shell.handle;
+ long shellHandle = shell.handle;
OS.SetMenu(shellHandle, menubar.handle);
return COM.OleSetMenuDescriptor(0, shellHandle, 0, 0, 0);
}
@@ -1085,42 +1064,37 @@ private void onTraverse(Event event) {
private int OnViewChange(int dwAspect, int lindex) {
return COM.S_OK;
}
-protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+protected int QueryInterface(long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_NOINTERFACE;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
- if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, C.PTR_SIZEOF);
+ if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIOleClientSite)) {
+ OS.MoveMemory(ppvObject, new long[] {iOleClientSite.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIAdviseSink)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iAdviseSink.getAddress()}, C.PTR_SIZEOF);
- AddRef();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID(guid, COM.IIDIOleClientSite)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iOleClientSite.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iAdviseSink.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceSite)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iOleInPlaceSite.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iOleInPlaceSite.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIOleDocumentSite )) {
String progID = getProgramID();
if (!progID.startsWith("PowerPoint")) { //$NON-NLS-1$
- OS.MoveMemory(ppvObject, new long /*int*/[] {iOleDocumentSite.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iOleDocumentSite.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
/**
@@ -1138,7 +1112,7 @@ protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
public int queryStatus(int cmd) {
if (objIOleCommandTarget == null) {
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIOleCommandTarget, address) != COM.S_OK)
return 0;
objIOleCommandTarget = new IOleCommandTarget(address[0]);
@@ -1147,7 +1121,7 @@ public int queryStatus(int cmd) {
OLECMD olecmd = new OLECMD();
olecmd.cmdID = cmd;
- int result = objIOleCommandTarget.QueryStatus(null, 1, olecmd, null);
+ int result = objIOleCommandTarget.QueryStatus(null, 1, olecmd, 0);
if (result != COM.S_OK) return 0;
@@ -1221,7 +1195,7 @@ public boolean save(File file, boolean includeOleInfo) {
return saveToStorageFile(file);
return saveToTraditionalFile(file);
}
-private boolean saveFromContents(long /*int*/ address, File file) {
+private boolean saveFromContents(long address, File file) {
boolean success = false;
@@ -1232,7 +1206,7 @@ private boolean saveFromContents(long /*int*/ address, File file) {
FileOutputStream writer = new FileOutputStream(file);
int increment = 1024 * 4;
- long /*int*/ pv = OS.CoTaskMemAlloc(increment);
+ long pv = OS.CoTaskMemAlloc(increment);
int[] pcbWritten = new int[1];
while (tempContents.Read(pv, increment, pcbWritten) == COM.S_OK && pcbWritten[0] > 0) {
byte[] buffer = new byte[ pcbWritten[0]];
@@ -1252,7 +1226,7 @@ private boolean saveFromContents(long /*int*/ address, File file) {
return success;
}
-private boolean saveFromOle10Native(long /*int*/ address, File file) {
+private boolean saveFromOle10Native(long address, File file) {
boolean success = false;
@@ -1261,7 +1235,7 @@ private boolean saveFromOle10Native(long /*int*/ address, File file) {
// The "\1Ole10Native" stream contains a DWORD header whose value is the length
// of the native data that follows.
- long /*int*/ pv = OS.CoTaskMemAlloc(4);
+ long pv = OS.CoTaskMemAlloc(4);
int[] size = new int[1];
int rc = tempContents.Read(pv, 4, null);
OS.MoveMemory(size, pv, 4);
@@ -1301,14 +1275,14 @@ private boolean saveOffice2007(File file) {
boolean result = false;
/* Excel fails to open the package stream when the PersistStorage is not in hands off mode */
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
IPersistStorage iPersistStorage = null;
if (objIUnknown.QueryInterface(COM.IIDIPersistStorage, ppv) == COM.S_OK) {
iPersistStorage = new IPersistStorage(ppv[0]);
tempStorage.AddRef();
iPersistStorage.HandsOffStorage();
}
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
int grfMode = COM.STGM_DIRECT | COM.STGM_READ | COM.STGM_SHARE_EXCLUSIVE;
if (tempStorage.OpenStream("Package", 0, grfMode, 0, address) == COM.S_OK) { //$NON-NLS-1$
result = saveFromContents(address[0], file);
@@ -1342,11 +1316,11 @@ private boolean saveToStorageFile(File file) {
if (!updateStorage()) return false;
// get access to the persistent storage mechanism
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
if (objIOleObject.QueryInterface(COM.IIDIPersistStorage, address) != COM.S_OK) return false;
IPersistStorage permStorage = new IPersistStorage(address[0]);
try {
- address = new long /*int*/[1];
+ address = new long[1];
char[] path = (file.getAbsolutePath()+"\0").toCharArray();
int mode = COM.STGM_TRANSACTED | COM.STGM_READWRITE | COM.STGM_SHARE_EXCLUSIVE | COM.STGM_CREATE;
int result = COM.StgCreateDocfile(path, mode, 0, address); //Does an AddRef if successful
@@ -1385,7 +1359,7 @@ private boolean saveToTraditionalFile(File file) {
if (!updateStorage())
return false;
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
// Look for a CONTENTS stream
if (tempStorage.OpenStream("CONTENTS", 0, COM.STGM_DIRECT | COM.STGM_READ | COM.STGM_SHARE_EXCLUSIVE, 0, address) == COM.S_OK) //$NON-NLS-1$
return saveFromContents(address[0], file);
@@ -1396,10 +1370,7 @@ private boolean saveToTraditionalFile(File file) {
return false;
}
-private int Scroll_64(long /*int*/ scrollExtent) {
- return COM.S_OK;
-}
-private int Scroll(int scrollExtent_cx, int scrollExtent_cy) {
+private int Scroll(long scrollExtent) {
return COM.S_OK;
}
void setBorderSpace(RECT newBorderwidth) {
@@ -1410,7 +1381,7 @@ void setBorderSpace(RECT newBorderwidth) {
void setBounds() {
Rectangle area = DPIUtil.autoScaleUp(frame.getClientArea()); // To Pixels
setBounds(DPIUtil.autoScaleDown(borderWidths.left),
- DPIUtil.autoScaleDown(borderWidths.top),
+ DPIUtil.autoScaleDown(borderWidths.top),
DPIUtil.autoScaleDown(area.width - borderWidths.left - borderWidths.right),
DPIUtil.autoScaleDown(area.height - borderWidths.top - borderWidths.bottom));
setObjectRects();
@@ -1427,7 +1398,7 @@ private void setExtent(int width, int height){
newExtent.cx = width; newExtent.cy = height;
newExtent = xFormPixelsToHimetric(newExtent);
- // Get the server running first, then do a SetExtent, then show it
+ // Get the server running first, then do a SetExtent, then show it
boolean alreadyRunning = COM.OleIsRunning(objIOleObject.getAddress());
if (!alreadyRunning)
COM.OleRun(objIOleObject.getAddress());
@@ -1478,7 +1449,7 @@ private int ShowObject() {
public void showProperties(String title) {
// Get the Property Page information from the OLE Object
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDISpecifyPropertyPages, ppvObject) != COM.S_OK) return;
ISpecifyPropertyPages objISPP = new ISpecifyPropertyPages(ppvObject[0]);
CAUUID caGUID = new CAUUID();
@@ -1492,7 +1463,7 @@ public void showProperties(String title) {
chTitle = new char[title.length()];
title.getChars(0, title.length(), chTitle, 0);
}
- result = COM.OleCreatePropertyFrame(frame.handle, 10, 10, chTitle, 1, new long /*int*/[] {objIUnknown.getAddress()}, caGUID.cElems, caGUID.pElems, COM.LOCALE_USER_DEFAULT, 0, 0);
+ result = COM.OleCreatePropertyFrame(frame.handle, 10, 10, chTitle, 1, new long[] {objIUnknown.getAddress()}, caGUID.cElems, caGUID.pElems, COM.LOCALE_USER_DEFAULT, 0, 0);
// free the property page information
OS.CoTaskMemFree(caGUID.pElems);
@@ -1501,7 +1472,7 @@ private boolean updateStorage() {
if (tempStorage == null) return false;
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIPersistStorage, ppv) != COM.S_OK) return false;
IPersistStorage iPersistStorage = new IPersistStorage(ppv[0]);
@@ -1523,7 +1494,7 @@ private SIZE xFormHimetricToPixels(SIZE aSize) {
// Return a new Size which is the pixel transformation of a
// size in HIMETRIC units.
- long /*int*/ hDC = OS.GetDC(0);
+ long hDC = OS.GetDC(0);
int xppi = OS.GetDeviceCaps(hDC, 88); // logical pixels/inch in x
int yppi = OS.GetDeviceCaps(hDC, 90); // logical pixels/inch in y
OS.ReleaseDC(0, hDC);
@@ -1538,7 +1509,7 @@ private SIZE xFormPixelsToHimetric(SIZE aSize) {
// Return a new size which is the HIMETRIC transformation of a
// size in pixel units.
- long /*int*/ hDC = OS.GetDC(0);
+ long hDC = OS.GetDC(0);
int xppi = OS.GetDeviceCaps(hDC, 88); // logical pixels/inch in x
int yppi = OS.GetDeviceCaps(hDC, 90); // logical pixels/inch in y
OS.ReleaseDC(0, hDC);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
index 847883ef4c..0de9c0fd1f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
@@ -59,7 +59,7 @@ public class OleControlSite extends OleClientSite
// supporting Event Sink attributes
private OleEventSink[] oleEventSink = new OleEventSink[0];
private GUID[] oleEventSinkGUID = new GUID[0];
- private long /*int*/[] oleEventSinkIUnknown = new long /*int*/[0];
+ private long[] oleEventSinkIUnknown = new long[0];
// supporting information for the Control COM object
private CONTROLINFO currentControlInfo;
@@ -133,21 +133,21 @@ public OleControlSite(Composite parent, int style, String progId) {
appClsid = getClassID(progId);
if (appClsid == null) OLE.error(OLE.ERROR_INVALID_CLASSID);
- long /*int*/ licinfo = getLicenseInfo(appClsid);
+ long licinfo = getLicenseInfo(appClsid);
if (licinfo == 0) {
// Open a storage object
tempStorage = createTempStorage();
// Create ole object with storage object
- long /*int*/[] address = new long /*int*/[1];
+ long[] address = new long[1];
/*
* Bug in ICA Client 2.7. The creation of the IOleObject fails if the client
* site is provided to OleCreate(). The fix is to detect that the program
* id is an ICA Client and do not pass a client site to OleCreate().
* IOleObject.SetClientSite() is called later on.
*/
- long /*int*/ clientSite = isICAClient() ? 0 : iOleClientSite.getAddress();
+ long clientSite = isICAClient() ? 0 : iOleClientSite.getAddress();
int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, clientSite, tempStorage.getAddress(), address);
if (result != COM.S_OK)
OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
@@ -156,7 +156,7 @@ public OleControlSite(Composite parent, int style, String progId) {
} else {
// Prepare the ClassFactory
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
try {
int result = COM.CoGetClassObject(appClsid, COM.CLSCTX_INPROC_HANDLER | COM.CLSCTX_INPROC_SERVER, 0, COM.IIDIClassFactory2, ppvObject);
if (result != COM.S_OK) {
@@ -164,7 +164,7 @@ public OleControlSite(Composite parent, int style, String progId) {
}
IClassFactory2 classFactory = new IClassFactory2(ppvObject[0]);
// Create Com Object
- ppvObject = new long /*int*/[1];
+ ppvObject = new long[1];
result = classFactory.CreateInstanceLic(0, 0, COM.IIDIUnknown, licinfo, ppvObject);
classFactory.Release();
if (result != COM.S_OK)
@@ -176,7 +176,7 @@ public OleControlSite(Composite parent, int style, String progId) {
objIUnknown = new IUnknown(ppvObject[0]);
// Prepare a storage medium
- ppvObject = new long /*int*/[1];
+ ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIPersistStorage, ppvObject) == COM.S_OK) {
IPersistStorage persist = new IPersistStorage(ppvObject[0]);
tempStorage = createTempStorage();
@@ -260,7 +260,7 @@ public void addEventListener(int eventID, OleListener listener) {
}
static GUID getDefaultEventSinkGUID(IUnknown unknown) {
// get Event Sink I/F from IProvideClassInfo2
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (unknown.QueryInterface(COM.IIDIProvideClassInfo2, ppvObject) == COM.S_OK) {
IProvideClassInfo2 pci2 = new IProvideClassInfo2(ppvObject[0]);
GUID riid = new GUID();
@@ -272,14 +272,14 @@ static GUID getDefaultEventSinkGUID(IUnknown unknown) {
// get Event Sink I/F from IProvideClassInfo
if (unknown.QueryInterface(COM.IIDIProvideClassInfo, ppvObject) == COM.S_OK) {
IProvideClassInfo pci = new IProvideClassInfo(ppvObject[0]);
- long /*int*/[] ppTI = new long /*int*/[1];
- long /*int*/[] ppEI = new long /*int*/[1];
+ long[] ppTI = new long[1];
+ long[] ppEI = new long[1];
int result = pci.GetClassInfo(ppTI);
pci.Release();
if (result == COM.S_OK && ppTI[0] != 0) {
ITypeInfo classInfo = new ITypeInfo(ppTI[0]);
- long /*int*/[] ppTypeAttr = new long /*int*/[1];
+ long[] ppTypeAttr = new long[1];
result = classInfo.GetTypeAttr(ppTypeAttr);
if (result == COM.S_OK && ppTypeAttr[0] != 0) {
TYPEATTR typeAttribute = new TYPEATTR();
@@ -304,7 +304,7 @@ static GUID getDefaultEventSinkGUID(IUnknown unknown) {
if (ppEI[0] != 0) {
ITypeInfo eventInfo = new ITypeInfo(ppEI[0]);
- ppTypeAttr = new long /*int*/[1];
+ ppTypeAttr = new long[1];
result = eventInfo.GetTypeAttr(ppTypeAttr);
GUID riid = null;
if (result == COM.S_OK && ppTypeAttr[0] != 0) {
@@ -335,7 +335,7 @@ static GUID getDefaultEventSinkGUID(IUnknown unknown) {
*/
public void addEventListener(OleAutomation automation, int eventID, OleListener listener) {
if (listener == null || automation == null) OLE.error (SWT.ERROR_NULL_ARGUMENT);
- long /*int*/ address = automation.getAddress();
+ long address = automation.getAddress();
IUnknown unknown = new IUnknown(address);
GUID riid = getDefaultEventSinkGUID(unknown);
if (riid != null) {
@@ -359,7 +359,7 @@ public void addEventListener(OleAutomation automation, int eventID, OleListener
*/
public void addEventListener(OleAutomation automation, String eventSinkId, int eventID, OleListener listener) {
if (listener == null || automation == null || eventSinkId == null) OLE.error (SWT.ERROR_NULL_ARGUMENT);
- long /*int*/ address = automation.getAddress();
+ long address = automation.getAddress();
if (address == 0) return;
char[] buffer = (eventSinkId +"\0").toCharArray();
GUID guid = new GUID();
@@ -367,7 +367,7 @@ public void addEventListener(OleAutomation automation, String eventSinkId, int e
addEventListener(address, guid, eventID, listener);
}
-void addEventListener(long /*int*/ iunknown, GUID guid, int eventID, OleListener listener) {
+void addEventListener(long iunknown, GUID guid, int eventID, OleListener listener) {
if (listener == null || iunknown == 0 || guid == null) OLE.error (SWT.ERROR_NULL_ARGUMENT);
// have we connected to this kind of event sink before?
int index = -1;
@@ -385,7 +385,7 @@ void addEventListener(long /*int*/ iunknown, GUID guid, int eventID, OleListener
int oldLength = oleEventSink.length;
OleEventSink[] newOleEventSink = new OleEventSink[oldLength + 1];
GUID[] newOleEventSinkGUID = new GUID[oldLength + 1];
- long /*int*/[] newOleEventSinkIUnknown = new long /*int*/[oldLength + 1];
+ long[] newOleEventSinkIUnknown = new long[oldLength + 1];
System.arraycopy(oleEventSink, 0, newOleEventSink, 0, oldLength);
System.arraycopy(oleEventSinkGUID, 0, newOleEventSinkGUID, 0, oldLength);
System.arraycopy(oleEventSinkIUnknown, 0, newOleEventSinkIUnknown, 0, oldLength);
@@ -411,7 +411,7 @@ protected void addObjectReferences() {
connectPropertyChangeSink();
// Get access to the Control object
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIOleControl, ppvObject) == COM.S_OK) {
IOleControl objIOleControl = new IOleControl(ppvObject[0]);
// ask the control for its info in case users
@@ -448,46 +448,45 @@ protected void createCOMInterfaces () {
// register each of the interfaces that this object implements
iOleControlSite = new COMObject(new int[]{2, 0, 0, 0, 1, 1, 3, 2, 1, 0}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return OnControlInfoChanged();}
+ public long method3(long[] args) {return OnControlInfoChanged();}
// method4 LockInPlaceActive - not implemented
// method5 GetExtendedControl - not implemented
// method6 TransformCoords - not implemented
// method7 Translate Accelerator - not implemented
@Override
- public long /*int*/ method8(long /*int*/[] args) {return OnFocus((int)/*64*/args[0]);}
+ public long method8(long[] args) {return OnFocus((int)args[0]);}
// method9 ShowPropertyFrame - not implemented
};
iDispatch = new COMObject(new int[]{2, 0, 0, 1, 3, 5, 8}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
// method3 GetTypeInfoCount - not implemented
// method4 GetTypeInfo - not implemented
// method5 GetIDsOfNames - not implemented
@Override
- public long /*int*/ method6(long /*int*/[] args) {return Invoke((int)/*64*/args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4], args[5], args[6], args[7]);}
+ public long method6(long[] args) {return Invoke((int)args[0], args[1], (int)args[2], (int)args[3], args[4], args[5], args[6], args[7]);}
};
}
private void disconnectEventSinks() {
- for (int i = 0; i < oleEventSink.length; i++) {
- OleEventSink sink = oleEventSink[i];
+ for (OleEventSink sink : oleEventSink) {
sink.disconnect();
sink.Release();
}
oleEventSink = new OleEventSink[0];
oleEventSinkGUID = new GUID[0];
- oleEventSinkIUnknown = new long /*int*/[0];
+ oleEventSinkIUnknown = new long[0];
}
private void disconnectPropertyChangeSink() {
@@ -520,7 +519,7 @@ public Color getBackground () {
if (varBackColor != null){
int[] colorRef = new int[1];
- if (COM.OleTranslateColor(varBackColor.getInt(), getDisplay().hPalette, colorRef) == COM.S_OK)
+ if (COM.OleTranslateColor(varBackColor.getInt(), 0, colorRef) == COM.S_OK)
return Color.win32_new(getDisplay(), colorRef[0]);
}
}
@@ -568,26 +567,26 @@ public Color getForeground () {
if (varForeColor != null){
int[] colorRef = new int[1];
- if (COM.OleTranslateColor(varForeColor.getInt(), getDisplay().hPalette, colorRef) == COM.S_OK)
+ if (COM.OleTranslateColor(varForeColor.getInt(), 0, colorRef) == COM.S_OK)
return Color.win32_new(getDisplay(), colorRef[0]);
}
}
return super.getForeground();
}
-protected long /*int*/ getLicenseInfo(GUID clsid) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+protected long getLicenseInfo(GUID clsid) {
+ long[] ppvObject = new long[1];
if (COM.CoGetClassObject(clsid, COM.CLSCTX_INPROC_HANDLER
| COM.CLSCTX_INPROC_SERVER, 0, COM.IIDIClassFactory, ppvObject) != COM.S_OK) {
return 0;
}
- long /*int*/ result = 0;
+ long result = 0;
IUnknown unknown = new IUnknown(ppvObject[0]);
if (unknown.QueryInterface(COM.IIDIClassFactory2, ppvObject) == COM.S_OK) {
IClassFactory2 classFactory = new IClassFactory2(ppvObject[0]);
LICINFO licinfo = new LICINFO();
if (classFactory.GetLicInfo(licinfo) == COM.S_OK) {
- long /*int*/[] pBstrKey = new long /*int*/[1];
+ long[] pBstrKey = new long[1];
if (licinfo != null && licinfo.fRuntimeKeyAvail) {
if (classFactory.RequestLicKey(0, pBstrKey) == COM.S_OK) {
result = pBstrKey[0];
@@ -619,22 +618,22 @@ public Variant getSiteProperty(int dispId){
return null;
}
@Override
-protected int GetWindow(long /*int*/ phwnd) {
+protected int GetWindow(long phwnd) {
if (phwnd == 0)
return COM.E_INVALIDARG;
if (frame == null) {
- OS.MoveMemory(phwnd, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(phwnd, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOTIMPL;
}
// Copy the Window's handle into the memory passed in
- OS.MoveMemory(phwnd, new long /*int*/[] {handle}, C.PTR_SIZEOF);
+ OS.MoveMemory(phwnd, new long[] {handle}, C.PTR_SIZEOF);
return COM.S_OK;
}
-private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*int*/ pDispParams, long /*int*/ pVarResult, long /*int*/ pExcepInfo, long /*int*/ pArgErr) {
+private int Invoke(int dispIdMember, long riid, int lcid, int dwFlags, long pDispParams, long pVarResult, long pExcepInfo, long pArgErr) {
if (pVarResult == 0 || dwFlags != COM.DISPATCH_PROPERTYGET) {
- if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, C.PTR_SIZEOF);
+ if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long [] {0}, C.PTR_SIZEOF);
if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4);
return COM.DISP_E_MEMBERNOTFOUND;
}
@@ -648,8 +647,8 @@ private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, l
case COM.DISPID_AMBIENT_SUPPORTSMNEMONICS :
case COM.DISPID_AMBIENT_SHOWGRABHANDLES :
case COM.DISPID_AMBIENT_SHOWHATCHING :
- if (pVarResult != 0) OS.MoveMemory(pVarResult, new long /*int*/ [] {0}, C.PTR_SIZEOF);
- if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, C.PTR_SIZEOF);
+ if (pVarResult != 0) OS.MoveMemory(pVarResult, new long [] {0}, C.PTR_SIZEOF);
+ if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long [] {0}, C.PTR_SIZEOF);
if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4);
return COM.S_FALSE;
@@ -661,20 +660,20 @@ private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, l
case COM.DISPID_AMBIENT_LOCALEID :
case COM.DISPID_AMBIENT_SILENT :
case COM.DISPID_AMBIENT_MESSAGEREFLECT :
- if (pVarResult != 0) OS.MoveMemory(pVarResult, new long /*int*/ [] {0}, C.PTR_SIZEOF);
- if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long /*int*/ [] {0}, C.PTR_SIZEOF);
+ if (pVarResult != 0) OS.MoveMemory(pVarResult, new long [] {0}, C.PTR_SIZEOF);
+ if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo, new long [] {0}, C.PTR_SIZEOF);
if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4);
return COM.E_NOTIMPL;
default :
- if (pVarResult != 0) OS.MoveMemory(pVarResult, new long /*int*/ [] {0}, C.PTR_SIZEOF);
- if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo,new long /*int*/ [] {0}, C.PTR_SIZEOF);
+ if (pVarResult != 0) OS.MoveMemory(pVarResult, new long [] {0}, C.PTR_SIZEOF);
+ if (pExcepInfo != 0) OS.MoveMemory(pExcepInfo,new long [] {0}, C.PTR_SIZEOF);
if (pArgErr != 0) OS.MoveMemory(pArgErr, new int[] {0}, 4);
return COM.DISP_E_MEMBERNOTFOUND;
}
}
private int OnControlInfoChanged() {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIOleControl, ppvObject) == COM.S_OK) {
IOleControl objIOleControl = new IOleControl(ppvObject[0]);
// ask the control for its info in case users
@@ -700,7 +699,7 @@ void onFocusIn(Event e) {
if (objIOleInPlaceObject == null) return;
if (!isActivated) doVerb(OLE.OLEIVERB_UIACTIVATE);
if (isFocusControl()) return;
- long /*int*/[] phwnd = new long /*int*/[1];
+ long[] phwnd = new long[1];
objIOleInPlaceObject.GetWindow(phwnd);
if (phwnd[0] == 0) return;
OS.SetFocus(phwnd[0]);
@@ -763,7 +762,7 @@ private int OnFocus(int fGotFocus) {
return COM.S_OK;
}
@Override
-protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+protected int QueryInterface(long riid, long ppvObject) {
int result = super.QueryInterface(riid, ppvObject);
if (result == COM.S_OK)
return result;
@@ -772,16 +771,16 @@ protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIOleControlSite)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iOleControlSite.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iOleControlSite.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIDispatch)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@Override
@@ -865,14 +864,14 @@ public void removeEventListener(OleAutomation automation, GUID guid, int eventID
public void removeEventListener(OleAutomation automation, int eventID, OleListener listener) {
checkWidget();
if (automation == null || listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- long /*int*/ address = automation.getAddress();
+ long address = automation.getAddress();
IUnknown unknown = new IUnknown(address);
GUID riid = getDefaultEventSinkGUID(unknown);
if (riid != null) {
removeEventListener(address, riid, eventID, listener);
}
}
-void removeEventListener(long /*int*/ iunknown, GUID guid, int eventID, OleListener listener) {
+void removeEventListener(long iunknown, GUID guid, int eventID, OleListener listener) {
if (listener == null || guid == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
for (int i = 0; i < oleEventSink.length; i++) {
if (COM.IsEqualGUID(oleEventSinkGUID[i], guid)) {
@@ -886,7 +885,7 @@ void removeEventListener(long /*int*/ iunknown, GUID guid, int eventID, OleListe
if (oldLength == 1) {
oleEventSink = new OleEventSink[0];
oleEventSinkGUID = new GUID[0];
- oleEventSinkIUnknown = new long /*int*/[0];
+ oleEventSinkIUnknown = new long[0];
} else {
OleEventSink[] newOleEventSink = new OleEventSink[oldLength - 1];
System.arraycopy(oleEventSink, 0, newOleEventSink, 0, i);
@@ -898,7 +897,7 @@ void removeEventListener(long /*int*/ iunknown, GUID guid, int eventID, OleListe
System.arraycopy(oleEventSinkGUID, i + 1, newOleEventSinkGUID, i, oldLength - i - 1);
oleEventSinkGUID = newOleEventSinkGUID;
- long /*int*/[] newOleEventSinkIUnknown = new long /*int*/[oldLength - 1];
+ long[] newOleEventSinkIUnknown = new long[oldLength - 1];
System.arraycopy(oleEventSinkIUnknown, 0, newOleEventSinkIUnknown, 0, i);
System.arraycopy(oleEventSinkIUnknown, i + 1, newOleEventSinkIUnknown, i, oldLength - i - 1);
oleEventSinkIUnknown = newOleEventSinkIUnknown;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java
index 99ee543376..64971d17d6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java
@@ -31,7 +31,7 @@ final class OleEventSink
private OleEventTable eventTable;
-OleEventSink(OleControlSite widget, long /*int*/ iUnknown, GUID riid) {
+OleEventSink(OleControlSite widget, long iUnknown, GUID riid) {
this.widget = widget;
this.eventGuid = riid;
@@ -41,10 +41,10 @@ OleEventSink(OleControlSite widget, long /*int*/ iUnknown, GUID riid) {
}
void connect () {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIConnectionPointContainer, ppvObject) == COM.S_OK) {
IConnectionPointContainer cpc = new IConnectionPointContainer(ppvObject[0]);
- long /*int*/[] ppCP = new long /*int*/[1];
+ long[] ppCP = new long[1];
if (cpc.FindConnectionPoint(eventGuid, ppCP) == COM.S_OK) {
IConnectionPoint cp = new IConnectionPoint(ppCP[0]);
int[] pCookie = new int[1];
@@ -67,22 +67,22 @@ int AddRef() {
private void createCOMInterfaces() {
iDispatch = new COMObject(new int[]{2, 0, 0, 1, 3, 4, 8}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
// method3 GetTypeInfoCount - not implemented
// method4 GetTypeInfo - not implemented
// method5 GetIDsOfNames - not implemented
@Override
- public long /*int*/ method6(long /*int*/[] args) {return Invoke((int)/*64*/args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], args[4], args[5], args[6], args[7]);}
+ public long method6(long[] args) {return Invoke((int)args[0], args[1], (int)args[2], (int)args[3], args[4], args[5], args[6], args[7]);}
};
}
void disconnect() {
// disconnect event sink
if (eventCookie != 0 && objIUnknown != null) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIConnectionPointContainer, ppvObject) == COM.S_OK) {
IConnectionPointContainer cpc = new IConnectionPointContainer(ppvObject[0]);
if (cpc.FindConnectionPoint(eventGuid, ppvObject) == COM.S_OK) {
@@ -102,7 +102,7 @@ private void disposeCOMInterfaces() {
iDispatch = null;
}
-private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*int*/ pDispParams, long /*int*/ pVarResult, long /*int*/ pExcepInfo, long /*int*/ pArgErr)
+private int Invoke(int dispIdMember, long riid, int lcid, int dwFlags, long pDispParams, long pVarResult, long pExcepInfo, long pArgErr)
{
if (eventTable == null || !eventTable.hooks(dispIdMember)) return COM.S_OK;
@@ -114,7 +114,7 @@ private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, l
COM.MoveMemory(dispParams, pDispParams, DISPPARAMS.sizeof);
eventInfo = new Variant[dispParams.cArgs];
int size = VARIANT.sizeof;
- long /*int*/ offset = (dispParams.cArgs - 1) * size;
+ long offset = (dispParams.cArgs - 1) * size;
for (int j = 0; j < dispParams.cArgs; j++){
eventInfo[j] = new Variant();
@@ -128,8 +128,8 @@ private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, l
notifyListener(dispIdMember,event);
if (eventInfo != null) {
- for (int j = 0; j < eventInfo.length; j++){
- eventInfo[j].dispose();
+ for (Variant element : eventInfo) {
+ element.dispose();
}
}
@@ -159,7 +159,7 @@ private void notifyListener (int eventType, OleEvent event) {
event.widget = widget;
eventTable.sendEvent (event);
}
-private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+private int QueryInterface(long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
@@ -168,12 +168,12 @@ private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
if ( COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch) ||
COM.IsEqualGUID(guid, eventGuid)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
AddRef();
return OLE.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
int Release() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventTable.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventTable.java
index 41947f4435..2b47969c11 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventTable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventTable.java
@@ -45,8 +45,8 @@ void hook (int eventType, OleListener handler) {
}
boolean hooks (int eventType) {
if (handlers == null) return false;
- for (int i=0; i<types.length; i++) {
- if (types [i] == eventType) return true;
+ for (int type : types) {
+ if (type == eventType) return true;
}
return false;
}
@@ -70,8 +70,8 @@ void unhook (int eventType, OleListener handler) {
}
}
boolean hasEntries() {
- for (int i=0; i<types.length; i++) {
- if (types[i] != 0) return true;
+ for (int type : types) {
+ if (type != 0) return true;
}
return false;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java
index 5fd0d11a77..6456cb5ae1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -46,7 +46,6 @@ import org.eclipse.swt.widgets.*;
final public class OleFrame extends Composite
{
// Interfaces for this Ole Client Container
- private COMObject iUnknown;
private COMObject iOleInPlaceFrame;
// Access to the embedded/linked Ole Object
@@ -62,10 +61,10 @@ final public class OleFrame extends Composite
private Listener listener;
- private long /*int*/ shellHandle;
- private long /*int*/ oldMenuHandle;
- private long /*int*/ newMenuHandle;
- private static long /*int*/ lastActivatedMenuHandle;
+ private long shellHandle;
+ private long oldMenuHandle;
+ private long newMenuHandle;
+ private static long lastActivatedMenuHandle;
private static String CHECK_FOCUS = "OLE_CHECK_FOCUS"; //$NON-NLS-1$
private static String HHOOK = "OLE_HHOOK"; //$NON-NLS-1$
@@ -140,9 +139,9 @@ private static void initCheckFocus (final Display display) {
timer[0] = () -> {
if (lastFocus[0] instanceof OleClientSite && !lastFocus[0].isDisposed()) {
// ignore popup menus and dialogs
- long /*int*/ hwnd = OS.GetFocus();
+ long hwnd = OS.GetFocus();
while (hwnd != 0) {
- long /*int*/ ownerHwnd = OS.GetWindow(hwnd, OS.GW_OWNER);
+ long ownerHwnd = OS.GetWindow(hwnd, OS.GW_OWNER);
if (ownerHwnd != 0) {
display.timerExec(time, timer[0]);
return;
@@ -174,10 +173,9 @@ private static void initCheckFocus (final Display display) {
private static void initMsgHook(Display display) {
if (display.getData(HHOOK) != null) return;
final Callback callback = new Callback(OleFrame.class, "getMsgProc", 3); //$NON-NLS-1$
- long /*int*/ address = callback.getAddress();
- if (address == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
+ long address = callback.getAddress();
int threadId = OS.GetCurrentThreadId();
- final long /*int*/ hHook = OS.SetWindowsHookEx(OS.WH_GETMESSAGE, address, 0, threadId);
+ final long hHook = OS.SetWindowsHookEx(OS.WH_GETMESSAGE, address, 0, threadId);
if (hHook == 0) {
callback.dispose();
return;
@@ -189,13 +187,13 @@ private static void initMsgHook(Display display) {
if (callback != null) callback.dispose();
});
}
-static long /*int*/ getMsgProc(long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
+static long getMsgProc(long code, long wParam, long lParam) {
Display display = Display.getCurrent();
if (display == null) return 0;
LONG hHook = (LONG)display.getData(HHOOK);
if (hHook == null) return 0;
if (code < 0 || (wParam & OS.PM_REMOVE) == 0) {
- return OS.CallNextHookEx(hHook.value, (int)/*64*/code, wParam, lParam);
+ return OS.CallNextHookEx(hHook.value, (int)code, wParam, lParam);
}
MSG msg = (MSG)display.getData(HHOOKMSG);
OS.MoveMemory(msg, lParam, MSG.sizeof);
@@ -203,13 +201,13 @@ static long /*int*/ getMsgProc(long /*int*/ code, long /*int*/ wParam, long /*in
if (OS.WM_KEYFIRST <= message && message <= OS.WM_KEYLAST) {
if (display != null) {
Widget widget = null;
- long /*int*/ hwnd = msg.hwnd;
+ long hwnd = msg.hwnd;
while (hwnd != 0) {
widget = display.findWidget (hwnd);
if (widget != null) break;
hwnd = OS.GetParent (hwnd);
}
- if (widget != null && widget instanceof OleClientSite) {
+ if (widget instanceof OleClientSite) {
OleClientSite site = (OleClientSite)widget;
if (site.handle == hwnd) {
boolean consumed = false;
@@ -236,7 +234,7 @@ static long /*int*/ getMsgProc(long /*int*/ code, long /*int*/ wParam, long /*in
switch (msg.message) {
case OS.WM_KEYDOWN:
case OS.WM_SYSKEYDOWN: {
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -245,12 +243,12 @@ static long /*int*/ getMsgProc(long /*int*/ code, long /*int*/ wParam, long /*in
case OS.VK_SCROLL:
break;
default: {
- int mapKey = OS.MapVirtualKey ((int)/*64*/msg.wParam, 2);
+ int mapKey = OS.MapVirtualKey ((int)msg.wParam, 2);
if (mapKey != 0) {
accentKey = (mapKey & 0x80000000) != 0;
if (!accentKey) {
- for (int i=0; i<ACCENTS.length; i++) {
- int value = OS.VkKeyScan (ACCENTS [i]);
+ for (short element : ACCENTS) {
+ int value = OS.VkKeyScan (element);
if (value != -1 && (value & 0xFF) == msg.wParam) {
int state = value >> 8;
if ((OS.GetKeyState (OS.VK_SHIFT) < 0) == ((state & 0x1) != 0) &&
@@ -271,7 +269,7 @@ static long /*int*/ getMsgProc(long /*int*/ code, long /*int*/ wParam, long /*in
}
/* Allow OleClientSite to process key events before activeX control */
if (!consumed && !accentKey && !ignoreNextKey) {
- long /*int*/ hwndOld = msg.hwnd;
+ long hwndOld = msg.hwnd;
msg.hwnd = site.handle;
consumed = OS.DispatchMessage (msg) == 1;
msg.hwnd = hwndOld;
@@ -279,7 +277,7 @@ static long /*int*/ getMsgProc(long /*int*/ code, long /*int*/ wParam, long /*in
switch (msg.message) {
case OS.WM_KEYDOWN:
case OS.WM_SYSKEYDOWN: {
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -307,7 +305,7 @@ static long /*int*/ getMsgProc(long /*int*/ code, long /*int*/ wParam, long /*in
}
}
}
- return OS.CallNextHookEx(hHook.value, (int)/*64*/code, wParam, lParam);
+ return OS.CallNextHookEx(hHook.value, (int)code, wParam, lParam);
}
/**
* Increment the count of references to this instance
@@ -322,58 +320,43 @@ private int ContextSensitiveHelp(int fEnterMode) {
return COM.S_OK;
}
private void createCOMInterfaces() {
- // Create each of the interfaces that this object implements
- iUnknown = new COMObject(new int[]{2, 0, 0}){
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- };
-
iOleInPlaceFrame = new COMObject(new int[]{2, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 1, 1, 1, 2}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return GetWindow(args[0]);}
+ public long method3(long[] args) {return GetWindow(args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return ContextSensitiveHelp((int)/*64*/args[0]);}
+ public long method4(long[] args) {return ContextSensitiveHelp((int)args[0]);}
@Override
- public long /*int*/ method5(long /*int*/[] args) {return GetBorder(args[0]);}
+ public long method5(long[] args) {return GetBorder(args[0]);}
@Override
- public long /*int*/ method6(long /*int*/[] args) {return RequestBorderSpace(args[0]);}
+ public long method6(long[] args) {return RequestBorderSpace(args[0]);}
@Override
- public long /*int*/ method7(long /*int*/[] args) {return SetBorderSpace(args[0]);}
+ public long method7(long[] args) {return SetBorderSpace(args[0]);}
@Override
- public long /*int*/ method8(long /*int*/[] args) {return SetActiveObject(args[0], args[1]);}
+ public long method8(long[] args) {return SetActiveObject(args[0], args[1]);}
@Override
- public long /*int*/ method9(long /*int*/[] args) {return InsertMenus(args[0], args[1]);}
+ public long method9(long[] args) {return InsertMenus(args[0], args[1]);}
@Override
- public long /*int*/ method10(long /*int*/[] args) {return SetMenu(args[0], args[1], args[2]);}
+ public long method10(long[] args) {return SetMenu(args[0], args[1], args[2]);}
@Override
- public long /*int*/ method11(long /*int*/[] args) {return RemoveMenus(args[0]);}
+ public long method11(long[] args) {return RemoveMenus(args[0]);}
// method12 SetStatusText - not implemented
// method13 EnableModeless - not implemented
@Override
- public long /*int*/ method14(long /*int*/[] args) {return TranslateAccelerator(args[0], (int)/*64*/args[1]);}
+ public long method14(long[] args) {return TranslateAccelerator(args[0], (int)args[1]);}
};
}
private void disposeCOMInterfaces () {
-
- if (iUnknown != null)
- iUnknown.dispose();
- iUnknown = null;
-
if (iOleInPlaceFrame != null)
iOleInPlaceFrame.dispose();
iOleInPlaceFrame = null;
}
-private int GetBorder(long /*int*/ lprectBorder) {
+private int GetBorder(long lprectBorder) {
/*
The IOleInPlaceUIWindow::GetBorder function, when called on a document or frame window
object, returns the outer rectangle (relative to the window) where the object can put
@@ -422,11 +405,11 @@ public MenuItem[] getContainerMenus(){
public MenuItem[] getFileMenus(){
return fileMenuItems;
}
-long /*int*/ getIOleInPlaceFrame() {
+long getIOleInPlaceFrame() {
return iOleInPlaceFrame.getAddress();
}
-private long /*int*/ getMenuItemID(long /*int*/ hMenu, int index) {
- long /*int*/ id = 0;
+private long getMenuItemID(long hMenu, int index) {
+ long id = 0;
MENUITEMINFO lpmii = new MENUITEMINFO();
lpmii.cbSize = MENUITEMINFO.sizeof;
lpmii.fMask = OS.MIIM_STATE | OS.MIIM_SUBMENU | OS.MIIM_ID;
@@ -438,9 +421,9 @@ private long /*int*/ getMenuItemID(long /*int*/ hMenu, int index) {
}
return id;
}
-private int GetWindow(long /*int*/ phwnd) {
+private int GetWindow(long phwnd) {
if (phwnd != 0) {
- OS.MoveMemory(phwnd, new long /*int*/[] {handle}, C.PTR_SIZEOF);
+ OS.MoveMemory(phwnd, new long[] {handle}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -462,22 +445,22 @@ private int GetWindow(long /*int*/ phwnd) {
public MenuItem[] getWindowMenus(){
return windowMenuItems;
}
-private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) {
+private int InsertMenus(long hmenuShared, long lpMenuWidths) {
// locate menu bar
Menu menubar = getShell().getMenuBar();
if (menubar == null || menubar.isDisposed()) {
OS.MoveMemory(lpMenuWidths, new int[] {0}, 4);
return COM.S_OK;
}
- long /*int*/ hMenu = menubar.handle;
+ long hMenu = menubar.handle;
// Create a holder for menu information. This will be passed down to
// the OS and the OS will fill in the requested information for each menu.
MENUITEMINFO lpmii = new MENUITEMINFO();
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
int cch = 128;
int byteCount = cch * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
lpmii.cbSize = MENUITEMINFO.sizeof;
lpmii.fMask = OS.MIIM_STATE | OS.MIIM_ID | OS.MIIM_TYPE | OS.MIIM_SUBMENU | OS.MIIM_DATA;
lpmii.dwTypeData = pszText;
@@ -488,8 +471,7 @@ private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) {
int fileMenuCount = 0;
int newindex = 0;
if (this.fileMenuItems != null) {
- for (int i = 0; i < this.fileMenuItems.length; i++) {
- MenuItem item = this.fileMenuItems[i];
+ for (MenuItem item : this.fileMenuItems) {
if (item != null) {
int index = item.getParent().indexOf(item);
lpmii.cch = cch; // lpmii.cch gets updated by GetMenuItemInfo to indicate the
@@ -513,8 +495,7 @@ private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) {
// item from the OS.
int containerMenuCount = 0;
if (this.containerMenuItems != null) {
- for (int i = 0; i < this.containerMenuItems.length; i++) {
- MenuItem item = this.containerMenuItems[i];
+ for (MenuItem item : this.containerMenuItems) {
if (item != null) {
int index = item.getParent().indexOf(item);
lpmii.cch = cch; // lpmii.cch gets updated by GetMenuItemInfo to indicate the
@@ -538,8 +519,7 @@ private int InsertMenus(long /*int*/ hmenuShared, long /*int*/ lpMenuWidths) {
// item from the OS.
int windowMenuCount = 0;
if (this.windowMenuItems != null) {
- for (int i = 0; i < this.windowMenuItems.length; i++) {
- MenuItem item = this.windowMenuItems[i];
+ for (MenuItem item : this.windowMenuItems) {
if (item != null) {
int index = item.getParent().indexOf(item);
lpmii.cch = cch; // lpmii.cch gets updated by GetMenuItemInfo to indicate the
@@ -604,19 +584,19 @@ private void onResize(Event e) {
objIOleInPlaceActiveObject.ResizeBorder(lpRect, iOleInPlaceFrame.getAddress(), true);
}
}
-private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+private int QueryInterface(long riid, long ppvObject) {
// implements IUnknown, IOleInPlaceFrame, IOleContainer, IOleInPlaceUIWindow
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIOleInPlaceFrame) ) {
- OS.MoveMemory(ppvObject, new long /*int*/ [] {iOleInPlaceFrame.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long [] {iOleInPlaceFrame.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/ [] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long [] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
/**
@@ -640,58 +620,55 @@ private void releaseObjectInterfaces() {
}
objIOleInPlaceActiveObject = null;
}
-private int RemoveMenus(long /*int*/ hmenuShared) {
+private int RemoveMenus(long hmenuShared) {
Menu menubar = getShell().getMenuBar();
if (menubar == null || menubar.isDisposed()) return COM.S_FALSE;
- long /*int*/ hMenu = menubar.handle;
+ long hMenu = menubar.handle;
List<LONG> ids = new ArrayList<>();
if (this.fileMenuItems != null) {
- for (int i = 0; i < this.fileMenuItems.length; i++) {
- MenuItem item = this.fileMenuItems[i];
+ for (MenuItem item : this.fileMenuItems) {
if (item != null && !item.isDisposed()) {
int index = item.getParent().indexOf(item);
// get Id from original menubar
- long /*int*/ id = getMenuItemID(hMenu, index);
+ long id = getMenuItemID(hMenu, index);
ids.add(new LONG(id));
}
}
}
if (this.containerMenuItems != null) {
- for (int i = 0; i < this.containerMenuItems.length; i++) {
- MenuItem item = this.containerMenuItems[i];
+ for (MenuItem item : this.containerMenuItems) {
if (item != null && !item.isDisposed()) {
int index = item.getParent().indexOf(item);
- long /*int*/ id = getMenuItemID(hMenu, index);
+ long id = getMenuItemID(hMenu, index);
ids.add(new LONG(id));
}
}
}
if (this.windowMenuItems != null) {
- for (int i = 0; i < this.windowMenuItems.length; i++) {
- MenuItem item = this.windowMenuItems[i];
+ for (MenuItem item : this.windowMenuItems) {
if (item != null && !item.isDisposed()) {
int index = item.getParent().indexOf(item);
- long /*int*/ id = getMenuItemID(hMenu, index);
+ long id = getMenuItemID(hMenu, index);
ids.add(new LONG(id));
}
}
}
int index = OS.GetMenuItemCount(hmenuShared) - 1;
for (int i = index; i >= 0; i--) {
- long /*int*/ id = getMenuItemID(hmenuShared, i);
+ long id = getMenuItemID(hmenuShared, i);
if (ids.contains(new LONG(id))){
OS.RemoveMenu(hmenuShared, i, OS.MF_BYPOSITION);
}
}
return COM.S_OK;
}
-private int RequestBorderSpace(long /*int*/ pborderwidths) {
+private int RequestBorderSpace(long pborderwidths) {
return COM.S_OK;
}
-int SetActiveObject(long /*int*/ pActiveObject, long /*int*/ pszObjName) {
+int SetActiveObject(long pActiveObject, long pszObjName) {
if (objIOleInPlaceActiveObject != null) {
objIOleInPlaceActiveObject.Release();
objIOleInPlaceActiveObject = null;
@@ -703,7 +680,7 @@ int SetActiveObject(long /*int*/ pActiveObject, long /*int*/ pszObjName) {
return COM.S_OK;
}
-private int SetBorderSpace(long /*int*/ pborderwidths) {
+private int SetBorderSpace(long pborderwidths) {
// A Control/Document can :
// Use its own toolbars, requesting border space of a specific size, or,
// Use no toolbars, but force the container to remove its toolbars by passing a
@@ -771,8 +748,8 @@ void setCurrentDocument(OleClientSite doc) {
public void setFileMenus(MenuItem[] fileMenus){
fileMenuItems = fileMenus;
}
-private int SetMenu(long /*int*/ hmenuShared, long /*int*/ holemenu, long /*int*/ hwndActiveObject) {
- long /*int*/ inPlaceActiveObject = 0;
+private int SetMenu(long hmenuShared, long holemenu, long hwndActiveObject) {
+ long inPlaceActiveObject = 0;
if (objIOleInPlaceActiveObject != null)
inPlaceActiveObject = objIOleInPlaceActiveObject.getAddress();
@@ -781,7 +758,7 @@ private int SetMenu(long /*int*/ hmenuShared, long /*int*/ holemenu, long /*int*
return COM.OleSetMenuDescriptor(0, getShell().handle, hwndActiveObject, iOleInPlaceFrame.getAddress(), inPlaceActiveObject);
}
- long /*int*/ handle = menubar.getShell().handle;
+ long handle = menubar.getShell().handle;
if (hmenuShared == 0 && holemenu == 0) {
// re-instate the original menu - this occurs on deactivation
@@ -821,14 +798,14 @@ private boolean translateOleAccelerator(MSG msg) {
int result = objIOleInPlaceActiveObject.TranslateAccelerator(msg);
return (result != COM.S_FALSE && result != COM.E_NOTIMPL);
}
-private int TranslateAccelerator(long /*int*/ lpmsg, int wID){
+private int TranslateAccelerator(long lpmsg, int wID){
Menu menubar = getShell().getMenuBar();
if (menubar == null || menubar.isDisposed() || !menubar.isEnabled()) return COM.S_FALSE;
if (wID < 0) return COM.S_FALSE;
Shell shell = menubar.getShell();
- long /*int*/ hwnd = shell.handle;
- long /*int*/ hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);
+ long hwnd = shell.handle;
+ long hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);
if (hAccel == 0) return COM.S_FALSE;
MSG msg = new MSG();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java
index e866b2660d..917dd2c1f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OlePropertyChangeSink.java
@@ -24,7 +24,6 @@ final class OlePropertyChangeSink {
private OleControlSite controlSite;
//private IUnknown objIUnknown;
- private COMObject iUnknown;
private COMObject iPropertyNotifySink;
private int refCount;
@@ -51,7 +50,7 @@ int AddRef() {
void connect(IUnknown objIUnknown) {
// Set up property change notification sink
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIConnectionPointContainer, ppvObject) == COM.S_OK) {
IConnectionPointContainer cpc = new IConnectionPointContainer(ppvObject[0]);
if (cpc.FindConnectionPoint(COM.IIDIPropertyNotifySink, ppvObject) == COM.S_OK) {
@@ -66,34 +65,24 @@ void connect(IUnknown objIUnknown) {
}
}
private void createCOMInterfaces() {
- // register each of the interfaces that this object implements
- iUnknown = new COMObject(new int[]{2, 0, 0}){
- @Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
- };
-
iPropertyNotifySink = new COMObject(new int[]{2, 0, 0, 1, 1}){
@Override
- public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
+ public long method0(long[] args) {return QueryInterface(args[0], args[1]);}
@Override
- public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
+ public long method1(long[] args) {return AddRef();}
@Override
- public long /*int*/ method2(long /*int*/[] args) {return Release();}
+ public long method2(long[] args) {return Release();}
@Override
- public long /*int*/ method3(long /*int*/[] args) {return OnChanged((int)/*64*/args[0]);}
+ public long method3(long[] args) {return OnChanged((int)args[0]);}
@Override
- public long /*int*/ method4(long /*int*/[] args) {return OnRequestEdit((int)/*64*/args[0]);}
+ public long method4(long[] args) {return OnRequestEdit((int)args[0]);}
};
}
void disconnect(IUnknown objIUnknown) {
// disconnect property notification sink
if (propertyCookie != 0 && objIUnknown != null) {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
if (objIUnknown.QueryInterface(COM.IIDIConnectionPointContainer, ppvObject) == COM.S_OK) {
IConnectionPointContainer cpc = new IConnectionPointContainer(ppvObject[0]);
if (cpc.FindConnectionPoint(COM.IIDIPropertyNotifySink, ppvObject) == COM.S_OK) {
@@ -108,8 +97,6 @@ void disconnect(IUnknown objIUnknown) {
}
}
private void disposeCOMInterfaces() {
- if (iUnknown != null) iUnknown.dispose();
- iUnknown = null;
if (iPropertyNotifySink != null) iPropertyNotifySink.dispose();
iPropertyNotifySink = null;
}
@@ -152,22 +139,17 @@ private int OnRequestEdit(int dispID) {
notifyListener(dispID,event);
return (event.doit) ? COM.S_OK : COM.S_FALSE;
}
-private int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
+private int QueryInterface(long riid, long ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
- if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iUnknown.getAddress()}, C.PTR_SIZEOF);
- AddRef();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID(guid, COM.IIDIPropertyNotifySink)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iPropertyNotifySink.getAddress()}, C.PTR_SIZEOF);
+ if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIPropertyNotifySink)) {
+ OS.MoveMemory(ppvObject, new long[] {iPropertyNotifySink.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
int Release() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java
index dd4f0d6a2e..c75a3bccb4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java
@@ -41,7 +41,7 @@ public final class Variant {
private float floatData;
private double doubleData;
private String stringData;
- private long /*int*/ byRefPtr;
+ private long byRefPtr;
private IDispatch dispatchData;
private IUnknown unknownData;
@@ -74,7 +74,7 @@ public final class Variant {
*
* @since 3.3
*/
-public static void win32_copy (long /*int*/ pVarDest, Variant varSrc) {
+public static void win32_copy (long pVarDest, Variant varSrc) {
varSrc.getData (pVarDest);
}
@@ -97,7 +97,7 @@ public static void win32_copy (long /*int*/ pVarDest, Variant varSrc) {
*
* @since 3.3
*/
-public static Variant win32_new (long /*int*/ pVariant) {
+public static Variant win32_new (long pVariant) {
Variant variant = new Variant ();
variant.setData (pVariant);
return variant;
@@ -154,7 +154,7 @@ public Variant(double val) {
* @param byRefType the type of the data being transferred such as OLE.VT_BSTR | OLE.VT_BYREF
*
*/
-public Variant(long /*int*/ ptr, short byRefType) {
+public Variant(long ptr, short byRefType) {
type = byRefType;
byRefPtr = ptr;
}
@@ -281,8 +281,8 @@ public OleAutomation getAutomation() {
return new OleAutomation(dispatchData);
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_DISPATCH);
@@ -324,8 +324,8 @@ public IDispatch getDispatch() {
return dispatchData;
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_DISPATCH);
@@ -366,8 +366,8 @@ public boolean getBoolean() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_BOOL);
@@ -391,7 +391,7 @@ public boolean getBoolean() {
* @return a pointer to the referenced data represented by this Variant or 0
*
*/
-public long /*int*/ getByRef() {
+public long getByRef() {
if (type == COM.VT_EMPTY) {
OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, -1);
}
@@ -424,8 +424,8 @@ public byte getByte() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_I1);
@@ -464,8 +464,8 @@ public char getChar() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_UI2);
@@ -481,7 +481,7 @@ public char getChar() {
OS.GlobalFree(newPtr);
}
}
-void getData(long /*int*/ pData){
+void getData(long pData){
if (pData == 0) OLE.error(OLE.ERROR_OUT_OF_MEMORY);
COM.VariantInit(pData);
@@ -489,14 +489,14 @@ void getData(long /*int*/ pData){
if ((type & COM.VT_BYREF) == COM.VT_BYREF) {
//TODO - use VARIANT structure
OS.MoveMemory(pData, new short[] {type}, 2);
- OS.MoveMemory(pData + 8, new long /*int*/[]{byRefPtr}, C.PTR_SIZEOF);
+ OS.MoveMemory(pData + 8, new long[]{byRefPtr}, C.PTR_SIZEOF);
return;
}
switch (type) {
case COM.VT_EMPTY :
case COM.VT_NULL :
- OS.MoveMemory(pData, new short[] {type}, 2);
+ OS.MoveMemory(pData, new short[] {type}, 2);
break;
case COM.VT_BOOL :
OS.MoveMemory(pData, new short[] {type}, 2);
@@ -533,18 +533,18 @@ void getData(long /*int*/ pData){
case COM.VT_DISPATCH :
dispatchData.AddRef();
OS.MoveMemory(pData, new short[] {type}, 2);
- OS.MoveMemory(pData + 8, new long /*int*/[]{dispatchData.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(pData + 8, new long[]{dispatchData.getAddress()}, C.PTR_SIZEOF);
break;
case COM.VT_UNKNOWN :
unknownData.AddRef();
OS.MoveMemory(pData, new short[] {type}, 2);
- OS.MoveMemory(pData + 8, new long /*int*/[]{unknownData.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(pData + 8, new long[]{unknownData.getAddress()}, C.PTR_SIZEOF);
break;
case COM.VT_BSTR :
OS.MoveMemory(pData, new short[] {type}, 2);
char[] data = (stringData+"\0").toCharArray();
- long /*int*/ ptr = COM.SysAllocString(data);
- OS.MoveMemory(pData + 8, new long /*int*/[] {ptr}, C.PTR_SIZEOF);
+ long ptr = COM.SysAllocString(data);
+ OS.MoveMemory(pData + 8, new long[] {ptr}, C.PTR_SIZEOF);
break;
default :
@@ -566,30 +566,30 @@ void getData(long /*int*/ pData){
* @since 3.2
*/
public double getDouble() {
- if (type == COM.VT_EMPTY) {
- OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, -1);
- }
- if (type == COM.VT_R8) {
- return doubleData;
- }
+ if (type == COM.VT_EMPTY) {
+ OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, -1);
+ }
+ if (type == COM.VT_R8) {
+ return doubleData;
+ }
- // try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- try {
- getData(oldPtr);
- int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_R8);
- if (result != COM.S_OK)
- OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, result);
- Variant doubleVar = new Variant();
- doubleVar.setData(newPtr);
- return doubleVar.getDouble();
- } finally {
- COM.VariantClear(oldPtr);
- OS.GlobalFree(oldPtr);
- COM.VariantClear(newPtr);
- OS.GlobalFree(newPtr);
- }
+ // try to coerce the value to the desired type
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ try {
+ getData(oldPtr);
+ int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_R8);
+ if (result != COM.S_OK)
+ OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, result);
+ Variant doubleVar = new Variant();
+ doubleVar.setData(newPtr);
+ return doubleVar.getDouble();
+ } finally {
+ COM.VariantClear(oldPtr);
+ OS.GlobalFree(oldPtr);
+ COM.VariantClear(newPtr);
+ OS.GlobalFree(newPtr);
+ }
}
/**
@@ -613,8 +613,8 @@ public float getFloat() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_R4);
@@ -652,8 +652,8 @@ public int getInt() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_I4);
@@ -692,8 +692,8 @@ public long getLong() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_I8);
@@ -730,8 +730,8 @@ public short getShort() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_I2);
@@ -769,8 +769,8 @@ public String getString() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_BSTR);
@@ -823,8 +823,8 @@ public IUnknown getUnknown() {
}
// try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
try {
getData(oldPtr);
int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_UNKNOWN);
@@ -890,13 +890,11 @@ public void setByRef(float val) {
*
* @since 2.1
*/
-public void setByRef(long /*int*/ val) {
- if ((type & COM.VT_BYREF) == 0
- || (C.PTR_SIZEOF == 4 && (type & COM.VT_I4) == 0)
- || (C.PTR_SIZEOF == 8 && (type & COM.VT_I8) == 0)) {
+public void setByRef(long val) {
+ if ((type & COM.VT_BYREF) == 0 || (type & COM.VT_I8) == 0) {
OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE);
}
- OS.MoveMemory(byRefPtr, new long /*int*/[]{val}, C.PTR_SIZEOF);
+ OS.MoveMemory(byRefPtr, new long[]{val}, C.PTR_SIZEOF);
}
/**
* Update the by reference value of this variant with a new short value.
@@ -915,7 +913,7 @@ public void setByRef(short val) {
}
OS.MoveMemory(byRefPtr, new short[]{val}, 2);
}
-void setData(long /*int*/ pData){
+void setData(long pData){
if (pData == 0) OLE.error(SWT.ERROR_INVALID_ARGUMENT);
//TODO - use VARIANT structure
@@ -924,7 +922,7 @@ void setData(long /*int*/ pData){
type = dataType[0];
if ((type & COM.VT_BYREF) == COM.VT_BYREF) {
- long /*int*/[] newByRefPtr = new long /*int*/[1];
+ long[] newByRefPtr = new long[1];
OS.MoveMemory(newByRefPtr, pData + 8, C.PTR_SIZEOF);
byRefPtr = newByRefPtr[0];
return;
@@ -972,10 +970,10 @@ void setData(long /*int*/ pData){
case COM.VT_R8 :
double[] newDoubleData = new double[1];
OS.MoveMemory(newDoubleData, pData + 8, 8);
- doubleData = newDoubleData[0];
+ doubleData = newDoubleData[0];
break;
case COM.VT_DISPATCH : {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
OS.MoveMemory(ppvObject, pData + 8, C.PTR_SIZEOF);
if (ppvObject[0] == 0) {
type = COM.VT_EMPTY;
@@ -986,7 +984,7 @@ void setData(long /*int*/ pData){
break;
}
case COM.VT_UNKNOWN : {
- long /*int*/[] ppvObject = new long /*int*/[1];
+ long[] ppvObject = new long[1];
OS.MoveMemory(ppvObject, pData + 8, C.PTR_SIZEOF);
if (ppvObject[0] == 0) {
type = COM.VT_EMPTY;
@@ -998,7 +996,7 @@ void setData(long /*int*/ pData){
}
case COM.VT_BSTR :
// get the address of the memory in which the string resides
- long /*int*/[] hMem = new long /*int*/[1];
+ long[] hMem = new long[1];
OS.MoveMemory(hMem, pData + 8, C.PTR_SIZEOF);
if (hMem[0] == 0) {
type = COM.VT_EMPTY;
@@ -1019,7 +1017,7 @@ void setData(long /*int*/ pData){
default :
// try coercing it into one of the known forms
- long /*int*/ newPData = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, sizeof);
+ long newPData = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, sizeof);
if (COM.VariantChangeType(newPData, pData, (short) 0, COM.VT_R8) == COM.S_OK) {
setData(newPData);
} else if (COM.VariantChangeType(newPData, pData, (short) 0, COM.VT_I8) == COM.S_OK) {
@@ -1040,37 +1038,37 @@ void setData(long /*int*/ pData){
*/
@Override
public String toString () {
- switch (type) {
- case COM.VT_BOOL :
- return "VT_BOOL{"+booleanData+"}";
- case COM.VT_I1 :
- return "VT_I1{"+byteData+"}";
- case COM.VT_I2 :
- return "VT_I2{"+shortData+"}";
- case COM.VT_UI2 :
- return "VT_UI2{"+charData+"}";
- case COM.VT_I4 :
- return "VT_I4{"+intData+"}";
- case COM.VT_I8 :
- return "VT_I8{"+longData+"}";
- case COM.VT_R4 :
- return "VT_R4{"+floatData+"}";
- case COM.VT_R8 :
- return "VT_R8{"+doubleData+"}";
- case COM.VT_BSTR :
- return "VT_BSTR{"+stringData+"}";
- case COM.VT_DISPATCH :
- return "VT_DISPATCH{"+(dispatchData == null ? 0 : dispatchData.getAddress())+"}";
- case COM.VT_UNKNOWN :
- return "VT_UNKNOWN{"+(unknownData == null ? 0 : unknownData.getAddress())+"}";
- case COM.VT_EMPTY :
- return "VT_EMPTY";
- case COM.VT_NULL :
- return "VT_NULL";
- }
- if ((type & COM.VT_BYREF) != 0) {
- return "VT_BYREF|"+(type & ~COM.VT_BYREF)+"{"+byRefPtr+"}";
- }
- return "Unsupported Type "+type;
+ switch (type) {
+ case COM.VT_BOOL :
+ return "VT_BOOL{"+booleanData+"}";
+ case COM.VT_I1 :
+ return "VT_I1{"+byteData+"}";
+ case COM.VT_I2 :
+ return "VT_I2{"+shortData+"}";
+ case COM.VT_UI2 :
+ return "VT_UI2{"+charData+"}";
+ case COM.VT_I4 :
+ return "VT_I4{"+intData+"}";
+ case COM.VT_I8 :
+ return "VT_I8{"+longData+"}";
+ case COM.VT_R4 :
+ return "VT_R4{"+floatData+"}";
+ case COM.VT_R8 :
+ return "VT_R8{"+doubleData+"}";
+ case COM.VT_BSTR :
+ return "VT_BSTR{"+stringData+"}";
+ case COM.VT_DISPATCH :
+ return "VT_DISPATCH{"+(dispatchData == null ? 0 : dispatchData.getAddress())+"}";
+ case COM.VT_UNKNOWN :
+ return "VT_UNKNOWN{"+(unknownData == null ? 0 : unknownData.getAddress())+"}";
+ case COM.VT_EMPTY :
+ return "VT_EMPTY";
+ case COM.VT_NULL :
+ return "VT_NULL";
+ }
+ if ((type & COM.VT_BYREF) != 0) {
+ return "VT_BYREF|"+(type & ~COM.VT_BYREF)+"{"+byRefPtr+"}";
+ }
+ return "Unsupported Type "+type;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java
index 1317bcfd06..0197cf7e37 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java
@@ -155,14 +155,14 @@ public GLCanvas (Composite parent, int style, GLData data) {
public GLData getGLData () {
checkWidget ();
GLData data = new GLData ();
- long /*int*/ [] value = new long /*int*/ [1];
+ long [] value = new long [1];
pixelFormat.getValues(value, OS.NSOpenGLPFADoubleBuffer, 0);
data.doubleBuffer = value [0] != 0;
pixelFormat.getValues(value, OS.NSOpenGLPFAStereo, 0);
data.stereo = value [0] != 0;
pixelFormat.getValues(value, OS.NSOpenGLPFAAlphaSize, 0);
- data.alphaSize = (int/*64*/)value [0];
+ data.alphaSize = (int)value [0];
/*
* Feature in Cocoa: NSOpenGL/CoreOpenGL only supports specifying the total number of bits
@@ -171,16 +171,16 @@ public GLData getGLData () {
*/
pixelFormat.getValues(value, OS.NSOpenGLPFAColorSize, 0);
- int colorSize = ((int/*64*/)(value[0] - data.alphaSize)) / 3;
+ int colorSize = ((int)(value[0] - data.alphaSize)) / 3;
data.redSize = colorSize;
data.greenSize = colorSize;
data.blueSize = colorSize;
pixelFormat.getValues(value, OS.NSOpenGLPFADepthSize, 0);
- data.depthSize = (int/*64*/)value [0];
+ data.depthSize = (int)value [0];
pixelFormat.getValues(value, OS.NSOpenGLPFAStencilSize, 0);
- data.stencilSize = (int/*64*/)value [0];
+ data.stencilSize = (int)value [0];
/*
* Feature(?) in Cocoa: NSOpenGL/CoreOpenGL doesn't support setting an accumulation buffer alpha, but
@@ -189,16 +189,16 @@ public GLData getGLData () {
*/
pixelFormat.getValues(value, OS.NSOpenGLPFAAccumSize, 0);
- int accumColorSize = (int/*64*/)(value[0]) / 4;
+ int accumColorSize = (int)(value[0]) / 4;
data.accumRedSize = accumColorSize;
data.accumGreenSize = accumColorSize;
data.accumBlueSize = accumColorSize;
data.accumAlphaSize = accumColorSize;
pixelFormat.getValues(value, OS.NSOpenGLPFASampleBuffers, 0);
- data.sampleBuffers = (int/*64*/)value [0];
+ data.sampleBuffers = (int)value [0];
pixelFormat.getValues(value, OS.NSOpenGLPFASamples, 0);
- data.samples = (int/*64*/)value [0];
+ data.samples = (int)value [0];
return data;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c
index 42596993d8..cd0cdc44fe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -35,122 +35,122 @@ JNIEXPORT jint JNICALL GLX_NATIVE(XVisualInfo_1sizeof)
}
#endif
-#ifndef NO__1glGetIntegerv
-JNIEXPORT void JNICALL GLX_NATIVE(_1glGetIntegerv)
+#ifndef NO_glGetIntegerv
+JNIEXPORT void JNICALL GLX_NATIVE(glGetIntegerv)
(JNIEnv *env, jclass that, jint arg0, jintArray arg1)
{
jint *lparg1=NULL;
- GLX_NATIVE_ENTER(env, that, _1glGetIntegerv_FUNC);
+ GLX_NATIVE_ENTER(env, that, glGetIntegerv_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
glGetIntegerv((GLenum)arg0, (GLint *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GLX_NATIVE_EXIT(env, that, _1glGetIntegerv_FUNC);
+ GLX_NATIVE_EXIT(env, that, glGetIntegerv_FUNC);
}
#endif
-#ifndef NO__1glViewport
-JNIEXPORT void JNICALL GLX_NATIVE(_1glViewport)
+#ifndef NO_glViewport
+JNIEXPORT void JNICALL GLX_NATIVE(glViewport)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
- GLX_NATIVE_ENTER(env, that, _1glViewport_FUNC);
+ GLX_NATIVE_ENTER(env, that, glViewport_FUNC);
glViewport((GLint)arg0, (GLint)arg1, (GLsizei)arg2, (GLsizei)arg3);
- GLX_NATIVE_EXIT(env, that, _1glViewport_FUNC);
+ GLX_NATIVE_EXIT(env, that, glViewport_FUNC);
}
#endif
-#ifndef NO__1glXChooseVisual
-JNIEXPORT jlong JNICALL GLX_NATIVE(_1glXChooseVisual)
+#ifndef NO_glXChooseVisual
+JNIEXPORT jlong JNICALL GLX_NATIVE(glXChooseVisual)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2)
{
jint *lparg2=NULL;
jlong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXChooseVisual_FUNC);
+ GLX_NATIVE_ENTER(env, that, glXChooseVisual_FUNC);
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jlong)glXChooseVisual((Display *)arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- GLX_NATIVE_EXIT(env, that, _1glXChooseVisual_FUNC);
+ GLX_NATIVE_EXIT(env, that, glXChooseVisual_FUNC);
return rc;
}
#endif
-#ifndef NO__1glXCreateContext
-JNIEXPORT jlong JNICALL GLX_NATIVE(_1glXCreateContext)
+#ifndef NO_glXCreateContext
+JNIEXPORT jlong JNICALL GLX_NATIVE(glXCreateContext)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2, jboolean arg3)
{
XVisualInfo _arg1, *lparg1=NULL;
jlong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXCreateContext_FUNC);
+ GLX_NATIVE_ENTER(env, that, glXCreateContext_FUNC);
if (arg1) if ((lparg1 = getXVisualInfoFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jlong)glXCreateContext((Display *)arg0, lparg1, (GLXContext)arg2, arg3);
fail:
if (arg1 && lparg1) setXVisualInfoFields(env, arg1, lparg1);
- GLX_NATIVE_EXIT(env, that, _1glXCreateContext_FUNC);
+ GLX_NATIVE_EXIT(env, that, glXCreateContext_FUNC);
return rc;
}
#endif
-#ifndef NO__1glXDestroyContext
-JNIEXPORT void JNICALL GLX_NATIVE(_1glXDestroyContext)
+#ifndef NO_glXDestroyContext
+JNIEXPORT void JNICALL GLX_NATIVE(glXDestroyContext)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GLX_NATIVE_ENTER(env, that, _1glXDestroyContext_FUNC);
+ GLX_NATIVE_ENTER(env, that, glXDestroyContext_FUNC);
glXDestroyContext((Display *)arg0, (GLXContext)arg1);
- GLX_NATIVE_EXIT(env, that, _1glXDestroyContext_FUNC);
+ GLX_NATIVE_EXIT(env, that, glXDestroyContext_FUNC);
}
#endif
-#ifndef NO__1glXGetConfig
-JNIEXPORT jint JNICALL GLX_NATIVE(_1glXGetConfig)
+#ifndef NO_glXGetConfig
+JNIEXPORT jint JNICALL GLX_NATIVE(glXGetConfig)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2, jintArray arg3)
{
XVisualInfo _arg1, *lparg1=NULL;
jint *lparg3=NULL;
jint rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXGetConfig_FUNC);
+ GLX_NATIVE_ENTER(env, that, glXGetConfig_FUNC);
if (arg1) if ((lparg1 = getXVisualInfoFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
rc = (jint)glXGetConfig((Display *)arg0, lparg1, arg2, lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg1 && lparg1) setXVisualInfoFields(env, arg1, lparg1);
- GLX_NATIVE_EXIT(env, that, _1glXGetConfig_FUNC);
+ GLX_NATIVE_EXIT(env, that, glXGetConfig_FUNC);
return rc;
}
#endif
-#ifndef NO__1glXGetCurrentContext
-JNIEXPORT jlong JNICALL GLX_NATIVE(_1glXGetCurrentContext)
+#ifndef NO_glXGetCurrentContext
+JNIEXPORT jlong JNICALL GLX_NATIVE(glXGetCurrentContext)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXGetCurrentContext_FUNC);
+ GLX_NATIVE_ENTER(env, that, glXGetCurrentContext_FUNC);
rc = (jlong)glXGetCurrentContext();
- GLX_NATIVE_EXIT(env, that, _1glXGetCurrentContext_FUNC);
+ GLX_NATIVE_EXIT(env, that, glXGetCurrentContext_FUNC);
return rc;
}
#endif
-#ifndef NO__1glXMakeCurrent
-JNIEXPORT jboolean JNICALL GLX_NATIVE(_1glXMakeCurrent)
+#ifndef NO_glXMakeCurrent
+JNIEXPORT jboolean JNICALL GLX_NATIVE(glXMakeCurrent)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jboolean rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXMakeCurrent_FUNC);
+ GLX_NATIVE_ENTER(env, that, glXMakeCurrent_FUNC);
rc = (jboolean)glXMakeCurrent((Display *)arg0, (GLXDrawable)arg1, (GLXContext)arg2);
- GLX_NATIVE_EXIT(env, that, _1glXMakeCurrent_FUNC);
+ GLX_NATIVE_EXIT(env, that, glXMakeCurrent_FUNC);
return rc;
}
#endif
-#ifndef NO__1glXSwapBuffers
-JNIEXPORT void JNICALL GLX_NATIVE(_1glXSwapBuffers)
+#ifndef NO_glXSwapBuffers
+JNIEXPORT void JNICALL GLX_NATIVE(glXSwapBuffers)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GLX_NATIVE_ENTER(env, that, _1glXSwapBuffers_FUNC);
+ GLX_NATIVE_ENTER(env, that, glXSwapBuffers_FUNC);
glXSwapBuffers((Display *)arg0, (GLXDrawable)arg1);
- GLX_NATIVE_EXIT(env, that, _1glXSwapBuffers_FUNC);
+ GLX_NATIVE_EXIT(env, that, glXSwapBuffers_FUNC);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c
index cd82848d84..ac1aef7c54 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -22,15 +22,15 @@
char * GLX_nativeFunctionNames[] = {
"XVisualInfo_1sizeof",
- "_1glGetIntegerv",
- "_1glViewport",
- "_1glXChooseVisual",
- "_1glXCreateContext",
- "_1glXDestroyContext",
- "_1glXGetConfig",
- "_1glXGetCurrentContext",
- "_1glXMakeCurrent",
- "_1glXSwapBuffers",
+ "glGetIntegerv",
+ "glViewport",
+ "glXChooseVisual",
+ "glXCreateContext",
+ "glXDestroyContext",
+ "glXGetConfig",
+ "glXGetCurrentContext",
+ "glXMakeCurrent",
+ "glXSwapBuffers",
"memmove",
};
#define NATIVE_FUNCTION_COUNT sizeof(GLX_nativeFunctionNames) / sizeof(char*)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h
index 53ccfdff51..f7001643cb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -32,14 +32,14 @@ extern char* GLX_nativeFunctionNames[];
typedef enum {
XVisualInfo_1sizeof_FUNC,
- _1glGetIntegerv_FUNC,
- _1glViewport_FUNC,
- _1glXChooseVisual_FUNC,
- _1glXCreateContext_FUNC,
- _1glXDestroyContext_FUNC,
- _1glXGetConfig_FUNC,
- _1glXGetCurrentContext_FUNC,
- _1glXMakeCurrent_FUNC,
- _1glXSwapBuffers_FUNC,
+ glGetIntegerv_FUNC,
+ glViewport_FUNC,
+ glXChooseVisual_FUNC,
+ glXCreateContext_FUNC,
+ glXDestroyContext_FUNC,
+ glXGetConfig_FUNC,
+ glXGetCurrentContext_FUNC,
+ glXMakeCurrent_FUNC,
+ glXSwapBuffers_FUNC,
memmove_FUNC,
} GLX_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java
index b2a7d92283..c99b8116e1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java
@@ -209,112 +209,40 @@ public static final native int XVisualInfo_sizeof();
* @param pname cast=(GLenum)
* @param params cast=(GLint *),flags=no_in
*/
-public static final native void _glGetIntegerv(int pname, int[] params);
-public static final void glGetIntegerv(int pname, int[] params) {
- lock.lock();
- try {
- _glGetIntegerv(pname, params);
- } finally {
- lock.unlock();
- }
-}
+public static final native void glGetIntegerv(int pname, int[] params);
/**
* @param x cast=(GLint)
* @param y cast=(GLint)
* @param width cast=(GLsizei)
* @param height cast=(GLsizei)
*/
-public static final native void _glViewport(int x, int y, int width, int height);
-public static final void glViewport(int x, int y, int width, int height) {
- lock.lock();
- try {
- _glViewport(x, y, width, height);
- } finally {
- lock.unlock();
- }
-}
+public static final native void glViewport(int x, int y, int width, int height);
/** @param dpy cast=(Display *) */
-public static final native long _glXChooseVisual(long dpy, int screen, int[] attribList);
-public static final long glXChooseVisual(long dpy, int screen, int[] attribList) {
- lock.lock();
- try {
- return _glXChooseVisual(dpy, screen, attribList);
- } finally {
- lock.unlock();
- }
-}
+public static final native long glXChooseVisual(long dpy, int screen, int[] attribList);
/**
* @param dpy cast=(Display *)
* @param shareList cast=(GLXContext)
*/
-public static final native long _glXCreateContext(long dpy, XVisualInfo vis, long shareList, boolean direct);
-public static final long glXCreateContext(long dpy, XVisualInfo vis, long shareList, boolean direct) {
- lock.lock();
- try {
- return _glXCreateContext(dpy, vis, shareList, direct);
- } finally {
- lock.unlock();
- }
-}
+public static final native long glXCreateContext(long dpy, XVisualInfo vis, long shareList, boolean direct);
/**
* @param dpy cast=(Display *)
* @param ctx cast=(GLXContext)
*/
-public static final native void _glXDestroyContext(long dpy, long ctx);
-public static final void glXDestroyContext(long dpy, long ctx) {
- lock.lock();
- try {
- _glXDestroyContext(dpy, ctx);
- } finally {
- lock.unlock();
- }
-}
+public static final native void glXDestroyContext(long dpy, long ctx);
/** @param dpy cast=(Display *) */
-public static final native int _glXGetConfig(long dpy, XVisualInfo vis, int attrib, int[] value);
-public static final int glXGetConfig(long dpy, XVisualInfo vis, int attrib, int[] value) {
- lock.lock();
- try {
- return _glXGetConfig(dpy, vis, attrib, value);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _glXGetCurrentContext();
-public static final long glXGetCurrentContext() {
- lock.lock();
- try {
- return _glXGetCurrentContext();
- } finally {
- lock.unlock();
- }
-}
+public static final native int glXGetConfig(long dpy, XVisualInfo vis, int attrib, int[] value);
+public static final native long glXGetCurrentContext();
/**
* @param dpy cast=(Display *)
* @param drawable cast=(GLXDrawable)
* @param ctx cast=(GLXContext)
*/
-public static final native boolean _glXMakeCurrent(long dpy, long drawable, long ctx);
-public static final boolean glXMakeCurrent(long dpy, long drawable, long ctx) {
- lock.lock();
- try {
- return _glXMakeCurrent(dpy, drawable, ctx);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean glXMakeCurrent(long dpy, long drawable, long ctx);
/**
* @param dpy cast=(Display *)
* @param drawable cast=(GLXDrawable)
*/
-public static final native void _glXSwapBuffers(long dpy, long drawable);
-public static final void glXSwapBuffers(long dpy, long drawable) {
- lock.lock();
- try {
- _glXSwapBuffers(dpy, drawable);
- } finally {
- lock.unlock();
- }
-}
+public static final native void glXSwapBuffers(long dpy, long drawable);
/**
* @param src cast=(const void *)
* @param size cast=(size_t)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java
index ad4b67c116..97d27b8c3b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java
@@ -17,6 +17,7 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
import org.eclipse.swt.internal.opengl.glx.*;
import org.eclipse.swt.widgets.*;
@@ -109,7 +110,7 @@ public GLCanvas (Composite parent, int style, GLData data) {
}
glxAttrib [pos++] = 0;
GTK.gtk_widget_realize (handle);
- long window = GTK.gtk_widget_get_window (handle);
+ long window = GTK3.gtk_widget_get_window (handle);
long xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_window_get_display(window));
long infoPtr = GLX.glXChooseVisual (xDisplay, OS.XDefaultScreen (xDisplay), glxAttrib);
@@ -135,12 +136,19 @@ public GLCanvas (Composite parent, int style, GLData data) {
GDK.GDK_EXPOSURE_MASK | GDK.GDK_POINTER_MOTION_HINT_MASK;
attrs.window_type = GDK.GDK_WINDOW_CHILD;
attrs.visual = gdkvisual;
- glWindow = GDK.gdk_window_new (window, attrs, GDK.GDK_WA_VISUAL);
+ glWindow = GTK3.gdk_window_new (window, attrs, GDK.GDK_WA_VISUAL);
GDK.gdk_window_set_user_data (glWindow, handle);
if ((style & SWT.NO_BACKGROUND) != 0) {
//TODO: implement this on GTK3 as pixmaps are gone.
}
- xWindow = GDK.gdk_x11_window_get_xid (glWindow);
+
+ if (GTK.GTK4) {
+ // TODO: Enable when the GdkWindow to GdkSurface changes are in
+ //xWindow = GDK.gdk_x11_surface_get_xid(glWindow);
+ } else {
+ xWindow = GDK.gdk_x11_window_get_xid (glWindow);
+ }
+
GDK.gdk_window_show (glWindow);
Listener listener = event -> {
@@ -162,7 +170,7 @@ public GLCanvas (Composite parent, int style, GLData data) {
GDK.gdk_window_resize (glWindow, clientArea.width, clientArea.height);
break;
case SWT.Dispose:
- long window1 = GTK.gtk_widget_get_window (handle);
+ long window1 = GTK3.gtk_widget_get_window (handle);
long xDisplay1 = gdk_x11_display_get_xdisplay (window1);
if (context != 0) {
if (GLX.glXGetCurrentContext () == context) {
@@ -194,7 +202,7 @@ public GLCanvas (Composite parent, int style, GLData data) {
*/
public GLData getGLData () {
checkWidget ();
- long window = GTK.gtk_widget_get_window (handle);
+ long window = GTK3.gtk_widget_get_window (handle);
long xDisplay = gdk_x11_display_get_xdisplay (window);
GLData data = new GLData ();
int [] value = new int [1];
@@ -257,7 +265,7 @@ public boolean isCurrent () {
public void setCurrent () {
checkWidget ();
if (GLX.glXGetCurrentContext () == context) return;
- long window = GTK.gtk_widget_get_window (handle);
+ long window = GTK3.gtk_widget_get_window (handle);
long xDisplay = gdk_x11_display_get_xdisplay (window);
GLX.glXMakeCurrent (xDisplay, xWindow, context);
}
@@ -272,7 +280,7 @@ public void setCurrent () {
*/
public void swapBuffers () {
checkWidget ();
- long window = GTK.gtk_widget_get_window (handle);
+ long window = GTK3.gtk_widget_get_window (handle);
long xDisplay = gdk_x11_display_get_xdisplay (window);
GLX.glXSwapBuffers (xDisplay, xWindow);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl.c
index 058a6a7589..f7000f945f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -25,7 +25,7 @@
#ifndef NO_ChoosePixelFormat
JNIEXPORT jint JNICALL WGL_NATIVE(ChoosePixelFormat)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
PIXELFORMATDESCRIPTOR _arg1, *lparg1=NULL;
jint rc = 0;
@@ -33,7 +33,6 @@ JNIEXPORT jint JNICALL WGL_NATIVE(ChoosePixelFormat)
if (arg1) if ((lparg1 = getPIXELFORMATDESCRIPTORFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jint)ChoosePixelFormat((HDC)arg0, lparg1);
fail:
- if (arg1 && lparg1) setPIXELFORMATDESCRIPTORFields(env, arg1, lparg1);
WGL_NATIVE_EXIT(env, that, ChoosePixelFormat_FUNC);
return rc;
}
@@ -41,12 +40,12 @@ fail:
#ifndef NO_DescribePixelFormat
JNIEXPORT jint JNICALL WGL_NATIVE(DescribePixelFormat)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jobject arg3)
{
PIXELFORMATDESCRIPTOR _arg3, *lparg3=NULL;
jint rc = 0;
WGL_NATIVE_ENTER(env, that, DescribePixelFormat_FUNC);
- if (arg3) if ((lparg3 = getPIXELFORMATDESCRIPTORFields(env, arg3, &_arg3)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = &_arg3) == NULL) goto fail;
rc = (jint)DescribePixelFormat((HDC)arg0, arg1, arg2, lparg3);
fail:
if (arg3 && lparg3) setPIXELFORMATDESCRIPTORFields(env, arg3, lparg3);
@@ -55,21 +54,9 @@ fail:
}
#endif
-#ifndef NO_GetPixelFormat
-JNIEXPORT jint JNICALL WGL_NATIVE(GetPixelFormat)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- WGL_NATIVE_ENTER(env, that, GetPixelFormat_FUNC);
- rc = (jint)GetPixelFormat((HDC)arg0);
- WGL_NATIVE_EXIT(env, that, GetPixelFormat_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SetPixelFormat
JNIEXPORT jboolean JNICALL WGL_NATIVE(SetPixelFormat)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
PIXELFORMATDESCRIPTOR _arg2, *lparg2=NULL;
jboolean rc = 0;
@@ -77,7 +64,6 @@ JNIEXPORT jboolean JNICALL WGL_NATIVE(SetPixelFormat)
if (arg2) if ((lparg2 = getPIXELFORMATDESCRIPTORFields(env, arg2, &_arg2)) == NULL) goto fail;
rc = (jboolean)SetPixelFormat((HDC)arg0, arg1, lparg2);
fail:
- if (arg2 && lparg2) setPIXELFORMATDESCRIPTORFields(env, arg2, lparg2);
WGL_NATIVE_EXIT(env, that, SetPixelFormat_FUNC);
return rc;
}
@@ -85,7 +71,7 @@ fail:
#ifndef NO_SwapBuffers
JNIEXPORT jboolean JNICALL WGL_NATIVE(SwapBuffers)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
WGL_NATIVE_ENTER(env, that, SwapBuffers_FUNC);
@@ -95,45 +81,21 @@ JNIEXPORT jboolean JNICALL WGL_NATIVE(SwapBuffers)
}
#endif
-#ifndef NO_wglCopyContext
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglCopyContext)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
-{
- jboolean rc = 0;
- WGL_NATIVE_ENTER(env, that, wglCopyContext_FUNC);
- rc = (jboolean)wglCopyContext((HGLRC)arg0, (HGLRC)arg1, arg2);
- WGL_NATIVE_EXIT(env, that, wglCopyContext_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_wglCreateContext
-JNIEXPORT jintLong JNICALL WGL_NATIVE(wglCreateContext)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL WGL_NATIVE(wglCreateContext)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
WGL_NATIVE_ENTER(env, that, wglCreateContext_FUNC);
- rc = (jintLong)wglCreateContext((HDC)arg0);
+ rc = (jlong)wglCreateContext((HDC)arg0);
WGL_NATIVE_EXIT(env, that, wglCreateContext_FUNC);
return rc;
}
#endif
-#ifndef NO_wglCreateLayerContext
-JNIEXPORT jintLong JNICALL WGL_NATIVE(wglCreateLayerContext)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jintLong rc = 0;
- WGL_NATIVE_ENTER(env, that, wglCreateLayerContext_FUNC);
- rc = (jintLong)wglCreateLayerContext((HDC)arg0, arg1);
- WGL_NATIVE_EXIT(env, that, wglCreateLayerContext_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_wglDeleteContext
JNIEXPORT jboolean JNICALL WGL_NATIVE(wglDeleteContext)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
WGL_NATIVE_ENTER(env, that, wglDeleteContext_FUNC);
@@ -143,81 +105,21 @@ JNIEXPORT jboolean JNICALL WGL_NATIVE(wglDeleteContext)
}
#endif
-#ifndef NO_wglDescribeLayerPlane
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglDescribeLayerPlane)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jobject arg4)
-{
- LAYERPLANEDESCRIPTOR _arg4, *lparg4=NULL;
- jboolean rc = 0;
- WGL_NATIVE_ENTER(env, that, wglDescribeLayerPlane_FUNC);
- if (arg4) if ((lparg4 = getLAYERPLANEDESCRIPTORFields(env, arg4, &_arg4)) == NULL) goto fail;
- rc = (jboolean)wglDescribeLayerPlane((HDC)arg0, arg1, arg2, arg3, lparg4);
-fail:
- if (arg4 && lparg4) setLAYERPLANEDESCRIPTORFields(env, arg4, lparg4);
- WGL_NATIVE_EXIT(env, that, wglDescribeLayerPlane_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_wglGetCurrentContext
-JNIEXPORT jintLong JNICALL WGL_NATIVE(wglGetCurrentContext)
+JNIEXPORT jlong JNICALL WGL_NATIVE(wglGetCurrentContext)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
WGL_NATIVE_ENTER(env, that, wglGetCurrentContext_FUNC);
- rc = (jintLong)wglGetCurrentContext();
+ rc = (jlong)wglGetCurrentContext();
WGL_NATIVE_EXIT(env, that, wglGetCurrentContext_FUNC);
return rc;
}
#endif
-#ifndef NO_wglGetCurrentDC
-JNIEXPORT jintLong JNICALL WGL_NATIVE(wglGetCurrentDC)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- WGL_NATIVE_ENTER(env, that, wglGetCurrentDC_FUNC);
- rc = (jintLong)wglGetCurrentDC();
- WGL_NATIVE_EXIT(env, that, wglGetCurrentDC_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_wglGetLayerPaletteEntries
-JNIEXPORT jint JNICALL WGL_NATIVE(wglGetLayerPaletteEntries)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
- jint rc = 0;
- WGL_NATIVE_ENTER(env, that, wglGetLayerPaletteEntries_FUNC);
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)wglGetLayerPaletteEntries((HDC)arg0, arg1, arg2, arg3, (COLORREF *)lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- WGL_NATIVE_EXIT(env, that, wglGetLayerPaletteEntries_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_wglGetProcAddress
-JNIEXPORT jintLong JNICALL WGL_NATIVE(wglGetProcAddress)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jintLong rc = 0;
- WGL_NATIVE_ENTER(env, that, wglGetProcAddress_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)wglGetProcAddress(lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- WGL_NATIVE_EXIT(env, that, wglGetProcAddress_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_wglMakeCurrent
JNIEXPORT jboolean JNICALL WGL_NATIVE(wglMakeCurrent)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
WGL_NATIVE_ENTER(env, that, wglMakeCurrent_FUNC);
@@ -227,37 +129,9 @@ JNIEXPORT jboolean JNICALL WGL_NATIVE(wglMakeCurrent)
}
#endif
-#ifndef NO_wglRealizeLayerPalette
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglRealizeLayerPalette)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2)
-{
- jboolean rc = 0;
- WGL_NATIVE_ENTER(env, that, wglRealizeLayerPalette_FUNC);
- rc = (jboolean)wglRealizeLayerPalette((HDC)arg0, arg1, arg2);
- WGL_NATIVE_EXIT(env, that, wglRealizeLayerPalette_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_wglSetLayerPaletteEntries
-JNIEXPORT jint JNICALL WGL_NATIVE(wglSetLayerPaletteEntries)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
- jint rc = 0;
- WGL_NATIVE_ENTER(env, that, wglSetLayerPaletteEntries_FUNC);
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)wglSetLayerPaletteEntries((HDC)arg0, arg1, arg2, arg3, (COLORREF *)lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- WGL_NATIVE_EXIT(env, that, wglSetLayerPaletteEntries_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_wglShareLists
JNIEXPORT jboolean JNICALL WGL_NATIVE(wglShareLists)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
WGL_NATIVE_ENTER(env, that, wglShareLists_FUNC);
@@ -267,15 +141,3 @@ JNIEXPORT jboolean JNICALL WGL_NATIVE(wglShareLists)
}
#endif
-#ifndef NO_wglSwapLayerBuffers
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglSwapLayerBuffers)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jboolean rc = 0;
- WGL_NATIVE_ENTER(env, that, wglSwapLayerBuffers_FUNC);
- rc = (jboolean)wglSwapLayerBuffers((HDC)arg0, arg1);
- WGL_NATIVE_EXIT(env, that, wglSwapLayerBuffers_FUNC);
- return rc;
-}
-#endif
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.c
index 0d9a780f10..bf118bbd9a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -23,23 +23,13 @@
char * WGL_nativeFunctionNames[] = {
"ChoosePixelFormat",
"DescribePixelFormat",
- "GetPixelFormat",
"SetPixelFormat",
"SwapBuffers",
- "wglCopyContext",
"wglCreateContext",
- "wglCreateLayerContext",
"wglDeleteContext",
- "wglDescribeLayerPlane",
"wglGetCurrentContext",
- "wglGetCurrentDC",
- "wglGetLayerPaletteEntries",
- "wglGetProcAddress",
"wglMakeCurrent",
- "wglRealizeLayerPalette",
- "wglSetLayerPaletteEntries",
"wglShareLists",
- "wglSwapLayerBuffers",
};
#define NATIVE_FUNCTION_COUNT sizeof(WGL_nativeFunctionNames) / sizeof(char*)
int WGL_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.h b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.h
index 0975156d6f..6c9331165a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -33,21 +33,11 @@ extern char* WGL_nativeFunctionNames[];
typedef enum {
ChoosePixelFormat_FUNC,
DescribePixelFormat_FUNC,
- GetPixelFormat_FUNC,
SetPixelFormat_FUNC,
SwapBuffers_FUNC,
- wglCopyContext_FUNC,
wglCreateContext_FUNC,
- wglCreateLayerContext_FUNC,
wglDeleteContext_FUNC,
- wglDescribeLayerPlane_FUNC,
wglGetCurrentContext_FUNC,
- wglGetCurrentDC_FUNC,
- wglGetLayerPaletteEntries_FUNC,
- wglGetProcAddress_FUNC,
wglMakeCurrent_FUNC,
- wglRealizeLayerPalette_FUNC,
- wglSetLayerPaletteEntries_FUNC,
wglShareLists_FUNC,
- wglSwapLayerBuffers_FUNC,
} WGL_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.c
index 675de355db..eb9badfc2c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,106 +18,6 @@
#include "swt.h"
#include "wgl_structs.h"
-#ifndef NO_LAYERPLANEDESCRIPTOR
-typedef struct LAYERPLANEDESCRIPTOR_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID nSize, nVersion, dwFlags, iPixelType, cColorBits, cRedBits, cRedShift, cGreenBits, cGreenShift, cBlueBits, cBlueShift, cAlphaBits, cAlphaShift, cAccumBits, cAccumRedBits, cAccumGreenBits, cAccumBlueBits, cAccumAlphaBits, cDepthBits, cStencilBits, cAuxBuffers, iLayerPlane, bReserved, crTransparent;
-} LAYERPLANEDESCRIPTOR_FID_CACHE;
-
-LAYERPLANEDESCRIPTOR_FID_CACHE LAYERPLANEDESCRIPTORFc;
-
-void cacheLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject)
-{
- if (LAYERPLANEDESCRIPTORFc.cached) return;
- LAYERPLANEDESCRIPTORFc.clazz = (*env)->GetObjectClass(env, lpObject);
- LAYERPLANEDESCRIPTORFc.nSize = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "nSize", "S");
- LAYERPLANEDESCRIPTORFc.nVersion = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "nVersion", "S");
- LAYERPLANEDESCRIPTORFc.dwFlags = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "dwFlags", "I");
- LAYERPLANEDESCRIPTORFc.iPixelType = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "iPixelType", "B");
- LAYERPLANEDESCRIPTORFc.cColorBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cColorBits", "B");
- LAYERPLANEDESCRIPTORFc.cRedBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cRedBits", "B");
- LAYERPLANEDESCRIPTORFc.cRedShift = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cRedShift", "B");
- LAYERPLANEDESCRIPTORFc.cGreenBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cGreenBits", "B");
- LAYERPLANEDESCRIPTORFc.cGreenShift = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cGreenShift", "B");
- LAYERPLANEDESCRIPTORFc.cBlueBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cBlueBits", "B");
- LAYERPLANEDESCRIPTORFc.cBlueShift = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cBlueShift", "B");
- LAYERPLANEDESCRIPTORFc.cAlphaBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAlphaBits", "B");
- LAYERPLANEDESCRIPTORFc.cAlphaShift = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAlphaShift", "B");
- LAYERPLANEDESCRIPTORFc.cAccumBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAccumBits", "B");
- LAYERPLANEDESCRIPTORFc.cAccumRedBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAccumRedBits", "B");
- LAYERPLANEDESCRIPTORFc.cAccumGreenBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAccumGreenBits", "B");
- LAYERPLANEDESCRIPTORFc.cAccumBlueBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAccumBlueBits", "B");
- LAYERPLANEDESCRIPTORFc.cAccumAlphaBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAccumAlphaBits", "B");
- LAYERPLANEDESCRIPTORFc.cDepthBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cDepthBits", "B");
- LAYERPLANEDESCRIPTORFc.cStencilBits = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cStencilBits", "B");
- LAYERPLANEDESCRIPTORFc.cAuxBuffers = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "cAuxBuffers", "B");
- LAYERPLANEDESCRIPTORFc.iLayerPlane = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "iLayerPlane", "B");
- LAYERPLANEDESCRIPTORFc.bReserved = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "bReserved", "B");
- LAYERPLANEDESCRIPTORFc.crTransparent = (*env)->GetFieldID(env, LAYERPLANEDESCRIPTORFc.clazz, "crTransparent", "I");
- LAYERPLANEDESCRIPTORFc.cached = 1;
-}
-
-LAYERPLANEDESCRIPTOR *getLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct)
-{
- if (!LAYERPLANEDESCRIPTORFc.cached) cacheLAYERPLANEDESCRIPTORFields(env, lpObject);
- lpStruct->nSize = (*env)->GetShortField(env, lpObject, LAYERPLANEDESCRIPTORFc.nSize);
- lpStruct->nVersion = (*env)->GetShortField(env, lpObject, LAYERPLANEDESCRIPTORFc.nVersion);
- lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, LAYERPLANEDESCRIPTORFc.dwFlags);
- lpStruct->iPixelType = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.iPixelType);
- lpStruct->cColorBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cColorBits);
- lpStruct->cRedBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cRedBits);
- lpStruct->cRedShift = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cRedShift);
- lpStruct->cGreenBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cGreenBits);
- lpStruct->cGreenShift = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cGreenShift);
- lpStruct->cBlueBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cBlueBits);
- lpStruct->cBlueShift = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cBlueShift);
- lpStruct->cAlphaBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAlphaBits);
- lpStruct->cAlphaShift = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAlphaShift);
- lpStruct->cAccumBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumBits);
- lpStruct->cAccumRedBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumRedBits);
- lpStruct->cAccumGreenBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumGreenBits);
- lpStruct->cAccumBlueBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumBlueBits);
- lpStruct->cAccumAlphaBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumAlphaBits);
- lpStruct->cDepthBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cDepthBits);
- lpStruct->cStencilBits = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cStencilBits);
- lpStruct->cAuxBuffers = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAuxBuffers);
- lpStruct->iLayerPlane = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.iLayerPlane);
- lpStruct->bReserved = (*env)->GetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.bReserved);
- lpStruct->crTransparent = (*env)->GetIntField(env, lpObject, LAYERPLANEDESCRIPTORFc.crTransparent);
- return lpStruct;
-}
-
-void setLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct)
-{
- if (!LAYERPLANEDESCRIPTORFc.cached) cacheLAYERPLANEDESCRIPTORFields(env, lpObject);
- (*env)->SetShortField(env, lpObject, LAYERPLANEDESCRIPTORFc.nSize, (jshort)lpStruct->nSize);
- (*env)->SetShortField(env, lpObject, LAYERPLANEDESCRIPTORFc.nVersion, (jshort)lpStruct->nVersion);
- (*env)->SetIntField(env, lpObject, LAYERPLANEDESCRIPTORFc.dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.iPixelType, (jbyte)lpStruct->iPixelType);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cColorBits, (jbyte)lpStruct->cColorBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cRedBits, (jbyte)lpStruct->cRedBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cRedShift, (jbyte)lpStruct->cRedShift);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cGreenBits, (jbyte)lpStruct->cGreenBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cGreenShift, (jbyte)lpStruct->cGreenShift);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cBlueBits, (jbyte)lpStruct->cBlueBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cBlueShift, (jbyte)lpStruct->cBlueShift);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAlphaBits, (jbyte)lpStruct->cAlphaBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAlphaShift, (jbyte)lpStruct->cAlphaShift);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumBits, (jbyte)lpStruct->cAccumBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumRedBits, (jbyte)lpStruct->cAccumRedBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumGreenBits, (jbyte)lpStruct->cAccumGreenBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumBlueBits, (jbyte)lpStruct->cAccumBlueBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAccumAlphaBits, (jbyte)lpStruct->cAccumAlphaBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cDepthBits, (jbyte)lpStruct->cDepthBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cStencilBits, (jbyte)lpStruct->cStencilBits);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.cAuxBuffers, (jbyte)lpStruct->cAuxBuffers);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.iLayerPlane, (jbyte)lpStruct->iLayerPlane);
- (*env)->SetByteField(env, lpObject, LAYERPLANEDESCRIPTORFc.bReserved, (jbyte)lpStruct->bReserved);
- (*env)->SetIntField(env, lpObject, LAYERPLANEDESCRIPTORFc.crTransparent, (jint)lpStruct->crTransparent);
-}
-#endif
-
#ifndef NO_PIXELFORMATDESCRIPTOR
typedef struct PIXELFORMATDESCRIPTOR_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.h b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.h
index 7c1d3ecece..6b20e833b6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library/wgl_structs.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,18 +17,6 @@
#include "wgl.h"
-#ifndef NO_LAYERPLANEDESCRIPTOR
-void cacheLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject);
-LAYERPLANEDESCRIPTOR *getLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct);
-void setLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct);
-#define LAYERPLANEDESCRIPTOR_sizeof() sizeof(LAYERPLANEDESCRIPTOR)
-#else
-#define cacheLAYERPLANEDESCRIPTORFields(a,b)
-#define getLAYERPLANEDESCRIPTORFields(a,b,c) NULL
-#define setLAYERPLANEDESCRIPTORFields(a,b,c)
-#define LAYERPLANEDESCRIPTOR_sizeof() 0
-#endif
-
#ifndef NO_PIXELFORMATDESCRIPTOR
void cachePIXELFORMATDESCRIPTORFields(JNIEnv *env, jobject lpObject);
PIXELFORMATDESCRIPTOR *getPIXELFORMATDESCRIPTORFields(JNIEnv *env, jobject lpObject, PIXELFORMATDESCRIPTOR *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java
deleted file mode 100644
index 499a5440d1..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.opengl.win32;
-
-
-public class LAYERPLANEDESCRIPTOR {
- public short nSize;
- public short nVersion;
- public int dwFlags;
- public byte iPixelType;
- public byte cColorBits;
- public byte cRedBits;
- public byte cRedShift;
- public byte cGreenBits;
- public byte cGreenShift;
- public byte cBlueBits;
- public byte cBlueShift;
- public byte cAlphaBits;
- public byte cAlphaShift;
- public byte cAccumBits;
- public byte cAccumRedBits;
- public byte cAccumGreenBits;
- public byte cAccumBlueBits;
- public byte cAccumAlphaBits;
- public byte cDepthBits;
- public byte cStencilBits;
- public byte cAuxBuffers;
- public byte iLayerPlane;
- public byte bReserved;
- public int crTransparent;
- public static final int sizeof = 36;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java
index 01a3c169c7..5cf0d11f15 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java
@@ -15,31 +15,31 @@ package org.eclipse.swt.internal.opengl.win32;
public class PIXELFORMATDESCRIPTOR {
- public short nSize;
- public short nVersion;
- public int dwFlags;
- public byte iPixelType;
- public byte cColorBits;
- public byte cRedBits;
- public byte cRedShift;
- public byte cGreenBits;
- public byte cGreenShift;
- public byte cBlueBits;
- public byte cBlueShift;
- public byte cAlphaBits;
- public byte cAlphaShift;
- public byte cAccumBits;
- public byte cAccumRedBits;
- public byte cAccumGreenBits;
- public byte cAccumBlueBits;
- public byte cAccumAlphaBits;
- public byte cDepthBits;
- public byte cStencilBits;
- public byte cAuxBuffers;
- public byte iLayerType;
- public byte bReserved;
- public int dwLayerMask;
- public int dwVisibleMask;
- public int dwDamageMask;
+ public short nSize;
+ public short nVersion;
+ public int dwFlags;
+ public byte iPixelType;
+ public byte cColorBits;
+ public byte cRedBits;
+ public byte cRedShift;
+ public byte cGreenBits;
+ public byte cGreenShift;
+ public byte cBlueBits;
+ public byte cBlueShift;
+ public byte cAlphaBits;
+ public byte cAlphaShift;
+ public byte cAccumBits;
+ public byte cAccumRedBits;
+ public byte cAccumGreenBits;
+ public byte cAccumBlueBits;
+ public byte cAccumAlphaBits;
+ public byte cDepthBits;
+ public byte cStencilBits;
+ public byte cAuxBuffers;
+ public byte iLayerType;
+ public byte bReserved;
+ public int dwLayerMask;
+ public int dwVisibleMask;
+ public int dwDamageMask;
public static final int sizeof = 40;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/WGL.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/WGL.java
index 3ea1ec7086..cdb2d799f7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/WGL.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/WGL.java
@@ -20,135 +20,44 @@ public class WGL extends Platform {
Library.loadLibrary("swt-wgl");
}
- public static final int WGL_FONT_LINES = 0;
- public static final int WGL_FONT_POLYGONS = 1;
-
- /* LAYERPLANEDESCRIPTOR flags */
- public static final int LPD_DOUBLEBUFFER = 0x00000001;
- public static final int LPD_STEREO = 0x00000002;
- public static final int LPD_SUPPORT_GDI = 0x00000010;
- public static final int LPD_SUPPORT_OPENGL = 0x00000020;
- public static final int LPD_SHARE_DEPTH = 0x00000040;
- public static final int LPD_SHARE_STENCIL = 0x00000080;
- public static final int LPD_SHARE_ACCUM = 0x00000100;
- public static final int LPD_SWAP_EXCHANGE = 0x00000200;
- public static final int LPD_SWAP_COPY = 0x00000400;
- public static final int LPD_TRANSPARENT = 0x00001000;
-
- public static final int LPD_TYPE_RGBA = 0;
- public static final int LPD_TYPE_COLORINDEX = 1;
-
- /* wglSwapLayerBuffers flags */
- public static final int WGL_SWAP_MAIN_PLANE = 0x00000001;
- public static final int WGL_SWAP_OVERLAY1 = 0x00000002;
- public static final int WGL_SWAP_OVERLAY2 = 0x00000004;
- public static final int WGL_SWAP_OVERLAY3 = 0x00000008;
- public static final int WGL_SWAP_OVERLAY4 = 0x00000010;
- public static final int WGL_SWAP_OVERLAY5 = 0x00000020;
- public static final int WGL_SWAP_OVERLAY6 = 0x00000040;
- public static final int WGL_SWAP_OVERLAY7 = 0x00000080;
- public static final int WGL_SWAP_OVERLAY8 = 0x00000100;
- public static final int WGL_SWAP_OVERLAY9 = 0x00000200;
- public static final int WGL_SWAP_OVERLAY10 = 0x00000400;
- public static final int WGL_SWAP_OVERLAY11 = 0x00000800;
- public static final int WGL_SWAP_OVERLAY12 = 0x00001000;
- public static final int WGL_SWAP_OVERLAY13 = 0x00002000;
- public static final int WGL_SWAP_OVERLAY14 = 0x00004000;
- public static final int WGL_SWAP_OVERLAY15 = 0x00008000;
- public static final int WGL_SWAP_UNDERLAY1 = 0x00010000;
- public static final int WGL_SWAP_UNDERLAY2 = 0x00020000;
- public static final int WGL_SWAP_UNDERLAY3 = 0x00040000;
- public static final int WGL_SWAP_UNDERLAY4 = 0x00080000;
- public static final int WGL_SWAP_UNDERLAY5 = 0x00100000;
- public static final int WGL_SWAP_UNDERLAY6 = 0x00200000;
- public static final int WGL_SWAP_UNDERLAY7 = 0x00400000;
- public static final int WGL_SWAP_UNDERLAY8 = 0x00800000;
- public static final int WGL_SWAP_UNDERLAY9 = 0x01000000;
- public static final int WGL_SWAP_UNDERLAY10 = 0x02000000;
- public static final int WGL_SWAP_UNDERLAY11 = 0x04000000;
- public static final int WGL_SWAP_UNDERLAY12 = 0x08000000;
- public static final int WGL_SWAP_UNDERLAY13 = 0x10000000;
- public static final int WGL_SWAP_UNDERLAY14 = 0x20000000;
- public static final int WGL_SWAP_UNDERLAY15 = 0x40000000;
-
- /* pixel types */
public static final int PFD_TYPE_RGBA = 0;
- public static final int PFD_TYPE_COLORINDEX = 1;
-
- /* layer types */
public static final int PFD_MAIN_PLANE = 0;
- public static final int PFD_OVERLAY_PLANE = 1;
- public static final int PFD_UNDERLAY_PLANE = (-1);
-
- /* PIXELFORMATDESCRIPTOR flags */
public static final int PFD_DOUBLEBUFFER = 0x00000001;
public static final int PFD_STEREO = 0x00000002;
public static final int PFD_DRAW_TO_WINDOW = 0x00000004;
- public static final int PFD_DRAW_TO_BITMAP = 0x00000008;
- public static final int PFD_SUPPORT_GDI = 0x00000010;
public static final int PFD_SUPPORT_OPENGL = 0x00000020;
- public static final int PFD_GENERIC_FORMAT = 0x00000040;
- public static final int PFD_NEED_PALETTE = 0x00000080;
- public static final int PFD_NEED_SYSTEM_PALETTE = 0x00000100;
- public static final int PFD_SWAP_EXCHANGE = 0x00000200;
- public static final int PFD_SWAP_COPY = 0x00000400;
- public static final int PFD_SWAP_LAYER_BUFFERS = 0x00000800;
- public static final int PFD_GENERIC_ACCELERATED = 0x00001000;
- public static final int PFD_SUPPORT_DIRECTDRAW = 0x00002000;
- /* PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only */
- public static final int PFD_DEPTH_DONTCARE = 0x20000000;
- public static final int PFD_DOUBLEBUFFER_DONTCARE = 0x40000000;
- public static final int PFD_STEREO_DONTCARE = 0x80000000;
-
-/** @param hdc cast=(HDC) */
-public static final native int ChoosePixelFormat(long /*int*/ hdc, PIXELFORMATDESCRIPTOR ppfd);
-/** @param hdc cast=(HDC) */
-public static final native int DescribePixelFormat(long /*int*/ hdc, int iPixelFormat, int nBytes, PIXELFORMATDESCRIPTOR ppfd);
-/** @param hdc cast=(HDC) */
-public static final native int GetPixelFormat(long /*int*/ hdc);
-/** @param hdc cast=(HDC) */
-public static final native boolean SetPixelFormat(long /*int*/ hdc, int iPixelFormat, PIXELFORMATDESCRIPTOR ppfd);
-/** @param hdc cast=(HDC) */
-public static final native boolean SwapBuffers(long /*int*/ hdc);
/**
- * @param hglrcSrc cast=(HGLRC)
- * @param hglrcDst cast=(HGLRC)
+ * @param hdc cast=(HDC)
+ * @param ppfd flags=no_out
*/
-public static final native boolean wglCopyContext(long /*int*/ hglrcSrc, long /*int*/ hglrcDst, int mask);
-/** @param hdc cast=(HDC) */
-public static final native long /*int*/ wglCreateContext(long /*int*/ hdc);
-/** @param hdc cast=(HDC) */
-public static final native long /*int*/ wglCreateLayerContext(long /*int*/ hdc, int iLayerPlane);
-/** @param hglrc cast=(HGLRC) */
-public static final native boolean wglDeleteContext(long /*int*/ hglrc);
-public static final native long /*int*/ wglGetCurrentContext();
-public static final native long /*int*/ wglGetCurrentDC();
-public static final native long /*int*/ wglGetProcAddress(byte[] lpszProc);
+public static final native int ChoosePixelFormat(long hdc, PIXELFORMATDESCRIPTOR ppfd);
/**
* @param hdc cast=(HDC)
- * @param hglrc cast=(HGLRC)
+ * @param ppfd flags=no_in
*/
-public static final native boolean wglMakeCurrent(long /*int*/ hdc, long /*int*/ hglrc);
+public static final native int DescribePixelFormat(long hdc, int iPixelFormat, int nBytes, PIXELFORMATDESCRIPTOR ppfd);
/**
- * @param hglrc1 cast=(HGLRC)
- * @param hglrc2 cast=(HGLRC)
+ * @param hdc cast=(HDC)
+ * @param ppfd flags=no_out
*/
-public static final native boolean wglShareLists(long /*int*/ hglrc1, long /*int*/ hglrc2);
+public static final native boolean SetPixelFormat(long hdc, int iPixelFormat, PIXELFORMATDESCRIPTOR ppfd);
+/** @param hdc cast=(HDC) */
+public static final native boolean SwapBuffers(long hdc);
/** @param hdc cast=(HDC) */
-public static final native boolean wglDescribeLayerPlane(long /*int*/ hdc, int iPixelFormat, int iLayerPlane, int nBytes, LAYERPLANEDESCRIPTOR plpd);
+public static final native long wglCreateContext(long hdc);
+/** @param hglrc cast=(HGLRC) */
+public static final native boolean wglDeleteContext(long hglrc);
+public static final native long wglGetCurrentContext();
/**
* @param hdc cast=(HDC)
- * @param pcr cast=(COLORREF *)
+ * @param hglrc cast=(HGLRC)
*/
-public static final native int wglSetLayerPaletteEntries(long /*int*/ hdc, int iLayerPlane, int iStart, int cEntries, int[] pcr);
+public static final native boolean wglMakeCurrent(long hdc, long hglrc);
/**
- * @param hdc cast=(HDC)
- * @param pcr cast=(COLORREF *)
+ * @param hglrc1 cast=(HGLRC)
+ * @param hglrc2 cast=(HGLRC)
*/
-public static final native int wglGetLayerPaletteEntries(long /*int*/ hdc, int iLayerPlane, int iStart, int cEntries, int[] pcr);
-/** @param hdc cast=(HDC) */
-public static final native boolean wglRealizeLayerPalette(long /*int*/ hdc, int iLayerPlane, boolean bRealize);
-/** @param hdc cast=(HDC) */
-public static final native boolean wglSwapLayerBuffers(long /*int*/ hdc, int fuPlanes);
+public static final native boolean wglShareLists(long hglrc1, long hglrc2);
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java
index 26ba98c379..3a470bf881 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/opengl/GLCanvas.java
@@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.*;
*/
public class GLCanvas extends Canvas {
- long /*int*/ context;
+ long context;
int pixelFormat;
static final String USE_OWNDC_KEY = "org.eclipse.swt.internal.win32.useOwnDC"; //$NON-NLS-1$
/**
@@ -79,7 +79,7 @@ public GLCanvas (Composite parent, int style, GLData data) {
// wglAttrib [pos++] = data.samples;
// }
- long /*int*/ hDC = OS.GetDC (handle);
+ long hDC = OS.GetDC (handle);
pixelFormat = WGL.ChoosePixelFormat (hDC, pfd);
if (pixelFormat == 0 || !WGL.SetPixelFormat (hDC, pixelFormat, pfd)) {
OS.ReleaseDC (handle, hDC);
@@ -126,8 +126,7 @@ public GLData getGLData () {
checkWidget ();
GLData data = new GLData ();
PIXELFORMATDESCRIPTOR pfd = new PIXELFORMATDESCRIPTOR ();
- pfd.nSize = (short) PIXELFORMATDESCRIPTOR.sizeof;
- long /*int*/ hDC = OS.GetDC (handle);
+ long hDC = OS.GetDC (handle);
WGL.DescribePixelFormat (hDC, pixelFormat, PIXELFORMATDESCRIPTOR.sizeof, pfd);
OS.ReleaseDC (handle, hDC);
data.doubleBuffer = (pfd.dwFlags & WGL.PFD_DOUBLEBUFFER) != 0;
@@ -173,7 +172,7 @@ public boolean isCurrent () {
public void setCurrent () {
checkWidget ();
if (WGL.wglGetCurrentContext () == context) return;
- long /*int*/ hDC = OS.GetDC (handle);
+ long hDC = OS.GetDC (handle);
WGL.wglMakeCurrent (hDC, context);
OS.ReleaseDC (handle, hDC);
}
@@ -188,7 +187,7 @@ public void setCurrent () {
*/
public void swapBuffers () {
checkWidget ();
- long /*int*/ hDC = OS.GetDC (handle);
+ long hDC = OS.GetDC (handle);
WGL.SwapBuffers (hDC);
OS.ReleaseDC (handle, hDC);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c
index 1347d62edb..bcd62a9d07 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c
@@ -15,7 +15,7 @@
*
* IBM
* - Binding to permit interfacing between Cairo and SWT
- * - Copyright (C) 2005, 2019 IBM Corp. All Rights Reserved.
+ * - Copyright (C) 2005, 2021 IBM Corp. All Rights Reserved.
*
* ***** END LICENSE BLOCK ***** */
@@ -42,507 +42,437 @@ JNIEXPORT jint JNICALL Cairo_NATIVE(CAIRO_1VERSION_1ENCODE)
}
#endif
-#ifndef NO__1cairo_1append_1path
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1append_1path)
+#ifndef NO_cairo_1append_1path
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1append_1path)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1append_1path_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1append_1path_FUNC);
cairo_append_path((cairo_t *)arg0, (cairo_path_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1append_1path_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1append_1path_FUNC);
}
#endif
-#ifndef NO__1cairo_1arc
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1arc)
+#ifndef NO_cairo_1arc
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1arc)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1arc_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1arc_FUNC);
cairo_arc((cairo_t *)arg0, arg1, arg2, arg3, arg4, arg5);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1arc_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1arc_FUNC);
}
#endif
-#ifndef NO__1cairo_1arc_1negative
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1arc_1negative)
+#ifndef NO_cairo_1arc_1negative
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1arc_1negative)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1arc_1negative_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1arc_1negative_FUNC);
cairo_arc_negative((cairo_t *)arg0, arg1, arg2, arg3, arg4, arg5);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1arc_1negative_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1arc_1negative_FUNC);
}
#endif
-#ifndef NO__1cairo_1clip
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1clip)
+#ifndef NO_cairo_1clip
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1clip)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1clip_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1clip_FUNC);
cairo_clip((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1clip_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1clip_FUNC);
}
#endif
-#ifndef NO__1cairo_1close_1path
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1close_1path)
+#ifndef NO_cairo_1close_1path
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1close_1path)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1close_1path_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1close_1path_FUNC);
cairo_close_path((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1close_1path_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1close_1path_FUNC);
}
#endif
-#ifndef NO__1cairo_1copy_1page
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1copy_1page)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1copy_1page_FUNC);
- cairo_copy_page((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1copy_1page_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1copy_1path
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1copy_1path)
+#ifndef NO_cairo_1copy_1path
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1copy_1path)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1copy_1path_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1copy_1path_FUNC);
rc = (jlong)cairo_copy_path((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1copy_1path_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1copy_1path_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1copy_1path_1flat
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1copy_1path_1flat)
+#ifndef NO_cairo_1copy_1path_1flat
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1copy_1path_1flat)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1copy_1path_1flat_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1copy_1path_1flat_FUNC);
rc = (jlong)cairo_copy_path_flat((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1copy_1path_1flat_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1copy_1path_1flat_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1create
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1create)
+#ifndef NO_cairo_1create
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1create)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1create_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1create_FUNC);
rc = (jlong)cairo_create((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1create_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1create_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1curve_1to
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1curve_1to)
+#ifndef NO_cairo_1curve_1to
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1curve_1to)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jdouble arg6)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1curve_1to_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1curve_1to_FUNC);
cairo_curve_to((cairo_t *)arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1curve_1to_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1curve_1to_FUNC);
}
#endif
-#ifndef NO__1cairo_1destroy
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1destroy)
+#ifndef NO_cairo_1destroy
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1destroy_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1destroy_FUNC);
cairo_destroy((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1destroy_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1destroy_FUNC);
}
#endif
-#ifndef NO__1cairo_1fill
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1fill)
+#ifndef NO_cairo_1fill
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1fill)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1fill_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1fill_FUNC);
cairo_fill((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1fill_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1fill_FUNC);
}
#endif
-#ifndef NO__1cairo_1font_1options_1create
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1font_1options_1create)
+#ifndef NO_cairo_1font_1options_1create
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1font_1options_1create)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1font_1options_1create_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1create_FUNC);
rc = (jlong)cairo_font_options_create();
- Cairo_NATIVE_EXIT(env, that, _1cairo_1font_1options_1create_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1create_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1font_1options_1destroy
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1font_1options_1destroy)
+#ifndef NO_cairo_1font_1options_1destroy
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1font_1options_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1font_1options_1destroy_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1destroy_FUNC);
cairo_font_options_destroy((cairo_font_options_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1font_1options_1destroy_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1destroy_FUNC);
}
#endif
-#ifndef NO__1cairo_1font_1options_1get_1antialias
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1font_1options_1get_1antialias)
+#ifndef NO_cairo_1font_1options_1get_1antialias
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1font_1options_1get_1antialias)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1font_1options_1get_1antialias_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1get_1antialias_FUNC);
rc = (jint)cairo_font_options_get_antialias((cairo_font_options_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1font_1options_1get_1antialias_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1get_1antialias_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1font_1options_1set_1antialias
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1font_1options_1set_1antialias)
+#ifndef NO_cairo_1font_1options_1set_1antialias
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1font_1options_1set_1antialias)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1font_1options_1set_1antialias_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1font_1options_1set_1antialias_FUNC);
cairo_font_options_set_antialias((cairo_font_options_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1font_1options_1set_1antialias_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1font_1options_1set_1antialias_FUNC);
}
#endif
-#ifndef NO__1cairo_1get_1antialias
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1get_1antialias)
+#ifndef NO_cairo_1get_1antialias
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1get_1antialias)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1antialias_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1antialias_FUNC);
rc = (jint)cairo_get_antialias((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1antialias_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1antialias_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1get_1current_1point
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1get_1current_1point)
+#ifndef NO_cairo_1get_1current_1point
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1get_1current_1point)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1current_1point_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1current_1point_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
cairo_get_current_point((cairo_t *)arg0, lparg1, lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1current_1point_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1current_1point_FUNC);
}
#endif
-#ifndef NO__1cairo_1get_1fill_1rule
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1get_1fill_1rule)
+#ifndef NO_cairo_1get_1fill_1rule
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1get_1fill_1rule)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1fill_1rule_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1fill_1rule_FUNC);
rc = (jint)cairo_get_fill_rule((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1fill_1rule_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1fill_1rule_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1get_1font_1face
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1get_1font_1face)
+#ifndef NO_cairo_1get_1font_1face
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1get_1font_1face)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1font_1face_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1font_1face_FUNC);
rc = (jlong)cairo_get_font_face((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1font_1face_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1font_1face_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1get_1matrix
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1get_1matrix)
+#ifndef NO_cairo_1get_1matrix
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1get_1matrix)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1)
{
jdouble *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1matrix_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1matrix_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
cairo_get_matrix((cairo_t *)arg0, (cairo_matrix_t *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1matrix_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1get_1operator
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1get_1operator)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1operator_FUNC);
- rc = (jint)cairo_get_operator((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1operator_FUNC);
- return rc;
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1matrix_FUNC);
}
#endif
-#ifndef NO__1cairo_1get_1source
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1get_1source)
+#ifndef NO_cairo_1get_1source
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1get_1source)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1source_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1source_FUNC);
rc = (jlong)cairo_get_source((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1source_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1source_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1get_1target
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1get_1target)
+#ifndef NO_cairo_1get_1target
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1get_1target)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1target_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1target_FUNC);
rc = (jlong)cairo_get_target((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1target_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1target_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1get_1tolerance
-JNIEXPORT jdouble JNICALL Cairo_NATIVE(_1cairo_1get_1tolerance)
+#ifndef NO_cairo_1get_1tolerance
+JNIEXPORT jdouble JNICALL Cairo_NATIVE(cairo_1get_1tolerance)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1get_1tolerance_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1get_1tolerance_FUNC);
rc = (jdouble)cairo_get_tolerance((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1get_1tolerance_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1get_1tolerance_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1identity_1matrix
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1identity_1matrix)
+#ifndef NO_cairo_1identity_1matrix
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1identity_1matrix)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1identity_1matrix_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1identity_1matrix_FUNC);
cairo_identity_matrix((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1identity_1matrix_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1identity_1matrix_FUNC);
}
#endif
-#ifndef NO__1cairo_1image_1surface_1create
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1create)
+#ifndef NO_cairo_1image_1surface_1create
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1image_1surface_1create)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1create_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1image_1surface_1create_FUNC);
rc = (jlong)cairo_image_surface_create(arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1create_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1image_1surface_1create_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1image_1surface_1get_1data
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1data)
+#ifndef NO_cairo_1image_1surface_1get_1data
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1image_1surface_1get_1data)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1data_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1image_1surface_1get_1data_FUNC);
rc = (jlong)cairo_image_surface_get_data((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1data_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1image_1surface_1get_1data_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1image_1surface_1get_1format
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1format)
+#ifndef NO_cairo_1image_1surface_1get_1format
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1image_1surface_1get_1format)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1format_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1image_1surface_1get_1format_FUNC);
rc = (jint)cairo_image_surface_get_format((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1format_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1image_1surface_1get_1format_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1image_1surface_1get_1height
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1height)
+#ifndef NO_cairo_1image_1surface_1get_1height
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1image_1surface_1get_1height)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1height_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1image_1surface_1get_1height_FUNC);
rc = (jint)cairo_image_surface_get_height((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1height_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1image_1surface_1get_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1image_1surface_1get_1stride
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1stride)
+#ifndef NO_cairo_1image_1surface_1get_1stride
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1image_1surface_1get_1stride)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1stride_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1image_1surface_1get_1stride_FUNC);
rc = (jint)cairo_image_surface_get_stride((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1stride_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1image_1surface_1get_1stride_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1image_1surface_1get_1width
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1width)
+#ifndef NO_cairo_1image_1surface_1get_1width
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1image_1surface_1get_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1width_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1image_1surface_1get_1width_FUNC);
rc = (jint)cairo_image_surface_get_width((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1width_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1image_1surface_1get_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1in_1fill
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1in_1fill)
+#ifndef NO_cairo_1in_1fill
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1in_1fill)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1in_1fill_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1in_1fill_FUNC);
rc = (jint)cairo_in_fill((cairo_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1in_1fill_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1in_1fill_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1in_1stroke
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1in_1stroke)
+#ifndef NO_cairo_1in_1stroke
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1in_1stroke)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1in_1stroke_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1in_1stroke_FUNC);
rc = (jint)cairo_in_stroke((cairo_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1in_1stroke_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1in_1stroke_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1line_1to
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1line_1to)
+#ifndef NO_cairo_1line_1to
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1line_1to)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1line_1to_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1line_1to_FUNC);
cairo_line_to((cairo_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1line_1to_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1line_1to_FUNC);
}
#endif
-#ifndef NO__1cairo_1mask
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1mask)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1mask_FUNC);
- cairo_mask((cairo_t *)arg0, (cairo_pattern_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1mask_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1mask_1surface
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1mask_1surface)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3)
-{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1mask_1surface_FUNC);
- cairo_mask_surface((cairo_t *)arg0, (cairo_surface_t *)arg1, arg2, arg3);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1mask_1surface_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1matrix_1init
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1init)
+#ifndef NO_cairo_1matrix_1init
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1matrix_1init)
(JNIEnv *env, jclass that, jdoubleArray arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jdouble arg6)
{
jdouble *lparg0=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1init_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1init_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
cairo_matrix_init((cairo_matrix_t *)lparg0, arg1, arg2, arg3, arg4, arg5, arg6);
fail:
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1init_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1init_FUNC);
}
#endif
-#ifndef NO__1cairo_1matrix_1init_1identity
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1init_1identity)
+#ifndef NO_cairo_1matrix_1init_1identity
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1matrix_1init_1identity)
(JNIEnv *env, jclass that, jdoubleArray arg0)
{
jdouble *lparg0=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1init_1identity_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1init_1identity_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
cairo_matrix_init_identity((cairo_matrix_t *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1init_1identity_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1init_1identity_FUNC);
}
#endif
-#ifndef NO__1cairo_1matrix_1init_1rotate
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1init_1rotate)
- (JNIEnv *env, jclass that, jdoubleArray arg0, jdouble arg1)
-{
- jdouble *lparg0=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1init_1rotate_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
- cairo_matrix_init_rotate((cairo_matrix_t *)lparg0, arg1);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1init_1rotate_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1matrix_1init_1scale
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1init_1scale)
- (JNIEnv *env, jclass that, jdoubleArray arg0, jdouble arg1, jdouble arg2)
-{
- jdouble *lparg0=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1init_1scale_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
- cairo_matrix_init_scale((cairo_matrix_t *)lparg0, arg1, arg2);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1init_1scale_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1matrix_1invert
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1matrix_1invert)
+#ifndef NO_cairo_1matrix_1invert
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1matrix_1invert)
(JNIEnv *env, jclass that, jdoubleArray arg0)
{
jdouble *lparg0=NULL;
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1invert_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1invert_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)cairo_matrix_invert((cairo_matrix_t *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1invert_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1invert_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1matrix_1multiply
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1multiply)
+#ifndef NO_cairo_1matrix_1multiply
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1matrix_1multiply)
(JNIEnv *env, jclass that, jdoubleArray arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg0=NULL;
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1multiply_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1multiply_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
@@ -551,66 +481,46 @@ fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1multiply_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1multiply_FUNC);
}
#endif
-#ifndef NO__1cairo_1matrix_1rotate
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1rotate)
+#ifndef NO_cairo_1matrix_1rotate
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1matrix_1rotate)
(JNIEnv *env, jclass that, jdoubleArray arg0, jdouble arg1)
{
jdouble *lparg0=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1rotate_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1rotate_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
cairo_matrix_rotate((cairo_matrix_t *)lparg0, arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1rotate_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1rotate_FUNC);
}
#endif
-#ifndef NO__1cairo_1matrix_1scale
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1scale)
+#ifndef NO_cairo_1matrix_1scale
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1matrix_1scale)
(JNIEnv *env, jclass that, jdoubleArray arg0, jdouble arg1, jdouble arg2)
{
jdouble *lparg0=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1scale_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1scale_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
cairo_matrix_scale((cairo_matrix_t *)lparg0, arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1scale_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1scale_FUNC);
}
#endif
-#ifndef NO__1cairo_1matrix_1transform_1distance
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1transform_1distance)
+#ifndef NO_cairo_1matrix_1transform_1point
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1matrix_1transform_1point)
(JNIEnv *env, jclass that, jdoubleArray arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg0=NULL;
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1transform_1distance_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
- cairo_matrix_transform_distance((cairo_matrix_t *)lparg0, lparg1, lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1transform_1distance_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1matrix_1transform_1point
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1transform_1point)
- (JNIEnv *env, jclass that, jdoubleArray arg0, jdoubleArray arg1, jdoubleArray arg2)
-{
- jdouble *lparg0=NULL;
- jdouble *lparg1=NULL;
- jdouble *lparg2=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1transform_1point_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1transform_1point_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
@@ -619,169 +529,181 @@ fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1transform_1point_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1transform_1point_FUNC);
}
#endif
-#ifndef NO__1cairo_1matrix_1translate
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1matrix_1translate)
+#ifndef NO_cairo_1matrix_1translate
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1matrix_1translate)
(JNIEnv *env, jclass that, jdoubleArray arg0, jdouble arg1, jdouble arg2)
{
jdouble *lparg0=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1matrix_1translate_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1matrix_1translate_FUNC);
if (arg0) if ((lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL)) == NULL) goto fail;
cairo_matrix_translate((cairo_matrix_t *)lparg0, arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1matrix_1translate_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1matrix_1translate_FUNC);
}
#endif
-#ifndef NO__1cairo_1move_1to
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1move_1to)
+#ifndef NO_cairo_1move_1to
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1move_1to)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1move_1to_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1move_1to_FUNC);
cairo_move_to((cairo_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1move_1to_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1move_1to_FUNC);
}
#endif
-#ifndef NO__1cairo_1new_1path
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1new_1path)
+#ifndef NO_cairo_1new_1path
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1new_1path)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1new_1path_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1new_1path_FUNC);
cairo_new_path((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1new_1path_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1new_1path_FUNC);
}
#endif
-#ifndef NO__1cairo_1paint
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1paint)
+#ifndef NO_cairo_1paint
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1paint)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1paint_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1paint_FUNC);
cairo_paint((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1paint_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1paint_FUNC);
}
#endif
-#ifndef NO__1cairo_1paint_1with_1alpha
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1paint_1with_1alpha)
+#ifndef NO_cairo_1paint_1with_1alpha
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1paint_1with_1alpha)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1paint_1with_1alpha_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1paint_1with_1alpha_FUNC);
cairo_paint_with_alpha((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1paint_1with_1alpha_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1paint_1with_1alpha_FUNC);
+}
+#endif
+
+#ifndef NO_cairo_1path_1data_1t_1sizeof
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1path_1data_1t_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ Cairo_NATIVE_ENTER(env, that, cairo_1path_1data_1t_1sizeof_FUNC);
+ rc = (jint)cairo_path_data_t_sizeof();
+ Cairo_NATIVE_EXIT(env, that, cairo_1path_1data_1t_1sizeof_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1cairo_1path_1destroy
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1path_1destroy)
+#ifndef NO_cairo_1path_1destroy
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1path_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1path_1destroy_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1path_1destroy_FUNC);
cairo_path_destroy((cairo_path_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1path_1destroy_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1path_1destroy_FUNC);
}
#endif
-#ifndef NO__1cairo_1pattern_1add_1color_1stop_1rgba
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pattern_1add_1color_1stop_1rgba)
+#ifndef NO_cairo_1path_1t_1sizeof
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1path_1t_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ Cairo_NATIVE_ENTER(env, that, cairo_1path_1t_1sizeof_FUNC);
+ rc = (jint)cairo_path_t_sizeof();
+ Cairo_NATIVE_EXIT(env, that, cairo_1path_1t_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_cairo_1pattern_1add_1color_1stop_1rgba
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1pattern_1add_1color_1stop_1rgba)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1add_1color_1stop_1rgba_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pattern_1add_1color_1stop_1rgba_FUNC);
cairo_pattern_add_color_stop_rgba((cairo_pattern_t *)arg0, arg1, arg2, arg3, arg4, arg5);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1add_1color_1stop_1rgba_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pattern_1add_1color_1stop_1rgba_FUNC);
}
#endif
-#ifndef NO__1cairo_1pattern_1create_1for_1surface
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1pattern_1create_1for_1surface)
+#ifndef NO_cairo_1pattern_1create_1for_1surface
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1pattern_1create_1for_1surface)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1create_1for_1surface_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pattern_1create_1for_1surface_FUNC);
rc = (jlong)cairo_pattern_create_for_surface((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1create_1for_1surface_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pattern_1create_1for_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1pattern_1create_1linear
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1pattern_1create_1linear)
+#ifndef NO_cairo_1pattern_1create_1linear
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1pattern_1create_1linear)
(JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1create_1linear_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pattern_1create_1linear_FUNC);
rc = (jlong)cairo_pattern_create_linear(arg0, arg1, arg2, arg3);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1create_1linear_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pattern_1create_1linear_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1pattern_1destroy
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pattern_1destroy)
+#ifndef NO_cairo_1pattern_1destroy
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1pattern_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1destroy_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pattern_1destroy_FUNC);
cairo_pattern_destroy((cairo_pattern_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1destroy_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pattern_1destroy_FUNC);
}
#endif
-#ifndef NO__1cairo_1pattern_1get_1extend
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1pattern_1get_1extend)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1get_1extend_FUNC);
- rc = (jint)cairo_pattern_get_extend((cairo_pattern_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1get_1extend_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1cairo_1pattern_1set_1extend
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pattern_1set_1extend)
+#ifndef NO_cairo_1pattern_1set_1extend
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1pattern_1set_1extend)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1set_1extend_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pattern_1set_1extend_FUNC);
cairo_pattern_set_extend((cairo_pattern_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1set_1extend_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pattern_1set_1extend_FUNC);
}
#endif
-#ifndef NO__1cairo_1pattern_1set_1filter
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pattern_1set_1filter)
+#ifndef NO_cairo_1pattern_1set_1filter
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1pattern_1set_1filter)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1set_1filter_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pattern_1set_1filter_FUNC);
cairo_pattern_set_filter((cairo_pattern_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1set_1filter_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pattern_1set_1filter_FUNC);
}
#endif
-#ifndef NO__1cairo_1pattern_1set_1matrix
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pattern_1set_1matrix)
+#ifndef NO_cairo_1pattern_1set_1matrix
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1pattern_1set_1matrix)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1)
{
jdouble *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pattern_1set_1matrix_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pattern_1set_1matrix_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
cairo_pattern_set_matrix((cairo_pattern_t *)arg0, (cairo_matrix_t *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pattern_1set_1matrix_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pattern_1set_1matrix_FUNC);
}
#endif
-#ifndef NO__1cairo_1pdf_1surface_1set_1size
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pdf_1surface_1set_1size)
+#ifndef NO_cairo_1pdf_1surface_1set_1size
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1pdf_1surface_1set_1size)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pdf_1surface_1set_1size_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pdf_1surface_1set_1size_FUNC);
/*
cairo_pdf_surface_set_size((cairo_surface_t *)arg0, arg1, arg2);
*/
@@ -791,25 +713,25 @@ JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pdf_1surface_1set_1size)
((void (CALLING_CONVENTION*)(cairo_surface_t *, jdouble, jdouble))fp)((cairo_surface_t *)arg0, arg1, arg2);
}
}
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pdf_1surface_1set_1size_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pdf_1surface_1set_1size_FUNC);
}
#endif
-#ifndef NO__1cairo_1pop_1group_1to_1source
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1pop_1group_1to_1source)
+#ifndef NO_cairo_1pop_1group_1to_1source
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1pop_1group_1to_1source)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1pop_1group_1to_1source_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1pop_1group_1to_1source_FUNC);
cairo_pop_group_to_source((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1pop_1group_1to_1source_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1pop_1group_1to_1source_FUNC);
}
#endif
-#ifndef NO__1cairo_1ps_1surface_1set_1size
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1ps_1surface_1set_1size)
+#ifndef NO_cairo_1ps_1surface_1set_1size
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1ps_1surface_1set_1size)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1ps_1surface_1set_1size_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1ps_1surface_1set_1size_FUNC);
/*
cairo_ps_surface_set_size((cairo_surface_t *)arg0, arg1, arg2);
*/
@@ -819,534 +741,514 @@ JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1ps_1surface_1set_1size)
((void (CALLING_CONVENTION*)(cairo_surface_t *, jdouble, jdouble))fp)((cairo_surface_t *)arg0, arg1, arg2);
}
}
- Cairo_NATIVE_EXIT(env, that, _1cairo_1ps_1surface_1set_1size_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1ps_1surface_1set_1size_FUNC);
}
#endif
-#ifndef NO__1cairo_1push_1group
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1push_1group)
+#ifndef NO_cairo_1push_1group
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1push_1group)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1push_1group_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1push_1group_FUNC);
cairo_push_group((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1push_1group_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1push_1group_FUNC);
}
#endif
-#ifndef NO__1cairo_1rectangle
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1rectangle)
+#ifndef NO_cairo_1rectangle
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1rectangle)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1rectangle_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1rectangle_FUNC);
cairo_rectangle((cairo_t *)arg0, arg1, arg2, arg3, arg4);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1rectangle_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1rectangle_FUNC);
}
#endif
-#ifndef NO__1cairo_1reference
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1reference)
+#ifndef NO_cairo_1rectangle_1int_1t_1sizeof
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1rectangle_1int_1t_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ Cairo_NATIVE_ENTER(env, that, cairo_1rectangle_1int_1t_1sizeof_FUNC);
+ rc = (jint)cairo_rectangle_int_t_sizeof();
+ Cairo_NATIVE_EXIT(env, that, cairo_1rectangle_1int_1t_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_cairo_1reference
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1reference)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1reference_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1reference_FUNC);
rc = (jlong)cairo_reference((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1reference_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1reference_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1contains_1point
-JNIEXPORT jboolean JNICALL Cairo_NATIVE(_1cairo_1region_1contains_1point)
+#ifndef NO_cairo_1region_1contains_1point
+JNIEXPORT jboolean JNICALL Cairo_NATIVE(cairo_1region_1contains_1point)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1contains_1point_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1contains_1point_FUNC);
rc = (jboolean)cairo_region_contains_point((cairo_region_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1contains_1point_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1contains_1point_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1contains_1rectangle
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1region_1contains_1rectangle)
+#ifndef NO_cairo_1region_1contains_1rectangle
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1region_1contains_1rectangle)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
cairo_rectangle_int_t _arg1, *lparg1=NULL;
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1contains_1rectangle_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1contains_1rectangle_FUNC);
if (arg1) if ((lparg1 = getcairo_rectangle_int_tFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jlong)cairo_region_contains_rectangle((cairo_region_t *)arg0, (cairo_rectangle_int_t *)lparg1);
fail:
if (arg1 && lparg1) setcairo_rectangle_int_tFields(env, arg1, lparg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1contains_1rectangle_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1contains_1rectangle_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1copy
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1region_1copy)
+#ifndef NO_cairo_1region_1copy
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1region_1copy)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1copy_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1copy_FUNC);
rc = (jlong)cairo_region_copy((cairo_region_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1copy_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1copy_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1create
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1region_1create)
+#ifndef NO_cairo_1region_1create
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1region_1create)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1create_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1create_FUNC);
rc = (jlong)cairo_region_create();
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1create_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1create_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1create_1rectangle
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1region_1create_1rectangle)
+#ifndef NO_cairo_1region_1create_1rectangle
+JNIEXPORT jlong JNICALL Cairo_NATIVE(cairo_1region_1create_1rectangle)
(JNIEnv *env, jclass that, jobject arg0)
{
cairo_rectangle_int_t _arg0, *lparg0=NULL;
jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1create_1rectangle_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1create_1rectangle_FUNC);
if (arg0) if ((lparg0 = getcairo_rectangle_int_tFields(env, arg0, &_arg0)) == NULL) goto fail;
rc = (jlong)cairo_region_create_rectangle((const cairo_rectangle_int_t *)lparg0);
fail:
if (arg0 && lparg0) setcairo_rectangle_int_tFields(env, arg0, lparg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1create_1rectangle_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1create_1rectangle_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1destroy
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1destroy)
+#ifndef NO_cairo_1region_1destroy
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1destroy_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1destroy_FUNC);
cairo_region_destroy((cairo_region_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1destroy_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1destroy_FUNC);
}
#endif
-#ifndef NO__1cairo_1region_1get_1extents
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1get_1extents)
+#ifndef NO_cairo_1region_1get_1extents
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1get_1extents)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
cairo_rectangle_int_t _arg1, *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1get_1extents_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1get_1extents_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
cairo_region_get_extents((cairo_region_t *)arg0, (cairo_rectangle_int_t *)lparg1);
fail:
if (arg1 && lparg1) setcairo_rectangle_int_tFields(env, arg1, lparg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1get_1extents_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1get_1extents_FUNC);
}
#endif
-#ifndef NO__1cairo_1region_1get_1rectangle
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1get_1rectangle)
+#ifndef NO_cairo_1region_1get_1rectangle
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1get_1rectangle)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1get_1rectangle_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1get_1rectangle_FUNC);
cairo_region_get_rectangle((cairo_region_t *)arg0, arg1, (cairo_rectangle_int_t *)arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1get_1rectangle_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1get_1rectangle_FUNC);
}
#endif
-#ifndef NO__1cairo_1region_1intersect
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1intersect)
+#ifndef NO_cairo_1region_1intersect
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1intersect)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1intersect_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1intersect_FUNC);
cairo_region_intersect((cairo_region_t *)arg0, (const cairo_region_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1intersect_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1intersect_FUNC);
}
#endif
-#ifndef NO__1cairo_1region_1is_1empty
-JNIEXPORT jboolean JNICALL Cairo_NATIVE(_1cairo_1region_1is_1empty)
+#ifndef NO_cairo_1region_1is_1empty
+JNIEXPORT jboolean JNICALL Cairo_NATIVE(cairo_1region_1is_1empty)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1is_1empty_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1is_1empty_FUNC);
rc = (jboolean)cairo_region_is_empty((cairo_region_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1is_1empty_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1is_1empty_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1num_1rectangles
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1region_1num_1rectangles)
+#ifndef NO_cairo_1region_1num_1rectangles
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1region_1num_1rectangles)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1num_1rectangles_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1num_1rectangles_FUNC);
rc = (jint)cairo_region_num_rectangles((cairo_region_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1num_1rectangles_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1num_1rectangles_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1region_1subtract
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1subtract)
+#ifndef NO_cairo_1region_1subtract
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1subtract)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1subtract_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1subtract_FUNC);
cairo_region_subtract((cairo_region_t *)arg0, (const cairo_region_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1subtract_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1subtract_FUNC);
}
#endif
-#ifndef NO__1cairo_1region_1translate
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1translate)
+#ifndef NO_cairo_1region_1translate
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1translate)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1translate_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1translate_FUNC);
cairo_region_translate((cairo_region_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1translate_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1translate_FUNC);
}
#endif
-#ifndef NO__1cairo_1region_1union
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1union)
+#ifndef NO_cairo_1region_1union
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1union)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1union_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1union_FUNC);
cairo_region_union((cairo_region_t *)arg0, (const cairo_region_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1union_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1union_FUNC);
}
#endif
-#ifndef NO__1cairo_1region_1union_1rectangle
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1union_1rectangle)
+#ifndef NO_cairo_1region_1union_1rectangle
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1region_1union_1rectangle)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
cairo_rectangle_int_t _arg1, *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1union_1rectangle_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1region_1union_1rectangle_FUNC);
if (arg1) if ((lparg1 = getcairo_rectangle_int_tFields(env, arg1, &_arg1)) == NULL) goto fail;
cairo_region_union_rectangle((cairo_region_t *)arg0, (cairo_rectangle_int_t *)lparg1);
fail:
- Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1union_1rectangle_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1region_1union_1rectangle_FUNC);
}
#endif
-#ifndef NO__1cairo_1reset_1clip
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1reset_1clip)
+#ifndef NO_cairo_1reset_1clip
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1reset_1clip)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1reset_1clip_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1reset_1clip_FUNC);
cairo_reset_clip((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1reset_1clip_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1reset_1clip_FUNC);
}
#endif
-#ifndef NO__1cairo_1restore
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1restore)
+#ifndef NO_cairo_1restore
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1restore)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1restore_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1restore_FUNC);
cairo_restore((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1restore_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1rotate
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1rotate)
- (JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
-{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1rotate_FUNC);
- cairo_rotate((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1rotate_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1restore_FUNC);
}
#endif
-#ifndef NO__1cairo_1save
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1save)
+#ifndef NO_cairo_1save
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1save)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1save_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1save_FUNC);
cairo_save((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1save_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1save_FUNC);
}
#endif
-#ifndef NO__1cairo_1scale
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1scale)
+#ifndef NO_cairo_1scale
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1scale)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1scale_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1scale_FUNC);
cairo_scale((cairo_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1scale_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1scale_FUNC);
}
#endif
-#ifndef NO__1cairo_1select_1font_1face
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1select_1font_1face)
+#ifndef NO_cairo_1select_1font_1face
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1select_1font_1face)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jint arg3)
{
jbyte *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1select_1font_1face_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1select_1font_1face_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
cairo_select_font_face((cairo_t *)arg0, (const char *)lparg1, arg2, arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1select_1font_1face_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1select_1font_1face_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1antialias
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1antialias)
+#ifndef NO_cairo_1set_1antialias
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1antialias)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1antialias_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1antialias_FUNC);
cairo_set_antialias((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1antialias_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1antialias_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1dash
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1dash)
+#ifndef NO_cairo_1set_1dash
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1dash)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jint arg2, jdouble arg3)
{
jdouble *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1dash_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1dash_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
cairo_set_dash((cairo_t *)arg0, lparg1, arg2, arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1dash_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1dash_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1fill_1rule
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1fill_1rule)
+#ifndef NO_cairo_1set_1fill_1rule
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1fill_1rule)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1fill_1rule_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1fill_1rule_FUNC);
cairo_set_fill_rule((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1fill_1rule_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1fill_1rule_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1font_1face
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1font_1face)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1font_1face_FUNC);
- cairo_set_font_face((cairo_t *)arg0, (cairo_font_face_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1font_1face_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1set_1font_1size
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1font_1size)
+#ifndef NO_cairo_1set_1font_1size
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1font_1size)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1font_1size_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1font_1size_FUNC);
cairo_set_font_size((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1font_1size_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1font_1size_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1line_1cap
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1line_1cap)
+#ifndef NO_cairo_1set_1line_1cap
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1line_1cap)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1line_1cap_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1line_1cap_FUNC);
cairo_set_line_cap((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1line_1cap_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1line_1cap_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1line_1join
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1line_1join)
+#ifndef NO_cairo_1set_1line_1join
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1line_1join)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1line_1join_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1line_1join_FUNC);
cairo_set_line_join((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1line_1join_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1line_1join_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1line_1width
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1line_1width)
+#ifndef NO_cairo_1set_1line_1width
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1line_1width)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1line_1width_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1line_1width_FUNC);
cairo_set_line_width((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1line_1width_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1line_1width_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1matrix
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1matrix)
+#ifndef NO_cairo_1set_1matrix
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1matrix)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1)
{
jdouble *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1matrix_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1matrix_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
cairo_set_matrix((cairo_t *)arg0, (cairo_matrix_t *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1matrix_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1matrix_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1miter_1limit
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1miter_1limit)
+#ifndef NO_cairo_1set_1miter_1limit
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1miter_1limit)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1miter_1limit_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1miter_1limit_FUNC);
cairo_set_miter_limit((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1miter_1limit_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1miter_1limit_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1operator
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1operator)
+#ifndef NO_cairo_1set_1operator
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1operator)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1operator_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1operator_FUNC);
cairo_set_operator((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1operator_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1operator_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1source
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1source)
+#ifndef NO_cairo_1set_1source
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1source)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1source_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1source_FUNC);
cairo_set_source((cairo_t *)arg0, (cairo_pattern_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1source_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1source_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1source_1rgb
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1source_1rgb)
+#ifndef NO_cairo_1set_1source_1rgb
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1source_1rgb)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1source_1rgb_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1source_1rgb_FUNC);
cairo_set_source_rgb((cairo_t *)arg0, arg1, arg2, arg3);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1source_1rgb_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1source_1rgb_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1source_1rgba
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1source_1rgba)
+#ifndef NO_cairo_1set_1source_1rgba
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1source_1rgba)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1source_1rgba_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1source_1rgba_FUNC);
cairo_set_source_rgba((cairo_t *)arg0, arg1, arg2, arg3, arg4);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1source_1rgba_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1source_1rgba_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1source_1surface
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1source_1surface)
+#ifndef NO_cairo_1set_1source_1surface
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1source_1surface)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1source_1surface_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1source_1surface_FUNC);
cairo_set_source_surface((cairo_t *)arg0, (cairo_surface_t *)arg1, arg2, arg3);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1source_1surface_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1source_1surface_FUNC);
}
#endif
-#ifndef NO__1cairo_1set_1tolerance
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1set_1tolerance)
+#ifndef NO_cairo_1set_1tolerance
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1set_1tolerance)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1set_1tolerance_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1set_1tolerance_FUNC);
cairo_set_tolerance((cairo_t *)arg0, arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1set_1tolerance_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1set_1tolerance_FUNC);
}
#endif
-#ifndef NO__1cairo_1show_1page
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1show_1page)
+#ifndef NO_cairo_1show_1page
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1show_1page)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1show_1page_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1show_1page_FUNC);
cairo_show_page((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1show_1page_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1show_1page_FUNC);
}
#endif
-#ifndef NO__1cairo_1stroke
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1stroke)
+#ifndef NO_cairo_1stroke
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1stroke)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1stroke_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1stroke_FUNC);
cairo_stroke((cairo_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1stroke_FUNC);
-}
-#endif
-
-#ifndef NO__1cairo_1surface_1create_1similar
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1surface_1create_1similar)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
-{
- jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1create_1similar_FUNC);
- rc = (jlong)cairo_surface_create_similar((cairo_surface_t *)arg0, arg1, arg2, arg3);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1create_1similar_FUNC);
- return rc;
+ Cairo_NATIVE_EXIT(env, that, cairo_1stroke_FUNC);
}
#endif
-#ifndef NO__1cairo_1surface_1destroy
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1destroy)
+#ifndef NO_cairo_1surface_1destroy
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1destroy_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1destroy_FUNC);
cairo_surface_destroy((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1destroy_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1destroy_FUNC);
}
#endif
-#ifndef NO__1cairo_1surface_1finish
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1finish)
+#ifndef NO_cairo_1surface_1finish
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1finish)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1finish_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1finish_FUNC);
cairo_surface_finish((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1finish_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1finish_FUNC);
}
#endif
-#ifndef NO__1cairo_1surface_1flush
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1flush)
+#ifndef NO_cairo_1surface_1flush
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1flush)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1flush_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1flush_FUNC);
cairo_surface_flush((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1flush_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1flush_FUNC);
}
#endif
-#ifndef NO__1cairo_1surface_1get_1content
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1surface_1get_1content)
+#ifndef NO_cairo_1surface_1get_1content
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1surface_1get_1content)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1get_1content_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1get_1content_FUNC);
rc = (jint)cairo_surface_get_content((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1get_1content_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1get_1content_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1surface_1get_1device_1scale
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1get_1device_1scale)
+#ifndef NO_cairo_1surface_1get_1device_1scale
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1get_1device_1scale)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1get_1device_1scale_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1get_1device_1scale_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
@@ -1361,59 +1263,47 @@ JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1get_1device_1scale)
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1get_1device_1scale_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1get_1device_1scale_FUNC);
}
#endif
-#ifndef NO__1cairo_1surface_1get_1type
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1surface_1get_1type)
+#ifndef NO_cairo_1surface_1get_1type
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1surface_1get_1type)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1get_1type_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1get_1type_FUNC);
rc = (jint)cairo_surface_get_type((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1get_1type_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1surface_1get_1user_1data
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1surface_1get_1user_1data)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1get_1user_1data_FUNC);
- rc = (jlong)cairo_surface_get_user_data((cairo_surface_t *)arg0, (cairo_user_data_key_t *)arg1);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1get_1user_1data_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1cairo_1surface_1mark_1dirty
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1mark_1dirty)
+#ifndef NO_cairo_1surface_1mark_1dirty
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1mark_1dirty)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1mark_1dirty_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1mark_1dirty_FUNC);
cairo_surface_mark_dirty((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1mark_1dirty_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1mark_1dirty_FUNC);
}
#endif
-#ifndef NO__1cairo_1surface_1reference
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1reference)
+#ifndef NO_cairo_1surface_1reference
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1reference)
(JNIEnv *env, jclass that, jlong arg0)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1reference_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1reference_FUNC);
cairo_surface_reference((cairo_surface_t *)arg0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1reference_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1reference_FUNC);
}
#endif
-#ifndef NO__1cairo_1surface_1set_1device_1scale
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1set_1device_1scale)
+#ifndef NO_cairo_1surface_1set_1device_1scale
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1set_1device_1scale)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1surface_1set_1device_1scale_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1surface_1set_1device_1scale_FUNC);
/*
cairo_surface_set_device_scale((cairo_surface_t *)arg0, arg1, arg2);
*/
@@ -1423,69 +1313,69 @@ JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1surface_1set_1device_1scale)
((void (CALLING_CONVENTION*)(cairo_surface_t *, jdouble, jdouble))fp)((cairo_surface_t *)arg0, arg1, arg2);
}
}
- Cairo_NATIVE_EXIT(env, that, _1cairo_1surface_1set_1device_1scale_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1surface_1set_1device_1scale_FUNC);
}
#endif
-#ifndef NO__1cairo_1transform
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1transform)
+#ifndef NO_cairo_1transform
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1transform)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1)
{
jdouble *lparg1=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1transform_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1transform_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
cairo_transform((cairo_t *)arg0, (cairo_matrix_t *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1transform_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1transform_FUNC);
}
#endif
-#ifndef NO__1cairo_1translate
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1translate)
+#ifndef NO_cairo_1translate
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1translate)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- Cairo_NATIVE_ENTER(env, that, _1cairo_1translate_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1translate_FUNC);
cairo_translate((cairo_t *)arg0, arg1, arg2);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1translate_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1translate_FUNC);
}
#endif
-#ifndef NO__1cairo_1user_1to_1device_1distance
-JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1user_1to_1device_1distance)
+#ifndef NO_cairo_1user_1to_1device_1distance
+JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1user_1to_1device_1distance)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1user_1to_1device_1distance_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1user_1to_1device_1distance_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
cairo_user_to_device_distance((cairo_t *)arg0, lparg1, lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1user_1to_1device_1distance_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1user_1to_1device_1distance_FUNC);
}
#endif
-#ifndef NO__1cairo_1xlib_1surface_1create
-JNIEXPORT jlong JNICALL Cairo_NATIVE(_1cairo_1xlib_1surface_1create)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3, jint arg4)
+#ifndef NO_cairo_1version
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1version)
+ (JNIEnv *env, jclass that)
{
- jlong rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1xlib_1surface_1create_FUNC);
- rc = (jlong)cairo_xlib_surface_create((Display *)arg0, (Drawable)arg1, (Visual *)arg2, arg3, arg4);
- Cairo_NATIVE_EXIT(env, that, _1cairo_1xlib_1surface_1create_FUNC);
+ jint rc = 0;
+ Cairo_NATIVE_ENTER(env, that, cairo_1version_FUNC);
+ rc = (jint)cairo_version();
+ Cairo_NATIVE_EXIT(env, that, cairo_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1xlib_1surface_1get_1height
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1xlib_1surface_1get_1height)
+#ifndef NO_cairo_1xlib_1surface_1get_1height
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1xlib_1surface_1get_1height)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1xlib_1surface_1get_1height_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1xlib_1surface_1get_1height_FUNC);
/*
rc = (jint)cairo_xlib_surface_get_height((cairo_surface_t *)arg0);
*/
@@ -1495,17 +1385,17 @@ JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1xlib_1surface_1get_1height)
rc = (jint)((jint (CALLING_CONVENTION*)(cairo_surface_t *))fp)((cairo_surface_t *)arg0);
}
}
- Cairo_NATIVE_EXIT(env, that, _1cairo_1xlib_1surface_1get_1height_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1xlib_1surface_1get_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1cairo_1xlib_1surface_1get_1width
-JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1xlib_1surface_1get_1width)
+#ifndef NO_cairo_1xlib_1surface_1get_1width
+JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1xlib_1surface_1get_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, _1cairo_1xlib_1surface_1get_1width_FUNC);
+ Cairo_NATIVE_ENTER(env, that, cairo_1xlib_1surface_1get_1width_FUNC);
/*
rc = (jint)cairo_xlib_surface_get_width((cairo_surface_t *)arg0);
*/
@@ -1515,55 +1405,7 @@ JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1xlib_1surface_1get_1width)
rc = (jint)((jint (CALLING_CONVENTION*)(cairo_surface_t *))fp)((cairo_surface_t *)arg0);
}
}
- Cairo_NATIVE_EXIT(env, that, _1cairo_1xlib_1surface_1get_1width_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_cairo_1path_1data_1t_1sizeof
-JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1path_1data_1t_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, cairo_1path_1data_1t_1sizeof_FUNC);
- rc = (jint)cairo_path_data_t_sizeof();
- Cairo_NATIVE_EXIT(env, that, cairo_1path_1data_1t_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_cairo_1path_1t_1sizeof
-JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1path_1t_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, cairo_1path_1t_1sizeof_FUNC);
- rc = (jint)cairo_path_t_sizeof();
- Cairo_NATIVE_EXIT(env, that, cairo_1path_1t_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_cairo_1rectangle_1int_1t_1sizeof
-JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1rectangle_1int_1t_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, cairo_1rectangle_1int_1t_1sizeof_FUNC);
- rc = (jint)cairo_rectangle_int_t_sizeof();
- Cairo_NATIVE_EXIT(env, that, cairo_1rectangle_1int_1t_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_cairo_1version
-JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1version)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- Cairo_NATIVE_ENTER(env, that, cairo_1version_FUNC);
- rc = (jint)cairo_version();
- Cairo_NATIVE_EXIT(env, that, cairo_1version_FUNC);
+ Cairo_NATIVE_EXIT(env, that, cairo_1xlib_1surface_1get_1width_FUNC);
return rc;
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.h
index 49fbeb2a8f..3670783b22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.h
@@ -26,9 +26,9 @@
#ifdef CAIRO_HAS_XLIB_SURFACE
#include <cairo-xlib.h>
#else
-#define NO__1cairo_1xlib_1surface_1create
-#define NO__1cairo_1xlib_1surface_1get_1height
-#define NO__1cairo_1xlib_1surface_1get_1width
+#define NO_cairo_1xlib_1surface_1create
+#define NO_cairo_1xlib_1surface_1get_1height
+#define NO_cairo_1xlib_1surface_1get_1width
#endif
#include <string.h>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c
index 08adfd2b69..15a1ae04b8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c
@@ -15,7 +15,7 @@
*
* IBM
* - Binding to permit interfacing between Cairo and SWT
- * - Copyright (C) 2005, 2019 IBM Corp. All Rights Reserved.
+ * - Copyright (C) 2005, 2021 IBM Corp. All Rights Reserved.
*
* ***** END LICENSE BLOCK ***** */
@@ -29,133 +29,120 @@
char * Cairo_nativeFunctionNames[] = {
"CAIRO_1VERSION_1ENCODE",
- "_1cairo_1append_1path",
- "_1cairo_1arc",
- "_1cairo_1arc_1negative",
- "_1cairo_1clip",
- "_1cairo_1close_1path",
- "_1cairo_1copy_1page",
- "_1cairo_1copy_1path",
- "_1cairo_1copy_1path_1flat",
- "_1cairo_1create",
- "_1cairo_1curve_1to",
- "_1cairo_1destroy",
- "_1cairo_1fill",
- "_1cairo_1font_1options_1create",
- "_1cairo_1font_1options_1destroy",
- "_1cairo_1font_1options_1get_1antialias",
- "_1cairo_1font_1options_1set_1antialias",
- "_1cairo_1get_1antialias",
- "_1cairo_1get_1current_1point",
- "_1cairo_1get_1fill_1rule",
- "_1cairo_1get_1font_1face",
- "_1cairo_1get_1matrix",
- "_1cairo_1get_1operator",
- "_1cairo_1get_1source",
- "_1cairo_1get_1target",
- "_1cairo_1get_1tolerance",
- "_1cairo_1identity_1matrix",
- "_1cairo_1image_1surface_1create",
- "_1cairo_1image_1surface_1get_1data",
- "_1cairo_1image_1surface_1get_1format",
- "_1cairo_1image_1surface_1get_1height",
- "_1cairo_1image_1surface_1get_1stride",
- "_1cairo_1image_1surface_1get_1width",
- "_1cairo_1in_1fill",
- "_1cairo_1in_1stroke",
- "_1cairo_1line_1to",
- "_1cairo_1mask",
- "_1cairo_1mask_1surface",
- "_1cairo_1matrix_1init",
- "_1cairo_1matrix_1init_1identity",
- "_1cairo_1matrix_1init_1rotate",
- "_1cairo_1matrix_1init_1scale",
- "_1cairo_1matrix_1invert",
- "_1cairo_1matrix_1multiply",
- "_1cairo_1matrix_1rotate",
- "_1cairo_1matrix_1scale",
- "_1cairo_1matrix_1transform_1distance",
- "_1cairo_1matrix_1transform_1point",
- "_1cairo_1matrix_1translate",
- "_1cairo_1move_1to",
- "_1cairo_1new_1path",
- "_1cairo_1paint",
- "_1cairo_1paint_1with_1alpha",
- "_1cairo_1path_1destroy",
- "_1cairo_1pattern_1add_1color_1stop_1rgba",
- "_1cairo_1pattern_1create_1for_1surface",
- "_1cairo_1pattern_1create_1linear",
- "_1cairo_1pattern_1destroy",
- "_1cairo_1pattern_1get_1extend",
- "_1cairo_1pattern_1set_1extend",
- "_1cairo_1pattern_1set_1filter",
- "_1cairo_1pattern_1set_1matrix",
- "_1cairo_1pdf_1surface_1set_1size",
- "_1cairo_1pop_1group_1to_1source",
- "_1cairo_1ps_1surface_1set_1size",
- "_1cairo_1push_1group",
- "_1cairo_1rectangle",
- "_1cairo_1reference",
- "_1cairo_1region_1contains_1point",
- "_1cairo_1region_1contains_1rectangle",
- "_1cairo_1region_1copy",
- "_1cairo_1region_1create",
- "_1cairo_1region_1create_1rectangle",
- "_1cairo_1region_1destroy",
- "_1cairo_1region_1get_1extents",
- "_1cairo_1region_1get_1rectangle",
- "_1cairo_1region_1intersect",
- "_1cairo_1region_1is_1empty",
- "_1cairo_1region_1num_1rectangles",
- "_1cairo_1region_1subtract",
- "_1cairo_1region_1translate",
- "_1cairo_1region_1union",
- "_1cairo_1region_1union_1rectangle",
- "_1cairo_1reset_1clip",
- "_1cairo_1restore",
- "_1cairo_1rotate",
- "_1cairo_1save",
- "_1cairo_1scale",
- "_1cairo_1select_1font_1face",
- "_1cairo_1set_1antialias",
- "_1cairo_1set_1dash",
- "_1cairo_1set_1fill_1rule",
- "_1cairo_1set_1font_1face",
- "_1cairo_1set_1font_1size",
- "_1cairo_1set_1line_1cap",
- "_1cairo_1set_1line_1join",
- "_1cairo_1set_1line_1width",
- "_1cairo_1set_1matrix",
- "_1cairo_1set_1miter_1limit",
- "_1cairo_1set_1operator",
- "_1cairo_1set_1source",
- "_1cairo_1set_1source_1rgb",
- "_1cairo_1set_1source_1rgba",
- "_1cairo_1set_1source_1surface",
- "_1cairo_1set_1tolerance",
- "_1cairo_1show_1page",
- "_1cairo_1stroke",
- "_1cairo_1surface_1create_1similar",
- "_1cairo_1surface_1destroy",
- "_1cairo_1surface_1finish",
- "_1cairo_1surface_1flush",
- "_1cairo_1surface_1get_1content",
- "_1cairo_1surface_1get_1device_1scale",
- "_1cairo_1surface_1get_1type",
- "_1cairo_1surface_1get_1user_1data",
- "_1cairo_1surface_1mark_1dirty",
- "_1cairo_1surface_1reference",
- "_1cairo_1surface_1set_1device_1scale",
- "_1cairo_1transform",
- "_1cairo_1translate",
- "_1cairo_1user_1to_1device_1distance",
- "_1cairo_1xlib_1surface_1create",
- "_1cairo_1xlib_1surface_1get_1height",
- "_1cairo_1xlib_1surface_1get_1width",
+ "cairo_1append_1path",
+ "cairo_1arc",
+ "cairo_1arc_1negative",
+ "cairo_1clip",
+ "cairo_1close_1path",
+ "cairo_1copy_1path",
+ "cairo_1copy_1path_1flat",
+ "cairo_1create",
+ "cairo_1curve_1to",
+ "cairo_1destroy",
+ "cairo_1fill",
+ "cairo_1font_1options_1create",
+ "cairo_1font_1options_1destroy",
+ "cairo_1font_1options_1get_1antialias",
+ "cairo_1font_1options_1set_1antialias",
+ "cairo_1get_1antialias",
+ "cairo_1get_1current_1point",
+ "cairo_1get_1fill_1rule",
+ "cairo_1get_1font_1face",
+ "cairo_1get_1matrix",
+ "cairo_1get_1source",
+ "cairo_1get_1target",
+ "cairo_1get_1tolerance",
+ "cairo_1identity_1matrix",
+ "cairo_1image_1surface_1create",
+ "cairo_1image_1surface_1get_1data",
+ "cairo_1image_1surface_1get_1format",
+ "cairo_1image_1surface_1get_1height",
+ "cairo_1image_1surface_1get_1stride",
+ "cairo_1image_1surface_1get_1width",
+ "cairo_1in_1fill",
+ "cairo_1in_1stroke",
+ "cairo_1line_1to",
+ "cairo_1matrix_1init",
+ "cairo_1matrix_1init_1identity",
+ "cairo_1matrix_1invert",
+ "cairo_1matrix_1multiply",
+ "cairo_1matrix_1rotate",
+ "cairo_1matrix_1scale",
+ "cairo_1matrix_1transform_1point",
+ "cairo_1matrix_1translate",
+ "cairo_1move_1to",
+ "cairo_1new_1path",
+ "cairo_1paint",
+ "cairo_1paint_1with_1alpha",
"cairo_1path_1data_1t_1sizeof",
+ "cairo_1path_1destroy",
"cairo_1path_1t_1sizeof",
+ "cairo_1pattern_1add_1color_1stop_1rgba",
+ "cairo_1pattern_1create_1for_1surface",
+ "cairo_1pattern_1create_1linear",
+ "cairo_1pattern_1destroy",
+ "cairo_1pattern_1set_1extend",
+ "cairo_1pattern_1set_1filter",
+ "cairo_1pattern_1set_1matrix",
+ "cairo_1pdf_1surface_1set_1size",
+ "cairo_1pop_1group_1to_1source",
+ "cairo_1ps_1surface_1set_1size",
+ "cairo_1push_1group",
+ "cairo_1rectangle",
"cairo_1rectangle_1int_1t_1sizeof",
+ "cairo_1reference",
+ "cairo_1region_1contains_1point",
+ "cairo_1region_1contains_1rectangle",
+ "cairo_1region_1copy",
+ "cairo_1region_1create",
+ "cairo_1region_1create_1rectangle",
+ "cairo_1region_1destroy",
+ "cairo_1region_1get_1extents",
+ "cairo_1region_1get_1rectangle",
+ "cairo_1region_1intersect",
+ "cairo_1region_1is_1empty",
+ "cairo_1region_1num_1rectangles",
+ "cairo_1region_1subtract",
+ "cairo_1region_1translate",
+ "cairo_1region_1union",
+ "cairo_1region_1union_1rectangle",
+ "cairo_1reset_1clip",
+ "cairo_1restore",
+ "cairo_1save",
+ "cairo_1scale",
+ "cairo_1select_1font_1face",
+ "cairo_1set_1antialias",
+ "cairo_1set_1dash",
+ "cairo_1set_1fill_1rule",
+ "cairo_1set_1font_1size",
+ "cairo_1set_1line_1cap",
+ "cairo_1set_1line_1join",
+ "cairo_1set_1line_1width",
+ "cairo_1set_1matrix",
+ "cairo_1set_1miter_1limit",
+ "cairo_1set_1operator",
+ "cairo_1set_1source",
+ "cairo_1set_1source_1rgb",
+ "cairo_1set_1source_1rgba",
+ "cairo_1set_1source_1surface",
+ "cairo_1set_1tolerance",
+ "cairo_1show_1page",
+ "cairo_1stroke",
+ "cairo_1surface_1destroy",
+ "cairo_1surface_1finish",
+ "cairo_1surface_1flush",
+ "cairo_1surface_1get_1content",
+ "cairo_1surface_1get_1device_1scale",
+ "cairo_1surface_1get_1type",
+ "cairo_1surface_1mark_1dirty",
+ "cairo_1surface_1reference",
+ "cairo_1surface_1set_1device_1scale",
+ "cairo_1transform",
+ "cairo_1translate",
+ "cairo_1user_1to_1device_1distance",
"cairo_1version",
+ "cairo_1xlib_1surface_1get_1height",
+ "cairo_1xlib_1surface_1get_1width",
"memmove__Lorg_eclipse_swt_internal_cairo_cairo_1path_1data_1t_2JJ",
"memmove__Lorg_eclipse_swt_internal_cairo_cairo_1path_1t_2JJ",
"memmove__Lorg_eclipse_swt_internal_cairo_cairo_1rectangle_1int_1t_2JJ",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h
index ae4bcf5afe..87688c1e1d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h
@@ -15,7 +15,7 @@
*
* IBM
* - Binding to permit interfacing between Cairo and SWT
- * - Copyright (C) 2005, 2019 IBM Corp. All Rights Reserved.
+ * - Copyright (C) 2005, 2021 IBM Corp. All Rights Reserved.
*
* ***** END LICENSE BLOCK ***** */
@@ -39,133 +39,120 @@ extern char* Cairo_nativeFunctionNames[];
typedef enum {
CAIRO_1VERSION_1ENCODE_FUNC,
- _1cairo_1append_1path_FUNC,
- _1cairo_1arc_FUNC,
- _1cairo_1arc_1negative_FUNC,
- _1cairo_1clip_FUNC,
- _1cairo_1close_1path_FUNC,
- _1cairo_1copy_1page_FUNC,
- _1cairo_1copy_1path_FUNC,
- _1cairo_1copy_1path_1flat_FUNC,
- _1cairo_1create_FUNC,
- _1cairo_1curve_1to_FUNC,
- _1cairo_1destroy_FUNC,
- _1cairo_1fill_FUNC,
- _1cairo_1font_1options_1create_FUNC,
- _1cairo_1font_1options_1destroy_FUNC,
- _1cairo_1font_1options_1get_1antialias_FUNC,
- _1cairo_1font_1options_1set_1antialias_FUNC,
- _1cairo_1get_1antialias_FUNC,
- _1cairo_1get_1current_1point_FUNC,
- _1cairo_1get_1fill_1rule_FUNC,
- _1cairo_1get_1font_1face_FUNC,
- _1cairo_1get_1matrix_FUNC,
- _1cairo_1get_1operator_FUNC,
- _1cairo_1get_1source_FUNC,
- _1cairo_1get_1target_FUNC,
- _1cairo_1get_1tolerance_FUNC,
- _1cairo_1identity_1matrix_FUNC,
- _1cairo_1image_1surface_1create_FUNC,
- _1cairo_1image_1surface_1get_1data_FUNC,
- _1cairo_1image_1surface_1get_1format_FUNC,
- _1cairo_1image_1surface_1get_1height_FUNC,
- _1cairo_1image_1surface_1get_1stride_FUNC,
- _1cairo_1image_1surface_1get_1width_FUNC,
- _1cairo_1in_1fill_FUNC,
- _1cairo_1in_1stroke_FUNC,
- _1cairo_1line_1to_FUNC,
- _1cairo_1mask_FUNC,
- _1cairo_1mask_1surface_FUNC,
- _1cairo_1matrix_1init_FUNC,
- _1cairo_1matrix_1init_1identity_FUNC,
- _1cairo_1matrix_1init_1rotate_FUNC,
- _1cairo_1matrix_1init_1scale_FUNC,
- _1cairo_1matrix_1invert_FUNC,
- _1cairo_1matrix_1multiply_FUNC,
- _1cairo_1matrix_1rotate_FUNC,
- _1cairo_1matrix_1scale_FUNC,
- _1cairo_1matrix_1transform_1distance_FUNC,
- _1cairo_1matrix_1transform_1point_FUNC,
- _1cairo_1matrix_1translate_FUNC,
- _1cairo_1move_1to_FUNC,
- _1cairo_1new_1path_FUNC,
- _1cairo_1paint_FUNC,
- _1cairo_1paint_1with_1alpha_FUNC,
- _1cairo_1path_1destroy_FUNC,
- _1cairo_1pattern_1add_1color_1stop_1rgba_FUNC,
- _1cairo_1pattern_1create_1for_1surface_FUNC,
- _1cairo_1pattern_1create_1linear_FUNC,
- _1cairo_1pattern_1destroy_FUNC,
- _1cairo_1pattern_1get_1extend_FUNC,
- _1cairo_1pattern_1set_1extend_FUNC,
- _1cairo_1pattern_1set_1filter_FUNC,
- _1cairo_1pattern_1set_1matrix_FUNC,
- _1cairo_1pdf_1surface_1set_1size_FUNC,
- _1cairo_1pop_1group_1to_1source_FUNC,
- _1cairo_1ps_1surface_1set_1size_FUNC,
- _1cairo_1push_1group_FUNC,
- _1cairo_1rectangle_FUNC,
- _1cairo_1reference_FUNC,
- _1cairo_1region_1contains_1point_FUNC,
- _1cairo_1region_1contains_1rectangle_FUNC,
- _1cairo_1region_1copy_FUNC,
- _1cairo_1region_1create_FUNC,
- _1cairo_1region_1create_1rectangle_FUNC,
- _1cairo_1region_1destroy_FUNC,
- _1cairo_1region_1get_1extents_FUNC,
- _1cairo_1region_1get_1rectangle_FUNC,
- _1cairo_1region_1intersect_FUNC,
- _1cairo_1region_1is_1empty_FUNC,
- _1cairo_1region_1num_1rectangles_FUNC,
- _1cairo_1region_1subtract_FUNC,
- _1cairo_1region_1translate_FUNC,
- _1cairo_1region_1union_FUNC,
- _1cairo_1region_1union_1rectangle_FUNC,
- _1cairo_1reset_1clip_FUNC,
- _1cairo_1restore_FUNC,
- _1cairo_1rotate_FUNC,
- _1cairo_1save_FUNC,
- _1cairo_1scale_FUNC,
- _1cairo_1select_1font_1face_FUNC,
- _1cairo_1set_1antialias_FUNC,
- _1cairo_1set_1dash_FUNC,
- _1cairo_1set_1fill_1rule_FUNC,
- _1cairo_1set_1font_1face_FUNC,
- _1cairo_1set_1font_1size_FUNC,
- _1cairo_1set_1line_1cap_FUNC,
- _1cairo_1set_1line_1join_FUNC,
- _1cairo_1set_1line_1width_FUNC,
- _1cairo_1set_1matrix_FUNC,
- _1cairo_1set_1miter_1limit_FUNC,
- _1cairo_1set_1operator_FUNC,
- _1cairo_1set_1source_FUNC,
- _1cairo_1set_1source_1rgb_FUNC,
- _1cairo_1set_1source_1rgba_FUNC,
- _1cairo_1set_1source_1surface_FUNC,
- _1cairo_1set_1tolerance_FUNC,
- _1cairo_1show_1page_FUNC,
- _1cairo_1stroke_FUNC,
- _1cairo_1surface_1create_1similar_FUNC,
- _1cairo_1surface_1destroy_FUNC,
- _1cairo_1surface_1finish_FUNC,
- _1cairo_1surface_1flush_FUNC,
- _1cairo_1surface_1get_1content_FUNC,
- _1cairo_1surface_1get_1device_1scale_FUNC,
- _1cairo_1surface_1get_1type_FUNC,
- _1cairo_1surface_1get_1user_1data_FUNC,
- _1cairo_1surface_1mark_1dirty_FUNC,
- _1cairo_1surface_1reference_FUNC,
- _1cairo_1surface_1set_1device_1scale_FUNC,
- _1cairo_1transform_FUNC,
- _1cairo_1translate_FUNC,
- _1cairo_1user_1to_1device_1distance_FUNC,
- _1cairo_1xlib_1surface_1create_FUNC,
- _1cairo_1xlib_1surface_1get_1height_FUNC,
- _1cairo_1xlib_1surface_1get_1width_FUNC,
+ cairo_1append_1path_FUNC,
+ cairo_1arc_FUNC,
+ cairo_1arc_1negative_FUNC,
+ cairo_1clip_FUNC,
+ cairo_1close_1path_FUNC,
+ cairo_1copy_1path_FUNC,
+ cairo_1copy_1path_1flat_FUNC,
+ cairo_1create_FUNC,
+ cairo_1curve_1to_FUNC,
+ cairo_1destroy_FUNC,
+ cairo_1fill_FUNC,
+ cairo_1font_1options_1create_FUNC,
+ cairo_1font_1options_1destroy_FUNC,
+ cairo_1font_1options_1get_1antialias_FUNC,
+ cairo_1font_1options_1set_1antialias_FUNC,
+ cairo_1get_1antialias_FUNC,
+ cairo_1get_1current_1point_FUNC,
+ cairo_1get_1fill_1rule_FUNC,
+ cairo_1get_1font_1face_FUNC,
+ cairo_1get_1matrix_FUNC,
+ cairo_1get_1source_FUNC,
+ cairo_1get_1target_FUNC,
+ cairo_1get_1tolerance_FUNC,
+ cairo_1identity_1matrix_FUNC,
+ cairo_1image_1surface_1create_FUNC,
+ cairo_1image_1surface_1get_1data_FUNC,
+ cairo_1image_1surface_1get_1format_FUNC,
+ cairo_1image_1surface_1get_1height_FUNC,
+ cairo_1image_1surface_1get_1stride_FUNC,
+ cairo_1image_1surface_1get_1width_FUNC,
+ cairo_1in_1fill_FUNC,
+ cairo_1in_1stroke_FUNC,
+ cairo_1line_1to_FUNC,
+ cairo_1matrix_1init_FUNC,
+ cairo_1matrix_1init_1identity_FUNC,
+ cairo_1matrix_1invert_FUNC,
+ cairo_1matrix_1multiply_FUNC,
+ cairo_1matrix_1rotate_FUNC,
+ cairo_1matrix_1scale_FUNC,
+ cairo_1matrix_1transform_1point_FUNC,
+ cairo_1matrix_1translate_FUNC,
+ cairo_1move_1to_FUNC,
+ cairo_1new_1path_FUNC,
+ cairo_1paint_FUNC,
+ cairo_1paint_1with_1alpha_FUNC,
cairo_1path_1data_1t_1sizeof_FUNC,
+ cairo_1path_1destroy_FUNC,
cairo_1path_1t_1sizeof_FUNC,
+ cairo_1pattern_1add_1color_1stop_1rgba_FUNC,
+ cairo_1pattern_1create_1for_1surface_FUNC,
+ cairo_1pattern_1create_1linear_FUNC,
+ cairo_1pattern_1destroy_FUNC,
+ cairo_1pattern_1set_1extend_FUNC,
+ cairo_1pattern_1set_1filter_FUNC,
+ cairo_1pattern_1set_1matrix_FUNC,
+ cairo_1pdf_1surface_1set_1size_FUNC,
+ cairo_1pop_1group_1to_1source_FUNC,
+ cairo_1ps_1surface_1set_1size_FUNC,
+ cairo_1push_1group_FUNC,
+ cairo_1rectangle_FUNC,
cairo_1rectangle_1int_1t_1sizeof_FUNC,
+ cairo_1reference_FUNC,
+ cairo_1region_1contains_1point_FUNC,
+ cairo_1region_1contains_1rectangle_FUNC,
+ cairo_1region_1copy_FUNC,
+ cairo_1region_1create_FUNC,
+ cairo_1region_1create_1rectangle_FUNC,
+ cairo_1region_1destroy_FUNC,
+ cairo_1region_1get_1extents_FUNC,
+ cairo_1region_1get_1rectangle_FUNC,
+ cairo_1region_1intersect_FUNC,
+ cairo_1region_1is_1empty_FUNC,
+ cairo_1region_1num_1rectangles_FUNC,
+ cairo_1region_1subtract_FUNC,
+ cairo_1region_1translate_FUNC,
+ cairo_1region_1union_FUNC,
+ cairo_1region_1union_1rectangle_FUNC,
+ cairo_1reset_1clip_FUNC,
+ cairo_1restore_FUNC,
+ cairo_1save_FUNC,
+ cairo_1scale_FUNC,
+ cairo_1select_1font_1face_FUNC,
+ cairo_1set_1antialias_FUNC,
+ cairo_1set_1dash_FUNC,
+ cairo_1set_1fill_1rule_FUNC,
+ cairo_1set_1font_1size_FUNC,
+ cairo_1set_1line_1cap_FUNC,
+ cairo_1set_1line_1join_FUNC,
+ cairo_1set_1line_1width_FUNC,
+ cairo_1set_1matrix_FUNC,
+ cairo_1set_1miter_1limit_FUNC,
+ cairo_1set_1operator_FUNC,
+ cairo_1set_1source_FUNC,
+ cairo_1set_1source_1rgb_FUNC,
+ cairo_1set_1source_1rgba_FUNC,
+ cairo_1set_1source_1surface_FUNC,
+ cairo_1set_1tolerance_FUNC,
+ cairo_1show_1page_FUNC,
+ cairo_1stroke_FUNC,
+ cairo_1surface_1destroy_FUNC,
+ cairo_1surface_1finish_FUNC,
+ cairo_1surface_1flush_FUNC,
+ cairo_1surface_1get_1content_FUNC,
+ cairo_1surface_1get_1device_1scale_FUNC,
+ cairo_1surface_1get_1type_FUNC,
+ cairo_1surface_1mark_1dirty_FUNC,
+ cairo_1surface_1reference_FUNC,
+ cairo_1surface_1set_1device_1scale_FUNC,
+ cairo_1transform_FUNC,
+ cairo_1translate_FUNC,
+ cairo_1user_1to_1device_1distance_FUNC,
cairo_1version_FUNC,
+ cairo_1xlib_1surface_1get_1height_FUNC,
+ cairo_1xlib_1surface_1get_1width_FUNC,
memmove__Lorg_eclipse_swt_internal_cairo_cairo_1path_1data_1t_2JJ_FUNC,
memmove__Lorg_eclipse_swt_internal_cairo_cairo_1path_1t_2JJ_FUNC,
memmove__Lorg_eclipse_swt_internal_cairo_cairo_1rectangle_1int_1t_2JJ_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java
index 86a280dfaa..19ee94d0de 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java
@@ -56,28 +56,11 @@ public class Cairo extends Platform {
public static final int CAIRO_FONT_SLANT_OBLIQUE = 2;
public static final int CAIRO_FONT_WEIGHT_NORMAL = 0;
public static final int CAIRO_FONT_WEIGHT_BOLD = 1;
- public static final int CAIRO_STATUS_SUCCESS = 0;
- public static final int CAIRO_STATUS_NO_MEMORY = 1;
- public static final int CAIRO_STATUS_INVALID_RESTORE = 2;
- public static final int CAIRO_STATUS_INVALID_POP_GROUP = 3;
- public static final int CAIRO_STATUS_NO_CURRENT_POINT = 4;
- public static final int CAIRO_STATUS_INVALID_MATRIX = 5;
- public static final int CAIRO_STATUS_NO_TARGET_SURFACE = 6;
- public static final int CAIRO_STATUS_NULL_POINTER =7;
public static final int CAIRO_SURFACE_TYPE_IMAGE = 0;
public static final int CAIRO_SURFACE_TYPE_PDF = 1;
- public static final int CAIRO_SURFACE_TYPE_PS = 2;
- public static final int CAIRO_SURFACE_TYPE_XLIB = 3;
- public static final int CAIRO_SURFACE_TYPE_XCB = 4;
- public static final int CAIRO_SURFACE_TYPE_GLITZ = 5;
- public static final int CAIRO_SURFACE_TYPE_QUARTZ = 6;
- public static final int CAIRO_SURFACE_TYPE_WIN32 = 7;
- public static final int CAIRO_SURFACE_TYPE_BEOS = 8;
- public static final int CAIRO_SURFACE_TYPE_DIRECTFB = 9;
- public static final int CAIRO_SURFACE_TYPE_SVG = 10;
- public static final int CAIRO_REGION_OVERLAP_IN = 0;
- public static final int CAIRO_REGION_OVERLAP_OUT = 1;
- public static final int CAIRO_REGION_OVERLAP_PART = 2;
+ public static final int CAIRO_SURFACE_TYPE_PS = 2;
+ public static final int CAIRO_SURFACE_TYPE_XLIB = 3;
+ public static final int CAIRO_REGION_OVERLAP_OUT = 1;
public static final int CAIRO_FILTER_FAST = 0;
public static final int CAIRO_FILTER_GOOD = 1;
public static final int CAIRO_FILTER_BEST = 2;
@@ -104,1339 +87,312 @@ public static final native int CAIRO_VERSION_ENCODE(int major, int minor, int mi
* @param cr cast=(cairo_t *)
* @param path cast=(cairo_path_t *)
*/
-public static final native void _cairo_append_path(long cr, long path);
-public static final void cairo_append_path(long cr, long path) {
- lock.lock();
- try {
- _cairo_append_path(cr, path);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_append_path(long cr, long path);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_arc(long cr, double xc, double yc, double radius, double angle1, double angle2);
-public static final void cairo_arc(long cr, double xc, double yc, double radius, double angle1, double angle2) {
- lock.lock();
- try {
- _cairo_arc(cr, xc, yc, radius, angle1, angle2);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_arc(long cr, double xc, double yc, double radius, double angle1, double angle2);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_arc_negative(long cr, double xc, double yc, double radius, double angle1, double angle2);
-public static final void cairo_arc_negative(long cr, double xc, double yc, double radius, double angle1, double angle2) {
- lock.lock();
- try {
- _cairo_arc_negative(cr, xc, yc, radius, angle1, angle2);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_arc_negative(long cr, double xc, double yc, double radius, double angle1, double angle2);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_clip(long cr);
-public static final void cairo_clip(long cr) {
- lock.lock();
- try {
- _cairo_clip(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_clip(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_close_path(long cr);
-public static final void cairo_close_path(long cr) {
- lock.lock();
- try {
- _cairo_close_path(cr);
- } finally {
- lock.unlock();
- }
-}
-/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_copy_page(long cr);
-public static final void cairo_copy_page(long cr) {
- lock.lock();
- try {
- _cairo_copy_page(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_close_path(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native long _cairo_copy_path(long cr);
-public static final long cairo_copy_path(long cr) {
- lock.lock();
- try {
- return _cairo_copy_path(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_copy_path(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native long _cairo_copy_path_flat(long cr);
-public static final long cairo_copy_path_flat(long cr) {
- lock.lock();
- try {
- return _cairo_copy_path_flat(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_copy_path_flat(long cr);
/** @param target cast=(cairo_surface_t *) */
-public static final native long _cairo_create(long target);
-public static final long cairo_create(long target) {
- lock.lock();
- try {
- return _cairo_create(target);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_create(long target);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_curve_to(long cr, double x1, double y1, double x2, double y2, double x3, double y3);
-public static final void cairo_curve_to(long cr, double x1, double y1, double x2, double y2, double x3, double y3) {
- lock.lock();
- try {
- _cairo_curve_to(cr, x1, y1, x2, y2, x3, y3);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_curve_to(long cr, double x1, double y1, double x2, double y2, double x3, double y3);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_destroy(long cr);
-public static final void cairo_destroy(long cr) {
- lock.lock();
- try {
- _cairo_destroy(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_destroy(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_fill(long cr);
-public static final void cairo_fill(long cr) {
- lock.lock();
- try {
- _cairo_fill(cr);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _cairo_font_options_create();
-public static final long cairo_font_options_create() {
- lock.lock();
- try {
- return _cairo_font_options_create();
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_fill(long cr);
+public static final native long cairo_font_options_create();
/** @param options cast=(cairo_font_options_t *) */
-public static final native void _cairo_font_options_destroy(long options);
-public static final void cairo_font_options_destroy(long options) {
- lock.lock();
- try {
- _cairo_font_options_destroy(options);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_font_options_destroy(long options);
/** @param options cast=(cairo_font_options_t *) */
-public static final native int _cairo_font_options_get_antialias(long options);
-public static final int cairo_font_options_get_antialias(long options) {
- lock.lock();
- try {
- return _cairo_font_options_get_antialias(options);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_font_options_get_antialias(long options);
/** @param options cast=(cairo_font_options_t *) */
-public static final native void _cairo_font_options_set_antialias(long options, int antialias);
-public static final void cairo_font_options_set_antialias(long options, int antialias) {
- lock.lock();
- try {
- _cairo_font_options_set_antialias(options, antialias);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_font_options_set_antialias(long options, int antialias);
/** @param cr cast=(cairo_t *) */
-public static final native int _cairo_get_antialias(long cr);
-public static final int cairo_get_antialias(long cr) {
- lock.lock();
- try {
- return _cairo_get_antialias(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_get_antialias(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_get_current_point(long cr, double[] x, double[] y);
-public static final void cairo_get_current_point(long cr, double[] x, double[] y) {
- lock.lock();
- try {
- _cairo_get_current_point(cr, x, y);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_get_current_point(long cr, double[] x, double[] y);
/** @param cr cast=(cairo_t *) */
-public static final native int _cairo_get_fill_rule(long cr);
-public static final int cairo_get_fill_rule(long cr) {
- lock.lock();
- try {
- return _cairo_get_fill_rule(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_get_fill_rule(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native long _cairo_get_font_face(long cr);
-public static final long cairo_get_font_face(long cr) {
- lock.lock();
- try {
- return _cairo_get_font_face(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_get_font_face(long cr);
/**
* @param cr cast=(cairo_t *)
* @param matrix cast=(cairo_matrix_t *)
*/
-public static final native void _cairo_get_matrix(long cr, double[] matrix);
-public static final void cairo_get_matrix(long cr, double[] matrix) {
- lock.lock();
- try {
- _cairo_get_matrix(cr, matrix);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_get_matrix(long cr, double[] matrix);
/** @param cr cast=(cairo_t *) */
-public static final native int _cairo_get_operator(long cr);
-public static final int cairo_get_operator(long cr) {
- lock.lock();
- try {
- return _cairo_get_operator(cr);
- } finally {
- lock.unlock();
- }
-}
-/** @param cr cast=(cairo_t *) */
-public static final native long _cairo_get_source(long cr);
-public static final long cairo_get_source(long cr) {
- lock.lock();
- try {
- return _cairo_get_source(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_get_source(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native long _cairo_get_target(long cr);
-public static final long cairo_get_target(long cr) {
- lock.lock();
- try {
- return _cairo_get_target(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_get_target(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native double _cairo_get_tolerance(long cr);
-public static final double cairo_get_tolerance(long cr) {
- lock.lock();
- try {
- return _cairo_get_tolerance(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native double cairo_get_tolerance(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_identity_matrix(long cr);
-public static final void cairo_identity_matrix(long cr) {
- lock.lock();
- try {
- _cairo_identity_matrix(cr);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _cairo_image_surface_create(int format, int width, int height);
-public static final long cairo_image_surface_create(int format, int width, int height) {
- lock.lock();
- try {
- return _cairo_image_surface_create(format, width, height);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_identity_matrix(long cr);
+public static final native long cairo_image_surface_create(int format, int width, int height);
/**
* @param surface cast=(cairo_surface_t *)
*/
-public static final native long _cairo_image_surface_get_data(long surface);
-public static final long cairo_image_surface_get_data(long surface) {
- lock.lock();
- try {
- return _cairo_image_surface_get_data(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_image_surface_get_data(long surface);
/**
* @param surface cast=(cairo_surface_t *)
*/
-public static final native int _cairo_image_surface_get_format(long surface);
-public static final int cairo_image_surface_get_format(long surface) {
- lock.lock();
- try {
- return _cairo_image_surface_get_format(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_image_surface_get_format(long surface);
/** @param surface cast=(cairo_surface_t *) */
-public static final native int _cairo_image_surface_get_height(long surface);
-public static final int cairo_image_surface_get_height(long surface) {
- lock.lock();
- try {
- return _cairo_image_surface_get_height(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_image_surface_get_height(long surface);
/** @param surface cast=(cairo_surface_t *) */
-public static final native int _cairo_image_surface_get_width(long surface);
-public static final int cairo_image_surface_get_width(long surface) {
- lock.lock();
- try {
- return _cairo_image_surface_get_width(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_image_surface_get_width(long surface);
/**
* @param surface cast=(cairo_surface_t *)
*/
-public static final native int _cairo_image_surface_get_stride(long surface);
-public static final int cairo_image_surface_get_stride(long surface) {
- lock.lock();
- try {
- return _cairo_image_surface_get_stride(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_image_surface_get_stride(long surface);
/** @param cr cast=(cairo_t *) */
-public static final native int _cairo_in_fill(long cr, double x, double y);
-public static final int cairo_in_fill(long cr, double x, double y) {
- lock.lock();
- try {
- return _cairo_in_fill(cr, x, y);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_in_fill(long cr, double x, double y);
/** @param cr cast=(cairo_t *) */
-public static final native int _cairo_in_stroke(long cr, double x, double y);
-public static final int cairo_in_stroke(long cr, double x, double y) {
- lock.lock();
- try {
- return _cairo_in_stroke(cr, x, y);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_in_stroke(long cr, double x, double y);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_line_to(long cr, double x, double y);
-public static final void cairo_line_to(long cr, double x, double y) {
- lock.lock();
- try {
- _cairo_line_to(cr, x, y);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param cr cast=(cairo_t *)
- * @param pattern cast=(cairo_pattern_t *)
- */
-public static final native void _cairo_mask(long cr, long pattern);
-public static final void cairo_mask(long cr, long pattern) {
- lock.lock();
- try {
- _cairo_mask(cr, pattern);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param cr cast=(cairo_t *)
- * @param surface cast=(cairo_surface_t *)
- */
-public static final native void _cairo_mask_surface(long cr, long surface, double surface_x, double surface_y);
-public static final void cairo_mask_surface(long cr, long surface, double surface_x, double surface_y) {
- lock.lock();
- try {
- _cairo_mask_surface(cr, surface, surface_x, surface_y);
- } finally {
- lock.unlock();
- }
-}
-/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_init(double[] matrix, double xx, double yx, double xy, double yy, double x0, double y0);
-public static final void cairo_matrix_init(double[] matrix, double xx, double yx, double xy, double yy, double x0, double y0) {
- lock.lock();
- try {
- _cairo_matrix_init(matrix, xx, yx, xy, yy, x0, y0);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_line_to(long cr, double x, double y);
/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_init_identity(double[] matrix);
-public static final void cairo_matrix_init_identity(double[] matrix) {
- lock.lock();
- try {
- _cairo_matrix_init_identity(matrix);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_matrix_init(double[] matrix, double xx, double yx, double xy, double yy, double x0, double y0);
/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_init_rotate(double[] matrix, double radians);
-public static final void cairo_matrix_init_rotate(double[] matrix, double radians) {
- lock.lock();
- try {
- _cairo_matrix_init_rotate(matrix, radians);
- } finally {
- lock.unlock();
- }
-}
-/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_init_scale(double[] matrix, double sx, double sy);
-public static final void cairo_matrix_init_scale(double[] matrix, double sx, double sy) {
- lock.lock();
- try {
- _cairo_matrix_init_scale(matrix, sx, sy);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_matrix_init_identity(double[] matrix);
/** @param matrix cast=(cairo_matrix_t *) */
-public static final native int _cairo_matrix_invert(double[] matrix);
-public static final int cairo_matrix_invert(double[] matrix) {
- lock.lock();
- try {
- return _cairo_matrix_invert(matrix);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_matrix_invert(double[] matrix);
/**
* @param result cast=(cairo_matrix_t *)
* @param a cast=(cairo_matrix_t *)
* @param b cast=(cairo_matrix_t *)
*/
-public static final native void _cairo_matrix_multiply(double[] result, double[] a, double[] b);
-public static final void cairo_matrix_multiply(double[] result, double[] a, double[] b) {
- lock.lock();
- try {
- _cairo_matrix_multiply(result, a, b);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_matrix_multiply(double[] result, double[] a, double[] b);
/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_rotate(double[] matrix, double radians);
-public static final void cairo_matrix_rotate(double[] matrix, double radians) {
- lock.lock();
- try {
- _cairo_matrix_rotate(matrix, radians);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_matrix_rotate(double[] matrix, double radians);
/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_scale(double[] matrix, double sx, double sy);
-public static final void cairo_matrix_scale(double[] matrix, double sx, double sy) {
- lock.lock();
- try {
- _cairo_matrix_scale(matrix, sx, sy);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_matrix_scale(double[] matrix, double sx, double sy);
/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_transform_distance(double[] matrix, double[] dx, double[] dy);
-public static final void cairo_matrix_transform_distance(double[] matrix, double[] dx, double[] dy) {
- lock.lock();
- try {
- _cairo_matrix_transform_distance(matrix, dx, dy);
- } finally {
- lock.unlock();
- }
-}
-/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_transform_point(double[] matrix, double[] x, double[] y);
-public static final void cairo_matrix_transform_point(double[] matrix, double[] x, double[] y) {
- lock.lock();
- try {
- _cairo_matrix_transform_point(matrix, x, y);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_matrix_transform_point(double[] matrix, double[] x, double[] y);
/** @param matrix cast=(cairo_matrix_t *) */
-public static final native void _cairo_matrix_translate(double[] matrix, double tx, double ty);
-public static final void cairo_matrix_translate(double[] matrix, double tx, double ty) {
- lock.lock();
- try {
- _cairo_matrix_translate(matrix, tx, ty);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_matrix_translate(double[] matrix, double tx, double ty);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_move_to(long cr, double x, double y);
-public static final void cairo_move_to(long cr, double x, double y) {
- lock.lock();
- try {
- _cairo_move_to(cr, x, y);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_move_to(long cr, double x, double y);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_new_path(long cr);
-public static final void cairo_new_path(long cr) {
- lock.lock();
- try {
- _cairo_new_path(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_new_path(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_paint(long cr);
-public static final void cairo_paint(long cr) {
- lock.lock();
- try {
- _cairo_paint(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_paint(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_paint_with_alpha(long cr, double alpha);
-public static final void cairo_paint_with_alpha(long cr, double alpha) {
- lock.lock();
- try {
- _cairo_paint_with_alpha(cr, alpha);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_paint_with_alpha(long cr, double alpha);
/** @param path cast=(cairo_path_t *) */
-public static final native void _cairo_path_destroy(long path);
-public static final void cairo_path_destroy(long path) {
- lock.lock();
- try {
- _cairo_path_destroy(path);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_path_destroy(long path);
/** @param pattern cast=(cairo_pattern_t *) */
-public static final native void _cairo_pattern_add_color_stop_rgba(long pattern, double offset, double red, double green, double blue, double alpha);
-public static final void cairo_pattern_add_color_stop_rgba(long pattern, double offset, double red, double green, double blue, double alpha) {
- lock.lock();
- try {
- _cairo_pattern_add_color_stop_rgba(pattern, offset, red, green, blue, alpha);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_pattern_add_color_stop_rgba(long pattern, double offset, double red, double green, double blue, double alpha);
/** @param surface cast=(cairo_surface_t *) */
-public static final native long _cairo_pattern_create_for_surface(long surface);
-public static final long cairo_pattern_create_for_surface(long surface) {
- lock.lock();
- try {
- return _cairo_pattern_create_for_surface(surface);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _cairo_pattern_create_linear(double x0, double y0, double x1, double y1);
-public static final long cairo_pattern_create_linear(double x0, double y0, double x1, double y1) {
- lock.lock();
- try {
- return _cairo_pattern_create_linear(x0, y0, x1, y1);
- } finally {
- lock.unlock();
- }
-}
-/** @param pattern cast=(cairo_pattern_t *) */
-public static final native void _cairo_pattern_destroy(long pattern);
-public static final void cairo_pattern_destroy(long pattern) {
- lock.lock();
- try {
- _cairo_pattern_destroy(pattern);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_pattern_create_for_surface(long surface);
+public static final native long cairo_pattern_create_linear(double x0, double y0, double x1, double y1);
/** @param pattern cast=(cairo_pattern_t *) */
-public static final native int _cairo_pattern_get_extend(long pattern);
-public static final int cairo_pattern_get_extend(long pattern) {
- lock.lock();
- try {
- return _cairo_pattern_get_extend(pattern);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_pattern_destroy(long pattern);
/** @param pattern cast=(cairo_pattern_t *) */
-public static final native void _cairo_pattern_set_extend(long pattern, int extend);
-public static final void cairo_pattern_set_extend(long pattern, int extend) {
- lock.lock();
- try {
- _cairo_pattern_set_extend(pattern, extend);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_pattern_set_extend(long pattern, int extend);
/** @param pattern cast=(cairo_pattern_t *) */
-public static final native void _cairo_pattern_set_filter(long pattern, int filter);
-public static final void cairo_pattern_set_filter(long pattern, int filter) {
- lock.lock();
- try {
- _cairo_pattern_set_filter(pattern, filter);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_pattern_set_filter(long pattern, int filter);
/**
* @param pattern cast=(cairo_pattern_t *)
* @param matrix cast=(cairo_matrix_t *)
*/
-public static final native void _cairo_pattern_set_matrix(long pattern, double[] matrix);
-public static final void cairo_pattern_set_matrix(long pattern, double[] matrix) {
- lock.lock();
- try {
- _cairo_pattern_set_matrix(pattern, matrix);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_pattern_set_matrix(long pattern, double[] matrix);
/**
* @method flags=dynamic
* @param surface cast=(cairo_surface_t *)
*/
-public static final native void _cairo_pdf_surface_set_size(long surface, double width_in_points, double height_in_points);
-public static final void cairo_pdf_surface_set_size(long surface, double width_in_points, double height_in_points) {
- lock.lock();
- try {
- _cairo_pdf_surface_set_size(surface, width_in_points, height_in_points);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_pdf_surface_set_size(long surface, double width_in_points, double height_in_points);
/**
* @param cairo cast=(cairo_t *)
*/
-public static final native void _cairo_push_group(long cairo);
-public static final void cairo_push_group(long cairo) {
- lock.lock();
- try {
- _cairo_push_group(cairo);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_push_group(long cairo);
/**
* @param cairo cast=(cairo_t *)
*/
-public static final native void _cairo_pop_group_to_source(long cairo);
-public static final void cairo_pop_group_to_source(long cairo) {
- lock.lock();
- try {
- _cairo_pop_group_to_source(cairo);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_pop_group_to_source(long cairo);
/**
* @method flags=dynamic
* @param surface cast=(cairo_surface_t *)
*/
-public static final native void _cairo_ps_surface_set_size(long surface, double width_in_points, double height_in_points);
-public static final void cairo_ps_surface_set_size(long surface, double width_in_points, double height_in_points) {
- lock.lock();
- try {
- _cairo_ps_surface_set_size(surface, width_in_points, height_in_points);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_ps_surface_set_size(long surface, double width_in_points, double height_in_points);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_rectangle(long cr, double x, double y, double width, double height);
-public static final void cairo_rectangle(long cr, double x, double y, double width, double height) {
- lock.lock();
- try {
- _cairo_rectangle(cr, x, y, width, height);
- } finally {
- lock.unlock();
- }
-}
-/** @param cr cast=(cairo_t *) */
-public static final native long _cairo_reference(long cr);
-public static final long cairo_reference(long cr) {
- lock.lock();
- try {
- return _cairo_reference(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_rectangle(long cr, double x, double y, double width, double height);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_reset_clip(long cr);
-public static final void cairo_reset_clip(long cr) {
- lock.lock();
- try {
- _cairo_reset_clip(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_reference(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_restore(long cr);
-public static final void cairo_restore(long cr) {
- lock.lock();
- try {
- _cairo_restore(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_reset_clip(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_rotate(long cr, double angle);
-public static final void cairo_rotate(long cr, double angle) {
- lock.lock();
- try {
- _cairo_rotate(cr, angle);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_restore(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_save(long cr);
-public static final void cairo_save(long cr) {
- lock.lock();
- try {
- _cairo_save(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_save(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_scale(long cr, double sx, double sy);
-public static final void cairo_scale(long cr, double sx, double sy) {
- lock.lock();
- try {
- _cairo_scale(cr, sx, sy);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_scale(long cr, double sx, double sy);
/**
* @method flags=dynamic
* @param cr cast=(cairo_surface_t *)
*/
-public static final native void _cairo_surface_set_device_scale(long cr, double sx, double sy);
-public static final void cairo_surface_set_device_scale(long cr, double sx, double sy) {
- lock.lock();
- try {
- _cairo_surface_set_device_scale(cr, sx, sy);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_surface_set_device_scale(long cr, double sx, double sy);
/**
* @method flags=dynamic
* @param cr cast=(cairo_surface_t *)
* @param sx cast=(double *)
* @param sy cast=(double *)
*/
-public static final native void _cairo_surface_get_device_scale(long cr, double [] sx, double [] sy);
-public static final void cairo_surface_get_device_scale(long cr, double [] sx, double [] sy) {
- lock.lock();
- try {
- _cairo_surface_get_device_scale(cr, sx, sy);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_surface_get_device_scale(long cr, double [] sx, double [] sy);
/**
* @param cr cast=(cairo_t *)
* @param family cast=(const char *)
*/
-public static final native void _cairo_select_font_face(long cr, byte[] family, int slant, int weight);
-public static final void cairo_select_font_face(long cr, byte[] family, int slant, int weight) {
- lock.lock();
- try {
- _cairo_select_font_face(cr, family, slant, weight);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_select_font_face(long cr, byte[] family, int slant, int weight);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_antialias(long cr, int antialias);
-public static final void cairo_set_antialias(long cr, int antialias) {
- lock.lock();
- try {
- _cairo_set_antialias(cr, antialias);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_antialias(long cr, int antialias);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_dash(long cr, double[] dashes, int ndash, double offset);
-public static final void cairo_set_dash(long cr, double[] dashes, int ndash, double offset) {
- lock.lock();
- try {
- _cairo_set_dash(cr, dashes, ndash, offset);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_dash(long cr, double[] dashes, int ndash, double offset);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_fill_rule(long cr, int fill_rule);
-public static final void cairo_set_fill_rule(long cr, int fill_rule) {
- lock.lock();
- try {
- _cairo_set_fill_rule(cr, fill_rule);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param cr cast=(cairo_t *)
- * @param font_face cast=(cairo_font_face_t *)
- */
-public static final native void _cairo_set_font_face(long cr, long font_face);
-public static final void cairo_set_font_face(long cr, long font_face) {
- lock.lock();
- try {
- _cairo_set_font_face(cr, font_face);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_fill_rule(long cr, int fill_rule);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_font_size(long cr, double size);
-public static final void cairo_set_font_size(long cr, double size) {
- lock.lock();
- try {
- _cairo_set_font_size(cr, size);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_font_size(long cr, double size);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_line_cap(long cr, int line_cap);
-public static final void cairo_set_line_cap(long cr, int line_cap) {
- lock.lock();
- try {
- _cairo_set_line_cap(cr, line_cap);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_line_cap(long cr, int line_cap);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_line_join(long cr, int line_join);
-public static final void cairo_set_line_join(long cr, int line_join) {
- lock.lock();
- try {
- _cairo_set_line_join(cr, line_join);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_line_join(long cr, int line_join);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_line_width(long cr, double width);
-public static final void cairo_set_line_width(long cr, double width) {
- lock.lock();
- try {
- _cairo_set_line_width(cr, width);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_line_width(long cr, double width);
/**
* @param cr cast=(cairo_t *)
* @param matrix cast=(cairo_matrix_t *)
*/
-public static final native void _cairo_set_matrix(long cr, double[] matrix);
-public static final void cairo_set_matrix(long cr, double[] matrix) {
- lock.lock();
- try {
- _cairo_set_matrix(cr, matrix);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_matrix(long cr, double[] matrix);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_miter_limit(long cr, double limit);
-public static final void cairo_set_miter_limit(long cr, double limit) {
- lock.lock();
- try {
- _cairo_set_miter_limit(cr, limit);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_miter_limit(long cr, double limit);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_operator(long cr, int op);
-public static final void cairo_set_operator(long cr, int op) {
- lock.lock();
- try {
- _cairo_set_operator(cr, op);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_operator(long cr, int op);
/**
* @param cr cast=(cairo_t *)
* @param source cast=(cairo_pattern_t *)
*/
-public static final native void _cairo_set_source(long cr, long source);
-public static final void cairo_set_source(long cr, long source) {
- lock.lock();
- try {
- _cairo_set_source(cr, source);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_source(long cr, long source);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_source_rgb(long cr, double red, double green, double blue);
-public static final void cairo_set_source_rgb(long cr, double red, double green, double blue) {
- lock.lock();
- try {
- _cairo_set_source_rgb(cr, red, green, blue);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_source_rgb(long cr, double red, double green, double blue);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_source_rgba(long cr, double red, double green, double blue, double alpha);
-public static final void cairo_set_source_rgba(long cr, double red, double green, double blue, double alpha) {
- lock.lock();
- try {
- _cairo_set_source_rgba(cr, red, green, blue, alpha);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_source_rgba(long cr, double red, double green, double blue, double alpha);
/**
* @param cr cast=(cairo_t *)
* @param surface cast=(cairo_surface_t *)
*/
-public static final native void _cairo_set_source_surface(long cr, long surface, double x, double y);
-public static final void cairo_set_source_surface(long cr, long surface, double x, double y) {
- lock.lock();
- try {
- _cairo_set_source_surface(cr, surface, x, y);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_source_surface(long cr, long surface, double x, double y);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_set_tolerance(long cr, double tolerance);
-public static final void cairo_set_tolerance(long cr, double tolerance) {
- lock.lock();
- try {
- _cairo_set_tolerance(cr, tolerance);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_set_tolerance(long cr, double tolerance);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_show_page(long cr);
-public static final void cairo_show_page(long cr) {
- lock.lock();
- try {
- _cairo_show_page(cr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_show_page(long cr);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_stroke(long cr);
-public static final void cairo_stroke(long cr) {
- lock.lock();
- try {
- _cairo_stroke(cr);
- } finally {
- lock.unlock();
- }
-}
-/** @param other cast=(cairo_surface_t *) */
-public static final native long _cairo_surface_create_similar(long other, int format, int width, int height);
-public static final long cairo_surface_create_similar(long other, int format, int width, int height) {
- lock.lock();
- try {
- return _cairo_surface_create_similar(other, format, width, height);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_stroke(long cr);
/** @param surface cast=(cairo_surface_t *) */
-public static final native void _cairo_surface_destroy(long surface);
-public static final void cairo_surface_destroy(long surface) {
- lock.lock();
- try {
- _cairo_surface_destroy(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_surface_destroy(long surface);
/** @param surface cast=(cairo_surface_t *) */
-public static final native void _cairo_surface_flush(long surface);
-public static final void cairo_surface_flush(long surface) {
- lock.lock();
- try {
- _cairo_surface_flush(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_surface_flush(long surface);
/** @param surface cast=(cairo_surface_t *) */
-public static final native void _cairo_surface_finish(long surface);
-public static final void cairo_surface_finish(long surface) {
- lock.lock();
- try {
- _cairo_surface_finish(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_surface_finish(long surface);
/**
* @param surface cast=(cairo_surface_t *)
*/
-public static final native int _cairo_surface_get_type(long surface);
-public static final int cairo_surface_get_type(long surface) {
- lock.lock();
- try {
- return _cairo_surface_get_type(surface);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param surface cast=(cairo_surface_t *)
- */
-public static final native int _cairo_surface_get_content(long surface);
-public static final int cairo_surface_get_content(long surface) {
- lock.lock();
- try {
- return _cairo_surface_get_content(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_surface_get_type(long surface);
/**
* @param surface cast=(cairo_surface_t *)
- * @param key cast=(cairo_user_data_key_t *)
*/
-public static final native long _cairo_surface_get_user_data(long surface, long key);
-public static final long cairo_surface_get_user_data(long surface, long key) {
- lock.lock();
- try {
- return _cairo_surface_get_user_data(surface, key);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_surface_get_content(long surface);
/** @param surface cast=(cairo_surface_t *) */
-public static final native void _cairo_surface_mark_dirty(long surface);
-public static final void cairo_surface_mark_dirty(long surface) {
- lock.lock();
- try {
- _cairo_surface_mark_dirty(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_surface_mark_dirty(long surface);
/** @param surface cast=(cairo_surface_t *) */
-public static final native void _cairo_surface_reference(long surface);
-public static final void cairo_surface_reference(long surface) {
- lock.lock();
- try {
- _cairo_surface_reference(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_surface_reference(long surface);
/**
* @param cr cast=(cairo_t *)
* @param matrix cast=(cairo_matrix_t *)
*/
-public static final native void _cairo_transform(long cr, double[] matrix);
-public static final void cairo_transform(long cr, double[] matrix) {
- lock.lock();
- try {
- _cairo_transform(cr, matrix);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_transform(long cr, double[] matrix);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_translate(long cr, double tx, double ty);
-public static final void cairo_translate(long cr, double tx, double ty) {
- lock.lock();
- try {
- _cairo_translate(cr, tx, ty);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_translate(long cr, double tx, double ty);
/** @param cr cast=(cairo_t *) */
-public static final native void _cairo_user_to_device_distance(long cr, double[] dx, double[] dy);
-public static final void cairo_user_to_device_distance(long cr, double[] dx, double[] dy) {
- lock.lock();
- try {
- _cairo_user_to_device_distance(cr, dx, dy);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_user_to_device_distance(long cr, double[] dx, double[] dy);
public static final native int cairo_version();
-
-/**
- * @param dpy cast=(Display *)
- * @param drawable cast=(Drawable)
- * @param visual cast=(Visual *)
- */
-public static final native long _cairo_xlib_surface_create(long dpy, long drawable, long visual, int width, int height);
-public static final long cairo_xlib_surface_create(long dpy, long drawable, long visual, int width, int height) {
- lock.lock();
- try {
- return _cairo_xlib_surface_create(dpy, drawable, visual, width, height);
- } finally {
- lock.unlock();
- }
-}
/**
* @method flags=dynamic
* @param surface cast=(cairo_surface_t *)
*/
-public static final native int _cairo_xlib_surface_get_height(long surface);
-public static final int cairo_xlib_surface_get_height(long surface) {
- lock.lock();
- try {
- return _cairo_xlib_surface_get_height(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_xlib_surface_get_height(long surface);
/**
* @method flags=dynamic
* @param surface cast=(cairo_surface_t *)
*/
-public static final native int _cairo_xlib_surface_get_width(long surface);
-public static final int cairo_xlib_surface_get_width(long surface) {
- lock.lock();
- try {
- return _cairo_xlib_surface_get_width(surface);
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_xlib_surface_get_width(long surface);
/**
* @param region cast=(cairo_region_t *)
*/
-public static final native int _cairo_region_num_rectangles(long region);
-public static final int cairo_region_num_rectangles(long region) {
- lock.lock();
- try {
- return _cairo_region_num_rectangles(region);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _cairo_region_create();
-public static final long cairo_region_create() {
- lock.lock();
- try {
- return _cairo_region_create();
- } finally {
- lock.unlock();
- }
-}
+public static final native int cairo_region_num_rectangles(long region);
+public static final native long cairo_region_create();
/**
* @param region cast=(cairo_region_t *)
*/
-public static final native long _cairo_region_copy(long region);
-public static final long cairo_region_copy(long region) {
- lock.lock();
- try {
- return _cairo_region_copy(region);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_region_copy(long region);
/**
* @param region cast=(cairo_region_t *)
*/
-public static final native boolean _cairo_region_contains_point(long region, int x, int y);
-public static final boolean cairo_region_contains_point(long region, int x, int y) {
- lock.lock();
- try {
- return _cairo_region_contains_point(region, x, y);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean cairo_region_contains_point(long region, int x, int y);
/**
* @param region cast=(cairo_region_t *)
* @param rect cast=(cairo_rectangle_int_t *)
*/
-public static final native long _cairo_region_contains_rectangle(long region, cairo_rectangle_int_t rect);
-public static final long cairo_region_contains_rectangle(long region, cairo_rectangle_int_t rect) {
- lock.lock();
- try {
- return _cairo_region_contains_rectangle(region, rect);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_region_contains_rectangle(long region, cairo_rectangle_int_t rect);
/** @param region cast=(cairo_region_t *) */
-public static final native void _cairo_region_destroy(long region);
-public static final void cairo_region_destroy(long region) {
- lock.lock();
- try {
- _cairo_region_destroy(region);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_destroy(long region);
/** @param region cast=(cairo_region_t *) */
-public static final native boolean _cairo_region_is_empty(long region);
-public static final boolean cairo_region_is_empty(long region) {
- lock.lock();
- try {
- return _cairo_region_is_empty(region);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean cairo_region_is_empty(long region);
/**
* @param region cast=(cairo_region_t *)
* @param rectangle cast=(cairo_rectangle_int_t *),flags=no_in
*/
-public static final native void _cairo_region_get_extents(long region, cairo_rectangle_int_t rectangle);
-public static final void cairo_region_get_extents(long region, cairo_rectangle_int_t rectangle) {
- lock.lock();
- try {
- _cairo_region_get_extents(region, rectangle);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_get_extents(long region, cairo_rectangle_int_t rectangle);
/**
* @param region cast=(cairo_region_t *)
* @param rectangle cast=(cairo_rectangle_int_t *)
*/
-public static final native void _cairo_region_get_rectangle(long region, int nth, long rectangle);
-public static final void cairo_region_get_rectangle(long region, int nth, long rectangle) {
- lock.lock();
- try {
- _cairo_region_get_rectangle(region, nth, rectangle);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_get_rectangle(long region, int nth, long rectangle);
/**
* @param source1 cast=(cairo_region_t *)
* @param source2 cast=(const cairo_region_t *)
*/
-public static final native void _cairo_region_intersect(long source1, long source2);
-public static final void cairo_region_intersect(long source1, long source2) {
- lock.lock();
- try {
- _cairo_region_intersect(source1, source2);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_intersect(long source1, long source2);
/**
* @param rectangle cast=(const cairo_rectangle_int_t *)
*/
-public static final native long _cairo_region_create_rectangle(cairo_rectangle_int_t rectangle);
-public static final long cairo_region_create_rectangle(cairo_rectangle_int_t rectangle) {
- lock.lock();
- try {
- return _cairo_region_create_rectangle(rectangle);
- } finally {
- lock.unlock();
- }
-}
+public static final native long cairo_region_create_rectangle(cairo_rectangle_int_t rectangle);
/**
* @param source1 cast=(cairo_region_t *)
* @param source2 cast=(const cairo_region_t *)
*/
-public static final native void _cairo_region_subtract(long source1, long source2);
-public static final void cairo_region_subtract(long source1, long source2) {
- lock.lock();
- try {
- _cairo_region_subtract(source1, source2);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_subtract(long source1, long source2);
/**
* @param region cast=(cairo_region_t *)
*/
-public static final native void _cairo_region_translate(long region, int dx, int dy);
-public static final void cairo_region_translate(long region, int dx, int dy) {
- lock.lock();
- try {
- _cairo_region_translate(region,dx,dy);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_translate(long region, int dx, int dy);
/**
* @param source1 cast=(cairo_region_t *)
* @param source2 cast=(const cairo_region_t *)
*/
-public static final native void _cairo_region_union(long source1, long source2);
-public static final void cairo_region_union(long source1, long source2) {
- lock.lock();
- try {
- _cairo_region_union(source1, source2);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_union(long source1, long source2);
/**
* @param region cast=(cairo_region_t *)
* @param rect cast=(cairo_rectangle_int_t *),flags=no_out
*/
-public static final native void _cairo_region_union_rectangle(long region, cairo_rectangle_int_t rect);
-public static final void cairo_region_union_rectangle(long region, cairo_rectangle_int_t rect) {
- lock.lock();
- try {
- _cairo_region_union_rectangle(region, rect);
- } finally {
- lock.unlock();
- }
-}
+public static final native void cairo_region_union_rectangle(long region, cairo_rectangle_int_t rect);
/**
* @param dest cast=(void *)
* @param src cast=(const void *)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.sh b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.sh
index 8c64f8191f..98abca1fd8 100644..100755
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.sh
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.sh
@@ -26,8 +26,13 @@ if [ "x${MODEL}" = "xx86_64" ]; then
if [ "x${OUTPUT_DIR}" = "x" ]; then
export OUTPUT_DIR=../../../org.eclipse.swt.cocoa.macosx.x86_64
fi
+elif [ "x${MODEL}" = "xarm64" ] || [ "x${MODEL}" = "xaarch64" ]; then
+ export ARCHS="-arch arm64"
+ if [ "x${OUTPUT_DIR}" = "x" ]; then
+ export OUTPUT_DIR=../../../org.eclipse.swt.cocoa.macosx.aarch64
+ fi
fi
export MACOSX_DEPLOYMENT_TARGET=10.10
-make -f make_macosx.mak $1 $2 $3 $4 $5 $6 $7 $8 $9
+make -f make_macosx.mak $1 $2 $3 $4 $5 $6 $7 $8 $9 \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak
index 3a74d90331..080c642081 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak
@@ -35,7 +35,7 @@ CFLAGS = -c -xobjective-c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_S
$(CFLAGS_JAVA_VM) \
-I /System/Library/Frameworks/Cocoa.framework/Headers \
-I /System/Library/Frameworks/JavaScriptCore.framework/Headers
-LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Cocoa -framework WebKit -framework CoreServices -framework JavaScriptCore -framework Security -framework SecurityInterface
+LFLAGS = -bundle $(ARCHS) -framework Cocoa -framework WebKit -framework CoreServices -framework JavaScriptCore -framework Security -framework SecurityInterface
SWT_OBJECTS = swt.o c.o c_stats.o callback.o
SWTPI_OBJECTS = swt.o os.o os_structs.o os_stats.o os_custom.o
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
index 75c8da39ac..d1a92a636b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -23,46 +23,19 @@
#define OS_NATIVE(func) Java_org_eclipse_swt_internal_cocoa_OS_##func
#endif
-#ifndef NO_ATSFontActivateFromFileReference
-JNIEXPORT jint JNICALL OS_NATIVE(ATSFontActivateFromFileReference)
- (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jint arg2, jintLong arg3, jint arg4, jintLongArray arg5)
-{
- jbyte *lparg0=NULL;
- jintLong *lparg5=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, ATSFontActivateFromFileReference_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
-/*
- rc = (jint)ATSFontActivateFromFileReference((const FSRef *)lparg0, (ATSFontContext)arg1, (ATSFontFormat)arg2, (void *)arg3, (ATSOptionFlags)arg4, (ATSFontContainerRef *)lparg5);
-*/
- {
- OS_LOAD_FUNCTION(fp, ATSFontActivateFromFileReference)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(const FSRef *, ATSFontContext, ATSFontFormat, void *, ATSOptionFlags, ATSFontContainerRef *))fp)((const FSRef *)lparg0, (ATSFontContext)arg1, (ATSFontFormat)arg2, (void *)arg3, (ATSOptionFlags)arg4, (ATSFontContainerRef *)lparg5);
- }
- }
-fail:
- if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, ATSFontActivateFromFileReference_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_AcquireRootMenu
-JNIEXPORT jintLong JNICALL OS_NATIVE(AcquireRootMenu)
+JNIEXPORT jlong JNICALL OS_NATIVE(AcquireRootMenu)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, AcquireRootMenu_FUNC);
/*
- rc = (jintLong)AcquireRootMenu();
+ rc = (jlong)AcquireRootMenu();
*/
{
OS_LOAD_FUNCTION(fp, AcquireRootMenu)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+ rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
OS_NATIVE_EXIT(env, that, AcquireRootMenu_FUNC);
@@ -71,7 +44,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(AcquireRootMenu)
#endif
#ifndef NO_CALLBACK_1NSTextAttachmentCell_1attachment
-static jintLong CALLBACK_1NSTextAttachmentCell_1attachment;
+static jlong CALLBACK_1NSTextAttachmentCell_1attachment;
static id proc_CALLBACK_1NSTextAttachmentCell_1attachment(id arg0, SEL arg1) {
id* lprc = ((id* (*)(id, SEL))CALLBACK_1NSTextAttachmentCell_1attachment)(arg0, arg1);
id rc;
@@ -83,23 +56,23 @@ static id proc_CALLBACK_1NSTextAttachmentCell_1attachment(id arg0, SEL arg1) {
}
return rc;
}
-static jintLong CALLBACK_NSTextAttachmentCell_attachment(jintLong func) {
+static jlong CALLBACK_NSTextAttachmentCell_attachment(jlong func) {
CALLBACK_1NSTextAttachmentCell_1attachment = func;
- return (jintLong)proc_CALLBACK_1NSTextAttachmentCell_1attachment;
+ return (jlong)proc_CALLBACK_1NSTextAttachmentCell_1attachment;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1NSTextAttachmentCell_1attachment)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1NSTextAttachmentCell_1attachment)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1NSTextAttachmentCell_1attachment_FUNC);
- rc = (jintLong)CALLBACK_NSTextAttachmentCell_attachment(arg0);
+ rc = (jlong)CALLBACK_NSTextAttachmentCell_attachment(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1NSTextAttachmentCell_1attachment_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1NSTextAttachmentCell_1cellSize
-static jintLong CALLBACK_1NSTextAttachmentCell_1cellSize;
+static jlong CALLBACK_1NSTextAttachmentCell_1cellSize;
static NSSize proc_CALLBACK_1NSTextAttachmentCell_1cellSize(id arg0, SEL arg1) {
NSSize* lprc = ((NSSize* (*)(id, SEL))CALLBACK_1NSTextAttachmentCell_1cellSize)(arg0, arg1);
NSSize rc;
@@ -111,103 +84,103 @@ static NSSize proc_CALLBACK_1NSTextAttachmentCell_1cellSize(id arg0, SEL arg1) {
}
return rc;
}
-static jintLong CALLBACK_NSTextAttachmentCell_cellSize(jintLong func) {
+static jlong CALLBACK_NSTextAttachmentCell_cellSize(jlong func) {
CALLBACK_1NSTextAttachmentCell_1cellSize = func;
- return (jintLong)proc_CALLBACK_1NSTextAttachmentCell_1cellSize;
+ return (jlong)proc_CALLBACK_1NSTextAttachmentCell_1cellSize;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1NSTextAttachmentCell_1cellSize)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1NSTextAttachmentCell_1cellSize)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1NSTextAttachmentCell_1cellSize_FUNC);
- rc = (jintLong)CALLBACK_NSTextAttachmentCell_cellSize(arg0);
+ rc = (jlong)CALLBACK_NSTextAttachmentCell_cellSize(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1NSTextAttachmentCell_1cellSize_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1accessibilityHitTest_1
-static jintLong CALLBACK_1accessibilityHitTest_1;
+static jlong CALLBACK_1accessibilityHitTest_1;
static id proc_CALLBACK_1accessibilityHitTest_1(id arg0, SEL arg1, NSPoint arg2) {
return ((id (*)(id, SEL, NSPoint*))CALLBACK_1accessibilityHitTest_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_accessibilityHitTest_(jintLong func) {
+static jlong CALLBACK_accessibilityHitTest_(jlong func) {
CALLBACK_1accessibilityHitTest_1 = func;
- return (jintLong)proc_CALLBACK_1accessibilityHitTest_1;
+ return (jlong)proc_CALLBACK_1accessibilityHitTest_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1accessibilityHitTest_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1accessibilityHitTest_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1accessibilityHitTest_1_FUNC);
- rc = (jintLong)CALLBACK_accessibilityHitTest_(arg0);
+ rc = (jlong)CALLBACK_accessibilityHitTest_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1accessibilityHitTest_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1attributedSubstringFromRange_1
-static jintLong CALLBACK_1attributedSubstringFromRange_1;
+static jlong CALLBACK_1attributedSubstringFromRange_1;
static NSAttributedString* proc_CALLBACK_1attributedSubstringFromRange_1(id arg0, SEL arg1, NSRange arg2) {
return ((NSAttributedString* (*)(id, SEL, NSRange*))CALLBACK_1attributedSubstringFromRange_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_attributedSubstringFromRange_(jintLong func) {
+static jlong CALLBACK_attributedSubstringFromRange_(jlong func) {
CALLBACK_1attributedSubstringFromRange_1 = func;
- return (jintLong)proc_CALLBACK_1attributedSubstringFromRange_1;
+ return (jlong)proc_CALLBACK_1attributedSubstringFromRange_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1attributedSubstringFromRange_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1attributedSubstringFromRange_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1attributedSubstringFromRange_1_FUNC);
- rc = (jintLong)CALLBACK_attributedSubstringFromRange_(arg0);
+ rc = (jlong)CALLBACK_attributedSubstringFromRange_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1attributedSubstringFromRange_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1
-static jintLong CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1;
+static jlong CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1;
static void proc_CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1(id arg0, SEL arg1, NSRect arg2, NSBitmapImageRep* arg3) {
((void (*)(id, SEL, NSRect*, NSBitmapImageRep*))CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1)(arg0, arg1, &arg2, arg3);
}
-static jintLong CALLBACK_cacheDisplayInRect_toBitmapImageRep_(jintLong func) {
+static jlong CALLBACK_cacheDisplayInRect_toBitmapImageRep_(jlong func) {
CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1 = func;
- return (jintLong)proc_CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1;
+ return (jlong)proc_CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1_FUNC);
- rc = (jintLong)CALLBACK_cacheDisplayInRect_toBitmapImageRep_(arg0);
+ rc = (jlong)CALLBACK_cacheDisplayInRect_toBitmapImageRep_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1cacheDisplayInRect_1toBitmapImageRep_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1canDragRowsWithIndexes_1atPoint_1
-static jintLong CALLBACK_1canDragRowsWithIndexes_1atPoint_1;
+static jlong CALLBACK_1canDragRowsWithIndexes_1atPoint_1;
static BOOL proc_CALLBACK_1canDragRowsWithIndexes_1atPoint_1(id arg0, SEL arg1, NSIndexSet* arg2, NSPoint arg3) {
return ((BOOL (*)(id, SEL, NSIndexSet*, NSPoint*))CALLBACK_1canDragRowsWithIndexes_1atPoint_1)(arg0, arg1, arg2, &arg3);
}
-static jintLong CALLBACK_canDragRowsWithIndexes_atPoint_(jintLong func) {
+static jlong CALLBACK_canDragRowsWithIndexes_atPoint_(jlong func) {
CALLBACK_1canDragRowsWithIndexes_1atPoint_1 = func;
- return (jintLong)proc_CALLBACK_1canDragRowsWithIndexes_1atPoint_1;
+ return (jlong)proc_CALLBACK_1canDragRowsWithIndexes_1atPoint_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1canDragRowsWithIndexes_1atPoint_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1canDragRowsWithIndexes_1atPoint_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1canDragRowsWithIndexes_1atPoint_1_FUNC);
- rc = (jintLong)CALLBACK_canDragRowsWithIndexes_atPoint_(arg0);
+ rc = (jlong)CALLBACK_canDragRowsWithIndexes_atPoint_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1canDragRowsWithIndexes_1atPoint_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1cellBaselineOffset
-static jintLong CALLBACK_1cellBaselineOffset;
+static jlong CALLBACK_1cellBaselineOffset;
static NSPoint proc_CALLBACK_1cellBaselineOffset(id arg0, SEL arg1) {
NSPoint* lprc = ((NSPoint* (*)(id, SEL))CALLBACK_1cellBaselineOffset)(arg0, arg1);
NSPoint rc;
@@ -219,23 +192,23 @@ static NSPoint proc_CALLBACK_1cellBaselineOffset(id arg0, SEL arg1) {
}
return rc;
}
-static jintLong CALLBACK_cellBaselineOffset(jintLong func) {
+static jlong CALLBACK_cellBaselineOffset(jlong func) {
CALLBACK_1cellBaselineOffset = func;
- return (jintLong)proc_CALLBACK_1cellBaselineOffset;
+ return (jlong)proc_CALLBACK_1cellBaselineOffset;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1cellBaselineOffset)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1cellBaselineOffset)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1cellBaselineOffset_FUNC);
- rc = (jintLong)CALLBACK_cellBaselineOffset(arg0);
+ rc = (jlong)CALLBACK_cellBaselineOffset(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1cellBaselineOffset_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1cellSize
-static jintLong CALLBACK_1cellSize;
+static jlong CALLBACK_1cellSize;
static NSSize proc_CALLBACK_1cellSize(id arg0, SEL arg1) {
NSSize* lprc = ((NSSize* (*)(id, SEL))CALLBACK_1cellSize)(arg0, arg1);
NSSize rc;
@@ -247,23 +220,23 @@ static NSSize proc_CALLBACK_1cellSize(id arg0, SEL arg1) {
}
return rc;
}
-static jintLong CALLBACK_cellSize(jintLong func) {
+static jlong CALLBACK_cellSize(jlong func) {
CALLBACK_1cellSize = func;
- return (jintLong)proc_CALLBACK_1cellSize;
+ return (jlong)proc_CALLBACK_1cellSize;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1cellSize)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1cellSize)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1cellSize_FUNC);
- rc = (jintLong)CALLBACK_cellSize(arg0);
+ rc = (jlong)CALLBACK_cellSize(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1cellSize_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1cellSizeForBounds_1
-static jintLong CALLBACK_1cellSizeForBounds_1;
+static jlong CALLBACK_1cellSizeForBounds_1;
static NSSize proc_CALLBACK_1cellSizeForBounds_1(id arg0, SEL arg1, NSRect arg2) {
NSSize* lprc = ((NSSize* (*)(id, SEL, NSRect*))CALLBACK_1cellSizeForBounds_1)(arg0, arg1, &arg2);
NSSize rc;
@@ -275,243 +248,203 @@ static NSSize proc_CALLBACK_1cellSizeForBounds_1(id arg0, SEL arg1, NSRect arg2)
}
return rc;
}
-static jintLong CALLBACK_cellSizeForBounds_(jintLong func) {
+static jlong CALLBACK_cellSizeForBounds_(jlong func) {
CALLBACK_1cellSizeForBounds_1 = func;
- return (jintLong)proc_CALLBACK_1cellSizeForBounds_1;
+ return (jlong)proc_CALLBACK_1cellSizeForBounds_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1cellSizeForBounds_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1cellSizeForBounds_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1cellSizeForBounds_1_FUNC);
- rc = (jintLong)CALLBACK_cellSizeForBounds_(arg0);
+ rc = (jlong)CALLBACK_cellSizeForBounds_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1cellSizeForBounds_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1characterIndexForPoint_1
-static jintLong CALLBACK_1characterIndexForPoint_1;
+static jlong CALLBACK_1characterIndexForPoint_1;
static NSUInteger proc_CALLBACK_1characterIndexForPoint_1(id arg0, SEL arg1, NSPoint arg2) {
return ((NSUInteger (*)(id, SEL, NSPoint*))CALLBACK_1characterIndexForPoint_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_characterIndexForPoint_(jintLong func) {
+static jlong CALLBACK_characterIndexForPoint_(jlong func) {
CALLBACK_1characterIndexForPoint_1 = func;
- return (jintLong)proc_CALLBACK_1characterIndexForPoint_1;
+ return (jlong)proc_CALLBACK_1characterIndexForPoint_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1characterIndexForPoint_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1characterIndexForPoint_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1characterIndexForPoint_1_FUNC);
- rc = (jintLong)CALLBACK_characterIndexForPoint_(arg0);
+ rc = (jlong)CALLBACK_characterIndexForPoint_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1characterIndexForPoint_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1columnAtPoint_1
-static jintLong CALLBACK_1columnAtPoint_1;
+static jlong CALLBACK_1columnAtPoint_1;
static NSInteger proc_CALLBACK_1columnAtPoint_1(id arg0, SEL arg1, NSPoint arg2) {
return ((NSInteger (*)(id, SEL, NSPoint*))CALLBACK_1columnAtPoint_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_columnAtPoint_(jintLong func) {
+static jlong CALLBACK_columnAtPoint_(jlong func) {
CALLBACK_1columnAtPoint_1 = func;
- return (jintLong)proc_CALLBACK_1columnAtPoint_1;
+ return (jlong)proc_CALLBACK_1columnAtPoint_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1columnAtPoint_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1columnAtPoint_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1columnAtPoint_1_FUNC);
- rc = (jintLong)CALLBACK_columnAtPoint_(arg0);
+ rc = (jlong)CALLBACK_columnAtPoint_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1columnAtPoint_1_FUNC);
return rc;
}
#endif
-#ifndef NO_CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1
-static jintLong CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1;
-static BOOL proc_CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1(id arg0, SEL arg1, NSEvent* arg2, NSSize arg3, BOOL arg4) {
- return ((BOOL (*)(id, SEL, NSEvent*, NSSize*, BOOL))CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1)(arg0, arg1, arg2, &arg3, arg4);
-}
-static jintLong CALLBACK_dragSelectionWithEvent_offset_slideBack_(jintLong func) {
- CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1 = func;
- return (jintLong)proc_CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1_FUNC);
- rc = (jintLong)CALLBACK_dragSelectionWithEvent_offset_slideBack_(arg0);
- OS_NATIVE_EXIT(env, that, CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CALLBACK_1draggedImage_1beganAt_1
-static jintLong CALLBACK_1draggedImage_1beganAt_1;
-static void proc_CALLBACK_1draggedImage_1beganAt_1(id arg0, SEL arg1, NSImage* arg2, NSPoint arg3) {
- ((void (*)(id, SEL, NSImage*, NSPoint*))CALLBACK_1draggedImage_1beganAt_1)(arg0, arg1, arg2, &arg3);
-}
-static jintLong CALLBACK_draggedImage_beganAt_(jintLong func) {
- CALLBACK_1draggedImage_1beganAt_1 = func;
- return (jintLong)proc_CALLBACK_1draggedImage_1beganAt_1;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1draggedImage_1beganAt_1)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CALLBACK_1draggedImage_1beganAt_1_FUNC);
- rc = (jintLong)CALLBACK_draggedImage_beganAt_(arg0);
- OS_NATIVE_EXIT(env, that, CALLBACK_1draggedImage_1beganAt_1_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CALLBACK_1draggedImage_1endedAt_1operation_1
-static jintLong CALLBACK_1draggedImage_1endedAt_1operation_1;
+static jlong CALLBACK_1draggedImage_1endedAt_1operation_1;
static void proc_CALLBACK_1draggedImage_1endedAt_1operation_1(id arg0, SEL arg1, NSImage* arg2, NSPoint arg3, NSDragOperation arg4) {
((void (*)(id, SEL, NSImage*, NSPoint*, NSDragOperation))CALLBACK_1draggedImage_1endedAt_1operation_1)(arg0, arg1, arg2, &arg3, arg4);
}
-static jintLong CALLBACK_draggedImage_endedAt_operation_(jintLong func) {
+static jlong CALLBACK_draggedImage_endedAt_operation_(jlong func) {
CALLBACK_1draggedImage_1endedAt_1operation_1 = func;
- return (jintLong)proc_CALLBACK_1draggedImage_1endedAt_1operation_1;
+ return (jlong)proc_CALLBACK_1draggedImage_1endedAt_1operation_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1draggedImage_1endedAt_1operation_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1draggedImage_1endedAt_1operation_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1draggedImage_1endedAt_1operation_1_FUNC);
- rc = (jintLong)CALLBACK_draggedImage_endedAt_operation_(arg0);
+ rc = (jlong)CALLBACK_draggedImage_endedAt_operation_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1draggedImage_1endedAt_1operation_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawBackgroundInClipRect_1
-static jintLong CALLBACK_1drawBackgroundInClipRect_1;
+static jlong CALLBACK_1drawBackgroundInClipRect_1;
static void proc_CALLBACK_1drawBackgroundInClipRect_1(id arg0, SEL arg1, NSRect arg2) {
((void (*)(id, SEL, NSRect*))CALLBACK_1drawBackgroundInClipRect_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_drawBackgroundInClipRect_(jintLong func) {
+static jlong CALLBACK_drawBackgroundInClipRect_(jlong func) {
CALLBACK_1drawBackgroundInClipRect_1 = func;
- return (jintLong)proc_CALLBACK_1drawBackgroundInClipRect_1;
+ return (jlong)proc_CALLBACK_1drawBackgroundInClipRect_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawBackgroundInClipRect_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawBackgroundInClipRect_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawBackgroundInClipRect_1_FUNC);
- rc = (jintLong)CALLBACK_drawBackgroundInClipRect_(arg0);
+ rc = (jlong)CALLBACK_drawBackgroundInClipRect_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawBackgroundInClipRect_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawBezelWithFrame_1inView_1
-static jintLong CALLBACK_1drawBezelWithFrame_1inView_1;
+static jlong CALLBACK_1drawBezelWithFrame_1inView_1;
static void proc_CALLBACK_1drawBezelWithFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
((void (*)(id, SEL, NSRect*, NSView*))CALLBACK_1drawBezelWithFrame_1inView_1)(arg0, arg1, &arg2, arg3);
}
-static jintLong CALLBACK_drawBezelWithFrame_inView_(jintLong func) {
+static jlong CALLBACK_drawBezelWithFrame_inView_(jlong func) {
CALLBACK_1drawBezelWithFrame_1inView_1 = func;
- return (jintLong)proc_CALLBACK_1drawBezelWithFrame_1inView_1;
+ return (jlong)proc_CALLBACK_1drawBezelWithFrame_1inView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawBezelWithFrame_1inView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawBezelWithFrame_1inView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawBezelWithFrame_1inView_1_FUNC);
- rc = (jintLong)CALLBACK_drawBezelWithFrame_inView_(arg0);
+ rc = (jlong)CALLBACK_drawBezelWithFrame_inView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawBezelWithFrame_1inView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawImage_1withFrame_1inView_1
-static jintLong CALLBACK_1drawImage_1withFrame_1inView_1;
+static jlong CALLBACK_1drawImage_1withFrame_1inView_1;
static void proc_CALLBACK_1drawImage_1withFrame_1inView_1(id arg0, SEL arg1, NSImage* arg2, NSRect arg3, NSView* arg4) {
((void (*)(id, SEL, NSImage*, NSRect*, NSView*))CALLBACK_1drawImage_1withFrame_1inView_1)(arg0, arg1, arg2, &arg3, arg4);
}
-static jintLong CALLBACK_drawImage_withFrame_inView_(jintLong func) {
+static jlong CALLBACK_drawImage_withFrame_inView_(jlong func) {
CALLBACK_1drawImage_1withFrame_1inView_1 = func;
- return (jintLong)proc_CALLBACK_1drawImage_1withFrame_1inView_1;
+ return (jlong)proc_CALLBACK_1drawImage_1withFrame_1inView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawImage_1withFrame_1inView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawImage_1withFrame_1inView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawImage_1withFrame_1inView_1_FUNC);
- rc = (jintLong)CALLBACK_drawImage_withFrame_inView_(arg0);
+ rc = (jlong)CALLBACK_drawImage_withFrame_inView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawImage_1withFrame_1inView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawInteriorWithFrame_1inView_1
-static jintLong CALLBACK_1drawInteriorWithFrame_1inView_1;
+static jlong CALLBACK_1drawInteriorWithFrame_1inView_1;
static void proc_CALLBACK_1drawInteriorWithFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
((void (*)(id, SEL, NSRect*, NSView*))CALLBACK_1drawInteriorWithFrame_1inView_1)(arg0, arg1, &arg2, arg3);
}
-static jintLong CALLBACK_drawInteriorWithFrame_inView_(jintLong func) {
+static jlong CALLBACK_drawInteriorWithFrame_inView_(jlong func) {
CALLBACK_1drawInteriorWithFrame_1inView_1 = func;
- return (jintLong)proc_CALLBACK_1drawInteriorWithFrame_1inView_1;
+ return (jlong)proc_CALLBACK_1drawInteriorWithFrame_1inView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawInteriorWithFrame_1inView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawInteriorWithFrame_1inView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawInteriorWithFrame_1inView_1_FUNC);
- rc = (jintLong)CALLBACK_drawInteriorWithFrame_inView_(arg0);
+ rc = (jlong)CALLBACK_drawInteriorWithFrame_inView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawInteriorWithFrame_1inView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawLabel_1inRect_1
-static jintLong CALLBACK_1drawLabel_1inRect_1;
+static jlong CALLBACK_1drawLabel_1inRect_1;
static void proc_CALLBACK_1drawLabel_1inRect_1(id arg0, SEL arg1, BOOL arg2, NSRect arg3) {
((void (*)(id, SEL, BOOL, NSRect*))CALLBACK_1drawLabel_1inRect_1)(arg0, arg1, arg2, &arg3);
}
-static jintLong CALLBACK_drawLabel_inRect_(jintLong func) {
+static jlong CALLBACK_drawLabel_inRect_(jlong func) {
CALLBACK_1drawLabel_1inRect_1 = func;
- return (jintLong)proc_CALLBACK_1drawLabel_1inRect_1;
+ return (jlong)proc_CALLBACK_1drawLabel_1inRect_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawLabel_1inRect_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawLabel_1inRect_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawLabel_1inRect_1_FUNC);
- rc = (jintLong)CALLBACK_drawLabel_inRect_(arg0);
+ rc = (jlong)CALLBACK_drawLabel_inRect_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawLabel_1inRect_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawRect_1
-static jintLong CALLBACK_1drawRect_1;
+static jlong CALLBACK_1drawRect_1;
static void proc_CALLBACK_1drawRect_1(id arg0, SEL arg1, NSRect arg2) {
((void (*)(id, SEL, NSRect*))CALLBACK_1drawRect_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_drawRect_(jintLong func) {
+static jlong CALLBACK_drawRect_(jlong func) {
CALLBACK_1drawRect_1 = func;
- return (jintLong)proc_CALLBACK_1drawRect_1;
+ return (jlong)proc_CALLBACK_1drawRect_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawRect_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawRect_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawRect_1_FUNC);
- rc = (jintLong)CALLBACK_drawRect_(arg0);
+ rc = (jlong)CALLBACK_drawRect_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawRect_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawTitle_1withFrame_1inView_1
-static jintLong CALLBACK_1drawTitle_1withFrame_1inView_1;
+static jlong CALLBACK_1drawTitle_1withFrame_1inView_1;
static NSRect proc_CALLBACK_1drawTitle_1withFrame_1inView_1(id arg0, SEL arg1, NSAttributedString* arg2, NSRect arg3, NSView* arg4) {
NSRect* lprc = ((NSRect* (*)(id, SEL, NSAttributedString*, NSRect*, NSView*))CALLBACK_1drawTitle_1withFrame_1inView_1)(arg0, arg1, arg2, &arg3, arg4);
NSRect rc;
@@ -523,63 +456,63 @@ static NSRect proc_CALLBACK_1drawTitle_1withFrame_1inView_1(id arg0, SEL arg1, N
}
return rc;
}
-static jintLong CALLBACK_drawTitle_withFrame_inView_(jintLong func) {
+static jlong CALLBACK_drawTitle_withFrame_inView_(jlong func) {
CALLBACK_1drawTitle_1withFrame_1inView_1 = func;
- return (jintLong)proc_CALLBACK_1drawTitle_1withFrame_1inView_1;
+ return (jlong)proc_CALLBACK_1drawTitle_1withFrame_1inView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawTitle_1withFrame_1inView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawTitle_1withFrame_1inView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawTitle_1withFrame_1inView_1_FUNC);
- rc = (jintLong)CALLBACK_drawTitle_withFrame_inView_(arg0);
+ rc = (jlong)CALLBACK_drawTitle_withFrame_inView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawTitle_1withFrame_1inView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawViewBackgroundInRect_1
-static jintLong CALLBACK_1drawViewBackgroundInRect_1;
+static jlong CALLBACK_1drawViewBackgroundInRect_1;
static void proc_CALLBACK_1drawViewBackgroundInRect_1(id arg0, SEL arg1, NSRect arg2) {
((void (*)(id, SEL, NSRect*))CALLBACK_1drawViewBackgroundInRect_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_drawViewBackgroundInRect_(jintLong func) {
+static jlong CALLBACK_drawViewBackgroundInRect_(jlong func) {
CALLBACK_1drawViewBackgroundInRect_1 = func;
- return (jintLong)proc_CALLBACK_1drawViewBackgroundInRect_1;
+ return (jlong)proc_CALLBACK_1drawViewBackgroundInRect_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawViewBackgroundInRect_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawViewBackgroundInRect_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawViewBackgroundInRect_1_FUNC);
- rc = (jintLong)CALLBACK_drawViewBackgroundInRect_(arg0);
+ rc = (jlong)CALLBACK_drawViewBackgroundInRect_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawViewBackgroundInRect_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1drawWithExpansionFrame_1inView_1
-static jintLong CALLBACK_1drawWithExpansionFrame_1inView_1;
+static jlong CALLBACK_1drawWithExpansionFrame_1inView_1;
static void proc_CALLBACK_1drawWithExpansionFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
((void (*)(id, SEL, NSRect*, NSView*))CALLBACK_1drawWithExpansionFrame_1inView_1)(arg0, arg1, &arg2, arg3);
}
-static jintLong CALLBACK_drawWithExpansionFrame_inView_(jintLong func) {
+static jlong CALLBACK_drawWithExpansionFrame_inView_(jlong func) {
CALLBACK_1drawWithExpansionFrame_1inView_1 = func;
- return (jintLong)proc_CALLBACK_1drawWithExpansionFrame_1inView_1;
+ return (jlong)proc_CALLBACK_1drawWithExpansionFrame_1inView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawWithExpansionFrame_1inView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1drawWithExpansionFrame_1inView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1drawWithExpansionFrame_1inView_1_FUNC);
- rc = (jintLong)CALLBACK_drawWithExpansionFrame_inView_(arg0);
+ rc = (jlong)CALLBACK_drawWithExpansionFrame_inView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1drawWithExpansionFrame_1inView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1expansionFrameWithFrame_1inView_1
-static jintLong CALLBACK_1expansionFrameWithFrame_1inView_1;
+static jlong CALLBACK_1expansionFrameWithFrame_1inView_1;
static NSRect proc_CALLBACK_1expansionFrameWithFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
NSRect* lprc = ((NSRect* (*)(id, SEL, NSRect*, NSView*))CALLBACK_1expansionFrameWithFrame_1inView_1)(arg0, arg1, &arg2, arg3);
NSRect rc;
@@ -591,23 +524,23 @@ static NSRect proc_CALLBACK_1expansionFrameWithFrame_1inView_1(id arg0, SEL arg1
}
return rc;
}
-static jintLong CALLBACK_expansionFrameWithFrame_inView_(jintLong func) {
+static jlong CALLBACK_expansionFrameWithFrame_inView_(jlong func) {
CALLBACK_1expansionFrameWithFrame_1inView_1 = func;
- return (jintLong)proc_CALLBACK_1expansionFrameWithFrame_1inView_1;
+ return (jlong)proc_CALLBACK_1expansionFrameWithFrame_1inView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1expansionFrameWithFrame_1inView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1expansionFrameWithFrame_1inView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1expansionFrameWithFrame_1inView_1_FUNC);
- rc = (jintLong)CALLBACK_expansionFrameWithFrame_inView_(arg0);
+ rc = (jlong)CALLBACK_expansionFrameWithFrame_inView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1expansionFrameWithFrame_1inView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1firstRectForCharacterRange_1
-static jintLong CALLBACK_1firstRectForCharacterRange_1;
+static jlong CALLBACK_1firstRectForCharacterRange_1;
static NSRect proc_CALLBACK_1firstRectForCharacterRange_1(id arg0, SEL arg1, NSRange arg2) {
NSRect* lprc = ((NSRect* (*)(id, SEL, NSRange*))CALLBACK_1firstRectForCharacterRange_1)(arg0, arg1, &arg2);
NSRect rc;
@@ -619,23 +552,23 @@ static NSRect proc_CALLBACK_1firstRectForCharacterRange_1(id arg0, SEL arg1, NSR
}
return rc;
}
-static jintLong CALLBACK_firstRectForCharacterRange_(jintLong func) {
+static jlong CALLBACK_firstRectForCharacterRange_(jlong func) {
CALLBACK_1firstRectForCharacterRange_1 = func;
- return (jintLong)proc_CALLBACK_1firstRectForCharacterRange_1;
+ return (jlong)proc_CALLBACK_1firstRectForCharacterRange_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1firstRectForCharacterRange_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1firstRectForCharacterRange_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1firstRectForCharacterRange_1_FUNC);
- rc = (jintLong)CALLBACK_firstRectForCharacterRange_(arg0);
+ rc = (jlong)CALLBACK_firstRectForCharacterRange_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1firstRectForCharacterRange_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1focusRingMaskBoundsForFrame_1inView_1
-static jintLong CALLBACK_1focusRingMaskBoundsForFrame_1inView_1;
+static jlong CALLBACK_1focusRingMaskBoundsForFrame_1inView_1;
static NSRect proc_CALLBACK_1focusRingMaskBoundsForFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
NSRect* lprc = ((NSRect* (*)(id, SEL, NSRect*, NSView*))CALLBACK_1focusRingMaskBoundsForFrame_1inView_1)(arg0, arg1, &arg2, arg3);
NSRect rc;
@@ -647,23 +580,23 @@ static NSRect proc_CALLBACK_1focusRingMaskBoundsForFrame_1inView_1(id arg0, SEL
}
return rc;
}
-static jintLong CALLBACK_focusRingMaskBoundsForFrame_inView_(jintLong func) {
+static jlong CALLBACK_focusRingMaskBoundsForFrame_inView_(jlong func) {
CALLBACK_1focusRingMaskBoundsForFrame_1inView_1 = func;
- return (jintLong)proc_CALLBACK_1focusRingMaskBoundsForFrame_1inView_1;
+ return (jlong)proc_CALLBACK_1focusRingMaskBoundsForFrame_1inView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1focusRingMaskBoundsForFrame_1inView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1focusRingMaskBoundsForFrame_1inView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1focusRingMaskBoundsForFrame_1inView_1_FUNC);
- rc = (jintLong)CALLBACK_focusRingMaskBoundsForFrame_inView_(arg0);
+ rc = (jlong)CALLBACK_focusRingMaskBoundsForFrame_inView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1focusRingMaskBoundsForFrame_1inView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1headerRectOfColumn_1
-static jintLong CALLBACK_1headerRectOfColumn_1;
+static jlong CALLBACK_1headerRectOfColumn_1;
static NSRect proc_CALLBACK_1headerRectOfColumn_1(id arg0, SEL arg1, NSInteger arg2) {
NSRect* lprc = ((NSRect* (*)(id, SEL, NSInteger))CALLBACK_1headerRectOfColumn_1)(arg0, arg1, arg2);
NSRect rc;
@@ -675,83 +608,83 @@ static NSRect proc_CALLBACK_1headerRectOfColumn_1(id arg0, SEL arg1, NSInteger a
}
return rc;
}
-static jintLong CALLBACK_headerRectOfColumn_(jintLong func) {
+static jlong CALLBACK_headerRectOfColumn_(jlong func) {
CALLBACK_1headerRectOfColumn_1 = func;
- return (jintLong)proc_CALLBACK_1headerRectOfColumn_1;
+ return (jlong)proc_CALLBACK_1headerRectOfColumn_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1headerRectOfColumn_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1headerRectOfColumn_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1headerRectOfColumn_1_FUNC);
- rc = (jintLong)CALLBACK_headerRectOfColumn_(arg0);
+ rc = (jlong)CALLBACK_headerRectOfColumn_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1headerRectOfColumn_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1highlightSelectionInClipRect_1
-static jintLong CALLBACK_1highlightSelectionInClipRect_1;
+static jlong CALLBACK_1highlightSelectionInClipRect_1;
static void proc_CALLBACK_1highlightSelectionInClipRect_1(id arg0, SEL arg1, NSRect arg2) {
((void (*)(id, SEL, NSRect*))CALLBACK_1highlightSelectionInClipRect_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_highlightSelectionInClipRect_(jintLong func) {
+static jlong CALLBACK_highlightSelectionInClipRect_(jlong func) {
CALLBACK_1highlightSelectionInClipRect_1 = func;
- return (jintLong)proc_CALLBACK_1highlightSelectionInClipRect_1;
+ return (jlong)proc_CALLBACK_1highlightSelectionInClipRect_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1highlightSelectionInClipRect_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1highlightSelectionInClipRect_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1highlightSelectionInClipRect_1_FUNC);
- rc = (jintLong)CALLBACK_highlightSelectionInClipRect_(arg0);
+ rc = (jlong)CALLBACK_highlightSelectionInClipRect_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1highlightSelectionInClipRect_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1hitTestForEvent_1inRect_1ofView_1
-static jintLong CALLBACK_1hitTestForEvent_1inRect_1ofView_1;
+static jlong CALLBACK_1hitTestForEvent_1inRect_1ofView_1;
static NSCellHitResult proc_CALLBACK_1hitTestForEvent_1inRect_1ofView_1(id arg0, SEL arg1, NSEvent* arg2, NSRect arg3, NSView* arg4) {
return ((NSCellHitResult (*)(id, SEL, NSEvent*, NSRect*, NSView*))CALLBACK_1hitTestForEvent_1inRect_1ofView_1)(arg0, arg1, arg2, &arg3, arg4);
}
-static jintLong CALLBACK_hitTestForEvent_inRect_ofView_(jintLong func) {
+static jlong CALLBACK_hitTestForEvent_inRect_ofView_(jlong func) {
CALLBACK_1hitTestForEvent_1inRect_1ofView_1 = func;
- return (jintLong)proc_CALLBACK_1hitTestForEvent_1inRect_1ofView_1;
+ return (jlong)proc_CALLBACK_1hitTestForEvent_1inRect_1ofView_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1hitTestForEvent_1inRect_1ofView_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1hitTestForEvent_1inRect_1ofView_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1hitTestForEvent_1inRect_1ofView_1_FUNC);
- rc = (jintLong)CALLBACK_hitTestForEvent_inRect_ofView_(arg0);
+ rc = (jlong)CALLBACK_hitTestForEvent_inRect_ofView_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1hitTestForEvent_1inRect_1ofView_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1hitTest_1
-static jintLong CALLBACK_1hitTest_1;
+static jlong CALLBACK_1hitTest_1;
static NSView* proc_CALLBACK_1hitTest_1(id arg0, SEL arg1, NSPoint arg2) {
return ((NSView* (*)(id, SEL, NSPoint*))CALLBACK_1hitTest_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_hitTest_(jintLong func) {
+static jlong CALLBACK_hitTest_(jlong func) {
CALLBACK_1hitTest_1 = func;
- return (jintLong)proc_CALLBACK_1hitTest_1;
+ return (jlong)proc_CALLBACK_1hitTest_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1hitTest_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1hitTest_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1hitTest_1_FUNC);
- rc = (jintLong)CALLBACK_hitTest_(arg0);
+ rc = (jlong)CALLBACK_hitTest_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1hitTest_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1imageRectForBounds_1
-static jintLong CALLBACK_1imageRectForBounds_1;
+static jlong CALLBACK_1imageRectForBounds_1;
static NSRect proc_CALLBACK_1imageRectForBounds_1(id arg0, SEL arg1, NSRect arg2) {
NSRect* lprc = ((NSRect* (*)(id, SEL, NSRect*))CALLBACK_1imageRectForBounds_1)(arg0, arg1, &arg2);
NSRect rc;
@@ -763,23 +696,23 @@ static NSRect proc_CALLBACK_1imageRectForBounds_1(id arg0, SEL arg1, NSRect arg2
}
return rc;
}
-static jintLong CALLBACK_imageRectForBounds_(jintLong func) {
+static jlong CALLBACK_imageRectForBounds_(jlong func) {
CALLBACK_1imageRectForBounds_1 = func;
- return (jintLong)proc_CALLBACK_1imageRectForBounds_1;
+ return (jlong)proc_CALLBACK_1imageRectForBounds_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1imageRectForBounds_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1imageRectForBounds_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1imageRectForBounds_1_FUNC);
- rc = (jintLong)CALLBACK_imageRectForBounds_(arg0);
+ rc = (jlong)CALLBACK_imageRectForBounds_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1imageRectForBounds_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1markedRange
-static jintLong CALLBACK_1markedRange;
+static jlong CALLBACK_1markedRange;
static NSRange proc_CALLBACK_1markedRange(id arg0, SEL arg1) {
NSRange* lprc = ((NSRange* (*)(id, SEL))CALLBACK_1markedRange)(arg0, arg1);
NSRange rc;
@@ -791,43 +724,43 @@ static NSRange proc_CALLBACK_1markedRange(id arg0, SEL arg1) {
}
return rc;
}
-static jintLong CALLBACK_markedRange(jintLong func) {
+static jlong CALLBACK_markedRange(jlong func) {
CALLBACK_1markedRange = func;
- return (jintLong)proc_CALLBACK_1markedRange;
+ return (jlong)proc_CALLBACK_1markedRange;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1markedRange)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1markedRange)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1markedRange_FUNC);
- rc = (jintLong)CALLBACK_markedRange(arg0);
+ rc = (jlong)CALLBACK_markedRange(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1markedRange_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1scrollClipView_1toPoint_1
-static jintLong CALLBACK_1scrollClipView_1toPoint_1;
+static jlong CALLBACK_1scrollClipView_1toPoint_1;
static void proc_CALLBACK_1scrollClipView_1toPoint_1(id arg0, SEL arg1, NSClipView* arg2, NSPoint arg3) {
((void (*)(id, SEL, NSClipView*, NSPoint*))CALLBACK_1scrollClipView_1toPoint_1)(arg0, arg1, arg2, &arg3);
}
-static jintLong CALLBACK_scrollClipView_toPoint_(jintLong func) {
+static jlong CALLBACK_scrollClipView_toPoint_(jlong func) {
CALLBACK_1scrollClipView_1toPoint_1 = func;
- return (jintLong)proc_CALLBACK_1scrollClipView_1toPoint_1;
+ return (jlong)proc_CALLBACK_1scrollClipView_1toPoint_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1scrollClipView_1toPoint_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1scrollClipView_1toPoint_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1scrollClipView_1toPoint_1_FUNC);
- rc = (jintLong)CALLBACK_scrollClipView_toPoint_(arg0);
+ rc = (jlong)CALLBACK_scrollClipView_toPoint_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1scrollClipView_1toPoint_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1selectedRange
-static jintLong CALLBACK_1selectedRange;
+static jlong CALLBACK_1selectedRange;
static NSRange proc_CALLBACK_1selectedRange(id arg0, SEL arg1) {
NSRange* lprc = ((NSRange* (*)(id, SEL))CALLBACK_1selectedRange)(arg0, arg1);
NSRange rc;
@@ -839,143 +772,123 @@ static NSRange proc_CALLBACK_1selectedRange(id arg0, SEL arg1) {
}
return rc;
}
-static jintLong CALLBACK_selectedRange(jintLong func) {
+static jlong CALLBACK_selectedRange(jlong func) {
CALLBACK_1selectedRange = func;
- return (jintLong)proc_CALLBACK_1selectedRange;
+ return (jlong)proc_CALLBACK_1selectedRange;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1selectedRange)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1selectedRange)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1selectedRange_FUNC);
- rc = (jintLong)CALLBACK_selectedRange(arg0);
+ rc = (jlong)CALLBACK_selectedRange(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1selectedRange_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1setFrameOrigin_1
-static jintLong CALLBACK_1setFrameOrigin_1;
+static jlong CALLBACK_1setFrameOrigin_1;
static void proc_CALLBACK_1setFrameOrigin_1(id arg0, SEL arg1, NSPoint arg2) {
((void (*)(id, SEL, NSPoint*))CALLBACK_1setFrameOrigin_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_setFrameOrigin_(jintLong func) {
+static jlong CALLBACK_setFrameOrigin_(jlong func) {
CALLBACK_1setFrameOrigin_1 = func;
- return (jintLong)proc_CALLBACK_1setFrameOrigin_1;
+ return (jlong)proc_CALLBACK_1setFrameOrigin_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setFrameOrigin_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1setFrameOrigin_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1setFrameOrigin_1_FUNC);
- rc = (jintLong)CALLBACK_setFrameOrigin_(arg0);
+ rc = (jlong)CALLBACK_setFrameOrigin_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1setFrameOrigin_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1setFrameSize_1
-static jintLong CALLBACK_1setFrameSize_1;
+static jlong CALLBACK_1setFrameSize_1;
static void proc_CALLBACK_1setFrameSize_1(id arg0, SEL arg1, NSSize arg2) {
((void (*)(id, SEL, NSSize*))CALLBACK_1setFrameSize_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_setFrameSize_(jintLong func) {
+static jlong CALLBACK_setFrameSize_(jlong func) {
CALLBACK_1setFrameSize_1 = func;
- return (jintLong)proc_CALLBACK_1setFrameSize_1;
+ return (jlong)proc_CALLBACK_1setFrameSize_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setFrameSize_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1setFrameSize_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1setFrameSize_1_FUNC);
- rc = (jintLong)CALLBACK_setFrameSize_(arg0);
+ rc = (jlong)CALLBACK_setFrameSize_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1setFrameSize_1_FUNC);
return rc;
}
#endif
-#ifndef NO_CALLBACK_1setFrame_1
-static jintLong CALLBACK_1setFrame_1;
-static void proc_CALLBACK_1setFrame_1(id arg0, SEL arg1, NSRect arg2) {
- ((void (*)(id, SEL, NSRect*))CALLBACK_1setFrame_1)(arg0, arg1, &arg2);
-}
-static jintLong CALLBACK_setFrame_(jintLong func) {
- CALLBACK_1setFrame_1 = func;
- return (jintLong)proc_CALLBACK_1setFrame_1;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setFrame_1)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CALLBACK_1setFrame_1_FUNC);
- rc = (jintLong)CALLBACK_setFrame_(arg0);
- OS_NATIVE_EXIT(env, that, CALLBACK_1setFrame_1_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CALLBACK_1setMarkedText_1selectedRange_1
-static jintLong CALLBACK_1setMarkedText_1selectedRange_1;
+static jlong CALLBACK_1setMarkedText_1selectedRange_1;
static void proc_CALLBACK_1setMarkedText_1selectedRange_1(id arg0, SEL arg1, id arg2, NSRange arg3) {
((void (*)(id, SEL, id, NSRange*))CALLBACK_1setMarkedText_1selectedRange_1)(arg0, arg1, arg2, &arg3);
}
-static jintLong CALLBACK_setMarkedText_selectedRange_(jintLong func) {
+static jlong CALLBACK_setMarkedText_selectedRange_(jlong func) {
CALLBACK_1setMarkedText_1selectedRange_1 = func;
- return (jintLong)proc_CALLBACK_1setMarkedText_1selectedRange_1;
+ return (jlong)proc_CALLBACK_1setMarkedText_1selectedRange_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setMarkedText_1selectedRange_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1setMarkedText_1selectedRange_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1setMarkedText_1selectedRange_1_FUNC);
- rc = (jintLong)CALLBACK_setMarkedText_selectedRange_(arg0);
+ rc = (jlong)CALLBACK_setMarkedText_selectedRange_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1setMarkedText_1selectedRange_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1setNeedsDisplayInRect_1
-static jintLong CALLBACK_1setNeedsDisplayInRect_1;
+static jlong CALLBACK_1setNeedsDisplayInRect_1;
static void proc_CALLBACK_1setNeedsDisplayInRect_1(id arg0, SEL arg1, NSRect arg2) {
((void (*)(id, SEL, NSRect*))CALLBACK_1setNeedsDisplayInRect_1)(arg0, arg1, &arg2);
}
-static jintLong CALLBACK_setNeedsDisplayInRect_(jintLong func) {
+static jlong CALLBACK_setNeedsDisplayInRect_(jlong func) {
CALLBACK_1setNeedsDisplayInRect_1 = func;
- return (jintLong)proc_CALLBACK_1setNeedsDisplayInRect_1;
+ return (jlong)proc_CALLBACK_1setNeedsDisplayInRect_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setNeedsDisplayInRect_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1setNeedsDisplayInRect_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1setNeedsDisplayInRect_1_FUNC);
- rc = (jintLong)CALLBACK_setNeedsDisplayInRect_(arg0);
+ rc = (jlong)CALLBACK_setNeedsDisplayInRect_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1setNeedsDisplayInRect_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1shouldChangeTextInRange_1replacementString_1
-static jintLong CALLBACK_1shouldChangeTextInRange_1replacementString_1;
+static jlong CALLBACK_1shouldChangeTextInRange_1replacementString_1;
static BOOL proc_CALLBACK_1shouldChangeTextInRange_1replacementString_1(id arg0, SEL arg1, NSRange arg2, NSString* arg3) {
return ((BOOL (*)(id, SEL, NSRange*, NSString*))CALLBACK_1shouldChangeTextInRange_1replacementString_1)(arg0, arg1, &arg2, arg3);
}
-static jintLong CALLBACK_shouldChangeTextInRange_replacementString_(jintLong func) {
+static jlong CALLBACK_shouldChangeTextInRange_replacementString_(jlong func) {
CALLBACK_1shouldChangeTextInRange_1replacementString_1 = func;
- return (jintLong)proc_CALLBACK_1shouldChangeTextInRange_1replacementString_1;
+ return (jlong)proc_CALLBACK_1shouldChangeTextInRange_1replacementString_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1shouldChangeTextInRange_1replacementString_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1shouldChangeTextInRange_1replacementString_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1shouldChangeTextInRange_1replacementString_1_FUNC);
- rc = (jintLong)CALLBACK_shouldChangeTextInRange_replacementString_(arg0);
+ rc = (jlong)CALLBACK_shouldChangeTextInRange_replacementString_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1shouldChangeTextInRange_1replacementString_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1sizeOfLabel_1
-static jintLong CALLBACK_1sizeOfLabel_1;
+static jlong CALLBACK_1sizeOfLabel_1;
static NSSize proc_CALLBACK_1sizeOfLabel_1(id arg0, SEL arg1, BOOL arg2) {
NSSize* lprc = ((NSSize* (*)(id, SEL, BOOL))CALLBACK_1sizeOfLabel_1)(arg0, arg1, arg2);
NSSize rc;
@@ -987,23 +900,23 @@ static NSSize proc_CALLBACK_1sizeOfLabel_1(id arg0, SEL arg1, BOOL arg2) {
}
return rc;
}
-static jintLong CALLBACK_sizeOfLabel_(jintLong func) {
+static jlong CALLBACK_sizeOfLabel_(jlong func) {
CALLBACK_1sizeOfLabel_1 = func;
- return (jintLong)proc_CALLBACK_1sizeOfLabel_1;
+ return (jlong)proc_CALLBACK_1sizeOfLabel_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1sizeOfLabel_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1sizeOfLabel_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1sizeOfLabel_1_FUNC);
- rc = (jintLong)CALLBACK_sizeOfLabel_(arg0);
+ rc = (jlong)CALLBACK_sizeOfLabel_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1sizeOfLabel_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1
-static jintLong CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
+static jlong CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
static NSRange proc_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1(id arg0, SEL arg1, NSTextView* arg2, NSRange arg3, NSRange arg4) {
NSRange* lprc = ((NSRange* (*)(id, SEL, NSTextView*, NSRange*, NSRange*))CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1)(arg0, arg1, arg2, &arg3, &arg4);
NSRange rc;
@@ -1015,23 +928,23 @@ static NSRange proc_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1t
}
return rc;
}
-static jintLong CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(jintLong func) {
+static jlong CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(jlong func) {
CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1 = func;
- return (jintLong)proc_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
+ return (jlong)proc_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1_FUNC);
- rc = (jintLong)CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(arg0);
+ rc = (jlong)CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1titleRectForBounds_1
-static jintLong CALLBACK_1titleRectForBounds_1;
+static jlong CALLBACK_1titleRectForBounds_1;
static NSRect proc_CALLBACK_1titleRectForBounds_1(id arg0, SEL arg1, NSRect arg2) {
NSRect* lprc = ((NSRect* (*)(id, SEL, NSRect*))CALLBACK_1titleRectForBounds_1)(arg0, arg1, &arg2);
NSRect rc;
@@ -1043,134 +956,88 @@ static NSRect proc_CALLBACK_1titleRectForBounds_1(id arg0, SEL arg1, NSRect arg2
}
return rc;
}
-static jintLong CALLBACK_titleRectForBounds_(jintLong func) {
+static jlong CALLBACK_titleRectForBounds_(jlong func) {
CALLBACK_1titleRectForBounds_1 = func;
- return (jintLong)proc_CALLBACK_1titleRectForBounds_1;
+ return (jlong)proc_CALLBACK_1titleRectForBounds_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1titleRectForBounds_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1titleRectForBounds_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1titleRectForBounds_1_FUNC);
- rc = (jintLong)CALLBACK_titleRectForBounds_(arg0);
+ rc = (jlong)CALLBACK_titleRectForBounds_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1titleRectForBounds_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1view_1stringForToolTip_1point_1userData_1
-static jintLong CALLBACK_1view_1stringForToolTip_1point_1userData_1;
+static jlong CALLBACK_1view_1stringForToolTip_1point_1userData_1;
static NSString* proc_CALLBACK_1view_1stringForToolTip_1point_1userData_1(id arg0, SEL arg1, NSView* arg2, NSToolTipTag arg3, NSPoint arg4, void* arg5) {
return ((NSString* (*)(id, SEL, NSView*, NSToolTipTag, NSPoint*, void*))CALLBACK_1view_1stringForToolTip_1point_1userData_1)(arg0, arg1, arg2, arg3, &arg4, arg5);
}
-static jintLong CALLBACK_view_stringForToolTip_point_userData_(jintLong func) {
+static jlong CALLBACK_view_stringForToolTip_point_userData_(jlong func) {
CALLBACK_1view_1stringForToolTip_1point_1userData_1 = func;
- return (jintLong)proc_CALLBACK_1view_1stringForToolTip_1point_1userData_1;
+ return (jlong)proc_CALLBACK_1view_1stringForToolTip_1point_1userData_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1view_1stringForToolTip_1point_1userData_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1view_1stringForToolTip_1point_1userData_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1view_1stringForToolTip_1point_1userData_1_FUNC);
- rc = (jintLong)CALLBACK_view_stringForToolTip_point_userData_(arg0);
+ rc = (jlong)CALLBACK_view_stringForToolTip_point_userData_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1view_1stringForToolTip_1point_1userData_1_FUNC);
return rc;
}
#endif
#ifndef NO_CALLBACK_1webView_1setFrame_1
-static jintLong CALLBACK_1webView_1setFrame_1;
+static jlong CALLBACK_1webView_1setFrame_1;
static void proc_CALLBACK_1webView_1setFrame_1(id arg0, SEL arg1, WebView* arg2, NSRect arg3) {
((void (*)(id, SEL, WebView*, NSRect*))CALLBACK_1webView_1setFrame_1)(arg0, arg1, arg2, &arg3);
}
-static jintLong CALLBACK_webView_setFrame_(jintLong func) {
+static jlong CALLBACK_webView_setFrame_(jlong func) {
CALLBACK_1webView_1setFrame_1 = func;
- return (jintLong)proc_CALLBACK_1webView_1setFrame_1;
+ return (jlong)proc_CALLBACK_1webView_1setFrame_1;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1webView_1setFrame_1)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CALLBACK_1webView_1setFrame_1)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CALLBACK_1webView_1setFrame_1_FUNC);
- rc = (jintLong)CALLBACK_webView_setFrame_(arg0);
+ rc = (jlong)CALLBACK_webView_setFrame_(arg0);
OS_NATIVE_EXIT(env, that, CALLBACK_1webView_1setFrame_1_FUNC);
return rc;
}
#endif
-#ifndef NO_CFAttributedStringCreate
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFAttributedStringCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CFAttributedStringCreate_FUNC);
- rc = (jintLong)CFAttributedStringCreate((CFAllocatorRef)arg0, (CFStringRef)arg1, (CFDictionaryRef)arg2);
- OS_NATIVE_EXIT(env, that, CFAttributedStringCreate_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CFDataGetBytePtr
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFDataGetBytePtr)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CFDataGetBytePtr)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CFDataGetBytePtr_FUNC);
- rc = (jintLong)CFDataGetBytePtr((CFDataRef)arg0);
+ rc = (jlong)CFDataGetBytePtr((CFDataRef)arg0);
OS_NATIVE_EXIT(env, that, CFDataGetBytePtr_FUNC);
return rc;
}
#endif
#ifndef NO_CFDataGetLength
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFDataGetLength)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CFDataGetLength)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CFDataGetLength_FUNC);
- rc = (jintLong)CFDataGetLength((CFDataRef)arg0);
+ rc = (jlong)CFDataGetLength((CFDataRef)arg0);
OS_NATIVE_EXIT(env, that, CFDataGetLength_FUNC);
return rc;
}
#endif
-#ifndef NO_CFDictionaryAddValue
-JNIEXPORT void JNICALL OS_NATIVE(CFDictionaryAddValue)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- OS_NATIVE_ENTER(env, that, CFDictionaryAddValue_FUNC);
- CFDictionaryAddValue((CFMutableDictionaryRef)arg0, (void*)arg1, (void*)arg2);
- OS_NATIVE_EXIT(env, that, CFDictionaryAddValue_FUNC);
-}
-#endif
-
-#ifndef NO_CFDictionaryCreateMutable
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFDictionaryCreateMutable)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CFDictionaryCreateMutable_FUNC);
- rc = (jintLong)CFDictionaryCreateMutable((CFAllocatorRef)arg0, (CFIndex)arg1, (CFDictionaryKeyCallBacks*)arg2, (CFDictionaryValueCallBacks*)arg3);
- OS_NATIVE_EXIT(env, that, CFDictionaryCreateMutable_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFRange_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CFRange_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CFRange_1sizeof_FUNC);
- rc = (jint)CFRange_sizeof();
- OS_NATIVE_EXIT(env, that, CFRange_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CFRelease
JNIEXPORT void JNICALL OS_NATIVE(CFRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CFRelease_FUNC);
CFRelease((CFTypeRef)arg0);
@@ -1180,7 +1047,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CFRelease)
#ifndef NO_CFRunLoopAddObserver
JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopAddObserver)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
OS_NATIVE_ENTER(env, that, CFRunLoopAddObserver_FUNC);
CFRunLoopAddObserver((CFRunLoopRef)arg0, (CFRunLoopObserverRef)arg1, (CFStringRef)arg2);
@@ -1189,24 +1056,24 @@ JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopAddObserver)
#endif
#ifndef NO_CFRunLoopGetCurrent
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFRunLoopGetCurrent)
+JNIEXPORT jlong JNICALL OS_NATIVE(CFRunLoopGetCurrent)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CFRunLoopGetCurrent_FUNC);
- rc = (jintLong)CFRunLoopGetCurrent();
+ rc = (jlong)CFRunLoopGetCurrent();
OS_NATIVE_EXIT(env, that, CFRunLoopGetCurrent_FUNC);
return rc;
}
#endif
#ifndef NO_CFRunLoopObserverCreate
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFRunLoopObserverCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jintLong arg3, jintLong arg4, jintLong arg5)
+JNIEXPORT jlong JNICALL OS_NATIVE(CFRunLoopObserverCreate)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2, jlong arg3, jlong arg4, jlong arg5)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CFRunLoopObserverCreate_FUNC);
- rc = (jintLong)CFRunLoopObserverCreate((CFAllocatorRef)arg0, (CFOptionFlags)arg1, (Boolean)arg2, (CFIndex)arg3, (CFRunLoopObserverCallBack)arg4, (CFRunLoopObserverContext*)arg5);
+ rc = (jlong)CFRunLoopObserverCreate((CFAllocatorRef)arg0, (CFOptionFlags)arg1, (Boolean)arg2, (CFIndex)arg3, (CFRunLoopObserverCallBack)arg4, (CFRunLoopObserverContext*)arg5);
OS_NATIVE_EXIT(env, that, CFRunLoopObserverCreate_FUNC);
return rc;
}
@@ -1214,7 +1081,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CFRunLoopObserverCreate)
#ifndef NO_CFRunLoopObserverInvalidate
JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopObserverInvalidate)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CFRunLoopObserverInvalidate_FUNC);
CFRunLoopObserverInvalidate((CFRunLoopObserverRef)arg0);
@@ -1222,53 +1089,15 @@ JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopObserverInvalidate)
}
#endif
-#ifndef NO_CFRunLoopRunInMode
-JNIEXPORT jint JNICALL OS_NATIVE(CFRunLoopRunInMode)
- (JNIEnv *env, jclass that, jintLong arg0, jdouble arg1, jboolean arg2)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CFRunLoopRunInMode_FUNC);
- rc = (jint)CFRunLoopRunInMode((CFStringRef)arg0, (CFTimeInterval)arg1, (Boolean)arg2);
- OS_NATIVE_EXIT(env, that, CFRunLoopRunInMode_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFRunLoopStop
-JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopStop)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- OS_NATIVE_ENTER(env, that, CFRunLoopStop_FUNC);
- CFRunLoopStop((CFRunLoopRef)arg0);
- OS_NATIVE_EXIT(env, that, CFRunLoopStop_FUNC);
-}
-#endif
-
-#ifndef NO_CFStringCreateWithCharacters
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFStringCreateWithCharacters)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2)
-{
- jchar *lparg1=NULL;
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CFStringCreateWithCharacters_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)CFStringCreateWithCharacters((CFAllocatorRef)arg0, (UniChar*)lparg1, (CFIndex)arg2);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, CFStringCreateWithCharacters_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CFURLCreateFromFSRef
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFURLCreateFromFSRef)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(CFURLCreateFromFSRef)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CFURLCreateFromFSRef_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)CFURLCreateFromFSRef((CFAllocatorRef)arg0, (FSRef*)lparg1);
+ rc = (jlong)CFURLCreateFromFSRef((CFAllocatorRef)arg0, (FSRef*)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, CFURLCreateFromFSRef_FUNC);
@@ -1277,12 +1106,12 @@ fail:
#endif
#ifndef NO_CFURLCreateStringByAddingPercentEscapes
-JNIEXPORT jintLong JNICALL OS_NATIVE(CFURLCreateStringByAddingPercentEscapes)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4)
+JNIEXPORT jlong JNICALL OS_NATIVE(CFURLCreateStringByAddingPercentEscapes)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jint arg4)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CFURLCreateStringByAddingPercentEscapes_FUNC);
- rc = (jintLong)CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)arg0, (CFStringRef)arg1, (CFStringRef)arg2, (CFStringRef)arg3, (CFStringEncoding)arg4);
+ rc = (jlong)CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)arg0, (CFStringRef)arg1, (CFStringRef)arg2, (CFStringRef)arg3, (CFStringEncoding)arg4);
OS_NATIVE_EXIT(env, that, CFURLCreateStringByAddingPercentEscapes_FUNC);
return rc;
}
@@ -1301,52 +1130,28 @@ JNIEXPORT jint JNICALL OS_NATIVE(CGAffineTransform_1sizeof)
#endif
#ifndef NO_CGBitmapContextCreate
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGBitmapContextCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jint arg6)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGBitmapContextCreate)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jint arg6)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGBitmapContextCreate_FUNC);
- rc = (jintLong)CGBitmapContextCreate((void*)arg0, (size_t)arg1, (size_t)arg2, (size_t)arg3, (size_t)arg4, (CGColorSpaceRef)arg5, (CGBitmapInfo)arg6);
+ rc = (jlong)CGBitmapContextCreate((void*)arg0, (size_t)arg1, (size_t)arg2, (size_t)arg3, (size_t)arg4, (CGColorSpaceRef)arg5, (CGBitmapInfo)arg6);
OS_NATIVE_EXIT(env, that, CGBitmapContextCreate_FUNC);
return rc;
}
#endif
-#ifndef NO_CGBitmapContextCreateImage
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGBitmapContextCreateImage)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGBitmapContextCreateImage_FUNC);
- rc = (jintLong)CGBitmapContextCreateImage((CGContextRef)arg0);
- OS_NATIVE_EXIT(env, that, CGBitmapContextCreateImage_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CGBitmapContextGetData
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGBitmapContextGetData)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGBitmapContextGetData_FUNC);
- rc = (jintLong)CGBitmapContextGetData((CGContextRef)arg0);
- OS_NATIVE_EXIT(env, that, CGBitmapContextGetData_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CGColorCreate
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGColorCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDoubleArray arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGColorCreate)
+ (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1)
{
- jfloatDouble *lparg1=NULL;
- jintLong rc = 0;
+ jdouble *lparg1=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGColorCreate_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetFloatDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)CGColorCreate((CGColorSpaceRef)arg0, (CGFloat*)lparg1);
+ if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)CGColorCreate((CGColorSpaceRef)arg0, (CGFloat*)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseFloatDoubleArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, CGColorCreate_FUNC);
return rc;
}
@@ -1354,7 +1159,7 @@ fail:
#ifndef NO_CGColorRelease
JNIEXPORT void JNICALL OS_NATIVE(CGColorRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGColorRelease_FUNC);
CGColorRelease((CGColorRef)arg0);
@@ -1363,12 +1168,12 @@ JNIEXPORT void JNICALL OS_NATIVE(CGColorRelease)
#endif
#ifndef NO_CGColorSpaceCreateDeviceRGB
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGColorSpaceCreateDeviceRGB)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGColorSpaceCreateDeviceRGB)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGColorSpaceCreateDeviceRGB_FUNC);
- rc = (jintLong)CGColorSpaceCreateDeviceRGB();
+ rc = (jlong)CGColorSpaceCreateDeviceRGB();
OS_NATIVE_EXIT(env, that, CGColorSpaceCreateDeviceRGB_FUNC);
return rc;
}
@@ -1376,7 +1181,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CGColorSpaceCreateDeviceRGB)
#ifndef NO_CGColorSpaceRelease
JNIEXPORT void JNICALL OS_NATIVE(CGColorSpaceRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGColorSpaceRelease_FUNC);
CGColorSpaceRelease((CGColorSpaceRef)arg0);
@@ -1386,7 +1191,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGColorSpaceRelease)
#ifndef NO_CGContextAddPath
JNIEXPORT void JNICALL OS_NATIVE(CGContextAddPath)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
OS_NATIVE_ENTER(env, that, CGContextAddPath_FUNC);
CGContextAddPath((CGContextRef)arg0, (CGPathRef)arg1);
@@ -1396,7 +1201,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextAddPath)
#ifndef NO_CGContextBeginTransparencyLayerWithRect
JNIEXPORT void JNICALL OS_NATIVE(CGContextBeginTransparencyLayerWithRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
CGRect _arg1, *lparg1=NULL;
OS_NATIVE_ENTER(env, that, CGContextBeginTransparencyLayerWithRect_FUNC);
@@ -1409,53 +1214,20 @@ fail:
#endif
#ifndef NO_CGContextCopyPath
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGContextCopyPath)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGContextCopyPath)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGContextCopyPath_FUNC);
-/*
- rc = (jintLong)CGContextCopyPath((CGContextRef)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CGContextCopyPath)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(CGContextRef))fp)((CGContextRef)arg0);
- }
- }
+ rc = (jlong)CGContextCopyPath((CGContextRef)arg0);
OS_NATIVE_EXIT(env, that, CGContextCopyPath_FUNC);
return rc;
}
#endif
-#ifndef NO_CGContextCopyWindowContentsToRect
-JNIEXPORT void JNICALL OS_NATIVE(CGContextCopyWindowContentsToRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2, jintLong arg3, jobject arg4)
-{
- CGRect _arg1, *lparg1=NULL;
- CGRect _arg4, *lparg4=NULL;
- OS_NATIVE_ENTER(env, that, CGContextCopyWindowContentsToRect_FUNC);
- if (arg1) if ((lparg1 = getCGRectFields(env, arg1, &_arg1)) == NULL) goto fail;
- if (arg4) if ((lparg4 = getCGRectFields(env, arg4, &_arg4)) == NULL) goto fail;
-/*
- CGContextCopyWindowContentsToRect(arg0, *lparg1, arg2, arg3, *lparg4);
-*/
- {
- OS_LOAD_FUNCTION(fp, CGContextCopyWindowContentsToRect)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, CGRect, jintLong, jintLong, CGRect))fp)(arg0, *lparg1, arg2, arg3, *lparg4);
- }
- }
-fail:
- if (arg4 && lparg4) setCGRectFields(env, arg4, lparg4);
- if (arg1 && lparg1) setCGRectFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, CGContextCopyWindowContentsToRect_FUNC);
-}
-#endif
-
#ifndef NO_CGContextDrawImage
JNIEXPORT void JNICALL OS_NATIVE(CGContextDrawImage)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
CGRect _arg1, *lparg1=NULL;
OS_NATIVE_ENTER(env, that, CGContextDrawImage_FUNC);
@@ -1469,7 +1241,7 @@ fail:
#ifndef NO_CGContextEndTransparencyLayer
JNIEXPORT void JNICALL OS_NATIVE(CGContextEndTransparencyLayer)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGContextEndTransparencyLayer_FUNC);
CGContextEndTransparencyLayer((CGContextRef)arg0);
@@ -1479,7 +1251,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextEndTransparencyLayer)
#ifndef NO_CGContextFillRect
JNIEXPORT void JNICALL OS_NATIVE(CGContextFillRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
CGRect _arg1, *lparg1=NULL;
OS_NATIVE_ENTER(env, that, CGContextFillRect_FUNC);
@@ -1493,7 +1265,7 @@ fail:
#ifndef NO_CGContextRelease
JNIEXPORT void JNICALL OS_NATIVE(CGContextRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGContextRelease_FUNC);
CGContextRelease((CGContextRef)arg0);
@@ -1503,7 +1275,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextRelease)
#ifndef NO_CGContextReplacePathWithStrokedPath
JNIEXPORT void JNICALL OS_NATIVE(CGContextReplacePathWithStrokedPath)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGContextReplacePathWithStrokedPath_FUNC);
CGContextReplacePathWithStrokedPath((CGContextRef)arg0);
@@ -1513,7 +1285,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextReplacePathWithStrokedPath)
#ifndef NO_CGContextRestoreGState
JNIEXPORT void JNICALL OS_NATIVE(CGContextRestoreGState)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGContextRestoreGState_FUNC);
CGContextRestoreGState((CGContextRef)arg0);
@@ -1523,7 +1295,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextRestoreGState)
#ifndef NO_CGContextSaveGState
JNIEXPORT void JNICALL OS_NATIVE(CGContextSaveGState)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGContextSaveGState_FUNC);
CGContextSaveGState((CGContextRef)arg0);
@@ -1533,7 +1305,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSaveGState)
#ifndef NO_CGContextScaleCTM
JNIEXPORT void JNICALL OS_NATIVE(CGContextScaleCTM)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDouble arg1, jfloatDouble arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
OS_NATIVE_ENTER(env, that, CGContextScaleCTM_FUNC);
CGContextScaleCTM((CGContextRef)arg0, (CGFloat)arg1, (CGFloat)arg2);
@@ -1543,7 +1315,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextScaleCTM)
#ifndef NO_CGContextSetBlendMode
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetBlendMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, CGContextSetBlendMode_FUNC);
CGContextSetBlendMode((CGContextRef)arg0, (CGBlendMode)arg1);
@@ -1553,21 +1325,21 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSetBlendMode)
#ifndef NO_CGContextSetFillColor
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetFillColor)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDoubleArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1)
{
- jfloatDouble *lparg1=NULL;
+ jdouble *lparg1=NULL;
OS_NATIVE_ENTER(env, that, CGContextSetFillColor_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetFloatDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
CGContextSetFillColor((CGContextRef)arg0, (CGFloat*)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseFloatDoubleArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, CGContextSetFillColor_FUNC);
}
#endif
#ifndef NO_CGContextSetFillColorSpace
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetFillColorSpace)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
OS_NATIVE_ENTER(env, that, CGContextSetFillColorSpace_FUNC);
CGContextSetFillColorSpace((CGContextRef)arg0, (CGColorSpaceRef)arg1);
@@ -1577,7 +1349,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSetFillColorSpace)
#ifndef NO_CGContextSetLineCap
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetLineCap)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, CGContextSetLineCap_FUNC);
CGContextSetLineCap((CGContextRef)arg0, (CGLineCap)arg1);
@@ -1587,21 +1359,21 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSetLineCap)
#ifndef NO_CGContextSetLineDash
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetLineDash)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDouble arg1, jfloatArray arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdoubleArray arg2, jlong arg3)
{
- jfloat *lparg2=NULL;
+ jdouble *lparg2=NULL;
OS_NATIVE_ENTER(env, that, CGContextSetLineDash_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
CGContextSetLineDash((CGContextRef)arg0, (CGFloat)arg1, (CGFloat*)lparg2, (size_t)arg3);
fail:
- if (arg2 && lparg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
+ if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
OS_NATIVE_EXIT(env, that, CGContextSetLineDash_FUNC);
}
#endif
#ifndef NO_CGContextSetLineJoin
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetLineJoin)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
OS_NATIVE_ENTER(env, that, CGContextSetLineJoin_FUNC);
CGContextSetLineJoin((CGContextRef)arg0, (CGLineJoin)arg1);
@@ -1611,7 +1383,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSetLineJoin)
#ifndef NO_CGContextSetLineWidth
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetLineWidth)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDouble arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
OS_NATIVE_ENTER(env, that, CGContextSetLineWidth_FUNC);
CGContextSetLineWidth((CGContextRef)arg0, (CGFloat)arg1);
@@ -1621,7 +1393,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSetLineWidth)
#ifndef NO_CGContextSetMiterLimit
JNIEXPORT void JNICALL OS_NATIVE(CGContextSetMiterLimit)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDouble arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
OS_NATIVE_ENTER(env, that, CGContextSetMiterLimit_FUNC);
CGContextSetMiterLimit((CGContextRef)arg0, (CGFloat)arg1);
@@ -1629,53 +1401,9 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSetMiterLimit)
}
#endif
-#ifndef NO_CGContextSetShouldAntialias
-JNIEXPORT void JNICALL OS_NATIVE(CGContextSetShouldAntialias)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
-{
- OS_NATIVE_ENTER(env, that, CGContextSetShouldAntialias_FUNC);
- CGContextSetShouldAntialias((CGContextRef)arg0, (_Bool)arg1);
- OS_NATIVE_EXIT(env, that, CGContextSetShouldAntialias_FUNC);
-}
-#endif
-
-#ifndef NO_CGContextSetTextDrawingMode
-JNIEXPORT void JNICALL OS_NATIVE(CGContextSetTextDrawingMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- OS_NATIVE_ENTER(env, that, CGContextSetTextDrawingMode_FUNC);
- CGContextSetTextDrawingMode((CGContextRef)arg0, (CGTextDrawingMode)arg1);
- OS_NATIVE_EXIT(env, that, CGContextSetTextDrawingMode_FUNC);
-}
-#endif
-
-#ifndef NO_CGContextSetTextMatrix
-JNIEXPORT void JNICALL OS_NATIVE(CGContextSetTextMatrix)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
-{
- CGAffineTransform _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, CGContextSetTextMatrix_FUNC);
- if (arg1) if ((lparg1 = getCGAffineTransformFields(env, arg1, &_arg1)) == NULL) goto fail;
- CGContextSetTextMatrix((CGContextRef)arg0, *lparg1);
-fail:
- if (arg1 && lparg1) setCGAffineTransformFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, CGContextSetTextMatrix_FUNC);
-}
-#endif
-
-#ifndef NO_CGContextSetTextPosition
-JNIEXPORT void JNICALL OS_NATIVE(CGContextSetTextPosition)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDouble arg1, jfloatDouble arg2)
-{
- OS_NATIVE_ENTER(env, that, CGContextSetTextPosition_FUNC);
- CGContextSetTextPosition((CGContextRef)arg0, (CGFloat)arg1, (CGFloat)arg2);
- OS_NATIVE_EXIT(env, that, CGContextSetTextPosition_FUNC);
-}
-#endif
-
#ifndef NO_CGContextStrokePath
JNIEXPORT void JNICALL OS_NATIVE(CGContextStrokePath)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGContextStrokePath_FUNC);
CGContextStrokePath((CGContextRef)arg0);
@@ -1685,7 +1413,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextStrokePath)
#ifndef NO_CGContextTranslateCTM
JNIEXPORT void JNICALL OS_NATIVE(CGContextTranslateCTM)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDouble arg1, jfloatDouble arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
OS_NATIVE_ENTER(env, that, CGContextTranslateCTM_FUNC);
CGContextTranslateCTM((CGContextRef)arg0, (CGFloat)arg1, (CGFloat)arg2);
@@ -1694,12 +1422,12 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextTranslateCTM)
#endif
#ifndef NO_CGDataProviderCreateWithData
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDataProviderCreateWithData)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGDataProviderCreateWithData)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGDataProviderCreateWithData_FUNC);
- rc = (jintLong)CGDataProviderCreateWithData((void*)arg0, (void*)arg1, (size_t)arg2, (CGDataProviderReleaseDataCallback)arg3);
+ rc = (jlong)CGDataProviderCreateWithData((void*)arg0, (void*)arg1, (size_t)arg2, (CGDataProviderReleaseDataCallback)arg3);
OS_NATIVE_EXIT(env, that, CGDataProviderCreateWithData_FUNC);
return rc;
}
@@ -1707,7 +1435,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CGDataProviderCreateWithData)
#ifndef NO_CGDataProviderRelease
JNIEXPORT void JNICALL OS_NATIVE(CGDataProviderRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGDataProviderRelease_FUNC);
CGDataProviderRelease((CGDataProviderRef)arg0);
@@ -1715,151 +1443,39 @@ JNIEXPORT void JNICALL OS_NATIVE(CGDataProviderRelease)
}
#endif
-#ifndef NO_CGDisplayBaseAddress
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDisplayBaseAddress)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGDisplayBaseAddress_FUNC);
-/*
- rc = (jintLong)CGDisplayBaseAddress((CGDirectDisplayID)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CGDisplayBaseAddress)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(CGDirectDisplayID))fp)((CGDirectDisplayID)arg0);
- }
- }
- OS_NATIVE_EXIT(env, that, CGDisplayBaseAddress_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CGDisplayBitsPerPixel
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDisplayBitsPerPixel)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGDisplayBitsPerPixel_FUNC);
-/*
- rc = (jintLong)CGDisplayBitsPerPixel((CGDirectDisplayID)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CGDisplayBitsPerPixel)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(CGDirectDisplayID))fp)((CGDirectDisplayID)arg0);
- }
- }
- OS_NATIVE_EXIT(env, that, CGDisplayBitsPerPixel_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CGDisplayBitsPerSample
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDisplayBitsPerSample)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGDisplayBitsPerSample_FUNC);
-/*
- rc = (jintLong)CGDisplayBitsPerSample((CGDirectDisplayID)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CGDisplayBitsPerSample)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(CGDirectDisplayID))fp)((CGDirectDisplayID)arg0);
- }
- }
- OS_NATIVE_EXIT(env, that, CGDisplayBitsPerSample_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CGDisplayBytesPerRow
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDisplayBytesPerRow)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGDisplayBytesPerRow_FUNC);
-/*
- rc = (jintLong)CGDisplayBytesPerRow((CGDirectDisplayID)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CGDisplayBytesPerRow)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(CGDirectDisplayID))fp)((CGDirectDisplayID)arg0);
- }
- }
- OS_NATIVE_EXIT(env, that, CGDisplayBytesPerRow_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CGDisplayCreateImage
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDisplayCreateImage)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGDisplayCreateImage)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGDisplayCreateImage_FUNC);
-/*
- rc = (jintLong)CGDisplayCreateImage((CGDirectDisplayID)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CGDisplayCreateImage)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(CGDirectDisplayID))fp)((CGDirectDisplayID)arg0);
- }
- }
+ rc = (jlong)CGDisplayCreateImage((CGDirectDisplayID)arg0);
OS_NATIVE_EXIT(env, that, CGDisplayCreateImage_FUNC);
return rc;
}
#endif
-#ifndef NO_CGDisplayPixelsHigh
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDisplayPixelsHigh)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGDisplayPixelsHigh_FUNC);
- rc = (jintLong)CGDisplayPixelsHigh((CGDirectDisplayID)arg0);
- OS_NATIVE_EXIT(env, that, CGDisplayPixelsHigh_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CGDisplayPixelsWide
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGDisplayPixelsWide)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGDisplayPixelsWide_FUNC);
- rc = (jintLong)CGDisplayPixelsWide((CGDirectDisplayID)arg0);
- OS_NATIVE_EXIT(env, that, CGDisplayPixelsWide_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CGEventCreateKeyboardEvent
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGEventCreateKeyboardEvent)
- (JNIEnv *env, jclass that, jintLong arg0, jshort arg1, jboolean arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGEventCreateKeyboardEvent)
+ (JNIEnv *env, jclass that, jlong arg0, jshort arg1, jboolean arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGEventCreateKeyboardEvent_FUNC);
- rc = (jintLong)CGEventCreateKeyboardEvent((CGEventSourceRef)arg0, (CGKeyCode)arg1, (_Bool)arg2);
+ rc = (jlong)CGEventCreateKeyboardEvent((CGEventSourceRef)arg0, (CGKeyCode)arg1, (_Bool)arg2);
OS_NATIVE_EXIT(env, that, CGEventCreateKeyboardEvent_FUNC);
return rc;
}
#endif
#ifndef NO_CGEventCreateMouseEvent
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGEventCreateMouseEvent)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2, jint arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGEventCreateMouseEvent)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2, jint arg3)
{
CGPoint _arg2, *lparg2=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGEventCreateMouseEvent_FUNC);
if (arg2) if ((lparg2 = getCGPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)CGEventCreateMouseEvent((CGEventSourceRef)arg0, (CGEventType)arg1, *lparg2, (CGMouseButton)arg3);
+ rc = (jlong)CGEventCreateMouseEvent((CGEventSourceRef)arg0, (CGEventType)arg1, *lparg2, (CGMouseButton)arg3);
fail:
if (arg2 && lparg2) setCGPointFields(env, arg2, lparg2);
OS_NATIVE_EXIT(env, that, CGEventCreateMouseEvent_FUNC);
@@ -1868,12 +1484,12 @@ fail:
#endif
#ifndef NO_CGEventCreateScrollWheelEvent
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGEventCreateScrollWheelEvent)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGEventCreateScrollWheelEvent)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGEventCreateScrollWheelEvent_FUNC);
- rc = (jintLong)CGEventCreateScrollWheelEvent((CGEventSourceRef)arg0, (CGScrollEventUnit)arg1, (CGWheelCount)arg2, (int32_t)arg3);
+ rc = (jlong)CGEventCreateScrollWheelEvent((CGEventSourceRef)arg0, (CGScrollEventUnit)arg1, (uint32_t)arg2, (int32_t)arg3);
OS_NATIVE_EXIT(env, that, CGEventCreateScrollWheelEvent_FUNC);
return rc;
}
@@ -1881,7 +1497,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CGEventCreateScrollWheelEvent)
#ifndef NO_CGEventGetIntegerValueField
JNIEXPORT jlong JNICALL OS_NATIVE(CGEventGetIntegerValueField)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGEventGetIntegerValueField_FUNC);
@@ -1893,7 +1509,7 @@ JNIEXPORT jlong JNICALL OS_NATIVE(CGEventGetIntegerValueField)
#ifndef NO_CGEventPost
JNIEXPORT void JNICALL OS_NATIVE(CGEventPost)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1)
{
OS_NATIVE_ENTER(env, that, CGEventPost_FUNC);
CGEventPost((CGEventTapLocation)arg0, (CGEventRef)arg1);
@@ -1902,12 +1518,12 @@ JNIEXPORT void JNICALL OS_NATIVE(CGEventPost)
#endif
#ifndef NO_CGEventSourceCreate
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGEventSourceCreate)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGEventSourceCreate)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGEventSourceCreate_FUNC);
- rc = (jintLong)CGEventSourceCreate((CGEventSourceStateID)arg0);
+ rc = (jlong)CGEventSourceCreate((CGEventSourceStateID)arg0);
OS_NATIVE_EXIT(env, that, CGEventSourceCreate_FUNC);
return rc;
}
@@ -1915,13 +1531,13 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CGEventSourceCreate)
#ifndef NO_CGGetDisplaysWithRect
JNIEXPORT jint JNICALL OS_NATIVE(CGGetDisplaysWithRect)
- (JNIEnv *env, jclass that, jobject arg0, jint arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jobject arg0, jint arg1, jlong arg2, jlong arg3)
{
CGRect _arg0, *lparg0=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, CGGetDisplaysWithRect_FUNC);
if (arg0) if ((lparg0 = getCGRectFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jint)CGGetDisplaysWithRect(*lparg0, (CGDisplayCount)arg1, (CGDirectDisplayID*)arg2, (CGDisplayCount*)arg3);
+ rc = (jint)CGGetDisplaysWithRect(*lparg0, (uint32_t)arg1, (CGDirectDisplayID*)arg2, (uint32_t*)arg3);
fail:
if (arg0 && lparg0) setCGRectFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, CGGetDisplaysWithRect_FUNC);
@@ -1930,36 +1546,36 @@ fail:
#endif
#ifndef NO_CGImageCreate
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGImageCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jint arg6, jintLong arg7, jintLong arg8, jboolean arg9, jint arg10)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGImageCreate)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jint arg6, jlong arg7, jlong arg8, jboolean arg9, jint arg10)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGImageCreate_FUNC);
- rc = (jintLong)CGImageCreate((size_t)arg0, (size_t)arg1, (size_t)arg2, (size_t)arg3, (size_t)arg4, (CGColorSpaceRef)arg5, (CGBitmapInfo)arg6, (CGDataProviderRef)arg7, (CGFloat*)arg8, (_Bool)arg9, (CGColorRenderingIntent)arg10);
+ rc = (jlong)CGImageCreate((size_t)arg0, (size_t)arg1, (size_t)arg2, (size_t)arg3, (size_t)arg4, (CGColorSpaceRef)arg5, (CGBitmapInfo)arg6, (CGDataProviderRef)arg7, (CGFloat*)arg8, (_Bool)arg9, (CGColorRenderingIntent)arg10);
OS_NATIVE_EXIT(env, that, CGImageCreate_FUNC);
return rc;
}
#endif
#ifndef NO_CGImageGetHeight
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGImageGetHeight)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGImageGetHeight)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGImageGetHeight_FUNC);
- rc = (jintLong)CGImageGetHeight((CGImageRef)arg0);
+ rc = (jlong)CGImageGetHeight((CGImageRef)arg0);
OS_NATIVE_EXIT(env, that, CGImageGetHeight_FUNC);
return rc;
}
#endif
#ifndef NO_CGImageGetWidth
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGImageGetWidth)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGImageGetWidth)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGImageGetWidth_FUNC);
- rc = (jintLong)CGImageGetWidth((CGImageRef)arg0);
+ rc = (jlong)CGImageGetWidth((CGImageRef)arg0);
OS_NATIVE_EXIT(env, that, CGImageGetWidth_FUNC);
return rc;
}
@@ -1967,7 +1583,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CGImageGetWidth)
#ifndef NO_CGImageRelease
JNIEXPORT void JNICALL OS_NATIVE(CGImageRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGImageRelease_FUNC);
CGImageRelease((CGImageRef)arg0);
@@ -1977,7 +1593,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGImageRelease)
#ifndef NO_CGPathAddCurveToPoint
JNIEXPORT void JNICALL OS_NATIVE(CGPathAddCurveToPoint)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jfloatDouble arg3, jfloatDouble arg4, jfloatDouble arg5, jfloatDouble arg6, jfloatDouble arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jdouble arg6, jdouble arg7)
{
OS_NATIVE_ENTER(env, that, CGPathAddCurveToPoint_FUNC);
CGPathAddCurveToPoint((CGMutablePathRef)arg0, (CGAffineTransform*)arg1, (CGFloat)arg2, (CGFloat)arg3, (CGFloat)arg4, (CGFloat)arg5, (CGFloat)arg6, (CGFloat)arg7);
@@ -1987,7 +1603,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGPathAddCurveToPoint)
#ifndef NO_CGPathAddLineToPoint
JNIEXPORT void JNICALL OS_NATIVE(CGPathAddLineToPoint)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jfloatDouble arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3)
{
OS_NATIVE_ENTER(env, that, CGPathAddLineToPoint_FUNC);
CGPathAddLineToPoint((CGMutablePathRef)arg0, (CGAffineTransform*)arg1, (CGFloat)arg2, (CGFloat)arg3);
@@ -1995,23 +1611,9 @@ JNIEXPORT void JNICALL OS_NATIVE(CGPathAddLineToPoint)
}
#endif
-#ifndef NO_CGPathAddRect
-JNIEXPORT void JNICALL OS_NATIVE(CGPathAddRect)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-{
- CGRect _arg2, *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, CGPathAddRect_FUNC);
- if (arg2) if ((lparg2 = getCGRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- CGPathAddRect((CGMutablePathRef)arg0, (CGAffineTransform*)arg1, *lparg2);
-fail:
- if (arg2 && lparg2) setCGRectFields(env, arg2, lparg2);
- OS_NATIVE_EXIT(env, that, CGPathAddRect_FUNC);
-}
-#endif
-
#ifndef NO_CGPathApply
JNIEXPORT void JNICALL OS_NATIVE(CGPathApply)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
OS_NATIVE_ENTER(env, that, CGPathApply_FUNC);
CGPathApply((CGPathRef)arg0, (void*)arg1, (CGPathApplierFunction)arg2);
@@ -2021,7 +1623,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGPathApply)
#ifndef NO_CGPathCloseSubpath
JNIEXPORT void JNICALL OS_NATIVE(CGPathCloseSubpath)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGPathCloseSubpath_FUNC);
CGPathCloseSubpath((CGMutablePathRef)arg0);
@@ -2029,25 +1631,13 @@ JNIEXPORT void JNICALL OS_NATIVE(CGPathCloseSubpath)
}
#endif
-#ifndef NO_CGPathCreateCopy
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGPathCreateCopy)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CGPathCreateCopy_FUNC);
- rc = (jintLong)CGPathCreateCopy((CGPathRef)arg0);
- OS_NATIVE_EXIT(env, that, CGPathCreateCopy_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CGPathCreateMutable
-JNIEXPORT jintLong JNICALL OS_NATIVE(CGPathCreateMutable)
+JNIEXPORT jlong JNICALL OS_NATIVE(CGPathCreateMutable)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CGPathCreateMutable_FUNC);
- rc = (jintLong)CGPathCreateMutable();
+ rc = (jlong)CGPathCreateMutable();
OS_NATIVE_EXIT(env, that, CGPathCreateMutable_FUNC);
return rc;
}
@@ -2067,7 +1657,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(CGPathElement_1sizeof)
#ifndef NO_CGPathMoveToPoint
JNIEXPORT void JNICALL OS_NATIVE(CGPathMoveToPoint)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jfloatDouble arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3)
{
OS_NATIVE_ENTER(env, that, CGPathMoveToPoint_FUNC);
CGPathMoveToPoint((CGMutablePathRef)arg0, (CGAffineTransform*)arg1, (CGFloat)arg2, (CGFloat)arg3);
@@ -2077,7 +1667,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CGPathMoveToPoint)
#ifndef NO_CGPathRelease
JNIEXPORT void JNICALL OS_NATIVE(CGPathRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CGPathRelease_FUNC);
CGPathRelease((CGPathRef)arg0);
@@ -2097,18 +1687,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(CGPoint_1sizeof)
}
#endif
-#ifndef NO_CGPostKeyboardEvent
-JNIEXPORT jint JNICALL OS_NATIVE(CGPostKeyboardEvent)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jboolean arg2)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CGPostKeyboardEvent_FUNC);
- rc = (jint)CGPostKeyboardEvent((CGCharCode)arg0, (CGKeyCode)arg1, (boolean_t)arg2);
- OS_NATIVE_EXIT(env, that, CGPostKeyboardEvent_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CGRect_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(CGRect_1sizeof)
(JNIEnv *env, jclass that)
@@ -2121,30 +1699,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(CGRect_1sizeof)
}
#endif
-#ifndef NO_CGSetLocalEventsFilterDuringSuppressionState
-JNIEXPORT jint JNICALL OS_NATIVE(CGSetLocalEventsFilterDuringSuppressionState)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CGSetLocalEventsFilterDuringSuppressionState_FUNC);
- rc = (jint)CGSetLocalEventsFilterDuringSuppressionState((CGEventFilterMask)arg0, (CGEventSuppressionState)arg1);
- OS_NATIVE_EXIT(env, that, CGSetLocalEventsFilterDuringSuppressionState_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CGSetLocalEventsSuppressionInterval
-JNIEXPORT jint JNICALL OS_NATIVE(CGSetLocalEventsSuppressionInterval)
- (JNIEnv *env, jclass that, jdouble arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CGSetLocalEventsSuppressionInterval_FUNC);
- rc = (jint)CGSetLocalEventsSuppressionInterval((CFTimeInterval)arg0);
- OS_NATIVE_EXIT(env, that, CGSetLocalEventsSuppressionInterval_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CGSize_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(CGSize_1sizeof)
(JNIEnv *env, jclass that)
@@ -2157,25 +1711,9 @@ JNIEXPORT jint JNICALL OS_NATIVE(CGSize_1sizeof)
}
#endif
-#ifndef NO_CGWarpMouseCursorPosition
-JNIEXPORT jint JNICALL OS_NATIVE(CGWarpMouseCursorPosition)
- (JNIEnv *env, jclass that, jobject arg0)
-{
- CGPoint _arg0, *lparg0=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CGWarpMouseCursorPosition_FUNC);
- if (arg0) if ((lparg0 = getCGPointFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jint)CGWarpMouseCursorPosition(*lparg0);
-fail:
- if (arg0 && lparg0) setCGPointFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, CGWarpMouseCursorPosition_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CPSSetProcessName
JNIEXPORT jint JNICALL OS_NATIVE(CPSSetProcessName)
- (JNIEnv *env, jclass that, jintArray arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jintArray arg0, jlong arg1)
{
jint *lparg0=NULL;
jint rc = 0;
@@ -2189,153 +1727,21 @@ fail:
}
#endif
-#ifndef NO_CTFontGetAscent
-JNIEXPORT jfloatDouble JNICALL OS_NATIVE(CTFontGetAscent)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jfloatDouble rc = 0;
- OS_NATIVE_ENTER(env, that, CTFontGetAscent_FUNC);
- rc = (jfloatDouble)CTFontGetAscent((CTFontRef)arg0);
- OS_NATIVE_EXIT(env, that, CTFontGetAscent_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTFontGetDescent
-JNIEXPORT jfloatDouble JNICALL OS_NATIVE(CTFontGetDescent)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jfloatDouble rc = 0;
- OS_NATIVE_ENTER(env, that, CTFontGetDescent_FUNC);
- rc = (jfloatDouble)CTFontGetDescent((CTFontRef)arg0);
- OS_NATIVE_EXIT(env, that, CTFontGetDescent_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTFontGetLeading
-JNIEXPORT jfloatDouble JNICALL OS_NATIVE(CTFontGetLeading)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jfloatDouble rc = 0;
- OS_NATIVE_ENTER(env, that, CTFontGetLeading_FUNC);
- rc = (jfloatDouble)CTFontGetLeading((CTFontRef)arg0);
- OS_NATIVE_EXIT(env, that, CTFontGetLeading_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTLineCreateWithAttributedString
-JNIEXPORT jintLong JNICALL OS_NATIVE(CTLineCreateWithAttributedString)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CTLineCreateWithAttributedString_FUNC);
- rc = (jintLong)CTLineCreateWithAttributedString((CFAttributedStringRef)arg0);
- OS_NATIVE_EXIT(env, that, CTLineCreateWithAttributedString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTLineDraw
-JNIEXPORT void JNICALL OS_NATIVE(CTLineDraw)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- OS_NATIVE_ENTER(env, that, CTLineDraw_FUNC);
- CTLineDraw((CTLineRef)arg0, (CGContextRef)arg1);
- OS_NATIVE_EXIT(env, that, CTLineDraw_FUNC);
-}
-#endif
-
-#ifndef NO_CTLineGetTypographicBounds
-JNIEXPORT jdouble JNICALL OS_NATIVE(CTLineGetTypographicBounds)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatDoubleArray arg1, jfloatDoubleArray arg2, jfloatDoubleArray arg3)
-{
- jfloatDouble *lparg1=NULL;
- jfloatDouble *lparg2=NULL;
- jfloatDouble *lparg3=NULL;
- jdouble rc = 0;
- OS_NATIVE_ENTER(env, that, CTLineGetTypographicBounds_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetFloatDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetFloatDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetFloatDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jdouble)CTLineGetTypographicBounds((CTLineRef)arg0, (CGFloat*)lparg1, (CGFloat*)lparg2, (CGFloat*)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseFloatDoubleArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseFloatDoubleArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseFloatDoubleArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, CTLineGetTypographicBounds_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTParagraphStyleCreate
-JNIEXPORT jintLong JNICALL OS_NATIVE(CTParagraphStyleCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CTParagraphStyleCreate_FUNC);
- rc = (jintLong)CTParagraphStyleCreate((CTParagraphStyleSetting*)arg0, (size_t)arg1);
- OS_NATIVE_EXIT(env, that, CTParagraphStyleCreate_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTParagraphStyleSetting_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CTParagraphStyleSetting_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CTParagraphStyleSetting_1sizeof_FUNC);
- rc = (jint)CTParagraphStyleSetting_sizeof();
- OS_NATIVE_EXIT(env, that, CTParagraphStyleSetting_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTTypesetterCreateLine
-JNIEXPORT jintLong JNICALL OS_NATIVE(CTTypesetterCreateLine)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
-{
- CFRange _arg1, *lparg1=NULL;
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CTTypesetterCreateLine_FUNC);
- if (arg1) if ((lparg1 = getCFRangeFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jintLong)CTTypesetterCreateLine((CTTypesetterRef)arg0, *lparg1);
-fail:
- if (arg1 && lparg1) setCFRangeFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, CTTypesetterCreateLine_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTTypesetterCreateWithAttributedString
-JNIEXPORT jintLong JNICALL OS_NATIVE(CTTypesetterCreateWithAttributedString)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CTTypesetterCreateWithAttributedString_FUNC);
- rc = (jintLong)CTTypesetterCreateWithAttributedString((CFAttributedStringRef)arg0);
- OS_NATIVE_EXIT(env, that, CTTypesetterCreateWithAttributedString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CTTypesetterSuggestLineBreak
-JNIEXPORT jintLong JNICALL OS_NATIVE(CTTypesetterSuggestLineBreak)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2)
+#ifndef NO_CTFontManagerRegisterFontsForURL
+JNIEXPORT jboolean JNICALL OS_NATIVE(CTFontManagerRegisterFontsForURL)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CTTypesetterSuggestLineBreak_FUNC);
- rc = (jintLong)CTTypesetterSuggestLineBreak((CTTypesetterRef)arg0, (CFIndex)arg1, (double)arg2);
- OS_NATIVE_EXIT(env, that, CTTypesetterSuggestLineBreak_FUNC);
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, CTFontManagerRegisterFontsForURL_FUNC);
+ rc = (jboolean)CTFontManagerRegisterFontsForURL((CFURLRef)arg0, (CTFontManagerScope)arg1, (CFErrorRef*)arg2);
+ OS_NATIVE_EXIT(env, that, CTFontManagerRegisterFontsForURL_FUNC);
return rc;
}
#endif
#ifndef NO_CancelMenuTracking
JNIEXPORT jint JNICALL OS_NATIVE(CancelMenuTracking)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1, jint arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, CancelMenuTracking_FUNC);
@@ -2345,7 +1751,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(CancelMenuTracking)
{
OS_LOAD_FUNCTION(fp, CancelMenuTracking)
if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jboolean, jint))fp)(arg0, arg1, arg2);
+ rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jboolean, jint))fp)(arg0, arg1, arg2);
}
}
OS_NATIVE_EXIT(env, that, CancelMenuTracking_FUNC);
@@ -2355,7 +1761,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(CancelMenuTracking)
#ifndef NO_CloseRgn
JNIEXPORT void JNICALL OS_NATIVE(CloseRgn)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CloseRgn_FUNC);
/*
@@ -2364,7 +1770,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CloseRgn)
{
OS_LOAD_FUNCTION(fp, CloseRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
OS_NATIVE_EXIT(env, that, CloseRgn_FUNC);
@@ -2373,7 +1779,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CloseRgn)
#ifndef NO_CopyRgn
JNIEXPORT void JNICALL OS_NATIVE(CopyRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
OS_NATIVE_ENTER(env, that, CopyRgn_FUNC);
/*
@@ -2382,7 +1788,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CopyRgn)
{
OS_LOAD_FUNCTION(fp, CopyRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+ ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
}
}
OS_NATIVE_EXIT(env, that, CopyRgn_FUNC);
@@ -2391,7 +1797,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CopyRgn)
#ifndef NO_DeleteGlobalRef
JNIEXPORT void JNICALL OS_NATIVE(DeleteGlobalRef)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, DeleteGlobalRef_FUNC);
(*env)->DeleteGlobalRef(env, (jobject)arg0);
@@ -2399,27 +1805,9 @@ JNIEXPORT void JNICALL OS_NATIVE(DeleteGlobalRef)
}
#endif
-#ifndef NO_DeleteMenuItem
-JNIEXPORT void JNICALL OS_NATIVE(DeleteMenuItem)
- (JNIEnv *env, jclass that, jintLong arg0, jshort arg1)
-{
- OS_NATIVE_ENTER(env, that, DeleteMenuItem_FUNC);
-/*
- DeleteMenuItem((MenuRef)arg0, (short)arg1);
-*/
- {
- OS_LOAD_FUNCTION(fp, DeleteMenuItem)
- if (fp) {
- ((void (CALLING_CONVENTION*)(MenuRef, short))fp)((MenuRef)arg0, (short)arg1);
- }
- }
- OS_NATIVE_EXIT(env, that, DeleteMenuItem_FUNC);
-}
-#endif
-
#ifndef NO_DiffRgn
JNIEXPORT void JNICALL OS_NATIVE(DiffRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
OS_NATIVE_ENTER(env, that, DiffRgn_FUNC);
/*
@@ -2428,7 +1816,7 @@ JNIEXPORT void JNICALL OS_NATIVE(DiffRgn)
{
OS_LOAD_FUNCTION(fp, DiffRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2);
+ ((void (CALLING_CONVENTION*)(jlong, jlong, jlong))fp)(arg0, arg1, arg2);
}
}
OS_NATIVE_EXIT(env, that, DiffRgn_FUNC);
@@ -2437,7 +1825,7 @@ JNIEXPORT void JNICALL OS_NATIVE(DiffRgn)
#ifndef NO_DisposeRgn
JNIEXPORT void JNICALL OS_NATIVE(DisposeRgn)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, DisposeRgn_FUNC);
/*
@@ -2446,7 +1834,7 @@ JNIEXPORT void JNICALL OS_NATIVE(DisposeRgn)
{
OS_LOAD_FUNCTION(fp, DisposeRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
OS_NATIVE_EXIT(env, that, DisposeRgn_FUNC);
@@ -2455,7 +1843,7 @@ JNIEXPORT void JNICALL OS_NATIVE(DisposeRgn)
#ifndef NO_EmptyRgn
JNIEXPORT jboolean JNICALL OS_NATIVE(EmptyRgn)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EmptyRgn_FUNC);
@@ -2465,7 +1853,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EmptyRgn)
{
OS_LOAD_FUNCTION(fp, EmptyRgn)
if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
OS_NATIVE_EXIT(env, that, EmptyRgn_FUNC);
@@ -2473,69 +1861,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EmptyRgn)
}
#endif
-#ifndef NO_FSPathMakeRef
-JNIEXPORT jint JNICALL OS_NATIVE(FSPathMakeRef)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jbooleanArray arg2)
-{
- jbyte *lparg1=NULL;
- jboolean *lparg2=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, FSPathMakeRef_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetBooleanArrayElements(env, arg2, NULL)) == NULL) goto fail;
-/*
- rc = (jint)FSPathMakeRef((const UInt8 *)arg0, (FSRef *)lparg1, (Boolean *)lparg2);
-*/
- {
- OS_LOAD_FUNCTION(fp, FSPathMakeRef)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(const UInt8 *, FSRef *, Boolean *))fp)((const UInt8 *)arg0, (FSRef *)lparg1, (Boolean *)lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) (*env)->ReleaseBooleanArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, FSPathMakeRef_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_Gestalt
-JNIEXPORT jint JNICALL OS_NATIVE(Gestalt)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, Gestalt_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jint)Gestalt(arg0, lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, Gestalt_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GetCurrentEventButtonState
-JNIEXPORT jint JNICALL OS_NATIVE(GetCurrentEventButtonState)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GetCurrentEventButtonState_FUNC);
-/*
- rc = (jint)GetCurrentEventButtonState();
-*/
- {
- OS_LOAD_FUNCTION(fp, GetCurrentEventButtonState)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
- }
- }
- OS_NATIVE_EXIT(env, that, GetCurrentEventButtonState_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GetCurrentProcess
JNIEXPORT jint JNICALL OS_NATIVE(GetCurrentProcess)
(JNIEnv *env, jclass that, jintArray arg0)
@@ -2552,34 +1877,14 @@ fail:
}
#endif
-#ifndef NO_GetDblTime
-JNIEXPORT jint JNICALL OS_NATIVE(GetDblTime)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GetDblTime_FUNC);
-/*
- rc = (jint)GetDblTime();
-*/
- {
- OS_LOAD_FUNCTION(fp, GetDblTime)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
- }
- }
- OS_NATIVE_EXIT(env, that, GetDblTime_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GetIconRefFromTypeInfo
JNIEXPORT jint JNICALL OS_NATIVE(GetIconRefFromTypeInfo)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jlong arg2, jlong arg3, jint arg4, jlongArray arg5)
{
- jintLong *lparg5=NULL;
+ jlong *lparg5=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetIconRefFromTypeInfo_FUNC);
- if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
/*
rc = (jint)GetIconRefFromTypeInfo((OSType)arg0, (OSType)arg1, (CFStringRef)arg2, (CFStringRef)arg3, (IconServicesUsageFlags)arg4, (IconRef *)lparg5);
*/
@@ -2590,42 +1895,15 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetIconRefFromTypeInfo)
}
}
fail:
- if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
OS_NATIVE_EXIT(env, that, GetIconRefFromTypeInfo_FUNC);
return rc;
}
#endif
-#ifndef NO_GetIndMenuItemWithCommandID
-JNIEXPORT jint JNICALL OS_NATIVE(GetIndMenuItemWithCommandID)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintLongArray arg3, jshortArray arg4)
-{
- jintLong *lparg3=NULL;
- jshort *lparg4=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GetIndMenuItemWithCommandID_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetShortArrayElements(env, arg4, NULL)) == NULL) goto fail;
-/*
- rc = (jint)GetIndMenuItemWithCommandID((MenuRef)arg0, (MenuCommand)arg1, (UInt32)arg2, (MenuRef *)lparg3, (MenuItemIndex *)lparg4);
-*/
- {
- OS_LOAD_FUNCTION(fp, GetIndMenuItemWithCommandID)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(MenuRef, MenuCommand, UInt32, MenuRef *, MenuItemIndex *))fp)((MenuRef)arg0, (MenuCommand)arg1, (UInt32)arg2, (MenuRef *)lparg3, (MenuItemIndex *)lparg4);
- }
- }
-fail:
- if (arg4 && lparg4) (*env)->ReleaseShortArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
- OS_NATIVE_EXIT(env, that, GetIndMenuItemWithCommandID_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GetRegionBounds
JNIEXPORT void JNICALL OS_NATIVE(GetRegionBounds)
- (JNIEnv *env, jclass that, jintLong arg0, jshortArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jshortArray arg1)
{
jshort *lparg1=NULL;
OS_NATIVE_ENTER(env, that, GetRegionBounds_FUNC);
@@ -2636,7 +1914,7 @@ JNIEXPORT void JNICALL OS_NATIVE(GetRegionBounds)
{
OS_LOAD_FUNCTION(fp, GetRegionBounds)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jshort *))fp)(arg0, lparg1);
+ ((void (CALLING_CONVENTION*)(jlong, jshort *))fp)(arg0, lparg1);
}
}
fail:
@@ -2696,7 +1974,7 @@ fail:
#ifndef NO_HIThemeDrawFocusRect
JNIEXPORT jint JNICALL OS_NATIVE(HIThemeDrawFocusRect)
- (JNIEnv *env, jclass that, jobject arg0, jboolean arg1, jintLong arg2, jint arg3)
+ (JNIEnv *env, jclass that, jobject arg0, jboolean arg1, jlong arg2, jint arg3)
{
CGRect _arg0, *lparg0=NULL;
jint rc = 0;
@@ -2718,51 +1996,31 @@ fail:
}
#endif
-#ifndef NO_HIWindowGetCGWindowID
-JNIEXPORT jint JNICALL OS_NATIVE(HIWindowGetCGWindowID)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, HIWindowGetCGWindowID_FUNC);
-/*
- rc = (jint)HIWindowGetCGWindowID((WindowRef)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, HIWindowGetCGWindowID)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(WindowRef))fp)((WindowRef)arg0);
- }
- }
- OS_NATIVE_EXIT(env, that, HIWindowGetCGWindowID_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_JSEvaluateScript
-JNIEXPORT jintLong JNICALL OS_NATIVE(JSEvaluateScript)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5)
+JNIEXPORT jlong JNICALL OS_NATIVE(JSEvaluateScript)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jint arg4, jlongArray arg5)
{
- jintLong *lparg5=NULL;
- jintLong rc = 0;
+ jlong *lparg5=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, JSEvaluateScript_FUNC);
- if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jintLong)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5);
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jlong)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5);
fail:
- if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
OS_NATIVE_EXIT(env, that, JSEvaluateScript_FUNC);
return rc;
}
#endif
#ifndef NO_JSStringCreateWithUTF8CString
-JNIEXPORT jintLong JNICALL OS_NATIVE(JSStringCreateWithUTF8CString)
+JNIEXPORT jlong JNICALL OS_NATIVE(JSStringCreateWithUTF8CString)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, JSStringCreateWithUTF8CString_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)JSStringCreateWithUTF8CString((const char *)lparg0);
+ rc = (jlong)JSStringCreateWithUTF8CString((const char *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
OS_NATIVE_EXIT(env, that, JSStringCreateWithUTF8CString_FUNC);
@@ -2772,7 +2030,7 @@ fail:
#ifndef NO_JSStringRelease
JNIEXPORT void JNICALL OS_NATIVE(JSStringRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, JSStringRelease_FUNC);
JSStringRelease((JSStringRef)arg0);
@@ -2801,16 +2059,16 @@ JNIEXPORT jbyte JNICALL OS_NATIVE(LMGetKbdType)
#endif
#ifndef NO_LSGetApplicationForInfo
-JNIEXPORT jintLong JNICALL OS_NATIVE(LSGetApplicationForInfo)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintLong arg2, jint arg3, jbyteArray arg4, jintArray arg5)
+JNIEXPORT jlong JNICALL OS_NATIVE(LSGetApplicationForInfo)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jlong arg2, jint arg3, jbyteArray arg4, jintArray arg5)
{
jbyte *lparg4=NULL;
jint *lparg5=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, LSGetApplicationForInfo_FUNC);
if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jintLong)LSGetApplicationForInfo((OSType)arg0, (OSType)arg1, (CFStringRef)arg2, (LSRolesMask)arg3, (FSRef *)lparg4, (CFURLRef *)lparg5);
+ rc = (jlong)LSGetApplicationForInfo((OSType)arg0, (OSType)arg1, (CFStringRef)arg2, (LSRolesMask)arg3, (FSRef *)lparg4, (CFURLRef *)lparg5);
fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
@@ -2855,709 +2113,601 @@ JNIEXPORT void JNICALL OS_NATIVE(MoveTo)
}
#endif
-#ifndef NO_NSAccessibilityActionDescription
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityActionDescription)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityActionDescription_FUNC);
- rc = (jintLong)NSAccessibilityActionDescription((NSString*)arg0);
- OS_NATIVE_EXIT(env, that, NSAccessibilityActionDescription_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityAttributedStringForRangeParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityAttributedStringForRangeParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityAttributedStringForRangeParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityAttributedStringForRangeParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityAttributedStringForRangeParameterizedAttribute;
+ rc = (jlong)NSAccessibilityAttributedStringForRangeParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityAttributedStringForRangeParameterizedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityBackgroundColorTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityBackgroundColorTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityBackgroundColorTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityBackgroundColorTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityBackgroundColorTextAttribute;
+ rc = (jlong)NSAccessibilityBackgroundColorTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityBackgroundColorTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityBoundsForRangeParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityBoundsForRangeParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityBoundsForRangeParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityBoundsForRangeParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityBoundsForRangeParameterizedAttribute;
+ rc = (jlong)NSAccessibilityBoundsForRangeParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityBoundsForRangeParameterizedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityButtonRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityButtonRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityButtonRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityButtonRole_FUNC);
- rc = (jintLong)NSAccessibilityButtonRole;
+ rc = (jlong)NSAccessibilityButtonRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityButtonRole_FUNC);
return rc;
}
#endif
+#ifndef NO_NSAccessibilityCellForColumnAndRowParameterizedAttribute
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityCellForColumnAndRowParameterizedAttribute)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC);
+ rc = (jlong)NSAccessibilityCellForColumnAndRowParameterizedAttribute;
+ OS_NATIVE_EXIT(env, that, NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_NSAccessibilityCheckBoxRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityCheckBoxRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityCheckBoxRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityCheckBoxRole_FUNC);
- rc = (jintLong)NSAccessibilityCheckBoxRole;
+ rc = (jlong)NSAccessibilityCheckBoxRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityCheckBoxRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityChildrenAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityChildrenAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityChildrenAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityChildrenAttribute_FUNC);
- rc = (jintLong)NSAccessibilityChildrenAttribute;
+ rc = (jlong)NSAccessibilityChildrenAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityChildrenAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityColorWellRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColorWellRole)
+#ifndef NO_NSAccessibilityColumnIndexRangeAttribute
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityColumnIndexRangeAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityColorWellRole_FUNC);
- rc = (jintLong)NSAccessibilityColorWellRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityColorWellRole_FUNC);
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSAccessibilityColumnIndexRangeAttribute_FUNC);
+ rc = (jlong)NSAccessibilityColumnIndexRangeAttribute;
+ OS_NATIVE_EXIT(env, that, NSAccessibilityColumnIndexRangeAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityColumnRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColumnRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityColumnRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityColumnRole_FUNC);
- rc = (jintLong)NSAccessibilityColumnRole;
+ rc = (jlong)NSAccessibilityColumnRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityColumnRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityColumnsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColumnsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityColumnsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityColumnsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityColumnsAttribute;
+ rc = (jlong)NSAccessibilityColumnsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityColumnsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityComboBoxRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityComboBoxRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityComboBoxRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityComboBoxRole_FUNC);
- rc = (jintLong)NSAccessibilityComboBoxRole;
+ rc = (jlong)NSAccessibilityComboBoxRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityComboBoxRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityConfirmAction
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityConfirmAction)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityConfirmAction)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityConfirmAction_FUNC);
- rc = (jintLong)NSAccessibilityConfirmAction;
+ rc = (jlong)NSAccessibilityConfirmAction;
OS_NATIVE_EXIT(env, that, NSAccessibilityConfirmAction_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityContentsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityContentsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityContentsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityContentsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityContentsAttribute;
+ rc = (jlong)NSAccessibilityContentsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityContentsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityDescriptionAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityDescriptionAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityDescriptionAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityDescriptionAttribute_FUNC);
- rc = (jintLong)NSAccessibilityDescriptionAttribute;
+ rc = (jlong)NSAccessibilityDescriptionAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityDescriptionAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityDialogSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityDialogSubrole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityDialogSubrole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityDialogSubrole_FUNC);
- rc = (jintLong)NSAccessibilityDialogSubrole;
+ rc = (jlong)NSAccessibilityDialogSubrole;
OS_NATIVE_EXIT(env, that, NSAccessibilityDialogSubrole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityEnabledAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityEnabledAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityEnabledAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityEnabledAttribute_FUNC);
- rc = (jintLong)NSAccessibilityEnabledAttribute;
+ rc = (jlong)NSAccessibilityEnabledAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityEnabledAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityExpandedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityExpandedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityExpandedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityExpandedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityExpandedAttribute;
+ rc = (jlong)NSAccessibilityExpandedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityExpandedAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityFloatingWindowSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFloatingWindowSubrole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityFloatingWindowSubrole_FUNC);
- rc = (jintLong)NSAccessibilityFloatingWindowSubrole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityFloatingWindowSubrole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityFocusedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFocusedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityFocusedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityFocusedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityFocusedAttribute;
+ rc = (jlong)NSAccessibilityFocusedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityFocusedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityFocusedUIElementChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFocusedUIElementChangedNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityFocusedUIElementChangedNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityFocusedUIElementChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilityFocusedUIElementChangedNotification;
+ rc = (jlong)NSAccessibilityFocusedUIElementChangedNotification;
OS_NATIVE_EXIT(env, that, NSAccessibilityFocusedUIElementChangedNotification_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityFocusedWindowChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFocusedWindowChangedNotification)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityFocusedWindowChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilityFocusedWindowChangedNotification;
- OS_NATIVE_EXIT(env, that, NSAccessibilityFocusedWindowChangedNotification_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityFontFamilyKey
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontFamilyKey)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityFontFamilyKey)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityFontFamilyKey_FUNC);
- rc = (jintLong)NSAccessibilityFontFamilyKey;
+ rc = (jlong)NSAccessibilityFontFamilyKey;
OS_NATIVE_EXIT(env, that, NSAccessibilityFontFamilyKey_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityFontNameKey
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontNameKey)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityFontNameKey)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityFontNameKey_FUNC);
- rc = (jintLong)NSAccessibilityFontNameKey;
+ rc = (jlong)NSAccessibilityFontNameKey;
OS_NATIVE_EXIT(env, that, NSAccessibilityFontNameKey_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityFontSizeKey
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontSizeKey)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityFontSizeKey)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityFontSizeKey_FUNC);
- rc = (jintLong)NSAccessibilityFontSizeKey;
+ rc = (jlong)NSAccessibilityFontSizeKey;
OS_NATIVE_EXIT(env, that, NSAccessibilityFontSizeKey_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityFontTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityFontTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityFontTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityFontTextAttribute;
+ rc = (jlong)NSAccessibilityFontTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityFontTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityForegroundColorTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityForegroundColorTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityForegroundColorTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityForegroundColorTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityForegroundColorTextAttribute;
+ rc = (jlong)NSAccessibilityForegroundColorTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityForegroundColorTextAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityGridRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityGridRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityGridRole_FUNC);
- rc = (jintLong)NSAccessibilityGridRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityGridRole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityGroupRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityGroupRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityGroupRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityGroupRole_FUNC);
- rc = (jintLong)NSAccessibilityGroupRole;
+ rc = (jlong)NSAccessibilityGroupRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityGroupRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityHeaderAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityHeaderAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityHeaderAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityHeaderAttribute_FUNC);
- rc = (jintLong)NSAccessibilityHeaderAttribute;
+ rc = (jlong)NSAccessibilityHeaderAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityHeaderAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityHelpAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityHelpAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityHelpAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityHelpAttribute_FUNC);
- rc = (jintLong)NSAccessibilityHelpAttribute;
+ rc = (jlong)NSAccessibilityHelpAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityHelpAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityHelpTagRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityHelpTagRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityHelpTagRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityHelpTagRole_FUNC);
- rc = (jintLong)NSAccessibilityHelpTagRole;
+ rc = (jlong)NSAccessibilityHelpTagRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityHelpTagRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityHorizontalOrientationValue
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityHorizontalOrientationValue)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityHorizontalOrientationValue)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityHorizontalOrientationValue_FUNC);
- rc = (jintLong)NSAccessibilityHorizontalOrientationValue;
+ rc = (jlong)NSAccessibilityHorizontalOrientationValue;
OS_NATIVE_EXIT(env, that, NSAccessibilityHorizontalOrientationValue_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityHorizontalScrollBarAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityHorizontalScrollBarAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityHorizontalScrollBarAttribute_FUNC);
- rc = (jintLong)NSAccessibilityHorizontalScrollBarAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilityHorizontalScrollBarAttribute_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityImageRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityImageRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityImageRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityImageRole_FUNC);
- rc = (jintLong)NSAccessibilityImageRole;
+ rc = (jlong)NSAccessibilityImageRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityImageRole_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityIncrementorRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityIncrementorRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityIncrementorRole_FUNC);
- rc = (jintLong)NSAccessibilityIncrementorRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityIncrementorRole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityIndexAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityIndexAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityIndexAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityIndexAttribute_FUNC);
- rc = (jintLong)NSAccessibilityIndexAttribute;
+ rc = (jlong)NSAccessibilityIndexAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityIndexAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityInsertionPointLineNumberAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityInsertionPointLineNumberAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityInsertionPointLineNumberAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityInsertionPointLineNumberAttribute_FUNC);
- rc = (jintLong)NSAccessibilityInsertionPointLineNumberAttribute;
+ rc = (jlong)NSAccessibilityInsertionPointLineNumberAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityInsertionPointLineNumberAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityLabelValueAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityLabelValueAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityLabelValueAttribute_FUNC);
- rc = (jintLong)NSAccessibilityLabelValueAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilityLabelValueAttribute_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityLineForIndexParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityLineForIndexParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityLineForIndexParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityLineForIndexParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityLineForIndexParameterizedAttribute;
+ rc = (jlong)NSAccessibilityLineForIndexParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityLineForIndexParameterizedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityLinkRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityLinkRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityLinkRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityLinkRole_FUNC);
- rc = (jintLong)NSAccessibilityLinkRole;
+ rc = (jlong)NSAccessibilityLinkRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityLinkRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityLinkTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityLinkTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityLinkTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityLinkTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityLinkTextAttribute;
+ rc = (jlong)NSAccessibilityLinkTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityLinkTextAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityLinkedUIElementsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityLinkedUIElementsAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityLinkedUIElementsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityLinkedUIElementsAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilityLinkedUIElementsAttribute_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilityListRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityListRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityListRole_FUNC);
- rc = (jintLong)NSAccessibilityListRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityListRole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityMaxValueAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMaxValueAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMaxValueAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMaxValueAttribute_FUNC);
- rc = (jintLong)NSAccessibilityMaxValueAttribute;
+ rc = (jlong)NSAccessibilityMaxValueAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityMaxValueAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityMenuBarRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMenuBarRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMenuBarRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMenuBarRole_FUNC);
- rc = (jintLong)NSAccessibilityMenuBarRole;
+ rc = (jlong)NSAccessibilityMenuBarRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityMenuBarRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityMenuButtonRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMenuButtonRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMenuButtonRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMenuButtonRole_FUNC);
- rc = (jintLong)NSAccessibilityMenuButtonRole;
+ rc = (jlong)NSAccessibilityMenuButtonRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityMenuButtonRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityMenuItemRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMenuItemRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMenuItemRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMenuItemRole_FUNC);
- rc = (jintLong)NSAccessibilityMenuItemRole;
+ rc = (jlong)NSAccessibilityMenuItemRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityMenuItemRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityMenuRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMenuRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMenuRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMenuRole_FUNC);
- rc = (jintLong)NSAccessibilityMenuRole;
+ rc = (jlong)NSAccessibilityMenuRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityMenuRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityMinValueAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMinValueAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMinValueAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMinValueAttribute_FUNC);
- rc = (jintLong)NSAccessibilityMinValueAttribute;
+ rc = (jlong)NSAccessibilityMinValueAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityMinValueAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityMisspelledTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMisspelledTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMisspelledTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMisspelledTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityMisspelledTextAttribute;
+ rc = (jlong)NSAccessibilityMisspelledTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityMisspelledTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityMovedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMovedNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityMovedNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityMovedNotification_FUNC);
- rc = (jintLong)NSAccessibilityMovedNotification;
+ rc = (jlong)NSAccessibilityMovedNotification;
OS_NATIVE_EXIT(env, that, NSAccessibilityMovedNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityNextContentsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityNextContentsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityNextContentsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityNextContentsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityNextContentsAttribute;
+ rc = (jlong)NSAccessibilityNextContentsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityNextContentsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityNumberOfCharactersAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityNumberOfCharactersAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityNumberOfCharactersAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityNumberOfCharactersAttribute_FUNC);
- rc = (jintLong)NSAccessibilityNumberOfCharactersAttribute;
+ rc = (jlong)NSAccessibilityNumberOfCharactersAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityNumberOfCharactersAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityOrientationAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityOrientationAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityOrientationAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityOrientationAttribute_FUNC);
- rc = (jintLong)NSAccessibilityOrientationAttribute;
+ rc = (jlong)NSAccessibilityOrientationAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityOrientationAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityOutlineRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityOutlineRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityOutlineRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityOutlineRole_FUNC);
- rc = (jintLong)NSAccessibilityOutlineRole;
+ rc = (jlong)NSAccessibilityOutlineRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityOutlineRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityOutlineRowSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityOutlineRowSubrole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityOutlineRowSubrole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityOutlineRowSubrole_FUNC);
- rc = (jintLong)NSAccessibilityOutlineRowSubrole;
+ rc = (jlong)NSAccessibilityOutlineRowSubrole;
OS_NATIVE_EXIT(env, that, NSAccessibilityOutlineRowSubrole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityParentAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityParentAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityParentAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityParentAttribute_FUNC);
- rc = (jintLong)NSAccessibilityParentAttribute;
+ rc = (jlong)NSAccessibilityParentAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityParentAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityPopUpButtonRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityPopUpButtonRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityPopUpButtonRole_FUNC);
- rc = (jintLong)NSAccessibilityPopUpButtonRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityPopUpButtonRole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityPositionAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityPositionAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityPositionAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityPositionAttribute_FUNC);
- rc = (jintLong)NSAccessibilityPositionAttribute;
+ rc = (jlong)NSAccessibilityPositionAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityPositionAttribute_FUNC);
return rc;
}
@@ -3565,7 +2715,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityPositionAttribute)
#ifndef NO_NSAccessibilityPostNotification
JNIEXPORT void JNICALL OS_NATIVE(NSAccessibilityPostNotification)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
OS_NATIVE_ENTER(env, that, NSAccessibilityPostNotification_FUNC);
NSAccessibilityPostNotification((id)arg0, (NSString*)arg1);
@@ -3574,946 +2724,756 @@ JNIEXPORT void JNICALL OS_NATIVE(NSAccessibilityPostNotification)
#endif
#ifndef NO_NSAccessibilityPressAction
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityPressAction)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityPressAction)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityPressAction_FUNC);
- rc = (jintLong)NSAccessibilityPressAction;
+ rc = (jlong)NSAccessibilityPressAction;
OS_NATIVE_EXIT(env, that, NSAccessibilityPressAction_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityPreviousContentsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityPreviousContentsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityPreviousContentsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityPreviousContentsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityPreviousContentsAttribute;
+ rc = (jlong)NSAccessibilityPreviousContentsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityPreviousContentsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityProgressIndicatorRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityProgressIndicatorRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityProgressIndicatorRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityProgressIndicatorRole_FUNC);
- rc = (jintLong)NSAccessibilityProgressIndicatorRole;
+ rc = (jlong)NSAccessibilityProgressIndicatorRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityProgressIndicatorRole_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityRTFForRangeParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRTFForRangeParameterizedAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityRTFForRangeParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityRTFForRangeParameterizedAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilityRTFForRangeParameterizedAttribute_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityRadioButtonRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRadioButtonRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRadioButtonRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRadioButtonRole_FUNC);
- rc = (jintLong)NSAccessibilityRadioButtonRole;
+ rc = (jlong)NSAccessibilityRadioButtonRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityRadioButtonRole_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityRadioGroupRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRadioGroupRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityRadioGroupRole_FUNC);
- rc = (jintLong)NSAccessibilityRadioGroupRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityRadioGroupRole_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilityRaiseBadArgumentException
-JNIEXPORT void JNICALL OS_NATIVE(NSAccessibilityRaiseBadArgumentException)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- OS_NATIVE_ENTER(env, that, NSAccessibilityRaiseBadArgumentException_FUNC);
- NSAccessibilityRaiseBadArgumentException((id)arg0, (NSString*)arg1, (id)arg2);
- OS_NATIVE_EXIT(env, that, NSAccessibilityRaiseBadArgumentException_FUNC);
-}
-#endif
-
#ifndef NO_NSAccessibilityRangeForIndexParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRangeForIndexParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRangeForIndexParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRangeForIndexParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityRangeForIndexParameterizedAttribute;
+ rc = (jlong)NSAccessibilityRangeForIndexParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityRangeForIndexParameterizedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityRangeForLineParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRangeForLineParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRangeForLineParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRangeForLineParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityRangeForLineParameterizedAttribute;
+ rc = (jlong)NSAccessibilityRangeForLineParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityRangeForLineParameterizedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityRangeForPositionParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRangeForPositionParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRangeForPositionParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRangeForPositionParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityRangeForPositionParameterizedAttribute;
+ rc = (jlong)NSAccessibilityRangeForPositionParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityRangeForPositionParameterizedAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityResizedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityResizedNotification)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityResizedNotification_FUNC);
- rc = (jintLong)NSAccessibilityResizedNotification;
- OS_NATIVE_EXIT(env, that, NSAccessibilityResizedNotification_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityRoleAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRoleAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRoleAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRoleAttribute_FUNC);
- rc = (jintLong)NSAccessibilityRoleAttribute;
+ rc = (jlong)NSAccessibilityRoleAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityRoleAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityRoleDescription
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRoleDescription)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRoleDescription)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRoleDescription_FUNC);
- rc = (jintLong)NSAccessibilityRoleDescription((NSString*)arg0, (NSString*)arg1);
+ rc = (jlong)NSAccessibilityRoleDescription((NSString*)arg0, (NSString*)arg1);
OS_NATIVE_EXIT(env, that, NSAccessibilityRoleDescription_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityRoleDescriptionAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRoleDescriptionAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRoleDescriptionAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRoleDescriptionAttribute_FUNC);
- rc = (jintLong)NSAccessibilityRoleDescriptionAttribute;
+ rc = (jlong)NSAccessibilityRoleDescriptionAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityRoleDescriptionAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityRoleDescriptionForUIElement
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRoleDescriptionForUIElement)
- (JNIEnv *env, jclass that, jintLong arg0)
+#ifndef NO_NSAccessibilityRowCountChangedNotification
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRowCountChangedNotification)
+ (JNIEnv *env, jclass that)
{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityRoleDescriptionForUIElement_FUNC);
- rc = (jintLong)NSAccessibilityRoleDescriptionForUIElement((id)arg0);
- OS_NATIVE_EXIT(env, that, NSAccessibilityRoleDescriptionForUIElement_FUNC);
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSAccessibilityRowCountChangedNotification_FUNC);
+ rc = (jlong)NSAccessibilityRowCountChangedNotification;
+ OS_NATIVE_EXIT(env, that, NSAccessibilityRowCountChangedNotification_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityRowCountChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowCountChangedNotification)
+#ifndef NO_NSAccessibilityRowIndexRangeAttribute
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRowIndexRangeAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityRowCountChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilityRowCountChangedNotification;
- OS_NATIVE_EXIT(env, that, NSAccessibilityRowCountChangedNotification_FUNC);
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSAccessibilityRowIndexRangeAttribute_FUNC);
+ rc = (jlong)NSAccessibilityRowIndexRangeAttribute;
+ OS_NATIVE_EXIT(env, that, NSAccessibilityRowIndexRangeAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityRowRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRowRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRowRole_FUNC);
- rc = (jintLong)NSAccessibilityRowRole;
+ rc = (jlong)NSAccessibilityRowRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityRowRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityRowsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityRowsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityRowsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityRowsAttribute;
+ rc = (jlong)NSAccessibilityRowsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityRowsAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityScrollAreaRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityScrollAreaRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityScrollAreaRole_FUNC);
- rc = (jintLong)NSAccessibilityScrollAreaRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityScrollAreaRole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityScrollBarRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityScrollBarRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityScrollBarRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityScrollBarRole_FUNC);
- rc = (jintLong)NSAccessibilityScrollBarRole;
+ rc = (jlong)NSAccessibilityScrollBarRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityScrollBarRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySelectedAttribute;
+ rc = (jlong)NSAccessibilitySelectedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedChildrenAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedChildrenAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedChildrenAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedChildrenAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySelectedChildrenAttribute;
+ rc = (jlong)NSAccessibilitySelectedChildrenAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedChildrenAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedChildrenChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedChildrenChangedNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedChildrenChangedNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedChildrenChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilitySelectedChildrenChangedNotification;
+ rc = (jlong)NSAccessibilitySelectedChildrenChangedNotification;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedChildrenChangedNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedColumnsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedColumnsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedColumnsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedColumnsAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySelectedColumnsAttribute;
+ rc = (jlong)NSAccessibilitySelectedColumnsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedColumnsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedRowsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedRowsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedRowsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedRowsAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySelectedRowsAttribute;
+ rc = (jlong)NSAccessibilitySelectedRowsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedRowsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedRowsChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedRowsChangedNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedRowsChangedNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedRowsChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilitySelectedRowsChangedNotification;
+ rc = (jlong)NSAccessibilitySelectedRowsChangedNotification;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedRowsChangedNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySelectedTextAttribute;
+ rc = (jlong)NSAccessibilitySelectedTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedTextChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedTextChangedNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedTextChangedNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedTextChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilitySelectedTextChangedNotification;
+ rc = (jlong)NSAccessibilitySelectedTextChangedNotification;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedTextChangedNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedTextRangeAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedTextRangeAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedTextRangeAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedTextRangeAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySelectedTextRangeAttribute;
+ rc = (jlong)NSAccessibilitySelectedTextRangeAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedTextRangeAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySelectedTextRangesAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedTextRangesAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySelectedTextRangesAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedTextRangesAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySelectedTextRangesAttribute;
+ rc = (jlong)NSAccessibilitySelectedTextRangesAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedTextRangesAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityServesAsTitleForUIElementsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityServesAsTitleForUIElementsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityServesAsTitleForUIElementsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityServesAsTitleForUIElementsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityServesAsTitleForUIElementsAttribute;
+ rc = (jlong)NSAccessibilityServesAsTitleForUIElementsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityServesAsTitleForUIElementsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityShowMenuAction
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityShowMenuAction)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityShowMenuAction)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityShowMenuAction_FUNC);
- rc = (jintLong)NSAccessibilityShowMenuAction;
+ rc = (jlong)NSAccessibilityShowMenuAction;
OS_NATIVE_EXIT(env, that, NSAccessibilityShowMenuAction_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySizeAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySizeAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySizeAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySizeAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySizeAttribute;
+ rc = (jlong)NSAccessibilitySizeAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySizeAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySliderRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySliderRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySliderRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySliderRole_FUNC);
- rc = (jintLong)NSAccessibilitySliderRole;
+ rc = (jlong)NSAccessibilitySliderRole;
OS_NATIVE_EXIT(env, that, NSAccessibilitySliderRole_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilitySortButtonRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySortButtonRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilitySortButtonRole_FUNC);
- rc = (jintLong)NSAccessibilitySortButtonRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilitySortButtonRole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilitySplitterRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySplitterRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySplitterRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySplitterRole_FUNC);
- rc = (jintLong)NSAccessibilitySplitterRole;
+ rc = (jlong)NSAccessibilitySplitterRole;
OS_NATIVE_EXIT(env, that, NSAccessibilitySplitterRole_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityStandardWindowSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStandardWindowSubrole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityStandardWindowSubrole_FUNC);
- rc = (jintLong)NSAccessibilityStandardWindowSubrole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityStandardWindowSubrole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityStaticTextRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStaticTextRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityStaticTextRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityStaticTextRole_FUNC);
- rc = (jintLong)NSAccessibilityStaticTextRole;
+ rc = (jlong)NSAccessibilityStaticTextRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityStaticTextRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityStrikethroughColorTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStrikethroughColorTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityStrikethroughColorTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityStrikethroughColorTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityStrikethroughColorTextAttribute;
+ rc = (jlong)NSAccessibilityStrikethroughColorTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityStrikethroughColorTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityStrikethroughTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStrikethroughTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityStrikethroughTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityStrikethroughTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityStrikethroughTextAttribute;
+ rc = (jlong)NSAccessibilityStrikethroughTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityStrikethroughTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityStringForRangeParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStringForRangeParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityStringForRangeParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityStringForRangeParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityStringForRangeParameterizedAttribute;
+ rc = (jlong)NSAccessibilityStringForRangeParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityStringForRangeParameterizedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityStyleRangeForIndexParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStyleRangeForIndexParameterizedAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityStyleRangeForIndexParameterizedAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityStyleRangeForIndexParameterizedAttribute_FUNC);
- rc = (jintLong)NSAccessibilityStyleRangeForIndexParameterizedAttribute;
+ rc = (jlong)NSAccessibilityStyleRangeForIndexParameterizedAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityStyleRangeForIndexParameterizedAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilitySubroleAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySubroleAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilitySubroleAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilitySubroleAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySubroleAttribute;
+ rc = (jlong)NSAccessibilitySubroleAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilitySubroleAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilitySuperscriptTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySuperscriptTextAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilitySuperscriptTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilitySuperscriptTextAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilitySuperscriptTextAttribute_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilitySystemDialogSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySystemDialogSubrole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilitySystemDialogSubrole_FUNC);
- rc = (jintLong)NSAccessibilitySystemDialogSubrole;
- OS_NATIVE_EXIT(env, that, NSAccessibilitySystemDialogSubrole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityTabGroupRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTabGroupRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTabGroupRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTabGroupRole_FUNC);
- rc = (jintLong)NSAccessibilityTabGroupRole;
+ rc = (jlong)NSAccessibilityTabGroupRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityTabGroupRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTableRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTableRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTableRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTableRole_FUNC);
- rc = (jintLong)NSAccessibilityTableRole;
+ rc = (jlong)NSAccessibilityTableRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityTableRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTableRowSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTableRowSubrole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTableRowSubrole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTableRowSubrole_FUNC);
- rc = (jintLong)NSAccessibilityTableRowSubrole;
+ rc = (jlong)NSAccessibilityTableRowSubrole;
OS_NATIVE_EXIT(env, that, NSAccessibilityTableRowSubrole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTabsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTabsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTabsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTabsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityTabsAttribute;
+ rc = (jlong)NSAccessibilityTabsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityTabsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTextAreaRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTextAreaRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTextAreaRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTextAreaRole_FUNC);
- rc = (jintLong)NSAccessibilityTextAreaRole;
+ rc = (jlong)NSAccessibilityTextAreaRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityTextAreaRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTextFieldRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTextFieldRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTextFieldRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTextFieldRole_FUNC);
- rc = (jintLong)NSAccessibilityTextFieldRole;
+ rc = (jlong)NSAccessibilityTextFieldRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityTextFieldRole_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityTextLinkSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTextLinkSubrole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityTextLinkSubrole_FUNC);
- rc = (jintLong)NSAccessibilityTextLinkSubrole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityTextLinkSubrole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityTitleAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTitleAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTitleAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTitleAttribute_FUNC);
- rc = (jintLong)NSAccessibilityTitleAttribute;
+ rc = (jlong)NSAccessibilityTitleAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityTitleAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTitleChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTitleChangedNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTitleChangedNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTitleChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilityTitleChangedNotification;
+ rc = (jlong)NSAccessibilityTitleChangedNotification;
OS_NATIVE_EXIT(env, that, NSAccessibilityTitleChangedNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTitleUIElementAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTitleUIElementAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTitleUIElementAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTitleUIElementAttribute_FUNC);
- rc = (jintLong)NSAccessibilityTitleUIElementAttribute;
+ rc = (jlong)NSAccessibilityTitleUIElementAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityTitleUIElementAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityToolbarRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityToolbarRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityToolbarRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityToolbarRole_FUNC);
- rc = (jintLong)NSAccessibilityToolbarRole;
+ rc = (jlong)NSAccessibilityToolbarRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityToolbarRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityTopLevelUIElementAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTopLevelUIElementAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityTopLevelUIElementAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityTopLevelUIElementAttribute_FUNC);
- rc = (jintLong)NSAccessibilityTopLevelUIElementAttribute;
+ rc = (jlong)NSAccessibilityTopLevelUIElementAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityTopLevelUIElementAttribute_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityURLAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityURLAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityURLAttribute_FUNC);
- rc = (jintLong)NSAccessibilityURLAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilityURLAttribute_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityUnderlineColorTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnderlineColorTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityUnderlineColorTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityUnderlineColorTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityUnderlineColorTextAttribute;
+ rc = (jlong)NSAccessibilityUnderlineColorTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityUnderlineColorTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityUnderlineTextAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnderlineTextAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityUnderlineTextAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityUnderlineTextAttribute_FUNC);
- rc = (jintLong)NSAccessibilityUnderlineTextAttribute;
+ rc = (jlong)NSAccessibilityUnderlineTextAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityUnderlineTextAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityUnignoredAncestor
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnignoredAncestor)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityUnignoredAncestor)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityUnignoredAncestor_FUNC);
- rc = (jintLong)NSAccessibilityUnignoredAncestor((id)arg0);
+ rc = (jlong)NSAccessibilityUnignoredAncestor((id)arg0);
OS_NATIVE_EXIT(env, that, NSAccessibilityUnignoredAncestor_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityUnignoredChildren
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnignoredChildren)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityUnignoredChildren)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityUnignoredChildren_FUNC);
- rc = (jintLong)NSAccessibilityUnignoredChildren((NSArray*)arg0);
+ rc = (jlong)NSAccessibilityUnignoredChildren((NSArray*)arg0);
OS_NATIVE_EXIT(env, that, NSAccessibilityUnignoredChildren_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityUnignoredChildrenForOnlyChild
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnignoredChildrenForOnlyChild)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityUnignoredChildrenForOnlyChild_FUNC);
- rc = (jintLong)NSAccessibilityUnignoredChildrenForOnlyChild((id)arg0);
- OS_NATIVE_EXIT(env, that, NSAccessibilityUnignoredChildrenForOnlyChild_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilityUnignoredDescendant
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnignoredDescendant)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityUnignoredDescendant_FUNC);
- rc = (jintLong)NSAccessibilityUnignoredDescendant((id)arg0);
- OS_NATIVE_EXIT(env, that, NSAccessibilityUnignoredDescendant_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityUnknownRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnknownRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityUnknownRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityUnknownRole_FUNC);
- rc = (jintLong)NSAccessibilityUnknownRole;
+ rc = (jlong)NSAccessibilityUnknownRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityUnknownRole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityUnknownSubrole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnknownSubrole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityUnknownSubrole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityUnknownSubrole_FUNC);
- rc = (jintLong)NSAccessibilityUnknownSubrole;
+ rc = (jlong)NSAccessibilityUnknownSubrole;
OS_NATIVE_EXIT(env, that, NSAccessibilityUnknownSubrole_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityValueAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityValueAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityValueAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityValueAttribute_FUNC);
- rc = (jintLong)NSAccessibilityValueAttribute;
+ rc = (jlong)NSAccessibilityValueAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityValueAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityValueChangedNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityValueChangedNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityValueChangedNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityValueChangedNotification_FUNC);
- rc = (jintLong)NSAccessibilityValueChangedNotification;
+ rc = (jlong)NSAccessibilityValueChangedNotification;
OS_NATIVE_EXIT(env, that, NSAccessibilityValueChangedNotification_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityValueDescriptionAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityValueDescriptionAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityValueDescriptionAttribute_FUNC);
- rc = (jintLong)NSAccessibilityValueDescriptionAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilityValueDescriptionAttribute_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilityValueIndicatorRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityValueIndicatorRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityValueIndicatorRole_FUNC);
- rc = (jintLong)NSAccessibilityValueIndicatorRole;
- OS_NATIVE_EXIT(env, that, NSAccessibilityValueIndicatorRole_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityVerticalOrientationValue
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVerticalOrientationValue)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityVerticalOrientationValue)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityVerticalOrientationValue_FUNC);
- rc = (jintLong)NSAccessibilityVerticalOrientationValue;
+ rc = (jlong)NSAccessibilityVerticalOrientationValue;
OS_NATIVE_EXIT(env, that, NSAccessibilityVerticalOrientationValue_FUNC);
return rc;
}
#endif
-#ifndef NO_NSAccessibilityVerticalScrollBarAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVerticalScrollBarAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityVerticalScrollBarAttribute_FUNC);
- rc = (jintLong)NSAccessibilityVerticalScrollBarAttribute;
- OS_NATIVE_EXIT(env, that, NSAccessibilityVerticalScrollBarAttribute_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSAccessibilityVisibleCharacterRangeAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleCharacterRangeAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityVisibleCharacterRangeAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleCharacterRangeAttribute_FUNC);
- rc = (jintLong)NSAccessibilityVisibleCharacterRangeAttribute;
+ rc = (jlong)NSAccessibilityVisibleCharacterRangeAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleCharacterRangeAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityVisibleChildrenAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleChildrenAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityVisibleChildrenAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleChildrenAttribute_FUNC);
- rc = (jintLong)NSAccessibilityVisibleChildrenAttribute;
+ rc = (jlong)NSAccessibilityVisibleChildrenAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleChildrenAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityVisibleColumnsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleColumnsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityVisibleColumnsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleColumnsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityVisibleColumnsAttribute;
+ rc = (jlong)NSAccessibilityVisibleColumnsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleColumnsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityVisibleNameKey
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleNameKey)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityVisibleNameKey)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleNameKey_FUNC);
- rc = (jintLong)NSAccessibilityVisibleNameKey;
+ rc = (jlong)NSAccessibilityVisibleNameKey;
OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleNameKey_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityVisibleRowsAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleRowsAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityVisibleRowsAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleRowsAttribute_FUNC);
- rc = (jintLong)NSAccessibilityVisibleRowsAttribute;
+ rc = (jlong)NSAccessibilityVisibleRowsAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleRowsAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityWindowAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityWindowAttribute)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityWindowAttribute)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityWindowAttribute_FUNC);
- rc = (jintLong)NSAccessibilityWindowAttribute;
+ rc = (jlong)NSAccessibilityWindowAttribute;
OS_NATIVE_EXIT(env, that, NSAccessibilityWindowAttribute_FUNC);
return rc;
}
#endif
#ifndef NO_NSAccessibilityWindowRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityWindowRole)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAccessibilityWindowRole)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAccessibilityWindowRole_FUNC);
- rc = (jintLong)NSAccessibilityWindowRole;
+ rc = (jlong)NSAccessibilityWindowRole;
OS_NATIVE_EXIT(env, that, NSAccessibilityWindowRole_FUNC);
return rc;
}
@@ -4532,48 +3492,48 @@ JNIEXPORT jint JNICALL OS_NATIVE(NSAffineTransformStruct_1sizeof)
#endif
#ifndef NO_NSApplicationDidChangeScreenParametersNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSApplicationDidChangeScreenParametersNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSApplicationDidChangeScreenParametersNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSApplicationDidChangeScreenParametersNotification_FUNC);
- rc = (jintLong)NSApplicationDidChangeScreenParametersNotification;
+ rc = (jlong)NSApplicationDidChangeScreenParametersNotification;
OS_NATIVE_EXIT(env, that, NSApplicationDidChangeScreenParametersNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSAttachmentAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAttachmentAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSAttachmentAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSAttachmentAttributeName_FUNC);
- rc = (jintLong)NSAttachmentAttributeName;
+ rc = (jlong)NSAttachmentAttributeName;
OS_NATIVE_EXIT(env, that, NSAttachmentAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSBackgroundColorAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSBackgroundColorAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSBackgroundColorAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSBackgroundColorAttributeName_FUNC);
- rc = (jintLong)NSBackgroundColorAttributeName;
+ rc = (jlong)NSBackgroundColorAttributeName;
OS_NATIVE_EXIT(env, that, NSBackgroundColorAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSBaselineOffsetAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSBaselineOffsetAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSBaselineOffsetAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSBaselineOffsetAttributeName_FUNC);
- rc = (jintLong)NSBaselineOffsetAttributeName;
+ rc = (jlong)NSBaselineOffsetAttributeName;
OS_NATIVE_EXIT(env, that, NSBaselineOffsetAttributeName_FUNC);
return rc;
}
@@ -4590,98 +3550,72 @@ JNIEXPORT void JNICALL OS_NATIVE(NSBeep)
#endif
#ifndef NO_NSBitsPerPixelFromDepth
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSBitsPerPixelFromDepth)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSBitsPerPixelFromDepth)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSBitsPerPixelFromDepth_FUNC);
- rc = (jintLong)NSBitsPerPixelFromDepth((NSWindowDepth)arg0);
+ rc = (jlong)NSBitsPerPixelFromDepth((NSWindowDepth)arg0);
OS_NATIVE_EXIT(env, that, NSBitsPerPixelFromDepth_FUNC);
return rc;
}
#endif
-#ifndef NO_NSCalibratedRGBColorSpace
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSCalibratedRGBColorSpace)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSCalibratedRGBColorSpace_FUNC);
- rc = (jintLong)NSCalibratedRGBColorSpace;
- OS_NATIVE_EXIT(env, that, NSCalibratedRGBColorSpace_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSCountWindows
-JNIEXPORT void JNICALL OS_NATIVE(NSCountWindows)
- (JNIEnv *env, jclass that, jintLongArray arg0)
-{
- jintLong *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, NSCountWindows_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
- NSCountWindows((NSInteger*)lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseIntLongArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, NSCountWindows_FUNC);
-}
-#endif
-
#ifndef NO_NSCursorAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSCursorAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSCursorAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSCursorAttributeName_FUNC);
- rc = (jintLong)NSCursorAttributeName;
+ rc = (jlong)NSCursorAttributeName;
OS_NATIVE_EXIT(env, that, NSCursorAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSDefaultRunLoopMode
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSDefaultRunLoopMode)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSDefaultRunLoopMode)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSDefaultRunLoopMode_FUNC);
- rc = (jintLong)NSDefaultRunLoopMode;
+ rc = (jlong)NSDefaultRunLoopMode;
OS_NATIVE_EXIT(env, that, NSDefaultRunLoopMode_FUNC);
return rc;
}
#endif
#ifndef NO_NSDeviceRGBColorSpace
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSDeviceRGBColorSpace)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSDeviceRGBColorSpace)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSDeviceRGBColorSpace_FUNC);
- rc = (jintLong)NSDeviceRGBColorSpace;
+ rc = (jlong)NSDeviceRGBColorSpace;
OS_NATIVE_EXIT(env, that, NSDeviceRGBColorSpace_FUNC);
return rc;
}
#endif
#ifndef NO_NSDeviceResolution
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSDeviceResolution)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSDeviceResolution)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSDeviceResolution_FUNC);
- rc = (jintLong)NSDeviceResolution;
+ rc = (jlong)NSDeviceResolution;
OS_NATIVE_EXIT(env, that, NSDeviceResolution_FUNC);
return rc;
}
#endif
#ifndef NO_NSDragPboard
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSDragPboard)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSDragPboard)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSDragPboard_FUNC);
- rc = (jintLong)NSDragPboard;
+ rc = (jlong)NSDragPboard;
OS_NATIVE_EXIT(env, that, NSDragPboard_FUNC);
return rc;
}
@@ -4706,236 +3640,205 @@ fail:
}
#endif
-#ifndef NO_NSErrorFailingURLStringKey
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSErrorFailingURLStringKey)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSErrorFailingURLStringKey_FUNC);
- rc = (jintLong)NSErrorFailingURLStringKey;
- OS_NATIVE_EXIT(env, that, NSErrorFailingURLStringKey_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSEventTrackingRunLoopMode
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSEventTrackingRunLoopMode)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSEventTrackingRunLoopMode)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSEventTrackingRunLoopMode_FUNC);
- rc = (jintLong)NSEventTrackingRunLoopMode;
+ rc = (jlong)NSEventTrackingRunLoopMode;
OS_NATIVE_EXIT(env, that, NSEventTrackingRunLoopMode_FUNC);
return rc;
}
#endif
-#ifndef NO_NSFileTypeForHFSTypeCode
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSFileTypeForHFSTypeCode)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSFileTypeForHFSTypeCode_FUNC);
- rc = (jintLong)NSFileTypeForHFSTypeCode((OSType)arg0);
- OS_NATIVE_EXIT(env, that, NSFileTypeForHFSTypeCode_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSFilenamesPboardType
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSFilenamesPboardType)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSFilenamesPboardType)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSFilenamesPboardType_FUNC);
- rc = (jintLong)NSFilenamesPboardType;
+ rc = (jlong)NSFilenamesPboardType;
OS_NATIVE_EXIT(env, that, NSFilenamesPboardType_FUNC);
return rc;
}
#endif
#ifndef NO_NSFontAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSFontAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSFontAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSFontAttributeName_FUNC);
- rc = (jintLong)NSFontAttributeName;
+ rc = (jlong)NSFontAttributeName;
OS_NATIVE_EXIT(env, that, NSFontAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSForegroundColorAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSForegroundColorAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSForegroundColorAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSForegroundColorAttributeName_FUNC);
- rc = (jintLong)NSForegroundColorAttributeName;
+ rc = (jlong)NSForegroundColorAttributeName;
OS_NATIVE_EXIT(env, that, NSForegroundColorAttributeName_FUNC);
return rc;
}
#endif
-#ifndef NO_NSGetSizeAndAlignment
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSGetSizeAndAlignment)
- (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2)
+#ifndef NO_NSImageNameCaution
+JNIEXPORT jlong JNICALL OS_NATIVE(NSImageNameCaution)
+ (JNIEnv *env, jclass that)
{
- jintLong *lparg1=NULL;
- jintLong *lparg2=NULL;
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSGetSizeAndAlignment_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)NSGetSizeAndAlignment((char*)arg0, (NSUInteger*)lparg1, (NSUInteger*)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, NSGetSizeAndAlignment_FUNC);
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSImageNameCaution_FUNC);
+ rc = (jlong)NSImageNameCaution;
+ OS_NATIVE_EXIT(env, that, NSImageNameCaution_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_NSImageNameInfo
+JNIEXPORT jlong JNICALL OS_NATIVE(NSImageNameInfo)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSImageNameInfo_FUNC);
+ rc = (jlong)NSImageNameInfo;
+ OS_NATIVE_EXIT(env, that, NSImageNameInfo_FUNC);
return rc;
}
#endif
#ifndef NO_NSLigatureAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSLigatureAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSLigatureAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSLigatureAttributeName_FUNC);
- rc = (jintLong)NSLigatureAttributeName;
+ rc = (jlong)NSLigatureAttributeName;
OS_NATIVE_EXIT(env, that, NSLigatureAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSLinkAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSLinkAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSLinkAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSLinkAttributeName_FUNC);
- rc = (jintLong)NSLinkAttributeName;
+ rc = (jlong)NSLinkAttributeName;
OS_NATIVE_EXIT(env, that, NSLinkAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSLocaleLanguageCode
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSLocaleLanguageCode)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSLocaleLanguageCode)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSLocaleLanguageCode_FUNC);
- rc = (jintLong)NSLocaleLanguageCode;
+ rc = (jlong)NSLocaleLanguageCode;
OS_NATIVE_EXIT(env, that, NSLocaleLanguageCode_FUNC);
return rc;
}
#endif
#ifndef NO_NSModalPanelRunLoopMode
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSModalPanelRunLoopMode)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSModalPanelRunLoopMode)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSModalPanelRunLoopMode_FUNC);
- rc = (jintLong)NSModalPanelRunLoopMode;
+ rc = (jlong)NSModalPanelRunLoopMode;
OS_NATIVE_EXIT(env, that, NSModalPanelRunLoopMode_FUNC);
return rc;
}
#endif
#ifndef NO_NSNotFound
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSNotFound)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSNotFound)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSNotFound_FUNC);
- rc = (jintLong)NSNotFound;
+ rc = (jlong)NSNotFound;
OS_NATIVE_EXIT(env, that, NSNotFound_FUNC);
return rc;
}
#endif
-#ifndef NO_NSNumberOfColorComponents
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSNumberOfColorComponents)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSNumberOfColorComponents_FUNC);
- rc = (jintLong)NSNumberOfColorComponents((NSString*)arg0);
- OS_NATIVE_EXIT(env, that, NSNumberOfColorComponents_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSObliquenessAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSObliquenessAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSObliquenessAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSObliquenessAttributeName_FUNC);
- rc = (jintLong)NSObliquenessAttributeName;
+ rc = (jlong)NSObliquenessAttributeName;
OS_NATIVE_EXIT(env, that, NSObliquenessAttributeName_FUNC);
return rc;
}
#endif
-#ifndef NO_NSOutlineViewColumnDidMoveNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSOutlineViewColumnDidMoveNotification)
+#ifndef NO_NSOperatingSystemVersion_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(NSOperatingSystemVersion_1sizeof)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSOutlineViewColumnDidMoveNotification_FUNC);
- rc = (jintLong)NSOutlineViewColumnDidMoveNotification;
- OS_NATIVE_EXIT(env, that, NSOutlineViewColumnDidMoveNotification_FUNC);
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, NSOperatingSystemVersion_1sizeof_FUNC);
+ rc = (jint)NSOperatingSystemVersion_sizeof();
+ OS_NATIVE_EXIT(env, that, NSOperatingSystemVersion_1sizeof_FUNC);
return rc;
}
#endif
#ifndef NO_NSParagraphStyleAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSParagraphStyleAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSParagraphStyleAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSParagraphStyleAttributeName_FUNC);
- rc = (jintLong)NSParagraphStyleAttributeName;
+ rc = (jlong)NSParagraphStyleAttributeName;
OS_NATIVE_EXIT(env, that, NSParagraphStyleAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSPasteboardTypeHTML
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPasteboardTypeHTML)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPasteboardTypeHTML)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPasteboardTypeHTML_FUNC);
- rc = (jintLong)NSPasteboardTypeHTML;
+ rc = (jlong)NSPasteboardTypeHTML;
OS_NATIVE_EXIT(env, that, NSPasteboardTypeHTML_FUNC);
return rc;
}
#endif
#ifndef NO_NSPasteboardTypeRTF
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPasteboardTypeRTF)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPasteboardTypeRTF)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPasteboardTypeRTF_FUNC);
- rc = (jintLong)NSPasteboardTypeRTF;
+ rc = (jlong)NSPasteboardTypeRTF;
OS_NATIVE_EXIT(env, that, NSPasteboardTypeRTF_FUNC);
return rc;
}
#endif
#ifndef NO_NSPasteboardTypeString
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPasteboardTypeString)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPasteboardTypeString)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPasteboardTypeString_FUNC);
- rc = (jintLong)NSPasteboardTypeString;
+ rc = (jlong)NSPasteboardTypeString;
OS_NATIVE_EXIT(env, that, NSPasteboardTypeString_FUNC);
return rc;
}
@@ -4973,149 +3876,137 @@ JNIEXPORT jint JNICALL OS_NATIVE(NSPoint_1sizeof)
#endif
#ifndef NO_NSPrintAllPages
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintAllPages)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintAllPages)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintAllPages_FUNC);
- rc = (jintLong)NSPrintAllPages;
+ rc = (jlong)NSPrintAllPages;
OS_NATIVE_EXIT(env, that, NSPrintAllPages_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintCopies
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintCopies)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintCopies)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintCopies_FUNC);
- rc = (jintLong)NSPrintCopies;
+ rc = (jlong)NSPrintCopies;
OS_NATIVE_EXIT(env, that, NSPrintCopies_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintFirstPage
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintFirstPage)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintFirstPage)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintFirstPage_FUNC);
- rc = (jintLong)NSPrintFirstPage;
+ rc = (jlong)NSPrintFirstPage;
OS_NATIVE_EXIT(env, that, NSPrintFirstPage_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintJobDisposition
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintJobDisposition)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintJobDisposition)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintJobDisposition_FUNC);
- rc = (jintLong)NSPrintJobDisposition;
+ rc = (jlong)NSPrintJobDisposition;
OS_NATIVE_EXIT(env, that, NSPrintJobDisposition_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintLastPage
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintLastPage)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintLastPage)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintLastPage_FUNC);
- rc = (jintLong)NSPrintLastPage;
+ rc = (jlong)NSPrintLastPage;
OS_NATIVE_EXIT(env, that, NSPrintLastPage_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintMustCollate
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintMustCollate)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintMustCollate)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintMustCollate_FUNC);
- rc = (jintLong)NSPrintMustCollate;
+ rc = (jlong)NSPrintMustCollate;
OS_NATIVE_EXIT(env, that, NSPrintMustCollate_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintOrientation
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintOrientation)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintOrientation)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintOrientation_FUNC);
- rc = (jintLong)NSPrintOrientation;
+ rc = (jlong)NSPrintOrientation;
OS_NATIVE_EXIT(env, that, NSPrintOrientation_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintPreviewJob
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintPreviewJob)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintPreviewJob)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintPreviewJob_FUNC);
- rc = (jintLong)NSPrintPreviewJob;
+ rc = (jlong)NSPrintPreviewJob;
OS_NATIVE_EXIT(env, that, NSPrintPreviewJob_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintSaveJob
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintSaveJob)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintSaveJob)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintSaveJob_FUNC);
- rc = (jintLong)NSPrintSaveJob;
+ rc = (jlong)NSPrintSaveJob;
OS_NATIVE_EXIT(env, that, NSPrintSaveJob_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintSavePath
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintSavePath)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintSavePath)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintSavePath_FUNC);
- rc = (jintLong)NSPrintSavePath;
+ rc = (jlong)NSPrintSavePath;
OS_NATIVE_EXIT(env, that, NSPrintSavePath_FUNC);
return rc;
}
#endif
#ifndef NO_NSPrintScalingFactor
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintScalingFactor)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSPrintScalingFactor)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSPrintScalingFactor_FUNC);
- rc = (jintLong)NSPrintScalingFactor;
+ rc = (jlong)NSPrintScalingFactor;
OS_NATIVE_EXIT(env, that, NSPrintScalingFactor_FUNC);
return rc;
}
#endif
-#ifndef NO_NSPrintSpoolJob
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintSpoolJob)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSPrintSpoolJob_FUNC);
- rc = (jintLong)NSPrintSpoolJob;
- OS_NATIVE_EXIT(env, that, NSPrintSpoolJob_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSRange_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(NSRange_1sizeof)
(JNIEnv *env, jclass that)
@@ -5130,7 +4021,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(NSRange_1sizeof)
#ifndef NO_NSRectFillUsingOperation
JNIEXPORT void JNICALL OS_NATIVE(NSRectFillUsingOperation)
- (JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
{
NSRect _arg0, *lparg0=NULL;
OS_NATIVE_ENTER(env, that, NSRectFillUsingOperation_FUNC);
@@ -5155,12 +4046,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(NSRect_1sizeof)
#endif
#ifndef NO_NSSearchPathForDirectoriesInDomains
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSSearchPathForDirectoriesInDomains)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSSearchPathForDirectoriesInDomains)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSSearchPathForDirectoriesInDomains_FUNC);
- rc = (jintLong)NSSearchPathForDirectoriesInDomains((NSSearchPathDirectory)arg0, (NSSearchPathDomainMask)arg1, (BOOL)arg2);
+ rc = (jlong)NSSearchPathForDirectoriesInDomains((NSSearchPathDirectory)arg0, (NSSearchPathDomainMask)arg1, (BOOL)arg2);
OS_NATIVE_EXIT(env, that, NSSearchPathForDirectoriesInDomains_FUNC);
return rc;
}
@@ -5178,379 +4069,259 @@ JNIEXPORT jint JNICALL OS_NATIVE(NSSize_1sizeof)
}
#endif
-#ifndef NO_NSSpellingStateAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSSpellingStateAttributeName)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSSpellingStateAttributeName_FUNC);
- rc = (jintLong)NSSpellingStateAttributeName;
- OS_NATIVE_EXIT(env, that, NSSpellingStateAttributeName_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSSquareStatusItemLength
-JNIEXPORT jfloatDouble JNICALL OS_NATIVE(NSSquareStatusItemLength)
+JNIEXPORT jdouble JNICALL OS_NATIVE(NSSquareStatusItemLength)
(JNIEnv *env, jclass that)
{
- jfloatDouble rc = 0;
+ jdouble rc = 0;
OS_NATIVE_ENTER(env, that, NSSquareStatusItemLength_FUNC);
- rc = (jfloatDouble)NSSquareStatusItemLength;
+ rc = (jdouble)NSSquareStatusItemLength;
OS_NATIVE_EXIT(env, that, NSSquareStatusItemLength_FUNC);
return rc;
}
#endif
#ifndef NO_NSStrikethroughColorAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSStrikethroughColorAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSStrikethroughColorAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSStrikethroughColorAttributeName_FUNC);
- rc = (jintLong)NSStrikethroughColorAttributeName;
+ rc = (jlong)NSStrikethroughColorAttributeName;
OS_NATIVE_EXIT(env, that, NSStrikethroughColorAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSStrikethroughStyleAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSStrikethroughStyleAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSStrikethroughStyleAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSStrikethroughStyleAttributeName_FUNC);
- rc = (jintLong)NSStrikethroughStyleAttributeName;
+ rc = (jlong)NSStrikethroughStyleAttributeName;
OS_NATIVE_EXIT(env, that, NSStrikethroughStyleAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSStrokeWidthAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSStrokeWidthAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSStrokeWidthAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSStrokeWidthAttributeName_FUNC);
- rc = (jintLong)NSStrokeWidthAttributeName;
+ rc = (jlong)NSStrokeWidthAttributeName;
OS_NATIVE_EXIT(env, that, NSStrokeWidthAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSSystemColorsDidChangeNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSSystemColorsDidChangeNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSSystemColorsDidChangeNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSSystemColorsDidChangeNotification_FUNC);
- rc = (jintLong)NSSystemColorsDidChangeNotification;
+ rc = (jlong)NSSystemColorsDidChangeNotification;
OS_NATIVE_EXIT(env, that, NSSystemColorsDidChangeNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSTIFFPboardType
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSTIFFPboardType)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSTIFFPboardType)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSTIFFPboardType_FUNC);
- rc = (jintLong)NSTIFFPboardType;
+ rc = (jlong)NSTIFFPboardType;
OS_NATIVE_EXIT(env, that, NSTIFFPboardType_FUNC);
return rc;
}
#endif
-#ifndef NO_NSTableViewColumnDidMoveNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSTableViewColumnDidMoveNotification)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSTableViewColumnDidMoveNotification_FUNC);
- rc = (jintLong)NSTableViewColumnDidMoveNotification;
- OS_NATIVE_EXIT(env, that, NSTableViewColumnDidMoveNotification_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSTemporaryDirectory
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSTemporaryDirectory)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSTemporaryDirectory_FUNC);
- rc = (jintLong)NSTemporaryDirectory();
- OS_NATIVE_EXIT(env, that, NSTemporaryDirectory_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSToolbarCustomizeToolbarItemIdentifier
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarCustomizeToolbarItemIdentifier)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSToolbarCustomizeToolbarItemIdentifier_FUNC);
- rc = (jintLong)NSToolbarCustomizeToolbarItemIdentifier;
- OS_NATIVE_EXIT(env, that, NSToolbarCustomizeToolbarItemIdentifier_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSToolbarDidRemoveItemNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarDidRemoveItemNotification)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSToolbarDidRemoveItemNotification_FUNC);
- rc = (jintLong)NSToolbarDidRemoveItemNotification;
- OS_NATIVE_EXIT(env, that, NSToolbarDidRemoveItemNotification_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSToolbarFlexibleSpaceItemIdentifier
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarFlexibleSpaceItemIdentifier)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSToolbarFlexibleSpaceItemIdentifier)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSToolbarFlexibleSpaceItemIdentifier_FUNC);
- rc = (jintLong)NSToolbarFlexibleSpaceItemIdentifier;
+ rc = (jlong)NSToolbarFlexibleSpaceItemIdentifier;
OS_NATIVE_EXIT(env, that, NSToolbarFlexibleSpaceItemIdentifier_FUNC);
return rc;
}
#endif
-#ifndef NO_NSToolbarPrintItemIdentifier
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarPrintItemIdentifier)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSToolbarPrintItemIdentifier_FUNC);
- rc = (jintLong)NSToolbarPrintItemIdentifier;
- OS_NATIVE_EXIT(env, that, NSToolbarPrintItemIdentifier_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSToolbarSeparatorItemIdentifier
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarSeparatorItemIdentifier)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSToolbarSeparatorItemIdentifier_FUNC);
- rc = (jintLong)NSToolbarSeparatorItemIdentifier;
- OS_NATIVE_EXIT(env, that, NSToolbarSeparatorItemIdentifier_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSToolbarShowColorsItemIdentifier
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarShowColorsItemIdentifier)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSToolbarShowColorsItemIdentifier_FUNC);
- rc = (jintLong)NSToolbarShowColorsItemIdentifier;
- OS_NATIVE_EXIT(env, that, NSToolbarShowColorsItemIdentifier_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSToolbarShowFontsItemIdentifier
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarShowFontsItemIdentifier)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSToolbarShowFontsItemIdentifier_FUNC);
- rc = (jintLong)NSToolbarShowFontsItemIdentifier;
- OS_NATIVE_EXIT(env, that, NSToolbarShowFontsItemIdentifier_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSToolbarSpaceItemIdentifier
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarSpaceItemIdentifier)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSToolbarSpaceItemIdentifier)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSToolbarSpaceItemIdentifier_FUNC);
- rc = (jintLong)NSToolbarSpaceItemIdentifier;
+ rc = (jlong)NSToolbarSpaceItemIdentifier;
OS_NATIVE_EXIT(env, that, NSToolbarSpaceItemIdentifier_FUNC);
return rc;
}
#endif
-#ifndef NO_NSToolbarWillAddItemNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSToolbarWillAddItemNotification)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSToolbarWillAddItemNotification_FUNC);
- rc = (jintLong)NSToolbarWillAddItemNotification;
- OS_NATIVE_EXIT(env, that, NSToolbarWillAddItemNotification_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSURLPboardType
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSURLPboardType)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSURLPboardType)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSURLPboardType_FUNC);
- rc = (jintLong)NSURLPboardType;
+ rc = (jlong)NSURLPboardType;
OS_NATIVE_EXIT(env, that, NSURLPboardType_FUNC);
return rc;
}
#endif
#ifndef NO_NSUnderlineColorAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSUnderlineColorAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSUnderlineColorAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSUnderlineColorAttributeName_FUNC);
- rc = (jintLong)NSUnderlineColorAttributeName;
+ rc = (jlong)NSUnderlineColorAttributeName;
OS_NATIVE_EXIT(env, that, NSUnderlineColorAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSUnderlineStyleAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSUnderlineStyleAttributeName)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSUnderlineStyleAttributeName)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSUnderlineStyleAttributeName_FUNC);
- rc = (jintLong)NSUnderlineStyleAttributeName;
+ rc = (jlong)NSUnderlineStyleAttributeName;
OS_NATIVE_EXIT(env, that, NSUnderlineStyleAttributeName_FUNC);
return rc;
}
#endif
#ifndef NO_NSViewGlobalFrameDidChangeNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSViewGlobalFrameDidChangeNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSViewGlobalFrameDidChangeNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSViewGlobalFrameDidChangeNotification_FUNC);
- rc = (jintLong)NSViewGlobalFrameDidChangeNotification;
+ rc = (jlong)NSViewGlobalFrameDidChangeNotification;
OS_NATIVE_EXIT(env, that, NSViewGlobalFrameDidChangeNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSWindowDidBecomeKeyNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSWindowDidBecomeKeyNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSWindowDidBecomeKeyNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSWindowDidBecomeKeyNotification_FUNC);
- rc = (jintLong)NSWindowDidBecomeKeyNotification;
+ rc = (jlong)NSWindowDidBecomeKeyNotification;
OS_NATIVE_EXIT(env, that, NSWindowDidBecomeKeyNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSWindowDidDeminiaturizeNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSWindowDidDeminiaturizeNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSWindowDidDeminiaturizeNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSWindowDidDeminiaturizeNotification_FUNC);
- rc = (jintLong)NSWindowDidDeminiaturizeNotification;
+ rc = (jlong)NSWindowDidDeminiaturizeNotification;
OS_NATIVE_EXIT(env, that, NSWindowDidDeminiaturizeNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSWindowDidMiniaturizeNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSWindowDidMiniaturizeNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSWindowDidMiniaturizeNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSWindowDidMiniaturizeNotification_FUNC);
- rc = (jintLong)NSWindowDidMiniaturizeNotification;
+ rc = (jlong)NSWindowDidMiniaturizeNotification;
OS_NATIVE_EXIT(env, that, NSWindowDidMiniaturizeNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSWindowDidMoveNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSWindowDidMoveNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSWindowDidMoveNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSWindowDidMoveNotification_FUNC);
- rc = (jintLong)NSWindowDidMoveNotification;
+ rc = (jlong)NSWindowDidMoveNotification;
OS_NATIVE_EXIT(env, that, NSWindowDidMoveNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSWindowDidResignKeyNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSWindowDidResignKeyNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSWindowDidResignKeyNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSWindowDidResignKeyNotification_FUNC);
- rc = (jintLong)NSWindowDidResignKeyNotification;
+ rc = (jlong)NSWindowDidResignKeyNotification;
OS_NATIVE_EXIT(env, that, NSWindowDidResignKeyNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSWindowDidResizeNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSWindowDidResizeNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSWindowDidResizeNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSWindowDidResizeNotification_FUNC);
- rc = (jintLong)NSWindowDidResizeNotification;
+ rc = (jlong)NSWindowDidResizeNotification;
OS_NATIVE_EXIT(env, that, NSWindowDidResizeNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NSWindowWillCloseNotification
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSWindowWillCloseNotification)
+JNIEXPORT jlong JNICALL OS_NATIVE(NSWindowWillCloseNotification)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NSWindowWillCloseNotification_FUNC);
- rc = (jintLong)NSWindowWillCloseNotification;
+ rc = (jlong)NSWindowWillCloseNotification;
OS_NATIVE_EXIT(env, that, NSWindowWillCloseNotification_FUNC);
return rc;
}
#endif
#ifndef NO_NewGlobalRef
-JNIEXPORT jintLong JNICALL OS_NATIVE(NewGlobalRef)
+JNIEXPORT jlong JNICALL OS_NATIVE(NewGlobalRef)
(JNIEnv *env, jclass that, jobject arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NewGlobalRef_FUNC);
- rc = (jintLong)(*env)->NewGlobalRef(env, arg0);
+ rc = (jlong)(*env)->NewGlobalRef(env, arg0);
OS_NATIVE_EXIT(env, that, NewGlobalRef_FUNC);
return rc;
}
#endif
#ifndef NO_NewRgn
-JNIEXPORT jintLong JNICALL OS_NATIVE(NewRgn)
+JNIEXPORT jlong JNICALL OS_NATIVE(NewRgn)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, NewRgn_FUNC);
/*
- rc = (jintLong)NewRgn();
+ rc = (jlong)NewRgn();
*/
{
OS_LOAD_FUNCTION(fp, NewRgn)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+ rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
OS_NATIVE_EXIT(env, that, NewRgn_FUNC);
@@ -5560,7 +4331,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NewRgn)
#ifndef NO_OffsetRgn
JNIEXPORT void JNICALL OS_NATIVE(OffsetRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jshort arg1, jshort arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jshort arg1, jshort arg2)
{
OS_NATIVE_ENTER(env, that, OffsetRgn_FUNC);
/*
@@ -5569,7 +4340,7 @@ JNIEXPORT void JNICALL OS_NATIVE(OffsetRgn)
{
OS_LOAD_FUNCTION(fp, OffsetRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jshort, jshort))fp)(arg0, arg1, arg2);
+ ((void (CALLING_CONVENTION*)(jlong, jshort, jshort))fp)(arg0, arg1, arg2);
}
}
OS_NATIVE_EXIT(env, that, OffsetRgn_FUNC);
@@ -5595,20 +4366,20 @@ JNIEXPORT void JNICALL OS_NATIVE(OpenRgn)
#endif
#ifndef NO_PMGetDuplex
-JNIEXPORT jintLong JNICALL OS_NATIVE(PMGetDuplex)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(PMGetDuplex)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, PMGetDuplex_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- rc = (jintLong)PMGetDuplex((PMPrintSettings)arg0, (PMDuplexMode *)lparg1);
+ rc = (jlong)PMGetDuplex((PMPrintSettings)arg0, (PMDuplexMode *)lparg1);
*/
{
OS_LOAD_FUNCTION(fp, PMGetDuplex)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(PMPrintSettings, PMDuplexMode *))fp)((PMPrintSettings)arg0, (PMDuplexMode *)lparg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(PMPrintSettings, PMDuplexMode *))fp)((PMPrintSettings)arg0, (PMDuplexMode *)lparg1);
}
}
fail:
@@ -5619,20 +4390,20 @@ fail:
#endif
#ifndef NO_PMPrinterGetIndexedPrinterResolution
-JNIEXPORT jintLong JNICALL OS_NATIVE(PMPrinterGetIndexedPrinterResolution)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(PMPrinterGetIndexedPrinterResolution)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
PMResolution _arg2, *lparg2=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, PMPrinterGetIndexedPrinterResolution_FUNC);
if (arg2) if ((lparg2 = getPMResolutionFields(env, arg2, &_arg2)) == NULL) goto fail;
/*
- rc = (jintLong)PMPrinterGetIndexedPrinterResolution((PMPrinter)arg0, arg1, (PMResolution *)lparg2);
+ rc = (jlong)PMPrinterGetIndexedPrinterResolution((PMPrinter)arg0, arg1, (PMResolution *)lparg2);
*/
{
OS_LOAD_FUNCTION(fp, PMPrinterGetIndexedPrinterResolution)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(PMPrinter, jint, PMResolution *))fp)((PMPrinter)arg0, arg1, (PMResolution *)lparg2);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(PMPrinter, jint, PMResolution *))fp)((PMPrinter)arg0, arg1, (PMResolution *)lparg2);
}
}
fail:
@@ -5643,20 +4414,20 @@ fail:
#endif
#ifndef NO_PMPrinterGetOutputResolution
-JNIEXPORT jintLong JNICALL OS_NATIVE(PMPrinterGetOutputResolution)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(PMPrinterGetOutputResolution)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
PMResolution _arg2, *lparg2=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, PMPrinterGetOutputResolution_FUNC);
if (arg2) if ((lparg2 = getPMResolutionFields(env, arg2, &_arg2)) == NULL) goto fail;
/*
- rc = (jintLong)PMPrinterGetOutputResolution((PMPrinter)arg0, (PMPrintSettings)arg1, (PMResolution *)lparg2);
+ rc = (jlong)PMPrinterGetOutputResolution((PMPrinter)arg0, (PMPrintSettings)arg1, (PMResolution *)lparg2);
*/
{
OS_LOAD_FUNCTION(fp, PMPrinterGetOutputResolution)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(PMPrinter, PMPrintSettings, PMResolution *))fp)((PMPrinter)arg0, (PMPrintSettings)arg1, (PMResolution *)lparg2);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(PMPrinter, PMPrintSettings, PMResolution *))fp)((PMPrinter)arg0, (PMPrintSettings)arg1, (PMResolution *)lparg2);
}
}
fail:
@@ -5667,20 +4438,20 @@ fail:
#endif
#ifndef NO_PMPrinterGetPrinterResolutionCount
-JNIEXPORT jintLong JNICALL OS_NATIVE(PMPrinterGetPrinterResolutionCount)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(PMPrinterGetPrinterResolutionCount)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, PMPrinterGetPrinterResolutionCount_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- rc = (jintLong)PMPrinterGetPrinterResolutionCount((PMPrinter)arg0, (UInt32 *)lparg1);
+ rc = (jlong)PMPrinterGetPrinterResolutionCount((PMPrinter)arg0, (UInt32 *)lparg1);
*/
{
OS_LOAD_FUNCTION(fp, PMPrinterGetPrinterResolutionCount)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(PMPrinter, UInt32 *))fp)((PMPrinter)arg0, (UInt32 *)lparg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(PMPrinter, UInt32 *))fp)((PMPrinter)arg0, (UInt32 *)lparg1);
}
}
fail:
@@ -5691,44 +4462,44 @@ fail:
#endif
#ifndef NO_PMSessionGetCurrentPrinter
-JNIEXPORT jintLong JNICALL OS_NATIVE(PMSessionGetCurrentPrinter)
- (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(PMSessionGetCurrentPrinter)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
- jintLong *lparg1=NULL;
- jintLong rc = 0;
+ jlong *lparg1=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, PMSessionGetCurrentPrinter_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- rc = (jintLong)PMSessionGetCurrentPrinter((PMPrintSession)arg0, (PMPrinter *)lparg1);
+ rc = (jlong)PMSessionGetCurrentPrinter((PMPrintSession)arg0, (PMPrinter *)lparg1);
*/
{
OS_LOAD_FUNCTION(fp, PMSessionGetCurrentPrinter)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(PMPrintSession, PMPrinter *))fp)((PMPrintSession)arg0, (PMPrinter *)lparg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(PMPrintSession, PMPrinter *))fp)((PMPrintSession)arg0, (PMPrinter *)lparg1);
}
}
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, PMSessionGetCurrentPrinter_FUNC);
return rc;
}
#endif
#ifndef NO_PMSessionGetDestinationType
-JNIEXPORT jintLong JNICALL OS_NATIVE(PMSessionGetDestinationType)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jshortArray arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(PMSessionGetDestinationType)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jshortArray arg2)
{
jshort *lparg2=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, PMSessionGetDestinationType_FUNC);
if (arg2) if ((lparg2 = (*env)->GetShortArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
- rc = (jintLong)PMSessionGetDestinationType((PMPrintSession)arg0, (PMPrintSettings)arg1, lparg2);
+ rc = (jlong)PMSessionGetDestinationType((PMPrintSession)arg0, (PMPrintSettings)arg1, lparg2);
*/
{
OS_LOAD_FUNCTION(fp, PMSessionGetDestinationType)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(PMPrintSession, PMPrintSettings, jshort *))fp)((PMPrintSession)arg0, (PMPrintSettings)arg1, lparg2);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(PMPrintSession, PMPrintSettings, jshort *))fp)((PMPrintSession)arg0, (PMPrintSettings)arg1, lparg2);
}
}
fail:
@@ -5739,18 +4510,18 @@ fail:
#endif
#ifndef NO_PMSetDuplex
-JNIEXPORT jintLong JNICALL OS_NATIVE(PMSetDuplex)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(PMSetDuplex)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, PMSetDuplex_FUNC);
/*
- rc = (jintLong)PMSetDuplex((PMPrintSettings)arg0, (PMDuplexMode)arg1);
+ rc = (jlong)PMSetDuplex((PMPrintSettings)arg0, (PMDuplexMode)arg1);
*/
{
OS_LOAD_FUNCTION(fp, PMSetDuplex)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(PMPrintSettings, PMDuplexMode))fp)((PMPrintSettings)arg0, (PMDuplexMode)arg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(PMPrintSettings, PMDuplexMode))fp)((PMPrintSettings)arg0, (PMDuplexMode)arg1);
}
}
OS_NATIVE_EXIT(env, that, PMSetDuplex_FUNC);
@@ -5760,7 +4531,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(PMSetDuplex)
#ifndef NO_PtInRgn
JNIEXPORT jboolean JNICALL OS_NATIVE(PtInRgn)
- (JNIEnv *env, jclass that, jshortArray arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jshortArray arg0, jlong arg1)
{
jshort *lparg0=NULL;
jboolean rc = 0;
@@ -5772,7 +4543,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(PtInRgn)
{
OS_LOAD_FUNCTION(fp, PtInRgn)
if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(Point, jintLong))fp)(*(Point *)lparg0, arg1);
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(Point, jlong))fp)(*(Point *)lparg0, arg1);
}
}
fail:
@@ -5784,7 +4555,7 @@ fail:
#ifndef NO_QDRegionToRects
JNIEXPORT jint JNICALL OS_NATIVE(QDRegionToRects)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, QDRegionToRects_FUNC);
@@ -5794,7 +4565,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(QDRegionToRects)
{
OS_LOAD_FUNCTION(fp, QDRegionToRects)
if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jint, jintLong, jintLong))fp)(arg0, arg1, arg2, arg3);
+ rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jint, jlong, jlong))fp)(arg0, arg1, arg2, arg3);
}
}
OS_NATIVE_EXIT(env, that, QDRegionToRects_FUNC);
@@ -5804,7 +4575,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(QDRegionToRects)
#ifndef NO_RectInRgn
JNIEXPORT jboolean JNICALL OS_NATIVE(RectInRgn)
- (JNIEnv *env, jclass that, jshortArray arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jshortArray arg0, jlong arg1)
{
jshort *lparg0=NULL;
jboolean rc = 0;
@@ -5816,7 +4587,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(RectInRgn)
{
OS_LOAD_FUNCTION(fp, RectInRgn)
if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jshort *, jintLong))fp)(lparg0, arg1);
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jshort *, jlong))fp)(lparg0, arg1);
}
}
fail:
@@ -5828,7 +4599,7 @@ fail:
#ifndef NO_RectRgn
JNIEXPORT void JNICALL OS_NATIVE(RectRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jshortArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jshortArray arg1)
{
jshort *lparg1=NULL;
OS_NATIVE_ENTER(env, that, RectRgn_FUNC);
@@ -5839,7 +4610,7 @@ JNIEXPORT void JNICALL OS_NATIVE(RectRgn)
{
OS_LOAD_FUNCTION(fp, RectRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jshort *))fp)(arg0, lparg1);
+ ((void (CALLING_CONVENTION*)(jlong, jshort *))fp)(arg0, lparg1);
}
}
fail:
@@ -5850,15 +4621,15 @@ fail:
#ifndef NO_SecPolicySearchCopyNext
JNIEXPORT jint JNICALL OS_NATIVE(SecPolicySearchCopyNext)
- (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
- jintLong *lparg1=NULL;
+ jlong *lparg1=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, SecPolicySearchCopyNext_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)SecPolicySearchCopyNext((SecPolicySearchRef)arg0, (SecPolicyRef *)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, SecPolicySearchCopyNext_FUNC);
return rc;
}
@@ -5866,15 +4637,15 @@ fail:
#ifndef NO_SecPolicySearchCreate
JNIEXPORT jint JNICALL OS_NATIVE(SecPolicySearchCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLongArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlongArray arg3)
{
- jintLong *lparg3=NULL;
+ jlong *lparg3=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, SecPolicySearchCreate_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
rc = (jint)SecPolicySearchCreate((CSSM_CERT_TYPE)arg0, (CSSM_OID *)arg1, (CSSM_DATA *)arg2, (SecPolicySearchRef *)lparg3);
fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
OS_NATIVE_EXIT(env, that, SecPolicySearchCreate_FUNC);
return rc;
}
@@ -5882,15 +4653,15 @@ fail:
#ifndef NO_SecTrustCreateWithCertificates
JNIEXPORT jint JNICALL OS_NATIVE(SecTrustCreateWithCertificates)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
- jintLong *lparg2=NULL;
+ jlong *lparg2=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, SecTrustCreateWithCertificates_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)SecTrustCreateWithCertificates((CFArrayRef)arg0, (CFTypeRef)arg1, (SecTrustRef *)lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
OS_NATIVE_EXIT(env, that, SecTrustCreateWithCertificates_FUNC);
return rc;
}
@@ -5898,7 +4669,7 @@ fail:
#ifndef NO_SectRgn
JNIEXPORT void JNICALL OS_NATIVE(SectRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
OS_NATIVE_ENTER(env, that, SectRgn_FUNC);
/*
@@ -5907,7 +4678,7 @@ JNIEXPORT void JNICALL OS_NATIVE(SectRgn)
{
OS_LOAD_FUNCTION(fp, SectRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2);
+ ((void (CALLING_CONVENTION*)(jlong, jlong, jlong))fp)(arg0, arg1, arg2);
}
}
OS_NATIVE_EXIT(env, that, SectRgn_FUNC);
@@ -5956,39 +4727,19 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetSystemUIMode)
}
#endif
-#ifndef NO_SetThemeCursor
-JNIEXPORT jint JNICALL OS_NATIVE(SetThemeCursor)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SetThemeCursor_FUNC);
-/*
- rc = (jint)SetThemeCursor(arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, SetThemeCursor)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jint))fp)(arg0);
- }
- }
- OS_NATIVE_EXIT(env, that, SetThemeCursor_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_TISCopyCurrentKeyboardInputSource
-JNIEXPORT jintLong JNICALL OS_NATIVE(TISCopyCurrentKeyboardInputSource)
+JNIEXPORT jlong JNICALL OS_NATIVE(TISCopyCurrentKeyboardInputSource)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, TISCopyCurrentKeyboardInputSource_FUNC);
/*
- rc = (jintLong)TISCopyCurrentKeyboardInputSource();
+ rc = (jlong)TISCopyCurrentKeyboardInputSource();
*/
{
OS_LOAD_FUNCTION(fp, TISCopyCurrentKeyboardInputSource)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+ rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
OS_NATIVE_EXIT(env, that, TISCopyCurrentKeyboardInputSource_FUNC);
@@ -5997,18 +4748,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(TISCopyCurrentKeyboardInputSource)
#endif
#ifndef NO_TISGetInputSourceProperty
-JNIEXPORT jintLong JNICALL OS_NATIVE(TISGetInputSourceProperty)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(TISGetInputSourceProperty)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, TISGetInputSourceProperty_FUNC);
/*
- rc = (jintLong)TISGetInputSourceProperty((TISInputSourceRef)arg0, (CFStringRef)arg1);
+ rc = (jlong)TISGetInputSourceProperty((TISInputSourceRef)arg0, (CFStringRef)arg1);
*/
{
OS_LOAD_FUNCTION(fp, TISGetInputSourceProperty)
if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(TISInputSourceRef, CFStringRef))fp)((TISInputSourceRef)arg0, (CFStringRef)arg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(TISInputSourceRef, CFStringRef))fp)((TISInputSourceRef)arg0, (CFStringRef)arg1);
}
}
OS_NATIVE_EXIT(env, that, TISGetInputSourceProperty_FUNC);
@@ -6016,33 +4767,17 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(TISGetInputSourceProperty)
}
#endif
-#ifndef NO_TransformProcessType
-JNIEXPORT jint JNICALL OS_NATIVE(TransformProcessType)
- (JNIEnv *env, jclass that, jintArray arg0, jint arg1)
-{
- jint *lparg0=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, TransformProcessType_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jint)TransformProcessType((ProcessSerialNumber *)lparg0, arg1);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, TransformProcessType_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_UCKeyTranslate
JNIEXPORT jint JNICALL OS_NATIVE(UCKeyTranslate)
- (JNIEnv *env, jclass that, jintLong arg0, jshort arg1, jshort arg2, jint arg3, jint arg4, jint arg5, jintArray arg6, jint arg7, jintArray arg8, jcharArray arg9)
+ (JNIEnv *env, jclass that, jlong arg0, jshort arg1, jshort arg2, jint arg3, jint arg4, jint arg5, jintArray arg6, jint arg7, jlongArray arg8, jcharArray arg9)
{
jint *lparg6=NULL;
- jint *lparg8=NULL;
+ jlong *lparg8=NULL;
jchar *lparg9=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, UCKeyTranslate_FUNC);
if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- if (arg8) if ((lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL)) == NULL) goto fail;
+ if (arg8) if ((lparg8 = (*env)->GetLongArrayElements(env, arg8, NULL)) == NULL) goto fail;
if (arg9) if ((lparg9 = (*env)->GetCharArrayElements(env, arg9, NULL)) == NULL) goto fail;
/*
rc = (jint)UCKeyTranslate((const UCKeyboardLayout *)arg0, (UInt16)arg1, (UInt16)arg2, (UInt32)arg3, (UInt32)arg4, (OptionBits)arg5, (UInt32 *)lparg6, (UniCharCount)arg7, (UniCharCount *)lparg8, (UniChar *)lparg9);
@@ -6055,7 +4790,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(UCKeyTranslate)
}
fail:
if (arg9 && lparg9) (*env)->ReleaseCharArrayElements(env, arg9, lparg9, 0);
- if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0);
+ if (arg8 && lparg8) (*env)->ReleaseLongArrayElements(env, arg8, lparg8, 0);
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
OS_NATIVE_EXIT(env, that, UCKeyTranslate_FUNC);
return rc;
@@ -6064,7 +4799,7 @@ fail:
#ifndef NO_UTTypeEqual
JNIEXPORT jboolean JNICALL OS_NATIVE(UTTypeEqual)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, UTTypeEqual_FUNC);
@@ -6076,7 +4811,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(UTTypeEqual)
#ifndef NO_UnionRgn
JNIEXPORT void JNICALL OS_NATIVE(UnionRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
OS_NATIVE_ENTER(env, that, UnionRgn_FUNC);
/*
@@ -6085,7 +4820,7 @@ JNIEXPORT void JNICALL OS_NATIVE(UnionRgn)
{
OS_LOAD_FUNCTION(fp, UnionRgn)
if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2);
+ ((void (CALLING_CONVENTION*)(jlong, jlong, jlong))fp)(arg0, arg1, arg2);
}
}
OS_NATIVE_EXIT(env, that, UnionRgn_FUNC);
@@ -6094,7 +4829,7 @@ JNIEXPORT void JNICALL OS_NATIVE(UnionRgn)
#ifndef NO_call
JNIEXPORT void JNICALL OS_NATIVE(call)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
OS_NATIVE_ENTER(env, that, call_FUNC);
((void (*)())arg0)(arg1, arg2);
@@ -6104,7 +4839,7 @@ JNIEXPORT void JNICALL OS_NATIVE(call)
#ifndef NO_class_1addIvar
JNIEXPORT jboolean JNICALL OS_NATIVE(class_1addIvar)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2, jbyte arg3, jbyteArray arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jbyte arg3, jbyteArray arg4)
{
jbyte *lparg1=NULL;
jbyte *lparg4=NULL;
@@ -6123,7 +4858,7 @@ fail:
#ifndef NO_class_1addMethod
JNIEXPORT jboolean JNICALL OS_NATIVE(class_1addMethod)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jstring arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jstring arg3)
{
const char *lparg3= NULL;
jboolean rc = 0;
@@ -6139,7 +4874,7 @@ fail:
#ifndef NO_class_1addProtocol
JNIEXPORT jboolean JNICALL OS_NATIVE(class_1addProtocol)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, class_1addProtocol_FUNC);
@@ -6150,60 +4885,60 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(class_1addProtocol)
#endif
#ifndef NO_class_1createInstance
-JNIEXPORT jintLong JNICALL OS_NATIVE(class_1createInstance)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(class_1createInstance)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, class_1createInstance_FUNC);
- rc = (jintLong)class_createInstance((Class)arg0, (size_t)arg1);
+ rc = (jlong)class_createInstance((Class)arg0, (size_t)arg1);
OS_NATIVE_EXIT(env, that, class_1createInstance_FUNC);
return rc;
}
#endif
#ifndef NO_class_1getClassMethod
-JNIEXPORT jintLong JNICALL OS_NATIVE(class_1getClassMethod)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(class_1getClassMethod)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, class_1getClassMethod_FUNC);
- rc = (jintLong)class_getClassMethod((Class)arg0, (SEL)arg1);
+ rc = (jlong)class_getClassMethod((Class)arg0, (SEL)arg1);
OS_NATIVE_EXIT(env, that, class_1getClassMethod_FUNC);
return rc;
}
#endif
#ifndef NO_class_1getInstanceMethod
-JNIEXPORT jintLong JNICALL OS_NATIVE(class_1getInstanceMethod)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(class_1getInstanceMethod)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, class_1getInstanceMethod_FUNC);
- rc = (jintLong)class_getInstanceMethod((Class)arg0, (SEL)arg1);
+ rc = (jlong)class_getInstanceMethod((Class)arg0, (SEL)arg1);
OS_NATIVE_EXIT(env, that, class_1getInstanceMethod_FUNC);
return rc;
}
#endif
#ifndef NO_class_1getMethodImplementation
-JNIEXPORT jintLong JNICALL OS_NATIVE(class_1getMethodImplementation)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(class_1getMethodImplementation)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, class_1getMethodImplementation_FUNC);
- rc = (jintLong)class_getMethodImplementation((Class)arg0, (SEL)arg1);
+ rc = (jlong)class_getMethodImplementation((Class)arg0, (SEL)arg1);
OS_NATIVE_EXIT(env, that, class_1getMethodImplementation_FUNC);
return rc;
}
#endif
#ifndef NO_class_1getSuperclass
-JNIEXPORT jintLong JNICALL OS_NATIVE(class_1getSuperclass)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(class_1getSuperclass)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, class_1getSuperclass_FUNC);
- rc = (jintLong)class_getSuperclass((Class)arg0);
+ rc = (jlong)class_getSuperclass((Class)arg0);
OS_NATIVE_EXIT(env, that, class_1getSuperclass_FUNC);
return rc;
}
@@ -6240,734 +4975,209 @@ JNIEXPORT void JNICALL OS_NATIVE(instrumentObjcMessageSends)
#endif
#ifndef NO_kCFAllocatorDefault
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCFAllocatorDefault)
+JNIEXPORT jlong JNICALL OS_NATIVE(kCFAllocatorDefault)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, kCFAllocatorDefault_FUNC);
- rc = (jintLong)kCFAllocatorDefault;
+ rc = (jlong)kCFAllocatorDefault;
OS_NATIVE_EXIT(env, that, kCFAllocatorDefault_FUNC);
return rc;
}
#endif
#ifndef NO_kCFRunLoopCommonModes
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCFRunLoopCommonModes)
+JNIEXPORT jlong JNICALL OS_NATIVE(kCFRunLoopCommonModes)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, kCFRunLoopCommonModes_FUNC);
- rc = (jintLong)kCFRunLoopCommonModes;
+ rc = (jlong)kCFRunLoopCommonModes;
OS_NATIVE_EXIT(env, that, kCFRunLoopCommonModes_FUNC);
return rc;
}
#endif
-#ifndef NO_kCFTypeDictionaryKeyCallBacks
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCFTypeDictionaryKeyCallBacks)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, kCFTypeDictionaryKeyCallBacks_FUNC);
- rc = (jintLong)&kCFTypeDictionaryKeyCallBacks;
- OS_NATIVE_EXIT(env, that, kCFTypeDictionaryKeyCallBacks_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_kCFTypeDictionaryValueCallBacks
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCFTypeDictionaryValueCallBacks)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, kCFTypeDictionaryValueCallBacks_FUNC);
- rc = (jintLong)&kCFTypeDictionaryValueCallBacks;
- OS_NATIVE_EXIT(env, that, kCFTypeDictionaryValueCallBacks_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_kCTFontAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCTFontAttributeName)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, kCTFontAttributeName_FUNC);
- rc = (jintLong)kCTFontAttributeName;
- OS_NATIVE_EXIT(env, that, kCTFontAttributeName_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_kCTForegroundColorAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCTForegroundColorAttributeName)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, kCTForegroundColorAttributeName_FUNC);
- rc = (jintLong)kCTForegroundColorAttributeName;
- OS_NATIVE_EXIT(env, that, kCTForegroundColorAttributeName_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_kCTParagraphStyleAttributeName
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCTParagraphStyleAttributeName)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, kCTParagraphStyleAttributeName_FUNC);
- rc = (jintLong)kCTParagraphStyleAttributeName;
- OS_NATIVE_EXIT(env, that, kCTParagraphStyleAttributeName_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_kUTTypeFileURL
-JNIEXPORT jintLong JNICALL OS_NATIVE(kUTTypeFileURL)
+JNIEXPORT jlong JNICALL OS_NATIVE(kUTTypeFileURL)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, kUTTypeFileURL_FUNC);
- rc = (jintLong)kUTTypeFileURL;
+ rc = (jlong)kUTTypeFileURL;
OS_NATIVE_EXIT(env, that, kUTTypeFileURL_FUNC);
return rc;
}
#endif
#ifndef NO_kUTTypeURL
-JNIEXPORT jintLong JNICALL OS_NATIVE(kUTTypeURL)
+JNIEXPORT jlong JNICALL OS_NATIVE(kUTTypeURL)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, kUTTypeURL_FUNC);
- rc = (jintLong)kUTTypeURL;
+ rc = (jlong)kUTTypeURL;
OS_NATIVE_EXIT(env, that, kUTTypeURL_FUNC);
return rc;
}
#endif
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
- CFRange _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J_FUNC);
-#endif
- if (arg1) if ((lparg1 = getCFRangeFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setCFRangeFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
- CGAffineTransform _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J_FUNC);
-#endif
- if (arg1) if ((lparg1 = getCGAffineTransformFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setCGAffineTransformFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
CGPathElement _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J_FUNC);
-#endif
if (arg1) if ((lparg1 = getCGPathElementFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
+ memmove((void *)arg0, lparg1, arg2);
fail:
- if (arg1 && lparg1) setCGPathElementFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CGPoint_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CGPoint_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CGPoint_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CGPoint_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
- CGPoint _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGPoint_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGPoint_2J_FUNC);
-#endif
- if (arg1) if ((lparg1 = getCGPointFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setCGPointFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGPoint_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGPoint_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CGRect_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CGRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CGRect_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CGRect_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
- CGRect _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGRect_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGRect_2J_FUNC);
-#endif
- if (arg1) if ((lparg1 = getCGRectFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setCGRectFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGRect_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGRect_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CGSize_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CGSize_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
- CGSize _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGSize_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J_FUNC);
-#endif
- if (arg1) if ((lparg1 = getCGSizeFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setCGSizeFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGSize_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
- CTParagraphStyleSetting _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J_FUNC);
-#endif
- if (arg1) if ((lparg1 = getCTParagraphStyleSettingFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setCTParagraphStyleSettingFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
- NSAffineTransformStruct _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J_FUNC);
-#endif
- if (arg1) if ((lparg1 = getNSAffineTransformStructFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setNSAffineTransformStructFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_NSPoint_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_NSPoint_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
NSPoint _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
if (arg1) if ((lparg1 = getNSPointFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
+ memmove((void *)arg0, lparg1, arg2);
fail:
- if (arg1 && lparg1) setNSPointFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_NSRange_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_NSRange_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
NSRange _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
if (arg1) if ((lparg1 = getNSRangeFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
+ memmove((void *)arg0, lparg1, arg2);
fail:
- if (arg1 && lparg1) setNSRangeFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
NSRect _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg1) if ((lparg1 = getNSRectFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
+ memmove((void *)arg0, lparg1, arg2);
fail:
- if (arg1 && lparg1) setNSRectFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_NSSize_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_NSSize_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
NSSize _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC);
-#endif
if (arg1) if ((lparg1 = getNSSizeFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (void *)lparg1, arg2);
+ memmove((void *)arg0, lparg1, arg2);
fail:
- if (arg1 && lparg1) setNSSizeFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
- CFRange _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setCFRangeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
- CGAffineTransform _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setCGAffineTransformFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
CGPathElement _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
+ memmove(lparg0, (void *)arg1, arg2);
fail:
if (arg0 && lparg0) setCGPathElementFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
- CGPoint _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2JJ_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setCGPointFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
- CGRect _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2JJ_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setCGRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2JJ_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
- CGSize _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setCGSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
- CTParagraphStyleSetting _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setCTParagraphStyleSettingFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
- NSAffineTransformStruct _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setNSAffineTransformStructFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSPoint _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
+ memmove(lparg0, (void *)arg1, arg2);
fail:
if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSRange _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
+ memmove(lparg0, (void *)arg1, arg2);
fail:
if (arg0 && lparg0) setNSRangeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSRect _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
+ memmove(lparg0, (void *)arg1, arg2);
fail:
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSSize _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (void *)arg1, arg2);
+ memmove(lparg0, (void *)arg1, arg2);
fail:
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ_FUNC);
-#endif
}
#endif
#ifndef NO_method_1setImplementation
-JNIEXPORT jintLong JNICALL OS_NATIVE(method_1setImplementation)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(method_1setImplementation)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, method_1setImplementation_FUNC);
- rc = (jintLong)method_setImplementation((Method)arg0, (IMP)arg1);
+ rc = (jlong)method_setImplementation((Method)arg0, (IMP)arg1);
OS_NATIVE_EXIT(env, that, method_1setImplementation_FUNC);
return rc;
}
#endif
#ifndef NO_objc_1allocateClassPair
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1allocateClassPair)
- (JNIEnv *env, jclass that, jintLong arg0, jstring arg1, jintLong arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1allocateClassPair)
+ (JNIEnv *env, jclass that, jlong arg0, jstring arg1, jlong arg2)
{
const char *lparg1= NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1allocateClassPair_FUNC);
if (arg1) if ((lparg1 = (*env)->GetStringUTFChars(env, arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)objc_allocateClassPair((Class)arg0, lparg1, arg2);
+ rc = (jlong)objc_allocateClassPair((Class)arg0, lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseStringUTFChars(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, objc_1allocateClassPair_FUNC);
@@ -6977,7 +5187,7 @@ fail:
#ifndef NO_objc_1disposeClassPair
JNIEXPORT void JNICALL OS_NATIVE(objc_1disposeClassPair)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, objc_1disposeClassPair_FUNC);
objc_disposeClassPair((Class)arg0);
@@ -6986,14 +5196,14 @@ JNIEXPORT void JNICALL OS_NATIVE(objc_1disposeClassPair)
#endif
#ifndef NO_objc_1getClass
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1getClass)
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1getClass)
(JNIEnv *env, jclass that, jstring arg0)
{
const char *lparg0= NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1getClass_FUNC);
if (arg0) if ((lparg0 = (*env)->GetStringUTFChars(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)objc_getClass(lparg0);
+ rc = (jlong)objc_getClass(lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseStringUTFChars(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, objc_1getClass_FUNC);
@@ -7002,14 +5212,14 @@ fail:
#endif
#ifndef NO_objc_1getMetaClass
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1getMetaClass)
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1getMetaClass)
(JNIEnv *env, jclass that, jstring arg0)
{
const char *lparg0= NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1getMetaClass_FUNC);
if (arg0) if ((lparg0 = (*env)->GetStringUTFChars(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)objc_getMetaClass(lparg0);
+ rc = (jlong)objc_getMetaClass(lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseStringUTFChars(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, objc_1getMetaClass_FUNC);
@@ -7018,14 +5228,14 @@ fail:
#endif
#ifndef NO_objc_1getProtocol
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1getProtocol)
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1getProtocol)
(JNIEnv *env, jclass that, jstring arg0)
{
const char *lparg0= NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1getProtocol_FUNC);
if (arg0) if ((lparg0 = (*env)->GetStringUTFChars(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)objc_getProtocol(lparg0);
+ rc = (jlong)objc_getProtocol(lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseStringUTFChars(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, objc_1getProtocol_FUNC);
@@ -7034,14 +5244,14 @@ fail:
#endif
#ifndef NO_objc_1lookUpClass
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1lookUpClass)
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1lookUpClass)
(JNIEnv *env, jclass that, jstring arg0)
{
const char *lparg0= NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1lookUpClass_FUNC);
if (arg0) if ((lparg0 = (*env)->GetStringUTFChars(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)objc_lookUpClass(lparg0);
+ rc = (jlong)objc_lookUpClass(lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseStringUTFChars(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, objc_1lookUpClass_FUNC);
@@ -7049,1942 +5259,1013 @@ fail:
}
#endif
-#if (!defined(NO_objc_1msgSend__II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#endif
+#ifndef NO_objc_1msgSend__JJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong))objc_msgSend)(arg0, arg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong))objc_msgSend)(arg0, arg1);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IID) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IID)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJD
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJD)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IID_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJD_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jdouble))objc_msgSend)(arg0, arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IID_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jdouble))objc_msgSend)(arg0, arg1, arg2);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJD_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend__IIDIIIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJDJJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIDIIIZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jintLong arg3, jintLong arg4, jintLong arg5, jboolean arg6)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJDJJJZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jintLong arg3, jintLong arg4, jintLong arg5, jboolean arg6)
-#endif
-{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIDIIIZ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJDJJJZ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jdouble, jintLong, jintLong, jintLong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIDIIIZ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJDJJJZ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#ifndef NO_objc_1msgSend__IIF
-JNIEXPORT jint JNICALL OS_NATIVE(objc_1msgSend__IIF)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIF_FUNC);
- rc = (jint)((jint (*)(jint, jint, jfloat))objc_msgSend)(arg0, arg1, arg2);
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIF_FUNC);
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIFF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJDD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIFF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jfloatDouble arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJDD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jfloatDouble arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJDD
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJDD)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIFF_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJDD_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jfloatDouble, jfloatDouble))objc_msgSend)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIFF_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jdouble, jdouble))objc_msgSend)(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJDD_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIFFFF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJDDDD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIFFFF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jfloatDouble arg3, jfloatDouble arg4, jfloatDouble arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJDDDD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jfloatDouble arg3, jfloatDouble arg4, jfloatDouble arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJDDDD
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJDDDD)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIFFFF_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJDDDD_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jfloatDouble, jfloatDouble, jfloatDouble, jfloatDouble))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIFFFF_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jdouble, jdouble, jdouble, jdouble))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJDDDD_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIFI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJDJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIFI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJDJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDouble arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJDJJJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJDJJJZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jlong arg3, jlong arg4, jlong arg5, jboolean arg6)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIFI_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJDJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jfloatDouble, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIFI_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJDJ_FUNC);
-#endif
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, objc_1msgSend__JJDJJJZ_FUNC);
+ rc = (jlong)((jlong (*)(jlong, jlong, jdouble, jlong, jlong, jlong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+ OS_NATIVE_EXIT(env, that, objc_1msgSend__JJDJJJZ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+#ifndef NO_objc_1msgSend__JJI
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJI)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, objc_1msgSend__JJI_FUNC);
+ rc = (jlong)((jlong (*)(jlong, jlong, jint))objc_msgSend)(arg0, arg1, arg2);
+ OS_NATIVE_EXIT(env, that, objc_1msgSend__JJI_FUNC);
+ return rc;
+}
#endif
+
+#ifndef NO_objc_1msgSend__JJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__III_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__III_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jfloatDouble arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jfloatDouble arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJJD
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJD)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jdouble arg3)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIF_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJD_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jfloatDouble))objc_msgSend)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIF_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jdouble))objc_msgSend)(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJD_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIII_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIDI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJDJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIDI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jdouble arg4, jintLong arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJDJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jdouble arg4, jintLong arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJJJDJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJDJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jdouble arg4, jlong arg5)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIDI_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJDJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jdouble, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIDI_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jdouble, jlong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJDJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIII_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend__IIIIIF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jfloatDouble arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jfloatDouble arg5)
-#endif
-{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIF_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJD_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jfloatDouble))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIF_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJD_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIII_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-#endif
+#ifndef NO_objc_1msgSend__JJJJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIII_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
-#endif
+#ifndef NO_objc_1msgSend__JJJJJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6, jlong arg7)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIIII_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7, jintLong arg8)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7, jintLong arg8)
-#endif
+#ifndef NO_objc_1msgSend__JJJJJJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6, jlong arg7, jlong arg8)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJJJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIIIII_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIIIIZZIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJJZZJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIIIZZIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jboolean arg7, jboolean arg8, jintLong arg9, jintLong arg10, jintLong arg11)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJZZJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jboolean arg7, jboolean arg8, jintLong arg9, jintLong arg10, jintLong arg11)
-#endif
+#ifndef NO_objc_1msgSend__JJJJJJJZZJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJZZJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6, jboolean arg7, jboolean arg8, jlong arg9, jlong arg10, jlong arg11, jlong arg12)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIIIZZIII_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJJJZZJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jboolean, jboolean, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIIIZZIII_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJJJZZJJJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend__IIIIIIIZZIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJJZZJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIIIZZIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jboolean arg7, jboolean arg8, jintLong arg9, jintLong arg10, jintLong arg11, jintLong arg12)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJZZJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jboolean arg7, jboolean arg8, jintLong arg9, jintLong arg10, jintLong arg11, jintLong arg12)
-#endif
-{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIIIZZIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJJJZZJJJJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jboolean, jboolean, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIIIZZIIII_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jboolean, jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJJJZZJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJJJJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJJZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jboolean arg5)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJZ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIZ_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jlong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIILorg_eclipse_swt_internal_cocoa_NSRange_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIILorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jobject arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jobject arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jobject arg4)
{
NSRange _arg4, *lparg4=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
if (arg4) if ((lparg4 = getNSRangeFields(env, arg4, &_arg4)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, NSRange))objc_msgSend)(arg0, arg1, arg2, arg3, *lparg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, NSRange))objc_msgSend)(arg0, arg1, arg2, arg3, *lparg4);
fail:
if (arg4 && lparg4) setNSRangeFields(env, arg4, lparg4);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jboolean arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jboolean arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJJJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJJZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jboolean arg4)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJZ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3, arg4);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIZ_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jlong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3, arg4);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3)
{
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, NSPoint))objc_msgSend)(arg0, arg1, arg2, *lparg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, NSPoint))objc_msgSend)(arg0, arg1, arg2, *lparg3);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, NSPoint, jintLong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, NSPoint, jlong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4, jdouble arg5, jintLong arg6, jintLong arg7, jintLong arg8, jintLong arg9, jintLong arg10)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4, jdouble arg5, jintLong arg6, jintLong arg7, jintLong arg8, jintLong arg9, jintLong arg10)
-#endif
+#ifndef NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4, jdouble arg5, jlong arg6, jlong arg7, jlong arg8, jlong arg9, jlong arg10)
{
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, NSPoint, jintLong, jdouble, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, NSPoint, jlong, jdouble, jlong, jlong, jlong, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIIIII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIISII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIISII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4, jdouble arg5, jintLong arg6, jintLong arg7, jshort arg8, jintLong arg9, jintLong arg10)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4, jdouble arg5, jintLong arg6, jintLong arg7, jshort arg8, jintLong arg9, jintLong arg10)
-#endif
+#ifndef NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4, jdouble arg5, jlong arg6, jlong arg7, jshort arg8, jlong arg9, jlong arg10)
{
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIISII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, NSPoint, jintLong, jdouble, jintLong, jintLong, jshort, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, NSPoint, jlong, jdouble, jlong, jlong, jshort, jlong, jlong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIISII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2IIIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2IIIZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jobject arg4, jintLong arg5, jintLong arg6, jintLong arg7, jboolean arg8)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jobject arg4, jintLong arg5, jintLong arg6, jintLong arg7, jboolean arg8)
-#endif
+#ifndef NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3, jobject arg4, jlong arg5, jlong arg6, jlong arg7, jboolean arg8)
{
NSPoint _arg3, *lparg3=NULL;
NSSize _arg4, *lparg4=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2IIIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
if (arg4) if ((lparg4 = getNSSizeFields(env, arg4, &_arg4)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, NSPoint, NSSize, jintLong, jintLong, jintLong, jboolean))objc_msgSend)(arg0, arg1, arg2, *lparg3, *lparg4, arg5, arg6, arg7, arg8);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, NSPoint, NSSize, jlong, jlong, jlong, jboolean))objc_msgSend)(arg0, arg1, arg2, *lparg3, *lparg4, arg5, arg6, arg7, arg8);
fail:
if (arg4 && lparg4) setNSSizeFields(env, arg4, lparg4);
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2IIIZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRange_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3)
{
NSRange _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSRangeFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, NSRange))objc_msgSend)(arg0, arg1, arg2, *lparg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, NSRange))objc_msgSend)(arg0, arg1, arg2, *lparg3);
fail:
if (arg3 && lparg3) setNSRangeFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSRect _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, NSRect, jintLong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, NSRect, jlong))objc_msgSend)(arg0, arg1, arg2, *lparg3, arg4);
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jboolean arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jboolean arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJJZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJZ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIZ_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, jboolean))objc_msgSend)(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
NSAffineTransformStruct _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSAffineTransformStructFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSAffineTransformStruct))objc_msgSend)(arg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSAffineTransformStruct))objc_msgSend)(arg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSAffineTransformStructFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
NSPoint _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint))objc_msgSend)(arg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSPoint))objc_msgSend)(arg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3, jfloatDouble arg4, jfloatDouble arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3, jfloatDouble arg4, jfloatDouble arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jdouble arg3, jdouble arg4, jdouble arg5, jboolean arg6)
{
NSPoint _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFF_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDD_FUNC);
-#endif
- if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint, jfloatDouble, jfloatDouble, jfloatDouble))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5);
-fail:
- if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFF_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDD_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFFZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFFZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3, jfloatDouble arg4, jfloatDouble arg5, jboolean arg6)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3, jfloatDouble arg4, jfloatDouble arg5, jboolean arg6)
-#endif
-{
- NSPoint _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFFZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint, jfloatDouble, jfloatDouble, jfloatDouble, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSPoint, jdouble, jdouble, jdouble, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6);
fail:
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFFZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3)
{
NSPoint _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSPoint, jlong))objc_msgSend)(arg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_3F) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_3F)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jfloatDoubleArray arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jfloatDoubleArray arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3, jdoubleArray arg4)
{
NSPoint _arg2, *lparg2=NULL;
- jfloatDouble *lparg4=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_3F_FUNC);
-#else
+ jdouble *lparg4=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetFloatDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint, jintLong, jfloatDouble *))objc_msgSend)(arg0, arg1, *lparg2, arg3, lparg4);
+ if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ rc = (jlong)((jlong (*)(jlong, jlong, NSPoint, jlong, jdouble *))objc_msgSend)(arg0, arg1, *lparg2, arg3, lparg4);
fail:
- if (arg4 && lparg4) (*env)->ReleaseFloatDoubleArrayElements(env, arg4, lparg4, 0);
+ if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_3F_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3, jlong arg4)
{
NSPoint _arg2, *lparg2=NULL;
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint, NSPoint, jintLong))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSPoint, NSPoint, jlong))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jobject arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jobject arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3, jobject arg4)
{
NSPoint _arg2, *lparg2=NULL;
NSPoint _arg3, *lparg3=NULL;
NSPoint _arg4, *lparg4=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
if (arg4) if ((lparg4 = getNSPointFields(env, arg4, &_arg4)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint, NSPoint, NSPoint))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, *lparg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSPoint, NSPoint, NSPoint))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, *lparg4);
fail:
if (arg4 && lparg4) setNSPointFields(env, arg4, lparg4);
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jfloatDouble arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jfloatDouble arg5)
-#endif
-{
- NSPoint _arg2, *lparg2=NULL;
- NSRect _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD_FUNC);
-#endif
- if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSPoint, NSRect, jintLong, jfloatDouble))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4, arg5);
-fail:
- if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
- if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
NSRange _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange))objc_msgSend)(arg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRange))objc_msgSend)(arg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3)
{
NSRange _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRange, jlong))objc_msgSend)(arg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jbyteArray arg7)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jbyteArray arg7)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6, jbyteArray arg7)
{
NSRange _arg2, *lparg2=NULL;
jbyte *lparg7=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg7) if ((lparg7 = (*env)->GetByteArrayElements(env, arg7, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, jintLong, jintLong, jintLong, jintLong, jbyte *))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6, lparg7);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRange, jlong, jlong, jlong, jlong, jbyte *))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6, lparg7);
fail:
if (arg7 && lparg7) (*env)->ReleaseByteArrayElements(env, arg7, lparg7, 0);
if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3)
{
NSRange _arg2, *lparg2=NULL;
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, NSPoint))objc_msgSend)(arg0, arg1, *lparg2, *lparg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRange, NSPoint))objc_msgSend)(arg0, arg1, *lparg2, *lparg3);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jintLongArray arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jintLongArray arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3, jlong arg4, jlongArray arg5)
{
NSRange _arg2, *lparg2=NULL;
NSRange _arg3, *lparg3=NULL;
- jintLong *lparg5=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I_FUNC);
-#else
+ jlong *lparg5=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRangeFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, NSRange, jintLong, jintLong *))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4, lparg5);
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRange, NSRange, jlong, jlong *))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4, lparg5);
fail:
- if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
if (arg3 && lparg3) setNSRangeFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect))objc_msgSend)(arg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect))objc_msgSend)(arg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2F) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2F)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jdouble arg3)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2F_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jfloatDouble))objc_msgSend)(arg0, arg1, *lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jdouble))objc_msgSend)(arg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2F_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2FF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2FF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3, jfloatDouble arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jfloatDouble arg3, jfloatDouble arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jdouble arg3, jdouble arg4)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2FF_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jfloatDouble, jfloatDouble))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jdouble, jdouble))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2FF_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jlong))objc_msgSend)(arg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3, jlong arg4)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jintLong, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jlong, jlong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#endif
-{
- NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2III_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJJ_FUNC);
-#endif
- if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5);
-fail:
- if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2III_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3, jlong arg4, jboolean arg5)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jintLong, jintLong, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jlong, jlong, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jboolean arg5, jintLong arg6)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jboolean arg5, jintLong arg6)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3, jlong arg4, jboolean arg5, jlong arg6)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZI_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jintLong, jintLong, jboolean, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jlong, jlong, jboolean, jlong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IZI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jboolean arg4, jintLong arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jboolean arg4, jintLong arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3, jboolean arg4, jlong arg5)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IZI_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jintLong, jboolean, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jlong, jboolean, jlong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IZI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3)
{
NSRect _arg2, *lparg2=NULL;
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, NSPoint))objc_msgSend)(arg0, arg1, *lparg2, *lparg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, NSPoint))objc_msgSend)(arg0, arg1, *lparg2, *lparg3);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jobject arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jobject arg4)
-#endif
-{
- NSRect _arg2, *lparg2=NULL;
- NSRange _arg3, *lparg3=NULL;
- NSRect _arg4, *lparg4=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
- if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = getNSRangeFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = getNSRectFields(env, arg4, &_arg4)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, NSRange, NSRect))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, *lparg4);
-fail:
- if (arg4 && lparg4) setNSRectFields(env, arg4, lparg4);
- if (arg3 && lparg3) setNSRangeFields(env, arg3, lparg3);
- if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jfloatDouble arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jfloatDouble arg5)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3, jlong arg4, jdouble arg5)
{
NSRect _arg2, *lparg2=NULL;
NSRect _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, NSRect, jintLong, jfloatDouble))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4, arg5);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, NSRect, jlong, jdouble))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4, arg5);
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3)
{
NSRect _arg2, *lparg2=NULL;
NSSize _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSSizeFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, NSSize))objc_msgSend)(arg0, arg1, *lparg2, *lparg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, NSSize))objc_msgSend)(arg0, arg1, *lparg2, *lparg3);
fail:
if (arg3 && lparg3) setNSSizeFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Z) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Z)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jboolean arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jboolean arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jboolean arg3)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Z_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Z_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2ZZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2ZZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jboolean arg3, jboolean arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jboolean arg3, jboolean arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jboolean arg3, jboolean arg4)
{
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2ZZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRect, jboolean, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSRect, jboolean, jboolean))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2ZZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
NSSize _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSSizeFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSSize))objc_msgSend)(arg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(jlong, jlong, NSSize))objc_msgSend)(arg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSSizeFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJZ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJZ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJZ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jboolean))objc_msgSend)(arg0, arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIZ_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jboolean))objc_msgSend)(arg0, arg1, arg2);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIZI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJZJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJZJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJZJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJZJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2, jlong arg3)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIZI_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJZJ_FUNC);
-#endif
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jboolean, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIZI_FUNC);
-#else
+ rc = (jlong)((jlong (*)(jlong, jlong, jboolean, jlong))objc_msgSend)(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJZJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2, jobject arg3)
{
NSRect _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jboolean, NSRect))objc_msgSend)(arg0, arg1, arg2, *lparg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, jboolean, NSRect))objc_msgSend)(arg0, arg1, arg2, *lparg3);
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3B) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3B) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3B)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3B)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3B
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3B)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2)
{
jbyte *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3B_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3B_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jbyte *))objc_msgSend)(arg0, arg1, lparg2);
+ rc = (jlong)((jlong (*)(jlong, jlong, jbyte *))objc_msgSend)(arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3B_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3B_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3BI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3BJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3BJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3BJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3BJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2, jlong arg3)
{
jbyte *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3BI_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3BJ_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jbyte *, jintLong))objc_msgSend)(arg0, arg1, lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, jbyte *, jlong))objc_msgSend)(arg0, arg1, lparg2, arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3BI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3BJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3C) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3C) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3C)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3C)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3C
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3C)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jcharArray arg2)
{
jchar *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3C_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3C_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jchar *))objc_msgSend)(arg0, arg1, lparg2);
+ rc = (jlong)((jlong (*)(jlong, jlong, jchar *))objc_msgSend)(arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3C_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3C_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3CI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3CJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3CI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3CJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3CJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3CJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jcharArray arg2, jlong arg3)
{
jchar *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3CI_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3CJ_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jchar *, jintLong))objc_msgSend)(arg0, arg1, lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, jchar *, jlong))objc_msgSend)(arg0, arg1, lparg2, arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3CI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3CJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3CLorg_eclipse_swt_internal_cocoa_NSRange_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3CLorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jcharArray arg2, jobject arg3)
{
jchar *lparg2=NULL;
NSRange _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3CLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRangeFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jchar *, NSRange))objc_msgSend)(arg0, arg1, lparg2, *lparg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, jchar *, NSRange))objc_msgSend)(arg0, arg1, lparg2, *lparg3);
fail:
if (arg3 && lparg3) setNSRangeFields(env, arg3, lparg3);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3CLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3F) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3D) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3F)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDoubleArray arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3D)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDoubleArray arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3D
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3D)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdoubleArray arg2)
{
- jfloatDouble *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3F_FUNC);
-#else
+ jdouble *lparg2=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3D_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetFloatDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jfloatDouble *))objc_msgSend)(arg0, arg1, lparg2);
+ if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jlong)((jlong (*)(jlong, jlong, jdouble *))objc_msgSend)(arg0, arg1, lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseFloatDoubleArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3F_FUNC);
-#else
+ if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3D_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3FIF) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3DJD) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3FIF)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDoubleArray arg2, jintLong arg3, jfloatDouble arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3DJD)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloatDoubleArray arg2, jintLong arg3, jfloatDouble arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3DJD
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3DJD)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdoubleArray arg2, jlong arg3, jdouble arg4)
{
- jfloatDouble *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3FIF_FUNC);
-#else
+ jdouble *lparg2=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3DJD_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetFloatDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jfloatDouble *, jintLong, jfloatDouble))objc_msgSend)(arg0, arg1, lparg2, arg3, arg4);
+ if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jlong)((jlong (*)(jlong, jlong, jdouble *, jlong, jdouble))objc_msgSend)(arg0, arg1, lparg2, arg3, arg4);
fail:
- if (arg2 && lparg2) (*env)->ReleaseFloatDoubleArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3FIF_FUNC);
-#else
+ if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3DJD_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3I
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3I)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2)
{
- jintLong *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3J_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong *))objc_msgSend)(arg0, arg1, lparg2);
+ jint *lparg2=NULL;
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3I_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jlong)((jlong (*)(jlong, jlong, jint *))objc_msgSend)(arg0, arg1, lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3J_FUNC);
-#endif
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3I_FUNC);
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3IJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3IJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3IJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3IJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jlong arg3)
{
jint *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3II_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3IJ_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jint *, jintLong))objc_msgSend)(arg0, arg1, lparg2, arg3);
+ rc = (jlong)((jlong (*)(jlong, jlong, jint *, jlong))objc_msgSend)(arg0, arg1, lparg2, arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3IJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend__II_3III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3JII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jint arg3, jint arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3JII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jint arg3, jint arg4)
-#endif
+#ifndef NO_objc_1msgSend__JJ_3JII
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3JII)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2, jint arg3, jint arg4)
{
- jintLong *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3III_FUNC);
-#else
+ jlong *lparg2=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3JII_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong *, jint, jint))objc_msgSend)(arg0, arg1, lparg2, arg3, arg4);
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong *, jint, jint))objc_msgSend)(arg0, arg1, lparg2, arg3, arg4);
fail:
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3III_FUNC);
-#else
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3JII_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#ifndef NO_objc_1msgSend__JJI
-JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJI)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJI_FUNC);
- rc = (jlong)((jlong (*)(jlong, jlong, jint))objc_msgSend)(arg0, arg1, arg2);
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJI_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_objc_1msgSend__JJ_3I
-JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSend__JJ_3I)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3I_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jlong)((jlong (*)(jlong, jlong, jint *))objc_msgSend)(arg0, arg1, lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3I_FUNC);
return rc;
}
#endif
@@ -9005,1972 +6286,1219 @@ fail:
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
{
struct objc_super _arg0, *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong))objc_msgSendSuper)(lparg0, arg1);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong))objc_msgSendSuper)(lparg0, arg1);
fail:
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
struct objc_super _arg0, *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2II_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong))objc_msgSendSuper)(lparg0, arg1, arg2);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong))objc_msgSendSuper)(lparg0, arg1, arg2);
fail:
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2III) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2III)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3)
{
struct objc_super _arg0, *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2III_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, jintLong))objc_msgSendSuper)(lparg0, arg1, arg2, arg3);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong, jlong))objc_msgSendSuper)(lparg0, arg1, arg2, arg3);
fail:
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIII)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5)
{
struct objc_super _arg0, *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSendSuper)(lparg0, arg1, arg2, arg3, arg4, arg5);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong, jlong, jlong, jlong))objc_msgSendSuper)(lparg0, arg1, arg2, arg3, arg4, arg5);
fail:
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIIZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jboolean arg5)
{
struct objc_super _arg0, *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, jintLong, jintLong, jboolean))objc_msgSendSuper)(lparg0, arg1, arg2, arg3, arg4, arg5);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong, jlong, jlong, jboolean))objc_msgSendSuper)(lparg0, arg1, arg2, arg3, arg4, arg5);
fail:
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIIZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3)
{
struct objc_super _arg0, *lparg0=NULL;
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, NSPoint))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong, NSPoint))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
struct objc_super _arg0, *lparg0=NULL;
NSPoint _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, NSPoint, jintLong))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3, arg4);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong, NSPoint, jlong))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3, arg4);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
struct objc_super _arg0, *lparg0=NULL;
NSRect _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, NSRect, jintLong))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3, arg4);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong, NSRect, jlong))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3, arg4);
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jboolean arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jboolean arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jboolean arg3)
{
struct objc_super _arg0, *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, jboolean))objc_msgSendSuper)(lparg0, arg1, arg2, arg3);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jlong, jboolean))objc_msgSendSuper)(lparg0, arg1, arg2, arg3);
fail:
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jobject arg2)
{
struct objc_super _arg0, *lparg0=NULL;
NSPoint _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, NSPoint))objc_msgSendSuper)(lparg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, NSPoint))objc_msgSendSuper)(lparg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jobject arg2)
{
struct objc_super _arg0, *lparg0=NULL;
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, NSRect))objc_msgSendSuper)(lparg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, NSRect))objc_msgSendSuper)(lparg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jobject arg2, jlong arg3)
{
struct objc_super _arg0, *lparg0=NULL;
NSRect _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, NSRect, jintLong))objc_msgSendSuper)(lparg0, arg1, *lparg2, arg3);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, NSRect, jlong))objc_msgSendSuper)(lparg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSSize_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jobject arg2)
{
struct objc_super _arg0, *lparg0=NULL;
NSSize _arg2, *lparg2=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg2) if ((lparg2 = getNSSizeFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, NSSize))objc_msgSendSuper)(lparg0, arg1, *lparg2);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, NSSize))objc_msgSendSuper)(lparg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSSizeFields(env, arg2, lparg2);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jboolean arg2)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jboolean arg2)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jboolean arg2)
{
struct objc_super _arg0, *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jboolean))objc_msgSendSuper)(lparg0, arg1, arg2);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jboolean))objc_msgSendSuper)(lparg0, arg1, arg2);
fail:
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jboolean arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jboolean arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT jlong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jboolean arg2, jobject arg3)
{
struct objc_super _arg0, *lparg0=NULL;
NSRect _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jboolean, NSRect))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3);
+ rc = (jlong)((jlong (*)(struct objc_super *, jlong, jboolean, NSRect))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3);
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3)
{
struct objc_super _arg0, *lparg0=NULL;
NSPoint _arg3, *lparg3=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jboolean)((jboolean (*)(struct objc_super *, jintLong, jintLong, NSPoint))objc_msgSendSuper_bool)(lparg0, arg1, arg2, *lparg3);
+ rc = (jboolean)((jboolean (*)(struct objc_super *, jlong, jlong, NSPoint))objc_msgSendSuper_bool)(lparg0, arg1, arg2, *lparg3);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRange_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRange_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jobject arg2, jlong arg3)
{
struct objc_super _arg0, *lparg0=NULL;
NSRange _arg2, *lparg2=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jboolean)((jboolean (*)(struct objc_super *, jintLong, NSRange, jintLong))objc_msgSendSuper_bool)(lparg0, arg1, *lparg2, arg3);
+ rc = (jboolean)((jboolean (*)(struct objc_super *, jlong, NSRange, jlong))objc_msgSendSuper_bool)(lparg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2II)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jlong arg2, jlong arg3)
{
NSRect _arg0, *lparg0=NULL;
struct objc_super _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, struct objc_super *, jintLong, jintLong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, arg3);
+ ((void (*)(NSRect *, struct objc_super *, jlong, jlong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, arg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, jintLong))objc_msgSendSuper_stret)(lparg1, arg2, arg3);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, jlong))objc_msgSendSuper_stret)(lparg1, arg2, arg3);
} else {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, jintLong))objc_msgSendSuper)(lparg1, arg2, arg3);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, jlong))objc_msgSendSuper)(lparg1, arg2, arg3);
}
fail:
if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jintLong arg3, jobject arg4, jintLong arg5)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jintLong arg3, jobject arg4, jintLong arg5)
-#endif
+#ifndef NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jlong arg2, jlong arg3, jobject arg4, jlong arg5)
{
NSRect _arg0, *lparg0=NULL;
struct objc_super _arg1, *lparg1=NULL;
NSRect _arg4, *lparg4=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg4) if ((lparg4 = getNSRectFields(env, arg4, &_arg4)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, struct objc_super *, jintLong, jintLong, NSRect, jintLong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, arg3, *lparg4, arg5);
+ ((void (*)(NSRect *, struct objc_super *, jlong, jlong, NSRect, jlong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, arg3, *lparg4, arg5);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, jintLong, NSRect, jintLong))objc_msgSendSuper_stret)(lparg1, arg2, arg3, *lparg4, arg5);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, jlong, NSRect, jlong))objc_msgSendSuper_stret)(lparg1, arg2, arg3, *lparg4, arg5);
} else {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, jintLong, NSRect, jintLong))objc_msgSendSuper)(lparg1, arg2, arg3, *lparg4, arg5);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, jlong, NSRect, jlong))objc_msgSendSuper)(lparg1, arg2, arg3, *lparg4, arg5);
}
fail:
if (arg4 && lparg4) setNSRectFields(env, arg4, lparg4);
if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jlong arg2, jobject arg3)
{
NSRect _arg0, *lparg0=NULL;
struct objc_super _arg1, *lparg1=NULL;
NSRect _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, struct objc_super *, jintLong, NSRect))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, *lparg3);
+ ((void (*)(NSRect *, struct objc_super *, jlong, NSRect))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, *lparg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, NSRect))objc_msgSendSuper_stret)(lparg1, arg2, *lparg3);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, NSRect))objc_msgSendSuper_stret)(lparg1, arg2, *lparg3);
} else {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, NSRect))objc_msgSendSuper)(lparg1, arg2, *lparg3);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, NSRect))objc_msgSendSuper)(lparg1, arg2, *lparg3);
}
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSRect _arg0, *lparg0=NULL;
struct objc_super _arg1, *lparg1=NULL;
NSRect _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, struct objc_super *, jintLong, NSRect, jintLong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, *lparg3, arg4);
+ ((void (*)(NSRect *, struct objc_super *, jlong, NSRect, jlong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, *lparg3, arg4);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, NSRect, jintLong))objc_msgSendSuper_stret)(lparg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, NSRect, jlong))objc_msgSendSuper_stret)(lparg1, arg2, *lparg3, arg4);
} else {
- *lparg0 = (*(NSRect (*)(struct objc_super *, jintLong, NSRect, jintLong))objc_msgSendSuper)(lparg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(struct objc_super *, jlong, NSRect, jlong))objc_msgSendSuper)(lparg1, arg2, *lparg3, arg4);
}
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2I)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jlong arg2)
{
NSSize _arg0, *lparg0=NULL;
struct objc_super _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, struct objc_super *, jintLong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2);
+ ((void (*)(NSSize *, struct objc_super *, jlong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(struct objc_super *, jintLong))objc_msgSendSuper_stret)(lparg1, arg2);
+ *lparg0 = (*(NSSize (*)(struct objc_super *, jlong))objc_msgSendSuper_stret)(lparg1, arg2);
} else {
- *lparg0 = (*(NSSize (*)(struct objc_super *, jintLong))objc_msgSendSuper)(lparg1, arg2);
+ *lparg0 = (*(NSSize (*)(struct objc_super *, jlong))objc_msgSendSuper)(lparg1, arg2);
}
fail:
if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jlong arg2, jobject arg3)
{
NSSize _arg0, *lparg0=NULL;
struct objc_super _arg1, *lparg1=NULL;
NSRect _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, struct objc_super *, jintLong, NSRect))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, *lparg3);
+ ((void (*)(NSSize *, struct objc_super *, jlong, NSRect))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, *lparg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(struct objc_super *, jintLong, NSRect))objc_msgSendSuper_stret)(lparg1, arg2, *lparg3);
+ *lparg0 = (*(NSSize (*)(struct objc_super *, jlong, NSRect))objc_msgSendSuper_stret)(lparg1, arg2, *lparg3);
} else {
- *lparg0 = (*(NSSize (*)(struct objc_super *, jintLong, NSRect))objc_msgSendSuper)(lparg1, arg2, *lparg3);
+ *lparg0 = (*(NSSize (*)(struct objc_super *, jlong, NSRect))objc_msgSendSuper)(lparg1, arg2, *lparg3);
}
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jboolean arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jboolean arg3)
-#endif
+#ifndef NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jlong arg2, jboolean arg3)
{
NSSize _arg0, *lparg0=NULL;
struct objc_super _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, struct objc_super *, jintLong, jboolean))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, arg3);
+ ((void (*)(NSSize *, struct objc_super *, jlong, jboolean))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, arg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(struct objc_super *, jintLong, jboolean))objc_msgSendSuper_stret)(lparg1, arg2, arg3);
+ *lparg0 = (*(NSSize (*)(struct objc_super *, jlong, jboolean))objc_msgSendSuper_stret)(lparg1, arg2, arg3);
} else {
- *lparg0 = (*(NSSize (*)(struct objc_super *, jintLong, jboolean))objc_msgSendSuper)(lparg1, arg2, arg3);
+ *lparg0 = (*(NSSize (*)(struct objc_super *, jlong, jboolean))objc_msgSendSuper)(lparg1, arg2, arg3);
}
fail:
if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJ
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJ_FUNC);
-#endif
- rc = (jboolean)((BOOL (*)(jintLong, jintLong))objc_msgSend_bool)(arg0, arg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__II_FUNC);
-#else
+ rc = (jboolean)((BOOL (*)(jlong, jlong))objc_msgSend_bool)(arg0, arg1);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJJ
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJ_FUNC);
-#endif
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong))objc_msgSend_bool)(arg0, arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__III_FUNC);
-#else
+ rc = (jboolean)((BOOL (*)(jlong, jlong, jlong))objc_msgSend_bool)(arg0, arg1, arg2);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJJJ
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJJ_FUNC);
-#endif
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong, jintLong))objc_msgSend_bool)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIII_FUNC);
-#else
+ rc = (jboolean)((BOOL (*)(jlong, jlong, jlong, jlong))objc_msgSend_bool)(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJJJJ
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIIII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJJJ_FUNC);
-#endif
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend_bool)(arg0, arg1, arg2, arg3, arg4);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIIII_FUNC);
-#else
+ rc = (jboolean)((BOOL (*)(jlong, jlong, jlong, jlong, jlong))objc_msgSend_bool)(arg0, arg1, arg2, arg3, arg4);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJJJJJ
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5)
{
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIIIII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJJJJ_FUNC);
-#endif
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend_bool)(arg0, arg1, arg2, arg3, arg4, arg5);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIIIII_FUNC);
-#else
+ rc = (jboolean)((BOOL (*)(jlong, jlong, jlong, jlong, jlong, jlong))objc_msgSend_bool)(arg0, arg1, arg2, arg3, arg4, arg5);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IIIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJJJJJJ
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6)
{
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIIIIII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJJJJJ_FUNC);
-#endif
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend_bool)(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIIIIII_FUNC);
-#else
+ rc = (jboolean)((BOOL (*)(jlong, jlong, jlong, jlong, jlong, jlong, jlong))objc_msgSend_bool)(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJJJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3)
{
NSPoint _arg3, *lparg3=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong, NSPoint))objc_msgSend_bool)(arg0, arg1, arg2, *lparg3);
+ rc = (jboolean)((BOOL (*)(jlong, jlong, jlong, NSPoint))objc_msgSend_bool)(arg0, arg1, arg2, *lparg3);
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSSize_2Z) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSSize_2Z)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jboolean arg4)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jobject arg3, jboolean arg4)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3, jboolean arg4)
{
NSSize _arg3, *lparg3=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSSize_2Z_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z_FUNC);
-#endif
if (arg3) if ((lparg3 = getNSSizeFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong, NSSize, jboolean))objc_msgSend_bool)(arg0, arg1, arg2, *lparg3, arg4);
+ rc = (jboolean)((BOOL (*)(jlong, jlong, jlong, NSSize, jboolean))objc_msgSend_bool)(arg0, arg1, arg2, *lparg3, arg4);
fail:
if (arg3 && lparg3) setNSSizeFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSSize_2Z_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
NSPoint _arg2, *lparg2=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, NSPoint))objc_msgSend_bool)(arg0, arg1, *lparg2);
+ rc = (jboolean)((BOOL (*)(jlong, jlong, NSPoint))objc_msgSend_bool)(arg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3)
{
NSPoint _arg2, *lparg2=NULL;
NSRect _arg3, *lparg3=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSPointFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, NSPoint, NSRect))objc_msgSend_bool)(arg0, arg1, *lparg2, *lparg3);
+ rc = (jboolean)((BOOL (*)(jlong, jlong, NSPoint, NSRect))objc_msgSend_bool)(arg0, arg1, *lparg2, *lparg3);
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg2 && lparg2) setNSPointFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRange_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRange_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3)
{
NSRange _arg2, *lparg2=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, NSRange, jintLong))objc_msgSend_bool)(arg0, arg1, *lparg2, arg3);
+ rc = (jboolean)((BOOL (*)(jlong, jlong, NSRange, jlong))objc_msgSend_bool)(arg0, arg1, *lparg2, arg3);
fail:
if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
NSRect _arg2, *lparg2=NULL;
jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getNSRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, NSRect))objc_msgSend_bool)(arg0, arg1, *lparg2);
+ rc = (jboolean)((BOOL (*)(jlong, jlong, NSRect))objc_msgSend_bool)(arg0, arg1, *lparg2);
fail:
if (arg2 && lparg2) setNSRectFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend_1bool__IIS) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJS) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIS)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jshort arg2)
-#else
-JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJS)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jshort arg2)
-#endif
-{
- jboolean rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIS_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJS_FUNC);
-#endif
- rc = (jboolean)((BOOL (*)(jintLong, jintLong, jshort))objc_msgSend_bool)(arg0, arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIS_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJS_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_objc_1msgSend_1floatret
JNIEXPORT jfloat JNICALL OS_NATIVE(objc_1msgSend_1floatret)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jfloat rc = 0;
OS_NATIVE_ENTER(env, that, objc_1msgSend_1floatret_FUNC);
- rc = (jfloat)((jfloat (*)(jintLong, jintLong))objc_msgSend_floatret)(arg0, arg1);
+ rc = (jfloat)((jfloat (*)(jlong, jlong))objc_msgSend_floatret)(arg0, arg1);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1floatret_FUNC);
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1fpret__II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1fpret__JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#else
-JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#endif
+#ifndef NO_objc_1msgSend_1fpret__JJ
+JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jdouble rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1fpret__II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1fpret__JJ_FUNC);
-#endif
- rc = (jdouble)((jdouble (*)(jintLong, jintLong))objc_msgSend_fpret)(arg0, arg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1fpret__II_FUNC);
-#else
+ rc = (jdouble)((jdouble (*)(jlong, jlong))objc_msgSend_fpret)(arg0, arg1);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1fpret__JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1fpret__III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1fpret__JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__JJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSend_1fpret__JJJ
+JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__JJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jdouble rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1fpret__III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1fpret__JJJ_FUNC);
-#endif
- rc = (jdouble)((jdouble (*)(jintLong, jintLong, jintLong))objc_msgSend_fpret)(arg0, arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1fpret__III_FUNC);
-#else
+ rc = (jdouble)((jdouble (*)(jlong, jlong, jlong))objc_msgSend_fpret)(arg0, arg1, arg2);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1fpret__JJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1fpret__IIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1fpret__JJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__IIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__JJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend_1fpret__JJJJ
+JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__JJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
jdouble rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1fpret__IIII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1fpret__JJJJ_FUNC);
-#endif
- rc = (jdouble)((jdouble (*)(jintLong, jintLong, jintLong, jintLong))objc_msgSend_fpret)(arg0, arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1fpret__IIII_FUNC);
-#else
+ rc = (jdouble)((jdouble (*)(jlong, jlong, jlong, jlong))objc_msgSend_fpret)(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, objc_1msgSend_1fpret__JJJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSAffineTransformStruct _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSAffineTransformStructFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSAffineTransformStruct *, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2);
+ ((void (*)(NSAffineTransformStruct *, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSAffineTransformStruct (*)(jintLong, jintLong))objc_msgSend_stret)(arg1, arg2);
+ *lparg0 = (*(NSAffineTransformStruct (*)(jlong, jlong))objc_msgSend_stret)(arg1, arg2);
} else {
- *lparg0 = (*(NSAffineTransformStruct (*)(jintLong, jintLong))objc_msgSend)(arg1, arg2);
+ *lparg0 = (*(NSAffineTransformStruct (*)(jlong, jlong))objc_msgSend)(arg1, arg2);
}
fail:
if (arg0 && lparg0) setNSAffineTransformStructFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSOperatingSystemVersion_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSOperatingSystemVersion_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ NSOperatingSystemVersion _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSOperatingSystemVersion_2JJ_FUNC);
+ if (arg0) if ((lparg0 = getNSOperatingSystemVersionFields(env, arg0, &_arg0)) == NULL) goto fail;
+ if (STRUCT_SIZE_LIMIT == 0) {
+ ((void (*)(NSOperatingSystemVersion *, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2);
+ } else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
+ *lparg0 = (*(NSOperatingSystemVersion (*)(jlong, jlong))objc_msgSend_stret)(arg1, arg2);
+ } else {
+ *lparg0 = (*(NSOperatingSystemVersion (*)(jlong, jlong))objc_msgSend)(arg1, arg2);
+ }
+fail:
+ if (arg0 && lparg0) setNSOperatingSystemVersionFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSOperatingSystemVersion_2JJ_FUNC);
+}
#endif
+
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSPoint _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSPointFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSPoint *, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2);
+ ((void (*)(NSPoint *, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong))objc_msgSend_stret)(arg1, arg2);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong))objc_msgSend_stret)(arg1, arg2);
} else {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong))objc_msgSend)(arg1, arg2);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong))objc_msgSend)(arg1, arg2);
}
fail:
if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3)
{
NSPoint _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSPointFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSPoint *, jintLong, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
+ ((void (*)(NSPoint *, jlong, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong, jintLong))objc_msgSend_stret)(arg1, arg2, arg3);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong, jlong))objc_msgSend_stret)(arg1, arg2, arg3);
} else {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong, jintLong))objc_msgSend)(arg1, arg2, arg3);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong, jlong))objc_msgSend)(arg1, arg2, arg3);
}
fail:
if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3)
{
NSPoint _arg0, *lparg0=NULL;
NSPoint _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSPointFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSPoint *, jintLong, jintLong, NSPoint))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
+ ((void (*)(NSPoint *, jlong, jlong, NSPoint))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong, NSPoint))objc_msgSend_stret)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong, NSPoint))objc_msgSend_stret)(arg1, arg2, *lparg3);
} else {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong, NSPoint))objc_msgSend)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong, NSPoint))objc_msgSend)(arg1, arg2, *lparg3);
}
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSPoint _arg0, *lparg0=NULL;
NSPoint _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSPointFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSPoint *, jintLong, jintLong, NSPoint, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
+ ((void (*)(NSPoint *, jlong, jlong, NSPoint, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong, NSPoint, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong, NSPoint, jlong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
} else {
- *lparg0 = (*(NSPoint (*)(jintLong, jintLong, NSPoint, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSPoint (*)(jlong, jlong, NSPoint, jlong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
}
fail:
if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSRange _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRangeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRange *, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2);
+ ((void (*)(NSRange *, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong))objc_msgSend_stret)(arg1, arg2);
+ *lparg0 = (*(NSRange (*)(jlong, jlong))objc_msgSend_stret)(arg1, arg2);
} else {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong))objc_msgSend)(arg1, arg2);
+ *lparg0 = (*(NSRange (*)(jlong, jlong))objc_msgSend)(arg1, arg2);
}
fail:
if (arg0 && lparg0) setNSRangeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2III)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3)
{
NSRange _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRangeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRange *, jintLong, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
+ ((void (*)(NSRange *, jlong, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong, jintLong))objc_msgSend_stret)(arg1, arg2, arg3);
+ *lparg0 = (*(NSRange (*)(jlong, jlong, jlong))objc_msgSend_stret)(arg1, arg2, arg3);
} else {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong, jintLong))objc_msgSend)(arg1, arg2, arg3);
+ *lparg0 = (*(NSRange (*)(jlong, jlong, jlong))objc_msgSend)(arg1, arg2, arg3);
}
fail:
if (arg0 && lparg0) setNSRangeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSRange _arg0, *lparg0=NULL;
NSRange _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRangeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRangeFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRange *, jintLong, jintLong, NSRange, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
+ ((void (*)(NSRange *, jlong, jlong, NSRange, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong, NSRange, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRange (*)(jlong, jlong, NSRange, jlong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
} else {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong, NSRange, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRange (*)(jlong, jlong, NSRange, jlong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
}
fail:
if (arg3 && lparg3) setNSRangeFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSRangeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
-{
- NSRange _arg0, *lparg0=NULL;
- NSRect _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
- if (arg0) if ((lparg0 = getNSRangeFields(env, arg0, &_arg0)) == NULL) goto fail;
- if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRange *, jintLong, jintLong, NSRect))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
- } else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong, NSRect))objc_msgSend_stret)(arg1, arg2, *lparg3);
- } else {
- *lparg0 = (*(NSRange (*)(jintLong, jintLong, NSRect))objc_msgSend)(arg1, arg2, *lparg3);
- }
-fail:
- if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
- if (arg0 && lparg0) setNSRangeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSRect _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2);
+ ((void (*)(NSRect *, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong))objc_msgSend_stret)(arg1, arg2);
+ *lparg0 = (*(NSRect (*)(jlong, jlong))objc_msgSend_stret)(arg1, arg2);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong))objc_msgSend)(arg1, arg2);
+ *lparg0 = (*(NSRect (*)(jlong, jlong))objc_msgSend)(arg1, arg2);
}
fail:
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2III)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3)
{
NSRect _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
+ ((void (*)(NSRect *, jlong, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong))objc_msgSend_stret)(arg1, arg2, arg3);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong))objc_msgSend_stret)(arg1, arg2, arg3);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong))objc_msgSend)(arg1, arg2, arg3);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong))objc_msgSend)(arg1, arg2, arg3);
}
fail:
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIII)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
NSRect _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3, arg4);
+ ((void (*)(NSRect *, jlong, jlong, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3, arg4);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong, jintLong))objc_msgSend_stret)(arg1, arg2, arg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong, jlong))objc_msgSend_stret)(arg1, arg2, arg3, arg4);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg1, arg2, arg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong, jlong))objc_msgSend)(arg1, arg2, arg3, arg4);
}
fail:
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIIIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIIIZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jboolean arg5)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jboolean arg5)
{
NSRect _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIIIZ_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, jintLong, jintLong, jboolean))objc_msgSend_stret)(lparg0, arg1, arg2, arg3, arg4, arg5);
+ ((void (*)(NSRect *, jlong, jlong, jlong, jlong, jboolean))objc_msgSend_stret)(lparg0, arg1, arg2, arg3, arg4, arg5);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong, jintLong, jboolean))objc_msgSend_stret)(arg1, arg2, arg3, arg4, arg5);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong, jlong, jboolean))objc_msgSend_stret)(arg1, arg2, arg3, arg4, arg5);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong, jintLong, jboolean))objc_msgSend)(arg1, arg2, arg3, arg4, arg5);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong, jlong, jboolean))objc_msgSend)(arg1, arg2, arg3, arg4, arg5);
}
fail:
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIIIZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jobject arg4, jintLong arg5)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jintLong arg3, jobject arg4, jintLong arg5)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jlong arg3, jobject arg4, jlong arg5)
{
NSRect _arg0, *lparg0=NULL;
NSRect _arg4, *lparg4=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg4) if ((lparg4 = getNSRectFields(env, arg4, &_arg4)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, jintLong, NSRect, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3, *lparg4, arg5);
+ ((void (*)(NSRect *, jlong, jlong, jlong, NSRect, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, arg3, *lparg4, arg5);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong, NSRect, jintLong))objc_msgSend_stret)(arg1, arg2, arg3, *lparg4, arg5);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong, NSRect, jlong))objc_msgSend_stret)(arg1, arg2, arg3, *lparg4, arg5);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, jintLong, NSRect, jintLong))objc_msgSend)(arg1, arg2, arg3, *lparg4, arg5);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, jlong, NSRect, jlong))objc_msgSend)(arg1, arg2, arg3, *lparg4, arg5);
}
fail:
if (arg4 && lparg4) setNSRectFields(env, arg4, lparg4);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSRect _arg0, *lparg0=NULL;
NSRange _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRangeFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, NSRange, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
+ ((void (*)(NSRect *, jlong, jlong, NSRange, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSRange, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSRange, jlong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSRange, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSRange, jlong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
}
fail:
if (arg3 && lparg3) setNSRangeFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3)
{
NSRect _arg0, *lparg0=NULL;
NSRect _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, NSRect))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
+ ((void (*)(NSRect *, jlong, jlong, NSRect))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSRect))objc_msgSend_stret)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSRect))objc_msgSend_stret)(arg1, arg2, *lparg3);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSRect))objc_msgSend)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSRect))objc_msgSend)(arg1, arg2, *lparg3);
}
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSRect _arg0, *lparg0=NULL;
NSRect _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, NSRect, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
+ ((void (*)(NSRect *, jlong, jlong, NSRect, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSRect, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSRect, jlong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSRect, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSRect, jlong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
}
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
NSRect _arg0, *lparg0=NULL;
NSSize _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSRectFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSSizeFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSRect *, jintLong, jintLong, NSSize, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
+ ((void (*)(NSRect *, jlong, jlong, NSSize, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSSize, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSSize, jlong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
} else {
- *lparg0 = (*(NSRect (*)(jintLong, jintLong, NSSize, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
+ *lparg0 = (*(NSRect (*)(jlong, jlong, NSSize, jlong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
}
fail:
if (arg3 && lparg3) setNSSizeFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSRectFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
NSSize _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2);
+ ((void (*)(NSSize *, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong))objc_msgSend_stret)(arg1, arg2);
+ *lparg0 = (*(NSSize (*)(jlong, jlong))objc_msgSend_stret)(arg1, arg2);
} else {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong))objc_msgSend)(arg1, arg2);
+ *lparg0 = (*(NSSize (*)(jlong, jlong))objc_msgSend)(arg1, arg2);
}
fail:
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3)
{
NSSize _arg0, *lparg0=NULL;
NSRect _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, jintLong, jintLong, NSRect))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
+ ((void (*)(NSSize *, jlong, jlong, NSRect))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSRect))objc_msgSend_stret)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSRect))objc_msgSend_stret)(arg1, arg2, *lparg3);
} else {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSRect))objc_msgSend)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSRect))objc_msgSend)(arg1, arg2, *lparg3);
}
fail:
if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3)
{
NSSize _arg0, *lparg0=NULL;
NSSize _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSSizeFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, jintLong, jintLong, NSSize))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
+ ((void (*)(NSSize *, jlong, jlong, NSSize))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize))objc_msgSend_stret)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSSize))objc_msgSend_stret)(arg1, arg2, *lparg3);
} else {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize))objc_msgSend)(arg1, arg2, *lparg3);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSSize))objc_msgSend)(arg1, arg2, *lparg3);
}
fail:
if (arg3 && lparg3) setNSSizeFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4, jlong arg5, jlong arg6, jlong arg7, jlong arg8)
{
NSSize _arg0, *lparg0=NULL;
NSSize _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC);
-#endif
- if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
- if (arg3) if ((lparg3 = getNSSizeFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, jintLong, jintLong, NSSize, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4);
- } else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4);
- } else {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4);
- }
-fail:
- if (arg3 && lparg3) setNSSizeFields(env, arg3, lparg3);
- if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2IIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2IIIII)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7, jintLong arg8)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7, jintLong arg8)
-#endif
-{
- NSSize _arg0, *lparg0=NULL;
- NSSize _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2IIIII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSSizeFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, jintLong, jintLong, NSSize, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8);
+ ((void (*)(NSSize *, jlong, jlong, NSSize, jlong, jlong, jlong, jlong, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSSize, jlong, jlong, jlong, jlong, jlong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8);
} else {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSSize, jlong, jlong, jlong, jlong, jlong))objc_msgSend)(arg1, arg2, *lparg3, arg4, arg5, arg6, arg7, arg8);
}
fail:
if (arg3 && lparg3) setNSSizeFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2IIIII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2ZZI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2ZZI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jboolean arg4, jboolean arg5, jintLong arg6)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jboolean arg4, jboolean arg5, jintLong arg6)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jobject arg3, jboolean arg4, jboolean arg5, jlong arg6)
{
NSSize _arg0, *lparg0=NULL;
NSSize _arg3, *lparg3=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2ZZI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getNSSizeFields(env, arg3, &_arg3)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, jintLong, jintLong, NSSize, jboolean, jboolean, jintLong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4, arg5, arg6);
+ ((void (*)(NSSize *, jlong, jlong, NSSize, jboolean, jboolean, jlong))objc_msgSend_stret)(lparg0, arg1, arg2, *lparg3, arg4, arg5, arg6);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize, jboolean, jboolean, jintLong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4, arg5, arg6);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSSize, jboolean, jboolean, jlong))objc_msgSend_stret)(arg1, arg2, *lparg3, arg4, arg5, arg6);
} else {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, NSSize, jboolean, jboolean, jintLong))objc_msgSend)(arg1, arg2, *lparg3, arg4, arg5, arg6);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, NSSize, jboolean, jboolean, jlong))objc_msgSend)(arg1, arg2, *lparg3, arg4, arg5, arg6);
}
fail:
if (arg3 && lparg3) setNSSizeFields(env, arg3, lparg3);
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2ZZI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ_FUNC);
-#endif
}
#endif
-#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jboolean arg3)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jboolean arg3)
-#endif
+#ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2, jboolean arg3)
{
NSSize _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ_FUNC);
-#else
OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ_FUNC);
-#endif
if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
if (STRUCT_SIZE_LIMIT == 0) {
- ((void (*)(NSSize *, jintLong, jintLong, jboolean))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
+ ((void (*)(NSSize *, jlong, jlong, jboolean))objc_msgSend_stret)(lparg0, arg1, arg2, arg3);
} else if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, jboolean))objc_msgSend_stret)(arg1, arg2, arg3);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, jboolean))objc_msgSend_stret)(arg1, arg2, arg3);
} else {
- *lparg0 = (*(NSSize (*)(jintLong, jintLong, jboolean))objc_msgSend)(arg1, arg2, arg3);
+ *lparg0 = (*(NSSize (*)(jlong, jlong, jboolean))objc_msgSend)(arg1, arg2, arg3);
}
fail:
if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ_FUNC);
-#else
OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ_FUNC);
-#endif
}
#endif
#ifndef NO_objc_1registerClassPair
JNIEXPORT void JNICALL OS_NATIVE(objc_1registerClassPair)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, objc_1registerClassPair_FUNC);
objc_registerClassPair((Class)arg0);
@@ -10991,40 +7519,40 @@ JNIEXPORT jint JNICALL OS_NATIVE(objc_1super_1sizeof)
#endif
#ifndef NO_object_1getClass
-JNIEXPORT jintLong JNICALL OS_NATIVE(object_1getClass)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(object_1getClass)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, object_1getClass_FUNC);
- rc = (jintLong)object_getClass((id)arg0);
+ rc = (jlong)object_getClass((id)arg0);
OS_NATIVE_EXIT(env, that, object_1getClass_FUNC);
return rc;
}
#endif
#ifndef NO_object_1getClassName
-JNIEXPORT jintLong JNICALL OS_NATIVE(object_1getClassName)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(object_1getClassName)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, object_1getClassName_FUNC);
- rc = (jintLong)object_getClassName((id)arg0);
+ rc = (jlong)object_getClassName((id)arg0);
OS_NATIVE_EXIT(env, that, object_1getClassName_FUNC);
return rc;
}
#endif
#ifndef NO_object_1getInstanceVariable
-JNIEXPORT jintLong JNICALL OS_NATIVE(object_1getInstanceVariable)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLongArray arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(object_1getInstanceVariable)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlongArray arg2)
{
jbyte *lparg1=NULL;
- jintLong *lparg2=NULL;
- jintLong rc = 0;
+ jlong *lparg2=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, object_1getInstanceVariable_FUNC);
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)object_getInstanceVariable((id)arg0, (const char*)lparg1, (void **)lparg2);
+ rc = (jlong)object_getInstanceVariable((id)arg0, (const char*)lparg1, (void **)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, 0);
@@ -11034,26 +7562,26 @@ fail:
#endif
#ifndef NO_object_1setClass
-JNIEXPORT jintLong JNICALL OS_NATIVE(object_1setClass)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(object_1setClass)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, object_1setClass_FUNC);
- rc = (jintLong)object_setClass((id)arg0, (Class)arg1);
+ rc = (jlong)object_setClass((id)arg0, (Class)arg1);
OS_NATIVE_EXIT(env, that, object_1setClass_FUNC);
return rc;
}
#endif
#ifndef NO_object_1setInstanceVariable
-JNIEXPORT jintLong JNICALL OS_NATIVE(object_1setInstanceVariable)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(object_1setInstanceVariable)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
{
jbyte *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, object_1setInstanceVariable_FUNC);
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)object_setInstanceVariable((id)arg0, (const char*)lparg1, (void *)arg2);
+ rc = (jlong)object_setInstanceVariable((id)arg0, (const char*)lparg1, (void *)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, object_1setInstanceVariable_FUNC);
@@ -11061,27 +7589,15 @@ fail:
}
#endif
-#ifndef NO_sel_1getName
-JNIEXPORT jintLong JNICALL OS_NATIVE(sel_1getName)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, sel_1getName_FUNC);
- rc = (jintLong)sel_getName((SEL)arg0);
- OS_NATIVE_EXIT(env, that, sel_1getName_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_sel_1registerName
-JNIEXPORT jintLong JNICALL OS_NATIVE(sel_1registerName)
+JNIEXPORT jlong JNICALL OS_NATIVE(sel_1registerName)
(JNIEnv *env, jclass that, jstring arg0)
{
const char *lparg0= NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, sel_1registerName_FUNC);
if (arg0) if ((lparg0 = (*env)->GetStringUTFChars(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)sel_registerName(lparg0);
+ rc = (jlong)sel_registerName(lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseStringUTFChars(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, sel_1registerName_FUNC);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h
index 8166f08ccb..e9ddc02163 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h
@@ -27,7 +27,7 @@
#include "os_custom.h"
-extern jint CPSSetProcessName(void *, jintLong);
+extern jint CPSSetProcessName(void *, jlong);
#define OS_LOAD_FUNCTION LOAD_FUNCTION
@@ -40,20 +40,21 @@ extern jint CPSSetProcessName(void *, jintLong);
#endif
/* The structure objc_super defines "class" in i386/ppc and "super_class" in x86_64 */
-#ifdef __i386__
-#define swt_super_class class
-#elif __ppc__
-#define swt_super_class class
-#elif __x86_64__
+#ifdef __x86_64__
+#define swt_super_class super_class
+#elif __arm64__
#define swt_super_class super_class
#endif
-#ifdef __i386__
-#define STRUCT_SIZE_LIMIT 8
-#elif __ppc__
-#define STRUCT_SIZE_LIMIT 4
-#elif __x86_64__
+/* STRUCT_SIZE_LIMIT is the maximum size of struct that can be returned using registers */
+/* When sizeof(struct) is greater than this limit, objc_msgSend*_stret call is used */
+/* objc_msgSend*_stret methods are not available on arm64 architecture, so objc_msgSend* calls are always used */
+#ifdef __x86_64__
#define STRUCT_SIZE_LIMIT 16
+#elif __arm64__
+#define STRUCT_SIZE_LIMIT 64
+#define objc_msgSendSuper_stret objc_msgSendSuper
+#define objc_msgSend_stret objc_msgSend
#endif
#ifdef DEBUG_EXCEPTIONS
@@ -72,7 +73,7 @@ extern jint CPSSetProcessName(void *, jintLong);
#define OS_NATIVE_ENTER(env, that, func) \
@try {
#define OS_NATIVE_EXIT(env, that, func) \
- } \
+ ; } \
@catch (NSException *nsx) { \
DUMP_EXCEPTION \
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c
index c38dfd8e84..99f8bae271 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c
@@ -29,7 +29,7 @@
#ifndef NO_JNIGetObject
JNIEXPORT jobject JNICALL OS_NATIVE(JNIGetObject)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jobject rc = 0;
OS_NATIVE_ENTER(env, that, JNIGetObject_FUNC);
@@ -39,33 +39,6 @@ JNIEXPORT jobject JNICALL OS_NATIVE(JNIGetObject)
}
#endif
-#ifndef NO_FindWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(FindWindow)
-(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
-{
- jintLong *lparg2=NULL;
- jintLong rc = 0;
- Point p;
- p.h = (short)arg0;
- p.v = (short)arg1;
- OS_NATIVE_ENTER(env, that, FindWindow_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- /*
- rc = (jintLong)FindWindow(arg0, arg1, (WindowRef *)lparg2);
- */
- {
- OS_LOAD_FUNCTION(fp, FindWindow)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(Point, WindowRef *))fp)(p, (WindowRef *)lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, FindWindow_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSIntersectionRect
JNIEXPORT void JNICALL OS_NATIVE(NSIntersectionRect)
(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jobject arg2)
@@ -100,25 +73,9 @@ fail:
}
#endif
-#ifndef NO__1_1BIG_1ENDIAN_1_1
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1_1BIG_1ENDIAN_1_1)
- (JNIEnv *env, jclass that)
-{
- jboolean rc;
- OS_NATIVE_ENTER(env, that, _1_1BIG_1ENDIAN_1_1_FUNC)
-#ifdef __BIG_ENDIAN__
- rc = (jboolean)TRUE;
-#else
- rc = (jboolean)FALSE;
-#endif
- OS_NATIVE_EXIT(env, that, _1_1BIG_1ENDIAN_1_1_FUNC)
- return rc;
-}
-#endif
-
#ifndef NO_class_1getName
JNIEXPORT jstring JNICALL OS_NATIVE(class_1getName)
-(JNIEnv *env, jclass that, jintLong arg0)
+(JNIEnv *env, jclass that, jlong arg0)
{
jstring rc = 0;
OS_NATIVE_ENTER(env, that, class_1getName_FUNC);
@@ -134,26 +91,26 @@ static BOOL isFlippedProc(id obj, SEL sel)
{
return YES;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(isFlipped_1CALLBACK)
+JNIEXPORT jlong JNICALL OS_NATIVE(isFlipped_1CALLBACK)
(JNIEnv *env, jclass that)
{
- return (jintLong)isFlippedProc;
+ return (jlong)isFlippedProc;
}
#endif
#ifndef NO_kTISPropertyUnicodeKeyLayoutData
-JNIEXPORT jintLong JNICALL OS_NATIVE(kTISPropertyUnicodeKeyLayoutData)
+JNIEXPORT jlong JNICALL OS_NATIVE(kTISPropertyUnicodeKeyLayoutData)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, kTISPropertyUnicodeKeyLayoutData_FUNC);
/*
- rc = (jintLong) kTISPropertyUnicodeKeyLayoutData;
+ rc = (jlong) kTISPropertyUnicodeKeyLayoutData;
*/
{
LOAD_CFSTR(data, kTISPropertyUnicodeKeyLayoutData)
if (data) {
- rc = (jintLong)(*data);
+ rc = (jlong)(*data);
}
}
OS_NATIVE_EXIT(env, that, kTISPropertyUnicodeKeyLayoutData_FUNC);
@@ -161,95 +118,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(kTISPropertyUnicodeKeyLayoutData)
}
#endif
-#ifndef NO_NSAccessibilityCellRole
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityCellRole)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityCellRole_FUNC);
-/*
- rc = (jintLong)NSAccessibilityCellRole;
-*/
- {
- LOAD_CFSTR(data, NSAccessibilityCellRole)
- if (data) {
- rc = (jintLong)(*data);
- }
- }
- OS_NATIVE_EXIT(env, that, NSAccessibilityCellRole_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilityColumnIndexRangeAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColumnIndexRangeAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityColumnIndexRangeAttribute_FUNC);
-/*
- rc = (jintLong)NSAccessibilityColumnIndexRangeAttribute;
-*/
- {
- LOAD_CFSTR(data, NSAccessibilityColumnIndexRangeAttribute)
- if (data) {
- rc = (jintLong)(*data);
- }
- }
- OS_NATIVE_EXIT(env, that, NSAccessibilityColumnIndexRangeAttribute_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilityCellForColumnAndRowParameterizedAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityCellForColumnAndRowParameterizedAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC);
-/*
- rc = (jintLong)NSAccessibilityCellForColumnAndRowParameterizedAttribute;
-*/
- {
- LOAD_CFSTR(data, NSAccessibilityCellForColumnAndRowParameterizedAttribute)
- if (data) {
- rc = (jintLong)(*data);
- }
- }
- OS_NATIVE_EXIT(env, that, NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_NSAccessibilityRowIndexRangeAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowIndexRangeAttribute)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSAccessibilityRowIndexRangeAttribute_FUNC);
-/*
- rc = (jintLong)NSAccessibilityRowIndexRangeAttribute;
-*/
- {
- LOAD_CFSTR(data, NSAccessibilityRowIndexRangeAttribute)
- if (data) {
- rc = (jintLong)(*data);
- }
- }
- OS_NATIVE_EXIT(env, that, NSAccessibilityRowIndexRangeAttribute_FUNC);
- return rc;
-}
-#endif
-
-typedef void (*FunctionPointer)(jintLong result);
-typedef void (^ObjcBlock)(jintLong result);
+typedef void (*FunctionPointer)(jlong result);
+typedef void (^ObjcBlock)(jlong result);
/*
Method that takes a function pointer as input and returns a objective-c block
which calls the function pointed to by the function pointer.
*/
ObjcBlock functionToBlock(FunctionPointer func) {
- return [[^(jintLong result) {
+ return [[^(jlong result) {
func(result);
} copy] autorelease];
}
@@ -259,14 +136,14 @@ Wrapper function which receives a function pointer from Java and calls NSSavePan
with objective-C block (with block syntax) as the last parameter.
*/
#ifndef NO_beginSheetModalForWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(beginSheetModalForWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, FunctionPointer arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(beginSheetModalForWindow)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, FunctionPointer arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, beginSheetModalForWindow_FUNC);
- rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, void (^)(jintLong)))objc_msgSend)(arg0, arg1, arg2, functionToBlock(arg3));
+ rc = (jlong)((jlong (*)(jlong, jlong, jlong, void (^)(jlong)))objc_msgSend)(arg0, arg1, arg2, functionToBlock(arg3));
OS_NATIVE_EXIT(env, that, beginSheetModalForWindow_FUNC);
return rc;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
index 116e9b4641..346d5ac3aa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,7 +21,6 @@
#ifdef NATIVE_STATS
char * OS_nativeFunctionNames[] = {
- "ATSFontActivateFromFileReference",
"AcquireRootMenu",
"CALLBACK_1NSTextAttachmentCell_1attachment",
"CALLBACK_1NSTextAttachmentCell_1cellSize",
@@ -34,8 +33,6 @@ char * OS_nativeFunctionNames[] = {
"CALLBACK_1cellSizeForBounds_1",
"CALLBACK_1characterIndexForPoint_1",
"CALLBACK_1columnAtPoint_1",
- "CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1",
- "CALLBACK_1draggedImage_1beganAt_1",
"CALLBACK_1draggedImage_1endedAt_1operation_1",
"CALLBACK_1drawBackgroundInClipRect_1",
"CALLBACK_1drawBezelWithFrame_1inView_1",
@@ -59,7 +56,6 @@ char * OS_nativeFunctionNames[] = {
"CALLBACK_1selectedRange",
"CALLBACK_1setFrameOrigin_1",
"CALLBACK_1setFrameSize_1",
- "CALLBACK_1setFrame_1",
"CALLBACK_1setMarkedText_1selectedRange_1",
"CALLBACK_1setNeedsDisplayInRect_1",
"CALLBACK_1shouldChangeTextInRange_1replacementString_1",
@@ -68,26 +64,17 @@ char * OS_nativeFunctionNames[] = {
"CALLBACK_1titleRectForBounds_1",
"CALLBACK_1view_1stringForToolTip_1point_1userData_1",
"CALLBACK_1webView_1setFrame_1",
- "CFAttributedStringCreate",
"CFDataGetBytePtr",
"CFDataGetLength",
- "CFDictionaryAddValue",
- "CFDictionaryCreateMutable",
- "CFRange_1sizeof",
"CFRelease",
"CFRunLoopAddObserver",
"CFRunLoopGetCurrent",
"CFRunLoopObserverCreate",
"CFRunLoopObserverInvalidate",
- "CFRunLoopRunInMode",
- "CFRunLoopStop",
- "CFStringCreateWithCharacters",
"CFURLCreateFromFSRef",
"CFURLCreateStringByAddingPercentEscapes",
"CGAffineTransform_1sizeof",
"CGBitmapContextCreate",
- "CGBitmapContextCreateImage",
- "CGBitmapContextGetData",
"CGColorCreate",
"CGColorRelease",
"CGColorSpaceCreateDeviceRGB",
@@ -95,7 +82,6 @@ char * OS_nativeFunctionNames[] = {
"CGContextAddPath",
"CGContextBeginTransparencyLayerWithRect",
"CGContextCopyPath",
- "CGContextCopyWindowContentsToRect",
"CGContextDrawImage",
"CGContextEndTransparencyLayer",
"CGContextFillRect",
@@ -112,22 +98,12 @@ char * OS_nativeFunctionNames[] = {
"CGContextSetLineJoin",
"CGContextSetLineWidth",
"CGContextSetMiterLimit",
- "CGContextSetShouldAntialias",
- "CGContextSetTextDrawingMode",
- "CGContextSetTextMatrix",
- "CGContextSetTextPosition",
"CGContextStrokePath",
"CGContextTranslateCTM",
"CGDataProviderCreateWithData",
"CGDataProviderRelease",
- "CGDisplayBaseAddress",
- "CGDisplayBitsPerPixel",
- "CGDisplayBitsPerSample",
"CGDisplayBounds",
- "CGDisplayBytesPerRow",
"CGDisplayCreateImage",
- "CGDisplayPixelsHigh",
- "CGDisplayPixelsWide",
"CGEventCreateKeyboardEvent",
"CGEventCreateMouseEvent",
"CGEventCreateScrollWheelEvent",
@@ -141,54 +117,30 @@ char * OS_nativeFunctionNames[] = {
"CGImageRelease",
"CGPathAddCurveToPoint",
"CGPathAddLineToPoint",
- "CGPathAddRect",
"CGPathApply",
"CGPathCloseSubpath",
- "CGPathCreateCopy",
"CGPathCreateMutable",
"CGPathElement_1sizeof",
"CGPathMoveToPoint",
"CGPathRelease",
"CGPoint_1sizeof",
- "CGPostKeyboardEvent",
"CGRect_1sizeof",
- "CGSetLocalEventsFilterDuringSuppressionState",
- "CGSetLocalEventsSuppressionInterval",
"CGSize_1sizeof",
- "CGWarpMouseCursorPosition",
"CPSSetProcessName",
- "CTFontGetAscent",
- "CTFontGetDescent",
- "CTFontGetLeading",
- "CTLineCreateWithAttributedString",
- "CTLineDraw",
- "CTLineGetTypographicBounds",
- "CTParagraphStyleCreate",
- "CTParagraphStyleSetting_1sizeof",
- "CTTypesetterCreateLine",
- "CTTypesetterCreateWithAttributedString",
- "CTTypesetterSuggestLineBreak",
+ "CTFontManagerRegisterFontsForURL",
"CancelMenuTracking",
"CloseRgn",
"CopyRgn",
"DeleteGlobalRef",
- "DeleteMenuItem",
"DiffRgn",
"DisposeRgn",
"EmptyRgn",
- "FSPathMakeRef",
- "FindWindow",
- "Gestalt",
- "GetCurrentEventButtonState",
"GetCurrentProcess",
- "GetDblTime",
"GetIconRefFromTypeInfo",
- "GetIndMenuItemWithCommandID",
"GetRegionBounds",
"GetSystemUIMode",
"GetThemeMetric",
"HIThemeDrawFocusRect",
- "HIWindowGetCGWindowID",
"JNIGetObject",
"JSEvaluateScript",
"JSStringCreateWithUTF8CString",
@@ -197,16 +149,13 @@ char * OS_nativeFunctionNames[] = {
"LSGetApplicationForInfo",
"LineTo",
"MoveTo",
- "NSAccessibilityActionDescription",
"NSAccessibilityAttributedStringForRangeParameterizedAttribute",
"NSAccessibilityBackgroundColorTextAttribute",
"NSAccessibilityBoundsForRangeParameterizedAttribute",
"NSAccessibilityButtonRole",
"NSAccessibilityCellForColumnAndRowParameterizedAttribute",
- "NSAccessibilityCellRole",
"NSAccessibilityCheckBoxRole",
"NSAccessibilityChildrenAttribute",
- "NSAccessibilityColorWellRole",
"NSAccessibilityColumnIndexRangeAttribute",
"NSAccessibilityColumnRole",
"NSAccessibilityColumnsAttribute",
@@ -217,32 +166,24 @@ char * OS_nativeFunctionNames[] = {
"NSAccessibilityDialogSubrole",
"NSAccessibilityEnabledAttribute",
"NSAccessibilityExpandedAttribute",
- "NSAccessibilityFloatingWindowSubrole",
"NSAccessibilityFocusedAttribute",
"NSAccessibilityFocusedUIElementChangedNotification",
- "NSAccessibilityFocusedWindowChangedNotification",
"NSAccessibilityFontFamilyKey",
"NSAccessibilityFontNameKey",
"NSAccessibilityFontSizeKey",
"NSAccessibilityFontTextAttribute",
"NSAccessibilityForegroundColorTextAttribute",
- "NSAccessibilityGridRole",
"NSAccessibilityGroupRole",
"NSAccessibilityHeaderAttribute",
"NSAccessibilityHelpAttribute",
"NSAccessibilityHelpTagRole",
"NSAccessibilityHorizontalOrientationValue",
- "NSAccessibilityHorizontalScrollBarAttribute",
"NSAccessibilityImageRole",
- "NSAccessibilityIncrementorRole",
"NSAccessibilityIndexAttribute",
"NSAccessibilityInsertionPointLineNumberAttribute",
- "NSAccessibilityLabelValueAttribute",
"NSAccessibilityLineForIndexParameterizedAttribute",
"NSAccessibilityLinkRole",
"NSAccessibilityLinkTextAttribute",
- "NSAccessibilityLinkedUIElementsAttribute",
- "NSAccessibilityListRole",
"NSAccessibilityMaxValueAttribute",
"NSAccessibilityMenuBarRole",
"NSAccessibilityMenuButtonRole",
@@ -257,29 +198,22 @@ char * OS_nativeFunctionNames[] = {
"NSAccessibilityOutlineRole",
"NSAccessibilityOutlineRowSubrole",
"NSAccessibilityParentAttribute",
- "NSAccessibilityPopUpButtonRole",
"NSAccessibilityPositionAttribute",
"NSAccessibilityPostNotification",
"NSAccessibilityPressAction",
"NSAccessibilityPreviousContentsAttribute",
"NSAccessibilityProgressIndicatorRole",
- "NSAccessibilityRTFForRangeParameterizedAttribute",
"NSAccessibilityRadioButtonRole",
- "NSAccessibilityRadioGroupRole",
- "NSAccessibilityRaiseBadArgumentException",
"NSAccessibilityRangeForIndexParameterizedAttribute",
"NSAccessibilityRangeForLineParameterizedAttribute",
"NSAccessibilityRangeForPositionParameterizedAttribute",
- "NSAccessibilityResizedNotification",
"NSAccessibilityRoleAttribute",
"NSAccessibilityRoleDescription",
"NSAccessibilityRoleDescriptionAttribute",
- "NSAccessibilityRoleDescriptionForUIElement",
"NSAccessibilityRowCountChangedNotification",
"NSAccessibilityRowIndexRangeAttribute",
"NSAccessibilityRowRole",
"NSAccessibilityRowsAttribute",
- "NSAccessibilityScrollAreaRole",
"NSAccessibilityScrollBarRole",
"NSAccessibilitySelectedAttribute",
"NSAccessibilitySelectedChildrenAttribute",
@@ -295,44 +229,33 @@ char * OS_nativeFunctionNames[] = {
"NSAccessibilityShowMenuAction",
"NSAccessibilitySizeAttribute",
"NSAccessibilitySliderRole",
- "NSAccessibilitySortButtonRole",
"NSAccessibilitySplitterRole",
- "NSAccessibilityStandardWindowSubrole",
"NSAccessibilityStaticTextRole",
"NSAccessibilityStrikethroughColorTextAttribute",
"NSAccessibilityStrikethroughTextAttribute",
"NSAccessibilityStringForRangeParameterizedAttribute",
"NSAccessibilityStyleRangeForIndexParameterizedAttribute",
"NSAccessibilitySubroleAttribute",
- "NSAccessibilitySuperscriptTextAttribute",
- "NSAccessibilitySystemDialogSubrole",
"NSAccessibilityTabGroupRole",
"NSAccessibilityTableRole",
"NSAccessibilityTableRowSubrole",
"NSAccessibilityTabsAttribute",
"NSAccessibilityTextAreaRole",
"NSAccessibilityTextFieldRole",
- "NSAccessibilityTextLinkSubrole",
"NSAccessibilityTitleAttribute",
"NSAccessibilityTitleChangedNotification",
"NSAccessibilityTitleUIElementAttribute",
"NSAccessibilityToolbarRole",
"NSAccessibilityTopLevelUIElementAttribute",
- "NSAccessibilityURLAttribute",
"NSAccessibilityUnderlineColorTextAttribute",
"NSAccessibilityUnderlineTextAttribute",
"NSAccessibilityUnignoredAncestor",
"NSAccessibilityUnignoredChildren",
- "NSAccessibilityUnignoredChildrenForOnlyChild",
- "NSAccessibilityUnignoredDescendant",
"NSAccessibilityUnknownRole",
"NSAccessibilityUnknownSubrole",
"NSAccessibilityValueAttribute",
"NSAccessibilityValueChangedNotification",
- "NSAccessibilityValueDescriptionAttribute",
- "NSAccessibilityValueIndicatorRole",
"NSAccessibilityVerticalOrientationValue",
- "NSAccessibilityVerticalScrollBarAttribute",
"NSAccessibilityVisibleCharacterRangeAttribute",
"NSAccessibilityVisibleChildrenAttribute",
"NSAccessibilityVisibleColumnsAttribute",
@@ -347,30 +270,26 @@ char * OS_nativeFunctionNames[] = {
"NSBaselineOffsetAttributeName",
"NSBeep",
"NSBitsPerPixelFromDepth",
- "NSCalibratedRGBColorSpace",
- "NSCountWindows",
"NSCursorAttributeName",
"NSDefaultRunLoopMode",
"NSDeviceRGBColorSpace",
"NSDeviceResolution",
"NSDragPboard",
"NSEqualRects",
- "NSErrorFailingURLStringKey",
"NSEventTrackingRunLoopMode",
- "NSFileTypeForHFSTypeCode",
"NSFilenamesPboardType",
"NSFontAttributeName",
"NSForegroundColorAttributeName",
- "NSGetSizeAndAlignment",
+ "NSImageNameCaution",
+ "NSImageNameInfo",
"NSIntersectionRect",
"NSLigatureAttributeName",
"NSLinkAttributeName",
"NSLocaleLanguageCode",
"NSModalPanelRunLoopMode",
"NSNotFound",
- "NSNumberOfColorComponents",
"NSObliquenessAttributeName",
- "NSOutlineViewColumnDidMoveNotification",
+ "NSOperatingSystemVersion_1sizeof",
"NSParagraphStyleAttributeName",
"NSPasteboardTypeHTML",
"NSPasteboardTypeRTF",
@@ -388,30 +307,19 @@ char * OS_nativeFunctionNames[] = {
"NSPrintSaveJob",
"NSPrintSavePath",
"NSPrintScalingFactor",
- "NSPrintSpoolJob",
"NSRange_1sizeof",
"NSRectFillUsingOperation",
"NSRect_1sizeof",
"NSSearchPathForDirectoriesInDomains",
"NSSize_1sizeof",
- "NSSpellingStateAttributeName",
"NSSquareStatusItemLength",
"NSStrikethroughColorAttributeName",
"NSStrikethroughStyleAttributeName",
"NSStrokeWidthAttributeName",
"NSSystemColorsDidChangeNotification",
"NSTIFFPboardType",
- "NSTableViewColumnDidMoveNotification",
- "NSTemporaryDirectory",
- "NSToolbarCustomizeToolbarItemIdentifier",
- "NSToolbarDidRemoveItemNotification",
"NSToolbarFlexibleSpaceItemIdentifier",
- "NSToolbarPrintItemIdentifier",
- "NSToolbarSeparatorItemIdentifier",
- "NSToolbarShowColorsItemIdentifier",
- "NSToolbarShowFontsItemIdentifier",
"NSToolbarSpaceItemIdentifier",
- "NSToolbarWillAddItemNotification",
"NSURLPboardType",
"NSUnderlineColorAttributeName",
"NSUnderlineStyleAttributeName",
@@ -444,14 +352,11 @@ char * OS_nativeFunctionNames[] = {
"SectRgn",
"SetRect",
"SetSystemUIMode",
- "SetThemeCursor",
"TISCopyCurrentKeyboardInputSource",
"TISGetInputSourceProperty",
- "TransformProcessType",
"UCKeyTranslate",
"UTTypeEqual",
"UnionRgn",
- "_1_1BIG_1ENDIAN_1_1",
"beginSheetModalForWindow",
"call",
"class_1addIvar",
@@ -468,134 +373,19 @@ char * OS_nativeFunctionNames[] = {
"isFlipped_1CALLBACK",
"kCFAllocatorDefault",
"kCFRunLoopCommonModes",
- "kCFTypeDictionaryKeyCallBacks",
- "kCFTypeDictionaryValueCallBacks",
- "kCTFontAttributeName",
- "kCTForegroundColorAttributeName",
- "kCTParagraphStyleAttributeName",
"kTISPropertyUnicodeKeyLayoutData",
"kUTTypeFileURL",
"kUTTypeURL",
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I",
-#else
- "memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I",
-#else
- "memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I",
-#else
"memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_CGPoint_2I",
-#else
- "memmove__JLorg_eclipse_swt_internal_cocoa_CGPoint_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_CGRect_2I",
-#else
- "memmove__JLorg_eclipse_swt_internal_cocoa_CGRect_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_CGSize_2I",
-#else
- "memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I",
-#else
- "memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I",
-#else
- "memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_NSPoint_2I",
-#else
"memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_NSRange_2I",
-#else
"memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "memmove__ILorg_eclipse_swt_internal_cocoa_NSSize_2I",
-#else
"memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II",
-#else
- "memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II",
-#else
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II",
-#else
"memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2II",
-#else
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2II",
-#else
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2II",
-#else
- "memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II",
-#else
- "memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II",
-#else
- "memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II",
-#else
"memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2II",
-#else
"memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2II",
-#else
"memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ",
-#endif
-#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2II",
-#else
"memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ",
-#endif
"method_1setImplementation",
"objc_1allocateClassPair",
"objc_1disposeClassPair",
@@ -603,696 +393,137 @@ char * OS_nativeFunctionNames[] = {
"objc_1getMetaClass",
"objc_1getProtocol",
"objc_1lookUpClass",
-#ifndef JNI64
- "objc_1msgSend__II",
-#else
"objc_1msgSend__JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IID",
-#else
"objc_1msgSend__JJD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIDIIIZ",
-#else
- "objc_1msgSend__JJDJJJZ",
-#endif
- "objc_1msgSend__IIF",
-#ifndef JNI64
- "objc_1msgSend__IIFF",
-#else
"objc_1msgSend__JJDD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIFFFF",
-#else
"objc_1msgSend__JJDDDD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIFI",
-#else
- "objc_1msgSend__JJDJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__III",
-#else
+ "objc_1msgSend__JJDJJJZ",
+ "objc_1msgSend__JJI",
"objc_1msgSend__JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIF",
-#else
"objc_1msgSend__JJJD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIII",
-#else
"objc_1msgSend__JJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIDI",
-#else
"objc_1msgSend__JJJJDJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIII",
-#else
"objc_1msgSend__JJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIIF",
-#else
- "objc_1msgSend__JJJJJD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIII",
-#else
"objc_1msgSend__JJJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIIII",
-#else
"objc_1msgSend__JJJJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIIIII",
-#else
"objc_1msgSend__JJJJJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIIIIII",
-#else
"objc_1msgSend__JJJJJJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIIIIZZIII",
-#else
- "objc_1msgSend__JJJJJJJZZJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIIIIZZIIII",
-#else
"objc_1msgSend__JJJJJJJZZJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIIZ",
-#else
"objc_1msgSend__JJJJJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIILorg_eclipse_swt_internal_cocoa_NSRange_2",
-#else
"objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIIZ",
-#else
"objc_1msgSend__JJJJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2I",
-#else
"objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIIIII",
-#else
"objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIISII",
-#else
"objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2IIIZ",
-#else
"objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRange_2",
-#else
"objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIIZ",
-#else
"objc_1msgSend__JJJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFF",
-#else
- "objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFFZ",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_3F",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2I",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF",
-#else
- "objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2I",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2F",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2FF",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2III",
-#else
- "objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZ",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZI",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IZI",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
- "objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Z",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2ZZ",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2",
-#else
"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIZ",
-#else
"objc_1msgSend__JJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIZI",
-#else
"objc_1msgSend__JJZJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3B",
-#else
"objc_1msgSend__JJ_3B",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3BI",
-#else
"objc_1msgSend__JJ_3BJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3C",
-#else
"objc_1msgSend__JJ_3C",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3CI",
-#else
"objc_1msgSend__JJ_3CJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3CLorg_eclipse_swt_internal_cocoa_NSRange_2",
-#else
"objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3F",
-#else
"objc_1msgSend__JJ_3D",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3FIF",
-#else
"objc_1msgSend__JJ_3DJD",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3I",
-#else
- "objc_1msgSend__JJ_3J",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3II",
-#else
+ "objc_1msgSend__JJ_3I",
"objc_1msgSend__JJ_3IJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend__II_3III",
-#else
"objc_1msgSend__JJ_3JII",
-#endif
- "objc_1msgSend__JJI",
- "objc_1msgSend__JJ_3I",
"objc_1msgSend__JJ_3JJJ",
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2I",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2II",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2III",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIII",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIIZ",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIZ",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSSize_2",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRange_2I",
-#else
"objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2II",
-#else
"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2I",
-#else
"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ",
-#else
"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__II",
-#else
"objc_1msgSend_1bool__JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__III",
-#else
"objc_1msgSend_1bool__JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IIII",
-#else
"objc_1msgSend_1bool__JJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IIIII",
-#else
"objc_1msgSend_1bool__JJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IIIIII",
-#else
"objc_1msgSend_1bool__JJJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IIIIIII",
-#else
"objc_1msgSend_1bool__JJJJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSSize_2Z",
-#else
"objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRange_2I",
-#else
"objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1bool__IIS",
-#else
- "objc_1msgSend_1bool__JJS",
-#endif
"objc_1msgSend_1floatret",
-#ifndef JNI64
- "objc_1msgSend_1fpret__II",
-#else
"objc_1msgSend_1fpret__JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1fpret__III",
-#else
"objc_1msgSend_1fpret__JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1fpret__IIII",
-#else
"objc_1msgSend_1fpret__JJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II",
-#else
+ "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSOperatingSystemVersion_2JJ",
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2II",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2III",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2III",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIII",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIIIZ",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2II",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSRect_2",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I",
-#else
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2IIIII",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2ZZI",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ",
-#endif
-#ifndef JNI64
- "objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ",
-#else
"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ",
-#endif
"objc_1registerClassPair",
"objc_1super_1sizeof",
"object_1getClass",
@@ -1300,7 +531,6 @@ char * OS_nativeFunctionNames[] = {
"object_1getInstanceVariable",
"object_1setClass",
"object_1setInstanceVariable",
- "sel_1getName",
"sel_1registerName",
};
#define NATIVE_FUNCTION_COUNT sizeof(OS_nativeFunctionNames) / sizeof(char*)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
index 374c17e420..7e70fb9134 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -31,7 +31,6 @@ extern char* OS_nativeFunctionNames[];
#endif
typedef enum {
- ATSFontActivateFromFileReference_FUNC,
AcquireRootMenu_FUNC,
CALLBACK_1NSTextAttachmentCell_1attachment_FUNC,
CALLBACK_1NSTextAttachmentCell_1cellSize_FUNC,
@@ -44,8 +43,6 @@ typedef enum {
CALLBACK_1cellSizeForBounds_1_FUNC,
CALLBACK_1characterIndexForPoint_1_FUNC,
CALLBACK_1columnAtPoint_1_FUNC,
- CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1_FUNC,
- CALLBACK_1draggedImage_1beganAt_1_FUNC,
CALLBACK_1draggedImage_1endedAt_1operation_1_FUNC,
CALLBACK_1drawBackgroundInClipRect_1_FUNC,
CALLBACK_1drawBezelWithFrame_1inView_1_FUNC,
@@ -69,7 +66,6 @@ typedef enum {
CALLBACK_1selectedRange_FUNC,
CALLBACK_1setFrameOrigin_1_FUNC,
CALLBACK_1setFrameSize_1_FUNC,
- CALLBACK_1setFrame_1_FUNC,
CALLBACK_1setMarkedText_1selectedRange_1_FUNC,
CALLBACK_1setNeedsDisplayInRect_1_FUNC,
CALLBACK_1shouldChangeTextInRange_1replacementString_1_FUNC,
@@ -78,26 +74,17 @@ typedef enum {
CALLBACK_1titleRectForBounds_1_FUNC,
CALLBACK_1view_1stringForToolTip_1point_1userData_1_FUNC,
CALLBACK_1webView_1setFrame_1_FUNC,
- CFAttributedStringCreate_FUNC,
CFDataGetBytePtr_FUNC,
CFDataGetLength_FUNC,
- CFDictionaryAddValue_FUNC,
- CFDictionaryCreateMutable_FUNC,
- CFRange_1sizeof_FUNC,
CFRelease_FUNC,
CFRunLoopAddObserver_FUNC,
CFRunLoopGetCurrent_FUNC,
CFRunLoopObserverCreate_FUNC,
CFRunLoopObserverInvalidate_FUNC,
- CFRunLoopRunInMode_FUNC,
- CFRunLoopStop_FUNC,
- CFStringCreateWithCharacters_FUNC,
CFURLCreateFromFSRef_FUNC,
CFURLCreateStringByAddingPercentEscapes_FUNC,
CGAffineTransform_1sizeof_FUNC,
CGBitmapContextCreate_FUNC,
- CGBitmapContextCreateImage_FUNC,
- CGBitmapContextGetData_FUNC,
CGColorCreate_FUNC,
CGColorRelease_FUNC,
CGColorSpaceCreateDeviceRGB_FUNC,
@@ -105,7 +92,6 @@ typedef enum {
CGContextAddPath_FUNC,
CGContextBeginTransparencyLayerWithRect_FUNC,
CGContextCopyPath_FUNC,
- CGContextCopyWindowContentsToRect_FUNC,
CGContextDrawImage_FUNC,
CGContextEndTransparencyLayer_FUNC,
CGContextFillRect_FUNC,
@@ -122,22 +108,12 @@ typedef enum {
CGContextSetLineJoin_FUNC,
CGContextSetLineWidth_FUNC,
CGContextSetMiterLimit_FUNC,
- CGContextSetShouldAntialias_FUNC,
- CGContextSetTextDrawingMode_FUNC,
- CGContextSetTextMatrix_FUNC,
- CGContextSetTextPosition_FUNC,
CGContextStrokePath_FUNC,
CGContextTranslateCTM_FUNC,
CGDataProviderCreateWithData_FUNC,
CGDataProviderRelease_FUNC,
- CGDisplayBaseAddress_FUNC,
- CGDisplayBitsPerPixel_FUNC,
- CGDisplayBitsPerSample_FUNC,
CGDisplayBounds_FUNC,
- CGDisplayBytesPerRow_FUNC,
CGDisplayCreateImage_FUNC,
- CGDisplayPixelsHigh_FUNC,
- CGDisplayPixelsWide_FUNC,
CGEventCreateKeyboardEvent_FUNC,
CGEventCreateMouseEvent_FUNC,
CGEventCreateScrollWheelEvent_FUNC,
@@ -151,54 +127,30 @@ typedef enum {
CGImageRelease_FUNC,
CGPathAddCurveToPoint_FUNC,
CGPathAddLineToPoint_FUNC,
- CGPathAddRect_FUNC,
CGPathApply_FUNC,
CGPathCloseSubpath_FUNC,
- CGPathCreateCopy_FUNC,
CGPathCreateMutable_FUNC,
CGPathElement_1sizeof_FUNC,
CGPathMoveToPoint_FUNC,
CGPathRelease_FUNC,
CGPoint_1sizeof_FUNC,
- CGPostKeyboardEvent_FUNC,
CGRect_1sizeof_FUNC,
- CGSetLocalEventsFilterDuringSuppressionState_FUNC,
- CGSetLocalEventsSuppressionInterval_FUNC,
CGSize_1sizeof_FUNC,
- CGWarpMouseCursorPosition_FUNC,
CPSSetProcessName_FUNC,
- CTFontGetAscent_FUNC,
- CTFontGetDescent_FUNC,
- CTFontGetLeading_FUNC,
- CTLineCreateWithAttributedString_FUNC,
- CTLineDraw_FUNC,
- CTLineGetTypographicBounds_FUNC,
- CTParagraphStyleCreate_FUNC,
- CTParagraphStyleSetting_1sizeof_FUNC,
- CTTypesetterCreateLine_FUNC,
- CTTypesetterCreateWithAttributedString_FUNC,
- CTTypesetterSuggestLineBreak_FUNC,
+ CTFontManagerRegisterFontsForURL_FUNC,
CancelMenuTracking_FUNC,
CloseRgn_FUNC,
CopyRgn_FUNC,
DeleteGlobalRef_FUNC,
- DeleteMenuItem_FUNC,
DiffRgn_FUNC,
DisposeRgn_FUNC,
EmptyRgn_FUNC,
- FSPathMakeRef_FUNC,
- FindWindow_FUNC,
- Gestalt_FUNC,
- GetCurrentEventButtonState_FUNC,
GetCurrentProcess_FUNC,
- GetDblTime_FUNC,
GetIconRefFromTypeInfo_FUNC,
- GetIndMenuItemWithCommandID_FUNC,
GetRegionBounds_FUNC,
GetSystemUIMode_FUNC,
GetThemeMetric_FUNC,
HIThemeDrawFocusRect_FUNC,
- HIWindowGetCGWindowID_FUNC,
JNIGetObject_FUNC,
JSEvaluateScript_FUNC,
JSStringCreateWithUTF8CString_FUNC,
@@ -207,16 +159,13 @@ typedef enum {
LSGetApplicationForInfo_FUNC,
LineTo_FUNC,
MoveTo_FUNC,
- NSAccessibilityActionDescription_FUNC,
NSAccessibilityAttributedStringForRangeParameterizedAttribute_FUNC,
NSAccessibilityBackgroundColorTextAttribute_FUNC,
NSAccessibilityBoundsForRangeParameterizedAttribute_FUNC,
NSAccessibilityButtonRole_FUNC,
NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC,
- NSAccessibilityCellRole_FUNC,
NSAccessibilityCheckBoxRole_FUNC,
NSAccessibilityChildrenAttribute_FUNC,
- NSAccessibilityColorWellRole_FUNC,
NSAccessibilityColumnIndexRangeAttribute_FUNC,
NSAccessibilityColumnRole_FUNC,
NSAccessibilityColumnsAttribute_FUNC,
@@ -227,32 +176,24 @@ typedef enum {
NSAccessibilityDialogSubrole_FUNC,
NSAccessibilityEnabledAttribute_FUNC,
NSAccessibilityExpandedAttribute_FUNC,
- NSAccessibilityFloatingWindowSubrole_FUNC,
NSAccessibilityFocusedAttribute_FUNC,
NSAccessibilityFocusedUIElementChangedNotification_FUNC,
- NSAccessibilityFocusedWindowChangedNotification_FUNC,
NSAccessibilityFontFamilyKey_FUNC,
NSAccessibilityFontNameKey_FUNC,
NSAccessibilityFontSizeKey_FUNC,
NSAccessibilityFontTextAttribute_FUNC,
NSAccessibilityForegroundColorTextAttribute_FUNC,
- NSAccessibilityGridRole_FUNC,
NSAccessibilityGroupRole_FUNC,
NSAccessibilityHeaderAttribute_FUNC,
NSAccessibilityHelpAttribute_FUNC,
NSAccessibilityHelpTagRole_FUNC,
NSAccessibilityHorizontalOrientationValue_FUNC,
- NSAccessibilityHorizontalScrollBarAttribute_FUNC,
NSAccessibilityImageRole_FUNC,
- NSAccessibilityIncrementorRole_FUNC,
NSAccessibilityIndexAttribute_FUNC,
NSAccessibilityInsertionPointLineNumberAttribute_FUNC,
- NSAccessibilityLabelValueAttribute_FUNC,
NSAccessibilityLineForIndexParameterizedAttribute_FUNC,
NSAccessibilityLinkRole_FUNC,
NSAccessibilityLinkTextAttribute_FUNC,
- NSAccessibilityLinkedUIElementsAttribute_FUNC,
- NSAccessibilityListRole_FUNC,
NSAccessibilityMaxValueAttribute_FUNC,
NSAccessibilityMenuBarRole_FUNC,
NSAccessibilityMenuButtonRole_FUNC,
@@ -267,29 +208,22 @@ typedef enum {
NSAccessibilityOutlineRole_FUNC,
NSAccessibilityOutlineRowSubrole_FUNC,
NSAccessibilityParentAttribute_FUNC,
- NSAccessibilityPopUpButtonRole_FUNC,
NSAccessibilityPositionAttribute_FUNC,
NSAccessibilityPostNotification_FUNC,
NSAccessibilityPressAction_FUNC,
NSAccessibilityPreviousContentsAttribute_FUNC,
NSAccessibilityProgressIndicatorRole_FUNC,
- NSAccessibilityRTFForRangeParameterizedAttribute_FUNC,
NSAccessibilityRadioButtonRole_FUNC,
- NSAccessibilityRadioGroupRole_FUNC,
- NSAccessibilityRaiseBadArgumentException_FUNC,
NSAccessibilityRangeForIndexParameterizedAttribute_FUNC,
NSAccessibilityRangeForLineParameterizedAttribute_FUNC,
NSAccessibilityRangeForPositionParameterizedAttribute_FUNC,
- NSAccessibilityResizedNotification_FUNC,
NSAccessibilityRoleAttribute_FUNC,
NSAccessibilityRoleDescription_FUNC,
NSAccessibilityRoleDescriptionAttribute_FUNC,
- NSAccessibilityRoleDescriptionForUIElement_FUNC,
NSAccessibilityRowCountChangedNotification_FUNC,
NSAccessibilityRowIndexRangeAttribute_FUNC,
NSAccessibilityRowRole_FUNC,
NSAccessibilityRowsAttribute_FUNC,
- NSAccessibilityScrollAreaRole_FUNC,
NSAccessibilityScrollBarRole_FUNC,
NSAccessibilitySelectedAttribute_FUNC,
NSAccessibilitySelectedChildrenAttribute_FUNC,
@@ -305,44 +239,33 @@ typedef enum {
NSAccessibilityShowMenuAction_FUNC,
NSAccessibilitySizeAttribute_FUNC,
NSAccessibilitySliderRole_FUNC,
- NSAccessibilitySortButtonRole_FUNC,
NSAccessibilitySplitterRole_FUNC,
- NSAccessibilityStandardWindowSubrole_FUNC,
NSAccessibilityStaticTextRole_FUNC,
NSAccessibilityStrikethroughColorTextAttribute_FUNC,
NSAccessibilityStrikethroughTextAttribute_FUNC,
NSAccessibilityStringForRangeParameterizedAttribute_FUNC,
NSAccessibilityStyleRangeForIndexParameterizedAttribute_FUNC,
NSAccessibilitySubroleAttribute_FUNC,
- NSAccessibilitySuperscriptTextAttribute_FUNC,
- NSAccessibilitySystemDialogSubrole_FUNC,
NSAccessibilityTabGroupRole_FUNC,
NSAccessibilityTableRole_FUNC,
NSAccessibilityTableRowSubrole_FUNC,
NSAccessibilityTabsAttribute_FUNC,
NSAccessibilityTextAreaRole_FUNC,
NSAccessibilityTextFieldRole_FUNC,
- NSAccessibilityTextLinkSubrole_FUNC,
NSAccessibilityTitleAttribute_FUNC,
NSAccessibilityTitleChangedNotification_FUNC,
NSAccessibilityTitleUIElementAttribute_FUNC,
NSAccessibilityToolbarRole_FUNC,
NSAccessibilityTopLevelUIElementAttribute_FUNC,
- NSAccessibilityURLAttribute_FUNC,
NSAccessibilityUnderlineColorTextAttribute_FUNC,
NSAccessibilityUnderlineTextAttribute_FUNC,
NSAccessibilityUnignoredAncestor_FUNC,
NSAccessibilityUnignoredChildren_FUNC,
- NSAccessibilityUnignoredChildrenForOnlyChild_FUNC,
- NSAccessibilityUnignoredDescendant_FUNC,
NSAccessibilityUnknownRole_FUNC,
NSAccessibilityUnknownSubrole_FUNC,
NSAccessibilityValueAttribute_FUNC,
NSAccessibilityValueChangedNotification_FUNC,
- NSAccessibilityValueDescriptionAttribute_FUNC,
- NSAccessibilityValueIndicatorRole_FUNC,
NSAccessibilityVerticalOrientationValue_FUNC,
- NSAccessibilityVerticalScrollBarAttribute_FUNC,
NSAccessibilityVisibleCharacterRangeAttribute_FUNC,
NSAccessibilityVisibleChildrenAttribute_FUNC,
NSAccessibilityVisibleColumnsAttribute_FUNC,
@@ -357,30 +280,26 @@ typedef enum {
NSBaselineOffsetAttributeName_FUNC,
NSBeep_FUNC,
NSBitsPerPixelFromDepth_FUNC,
- NSCalibratedRGBColorSpace_FUNC,
- NSCountWindows_FUNC,
NSCursorAttributeName_FUNC,
NSDefaultRunLoopMode_FUNC,
NSDeviceRGBColorSpace_FUNC,
NSDeviceResolution_FUNC,
NSDragPboard_FUNC,
NSEqualRects_FUNC,
- NSErrorFailingURLStringKey_FUNC,
NSEventTrackingRunLoopMode_FUNC,
- NSFileTypeForHFSTypeCode_FUNC,
NSFilenamesPboardType_FUNC,
NSFontAttributeName_FUNC,
NSForegroundColorAttributeName_FUNC,
- NSGetSizeAndAlignment_FUNC,
+ NSImageNameCaution_FUNC,
+ NSImageNameInfo_FUNC,
NSIntersectionRect_FUNC,
NSLigatureAttributeName_FUNC,
NSLinkAttributeName_FUNC,
NSLocaleLanguageCode_FUNC,
NSModalPanelRunLoopMode_FUNC,
NSNotFound_FUNC,
- NSNumberOfColorComponents_FUNC,
NSObliquenessAttributeName_FUNC,
- NSOutlineViewColumnDidMoveNotification_FUNC,
+ NSOperatingSystemVersion_1sizeof_FUNC,
NSParagraphStyleAttributeName_FUNC,
NSPasteboardTypeHTML_FUNC,
NSPasteboardTypeRTF_FUNC,
@@ -398,30 +317,19 @@ typedef enum {
NSPrintSaveJob_FUNC,
NSPrintSavePath_FUNC,
NSPrintScalingFactor_FUNC,
- NSPrintSpoolJob_FUNC,
NSRange_1sizeof_FUNC,
NSRectFillUsingOperation_FUNC,
NSRect_1sizeof_FUNC,
NSSearchPathForDirectoriesInDomains_FUNC,
NSSize_1sizeof_FUNC,
- NSSpellingStateAttributeName_FUNC,
NSSquareStatusItemLength_FUNC,
NSStrikethroughColorAttributeName_FUNC,
NSStrikethroughStyleAttributeName_FUNC,
NSStrokeWidthAttributeName_FUNC,
NSSystemColorsDidChangeNotification_FUNC,
NSTIFFPboardType_FUNC,
- NSTableViewColumnDidMoveNotification_FUNC,
- NSTemporaryDirectory_FUNC,
- NSToolbarCustomizeToolbarItemIdentifier_FUNC,
- NSToolbarDidRemoveItemNotification_FUNC,
NSToolbarFlexibleSpaceItemIdentifier_FUNC,
- NSToolbarPrintItemIdentifier_FUNC,
- NSToolbarSeparatorItemIdentifier_FUNC,
- NSToolbarShowColorsItemIdentifier_FUNC,
- NSToolbarShowFontsItemIdentifier_FUNC,
NSToolbarSpaceItemIdentifier_FUNC,
- NSToolbarWillAddItemNotification_FUNC,
NSURLPboardType_FUNC,
NSUnderlineColorAttributeName_FUNC,
NSUnderlineStyleAttributeName_FUNC,
@@ -454,14 +362,11 @@ typedef enum {
SectRgn_FUNC,
SetRect_FUNC,
SetSystemUIMode_FUNC,
- SetThemeCursor_FUNC,
TISCopyCurrentKeyboardInputSource_FUNC,
TISGetInputSourceProperty_FUNC,
- TransformProcessType_FUNC,
UCKeyTranslate_FUNC,
UTTypeEqual_FUNC,
UnionRgn_FUNC,
- _1_1BIG_1ENDIAN_1_1_FUNC,
beginSheetModalForWindow_FUNC,
call_FUNC,
class_1addIvar_FUNC,
@@ -478,134 +383,19 @@ typedef enum {
isFlipped_1CALLBACK_FUNC,
kCFAllocatorDefault_FUNC,
kCFRunLoopCommonModes_FUNC,
- kCFTypeDictionaryKeyCallBacks_FUNC,
- kCFTypeDictionaryValueCallBacks_FUNC,
- kCTFontAttributeName_FUNC,
- kCTForegroundColorAttributeName_FUNC,
- kCTParagraphStyleAttributeName_FUNC,
kTISPropertyUnicodeKeyLayoutData_FUNC,
kUTTypeFileURL_FUNC,
kUTTypeURL_FUNC,
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I_FUNC,
-#else
- memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I_FUNC,
-#else
- memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I_FUNC,
-#else
memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_CGPoint_2I_FUNC,
-#else
- memmove__JLorg_eclipse_swt_internal_cocoa_CGPoint_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_CGRect_2I_FUNC,
-#else
- memmove__JLorg_eclipse_swt_internal_cocoa_CGRect_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_CGSize_2I_FUNC,
-#else
- memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I_FUNC,
-#else
- memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I_FUNC,
-#else
- memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC,
-#else
memmove__JLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC,
-#else
memmove__JLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
memmove__JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__ILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC,
-#else
memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II_FUNC,
-#else
memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2II_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_cocoa_CGPoint_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2II_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_cocoa_CGRect_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2II_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC,
-#else
memmove__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC,
-#else
memmove__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC,
-#else
memmove__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC,
-#endif
-#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2II_FUNC,
-#else
memmove__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ_FUNC,
-#endif
method_1setImplementation_FUNC,
objc_1allocateClassPair_FUNC,
objc_1disposeClassPair_FUNC,
@@ -613,696 +403,137 @@ typedef enum {
objc_1getMetaClass_FUNC,
objc_1getProtocol_FUNC,
objc_1lookUpClass_FUNC,
-#ifndef JNI64
- objc_1msgSend__II_FUNC,
-#else
objc_1msgSend__JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IID_FUNC,
-#else
objc_1msgSend__JJD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIDIIIZ_FUNC,
-#else
- objc_1msgSend__JJDJJJZ_FUNC,
-#endif
- objc_1msgSend__IIF_FUNC,
-#ifndef JNI64
- objc_1msgSend__IIFF_FUNC,
-#else
objc_1msgSend__JJDD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIFFFF_FUNC,
-#else
objc_1msgSend__JJDDDD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIFI_FUNC,
-#else
- objc_1msgSend__JJDJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__III_FUNC,
-#else
+ objc_1msgSend__JJDJJJZ_FUNC,
+ objc_1msgSend__JJI_FUNC,
objc_1msgSend__JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIF_FUNC,
-#else
objc_1msgSend__JJJD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIII_FUNC,
-#else
objc_1msgSend__JJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIDI_FUNC,
-#else
objc_1msgSend__JJJJDJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIII_FUNC,
-#else
objc_1msgSend__JJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIIF_FUNC,
-#else
- objc_1msgSend__JJJJJD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIII_FUNC,
-#else
objc_1msgSend__JJJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIIII_FUNC,
-#else
objc_1msgSend__JJJJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIIIII_FUNC,
-#else
objc_1msgSend__JJJJJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIIIIII_FUNC,
-#else
objc_1msgSend__JJJJJJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIIIIZZIII_FUNC,
-#else
- objc_1msgSend__JJJJJJJZZJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIIIIZZIIII_FUNC,
-#else
objc_1msgSend__JJJJJJJZZJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIIZ_FUNC,
-#else
objc_1msgSend__JJJJJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#else
objc_1msgSend__JJJJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIIZ_FUNC,
-#else
objc_1msgSend__JJJJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC,
-#else
objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIIIII_FUNC,
-#else
objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2IDIISII_FUNC,
-#else
objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2JDJJSJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2IIIZ_FUNC,
-#else
objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSSize_2JJJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#else
objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSend__JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIIZ_FUNC,
-#else
objc_1msgSend__JJJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFF_FUNC,
-#else
- objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2FFFZ_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2DDDZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_3F_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_3D_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF_FUNC,
-#else
- objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2F_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2D_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2FF_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2DD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2III_FUNC,
-#else
- objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZ_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IIZI_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JJZJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2IZI_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2JZJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
- objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2IF_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSRect_2JD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2Z_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2Z_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2ZZ_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRect_2ZZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#else
objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIZ_FUNC,
-#else
objc_1msgSend__JJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIZI_FUNC,
-#else
objc_1msgSend__JJZJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3B_FUNC,
-#else
objc_1msgSend__JJ_3B_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3BI_FUNC,
-#else
objc_1msgSend__JJ_3BJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3C_FUNC,
-#else
objc_1msgSend__JJ_3C_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3CI_FUNC,
-#else
objc_1msgSend__JJ_3CJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3CLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#else
objc_1msgSend__JJ_3CLorg_eclipse_swt_internal_cocoa_NSRange_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3F_FUNC,
-#else
objc_1msgSend__JJ_3D_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3FIF_FUNC,
-#else
objc_1msgSend__JJ_3DJD_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3I_FUNC,
-#else
- objc_1msgSend__JJ_3J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3II_FUNC,
-#else
+ objc_1msgSend__JJ_3I_FUNC,
objc_1msgSend__JJ_3IJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend__II_3III_FUNC,
-#else
objc_1msgSend__JJ_3JII_FUNC,
-#endif
- objc_1msgSend__JJI_FUNC,
- objc_1msgSend__JJ_3I_FUNC,
objc_1msgSend__JJ_3JJJ_FUNC,
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2I_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2II_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2III_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIII_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIIIZ_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IIZ_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC,
-#else
objc_1msgSendSuper_1bool__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2II_FUNC,
-#else
objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2I_FUNC,
-#else
objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC,
-#else
objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__II_FUNC,
-#else
objc_1msgSend_1bool__JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__III_FUNC,
-#else
objc_1msgSend_1bool__JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IIII_FUNC,
-#else
objc_1msgSend_1bool__JJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IIIII_FUNC,
-#else
objc_1msgSend_1bool__JJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IIIIII_FUNC,
-#else
objc_1msgSend_1bool__JJJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IIIIIII_FUNC,
-#else
objc_1msgSend_1bool__JJJJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IIILorg_eclipse_swt_internal_cocoa_NSSize_2Z_FUNC,
-#else
objc_1msgSend_1bool__JJJLorg_eclipse_swt_internal_cocoa_NSSize_2Z_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSPoint_2Lorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC,
-#else
objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1bool__IIS_FUNC,
-#else
- objc_1msgSend_1bool__JJS_FUNC,
-#endif
objc_1msgSend_1floatret_FUNC,
-#ifndef JNI64
- objc_1msgSend_1fpret__II_FUNC,
-#else
objc_1msgSend_1fpret__JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1fpret__III_FUNC,
-#else
objc_1msgSend_1fpret__JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1fpret__IIII_FUNC,
-#else
objc_1msgSend_1fpret__JJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC,
-#else
+ objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSOperatingSystemVersion_2JJ_FUNC,
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2III_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRange_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2III_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIII_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIIIZ_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJJZ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IIILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRange_2I_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2II_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2I_FUNC,
-#else
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2IIIII_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2JJJJJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IILorg_eclipse_swt_internal_cocoa_NSSize_2ZZI_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ_FUNC,
-#endif
-#ifndef JNI64
- objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ_FUNC,
-#else
objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ_FUNC,
-#endif
objc_1registerClassPair_FUNC,
objc_1super_1sizeof_FUNC,
object_1getClass_FUNC,
@@ -1310,6 +541,5 @@ typedef enum {
object_1getInstanceVariable_FUNC,
object_1setClass_FUNC,
object_1setInstanceVariable_FUNC,
- sel_1getName_FUNC,
sel_1registerName_FUNC,
} OS_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c
index 6db699c975..1162009a99 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,40 +18,6 @@
#include "swt.h"
#include "os_structs.h"
-#ifndef NO_CFRange
-typedef struct CFRange_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID location, length;
-} CFRange_FID_CACHE;
-
-CFRange_FID_CACHE CFRangeFc;
-
-void cacheCFRangeFields(JNIEnv *env, jobject lpObject)
-{
- if (CFRangeFc.cached) return;
- CFRangeFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CFRangeFc.location = (*env)->GetFieldID(env, CFRangeFc.clazz, "location", I_J);
- CFRangeFc.length = (*env)->GetFieldID(env, CFRangeFc.clazz, "length", I_J);
- CFRangeFc.cached = 1;
-}
-
-CFRange *getCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct)
-{
- if (!CFRangeFc.cached) cacheCFRangeFields(env, lpObject);
- lpStruct->location = (*env)->GetIntLongField(env, lpObject, CFRangeFc.location);
- lpStruct->length = (*env)->GetIntLongField(env, lpObject, CFRangeFc.length);
- return lpStruct;
-}
-
-void setCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct)
-{
- if (!CFRangeFc.cached) cacheCFRangeFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, CFRangeFc.location, (jintLong)lpStruct->location);
- (*env)->SetIntLongField(env, lpObject, CFRangeFc.length, (jintLong)lpStruct->length);
-}
-#endif
-
#ifndef NO_CGAffineTransform
typedef struct CGAffineTransform_FID_CACHE {
int cached;
@@ -65,36 +31,36 @@ void cacheCGAffineTransformFields(JNIEnv *env, jobject lpObject)
{
if (CGAffineTransformFc.cached) return;
CGAffineTransformFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CGAffineTransformFc.a = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "a", F_D);
- CGAffineTransformFc.b = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "b", F_D);
- CGAffineTransformFc.c = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "c", F_D);
- CGAffineTransformFc.d = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "d", F_D);
- CGAffineTransformFc.tx = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "tx", F_D);
- CGAffineTransformFc.ty = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "ty", F_D);
+ CGAffineTransformFc.a = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "a", "D");
+ CGAffineTransformFc.b = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "b", "D");
+ CGAffineTransformFc.c = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "c", "D");
+ CGAffineTransformFc.d = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "d", "D");
+ CGAffineTransformFc.tx = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "tx", "D");
+ CGAffineTransformFc.ty = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "ty", "D");
CGAffineTransformFc.cached = 1;
}
CGAffineTransform *getCGAffineTransformFields(JNIEnv *env, jobject lpObject, CGAffineTransform *lpStruct)
{
if (!CGAffineTransformFc.cached) cacheCGAffineTransformFields(env, lpObject);
- lpStruct->a = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.a);
- lpStruct->b = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.b);
- lpStruct->c = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.c);
- lpStruct->d = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.d);
- lpStruct->tx = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.tx);
- lpStruct->ty = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.ty);
+ lpStruct->a = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGAffineTransformFc.a);
+ lpStruct->b = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGAffineTransformFc.b);
+ lpStruct->c = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGAffineTransformFc.c);
+ lpStruct->d = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGAffineTransformFc.d);
+ lpStruct->tx = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGAffineTransformFc.tx);
+ lpStruct->ty = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGAffineTransformFc.ty);
return lpStruct;
}
void setCGAffineTransformFields(JNIEnv *env, jobject lpObject, CGAffineTransform *lpStruct)
{
if (!CGAffineTransformFc.cached) cacheCGAffineTransformFields(env, lpObject);
- (*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.a, (jfloatDouble)lpStruct->a);
- (*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.b, (jfloatDouble)lpStruct->b);
- (*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.c, (jfloatDouble)lpStruct->c);
- (*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.d, (jfloatDouble)lpStruct->d);
- (*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.tx, (jfloatDouble)lpStruct->tx);
- (*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.ty, (jfloatDouble)lpStruct->ty);
+ (*env)->SetDoubleField(env, lpObject, CGAffineTransformFc.a, (jdouble)lpStruct->a);
+ (*env)->SetDoubleField(env, lpObject, CGAffineTransformFc.b, (jdouble)lpStruct->b);
+ (*env)->SetDoubleField(env, lpObject, CGAffineTransformFc.c, (jdouble)lpStruct->c);
+ (*env)->SetDoubleField(env, lpObject, CGAffineTransformFc.d, (jdouble)lpStruct->d);
+ (*env)->SetDoubleField(env, lpObject, CGAffineTransformFc.tx, (jdouble)lpStruct->tx);
+ (*env)->SetDoubleField(env, lpObject, CGAffineTransformFc.ty, (jdouble)lpStruct->ty);
}
#endif
@@ -112,7 +78,7 @@ void cacheCGPathElementFields(JNIEnv *env, jobject lpObject)
if (CGPathElementFc.cached) return;
CGPathElementFc.clazz = (*env)->GetObjectClass(env, lpObject);
CGPathElementFc.type = (*env)->GetFieldID(env, CGPathElementFc.clazz, "type", "I");
- CGPathElementFc.points = (*env)->GetFieldID(env, CGPathElementFc.clazz, "points", I_J);
+ CGPathElementFc.points = (*env)->GetFieldID(env, CGPathElementFc.clazz, "points", "J");
CGPathElementFc.cached = 1;
}
@@ -120,7 +86,7 @@ CGPathElement *getCGPathElementFields(JNIEnv *env, jobject lpObject, CGPathEleme
{
if (!CGPathElementFc.cached) cacheCGPathElementFields(env, lpObject);
lpStruct->type = (CGPathElementType)(*env)->GetIntField(env, lpObject, CGPathElementFc.type);
- lpStruct->points = (CGPoint *)(*env)->GetIntLongField(env, lpObject, CGPathElementFc.points);
+ lpStruct->points = (CGPoint*)(*env)->GetLongField(env, lpObject, CGPathElementFc.points);
return lpStruct;
}
@@ -128,7 +94,7 @@ void setCGPathElementFields(JNIEnv *env, jobject lpObject, CGPathElement *lpStru
{
if (!CGPathElementFc.cached) cacheCGPathElementFields(env, lpObject);
(*env)->SetIntField(env, lpObject, CGPathElementFc.type, (jint)lpStruct->type);
- (*env)->SetIntLongField(env, lpObject, CGPathElementFc.points, (jintLong)lpStruct->points);
+ (*env)->SetLongField(env, lpObject, CGPathElementFc.points, (jlong)lpStruct->points);
}
#endif
@@ -145,24 +111,24 @@ void cacheCGPointFields(JNIEnv *env, jobject lpObject)
{
if (CGPointFc.cached) return;
CGPointFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CGPointFc.x = (*env)->GetFieldID(env, CGPointFc.clazz, "x", F_D);
- CGPointFc.y = (*env)->GetFieldID(env, CGPointFc.clazz, "y", F_D);
+ CGPointFc.x = (*env)->GetFieldID(env, CGPointFc.clazz, "x", "D");
+ CGPointFc.y = (*env)->GetFieldID(env, CGPointFc.clazz, "y", "D");
CGPointFc.cached = 1;
}
CGPoint *getCGPointFields(JNIEnv *env, jobject lpObject, CGPoint *lpStruct)
{
if (!CGPointFc.cached) cacheCGPointFields(env, lpObject);
- lpStruct->x = (*env)->GetFloatDoubleField(env, lpObject, CGPointFc.x);
- lpStruct->y = (*env)->GetFloatDoubleField(env, lpObject, CGPointFc.y);
+ lpStruct->x = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGPointFc.x);
+ lpStruct->y = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGPointFc.y);
return lpStruct;
}
void setCGPointFields(JNIEnv *env, jobject lpObject, CGPoint *lpStruct)
{
if (!CGPointFc.cached) cacheCGPointFields(env, lpObject);
- (*env)->SetFloatDoubleField(env, lpObject, CGPointFc.x, (jfloatDouble)lpStruct->x);
- (*env)->SetFloatDoubleField(env, lpObject, CGPointFc.y, (jfloatDouble)lpStruct->y);
+ (*env)->SetDoubleField(env, lpObject, CGPointFc.x, (jdouble)lpStruct->x);
+ (*env)->SetDoubleField(env, lpObject, CGPointFc.y, (jdouble)lpStruct->y);
}
#endif
@@ -225,107 +191,107 @@ void cacheCGSizeFields(JNIEnv *env, jobject lpObject)
{
if (CGSizeFc.cached) return;
CGSizeFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CGSizeFc.width = (*env)->GetFieldID(env, CGSizeFc.clazz, "width", F_D);
- CGSizeFc.height = (*env)->GetFieldID(env, CGSizeFc.clazz, "height", F_D);
+ CGSizeFc.width = (*env)->GetFieldID(env, CGSizeFc.clazz, "width", "D");
+ CGSizeFc.height = (*env)->GetFieldID(env, CGSizeFc.clazz, "height", "D");
CGSizeFc.cached = 1;
}
CGSize *getCGSizeFields(JNIEnv *env, jobject lpObject, CGSize *lpStruct)
{
if (!CGSizeFc.cached) cacheCGSizeFields(env, lpObject);
- lpStruct->width = (*env)->GetFloatDoubleField(env, lpObject, CGSizeFc.width);
- lpStruct->height = (*env)->GetFloatDoubleField(env, lpObject, CGSizeFc.height);
+ lpStruct->width = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGSizeFc.width);
+ lpStruct->height = (CGFloat)(*env)->GetDoubleField(env, lpObject, CGSizeFc.height);
return lpStruct;
}
void setCGSizeFields(JNIEnv *env, jobject lpObject, CGSize *lpStruct)
{
if (!CGSizeFc.cached) cacheCGSizeFields(env, lpObject);
- (*env)->SetFloatDoubleField(env, lpObject, CGSizeFc.width, (jfloatDouble)lpStruct->width);
- (*env)->SetFloatDoubleField(env, lpObject, CGSizeFc.height, (jfloatDouble)lpStruct->height);
+ (*env)->SetDoubleField(env, lpObject, CGSizeFc.width, (jdouble)lpStruct->width);
+ (*env)->SetDoubleField(env, lpObject, CGSizeFc.height, (jdouble)lpStruct->height);
}
#endif
-#ifndef NO_CTParagraphStyleSetting
-typedef struct CTParagraphStyleSetting_FID_CACHE {
+#ifndef NO_NSAffineTransformStruct
+typedef struct NSAffineTransformStruct_FID_CACHE {
int cached;
jclass clazz;
- jfieldID spec, valueSize, value;
-} CTParagraphStyleSetting_FID_CACHE;
+ jfieldID m11, m12, m21, m22, tX, tY;
+} NSAffineTransformStruct_FID_CACHE;
-CTParagraphStyleSetting_FID_CACHE CTParagraphStyleSettingFc;
+NSAffineTransformStruct_FID_CACHE NSAffineTransformStructFc;
-void cacheCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject)
+void cacheNSAffineTransformStructFields(JNIEnv *env, jobject lpObject)
{
- if (CTParagraphStyleSettingFc.cached) return;
- CTParagraphStyleSettingFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CTParagraphStyleSettingFc.spec = (*env)->GetFieldID(env, CTParagraphStyleSettingFc.clazz, "spec", "I");
- CTParagraphStyleSettingFc.valueSize = (*env)->GetFieldID(env, CTParagraphStyleSettingFc.clazz, "valueSize", I_J);
- CTParagraphStyleSettingFc.value = (*env)->GetFieldID(env, CTParagraphStyleSettingFc.clazz, "value", I_J);
- CTParagraphStyleSettingFc.cached = 1;
+ if (NSAffineTransformStructFc.cached) return;
+ NSAffineTransformStructFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ NSAffineTransformStructFc.m11 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m11", "D");
+ NSAffineTransformStructFc.m12 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m12", "D");
+ NSAffineTransformStructFc.m21 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m21", "D");
+ NSAffineTransformStructFc.m22 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m22", "D");
+ NSAffineTransformStructFc.tX = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "tX", "D");
+ NSAffineTransformStructFc.tY = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "tY", "D");
+ NSAffineTransformStructFc.cached = 1;
}
-CTParagraphStyleSetting *getCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct)
+NSAffineTransformStruct *getNSAffineTransformStructFields(JNIEnv *env, jobject lpObject, NSAffineTransformStruct *lpStruct)
{
- if (!CTParagraphStyleSettingFc.cached) cacheCTParagraphStyleSettingFields(env, lpObject);
- lpStruct->spec = (CTParagraphStyleSpecifier)(*env)->GetIntField(env, lpObject, CTParagraphStyleSettingFc.spec);
- lpStruct->valueSize = (*env)->GetIntLongField(env, lpObject, CTParagraphStyleSettingFc.valueSize);
- lpStruct->value = (void *)(*env)->GetIntLongField(env, lpObject, CTParagraphStyleSettingFc.value);
+ if (!NSAffineTransformStructFc.cached) cacheNSAffineTransformStructFields(env, lpObject);
+ lpStruct->m11 = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSAffineTransformStructFc.m11);
+ lpStruct->m12 = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSAffineTransformStructFc.m12);
+ lpStruct->m21 = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSAffineTransformStructFc.m21);
+ lpStruct->m22 = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSAffineTransformStructFc.m22);
+ lpStruct->tX = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSAffineTransformStructFc.tX);
+ lpStruct->tY = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSAffineTransformStructFc.tY);
return lpStruct;
}
-void setCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct)
+void setNSAffineTransformStructFields(JNIEnv *env, jobject lpObject, NSAffineTransformStruct *lpStruct)
{
- if (!CTParagraphStyleSettingFc.cached) cacheCTParagraphStyleSettingFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, CTParagraphStyleSettingFc.spec, (jint)lpStruct->spec);
- (*env)->SetIntLongField(env, lpObject, CTParagraphStyleSettingFc.valueSize, (jintLong)lpStruct->valueSize);
- (*env)->SetIntLongField(env, lpObject, CTParagraphStyleSettingFc.value, (jintLong)lpStruct->value);
+ if (!NSAffineTransformStructFc.cached) cacheNSAffineTransformStructFields(env, lpObject);
+ (*env)->SetDoubleField(env, lpObject, NSAffineTransformStructFc.m11, (jdouble)lpStruct->m11);
+ (*env)->SetDoubleField(env, lpObject, NSAffineTransformStructFc.m12, (jdouble)lpStruct->m12);
+ (*env)->SetDoubleField(env, lpObject, NSAffineTransformStructFc.m21, (jdouble)lpStruct->m21);
+ (*env)->SetDoubleField(env, lpObject, NSAffineTransformStructFc.m22, (jdouble)lpStruct->m22);
+ (*env)->SetDoubleField(env, lpObject, NSAffineTransformStructFc.tX, (jdouble)lpStruct->tX);
+ (*env)->SetDoubleField(env, lpObject, NSAffineTransformStructFc.tY, (jdouble)lpStruct->tY);
}
#endif
-#ifndef NO_NSAffineTransformStruct
-typedef struct NSAffineTransformStruct_FID_CACHE {
+#ifndef NO_NSOperatingSystemVersion
+typedef struct NSOperatingSystemVersion_FID_CACHE {
int cached;
jclass clazz;
- jfieldID m11, m12, m21, m22, tX, tY;
-} NSAffineTransformStruct_FID_CACHE;
+ jfieldID majorVersion, minorVersion, patchVersion;
+} NSOperatingSystemVersion_FID_CACHE;
-NSAffineTransformStruct_FID_CACHE NSAffineTransformStructFc;
+NSOperatingSystemVersion_FID_CACHE NSOperatingSystemVersionFc;
-void cacheNSAffineTransformStructFields(JNIEnv *env, jobject lpObject)
+void cacheNSOperatingSystemVersionFields(JNIEnv *env, jobject lpObject)
{
- if (NSAffineTransformStructFc.cached) return;
- NSAffineTransformStructFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NSAffineTransformStructFc.m11 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m11", F_D);
- NSAffineTransformStructFc.m12 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m12", F_D);
- NSAffineTransformStructFc.m21 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m21", F_D);
- NSAffineTransformStructFc.m22 = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "m22", F_D);
- NSAffineTransformStructFc.tX = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "tX", F_D);
- NSAffineTransformStructFc.tY = (*env)->GetFieldID(env, NSAffineTransformStructFc.clazz, "tY", F_D);
- NSAffineTransformStructFc.cached = 1;
+ if (NSOperatingSystemVersionFc.cached) return;
+ NSOperatingSystemVersionFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ NSOperatingSystemVersionFc.majorVersion = (*env)->GetFieldID(env, NSOperatingSystemVersionFc.clazz, "majorVersion", "J");
+ NSOperatingSystemVersionFc.minorVersion = (*env)->GetFieldID(env, NSOperatingSystemVersionFc.clazz, "minorVersion", "J");
+ NSOperatingSystemVersionFc.patchVersion = (*env)->GetFieldID(env, NSOperatingSystemVersionFc.clazz, "patchVersion", "J");
+ NSOperatingSystemVersionFc.cached = 1;
}
-NSAffineTransformStruct *getNSAffineTransformStructFields(JNIEnv *env, jobject lpObject, NSAffineTransformStruct *lpStruct)
+NSOperatingSystemVersion *getNSOperatingSystemVersionFields(JNIEnv *env, jobject lpObject, NSOperatingSystemVersion *lpStruct)
{
- if (!NSAffineTransformStructFc.cached) cacheNSAffineTransformStructFields(env, lpObject);
- lpStruct->m11 = (*env)->GetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m11);
- lpStruct->m12 = (*env)->GetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m12);
- lpStruct->m21 = (*env)->GetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m21);
- lpStruct->m22 = (*env)->GetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m22);
- lpStruct->tX = (*env)->GetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.tX);
- lpStruct->tY = (*env)->GetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.tY);
+ if (!NSOperatingSystemVersionFc.cached) cacheNSOperatingSystemVersionFields(env, lpObject);
+ lpStruct->majorVersion = (NSInteger)(*env)->GetLongField(env, lpObject, NSOperatingSystemVersionFc.majorVersion);
+ lpStruct->minorVersion = (NSInteger)(*env)->GetLongField(env, lpObject, NSOperatingSystemVersionFc.minorVersion);
+ lpStruct->patchVersion = (NSInteger)(*env)->GetLongField(env, lpObject, NSOperatingSystemVersionFc.patchVersion);
return lpStruct;
}
-void setNSAffineTransformStructFields(JNIEnv *env, jobject lpObject, NSAffineTransformStruct *lpStruct)
+void setNSOperatingSystemVersionFields(JNIEnv *env, jobject lpObject, NSOperatingSystemVersion *lpStruct)
{
- if (!NSAffineTransformStructFc.cached) cacheNSAffineTransformStructFields(env, lpObject);
- (*env)->SetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m11, (jfloatDouble)lpStruct->m11);
- (*env)->SetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m12, (jfloatDouble)lpStruct->m12);
- (*env)->SetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m21, (jfloatDouble)lpStruct->m21);
- (*env)->SetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.m22, (jfloatDouble)lpStruct->m22);
- (*env)->SetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.tX, (jfloatDouble)lpStruct->tX);
- (*env)->SetFloatDoubleField(env, lpObject, NSAffineTransformStructFc.tY, (jfloatDouble)lpStruct->tY);
+ if (!NSOperatingSystemVersionFc.cached) cacheNSOperatingSystemVersionFields(env, lpObject);
+ (*env)->SetLongField(env, lpObject, NSOperatingSystemVersionFc.majorVersion, (jlong)lpStruct->majorVersion);
+ (*env)->SetLongField(env, lpObject, NSOperatingSystemVersionFc.minorVersion, (jlong)lpStruct->minorVersion);
+ (*env)->SetLongField(env, lpObject, NSOperatingSystemVersionFc.patchVersion, (jlong)lpStruct->patchVersion);
}
#endif
@@ -342,24 +308,24 @@ void cacheNSPointFields(JNIEnv *env, jobject lpObject)
{
if (NSPointFc.cached) return;
NSPointFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NSPointFc.x = (*env)->GetFieldID(env, NSPointFc.clazz, "x", F_D);
- NSPointFc.y = (*env)->GetFieldID(env, NSPointFc.clazz, "y", F_D);
+ NSPointFc.x = (*env)->GetFieldID(env, NSPointFc.clazz, "x", "D");
+ NSPointFc.y = (*env)->GetFieldID(env, NSPointFc.clazz, "y", "D");
NSPointFc.cached = 1;
}
NSPoint *getNSPointFields(JNIEnv *env, jobject lpObject, NSPoint *lpStruct)
{
if (!NSPointFc.cached) cacheNSPointFields(env, lpObject);
- lpStruct->x = (*env)->GetFloatDoubleField(env, lpObject, NSPointFc.x);
- lpStruct->y = (*env)->GetFloatDoubleField(env, lpObject, NSPointFc.y);
+ lpStruct->x = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSPointFc.x);
+ lpStruct->y = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSPointFc.y);
return lpStruct;
}
void setNSPointFields(JNIEnv *env, jobject lpObject, NSPoint *lpStruct)
{
if (!NSPointFc.cached) cacheNSPointFields(env, lpObject);
- (*env)->SetFloatDoubleField(env, lpObject, NSPointFc.x, (jfloatDouble)lpStruct->x);
- (*env)->SetFloatDoubleField(env, lpObject, NSPointFc.y, (jfloatDouble)lpStruct->y);
+ (*env)->SetDoubleField(env, lpObject, NSPointFc.x, (jdouble)lpStruct->x);
+ (*env)->SetDoubleField(env, lpObject, NSPointFc.y, (jdouble)lpStruct->y);
}
#endif
@@ -376,24 +342,24 @@ void cacheNSRangeFields(JNIEnv *env, jobject lpObject)
{
if (NSRangeFc.cached) return;
NSRangeFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NSRangeFc.location = (*env)->GetFieldID(env, NSRangeFc.clazz, "location", I_J);
- NSRangeFc.length = (*env)->GetFieldID(env, NSRangeFc.clazz, "length", I_J);
+ NSRangeFc.location = (*env)->GetFieldID(env, NSRangeFc.clazz, "location", "J");
+ NSRangeFc.length = (*env)->GetFieldID(env, NSRangeFc.clazz, "length", "J");
NSRangeFc.cached = 1;
}
NSRange *getNSRangeFields(JNIEnv *env, jobject lpObject, NSRange *lpStruct)
{
if (!NSRangeFc.cached) cacheNSRangeFields(env, lpObject);
- lpStruct->location = (*env)->GetIntLongField(env, lpObject, NSRangeFc.location);
- lpStruct->length = (*env)->GetIntLongField(env, lpObject, NSRangeFc.length);
+ lpStruct->location = (NSUInteger)(*env)->GetLongField(env, lpObject, NSRangeFc.location);
+ lpStruct->length = (NSUInteger)(*env)->GetLongField(env, lpObject, NSRangeFc.length);
return lpStruct;
}
void setNSRangeFields(JNIEnv *env, jobject lpObject, NSRange *lpStruct)
{
if (!NSRangeFc.cached) cacheNSRangeFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, NSRangeFc.location, (jintLong)lpStruct->location);
- (*env)->SetIntLongField(env, lpObject, NSRangeFc.length, (jintLong)lpStruct->length);
+ (*env)->SetLongField(env, lpObject, NSRangeFc.location, (jlong)lpStruct->location);
+ (*env)->SetLongField(env, lpObject, NSRangeFc.length, (jlong)lpStruct->length);
}
#endif
@@ -410,30 +376,30 @@ void cacheNSRectFields(JNIEnv *env, jobject lpObject)
{
if (NSRectFc.cached) return;
NSRectFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NSRectFc.x = (*env)->GetFieldID(env, NSRectFc.clazz, "x", F_D);
- NSRectFc.y = (*env)->GetFieldID(env, NSRectFc.clazz, "y", F_D);
- NSRectFc.width = (*env)->GetFieldID(env, NSRectFc.clazz, "width", F_D);
- NSRectFc.height = (*env)->GetFieldID(env, NSRectFc.clazz, "height", F_D);
+ NSRectFc.x = (*env)->GetFieldID(env, NSRectFc.clazz, "x", "D");
+ NSRectFc.y = (*env)->GetFieldID(env, NSRectFc.clazz, "y", "D");
+ NSRectFc.width = (*env)->GetFieldID(env, NSRectFc.clazz, "width", "D");
+ NSRectFc.height = (*env)->GetFieldID(env, NSRectFc.clazz, "height", "D");
NSRectFc.cached = 1;
}
NSRect *getNSRectFields(JNIEnv *env, jobject lpObject, NSRect *lpStruct)
{
if (!NSRectFc.cached) cacheNSRectFields(env, lpObject);
- lpStruct->origin.x = (*env)->GetFloatDoubleField(env, lpObject, NSRectFc.x);
- lpStruct->origin.y = (*env)->GetFloatDoubleField(env, lpObject, NSRectFc.y);
- lpStruct->size.width = (*env)->GetFloatDoubleField(env, lpObject, NSRectFc.width);
- lpStruct->size.height = (*env)->GetFloatDoubleField(env, lpObject, NSRectFc.height);
+ lpStruct->origin.x = (*env)->GetDoubleField(env, lpObject, NSRectFc.x);
+ lpStruct->origin.y = (*env)->GetDoubleField(env, lpObject, NSRectFc.y);
+ lpStruct->size.width = (*env)->GetDoubleField(env, lpObject, NSRectFc.width);
+ lpStruct->size.height = (*env)->GetDoubleField(env, lpObject, NSRectFc.height);
return lpStruct;
}
void setNSRectFields(JNIEnv *env, jobject lpObject, NSRect *lpStruct)
{
if (!NSRectFc.cached) cacheNSRectFields(env, lpObject);
- (*env)->SetFloatDoubleField(env, lpObject, NSRectFc.x, (jfloatDouble)lpStruct->origin.x);
- (*env)->SetFloatDoubleField(env, lpObject, NSRectFc.y, (jfloatDouble)lpStruct->origin.y);
- (*env)->SetFloatDoubleField(env, lpObject, NSRectFc.width, (jfloatDouble)lpStruct->size.width);
- (*env)->SetFloatDoubleField(env, lpObject, NSRectFc.height, (jfloatDouble)lpStruct->size.height);
+ (*env)->SetDoubleField(env, lpObject, NSRectFc.x, (jdouble)lpStruct->origin.x);
+ (*env)->SetDoubleField(env, lpObject, NSRectFc.y, (jdouble)lpStruct->origin.y);
+ (*env)->SetDoubleField(env, lpObject, NSRectFc.width, (jdouble)lpStruct->size.width);
+ (*env)->SetDoubleField(env, lpObject, NSRectFc.height, (jdouble)lpStruct->size.height);
}
#endif
@@ -450,24 +416,24 @@ void cacheNSSizeFields(JNIEnv *env, jobject lpObject)
{
if (NSSizeFc.cached) return;
NSSizeFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NSSizeFc.width = (*env)->GetFieldID(env, NSSizeFc.clazz, "width", F_D);
- NSSizeFc.height = (*env)->GetFieldID(env, NSSizeFc.clazz, "height", F_D);
+ NSSizeFc.width = (*env)->GetFieldID(env, NSSizeFc.clazz, "width", "D");
+ NSSizeFc.height = (*env)->GetFieldID(env, NSSizeFc.clazz, "height", "D");
NSSizeFc.cached = 1;
}
NSSize *getNSSizeFields(JNIEnv *env, jobject lpObject, NSSize *lpStruct)
{
if (!NSSizeFc.cached) cacheNSSizeFields(env, lpObject);
- lpStruct->width = (*env)->GetFloatDoubleField(env, lpObject, NSSizeFc.width);
- lpStruct->height = (*env)->GetFloatDoubleField(env, lpObject, NSSizeFc.height);
+ lpStruct->width = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSSizeFc.width);
+ lpStruct->height = (CGFloat)(*env)->GetDoubleField(env, lpObject, NSSizeFc.height);
return lpStruct;
}
void setNSSizeFields(JNIEnv *env, jobject lpObject, NSSize *lpStruct)
{
if (!NSSizeFc.cached) cacheNSSizeFields(env, lpObject);
- (*env)->SetFloatDoubleField(env, lpObject, NSSizeFc.width, (jfloatDouble)lpStruct->width);
- (*env)->SetFloatDoubleField(env, lpObject, NSSizeFc.height, (jfloatDouble)lpStruct->height);
+ (*env)->SetDoubleField(env, lpObject, NSSizeFc.width, (jdouble)lpStruct->width);
+ (*env)->SetDoubleField(env, lpObject, NSSizeFc.height, (jdouble)lpStruct->height);
}
#endif
@@ -518,24 +484,24 @@ void cacheobjc_superFields(JNIEnv *env, jobject lpObject)
{
if (objc_superFc.cached) return;
objc_superFc.clazz = (*env)->GetObjectClass(env, lpObject);
- objc_superFc.receiver = (*env)->GetFieldID(env, objc_superFc.clazz, "receiver", I_J);
- objc_superFc.super_class = (*env)->GetFieldID(env, objc_superFc.clazz, "super_class", I_J);
+ objc_superFc.receiver = (*env)->GetFieldID(env, objc_superFc.clazz, "receiver", "J");
+ objc_superFc.super_class = (*env)->GetFieldID(env, objc_superFc.clazz, "super_class", "J");
objc_superFc.cached = 1;
}
struct objc_super *getobjc_superFields(JNIEnv *env, jobject lpObject, struct objc_super *lpStruct)
{
if (!objc_superFc.cached) cacheobjc_superFields(env, lpObject);
- lpStruct->receiver = (id)(*env)->GetIntLongField(env, lpObject, objc_superFc.receiver);
- lpStruct->swt_super_class = (Class)(*env)->GetIntLongField(env, lpObject, objc_superFc.super_class);
+ lpStruct->receiver = (id)(*env)->GetLongField(env, lpObject, objc_superFc.receiver);
+ lpStruct->swt_super_class = (Class)(*env)->GetLongField(env, lpObject, objc_superFc.super_class);
return lpStruct;
}
void setobjc_superFields(JNIEnv *env, jobject lpObject, struct objc_super *lpStruct)
{
if (!objc_superFc.cached) cacheobjc_superFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, objc_superFc.receiver, (jintLong)lpStruct->receiver);
- (*env)->SetIntLongField(env, lpObject, objc_superFc.super_class, (jintLong)lpStruct->swt_super_class);
+ (*env)->SetLongField(env, lpObject, objc_superFc.receiver, (jlong)lpStruct->receiver);
+ (*env)->SetLongField(env, lpObject, objc_superFc.super_class, (jlong)lpStruct->swt_super_class);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h
index 480111fe21..18f46862de 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,18 +17,6 @@
#include "os.h"
-#ifndef NO_CFRange
-void cacheCFRangeFields(JNIEnv *env, jobject lpObject);
-CFRange *getCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct);
-void setCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct);
-#define CFRange_sizeof() sizeof(CFRange)
-#else
-#define cacheCFRangeFields(a,b)
-#define getCFRangeFields(a,b,c) NULL
-#define setCFRangeFields(a,b,c)
-#define CFRange_sizeof() 0
-#endif
-
#ifndef NO_CGAffineTransform
void cacheCGAffineTransformFields(JNIEnv *env, jobject lpObject);
CGAffineTransform *getCGAffineTransformFields(JNIEnv *env, jobject lpObject, CGAffineTransform *lpStruct);
@@ -89,18 +77,6 @@ void setCGSizeFields(JNIEnv *env, jobject lpObject, CGSize *lpStruct);
#define CGSize_sizeof() 0
#endif
-#ifndef NO_CTParagraphStyleSetting
-void cacheCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject);
-CTParagraphStyleSetting *getCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct);
-void setCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct);
-#define CTParagraphStyleSetting_sizeof() sizeof(CTParagraphStyleSetting)
-#else
-#define cacheCTParagraphStyleSettingFields(a,b)
-#define getCTParagraphStyleSettingFields(a,b,c) NULL
-#define setCTParagraphStyleSettingFields(a,b,c)
-#define CTParagraphStyleSetting_sizeof() 0
-#endif
-
#ifndef NO_NSAffineTransformStruct
void cacheNSAffineTransformStructFields(JNIEnv *env, jobject lpObject);
NSAffineTransformStruct *getNSAffineTransformStructFields(JNIEnv *env, jobject lpObject, NSAffineTransformStruct *lpStruct);
@@ -113,6 +89,18 @@ void setNSAffineTransformStructFields(JNIEnv *env, jobject lpObject, NSAffineTra
#define NSAffineTransformStruct_sizeof() 0
#endif
+#ifndef NO_NSOperatingSystemVersion
+void cacheNSOperatingSystemVersionFields(JNIEnv *env, jobject lpObject);
+NSOperatingSystemVersion *getNSOperatingSystemVersionFields(JNIEnv *env, jobject lpObject, NSOperatingSystemVersion *lpStruct);
+void setNSOperatingSystemVersionFields(JNIEnv *env, jobject lpObject, NSOperatingSystemVersion *lpStruct);
+#define NSOperatingSystemVersion_sizeof() sizeof(NSOperatingSystemVersion)
+#else
+#define cacheNSOperatingSystemVersionFields(a,b)
+#define getNSOperatingSystemVersionFields(a,b,c) NULL
+#define setNSOperatingSystemVersionFields(a,b,c)
+#define NSOperatingSystemVersion_sizeof() 0
+#endif
+
#ifndef NO_NSPoint
void cacheNSPointFields(JNIEnv *env, jobject lpObject);
NSPoint *getNSPointFields(JNIEnv *env, jobject lpObject, NSPoint *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Lock.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Lock.java
deleted file mode 100644
index 971795e6e8..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Lock.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal;
-
-/**
- * Instances of this represent a recursive monitor. Note that this
- * is an empty implementation which does not actually perform locking.
- */
-public class Lock {
-
-/**
- * Locks the monitor and returns the lock count. If
- * the lock is owned by another thread, wait until
- * the lock is released.
- *
- * @return the lock count
- */
-public int lock() {
- return 0;
-}
-
-/**
- * Unlocks the monitor. If the current thread is not
- * the monitor owner, do nothing.
- */
-public void unlock() {
-}
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java
index 8dd0365dcd..06cf11fdb2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/Platform.java
@@ -16,7 +16,6 @@ package org.eclipse.swt.internal;
public class Platform {
public static final String PLATFORM = "cocoa"; //$NON-NLS-1$
- public static final Lock lock = new Lock ();
public static boolean isLoadable () {
return Library.isLoadable ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index 26a9992f71..f609d030e1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF8"?>
<signatures swt_gen="mixed">
- <class name="NSATSTypesetter" swt_superclass="NSTypesetter">
- </class>
<class name="NSActionCell" swt_gen="mixed" swt_superclass="NSCell">
<method selector="action" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -45,6 +43,10 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="setIcon:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="setMessageText:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -58,6 +60,9 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method class_method="true" selector="currentAppearance" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="name" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -116,9 +121,6 @@
<method selector="mainMenu" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="mainWindow" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="nextEventMatchingMask:untilDate:inMode:dequeue:" swt_gen="true" swt_gen_super_msgSend="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -130,9 +132,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="orderedWindows" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="postEvent:atStart:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -142,9 +141,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="run" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="runModalForWindow:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -209,26 +205,12 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSArrayController" swt_superclass="NSObjectController">
- </class>
<class name="NSAttributedString" swt_gen="mixed">
- <method class_method="true" selector="attributedStringWithAttachment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="boundingRectWithSize:options:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="doubleClickAtIndex:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="drawAtPoint:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="drawInRect:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -250,13 +232,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -367,7 +342,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="setLineDash:count:phase:" swt_gen="true">
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+ <arg swt_gen="true" swt_java_type="double[]"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -401,9 +376,6 @@
</method>
</class>
<class name="NSBitmapImageRep" swt_gen="mixed" swt_superclass="NSImageRep">
- <method selector="TIFFRepresentation" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="bitmapData" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -413,9 +385,6 @@
<method selector="bitsPerPixel" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="bytesPerPlane" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="bytesPerRow" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -424,14 +393,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="getBitmapDataPlanes:" swt_gen="true">
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method class_method="true" selector="imageRepWithData:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -444,33 +405,13 @@
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
- </method>
- <method selector="initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithData:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
- </method>
- <method selector="initWithFocusedViewRect:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
- </method>
- <method selector="isPlanar" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="numberOfPlanes" swt_gen="true">
+ <method selector="isPlanar" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
<method selector="samplesPerPixel" swt_gen="true">
@@ -482,7 +423,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="contentView" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSView"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="contentViewMargins" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -527,9 +468,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="sizeToFit" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="titleCell" swt_gen="true">
<retval swt_gen="true" swt_java_type="NSCell"></retval>
</method>
@@ -537,18 +475,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSBrowser" swt_superclass="NSControl">
- </class>
- <class name="NSBrowserCell" swt_gen="mixed" swt_superclass="NSCell">
- <method selector="highlightColorInView:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setLeaf:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- </class>
<class name="NSBundle" swt_gen="mixed">
<method class_method="true" selector="loadNibFile:externalNameTable:withZone:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -609,9 +535,6 @@
</method>
</class>
<class name="NSButtonCell" swt_gen="mixed" swt_superclass="NSActionCell">
- <method selector="backgroundColor" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="drawBezelWithFrame:inView:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -649,10 +572,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSCIImageRep" swt_superclass="NSImageRep">
- </class>
- <class name="NSCachedImageRep" swt_superclass="NSImageRep">
- </class>
<class name="NSCell" swt_gen="mixed">
<method selector="attributedStringValue" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -694,11 +613,6 @@
<method selector="font" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="highlightColorWithFrame:inView:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="hitTestForEvent:inRect:ofView:" swt_gen="true" swt_gen_custom_callback="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -796,21 +710,11 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="wraps" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSClipView" swt_gen="mixed" swt_superclass="NSView">
<method selector="copiesOnScroll" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="documentCursor" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="scrollToPoint:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="setCopiesOnScroll:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -824,8 +728,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSCollectionView" swt_superclass="NSView">
- </class>
<class name="NSColor" swt_gen="mixed">
<method selector="alphaComponent" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -852,13 +754,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="colorWithCalibratedRed:green:blue:alpha:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method class_method="true" selector="colorWithDeviceRed:green:blue:alpha:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -892,7 +787,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="getComponents:" swt_gen="true">
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+ <arg swt_gen="true" swt_java_type="double[]"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="greenComponent" swt_gen="true">
@@ -937,9 +832,6 @@
<method class_method="true" selector="windowBackgroundColor" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="windowFrameColor" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method class_method="true" selector="windowFrameTextColor" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -991,11 +883,6 @@
<method selector="colorSpaceModel" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="genericRGBColorSpace" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- </class>
- <class name="NSColorWell" swt_superclass="NSControl">
</class>
<class name="NSComboBox" swt_gen="mixed" swt_superclass="NSTextField">
<method selector="addItemWithObjectValue:" swt_gen="true">
@@ -1056,7 +943,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="cell" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSCell"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="cellClass" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -1148,13 +1035,10 @@
<method class_method="true" selector="currentCursor" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="hotSpot" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="initWithImage:hotSpot:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSCursor"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="operationNotAllowedCursor" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -1235,10 +1119,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSDatePickerCell" swt_superclass="NSActionCell">
- </class>
- <class name="NSDictionaryController" swt_superclass="NSArrayController">
- </class>
<class name="NSDockTile" swt_gen="mixed">
<method selector="badgeLabel" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -1248,10 +1128,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSDrawer" swt_superclass="NSResponder">
- </class>
- <class name="NSEPSImageRep" swt_superclass="NSImageRep">
- </class>
<class name="NSEvent" swt_gen="mixed">
<method selector="CGEvent" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -1274,6 +1150,9 @@
<method selector="deltaY" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method class_method="true" selector="doubleClickInterval" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method class_method="true" selector="enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -1313,6 +1192,12 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="phase" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
+ <method class_method="true" selector="pressedMouseButtons" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="rotation" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -1345,10 +1230,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="controlContentFontOfSize:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="descender" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -1373,10 +1254,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="menuFontOfSize:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="pointSize" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -1399,9 +1276,6 @@
<method selector="availableFontFamilies" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="availableFonts" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="availableMembersOfFontFamily:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -1411,13 +1285,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="fontWithFamily:traits:weight:size:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method class_method="true" selector="sharedFontManager" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -1425,10 +1292,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="weightOfFont:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSFontPanel" swt_gen="mixed" swt_superclass="NSPanel">
<method selector="panelConvertFont:" swt_gen="true">
@@ -1444,10 +1307,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSForm" swt_superclass="NSMatrix">
- </class>
- <class name="NSFormCell" swt_superclass="NSActionCell">
- </class>
<class name="NSGradient" swt_gen="mixed">
<method selector="drawFromPoint:toPoint:options:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -1472,7 +1331,7 @@
<method selector="initWithStartingColor:endingColor:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSGradient"></retval>
+ <retval swt_gen="true"></retval>
</method>
</class>
<class name="NSGraphicsContext" swt_gen="mixed">
@@ -1555,13 +1414,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="drawAtPoint:fromRect:operation:fraction:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="drawInRect:fromRect:operation:fraction:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -1571,15 +1423,15 @@
</method>
<method class_method="true" selector="imageNamed:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSImage"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initByReferencingFile:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSImage"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithContentsOfFile:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSImage"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithData:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -1587,11 +1439,11 @@
</method>
<method selector="initWithIconRef:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSImage"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithSize:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSImage"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="lockFocus" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -1622,15 +1474,10 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSImageCell" swt_superclass="NSCell">
- </class>
<class name="NSImageRep" swt_gen="mixed">
<method selector="bitsPerSample" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="colorSpaceName" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="drawInRect:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -1745,7 +1592,7 @@
<method selector="glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+ <arg swt_gen="true" swt_java_type="double[]"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="glyphRangeForCharacterRange:actualCharacterRange:" swt_gen="true">
@@ -1779,14 +1626,14 @@
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+ <arg swt_gen="true" swt_java_type="long[]"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+ <arg swt_gen="true" swt_java_type="long[]"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="removeTemporaryAttribute:forCharacterRange:" swt_gen="true">
@@ -1798,12 +1645,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setLineFragmentRect:forGlyphRange:usedRect:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="setTextStorage:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -1820,12 +1661,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSLevelIndicator" swt_superclass="NSControl">
- </class>
- <class name="NSLevelIndicatorCell" swt_superclass="NSActionCell">
- </class>
- <class name="NSMatrix" swt_superclass="NSControl">
- </class>
<class name="NSMenu" swt_gen="mixed">
<method selector="addItem:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -1847,7 +1682,7 @@
</method>
<method selector="initWithTitle:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSMenu"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="insertItem:atIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -1921,7 +1756,7 @@
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSMenuItem"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="isHidden" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -2010,15 +1845,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSMenuItemCell" swt_superclass="NSButtonCell">
- </class>
- <class name="NSMutableAttributedString" swt_gen="mixed" swt_superclass="NSAttributedString">
- <method selector="setBaseWritingDirection:range:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- </class>
<class name="NSMutableParagraphStyle" swt_gen="mixed" swt_superclass="NSParagraphStyle">
<method selector="addTabStop:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -2057,8 +1883,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSNibOutletConnector" swt_superclass="NSNibConnector">
- </class>
<class name="NSObject" swt_gen="mixed">
<method selector="accessibilityAttributeValue:forParameter:" swt_gen="true" swt_gen_super_msgSend="true">
<arg swt_gen="true"></arg>
@@ -2100,11 +1924,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="outlineView:shouldSelectItem:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="outlineView:shouldTrackCell:forTableColumn:item:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -2122,11 +1941,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="tableView:shouldSelectRow:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="tableView:shouldTrackCell:forTableColumn:row:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -2140,12 +1954,7 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSObjectController" swt_superclass="NSController">
- </class>
<class name="NSOpenGLContext" swt_gen="mixed">
- <method class_method="true" selector="clearCurrentContext" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="clearDrawable" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -2158,7 +1967,7 @@
<method selector="initWithFormat:shareContext:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSOpenGLContext"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="makeCurrentContext" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -2181,7 +1990,7 @@
</class>
<class name="NSOpenGLPixelFormat" swt_gen="mixed">
<method selector="getValues:forAttribute:forVirtualScreen:" swt_gen="true">
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+ <arg swt_gen="true" swt_java_type="long[]"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -2191,8 +2000,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSOpenGLView" swt_superclass="NSView">
- </class>
<class name="NSOpenPanel" swt_gen="mixed" swt_superclass="NSSavePanel">
<method selector="filenames" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -2200,6 +2007,10 @@
<method class_method="true" selector="openPanel" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="setAccessoryViewDisclosed:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="setAllowsMultipleSelection:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -2251,9 +2062,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="outlineTableColumn" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="reloadItem:reloadChildren:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -2281,10 +2089,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSPDFImageRep" swt_superclass="NSImageRep">
- </class>
- <class name="NSPICTImageRep" swt_superclass="NSImageRep">
- </class>
<class name="NSPanel" swt_gen="mixed" swt_superclass="NSWindow">
<method selector="setBecomesKeyOnlyIfNeeded:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -2298,17 +2102,11 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="worksWhenModal" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSParagraphStyle" swt_gen="mixed">
<method selector="alignment" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="tabStops" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSPasteboard" swt_gen="mixed">
<method selector="addTypes:owner:" swt_gen="true">
@@ -2367,14 +2165,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSPathCell" swt_superclass="NSActionCell">
- </class>
- <class name="NSPathComponentCell" swt_superclass="NSTextFieldCell">
- </class>
- <class name="NSPathControl" swt_superclass="NSControl">
- </class>
- <class name="NSPersistentDocument" swt_superclass="NSDocument">
- </class>
<class name="NSPopUpButton" swt_gen="mixed" swt_superclass="NSButton">
<method selector="indexOfSelectedItem" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -2382,7 +2172,7 @@
<method selector="initWithFrame:pullsDown:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSPopUpButton"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="itemAtIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -2425,10 +2215,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSPopUpButtonCell" swt_superclass="NSMenuItemCell">
- </class>
- <class name="NSPredicateEditor" swt_superclass="NSRuleEditor">
- </class>
<class name="NSPrintInfo" swt_gen="mixed">
<method selector="PMPrintSession" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -2445,10 +2231,6 @@
<method selector="imageablePageBounds" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="initWithDictionary:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSPrintInfo"></retval>
- </method>
<method selector="isSelectionOnly" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -2458,9 +2240,6 @@
<method selector="paperSize" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="printSettings" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="printer" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -2564,9 +2343,6 @@
</method>
</class>
<class name="NSProgressIndicator" swt_gen="mixed" swt_superclass="NSView">
- <method selector="controlSize" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="doubleValue" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -2600,17 +2376,10 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="sizeToFit" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="startAnimation:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="stopAnimation:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSResponder" swt_gen="mixed">
<method selector="acceptsFirstResponder" swt_gen="true">
@@ -2619,10 +2388,6 @@
<method selector="becomeFirstResponder" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="beginGestureWithEvent:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="cancelOperation:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -2635,10 +2400,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="endGestureWithEvent:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="flagsChanged:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -2647,10 +2408,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="insertText:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="interpretKeyEvents:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -2691,18 +2448,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="moveToBeginningOfParagraph:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="moveToEndOfParagraph:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="moveUp:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="noResponderFor:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -2783,23 +2528,13 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSRuleEditor" swt_superclass="NSControl">
- </class>
- <class name="NSRulerView" swt_superclass="NSView">
- </class>
- <class name="NSRunningApplication" swt_gen="mixed">
- <method selector="activateWithOptions:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method class_method="true" selector="currentApplication" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- </class>
<class name="NSSavePanel" swt_gen="mixed" swt_superclass="NSPanel">
<method selector="filename" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="nameFieldStringValue" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="runModal" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -2898,6 +2633,9 @@
<method selector="documentVisibleRect" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="flashScrollers" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method class_method="true" selector="frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -2905,10 +2643,22 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method class_method="true" selector="frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="reflectScrolledClipView:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="scrollerStyle" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="setAutohidesScrollers:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -2956,6 +2706,9 @@
<method selector="hitPart" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method class_method="true" selector="isCompatibleWithOverlayScrollers" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="knobProportion" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -2963,9 +2716,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="scrollerWidth" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method class_method="true" selector="scrollerWidthForControlSize:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -3017,68 +2767,6 @@
</method>
</class>
<class name="NSSecureTextField" swt_gen="true" swt_superclass="NSTextField"></class>
- <class name="NSSecureTextFieldCell" swt_superclass="NSTextFieldCell">
- </class>
- <class name="NSSegmentedCell" swt_gen="mixed" swt_superclass="NSActionCell">
- <method selector="setEnabled:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setImage:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setLabel:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setMenu:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setSegmentCount:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setSegmentStyle:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setSelected:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setSelectedSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setTag:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setToolTip:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setTrackingMode:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="setWidth:forSegment:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- </class>
- <class name="NSSegmentedControl" swt_superclass="NSControl">
- </class>
<class name="NSSlider" swt_gen="mixed" swt_superclass="NSControl">
<method selector="knobThickness" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -3098,10 +2786,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSSliderCell" swt_superclass="NSActionCell">
- </class>
- <class name="NSSplitView" swt_superclass="NSView">
- </class>
<class name="NSStatusBar" swt_gen="mixed">
<method selector="removeStatusItem:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -3168,13 +2852,7 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSStepperCell" swt_superclass="NSActionCell">
- </class>
<class name="NSTabView" swt_gen="mixed" swt_superclass="NSView">
- <method selector="addTabViewItem:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="contentRect" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -3246,11 +2924,11 @@
<retval swt_gen="true" swt_java_type="NSCell"></retval>
</method>
<method selector="headerCell" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSTableHeaderCell"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithIdentifier:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSTableColumn"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="resizingMask" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -3312,10 +2990,7 @@
</class>
<class name="NSTableView" swt_gen="mixed" swt_superclass="NSControl">
<method selector="addTableColumn:" swt_gen="true">
- <arg swt_gen="true" swt_param_name="column"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="allowsColumnReordering" swt_gen="true">
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="canDragRowsWithIndexes:atPoint:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
@@ -3333,14 +3008,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="columnIndexesInRect:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="columnWithIdentifier:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="deselectAll:" swt_gen="true" swt_gen_super_msgSend="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -3380,7 +3047,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="moveColumn:toColumn:" swt_gen="true">
- <arg swt_gen="true" swt_param_name="column"></arg>
+ <arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -3413,7 +3080,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="removeTableColumn:" swt_gen="true">
- <arg swt_gen="true" swt_param_name="column"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="rowAtPoint:" swt_gen="true">
@@ -3423,10 +3090,6 @@
<method selector="rowHeight" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="rowsInRect:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="scrollColumnToVisible:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -3480,11 +3143,11 @@
</method>
<method selector="setDropRow:dropOperation:" swt_gen="true">
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_param_name="op"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="setGridStyleMask:" swt_gen="true">
- <arg swt_gen="true" swt_param_name="gridStyle"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="setHeaderView:" swt_gen="true">
@@ -3492,12 +3155,12 @@
<retval swt_gen="true"></retval>
</method>
<method selector="setHighlightedTableColumn:" swt_gen="true">
- <arg swt_gen="true" swt_param_name="tc"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="setIndicatorImage:inTableColumn:" swt_gen="true">
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_param_name="tc"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="setIntercellSpacing:" swt_gen="true">
@@ -3531,12 +3194,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="delegate" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="font" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="isFieldEditor" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -3616,9 +3273,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="sizeToFit" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="string" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -3626,7 +3280,7 @@
<class name="NSTextAttachment" swt_gen="mixed">
<method selector="initWithFileWrapper:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSTextAttachment" swt_java_type64="NSTextAttachment"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setAttachmentCell:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -3634,12 +3288,9 @@
</method>
</class>
<class name="NSTextContainer" swt_gen="mixed">
- <method selector="containerSize" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="initWithContainerSize:" swt_gen="mixed">
+ <method selector="initWithContainerSize:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_java_type="NSTextContainer"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setContainerSize:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -3697,9 +3348,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="textColor" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSTextStorage" swt_gen="mixed" swt_superclass="NSMutableAttributedString">
<method selector="addLayoutManager:" swt_gen="true">
@@ -3714,19 +3362,9 @@
<method selector="initWithType:location:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSTextTab"></retval>
- </method>
- <method selector="location" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="tabStopType" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSTextTable" swt_superclass="NSTextBlock">
- </class>
- <class name="NSTextTableBlock" swt_superclass="NSTextBlock">
- </class>
<class name="NSTextView" swt_gen="mixed" swt_superclass="NSText">
<method selector="characterIndexForInsertionAtPoint:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -3735,14 +3373,14 @@
<method selector="defaultParagraphStyle" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="dragSelectionWithEvent:offset:slideBack:" swt_gen="true" swt_gen_custom_callback="true">
+ <method selector="dragSelectionWithEvent:offset:slideBack:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="drawViewBackgroundInRect:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
- <arg swt_gen="true" swt_java_type="NSRect"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="layoutManager" swt_gen="true">
@@ -3761,11 +3399,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setBaseWritingDirection:range:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="setDefaultParagraphStyle:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -3805,14 +3438,10 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSTokenField" swt_superclass="NSTextField">
- </class>
- <class name="NSTokenFieldCell" swt_superclass="NSTextFieldCell">
- </class>
<class name="NSToolbar" swt_gen="mixed">
<method selector="initWithIdentifier:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSToolbar"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="insertItemWithItemIdentifier:atIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -3850,7 +3479,7 @@
<class name="NSToolbarItem" swt_gen="mixed">
<method selector="initWithItemIdentifier:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSToolbarItem"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="itemIdentifier" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -3900,8 +3529,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSToolbarItemGroup" swt_superclass="NSToolbarItem">
- </class>
<class name="NSTouch" swt_gen="true">
<method selector="device" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -3920,13 +3547,6 @@
</method>
</class>
<class name="NSTrackingArea" swt_gen="mixed">
- <method selector="initWithRect:options:owner:userInfo:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSTrackingArea"></retval>
- </method>
<method selector="owner" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -3934,8 +3554,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSTreeController" swt_superclass="NSObjectController">
- </class>
<class name="NSTypesetter" swt_gen="mixed">
<method selector="baselineOffsetInLayoutManager:glyphIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -3949,8 +3567,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSUserDefaultsController" swt_superclass="NSController">
- </class>
<class name="NSView" swt_gen="mixed" swt_superclass="NSResponder">
<method selector="acceptsFirstMouse:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -4005,14 +3621,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="convertPointFromBase:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="convertPointToBase:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="convertRect:fromView:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -4023,32 +3631,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="convertRectFromBase:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="convertRectToBase:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="convertSize:fromView:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="convertSize:toView:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="convertSizeFromBase:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="convertSizeToBase:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="discardCursorRects" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -4074,7 +3656,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="drawRect:" swt_gen="true" swt_gen_custom_callback="true">
- <arg swt_gen="true" swt_param_name="rect"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="endDocument" swt_gen="true">
@@ -4092,7 +3674,7 @@
</method>
<method selector="initWithFrame:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSView"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="isDescendantOf:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -4110,9 +3692,15 @@
<method selector="isOpaque" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="layer" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="lockFocus" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="lockFocusIfCanDraw" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="menuForEvent:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -4160,10 +3748,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="scrollRectToVisible:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="setAcceptsTouchEvents:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -4180,11 +3764,15 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="setBoundsSize:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="setFocusRingType:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setFrame:" swt_gen="true" swt_gen_custom_callback="true">
+ <method selector="setFrame:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -4252,10 +3840,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSViewAnimation" swt_superclass="NSAnimation">
- </class>
- <class name="NSViewController" swt_superclass="NSResponder">
- </class>
<class name="NSWindow" swt_gen="mixed" swt_superclass="NSResponder">
<method selector="addChildWindow:ordered:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -4285,7 +3869,7 @@
<retval swt_gen="true"></retval>
</method>
<method selector="contentView" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSView"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="convertBaseToScreen:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -4353,7 +3937,7 @@
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSWindow"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithContentRect:styleMask:backing:defer:screen:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -4361,7 +3945,7 @@
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSWindow"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="invalidateShadow" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -4387,9 +3971,6 @@
<method selector="isZoomed" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="level" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="makeFirstResponder:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -4398,6 +3979,9 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="maxSize" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method class_method="true" selector="minFrameWidthWithTitle:styleMask:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -4502,6 +4086,10 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="setMaxSize:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="setMinSize:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -4542,14 +4130,10 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="standardWindowButton:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="styleMask" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="toggleToolbarShown:" swt_gen="true">
+ <method selector="toggleFullScreen:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -4564,44 +4148,24 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="windowRef" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="zoom:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSWindowController" swt_superclass="NSResponder">
- </class>
<class name="NSWorkspace" swt_gen="mixed">
<method selector="fullPathForApplication:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="getInfoForFile:application:type:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="iconForFile:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="iconForFileType:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="isFilePackageAtPath:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="openFile:withApplication:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="openURL:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -4632,9 +4196,10 @@
<constant name="NSAccessibilityBackgroundColorTextAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityBoundsForRangeParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityButtonRole" swt_gen="true"></constant>
+ <constant name="NSAccessibilityCellForColumnAndRowParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityCheckBoxRole" swt_gen="true"></constant>
<constant name="NSAccessibilityChildrenAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityColorWellRole" swt_gen="true"></constant>
+ <constant name="NSAccessibilityColumnIndexRangeAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityColumnRole" swt_gen="true"></constant>
<constant name="NSAccessibilityColumnsAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityComboBoxRole" swt_gen="true"></constant>
@@ -4644,32 +4209,24 @@
<constant name="NSAccessibilityDialogSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityEnabledAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityExpandedAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityFloatingWindowSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityFocusedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityFocusedUIElementChangedNotification" swt_gen="true"></constant>
- <constant name="NSAccessibilityFocusedWindowChangedNotification" swt_gen="true"></constant>
<constant name="NSAccessibilityFontFamilyKey" swt_gen="true"></constant>
<constant name="NSAccessibilityFontNameKey" swt_gen="true"></constant>
<constant name="NSAccessibilityFontSizeKey" swt_gen="true"></constant>
<constant name="NSAccessibilityFontTextAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityForegroundColorTextAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityGridRole" swt_gen="true"></constant>
<constant name="NSAccessibilityGroupRole" swt_gen="true"></constant>
<constant name="NSAccessibilityHeaderAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityHelpAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityHelpTagRole" swt_gen="true"></constant>
<constant name="NSAccessibilityHorizontalOrientationValue" swt_gen="true"></constant>
- <constant name="NSAccessibilityHorizontalScrollBarAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityImageRole" swt_gen="true"></constant>
- <constant name="NSAccessibilityIncrementorRole" swt_gen="true"></constant>
<constant name="NSAccessibilityIndexAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityInsertionPointLineNumberAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityLabelValueAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityLineForIndexParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityLinkRole" swt_gen="true"></constant>
<constant name="NSAccessibilityLinkTextAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityLinkedUIElementsAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityListRole" swt_gen="true"></constant>
<constant name="NSAccessibilityMaxValueAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityMenuBarRole" swt_gen="true"></constant>
<constant name="NSAccessibilityMenuButtonRole" swt_gen="true"></constant>
@@ -4684,24 +4241,20 @@
<constant name="NSAccessibilityOutlineRole" swt_gen="true"></constant>
<constant name="NSAccessibilityOutlineRowSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityParentAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityPopUpButtonRole" swt_gen="true"></constant>
<constant name="NSAccessibilityPositionAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityPressAction" swt_gen="true"></constant>
<constant name="NSAccessibilityPreviousContentsAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityProgressIndicatorRole" swt_gen="true"></constant>
- <constant name="NSAccessibilityRTFForRangeParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityRadioButtonRole" swt_gen="true"></constant>
- <constant name="NSAccessibilityRadioGroupRole" swt_gen="true"></constant>
<constant name="NSAccessibilityRangeForIndexParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityRangeForLineParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityRangeForPositionParameterizedAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityResizedNotification" swt_gen="true"></constant>
<constant name="NSAccessibilityRoleAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityRoleDescriptionAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityRowCountChangedNotification" swt_gen="true"></constant>
+ <constant name="NSAccessibilityRowIndexRangeAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityRowRole" swt_gen="true"></constant>
<constant name="NSAccessibilityRowsAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityScrollAreaRole" swt_gen="true"></constant>
<constant name="NSAccessibilityScrollBarRole" swt_gen="true"></constant>
<constant name="NSAccessibilitySelectedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilitySelectedChildrenAttribute" swt_gen="true"></constant>
@@ -4717,40 +4270,31 @@
<constant name="NSAccessibilityShowMenuAction" swt_gen="true"></constant>
<constant name="NSAccessibilitySizeAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilitySliderRole" swt_gen="true"></constant>
- <constant name="NSAccessibilitySortButtonRole" swt_gen="true"></constant>
<constant name="NSAccessibilitySplitterRole" swt_gen="true"></constant>
- <constant name="NSAccessibilityStandardWindowSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityStaticTextRole" swt_gen="true"></constant>
<constant name="NSAccessibilityStrikethroughColorTextAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityStrikethroughTextAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityStringForRangeParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityStyleRangeForIndexParameterizedAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilitySubroleAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilitySuperscriptTextAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilitySystemDialogSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityTabGroupRole" swt_gen="true"></constant>
<constant name="NSAccessibilityTableRole" swt_gen="true"></constant>
<constant name="NSAccessibilityTableRowSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityTabsAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityTextAreaRole" swt_gen="true"></constant>
<constant name="NSAccessibilityTextFieldRole" swt_gen="true"></constant>
- <constant name="NSAccessibilityTextLinkSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityTitleAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityTitleChangedNotification" swt_gen="true"></constant>
<constant name="NSAccessibilityTitleUIElementAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityToolbarRole" swt_gen="true"></constant>
<constant name="NSAccessibilityTopLevelUIElementAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityURLAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityUnderlineColorTextAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityUnderlineTextAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityUnknownRole" swt_gen="true"></constant>
<constant name="NSAccessibilityUnknownSubrole" swt_gen="true"></constant>
<constant name="NSAccessibilityValueAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityValueChangedNotification" swt_gen="true"></constant>
- <constant name="NSAccessibilityValueDescriptionAttribute" swt_gen="true"></constant>
- <constant name="NSAccessibilityValueIndicatorRole" swt_gen="true"></constant>
<constant name="NSAccessibilityVerticalOrientationValue" swt_gen="true"></constant>
- <constant name="NSAccessibilityVerticalScrollBarAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityVisibleCharacterRangeAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityVisibleChildrenAttribute" swt_gen="true"></constant>
<constant name="NSAccessibilityVisibleColumnsAttribute" swt_gen="true"></constant>
@@ -4762,7 +4306,6 @@
<constant name="NSAttachmentAttributeName" swt_gen="true"></constant>
<constant name="NSBackgroundColorAttributeName" swt_gen="true"></constant>
<constant name="NSBaselineOffsetAttributeName" swt_gen="true"></constant>
- <constant name="NSCalibratedRGBColorSpace" swt_gen="true"></constant>
<constant name="NSCursorAttributeName" swt_gen="true"></constant>
<constant name="NSDeviceRGBColorSpace" swt_gen="true"></constant>
<constant name="NSDeviceResolution" swt_gen="true"></constant>
@@ -4771,11 +4314,12 @@
<constant name="NSFilenamesPboardType" swt_gen="true"></constant>
<constant name="NSFontAttributeName" swt_gen="true"></constant>
<constant name="NSForegroundColorAttributeName" swt_gen="true"></constant>
+ <constant name="NSImageNameCaution" swt_gen="true"></constant>
+ <constant name="NSImageNameInfo" swt_gen="true"></constant>
<constant name="NSLigatureAttributeName" swt_gen="true"></constant>
<constant name="NSLinkAttributeName" swt_gen="true"></constant>
<constant name="NSModalPanelRunLoopMode" swt_gen="true"></constant>
<constant name="NSObliquenessAttributeName" swt_gen="true"></constant>
- <constant name="NSOutlineViewColumnDidMoveNotification" swt_gen="true"></constant>
<constant name="NSParagraphStyleAttributeName" swt_gen="true"></constant>
<constant name="NSPasteboardTypeHTML" swt_gen="true"></constant>
<constant name="NSPasteboardTypeRTF" swt_gen="true"></constant>
@@ -4791,24 +4335,14 @@
<constant name="NSPrintSaveJob" swt_gen="true"></constant>
<constant name="NSPrintSavePath" swt_gen="true"></constant>
<constant name="NSPrintScalingFactor" swt_gen="true"></constant>
- <constant name="NSPrintSpoolJob" swt_gen="true"></constant>
- <constant name="NSSpellingStateAttributeName" swt_gen="true"></constant>
<constant name="NSSquareStatusItemLength" swt_gen="true"></constant>
<constant name="NSStrikethroughColorAttributeName" swt_gen="true"></constant>
<constant name="NSStrikethroughStyleAttributeName" swt_gen="true"></constant>
<constant name="NSStrokeWidthAttributeName" swt_gen="true"></constant>
<constant name="NSSystemColorsDidChangeNotification" swt_gen="true"></constant>
<constant name="NSTIFFPboardType" swt_gen="true"></constant>
- <constant name="NSTableViewColumnDidMoveNotification" swt_gen="true"></constant>
- <constant name="NSToolbarCustomizeToolbarItemIdentifier" swt_gen="true"></constant>
- <constant name="NSToolbarDidRemoveItemNotification" swt_gen="true"></constant>
<constant name="NSToolbarFlexibleSpaceItemIdentifier" swt_gen="true"></constant>
- <constant name="NSToolbarPrintItemIdentifier" swt_gen="true"></constant>
- <constant name="NSToolbarSeparatorItemIdentifier" swt_gen="true"></constant>
- <constant name="NSToolbarShowColorsItemIdentifier" swt_gen="true"></constant>
- <constant name="NSToolbarShowFontsItemIdentifier" swt_gen="true"></constant>
<constant name="NSToolbarSpaceItemIdentifier" swt_gen="true"></constant>
- <constant name="NSToolbarWillAddItemNotification" swt_gen="true"></constant>
<constant name="NSURLPboardType" swt_gen="true"></constant>
<constant name="NSUnderlineColorAttributeName" swt_gen="true"></constant>
<constant name="NSUnderlineStyleAttributeName" swt_gen="true"></constant>
@@ -4854,7 +4388,6 @@
<enum name="NSCompositeCopy" swt_gen="true"></enum>
<enum name="NSCompositeSourceAtop" swt_gen="true"></enum>
<enum name="NSCompositeSourceOver" swt_gen="true"></enum>
- <enum name="NSCompositeXOR" swt_gen="true"></enum>
<enum name="NSContentsCellMask" swt_gen="true"></enum>
<enum name="NSControlKeyMask" swt_gen="true"></enum>
<enum name="NSCriticalAlertStyle" swt_gen="true"></enum>
@@ -4870,6 +4403,9 @@
<enum name="NSDragOperationNone" swt_gen="true"></enum>
<enum name="NSEnterCharacter" swt_gen="true"></enum>
<enum name="NSEvenOddWindingRule" swt_gen="true"></enum>
+ <enum name="NSEventPhaseBegan" swt_gen="true"></enum>
+ <enum name="NSEventPhaseCancelled" swt_gen="true"></enum>
+ <enum name="NSEventPhaseEnded" swt_gen="true"></enum>
<enum name="NSEventTypeBeginGesture" swt_gen="true"></enum>
<enum name="NSEventTypeEndGesture" swt_gen="true"></enum>
<enum name="NSEventTypeGesture" swt_gen="true"></enum>
@@ -4881,15 +4417,7 @@
<enum name="NSFocusRingTypeNone" swt_gen="true"></enum>
<enum name="NSFontPanelAllEffectsModeMask" swt_gen="true"></enum>
<enum name="NSFontPanelAllModesMask" swt_gen="true"></enum>
- <enum name="NSFontPanelCollectionModeMask" swt_gen="true"></enum>
- <enum name="NSFontPanelDocumentColorEffectModeMask" swt_gen="true"></enum>
- <enum name="NSFontPanelFaceModeMask" swt_gen="true"></enum>
- <enum name="NSFontPanelShadowEffectModeMask" swt_gen="true"></enum>
- <enum name="NSFontPanelSizeModeMask" swt_gen="true"></enum>
- <enum name="NSFontPanelStandardModesMask" swt_gen="true"></enum>
- <enum name="NSFontPanelStrikethroughEffectModeMask" swt_gen="true"></enum>
- <enum name="NSFontPanelTextColorEffectModeMask" swt_gen="true"></enum>
- <enum name="NSFontPanelUnderlineEffectModeMask" swt_gen="true"></enum>
+ <enum name="NSFullScreenWindowMask" swt_gen="true"></enum>
<enum name="NSHelpFunctionKey" swt_gen="true"></enum>
<enum name="NSHelpKeyMask" swt_gen="true"></enum>
<enum name="NSHourMinuteDatePickerElementFlag" swt_gen="true"></enum>
@@ -4912,7 +4440,6 @@
<enum name="NSKeyUp" swt_gen="true"></enum>
<enum name="NSLandscapeOrientation" swt_gen="true"></enum>
<enum name="NSLeftMouseDown" swt_gen="true"></enum>
- <enum name="NSLeftMouseDownMask" swt_gen="true"></enum>
<enum name="NSLeftMouseDragged" swt_gen="true"></enum>
<enum name="NSLeftMouseDraggedMask" swt_gen="true"></enum>
<enum name="NSLeftMouseUp" swt_gen="true"></enum>
@@ -4927,7 +4454,6 @@
<enum name="NSMiniaturizableWindowMask" swt_gen="true"></enum>
<enum name="NSMiterLineJoinStyle" swt_gen="true"></enum>
<enum name="NSMixedState" swt_gen="true"></enum>
- <enum name="NSModalPanelWindowLevel" swt_gen="true"></enum>
<enum name="NSMomentaryLightButton" swt_gen="true"></enum>
<enum name="NSMouseEntered" swt_gen="true"></enum>
<enum name="NSMouseExited" swt_gen="true"></enum>
@@ -4939,11 +4465,9 @@
<enum name="NSNoTitle" swt_gen="true"></enum>
<enum name="NSNonZeroWindingRule" swt_gen="true"></enum>
<enum name="NSNonactivatingPanelMask" swt_gen="true"></enum>
- <enum name="NSNormalWindowLevel" swt_gen="true"></enum>
<enum name="NSOffState" swt_gen="true"></enum>
<enum name="NSOnState" swt_gen="true"></enum>
<enum name="NSOpenGLCPSurfaceOrder" swt_gen="true"></enum>
- <enum name="NSOpenGLCPSwapInterval" swt_gen="true"></enum>
<enum name="NSOpenGLPFAAccumSize" swt_gen="true"></enum>
<enum name="NSOpenGLPFAAlphaSize" swt_gen="true"></enum>
<enum name="NSOpenGLPFAColorSize" swt_gen="true"></enum>
@@ -4956,13 +4480,9 @@
<enum name="NSOtherMouseDown" swt_gen="true"></enum>
<enum name="NSOtherMouseDragged" swt_gen="true"></enum>
<enum name="NSOtherMouseUp" swt_gen="true"></enum>
- <enum name="NSOutlineViewDropOnItemIndex" swt_gen="true"></enum>
<enum name="NSPageDownFunctionKey" swt_gen="true"></enum>
<enum name="NSPageUpFunctionKey" swt_gen="true"></enum>
<enum name="NSPortraitOrientation" swt_gen="true"></enum>
- <enum name="NSPrintPanelShowsCopies" swt_gen="true"></enum>
- <enum name="NSPrintPanelShowsOrientation" swt_gen="true"></enum>
- <enum name="NSPrintPanelShowsPageRange" swt_gen="true"></enum>
<enum name="NSPrintPanelShowsPageSetupAccessory" swt_gen="true"></enum>
<enum name="NSPrintPanelShowsPrintSelection" swt_gen="true"></enum>
<enum name="NSProgressIndicatorPreferredThickness" swt_gen="true"></enum>
@@ -4988,6 +4508,8 @@
<enum name="NSScrollerIncrementPage" swt_gen="true"></enum>
<enum name="NSScrollerKnob" swt_gen="true"></enum>
<enum name="NSScrollerKnobSlot" swt_gen="true"></enum>
+ <enum name="NSScrollerStyleLegacy" swt_gen="true"></enum>
+ <enum name="NSScrollerStyleOverlay" swt_gen="true"></enum>
<enum name="NSShadowlessSquareBezelStyle" swt_gen="true"></enum>
<enum name="NSShiftKeyMask" swt_gen="true"></enum>
<enum name="NSSmallControlSize" swt_gen="true"></enum>
@@ -5010,20 +4532,17 @@
<enum name="NSTextAlignmentCenter" swt_gen="true"></enum>
<enum name="NSTextAlignmentJustified" swt_gen="true"></enum>
<enum name="NSTextAlignmentLeft" swt_gen="true"></enum>
- <enum name="NSTextAlignmentNatural" swt_gen="true"></enum>
<enum name="NSTextAlignmentRight" swt_gen="true"></enum>
<enum name="NSTextFieldAndStepperDatePickerStyle" swt_gen="true"></enum>
<enum name="NSTextFieldDatePickerStyle" swt_gen="true"></enum>
<enum name="NSTitledWindowMask" swt_gen="true"></enum>
<enum name="NSToolbarDisplayModeIconOnly" swt_gen="true"></enum>
- <enum name="NSTouchEventSubtype" swt_gen="true"></enum>
<enum name="NSTouchPhaseAny" swt_gen="true"></enum>
<enum name="NSTouchPhaseBegan" swt_gen="true"></enum>
<enum name="NSTouchPhaseCancelled" swt_gen="true"></enum>
<enum name="NSTouchPhaseEnded" swt_gen="true"></enum>
<enum name="NSTouchPhaseMoved" swt_gen="true"></enum>
<enum name="NSTouchPhaseStationary" swt_gen="true"></enum>
- <enum name="NSTouchPhaseTouching" swt_gen="true"></enum>
<enum name="NSUnderlineStyleDouble" swt_gen="true"></enum>
<enum name="NSUnderlineStyleNone" swt_gen="true"></enum>
<enum name="NSUnderlineStyleSingle" swt_gen="true"></enum>
@@ -5038,38 +4557,23 @@
<enum name="NSWarningAlertStyle" swt_gen="true"></enum>
<enum name="NSWindowAbove" swt_gen="true"></enum>
<enum name="NSWindowBelow" swt_gen="true"></enum>
- <enum name="NSWindowCollectionBehaviorCanJoinAllSpaces" swt_gen="true"></enum>
- <enum name="NSWindowCollectionBehaviorDefault" swt_gen="true"></enum>
+ <enum name="NSWindowCollectionBehaviorFullScreenAuxiliary" swt_gen="true"></enum>
+ <enum name="NSWindowCollectionBehaviorFullScreenPrimary" swt_gen="true"></enum>
<enum name="NSWindowCollectionBehaviorMoveToActiveSpace" swt_gen="true"></enum>
<enum name="NSWritingDirectionLeftToRight" swt_gen="true"></enum>
- <enum name="NSWritingDirectionNatural" swt_gen="true"></enum>
<enum name="NSWritingDirectionRightToLeft" swt_gen="true"></enum>
<enum name="NSYearMonthDatePickerElementFlag" swt_gen="true"></enum>
<enum name="NSYearMonthDayDatePickerElementFlag" swt_gen="true"></enum>
- <function name="NSAccessibilityActionDescription" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="NSAccessibilityPostNotification" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval></retval>
</function>
- <function name="NSAccessibilityRaiseBadArgumentException" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
<function name="NSAccessibilityRoleDescription" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <function name="NSAccessibilityRoleDescriptionForUIElement" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="NSAccessibilityUnignoredAncestor" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -5078,14 +4582,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <function name="NSAccessibilityUnignoredChildrenForOnlyChild" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="NSAccessibilityUnignoredDescendant" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="NSBeep" swt_gen="true">
<retval></retval>
</function>
@@ -5093,14 +4589,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <function name="NSCountWindows" swt_gen="true">
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
- <retval></retval>
- </function>
- <function name="NSNumberOfColorComponents" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="NSRectFillUsingOperation" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -5177,35 +4665,34 @@
<arg swt_gen="true"></arg>
<retval></retval>
</method>
- <method selector="applicationDockMenu:" swt_gen="true">
+ <method selector="applicationDidBecomeActive:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval></retval>
+ <retval swt_gen="true"></retval>
</method>
- <method selector="applicationShouldHandleReopen:hasVisibleWindows:" swt_gen="true">
+ <method selector="applicationDidFinishLaunching:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ <method selector="applicationDidResignActive:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval></retval>
+ <retval swt_gen="true"></retval>
</method>
- <method selector="applicationShouldTerminate:" swt_gen="true">
+ <method selector="applicationDockMenu:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval></retval>
</method>
- </informal_protocol>
- <informal_protocol name="NSApplicationNotifications" swt_gen="mixed">
- <method selector="applicationDidBecomeActive:" swt_gen="true">
+ <method selector="applicationShouldHandleReopen:hasVisibleWindows:" swt_gen="true">
<arg swt_gen="true"></arg>
- </method>
- <method selector="applicationDidFinishLaunching:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval></retval>
</method>
- <method selector="applicationDidResignActive:" swt_gen="true">
+ <method selector="applicationShouldTerminate:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval></retval>
</method>
<method selector="applicationWillFinishLaunching:" swt_gen="true">
<arg swt_gen="true"></arg>
- </method>
- <method selector="applicationWillTerminate:" swt_gen="true">
- <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
</informal_protocol>
<informal_protocol name="NSColorPanelResponderMethod" swt_gen="true">
@@ -5214,22 +4701,21 @@
<retval></retval>
</method>
</informal_protocol>
- <informal_protocol name="NSComboBoxNotifications" swt_gen="mixed">
+ <informal_protocol name="NSComboBoxDelegate" swt_gen="mixed">
<method selector="comboBoxSelectionDidChange:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="comboBoxWillDismiss:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="comboBoxWillPopUp:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
</informal_protocol>
<informal_protocol name="NSDraggingDestination" swt_gen="mixed">
- <method selector="draggingEnded:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval></retval>
- </method>
<method selector="draggingEntered:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval></retval>
@@ -5250,20 +4736,25 @@
<retval></retval>
</method>
</informal_protocol>
- <informal_protocol name="NSDraggingSource" swt_gen="mixed">
- <method selector="draggedImage:beganAt:" swt_gen="true" swt_gen_custom_callback="true">
+ <informal_protocol name="NSDraggingSourceDeprecated" swt_gen="mixed">
+ <method selector="draggedImage:beganAt:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="draggedImage:endedAt:operation:" swt_gen="true" swt_gen_custom_callback="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="draggingSourceOperationMaskForLocal:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ <method selector="ignoreModifierKeysWhileDragging" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
- <method selector="ignoreModifierKeysWhileDragging" swt_gen="true"></method>
</informal_protocol>
<informal_protocol name="NSFontManagerResponderMethod" swt_gen="true">
<method selector="changeFont:" swt_gen="true">
@@ -5302,6 +4793,19 @@
<retval></retval>
</method>
</informal_protocol>
+ <informal_protocol name="NSOpenSavePanelDelegate" swt_gen="mixed">
+ <method selector="panel:shouldEnableURL:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ <method selector="panel:userEnteredFilename:confirmed:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ </informal_protocol>
<informal_protocol name="NSOutlineViewDataSource" swt_gen="mixed">
<method selector="outlineView:acceptDrop:item:childIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -5359,11 +4863,6 @@
<arg swt_gen="true"></arg>
<retval></retval>
</method>
- <method selector="outlineView:shouldCollapseItem:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </method>
<method selector="outlineView:shouldExpandItem:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -5376,22 +4875,21 @@
<arg swt_gen="true"></arg>
<retval></retval>
</method>
- </informal_protocol>
- <informal_protocol name="NSOutlineViewNotifications" swt_gen="mixed">
<method selector="outlineViewColumnDidMove:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="outlineViewColumnDidResize:" swt_gen="true">
<arg swt_gen="true"></arg>
- </method>
- <method selector="outlineViewItemDidExpand:" swt_gen="true">
- <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="outlineViewSelectionDidChange:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="outlineViewSelectionIsChanging:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
</informal_protocol>
<informal_protocol name="NSPasteboardOwner" swt_gen="mixed">
@@ -5401,60 +4899,55 @@
<retval></retval>
</method>
</informal_protocol>
- <informal_protocol name="NSSavePanelDelegate" swt_gen="mixed">
- <method selector="panel:shouldShowFilename:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- </method>
- </informal_protocol>
<informal_protocol name="NSTabViewDelegate" swt_gen="mixed">
<method selector="tabView:didSelectTabViewItem:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval></retval>
- </method>
- <method selector="tabView:shouldSelectTabViewItem:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tabView:willSelectTabViewItem:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval></retval>
+ <retval swt_gen="true"></retval>
</method>
</informal_protocol>
- <informal_protocol name="NSTableDataSource" swt_gen="mixed">
+ <informal_protocol name="NSTableViewDataSource" swt_gen="mixed">
<method selector="numberOfRowsInTableView:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableView:acceptDrop:row:dropOperation:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableView:objectValueForTableColumn:row:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableView:setObjectValue:forTableColumn:row:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableView:validateDrop:proposedRow:proposedDropOperation:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableView:writeRowsWithIndexes:toPasteboard:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
</informal_protocol>
<informal_protocol name="NSTableViewDelegate" swt_gen="mixed">
@@ -5476,19 +4969,21 @@
<arg swt_gen="true"></arg>
<retval></retval>
</method>
- </informal_protocol>
- <informal_protocol name="NSTableViewNotifications" swt_gen="true">
<method selector="tableViewColumnDidMove:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableViewColumnDidResize:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableViewSelectionDidChange:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="tableViewSelectionIsChanging:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
</informal_protocol>
<informal_protocol name="NSTextAttachmentCell" swt_gen="mixed">
@@ -5544,6 +5039,13 @@
<retval></retval>
</method>
</informal_protocol>
+ <informal_protocol name="NSTextInputClient" swt_gen="mixed">
+ <method selector="insertText:replacementRange:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ </informal_protocol>
<informal_protocol name="NSTextViewDelegate" swt_gen="mixed">
<method selector="textView:clickedOnLink:atIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -5591,41 +5093,38 @@
<retval></retval>
</method>
</informal_protocol>
- <informal_protocol name="NSToolbarNotifications" swt_gen="true">
- <method selector="toolbarDidRemoveItem:" swt_gen="true">
- <arg swt_gen="true"></arg>
- </method>
- <method selector="toolbarWillAddItem:" swt_gen="true">
- <arg swt_gen="true"></arg>
- </method>
- </informal_protocol>
<informal_protocol name="NSWindowDelegate" swt_gen="mixed">
- <method selector="windowShouldClose:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval></retval>
- </method>
- </informal_protocol>
- <informal_protocol name="NSWindowNotifications" swt_gen="mixed">
<method selector="windowDidBecomeKey:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="windowDidDeminiaturize:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="windowDidMiniaturize:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="windowDidMove:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="windowDidResignKey:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="windowDidResize:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ <method selector="windowShouldClose:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval></retval>
</method>
<method selector="windowWillClose:" swt_gen="true">
<arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
</informal_protocol>
</signatures>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CTParagraphStyleSetting.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CALayer.java
index 0aa9941ca3..d2767f63a7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CTParagraphStyleSetting.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CALayer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,16 +9,26 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
-
package org.eclipse.swt.internal.cocoa;
-public class CTParagraphStyleSetting {
- /** @field cast=(CTParagraphStyleSpecifier) */
- public int spec;
- public long /*int*/ valueSize;
- /** @field cast=(void *) */
- public long /*int*/ value;
- public static final int sizeof = OS.CTParagraphStyleSetting_sizeof();
-} \ No newline at end of file
+public class CALayer extends NSObject {
+
+public CALayer() {
+ super();
+}
+
+public CALayer(long id) {
+ super(id);
+}
+
+public CALayer(id id) {
+ super(id);
+}
+
+public void setHidden(boolean hidden) {
+ OS.objc_msgSend(this.id, OS.sel_setHidden_, hidden);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java
index 4edd7aab50..6833d29f57 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,16 +9,22 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
public class CGAffineTransform {
- public double /*float*/ a;
- public double /*float*/ b;
- public double /*float*/ c;
- public double /*float*/ d;
- public double /*float*/ tx;
- public double /*float*/ ty;
- public static int sizeof = OS.CGAffineTransform_sizeof();
+ /** @field cast=(CGFloat) */
+ public double a;
+ /** @field cast=(CGFloat) */
+ public double b;
+ /** @field cast=(CGFloat) */
+ public double c;
+ /** @field cast=(CGFloat) */
+ public double d;
+ /** @field cast=(CGFloat) */
+ public double tx;
+ /** @field cast=(CGFloat) */
+ public double ty;
+ public static final int sizeof = OS.CGAffineTransform_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPathElement.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPathElement.java
index 60cdf1d044..53f3878fb4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPathElement.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPathElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,15 +9,14 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
-
package org.eclipse.swt.internal.cocoa;
public class CGPathElement {
/** @field cast=(CGPathElementType) */
public int type;
- /** @field cast=(CGPoint *) */
- public long /*int*/ points;
+ /** @field cast=(CGPoint*) */
+ public long points;
public static final int sizeof = OS.CGPathElement_sizeof();
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPoint.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPoint.java
index 3a082ac0e9..e3697e6e8f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPoint.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGPoint.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,12 +9,14 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
public class CGPoint {
- public double /*float*/ x;
- public double /*float*/ y;
+ /** @field cast=(CGFloat) */
+ public double x;
+ /** @field cast=(CGFloat) */
+ public double y;
public static final int sizeof = OS.CGPoint_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGSize.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGSize.java
index e7e50a8d43..e7e5f1f28d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGSize.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGSize.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,12 +9,14 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
public class CGSize {
- public double /*float*/ width;
- public double /*float*/ height;
+ /** @field cast=(CGFloat) */
+ public double width;
+ /** @field cast=(CGFloat) */
+ public double height;
public static final int sizeof = OS.CGSize_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras
index f0f07d87d7..12e14c63f5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras
@@ -4,12 +4,6 @@
<constant name="kCFRunLoopCommonModes" swt_gen="true"></constant>
<enum name="kCFRunLoopBeforeWaiting" swt_gen="true"></enum>
<enum name="kCFStringEncodingUTF8" swt_gen="true"></enum>
- <function name="CFAttributedStringCreate" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="CFDataGetBytePtr" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -18,19 +12,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <function name="CFDictionaryAddValue" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
- <function name="CFDictionaryCreateMutable" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="CFRelease" swt_gen="true">
<arg swt_gen="true"></arg>
<retval></retval>
@@ -62,22 +43,6 @@
<arg swt_gen="true"></arg>
<retval></retval>
</function>
- <function name="CFRunLoopRunInMode" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CFRunLoopStop" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
- <function name="CFStringCreateWithCharacters" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="char[]"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="CFURLCreateFromFSRef" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true" swt_java_type="byte[]"></arg>
@@ -91,8 +56,4 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <struct name="CFRange" swt_gen="true">
- <field name="length" swt_gen="true"></field>
- <field name="location" swt_gen="true"></field>
- </struct>
</signatures>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras
index a4f0c02ccb..d694bac6a2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras
@@ -3,11 +3,6 @@
<cftype name="CGMutablePathRef" swt_gen="true"></cftype>
<enum name="kCGBlendModeDifference" swt_gen="true"></enum>
<enum name="kCGBlendModeNormal" swt_gen="true"></enum>
- <enum name="kCGEventFilterMaskPermitLocalKeyboardEvents" swt_gen="true"></enum>
- <enum name="kCGEventFilterMaskPermitLocalMouseEvents" swt_gen="true"></enum>
- <enum name="kCGEventFilterMaskPermitSystemDefinedEvents" swt_gen="true"></enum>
- <enum name="kCGEventKeyDown" swt_gen="true"></enum>
- <enum name="kCGEventKeyUp" swt_gen="true"></enum>
<enum name="kCGEventLeftMouseDown" swt_gen="true"></enum>
<enum name="kCGEventLeftMouseUp" swt_gen="true"></enum>
<enum name="kCGEventMouseMoved" swt_gen="true"></enum>
@@ -16,8 +11,6 @@
<enum name="kCGEventRightMouseDown" swt_gen="true"></enum>
<enum name="kCGEventRightMouseUp" swt_gen="true"></enum>
<enum name="kCGEventSourceStateHIDSystemState" swt_gen="true"></enum>
- <enum name="kCGEventSuppressionStateRemoteMouseDrag" swt_gen="true"></enum>
- <enum name="kCGEventSuppressionStateSuppressionInterval" swt_gen="true"></enum>
<enum name="kCGHIDEventTap" swt_gen="true"></enum>
<enum name="kCGImageAlphaFirst" swt_gen="true"></enum>
<enum name="kCGImageAlphaLast" swt_gen="true"></enum>
@@ -36,31 +29,20 @@
<enum name="kCGPathElementAddQuadCurveToPoint" swt_gen="true"></enum>
<enum name="kCGPathElementCloseSubpath" swt_gen="true"></enum>
<enum name="kCGPathElementMoveToPoint" swt_gen="true"></enum>
- <enum name="kCGPathStroke" swt_gen="true"></enum>
<enum name="kCGScrollEventUnitLine" swt_gen="true"></enum>
- <enum name="kCGScrollEventUnitPixel" swt_gen="true"></enum>
- <enum name="kCGTextFillStroke" swt_gen="true"></enum>
<function name="CGBitmapContextCreate" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_param_name="colorspace"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CGBitmapContextCreateImage" swt_gen="true">
- <arg swt_gen="true" swt_param_name="c"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CGBitmapContextGetData" swt_gen="true">
- <arg swt_gen="true" swt_param_name="c"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
<function name="CGColorCreate" swt_gen="true">
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+ <arg swt_gen="true" swt_java_type="double[]"></arg>
<retval swt_gen="true"></retval>
</function>
<function name="CGColorRelease" swt_gen="true">
@@ -85,6 +67,10 @@
<arg swt_gen="true"></arg>
<retval></retval>
</function>
+ <function name="CGContextCopyPath" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </function>
<function name="CGContextDrawImage" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -128,13 +114,13 @@
<retval></retval>
</function>
<function name="CGContextSetFillColor" swt_gen="true">
- <arg swt_gen="true" swt_param_name="c"></arg>
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true" swt_java_type="double[]"></arg>
<retval></retval>
</function>
<function name="CGContextSetFillColorSpace" swt_gen="true">
- <arg swt_gen="true" swt_param_name="c"></arg>
- <arg swt_gen="true" swt_param_name="colorspace"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
<retval></retval>
</function>
<function name="CGContextSetLineCap" swt_gen="true">
@@ -145,7 +131,7 @@
<function name="CGContextSetLineDash" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="float[]"></arg>
+ <arg swt_gen="true" swt_java_type="double[]"></arg>
<arg swt_gen="true"></arg>
<retval></retval>
</function>
@@ -164,27 +150,6 @@
<arg swt_gen="true"></arg>
<retval></retval>
</function>
- <function name="CGContextSetShouldAntialias" swt_gen="true">
- <arg swt_gen="true" swt_param_name="c"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
- <function name="CGContextSetTextDrawingMode" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
- <function name="CGContextSetTextMatrix" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
- <function name="CGContextSetTextPosition" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
<function name="CGContextStrokePath" swt_gen="true">
<arg swt_gen="true"></arg>
<retval></retval>
@@ -211,11 +176,7 @@
<arg swt_gen="true"></arg>
<retval></retval>
</function>
- <function name="CGDisplayPixelsHigh" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CGDisplayPixelsWide" swt_gen="true">
+ <function name="CGDisplayCreateImage" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
@@ -235,7 +196,7 @@
<function name="CGEventCreateScrollWheelEvent" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_param_cast="CGWheelCount"></arg>
+ <arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
@@ -250,14 +211,14 @@
<retval></retval>
</function>
<function name="CGEventSourceCreate" swt_gen="true">
- <arg swt_gen="true" swt_param_name="sourceState"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
<function name="CGGetDisplaysWithRect" swt_gen="true">
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_param_cast="CGDisplayCount"></arg>
- <arg swt_gen="true" swt_param_name="dspys"></arg>
- <arg swt_gen="true" swt_param_cast="CGDisplayCount*" swt_param_name="dspyCnt"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
<function name="CGImageCreate" swt_gen="true">
@@ -266,7 +227,7 @@
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_param_name="colorspace"></arg>
+ <arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -304,12 +265,6 @@
<arg swt_gen="true"></arg>
<retval></retval>
</function>
- <function name="CGPathAddRect" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
<function name="CGPathApply" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -324,10 +279,6 @@
<arg swt_gen="true"></arg>
<retval></retval>
</function>
- <function name="CGPathCreateCopy" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="CGPathCreateMutable" swt_gen="true">
<retval swt_gen="true"></retval>
</function>
@@ -342,32 +293,6 @@
<arg swt_gen="true"></arg>
<retval></retval>
</function>
- <function name="CGPostKeyboardEvent" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="boolean"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CGPostMouseEvent" swt_variadic_count="4" swt_variadic_java_types="boolean,*">
- <arg></arg>
- <arg swt_java_type="boolean"></arg>
- <arg></arg>
- <arg swt_java_type="boolean"></arg>
- <retval></retval>
- </function>
- <function name="CGSetLocalEventsFilterDuringSuppressionState" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CGSetLocalEventsSuppressionInterval" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CGWarpMouseCursorPosition" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
<struct name="CGAffineTransform" swt_gen="true">
<field name="a" swt_gen="true"></field>
<field name="b" swt_gen="true"></field>
@@ -376,7 +301,7 @@
<field name="tx" swt_gen="true"></field>
<field name="ty" swt_gen="true"></field>
</struct>
- <struct name="CGPathElement" swt_gen="true">
+ <struct name="CGPathElement" swt_gen="true" swt_gen_memmove="true">
<field name="points" swt_gen="true"></field>
<field name="type" swt_gen="true"></field>
</struct>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras
index bd180d9230..9a3005d10a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras
@@ -1,63 +1,10 @@
<?xml version="1.0" encoding="UTF8"?>
<signatures swt_gen="mixed">
- <constant name="kCTFontAttributeName" swt_gen="true"></constant>
- <constant name="kCTForegroundColorAttributeName" swt_gen="true"></constant>
- <constant name="kCTParagraphStyleAttributeName" swt_gen="true"></constant>
- <enum name="kCTParagraphStyleSpecifierBaseWritingDirection" swt_gen="true"></enum>
- <enum name="kCTWritingDirectionLeftToRight" swt_gen="true"></enum>
- <enum name="kCTWritingDirectionNatural" swt_gen="true"></enum>
- <enum name="kCTWritingDirectionRightToLeft" swt_gen="true"></enum>
- <function name="CTFontGetAscent" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTFontGetDescent" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTFontGetLeading" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTLineCreateWithAttributedString" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTLineDraw" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval></retval>
- </function>
- <function name="CTLineGetTypographicBounds" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
- <arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTParagraphStyleCreate" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTTypesetterCreateLine" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTTypesetterCreateWithAttributedString" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="CTTypesetterSuggestLineBreak" swt_gen="true">
+ <enum name="kCTFontManagerScopeProcess" swt_gen="true"></enum>
+ <function name="CTFontManagerRegisterFontsForURL" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <struct name="CTParagraphStyleSetting" swt_gen="true">
- <field name="spec" swt_gen="true"></field>
- <field name="value" swt_gen="true"></field>
- <field name="valueSize" swt_gen="true"></field>
- </struct>
</signatures>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMDocument.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMDocument.java
index 42f9b4e136..3f83411903 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMDocument.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMDocument.java
@@ -19,7 +19,7 @@ public DOMDocument() {
super();
}
-public DOMDocument(long /*int*/ id) {
+public DOMDocument(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public DOMDocument(id id) {
}
public WebFrame webFrame() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_webFrame);
+ long result = OS.objc_msgSend(this.id, OS.sel_webFrame);
return result != 0 ? new WebFrame(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMEvent.java
index d8f9e19585..1e7657910b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMEvent.java
@@ -19,7 +19,7 @@ public DOMEvent() {
super();
}
-public DOMEvent(long /*int*/ id) {
+public DOMEvent(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMKeyboardEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMKeyboardEvent.java
index 891b84eb8d..272023cb19 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMKeyboardEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMKeyboardEvent.java
@@ -19,7 +19,7 @@ public DOMKeyboardEvent() {
super();
}
-public DOMKeyboardEvent(long /*int*/ id) {
+public DOMKeyboardEvent(long id) {
super(id);
}
@@ -32,7 +32,7 @@ public boolean altKey() {
}
public int charCode() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_charCode);
+ return (int)OS.objc_msgSend(this.id, OS.sel_charCode);
}
public boolean ctrlKey() {
@@ -40,7 +40,7 @@ public boolean ctrlKey() {
}
public int keyCode() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_keyCode);
+ return (int)OS.objc_msgSend(this.id, OS.sel_keyCode);
}
public boolean metaKey() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java
index 19775c4816..af50e8ebd9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java
@@ -19,7 +19,7 @@ public DOMMouseEvent() {
super();
}
-public DOMMouseEvent(long /*int*/ id) {
+public DOMMouseEvent(long id) {
super(id);
}
@@ -44,11 +44,11 @@ public boolean metaKey() {
}
public int screenX() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_screenX);
+ return (int)OS.objc_msgSend(this.id, OS.sel_screenX);
}
public int screenY() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_screenY);
+ return (int)OS.objc_msgSend(this.id, OS.sel_screenY);
}
public boolean shiftKey() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMUIEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMUIEvent.java
index 502740cf71..3ceadfb7ff 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMUIEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMUIEvent.java
@@ -19,7 +19,7 @@ public DOMUIEvent() {
super();
}
-public DOMUIEvent(long /*int*/ id) {
+public DOMUIEvent(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public DOMUIEvent(id id) {
}
public int detail() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_detail);
+ return (int)OS.objc_msgSend(this.id, OS.sel_detail);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java
index d2ed4a115c..762716174c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java
@@ -19,7 +19,7 @@ public DOMWheelEvent() {
super();
}
-public DOMWheelEvent(long /*int*/ id) {
+public DOMWheelEvent(long id) {
super(id);
}
@@ -28,15 +28,15 @@ public DOMWheelEvent(id id) {
}
public int wheelDelta() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_wheelDelta);
+ return (int)OS.objc_msgSend(this.id, OS.sel_wheelDelta);
}
public int wheelDeltaX() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_wheelDeltaX);
+ return (int)OS.objc_msgSend(this.id, OS.sel_wheelDeltaX);
}
public int wheelDeltaY() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_wheelDeltaY);
+ return (int)OS.objc_msgSend(this.id, OS.sel_wheelDeltaY);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras
index 3a0d229a6b..5278956bc4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras
@@ -3,7 +3,7 @@
<class name="NSAffineTransform" swt_gen="mixed">
<method selector="initWithTransform:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSAffineTransform"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="invert" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -47,16 +47,16 @@
</class>
<class name="NSAppleEventDescriptor" swt_gen="mixed">
<method selector="initListDescriptor" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSAppleEventDescriptor"></retval>
+ <retval swt_gen="true"></retval>
</method>
</class>
<class name="NSArray" swt_gen="mixed">
<method class_method="true" selector="array" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSArray"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="arrayWithObject:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_alloc="true" swt_gen="true" swt_java_type="NSArray"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="containsObject:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -93,12 +93,12 @@
</method>
<method selector="initWithString:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSAttributedString"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithString:attributes:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSAttributedString"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="length" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -146,9 +146,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="resourcePath" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSCalendarDate" swt_gen="mixed" swt_superclass="NSDate">
<method class_method="true" selector="calendarDate" swt_gen="true">
@@ -186,32 +183,11 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSCharacterSet" swt_gen="mixed">
- <method selector="characterIsMember:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method class_method="true" selector="decimalDigitCharacterSet" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- </class>
- <class name="NSCloneCommand" swt_superclass="NSScriptCommand">
- </class>
- <class name="NSCloseCommand" swt_superclass="NSScriptCommand">
- </class>
<class name="NSCoder" swt_gen="mixed">
<method selector="systemVersion" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSComparisonPredicate" swt_superclass="NSPredicate">
- </class>
- <class name="NSCompoundPredicate" swt_superclass="NSPredicate">
- </class>
- <class name="NSCountedSet" swt_superclass="NSMutableSet">
- </class>
- <class name="NSCreateCommand" swt_superclass="NSScriptCommand">
- </class>
<class name="NSData" swt_gen="mixed">
<method selector="bytes" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -219,17 +195,12 @@
<method class_method="true" selector="dataWithBytes:length:" swt_gen="true">
<arg swt_gen="true" swt_java_type="byte[]"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSData"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="getBytes:" swt_gen="true">
<arg swt_gen="true" swt_java_type="byte[]"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="getBytes:length:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="length" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -242,18 +213,12 @@
</method>
<method class_method="true" selector="dateWithTimeIntervalSinceNow:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_alloc="true" swt_gen="true" swt_java_type="NSDate"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="distantFuture" swt_gen="true">
- <retval swt_alloc="true" swt_gen="true" swt_java_type="NSDate"></retval>
+ <retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSDateFormatter" swt_superclass="NSFormatter">
- </class>
- <class name="NSDecimalNumber" swt_superclass="NSNumber">
- </class>
- <class name="NSDeleteCommand" swt_superclass="NSScriptCommand">
- </class>
<class name="NSDictionary" swt_gen="mixed">
<method selector="allKeys" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -264,7 +229,7 @@
<method class_method="true" selector="dictionaryWithObject:forKey:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_alloc="true" swt_gen="true" swt_java_type="NSDictionary"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="objectEnumerator" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -283,10 +248,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSDistantObject" swt_superclass="NSProxy">
- </class>
- <class name="NSDistributedNotificationCenter" swt_superclass="NSNotificationCenter">
- </class>
<class name="NSEnumerator" swt_gen="mixed">
<method selector="nextObject" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -304,17 +265,6 @@
</method>
</class>
<class name="NSFileManager" swt_gen="mixed">
- <method selector="URLsForDirectory:inDomains:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
- <method selector="createFileAtPath:contents:attributes:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method class_method="true" selector="defaultManager" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -335,11 +285,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="removeItemAtPath:error:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSFormatter" swt_gen="mixed">
<method selector="stringForObjectValue:" swt_gen="true">
@@ -383,8 +328,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSHTTPURLResponse" swt_superclass="NSURLResponse">
- </class>
<class name="NSIndexSet" swt_gen="mixed">
<method selector="containsIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -393,38 +336,21 @@
<method selector="count" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="firstIndex" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="getIndexes:maxCount:inIndexRange:" swt_gen="true">
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+ <arg swt_gen="true" swt_java_type="long[]"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="indexSetWithIndex:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
<method selector="initWithIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSIndexSet"></retval>
- </method>
- <method selector="initWithIndexSet:" swt_gen="true">
- <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
<method selector="initWithIndexesInRange:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSIndexSet"></retval>
+ <retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSIndexSpecifier" swt_superclass="NSScriptObjectSpecifier">
- </class>
- <class name="NSInputStream" swt_superclass="NSStream">
- </class>
- <class name="NSInvocationOperation" swt_superclass="NSOperation">
- </class>
<class name="NSKeyedArchiver" swt_gen="mixed" swt_superclass="NSCoder">
<method class_method="true" selector="archivedDataWithRootObject:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -448,16 +374,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSLogicalTest" swt_superclass="NSScriptWhoseTest">
- </class>
- <class name="NSMachBootstrapServer" swt_superclass="NSPortNameServer">
- </class>
- <class name="NSMachPort" swt_superclass="NSPort">
- </class>
- <class name="NSMessagePortNameServer" swt_superclass="NSPortNameServer">
- </class>
- <class name="NSMoveCommand" swt_superclass="NSScriptCommand">
- </class>
<class name="NSMutableArray" swt_gen="mixed" swt_superclass="NSArray">
<method selector="addObject:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -469,11 +385,16 @@
</method>
<method class_method="true" selector="arrayWithCapacity:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSMutableArray"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithCapacity:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSMutableArray"></retval>
+ <retval swt_gen="true"></retval>
+ </method>
+ <method selector="insertObject:atIndex:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="removeLastObject" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -508,9 +429,6 @@
<method selector="endEditing" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="mutableString" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="removeAttribute:range:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -526,18 +444,14 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSMutableCharacterSet" swt_superclass="NSCharacterSet">
- </class>
- <class name="NSMutableData" swt_superclass="NSData">
- </class>
<class name="NSMutableDictionary" swt_gen="mixed" swt_superclass="NSDictionary">
<method class_method="true" selector="dictionaryWithCapacity:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSMutableDictionary"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="initWithCapacity:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSMutableDictionary"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="removeObjectForKey:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -563,10 +477,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="removeIndex:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSMutableSet" swt_gen="mixed" swt_superclass="NSSet">
<method selector="addObjectsFromArray:" swt_gen="true">
@@ -612,8 +522,6 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSNameSpecifier" swt_superclass="NSScriptObjectSpecifier">
- </class>
<class name="NSNotification" swt_gen="mixed">
<method selector="object" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -631,15 +539,9 @@
<retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="defaultCenter" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSNotificationCenter"></retval>
- </method>
- <method selector="removeObserver:" swt_gen="true">
- <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="removeObserver:name:object:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
+ <method selector="removeObserver:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -678,27 +580,9 @@
</method>
</class>
<class name="NSNumberFormatter" swt_gen="mixed" swt_superclass="NSFormatter">
- <method selector="allowsFloats" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="alwaysShowsDecimalSeparator" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="decimalSeparator" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="maximum" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="maximumFractionDigits" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="maximumIntegerDigits" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
- <method selector="minimum" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="setAllowsFloats:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -738,7 +622,7 @@
</class>
<class name="NSObject" swt_gen="mixed">
<method selector="autorelease" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSObject"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="cancelAuthenticationChallenge:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -761,13 +645,9 @@
<retval swt_gen="true"></retval>
</method>
<method selector="init" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSObject"></retval>
- </method>
- <method selector="isEqual:" swt_gen="true">
- <arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="isEqualTo:" swt_gen="true">
+ <method selector="isEqual:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -822,17 +702,13 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSOutputStream" swt_superclass="NSStream">
- </class>
- <class name="NSPortCoder" swt_superclass="NSCoder">
- </class>
- <class name="NSProtocolChecker" swt_superclass="NSProxy">
- </class>
- <class name="NSQuitCommand" swt_superclass="NSScriptCommand">
- </class>
- <class name="NSRangeSpecifier" swt_superclass="NSScriptObjectSpecifier">
- </class>
- <class name="NSRelativeSpecifier" swt_superclass="NSScriptObjectSpecifier">
+ <class name="NSProcessInfo" swt_gen="mixed">
+ <method selector="operatingSystemVersion" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
+ <method class_method="true" selector="processInfo" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
</class>
<class name="NSRunLoop" swt_gen="mixed">
<method selector="addTimer:forMode:" swt_gen="true">
@@ -843,17 +719,12 @@
<method class_method="true" selector="currentRunLoop" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method class_method="true" selector="mainRunLoop" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="runMode:beforeDate:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSScriptClassDescription" swt_superclass="NSClassDescription">
- </class>
<class name="NSSet" swt_gen="mixed">
<method selector="allObjects" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -865,32 +736,21 @@
<retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="set" swt_gen="true">
- <retval swt_alloc="true" swt_gen="true" swt_java_type="NSSet"></retval>
+ <retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSSetCommand" swt_superclass="NSScriptCommand">
- </class>
- <class name="NSSocketPort" swt_superclass="NSPort">
- </class>
- <class name="NSSocketPortNameServer" swt_superclass="NSPortNameServer">
- </class>
- <class name="NSSpecifierTest" swt_superclass="NSScriptWhoseTest">
- </class>
<class name="NSString" swt_gen="mixed">
<method selector="UTF8String" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
<method selector="characterAtIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="int" swt_java_type64="long"></retval>
+ <retval swt_gen="true" swt_java_type="char"></retval>
</method>
<method selector="compare:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="fileSystemRepresentation" swt_gen="true">
- <retval swt_gen="true"></retval>
- </method>
<method selector="getCharacters:" swt_gen="true">
<arg swt_gen="true" swt_java_type="char[]"></arg>
<retval swt_gen="true"></retval>
@@ -903,7 +763,7 @@
<method selector="initWithCharacters:length:" swt_gen="true">
<arg swt_gen="true" swt_java_type="char[]"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSString"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="isEqualToString:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -922,7 +782,7 @@
<retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="string" swt_gen="true">
- <retval swt_gen="true" swt_java_type="NSString"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="stringByAddingPercentEscapesUsingEncoding:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -958,11 +818,11 @@
<method class_method="true" selector="stringWithCharacters:length:" swt_gen="true">
<arg swt_gen="true" swt_java_type="char[]"></arg>
<arg swt_gen="true"></arg>
- <retval swt_alloc="true" swt_gen="true" swt_java_type="NSString"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="stringWithUTF8String:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSString"></retval>
+ <retval swt_gen="true"></retval>
</method>
</class>
<class name="NSThread" swt_gen="mixed">
@@ -1004,14 +864,14 @@
<class name="NSURL" swt_gen="mixed">
<method class_method="true" selector="URLWithString:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSURL"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="absoluteString" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="fileURLWithPath:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSURL"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="host" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -1079,24 +939,24 @@
<method selector="URL" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="initWithURL:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="NSURLRequest"></retval>
- </method>
<method class_method="true" selector="requestWithURL:" swt_gen="true">
<arg swt_gen="true"></arg>
- <retval swt_alloc="true" swt_gen="true" swt_java_type="NSURLRequest"></retval>
+ <retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSUnarchiver" swt_superclass="NSCoder">
- </class>
<class name="NSUndoManager" swt_gen="mixed">
+ <method selector="beginUndoGrouping" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="canRedo" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
<method selector="canUndo" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="endUndoGrouping" swt_gen="true">
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="redo" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
@@ -1104,13 +964,15 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSUniqueIDSpecifier" swt_superclass="NSScriptObjectSpecifier">
- </class>
<class name="NSUserDefaults" swt_gen="mixed">
<method selector="objectForKey:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
+ <method selector="registerDefaults:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="setInteger:forKey:" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -1157,24 +1019,11 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSWhoseSpecifier" swt_superclass="NSScriptObjectSpecifier">
- </class>
- <class name="NSXMLDTD" swt_superclass="NSXMLNode">
- </class>
- <class name="NSXMLDTDNode" swt_superclass="NSXMLNode">
- </class>
- <class name="NSXMLDocument" swt_superclass="NSXMLNode">
- </class>
- <class name="NSXMLElement" swt_superclass="NSXMLNode">
- </class>
<constant name="NSDefaultRunLoopMode" swt_gen="true"></constant>
- <constant name="NSErrorFailingURLStringKey" swt_gen="true"></constant>
<constant name="NSLocaleLanguageCode" swt_gen="true"></constant>
<constant name="NSNotFound" swt_gen="true"></constant>
<enum name="NSAllApplicationsDirectory" swt_gen="true"></enum>
<enum name="NSAllDomainsMask" swt_gen="true"></enum>
- <enum name="NSCachesDirectory" swt_gen="true"></enum>
- <enum name="NSNotFound" swt_gen="true"></enum>
<enum name="NSOrderedSame" swt_gen="true"></enum>
<enum name="NSURLCredentialPersistenceForSession" swt_gen="true"></enum>
<enum name="NSURLErrorBadURL" swt_gen="true"></enum>
@@ -1182,22 +1031,11 @@
<enum name="NSURLErrorServerCertificateNotYetValid" swt_gen="true"></enum>
<enum name="NSURLRequestReloadIgnoringLocalCacheData" swt_gen="true"></enum>
<enum name="NSUTF8StringEncoding" swt_gen="true"></enum>
- <enum name="NSUserDomainMask" swt_gen="true"></enum>
<function name="NSEqualRects" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <function name="NSFileTypeForHFSTypeCode" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </function>
- <function name="NSGetSizeAndAlignment" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
- <arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
- <retval swt_gen="true"></retval>
- </function>
<function name="NSPointInRect" swt_gen="true">
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
@@ -1209,9 +1047,6 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</function>
- <function name="NSTemporaryDirectory" swt_gen="true">
- <retval swt_gen="true"></retval>
- </function>
<informal_protocol name="NSURLDownloadDelegate" swt_gen="mixed">
<method selector="download:decideDestinationWithSuggestedFilename:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -1227,19 +1062,22 @@
<field name="tX" swt_gen="true"></field>
<field name="tY" swt_gen="true"></field>
</struct>
- <struct name="NSPoint" swt_gen="true">
+ <struct name="NSOperatingSystemVersion" swt_gen="true">
+ <field name="majorVersion" swt_gen="true"></field>
+ <field name="minorVersion" swt_gen="true"></field>
+ <field name="patchVersion" swt_gen="true"></field>
+ </struct>
+ <struct name="NSPoint" swt_gen="true" swt_gen_memmove="true" swt_gen_tostring="true">
<field name="x" swt_gen="true"></field>
<field name="y" swt_gen="true"></field>
</struct>
- <struct name="NSRange" swt_gen="true">
+ <struct name="NSRange" swt_gen="true" swt_gen_memmove="true">
<field name="length" swt_gen="true"></field>
<field name="location" swt_gen="true"></field>
</struct>
- <struct name="NSRect" swt_gen="true">
- <field name="origin" swt_gen="true"></field>
- <field name="size" swt_gen="true"></field>
+ <struct name="NSRect" swt_gen_memmove="true">
</struct>
- <struct name="NSSize" swt_gen="true">
+ <struct name="NSSize" swt_gen="true" swt_gen_memmove="true" swt_gen_tostring="true">
<field name="height" swt_gen="true"></field>
<field name="width" swt_gen="true"></field>
</struct>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSActionCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSActionCell.java
index 00ce2706e6..ca2f1dcc2d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSActionCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSActionCell.java
@@ -19,7 +19,7 @@ public NSActionCell() {
super();
}
-public NSActionCell(long /*int*/ id) {
+public NSActionCell(long id) {
super(id);
}
@@ -27,11 +27,11 @@ public NSActionCell(id id) {
super(id);
}
-public long /*int*/ action() {
+public long action() {
return OS.objc_msgSend(this.id, OS.sel_action);
}
-public void setAction(long /*int*/ action) {
+public void setAction(long action) {
OS.objc_msgSend(this.id, OS.sel_setAction_, action);
}
@@ -40,7 +40,7 @@ public void setTarget(id target) {
}
public id target() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_target);
+ long result = OS.objc_msgSend(this.id, OS.sel_target);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransform.java
index b9bb9c6b47..bfbdcc2be8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransform.java
@@ -19,7 +19,7 @@ public NSAffineTransform() {
super();
}
-public NSAffineTransform(long /*int*/ id) {
+public NSAffineTransform(long id) {
super(id);
}
@@ -36,7 +36,7 @@ public void set() {
}
public NSAffineTransform initWithTransform(NSAffineTransform transform) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithTransform_, transform != null ? transform.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithTransform_, transform != null ? transform.id : 0);
return result == this.id ? this : (result != 0 ? new NSAffineTransform(result) : null);
}
@@ -48,11 +48,11 @@ public void prependTransform(NSAffineTransform transform) {
OS.objc_msgSend(this.id, OS.sel_prependTransform_, transform != null ? transform.id : 0);
}
-public void rotateByDegrees(double /*float*/ angle) {
+public void rotateByDegrees(double angle) {
OS.objc_msgSend(this.id, OS.sel_rotateByDegrees_, angle);
}
-public void scaleXBy(double /*float*/ scaleX, double /*float*/ scaleY) {
+public void scaleXBy(double scaleX, double scaleY) {
OS.objc_msgSend(this.id, OS.sel_scaleXBy_yBy_, scaleX, scaleY);
}
@@ -61,7 +61,7 @@ public void setTransformStruct(NSAffineTransformStruct transformStruct) {
}
public static NSAffineTransform transform() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSAffineTransform, OS.sel_transform);
+ long result = OS.objc_msgSend(OS.class_NSAffineTransform, OS.sel_transform);
return result != 0 ? new NSAffineTransform(result) : null;
}
@@ -83,7 +83,7 @@ public NSAffineTransformStruct transformStruct() {
return result;
}
-public void translateXBy(double /*float*/ deltaX, double /*float*/ deltaY) {
+public void translateXBy(double deltaX, double deltaY) {
OS.objc_msgSend(this.id, OS.sel_translateXBy_yBy_, deltaX, deltaY);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransformStruct.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransformStruct.java
index 0624e16c83..e63c8776bf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransformStruct.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAffineTransformStruct.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,12 +9,22 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
public class NSAffineTransformStruct {
- public double /*float*/ m11, m12, m21, m22;
- public double /*float*/ tX, tY;
+ /** @field cast=(CGFloat) */
+ public double m11;
+ /** @field cast=(CGFloat) */
+ public double m12;
+ /** @field cast=(CGFloat) */
+ public double m21;
+ /** @field cast=(CGFloat) */
+ public double m22;
+ /** @field cast=(CGFloat) */
+ public double tX;
+ /** @field cast=(CGFloat) */
+ public double tY;
public static final int sizeof = OS.NSAffineTransformStruct_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAlert.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAlert.java
index d6706a14c3..70685f40c5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAlert.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAlert.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSAlert() {
super();
}
-public NSAlert(long /*int*/ id) {
+public NSAlert(long id) {
super(id);
}
@@ -28,28 +28,32 @@ public NSAlert(id id) {
}
public NSButton addButtonWithTitle(NSString title) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_addButtonWithTitle_, title != null ? title.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_addButtonWithTitle_, title != null ? title.id : 0);
return result != 0 ? new NSButton(result) : null;
}
-public void beginSheetModalForWindow(NSWindow window, id delegate, long /*int*/ didEndSelector, long /*int*/ contextInfo) {
+public void beginSheetModalForWindow(NSWindow window, id delegate, long didEndSelector, long contextInfo) {
OS.objc_msgSend(this.id, OS.sel_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_, window != null ? window.id : 0, delegate != null ? delegate.id : 0, didEndSelector, contextInfo);
}
-public long /*int*/ runModal() {
+public long runModal() {
return OS.objc_msgSend(this.id, OS.sel_runModal);
}
-public void setAlertStyle(long /*int*/ alertStyle) {
+public void setAlertStyle(long alertStyle) {
OS.objc_msgSend(this.id, OS.sel_setAlertStyle_, alertStyle);
}
+public void setIcon(NSImage icon) {
+ OS.objc_msgSend(this.id, OS.sel_setIcon_, icon != null ? icon.id : 0);
+}
+
public void setMessageText(NSString messageText) {
OS.objc_msgSend(this.id, OS.sel_setMessageText_, messageText != null ? messageText.id : 0);
}
public NSPanel window() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_window);
+ long result = OS.objc_msgSend(this.id, OS.sel_window);
return result != 0 ? new NSPanel(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppearance.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppearance.java
index 172c1a9563..a1c80b7bde 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppearance.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppearance.java
@@ -19,7 +19,7 @@ public NSAppearance() {
super();
}
-public NSAppearance(long /*int*/ id) {
+public NSAppearance(long id) {
super(id);
}
@@ -28,12 +28,17 @@ public NSAppearance(id id) {
}
public static NSAppearance appearanceNamed(NSString name) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSAppearance, OS.sel_appearanceNamed_, name != null ? name.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSAppearance, OS.sel_appearanceNamed_, name != null ? name.id : 0);
+ return result != 0 ? new NSAppearance(result) : null;
+}
+
+public static NSAppearance currentAppearance() {
+ long result = OS.objc_msgSend(OS.class_NSAppearance, OS.sel_currentAppearance);
return result != 0 ? new NSAppearance(result) : null;
}
public NSString name() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_name);
+ long result = OS.objc_msgSend(this.id, OS.sel_name);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppleEventDescriptor.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppleEventDescriptor.java
index 1af3d6c180..5dba222ba3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppleEventDescriptor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAppleEventDescriptor.java
@@ -19,7 +19,7 @@ public NSAppleEventDescriptor() {
super();
}
-public NSAppleEventDescriptor(long /*int*/ id) {
+public NSAppleEventDescriptor(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSAppleEventDescriptor(id id) {
}
public NSAppleEventDescriptor initListDescriptor() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initListDescriptor);
+ long result = OS.objc_msgSend(this.id, OS.sel_initListDescriptor);
return result == this.id ? this : (result != 0 ? new NSAppleEventDescriptor(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java
index d648b10717..c1bdbdebf5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSApplication() {
super();
}
-public NSApplication(long /*int*/ id) {
+public NSApplication(long id) {
super(id);
}
@@ -32,7 +32,7 @@ public void activateIgnoringOtherApps(boolean flag) {
}
public NSImage applicationIconImage() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_applicationIconImage);
+ long result = OS.objc_msgSend(this.id, OS.sel_applicationIconImage);
return result != 0 ? new NSImage(result) : null;
}
@@ -40,21 +40,21 @@ public void arrangeInFront(id sender) {
OS.objc_msgSend(this.id, OS.sel_arrangeInFront_, sender != null ? sender.id : 0);
}
-public void beginSheet(NSWindow sheet, NSWindow docWindow, id modalDelegate, long /*int*/ didEndSelector, long /*int*/ contextInfo) {
+public void beginSheet(NSWindow sheet, NSWindow docWindow, id modalDelegate, long didEndSelector, long contextInfo) {
OS.objc_msgSend(this.id, OS.sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_, sheet != null ? sheet.id : 0, docWindow != null ? docWindow.id : 0, modalDelegate != null ? modalDelegate.id : 0, didEndSelector, contextInfo);
}
public NSEvent currentEvent() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_currentEvent);
+ long result = OS.objc_msgSend(this.id, OS.sel_currentEvent);
return result != 0 ? new NSEvent(result) : null;
}
public NSDockTile dockTile() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dockTile);
+ long result = OS.objc_msgSend(this.id, OS.sel_dockTile);
return result != 0 ? new NSDockTile(result) : null;
}
-public void endSheet(NSWindow sheet, long /*int*/ returnCode) {
+public void endSheet(NSWindow sheet, long returnCode) {
OS.objc_msgSend(this.id, OS.sel_endSheet_returnCode_, sheet != null ? sheet.id : 0, returnCode);
}
@@ -79,22 +79,17 @@ public boolean isRunning() {
}
public NSWindow keyWindow() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_keyWindow);
+ long result = OS.objc_msgSend(this.id, OS.sel_keyWindow);
return result != 0 ? new NSWindow(result) : null;
}
public NSMenu mainMenu() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_mainMenu);
+ long result = OS.objc_msgSend(this.id, OS.sel_mainMenu);
return result != 0 ? new NSMenu(result) : null;
}
-public NSWindow mainWindow() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_mainWindow);
- return result != 0 ? new NSWindow(result) : null;
-}
-
-public NSEvent nextEventMatchingMask(long /*int*/ mask, NSDate expiration, NSString mode, boolean deqFlag) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, mask, expiration != null ? expiration.id : 0, mode != null ? mode.id : 0, deqFlag);
+public NSEvent nextEventMatchingMask(long mask, NSDate expiration, NSString mode, boolean deqFlag) {
+ long result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, mask, expiration != null ? expiration.id : 0, mode != null ? mode.id : 0, deqFlag);
return result != 0 ? new NSEvent(result) : null;
}
@@ -102,28 +97,19 @@ public void orderFrontStandardAboutPanel(id sender) {
OS.objc_msgSend(this.id, OS.sel_orderFrontStandardAboutPanel_, sender != null ? sender.id : 0);
}
-public NSArray orderedWindows() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_orderedWindows);
- return result != 0 ? new NSArray(result) : null;
-}
-
public void postEvent(NSEvent event, boolean flag) {
OS.objc_msgSend(this.id, OS.sel_postEvent_atStart_, event != null ? event.id : 0, flag);
}
-public void replyToOpenOrPrint(long /*int*/ reply) {
+public void replyToOpenOrPrint(long reply) {
OS.objc_msgSend(this.id, OS.sel_replyToOpenOrPrint_, reply);
}
-public void run() {
- OS.objc_msgSend(this.id, OS.sel_run);
-}
-
-public long /*int*/ runModalForWindow(NSWindow theWindow) {
+public long runModalForWindow(NSWindow theWindow) {
return OS.objc_msgSend(this.id, OS.sel_runModalForWindow_, theWindow != null ? theWindow.id : 0);
}
-public boolean sendAction(long /*int*/ theAction, id theTarget, id sender) {
+public boolean sendAction(long theAction, id theTarget, id sender) {
return OS.objc_msgSend_bool(this.id, OS.sel_sendAction_to_from_, theAction, theTarget != null ? theTarget.id : 0, sender != null ? sender.id : 0);
}
@@ -131,7 +117,7 @@ public void sendEvent(NSEvent theEvent) {
OS.objc_msgSend(this.id, OS.sel_sendEvent_, theEvent != null ? theEvent.id : 0);
}
-public boolean setActivationPolicy(long /*int*/ activationPolicy) {
+public boolean setActivationPolicy(long activationPolicy) {
return OS.objc_msgSend_bool(this.id, OS.sel_setActivationPolicy_, activationPolicy);
}
@@ -156,7 +142,7 @@ public void setServicesMenu(NSMenu servicesMenu) {
}
public static NSApplication sharedApplication() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSApplication, OS.sel_sharedApplication);
+ long result = OS.objc_msgSend(OS.class_NSApplication, OS.sel_sharedApplication);
return result != 0 ? new NSApplication(result) : null;
}
@@ -176,13 +162,13 @@ public void unhideAllApplications(id sender) {
OS.objc_msgSend(this.id, OS.sel_unhideAllApplications_, sender != null ? sender.id : 0);
}
-public NSWindow windowWithWindowNumber(long /*int*/ windowNum) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_windowWithWindowNumber_, windowNum);
+public NSWindow windowWithWindowNumber(long windowNum) {
+ long result = OS.objc_msgSend(this.id, OS.sel_windowWithWindowNumber_, windowNum);
return result != 0 ? new NSWindow(result) : null;
}
public NSArray windows() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_windows);
+ long result = OS.objc_msgSend(this.id, OS.sel_windows);
return result != 0 ? new NSArray(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSArray.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSArray.java
index 702ade9516..87c0e098b9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSArray.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSArray.java
@@ -19,7 +19,7 @@ public NSArray() {
super();
}
-public NSArray(long /*int*/ id) {
+public NSArray(long id) {
super(id);
}
@@ -28,12 +28,12 @@ public NSArray(id id) {
}
public static NSArray array() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSArray, OS.sel_array);
+ long result = OS.objc_msgSend(OS.class_NSArray, OS.sel_array);
return result != 0 ? new NSArray(result) : null;
}
public static NSArray arrayWithObject(id anObject) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObject_, anObject != null ? anObject.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObject_, anObject != null ? anObject.id : 0);
return result != 0 ? new NSArray(result) : null;
}
@@ -41,16 +41,16 @@ public boolean containsObject(id anObject) {
return OS.objc_msgSend_bool(this.id, OS.sel_containsObject_, anObject != null ? anObject.id : 0);
}
-public long /*int*/ count() {
+public long count() {
return OS.objc_msgSend(this.id, OS.sel_count);
}
-public long /*int*/ indexOfObjectIdenticalTo(id anObject) {
+public long indexOfObjectIdenticalTo(id anObject) {
return OS.objc_msgSend(this.id, OS.sel_indexOfObjectIdenticalTo_, anObject != null ? anObject.id : 0);
}
-public id objectAtIndex(long /*int*/ index) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_objectAtIndex_, index);
+public id objectAtIndex(long index) {
+ long result = OS.objc_msgSend(this.id, OS.sel_objectAtIndex_, index);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAttributedString.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAttributedString.java
index 1596c1a457..9f02dbcb01 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAttributedString.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAttributedString.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSAttributedString() {
super();
}
-public NSAttributedString(long /*int*/ id) {
+public NSAttributedString(long id) {
super(id);
}
@@ -27,32 +27,17 @@ public NSAttributedString(id id) {
super(id);
}
-public static NSAttributedString attributedStringWithAttachment(NSTextAttachment attachment) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSAttributedString, OS.sel_attributedStringWithAttachment_, attachment != null ? attachment.id : 0);
- return result != 0 ? new NSAttributedString(result) : null;
-}
-
-public NSRect boundingRectWithSize(NSSize size, long /*int*/ options) {
+public NSRect boundingRectWithSize(NSSize size, long options) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_boundingRectWithSize_options_, size, options);
return result;
}
-public NSRange doubleClickAtIndex(long /*int*/ location) {
- NSRange result = new NSRange();
- OS.objc_msgSend_stret(result, this.id, OS.sel_doubleClickAtIndex_, location);
- return result;
-}
-
-public void drawAtPoint(NSPoint point) {
- OS.objc_msgSend(this.id, OS.sel_drawAtPoint_, point);
-}
-
public void drawInRect(NSRect rect) {
OS.objc_msgSend(this.id, OS.sel_drawInRect_, rect);
}
-public long /*int*/ nextWordFromIndex(long /*int*/ location, boolean isForward) {
+public long nextWordFromIndex(long location, boolean isForward) {
return OS.objc_msgSend(this.id, OS.sel_nextWordFromIndex_forward_, location, isForward);
}
@@ -62,37 +47,37 @@ public NSSize size() {
return result;
}
-public id attribute(NSString attrName, long /*int*/ location, long /*int*/ range) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_attribute_atIndex_effectiveRange_, attrName != null ? attrName.id : 0, location, range);
+public id attribute(NSString attrName, long location, long range) {
+ long result = OS.objc_msgSend(this.id, OS.sel_attribute_atIndex_effectiveRange_, attrName != null ? attrName.id : 0, location, range);
return result != 0 ? new id(result) : null;
}
public NSAttributedString attributedSubstringFromRange(NSRange range) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_attributedSubstringFromRange_, range);
+ long result = OS.objc_msgSend(this.id, OS.sel_attributedSubstringFromRange_, range);
return result == this.id ? this : (result != 0 ? new NSAttributedString(result) : null);
}
-public NSDictionary attributesAtIndex(long /*int*/ location, long /*int*/ range, NSRange rangeLimit) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_attributesAtIndex_longestEffectiveRange_inRange_, location, range, rangeLimit);
+public NSDictionary attributesAtIndex(long location, long range, NSRange rangeLimit) {
+ long result = OS.objc_msgSend(this.id, OS.sel_attributesAtIndex_longestEffectiveRange_inRange_, location, range, rangeLimit);
return result != 0 ? new NSDictionary(result) : null;
}
public NSAttributedString initWithString(NSString str) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithString_, str != null ? str.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithString_, str != null ? str.id : 0);
return result == this.id ? this : (result != 0 ? new NSAttributedString(result) : null);
}
public NSAttributedString initWithString(NSString str, NSDictionary attrs) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithString_attributes_, str != null ? str.id : 0, attrs != null ? attrs.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithString_attributes_, str != null ? str.id : 0, attrs != null ? attrs.id : 0);
return result == this.id ? this : (result != 0 ? new NSAttributedString(result) : null);
}
-public long /*int*/ length() {
+public long length() {
return OS.objc_msgSend(this.id, OS.sel_length);
}
public NSString string() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_string);
+ long result = OS.objc_msgSend(this.id, OS.sel_string);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAutoreleasePool.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAutoreleasePool.java
index 522a52c7a1..ed17773e1b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAutoreleasePool.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAutoreleasePool.java
@@ -19,7 +19,7 @@ public NSAutoreleasePool() {
super();
}
-public NSAutoreleasePool(long /*int*/ id) {
+public NSAutoreleasePool(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBezierPath.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBezierPath.java
index e8f0e9f9a1..56b6422c2e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBezierPath.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBezierPath.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSBezierPath() {
super();
}
-public NSBezierPath(long /*int*/ id) {
+public NSBezierPath(long id) {
super(id);
}
@@ -35,15 +35,11 @@ public void appendBezierPath(NSBezierPath path) {
OS.objc_msgSend(this.id, OS.sel_appendBezierPath_, path != null ? path.id : 0);
}
-public void appendBezierPathWithArcWithCenter(NSPoint center, double /*float*/ radius, double /*float*/ startAngle, double /*float*/ endAngle) {
- OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_, center, radius, startAngle, endAngle);
-}
-
-public void appendBezierPathWithArcWithCenter(NSPoint center, double /*float*/ radius, double /*float*/ startAngle, double /*float*/ endAngle, boolean clockwise) {
+public void appendBezierPathWithArcWithCenter(NSPoint center, double radius, double startAngle, double endAngle, boolean clockwise) {
OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_, center, radius, startAngle, endAngle, clockwise);
}
-public void appendBezierPathWithGlyphs(long /*int*/ glyphs, long /*int*/ count, NSFont font) {
+public void appendBezierPathWithGlyphs(long glyphs, long count, NSFont font) {
OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithGlyphs_count_inFont_, glyphs, count, font != null ? font.id : 0);
}
@@ -55,27 +51,27 @@ public void appendBezierPathWithRect(NSRect rect) {
OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithRect_, rect);
}
-public void appendBezierPathWithRoundedRect(NSRect rect, double /*float*/ xRadius, double /*float*/ yRadius) {
+public void appendBezierPathWithRoundedRect(NSRect rect, double xRadius, double yRadius) {
OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithRoundedRect_xRadius_yRadius_, rect, xRadius, yRadius);
}
public static NSBezierPath bezierPath() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPath);
+ long result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPath);
return result != 0 ? new NSBezierPath(result) : null;
}
public NSBezierPath bezierPathByFlatteningPath() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_bezierPathByFlatteningPath);
+ long result = OS.objc_msgSend(this.id, OS.sel_bezierPathByFlatteningPath);
return result == this.id ? this : (result != 0 ? new NSBezierPath(result) : null);
}
public static NSBezierPath bezierPathWithRect(NSRect rect) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithRect_, rect);
+ long result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithRect_, rect);
return result != 0 ? new NSBezierPath(result) : null;
}
-public static NSBezierPath bezierPathWithRoundedRect(NSRect rect, double /*float*/ xRadius, double /*float*/ yRadius) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithRoundedRect_xRadius_yRadius_, rect, xRadius, yRadius);
+public static NSBezierPath bezierPathWithRoundedRect(NSRect rect, double xRadius, double yRadius) {
+ long result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithRoundedRect_xRadius_yRadius_, rect, xRadius, yRadius);
return result != 0 ? new NSBezierPath(result) : null;
}
@@ -109,15 +105,15 @@ public void curveToPoint(NSPoint endPoint, NSPoint controlPoint1, NSPoint contro
OS.objc_msgSend(this.id, OS.sel_curveToPoint_controlPoint1_controlPoint2_, endPoint, controlPoint1, controlPoint2);
}
-public static double /*float*/ defaultFlatness() {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSBezierPath, OS.sel_defaultFlatness);
+public static double defaultFlatness() {
+ return OS.objc_msgSend_fpret(OS.class_NSBezierPath, OS.sel_defaultFlatness);
}
-public long /*int*/ elementAtIndex(long /*int*/ index, long /*int*/ points) {
+public long elementAtIndex(long index, long points) {
return OS.objc_msgSend(this.id, OS.sel_elementAtIndex_associatedPoints_, index, points);
}
-public long /*int*/ elementCount() {
+public long elementCount() {
return OS.objc_msgSend(this.id, OS.sel_elementCount);
}
@@ -149,31 +145,31 @@ public void setClip() {
OS.objc_msgSend(this.id, OS.sel_setClip);
}
-public static void setDefaultFlatness(double /*float*/ flatness) {
+public static void setDefaultFlatness(double flatness) {
OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultFlatness_, flatness);
}
-public void setLineCapStyle(long /*int*/ lineCapStyle) {
+public void setLineCapStyle(long lineCapStyle) {
OS.objc_msgSend(this.id, OS.sel_setLineCapStyle_, lineCapStyle);
}
-public void setLineDash(double[] /*float[]*/ pattern, long /*int*/ count, double /*float*/ phase) {
+public void setLineDash(double[] pattern, long count, double phase) {
OS.objc_msgSend(this.id, OS.sel_setLineDash_count_phase_, pattern, count, phase);
}
-public void setLineJoinStyle(long /*int*/ lineJoinStyle) {
+public void setLineJoinStyle(long lineJoinStyle) {
OS.objc_msgSend(this.id, OS.sel_setLineJoinStyle_, lineJoinStyle);
}
-public void setLineWidth(double /*float*/ lineWidth) {
+public void setLineWidth(double lineWidth) {
OS.objc_msgSend(this.id, OS.sel_setLineWidth_, lineWidth);
}
-public void setMiterLimit(double /*float*/ miterLimit) {
+public void setMiterLimit(double miterLimit) {
OS.objc_msgSend(this.id, OS.sel_setMiterLimit_, miterLimit);
}
-public void setWindingRule(long /*int*/ windingRule) {
+public void setWindingRule(long windingRule) {
OS.objc_msgSend(this.id, OS.sel_setWindingRule_, windingRule);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
index 34e5f40d53..5c70791664 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSBitmapImageRep() {
super();
}
-public NSBitmapImageRep(long /*int*/ id) {
+public NSBitmapImageRep(long id) {
super(id);
}
@@ -27,62 +27,34 @@ public NSBitmapImageRep(id id) {
super(id);
}
-public NSData TIFFRepresentation() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_TIFFRepresentation);
- return result != 0 ? new NSData(result) : null;
-}
-
-public long /*int*/ bitmapData() {
+public long bitmapData() {
return OS.objc_msgSend(this.id, OS.sel_bitmapData);
}
-public long /*int*/ bitmapFormat() {
+public long bitmapFormat() {
return OS.objc_msgSend(this.id, OS.sel_bitmapFormat);
}
-public long /*int*/ bitsPerPixel() {
+public long bitsPerPixel() {
return OS.objc_msgSend(this.id, OS.sel_bitsPerPixel);
}
-public long /*int*/ bytesPerPlane() {
- return OS.objc_msgSend(this.id, OS.sel_bytesPerPlane);
-}
-
-public long /*int*/ bytesPerRow() {
+public long bytesPerRow() {
return OS.objc_msgSend(this.id, OS.sel_bytesPerRow);
}
-public NSColor colorAtX(long /*int*/ x, long /*int*/ y) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_colorAtX_y_, x, y);
+public NSColor colorAtX(long x, long y) {
+ long result = OS.objc_msgSend(this.id, OS.sel_colorAtX_y_, x, y);
return result != 0 ? new NSColor(result) : null;
}
-public void getBitmapDataPlanes(long[] /*int[]*/ data) {
- OS.objc_msgSend(this.id, OS.sel_getBitmapDataPlanes_, data);
-}
-
-public static NSBitmapImageRep imageRepWithData(NSData data) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithData_, data != null ? data.id : 0);
- return result != 0 ? new NSBitmapImageRep(result) : null;
-}
-
-public NSBitmapImageRep initWithBitmapDataPlanes(long /*int*/ planes, long /*int*/ width, long /*int*/ height, long /*int*/ bps, long /*int*/ spp, boolean alpha, boolean isPlanar, NSString colorSpaceName, long /*int*/ bitmapFormat, long /*int*/ rBytes, long /*int*/ pBits) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName != null ? colorSpaceName.id : 0, bitmapFormat, rBytes, pBits);
- return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
-}
-
-public NSBitmapImageRep initWithBitmapDataPlanes(long /*int*/ planes, long /*int*/ width, long /*int*/ height, long /*int*/ bps, long /*int*/ spp, boolean alpha, boolean isPlanar, NSString colorSpaceName, long /*int*/ rBytes, long /*int*/ pBits) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName != null ? colorSpaceName.id : 0, rBytes, pBits);
+public NSBitmapImageRep initWithBitmapDataPlanes(long planes, long width, long height, long bps, long spp, boolean alpha, boolean isPlanar, NSString colorSpaceName, long bitmapFormat, long rBytes, long pBits) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName != null ? colorSpaceName.id : 0, bitmapFormat, rBytes, pBits);
return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
}
public NSBitmapImageRep initWithData(NSData data) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithData_, data != null ? data.id : 0);
- return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
-}
-
-public NSBitmapImageRep initWithFocusedViewRect(NSRect rect) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFocusedViewRect_, rect);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithData_, data != null ? data.id : 0);
return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
}
@@ -90,16 +62,12 @@ public boolean isPlanar() {
return OS.objc_msgSend_bool(this.id, OS.sel_isPlanar);
}
-public long /*int*/ numberOfPlanes() {
- return OS.objc_msgSend(this.id, OS.sel_numberOfPlanes);
-}
-
-public long /*int*/ samplesPerPixel() {
+public long samplesPerPixel() {
return OS.objc_msgSend(this.id, OS.sel_samplesPerPixel);
}
public static NSImageRep imageRepWithContentsOfFile(NSString filename) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
return result != 0 ? new NSImageRep(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java
index ff87366157..19395f561b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSBox() {
super();
}
-public NSBox(long /*int*/ id) {
+public NSBox(long id) {
super(id);
}
@@ -27,12 +27,12 @@ public NSBox(id id) {
super(id);
}
-public double /*float*/ borderWidth() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_borderWidth);
+public double borderWidth() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_borderWidth);
}
public NSView contentView() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_contentView);
+ long result = OS.objc_msgSend(this.id, OS.sel_contentView);
return result != 0 ? new NSView(result) : null;
}
@@ -42,15 +42,15 @@ public NSSize contentViewMargins() {
return result;
}
-public void setBorderType(long /*int*/ borderType) {
+public void setBorderType(long borderType) {
OS.objc_msgSend(this.id, OS.sel_setBorderType_, borderType);
}
-public void setBorderWidth(double /*float*/ borderWidth) {
+public void setBorderWidth(double borderWidth) {
OS.objc_msgSend(this.id, OS.sel_setBorderWidth_, borderWidth);
}
-public void setBoxType(long /*int*/ boxType) {
+public void setBoxType(long boxType) {
OS.objc_msgSend(this.id, OS.sel_setBoxType_, boxType);
}
@@ -78,21 +78,17 @@ public void setTitleFont(NSFont titleFont) {
OS.objc_msgSend(this.id, OS.sel_setTitleFont_, titleFont != null ? titleFont.id : 0);
}
-public void setTitlePosition(long /*int*/ titlePosition) {
+public void setTitlePosition(long titlePosition) {
OS.objc_msgSend(this.id, OS.sel_setTitlePosition_, titlePosition);
}
-public void sizeToFit() {
- OS.objc_msgSend(this.id, OS.sel_sizeToFit);
-}
-
public NSCell titleCell() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_titleCell);
+ long result = OS.objc_msgSend(this.id, OS.sel_titleCell);
return result != 0 ? new NSCell(result) : null;
}
public NSFont titleFont() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_titleFont);
+ long result = OS.objc_msgSend(this.id, OS.sel_titleFont);
return result != 0 ? new NSFont(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBundle.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBundle.java
index 1316a2b3e9..a3b99a4fae 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBundle.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBundle.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSBundle() {
super();
}
-public NSBundle(long /*int*/ id) {
+public NSBundle(long id) {
super(id);
}
@@ -27,57 +27,52 @@ public NSBundle(id id) {
super(id);
}
-public static boolean loadNibFile(NSString fileName, NSDictionary context, long /*int*/ zone) {
+public static boolean loadNibFile(NSString fileName, NSDictionary context, long zone) {
return OS.objc_msgSend_bool(OS.class_NSBundle, OS.sel_loadNibFile_externalNameTable_withZone_, fileName != null ? fileName.id : 0, context != null ? context.id : 0, zone);
}
public NSString bundleIdentifier() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_bundleIdentifier);
+ long result = OS.objc_msgSend(this.id, OS.sel_bundleIdentifier);
return result != 0 ? new NSString(result) : null;
}
public NSString bundlePath() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_bundlePath);
+ long result = OS.objc_msgSend(this.id, OS.sel_bundlePath);
return result != 0 ? new NSString(result) : null;
}
public static NSBundle bundleWithIdentifier(NSString identifier) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleWithIdentifier_, identifier != null ? identifier.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleWithIdentifier_, identifier != null ? identifier.id : 0);
return result != 0 ? new NSBundle(result) : null;
}
public static NSBundle bundleWithPath(NSString path) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleWithPath_, path != null ? path.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleWithPath_, path != null ? path.id : 0);
return result != 0 ? new NSBundle(result) : null;
}
public NSDictionary infoDictionary() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_infoDictionary);
+ long result = OS.objc_msgSend(this.id, OS.sel_infoDictionary);
return result != 0 ? new NSDictionary(result) : null;
}
public static NSBundle mainBundle() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_mainBundle);
+ long result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_mainBundle);
return result != 0 ? new NSBundle(result) : null;
}
public id objectForInfoDictionaryKey(NSString key) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_objectForInfoDictionaryKey_, key != null ? key.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_objectForInfoDictionaryKey_, key != null ? key.id : 0);
return result != 0 ? new id(result) : null;
}
public NSString pathForResource(NSString name, NSString ext) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_pathForResource_ofType_, name != null ? name.id : 0, ext != null ? ext.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_pathForResource_ofType_, name != null ? name.id : 0, ext != null ? ext.id : 0);
return result != 0 ? new NSString(result) : null;
}
public NSString pathForResource(NSString name, NSString ext, NSString subpath, NSString localizationName) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_pathForResource_ofType_inDirectory_forLocalization_, name != null ? name.id : 0, ext != null ? ext.id : 0, subpath != null ? subpath.id : 0, localizationName != null ? localizationName.id : 0);
- return result != 0 ? new NSString(result) : null;
-}
-
-public NSString resourcePath() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_resourcePath);
+ long result = OS.objc_msgSend(this.id, OS.sel_pathForResource_ofType_inDirectory_forLocalization_, name != null ? name.id : 0, ext != null ? ext.id : 0, subpath != null ? subpath.id : 0, localizationName != null ? localizationName.id : 0);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java
index f199267a9a..0e38ca23bb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java
@@ -19,7 +19,7 @@ public NSButton() {
super();
}
-public NSButton(long /*int*/ id) {
+public NSButton(long id) {
super(id);
}
@@ -28,11 +28,11 @@ public NSButton(id id) {
}
public NSAttributedString attributedTitle() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_attributedTitle);
+ long result = OS.objc_msgSend(this.id, OS.sel_attributedTitle);
return result != 0 ? new NSAttributedString(result) : null;
}
-public long /*int*/ bezelStyle() {
+public long bezelStyle() {
return OS.objc_msgSend(this.id, OS.sel_bezelStyle);
}
@@ -44,7 +44,7 @@ public void setAttributedTitle(NSAttributedString attributedTitle) {
OS.objc_msgSend(this.id, OS.sel_setAttributedTitle_, attributedTitle != null ? attributedTitle.id : 0);
}
-public void setBezelStyle(long /*int*/ bezelStyle) {
+public void setBezelStyle(long bezelStyle) {
OS.objc_msgSend(this.id, OS.sel_setBezelStyle_, bezelStyle);
}
@@ -52,7 +52,7 @@ public void setBordered(boolean bordered) {
OS.objc_msgSend(this.id, OS.sel_setBordered_, bordered);
}
-public void setButtonType(long /*int*/ aType) {
+public void setButtonType(long aType) {
OS.objc_msgSend(this.id, OS.sel_setButtonType_, aType);
}
@@ -60,7 +60,7 @@ public void setImage(NSImage image) {
OS.objc_msgSend(this.id, OS.sel_setImage_, image != null ? image.id : 0);
}
-public void setImagePosition(long /*int*/ imagePosition) {
+public void setImagePosition(long imagePosition) {
OS.objc_msgSend(this.id, OS.sel_setImagePosition_, imagePosition);
}
@@ -68,7 +68,7 @@ public void setKeyEquivalent(NSString keyEquivalent) {
OS.objc_msgSend(this.id, OS.sel_setKeyEquivalent_, keyEquivalent != null ? keyEquivalent.id : 0);
}
-public void setState(long /*int*/ state) {
+public void setState(long state) {
OS.objc_msgSend(this.id, OS.sel_setState_, state);
}
@@ -76,15 +76,15 @@ public void setTitle(NSString title) {
OS.objc_msgSend(this.id, OS.sel_setTitle_, title != null ? title.id : 0);
}
-public long /*int*/ state() {
+public long state() {
return OS.objc_msgSend(this.id, OS.sel_state);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSButton, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSButton, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java
index e25c125d0f..b2667c0082 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSButtonCell() {
super();
}
-public NSButtonCell(long /*int*/ id) {
+public NSButtonCell(long id) {
super(id);
}
@@ -27,11 +27,6 @@ public NSButtonCell(id id) {
super(id);
}
-public NSColor backgroundColor() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_backgroundColor);
- return result != 0 ? new NSColor(result) : null;
-}
-
public void drawBezelWithFrame(NSRect frame, NSView controlView) {
OS.objc_msgSend(this.id, OS.sel_drawBezelWithFrame_inView_, frame, controlView != null ? controlView.id : 0);
}
@@ -50,20 +45,20 @@ public void setBackgroundColor(NSColor backgroundColor) {
OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, backgroundColor != null ? backgroundColor.id : 0);
}
-public void setButtonType(long /*int*/ aType) {
+public void setButtonType(long aType) {
OS.objc_msgSend(this.id, OS.sel_setButtonType_, aType);
}
-public void setHighlightsBy(long /*int*/ highlightsBy) {
+public void setHighlightsBy(long highlightsBy) {
OS.objc_msgSend(this.id, OS.sel_setHighlightsBy_, highlightsBy);
}
-public void setImagePosition(long /*int*/ imagePosition) {
+public void setImagePosition(long imagePosition) {
OS.objc_msgSend(this.id, OS.sel_setImagePosition_, imagePosition);
}
public NSString title() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_title);
+ long result = OS.objc_msgSend(this.id, OS.sel_title);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCalendarDate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCalendarDate.java
index ce784578e2..59cf6ff5e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCalendarDate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCalendarDate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSCalendarDate() {
super();
}
-public NSCalendarDate(long /*int*/ id) {
+public NSCalendarDate(long id) {
super(id);
}
@@ -28,52 +28,52 @@ public NSCalendarDate(id id) {
}
public static NSCalendarDate calendarDate() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_calendarDate);
+ long result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_calendarDate);
return result != 0 ? new NSCalendarDate(result) : null;
}
-public static NSCalendarDate dateWithYear(long /*int*/ year, long /*int*/ month, long /*int*/ day, long /*int*/ hour, long /*int*/ minute, long /*int*/ second, NSTimeZone aTimeZone) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithYear_month_day_hour_minute_second_timeZone_, year, month, day, hour, minute, second, aTimeZone != null ? aTimeZone.id : 0);
+public static NSCalendarDate dateWithYear(long year, long month, long day, long hour, long minute, long second, NSTimeZone aTimeZone) {
+ long result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithYear_month_day_hour_minute_second_timeZone_, year, month, day, hour, minute, second, aTimeZone != null ? aTimeZone.id : 0);
return result != 0 ? new NSCalendarDate(result) : null;
}
-public long /*int*/ dayOfMonth() {
+public long dayOfMonth() {
return OS.objc_msgSend(this.id, OS.sel_dayOfMonth);
}
-public long /*int*/ hourOfDay() {
+public long hourOfDay() {
return OS.objc_msgSend(this.id, OS.sel_hourOfDay);
}
-public long /*int*/ minuteOfHour() {
+public long minuteOfHour() {
return OS.objc_msgSend(this.id, OS.sel_minuteOfHour);
}
-public long /*int*/ monthOfYear() {
+public long monthOfYear() {
return OS.objc_msgSend(this.id, OS.sel_monthOfYear);
}
-public long /*int*/ secondOfMinute() {
+public long secondOfMinute() {
return OS.objc_msgSend(this.id, OS.sel_secondOfMinute);
}
public NSTimeZone timeZone() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_timeZone);
+ long result = OS.objc_msgSend(this.id, OS.sel_timeZone);
return result != 0 ? new NSTimeZone(result) : null;
}
-public long /*int*/ yearOfCommonEra() {
+public long yearOfCommonEra() {
return OS.objc_msgSend(this.id, OS.sel_yearOfCommonEra);
}
-public static NSDate dateWithTimeIntervalSinceNow(double secs) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithTimeIntervalSinceNow_, secs);
+public static NSCalendarDate dateWithTimeIntervalSinceNow(double secs) {
+ long result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithTimeIntervalSinceNow_, secs);
return result != 0 ? new NSCalendarDate(result) : null;
}
public static NSDate distantFuture() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_distantFuture);
- return result != 0 ? new NSCalendarDate(result) : null;
+ long result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_distantFuture);
+ return result != 0 ? new NSDate(result) : null;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java
index 8c03eedf37..c1890cd249 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSCell() {
super();
}
-public NSCell(long /*int*/ id) {
+public NSCell(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSCell(id id) {
}
public NSAttributedString attributedStringValue() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_attributedStringValue);
+ long result = OS.objc_msgSend(this.id, OS.sel_attributedStringValue);
return result != 0 ? new NSAttributedString(result) : null;
}
@@ -44,7 +44,7 @@ public NSSize cellSizeForBounds(NSRect aRect) {
return result;
}
-public long /*int*/ controlSize() {
+public long controlSize() {
return OS.objc_msgSend(this.id, OS.sel_controlSize);
}
@@ -75,21 +75,16 @@ public NSRect focusRingMaskBoundsForFrame(NSRect cellFrame, NSView controlView)
}
public NSFont font() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_font);
+ long result = OS.objc_msgSend(this.id, OS.sel_font);
return result != 0 ? new NSFont(result) : null;
}
-public NSColor highlightColorWithFrame(NSRect cellFrame, NSView controlView) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_highlightColorWithFrame_inView_, cellFrame, controlView != null ? controlView.id : 0);
- return result != 0 ? new NSColor(result) : null;
-}
-
-public long /*int*/ hitTestForEvent(NSEvent event, NSRect cellFrame, NSView controlView) {
+public long hitTestForEvent(NSEvent event, NSRect cellFrame, NSView controlView) {
return OS.objc_msgSend(this.id, OS.sel_hitTestForEvent_inRect_ofView_, event != null ? event.id : 0, cellFrame, controlView != null ? controlView.id : 0);
}
public NSImage image() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_image);
+ long result = OS.objc_msgSend(this.id, OS.sel_image);
return result != 0 ? new NSImage(result) : null;
}
@@ -107,11 +102,11 @@ public boolean isHighlighted() {
return OS.objc_msgSend_bool(this.id, OS.sel_isHighlighted);
}
-public long /*int*/ nextState() {
+public long nextState() {
return OS.objc_msgSend(this.id, OS.sel_nextState);
}
-public void setAlignment(long /*int*/ alignment) {
+public void setAlignment(long alignment) {
OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment);
}
@@ -123,15 +118,15 @@ public void setAttributedStringValue(NSAttributedString attributedStringValue) {
OS.objc_msgSend(this.id, OS.sel_setAttributedStringValue_, attributedStringValue != null ? attributedStringValue.id : 0);
}
-public void setBackgroundStyle(long /*int*/ backgroundStyle) {
+public void setBackgroundStyle(long backgroundStyle) {
OS.objc_msgSend(this.id, OS.sel_setBackgroundStyle_, backgroundStyle);
}
-public void setBaseWritingDirection(long /*int*/ baseWritingDirection) {
+public void setBaseWritingDirection(long baseWritingDirection) {
OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, baseWritingDirection);
}
-public void setControlSize(long /*int*/ controlSize) {
+public void setControlSize(long controlSize) {
OS.objc_msgSend(this.id, OS.sel_setControlSize_, controlSize);
}
@@ -155,7 +150,7 @@ public void setImage(NSImage image) {
OS.objc_msgSend(this.id, OS.sel_setImage_, image != null ? image.id : 0);
}
-public void setLineBreakMode(long /*int*/ lineBreakMode) {
+public void setLineBreakMode(long lineBreakMode) {
OS.objc_msgSend(this.id, OS.sel_setLineBreakMode_, lineBreakMode);
}
@@ -180,7 +175,7 @@ public void setWraps(boolean wraps) {
}
public NSString title() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_title);
+ long result = OS.objc_msgSend(this.id, OS.sel_title);
return result != 0 ? new NSString(result) : null;
}
@@ -190,8 +185,4 @@ public NSRect titleRectForBounds(NSRect theRect) {
return result;
}
-public boolean wraps() {
- return OS.objc_msgSend_bool(this.id, OS.sel_wraps);
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCharacterSet.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCharacterSet.java
deleted file mode 100644
index 541f3e5f87..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCharacterSet.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.cocoa;
-
-public class NSCharacterSet extends NSObject {
-
-public NSCharacterSet() {
- super();
-}
-
-public NSCharacterSet(long /*int*/ id) {
- super(id);
-}
-
-public NSCharacterSet(id id) {
- super(id);
-}
-
-public boolean characterIsMember(short aCharacter) {
- return OS.objc_msgSend_bool(this.id, OS.sel_characterIsMember_, aCharacter);
-}
-
-public static NSCharacterSet decimalDigitCharacterSet() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decimalDigitCharacterSet);
- return result != 0 ? new NSCharacterSet(result) : null;
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSClipView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSClipView.java
index bb1ca6a856..c7a3b4a8f5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSClipView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSClipView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSClipView() {
super();
}
-public NSClipView(long /*int*/ id) {
+public NSClipView(long id) {
super(id);
}
@@ -31,15 +31,6 @@ public boolean copiesOnScroll() {
return OS.objc_msgSend_bool(this.id, OS.sel_copiesOnScroll);
}
-public NSCursor documentCursor() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_documentCursor);
- return result != 0 ? new NSCursor(result) : null;
-}
-
-public void scrollToPoint(NSPoint newOrigin) {
- OS.objc_msgSend(this.id, OS.sel_scrollToPoint_, newOrigin);
-}
-
public void setCopiesOnScroll(boolean copiesOnScroll) {
OS.objc_msgSend(this.id, OS.sel_setCopiesOnScroll_, copiesOnScroll);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCoder.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCoder.java
index 131200a39b..3acae26f22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCoder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCoder.java
@@ -19,7 +19,7 @@ public NSCoder() {
super();
}
-public NSCoder(long /*int*/ id) {
+public NSCoder(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSCoder(id id) {
}
public int systemVersion() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_systemVersion);
+ return (int)OS.objc_msgSend(this.id, OS.sel_systemVersion);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColor.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColor.java
index 27941b5f54..b74b633bad 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSColor() {
super();
}
-public NSColor(long /*int*/ id) {
+public NSColor(long id) {
super(id);
}
@@ -27,132 +27,127 @@ public NSColor(id id) {
super(id);
}
-public double /*float*/ alphaComponent() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_alphaComponent);
+public double alphaComponent() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_alphaComponent);
}
public static NSColor alternateSelectedControlColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor alternateSelectedControlTextColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlTextColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlTextColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor blackColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_blackColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_blackColor);
return result != 0 ? new NSColor(result) : null;
}
-public double /*float*/ blueComponent() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_blueComponent);
+public double blueComponent() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_blueComponent);
}
public static NSColor clearColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_clearColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_clearColor);
return result != 0 ? new NSColor(result) : null;
}
public NSColorSpace colorSpace() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_colorSpace);
+ long result = OS.objc_msgSend(this.id, OS.sel_colorSpace);
return result != 0 ? new NSColorSpace(result) : null;
}
public NSColor colorUsingColorSpaceName(NSString colorSpace) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpaceName_, colorSpace != null ? colorSpace.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpaceName_, colorSpace != null ? colorSpace.id : 0);
return result == this.id ? this : (result != 0 ? new NSColor(result) : null);
}
-public static NSColor colorWithCalibratedRed(double /*float*/ red, double /*float*/ green, double /*float*/ blue, double /*float*/ alpha) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCalibratedRed_green_blue_alpha_, red, green, blue, alpha);
- return result != 0 ? new NSColor(result) : null;
-}
-
-public static NSColor colorWithDeviceRed(double /*float*/ red, double /*float*/ green, double /*float*/ blue, double /*float*/ alpha) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceRed_green_blue_alpha_, red, green, blue, alpha);
+public static NSColor colorWithDeviceRed(double red, double green, double blue, double alpha) {
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceRed_green_blue_alpha_, red, green, blue, alpha);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor colorWithPatternImage(NSImage image) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_, image != null ? image.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_, image != null ? image.id : 0);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor controlBackgroundColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlBackgroundColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlBackgroundColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor controlDarkShadowColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlDarkShadowColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlDarkShadowColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor controlHighlightColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlHighlightColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlHighlightColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor controlLightHighlightColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlLightHighlightColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlLightHighlightColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor controlShadowColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlShadowColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlShadowColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor controlTextColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlTextColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlTextColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor disabledControlTextColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_disabledControlTextColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_disabledControlTextColor);
return result != 0 ? new NSColor(result) : null;
}
-public void getComponents(double[] /*float[]*/ components) {
+public void getComponents(double[] components) {
OS.objc_msgSend(this.id, OS.sel_getComponents_, components);
}
-public double /*float*/ greenComponent() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_greenComponent);
+public double greenComponent() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_greenComponent);
}
-public long /*int*/ numberOfComponents() {
+public long numberOfComponents() {
return OS.objc_msgSend(this.id, OS.sel_numberOfComponents);
}
-public double /*float*/ redComponent() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_redComponent);
+public double redComponent() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_redComponent);
}
public static NSColor secondarySelectedControlColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_secondarySelectedControlColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_secondarySelectedControlColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor selectedControlColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedControlColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedControlColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor selectedControlTextColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedControlTextColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedControlTextColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor selectedTextBackgroundColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextBackgroundColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextBackgroundColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor selectedTextColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextColor);
return result != 0 ? new NSColor(result) : null;
}
@@ -169,27 +164,22 @@ public void setStroke() {
}
public static NSColor textBackgroundColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textBackgroundColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textBackgroundColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor textColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor windowBackgroundColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowBackgroundColor);
- return result != 0 ? new NSColor(result) : null;
-}
-
-public static NSColor windowFrameColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowFrameColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowBackgroundColor);
return result != 0 ? new NSColor(result) : null;
}
public static NSColor windowFrameTextColor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowFrameTextColor);
+ long result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowFrameTextColor);
return result != 0 ? new NSColor(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorList.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorList.java
index fb3f3d9f11..83e1adfde4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorList.java
@@ -19,7 +19,7 @@ public NSColorList() {
super();
}
-public NSColorList(long /*int*/ id) {
+public NSColorList(long id) {
super(id);
}
@@ -28,26 +28,26 @@ public NSColorList(id id) {
}
public NSArray allKeys() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_allKeys);
+ long result = OS.objc_msgSend(this.id, OS.sel_allKeys);
return result != 0 ? new NSArray(result) : null;
}
public static NSColorList colorListNamed(NSString name) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColorList, OS.sel_colorListNamed_, name != null ? name.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSColorList, OS.sel_colorListNamed_, name != null ? name.id : 0);
return result != 0 ? new NSColorList(result) : null;
}
public NSColor colorWithKey(NSString key) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_colorWithKey_, key != null ? key.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_colorWithKey_, key != null ? key.id : 0);
return result != 0 ? new NSColor(result) : null;
}
public NSColorList initWithName(NSString name) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithName_, name != null ? name.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithName_, name != null ? name.id : 0);
return result == this.id ? this : (result != 0 ? new NSColorList(result) : null);
}
-public void insertColor(NSColor color, NSString key, long /*int*/ loc) {
+public void insertColor(NSColor color, NSString key, long loc) {
OS.objc_msgSend(this.id, OS.sel_insertColor_key_atIndex_, color != null ? color.id : 0, key != null ? key.id : 0, loc);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorPanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorPanel.java
index 50e9f84c03..e4aef152f4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorPanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorPanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSColorPanel() {
super();
}
-public NSColorPanel(long /*int*/ id) {
+public NSColorPanel(long id) {
super(id);
}
@@ -32,7 +32,7 @@ public void attachColorList(NSColorList colorList) {
}
public NSColor color() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_color);
+ long result = OS.objc_msgSend(this.id, OS.sel_color);
return result != 0 ? new NSColor(result) : null;
}
@@ -41,15 +41,15 @@ public void setColor(NSColor color) {
}
public static NSColorPanel sharedColorPanel() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_sharedColorPanel);
+ long result = OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_sharedColorPanel);
return result != 0 ? new NSColorPanel(result) : null;
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSColorPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_NSColorPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorSpace.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorSpace.java
index 29ede062b7..2daec901ef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorSpace.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSColorSpace.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSColorSpace() {
super();
}
-public NSColorSpace(long /*int*/ id) {
+public NSColorSpace(long id) {
super(id);
}
@@ -27,13 +27,8 @@ public NSColorSpace(id id) {
super(id);
}
-public long /*int*/ colorSpaceModel() {
+public long colorSpaceModel() {
return OS.objc_msgSend(this.id, OS.sel_colorSpaceModel);
}
-public static NSColorSpace genericRGBColorSpace() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_genericRGBColorSpace);
- return result != 0 ? new NSColorSpace(result) : null;
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java
index 2cb6f94f3b..60cdbd0e05 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSComboBox() {
super();
}
-public NSComboBox(long /*int*/ id) {
+public NSComboBox(long id) {
super(id);
}
@@ -31,32 +31,32 @@ public void addItemWithObjectValue(id object) {
OS.objc_msgSend(this.id, OS.sel_addItemWithObjectValue_, object != null ? object.id : 0);
}
-public void deselectItemAtIndex(long /*int*/ index) {
+public void deselectItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_deselectItemAtIndex_, index);
}
-public long /*int*/ indexOfSelectedItem() {
+public long indexOfSelectedItem() {
return OS.objc_msgSend(this.id, OS.sel_indexOfSelectedItem);
}
-public void insertItemWithObjectValue(id object, long /*int*/ index) {
+public void insertItemWithObjectValue(id object, long index) {
OS.objc_msgSend(this.id, OS.sel_insertItemWithObjectValue_atIndex_, object != null ? object.id : 0, index);
}
-public double /*float*/ itemHeight() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_itemHeight);
+public double itemHeight() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_itemHeight);
}
-public id itemObjectValueAtIndex(long /*int*/ index) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemObjectValueAtIndex_, index);
+public id itemObjectValueAtIndex(long index) {
+ long result = OS.objc_msgSend(this.id, OS.sel_itemObjectValueAtIndex_, index);
return result != 0 ? new id(result) : null;
}
-public long /*int*/ numberOfItems() {
+public long numberOfItems() {
return OS.objc_msgSend(this.id, OS.sel_numberOfItems);
}
-public long /*int*/ numberOfVisibleItems() {
+public long numberOfVisibleItems() {
return OS.objc_msgSend(this.id, OS.sel_numberOfVisibleItems);
}
@@ -64,23 +64,23 @@ public void removeAllItems() {
OS.objc_msgSend(this.id, OS.sel_removeAllItems);
}
-public void removeItemAtIndex(long /*int*/ index) {
+public void removeItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_removeItemAtIndex_, index);
}
-public void selectItemAtIndex(long /*int*/ index) {
+public void selectItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_selectItemAtIndex_, index);
}
-public void setNumberOfVisibleItems(long /*int*/ numberOfVisibleItems) {
+public void setNumberOfVisibleItems(long numberOfVisibleItems) {
OS.objc_msgSend(this.id, OS.sel_setNumberOfVisibleItems_, numberOfVisibleItems);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSComboBox, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSComboBox, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBoxCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBoxCell.java
index 28e94ae105..634c637bd8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBoxCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBoxCell.java
@@ -19,7 +19,7 @@ public NSComboBoxCell() {
super();
}
-public NSComboBoxCell(long /*int*/ id) {
+public NSComboBoxCell(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSComboBoxCell(id id) {
}
public NSArray objectValues() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_objectValues);
+ long result = OS.objc_msgSend(this.id, OS.sel_objectValues);
return result != 0 ? new NSArray(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java
index 8e7a42a13a..298810a8ab 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java
@@ -19,7 +19,7 @@ public NSControl() {
super();
}
-public NSControl(long /*int*/ id) {
+public NSControl(long id) {
super(id);
}
@@ -31,21 +31,21 @@ public boolean abortEditing() {
return OS.objc_msgSend_bool(this.id, OS.sel_abortEditing);
}
-public long /*int*/ action() {
+public long action() {
return OS.objc_msgSend(this.id, OS.sel_action);
}
public NSCell cell() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_cell);
+ long result = OS.objc_msgSend(this.id, OS.sel_cell);
return result != 0 ? new NSCell(result) : null;
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass);
}
public NSText currentEditor() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_currentEditor);
+ long result = OS.objc_msgSend(this.id, OS.sel_currentEditor);
return result != 0 ? new NSText(result) : null;
}
@@ -54,7 +54,7 @@ public double doubleValue() {
}
public NSFont font() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_font);
+ long result = OS.objc_msgSend(this.id, OS.sel_font);
return result != 0 ? new NSFont(result) : null;
}
@@ -66,19 +66,19 @@ public boolean isHighlighted() {
return OS.objc_msgSend_bool(this.id, OS.sel_isHighlighted);
}
-public boolean sendAction(long /*int*/ theAction, id theTarget) {
+public boolean sendAction(long theAction, id theTarget) {
return OS.objc_msgSend_bool(this.id, OS.sel_sendAction_to_, theAction, theTarget != null ? theTarget.id : 0);
}
-public void setAction(long /*int*/ action) {
+public void setAction(long action) {
OS.objc_msgSend(this.id, OS.sel_setAction_, action);
}
-public void setAlignment(long /*int*/ alignment) {
+public void setAlignment(long alignment) {
OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment);
}
-public void setBaseWritingDirection(long /*int*/ baseWritingDirection) {
+public void setBaseWritingDirection(long baseWritingDirection) {
OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, baseWritingDirection);
}
@@ -86,7 +86,7 @@ public void setCell(NSCell cell) {
OS.objc_msgSend(this.id, OS.sel_setCell_, cell != null ? cell.id : 0);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSControl, OS.sel_setCellClass_, factoryId);
}
@@ -119,12 +119,12 @@ public void sizeToFit() {
}
public NSString stringValue() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringValue);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringValue);
return result != 0 ? new NSString(result) : null;
}
public id target() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_target);
+ long result = OS.objc_msgSend(this.id, OS.sel_target);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCursor.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCursor.java
index 3960fb5d21..4eaf555265 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCursor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSCursor() {
super();
}
-public NSCursor(long /*int*/ id) {
+public NSCursor(long id) {
super(id);
}
@@ -28,43 +28,37 @@ public NSCursor(id id) {
}
public static NSCursor IBeamCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_IBeamCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_IBeamCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor arrowCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_arrowCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_arrowCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor crosshairCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_crosshairCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_crosshairCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor currentCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_currentCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_currentCursor);
return result != 0 ? new NSCursor(result) : null;
}
-public NSPoint hotSpot() {
- NSPoint result = new NSPoint();
- OS.objc_msgSend_stret(result, this.id, OS.sel_hotSpot);
- return result;
-}
-
public NSCursor initWithImage(NSImage newImage, NSPoint aPoint) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithImage_hotSpot_, newImage != null ? newImage.id : 0, aPoint);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithImage_hotSpot_, newImage != null ? newImage.id : 0, aPoint);
return result == this.id ? this : (result != 0 ? new NSCursor(result) : null);
}
public static NSCursor operationNotAllowedCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_operationNotAllowedCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_operationNotAllowedCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor pointingHandCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_pointingHandCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_pointingHandCursor);
return result != 0 ? new NSCursor(result) : null;
}
@@ -77,32 +71,32 @@ public void push() {
}
public static NSCursor resizeDownCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeDownCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeDownCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor resizeLeftCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor resizeLeftRightCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftRightCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftRightCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor resizeRightCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeRightCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeRightCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor resizeUpCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpCursor);
return result != 0 ? new NSCursor(result) : null;
}
public static NSCursor resizeUpDownCursor() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpDownCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpDownCursor);
return result != 0 ? new NSCursor(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSData.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSData.java
index 5dc68e8655..f565335c4d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSData.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSData() {
super();
}
-public NSData(long /*int*/ id) {
+public NSData(long id) {
super(id);
}
@@ -27,12 +27,12 @@ public NSData(id id) {
super(id);
}
-public long /*int*/ bytes() {
+public long bytes() {
return OS.objc_msgSend(this.id, OS.sel_bytes);
}
-public static NSData dataWithBytes(byte[] bytes, long /*int*/ length) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytes_length_, bytes, length);
+public static NSData dataWithBytes(byte[] bytes, long length) {
+ long result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytes_length_, bytes, length);
return result != 0 ? new NSData(result) : null;
}
@@ -40,11 +40,7 @@ public void getBytes(byte[] buffer) {
OS.objc_msgSend(this.id, OS.sel_getBytes_, buffer);
}
-public void getBytes(long /*int*/ buffer, long /*int*/ length) {
- OS.objc_msgSend(this.id, OS.sel_getBytes_length_, buffer, length);
-}
-
-public long /*int*/ length() {
+public long length() {
return OS.objc_msgSend(this.id, OS.sel_length);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDate.java
index 8c7edab746..9a602dd104 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDate.java
@@ -19,7 +19,7 @@ public NSDate() {
super();
}
-public NSDate(long /*int*/ id) {
+public NSDate(long id) {
super(id);
}
@@ -28,17 +28,17 @@ public NSDate(id id) {
}
public NSCalendarDate dateWithCalendarFormat(NSString format, NSTimeZone aTimeZone) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dateWithCalendarFormat_timeZone_, format != null ? format.id : 0, aTimeZone != null ? aTimeZone.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_dateWithCalendarFormat_timeZone_, format != null ? format.id : 0, aTimeZone != null ? aTimeZone.id : 0);
return result != 0 ? new NSCalendarDate(result) : null;
}
public static NSDate dateWithTimeIntervalSinceNow(double secs) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithTimeIntervalSinceNow_, secs);
+ long result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithTimeIntervalSinceNow_, secs);
return result != 0 ? new NSDate(result) : null;
}
public static NSDate distantFuture() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSDate, OS.sel_distantFuture);
+ long result = OS.objc_msgSend(OS.class_NSDate, OS.sel_distantFuture);
return result != 0 ? new NSDate(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java
index 9d13272558..6ecf6bf442 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java
@@ -19,7 +19,7 @@ public NSDatePicker() {
super();
}
-public NSDatePicker(long /*int*/ id) {
+public NSDatePicker(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSDatePicker(id id) {
}
public NSDate dateValue() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dateValue);
+ long result = OS.objc_msgSend(this.id, OS.sel_dateValue);
return result != 0 ? new NSDate(result) : null;
}
@@ -44,11 +44,11 @@ public void setBordered(boolean bordered) {
OS.objc_msgSend(this.id, OS.sel_setBordered_, bordered);
}
-public void setDatePickerElements(long /*int*/ datePickerElements) {
+public void setDatePickerElements(long datePickerElements) {
OS.objc_msgSend(this.id, OS.sel_setDatePickerElements_, datePickerElements);
}
-public void setDatePickerStyle(long /*int*/ datePickerStyle) {
+public void setDatePickerStyle(long datePickerStyle) {
OS.objc_msgSend(this.id, OS.sel_setDatePickerStyle_, datePickerStyle);
}
@@ -64,11 +64,11 @@ public void setTextColor(NSColor textColor) {
OS.objc_msgSend(this.id, OS.sel_setTextColor_, textColor != null ? textColor.id : 0);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSDatePicker, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSDatePicker, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDictionary.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDictionary.java
index ab69fcb853..d3ea7dcef6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDictionary.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDictionary.java
@@ -19,7 +19,7 @@ public NSDictionary() {
super();
}
-public NSDictionary(long /*int*/ id) {
+public NSDictionary(long id) {
super(id);
}
@@ -28,31 +28,31 @@ public NSDictionary(id id) {
}
public NSArray allKeys() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_allKeys);
+ long result = OS.objc_msgSend(this.id, OS.sel_allKeys);
return result != 0 ? new NSArray(result) : null;
}
-public long /*int*/ count() {
+public long count() {
return OS.objc_msgSend(this.id, OS.sel_count);
}
public static NSDictionary dictionaryWithObject(id object, id key) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithObject_forKey_, object != null ? object.id : 0, key != null ? key.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithObject_forKey_, object != null ? object.id : 0, key != null ? key.id : 0);
return result != 0 ? new NSDictionary(result) : null;
}
public NSEnumerator objectEnumerator() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator);
+ long result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator);
return result != 0 ? new NSEnumerator(result) : null;
}
public id objectForKey(id aKey) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_objectForKey_, aKey != null ? aKey.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_objectForKey_, aKey != null ? aKey.id : 0);
return result != 0 ? new id(result) : null;
}
public id valueForKey(NSString key) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_valueForKey_, key != null ? key.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_valueForKey_, key != null ? key.id : 0);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDirectoryEnumerator.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDirectoryEnumerator.java
index d3c31be870..2932246e94 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDirectoryEnumerator.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDirectoryEnumerator.java
@@ -19,7 +19,7 @@ public NSDirectoryEnumerator() {
super();
}
-public NSDirectoryEnumerator(long /*int*/ id) {
+public NSDirectoryEnumerator(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java
index 9fb5d6c15e..7912dc0b28 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java
@@ -19,7 +19,7 @@ public NSDockTile() {
super();
}
-public NSDockTile(long /*int*/ id) {
+public NSDockTile(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSDockTile(id id) {
}
public NSString badgeLabel() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_badgeLabel);
+ long result = OS.objc_msgSend(this.id, OS.sel_badgeLabel);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEnumerator.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEnumerator.java
index fbf74fa756..99b9aea4c5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEnumerator.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEnumerator.java
@@ -19,7 +19,7 @@ public NSEnumerator() {
super();
}
-public NSEnumerator(long /*int*/ id) {
+public NSEnumerator(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSEnumerator(id id) {
}
public id nextObject() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_nextObject);
+ long result = OS.objc_msgSend(this.id, OS.sel_nextObject);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSError.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSError.java
index fe48736e7e..850b83bd67 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSError.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSError.java
@@ -19,7 +19,7 @@ public NSError() {
super();
}
-public NSError(long /*int*/ id) {
+public NSError(long id) {
super(id);
}
@@ -27,17 +27,17 @@ public NSError(id id) {
super(id);
}
-public long /*int*/ code() {
+public long code() {
return OS.objc_msgSend(this.id, OS.sel_code);
}
public NSString localizedDescription() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_localizedDescription);
+ long result = OS.objc_msgSend(this.id, OS.sel_localizedDescription);
return result != 0 ? new NSString(result) : null;
}
public NSDictionary userInfo() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_userInfo);
+ long result = OS.objc_msgSend(this.id, OS.sel_userInfo);
return result != 0 ? new NSDictionary(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java
index 481e1d00fc..b2f03b12f0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSEvent() {
super();
}
-public NSEvent(long /*int*/ id) {
+public NSEvent(long id) {
super(id);
}
@@ -27,38 +27,42 @@ public NSEvent(id id) {
super(id);
}
-public long /*int*/ CGEvent() {
+public long CGEvent() {
return OS.objc_msgSend(this.id, OS.sel_CGEvent);
}
-public long /*int*/ buttonNumber() {
+public long buttonNumber() {
return OS.objc_msgSend(this.id, OS.sel_buttonNumber);
}
public NSString characters() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_characters);
+ long result = OS.objc_msgSend(this.id, OS.sel_characters);
return result != 0 ? new NSString(result) : null;
}
public NSString charactersIgnoringModifiers() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_charactersIgnoringModifiers);
+ long result = OS.objc_msgSend(this.id, OS.sel_charactersIgnoringModifiers);
return result != 0 ? new NSString(result) : null;
}
-public long /*int*/ clickCount() {
+public long clickCount() {
return OS.objc_msgSend(this.id, OS.sel_clickCount);
}
-public double /*float*/ deltaX() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_deltaX);
+public double deltaX() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_deltaX);
}
-public double /*float*/ deltaY() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_deltaY);
+public double deltaY() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_deltaY);
}
-public static NSEvent enterExitEventWithType(long /*int*/ type, NSPoint location, long /*int*/ flags, double time, long /*int*/ wNum, NSGraphicsContext context, long /*int*/ eNum, long /*int*/ tNum, long /*int*/ data) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_, type, location, flags, time, wNum, context != null ? context.id : 0, eNum, tNum, data);
+public static double doubleClickInterval() {
+ return OS.objc_msgSend_fpret(OS.class_NSEvent, OS.sel_doubleClickInterval);
+}
+
+public static NSEvent enterExitEventWithType(long type, NSPoint location, long flags, double time, long wNum, NSGraphicsContext context, long eNum, long tNum, long data) {
+ long result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_, type, location, flags, time, wNum, context != null ? context.id : 0, eNum, tNum, data);
return result != 0 ? new NSEvent(result) : null;
}
@@ -72,11 +76,11 @@ public NSPoint locationInWindow() {
return result;
}
-public double /*float*/ magnification() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_magnification);
+public double magnification() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_magnification);
}
-public long /*int*/ modifierFlags() {
+public long modifierFlags() {
return OS.objc_msgSend(this.id, OS.sel_modifierFlags);
}
@@ -86,11 +90,19 @@ public static NSPoint mouseLocation() {
return result;
}
-public static NSEvent otherEventWithType(long /*int*/ type, NSPoint location, long /*int*/ flags, double time, long /*int*/ wNum, NSGraphicsContext context, short subtype, long /*int*/ d1, long /*int*/ d2) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_, type, location, flags, time, wNum, context != null ? context.id : 0, subtype, d1, d2);
+public static NSEvent otherEventWithType(long type, NSPoint location, long flags, double time, long wNum, NSGraphicsContext context, short subtype, long d1, long d2) {
+ long result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_, type, location, flags, time, wNum, context != null ? context.id : 0, subtype, d1, d2);
return result != 0 ? new NSEvent(result) : null;
}
+public long phase() {
+ return OS.objc_msgSend(this.id, OS.sel_phase);
+}
+
+public static long pressedMouseButtons() {
+ return OS.objc_msgSend(OS.class_NSEvent, OS.sel_pressedMouseButtons);
+}
+
public float rotation() {
return OS.objc_msgSend_floatret(this.id, OS.sel_rotation);
}
@@ -99,17 +111,17 @@ public double timestamp() {
return OS.objc_msgSend_fpret(this.id, OS.sel_timestamp);
}
-public NSSet touchesMatchingPhase(long /*int*/ phase, NSView view) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_touchesMatchingPhase_inView_, phase, view != null ? view.id : 0);
+public NSSet touchesMatchingPhase(long phase, NSView view) {
+ long result = OS.objc_msgSend(this.id, OS.sel_touchesMatchingPhase_inView_, phase, view != null ? view.id : 0);
return result != 0 ? new NSSet(result) : null;
}
-public long /*int*/ type() {
+public long type() {
return OS.objc_msgSend(this.id, OS.sel_type);
}
public NSWindow window() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_window);
+ long result = OS.objc_msgSend(this.id, OS.sel_window);
return result != 0 ? new NSWindow(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java
index d0bdcdca6d..3cb41a7c4f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSFileManager() {
super();
}
-public NSFileManager(long /*int*/ id) {
+public NSFileManager(long id) {
super(id);
}
@@ -27,22 +27,13 @@ public NSFileManager(id id) {
super(id);
}
-public NSArray URLsForDirectory(long /*int*/ directory, long /*int*/ domainMask) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_URLsForDirectory_inDomains_, directory, domainMask);
- return result != 0 ? new NSArray(result) : null;
-}
-
-public boolean createFileAtPath(NSString path, NSData data, NSDictionary attr) {
- return OS.objc_msgSend_bool(this.id, OS.sel_createFileAtPath_contents_attributes_, path != null ? path.id : 0, data != null ? data.id : 0, attr != null ? attr.id : 0);
-}
-
public static NSFileManager defaultManager() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFileManager, OS.sel_defaultManager);
+ long result = OS.objc_msgSend(OS.class_NSFileManager, OS.sel_defaultManager);
return result != 0 ? new NSFileManager(result) : null;
}
public NSDirectoryEnumerator enumeratorAtPath(NSString path) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_enumeratorAtPath_, path != null ? path.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_enumeratorAtPath_, path != null ? path.id : 0);
return result != 0 ? new NSDirectoryEnumerator(result) : null;
}
@@ -50,7 +41,7 @@ public boolean fileExistsAtPath(NSString path) {
return OS.objc_msgSend_bool(this.id, OS.sel_fileExistsAtPath_, path != null ? path.id : 0);
}
-public boolean fileExistsAtPath(NSString path, long /*int*/ isDirectory) {
+public boolean fileExistsAtPath(NSString path, long isDirectory) {
return OS.objc_msgSend_bool(this.id, OS.sel_fileExistsAtPath_isDirectory_, path != null ? path.id : 0, isDirectory);
}
@@ -58,8 +49,4 @@ public boolean isExecutableFileAtPath(NSString path) {
return OS.objc_msgSend_bool(this.id, OS.sel_isExecutableFileAtPath_, path != null ? path.id : 0);
}
-public boolean removeItemAtPath(NSString path, long /*int*/ error) {
- return OS.objc_msgSend_bool(this.id, OS.sel_removeItemAtPath_error_, path != null ? path.id : 0, error);
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileWrapper.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileWrapper.java
index f83a25192b..473480955a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileWrapper.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileWrapper.java
@@ -19,7 +19,7 @@ public NSFileWrapper() {
super();
}
-public NSFileWrapper(long /*int*/ id) {
+public NSFileWrapper(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java
index c6120f448d..834606b25f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSFont() {
super();
}
-public NSFont(long /*int*/ id) {
+public NSFont(long id) {
super(id);
}
@@ -27,77 +27,67 @@ public NSFont(id id) {
super(id);
}
-public double /*float*/ ascender() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_ascender);
+public double ascender() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_ascender);
}
-public static NSFont boldSystemFontOfSize(double /*float*/ fontSize) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_boldSystemFontOfSize_, fontSize);
+public static NSFont boldSystemFontOfSize(double fontSize) {
+ long result = OS.objc_msgSend(OS.class_NSFont, OS.sel_boldSystemFontOfSize_, fontSize);
return result != 0 ? new NSFont(result) : null;
}
-public static NSFont controlContentFontOfSize(double /*float*/ fontSize) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_controlContentFontOfSize_, fontSize);
- return result != 0 ? new NSFont(result) : null;
-}
-
-public double /*float*/ descender() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_descender);
+public double descender() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_descender);
}
public NSString displayName() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_displayName);
+ long result = OS.objc_msgSend(this.id, OS.sel_displayName);
return result != 0 ? new NSString(result) : null;
}
public NSString familyName() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_familyName);
+ long result = OS.objc_msgSend(this.id, OS.sel_familyName);
return result != 0 ? new NSString(result) : null;
}
public NSString fontName() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_fontName);
+ long result = OS.objc_msgSend(this.id, OS.sel_fontName);
return result != 0 ? new NSString(result) : null;
}
-public static NSFont fontWithName(NSString fontName, double /*float*/ fontSize) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_fontWithName_size_, fontName != null ? fontName.id : 0, fontSize);
+public static NSFont fontWithName(NSString fontName, double fontSize) {
+ long result = OS.objc_msgSend(OS.class_NSFont, OS.sel_fontWithName_size_, fontName != null ? fontName.id : 0, fontSize);
return result != 0 ? new NSFont(result) : null;
}
-public double /*float*/ leading() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_leading);
-}
-
-public static NSFont menuBarFontOfSize(double /*float*/ fontSize) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_menuBarFontOfSize_, fontSize);
- return result != 0 ? new NSFont(result) : null;
+public double leading() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_leading);
}
-public static NSFont menuFontOfSize(double /*float*/ fontSize) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_menuFontOfSize_, fontSize);
+public static NSFont menuBarFontOfSize(double fontSize) {
+ long result = OS.objc_msgSend(OS.class_NSFont, OS.sel_menuBarFontOfSize_, fontSize);
return result != 0 ? new NSFont(result) : null;
}
-public double /*float*/ pointSize() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_pointSize);
+public double pointSize() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_pointSize);
}
-public static double /*float*/ smallSystemFontSize() {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_smallSystemFontSize);
+public static double smallSystemFontSize() {
+ return OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_smallSystemFontSize);
}
-public static NSFont systemFontOfSize(double /*float*/ fontSize) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_systemFontOfSize_, fontSize);
+public static NSFont systemFontOfSize(double fontSize) {
+ long result = OS.objc_msgSend(OS.class_NSFont, OS.sel_systemFontOfSize_, fontSize);
return result != 0 ? new NSFont(result) : null;
}
-public static double /*float*/ systemFontSize() {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSize);
+public static double systemFontSize() {
+ return OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSize);
}
-public static double /*float*/ systemFontSizeForControlSize(long /*int*/ controlSize) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSizeForControlSize_, controlSize);
+public static double systemFontSizeForControlSize(long controlSize) {
+ return OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSizeForControlSize_, controlSize);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontManager.java
index 39ac39eb58..8f7ae357c1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontManager.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSFontManager() {
super();
}
-public NSFontManager(long /*int*/ id) {
+public NSFontManager(long id) {
super(id);
}
@@ -28,41 +28,27 @@ public NSFontManager(id id) {
}
public NSArray availableFontFamilies() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_availableFontFamilies);
- return result != 0 ? new NSArray(result) : null;
-}
-
-public NSArray availableFonts() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_availableFonts);
+ long result = OS.objc_msgSend(this.id, OS.sel_availableFontFamilies);
return result != 0 ? new NSArray(result) : null;
}
public NSArray availableMembersOfFontFamily(NSString fam) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_availableMembersOfFontFamily_, fam != null ? fam.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_availableMembersOfFontFamily_, fam != null ? fam.id : 0);
return result != 0 ? new NSArray(result) : null;
}
-public NSFont convertFont(NSFont fontObj, long /*int*/ trait) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_convertFont_toHaveTrait_, fontObj != null ? fontObj.id : 0, trait);
- return result != 0 ? new NSFont(result) : null;
-}
-
-public NSFont fontWithFamily(NSString family, long /*int*/ traits, long /*int*/ weight, double /*float*/ size) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_fontWithFamily_traits_weight_size_, family != null ? family.id : 0, traits, weight, size);
+public NSFont convertFont(NSFont fontObj, long trait) {
+ long result = OS.objc_msgSend(this.id, OS.sel_convertFont_toHaveTrait_, fontObj != null ? fontObj.id : 0, trait);
return result != 0 ? new NSFont(result) : null;
}
public static NSFontManager sharedFontManager() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFontManager, OS.sel_sharedFontManager);
+ long result = OS.objc_msgSend(OS.class_NSFontManager, OS.sel_sharedFontManager);
return result != 0 ? new NSFontManager(result) : null;
}
-public long /*int*/ traitsOfFont(NSFont fontObj) {
+public long traitsOfFont(NSFont fontObj) {
return OS.objc_msgSend(this.id, OS.sel_traitsOfFont_, fontObj != null ? fontObj.id : 0);
}
-public long /*int*/ weightOfFont(NSFont fontObj) {
- return OS.objc_msgSend(this.id, OS.sel_weightOfFont_, fontObj != null ? fontObj.id : 0);
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontPanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontPanel.java
index e5d0f36ce1..a5a206ff3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontPanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFontPanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSFontPanel() {
super();
}
-public NSFontPanel(long /*int*/ id) {
+public NSFontPanel(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSFontPanel(id id) {
}
public NSFont panelConvertFont(NSFont fontObj) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_panelConvertFont_, fontObj != null ? fontObj.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_panelConvertFont_, fontObj != null ? fontObj.id : 0);
return result != 0 ? new NSFont(result) : null;
}
@@ -37,15 +37,15 @@ public void setPanelFont(NSFont fontObj, boolean flag) {
}
public static NSFontPanel sharedFontPanel() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSFontPanel, OS.sel_sharedFontPanel);
+ long result = OS.objc_msgSend(OS.class_NSFontPanel, OS.sel_sharedFontPanel);
return result != 0 ? new NSFontPanel(result) : null;
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSFontPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_NSFontPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_NSFontPanel, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFormatter.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFormatter.java
index 5afa6c3178..7d4fb23010 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFormatter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFormatter.java
@@ -19,7 +19,7 @@ public NSFormatter() {
super();
}
-public NSFormatter(long /*int*/ id) {
+public NSFormatter(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSFormatter(id id) {
}
public NSString stringForObjectValue(id obj) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringForObjectValue_, obj != null ? obj.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringForObjectValue_, obj != null ? obj.id : 0);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java
index b0c92d994f..767da31338 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java
@@ -19,7 +19,7 @@ public NSGradient() {
super();
}
-public NSGradient(long /*int*/ id) {
+public NSGradient(long id) {
super(id);
}
@@ -27,25 +27,25 @@ public NSGradient(id id) {
super(id);
}
-public void drawFromPoint(NSPoint startingPoint, NSPoint endingPoint, long /*int*/ options) {
+public void drawFromPoint(NSPoint startingPoint, NSPoint endingPoint, long options) {
OS.objc_msgSend(this.id, OS.sel_drawFromPoint_toPoint_options_, startingPoint, endingPoint, options);
}
-public void drawInBezierPath(NSBezierPath path, double /*float*/ angle) {
+public void drawInBezierPath(NSBezierPath path, double angle) {
OS.objc_msgSend(this.id, OS.sel_drawInBezierPath_angle_, path != null ? path.id : 0, angle);
}
-public void drawInRect(NSRect rect, double /*float*/ angle) {
+public void drawInRect(NSRect rect, double angle) {
OS.objc_msgSend(this.id, OS.sel_drawInRect_angle_, rect, angle);
}
public NSGradient initWithColors(NSArray colorArray) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithColors_, colorArray != null ? colorArray.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithColors_, colorArray != null ? colorArray.id : 0);
return result == this.id ? this : (result != 0 ? new NSGradient(result) : null);
}
public NSGradient initWithStartingColor(NSColor startingColor, NSColor endingColor) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithStartingColor_endingColor_, startingColor != null ? startingColor.id : 0, endingColor != null ? endingColor.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithStartingColor_endingColor_, startingColor != null ? startingColor.id : 0, endingColor != null ? endingColor.id : 0);
return result == this.id ? this : (result != 0 ? new NSGradient(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java
index 128fe9a38b..65d4313747 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java
@@ -19,7 +19,7 @@ public NSGraphicsContext() {
super();
}
-public NSGraphicsContext(long /*int*/ id) {
+public NSGraphicsContext(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSGraphicsContext(id id) {
}
public static NSGraphicsContext currentContext() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_currentContext);
+ long result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_currentContext);
return result != 0 ? new NSGraphicsContext(result) : null;
}
@@ -37,25 +37,25 @@ public void flushGraphics() {
}
public static NSGraphicsContext graphicsContextWithBitmapImageRep(NSBitmapImageRep bitmapRep) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithBitmapImageRep_, bitmapRep != null ? bitmapRep.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithBitmapImageRep_, bitmapRep != null ? bitmapRep.id : 0);
return result != 0 ? new NSGraphicsContext(result) : null;
}
-public static NSGraphicsContext graphicsContextWithGraphicsPort(long /*int*/ graphicsPort, boolean initialFlippedState) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithGraphicsPort_flipped_, graphicsPort, initialFlippedState);
+public static NSGraphicsContext graphicsContextWithGraphicsPort(long graphicsPort, boolean initialFlippedState) {
+ long result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithGraphicsPort_flipped_, graphicsPort, initialFlippedState);
return result != 0 ? new NSGraphicsContext(result) : null;
}
public static NSGraphicsContext graphicsContextWithWindow(NSWindow window) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithWindow_, window != null ? window.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithWindow_, window != null ? window.id : 0);
return result != 0 ? new NSGraphicsContext(result) : null;
}
-public long /*int*/ graphicsPort() {
+public long graphicsPort() {
return OS.objc_msgSend(this.id, OS.sel_graphicsPort);
}
-public long /*int*/ imageInterpolation() {
+public long imageInterpolation() {
return OS.objc_msgSend(this.id, OS.sel_imageInterpolation);
}
@@ -83,7 +83,7 @@ public void saveGraphicsState() {
OS.objc_msgSend(this.id, OS.sel_saveGraphicsState);
}
-public void setCompositingOperation(long /*int*/ compositingOperation) {
+public void setCompositingOperation(long compositingOperation) {
OS.objc_msgSend(this.id, OS.sel_setCompositingOperation_, compositingOperation);
}
@@ -91,7 +91,7 @@ public static void setCurrentContext(NSGraphicsContext context) {
OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_setCurrentContext_, context != null ? context.id : 0);
}
-public void setImageInterpolation(long /*int*/ imageInterpolation) {
+public void setImageInterpolation(long imageInterpolation) {
OS.objc_msgSend(this.id, OS.sel_setImageInterpolation_, imageInterpolation);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookie.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookie.java
index 525f40c5c5..0324cc4062 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookie.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookie.java
@@ -19,7 +19,7 @@ public NSHTTPCookie() {
super();
}
-public NSHTTPCookie(long /*int*/ id) {
+public NSHTTPCookie(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSHTTPCookie(id id) {
}
public static NSArray cookiesWithResponseHeaderFields(NSDictionary headerFields, NSURL URL) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSHTTPCookie, OS.sel_cookiesWithResponseHeaderFields_forURL_, headerFields != null ? headerFields.id : 0, URL != null ? URL.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSHTTPCookie, OS.sel_cookiesWithResponseHeaderFields_forURL_, headerFields != null ? headerFields.id : 0, URL != null ? URL.id : 0);
return result != 0 ? new NSArray(result) : null;
}
@@ -37,12 +37,12 @@ public boolean isSessionOnly() {
}
public NSString name() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_name);
+ long result = OS.objc_msgSend(this.id, OS.sel_name);
return result != 0 ? new NSString(result) : null;
}
public NSString value() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_value);
+ long result = OS.objc_msgSend(this.id, OS.sel_value);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookieStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookieStorage.java
index dfe15f9443..faa0ca3ead 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookieStorage.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSHTTPCookieStorage.java
@@ -19,7 +19,7 @@ public NSHTTPCookieStorage() {
super();
}
-public NSHTTPCookieStorage(long /*int*/ id) {
+public NSHTTPCookieStorage(long id) {
super(id);
}
@@ -28,12 +28,12 @@ public NSHTTPCookieStorage(id id) {
}
public NSArray cookies() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_cookies);
+ long result = OS.objc_msgSend(this.id, OS.sel_cookies);
return result != 0 ? new NSArray(result) : null;
}
public NSArray cookiesForURL(NSURL URL) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_cookiesForURL_, URL != null ? URL.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_cookiesForURL_, URL != null ? URL.id : 0);
return result != 0 ? new NSArray(result) : null;
}
@@ -46,7 +46,7 @@ public void setCookie(NSHTTPCookie cookie) {
}
public static NSHTTPCookieStorage sharedHTTPCookieStorage() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSHTTPCookieStorage, OS.sel_sharedHTTPCookieStorage);
+ long result = OS.objc_msgSend(OS.class_NSHTTPCookieStorage, OS.sel_sharedHTTPCookieStorage);
return result != 0 ? new NSHTTPCookieStorage(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImage.java
index a797dcb584..26f18b910f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImage.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSImage() {
super();
}
-public NSImage(long /*int*/ id) {
+public NSImage(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSImage(id id) {
}
public NSData TIFFRepresentation() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_TIFFRepresentation);
+ long result = OS.objc_msgSend(this.id, OS.sel_TIFFRepresentation);
return result != 0 ? new NSData(result) : null;
}
@@ -37,45 +37,41 @@ public void addRepresentation(NSImageRep imageRep) {
}
public NSImageRep bestRepresentationForDevice(NSDictionary deviceDescription) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_bestRepresentationForDevice_, deviceDescription != null ? deviceDescription.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_bestRepresentationForDevice_, deviceDescription != null ? deviceDescription.id : 0);
return result != 0 ? new NSImageRep(result) : null;
}
-public void drawAtPoint(NSPoint point, NSRect fromRect, long /*int*/ op, double /*float*/ delta) {
- OS.objc_msgSend(this.id, OS.sel_drawAtPoint_fromRect_operation_fraction_, point, fromRect, op, delta);
-}
-
-public void drawInRect(NSRect rect, NSRect fromRect, long /*int*/ op, double /*float*/ delta) {
+public void drawInRect(NSRect rect, NSRect fromRect, long op, double delta) {
OS.objc_msgSend(this.id, OS.sel_drawInRect_fromRect_operation_fraction_, rect, fromRect, op, delta);
}
public static NSImage imageNamed(NSString name) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageNamed_, name != null ? name.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageNamed_, name != null ? name.id : 0);
return result != 0 ? new NSImage(result) : null;
}
public NSImage initByReferencingFile(NSString fileName) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initByReferencingFile_, fileName != null ? fileName.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initByReferencingFile_, fileName != null ? fileName.id : 0);
return result == this.id ? this : (result != 0 ? new NSImage(result) : null);
}
public NSImage initWithContentsOfFile(NSString fileName) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfFile_, fileName != null ? fileName.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfFile_, fileName != null ? fileName.id : 0);
return result == this.id ? this : (result != 0 ? new NSImage(result) : null);
}
public NSImage initWithData(NSData data) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithData_, data != null ? data.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithData_, data != null ? data.id : 0);
return result == this.id ? this : (result != 0 ? new NSImage(result) : null);
}
-public NSImage initWithIconRef(long /*int*/ iconRef) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIconRef_, iconRef);
+public NSImage initWithIconRef(long iconRef) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithIconRef_, iconRef);
return result == this.id ? this : (result != 0 ? new NSImage(result) : null);
}
public NSImage initWithSize(NSSize aSize) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithSize_, aSize);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithSize_, aSize);
return result == this.id ? this : (result != 0 ? new NSImage(result) : null);
}
@@ -88,11 +84,11 @@ public void removeRepresentation(NSImageRep imageRep) {
}
public NSArray representations() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_representations);
+ long result = OS.objc_msgSend(this.id, OS.sel_representations);
return result != 0 ? new NSArray(result) : null;
}
-public void setCacheMode(long /*int*/ cacheMode) {
+public void setCacheMode(long cacheMode) {
OS.objc_msgSend(this.id, OS.sel_setCacheMode_, cacheMode);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
index bcaa0a5ec0..610be72d2d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSImageRep() {
super();
}
-public NSImageRep(long /*int*/ id) {
+public NSImageRep(long id) {
super(id);
}
@@ -27,15 +27,10 @@ public NSImageRep(id id) {
super(id);
}
-public long /*int*/ bitsPerSample() {
+public long bitsPerSample() {
return OS.objc_msgSend(this.id, OS.sel_bitsPerSample);
}
-public NSString colorSpaceName() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_colorSpaceName);
- return result != 0 ? new NSString(result) : null;
-}
-
public boolean drawInRect(NSRect rect) {
return OS.objc_msgSend_bool(this.id, OS.sel_drawInRect_, rect);
}
@@ -45,15 +40,15 @@ public boolean hasAlpha() {
}
public static NSImageRep imageRepWithContentsOfFile(NSString filename) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
return result != 0 ? new NSImageRep(result) : null;
}
-public long /*int*/ pixelsHigh() {
+public long pixelsHigh() {
return OS.objc_msgSend(this.id, OS.sel_pixelsHigh);
}
-public long /*int*/ pixelsWide() {
+public long pixelsWide() {
return OS.objc_msgSend(this.id, OS.sel_pixelsWide);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java
index 54c5e07126..c6fb1a2589 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java
@@ -19,7 +19,7 @@ public NSImageView() {
super();
}
-public NSImageView(long /*int*/ id) {
+public NSImageView(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSImageView(id id) {
}
public NSImage image() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_image);
+ long result = OS.objc_msgSend(this.id, OS.sel_image);
return result != 0 ? new NSImage(result) : null;
}
@@ -36,19 +36,19 @@ public void setImage(NSImage image) {
OS.objc_msgSend(this.id, OS.sel_setImage_, image != null ? image.id : 0);
}
-public void setImageAlignment(long /*int*/ imageAlignment) {
+public void setImageAlignment(long imageAlignment) {
OS.objc_msgSend(this.id, OS.sel_setImageAlignment_, imageAlignment);
}
-public void setImageScaling(long /*int*/ imageScaling) {
+public void setImageScaling(long imageScaling) {
OS.objc_msgSend(this.id, OS.sel_setImageScaling_, imageScaling);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSImageView, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSImageView, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSIndexSet.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSIndexSet.java
index 5c503e4140..04dba57954 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSIndexSet.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSIndexSet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSIndexSet() {
super();
}
-public NSIndexSet(long /*int*/ id) {
+public NSIndexSet(long id) {
super(id);
}
@@ -27,39 +27,25 @@ public NSIndexSet(id id) {
super(id);
}
-public boolean containsIndex(long /*int*/ value) {
+public boolean containsIndex(long value) {
return OS.objc_msgSend_bool(this.id, OS.sel_containsIndex_, value);
}
-public long /*int*/ count() {
+public long count() {
return OS.objc_msgSend(this.id, OS.sel_count);
}
-public long /*int*/ firstIndex() {
- return OS.objc_msgSend(this.id, OS.sel_firstIndex);
-}
-
-public long /*int*/ getIndexes(long[] /*int[]*/ indexBuffer, long /*int*/ bufferSize, long /*int*/ range) {
+public long getIndexes(long[] indexBuffer, long bufferSize, long range) {
return OS.objc_msgSend(this.id, OS.sel_getIndexes_maxCount_inIndexRange_, indexBuffer, bufferSize, range);
}
-public static NSIndexSet indexSetWithIndex(long /*int*/ value) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSIndexSet, OS.sel_indexSetWithIndex_, value);
- return result != 0 ? new NSIndexSet(result) : null;
-}
-
-public NSIndexSet initWithIndex(long /*int*/ value) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIndex_, value);
- return result == this.id ? this : (result != 0 ? new NSIndexSet(result) : null);
-}
-
-public NSIndexSet initWithIndexSet(NSIndexSet indexSet) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIndexSet_, indexSet != null ? indexSet.id : 0);
+public NSIndexSet initWithIndex(long value) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithIndex_, value);
return result == this.id ? this : (result != 0 ? new NSIndexSet(result) : null);
}
public NSIndexSet initWithIndexesInRange(NSRange range) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIndexesInRange_, range);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithIndexesInRange_, range);
return result == this.id ? this : (result != 0 ? new NSIndexSet(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSInputManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSInputManager.java
index 15439246d8..32a0c8e1e3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSInputManager.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSInputManager.java
@@ -19,7 +19,7 @@ public NSInputManager() {
super();
}
-public NSInputManager(long /*int*/ id) {
+public NSInputManager(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSInputManager(id id) {
}
public static NSInputManager currentInputManager() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSInputManager, OS.sel_currentInputManager);
+ long result = OS.objc_msgSend(OS.class_NSInputManager, OS.sel_currentInputManager);
return result != 0 ? new NSInputManager(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedArchiver.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedArchiver.java
index 849061e10f..20215b129f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedArchiver.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedArchiver.java
@@ -19,7 +19,7 @@ public NSKeyedArchiver() {
super();
}
-public NSKeyedArchiver(long /*int*/ id) {
+public NSKeyedArchiver(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSKeyedArchiver(id id) {
}
public static NSData archivedDataWithRootObject(id rootObject) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_, rootObject != null ? rootObject.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_, rootObject != null ? rootObject.id : 0);
return result != 0 ? new NSData(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedUnarchiver.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedUnarchiver.java
index bc9b424044..f937b29c4a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedUnarchiver.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSKeyedUnarchiver.java
@@ -19,7 +19,7 @@ public NSKeyedUnarchiver() {
super();
}
-public NSKeyedUnarchiver(long /*int*/ id) {
+public NSKeyedUnarchiver(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSKeyedUnarchiver(id id) {
}
public static id unarchiveObjectWithData(NSData data) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_unarchiveObjectWithData_, data != null ? data.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_unarchiveObjectWithData_, data != null ? data.id : 0);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java
index ef43723ac8..a6690d5632 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSLayoutManager() {
super();
}
-public NSLayoutManager(long /*int*/ id) {
+public NSLayoutManager(long id) {
super(id);
}
@@ -41,16 +41,16 @@ public NSRect boundingRectForGlyphRange(NSRange glyphRange, NSTextContainer cont
return result;
}
-public long /*int*/ characterIndexForGlyphAtIndex(long /*int*/ glyphIndex) {
+public long characterIndexForGlyphAtIndex(long glyphIndex) {
return OS.objc_msgSend(this.id, OS.sel_characterIndexForGlyphAtIndex_, glyphIndex);
}
-public double /*float*/ defaultBaselineOffsetForFont(NSFont theFont) {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_defaultBaselineOffsetForFont_, theFont != null ? theFont.id : 0);
+public double defaultBaselineOffsetForFont(NSFont theFont) {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_defaultBaselineOffsetForFont_, theFont != null ? theFont.id : 0);
}
-public double /*float*/ defaultLineHeightForFont(NSFont theFont) {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_defaultLineHeightForFont_, theFont != null ? theFont.id : 0);
+public double defaultLineHeightForFont(NSFont theFont) {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_defaultLineHeightForFont_, theFont != null ? theFont.id : 0);
}
public void drawBackgroundForGlyphRange(NSRange glyphsToShow, NSPoint origin) {
@@ -61,23 +61,23 @@ public void drawGlyphsForGlyphRange(NSRange glyphsToShow, NSPoint origin) {
OS.objc_msgSend(this.id, OS.sel_drawGlyphsForGlyphRange_atPoint_, glyphsToShow, origin);
}
-public long /*int*/ getGlyphs(long /*int*/ glyphArray, NSRange glyphRange) {
+public long getGlyphs(long glyphArray, NSRange glyphRange) {
return OS.objc_msgSend(this.id, OS.sel_getGlyphs_range_, glyphArray, glyphRange);
}
-public long /*int*/ getGlyphsInRange(NSRange glyphRange, long /*int*/ glyphBuffer, long /*int*/ charIndexBuffer, long /*int*/ inscribeBuffer, long /*int*/ elasticBuffer, byte[] bidiLevelBuffer) {
+public long getGlyphsInRange(NSRange glyphRange, long glyphBuffer, long charIndexBuffer, long inscribeBuffer, long elasticBuffer, byte[] bidiLevelBuffer) {
return OS.objc_msgSend(this.id, OS.sel_getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, glyphRange, glyphBuffer, charIndexBuffer, inscribeBuffer, elasticBuffer, bidiLevelBuffer);
}
-public long /*int*/ glyphIndexForCharacterAtIndex(long /*int*/ charIndex) {
+public long glyphIndexForCharacterAtIndex(long charIndex) {
return OS.objc_msgSend(this.id, OS.sel_glyphIndexForCharacterAtIndex_, charIndex);
}
-public long /*int*/ glyphIndexForPoint(NSPoint point, NSTextContainer container, double[] /*float[]*/ partialFraction) {
+public long glyphIndexForPoint(NSPoint point, NSTextContainer container, double[] partialFraction) {
return OS.objc_msgSend(this.id, OS.sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_, point, container != null ? container.id : 0, partialFraction);
}
-public NSRange glyphRangeForCharacterRange(NSRange charRange, long /*int*/ actualCharRange) {
+public NSRange glyphRangeForCharacterRange(NSRange charRange, long actualCharRange) {
NSRange result = new NSRange();
OS.objc_msgSend_stret(result, this.id, OS.sel_glyphRangeForCharacterRange_actualCharacterRange_, charRange, actualCharRange);
return result;
@@ -89,33 +89,33 @@ public NSRange glyphRangeForTextContainer(NSTextContainer container) {
return result;
}
-public NSRect lineFragmentUsedRectForGlyphAtIndex(long /*int*/ glyphIndex, long /*int*/ effectiveGlyphRange) {
+public NSRect lineFragmentUsedRectForGlyphAtIndex(long glyphIndex, long effectiveGlyphRange) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_, glyphIndex, effectiveGlyphRange);
return result;
}
-public NSRect lineFragmentUsedRectForGlyphAtIndex(long /*int*/ glyphIndex, long /*int*/ effectiveGlyphRange, boolean flag) {
+public NSRect lineFragmentUsedRectForGlyphAtIndex(long glyphIndex, long effectiveGlyphRange, boolean flag) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, glyphIndex, effectiveGlyphRange, flag);
return result;
}
-public NSPoint locationForGlyphAtIndex(long /*int*/ glyphIndex) {
+public NSPoint locationForGlyphAtIndex(long glyphIndex) {
NSPoint result = new NSPoint();
OS.objc_msgSend_stret(result, this.id, OS.sel_locationForGlyphAtIndex_, glyphIndex);
return result;
}
-public long /*int*/ numberOfGlyphs() {
+public long numberOfGlyphs() {
return OS.objc_msgSend(this.id, OS.sel_numberOfGlyphs);
}
-public long /*int*/ rectArrayForCharacterRange(NSRange charRange, NSRange selCharRange, NSTextContainer container, long[] /*int[]*/ rectCount) {
+public long rectArrayForCharacterRange(NSRange charRange, NSRange selCharRange, NSTextContainer container, long[] rectCount) {
return OS.objc_msgSend(this.id, OS.sel_rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_, charRange, selCharRange, container != null ? container.id : 0, rectCount);
}
-public long /*int*/ rectArrayForGlyphRange(NSRange glyphRange, NSRange selGlyphRange, NSTextContainer container, long[] /*int[]*/ rectCount) {
+public long rectArrayForGlyphRange(NSRange glyphRange, NSRange selGlyphRange, NSTextContainer container, long[] rectCount) {
return OS.objc_msgSend(this.id, OS.sel_rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_, glyphRange, selGlyphRange, container != null ? container.id : 0, rectCount);
}
@@ -127,10 +127,6 @@ public void setBackgroundLayoutEnabled(boolean backgroundLayoutEnabled) {
OS.objc_msgSend(this.id, OS.sel_setBackgroundLayoutEnabled_, backgroundLayoutEnabled);
}
-public void setLineFragmentRect(NSRect fragmentRect, NSRange glyphRange, NSRect usedRect) {
- OS.objc_msgSend(this.id, OS.sel_setLineFragmentRect_forGlyphRange_usedRect_, fragmentRect, glyphRange, usedRect);
-}
-
public void setTextStorage(NSTextStorage textStorage) {
OS.objc_msgSend(this.id, OS.sel_setTextStorage_, textStorage != null ? textStorage.id : 0);
}
@@ -140,7 +136,7 @@ public void setUsesScreenFonts(boolean usesScreenFonts) {
}
public NSTypesetter typesetter() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_typesetter);
+ long result = OS.objc_msgSend(this.id, OS.sel_typesetter);
return result != 0 ? new NSTypesetter(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLocale.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLocale.java
index 0ebb7dddd5..0219947b50 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLocale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLocale.java
@@ -19,7 +19,7 @@ public NSLocale() {
super();
}
-public NSLocale(long /*int*/ id) {
+public NSLocale(long id) {
super(id);
}
@@ -28,12 +28,12 @@ public NSLocale(id id) {
}
public NSString displayNameForKey(id key, id value) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_displayNameForKey_value_, key != null ? key.id : 0, value != null ? value.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_displayNameForKey_value_, key != null ? key.id : 0, value != null ? value.id : 0);
return result != 0 ? new NSString(result) : null;
}
public NSLocale initWithLocaleIdentifier(NSString string) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithLocaleIdentifier_, string != null ? string.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithLocaleIdentifier_, string != null ? string.id : 0);
return result == this.id ? this : (result != 0 ? new NSLocale(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenu.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenu.java
index f71528dbbd..3b77621b63 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenu.java
@@ -19,7 +19,7 @@ public NSMenu() {
super();
}
-public NSMenu(long /*int*/ id) {
+public NSMenu(long id) {
super(id);
}
@@ -31,8 +31,8 @@ public void addItem(NSMenuItem newItem) {
OS.objc_msgSend(this.id, OS.sel_addItem_, newItem != null ? newItem.id : 0);
}
-public NSMenuItem addItemWithTitle(NSString aString, long /*int*/ aSelector, NSString charCode) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_addItemWithTitle_action_keyEquivalent_, aString != null ? aString.id : 0, aSelector, charCode != null ? charCode.id : 0);
+public NSMenuItem addItemWithTitle(NSString aString, long aSelector, NSString charCode) {
+ long result = OS.objc_msgSend(this.id, OS.sel_addItemWithTitle_action_keyEquivalent_, aString != null ? aString.id : 0, aSelector, charCode != null ? charCode.id : 0);
return result != 0 ? new NSMenuItem(result) : null;
}
@@ -40,35 +40,35 @@ public void cancelTracking() {
OS.objc_msgSend(this.id, OS.sel_cancelTracking);
}
-public long /*int*/ indexOfItemWithTarget(id target, long /*int*/ actionSelector) {
+public long indexOfItemWithTarget(id target, long actionSelector) {
return OS.objc_msgSend(this.id, OS.sel_indexOfItemWithTarget_andAction_, target != null ? target.id : 0, actionSelector);
}
public NSMenu initWithTitle(NSString aTitle) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithTitle_, aTitle != null ? aTitle.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithTitle_, aTitle != null ? aTitle.id : 0);
return result == this.id ? this : (result != 0 ? new NSMenu(result) : null);
}
-public void insertItem(NSMenuItem newItem, long /*int*/ index) {
+public void insertItem(NSMenuItem newItem, long index) {
OS.objc_msgSend(this.id, OS.sel_insertItem_atIndex_, newItem != null ? newItem.id : 0, index);
}
public NSArray itemArray() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemArray);
+ long result = OS.objc_msgSend(this.id, OS.sel_itemArray);
return result != 0 ? new NSArray(result) : null;
}
-public NSMenuItem itemAtIndex(long /*int*/ index) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemAtIndex_, index);
+public NSMenuItem itemAtIndex(long index) {
+ long result = OS.objc_msgSend(this.id, OS.sel_itemAtIndex_, index);
return result != 0 ? new NSMenuItem(result) : null;
}
-public NSMenuItem itemWithTag(long /*int*/ tag) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemWithTag_, tag);
+public NSMenuItem itemWithTag(long tag) {
+ long result = OS.objc_msgSend(this.id, OS.sel_itemWithTag_, tag);
return result != 0 ? new NSMenuItem(result) : null;
}
-public long /*int*/ numberOfItems() {
+public long numberOfItems() {
return OS.objc_msgSend(this.id, OS.sel_numberOfItems);
}
@@ -84,7 +84,7 @@ public void removeItem(NSMenuItem item) {
OS.objc_msgSend(this.id, OS.sel_removeItem_, item != null ? item.id : 0);
}
-public void removeItemAtIndex(long /*int*/ index) {
+public void removeItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_removeItemAtIndex_, index);
}
@@ -105,7 +105,7 @@ public void setTitle(NSString title) {
}
public NSString title() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_title);
+ long result = OS.objc_msgSend(this.id, OS.sel_title);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java
index f4110b6143..239f26abf8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java
@@ -19,7 +19,7 @@ public NSMenuItem() {
super();
}
-public NSMenuItem(long /*int*/ id) {
+public NSMenuItem(long id) {
super(id);
}
@@ -27,22 +27,22 @@ public NSMenuItem(id id) {
super(id);
}
-public long /*int*/ action() {
+public long action() {
return OS.objc_msgSend(this.id, OS.sel_action);
}
public NSAttributedString attributedTitle() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_attributedTitle);
+ long result = OS.objc_msgSend(this.id, OS.sel_attributedTitle);
return result != 0 ? new NSAttributedString(result) : null;
}
public NSImage image() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_image);
+ long result = OS.objc_msgSend(this.id, OS.sel_image);
return result != 0 ? new NSImage(result) : null;
}
-public NSMenuItem initWithTitle(NSString aString, long /*int*/ aSelector, NSString charCode) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithTitle_action_keyEquivalent_, aString != null ? aString.id : 0, aSelector, charCode != null ? charCode.id : 0);
+public NSMenuItem initWithTitle(NSString aString, long aSelector, NSString charCode) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithTitle_action_keyEquivalent_, aString != null ? aString.id : 0, aSelector, charCode != null ? charCode.id : 0);
return result == this.id ? this : (result != 0 ? new NSMenuItem(result) : null);
}
@@ -55,20 +55,20 @@ public boolean isSeparatorItem() {
}
public NSString keyEquivalent() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_keyEquivalent);
+ long result = OS.objc_msgSend(this.id, OS.sel_keyEquivalent);
return result != 0 ? new NSString(result) : null;
}
-public long /*int*/ keyEquivalentModifierMask() {
+public long keyEquivalentModifierMask() {
return OS.objc_msgSend(this.id, OS.sel_keyEquivalentModifierMask);
}
public static NSMenuItem separatorItem() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMenuItem, OS.sel_separatorItem);
+ long result = OS.objc_msgSend(OS.class_NSMenuItem, OS.sel_separatorItem);
return result != 0 ? new NSMenuItem(result) : null;
}
-public void setAction(long /*int*/ action) {
+public void setAction(long action) {
OS.objc_msgSend(this.id, OS.sel_setAction_, action);
}
@@ -92,7 +92,7 @@ public void setKeyEquivalent(NSString keyEquivalent) {
OS.objc_msgSend(this.id, OS.sel_setKeyEquivalent_, keyEquivalent != null ? keyEquivalent.id : 0);
}
-public void setKeyEquivalentModifierMask(long /*int*/ keyEquivalentModifierMask) {
+public void setKeyEquivalentModifierMask(long keyEquivalentModifierMask) {
OS.objc_msgSend(this.id, OS.sel_setKeyEquivalentModifierMask_, keyEquivalentModifierMask);
}
@@ -100,7 +100,7 @@ public void setMenu(NSMenu menu) {
OS.objc_msgSend(this.id, OS.sel_setMenu_, menu != null ? menu.id : 0);
}
-public void setState(long /*int*/ state) {
+public void setState(long state) {
OS.objc_msgSend(this.id, OS.sel_setState_, state);
}
@@ -108,7 +108,7 @@ public void setSubmenu(NSMenu submenu) {
OS.objc_msgSend(this.id, OS.sel_setSubmenu_, submenu != null ? submenu.id : 0);
}
-public void setTag(long /*int*/ tag) {
+public void setTag(long tag) {
OS.objc_msgSend(this.id, OS.sel_setTag_, tag);
}
@@ -124,26 +124,26 @@ public void setToolTip(NSString toolTip) {
OS.objc_msgSend(this.id, OS.sel_setToolTip_, toolTip != null ? toolTip.id : 0);
}
-public long /*int*/ state() {
+public long state() {
return OS.objc_msgSend(this.id, OS.sel_state);
}
public NSMenu submenu() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_submenu);
+ long result = OS.objc_msgSend(this.id, OS.sel_submenu);
return result != 0 ? new NSMenu(result) : null;
}
-public long /*int*/ tag() {
+public long tag() {
return OS.objc_msgSend(this.id, OS.sel_tag);
}
public id target() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_target);
+ long result = OS.objc_msgSend(this.id, OS.sel_target);
return result != 0 ? new id(result) : null;
}
public NSString title() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_title);
+ long result = OS.objc_msgSend(this.id, OS.sel_title);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java
index 2f3562cabf..86e8250137 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSMutableArray() {
super();
}
-public NSMutableArray(long /*int*/ id) {
+public NSMutableArray(long id) {
super(id);
}
@@ -35,16 +35,20 @@ public void addObjectsFromArray(NSArray otherArray) {
OS.objc_msgSend(this.id, OS.sel_addObjectsFromArray_, otherArray != null ? otherArray.id : 0);
}
-public static NSMutableArray arrayWithCapacity(long /*int*/ numItems) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_arrayWithCapacity_, numItems);
+public static NSMutableArray arrayWithCapacity(long numItems) {
+ long result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_arrayWithCapacity_, numItems);
return result != 0 ? new NSMutableArray(result) : null;
}
-public NSMutableArray initWithCapacity(long /*int*/ numItems) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithCapacity_, numItems);
+public NSMutableArray initWithCapacity(long numItems) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithCapacity_, numItems);
return result == this.id ? this : (result != 0 ? new NSMutableArray(result) : null);
}
+public void insertObject(id anObject, long index) {
+ OS.objc_msgSend(this.id, OS.sel_insertObject_atIndex_, anObject != null ? anObject.id : 0, index);
+}
+
public void removeLastObject() {
OS.objc_msgSend(this.id, OS.sel_removeLastObject);
}
@@ -53,7 +57,7 @@ public void removeObject(id anObject) {
OS.objc_msgSend(this.id, OS.sel_removeObject_, anObject != null ? anObject.id : 0);
}
-public void removeObjectAtIndex(long /*int*/ index) {
+public void removeObjectAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_removeObjectAtIndex_, index);
}
@@ -61,13 +65,13 @@ public void removeObjectIdenticalTo(id anObject) {
OS.objc_msgSend(this.id, OS.sel_removeObjectIdenticalTo_, anObject != null ? anObject.id : 0);
}
-public static NSArray array() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_array);
- return result != 0 ? new NSArray(result) : null;
+public static NSMutableArray array() {
+ long result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_array);
+ return result != 0 ? new NSMutableArray(result) : null;
}
-public static NSArray arrayWithObject(id anObject) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_arrayWithObject_, anObject != null ? anObject.id : 0);
+public static NSMutableArray arrayWithObject(id anObject) {
+ long result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_arrayWithObject_, anObject != null ? anObject.id : 0);
return result != 0 ? new NSMutableArray(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java
index d7f4c33b0a..71d207c336 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSMutableAttributedString() {
super();
}
-public NSMutableAttributedString(long /*int*/ id) {
+public NSMutableAttributedString(long id) {
super(id);
}
@@ -27,10 +27,6 @@ public NSMutableAttributedString(id id) {
super(id);
}
-public void setBaseWritingDirection(long /*int*/ writingDirection, NSRange range) {
- OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_range_, writingDirection, range);
-}
-
public void addAttribute(NSString name, id value, NSRange range) {
OS.objc_msgSend(this.id, OS.sel_addAttribute_value_range_, name != null ? name.id : 0, value != null ? value.id : 0, range);
}
@@ -47,11 +43,6 @@ public void endEditing() {
OS.objc_msgSend(this.id, OS.sel_endEditing);
}
-public NSMutableString mutableString() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_mutableString);
- return result != 0 ? new NSMutableString(result) : null;
-}
-
public void removeAttribute(NSString name, NSRange range) {
OS.objc_msgSend(this.id, OS.sel_removeAttribute_range_, name != null ? name.id : 0, range);
}
@@ -64,9 +55,4 @@ public void setAttributedString(NSAttributedString attrString) {
OS.objc_msgSend(this.id, OS.sel_setAttributedString_, attrString != null ? attrString.id : 0);
}
-public static NSAttributedString attributedStringWithAttachment(NSTextAttachment attachment) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableAttributedString, OS.sel_attributedStringWithAttachment_, attachment != null ? attachment.id : 0);
- return result != 0 ? new NSAttributedString(result) : null;
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java
index 2948e15fcd..3dae07048b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSMutableDictionary() {
super();
}
-public NSMutableDictionary(long /*int*/ id) {
+public NSMutableDictionary(long id) {
super(id);
}
@@ -27,13 +27,13 @@ public NSMutableDictionary(id id) {
super(id);
}
-public static NSMutableDictionary dictionaryWithCapacity(long /*int*/ numItems) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithCapacity_, numItems);
+public static NSMutableDictionary dictionaryWithCapacity(long numItems) {
+ long result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithCapacity_, numItems);
return result != 0 ? new NSMutableDictionary(result) : null;
}
-public NSMutableDictionary initWithCapacity(long /*int*/ numItems) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithCapacity_, numItems);
+public NSMutableDictionary initWithCapacity(long numItems) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithCapacity_, numItems);
return result == this.id ? this : (result != 0 ? new NSMutableDictionary(result) : null);
}
@@ -53,8 +53,8 @@ public void setValue(id value, NSString key) {
OS.objc_msgSend(this.id, OS.sel_setValue_forKey_, value != null ? value.id : 0, key != null ? key.id : 0);
}
-public static NSDictionary dictionaryWithObject(id object, id key) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithObject_forKey_, object != null ? object.id : 0, key != null ? key.id : 0);
+public static NSMutableDictionary dictionaryWithObject(id object, id key) {
+ long result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithObject_forKey_, object != null ? object.id : 0, key != null ? key.id : 0);
return result != 0 ? new NSMutableDictionary(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableIndexSet.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableIndexSet.java
index 6c3180310f..34faf09224 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableIndexSet.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableIndexSet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSMutableIndexSet() {
super();
}
-public NSMutableIndexSet(long /*int*/ id) {
+public NSMutableIndexSet(long id) {
super(id);
}
@@ -27,17 +27,8 @@ public NSMutableIndexSet(id id) {
super(id);
}
-public void addIndex(long /*int*/ value) {
+public void addIndex(long value) {
OS.objc_msgSend(this.id, OS.sel_addIndex_, value);
}
-public void removeIndex(long /*int*/ value) {
- OS.objc_msgSend(this.id, OS.sel_removeIndex_, value);
-}
-
-public static NSMutableIndexSet indexSetWithIndex(long /*int*/ value) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableIndexSet, OS.sel_indexSetWithIndex_, value);
- return result != 0 ? new NSMutableIndexSet(result) : null;
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java
index 3c83ea6a6d..000ce929af 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java
@@ -19,7 +19,7 @@ public NSMutableParagraphStyle() {
super();
}
-public NSMutableParagraphStyle(long /*int*/ id) {
+public NSMutableParagraphStyle(long id) {
super(id);
}
@@ -31,31 +31,31 @@ public void addTabStop(NSTextTab anObject) {
OS.objc_msgSend(this.id, OS.sel_addTabStop_, anObject != null ? anObject.id : 0);
}
-public void setAlignment(long /*int*/ alignment) {
+public void setAlignment(long alignment) {
OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment);
}
-public void setBaseWritingDirection(long /*int*/ baseWritingDirection) {
+public void setBaseWritingDirection(long baseWritingDirection) {
OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, baseWritingDirection);
}
-public void setDefaultTabInterval(double /*float*/ defaultTabInterval) {
+public void setDefaultTabInterval(double defaultTabInterval) {
OS.objc_msgSend(this.id, OS.sel_setDefaultTabInterval_, defaultTabInterval);
}
-public void setFirstLineHeadIndent(double /*float*/ firstLineHeadIndent) {
+public void setFirstLineHeadIndent(double firstLineHeadIndent) {
OS.objc_msgSend(this.id, OS.sel_setFirstLineHeadIndent_, firstLineHeadIndent);
}
-public void setHeadIndent(double /*float*/ headIndent) {
+public void setHeadIndent(double headIndent) {
OS.objc_msgSend(this.id, OS.sel_setHeadIndent_, headIndent);
}
-public void setLineBreakMode(long /*int*/ lineBreakMode) {
+public void setLineBreakMode(long lineBreakMode) {
OS.objc_msgSend(this.id, OS.sel_setLineBreakMode_, lineBreakMode);
}
-public void setLineSpacing(double /*float*/ lineSpacing) {
+public void setLineSpacing(double lineSpacing) {
OS.objc_msgSend(this.id, OS.sel_setLineSpacing_, lineSpacing);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableSet.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableSet.java
index 374ff0482f..beabfb3d97 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableSet.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableSet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSMutableSet() {
super();
}
-public NSMutableSet(long /*int*/ id) {
+public NSMutableSet(long id) {
super(id);
}
@@ -31,8 +31,8 @@ public void addObjectsFromArray(NSArray array) {
OS.objc_msgSend(this.id, OS.sel_addObjectsFromArray_, array != null ? array.id : 0);
}
-public static NSSet set() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableSet, OS.sel_set);
+public static NSMutableSet set() {
+ long result = OS.objc_msgSend(OS.class_NSMutableSet, OS.sel_set);
return result != 0 ? new NSMutableSet(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java
index 87ec1c3228..ceea3d5991 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java
@@ -19,7 +19,7 @@ public NSMutableString() {
super();
}
-public NSMutableString(long /*int*/ id) {
+public NSMutableString(long id) {
super(id);
}
@@ -39,19 +39,19 @@ public void setString(NSString aString) {
OS.objc_msgSend(this.id, OS.sel_setString_, aString != null ? aString.id : 0);
}
-public static NSString string() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_string);
- return result != 0 ? new NSString(result) : null;
+public static NSMutableString string() {
+ long result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_string);
+ return result != 0 ? new NSMutableString(result) : null;
}
-public static NSString stringWithCharacters(char[] characters, long /*int*/ length) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithCharacters_length_, characters, length);
+public static NSMutableString stringWithCharacters(char[] characters, long length) {
+ long result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithCharacters_length_, characters, length);
return result != 0 ? new NSMutableString(result) : null;
}
-public static NSString stringWithUTF8String(long /*int*/ nullTerminatedCString) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithUTF8String_, nullTerminatedCString);
- return result != 0 ? new NSString(result) : null;
+public static NSMutableString stringWithUTF8String(long nullTerminatedCString) {
+ long result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithUTF8String_, nullTerminatedCString);
+ return result != 0 ? new NSMutableString(result) : null;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java
index b9d9cc981f..81af307866 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSMutableURLRequest() {
super();
}
-public NSMutableURLRequest(long /*int*/ id) {
+public NSMutableURLRequest(long id) {
super(id);
}
@@ -27,7 +27,7 @@ public NSMutableURLRequest(id id) {
super(id);
}
-public void setCachePolicy(long /*int*/ cachePolicy) {
+public void setCachePolicy(long cachePolicy) {
OS.objc_msgSend(this.id, OS.sel_setCachePolicy_, cachePolicy);
}
@@ -47,8 +47,8 @@ public void setValue(NSString value, NSString field) {
OS.objc_msgSend(this.id, OS.sel_setValue_forHTTPHeaderField_, value != null ? value.id : 0, field != null ? field.id : 0);
}
-public static NSURLRequest requestWithURL(NSURL URL) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSMutableURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0);
+public static NSMutableURLRequest requestWithURL(NSURL URL) {
+ long result = OS.objc_msgSend(OS.class_NSMutableURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0);
return result != 0 ? new NSMutableURLRequest(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotification.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotification.java
index 15d0e350cf..90c679135b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotification.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotification.java
@@ -19,7 +19,7 @@ public NSNotification() {
super();
}
-public NSNotification(long /*int*/ id) {
+public NSNotification(long id) {
super(id);
}
@@ -28,12 +28,12 @@ public NSNotification(id id) {
}
public id object() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_object);
+ long result = OS.objc_msgSend(this.id, OS.sel_object);
return result != 0 ? new id(result) : null;
}
public NSDictionary userInfo() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_userInfo);
+ long result = OS.objc_msgSend(this.id, OS.sel_userInfo);
return result != 0 ? new NSDictionary(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java
index 5f62f797b9..fbc96d453d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSNotificationCenter() {
super();
}
-public NSNotificationCenter(long /*int*/ id) {
+public NSNotificationCenter(long id) {
super(id);
}
@@ -27,12 +27,12 @@ public NSNotificationCenter(id id) {
super(id);
}
-public void addObserver(id observer, long /*int*/ aSelector, NSString aName, id anObject) {
+public void addObserver(id observer, long aSelector, NSString aName, id anObject) {
OS.objc_msgSend(this.id, OS.sel_addObserver_selector_name_object_, observer != null ? observer.id : 0, aSelector, aName != null ? aName.id : 0, anObject != null ? anObject.id : 0);
}
public static NSNotificationCenter defaultCenter() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNotificationCenter, OS.sel_defaultCenter);
+ long result = OS.objc_msgSend(OS.class_NSNotificationCenter, OS.sel_defaultCenter);
return result != 0 ? new NSNotificationCenter(result) : null;
}
@@ -40,8 +40,4 @@ public void removeObserver(id observer) {
OS.objc_msgSend(this.id, OS.sel_removeObserver_, observer != null ? observer.id : 0);
}
-public void removeObserver(id observer, NSString aName, id anObject) {
- OS.objc_msgSend(this.id, OS.sel_removeObserver_name_object_, observer != null ? observer.id : 0, aName != null ? aName.id : 0, anObject != null ? anObject.id : 0);
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumber.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumber.java
index 771baf276d..7ea8b5cde6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumber.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumber.java
@@ -19,7 +19,7 @@ public NSNumber() {
super();
}
-public NSNumber(long /*int*/ id) {
+public NSNumber(long id) {
super(id);
}
@@ -40,50 +40,50 @@ public float floatValue() {
}
public int intValue() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_intValue);
+ return (int)OS.objc_msgSend(this.id, OS.sel_intValue);
}
-public long /*int*/ integerValue() {
+public long integerValue() {
return OS.objc_msgSend(this.id, OS.sel_integerValue);
}
public static NSNumber numberWithBool(boolean value) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithBool_, value);
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithBool_, value);
return result != 0 ? new NSNumber(result) : null;
}
public static NSNumber numberWithDouble(double value) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithDouble_, value);
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithDouble_, value);
return result != 0 ? new NSNumber(result) : null;
}
public static NSNumber numberWithInt(int value) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInt_, value);
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInt_, value);
return result != 0 ? new NSNumber(result) : null;
}
-public static NSNumber numberWithInteger(long /*int*/ value) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInteger_, value);
+public static NSNumber numberWithInteger(long value) {
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInteger_, value);
return result != 0 ? new NSNumber(result) : null;
}
public static NSValue valueWithPoint(NSPoint point) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithPoint_, point);
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithPoint_, point);
return result != 0 ? new NSValue(result) : null;
}
public static NSValue valueWithRange(NSRange range) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithRange_, range);
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithRange_, range);
return result != 0 ? new NSValue(result) : null;
}
public static NSValue valueWithRect(NSRect rect) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithRect_, rect);
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithRect_, rect);
return result != 0 ? new NSValue(result) : null;
}
public static NSValue valueWithSize(NSSize size) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithSize_, size);
+ long result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithSize_, size);
return result != 0 ? new NSValue(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumberFormatter.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumberFormatter.java
index 05922dedb4..5dc3e47453 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumberFormatter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNumberFormatter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSNumberFormatter() {
super();
}
-public NSNumberFormatter(long /*int*/ id) {
+public NSNumberFormatter(long id) {
super(id);
}
@@ -27,37 +27,11 @@ public NSNumberFormatter(id id) {
super(id);
}
-public boolean allowsFloats() {
- return OS.objc_msgSend_bool(this.id, OS.sel_allowsFloats);
-}
-
-public boolean alwaysShowsDecimalSeparator() {
- return OS.objc_msgSend_bool(this.id, OS.sel_alwaysShowsDecimalSeparator);
-}
-
public NSString decimalSeparator() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_decimalSeparator);
+ long result = OS.objc_msgSend(this.id, OS.sel_decimalSeparator);
return result != 0 ? new NSString(result) : null;
}
-public NSNumber maximum() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_maximum);
- return result != 0 ? new NSNumber(result) : null;
-}
-
-public long /*int*/ maximumFractionDigits() {
- return OS.objc_msgSend(this.id, OS.sel_maximumFractionDigits);
-}
-
-public long /*int*/ maximumIntegerDigits() {
- return OS.objc_msgSend(this.id, OS.sel_maximumIntegerDigits);
-}
-
-public NSNumber minimum() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_minimum);
- return result != 0 ? new NSNumber(result) : null;
-}
-
public void setAllowsFloats(boolean allowsFloats) {
OS.objc_msgSend(this.id, OS.sel_setAllowsFloats_, allowsFloats);
}
@@ -66,11 +40,11 @@ public void setMaximum(NSNumber maximum) {
OS.objc_msgSend(this.id, OS.sel_setMaximum_, maximum != null ? maximum.id : 0);
}
-public void setMaximumFractionDigits(long /*int*/ maximumFractionDigits) {
+public void setMaximumFractionDigits(long maximumFractionDigits) {
OS.objc_msgSend(this.id, OS.sel_setMaximumFractionDigits_, maximumFractionDigits);
}
-public void setMaximumIntegerDigits(long /*int*/ maximumIntegerDigits) {
+public void setMaximumIntegerDigits(long maximumIntegerDigits) {
OS.objc_msgSend(this.id, OS.sel_setMaximumIntegerDigits_, maximumIntegerDigits);
}
@@ -78,15 +52,15 @@ public void setMinimum(NSNumber minimum) {
OS.objc_msgSend(this.id, OS.sel_setMinimum_, minimum != null ? minimum.id : 0);
}
-public void setMinimumFractionDigits(long /*int*/ minimumFractionDigits) {
+public void setMinimumFractionDigits(long minimumFractionDigits) {
OS.objc_msgSend(this.id, OS.sel_setMinimumFractionDigits_, minimumFractionDigits);
}
-public void setMinimumIntegerDigits(long /*int*/ minimumIntegerDigits) {
+public void setMinimumIntegerDigits(long minimumIntegerDigits) {
OS.objc_msgSend(this.id, OS.sel_setMinimumIntegerDigits_, minimumIntegerDigits);
}
-public void setNumberStyle(long /*int*/ numberStyle) {
+public void setNumberStyle(long numberStyle) {
OS.objc_msgSend(this.id, OS.sel_setNumberStyle_, numberStyle);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
index 7753393915..daf9b32e3b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSObject() {
super();
}
-public NSObject(long /*int*/ id) {
+public NSObject(long id) {
super(id);
}
@@ -33,7 +33,7 @@ public NSObject alloc() {
}
public id accessibilityAttributeValue(NSString attribute, id parameter) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_accessibilityAttributeValue_forParameter_, attribute != null ? attribute.id : 0, parameter != null ? parameter.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_accessibilityAttributeValue_forParameter_, attribute != null ? attribute.id : 0, parameter != null ? parameter.id : 0);
return result != 0 ? new id(result) : null;
}
@@ -41,12 +41,12 @@ public boolean accessibilitySetOverrideValue(id value, NSString attribute) {
return OS.objc_msgSend_bool(this.id, OS.sel_accessibilitySetOverrideValue_forAttribute_, value != null ? value.id : 0, attribute != null ? attribute.id : 0);
}
-public void draggedImage(NSImage image, NSPoint screenPoint, long /*int*/ operation) {
+public void draggedImage(NSImage image, NSPoint screenPoint, long operation) {
OS.objc_msgSend(this.id, OS.sel_draggedImage_endedAt_operation_, image != null ? image.id : 0, screenPoint, operation);
}
public NSWindow draggingDestinationWindow() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_draggingDestinationWindow);
+ long result = OS.objc_msgSend(this.id, OS.sel_draggingDestinationWindow);
return result != 0 ? new NSWindow(result) : null;
}
@@ -57,11 +57,11 @@ public NSPoint draggingLocation() {
}
public NSPasteboard draggingPasteboard() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_draggingPasteboard);
+ long result = OS.objc_msgSend(this.id, OS.sel_draggingPasteboard);
return result != 0 ? new NSPasteboard(result) : null;
}
-public long /*int*/ draggingSourceOperationMask() {
+public long draggingSourceOperationMask() {
return OS.objc_msgSend(this.id, OS.sel_draggingSourceOperationMask);
}
@@ -69,14 +69,10 @@ public boolean outlineView(NSOutlineView outlineView, NSTableColumn tableColumn,
return OS.objc_msgSend_bool(this.id, OS.sel_outlineView_shouldEditTableColumn_item_, outlineView != null ? outlineView.id : 0, tableColumn != null ? tableColumn.id : 0, item != null ? item.id : 0);
}
-public boolean outlineView(NSOutlineView outlineView, long /*int*/ columnIndex, long /*int*/ newColumnIndex) {
+public boolean outlineView(NSOutlineView outlineView, long columnIndex, long newColumnIndex) {
return OS.objc_msgSend_bool(this.id, OS.sel_outlineView_shouldReorderColumn_toColumn_, outlineView != null ? outlineView.id : 0, columnIndex, newColumnIndex);
}
-public boolean outlineView(NSOutlineView outlineView, id item) {
- return OS.objc_msgSend_bool(this.id, OS.sel_outlineView_shouldSelectItem_, outlineView != null ? outlineView.id : 0, item != null ? item.id : 0);
-}
-
public boolean outlineView(NSOutlineView outlineView, NSCell cell, NSTableColumn tableColumn, id item) {
return OS.objc_msgSend_bool(this.id, OS.sel_outlineView_shouldTrackCell_forTableColumn_item_, outlineView != null ? outlineView.id : 0, cell != null ? cell.id : 0, tableColumn != null ? tableColumn.id : 0, item != null ? item.id : 0);
}
@@ -85,15 +81,11 @@ public boolean readSelectionFromPasteboard(NSPasteboard pboard) {
return OS.objc_msgSend_bool(this.id, OS.sel_readSelectionFromPasteboard_, pboard != null ? pboard.id : 0);
}
-public boolean tableView(NSTableView tableView, long /*int*/ columnIndex, long /*int*/ newColumnIndex) {
+public boolean tableView(NSTableView tableView, long columnIndex, long newColumnIndex) {
return OS.objc_msgSend_bool(this.id, OS.sel_tableView_shouldReorderColumn_toColumn_, tableView != null ? tableView.id : 0, columnIndex, newColumnIndex);
}
-public boolean tableView(NSTableView tableView, long /*int*/ row) {
- return OS.objc_msgSend_bool(this.id, OS.sel_tableView_shouldSelectRow_, tableView != null ? tableView.id : 0, row);
-}
-
-public boolean tableView(NSTableView tableView, NSCell cell, NSTableColumn tableColumn, long /*int*/ row) {
+public boolean tableView(NSTableView tableView, NSCell cell, NSTableColumn tableColumn, long row) {
return OS.objc_msgSend_bool(this.id, OS.sel_tableView_shouldTrackCell_forTableColumn_row_, tableView != null ? tableView.id : 0, cell != null ? cell.id : 0, tableColumn != null ? tableColumn.id : 0, row);
}
@@ -102,7 +94,7 @@ public boolean writeSelectionToPasteboard(NSPasteboard pboard, NSArray types) {
}
public NSObject autorelease() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_autorelease);
+ long result = OS.objc_msgSend(this.id, OS.sel_autorelease);
return result == this.id ? this : (result != 0 ? new NSObject(result) : null);
}
@@ -111,7 +103,7 @@ public void cancelAuthenticationChallenge(NSURLAuthenticationChallenge challenge
}
public NSString className() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_className);
+ long result = OS.objc_msgSend(this.id, OS.sel_className);
return result != 0 ? new NSString(result) : null;
}
@@ -120,17 +112,17 @@ public boolean conformsToProtocol(Protocol aProtocol) {
}
public id copy() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_copy);
+ long result = OS.objc_msgSend(this.id, OS.sel_copy);
return result != 0 ? new id(result) : null;
}
public NSString description() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_description);
+ long result = OS.objc_msgSend(this.id, OS.sel_description);
return result != 0 ? new NSString(result) : null;
}
public NSObject init() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_init);
+ long result = OS.objc_msgSend(this.id, OS.sel_init);
return result == this.id ? this : (result != 0 ? new NSObject(result) : null);
}
@@ -138,24 +130,20 @@ public boolean isEqual(id object) {
return OS.objc_msgSend_bool(this.id, OS.sel_isEqual_, object != null ? object.id : 0);
}
-public boolean isEqualTo(id object) {
- return OS.objc_msgSend_bool(this.id, OS.sel_isEqualTo_, object != null ? object.id : 0);
-}
-
-public boolean isKindOfClass(long /*int*/ aClass) {
+public boolean isKindOfClass(long aClass) {
return OS.objc_msgSend_bool(this.id, OS.sel_isKindOfClass_, aClass);
}
public id mutableCopy() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_mutableCopy);
+ long result = OS.objc_msgSend(this.id, OS.sel_mutableCopy);
return result != 0 ? new id(result) : null;
}
-public void performSelector(long /*int*/ aSelector, id anArgument, double delay, NSArray modes) {
+public void performSelector(long aSelector, id anArgument, double delay, NSArray modes) {
OS.objc_msgSend(this.id, OS.sel_performSelector_withObject_afterDelay_inModes_, aSelector, anArgument != null ? anArgument.id : 0, delay, modes != null ? modes.id : 0);
}
-public void performSelectorOnMainThread(long /*int*/ aSelector, id arg, boolean wait) {
+public void performSelectorOnMainThread(long aSelector, id arg, boolean wait) {
OS.objc_msgSend(this.id, OS.sel_performSelectorOnMainThread_withObject_waitUntilDone_, aSelector, arg != null ? arg.id : 0, wait);
}
@@ -163,16 +151,16 @@ public void release() {
OS.objc_msgSend(this.id, OS.sel_release);
}
-public boolean respondsToSelector(long /*int*/ aSelector) {
+public boolean respondsToSelector(long aSelector) {
return OS.objc_msgSend_bool(this.id, OS.sel_respondsToSelector_, aSelector);
}
public NSObject retain() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_retain);
+ long result = OS.objc_msgSend(this.id, OS.sel_retain);
return result == this.id ? this : (result != 0 ? new NSObject(result) : null);
}
-public long /*int*/ retainCount() {
+public long retainCount() {
return OS.objc_msgSend(this.id, OS.sel_retainCount);
}
@@ -180,7 +168,7 @@ public void setValue(id value, NSString key) {
OS.objc_msgSend(this.id, OS.sel_setValue_forKey_, value != null ? value.id : 0, key != null ? key.id : 0);
}
-public long /*int*/ superclass() {
+public long superclass() {
return OS.objc_msgSend(this.id, OS.sel_superclass);
}
@@ -189,7 +177,7 @@ public void useCredential(NSURLCredential credential, NSURLAuthenticationChallen
}
public id valueForKey(NSString key) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_valueForKey_, key != null ? key.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_valueForKey_, key != null ? key.id : 0);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java
index b7f2fec302..580f204ed1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSOpenGLContext() {
super();
}
-public NSOpenGLContext(long /*int*/ id) {
+public NSOpenGLContext(long id) {
super(id);
}
@@ -27,16 +27,12 @@ public NSOpenGLContext(id id) {
super(id);
}
-public static void clearCurrentContext() {
- OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_clearCurrentContext);
-}
-
public void clearDrawable() {
OS.objc_msgSend(this.id, OS.sel_clearDrawable);
}
public static NSOpenGLContext currentContext() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_currentContext);
+ long result = OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_currentContext);
return result != 0 ? new NSOpenGLContext(result) : null;
}
@@ -45,7 +41,7 @@ public void flushBuffer() {
}
public NSOpenGLContext initWithFormat(NSOpenGLPixelFormat format, NSOpenGLContext share) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFormat_shareContext_, format != null ? format.id : 0, share != null ? share.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithFormat_shareContext_, format != null ? format.id : 0, share != null ? share.id : 0);
return result == this.id ? this : (result != 0 ? new NSOpenGLContext(result) : null);
}
@@ -53,7 +49,7 @@ public void makeCurrentContext() {
OS.objc_msgSend(this.id, OS.sel_makeCurrentContext);
}
-public void setValues(int[] vals, long /*int*/ param) {
+public void setValues(int[] vals, long param) {
OS.objc_msgSend(this.id, OS.sel_setValues_forParameter_, vals, param);
}
@@ -66,7 +62,7 @@ public void update() {
}
public NSView view() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_view);
+ long result = OS.objc_msgSend(this.id, OS.sel_view);
return result != 0 ? new NSView(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLPixelFormat.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLPixelFormat.java
index eef6d3ebc1..da32ed233c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLPixelFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLPixelFormat.java
@@ -19,7 +19,7 @@ public NSOpenGLPixelFormat() {
super();
}
-public NSOpenGLPixelFormat(long /*int*/ id) {
+public NSOpenGLPixelFormat(long id) {
super(id);
}
@@ -27,12 +27,12 @@ public NSOpenGLPixelFormat(id id) {
super(id);
}
-public void getValues(long[] /*int[]*/ vals, int attrib, int screen) {
+public void getValues(long[] vals, int attrib, int screen) {
OS.objc_msgSend(this.id, OS.sel_getValues_forAttribute_forVirtualScreen_, vals, attrib, screen);
}
public NSOpenGLPixelFormat initWithAttributes(int[] attribs) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithAttributes_, attribs);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithAttributes_, attribs);
return result == this.id ? this : (result != 0 ? new NSOpenGLPixelFormat(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenPanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenPanel.java
index e5de0c5a40..2bc360f54a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenPanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenPanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSOpenPanel() {
super();
}
-public NSOpenPanel(long /*int*/ id) {
+public NSOpenPanel(long id) {
super(id);
}
@@ -28,15 +28,19 @@ public NSOpenPanel(id id) {
}
public NSArray filenames() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_filenames);
+ long result = OS.objc_msgSend(this.id, OS.sel_filenames);
return result != 0 ? new NSArray(result) : null;
}
public static NSOpenPanel openPanel() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_openPanel);
+ long result = OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_openPanel);
return result != 0 ? new NSOpenPanel(result) : null;
}
+public void setAccessoryViewDisclosed(boolean accessoryViewDisclosed) {
+ OS.objc_msgSend(this.id, OS.sel_setAccessoryViewDisclosed_, accessoryViewDisclosed);
+}
+
public void setAllowsMultipleSelection(boolean allowsMultipleSelection) {
OS.objc_msgSend(this.id, OS.sel_setAllowsMultipleSelection_, allowsMultipleSelection);
}
@@ -50,15 +54,15 @@ public void setCanChooseFiles(boolean canChooseFiles) {
}
public static NSSavePanel savePanel() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_savePanel);
+ long result = OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_savePanel);
return result != 0 ? new NSSavePanel(result) : null;
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSOpenPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_NSOpenPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COSERVERINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOperatingSystemVersion.java
index b900407fa6..6e30236790 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COSERVERINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOperatingSystemVersion.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,16 +9,16 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.ole.win32;
+package org.eclipse.swt.internal.cocoa;
-public class COSERVERINFO {
- public int dwReserved1;
- /** @field cast=(LPWSTR) */
- public long /*int*/ pwszName;
- /** @field cast=(COAUTHINFO *) */
- public long /*int*/ pAuthInfo;
- public int dwReserved2;
- public static final int sizeof = COM.COSERVERINFO_sizeof ();
+public class NSOperatingSystemVersion {
+ /** @field cast=(NSInteger) */
+ public long majorVersion;
+ /** @field cast=(NSInteger) */
+ public long minorVersion;
+ /** @field cast=(NSInteger) */
+ public long patchVersion;
+ public static final int sizeof = OS.NSOperatingSystemVersion_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java
index ca2c55bfdb..0f7290b4eb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSOutlineView() {
super();
}
-public NSOutlineView(long /*int*/ id) {
+public NSOutlineView(long id) {
super(id);
}
@@ -43,39 +43,34 @@ public void expandItem(id item, boolean expandChildren) {
OS.objc_msgSend(this.id, OS.sel_expandItem_expandChildren_, item != null ? item.id : 0, expandChildren);
}
-public NSRect frameOfOutlineCellAtRow(long /*int*/ row) {
+public NSRect frameOfOutlineCellAtRow(long row) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_frameOfOutlineCellAtRow_, row);
return result;
}
-public double /*float*/ indentationPerLevel() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_indentationPerLevel);
+public double indentationPerLevel() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_indentationPerLevel);
}
public boolean isItemExpanded(id item) {
return OS.objc_msgSend_bool(this.id, OS.sel_isItemExpanded_, item != null ? item.id : 0);
}
-public id itemAtRow(long /*int*/ row) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemAtRow_, row);
+public id itemAtRow(long row) {
+ long result = OS.objc_msgSend(this.id, OS.sel_itemAtRow_, row);
return result != 0 ? new id(result) : null;
}
-public long /*int*/ levelForItem(id item) {
+public long levelForItem(id item) {
return OS.objc_msgSend(this.id, OS.sel_levelForItem_, item != null ? item.id : 0);
}
-public NSTableColumn outlineTableColumn() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_outlineTableColumn);
- return result != 0 ? new NSTableColumn(result) : null;
-}
-
public void reloadItem(id item, boolean reloadChildren) {
OS.objc_msgSend(this.id, OS.sel_reloadItem_reloadChildren_, item != null ? item.id : 0, reloadChildren);
}
-public long /*int*/ rowForItem(id item) {
+public long rowForItem(id item) {
return OS.objc_msgSend(this.id, OS.sel_rowForItem_, item != null ? item.id : 0);
}
@@ -87,7 +82,7 @@ public void setAutosaveExpandedItems(boolean autosaveExpandedItems) {
OS.objc_msgSend(this.id, OS.sel_setAutosaveExpandedItems_, autosaveExpandedItems);
}
-public void setDropItem(id item, long /*int*/ index) {
+public void setDropItem(id item, long index) {
OS.objc_msgSend(this.id, OS.sel_setDropItem_dropChildIndex_, item != null ? item.id : 0, index);
}
@@ -95,11 +90,11 @@ public void setOutlineTableColumn(NSTableColumn outlineTableColumn) {
OS.objc_msgSend(this.id, OS.sel_setOutlineTableColumn_, outlineTableColumn != null ? outlineTableColumn.id : 0);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSOutlineView, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSOutlineView, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPanel.java
index e6ea65a2f9..cdc1782bc3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSPanel() {
super();
}
-public NSPanel(long /*int*/ id) {
+public NSPanel(long id) {
super(id);
}
@@ -39,15 +39,11 @@ public void setWorksWhenModal(boolean worksWhenModal) {
OS.objc_msgSend(this.id, OS.sel_setWorksWhenModal_, worksWhenModal);
}
-public boolean worksWhenModal() {
- return OS.objc_msgSend_bool(this.id, OS.sel_worksWhenModal);
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_NSPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
-}
-
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_NSPanel, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSParagraphStyle.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSParagraphStyle.java
index 3241413956..389830ae70 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSParagraphStyle.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSParagraphStyle.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSParagraphStyle() {
super();
}
-public NSParagraphStyle(long /*int*/ id) {
+public NSParagraphStyle(long id) {
super(id);
}
@@ -27,13 +27,8 @@ public NSParagraphStyle(id id) {
super(id);
}
-public long /*int*/ alignment() {
+public long alignment() {
return OS.objc_msgSend(this.id, OS.sel_alignment);
}
-public NSArray tabStops() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_tabStops);
- return result != 0 ? new NSArray(result) : null;
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java
index 2a1089e112..6102a7f482 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java
@@ -19,7 +19,7 @@ public NSPasteboard() {
super();
}
-public NSPasteboard(long /*int*/ id) {
+public NSPasteboard(long id) {
super(id);
}
@@ -27,36 +27,36 @@ public NSPasteboard(id id) {
super(id);
}
-public long /*int*/ addTypes(NSArray newTypes, id newOwner) {
+public long addTypes(NSArray newTypes, id newOwner) {
return OS.objc_msgSend(this.id, OS.sel_addTypes_owner_, newTypes != null ? newTypes.id : 0, newOwner != null ? newOwner.id : 0);
}
public NSString availableTypeFromArray(NSArray types) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_availableTypeFromArray_, types != null ? types.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_availableTypeFromArray_, types != null ? types.id : 0);
return result != 0 ? new NSString(result) : null;
}
public NSData dataForType(NSString dataType) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dataForType_, dataType != null ? dataType.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_dataForType_, dataType != null ? dataType.id : 0);
return result != 0 ? new NSData(result) : null;
}
-public long /*int*/ declareTypes(NSArray newTypes, id newOwner) {
+public long declareTypes(NSArray newTypes, id newOwner) {
return OS.objc_msgSend(this.id, OS.sel_declareTypes_owner_, newTypes != null ? newTypes.id : 0, newOwner != null ? newOwner.id : 0);
}
public static NSPasteboard generalPasteboard() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_generalPasteboard);
+ long result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_generalPasteboard);
return result != 0 ? new NSPasteboard(result) : null;
}
public static NSPasteboard pasteboardWithName(NSString name) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardWithName_, name != null ? name.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardWithName_, name != null ? name.id : 0);
return result != 0 ? new NSPasteboard(result) : null;
}
public id propertyListForType(NSString dataType) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_propertyListForType_, dataType != null ? dataType.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_propertyListForType_, dataType != null ? dataType.id : 0);
return result != 0 ? new id(result) : null;
}
@@ -73,12 +73,12 @@ public boolean setString(NSString string, NSString dataType) {
}
public NSString stringForType(NSString dataType) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringForType_, dataType != null ? dataType.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringForType_, dataType != null ? dataType.id : 0);
return result != 0 ? new NSString(result) : null;
}
public NSArray types() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_types);
+ long result = OS.objc_msgSend(this.id, OS.sel_types);
return result != 0 ? new NSArray(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPoint.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPoint.java
index def75627e6..3470dcf8a2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPoint.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPoint.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,14 +9,15 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
-
public class NSPoint {
- public double /*float*/ x;
- public double /*float*/ y;
+ /** @field cast=(CGFloat) */
+ public double x;
+ /** @field cast=(CGFloat) */
+ public double y;
public static final int sizeof = OS.NSPoint_sizeof();
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java
index eaf405a852..55db4987c0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java
@@ -19,7 +19,7 @@ public NSPopUpButton() {
super();
}
-public NSPopUpButton(long /*int*/ id) {
+public NSPopUpButton(long id) {
super(id);
}
@@ -27,31 +27,31 @@ public NSPopUpButton(id id) {
super(id);
}
-public long /*int*/ indexOfSelectedItem() {
+public long indexOfSelectedItem() {
return OS.objc_msgSend(this.id, OS.sel_indexOfSelectedItem);
}
public NSPopUpButton initWithFrame(NSRect buttonFrame, boolean flag) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_pullsDown_, buttonFrame, flag);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_pullsDown_, buttonFrame, flag);
return result == this.id ? this : (result != 0 ? new NSPopUpButton(result) : null);
}
-public NSMenuItem itemAtIndex(long /*int*/ index) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemAtIndex_, index);
+public NSMenuItem itemAtIndex(long index) {
+ long result = OS.objc_msgSend(this.id, OS.sel_itemAtIndex_, index);
return result != 0 ? new NSMenuItem(result) : null;
}
-public NSString itemTitleAtIndex(long /*int*/ index) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemTitleAtIndex_, index);
+public NSString itemTitleAtIndex(long index) {
+ long result = OS.objc_msgSend(this.id, OS.sel_itemTitleAtIndex_, index);
return result != 0 ? new NSString(result) : null;
}
public NSMenu menu() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_menu);
+ long result = OS.objc_msgSend(this.id, OS.sel_menu);
return result != 0 ? new NSMenu(result) : null;
}
-public long /*int*/ numberOfItems() {
+public long numberOfItems() {
return OS.objc_msgSend(this.id, OS.sel_numberOfItems);
}
@@ -59,7 +59,7 @@ public void removeAllItems() {
OS.objc_msgSend(this.id, OS.sel_removeAllItems);
}
-public void removeItemAtIndex(long /*int*/ index) {
+public void removeItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_removeItemAtIndex_, index);
}
@@ -67,7 +67,7 @@ public void selectItem(NSMenuItem item) {
OS.objc_msgSend(this.id, OS.sel_selectItem_, item != null ? item.id : 0);
}
-public void selectItemAtIndex(long /*int*/ index) {
+public void selectItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_selectItemAtIndex_, index);
}
@@ -80,15 +80,15 @@ public void setPullsDown(boolean pullsDown) {
}
public NSString titleOfSelectedItem() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_titleOfSelectedItem);
+ long result = OS.objc_msgSend(this.id, OS.sel_titleOfSelectedItem);
return result != 0 ? new NSString(result) : null;
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSPopUpButton, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSPopUpButton, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java
index 9855305a31..2ddc7e1c03 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSPrintInfo() {
super();
}
-public NSPrintInfo(long /*int*/ id) {
+public NSPrintInfo(long id) {
super(id);
}
@@ -27,21 +27,21 @@ public NSPrintInfo(id id) {
super(id);
}
-public long /*int*/ PMPrintSession() {
+public long PMPrintSession() {
return OS.objc_msgSend(this.id, OS.sel_PMPrintSession);
}
-public long /*int*/ PMPrintSettings() {
+public long PMPrintSettings() {
return OS.objc_msgSend(this.id, OS.sel_PMPrintSettings);
}
public static NSPrinter defaultPrinter() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_defaultPrinter);
+ long result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_defaultPrinter);
return result != 0 ? new NSPrinter(result) : null;
}
public NSMutableDictionary dictionary() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dictionary);
+ long result = OS.objc_msgSend(this.id, OS.sel_dictionary);
return result != 0 ? new NSMutableDictionary(result) : null;
}
@@ -51,17 +51,12 @@ public NSRect imageablePageBounds() {
return result;
}
-public NSPrintInfo initWithDictionary(NSDictionary attributes) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithDictionary_, attributes != null ? attributes.id : 0);
- return result == this.id ? this : (result != 0 ? new NSPrintInfo(result) : null);
-}
-
public boolean isSelectionOnly() {
return OS.objc_msgSend_bool(this.id, OS.sel_isSelectionOnly);
}
public NSString jobDisposition() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_jobDisposition);
+ long result = OS.objc_msgSend(this.id, OS.sel_jobDisposition);
return result != 0 ? new NSString(result) : null;
}
@@ -71,13 +66,8 @@ public NSSize paperSize() {
return result;
}
-public NSMutableDictionary printSettings() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_printSettings);
- return result != 0 ? new NSMutableDictionary(result) : null;
-}
-
public NSPrinter printer() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_printer);
+ long result = OS.objc_msgSend(this.id, OS.sel_printer);
return result != 0 ? new NSPrinter(result) : null;
}
@@ -98,7 +88,7 @@ public void setUpPrintOperationDefaultValues() {
}
public static NSPrintInfo sharedPrintInfo() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_sharedPrintInfo);
+ long result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_sharedPrintInfo);
return result != 0 ? new NSPrintInfo(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintOperation.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintOperation.java
index 6dd8e4ca36..12ba5ddb8b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintOperation.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintOperation.java
@@ -19,7 +19,7 @@ public NSPrintOperation() {
super();
}
-public NSPrintOperation(long /*int*/ id) {
+public NSPrintOperation(long id) {
super(id);
}
@@ -32,12 +32,12 @@ public void cleanUpOperation() {
}
public NSGraphicsContext context() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_context);
+ long result = OS.objc_msgSend(this.id, OS.sel_context);
return result != 0 ? new NSGraphicsContext(result) : null;
}
public NSGraphicsContext createContext() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_createContext);
+ long result = OS.objc_msgSend(this.id, OS.sel_createContext);
return result != 0 ? new NSGraphicsContext(result) : null;
}
@@ -50,7 +50,7 @@ public void destroyContext() {
}
public static NSPrintOperation printOperationWithView(NSView view, NSPrintInfo printInfo) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_printOperationWithView_printInfo_, view != null ? view.id : 0, printInfo != null ? printInfo.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_printOperationWithView_printInfo_, view != null ? view.id : 0, printInfo != null ? printInfo.id : 0);
return result != 0 ? new NSPrintOperation(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintPanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintPanel.java
index 4a2f01566c..b29199fd1c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintPanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintPanel.java
@@ -19,7 +19,7 @@ public NSPrintPanel() {
super();
}
-public NSPrintPanel(long /*int*/ id) {
+public NSPrintPanel(long id) {
super(id);
}
@@ -27,24 +27,24 @@ public NSPrintPanel(id id) {
super(id);
}
-public void beginSheetWithPrintInfo(NSPrintInfo printInfo, NSWindow docWindow, id delegate, long /*int*/ didEndSelector, long /*int*/ contextInfo) {
+public void beginSheetWithPrintInfo(NSPrintInfo printInfo, NSWindow docWindow, id delegate, long didEndSelector, long contextInfo) {
OS.objc_msgSend(this.id, OS.sel_beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_, printInfo != null ? printInfo.id : 0, docWindow != null ? docWindow.id : 0, delegate != null ? delegate.id : 0, didEndSelector, contextInfo);
}
-public long /*int*/ options() {
+public long options() {
return OS.objc_msgSend(this.id, OS.sel_options);
}
public static NSPrintPanel printPanel() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPrintPanel, OS.sel_printPanel);
+ long result = OS.objc_msgSend(OS.class_NSPrintPanel, OS.sel_printPanel);
return result != 0 ? new NSPrintPanel(result) : null;
}
-public long /*int*/ runModalWithPrintInfo(NSPrintInfo printInfo) {
+public long runModalWithPrintInfo(NSPrintInfo printInfo) {
return OS.objc_msgSend(this.id, OS.sel_runModalWithPrintInfo_, printInfo != null ? printInfo.id : 0);
}
-public void setOptions(long /*int*/ options) {
+public void setOptions(long options) {
OS.objc_msgSend(this.id, OS.sel_setOptions_, options);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrinter.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrinter.java
index 1b19f41e53..84b1be7b18 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrinter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrinter.java
@@ -19,7 +19,7 @@ public NSPrinter() {
super();
}
-public NSPrinter(long /*int*/ id) {
+public NSPrinter(long id) {
super(id);
}
@@ -28,17 +28,17 @@ public NSPrinter(id id) {
}
public NSString name() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_name);
+ long result = OS.objc_msgSend(this.id, OS.sel_name);
return result != 0 ? new NSString(result) : null;
}
public static NSArray printerNames() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerNames);
+ long result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerNames);
return result != 0 ? new NSArray(result) : null;
}
public static NSPrinter printerWithName(NSString name) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerWithName_, name != null ? name.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerWithName_, name != null ? name.id : 0);
return result != 0 ? new NSPrinter(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBrowserCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProcessInfo.java
index f6f4b55590..70c58d8f0d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBrowserCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProcessInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,27 +13,29 @@
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
-public class NSBrowserCell extends NSCell {
+public class NSProcessInfo extends NSObject {
-public NSBrowserCell() {
+public NSProcessInfo() {
super();
}
-public NSBrowserCell(long /*int*/ id) {
+public NSProcessInfo(long id) {
super(id);
}
-public NSBrowserCell(id id) {
+public NSProcessInfo(id id) {
super(id);
}
-public NSColor highlightColorInView(NSView controlView) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_highlightColorInView_, controlView != null ? controlView.id : 0);
- return result != 0 ? new NSColor(result) : null;
+public NSOperatingSystemVersion operatingSystemVersion() {
+ NSOperatingSystemVersion result = new NSOperatingSystemVersion();
+ OS.objc_msgSend_stret(result, this.id, OS.sel_operatingSystemVersion);
+ return result;
}
-public void setLeaf(boolean leaf) {
- OS.objc_msgSend(this.id, OS.sel_setLeaf_, leaf);
+public static NSProcessInfo processInfo() {
+ long result = OS.objc_msgSend(OS.class_NSProcessInfo, OS.sel_processInfo);
+ return result != 0 ? new NSProcessInfo(result) : null;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProgressIndicator.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProgressIndicator.java
index 6e53b40231..3397ada72d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProgressIndicator.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSProgressIndicator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSProgressIndicator() {
super();
}
-public NSProgressIndicator(long /*int*/ id) {
+public NSProgressIndicator(long id) {
super(id);
}
@@ -27,10 +27,6 @@ public NSProgressIndicator(id id) {
super(id);
}
-public long /*int*/ controlSize() {
- return OS.objc_msgSend(this.id, OS.sel_controlSize);
-}
-
public double doubleValue() {
return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue);
}
@@ -43,7 +39,7 @@ public double minValue() {
return OS.objc_msgSend_fpret(this.id, OS.sel_minValue);
}
-public void setControlSize(long /*int*/ controlSize) {
+public void setControlSize(long controlSize) {
OS.objc_msgSend(this.id, OS.sel_setControlSize_, controlSize);
}
@@ -67,16 +63,8 @@ public void setUsesThreadedAnimation(boolean usesThreadedAnimation) {
OS.objc_msgSend(this.id, OS.sel_setUsesThreadedAnimation_, usesThreadedAnimation);
}
-public void sizeToFit() {
- OS.objc_msgSend(this.id, OS.sel_sizeToFit);
-}
-
public void startAnimation(id sender) {
OS.objc_msgSend(this.id, OS.sel_startAnimation_, sender != null ? sender.id : 0);
}
-public void stopAnimation(id sender) {
- OS.objc_msgSend(this.id, OS.sel_stopAnimation_, sender != null ? sender.id : 0);
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRange.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRange.java
index 84f8f1ac1a..511b9d8874 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRange.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRange.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,12 +9,14 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
public class NSRange {
- public long /*int*/ location;
- public long /*int*/ length;
- public static int sizeof = OS.NSRange_sizeof();
+ /** @field cast=(NSUInteger) */
+ public long location;
+ /** @field cast=(NSUInteger) */
+ public long length;
+ public static final int sizeof = OS.NSRange_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRect.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRect.java
index b44d4e51ad..495ff39c44 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRect.java
@@ -16,13 +16,13 @@ package org.eclipse.swt.internal.cocoa;
public class NSRect {
/** @field accessor=origin.x */
- public double /*float*/ x;
+ public double x;
/** @field accessor=origin.y */
- public double /*float*/ y;
+ public double y;
/** @field accessor=size.width */
- public double /*float*/ width;
+ public double width;
/** @field accessor=size.height */
- public double /*float*/ height;
+ public double height;
public static final int sizeof = OS.NSRect_sizeof();
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java
index 5eeb9af4de..2a215b825a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSResponder() {
super();
}
-public NSResponder(long /*int*/ id) {
+public NSResponder(long id) {
super(id);
}
@@ -35,10 +35,6 @@ public boolean becomeFirstResponder() {
return OS.objc_msgSend_bool(this.id, OS.sel_becomeFirstResponder);
}
-public void beginGestureWithEvent(NSEvent event) {
- OS.objc_msgSend(this.id, OS.sel_beginGestureWithEvent_, event != null ? event.id : 0);
-}
-
public void cancelOperation(id sender) {
OS.objc_msgSend(this.id, OS.sel_cancelOperation_, sender != null ? sender.id : 0);
}
@@ -47,14 +43,10 @@ public void cursorUpdate(NSEvent event) {
OS.objc_msgSend(this.id, OS.sel_cursorUpdate_, event != null ? event.id : 0);
}
-public void doCommandBySelector(long /*int*/ aSelector) {
+public void doCommandBySelector(long aSelector) {
OS.objc_msgSend(this.id, OS.sel_doCommandBySelector_, aSelector);
}
-public void endGestureWithEvent(NSEvent event) {
- OS.objc_msgSend(this.id, OS.sel_endGestureWithEvent_, event != null ? event.id : 0);
-}
-
public void flagsChanged(NSEvent theEvent) {
OS.objc_msgSend(this.id, OS.sel_flagsChanged_, theEvent != null ? theEvent.id : 0);
}
@@ -63,10 +55,6 @@ public void helpRequested(NSEvent eventPtr) {
OS.objc_msgSend(this.id, OS.sel_helpRequested_, eventPtr != null ? eventPtr.id : 0);
}
-public void insertText(id insertString) {
- OS.objc_msgSend(this.id, OS.sel_insertText_, insertString != null ? insertString.id : 0);
-}
-
public void interpretKeyEvents(NSArray eventArray) {
OS.objc_msgSend(this.id, OS.sel_interpretKeyEvents_, eventArray != null ? eventArray.id : 0);
}
@@ -107,19 +95,7 @@ public void mouseUp(NSEvent theEvent) {
OS.objc_msgSend(this.id, OS.sel_mouseUp_, theEvent != null ? theEvent.id : 0);
}
-public void moveToBeginningOfParagraph(id sender) {
- OS.objc_msgSend(this.id, OS.sel_moveToBeginningOfParagraph_, sender != null ? sender.id : 0);
-}
-
-public void moveToEndOfParagraph(id sender) {
- OS.objc_msgSend(this.id, OS.sel_moveToEndOfParagraph_, sender != null ? sender.id : 0);
-}
-
-public void moveUp(id sender) {
- OS.objc_msgSend(this.id, OS.sel_moveUp_, sender != null ? sender.id : 0);
-}
-
-public void noResponderFor(long /*int*/ eventSelector) {
+public void noResponderFor(long eventSelector) {
OS.objc_msgSend(this.id, OS.sel_noResponderFor_, eventSelector);
}
@@ -192,12 +168,12 @@ public void touchesMovedWithEvent(NSEvent event) {
}
public NSUndoManager undoManager() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_undoManager);
+ long result = OS.objc_msgSend(this.id, OS.sel_undoManager);
return result != 0 ? new NSUndoManager(result) : null;
}
public id validRequestorForSendType(NSString sendType, NSString returnType) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_returnType_, sendType != null ? sendType.id : 0, returnType != null ? returnType.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_returnType_, sendType != null ? sendType.id : 0, returnType != null ? returnType.id : 0);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunLoop.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunLoop.java
index d9bb60d2a4..0e4f529f0c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunLoop.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunLoop.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSRunLoop() {
super();
}
-public NSRunLoop(long /*int*/ id) {
+public NSRunLoop(long id) {
super(id);
}
@@ -32,12 +32,7 @@ public void addTimer(NSTimer timer, NSString mode) {
}
public static NSRunLoop currentRunLoop() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSRunLoop, OS.sel_currentRunLoop);
- return result != 0 ? new NSRunLoop(result) : null;
-}
-
-public static NSRunLoop mainRunLoop() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSRunLoop, OS.sel_mainRunLoop);
+ long result = OS.objc_msgSend(OS.class_NSRunLoop, OS.sel_currentRunLoop);
return result != 0 ? new NSRunLoop(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunningApplication.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunningApplication.java
deleted file mode 100644
index 89f8126c1d..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSRunningApplication.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.cocoa;
-
-public class NSRunningApplication extends NSObject {
-
-public NSRunningApplication() {
- super();
-}
-
-public NSRunningApplication(long /*int*/ id) {
- super(id);
-}
-
-public NSRunningApplication(id id) {
- super(id);
-}
-
-public boolean activateWithOptions(long /*int*/ options) {
- return OS.objc_msgSend_bool(this.id, OS.sel_activateWithOptions_, options);
-}
-
-public static NSRunningApplication currentApplication() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSRunningApplication, OS.sel_currentApplication);
- return result != 0 ? new NSRunningApplication(result) : null;
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSavePanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSavePanel.java
index 9ac925bd2a..8df3efdbd9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSavePanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSavePanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSSavePanel() {
super();
}
-public NSSavePanel(long /*int*/ id) {
+public NSSavePanel(long id) {
super(id);
}
@@ -28,20 +28,25 @@ public NSSavePanel(id id) {
}
public NSString filename() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_filename);
+ long result = OS.objc_msgSend(this.id, OS.sel_filename);
return result != 0 ? new NSString(result) : null;
}
-public long /*int*/ runModal() {
+public NSString nameFieldStringValue() {
+ long result = OS.objc_msgSend(this.id, OS.sel_nameFieldStringValue);
+ return result != 0 ? new NSString(result) : null;
+}
+
+public long runModal() {
return OS.objc_msgSend(this.id, OS.sel_runModal);
}
-public long /*int*/ runModalForDirectory(NSString path, NSString name) {
+public long runModalForDirectory(NSString path, NSString name) {
return OS.objc_msgSend(this.id, OS.sel_runModalForDirectory_file_, path != null ? path.id : 0, name != null ? name.id : 0);
}
public static NSSavePanel savePanel() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSSavePanel, OS.sel_savePanel);
+ long result = OS.objc_msgSend(OS.class_NSSavePanel, OS.sel_savePanel);
return result != 0 ? new NSSavePanel(result) : null;
}
@@ -89,11 +94,11 @@ public void validateVisibleColumns() {
OS.objc_msgSend(this.id, OS.sel_validateVisibleColumns);
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSSavePanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_NSSavePanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_NSSavePanel, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java
index e2fafff4dd..c6a80c67ca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSScreen() {
super();
}
-public NSScreen(long /*int*/ id) {
+public NSScreen(long id) {
super(id);
}
@@ -27,16 +27,16 @@ public NSScreen(id id) {
super(id);
}
-public double /*float*/ backingScaleFactor() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_backingScaleFactor);
+public double backingScaleFactor() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_backingScaleFactor);
}
public int depth() {
- return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_depth);
+ return (int)OS.objc_msgSend(this.id, OS.sel_depth);
}
public NSDictionary deviceDescription() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_deviceDescription);
+ long result = OS.objc_msgSend(this.id, OS.sel_deviceDescription);
return result != 0 ? new NSDictionary(result) : null;
}
@@ -47,12 +47,12 @@ public NSRect frame() {
}
public static NSScreen mainScreen() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_mainScreen);
+ long result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_mainScreen);
return result != 0 ? new NSScreen(result) : null;
}
public static NSArray screens() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_screens);
+ long result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_screens);
return result != 0 ? new NSArray(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScrollView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScrollView.java
index 3e555c3efe..ed930af62b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScrollView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScrollView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSScrollView() {
super();
}
-public NSScrollView(long /*int*/ id) {
+public NSScrollView(long id) {
super(id);
}
@@ -33,19 +33,19 @@ public NSSize contentSize() {
return result;
}
-public static NSSize contentSizeForFrameSize(NSSize fSize, boolean hFlag, boolean vFlag, long /*int*/ aType) {
+public static NSSize contentSizeForFrameSize(NSSize fSize, boolean hFlag, boolean vFlag, long aType) {
NSSize result = new NSSize();
OS.objc_msgSend_stret(result, OS.class_NSScrollView, OS.sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_, fSize, hFlag, vFlag, aType);
return result;
}
public NSClipView contentView() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_contentView);
+ long result = OS.objc_msgSend(this.id, OS.sel_contentView);
return result != 0 ? new NSClipView(result) : null;
}
public NSView documentView() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_documentView);
+ long result = OS.objc_msgSend(this.id, OS.sel_documentView);
return result != 0 ? new NSView(result) : null;
}
@@ -55,21 +55,35 @@ public NSRect documentVisibleRect() {
return result;
}
-public static NSSize frameSizeForContentSize(NSSize cSize, boolean hFlag, boolean vFlag, long /*int*/ aType) {
+public void flashScrollers() {
+ OS.objc_msgSend(this.id, OS.sel_flashScrollers);
+}
+
+public static NSSize frameSizeForContentSize(NSSize cSize, boolean hFlag, boolean vFlag, long aType) {
NSSize result = new NSSize();
OS.objc_msgSend_stret(result, OS.class_NSScrollView, OS.sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_, cSize, hFlag, vFlag, aType);
return result;
}
+public static NSSize frameSizeForContentSize(NSSize cSize, long horizontalScrollerClass, long verticalScrollerClass, long aType, long controlSize, long scrollerStyle) {
+ NSSize result = new NSSize();
+ OS.objc_msgSend_stret(result, OS.class_NSScrollView, OS.sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_, cSize, horizontalScrollerClass, verticalScrollerClass, aType, controlSize, scrollerStyle);
+ return result;
+}
+
public void reflectScrolledClipView(NSClipView cView) {
OS.objc_msgSend(this.id, OS.sel_reflectScrolledClipView_, cView != null ? cView.id : 0);
}
+public long scrollerStyle() {
+ return OS.objc_msgSend(this.id, OS.sel_scrollerStyle);
+}
+
public void setAutohidesScrollers(boolean autohidesScrollers) {
OS.objc_msgSend(this.id, OS.sel_setAutohidesScrollers_, autohidesScrollers);
}
-public void setBorderType(long /*int*/ borderType) {
+public void setBorderType(long borderType) {
OS.objc_msgSend(this.id, OS.sel_setBorderType_, borderType);
}
@@ -93,7 +107,7 @@ public void setHorizontalScroller(NSScroller horizontalScroller) {
OS.objc_msgSend(this.id, OS.sel_setHorizontalScroller_, horizontalScroller != null ? horizontalScroller.id : 0);
}
-public void setVerticalScrollElasticity(long /*int*/ verticalScrollElasticity) {
+public void setVerticalScrollElasticity(long verticalScrollElasticity) {
OS.objc_msgSend(this.id, OS.sel_setVerticalScrollElasticity_, verticalScrollElasticity);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java
index 81494a6431..d002163a1d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSScroller() {
super();
}
-public NSScroller(long /*int*/ id) {
+public NSScroller(long id) {
super(id);
}
@@ -27,49 +27,49 @@ public NSScroller(id id) {
super(id);
}
-public long /*int*/ controlSize() {
+public long controlSize() {
return OS.objc_msgSend(this.id, OS.sel_controlSize);
}
-public long /*int*/ hitPart() {
+public long hitPart() {
return OS.objc_msgSend(this.id, OS.sel_hitPart);
}
-public double /*float*/ knobProportion() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_knobProportion);
+public static boolean isCompatibleWithOverlayScrollers() {
+ return OS.objc_msgSend_bool(OS.class_NSScroller, OS.sel_isCompatibleWithOverlayScrollers);
}
-public NSRect rectForPart(long /*int*/ partCode) {
+public double knobProportion() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_knobProportion);
+}
+
+public NSRect rectForPart(long partCode) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_rectForPart_, partCode);
return result;
}
-public static double /*float*/ scrollerWidth() {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSScroller, OS.sel_scrollerWidth);
-}
-
-public static double /*float*/ scrollerWidthForControlSize(long /*int*/ controlSize) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSScroller, OS.sel_scrollerWidthForControlSize_, controlSize);
+public static double scrollerWidthForControlSize(long controlSize) {
+ return OS.objc_msgSend_fpret(OS.class_NSScroller, OS.sel_scrollerWidthForControlSize_, controlSize);
}
-public void setControlSize(long /*int*/ controlSize) {
+public void setControlSize(long controlSize) {
OS.objc_msgSend(this.id, OS.sel_setControlSize_, controlSize);
}
-public void setKnobProportion(double /*float*/ proportion) {
+public void setKnobProportion(double proportion) {
OS.objc_msgSend(this.id, OS.sel_setKnobProportion_, proportion);
}
-public long /*int*/ testPart(NSPoint thePoint) {
+public long testPart(NSPoint thePoint) {
return OS.objc_msgSend(this.id, OS.sel_testPart_, thePoint);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSScroller, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSScroller, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java
index ca513bda34..cc74637188 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java
@@ -19,7 +19,7 @@ public NSSearchField() {
super();
}
-public NSSearchField(long /*int*/ id) {
+public NSSearchField(long id) {
super(id);
}
@@ -28,15 +28,15 @@ public NSSearchField(id id) {
}
public NSArray recentSearches() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_recentSearches);
+ long result = OS.objc_msgSend(this.id, OS.sel_recentSearches);
return result != 0 ? new NSArray(result) : null;
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSSearchField, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSSearchField, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchFieldCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchFieldCell.java
index 3f91d57469..69e9151e4e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchFieldCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchFieldCell.java
@@ -19,7 +19,7 @@ public NSSearchFieldCell() {
super();
}
-public NSSearchFieldCell(long /*int*/ id) {
+public NSSearchFieldCell(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSSearchFieldCell(id id) {
}
public NSButtonCell cancelButtonCell() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_cancelButtonCell);
+ long result = OS.objc_msgSend(this.id, OS.sel_cancelButtonCell);
return result != 0 ? new NSButtonCell(result) : null;
}
@@ -39,7 +39,7 @@ public NSRect cancelButtonRectForBounds(NSRect rect) {
}
public NSButtonCell searchButtonCell() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_searchButtonCell);
+ long result = OS.objc_msgSend(this.id, OS.sel_searchButtonCell);
return result != 0 ? new NSButtonCell(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java
index a9ec3d02c0..271c86cd6b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java
@@ -19,7 +19,7 @@ public NSSecureTextField() {
super();
}
-public NSSecureTextField(long /*int*/ id) {
+public NSSecureTextField(long id) {
super(id);
}
@@ -27,11 +27,11 @@ public NSSecureTextField(id id) {
super(id);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSSecureTextField, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSSecureTextField, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSegmentedCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSegmentedCell.java
deleted file mode 100644
index ce5f17632f..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSegmentedCell.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.cocoa;
-
-public class NSSegmentedCell extends NSActionCell {
-
-public NSSegmentedCell() {
- super();
-}
-
-public NSSegmentedCell(long /*int*/ id) {
- super(id);
-}
-
-public NSSegmentedCell(id id) {
- super(id);
-}
-
-public void setEnabled(boolean enabled, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setEnabled_forSegment_, enabled, segment);
-}
-
-public void setImage(NSImage image, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setImage_forSegment_, image != null ? image.id : 0, segment);
-}
-
-public void setLabel(NSString label, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setLabel_forSegment_, label != null ? label.id : 0, segment);
-}
-
-public void setMenu(NSMenu menu, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setMenu_forSegment_, menu != null ? menu.id : 0, segment);
-}
-
-public void setSegmentCount(long /*int*/ segmentCount) {
- OS.objc_msgSend(this.id, OS.sel_setSegmentCount_, segmentCount);
-}
-
-public void setSegmentStyle(long /*int*/ segmentStyle) {
- OS.objc_msgSend(this.id, OS.sel_setSegmentStyle_, segmentStyle);
-}
-
-public void setSelected(boolean selected, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setSelected_forSegment_, selected, segment);
-}
-
-public void setSelectedSegment(long /*int*/ selectedSegment) {
- OS.objc_msgSend(this.id, OS.sel_setSelectedSegment_, selectedSegment);
-}
-
-public void setTag(long /*int*/ tag, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setTag_forSegment_, tag, segment);
-}
-
-public void setToolTip(NSString toolTip, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setToolTip_forSegment_, toolTip != null ? toolTip.id : 0, segment);
-}
-
-public void setTrackingMode(long /*int*/ trackingMode) {
- OS.objc_msgSend(this.id, OS.sel_setTrackingMode_, trackingMode);
-}
-
-public void setWidth(double /*float*/ width, long /*int*/ segment) {
- OS.objc_msgSend(this.id, OS.sel_setWidth_forSegment_, width, segment);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java
index e233b15315..ec578dd2d6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java
@@ -19,7 +19,7 @@ public NSSet() {
super();
}
-public NSSet(long /*int*/ id) {
+public NSSet(long id) {
super(id);
}
@@ -28,21 +28,21 @@ public NSSet(id id) {
}
public NSArray allObjects() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_allObjects);
+ long result = OS.objc_msgSend(this.id, OS.sel_allObjects);
return result != 0 ? new NSArray(result) : null;
}
-public long /*int*/ count() {
+public long count() {
return OS.objc_msgSend(this.id, OS.sel_count);
}
public NSEnumerator objectEnumerator() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator);
+ long result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator);
return result != 0 ? new NSEnumerator(result) : null;
}
public static NSSet set() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSSet, OS.sel_set);
+ long result = OS.objc_msgSend(OS.class_NSSet, OS.sel_set);
return result != 0 ? new NSSet(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSize.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSize.java
index 4befead30f..8b3ced44d5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSize.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSize.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,15 +9,15 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
-
package org.eclipse.swt.internal.cocoa;
-
public class NSSize {
- public double /*float*/ width;
- public double /*float*/ height;
+ /** @field cast=(CGFloat) */
+ public double width;
+ /** @field cast=(CGFloat) */
+ public double height;
public static final int sizeof = OS.NSSize_sizeof();
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java
index 805e1b65f8..4dd554b90e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSSlider() {
super();
}
-public NSSlider(long /*int*/ id) {
+public NSSlider(long id) {
super(id);
}
@@ -27,8 +27,8 @@ public NSSlider(id id) {
super(id);
}
-public double /*float*/ knobThickness() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_knobThickness);
+public double knobThickness() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_knobThickness);
}
public double maxValue() {
@@ -47,11 +47,11 @@ public void setMinValue(double minValue) {
OS.objc_msgSend(this.id, OS.sel_setMinValue_, minValue);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSSlider, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSSlider, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java
index b54ea44084..5c3d40ed22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSStatusBar() {
super();
}
-public NSStatusBar(long /*int*/ id) {
+public NSStatusBar(long id) {
super(id);
}
@@ -31,18 +31,18 @@ public void removeStatusItem(NSStatusItem item) {
OS.objc_msgSend(this.id, OS.sel_removeStatusItem_, item != null ? item.id : 0);
}
-public NSStatusItem statusItemWithLength(double /*float*/ length) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_statusItemWithLength_, length);
+public NSStatusItem statusItemWithLength(double length) {
+ long result = OS.objc_msgSend(this.id, OS.sel_statusItemWithLength_, length);
return result != 0 ? new NSStatusItem(result) : null;
}
public static NSStatusBar systemStatusBar() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSStatusBar, OS.sel_systemStatusBar);
+ long result = OS.objc_msgSend(OS.class_NSStatusBar, OS.sel_systemStatusBar);
return result != 0 ? new NSStatusBar(result) : null;
}
-public double /*float*/ thickness() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_thickness);
+public double thickness() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_thickness);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusItem.java
index fad04a20e9..ad4379074c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusItem.java
@@ -19,7 +19,7 @@ public NSStatusItem() {
super();
}
-public NSStatusItem(long /*int*/ id) {
+public NSStatusItem(long id) {
super(id);
}
@@ -39,7 +39,7 @@ public void setHighlightMode(boolean highlightMode) {
OS.objc_msgSend(this.id, OS.sel_setHighlightMode_, highlightMode);
}
-public void setLength(double /*float*/ length) {
+public void setLength(double length) {
OS.objc_msgSend(this.id, OS.sel_setLength_, length);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java
index 60ef9fbb40..1cf28e08bf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java
@@ -19,7 +19,7 @@ public NSStepper() {
super();
}
-public NSStepper(long /*int*/ id) {
+public NSStepper(long id) {
super(id);
}
@@ -55,11 +55,11 @@ public void setValueWraps(boolean valueWraps) {
OS.objc_msgSend(this.id, OS.sel_setValueWraps_, valueWraps);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSStepper, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSStepper, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java
index 3c43d86c29..d7b8aaf78c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java
@@ -19,7 +19,7 @@ public NSString() {
super();
}
-public NSString(long /*int*/ id) {
+public NSString(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSString(id id) {
}
public String getString() {
- char[] buffer = new char[(int)/*64*/length()];
+ char[] buffer = new char[(int)length()];
getCharacters(buffer);
return new String(buffer);
}
@@ -45,22 +45,18 @@ public static NSString stringWith(String str) {
return stringWithCharacters(buffer, buffer.length);
}
-public long /*int*/ UTF8String() {
+public long UTF8String() {
return OS.objc_msgSend(this.id, OS.sel_UTF8String);
}
-public long /*int*/ characterAtIndex(long /*int*/ index) {
- return OS.objc_msgSend(this.id, OS.sel_characterAtIndex_, index);
+public char characterAtIndex(long index) {
+ return (char)OS.objc_msgSend(this.id, OS.sel_characterAtIndex_, index);
}
-public long /*int*/ compare(NSString string) {
+public long compare(NSString string) {
return OS.objc_msgSend(this.id, OS.sel_compare_, string != null ? string.id : 0);
}
-public long /*int*/ fileSystemRepresentation() {
- return OS.objc_msgSend(this.id, OS.sel_fileSystemRepresentation);
-}
-
public void getCharacters(char[] buffer) {
OS.objc_msgSend(this.id, OS.sel_getCharacters_, buffer);
}
@@ -69,8 +65,8 @@ public void getCharacters(char[] buffer, NSRange range) {
OS.objc_msgSend(this.id, OS.sel_getCharacters_range_, buffer, range);
}
-public NSString initWithCharacters(char[] characters, long /*int*/ length) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithCharacters_length_, characters, length);
+public NSString initWithCharacters(char[] characters, long length) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithCharacters_length_, characters, length);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
@@ -79,76 +75,76 @@ public boolean isEqualToString(NSString aString) {
}
public NSString lastPathComponent() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_lastPathComponent);
+ long result = OS.objc_msgSend(this.id, OS.sel_lastPathComponent);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
-public long /*int*/ length() {
+public long length() {
return OS.objc_msgSend(this.id, OS.sel_length);
}
public NSString lowercaseString() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_lowercaseString);
+ long result = OS.objc_msgSend(this.id, OS.sel_lowercaseString);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public NSString pathExtension() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_pathExtension);
+ long result = OS.objc_msgSend(this.id, OS.sel_pathExtension);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public static NSString string() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSString, OS.sel_string);
+ long result = OS.objc_msgSend(OS.class_NSString, OS.sel_string);
return result != 0 ? new NSString(result) : null;
}
-public NSString stringByAddingPercentEscapesUsingEncoding(long /*int*/ enc) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByAddingPercentEscapesUsingEncoding_, enc);
+public NSString stringByAddingPercentEscapesUsingEncoding(long enc) {
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByAddingPercentEscapesUsingEncoding_, enc);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public NSString stringByAppendingPathComponent(NSString str) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathComponent_, str != null ? str.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathComponent_, str != null ? str.id : 0);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public NSString stringByAppendingPathExtension(NSString str) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathExtension_, str != null ? str.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathExtension_, str != null ? str.id : 0);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public NSString stringByAppendingString(NSString aString) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingString_, aString != null ? aString.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingString_, aString != null ? aString.id : 0);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public NSString stringByDeletingLastPathComponent() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingLastPathComponent);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingLastPathComponent);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public NSString stringByDeletingPathExtension() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingPathExtension);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingPathExtension);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
public NSString stringByReplacingOccurrencesOfString(NSString target, NSString replacement) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingOccurrencesOfString_withString_, target != null ? target.id : 0, replacement != null ? replacement.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingOccurrencesOfString_withString_, target != null ? target.id : 0, replacement != null ? replacement.id : 0);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
-public NSString stringByReplacingPercentEscapesUsingEncoding(long /*int*/ enc) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingPercentEscapesUsingEncoding_, enc);
+public NSString stringByReplacingPercentEscapesUsingEncoding(long enc) {
+ long result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingPercentEscapesUsingEncoding_, enc);
return result == this.id ? this : (result != 0 ? new NSString(result) : null);
}
-public static NSString stringWithCharacters(char[] characters, long /*int*/ length) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCharacters_length_, characters, length);
+public static NSString stringWithCharacters(char[] characters, long length) {
+ long result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCharacters_length_, characters, length);
return result != 0 ? new NSString(result) : null;
}
-public static NSString stringWithUTF8String(long /*int*/ nullTerminatedCString) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithUTF8String_, nullTerminatedCString);
+public static NSString stringWithUTF8String(long nullTerminatedCString) {
+ long result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithUTF8String_, nullTerminatedCString);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabView.java
index 546d6d9108..2192e5cb7c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTabView() {
super();
}
-public NSTabView(long /*int*/ id) {
+public NSTabView(long id) {
super(id);
}
@@ -27,17 +27,13 @@ public NSTabView(id id) {
super(id);
}
-public void addTabViewItem(NSTabViewItem tabViewItem) {
- OS.objc_msgSend(this.id, OS.sel_addTabViewItem_, tabViewItem != null ? tabViewItem.id : 0);
-}
-
public NSRect contentRect() {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_contentRect);
return result;
}
-public void insertTabViewItem(NSTabViewItem tabViewItem, long /*int*/ index) {
+public void insertTabViewItem(NSTabViewItem tabViewItem, long index) {
OS.objc_msgSend(this.id, OS.sel_insertTabViewItem_atIndex_, tabViewItem != null ? tabViewItem.id : 0, index);
}
@@ -51,16 +47,16 @@ public void removeTabViewItem(NSTabViewItem tabViewItem) {
OS.objc_msgSend(this.id, OS.sel_removeTabViewItem_, tabViewItem != null ? tabViewItem.id : 0);
}
-public void selectTabViewItemAtIndex(long /*int*/ index) {
+public void selectTabViewItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_selectTabViewItemAtIndex_, index);
}
public NSTabViewItem selectedTabViewItem() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_selectedTabViewItem);
+ long result = OS.objc_msgSend(this.id, OS.sel_selectedTabViewItem);
return result != 0 ? new NSTabViewItem(result) : null;
}
-public void setControlSize(long /*int*/ controlSize) {
+public void setControlSize(long controlSize) {
OS.objc_msgSend(this.id, OS.sel_setControlSize_, controlSize);
}
@@ -72,12 +68,12 @@ public void setFont(NSFont font) {
OS.objc_msgSend(this.id, OS.sel_setFont_, font != null ? font.id : 0);
}
-public void setTabViewType(long /*int*/ tabViewType) {
+public void setTabViewType(long tabViewType) {
OS.objc_msgSend(this.id, OS.sel_setTabViewType_, tabViewType);
}
public NSTabViewItem tabViewItemAtPoint(NSPoint point) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtPoint_, point);
+ long result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtPoint_, point);
return result != 0 ? new NSTabViewItem(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java
index 854f4d8934..b8724f08b3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java
@@ -19,7 +19,7 @@ public NSTabViewItem() {
super();
}
-public NSTabViewItem(long /*int*/ id) {
+public NSTabViewItem(long id) {
super(id);
}
@@ -32,7 +32,7 @@ public void drawLabel(boolean shouldTruncateLabel, NSRect labelRect) {
}
public NSTabViewItem initWithIdentifier(id identifier) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0);
return result == this.id ? this : (result != 0 ? new NSTabViewItem(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java
index 706808b2e6..43f605d20e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTableColumn() {
super();
}
-public NSTableColumn(long /*int*/ id) {
+public NSTableColumn(long id) {
super(id);
}
@@ -28,21 +28,21 @@ public NSTableColumn(id id) {
}
public NSCell dataCell() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dataCell);
+ long result = OS.objc_msgSend(this.id, OS.sel_dataCell);
return result != 0 ? new NSCell(result) : null;
}
public NSTableHeaderCell headerCell() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_headerCell);
+ long result = OS.objc_msgSend(this.id, OS.sel_headerCell);
return result != 0 ? new NSTableHeaderCell(result) : null;
}
public NSTableColumn initWithIdentifier(NSString identifier) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0);
return result == this.id ? this : (result != 0 ? new NSTableColumn(result) : null);
}
-public long /*int*/ resizingMask() {
+public long resizingMask() {
return OS.objc_msgSend(this.id, OS.sel_resizingMask);
}
@@ -62,20 +62,20 @@ public void setIdentifier(NSString identifier) {
OS.objc_msgSend(this.id, OS.sel_setIdentifier_, identifier != null ? identifier.id : 0);
}
-public void setMinWidth(double /*float*/ minWidth) {
+public void setMinWidth(double minWidth) {
OS.objc_msgSend(this.id, OS.sel_setMinWidth_, minWidth);
}
-public void setResizingMask(long /*int*/ resizingMask) {
+public void setResizingMask(long resizingMask) {
OS.objc_msgSend(this.id, OS.sel_setResizingMask_, resizingMask);
}
-public void setWidth(double /*float*/ width) {
+public void setWidth(double width) {
OS.objc_msgSend(this.id, OS.sel_setWidth_, width);
}
-public double /*float*/ width() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_width);
+public double width() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_width);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderCell.java
index 20f25d91d0..0082dff3a6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderCell.java
@@ -19,7 +19,7 @@ public NSTableHeaderCell() {
super();
}
-public NSTableHeaderCell(long /*int*/ id) {
+public NSTableHeaderCell(long id) {
super(id);
}
@@ -27,7 +27,7 @@ public NSTableHeaderCell(id id) {
super(id);
}
-public void drawSortIndicatorWithFrame(NSRect cellFrame, NSView controlView, boolean ascending, long /*int*/ priority) {
+public void drawSortIndicatorWithFrame(NSRect cellFrame, NSView controlView, boolean ascending, long priority) {
OS.objc_msgSend(this.id, OS.sel_drawSortIndicatorWithFrame_inView_ascending_priority_, cellFrame, controlView != null ? controlView.id : 0, ascending, priority);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderView.java
index b9c457a97a..a81906cef5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableHeaderView.java
@@ -19,7 +19,7 @@ public NSTableHeaderView() {
super();
}
-public NSTableHeaderView(long /*int*/ id) {
+public NSTableHeaderView(long id) {
super(id);
}
@@ -27,11 +27,11 @@ public NSTableHeaderView(id id) {
super(id);
}
-public long /*int*/ columnAtPoint(NSPoint point) {
+public long columnAtPoint(NSPoint point) {
return OS.objc_msgSend(this.id, OS.sel_columnAtPoint_, point);
}
-public NSRect headerRectOfColumn(long /*int*/ column) {
+public NSRect headerRectOfColumn(long column) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_headerRectOfColumn_, column);
return result;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java
index d7e69ca523..6a581084dc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTableView() {
super();
}
-public NSTableView(long /*int*/ id) {
+public NSTableView(long id) {
super(id);
}
@@ -27,49 +27,36 @@ public NSTableView(id id) {
super(id);
}
-public void addTableColumn(NSTableColumn column) {
- OS.objc_msgSend(this.id, OS.sel_addTableColumn_, column != null ? column.id : 0);
-}
-
-public boolean allowsColumnReordering() {
- return OS.objc_msgSend_bool(this.id, OS.sel_allowsColumnReordering);
+public void addTableColumn(NSTableColumn tableColumn) {
+ OS.objc_msgSend(this.id, OS.sel_addTableColumn_, tableColumn != null ? tableColumn.id : 0);
}
public boolean canDragRowsWithIndexes(NSIndexSet rowIndexes, NSPoint mouseDownPoint) {
return OS.objc_msgSend_bool(this.id, OS.sel_canDragRowsWithIndexes_atPoint_, rowIndexes != null ? rowIndexes.id : 0, mouseDownPoint);
}
-public long /*int*/ clickedColumn() {
+public long clickedColumn() {
return OS.objc_msgSend(this.id, OS.sel_clickedColumn);
}
-public long /*int*/ clickedRow() {
+public long clickedRow() {
return OS.objc_msgSend(this.id, OS.sel_clickedRow);
}
-public long /*int*/ columnAtPoint(NSPoint point) {
+public long columnAtPoint(NSPoint point) {
return OS.objc_msgSend(this.id, OS.sel_columnAtPoint_, point);
}
-public NSIndexSet columnIndexesInRect(NSRect rect) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_columnIndexesInRect_, rect);
- return result != 0 ? new NSIndexSet(result) : null;
-}
-
-public long /*int*/ columnWithIdentifier(NSString identifier) {
- return OS.objc_msgSend(this.id, OS.sel_columnWithIdentifier_, identifier != null ? identifier.id : 0);
-}
-
public void deselectAll(id sender) {
OS.objc_msgSend(this.id, OS.sel_deselectAll_, sender != null ? sender.id : 0);
}
-public void deselectRow(long /*int*/ row) {
+public void deselectRow(long row) {
OS.objc_msgSend(this.id, OS.sel_deselectRow_, row);
}
-public NSImage dragImageForRowsWithIndexes(NSIndexSet dragRows, NSArray tableColumns, NSEvent dragEvent, long /*int*/ dragImageOffset) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dragImageForRowsWithIndexes_tableColumns_event_offset_, dragRows != null ? dragRows.id : 0, tableColumns != null ? tableColumns.id : 0, dragEvent != null ? dragEvent.id : 0, dragImageOffset);
+public NSImage dragImageForRowsWithIndexes(NSIndexSet dragRows, NSArray tableColumns, NSEvent dragEvent, long dragImageOffset) {
+ long result = OS.objc_msgSend(this.id, OS.sel_dragImageForRowsWithIndexes_tableColumns_event_offset_, dragRows != null ? dragRows.id : 0, tableColumns != null ? tableColumns.id : 0, dragEvent != null ? dragEvent.id : 0, dragImageOffset);
return result != 0 ? new NSImage(result) : null;
}
@@ -77,14 +64,14 @@ public void drawBackgroundInClipRect(NSRect clipRect) {
OS.objc_msgSend(this.id, OS.sel_drawBackgroundInClipRect_, clipRect);
}
-public NSRect frameOfCellAtColumn(long /*int*/ column, long /*int*/ row) {
+public NSRect frameOfCellAtColumn(long column, long row) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_frameOfCellAtColumn_row_, column, row);
return result;
}
public NSTableHeaderView headerView() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_headerView);
+ long result = OS.objc_msgSend(this.id, OS.sel_headerView);
return result != 0 ? new NSTableHeaderView(result) : null;
}
@@ -98,42 +85,42 @@ public NSSize intercellSpacing() {
return result;
}
-public boolean isRowSelected(long /*int*/ row) {
+public boolean isRowSelected(long row) {
return OS.objc_msgSend_bool(this.id, OS.sel_isRowSelected_, row);
}
-public void moveColumn(long /*int*/ column, long /*int*/ newIndex) {
- OS.objc_msgSend(this.id, OS.sel_moveColumn_toColumn_, column, newIndex);
+public void moveColumn(long oldIndex, long newIndex) {
+ OS.objc_msgSend(this.id, OS.sel_moveColumn_toColumn_, oldIndex, newIndex);
}
public void noteNumberOfRowsChanged() {
OS.objc_msgSend(this.id, OS.sel_noteNumberOfRowsChanged);
}
-public long /*int*/ numberOfColumns() {
+public long numberOfColumns() {
return OS.objc_msgSend(this.id, OS.sel_numberOfColumns);
}
-public long /*int*/ numberOfRows() {
+public long numberOfRows() {
return OS.objc_msgSend(this.id, OS.sel_numberOfRows);
}
-public long /*int*/ numberOfSelectedRows() {
+public long numberOfSelectedRows() {
return OS.objc_msgSend(this.id, OS.sel_numberOfSelectedRows);
}
-public NSCell preparedCellAtColumn(long /*int*/ column, long /*int*/ row) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_preparedCellAtColumn_row_, column, row);
+public NSCell preparedCellAtColumn(long column, long row) {
+ long result = OS.objc_msgSend(this.id, OS.sel_preparedCellAtColumn_row_, column, row);
return result != 0 ? new NSCell(result) : null;
}
-public NSRect rectOfColumn(long /*int*/ column) {
+public NSRect rectOfColumn(long column) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfColumn_, column);
return result;
}
-public NSRect rectOfRow(long /*int*/ row) {
+public NSRect rectOfRow(long row) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfRow_, row);
return result;
@@ -143,29 +130,23 @@ public void reloadData() {
OS.objc_msgSend(this.id, OS.sel_reloadData);
}
-public void removeTableColumn(NSTableColumn column) {
- OS.objc_msgSend(this.id, OS.sel_removeTableColumn_, column != null ? column.id : 0);
+public void removeTableColumn(NSTableColumn tableColumn) {
+ OS.objc_msgSend(this.id, OS.sel_removeTableColumn_, tableColumn != null ? tableColumn.id : 0);
}
-public long /*int*/ rowAtPoint(NSPoint point) {
+public long rowAtPoint(NSPoint point) {
return OS.objc_msgSend(this.id, OS.sel_rowAtPoint_, point);
}
-public double /*float*/ rowHeight() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_rowHeight);
-}
-
-public NSRange rowsInRect(NSRect rect) {
- NSRange result = new NSRange();
- OS.objc_msgSend_stret(result, this.id, OS.sel_rowsInRect_, rect);
- return result;
+public double rowHeight() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_rowHeight);
}
-public void scrollColumnToVisible(long /*int*/ column) {
+public void scrollColumnToVisible(long column) {
OS.objc_msgSend(this.id, OS.sel_scrollColumnToVisible_, column);
}
-public void scrollRowToVisible(long /*int*/ row) {
+public void scrollRowToVisible(long row) {
OS.objc_msgSend(this.id, OS.sel_scrollRowToVisible_, row);
}
@@ -177,12 +158,12 @@ public void selectRowIndexes(NSIndexSet indexes, boolean extend) {
OS.objc_msgSend(this.id, OS.sel_selectRowIndexes_byExtendingSelection_, indexes != null ? indexes.id : 0, extend);
}
-public long /*int*/ selectedRow() {
+public long selectedRow() {
return OS.objc_msgSend(this.id, OS.sel_selectedRow);
}
public NSIndexSet selectedRowIndexes() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_selectedRowIndexes);
+ long result = OS.objc_msgSend(this.id, OS.sel_selectedRowIndexes);
return result != 0 ? new NSIndexSet(result) : null;
}
@@ -198,7 +179,7 @@ public void setBackgroundColor(NSColor backgroundColor) {
OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, backgroundColor != null ? backgroundColor.id : 0);
}
-public void setColumnAutoresizingStyle(long /*int*/ columnAutoresizingStyle) {
+public void setColumnAutoresizingStyle(long columnAutoresizingStyle) {
OS.objc_msgSend(this.id, OS.sel_setColumnAutoresizingStyle_, columnAutoresizingStyle);
}
@@ -210,35 +191,35 @@ public void setDelegate(id delegate) {
OS.objc_msgSend(this.id, OS.sel_setDelegate_, delegate != null ? delegate.id : 0);
}
-public void setDoubleAction(long /*int*/ doubleAction) {
+public void setDoubleAction(long doubleAction) {
OS.objc_msgSend(this.id, OS.sel_setDoubleAction_, doubleAction);
}
-public void setDropRow(long /*int*/ row, long /*int*/ op) {
- OS.objc_msgSend(this.id, OS.sel_setDropRow_dropOperation_, row, op);
+public void setDropRow(long row, long dropOperation) {
+ OS.objc_msgSend(this.id, OS.sel_setDropRow_dropOperation_, row, dropOperation);
}
-public void setGridStyleMask(long /*int*/ gridStyle) {
- OS.objc_msgSend(this.id, OS.sel_setGridStyleMask_, gridStyle);
+public void setGridStyleMask(long gridStyleMask) {
+ OS.objc_msgSend(this.id, OS.sel_setGridStyleMask_, gridStyleMask);
}
public void setHeaderView(NSTableHeaderView headerView) {
OS.objc_msgSend(this.id, OS.sel_setHeaderView_, headerView != null ? headerView.id : 0);
}
-public void setHighlightedTableColumn(NSTableColumn tc) {
- OS.objc_msgSend(this.id, OS.sel_setHighlightedTableColumn_, tc != null ? tc.id : 0);
+public void setHighlightedTableColumn(NSTableColumn highlightedTableColumn) {
+ OS.objc_msgSend(this.id, OS.sel_setHighlightedTableColumn_, highlightedTableColumn != null ? highlightedTableColumn.id : 0);
}
-public void setIndicatorImage(NSImage anImage, NSTableColumn tc) {
- OS.objc_msgSend(this.id, OS.sel_setIndicatorImage_inTableColumn_, anImage != null ? anImage.id : 0, tc != null ? tc.id : 0);
+public void setIndicatorImage(NSImage anImage, NSTableColumn tableColumn) {
+ OS.objc_msgSend(this.id, OS.sel_setIndicatorImage_inTableColumn_, anImage != null ? anImage.id : 0, tableColumn != null ? tableColumn.id : 0);
}
public void setIntercellSpacing(NSSize intercellSpacing) {
OS.objc_msgSend(this.id, OS.sel_setIntercellSpacing_, intercellSpacing);
}
-public void setRowHeight(double /*float*/ rowHeight) {
+public void setRowHeight(double rowHeight) {
OS.objc_msgSend(this.id, OS.sel_setRowHeight_, rowHeight);
}
@@ -247,7 +228,7 @@ public void setUsesAlternatingRowBackgroundColors(boolean usesAlternatingRowBack
}
public NSArray tableColumns() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_tableColumns);
+ long result = OS.objc_msgSend(this.id, OS.sel_tableColumns);
return result != 0 ? new NSArray(result) : null;
}
@@ -259,11 +240,11 @@ public boolean usesAlternatingRowBackgroundColors() {
return OS.objc_msgSend_bool(this.id, OS.sel_usesAlternatingRowBackgroundColors);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSTableView, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSTableView, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java
index 73787900da..8bc79c21a7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSText() {
super();
}
-public NSText(long /*int*/ id) {
+public NSText(long id) {
super(id);
}
@@ -35,16 +35,6 @@ public void cut(id sender) {
OS.objc_msgSend(this.id, OS.sel_cut_, sender != null ? sender.id : 0);
}
-public id delegate() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_delegate);
- return result != 0 ? new id(result) : null;
-}
-
-public NSFont font() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_font);
- return result != 0 ? new NSFont(result) : null;
-}
-
public boolean isFieldEditor() {
return OS.objc_msgSend_bool(this.id, OS.sel_isFieldEditor);
}
@@ -71,7 +61,7 @@ public NSRange selectedRange() {
return result;
}
-public void setAlignment(long /*int*/ alignment) {
+public void setAlignment(long alignment) {
OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment);
}
@@ -79,7 +69,7 @@ public void setBackgroundColor(NSColor backgroundColor) {
OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, backgroundColor != null ? backgroundColor.id : 0);
}
-public void setBaseWritingDirection(long /*int*/ baseWritingDirection) {
+public void setBaseWritingDirection(long baseWritingDirection) {
OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, baseWritingDirection);
}
@@ -127,12 +117,8 @@ public void setTextColor(NSColor textColor) {
OS.objc_msgSend(this.id, OS.sel_setTextColor_, textColor != null ? textColor.id : 0);
}
-public void sizeToFit() {
- OS.objc_msgSend(this.id, OS.sel_sizeToFit);
-}
-
public NSString string() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_string);
+ long result = OS.objc_msgSend(this.id, OS.sel_string);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java
index 9fd9c1741a..2068be7c07 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java
@@ -19,7 +19,7 @@ public NSTextAttachment() {
super();
}
-public NSTextAttachment(long /*int*/ id) {
+public NSTextAttachment(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSTextAttachment(id id) {
}
public NSTextAttachment initWithFileWrapper(NSFileWrapper fileWrapper) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFileWrapper_, fileWrapper != null ? fileWrapper.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithFileWrapper_, fileWrapper != null ? fileWrapper.id : 0);
return result == this.id ? this : (result != 0 ? new NSTextAttachment(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java
index b926a84083..133bf1136f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTextContainer() {
super();
}
-public NSTextContainer(long /*int*/ id) {
+public NSTextContainer(long id) {
super(id);
}
@@ -27,14 +27,8 @@ public NSTextContainer(id id) {
super(id);
}
-public NSSize containerSize() {
- NSSize result = new NSSize();
- OS.objc_msgSend_stret(result, this.id, OS.sel_containerSize);
- return result;
-}
-
public NSTextContainer initWithContainerSize(NSSize aContainerSize) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithContainerSize_, aContainerSize);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithContainerSize_, aContainerSize);
return result == this.id ? this : (result != 0 ? new NSTextContainer(result) : null);
}
@@ -42,7 +36,7 @@ public void setContainerSize(NSSize containerSize) {
OS.objc_msgSend(this.id, OS.sel_setContainerSize_, containerSize);
}
-public void setLineFragmentPadding(double /*float*/ lineFragmentPadding) {
+public void setLineFragmentPadding(double lineFragmentPadding) {
OS.objc_msgSend(this.id, OS.sel_setLineFragmentPadding_, lineFragmentPadding);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java
index 5ecb8bc882..1a88102092 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java
@@ -19,7 +19,7 @@ public NSTextField() {
super();
}
-public NSTextField(long /*int*/ id) {
+public NSTextField(long id) {
super(id);
}
@@ -59,11 +59,11 @@ public void setTextColor(NSColor textColor) {
OS.objc_msgSend(this.id, OS.sel_setTextColor_, textColor != null ? textColor.id : 0);
}
-public static long /*int*/ cellClass() {
+public static long cellClass() {
return OS.objc_msgSend(OS.class_NSTextField, OS.sel_cellClass);
}
-public static void setCellClass(long /*int*/ factoryId) {
+public static void setCellClass(long factoryId) {
OS.objc_msgSend(OS.class_NSTextField, OS.sel_setCellClass_, factoryId);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextFieldCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextFieldCell.java
index 9fc957b4e8..b0beb0306c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextFieldCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextFieldCell.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTextFieldCell() {
super();
}
-public NSTextFieldCell(long /*int*/ id) {
+public NSTextFieldCell(long id) {
super(id);
}
@@ -35,9 +35,4 @@ public void setTextColor(NSColor textColor) {
OS.objc_msgSend(this.id, OS.sel_setTextColor_, textColor != null ? textColor.id : 0);
}
-public NSColor textColor() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_textColor);
- return result != 0 ? new NSColor(result) : null;
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java
index 34c5b9cc6f..984e00bd75 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTextStorage() {
super();
}
-public NSTextStorage(long /*int*/ id) {
+public NSTextStorage(long id) {
super(id);
}
@@ -32,13 +32,8 @@ public void addLayoutManager(NSLayoutManager aLayoutManager) {
}
public NSArray paragraphs() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_paragraphs);
+ long result = OS.objc_msgSend(this.id, OS.sel_paragraphs);
return result != 0 ? new NSArray(result) : null;
}
-public static NSAttributedString attributedStringWithAttachment(NSTextAttachment attachment) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSTextStorage, OS.sel_attributedStringWithAttachment_, attachment != null ? attachment.id : 0);
- return result != 0 ? new NSAttributedString(result) : null;
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextTab.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextTab.java
index 8416a9c115..46b3d35348 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextTab.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTextTab() {
super();
}
-public NSTextTab(long /*int*/ id) {
+public NSTextTab(long id) {
super(id);
}
@@ -27,17 +27,9 @@ public NSTextTab(id id) {
super(id);
}
-public NSTextTab initWithType(long /*int*/ type, double /*float*/ loc) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithType_location_, type, loc);
+public NSTextTab initWithType(long type, double loc) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithType_location_, type, loc);
return result == this.id ? this : (result != 0 ? new NSTextTab(result) : null);
}
-public double /*float*/ location() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_location);
-}
-
-public long /*int*/ tabStopType() {
- return OS.objc_msgSend(this.id, OS.sel_tabStopType);
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java
index 7ac5f14993..14393a4bf3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTextView() {
super();
}
-public NSTextView(long /*int*/ id) {
+public NSTextView(long id) {
super(id);
}
@@ -27,12 +27,12 @@ public NSTextView(id id) {
super(id);
}
-public long /*int*/ characterIndexForInsertionAtPoint(NSPoint point) {
+public long characterIndexForInsertionAtPoint(NSPoint point) {
return OS.objc_msgSend(this.id, OS.sel_characterIndexForInsertionAtPoint_, point);
}
public NSParagraphStyle defaultParagraphStyle() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_defaultParagraphStyle);
+ long result = OS.objc_msgSend(this.id, OS.sel_defaultParagraphStyle);
return result != 0 ? new NSParagraphStyle(result) : null;
}
@@ -45,22 +45,22 @@ public void drawViewBackgroundInRect(NSRect rect) {
}
public NSLayoutManager layoutManager() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_layoutManager);
+ long result = OS.objc_msgSend(this.id, OS.sel_layoutManager);
return result != 0 ? new NSLayoutManager(result) : null;
}
public NSDictionary linkTextAttributes() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_linkTextAttributes);
+ long result = OS.objc_msgSend(this.id, OS.sel_linkTextAttributes);
return result != 0 ? new NSDictionary(result) : null;
}
public NSDictionary markedTextAttributes() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_markedTextAttributes);
+ long result = OS.objc_msgSend(this.id, OS.sel_markedTextAttributes);
return result != 0 ? new NSDictionary(result) : null;
}
public NSDictionary selectedTextAttributes() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_selectedTextAttributes);
+ long result = OS.objc_msgSend(this.id, OS.sel_selectedTextAttributes);
return result != 0 ? new NSDictionary(result) : null;
}
@@ -68,10 +68,6 @@ public void setAllowsUndo(boolean allowsUndo) {
OS.objc_msgSend(this.id, OS.sel_setAllowsUndo_, allowsUndo);
}
-public void setBaseWritingDirection(long /*int*/ writingDirection, NSRange range) {
- OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_range_, writingDirection, range);
-}
-
public void setDefaultParagraphStyle(NSParagraphStyle defaultParagraphStyle) {
OS.objc_msgSend(this.id, OS.sel_setDefaultParagraphStyle_, defaultParagraphStyle != null ? defaultParagraphStyle.id : 0);
}
@@ -105,12 +101,12 @@ public boolean shouldDrawInsertionPoint() {
}
public NSTextContainer textContainer() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_textContainer);
+ long result = OS.objc_msgSend(this.id, OS.sel_textContainer);
return result != 0 ? new NSTextContainer(result) : null;
}
public NSTextStorage textStorage() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_textStorage);
+ long result = OS.objc_msgSend(this.id, OS.sel_textStorage);
return result != 0 ? new NSTextStorage(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSThread.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSThread.java
index d270a14506..1f984bb22e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSThread.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSThread.java
@@ -19,7 +19,7 @@ public NSThread() {
super();
}
-public NSThread(long /*int*/ id) {
+public NSThread(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSThread(id id) {
}
public static NSThread currentThread() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSThread, OS.sel_currentThread);
+ long result = OS.objc_msgSend(OS.class_NSThread, OS.sel_currentThread);
return result != 0 ? new NSThread(result) : null;
}
@@ -37,7 +37,7 @@ public static boolean isMainThread() {
}
public NSMutableDictionary threadDictionary() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_threadDictionary);
+ long result = OS.objc_msgSend(this.id, OS.sel_threadDictionary);
return result != 0 ? new NSMutableDictionary(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimeZone.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimeZone.java
index d5c8c2205c..50bab513e7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimeZone.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimeZone.java
@@ -19,7 +19,7 @@ public NSTimeZone() {
super();
}
-public NSTimeZone(long /*int*/ id) {
+public NSTimeZone(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSTimeZone(id id) {
}
public static NSTimeZone defaultTimeZone() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone);
+ long result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone);
return result != 0 ? new NSTimeZone(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimer.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimer.java
index 5daadef1ed..9737ea114c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTimer.java
@@ -19,7 +19,7 @@ public NSTimer() {
super();
}
-public NSTimer(long /*int*/ id) {
+public NSTimer(long id) {
super(id);
}
@@ -31,8 +31,8 @@ public void invalidate() {
OS.objc_msgSend(this.id, OS.sel_invalidate);
}
-public static NSTimer scheduledTimerWithTimeInterval(double ti, id aTarget, long /*int*/ aSelector, id userInfo, boolean yesOrNo) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSTimer, OS.sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, ti, aTarget != null ? aTarget.id : 0, aSelector, userInfo != null ? userInfo.id : 0, yesOrNo);
+public static NSTimer scheduledTimerWithTimeInterval(double ti, id aTarget, long aSelector, id userInfo, boolean yesOrNo) {
+ long result = OS.objc_msgSend(OS.class_NSTimer, OS.sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, ti, aTarget != null ? aTarget.id : 0, aSelector, userInfo != null ? userInfo.id : 0, yesOrNo);
return result != 0 ? new NSTimer(result) : null;
}
@@ -41,7 +41,7 @@ public void setFireDate(NSDate fireDate) {
}
public id userInfo() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_userInfo);
+ long result = OS.objc_msgSend(this.id, OS.sel_userInfo);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbar.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbar.java
index ab5c502aee..8bb672f86d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbar.java
@@ -19,7 +19,7 @@ public NSToolbar() {
super();
}
-public NSToolbar(long /*int*/ id) {
+public NSToolbar(long id) {
super(id);
}
@@ -28,11 +28,11 @@ public NSToolbar(id id) {
}
public NSToolbar initWithIdentifier(NSString identifier) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0);
return result == this.id ? this : (result != 0 ? new NSToolbar(result) : null);
}
-public void insertItemWithItemIdentifier(NSString itemIdentifier, long /*int*/ index) {
+public void insertItemWithItemIdentifier(NSString itemIdentifier, long index) {
OS.objc_msgSend(this.id, OS.sel_insertItemWithItemIdentifier_atIndex_, itemIdentifier != null ? itemIdentifier.id : 0, index);
}
@@ -40,7 +40,7 @@ public boolean isVisible() {
return OS.objc_msgSend_bool(this.id, OS.sel_isVisible);
}
-public void removeItemAtIndex(long /*int*/ index) {
+public void removeItemAtIndex(long index) {
OS.objc_msgSend(this.id, OS.sel_removeItemAtIndex_, index);
}
@@ -52,7 +52,7 @@ public void setDelegate(id delegate) {
OS.objc_msgSend(this.id, OS.sel_setDelegate_, delegate != null ? delegate.id : 0);
}
-public void setDisplayMode(long /*int*/ displayMode) {
+public void setDisplayMode(long displayMode) {
OS.objc_msgSend(this.id, OS.sel_setDisplayMode_, displayMode);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbarItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbarItem.java
index 8038be45a4..daa844438d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbarItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSToolbarItem.java
@@ -19,7 +19,7 @@ public NSToolbarItem() {
super();
}
-public NSToolbarItem(long /*int*/ id) {
+public NSToolbarItem(long id) {
super(id);
}
@@ -28,16 +28,16 @@ public NSToolbarItem(id id) {
}
public NSToolbarItem initWithItemIdentifier(NSString itemIdentifier) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithItemIdentifier_, itemIdentifier != null ? itemIdentifier.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithItemIdentifier_, itemIdentifier != null ? itemIdentifier.id : 0);
return result == this.id ? this : (result != 0 ? new NSToolbarItem(result) : null);
}
public NSString itemIdentifier() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_itemIdentifier);
+ long result = OS.objc_msgSend(this.id, OS.sel_itemIdentifier);
return result != 0 ? new NSString(result) : null;
}
-public void setAction(long /*int*/ action) {
+public void setAction(long action) {
OS.objc_msgSend(this.id, OS.sel_setAction_, action);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java
index 9ebbb49f3e..4fe6816d55 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java
@@ -19,7 +19,7 @@ public NSTouch() {
super();
}
-public NSTouch(long /*int*/ id) {
+public NSTouch(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public NSTouch(id id) {
}
public id device() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_device);
+ long result = OS.objc_msgSend(this.id, OS.sel_device);
return result != 0 ? new id(result) : null;
}
@@ -48,7 +48,7 @@ public NSPoint normalizedPosition() {
return result;
}
-public long /*int*/ phase() {
+public long phase() {
return OS.objc_msgSend(this.id, OS.sel_phase);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTrackingArea.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTrackingArea.java
index 04c02720d3..8eb5e2f86e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTrackingArea.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTrackingArea.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTrackingArea() {
super();
}
-public NSTrackingArea(long /*int*/ id) {
+public NSTrackingArea(long id) {
super(id);
}
@@ -27,18 +27,13 @@ public NSTrackingArea(id id) {
super(id);
}
-public NSTrackingArea initWithRect(NSRect rect, long /*int*/ options, id owner, NSDictionary userInfo) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithRect_options_owner_userInfo_, rect, options, owner != null ? owner.id : 0, userInfo != null ? userInfo.id : 0);
- return result == this.id ? this : (result != 0 ? new NSTrackingArea(result) : null);
-}
-
public id owner() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_owner);
+ long result = OS.objc_msgSend(this.id, OS.sel_owner);
return result != 0 ? new id(result) : null;
}
public NSDictionary userInfo() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_userInfo);
+ long result = OS.objc_msgSend(this.id, OS.sel_userInfo);
return result != 0 ? new NSDictionary(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTypesetter.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTypesetter.java
index a8f5dd307e..1597ad35aa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTypesetter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTypesetter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSTypesetter() {
super();
}
-public NSTypesetter(long /*int*/ id) {
+public NSTypesetter(long id) {
super(id);
}
@@ -27,8 +27,8 @@ public NSTypesetter(id id) {
super(id);
}
-public double /*float*/ baselineOffsetInLayoutManager(NSLayoutManager layoutMgr, long /*int*/ glyphIndex) {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_baselineOffsetInLayoutManager_glyphIndex_, layoutMgr != null ? layoutMgr.id : 0, glyphIndex);
+public double baselineOffsetInLayoutManager(NSLayoutManager layoutMgr, long glyphIndex) {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_baselineOffsetInLayoutManager_glyphIndex_, layoutMgr != null ? layoutMgr.id : 0, glyphIndex);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java
index b5a32be426..1d90ef4505 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java
@@ -19,7 +19,7 @@ public NSURL() {
super();
}
-public NSURL(long /*int*/ id) {
+public NSURL(long id) {
super(id);
}
@@ -28,27 +28,27 @@ public NSURL(id id) {
}
public static NSURL URLFromPasteboard(NSPasteboard pasteBoard) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLFromPasteboard_, pasteBoard != null ? pasteBoard.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLFromPasteboard_, pasteBoard != null ? pasteBoard.id : 0);
return result != 0 ? new NSURL(result) : null;
}
public static NSURL URLWithString(NSString URLString) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_, URLString != null ? URLString.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_, URLString != null ? URLString.id : 0);
return result != 0 ? new NSURL(result) : null;
}
public NSString absoluteString() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_absoluteString);
+ long result = OS.objc_msgSend(this.id, OS.sel_absoluteString);
return result != 0 ? new NSString(result) : null;
}
public static NSURL fileURLWithPath(NSString path) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_, path != null ? path.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_, path != null ? path.id : 0);
return result != 0 ? new NSURL(result) : null;
}
public NSString host() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_host);
+ long result = OS.objc_msgSend(this.id, OS.sel_host);
return result != 0 ? new NSString(result) : null;
}
@@ -57,7 +57,7 @@ public boolean isFileURL() {
}
public NSString path() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_path);
+ long result = OS.objc_msgSend(this.id, OS.sel_path);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLAuthenticationChallenge.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLAuthenticationChallenge.java
index 7767670f8d..b75154f3ab 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLAuthenticationChallenge.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLAuthenticationChallenge.java
@@ -19,7 +19,7 @@ public NSURLAuthenticationChallenge() {
super();
}
-public NSURLAuthenticationChallenge(long /*int*/ id) {
+public NSURLAuthenticationChallenge(long id) {
super(id);
}
@@ -27,22 +27,22 @@ public NSURLAuthenticationChallenge(id id) {
super(id);
}
-public long /*int*/ previousFailureCount() {
+public long previousFailureCount() {
return OS.objc_msgSend(this.id, OS.sel_previousFailureCount);
}
public NSURLCredential proposedCredential() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_proposedCredential);
+ long result = OS.objc_msgSend(this.id, OS.sel_proposedCredential);
return result != 0 ? new NSURLCredential(result) : null;
}
public NSURLProtectionSpace protectionSpace() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_protectionSpace);
+ long result = OS.objc_msgSend(this.id, OS.sel_protectionSpace);
return result != 0 ? new NSURLProtectionSpace(result) : null;
}
public id sender() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_sender);
+ long result = OS.objc_msgSend(this.id, OS.sel_sender);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLCredential.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLCredential.java
index be8396d84a..57702ab1bc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLCredential.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLCredential.java
@@ -19,7 +19,7 @@ public NSURLCredential() {
super();
}
-public NSURLCredential(long /*int*/ id) {
+public NSURLCredential(long id) {
super(id);
}
@@ -27,8 +27,8 @@ public NSURLCredential(id id) {
super(id);
}
-public static NSURLCredential credentialWithUser(NSString user, NSString password, long /*int*/ persistence) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSURLCredential, OS.sel_credentialWithUser_password_persistence_, user != null ? user.id : 0, password != null ? password.id : 0, persistence);
+public static NSURLCredential credentialWithUser(NSString user, NSString password, long persistence) {
+ long result = OS.objc_msgSend(OS.class_NSURLCredential, OS.sel_credentialWithUser_password_persistence_, user != null ? user.id : 0, password != null ? password.id : 0, persistence);
return result != 0 ? new NSURLCredential(result) : null;
}
@@ -37,12 +37,12 @@ public boolean hasPassword() {
}
public NSString password() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_password);
+ long result = OS.objc_msgSend(this.id, OS.sel_password);
return result != 0 ? new NSString(result) : null;
}
public NSString user() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_user);
+ long result = OS.objc_msgSend(this.id, OS.sel_user);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLDownload.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLDownload.java
index 32b6810e34..9725e1e78d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLDownload.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLDownload.java
@@ -19,7 +19,7 @@ public NSURLDownload() {
super();
}
-public NSURLDownload(long /*int*/ id) {
+public NSURLDownload(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLProtectionSpace.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLProtectionSpace.java
index bcf4a51275..47c6193cb4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLProtectionSpace.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLProtectionSpace.java
@@ -19,7 +19,7 @@ public NSURLProtectionSpace() {
super();
}
-public NSURLProtectionSpace(long /*int*/ id) {
+public NSURLProtectionSpace(long id) {
super(id);
}
@@ -28,16 +28,16 @@ public NSURLProtectionSpace(id id) {
}
public NSString host() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_host);
+ long result = OS.objc_msgSend(this.id, OS.sel_host);
return result != 0 ? new NSString(result) : null;
}
-public long /*int*/ port() {
+public long port() {
return OS.objc_msgSend(this.id, OS.sel_port);
}
public NSString realm() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_realm);
+ long result = OS.objc_msgSend(this.id, OS.sel_realm);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLRequest.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLRequest.java
index b11f977e40..774f6e804e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLRequest.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURLRequest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSURLRequest() {
super();
}
-public NSURLRequest(long /*int*/ id) {
+public NSURLRequest(long id) {
super(id);
}
@@ -28,17 +28,12 @@ public NSURLRequest(id id) {
}
public NSURL URL() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_URL);
+ long result = OS.objc_msgSend(this.id, OS.sel_URL);
return result != 0 ? new NSURL(result) : null;
}
-public NSURLRequest initWithURL(NSURL URL) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithURL_, URL != null ? URL.id : 0);
- return result == this.id ? this : (result != 0 ? new NSURLRequest(result) : null);
-}
-
public static NSURLRequest requestWithURL(NSURL URL) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0);
return result != 0 ? new NSURLRequest(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java
index 4f9fc34a1f..8a0c53c02d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSUndoManager() {
super();
}
-public NSUndoManager(long /*int*/ id) {
+public NSUndoManager(long id) {
super(id);
}
@@ -27,6 +27,10 @@ public NSUndoManager(id id) {
super(id);
}
+public void beginUndoGrouping() {
+ OS.objc_msgSend(this.id, OS.sel_beginUndoGrouping);
+}
+
public boolean canRedo() {
return OS.objc_msgSend_bool(this.id, OS.sel_canRedo);
}
@@ -35,6 +39,10 @@ public boolean canUndo() {
return OS.objc_msgSend_bool(this.id, OS.sel_canUndo);
}
+public void endUndoGrouping() {
+ OS.objc_msgSend(this.id, OS.sel_endUndoGrouping);
+}
+
public void redo() {
OS.objc_msgSend(this.id, OS.sel_redo);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUserDefaults.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUserDefaults.java
index ac5f8d059f..bc7acf93a3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUserDefaults.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUserDefaults.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSUserDefaults() {
super();
}
-public NSUserDefaults(long /*int*/ id) {
+public NSUserDefaults(long id) {
super(id);
}
@@ -28,21 +28,25 @@ public NSUserDefaults(id id) {
}
public id objectForKey(NSString defaultName) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_objectForKey_, defaultName != null ? defaultName.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_objectForKey_, defaultName != null ? defaultName.id : 0);
return result != 0 ? new id(result) : null;
}
-public void setInteger(long /*int*/ value, NSString defaultName) {
+public void registerDefaults(NSDictionary registrationDictionary) {
+ OS.objc_msgSend(this.id, OS.sel_registerDefaults_, registrationDictionary != null ? registrationDictionary.id : 0);
+}
+
+public void setInteger(long value, NSString defaultName) {
OS.objc_msgSend(this.id, OS.sel_setInteger_forKey_, value, defaultName != null ? defaultName.id : 0);
}
public static NSUserDefaults standardUserDefaults() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSUserDefaults, OS.sel_standardUserDefaults);
+ long result = OS.objc_msgSend(OS.class_NSUserDefaults, OS.sel_standardUserDefaults);
return result != 0 ? new NSUserDefaults(result) : null;
}
public NSString stringForKey(NSString defaultName) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_stringForKey_, defaultName != null ? defaultName.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_stringForKey_, defaultName != null ? defaultName.id : 0);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSValue.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSValue.java
index 411250b3c5..cb771f829c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSValue.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSValue.java
@@ -19,7 +19,7 @@ public NSValue() {
super();
}
-public NSValue(long /*int*/ id) {
+public NSValue(long id) {
super(id);
}
@@ -27,7 +27,7 @@ public NSValue(id id) {
super(id);
}
-public long /*int*/ objCType() {
+public long objCType() {
return OS.objc_msgSend(this.id, OS.sel_objCType);
}
@@ -56,22 +56,22 @@ public NSSize sizeValue() {
}
public static NSValue valueWithPoint(NSPoint point) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithPoint_, point);
+ long result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithPoint_, point);
return result != 0 ? new NSValue(result) : null;
}
public static NSValue valueWithRange(NSRange range) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRange_, range);
+ long result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRange_, range);
return result != 0 ? new NSValue(result) : null;
}
public static NSValue valueWithRect(NSRect rect) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRect_, rect);
+ long result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRect_, rect);
return result != 0 ? new NSValue(result) : null;
}
public static NSValue valueWithSize(NSSize size) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithSize_, size);
+ long result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithSize_, size);
return result != 0 ? new NSValue(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java
index 8fdf2643c5..02a5319e7f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSView() {
super();
}
-public NSView(long /*int*/ id) {
+public NSView(long id) {
super(id);
}
@@ -35,11 +35,11 @@ public void addSubview(NSView aView) {
OS.objc_msgSend(this.id, OS.sel_addSubview_, aView != null ? aView.id : 0);
}
-public void addSubview(NSView aView, long /*int*/ place, NSView otherView) {
+public void addSubview(NSView aView, long place, NSView otherView) {
OS.objc_msgSend(this.id, OS.sel_addSubview_positioned_relativeTo_, aView != null ? aView.id : 0, place, otherView != null ? otherView.id : 0);
}
-public long /*int*/ addToolTipRect(NSRect aRect, id anObject, long /*int*/ data) {
+public long addToolTipRect(NSRect aRect, id anObject, long data) {
return OS.objc_msgSend(this.id, OS.sel_addToolTipRect_owner_userData_, aRect, anObject != null ? anObject.id : 0, data);
}
@@ -52,7 +52,7 @@ public void beginPageInRect(NSRect aRect, NSPoint location) {
}
public NSBitmapImageRep bitmapImageRepForCachingDisplayInRect(NSRect rect) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_bitmapImageRepForCachingDisplayInRect_, rect);
+ long result = OS.objc_msgSend(this.id, OS.sel_bitmapImageRepForCachingDisplayInRect_, rect);
return result != 0 ? new NSBitmapImageRep(result) : null;
}
@@ -82,18 +82,6 @@ public NSPoint convertPoint_toView_(NSPoint aPoint, NSView aView) {
return result;
}
-public NSPoint convertPointFromBase(NSPoint aPoint) {
- NSPoint result = new NSPoint();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertPointFromBase_, aPoint);
- return result;
-}
-
-public NSPoint convertPointToBase(NSPoint aPoint) {
- NSPoint result = new NSPoint();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertPointToBase_, aPoint);
- return result;
-}
-
public NSRect convertRect_fromView_(NSRect aRect, NSView aView) {
NSRect result = new NSRect();
OS.objc_msgSend_stret(result, this.id, OS.sel_convertRect_fromView_, aRect, aView != null ? aView.id : 0);
@@ -106,42 +94,6 @@ public NSRect convertRect_toView_(NSRect aRect, NSView aView) {
return result;
}
-public NSRect convertRectFromBase(NSRect aRect) {
- NSRect result = new NSRect();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertRectFromBase_, aRect);
- return result;
-}
-
-public NSRect convertRectToBase(NSRect aRect) {
- NSRect result = new NSRect();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertRectToBase_, aRect);
- return result;
-}
-
-public NSSize convertSize_fromView_(NSSize aSize, NSView aView) {
- NSSize result = new NSSize();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertSize_fromView_, aSize, aView != null ? aView.id : 0);
- return result;
-}
-
-public NSSize convertSize_toView_(NSSize aSize, NSView aView) {
- NSSize result = new NSSize();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertSize_toView_, aSize, aView != null ? aView.id : 0);
- return result;
-}
-
-public NSSize convertSizeFromBase(NSSize aSize) {
- NSSize result = new NSSize();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertSizeFromBase_, aSize);
- return result;
-}
-
-public NSSize convertSizeToBase(NSSize aSize) {
- NSSize result = new NSSize();
- OS.objc_msgSend_stret(result, this.id, OS.sel_convertSizeToBase_, aSize);
- return result;
-}
-
public void discardCursorRects() {
OS.objc_msgSend(this.id, OS.sel_discardCursorRects);
}
@@ -162,8 +114,8 @@ public void dragImage(NSImage anImage, NSPoint viewLocation, NSSize initialOffse
OS.objc_msgSend(this.id, OS.sel_dragImage_at_offset_event_pasteboard_source_slideBack_, anImage != null ? anImage.id : 0, viewLocation, initialOffset, event != null ? event.id : 0, pboard != null ? pboard.id : 0, sourceObj != null ? sourceObj.id : 0, slideFlag);
}
-public void drawRect(NSRect rect) {
- OS.objc_msgSend(this.id, OS.sel_drawRect_, rect);
+public void drawRect(NSRect dirtyRect) {
+ OS.objc_msgSend(this.id, OS.sel_drawRect_, dirtyRect);
}
public void endDocument() {
@@ -181,12 +133,12 @@ public NSRect frame() {
}
public NSView hitTest(NSPoint aPoint) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_hitTest_, aPoint);
+ long result = OS.objc_msgSend(this.id, OS.sel_hitTest_, aPoint);
return result == this.id ? this : (result != 0 ? new NSView(result) : null);
}
public NSView initWithFrame(NSRect frameRect) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_, frameRect);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_, frameRect);
return result == this.id ? this : (result != 0 ? new NSView(result) : null);
}
@@ -210,12 +162,21 @@ public boolean isOpaque() {
return OS.objc_msgSend_bool(this.id, OS.sel_isOpaque);
}
+public CALayer layer() {
+ long result = OS.objc_msgSend(this.id, OS.sel_layer);
+ return result != 0 ? new CALayer(result) : null;
+}
+
public void lockFocus() {
OS.objc_msgSend(this.id, OS.sel_lockFocus);
}
+public boolean lockFocusIfCanDraw() {
+ return OS.objc_msgSend_bool(this.id, OS.sel_lockFocusIfCanDraw);
+}
+
public NSMenu menuForEvent(NSEvent event) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_menuForEvent_, event != null ? event.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_menuForEvent_, event != null ? event.id : 0);
return result != 0 ? new NSMenu(result) : null;
}
@@ -239,7 +200,7 @@ public void removeFromSuperview() {
OS.objc_msgSend(this.id, OS.sel_removeFromSuperview);
}
-public void removeToolTip(long /*int*/ tag) {
+public void removeToolTip(long tag) {
OS.objc_msgSend(this.id, OS.sel_removeToolTip_, tag);
}
@@ -263,10 +224,6 @@ public void scrollRect(NSRect aRect, NSSize delta) {
OS.objc_msgSend(this.id, OS.sel_scrollRect_by_, aRect, delta);
}
-public boolean scrollRectToVisible(NSRect aRect) {
- return OS.objc_msgSend_bool(this.id, OS.sel_scrollRectToVisible_, aRect);
-}
-
public void setAcceptsTouchEvents(boolean acceptsTouchEvents) {
OS.objc_msgSend(this.id, OS.sel_setAcceptsTouchEvents_, acceptsTouchEvents);
}
@@ -275,15 +232,19 @@ public void setAutoresizesSubviews(boolean autoresizesSubviews) {
OS.objc_msgSend(this.id, OS.sel_setAutoresizesSubviews_, autoresizesSubviews);
}
-public void setAutoresizingMask(long /*int*/ autoresizingMask) {
+public void setAutoresizingMask(long autoresizingMask) {
OS.objc_msgSend(this.id, OS.sel_setAutoresizingMask_, autoresizingMask);
}
-public void setBoundsRotation(double /*float*/ boundsRotation) {
+public void setBoundsRotation(double boundsRotation) {
OS.objc_msgSend(this.id, OS.sel_setBoundsRotation_, boundsRotation);
}
-public void setFocusRingType(long /*int*/ focusRingType) {
+public void setBoundsSize(NSSize newSize) {
+ OS.objc_msgSend(this.id, OS.sel_setBoundsSize_, newSize);
+}
+
+public void setFocusRingType(long focusRingType) {
OS.objc_msgSend(this.id, OS.sel_setFocusRingType_, focusRingType);
}
@@ -324,17 +285,17 @@ public boolean shouldDelayWindowOrderingForEvent(NSEvent theEvent) {
}
public NSArray subviews() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_subviews);
+ long result = OS.objc_msgSend(this.id, OS.sel_subviews);
return result != 0 ? new NSArray(result) : null;
}
public NSView superview() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_superview);
+ long result = OS.objc_msgSend(this.id, OS.sel_superview);
return result == this.id ? this : (result != 0 ? new NSView(result) : null);
}
public NSArray trackingAreas() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_trackingAreas);
+ long result = OS.objc_msgSend(this.id, OS.sel_trackingAreas);
return result != 0 ? new NSArray(result) : null;
}
@@ -365,7 +326,7 @@ public NSRect visibleRect() {
}
public NSWindow window() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_window);
+ long result = OS.objc_msgSend(this.id, OS.sel_window);
return result != 0 ? new NSWindow(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java
index 33dfabfbab..964eef4407 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSWindow() {
super();
}
-public NSWindow(long /*int*/ id) {
+public NSWindow(long id) {
super(id);
}
@@ -27,12 +27,12 @@ public NSWindow(id id) {
super(id);
}
-public void addChildWindow(NSWindow childWin, long /*int*/ place) {
+public void addChildWindow(NSWindow childWin, long place) {
OS.objc_msgSend(this.id, OS.sel_addChildWindow_ordered_, childWin != null ? childWin.id : 0, place);
}
-public double /*float*/ alphaValue() {
- return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_alphaValue);
+public double alphaValue() {
+ return OS.objc_msgSend_fpret(this.id, OS.sel_alphaValue);
}
public boolean areCursorRectsEnabled() {
@@ -57,12 +57,12 @@ public void close() {
OS.objc_msgSend(this.id, OS.sel_close);
}
-public long /*int*/ collectionBehavior() {
+public long collectionBehavior() {
return OS.objc_msgSend(this.id, OS.sel_collectionBehavior);
}
public NSView contentView() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_contentView);
+ long result = OS.objc_msgSend(this.id, OS.sel_contentView);
return result != 0 ? new NSView(result) : null;
}
@@ -79,12 +79,12 @@ public NSPoint convertScreenToBase(NSPoint aPoint) {
}
public NSButtonCell defaultButtonCell() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_defaultButtonCell);
+ long result = OS.objc_msgSend(this.id, OS.sel_defaultButtonCell);
return result != 0 ? new NSButtonCell(result) : null;
}
public id delegate() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_delegate);
+ long result = OS.objc_msgSend(this.id, OS.sel_delegate);
return result != 0 ? new id(result) : null;
}
@@ -117,12 +117,12 @@ public void endEditingFor(id anObject) {
}
public NSText fieldEditor(boolean createFlag, id anObject) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_fieldEditor_forObject_, createFlag, anObject != null ? anObject.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_fieldEditor_forObject_, createFlag, anObject != null ? anObject.id : 0);
return result != 0 ? new NSText(result) : null;
}
public NSResponder firstResponder() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_firstResponder);
+ long result = OS.objc_msgSend(this.id, OS.sel_firstResponder);
return result != 0 ? new NSResponder(result) : null;
}
@@ -143,7 +143,7 @@ public NSRect frameRectForContentRect(NSRect contentRect) {
}
public NSGraphicsContext graphicsContext() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_graphicsContext);
+ long result = OS.objc_msgSend(this.id, OS.sel_graphicsContext);
return result != 0 ? new NSGraphicsContext(result) : null;
}
@@ -151,13 +151,13 @@ public boolean hasShadow() {
return OS.objc_msgSend_bool(this.id, OS.sel_hasShadow);
}
-public NSWindow initWithContentRect(NSRect contentRect, long /*int*/ aStyle, long /*int*/ bufferingType, boolean flag) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_styleMask_backing_defer_, contentRect, aStyle, bufferingType, flag);
+public NSWindow initWithContentRect(NSRect contentRect, long aStyle, long bufferingType, boolean flag) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_styleMask_backing_defer_, contentRect, aStyle, bufferingType, flag);
return result == this.id ? this : (result != 0 ? new NSWindow(result) : null);
}
-public NSWindow initWithContentRect(NSRect contentRect, long /*int*/ aStyle, long /*int*/ bufferingType, boolean flag, NSScreen screen) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_styleMask_backing_defer_screen_, contentRect, aStyle, bufferingType, flag, screen != null ? screen.id : 0);
+public NSWindow initWithContentRect(NSRect contentRect, long aStyle, long bufferingType, boolean flag, NSScreen screen) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_styleMask_backing_defer_screen_, contentRect, aStyle, bufferingType, flag, screen != null ? screen.id : 0);
return result == this.id ? this : (result != 0 ? new NSWindow(result) : null);
}
@@ -193,10 +193,6 @@ public boolean isZoomed() {
return OS.objc_msgSend_bool(this.id, OS.sel_isZoomed);
}
-public long /*int*/ level() {
- return OS.objc_msgSend(this.id, OS.sel_level);
-}
-
public boolean makeFirstResponder(NSResponder aResponder) {
return OS.objc_msgSend_bool(this.id, OS.sel_makeFirstResponder_, aResponder != null ? aResponder.id : 0);
}
@@ -205,8 +201,14 @@ public void makeKeyAndOrderFront(id sender) {
OS.objc_msgSend(this.id, OS.sel_makeKeyAndOrderFront_, sender != null ? sender.id : 0);
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_NSWindow, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+public NSSize maxSize() {
+ NSSize result = new NSSize();
+ OS.objc_msgSend_stret(result, this.id, OS.sel_maxSize);
+ return result;
+}
+
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_NSWindow, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
public NSSize minSize() {
@@ -241,12 +243,12 @@ public void orderOut(id sender) {
OS.objc_msgSend(this.id, OS.sel_orderOut_, sender != null ? sender.id : 0);
}
-public void orderWindow(long /*int*/ place, long /*int*/ otherWin) {
+public void orderWindow(long place, long otherWin) {
OS.objc_msgSend(this.id, OS.sel_orderWindow_relativeTo_, place, otherWin);
}
public NSWindow parentWindow() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_parentWindow);
+ long result = OS.objc_msgSend(this.id, OS.sel_parentWindow);
return result == this.id ? this : (result != 0 ? new NSWindow(result) : null);
}
@@ -255,7 +257,7 @@ public void removeChildWindow(NSWindow childWin) {
}
public NSScreen screen() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_screen);
+ long result = OS.objc_msgSend(this.id, OS.sel_screen);
return result != 0 ? new NSScreen(result) : null;
}
@@ -267,7 +269,7 @@ public void setAcceptsMouseMovedEvents(boolean acceptsMouseMovedEvents) {
OS.objc_msgSend(this.id, OS.sel_setAcceptsMouseMovedEvents_, acceptsMouseMovedEvents);
}
-public void setAlphaValue(double /*float*/ alphaValue) {
+public void setAlphaValue(double alphaValue) {
OS.objc_msgSend(this.id, OS.sel_setAlphaValue_, alphaValue);
}
@@ -275,7 +277,7 @@ public void setBackgroundColor(NSColor backgroundColor) {
OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, backgroundColor != null ? backgroundColor.id : 0);
}
-public void setCollectionBehavior(long /*int*/ collectionBehavior) {
+public void setCollectionBehavior(long collectionBehavior) {
OS.objc_msgSend(this.id, OS.sel_setCollectionBehavior_, collectionBehavior);
}
@@ -311,10 +313,14 @@ public void setHidesOnDeactivate(boolean hidesOnDeactivate) {
OS.objc_msgSend(this.id, OS.sel_setHidesOnDeactivate_, hidesOnDeactivate);
}
-public void setLevel(long /*int*/ level) {
+public void setLevel(long level) {
OS.objc_msgSend(this.id, OS.sel_setLevel_, level);
}
+public void setMaxSize(NSSize maxSize) {
+ OS.objc_msgSend(this.id, OS.sel_setMaxSize_, maxSize);
+}
+
public void setMinSize(NSSize minSize) {
OS.objc_msgSend(this.id, OS.sel_setMinSize_, minSize);
}
@@ -355,36 +361,27 @@ public void setToolbar(NSToolbar toolbar) {
OS.objc_msgSend(this.id, OS.sel_setToolbar_, toolbar != null ? toolbar.id : 0);
}
-public NSButton standardWindowButton(long /*int*/ b) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_standardWindowButton_, b);
- return result != 0 ? new NSButton(result) : null;
-}
-
-public long /*int*/ styleMask() {
+public long styleMask() {
return OS.objc_msgSend(this.id, OS.sel_styleMask);
}
-public void toggleToolbarShown(id sender) {
- OS.objc_msgSend(this.id, OS.sel_toggleToolbarShown_, sender != null ? sender.id : 0);
+public void toggleFullScreen(id sender) {
+ OS.objc_msgSend(this.id, OS.sel_toggleFullScreen_, sender != null ? sender.id : 0);
}
public NSToolbar toolbar() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_toolbar);
+ long result = OS.objc_msgSend(this.id, OS.sel_toolbar);
return result != 0 ? new NSToolbar(result) : null;
}
-public long /*int*/ windowNumber() {
+public long windowNumber() {
return OS.objc_msgSend(this.id, OS.sel_windowNumber);
}
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_NSWindow, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
-public long /*int*/ windowRef() {
- return OS.objc_msgSend(this.id, OS.sel_windowRef);
-}
-
public void zoom(id sender) {
OS.objc_msgSend(this.id, OS.sel_zoom_, sender != null ? sender.id : 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java
index b3aca12ef3..46b9d320f1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSWorkspace() {
super();
}
-public NSWorkspace(long /*int*/ id) {
+public NSWorkspace(long id) {
super(id);
}
@@ -28,21 +28,12 @@ public NSWorkspace(id id) {
}
public NSString fullPathForApplication(NSString appName) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_fullPathForApplication_, appName != null ? appName.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_fullPathForApplication_, appName != null ? appName.id : 0);
return result != 0 ? new NSString(result) : null;
}
-public boolean getInfoForFile(NSString fullPath, long /*int*/ appName, long /*int*/ type) {
- return OS.objc_msgSend_bool(this.id, OS.sel_getInfoForFile_application_type_, fullPath != null ? fullPath.id : 0, appName, type);
-}
-
public NSImage iconForFile(NSString fullPath) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_iconForFile_, fullPath != null ? fullPath.id : 0);
- return result != 0 ? new NSImage(result) : null;
-}
-
-public NSImage iconForFileType(NSString fileType) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_iconForFileType_, fileType != null ? fileType.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_iconForFile_, fullPath != null ? fullPath.id : 0);
return result != 0 ? new NSImage(result) : null;
}
@@ -50,20 +41,16 @@ public boolean isFilePackageAtPath(NSString fullPath) {
return OS.objc_msgSend_bool(this.id, OS.sel_isFilePackageAtPath_, fullPath != null ? fullPath.id : 0);
}
-public boolean openFile(NSString fullPath, NSString appName) {
- return OS.objc_msgSend_bool(this.id, OS.sel_openFile_withApplication_, fullPath != null ? fullPath.id : 0, appName != null ? appName.id : 0);
-}
-
public boolean openURL(NSURL url) {
return OS.objc_msgSend_bool(this.id, OS.sel_openURL_, url != null ? url.id : 0);
}
-public boolean openURLs(NSArray urls, NSString bundleIdentifier, long /*int*/ options, NSAppleEventDescriptor descriptor, long /*int*/ identifiers) {
+public boolean openURLs(NSArray urls, NSString bundleIdentifier, long options, NSAppleEventDescriptor descriptor, long identifiers) {
return OS.objc_msgSend_bool(this.id, OS.sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_, urls != null ? urls.id : 0, bundleIdentifier != null ? bundleIdentifier.id : 0, options, descriptor != null ? descriptor.id : 0, identifiers);
}
public static NSWorkspace sharedWorkspace() {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSWorkspace, OS.sel_sharedWorkspace);
+ long result = OS.objc_msgSend(OS.class_NSWorkspace, OS.sel_sharedWorkspace);
return result != 0 ? new NSWorkspace(result) : null;
}
@@ -71,8 +58,8 @@ public boolean type(NSString firstTypeName, NSString secondTypeName) {
return OS.objc_msgSend_bool(this.id, OS.sel_type_conformsToType_, firstTypeName != null ? firstTypeName.id : 0, secondTypeName != null ? secondTypeName.id : 0);
}
-public NSString typeOfFile(NSString absoluteFilePath, long /*int*/ outError) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_typeOfFile_error_, absoluteFilePath != null ? absoluteFilePath.id : 0, outError);
+public NSString typeOfFile(NSString absoluteFilePath, long outError) {
+ long result = OS.objc_msgSend(this.id, OS.sel_typeOfFile_error_, absoluteFilePath != null ? absoluteFilePath.id : 0, outError);
return result != 0 ? new NSString(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index 93cbd45fb4..d8bb1b5091 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others.
+ * Copyright (c) 2007, 2022 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,28 +21,25 @@ public class OS extends C {
Library.loadLibrary("swt-pi"); //$NON-NLS-1$
}
- /**
- * NOTE: For new code, use {@link #VERSION_MMB} and {@link #VERSION_MMB(int, int, int)}
+ /*
+ * macOS version, encoded as ((major << 16) + (minor << 8) + bugfix).
+ *
+ * Note that for macOS >= 11, it has "wrong" values if executable's
+ * SDK is below 10.15 (or is it 11.0?), where 10.16.0 is reported
+ * regardless of actual macOS version. On the other hand, with good
+ * executable's SDK, real version is reported.
+ *
+ * This also means that executables with old SDK can't distinguish
+ * macOS 11 from macOS 12.
*/
public static final int VERSION;
- public static final int VERSION_MMB;
- static {
- int [] response = new int [1];
- OS.Gestalt (OS.gestaltSystemVersion, response);
- VERSION = response [0] & 0xffff;
- OS.Gestalt (OS.gestaltSystemVersionMajor, response);
- int major = response [0];
- OS.Gestalt (OS.gestaltSystemVersionMinor, response);
- int minor = response [0];
- OS.Gestalt (OS.gestaltSystemVersionBugFix, response);
- int bugFix = response [0];
- VERSION_MMB = VERSION_MMB (major, minor, bugFix);
- }
- public static int VERSION_MMB (int major, int minor, int bugFix) {
- return (major << 16) + (minor << 8) + bugFix;
+ public static int VERSION (int major, int minor, int bugfix) {
+ return (major << 16) + (minor << 8) + bugfix;
}
+ public static final boolean IS_X86_64 = System.getProperty("os.arch").equals("x86_64"); //$NON-NLS-1$
+
/*
* Magic number explanation, from Cocoa's TextSizingExample:
*
@@ -54,23 +51,13 @@ public class OS extends C {
* field-like text views created by the FieldAspect class. This is simply half of LargeNumberForText; at sizes as large as LargeNumberForText,
* the text system stops aligning text, for various reasons."
*/
- public static final double /*float*/ MAX_TEXT_CONTAINER_SIZE = 0.5e7f;
+ public static final double MAX_TEXT_CONTAINER_SIZE = 0.5e7f;
- public static final int gestaltSystemVersion = ('s'<<24) + ('y'<<16) + ('s'<<8) + 'v';
- public static final int gestaltSystemVersionMajor = ('s'<<24) + ('y'<<16) + ('s'<<8) + '1';
- public static final int gestaltSystemVersionMinor = ('s'<<24) + ('y'<<16) + ('s'<<8) + '2';
- public static final int gestaltSystemVersionBugFix = ('s'<<24) + ('y'<<16) + ('s'<<8) + '3';
public static final int noErr = 0;
- public static final int kProcessTransformToForegroundApplication = 1;
public static final int kSystemIconsCreator = ('m' << 24) + ('a' << 16) + ('c' << 8) + 's';
public static final int kAlertCautionIcon = ('c'<<24) + ('a'<<16) + ('u'<<8) + 't';
public static final int kAlertNoteIcon = ('n'<<24) + ('o'<<16) + ('t'<<8) + 'e';
public static final int kAlertStopIcon = ('s'<<24) + ('t'<<16) + ('o'<<8) + 'p';
- public static final int kHICommandHide = ('h'<<24) + ('i'<<16) + ('d'<<8) + 'e';
- public static final int kHICommandHideOthers = ('h'<<24) + ('i'<<16) + ('d'<<8) + 'o';
- public static final int kHICommandShowAll = ('s'<<24) + ('h'<<16) + ('a'<<8) + 'l';
- public static final int kHICommandQuit = ('q'<<24) + ('u'<<16) + ('i'<<8) + 't';
- public static final int kHICommandServices = ('s'<<24) + ('e'<<16) + ('r'<<8) + 'v';
public static final int shiftKey = 1 << 9;
public static final int kThemeMetricFocusRectOutset = 7;
public static final int kHIThemeOrientationNormal = 0;
@@ -89,116 +76,90 @@ public class OS extends C {
public static final int kPMDuplexNoTumble = 0x0002;
public static final int kPMDuplexTumble = 0x0003;
- public static final long /*int*/ sel_identity = Selector.sel_identity.value;
- public static final long /*int*/ sel_sendSearchSelection = Selector.sel_sendSearchSelection.value;
- public static final long /*int*/ sel_sendCancelSelection = Selector.sel_sendCancelSelection.value;
- public static final long /*int*/ sel_sendSelection = Selector.sel_sendSelection.value;
- public static final long /*int*/ sel_sendSelection_ = Selector.sel_sendSelection_.value;
- public static final long /*int*/ sel_sendDoubleSelection = Selector.sel_sendDoubleSelection.value;
- public static final long /*int*/ sel_sendVerticalSelection = Selector.sel_sendVerticalSelection.value;
- public static final long /*int*/ sel_sendHorizontalSelection = Selector.sel_sendHorizontalSelection.value;
- public static final long /*int*/ sel_timerProc_ = Selector.sel_timerProc_.value;
- public static final long /*int*/ sel_handleNotification_ = Selector.sel_handleNotification_.value;
- public static final long /*int*/ sel_callJava = Selector.sel_callJava.value;
- public static final long /*int*/ sel_callRunBeforeUnloadConfirmPanelWithMessage = Selector.sel_callRunBeforeUnloadConfirmPanelWithMessage.value;
- public static final long /*int*/ sel_createPanelDidEnd = Selector.sel_createPanelDidEnd.value;
- public static final long /*int*/ sel_systemColorSettingsChanged_ = Selector.sel_systemColorSettingsChanged_.value;
- public static final long /*int*/ sel_screenParametersChanged_ = Selector.sel_screenParametersChanged_.value;
- public static final long /*int*/ sel_panelDidEnd_returnCode_contextInfo_ = Selector.sel_panelDidEnd_returnCode_contextInfo_.value;
- public static final long /*int*/ sel_updateOpenGLContext_ = Selector.sel_updateOpenGLContext_.value;
-
- public static final long /*int*/ sel_overwriteExistingFileCheck = Selector.sel_overwriteExistingFileCheck.value;
- public static final long /*int*/ sel_setShowsHiddenFiles_ = Selector.sel_setShowsHiddenFiles_.value;
+ public static final long sel_identity = Selector.sel_identity.value;
+ public static final long sel_sendSearchSelection = Selector.sel_sendSearchSelection.value;
+ public static final long sel_sendCancelSelection = Selector.sel_sendCancelSelection.value;
+ public static final long sel_sendSelection = Selector.sel_sendSelection.value;
+ public static final long sel_sendSelection_ = Selector.sel_sendSelection_.value;
+ public static final long sel_sendDoubleSelection = Selector.sel_sendDoubleSelection.value;
+ public static final long sel_sendVerticalSelection = Selector.sel_sendVerticalSelection.value;
+ public static final long sel_sendHorizontalSelection = Selector.sel_sendHorizontalSelection.value;
+ public static final long sel_timerProc_ = Selector.sel_timerProc_.value;
+ public static final long sel_callJava = Selector.sel_callJava.value;
+ public static final long sel_callRunBeforeUnloadConfirmPanelWithMessage = Selector.sel_callRunBeforeUnloadConfirmPanelWithMessage.value;
+ public static final long sel_createPanelDidEnd = Selector.sel_createPanelDidEnd.value;
+ public static final long sel_systemColorSettingsChanged_ = Selector.sel_systemColorSettingsChanged_.value;
+ public static final long sel_screenParametersChanged_ = Selector.sel_screenParametersChanged_.value;
+ public static final long sel_panelDidEnd_returnCode_contextInfo_ = Selector.sel_panelDidEnd_returnCode_contextInfo_.value;
+ public static final long sel_updateOpenGLContext_ = Selector.sel_updateOpenGLContext_.value;
- public static final long /*int*/ sel_contextID = Selector.sel_contextID.value;
+ public static final long sel_overwriteExistingFileCheck = Selector.sel_overwriteExistingFileCheck.value;
- public static final long /*int*/ sel__drawThemeProgressArea_ = Selector.sel__drawThemeProgressArea_.value;
+ public static final long sel__drawThemeProgressArea_ = Selector.sel__drawThemeProgressArea_.value;
- public static final long /*int*/ sel__setDashboardBehavior = Selector.sel__setDashboardBehavior.value;
+ public static final long sel__setDashboardBehavior = Selector.sel__setDashboardBehavior.value;
- public static final long /*int*/ sel__setNeedsToUseHeartBeatWindow_ = Selector.sel__setNeedsToUseHeartBeatWindow_.value;
+ public static final long class_WebPanelAuthenticationHandler = OS.objc_getClass("WebPanelAuthenticationHandler");
+ public static final long sel_sharedHandler = Selector.sel_sharedHandler.value;
+ public static final long sel_startAuthentication = Selector.sel_startAuthentication.value;
+ public static final long sel_setAllowsAnyHTTPSCertificate = Selector.sel_setAllowsAnyHTTPSCertificate.value;
- public static final long /*int*/ class_WebPanelAuthenticationHandler = OS.objc_getClass("WebPanelAuthenticationHandler");
- public static final long /*int*/ sel_sharedHandler = Selector.sel_sharedHandler.value;
- public static final long /*int*/ sel_startAuthentication = Selector.sel_startAuthentication.value;
- public static final long /*int*/ sel_setAllowsAnyHTTPSCertificate = Selector.sel_setAllowsAnyHTTPSCertificate.value;
+ public static final long sel_accessibleHandle = Selector.sel_accessibleHandle.value;
+ public static final long sel_getImageView = Selector.sel_getImageView.value;
- public static final long /*int*/ sel_accessibleHandle = Selector.sel_accessibleHandle.value;
- public static final long /*int*/ sel_getImageView = Selector.sel_getImageView.value;
+ public static final long sel_clearDeferFlushing = Selector.sel_clearDeferFlushing.value;
- public static final long /*int*/ sel_clearDeferFlushing = Selector.sel_clearDeferFlushing.value;
+ public static final long sel_setShouldExpandItem_ = Selector.sel_setShouldExpandItem_.value;
+ public static final long sel_setShouldScrollClipView_ = Selector.sel_setShouldScrollClipView_.value;
- public static final long /*int*/ sel_setShouldExpandItem_ = Selector.sel_setShouldExpandItem_.value;
- public static final long /*int*/ sel_setShouldScrollClipView_ = Selector.sel_setShouldScrollClipView_.value;
+ public static final long sel_setQuota = Selector.sel_setQuota.value;
+ public static final long sel_webView_frame_exceededDatabaseQuotaForSecurityOrigin_database_ = Selector.sel_webView_frame_exceededDatabaseQuotaForSecurityOrigin_database.value;
- public static final long /*int*/ sel_setQuota = Selector.sel_setQuota.value;
- public static final long /*int*/ sel_webView_frame_exceededDatabaseQuotaForSecurityOrigin_database_ = Selector.sel_webView_frame_exceededDatabaseQuotaForSecurityOrigin_database.value;
-
- public static final long /*int*/ sel_beginSheetModalForWindow_completionHandler_ = Selector.sel_beginSheetModalForWindow_completionHandler_.value;
+ public static final long sel_beginSheetModalForWindow_completionHandler_ = Selector.sel_beginSheetModalForWindow_completionHandler_.value;
/** custom selector for SWT.OpenUrl event, also used in the launcher **/
- public static final long /*int*/ sel_application_openUrls_ = Selector.sel_application_openUrls_.value;
+ public static final long sel_application_openUrls_ = Selector.sel_application_openUrls_.value;
/** non-API selector for NSCursor **/
- public static final long /*int*/ sel_busyButClickableCursor = Selector.sel_busyButClickableCursor.value;
+ public static final long sel_busyButClickableCursor = Selector.sel_busyButClickableCursor.value;
/* These are not generated in order to avoid creating static methods on all classes */
- public static final long /*int*/ sel_isSelectorExcludedFromWebScript_ = Selector.sel_isSelectorExcludedFromWebScript_.value;
- public static final long /*int*/ sel_webScriptNameForSelector_ = Selector.sel_webScriptNameForSelector_.value;
+ public static final long sel_isSelectorExcludedFromWebScript_ = Selector.sel_isSelectorExcludedFromWebScript_.value;
+ public static final long sel_webScriptNameForSelector_ = Selector.sel_webScriptNameForSelector_.value;
- public static final long /*int*/ sel_setColor_forAttribute_ = Selector.sel_setColor_forAttribute_.value;
+ public static final long sel_setColor_forAttribute_ = Selector.sel_setColor_forAttribute_.value;
- public static final long /*int*/ sel_javaRunLoopMode = Selector.sel_javaRunLoopMode.value;
+ public static final long sel_javaRunLoopMode = Selector.sel_javaRunLoopMode.value;
/* These are not generated in order to avoid attempting to create a java method called "null" */
- public static final long /*int*/ class_NSNull = objc_getClass("NSNull");
- public static final long /*int*/ sel_null = Selector.sel_null.value;
+ public static final long class_NSNull = objc_getClass("NSNull");
+ public static final long sel_null = Selector.sel_null.value;
/* NSTextAttachmentCell */
/** @method callback_types=NSPoint;id;SEL;,callback_flags=struct;none;none; */
- public static final native long /*int*/ CALLBACK_cellBaselineOffset(long /*int*/ func);
+ public static final native long CALLBACK_cellBaselineOffset(long func);
/** @method callback_types=NSSize;id;SEL;,callback_flags=struct;none;none; */
- public static final native long /*int*/ CALLBACK_NSTextAttachmentCell_cellSize(long /*int*/ func);
+ public static final native long CALLBACK_NSTextAttachmentCell_cellSize(long func);
/** @method callback_types=id;id;SEL;,callback_flags=struct;none;none; */
- public static final native long /*int*/ CALLBACK_NSTextAttachmentCell_attachment(long /*int*/ func);
- public static final long /*int*/ sel_cellBaselineOffset = Selector.sel_cellBaselineOffset.value;
-
- /*10.6 Accessibility Strings*/
- /** @method flags=const dynamic no_gen*/
- public static final native long /*int*/ NSAccessibilityRowIndexRangeAttribute();
- public static final NSString NSAccessibilityRowIndexRangeAttribute = new NSString(NSAccessibilityRowIndexRangeAttribute());
- /** @method flags=const dynamic no_gen*/
- public static final native long /*int*/ NSAccessibilityColumnIndexRangeAttribute();
- public static final NSString NSAccessibilityColumnIndexRangeAttribute = new NSString(NSAccessibilityColumnIndexRangeAttribute());
- /** @method flags=const dynamic no_gen*/
- public static final native long /*int*/ NSAccessibilityCellForColumnAndRowParameterizedAttribute();
- public static final NSString NSAccessibilityCellForColumnAndRowParameterizedAttribute = new NSString(NSAccessibilityCellForColumnAndRowParameterizedAttribute());
- /** @method flags=const dynamic no_gen*/
- public static final native long /*int*/ NSAccessibilityCellRole();
- public static final NSString NSAccessibilityCellRole = new NSString(NSAccessibilityCellRole());
+ public static final native long CALLBACK_NSTextAttachmentCell_attachment(long func);
+ public static final long sel_cellBaselineOffset = Selector.sel_cellBaselineOffset.value;
- /** 10.7 selectors and constants */
- public static final long /*int*/ sel_isCompatibleWithOverlayScrollers = Selector.sel_isCompatibleWithOverlayScrollers.value;
- public static final long /*int*/ sel_flashScrollers = Selector.sel_flashScrollers.value;
- public static final long /*int*/ sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_ = Selector.sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_.value;
- public static final long /*int*/ sel_scrollerStyle = Selector.sel_scrollerStyle.value;
- public static final long /*int*/ sel_toggleFullScreen_ = Selector.sel_toggleFullScreen_.value;
+ /** 10.12 selector */
+ public static final long sel_setAllowsAutomaticWindowTabbing_ = Selector.sel_setAllowsAutomaticWindowTabbing.value;
- public static final int NSScrollerStyleLegacy = 0;
- public static final int NSScrollerStyleOverlay = 1;
- public static final int NSWindowFullScreenButton = 7;
- public static final int NSFullScreenWindowMask = 1 << 14;
- public static final int NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7;
- public static final int NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8;
+ /** 10.14 selectors */
+ public static final long sel_selectedContentBackgroundColor = Selector.sel_selectedContentBackgroundColor.value;
+ public static final long sel_unemphasizedSelectedContentBackgroundColor = Selector.sel_unemphasizedSelectedContentBackgroundColor.value;
- /** 10.12 selector */
- public static final long /*int*/ sel_setAllowsAutomaticWindowTabbing_ = Selector.sel_setAllowsAutomaticWindowTabbing.value;
+ /** 11.0 selector and enum */
+ public static final long sel_setStyle = Selector.sel_setStyle.value;
+ public static final int NSTableViewStylePlain = 4;
/* AWT application delegate. Remove these when JavaRuntimeSupport.framework has bridgesupport generated for it. */
- public static final long /*int*/ class_JRSAppKitAWT = objc_getClass("JRSAppKitAWT");
- public static final long /*int*/ sel_awtAppDelegate = Selector.sel_awtAppDelegate.value;
+ public static final long class_JRSAppKitAWT = objc_getClass("JRSAppKitAWT");
+ public static final long sel_awtAppDelegate = Selector.sel_awtAppDelegate.value;
- public static final long /*int*/ class_NSToolbarView = objc_getClass("NSToolbarView");
+ public static final long class_NSToolbarView = objc_getClass("NSToolbarView");
/*
* Wrapper function which will call NSSavePanel.beginSheetModalForWindow. This
@@ -209,44 +170,77 @@ public class OS extends C {
*/
/** @method flags=no_gen*/
public static native void beginSheetModalForWindow(long id, long sel, long window, long handler);
- public static void beginSheetModalForWindow(NSPanel id, NSWindow window, long handler) {
+ public static void beginSheetModalForWindow(NSObject id, NSWindow window, long handler) {
OS.beginSheetModalForWindow(id.id, OS.sel_beginSheetModalForWindow_completionHandler_, window != null ? window.id : 0, handler);
}
/*
* Custom message that will be sent when setTheme is called for example from Platform UI code.
*/
- public static final long /*int*/ sel_appAppearanceChanged = OS.sel_registerName("appAppearanceChanged");
+ public static final long sel_appAppearanceChanged = OS.sel_registerName("appAppearanceChanged");
+
+ /**
+ * Experimental API for dark theme.
+ * <p>
+ * On Windows, there is no OS API for dark theme yet, and this method only
+ * configures various tweaks. Some of these tweaks have drawbacks. The tweaks
+ * are configured with defaults that fit Eclipse. Non-Eclipse applications are
+ * expected to configure individual tweaks instead of calling this method.
+ * Please see <code>Display#setData()</code> and documentation for string keys
+ * used there.
+ * </p>
+ * <p>
+ * On GTK, behavior may be different as the boolean flag doesn't force dark
+ * theme instead it specify that dark theme is preferred.
+ * </p>
+ *
+ * @param isDarkTheme <code>true</code> for dark theme
+ */
public static void setTheme(boolean isDarkTheme) {
OS.objc_msgSend(NSApplication.sharedApplication().id, sel_appAppearanceChanged, isDarkTheme ? 1 : 0);
}
+ public static boolean isAppDarkAppearance() {
+ if (OS.VERSION >= OS.VERSION(10, 14, 0)) {
+ NSAppearance currentAppearance = NSAppearance.currentAppearance();
+ if (currentAppearance != null) {
+ return "NSAppearanceNameDarkAqua".equals(currentAppearance.name().getString());
+ }
+ }
+ return false;
+ }
+ public static boolean isSystemDarkAppearance() {
+ if (OS.VERSION >= OS.VERSION(10, 14, 0)) {
+ NSString osxMode = NSUserDefaults.standardUserDefaults ().stringForKey (NSString.stringWith ("AppleInterfaceStyle"));
+ return osxMode != null && "Dark".equals (osxMode.getString ());
+ }
+ return false;
+ }
+ /**
+ * @return true for macOS BigSur or later, returns false for macOS 10.15 and older
+ */
+ public static boolean isBigSurOrLater () {
+ // See comment for OS.VERSION for an explanation
+ return OS.VERSION >= OS.VERSION(10, 16, 0);
+ }
/** JNI natives */
/** @method flags=jni */
-public static final native long /*int*/ NewGlobalRef(Object object);
+public static final native long NewGlobalRef(Object object);
/**
* @method flags=jni
* @param globalRef cast=(jobject)
*/
-public static final native void DeleteGlobalRef(long /*int*/ globalRef);
+public static final native void DeleteGlobalRef(long globalRef);
/** @method flags=no_gen */
-public static final native Object JNIGetObject(long /*int*/ globalRef);
+public static final native Object JNIGetObject(long globalRef);
/** Carbon calls */
-public static final native int Gestalt(int selector, int[] response);
/** @param psn cast=(ProcessSerialNumber *) */
public static final native int GetCurrentProcess(int[] psn);
-/** @param psn cast=(ProcessSerialNumber *) */
-public static final native int TransformProcessType(int[] psn, int transformState);
-public static final native int CPSSetProcessName(int[] psn, long /*int*/ name);
-/** @method flags=dynamic */
-public static final native int SetThemeCursor(int themeCursor);
-/** @method flags=dynamic */
-public static final native int GetCurrentEventButtonState();
+public static final native int CPSSetProcessName(int[] psn, long name);
/** @method flags=dynamic */
-public static final native int GetDblTime();
/** @method flags=dynamic
@param inCreator cast=(OSType)
@param inType cast=(OSType)
@@ -254,18 +248,15 @@ public static final native int GetDblTime();
@param inMIMEType cast=(CFStringRef)
@param inUsageFlags cast=(IconServicesUsageFlags)
@param outIconRef cast=(IconRef *) */
-public static final native int GetIconRefFromTypeInfo(int inCreator, int inType, long /*int*/ inExtension, long /*int*/ inMIMEType, int inUsageFlags, long /*int*/ outIconRef[]);
-/** @method flags=dynamic
- @param context cast=(CGContextRef) */
-public static final native long /*int*/ CGContextCopyPath(long /*int*/ context);
+public static final native int GetIconRefFromTypeInfo(int inCreator, int inType, long inExtension, long inMIMEType, int inUsageFlags, long outIconRef[]);
/** @method flags=dynamic */
-public static final native long /*int*/ TISCopyCurrentKeyboardInputSource();
+public static final native long TISCopyCurrentKeyboardInputSource();
/** @method flags=dynamic
- @param inputSource cast=(TISInputSourceRef)
- @param propertyKey cast=(CFStringRef) */
-public static final native long /*int*/ TISGetInputSourceProperty (long /*int*/ inputSource, long /*int*/ propertyKey);
+ @param inputSource cast=(TISInputSourceRef)
+ @param propertyKey cast=(CFStringRef) */
+public static final native long TISGetInputSourceProperty (long inputSource, long propertyKey);
/** @method flags=no_gen */
-public static final native long /*int*/ kTISPropertyUnicodeKeyLayoutData();
+public static final native long kTISPropertyUnicodeKeyLayoutData();
/**
* @method flags=dynamic
* @param inMode cast=(UInt32)
@@ -291,12 +282,12 @@ public static final native int GetSystemUIMode(int[] outMode, int[] outOptions);
* @param actualStringLength cast=(UniCharCount *)
* @param unicodeString cast=(UniChar *)
*/
-public static final native int UCKeyTranslate (long /*int*/ keyLayoutPtr, short virtualKeyCode, short keyAction, int modifierKeyState, int keyboardType, int keyTranslateOptions, int[] deadKeyState, int maxStringLength, int[] actualStringLength, char[] unicodeString);
+public static final native int UCKeyTranslate (long keyLayoutPtr, short virtualKeyCode, short keyAction, int modifierKeyState, int keyboardType, int keyTranslateOptions, int[] deadKeyState, int maxStringLength, long[] actualStringLength, char[] unicodeString);
/**
* @param inUTI1 cast=(CFStringRef)
* @param inUTI2 cast=(CFStringRef)
*/
-public static final native boolean UTTypeEqual(long /*int*/ inUTI1, long /*int*/ inUTI2);
+public static final native boolean UTTypeEqual(long inUTI1, long inUTI2);
/**
* @method flags=dynamic
@@ -307,43 +298,17 @@ public static final native void GetThemeMetric(int themeConstant, int[] metric);
* @method flags=dynamic
* @param inContext cast=(CGContextRef)
*/
-public static final native int HIThemeDrawFocusRect(CGRect inRect, boolean inHasFocus, long /*int*/ inContext, int inOrientation);
+public static final native int HIThemeDrawFocusRect(CGRect inRect, boolean inHasFocus, long inContext, int inOrientation);
public static final int kUCKeyActionDown = 0;
public static final int kUCKeyActionUp = 1;
-
-public static final int kThemeCopyArrowCursor = 1;
-public static final int kThemeNotAllowedCursor = 18;
-public static final int kThemeAliasArrowCursor = 2;
-
-/** @method flags=dynamic
- * @param iFile cast=(const FSRef *)
- * @param iContext cast=(ATSFontContext)
- * @param iFormat cast=(ATSFontFormat)
- * @param iReserved cast=(void *)
- * @param iOptions cast=(ATSOptionFlags)
- * @param oContainer cast=(ATSFontContainerRef *)
- */
-public static final native int ATSFontActivateFromFileReference(byte[] iFile, int iContext, int iFormat, long /*int*/ iReserved, int iOptions, long /*int*/ [] oContainer);
-
-public static final int kATSFontContextLocal = 2;
-public static final int kATSOptionFlagsDefault = 0;
-public static final int kATSFontFormatUnspecified = 0;
-
-/** @method flags=dynamic
- * @param path cast=(const UInt8 *)
- * @param ref cast=(FSRef *)
- * @param isDirectory cast=(Boolean *)
- */
-public static final native int FSPathMakeRef (long /*int*/ path, byte[] ref, boolean[] isDirectory);
-
/** @method flags=dynamic */
public static final native byte LMGetKbdType();
/** @method flags=dynamic */
-public static final native long /*int*/ AcquireRootMenu ();
+public static final native long AcquireRootMenu ();
/** @method flags=dynamic */
-public static final native int CancelMenuTracking (long /*int*/ inRootMenu, boolean inImmediate, int inDismissalReason);
+public static final native int CancelMenuTracking (long inRootMenu, boolean inImmediate, int inDismissalReason);
/**
* @param inType cast=(OSType)
* @param inCreator cast=(OSType)
@@ -352,169 +317,96 @@ public static final native int CancelMenuTracking (long /*int*/ inRootMenu, bool
* @param outAppRef cast=(FSRef *)
* @param outAppURL cast=(CFURLRef *)
*/
-public static final native long /*int*/ LSGetApplicationForInfo(int inType, int inCreator,long /*int*/ inExtension, int inRoleMask, byte[] outAppRef, int[] outAppURL);
-/** @method flags=dynamic
- * @param mHandle cast=(MenuRef)
- * @param commandId cast=(MenuCommand)
- * @param index cast=(UInt32)
- * @param outMenu cast=(MenuRef *)
- * @param outIndex cast=(MenuItemIndex *)
- */
-public static final native int GetIndMenuItemWithCommandID(long /*int*/ mHandle, int commandId, int index, long /*int*/ [] outMenu, short[] outIndex);
-/** @method flags=dynamic
- * @param mHandle cast=(MenuRef)
- * @param index cast=(short)
- */
-public static final native void DeleteMenuItem(long /*int*/ mHandle, short index);
+public static final native long LSGetApplicationForInfo(int inType, int inCreator,long inExtension, int inRoleMask, byte[] outAppRef, int[] outAppURL);
/** @method flags=dynamic
* @param pmSessionInfo cast=(PMPrintSession)
* @param outPMPrinter cast=(PMPrinter *)
*/
-public static final native long /*int*/ PMSessionGetCurrentPrinter(long /*int*/ pmSessionInfo, long /*int*/[] outPMPrinter);
+public static final native long PMSessionGetCurrentPrinter(long pmSessionInfo, long[] outPMPrinter);
/** @method flags=dynamic
* @param pmSessionInfo cast=(PMPrintSession)
* @param pmPrintSettings cast=(PMPrintSettings)
*/
-public static final native long /*int*/ PMSessionGetDestinationType(long /*int*/ pmSessionInfo, long /*int*/ pmPrintSettings, short[] outDestinationType);
+public static final native long PMSessionGetDestinationType(long pmSessionInfo, long pmPrintSettings, short[] outDestinationType);
/** @method flags=dynamic
* @param printSettings cast=(PMPrintSettings)
* @param outDuplexSetting cast=(PMDuplexMode *)
*/
-public static final native long /*int*/ PMGetDuplex(long /*int*/ printSettings, int[] outDuplexSetting);
+public static final native long PMGetDuplex(long printSettings, int[] outDuplexSetting);
/** @method flags=dynamic
* @param printSettings cast=(PMPrintSettings)
* @param duplexSetting cast=(PMDuplexMode)
*/
-public static final native long /*int*/ PMSetDuplex(long /*int*/ printSettings, int duplexSetting);
+public static final native long PMSetDuplex(long printSettings, int duplexSetting);
/** @method flags=dynamic
* @param pmPrinter cast=(PMPrinter)
* @param outNumResolutions cast=(UInt32 *)
*/
-public static final native long /*int*/ PMPrinterGetPrinterResolutionCount(long /*int*/ pmPrinter, int[] outNumResolutions);
+public static final native long PMPrinterGetPrinterResolutionCount(long pmPrinter, int[] outNumResolutions);
/** @method flags=dynamic
* @param pmPrinter cast=(PMPrinter)
* @param pmPrintSettings cast=(PMPrintSettings)
* @param outResolution cast=(PMResolution *)
*/
-public static final native long /*int*/ PMPrinterGetOutputResolution(long /*int*/ pmPrinter, long /*int*/ pmPrintSettings, PMResolution outResolution);
+public static final native long PMPrinterGetOutputResolution(long pmPrinter, long pmPrintSettings, PMResolution outResolution);
/** @method flags=dynamic
* @param pmPrinter cast=(PMPrinter)
* @param outResolution cast=(PMResolution *)
*/
-public static final native long /*int*/ PMPrinterGetIndexedPrinterResolution(long /*int*/ pmPrinter, int index, PMResolution outResolution);
-
-// Custom FindWindow implementation to avoid namespace collisions with Point.
-/**
- * @method flags=no_gen
- * @param wHandle cast=(WindowRef *)
- */
-public static final native long /*int*/ FindWindow (long /*int*/ h, long /*int*/ v, long /*int*/ [] wHandle);
-
-/**
- * @method flags=dynamic
- * @param display cast=(CGDirectDisplayID)
- */
-public static final native long /*int*/ CGDisplayBaseAddress(int display);
-/**
- * @method flags=dynamic
- * @param display cast=(CGDirectDisplayID)
- */
-public static final native long /*int*/ CGDisplayBitsPerPixel(int display);
-/**
- * @method flags=dynamic
- * @param display cast=(CGDirectDisplayID)
- */
-public static final native long /*int*/ CGDisplayBitsPerSample(int display);
-/**
- * @method flags=dynamic
- * @param display cast=(CGDirectDisplayID)
- */
-public static final native long /*int*/ CGDisplayBytesPerRow(int display);
-
+public static final native long PMPrinterGetIndexedPrinterResolution(long pmPrinter, int index, PMResolution outResolution);
/** C calls */
public static final native int getpid();
-public static final native void call(long /*int*/ proc, long /*int*/ id, long /*int*/ sel);
-
-/** @method flags=no_gen */
-public static final native boolean __BIG_ENDIAN__();
-public static final int kCGBitmapByteOrderDefault = 0 << 12;
-public static final int kCGBitmapByteOrder16Little = 1 << 12;
-public static final int kCGBitmapByteOrder32Little = 2 << 12;
-public static final int kCGBitmapByteOrder16Big = 3 << 12;
-public static final int kCGBitmapByteOrder32Big = 4 << 12;
-public static final int kCGBitmapByteOrder16Host = __BIG_ENDIAN__() ? kCGBitmapByteOrder16Big : kCGBitmapByteOrder16Little;
-public static final int kCGBitmapByteOrder32Host = __BIG_ENDIAN__() ? kCGBitmapByteOrder32Big : kCGBitmapByteOrder32Little;
-
-/**
- * @method flags=dynamic
- * @param destRect flags=struct
- * @param srcRect flags=struct
- */
-public static final native void CGContextCopyWindowContentsToRect(long /*int*/ context, CGRect destRect, long /*int*/ contextID, long /*int*/ windowNumber, CGRect srcRect);
-
-/**
- * @method flags=dynamic
- * @param displayID cast=(CGDirectDisplayID)
- */
-public static final native long /*int*/ CGDisplayCreateImage(int displayID);
+public static final native void call(long proc, long id, long sel);
/** QuickDraw calls */
/** @method flags=dynamic */
-public static final native long /*int*/ NewRgn();
+public static final native long NewRgn();
/** @method flags=dynamic */
-public static final native void RectRgn(long /*int*/ rgnHandle, short[] rect);
+public static final native void RectRgn(long rgnHandle, short[] rect);
/** @method flags=dynamic */
public static final native void OpenRgn();
/** @method flags=dynamic */
-public static final native void OffsetRgn(long /*int*/ rgnHandle, short dh, short dv);
+public static final native void OffsetRgn(long rgnHandle, short dh, short dv);
/** @method flags=dynamic */
public static final native void MoveTo(short h, short v);
/** @method flags=dynamic */
public static final native void LineTo(short h, short v);
/** @method flags=dynamic */
-public static final native void UnionRgn(long /*int*/ srcRgnA, long /*int*/ srcRgnB, long /*int*/ dstRgn);
+public static final native void UnionRgn(long srcRgnA, long srcRgnB, long dstRgn);
/** @method flags=dynamic */
-public static final native void CloseRgn(long /*int*/ dstRgn);
+public static final native void CloseRgn(long dstRgn);
/** @method flags=dynamic */
-public static final native void DisposeRgn(long /*int*/ rgnHandle);
+public static final native void DisposeRgn(long rgnHandle);
/**
* @method flags=dynamic
* @param pt flags=struct,cast=(Point *)
*/
-public static final native boolean PtInRgn(short[] pt, long /*int*/ rgnHandle);
+public static final native boolean PtInRgn(short[] pt, long rgnHandle);
/** @method flags=dynamic */
-public static final native void GetRegionBounds(long /*int*/ rgnHandle, short[] bounds);
+public static final native void GetRegionBounds(long rgnHandle, short[] bounds);
/** @method flags=dynamic */
-public static final native void SectRgn(long /*int*/ srcRgnA, long /*int*/ srcRgnB, long /*int*/ dstRgn);
+public static final native void SectRgn(long srcRgnA, long srcRgnB, long dstRgn);
/** @method flags=dynamic */
-public static final native boolean EmptyRgn(long /*int*/ rgnHandle);
+public static final native boolean EmptyRgn(long rgnHandle);
/** @method flags=dynamic */
-public static final native void DiffRgn(long /*int*/ srcRgnA, long /*int*/ srcRgnB, long /*int*/ dstRgn);
+public static final native void DiffRgn(long srcRgnA, long srcRgnB, long dstRgn);
/** @method flags=dynamic */
-public static final native boolean RectInRgn(short[] rect, long /*int*/ rgnHandle);
+public static final native boolean RectInRgn(short[] rect, long rgnHandle);
/** @method flags=dynamic */
-public static final native int QDRegionToRects(long /*int*/ rgn, int dir, long /*int*/ proc, long /*int*/ userData);
+public static final native int QDRegionToRects(long rgn, int dir, long proc, long userData);
/** @method flags=dynamic */
-public static final native void CopyRgn(long /*int*/ srcRgnHandle, long /*int*/ dstRgnHandle);
+public static final native void CopyRgn(long srcRgnHandle, long dstRgnHandle);
/** @method flags=dynamic */
public static final native void SetRect(short[] r, short left, short top, short right, short bottom);
public static final int kQDParseRegionFromTop = (1 << 0);
-public static final int kQDParseRegionFromBottom = (1 << 1);
public static final int kQDParseRegionFromLeft = (1 << 2);
-public static final int kQDParseRegionFromRight = (1 << 3);
public static final int kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft;
public static final int kQDRegionToRectsMsgParse = 2;
-/**
- * @method flags=dynamic
- * @param inWindow cast=(WindowRef)
- */
-public static final native int HIWindowGetCGWindowID(long /*int*/ inWindow);
-
/** JavaScriptCore calls */
/**
@@ -524,17 +416,17 @@ public static final native int HIWindowGetCGWindowID(long /*int*/ inWindow);
* @param sourceURL cast=(JSStringRef)
* @param exception cast=(JSValueRef *)
*/
-public static final native long /*int*/ JSEvaluateScript (long /*int*/ ctx, long /*int*/ script, long /*int*/ thisObject, long /*int*/ sourceURL, int startingLineNumber, long /*int*/[] exception);
+public static final native long JSEvaluateScript (long ctx, long script, long thisObject, long sourceURL, int startingLineNumber, long[] exception);
/**
* @param string cast=(const char *)
*/
-public static final native long /*int*/ JSStringCreateWithUTF8CString (byte[] string);
+public static final native long JSStringCreateWithUTF8CString (byte[] string);
/**
* @param string cast=(JSStringRef)
*/
-public static final native void JSStringRelease (long /*int*/ string);
+public static final native void JSStringRelease (long string);
/** Certificate Security */
@@ -545,28 +437,27 @@ public static final native void JSStringRelease (long /*int*/ string);
* @param value cast=(CSSM_DATA *)
* @param policySearch cast=(SecPolicySearchRef *)
*/
-public static final native int SecPolicySearchCreate(long /*int*/ certType, long /*int*/ policyOID, long /*int*/ value, long /*int*/ [] policySearch);
+public static final native int SecPolicySearchCreate(long certType, long policyOID, long value, long [] policySearch);
/**
* @param searchRef cast=(SecPolicySearchRef)
* @param policyRef cast=(SecPolicyRef *)
*/
-public static final native int SecPolicySearchCopyNext(long /*int*/ searchRef, long /*int*/ [] policyRef);
+public static final native int SecPolicySearchCopyNext(long searchRef, long [] policyRef);
/**
* @param certificates cast=(CFArrayRef)
* @param policies cast=(CFTypeRef)
* @param trustRef cast=(SecTrustRef *)
*/
-public static final native int SecTrustCreateWithCertificates(long /*int*/ certificates, long /*int*/ policies, long /*int*/ [] trustRef);
+public static final native int SecTrustCreateWithCertificates(long certificates, long policies, long [] trustRef);
public static final int CSSM_CERT_X_509v3 = 0x3;
-
/** Custom callbacks */
/** @method flags=no_gen */
-public static final native long /*int*/ isFlipped_CALLBACK();
+public static final native long isFlipped_CALLBACK();
/** Custom structure return */
@@ -578,16 +469,11 @@ public static final native void NSIntersectionRect (NSRect result, NSRect aRect,
*/
public static final native void CGDisplayBounds(int display, CGRect rect);
-/** @method flags=const address*/
-public static final native long /*int*/ kCFTypeDictionaryKeyCallBacks();
-/** @method flags=const address*/
-public static final native long /*int*/ kCFTypeDictionaryValueCallBacks();
-
/** @method flags=const */
-public static final native long /*int*/ kUTTypeFileURL();
+public static final native long kUTTypeFileURL();
public static final NSString kUTTypeFileURL = new NSString(kUTTypeFileURL());
/** @method flags=const */
-public static final native long /*int*/ kUTTypeURL();
+public static final native long kUTTypeURL();
public static final NSString kUTTypeURL = new NSString(kUTTypeURL());
/** Objective-C runtime */
@@ -597,376 +483,353 @@ public static final NSString kUTTypeURL = new NSString(kUTTypeURL());
* @param name cast=(const char *),flags=critical
* @param types cast=(const char *),flags=critical
*/
-public static final native boolean class_addIvar(long /*int*/ cls, byte[] name, long /*int*/ size, byte alignment, byte[] types);
+public static final native boolean class_addIvar(long cls, byte[] name, long size, byte alignment, byte[] types);
/**
* @param cls cast=(Class)
* @param name cast=(SEL)
* @param imp cast=(IMP)
*/
-public static final native boolean class_addMethod(long /*int*/ cls, long /*int*/ name, long /*int*/ imp, String types);
+public static final native boolean class_addMethod(long cls, long name, long imp, String types);
/**
* @param cls cast=(Class)
* @param protocol cast=(Protocol *)
*/
-public static final native boolean class_addProtocol(long /*int*/ cls, long /*int*/ protocol);
+public static final native boolean class_addProtocol(long cls, long protocol);
/**
* @param aClass cast=(Class)
* @param aSelector cast=(SEL)
*/
-public static final native long /*int*/ class_getClassMethod(long /*int*/ aClass, long /*int*/ aSelector);
+public static final native long class_getClassMethod(long aClass, long aSelector);
/**
* @param cls cast=(Class)
* @param name cast=(SEL)
*/
-public static final native long /*int*/ class_getMethodImplementation(long /*int*/ cls, long /*int*/ name);
+public static final native long class_getMethodImplementation(long cls, long name);
/**
* @param cls cast=(Class)
* @param name cast=(SEL)
*/
-public static final native long /*int*/ class_getInstanceMethod(long /*int*/ cls, long /*int*/ name);
+public static final native long class_getInstanceMethod(long cls, long name);
/** @param cls cast=(Class) */
-public static final native long /*int*/ class_getSuperclass(long /*int*/ cls);
+public static final native long class_getSuperclass(long cls);
/**
* @param method cast=(Method)
* @param imp cast=(IMP)
*/
-public static final native long /*int*/ method_setImplementation(long /*int*/ method, long /*int*/ imp);
-/**
- * @param sel cast=(SEL)
- */
-public static final native long /*int*/ sel_getName(long /*int*/ sel);
+public static final native long method_setImplementation(long method, long imp);
/**
* @param cls cast=(Class)
* @param extraBytes cast=(size_t)
*/
-public static final native long /*int*/ class_createInstance(long /*int*/ cls, long /*int*/ extraBytes);
-
+public static final native long class_createInstance(long cls, long extraBytes);
/** @method flags=no_gen */
-public static final native String class_getName(long /*int*/ cls);
+public static final native String class_getName(long cls);
/** @method flags=dynamic */
public static final native void instrumentObjcMessageSends(boolean val);
/** @param superclass cast=(Class) */
-public static final native long /*int*/ objc_allocateClassPair(long /*int*/ superclass, String name, long /*int*/ extraBytes);
+public static final native long objc_allocateClassPair(long superclass, String name, long extraBytes);
/** @param klass cast=(Class) */
-public static final native void objc_disposeClassPair(long /*int*/ klass);
-public static final native long /*int*/ objc_getClass(String className);
-public static final native long /*int*/ objc_getMetaClass(String name);
-public static final native long /*int*/ objc_getProtocol(String name);
-public static final native long /*int*/ objc_lookUpClass(String className);
+public static final native void objc_disposeClassPair(long klass);
+public static final native long objc_getClass(String className);
+public static final native long objc_getMetaClass(String name);
+public static final native long objc_getProtocol(String name);
+public static final native long objc_lookUpClass(String className);
/** @param cls cast=(Class) */
-public static final native void objc_registerClassPair(long /*int*/ cls);
+public static final native void objc_registerClassPair(long cls);
/** @param obj cast=(id) */
-public static final native long /*int*/ object_getClassName(long /*int*/ obj);
+public static final native long object_getClassName(long obj);
/** @param obj cast=(id) */
-public static final native long /*int*/ object_getClass(long /*int*/ obj);
+public static final native long object_getClass(long obj);
/**
* @param obj cast=(id)
* @param name cast=(const char*),flags=critical
* @param outValue cast=(void **),flags=critical
*/
-public static final native long /*int*/ object_getInstanceVariable(long /*int*/ obj, byte[] name, long /*int*/ [] outValue);
+public static final native long object_getInstanceVariable(long obj, byte[] name, long [] outValue);
/**
* @param obj cast=(id)
* @param name cast=(const char*),flags=critical
* @param value cast=(void *),flags=critical
*/
-public static final native long /*int*/ object_setInstanceVariable(long /*int*/ obj, byte[] name, long /*int*/ value);
+public static final native long object_setInstanceVariable(long obj, byte[] name, long value);
/**
* @param obj cast=(id)
* @param clazz cast=(Class)
*/
-public static final native long /*int*/ object_setClass(long /*int*/ obj, long /*int*/ clazz);
-public static final native long /*int*/ sel_registerName(String selectorName);
+public static final native long object_setClass(long obj, long clazz);
+public static final native long sel_registerName(String selectorName);
public static final native int objc_super_sizeof();
-/**
- * @method flags=cast
- * @param arg0 flags=struct
- */
-public static final native void objc_msgSend_stret(NSSize result, long /*int*/ id, long /*int*/ sel, NSSize arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5);
-
/** This section is auto generated */
/** Custom callbacks */
/** @method callback_types=id;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_accessibilityHitTest_(long /*int*/ func);
+public static final native long CALLBACK_accessibilityHitTest_(long func);
/** @method callback_types=NSAttributedString*;id;SEL;NSRange;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_attributedSubstringFromRange_(long /*int*/ func);
+public static final native long CALLBACK_attributedSubstringFromRange_(long func);
/** @method callback_types=void;id;SEL;NSRect;NSBitmapImageRep*;,callback_flags=none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_cacheDisplayInRect_toBitmapImageRep_(long /*int*/ func);
+public static final native long CALLBACK_cacheDisplayInRect_toBitmapImageRep_(long func);
/** @method callback_types=BOOL;id;SEL;NSIndexSet*;NSPoint;,callback_flags=none;none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_canDragRowsWithIndexes_atPoint_(long /*int*/ func);
+public static final native long CALLBACK_canDragRowsWithIndexes_atPoint_(long func);
/** @method callback_types=NSSize;id;SEL;,callback_flags=struct;none;none; */
-public static final native long /*int*/ CALLBACK_cellSize(long /*int*/ func);
+public static final native long CALLBACK_cellSize(long func);
/** @method callback_types=NSSize;id;SEL;NSRect;,callback_flags=struct;none;none;struct; */
-public static final native long /*int*/ CALLBACK_cellSizeForBounds_(long /*int*/ func);
+public static final native long CALLBACK_cellSizeForBounds_(long func);
/** @method callback_types=NSUInteger;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_characterIndexForPoint_(long /*int*/ func);
+public static final native long CALLBACK_characterIndexForPoint_(long func);
/** @method callback_types=NSInteger;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_columnAtPoint_(long /*int*/ func);
-/** @method callback_types=BOOL;id;SEL;NSEvent*;NSSize;BOOL;,callback_flags=none;none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_dragSelectionWithEvent_offset_slideBack_(long /*int*/ func);
-/** @method callback_types=void;id;SEL;NSImage*;NSPoint;,callback_flags=none;none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_draggedImage_beganAt_(long /*int*/ func);
+public static final native long CALLBACK_columnAtPoint_(long func);
/** @method callback_types=void;id;SEL;NSImage*;NSPoint;NSDragOperation;,callback_flags=none;none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_draggedImage_endedAt_operation_(long /*int*/ func);
+public static final native long CALLBACK_draggedImage_endedAt_operation_(long func);
/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_drawBackgroundInClipRect_(long /*int*/ func);
+public static final native long CALLBACK_drawBackgroundInClipRect_(long func);
/** @method callback_types=void;id;SEL;NSRect;NSView*;,callback_flags=none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_drawBezelWithFrame_inView_(long /*int*/ func);
+public static final native long CALLBACK_drawBezelWithFrame_inView_(long func);
/** @method callback_types=void;id;SEL;NSImage*;NSRect;NSView*;,callback_flags=none;none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_drawImage_withFrame_inView_(long /*int*/ func);
+public static final native long CALLBACK_drawImage_withFrame_inView_(long func);
/** @method callback_types=void;id;SEL;NSRect;NSView*;,callback_flags=none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_drawInteriorWithFrame_inView_(long /*int*/ func);
+public static final native long CALLBACK_drawInteriorWithFrame_inView_(long func);
/** @method callback_types=void;id;SEL;BOOL;NSRect;,callback_flags=none;none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_drawLabel_inRect_(long /*int*/ func);
+public static final native long CALLBACK_drawLabel_inRect_(long func);
/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_drawRect_(long /*int*/ func);
+public static final native long CALLBACK_drawRect_(long func);
/** @method callback_types=NSRect;id;SEL;NSAttributedString*;NSRect;NSView*;,callback_flags=struct;none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_drawTitle_withFrame_inView_(long /*int*/ func);
+public static final native long CALLBACK_drawTitle_withFrame_inView_(long func);
/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_drawViewBackgroundInRect_(long /*int*/ func);
+public static final native long CALLBACK_drawViewBackgroundInRect_(long func);
/** @method callback_types=void;id;SEL;NSRect;NSView*;,callback_flags=none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_drawWithExpansionFrame_inView_(long /*int*/ func);
+public static final native long CALLBACK_drawWithExpansionFrame_inView_(long func);
/** @method callback_types=NSRect;id;SEL;NSRect;NSView*;,callback_flags=struct;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_expansionFrameWithFrame_inView_(long /*int*/ func);
+public static final native long CALLBACK_expansionFrameWithFrame_inView_(long func);
/** @method callback_types=NSRect;id;SEL;NSRange;,callback_flags=struct;none;none;struct; */
-public static final native long /*int*/ CALLBACK_firstRectForCharacterRange_(long /*int*/ func);
+public static final native long CALLBACK_firstRectForCharacterRange_(long func);
/** @method callback_types=NSRect;id;SEL;NSRect;NSView*;,callback_flags=struct;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_focusRingMaskBoundsForFrame_inView_(long /*int*/ func);
+public static final native long CALLBACK_focusRingMaskBoundsForFrame_inView_(long func);
/** @method callback_types=NSRect;id;SEL;NSInteger;,callback_flags=struct;none;none;none; */
-public static final native long /*int*/ CALLBACK_headerRectOfColumn_(long /*int*/ func);
+public static final native long CALLBACK_headerRectOfColumn_(long func);
/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_highlightSelectionInClipRect_(long /*int*/ func);
+public static final native long CALLBACK_highlightSelectionInClipRect_(long func);
/** @method callback_types=NSView*;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_hitTest_(long /*int*/ func);
+public static final native long CALLBACK_hitTest_(long func);
/** @method callback_types=NSCellHitResult;id;SEL;NSEvent*;NSRect;NSView*;,callback_flags=none;none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_hitTestForEvent_inRect_ofView_(long /*int*/ func);
+public static final native long CALLBACK_hitTestForEvent_inRect_ofView_(long func);
/** @method callback_types=NSRect;id;SEL;NSRect;,callback_flags=struct;none;none;struct; */
-public static final native long /*int*/ CALLBACK_imageRectForBounds_(long /*int*/ func);
+public static final native long CALLBACK_imageRectForBounds_(long func);
/** @method callback_types=NSRange;id;SEL;,callback_flags=struct;none;none; */
-public static final native long /*int*/ CALLBACK_markedRange(long /*int*/ func);
+public static final native long CALLBACK_markedRange(long func);
/** @method callback_types=void;id;SEL;NSClipView*;NSPoint;,callback_flags=none;none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_scrollClipView_toPoint_(long /*int*/ func);
+public static final native long CALLBACK_scrollClipView_toPoint_(long func);
/** @method callback_types=NSRange;id;SEL;,callback_flags=struct;none;none; */
-public static final native long /*int*/ CALLBACK_selectedRange(long /*int*/ func);
-/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_setFrame_(long /*int*/ func);
+public static final native long CALLBACK_selectedRange(long func);
/** @method callback_types=void;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_setFrameOrigin_(long /*int*/ func);
+public static final native long CALLBACK_setFrameOrigin_(long func);
/** @method callback_types=void;id;SEL;NSSize;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_setFrameSize_(long /*int*/ func);
+public static final native long CALLBACK_setFrameSize_(long func);
/** @method callback_types=void;id;SEL;id;NSRange;,callback_flags=none;none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_setMarkedText_selectedRange_(long /*int*/ func);
+public static final native long CALLBACK_setMarkedText_selectedRange_(long func);
/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_setNeedsDisplayInRect_(long /*int*/ func);
+public static final native long CALLBACK_setNeedsDisplayInRect_(long func);
/** @method callback_types=BOOL;id;SEL;NSRange;NSString*;,callback_flags=none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_shouldChangeTextInRange_replacementString_(long /*int*/ func);
+public static final native long CALLBACK_shouldChangeTextInRange_replacementString_(long func);
/** @method callback_types=NSSize;id;SEL;BOOL;,callback_flags=struct;none;none;none; */
-public static final native long /*int*/ CALLBACK_sizeOfLabel_(long /*int*/ func);
+public static final native long CALLBACK_sizeOfLabel_(long func);
/** @method callback_types=NSRange;id;SEL;NSTextView*;NSRange;NSRange;,callback_flags=struct;none;none;none;struct;struct; */
-public static final native long /*int*/ CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(long /*int*/ func);
+public static final native long CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(long func);
/** @method callback_types=NSRect;id;SEL;NSRect;,callback_flags=struct;none;none;struct; */
-public static final native long /*int*/ CALLBACK_titleRectForBounds_(long /*int*/ func);
+public static final native long CALLBACK_titleRectForBounds_(long func);
/** @method callback_types=NSString*;id;SEL;NSView*;NSToolTipTag;NSPoint;void*;,callback_flags=none;none;none;none;none;struct;none; */
-public static final native long /*int*/ CALLBACK_view_stringForToolTip_point_userData_(long /*int*/ func);
+public static final native long CALLBACK_view_stringForToolTip_point_userData_(long func);
/** @method callback_types=void;id;SEL;WebView*;NSRect;,callback_flags=none;none;none;none;struct; */
-public static final native long /*int*/ CALLBACK_webView_setFrame_(long /*int*/ func);
+public static final native long CALLBACK_webView_setFrame_(long func);
/** Classes */
-public static final long /*int*/ class_DOMDocument = objc_getClass("DOMDocument");
-public static final long /*int*/ class_DOMEvent = objc_getClass("DOMEvent");
-public static final long /*int*/ class_DOMKeyboardEvent = objc_getClass("DOMKeyboardEvent");
-public static final long /*int*/ class_DOMMouseEvent = objc_getClass("DOMMouseEvent");
-public static final long /*int*/ class_DOMUIEvent = objc_getClass("DOMUIEvent");
-public static final long /*int*/ class_DOMWheelEvent = objc_getClass("DOMWheelEvent");
-public static final long /*int*/ class_NSActionCell = objc_getClass("NSActionCell");
-public static final long /*int*/ class_NSAffineTransform = objc_getClass("NSAffineTransform");
-public static final long /*int*/ class_NSAlert = objc_getClass("NSAlert");
-public static final long /*int*/ class_NSAppearance = objc_getClass("NSAppearance");
-public static final long /*int*/ class_NSAppleEventDescriptor = objc_getClass("NSAppleEventDescriptor");
-public static final long /*int*/ class_NSApplication = objc_getClass("NSApplication");
-public static final long /*int*/ class_NSArray = objc_getClass("NSArray");
-public static final long /*int*/ class_NSAttributedString = objc_getClass("NSAttributedString");
-public static final long /*int*/ class_NSAutoreleasePool = objc_getClass("NSAutoreleasePool");
-public static final long /*int*/ class_NSBezierPath = objc_getClass("NSBezierPath");
-public static final long /*int*/ class_NSBitmapImageRep = objc_getClass("NSBitmapImageRep");
-public static final long /*int*/ class_NSBox = objc_getClass("NSBox");
-public static final long /*int*/ class_NSBrowserCell = objc_getClass("NSBrowserCell");
-public static final long /*int*/ class_NSBundle = objc_getClass("NSBundle");
-public static final long /*int*/ class_NSButton = objc_getClass("NSButton");
-public static final long /*int*/ class_NSButtonCell = objc_getClass("NSButtonCell");
-public static final long /*int*/ class_NSCalendarDate = objc_getClass("NSCalendarDate");
-public static final long /*int*/ class_NSCell = objc_getClass("NSCell");
-public static final long /*int*/ class_NSCharacterSet = objc_getClass("NSCharacterSet");
-public static final long /*int*/ class_NSClipView = objc_getClass("NSClipView");
-public static final long /*int*/ class_NSCoder = objc_getClass("NSCoder");
-public static final long /*int*/ class_NSColor = objc_getClass("NSColor");
-public static final long /*int*/ class_NSColorList = objc_getClass("NSColorList");
-public static final long /*int*/ class_NSColorPanel = objc_getClass("NSColorPanel");
-public static final long /*int*/ class_NSColorSpace = objc_getClass("NSColorSpace");
-public static final long /*int*/ class_NSComboBox = objc_getClass("NSComboBox");
-public static final long /*int*/ class_NSComboBoxCell = objc_getClass("NSComboBoxCell");
-public static final long /*int*/ class_NSControl = objc_getClass("NSControl");
-public static final long /*int*/ class_NSCursor = objc_getClass("NSCursor");
-public static final long /*int*/ class_NSData = objc_getClass("NSData");
-public static final long /*int*/ class_NSDate = objc_getClass("NSDate");
-public static final long /*int*/ class_NSDatePicker = objc_getClass("NSDatePicker");
-public static final long /*int*/ class_NSDictionary = objc_getClass("NSDictionary");
-public static final long /*int*/ class_NSDirectoryEnumerator = objc_getClass("NSDirectoryEnumerator");
-public static final long /*int*/ class_NSDockTile = objc_getClass("NSDockTile");
-public static final long /*int*/ class_NSEnumerator = objc_getClass("NSEnumerator");
-public static final long /*int*/ class_NSError = objc_getClass("NSError");
-public static final long /*int*/ class_NSEvent = objc_getClass("NSEvent");
-public static final long /*int*/ class_NSFileManager = objc_getClass("NSFileManager");
-public static final long /*int*/ class_NSFileWrapper = objc_getClass("NSFileWrapper");
-public static final long /*int*/ class_NSFont = objc_getClass("NSFont");
-public static final long /*int*/ class_NSFontManager = objc_getClass("NSFontManager");
-public static final long /*int*/ class_NSFontPanel = objc_getClass("NSFontPanel");
-public static final long /*int*/ class_NSFormatter = objc_getClass("NSFormatter");
-public static final long /*int*/ class_NSGradient = objc_getClass("NSGradient");
-public static final long /*int*/ class_NSGraphicsContext = objc_getClass("NSGraphicsContext");
-public static final long /*int*/ class_NSHTTPCookie = objc_getClass("NSHTTPCookie");
-public static final long /*int*/ class_NSHTTPCookieStorage = objc_getClass("NSHTTPCookieStorage");
-public static final long /*int*/ class_NSImage = objc_getClass("NSImage");
-public static final long /*int*/ class_NSImageRep = objc_getClass("NSImageRep");
-public static final long /*int*/ class_NSImageView = objc_getClass("NSImageView");
-public static final long /*int*/ class_NSIndexSet = objc_getClass("NSIndexSet");
-public static final long /*int*/ class_NSInputManager = objc_getClass("NSInputManager");
-public static final long /*int*/ class_NSKeyedArchiver = objc_getClass("NSKeyedArchiver");
-public static final long /*int*/ class_NSKeyedUnarchiver = objc_getClass("NSKeyedUnarchiver");
-public static final long /*int*/ class_NSLayoutManager = objc_getClass("NSLayoutManager");
-public static final long /*int*/ class_NSLocale = objc_getClass("NSLocale");
-public static final long /*int*/ class_NSMenu = objc_getClass("NSMenu");
-public static final long /*int*/ class_NSMenuItem = objc_getClass("NSMenuItem");
-public static final long /*int*/ class_NSMutableArray = objc_getClass("NSMutableArray");
-public static final long /*int*/ class_NSMutableAttributedString = objc_getClass("NSMutableAttributedString");
-public static final long /*int*/ class_NSMutableDictionary = objc_getClass("NSMutableDictionary");
-public static final long /*int*/ class_NSMutableIndexSet = objc_getClass("NSMutableIndexSet");
-public static final long /*int*/ class_NSMutableParagraphStyle = objc_getClass("NSMutableParagraphStyle");
-public static final long /*int*/ class_NSMutableSet = objc_getClass("NSMutableSet");
-public static final long /*int*/ class_NSMutableString = objc_getClass("NSMutableString");
-public static final long /*int*/ class_NSMutableURLRequest = objc_getClass("NSMutableURLRequest");
-public static final long /*int*/ class_NSNotification = objc_getClass("NSNotification");
-public static final long /*int*/ class_NSNotificationCenter = objc_getClass("NSNotificationCenter");
-public static final long /*int*/ class_NSNumber = objc_getClass("NSNumber");
-public static final long /*int*/ class_NSNumberFormatter = objc_getClass("NSNumberFormatter");
-public static final long /*int*/ class_NSObject = objc_getClass("NSObject");
-public static final long /*int*/ class_NSOpenGLContext = objc_getClass("NSOpenGLContext");
-public static final long /*int*/ class_NSOpenGLPixelFormat = objc_getClass("NSOpenGLPixelFormat");
-public static final long /*int*/ class_NSOpenPanel = objc_getClass("NSOpenPanel");
-public static final long /*int*/ class_NSOutlineView = objc_getClass("NSOutlineView");
-public static final long /*int*/ class_NSPanel = objc_getClass("NSPanel");
-public static final long /*int*/ class_NSParagraphStyle = objc_getClass("NSParagraphStyle");
-public static final long /*int*/ class_NSPasteboard = objc_getClass("NSPasteboard");
-public static final long /*int*/ class_NSPopUpButton = objc_getClass("NSPopUpButton");
-public static final long /*int*/ class_NSPrintInfo = objc_getClass("NSPrintInfo");
-public static final long /*int*/ class_NSPrintOperation = objc_getClass("NSPrintOperation");
-public static final long /*int*/ class_NSPrintPanel = objc_getClass("NSPrintPanel");
-public static final long /*int*/ class_NSPrinter = objc_getClass("NSPrinter");
-public static final long /*int*/ class_NSProgressIndicator = objc_getClass("NSProgressIndicator");
-public static final long /*int*/ class_NSResponder = objc_getClass("NSResponder");
-public static final long /*int*/ class_NSRunLoop = objc_getClass("NSRunLoop");
-public static final long /*int*/ class_NSRunningApplication = objc_getClass("NSRunningApplication");
-public static final long /*int*/ class_NSSavePanel = objc_getClass("NSSavePanel");
-public static final long /*int*/ class_NSScreen = objc_getClass("NSScreen");
-public static final long /*int*/ class_NSScrollView = objc_getClass("NSScrollView");
-public static final long /*int*/ class_NSScroller = objc_getClass("NSScroller");
-public static final long /*int*/ class_NSSearchField = objc_getClass("NSSearchField");
-public static final long /*int*/ class_NSSearchFieldCell = objc_getClass("NSSearchFieldCell");
-public static final long /*int*/ class_NSSecureTextField = objc_getClass("NSSecureTextField");
-public static final long /*int*/ class_NSSegmentedCell = objc_getClass("NSSegmentedCell");
-public static final long /*int*/ class_NSSet = objc_getClass("NSSet");
-public static final long /*int*/ class_NSSlider = objc_getClass("NSSlider");
-public static final long /*int*/ class_NSStatusBar = objc_getClass("NSStatusBar");
-public static final long /*int*/ class_NSStatusItem = objc_getClass("NSStatusItem");
-public static final long /*int*/ class_NSStepper = objc_getClass("NSStepper");
-public static final long /*int*/ class_NSString = objc_getClass("NSString");
-public static final long /*int*/ class_NSTabView = objc_getClass("NSTabView");
-public static final long /*int*/ class_NSTabViewItem = objc_getClass("NSTabViewItem");
-public static final long /*int*/ class_NSTableColumn = objc_getClass("NSTableColumn");
-public static final long /*int*/ class_NSTableHeaderCell = objc_getClass("NSTableHeaderCell");
-public static final long /*int*/ class_NSTableHeaderView = objc_getClass("NSTableHeaderView");
-public static final long /*int*/ class_NSTableView = objc_getClass("NSTableView");
-public static final long /*int*/ class_NSText = objc_getClass("NSText");
-public static final long /*int*/ class_NSTextAttachment = objc_getClass("NSTextAttachment");
-public static final long /*int*/ class_NSTextContainer = objc_getClass("NSTextContainer");
-public static final long /*int*/ class_NSTextField = objc_getClass("NSTextField");
-public static final long /*int*/ class_NSTextFieldCell = objc_getClass("NSTextFieldCell");
-public static final long /*int*/ class_NSTextStorage = objc_getClass("NSTextStorage");
-public static final long /*int*/ class_NSTextTab = objc_getClass("NSTextTab");
-public static final long /*int*/ class_NSTextView = objc_getClass("NSTextView");
-public static final long /*int*/ class_NSThread = objc_getClass("NSThread");
-public static final long /*int*/ class_NSTimeZone = objc_getClass("NSTimeZone");
-public static final long /*int*/ class_NSTimer = objc_getClass("NSTimer");
-public static final long /*int*/ class_NSToolbar = objc_getClass("NSToolbar");
-public static final long /*int*/ class_NSToolbarItem = objc_getClass("NSToolbarItem");
-public static final long /*int*/ class_NSTouch = objc_getClass("NSTouch");
-public static final long /*int*/ class_NSTrackingArea = objc_getClass("NSTrackingArea");
-public static final long /*int*/ class_NSTypesetter = objc_getClass("NSTypesetter");
-public static final long /*int*/ class_NSURL = objc_getClass("NSURL");
-public static final long /*int*/ class_NSURLAuthenticationChallenge = objc_getClass("NSURLAuthenticationChallenge");
-public static final long /*int*/ class_NSURLCredential = objc_getClass("NSURLCredential");
-public static final long /*int*/ class_NSURLDownload = objc_getClass("NSURLDownload");
-public static final long /*int*/ class_NSURLProtectionSpace = objc_getClass("NSURLProtectionSpace");
-public static final long /*int*/ class_NSURLRequest = objc_getClass("NSURLRequest");
-public static final long /*int*/ class_NSUndoManager = objc_getClass("NSUndoManager");
-public static final long /*int*/ class_NSUserDefaults = objc_getClass("NSUserDefaults");
-public static final long /*int*/ class_NSValue = objc_getClass("NSValue");
-public static final long /*int*/ class_NSView = objc_getClass("NSView");
-public static final long /*int*/ class_NSWindow = objc_getClass("NSWindow");
-public static final long /*int*/ class_NSWorkspace = objc_getClass("NSWorkspace");
-public static final long /*int*/ class_SFCertificatePanel = objc_getClass("SFCertificatePanel");
-public static final long /*int*/ class_SFCertificateTrustPanel = objc_getClass("SFCertificateTrustPanel");
-public static final long /*int*/ class_WebDataSource = objc_getClass("WebDataSource");
-public static final long /*int*/ class_WebFrame = objc_getClass("WebFrame");
-public static final long /*int*/ class_WebFrameView = objc_getClass("WebFrameView");
-public static final long /*int*/ class_WebPreferences = objc_getClass("WebPreferences");
-public static final long /*int*/ class_WebScriptObject = objc_getClass("WebScriptObject");
-public static final long /*int*/ class_WebUndefined = objc_getClass("WebUndefined");
-public static final long /*int*/ class_WebView = objc_getClass("WebView");
+public static final long class_CALayer = objc_getClass("CALayer");
+public static final long class_DOMDocument = objc_getClass("DOMDocument");
+public static final long class_DOMEvent = objc_getClass("DOMEvent");
+public static final long class_DOMKeyboardEvent = objc_getClass("DOMKeyboardEvent");
+public static final long class_DOMMouseEvent = objc_getClass("DOMMouseEvent");
+public static final long class_DOMUIEvent = objc_getClass("DOMUIEvent");
+public static final long class_DOMWheelEvent = objc_getClass("DOMWheelEvent");
+public static final long class_NSActionCell = objc_getClass("NSActionCell");
+public static final long class_NSAffineTransform = objc_getClass("NSAffineTransform");
+public static final long class_NSAlert = objc_getClass("NSAlert");
+public static final long class_NSAppearance = objc_getClass("NSAppearance");
+public static final long class_NSAppleEventDescriptor = objc_getClass("NSAppleEventDescriptor");
+public static final long class_NSApplication = objc_getClass("NSApplication");
+public static final long class_NSArray = objc_getClass("NSArray");
+public static final long class_NSAttributedString = objc_getClass("NSAttributedString");
+public static final long class_NSAutoreleasePool = objc_getClass("NSAutoreleasePool");
+public static final long class_NSBezierPath = objc_getClass("NSBezierPath");
+public static final long class_NSBitmapImageRep = objc_getClass("NSBitmapImageRep");
+public static final long class_NSBox = objc_getClass("NSBox");
+public static final long class_NSBundle = objc_getClass("NSBundle");
+public static final long class_NSButton = objc_getClass("NSButton");
+public static final long class_NSButtonCell = objc_getClass("NSButtonCell");
+public static final long class_NSCalendarDate = objc_getClass("NSCalendarDate");
+public static final long class_NSCell = objc_getClass("NSCell");
+public static final long class_NSClipView = objc_getClass("NSClipView");
+public static final long class_NSCoder = objc_getClass("NSCoder");
+public static final long class_NSColor = objc_getClass("NSColor");
+public static final long class_NSColorList = objc_getClass("NSColorList");
+public static final long class_NSColorPanel = objc_getClass("NSColorPanel");
+public static final long class_NSColorSpace = objc_getClass("NSColorSpace");
+public static final long class_NSComboBox = objc_getClass("NSComboBox");
+public static final long class_NSComboBoxCell = objc_getClass("NSComboBoxCell");
+public static final long class_NSControl = objc_getClass("NSControl");
+public static final long class_NSCursor = objc_getClass("NSCursor");
+public static final long class_NSData = objc_getClass("NSData");
+public static final long class_NSDate = objc_getClass("NSDate");
+public static final long class_NSDatePicker = objc_getClass("NSDatePicker");
+public static final long class_NSDictionary = objc_getClass("NSDictionary");
+public static final long class_NSDirectoryEnumerator = objc_getClass("NSDirectoryEnumerator");
+public static final long class_NSDockTile = objc_getClass("NSDockTile");
+public static final long class_NSEnumerator = objc_getClass("NSEnumerator");
+public static final long class_NSError = objc_getClass("NSError");
+public static final long class_NSEvent = objc_getClass("NSEvent");
+public static final long class_NSFileManager = objc_getClass("NSFileManager");
+public static final long class_NSFileWrapper = objc_getClass("NSFileWrapper");
+public static final long class_NSFont = objc_getClass("NSFont");
+public static final long class_NSFontManager = objc_getClass("NSFontManager");
+public static final long class_NSFontPanel = objc_getClass("NSFontPanel");
+public static final long class_NSFormatter = objc_getClass("NSFormatter");
+public static final long class_NSGradient = objc_getClass("NSGradient");
+public static final long class_NSGraphicsContext = objc_getClass("NSGraphicsContext");
+public static final long class_NSHTTPCookie = objc_getClass("NSHTTPCookie");
+public static final long class_NSHTTPCookieStorage = objc_getClass("NSHTTPCookieStorage");
+public static final long class_NSImage = objc_getClass("NSImage");
+public static final long class_NSImageRep = objc_getClass("NSImageRep");
+public static final long class_NSImageView = objc_getClass("NSImageView");
+public static final long class_NSIndexSet = objc_getClass("NSIndexSet");
+public static final long class_NSInputManager = objc_getClass("NSInputManager");
+public static final long class_NSKeyedArchiver = objc_getClass("NSKeyedArchiver");
+public static final long class_NSKeyedUnarchiver = objc_getClass("NSKeyedUnarchiver");
+public static final long class_NSLayoutManager = objc_getClass("NSLayoutManager");
+public static final long class_NSLocale = objc_getClass("NSLocale");
+public static final long class_NSMenu = objc_getClass("NSMenu");
+public static final long class_NSMenuItem = objc_getClass("NSMenuItem");
+public static final long class_NSMutableArray = objc_getClass("NSMutableArray");
+public static final long class_NSMutableAttributedString = objc_getClass("NSMutableAttributedString");
+public static final long class_NSMutableDictionary = objc_getClass("NSMutableDictionary");
+public static final long class_NSMutableIndexSet = objc_getClass("NSMutableIndexSet");
+public static final long class_NSMutableParagraphStyle = objc_getClass("NSMutableParagraphStyle");
+public static final long class_NSMutableSet = objc_getClass("NSMutableSet");
+public static final long class_NSMutableString = objc_getClass("NSMutableString");
+public static final long class_NSMutableURLRequest = objc_getClass("NSMutableURLRequest");
+public static final long class_NSNotification = objc_getClass("NSNotification");
+public static final long class_NSNotificationCenter = objc_getClass("NSNotificationCenter");
+public static final long class_NSNumber = objc_getClass("NSNumber");
+public static final long class_NSNumberFormatter = objc_getClass("NSNumberFormatter");
+public static final long class_NSObject = objc_getClass("NSObject");
+public static final long class_NSOpenGLContext = objc_getClass("NSOpenGLContext");
+public static final long class_NSOpenGLPixelFormat = objc_getClass("NSOpenGLPixelFormat");
+public static final long class_NSOpenPanel = objc_getClass("NSOpenPanel");
+public static final long class_NSOutlineView = objc_getClass("NSOutlineView");
+public static final long class_NSPanel = objc_getClass("NSPanel");
+public static final long class_NSParagraphStyle = objc_getClass("NSParagraphStyle");
+public static final long class_NSPasteboard = objc_getClass("NSPasteboard");
+public static final long class_NSPopUpButton = objc_getClass("NSPopUpButton");
+public static final long class_NSPrintInfo = objc_getClass("NSPrintInfo");
+public static final long class_NSPrintOperation = objc_getClass("NSPrintOperation");
+public static final long class_NSPrintPanel = objc_getClass("NSPrintPanel");
+public static final long class_NSPrinter = objc_getClass("NSPrinter");
+public static final long class_NSProcessInfo = objc_getClass("NSProcessInfo");
+public static final long class_NSProgressIndicator = objc_getClass("NSProgressIndicator");
+public static final long class_NSResponder = objc_getClass("NSResponder");
+public static final long class_NSRunLoop = objc_getClass("NSRunLoop");
+public static final long class_NSSavePanel = objc_getClass("NSSavePanel");
+public static final long class_NSScreen = objc_getClass("NSScreen");
+public static final long class_NSScrollView = objc_getClass("NSScrollView");
+public static final long class_NSScroller = objc_getClass("NSScroller");
+public static final long class_NSSearchField = objc_getClass("NSSearchField");
+public static final long class_NSSearchFieldCell = objc_getClass("NSSearchFieldCell");
+public static final long class_NSSecureTextField = objc_getClass("NSSecureTextField");
+public static final long class_NSSet = objc_getClass("NSSet");
+public static final long class_NSSlider = objc_getClass("NSSlider");
+public static final long class_NSStatusBar = objc_getClass("NSStatusBar");
+public static final long class_NSStatusItem = objc_getClass("NSStatusItem");
+public static final long class_NSStepper = objc_getClass("NSStepper");
+public static final long class_NSString = objc_getClass("NSString");
+public static final long class_NSTabView = objc_getClass("NSTabView");
+public static final long class_NSTabViewItem = objc_getClass("NSTabViewItem");
+public static final long class_NSTableColumn = objc_getClass("NSTableColumn");
+public static final long class_NSTableHeaderCell = objc_getClass("NSTableHeaderCell");
+public static final long class_NSTableHeaderView = objc_getClass("NSTableHeaderView");
+public static final long class_NSTableView = objc_getClass("NSTableView");
+public static final long class_NSText = objc_getClass("NSText");
+public static final long class_NSTextAttachment = objc_getClass("NSTextAttachment");
+public static final long class_NSTextContainer = objc_getClass("NSTextContainer");
+public static final long class_NSTextField = objc_getClass("NSTextField");
+public static final long class_NSTextFieldCell = objc_getClass("NSTextFieldCell");
+public static final long class_NSTextStorage = objc_getClass("NSTextStorage");
+public static final long class_NSTextTab = objc_getClass("NSTextTab");
+public static final long class_NSTextView = objc_getClass("NSTextView");
+public static final long class_NSThread = objc_getClass("NSThread");
+public static final long class_NSTimeZone = objc_getClass("NSTimeZone");
+public static final long class_NSTimer = objc_getClass("NSTimer");
+public static final long class_NSToolbar = objc_getClass("NSToolbar");
+public static final long class_NSToolbarItem = objc_getClass("NSToolbarItem");
+public static final long class_NSTouch = objc_getClass("NSTouch");
+public static final long class_NSTrackingArea = objc_getClass("NSTrackingArea");
+public static final long class_NSTypesetter = objc_getClass("NSTypesetter");
+public static final long class_NSURL = objc_getClass("NSURL");
+public static final long class_NSURLAuthenticationChallenge = objc_getClass("NSURLAuthenticationChallenge");
+public static final long class_NSURLCredential = objc_getClass("NSURLCredential");
+public static final long class_NSURLDownload = objc_getClass("NSURLDownload");
+public static final long class_NSURLProtectionSpace = objc_getClass("NSURLProtectionSpace");
+public static final long class_NSURLRequest = objc_getClass("NSURLRequest");
+public static final long class_NSUndoManager = objc_getClass("NSUndoManager");
+public static final long class_NSUserDefaults = objc_getClass("NSUserDefaults");
+public static final long class_NSValue = objc_getClass("NSValue");
+public static final long class_NSView = objc_getClass("NSView");
+public static final long class_NSWindow = objc_getClass("NSWindow");
+public static final long class_NSWorkspace = objc_getClass("NSWorkspace");
+public static final long class_SFCertificatePanel = objc_getClass("SFCertificatePanel");
+public static final long class_SFCertificateTrustPanel = objc_getClass("SFCertificateTrustPanel");
+public static final long class_WebDataSource = objc_getClass("WebDataSource");
+public static final long class_WebFrame = objc_getClass("WebFrame");
+public static final long class_WebFrameView = objc_getClass("WebFrameView");
+public static final long class_WebPreferences = objc_getClass("WebPreferences");
+public static final long class_WebScriptObject = objc_getClass("WebScriptObject");
+public static final long class_WebUndefined = objc_getClass("WebUndefined");
+public static final long class_WebView = objc_getClass("WebView");
/** Protocols */
-public static final long /*int*/ protocol_NSAccessibility = objc_getProtocol("NSAccessibility");
-public static final long /*int*/ protocol_NSAccessibilityAdditions = objc_getProtocol("NSAccessibilityAdditions");
-public static final long /*int*/ protocol_NSAppearanceCustomization = objc_getProtocol("NSAppearanceCustomization");
-public static final long /*int*/ protocol_NSApplicationDelegate = objc_getProtocol("NSApplicationDelegate");
-public static final long /*int*/ protocol_NSApplicationNotifications = objc_getProtocol("NSApplicationNotifications");
-public static final long /*int*/ protocol_NSColorPanelResponderMethod = objc_getProtocol("NSColorPanelResponderMethod");
-public static final long /*int*/ protocol_NSComboBoxNotifications = objc_getProtocol("NSComboBoxNotifications");
-public static final long /*int*/ protocol_NSDraggingDestination = objc_getProtocol("NSDraggingDestination");
-public static final long /*int*/ protocol_NSDraggingSource = objc_getProtocol("NSDraggingSource");
-public static final long /*int*/ protocol_NSFontManagerResponderMethod = objc_getProtocol("NSFontManagerResponderMethod");
-public static final long /*int*/ protocol_NSFontPanelValidationAdditions = objc_getProtocol("NSFontPanelValidationAdditions");
-public static final long /*int*/ protocol_NSMenuDelegate = objc_getProtocol("NSMenuDelegate");
-public static final long /*int*/ protocol_NSMenuValidation = objc_getProtocol("NSMenuValidation");
-public static final long /*int*/ protocol_NSOutlineViewDataSource = objc_getProtocol("NSOutlineViewDataSource");
-public static final long /*int*/ protocol_NSOutlineViewDelegate = objc_getProtocol("NSOutlineViewDelegate");
-public static final long /*int*/ protocol_NSOutlineViewNotifications = objc_getProtocol("NSOutlineViewNotifications");
-public static final long /*int*/ protocol_NSPasteboardOwner = objc_getProtocol("NSPasteboardOwner");
-public static final long /*int*/ protocol_NSSavePanelDelegate = objc_getProtocol("NSSavePanelDelegate");
-public static final long /*int*/ protocol_NSTabViewDelegate = objc_getProtocol("NSTabViewDelegate");
-public static final long /*int*/ protocol_NSTableDataSource = objc_getProtocol("NSTableDataSource");
-public static final long /*int*/ protocol_NSTableViewDelegate = objc_getProtocol("NSTableViewDelegate");
-public static final long /*int*/ protocol_NSTableViewNotifications = objc_getProtocol("NSTableViewNotifications");
-public static final long /*int*/ protocol_NSTextAttachmentCell = objc_getProtocol("NSTextAttachmentCell");
-public static final long /*int*/ protocol_NSTextDelegate = objc_getProtocol("NSTextDelegate");
-public static final long /*int*/ protocol_NSTextInput = objc_getProtocol("NSTextInput");
-public static final long /*int*/ protocol_NSTextViewDelegate = objc_getProtocol("NSTextViewDelegate");
-public static final long /*int*/ protocol_NSToolTipOwner = objc_getProtocol("NSToolTipOwner");
-public static final long /*int*/ protocol_NSToolbarDelegate = objc_getProtocol("NSToolbarDelegate");
-public static final long /*int*/ protocol_NSToolbarNotifications = objc_getProtocol("NSToolbarNotifications");
-public static final long /*int*/ protocol_NSURLDownloadDelegate = objc_getProtocol("NSURLDownloadDelegate");
-public static final long /*int*/ protocol_NSWindowDelegate = objc_getProtocol("NSWindowDelegate");
-public static final long /*int*/ protocol_NSWindowNotifications = objc_getProtocol("NSWindowNotifications");
-public static final long /*int*/ protocol_WebDocumentRepresentation = objc_getProtocol("WebDocumentRepresentation");
-public static final long /*int*/ protocol_WebFrameLoadDelegate = objc_getProtocol("WebFrameLoadDelegate");
-public static final long /*int*/ protocol_WebOpenPanelResultListener = objc_getProtocol("WebOpenPanelResultListener");
-public static final long /*int*/ protocol_WebPolicyDecisionListener = objc_getProtocol("WebPolicyDecisionListener");
-public static final long /*int*/ protocol_WebPolicyDelegate = objc_getProtocol("WebPolicyDelegate");
-public static final long /*int*/ protocol_WebResourceLoadDelegate = objc_getProtocol("WebResourceLoadDelegate");
-public static final long /*int*/ protocol_WebUIDelegate = objc_getProtocol("WebUIDelegate");
+public static final long protocol_NSAccessibility = objc_getProtocol("NSAccessibility");
+public static final long protocol_NSAccessibilityAdditions = objc_getProtocol("NSAccessibilityAdditions");
+public static final long protocol_NSAppearanceCustomization = objc_getProtocol("NSAppearanceCustomization");
+public static final long protocol_NSApplicationDelegate = objc_getProtocol("NSApplicationDelegate");
+public static final long protocol_NSColorPanelResponderMethod = objc_getProtocol("NSColorPanelResponderMethod");
+public static final long protocol_NSComboBoxDelegate = objc_getProtocol("NSComboBoxDelegate");
+public static final long protocol_NSDraggingDestination = objc_getProtocol("NSDraggingDestination");
+public static final long protocol_NSDraggingSourceDeprecated = objc_getProtocol("NSDraggingSourceDeprecated");
+public static final long protocol_NSFontManagerResponderMethod = objc_getProtocol("NSFontManagerResponderMethod");
+public static final long protocol_NSFontPanelValidationAdditions = objc_getProtocol("NSFontPanelValidationAdditions");
+public static final long protocol_NSMenuDelegate = objc_getProtocol("NSMenuDelegate");
+public static final long protocol_NSMenuValidation = objc_getProtocol("NSMenuValidation");
+public static final long protocol_NSOpenSavePanelDelegate = objc_getProtocol("NSOpenSavePanelDelegate");
+public static final long protocol_NSOutlineViewDataSource = objc_getProtocol("NSOutlineViewDataSource");
+public static final long protocol_NSOutlineViewDelegate = objc_getProtocol("NSOutlineViewDelegate");
+public static final long protocol_NSPasteboardOwner = objc_getProtocol("NSPasteboardOwner");
+public static final long protocol_NSTabViewDelegate = objc_getProtocol("NSTabViewDelegate");
+public static final long protocol_NSTableViewDataSource = objc_getProtocol("NSTableViewDataSource");
+public static final long protocol_NSTableViewDelegate = objc_getProtocol("NSTableViewDelegate");
+public static final long protocol_NSTextAttachmentCell = objc_getProtocol("NSTextAttachmentCell");
+public static final long protocol_NSTextDelegate = objc_getProtocol("NSTextDelegate");
+public static final long protocol_NSTextInput = objc_getProtocol("NSTextInput");
+public static final long protocol_NSTextInputClient = objc_getProtocol("NSTextInputClient");
+public static final long protocol_NSTextViewDelegate = objc_getProtocol("NSTextViewDelegate");
+public static final long protocol_NSToolTipOwner = objc_getProtocol("NSToolTipOwner");
+public static final long protocol_NSToolbarDelegate = objc_getProtocol("NSToolbarDelegate");
+public static final long protocol_NSURLDownloadDelegate = objc_getProtocol("NSURLDownloadDelegate");
+public static final long protocol_NSWindowDelegate = objc_getProtocol("NSWindowDelegate");
+public static final long protocol_WebDocumentRepresentation = objc_getProtocol("WebDocumentRepresentation");
+public static final long protocol_WebFrameLoadDelegate = objc_getProtocol("WebFrameLoadDelegate");
+public static final long protocol_WebOpenPanelResultListener = objc_getProtocol("WebOpenPanelResultListener");
+public static final long protocol_WebPolicyDecisionListener = objc_getProtocol("WebPolicyDecisionListener");
+public static final long protocol_WebPolicyDelegate = objc_getProtocol("WebPolicyDelegate");
+public static final long protocol_WebResourceLoadDelegate = objc_getProtocol("WebResourceLoadDelegate");
+public static final long protocol_WebUIDelegate = objc_getProtocol("WebUIDelegate");
/** Selectors */
private static java.util.Map<Long,Selector> SELECTORS;
@@ -979,1414 +842,1319 @@ public static void registerSelector (Long value, Selector selector) {
public static Selector getSelector (long value) {
return SELECTORS.get(value);
}
-public static final long /*int*/ sel_CGEvent = Selector.sel_CGEvent.value;
-public static final long /*int*/ sel_DOMDocument = Selector.sel_DOMDocument.value;
-public static final long /*int*/ sel_IBeamCursor = Selector.sel_IBeamCursor.value;
-public static final long /*int*/ sel_PMPrintSession = Selector.sel_PMPrintSession.value;
-public static final long /*int*/ sel_PMPrintSettings = Selector.sel_PMPrintSettings.value;
-public static final long /*int*/ sel_TIFFRepresentation = Selector.sel_TIFFRepresentation.value;
-public static final long /*int*/ sel_URL = Selector.sel_URL.value;
-public static final long /*int*/ sel_URLFromPasteboard_ = Selector.sel_URLFromPasteboard_.value;
-public static final long /*int*/ sel_URLWithString_ = Selector.sel_URLWithString_.value;
-public static final long /*int*/ sel_URLsForDirectory_inDomains_ = Selector.sel_URLsForDirectory_inDomains_.value;
-public static final long /*int*/ sel_UTF8String = Selector.sel_UTF8String.value;
-public static final long /*int*/ sel_abortEditing = Selector.sel_abortEditing.value;
-public static final long /*int*/ sel_absoluteString = Selector.sel_absoluteString.value;
-public static final long /*int*/ sel_acceptsFirstMouse_ = Selector.sel_acceptsFirstMouse_.value;
-public static final long /*int*/ sel_acceptsFirstResponder = Selector.sel_acceptsFirstResponder.value;
-public static final long /*int*/ sel_accessibilityActionDescription_ = Selector.sel_accessibilityActionDescription_.value;
-public static final long /*int*/ sel_accessibilityActionNames = Selector.sel_accessibilityActionNames.value;
-public static final long /*int*/ sel_accessibilityAttributeNames = Selector.sel_accessibilityAttributeNames.value;
-public static final long /*int*/ sel_accessibilityAttributeValue_ = Selector.sel_accessibilityAttributeValue_.value;
-public static final long /*int*/ sel_accessibilityAttributeValue_forParameter_ = Selector.sel_accessibilityAttributeValue_forParameter_.value;
-public static final long /*int*/ sel_accessibilityFocusedUIElement = Selector.sel_accessibilityFocusedUIElement.value;
-public static final long /*int*/ sel_accessibilityHitTest_ = Selector.sel_accessibilityHitTest_.value;
-public static final long /*int*/ sel_accessibilityIsAttributeSettable_ = Selector.sel_accessibilityIsAttributeSettable_.value;
-public static final long /*int*/ sel_accessibilityIsIgnored = Selector.sel_accessibilityIsIgnored.value;
-public static final long /*int*/ sel_accessibilityParameterizedAttributeNames = Selector.sel_accessibilityParameterizedAttributeNames.value;
-public static final long /*int*/ sel_accessibilityPerformAction_ = Selector.sel_accessibilityPerformAction_.value;
-public static final long /*int*/ sel_accessibilitySetOverrideValue_forAttribute_ = Selector.sel_accessibilitySetOverrideValue_forAttribute_.value;
-public static final long /*int*/ sel_accessibilitySetValue_forAttribute_ = Selector.sel_accessibilitySetValue_forAttribute_.value;
-public static final long /*int*/ sel_action = Selector.sel_action.value;
-public static final long /*int*/ sel_activateIgnoringOtherApps_ = Selector.sel_activateIgnoringOtherApps_.value;
-public static final long /*int*/ sel_activateWithOptions_ = Selector.sel_activateWithOptions_.value;
-public static final long /*int*/ sel_addAttribute_value_range_ = Selector.sel_addAttribute_value_range_.value;
-public static final long /*int*/ sel_addButtonWithTitle_ = Selector.sel_addButtonWithTitle_.value;
-public static final long /*int*/ sel_addChildWindow_ordered_ = Selector.sel_addChildWindow_ordered_.value;
-public static final long /*int*/ sel_addClip = Selector.sel_addClip.value;
-public static final long /*int*/ sel_addEventListener_listener_useCapture_ = Selector.sel_addEventListener_listener_useCapture_.value;
-public static final long /*int*/ sel_addIndex_ = Selector.sel_addIndex_.value;
-public static final long /*int*/ sel_addItem_ = Selector.sel_addItem_.value;
-public static final long /*int*/ sel_addItemWithObjectValue_ = Selector.sel_addItemWithObjectValue_.value;
-public static final long /*int*/ sel_addItemWithTitle_action_keyEquivalent_ = Selector.sel_addItemWithTitle_action_keyEquivalent_.value;
-public static final long /*int*/ sel_addLayoutManager_ = Selector.sel_addLayoutManager_.value;
-public static final long /*int*/ sel_addObject_ = Selector.sel_addObject_.value;
-public static final long /*int*/ sel_addObjectsFromArray_ = Selector.sel_addObjectsFromArray_.value;
-public static final long /*int*/ sel_addObserver_selector_name_object_ = Selector.sel_addObserver_selector_name_object_.value;
-public static final long /*int*/ sel_addRepresentation_ = Selector.sel_addRepresentation_.value;
-public static final long /*int*/ sel_addSubview_ = Selector.sel_addSubview_.value;
-public static final long /*int*/ sel_addSubview_positioned_relativeTo_ = Selector.sel_addSubview_positioned_relativeTo_.value;
-public static final long /*int*/ sel_addTabStop_ = Selector.sel_addTabStop_.value;
-public static final long /*int*/ sel_addTabViewItem_ = Selector.sel_addTabViewItem_.value;
-public static final long /*int*/ sel_addTableColumn_ = Selector.sel_addTableColumn_.value;
-public static final long /*int*/ sel_addTemporaryAttribute_value_forCharacterRange_ = Selector.sel_addTemporaryAttribute_value_forCharacterRange_.value;
-public static final long /*int*/ sel_addTextContainer_ = Selector.sel_addTextContainer_.value;
-public static final long /*int*/ sel_addTimer_forMode_ = Selector.sel_addTimer_forMode_.value;
-public static final long /*int*/ sel_addToolTipRect_owner_userData_ = Selector.sel_addToolTipRect_owner_userData_.value;
-public static final long /*int*/ sel_addTypes_owner_ = Selector.sel_addTypes_owner_.value;
-public static final long /*int*/ sel_alignment = Selector.sel_alignment.value;
-public static final long /*int*/ sel_allKeys = Selector.sel_allKeys.value;
-public static final long /*int*/ sel_allObjects = Selector.sel_allObjects.value;
-public static final long /*int*/ sel_alloc = Selector.sel_alloc.value;
-public static final long /*int*/ sel_allowsColumnReordering = Selector.sel_allowsColumnReordering.value;
-public static final long /*int*/ sel_allowsFloats = Selector.sel_allowsFloats.value;
-public static final long /*int*/ sel_alphaComponent = Selector.sel_alphaComponent.value;
-public static final long /*int*/ sel_alphaValue = Selector.sel_alphaValue.value;
-public static final long /*int*/ sel_altKey = Selector.sel_altKey.value;
-public static final long /*int*/ sel_alternateSelectedControlColor = Selector.sel_alternateSelectedControlColor.value;
-public static final long /*int*/ sel_alternateSelectedControlTextColor = Selector.sel_alternateSelectedControlTextColor.value;
-public static final long /*int*/ sel_alwaysShowsDecimalSeparator = Selector.sel_alwaysShowsDecimalSeparator.value;
-public static final long /*int*/ sel_appearanceNamed_ = Selector.sel_appearanceNamed_.value;
-public static final long /*int*/ sel_appendAttributedString_ = Selector.sel_appendAttributedString_.value;
-public static final long /*int*/ sel_appendBezierPath_ = Selector.sel_appendBezierPath_.value;
-public static final long /*int*/ sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_ = Selector.sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_.value;
-public static final long /*int*/ sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_ = Selector.sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_.value;
-public static final long /*int*/ sel_appendBezierPathWithGlyphs_count_inFont_ = Selector.sel_appendBezierPathWithGlyphs_count_inFont_.value;
-public static final long /*int*/ sel_appendBezierPathWithOvalInRect_ = Selector.sel_appendBezierPathWithOvalInRect_.value;
-public static final long /*int*/ sel_appendBezierPathWithRect_ = Selector.sel_appendBezierPathWithRect_.value;
-public static final long /*int*/ sel_appendBezierPathWithRoundedRect_xRadius_yRadius_ = Selector.sel_appendBezierPathWithRoundedRect_xRadius_yRadius_.value;
-public static final long /*int*/ sel_appendString_ = Selector.sel_appendString_.value;
-public static final long /*int*/ sel_application_openFile_ = Selector.sel_application_openFile_.value;
-public static final long /*int*/ sel_application_openFiles_ = Selector.sel_application_openFiles_.value;
-public static final long /*int*/ sel_applicationDidBecomeActive_ = Selector.sel_applicationDidBecomeActive_.value;
-public static final long /*int*/ sel_applicationDidFinishLaunching_ = Selector.sel_applicationDidFinishLaunching_.value;
-public static final long /*int*/ sel_applicationDidResignActive_ = Selector.sel_applicationDidResignActive_.value;
-public static final long /*int*/ sel_applicationDockMenu_ = Selector.sel_applicationDockMenu_.value;
-public static final long /*int*/ sel_applicationIconImage = Selector.sel_applicationIconImage.value;
-public static final long /*int*/ sel_applicationShouldHandleReopen_hasVisibleWindows_ = Selector.sel_applicationShouldHandleReopen_hasVisibleWindows_.value;
-public static final long /*int*/ sel_applicationShouldTerminate_ = Selector.sel_applicationShouldTerminate_.value;
-public static final long /*int*/ sel_applicationWillFinishLaunching_ = Selector.sel_applicationWillFinishLaunching_.value;
-public static final long /*int*/ sel_applicationWillTerminate_ = Selector.sel_applicationWillTerminate_.value;
-public static final long /*int*/ sel_archivedDataWithRootObject_ = Selector.sel_archivedDataWithRootObject_.value;
-public static final long /*int*/ sel_areCursorRectsEnabled = Selector.sel_areCursorRectsEnabled.value;
-public static final long /*int*/ sel_arrangeInFront_ = Selector.sel_arrangeInFront_.value;
-public static final long /*int*/ sel_array = Selector.sel_array.value;
-public static final long /*int*/ sel_arrayWithCapacity_ = Selector.sel_arrayWithCapacity_.value;
-public static final long /*int*/ sel_arrayWithObject_ = Selector.sel_arrayWithObject_.value;
-public static final long /*int*/ sel_arrowCursor = Selector.sel_arrowCursor.value;
-public static final long /*int*/ sel_ascender = Selector.sel_ascender.value;
-public static final long /*int*/ sel_attachColorList_ = Selector.sel_attachColorList_.value;
-public static final long /*int*/ sel_attachment = Selector.sel_attachment.value;
-public static final long /*int*/ sel_attribute_atIndex_effectiveRange_ = Selector.sel_attribute_atIndex_effectiveRange_.value;
-public static final long /*int*/ sel_attributedStringValue = Selector.sel_attributedStringValue.value;
-public static final long /*int*/ sel_attributedStringWithAttachment_ = Selector.sel_attributedStringWithAttachment_.value;
-public static final long /*int*/ sel_attributedSubstringFromRange_ = Selector.sel_attributedSubstringFromRange_.value;
-public static final long /*int*/ sel_attributedTitle = Selector.sel_attributedTitle.value;
-public static final long /*int*/ sel_attributesAtIndex_longestEffectiveRange_inRange_ = Selector.sel_attributesAtIndex_longestEffectiveRange_inRange_.value;
-public static final long /*int*/ sel_autorelease = Selector.sel_autorelease.value;
-public static final long /*int*/ sel_availableFontFamilies = Selector.sel_availableFontFamilies.value;
-public static final long /*int*/ sel_availableFonts = Selector.sel_availableFonts.value;
-public static final long /*int*/ sel_availableMembersOfFontFamily_ = Selector.sel_availableMembersOfFontFamily_.value;
-public static final long /*int*/ sel_availableTypeFromArray_ = Selector.sel_availableTypeFromArray_.value;
-public static final long /*int*/ sel_backgroundColor = Selector.sel_backgroundColor.value;
-public static final long /*int*/ sel_backingScaleFactor = Selector.sel_backingScaleFactor.value;
-public static final long /*int*/ sel_badgeLabel = Selector.sel_badgeLabel.value;
-public static final long /*int*/ sel_baselineOffsetInLayoutManager_glyphIndex_ = Selector.sel_baselineOffsetInLayoutManager_glyphIndex_.value;
-public static final long /*int*/ sel_becomeFirstResponder = Selector.sel_becomeFirstResponder.value;
-public static final long /*int*/ sel_becomeKeyWindow = Selector.sel_becomeKeyWindow.value;
-public static final long /*int*/ sel_beginDocument = Selector.sel_beginDocument.value;
-public static final long /*int*/ sel_beginEditing = Selector.sel_beginEditing.value;
-public static final long /*int*/ sel_beginGestureWithEvent_ = Selector.sel_beginGestureWithEvent_.value;
-public static final long /*int*/ sel_beginPageInRect_atPlacement_ = Selector.sel_beginPageInRect_atPlacement_.value;
-public static final long /*int*/ sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_ = Selector.sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_.value;
-public static final long /*int*/ sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_ = Selector.sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_.value;
-public static final long /*int*/ sel_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ = Selector.sel_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_.value;
-public static final long /*int*/ sel_beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_ = Selector.sel_beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_.value;
-public static final long /*int*/ sel_bestRepresentationForDevice_ = Selector.sel_bestRepresentationForDevice_.value;
-public static final long /*int*/ sel_bezelStyle = Selector.sel_bezelStyle.value;
-public static final long /*int*/ sel_bezierPath = Selector.sel_bezierPath.value;
-public static final long /*int*/ sel_bezierPathByFlatteningPath = Selector.sel_bezierPathByFlatteningPath.value;
-public static final long /*int*/ sel_bezierPathWithRect_ = Selector.sel_bezierPathWithRect_.value;
-public static final long /*int*/ sel_bezierPathWithRoundedRect_xRadius_yRadius_ = Selector.sel_bezierPathWithRoundedRect_xRadius_yRadius_.value;
-public static final long /*int*/ sel_bitmapData = Selector.sel_bitmapData.value;
-public static final long /*int*/ sel_bitmapFormat = Selector.sel_bitmapFormat.value;
-public static final long /*int*/ sel_bitmapImageRepForCachingDisplayInRect_ = Selector.sel_bitmapImageRepForCachingDisplayInRect_.value;
-public static final long /*int*/ sel_bitsPerPixel = Selector.sel_bitsPerPixel.value;
-public static final long /*int*/ sel_bitsPerSample = Selector.sel_bitsPerSample.value;
-public static final long /*int*/ sel_blackColor = Selector.sel_blackColor.value;
-public static final long /*int*/ sel_blueComponent = Selector.sel_blueComponent.value;
-public static final long /*int*/ sel_boldSystemFontOfSize_ = Selector.sel_boldSystemFontOfSize_.value;
-public static final long /*int*/ sel_boolValue = Selector.sel_boolValue.value;
-public static final long /*int*/ sel_borderWidth = Selector.sel_borderWidth.value;
-public static final long /*int*/ sel_boundingRectForGlyphRange_inTextContainer_ = Selector.sel_boundingRectForGlyphRange_inTextContainer_.value;
-public static final long /*int*/ sel_boundingRectWithSize_options_ = Selector.sel_boundingRectWithSize_options_.value;
-public static final long /*int*/ sel_bounds = Selector.sel_bounds.value;
-public static final long /*int*/ sel_bundleIdentifier = Selector.sel_bundleIdentifier.value;
-public static final long /*int*/ sel_bundlePath = Selector.sel_bundlePath.value;
-public static final long /*int*/ sel_bundleWithIdentifier_ = Selector.sel_bundleWithIdentifier_.value;
-public static final long /*int*/ sel_bundleWithPath_ = Selector.sel_bundleWithPath_.value;
-public static final long /*int*/ sel_button = Selector.sel_button.value;
-public static final long /*int*/ sel_buttonNumber = Selector.sel_buttonNumber.value;
-public static final long /*int*/ sel_bytes = Selector.sel_bytes.value;
-public static final long /*int*/ sel_bytesPerPlane = Selector.sel_bytesPerPlane.value;
-public static final long /*int*/ sel_bytesPerRow = Selector.sel_bytesPerRow.value;
-public static final long /*int*/ sel_cacheDisplayInRect_toBitmapImageRep_ = Selector.sel_cacheDisplayInRect_toBitmapImageRep_.value;
-public static final long /*int*/ sel_calendarDate = Selector.sel_calendarDate.value;
-public static final long /*int*/ sel_canBecomeKeyView = Selector.sel_canBecomeKeyView.value;
-public static final long /*int*/ sel_canBecomeKeyWindow = Selector.sel_canBecomeKeyWindow.value;
-public static final long /*int*/ sel_canDragRowsWithIndexes_atPoint_ = Selector.sel_canDragRowsWithIndexes_atPoint_.value;
-public static final long /*int*/ sel_canGoBack = Selector.sel_canGoBack.value;
-public static final long /*int*/ sel_canGoForward = Selector.sel_canGoForward.value;
-public static final long /*int*/ sel_canRedo = Selector.sel_canRedo.value;
-public static final long /*int*/ sel_canShowMIMEType_ = Selector.sel_canShowMIMEType_.value;
-public static final long /*int*/ sel_canUndo = Selector.sel_canUndo.value;
-public static final long /*int*/ sel_cancel = Selector.sel_cancel.value;
-public static final long /*int*/ sel_cancelAuthenticationChallenge_ = Selector.sel_cancelAuthenticationChallenge_.value;
-public static final long /*int*/ sel_cancelButtonCell = Selector.sel_cancelButtonCell.value;
-public static final long /*int*/ sel_cancelButtonRectForBounds_ = Selector.sel_cancelButtonRectForBounds_.value;
-public static final long /*int*/ sel_cancelOperation_ = Selector.sel_cancelOperation_.value;
-public static final long /*int*/ sel_cancelTracking = Selector.sel_cancelTracking.value;
-public static final long /*int*/ sel_cascadeTopLeftFromPoint_ = Selector.sel_cascadeTopLeftFromPoint_.value;
-public static final long /*int*/ sel_cell = Selector.sel_cell.value;
-public static final long /*int*/ sel_cellClass = Selector.sel_cellClass.value;
-public static final long /*int*/ sel_cellSize = Selector.sel_cellSize.value;
-public static final long /*int*/ sel_cellSizeForBounds_ = Selector.sel_cellSizeForBounds_.value;
-public static final long /*int*/ sel_changeColor_ = Selector.sel_changeColor_.value;
-public static final long /*int*/ sel_changeFont_ = Selector.sel_changeFont_.value;
-public static final long /*int*/ sel_charCode = Selector.sel_charCode.value;
-public static final long /*int*/ sel_characterAtIndex_ = Selector.sel_characterAtIndex_.value;
-public static final long /*int*/ sel_characterIndexForGlyphAtIndex_ = Selector.sel_characterIndexForGlyphAtIndex_.value;
-public static final long /*int*/ sel_characterIndexForInsertionAtPoint_ = Selector.sel_characterIndexForInsertionAtPoint_.value;
-public static final long /*int*/ sel_characterIndexForPoint_ = Selector.sel_characterIndexForPoint_.value;
-public static final long /*int*/ sel_characterIsMember_ = Selector.sel_characterIsMember_.value;
-public static final long /*int*/ sel_characters = Selector.sel_characters.value;
-public static final long /*int*/ sel_charactersIgnoringModifiers = Selector.sel_charactersIgnoringModifiers.value;
-public static final long /*int*/ sel_chooseFilename_ = Selector.sel_chooseFilename_.value;
-public static final long /*int*/ sel_className = Selector.sel_className.value;
-public static final long /*int*/ sel_cleanUpOperation = Selector.sel_cleanUpOperation.value;
-public static final long /*int*/ sel_clearColor = Selector.sel_clearColor.value;
-public static final long /*int*/ sel_clearCurrentContext = Selector.sel_clearCurrentContext.value;
-public static final long /*int*/ sel_clearDrawable = Selector.sel_clearDrawable.value;
-public static final long /*int*/ sel_clickCount = Selector.sel_clickCount.value;
-public static final long /*int*/ sel_clickedColumn = Selector.sel_clickedColumn.value;
-public static final long /*int*/ sel_clickedRow = Selector.sel_clickedRow.value;
-public static final long /*int*/ sel_close = Selector.sel_close.value;
-public static final long /*int*/ sel_closePath = Selector.sel_closePath.value;
-public static final long /*int*/ sel_code = Selector.sel_code.value;
-public static final long /*int*/ sel_collapseItem_ = Selector.sel_collapseItem_.value;
-public static final long /*int*/ sel_collapseItem_collapseChildren_ = Selector.sel_collapseItem_collapseChildren_.value;
-public static final long /*int*/ sel_collectionBehavior = Selector.sel_collectionBehavior.value;
-public static final long /*int*/ sel_color = Selector.sel_color.value;
-public static final long /*int*/ sel_colorAtX_y_ = Selector.sel_colorAtX_y_.value;
-public static final long /*int*/ sel_colorListNamed_ = Selector.sel_colorListNamed_.value;
-public static final long /*int*/ sel_colorSpace = Selector.sel_colorSpace.value;
-public static final long /*int*/ sel_colorSpaceModel = Selector.sel_colorSpaceModel.value;
-public static final long /*int*/ sel_colorSpaceName = Selector.sel_colorSpaceName.value;
-public static final long /*int*/ sel_colorUsingColorSpaceName_ = Selector.sel_colorUsingColorSpaceName_.value;
-public static final long /*int*/ sel_colorWithCalibratedRed_green_blue_alpha_ = Selector.sel_colorWithCalibratedRed_green_blue_alpha_.value;
-public static final long /*int*/ sel_colorWithDeviceRed_green_blue_alpha_ = Selector.sel_colorWithDeviceRed_green_blue_alpha_.value;
-public static final long /*int*/ sel_colorWithKey_ = Selector.sel_colorWithKey_.value;
-public static final long /*int*/ sel_colorWithPatternImage_ = Selector.sel_colorWithPatternImage_.value;
-public static final long /*int*/ sel_columnAtPoint_ = Selector.sel_columnAtPoint_.value;
-public static final long /*int*/ sel_columnIndexesInRect_ = Selector.sel_columnIndexesInRect_.value;
-public static final long /*int*/ sel_columnWithIdentifier_ = Selector.sel_columnWithIdentifier_.value;
-public static final long /*int*/ sel_comboBoxSelectionDidChange_ = Selector.sel_comboBoxSelectionDidChange_.value;
-public static final long /*int*/ sel_comboBoxWillDismiss_ = Selector.sel_comboBoxWillDismiss_.value;
-public static final long /*int*/ sel_comboBoxWillPopUp_ = Selector.sel_comboBoxWillPopUp_.value;
-public static final long /*int*/ sel_compare_ = Selector.sel_compare_.value;
-public static final long /*int*/ sel_concat = Selector.sel_concat.value;
-public static final long /*int*/ sel_conformsToProtocol_ = Selector.sel_conformsToProtocol_.value;
-public static final long /*int*/ sel_containerSize = Selector.sel_containerSize.value;
-public static final long /*int*/ sel_containsIndex_ = Selector.sel_containsIndex_.value;
-public static final long /*int*/ sel_containsObject_ = Selector.sel_containsObject_.value;
-public static final long /*int*/ sel_containsPoint_ = Selector.sel_containsPoint_.value;
-public static final long /*int*/ sel_contentRect = Selector.sel_contentRect.value;
-public static final long /*int*/ sel_contentSize = Selector.sel_contentSize.value;
-public static final long /*int*/ sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_ = Selector.sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_.value;
-public static final long /*int*/ sel_contentView = Selector.sel_contentView.value;
-public static final long /*int*/ sel_contentViewMargins = Selector.sel_contentViewMargins.value;
-public static final long /*int*/ sel_context = Selector.sel_context.value;
-public static final long /*int*/ sel_controlBackgroundColor = Selector.sel_controlBackgroundColor.value;
-public static final long /*int*/ sel_controlContentFontOfSize_ = Selector.sel_controlContentFontOfSize_.value;
-public static final long /*int*/ sel_controlDarkShadowColor = Selector.sel_controlDarkShadowColor.value;
-public static final long /*int*/ sel_controlHighlightColor = Selector.sel_controlHighlightColor.value;
-public static final long /*int*/ sel_controlLightHighlightColor = Selector.sel_controlLightHighlightColor.value;
-public static final long /*int*/ sel_controlPointBounds = Selector.sel_controlPointBounds.value;
-public static final long /*int*/ sel_controlShadowColor = Selector.sel_controlShadowColor.value;
-public static final long /*int*/ sel_controlSize = Selector.sel_controlSize.value;
-public static final long /*int*/ sel_controlTextColor = Selector.sel_controlTextColor.value;
-public static final long /*int*/ sel_convertBaseToScreen_ = Selector.sel_convertBaseToScreen_.value;
-public static final long /*int*/ sel_convertFont_toHaveTrait_ = Selector.sel_convertFont_toHaveTrait_.value;
-public static final long /*int*/ sel_convertPoint_fromView_ = Selector.sel_convertPoint_fromView_.value;
-public static final long /*int*/ sel_convertPoint_toView_ = Selector.sel_convertPoint_toView_.value;
-public static final long /*int*/ sel_convertPointFromBase_ = Selector.sel_convertPointFromBase_.value;
-public static final long /*int*/ sel_convertPointToBase_ = Selector.sel_convertPointToBase_.value;
-public static final long /*int*/ sel_convertRect_fromView_ = Selector.sel_convertRect_fromView_.value;
-public static final long /*int*/ sel_convertRect_toView_ = Selector.sel_convertRect_toView_.value;
-public static final long /*int*/ sel_convertRectFromBase_ = Selector.sel_convertRectFromBase_.value;
-public static final long /*int*/ sel_convertRectToBase_ = Selector.sel_convertRectToBase_.value;
-public static final long /*int*/ sel_convertScreenToBase_ = Selector.sel_convertScreenToBase_.value;
-public static final long /*int*/ sel_convertSize_fromView_ = Selector.sel_convertSize_fromView_.value;
-public static final long /*int*/ sel_convertSize_toView_ = Selector.sel_convertSize_toView_.value;
-public static final long /*int*/ sel_convertSizeFromBase_ = Selector.sel_convertSizeFromBase_.value;
-public static final long /*int*/ sel_convertSizeToBase_ = Selector.sel_convertSizeToBase_.value;
-public static final long /*int*/ sel_cookies = Selector.sel_cookies.value;
-public static final long /*int*/ sel_cookiesForURL_ = Selector.sel_cookiesForURL_.value;
-public static final long /*int*/ sel_cookiesWithResponseHeaderFields_forURL_ = Selector.sel_cookiesWithResponseHeaderFields_forURL_.value;
-public static final long /*int*/ sel_copiesOnScroll = Selector.sel_copiesOnScroll.value;
-public static final long /*int*/ sel_copy = Selector.sel_copy.value;
-public static final long /*int*/ sel_copy_ = Selector.sel_copy_.value;
-public static final long /*int*/ sel_count = Selector.sel_count.value;
-public static final long /*int*/ sel_createContext = Selector.sel_createContext.value;
-public static final long /*int*/ sel_createFileAtPath_contents_attributes_ = Selector.sel_createFileAtPath_contents_attributes_.value;
-public static final long /*int*/ sel_credentialWithUser_password_persistence_ = Selector.sel_credentialWithUser_password_persistence_.value;
-public static final long /*int*/ sel_crosshairCursor = Selector.sel_crosshairCursor.value;
-public static final long /*int*/ sel_ctrlKey = Selector.sel_ctrlKey.value;
-public static final long /*int*/ sel_currentApplication = Selector.sel_currentApplication.value;
-public static final long /*int*/ sel_currentContext = Selector.sel_currentContext.value;
-public static final long /*int*/ sel_currentCursor = Selector.sel_currentCursor.value;
-public static final long /*int*/ sel_currentEditor = Selector.sel_currentEditor.value;
-public static final long /*int*/ sel_currentEvent = Selector.sel_currentEvent.value;
-public static final long /*int*/ sel_currentInputManager = Selector.sel_currentInputManager.value;
-public static final long /*int*/ sel_currentPoint = Selector.sel_currentPoint.value;
-public static final long /*int*/ sel_currentRunLoop = Selector.sel_currentRunLoop.value;
-public static final long /*int*/ sel_currentThread = Selector.sel_currentThread.value;
-public static final long /*int*/ sel_cursorUpdate_ = Selector.sel_cursorUpdate_.value;
-public static final long /*int*/ sel_curveToPoint_controlPoint1_controlPoint2_ = Selector.sel_curveToPoint_controlPoint1_controlPoint2_.value;
-public static final long /*int*/ sel_cut_ = Selector.sel_cut_.value;
-public static final long /*int*/ sel_dataCell = Selector.sel_dataCell.value;
-public static final long /*int*/ sel_dataForType_ = Selector.sel_dataForType_.value;
-public static final long /*int*/ sel_dataSource = Selector.sel_dataSource.value;
-public static final long /*int*/ sel_dataWithBytes_length_ = Selector.sel_dataWithBytes_length_.value;
-public static final long /*int*/ sel_dateValue = Selector.sel_dateValue.value;
-public static final long /*int*/ sel_dateWithCalendarFormat_timeZone_ = Selector.sel_dateWithCalendarFormat_timeZone_.value;
-public static final long /*int*/ sel_dateWithTimeIntervalSinceNow_ = Selector.sel_dateWithTimeIntervalSinceNow_.value;
-public static final long /*int*/ sel_dateWithYear_month_day_hour_minute_second_timeZone_ = Selector.sel_dateWithYear_month_day_hour_minute_second_timeZone_.value;
-public static final long /*int*/ sel_dayOfMonth = Selector.sel_dayOfMonth.value;
-public static final long /*int*/ sel_dealloc = Selector.sel_dealloc.value;
-public static final long /*int*/ sel_decimalDigitCharacterSet = Selector.sel_decimalDigitCharacterSet.value;
-public static final long /*int*/ sel_decimalSeparator = Selector.sel_decimalSeparator.value;
-public static final long /*int*/ sel_declareTypes_owner_ = Selector.sel_declareTypes_owner_.value;
-public static final long /*int*/ sel_defaultBaselineOffsetForFont_ = Selector.sel_defaultBaselineOffsetForFont_.value;
-public static final long /*int*/ sel_defaultButtonCell = Selector.sel_defaultButtonCell.value;
-public static final long /*int*/ sel_defaultCenter = Selector.sel_defaultCenter.value;
-public static final long /*int*/ sel_defaultFlatness = Selector.sel_defaultFlatness.value;
-public static final long /*int*/ sel_defaultLineHeightForFont_ = Selector.sel_defaultLineHeightForFont_.value;
-public static final long /*int*/ sel_defaultManager = Selector.sel_defaultManager.value;
-public static final long /*int*/ sel_defaultParagraphStyle = Selector.sel_defaultParagraphStyle.value;
-public static final long /*int*/ sel_defaultPrinter = Selector.sel_defaultPrinter.value;
-public static final long /*int*/ sel_defaultTimeZone = Selector.sel_defaultTimeZone.value;
-public static final long /*int*/ sel_delegate = Selector.sel_delegate.value;
-public static final long /*int*/ sel_deleteCookie_ = Selector.sel_deleteCookie_.value;
-public static final long /*int*/ sel_deliverResult = Selector.sel_deliverResult.value;
-public static final long /*int*/ sel_deltaX = Selector.sel_deltaX.value;
-public static final long /*int*/ sel_deltaY = Selector.sel_deltaY.value;
-public static final long /*int*/ sel_deminiaturize_ = Selector.sel_deminiaturize_.value;
-public static final long /*int*/ sel_depth = Selector.sel_depth.value;
-public static final long /*int*/ sel_descender = Selector.sel_descender.value;
-public static final long /*int*/ sel_description = Selector.sel_description.value;
-public static final long /*int*/ sel_deselectAll_ = Selector.sel_deselectAll_.value;
-public static final long /*int*/ sel_deselectItemAtIndex_ = Selector.sel_deselectItemAtIndex_.value;
-public static final long /*int*/ sel_deselectRow_ = Selector.sel_deselectRow_.value;
-public static final long /*int*/ sel_destroyContext = Selector.sel_destroyContext.value;
-public static final long /*int*/ sel_detail = Selector.sel_detail.value;
-public static final long /*int*/ sel_device = Selector.sel_device.value;
-public static final long /*int*/ sel_deviceDescription = Selector.sel_deviceDescription.value;
-public static final long /*int*/ sel_deviceSize = Selector.sel_deviceSize.value;
-public static final long /*int*/ sel_dictionary = Selector.sel_dictionary.value;
-public static final long /*int*/ sel_dictionaryWithCapacity_ = Selector.sel_dictionaryWithCapacity_.value;
-public static final long /*int*/ sel_dictionaryWithObject_forKey_ = Selector.sel_dictionaryWithObject_forKey_.value;
-public static final long /*int*/ sel_disableCursorRects = Selector.sel_disableCursorRects.value;
-public static final long /*int*/ sel_disableFlushWindow = Selector.sel_disableFlushWindow.value;
-public static final long /*int*/ sel_disabledControlTextColor = Selector.sel_disabledControlTextColor.value;
-public static final long /*int*/ sel_discardCursorRects = Selector.sel_discardCursorRects.value;
-public static final long /*int*/ sel_display = Selector.sel_display.value;
-public static final long /*int*/ sel_displayIfNeeded = Selector.sel_displayIfNeeded.value;
-public static final long /*int*/ sel_displayName = Selector.sel_displayName.value;
-public static final long /*int*/ sel_displayNameForKey_value_ = Selector.sel_displayNameForKey_value_.value;
-public static final long /*int*/ sel_displayRectIgnoringOpacity_inContext_ = Selector.sel_displayRectIgnoringOpacity_inContext_.value;
-public static final long /*int*/ sel_distantFuture = Selector.sel_distantFuture.value;
-public static final long /*int*/ sel_doCommandBySelector_ = Selector.sel_doCommandBySelector_.value;
-public static final long /*int*/ sel_dockTile = Selector.sel_dockTile.value;
-public static final long /*int*/ sel_documentCursor = Selector.sel_documentCursor.value;
-public static final long /*int*/ sel_documentSource = Selector.sel_documentSource.value;
-public static final long /*int*/ sel_documentView = Selector.sel_documentView.value;
-public static final long /*int*/ sel_documentViewShouldHandlePrint = Selector.sel_documentViewShouldHandlePrint.value;
-public static final long /*int*/ sel_documentVisibleRect = Selector.sel_documentVisibleRect.value;
-public static final long /*int*/ sel_doubleClickAtIndex_ = Selector.sel_doubleClickAtIndex_.value;
-public static final long /*int*/ sel_doubleValue = Selector.sel_doubleValue.value;
-public static final long /*int*/ sel_download = Selector.sel_download.value;
-public static final long /*int*/ sel_download_decideDestinationWithSuggestedFilename_ = Selector.sel_download_decideDestinationWithSuggestedFilename_.value;
-public static final long /*int*/ sel_dragImage_at_offset_event_pasteboard_source_slideBack_ = Selector.sel_dragImage_at_offset_event_pasteboard_source_slideBack_.value;
-public static final long /*int*/ sel_dragImageForRowsWithIndexes_tableColumns_event_offset_ = Selector.sel_dragImageForRowsWithIndexes_tableColumns_event_offset_.value;
-public static final long /*int*/ sel_dragSelectionWithEvent_offset_slideBack_ = Selector.sel_dragSelectionWithEvent_offset_slideBack_.value;
-public static final long /*int*/ sel_draggedImage_beganAt_ = Selector.sel_draggedImage_beganAt_.value;
-public static final long /*int*/ sel_draggedImage_endedAt_operation_ = Selector.sel_draggedImage_endedAt_operation_.value;
-public static final long /*int*/ sel_draggingDestinationWindow = Selector.sel_draggingDestinationWindow.value;
-public static final long /*int*/ sel_draggingEnded_ = Selector.sel_draggingEnded_.value;
-public static final long /*int*/ sel_draggingEntered_ = Selector.sel_draggingEntered_.value;
-public static final long /*int*/ sel_draggingExited_ = Selector.sel_draggingExited_.value;
-public static final long /*int*/ sel_draggingLocation = Selector.sel_draggingLocation.value;
-public static final long /*int*/ sel_draggingPasteboard = Selector.sel_draggingPasteboard.value;
-public static final long /*int*/ sel_draggingSourceOperationMask = Selector.sel_draggingSourceOperationMask.value;
-public static final long /*int*/ sel_draggingSourceOperationMaskForLocal_ = Selector.sel_draggingSourceOperationMaskForLocal_.value;
-public static final long /*int*/ sel_draggingUpdated_ = Selector.sel_draggingUpdated_.value;
-public static final long /*int*/ sel_drawAtPoint_ = Selector.sel_drawAtPoint_.value;
-public static final long /*int*/ sel_drawAtPoint_fromRect_operation_fraction_ = Selector.sel_drawAtPoint_fromRect_operation_fraction_.value;
-public static final long /*int*/ sel_drawBackgroundForGlyphRange_atPoint_ = Selector.sel_drawBackgroundForGlyphRange_atPoint_.value;
-public static final long /*int*/ sel_drawBackgroundInClipRect_ = Selector.sel_drawBackgroundInClipRect_.value;
-public static final long /*int*/ sel_drawBezelWithFrame_inView_ = Selector.sel_drawBezelWithFrame_inView_.value;
-public static final long /*int*/ sel_drawFromPoint_toPoint_options_ = Selector.sel_drawFromPoint_toPoint_options_.value;
-public static final long /*int*/ sel_drawGlyphsForGlyphRange_atPoint_ = Selector.sel_drawGlyphsForGlyphRange_atPoint_.value;
-public static final long /*int*/ sel_drawImage_withFrame_inView_ = Selector.sel_drawImage_withFrame_inView_.value;
-public static final long /*int*/ sel_drawInBezierPath_angle_ = Selector.sel_drawInBezierPath_angle_.value;
-public static final long /*int*/ sel_drawInRect_ = Selector.sel_drawInRect_.value;
-public static final long /*int*/ sel_drawInRect_angle_ = Selector.sel_drawInRect_angle_.value;
-public static final long /*int*/ sel_drawInRect_fromRect_operation_fraction_ = Selector.sel_drawInRect_fromRect_operation_fraction_.value;
-public static final long /*int*/ sel_drawInteriorWithFrame_inView_ = Selector.sel_drawInteriorWithFrame_inView_.value;
-public static final long /*int*/ sel_drawLabel_inRect_ = Selector.sel_drawLabel_inRect_.value;
-public static final long /*int*/ sel_drawRect_ = Selector.sel_drawRect_.value;
-public static final long /*int*/ sel_drawSortIndicatorWithFrame_inView_ascending_priority_ = Selector.sel_drawSortIndicatorWithFrame_inView_ascending_priority_.value;
-public static final long /*int*/ sel_drawStatusBarBackgroundInRect_withHighlight_ = Selector.sel_drawStatusBarBackgroundInRect_withHighlight_.value;
-public static final long /*int*/ sel_drawTitle_withFrame_inView_ = Selector.sel_drawTitle_withFrame_inView_.value;
-public static final long /*int*/ sel_drawViewBackgroundInRect_ = Selector.sel_drawViewBackgroundInRect_.value;
-public static final long /*int*/ sel_drawWithExpansionFrame_inView_ = Selector.sel_drawWithExpansionFrame_inView_.value;
-public static final long /*int*/ sel_drawingRectForBounds_ = Selector.sel_drawingRectForBounds_.value;
-public static final long /*int*/ sel_elementAtIndex_associatedPoints_ = Selector.sel_elementAtIndex_associatedPoints_.value;
-public static final long /*int*/ sel_elementCount = Selector.sel_elementCount.value;
-public static final long /*int*/ sel_enableCursorRects = Selector.sel_enableCursorRects.value;
-public static final long /*int*/ sel_enableFlushWindow = Selector.sel_enableFlushWindow.value;
-public static final long /*int*/ sel_endDocument = Selector.sel_endDocument.value;
-public static final long /*int*/ sel_endEditing = Selector.sel_endEditing.value;
-public static final long /*int*/ sel_endEditingFor_ = Selector.sel_endEditingFor_.value;
-public static final long /*int*/ sel_endGestureWithEvent_ = Selector.sel_endGestureWithEvent_.value;
-public static final long /*int*/ sel_endPage = Selector.sel_endPage.value;
-public static final long /*int*/ sel_endSheet_returnCode_ = Selector.sel_endSheet_returnCode_.value;
-public static final long /*int*/ sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_ = Selector.sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_.value;
-public static final long /*int*/ sel_enumeratorAtPath_ = Selector.sel_enumeratorAtPath_.value;
-public static final long /*int*/ sel_expandItem_ = Selector.sel_expandItem_.value;
-public static final long /*int*/ sel_expandItem_expandChildren_ = Selector.sel_expandItem_expandChildren_.value;
-public static final long /*int*/ sel_expansionFrameWithFrame_inView_ = Selector.sel_expansionFrameWithFrame_inView_.value;
-public static final long /*int*/ sel_familyName = Selector.sel_familyName.value;
-public static final long /*int*/ sel_fieldEditor_forObject_ = Selector.sel_fieldEditor_forObject_.value;
-public static final long /*int*/ sel_fileExistsAtPath_ = Selector.sel_fileExistsAtPath_.value;
-public static final long /*int*/ sel_fileExistsAtPath_isDirectory_ = Selector.sel_fileExistsAtPath_isDirectory_.value;
-public static final long /*int*/ sel_fileSystemRepresentation = Selector.sel_fileSystemRepresentation.value;
-public static final long /*int*/ sel_fileURLWithPath_ = Selector.sel_fileURLWithPath_.value;
-public static final long /*int*/ sel_filename = Selector.sel_filename.value;
-public static final long /*int*/ sel_filenames = Selector.sel_filenames.value;
-public static final long /*int*/ sel_fill = Selector.sel_fill.value;
-public static final long /*int*/ sel_fillRect_ = Selector.sel_fillRect_.value;
-public static final long /*int*/ sel_finishLaunching = Selector.sel_finishLaunching.value;
-public static final long /*int*/ sel_firstIndex = Selector.sel_firstIndex.value;
-public static final long /*int*/ sel_firstRectForCharacterRange_ = Selector.sel_firstRectForCharacterRange_.value;
-public static final long /*int*/ sel_firstResponder = Selector.sel_firstResponder.value;
-public static final long /*int*/ sel_flagsChanged_ = Selector.sel_flagsChanged_.value;
-public static final long /*int*/ sel_floatValue = Selector.sel_floatValue.value;
-public static final long /*int*/ sel_flushBuffer = Selector.sel_flushBuffer.value;
-public static final long /*int*/ sel_flushGraphics = Selector.sel_flushGraphics.value;
-public static final long /*int*/ sel_flushWindowIfNeeded = Selector.sel_flushWindowIfNeeded.value;
-public static final long /*int*/ sel_focusRingMaskBoundsForFrame_inView_ = Selector.sel_focusRingMaskBoundsForFrame_inView_.value;
-public static final long /*int*/ sel_font = Selector.sel_font.value;
-public static final long /*int*/ sel_fontName = Selector.sel_fontName.value;
-public static final long /*int*/ sel_fontWithFamily_traits_weight_size_ = Selector.sel_fontWithFamily_traits_weight_size_.value;
-public static final long /*int*/ sel_fontWithName_size_ = Selector.sel_fontWithName_size_.value;
-public static final long /*int*/ sel_frame = Selector.sel_frame.value;
-public static final long /*int*/ sel_frameOfCellAtColumn_row_ = Selector.sel_frameOfCellAtColumn_row_.value;
-public static final long /*int*/ sel_frameOfOutlineCellAtRow_ = Selector.sel_frameOfOutlineCellAtRow_.value;
-public static final long /*int*/ sel_frameRectForContentRect_ = Selector.sel_frameRectForContentRect_.value;
-public static final long /*int*/ sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_ = Selector.sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_.value;
-public static final long /*int*/ sel_fullPathForApplication_ = Selector.sel_fullPathForApplication_.value;
-public static final long /*int*/ sel_generalPasteboard = Selector.sel_generalPasteboard.value;
-public static final long /*int*/ sel_genericRGBColorSpace = Selector.sel_genericRGBColorSpace.value;
-public static final long /*int*/ sel_getBitmapDataPlanes_ = Selector.sel_getBitmapDataPlanes_.value;
-public static final long /*int*/ sel_getBytes_ = Selector.sel_getBytes_.value;
-public static final long /*int*/ sel_getBytes_length_ = Selector.sel_getBytes_length_.value;
-public static final long /*int*/ sel_getCharacters_ = Selector.sel_getCharacters_.value;
-public static final long /*int*/ sel_getCharacters_range_ = Selector.sel_getCharacters_range_.value;
-public static final long /*int*/ sel_getComponents_ = Selector.sel_getComponents_.value;
-public static final long /*int*/ sel_getGlyphs_range_ = Selector.sel_getGlyphs_range_.value;
-public static final long /*int*/ sel_getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_ = Selector.sel_getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_.value;
-public static final long /*int*/ sel_getIndexes_maxCount_inIndexRange_ = Selector.sel_getIndexes_maxCount_inIndexRange_.value;
-public static final long /*int*/ sel_getInfoForFile_application_type_ = Selector.sel_getInfoForFile_application_type_.value;
-public static final long /*int*/ sel_getValues_forAttribute_forVirtualScreen_ = Selector.sel_getValues_forAttribute_forVirtualScreen_.value;
-public static final long /*int*/ sel_globalContext = Selector.sel_globalContext.value;
-public static final long /*int*/ sel_glyphIndexForCharacterAtIndex_ = Selector.sel_glyphIndexForCharacterAtIndex_.value;
-public static final long /*int*/ sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_ = Selector.sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_.value;
-public static final long /*int*/ sel_glyphRangeForCharacterRange_actualCharacterRange_ = Selector.sel_glyphRangeForCharacterRange_actualCharacterRange_.value;
-public static final long /*int*/ sel_glyphRangeForTextContainer_ = Selector.sel_glyphRangeForTextContainer_.value;
-public static final long /*int*/ sel_goBack = Selector.sel_goBack.value;
-public static final long /*int*/ sel_goForward = Selector.sel_goForward.value;
-public static final long /*int*/ sel_graphicsContext = Selector.sel_graphicsContext.value;
-public static final long /*int*/ sel_graphicsContextWithBitmapImageRep_ = Selector.sel_graphicsContextWithBitmapImageRep_.value;
-public static final long /*int*/ sel_graphicsContextWithGraphicsPort_flipped_ = Selector.sel_graphicsContextWithGraphicsPort_flipped_.value;
-public static final long /*int*/ sel_graphicsContextWithWindow_ = Selector.sel_graphicsContextWithWindow_.value;
-public static final long /*int*/ sel_graphicsPort = Selector.sel_graphicsPort.value;
-public static final long /*int*/ sel_greenComponent = Selector.sel_greenComponent.value;
-public static final long /*int*/ sel_handleEvent_ = Selector.sel_handleEvent_.value;
-public static final long /*int*/ sel_handleMouseEvent_ = Selector.sel_handleMouseEvent_.value;
-public static final long /*int*/ sel_hasAlpha = Selector.sel_hasAlpha.value;
-public static final long /*int*/ sel_hasMarkedText = Selector.sel_hasMarkedText.value;
-public static final long /*int*/ sel_hasPassword = Selector.sel_hasPassword.value;
-public static final long /*int*/ sel_hasShadow = Selector.sel_hasShadow.value;
-public static final long /*int*/ sel_headerCell = Selector.sel_headerCell.value;
-public static final long /*int*/ sel_headerRectOfColumn_ = Selector.sel_headerRectOfColumn_.value;
-public static final long /*int*/ sel_headerView = Selector.sel_headerView.value;
-public static final long /*int*/ sel_helpRequested_ = Selector.sel_helpRequested_.value;
-public static final long /*int*/ sel_hide_ = Selector.sel_hide_.value;
-public static final long /*int*/ sel_hideOtherApplications_ = Selector.sel_hideOtherApplications_.value;
-public static final long /*int*/ sel_highlightColorInView_ = Selector.sel_highlightColorInView_.value;
-public static final long /*int*/ sel_highlightColorWithFrame_inView_ = Selector.sel_highlightColorWithFrame_inView_.value;
-public static final long /*int*/ sel_highlightSelectionInClipRect_ = Selector.sel_highlightSelectionInClipRect_.value;
-public static final long /*int*/ sel_hitPart = Selector.sel_hitPart.value;
-public static final long /*int*/ sel_hitTest_ = Selector.sel_hitTest_.value;
-public static final long /*int*/ sel_hitTestForEvent_inRect_ofView_ = Selector.sel_hitTestForEvent_inRect_ofView_.value;
-public static final long /*int*/ sel_host = Selector.sel_host.value;
-public static final long /*int*/ sel_hotSpot = Selector.sel_hotSpot.value;
-public static final long /*int*/ sel_hourOfDay = Selector.sel_hourOfDay.value;
-public static final long /*int*/ sel_iconForFile_ = Selector.sel_iconForFile_.value;
-public static final long /*int*/ sel_iconForFileType_ = Selector.sel_iconForFileType_.value;
-public static final long /*int*/ sel_ignore = Selector.sel_ignore.value;
-public static final long /*int*/ sel_ignoreModifierKeysWhileDragging = Selector.sel_ignoreModifierKeysWhileDragging.value;
-public static final long /*int*/ sel_image = Selector.sel_image.value;
-public static final long /*int*/ sel_imageInterpolation = Selector.sel_imageInterpolation.value;
-public static final long /*int*/ sel_imageNamed_ = Selector.sel_imageNamed_.value;
-public static final long /*int*/ sel_imageRectForBounds_ = Selector.sel_imageRectForBounds_.value;
-public static final long /*int*/ sel_imageRepWithContentsOfFile_ = Selector.sel_imageRepWithContentsOfFile_.value;
-public static final long /*int*/ sel_imageRepWithData_ = Selector.sel_imageRepWithData_.value;
-public static final long /*int*/ sel_imageablePageBounds = Selector.sel_imageablePageBounds.value;
-public static final long /*int*/ sel_increment = Selector.sel_increment.value;
-public static final long /*int*/ sel_indentationPerLevel = Selector.sel_indentationPerLevel.value;
-public static final long /*int*/ sel_indexOfItemWithTarget_andAction_ = Selector.sel_indexOfItemWithTarget_andAction_.value;
-public static final long /*int*/ sel_indexOfObjectIdenticalTo_ = Selector.sel_indexOfObjectIdenticalTo_.value;
-public static final long /*int*/ sel_indexOfSelectedItem = Selector.sel_indexOfSelectedItem.value;
-public static final long /*int*/ sel_indexSetWithIndex_ = Selector.sel_indexSetWithIndex_.value;
-public static final long /*int*/ sel_infoDictionary = Selector.sel_infoDictionary.value;
-public static final long /*int*/ sel_init = Selector.sel_init.value;
-public static final long /*int*/ sel_initByReferencingFile_ = Selector.sel_initByReferencingFile_.value;
-public static final long /*int*/ sel_initListDescriptor = Selector.sel_initListDescriptor.value;
-public static final long /*int*/ sel_initWithAttributes_ = Selector.sel_initWithAttributes_.value;
-public static final long /*int*/ sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_ = Selector.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_.value;
-public static final long /*int*/ sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_ = Selector.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_.value;
-public static final long /*int*/ sel_initWithCapacity_ = Selector.sel_initWithCapacity_.value;
-public static final long /*int*/ sel_initWithCharacters_length_ = Selector.sel_initWithCharacters_length_.value;
-public static final long /*int*/ sel_initWithColors_ = Selector.sel_initWithColors_.value;
-public static final long /*int*/ sel_initWithContainerSize_ = Selector.sel_initWithContainerSize_.value;
-public static final long /*int*/ sel_initWithContentRect_styleMask_backing_defer_ = Selector.sel_initWithContentRect_styleMask_backing_defer_.value;
-public static final long /*int*/ sel_initWithContentRect_styleMask_backing_defer_screen_ = Selector.sel_initWithContentRect_styleMask_backing_defer_screen_.value;
-public static final long /*int*/ sel_initWithContentsOfFile_ = Selector.sel_initWithContentsOfFile_.value;
-public static final long /*int*/ sel_initWithData_ = Selector.sel_initWithData_.value;
-public static final long /*int*/ sel_initWithDictionary_ = Selector.sel_initWithDictionary_.value;
-public static final long /*int*/ sel_initWithFileWrapper_ = Selector.sel_initWithFileWrapper_.value;
-public static final long /*int*/ sel_initWithFocusedViewRect_ = Selector.sel_initWithFocusedViewRect_.value;
-public static final long /*int*/ sel_initWithFormat_shareContext_ = Selector.sel_initWithFormat_shareContext_.value;
-public static final long /*int*/ sel_initWithFrame_ = Selector.sel_initWithFrame_.value;
-public static final long /*int*/ sel_initWithFrame_frameName_groupName_ = Selector.sel_initWithFrame_frameName_groupName_.value;
-public static final long /*int*/ sel_initWithFrame_pullsDown_ = Selector.sel_initWithFrame_pullsDown_.value;
-public static final long /*int*/ sel_initWithIconRef_ = Selector.sel_initWithIconRef_.value;
-public static final long /*int*/ sel_initWithIdentifier_ = Selector.sel_initWithIdentifier_.value;
-public static final long /*int*/ sel_initWithImage_hotSpot_ = Selector.sel_initWithImage_hotSpot_.value;
-public static final long /*int*/ sel_initWithIndex_ = Selector.sel_initWithIndex_.value;
-public static final long /*int*/ sel_initWithIndexSet_ = Selector.sel_initWithIndexSet_.value;
-public static final long /*int*/ sel_initWithIndexesInRange_ = Selector.sel_initWithIndexesInRange_.value;
-public static final long /*int*/ sel_initWithItemIdentifier_ = Selector.sel_initWithItemIdentifier_.value;
-public static final long /*int*/ sel_initWithLocaleIdentifier_ = Selector.sel_initWithLocaleIdentifier_.value;
-public static final long /*int*/ sel_initWithName_ = Selector.sel_initWithName_.value;
-public static final long /*int*/ sel_initWithRect_options_owner_userInfo_ = Selector.sel_initWithRect_options_owner_userInfo_.value;
-public static final long /*int*/ sel_initWithSize_ = Selector.sel_initWithSize_.value;
-public static final long /*int*/ sel_initWithStartingColor_endingColor_ = Selector.sel_initWithStartingColor_endingColor_.value;
-public static final long /*int*/ sel_initWithString_ = Selector.sel_initWithString_.value;
-public static final long /*int*/ sel_initWithString_attributes_ = Selector.sel_initWithString_attributes_.value;
-public static final long /*int*/ sel_initWithTitle_ = Selector.sel_initWithTitle_.value;
-public static final long /*int*/ sel_initWithTitle_action_keyEquivalent_ = Selector.sel_initWithTitle_action_keyEquivalent_.value;
-public static final long /*int*/ sel_initWithTransform_ = Selector.sel_initWithTransform_.value;
-public static final long /*int*/ sel_initWithType_location_ = Selector.sel_initWithType_location_.value;
-public static final long /*int*/ sel_initWithURL_ = Selector.sel_initWithURL_.value;
-public static final long /*int*/ sel_insertColor_key_atIndex_ = Selector.sel_insertColor_key_atIndex_.value;
-public static final long /*int*/ sel_insertItem_atIndex_ = Selector.sel_insertItem_atIndex_.value;
-public static final long /*int*/ sel_insertItemWithItemIdentifier_atIndex_ = Selector.sel_insertItemWithItemIdentifier_atIndex_.value;
-public static final long /*int*/ sel_insertItemWithObjectValue_atIndex_ = Selector.sel_insertItemWithObjectValue_atIndex_.value;
-public static final long /*int*/ sel_insertTabViewItem_atIndex_ = Selector.sel_insertTabViewItem_atIndex_.value;
-public static final long /*int*/ sel_insertText_ = Selector.sel_insertText_.value;
-public static final long /*int*/ sel_intValue = Selector.sel_intValue.value;
-public static final long /*int*/ sel_integerValue = Selector.sel_integerValue.value;
-public static final long /*int*/ sel_intercellSpacing = Selector.sel_intercellSpacing.value;
-public static final long /*int*/ sel_interpretKeyEvents_ = Selector.sel_interpretKeyEvents_.value;
-public static final long /*int*/ sel_invalidate = Selector.sel_invalidate.value;
-public static final long /*int*/ sel_invalidateShadow = Selector.sel_invalidateShadow.value;
-public static final long /*int*/ sel_invert = Selector.sel_invert.value;
-public static final long /*int*/ sel_isActive = Selector.sel_isActive.value;
-public static final long /*int*/ sel_isDescendantOf_ = Selector.sel_isDescendantOf_.value;
-public static final long /*int*/ sel_isDocumentEdited = Selector.sel_isDocumentEdited.value;
-public static final long /*int*/ sel_isDrawingToScreen = Selector.sel_isDrawingToScreen.value;
-public static final long /*int*/ sel_isEmpty = Selector.sel_isEmpty.value;
-public static final long /*int*/ sel_isEnabled = Selector.sel_isEnabled.value;
-public static final long /*int*/ sel_isEqual_ = Selector.sel_isEqual_.value;
-public static final long /*int*/ sel_isEqualTo_ = Selector.sel_isEqualTo_.value;
-public static final long /*int*/ sel_isEqualToString_ = Selector.sel_isEqualToString_.value;
-public static final long /*int*/ sel_isExecutableFileAtPath_ = Selector.sel_isExecutableFileAtPath_.value;
-public static final long /*int*/ sel_isFieldEditor = Selector.sel_isFieldEditor.value;
-public static final long /*int*/ sel_isFilePackageAtPath_ = Selector.sel_isFilePackageAtPath_.value;
-public static final long /*int*/ sel_isFileURL = Selector.sel_isFileURL.value;
-public static final long /*int*/ sel_isFlipped = Selector.sel_isFlipped.value;
-public static final long /*int*/ sel_isHidden = Selector.sel_isHidden.value;
-public static final long /*int*/ sel_isHiddenOrHasHiddenAncestor = Selector.sel_isHiddenOrHasHiddenAncestor.value;
-public static final long /*int*/ sel_isHighlighted = Selector.sel_isHighlighted.value;
-public static final long /*int*/ sel_isItemExpanded_ = Selector.sel_isItemExpanded_.value;
-public static final long /*int*/ sel_isKeyWindow = Selector.sel_isKeyWindow.value;
-public static final long /*int*/ sel_isKindOfClass_ = Selector.sel_isKindOfClass_.value;
-public static final long /*int*/ sel_isMainThread = Selector.sel_isMainThread.value;
-public static final long /*int*/ sel_isMainWindow = Selector.sel_isMainWindow.value;
-public static final long /*int*/ sel_isMiniaturized = Selector.sel_isMiniaturized.value;
-public static final long /*int*/ sel_isOpaque = Selector.sel_isOpaque.value;
-public static final long /*int*/ sel_isPlanar = Selector.sel_isPlanar.value;
-public static final long /*int*/ sel_isResting = Selector.sel_isResting.value;
-public static final long /*int*/ sel_isRowSelected_ = Selector.sel_isRowSelected_.value;
-public static final long /*int*/ sel_isRunning = Selector.sel_isRunning.value;
-public static final long /*int*/ sel_isSelectionOnly = Selector.sel_isSelectionOnly.value;
-public static final long /*int*/ sel_isSeparatorItem = Selector.sel_isSeparatorItem.value;
-public static final long /*int*/ sel_isSessionOnly = Selector.sel_isSessionOnly.value;
-public static final long /*int*/ sel_isSheet = Selector.sel_isSheet.value;
-public static final long /*int*/ sel_isVisible = Selector.sel_isVisible.value;
-public static final long /*int*/ sel_isZoomed = Selector.sel_isZoomed.value;
-public static final long /*int*/ sel_itemArray = Selector.sel_itemArray.value;
-public static final long /*int*/ sel_itemAtIndex_ = Selector.sel_itemAtIndex_.value;
-public static final long /*int*/ sel_itemAtRow_ = Selector.sel_itemAtRow_.value;
-public static final long /*int*/ sel_itemHeight = Selector.sel_itemHeight.value;
-public static final long /*int*/ sel_itemIdentifier = Selector.sel_itemIdentifier.value;
-public static final long /*int*/ sel_itemObjectValueAtIndex_ = Selector.sel_itemObjectValueAtIndex_.value;
-public static final long /*int*/ sel_itemTitleAtIndex_ = Selector.sel_itemTitleAtIndex_.value;
-public static final long /*int*/ sel_itemWithTag_ = Selector.sel_itemWithTag_.value;
-public static final long /*int*/ sel_jobDisposition = Selector.sel_jobDisposition.value;
-public static final long /*int*/ sel_keyCode = Selector.sel_keyCode.value;
-public static final long /*int*/ sel_keyDown_ = Selector.sel_keyDown_.value;
-public static final long /*int*/ sel_keyEquivalent = Selector.sel_keyEquivalent.value;
-public static final long /*int*/ sel_keyEquivalentModifierMask = Selector.sel_keyEquivalentModifierMask.value;
-public static final long /*int*/ sel_keyUp_ = Selector.sel_keyUp_.value;
-public static final long /*int*/ sel_keyWindow = Selector.sel_keyWindow.value;
-public static final long /*int*/ sel_knobProportion = Selector.sel_knobProportion.value;
-public static final long /*int*/ sel_knobThickness = Selector.sel_knobThickness.value;
-public static final long /*int*/ sel_lastPathComponent = Selector.sel_lastPathComponent.value;
-public static final long /*int*/ sel_layoutManager = Selector.sel_layoutManager.value;
-public static final long /*int*/ sel_leading = Selector.sel_leading.value;
-public static final long /*int*/ sel_length = Selector.sel_length.value;
-public static final long /*int*/ sel_level = Selector.sel_level.value;
-public static final long /*int*/ sel_levelForItem_ = Selector.sel_levelForItem_.value;
-public static final long /*int*/ sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_ = Selector.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_.value;
-public static final long /*int*/ sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_ = Selector.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_.value;
-public static final long /*int*/ sel_lineToPoint_ = Selector.sel_lineToPoint_.value;
-public static final long /*int*/ sel_linkTextAttributes = Selector.sel_linkTextAttributes.value;
-public static final long /*int*/ sel_loadHTMLString_baseURL_ = Selector.sel_loadHTMLString_baseURL_.value;
-public static final long /*int*/ sel_loadNibFile_externalNameTable_withZone_ = Selector.sel_loadNibFile_externalNameTable_withZone_.value;
-public static final long /*int*/ sel_loadRequest_ = Selector.sel_loadRequest_.value;
-public static final long /*int*/ sel_localizedDescription = Selector.sel_localizedDescription.value;
-public static final long /*int*/ sel_location = Selector.sel_location.value;
-public static final long /*int*/ sel_locationForGlyphAtIndex_ = Selector.sel_locationForGlyphAtIndex_.value;
-public static final long /*int*/ sel_locationInWindow = Selector.sel_locationInWindow.value;
-public static final long /*int*/ sel_lockFocus = Selector.sel_lockFocus.value;
-public static final long /*int*/ sel_lowercaseString = Selector.sel_lowercaseString.value;
-public static final long /*int*/ sel_magnification = Selector.sel_magnification.value;
-public static final long /*int*/ sel_magnifyWithEvent_ = Selector.sel_magnifyWithEvent_.value;
-public static final long /*int*/ sel_mainBundle = Selector.sel_mainBundle.value;
-public static final long /*int*/ sel_mainFrame = Selector.sel_mainFrame.value;
-public static final long /*int*/ sel_mainMenu = Selector.sel_mainMenu.value;
-public static final long /*int*/ sel_mainRunLoop = Selector.sel_mainRunLoop.value;
-public static final long /*int*/ sel_mainScreen = Selector.sel_mainScreen.value;
-public static final long /*int*/ sel_mainWindow = Selector.sel_mainWindow.value;
-public static final long /*int*/ sel_makeCurrentContext = Selector.sel_makeCurrentContext.value;
-public static final long /*int*/ sel_makeFirstResponder_ = Selector.sel_makeFirstResponder_.value;
-public static final long /*int*/ sel_makeKeyAndOrderFront_ = Selector.sel_makeKeyAndOrderFront_.value;
-public static final long /*int*/ sel_markedRange = Selector.sel_markedRange.value;
-public static final long /*int*/ sel_markedTextAttributes = Selector.sel_markedTextAttributes.value;
-public static final long /*int*/ sel_maxValue = Selector.sel_maxValue.value;
-public static final long /*int*/ sel_maximum = Selector.sel_maximum.value;
-public static final long /*int*/ sel_maximumFractionDigits = Selector.sel_maximumFractionDigits.value;
-public static final long /*int*/ sel_maximumIntegerDigits = Selector.sel_maximumIntegerDigits.value;
-public static final long /*int*/ sel_menu = Selector.sel_menu.value;
-public static final long /*int*/ sel_menu_willHighlightItem_ = Selector.sel_menu_willHighlightItem_.value;
-public static final long /*int*/ sel_menuBarFontOfSize_ = Selector.sel_menuBarFontOfSize_.value;
-public static final long /*int*/ sel_menuDidClose_ = Selector.sel_menuDidClose_.value;
-public static final long /*int*/ sel_menuFontOfSize_ = Selector.sel_menuFontOfSize_.value;
-public static final long /*int*/ sel_menuForEvent_ = Selector.sel_menuForEvent_.value;
-public static final long /*int*/ sel_menuNeedsUpdate_ = Selector.sel_menuNeedsUpdate_.value;
-public static final long /*int*/ sel_menuWillOpen_ = Selector.sel_menuWillOpen_.value;
-public static final long /*int*/ sel_metaKey = Selector.sel_metaKey.value;
-public static final long /*int*/ sel_minFrameWidthWithTitle_styleMask_ = Selector.sel_minFrameWidthWithTitle_styleMask_.value;
-public static final long /*int*/ sel_minSize = Selector.sel_minSize.value;
-public static final long /*int*/ sel_minValue = Selector.sel_minValue.value;
-public static final long /*int*/ sel_miniaturize_ = Selector.sel_miniaturize_.value;
-public static final long /*int*/ sel_minimum = Selector.sel_minimum.value;
-public static final long /*int*/ sel_minimumSize = Selector.sel_minimumSize.value;
-public static final long /*int*/ sel_minuteOfHour = Selector.sel_minuteOfHour.value;
-public static final long /*int*/ sel_modifierFlags = Selector.sel_modifierFlags.value;
-public static final long /*int*/ sel_monthOfYear = Selector.sel_monthOfYear.value;
-public static final long /*int*/ sel_mouse_inRect_ = Selector.sel_mouse_inRect_.value;
-public static final long /*int*/ sel_mouseDown_ = Selector.sel_mouseDown_.value;
-public static final long /*int*/ sel_mouseDownCanMoveWindow = Selector.sel_mouseDownCanMoveWindow.value;
-public static final long /*int*/ sel_mouseDragged_ = Selector.sel_mouseDragged_.value;
-public static final long /*int*/ sel_mouseEntered_ = Selector.sel_mouseEntered_.value;
-public static final long /*int*/ sel_mouseExited_ = Selector.sel_mouseExited_.value;
-public static final long /*int*/ sel_mouseLocation = Selector.sel_mouseLocation.value;
-public static final long /*int*/ sel_mouseLocationOutsideOfEventStream = Selector.sel_mouseLocationOutsideOfEventStream.value;
-public static final long /*int*/ sel_mouseMoved_ = Selector.sel_mouseMoved_.value;
-public static final long /*int*/ sel_mouseUp_ = Selector.sel_mouseUp_.value;
-public static final long /*int*/ sel_moveColumn_toColumn_ = Selector.sel_moveColumn_toColumn_.value;
-public static final long /*int*/ sel_moveToBeginningOfParagraph_ = Selector.sel_moveToBeginningOfParagraph_.value;
-public static final long /*int*/ sel_moveToEndOfParagraph_ = Selector.sel_moveToEndOfParagraph_.value;
-public static final long /*int*/ sel_moveToPoint_ = Selector.sel_moveToPoint_.value;
-public static final long /*int*/ sel_moveUp_ = Selector.sel_moveUp_.value;
-public static final long /*int*/ sel_mutableCopy = Selector.sel_mutableCopy.value;
-public static final long /*int*/ sel_mutableString = Selector.sel_mutableString.value;
-public static final long /*int*/ sel_name = Selector.sel_name.value;
-public static final long /*int*/ sel_needsPanelToBecomeKey = Selector.sel_needsPanelToBecomeKey.value;
-public static final long /*int*/ sel_nextEventMatchingMask_untilDate_inMode_dequeue_ = Selector.sel_nextEventMatchingMask_untilDate_inMode_dequeue_.value;
-public static final long /*int*/ sel_nextObject = Selector.sel_nextObject.value;
-public static final long /*int*/ sel_nextState = Selector.sel_nextState.value;
-public static final long /*int*/ sel_nextWordFromIndex_forward_ = Selector.sel_nextWordFromIndex_forward_.value;
-public static final long /*int*/ sel_noResponderFor_ = Selector.sel_noResponderFor_.value;
-public static final long /*int*/ sel_normalizedPosition = Selector.sel_normalizedPosition.value;
-public static final long /*int*/ sel_noteNumberOfRowsChanged = Selector.sel_noteNumberOfRowsChanged.value;
-public static final long /*int*/ sel_numberOfColumns = Selector.sel_numberOfColumns.value;
-public static final long /*int*/ sel_numberOfComponents = Selector.sel_numberOfComponents.value;
-public static final long /*int*/ sel_numberOfGlyphs = Selector.sel_numberOfGlyphs.value;
-public static final long /*int*/ sel_numberOfItems = Selector.sel_numberOfItems.value;
-public static final long /*int*/ sel_numberOfPlanes = Selector.sel_numberOfPlanes.value;
-public static final long /*int*/ sel_numberOfRows = Selector.sel_numberOfRows.value;
-public static final long /*int*/ sel_numberOfRowsInTableView_ = Selector.sel_numberOfRowsInTableView_.value;
-public static final long /*int*/ sel_numberOfSelectedRows = Selector.sel_numberOfSelectedRows.value;
-public static final long /*int*/ sel_numberOfVisibleItems = Selector.sel_numberOfVisibleItems.value;
-public static final long /*int*/ sel_numberWithBool_ = Selector.sel_numberWithBool_.value;
-public static final long /*int*/ sel_numberWithDouble_ = Selector.sel_numberWithDouble_.value;
-public static final long /*int*/ sel_numberWithInt_ = Selector.sel_numberWithInt_.value;
-public static final long /*int*/ sel_numberWithInteger_ = Selector.sel_numberWithInteger_.value;
-public static final long /*int*/ sel_objCType = Selector.sel_objCType.value;
-public static final long /*int*/ sel_object = Selector.sel_object.value;
-public static final long /*int*/ sel_objectAtIndex_ = Selector.sel_objectAtIndex_.value;
-public static final long /*int*/ sel_objectEnumerator = Selector.sel_objectEnumerator.value;
-public static final long /*int*/ sel_objectForInfoDictionaryKey_ = Selector.sel_objectForInfoDictionaryKey_.value;
-public static final long /*int*/ sel_objectForKey_ = Selector.sel_objectForKey_.value;
-public static final long /*int*/ sel_objectValues = Selector.sel_objectValues.value;
-public static final long /*int*/ sel_openFile_withApplication_ = Selector.sel_openFile_withApplication_.value;
-public static final long /*int*/ sel_openPanel = Selector.sel_openPanel.value;
-public static final long /*int*/ sel_openURL_ = Selector.sel_openURL_.value;
-public static final long /*int*/ sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_ = Selector.sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_.value;
-public static final long /*int*/ sel_operationNotAllowedCursor = Selector.sel_operationNotAllowedCursor.value;
-public static final long /*int*/ sel_options = Selector.sel_options.value;
-public static final long /*int*/ sel_orderBack_ = Selector.sel_orderBack_.value;
-public static final long /*int*/ sel_orderFront_ = Selector.sel_orderFront_.value;
-public static final long /*int*/ sel_orderFrontRegardless = Selector.sel_orderFrontRegardless.value;
-public static final long /*int*/ sel_orderFrontStandardAboutPanel_ = Selector.sel_orderFrontStandardAboutPanel_.value;
-public static final long /*int*/ sel_orderOut_ = Selector.sel_orderOut_.value;
-public static final long /*int*/ sel_orderWindow_relativeTo_ = Selector.sel_orderWindow_relativeTo_.value;
-public static final long /*int*/ sel_orderedWindows = Selector.sel_orderedWindows.value;
-public static final long /*int*/ sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_ = Selector.sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_.value;
-public static final long /*int*/ sel_otherMouseDown_ = Selector.sel_otherMouseDown_.value;
-public static final long /*int*/ sel_otherMouseDragged_ = Selector.sel_otherMouseDragged_.value;
-public static final long /*int*/ sel_otherMouseUp_ = Selector.sel_otherMouseUp_.value;
-public static final long /*int*/ sel_outlineTableColumn = Selector.sel_outlineTableColumn.value;
-public static final long /*int*/ sel_outlineView_acceptDrop_item_childIndex_ = Selector.sel_outlineView_acceptDrop_item_childIndex_.value;
-public static final long /*int*/ sel_outlineView_child_ofItem_ = Selector.sel_outlineView_child_ofItem_.value;
-public static final long /*int*/ sel_outlineView_didClickTableColumn_ = Selector.sel_outlineView_didClickTableColumn_.value;
-public static final long /*int*/ sel_outlineView_isItemExpandable_ = Selector.sel_outlineView_isItemExpandable_.value;
-public static final long /*int*/ sel_outlineView_numberOfChildrenOfItem_ = Selector.sel_outlineView_numberOfChildrenOfItem_.value;
-public static final long /*int*/ sel_outlineView_objectValueForTableColumn_byItem_ = Selector.sel_outlineView_objectValueForTableColumn_byItem_.value;
-public static final long /*int*/ sel_outlineView_setObjectValue_forTableColumn_byItem_ = Selector.sel_outlineView_setObjectValue_forTableColumn_byItem_.value;
-public static final long /*int*/ sel_outlineView_shouldCollapseItem_ = Selector.sel_outlineView_shouldCollapseItem_.value;
-public static final long /*int*/ sel_outlineView_shouldEditTableColumn_item_ = Selector.sel_outlineView_shouldEditTableColumn_item_.value;
-public static final long /*int*/ sel_outlineView_shouldExpandItem_ = Selector.sel_outlineView_shouldExpandItem_.value;
-public static final long /*int*/ sel_outlineView_shouldReorderColumn_toColumn_ = Selector.sel_outlineView_shouldReorderColumn_toColumn_.value;
-public static final long /*int*/ sel_outlineView_shouldSelectItem_ = Selector.sel_outlineView_shouldSelectItem_.value;
-public static final long /*int*/ sel_outlineView_shouldTrackCell_forTableColumn_item_ = Selector.sel_outlineView_shouldTrackCell_forTableColumn_item_.value;
-public static final long /*int*/ sel_outlineView_validateDrop_proposedItem_proposedChildIndex_ = Selector.sel_outlineView_validateDrop_proposedItem_proposedChildIndex_.value;
-public static final long /*int*/ sel_outlineView_willDisplayCell_forTableColumn_item_ = Selector.sel_outlineView_willDisplayCell_forTableColumn_item_.value;
-public static final long /*int*/ sel_outlineView_writeItems_toPasteboard_ = Selector.sel_outlineView_writeItems_toPasteboard_.value;
-public static final long /*int*/ sel_outlineViewColumnDidMove_ = Selector.sel_outlineViewColumnDidMove_.value;
-public static final long /*int*/ sel_outlineViewColumnDidResize_ = Selector.sel_outlineViewColumnDidResize_.value;
-public static final long /*int*/ sel_outlineViewItemDidExpand_ = Selector.sel_outlineViewItemDidExpand_.value;
-public static final long /*int*/ sel_outlineViewSelectionDidChange_ = Selector.sel_outlineViewSelectionDidChange_.value;
-public static final long /*int*/ sel_outlineViewSelectionIsChanging_ = Selector.sel_outlineViewSelectionIsChanging_.value;
-public static final long /*int*/ sel_owner = Selector.sel_owner.value;
-public static final long /*int*/ sel_pageDown_ = Selector.sel_pageDown_.value;
-public static final long /*int*/ sel_pageTitle = Selector.sel_pageTitle.value;
-public static final long /*int*/ sel_pageUp_ = Selector.sel_pageUp_.value;
-public static final long /*int*/ sel_panel_shouldShowFilename_ = Selector.sel_panel_shouldShowFilename_.value;
-public static final long /*int*/ sel_panelConvertFont_ = Selector.sel_panelConvertFont_.value;
-public static final long /*int*/ sel_paperSize = Selector.sel_paperSize.value;
-public static final long /*int*/ sel_paragraphs = Selector.sel_paragraphs.value;
-public static final long /*int*/ sel_parentWindow = Selector.sel_parentWindow.value;
-public static final long /*int*/ sel_password = Selector.sel_password.value;
-public static final long /*int*/ sel_paste_ = Selector.sel_paste_.value;
-public static final long /*int*/ sel_pasteboard_provideDataForType_ = Selector.sel_pasteboard_provideDataForType_.value;
-public static final long /*int*/ sel_pasteboardWithName_ = Selector.sel_pasteboardWithName_.value;
-public static final long /*int*/ sel_path = Selector.sel_path.value;
-public static final long /*int*/ sel_pathExtension = Selector.sel_pathExtension.value;
-public static final long /*int*/ sel_pathForResource_ofType_ = Selector.sel_pathForResource_ofType_.value;
-public static final long /*int*/ sel_pathForResource_ofType_inDirectory_forLocalization_ = Selector.sel_pathForResource_ofType_inDirectory_forLocalization_.value;
-public static final long /*int*/ sel_performDragOperation_ = Selector.sel_performDragOperation_.value;
-public static final long /*int*/ sel_performKeyEquivalent_ = Selector.sel_performKeyEquivalent_.value;
-public static final long /*int*/ sel_performSelector_withObject_afterDelay_inModes_ = Selector.sel_performSelector_withObject_afterDelay_inModes_.value;
-public static final long /*int*/ sel_performSelectorOnMainThread_withObject_waitUntilDone_ = Selector.sel_performSelectorOnMainThread_withObject_waitUntilDone_.value;
-public static final long /*int*/ sel_phase = Selector.sel_phase.value;
-public static final long /*int*/ sel_pixelsHigh = Selector.sel_pixelsHigh.value;
-public static final long /*int*/ sel_pixelsWide = Selector.sel_pixelsWide.value;
-public static final long /*int*/ sel_pointSize = Selector.sel_pointSize.value;
-public static final long /*int*/ sel_pointValue = Selector.sel_pointValue.value;
-public static final long /*int*/ sel_pointingHandCursor = Selector.sel_pointingHandCursor.value;
-public static final long /*int*/ sel_pop = Selector.sel_pop.value;
-public static final long /*int*/ sel_popUpContextMenu_withEvent_forView_ = Selector.sel_popUpContextMenu_withEvent_forView_.value;
-public static final long /*int*/ sel_popUpStatusItemMenu_ = Selector.sel_popUpStatusItemMenu_.value;
-public static final long /*int*/ sel_port = Selector.sel_port.value;
-public static final long /*int*/ sel_postEvent_atStart_ = Selector.sel_postEvent_atStart_.value;
-public static final long /*int*/ sel_preparedCellAtColumn_row_ = Selector.sel_preparedCellAtColumn_row_.value;
-public static final long /*int*/ sel_prependTransform_ = Selector.sel_prependTransform_.value;
-public static final long /*int*/ sel_preventDefault = Selector.sel_preventDefault.value;
-public static final long /*int*/ sel_previousFailureCount = Selector.sel_previousFailureCount.value;
-public static final long /*int*/ sel_printDocumentView = Selector.sel_printDocumentView.value;
-public static final long /*int*/ sel_printOperationWithPrintInfo_ = Selector.sel_printOperationWithPrintInfo_.value;
-public static final long /*int*/ sel_printOperationWithView_printInfo_ = Selector.sel_printOperationWithView_printInfo_.value;
-public static final long /*int*/ sel_printPanel = Selector.sel_printPanel.value;
-public static final long /*int*/ sel_printSettings = Selector.sel_printSettings.value;
-public static final long /*int*/ sel_printer = Selector.sel_printer.value;
-public static final long /*int*/ sel_printerNames = Selector.sel_printerNames.value;
-public static final long /*int*/ sel_printerWithName_ = Selector.sel_printerWithName_.value;
-public static final long /*int*/ sel_propertyListForType_ = Selector.sel_propertyListForType_.value;
-public static final long /*int*/ sel_proposedCredential = Selector.sel_proposedCredential.value;
-public static final long /*int*/ sel_protectionSpace = Selector.sel_protectionSpace.value;
-public static final long /*int*/ sel_push = Selector.sel_push.value;
-public static final long /*int*/ sel_rangeValue = Selector.sel_rangeValue.value;
-public static final long /*int*/ sel_readSelectionFromPasteboard_ = Selector.sel_readSelectionFromPasteboard_.value;
-public static final long /*int*/ sel_realm = Selector.sel_realm.value;
-public static final long /*int*/ sel_recentSearches = Selector.sel_recentSearches.value;
-public static final long /*int*/ sel_rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_ = Selector.sel_rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_.value;
-public static final long /*int*/ sel_rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_ = Selector.sel_rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_.value;
-public static final long /*int*/ sel_rectForPart_ = Selector.sel_rectForPart_.value;
-public static final long /*int*/ sel_rectOfColumn_ = Selector.sel_rectOfColumn_.value;
-public static final long /*int*/ sel_rectOfRow_ = Selector.sel_rectOfRow_.value;
-public static final long /*int*/ sel_rectValue = Selector.sel_rectValue.value;
-public static final long /*int*/ sel_redComponent = Selector.sel_redComponent.value;
-public static final long /*int*/ sel_redo = Selector.sel_redo.value;
-public static final long /*int*/ sel_reflectScrolledClipView_ = Selector.sel_reflectScrolledClipView_.value;
-public static final long /*int*/ sel_registerForDraggedTypes_ = Selector.sel_registerForDraggedTypes_.value;
-public static final long /*int*/ sel_release = Selector.sel_release.value;
-public static final long /*int*/ sel_reload_ = Selector.sel_reload_.value;
-public static final long /*int*/ sel_reloadData = Selector.sel_reloadData.value;
-public static final long /*int*/ sel_reloadItem_reloadChildren_ = Selector.sel_reloadItem_reloadChildren_.value;
-public static final long /*int*/ sel_removeAllItems = Selector.sel_removeAllItems.value;
-public static final long /*int*/ sel_removeAllPoints = Selector.sel_removeAllPoints.value;
-public static final long /*int*/ sel_removeAttribute_range_ = Selector.sel_removeAttribute_range_.value;
-public static final long /*int*/ sel_removeChildWindow_ = Selector.sel_removeChildWindow_.value;
-public static final long /*int*/ sel_removeColorWithKey_ = Selector.sel_removeColorWithKey_.value;
-public static final long /*int*/ sel_removeFromSuperview = Selector.sel_removeFromSuperview.value;
-public static final long /*int*/ sel_removeIndex_ = Selector.sel_removeIndex_.value;
-public static final long /*int*/ sel_removeItem_ = Selector.sel_removeItem_.value;
-public static final long /*int*/ sel_removeItemAtIndex_ = Selector.sel_removeItemAtIndex_.value;
-public static final long /*int*/ sel_removeItemAtPath_error_ = Selector.sel_removeItemAtPath_error_.value;
-public static final long /*int*/ sel_removeLastObject = Selector.sel_removeLastObject.value;
-public static final long /*int*/ sel_removeObject_ = Selector.sel_removeObject_.value;
-public static final long /*int*/ sel_removeObjectAtIndex_ = Selector.sel_removeObjectAtIndex_.value;
-public static final long /*int*/ sel_removeObjectForKey_ = Selector.sel_removeObjectForKey_.value;
-public static final long /*int*/ sel_removeObjectIdenticalTo_ = Selector.sel_removeObjectIdenticalTo_.value;
-public static final long /*int*/ sel_removeObserver_ = Selector.sel_removeObserver_.value;
-public static final long /*int*/ sel_removeObserver_name_object_ = Selector.sel_removeObserver_name_object_.value;
-public static final long /*int*/ sel_removeRepresentation_ = Selector.sel_removeRepresentation_.value;
-public static final long /*int*/ sel_removeStatusItem_ = Selector.sel_removeStatusItem_.value;
-public static final long /*int*/ sel_removeTabViewItem_ = Selector.sel_removeTabViewItem_.value;
-public static final long /*int*/ sel_removeTableColumn_ = Selector.sel_removeTableColumn_.value;
-public static final long /*int*/ sel_removeTemporaryAttribute_forCharacterRange_ = Selector.sel_removeTemporaryAttribute_forCharacterRange_.value;
-public static final long /*int*/ sel_removeToolTip_ = Selector.sel_removeToolTip_.value;
-public static final long /*int*/ sel_removeTrackingArea_ = Selector.sel_removeTrackingArea_.value;
-public static final long /*int*/ sel_replaceCharactersInRange_withString_ = Selector.sel_replaceCharactersInRange_withString_.value;
-public static final long /*int*/ sel_replyToOpenOrPrint_ = Selector.sel_replyToOpenOrPrint_.value;
-public static final long /*int*/ sel_representation = Selector.sel_representation.value;
-public static final long /*int*/ sel_representations = Selector.sel_representations.value;
-public static final long /*int*/ sel_request = Selector.sel_request.value;
-public static final long /*int*/ sel_requestWithURL_ = Selector.sel_requestWithURL_.value;
-public static final long /*int*/ sel_resetCursorRects = Selector.sel_resetCursorRects.value;
-public static final long /*int*/ sel_resignFirstResponder = Selector.sel_resignFirstResponder.value;
-public static final long /*int*/ sel_resizeDownCursor = Selector.sel_resizeDownCursor.value;
-public static final long /*int*/ sel_resizeLeftCursor = Selector.sel_resizeLeftCursor.value;
-public static final long /*int*/ sel_resizeLeftRightCursor = Selector.sel_resizeLeftRightCursor.value;
-public static final long /*int*/ sel_resizeRightCursor = Selector.sel_resizeRightCursor.value;
-public static final long /*int*/ sel_resizeUpCursor = Selector.sel_resizeUpCursor.value;
-public static final long /*int*/ sel_resizeUpDownCursor = Selector.sel_resizeUpDownCursor.value;
-public static final long /*int*/ sel_resizingMask = Selector.sel_resizingMask.value;
-public static final long /*int*/ sel_resourcePath = Selector.sel_resourcePath.value;
-public static final long /*int*/ sel_respondsToSelector_ = Selector.sel_respondsToSelector_.value;
-public static final long /*int*/ sel_restoreGraphicsState = Selector.sel_restoreGraphicsState.value;
-public static final long /*int*/ sel_retain = Selector.sel_retain.value;
-public static final long /*int*/ sel_retainCount = Selector.sel_retainCount.value;
-public static final long /*int*/ sel_rightMouseDown_ = Selector.sel_rightMouseDown_.value;
-public static final long /*int*/ sel_rightMouseDragged_ = Selector.sel_rightMouseDragged_.value;
-public static final long /*int*/ sel_rightMouseUp_ = Selector.sel_rightMouseUp_.value;
-public static final long /*int*/ sel_rotateByDegrees_ = Selector.sel_rotateByDegrees_.value;
-public static final long /*int*/ sel_rotateWithEvent_ = Selector.sel_rotateWithEvent_.value;
-public static final long /*int*/ sel_rotation = Selector.sel_rotation.value;
-public static final long /*int*/ sel_rowAtPoint_ = Selector.sel_rowAtPoint_.value;
-public static final long /*int*/ sel_rowForItem_ = Selector.sel_rowForItem_.value;
-public static final long /*int*/ sel_rowHeight = Selector.sel_rowHeight.value;
-public static final long /*int*/ sel_rowsInRect_ = Selector.sel_rowsInRect_.value;
-public static final long /*int*/ sel_run = Selector.sel_run.value;
-public static final long /*int*/ sel_runModal = Selector.sel_runModal.value;
-public static final long /*int*/ sel_runModalForDirectory_file_ = Selector.sel_runModalForDirectory_file_.value;
-public static final long /*int*/ sel_runModalForWindow_ = Selector.sel_runModalForWindow_.value;
-public static final long /*int*/ sel_runModalWithPrintInfo_ = Selector.sel_runModalWithPrintInfo_.value;
-public static final long /*int*/ sel_runMode_beforeDate_ = Selector.sel_runMode_beforeDate_.value;
-public static final long /*int*/ sel_runOperation = Selector.sel_runOperation.value;
-public static final long /*int*/ sel_samplesPerPixel = Selector.sel_samplesPerPixel.value;
-public static final long /*int*/ sel_saveGraphicsState = Selector.sel_saveGraphicsState.value;
-public static final long /*int*/ sel_savePanel = Selector.sel_savePanel.value;
-public static final long /*int*/ sel_scaleXBy_yBy_ = Selector.sel_scaleXBy_yBy_.value;
-public static final long /*int*/ sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ = Selector.sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_.value;
-public static final long /*int*/ sel_screen = Selector.sel_screen.value;
-public static final long /*int*/ sel_screenX = Selector.sel_screenX.value;
-public static final long /*int*/ sel_screenY = Selector.sel_screenY.value;
-public static final long /*int*/ sel_screens = Selector.sel_screens.value;
-public static final long /*int*/ sel_scrollClipView_toPoint_ = Selector.sel_scrollClipView_toPoint_.value;
-public static final long /*int*/ sel_scrollColumnToVisible_ = Selector.sel_scrollColumnToVisible_.value;
-public static final long /*int*/ sel_scrollPoint_ = Selector.sel_scrollPoint_.value;
-public static final long /*int*/ sel_scrollRangeToVisible_ = Selector.sel_scrollRangeToVisible_.value;
-public static final long /*int*/ sel_scrollRect_by_ = Selector.sel_scrollRect_by_.value;
-public static final long /*int*/ sel_scrollRectToVisible_ = Selector.sel_scrollRectToVisible_.value;
-public static final long /*int*/ sel_scrollRowToVisible_ = Selector.sel_scrollRowToVisible_.value;
-public static final long /*int*/ sel_scrollToPoint_ = Selector.sel_scrollToPoint_.value;
-public static final long /*int*/ sel_scrollWheel_ = Selector.sel_scrollWheel_.value;
-public static final long /*int*/ sel_scrollerWidth = Selector.sel_scrollerWidth.value;
-public static final long /*int*/ sel_scrollerWidthForControlSize_ = Selector.sel_scrollerWidthForControlSize_.value;
-public static final long /*int*/ sel_searchButtonCell = Selector.sel_searchButtonCell.value;
-public static final long /*int*/ sel_searchButtonRectForBounds_ = Selector.sel_searchButtonRectForBounds_.value;
-public static final long /*int*/ sel_searchTextRectForBounds_ = Selector.sel_searchTextRectForBounds_.value;
-public static final long /*int*/ sel_secondOfMinute = Selector.sel_secondOfMinute.value;
-public static final long /*int*/ sel_secondarySelectedControlColor = Selector.sel_secondarySelectedControlColor.value;
-public static final long /*int*/ sel_selectAll_ = Selector.sel_selectAll_.value;
-public static final long /*int*/ sel_selectItem_ = Selector.sel_selectItem_.value;
-public static final long /*int*/ sel_selectItemAtIndex_ = Selector.sel_selectItemAtIndex_.value;
-public static final long /*int*/ sel_selectRowIndexes_byExtendingSelection_ = Selector.sel_selectRowIndexes_byExtendingSelection_.value;
-public static final long /*int*/ sel_selectTabViewItemAtIndex_ = Selector.sel_selectTabViewItemAtIndex_.value;
-public static final long /*int*/ sel_selectText_ = Selector.sel_selectText_.value;
-public static final long /*int*/ sel_selectedControlColor = Selector.sel_selectedControlColor.value;
-public static final long /*int*/ sel_selectedControlTextColor = Selector.sel_selectedControlTextColor.value;
-public static final long /*int*/ sel_selectedRange = Selector.sel_selectedRange.value;
-public static final long /*int*/ sel_selectedRow = Selector.sel_selectedRow.value;
-public static final long /*int*/ sel_selectedRowIndexes = Selector.sel_selectedRowIndexes.value;
-public static final long /*int*/ sel_selectedTabViewItem = Selector.sel_selectedTabViewItem.value;
-public static final long /*int*/ sel_selectedTextAttributes = Selector.sel_selectedTextAttributes.value;
-public static final long /*int*/ sel_selectedTextBackgroundColor = Selector.sel_selectedTextBackgroundColor.value;
-public static final long /*int*/ sel_selectedTextColor = Selector.sel_selectedTextColor.value;
-public static final long /*int*/ sel_sendAction_to_ = Selector.sel_sendAction_to_.value;
-public static final long /*int*/ sel_sendAction_to_from_ = Selector.sel_sendAction_to_from_.value;
-public static final long /*int*/ sel_sendEvent_ = Selector.sel_sendEvent_.value;
-public static final long /*int*/ sel_sender = Selector.sel_sender.value;
-public static final long /*int*/ sel_separatorItem = Selector.sel_separatorItem.value;
-public static final long /*int*/ sel_set = Selector.sel_set.value;
-public static final long /*int*/ sel_setAcceptsMouseMovedEvents_ = Selector.sel_setAcceptsMouseMovedEvents_.value;
-public static final long /*int*/ sel_setAcceptsTouchEvents_ = Selector.sel_setAcceptsTouchEvents_.value;
-public static final long /*int*/ sel_setAccessoryView_ = Selector.sel_setAccessoryView_.value;
-public static final long /*int*/ sel_setAction_ = Selector.sel_setAction_.value;
-public static final long /*int*/ sel_setActivationPolicy_ = Selector.sel_setActivationPolicy_.value;
-public static final long /*int*/ sel_setAlertStyle_ = Selector.sel_setAlertStyle_.value;
-public static final long /*int*/ sel_setAlignment_ = Selector.sel_setAlignment_.value;
-public static final long /*int*/ sel_setAllowedFileTypes_ = Selector.sel_setAllowedFileTypes_.value;
-public static final long /*int*/ sel_setAllowsColumnReordering_ = Selector.sel_setAllowsColumnReordering_.value;
-public static final long /*int*/ sel_setAllowsFloats_ = Selector.sel_setAllowsFloats_.value;
-public static final long /*int*/ sel_setAllowsMixedState_ = Selector.sel_setAllowsMixedState_.value;
-public static final long /*int*/ sel_setAllowsMultipleSelection_ = Selector.sel_setAllowsMultipleSelection_.value;
-public static final long /*int*/ sel_setAllowsOtherFileTypes_ = Selector.sel_setAllowsOtherFileTypes_.value;
-public static final long /*int*/ sel_setAllowsUndo_ = Selector.sel_setAllowsUndo_.value;
-public static final long /*int*/ sel_setAllowsUserCustomization_ = Selector.sel_setAllowsUserCustomization_.value;
-public static final long /*int*/ sel_setAlpha_ = Selector.sel_setAlpha_.value;
-public static final long /*int*/ sel_setAlphaValue_ = Selector.sel_setAlphaValue_.value;
-public static final long /*int*/ sel_setAlternateButtonTitle_ = Selector.sel_setAlternateButtonTitle_.value;
-public static final long /*int*/ sel_setAppearance_ = Selector.sel_setAppearance_.value;
-public static final long /*int*/ sel_setApplicationIconImage_ = Selector.sel_setApplicationIconImage_.value;
-public static final long /*int*/ sel_setApplicationNameForUserAgent_ = Selector.sel_setApplicationNameForUserAgent_.value;
-public static final long /*int*/ sel_setAttachmentCell_ = Selector.sel_setAttachmentCell_.value;
-public static final long /*int*/ sel_setAttributedString_ = Selector.sel_setAttributedString_.value;
-public static final long /*int*/ sel_setAttributedStringValue_ = Selector.sel_setAttributedStringValue_.value;
-public static final long /*int*/ sel_setAttributedTitle_ = Selector.sel_setAttributedTitle_.value;
-public static final long /*int*/ sel_setAutoenablesItems_ = Selector.sel_setAutoenablesItems_.value;
-public static final long /*int*/ sel_setAutohidesScrollers_ = Selector.sel_setAutohidesScrollers_.value;
-public static final long /*int*/ sel_setAutoresizesOutlineColumn_ = Selector.sel_setAutoresizesOutlineColumn_.value;
-public static final long /*int*/ sel_setAutoresizesSubviews_ = Selector.sel_setAutoresizesSubviews_.value;
-public static final long /*int*/ sel_setAutoresizingMask_ = Selector.sel_setAutoresizingMask_.value;
-public static final long /*int*/ sel_setAutosaveExpandedItems_ = Selector.sel_setAutosaveExpandedItems_.value;
-public static final long /*int*/ sel_setBackgroundColor_ = Selector.sel_setBackgroundColor_.value;
-public static final long /*int*/ sel_setBackgroundLayoutEnabled_ = Selector.sel_setBackgroundLayoutEnabled_.value;
-public static final long /*int*/ sel_setBackgroundStyle_ = Selector.sel_setBackgroundStyle_.value;
-public static final long /*int*/ sel_setBadgeLabel_ = Selector.sel_setBadgeLabel_.value;
-public static final long /*int*/ sel_setBaseWritingDirection_ = Selector.sel_setBaseWritingDirection_.value;
-public static final long /*int*/ sel_setBaseWritingDirection_range_ = Selector.sel_setBaseWritingDirection_range_.value;
-public static final long /*int*/ sel_setBecomesKeyOnlyIfNeeded_ = Selector.sel_setBecomesKeyOnlyIfNeeded_.value;
-public static final long /*int*/ sel_setBezelStyle_ = Selector.sel_setBezelStyle_.value;
-public static final long /*int*/ sel_setBezeled_ = Selector.sel_setBezeled_.value;
-public static final long /*int*/ sel_setBorderType_ = Selector.sel_setBorderType_.value;
-public static final long /*int*/ sel_setBorderWidth_ = Selector.sel_setBorderWidth_.value;
-public static final long /*int*/ sel_setBordered_ = Selector.sel_setBordered_.value;
-public static final long /*int*/ sel_setBoundsRotation_ = Selector.sel_setBoundsRotation_.value;
-public static final long /*int*/ sel_setBoxType_ = Selector.sel_setBoxType_.value;
-public static final long /*int*/ sel_setButtonType_ = Selector.sel_setButtonType_.value;
-public static final long /*int*/ sel_setCacheMode_ = Selector.sel_setCacheMode_.value;
-public static final long /*int*/ sel_setCachePolicy_ = Selector.sel_setCachePolicy_.value;
-public static final long /*int*/ sel_setCanChooseDirectories_ = Selector.sel_setCanChooseDirectories_.value;
-public static final long /*int*/ sel_setCanChooseFiles_ = Selector.sel_setCanChooseFiles_.value;
-public static final long /*int*/ sel_setCanCreateDirectories_ = Selector.sel_setCanCreateDirectories_.value;
-public static final long /*int*/ sel_setCancelButtonCell_ = Selector.sel_setCancelButtonCell_.value;
-public static final long /*int*/ sel_setCell_ = Selector.sel_setCell_.value;
-public static final long /*int*/ sel_setCellClass_ = Selector.sel_setCellClass_.value;
-public static final long /*int*/ sel_setClip = Selector.sel_setClip.value;
-public static final long /*int*/ sel_setCollectionBehavior_ = Selector.sel_setCollectionBehavior_.value;
-public static final long /*int*/ sel_setColor_ = Selector.sel_setColor_.value;
-public static final long /*int*/ sel_setColumnAutoresizingStyle_ = Selector.sel_setColumnAutoresizingStyle_.value;
-public static final long /*int*/ sel_setCompositingOperation_ = Selector.sel_setCompositingOperation_.value;
-public static final long /*int*/ sel_setContainerSize_ = Selector.sel_setContainerSize_.value;
-public static final long /*int*/ sel_setContentView_ = Selector.sel_setContentView_.value;
-public static final long /*int*/ sel_setContentViewMargins_ = Selector.sel_setContentViewMargins_.value;
-public static final long /*int*/ sel_setControlSize_ = Selector.sel_setControlSize_.value;
-public static final long /*int*/ sel_setCookie_ = Selector.sel_setCookie_.value;
-public static final long /*int*/ sel_setCopiesOnScroll_ = Selector.sel_setCopiesOnScroll_.value;
-public static final long /*int*/ sel_setCurrentContext_ = Selector.sel_setCurrentContext_.value;
-public static final long /*int*/ sel_setCurrentOperation_ = Selector.sel_setCurrentOperation_.value;
-public static final long /*int*/ sel_setCustomUserAgent_ = Selector.sel_setCustomUserAgent_.value;
-public static final long /*int*/ sel_setData_forType_ = Selector.sel_setData_forType_.value;
-public static final long /*int*/ sel_setDataCell_ = Selector.sel_setDataCell_.value;
-public static final long /*int*/ sel_setDataSource_ = Selector.sel_setDataSource_.value;
-public static final long /*int*/ sel_setDatePickerElements_ = Selector.sel_setDatePickerElements_.value;
-public static final long /*int*/ sel_setDatePickerStyle_ = Selector.sel_setDatePickerStyle_.value;
-public static final long /*int*/ sel_setDateValue_ = Selector.sel_setDateValue_.value;
-public static final long /*int*/ sel_setDefaultButtonCell_ = Selector.sel_setDefaultButtonCell_.value;
-public static final long /*int*/ sel_setDefaultFlatness_ = Selector.sel_setDefaultFlatness_.value;
-public static final long /*int*/ sel_setDefaultParagraphStyle_ = Selector.sel_setDefaultParagraphStyle_.value;
-public static final long /*int*/ sel_setDefaultTabInterval_ = Selector.sel_setDefaultTabInterval_.value;
-public static final long /*int*/ sel_setDelegate_ = Selector.sel_setDelegate_.value;
-public static final long /*int*/ sel_setDestination_allowOverwrite_ = Selector.sel_setDestination_allowOverwrite_.value;
-public static final long /*int*/ sel_setDictionary_ = Selector.sel_setDictionary_.value;
-public static final long /*int*/ sel_setDirectory_ = Selector.sel_setDirectory_.value;
-public static final long /*int*/ sel_setDirectoryURL_ = Selector.sel_setDirectoryURL_.value;
-public static final long /*int*/ sel_setDisplayMode_ = Selector.sel_setDisplayMode_.value;
-public static final long /*int*/ sel_setDisplaysLinkToolTips_ = Selector.sel_setDisplaysLinkToolTips_.value;
-public static final long /*int*/ sel_setDocumentCursor_ = Selector.sel_setDocumentCursor_.value;
-public static final long /*int*/ sel_setDocumentEdited_ = Selector.sel_setDocumentEdited_.value;
-public static final long /*int*/ sel_setDocumentView_ = Selector.sel_setDocumentView_.value;
-public static final long /*int*/ sel_setDoubleAction_ = Selector.sel_setDoubleAction_.value;
-public static final long /*int*/ sel_setDoubleValue_ = Selector.sel_setDoubleValue_.value;
-public static final long /*int*/ sel_setDownloadDelegate_ = Selector.sel_setDownloadDelegate_.value;
-public static final long /*int*/ sel_setDrawsBackground_ = Selector.sel_setDrawsBackground_.value;
-public static final long /*int*/ sel_setDropItem_dropChildIndex_ = Selector.sel_setDropItem_dropChildIndex_.value;
-public static final long /*int*/ sel_setDropRow_dropOperation_ = Selector.sel_setDropRow_dropOperation_.value;
-public static final long /*int*/ sel_setEditable_ = Selector.sel_setEditable_.value;
-public static final long /*int*/ sel_setEnabled_ = Selector.sel_setEnabled_.value;
-public static final long /*int*/ sel_setEnabled_forSegment_ = Selector.sel_setEnabled_forSegment_.value;
-public static final long /*int*/ sel_setFill = Selector.sel_setFill.value;
-public static final long /*int*/ sel_setFillColor_ = Selector.sel_setFillColor_.value;
-public static final long /*int*/ sel_setFireDate_ = Selector.sel_setFireDate_.value;
-public static final long /*int*/ sel_setFirstLineHeadIndent_ = Selector.sel_setFirstLineHeadIndent_.value;
-public static final long /*int*/ sel_setFloatingPanel_ = Selector.sel_setFloatingPanel_.value;
-public static final long /*int*/ sel_setFocusRingType_ = Selector.sel_setFocusRingType_.value;
-public static final long /*int*/ sel_setFont_ = Selector.sel_setFont_.value;
-public static final long /*int*/ sel_setFormatter_ = Selector.sel_setFormatter_.value;
-public static final long /*int*/ sel_setFrame_ = Selector.sel_setFrame_.value;
-public static final long /*int*/ sel_setFrame_display_ = Selector.sel_setFrame_display_.value;
-public static final long /*int*/ sel_setFrame_display_animate_ = Selector.sel_setFrame_display_animate_.value;
-public static final long /*int*/ sel_setFrameFromContentFrame_ = Selector.sel_setFrameFromContentFrame_.value;
-public static final long /*int*/ sel_setFrameLoadDelegate_ = Selector.sel_setFrameLoadDelegate_.value;
-public static final long /*int*/ sel_setFrameOrigin_ = Selector.sel_setFrameOrigin_.value;
-public static final long /*int*/ sel_setFrameSize_ = Selector.sel_setFrameSize_.value;
-public static final long /*int*/ sel_setGridStyleMask_ = Selector.sel_setGridStyleMask_.value;
-public static final long /*int*/ sel_setHTTPBody_ = Selector.sel_setHTTPBody_.value;
-public static final long /*int*/ sel_setHTTPMethod_ = Selector.sel_setHTTPMethod_.value;
-public static final long /*int*/ sel_setHasHorizontalScroller_ = Selector.sel_setHasHorizontalScroller_.value;
-public static final long /*int*/ sel_setHasShadow_ = Selector.sel_setHasShadow_.value;
-public static final long /*int*/ sel_setHasVerticalScroller_ = Selector.sel_setHasVerticalScroller_.value;
-public static final long /*int*/ sel_setHeadIndent_ = Selector.sel_setHeadIndent_.value;
-public static final long /*int*/ sel_setHeaderCell_ = Selector.sel_setHeaderCell_.value;
-public static final long /*int*/ sel_setHeaderView_ = Selector.sel_setHeaderView_.value;
-public static final long /*int*/ sel_setHelpMenu_ = Selector.sel_setHelpMenu_.value;
-public static final long /*int*/ sel_setHidden_ = Selector.sel_setHidden_.value;
-public static final long /*int*/ sel_setHiddenUntilMouseMoves_ = Selector.sel_setHiddenUntilMouseMoves_.value;
-public static final long /*int*/ sel_setHidesOnDeactivate_ = Selector.sel_setHidesOnDeactivate_.value;
-public static final long /*int*/ sel_setHighlightMode_ = Selector.sel_setHighlightMode_.value;
-public static final long /*int*/ sel_setHighlighted_ = Selector.sel_setHighlighted_.value;
-public static final long /*int*/ sel_setHighlightedTableColumn_ = Selector.sel_setHighlightedTableColumn_.value;
-public static final long /*int*/ sel_setHighlightsBy_ = Selector.sel_setHighlightsBy_.value;
-public static final long /*int*/ sel_setHorizontalScroller_ = Selector.sel_setHorizontalScroller_.value;
-public static final long /*int*/ sel_setHorizontallyResizable_ = Selector.sel_setHorizontallyResizable_.value;
-public static final long /*int*/ sel_setIcon_ = Selector.sel_setIcon_.value;
-public static final long /*int*/ sel_setIdentifier_ = Selector.sel_setIdentifier_.value;
-public static final long /*int*/ sel_setImage_ = Selector.sel_setImage_.value;
-public static final long /*int*/ sel_setImage_forSegment_ = Selector.sel_setImage_forSegment_.value;
-public static final long /*int*/ sel_setImageAlignment_ = Selector.sel_setImageAlignment_.value;
-public static final long /*int*/ sel_setImageInterpolation_ = Selector.sel_setImageInterpolation_.value;
-public static final long /*int*/ sel_setImagePosition_ = Selector.sel_setImagePosition_.value;
-public static final long /*int*/ sel_setImageScaling_ = Selector.sel_setImageScaling_.value;
-public static final long /*int*/ sel_setIncrement_ = Selector.sel_setIncrement_.value;
-public static final long /*int*/ sel_setIndeterminate_ = Selector.sel_setIndeterminate_.value;
-public static final long /*int*/ sel_setIndicatorImage_inTableColumn_ = Selector.sel_setIndicatorImage_inTableColumn_.value;
-public static final long /*int*/ sel_setInteger_forKey_ = Selector.sel_setInteger_forKey_.value;
-public static final long /*int*/ sel_setIntercellSpacing_ = Selector.sel_setIntercellSpacing_.value;
-public static final long /*int*/ sel_setJavaEnabled_ = Selector.sel_setJavaEnabled_.value;
-public static final long /*int*/ sel_setJavaScriptEnabled_ = Selector.sel_setJavaScriptEnabled_.value;
-public static final long /*int*/ sel_setJobDisposition_ = Selector.sel_setJobDisposition_.value;
-public static final long /*int*/ sel_setJobTitle_ = Selector.sel_setJobTitle_.value;
-public static final long /*int*/ sel_setKeyEquivalent_ = Selector.sel_setKeyEquivalent_.value;
-public static final long /*int*/ sel_setKeyEquivalentModifierMask_ = Selector.sel_setKeyEquivalentModifierMask_.value;
-public static final long /*int*/ sel_setKnobProportion_ = Selector.sel_setKnobProportion_.value;
-public static final long /*int*/ sel_setLabel_ = Selector.sel_setLabel_.value;
-public static final long /*int*/ sel_setLabel_forSegment_ = Selector.sel_setLabel_forSegment_.value;
-public static final long /*int*/ sel_setLeaf_ = Selector.sel_setLeaf_.value;
-public static final long /*int*/ sel_setLength_ = Selector.sel_setLength_.value;
-public static final long /*int*/ sel_setLevel_ = Selector.sel_setLevel_.value;
-public static final long /*int*/ sel_setLineBreakMode_ = Selector.sel_setLineBreakMode_.value;
-public static final long /*int*/ sel_setLineCapStyle_ = Selector.sel_setLineCapStyle_.value;
-public static final long /*int*/ sel_setLineDash_count_phase_ = Selector.sel_setLineDash_count_phase_.value;
-public static final long /*int*/ sel_setLineFragmentPadding_ = Selector.sel_setLineFragmentPadding_.value;
-public static final long /*int*/ sel_setLineFragmentRect_forGlyphRange_usedRect_ = Selector.sel_setLineFragmentRect_forGlyphRange_usedRect_.value;
-public static final long /*int*/ sel_setLineJoinStyle_ = Selector.sel_setLineJoinStyle_.value;
-public static final long /*int*/ sel_setLineSpacing_ = Selector.sel_setLineSpacing_.value;
-public static final long /*int*/ sel_setLineWidth_ = Selector.sel_setLineWidth_.value;
-public static final long /*int*/ sel_setLinkTextAttributes_ = Selector.sel_setLinkTextAttributes_.value;
-public static final long /*int*/ sel_setMainMenu_ = Selector.sel_setMainMenu_.value;
-public static final long /*int*/ sel_setMarkedText_selectedRange_ = Selector.sel_setMarkedText_selectedRange_.value;
-public static final long /*int*/ sel_setMaxSize_ = Selector.sel_setMaxSize_.value;
-public static final long /*int*/ sel_setMaxValue_ = Selector.sel_setMaxValue_.value;
-public static final long /*int*/ sel_setMaximum_ = Selector.sel_setMaximum_.value;
-public static final long /*int*/ sel_setMaximumFractionDigits_ = Selector.sel_setMaximumFractionDigits_.value;
-public static final long /*int*/ sel_setMaximumIntegerDigits_ = Selector.sel_setMaximumIntegerDigits_.value;
-public static final long /*int*/ sel_setMenu_ = Selector.sel_setMenu_.value;
-public static final long /*int*/ sel_setMenu_forSegment_ = Selector.sel_setMenu_forSegment_.value;
-public static final long /*int*/ sel_setMenuFormRepresentation_ = Selector.sel_setMenuFormRepresentation_.value;
-public static final long /*int*/ sel_setMessage_ = Selector.sel_setMessage_.value;
-public static final long /*int*/ sel_setMessageText_ = Selector.sel_setMessageText_.value;
-public static final long /*int*/ sel_setMinSize_ = Selector.sel_setMinSize_.value;
-public static final long /*int*/ sel_setMinValue_ = Selector.sel_setMinValue_.value;
-public static final long /*int*/ sel_setMinWidth_ = Selector.sel_setMinWidth_.value;
-public static final long /*int*/ sel_setMinimum_ = Selector.sel_setMinimum_.value;
-public static final long /*int*/ sel_setMinimumFractionDigits_ = Selector.sel_setMinimumFractionDigits_.value;
-public static final long /*int*/ sel_setMinimumIntegerDigits_ = Selector.sel_setMinimumIntegerDigits_.value;
-public static final long /*int*/ sel_setMiterLimit_ = Selector.sel_setMiterLimit_.value;
-public static final long /*int*/ sel_setMovable_ = Selector.sel_setMovable_.value;
-public static final long /*int*/ sel_setNameFieldStringValue_ = Selector.sel_setNameFieldStringValue_.value;
-public static final long /*int*/ sel_setNeedsDisplay_ = Selector.sel_setNeedsDisplay_.value;
-public static final long /*int*/ sel_setNeedsDisplayInRect_ = Selector.sel_setNeedsDisplayInRect_.value;
-public static final long /*int*/ sel_setNumberOfVisibleItems_ = Selector.sel_setNumberOfVisibleItems_.value;
-public static final long /*int*/ sel_setNumberStyle_ = Selector.sel_setNumberStyle_.value;
-public static final long /*int*/ sel_setObject_forKey_ = Selector.sel_setObject_forKey_.value;
-public static final long /*int*/ sel_setObjectValue_ = Selector.sel_setObjectValue_.value;
-public static final long /*int*/ sel_setOnMouseEntered_ = Selector.sel_setOnMouseEntered_.value;
-public static final long /*int*/ sel_setOpaque_ = Selector.sel_setOpaque_.value;
-public static final long /*int*/ sel_setOptions_ = Selector.sel_setOptions_.value;
-public static final long /*int*/ sel_setOutlineTableColumn_ = Selector.sel_setOutlineTableColumn_.value;
-public static final long /*int*/ sel_setPaletteLabel_ = Selector.sel_setPaletteLabel_.value;
-public static final long /*int*/ sel_setPanelFont_isMultiple_ = Selector.sel_setPanelFont_isMultiple_.value;
-public static final long /*int*/ sel_setPartialStringValidationEnabled_ = Selector.sel_setPartialStringValidationEnabled_.value;
-public static final long /*int*/ sel_setPatternPhase_ = Selector.sel_setPatternPhase_.value;
-public static final long /*int*/ sel_setPlaceholderString_ = Selector.sel_setPlaceholderString_.value;
-public static final long /*int*/ sel_setPolicyDelegate_ = Selector.sel_setPolicyDelegate_.value;
-public static final long /*int*/ sel_setPreferences_ = Selector.sel_setPreferences_.value;
-public static final long /*int*/ sel_setPrinter_ = Selector.sel_setPrinter_.value;
-public static final long /*int*/ sel_setPropertyList_forType_ = Selector.sel_setPropertyList_forType_.value;
-public static final long /*int*/ sel_setPullsDown_ = Selector.sel_setPullsDown_.value;
-public static final long /*int*/ sel_setReleasedWhenClosed_ = Selector.sel_setReleasedWhenClosed_.value;
-public static final long /*int*/ sel_setRepresentedFilename_ = Selector.sel_setRepresentedFilename_.value;
-public static final long /*int*/ sel_setRepresentedURL_ = Selector.sel_setRepresentedURL_.value;
-public static final long /*int*/ sel_setResizingMask_ = Selector.sel_setResizingMask_.value;
-public static final long /*int*/ sel_setResourceLoadDelegate_ = Selector.sel_setResourceLoadDelegate_.value;
-public static final long /*int*/ sel_setRichText_ = Selector.sel_setRichText_.value;
-public static final long /*int*/ sel_setRowHeight_ = Selector.sel_setRowHeight_.value;
-public static final long /*int*/ sel_setScalesWhenResized_ = Selector.sel_setScalesWhenResized_.value;
-public static final long /*int*/ sel_setScrollable_ = Selector.sel_setScrollable_.value;
-public static final long /*int*/ sel_setSearchButtonCell_ = Selector.sel_setSearchButtonCell_.value;
-public static final long /*int*/ sel_setSegmentCount_ = Selector.sel_setSegmentCount_.value;
-public static final long /*int*/ sel_setSegmentStyle_ = Selector.sel_setSegmentStyle_.value;
-public static final long /*int*/ sel_setSelectable_ = Selector.sel_setSelectable_.value;
-public static final long /*int*/ sel_setSelected_forSegment_ = Selector.sel_setSelected_forSegment_.value;
-public static final long /*int*/ sel_setSelectedItemIdentifier_ = Selector.sel_setSelectedItemIdentifier_.value;
-public static final long /*int*/ sel_setSelectedRange_ = Selector.sel_setSelectedRange_.value;
-public static final long /*int*/ sel_setSelectedSegment_ = Selector.sel_setSelectedSegment_.value;
-public static final long /*int*/ sel_setSelectedTextAttributes_ = Selector.sel_setSelectedTextAttributes_.value;
-public static final long /*int*/ sel_setSelectionOnly_ = Selector.sel_setSelectionOnly_.value;
-public static final long /*int*/ sel_setServicesMenu_ = Selector.sel_setServicesMenu_.value;
-public static final long /*int*/ sel_setShouldAntialias_ = Selector.sel_setShouldAntialias_.value;
-public static final long /*int*/ sel_setShowsHelp_ = Selector.sel_setShowsHelp_.value;
-public static final long /*int*/ sel_setShowsPrintPanel_ = Selector.sel_setShowsPrintPanel_.value;
-public static final long /*int*/ sel_setShowsProgressPanel_ = Selector.sel_setShowsProgressPanel_.value;
-public static final long /*int*/ sel_setShowsResizeIndicator_ = Selector.sel_setShowsResizeIndicator_.value;
-public static final long /*int*/ sel_setShowsToolbarButton_ = Selector.sel_setShowsToolbarButton_.value;
-public static final long /*int*/ sel_setSize_ = Selector.sel_setSize_.value;
-public static final long /*int*/ sel_setState_ = Selector.sel_setState_.value;
-public static final long /*int*/ sel_setString_ = Selector.sel_setString_.value;
-public static final long /*int*/ sel_setString_forType_ = Selector.sel_setString_forType_.value;
-public static final long /*int*/ sel_setStringValue_ = Selector.sel_setStringValue_.value;
-public static final long /*int*/ sel_setStroke = Selector.sel_setStroke.value;
-public static final long /*int*/ sel_setSubmenu_ = Selector.sel_setSubmenu_.value;
-public static final long /*int*/ sel_setSubmenu_forItem_ = Selector.sel_setSubmenu_forItem_.value;
-public static final long /*int*/ sel_setTabStops_ = Selector.sel_setTabStops_.value;
-public static final long /*int*/ sel_setTabViewType_ = Selector.sel_setTabViewType_.value;
-public static final long /*int*/ sel_setTag_ = Selector.sel_setTag_.value;
-public static final long /*int*/ sel_setTag_forSegment_ = Selector.sel_setTag_forSegment_.value;
-public static final long /*int*/ sel_setTarget_ = Selector.sel_setTarget_.value;
-public static final long /*int*/ sel_setTextColor_ = Selector.sel_setTextColor_.value;
-public static final long /*int*/ sel_setTextStorage_ = Selector.sel_setTextStorage_.value;
-public static final long /*int*/ sel_setTitle_ = Selector.sel_setTitle_.value;
-public static final long /*int*/ sel_setTitleFont_ = Selector.sel_setTitleFont_.value;
-public static final long /*int*/ sel_setTitlePosition_ = Selector.sel_setTitlePosition_.value;
-public static final long /*int*/ sel_setToolTip_ = Selector.sel_setToolTip_.value;
-public static final long /*int*/ sel_setToolTip_forSegment_ = Selector.sel_setToolTip_forSegment_.value;
-public static final long /*int*/ sel_setToolbar_ = Selector.sel_setToolbar_.value;
-public static final long /*int*/ sel_setTrackingMode_ = Selector.sel_setTrackingMode_.value;
-public static final long /*int*/ sel_setTransformStruct_ = Selector.sel_setTransformStruct_.value;
-public static final long /*int*/ sel_setTreatsFilePackagesAsDirectories_ = Selector.sel_setTreatsFilePackagesAsDirectories_.value;
-public static final long /*int*/ sel_setUIDelegate_ = Selector.sel_setUIDelegate_.value;
-public static final long /*int*/ sel_setURL_ = Selector.sel_setURL_.value;
-public static final long /*int*/ sel_setUpPrintOperationDefaultValues = Selector.sel_setUpPrintOperationDefaultValues.value;
-public static final long /*int*/ sel_setUsesAlternatingRowBackgroundColors_ = Selector.sel_setUsesAlternatingRowBackgroundColors_.value;
-public static final long /*int*/ sel_setUsesFontPanel_ = Selector.sel_setUsesFontPanel_.value;
-public static final long /*int*/ sel_setUsesScreenFonts_ = Selector.sel_setUsesScreenFonts_.value;
-public static final long /*int*/ sel_setUsesSingleLineMode_ = Selector.sel_setUsesSingleLineMode_.value;
-public static final long /*int*/ sel_setUsesThreadedAnimation_ = Selector.sel_setUsesThreadedAnimation_.value;
-public static final long /*int*/ sel_setValue_forHTTPHeaderField_ = Selector.sel_setValue_forHTTPHeaderField_.value;
-public static final long /*int*/ sel_setValue_forKey_ = Selector.sel_setValue_forKey_.value;
-public static final long /*int*/ sel_setValueWraps_ = Selector.sel_setValueWraps_.value;
-public static final long /*int*/ sel_setValues_forParameter_ = Selector.sel_setValues_forParameter_.value;
-public static final long /*int*/ sel_setVerticalScrollElasticity_ = Selector.sel_setVerticalScrollElasticity_.value;
-public static final long /*int*/ sel_setVerticalScroller_ = Selector.sel_setVerticalScroller_.value;
-public static final long /*int*/ sel_setView_ = Selector.sel_setView_.value;
-public static final long /*int*/ sel_setVisible_ = Selector.sel_setVisible_.value;
-public static final long /*int*/ sel_setWantsRestingTouches_ = Selector.sel_setWantsRestingTouches_.value;
-public static final long /*int*/ sel_setWidth_ = Selector.sel_setWidth_.value;
-public static final long /*int*/ sel_setWidth_forSegment_ = Selector.sel_setWidth_forSegment_.value;
-public static final long /*int*/ sel_setWidthTracksTextView_ = Selector.sel_setWidthTracksTextView_.value;
-public static final long /*int*/ sel_setWindingRule_ = Selector.sel_setWindingRule_.value;
-public static final long /*int*/ sel_setWorksWhenModal_ = Selector.sel_setWorksWhenModal_.value;
-public static final long /*int*/ sel_setWraps_ = Selector.sel_setWraps_.value;
-public static final long /*int*/ sel_sharedApplication = Selector.sel_sharedApplication.value;
-public static final long /*int*/ sel_sharedCertificateTrustPanel = Selector.sel_sharedCertificateTrustPanel.value;
-public static final long /*int*/ sel_sharedColorPanel = Selector.sel_sharedColorPanel.value;
-public static final long /*int*/ sel_sharedFontManager = Selector.sel_sharedFontManager.value;
-public static final long /*int*/ sel_sharedFontPanel = Selector.sel_sharedFontPanel.value;
-public static final long /*int*/ sel_sharedHTTPCookieStorage = Selector.sel_sharedHTTPCookieStorage.value;
-public static final long /*int*/ sel_sharedPrintInfo = Selector.sel_sharedPrintInfo.value;
-public static final long /*int*/ sel_sharedWorkspace = Selector.sel_sharedWorkspace.value;
-public static final long /*int*/ sel_shiftKey = Selector.sel_shiftKey.value;
-public static final long /*int*/ sel_shouldAntialias = Selector.sel_shouldAntialias.value;
-public static final long /*int*/ sel_shouldChangeTextInRange_replacementString_ = Selector.sel_shouldChangeTextInRange_replacementString_.value;
-public static final long /*int*/ sel_shouldDelayWindowOrderingForEvent_ = Selector.sel_shouldDelayWindowOrderingForEvent_.value;
-public static final long /*int*/ sel_shouldDrawInsertionPoint = Selector.sel_shouldDrawInsertionPoint.value;
-public static final long /*int*/ sel_size = Selector.sel_size.value;
-public static final long /*int*/ sel_sizeOfLabel_ = Selector.sel_sizeOfLabel_.value;
-public static final long /*int*/ sel_sizeToFit = Selector.sel_sizeToFit.value;
-public static final long /*int*/ sel_sizeValue = Selector.sel_sizeValue.value;
-public static final long /*int*/ sel_skipDescendents = Selector.sel_skipDescendents.value;
-public static final long /*int*/ sel_smallSystemFontSize = Selector.sel_smallSystemFontSize.value;
-public static final long /*int*/ sel_sortIndicatorRectForBounds_ = Selector.sel_sortIndicatorRectForBounds_.value;
-public static final long /*int*/ sel_standardPreferences = Selector.sel_standardPreferences.value;
-public static final long /*int*/ sel_standardUserDefaults = Selector.sel_standardUserDefaults.value;
-public static final long /*int*/ sel_standardWindowButton_ = Selector.sel_standardWindowButton_.value;
-public static final long /*int*/ sel_startAnimation_ = Selector.sel_startAnimation_.value;
-public static final long /*int*/ sel_state = Selector.sel_state.value;
-public static final long /*int*/ sel_statusItemWithLength_ = Selector.sel_statusItemWithLength_.value;
-public static final long /*int*/ sel_stop_ = Selector.sel_stop_.value;
-public static final long /*int*/ sel_stopAnimation_ = Selector.sel_stopAnimation_.value;
-public static final long /*int*/ sel_stopLoading_ = Selector.sel_stopLoading_.value;
-public static final long /*int*/ sel_stopModal = Selector.sel_stopModal.value;
-public static final long /*int*/ sel_string = Selector.sel_string.value;
-public static final long /*int*/ sel_stringByAddingPercentEscapesUsingEncoding_ = Selector.sel_stringByAddingPercentEscapesUsingEncoding_.value;
-public static final long /*int*/ sel_stringByAppendingPathComponent_ = Selector.sel_stringByAppendingPathComponent_.value;
-public static final long /*int*/ sel_stringByAppendingPathExtension_ = Selector.sel_stringByAppendingPathExtension_.value;
-public static final long /*int*/ sel_stringByAppendingString_ = Selector.sel_stringByAppendingString_.value;
-public static final long /*int*/ sel_stringByDeletingLastPathComponent = Selector.sel_stringByDeletingLastPathComponent.value;
-public static final long /*int*/ sel_stringByDeletingPathExtension = Selector.sel_stringByDeletingPathExtension.value;
-public static final long /*int*/ sel_stringByReplacingOccurrencesOfString_withString_ = Selector.sel_stringByReplacingOccurrencesOfString_withString_.value;
-public static final long /*int*/ sel_stringByReplacingPercentEscapesUsingEncoding_ = Selector.sel_stringByReplacingPercentEscapesUsingEncoding_.value;
-public static final long /*int*/ sel_stringForKey_ = Selector.sel_stringForKey_.value;
-public static final long /*int*/ sel_stringForObjectValue_ = Selector.sel_stringForObjectValue_.value;
-public static final long /*int*/ sel_stringForType_ = Selector.sel_stringForType_.value;
-public static final long /*int*/ sel_stringValue = Selector.sel_stringValue.value;
-public static final long /*int*/ sel_stringWithCharacters_length_ = Selector.sel_stringWithCharacters_length_.value;
-public static final long /*int*/ sel_stringWithUTF8String_ = Selector.sel_stringWithUTF8String_.value;
-public static final long /*int*/ sel_stroke = Selector.sel_stroke.value;
-public static final long /*int*/ sel_strokeRect_ = Selector.sel_strokeRect_.value;
-public static final long /*int*/ sel_styleMask = Selector.sel_styleMask.value;
-public static final long /*int*/ sel_submenu = Selector.sel_submenu.value;
-public static final long /*int*/ sel_subviews = Selector.sel_subviews.value;
-public static final long /*int*/ sel_superclass = Selector.sel_superclass.value;
-public static final long /*int*/ sel_superview = Selector.sel_superview.value;
-public static final long /*int*/ sel_swipeWithEvent_ = Selector.sel_swipeWithEvent_.value;
-public static final long /*int*/ sel_systemFontOfSize_ = Selector.sel_systemFontOfSize_.value;
-public static final long /*int*/ sel_systemFontSize = Selector.sel_systemFontSize.value;
-public static final long /*int*/ sel_systemFontSizeForControlSize_ = Selector.sel_systemFontSizeForControlSize_.value;
-public static final long /*int*/ sel_systemStatusBar = Selector.sel_systemStatusBar.value;
-public static final long /*int*/ sel_systemVersion = Selector.sel_systemVersion.value;
-public static final long /*int*/ sel_tabStopType = Selector.sel_tabStopType.value;
-public static final long /*int*/ sel_tabStops = Selector.sel_tabStops.value;
-public static final long /*int*/ sel_tabView_didSelectTabViewItem_ = Selector.sel_tabView_didSelectTabViewItem_.value;
-public static final long /*int*/ sel_tabView_shouldSelectTabViewItem_ = Selector.sel_tabView_shouldSelectTabViewItem_.value;
-public static final long /*int*/ sel_tabView_willSelectTabViewItem_ = Selector.sel_tabView_willSelectTabViewItem_.value;
-public static final long /*int*/ sel_tabViewItemAtPoint_ = Selector.sel_tabViewItemAtPoint_.value;
-public static final long /*int*/ sel_tableColumns = Selector.sel_tableColumns.value;
-public static final long /*int*/ sel_tableView_acceptDrop_row_dropOperation_ = Selector.sel_tableView_acceptDrop_row_dropOperation_.value;
-public static final long /*int*/ sel_tableView_didClickTableColumn_ = Selector.sel_tableView_didClickTableColumn_.value;
-public static final long /*int*/ sel_tableView_objectValueForTableColumn_row_ = Selector.sel_tableView_objectValueForTableColumn_row_.value;
-public static final long /*int*/ sel_tableView_setObjectValue_forTableColumn_row_ = Selector.sel_tableView_setObjectValue_forTableColumn_row_.value;
-public static final long /*int*/ sel_tableView_shouldEditTableColumn_row_ = Selector.sel_tableView_shouldEditTableColumn_row_.value;
-public static final long /*int*/ sel_tableView_shouldReorderColumn_toColumn_ = Selector.sel_tableView_shouldReorderColumn_toColumn_.value;
-public static final long /*int*/ sel_tableView_shouldSelectRow_ = Selector.sel_tableView_shouldSelectRow_.value;
-public static final long /*int*/ sel_tableView_shouldTrackCell_forTableColumn_row_ = Selector.sel_tableView_shouldTrackCell_forTableColumn_row_.value;
-public static final long /*int*/ sel_tableView_validateDrop_proposedRow_proposedDropOperation_ = Selector.sel_tableView_validateDrop_proposedRow_proposedDropOperation_.value;
-public static final long /*int*/ sel_tableView_willDisplayCell_forTableColumn_row_ = Selector.sel_tableView_willDisplayCell_forTableColumn_row_.value;
-public static final long /*int*/ sel_tableView_writeRowsWithIndexes_toPasteboard_ = Selector.sel_tableView_writeRowsWithIndexes_toPasteboard_.value;
-public static final long /*int*/ sel_tableViewColumnDidMove_ = Selector.sel_tableViewColumnDidMove_.value;
-public static final long /*int*/ sel_tableViewColumnDidResize_ = Selector.sel_tableViewColumnDidResize_.value;
-public static final long /*int*/ sel_tableViewSelectionDidChange_ = Selector.sel_tableViewSelectionDidChange_.value;
-public static final long /*int*/ sel_tableViewSelectionIsChanging_ = Selector.sel_tableViewSelectionIsChanging_.value;
-public static final long /*int*/ sel_tag = Selector.sel_tag.value;
-public static final long /*int*/ sel_target = Selector.sel_target.value;
-public static final long /*int*/ sel_terminate_ = Selector.sel_terminate_.value;
-public static final long /*int*/ sel_testPart_ = Selector.sel_testPart_.value;
-public static final long /*int*/ sel_textBackgroundColor = Selector.sel_textBackgroundColor.value;
-public static final long /*int*/ sel_textColor = Selector.sel_textColor.value;
-public static final long /*int*/ sel_textContainer = Selector.sel_textContainer.value;
-public static final long /*int*/ sel_textDidChange_ = Selector.sel_textDidChange_.value;
-public static final long /*int*/ sel_textDidEndEditing_ = Selector.sel_textDidEndEditing_.value;
-public static final long /*int*/ sel_textStorage = Selector.sel_textStorage.value;
-public static final long /*int*/ sel_textView_clickedOnLink_atIndex_ = Selector.sel_textView_clickedOnLink_atIndex_.value;
-public static final long /*int*/ sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_ = Selector.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_.value;
-public static final long /*int*/ sel_textViewDidChangeSelection_ = Selector.sel_textViewDidChangeSelection_.value;
-public static final long /*int*/ sel_thickness = Selector.sel_thickness.value;
-public static final long /*int*/ sel_threadDictionary = Selector.sel_threadDictionary.value;
-public static final long /*int*/ sel_tile = Selector.sel_tile.value;
-public static final long /*int*/ sel_timeZone = Selector.sel_timeZone.value;
-public static final long /*int*/ sel_timestamp = Selector.sel_timestamp.value;
-public static final long /*int*/ sel_title = Selector.sel_title.value;
-public static final long /*int*/ sel_titleCell = Selector.sel_titleCell.value;
-public static final long /*int*/ sel_titleFont = Selector.sel_titleFont.value;
-public static final long /*int*/ sel_titleOfSelectedItem = Selector.sel_titleOfSelectedItem.value;
-public static final long /*int*/ sel_titleRectForBounds_ = Selector.sel_titleRectForBounds_.value;
-public static final long /*int*/ sel_toggleToolbarShown_ = Selector.sel_toggleToolbarShown_.value;
-public static final long /*int*/ sel_toolbar = Selector.sel_toolbar.value;
-public static final long /*int*/ sel_toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_ = Selector.sel_toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_.value;
-public static final long /*int*/ sel_toolbarAllowedItemIdentifiers_ = Selector.sel_toolbarAllowedItemIdentifiers_.value;
-public static final long /*int*/ sel_toolbarDefaultItemIdentifiers_ = Selector.sel_toolbarDefaultItemIdentifiers_.value;
-public static final long /*int*/ sel_toolbarDidRemoveItem_ = Selector.sel_toolbarDidRemoveItem_.value;
-public static final long /*int*/ sel_toolbarSelectableItemIdentifiers_ = Selector.sel_toolbarSelectableItemIdentifiers_.value;
-public static final long /*int*/ sel_toolbarWillAddItem_ = Selector.sel_toolbarWillAddItem_.value;
-public static final long /*int*/ sel_touchesBeganWithEvent_ = Selector.sel_touchesBeganWithEvent_.value;
-public static final long /*int*/ sel_touchesCancelledWithEvent_ = Selector.sel_touchesCancelledWithEvent_.value;
-public static final long /*int*/ sel_touchesEndedWithEvent_ = Selector.sel_touchesEndedWithEvent_.value;
-public static final long /*int*/ sel_touchesMatchingPhase_inView_ = Selector.sel_touchesMatchingPhase_inView_.value;
-public static final long /*int*/ sel_touchesMovedWithEvent_ = Selector.sel_touchesMovedWithEvent_.value;
-public static final long /*int*/ sel_trackingAreas = Selector.sel_trackingAreas.value;
-public static final long /*int*/ sel_traitsOfFont_ = Selector.sel_traitsOfFont_.value;
-public static final long /*int*/ sel_transform = Selector.sel_transform.value;
-public static final long /*int*/ sel_transformPoint_ = Selector.sel_transformPoint_.value;
-public static final long /*int*/ sel_transformSize_ = Selector.sel_transformSize_.value;
-public static final long /*int*/ sel_transformStruct = Selector.sel_transformStruct.value;
-public static final long /*int*/ sel_transformUsingAffineTransform_ = Selector.sel_transformUsingAffineTransform_.value;
-public static final long /*int*/ sel_translateXBy_yBy_ = Selector.sel_translateXBy_yBy_.value;
-public static final long /*int*/ sel_type = Selector.sel_type.value;
-public static final long /*int*/ sel_type_conformsToType_ = Selector.sel_type_conformsToType_.value;
-public static final long /*int*/ sel_typeOfFile_error_ = Selector.sel_typeOfFile_error_.value;
-public static final long /*int*/ sel_types = Selector.sel_types.value;
-public static final long /*int*/ sel_typesetter = Selector.sel_typesetter.value;
-public static final long /*int*/ sel_unarchiveObjectWithData_ = Selector.sel_unarchiveObjectWithData_.value;
-public static final long /*int*/ sel_undefined = Selector.sel_undefined.value;
-public static final long /*int*/ sel_undo = Selector.sel_undo.value;
-public static final long /*int*/ sel_undoManager = Selector.sel_undoManager.value;
-public static final long /*int*/ sel_unhideAllApplications_ = Selector.sel_unhideAllApplications_.value;
-public static final long /*int*/ sel_unlockFocus = Selector.sel_unlockFocus.value;
-public static final long /*int*/ sel_unmarkText = Selector.sel_unmarkText.value;
-public static final long /*int*/ sel_unregisterDraggedTypes = Selector.sel_unregisterDraggedTypes.value;
-public static final long /*int*/ sel_update = Selector.sel_update.value;
-public static final long /*int*/ sel_updateFromPMPrintSettings = Selector.sel_updateFromPMPrintSettings.value;
-public static final long /*int*/ sel_updateTrackingAreas = Selector.sel_updateTrackingAreas.value;
-public static final long /*int*/ sel_use = Selector.sel_use.value;
-public static final long /*int*/ sel_useCredential_forAuthenticationChallenge_ = Selector.sel_useCredential_forAuthenticationChallenge_.value;
-public static final long /*int*/ sel_usedRectForTextContainer_ = Selector.sel_usedRectForTextContainer_.value;
-public static final long /*int*/ sel_user = Selector.sel_user.value;
-public static final long /*int*/ sel_userInfo = Selector.sel_userInfo.value;
-public static final long /*int*/ sel_usesAlternatingRowBackgroundColors = Selector.sel_usesAlternatingRowBackgroundColors.value;
-public static final long /*int*/ sel_validAttributesForMarkedText = Selector.sel_validAttributesForMarkedText.value;
-public static final long /*int*/ sel_validModesForFontPanel_ = Selector.sel_validModesForFontPanel_.value;
-public static final long /*int*/ sel_validRequestorForSendType_returnType_ = Selector.sel_validRequestorForSendType_returnType_.value;
-public static final long /*int*/ sel_validateMenuItem_ = Selector.sel_validateMenuItem_.value;
-public static final long /*int*/ sel_validateVisibleColumns = Selector.sel_validateVisibleColumns.value;
-public static final long /*int*/ sel_value = Selector.sel_value.value;
-public static final long /*int*/ sel_valueForKey_ = Selector.sel_valueForKey_.value;
-public static final long /*int*/ sel_valueWithPoint_ = Selector.sel_valueWithPoint_.value;
-public static final long /*int*/ sel_valueWithRange_ = Selector.sel_valueWithRange_.value;
-public static final long /*int*/ sel_valueWithRect_ = Selector.sel_valueWithRect_.value;
-public static final long /*int*/ sel_valueWithSize_ = Selector.sel_valueWithSize_.value;
-public static final long /*int*/ sel_view = Selector.sel_view.value;
-public static final long /*int*/ sel_view_stringForToolTip_point_userData_ = Selector.sel_view_stringForToolTip_point_userData_.value;
-public static final long /*int*/ sel_viewDidMoveToWindow = Selector.sel_viewDidMoveToWindow.value;
-public static final long /*int*/ sel_viewWillMoveToWindow_ = Selector.sel_viewWillMoveToWindow_.value;
-public static final long /*int*/ sel_visibleFrame = Selector.sel_visibleFrame.value;
-public static final long /*int*/ sel_visibleRect = Selector.sel_visibleRect.value;
-public static final long /*int*/ sel_wantsPeriodicDraggingUpdates = Selector.sel_wantsPeriodicDraggingUpdates.value;
-public static final long /*int*/ sel_wantsToHandleMouseEvents = Selector.sel_wantsToHandleMouseEvents.value;
-public static final long /*int*/ sel_webFrame = Selector.sel_webFrame.value;
-public static final long /*int*/ sel_webScriptValueAtIndex_ = Selector.sel_webScriptValueAtIndex_.value;
-public static final long /*int*/ sel_webView_contextMenuItemsForElement_defaultMenuItems_ = Selector.sel_webView_contextMenuItemsForElement_defaultMenuItems_.value;
-public static final long /*int*/ sel_webView_createWebViewWithRequest_ = Selector.sel_webView_createWebViewWithRequest_.value;
-public static final long /*int*/ sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_ = Selector.sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_.value;
-public static final long /*int*/ sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_ = Selector.sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_.value;
-public static final long /*int*/ sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_ = Selector.sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_.value;
-public static final long /*int*/ sel_webView_didChangeLocationWithinPageForFrame_ = Selector.sel_webView_didChangeLocationWithinPageForFrame_.value;
-public static final long /*int*/ sel_webView_didCommitLoadForFrame_ = Selector.sel_webView_didCommitLoadForFrame_.value;
-public static final long /*int*/ sel_webView_didFailProvisionalLoadWithError_forFrame_ = Selector.sel_webView_didFailProvisionalLoadWithError_forFrame_.value;
-public static final long /*int*/ sel_webView_didFinishLoadForFrame_ = Selector.sel_webView_didFinishLoadForFrame_.value;
-public static final long /*int*/ sel_webView_didReceiveTitle_forFrame_ = Selector.sel_webView_didReceiveTitle_forFrame_.value;
-public static final long /*int*/ sel_webView_didStartProvisionalLoadForFrame_ = Selector.sel_webView_didStartProvisionalLoadForFrame_.value;
-public static final long /*int*/ sel_webView_identifierForInitialRequest_fromDataSource_ = Selector.sel_webView_identifierForInitialRequest_fromDataSource_.value;
-public static final long /*int*/ sel_webView_mouseDidMoveOverElement_modifierFlags_ = Selector.sel_webView_mouseDidMoveOverElement_modifierFlags_.value;
-public static final long /*int*/ sel_webView_printFrameView_ = Selector.sel_webView_printFrameView_.value;
-public static final long /*int*/ sel_webView_resource_didFailLoadingWithError_fromDataSource_ = Selector.sel_webView_resource_didFailLoadingWithError_fromDataSource_.value;
-public static final long /*int*/ sel_webView_resource_didFinishLoadingFromDataSource_ = Selector.sel_webView_resource_didFinishLoadingFromDataSource_.value;
-public static final long /*int*/ sel_webView_resource_didReceiveAuthenticationChallenge_fromDataSource_ = Selector.sel_webView_resource_didReceiveAuthenticationChallenge_fromDataSource_.value;
-public static final long /*int*/ sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_ = Selector.sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_.value;
-public static final long /*int*/ sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_ = Selector.sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_.value;
-public static final long /*int*/ sel_webView_runJavaScriptAlertPanelWithMessage_ = Selector.sel_webView_runJavaScriptAlertPanelWithMessage_.value;
-public static final long /*int*/ sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_ = Selector.sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_.value;
-public static final long /*int*/ sel_webView_runJavaScriptConfirmPanelWithMessage_ = Selector.sel_webView_runJavaScriptConfirmPanelWithMessage_.value;
-public static final long /*int*/ sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_ = Selector.sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_.value;
-public static final long /*int*/ sel_webView_runOpenPanelForFileButtonWithResultListener_ = Selector.sel_webView_runOpenPanelForFileButtonWithResultListener_.value;
-public static final long /*int*/ sel_webView_setFrame_ = Selector.sel_webView_setFrame_.value;
-public static final long /*int*/ sel_webView_setResizable_ = Selector.sel_webView_setResizable_.value;
-public static final long /*int*/ sel_webView_setStatusBarVisible_ = Selector.sel_webView_setStatusBarVisible_.value;
-public static final long /*int*/ sel_webView_setStatusText_ = Selector.sel_webView_setStatusText_.value;
-public static final long /*int*/ sel_webView_setToolbarsVisible_ = Selector.sel_webView_setToolbarsVisible_.value;
-public static final long /*int*/ sel_webView_unableToImplementPolicyWithError_frame_ = Selector.sel_webView_unableToImplementPolicyWithError_frame_.value;
-public static final long /*int*/ sel_webView_windowScriptObjectAvailable_ = Selector.sel_webView_windowScriptObjectAvailable_.value;
-public static final long /*int*/ sel_webViewClose_ = Selector.sel_webViewClose_.value;
-public static final long /*int*/ sel_webViewFocus_ = Selector.sel_webViewFocus_.value;
-public static final long /*int*/ sel_webViewShow_ = Selector.sel_webViewShow_.value;
-public static final long /*int*/ sel_webViewUnfocus_ = Selector.sel_webViewUnfocus_.value;
-public static final long /*int*/ sel_weightOfFont_ = Selector.sel_weightOfFont_.value;
-public static final long /*int*/ sel_wheelDelta = Selector.sel_wheelDelta.value;
-public static final long /*int*/ sel_wheelDeltaX = Selector.sel_wheelDeltaX.value;
-public static final long /*int*/ sel_wheelDeltaY = Selector.sel_wheelDeltaY.value;
-public static final long /*int*/ sel_width = Selector.sel_width.value;
-public static final long /*int*/ sel_window = Selector.sel_window.value;
-public static final long /*int*/ sel_windowBackgroundColor = Selector.sel_windowBackgroundColor.value;
-public static final long /*int*/ sel_windowDidBecomeKey_ = Selector.sel_windowDidBecomeKey_.value;
-public static final long /*int*/ sel_windowDidDeminiaturize_ = Selector.sel_windowDidDeminiaturize_.value;
-public static final long /*int*/ sel_windowDidMiniaturize_ = Selector.sel_windowDidMiniaturize_.value;
-public static final long /*int*/ sel_windowDidMove_ = Selector.sel_windowDidMove_.value;
-public static final long /*int*/ sel_windowDidResignKey_ = Selector.sel_windowDidResignKey_.value;
-public static final long /*int*/ sel_windowDidResize_ = Selector.sel_windowDidResize_.value;
-public static final long /*int*/ sel_windowFrameColor = Selector.sel_windowFrameColor.value;
-public static final long /*int*/ sel_windowFrameTextColor = Selector.sel_windowFrameTextColor.value;
-public static final long /*int*/ sel_windowNumber = Selector.sel_windowNumber.value;
-public static final long /*int*/ sel_windowNumberAtPoint_belowWindowWithWindowNumber_ = Selector.sel_windowNumberAtPoint_belowWindowWithWindowNumber_.value;
-public static final long /*int*/ sel_windowRef = Selector.sel_windowRef.value;
-public static final long /*int*/ sel_windowShouldClose_ = Selector.sel_windowShouldClose_.value;
-public static final long /*int*/ sel_windowWillClose_ = Selector.sel_windowWillClose_.value;
-public static final long /*int*/ sel_windowWithWindowNumber_ = Selector.sel_windowWithWindowNumber_.value;
-public static final long /*int*/ sel_windows = Selector.sel_windows.value;
-public static final long /*int*/ sel_worksWhenModal = Selector.sel_worksWhenModal.value;
-public static final long /*int*/ sel_wraps = Selector.sel_wraps.value;
-public static final long /*int*/ sel_writeObjects_ = Selector.sel_writeObjects_.value;
-public static final long /*int*/ sel_writeSelectionToPasteboard_types_ = Selector.sel_writeSelectionToPasteboard_types_.value;
-public static final long /*int*/ sel_yearOfCommonEra = Selector.sel_yearOfCommonEra.value;
-public static final long /*int*/ sel_zoom_ = Selector.sel_zoom_.value;
+public static final long sel_CGEvent = Selector.sel_CGEvent.value;
+public static final long sel_DOMDocument = Selector.sel_DOMDocument.value;
+public static final long sel_IBeamCursor = Selector.sel_IBeamCursor.value;
+public static final long sel_PMPrintSession = Selector.sel_PMPrintSession.value;
+public static final long sel_PMPrintSettings = Selector.sel_PMPrintSettings.value;
+public static final long sel_TIFFRepresentation = Selector.sel_TIFFRepresentation.value;
+public static final long sel_URL = Selector.sel_URL.value;
+public static final long sel_URLFromPasteboard_ = Selector.sel_URLFromPasteboard_.value;
+public static final long sel_URLWithString_ = Selector.sel_URLWithString_.value;
+public static final long sel_UTF8String = Selector.sel_UTF8String.value;
+public static final long sel_abortEditing = Selector.sel_abortEditing.value;
+public static final long sel_absoluteString = Selector.sel_absoluteString.value;
+public static final long sel_acceptsFirstMouse_ = Selector.sel_acceptsFirstMouse_.value;
+public static final long sel_acceptsFirstResponder = Selector.sel_acceptsFirstResponder.value;
+public static final long sel_accessibilityActionDescription_ = Selector.sel_accessibilityActionDescription_.value;
+public static final long sel_accessibilityActionNames = Selector.sel_accessibilityActionNames.value;
+public static final long sel_accessibilityAttributeNames = Selector.sel_accessibilityAttributeNames.value;
+public static final long sel_accessibilityAttributeValue_ = Selector.sel_accessibilityAttributeValue_.value;
+public static final long sel_accessibilityAttributeValue_forParameter_ = Selector.sel_accessibilityAttributeValue_forParameter_.value;
+public static final long sel_accessibilityFocusedUIElement = Selector.sel_accessibilityFocusedUIElement.value;
+public static final long sel_accessibilityHitTest_ = Selector.sel_accessibilityHitTest_.value;
+public static final long sel_accessibilityIsAttributeSettable_ = Selector.sel_accessibilityIsAttributeSettable_.value;
+public static final long sel_accessibilityIsIgnored = Selector.sel_accessibilityIsIgnored.value;
+public static final long sel_accessibilityParameterizedAttributeNames = Selector.sel_accessibilityParameterizedAttributeNames.value;
+public static final long sel_accessibilityPerformAction_ = Selector.sel_accessibilityPerformAction_.value;
+public static final long sel_accessibilitySetOverrideValue_forAttribute_ = Selector.sel_accessibilitySetOverrideValue_forAttribute_.value;
+public static final long sel_accessibilitySetValue_forAttribute_ = Selector.sel_accessibilitySetValue_forAttribute_.value;
+public static final long sel_action = Selector.sel_action.value;
+public static final long sel_activateIgnoringOtherApps_ = Selector.sel_activateIgnoringOtherApps_.value;
+public static final long sel_addAttribute_value_range_ = Selector.sel_addAttribute_value_range_.value;
+public static final long sel_addButtonWithTitle_ = Selector.sel_addButtonWithTitle_.value;
+public static final long sel_addChildWindow_ordered_ = Selector.sel_addChildWindow_ordered_.value;
+public static final long sel_addClip = Selector.sel_addClip.value;
+public static final long sel_addEventListener_listener_useCapture_ = Selector.sel_addEventListener_listener_useCapture_.value;
+public static final long sel_addIndex_ = Selector.sel_addIndex_.value;
+public static final long sel_addItem_ = Selector.sel_addItem_.value;
+public static final long sel_addItemWithObjectValue_ = Selector.sel_addItemWithObjectValue_.value;
+public static final long sel_addItemWithTitle_action_keyEquivalent_ = Selector.sel_addItemWithTitle_action_keyEquivalent_.value;
+public static final long sel_addLayoutManager_ = Selector.sel_addLayoutManager_.value;
+public static final long sel_addObject_ = Selector.sel_addObject_.value;
+public static final long sel_addObjectsFromArray_ = Selector.sel_addObjectsFromArray_.value;
+public static final long sel_addObserver_selector_name_object_ = Selector.sel_addObserver_selector_name_object_.value;
+public static final long sel_addRepresentation_ = Selector.sel_addRepresentation_.value;
+public static final long sel_addSubview_ = Selector.sel_addSubview_.value;
+public static final long sel_addSubview_positioned_relativeTo_ = Selector.sel_addSubview_positioned_relativeTo_.value;
+public static final long sel_addTabStop_ = Selector.sel_addTabStop_.value;
+public static final long sel_addTableColumn_ = Selector.sel_addTableColumn_.value;
+public static final long sel_addTemporaryAttribute_value_forCharacterRange_ = Selector.sel_addTemporaryAttribute_value_forCharacterRange_.value;
+public static final long sel_addTextContainer_ = Selector.sel_addTextContainer_.value;
+public static final long sel_addTimer_forMode_ = Selector.sel_addTimer_forMode_.value;
+public static final long sel_addToolTipRect_owner_userData_ = Selector.sel_addToolTipRect_owner_userData_.value;
+public static final long sel_addTypes_owner_ = Selector.sel_addTypes_owner_.value;
+public static final long sel_alignment = Selector.sel_alignment.value;
+public static final long sel_allKeys = Selector.sel_allKeys.value;
+public static final long sel_allObjects = Selector.sel_allObjects.value;
+public static final long sel_alloc = Selector.sel_alloc.value;
+public static final long sel_alphaComponent = Selector.sel_alphaComponent.value;
+public static final long sel_alphaValue = Selector.sel_alphaValue.value;
+public static final long sel_altKey = Selector.sel_altKey.value;
+public static final long sel_alternateSelectedControlColor = Selector.sel_alternateSelectedControlColor.value;
+public static final long sel_alternateSelectedControlTextColor = Selector.sel_alternateSelectedControlTextColor.value;
+public static final long sel_appearanceNamed_ = Selector.sel_appearanceNamed_.value;
+public static final long sel_appendAttributedString_ = Selector.sel_appendAttributedString_.value;
+public static final long sel_appendBezierPath_ = Selector.sel_appendBezierPath_.value;
+public static final long sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_ = Selector.sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_.value;
+public static final long sel_appendBezierPathWithGlyphs_count_inFont_ = Selector.sel_appendBezierPathWithGlyphs_count_inFont_.value;
+public static final long sel_appendBezierPathWithOvalInRect_ = Selector.sel_appendBezierPathWithOvalInRect_.value;
+public static final long sel_appendBezierPathWithRect_ = Selector.sel_appendBezierPathWithRect_.value;
+public static final long sel_appendBezierPathWithRoundedRect_xRadius_yRadius_ = Selector.sel_appendBezierPathWithRoundedRect_xRadius_yRadius_.value;
+public static final long sel_appendString_ = Selector.sel_appendString_.value;
+public static final long sel_application_openFile_ = Selector.sel_application_openFile_.value;
+public static final long sel_application_openFiles_ = Selector.sel_application_openFiles_.value;
+public static final long sel_applicationDidBecomeActive_ = Selector.sel_applicationDidBecomeActive_.value;
+public static final long sel_applicationDidFinishLaunching_ = Selector.sel_applicationDidFinishLaunching_.value;
+public static final long sel_applicationDidResignActive_ = Selector.sel_applicationDidResignActive_.value;
+public static final long sel_applicationDockMenu_ = Selector.sel_applicationDockMenu_.value;
+public static final long sel_applicationIconImage = Selector.sel_applicationIconImage.value;
+public static final long sel_applicationShouldHandleReopen_hasVisibleWindows_ = Selector.sel_applicationShouldHandleReopen_hasVisibleWindows_.value;
+public static final long sel_applicationShouldTerminate_ = Selector.sel_applicationShouldTerminate_.value;
+public static final long sel_applicationWillFinishLaunching_ = Selector.sel_applicationWillFinishLaunching_.value;
+public static final long sel_archivedDataWithRootObject_ = Selector.sel_archivedDataWithRootObject_.value;
+public static final long sel_areCursorRectsEnabled = Selector.sel_areCursorRectsEnabled.value;
+public static final long sel_arrangeInFront_ = Selector.sel_arrangeInFront_.value;
+public static final long sel_array = Selector.sel_array.value;
+public static final long sel_arrayWithCapacity_ = Selector.sel_arrayWithCapacity_.value;
+public static final long sel_arrayWithObject_ = Selector.sel_arrayWithObject_.value;
+public static final long sel_arrowCursor = Selector.sel_arrowCursor.value;
+public static final long sel_ascender = Selector.sel_ascender.value;
+public static final long sel_attachColorList_ = Selector.sel_attachColorList_.value;
+public static final long sel_attachment = Selector.sel_attachment.value;
+public static final long sel_attribute_atIndex_effectiveRange_ = Selector.sel_attribute_atIndex_effectiveRange_.value;
+public static final long sel_attributedStringValue = Selector.sel_attributedStringValue.value;
+public static final long sel_attributedSubstringFromRange_ = Selector.sel_attributedSubstringFromRange_.value;
+public static final long sel_attributedTitle = Selector.sel_attributedTitle.value;
+public static final long sel_attributesAtIndex_longestEffectiveRange_inRange_ = Selector.sel_attributesAtIndex_longestEffectiveRange_inRange_.value;
+public static final long sel_autorelease = Selector.sel_autorelease.value;
+public static final long sel_availableFontFamilies = Selector.sel_availableFontFamilies.value;
+public static final long sel_availableMembersOfFontFamily_ = Selector.sel_availableMembersOfFontFamily_.value;
+public static final long sel_availableTypeFromArray_ = Selector.sel_availableTypeFromArray_.value;
+public static final long sel_backingScaleFactor = Selector.sel_backingScaleFactor.value;
+public static final long sel_badgeLabel = Selector.sel_badgeLabel.value;
+public static final long sel_baselineOffsetInLayoutManager_glyphIndex_ = Selector.sel_baselineOffsetInLayoutManager_glyphIndex_.value;
+public static final long sel_becomeFirstResponder = Selector.sel_becomeFirstResponder.value;
+public static final long sel_becomeKeyWindow = Selector.sel_becomeKeyWindow.value;
+public static final long sel_beginDocument = Selector.sel_beginDocument.value;
+public static final long sel_beginEditing = Selector.sel_beginEditing.value;
+public static final long sel_beginPageInRect_atPlacement_ = Selector.sel_beginPageInRect_atPlacement_.value;
+public static final long sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_ = Selector.sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_.value;
+public static final long sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_ = Selector.sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_.value;
+public static final long sel_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ = Selector.sel_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_.value;
+public static final long sel_beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_ = Selector.sel_beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_.value;
+public static final long sel_beginUndoGrouping = Selector.sel_beginUndoGrouping.value;
+public static final long sel_bestRepresentationForDevice_ = Selector.sel_bestRepresentationForDevice_.value;
+public static final long sel_bezelStyle = Selector.sel_bezelStyle.value;
+public static final long sel_bezierPath = Selector.sel_bezierPath.value;
+public static final long sel_bezierPathByFlatteningPath = Selector.sel_bezierPathByFlatteningPath.value;
+public static final long sel_bezierPathWithRect_ = Selector.sel_bezierPathWithRect_.value;
+public static final long sel_bezierPathWithRoundedRect_xRadius_yRadius_ = Selector.sel_bezierPathWithRoundedRect_xRadius_yRadius_.value;
+public static final long sel_bitmapData = Selector.sel_bitmapData.value;
+public static final long sel_bitmapFormat = Selector.sel_bitmapFormat.value;
+public static final long sel_bitmapImageRepForCachingDisplayInRect_ = Selector.sel_bitmapImageRepForCachingDisplayInRect_.value;
+public static final long sel_bitsPerPixel = Selector.sel_bitsPerPixel.value;
+public static final long sel_bitsPerSample = Selector.sel_bitsPerSample.value;
+public static final long sel_blackColor = Selector.sel_blackColor.value;
+public static final long sel_blueComponent = Selector.sel_blueComponent.value;
+public static final long sel_boldSystemFontOfSize_ = Selector.sel_boldSystemFontOfSize_.value;
+public static final long sel_boolValue = Selector.sel_boolValue.value;
+public static final long sel_borderWidth = Selector.sel_borderWidth.value;
+public static final long sel_boundingRectForGlyphRange_inTextContainer_ = Selector.sel_boundingRectForGlyphRange_inTextContainer_.value;
+public static final long sel_boundingRectWithSize_options_ = Selector.sel_boundingRectWithSize_options_.value;
+public static final long sel_bounds = Selector.sel_bounds.value;
+public static final long sel_bundleIdentifier = Selector.sel_bundleIdentifier.value;
+public static final long sel_bundlePath = Selector.sel_bundlePath.value;
+public static final long sel_bundleWithIdentifier_ = Selector.sel_bundleWithIdentifier_.value;
+public static final long sel_bundleWithPath_ = Selector.sel_bundleWithPath_.value;
+public static final long sel_button = Selector.sel_button.value;
+public static final long sel_buttonNumber = Selector.sel_buttonNumber.value;
+public static final long sel_bytes = Selector.sel_bytes.value;
+public static final long sel_bytesPerRow = Selector.sel_bytesPerRow.value;
+public static final long sel_cacheDisplayInRect_toBitmapImageRep_ = Selector.sel_cacheDisplayInRect_toBitmapImageRep_.value;
+public static final long sel_calendarDate = Selector.sel_calendarDate.value;
+public static final long sel_canBecomeKeyView = Selector.sel_canBecomeKeyView.value;
+public static final long sel_canBecomeKeyWindow = Selector.sel_canBecomeKeyWindow.value;
+public static final long sel_canDragRowsWithIndexes_atPoint_ = Selector.sel_canDragRowsWithIndexes_atPoint_.value;
+public static final long sel_canGoBack = Selector.sel_canGoBack.value;
+public static final long sel_canGoForward = Selector.sel_canGoForward.value;
+public static final long sel_canRedo = Selector.sel_canRedo.value;
+public static final long sel_canShowMIMEType_ = Selector.sel_canShowMIMEType_.value;
+public static final long sel_canUndo = Selector.sel_canUndo.value;
+public static final long sel_cancel = Selector.sel_cancel.value;
+public static final long sel_cancelAuthenticationChallenge_ = Selector.sel_cancelAuthenticationChallenge_.value;
+public static final long sel_cancelButtonCell = Selector.sel_cancelButtonCell.value;
+public static final long sel_cancelButtonRectForBounds_ = Selector.sel_cancelButtonRectForBounds_.value;
+public static final long sel_cancelOperation_ = Selector.sel_cancelOperation_.value;
+public static final long sel_cancelTracking = Selector.sel_cancelTracking.value;
+public static final long sel_cascadeTopLeftFromPoint_ = Selector.sel_cascadeTopLeftFromPoint_.value;
+public static final long sel_cell = Selector.sel_cell.value;
+public static final long sel_cellClass = Selector.sel_cellClass.value;
+public static final long sel_cellSize = Selector.sel_cellSize.value;
+public static final long sel_cellSizeForBounds_ = Selector.sel_cellSizeForBounds_.value;
+public static final long sel_changeColor_ = Selector.sel_changeColor_.value;
+public static final long sel_changeFont_ = Selector.sel_changeFont_.value;
+public static final long sel_charCode = Selector.sel_charCode.value;
+public static final long sel_characterAtIndex_ = Selector.sel_characterAtIndex_.value;
+public static final long sel_characterIndexForGlyphAtIndex_ = Selector.sel_characterIndexForGlyphAtIndex_.value;
+public static final long sel_characterIndexForInsertionAtPoint_ = Selector.sel_characterIndexForInsertionAtPoint_.value;
+public static final long sel_characterIndexForPoint_ = Selector.sel_characterIndexForPoint_.value;
+public static final long sel_characters = Selector.sel_characters.value;
+public static final long sel_charactersIgnoringModifiers = Selector.sel_charactersIgnoringModifiers.value;
+public static final long sel_chooseFilename_ = Selector.sel_chooseFilename_.value;
+public static final long sel_className = Selector.sel_className.value;
+public static final long sel_cleanUpOperation = Selector.sel_cleanUpOperation.value;
+public static final long sel_clearColor = Selector.sel_clearColor.value;
+public static final long sel_clearDrawable = Selector.sel_clearDrawable.value;
+public static final long sel_clickCount = Selector.sel_clickCount.value;
+public static final long sel_clickedColumn = Selector.sel_clickedColumn.value;
+public static final long sel_clickedRow = Selector.sel_clickedRow.value;
+public static final long sel_close = Selector.sel_close.value;
+public static final long sel_closePath = Selector.sel_closePath.value;
+public static final long sel_code = Selector.sel_code.value;
+public static final long sel_collapseItem_ = Selector.sel_collapseItem_.value;
+public static final long sel_collapseItem_collapseChildren_ = Selector.sel_collapseItem_collapseChildren_.value;
+public static final long sel_collectionBehavior = Selector.sel_collectionBehavior.value;
+public static final long sel_color = Selector.sel_color.value;
+public static final long sel_colorAtX_y_ = Selector.sel_colorAtX_y_.value;
+public static final long sel_colorListNamed_ = Selector.sel_colorListNamed_.value;
+public static final long sel_colorSpace = Selector.sel_colorSpace.value;
+public static final long sel_colorSpaceModel = Selector.sel_colorSpaceModel.value;
+public static final long sel_colorUsingColorSpaceName_ = Selector.sel_colorUsingColorSpaceName_.value;
+public static final long sel_colorWithDeviceRed_green_blue_alpha_ = Selector.sel_colorWithDeviceRed_green_blue_alpha_.value;
+public static final long sel_colorWithKey_ = Selector.sel_colorWithKey_.value;
+public static final long sel_colorWithPatternImage_ = Selector.sel_colorWithPatternImage_.value;
+public static final long sel_columnAtPoint_ = Selector.sel_columnAtPoint_.value;
+public static final long sel_comboBoxSelectionDidChange_ = Selector.sel_comboBoxSelectionDidChange_.value;
+public static final long sel_comboBoxWillDismiss_ = Selector.sel_comboBoxWillDismiss_.value;
+public static final long sel_comboBoxWillPopUp_ = Selector.sel_comboBoxWillPopUp_.value;
+public static final long sel_compare_ = Selector.sel_compare_.value;
+public static final long sel_concat = Selector.sel_concat.value;
+public static final long sel_conformsToProtocol_ = Selector.sel_conformsToProtocol_.value;
+public static final long sel_containsIndex_ = Selector.sel_containsIndex_.value;
+public static final long sel_containsObject_ = Selector.sel_containsObject_.value;
+public static final long sel_containsPoint_ = Selector.sel_containsPoint_.value;
+public static final long sel_contentRect = Selector.sel_contentRect.value;
+public static final long sel_contentSize = Selector.sel_contentSize.value;
+public static final long sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_ = Selector.sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_.value;
+public static final long sel_contentView = Selector.sel_contentView.value;
+public static final long sel_contentViewMargins = Selector.sel_contentViewMargins.value;
+public static final long sel_context = Selector.sel_context.value;
+public static final long sel_controlBackgroundColor = Selector.sel_controlBackgroundColor.value;
+public static final long sel_controlDarkShadowColor = Selector.sel_controlDarkShadowColor.value;
+public static final long sel_controlHighlightColor = Selector.sel_controlHighlightColor.value;
+public static final long sel_controlLightHighlightColor = Selector.sel_controlLightHighlightColor.value;
+public static final long sel_controlPointBounds = Selector.sel_controlPointBounds.value;
+public static final long sel_controlShadowColor = Selector.sel_controlShadowColor.value;
+public static final long sel_controlSize = Selector.sel_controlSize.value;
+public static final long sel_controlTextColor = Selector.sel_controlTextColor.value;
+public static final long sel_convertBaseToScreen_ = Selector.sel_convertBaseToScreen_.value;
+public static final long sel_convertFont_toHaveTrait_ = Selector.sel_convertFont_toHaveTrait_.value;
+public static final long sel_convertPoint_fromView_ = Selector.sel_convertPoint_fromView_.value;
+public static final long sel_convertPoint_toView_ = Selector.sel_convertPoint_toView_.value;
+public static final long sel_convertRect_fromView_ = Selector.sel_convertRect_fromView_.value;
+public static final long sel_convertRect_toView_ = Selector.sel_convertRect_toView_.value;
+public static final long sel_convertScreenToBase_ = Selector.sel_convertScreenToBase_.value;
+public static final long sel_cookies = Selector.sel_cookies.value;
+public static final long sel_cookiesForURL_ = Selector.sel_cookiesForURL_.value;
+public static final long sel_cookiesWithResponseHeaderFields_forURL_ = Selector.sel_cookiesWithResponseHeaderFields_forURL_.value;
+public static final long sel_copiesOnScroll = Selector.sel_copiesOnScroll.value;
+public static final long sel_copy = Selector.sel_copy.value;
+public static final long sel_copy_ = Selector.sel_copy_.value;
+public static final long sel_count = Selector.sel_count.value;
+public static final long sel_createContext = Selector.sel_createContext.value;
+public static final long sel_credentialWithUser_password_persistence_ = Selector.sel_credentialWithUser_password_persistence_.value;
+public static final long sel_crosshairCursor = Selector.sel_crosshairCursor.value;
+public static final long sel_ctrlKey = Selector.sel_ctrlKey.value;
+public static final long sel_currentAppearance = Selector.sel_currentAppearance.value;
+public static final long sel_currentContext = Selector.sel_currentContext.value;
+public static final long sel_currentCursor = Selector.sel_currentCursor.value;
+public static final long sel_currentEditor = Selector.sel_currentEditor.value;
+public static final long sel_currentEvent = Selector.sel_currentEvent.value;
+public static final long sel_currentInputManager = Selector.sel_currentInputManager.value;
+public static final long sel_currentPoint = Selector.sel_currentPoint.value;
+public static final long sel_currentRunLoop = Selector.sel_currentRunLoop.value;
+public static final long sel_currentThread = Selector.sel_currentThread.value;
+public static final long sel_cursorUpdate_ = Selector.sel_cursorUpdate_.value;
+public static final long sel_curveToPoint_controlPoint1_controlPoint2_ = Selector.sel_curveToPoint_controlPoint1_controlPoint2_.value;
+public static final long sel_cut_ = Selector.sel_cut_.value;
+public static final long sel_dataCell = Selector.sel_dataCell.value;
+public static final long sel_dataForType_ = Selector.sel_dataForType_.value;
+public static final long sel_dataSource = Selector.sel_dataSource.value;
+public static final long sel_dataWithBytes_length_ = Selector.sel_dataWithBytes_length_.value;
+public static final long sel_dateValue = Selector.sel_dateValue.value;
+public static final long sel_dateWithCalendarFormat_timeZone_ = Selector.sel_dateWithCalendarFormat_timeZone_.value;
+public static final long sel_dateWithTimeIntervalSinceNow_ = Selector.sel_dateWithTimeIntervalSinceNow_.value;
+public static final long sel_dateWithYear_month_day_hour_minute_second_timeZone_ = Selector.sel_dateWithYear_month_day_hour_minute_second_timeZone_.value;
+public static final long sel_dayOfMonth = Selector.sel_dayOfMonth.value;
+public static final long sel_dealloc = Selector.sel_dealloc.value;
+public static final long sel_decimalSeparator = Selector.sel_decimalSeparator.value;
+public static final long sel_declareTypes_owner_ = Selector.sel_declareTypes_owner_.value;
+public static final long sel_defaultBaselineOffsetForFont_ = Selector.sel_defaultBaselineOffsetForFont_.value;
+public static final long sel_defaultButtonCell = Selector.sel_defaultButtonCell.value;
+public static final long sel_defaultCenter = Selector.sel_defaultCenter.value;
+public static final long sel_defaultFlatness = Selector.sel_defaultFlatness.value;
+public static final long sel_defaultLineHeightForFont_ = Selector.sel_defaultLineHeightForFont_.value;
+public static final long sel_defaultManager = Selector.sel_defaultManager.value;
+public static final long sel_defaultParagraphStyle = Selector.sel_defaultParagraphStyle.value;
+public static final long sel_defaultPrinter = Selector.sel_defaultPrinter.value;
+public static final long sel_defaultTimeZone = Selector.sel_defaultTimeZone.value;
+public static final long sel_delegate = Selector.sel_delegate.value;
+public static final long sel_deleteCookie_ = Selector.sel_deleteCookie_.value;
+public static final long sel_deliverResult = Selector.sel_deliverResult.value;
+public static final long sel_deltaX = Selector.sel_deltaX.value;
+public static final long sel_deltaY = Selector.sel_deltaY.value;
+public static final long sel_deminiaturize_ = Selector.sel_deminiaturize_.value;
+public static final long sel_depth = Selector.sel_depth.value;
+public static final long sel_descender = Selector.sel_descender.value;
+public static final long sel_description = Selector.sel_description.value;
+public static final long sel_deselectAll_ = Selector.sel_deselectAll_.value;
+public static final long sel_deselectItemAtIndex_ = Selector.sel_deselectItemAtIndex_.value;
+public static final long sel_deselectRow_ = Selector.sel_deselectRow_.value;
+public static final long sel_destroyContext = Selector.sel_destroyContext.value;
+public static final long sel_detail = Selector.sel_detail.value;
+public static final long sel_device = Selector.sel_device.value;
+public static final long sel_deviceDescription = Selector.sel_deviceDescription.value;
+public static final long sel_deviceSize = Selector.sel_deviceSize.value;
+public static final long sel_dictionary = Selector.sel_dictionary.value;
+public static final long sel_dictionaryWithCapacity_ = Selector.sel_dictionaryWithCapacity_.value;
+public static final long sel_dictionaryWithObject_forKey_ = Selector.sel_dictionaryWithObject_forKey_.value;
+public static final long sel_disableCursorRects = Selector.sel_disableCursorRects.value;
+public static final long sel_disableFlushWindow = Selector.sel_disableFlushWindow.value;
+public static final long sel_disabledControlTextColor = Selector.sel_disabledControlTextColor.value;
+public static final long sel_discardCursorRects = Selector.sel_discardCursorRects.value;
+public static final long sel_display = Selector.sel_display.value;
+public static final long sel_displayIfNeeded = Selector.sel_displayIfNeeded.value;
+public static final long sel_displayName = Selector.sel_displayName.value;
+public static final long sel_displayNameForKey_value_ = Selector.sel_displayNameForKey_value_.value;
+public static final long sel_displayRectIgnoringOpacity_inContext_ = Selector.sel_displayRectIgnoringOpacity_inContext_.value;
+public static final long sel_distantFuture = Selector.sel_distantFuture.value;
+public static final long sel_doCommandBySelector_ = Selector.sel_doCommandBySelector_.value;
+public static final long sel_dockTile = Selector.sel_dockTile.value;
+public static final long sel_documentSource = Selector.sel_documentSource.value;
+public static final long sel_documentView = Selector.sel_documentView.value;
+public static final long sel_documentViewShouldHandlePrint = Selector.sel_documentViewShouldHandlePrint.value;
+public static final long sel_documentVisibleRect = Selector.sel_documentVisibleRect.value;
+public static final long sel_doubleClickInterval = Selector.sel_doubleClickInterval.value;
+public static final long sel_doubleValue = Selector.sel_doubleValue.value;
+public static final long sel_download = Selector.sel_download.value;
+public static final long sel_download_decideDestinationWithSuggestedFilename_ = Selector.sel_download_decideDestinationWithSuggestedFilename_.value;
+public static final long sel_dragImage_at_offset_event_pasteboard_source_slideBack_ = Selector.sel_dragImage_at_offset_event_pasteboard_source_slideBack_.value;
+public static final long sel_dragImageForRowsWithIndexes_tableColumns_event_offset_ = Selector.sel_dragImageForRowsWithIndexes_tableColumns_event_offset_.value;
+public static final long sel_dragSelectionWithEvent_offset_slideBack_ = Selector.sel_dragSelectionWithEvent_offset_slideBack_.value;
+public static final long sel_draggedImage_beganAt_ = Selector.sel_draggedImage_beganAt_.value;
+public static final long sel_draggedImage_endedAt_operation_ = Selector.sel_draggedImage_endedAt_operation_.value;
+public static final long sel_draggingDestinationWindow = Selector.sel_draggingDestinationWindow.value;
+public static final long sel_draggingEntered_ = Selector.sel_draggingEntered_.value;
+public static final long sel_draggingExited_ = Selector.sel_draggingExited_.value;
+public static final long sel_draggingLocation = Selector.sel_draggingLocation.value;
+public static final long sel_draggingPasteboard = Selector.sel_draggingPasteboard.value;
+public static final long sel_draggingSourceOperationMask = Selector.sel_draggingSourceOperationMask.value;
+public static final long sel_draggingSourceOperationMaskForLocal_ = Selector.sel_draggingSourceOperationMaskForLocal_.value;
+public static final long sel_draggingUpdated_ = Selector.sel_draggingUpdated_.value;
+public static final long sel_drawBackgroundForGlyphRange_atPoint_ = Selector.sel_drawBackgroundForGlyphRange_atPoint_.value;
+public static final long sel_drawBackgroundInClipRect_ = Selector.sel_drawBackgroundInClipRect_.value;
+public static final long sel_drawBezelWithFrame_inView_ = Selector.sel_drawBezelWithFrame_inView_.value;
+public static final long sel_drawFromPoint_toPoint_options_ = Selector.sel_drawFromPoint_toPoint_options_.value;
+public static final long sel_drawGlyphsForGlyphRange_atPoint_ = Selector.sel_drawGlyphsForGlyphRange_atPoint_.value;
+public static final long sel_drawImage_withFrame_inView_ = Selector.sel_drawImage_withFrame_inView_.value;
+public static final long sel_drawInBezierPath_angle_ = Selector.sel_drawInBezierPath_angle_.value;
+public static final long sel_drawInRect_ = Selector.sel_drawInRect_.value;
+public static final long sel_drawInRect_angle_ = Selector.sel_drawInRect_angle_.value;
+public static final long sel_drawInRect_fromRect_operation_fraction_ = Selector.sel_drawInRect_fromRect_operation_fraction_.value;
+public static final long sel_drawInteriorWithFrame_inView_ = Selector.sel_drawInteriorWithFrame_inView_.value;
+public static final long sel_drawLabel_inRect_ = Selector.sel_drawLabel_inRect_.value;
+public static final long sel_drawRect_ = Selector.sel_drawRect_.value;
+public static final long sel_drawSortIndicatorWithFrame_inView_ascending_priority_ = Selector.sel_drawSortIndicatorWithFrame_inView_ascending_priority_.value;
+public static final long sel_drawStatusBarBackgroundInRect_withHighlight_ = Selector.sel_drawStatusBarBackgroundInRect_withHighlight_.value;
+public static final long sel_drawTitle_withFrame_inView_ = Selector.sel_drawTitle_withFrame_inView_.value;
+public static final long sel_drawViewBackgroundInRect_ = Selector.sel_drawViewBackgroundInRect_.value;
+public static final long sel_drawWithExpansionFrame_inView_ = Selector.sel_drawWithExpansionFrame_inView_.value;
+public static final long sel_drawingRectForBounds_ = Selector.sel_drawingRectForBounds_.value;
+public static final long sel_elementAtIndex_associatedPoints_ = Selector.sel_elementAtIndex_associatedPoints_.value;
+public static final long sel_elementCount = Selector.sel_elementCount.value;
+public static final long sel_enableCursorRects = Selector.sel_enableCursorRects.value;
+public static final long sel_enableFlushWindow = Selector.sel_enableFlushWindow.value;
+public static final long sel_endDocument = Selector.sel_endDocument.value;
+public static final long sel_endEditing = Selector.sel_endEditing.value;
+public static final long sel_endEditingFor_ = Selector.sel_endEditingFor_.value;
+public static final long sel_endPage = Selector.sel_endPage.value;
+public static final long sel_endSheet_returnCode_ = Selector.sel_endSheet_returnCode_.value;
+public static final long sel_endUndoGrouping = Selector.sel_endUndoGrouping.value;
+public static final long sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_ = Selector.sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_.value;
+public static final long sel_enumeratorAtPath_ = Selector.sel_enumeratorAtPath_.value;
+public static final long sel_expandItem_ = Selector.sel_expandItem_.value;
+public static final long sel_expandItem_expandChildren_ = Selector.sel_expandItem_expandChildren_.value;
+public static final long sel_expansionFrameWithFrame_inView_ = Selector.sel_expansionFrameWithFrame_inView_.value;
+public static final long sel_familyName = Selector.sel_familyName.value;
+public static final long sel_fieldEditor_forObject_ = Selector.sel_fieldEditor_forObject_.value;
+public static final long sel_fileExistsAtPath_ = Selector.sel_fileExistsAtPath_.value;
+public static final long sel_fileExistsAtPath_isDirectory_ = Selector.sel_fileExistsAtPath_isDirectory_.value;
+public static final long sel_fileURLWithPath_ = Selector.sel_fileURLWithPath_.value;
+public static final long sel_filename = Selector.sel_filename.value;
+public static final long sel_filenames = Selector.sel_filenames.value;
+public static final long sel_fill = Selector.sel_fill.value;
+public static final long sel_fillRect_ = Selector.sel_fillRect_.value;
+public static final long sel_finishLaunching = Selector.sel_finishLaunching.value;
+public static final long sel_firstRectForCharacterRange_ = Selector.sel_firstRectForCharacterRange_.value;
+public static final long sel_firstResponder = Selector.sel_firstResponder.value;
+public static final long sel_flagsChanged_ = Selector.sel_flagsChanged_.value;
+public static final long sel_flashScrollers = Selector.sel_flashScrollers.value;
+public static final long sel_floatValue = Selector.sel_floatValue.value;
+public static final long sel_flushBuffer = Selector.sel_flushBuffer.value;
+public static final long sel_flushGraphics = Selector.sel_flushGraphics.value;
+public static final long sel_flushWindowIfNeeded = Selector.sel_flushWindowIfNeeded.value;
+public static final long sel_focusRingMaskBoundsForFrame_inView_ = Selector.sel_focusRingMaskBoundsForFrame_inView_.value;
+public static final long sel_font = Selector.sel_font.value;
+public static final long sel_fontName = Selector.sel_fontName.value;
+public static final long sel_fontWithName_size_ = Selector.sel_fontWithName_size_.value;
+public static final long sel_frame = Selector.sel_frame.value;
+public static final long sel_frameOfCellAtColumn_row_ = Selector.sel_frameOfCellAtColumn_row_.value;
+public static final long sel_frameOfOutlineCellAtRow_ = Selector.sel_frameOfOutlineCellAtRow_.value;
+public static final long sel_frameRectForContentRect_ = Selector.sel_frameRectForContentRect_.value;
+public static final long sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_ = Selector.sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_.value;
+public static final long sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_ = Selector.sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_.value;
+public static final long sel_fullPathForApplication_ = Selector.sel_fullPathForApplication_.value;
+public static final long sel_generalPasteboard = Selector.sel_generalPasteboard.value;
+public static final long sel_getBytes_ = Selector.sel_getBytes_.value;
+public static final long sel_getCharacters_ = Selector.sel_getCharacters_.value;
+public static final long sel_getCharacters_range_ = Selector.sel_getCharacters_range_.value;
+public static final long sel_getComponents_ = Selector.sel_getComponents_.value;
+public static final long sel_getGlyphs_range_ = Selector.sel_getGlyphs_range_.value;
+public static final long sel_getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_ = Selector.sel_getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_.value;
+public static final long sel_getIndexes_maxCount_inIndexRange_ = Selector.sel_getIndexes_maxCount_inIndexRange_.value;
+public static final long sel_getValues_forAttribute_forVirtualScreen_ = Selector.sel_getValues_forAttribute_forVirtualScreen_.value;
+public static final long sel_globalContext = Selector.sel_globalContext.value;
+public static final long sel_glyphIndexForCharacterAtIndex_ = Selector.sel_glyphIndexForCharacterAtIndex_.value;
+public static final long sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_ = Selector.sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_.value;
+public static final long sel_glyphRangeForCharacterRange_actualCharacterRange_ = Selector.sel_glyphRangeForCharacterRange_actualCharacterRange_.value;
+public static final long sel_glyphRangeForTextContainer_ = Selector.sel_glyphRangeForTextContainer_.value;
+public static final long sel_goBack = Selector.sel_goBack.value;
+public static final long sel_goForward = Selector.sel_goForward.value;
+public static final long sel_graphicsContext = Selector.sel_graphicsContext.value;
+public static final long sel_graphicsContextWithBitmapImageRep_ = Selector.sel_graphicsContextWithBitmapImageRep_.value;
+public static final long sel_graphicsContextWithGraphicsPort_flipped_ = Selector.sel_graphicsContextWithGraphicsPort_flipped_.value;
+public static final long sel_graphicsContextWithWindow_ = Selector.sel_graphicsContextWithWindow_.value;
+public static final long sel_graphicsPort = Selector.sel_graphicsPort.value;
+public static final long sel_greenComponent = Selector.sel_greenComponent.value;
+public static final long sel_handleEvent_ = Selector.sel_handleEvent_.value;
+public static final long sel_handleMouseEvent_ = Selector.sel_handleMouseEvent_.value;
+public static final long sel_hasAlpha = Selector.sel_hasAlpha.value;
+public static final long sel_hasMarkedText = Selector.sel_hasMarkedText.value;
+public static final long sel_hasPassword = Selector.sel_hasPassword.value;
+public static final long sel_hasShadow = Selector.sel_hasShadow.value;
+public static final long sel_headerCell = Selector.sel_headerCell.value;
+public static final long sel_headerRectOfColumn_ = Selector.sel_headerRectOfColumn_.value;
+public static final long sel_headerView = Selector.sel_headerView.value;
+public static final long sel_helpRequested_ = Selector.sel_helpRequested_.value;
+public static final long sel_hide_ = Selector.sel_hide_.value;
+public static final long sel_hideOtherApplications_ = Selector.sel_hideOtherApplications_.value;
+public static final long sel_highlightSelectionInClipRect_ = Selector.sel_highlightSelectionInClipRect_.value;
+public static final long sel_hitPart = Selector.sel_hitPart.value;
+public static final long sel_hitTest_ = Selector.sel_hitTest_.value;
+public static final long sel_hitTestForEvent_inRect_ofView_ = Selector.sel_hitTestForEvent_inRect_ofView_.value;
+public static final long sel_host = Selector.sel_host.value;
+public static final long sel_hourOfDay = Selector.sel_hourOfDay.value;
+public static final long sel_iconForFile_ = Selector.sel_iconForFile_.value;
+public static final long sel_ignore = Selector.sel_ignore.value;
+public static final long sel_ignoreModifierKeysWhileDragging = Selector.sel_ignoreModifierKeysWhileDragging.value;
+public static final long sel_image = Selector.sel_image.value;
+public static final long sel_imageInterpolation = Selector.sel_imageInterpolation.value;
+public static final long sel_imageNamed_ = Selector.sel_imageNamed_.value;
+public static final long sel_imageRectForBounds_ = Selector.sel_imageRectForBounds_.value;
+public static final long sel_imageRepWithContentsOfFile_ = Selector.sel_imageRepWithContentsOfFile_.value;
+public static final long sel_imageablePageBounds = Selector.sel_imageablePageBounds.value;
+public static final long sel_increment = Selector.sel_increment.value;
+public static final long sel_indentationPerLevel = Selector.sel_indentationPerLevel.value;
+public static final long sel_indexOfItemWithTarget_andAction_ = Selector.sel_indexOfItemWithTarget_andAction_.value;
+public static final long sel_indexOfObjectIdenticalTo_ = Selector.sel_indexOfObjectIdenticalTo_.value;
+public static final long sel_indexOfSelectedItem = Selector.sel_indexOfSelectedItem.value;
+public static final long sel_infoDictionary = Selector.sel_infoDictionary.value;
+public static final long sel_init = Selector.sel_init.value;
+public static final long sel_initByReferencingFile_ = Selector.sel_initByReferencingFile_.value;
+public static final long sel_initListDescriptor = Selector.sel_initListDescriptor.value;
+public static final long sel_initWithAttributes_ = Selector.sel_initWithAttributes_.value;
+public static final long sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_ = Selector.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_.value;
+public static final long sel_initWithCapacity_ = Selector.sel_initWithCapacity_.value;
+public static final long sel_initWithCharacters_length_ = Selector.sel_initWithCharacters_length_.value;
+public static final long sel_initWithColors_ = Selector.sel_initWithColors_.value;
+public static final long sel_initWithContainerSize_ = Selector.sel_initWithContainerSize_.value;
+public static final long sel_initWithContentRect_styleMask_backing_defer_ = Selector.sel_initWithContentRect_styleMask_backing_defer_.value;
+public static final long sel_initWithContentRect_styleMask_backing_defer_screen_ = Selector.sel_initWithContentRect_styleMask_backing_defer_screen_.value;
+public static final long sel_initWithContentsOfFile_ = Selector.sel_initWithContentsOfFile_.value;
+public static final long sel_initWithData_ = Selector.sel_initWithData_.value;
+public static final long sel_initWithFileWrapper_ = Selector.sel_initWithFileWrapper_.value;
+public static final long sel_initWithFormat_shareContext_ = Selector.sel_initWithFormat_shareContext_.value;
+public static final long sel_initWithFrame_ = Selector.sel_initWithFrame_.value;
+public static final long sel_initWithFrame_frameName_groupName_ = Selector.sel_initWithFrame_frameName_groupName_.value;
+public static final long sel_initWithFrame_pullsDown_ = Selector.sel_initWithFrame_pullsDown_.value;
+public static final long sel_initWithIconRef_ = Selector.sel_initWithIconRef_.value;
+public static final long sel_initWithIdentifier_ = Selector.sel_initWithIdentifier_.value;
+public static final long sel_initWithImage_hotSpot_ = Selector.sel_initWithImage_hotSpot_.value;
+public static final long sel_initWithIndex_ = Selector.sel_initWithIndex_.value;
+public static final long sel_initWithIndexesInRange_ = Selector.sel_initWithIndexesInRange_.value;
+public static final long sel_initWithItemIdentifier_ = Selector.sel_initWithItemIdentifier_.value;
+public static final long sel_initWithLocaleIdentifier_ = Selector.sel_initWithLocaleIdentifier_.value;
+public static final long sel_initWithName_ = Selector.sel_initWithName_.value;
+public static final long sel_initWithSize_ = Selector.sel_initWithSize_.value;
+public static final long sel_initWithStartingColor_endingColor_ = Selector.sel_initWithStartingColor_endingColor_.value;
+public static final long sel_initWithString_ = Selector.sel_initWithString_.value;
+public static final long sel_initWithString_attributes_ = Selector.sel_initWithString_attributes_.value;
+public static final long sel_initWithTitle_ = Selector.sel_initWithTitle_.value;
+public static final long sel_initWithTitle_action_keyEquivalent_ = Selector.sel_initWithTitle_action_keyEquivalent_.value;
+public static final long sel_initWithTransform_ = Selector.sel_initWithTransform_.value;
+public static final long sel_initWithType_location_ = Selector.sel_initWithType_location_.value;
+public static final long sel_insertColor_key_atIndex_ = Selector.sel_insertColor_key_atIndex_.value;
+public static final long sel_insertItem_atIndex_ = Selector.sel_insertItem_atIndex_.value;
+public static final long sel_insertItemWithItemIdentifier_atIndex_ = Selector.sel_insertItemWithItemIdentifier_atIndex_.value;
+public static final long sel_insertItemWithObjectValue_atIndex_ = Selector.sel_insertItemWithObjectValue_atIndex_.value;
+public static final long sel_insertObject_atIndex_ = Selector.sel_insertObject_atIndex_.value;
+public static final long sel_insertTabViewItem_atIndex_ = Selector.sel_insertTabViewItem_atIndex_.value;
+public static final long sel_insertText_ = Selector.sel_insertText_.value;
+public static final long sel_insertText_replacementRange_ = Selector.sel_insertText_replacementRange_.value;
+public static final long sel_intValue = Selector.sel_intValue.value;
+public static final long sel_integerValue = Selector.sel_integerValue.value;
+public static final long sel_intercellSpacing = Selector.sel_intercellSpacing.value;
+public static final long sel_interpretKeyEvents_ = Selector.sel_interpretKeyEvents_.value;
+public static final long sel_invalidate = Selector.sel_invalidate.value;
+public static final long sel_invalidateShadow = Selector.sel_invalidateShadow.value;
+public static final long sel_invert = Selector.sel_invert.value;
+public static final long sel_isActive = Selector.sel_isActive.value;
+public static final long sel_isCompatibleWithOverlayScrollers = Selector.sel_isCompatibleWithOverlayScrollers.value;
+public static final long sel_isDescendantOf_ = Selector.sel_isDescendantOf_.value;
+public static final long sel_isDocumentEdited = Selector.sel_isDocumentEdited.value;
+public static final long sel_isDrawingToScreen = Selector.sel_isDrawingToScreen.value;
+public static final long sel_isEmpty = Selector.sel_isEmpty.value;
+public static final long sel_isEnabled = Selector.sel_isEnabled.value;
+public static final long sel_isEqual_ = Selector.sel_isEqual_.value;
+public static final long sel_isEqualToString_ = Selector.sel_isEqualToString_.value;
+public static final long sel_isExecutableFileAtPath_ = Selector.sel_isExecutableFileAtPath_.value;
+public static final long sel_isFieldEditor = Selector.sel_isFieldEditor.value;
+public static final long sel_isFilePackageAtPath_ = Selector.sel_isFilePackageAtPath_.value;
+public static final long sel_isFileURL = Selector.sel_isFileURL.value;
+public static final long sel_isFlipped = Selector.sel_isFlipped.value;
+public static final long sel_isHidden = Selector.sel_isHidden.value;
+public static final long sel_isHiddenOrHasHiddenAncestor = Selector.sel_isHiddenOrHasHiddenAncestor.value;
+public static final long sel_isHighlighted = Selector.sel_isHighlighted.value;
+public static final long sel_isItemExpanded_ = Selector.sel_isItemExpanded_.value;
+public static final long sel_isKeyWindow = Selector.sel_isKeyWindow.value;
+public static final long sel_isKindOfClass_ = Selector.sel_isKindOfClass_.value;
+public static final long sel_isMainThread = Selector.sel_isMainThread.value;
+public static final long sel_isMainWindow = Selector.sel_isMainWindow.value;
+public static final long sel_isMiniaturized = Selector.sel_isMiniaturized.value;
+public static final long sel_isOpaque = Selector.sel_isOpaque.value;
+public static final long sel_isPlanar = Selector.sel_isPlanar.value;
+public static final long sel_isResting = Selector.sel_isResting.value;
+public static final long sel_isRowSelected_ = Selector.sel_isRowSelected_.value;
+public static final long sel_isRunning = Selector.sel_isRunning.value;
+public static final long sel_isSelectionOnly = Selector.sel_isSelectionOnly.value;
+public static final long sel_isSeparatorItem = Selector.sel_isSeparatorItem.value;
+public static final long sel_isSessionOnly = Selector.sel_isSessionOnly.value;
+public static final long sel_isSheet = Selector.sel_isSheet.value;
+public static final long sel_isVisible = Selector.sel_isVisible.value;
+public static final long sel_isZoomed = Selector.sel_isZoomed.value;
+public static final long sel_itemArray = Selector.sel_itemArray.value;
+public static final long sel_itemAtIndex_ = Selector.sel_itemAtIndex_.value;
+public static final long sel_itemAtRow_ = Selector.sel_itemAtRow_.value;
+public static final long sel_itemHeight = Selector.sel_itemHeight.value;
+public static final long sel_itemIdentifier = Selector.sel_itemIdentifier.value;
+public static final long sel_itemObjectValueAtIndex_ = Selector.sel_itemObjectValueAtIndex_.value;
+public static final long sel_itemTitleAtIndex_ = Selector.sel_itemTitleAtIndex_.value;
+public static final long sel_itemWithTag_ = Selector.sel_itemWithTag_.value;
+public static final long sel_jobDisposition = Selector.sel_jobDisposition.value;
+public static final long sel_keyCode = Selector.sel_keyCode.value;
+public static final long sel_keyDown_ = Selector.sel_keyDown_.value;
+public static final long sel_keyEquivalent = Selector.sel_keyEquivalent.value;
+public static final long sel_keyEquivalentModifierMask = Selector.sel_keyEquivalentModifierMask.value;
+public static final long sel_keyUp_ = Selector.sel_keyUp_.value;
+public static final long sel_keyWindow = Selector.sel_keyWindow.value;
+public static final long sel_knobProportion = Selector.sel_knobProportion.value;
+public static final long sel_knobThickness = Selector.sel_knobThickness.value;
+public static final long sel_lastPathComponent = Selector.sel_lastPathComponent.value;
+public static final long sel_layer = Selector.sel_layer.value;
+public static final long sel_layoutManager = Selector.sel_layoutManager.value;
+public static final long sel_leading = Selector.sel_leading.value;
+public static final long sel_length = Selector.sel_length.value;
+public static final long sel_levelForItem_ = Selector.sel_levelForItem_.value;
+public static final long sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_ = Selector.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_.value;
+public static final long sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_ = Selector.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_.value;
+public static final long sel_lineToPoint_ = Selector.sel_lineToPoint_.value;
+public static final long sel_linkTextAttributes = Selector.sel_linkTextAttributes.value;
+public static final long sel_loadHTMLString_baseURL_ = Selector.sel_loadHTMLString_baseURL_.value;
+public static final long sel_loadNibFile_externalNameTable_withZone_ = Selector.sel_loadNibFile_externalNameTable_withZone_.value;
+public static final long sel_loadRequest_ = Selector.sel_loadRequest_.value;
+public static final long sel_localizedDescription = Selector.sel_localizedDescription.value;
+public static final long sel_locationForGlyphAtIndex_ = Selector.sel_locationForGlyphAtIndex_.value;
+public static final long sel_locationInWindow = Selector.sel_locationInWindow.value;
+public static final long sel_lockFocus = Selector.sel_lockFocus.value;
+public static final long sel_lockFocusIfCanDraw = Selector.sel_lockFocusIfCanDraw.value;
+public static final long sel_lowercaseString = Selector.sel_lowercaseString.value;
+public static final long sel_magnification = Selector.sel_magnification.value;
+public static final long sel_magnifyWithEvent_ = Selector.sel_magnifyWithEvent_.value;
+public static final long sel_mainBundle = Selector.sel_mainBundle.value;
+public static final long sel_mainFrame = Selector.sel_mainFrame.value;
+public static final long sel_mainMenu = Selector.sel_mainMenu.value;
+public static final long sel_mainScreen = Selector.sel_mainScreen.value;
+public static final long sel_makeCurrentContext = Selector.sel_makeCurrentContext.value;
+public static final long sel_makeFirstResponder_ = Selector.sel_makeFirstResponder_.value;
+public static final long sel_makeKeyAndOrderFront_ = Selector.sel_makeKeyAndOrderFront_.value;
+public static final long sel_markedRange = Selector.sel_markedRange.value;
+public static final long sel_markedTextAttributes = Selector.sel_markedTextAttributes.value;
+public static final long sel_maxSize = Selector.sel_maxSize.value;
+public static final long sel_maxValue = Selector.sel_maxValue.value;
+public static final long sel_menu = Selector.sel_menu.value;
+public static final long sel_menu_willHighlightItem_ = Selector.sel_menu_willHighlightItem_.value;
+public static final long sel_menuBarFontOfSize_ = Selector.sel_menuBarFontOfSize_.value;
+public static final long sel_menuDidClose_ = Selector.sel_menuDidClose_.value;
+public static final long sel_menuForEvent_ = Selector.sel_menuForEvent_.value;
+public static final long sel_menuNeedsUpdate_ = Selector.sel_menuNeedsUpdate_.value;
+public static final long sel_menuWillOpen_ = Selector.sel_menuWillOpen_.value;
+public static final long sel_metaKey = Selector.sel_metaKey.value;
+public static final long sel_minFrameWidthWithTitle_styleMask_ = Selector.sel_minFrameWidthWithTitle_styleMask_.value;
+public static final long sel_minSize = Selector.sel_minSize.value;
+public static final long sel_minValue = Selector.sel_minValue.value;
+public static final long sel_miniaturize_ = Selector.sel_miniaturize_.value;
+public static final long sel_minimumSize = Selector.sel_minimumSize.value;
+public static final long sel_minuteOfHour = Selector.sel_minuteOfHour.value;
+public static final long sel_modifierFlags = Selector.sel_modifierFlags.value;
+public static final long sel_monthOfYear = Selector.sel_monthOfYear.value;
+public static final long sel_mouse_inRect_ = Selector.sel_mouse_inRect_.value;
+public static final long sel_mouseDown_ = Selector.sel_mouseDown_.value;
+public static final long sel_mouseDownCanMoveWindow = Selector.sel_mouseDownCanMoveWindow.value;
+public static final long sel_mouseDragged_ = Selector.sel_mouseDragged_.value;
+public static final long sel_mouseEntered_ = Selector.sel_mouseEntered_.value;
+public static final long sel_mouseExited_ = Selector.sel_mouseExited_.value;
+public static final long sel_mouseLocation = Selector.sel_mouseLocation.value;
+public static final long sel_mouseLocationOutsideOfEventStream = Selector.sel_mouseLocationOutsideOfEventStream.value;
+public static final long sel_mouseMoved_ = Selector.sel_mouseMoved_.value;
+public static final long sel_mouseUp_ = Selector.sel_mouseUp_.value;
+public static final long sel_moveColumn_toColumn_ = Selector.sel_moveColumn_toColumn_.value;
+public static final long sel_moveToPoint_ = Selector.sel_moveToPoint_.value;
+public static final long sel_mutableCopy = Selector.sel_mutableCopy.value;
+public static final long sel_name = Selector.sel_name.value;
+public static final long sel_nameFieldStringValue = Selector.sel_nameFieldStringValue.value;
+public static final long sel_needsPanelToBecomeKey = Selector.sel_needsPanelToBecomeKey.value;
+public static final long sel_nextEventMatchingMask_untilDate_inMode_dequeue_ = Selector.sel_nextEventMatchingMask_untilDate_inMode_dequeue_.value;
+public static final long sel_nextObject = Selector.sel_nextObject.value;
+public static final long sel_nextState = Selector.sel_nextState.value;
+public static final long sel_nextWordFromIndex_forward_ = Selector.sel_nextWordFromIndex_forward_.value;
+public static final long sel_noResponderFor_ = Selector.sel_noResponderFor_.value;
+public static final long sel_normalizedPosition = Selector.sel_normalizedPosition.value;
+public static final long sel_noteNumberOfRowsChanged = Selector.sel_noteNumberOfRowsChanged.value;
+public static final long sel_numberOfColumns = Selector.sel_numberOfColumns.value;
+public static final long sel_numberOfComponents = Selector.sel_numberOfComponents.value;
+public static final long sel_numberOfGlyphs = Selector.sel_numberOfGlyphs.value;
+public static final long sel_numberOfItems = Selector.sel_numberOfItems.value;
+public static final long sel_numberOfRows = Selector.sel_numberOfRows.value;
+public static final long sel_numberOfRowsInTableView_ = Selector.sel_numberOfRowsInTableView_.value;
+public static final long sel_numberOfSelectedRows = Selector.sel_numberOfSelectedRows.value;
+public static final long sel_numberOfVisibleItems = Selector.sel_numberOfVisibleItems.value;
+public static final long sel_numberWithBool_ = Selector.sel_numberWithBool_.value;
+public static final long sel_numberWithDouble_ = Selector.sel_numberWithDouble_.value;
+public static final long sel_numberWithInt_ = Selector.sel_numberWithInt_.value;
+public static final long sel_numberWithInteger_ = Selector.sel_numberWithInteger_.value;
+public static final long sel_objCType = Selector.sel_objCType.value;
+public static final long sel_object = Selector.sel_object.value;
+public static final long sel_objectAtIndex_ = Selector.sel_objectAtIndex_.value;
+public static final long sel_objectEnumerator = Selector.sel_objectEnumerator.value;
+public static final long sel_objectForInfoDictionaryKey_ = Selector.sel_objectForInfoDictionaryKey_.value;
+public static final long sel_objectForKey_ = Selector.sel_objectForKey_.value;
+public static final long sel_objectValues = Selector.sel_objectValues.value;
+public static final long sel_openPanel = Selector.sel_openPanel.value;
+public static final long sel_openURL_ = Selector.sel_openURL_.value;
+public static final long sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_ = Selector.sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_.value;
+public static final long sel_operatingSystemVersion = Selector.sel_operatingSystemVersion.value;
+public static final long sel_operationNotAllowedCursor = Selector.sel_operationNotAllowedCursor.value;
+public static final long sel_options = Selector.sel_options.value;
+public static final long sel_orderBack_ = Selector.sel_orderBack_.value;
+public static final long sel_orderFront_ = Selector.sel_orderFront_.value;
+public static final long sel_orderFrontRegardless = Selector.sel_orderFrontRegardless.value;
+public static final long sel_orderFrontStandardAboutPanel_ = Selector.sel_orderFrontStandardAboutPanel_.value;
+public static final long sel_orderOut_ = Selector.sel_orderOut_.value;
+public static final long sel_orderWindow_relativeTo_ = Selector.sel_orderWindow_relativeTo_.value;
+public static final long sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_ = Selector.sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_.value;
+public static final long sel_otherMouseDown_ = Selector.sel_otherMouseDown_.value;
+public static final long sel_otherMouseDragged_ = Selector.sel_otherMouseDragged_.value;
+public static final long sel_otherMouseUp_ = Selector.sel_otherMouseUp_.value;
+public static final long sel_outlineView_acceptDrop_item_childIndex_ = Selector.sel_outlineView_acceptDrop_item_childIndex_.value;
+public static final long sel_outlineView_child_ofItem_ = Selector.sel_outlineView_child_ofItem_.value;
+public static final long sel_outlineView_didClickTableColumn_ = Selector.sel_outlineView_didClickTableColumn_.value;
+public static final long sel_outlineView_isItemExpandable_ = Selector.sel_outlineView_isItemExpandable_.value;
+public static final long sel_outlineView_numberOfChildrenOfItem_ = Selector.sel_outlineView_numberOfChildrenOfItem_.value;
+public static final long sel_outlineView_objectValueForTableColumn_byItem_ = Selector.sel_outlineView_objectValueForTableColumn_byItem_.value;
+public static final long sel_outlineView_setObjectValue_forTableColumn_byItem_ = Selector.sel_outlineView_setObjectValue_forTableColumn_byItem_.value;
+public static final long sel_outlineView_shouldEditTableColumn_item_ = Selector.sel_outlineView_shouldEditTableColumn_item_.value;
+public static final long sel_outlineView_shouldExpandItem_ = Selector.sel_outlineView_shouldExpandItem_.value;
+public static final long sel_outlineView_shouldReorderColumn_toColumn_ = Selector.sel_outlineView_shouldReorderColumn_toColumn_.value;
+public static final long sel_outlineView_shouldTrackCell_forTableColumn_item_ = Selector.sel_outlineView_shouldTrackCell_forTableColumn_item_.value;
+public static final long sel_outlineView_validateDrop_proposedItem_proposedChildIndex_ = Selector.sel_outlineView_validateDrop_proposedItem_proposedChildIndex_.value;
+public static final long sel_outlineView_willDisplayCell_forTableColumn_item_ = Selector.sel_outlineView_willDisplayCell_forTableColumn_item_.value;
+public static final long sel_outlineView_writeItems_toPasteboard_ = Selector.sel_outlineView_writeItems_toPasteboard_.value;
+public static final long sel_outlineViewColumnDidMove_ = Selector.sel_outlineViewColumnDidMove_.value;
+public static final long sel_outlineViewColumnDidResize_ = Selector.sel_outlineViewColumnDidResize_.value;
+public static final long sel_outlineViewSelectionDidChange_ = Selector.sel_outlineViewSelectionDidChange_.value;
+public static final long sel_outlineViewSelectionIsChanging_ = Selector.sel_outlineViewSelectionIsChanging_.value;
+public static final long sel_owner = Selector.sel_owner.value;
+public static final long sel_pageDown_ = Selector.sel_pageDown_.value;
+public static final long sel_pageTitle = Selector.sel_pageTitle.value;
+public static final long sel_pageUp_ = Selector.sel_pageUp_.value;
+public static final long sel_panel_shouldEnableURL_ = Selector.sel_panel_shouldEnableURL_.value;
+public static final long sel_panel_userEnteredFilename_confirmed_ = Selector.sel_panel_userEnteredFilename_confirmed_.value;
+public static final long sel_panelConvertFont_ = Selector.sel_panelConvertFont_.value;
+public static final long sel_paperSize = Selector.sel_paperSize.value;
+public static final long sel_paragraphs = Selector.sel_paragraphs.value;
+public static final long sel_parentWindow = Selector.sel_parentWindow.value;
+public static final long sel_password = Selector.sel_password.value;
+public static final long sel_paste_ = Selector.sel_paste_.value;
+public static final long sel_pasteboard_provideDataForType_ = Selector.sel_pasteboard_provideDataForType_.value;
+public static final long sel_pasteboardWithName_ = Selector.sel_pasteboardWithName_.value;
+public static final long sel_path = Selector.sel_path.value;
+public static final long sel_pathExtension = Selector.sel_pathExtension.value;
+public static final long sel_pathForResource_ofType_ = Selector.sel_pathForResource_ofType_.value;
+public static final long sel_pathForResource_ofType_inDirectory_forLocalization_ = Selector.sel_pathForResource_ofType_inDirectory_forLocalization_.value;
+public static final long sel_performDragOperation_ = Selector.sel_performDragOperation_.value;
+public static final long sel_performKeyEquivalent_ = Selector.sel_performKeyEquivalent_.value;
+public static final long sel_performSelector_withObject_afterDelay_inModes_ = Selector.sel_performSelector_withObject_afterDelay_inModes_.value;
+public static final long sel_performSelectorOnMainThread_withObject_waitUntilDone_ = Selector.sel_performSelectorOnMainThread_withObject_waitUntilDone_.value;
+public static final long sel_phase = Selector.sel_phase.value;
+public static final long sel_pixelsHigh = Selector.sel_pixelsHigh.value;
+public static final long sel_pixelsWide = Selector.sel_pixelsWide.value;
+public static final long sel_pointSize = Selector.sel_pointSize.value;
+public static final long sel_pointValue = Selector.sel_pointValue.value;
+public static final long sel_pointingHandCursor = Selector.sel_pointingHandCursor.value;
+public static final long sel_pop = Selector.sel_pop.value;
+public static final long sel_popUpContextMenu_withEvent_forView_ = Selector.sel_popUpContextMenu_withEvent_forView_.value;
+public static final long sel_popUpStatusItemMenu_ = Selector.sel_popUpStatusItemMenu_.value;
+public static final long sel_port = Selector.sel_port.value;
+public static final long sel_postEvent_atStart_ = Selector.sel_postEvent_atStart_.value;
+public static final long sel_preparedCellAtColumn_row_ = Selector.sel_preparedCellAtColumn_row_.value;
+public static final long sel_prependTransform_ = Selector.sel_prependTransform_.value;
+public static final long sel_pressedMouseButtons = Selector.sel_pressedMouseButtons.value;
+public static final long sel_preventDefault = Selector.sel_preventDefault.value;
+public static final long sel_previousFailureCount = Selector.sel_previousFailureCount.value;
+public static final long sel_printDocumentView = Selector.sel_printDocumentView.value;
+public static final long sel_printOperationWithPrintInfo_ = Selector.sel_printOperationWithPrintInfo_.value;
+public static final long sel_printOperationWithView_printInfo_ = Selector.sel_printOperationWithView_printInfo_.value;
+public static final long sel_printPanel = Selector.sel_printPanel.value;
+public static final long sel_printer = Selector.sel_printer.value;
+public static final long sel_printerNames = Selector.sel_printerNames.value;
+public static final long sel_printerWithName_ = Selector.sel_printerWithName_.value;
+public static final long sel_processInfo = Selector.sel_processInfo.value;
+public static final long sel_propertyListForType_ = Selector.sel_propertyListForType_.value;
+public static final long sel_proposedCredential = Selector.sel_proposedCredential.value;
+public static final long sel_protectionSpace = Selector.sel_protectionSpace.value;
+public static final long sel_push = Selector.sel_push.value;
+public static final long sel_rangeValue = Selector.sel_rangeValue.value;
+public static final long sel_readSelectionFromPasteboard_ = Selector.sel_readSelectionFromPasteboard_.value;
+public static final long sel_realm = Selector.sel_realm.value;
+public static final long sel_recentSearches = Selector.sel_recentSearches.value;
+public static final long sel_rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_ = Selector.sel_rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_.value;
+public static final long sel_rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_ = Selector.sel_rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_.value;
+public static final long sel_rectForPart_ = Selector.sel_rectForPart_.value;
+public static final long sel_rectOfColumn_ = Selector.sel_rectOfColumn_.value;
+public static final long sel_rectOfRow_ = Selector.sel_rectOfRow_.value;
+public static final long sel_rectValue = Selector.sel_rectValue.value;
+public static final long sel_redComponent = Selector.sel_redComponent.value;
+public static final long sel_redo = Selector.sel_redo.value;
+public static final long sel_reflectScrolledClipView_ = Selector.sel_reflectScrolledClipView_.value;
+public static final long sel_registerDefaults_ = Selector.sel_registerDefaults_.value;
+public static final long sel_registerForDraggedTypes_ = Selector.sel_registerForDraggedTypes_.value;
+public static final long sel_release = Selector.sel_release.value;
+public static final long sel_reload_ = Selector.sel_reload_.value;
+public static final long sel_reloadData = Selector.sel_reloadData.value;
+public static final long sel_reloadItem_reloadChildren_ = Selector.sel_reloadItem_reloadChildren_.value;
+public static final long sel_removeAllItems = Selector.sel_removeAllItems.value;
+public static final long sel_removeAllPoints = Selector.sel_removeAllPoints.value;
+public static final long sel_removeAttribute_range_ = Selector.sel_removeAttribute_range_.value;
+public static final long sel_removeChildWindow_ = Selector.sel_removeChildWindow_.value;
+public static final long sel_removeColorWithKey_ = Selector.sel_removeColorWithKey_.value;
+public static final long sel_removeFromSuperview = Selector.sel_removeFromSuperview.value;
+public static final long sel_removeItem_ = Selector.sel_removeItem_.value;
+public static final long sel_removeItemAtIndex_ = Selector.sel_removeItemAtIndex_.value;
+public static final long sel_removeLastObject = Selector.sel_removeLastObject.value;
+public static final long sel_removeObject_ = Selector.sel_removeObject_.value;
+public static final long sel_removeObjectAtIndex_ = Selector.sel_removeObjectAtIndex_.value;
+public static final long sel_removeObjectForKey_ = Selector.sel_removeObjectForKey_.value;
+public static final long sel_removeObjectIdenticalTo_ = Selector.sel_removeObjectIdenticalTo_.value;
+public static final long sel_removeObserver_ = Selector.sel_removeObserver_.value;
+public static final long sel_removeRepresentation_ = Selector.sel_removeRepresentation_.value;
+public static final long sel_removeStatusItem_ = Selector.sel_removeStatusItem_.value;
+public static final long sel_removeTabViewItem_ = Selector.sel_removeTabViewItem_.value;
+public static final long sel_removeTableColumn_ = Selector.sel_removeTableColumn_.value;
+public static final long sel_removeTemporaryAttribute_forCharacterRange_ = Selector.sel_removeTemporaryAttribute_forCharacterRange_.value;
+public static final long sel_removeToolTip_ = Selector.sel_removeToolTip_.value;
+public static final long sel_removeTrackingArea_ = Selector.sel_removeTrackingArea_.value;
+public static final long sel_replaceCharactersInRange_withString_ = Selector.sel_replaceCharactersInRange_withString_.value;
+public static final long sel_replyToOpenOrPrint_ = Selector.sel_replyToOpenOrPrint_.value;
+public static final long sel_representation = Selector.sel_representation.value;
+public static final long sel_representations = Selector.sel_representations.value;
+public static final long sel_request = Selector.sel_request.value;
+public static final long sel_requestWithURL_ = Selector.sel_requestWithURL_.value;
+public static final long sel_resetCursorRects = Selector.sel_resetCursorRects.value;
+public static final long sel_resignFirstResponder = Selector.sel_resignFirstResponder.value;
+public static final long sel_resizeDownCursor = Selector.sel_resizeDownCursor.value;
+public static final long sel_resizeLeftCursor = Selector.sel_resizeLeftCursor.value;
+public static final long sel_resizeLeftRightCursor = Selector.sel_resizeLeftRightCursor.value;
+public static final long sel_resizeRightCursor = Selector.sel_resizeRightCursor.value;
+public static final long sel_resizeUpCursor = Selector.sel_resizeUpCursor.value;
+public static final long sel_resizeUpDownCursor = Selector.sel_resizeUpDownCursor.value;
+public static final long sel_resizingMask = Selector.sel_resizingMask.value;
+public static final long sel_respondsToSelector_ = Selector.sel_respondsToSelector_.value;
+public static final long sel_restoreGraphicsState = Selector.sel_restoreGraphicsState.value;
+public static final long sel_retain = Selector.sel_retain.value;
+public static final long sel_retainCount = Selector.sel_retainCount.value;
+public static final long sel_rightMouseDown_ = Selector.sel_rightMouseDown_.value;
+public static final long sel_rightMouseDragged_ = Selector.sel_rightMouseDragged_.value;
+public static final long sel_rightMouseUp_ = Selector.sel_rightMouseUp_.value;
+public static final long sel_rotateByDegrees_ = Selector.sel_rotateByDegrees_.value;
+public static final long sel_rotateWithEvent_ = Selector.sel_rotateWithEvent_.value;
+public static final long sel_rotation = Selector.sel_rotation.value;
+public static final long sel_rowAtPoint_ = Selector.sel_rowAtPoint_.value;
+public static final long sel_rowForItem_ = Selector.sel_rowForItem_.value;
+public static final long sel_rowHeight = Selector.sel_rowHeight.value;
+public static final long sel_runModal = Selector.sel_runModal.value;
+public static final long sel_runModalForDirectory_file_ = Selector.sel_runModalForDirectory_file_.value;
+public static final long sel_runModalForWindow_ = Selector.sel_runModalForWindow_.value;
+public static final long sel_runModalWithPrintInfo_ = Selector.sel_runModalWithPrintInfo_.value;
+public static final long sel_runMode_beforeDate_ = Selector.sel_runMode_beforeDate_.value;
+public static final long sel_runOperation = Selector.sel_runOperation.value;
+public static final long sel_samplesPerPixel = Selector.sel_samplesPerPixel.value;
+public static final long sel_saveGraphicsState = Selector.sel_saveGraphicsState.value;
+public static final long sel_savePanel = Selector.sel_savePanel.value;
+public static final long sel_scaleXBy_yBy_ = Selector.sel_scaleXBy_yBy_.value;
+public static final long sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ = Selector.sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_.value;
+public static final long sel_screen = Selector.sel_screen.value;
+public static final long sel_screenX = Selector.sel_screenX.value;
+public static final long sel_screenY = Selector.sel_screenY.value;
+public static final long sel_screens = Selector.sel_screens.value;
+public static final long sel_scrollClipView_toPoint_ = Selector.sel_scrollClipView_toPoint_.value;
+public static final long sel_scrollColumnToVisible_ = Selector.sel_scrollColumnToVisible_.value;
+public static final long sel_scrollPoint_ = Selector.sel_scrollPoint_.value;
+public static final long sel_scrollRangeToVisible_ = Selector.sel_scrollRangeToVisible_.value;
+public static final long sel_scrollRect_by_ = Selector.sel_scrollRect_by_.value;
+public static final long sel_scrollRowToVisible_ = Selector.sel_scrollRowToVisible_.value;
+public static final long sel_scrollWheel_ = Selector.sel_scrollWheel_.value;
+public static final long sel_scrollerStyle = Selector.sel_scrollerStyle.value;
+public static final long sel_scrollerWidthForControlSize_ = Selector.sel_scrollerWidthForControlSize_.value;
+public static final long sel_searchButtonCell = Selector.sel_searchButtonCell.value;
+public static final long sel_searchButtonRectForBounds_ = Selector.sel_searchButtonRectForBounds_.value;
+public static final long sel_searchTextRectForBounds_ = Selector.sel_searchTextRectForBounds_.value;
+public static final long sel_secondOfMinute = Selector.sel_secondOfMinute.value;
+public static final long sel_secondarySelectedControlColor = Selector.sel_secondarySelectedControlColor.value;
+public static final long sel_selectAll_ = Selector.sel_selectAll_.value;
+public static final long sel_selectItem_ = Selector.sel_selectItem_.value;
+public static final long sel_selectItemAtIndex_ = Selector.sel_selectItemAtIndex_.value;
+public static final long sel_selectRowIndexes_byExtendingSelection_ = Selector.sel_selectRowIndexes_byExtendingSelection_.value;
+public static final long sel_selectTabViewItemAtIndex_ = Selector.sel_selectTabViewItemAtIndex_.value;
+public static final long sel_selectText_ = Selector.sel_selectText_.value;
+public static final long sel_selectedControlColor = Selector.sel_selectedControlColor.value;
+public static final long sel_selectedControlTextColor = Selector.sel_selectedControlTextColor.value;
+public static final long sel_selectedRange = Selector.sel_selectedRange.value;
+public static final long sel_selectedRow = Selector.sel_selectedRow.value;
+public static final long sel_selectedRowIndexes = Selector.sel_selectedRowIndexes.value;
+public static final long sel_selectedTabViewItem = Selector.sel_selectedTabViewItem.value;
+public static final long sel_selectedTextAttributes = Selector.sel_selectedTextAttributes.value;
+public static final long sel_selectedTextBackgroundColor = Selector.sel_selectedTextBackgroundColor.value;
+public static final long sel_selectedTextColor = Selector.sel_selectedTextColor.value;
+public static final long sel_sendAction_to_ = Selector.sel_sendAction_to_.value;
+public static final long sel_sendAction_to_from_ = Selector.sel_sendAction_to_from_.value;
+public static final long sel_sendEvent_ = Selector.sel_sendEvent_.value;
+public static final long sel_sender = Selector.sel_sender.value;
+public static final long sel_separatorItem = Selector.sel_separatorItem.value;
+public static final long sel_set = Selector.sel_set.value;
+public static final long sel_setAcceptsMouseMovedEvents_ = Selector.sel_setAcceptsMouseMovedEvents_.value;
+public static final long sel_setAcceptsTouchEvents_ = Selector.sel_setAcceptsTouchEvents_.value;
+public static final long sel_setAccessoryView_ = Selector.sel_setAccessoryView_.value;
+public static final long sel_setAccessoryViewDisclosed_ = Selector.sel_setAccessoryViewDisclosed_.value;
+public static final long sel_setAction_ = Selector.sel_setAction_.value;
+public static final long sel_setActivationPolicy_ = Selector.sel_setActivationPolicy_.value;
+public static final long sel_setAlertStyle_ = Selector.sel_setAlertStyle_.value;
+public static final long sel_setAlignment_ = Selector.sel_setAlignment_.value;
+public static final long sel_setAllowedFileTypes_ = Selector.sel_setAllowedFileTypes_.value;
+public static final long sel_setAllowsColumnReordering_ = Selector.sel_setAllowsColumnReordering_.value;
+public static final long sel_setAllowsFloats_ = Selector.sel_setAllowsFloats_.value;
+public static final long sel_setAllowsMixedState_ = Selector.sel_setAllowsMixedState_.value;
+public static final long sel_setAllowsMultipleSelection_ = Selector.sel_setAllowsMultipleSelection_.value;
+public static final long sel_setAllowsOtherFileTypes_ = Selector.sel_setAllowsOtherFileTypes_.value;
+public static final long sel_setAllowsUndo_ = Selector.sel_setAllowsUndo_.value;
+public static final long sel_setAllowsUserCustomization_ = Selector.sel_setAllowsUserCustomization_.value;
+public static final long sel_setAlpha_ = Selector.sel_setAlpha_.value;
+public static final long sel_setAlphaValue_ = Selector.sel_setAlphaValue_.value;
+public static final long sel_setAlternateButtonTitle_ = Selector.sel_setAlternateButtonTitle_.value;
+public static final long sel_setAppearance_ = Selector.sel_setAppearance_.value;
+public static final long sel_setApplicationIconImage_ = Selector.sel_setApplicationIconImage_.value;
+public static final long sel_setApplicationNameForUserAgent_ = Selector.sel_setApplicationNameForUserAgent_.value;
+public static final long sel_setAttachmentCell_ = Selector.sel_setAttachmentCell_.value;
+public static final long sel_setAttributedString_ = Selector.sel_setAttributedString_.value;
+public static final long sel_setAttributedStringValue_ = Selector.sel_setAttributedStringValue_.value;
+public static final long sel_setAttributedTitle_ = Selector.sel_setAttributedTitle_.value;
+public static final long sel_setAutoenablesItems_ = Selector.sel_setAutoenablesItems_.value;
+public static final long sel_setAutohidesScrollers_ = Selector.sel_setAutohidesScrollers_.value;
+public static final long sel_setAutoresizesOutlineColumn_ = Selector.sel_setAutoresizesOutlineColumn_.value;
+public static final long sel_setAutoresizesSubviews_ = Selector.sel_setAutoresizesSubviews_.value;
+public static final long sel_setAutoresizingMask_ = Selector.sel_setAutoresizingMask_.value;
+public static final long sel_setAutosaveExpandedItems_ = Selector.sel_setAutosaveExpandedItems_.value;
+public static final long sel_setBackgroundColor_ = Selector.sel_setBackgroundColor_.value;
+public static final long sel_setBackgroundLayoutEnabled_ = Selector.sel_setBackgroundLayoutEnabled_.value;
+public static final long sel_setBackgroundStyle_ = Selector.sel_setBackgroundStyle_.value;
+public static final long sel_setBadgeLabel_ = Selector.sel_setBadgeLabel_.value;
+public static final long sel_setBaseWritingDirection_ = Selector.sel_setBaseWritingDirection_.value;
+public static final long sel_setBecomesKeyOnlyIfNeeded_ = Selector.sel_setBecomesKeyOnlyIfNeeded_.value;
+public static final long sel_setBezelStyle_ = Selector.sel_setBezelStyle_.value;
+public static final long sel_setBezeled_ = Selector.sel_setBezeled_.value;
+public static final long sel_setBorderType_ = Selector.sel_setBorderType_.value;
+public static final long sel_setBorderWidth_ = Selector.sel_setBorderWidth_.value;
+public static final long sel_setBordered_ = Selector.sel_setBordered_.value;
+public static final long sel_setBoundsRotation_ = Selector.sel_setBoundsRotation_.value;
+public static final long sel_setBoundsSize_ = Selector.sel_setBoundsSize_.value;
+public static final long sel_setBoxType_ = Selector.sel_setBoxType_.value;
+public static final long sel_setButtonType_ = Selector.sel_setButtonType_.value;
+public static final long sel_setCacheMode_ = Selector.sel_setCacheMode_.value;
+public static final long sel_setCachePolicy_ = Selector.sel_setCachePolicy_.value;
+public static final long sel_setCanChooseDirectories_ = Selector.sel_setCanChooseDirectories_.value;
+public static final long sel_setCanChooseFiles_ = Selector.sel_setCanChooseFiles_.value;
+public static final long sel_setCanCreateDirectories_ = Selector.sel_setCanCreateDirectories_.value;
+public static final long sel_setCancelButtonCell_ = Selector.sel_setCancelButtonCell_.value;
+public static final long sel_setCell_ = Selector.sel_setCell_.value;
+public static final long sel_setCellClass_ = Selector.sel_setCellClass_.value;
+public static final long sel_setClip = Selector.sel_setClip.value;
+public static final long sel_setCollectionBehavior_ = Selector.sel_setCollectionBehavior_.value;
+public static final long sel_setColor_ = Selector.sel_setColor_.value;
+public static final long sel_setColumnAutoresizingStyle_ = Selector.sel_setColumnAutoresizingStyle_.value;
+public static final long sel_setCompositingOperation_ = Selector.sel_setCompositingOperation_.value;
+public static final long sel_setContainerSize_ = Selector.sel_setContainerSize_.value;
+public static final long sel_setContentView_ = Selector.sel_setContentView_.value;
+public static final long sel_setContentViewMargins_ = Selector.sel_setContentViewMargins_.value;
+public static final long sel_setControlSize_ = Selector.sel_setControlSize_.value;
+public static final long sel_setCookie_ = Selector.sel_setCookie_.value;
+public static final long sel_setCopiesOnScroll_ = Selector.sel_setCopiesOnScroll_.value;
+public static final long sel_setCurrentContext_ = Selector.sel_setCurrentContext_.value;
+public static final long sel_setCurrentOperation_ = Selector.sel_setCurrentOperation_.value;
+public static final long sel_setCustomUserAgent_ = Selector.sel_setCustomUserAgent_.value;
+public static final long sel_setData_forType_ = Selector.sel_setData_forType_.value;
+public static final long sel_setDataCell_ = Selector.sel_setDataCell_.value;
+public static final long sel_setDataSource_ = Selector.sel_setDataSource_.value;
+public static final long sel_setDatePickerElements_ = Selector.sel_setDatePickerElements_.value;
+public static final long sel_setDatePickerStyle_ = Selector.sel_setDatePickerStyle_.value;
+public static final long sel_setDateValue_ = Selector.sel_setDateValue_.value;
+public static final long sel_setDefaultButtonCell_ = Selector.sel_setDefaultButtonCell_.value;
+public static final long sel_setDefaultFlatness_ = Selector.sel_setDefaultFlatness_.value;
+public static final long sel_setDefaultParagraphStyle_ = Selector.sel_setDefaultParagraphStyle_.value;
+public static final long sel_setDefaultTabInterval_ = Selector.sel_setDefaultTabInterval_.value;
+public static final long sel_setDelegate_ = Selector.sel_setDelegate_.value;
+public static final long sel_setDestination_allowOverwrite_ = Selector.sel_setDestination_allowOverwrite_.value;
+public static final long sel_setDictionary_ = Selector.sel_setDictionary_.value;
+public static final long sel_setDirectory_ = Selector.sel_setDirectory_.value;
+public static final long sel_setDirectoryURL_ = Selector.sel_setDirectoryURL_.value;
+public static final long sel_setDisplayMode_ = Selector.sel_setDisplayMode_.value;
+public static final long sel_setDisplaysLinkToolTips_ = Selector.sel_setDisplaysLinkToolTips_.value;
+public static final long sel_setDocumentCursor_ = Selector.sel_setDocumentCursor_.value;
+public static final long sel_setDocumentEdited_ = Selector.sel_setDocumentEdited_.value;
+public static final long sel_setDocumentView_ = Selector.sel_setDocumentView_.value;
+public static final long sel_setDoubleAction_ = Selector.sel_setDoubleAction_.value;
+public static final long sel_setDoubleValue_ = Selector.sel_setDoubleValue_.value;
+public static final long sel_setDownloadDelegate_ = Selector.sel_setDownloadDelegate_.value;
+public static final long sel_setDrawsBackground_ = Selector.sel_setDrawsBackground_.value;
+public static final long sel_setDropItem_dropChildIndex_ = Selector.sel_setDropItem_dropChildIndex_.value;
+public static final long sel_setDropRow_dropOperation_ = Selector.sel_setDropRow_dropOperation_.value;
+public static final long sel_setEditable_ = Selector.sel_setEditable_.value;
+public static final long sel_setEnabled_ = Selector.sel_setEnabled_.value;
+public static final long sel_setFill = Selector.sel_setFill.value;
+public static final long sel_setFillColor_ = Selector.sel_setFillColor_.value;
+public static final long sel_setFireDate_ = Selector.sel_setFireDate_.value;
+public static final long sel_setFirstLineHeadIndent_ = Selector.sel_setFirstLineHeadIndent_.value;
+public static final long sel_setFloatingPanel_ = Selector.sel_setFloatingPanel_.value;
+public static final long sel_setFocusRingType_ = Selector.sel_setFocusRingType_.value;
+public static final long sel_setFont_ = Selector.sel_setFont_.value;
+public static final long sel_setFormatter_ = Selector.sel_setFormatter_.value;
+public static final long sel_setFrame_ = Selector.sel_setFrame_.value;
+public static final long sel_setFrame_display_ = Selector.sel_setFrame_display_.value;
+public static final long sel_setFrame_display_animate_ = Selector.sel_setFrame_display_animate_.value;
+public static final long sel_setFrameFromContentFrame_ = Selector.sel_setFrameFromContentFrame_.value;
+public static final long sel_setFrameLoadDelegate_ = Selector.sel_setFrameLoadDelegate_.value;
+public static final long sel_setFrameOrigin_ = Selector.sel_setFrameOrigin_.value;
+public static final long sel_setFrameSize_ = Selector.sel_setFrameSize_.value;
+public static final long sel_setGridStyleMask_ = Selector.sel_setGridStyleMask_.value;
+public static final long sel_setHTTPBody_ = Selector.sel_setHTTPBody_.value;
+public static final long sel_setHTTPMethod_ = Selector.sel_setHTTPMethod_.value;
+public static final long sel_setHasHorizontalScroller_ = Selector.sel_setHasHorizontalScroller_.value;
+public static final long sel_setHasShadow_ = Selector.sel_setHasShadow_.value;
+public static final long sel_setHasVerticalScroller_ = Selector.sel_setHasVerticalScroller_.value;
+public static final long sel_setHeadIndent_ = Selector.sel_setHeadIndent_.value;
+public static final long sel_setHeaderCell_ = Selector.sel_setHeaderCell_.value;
+public static final long sel_setHeaderView_ = Selector.sel_setHeaderView_.value;
+public static final long sel_setHelpMenu_ = Selector.sel_setHelpMenu_.value;
+public static final long sel_setHidden_ = Selector.sel_setHidden_.value;
+public static final long sel_setHiddenUntilMouseMoves_ = Selector.sel_setHiddenUntilMouseMoves_.value;
+public static final long sel_setHidesOnDeactivate_ = Selector.sel_setHidesOnDeactivate_.value;
+public static final long sel_setHighlightMode_ = Selector.sel_setHighlightMode_.value;
+public static final long sel_setHighlighted_ = Selector.sel_setHighlighted_.value;
+public static final long sel_setHighlightedTableColumn_ = Selector.sel_setHighlightedTableColumn_.value;
+public static final long sel_setHighlightsBy_ = Selector.sel_setHighlightsBy_.value;
+public static final long sel_setHorizontalScroller_ = Selector.sel_setHorizontalScroller_.value;
+public static final long sel_setHorizontallyResizable_ = Selector.sel_setHorizontallyResizable_.value;
+public static final long sel_setIcon_ = Selector.sel_setIcon_.value;
+public static final long sel_setIdentifier_ = Selector.sel_setIdentifier_.value;
+public static final long sel_setImage_ = Selector.sel_setImage_.value;
+public static final long sel_setImageAlignment_ = Selector.sel_setImageAlignment_.value;
+public static final long sel_setImageInterpolation_ = Selector.sel_setImageInterpolation_.value;
+public static final long sel_setImagePosition_ = Selector.sel_setImagePosition_.value;
+public static final long sel_setImageScaling_ = Selector.sel_setImageScaling_.value;
+public static final long sel_setIncrement_ = Selector.sel_setIncrement_.value;
+public static final long sel_setIndeterminate_ = Selector.sel_setIndeterminate_.value;
+public static final long sel_setIndicatorImage_inTableColumn_ = Selector.sel_setIndicatorImage_inTableColumn_.value;
+public static final long sel_setInteger_forKey_ = Selector.sel_setInteger_forKey_.value;
+public static final long sel_setIntercellSpacing_ = Selector.sel_setIntercellSpacing_.value;
+public static final long sel_setJavaEnabled_ = Selector.sel_setJavaEnabled_.value;
+public static final long sel_setJavaScriptEnabled_ = Selector.sel_setJavaScriptEnabled_.value;
+public static final long sel_setJobDisposition_ = Selector.sel_setJobDisposition_.value;
+public static final long sel_setJobTitle_ = Selector.sel_setJobTitle_.value;
+public static final long sel_setKeyEquivalent_ = Selector.sel_setKeyEquivalent_.value;
+public static final long sel_setKeyEquivalentModifierMask_ = Selector.sel_setKeyEquivalentModifierMask_.value;
+public static final long sel_setKnobProportion_ = Selector.sel_setKnobProportion_.value;
+public static final long sel_setLabel_ = Selector.sel_setLabel_.value;
+public static final long sel_setLength_ = Selector.sel_setLength_.value;
+public static final long sel_setLevel_ = Selector.sel_setLevel_.value;
+public static final long sel_setLineBreakMode_ = Selector.sel_setLineBreakMode_.value;
+public static final long sel_setLineCapStyle_ = Selector.sel_setLineCapStyle_.value;
+public static final long sel_setLineDash_count_phase_ = Selector.sel_setLineDash_count_phase_.value;
+public static final long sel_setLineFragmentPadding_ = Selector.sel_setLineFragmentPadding_.value;
+public static final long sel_setLineJoinStyle_ = Selector.sel_setLineJoinStyle_.value;
+public static final long sel_setLineSpacing_ = Selector.sel_setLineSpacing_.value;
+public static final long sel_setLineWidth_ = Selector.sel_setLineWidth_.value;
+public static final long sel_setLinkTextAttributes_ = Selector.sel_setLinkTextAttributes_.value;
+public static final long sel_setMainMenu_ = Selector.sel_setMainMenu_.value;
+public static final long sel_setMarkedText_selectedRange_ = Selector.sel_setMarkedText_selectedRange_.value;
+public static final long sel_setMaxSize_ = Selector.sel_setMaxSize_.value;
+public static final long sel_setMaxValue_ = Selector.sel_setMaxValue_.value;
+public static final long sel_setMaximum_ = Selector.sel_setMaximum_.value;
+public static final long sel_setMaximumFractionDigits_ = Selector.sel_setMaximumFractionDigits_.value;
+public static final long sel_setMaximumIntegerDigits_ = Selector.sel_setMaximumIntegerDigits_.value;
+public static final long sel_setMenu_ = Selector.sel_setMenu_.value;
+public static final long sel_setMenuFormRepresentation_ = Selector.sel_setMenuFormRepresentation_.value;
+public static final long sel_setMessage_ = Selector.sel_setMessage_.value;
+public static final long sel_setMessageText_ = Selector.sel_setMessageText_.value;
+public static final long sel_setMinSize_ = Selector.sel_setMinSize_.value;
+public static final long sel_setMinValue_ = Selector.sel_setMinValue_.value;
+public static final long sel_setMinWidth_ = Selector.sel_setMinWidth_.value;
+public static final long sel_setMinimum_ = Selector.sel_setMinimum_.value;
+public static final long sel_setMinimumFractionDigits_ = Selector.sel_setMinimumFractionDigits_.value;
+public static final long sel_setMinimumIntegerDigits_ = Selector.sel_setMinimumIntegerDigits_.value;
+public static final long sel_setMiterLimit_ = Selector.sel_setMiterLimit_.value;
+public static final long sel_setMovable_ = Selector.sel_setMovable_.value;
+public static final long sel_setNameFieldStringValue_ = Selector.sel_setNameFieldStringValue_.value;
+public static final long sel_setNeedsDisplay_ = Selector.sel_setNeedsDisplay_.value;
+public static final long sel_setNeedsDisplayInRect_ = Selector.sel_setNeedsDisplayInRect_.value;
+public static final long sel_setNumberOfVisibleItems_ = Selector.sel_setNumberOfVisibleItems_.value;
+public static final long sel_setNumberStyle_ = Selector.sel_setNumberStyle_.value;
+public static final long sel_setObject_forKey_ = Selector.sel_setObject_forKey_.value;
+public static final long sel_setObjectValue_ = Selector.sel_setObjectValue_.value;
+public static final long sel_setOnMouseEntered_ = Selector.sel_setOnMouseEntered_.value;
+public static final long sel_setOpaque_ = Selector.sel_setOpaque_.value;
+public static final long sel_setOptions_ = Selector.sel_setOptions_.value;
+public static final long sel_setOutlineTableColumn_ = Selector.sel_setOutlineTableColumn_.value;
+public static final long sel_setPaletteLabel_ = Selector.sel_setPaletteLabel_.value;
+public static final long sel_setPanelFont_isMultiple_ = Selector.sel_setPanelFont_isMultiple_.value;
+public static final long sel_setPartialStringValidationEnabled_ = Selector.sel_setPartialStringValidationEnabled_.value;
+public static final long sel_setPatternPhase_ = Selector.sel_setPatternPhase_.value;
+public static final long sel_setPlaceholderString_ = Selector.sel_setPlaceholderString_.value;
+public static final long sel_setPolicyDelegate_ = Selector.sel_setPolicyDelegate_.value;
+public static final long sel_setPreferences_ = Selector.sel_setPreferences_.value;
+public static final long sel_setPrinter_ = Selector.sel_setPrinter_.value;
+public static final long sel_setPropertyList_forType_ = Selector.sel_setPropertyList_forType_.value;
+public static final long sel_setPullsDown_ = Selector.sel_setPullsDown_.value;
+public static final long sel_setReleasedWhenClosed_ = Selector.sel_setReleasedWhenClosed_.value;
+public static final long sel_setRepresentedFilename_ = Selector.sel_setRepresentedFilename_.value;
+public static final long sel_setRepresentedURL_ = Selector.sel_setRepresentedURL_.value;
+public static final long sel_setResizingMask_ = Selector.sel_setResizingMask_.value;
+public static final long sel_setResourceLoadDelegate_ = Selector.sel_setResourceLoadDelegate_.value;
+public static final long sel_setRichText_ = Selector.sel_setRichText_.value;
+public static final long sel_setRowHeight_ = Selector.sel_setRowHeight_.value;
+public static final long sel_setScalesWhenResized_ = Selector.sel_setScalesWhenResized_.value;
+public static final long sel_setScrollable_ = Selector.sel_setScrollable_.value;
+public static final long sel_setSearchButtonCell_ = Selector.sel_setSearchButtonCell_.value;
+public static final long sel_setSelectable_ = Selector.sel_setSelectable_.value;
+public static final long sel_setSelectedItemIdentifier_ = Selector.sel_setSelectedItemIdentifier_.value;
+public static final long sel_setSelectedRange_ = Selector.sel_setSelectedRange_.value;
+public static final long sel_setSelectedTextAttributes_ = Selector.sel_setSelectedTextAttributes_.value;
+public static final long sel_setSelectionOnly_ = Selector.sel_setSelectionOnly_.value;
+public static final long sel_setServicesMenu_ = Selector.sel_setServicesMenu_.value;
+public static final long sel_setShouldAntialias_ = Selector.sel_setShouldAntialias_.value;
+public static final long sel_setShowsHelp_ = Selector.sel_setShowsHelp_.value;
+public static final long sel_setShowsPrintPanel_ = Selector.sel_setShowsPrintPanel_.value;
+public static final long sel_setShowsProgressPanel_ = Selector.sel_setShowsProgressPanel_.value;
+public static final long sel_setShowsResizeIndicator_ = Selector.sel_setShowsResizeIndicator_.value;
+public static final long sel_setShowsToolbarButton_ = Selector.sel_setShowsToolbarButton_.value;
+public static final long sel_setSize_ = Selector.sel_setSize_.value;
+public static final long sel_setState_ = Selector.sel_setState_.value;
+public static final long sel_setString_ = Selector.sel_setString_.value;
+public static final long sel_setString_forType_ = Selector.sel_setString_forType_.value;
+public static final long sel_setStringValue_ = Selector.sel_setStringValue_.value;
+public static final long sel_setStroke = Selector.sel_setStroke.value;
+public static final long sel_setSubmenu_ = Selector.sel_setSubmenu_.value;
+public static final long sel_setSubmenu_forItem_ = Selector.sel_setSubmenu_forItem_.value;
+public static final long sel_setTabStops_ = Selector.sel_setTabStops_.value;
+public static final long sel_setTabViewType_ = Selector.sel_setTabViewType_.value;
+public static final long sel_setTag_ = Selector.sel_setTag_.value;
+public static final long sel_setTarget_ = Selector.sel_setTarget_.value;
+public static final long sel_setTextColor_ = Selector.sel_setTextColor_.value;
+public static final long sel_setTextStorage_ = Selector.sel_setTextStorage_.value;
+public static final long sel_setTitle_ = Selector.sel_setTitle_.value;
+public static final long sel_setTitleFont_ = Selector.sel_setTitleFont_.value;
+public static final long sel_setTitlePosition_ = Selector.sel_setTitlePosition_.value;
+public static final long sel_setToolTip_ = Selector.sel_setToolTip_.value;
+public static final long sel_setToolbar_ = Selector.sel_setToolbar_.value;
+public static final long sel_setTransformStruct_ = Selector.sel_setTransformStruct_.value;
+public static final long sel_setTreatsFilePackagesAsDirectories_ = Selector.sel_setTreatsFilePackagesAsDirectories_.value;
+public static final long sel_setUIDelegate_ = Selector.sel_setUIDelegate_.value;
+public static final long sel_setURL_ = Selector.sel_setURL_.value;
+public static final long sel_setUpPrintOperationDefaultValues = Selector.sel_setUpPrintOperationDefaultValues.value;
+public static final long sel_setUsesAlternatingRowBackgroundColors_ = Selector.sel_setUsesAlternatingRowBackgroundColors_.value;
+public static final long sel_setUsesFontPanel_ = Selector.sel_setUsesFontPanel_.value;
+public static final long sel_setUsesScreenFonts_ = Selector.sel_setUsesScreenFonts_.value;
+public static final long sel_setUsesSingleLineMode_ = Selector.sel_setUsesSingleLineMode_.value;
+public static final long sel_setUsesThreadedAnimation_ = Selector.sel_setUsesThreadedAnimation_.value;
+public static final long sel_setValue_forHTTPHeaderField_ = Selector.sel_setValue_forHTTPHeaderField_.value;
+public static final long sel_setValue_forKey_ = Selector.sel_setValue_forKey_.value;
+public static final long sel_setValueWraps_ = Selector.sel_setValueWraps_.value;
+public static final long sel_setValues_forParameter_ = Selector.sel_setValues_forParameter_.value;
+public static final long sel_setVerticalScrollElasticity_ = Selector.sel_setVerticalScrollElasticity_.value;
+public static final long sel_setVerticalScroller_ = Selector.sel_setVerticalScroller_.value;
+public static final long sel_setView_ = Selector.sel_setView_.value;
+public static final long sel_setVisible_ = Selector.sel_setVisible_.value;
+public static final long sel_setWantsRestingTouches_ = Selector.sel_setWantsRestingTouches_.value;
+public static final long sel_setWidth_ = Selector.sel_setWidth_.value;
+public static final long sel_setWidthTracksTextView_ = Selector.sel_setWidthTracksTextView_.value;
+public static final long sel_setWindingRule_ = Selector.sel_setWindingRule_.value;
+public static final long sel_setWorksWhenModal_ = Selector.sel_setWorksWhenModal_.value;
+public static final long sel_setWraps_ = Selector.sel_setWraps_.value;
+public static final long sel_sharedApplication = Selector.sel_sharedApplication.value;
+public static final long sel_sharedCertificateTrustPanel = Selector.sel_sharedCertificateTrustPanel.value;
+public static final long sel_sharedColorPanel = Selector.sel_sharedColorPanel.value;
+public static final long sel_sharedFontManager = Selector.sel_sharedFontManager.value;
+public static final long sel_sharedFontPanel = Selector.sel_sharedFontPanel.value;
+public static final long sel_sharedHTTPCookieStorage = Selector.sel_sharedHTTPCookieStorage.value;
+public static final long sel_sharedPrintInfo = Selector.sel_sharedPrintInfo.value;
+public static final long sel_sharedWorkspace = Selector.sel_sharedWorkspace.value;
+public static final long sel_shiftKey = Selector.sel_shiftKey.value;
+public static final long sel_shouldAntialias = Selector.sel_shouldAntialias.value;
+public static final long sel_shouldChangeTextInRange_replacementString_ = Selector.sel_shouldChangeTextInRange_replacementString_.value;
+public static final long sel_shouldDelayWindowOrderingForEvent_ = Selector.sel_shouldDelayWindowOrderingForEvent_.value;
+public static final long sel_shouldDrawInsertionPoint = Selector.sel_shouldDrawInsertionPoint.value;
+public static final long sel_size = Selector.sel_size.value;
+public static final long sel_sizeOfLabel_ = Selector.sel_sizeOfLabel_.value;
+public static final long sel_sizeToFit = Selector.sel_sizeToFit.value;
+public static final long sel_sizeValue = Selector.sel_sizeValue.value;
+public static final long sel_skipDescendents = Selector.sel_skipDescendents.value;
+public static final long sel_smallSystemFontSize = Selector.sel_smallSystemFontSize.value;
+public static final long sel_sortIndicatorRectForBounds_ = Selector.sel_sortIndicatorRectForBounds_.value;
+public static final long sel_standardPreferences = Selector.sel_standardPreferences.value;
+public static final long sel_standardUserDefaults = Selector.sel_standardUserDefaults.value;
+public static final long sel_startAnimation_ = Selector.sel_startAnimation_.value;
+public static final long sel_state = Selector.sel_state.value;
+public static final long sel_statusItemWithLength_ = Selector.sel_statusItemWithLength_.value;
+public static final long sel_stop_ = Selector.sel_stop_.value;
+public static final long sel_stopLoading_ = Selector.sel_stopLoading_.value;
+public static final long sel_stopModal = Selector.sel_stopModal.value;
+public static final long sel_string = Selector.sel_string.value;
+public static final long sel_stringByAddingPercentEscapesUsingEncoding_ = Selector.sel_stringByAddingPercentEscapesUsingEncoding_.value;
+public static final long sel_stringByAppendingPathComponent_ = Selector.sel_stringByAppendingPathComponent_.value;
+public static final long sel_stringByAppendingPathExtension_ = Selector.sel_stringByAppendingPathExtension_.value;
+public static final long sel_stringByAppendingString_ = Selector.sel_stringByAppendingString_.value;
+public static final long sel_stringByDeletingLastPathComponent = Selector.sel_stringByDeletingLastPathComponent.value;
+public static final long sel_stringByDeletingPathExtension = Selector.sel_stringByDeletingPathExtension.value;
+public static final long sel_stringByReplacingOccurrencesOfString_withString_ = Selector.sel_stringByReplacingOccurrencesOfString_withString_.value;
+public static final long sel_stringByReplacingPercentEscapesUsingEncoding_ = Selector.sel_stringByReplacingPercentEscapesUsingEncoding_.value;
+public static final long sel_stringForKey_ = Selector.sel_stringForKey_.value;
+public static final long sel_stringForObjectValue_ = Selector.sel_stringForObjectValue_.value;
+public static final long sel_stringForType_ = Selector.sel_stringForType_.value;
+public static final long sel_stringValue = Selector.sel_stringValue.value;
+public static final long sel_stringWithCharacters_length_ = Selector.sel_stringWithCharacters_length_.value;
+public static final long sel_stringWithUTF8String_ = Selector.sel_stringWithUTF8String_.value;
+public static final long sel_stroke = Selector.sel_stroke.value;
+public static final long sel_strokeRect_ = Selector.sel_strokeRect_.value;
+public static final long sel_styleMask = Selector.sel_styleMask.value;
+public static final long sel_submenu = Selector.sel_submenu.value;
+public static final long sel_subviews = Selector.sel_subviews.value;
+public static final long sel_superclass = Selector.sel_superclass.value;
+public static final long sel_superview = Selector.sel_superview.value;
+public static final long sel_swipeWithEvent_ = Selector.sel_swipeWithEvent_.value;
+public static final long sel_systemFontOfSize_ = Selector.sel_systemFontOfSize_.value;
+public static final long sel_systemFontSize = Selector.sel_systemFontSize.value;
+public static final long sel_systemFontSizeForControlSize_ = Selector.sel_systemFontSizeForControlSize_.value;
+public static final long sel_systemStatusBar = Selector.sel_systemStatusBar.value;
+public static final long sel_systemVersion = Selector.sel_systemVersion.value;
+public static final long sel_tabView_didSelectTabViewItem_ = Selector.sel_tabView_didSelectTabViewItem_.value;
+public static final long sel_tabView_willSelectTabViewItem_ = Selector.sel_tabView_willSelectTabViewItem_.value;
+public static final long sel_tabViewItemAtPoint_ = Selector.sel_tabViewItemAtPoint_.value;
+public static final long sel_tableColumns = Selector.sel_tableColumns.value;
+public static final long sel_tableView_acceptDrop_row_dropOperation_ = Selector.sel_tableView_acceptDrop_row_dropOperation_.value;
+public static final long sel_tableView_didClickTableColumn_ = Selector.sel_tableView_didClickTableColumn_.value;
+public static final long sel_tableView_objectValueForTableColumn_row_ = Selector.sel_tableView_objectValueForTableColumn_row_.value;
+public static final long sel_tableView_setObjectValue_forTableColumn_row_ = Selector.sel_tableView_setObjectValue_forTableColumn_row_.value;
+public static final long sel_tableView_shouldEditTableColumn_row_ = Selector.sel_tableView_shouldEditTableColumn_row_.value;
+public static final long sel_tableView_shouldReorderColumn_toColumn_ = Selector.sel_tableView_shouldReorderColumn_toColumn_.value;
+public static final long sel_tableView_shouldTrackCell_forTableColumn_row_ = Selector.sel_tableView_shouldTrackCell_forTableColumn_row_.value;
+public static final long sel_tableView_validateDrop_proposedRow_proposedDropOperation_ = Selector.sel_tableView_validateDrop_proposedRow_proposedDropOperation_.value;
+public static final long sel_tableView_willDisplayCell_forTableColumn_row_ = Selector.sel_tableView_willDisplayCell_forTableColumn_row_.value;
+public static final long sel_tableView_writeRowsWithIndexes_toPasteboard_ = Selector.sel_tableView_writeRowsWithIndexes_toPasteboard_.value;
+public static final long sel_tableViewColumnDidMove_ = Selector.sel_tableViewColumnDidMove_.value;
+public static final long sel_tableViewColumnDidResize_ = Selector.sel_tableViewColumnDidResize_.value;
+public static final long sel_tableViewSelectionDidChange_ = Selector.sel_tableViewSelectionDidChange_.value;
+public static final long sel_tableViewSelectionIsChanging_ = Selector.sel_tableViewSelectionIsChanging_.value;
+public static final long sel_tag = Selector.sel_tag.value;
+public static final long sel_target = Selector.sel_target.value;
+public static final long sel_terminate_ = Selector.sel_terminate_.value;
+public static final long sel_testPart_ = Selector.sel_testPart_.value;
+public static final long sel_textBackgroundColor = Selector.sel_textBackgroundColor.value;
+public static final long sel_textColor = Selector.sel_textColor.value;
+public static final long sel_textContainer = Selector.sel_textContainer.value;
+public static final long sel_textDidChange_ = Selector.sel_textDidChange_.value;
+public static final long sel_textDidEndEditing_ = Selector.sel_textDidEndEditing_.value;
+public static final long sel_textStorage = Selector.sel_textStorage.value;
+public static final long sel_textView_clickedOnLink_atIndex_ = Selector.sel_textView_clickedOnLink_atIndex_.value;
+public static final long sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_ = Selector.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_.value;
+public static final long sel_textViewDidChangeSelection_ = Selector.sel_textViewDidChangeSelection_.value;
+public static final long sel_thickness = Selector.sel_thickness.value;
+public static final long sel_threadDictionary = Selector.sel_threadDictionary.value;
+public static final long sel_tile = Selector.sel_tile.value;
+public static final long sel_timeZone = Selector.sel_timeZone.value;
+public static final long sel_timestamp = Selector.sel_timestamp.value;
+public static final long sel_title = Selector.sel_title.value;
+public static final long sel_titleCell = Selector.sel_titleCell.value;
+public static final long sel_titleFont = Selector.sel_titleFont.value;
+public static final long sel_titleOfSelectedItem = Selector.sel_titleOfSelectedItem.value;
+public static final long sel_titleRectForBounds_ = Selector.sel_titleRectForBounds_.value;
+public static final long sel_toggleFullScreen_ = Selector.sel_toggleFullScreen_.value;
+public static final long sel_toolbar = Selector.sel_toolbar.value;
+public static final long sel_toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_ = Selector.sel_toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_.value;
+public static final long sel_toolbarAllowedItemIdentifiers_ = Selector.sel_toolbarAllowedItemIdentifiers_.value;
+public static final long sel_toolbarDefaultItemIdentifiers_ = Selector.sel_toolbarDefaultItemIdentifiers_.value;
+public static final long sel_toolbarSelectableItemIdentifiers_ = Selector.sel_toolbarSelectableItemIdentifiers_.value;
+public static final long sel_touchesBeganWithEvent_ = Selector.sel_touchesBeganWithEvent_.value;
+public static final long sel_touchesCancelledWithEvent_ = Selector.sel_touchesCancelledWithEvent_.value;
+public static final long sel_touchesEndedWithEvent_ = Selector.sel_touchesEndedWithEvent_.value;
+public static final long sel_touchesMatchingPhase_inView_ = Selector.sel_touchesMatchingPhase_inView_.value;
+public static final long sel_touchesMovedWithEvent_ = Selector.sel_touchesMovedWithEvent_.value;
+public static final long sel_trackingAreas = Selector.sel_trackingAreas.value;
+public static final long sel_traitsOfFont_ = Selector.sel_traitsOfFont_.value;
+public static final long sel_transform = Selector.sel_transform.value;
+public static final long sel_transformPoint_ = Selector.sel_transformPoint_.value;
+public static final long sel_transformSize_ = Selector.sel_transformSize_.value;
+public static final long sel_transformStruct = Selector.sel_transformStruct.value;
+public static final long sel_transformUsingAffineTransform_ = Selector.sel_transformUsingAffineTransform_.value;
+public static final long sel_translateXBy_yBy_ = Selector.sel_translateXBy_yBy_.value;
+public static final long sel_type = Selector.sel_type.value;
+public static final long sel_type_conformsToType_ = Selector.sel_type_conformsToType_.value;
+public static final long sel_typeOfFile_error_ = Selector.sel_typeOfFile_error_.value;
+public static final long sel_types = Selector.sel_types.value;
+public static final long sel_typesetter = Selector.sel_typesetter.value;
+public static final long sel_unarchiveObjectWithData_ = Selector.sel_unarchiveObjectWithData_.value;
+public static final long sel_undefined = Selector.sel_undefined.value;
+public static final long sel_undo = Selector.sel_undo.value;
+public static final long sel_undoManager = Selector.sel_undoManager.value;
+public static final long sel_unhideAllApplications_ = Selector.sel_unhideAllApplications_.value;
+public static final long sel_unlockFocus = Selector.sel_unlockFocus.value;
+public static final long sel_unmarkText = Selector.sel_unmarkText.value;
+public static final long sel_unregisterDraggedTypes = Selector.sel_unregisterDraggedTypes.value;
+public static final long sel_update = Selector.sel_update.value;
+public static final long sel_updateFromPMPrintSettings = Selector.sel_updateFromPMPrintSettings.value;
+public static final long sel_updateTrackingAreas = Selector.sel_updateTrackingAreas.value;
+public static final long sel_use = Selector.sel_use.value;
+public static final long sel_useCredential_forAuthenticationChallenge_ = Selector.sel_useCredential_forAuthenticationChallenge_.value;
+public static final long sel_usedRectForTextContainer_ = Selector.sel_usedRectForTextContainer_.value;
+public static final long sel_user = Selector.sel_user.value;
+public static final long sel_userInfo = Selector.sel_userInfo.value;
+public static final long sel_usesAlternatingRowBackgroundColors = Selector.sel_usesAlternatingRowBackgroundColors.value;
+public static final long sel_validAttributesForMarkedText = Selector.sel_validAttributesForMarkedText.value;
+public static final long sel_validModesForFontPanel_ = Selector.sel_validModesForFontPanel_.value;
+public static final long sel_validRequestorForSendType_returnType_ = Selector.sel_validRequestorForSendType_returnType_.value;
+public static final long sel_validateMenuItem_ = Selector.sel_validateMenuItem_.value;
+public static final long sel_validateVisibleColumns = Selector.sel_validateVisibleColumns.value;
+public static final long sel_value = Selector.sel_value.value;
+public static final long sel_valueForKey_ = Selector.sel_valueForKey_.value;
+public static final long sel_valueWithPoint_ = Selector.sel_valueWithPoint_.value;
+public static final long sel_valueWithRange_ = Selector.sel_valueWithRange_.value;
+public static final long sel_valueWithRect_ = Selector.sel_valueWithRect_.value;
+public static final long sel_valueWithSize_ = Selector.sel_valueWithSize_.value;
+public static final long sel_view = Selector.sel_view.value;
+public static final long sel_view_stringForToolTip_point_userData_ = Selector.sel_view_stringForToolTip_point_userData_.value;
+public static final long sel_viewDidMoveToWindow = Selector.sel_viewDidMoveToWindow.value;
+public static final long sel_viewWillMoveToWindow_ = Selector.sel_viewWillMoveToWindow_.value;
+public static final long sel_visibleFrame = Selector.sel_visibleFrame.value;
+public static final long sel_visibleRect = Selector.sel_visibleRect.value;
+public static final long sel_wantsPeriodicDraggingUpdates = Selector.sel_wantsPeriodicDraggingUpdates.value;
+public static final long sel_wantsToHandleMouseEvents = Selector.sel_wantsToHandleMouseEvents.value;
+public static final long sel_webFrame = Selector.sel_webFrame.value;
+public static final long sel_webScriptValueAtIndex_ = Selector.sel_webScriptValueAtIndex_.value;
+public static final long sel_webView_contextMenuItemsForElement_defaultMenuItems_ = Selector.sel_webView_contextMenuItemsForElement_defaultMenuItems_.value;
+public static final long sel_webView_createWebViewWithRequest_ = Selector.sel_webView_createWebViewWithRequest_.value;
+public static final long sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_ = Selector.sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_.value;
+public static final long sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_ = Selector.sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_.value;
+public static final long sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_ = Selector.sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_.value;
+public static final long sel_webView_didChangeLocationWithinPageForFrame_ = Selector.sel_webView_didChangeLocationWithinPageForFrame_.value;
+public static final long sel_webView_didCommitLoadForFrame_ = Selector.sel_webView_didCommitLoadForFrame_.value;
+public static final long sel_webView_didFailProvisionalLoadWithError_forFrame_ = Selector.sel_webView_didFailProvisionalLoadWithError_forFrame_.value;
+public static final long sel_webView_didFinishLoadForFrame_ = Selector.sel_webView_didFinishLoadForFrame_.value;
+public static final long sel_webView_didReceiveTitle_forFrame_ = Selector.sel_webView_didReceiveTitle_forFrame_.value;
+public static final long sel_webView_didStartProvisionalLoadForFrame_ = Selector.sel_webView_didStartProvisionalLoadForFrame_.value;
+public static final long sel_webView_identifierForInitialRequest_fromDataSource_ = Selector.sel_webView_identifierForInitialRequest_fromDataSource_.value;
+public static final long sel_webView_mouseDidMoveOverElement_modifierFlags_ = Selector.sel_webView_mouseDidMoveOverElement_modifierFlags_.value;
+public static final long sel_webView_printFrameView_ = Selector.sel_webView_printFrameView_.value;
+public static final long sel_webView_resource_didFailLoadingWithError_fromDataSource_ = Selector.sel_webView_resource_didFailLoadingWithError_fromDataSource_.value;
+public static final long sel_webView_resource_didFinishLoadingFromDataSource_ = Selector.sel_webView_resource_didFinishLoadingFromDataSource_.value;
+public static final long sel_webView_resource_didReceiveAuthenticationChallenge_fromDataSource_ = Selector.sel_webView_resource_didReceiveAuthenticationChallenge_fromDataSource_.value;
+public static final long sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_ = Selector.sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_.value;
+public static final long sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_ = Selector.sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_.value;
+public static final long sel_webView_runJavaScriptAlertPanelWithMessage_ = Selector.sel_webView_runJavaScriptAlertPanelWithMessage_.value;
+public static final long sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_ = Selector.sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_.value;
+public static final long sel_webView_runJavaScriptConfirmPanelWithMessage_ = Selector.sel_webView_runJavaScriptConfirmPanelWithMessage_.value;
+public static final long sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_ = Selector.sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_.value;
+public static final long sel_webView_runOpenPanelForFileButtonWithResultListener_ = Selector.sel_webView_runOpenPanelForFileButtonWithResultListener_.value;
+public static final long sel_webView_setFrame_ = Selector.sel_webView_setFrame_.value;
+public static final long sel_webView_setResizable_ = Selector.sel_webView_setResizable_.value;
+public static final long sel_webView_setStatusBarVisible_ = Selector.sel_webView_setStatusBarVisible_.value;
+public static final long sel_webView_setStatusText_ = Selector.sel_webView_setStatusText_.value;
+public static final long sel_webView_setToolbarsVisible_ = Selector.sel_webView_setToolbarsVisible_.value;
+public static final long sel_webView_unableToImplementPolicyWithError_frame_ = Selector.sel_webView_unableToImplementPolicyWithError_frame_.value;
+public static final long sel_webView_windowScriptObjectAvailable_ = Selector.sel_webView_windowScriptObjectAvailable_.value;
+public static final long sel_webViewClose_ = Selector.sel_webViewClose_.value;
+public static final long sel_webViewFocus_ = Selector.sel_webViewFocus_.value;
+public static final long sel_webViewShow_ = Selector.sel_webViewShow_.value;
+public static final long sel_webViewUnfocus_ = Selector.sel_webViewUnfocus_.value;
+public static final long sel_wheelDelta = Selector.sel_wheelDelta.value;
+public static final long sel_wheelDeltaX = Selector.sel_wheelDeltaX.value;
+public static final long sel_wheelDeltaY = Selector.sel_wheelDeltaY.value;
+public static final long sel_width = Selector.sel_width.value;
+public static final long sel_window = Selector.sel_window.value;
+public static final long sel_windowBackgroundColor = Selector.sel_windowBackgroundColor.value;
+public static final long sel_windowDidBecomeKey_ = Selector.sel_windowDidBecomeKey_.value;
+public static final long sel_windowDidDeminiaturize_ = Selector.sel_windowDidDeminiaturize_.value;
+public static final long sel_windowDidMiniaturize_ = Selector.sel_windowDidMiniaturize_.value;
+public static final long sel_windowDidMove_ = Selector.sel_windowDidMove_.value;
+public static final long sel_windowDidResignKey_ = Selector.sel_windowDidResignKey_.value;
+public static final long sel_windowDidResize_ = Selector.sel_windowDidResize_.value;
+public static final long sel_windowFrameTextColor = Selector.sel_windowFrameTextColor.value;
+public static final long sel_windowNumber = Selector.sel_windowNumber.value;
+public static final long sel_windowNumberAtPoint_belowWindowWithWindowNumber_ = Selector.sel_windowNumberAtPoint_belowWindowWithWindowNumber_.value;
+public static final long sel_windowShouldClose_ = Selector.sel_windowShouldClose_.value;
+public static final long sel_windowWillClose_ = Selector.sel_windowWillClose_.value;
+public static final long sel_windowWithWindowNumber_ = Selector.sel_windowWithWindowNumber_.value;
+public static final long sel_windows = Selector.sel_windows.value;
+public static final long sel_writeObjects_ = Selector.sel_writeObjects_.value;
+public static final long sel_writeSelectionToPasteboard_types_ = Selector.sel_writeSelectionToPasteboard_types_.value;
+public static final long sel_yearOfCommonEra = Selector.sel_yearOfCommonEra.value;
+public static final long sel_zoom_ = Selector.sel_zoom_.value;
/** Constants */
public static final int NSAlertFirstButtonReturn = 1000;
@@ -2395,7 +2163,7 @@ public static final int NSAlertThirdButtonReturn = 1002;
public static final int NSAlphaFirstBitmapFormat = 1;
public static final int NSAlphaNonpremultipliedBitmapFormat = 2;
public static final int NSAlternateKeyMask = 524288;
-public static final int NSAnyEventMask = -1;
+public static final long NSAnyEventMask = -1L;
public static final int NSAppKitDefined = 13;
public static final int NSApplicationActivateIgnoringOtherApps = 2;
public static final int NSApplicationActivationPolicyRegular = 0;
@@ -2423,7 +2191,6 @@ public static final int NSCompositeClear = 0;
public static final int NSCompositeCopy = 1;
public static final int NSCompositeSourceAtop = 5;
public static final int NSCompositeSourceOver = 2;
-public static final int NSCompositeXOR = 10;
public static final int NSContentsCellMask = 1;
public static final int NSControlKeyMask = 262144;
public static final int NSCriticalAlertStyle = 2;
@@ -2433,12 +2200,15 @@ public static final long NSDeviceIndependentModifierFlagsMask = 4294901760L;
public static final int NSDocModalWindowMask = 64;
public static final int NSDragOperationCopy = 1;
public static final int NSDragOperationDelete = 32;
-public static final int NSDragOperationEvery = -1;
+public static final long NSDragOperationEvery = -1L;
public static final int NSDragOperationLink = 2;
public static final int NSDragOperationMove = 16;
public static final int NSDragOperationNone = 0;
public static final int NSEnterCharacter = 3;
public static final int NSEvenOddWindingRule = 1;
+public static final int NSEventPhaseBegan = 1;
+public static final int NSEventPhaseCancelled = 16;
+public static final int NSEventPhaseEnded = 8;
public static final int NSEventTypeBeginGesture = 19;
public static final int NSEventTypeEndGesture = 20;
public static final int NSEventTypeGesture = 29;
@@ -2450,15 +2220,7 @@ public static final int NSFlagsChanged = 12;
public static final int NSFocusRingTypeNone = 1;
public static final int NSFontPanelAllEffectsModeMask = 1048320;
public static final int NSFontPanelAllModesMask = -1;
-public static final int NSFontPanelCollectionModeMask = 4;
-public static final int NSFontPanelDocumentColorEffectModeMask = 2048;
-public static final int NSFontPanelFaceModeMask = 1;
-public static final int NSFontPanelShadowEffectModeMask = 4096;
-public static final int NSFontPanelSizeModeMask = 2;
-public static final int NSFontPanelStandardModesMask = 65535;
-public static final int NSFontPanelStrikethroughEffectModeMask = 512;
-public static final int NSFontPanelTextColorEffectModeMask = 1024;
-public static final int NSFontPanelUnderlineEffectModeMask = 256;
+public static final int NSFullScreenWindowMask = 16384;
public static final int NSHelpFunctionKey = 63302;
public static final int NSHelpKeyMask = 4194304;
public static final int NSHourMinuteDatePickerElementFlag = 12;
@@ -2481,7 +2243,6 @@ public static final int NSKeyDown = 10;
public static final int NSKeyUp = 11;
public static final int NSLandscapeOrientation = 1;
public static final int NSLeftMouseDown = 1;
-public static final int NSLeftMouseDownMask = 2;
public static final int NSLeftMouseDragged = 6;
public static final int NSLeftMouseDraggedMask = 64;
public static final int NSLeftMouseUp = 2;
@@ -2496,7 +2257,6 @@ public static final int NSMiniControlSize = 2;
public static final int NSMiniaturizableWindowMask = 4;
public static final int NSMiterLineJoinStyle = 0;
public static final int NSMixedState = -1;
-public static final int NSModalPanelWindowLevel = 8;
public static final int NSMomentaryLightButton = 0;
public static final int NSMouseEntered = 8;
public static final int NSMouseExited = 9;
@@ -2508,11 +2268,9 @@ public static final int NSNoImage = 0;
public static final int NSNoTitle = 0;
public static final int NSNonZeroWindingRule = 0;
public static final int NSNonactivatingPanelMask = 128;
-public static final int NSNormalWindowLevel = 0;
public static final int NSOffState = 0;
public static final int NSOnState = 1;
public static final int NSOpenGLCPSurfaceOrder = 235;
-public static final int NSOpenGLCPSwapInterval = 222;
public static final int NSOpenGLPFAAccumSize = 14;
public static final int NSOpenGLPFAAlphaSize = 11;
public static final int NSOpenGLPFAColorSize = 8;
@@ -2525,13 +2283,9 @@ public static final int NSOpenGLPFAStereo = 6;
public static final int NSOtherMouseDown = 25;
public static final int NSOtherMouseDragged = 27;
public static final int NSOtherMouseUp = 26;
-public static final int NSOutlineViewDropOnItemIndex = -1;
public static final int NSPageDownFunctionKey = 63277;
public static final int NSPageUpFunctionKey = 63276;
public static final int NSPortraitOrientation = 0;
-public static final int NSPrintPanelShowsCopies = 1;
-public static final int NSPrintPanelShowsOrientation = 8;
-public static final int NSPrintPanelShowsPageRange = 2;
public static final int NSPrintPanelShowsPageSetupAccessory = 256;
public static final int NSPrintPanelShowsPrintSelection = 32;
public static final int NSProgressIndicatorPreferredThickness = 14;
@@ -2557,6 +2311,8 @@ public static final int NSScrollerIncrementLine = 5;
public static final int NSScrollerIncrementPage = 3;
public static final int NSScrollerKnob = 2;
public static final int NSScrollerKnobSlot = 6;
+public static final int NSScrollerStyleLegacy = 0;
+public static final int NSScrollerStyleOverlay = 1;
public static final int NSShadowlessSquareBezelStyle = 6;
public static final int NSShiftKeyMask = 131072;
public static final int NSSmallControlSize = 1;
@@ -2576,23 +2332,20 @@ public static final int NSTableViewNoColumnAutoresizing = 0;
public static final int NSTableViewSolidVerticalGridLineMask = 1;
public static final int NSTerminateCancel = 0;
public static final int NSTerminateNow = 1;
-public static final int NSTextAlignmentCenter = 2;
+public static final int NSTextAlignmentCenter = IS_X86_64 ? 2 : 1;
public static final int NSTextAlignmentJustified = 3;
public static final int NSTextAlignmentLeft = 0;
-public static final int NSTextAlignmentNatural = 4;
-public static final int NSTextAlignmentRight = 1;
+public static final int NSTextAlignmentRight = IS_X86_64 ? 1 : 2;
public static final int NSTextFieldAndStepperDatePickerStyle = 0;
public static final int NSTextFieldDatePickerStyle = 2;
public static final int NSTitledWindowMask = 1;
public static final int NSToolbarDisplayModeIconOnly = 2;
-public static final int NSTouchEventSubtype = 3;
-public static final int NSTouchPhaseAny = -1;
+public static final long NSTouchPhaseAny = -1L;
public static final int NSTouchPhaseBegan = 1;
public static final int NSTouchPhaseCancelled = 16;
public static final int NSTouchPhaseEnded = 8;
public static final int NSTouchPhaseMoved = 2;
public static final int NSTouchPhaseStationary = 4;
-public static final int NSTouchPhaseTouching = 7;
public static final int NSUnderlineStyleDouble = 9;
public static final int NSUnderlineStyleNone = 0;
public static final int NSUnderlineStyleSingle = 1;
@@ -2607,11 +2360,10 @@ public static final int NSViewWidthSizable = 2;
public static final int NSWarningAlertStyle = 0;
public static final int NSWindowAbove = 1;
public static final int NSWindowBelow = -1;
-public static final int NSWindowCollectionBehaviorCanJoinAllSpaces = 1;
-public static final int NSWindowCollectionBehaviorDefault = 0;
+public static final int NSWindowCollectionBehaviorFullScreenAuxiliary = 256;
+public static final int NSWindowCollectionBehaviorFullScreenPrimary = 128;
public static final int NSWindowCollectionBehaviorMoveToActiveSpace = 2;
public static final int NSWritingDirectionLeftToRight = 0;
-public static final int NSWritingDirectionNatural = -1;
public static final int NSWritingDirectionRightToLeft = 1;
public static final int NSYearMonthDatePickerElementFlag = 192;
public static final int NSYearMonthDayDatePickerElementFlag = 224;
@@ -2619,11 +2371,6 @@ public static final int kCFRunLoopBeforeWaiting = 32;
public static final int kCFStringEncodingUTF8 = 134217984;
public static final int kCGBlendModeDifference = 10;
public static final int kCGBlendModeNormal = 0;
-public static final int kCGEventFilterMaskPermitLocalKeyboardEvents = 2;
-public static final int kCGEventFilterMaskPermitLocalMouseEvents = 1;
-public static final int kCGEventFilterMaskPermitSystemDefinedEvents = 4;
-public static final int kCGEventKeyDown = 10;
-public static final int kCGEventKeyUp = 11;
public static final int kCGEventLeftMouseDown = 1;
public static final int kCGEventLeftMouseUp = 2;
public static final int kCGEventMouseMoved = 5;
@@ -2632,8 +2379,6 @@ public static final int kCGEventOtherMouseUp = 26;
public static final int kCGEventRightMouseDown = 3;
public static final int kCGEventRightMouseUp = 4;
public static final int kCGEventSourceStateHIDSystemState = 1;
-public static final int kCGEventSuppressionStateRemoteMouseDrag = 1;
-public static final int kCGEventSuppressionStateSuppressionInterval = 0;
public static final int kCGHIDEventTap = 0;
public static final int kCGImageAlphaFirst = 4;
public static final int kCGImageAlphaLast = 3;
@@ -2652,17 +2397,10 @@ public static final int kCGPathElementAddLineToPoint = 1;
public static final int kCGPathElementAddQuadCurveToPoint = 2;
public static final int kCGPathElementCloseSubpath = 4;
public static final int kCGPathElementMoveToPoint = 0;
-public static final int kCGPathStroke = 2;
public static final int kCGScrollEventUnitLine = 1;
-public static final int kCGScrollEventUnitPixel = 0;
-public static final int kCGTextFillStroke = 2;
-public static final int kCTParagraphStyleSpecifierBaseWritingDirection = 13;
-public static final int kCTWritingDirectionLeftToRight = 0;
-public static final int kCTWritingDirectionNatural = -1;
-public static final int kCTWritingDirectionRightToLeft = 1;
+public static final int kCTFontManagerScopeProcess = 1;
public static final int NSAllApplicationsDirectory = 100;
public static final int NSAllDomainsMask = 65535;
-public static final int NSCachesDirectory = 13;
public static final int NSOrderedSame = 0;
public static final int NSURLCredentialPersistenceForSession = 1;
public static final int NSURLErrorBadURL = -1000;
@@ -2670,704 +2408,555 @@ public static final int NSURLErrorSecureConnectionFailed = -1200;
public static final int NSURLErrorServerCertificateNotYetValid = -1204;
public static final int NSURLRequestReloadIgnoringLocalCacheData = 1;
public static final int NSUTF8StringEncoding = 4;
-public static final int NSUserDomainMask = 1;
/** Globals */
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityAttributedStringForRangeParameterizedAttribute();
+public static final native long NSAccessibilityAttributedStringForRangeParameterizedAttribute();
public static final NSString NSAccessibilityAttributedStringForRangeParameterizedAttribute = new NSString(NSAccessibilityAttributedStringForRangeParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityBackgroundColorTextAttribute();
+public static final native long NSAccessibilityBackgroundColorTextAttribute();
public static final NSString NSAccessibilityBackgroundColorTextAttribute = new NSString(NSAccessibilityBackgroundColorTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityBoundsForRangeParameterizedAttribute();
+public static final native long NSAccessibilityBoundsForRangeParameterizedAttribute();
public static final NSString NSAccessibilityBoundsForRangeParameterizedAttribute = new NSString(NSAccessibilityBoundsForRangeParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityButtonRole();
+public static final native long NSAccessibilityButtonRole();
public static final NSString NSAccessibilityButtonRole = new NSString(NSAccessibilityButtonRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityCheckBoxRole();
+public static final native long NSAccessibilityCellForColumnAndRowParameterizedAttribute();
+public static final NSString NSAccessibilityCellForColumnAndRowParameterizedAttribute = new NSString(NSAccessibilityCellForColumnAndRowParameterizedAttribute());
+/** @method flags=const */
+public static final native long NSAccessibilityCheckBoxRole();
public static final NSString NSAccessibilityCheckBoxRole = new NSString(NSAccessibilityCheckBoxRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityChildrenAttribute();
+public static final native long NSAccessibilityChildrenAttribute();
public static final NSString NSAccessibilityChildrenAttribute = new NSString(NSAccessibilityChildrenAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityColorWellRole();
-public static final NSString NSAccessibilityColorWellRole = new NSString(NSAccessibilityColorWellRole());
+public static final native long NSAccessibilityColumnIndexRangeAttribute();
+public static final NSString NSAccessibilityColumnIndexRangeAttribute = new NSString(NSAccessibilityColumnIndexRangeAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityColumnRole();
+public static final native long NSAccessibilityColumnRole();
public static final NSString NSAccessibilityColumnRole = new NSString(NSAccessibilityColumnRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityColumnsAttribute();
+public static final native long NSAccessibilityColumnsAttribute();
public static final NSString NSAccessibilityColumnsAttribute = new NSString(NSAccessibilityColumnsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityComboBoxRole();
+public static final native long NSAccessibilityComboBoxRole();
public static final NSString NSAccessibilityComboBoxRole = new NSString(NSAccessibilityComboBoxRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityConfirmAction();
+public static final native long NSAccessibilityConfirmAction();
public static final NSString NSAccessibilityConfirmAction = new NSString(NSAccessibilityConfirmAction());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityContentsAttribute();
+public static final native long NSAccessibilityContentsAttribute();
public static final NSString NSAccessibilityContentsAttribute = new NSString(NSAccessibilityContentsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityDescriptionAttribute();
+public static final native long NSAccessibilityDescriptionAttribute();
public static final NSString NSAccessibilityDescriptionAttribute = new NSString(NSAccessibilityDescriptionAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityDialogSubrole();
+public static final native long NSAccessibilityDialogSubrole();
public static final NSString NSAccessibilityDialogSubrole = new NSString(NSAccessibilityDialogSubrole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityEnabledAttribute();
+public static final native long NSAccessibilityEnabledAttribute();
public static final NSString NSAccessibilityEnabledAttribute = new NSString(NSAccessibilityEnabledAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityExpandedAttribute();
+public static final native long NSAccessibilityExpandedAttribute();
public static final NSString NSAccessibilityExpandedAttribute = new NSString(NSAccessibilityExpandedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFloatingWindowSubrole();
-public static final NSString NSAccessibilityFloatingWindowSubrole = new NSString(NSAccessibilityFloatingWindowSubrole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFocusedAttribute();
+public static final native long NSAccessibilityFocusedAttribute();
public static final NSString NSAccessibilityFocusedAttribute = new NSString(NSAccessibilityFocusedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFocusedUIElementChangedNotification();
+public static final native long NSAccessibilityFocusedUIElementChangedNotification();
public static final NSString NSAccessibilityFocusedUIElementChangedNotification = new NSString(NSAccessibilityFocusedUIElementChangedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFocusedWindowChangedNotification();
-public static final NSString NSAccessibilityFocusedWindowChangedNotification = new NSString(NSAccessibilityFocusedWindowChangedNotification());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFontFamilyKey();
+public static final native long NSAccessibilityFontFamilyKey();
public static final NSString NSAccessibilityFontFamilyKey = new NSString(NSAccessibilityFontFamilyKey());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFontNameKey();
+public static final native long NSAccessibilityFontNameKey();
public static final NSString NSAccessibilityFontNameKey = new NSString(NSAccessibilityFontNameKey());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFontSizeKey();
+public static final native long NSAccessibilityFontSizeKey();
public static final NSString NSAccessibilityFontSizeKey = new NSString(NSAccessibilityFontSizeKey());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityFontTextAttribute();
+public static final native long NSAccessibilityFontTextAttribute();
public static final NSString NSAccessibilityFontTextAttribute = new NSString(NSAccessibilityFontTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityForegroundColorTextAttribute();
+public static final native long NSAccessibilityForegroundColorTextAttribute();
public static final NSString NSAccessibilityForegroundColorTextAttribute = new NSString(NSAccessibilityForegroundColorTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityGridRole();
-public static final NSString NSAccessibilityGridRole = new NSString(NSAccessibilityGridRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityGroupRole();
+public static final native long NSAccessibilityGroupRole();
public static final NSString NSAccessibilityGroupRole = new NSString(NSAccessibilityGroupRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityHeaderAttribute();
+public static final native long NSAccessibilityHeaderAttribute();
public static final NSString NSAccessibilityHeaderAttribute = new NSString(NSAccessibilityHeaderAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityHelpAttribute();
+public static final native long NSAccessibilityHelpAttribute();
public static final NSString NSAccessibilityHelpAttribute = new NSString(NSAccessibilityHelpAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityHelpTagRole();
+public static final native long NSAccessibilityHelpTagRole();
public static final NSString NSAccessibilityHelpTagRole = new NSString(NSAccessibilityHelpTagRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityHorizontalOrientationValue();
+public static final native long NSAccessibilityHorizontalOrientationValue();
public static final NSString NSAccessibilityHorizontalOrientationValue = new NSString(NSAccessibilityHorizontalOrientationValue());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityHorizontalScrollBarAttribute();
-public static final NSString NSAccessibilityHorizontalScrollBarAttribute = new NSString(NSAccessibilityHorizontalScrollBarAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityImageRole();
+public static final native long NSAccessibilityImageRole();
public static final NSString NSAccessibilityImageRole = new NSString(NSAccessibilityImageRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityIncrementorRole();
-public static final NSString NSAccessibilityIncrementorRole = new NSString(NSAccessibilityIncrementorRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityIndexAttribute();
+public static final native long NSAccessibilityIndexAttribute();
public static final NSString NSAccessibilityIndexAttribute = new NSString(NSAccessibilityIndexAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityInsertionPointLineNumberAttribute();
+public static final native long NSAccessibilityInsertionPointLineNumberAttribute();
public static final NSString NSAccessibilityInsertionPointLineNumberAttribute = new NSString(NSAccessibilityInsertionPointLineNumberAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityLabelValueAttribute();
-public static final NSString NSAccessibilityLabelValueAttribute = new NSString(NSAccessibilityLabelValueAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityLineForIndexParameterizedAttribute();
+public static final native long NSAccessibilityLineForIndexParameterizedAttribute();
public static final NSString NSAccessibilityLineForIndexParameterizedAttribute = new NSString(NSAccessibilityLineForIndexParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityLinkRole();
+public static final native long NSAccessibilityLinkRole();
public static final NSString NSAccessibilityLinkRole = new NSString(NSAccessibilityLinkRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityLinkTextAttribute();
+public static final native long NSAccessibilityLinkTextAttribute();
public static final NSString NSAccessibilityLinkTextAttribute = new NSString(NSAccessibilityLinkTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityLinkedUIElementsAttribute();
-public static final NSString NSAccessibilityLinkedUIElementsAttribute = new NSString(NSAccessibilityLinkedUIElementsAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityListRole();
-public static final NSString NSAccessibilityListRole = new NSString(NSAccessibilityListRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMaxValueAttribute();
+public static final native long NSAccessibilityMaxValueAttribute();
public static final NSString NSAccessibilityMaxValueAttribute = new NSString(NSAccessibilityMaxValueAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMenuBarRole();
+public static final native long NSAccessibilityMenuBarRole();
public static final NSString NSAccessibilityMenuBarRole = new NSString(NSAccessibilityMenuBarRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMenuButtonRole();
+public static final native long NSAccessibilityMenuButtonRole();
public static final NSString NSAccessibilityMenuButtonRole = new NSString(NSAccessibilityMenuButtonRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMenuItemRole();
+public static final native long NSAccessibilityMenuItemRole();
public static final NSString NSAccessibilityMenuItemRole = new NSString(NSAccessibilityMenuItemRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMenuRole();
+public static final native long NSAccessibilityMenuRole();
public static final NSString NSAccessibilityMenuRole = new NSString(NSAccessibilityMenuRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMinValueAttribute();
+public static final native long NSAccessibilityMinValueAttribute();
public static final NSString NSAccessibilityMinValueAttribute = new NSString(NSAccessibilityMinValueAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMisspelledTextAttribute();
+public static final native long NSAccessibilityMisspelledTextAttribute();
public static final NSString NSAccessibilityMisspelledTextAttribute = new NSString(NSAccessibilityMisspelledTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityMovedNotification();
+public static final native long NSAccessibilityMovedNotification();
public static final NSString NSAccessibilityMovedNotification = new NSString(NSAccessibilityMovedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityNextContentsAttribute();
+public static final native long NSAccessibilityNextContentsAttribute();
public static final NSString NSAccessibilityNextContentsAttribute = new NSString(NSAccessibilityNextContentsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityNumberOfCharactersAttribute();
+public static final native long NSAccessibilityNumberOfCharactersAttribute();
public static final NSString NSAccessibilityNumberOfCharactersAttribute = new NSString(NSAccessibilityNumberOfCharactersAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityOrientationAttribute();
+public static final native long NSAccessibilityOrientationAttribute();
public static final NSString NSAccessibilityOrientationAttribute = new NSString(NSAccessibilityOrientationAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityOutlineRole();
+public static final native long NSAccessibilityOutlineRole();
public static final NSString NSAccessibilityOutlineRole = new NSString(NSAccessibilityOutlineRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityOutlineRowSubrole();
+public static final native long NSAccessibilityOutlineRowSubrole();
public static final NSString NSAccessibilityOutlineRowSubrole = new NSString(NSAccessibilityOutlineRowSubrole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityParentAttribute();
+public static final native long NSAccessibilityParentAttribute();
public static final NSString NSAccessibilityParentAttribute = new NSString(NSAccessibilityParentAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityPopUpButtonRole();
-public static final NSString NSAccessibilityPopUpButtonRole = new NSString(NSAccessibilityPopUpButtonRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityPositionAttribute();
+public static final native long NSAccessibilityPositionAttribute();
public static final NSString NSAccessibilityPositionAttribute = new NSString(NSAccessibilityPositionAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityPressAction();
+public static final native long NSAccessibilityPressAction();
public static final NSString NSAccessibilityPressAction = new NSString(NSAccessibilityPressAction());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityPreviousContentsAttribute();
+public static final native long NSAccessibilityPreviousContentsAttribute();
public static final NSString NSAccessibilityPreviousContentsAttribute = new NSString(NSAccessibilityPreviousContentsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityProgressIndicatorRole();
+public static final native long NSAccessibilityProgressIndicatorRole();
public static final NSString NSAccessibilityProgressIndicatorRole = new NSString(NSAccessibilityProgressIndicatorRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRTFForRangeParameterizedAttribute();
-public static final NSString NSAccessibilityRTFForRangeParameterizedAttribute = new NSString(NSAccessibilityRTFForRangeParameterizedAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRadioButtonRole();
+public static final native long NSAccessibilityRadioButtonRole();
public static final NSString NSAccessibilityRadioButtonRole = new NSString(NSAccessibilityRadioButtonRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRadioGroupRole();
-public static final NSString NSAccessibilityRadioGroupRole = new NSString(NSAccessibilityRadioGroupRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRangeForIndexParameterizedAttribute();
+public static final native long NSAccessibilityRangeForIndexParameterizedAttribute();
public static final NSString NSAccessibilityRangeForIndexParameterizedAttribute = new NSString(NSAccessibilityRangeForIndexParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRangeForLineParameterizedAttribute();
+public static final native long NSAccessibilityRangeForLineParameterizedAttribute();
public static final NSString NSAccessibilityRangeForLineParameterizedAttribute = new NSString(NSAccessibilityRangeForLineParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRangeForPositionParameterizedAttribute();
+public static final native long NSAccessibilityRangeForPositionParameterizedAttribute();
public static final NSString NSAccessibilityRangeForPositionParameterizedAttribute = new NSString(NSAccessibilityRangeForPositionParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityResizedNotification();
-public static final NSString NSAccessibilityResizedNotification = new NSString(NSAccessibilityResizedNotification());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRoleAttribute();
+public static final native long NSAccessibilityRoleAttribute();
public static final NSString NSAccessibilityRoleAttribute = new NSString(NSAccessibilityRoleAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRoleDescriptionAttribute();
+public static final native long NSAccessibilityRoleDescriptionAttribute();
public static final NSString NSAccessibilityRoleDescriptionAttribute = new NSString(NSAccessibilityRoleDescriptionAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRowCountChangedNotification();
+public static final native long NSAccessibilityRowCountChangedNotification();
public static final NSString NSAccessibilityRowCountChangedNotification = new NSString(NSAccessibilityRowCountChangedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRowRole();
+public static final native long NSAccessibilityRowIndexRangeAttribute();
+public static final NSString NSAccessibilityRowIndexRangeAttribute = new NSString(NSAccessibilityRowIndexRangeAttribute());
+/** @method flags=const */
+public static final native long NSAccessibilityRowRole();
public static final NSString NSAccessibilityRowRole = new NSString(NSAccessibilityRowRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityRowsAttribute();
+public static final native long NSAccessibilityRowsAttribute();
public static final NSString NSAccessibilityRowsAttribute = new NSString(NSAccessibilityRowsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityScrollAreaRole();
-public static final NSString NSAccessibilityScrollAreaRole = new NSString(NSAccessibilityScrollAreaRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityScrollBarRole();
+public static final native long NSAccessibilityScrollBarRole();
public static final NSString NSAccessibilityScrollBarRole = new NSString(NSAccessibilityScrollBarRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedAttribute();
+public static final native long NSAccessibilitySelectedAttribute();
public static final NSString NSAccessibilitySelectedAttribute = new NSString(NSAccessibilitySelectedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedChildrenAttribute();
+public static final native long NSAccessibilitySelectedChildrenAttribute();
public static final NSString NSAccessibilitySelectedChildrenAttribute = new NSString(NSAccessibilitySelectedChildrenAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedChildrenChangedNotification();
+public static final native long NSAccessibilitySelectedChildrenChangedNotification();
public static final NSString NSAccessibilitySelectedChildrenChangedNotification = new NSString(NSAccessibilitySelectedChildrenChangedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedColumnsAttribute();
+public static final native long NSAccessibilitySelectedColumnsAttribute();
public static final NSString NSAccessibilitySelectedColumnsAttribute = new NSString(NSAccessibilitySelectedColumnsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedRowsAttribute();
+public static final native long NSAccessibilitySelectedRowsAttribute();
public static final NSString NSAccessibilitySelectedRowsAttribute = new NSString(NSAccessibilitySelectedRowsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedRowsChangedNotification();
+public static final native long NSAccessibilitySelectedRowsChangedNotification();
public static final NSString NSAccessibilitySelectedRowsChangedNotification = new NSString(NSAccessibilitySelectedRowsChangedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedTextAttribute();
+public static final native long NSAccessibilitySelectedTextAttribute();
public static final NSString NSAccessibilitySelectedTextAttribute = new NSString(NSAccessibilitySelectedTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedTextChangedNotification();
+public static final native long NSAccessibilitySelectedTextChangedNotification();
public static final NSString NSAccessibilitySelectedTextChangedNotification = new NSString(NSAccessibilitySelectedTextChangedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedTextRangeAttribute();
+public static final native long NSAccessibilitySelectedTextRangeAttribute();
public static final NSString NSAccessibilitySelectedTextRangeAttribute = new NSString(NSAccessibilitySelectedTextRangeAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySelectedTextRangesAttribute();
+public static final native long NSAccessibilitySelectedTextRangesAttribute();
public static final NSString NSAccessibilitySelectedTextRangesAttribute = new NSString(NSAccessibilitySelectedTextRangesAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityServesAsTitleForUIElementsAttribute();
+public static final native long NSAccessibilityServesAsTitleForUIElementsAttribute();
public static final NSString NSAccessibilityServesAsTitleForUIElementsAttribute = new NSString(NSAccessibilityServesAsTitleForUIElementsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityShowMenuAction();
+public static final native long NSAccessibilityShowMenuAction();
public static final NSString NSAccessibilityShowMenuAction = new NSString(NSAccessibilityShowMenuAction());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySizeAttribute();
+public static final native long NSAccessibilitySizeAttribute();
public static final NSString NSAccessibilitySizeAttribute = new NSString(NSAccessibilitySizeAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySliderRole();
+public static final native long NSAccessibilitySliderRole();
public static final NSString NSAccessibilitySliderRole = new NSString(NSAccessibilitySliderRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySortButtonRole();
-public static final NSString NSAccessibilitySortButtonRole = new NSString(NSAccessibilitySortButtonRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySplitterRole();
+public static final native long NSAccessibilitySplitterRole();
public static final NSString NSAccessibilitySplitterRole = new NSString(NSAccessibilitySplitterRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityStandardWindowSubrole();
-public static final NSString NSAccessibilityStandardWindowSubrole = new NSString(NSAccessibilityStandardWindowSubrole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityStaticTextRole();
+public static final native long NSAccessibilityStaticTextRole();
public static final NSString NSAccessibilityStaticTextRole = new NSString(NSAccessibilityStaticTextRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityStrikethroughColorTextAttribute();
+public static final native long NSAccessibilityStrikethroughColorTextAttribute();
public static final NSString NSAccessibilityStrikethroughColorTextAttribute = new NSString(NSAccessibilityStrikethroughColorTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityStrikethroughTextAttribute();
+public static final native long NSAccessibilityStrikethroughTextAttribute();
public static final NSString NSAccessibilityStrikethroughTextAttribute = new NSString(NSAccessibilityStrikethroughTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityStringForRangeParameterizedAttribute();
+public static final native long NSAccessibilityStringForRangeParameterizedAttribute();
public static final NSString NSAccessibilityStringForRangeParameterizedAttribute = new NSString(NSAccessibilityStringForRangeParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityStyleRangeForIndexParameterizedAttribute();
+public static final native long NSAccessibilityStyleRangeForIndexParameterizedAttribute();
public static final NSString NSAccessibilityStyleRangeForIndexParameterizedAttribute = new NSString(NSAccessibilityStyleRangeForIndexParameterizedAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySubroleAttribute();
+public static final native long NSAccessibilitySubroleAttribute();
public static final NSString NSAccessibilitySubroleAttribute = new NSString(NSAccessibilitySubroleAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySuperscriptTextAttribute();
-public static final NSString NSAccessibilitySuperscriptTextAttribute = new NSString(NSAccessibilitySuperscriptTextAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilitySystemDialogSubrole();
-public static final NSString NSAccessibilitySystemDialogSubrole = new NSString(NSAccessibilitySystemDialogSubrole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTabGroupRole();
+public static final native long NSAccessibilityTabGroupRole();
public static final NSString NSAccessibilityTabGroupRole = new NSString(NSAccessibilityTabGroupRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTableRole();
+public static final native long NSAccessibilityTableRole();
public static final NSString NSAccessibilityTableRole = new NSString(NSAccessibilityTableRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTableRowSubrole();
+public static final native long NSAccessibilityTableRowSubrole();
public static final NSString NSAccessibilityTableRowSubrole = new NSString(NSAccessibilityTableRowSubrole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTabsAttribute();
+public static final native long NSAccessibilityTabsAttribute();
public static final NSString NSAccessibilityTabsAttribute = new NSString(NSAccessibilityTabsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTextAreaRole();
+public static final native long NSAccessibilityTextAreaRole();
public static final NSString NSAccessibilityTextAreaRole = new NSString(NSAccessibilityTextAreaRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTextFieldRole();
+public static final native long NSAccessibilityTextFieldRole();
public static final NSString NSAccessibilityTextFieldRole = new NSString(NSAccessibilityTextFieldRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTextLinkSubrole();
-public static final NSString NSAccessibilityTextLinkSubrole = new NSString(NSAccessibilityTextLinkSubrole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTitleAttribute();
+public static final native long NSAccessibilityTitleAttribute();
public static final NSString NSAccessibilityTitleAttribute = new NSString(NSAccessibilityTitleAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTitleChangedNotification();
+public static final native long NSAccessibilityTitleChangedNotification();
public static final NSString NSAccessibilityTitleChangedNotification = new NSString(NSAccessibilityTitleChangedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTitleUIElementAttribute();
+public static final native long NSAccessibilityTitleUIElementAttribute();
public static final NSString NSAccessibilityTitleUIElementAttribute = new NSString(NSAccessibilityTitleUIElementAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityToolbarRole();
+public static final native long NSAccessibilityToolbarRole();
public static final NSString NSAccessibilityToolbarRole = new NSString(NSAccessibilityToolbarRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityTopLevelUIElementAttribute();
+public static final native long NSAccessibilityTopLevelUIElementAttribute();
public static final NSString NSAccessibilityTopLevelUIElementAttribute = new NSString(NSAccessibilityTopLevelUIElementAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityURLAttribute();
-public static final NSString NSAccessibilityURLAttribute = new NSString(NSAccessibilityURLAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityUnderlineColorTextAttribute();
+public static final native long NSAccessibilityUnderlineColorTextAttribute();
public static final NSString NSAccessibilityUnderlineColorTextAttribute = new NSString(NSAccessibilityUnderlineColorTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityUnderlineTextAttribute();
+public static final native long NSAccessibilityUnderlineTextAttribute();
public static final NSString NSAccessibilityUnderlineTextAttribute = new NSString(NSAccessibilityUnderlineTextAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityUnknownRole();
+public static final native long NSAccessibilityUnknownRole();
public static final NSString NSAccessibilityUnknownRole = new NSString(NSAccessibilityUnknownRole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityUnknownSubrole();
+public static final native long NSAccessibilityUnknownSubrole();
public static final NSString NSAccessibilityUnknownSubrole = new NSString(NSAccessibilityUnknownSubrole());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityValueAttribute();
+public static final native long NSAccessibilityValueAttribute();
public static final NSString NSAccessibilityValueAttribute = new NSString(NSAccessibilityValueAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityValueChangedNotification();
+public static final native long NSAccessibilityValueChangedNotification();
public static final NSString NSAccessibilityValueChangedNotification = new NSString(NSAccessibilityValueChangedNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityValueDescriptionAttribute();
-public static final NSString NSAccessibilityValueDescriptionAttribute = new NSString(NSAccessibilityValueDescriptionAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityValueIndicatorRole();
-public static final NSString NSAccessibilityValueIndicatorRole = new NSString(NSAccessibilityValueIndicatorRole());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityVerticalOrientationValue();
+public static final native long NSAccessibilityVerticalOrientationValue();
public static final NSString NSAccessibilityVerticalOrientationValue = new NSString(NSAccessibilityVerticalOrientationValue());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityVerticalScrollBarAttribute();
-public static final NSString NSAccessibilityVerticalScrollBarAttribute = new NSString(NSAccessibilityVerticalScrollBarAttribute());
-/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityVisibleCharacterRangeAttribute();
+public static final native long NSAccessibilityVisibleCharacterRangeAttribute();
public static final NSString NSAccessibilityVisibleCharacterRangeAttribute = new NSString(NSAccessibilityVisibleCharacterRangeAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityVisibleChildrenAttribute();
+public static final native long NSAccessibilityVisibleChildrenAttribute();
public static final NSString NSAccessibilityVisibleChildrenAttribute = new NSString(NSAccessibilityVisibleChildrenAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityVisibleColumnsAttribute();
+public static final native long NSAccessibilityVisibleColumnsAttribute();
public static final NSString NSAccessibilityVisibleColumnsAttribute = new NSString(NSAccessibilityVisibleColumnsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityVisibleNameKey();
+public static final native long NSAccessibilityVisibleNameKey();
public static final NSString NSAccessibilityVisibleNameKey = new NSString(NSAccessibilityVisibleNameKey());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityVisibleRowsAttribute();
+public static final native long NSAccessibilityVisibleRowsAttribute();
public static final NSString NSAccessibilityVisibleRowsAttribute = new NSString(NSAccessibilityVisibleRowsAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityWindowAttribute();
+public static final native long NSAccessibilityWindowAttribute();
public static final NSString NSAccessibilityWindowAttribute = new NSString(NSAccessibilityWindowAttribute());
/** @method flags=const */
-public static final native long /*int*/ NSAccessibilityWindowRole();
+public static final native long NSAccessibilityWindowRole();
public static final NSString NSAccessibilityWindowRole = new NSString(NSAccessibilityWindowRole());
/** @method flags=const */
-public static final native long /*int*/ NSApplicationDidChangeScreenParametersNotification();
+public static final native long NSApplicationDidChangeScreenParametersNotification();
public static final NSString NSApplicationDidChangeScreenParametersNotification = new NSString(NSApplicationDidChangeScreenParametersNotification());
/** @method flags=const */
-public static final native long /*int*/ NSAttachmentAttributeName();
+public static final native long NSAttachmentAttributeName();
public static final NSString NSAttachmentAttributeName = new NSString(NSAttachmentAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSBackgroundColorAttributeName();
+public static final native long NSBackgroundColorAttributeName();
public static final NSString NSBackgroundColorAttributeName = new NSString(NSBackgroundColorAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSBaselineOffsetAttributeName();
+public static final native long NSBaselineOffsetAttributeName();
public static final NSString NSBaselineOffsetAttributeName = new NSString(NSBaselineOffsetAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSCalibratedRGBColorSpace();
-public static final NSString NSCalibratedRGBColorSpace = new NSString(NSCalibratedRGBColorSpace());
-/** @method flags=const */
-public static final native long /*int*/ NSCursorAttributeName();
+public static final native long NSCursorAttributeName();
public static final NSString NSCursorAttributeName = new NSString(NSCursorAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSDeviceRGBColorSpace();
+public static final native long NSDeviceRGBColorSpace();
public static final NSString NSDeviceRGBColorSpace = new NSString(NSDeviceRGBColorSpace());
/** @method flags=const */
-public static final native long /*int*/ NSDeviceResolution();
+public static final native long NSDeviceResolution();
public static final NSString NSDeviceResolution = new NSString(NSDeviceResolution());
/** @method flags=const */
-public static final native long /*int*/ NSDragPboard();
+public static final native long NSDragPboard();
public static final NSString NSDragPboard = new NSString(NSDragPboard());
/** @method flags=const */
-public static final native long /*int*/ NSEventTrackingRunLoopMode();
+public static final native long NSEventTrackingRunLoopMode();
public static final NSString NSEventTrackingRunLoopMode = new NSString(NSEventTrackingRunLoopMode());
/** @method flags=const */
-public static final native long /*int*/ NSFilenamesPboardType();
+public static final native long NSFilenamesPboardType();
public static final NSString NSFilenamesPboardType = new NSString(NSFilenamesPboardType());
/** @method flags=const */
-public static final native long /*int*/ NSFontAttributeName();
+public static final native long NSFontAttributeName();
public static final NSString NSFontAttributeName = new NSString(NSFontAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSForegroundColorAttributeName();
+public static final native long NSForegroundColorAttributeName();
public static final NSString NSForegroundColorAttributeName = new NSString(NSForegroundColorAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSLigatureAttributeName();
+public static final native long NSImageNameCaution();
+public static final NSString NSImageNameCaution = new NSString(NSImageNameCaution());
+/** @method flags=const */
+public static final native long NSImageNameInfo();
+public static final NSString NSImageNameInfo = new NSString(NSImageNameInfo());
+/** @method flags=const */
+public static final native long NSLigatureAttributeName();
public static final NSString NSLigatureAttributeName = new NSString(NSLigatureAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSLinkAttributeName();
+public static final native long NSLinkAttributeName();
public static final NSString NSLinkAttributeName = new NSString(NSLinkAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSModalPanelRunLoopMode();
+public static final native long NSModalPanelRunLoopMode();
public static final NSString NSModalPanelRunLoopMode = new NSString(NSModalPanelRunLoopMode());
/** @method flags=const */
-public static final native long /*int*/ NSObliquenessAttributeName();
+public static final native long NSObliquenessAttributeName();
public static final NSString NSObliquenessAttributeName = new NSString(NSObliquenessAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSOutlineViewColumnDidMoveNotification();
-public static final NSString NSOutlineViewColumnDidMoveNotification = new NSString(NSOutlineViewColumnDidMoveNotification());
-/** @method flags=const */
-public static final native long /*int*/ NSParagraphStyleAttributeName();
+public static final native long NSParagraphStyleAttributeName();
public static final NSString NSParagraphStyleAttributeName = new NSString(NSParagraphStyleAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSPasteboardTypeHTML();
+public static final native long NSPasteboardTypeHTML();
public static final NSString NSPasteboardTypeHTML = new NSString(NSPasteboardTypeHTML());
/** @method flags=const */
-public static final native long /*int*/ NSPasteboardTypeRTF();
+public static final native long NSPasteboardTypeRTF();
public static final NSString NSPasteboardTypeRTF = new NSString(NSPasteboardTypeRTF());
/** @method flags=const */
-public static final native long /*int*/ NSPasteboardTypeString();
+public static final native long NSPasteboardTypeString();
public static final NSString NSPasteboardTypeString = new NSString(NSPasteboardTypeString());
/** @method flags=const */
-public static final native long /*int*/ NSPrintAllPages();
+public static final native long NSPrintAllPages();
public static final NSString NSPrintAllPages = new NSString(NSPrintAllPages());
/** @method flags=const */
-public static final native long /*int*/ NSPrintCopies();
+public static final native long NSPrintCopies();
public static final NSString NSPrintCopies = new NSString(NSPrintCopies());
/** @method flags=const */
-public static final native long /*int*/ NSPrintFirstPage();
+public static final native long NSPrintFirstPage();
public static final NSString NSPrintFirstPage = new NSString(NSPrintFirstPage());
/** @method flags=const */
-public static final native long /*int*/ NSPrintJobDisposition();
+public static final native long NSPrintJobDisposition();
public static final NSString NSPrintJobDisposition = new NSString(NSPrintJobDisposition());
/** @method flags=const */
-public static final native long /*int*/ NSPrintLastPage();
+public static final native long NSPrintLastPage();
public static final NSString NSPrintLastPage = new NSString(NSPrintLastPage());
/** @method flags=const */
-public static final native long /*int*/ NSPrintMustCollate();
+public static final native long NSPrintMustCollate();
public static final NSString NSPrintMustCollate = new NSString(NSPrintMustCollate());
/** @method flags=const */
-public static final native long /*int*/ NSPrintOrientation();
+public static final native long NSPrintOrientation();
public static final NSString NSPrintOrientation = new NSString(NSPrintOrientation());
/** @method flags=const */
-public static final native long /*int*/ NSPrintPreviewJob();
+public static final native long NSPrintPreviewJob();
public static final NSString NSPrintPreviewJob = new NSString(NSPrintPreviewJob());
/** @method flags=const */
-public static final native long /*int*/ NSPrintSaveJob();
+public static final native long NSPrintSaveJob();
public static final NSString NSPrintSaveJob = new NSString(NSPrintSaveJob());
/** @method flags=const */
-public static final native long /*int*/ NSPrintSavePath();
+public static final native long NSPrintSavePath();
public static final NSString NSPrintSavePath = new NSString(NSPrintSavePath());
/** @method flags=const */
-public static final native long /*int*/ NSPrintScalingFactor();
+public static final native long NSPrintScalingFactor();
public static final NSString NSPrintScalingFactor = new NSString(NSPrintScalingFactor());
/** @method flags=const */
-public static final native long /*int*/ NSPrintSpoolJob();
-public static final NSString NSPrintSpoolJob = new NSString(NSPrintSpoolJob());
-/** @method flags=const */
-public static final native long /*int*/ NSSpellingStateAttributeName();
-public static final NSString NSSpellingStateAttributeName = new NSString(NSSpellingStateAttributeName());
-/** @method flags=const */
-public static final native double /*float*/ NSSquareStatusItemLength();
+public static final native double NSSquareStatusItemLength();
/** @method flags=const */
-public static final native long /*int*/ NSStrikethroughColorAttributeName();
+public static final native long NSStrikethroughColorAttributeName();
public static final NSString NSStrikethroughColorAttributeName = new NSString(NSStrikethroughColorAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSStrikethroughStyleAttributeName();
+public static final native long NSStrikethroughStyleAttributeName();
public static final NSString NSStrikethroughStyleAttributeName = new NSString(NSStrikethroughStyleAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSStrokeWidthAttributeName();
+public static final native long NSStrokeWidthAttributeName();
public static final NSString NSStrokeWidthAttributeName = new NSString(NSStrokeWidthAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSSystemColorsDidChangeNotification();
+public static final native long NSSystemColorsDidChangeNotification();
public static final NSString NSSystemColorsDidChangeNotification = new NSString(NSSystemColorsDidChangeNotification());
/** @method flags=const */
-public static final native long /*int*/ NSTIFFPboardType();
+public static final native long NSTIFFPboardType();
public static final NSString NSTIFFPboardType = new NSString(NSTIFFPboardType());
/** @method flags=const */
-public static final native long /*int*/ NSTableViewColumnDidMoveNotification();
-public static final NSString NSTableViewColumnDidMoveNotification = new NSString(NSTableViewColumnDidMoveNotification());
-/** @method flags=const */
-public static final native long /*int*/ NSToolbarCustomizeToolbarItemIdentifier();
-public static final NSString NSToolbarCustomizeToolbarItemIdentifier = new NSString(NSToolbarCustomizeToolbarItemIdentifier());
-/** @method flags=const */
-public static final native long /*int*/ NSToolbarDidRemoveItemNotification();
-public static final NSString NSToolbarDidRemoveItemNotification = new NSString(NSToolbarDidRemoveItemNotification());
-/** @method flags=const */
-public static final native long /*int*/ NSToolbarFlexibleSpaceItemIdentifier();
+public static final native long NSToolbarFlexibleSpaceItemIdentifier();
public static final NSString NSToolbarFlexibleSpaceItemIdentifier = new NSString(NSToolbarFlexibleSpaceItemIdentifier());
/** @method flags=const */
-public static final native long /*int*/ NSToolbarPrintItemIdentifier();
-public static final NSString NSToolbarPrintItemIdentifier = new NSString(NSToolbarPrintItemIdentifier());
-/** @method flags=const */
-public static final native long /*int*/ NSToolbarSeparatorItemIdentifier();
-public static final NSString NSToolbarSeparatorItemIdentifier = new NSString(NSToolbarSeparatorItemIdentifier());
-/** @method flags=const */
-public static final native long /*int*/ NSToolbarShowColorsItemIdentifier();
-public static final NSString NSToolbarShowColorsItemIdentifier = new NSString(NSToolbarShowColorsItemIdentifier());
-/** @method flags=const */
-public static final native long /*int*/ NSToolbarShowFontsItemIdentifier();
-public static final NSString NSToolbarShowFontsItemIdentifier = new NSString(NSToolbarShowFontsItemIdentifier());
-/** @method flags=const */
-public static final native long /*int*/ NSToolbarSpaceItemIdentifier();
+public static final native long NSToolbarSpaceItemIdentifier();
public static final NSString NSToolbarSpaceItemIdentifier = new NSString(NSToolbarSpaceItemIdentifier());
/** @method flags=const */
-public static final native long /*int*/ NSToolbarWillAddItemNotification();
-public static final NSString NSToolbarWillAddItemNotification = new NSString(NSToolbarWillAddItemNotification());
-/** @method flags=const */
-public static final native long /*int*/ NSURLPboardType();
+public static final native long NSURLPboardType();
public static final NSString NSURLPboardType = new NSString(NSURLPboardType());
/** @method flags=const */
-public static final native long /*int*/ NSUnderlineColorAttributeName();
+public static final native long NSUnderlineColorAttributeName();
public static final NSString NSUnderlineColorAttributeName = new NSString(NSUnderlineColorAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSUnderlineStyleAttributeName();
+public static final native long NSUnderlineStyleAttributeName();
public static final NSString NSUnderlineStyleAttributeName = new NSString(NSUnderlineStyleAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSViewGlobalFrameDidChangeNotification();
+public static final native long NSViewGlobalFrameDidChangeNotification();
public static final NSString NSViewGlobalFrameDidChangeNotification = new NSString(NSViewGlobalFrameDidChangeNotification());
/** @method flags=const */
-public static final native long /*int*/ NSWindowDidBecomeKeyNotification();
+public static final native long NSWindowDidBecomeKeyNotification();
public static final NSString NSWindowDidBecomeKeyNotification = new NSString(NSWindowDidBecomeKeyNotification());
/** @method flags=const */
-public static final native long /*int*/ NSWindowDidDeminiaturizeNotification();
+public static final native long NSWindowDidDeminiaturizeNotification();
public static final NSString NSWindowDidDeminiaturizeNotification = new NSString(NSWindowDidDeminiaturizeNotification());
/** @method flags=const */
-public static final native long /*int*/ NSWindowDidMiniaturizeNotification();
+public static final native long NSWindowDidMiniaturizeNotification();
public static final NSString NSWindowDidMiniaturizeNotification = new NSString(NSWindowDidMiniaturizeNotification());
/** @method flags=const */
-public static final native long /*int*/ NSWindowDidMoveNotification();
+public static final native long NSWindowDidMoveNotification();
public static final NSString NSWindowDidMoveNotification = new NSString(NSWindowDidMoveNotification());
/** @method flags=const */
-public static final native long /*int*/ NSWindowDidResignKeyNotification();
+public static final native long NSWindowDidResignKeyNotification();
public static final NSString NSWindowDidResignKeyNotification = new NSString(NSWindowDidResignKeyNotification());
/** @method flags=const */
-public static final native long /*int*/ NSWindowDidResizeNotification();
+public static final native long NSWindowDidResizeNotification();
public static final NSString NSWindowDidResizeNotification = new NSString(NSWindowDidResizeNotification());
/** @method flags=const */
-public static final native long /*int*/ NSWindowWillCloseNotification();
+public static final native long NSWindowWillCloseNotification();
public static final NSString NSWindowWillCloseNotification = new NSString(NSWindowWillCloseNotification());
/** @method flags=const */
-public static final native long /*int*/ kCFAllocatorDefault();
-/** @method flags=const */
-public static final native long /*int*/ kCFRunLoopCommonModes();
-/** @method flags=const */
-public static final native long /*int*/ kCTFontAttributeName();
+public static final native long kCFAllocatorDefault();
/** @method flags=const */
-public static final native long /*int*/ kCTForegroundColorAttributeName();
+public static final native long kCFRunLoopCommonModes();
/** @method flags=const */
-public static final native long /*int*/ kCTParagraphStyleAttributeName();
-/** @method flags=const */
-public static final native long /*int*/ NSDefaultRunLoopMode();
+public static final native long NSDefaultRunLoopMode();
public static final NSString NSDefaultRunLoopMode = new NSString(NSDefaultRunLoopMode());
/** @method flags=const */
-public static final native long /*int*/ NSErrorFailingURLStringKey();
-public static final NSString NSErrorFailingURLStringKey = new NSString(NSErrorFailingURLStringKey());
-/** @method flags=const */
-public static final native long /*int*/ NSLocaleLanguageCode();
+public static final native long NSLocaleLanguageCode();
public static final NSString NSLocaleLanguageCode = new NSString(NSLocaleLanguageCode());
/** @method flags=const */
-public static final native long /*int*/ NSNotFound();
+public static final native long NSNotFound();
/** Functions */
/**
- * @param action cast=(NSString*)
- */
-public static final native long /*int*/ NSAccessibilityActionDescription(long /*int*/ action);
-/**
* @param element cast=(id)
* @param notification cast=(NSString*)
*/
-public static final native void NSAccessibilityPostNotification(long /*int*/ element, long /*int*/ notification);
-/**
- * @param element cast=(id)
- * @param attribute cast=(NSString*)
- * @param value cast=(id)
- */
-public static final native void NSAccessibilityRaiseBadArgumentException(long /*int*/ element, long /*int*/ attribute, long /*int*/ value);
+public static final native void NSAccessibilityPostNotification(long element, long notification);
/**
* @param role cast=(NSString*)
* @param subrole cast=(NSString*)
*/
-public static final native long /*int*/ NSAccessibilityRoleDescription(long /*int*/ role, long /*int*/ subrole);
+public static final native long NSAccessibilityRoleDescription(long role, long subrole);
/**
* @param element cast=(id)
*/
-public static final native long /*int*/ NSAccessibilityRoleDescriptionForUIElement(long /*int*/ element);
-/**
- * @param element cast=(id)
- */
-public static final native long /*int*/ NSAccessibilityUnignoredAncestor(long /*int*/ element);
+public static final native long NSAccessibilityUnignoredAncestor(long element);
/**
* @param originalChildren cast=(NSArray*)
*/
-public static final native long /*int*/ NSAccessibilityUnignoredChildren(long /*int*/ originalChildren);
-/**
- * @param originalChild cast=(id)
- */
-public static final native long /*int*/ NSAccessibilityUnignoredChildrenForOnlyChild(long /*int*/ originalChild);
-/**
- * @param element cast=(id)
- */
-public static final native long /*int*/ NSAccessibilityUnignoredDescendant(long /*int*/ element);
+public static final native long NSAccessibilityUnignoredChildren(long originalChildren);
public static final native void NSBeep();
/**
* @param depth cast=(NSWindowDepth)
*/
-public static final native long /*int*/ NSBitsPerPixelFromDepth(int depth);
-/**
- * @param count cast=(NSInteger*)
- */
-public static final native void NSCountWindows(long[] /*int[]*/ count);
-/**
- * @param colorSpaceName cast=(NSString*)
- */
-public static final native long /*int*/ NSNumberOfColorComponents(long /*int*/ colorSpaceName);
+public static final native long NSBitsPerPixelFromDepth(int depth);
/**
* @param aRect flags=struct
* @param op cast=(NSCompositingOperation)
*/
-public static final native void NSRectFillUsingOperation(NSRect aRect, long /*int*/ op);
-/**
- * @param alloc cast=(CFAllocatorRef)
- * @param str cast=(CFStringRef)
- * @param attributes cast=(CFDictionaryRef)
- */
-public static final native long /*int*/ CFAttributedStringCreate(long /*int*/ alloc, long /*int*/ str, long /*int*/ attributes);
+public static final native void NSRectFillUsingOperation(NSRect aRect, long op);
/**
* @param theData cast=(CFDataRef)
*/
-public static final native long /*int*/ CFDataGetBytePtr(long /*int*/ theData);
+public static final native long CFDataGetBytePtr(long theData);
/**
* @param theData cast=(CFDataRef)
*/
-public static final native long /*int*/ CFDataGetLength(long /*int*/ theData);
-/**
- * @param theDict cast=(CFMutableDictionaryRef)
- * @param key cast=(void*)
- * @param value cast=(void*)
- */
-public static final native void CFDictionaryAddValue(long /*int*/ theDict, long /*int*/ key, long /*int*/ value);
-/**
- * @param allocator cast=(CFAllocatorRef)
- * @param capacity cast=(CFIndex)
- * @param keyCallBacks cast=(CFDictionaryKeyCallBacks*)
- * @param valueCallBacks cast=(CFDictionaryValueCallBacks*)
- */
-public static final native long /*int*/ CFDictionaryCreateMutable(long /*int*/ allocator, long /*int*/ capacity, long /*int*/ keyCallBacks, long /*int*/ valueCallBacks);
+public static final native long CFDataGetLength(long theData);
/**
* @param cf cast=(CFTypeRef)
*/
-public static final native void CFRelease(long /*int*/ cf);
+public static final native void CFRelease(long cf);
/**
* @param rl cast=(CFRunLoopRef)
* @param observer cast=(CFRunLoopObserverRef)
* @param mode cast=(CFStringRef)
*/
-public static final native void CFRunLoopAddObserver(long /*int*/ rl, long /*int*/ observer, long /*int*/ mode);
-public static final native long /*int*/ CFRunLoopGetCurrent();
+public static final native void CFRunLoopAddObserver(long rl, long observer, long mode);
+public static final native long CFRunLoopGetCurrent();
/**
* @param allocator cast=(CFAllocatorRef)
* @param activities cast=(CFOptionFlags)
@@ -3376,32 +2965,16 @@ public static final native long /*int*/ CFRunLoopGetCurrent();
* @param callout cast=(CFRunLoopObserverCallBack)
* @param context cast=(CFRunLoopObserverContext*)
*/
-public static final native long /*int*/ CFRunLoopObserverCreate(long /*int*/ allocator, long /*int*/ activities, boolean repeats, long /*int*/ order, long /*int*/ callout, long /*int*/ context);
+public static final native long CFRunLoopObserverCreate(long allocator, long activities, boolean repeats, long order, long callout, long context);
/**
* @param observer cast=(CFRunLoopObserverRef)
*/
-public static final native void CFRunLoopObserverInvalidate(long /*int*/ observer);
-/**
- * @param mode cast=(CFStringRef)
- * @param seconds cast=(CFTimeInterval)
- * @param returnAfterSourceHandled cast=(Boolean)
- */
-public static final native int CFRunLoopRunInMode(long /*int*/ mode, double seconds, boolean returnAfterSourceHandled);
-/**
- * @param rl cast=(CFRunLoopRef)
- */
-public static final native void CFRunLoopStop(long /*int*/ rl);
-/**
- * @param alloc cast=(CFAllocatorRef)
- * @param chars cast=(UniChar*)
- * @param numChars cast=(CFIndex)
- */
-public static final native long /*int*/ CFStringCreateWithCharacters(long /*int*/ alloc, char[] chars, long /*int*/ numChars);
+public static final native void CFRunLoopObserverInvalidate(long observer);
/**
* @param allocator cast=(CFAllocatorRef)
* @param fsRef cast=(FSRef*)
*/
-public static final native long /*int*/ CFURLCreateFromFSRef(long /*int*/ allocator, byte[] fsRef);
+public static final native long CFURLCreateFromFSRef(long allocator, byte[] fsRef);
/**
* @param allocator cast=(CFAllocatorRef)
* @param originalString cast=(CFStringRef)
@@ -3409,246 +2982,217 @@ public static final native long /*int*/ CFURLCreateFromFSRef(long /*int*/ alloca
* @param legalURLCharactersToBeEscaped cast=(CFStringRef)
* @param encoding cast=(CFStringEncoding)
*/
-public static final native long /*int*/ CFURLCreateStringByAddingPercentEscapes(long /*int*/ allocator, long /*int*/ originalString, long /*int*/ charactersToLeaveUnescaped, long /*int*/ legalURLCharactersToBeEscaped, int encoding);
+public static final native long CFURLCreateStringByAddingPercentEscapes(long allocator, long originalString, long charactersToLeaveUnescaped, long legalURLCharactersToBeEscaped, int encoding);
/**
* @param data cast=(void*)
* @param width cast=(size_t)
* @param height cast=(size_t)
* @param bitsPerComponent cast=(size_t)
* @param bytesPerRow cast=(size_t)
- * @param colorspace cast=(CGColorSpaceRef)
+ * @param space cast=(CGColorSpaceRef)
* @param bitmapInfo cast=(CGBitmapInfo)
*/
-public static final native long /*int*/ CGBitmapContextCreate(long /*int*/ data, long /*int*/ width, long /*int*/ height, long /*int*/ bitsPerComponent, long /*int*/ bytesPerRow, long /*int*/ colorspace, int bitmapInfo);
-/**
- * @param c cast=(CGContextRef)
- */
-public static final native long /*int*/ CGBitmapContextCreateImage(long /*int*/ c);
-/**
- * @param c cast=(CGContextRef)
- */
-public static final native long /*int*/ CGBitmapContextGetData(long /*int*/ c);
+public static final native long CGBitmapContextCreate(long data, long width, long height, long bitsPerComponent, long bytesPerRow, long space, int bitmapInfo);
/**
* @param space cast=(CGColorSpaceRef)
* @param components cast=(CGFloat*)
*/
-public static final native long /*int*/ CGColorCreate(long /*int*/ space, double[] /*float[]*/ components);
+public static final native long CGColorCreate(long space, double[] components);
/**
* @param color cast=(CGColorRef)
*/
-public static final native void CGColorRelease(long /*int*/ color);
-public static final native long /*int*/ CGColorSpaceCreateDeviceRGB();
+public static final native void CGColorRelease(long color);
+public static final native long CGColorSpaceCreateDeviceRGB();
/**
* @param space cast=(CGColorSpaceRef)
*/
-public static final native void CGColorSpaceRelease(long /*int*/ space);
+public static final native void CGColorSpaceRelease(long space);
/**
* @param context cast=(CGContextRef)
* @param path cast=(CGPathRef)
*/
-public static final native void CGContextAddPath(long /*int*/ context, long /*int*/ path);
+public static final native void CGContextAddPath(long context, long path);
/**
* @param context cast=(CGContextRef)
* @param rect flags=struct
* @param auxiliaryInfo cast=(CFDictionaryRef)
*/
-public static final native void CGContextBeginTransparencyLayerWithRect(long /*int*/ context, CGRect rect, long /*int*/ auxiliaryInfo);
+public static final native void CGContextBeginTransparencyLayerWithRect(long context, CGRect rect, long auxiliaryInfo);
+/**
+ * @param context cast=(CGContextRef)
+ */
+public static final native long CGContextCopyPath(long context);
/**
* @param c cast=(CGContextRef)
* @param rect flags=struct
* @param image cast=(CGImageRef)
*/
-public static final native void CGContextDrawImage(long /*int*/ c, CGRect rect, long /*int*/ image);
+public static final native void CGContextDrawImage(long c, CGRect rect, long image);
/**
* @param context cast=(CGContextRef)
*/
-public static final native void CGContextEndTransparencyLayer(long /*int*/ context);
+public static final native void CGContextEndTransparencyLayer(long context);
/**
* @param c cast=(CGContextRef)
* @param rect flags=struct
*/
-public static final native void CGContextFillRect(long /*int*/ c, CGRect rect);
+public static final native void CGContextFillRect(long c, CGRect rect);
/**
* @param c cast=(CGContextRef)
*/
-public static final native void CGContextRelease(long /*int*/ c);
+public static final native void CGContextRelease(long c);
/**
* @param c cast=(CGContextRef)
*/
-public static final native void CGContextReplacePathWithStrokedPath(long /*int*/ c);
+public static final native void CGContextReplacePathWithStrokedPath(long c);
/**
* @param c cast=(CGContextRef)
*/
-public static final native void CGContextRestoreGState(long /*int*/ c);
+public static final native void CGContextRestoreGState(long c);
/**
* @param c cast=(CGContextRef)
*/
-public static final native void CGContextSaveGState(long /*int*/ c);
+public static final native void CGContextSaveGState(long c);
/**
* @param c cast=(CGContextRef)
* @param sx cast=(CGFloat)
* @param sy cast=(CGFloat)
*/
-public static final native void CGContextScaleCTM(long /*int*/ c, double /*float*/ sx, double /*float*/ sy);
+public static final native void CGContextScaleCTM(long c, double sx, double sy);
/**
* @param context cast=(CGContextRef)
* @param mode cast=(CGBlendMode)
*/
-public static final native void CGContextSetBlendMode(long /*int*/ context, int mode);
+public static final native void CGContextSetBlendMode(long context, int mode);
/**
- * @param c cast=(CGContextRef)
+ * @param context cast=(CGContextRef)
* @param components cast=(CGFloat*)
*/
-public static final native void CGContextSetFillColor(long /*int*/ c, double[] /*float[]*/ components);
+public static final native void CGContextSetFillColor(long context, double[] components);
/**
- * @param c cast=(CGContextRef)
- * @param colorspace cast=(CGColorSpaceRef)
+ * @param context cast=(CGContextRef)
+ * @param space cast=(CGColorSpaceRef)
*/
-public static final native void CGContextSetFillColorSpace(long /*int*/ c, long /*int*/ colorspace);
+public static final native void CGContextSetFillColorSpace(long context, long space);
/**
* @param c cast=(CGContextRef)
* @param cap cast=(CGLineCap)
*/
-public static final native void CGContextSetLineCap(long /*int*/ c, int cap);
+public static final native void CGContextSetLineCap(long c, int cap);
/**
* @param c cast=(CGContextRef)
* @param phase cast=(CGFloat)
* @param lengths cast=(CGFloat*)
* @param count cast=(size_t)
*/
-public static final native void CGContextSetLineDash(long /*int*/ c, double /*float*/ phase, float[] lengths, long /*int*/ count);
+public static final native void CGContextSetLineDash(long c, double phase, double[] lengths, long count);
/**
* @param c cast=(CGContextRef)
* @param join cast=(CGLineJoin)
*/
-public static final native void CGContextSetLineJoin(long /*int*/ c, int join);
+public static final native void CGContextSetLineJoin(long c, int join);
/**
* @param c cast=(CGContextRef)
* @param width cast=(CGFloat)
*/
-public static final native void CGContextSetLineWidth(long /*int*/ c, double /*float*/ width);
+public static final native void CGContextSetLineWidth(long c, double width);
/**
* @param c cast=(CGContextRef)
* @param limit cast=(CGFloat)
*/
-public static final native void CGContextSetMiterLimit(long /*int*/ c, double /*float*/ limit);
-/**
- * @param c cast=(CGContextRef)
- * @param shouldAntialias cast=(_Bool)
- */
-public static final native void CGContextSetShouldAntialias(long /*int*/ c, boolean shouldAntialias);
+public static final native void CGContextSetMiterLimit(long c, double limit);
/**
* @param c cast=(CGContextRef)
- * @param mode cast=(CGTextDrawingMode)
*/
-public static final native void CGContextSetTextDrawingMode(long /*int*/ c, int mode);
-/**
- * @param c cast=(CGContextRef)
- * @param t flags=struct
- */
-public static final native void CGContextSetTextMatrix(long /*int*/ c, CGAffineTransform t);
-/**
- * @param c cast=(CGContextRef)
- * @param x cast=(CGFloat)
- * @param y cast=(CGFloat)
- */
-public static final native void CGContextSetTextPosition(long /*int*/ c, double /*float*/ x, double /*float*/ y);
-/**
- * @param c cast=(CGContextRef)
- */
-public static final native void CGContextStrokePath(long /*int*/ c);
+public static final native void CGContextStrokePath(long c);
/**
* @param c cast=(CGContextRef)
* @param tx cast=(CGFloat)
* @param ty cast=(CGFloat)
*/
-public static final native void CGContextTranslateCTM(long /*int*/ c, double /*float*/ tx, double /*float*/ ty);
+public static final native void CGContextTranslateCTM(long c, double tx, double ty);
/**
* @param info cast=(void*)
* @param data cast=(void*)
* @param size cast=(size_t)
* @param releaseData cast=(CGDataProviderReleaseDataCallback)
*/
-public static final native long /*int*/ CGDataProviderCreateWithData(long /*int*/ info, long /*int*/ data, long /*int*/ size, long /*int*/ releaseData);
+public static final native long CGDataProviderCreateWithData(long info, long data, long size, long releaseData);
/**
* @param provider cast=(CGDataProviderRef)
*/
-public static final native void CGDataProviderRelease(long /*int*/ provider);
+public static final native void CGDataProviderRelease(long provider);
/**
- * @param display cast=(CGDirectDisplayID)
- */
-public static final native long /*int*/ CGDisplayPixelsHigh(int display);
-/**
- * @param display cast=(CGDirectDisplayID)
+ * @param displayID cast=(CGDirectDisplayID)
*/
-public static final native long /*int*/ CGDisplayPixelsWide(int display);
+public static final native long CGDisplayCreateImage(int displayID);
/**
* @param source cast=(CGEventSourceRef)
* @param virtualKey cast=(CGKeyCode)
* @param keyDown cast=(_Bool)
*/
-public static final native long /*int*/ CGEventCreateKeyboardEvent(long /*int*/ source, short virtualKey, boolean keyDown);
+public static final native long CGEventCreateKeyboardEvent(long source, short virtualKey, boolean keyDown);
/**
* @param source cast=(CGEventSourceRef)
* @param mouseType cast=(CGEventType)
* @param mouseCursorPosition flags=struct
* @param mouseButton cast=(CGMouseButton)
*/
-public static final native long /*int*/ CGEventCreateMouseEvent(long /*int*/ source, int mouseType, CGPoint mouseCursorPosition, int mouseButton);
+public static final native long CGEventCreateMouseEvent(long source, int mouseType, CGPoint mouseCursorPosition, int mouseButton);
/**
* @param source cast=(CGEventSourceRef)
* @param units cast=(CGScrollEventUnit)
- * @param wheelCount cast=(CGWheelCount)
+ * @param wheelCount cast=(uint32_t)
* @param wheel1 cast=(int32_t)
*/
-public static final native long /*int*/ CGEventCreateScrollWheelEvent(long /*int*/ source, int units, int wheelCount, int wheel1);
+public static final native long CGEventCreateScrollWheelEvent(long source, int units, int wheelCount, int wheel1);
/**
* @param event cast=(CGEventRef)
* @param field cast=(CGEventField)
*/
-public static final native long CGEventGetIntegerValueField(long /*int*/ event, int field);
+public static final native long CGEventGetIntegerValueField(long event, int field);
/**
* @param tap cast=(CGEventTapLocation)
* @param event cast=(CGEventRef)
*/
-public static final native void CGEventPost(int tap, long /*int*/ event);
+public static final native void CGEventPost(int tap, long event);
/**
- * @param sourceState cast=(CGEventSourceStateID)
+ * @param stateID cast=(CGEventSourceStateID)
*/
-public static final native long /*int*/ CGEventSourceCreate(int sourceState);
+public static final native long CGEventSourceCreate(int stateID);
/**
* @param rect flags=struct
- * @param maxDisplays cast=(CGDisplayCount)
- * @param dspys cast=(CGDirectDisplayID*)
- * @param dspyCnt cast=(CGDisplayCount*)
+ * @param maxDisplays cast=(uint32_t)
+ * @param displays cast=(CGDirectDisplayID*)
+ * @param matchingDisplayCount cast=(uint32_t*)
*/
-public static final native int CGGetDisplaysWithRect(CGRect rect, int maxDisplays, long /*int*/ dspys, long /*int*/ dspyCnt);
+public static final native int CGGetDisplaysWithRect(CGRect rect, int maxDisplays, long displays, long matchingDisplayCount);
/**
* @param width cast=(size_t)
* @param height cast=(size_t)
* @param bitsPerComponent cast=(size_t)
* @param bitsPerPixel cast=(size_t)
* @param bytesPerRow cast=(size_t)
- * @param colorspace cast=(CGColorSpaceRef)
+ * @param space cast=(CGColorSpaceRef)
* @param bitmapInfo cast=(CGBitmapInfo)
* @param provider cast=(CGDataProviderRef)
* @param decode cast=(CGFloat*)
* @param shouldInterpolate cast=(_Bool)
* @param intent cast=(CGColorRenderingIntent)
*/
-public static final native long /*int*/ CGImageCreate(long /*int*/ width, long /*int*/ height, long /*int*/ bitsPerComponent, long /*int*/ bitsPerPixel, long /*int*/ bytesPerRow, long /*int*/ colorspace, int bitmapInfo, long /*int*/ provider, long /*int*/ decode, boolean shouldInterpolate, int intent);
+public static final native long CGImageCreate(long width, long height, long bitsPerComponent, long bitsPerPixel, long bytesPerRow, long space, int bitmapInfo, long provider, long decode, boolean shouldInterpolate, int intent);
/**
* @param image cast=(CGImageRef)
*/
-public static final native long /*int*/ CGImageGetHeight(long /*int*/ image);
+public static final native long CGImageGetHeight(long image);
/**
* @param image cast=(CGImageRef)
*/
-public static final native long /*int*/ CGImageGetWidth(long /*int*/ image);
+public static final native long CGImageGetWidth(long image);
/**
* @param image cast=(CGImageRef)
*/
-public static final native void CGImageRelease(long /*int*/ image);
+public static final native void CGImageRelease(long image);
/**
* @param path cast=(CGMutablePathRef)
* @param m cast=(CGAffineTransform*)
@@ -3659,129 +3203,48 @@ public static final native void CGImageRelease(long /*int*/ image);
* @param x cast=(CGFloat)
* @param y cast=(CGFloat)
*/
-public static final native void CGPathAddCurveToPoint(long /*int*/ path, long /*int*/ m, double /*float*/ cp1x, double /*float*/ cp1y, double /*float*/ cp2x, double /*float*/ cp2y, double /*float*/ x, double /*float*/ y);
+public static final native void CGPathAddCurveToPoint(long path, long m, double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
/**
* @param path cast=(CGMutablePathRef)
* @param m cast=(CGAffineTransform*)
* @param x cast=(CGFloat)
* @param y cast=(CGFloat)
*/
-public static final native void CGPathAddLineToPoint(long /*int*/ path, long /*int*/ m, double /*float*/ x, double /*float*/ y);
-/**
- * @param path cast=(CGMutablePathRef)
- * @param m cast=(CGAffineTransform*)
- * @param rect flags=struct
- */
-public static final native void CGPathAddRect(long /*int*/ path, long /*int*/ m, CGRect rect);
+public static final native void CGPathAddLineToPoint(long path, long m, double x, double y);
/**
* @param path cast=(CGPathRef)
* @param info cast=(void*)
* @param function cast=(CGPathApplierFunction)
*/
-public static final native void CGPathApply(long /*int*/ path, long /*int*/ info, long /*int*/ function);
+public static final native void CGPathApply(long path, long info, long function);
/**
* @param path cast=(CGMutablePathRef)
*/
-public static final native void CGPathCloseSubpath(long /*int*/ path);
-/**
- * @param path cast=(CGPathRef)
- */
-public static final native long /*int*/ CGPathCreateCopy(long /*int*/ path);
-public static final native long /*int*/ CGPathCreateMutable();
+public static final native void CGPathCloseSubpath(long path);
+public static final native long CGPathCreateMutable();
/**
* @param path cast=(CGMutablePathRef)
* @param m cast=(CGAffineTransform*)
* @param x cast=(CGFloat)
* @param y cast=(CGFloat)
*/
-public static final native void CGPathMoveToPoint(long /*int*/ path, long /*int*/ m, double /*float*/ x, double /*float*/ y);
+public static final native void CGPathMoveToPoint(long path, long m, double x, double y);
/**
* @param path cast=(CGPathRef)
*/
-public static final native void CGPathRelease(long /*int*/ path);
-/**
- * @param keyChar cast=(CGCharCode)
- * @param virtualKey cast=(CGKeyCode)
- * @param keyDown cast=(boolean_t)
- */
-public static final native int CGPostKeyboardEvent(short keyChar, short virtualKey, boolean keyDown);
-/**
- * @param filter cast=(CGEventFilterMask)
- * @param state cast=(CGEventSuppressionState)
- */
-public static final native int CGSetLocalEventsFilterDuringSuppressionState(int filter, int state);
-/**
- * @param seconds cast=(CFTimeInterval)
- */
-public static final native int CGSetLocalEventsSuppressionInterval(double seconds);
-/**
- * @param newCursorPosition flags=struct
- */
-public static final native int CGWarpMouseCursorPosition(CGPoint newCursorPosition);
-/**
- * @param font cast=(CTFontRef)
- */
-public static final native double /*float*/ CTFontGetAscent(long /*int*/ font);
-/**
- * @param font cast=(CTFontRef)
- */
-public static final native double /*float*/ CTFontGetDescent(long /*int*/ font);
-/**
- * @param font cast=(CTFontRef)
- */
-public static final native double /*float*/ CTFontGetLeading(long /*int*/ font);
-/**
- * @param attrString cast=(CFAttributedStringRef)
- */
-public static final native long /*int*/ CTLineCreateWithAttributedString(long /*int*/ attrString);
-/**
- * @param line cast=(CTLineRef)
- * @param context cast=(CGContextRef)
- */
-public static final native void CTLineDraw(long /*int*/ line, long /*int*/ context);
-/**
- * @param line cast=(CTLineRef)
- * @param ascent cast=(CGFloat*)
- * @param descent cast=(CGFloat*)
- * @param leading cast=(CGFloat*)
- */
-public static final native double CTLineGetTypographicBounds(long /*int*/ line, double[] /*float[]*/ ascent, double[] /*float[]*/ descent, double[] /*float[]*/ leading);
-/**
- * @param settings cast=(CTParagraphStyleSetting*)
- * @param settingCount cast=(size_t)
- */
-public static final native long /*int*/ CTParagraphStyleCreate(long /*int*/ settings, long /*int*/ settingCount);
-/**
- * @param typesetter cast=(CTTypesetterRef)
- * @param stringRange flags=struct
- */
-public static final native long /*int*/ CTTypesetterCreateLine(long /*int*/ typesetter, CFRange stringRange);
-/**
- * @param string cast=(CFAttributedStringRef)
- */
-public static final native long /*int*/ CTTypesetterCreateWithAttributedString(long /*int*/ string);
+public static final native void CGPathRelease(long path);
/**
- * @param typesetter cast=(CTTypesetterRef)
- * @param startIndex cast=(CFIndex)
- * @param width cast=(double)
+ * @param fontURL cast=(CFURLRef)
+ * @param scope cast=(CTFontManagerScope)
+ * @param error cast=(CFErrorRef*)
*/
-public static final native long /*int*/ CTTypesetterSuggestLineBreak(long /*int*/ typesetter, long /*int*/ startIndex, double width);
+public static final native boolean CTFontManagerRegisterFontsForURL(long fontURL, int scope, long error);
/**
* @param aRect flags=struct
* @param bRect flags=struct
*/
public static final native boolean NSEqualRects(NSRect aRect, NSRect bRect);
/**
- * @param hfsFileTypeCode cast=(OSType)
- */
-public static final native long /*int*/ NSFileTypeForHFSTypeCode(int hfsFileTypeCode);
-/**
- * @param typePtr cast=(char*)
- * @param sizep cast=(NSUInteger*)
- * @param alignp cast=(NSUInteger*)
- */
-public static final native long /*int*/ NSGetSizeAndAlignment(long /*int*/ typePtr, long[] /*int[]*/ sizep, long[] /*int[]*/ alignp);
-/**
* @param aPoint flags=struct
* @param aRect flags=struct
*/
@@ -3791,8 +3254,7 @@ public static final native boolean NSPointInRect(NSPoint aPoint, NSRect aRect);
* @param domainMask cast=(NSSearchPathDomainMask)
* @param expandTilde cast=(BOOL)
*/
-public static final native long /*int*/ NSSearchPathForDirectoriesInDomains(long /*int*/ directory, long /*int*/ domainMask, boolean expandTilde);
-public static final native long /*int*/ NSTemporaryDirectory();
+public static final native long NSSearchPathForDirectoriesInDomains(long directory, long domainMask, boolean expandTilde);
/** Super Sends */
@@ -3800,529 +3262,490 @@ public static final native long /*int*/ NSTemporaryDirectory();
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native boolean objc_msgSendSuper_bool(objc_super superId, long /*int*/ sel, NSRange arg0, long /*int*/ arg1);
+public static final native boolean objc_msgSendSuper_bool(objc_super superId, long sel, NSRange arg0, long arg1);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native boolean objc_msgSendSuper_bool(objc_super superId, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1);
+public static final native boolean objc_msgSendSuper_bool(objc_super superId, long sel, long arg0, NSPoint arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel);
+public static final native long objc_msgSendSuper(objc_super superId, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, NSPoint arg0);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, NSPoint arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, NSRect arg0);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, NSRect arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, NSRect arg0, long /*int*/ arg1);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, NSRect arg0, long arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, NSSize arg0);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, NSSize arg0);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, boolean arg0);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, boolean arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, boolean arg0, NSRect arg1);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, boolean arg0, NSRect arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0, NSPoint arg1);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1, long /*int*/ arg2);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0, NSPoint arg1, long arg2);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0, NSRect arg1, long /*int*/ arg2);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0, NSRect arg1, long arg2);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0, boolean arg1);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0, boolean arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0, long arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, boolean arg3);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0, long arg1, long arg2, boolean arg3);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSendSuper(objc_super superId, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3);
+public static final native long objc_msgSendSuper(objc_super superId, long sel, long arg0, long arg1, long arg2, long arg3);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long /*int*/ sel, NSRect arg0);
+public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long sel, NSRect arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long /*int*/ sel, NSRect arg0, long /*int*/ arg1);
+public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long sel, NSRect arg0, long arg1);
/** @method flags=cast */
-public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long /*int*/ sel, long /*int*/ arg0);
+public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long sel, long arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long /*int*/ sel, long /*int*/ arg0, NSRect arg1, long /*int*/ arg2);
+public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, long sel, long arg0, NSRect arg1, long arg2);
/** @method flags=cast */
-public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, long /*int*/ sel);
+public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, long /*int*/ sel, NSRect arg0);
+public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, long sel, NSRect arg0);
/** @method flags=cast */
-public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, long /*int*/ sel, boolean arg0);
+public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, long sel, boolean arg0);
/** Sends */
/** @method flags=cast */
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel);
+public static final native boolean objc_msgSend_bool(long id, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, NSPoint arg0);
+public static final native boolean objc_msgSend_bool(long id, long sel, NSPoint arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
*/
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, NSPoint arg0, NSRect arg1);
+public static final native boolean objc_msgSend_bool(long id, long sel, NSPoint arg0, NSRect arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, NSRange arg0, long /*int*/ arg1);
+public static final native boolean objc_msgSend_bool(long id, long sel, NSRange arg0, long arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, NSRect arg0);
+public static final native boolean objc_msgSend_bool(long id, long sel, NSRect arg0);
/** @method flags=cast */
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0);
+public static final native boolean objc_msgSend_bool(long id, long sel, long arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1);
+public static final native boolean objc_msgSend_bool(long id, long sel, long arg0, NSPoint arg1);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSSize arg1, boolean arg2);
-/** @method flags=cast */
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1);
+public static final native boolean objc_msgSend_bool(long id, long sel, long arg0, NSSize arg1, boolean arg2);
/** @method flags=cast */
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2);
+public static final native boolean objc_msgSend_bool(long id, long sel, long arg0, long arg1);
/** @method flags=cast */
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3);
+public static final native boolean objc_msgSend_bool(long id, long sel, long arg0, long arg1, long arg2);
/** @method flags=cast */
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4);
+public static final native boolean objc_msgSend_bool(long id, long sel, long arg0, long arg1, long arg2, long arg3);
/** @method flags=cast */
-public static final native boolean objc_msgSend_bool(long /*int*/ id, long /*int*/ sel, short arg0);
+public static final native boolean objc_msgSend_bool(long id, long sel, long arg0, long arg1, long arg2, long arg3, long arg4);
/** @method flags=cast */
-public static final native double objc_msgSend_fpret(long /*int*/ id, long /*int*/ sel);
+public static final native double objc_msgSend_fpret(long id, long sel);
/** @method flags=cast */
-public static final native double objc_msgSend_fpret(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0);
+public static final native double objc_msgSend_fpret(long id, long sel, long arg0);
/** @method flags=cast */
-public static final native double objc_msgSend_fpret(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1);
+public static final native double objc_msgSend_fpret(long id, long sel, long arg0, long arg1);
/** @method flags=cast */
-public static final native float objc_msgSend_floatret(long /*int*/ id, long /*int*/ sel);
+public static final native float objc_msgSend_floatret(long id, long sel);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel);
+public static final native long objc_msgSend(long id, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSAffineTransformStruct arg0);
+public static final native long objc_msgSend(long id, long sel, NSAffineTransformStruct arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0);
+public static final native long objc_msgSend(long id, long sel, NSPoint arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
* @param arg2 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0, NSPoint arg1, NSPoint arg2);
+public static final native long objc_msgSend(long id, long sel, NSPoint arg0, NSPoint arg1, NSPoint arg2);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0, NSPoint arg1, long /*int*/ arg2);
+public static final native long objc_msgSend(long id, long sel, NSPoint arg0, NSPoint arg1, long arg2);
/**
* @method flags=cast
* @param arg0 flags=struct
- * @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0, NSRect arg1, long /*int*/ arg2, double /*float*/ arg3);
+public static final native long objc_msgSend(long id, long sel, NSPoint arg0, double arg1, double arg2, double arg3, boolean arg4);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0, double /*float*/ arg1, double /*float*/ arg2, double /*float*/ arg3);
+public static final native long objc_msgSend(long id, long sel, NSPoint arg0, long arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0, double /*float*/ arg1, double /*float*/ arg2, double /*float*/ arg3, boolean arg4);
+public static final native long objc_msgSend(long id, long sel, NSPoint arg0, long arg1, double[] arg2);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0, long /*int*/ arg1);
-/**
- * @method flags=cast
- * @param arg0 flags=struct
- */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSPoint arg0, long /*int*/ arg1, double[] /*float[]*/ arg2);
-/**
- * @method flags=cast
- * @param arg0 flags=struct
- */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRange arg0);
+public static final native long objc_msgSend(long id, long sel, NSRange arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRange arg0, NSPoint arg1);
+public static final native long objc_msgSend(long id, long sel, NSRange arg0, NSPoint arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRange arg0, NSRange arg1, long /*int*/ arg2, long[] /*int[]*/ arg3);
-/**
- * @method flags=cast
- * @param arg0 flags=struct
- */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRange arg0, long /*int*/ arg1);
+public static final native long objc_msgSend(long id, long sel, NSRange arg0, NSRange arg1, long arg2, long[] arg3);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRange arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, byte[] arg5);
+public static final native long objc_msgSend(long id, long sel, NSRange arg0, long arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0);
+public static final native long objc_msgSend(long id, long sel, NSRange arg0, long arg1, long arg2, long arg3, long arg4, byte[] arg5);
/**
* @method flags=cast
* @param arg0 flags=struct
- * @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, NSPoint arg1);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
- * @param arg2 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, NSRange arg1, NSRect arg2);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, NSPoint arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, NSRect arg1, long /*int*/ arg2, double /*float*/ arg3);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, NSRect arg1, long arg2, double arg3);
/**
* @method flags=cast
* @param arg0 flags=struct
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, NSSize arg1);
-/**
- * @method flags=cast
- * @param arg0 flags=struct
- */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, boolean arg1);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, NSSize arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, boolean arg1, boolean arg2);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, boolean arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, double /*float*/ arg1);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, boolean arg1, boolean arg2);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, double /*float*/ arg1, double /*float*/ arg2);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, double arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, double arg1, double arg2);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1, boolean arg2, long /*int*/ arg3);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, long arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1, long /*int*/ arg2);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, long arg1, boolean arg2, long arg3);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1, long /*int*/ arg2, boolean arg3);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, long arg1, long arg2);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1, long /*int*/ arg2, boolean arg3, long /*int*/ arg4);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, long arg1, long arg2, boolean arg3);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3);
+public static final native long objc_msgSend(long id, long sel, NSRect arg0, long arg1, long arg2, boolean arg3, long arg4);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, NSSize arg0);
+public static final native long objc_msgSend(long id, long sel, NSSize arg0);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, boolean arg0);
+public static final native long objc_msgSend(long id, long sel, boolean arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, boolean arg0, NSRect arg1);
+public static final native long objc_msgSend(long id, long sel, boolean arg0, NSRect arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, boolean arg0, long /*int*/ arg1);
+public static final native long objc_msgSend(long id, long sel, boolean arg0, long arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, byte[] arg0);
+public static final native long objc_msgSend(long id, long sel, byte[] arg0);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, byte[] arg0, long /*int*/ arg1);
+public static final native long objc_msgSend(long id, long sel, byte[] arg0, long arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, char[] arg0);
+public static final native long objc_msgSend(long id, long sel, char[] arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, char[] arg0, NSRange arg1);
+public static final native long objc_msgSend(long id, long sel, char[] arg0, NSRange arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, char[] arg0, long /*int*/ arg1);
+public static final native long objc_msgSend(long id, long sel, char[] arg0, long arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, double arg0);
+public static final native long objc_msgSend(long id, long sel, double arg0);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, double arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, boolean arg4);
+public static final native long objc_msgSend(long id, long sel, double arg0, double arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, double /*float*/ arg0, double /*float*/ arg1);
+public static final native long objc_msgSend(long id, long sel, double arg0, double arg1, double arg2, double arg3);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, double /*float*/ arg0, double /*float*/ arg1, double /*float*/ arg2, double /*float*/ arg3);
+public static final native long objc_msgSend(long id, long sel, double arg0, long arg1, long arg2, long arg3, boolean arg4);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, double /*float*/ arg0, long /*int*/ arg1);
+public static final native long objc_msgSend(long id, long sel, double[] arg0);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, double[] /*float[]*/ arg0);
+public static final native long objc_msgSend(long id, long sel, double[] arg0, long arg1, double arg2);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, double[] /*float[]*/ arg0, long /*int*/ arg1, double /*float*/ arg2);
+public static final native long objc_msgSend(long id, long sel, int arg0);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0);
+public static final native long objc_msgSend(long id, long sel, int[] arg0);
+/** @method flags=cast */
+public static final native long objc_msgSend(long id, long sel, int[] arg0, long arg1);
+/** @method flags=cast */
+public static final native long objc_msgSend(long id, long sel, long arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1);
+public static final native long objc_msgSend(long id, long sel, long arg0, NSPoint arg1);
/**
* @method flags=cast
* @param arg1 flags=struct
* @param arg2 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1, NSSize arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5, boolean arg6);
+public static final native long objc_msgSend(long id, long sel, long arg0, NSPoint arg1, NSSize arg2, long arg3, long arg4, long arg5, boolean arg6);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1, long /*int*/ arg2);
+public static final native long objc_msgSend(long id, long sel, long arg0, NSPoint arg1, long arg2);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1, long /*int*/ arg2, double arg3, long /*int*/ arg4, long /*int*/ arg5, long /*int*/ arg6, long /*int*/ arg7, long /*int*/ arg8);
+public static final native long objc_msgSend(long id, long sel, long arg0, NSPoint arg1, long arg2, double arg3, long arg4, long arg5, long arg6, long arg7, long arg8);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSPoint arg1, long /*int*/ arg2, double arg3, long /*int*/ arg4, long /*int*/ arg5, short arg6, long /*int*/ arg7, long /*int*/ arg8);
+public static final native long objc_msgSend(long id, long sel, long arg0, NSPoint arg1, long arg2, double arg3, long arg4, long arg5, short arg6, long arg7, long arg8);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSRange arg1);
+public static final native long objc_msgSend(long id, long sel, long arg0, NSRange arg1);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSRect arg1, long /*int*/ arg2);
+public static final native long objc_msgSend(long id, long sel, long arg0, NSRect arg1, long arg2);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, boolean arg1);
+public static final native long objc_msgSend(long id, long sel, long arg0, boolean arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, double /*float*/ arg1);
+public static final native long objc_msgSend(long id, long sel, long arg0, double arg1);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1);
/**
* @method flags=cast
* @param arg2 flags=struct
*/
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, NSRange arg2);
-/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, boolean arg2);
-/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, double arg2, long /*int*/ arg3);
-/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, NSRange arg2);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, boolean arg3);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, boolean arg2);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, double /*float*/ arg3);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, double arg2, long arg3);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, long arg2);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, long arg2, boolean arg3);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, boolean arg5, boolean arg6, long /*int*/ arg7, long /*int*/ arg8, long /*int*/ arg9);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, long arg2, long arg3);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, boolean arg5, boolean arg6, long /*int*/ arg7, long /*int*/ arg8, long /*int*/ arg9, long /*int*/ arg10);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, long arg2, long arg3, long arg4);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, long arg2, long arg3, long arg4, boolean arg5, boolean arg6, long arg7, long arg8, long arg9, long arg10);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5, long /*int*/ arg6);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long[] /*int[]*/ arg0);
+public static final native long objc_msgSend(long id, long sel, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6);
/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, long[] /*int[]*/ arg0, int arg1, int arg2);
-/** @method flags=cast */
-public static final native long /*int*/ objc_msgSend(long /*int*/ id, long /*int*/ sel, int[] arg0, long /*int*/ arg1);
-/** @method flags=cast */
-public static final native int objc_msgSend(int id, int sel, float arg0);
-/** @method flags=cast */
-public static final native long objc_msgSend(long id, long sel, int arg0);
-/** @method flags=cast */
-public static final native long objc_msgSend(long id, long sel, int[] arg0);
+public static final native long objc_msgSend(long id, long sel, long[] arg0, int arg1, int arg2);
/** @method flags=cast */
public static final native long objc_msgSend(long id, long sel, long[] arg0, long arg1, long arg2);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSAffineTransformStruct result, long /*int*/ id, long /*int*/ sel);
+public static final native void objc_msgSend_stret(NSAffineTransformStruct result, long id, long sel);
+/** @method flags=cast */
+public static final native void objc_msgSend_stret(NSOperatingSystemVersion result, long id, long sel);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSPoint result, long /*int*/ id, long /*int*/ sel);
+public static final native void objc_msgSend_stret(NSPoint result, long id, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSPoint result, long /*int*/ id, long /*int*/ sel, NSPoint arg0);
+public static final native void objc_msgSend_stret(NSPoint result, long id, long sel, NSPoint arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSPoint result, long /*int*/ id, long /*int*/ sel, NSPoint arg0, long /*int*/ arg1);
+public static final native void objc_msgSend_stret(NSPoint result, long id, long sel, NSPoint arg0, long arg1);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSPoint result, long /*int*/ id, long /*int*/ sel, long /*int*/ arg0);
+public static final native void objc_msgSend_stret(NSPoint result, long id, long sel, long arg0);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSRange result, long /*int*/ id, long /*int*/ sel);
-/**
- * @method flags=cast
- * @param arg0 flags=struct
- */
-public static final native void objc_msgSend_stret(NSRange result, long /*int*/ id, long /*int*/ sel, NSRange arg0, long /*int*/ arg1);
+public static final native void objc_msgSend_stret(NSRange result, long id, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSRange result, long /*int*/ id, long /*int*/ sel, NSRect arg0);
+public static final native void objc_msgSend_stret(NSRange result, long id, long sel, NSRange arg0, long arg1);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSRange result, long /*int*/ id, long /*int*/ sel, long /*int*/ arg0);
+public static final native void objc_msgSend_stret(NSRange result, long id, long sel, long arg0);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, NSRange arg0, long /*int*/ arg1);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, NSRange arg0, long arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, NSRect arg0);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, NSRect arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, NSRect arg0, long arg1);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, NSSize arg0, long /*int*/ arg1);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, NSSize arg0, long arg1);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, long /*int*/ arg0);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, long arg0);
/**
* @method flags=cast
* @param arg1 flags=struct
*/
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSRect arg1, long /*int*/ arg2);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, long arg0, NSRect arg1, long arg2);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, long arg0, long arg1);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSRect result, long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, boolean arg2);
+public static final native void objc_msgSend_stret(NSRect result, long id, long sel, long arg0, long arg1, boolean arg2);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSSize result, long /*int*/ id, long /*int*/ sel);
+public static final native void objc_msgSend_stret(NSSize result, long id, long sel);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSSize result, long /*int*/ id, long /*int*/ sel, NSRect arg0);
+public static final native void objc_msgSend_stret(NSSize result, long id, long sel, NSRect arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSSize result, long /*int*/ id, long /*int*/ sel, NSSize arg0);
+public static final native void objc_msgSend_stret(NSSize result, long id, long sel, NSSize arg0);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSSize result, long /*int*/ id, long /*int*/ sel, NSSize arg0, boolean arg1, boolean arg2, long /*int*/ arg3);
+public static final native void objc_msgSend_stret(NSSize result, long id, long sel, NSSize arg0, boolean arg1, boolean arg2, long arg3);
/**
* @method flags=cast
* @param arg0 flags=struct
*/
-public static final native void objc_msgSend_stret(NSSize result, long /*int*/ id, long /*int*/ sel, NSSize arg0, long /*int*/ arg1);
+public static final native void objc_msgSend_stret(NSSize result, long id, long sel, NSSize arg0, long arg1, long arg2, long arg3, long arg4, long arg5);
/** @method flags=cast */
-public static final native void objc_msgSend_stret(NSSize result, long /*int*/ id, long /*int*/ sel, boolean arg0);
+public static final native void objc_msgSend_stret(NSSize result, long id, long sel, boolean arg0);
/** Sizeof natives */
-public static final native int CFRange_sizeof();
public static final native int CGAffineTransform_sizeof();
public static final native int CGPathElement_sizeof();
public static final native int CGPoint_sizeof();
public static final native int CGRect_sizeof();
public static final native int CGSize_sizeof();
-public static final native int CTParagraphStyleSetting_sizeof();
public static final native int NSAffineTransformStruct_sizeof();
+public static final native int NSOperatingSystemVersion_sizeof();
public static final native int NSPoint_sizeof();
public static final native int NSRange_sizeof();
public static final native int NSRect_sizeof();
@@ -4331,126 +3754,61 @@ public static final native int NSSize_sizeof();
/** Memmove natives */
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(long /*int*/ dest, CFRange src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(CFRange dest, long /*int*/ src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(long /*int*/ dest, CGAffineTransform src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(CGAffineTransform dest, long /*int*/ src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(long /*int*/ dest, CGPathElement src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(CGPathElement dest, long /*int*/ src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest cast=(void *)
+ * @param src flags=no_out
*/
-public static final native void memmove(long /*int*/ dest, CGPoint src, long /*int*/ size);
+public static final native void memmove(long dest, CGPathElement src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest flags=no_in
+ * @param src cast=(void *)
*/
-public static final native void memmove(CGPoint dest, long /*int*/ src, long /*int*/ size);
+public static final native void memmove(CGPathElement dest, long src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest cast=(void *)
+ * @param src flags=no_out
*/
-public static final native void memmove(long /*int*/ dest, CGRect src, long /*int*/ size);
+public static final native void memmove(long dest, NSPoint src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest flags=no_in
+ * @param src cast=(void *)
*/
-public static final native void memmove(CGRect dest, long /*int*/ src, long /*int*/ size);
+public static final native void memmove(NSPoint dest, long src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest cast=(void *)
+ * @param src flags=no_out
*/
-public static final native void memmove(long /*int*/ dest, CGSize src, long /*int*/ size);
+public static final native void memmove(long dest, NSRange src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest flags=no_in
+ * @param src cast=(void *)
*/
-public static final native void memmove(CGSize dest, long /*int*/ src, long /*int*/ size);
+public static final native void memmove(NSRange dest, long src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest cast=(void *)
+ * @param src flags=no_out
*/
-public static final native void memmove(long /*int*/ dest, CTParagraphStyleSetting src, long /*int*/ size);
+public static final native void memmove(long dest, NSRect src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest flags=no_in
+ * @param src cast=(void *)
*/
-public static final native void memmove(CTParagraphStyleSetting dest, long /*int*/ src, long /*int*/ size);
+public static final native void memmove(NSRect dest, long src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest cast=(void *)
+ * @param src flags=no_out
*/
-public static final native void memmove(long /*int*/ dest, NSAffineTransformStruct src, long /*int*/ size);
+public static final native void memmove(long dest, NSSize src, long size);
/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
+ * @param dest flags=no_in
+ * @param src cast=(void *)
*/
-public static final native void memmove(NSAffineTransformStruct dest, long /*int*/ src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(long /*int*/ dest, NSPoint src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(NSPoint dest, long /*int*/ src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(long /*int*/ dest, NSRange src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(NSRange dest, long /*int*/ src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(long /*int*/ dest, NSRect src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(NSRect dest, long /*int*/ src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(long /*int*/ dest, NSSize src, long /*int*/ size);
-/**
- * @param dest cast=(void *),flags=no_in critical
- * @param src cast=(void *),flags=critical
- */
-public static final native void memmove(NSSize dest, long /*int*/ src, long /*int*/ size);
+public static final native void memmove(NSSize dest, long src, long size);
/** This section is auto generated */
+static {
+ NSOperatingSystemVersion version = NSProcessInfo.processInfo().operatingSystemVersion();
+ VERSION = VERSION ((int)version.majorVersion, (int)version.minorVersion, (int)version.patchVersion);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Protocol.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Protocol.java
index 2cd3d308f2..f8c74d5937 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Protocol.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Protocol.java
@@ -19,7 +19,7 @@ public Protocol() {
super();
}
-public Protocol(long /*int*/ id) {
+public Protocol(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport
new file mode 100755
index 0000000000..f2c6a036ed
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport
@@ -0,0 +1,2163 @@
+<?xml version='1.0'?>
+<signatures version='1.0'>
+<depends_on path='/System/Library/Frameworks/OpenGL.framework'/>
+<depends_on path='/System/Library/Frameworks/IOKit.framework'/>
+<depends_on path='/System/Library/Frameworks/Foundation.framework'/>
+<depends_on path='/System/Library/Frameworks/ApplicationServices.framework'/>
+<depends_on path='/System/Library/Frameworks/CoreVideo.framework'/>
+<depends_on path='/System/Library/Frameworks/IOSurface.framework'/>
+<depends_on path='/System/Library/Frameworks/Accelerate.framework'/>
+<depends_on path='/System/Library/Frameworks/Metal.framework'/>
+<depends_on path='/System/Library/Frameworks/CoreImage.framework'/>
+<depends_on path='/System/Library/Frameworks/CoreFoundation.framework'/>
+<depends_on path='/System/Library/Frameworks/CoreGraphics.framework'/>
+<depends_on path='/System/Library/Frameworks/CoreText.framework'/>
+<depends_on path='/System/Library/Frameworks/ImageIO.framework'/>
+<struct name='CATransform3D' type='{CATransform3D=&quot;m11&quot;f&quot;m12&quot;f&quot;m13&quot;f&quot;m14&quot;f&quot;m21&quot;f&quot;m22&quot;f&quot;m23&quot;f&quot;m24&quot;f&quot;m31&quot;f&quot;m32&quot;f&quot;m33&quot;f&quot;m34&quot;f&quot;m41&quot;f&quot;m42&quot;f&quot;m43&quot;f&quot;m44&quot;f}' type64='{CATransform3D=&quot;m11&quot;d&quot;m12&quot;d&quot;m13&quot;d&quot;m14&quot;d&quot;m21&quot;d&quot;m22&quot;d&quot;m23&quot;d&quot;m24&quot;d&quot;m31&quot;d&quot;m32&quot;d&quot;m33&quot;d&quot;m34&quot;d&quot;m41&quot;d&quot;m42&quot;d&quot;m43&quot;d&quot;m44&quot;d}'>
+<field declared_type='CGFloat' name='m11' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m12' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m13' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m14' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m21' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m22' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m23' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m24' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m31' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m32' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m33' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m34' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m41' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m42' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m43' type='f' type64='d'/>
+<field declared_type='CGFloat' name='m44' type='f' type64='d'/>
+</struct>
+<constant const='true' declared_type='CATransform3D' name='CATransform3DIdentity' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<constant const='true' declared_type='NSString*' name='kCAAlignmentCenter' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAlignmentJustified' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAlignmentLeft' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAlignmentNatural' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAlignmentRight' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAnimationCubic' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAnimationCubicPaced' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAnimationDiscrete' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAnimationLinear' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAnimationPaced' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAnimationRotateAuto' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAAnimationRotateAutoReverse' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterBehaviorAlignToMotion' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterBehaviorAttractor' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterBehaviorColorOverLife' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterBehaviorDrag' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterBehaviorLight' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterBehaviorValueOverLife' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterBehaviorWave' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerAdditive' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerBackToFront' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerCircle' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerCuboid' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerLine' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerOldestFirst' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerOldestLast' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerOutline' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerPoint' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerPoints' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerRectangle' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerSphere' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerSurface' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerUnordered' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAEmitterLayerVolume' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFillModeBackwards' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFillModeBoth' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFillModeForwards' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFillModeRemoved' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFillRuleEvenOdd' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFillRuleNonZero' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFilterLinear' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFilterNearest' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAFilterTrilinear' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGradientLayerAxial' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityBottom' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityBottomLeft' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityBottomRight' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityCenter' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityLeft' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityResize' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityResizeAspect' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityResizeAspectFill' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityRight' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityTop' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityTopLeft' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAGravityTopRight' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCALineCapButt' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCALineCapRound' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCALineCapSquare' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCALineJoinBevel' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCALineJoinMiter' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCALineJoinRound' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAMediaTimingFunctionDefault' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAMediaTimingFunctionEaseIn' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAMediaTimingFunctionEaseInEaseOut' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAMediaTimingFunctionEaseOut' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAMediaTimingFunctionLinear' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAOnOrderIn' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAOnOrderOut' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAScrollBoth' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAScrollHorizontally' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAScrollNone' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAScrollVertically' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransactionAnimationDuration' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransactionAnimationTimingFunction' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransactionCompletionBlock' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransactionDisableActions' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransition' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionFade' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionFromBottom' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionFromLeft' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionFromRight' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionFromTop' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionMoveIn' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionPush' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATransitionReveal' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATruncationEnd' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATruncationMiddle' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATruncationNone' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCATruncationStart' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionRotateX' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionRotateY' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionRotateZ' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionScale' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionScaleX' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionScaleY' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionScaleZ' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionTranslate' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionTranslateX' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionTranslateY' type='@'/>
+<constant const='true' declared_type='NSString*' name='kCAValueFunctionTranslateZ' type='@'/>
+<enum name='CA_WARN_DEPRECATED' value='1'/>
+<enum name='kCAConstraintHeight' value='7'/>
+<enum name='kCAConstraintMaxX' value='2'/>
+<enum name='kCAConstraintMaxY' value='6'/>
+<enum name='kCAConstraintMidX' value='1'/>
+<enum name='kCAConstraintMidY' value='5'/>
+<enum name='kCAConstraintMinX' value='0'/>
+<enum name='kCAConstraintMinY' value='4'/>
+<enum name='kCAConstraintWidth' value='3'/>
+<enum name='kCALayerBottomEdge' value='4'/>
+<enum name='kCALayerHeightSizable' value='16'/>
+<enum name='kCALayerLeftEdge' value='1'/>
+<enum name='kCALayerMaxXMargin' value='4'/>
+<enum name='kCALayerMaxYMargin' value='32'/>
+<enum name='kCALayerMinXMargin' value='1'/>
+<enum name='kCALayerMinYMargin' value='8'/>
+<enum name='kCALayerNotSizable' value='0'/>
+<enum name='kCALayerRightEdge' value='2'/>
+<enum name='kCALayerTopEdge' value='8'/>
+<enum name='kCALayerWidthSizable' value='2'/>
+<function name='CACurrentMediaTime'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</function>
+<function name='CATransform3DConcat'>
+<arg declared_type='CATransform3D' name='a' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<arg declared_type='CATransform3D' name='b' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DEqualToTransform'>
+<arg declared_type='CATransform3D' name='a' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<arg declared_type='CATransform3D' name='b' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='_Bool' type='B'/>
+</function>
+<function name='CATransform3DGetAffineTransform'>
+<arg declared_type='CATransform3D' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='CGAffineTransform' type='{CGAffineTransform=ffffff}' type64='{CGAffineTransform=dddddd}'/>
+</function>
+<function name='CATransform3DInvert'>
+<arg declared_type='CATransform3D' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DIsAffine'>
+<arg declared_type='CATransform3D' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='_Bool' type='B'/>
+</function>
+<function name='CATransform3DIsIdentity'>
+<arg declared_type='CATransform3D' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='_Bool' type='B'/>
+</function>
+<function name='CATransform3DMakeAffineTransform'>
+<arg declared_type='CGAffineTransform' name='m' type='{CGAffineTransform=ffffff}' type64='{CGAffineTransform=dddddd}'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DMakeRotation'>
+<arg declared_type='CGFloat' name='angle' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='x' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='y' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='z' type='f' type64='d'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DMakeScale'>
+<arg declared_type='CGFloat' name='sx' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='sy' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='sz' type='f' type64='d'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DMakeTranslation'>
+<arg declared_type='CGFloat' name='tx' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='ty' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='tz' type='f' type64='d'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DRotate'>
+<arg declared_type='CATransform3D' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<arg declared_type='CGFloat' name='angle' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='x' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='y' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='z' type='f' type64='d'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DScale'>
+<arg declared_type='CATransform3D' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<arg declared_type='CGFloat' name='sx' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='sy' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='sz' type='f' type64='d'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<function name='CATransform3DTranslate'>
+<arg declared_type='CATransform3D' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<arg declared_type='CGFloat' name='tx' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='ty' type='f' type64='d'/>
+<arg declared_type='CGFloat' name='tz' type='f' type64='d'/>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</function>
+<class name='CAAnimation'>
+<method class_method='true' selector='animation'>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='defaultValueForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='delegate'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='isRemovedOnCompletion'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='setDelegate:'>
+<arg declared_type='id' index='0' name='delegate' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRemovedOnCompletion:'>
+<arg declared_type='BOOL' index='0' name='removedOnCompletion' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setTimingFunction:'>
+<arg declared_type='CAMediaTimingFunction*' index='0' name='timingFunction' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='shouldArchiveValueForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='timingFunction'>
+<retval declared_type='CAMediaTimingFunction*' type='@'/>
+</method>
+</class>
+<class name='CABasicAnimation'>
+<method selector='byValue'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='fromValue'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='setByValue:'>
+<arg declared_type='id' index='0' name='byValue' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFromValue:'>
+<arg declared_type='id' index='0' name='fromValue' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setToValue:'>
+<arg declared_type='id' index='0' name='toValue' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='toValue'>
+<retval declared_type='id' type='@'/>
+</method>
+</class>
+<class name='CAConstraint'>
+<method selector='attribute'>
+<retval declared_type='CAConstraintAttribute' type='i'/>
+</method>
+<method class_method='true' selector='constraintWithAttribute:relativeTo:attribute:'>
+<arg declared_type='CAConstraintAttribute' index='0' name='attr' type='i'/>
+<arg declared_type='NSString*' index='1' name='srcId' type='@'/>
+<arg declared_type='CAConstraintAttribute' index='2' name='srcAttr' type='i'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='constraintWithAttribute:relativeTo:attribute:offset:'>
+<arg declared_type='CAConstraintAttribute' index='0' name='attr' type='i'/>
+<arg declared_type='NSString*' index='1' name='srcId' type='@'/>
+<arg declared_type='CAConstraintAttribute' index='2' name='srcAttr' type='i'/>
+<arg declared_type='CGFloat' index='3' name='c' type='f' type64='d'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='constraintWithAttribute:relativeTo:attribute:scale:offset:'>
+<arg declared_type='CAConstraintAttribute' index='0' name='attr' type='i'/>
+<arg declared_type='NSString*' index='1' name='srcId' type='@'/>
+<arg declared_type='CAConstraintAttribute' index='2' name='srcAttr' type='i'/>
+<arg declared_type='CGFloat' index='3' name='m' type='f' type64='d'/>
+<arg declared_type='CGFloat' index='4' name='c' type='f' type64='d'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='initWithAttribute:relativeTo:attribute:scale:offset:'>
+<arg declared_type='CAConstraintAttribute' index='0' name='attr' type='i'/>
+<arg declared_type='NSString*' index='1' name='srcId' type='@'/>
+<arg declared_type='CAConstraintAttribute' index='2' name='srcAttr' type='i'/>
+<arg declared_type='CGFloat' index='3' name='m' type='f' type64='d'/>
+<arg declared_type='CGFloat' index='4' name='c' type='f' type64='d'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='offset'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='scale'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='sourceAttribute'>
+<retval declared_type='CAConstraintAttribute' type='i'/>
+</method>
+<method selector='sourceName'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+</class>
+<class name='CAConstraintLayoutManager'>
+<method class_method='true' selector='layoutManager'>
+<retval declared_type='id' type='@'/>
+</method>
+</class>
+<class name='CAEmitterBehavior'>
+<method class_method='true' selector='attributesForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='NSDictionary*' type='@'/>
+</method>
+<method selector='attributesForKeyPath:'>
+<arg declared_type='NSString*' index='0' name='keyPath' type='@'/>
+<retval declared_type='NSDictionary*' type='@'/>
+</method>
+<method class_method='true' selector='behaviorTypes'>
+<retval declared_type='NSArray*' type='@'/>
+</method>
+<method class_method='true' selector='behaviorWithType:'>
+<arg declared_type='NSString*' index='0' name='type' type='@'/>
+<retval declared_type='CAEmitterBehavior*' type='@'/>
+</method>
+<method selector='initWithType:'>
+<arg declared_type='NSString*' index='0' name='type' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='inputKeys'>
+<retval declared_type='NSArray*' type='@'/>
+</method>
+<method selector='isEnabled'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='name'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='setEnabled:'>
+<arg declared_type='BOOL' index='0' name='enabled' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setName:'>
+<arg declared_type='NSString*' index='0' name='name' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='type'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+</class>
+<class name='CAEmitterCell'>
+<method selector='alphaRange'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='alphaSpeed'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='birthRate'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='blueRange'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='blueSpeed'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='color'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='contents'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='contentsRect'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='contentsScale'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method class_method='true' selector='defaultValueForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='emissionLatitude'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='emissionLongitude'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='emissionRange'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method class_method='true' selector='emitterCell'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='greenRange'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='greenSpeed'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='isEnabled'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='lifetime'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='lifetimeRange'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='magnificationFilter'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='minificationFilter'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='minificationFilterBias'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='name'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='redRange'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='redSpeed'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='scale'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='scaleRange'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='scaleSpeed'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='setAlphaRange:'>
+<arg declared_type='float' index='0' name='alphaRange' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAlphaSpeed:'>
+<arg declared_type='float' index='0' name='alphaSpeed' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBirthRate:'>
+<arg declared_type='float' index='0' name='birthRate' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBlueRange:'>
+<arg declared_type='float' index='0' name='blueRange' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBlueSpeed:'>
+<arg declared_type='float' index='0' name='blueSpeed' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setColor:'>
+<arg declared_type='CGColorRef' index='0' name='color' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContents:'>
+<arg declared_type='id' index='0' name='contents' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContentsRect:'>
+<arg declared_type='CGRect' index='0' name='contentsRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContentsScale:'>
+<arg declared_type='CGFloat' index='0' name='contentsScale' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmissionLatitude:'>
+<arg declared_type='CGFloat' index='0' name='emissionLatitude' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmissionLongitude:'>
+<arg declared_type='CGFloat' index='0' name='emissionLongitude' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmissionRange:'>
+<arg declared_type='CGFloat' index='0' name='emissionRange' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEnabled:'>
+<arg declared_type='BOOL' index='0' name='enabled' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setGreenRange:'>
+<arg declared_type='float' index='0' name='greenRange' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setGreenSpeed:'>
+<arg declared_type='float' index='0' name='greenSpeed' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLifetime:'>
+<arg declared_type='float' index='0' name='lifetime' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLifetimeRange:'>
+<arg declared_type='float' index='0' name='lifetimeRange' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMagnificationFilter:'>
+<arg declared_type='NSString*' index='0' name='magnificationFilter' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMinificationFilter:'>
+<arg declared_type='NSString*' index='0' name='minificationFilter' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMinificationFilterBias:'>
+<arg declared_type='float' index='0' name='minificationFilterBias' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setName:'>
+<arg declared_type='NSString*' index='0' name='name' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRedRange:'>
+<arg declared_type='float' index='0' name='redRange' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRedSpeed:'>
+<arg declared_type='float' index='0' name='redSpeed' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setScale:'>
+<arg declared_type='CGFloat' index='0' name='scale' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setScaleRange:'>
+<arg declared_type='CGFloat' index='0' name='scaleRange' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setScaleSpeed:'>
+<arg declared_type='CGFloat' index='0' name='scaleSpeed' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSpin:'>
+<arg declared_type='CGFloat' index='0' name='spin' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSpinRange:'>
+<arg declared_type='CGFloat' index='0' name='spinRange' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStyle:'>
+<arg declared_type='NSDictionary*' index='0' name='style' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setVelocity:'>
+<arg declared_type='CGFloat' index='0' name='velocity' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setVelocityRange:'>
+<arg declared_type='CGFloat' index='0' name='velocityRange' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setXAcceleration:'>
+<arg declared_type='CGFloat' index='0' name='xAcceleration' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setYAcceleration:'>
+<arg declared_type='CGFloat' index='0' name='yAcceleration' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setZAcceleration:'>
+<arg declared_type='CGFloat' index='0' name='zAcceleration' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='shouldArchiveValueForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='spin'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='spinRange'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='style'>
+<retval declared_type='NSDictionary*' type='@'/>
+</method>
+<method selector='velocity'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='velocityRange'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='xAcceleration'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='yAcceleration'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='zAcceleration'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+</class>
+<class name='CAEmitterLayer'>
+<method selector='birthRate'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='emitterDepth'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='emitterMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='emitterPosition'>
+<retval declared_type='CGPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+</method>
+<method selector='emitterShape'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='emitterSize'>
+<retval declared_type='CGSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+</method>
+<method selector='emitterZPosition'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='lifetime'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='preservesDepth'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='renderMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='scale'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='seed'>
+<retval declared_type='unsigned int' type='I'/>
+</method>
+<method selector='setBirthRate:'>
+<arg declared_type='float' index='0' name='birthRate' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmitterDepth:'>
+<arg declared_type='CGFloat' index='0' name='emitterDepth' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmitterMode:'>
+<arg declared_type='NSString*' index='0' name='emitterMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmitterPosition:'>
+<arg declared_type='CGPoint' index='0' name='emitterPosition' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmitterShape:'>
+<arg declared_type='NSString*' index='0' name='emitterShape' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmitterSize:'>
+<arg declared_type='CGSize' index='0' name='emitterSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEmitterZPosition:'>
+<arg declared_type='CGFloat' index='0' name='emitterZPosition' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLifetime:'>
+<arg declared_type='float' index='0' name='lifetime' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setPreservesDepth:'>
+<arg declared_type='BOOL' index='0' name='preservesDepth' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRenderMode:'>
+<arg declared_type='NSString*' index='0' name='renderMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setScale:'>
+<arg declared_type='float' index='0' name='scale' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSeed:'>
+<arg declared_type='unsigned int' index='0' name='seed' type='I'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSpin:'>
+<arg declared_type='float' index='0' name='spin' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setVelocity:'>
+<arg declared_type='float' index='0' name='velocity' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='spin'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='velocity'>
+<retval declared_type='float' type='f'/>
+</method>
+</class>
+<class name='CAGradientLayer'>
+<method selector='colors'>
+<retval declared_type='NSArray*' type='@'/>
+</method>
+<method selector='endPoint'>
+<retval declared_type='CGPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+</method>
+<method selector='setColors:'>
+<arg declared_type='NSArray*' index='0' name='colors' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEndPoint:'>
+<arg declared_type='CGPoint' index='0' name='endPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStartPoint:'>
+<arg declared_type='CGPoint' index='0' name='startPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setType:'>
+<arg declared_type='NSString*' index='0' name='type' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='startPoint'>
+<retval declared_type='CGPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+</method>
+<method selector='type'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+</class>
+<class name='CAKeyframeAnimation'>
+<method selector='calculationMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='path'>
+<retval declared_type='CGPathRef' type='^{CGPath=}'/>
+</method>
+<method selector='rotationMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='setCalculationMode:'>
+<arg declared_type='NSString*' index='0' name='calculationMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setPath:'>
+<arg declared_type='CGPathRef' index='0' name='path' type='^{CGPath=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRotationMode:'>
+<arg declared_type='NSString*' index='0' name='rotationMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setValues:'>
+<arg declared_type='NSArray*' index='0' name='values' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='values'>
+<retval declared_type='NSArray*' type='@'/>
+</method>
+</class>
+<class name='CALayer'>
+<method selector='actionForKey:'>
+<arg declared_type='NSString*' index='0' name='event' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='addAnimation:forKey:'>
+<arg declared_type='CAAnimation*' index='0' name='anim' type='@'/>
+<arg declared_type='id' index='1' name='key' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='addConstraint:'>
+<arg declared_type='CAConstraint*' index='0' name='c' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='addSublayer:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='affineTransform'>
+<retval declared_type='CGAffineTransform' type='{CGAffineTransform=ffffff}' type64='{CGAffineTransform=dddddd}'/>
+</method>
+<method selector='anchorPoint'>
+<retval declared_type='CGPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+</method>
+<method selector='anchorPointZ'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='animationForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='animationKeys'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='autoresizingMask'>
+<retval declared_type='CAAutoresizingMask' type='I'/>
+</method>
+<method selector='backgroundColor'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='backgroundFilters'>
+<retval declared_type='NSArray*' type='@'/>
+</method>
+<method selector='borderColor'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='borderWidth'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='bounds'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='compositingFilter'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='containsPoint:'>
+<arg declared_type='CGPoint' index='0' name='p' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='contents'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='contentsAreFlipped'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='contentsCenter'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='contentsGravity'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='contentsRect'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='contentsScale'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='convertPoint:fromLayer:'>
+<arg declared_type='CGPoint' index='0' name='p' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<arg declared_type='id' index='1' name='l' type='@'/>
+<retval declared_type='CGPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+</method>
+<method selector='convertPoint:toLayer:'>
+<arg declared_type='CGPoint' index='0' name='p' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<arg declared_type='id' index='1' name='l' type='@'/>
+<retval declared_type='CGPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+</method>
+<method selector='convertRect:fromLayer:'>
+<arg declared_type='CGRect' index='0' name='r' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<arg declared_type='id' index='1' name='l' type='@'/>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='convertRect:toLayer:'>
+<arg declared_type='CGRect' index='0' name='r' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<arg declared_type='id' index='1' name='l' type='@'/>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='convertTime:fromLayer:'>
+<arg declared_type='CFTimeInterval' index='0' name='t' type='d'/>
+<arg declared_type='id' index='1' name='l' type='@'/>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='convertTime:toLayer:'>
+<arg declared_type='CFTimeInterval' index='0' name='t' type='d'/>
+<arg declared_type='id' index='1' name='l' type='@'/>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='cornerRadius'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method class_method='true' selector='defaultActionForKey:'>
+<arg declared_type='NSString*' index='0' name='event' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='defaultValueForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='delegate'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='display'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='displayIfNeeded'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='drawInContext:'>
+<arg declared_type='CGContextRef' index='0' name='ctx' type='^{CGContext=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='drawsAsynchronously'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='edgeAntialiasingMask'>
+<retval declared_type='CAEdgeAntialiasingMask' type='I'/>
+</method>
+<method selector='filters'>
+<retval declared_type='NSArray*' type='@'/>
+</method>
+<method selector='frame'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='hitTest:'>
+<arg declared_type='CGPoint' index='0' name='p' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='id'>
+<retval declared_type='NSDictionary' type='{NSDictionary=}'/>
+</method>
+<method selector='init'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='initWithLayer:'>
+<arg declared_type='id' index='0' name='layer' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='insertSublayer:above:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='id' index='1' name='sibling' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='insertSublayer:atIndex:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='unsigned int' index='1' name='idx' type='I'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='insertSublayer:below:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='id' index='1' name='sibling' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='isDoubleSided'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='isGeometryFlipped'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='isHidden'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='isOpaque'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method class_method='true' selector='layer'>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='layerWithRemoteClientId:'>
+<arg declared_type='uint32_t' index='0' name='client_id' type='I'/>
+<retval declared_type='CALayer*' type='@'/>
+</method>
+<method selector='layoutIfNeeded'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='layoutManager'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='layoutSublayers'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='magnificationFilter'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='mask'>
+<retval declared_type='CALayer*' type='@'/>
+</method>
+<method selector='masksToBounds'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='minificationFilter'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='minificationFilterBias'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='modelLayer'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='name'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='needsDisplay'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method class_method='true' selector='needsDisplayForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='needsDisplayOnBoundsChange'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='needsLayout'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='opacity'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='position'>
+<retval declared_type='CGPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+</method>
+<method selector='preferredFrameSize'>
+<retval declared_type='CGSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+</method>
+<method selector='presentationLayer'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='rasterizationScale'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='removeAllAnimations'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='removeAnimationForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='removeFromSuperlayer'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='renderInContext:'>
+<arg declared_type='CGContextRef' index='0' name='ctx' type='^{CGContext=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='replaceSublayer:with:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='CALayer*' index='1' name='layer2' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='resizeSublayersWithOldSize:'>
+<arg declared_type='CGSize' index='0' name='size' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='resizeWithOldSuperlayerSize:'>
+<arg declared_type='CGSize' index='0' name='size' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='scrollPoint:'>
+<arg declared_type='CGPoint' index='0' name='p' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='scrollRectToVisible:'>
+<arg declared_type='CGRect' index='0' name='r' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAffineTransform:'>
+<arg declared_type='CGAffineTransform' index='0' name='m' type='{CGAffineTransform=ffffff}' type64='{CGAffineTransform=dddddd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAnchorPoint:'>
+<arg declared_type='CGPoint' index='0' name='anchorPoint' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAnchorPointZ:'>
+<arg declared_type='CGFloat' index='0' name='anchorPointZ' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAutoresizingMask:'>
+<arg declared_type='CAAutoresizingMask' index='0' name='autoresizingMask' type='I'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBackgroundColor:'>
+<arg declared_type='CGColorRef' index='0' name='backgroundColor' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBackgroundFilters:'>
+<arg declared_type='NSArray*' index='0' name='backgroundFilters' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBorderColor:'>
+<arg declared_type='CGColorRef' index='0' name='borderColor' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBorderWidth:'>
+<arg declared_type='CGFloat' index='0' name='borderWidth' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBounds:'>
+<arg declared_type='CGRect' index='0' name='bounds' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setCompositingFilter:'>
+<arg declared_type='id' index='0' name='compositingFilter' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContents:'>
+<arg declared_type='id' index='0' name='contents' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContentsCenter:'>
+<arg declared_type='CGRect' index='0' name='contentsCenter' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContentsGravity:'>
+<arg declared_type='NSString*' index='0' name='contentsGravity' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContentsRect:'>
+<arg declared_type='CGRect' index='0' name='contentsRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setContentsScale:'>
+<arg declared_type='CGFloat' index='0' name='contentsScale' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setCornerRadius:'>
+<arg declared_type='CGFloat' index='0' name='cornerRadius' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setDelegate:'>
+<arg declared_type='id' index='0' name='delegate' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setDoubleSided:'>
+<arg declared_type='BOOL' index='0' name='doubleSided' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setDrawsAsynchronously:'>
+<arg declared_type='BOOL' index='0' name='drawsAsynchronously' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setEdgeAntialiasingMask:'>
+<arg declared_type='CAEdgeAntialiasingMask' index='0' name='edgeAntialiasingMask' type='I'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFilters:'>
+<arg declared_type='NSArray*' index='0' name='filters' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFrame:'>
+<arg declared_type='CGRect' index='0' name='frame' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setGeometryFlipped:'>
+<arg declared_type='BOOL' index='0' name='geometryFlipped' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setHidden:'>
+<arg declared_type='BOOL' index='0' name='hidden' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setId:'>
+<arg declared_type='NSDictionary' index='0' name='id' type='{NSDictionary=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLayoutManager:'>
+<arg declared_type='id' index='0' name='layoutManager' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMagnificationFilter:'>
+<arg declared_type='NSString*' index='0' name='magnificationFilter' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMask:'>
+<arg declared_type='CALayer*' index='0' name='mask' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMasksToBounds:'>
+<arg declared_type='BOOL' index='0' name='masksToBounds' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMinificationFilter:'>
+<arg declared_type='NSString*' index='0' name='minificationFilter' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMinificationFilterBias:'>
+<arg declared_type='float' index='0' name='minificationFilterBias' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setName:'>
+<arg declared_type='NSString*' index='0' name='name' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setNeedsDisplay'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setNeedsDisplayInRect:'>
+<arg declared_type='CGRect' index='0' name='r' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setNeedsDisplayOnBoundsChange:'>
+<arg declared_type='BOOL' index='0' name='needsDisplayOnBoundsChange' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setNeedsLayout'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setOpacity:'>
+<arg declared_type='float' index='0' name='opacity' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setOpaque:'>
+<arg declared_type='BOOL' index='0' name='opaque' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setPosition:'>
+<arg declared_type='CGPoint' index='0' name='position' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRasterizationScale:'>
+<arg declared_type='CGFloat' index='0' name='rasterizationScale' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setShadowColor:'>
+<arg declared_type='CGColorRef' index='0' name='shadowColor' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setShadowOffset:'>
+<arg declared_type='CGSize' index='0' name='shadowOffset' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setShadowOpacity:'>
+<arg declared_type='float' index='0' name='shadowOpacity' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setShadowPath:'>
+<arg declared_type='CGPathRef' index='0' name='shadowPath' type='^{CGPath=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setShadowRadius:'>
+<arg declared_type='CGFloat' index='0' name='shadowRadius' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setShouldRasterize:'>
+<arg declared_type='BOOL' index='0' name='shouldRasterize' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStyle:'>
+<arg declared_type='NSDictionary*' index='0' name='style' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSublayerTransform:'>
+<arg declared_type='CATransform3D' index='0' name='sublayerTransform' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSuperlayer:'>
+<arg declared_type='CALayer*' index='0' name='superlayer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setTransform:'>
+<arg declared_type='CATransform3D' index='0' name='transform' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setZPosition:'>
+<arg declared_type='CGFloat' index='0' name='zPosition' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='shadowColor'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='shadowOffset'>
+<retval declared_type='CGSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+</method>
+<method selector='shadowOpacity'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='shadowPath'>
+<retval declared_type='CGPathRef' type='^{CGPath=}'/>
+</method>
+<method selector='shadowRadius'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='shouldArchiveValueForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='shouldRasterize'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='style'>
+<retval declared_type='NSDictionary*' type='@'/>
+</method>
+<method selector='sublayerTransform'>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</method>
+<method selector='superlayer'>
+<retval declared_type='CALayer*' type='@'/>
+</method>
+<method selector='transform'>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</method>
+<method selector='visibleRect'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='zPosition'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+</class>
+<class name='CAMediaTimingFunction'>
+<method class_method='true' selector='functionWithControlPoints::::'>
+<arg declared_type='float' index='0' name='c1x' type='f'/>
+<arg declared_type='float' index='1' name='c1y' type='f'/>
+<arg declared_type='float' index='2' name='c2x' type='f'/>
+<arg declared_type='float' index='3' name='c2y' type='f'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='functionWithName:'>
+<arg declared_type='NSString*' index='0' name='name' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='getControlPointAtIndex:values:'>
+<arg declared_type='size_t' index='0' name='idx' type='L' type64='Q'/>
+<arg declared_type='float*' index='1' name='ptr' type='^f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='initWithControlPoints::::'>
+<arg declared_type='float' index='0' name='c1x' type='f'/>
+<arg declared_type='float' index='1' name='c1y' type='f'/>
+<arg declared_type='float' index='2' name='c2x' type='f'/>
+<arg declared_type='float' index='3' name='c2y' type='f'/>
+<retval declared_type='id' type='@'/>
+</method>
+</class>
+<class name='CAMetalLayer'>
+<method selector='colorspace'>
+<retval declared_type='CGColorSpaceRef' type='^{CGColorSpace=}'/>
+</method>
+<method selector='device'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='drawableSize'>
+<retval declared_type='CGSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+</method>
+<method selector='framebufferOnly'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='nextDrawable'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='pixelFormat'>
+<retval declared_type='MTLPixelFormat' type='I' type64='Q'/>
+</method>
+<method selector='presentsWithTransaction'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='setColorspace:'>
+<arg declared_type='CGColorSpaceRef' index='0' name='colorspace' type='^{CGColorSpace=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setDevice:'>
+<arg declared_type='id' index='0' name='device' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setDrawableSize:'>
+<arg declared_type='CGSize' index='0' name='drawableSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFramebufferOnly:'>
+<arg declared_type='BOOL' index='0' name='framebufferOnly' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setPixelFormat:'>
+<arg declared_type='MTLPixelFormat' index='0' name='pixelFormat' type='I' type64='Q'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setPresentsWithTransaction:'>
+<arg declared_type='BOOL' index='0' name='presentsWithTransaction' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setWantsExtendedDynamicRangeContent:'>
+<arg declared_type='BOOL' index='0' name='wantsExtendedDynamicRangeContent' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='wantsExtendedDynamicRangeContent'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+</class>
+<class name='CAOpenGLLayer'>
+<method selector='canDrawInCGLContext:pixelFormat:forLayerTime:displayTime:'>
+<arg declared_type='CGLContextObj' index='0' name='ctx' type='^{_CGLContextObject=}'/>
+<arg declared_type='CGLPixelFormatObj' index='1' name='pf' type='^{_CGLPixelFormatObject=}'/>
+<arg declared_type='CFTimeInterval' index='2' name='t' type='d'/>
+<arg const='true' declared_type='CVTimeStamp*' index='3' name='ts' type='^{_CVTimeStamp=IiqQdq{CVSMPTETime=ssIIIssss}QQ}'/>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='colorspace'>
+<retval declared_type='CGColorSpaceRef' type='^{CGColorSpace=}'/>
+</method>
+<method selector='copyCGLContextForPixelFormat:'>
+<arg declared_type='CGLPixelFormatObj' index='0' name='pf' type='^{_CGLPixelFormatObject=}'/>
+<retval declared_type='CGLContextObj' type='^{_CGLContextObject=}'/>
+</method>
+<method selector='copyCGLPixelFormatForDisplayMask:'>
+<arg declared_type='uint32_t' index='0' name='mask' type='I'/>
+<retval declared_type='CGLPixelFormatObj' type='^{_CGLPixelFormatObject=}'/>
+</method>
+<method selector='drawInCGLContext:pixelFormat:forLayerTime:displayTime:'>
+<arg declared_type='CGLContextObj' index='0' name='ctx' type='^{_CGLContextObject=}'/>
+<arg declared_type='CGLPixelFormatObj' index='1' name='pf' type='^{_CGLPixelFormatObject=}'/>
+<arg declared_type='CFTimeInterval' index='2' name='t' type='d'/>
+<arg const='true' declared_type='CVTimeStamp*' index='3' name='ts' type='^{_CVTimeStamp=IiqQdq{CVSMPTETime=ssIIIssss}QQ}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='isAsynchronous'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='releaseCGLContext:'>
+<arg declared_type='CGLContextObj' index='0' name='ctx' type='^{_CGLContextObject=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='releaseCGLPixelFormat:'>
+<arg declared_type='CGLPixelFormatObj' index='0' name='pf' type='^{_CGLPixelFormatObject=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAsynchronous:'>
+<arg declared_type='BOOL' index='0' name='asynchronous' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setColorspace:'>
+<arg declared_type='CGColorSpaceRef' index='0' name='colorspace' type='^{CGColorSpace=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setWantsExtendedDynamicRangeContent:'>
+<arg declared_type='BOOL' index='0' name='wantsExtendedDynamicRangeContent' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='wantsExtendedDynamicRangeContent'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+</class>
+<class name='CAPropertyAnimation'>
+<method class_method='true' selector='animationWithKeyPath:'>
+<arg declared_type='id' index='0' name='path' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='isAdditive'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='isCumulative'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='keyPath'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='setAdditive:'>
+<arg declared_type='BOOL' index='0' name='additive' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setCumulative:'>
+<arg declared_type='BOOL' index='0' name='cumulative' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setKeyPath:'>
+<arg declared_type='NSString*' index='0' name='keyPath' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setValueFunction:'>
+<arg declared_type='CAValueFunction*' index='0' name='valueFunction' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='valueFunction'>
+<retval declared_type='CAValueFunction*' type='@'/>
+</method>
+</class>
+<class name='CARemoteLayerClient'>
+<method selector='clientId'>
+<retval declared_type='uint32_t' type='I'/>
+</method>
+<method selector='initWithServerPort:'>
+<arg declared_type='mach_port_t' index='0' name='port' type='I'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='invalidate'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='layer'>
+<retval declared_type='CALayer*' type='@'/>
+</method>
+<method selector='setLayer:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+</class>
+<class name='CARemoteLayerServer'>
+<method selector='serverPort'>
+<retval declared_type='mach_port_t' type='I'/>
+</method>
+<method class_method='true' selector='sharedServer'>
+<retval declared_type='CARemoteLayerServer*' type='@'/>
+</method>
+</class>
+<class name='CARenderer'>
+<method selector='addUpdateRect:'>
+<arg declared_type='CGRect' index='0' name='r' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='beginFrameAtTime:timeStamp:'>
+<arg declared_type='CFTimeInterval' index='0' name='t' type='d'/>
+<arg declared_type='id' index='1' name='ts' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='bounds'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+<method selector='endFrame'>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='layer'>
+<retval declared_type='CALayer*' type='@'/>
+</method>
+<method selector='nextFrameTime'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='render'>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='rendererWithCGLContext:options:'>
+<arg declared_type='void*' index='0' name='ctx' type='^v'/>
+<arg declared_type='id' index='1' name='dict' type='@'/>
+<retval declared_type='CARenderer*' type='@'/>
+</method>
+<method selector='setBounds:'>
+<arg declared_type='CGRect' index='0' name='bounds' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLayer:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='updateBounds'>
+<retval declared_type='CGRect' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+</method>
+</class>
+<class name='CAReplicatorLayer'>
+<method selector='instanceAlphaOffset'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='instanceBlueOffset'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='instanceColor'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='instanceCount'>
+<retval declared_type='NSInteger' type='i' type64='q'/>
+</method>
+<method selector='instanceDelay'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='instanceGreenOffset'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='instanceRedOffset'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='instanceTransform'>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</method>
+<method selector='preservesDepth'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='setInstanceAlphaOffset:'>
+<arg declared_type='float' index='0' name='instanceAlphaOffset' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInstanceBlueOffset:'>
+<arg declared_type='float' index='0' name='instanceBlueOffset' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInstanceColor:'>
+<arg declared_type='CGColorRef' index='0' name='instanceColor' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInstanceCount:'>
+<arg declared_type='NSInteger' index='0' name='instanceCount' type='i' type64='q'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInstanceDelay:'>
+<arg declared_type='CFTimeInterval' index='0' name='instanceDelay' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInstanceGreenOffset:'>
+<arg declared_type='float' index='0' name='instanceGreenOffset' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInstanceRedOffset:'>
+<arg declared_type='float' index='0' name='instanceRedOffset' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInstanceTransform:'>
+<arg declared_type='CATransform3D' index='0' name='instanceTransform' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setPreservesDepth:'>
+<arg declared_type='BOOL' index='0' name='preservesDepth' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+</class>
+<class name='CAScrollLayer'>
+<method selector='scrollMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='scrollToPoint:'>
+<arg declared_type='CGPoint' index='0' name='p' type='{CGPoint=ff}' type64='{CGPoint=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='scrollToRect:'>
+<arg declared_type='CGRect' index='0' name='r' type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setScrollMode:'>
+<arg declared_type='NSString*' index='0' name='scrollMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+</class>
+<class name='CAShapeLayer'>
+<method selector='fillColor'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='fillRule'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='lineCap'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='lineDashPhase'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='lineJoin'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='lineWidth'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='miterLimit'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='path'>
+<retval declared_type='CGPathRef' type='^{CGPath=}'/>
+</method>
+<method selector='setFillColor:'>
+<arg declared_type='CGColorRef' index='0' name='fillColor' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFillRule:'>
+<arg declared_type='NSString*' index='0' name='fillRule' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLineCap:'>
+<arg declared_type='NSString*' index='0' name='lineCap' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLineDashPhase:'>
+<arg declared_type='CGFloat' index='0' name='lineDashPhase' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLineJoin:'>
+<arg declared_type='NSString*' index='0' name='lineJoin' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLineWidth:'>
+<arg declared_type='CGFloat' index='0' name='lineWidth' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMiterLimit:'>
+<arg declared_type='CGFloat' index='0' name='miterLimit' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setPath:'>
+<arg declared_type='CGPathRef' index='0' name='path' type='^{CGPath=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStrokeColor:'>
+<arg declared_type='CGColorRef' index='0' name='strokeColor' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStrokeEnd:'>
+<arg declared_type='CGFloat' index='0' name='strokeEnd' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStrokeStart:'>
+<arg declared_type='CGFloat' index='0' name='strokeStart' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='strokeColor'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='strokeEnd'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='strokeStart'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+</class>
+<class name='CASpringAnimation'>
+<method selector='damping'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='initialVelocity'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='mass'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='setDamping:'>
+<arg declared_type='CGFloat' index='0' name='damping' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setInitialVelocity:'>
+<arg declared_type='CGFloat' index='0' name='initialVelocity' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setMass:'>
+<arg declared_type='CGFloat' index='0' name='mass' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStiffness:'>
+<arg declared_type='CGFloat' index='0' name='stiffness' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='settlingDuration'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='stiffness'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+</class>
+<class name='CATextLayer'>
+<method selector='alignmentMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='allowsFontSubpixelQuantization'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='font'>
+<retval declared_type='CFTypeRef' type='@'/>
+</method>
+<method selector='fontSize'>
+<retval declared_type='CGFloat' type='f' type64='d'/>
+</method>
+<method selector='foregroundColor'>
+<retval declared_type='CGColorRef' type='^{CGColor=}'/>
+</method>
+<method selector='isWrapped'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='setAlignmentMode:'>
+<arg declared_type='NSString*' index='0' name='alignmentMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAllowsFontSubpixelQuantization:'>
+<arg declared_type='BOOL' index='0' name='allowsFontSubpixelQuantization' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFont:'>
+<arg declared_type='CFTypeRef' index='0' name='font' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFontSize:'>
+<arg declared_type='CGFloat' index='0' name='fontSize' type='f' type64='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setForegroundColor:'>
+<arg declared_type='CGColorRef' index='0' name='foregroundColor' type='^{CGColor=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setString:'>
+<arg declared_type='id' index='0' name='string' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setTruncationMode:'>
+<arg declared_type='NSString*' index='0' name='truncationMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setWrapped:'>
+<arg declared_type='BOOL' index='0' name='wrapped' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='string'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='truncationMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+</class>
+<class name='CATiledLayer'>
+<method class_method='true' selector='fadeDuration'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='levelsOfDetail'>
+<retval declared_type='size_t' type='L' type64='Q'/>
+</method>
+<method selector='levelsOfDetailBias'>
+<retval declared_type='size_t' type='L' type64='Q'/>
+</method>
+<method selector='setLevelsOfDetail:'>
+<arg declared_type='size_t' index='0' name='levelsOfDetail' type='L' type64='Q'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setLevelsOfDetailBias:'>
+<arg declared_type='size_t' index='0' name='levelsOfDetailBias' type='L' type64='Q'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setTileSize:'>
+<arg declared_type='CGSize' index='0' name='tileSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='tileSize'>
+<retval declared_type='CGSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+</method>
+</class>
+<class name='CATransaction'>
+<method class_method='true' selector='animationDuration'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method class_method='true' selector='animationTimingFunction'>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='begin'>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='commit'>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='completionBlock'>
+<retval declared_type='id' type='@'/>
+</method>
+<method class_method='true' selector='disableActions'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method class_method='true' selector='flush'>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='lock'>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='setAnimationDuration:'>
+<arg declared_type='CFTimeInterval' index='0' name='dur' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='setAnimationTimingFunction:'>
+<arg declared_type='id' index='0' name='function' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='setCompletionBlock:'>
+<arg declared_type='id' index='0' name='block' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='setDisableActions:'>
+<arg declared_type='BOOL' index='0' name='flag' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='setValue:forKey:'>
+<arg declared_type='id' index='0' name='anObject' type='@'/>
+<arg declared_type='NSString*' index='1' name='key' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='unlock'>
+<retval declared_type='void' type='v'/>
+</method>
+<method class_method='true' selector='valueForKey:'>
+<arg declared_type='NSString*' index='0' name='key' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+</class>
+<class name='CATransition'>
+<method selector='endProgress'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='filter'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='setEndProgress:'>
+<arg declared_type='float' index='0' name='endProgress' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFilter:'>
+<arg declared_type='id' index='0' name='filter' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setStartProgress:'>
+<arg declared_type='float' index='0' name='startProgress' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSubtype:'>
+<arg declared_type='NSString*' index='0' name='subtype' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setType:'>
+<arg declared_type='NSString*' index='0' name='type' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='startProgress'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='subtype'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='type'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+</class>
+<class name='CAValueFunction'>
+<method class_method='true' selector='functionWithName:'>
+<arg declared_type='NSString*' index='0' name='name' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='name'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+</class>
+<class name='NSObject'>
+<method selector='actionForLayer:forKey:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='NSString*' index='1' name='event' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='animationDidStart:'>
+<arg declared_type='CAAnimation*' index='0' name='anim' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='animationDidStop:finished:'>
+<arg declared_type='CAAnimation*' index='0' name='anim' type='@'/>
+<arg declared_type='BOOL' index='1' name='flag' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='autoreverses'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='beginTime'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='displayLayer:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='drawLayer:inContext:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='CGContextRef' index='1' name='ctx' type='^{CGContext=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='duration'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='fillMode'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='invalidateLayoutOfLayer:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='layer'>
+<retval declared_type='CAMetalLayer*' type='@'/>
+</method>
+<method selector='layoutSublayersOfLayer:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='preferredSizeOfLayer:'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='CGSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+</method>
+<method selector='repeatCount'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='repeatDuration'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='runActionForKey:object:arguments:'>
+<arg declared_type='NSString*' index='0' name='event' type='@'/>
+<arg declared_type='id' index='1' name='anObject' type='@'/>
+<arg declared_type='id' index='2' name='dict' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setAutoreverses:'>
+<arg declared_type='BOOL' index='0' name='autoreverses' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBeginTime:'>
+<arg declared_type='CFTimeInterval' index='0' name='beginTime' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setDuration:'>
+<arg declared_type='CFTimeInterval' index='0' name='duration' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFillMode:'>
+<arg declared_type='NSString*' index='0' name='fillMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRepeatCount:'>
+<arg declared_type='float' index='0' name='repeatCount' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRepeatDuration:'>
+<arg declared_type='CFTimeInterval' index='0' name='repeatDuration' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSpeed:'>
+<arg declared_type='float' index='0' name='speed' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setTimeOffset:'>
+<arg declared_type='CFTimeInterval' index='0' name='timeOffset' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='speed'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='texture'>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='timeOffset'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+</class>
+<class name='NSValue'>
+<method selector='CATransform3DValue'>
+<retval declared_type='CATransform3D' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+</method>
+<method class_method='true' selector='valueWithCATransform3D:'>
+<arg declared_type='CATransform3D' index='0' name='t' type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=dddddddddddddddd}'/>
+<retval declared_type='NSValue*' type='@'/>
+</method>
+</class>
+<informal_protocol name='CAAction'>
+<method selector='runActionForKey:object:arguments:' type='v20@0:4@8@12@16' type64='v40@0:8@16@24@32'>
+<arg declared_type='NSString*' index='0' name='event' type='@'/>
+<arg declared_type='id' index='1' name='anObject' type='@'/>
+<arg declared_type='id' index='2' name='dict' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+</informal_protocol>
+<informal_protocol name='CAAnimationDelegate'>
+<method selector='animationDidStart:' type='v12@0:4@8' type64='v24@0:8@16'>
+<arg declared_type='CAAnimation*' index='0' name='anim' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='animationDidStop:finished:' type='v16@0:4@8B12' type64='v28@0:8@16B24'>
+<arg declared_type='CAAnimation*' index='0' name='anim' type='@'/>
+<arg declared_type='BOOL' index='1' name='flag' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+</informal_protocol>
+<informal_protocol name='CALayerDelegate'>
+<method selector='actionForLayer:forKey:' type='@16@0:4@8@12' type64='@32@0:8@16@24'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='NSString*' index='1' name='event' type='@'/>
+<retval declared_type='id' type='@'/>
+</method>
+<method selector='displayLayer:' type='v12@0:4@8' type64='v24@0:8@16'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='drawLayer:inContext:' type='v16@0:4@8^{CGContext=}12' type64='v32@0:8@16^{CGContext=}24'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<arg declared_type='CGContextRef' index='1' name='ctx' type='^{CGContext=}'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='layoutSublayersOfLayer:' type='v12@0:4@8' type64='v24@0:8@16'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+</informal_protocol>
+<informal_protocol name='CALayoutManager'>
+<method selector='invalidateLayoutOfLayer:' type='v12@0:4@8' type64='v24@0:8@16'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='layoutSublayersOfLayer:' type='v12@0:4@8' type64='v24@0:8@16'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='preferredSizeOfLayer:' type='{CGSize=ff}12@0:4@8' type64='{CGSize=dd}24@0:8@16'>
+<arg declared_type='CALayer*' index='0' name='layer' type='@'/>
+<retval declared_type='CGSize' type='{CGSize=ff}' type64='{CGSize=dd}'/>
+</method>
+</informal_protocol>
+<informal_protocol name='CAMediaTiming'>
+<method selector='autoreverses' type='B8@0:4' type64='B16@0:8'>
+<retval declared_type='BOOL' type='B'/>
+</method>
+<method selector='beginTime' type='d8@0:4' type64='d16@0:8'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='duration' type='d8@0:4' type64='d16@0:8'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='fillMode' type='@8@0:4' type64='@16@0:8'>
+<retval declared_type='NSString*' type='@'/>
+</method>
+<method selector='repeatCount' type='f8@0:4' type64='f16@0:8'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='repeatDuration' type='d8@0:4' type64='d16@0:8'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+<method selector='setAutoreverses:' type='v12@0:4B8' type64='v20@0:8B16'>
+<arg declared_type='BOOL' index='0' name='autoreverses' type='B'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setBeginTime:' type='v16@0:4d8' type64='v24@0:8d16'>
+<arg declared_type='CFTimeInterval' index='0' name='beginTime' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setDuration:' type='v16@0:4d8' type64='v24@0:8d16'>
+<arg declared_type='CFTimeInterval' index='0' name='duration' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setFillMode:' type='v12@0:4@8' type64='v24@0:8@16'>
+<arg declared_type='NSString*' index='0' name='fillMode' type='@'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRepeatCount:' type='v12@0:4f8' type64='v20@0:8f16'>
+<arg declared_type='float' index='0' name='repeatCount' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setRepeatDuration:' type='v16@0:4d8' type64='v24@0:8d16'>
+<arg declared_type='CFTimeInterval' index='0' name='repeatDuration' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setSpeed:' type='v12@0:4f8' type64='v20@0:8f16'>
+<arg declared_type='float' index='0' name='speed' type='f'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='setTimeOffset:' type='v16@0:4d8' type64='v24@0:8d16'>
+<arg declared_type='CFTimeInterval' index='0' name='timeOffset' type='d'/>
+<retval declared_type='void' type='v'/>
+</method>
+<method selector='speed' type='f8@0:4' type64='f16@0:8'>
+<retval declared_type='float' type='f'/>
+</method>
+<method selector='timeOffset' type='d8@0:4' type64='d16@0:8'>
+<retval declared_type='CFTimeInterval' type='d'/>
+</method>
+</informal_protocol>
+<informal_protocol name='CAMetalDrawable'>
+<method selector='layer' type='@8@0:4' type64='@16@0:8'>
+<retval declared_type='CAMetalLayer*' type='@'/>
+</method>
+<method selector='texture' type='@8@0:4' type64='@16@0:8'>
+<retval declared_type='id' type='@'/>
+</method>
+</informal_protocol>
+</signatures>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport.extras
new file mode 100644
index 0000000000..850668734b
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport.extras
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF8"?>
+<signatures swt_gen="mixed">
+ <class name="CALayer" swt_gen="mixed">
+ <method selector="setHidden:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ </class>
+</signatures>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java
index a16fdb4366..02d8196e5a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public SFCertificatePanel() {
super();
}
-public SFCertificatePanel(long /*int*/ id) {
+public SFCertificatePanel(long id) {
super(id);
}
@@ -35,11 +35,11 @@ public void setShowsHelp(boolean showsHelp) {
OS.objc_msgSend(this.id, OS.sel_setShowsHelp_, showsHelp);
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_SFCertificatePanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_SFCertificatePanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_SFCertificatePanel, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java
index c07a411587..a15123822e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public SFCertificateTrustPanel() {
super();
}
-public SFCertificateTrustPanel(long /*int*/ id) {
+public SFCertificateTrustPanel(long id) {
super(id);
}
@@ -27,20 +27,20 @@ public SFCertificateTrustPanel(id id) {
super(id);
}
-public void beginSheetForWindow(NSWindow docWindow, id delegate, long /*int*/ didEndSelector, long /*int*/ contextInfo, long /*int*/ trust, NSString message) {
+public void beginSheetForWindow(NSWindow docWindow, id delegate, long didEndSelector, long contextInfo, long trust, NSString message) {
OS.objc_msgSend(this.id, OS.sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_, docWindow != null ? docWindow.id : 0, delegate != null ? delegate.id : 0, didEndSelector, contextInfo, trust, message != null ? message.id : 0);
}
public static SFCertificateTrustPanel sharedCertificateTrustPanel() {
- long /*int*/ result = OS.objc_msgSend(OS.class_SFCertificateTrustPanel, OS.sel_sharedCertificateTrustPanel);
+ long result = OS.objc_msgSend(OS.class_SFCertificateTrustPanel, OS.sel_sharedCertificateTrustPanel);
return result != 0 ? new SFCertificateTrustPanel(result) : null;
}
-public static double /*float*/ minFrameWidthWithTitle(NSString aTitle, long /*int*/ aStyle) {
- return (double /*float*/)OS.objc_msgSend_fpret(OS.class_SFCertificateTrustPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+public static double minFrameWidthWithTitle(NSString aTitle, long aStyle) {
+ return OS.objc_msgSend_fpret(OS.class_SFCertificateTrustPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
}
-public static long /*int*/ windowNumberAtPoint(NSPoint point, long /*int*/ windowNumber) {
+public static long windowNumberAtPoint(NSPoint point, long windowNumber) {
return OS.objc_msgSend(OS.class_SFCertificateTrustPanel, OS.sel_windowNumberAtPoint_belowWindowWithWindowNumber_, point, windowNumber);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTApplicationDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTApplicationDelegate.java
index 4e0f0bf7bc..e98394f7fd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTApplicationDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTApplicationDelegate.java
@@ -18,7 +18,7 @@ public class SWTApplicationDelegate extends NSObject {
super(0);
}
- public SWTApplicationDelegate(long /*int*/ id) {
+ public SWTApplicationDelegate(long id) {
super(id);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTCanvasView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTCanvasView.java
index 0c8e66b816..8c902bfe98 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTCanvasView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTCanvasView.java
@@ -20,7 +20,7 @@ public SWTCanvasView() {
super(0);
}
-public SWTCanvasView(long /*int*/ id) {
+public SWTCanvasView(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTDragSourceDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTDragSourceDelegate.java
index cde0d8552e..9c693d0462 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTDragSourceDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTDragSourceDelegate.java
@@ -19,7 +19,7 @@ public class SWTDragSourceDelegate extends NSObject {
super(0);
}
- public SWTDragSourceDelegate(long /*int*/ id) {
+ public SWTDragSourceDelegate(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CFRange.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTOpenSavePanelDelegate.java
index 3aa6f2fedf..989367d431 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CFRange.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTOpenSavePanelDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,8 +13,14 @@
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
-public class CFRange {
- public long /*int*/ location;
- public long /*int*/ length;
- public static int sizeof = OS.CFRange_sizeof();
+public class SWTOpenSavePanelDelegate extends NSObject {
+
+public SWTOpenSavePanelDelegate() {
+ super(0);
+}
+
+public SWTOpenSavePanelDelegate(long id) {
+ super(id);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPanelDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPanelDelegate.java
index 768794ee52..5a03338ab2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPanelDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPanelDelegate.java
@@ -19,7 +19,7 @@ public SWTPanelDelegate() {
super(0);
}
-public SWTPanelDelegate(long /*int*/ id) {
+public SWTPanelDelegate(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPrintPanelDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPrintPanelDelegate.java
index d3d9c4bc24..5868b7aa62 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPrintPanelDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTPrintPanelDelegate.java
@@ -19,7 +19,7 @@ public SWTPrintPanelDelegate() {
super(0);
}
-public SWTPrintPanelDelegate(long /*int*/ id) {
+public SWTPrintPanelDelegate(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTScrollView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTScrollView.java
index 3b649c0733..59c6cc5a34 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTScrollView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTScrollView.java
@@ -19,7 +19,7 @@ public SWTScrollView() {
super(0);
}
-public SWTScrollView(long /*int*/ id) {
+public SWTScrollView(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabView.java
index a80a14b3fe..680e48c907 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabView.java
@@ -19,7 +19,7 @@ public SWTTabView() {
super(0);
}
-public SWTTabView(long /*int*/ id) {
+public SWTTabView(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextView.java
index 9197e293b7..54c267683f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextView.java
@@ -19,7 +19,7 @@ public SWTTextView() {
super(0);
}
-public SWTTextView(long /*int*/ id) {
+public SWTTextView(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTView.java
index 82550cfa1e..edc9602a16 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTView.java
@@ -20,7 +20,7 @@ public SWTView() {
super(0);
}
-public SWTView(long /*int*/ id) {
+public SWTView(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTWindowDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTWindowDelegate.java
index bf76b03fff..a40b98c11d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTWindowDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTWindowDelegate.java
@@ -19,7 +19,7 @@ public SWTWindowDelegate() {
super(0);
}
-public SWTWindowDelegate(long /*int*/ id) {
+public SWTWindowDelegate(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java
index ccd2053469..42425a680d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java
@@ -23,7 +23,6 @@ public enum Selector {
, sel_sendVerticalSelection("sendVerticalSelection")
, sel_sendHorizontalSelection("sendHorizontalSelection")
, sel_timerProc_("timerProc:")
- , sel_handleNotification_("handleNotification:")
, sel_callJava("callJava:index:token:arg:")
, sel_callRunBeforeUnloadConfirmPanelWithMessage("callRunBeforeUnloadConfirmPanelWithMessage:arg:")
, sel_createPanelDidEnd("createPanelDidEnd:returnCode:contextInfo:")
@@ -32,14 +31,10 @@ public enum Selector {
, sel_panelDidEnd_returnCode_contextInfo_("panelDidEnd:returnCode:contextInfo:")
, sel_updateOpenGLContext_("updateOpenGLContext:")
, sel_overwriteExistingFileCheck("_overwriteExistingFileCheck:")
- , sel_setShowsHiddenFiles_("setShowsHiddenFiles:")
- , sel_contextID("contextID")
, sel__drawThemeProgressArea_("_drawThemeProgressArea:")
, sel__setDashboardBehavior("_setDashboardBehavior:to:")
- , sel__setNeedsToUseHeartBeatWindow_("_setNeedsToUseHeartBeatWindow:")
-
, sel_sharedHandler("sharedHandler")
, sel_startAuthentication("startAuthentication:window:")
, sel_setAllowsAnyHTTPSCertificate("setAllowsAnyHTTPSCertificate:forHost:")
@@ -77,16 +72,16 @@ public enum Selector {
, sel_cellBaselineOffset("cellBaselineOffset")
- /** 10.7 selectors and constants */
- , sel_isCompatibleWithOverlayScrollers("isCompatibleWithOverlayScrollers")
- , sel_flashScrollers("flashScrollers")
- , sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_("frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:")
- , sel_scrollerStyle("scrollerStyle")
- , sel_toggleFullScreen_("toggleFullScreen:")
-
/** 10.12 selector */
, sel_setAllowsAutomaticWindowTabbing("setAllowsAutomaticWindowTabbing:")
+ /** 10.14 selectors */
+ , sel_selectedContentBackgroundColor("selectedContentBackgroundColor")
+ , sel_unemphasizedSelectedContentBackgroundColor("unemphasizedSelectedContentBackgroundColor")
+
+ /** 11.0 selector */
+ , sel_setStyle("setStyle:")
+
, sel_awtAppDelegate("awtAppDelegate")
/** This section is auto generated */
@@ -100,7 +95,6 @@ public enum Selector {
, sel_URL("URL")
, sel_URLFromPasteboard_("URLFromPasteboard:")
, sel_URLWithString_("URLWithString:")
- , sel_URLsForDirectory_inDomains_("URLsForDirectory:inDomains:")
, sel_UTF8String("UTF8String")
, sel_abortEditing("abortEditing")
, sel_absoluteString("absoluteString")
@@ -121,7 +115,6 @@ public enum Selector {
, sel_accessibilitySetValue_forAttribute_("accessibilitySetValue:forAttribute:")
, sel_action("action")
, sel_activateIgnoringOtherApps_("activateIgnoringOtherApps:")
- , sel_activateWithOptions_("activateWithOptions:")
, sel_addAttribute_value_range_("addAttribute:value:range:")
, sel_addButtonWithTitle_("addButtonWithTitle:")
, sel_addChildWindow_ordered_("addChildWindow:ordered:")
@@ -139,7 +132,6 @@ public enum Selector {
, sel_addSubview_("addSubview:")
, sel_addSubview_positioned_relativeTo_("addSubview:positioned:relativeTo:")
, sel_addTabStop_("addTabStop:")
- , sel_addTabViewItem_("addTabViewItem:")
, sel_addTableColumn_("addTableColumn:")
, sel_addTemporaryAttribute_value_forCharacterRange_("addTemporaryAttribute:value:forCharacterRange:")
, sel_addTextContainer_("addTextContainer:")
@@ -150,18 +142,14 @@ public enum Selector {
, sel_allKeys("allKeys")
, sel_allObjects("allObjects")
, sel_alloc("alloc")
- , sel_allowsColumnReordering("allowsColumnReordering")
- , sel_allowsFloats("allowsFloats")
, sel_alphaComponent("alphaComponent")
, sel_alphaValue("alphaValue")
, sel_altKey("altKey")
, sel_alternateSelectedControlColor("alternateSelectedControlColor")
, sel_alternateSelectedControlTextColor("alternateSelectedControlTextColor")
- , sel_alwaysShowsDecimalSeparator("alwaysShowsDecimalSeparator")
, sel_appearanceNamed_("appearanceNamed:")
, sel_appendAttributedString_("appendAttributedString:")
, sel_appendBezierPath_("appendBezierPath:")
- , sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:")
, sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:")
, sel_appendBezierPathWithGlyphs_count_inFont_("appendBezierPathWithGlyphs:count:inFont:")
, sel_appendBezierPathWithOvalInRect_("appendBezierPathWithOvalInRect:")
@@ -178,7 +166,6 @@ public enum Selector {
, sel_applicationShouldHandleReopen_hasVisibleWindows_("applicationShouldHandleReopen:hasVisibleWindows:")
, sel_applicationShouldTerminate_("applicationShouldTerminate:")
, sel_applicationWillFinishLaunching_("applicationWillFinishLaunching:")
- , sel_applicationWillTerminate_("applicationWillTerminate:")
, sel_archivedDataWithRootObject_("archivedDataWithRootObject:")
, sel_areCursorRectsEnabled("areCursorRectsEnabled")
, sel_arrangeInFront_("arrangeInFront:")
@@ -191,16 +178,13 @@ public enum Selector {
, sel_attachment("attachment")
, sel_attribute_atIndex_effectiveRange_("attribute:atIndex:effectiveRange:")
, sel_attributedStringValue("attributedStringValue")
- , sel_attributedStringWithAttachment_("attributedStringWithAttachment:")
, sel_attributedSubstringFromRange_("attributedSubstringFromRange:")
, sel_attributedTitle("attributedTitle")
, sel_attributesAtIndex_longestEffectiveRange_inRange_("attributesAtIndex:longestEffectiveRange:inRange:")
, sel_autorelease("autorelease")
, sel_availableFontFamilies("availableFontFamilies")
- , sel_availableFonts("availableFonts")
, sel_availableMembersOfFontFamily_("availableMembersOfFontFamily:")
, sel_availableTypeFromArray_("availableTypeFromArray:")
- , sel_backgroundColor("backgroundColor")
, sel_backingScaleFactor("backingScaleFactor")
, sel_badgeLabel("badgeLabel")
, sel_baselineOffsetInLayoutManager_glyphIndex_("baselineOffsetInLayoutManager:glyphIndex:")
@@ -208,12 +192,12 @@ public enum Selector {
, sel_becomeKeyWindow("becomeKeyWindow")
, sel_beginDocument("beginDocument")
, sel_beginEditing("beginEditing")
- , sel_beginGestureWithEvent_("beginGestureWithEvent:")
, sel_beginPageInRect_atPlacement_("beginPageInRect:atPlacement:")
, sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_("beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:")
, sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_("beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:")
, sel_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_("beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:")
, sel_beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_("beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:")
+ , sel_beginUndoGrouping("beginUndoGrouping")
, sel_bestRepresentationForDevice_("bestRepresentationForDevice:")
, sel_bezelStyle("bezelStyle")
, sel_bezierPath("bezierPath")
@@ -240,7 +224,6 @@ public enum Selector {
, sel_button("button")
, sel_buttonNumber("buttonNumber")
, sel_bytes("bytes")
- , sel_bytesPerPlane("bytesPerPlane")
, sel_bytesPerRow("bytesPerRow")
, sel_cacheDisplayInRect_toBitmapImageRep_("cacheDisplayInRect:toBitmapImageRep:")
, sel_calendarDate("calendarDate")
@@ -270,14 +253,12 @@ public enum Selector {
, sel_characterIndexForGlyphAtIndex_("characterIndexForGlyphAtIndex:")
, sel_characterIndexForInsertionAtPoint_("characterIndexForInsertionAtPoint:")
, sel_characterIndexForPoint_("characterIndexForPoint:")
- , sel_characterIsMember_("characterIsMember:")
, sel_characters("characters")
, sel_charactersIgnoringModifiers("charactersIgnoringModifiers")
, sel_chooseFilename_("chooseFilename:")
, sel_className("className")
, sel_cleanUpOperation("cleanUpOperation")
, sel_clearColor("clearColor")
- , sel_clearCurrentContext("clearCurrentContext")
, sel_clearDrawable("clearDrawable")
, sel_clickCount("clickCount")
, sel_clickedColumn("clickedColumn")
@@ -293,22 +274,17 @@ public enum Selector {
, sel_colorListNamed_("colorListNamed:")
, sel_colorSpace("colorSpace")
, sel_colorSpaceModel("colorSpaceModel")
- , sel_colorSpaceName("colorSpaceName")
, sel_colorUsingColorSpaceName_("colorUsingColorSpaceName:")
- , sel_colorWithCalibratedRed_green_blue_alpha_("colorWithCalibratedRed:green:blue:alpha:")
, sel_colorWithDeviceRed_green_blue_alpha_("colorWithDeviceRed:green:blue:alpha:")
, sel_colorWithKey_("colorWithKey:")
, sel_colorWithPatternImage_("colorWithPatternImage:")
, sel_columnAtPoint_("columnAtPoint:")
- , sel_columnIndexesInRect_("columnIndexesInRect:")
- , sel_columnWithIdentifier_("columnWithIdentifier:")
, sel_comboBoxSelectionDidChange_("comboBoxSelectionDidChange:")
, sel_comboBoxWillDismiss_("comboBoxWillDismiss:")
, sel_comboBoxWillPopUp_("comboBoxWillPopUp:")
, sel_compare_("compare:")
, sel_concat("concat")
, sel_conformsToProtocol_("conformsToProtocol:")
- , sel_containerSize("containerSize")
, sel_containsIndex_("containsIndex:")
, sel_containsObject_("containsObject:")
, sel_containsPoint_("containsPoint:")
@@ -319,7 +295,6 @@ public enum Selector {
, sel_contentViewMargins("contentViewMargins")
, sel_context("context")
, sel_controlBackgroundColor("controlBackgroundColor")
- , sel_controlContentFontOfSize_("controlContentFontOfSize:")
, sel_controlDarkShadowColor("controlDarkShadowColor")
, sel_controlHighlightColor("controlHighlightColor")
, sel_controlLightHighlightColor("controlLightHighlightColor")
@@ -331,17 +306,9 @@ public enum Selector {
, sel_convertFont_toHaveTrait_("convertFont:toHaveTrait:")
, sel_convertPoint_fromView_("convertPoint:fromView:")
, sel_convertPoint_toView_("convertPoint:toView:")
- , sel_convertPointFromBase_("convertPointFromBase:")
- , sel_convertPointToBase_("convertPointToBase:")
, sel_convertRect_fromView_("convertRect:fromView:")
, sel_convertRect_toView_("convertRect:toView:")
- , sel_convertRectFromBase_("convertRectFromBase:")
- , sel_convertRectToBase_("convertRectToBase:")
, sel_convertScreenToBase_("convertScreenToBase:")
- , sel_convertSize_fromView_("convertSize:fromView:")
- , sel_convertSize_toView_("convertSize:toView:")
- , sel_convertSizeFromBase_("convertSizeFromBase:")
- , sel_convertSizeToBase_("convertSizeToBase:")
, sel_cookies("cookies")
, sel_cookiesForURL_("cookiesForURL:")
, sel_cookiesWithResponseHeaderFields_forURL_("cookiesWithResponseHeaderFields:forURL:")
@@ -350,11 +317,10 @@ public enum Selector {
, sel_copy_("copy:")
, sel_count("count")
, sel_createContext("createContext")
- , sel_createFileAtPath_contents_attributes_("createFileAtPath:contents:attributes:")
, sel_credentialWithUser_password_persistence_("credentialWithUser:password:persistence:")
, sel_crosshairCursor("crosshairCursor")
, sel_ctrlKey("ctrlKey")
- , sel_currentApplication("currentApplication")
+ , sel_currentAppearance("currentAppearance")
, sel_currentContext("currentContext")
, sel_currentCursor("currentCursor")
, sel_currentEditor("currentEditor")
@@ -376,7 +342,6 @@ public enum Selector {
, sel_dateWithYear_month_day_hour_minute_second_timeZone_("dateWithYear:month:day:hour:minute:second:timeZone:")
, sel_dayOfMonth("dayOfMonth")
, sel_dealloc("dealloc")
- , sel_decimalDigitCharacterSet("decimalDigitCharacterSet")
, sel_decimalSeparator("decimalSeparator")
, sel_declareTypes_owner_("declareTypes:owner:")
, sel_defaultBaselineOffsetForFont_("defaultBaselineOffsetForFont:")
@@ -420,12 +385,11 @@ public enum Selector {
, sel_distantFuture("distantFuture")
, sel_doCommandBySelector_("doCommandBySelector:")
, sel_dockTile("dockTile")
- , sel_documentCursor("documentCursor")
, sel_documentSource("documentSource")
, sel_documentView("documentView")
, sel_documentViewShouldHandlePrint("documentViewShouldHandlePrint")
, sel_documentVisibleRect("documentVisibleRect")
- , sel_doubleClickAtIndex_("doubleClickAtIndex:")
+ , sel_doubleClickInterval("doubleClickInterval")
, sel_doubleValue("doubleValue")
, sel_download("download")
, sel_download_decideDestinationWithSuggestedFilename_("download:decideDestinationWithSuggestedFilename:")
@@ -435,7 +399,6 @@ public enum Selector {
, sel_draggedImage_beganAt_("draggedImage:beganAt:")
, sel_draggedImage_endedAt_operation_("draggedImage:endedAt:operation:")
, sel_draggingDestinationWindow("draggingDestinationWindow")
- , sel_draggingEnded_("draggingEnded:")
, sel_draggingEntered_("draggingEntered:")
, sel_draggingExited_("draggingExited:")
, sel_draggingLocation("draggingLocation")
@@ -443,8 +406,6 @@ public enum Selector {
, sel_draggingSourceOperationMask("draggingSourceOperationMask")
, sel_draggingSourceOperationMaskForLocal_("draggingSourceOperationMaskForLocal:")
, sel_draggingUpdated_("draggingUpdated:")
- , sel_drawAtPoint_("drawAtPoint:")
- , sel_drawAtPoint_fromRect_operation_fraction_("drawAtPoint:fromRect:operation:fraction:")
, sel_drawBackgroundForGlyphRange_atPoint_("drawBackgroundForGlyphRange:atPoint:")
, sel_drawBackgroundInClipRect_("drawBackgroundInClipRect:")
, sel_drawBezelWithFrame_inView_("drawBezelWithFrame:inView:")
@@ -471,9 +432,9 @@ public enum Selector {
, sel_endDocument("endDocument")
, sel_endEditing("endEditing")
, sel_endEditingFor_("endEditingFor:")
- , sel_endGestureWithEvent_("endGestureWithEvent:")
, sel_endPage("endPage")
, sel_endSheet_returnCode_("endSheet:returnCode:")
+ , sel_endUndoGrouping("endUndoGrouping")
, sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_("enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:")
, sel_enumeratorAtPath_("enumeratorAtPath:")
, sel_expandItem_("expandItem:")
@@ -483,17 +444,16 @@ public enum Selector {
, sel_fieldEditor_forObject_("fieldEditor:forObject:")
, sel_fileExistsAtPath_("fileExistsAtPath:")
, sel_fileExistsAtPath_isDirectory_("fileExistsAtPath:isDirectory:")
- , sel_fileSystemRepresentation("fileSystemRepresentation")
, sel_fileURLWithPath_("fileURLWithPath:")
, sel_filename("filename")
, sel_filenames("filenames")
, sel_fill("fill")
, sel_fillRect_("fillRect:")
, sel_finishLaunching("finishLaunching")
- , sel_firstIndex("firstIndex")
, sel_firstRectForCharacterRange_("firstRectForCharacterRange:")
, sel_firstResponder("firstResponder")
, sel_flagsChanged_("flagsChanged:")
+ , sel_flashScrollers("flashScrollers")
, sel_floatValue("floatValue")
, sel_flushBuffer("flushBuffer")
, sel_flushGraphics("flushGraphics")
@@ -501,26 +461,22 @@ public enum Selector {
, sel_focusRingMaskBoundsForFrame_inView_("focusRingMaskBoundsForFrame:inView:")
, sel_font("font")
, sel_fontName("fontName")
- , sel_fontWithFamily_traits_weight_size_("fontWithFamily:traits:weight:size:")
, sel_fontWithName_size_("fontWithName:size:")
, sel_frame("frame")
, sel_frameOfCellAtColumn_row_("frameOfCellAtColumn:row:")
, sel_frameOfOutlineCellAtRow_("frameOfOutlineCellAtRow:")
, sel_frameRectForContentRect_("frameRectForContentRect:")
, sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_("frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:")
+ , sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_("frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:")
, sel_fullPathForApplication_("fullPathForApplication:")
, sel_generalPasteboard("generalPasteboard")
- , sel_genericRGBColorSpace("genericRGBColorSpace")
- , sel_getBitmapDataPlanes_("getBitmapDataPlanes:")
, sel_getBytes_("getBytes:")
- , sel_getBytes_length_("getBytes:length:")
, sel_getCharacters_("getCharacters:")
, sel_getCharacters_range_("getCharacters:range:")
, sel_getComponents_("getComponents:")
, sel_getGlyphs_range_("getGlyphs:range:")
, sel_getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_("getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:")
, sel_getIndexes_maxCount_inIndexRange_("getIndexes:maxCount:inIndexRange:")
- , sel_getInfoForFile_application_type_("getInfoForFile:application:type:")
, sel_getValues_forAttribute_forVirtualScreen_("getValues:forAttribute:forVirtualScreen:")
, sel_globalContext("globalContext")
, sel_glyphIndexForCharacterAtIndex_("glyphIndexForCharacterAtIndex:")
@@ -547,17 +503,13 @@ public enum Selector {
, sel_helpRequested_("helpRequested:")
, sel_hide_("hide:")
, sel_hideOtherApplications_("hideOtherApplications:")
- , sel_highlightColorInView_("highlightColorInView:")
- , sel_highlightColorWithFrame_inView_("highlightColorWithFrame:inView:")
, sel_highlightSelectionInClipRect_("highlightSelectionInClipRect:")
, sel_hitPart("hitPart")
, sel_hitTest_("hitTest:")
, sel_hitTestForEvent_inRect_ofView_("hitTestForEvent:inRect:ofView:")
, sel_host("host")
- , sel_hotSpot("hotSpot")
, sel_hourOfDay("hourOfDay")
, sel_iconForFile_("iconForFile:")
- , sel_iconForFileType_("iconForFileType:")
, sel_ignore("ignore")
, sel_ignoreModifierKeysWhileDragging("ignoreModifierKeysWhileDragging")
, sel_image("image")
@@ -565,21 +517,18 @@ public enum Selector {
, sel_imageNamed_("imageNamed:")
, sel_imageRectForBounds_("imageRectForBounds:")
, sel_imageRepWithContentsOfFile_("imageRepWithContentsOfFile:")
- , sel_imageRepWithData_("imageRepWithData:")
, sel_imageablePageBounds("imageablePageBounds")
, sel_increment("increment")
, sel_indentationPerLevel("indentationPerLevel")
, sel_indexOfItemWithTarget_andAction_("indexOfItemWithTarget:andAction:")
, sel_indexOfObjectIdenticalTo_("indexOfObjectIdenticalTo:")
, sel_indexOfSelectedItem("indexOfSelectedItem")
- , sel_indexSetWithIndex_("indexSetWithIndex:")
, sel_infoDictionary("infoDictionary")
, sel_init("init")
, sel_initByReferencingFile_("initByReferencingFile:")
, sel_initListDescriptor("initListDescriptor")
, sel_initWithAttributes_("initWithAttributes:")
, sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_("initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:")
- , sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_("initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:")
, sel_initWithCapacity_("initWithCapacity:")
, sel_initWithCharacters_length_("initWithCharacters:length:")
, sel_initWithColors_("initWithColors:")
@@ -588,9 +537,7 @@ public enum Selector {
, sel_initWithContentRect_styleMask_backing_defer_screen_("initWithContentRect:styleMask:backing:defer:screen:")
, sel_initWithContentsOfFile_("initWithContentsOfFile:")
, sel_initWithData_("initWithData:")
- , sel_initWithDictionary_("initWithDictionary:")
, sel_initWithFileWrapper_("initWithFileWrapper:")
- , sel_initWithFocusedViewRect_("initWithFocusedViewRect:")
, sel_initWithFormat_shareContext_("initWithFormat:shareContext:")
, sel_initWithFrame_("initWithFrame:")
, sel_initWithFrame_frameName_groupName_("initWithFrame:frameName:groupName:")
@@ -599,12 +546,10 @@ public enum Selector {
, sel_initWithIdentifier_("initWithIdentifier:")
, sel_initWithImage_hotSpot_("initWithImage:hotSpot:")
, sel_initWithIndex_("initWithIndex:")
- , sel_initWithIndexSet_("initWithIndexSet:")
, sel_initWithIndexesInRange_("initWithIndexesInRange:")
, sel_initWithItemIdentifier_("initWithItemIdentifier:")
, sel_initWithLocaleIdentifier_("initWithLocaleIdentifier:")
, sel_initWithName_("initWithName:")
- , sel_initWithRect_options_owner_userInfo_("initWithRect:options:owner:userInfo:")
, sel_initWithSize_("initWithSize:")
, sel_initWithStartingColor_endingColor_("initWithStartingColor:endingColor:")
, sel_initWithString_("initWithString:")
@@ -613,13 +558,14 @@ public enum Selector {
, sel_initWithTitle_action_keyEquivalent_("initWithTitle:action:keyEquivalent:")
, sel_initWithTransform_("initWithTransform:")
, sel_initWithType_location_("initWithType:location:")
- , sel_initWithURL_("initWithURL:")
, sel_insertColor_key_atIndex_("insertColor:key:atIndex:")
, sel_insertItem_atIndex_("insertItem:atIndex:")
, sel_insertItemWithItemIdentifier_atIndex_("insertItemWithItemIdentifier:atIndex:")
, sel_insertItemWithObjectValue_atIndex_("insertItemWithObjectValue:atIndex:")
+ , sel_insertObject_atIndex_("insertObject:atIndex:")
, sel_insertTabViewItem_atIndex_("insertTabViewItem:atIndex:")
, sel_insertText_("insertText:")
+ , sel_insertText_replacementRange_("insertText:replacementRange:")
, sel_intValue("intValue")
, sel_integerValue("integerValue")
, sel_intercellSpacing("intercellSpacing")
@@ -628,13 +574,13 @@ public enum Selector {
, sel_invalidateShadow("invalidateShadow")
, sel_invert("invert")
, sel_isActive("isActive")
+ , sel_isCompatibleWithOverlayScrollers("isCompatibleWithOverlayScrollers")
, sel_isDescendantOf_("isDescendantOf:")
, sel_isDocumentEdited("isDocumentEdited")
, sel_isDrawingToScreen("isDrawingToScreen")
, sel_isEmpty("isEmpty")
, sel_isEnabled("isEnabled")
, sel_isEqual_("isEqual:")
- , sel_isEqualTo_("isEqualTo:")
, sel_isEqualToString_("isEqualToString:")
, sel_isExecutableFileAtPath_("isExecutableFileAtPath:")
, sel_isFieldEditor("isFieldEditor")
@@ -679,10 +625,10 @@ public enum Selector {
, sel_knobProportion("knobProportion")
, sel_knobThickness("knobThickness")
, sel_lastPathComponent("lastPathComponent")
+ , sel_layer("layer")
, sel_layoutManager("layoutManager")
, sel_leading("leading")
, sel_length("length")
- , sel_level("level")
, sel_levelForItem_("levelForItem:")
, sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:")
, sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")
@@ -692,33 +638,28 @@ public enum Selector {
, sel_loadNibFile_externalNameTable_withZone_("loadNibFile:externalNameTable:withZone:")
, sel_loadRequest_("loadRequest:")
, sel_localizedDescription("localizedDescription")
- , sel_location("location")
, sel_locationForGlyphAtIndex_("locationForGlyphAtIndex:")
, sel_locationInWindow("locationInWindow")
, sel_lockFocus("lockFocus")
+ , sel_lockFocusIfCanDraw("lockFocusIfCanDraw")
, sel_lowercaseString("lowercaseString")
, sel_magnification("magnification")
, sel_magnifyWithEvent_("magnifyWithEvent:")
, sel_mainBundle("mainBundle")
, sel_mainFrame("mainFrame")
, sel_mainMenu("mainMenu")
- , sel_mainRunLoop("mainRunLoop")
, sel_mainScreen("mainScreen")
- , sel_mainWindow("mainWindow")
, sel_makeCurrentContext("makeCurrentContext")
, sel_makeFirstResponder_("makeFirstResponder:")
, sel_makeKeyAndOrderFront_("makeKeyAndOrderFront:")
, sel_markedRange("markedRange")
, sel_markedTextAttributes("markedTextAttributes")
+ , sel_maxSize("maxSize")
, sel_maxValue("maxValue")
- , sel_maximum("maximum")
- , sel_maximumFractionDigits("maximumFractionDigits")
- , sel_maximumIntegerDigits("maximumIntegerDigits")
, sel_menu("menu")
, sel_menu_willHighlightItem_("menu:willHighlightItem:")
, sel_menuBarFontOfSize_("menuBarFontOfSize:")
, sel_menuDidClose_("menuDidClose:")
- , sel_menuFontOfSize_("menuFontOfSize:")
, sel_menuForEvent_("menuForEvent:")
, sel_menuNeedsUpdate_("menuNeedsUpdate:")
, sel_menuWillOpen_("menuWillOpen:")
@@ -727,7 +668,6 @@ public enum Selector {
, sel_minSize("minSize")
, sel_minValue("minValue")
, sel_miniaturize_("miniaturize:")
- , sel_minimum("minimum")
, sel_minimumSize("minimumSize")
, sel_minuteOfHour("minuteOfHour")
, sel_modifierFlags("modifierFlags")
@@ -743,13 +683,10 @@ public enum Selector {
, sel_mouseMoved_("mouseMoved:")
, sel_mouseUp_("mouseUp:")
, sel_moveColumn_toColumn_("moveColumn:toColumn:")
- , sel_moveToBeginningOfParagraph_("moveToBeginningOfParagraph:")
- , sel_moveToEndOfParagraph_("moveToEndOfParagraph:")
, sel_moveToPoint_("moveToPoint:")
- , sel_moveUp_("moveUp:")
, sel_mutableCopy("mutableCopy")
- , sel_mutableString("mutableString")
, sel_name("name")
+ , sel_nameFieldStringValue("nameFieldStringValue")
, sel_needsPanelToBecomeKey("needsPanelToBecomeKey")
, sel_nextEventMatchingMask_untilDate_inMode_dequeue_("nextEventMatchingMask:untilDate:inMode:dequeue:")
, sel_nextObject("nextObject")
@@ -762,7 +699,6 @@ public enum Selector {
, sel_numberOfComponents("numberOfComponents")
, sel_numberOfGlyphs("numberOfGlyphs")
, sel_numberOfItems("numberOfItems")
- , sel_numberOfPlanes("numberOfPlanes")
, sel_numberOfRows("numberOfRows")
, sel_numberOfRowsInTableView_("numberOfRowsInTableView:")
, sel_numberOfSelectedRows("numberOfSelectedRows")
@@ -778,10 +714,10 @@ public enum Selector {
, sel_objectForInfoDictionaryKey_("objectForInfoDictionaryKey:")
, sel_objectForKey_("objectForKey:")
, sel_objectValues("objectValues")
- , sel_openFile_withApplication_("openFile:withApplication:")
, sel_openPanel("openPanel")
, sel_openURL_("openURL:")
, sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_("openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:")
+ , sel_operatingSystemVersion("operatingSystemVersion")
, sel_operationNotAllowedCursor("operationNotAllowedCursor")
, sel_options("options")
, sel_orderBack_("orderBack:")
@@ -790,12 +726,10 @@ public enum Selector {
, sel_orderFrontStandardAboutPanel_("orderFrontStandardAboutPanel:")
, sel_orderOut_("orderOut:")
, sel_orderWindow_relativeTo_("orderWindow:relativeTo:")
- , sel_orderedWindows("orderedWindows")
, sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_("otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:")
, sel_otherMouseDown_("otherMouseDown:")
, sel_otherMouseDragged_("otherMouseDragged:")
, sel_otherMouseUp_("otherMouseUp:")
- , sel_outlineTableColumn("outlineTableColumn")
, sel_outlineView_acceptDrop_item_childIndex_("outlineView:acceptDrop:item:childIndex:")
, sel_outlineView_child_ofItem_("outlineView:child:ofItem:")
, sel_outlineView_didClickTableColumn_("outlineView:didClickTableColumn:")
@@ -803,25 +737,23 @@ public enum Selector {
, sel_outlineView_numberOfChildrenOfItem_("outlineView:numberOfChildrenOfItem:")
, sel_outlineView_objectValueForTableColumn_byItem_("outlineView:objectValueForTableColumn:byItem:")
, sel_outlineView_setObjectValue_forTableColumn_byItem_("outlineView:setObjectValue:forTableColumn:byItem:")
- , sel_outlineView_shouldCollapseItem_("outlineView:shouldCollapseItem:")
, sel_outlineView_shouldEditTableColumn_item_("outlineView:shouldEditTableColumn:item:")
, sel_outlineView_shouldExpandItem_("outlineView:shouldExpandItem:")
, sel_outlineView_shouldReorderColumn_toColumn_("outlineView:shouldReorderColumn:toColumn:")
- , sel_outlineView_shouldSelectItem_("outlineView:shouldSelectItem:")
, sel_outlineView_shouldTrackCell_forTableColumn_item_("outlineView:shouldTrackCell:forTableColumn:item:")
, sel_outlineView_validateDrop_proposedItem_proposedChildIndex_("outlineView:validateDrop:proposedItem:proposedChildIndex:")
, sel_outlineView_willDisplayCell_forTableColumn_item_("outlineView:willDisplayCell:forTableColumn:item:")
, sel_outlineView_writeItems_toPasteboard_("outlineView:writeItems:toPasteboard:")
, sel_outlineViewColumnDidMove_("outlineViewColumnDidMove:")
, sel_outlineViewColumnDidResize_("outlineViewColumnDidResize:")
- , sel_outlineViewItemDidExpand_("outlineViewItemDidExpand:")
, sel_outlineViewSelectionDidChange_("outlineViewSelectionDidChange:")
, sel_outlineViewSelectionIsChanging_("outlineViewSelectionIsChanging:")
, sel_owner("owner")
, sel_pageDown_("pageDown:")
, sel_pageTitle("pageTitle")
, sel_pageUp_("pageUp:")
- , sel_panel_shouldShowFilename_("panel:shouldShowFilename:")
+ , sel_panel_shouldEnableURL_("panel:shouldEnableURL:")
+ , sel_panel_userEnteredFilename_confirmed_("panel:userEnteredFilename:confirmed:")
, sel_panelConvertFont_("panelConvertFont:")
, sel_paperSize("paperSize")
, sel_paragraphs("paragraphs")
@@ -851,16 +783,17 @@ public enum Selector {
, sel_postEvent_atStart_("postEvent:atStart:")
, sel_preparedCellAtColumn_row_("preparedCellAtColumn:row:")
, sel_prependTransform_("prependTransform:")
+ , sel_pressedMouseButtons("pressedMouseButtons")
, sel_preventDefault("preventDefault")
, sel_previousFailureCount("previousFailureCount")
, sel_printDocumentView("printDocumentView")
, sel_printOperationWithPrintInfo_("printOperationWithPrintInfo:")
, sel_printOperationWithView_printInfo_("printOperationWithView:printInfo:")
, sel_printPanel("printPanel")
- , sel_printSettings("printSettings")
, sel_printer("printer")
, sel_printerNames("printerNames")
, sel_printerWithName_("printerWithName:")
+ , sel_processInfo("processInfo")
, sel_propertyListForType_("propertyListForType:")
, sel_proposedCredential("proposedCredential")
, sel_protectionSpace("protectionSpace")
@@ -878,6 +811,7 @@ public enum Selector {
, sel_redComponent("redComponent")
, sel_redo("redo")
, sel_reflectScrolledClipView_("reflectScrolledClipView:")
+ , sel_registerDefaults_("registerDefaults:")
, sel_registerForDraggedTypes_("registerForDraggedTypes:")
, sel_release("release")
, sel_reload_("reload:")
@@ -889,17 +823,14 @@ public enum Selector {
, sel_removeChildWindow_("removeChildWindow:")
, sel_removeColorWithKey_("removeColorWithKey:")
, sel_removeFromSuperview("removeFromSuperview")
- , sel_removeIndex_("removeIndex:")
, sel_removeItem_("removeItem:")
, sel_removeItemAtIndex_("removeItemAtIndex:")
- , sel_removeItemAtPath_error_("removeItemAtPath:error:")
, sel_removeLastObject("removeLastObject")
, sel_removeObject_("removeObject:")
, sel_removeObjectAtIndex_("removeObjectAtIndex:")
, sel_removeObjectForKey_("removeObjectForKey:")
, sel_removeObjectIdenticalTo_("removeObjectIdenticalTo:")
, sel_removeObserver_("removeObserver:")
- , sel_removeObserver_name_object_("removeObserver:name:object:")
, sel_removeRepresentation_("removeRepresentation:")
, sel_removeStatusItem_("removeStatusItem:")
, sel_removeTabViewItem_("removeTabViewItem:")
@@ -922,7 +853,6 @@ public enum Selector {
, sel_resizeUpCursor("resizeUpCursor")
, sel_resizeUpDownCursor("resizeUpDownCursor")
, sel_resizingMask("resizingMask")
- , sel_resourcePath("resourcePath")
, sel_respondsToSelector_("respondsToSelector:")
, sel_restoreGraphicsState("restoreGraphicsState")
, sel_retain("retain")
@@ -936,8 +866,6 @@ public enum Selector {
, sel_rowAtPoint_("rowAtPoint:")
, sel_rowForItem_("rowForItem:")
, sel_rowHeight("rowHeight")
- , sel_rowsInRect_("rowsInRect:")
- , sel_run("run")
, sel_runModal("runModal")
, sel_runModalForDirectory_file_("runModalForDirectory:file:")
, sel_runModalForWindow_("runModalForWindow:")
@@ -958,11 +886,9 @@ public enum Selector {
, sel_scrollPoint_("scrollPoint:")
, sel_scrollRangeToVisible_("scrollRangeToVisible:")
, sel_scrollRect_by_("scrollRect:by:")
- , sel_scrollRectToVisible_("scrollRectToVisible:")
, sel_scrollRowToVisible_("scrollRowToVisible:")
- , sel_scrollToPoint_("scrollToPoint:")
, sel_scrollWheel_("scrollWheel:")
- , sel_scrollerWidth("scrollerWidth")
+ , sel_scrollerStyle("scrollerStyle")
, sel_scrollerWidthForControlSize_("scrollerWidthForControlSize:")
, sel_searchButtonCell("searchButtonCell")
, sel_searchButtonRectForBounds_("searchButtonRectForBounds:")
@@ -993,6 +919,7 @@ public enum Selector {
, sel_setAcceptsMouseMovedEvents_("setAcceptsMouseMovedEvents:")
, sel_setAcceptsTouchEvents_("setAcceptsTouchEvents:")
, sel_setAccessoryView_("setAccessoryView:")
+ , sel_setAccessoryViewDisclosed_("setAccessoryViewDisclosed:")
, sel_setAction_("setAction:")
, sel_setActivationPolicy_("setActivationPolicy:")
, sel_setAlertStyle_("setAlertStyle:")
@@ -1026,7 +953,6 @@ public enum Selector {
, sel_setBackgroundStyle_("setBackgroundStyle:")
, sel_setBadgeLabel_("setBadgeLabel:")
, sel_setBaseWritingDirection_("setBaseWritingDirection:")
- , sel_setBaseWritingDirection_range_("setBaseWritingDirection:range:")
, sel_setBecomesKeyOnlyIfNeeded_("setBecomesKeyOnlyIfNeeded:")
, sel_setBezelStyle_("setBezelStyle:")
, sel_setBezeled_("setBezeled:")
@@ -1034,6 +960,7 @@ public enum Selector {
, sel_setBorderWidth_("setBorderWidth:")
, sel_setBordered_("setBordered:")
, sel_setBoundsRotation_("setBoundsRotation:")
+ , sel_setBoundsSize_("setBoundsSize:")
, sel_setBoxType_("setBoxType:")
, sel_setButtonType_("setButtonType:")
, sel_setCacheMode_("setCacheMode:")
@@ -1086,7 +1013,6 @@ public enum Selector {
, sel_setDropRow_dropOperation_("setDropRow:dropOperation:")
, sel_setEditable_("setEditable:")
, sel_setEnabled_("setEnabled:")
- , sel_setEnabled_forSegment_("setEnabled:forSegment:")
, sel_setFill("setFill")
, sel_setFillColor_("setFillColor:")
, sel_setFireDate_("setFireDate:")
@@ -1124,7 +1050,6 @@ public enum Selector {
, sel_setIcon_("setIcon:")
, sel_setIdentifier_("setIdentifier:")
, sel_setImage_("setImage:")
- , sel_setImage_forSegment_("setImage:forSegment:")
, sel_setImageAlignment_("setImageAlignment:")
, sel_setImageInterpolation_("setImageInterpolation:")
, sel_setImagePosition_("setImagePosition:")
@@ -1142,15 +1067,12 @@ public enum Selector {
, sel_setKeyEquivalentModifierMask_("setKeyEquivalentModifierMask:")
, sel_setKnobProportion_("setKnobProportion:")
, sel_setLabel_("setLabel:")
- , sel_setLabel_forSegment_("setLabel:forSegment:")
- , sel_setLeaf_("setLeaf:")
, sel_setLength_("setLength:")
, sel_setLevel_("setLevel:")
, sel_setLineBreakMode_("setLineBreakMode:")
, sel_setLineCapStyle_("setLineCapStyle:")
, sel_setLineDash_count_phase_("setLineDash:count:phase:")
, sel_setLineFragmentPadding_("setLineFragmentPadding:")
- , sel_setLineFragmentRect_forGlyphRange_usedRect_("setLineFragmentRect:forGlyphRange:usedRect:")
, sel_setLineJoinStyle_("setLineJoinStyle:")
, sel_setLineSpacing_("setLineSpacing:")
, sel_setLineWidth_("setLineWidth:")
@@ -1163,7 +1085,6 @@ public enum Selector {
, sel_setMaximumFractionDigits_("setMaximumFractionDigits:")
, sel_setMaximumIntegerDigits_("setMaximumIntegerDigits:")
, sel_setMenu_("setMenu:")
- , sel_setMenu_forSegment_("setMenu:forSegment:")
, sel_setMenuFormRepresentation_("setMenuFormRepresentation:")
, sel_setMessage_("setMessage:")
, sel_setMessageText_("setMessageText:")
@@ -1206,13 +1127,9 @@ public enum Selector {
, sel_setScalesWhenResized_("setScalesWhenResized:")
, sel_setScrollable_("setScrollable:")
, sel_setSearchButtonCell_("setSearchButtonCell:")
- , sel_setSegmentCount_("setSegmentCount:")
- , sel_setSegmentStyle_("setSegmentStyle:")
, sel_setSelectable_("setSelectable:")
- , sel_setSelected_forSegment_("setSelected:forSegment:")
, sel_setSelectedItemIdentifier_("setSelectedItemIdentifier:")
, sel_setSelectedRange_("setSelectedRange:")
- , sel_setSelectedSegment_("setSelectedSegment:")
, sel_setSelectedTextAttributes_("setSelectedTextAttributes:")
, sel_setSelectionOnly_("setSelectionOnly:")
, sel_setServicesMenu_("setServicesMenu:")
@@ -1233,7 +1150,6 @@ public enum Selector {
, sel_setTabStops_("setTabStops:")
, sel_setTabViewType_("setTabViewType:")
, sel_setTag_("setTag:")
- , sel_setTag_forSegment_("setTag:forSegment:")
, sel_setTarget_("setTarget:")
, sel_setTextColor_("setTextColor:")
, sel_setTextStorage_("setTextStorage:")
@@ -1241,9 +1157,7 @@ public enum Selector {
, sel_setTitleFont_("setTitleFont:")
, sel_setTitlePosition_("setTitlePosition:")
, sel_setToolTip_("setToolTip:")
- , sel_setToolTip_forSegment_("setToolTip:forSegment:")
, sel_setToolbar_("setToolbar:")
- , sel_setTrackingMode_("setTrackingMode:")
, sel_setTransformStruct_("setTransformStruct:")
, sel_setTreatsFilePackagesAsDirectories_("setTreatsFilePackagesAsDirectories:")
, sel_setUIDelegate_("setUIDelegate:")
@@ -1264,7 +1178,6 @@ public enum Selector {
, sel_setVisible_("setVisible:")
, sel_setWantsRestingTouches_("setWantsRestingTouches:")
, sel_setWidth_("setWidth:")
- , sel_setWidth_forSegment_("setWidth:forSegment:")
, sel_setWidthTracksTextView_("setWidthTracksTextView:")
, sel_setWindingRule_("setWindingRule:")
, sel_setWorksWhenModal_("setWorksWhenModal:")
@@ -1291,12 +1204,10 @@ public enum Selector {
, sel_sortIndicatorRectForBounds_("sortIndicatorRectForBounds:")
, sel_standardPreferences("standardPreferences")
, sel_standardUserDefaults("standardUserDefaults")
- , sel_standardWindowButton_("standardWindowButton:")
, sel_startAnimation_("startAnimation:")
, sel_state("state")
, sel_statusItemWithLength_("statusItemWithLength:")
, sel_stop_("stop:")
- , sel_stopAnimation_("stopAnimation:")
, sel_stopLoading_("stopLoading:")
, sel_stopModal("stopModal")
, sel_string("string")
@@ -1327,10 +1238,7 @@ public enum Selector {
, sel_systemFontSizeForControlSize_("systemFontSizeForControlSize:")
, sel_systemStatusBar("systemStatusBar")
, sel_systemVersion("systemVersion")
- , sel_tabStopType("tabStopType")
- , sel_tabStops("tabStops")
, sel_tabView_didSelectTabViewItem_("tabView:didSelectTabViewItem:")
- , sel_tabView_shouldSelectTabViewItem_("tabView:shouldSelectTabViewItem:")
, sel_tabView_willSelectTabViewItem_("tabView:willSelectTabViewItem:")
, sel_tabViewItemAtPoint_("tabViewItemAtPoint:")
, sel_tableColumns("tableColumns")
@@ -1340,7 +1248,6 @@ public enum Selector {
, sel_tableView_setObjectValue_forTableColumn_row_("tableView:setObjectValue:forTableColumn:row:")
, sel_tableView_shouldEditTableColumn_row_("tableView:shouldEditTableColumn:row:")
, sel_tableView_shouldReorderColumn_toColumn_("tableView:shouldReorderColumn:toColumn:")
- , sel_tableView_shouldSelectRow_("tableView:shouldSelectRow:")
, sel_tableView_shouldTrackCell_forTableColumn_row_("tableView:shouldTrackCell:forTableColumn:row:")
, sel_tableView_validateDrop_proposedRow_proposedDropOperation_("tableView:validateDrop:proposedRow:proposedDropOperation:")
, sel_tableView_willDisplayCell_forTableColumn_row_("tableView:willDisplayCell:forTableColumn:row:")
@@ -1372,14 +1279,12 @@ public enum Selector {
, sel_titleFont("titleFont")
, sel_titleOfSelectedItem("titleOfSelectedItem")
, sel_titleRectForBounds_("titleRectForBounds:")
- , sel_toggleToolbarShown_("toggleToolbarShown:")
+ , sel_toggleFullScreen_("toggleFullScreen:")
, sel_toolbar("toolbar")
, sel_toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_("toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:")
, sel_toolbarAllowedItemIdentifiers_("toolbarAllowedItemIdentifiers:")
, sel_toolbarDefaultItemIdentifiers_("toolbarDefaultItemIdentifiers:")
- , sel_toolbarDidRemoveItem_("toolbarDidRemoveItem:")
, sel_toolbarSelectableItemIdentifiers_("toolbarSelectableItemIdentifiers:")
- , sel_toolbarWillAddItem_("toolbarWillAddItem:")
, sel_touchesBeganWithEvent_("touchesBeganWithEvent:")
, sel_touchesCancelledWithEvent_("touchesCancelledWithEvent:")
, sel_touchesEndedWithEvent_("touchesEndedWithEvent:")
@@ -1471,7 +1376,6 @@ public enum Selector {
, sel_webViewFocus_("webViewFocus:")
, sel_webViewShow_("webViewShow:")
, sel_webViewUnfocus_("webViewUnfocus:")
- , sel_weightOfFont_("weightOfFont:")
, sel_wheelDelta("wheelDelta")
, sel_wheelDeltaX("wheelDeltaX")
, sel_wheelDeltaY("wheelDeltaY")
@@ -1484,17 +1388,13 @@ public enum Selector {
, sel_windowDidMove_("windowDidMove:")
, sel_windowDidResignKey_("windowDidResignKey:")
, sel_windowDidResize_("windowDidResize:")
- , sel_windowFrameColor("windowFrameColor")
, sel_windowFrameTextColor("windowFrameTextColor")
, sel_windowNumber("windowNumber")
, sel_windowNumberAtPoint_belowWindowWithWindowNumber_("windowNumberAtPoint:belowWindowWithWindowNumber:")
- , sel_windowRef("windowRef")
, sel_windowShouldClose_("windowShouldClose:")
, sel_windowWillClose_("windowWillClose:")
, sel_windowWithWindowNumber_("windowWithWindowNumber:")
, sel_windows("windows")
- , sel_worksWhenModal("worksWhenModal")
- , sel_wraps("wraps")
, sel_writeObjects_("writeObjects:")
, sel_writeSelectionToPasteboard_types_("writeSelectionToPasteboard:types:")
, sel_yearOfCommonEra("yearOfCommonEra")
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDataSource.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDataSource.java
index 9ac5130a53..2a885dc6d5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDataSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDataSource.java
@@ -19,7 +19,7 @@ public WebDataSource() {
super();
}
-public WebDataSource(long /*int*/ id) {
+public WebDataSource(long id) {
super(id);
}
@@ -28,22 +28,22 @@ public WebDataSource(id id) {
}
public NSString pageTitle() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_pageTitle);
+ long result = OS.objc_msgSend(this.id, OS.sel_pageTitle);
return result != 0 ? new NSString(result) : null;
}
public WebDocumentRepresentation representation() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_representation);
+ long result = OS.objc_msgSend(this.id, OS.sel_representation);
return result != 0 ? new WebDocumentRepresentation(result) : null;
}
public NSMutableURLRequest request() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_request);
+ long result = OS.objc_msgSend(this.id, OS.sel_request);
return result != 0 ? new NSMutableURLRequest(result) : null;
}
public WebFrame webFrame() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_webFrame);
+ long result = OS.objc_msgSend(this.id, OS.sel_webFrame);
return result != 0 ? new WebFrame(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDocumentRepresentation.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDocumentRepresentation.java
index f9322e3647..175da9b88d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDocumentRepresentation.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebDocumentRepresentation.java
@@ -19,7 +19,7 @@ public WebDocumentRepresentation() {
super();
}
-public WebDocumentRepresentation(long /*int*/ id) {
+public WebDocumentRepresentation(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public WebDocumentRepresentation(id id) {
}
public NSString documentSource() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_documentSource);
+ long result = OS.objc_msgSend(this.id, OS.sel_documentSource);
return result != 0 ? new NSString(result) : null;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java
index f046a69b8e..ea76ac5459 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java
@@ -19,7 +19,7 @@ public WebFrame() {
super();
}
-public WebFrame(long /*int*/ id) {
+public WebFrame(long id) {
super(id);
}
@@ -28,16 +28,16 @@ public WebFrame(id id) {
}
public DOMDocument DOMDocument() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_DOMDocument);
+ long result = OS.objc_msgSend(this.id, OS.sel_DOMDocument);
return result != 0 ? new DOMDocument(result) : null;
}
public WebDataSource dataSource() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_dataSource);
+ long result = OS.objc_msgSend(this.id, OS.sel_dataSource);
return result != 0 ? new WebDataSource(result) : null;
}
-public long /*int*/ globalContext() {
+public long globalContext() {
return OS.objc_msgSend(this.id, OS.sel_globalContext);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrameView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrameView.java
index 76fb7488cc..1521930360 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrameView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrameView.java
@@ -19,7 +19,7 @@ public WebFrameView() {
super();
}
-public WebFrameView(long /*int*/ id) {
+public WebFrameView(long id) {
super(id);
}
@@ -36,7 +36,7 @@ public void printDocumentView() {
}
public NSPrintOperation printOperationWithPrintInfo(NSPrintInfo printInfo) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_printOperationWithPrintInfo_, printInfo != null ? printInfo.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_printOperationWithPrintInfo_, printInfo != null ? printInfo.id : 0);
return result != 0 ? new NSPrintOperation(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras
index 34948ce86e..4e05e05c08 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras
@@ -180,7 +180,7 @@
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
<arg swt_gen="true"></arg>
- <retval swt_gen="true" swt_java_type="WebView"></retval>
+ <retval swt_gen="true"></retval>
</method>
<method selector="mainFrame" swt_gen="true">
<retval swt_gen="true"></retval>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebOpenPanelResultListener.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebOpenPanelResultListener.java
index 075b4d5d59..d3bb0a502f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebOpenPanelResultListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebOpenPanelResultListener.java
@@ -19,7 +19,7 @@ public WebOpenPanelResultListener() {
super();
}
-public WebOpenPanelResultListener(long /*int*/ id) {
+public WebOpenPanelResultListener(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPolicyDecisionListener.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPolicyDecisionListener.java
index 91c286f36a..21cfe41b0c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPolicyDecisionListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPolicyDecisionListener.java
@@ -19,7 +19,7 @@ public WebPolicyDecisionListener() {
super();
}
-public WebPolicyDecisionListener(long /*int*/ id) {
+public WebPolicyDecisionListener(long id) {
super(id);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPreferences.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPreferences.java
index 4668726e33..ff6d7739cd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPreferences.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebPreferences.java
@@ -19,7 +19,7 @@ public WebPreferences() {
super();
}
-public WebPreferences(long /*int*/ id) {
+public WebPreferences(long id) {
super(id);
}
@@ -36,7 +36,7 @@ public void setJavaScriptEnabled(boolean javaScriptEnabled) {
}
public static WebPreferences standardPreferences() {
- long /*int*/ result = OS.objc_msgSend(OS.class_WebPreferences, OS.sel_standardPreferences);
+ long result = OS.objc_msgSend(OS.class_WebPreferences, OS.sel_standardPreferences);
return result != 0 ? new WebPreferences(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebScriptObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebScriptObject.java
index 069d3c4695..99382908fa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebScriptObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebScriptObject.java
@@ -19,7 +19,7 @@ public WebScriptObject() {
super();
}
-public WebScriptObject(long /*int*/ id) {
+public WebScriptObject(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public WebScriptObject(id id) {
}
public id webScriptValueAtIndex(int index) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_webScriptValueAtIndex_, index);
+ long result = OS.objc_msgSend(this.id, OS.sel_webScriptValueAtIndex_, index);
return result != 0 ? new id(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebUndefined.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebUndefined.java
index 5dc27de4bb..65da9bcb30 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebUndefined.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebUndefined.java
@@ -19,7 +19,7 @@ public WebUndefined() {
super();
}
-public WebUndefined(long /*int*/ id) {
+public WebUndefined(long id) {
super(id);
}
@@ -28,7 +28,7 @@ public WebUndefined(id id) {
}
public static WebUndefined undefined() {
- long /*int*/ result = OS.objc_msgSend(OS.class_WebUndefined, OS.sel_undefined);
+ long result = OS.objc_msgSend(OS.class_WebUndefined, OS.sel_undefined);
return result != 0 ? new WebUndefined(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java
index 32ecf18a10..2b1361f741 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java
@@ -19,7 +19,7 @@ public WebView() {
super();
}
-public WebView(long /*int*/ id) {
+public WebView(long id) {
super(id);
}
@@ -56,12 +56,12 @@ public boolean goForward() {
}
public WebView initWithFrame(NSRect frame, NSString frameName, NSString groupName) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_frameName_groupName_, frame, frameName != null ? frameName.id : 0, groupName != null ? groupName.id : 0);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_frameName_groupName_, frame, frameName != null ? frameName.id : 0, groupName != null ? groupName.id : 0);
return result == this.id ? this : (result != 0 ? new WebView(result) : null);
}
public WebFrame mainFrame() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_mainFrame);
+ long result = OS.objc_msgSend(this.id, OS.sel_mainFrame);
return result != 0 ? new WebFrame(result) : null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/id.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/id.java
index 8166efa6cd..bddbfe761f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/id.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/id.java
@@ -18,12 +18,12 @@ package org.eclipse.swt.internal.cocoa;
*/
public class id {
-public long /*int*/ id;
+public long id;
public id() {
}
-public id(long /*int*/ id) {
+public id(long id) {
this.id = id;
}
@@ -41,7 +41,7 @@ public boolean equals(Object other) {
return (this.id == ((id)other).id);
}
-public long /*int*/ objc_getClass() {
+public long objc_getClass() {
String name = getClass().getName();
int index = name.lastIndexOf('.');
if (index != -1) name = name.substring(index + 1);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/objc_super.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/objc_super.java
index 7273504939..a61cfc9c80 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/objc_super.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/objc_super.java
@@ -18,8 +18,8 @@ package org.eclipse.swt.internal.cocoa;
*/
public class objc_super {
/** @field cast=(id) */
- public long /*int*/ receiver;
+ public long receiver;
/** @field accessor=swt_super_class,cast=(Class) */
- public long /*int*/ super_class;
+ public long super_class;
public static final int sizeof = OS.objc_super_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
index fd84580948..5902733d19 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,9 +14,8 @@
package org.eclipse.swt.internal;
import java.io.*;
-import java.lang.reflect.*;
import java.net.*;
-import java.util.function.*;
+import java.nio.file.*;
import java.util.jar.*;
public class Library {
@@ -26,17 +25,17 @@ public class Library {
/**
* SWT Major version number (must be >= 0)
*/
- static int MAJOR_VERSION = 4;
+ static int MAJOR_VERSION = 4;
/**
* SWT Minor version number (must be in the range 0..999)
*/
- static int MINOR_VERSION = 926;
+ static int MINOR_VERSION = 952;
/**
* SWT revision number (must be >= 0)
*/
- static int REVISION = 16;
+ static int REVISION = 6;
/**
* The JAVA and SWT versions
@@ -50,14 +49,11 @@ public class Library {
static final String JAVA_LIB_PATH = "java.library.path";
static final String SWT_LIB_PATH = "swt.library.path";
-
- /* 64-bit support */
- static final boolean IS_64 = longConst() == (long /*int*/)longConst();
static final String SUFFIX_64 = "-64"; //$NON-NLS-1$
static final String SWT_LIB_DIR;
static {
- DELIMITER = System.getProperty("line.separator"); //$NON-NLS-1$
+ DELIMITER = System.lineSeparator(); //$NON-NLS-1$
SEPARATOR = File.separator;
USER_HOME = System.getProperty ("user.home");
SWT_LIB_DIR = ".swt" + SEPARATOR + "lib" + SEPARATOR + os() + SEPARATOR + arch(); //$NON-NLS-1$ $NON-NLS-2$
@@ -67,7 +63,6 @@ static {
static String arch() {
String osArch = System.getProperty("os.arch"); //$NON-NLS-1$
- if (osArch.equals ("i386") || osArch.equals ("i686")) return "x86"; //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
if (osArch.equals ("amd64")) return "x86_64"; //$NON-NLS-1$ $NON-NLS-2$
return osArch;
}
@@ -84,7 +79,12 @@ static void chmod(String permision, String path) {
if (os().equals ("win32")) return; //$NON-NLS-1$
try {
Runtime.getRuntime ().exec (new String []{"chmod", permision, path}).waitFor(); //$NON-NLS-1$
- } catch (Throwable e) {}
+ } catch (Throwable e) {
+ try {
+ new File(path).setExecutable(true);
+ } catch (Throwable e1) {
+ }
+ }
}
/* Use method instead of in-lined constants to avoid compiler warnings */
@@ -136,45 +136,59 @@ public static int SWT_VERSION (int major, int minor) {
return major * 1000 + minor;
}
+private static boolean extractResource(String resourceName, File outFile) {
+ try (InputStream inputStream = Library.class.getResourceAsStream (resourceName)) {
+ if (inputStream == null) return false;
+ Files.copy(inputStream, outFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+ } catch (Throwable e) {
+ return false;
+ }
+
+ return true;
+}
+
/**
- * Extract file with 'mappedName' into path 'extractToFilePath'. Cleanup leftovers if extract failed.
+ * Extract file with 'mappedName' into path 'extractToFilePath'.
+ * Does not overwrite existing file.
+ * Does not leave trash on error.
* @param extractToFilePath full path of where the file is to be extacted to, inc name of file,
* e.g /home/USER/.swt/lib/linux/x86_64/libswt-MYLIB-gtk-4826.so
* @param mappedName file to be searched in jar.
* @return true upon success, failure if something went wrong.
*/
-static boolean extract (String extractToFilePath, String mappedName, StringBuilder message) {
- FileOutputStream os = null;
- InputStream is = null;
+static boolean extract (String extractToFilePath, String mappedName) {
File file = new File(extractToFilePath);
- boolean extracted = false;
+ if (file.exists ()) return true;
+
+ // Write to temp file first, so that other processes don't see
+ // partially written library on disk
+ File tempFile;
try {
- if (!file.exists ()) {
- is = Library.class.getResourceAsStream ("/" + mappedName); //$NON-NLS-1$
- if (is != null) {
- extracted = true;
- int read;
- byte [] buffer = new byte [4096];
- os = new FileOutputStream (extractToFilePath);
- while ((read = is.read (buffer)) != -1) {
- os.write(buffer, 0, read);
+ tempFile = File.createTempFile (file.getName(), ".tmp", file.getParentFile()); //$NON-NLS-1$
+ } catch (Throwable e) {
+ return false;
}
- os.close ();
- is.close ();
- chmod ("755", extractToFilePath);
- return true;
+
+ // Extract resource
+ String resourceName = "/" + mappedName.replace('\\', '/'); //$NON-NLS-1$
+ if (!extractResource (resourceName, tempFile)) {
+ tempFile.delete();
+ return false;
}
- }
+
+ // Make it executable
+ chmod ("755", tempFile.getPath()); //$NON-NLS-1$
+
+ // "Publish" file now that it's ready to use.
+ // If there is a file already, then someone published while we were
+ // extracting, just delete our file and consider it a success.
+ try {
+ Files.move (tempFile.toPath(), file.toPath());
} catch (Throwable e) {
- try {
- if (os != null) os.close ();
- } catch (IOException e1) {}
- try {
- if (is != null) is.close ();
- } catch (IOException e1) {}
- if (extracted && file.exists ()) file.delete ();
+ tempFile.delete();
}
- return false;
+
+ return true;
}
static boolean isLoadable () {
@@ -211,7 +225,7 @@ static boolean isLoadable () {
static boolean load (String libName, StringBuilder message) {
try {
- if (libName.indexOf (SEPARATOR) != -1) {
+ if (libName.contains (SEPARATOR)) {
System.load (libName);
} else {
System.loadLibrary (libName);
@@ -257,24 +271,26 @@ public static void loadLibrary (String name, boolean mapName) {
String prop = System.getProperty ("sun.arch.data.model"); //$NON-NLS-1$
if (prop == null) prop = System.getProperty ("com.ibm.vm.bitmode"); //$NON-NLS-1$
if (prop != null) {
- if ("32".equals (prop) && IS_64) { //$NON-NLS-1$
+ if ("32".equals (prop)) { //$NON-NLS-1$
throw new UnsatisfiedLinkError ("Cannot load 64-bit SWT libraries on 32-bit JVM"); //$NON-NLS-1$
}
- if ("64".equals (prop) && !IS_64) { //$NON-NLS-1$
- throw new UnsatisfiedLinkError ("Cannot load 32-bit SWT libraries on 64-bit JVM"); //$NON-NLS-1$
- }
}
/* Compute the library name and mapped name */
- String libName1, libName2, mappedName1, mappedName2;
+ final int candidates = 3;
+ String[] libNames = new String[candidates], mappedNames = new String[candidates];
if (mapName) {
String version = getVersionString ();
- libName1 = name + "-" + Platform.PLATFORM + "-" + version; //$NON-NLS-1$ //$NON-NLS-2$
- libName2 = name + "-" + Platform.PLATFORM; //$NON-NLS-1$
- mappedName1 = mapLibraryName (libName1);
- mappedName2 = mapLibraryName (libName2);
+ libNames[0] = name + "-" + Platform.PLATFORM + "-" + version; //$NON-NLS-1$ //$NON-NLS-2$
+ libNames[1] = name + "-" + Platform.PLATFORM; //$NON-NLS-1$
+ libNames[2] = name;
+ for (int i = 0; i < candidates; i++) {
+ mappedNames[i] = mapLibraryName (libNames[i]);
+ }
} else {
- libName1 = libName2 = mappedName1 = mappedName2 = name;
+ for (int i = 0; i < candidates; i++) {
+ libNames[i] = mappedNames[i] = name;
+ }
}
StringBuilder message = new StringBuilder();
@@ -283,20 +299,24 @@ public static void loadLibrary (String name, boolean mapName) {
String path = System.getProperty (SWT_LIB_PATH); //$NON-NLS-1$
if (path != null) {
path = new File (path).getAbsolutePath ();
- if (load (path + SEPARATOR + mappedName1, message)) return;
- if (mapName && load (path + SEPARATOR + mappedName2, message)) return;
+ for (int i = 0; i < candidates; i++) {
+ if ((i == 0 || mapName) && load (path + SEPARATOR + mappedNames[i], message)) return;
+ }
}
/* Try loading library from java library path */
- if (load (libName1, message)) return;
- if (mapName && load (libName2, message)) return;
+ for (int i = 0; i < candidates; i++) {
+ if ((i == 0 || mapName) && load (libNames[i], message)) return;
+ }
/* Try loading library from the tmp directory if swt library path is not specified.
* Create the tmp folder if it doesn't exist. Tmp folder looks like this:
* ~/.swt/lib/<platform>/<arch>/
*/
- String fileName1 = mappedName1;
- String fileName2 = mappedName2;
+ String[] fileNames = new String[candidates];
+ for (int i = 0; i < candidates; i++) {
+ fileNames[i] = mappedNames[i];
+ }
if (path == null) {
path = USER_HOME;
File dir = new File (path, SWT_LIB_DIR);
@@ -304,24 +324,21 @@ public static void loadLibrary (String name, boolean mapName) {
path = dir.getAbsolutePath ();
} else {
/* fall back to using the home dir directory */
- if (IS_64) {
- fileName1 = mapLibraryName (libName1 + SUFFIX_64);
- fileName2 = mapLibraryName (libName2 + SUFFIX_64);
+ for (int i = 0; i < candidates; i++) {
+ fileNames[i] = mapLibraryName (libNames[i] + SUFFIX_64);
}
}
- if (load (path + SEPARATOR + fileName1, message)) return;
- if (mapName && load (path + SEPARATOR + fileName2, message)) return;
+ for (int i = 0; i < candidates; i++) {
+ if ((i == 0 || mapName) && load (path + SEPARATOR + fileNames[i], message)) return;
+ }
}
/* Try extracting and loading library from jar. */
if (path != null) {
- if (extract (path + SEPARATOR + fileName1, mappedName1, message)) {
- load(path + SEPARATOR + fileName1, message);
- return;
- }
- if (mapName && extract (path + SEPARATOR + fileName2, mappedName2, message)) {
- load(path + SEPARATOR + fileName2, message);
- return;
+ for (int i = 0; i < candidates; i++) {
+ if ((i == 0 || mapName) && extract (path + SEPARATOR + fileNames[i], mappedNames[i])) {
+ if (load(path + SEPARATOR + fileNames[i], message)) return;
+ }
}
}
@@ -330,10 +347,14 @@ public static void loadLibrary (String name, boolean mapName) {
}
static String mapLibraryName (String libName) {
+ return mapLibraryName(libName, true);
+}
+
+static String mapLibraryName (String libName, boolean replaceDylib) {
/* SWT libraries in the Macintosh use the extension .jnilib but the some VMs map to .dylib. */
libName = System.mapLibraryName (libName);
String ext = ".dylib"; //$NON-NLS-1$
- if (libName.endsWith(ext)) {
+ if (libName.endsWith(ext) && replaceDylib) {
libName = libName.substring(0, libName.length() - ext.length()) + ".jnilib"; //$NON-NLS-1$
}
return libName;
@@ -359,104 +380,4 @@ public static String getVersionString () {
return version;
}
-
-/**
- * Locates a resource located either in java library path, swt library path, or attempts to extract it from inside swt.jar file.
- * This function supports a single level subfolder, e.g SubFolder/resource.
- *
- * Dev note: (17/12/07) This has been developed and throughly tested on GTK. Designed to work on Cocoa/Win as well, but not tested.
- *
- * @param subDir 'null' or a folder name without slashes. E.g Correct: 'mysubdir', incorrect: '/subdir/'.
- * Platform specific Slashes will be added automatically.
- * @param resourceName e.g swt-webkitgtk
- * @param mapResourceName true if you like platform specific mapping applied to resource name. e.g MyLib -> libMyLib-gtk-4826.so
- */
-public static File findResource(String subDir, String resourceName, boolean mapResourceName){
-
- //We construct a 'maybe' subdirectory path. 'Maybe' because if no subDir given, then it's an empty string "".
- // subdir e.g: subdir
- String maybeSubDirPath = subDir != null ? subDir + SEPARATOR : ""; // e.g: subdir/ or ""
- String maybeSubDirPathWithPrefix = subDir != null ? SEPARATOR + maybeSubDirPath : ""; // e.g: /subdir/ or ""
- final String finalResourceName = mapResourceName ?
- mapLibraryName(resourceName + "-" + Platform.PLATFORM + "-" + getVersionString ()) // e.g libMyLib-gtk-3826.so
- : resourceName;
-
- // 1) Look for the resource in the java/swt library path(s)
- // This code commonly finds the resource if the swt project is a required project and the swt binary (for your platform)
- // project is open in your workplace (found in the JAVA_LIBRARY_PATH) or if you're explicitly specified SWT_LIBRARY_PATH.
- {
- Function<String, File> lookForFileInPath = searchPath -> {
- String classpath = System.getProperty(searchPath);
- if (classpath != null){
- String[] paths = classpath.split(":");
- for (String path : paths) {
- File file = new File(path + SEPARATOR + maybeSubDirPath + finalResourceName);
- if (file.exists()){
- return file;
- }
- }
- }
- return null;
- };
- File result = null;
- for (String path : new String[] {JAVA_LIB_PATH,SWT_LIB_PATH}) {
- result = lookForFileInPath.apply(path);
- if (result != null)
- return result;
- }
- }
-
- // 2) If SWT is ran as OSGI bundle (e.g inside Eclipse), then local resources are extracted to
- // eclipse/configuration/org.eclipse.osgi/NN/N/.cp/<resource> and we're given a pointer to the file.
- {
- // If this is an OSGI bundle look for the resource using getResource
- URL url = Library.class.getClassLoader().getResource(maybeSubDirPathWithPrefix + finalResourceName);
- URLConnection connection;
- try {
- connection = url.openConnection();
- Method getFileURLMethod = connection.getClass().getMethod("getFileURL");
- if (getFileURLMethod != null){
- // This method does the actual extraction of file to: ../eclipse/configuration/org.eclipse.osgi/NN/N/.cp/<SubDir>/resource.ext
- URL result = (URL) getFileURLMethod.invoke(connection);
- return new File(result.toURI());
- }
- } catch (Exception e) {
- // If any exceptions are thrown the resource cannot be located this way.
- }
- }
-
- // 3) Need to try to pull the resource out of the swt.jar.
- // Look for the resource in the user's home directory, (if already extracted in the temp swt folder. (~/.swt/lib...)
- // Extract from the swt.jar if not there already.
- {
- // Developer note:
- // To test this piece of code, you need to compile SWT into a jar and use it in a test project. E.g
- // cd ~/git/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.x86_64/
- // mvn clean verify -Pbuild-individual-bundles -Dnative=gtk.linux.x86_64
- // then ./target/ will contain org.eclipse.swt.gtk.linux.x86_64-3.106.100-SNAPSHOT.jar (and it's source),
- // you can copy those into your test swt project and test that your resource is extracted into something like ~/.swt/...
- // Lastly, if using subDir, you need to edit the build.properties and specify the folder you wish to have included in your jar in the includes.
- File file = new File (USER_HOME + SEPARATOR + SWT_LIB_DIR + maybeSubDirPathWithPrefix, finalResourceName);
- if (file.exists()){
- return file;
- } else { // Try to extract file from jar if not found.
-
- // Create temp directory if it doesn't exist
- File tempDir = new File (USER_HOME, SWT_LIB_DIR + maybeSubDirPathWithPrefix);
- if ((!tempDir.exists () || tempDir.isDirectory ())) {
- tempDir.mkdirs ();
- }
-
- StringBuilder message = new StringBuilder("");
- if (extract(file.getPath(), maybeSubDirPath + finalResourceName, message)) {
- if (file.exists()) {
- return file;
- }
- }
- }
- }
- throw new UnsatisfiedLinkError("Could not find resource" + resourceName + (subDir != null ? " (in subdirectory: " + subDir + " )" : ""));
-}
-
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c
index d3e6c3dbe4..59dd9142f0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2020 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -24,6 +24,90 @@
#define ATK_NATIVE(func) Java_org_eclipse_swt_internal_accessibility_gtk_ATK_##func
#endif
+#ifndef NO_ATK_1ACTION_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1ACTION_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1ACTION_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_ACTION_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1ACTION_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_ATK_1COMPONENT_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1COMPONENT_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1COMPONENT_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_COMPONENT_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1COMPONENT_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_ATK_1EDITABLE_1TEXT_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1EDITABLE_1TEXT_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1EDITABLE_1TEXT_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_EDITABLE_TEXT_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1EDITABLE_1TEXT_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_ATK_1HYPERTEXT_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1HYPERTEXT_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1HYPERTEXT_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_HYPERTEXT_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1HYPERTEXT_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_ATK_1SELECTION_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1SELECTION_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1SELECTION_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_SELECTION_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1SELECTION_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TABLE_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1TABLE_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1TABLE_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_TABLE_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1TABLE_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TEXT_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1TEXT_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1TEXT_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_TEXT_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1TEXT_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_ATK_1TYPE_1ACTION
JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1TYPE_1ACTION)
(JNIEnv *env, jclass that)
@@ -72,18 +156,6 @@ JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1TYPE_1HYPERTEXT)
}
#endif
-#ifndef NO_ATK_1TYPE_1OBJECT_1FACTORY
-JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1TYPE_1OBJECT_1FACTORY)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1OBJECT_1FACTORY_FUNC);
- rc = (jlong)ATK_TYPE_OBJECT_FACTORY;
- ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1OBJECT_1FACTORY_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_ATK_1TYPE_1SELECTION
JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1TYPE_1SELECTION)
(JNIEnv *env, jclass that)
@@ -132,6 +204,18 @@ JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1TYPE_1VALUE)
}
#endif
+#ifndef NO_ATK_1VALUE_1GET_1IFACE
+JNIEXPORT jlong JNICALL ATK_NATIVE(ATK_1VALUE_1GET_1IFACE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ ATK_NATIVE_ENTER(env, that, ATK_1VALUE_1GET_1IFACE_FUNC);
+ rc = (jlong)ATK_VALUE_GET_IFACE(arg0);
+ ATK_NATIVE_EXIT(env, that, ATK_1VALUE_1GET_1IFACE_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_AtkAttribute_1sizeof
JNIEXPORT jint JNICALL ATK_NATIVE(AtkAttribute_1sizeof)
(JNIEnv *env, jclass that)
@@ -168,242 +252,124 @@ JNIEXPORT jint JNICALL ATK_NATIVE(AtkTextRectangle_1sizeof)
}
#endif
-#ifndef NO__1ATK_1ACTION_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1ACTION_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1ACTION_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_ACTION_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1ACTION_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1COMPONENT_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1COMPONENT_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1COMPONENT_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_COMPONENT_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1COMPONENT_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1EDITABLE_1TEXT_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1EDITABLE_1TEXT_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1EDITABLE_1TEXT_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_EDITABLE_TEXT_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1EDITABLE_1TEXT_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1HYPERTEXT_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1HYPERTEXT_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1HYPERTEXT_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_HYPERTEXT_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1HYPERTEXT_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1OBJECT_1FACTORY_1CLASS
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1OBJECT_1FACTORY_1CLASS)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1OBJECT_1FACTORY_1CLASS_FUNC);
- rc = (jlong)ATK_OBJECT_FACTORY_CLASS(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1OBJECT_1FACTORY_1CLASS_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1SELECTION_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1SELECTION_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1SELECTION_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_SELECTION_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1SELECTION_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1TABLE_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1TABLE_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1TABLE_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_TABLE_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1TABLE_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1TEXT_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1TEXT_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1TEXT_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_TEXT_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1TEXT_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1ATK_1VALUE_1GET_1IFACE
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1ATK_1VALUE_1GET_1IFACE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1ATK_1VALUE_1GET_1IFACE_FUNC);
- rc = (jlong)ATK_VALUE_GET_IFACE(arg0);
- ATK_NATIVE_EXIT(env, that, _1ATK_1VALUE_1GET_1IFACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1atk_1object_1add_1relationship
-JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1object_1add_1relationship)
+#ifndef NO_atk_1object_1add_1relationship
+JNIEXPORT jboolean JNICALL ATK_NATIVE(atk_1object_1add_1relationship)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
jboolean rc = 0;
- ATK_NATIVE_ENTER(env, that, _1atk_1object_1add_1relationship_FUNC);
+ ATK_NATIVE_ENTER(env, that, atk_1object_1add_1relationship_FUNC);
rc = (jboolean)atk_object_add_relationship((AtkObject *)arg0, (AtkRelationType)arg1, (AtkObject *)arg2);
- ATK_NATIVE_EXIT(env, that, _1atk_1object_1add_1relationship_FUNC);
+ ATK_NATIVE_EXIT(env, that, atk_1object_1add_1relationship_FUNC);
return rc;
}
#endif
-#ifndef NO__1atk_1object_1notify_1state_1change
-JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1object_1notify_1state_1change)
+#ifndef NO_atk_1object_1notify_1state_1change
+JNIEXPORT void JNICALL ATK_NATIVE(atk_1object_1notify_1state_1change)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2)
{
- ATK_NATIVE_ENTER(env, that, _1atk_1object_1notify_1state_1change_FUNC);
+ ATK_NATIVE_ENTER(env, that, atk_1object_1notify_1state_1change_FUNC);
atk_object_notify_state_change((AtkObject *)arg0, arg1, arg2);
- ATK_NATIVE_EXIT(env, that, _1atk_1object_1notify_1state_1change_FUNC);
+ ATK_NATIVE_EXIT(env, that, atk_1object_1notify_1state_1change_FUNC);
}
#endif
-#ifndef NO__1atk_1object_1remove_1relationship
-JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1object_1remove_1relationship)
+#ifndef NO_atk_1object_1remove_1relationship
+JNIEXPORT jboolean JNICALL ATK_NATIVE(atk_1object_1remove_1relationship)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
jboolean rc = 0;
- ATK_NATIVE_ENTER(env, that, _1atk_1object_1remove_1relationship_FUNC);
+ ATK_NATIVE_ENTER(env, that, atk_1object_1remove_1relationship_FUNC);
rc = (jboolean)atk_object_remove_relationship((AtkObject *)arg0, (AtkRelationType)arg1, (AtkObject *)arg2);
- ATK_NATIVE_EXIT(env, that, _1atk_1object_1remove_1relationship_FUNC);
+ ATK_NATIVE_EXIT(env, that, atk_1object_1remove_1relationship_FUNC);
return rc;
}
#endif
-#ifndef NO__1atk_1state_1set_1add_1state
-JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1state_1set_1add_1state)
+#ifndef NO_atk_1state_1set_1add_1state
+JNIEXPORT jboolean JNICALL ATK_NATIVE(atk_1state_1set_1add_1state)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jboolean rc = 0;
- ATK_NATIVE_ENTER(env, that, _1atk_1state_1set_1add_1state_FUNC);
+ ATK_NATIVE_ENTER(env, that, atk_1state_1set_1add_1state_FUNC);
rc = (jboolean)atk_state_set_add_state((AtkStateSet *)arg0, (AtkStateType)arg1);
- ATK_NATIVE_EXIT(env, that, _1atk_1state_1set_1add_1state_FUNC);
+ ATK_NATIVE_EXIT(env, that, atk_1state_1set_1add_1state_FUNC);
return rc;
}
#endif
-#ifndef NO__1atk_1text_1attribute_1get_1name
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1atk_1text_1attribute_1get_1name)
+#ifndef NO_atk_1text_1attribute_1get_1name
+JNIEXPORT jlong JNICALL ATK_NATIVE(atk_1text_1attribute_1get_1name)
(JNIEnv *env, jclass that, jint arg0)
{
jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1atk_1text_1attribute_1get_1name_FUNC);
+ ATK_NATIVE_ENTER(env, that, atk_1text_1attribute_1get_1name_FUNC);
rc = (jlong)atk_text_attribute_get_name(arg0);
- ATK_NATIVE_EXIT(env, that, _1atk_1text_1attribute_1get_1name_FUNC);
+ ATK_NATIVE_EXIT(env, that, atk_1text_1attribute_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1atk_1text_1attribute_1get_1value
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1atk_1text_1attribute_1get_1value)
+#ifndef NO_atk_1text_1attribute_1get_1value
+JNIEXPORT jlong JNICALL ATK_NATIVE(atk_1text_1attribute_1get_1value)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1atk_1text_1attribute_1get_1value_FUNC);
+ ATK_NATIVE_ENTER(env, that, atk_1text_1attribute_1get_1value_FUNC);
rc = (jlong)atk_text_attribute_get_value(arg0, arg1);
- ATK_NATIVE_EXIT(env, that, _1atk_1text_1attribute_1get_1value_FUNC);
+ ATK_NATIVE_EXIT(env, that, atk_1text_1attribute_1get_1value_FUNC);
return rc;
}
#endif
-#ifndef NO__1call__JJ
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1call__JJ)
+#ifndef NO_call__JJ
+JNIEXPORT jlong JNICALL ATK_NATIVE(call__JJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1call__JJ_FUNC);
+ ATK_NATIVE_ENTER(env, that, call__JJ_FUNC);
rc = (jlong)((jlong (*)())arg0)(arg1);
- ATK_NATIVE_EXIT(env, that, _1call__JJ_FUNC);
+ ATK_NATIVE_EXIT(env, that, call__JJ_FUNC);
return rc;
}
#endif
-#ifndef NO__1call__JJJ
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1call__JJJ)
+#ifndef NO_call__JJJ
+JNIEXPORT jlong JNICALL ATK_NATIVE(call__JJJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1call__JJJ_FUNC);
+ ATK_NATIVE_ENTER(env, that, call__JJJ_FUNC);
rc = (jlong)((jlong (*)())arg0)(arg1, arg2);
- ATK_NATIVE_EXIT(env, that, _1call__JJJ_FUNC);
+ ATK_NATIVE_EXIT(env, that, call__JJJ_FUNC);
return rc;
}
#endif
-#ifndef NO__1call__JJJJ
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1call__JJJJ)
+#ifndef NO_call__JJJJ
+JNIEXPORT jlong JNICALL ATK_NATIVE(call__JJJJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1call__JJJJ_FUNC);
+ ATK_NATIVE_ENTER(env, that, call__JJJJ_FUNC);
rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3);
- ATK_NATIVE_EXIT(env, that, _1call__JJJJ_FUNC);
+ ATK_NATIVE_EXIT(env, that, call__JJJJ_FUNC);
return rc;
}
#endif
-#ifndef NO__1call__JJJJJJ
-JNIEXPORT jlong JNICALL ATK_NATIVE(_1call__JJJJJJ)
+#ifndef NO_call__JJJJJJ
+JNIEXPORT jlong JNICALL ATK_NATIVE(call__JJJJJJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5)
{
jlong rc = 0;
- ATK_NATIVE_ENTER(env, that, _1call__JJJJJJ_FUNC);
+ ATK_NATIVE_ENTER(env, that, call__JJJJJJ_FUNC);
rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3, arg4, arg5);
- ATK_NATIVE_EXIT(env, that, _1call__JJJJJJ_FUNC);
+ ATK_NATIVE_EXIT(env, that, call__JJJJJJ_FUNC);
return rc;
}
#endif
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_FUNC);
- if (arg1) getAtkActionIfaceFields(env, arg1, (AtkActionIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_FUNC);
-}
-#endif
-
#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I
JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
@@ -417,76 +383,6 @@ fail:
}
#endif
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2_FUNC);
- if (arg1) getAtkComponentIfaceFields(env, arg1, (AtkComponentIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkEditableTextIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkEditableTextIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkEditableTextIface_2_FUNC);
- if (arg1) getAtkEditableTextIfaceFields(env, arg1, (AtkEditableTextIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkEditableTextIface_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2_FUNC);
- if (arg1) getAtkHypertextIfaceFields(env, arg1, (AtkHypertextIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2_FUNC);
- if (arg1) getAtkObjectClassFields(env, arg1, (AtkObjectClass *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_FUNC);
- if (arg1) getAtkSelectionIfaceFields(env, arg1, (AtkSelectionIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC);
- if (arg1) getAtkTableIfaceFields(env, arg1, (AtkTableIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2_FUNC);
- if (arg1) getAtkTextIfaceFields(env, arg1, (AtkTextIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2_FUNC);
-}
-#endif
-
#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I
JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
@@ -513,16 +409,6 @@ fail:
}
#endif
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2
-JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC);
- if (arg1) getAtkValueIfaceFields(env, arg1, (AtkValueIface *)arg0);
- ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC);
-}
-#endif
-
#ifndef NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2J
JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2J)
(JNIEnv *env, jclass that, jobject arg0, jlong arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c
index 3ebce3a6d4..8b66939328 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2020 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -22,49 +22,38 @@
#ifdef NATIVE_STATS
char * ATK_nativeFunctionNames[] = {
+ "ATK_1ACTION_1GET_1IFACE",
+ "ATK_1COMPONENT_1GET_1IFACE",
+ "ATK_1EDITABLE_1TEXT_1GET_1IFACE",
+ "ATK_1HYPERTEXT_1GET_1IFACE",
+ "ATK_1SELECTION_1GET_1IFACE",
+ "ATK_1TABLE_1GET_1IFACE",
+ "ATK_1TEXT_1GET_1IFACE",
"ATK_1TYPE_1ACTION",
"ATK_1TYPE_1COMPONENT",
"ATK_1TYPE_1EDITABLE_1TEXT",
"ATK_1TYPE_1HYPERTEXT",
- "ATK_1TYPE_1OBJECT_1FACTORY",
"ATK_1TYPE_1SELECTION",
"ATK_1TYPE_1TABLE",
"ATK_1TYPE_1TEXT",
"ATK_1TYPE_1VALUE",
+ "ATK_1VALUE_1GET_1IFACE",
"AtkAttribute_1sizeof",
"AtkTextRange_1sizeof",
"AtkTextRectangle_1sizeof",
- "_1ATK_1ACTION_1GET_1IFACE",
- "_1ATK_1COMPONENT_1GET_1IFACE",
- "_1ATK_1EDITABLE_1TEXT_1GET_1IFACE",
- "_1ATK_1HYPERTEXT_1GET_1IFACE",
- "_1ATK_1OBJECT_1FACTORY_1CLASS",
- "_1ATK_1SELECTION_1GET_1IFACE",
- "_1ATK_1TABLE_1GET_1IFACE",
- "_1ATK_1TEXT_1GET_1IFACE",
- "_1ATK_1VALUE_1GET_1IFACE",
- "_1atk_1object_1add_1relationship",
- "_1atk_1object_1notify_1state_1change",
- "_1atk_1object_1remove_1relationship",
- "_1atk_1state_1set_1add_1state",
- "_1atk_1text_1attribute_1get_1name",
- "_1atk_1text_1attribute_1get_1value",
- "_1call__JJ",
- "_1call__JJJ",
- "_1call__JJJJ",
- "_1call__JJJJJJ",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2",
+ "atk_1object_1add_1relationship",
+ "atk_1object_1notify_1state_1change",
+ "atk_1object_1remove_1relationship",
+ "atk_1state_1set_1add_1state",
+ "atk_1text_1attribute_1get_1name",
+ "atk_1text_1attribute_1get_1value",
+ "call__JJ",
+ "call__JJJ",
+ "call__JJJJ",
+ "call__JJJJJJ",
"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkEditableTextIface_2",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2",
"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I",
"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I",
- "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2",
"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2J",
"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI",
"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2J",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h
index 5d5f089d90..fbb4bb3621 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2020 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -32,49 +32,38 @@ extern char* ATK_nativeFunctionNames[];
#endif
typedef enum {
+ ATK_1ACTION_1GET_1IFACE_FUNC,
+ ATK_1COMPONENT_1GET_1IFACE_FUNC,
+ ATK_1EDITABLE_1TEXT_1GET_1IFACE_FUNC,
+ ATK_1HYPERTEXT_1GET_1IFACE_FUNC,
+ ATK_1SELECTION_1GET_1IFACE_FUNC,
+ ATK_1TABLE_1GET_1IFACE_FUNC,
+ ATK_1TEXT_1GET_1IFACE_FUNC,
ATK_1TYPE_1ACTION_FUNC,
ATK_1TYPE_1COMPONENT_FUNC,
ATK_1TYPE_1EDITABLE_1TEXT_FUNC,
ATK_1TYPE_1HYPERTEXT_FUNC,
- ATK_1TYPE_1OBJECT_1FACTORY_FUNC,
ATK_1TYPE_1SELECTION_FUNC,
ATK_1TYPE_1TABLE_FUNC,
ATK_1TYPE_1TEXT_FUNC,
ATK_1TYPE_1VALUE_FUNC,
+ ATK_1VALUE_1GET_1IFACE_FUNC,
AtkAttribute_1sizeof_FUNC,
AtkTextRange_1sizeof_FUNC,
AtkTextRectangle_1sizeof_FUNC,
- _1ATK_1ACTION_1GET_1IFACE_FUNC,
- _1ATK_1COMPONENT_1GET_1IFACE_FUNC,
- _1ATK_1EDITABLE_1TEXT_1GET_1IFACE_FUNC,
- _1ATK_1HYPERTEXT_1GET_1IFACE_FUNC,
- _1ATK_1OBJECT_1FACTORY_1CLASS_FUNC,
- _1ATK_1SELECTION_1GET_1IFACE_FUNC,
- _1ATK_1TABLE_1GET_1IFACE_FUNC,
- _1ATK_1TEXT_1GET_1IFACE_FUNC,
- _1ATK_1VALUE_1GET_1IFACE_FUNC,
- _1atk_1object_1add_1relationship_FUNC,
- _1atk_1object_1notify_1state_1change_FUNC,
- _1atk_1object_1remove_1relationship_FUNC,
- _1atk_1state_1set_1add_1state_FUNC,
- _1atk_1text_1attribute_1get_1name_FUNC,
- _1atk_1text_1attribute_1get_1value_FUNC,
- _1call__JJ_FUNC,
- _1call__JJJ_FUNC,
- _1call__JJJJ_FUNC,
- _1call__JJJJJJ_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_FUNC,
+ atk_1object_1add_1relationship_FUNC,
+ atk_1object_1notify_1state_1change_FUNC,
+ atk_1object_1remove_1relationship_FUNC,
+ atk_1state_1set_1add_1state_FUNC,
+ atk_1text_1attribute_1get_1name_FUNC,
+ atk_1text_1attribute_1get_1value_FUNC,
+ call__JJ_FUNC,
+ call__JJJ_FUNC,
+ call__JJJJ_FUNC,
+ call__JJJJJJ_FUNC,
memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkEditableTextIface_2_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2_FUNC,
memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I_FUNC,
memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I_FUNC,
- memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC,
memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2J_FUNC,
memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI_FUNC,
memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2J_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
index 2d69ba69f7..d1694a9020 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#*******************************************************************************
-# Copyright (c) 2000, 2018 IBM Corporation and others.
+# Copyright (c) 2000, 2020 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -107,10 +107,6 @@ case $MODEL in
SWT_ARCH=x86_64
AWT_ARCH=amd64
;;
- i?86 | "x86")
- SWT_ARCH=x86
- AWT_ARCH=i386
- ;;
*)
SWT_ARCH=$MODEL
AWT_ARCH=$MODEL
@@ -118,50 +114,19 @@ case $MODEL in
esac
case $SWT_OS.$SWT_ARCH in
- "linux.x86")
- if [ "${CC}" = "" ]; then
- export CC=gcc
- fi
- if [ "${JAVA_HOME}" = "" ]; then
-
- # Dynamically find JAVA_HOME for 32bit java on a system that also has 64bit java installed.
- # We cannot use `readlink $(which java)` or related methods as they point to the 64 bit java.
- # So instead we find the path manually and assume java.i386 is installed in the default /ur/lib/jvm path.
- # This matches folders such as:
- # java-1.8.0-openjdk-........i386
- # java-9-openjdk....i386
- JAVA_FOLDER=$(ls /usr/lib/jvm | grep java | grep -i openjdk | grep i386 | sort | tail -n 1)
- if [ "${JAVA_FOLDER}" == "" ]; then
- func_echo_error "ERROR: Could not find JAVA_HOME/AWT_LIB_PATH on 32bit build system automatically. Expecting it to be in /usr/lib/jvm/ but none was found. See also Bug 533496"
- fi
-
- export JAVA_HOME=/usr/lib/jvm/${JAVA_FOLDER}
- export AWT_LIB_PATH=${JAVA_HOME}/jre/lib/i386
- fi
- if [ "${PKG_CONFIG_PATH}" = "" ]; then
- export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_x86/lib/pkgconfig"
- fi
- ;;
"linux.x86_64")
if [ "${CC}" = "" ]; then
export CC=gcc
fi
if [ "${JAVA_HOME}" = "" ]; then
- # Validate that we set JAVA_HOME to an existing directory. If not try to look for a better one.
- BLUEBIRD_JAVA_HOME="/bluebird/teamswt/swt-builddir/JDKs/x86_64/jdk1.5.0"
- if [ -d "$BLUEBIRD_JAVA_HOME" ]; then
- func_echo_plus "JAVA_HOME not set, configured to: $BLUEBIRD_JAVA_HOME"
- export JAVA_HOME="$BLUEBIRD_JAVA_HOME"
+ # Cross-platform method of finding JAVA_HOME.
+ # Tested on Fedora 24 and Ubuntu 16
+ DYNAMIC_JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/::" | sed "s:bin/java::"`
+ if [ -e "${DYNAMIC_JAVA_HOME}include/jni.h" ]; then
+ func_echo_plus "JAVA_HOME not set, but jni.h found, dynamically configured to $DYNAMIC_JAVA_HOME"
+ export JAVA_HOME="$DYNAMIC_JAVA_HOME"
else
- # Cross-platform method of finding JAVA_HOME.
- # Tested on Fedora 24 and Ubuntu 16
- DYNAMIC_JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/::" | sed "s:bin/java::"`
- if [ -e "${DYNAMIC_JAVA_HOME}include/jni.h" ]; then
- func_echo_plus "JAVA_HOME not set, but jni.h found, dynamically configured to $DYNAMIC_JAVA_HOME"
- export JAVA_HOME="$DYNAMIC_JAVA_HOME"
- else
- func_echo_error "JAVA_HOME not set and jni.h could not be located. You might get a compile error about include 'jni.h'. You should install 'java-*-openjdk-devel' package or if you have it installed already, find jni.h and set JAVA_HOME manually to base of 'include' folder"
- fi
+ func_echo_error "JAVA_HOME not set and jni.h could not be located. You might get a compile error about include 'jni.h'. You should install 'java-*-openjdk-devel' package or if you have it installed already, find jni.h and set JAVA_HOME manually to base of 'include' folder"
fi
fi
if [ "${PKG_CONFIG_PATH}" = "" ]; then
@@ -179,22 +144,22 @@ case $SWT_OS.$SWT_ARCH in
export PKG_CONFIG_PATH="/usr/lib64/pkgconfig/"
fi
;;
- "linux.s390x")
+ "linux.loongarch64")
if [ "${CC}" = "" ]; then
export CC=gcc
fi
if [ "${JAVA_HOME}" = "" ]; then
- export JAVA_HOME="/home/swtbuild/java5/s390x/ibm-java2-s390x-50"
+ export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/bin/java::"`
fi
if [ "${PKG_CONFIG_PATH}" = "" ]; then
- export PKG_CONFIG_PATH="/usr/lib64/pkgconfig"
+ export PKG_CONFIG_PATH="/usr/lib64/pkgconfig/"
fi
;;
-esac
+esac
# For 64-bit CPUs, we have a switch
-if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' ]; then
+if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' -o ${MODEL} = 'loongarch64' ]; then
SWT_PTR_CFLAGS=-DJNI64
if [ -d /lib64 ]; then
XLIB64=-L/usr/X11R6/lib64
@@ -208,11 +173,6 @@ if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' -o ${MODEL}
fi
export SWT_PTR_CFLAGS
fi
-if [ ${MODEL} = 'x86' -a ${SWT_OS} = 'linux' ]; then
- SWT_PTR_CFLAGS="-m32"
- SWT_LFLAGS=-m32
- export SWT_LFLAGS SWT_PTR_CFLAGS
-fi
if [ x`pkg-config --exists cairo && echo YES` = "xYES" ]; then
func_echo_plus "Cairo found, compiling SWT support for the cairo graphics library."
@@ -225,7 +185,7 @@ fi
if [ ${SWT_OS} = 'win32' ]; then
AWT_LIB_EXPR="jawt.dll"
else
- AWT_LIB_EXPR="libjawt.*"
+ AWT_LIB_EXPR="libjawt.so"
fi
if [ -z "${AWT_LIB_PATH}" ]; then
@@ -250,7 +210,7 @@ fi
## Interaction(s) with makefile(s) below:
-# Configure OUTPUT_DIR
+# Configure OUTPUT_DIR
if [ "x${OUTPUT_DIR}" = "x" ]; then
OUTPUT_DIR=../../../../../eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.${SWT_OS}.${SWT_ARCH}
if [ -d "$OUTPUT_DIR" ]; then
@@ -305,14 +265,6 @@ func_echo_plus "Building SWT/GTK+ for Architectures: $SWT_OS $SWT_ARCH"
func_build_gtk4 () {
export GTK_VERSION=4.0
- # Dictate Webkit2 Extension only if pkg-config flags exist
- pkg-config --exists webkit2gtk-web-extension-4.0
- if [ $? == 0 ]; then
- export BUILD_WEBKIT2EXTENSION="yes";
- else
- func_echo_error "Warning: Cannot compile Webkit2 Extension because 'pkg-config --exists webkit2gtk-web-extension-4-0' check failed. Please install webkitgtk4-devel.ARCH on your system."
- fi
-
func_echo_plus "Building GTK4 bindings:"
${MAKE_TYPE} -f $MAKEFILE all $MAKE_CAIRO $MAKE_AWT "${@}"
RETURN_VALUE=$? #make can return 1 or 2 if it fails. Thus need to cache it in case it's used programmatically somewhere.
@@ -327,14 +279,6 @@ func_build_gtk4 () {
func_build_gtk3 () {
export GTK_VERSION=3.0
- # Dictate Webkit2 Extension only if pkg-config flags exist
- pkg-config --exists webkit2gtk-web-extension-4.0
- if [ $? == 0 ]; then
- export BUILD_WEBKIT2EXTENSION="yes";
- else
- func_echo_error "Warning: Cannot compile Webkit2 Extension because 'pkg-config --exists webkit2gtk-web-extension-4-0' check failed. Please install webkitgtk4-devel.ARCH on your system."
- fi
-
func_echo_plus "Building GTK3 bindings:"
${MAKE_TYPE} -f $MAKEFILE all $MAKE_CAIRO $MAKE_AWT "${@}"
RETURN_VALUE=$? #make can return 1 or 2 if it fails. Thus need to cache it in case it's used programmatically somewhere.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c
new file mode 100644
index 0000000000..1da74a1545
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c
@@ -0,0 +1,2785 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "swt.h"
+#include "gtk3_structs.h"
+#include "gtk3_stats.h"
+#include "os_structs.h"
+
+#ifndef GTK3_NATIVE
+#define GTK3_NATIVE(func) Java_org_eclipse_swt_internal_gtk3_GTK3_##func
+#endif
+
+#ifndef NO_GTK_1IS_1MENU_1ITEM
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(GTK_1IS_1MENU_1ITEM)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GTK_1IS_1MENU_1ITEM_FUNC);
+ rc = (jboolean)GTK_IS_MENU_ITEM(arg0);
+ GTK3_NATIVE_EXIT(env, that, GTK_1IS_1MENU_1ITEM_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GTK_1TYPE_1MENU
+JNIEXPORT jlong JNICALL GTK3_NATIVE(GTK_1TYPE_1MENU)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GTK_1TYPE_1MENU_FUNC);
+ rc = (jlong)GTK_TYPE_MENU;
+ GTK3_NATIVE_EXIT(env, that, GTK_1TYPE_1MENU_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkEventButton_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkEventButton_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkEventButton_1sizeof_FUNC);
+ rc = (jint)GdkEventButton_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkEventButton_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkEventCrossing_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkEventCrossing_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkEventCrossing_1sizeof_FUNC);
+ rc = (jint)GdkEventCrossing_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkEventCrossing_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkEventFocus_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkEventFocus_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkEventFocus_1sizeof_FUNC);
+ rc = (jint)GdkEventFocus_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkEventFocus_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkEventKey_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkEventKey_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkEventKey_1sizeof_FUNC);
+ rc = (jint)GdkEventKey_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkEventKey_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkEventMotion_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkEventMotion_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkEventMotion_1sizeof_FUNC);
+ rc = (jint)GdkEventMotion_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkEventMotion_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkEventWindowState_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkEventWindowState_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkEventWindowState_1sizeof_FUNC);
+ rc = (jint)GdkEventWindowState_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkEventWindowState_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkEvent_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkEvent_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkEvent_1sizeof_FUNC);
+ rc = (jint)GdkEvent_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkEvent_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkGeometry_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkGeometry_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkGeometry_1sizeof_FUNC);
+ rc = (jint)GdkGeometry_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkGeometry_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GdkWindowAttr_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GdkWindowAttr_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GdkWindowAttr_1sizeof_FUNC);
+ rc = (jint)GdkWindowAttr_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GdkWindowAttr_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GtkTargetEntry_1sizeof
+JNIEXPORT jint JNICALL GTK3_NATIVE(GtkTargetEntry_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, GtkTargetEntry_1sizeof_FUNC);
+ rc = (jint)GtkTargetEntry_sizeof();
+ GTK3_NATIVE_EXIT(env, that, GtkTargetEntry_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1window_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gdk_1window_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
+{
+ GdkWindowAttr _arg1, *lparg1=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gdk_1window_1new_FUNC);
+ if (arg1) if ((lparg1 = getGdkWindowAttrFields(env, arg1, &_arg1)) == NULL) goto fail;
+ rc = (jlong)gdk_window_new((GdkWindow *)arg0, lparg1, arg2);
+fail:
+ GTK3_NATIVE_EXIT(env, that, gdk_1window_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1accel_1label_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1accel_1label_1new)
+ (JNIEnv *env, jclass that, jbyteArray arg0)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1accel_1label_1new_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_accel_label_new((const gchar *)lparg0);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1accel_1label_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1accel_1label_1set_1accel
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1accel_1label_1set_1accel)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1accel_1label_1set_1accel_FUNC);
+ gtk_accel_label_set_accel((GtkAccelLabel *)arg0, (guint)arg1, (GdkModifierType)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1accel_1label_1set_1accel_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1accel_1label_1set_1accel_1widget
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1accel_1label_1set_1accel_1widget)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1accel_1label_1set_1accel_1widget_FUNC);
+ gtk_accel_label_set_accel_widget((GtkAccelLabel *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1accel_1label_1set_1accel_1widget_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1accessible_1get_1widget
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1accessible_1get_1widget)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1accessible_1get_1widget_FUNC);
+ rc = (jlong)gtk_accessible_get_widget((GtkAccessible *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1accessible_1get_1widget_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1bin_1get_1child
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1bin_1get_1child)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1bin_1get_1child_FUNC);
+ rc = (jlong)gtk_bin_get_child((GtkBin *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1bin_1get_1child_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1box_1pack_1end
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1box_1pack_1end)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2, jboolean arg3, jint arg4)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1box_1pack_1end_FUNC);
+ gtk_box_pack_end((GtkBox *)arg0, (GtkWidget *)arg1, (gboolean)arg2, (gboolean)arg3, (guint)arg4);
+ GTK3_NATIVE_EXIT(env, that, gtk_1box_1pack_1end_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1box_1reorder_1child
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1box_1reorder_1child)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1box_1reorder_1child_FUNC);
+ gtk_box_reorder_child((GtkBox *)arg0, (GtkWidget *)arg1, (gint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1box_1reorder_1child_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1box_1set_1child_1packing
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1box_1set_1child_1packing)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2, jboolean arg3, jint arg4, jint arg5)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1box_1set_1child_1packing_FUNC);
+ gtk_box_set_child_packing((GtkBox *)arg0, (GtkWidget *)arg1, arg2, arg3, arg4, arg5);
+ GTK3_NATIVE_EXIT(env, that, gtk_1box_1set_1child_1packing_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1button_1set_1image
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1button_1set_1image)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1button_1set_1image_FUNC);
+ gtk_button_set_image((GtkButton *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1button_1set_1image_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1get_1date
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1calendar_1get_1date)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2, jintArray arg3)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ jint *lparg3=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1calendar_1get_1date_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ gtk_calendar_get_date((GtkCalendar *)arg0, (guint *)lparg1, (guint *)lparg2, (guint *)lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1calendar_1get_1date_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1select_1day
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1calendar_1select_1day)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1calendar_1select_1day_FUNC);
+ gtk_calendar_select_day((GtkCalendar *)arg0, (guint)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1calendar_1select_1day_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1select_1month
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1calendar_1select_1month)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1calendar_1select_1month_FUNC);
+ gtk_calendar_select_month((GtkCalendar *)arg0, (guint)arg1, (guint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1calendar_1select_1month_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1set_1display_1options
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1calendar_1set_1display_1options)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1calendar_1set_1display_1options_FUNC);
+ gtk_calendar_set_display_options((GtkCalendar *)arg0, (GtkCalendarDisplayOptions)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1calendar_1set_1display_1options_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1check_1menu_1item_1get_1active
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1check_1menu_1item_1get_1active)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1check_1menu_1item_1get_1active_FUNC);
+ rc = (jboolean)gtk_check_menu_item_get_active((GtkCheckMenuItem *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1check_1menu_1item_1get_1active_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1check_1menu_1item_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1check_1menu_1item_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1check_1menu_1item_1new_FUNC);
+ rc = (jlong)gtk_check_menu_item_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1check_1menu_1item_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1check_1menu_1item_1set_1active
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1check_1menu_1item_1set_1active)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1check_1menu_1item_1set_1active_FUNC);
+ gtk_check_menu_item_set_active((GtkCheckMenuItem *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1check_1menu_1item_1set_1active_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1clipboard_1clear
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1clipboard_1clear)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1clipboard_1clear_FUNC);
+ gtk_clipboard_clear((GtkClipboard *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1clipboard_1clear_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1clipboard_1get
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1clipboard_1get)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1clipboard_1get_FUNC);
+ rc = (jlong)gtk_clipboard_get((GdkAtom)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1clipboard_1get_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1clipboard_1set_1can_1store
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1clipboard_1set_1can_1store)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1clipboard_1set_1can_1store_FUNC);
+ gtk_clipboard_set_can_store((GtkClipboard *)arg0, (const GtkTargetEntry *)arg1, (gint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1clipboard_1set_1can_1store_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1clipboard_1set_1with_1owner
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1clipboard_1set_1with_1owner)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4, jlong arg5)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1clipboard_1set_1with_1owner_FUNC);
+ rc = (jboolean)gtk_clipboard_set_with_owner((GtkClipboard *)arg0, (const GtkTargetEntry *)arg1, (guint)arg2, (GtkClipboardGetFunc)arg3, (GtkClipboardClearFunc)arg4, (GObject *)arg5);
+ GTK3_NATIVE_EXIT(env, that, gtk_1clipboard_1set_1with_1owner_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1clipboard_1store
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1clipboard_1store)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1clipboard_1store_FUNC);
+ gtk_clipboard_store((GtkClipboard *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1clipboard_1store_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1clipboard_1wait_1for_1contents
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1clipboard_1wait_1for_1contents)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1clipboard_1wait_1for_1contents_FUNC);
+ rc = (jlong)gtk_clipboard_wait_for_contents((GtkClipboard *)arg0, (GdkAtom)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1clipboard_1wait_1for_1contents_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1combo_1box_1get_1wrap_1width
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1combo_1box_1get_1wrap_1width)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1combo_1box_1get_1wrap_1width_FUNC);
+ rc = (jint)gtk_combo_box_get_wrap_width((GtkComboBox *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1combo_1box_1get_1wrap_1width_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1combo_1box_1set_1wrap_1width
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1combo_1box_1set_1wrap_1width)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1combo_1box_1set_1wrap_1width_FUNC);
+ gtk_combo_box_set_wrap_width((GtkComboBox *)arg0, (gint)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1combo_1box_1set_1wrap_1width_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1container_1add
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1container_1add)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1container_1add_FUNC);
+ gtk_container_add((GtkContainer *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1container_1add_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1container_1forall
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1container_1forall)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1container_1forall_FUNC);
+ gtk_container_forall((GtkContainer *)arg0, (GtkCallback)arg1, (gpointer)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1container_1forall_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1container_1get_1border_1width
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1container_1get_1border_1width)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1container_1get_1border_1width_FUNC);
+ rc = (jint)gtk_container_get_border_width((GtkContainer *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1container_1get_1border_1width_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1container_1get_1children
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1container_1get_1children)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1container_1get_1children_FUNC);
+ rc = (jlong)gtk_container_get_children((GtkContainer *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1container_1get_1children_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1container_1propagate_1draw
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1container_1propagate_1draw)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1container_1propagate_1draw_FUNC);
+ gtk_container_propagate_draw((GtkContainer *)arg0, (GtkWidget *)arg1, (cairo_t *)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1container_1propagate_1draw_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1container_1remove
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1container_1remove)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1container_1remove_FUNC);
+ gtk_container_remove((GtkContainer *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1container_1remove_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1container_1set_1border_1width
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1container_1set_1border_1width)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1container_1set_1border_1width_FUNC);
+ gtk_container_set_border_width((GtkContainer *)arg0, (guint)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1container_1set_1border_1width_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1css_1provider_1load_1from_1data
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1css_1provider_1load_1from_1data)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlongArray arg3)
+{
+ jbyte *lparg1=NULL;
+ jlong *lparg3=NULL;
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1css_1provider_1load_1from_1data_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jboolean)gtk_css_provider_load_from_data((GtkCssProvider *)arg0, (const gchar *)lparg1, (gssize)arg2, (GError **)lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1css_1provider_1load_1from_1data_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1dialog_1run
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1dialog_1run)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1dialog_1run_FUNC);
+ rc = (jint)gtk_dialog_run((GtkDialog *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1dialog_1run_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1drag_1begin_1with_1coordinates
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1drag_1begin_1with_1coordinates)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jlong arg4, jint arg5, jint arg6)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1drag_1begin_1with_1coordinates_FUNC);
+ rc = (jlong)gtk_drag_begin_with_coordinates((GtkWidget *)arg0, (GtkTargetList *)arg1, (GdkDragAction)arg2, (gint)arg3, (GdkEvent *)arg4, (gint)arg5, (gint)arg6);
+ GTK3_NATIVE_EXIT(env, that, gtk_1drag_1begin_1with_1coordinates_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1drag_1check_1threshold
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1drag_1check_1threshold)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1drag_1check_1threshold_FUNC);
+ rc = (jboolean)gtk_drag_check_threshold((GtkWidget *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4);
+ GTK3_NATIVE_EXIT(env, that, gtk_1drag_1check_1threshold_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1drag_1dest_1set
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1drag_1dest_1set)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jint arg3, jint arg4)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1drag_1dest_1set_FUNC);
+ gtk_drag_dest_set((GtkWidget *)arg0, (GtkDestDefaults)arg1, (const GtkTargetEntry *)arg2, (gint)arg3, (GdkDragAction)arg4);
+ GTK3_NATIVE_EXIT(env, that, gtk_1drag_1dest_1set_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1drag_1dest_1unset
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1drag_1dest_1unset)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1drag_1dest_1unset_FUNC);
+ gtk_drag_dest_unset((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1drag_1dest_1unset_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1drag_1finish
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1drag_1finish)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1, jboolean arg2, jint arg3)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1drag_1finish_FUNC);
+ gtk_drag_finish((GdkDragContext *)arg0, (gboolean)arg1, (gboolean)arg2, (guint32)arg3);
+ GTK3_NATIVE_EXIT(env, that, gtk_1drag_1finish_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1drag_1get_1data
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1drag_1get_1data)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1drag_1get_1data_FUNC);
+ gtk_drag_get_data((GtkWidget *)arg0, (GdkDragContext *)arg1, (GdkAtom)arg2, (guint32)arg3);
+ GTK3_NATIVE_EXIT(env, that, gtk_1drag_1get_1data_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1drag_1set_1icon_1surface
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1drag_1set_1icon_1surface)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1drag_1set_1icon_1surface_FUNC);
+ gtk_drag_set_icon_surface((GdkDragContext *)arg0, (cairo_surface_t *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1drag_1set_1icon_1surface_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1editable_1copy_1clipboard
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1editable_1copy_1clipboard)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1editable_1copy_1clipboard_FUNC);
+ gtk_editable_copy_clipboard((GtkEditable *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1editable_1copy_1clipboard_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1editable_1cut_1clipboard
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1editable_1cut_1clipboard)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1editable_1cut_1clipboard_FUNC);
+ gtk_editable_cut_clipboard((GtkEditable *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1editable_1cut_1clipboard_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1editable_1paste_1clipboard
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1editable_1paste_1clipboard)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1editable_1paste_1clipboard_FUNC);
+ gtk_editable_paste_clipboard((GtkEditable *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1editable_1paste_1clipboard_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1entry_1get_1layout
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1entry_1get_1layout)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1entry_1get_1layout_FUNC);
+ rc = (jlong)gtk_entry_get_layout((GtkEntry *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1entry_1get_1layout_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1entry_1get_1layout_1offsets
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1entry_1get_1layout_1offsets)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1entry_1get_1layout_1offsets_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_entry_get_layout_offsets((GtkEntry *)arg0, (gint *)lparg1, (gint *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1entry_1get_1layout_1offsets_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1entry_1get_1text
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1entry_1get_1text)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1entry_1get_1text_FUNC);
+ rc = (jlong)gtk_entry_get_text((GtkEntry *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1entry_1get_1text_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1entry_1set_1text
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1entry_1set_1text)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1entry_1set_1text_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_entry_set_text((GtkEntry *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1entry_1set_1text_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1entry_1set_1width_1chars
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1entry_1set_1width_1chars)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1entry_1set_1width_1chars_FUNC);
+ gtk_entry_set_width_chars((GtkEntry *)arg0, (gint)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1entry_1set_1width_1chars_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1entry_1text_1index_1to_1layout_1index
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1entry_1text_1index_1to_1layout_1index)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1entry_1text_1index_1to_1layout_1index_FUNC);
+ rc = (jint)gtk_entry_text_index_to_layout_index((GtkEntry *)arg0, (gint)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1entry_1text_1index_1to_1layout_1index_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1event_1box_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1event_1box_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1event_1box_1new_FUNC);
+ rc = (jlong)gtk_event_box_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1event_1box_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1event_1controller_1handle_1event
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1event_1controller_1handle_1event)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1event_1controller_1handle_1event_FUNC);
+ gtk_event_controller_handle_event((GtkEventController *)arg0, (const GdkEvent *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1event_1controller_1handle_1event_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1events_1pending
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1events_1pending)
+ (JNIEnv *env, jclass that)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1events_1pending_FUNC);
+ rc = (jboolean)gtk_events_pending();
+ GTK3_NATIVE_EXIT(env, that, gtk_1events_1pending_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1get_1filename
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1filename)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1filename_FUNC);
+ rc = (jlong)gtk_file_chooser_get_filename((GtkFileChooser *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1filename_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1get_1filenames
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1filenames)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1filenames_FUNC);
+ rc = (jlong)gtk_file_chooser_get_filenames((GtkFileChooser *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1filenames_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1get_1uri
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1uri)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1uri_FUNC);
+ rc = (jlong)gtk_file_chooser_get_uri((GtkFileChooser *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1uri_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1get_1uris
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1uris)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1uris_FUNC);
+ rc = (jlong)gtk_file_chooser_get_uris((GtkFileChooser *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1uris_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1current_1folder
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1current_1folder)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1current_1folder_FUNC);
+ gtk_file_chooser_set_current_folder((GtkFileChooser *)arg0, (const gchar *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1current_1folder_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1current_1folder_1uri
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1current_1folder_1uri)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1current_1folder_1uri_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_file_chooser_set_current_folder_uri((GtkFileChooser *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1current_1folder_1uri_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1do_1overwrite_1confirmation
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1do_1overwrite_1confirmation)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1do_1overwrite_1confirmation_FUNC);
+ gtk_file_chooser_set_do_overwrite_confirmation((GtkFileChooser *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1do_1overwrite_1confirmation_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1extra_1widget
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1extra_1widget)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1extra_1widget_FUNC);
+ gtk_file_chooser_set_extra_widget((GtkFileChooser *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1extra_1widget_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1filename
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1filename)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1filename_FUNC);
+ gtk_file_chooser_set_filename((GtkFileChooser *)arg0, (const gchar *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1filename_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1local_1only
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1local_1only)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1local_1only_FUNC);
+ gtk_file_chooser_set_local_only((GtkFileChooser *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1local_1only_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1uri
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1uri)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1uri_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_file_chooser_set_uri((GtkFileChooser *)arg0, (const char *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1uri_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1frame_1set_1shadow_1type
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1frame_1set_1shadow_1type)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1frame_1set_1shadow_1type_FUNC);
+ gtk_frame_set_shadow_type((GtkFrame *)arg0, (GtkShadowType)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1frame_1set_1shadow_1type_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1get_1current_1event
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1get_1current_1event)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1get_1current_1event_FUNC);
+ rc = (jlong)gtk_get_current_event();
+ GTK3_NATIVE_EXIT(env, that, gtk_1get_1current_1event_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1get_1current_1event_1state
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1get_1current_1event_1state)
+ (JNIEnv *env, jclass that, jintArray arg0)
+{
+ jint *lparg0=NULL;
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1get_1current_1event_1state_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jboolean)gtk_get_current_event_state((GdkModifierType*)lparg0);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1get_1current_1event_1state_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1get_1event_1widget
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1get_1event_1widget)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1get_1event_1widget_FUNC);
+ rc = (jlong)gtk_get_event_widget((GdkEvent *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1get_1event_1widget_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1grab_1add
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1grab_1add)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1grab_1add_FUNC);
+ gtk_grab_add((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1grab_1add_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1grab_1get_1current
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1grab_1get_1current)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1grab_1get_1current_FUNC);
+ rc = (jlong)gtk_grab_get_current();
+ GTK3_NATIVE_EXIT(env, that, gtk_1grab_1get_1current_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1grab_1remove
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1grab_1remove)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1grab_1remove_FUNC);
+ gtk_grab_remove((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1grab_1remove_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1hsv_1to_1rgb
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1hsv_1to_1rgb)
+ (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jdoubleArray arg5)
+{
+ jdouble *lparg3=NULL;
+ jdouble *lparg4=NULL;
+ jdouble *lparg5=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1hsv_1to_1rgb_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ gtk_hsv_to_rgb((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble *)lparg3, (gdouble *)lparg4, (gdouble *)lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1hsv_1to_1rgb_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1icon_1info_1load_1icon
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1icon_1info_1load_1icon)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
+{
+ jlong *lparg1=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1icon_1info_1load_1icon_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_icon_info_load_icon((GtkIconInfo *)arg0, (GError **)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1icon_1info_1load_1icon_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1icon_1theme_1get_1default
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1icon_1theme_1get_1default)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1icon_1theme_1get_1default_FUNC);
+ rc = (jlong)gtk_icon_theme_get_default();
+ GTK3_NATIVE_EXIT(env, that, gtk_1icon_1theme_1get_1default_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1icon_1theme_1load_1icon
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1icon_1theme_1load_1icon)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jint arg3, jlong arg4)
+{
+ jbyte *lparg1=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1icon_1theme_1load_1icon_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_icon_theme_load_icon((GtkIconTheme *)arg0, (const gchar *)lparg1, (gint)arg2, (GtkIconLookupFlags)arg3, (GError **)arg4);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1icon_1theme_1load_1icon_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1icon_1theme_1lookup_1by_1gicon
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1icon_1theme_1lookup_1by_1gicon)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
+ rc = (jlong)gtk_icon_theme_lookup_by_gicon((GtkIconTheme *)arg0, (GIcon *)arg1, (gint)arg2, (GtkIconLookupFlags)arg3);
+ GTK3_NATIVE_EXIT(env, that, gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1im_1context_1filter_1keypress
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1im_1context_1filter_1keypress)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1im_1context_1filter_1keypress_FUNC);
+ rc = (jboolean)gtk_im_context_filter_keypress((GtkIMContext *)arg0, (GdkEventKey *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1im_1context_1filter_1keypress_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1image_1new_1from_1icon_1name
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1image_1new_1from_1icon_1name)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1image_1new_1from_1icon_1name_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_image_new_from_icon_name((const gchar *)lparg0, (GtkIconSize)arg1);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1image_1new_1from_1icon_1name_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1image_1new_1from_1surface
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1image_1new_1from_1surface)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1image_1new_1from_1surface_FUNC);
+ rc = (jlong)gtk_image_new_from_surface((cairo_surface_t *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1image_1new_1from_1surface_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1image_1set_1from_1icon_1name
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1image_1set_1from_1icon_1name)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
+{
+ jbyte *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1image_1set_1from_1icon_1name_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_image_set_from_icon_name((GtkImage *)arg0, (const gchar *)lparg1, (GtkIconSize)arg2);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1image_1set_1from_1icon_1name_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1image_1set_1from_1surface
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1image_1set_1from_1surface)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1image_1set_1from_1surface_FUNC);
+ gtk_image_set_from_surface((GtkImage *)arg0, (cairo_surface_t *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1image_1set_1from_1surface_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1init_1check
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1init_1check)
+ (JNIEnv *env, jclass that, jlongArray arg0, jlongArray arg1)
+{
+ jlong *lparg0=NULL;
+ jlong *lparg1=NULL;
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1init_1check_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jboolean)gtk_init_check((int *)lparg0, (char ***)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseLongArrayElements(env, arg0, lparg0, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1init_1check_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1label_1set_1line_1wrap
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1label_1set_1line_1wrap)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1label_1set_1line_1wrap_FUNC);
+ gtk_label_set_line_wrap((GtkLabel *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1label_1set_1line_1wrap_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1label_1set_1line_1wrap_1mode
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1label_1set_1line_1wrap_1mode)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1label_1set_1line_1wrap_1mode_FUNC);
+ gtk_label_set_line_wrap_mode((GtkLabel *)arg0, (PangoWrapMode)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1label_1set_1line_1wrap_1mode_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1main_1do_1event
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1main_1do_1event)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1main_1do_1event_FUNC);
+ gtk_main_do_event((GdkEvent *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1main_1do_1event_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1main_1iteration_1do
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1main_1iteration_1do)
+ (JNIEnv *env, jclass that, jboolean arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1main_1iteration_1do_FUNC);
+ rc = (jboolean)gtk_main_iteration_do(arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1main_1iteration_1do_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1menu_1bar_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1menu_1bar_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1bar_1new_FUNC);
+ rc = (jlong)gtk_menu_bar_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1bar_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1menu_1item_1get_1submenu
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1menu_1item_1get_1submenu)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1item_1get_1submenu_FUNC);
+ rc = (jlong)gtk_menu_item_get_submenu((GtkMenuItem *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1item_1get_1submenu_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1menu_1item_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1menu_1item_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1item_1new_FUNC);
+ rc = (jlong)gtk_menu_item_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1item_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1menu_1item_1set_1submenu
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1item_1set_1submenu)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1item_1set_1submenu_FUNC);
+ gtk_menu_item_set_submenu((GtkMenuItem *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1item_1set_1submenu_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1menu_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1new_FUNC);
+ rc = (jlong)gtk_menu_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1menu_1popdown
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1popdown)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1popdown_FUNC);
+ gtk_menu_popdown((GtkMenu *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1popdown_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1popup
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1popup)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jint arg5, jint arg6)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1popup_FUNC);
+ gtk_menu_popup((GtkMenu *)arg0, (GtkWidget *)arg1, (GtkWidget *)arg2, (GtkMenuPositionFunc)arg3, (gpointer)arg4, (guint)arg5, (guint32)arg6);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1popup_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1menu_1popup_1at_1pointer
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1popup_1at_1pointer)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1popup_1at_1pointer_FUNC);
+ gtk_menu_popup_at_pointer((GtkMenu *)arg0, (const GdkEvent*)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1popup_1at_1pointer_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1popup_1at_1rect
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1popup_1at_1rect)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3, jint arg4, jlong arg5)
+{
+ GdkRectangle _arg2, *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1popup_1at_1rect_FUNC);
+ if (arg2) if ((lparg2 = getGdkRectangleFields(env, arg2, &_arg2)) == NULL) goto fail;
+ gtk_menu_popup_at_rect((GtkMenu *)arg0, (GdkWindow *)arg1, (GdkRectangle *)lparg2, (GdkGravity)arg3, (GdkGravity)arg4, (const GdkEvent *)arg5);
+fail:
+ if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1popup_1at_1rect_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1shell_1deactivate
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1shell_1deactivate)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1shell_1deactivate_FUNC);
+ gtk_menu_shell_deactivate((GtkMenuShell *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1shell_1deactivate_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1shell_1insert
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1shell_1insert)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1shell_1insert_FUNC);
+ gtk_menu_shell_insert((GtkMenuShell *)arg0, (GtkWidget *)arg1, (gint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1shell_1insert_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1shell_1set_1take_1focus
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1shell_1set_1take_1focus)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1shell_1set_1take_1focus_FUNC);
+ gtk_menu_shell_set_take_focus((GtkMenuShell *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1shell_1set_1take_1focus_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1tool_1button_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1menu_1tool_1button_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1tool_1button_1new_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_menu_tool_button_new((GtkWidget *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1tool_1button_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1native_1dialog_1run
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1native_1dialog_1run)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1native_1dialog_1run_FUNC);
+ rc = (jint)gtk_native_dialog_run((GtkNativeDialog *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1native_1dialog_1run_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1radio_1button_1get_1group
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1radio_1button_1get_1group)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1radio_1button_1get_1group_FUNC);
+ rc = (jlong)gtk_radio_button_get_group((GtkRadioButton *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1radio_1button_1get_1group_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1radio_1button_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1radio_1button_1new)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1radio_1button_1new_FUNC);
+ rc = (jlong)gtk_radio_button_new((GSList *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1radio_1button_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1radio_1menu_1item_1get_1group
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1radio_1menu_1item_1get_1group)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1radio_1menu_1item_1get_1group_FUNC);
+ rc = (jlong)gtk_radio_menu_item_get_group((GtkRadioMenuItem *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1radio_1menu_1item_1get_1group_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1radio_1menu_1item_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1radio_1menu_1item_1new)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1radio_1menu_1item_1new_FUNC);
+ rc = (jlong)gtk_radio_menu_item_new((GSList *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1radio_1menu_1item_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1rgb_1to_1hsv
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1rgb_1to_1hsv)
+ (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jdoubleArray arg5)
+{
+ jdouble *lparg3=NULL;
+ jdouble *lparg4=NULL;
+ jdouble *lparg5=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1rgb_1to_1hsv_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ gtk_rgb_to_hsv((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble *)lparg3, (gdouble *)lparg4, (gdouble *)lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1rgb_1to_1hsv_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1scrolled_1window_1get_1shadow_1type
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1scrolled_1window_1get_1shadow_1type)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1shadow_1type_FUNC);
+ rc = (jint)gtk_scrolled_window_get_shadow_type((GtkScrolledWindow *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1shadow_1type_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1scrolled_1window_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1scrolled_1window_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1new_FUNC);
+ rc = (jlong)gtk_scrolled_window_new((GtkAdjustment *)arg0, (GtkAdjustment *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1scrolled_1window_1set_1shadow_1type
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1scrolled_1window_1set_1shadow_1type)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1set_1shadow_1type_FUNC);
+ gtk_scrolled_window_set_shadow_type((GtkScrolledWindow *)arg0, (GtkShadowType)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1set_1shadow_1type_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1selection_1data_1free
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1selection_1data_1free)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1selection_1data_1free_FUNC);
+ gtk_selection_data_free((GtkSelectionData *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1selection_1data_1free_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1selection_1data_1get_1data
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1selection_1data_1get_1data)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1selection_1data_1get_1data_FUNC);
+ rc = (jlong)gtk_selection_data_get_data((GtkSelectionData *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1selection_1data_1get_1data_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1selection_1data_1get_1data_1type
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1selection_1data_1get_1data_1type)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1selection_1data_1get_1data_1type_FUNC);
+ rc = (jlong)gtk_selection_data_get_data_type((GtkSelectionData *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1selection_1data_1get_1data_1type_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1selection_1data_1get_1format
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1selection_1data_1get_1format)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1selection_1data_1get_1format_FUNC);
+ rc = (jint)gtk_selection_data_get_format((GtkSelectionData *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1selection_1data_1get_1format_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1selection_1data_1get_1length
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1selection_1data_1get_1length)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1selection_1data_1get_1length_FUNC);
+ rc = (jint)gtk_selection_data_get_length((GtkSelectionData *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1selection_1data_1get_1length_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1selection_1data_1get_1target
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1selection_1data_1get_1target)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1selection_1data_1get_1target_FUNC);
+ rc = (jlong)gtk_selection_data_get_target((GtkSelectionData *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1selection_1data_1get_1target_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1selection_1data_1set
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1selection_1data_1set)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jint arg4)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1selection_1data_1set_FUNC);
+ gtk_selection_data_set((GtkSelectionData *)arg0, (GdkAtom)arg1, (gint)arg2, (const guchar *)arg3, (gint)arg4);
+ GTK3_NATIVE_EXIT(env, that, gtk_1selection_1data_1set_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1separator_1menu_1item_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1separator_1menu_1item_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1separator_1menu_1item_1new_FUNC);
+ rc = (jlong)gtk_separator_menu_item_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1separator_1menu_1item_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1separator_1tool_1item_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1separator_1tool_1item_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1separator_1tool_1item_1new_FUNC);
+ rc = (jlong)gtk_separator_tool_item_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1separator_1tool_1item_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1separator_1tool_1item_1set_1draw
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1separator_1tool_1item_1set_1draw)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1separator_1tool_1item_1set_1draw_FUNC);
+ gtk_separator_tool_item_set_draw((GtkSeparatorToolItem *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1separator_1tool_1item_1set_1draw_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1status_1icon_1get_1geometry
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1status_1icon_1get_1geometry)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3)
+{
+ GdkRectangle _arg2, *lparg2=NULL;
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1status_1icon_1get_1geometry_FUNC);
+ if (arg2) if ((lparg2 = getGdkRectangleFields(env, arg2, &_arg2)) == NULL) goto fail;
+ rc = (jboolean)gtk_status_icon_get_geometry((GtkStatusIcon*)arg0, (GdkScreen**)arg1, (GdkRectangle*)lparg2, (GtkOrientation*)arg3);
+fail:
+ if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1status_1icon_1get_1geometry_FUNC);
+ return rc;
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1status_1icon_1get_1visible
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1status_1icon_1get_1visible)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1status_1icon_1get_1visible_FUNC);
+ rc = (jboolean)gtk_status_icon_get_visible((GtkStatusIcon*)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1status_1icon_1get_1visible_FUNC);
+ return rc;
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1status_1icon_1new
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1status_1icon_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1status_1icon_1new_FUNC);
+ rc = (jlong)gtk_status_icon_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1status_1icon_1new_FUNC);
+ return rc;
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1status_1icon_1set_1from_1pixbuf
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1status_1icon_1set_1from_1pixbuf)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
+ gtk_status_icon_set_from_pixbuf((GtkStatusIcon*)arg0, (GdkPixbuf*)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1status_1icon_1set_1tooltip_1text
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1status_1icon_1set_1tooltip_1text)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1status_1icon_1set_1tooltip_1text_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_status_icon_set_tooltip_text((GtkStatusIcon *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1status_1icon_1set_1tooltip_1text_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1status_1icon_1set_1visible
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1status_1icon_1set_1visible)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1status_1icon_1set_1visible_FUNC);
+ gtk_status_icon_set_visible((GtkStatusIcon*)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1status_1icon_1set_1visible_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1style_1context_1add_1provider_1for_1screen
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1add_1provider_1for_1screen)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
+ gtk_style_context_add_provider_for_screen((GdkScreen *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1get)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jbyteArray arg2, jlongArray arg3, jlong arg4)
+{
+ jbyte *lparg2=NULL;
+ jlong *lparg3=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1get_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ gtk_style_context_get((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (const gchar *)lparg2, lparg3, (const gchar *)NULL);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, JNI_ABORT);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1get_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1border
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1get_1border)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
+{
+ GtkBorder _arg2, *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1border_FUNC);
+ if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
+ gtk_style_context_get_border((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GtkBorder *)lparg2);
+fail:
+ if (arg2 && lparg2) setGtkBorderFields(env, arg2, lparg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1border_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1color
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1get_1color)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
+{
+ GdkRGBA _arg2, *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1color_FUNC);
+ if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+ gtk_style_context_get_color((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GdkRGBA *)lparg2);
+fail:
+ if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1color_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1font
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1style_1context_1get_1font)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1font_FUNC);
+ rc = (jlong)gtk_style_context_get_font((GtkStyleContext *)arg0, (GtkStateFlags)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1font_FUNC);
+ return rc;
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1padding
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1get_1padding)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
+{
+ GtkBorder _arg2, *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1padding_FUNC);
+ if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
+ gtk_style_context_get_padding((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GtkBorder *)lparg2);
+fail:
+ if (arg2 && lparg2) setGtkBorderFields(env, arg2, lparg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1padding_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1parent
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1style_1context_1get_1parent)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1parent_FUNC);
+ rc = (jlong)gtk_style_context_get_parent((GtkStyleContext *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1parent_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1invalidate
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1invalidate)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1invalidate_FUNC);
+ gtk_style_context_invalidate((GtkStyleContext *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1invalidate_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1target_1list_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1target_1list_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1target_1list_1new_FUNC);
+ rc = (jlong)gtk_target_list_new((const GtkTargetEntry *)arg0, (guint)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1target_1list_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1target_1list_1unref
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1target_1list_1unref)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1target_1list_1unref_FUNC);
+ gtk_target_list_unref((GtkTargetList *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1target_1list_1unref_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1text_1view_1get_1window
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1text_1view_1get_1window)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1window_FUNC);
+ rc = (jlong)gtk_text_view_get_window((GtkTextView *)arg0, (GtkTextWindowType)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1window_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1toggle_1button_1set_1inconsistent
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toggle_1button_1set_1inconsistent)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1toggle_1button_1set_1inconsistent_FUNC);
+ gtk_toggle_button_set_inconsistent((GtkToggleButton *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1toggle_1button_1set_1inconsistent_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1toggle_1tool_1button_1get_1active
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1toggle_1tool_1button_1get_1active)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1toggle_1tool_1button_1get_1active_FUNC);
+ rc = (jboolean)gtk_toggle_tool_button_get_active((GtkToggleToolButton *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1toggle_1tool_1button_1get_1active_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1toggle_1tool_1button_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1toggle_1tool_1button_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1toggle_1tool_1button_1new_FUNC);
+ rc = (jlong)gtk_toggle_tool_button_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1toggle_1tool_1button_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1toggle_1tool_1button_1set_1active
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toggle_1tool_1button_1set_1active)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1toggle_1tool_1button_1set_1active_FUNC);
+ gtk_toggle_tool_button_set_active((GtkToggleToolButton *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1toggle_1tool_1button_1set_1active_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tool_1button_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1tool_1button_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1button_1new_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_tool_button_new((GtkWidget *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1button_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1tool_1button_1set_1icon_1widget
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1tool_1button_1set_1icon_1widget)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1button_1set_1icon_1widget_FUNC);
+ gtk_tool_button_set_icon_widget((GtkToolButton *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1button_1set_1icon_1widget_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tool_1button_1set_1label_1widget
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1tool_1button_1set_1label_1widget)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1button_1set_1label_1widget_FUNC);
+ gtk_tool_button_set_label_widget((GtkToolButton *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1button_1set_1label_1widget_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tool_1button_1set_1use_1underline
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1tool_1button_1set_1use_1underline)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1button_1set_1use_1underline_FUNC);
+ gtk_tool_button_set_use_underline((GtkToolButton *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1button_1set_1use_1underline_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tool_1item_1get_1proxy_1menu_1item
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1tool_1item_1get_1proxy_1menu_1item)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1item_1get_1proxy_1menu_1item_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_tool_item_get_proxy_menu_item((GtkToolItem *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1item_1get_1proxy_1menu_1item_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1tool_1item_1retrieve_1proxy_1menu_1item
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1tool_1item_1retrieve_1proxy_1menu_1item)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1item_1retrieve_1proxy_1menu_1item_FUNC);
+ rc = (jlong)gtk_tool_item_retrieve_proxy_menu_item((GtkToolItem *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1item_1retrieve_1proxy_1menu_1item_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1tool_1item_1set_1homogeneous
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1tool_1item_1set_1homogeneous)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1item_1set_1homogeneous_FUNC);
+ gtk_tool_item_set_homogeneous((GtkToolItem *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1item_1set_1homogeneous_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tool_1item_1set_1is_1important
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1tool_1item_1set_1is_1important)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1item_1set_1is_1important_FUNC);
+ gtk_tool_item_set_is_important((GtkToolItem *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1item_1set_1is_1important_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tool_1item_1set_1proxy_1menu_1item
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1tool_1item_1set_1proxy_1menu_1item)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
+{
+ jbyte *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1tool_1item_1set_1proxy_1menu_1item_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_tool_item_set_proxy_menu_item((GtkToolItem *)arg0, (const gchar *)lparg1, (GtkWidget *)arg2);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tool_1item_1set_1proxy_1menu_1item_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1toolbar_1insert
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toolbar_1insert)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1toolbar_1insert_FUNC);
+ gtk_toolbar_insert((GtkToolbar *)arg0, (GtkToolItem *)arg1, arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1toolbar_1insert_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1toolbar_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1toolbar_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1toolbar_1new_FUNC);
+ rc = (jlong)gtk_toolbar_new();
+ GTK3_NATIVE_EXIT(env, that, gtk_1toolbar_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1toolbar_1set_1icon_1size
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toolbar_1set_1icon_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1toolbar_1set_1icon_1size_FUNC);
+ gtk_toolbar_set_icon_size((GtkToolbar *)arg0, arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1toolbar_1set_1icon_1size_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1toolbar_1set_1show_1arrow
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toolbar_1set_1show_1arrow)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1toolbar_1set_1show_1arrow_FUNC);
+ gtk_toolbar_set_show_arrow((GtkToolbar *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1toolbar_1set_1show_1arrow_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1toolbar_1set_1style
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toolbar_1set_1style)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1toolbar_1set_1style_FUNC);
+ gtk_toolbar_set_style((GtkToolbar *)arg0, (GtkToolbarStyle)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1toolbar_1set_1style_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1view_1column_1cell_1get_1size
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1tree_1view_1column_1cell_1get_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jintArray arg2, jintArray arg3, jintArray arg4, jintArray arg5)
+{
+ GdkRectangle _arg1, *lparg1=NULL;
+ jint *lparg2=NULL;
+ jint *lparg3=NULL;
+ jint *lparg4=NULL;
+ jint *lparg5=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1cell_1get_1size_FUNC);
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ gtk_tree_view_column_cell_get_size((GtkTreeViewColumn *)arg0, (GdkRectangle *)lparg1, (gint *)lparg2, (gint *)lparg3, (gint *)lparg4, (gint *)lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1cell_1get_1size_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1view_1get_1bin_1window
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1tree_1view_1get_1bin_1window)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1bin_1window_FUNC);
+ rc = (jlong)gtk_tree_view_get_bin_window((GtkTreeView *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1bin_1window_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1viewport_1set_1shadow_1type
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1viewport_1set_1shadow_1type)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1viewport_1set_1shadow_1type_FUNC);
+ gtk_viewport_set_shadow_type((GtkViewport *)arg0, (GtkShadowType)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1viewport_1set_1shadow_1type_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1add_1accelerator
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1add_1accelerator)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jint arg3, jint arg4, jint arg5)
+{
+ jbyte *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1add_1accelerator_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_widget_add_accelerator((GtkWidget *)arg0, (const gchar *)lparg1, (GtkAccelGroup *)arg2, (guint)arg3, (GdkModifierType)arg4, arg5);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1add_1accelerator_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1add_1events
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1add_1events)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1add_1events_FUNC);
+ gtk_widget_add_events((GtkWidget *)arg0, (gint)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1add_1events_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1destroy
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1destroy)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1destroy_FUNC);
+ gtk_widget_destroy((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1destroy_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1draw
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1draw)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1draw_FUNC);
+ gtk_widget_draw((GtkWidget *)arg0, (cairo_t *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1draw_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1event
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1widget_1event)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1event_FUNC);
+ rc = (jboolean)gtk_widget_event((GtkWidget *)arg0, (GdkEvent *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1event_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1accessible
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1widget_1get_1accessible)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1accessible_FUNC);
+ rc = (jlong)gtk_widget_get_accessible((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1accessible_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1can_1default
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1widget_1get_1can_1default)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1can_1default_FUNC);
+ rc = (jboolean)gtk_widget_get_can_default((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1can_1default_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1clip
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1get_1clip)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GtkAllocation _arg1, *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1clip_FUNC);
+ if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
+ gtk_widget_get_clip((GtkWidget *)arg0, lparg1);
+fail:
+ if (arg1 && lparg1) setGtkAllocationFields(env, arg1, lparg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1clip_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1events
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1widget_1get_1events)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1events_FUNC);
+ rc = (jint)gtk_widget_get_events((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1events_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1has_1window
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1widget_1get_1has_1window)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1has_1window_FUNC);
+ rc = (jboolean)gtk_widget_get_has_window((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1has_1window_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1preferred_1height
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1get_1preferred_1height)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1preferred_1height_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_widget_get_preferred_height((GtkWidget *)arg0, (gint *)lparg1, (gint *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1preferred_1height_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1preferred_1height_1for_1width
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1get_1preferred_1height_1for_1width)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jintArray arg3)
+{
+ jint *lparg2=NULL;
+ jint *lparg3=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1preferred_1height_1for_1width_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ gtk_widget_get_preferred_height_for_width((GtkWidget *)arg0, (gint)arg1, (gint *)lparg2, (gint *)lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1preferred_1height_1for_1width_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1preferred_1width_1for_1height
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1get_1preferred_1width_1for_1height)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jintArray arg3)
+{
+ jint *lparg2=NULL;
+ jint *lparg3=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1preferred_1width_1for_1height_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ gtk_widget_get_preferred_width_for_height((GtkWidget *)arg0, (gint)arg1, (gint *)lparg2, (gint *)lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1preferred_1width_1for_1height_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1screen
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1widget_1get_1screen)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1screen_FUNC);
+ rc = (jlong)gtk_widget_get_screen((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1screen_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1toplevel
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1widget_1get_1toplevel)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1toplevel_FUNC);
+ rc = (jlong)gtk_widget_get_toplevel((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1toplevel_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1window
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1widget_1get_1window)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1get_1window_FUNC);
+ rc = (jlong)gtk_widget_get_window((GtkWidget *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1get_1window_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1input_1shape_1combine_1region
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1input_1shape_1combine_1region)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1input_1shape_1combine_1region_FUNC);
+ gtk_widget_input_shape_combine_region((GtkWidget *)arg0, (cairo_region_t *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1input_1shape_1combine_1region_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1override_1font
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1override_1font)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1override_1font_FUNC);
+ gtk_widget_override_font((GtkWidget *)arg0, (const PangoFontDescription *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1override_1font_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1widget_1remove_1accelerator
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1remove_1accelerator)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1remove_1accelerator_FUNC);
+ gtk_widget_remove_accelerator((GtkWidget *)arg0, (GtkAccelGroup *)arg1, (guint)arg2, (GdkModifierType)arg3);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1remove_1accelerator_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1reparent
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1reparent)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1reparent_FUNC);
+ gtk_widget_reparent((GtkWidget *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1reparent_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1widget_1set_1allocation
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1set_1allocation)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GtkAllocation _arg1, *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1set_1allocation_FUNC);
+ if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
+ gtk_widget_set_allocation((GtkWidget *)arg0, (GtkAllocation *)lparg1);
+fail:
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1set_1allocation_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1can_1default
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1set_1can_1default)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1set_1can_1default_FUNC);
+ gtk_widget_set_can_default((GtkWidget *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1set_1can_1default_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1clip
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1set_1clip)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GtkAllocation _arg1, *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1set_1clip_FUNC);
+ if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
+ gtk_widget_set_clip((GtkWidget *)arg0, lparg1);
+fail:
+ if (arg1 && lparg1) setGtkAllocationFields(env, arg1, lparg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1set_1clip_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1double_1buffered
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1set_1double_1buffered)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1set_1double_1buffered_FUNC);
+ gtk_widget_set_double_buffered((GtkWidget *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1set_1double_1buffered_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1widget_1set_1has_1window
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1set_1has_1window)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1set_1has_1window_FUNC);
+ gtk_widget_set_has_window((GtkWidget *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1set_1has_1window_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1parent_1window
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1set_1parent_1window)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1set_1parent_1window_FUNC);
+ gtk_widget_set_parent_window((GtkWidget *)arg0, (GdkWindow *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1set_1parent_1window_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1redraw_1on_1allocate
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1set_1redraw_1on_1allocate)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1set_1redraw_1on_1allocate_FUNC);
+ gtk_widget_set_redraw_on_allocate((GtkWidget *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1set_1redraw_1on_1allocate_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1shape_1combine_1region
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1shape_1combine_1region)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1shape_1combine_1region_FUNC);
+ gtk_widget_shape_combine_region((GtkWidget *)arg0, (cairo_region_t *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1shape_1combine_1region_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1size_1allocate
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1size_1allocate)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GtkAllocation _arg1, *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1size_1allocate_FUNC);
+ if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
+ gtk_widget_size_allocate((GtkWidget *)arg0, (GtkAllocation *)lparg1);
+fail:
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1size_1allocate_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1style_1get__J_3B_3IJ
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1style_1get__J_3B_3IJ)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jintArray arg2, jlong arg3)
+{
+ jbyte *lparg1=NULL;
+ jint *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1style_1get__J_3B_3IJ_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_widget_style_get((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1style_1get__J_3B_3IJ_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1style_1get__J_3B_3JJ
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1widget_1style_1get__J_3B_3JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlongArray arg2, jlong arg3)
+{
+ jbyte *lparg1=NULL;
+ jlong *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1style_1get__J_3B_3JJ_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_widget_style_get((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1style_1get__J_3B_3JJ_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1translate_1coordinates
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1widget_1translate_1coordinates)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5)
+{
+ jint *lparg4=NULL;
+ jint *lparg5=NULL;
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1widget_1translate_1coordinates_FUNC);
+ if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jboolean)gtk_widget_translate_coordinates((GtkWidget *)arg0, (GtkWidget *)arg1, arg2, arg3, (gint *)lparg4, (gint *)lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1widget_1translate_1coordinates_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1activate_1default
+JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1window_1activate_1default)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1activate_1default_FUNC);
+ rc = (jboolean)gtk_window_activate_default((GtkWindow *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1activate_1default_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1add_1accel_1group
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1add_1accel_1group)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1add_1accel_1group_FUNC);
+ gtk_window_add_accel_group((GtkWindow *)arg0, (GtkAccelGroup *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1add_1accel_1group_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1deiconify
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1deiconify)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1deiconify_FUNC);
+ gtk_window_deiconify((GtkWindow *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1deiconify_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1get_1icon_1list
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1window_1get_1icon_1list)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1get_1icon_1list_FUNC);
+ rc = (jlong)gtk_window_get_icon_list((GtkWindow *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1get_1icon_1list_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1get_1mnemonic_1modifier
+JNIEXPORT jint JNICALL GTK3_NATIVE(gtk_1window_1get_1mnemonic_1modifier)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1get_1mnemonic_1modifier_FUNC);
+ rc = (jint)gtk_window_get_mnemonic_modifier((GtkWindow *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1get_1mnemonic_1modifier_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1get_1position
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1get_1position)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1get_1position_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_window_get_position((GtkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1get_1position_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1get_1size
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1get_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1get_1size_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_window_get_size((GtkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1get_1size_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1iconify
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1iconify)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1iconify_FUNC);
+ gtk_window_iconify((GtkWindow *)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1iconify_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1move
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1move)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1move_FUNC);
+ gtk_window_move((GtkWindow *)arg0, (gint)arg1, (gint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1move_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1new
+JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1window_1new)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jlong rc = 0;
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1new_FUNC);
+ rc = (jlong)gtk_window_new((GtkWindowType)arg0);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1remove_1accel_1group
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1remove_1accel_1group)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1remove_1accel_1group_FUNC);
+ gtk_window_remove_accel_group((GtkWindow *)arg0, (GtkAccelGroup *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1remove_1accel_1group_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1resize
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1resize)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1resize_FUNC);
+ gtk_window_resize((GtkWindow *)arg0, (gint)arg1, (gint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1resize_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1attached_1to
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1set_1attached_1to)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1set_1attached_1to_FUNC);
+ gtk_window_set_attached_to((GtkWindow *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1set_1attached_1to_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1default
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1set_1default)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1set_1default_FUNC);
+ gtk_window_set_default((GtkWindow *)arg0, (GtkWidget *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1set_1default_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1geometry_1hints
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1set_1geometry_1hints)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3)
+{
+ GdkGeometry _arg2, *lparg2=NULL;
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1set_1geometry_1hints_FUNC);
+ if (arg2) if ((lparg2 = getGdkGeometryFields(env, arg2, &_arg2)) == NULL) goto fail;
+ gtk_window_set_geometry_hints((GtkWindow *)arg0, (GtkWidget *)arg1, lparg2, arg3);
+fail:
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1set_1geometry_1hints_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1icon_1list
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1set_1icon_1list)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1set_1icon_1list_FUNC);
+ gtk_window_set_icon_list((GtkWindow *)arg0, (GList *)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1set_1icon_1list_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1keep_1above
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1set_1keep_1above)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1set_1keep_1above_FUNC);
+ gtk_window_set_keep_above((GtkWindow *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1set_1keep_1above_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1skip_1taskbar_1hint
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1set_1skip_1taskbar_1hint)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1set_1skip_1taskbar_1hint_FUNC);
+ gtk_window_set_skip_taskbar_hint((GtkWindow *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1set_1skip_1taskbar_1hint_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1type_1hint
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1window_1set_1type_1hint)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1window_1set_1type_1hint_FUNC);
+ gtk_window_set_type_hint((GtkWindow *)arg0, arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1window_1set_1type_1hint_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventButton_2J
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventButton_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
+{
+ GdkEventButton _arg1, *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventButton_2J_FUNC);
+ if (arg1) if ((lparg1 = getGdkEventButtonFields(env, arg1, &_arg1)) == NULL) goto fail;
+ memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+ GTK3_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventButton_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventKey_2J
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventKey_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
+{
+ GdkEventKey _arg1, *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventKey_2J_FUNC);
+ if (arg1) if ((lparg1 = getGdkEventKeyFields(env, arg1, &_arg1)) == NULL) goto fail;
+ memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+ GTK3_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventKey_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk3_GtkTargetEntry_2J
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk3_GtkTargetEntry_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
+{
+ GtkTargetEntry _arg1, *lparg1=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk3_GtkTargetEntry_2J_FUNC);
+ if (arg1) if ((lparg1 = getGtkTargetEntryFields(env, arg1, &_arg1)) == NULL) goto fail;
+ memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+ GTK3_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk3_GtkTargetEntry_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventButton_2JJ
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventButton_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkEventButton _arg0, *lparg0=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventButton_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkEventButtonFields(env, arg0, lparg0);
+ GTK3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventButton_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventCrossing_2JJ
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventCrossing_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkEventCrossing _arg0, *lparg0=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventCrossing_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkEventCrossingFields(env, arg0, lparg0);
+ GTK3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventCrossing_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventFocus_2JJ
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventFocus_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkEventFocus _arg0, *lparg0=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventFocus_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkEventFocusFields(env, arg0, lparg0);
+ GTK3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventFocus_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventKey_2JJ
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventKey_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkEventKey _arg0, *lparg0=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventKey_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkEventKeyFields(env, arg0, lparg0);
+ GTK3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventKey_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventMotion_2JJ
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventMotion_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkEventMotion _arg0, *lparg0=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventMotion_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkEventMotionFields(env, arg0, lparg0);
+ GTK3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventMotion_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventWindowState_2JJ
+JNIEXPORT void JNICALL GTK3_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventWindowState_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkEventWindowState _arg0, *lparg0=NULL;
+ GTK3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventWindowState_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkEventWindowStateFields(env, arg0, lparg0);
+ GTK3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventWindowState_2JJ_FUNC);
+}
+#endif
+
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h
index ae9b5506e7..ed6b65e62b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2021 Syntevo and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,11 +9,17 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Syntevo - initial API and implementation
*******************************************************************************/
+
+#ifndef INC_gtk3_H
+#define INC_gtk3_H
-/* Libraries for dynamic loaded functions */
-#define WebKitCreateInstance_LIB "webkit.dll"
+#define NDEBUG
+#define G_DISABLE_DEPRECATED
+#define GTK_DISABLE_SINGLE_INCLUDES
+#include <gtk/gtk.h>
+#endif /* INC_gtk3_H */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c
new file mode 100644
index 0000000000..9090f622f8
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "swt.h"
+#include "gtk3_stats.h"
+
+#ifdef NATIVE_STATS
+
+char * GTK3_nativeFunctionNames[] = {
+ "GTK_1IS_1MENU_1ITEM",
+ "GTK_1TYPE_1MENU",
+ "GdkEventButton_1sizeof",
+ "GdkEventCrossing_1sizeof",
+ "GdkEventFocus_1sizeof",
+ "GdkEventKey_1sizeof",
+ "GdkEventMotion_1sizeof",
+ "GdkEventWindowState_1sizeof",
+ "GdkEvent_1sizeof",
+ "GdkGeometry_1sizeof",
+ "GdkWindowAttr_1sizeof",
+ "GtkTargetEntry_1sizeof",
+ "gdk_1window_1new",
+ "gtk_1accel_1label_1new",
+ "gtk_1accel_1label_1set_1accel",
+ "gtk_1accel_1label_1set_1accel_1widget",
+ "gtk_1accessible_1get_1widget",
+ "gtk_1bin_1get_1child",
+ "gtk_1box_1pack_1end",
+ "gtk_1box_1reorder_1child",
+ "gtk_1box_1set_1child_1packing",
+ "gtk_1button_1set_1image",
+ "gtk_1calendar_1get_1date",
+ "gtk_1calendar_1select_1day",
+ "gtk_1calendar_1select_1month",
+ "gtk_1calendar_1set_1display_1options",
+ "gtk_1check_1menu_1item_1get_1active",
+ "gtk_1check_1menu_1item_1new",
+ "gtk_1check_1menu_1item_1set_1active",
+ "gtk_1clipboard_1clear",
+ "gtk_1clipboard_1get",
+ "gtk_1clipboard_1set_1can_1store",
+ "gtk_1clipboard_1set_1with_1owner",
+ "gtk_1clipboard_1store",
+ "gtk_1clipboard_1wait_1for_1contents",
+ "gtk_1combo_1box_1get_1wrap_1width",
+ "gtk_1combo_1box_1set_1wrap_1width",
+ "gtk_1container_1add",
+ "gtk_1container_1forall",
+ "gtk_1container_1get_1border_1width",
+ "gtk_1container_1get_1children",
+ "gtk_1container_1propagate_1draw",
+ "gtk_1container_1remove",
+ "gtk_1container_1set_1border_1width",
+ "gtk_1css_1provider_1load_1from_1data",
+ "gtk_1dialog_1run",
+ "gtk_1drag_1begin_1with_1coordinates",
+ "gtk_1drag_1check_1threshold",
+ "gtk_1drag_1dest_1set",
+ "gtk_1drag_1dest_1unset",
+ "gtk_1drag_1finish",
+ "gtk_1drag_1get_1data",
+ "gtk_1drag_1set_1icon_1surface",
+ "gtk_1editable_1copy_1clipboard",
+ "gtk_1editable_1cut_1clipboard",
+ "gtk_1editable_1paste_1clipboard",
+ "gtk_1entry_1get_1layout",
+ "gtk_1entry_1get_1layout_1offsets",
+ "gtk_1entry_1get_1text",
+ "gtk_1entry_1set_1text",
+ "gtk_1entry_1set_1width_1chars",
+ "gtk_1entry_1text_1index_1to_1layout_1index",
+ "gtk_1event_1box_1new",
+ "gtk_1event_1controller_1handle_1event",
+ "gtk_1events_1pending",
+ "gtk_1file_1chooser_1get_1filename",
+ "gtk_1file_1chooser_1get_1filenames",
+ "gtk_1file_1chooser_1get_1uri",
+ "gtk_1file_1chooser_1get_1uris",
+ "gtk_1file_1chooser_1set_1current_1folder",
+ "gtk_1file_1chooser_1set_1current_1folder_1uri",
+ "gtk_1file_1chooser_1set_1do_1overwrite_1confirmation",
+ "gtk_1file_1chooser_1set_1extra_1widget",
+ "gtk_1file_1chooser_1set_1filename",
+ "gtk_1file_1chooser_1set_1local_1only",
+ "gtk_1file_1chooser_1set_1uri",
+ "gtk_1frame_1set_1shadow_1type",
+ "gtk_1get_1current_1event",
+ "gtk_1get_1current_1event_1state",
+ "gtk_1get_1event_1widget",
+ "gtk_1grab_1add",
+ "gtk_1grab_1get_1current",
+ "gtk_1grab_1remove",
+ "gtk_1hsv_1to_1rgb",
+ "gtk_1icon_1info_1load_1icon",
+ "gtk_1icon_1theme_1get_1default",
+ "gtk_1icon_1theme_1load_1icon",
+ "gtk_1icon_1theme_1lookup_1by_1gicon",
+ "gtk_1im_1context_1filter_1keypress",
+ "gtk_1image_1new_1from_1icon_1name",
+ "gtk_1image_1new_1from_1surface",
+ "gtk_1image_1set_1from_1icon_1name",
+ "gtk_1image_1set_1from_1surface",
+ "gtk_1init_1check",
+ "gtk_1label_1set_1line_1wrap",
+ "gtk_1label_1set_1line_1wrap_1mode",
+ "gtk_1main_1do_1event",
+ "gtk_1main_1iteration_1do",
+ "gtk_1menu_1bar_1new",
+ "gtk_1menu_1item_1get_1submenu",
+ "gtk_1menu_1item_1new",
+ "gtk_1menu_1item_1set_1submenu",
+ "gtk_1menu_1new",
+ "gtk_1menu_1popdown",
+ "gtk_1menu_1popup",
+ "gtk_1menu_1popup_1at_1pointer",
+ "gtk_1menu_1popup_1at_1rect",
+ "gtk_1menu_1shell_1deactivate",
+ "gtk_1menu_1shell_1insert",
+ "gtk_1menu_1shell_1set_1take_1focus",
+ "gtk_1menu_1tool_1button_1new",
+ "gtk_1native_1dialog_1run",
+ "gtk_1radio_1button_1get_1group",
+ "gtk_1radio_1button_1new",
+ "gtk_1radio_1menu_1item_1get_1group",
+ "gtk_1radio_1menu_1item_1new",
+ "gtk_1rgb_1to_1hsv",
+ "gtk_1scrolled_1window_1get_1shadow_1type",
+ "gtk_1scrolled_1window_1new",
+ "gtk_1scrolled_1window_1set_1shadow_1type",
+ "gtk_1selection_1data_1free",
+ "gtk_1selection_1data_1get_1data",
+ "gtk_1selection_1data_1get_1data_1type",
+ "gtk_1selection_1data_1get_1format",
+ "gtk_1selection_1data_1get_1length",
+ "gtk_1selection_1data_1get_1target",
+ "gtk_1selection_1data_1set",
+ "gtk_1separator_1menu_1item_1new",
+ "gtk_1separator_1tool_1item_1new",
+ "gtk_1separator_1tool_1item_1set_1draw",
+ "gtk_1status_1icon_1get_1geometry",
+ "gtk_1status_1icon_1get_1visible",
+ "gtk_1status_1icon_1new",
+ "gtk_1status_1icon_1set_1from_1pixbuf",
+ "gtk_1status_1icon_1set_1tooltip_1text",
+ "gtk_1status_1icon_1set_1visible",
+ "gtk_1style_1context_1add_1provider_1for_1screen",
+ "gtk_1style_1context_1get",
+ "gtk_1style_1context_1get_1border",
+ "gtk_1style_1context_1get_1color",
+ "gtk_1style_1context_1get_1font",
+ "gtk_1style_1context_1get_1padding",
+ "gtk_1style_1context_1get_1parent",
+ "gtk_1style_1context_1invalidate",
+ "gtk_1target_1list_1new",
+ "gtk_1target_1list_1unref",
+ "gtk_1text_1view_1get_1window",
+ "gtk_1toggle_1button_1set_1inconsistent",
+ "gtk_1toggle_1tool_1button_1get_1active",
+ "gtk_1toggle_1tool_1button_1new",
+ "gtk_1toggle_1tool_1button_1set_1active",
+ "gtk_1tool_1button_1new",
+ "gtk_1tool_1button_1set_1icon_1widget",
+ "gtk_1tool_1button_1set_1label_1widget",
+ "gtk_1tool_1button_1set_1use_1underline",
+ "gtk_1tool_1item_1get_1proxy_1menu_1item",
+ "gtk_1tool_1item_1retrieve_1proxy_1menu_1item",
+ "gtk_1tool_1item_1set_1homogeneous",
+ "gtk_1tool_1item_1set_1is_1important",
+ "gtk_1tool_1item_1set_1proxy_1menu_1item",
+ "gtk_1toolbar_1insert",
+ "gtk_1toolbar_1new",
+ "gtk_1toolbar_1set_1icon_1size",
+ "gtk_1toolbar_1set_1show_1arrow",
+ "gtk_1toolbar_1set_1style",
+ "gtk_1tree_1view_1column_1cell_1get_1size",
+ "gtk_1tree_1view_1get_1bin_1window",
+ "gtk_1viewport_1set_1shadow_1type",
+ "gtk_1widget_1add_1accelerator",
+ "gtk_1widget_1add_1events",
+ "gtk_1widget_1destroy",
+ "gtk_1widget_1draw",
+ "gtk_1widget_1event",
+ "gtk_1widget_1get_1accessible",
+ "gtk_1widget_1get_1can_1default",
+ "gtk_1widget_1get_1clip",
+ "gtk_1widget_1get_1events",
+ "gtk_1widget_1get_1has_1window",
+ "gtk_1widget_1get_1preferred_1height",
+ "gtk_1widget_1get_1preferred_1height_1for_1width",
+ "gtk_1widget_1get_1preferred_1width_1for_1height",
+ "gtk_1widget_1get_1screen",
+ "gtk_1widget_1get_1toplevel",
+ "gtk_1widget_1get_1window",
+ "gtk_1widget_1input_1shape_1combine_1region",
+ "gtk_1widget_1override_1font",
+ "gtk_1widget_1remove_1accelerator",
+ "gtk_1widget_1reparent",
+ "gtk_1widget_1set_1allocation",
+ "gtk_1widget_1set_1can_1default",
+ "gtk_1widget_1set_1clip",
+ "gtk_1widget_1set_1double_1buffered",
+ "gtk_1widget_1set_1has_1window",
+ "gtk_1widget_1set_1parent_1window",
+ "gtk_1widget_1set_1redraw_1on_1allocate",
+ "gtk_1widget_1shape_1combine_1region",
+ "gtk_1widget_1size_1allocate",
+ "gtk_1widget_1style_1get__J_3B_3IJ",
+ "gtk_1widget_1style_1get__J_3B_3JJ",
+ "gtk_1widget_1translate_1coordinates",
+ "gtk_1window_1activate_1default",
+ "gtk_1window_1add_1accel_1group",
+ "gtk_1window_1deiconify",
+ "gtk_1window_1get_1icon_1list",
+ "gtk_1window_1get_1mnemonic_1modifier",
+ "gtk_1window_1get_1position",
+ "gtk_1window_1get_1size",
+ "gtk_1window_1iconify",
+ "gtk_1window_1move",
+ "gtk_1window_1new",
+ "gtk_1window_1remove_1accel_1group",
+ "gtk_1window_1resize",
+ "gtk_1window_1set_1attached_1to",
+ "gtk_1window_1set_1default",
+ "gtk_1window_1set_1geometry_1hints",
+ "gtk_1window_1set_1icon_1list",
+ "gtk_1window_1set_1keep_1above",
+ "gtk_1window_1set_1skip_1taskbar_1hint",
+ "gtk_1window_1set_1type_1hint",
+ "memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventButton_2J",
+ "memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventKey_2J",
+ "memmove__JLorg_eclipse_swt_internal_gtk3_GtkTargetEntry_2J",
+ "memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventButton_2JJ",
+ "memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventCrossing_2JJ",
+ "memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventFocus_2JJ",
+ "memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventKey_2JJ",
+ "memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventMotion_2JJ",
+ "memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventWindowState_2JJ",
+};
+#define NATIVE_FUNCTION_COUNT sizeof(GTK3_nativeFunctionNames) / sizeof(char*)
+int GTK3_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int GTK3_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
+
+#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
+
+JNIEXPORT jint JNICALL STATS_NATIVE(GTK3_1GetFunctionCount)
+ (JNIEnv *env, jclass that)
+{
+ return GTK3_nativeFunctionCount;
+}
+
+JNIEXPORT jstring JNICALL STATS_NATIVE(GTK3_1GetFunctionName)
+ (JNIEnv *env, jclass that, jint index)
+{
+ return (*env)->NewStringUTF(env, GTK3_nativeFunctionNames[index]);
+}
+
+JNIEXPORT jint JNICALL STATS_NATIVE(GTK3_1GetFunctionCallCount)
+ (JNIEnv *env, jclass that, jint index)
+{
+ return GTK3_nativeFunctionCallCount[index];
+}
+
+#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h
new file mode 100644
index 0000000000..5a1e83ff87
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#ifdef NATIVE_STATS
+extern int GTK3_nativeFunctionCount;
+extern int GTK3_nativeFunctionCallCount[];
+extern char* GTK3_nativeFunctionNames[];
+#define GTK3_NATIVE_ENTER(env, that, func) GTK3_nativeFunctionCallCount[func]++;
+#define GTK3_NATIVE_EXIT(env, that, func)
+#else
+#ifndef GTK3_NATIVE_ENTER
+#define GTK3_NATIVE_ENTER(env, that, func)
+#endif
+#ifndef GTK3_NATIVE_EXIT
+#define GTK3_NATIVE_EXIT(env, that, func)
+#endif
+#endif
+
+typedef enum {
+ GTK_1IS_1MENU_1ITEM_FUNC,
+ GTK_1TYPE_1MENU_FUNC,
+ GdkEventButton_1sizeof_FUNC,
+ GdkEventCrossing_1sizeof_FUNC,
+ GdkEventFocus_1sizeof_FUNC,
+ GdkEventKey_1sizeof_FUNC,
+ GdkEventMotion_1sizeof_FUNC,
+ GdkEventWindowState_1sizeof_FUNC,
+ GdkEvent_1sizeof_FUNC,
+ GdkGeometry_1sizeof_FUNC,
+ GdkWindowAttr_1sizeof_FUNC,
+ GtkTargetEntry_1sizeof_FUNC,
+ gdk_1window_1new_FUNC,
+ gtk_1accel_1label_1new_FUNC,
+ gtk_1accel_1label_1set_1accel_FUNC,
+ gtk_1accel_1label_1set_1accel_1widget_FUNC,
+ gtk_1accessible_1get_1widget_FUNC,
+ gtk_1bin_1get_1child_FUNC,
+ gtk_1box_1pack_1end_FUNC,
+ gtk_1box_1reorder_1child_FUNC,
+ gtk_1box_1set_1child_1packing_FUNC,
+ gtk_1button_1set_1image_FUNC,
+ gtk_1calendar_1get_1date_FUNC,
+ gtk_1calendar_1select_1day_FUNC,
+ gtk_1calendar_1select_1month_FUNC,
+ gtk_1calendar_1set_1display_1options_FUNC,
+ gtk_1check_1menu_1item_1get_1active_FUNC,
+ gtk_1check_1menu_1item_1new_FUNC,
+ gtk_1check_1menu_1item_1set_1active_FUNC,
+ gtk_1clipboard_1clear_FUNC,
+ gtk_1clipboard_1get_FUNC,
+ gtk_1clipboard_1set_1can_1store_FUNC,
+ gtk_1clipboard_1set_1with_1owner_FUNC,
+ gtk_1clipboard_1store_FUNC,
+ gtk_1clipboard_1wait_1for_1contents_FUNC,
+ gtk_1combo_1box_1get_1wrap_1width_FUNC,
+ gtk_1combo_1box_1set_1wrap_1width_FUNC,
+ gtk_1container_1add_FUNC,
+ gtk_1container_1forall_FUNC,
+ gtk_1container_1get_1border_1width_FUNC,
+ gtk_1container_1get_1children_FUNC,
+ gtk_1container_1propagate_1draw_FUNC,
+ gtk_1container_1remove_FUNC,
+ gtk_1container_1set_1border_1width_FUNC,
+ gtk_1css_1provider_1load_1from_1data_FUNC,
+ gtk_1dialog_1run_FUNC,
+ gtk_1drag_1begin_1with_1coordinates_FUNC,
+ gtk_1drag_1check_1threshold_FUNC,
+ gtk_1drag_1dest_1set_FUNC,
+ gtk_1drag_1dest_1unset_FUNC,
+ gtk_1drag_1finish_FUNC,
+ gtk_1drag_1get_1data_FUNC,
+ gtk_1drag_1set_1icon_1surface_FUNC,
+ gtk_1editable_1copy_1clipboard_FUNC,
+ gtk_1editable_1cut_1clipboard_FUNC,
+ gtk_1editable_1paste_1clipboard_FUNC,
+ gtk_1entry_1get_1layout_FUNC,
+ gtk_1entry_1get_1layout_1offsets_FUNC,
+ gtk_1entry_1get_1text_FUNC,
+ gtk_1entry_1set_1text_FUNC,
+ gtk_1entry_1set_1width_1chars_FUNC,
+ gtk_1entry_1text_1index_1to_1layout_1index_FUNC,
+ gtk_1event_1box_1new_FUNC,
+ gtk_1event_1controller_1handle_1event_FUNC,
+ gtk_1events_1pending_FUNC,
+ gtk_1file_1chooser_1get_1filename_FUNC,
+ gtk_1file_1chooser_1get_1filenames_FUNC,
+ gtk_1file_1chooser_1get_1uri_FUNC,
+ gtk_1file_1chooser_1get_1uris_FUNC,
+ gtk_1file_1chooser_1set_1current_1folder_FUNC,
+ gtk_1file_1chooser_1set_1current_1folder_1uri_FUNC,
+ gtk_1file_1chooser_1set_1do_1overwrite_1confirmation_FUNC,
+ gtk_1file_1chooser_1set_1extra_1widget_FUNC,
+ gtk_1file_1chooser_1set_1filename_FUNC,
+ gtk_1file_1chooser_1set_1local_1only_FUNC,
+ gtk_1file_1chooser_1set_1uri_FUNC,
+ gtk_1frame_1set_1shadow_1type_FUNC,
+ gtk_1get_1current_1event_FUNC,
+ gtk_1get_1current_1event_1state_FUNC,
+ gtk_1get_1event_1widget_FUNC,
+ gtk_1grab_1add_FUNC,
+ gtk_1grab_1get_1current_FUNC,
+ gtk_1grab_1remove_FUNC,
+ gtk_1hsv_1to_1rgb_FUNC,
+ gtk_1icon_1info_1load_1icon_FUNC,
+ gtk_1icon_1theme_1get_1default_FUNC,
+ gtk_1icon_1theme_1load_1icon_FUNC,
+ gtk_1icon_1theme_1lookup_1by_1gicon_FUNC,
+ gtk_1im_1context_1filter_1keypress_FUNC,
+ gtk_1image_1new_1from_1icon_1name_FUNC,
+ gtk_1image_1new_1from_1surface_FUNC,
+ gtk_1image_1set_1from_1icon_1name_FUNC,
+ gtk_1image_1set_1from_1surface_FUNC,
+ gtk_1init_1check_FUNC,
+ gtk_1label_1set_1line_1wrap_FUNC,
+ gtk_1label_1set_1line_1wrap_1mode_FUNC,
+ gtk_1main_1do_1event_FUNC,
+ gtk_1main_1iteration_1do_FUNC,
+ gtk_1menu_1bar_1new_FUNC,
+ gtk_1menu_1item_1get_1submenu_FUNC,
+ gtk_1menu_1item_1new_FUNC,
+ gtk_1menu_1item_1set_1submenu_FUNC,
+ gtk_1menu_1new_FUNC,
+ gtk_1menu_1popdown_FUNC,
+ gtk_1menu_1popup_FUNC,
+ gtk_1menu_1popup_1at_1pointer_FUNC,
+ gtk_1menu_1popup_1at_1rect_FUNC,
+ gtk_1menu_1shell_1deactivate_FUNC,
+ gtk_1menu_1shell_1insert_FUNC,
+ gtk_1menu_1shell_1set_1take_1focus_FUNC,
+ gtk_1menu_1tool_1button_1new_FUNC,
+ gtk_1native_1dialog_1run_FUNC,
+ gtk_1radio_1button_1get_1group_FUNC,
+ gtk_1radio_1button_1new_FUNC,
+ gtk_1radio_1menu_1item_1get_1group_FUNC,
+ gtk_1radio_1menu_1item_1new_FUNC,
+ gtk_1rgb_1to_1hsv_FUNC,
+ gtk_1scrolled_1window_1get_1shadow_1type_FUNC,
+ gtk_1scrolled_1window_1new_FUNC,
+ gtk_1scrolled_1window_1set_1shadow_1type_FUNC,
+ gtk_1selection_1data_1free_FUNC,
+ gtk_1selection_1data_1get_1data_FUNC,
+ gtk_1selection_1data_1get_1data_1type_FUNC,
+ gtk_1selection_1data_1get_1format_FUNC,
+ gtk_1selection_1data_1get_1length_FUNC,
+ gtk_1selection_1data_1get_1target_FUNC,
+ gtk_1selection_1data_1set_FUNC,
+ gtk_1separator_1menu_1item_1new_FUNC,
+ gtk_1separator_1tool_1item_1new_FUNC,
+ gtk_1separator_1tool_1item_1set_1draw_FUNC,
+ gtk_1status_1icon_1get_1geometry_FUNC,
+ gtk_1status_1icon_1get_1visible_FUNC,
+ gtk_1status_1icon_1new_FUNC,
+ gtk_1status_1icon_1set_1from_1pixbuf_FUNC,
+ gtk_1status_1icon_1set_1tooltip_1text_FUNC,
+ gtk_1status_1icon_1set_1visible_FUNC,
+ gtk_1style_1context_1add_1provider_1for_1screen_FUNC,
+ gtk_1style_1context_1get_FUNC,
+ gtk_1style_1context_1get_1border_FUNC,
+ gtk_1style_1context_1get_1color_FUNC,
+ gtk_1style_1context_1get_1font_FUNC,
+ gtk_1style_1context_1get_1padding_FUNC,
+ gtk_1style_1context_1get_1parent_FUNC,
+ gtk_1style_1context_1invalidate_FUNC,
+ gtk_1target_1list_1new_FUNC,
+ gtk_1target_1list_1unref_FUNC,
+ gtk_1text_1view_1get_1window_FUNC,
+ gtk_1toggle_1button_1set_1inconsistent_FUNC,
+ gtk_1toggle_1tool_1button_1get_1active_FUNC,
+ gtk_1toggle_1tool_1button_1new_FUNC,
+ gtk_1toggle_1tool_1button_1set_1active_FUNC,
+ gtk_1tool_1button_1new_FUNC,
+ gtk_1tool_1button_1set_1icon_1widget_FUNC,
+ gtk_1tool_1button_1set_1label_1widget_FUNC,
+ gtk_1tool_1button_1set_1use_1underline_FUNC,
+ gtk_1tool_1item_1get_1proxy_1menu_1item_FUNC,
+ gtk_1tool_1item_1retrieve_1proxy_1menu_1item_FUNC,
+ gtk_1tool_1item_1set_1homogeneous_FUNC,
+ gtk_1tool_1item_1set_1is_1important_FUNC,
+ gtk_1tool_1item_1set_1proxy_1menu_1item_FUNC,
+ gtk_1toolbar_1insert_FUNC,
+ gtk_1toolbar_1new_FUNC,
+ gtk_1toolbar_1set_1icon_1size_FUNC,
+ gtk_1toolbar_1set_1show_1arrow_FUNC,
+ gtk_1toolbar_1set_1style_FUNC,
+ gtk_1tree_1view_1column_1cell_1get_1size_FUNC,
+ gtk_1tree_1view_1get_1bin_1window_FUNC,
+ gtk_1viewport_1set_1shadow_1type_FUNC,
+ gtk_1widget_1add_1accelerator_FUNC,
+ gtk_1widget_1add_1events_FUNC,
+ gtk_1widget_1destroy_FUNC,
+ gtk_1widget_1draw_FUNC,
+ gtk_1widget_1event_FUNC,
+ gtk_1widget_1get_1accessible_FUNC,
+ gtk_1widget_1get_1can_1default_FUNC,
+ gtk_1widget_1get_1clip_FUNC,
+ gtk_1widget_1get_1events_FUNC,
+ gtk_1widget_1get_1has_1window_FUNC,
+ gtk_1widget_1get_1preferred_1height_FUNC,
+ gtk_1widget_1get_1preferred_1height_1for_1width_FUNC,
+ gtk_1widget_1get_1preferred_1width_1for_1height_FUNC,
+ gtk_1widget_1get_1screen_FUNC,
+ gtk_1widget_1get_1toplevel_FUNC,
+ gtk_1widget_1get_1window_FUNC,
+ gtk_1widget_1input_1shape_1combine_1region_FUNC,
+ gtk_1widget_1override_1font_FUNC,
+ gtk_1widget_1remove_1accelerator_FUNC,
+ gtk_1widget_1reparent_FUNC,
+ gtk_1widget_1set_1allocation_FUNC,
+ gtk_1widget_1set_1can_1default_FUNC,
+ gtk_1widget_1set_1clip_FUNC,
+ gtk_1widget_1set_1double_1buffered_FUNC,
+ gtk_1widget_1set_1has_1window_FUNC,
+ gtk_1widget_1set_1parent_1window_FUNC,
+ gtk_1widget_1set_1redraw_1on_1allocate_FUNC,
+ gtk_1widget_1shape_1combine_1region_FUNC,
+ gtk_1widget_1size_1allocate_FUNC,
+ gtk_1widget_1style_1get__J_3B_3IJ_FUNC,
+ gtk_1widget_1style_1get__J_3B_3JJ_FUNC,
+ gtk_1widget_1translate_1coordinates_FUNC,
+ gtk_1window_1activate_1default_FUNC,
+ gtk_1window_1add_1accel_1group_FUNC,
+ gtk_1window_1deiconify_FUNC,
+ gtk_1window_1get_1icon_1list_FUNC,
+ gtk_1window_1get_1mnemonic_1modifier_FUNC,
+ gtk_1window_1get_1position_FUNC,
+ gtk_1window_1get_1size_FUNC,
+ gtk_1window_1iconify_FUNC,
+ gtk_1window_1move_FUNC,
+ gtk_1window_1new_FUNC,
+ gtk_1window_1remove_1accel_1group_FUNC,
+ gtk_1window_1resize_FUNC,
+ gtk_1window_1set_1attached_1to_FUNC,
+ gtk_1window_1set_1default_FUNC,
+ gtk_1window_1set_1geometry_1hints_FUNC,
+ gtk_1window_1set_1icon_1list_FUNC,
+ gtk_1window_1set_1keep_1above_FUNC,
+ gtk_1window_1set_1skip_1taskbar_1hint_FUNC,
+ gtk_1window_1set_1type_1hint_FUNC,
+ memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventButton_2J_FUNC,
+ memmove__JLorg_eclipse_swt_internal_gtk3_GdkEventKey_2J_FUNC,
+ memmove__JLorg_eclipse_swt_internal_gtk3_GtkTargetEntry_2J_FUNC,
+ memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventButton_2JJ_FUNC,
+ memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventCrossing_2JJ_FUNC,
+ memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventFocus_2JJ_FUNC,
+ memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventKey_2JJ_FUNC,
+ memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventMotion_2JJ_FUNC,
+ memmove__Lorg_eclipse_swt_internal_gtk3_GdkEventWindowState_2JJ_FUNC,
+} GTK3_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.c
new file mode 100644
index 0000000000..4447bff4cb
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.c
@@ -0,0 +1,555 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "swt.h"
+#include "gtk3_structs.h"
+
+#ifndef NO_GdkEvent
+typedef struct GdkEvent_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID type;
+} GdkEvent_FID_CACHE;
+
+GdkEvent_FID_CACHE GdkEventFc;
+
+void cacheGdkEventFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkEventFc.cached) return;
+ GdkEventFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkEventFc.type = (*env)->GetFieldID(env, GdkEventFc.clazz, "type", "I");
+ GdkEventFc.cached = 1;
+}
+
+GdkEvent *getGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct)
+{
+ if (!GdkEventFc.cached) cacheGdkEventFields(env, lpObject);
+ lpStruct->type = (GdkEventType)(*env)->GetIntField(env, lpObject, GdkEventFc.type);
+ return lpStruct;
+}
+
+void setGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct)
+{
+ if (!GdkEventFc.cached) cacheGdkEventFields(env, lpObject);
+ (*env)->SetIntField(env, lpObject, GdkEventFc.type, (jint)lpStruct->type);
+}
+#endif
+
+#ifndef NO_GdkEventButton
+typedef struct GdkEventButton_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID window, send_event, time, x, y, axes, state, button, device, x_root, y_root;
+} GdkEventButton_FID_CACHE;
+
+GdkEventButton_FID_CACHE GdkEventButtonFc;
+
+void cacheGdkEventButtonFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkEventButtonFc.cached) return;
+ cacheGdkEventFields(env, lpObject);
+ GdkEventButtonFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkEventButtonFc.window = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "window", "J");
+ GdkEventButtonFc.send_event = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "send_event", "B");
+ GdkEventButtonFc.time = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "time", "I");
+ GdkEventButtonFc.x = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "x", "D");
+ GdkEventButtonFc.y = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "y", "D");
+ GdkEventButtonFc.axes = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "axes", "J");
+ GdkEventButtonFc.state = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "state", "I");
+ GdkEventButtonFc.button = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "button", "I");
+ GdkEventButtonFc.device = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "device", "J");
+ GdkEventButtonFc.x_root = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "x_root", "D");
+ GdkEventButtonFc.y_root = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "y_root", "D");
+ GdkEventButtonFc.cached = 1;
+}
+
+GdkEventButton *getGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct)
+{
+ if (!GdkEventButtonFc.cached) cacheGdkEventButtonFields(env, lpObject);
+ getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventButtonFc.window);
+ lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventButtonFc.send_event);
+ lpStruct->time = (guint32)(*env)->GetIntField(env, lpObject, GdkEventButtonFc.time);
+ lpStruct->x = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.x);
+ lpStruct->y = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.y);
+ lpStruct->axes = (gdouble *)(*env)->GetLongField(env, lpObject, GdkEventButtonFc.axes);
+ lpStruct->state = (guint)(*env)->GetIntField(env, lpObject, GdkEventButtonFc.state);
+ lpStruct->button = (guint)(*env)->GetIntField(env, lpObject, GdkEventButtonFc.button);
+ lpStruct->device = (GdkDevice *)(*env)->GetLongField(env, lpObject, GdkEventButtonFc.device);
+ lpStruct->x_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.x_root);
+ lpStruct->y_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.y_root);
+ return lpStruct;
+}
+
+void setGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct)
+{
+ if (!GdkEventButtonFc.cached) cacheGdkEventButtonFields(env, lpObject);
+ setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ (*env)->SetLongField(env, lpObject, GdkEventButtonFc.window, (jlong)lpStruct->window);
+ (*env)->SetByteField(env, lpObject, GdkEventButtonFc.send_event, (jbyte)lpStruct->send_event);
+ (*env)->SetIntField(env, lpObject, GdkEventButtonFc.time, (jint)lpStruct->time);
+ (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.x, (jdouble)lpStruct->x);
+ (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.y, (jdouble)lpStruct->y);
+ (*env)->SetLongField(env, lpObject, GdkEventButtonFc.axes, (jlong)lpStruct->axes);
+ (*env)->SetIntField(env, lpObject, GdkEventButtonFc.state, (jint)lpStruct->state);
+ (*env)->SetIntField(env, lpObject, GdkEventButtonFc.button, (jint)lpStruct->button);
+ (*env)->SetLongField(env, lpObject, GdkEventButtonFc.device, (jlong)lpStruct->device);
+ (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.x_root, (jdouble)lpStruct->x_root);
+ (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.y_root, (jdouble)lpStruct->y_root);
+}
+#endif
+
+#ifndef NO_GdkEventCrossing
+typedef struct GdkEventCrossing_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID window, send_event, subwindow, time, x, y, x_root, y_root, mode, detail, focus, state;
+} GdkEventCrossing_FID_CACHE;
+
+GdkEventCrossing_FID_CACHE GdkEventCrossingFc;
+
+void cacheGdkEventCrossingFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkEventCrossingFc.cached) return;
+ cacheGdkEventFields(env, lpObject);
+ GdkEventCrossingFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkEventCrossingFc.window = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "window", "J");
+ GdkEventCrossingFc.send_event = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "send_event", "B");
+ GdkEventCrossingFc.subwindow = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "subwindow", "J");
+ GdkEventCrossingFc.time = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "time", "I");
+ GdkEventCrossingFc.x = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "x", "D");
+ GdkEventCrossingFc.y = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "y", "D");
+ GdkEventCrossingFc.x_root = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "x_root", "D");
+ GdkEventCrossingFc.y_root = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "y_root", "D");
+ GdkEventCrossingFc.mode = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "mode", "I");
+ GdkEventCrossingFc.detail = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "detail", "I");
+ GdkEventCrossingFc.focus = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "focus", "Z");
+ GdkEventCrossingFc.state = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "state", "I");
+ GdkEventCrossingFc.cached = 1;
+}
+
+GdkEventCrossing *getGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct)
+{
+ if (!GdkEventCrossingFc.cached) cacheGdkEventCrossingFields(env, lpObject);
+ getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventCrossingFc.window);
+ lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventCrossingFc.send_event);
+ lpStruct->subwindow = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventCrossingFc.subwindow);
+ lpStruct->time = (*env)->GetIntField(env, lpObject, GdkEventCrossingFc.time);
+ lpStruct->x = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.x);
+ lpStruct->y = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.y);
+ lpStruct->x_root = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.x_root);
+ lpStruct->y_root = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.y_root);
+ lpStruct->mode = (GdkCrossingMode)(*env)->GetIntField(env, lpObject, GdkEventCrossingFc.mode);
+ lpStruct->detail = (GdkNotifyType)(*env)->GetIntField(env, lpObject, GdkEventCrossingFc.detail);
+ lpStruct->focus = (gboolean)(*env)->GetBooleanField(env, lpObject, GdkEventCrossingFc.focus);
+ lpStruct->state = (*env)->GetIntField(env, lpObject, GdkEventCrossingFc.state);
+ return lpStruct;
+}
+
+void setGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct)
+{
+ if (!GdkEventCrossingFc.cached) cacheGdkEventCrossingFields(env, lpObject);
+ setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ (*env)->SetLongField(env, lpObject, GdkEventCrossingFc.window, (jlong)lpStruct->window);
+ (*env)->SetByteField(env, lpObject, GdkEventCrossingFc.send_event, (jbyte)lpStruct->send_event);
+ (*env)->SetLongField(env, lpObject, GdkEventCrossingFc.subwindow, (jlong)lpStruct->subwindow);
+ (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.time, (jint)lpStruct->time);
+ (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.x, (jdouble)lpStruct->x);
+ (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.y, (jdouble)lpStruct->y);
+ (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.x_root, (jdouble)lpStruct->x_root);
+ (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.y_root, (jdouble)lpStruct->y_root);
+ (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.mode, (jint)lpStruct->mode);
+ (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.detail, (jint)lpStruct->detail);
+ (*env)->SetBooleanField(env, lpObject, GdkEventCrossingFc.focus, (jboolean)lpStruct->focus);
+ (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.state, (jint)lpStruct->state);
+}
+#endif
+
+#ifndef NO_GdkEventFocus
+typedef struct GdkEventFocus_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID window, send_event, in;
+} GdkEventFocus_FID_CACHE;
+
+GdkEventFocus_FID_CACHE GdkEventFocusFc;
+
+void cacheGdkEventFocusFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkEventFocusFc.cached) return;
+ cacheGdkEventFields(env, lpObject);
+ GdkEventFocusFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkEventFocusFc.window = (*env)->GetFieldID(env, GdkEventFocusFc.clazz, "window", "J");
+ GdkEventFocusFc.send_event = (*env)->GetFieldID(env, GdkEventFocusFc.clazz, "send_event", "B");
+ GdkEventFocusFc.in = (*env)->GetFieldID(env, GdkEventFocusFc.clazz, "in", "S");
+ GdkEventFocusFc.cached = 1;
+}
+
+GdkEventFocus *getGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct)
+{
+ if (!GdkEventFocusFc.cached) cacheGdkEventFocusFields(env, lpObject);
+ getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventFocusFc.window);
+ lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventFocusFc.send_event);
+ lpStruct->in = (gint16)(*env)->GetShortField(env, lpObject, GdkEventFocusFc.in);
+ return lpStruct;
+}
+
+void setGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct)
+{
+ if (!GdkEventFocusFc.cached) cacheGdkEventFocusFields(env, lpObject);
+ setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ (*env)->SetLongField(env, lpObject, GdkEventFocusFc.window, (jlong)lpStruct->window);
+ (*env)->SetByteField(env, lpObject, GdkEventFocusFc.send_event, (jbyte)lpStruct->send_event);
+ (*env)->SetShortField(env, lpObject, GdkEventFocusFc.in, (jshort)lpStruct->in);
+}
+#endif
+
+#ifndef NO_GdkEventKey
+typedef struct GdkEventKey_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID window, send_event, time, state, keyval, length, string, hardware_keycode, group, is_modifier;
+} GdkEventKey_FID_CACHE;
+
+GdkEventKey_FID_CACHE GdkEventKeyFc;
+
+void cacheGdkEventKeyFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkEventKeyFc.cached) return;
+ cacheGdkEventFields(env, lpObject);
+ GdkEventKeyFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkEventKeyFc.window = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "window", "J");
+ GdkEventKeyFc.send_event = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "send_event", "B");
+ GdkEventKeyFc.time = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "time", "I");
+ GdkEventKeyFc.state = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "state", "I");
+ GdkEventKeyFc.keyval = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "keyval", "I");
+ GdkEventKeyFc.length = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "length", "I");
+ GdkEventKeyFc.string = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "string", "J");
+ GdkEventKeyFc.hardware_keycode = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "hardware_keycode", "S");
+ GdkEventKeyFc.group = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "group", "B");
+ GdkEventKeyFc.is_modifier = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "is_modifier", "I");
+ GdkEventKeyFc.cached = 1;
+}
+
+GdkEventKey *getGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct)
+{
+ if (!GdkEventKeyFc.cached) cacheGdkEventKeyFields(env, lpObject);
+ getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventKeyFc.window);
+ lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventKeyFc.send_event);
+ lpStruct->time = (guint32)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.time);
+ lpStruct->state = (guint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.state);
+ lpStruct->keyval = (guint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.keyval);
+ lpStruct->length = (gint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.length);
+ lpStruct->string = (gchar *)(*env)->GetLongField(env, lpObject, GdkEventKeyFc.string);
+ lpStruct->hardware_keycode = (guint16)(*env)->GetShortField(env, lpObject, GdkEventKeyFc.hardware_keycode);
+ lpStruct->group = (guint8)(*env)->GetByteField(env, lpObject, GdkEventKeyFc.group);
+ lpStruct->is_modifier = (guint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.is_modifier);
+ return lpStruct;
+}
+
+void setGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct)
+{
+ if (!GdkEventKeyFc.cached) cacheGdkEventKeyFields(env, lpObject);
+ setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ (*env)->SetLongField(env, lpObject, GdkEventKeyFc.window, (jlong)lpStruct->window);
+ (*env)->SetByteField(env, lpObject, GdkEventKeyFc.send_event, (jbyte)lpStruct->send_event);
+ (*env)->SetIntField(env, lpObject, GdkEventKeyFc.time, (jint)lpStruct->time);
+ (*env)->SetIntField(env, lpObject, GdkEventKeyFc.state, (jint)lpStruct->state);
+ (*env)->SetIntField(env, lpObject, GdkEventKeyFc.keyval, (jint)lpStruct->keyval);
+ (*env)->SetIntField(env, lpObject, GdkEventKeyFc.length, (jint)lpStruct->length);
+ (*env)->SetLongField(env, lpObject, GdkEventKeyFc.string, (jlong)lpStruct->string);
+ (*env)->SetShortField(env, lpObject, GdkEventKeyFc.hardware_keycode, (jshort)lpStruct->hardware_keycode);
+ (*env)->SetByteField(env, lpObject, GdkEventKeyFc.group, (jbyte)lpStruct->group);
+ (*env)->SetIntField(env, lpObject, GdkEventKeyFc.is_modifier, (jint)lpStruct->is_modifier);
+}
+#endif
+
+#ifndef NO_GdkEventMotion
+typedef struct GdkEventMotion_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID window, send_event, time, x, y, axes, state, is_hint, device, x_root, y_root;
+} GdkEventMotion_FID_CACHE;
+
+GdkEventMotion_FID_CACHE GdkEventMotionFc;
+
+void cacheGdkEventMotionFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkEventMotionFc.cached) return;
+ cacheGdkEventFields(env, lpObject);
+ GdkEventMotionFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkEventMotionFc.window = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "window", "J");
+ GdkEventMotionFc.send_event = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "send_event", "B");
+ GdkEventMotionFc.time = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "time", "I");
+ GdkEventMotionFc.x = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "x", "D");
+ GdkEventMotionFc.y = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "y", "D");
+ GdkEventMotionFc.axes = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "axes", "J");
+ GdkEventMotionFc.state = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "state", "I");
+ GdkEventMotionFc.is_hint = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "is_hint", "S");
+ GdkEventMotionFc.device = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "device", "J");
+ GdkEventMotionFc.x_root = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "x_root", "D");
+ GdkEventMotionFc.y_root = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "y_root", "D");
+ GdkEventMotionFc.cached = 1;
+}
+
+GdkEventMotion *getGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct)
+{
+ if (!GdkEventMotionFc.cached) cacheGdkEventMotionFields(env, lpObject);
+ getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventMotionFc.window);
+ lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventMotionFc.send_event);
+ lpStruct->time = (guint32)(*env)->GetIntField(env, lpObject, GdkEventMotionFc.time);
+ lpStruct->x = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.x);
+ lpStruct->y = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.y);
+ lpStruct->axes = (gdouble *)(*env)->GetLongField(env, lpObject, GdkEventMotionFc.axes);
+ lpStruct->state = (guint)(*env)->GetIntField(env, lpObject, GdkEventMotionFc.state);
+ lpStruct->is_hint = (gint16)(*env)->GetShortField(env, lpObject, GdkEventMotionFc.is_hint);
+ lpStruct->device = (GdkDevice *)(*env)->GetLongField(env, lpObject, GdkEventMotionFc.device);
+ lpStruct->x_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.x_root);
+ lpStruct->y_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.y_root);
+ return lpStruct;
+}
+
+void setGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct)
+{
+ if (!GdkEventMotionFc.cached) cacheGdkEventMotionFields(env, lpObject);
+ setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ (*env)->SetLongField(env, lpObject, GdkEventMotionFc.window, (jlong)lpStruct->window);
+ (*env)->SetByteField(env, lpObject, GdkEventMotionFc.send_event, (jbyte)lpStruct->send_event);
+ (*env)->SetIntField(env, lpObject, GdkEventMotionFc.time, (jint)lpStruct->time);
+ (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.x, (jdouble)lpStruct->x);
+ (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.y, (jdouble)lpStruct->y);
+ (*env)->SetLongField(env, lpObject, GdkEventMotionFc.axes, (jlong)lpStruct->axes);
+ (*env)->SetIntField(env, lpObject, GdkEventMotionFc.state, (jint)lpStruct->state);
+ (*env)->SetShortField(env, lpObject, GdkEventMotionFc.is_hint, (jshort)lpStruct->is_hint);
+ (*env)->SetLongField(env, lpObject, GdkEventMotionFc.device, (jlong)lpStruct->device);
+ (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.x_root, (jdouble)lpStruct->x_root);
+ (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.y_root, (jdouble)lpStruct->y_root);
+}
+#endif
+
+#ifndef NO_GdkEventWindowState
+typedef struct GdkEventWindowState_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID window, send_event, changed_mask, new_window_state;
+} GdkEventWindowState_FID_CACHE;
+
+GdkEventWindowState_FID_CACHE GdkEventWindowStateFc;
+
+void cacheGdkEventWindowStateFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkEventWindowStateFc.cached) return;
+ cacheGdkEventFields(env, lpObject);
+ GdkEventWindowStateFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkEventWindowStateFc.window = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "window", "J");
+ GdkEventWindowStateFc.send_event = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "send_event", "B");
+ GdkEventWindowStateFc.changed_mask = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "changed_mask", "I");
+ GdkEventWindowStateFc.new_window_state = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "new_window_state", "I");
+ GdkEventWindowStateFc.cached = 1;
+}
+
+GdkEventWindowState *getGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct)
+{
+ if (!GdkEventWindowStateFc.cached) cacheGdkEventWindowStateFields(env, lpObject);
+ getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventWindowStateFc.window);
+ lpStruct->send_event = (*env)->GetByteField(env, lpObject, GdkEventWindowStateFc.send_event);
+ lpStruct->changed_mask = (*env)->GetIntField(env, lpObject, GdkEventWindowStateFc.changed_mask);
+ lpStruct->new_window_state = (*env)->GetIntField(env, lpObject, GdkEventWindowStateFc.new_window_state);
+ return lpStruct;
+}
+
+void setGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct)
+{
+ if (!GdkEventWindowStateFc.cached) cacheGdkEventWindowStateFields(env, lpObject);
+ setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+ (*env)->SetLongField(env, lpObject, GdkEventWindowStateFc.window, (jlong)lpStruct->window);
+ (*env)->SetByteField(env, lpObject, GdkEventWindowStateFc.send_event, (jbyte)lpStruct->send_event);
+ (*env)->SetIntField(env, lpObject, GdkEventWindowStateFc.changed_mask, (jint)lpStruct->changed_mask);
+ (*env)->SetIntField(env, lpObject, GdkEventWindowStateFc.new_window_state, (jint)lpStruct->new_window_state);
+}
+#endif
+
+#ifndef NO_GdkGeometry
+typedef struct GdkGeometry_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID min_width, min_height, max_width, max_height, base_width, base_height, width_inc, height_inc, min_aspect, max_aspect, win_gravity;
+} GdkGeometry_FID_CACHE;
+
+GdkGeometry_FID_CACHE GdkGeometryFc;
+
+void cacheGdkGeometryFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkGeometryFc.cached) return;
+ GdkGeometryFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkGeometryFc.min_width = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "min_width", "I");
+ GdkGeometryFc.min_height = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "min_height", "I");
+ GdkGeometryFc.max_width = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "max_width", "I");
+ GdkGeometryFc.max_height = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "max_height", "I");
+ GdkGeometryFc.base_width = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "base_width", "I");
+ GdkGeometryFc.base_height = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "base_height", "I");
+ GdkGeometryFc.width_inc = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "width_inc", "I");
+ GdkGeometryFc.height_inc = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "height_inc", "I");
+ GdkGeometryFc.min_aspect = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "min_aspect", "D");
+ GdkGeometryFc.max_aspect = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "max_aspect", "D");
+ GdkGeometryFc.win_gravity = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "win_gravity", "I");
+ GdkGeometryFc.cached = 1;
+}
+
+GdkGeometry *getGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct)
+{
+ if (!GdkGeometryFc.cached) cacheGdkGeometryFields(env, lpObject);
+ lpStruct->min_width = (*env)->GetIntField(env, lpObject, GdkGeometryFc.min_width);
+ lpStruct->min_height = (*env)->GetIntField(env, lpObject, GdkGeometryFc.min_height);
+ lpStruct->max_width = (*env)->GetIntField(env, lpObject, GdkGeometryFc.max_width);
+ lpStruct->max_height = (*env)->GetIntField(env, lpObject, GdkGeometryFc.max_height);
+ lpStruct->base_width = (*env)->GetIntField(env, lpObject, GdkGeometryFc.base_width);
+ lpStruct->base_height = (*env)->GetIntField(env, lpObject, GdkGeometryFc.base_height);
+ lpStruct->width_inc = (*env)->GetIntField(env, lpObject, GdkGeometryFc.width_inc);
+ lpStruct->height_inc = (*env)->GetIntField(env, lpObject, GdkGeometryFc.height_inc);
+ lpStruct->min_aspect = (*env)->GetDoubleField(env, lpObject, GdkGeometryFc.min_aspect);
+ lpStruct->max_aspect = (*env)->GetDoubleField(env, lpObject, GdkGeometryFc.max_aspect);
+ lpStruct->win_gravity = (*env)->GetIntField(env, lpObject, GdkGeometryFc.win_gravity);
+ return lpStruct;
+}
+
+void setGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct)
+{
+ if (!GdkGeometryFc.cached) cacheGdkGeometryFields(env, lpObject);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.min_width, (jint)lpStruct->min_width);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.min_height, (jint)lpStruct->min_height);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.max_width, (jint)lpStruct->max_width);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.max_height, (jint)lpStruct->max_height);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.base_width, (jint)lpStruct->base_width);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.base_height, (jint)lpStruct->base_height);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.width_inc, (jint)lpStruct->width_inc);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.height_inc, (jint)lpStruct->height_inc);
+ (*env)->SetDoubleField(env, lpObject, GdkGeometryFc.min_aspect, (jdouble)lpStruct->min_aspect);
+ (*env)->SetDoubleField(env, lpObject, GdkGeometryFc.max_aspect, (jdouble)lpStruct->max_aspect);
+ (*env)->SetIntField(env, lpObject, GdkGeometryFc.win_gravity, (jint)lpStruct->win_gravity);
+}
+#endif
+
+#ifndef NO_GdkWindowAttr
+typedef struct GdkWindowAttr_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID title, event_mask, x, y, width, height, wclass, visual, window_type, cursor, wmclass_name, wmclass_class, override_redirect;
+} GdkWindowAttr_FID_CACHE;
+
+GdkWindowAttr_FID_CACHE GdkWindowAttrFc;
+
+void cacheGdkWindowAttrFields(JNIEnv *env, jobject lpObject)
+{
+ if (GdkWindowAttrFc.cached) return;
+ GdkWindowAttrFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GdkWindowAttrFc.title = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "title", "J");
+ GdkWindowAttrFc.event_mask = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "event_mask", "I");
+ GdkWindowAttrFc.x = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "x", "I");
+ GdkWindowAttrFc.y = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "y", "I");
+ GdkWindowAttrFc.width = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "width", "I");
+ GdkWindowAttrFc.height = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "height", "I");
+ GdkWindowAttrFc.wclass = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "wclass", "I");
+ GdkWindowAttrFc.visual = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "visual", "J");
+ GdkWindowAttrFc.window_type = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "window_type", "I");
+ GdkWindowAttrFc.cursor = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "cursor", "J");
+ GdkWindowAttrFc.wmclass_name = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "wmclass_name", "J");
+ GdkWindowAttrFc.wmclass_class = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "wmclass_class", "J");
+ GdkWindowAttrFc.override_redirect = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "override_redirect", "Z");
+ GdkWindowAttrFc.cached = 1;
+}
+
+GdkWindowAttr *getGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct)
+{
+ if (!GdkWindowAttrFc.cached) cacheGdkWindowAttrFields(env, lpObject);
+ lpStruct->title = (gchar *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.title);
+ lpStruct->event_mask = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.event_mask);
+ lpStruct->x = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.x);
+ lpStruct->y = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.y);
+ lpStruct->width = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.width);
+ lpStruct->height = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.height);
+ lpStruct->wclass = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.wclass);
+ lpStruct->visual = (GdkVisual *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.visual);
+ lpStruct->window_type = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.window_type);
+ lpStruct->cursor = (GdkCursor *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.cursor);
+ lpStruct->wmclass_name = (gchar *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.wmclass_name);
+ lpStruct->wmclass_class = (gchar *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.wmclass_class);
+ lpStruct->override_redirect = (*env)->GetBooleanField(env, lpObject, GdkWindowAttrFc.override_redirect);
+ return lpStruct;
+}
+
+void setGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct)
+{
+ if (!GdkWindowAttrFc.cached) cacheGdkWindowAttrFields(env, lpObject);
+ (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.title, (jlong)lpStruct->title);
+ (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.event_mask, (jint)lpStruct->event_mask);
+ (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.x, (jint)lpStruct->x);
+ (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.y, (jint)lpStruct->y);
+ (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.width, (jint)lpStruct->width);
+ (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.height, (jint)lpStruct->height);
+ (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.wclass, (jint)lpStruct->wclass);
+ (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.visual, (jlong)lpStruct->visual);
+ (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.window_type, (jint)lpStruct->window_type);
+ (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.cursor, (jlong)lpStruct->cursor);
+ (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.wmclass_name, (jlong)lpStruct->wmclass_name);
+ (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.wmclass_class, (jlong)lpStruct->wmclass_class);
+ (*env)->SetBooleanField(env, lpObject, GdkWindowAttrFc.override_redirect, (jboolean)lpStruct->override_redirect);
+}
+#endif
+
+#ifndef NO_GtkTargetEntry
+typedef struct GtkTargetEntry_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID target, flags, info;
+} GtkTargetEntry_FID_CACHE;
+
+GtkTargetEntry_FID_CACHE GtkTargetEntryFc;
+
+void cacheGtkTargetEntryFields(JNIEnv *env, jobject lpObject)
+{
+ if (GtkTargetEntryFc.cached) return;
+ GtkTargetEntryFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ GtkTargetEntryFc.target = (*env)->GetFieldID(env, GtkTargetEntryFc.clazz, "target", "J");
+ GtkTargetEntryFc.flags = (*env)->GetFieldID(env, GtkTargetEntryFc.clazz, "flags", "I");
+ GtkTargetEntryFc.info = (*env)->GetFieldID(env, GtkTargetEntryFc.clazz, "info", "I");
+ GtkTargetEntryFc.cached = 1;
+}
+
+GtkTargetEntry *getGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct)
+{
+ if (!GtkTargetEntryFc.cached) cacheGtkTargetEntryFields(env, lpObject);
+ lpStruct->target = (gchar *)(*env)->GetLongField(env, lpObject, GtkTargetEntryFc.target);
+ lpStruct->flags = (guint)(*env)->GetIntField(env, lpObject, GtkTargetEntryFc.flags);
+ lpStruct->info = (guint)(*env)->GetIntField(env, lpObject, GtkTargetEntryFc.info);
+ return lpStruct;
+}
+
+void setGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct)
+{
+ if (!GtkTargetEntryFc.cached) cacheGtkTargetEntryFields(env, lpObject);
+ (*env)->SetLongField(env, lpObject, GtkTargetEntryFc.target, (jlong)lpStruct->target);
+ (*env)->SetIntField(env, lpObject, GtkTargetEntryFc.flags, (jint)lpStruct->flags);
+ (*env)->SetIntField(env, lpObject, GtkTargetEntryFc.info, (jint)lpStruct->info);
+}
+#endif
+
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.h
new file mode 100644
index 0000000000..bd9409f108
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_structs.h
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "gtk3.h"
+
+#ifndef NO_GdkEvent
+void cacheGdkEventFields(JNIEnv *env, jobject lpObject);
+GdkEvent *getGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct);
+void setGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct);
+#define GdkEvent_sizeof() sizeof(GdkEvent)
+#else
+#define cacheGdkEventFields(a,b)
+#define getGdkEventFields(a,b,c) NULL
+#define setGdkEventFields(a,b,c)
+#define GdkEvent_sizeof() 0
+#endif
+
+#ifndef NO_GdkEventButton
+void cacheGdkEventButtonFields(JNIEnv *env, jobject lpObject);
+GdkEventButton *getGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct);
+void setGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct);
+#define GdkEventButton_sizeof() sizeof(GdkEventButton)
+#else
+#define cacheGdkEventButtonFields(a,b)
+#define getGdkEventButtonFields(a,b,c) NULL
+#define setGdkEventButtonFields(a,b,c)
+#define GdkEventButton_sizeof() 0
+#endif
+
+#ifndef NO_GdkEventCrossing
+void cacheGdkEventCrossingFields(JNIEnv *env, jobject lpObject);
+GdkEventCrossing *getGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct);
+void setGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct);
+#define GdkEventCrossing_sizeof() sizeof(GdkEventCrossing)
+#else
+#define cacheGdkEventCrossingFields(a,b)
+#define getGdkEventCrossingFields(a,b,c) NULL
+#define setGdkEventCrossingFields(a,b,c)
+#define GdkEventCrossing_sizeof() 0
+#endif
+
+#ifndef NO_GdkEventFocus
+void cacheGdkEventFocusFields(JNIEnv *env, jobject lpObject);
+GdkEventFocus *getGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct);
+void setGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct);
+#define GdkEventFocus_sizeof() sizeof(GdkEventFocus)
+#else
+#define cacheGdkEventFocusFields(a,b)
+#define getGdkEventFocusFields(a,b,c) NULL
+#define setGdkEventFocusFields(a,b,c)
+#define GdkEventFocus_sizeof() 0
+#endif
+
+#ifndef NO_GdkEventKey
+void cacheGdkEventKeyFields(JNIEnv *env, jobject lpObject);
+GdkEventKey *getGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct);
+void setGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct);
+#define GdkEventKey_sizeof() sizeof(GdkEventKey)
+#else
+#define cacheGdkEventKeyFields(a,b)
+#define getGdkEventKeyFields(a,b,c) NULL
+#define setGdkEventKeyFields(a,b,c)
+#define GdkEventKey_sizeof() 0
+#endif
+
+#ifndef NO_GdkEventMotion
+void cacheGdkEventMotionFields(JNIEnv *env, jobject lpObject);
+GdkEventMotion *getGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct);
+void setGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct);
+#define GdkEventMotion_sizeof() sizeof(GdkEventMotion)
+#else
+#define cacheGdkEventMotionFields(a,b)
+#define getGdkEventMotionFields(a,b,c) NULL
+#define setGdkEventMotionFields(a,b,c)
+#define GdkEventMotion_sizeof() 0
+#endif
+
+#ifndef NO_GdkEventWindowState
+void cacheGdkEventWindowStateFields(JNIEnv *env, jobject lpObject);
+GdkEventWindowState *getGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct);
+void setGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct);
+#define GdkEventWindowState_sizeof() sizeof(GdkEventWindowState)
+#else
+#define cacheGdkEventWindowStateFields(a,b)
+#define getGdkEventWindowStateFields(a,b,c) NULL
+#define setGdkEventWindowStateFields(a,b,c)
+#define GdkEventWindowState_sizeof() 0
+#endif
+
+#ifndef NO_GdkGeometry
+void cacheGdkGeometryFields(JNIEnv *env, jobject lpObject);
+GdkGeometry *getGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct);
+void setGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct);
+#define GdkGeometry_sizeof() sizeof(GdkGeometry)
+#else
+#define cacheGdkGeometryFields(a,b)
+#define getGdkGeometryFields(a,b,c) NULL
+#define setGdkGeometryFields(a,b,c)
+#define GdkGeometry_sizeof() 0
+#endif
+
+#ifndef NO_GdkWindowAttr
+void cacheGdkWindowAttrFields(JNIEnv *env, jobject lpObject);
+GdkWindowAttr *getGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct);
+void setGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct);
+#define GdkWindowAttr_sizeof() sizeof(GdkWindowAttr)
+#else
+#define cacheGdkWindowAttrFields(a,b)
+#define getGdkWindowAttrFields(a,b,c) NULL
+#define setGdkWindowAttrFields(a,b,c)
+#define GdkWindowAttr_sizeof() 0
+#endif
+
+#ifndef NO_GtkTargetEntry
+void cacheGtkTargetEntryFields(JNIEnv *env, jobject lpObject);
+GtkTargetEntry *getGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct);
+void setGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct);
+#define GtkTargetEntry_sizeof() sizeof(GtkTargetEntry)
+#else
+#define cacheGtkTargetEntryFields(a,b)
+#define getGtkTargetEntryFields(a,b,c) NULL
+#define setGtkTargetEntryFields(a,b,c)
+#define GtkTargetEntry_sizeof() 0
+#endif
+
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
new file mode 100644
index 0000000000..2e23672cf5
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
@@ -0,0 +1,1497 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "swt.h"
+#include "gtk4_structs.h"
+#include "gtk4_stats.h"
+#include "os_structs.h"
+
+#ifndef GTK4_NATIVE
+#define GTK4_NATIVE(func) Java_org_eclipse_swt_internal_gtk4_GTK4_##func
+#endif
+
+#ifndef NO_gdk_1content_1formats_1builder_1add_1mime_1type
+JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1content_1formats_1builder_1add_1mime_1type)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gdk_1content_1formats_1builder_1add_1mime_1type_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gdk_content_formats_builder_add_mime_type((GdkContentFormatsBuilder *)arg0, (const char *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gdk_1content_1formats_1builder_1add_1mime_1type_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1content_1formats_1builder_1free_1to_1formats
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gdk_1content_1formats_1builder_1free_1to_1formats)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gdk_1content_1formats_1builder_1free_1to_1formats_FUNC);
+ rc = (jlong)gdk_content_formats_builder_free_to_formats((GdkContentFormatsBuilder *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gdk_1content_1formats_1builder_1free_1to_1formats_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1content_1formats_1builder_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gdk_1content_1formats_1builder_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gdk_1content_1formats_1builder_1new_FUNC);
+ rc = (jlong)gdk_content_formats_builder_new();
+ GTK4_NATIVE_EXIT(env, that, gdk_1content_1formats_1builder_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1toplevel_1focus
+JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1toplevel_1focus)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gdk_1toplevel_1focus_FUNC);
+ gdk_toplevel_focus((GdkToplevel *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gdk_1toplevel_1focus_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1toplevel_1get_1state
+JNIEXPORT jint JNICALL GTK4_NATIVE(gdk_1toplevel_1get_1state)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gdk_1toplevel_1get_1state_FUNC);
+ rc = (jint)gdk_toplevel_get_state((GdkToplevel *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gdk_1toplevel_1get_1state_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1toplevel_1lower
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gdk_1toplevel_1lower)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gdk_1toplevel_1lower_FUNC);
+ rc = (jboolean)gdk_toplevel_lower((GdkToplevel *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gdk_1toplevel_1lower_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1toplevel_1set_1icon_1list
+JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1toplevel_1set_1icon_1list)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gdk_1toplevel_1set_1icon_1list_FUNC);
+ gdk_toplevel_set_icon_list((GdkToplevel *)arg0, (GList *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gdk_1toplevel_1set_1icon_1list_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1toplevel_1size_1get_1bounds
+JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1toplevel_1size_1get_1bounds)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ GTK4_NATIVE_ENTER(env, that, gdk_1toplevel_1size_1get_1bounds_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gdk_toplevel_size_get_bounds((GdkToplevelSize*)arg0, (int *)lparg1, (int *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gdk_1toplevel_1size_1get_1bounds_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1toplevel_1size_1set_1min_1size
+JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1toplevel_1size_1set_1min_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+{
+ GTK4_NATIVE_ENTER(env, that, gdk_1toplevel_1size_1set_1min_1size_FUNC);
+ gdk_toplevel_size_set_min_size((GdkToplevelSize*)arg0, (int)arg1, (int)arg2);
+ GTK4_NATIVE_EXIT(env, that, gdk_1toplevel_1size_1set_1min_1size_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1toplevel_1size_1set_1size
+JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1toplevel_1size_1set_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+{
+ GTK4_NATIVE_ENTER(env, that, gdk_1toplevel_1size_1set_1size_FUNC);
+ gdk_toplevel_size_set_size((GdkToplevelSize*)arg0, (int)arg1, (int)arg2);
+ GTK4_NATIVE_EXIT(env, that, gdk_1toplevel_1size_1set_1size_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1box_1append
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1box_1append)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1box_1append_FUNC);
+ gtk_box_append((GtkBox *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1box_1append_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1box_1insert_1child_1after
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1box_1insert_1child_1after)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1box_1insert_1child_1after_FUNC);
+ gtk_box_insert_child_after((GtkBox *)arg0, (GtkWidget *)arg1, (GtkWidget *)arg2);
+ GTK4_NATIVE_EXIT(env, that, gtk_1box_1insert_1child_1after_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1box_1prepend
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1box_1prepend)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1box_1prepend_FUNC);
+ gtk_box_prepend((GtkBox *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1box_1prepend_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1button_1new_1from_1icon_1name
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1button_1new_1from_1icon_1name)
+ (JNIEnv *env, jclass that, jbyteArray arg0)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1button_1new_1from_1icon_1name_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_button_new_from_icon_name((const gchar *)lparg0);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1button_1new_1from_1icon_1name_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1button_1set_1child
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1button_1set_1child)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1button_1set_1child_FUNC);
+ gtk_button_set_child((GtkButton *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1button_1set_1child_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1get_1date
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1calendar_1get_1date)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1calendar_1get_1date_FUNC);
+ rc = (jlong)gtk_calendar_get_date((GtkCalendar *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1calendar_1get_1date_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1select_1day
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1calendar_1select_1day)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1calendar_1select_1day_FUNC);
+ gtk_calendar_select_day((GtkCalendar *)arg0, (GDateTime *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1calendar_1select_1day_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1set_1show_1day_1names
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1calendar_1set_1show_1day_1names)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1calendar_1set_1show_1day_1names_FUNC);
+ gtk_calendar_set_show_day_names((GtkCalendar *)arg0, (gboolean)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1calendar_1set_1show_1day_1names_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1set_1show_1heading
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1calendar_1set_1show_1heading)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1calendar_1set_1show_1heading_FUNC);
+ gtk_calendar_set_show_heading((GtkCalendar *)arg0, (gboolean)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1calendar_1set_1show_1heading_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1calendar_1set_1show_1week_1numbers
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1calendar_1set_1show_1week_1numbers)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1calendar_1set_1show_1week_1numbers_FUNC);
+ gtk_calendar_set_show_week_numbers((GtkCalendar *)arg0, (gboolean)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1calendar_1set_1show_1week_1numbers_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1check_1button_1get_1active
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1check_1button_1get_1active)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1check_1button_1get_1active_FUNC);
+ rc = (jboolean)gtk_check_button_get_active((GtkCheckButton *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1check_1button_1get_1active_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1check_1button_1set_1active
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1check_1button_1set_1active)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1check_1button_1set_1active_FUNC);
+ gtk_check_button_set_active((GtkCheckButton *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1check_1button_1set_1active_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1check_1button_1set_1group
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1check_1button_1set_1group)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1check_1button_1set_1group_FUNC);
+ gtk_check_button_set_group((GtkCheckButton *)arg0, (GtkCheckButton *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1check_1button_1set_1group_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1check_1button_1set_1inconsistent
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1check_1button_1set_1inconsistent)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1check_1button_1set_1inconsistent_FUNC);
+ gtk_check_button_set_inconsistent((GtkCheckButton *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1check_1button_1set_1inconsistent_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1check_1button_1set_1use_1underline
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1check_1button_1set_1use_1underline)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1check_1button_1set_1use_1underline_FUNC);
+ gtk_check_button_set_use_underline((GtkCheckButton *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1check_1button_1set_1use_1underline_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1combo_1box_1get_1child
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1combo_1box_1get_1child)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1combo_1box_1get_1child_FUNC);
+ rc = (jlong)gtk_combo_box_get_child((GtkComboBox *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1combo_1box_1get_1child_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1css_1provider_1load_1from_1data
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1css_1provider_1load_1from_1data)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
+{
+ jbyte *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1css_1provider_1load_1from_1data_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_css_provider_load_from_data((GtkCssProvider *)arg0, (const gchar *)lparg1, (gssize)arg2);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1css_1provider_1load_1from_1data_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1drag_1source_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1drag_1source_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1drag_1source_1new_FUNC);
+ rc = (jlong)gtk_drag_source_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1drag_1source_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1drag_1source_1set_1actions
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1drag_1source_1set_1actions)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1drag_1source_1set_1actions_FUNC);
+ gtk_drag_source_set_actions((GtkDragSource *)arg0, (GdkDragAction)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1drag_1source_1set_1actions_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1drag_1source_1set_1icon
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1drag_1source_1set_1icon)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1drag_1source_1set_1icon_FUNC);
+ gtk_drag_source_set_icon((GtkDragSource *)arg0, (GdkPaintable *)arg1, arg2, arg3);
+ GTK4_NATIVE_EXIT(env, that, gtk_1drag_1source_1set_1icon_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1drop_1target_1async_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1drop_1target_1async_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1drop_1target_1async_1new_FUNC);
+ rc = (jlong)gtk_drop_target_async_new((GdkContentFormats *)arg0, (GdkDragAction)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1drop_1target_1async_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1drop_1target_1async_1set_1formats
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1drop_1target_1async_1set_1formats)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1drop_1target_1async_1set_1formats_FUNC);
+ gtk_drop_target_async_set_formats((GtkDropTargetAsync *)arg0, (GdkContentFormats *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1drop_1target_1async_1set_1formats_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1editable_1get_1delegate
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1editable_1get_1delegate)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1editable_1get_1delegate_FUNC);
+ rc = (jlong)gtk_editable_get_delegate((GtkEditable *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1editable_1get_1delegate_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1editable_1get_1text
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1editable_1get_1text)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1editable_1get_1text_FUNC);
+ rc = (jlong)gtk_editable_get_text((GtkEditable *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1editable_1get_1text_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1entry_1get_1buffer
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1entry_1get_1buffer)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1entry_1get_1buffer_FUNC);
+ rc = (jlong)gtk_entry_get_buffer((GtkEntry *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1entry_1get_1buffer_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1entry_1get_1text_1length
+JNIEXPORT jint JNICALL GTK4_NATIVE(gtk_1entry_1get_1text_1length)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1entry_1get_1text_1length_FUNC);
+ rc = (jint)gtk_entry_get_text_length((GtkEntry *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1entry_1get_1text_1length_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1entry_1set_1buffer
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1entry_1set_1buffer)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1entry_1set_1buffer_FUNC);
+ gtk_entry_set_buffer((GtkEntry *)arg0, (GtkEntryBuffer *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1entry_1set_1buffer_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1event_1controller_1focus_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1event_1controller_1focus_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1event_1controller_1focus_1new_FUNC);
+ rc = (jlong)gtk_event_controller_focus_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1event_1controller_1focus_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1event_1controller_1get_1current_1event
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1event_1controller_1get_1current_1event)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1event_1controller_1get_1current_1event_FUNC);
+ rc = (jlong)gtk_event_controller_get_current_event((GtkEventController *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1event_1controller_1get_1current_1event_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1event_1controller_1get_1current_1event_1state
+JNIEXPORT jint JNICALL GTK4_NATIVE(gtk_1event_1controller_1get_1current_1event_1state)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1event_1controller_1get_1current_1event_1state_FUNC);
+ rc = (jint)gtk_event_controller_get_current_event_state((GtkEventController *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1event_1controller_1get_1current_1event_1state_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1event_1controller_1key_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1event_1controller_1key_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1event_1controller_1key_1new_FUNC);
+ rc = (jlong)gtk_event_controller_key_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1event_1controller_1key_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1event_1controller_1motion_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1event_1controller_1motion_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1event_1controller_1motion_1new_FUNC);
+ rc = (jlong)gtk_event_controller_motion_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1event_1controller_1motion_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1event_1controller_1scroll_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1event_1controller_1scroll_1new)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1event_1controller_1scroll_1new_FUNC);
+ rc = (jlong)gtk_event_controller_scroll_new((GtkEventControllerScrollFlags)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1event_1controller_1scroll_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1expander_1set_1child
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1expander_1set_1child)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1expander_1set_1child_FUNC);
+ gtk_expander_set_child((GtkExpander *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1expander_1set_1child_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1get_1file
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1chooser_1get_1file)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1file_FUNC);
+ rc = (jlong)gtk_file_chooser_get_file((GtkFileChooser *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1file_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1get_1files
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1chooser_1get_1files)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1files_FUNC);
+ rc = (jlong)gtk_file_chooser_get_files((GtkFileChooser *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1files_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1current_1folder
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1file_1chooser_1set_1current_1folder)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1current_1folder_FUNC);
+ rc = (jboolean)gtk_file_chooser_set_current_folder((GtkFileChooser *)arg0, (GFile *)arg1, (GError **)arg2);
+ GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1current_1folder_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1file_1chooser_1set_1file
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1file_1chooser_1set_1file)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1file_FUNC);
+ rc = (jboolean)gtk_file_chooser_set_file((GtkFileChooser *)arg0, (GFile *)arg1, (GError **)arg2);
+ GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1file_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1frame_1set_1child
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1frame_1set_1child)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1frame_1set_1child_FUNC);
+ gtk_frame_set_child((GtkFrame *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1frame_1set_1child_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1gesture_1click_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1gesture_1click_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1gesture_1click_1new_FUNC);
+ rc = (jlong)gtk_gesture_click_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1gesture_1click_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1hsv_1to_1rgb
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1hsv_1to_1rgb)
+ (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloatArray arg3, jfloatArray arg4, jfloatArray arg5)
+{
+ jfloat *lparg3=NULL;
+ jfloat *lparg4=NULL;
+ jfloat *lparg5=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1hsv_1to_1rgb_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetFloatArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetFloatArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetFloatArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ gtk_hsv_to_rgb(arg0, arg1, arg2, (float *)lparg3, (float *)lparg4, (float *)lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseFloatArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseFloatArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseFloatArrayElements(env, arg3, lparg3, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1hsv_1to_1rgb_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1icon_1paintable_1get_1file
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1icon_1paintable_1get_1file)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1icon_1paintable_1get_1file_FUNC);
+ rc = (jlong)gtk_icon_paintable_get_file((GtkIconPaintable *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1icon_1paintable_1get_1file_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1icon_1theme_1get_1for_1display
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1icon_1theme_1get_1for_1display)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1icon_1theme_1get_1for_1display_FUNC);
+ rc = (jlong)gtk_icon_theme_get_for_display((GdkDisplay *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1icon_1theme_1get_1for_1display_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1icon_1theme_1lookup_1by_1gicon
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1icon_1theme_1lookup_1by_1gicon)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
+ rc = (jlong)gtk_icon_theme_lookup_by_gicon((GtkIconTheme *)arg0, (GIcon *)arg1, arg2, arg3, (GtkTextDirection)arg4, (GtkIconLookupFlags)arg5);
+ GTK4_NATIVE_EXIT(env, that, gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1icon_1theme_1lookup_1icon
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1icon_1theme_1lookup_1icon)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jint arg3, jint arg4, jint arg5, jint arg6)
+{
+ jbyte *lparg1=NULL;
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1icon_1theme_1lookup_1icon_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_icon_theme_lookup_icon((GtkIconTheme *)arg0, (const char *)lparg1, (const char **)arg2, arg3, arg4, (GtkTextDirection)arg5, (GtkIconLookupFlags)arg6);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1icon_1theme_1lookup_1icon_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1im_1context_1filter_1keypress
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1im_1context_1filter_1keypress)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1im_1context_1filter_1keypress_FUNC);
+ rc = (jboolean)gtk_im_context_filter_keypress((GtkIMContext *)arg0, (GdkEvent *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1im_1context_1filter_1keypress_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1image_1clear
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1image_1clear)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1image_1clear_FUNC);
+ gtk_image_clear((GtkImage *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1image_1clear_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1image_1new_1from_1icon_1name
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1image_1new_1from_1icon_1name)
+ (JNIEnv *env, jclass that, jbyteArray arg0)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1image_1new_1from_1icon_1name_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_image_new_from_icon_name((const char *)lparg0);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1image_1new_1from_1icon_1name_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1image_1set_1from_1paintable
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1image_1set_1from_1paintable)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1image_1set_1from_1paintable_FUNC);
+ gtk_image_set_from_paintable((GtkImage *)arg0, (GdkPaintable *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1image_1set_1from_1paintable_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1init_1check
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1init_1check)
+ (JNIEnv *env, jclass that)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1init_1check_FUNC);
+ rc = (jboolean)gtk_init_check();
+ GTK4_NATIVE_EXIT(env, that, gtk_1init_1check_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1keyval_1trigger_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1keyval_1trigger_1new)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1keyval_1trigger_1new_FUNC);
+ rc = (jlong)gtk_keyval_trigger_new((guint)arg0, (GdkModifierType)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1keyval_1trigger_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1label_1set_1wrap
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1label_1set_1wrap)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1label_1set_1wrap_FUNC);
+ gtk_label_set_wrap((GtkLabel *)arg0, (gboolean)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1label_1set_1wrap_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1label_1set_1wrap_1mode
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1label_1set_1wrap_1mode)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1label_1set_1wrap_1mode_FUNC);
+ gtk_label_set_wrap_mode((GtkLabel *)arg0, (PangoWrapMode)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1label_1set_1wrap_1mode_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1button_1set_1use_1underline
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1menu_1button_1set_1use_1underline)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1menu_1button_1set_1use_1underline_FUNC);
+ gtk_menu_button_set_use_underline((GtkMenuButton *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1menu_1button_1set_1use_1underline_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1named_1action_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1named_1action_1new)
+ (JNIEnv *env, jclass that, jbyteArray arg0)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1named_1action_1new_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)gtk_named_action_new((const char *)lparg0);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1named_1action_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1native_1get_1surface
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1native_1get_1surface)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1native_1get_1surface_FUNC);
+ rc = (jlong)gtk_native_get_surface((GtkNative *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1native_1get_1surface_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1picture_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1picture_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1picture_1new_FUNC);
+ rc = (jlong)gtk_picture_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1picture_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1picture_1set_1can_1shrink
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1picture_1set_1can_1shrink)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1picture_1set_1can_1shrink_FUNC);
+ gtk_picture_set_can_shrink((GtkPicture *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1picture_1set_1can_1shrink_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1picture_1set_1paintable
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1picture_1set_1paintable)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1picture_1set_1paintable_FUNC);
+ gtk_picture_set_paintable((GtkPicture *)arg0, (GdkPaintable *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1picture_1set_1paintable_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1popover_1menu_1bar_1new_1from_1model
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1popover_1menu_1bar_1new_1from_1model)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1popover_1menu_1bar_1new_1from_1model_FUNC);
+ rc = (jlong)gtk_popover_menu_bar_new_from_model((GMenuModel *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1popover_1menu_1bar_1new_1from_1model_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1popover_1menu_1new_1from_1model_1full
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1popover_1menu_1new_1from_1model_1full)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1popover_1menu_1new_1from_1model_1full_FUNC);
+ rc = (jlong)gtk_popover_menu_new_from_model_full((GMenuModel *)arg0, (GtkPopoverMenuFlags)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1popover_1menu_1new_1from_1model_1full_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1popover_1menu_1set_1menu_1model
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1popover_1menu_1set_1menu_1model)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1popover_1menu_1set_1menu_1model_FUNC);
+ gtk_popover_menu_set_menu_model((GtkPopoverMenu *)arg0, (GMenuModel *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1popover_1menu_1set_1menu_1model_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1popover_1set_1has_1arrow
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1popover_1set_1has_1arrow)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1popover_1set_1has_1arrow_FUNC);
+ gtk_popover_set_has_arrow((GtkPopover *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1popover_1set_1has_1arrow_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1rgb_1to_1hsv
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1rgb_1to_1hsv)
+ (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloatArray arg3, jfloatArray arg4, jfloatArray arg5)
+{
+ jfloat *lparg3=NULL;
+ jfloat *lparg4=NULL;
+ jfloat *lparg5=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1rgb_1to_1hsv_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetFloatArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetFloatArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetFloatArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ gtk_rgb_to_hsv(arg0, arg1, arg2, (float *)lparg3, (float *)lparg4, (float *)lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseFloatArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseFloatArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseFloatArrayElements(env, arg3, lparg3, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1rgb_1to_1hsv_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1scrollbar_1get_1adjustment
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1scrollbar_1get_1adjustment)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1scrollbar_1get_1adjustment_FUNC);
+ rc = (jlong)gtk_scrollbar_get_adjustment((GtkScrollbar *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1scrollbar_1get_1adjustment_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1scrolled_1window_1get_1has_1frame
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1scrolled_1window_1get_1has_1frame)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1has_1frame_FUNC);
+ rc = (jboolean)gtk_scrolled_window_get_has_frame((GtkScrolledWindow *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1has_1frame_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1scrolled_1window_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1scrolled_1window_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1new_FUNC);
+ rc = (jlong)gtk_scrolled_window_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1scrolled_1window_1set_1child
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1scrolled_1window_1set_1child)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1set_1child_FUNC);
+ gtk_scrolled_window_set_child((GtkScrolledWindow *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1set_1child_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1scrolled_1window_1set_1has_1frame
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1scrolled_1window_1set_1has_1frame)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1set_1has_1frame_FUNC);
+ gtk_scrolled_window_set_has_frame((GtkScrolledWindow *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1set_1has_1frame_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1shortcut_1controller_1add_1shortcut
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1shortcut_1controller_1add_1shortcut)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1shortcut_1controller_1add_1shortcut_FUNC);
+ gtk_shortcut_controller_add_shortcut((GtkShortcutController *)arg0, (GtkShortcut *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1shortcut_1controller_1add_1shortcut_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1shortcut_1controller_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1shortcut_1controller_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1shortcut_1controller_1new_FUNC);
+ rc = (jlong)gtk_shortcut_controller_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1shortcut_1controller_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1shortcut_1controller_1remove_1shortcut
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1shortcut_1controller_1remove_1shortcut)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1shortcut_1controller_1remove_1shortcut_FUNC);
+ gtk_shortcut_controller_remove_shortcut((GtkShortcutController *)arg0, (GtkShortcut *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1shortcut_1controller_1remove_1shortcut_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1shortcut_1controller_1set_1scope
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1shortcut_1controller_1set_1scope)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1shortcut_1controller_1set_1scope_FUNC);
+ gtk_shortcut_controller_set_scope((GtkShortcutController *)arg0, (GtkShortcutScope)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1shortcut_1controller_1set_1scope_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1shortcut_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1shortcut_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1shortcut_1new_FUNC);
+ rc = (jlong)gtk_shortcut_new((GtkShortcutTrigger *)arg0, (GtkShortcutAction *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1shortcut_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1snapshot_1append_1cairo
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1snapshot_1append_1cairo)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1snapshot_1append_1cairo_FUNC);
+ rc = (jlong)gtk_snapshot_append_cairo((GtkSnapshot *)arg0, (const graphene_rect_t *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1snapshot_1append_1cairo_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1add_1provider_1for_1display
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1style_1context_1add_1provider_1for_1display)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1provider_1for_1display_FUNC);
+ gtk_style_context_add_provider_for_display((GdkDisplay *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
+ GTK4_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1provider_1for_1display_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1border
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1style_1context_1get_1border)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GtkBorder _arg1, *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1border_FUNC);
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+ gtk_style_context_get_border((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
+fail:
+ if (arg1 && lparg1) setGtkBorderFields(env, arg1, lparg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1border_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1color
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1style_1context_1get_1color)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GdkRGBA _arg1, *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1color_FUNC);
+ if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
+ gtk_style_context_get_color((GtkStyleContext *)arg0, (GdkRGBA *)lparg1);
+fail:
+ if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1color_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1margin
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1style_1context_1get_1margin)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GtkBorder _arg1, *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1margin_FUNC);
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+ gtk_style_context_get_margin((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
+fail:
+ if (arg1 && lparg1) setGtkBorderFields(env, arg1, lparg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1margin_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1style_1context_1get_1padding
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1style_1context_1get_1padding)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GtkBorder _arg1, *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1style_1context_1get_1padding_FUNC);
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+ gtk_style_context_get_padding((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
+fail:
+ if (arg1 && lparg1) setGtkBorderFields(env, arg1, lparg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1style_1context_1get_1padding_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1text_1get_1buffer
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1text_1get_1buffer)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1text_1get_1buffer_FUNC);
+ rc = (jlong)gtk_text_get_buffer((GtkText *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1text_1get_1buffer_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1text_1set_1placeholder_1text
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1text_1set_1placeholder_1text)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1text_1set_1placeholder_1text_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_text_set_placeholder_text((GtkText *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1text_1set_1placeholder_1text_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1text_1set_1tabs
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1text_1set_1tabs)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1text_1set_1tabs_FUNC);
+ gtk_text_set_tabs((GtkText *)arg0, (PangoTabArray *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1text_1set_1tabs_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1text_1set_1visibility
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1text_1set_1visibility)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1text_1set_1visibility_FUNC);
+ gtk_text_set_visibility((GtkText *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1text_1set_1visibility_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1view_1column_1cell_1get_1size
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1tree_1view_1column_1cell_1get_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2, jintArray arg3, jintArray arg4)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ jint *lparg3=NULL;
+ jint *lparg4=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1cell_1get_1size_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ gtk_tree_view_column_cell_get_size((GtkTreeViewColumn *)arg0, (int *)lparg1, (int *)lparg2, (int *)lparg3, (int *)lparg4);
+fail:
+ if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1cell_1get_1size_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1action_1set_1enabled
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1action_1set_1enabled)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jboolean arg2)
+{
+ jbyte *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1action_1set_1enabled_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_widget_action_set_enabled((GtkWidget *)arg0, (const char *)lparg1, arg2);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1action_1set_1enabled_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1activate_1action
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1widget_1activate_1action)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
+{
+ jbyte *lparg1=NULL;
+ jbyte *lparg2=NULL;
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1activate_1action_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jboolean)gtk_widget_activate_action((GtkWidget *)arg0, (const char *)lparg1, (const char *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1activate_1action_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1add_1controller
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1add_1controller)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1add_1controller_FUNC);
+ gtk_widget_add_controller((GtkWidget *)arg0, (GtkEventController *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1add_1controller_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1class_1add_1binding_1signal
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1class_1add_1binding_1signal)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jbyteArray arg3, jbyteArray arg4, jboolean arg5, jboolean arg6, jboolean arg7)
+{
+ jbyte *lparg3=NULL;
+ jbyte *lparg4=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1class_1add_1binding_1signal_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ gtk_widget_class_add_binding_signal((GtkWidgetClass *)arg0, arg1, (GdkModifierType)arg2, (const char *)lparg3, (const char *)lparg4, arg5, arg6, arg7);
+fail:
+ if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1class_1add_1binding_1signal_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1clipboard
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1widget_1get_1clipboard)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1clipboard_FUNC);
+ rc = (jlong)gtk_widget_get_clipboard((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1clipboard_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1first_1child
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1widget_1get_1first_1child)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1first_1child_FUNC);
+ rc = (jlong)gtk_widget_get_first_child((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1first_1child_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1last_1child
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1widget_1get_1last_1child)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1last_1child_FUNC);
+ rc = (jlong)gtk_widget_get_last_child((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1last_1child_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1native
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1widget_1get_1native)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1native_FUNC);
+ rc = (jlong)gtk_widget_get_native((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1native_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1next_1sibling
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1widget_1get_1next_1sibling)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1next_1sibling_FUNC);
+ rc = (jlong)gtk_widget_get_next_sibling((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1next_1sibling_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1prev_1sibling
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1widget_1get_1prev_1sibling)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1prev_1sibling_FUNC);
+ rc = (jlong)gtk_widget_get_prev_sibling((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1prev_1sibling_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1receives_1default
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1widget_1get_1receives_1default)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1receives_1default_FUNC);
+ rc = (jboolean)gtk_widget_get_receives_default((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1receives_1default_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1get_1root
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1widget_1get_1root)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1get_1root_FUNC);
+ rc = (jlong)gtk_widget_get_root((GtkWidget *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1get_1root_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1widget_1measure
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1measure)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5, jintArray arg6)
+{
+ jint *lparg3=NULL;
+ jint *lparg4=NULL;
+ jint *lparg5=NULL;
+ jint *lparg6=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1measure_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
+ gtk_widget_measure((GtkWidget *)arg0, (GtkOrientation)arg1, (int)arg2, (int *)lparg3, (int *)lparg4, (int *)lparg5, (int *)lparg6);
+fail:
+ if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
+ if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1measure_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1cursor
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1set_1cursor)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1set_1cursor_FUNC);
+ gtk_widget_set_cursor((GtkWidget *)arg0, (GdkCursor *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1set_1cursor_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1focusable
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1set_1focusable)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1set_1focusable_FUNC);
+ gtk_widget_set_focusable((GtkWidget *)arg0, (gboolean)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1set_1focusable_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1size_1allocate
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1size_1allocate)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
+{
+ GtkAllocation _arg1, *lparg1=NULL;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1size_1allocate_FUNC);
+ if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
+ gtk_widget_size_allocate((GtkWidget *)arg0, (GtkAllocation *)lparg1, arg2);
+fail:
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1size_1allocate_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1snapshot_1child
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1widget_1snapshot_1child)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1snapshot_1child_FUNC);
+ gtk_widget_snapshot_child((GtkWidget *)arg0, (GtkWidget *)arg1, (GtkSnapshot *)arg2);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1snapshot_1child_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1translate_1coordinates
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1widget_1translate_1coordinates)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3, jdoubleArray arg4, jdoubleArray arg5)
+{
+ jdouble *lparg4=NULL;
+ jdouble *lparg5=NULL;
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1widget_1translate_1coordinates_FUNC);
+ if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jboolean)gtk_widget_translate_coordinates((GtkWidget *)arg0, (GtkWidget *)arg1, arg2, arg3, (double *)lparg4, (double *)lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1widget_1translate_1coordinates_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1destroy
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1window_1destroy)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1destroy_FUNC);
+ gtk_window_destroy((GtkWindow *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1destroy_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1get_1icon_1name
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1window_1get_1icon_1name)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1get_1icon_1name_FUNC);
+ rc = (jlong)gtk_window_get_icon_name((GtkWindow *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1get_1icon_1name_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1is_1maximized
+JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1window_1is_1maximized)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1is_1maximized_FUNC);
+ rc = (jboolean)gtk_window_is_maximized((GtkWindow *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1is_1maximized_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1maximize
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1window_1maximize)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1maximize_FUNC);
+ gtk_window_maximize((GtkWindow *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1maximize_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1minimize
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1window_1minimize)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1minimize_FUNC);
+ gtk_window_minimize((GtkWindow *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1minimize_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1new
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1window_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1new_FUNC);
+ rc = (jlong)gtk_window_new();
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1child
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1window_1set_1child)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1set_1child_FUNC);
+ gtk_window_set_child((GtkWindow *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1set_1child_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1default_1widget
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1window_1set_1default_1widget)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1set_1default_1widget_FUNC);
+ gtk_window_set_default_widget((GtkWindow *)arg0, (GtkWidget *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1set_1default_1widget_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1set_1icon_1name
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1window_1set_1icon_1name)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1set_1icon_1name_FUNC);
+ gtk_window_set_icon_name((GtkWindow *)arg0, (const char *)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1set_1icon_1name_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1window_1unminimize
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1window_1unminimize)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1window_1unminimize_FUNC);
+ gtk_window_unminimize((GtkWindow *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gtk_1window_1unminimize_FUNC);
+}
+#endif
+
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEMEX.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.h
index 9a3a813c11..247632153f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEMEX.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2021 Syntevo and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,11 +9,17 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Syntevo - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.win32;
+
+#ifndef INC_gtk4_H
+#define INC_gtk4_H
-public class TVITEMEX extends TVITEM {
- public int iIntegral;
- public static final int sizeof = OS.TVITEMEX_sizeof ();
-}
+#define NDEBUG
+
+#define G_DISABLE_DEPRECATED
+#define GTK_DISABLE_SINGLE_INCLUDES
+
+#include <gtk/gtk.h>
+
+#endif /* INC_gtk4_H */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
new file mode 100644
index 0000000000..7047c84989
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "swt.h"
+#include "gtk4_stats.h"
+
+#ifdef NATIVE_STATS
+
+char * GTK4_nativeFunctionNames[] = {
+ "gdk_1content_1formats_1builder_1add_1mime_1type",
+ "gdk_1content_1formats_1builder_1free_1to_1formats",
+ "gdk_1content_1formats_1builder_1new",
+ "gdk_1toplevel_1focus",
+ "gdk_1toplevel_1get_1state",
+ "gdk_1toplevel_1lower",
+ "gdk_1toplevel_1set_1icon_1list",
+ "gdk_1toplevel_1size_1get_1bounds",
+ "gdk_1toplevel_1size_1set_1min_1size",
+ "gdk_1toplevel_1size_1set_1size",
+ "gtk_1box_1append",
+ "gtk_1box_1insert_1child_1after",
+ "gtk_1box_1prepend",
+ "gtk_1button_1new_1from_1icon_1name",
+ "gtk_1button_1set_1child",
+ "gtk_1calendar_1get_1date",
+ "gtk_1calendar_1select_1day",
+ "gtk_1calendar_1set_1show_1day_1names",
+ "gtk_1calendar_1set_1show_1heading",
+ "gtk_1calendar_1set_1show_1week_1numbers",
+ "gtk_1check_1button_1get_1active",
+ "gtk_1check_1button_1set_1active",
+ "gtk_1check_1button_1set_1group",
+ "gtk_1check_1button_1set_1inconsistent",
+ "gtk_1check_1button_1set_1use_1underline",
+ "gtk_1combo_1box_1get_1child",
+ "gtk_1css_1provider_1load_1from_1data",
+ "gtk_1drag_1source_1new",
+ "gtk_1drag_1source_1set_1actions",
+ "gtk_1drag_1source_1set_1icon",
+ "gtk_1drop_1target_1async_1new",
+ "gtk_1drop_1target_1async_1set_1formats",
+ "gtk_1editable_1get_1delegate",
+ "gtk_1editable_1get_1text",
+ "gtk_1entry_1get_1buffer",
+ "gtk_1entry_1get_1text_1length",
+ "gtk_1entry_1set_1buffer",
+ "gtk_1event_1controller_1focus_1new",
+ "gtk_1event_1controller_1get_1current_1event",
+ "gtk_1event_1controller_1get_1current_1event_1state",
+ "gtk_1event_1controller_1key_1new",
+ "gtk_1event_1controller_1motion_1new",
+ "gtk_1event_1controller_1scroll_1new",
+ "gtk_1expander_1set_1child",
+ "gtk_1file_1chooser_1get_1file",
+ "gtk_1file_1chooser_1get_1files",
+ "gtk_1file_1chooser_1set_1current_1folder",
+ "gtk_1file_1chooser_1set_1file",
+ "gtk_1frame_1set_1child",
+ "gtk_1gesture_1click_1new",
+ "gtk_1hsv_1to_1rgb",
+ "gtk_1icon_1paintable_1get_1file",
+ "gtk_1icon_1theme_1get_1for_1display",
+ "gtk_1icon_1theme_1lookup_1by_1gicon",
+ "gtk_1icon_1theme_1lookup_1icon",
+ "gtk_1im_1context_1filter_1keypress",
+ "gtk_1image_1clear",
+ "gtk_1image_1new_1from_1icon_1name",
+ "gtk_1image_1set_1from_1paintable",
+ "gtk_1init_1check",
+ "gtk_1keyval_1trigger_1new",
+ "gtk_1label_1set_1wrap",
+ "gtk_1label_1set_1wrap_1mode",
+ "gtk_1menu_1button_1set_1use_1underline",
+ "gtk_1named_1action_1new",
+ "gtk_1native_1get_1surface",
+ "gtk_1picture_1new",
+ "gtk_1picture_1set_1can_1shrink",
+ "gtk_1picture_1set_1paintable",
+ "gtk_1popover_1menu_1bar_1new_1from_1model",
+ "gtk_1popover_1menu_1new_1from_1model_1full",
+ "gtk_1popover_1menu_1set_1menu_1model",
+ "gtk_1popover_1set_1has_1arrow",
+ "gtk_1rgb_1to_1hsv",
+ "gtk_1scrollbar_1get_1adjustment",
+ "gtk_1scrolled_1window_1get_1has_1frame",
+ "gtk_1scrolled_1window_1new",
+ "gtk_1scrolled_1window_1set_1child",
+ "gtk_1scrolled_1window_1set_1has_1frame",
+ "gtk_1shortcut_1controller_1add_1shortcut",
+ "gtk_1shortcut_1controller_1new",
+ "gtk_1shortcut_1controller_1remove_1shortcut",
+ "gtk_1shortcut_1controller_1set_1scope",
+ "gtk_1shortcut_1new",
+ "gtk_1snapshot_1append_1cairo",
+ "gtk_1style_1context_1add_1provider_1for_1display",
+ "gtk_1style_1context_1get_1border",
+ "gtk_1style_1context_1get_1color",
+ "gtk_1style_1context_1get_1margin",
+ "gtk_1style_1context_1get_1padding",
+ "gtk_1text_1get_1buffer",
+ "gtk_1text_1set_1placeholder_1text",
+ "gtk_1text_1set_1tabs",
+ "gtk_1text_1set_1visibility",
+ "gtk_1tree_1view_1column_1cell_1get_1size",
+ "gtk_1widget_1action_1set_1enabled",
+ "gtk_1widget_1activate_1action",
+ "gtk_1widget_1add_1controller",
+ "gtk_1widget_1class_1add_1binding_1signal",
+ "gtk_1widget_1get_1clipboard",
+ "gtk_1widget_1get_1first_1child",
+ "gtk_1widget_1get_1last_1child",
+ "gtk_1widget_1get_1native",
+ "gtk_1widget_1get_1next_1sibling",
+ "gtk_1widget_1get_1prev_1sibling",
+ "gtk_1widget_1get_1receives_1default",
+ "gtk_1widget_1get_1root",
+ "gtk_1widget_1measure",
+ "gtk_1widget_1set_1cursor",
+ "gtk_1widget_1set_1focusable",
+ "gtk_1widget_1size_1allocate",
+ "gtk_1widget_1snapshot_1child",
+ "gtk_1widget_1translate_1coordinates",
+ "gtk_1window_1destroy",
+ "gtk_1window_1get_1icon_1name",
+ "gtk_1window_1is_1maximized",
+ "gtk_1window_1maximize",
+ "gtk_1window_1minimize",
+ "gtk_1window_1new",
+ "gtk_1window_1set_1child",
+ "gtk_1window_1set_1default_1widget",
+ "gtk_1window_1set_1icon_1name",
+ "gtk_1window_1unminimize",
+};
+#define NATIVE_FUNCTION_COUNT sizeof(GTK4_nativeFunctionNames) / sizeof(char*)
+int GTK4_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int GTK4_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
+
+#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
+
+JNIEXPORT jint JNICALL STATS_NATIVE(GTK4_1GetFunctionCount)
+ (JNIEnv *env, jclass that)
+{
+ return GTK4_nativeFunctionCount;
+}
+
+JNIEXPORT jstring JNICALL STATS_NATIVE(GTK4_1GetFunctionName)
+ (JNIEnv *env, jclass that, jint index)
+{
+ return (*env)->NewStringUTF(env, GTK4_nativeFunctionNames[index]);
+}
+
+JNIEXPORT jint JNICALL STATS_NATIVE(GTK4_1GetFunctionCallCount)
+ (JNIEnv *env, jclass that, jint index)
+{
+ return GTK4_nativeFunctionCallCount[index];
+}
+
+#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
new file mode 100644
index 0000000000..23bc1ce531
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#ifdef NATIVE_STATS
+extern int GTK4_nativeFunctionCount;
+extern int GTK4_nativeFunctionCallCount[];
+extern char* GTK4_nativeFunctionNames[];
+#define GTK4_NATIVE_ENTER(env, that, func) GTK4_nativeFunctionCallCount[func]++;
+#define GTK4_NATIVE_EXIT(env, that, func)
+#else
+#ifndef GTK4_NATIVE_ENTER
+#define GTK4_NATIVE_ENTER(env, that, func)
+#endif
+#ifndef GTK4_NATIVE_EXIT
+#define GTK4_NATIVE_EXIT(env, that, func)
+#endif
+#endif
+
+typedef enum {
+ gdk_1content_1formats_1builder_1add_1mime_1type_FUNC,
+ gdk_1content_1formats_1builder_1free_1to_1formats_FUNC,
+ gdk_1content_1formats_1builder_1new_FUNC,
+ gdk_1toplevel_1focus_FUNC,
+ gdk_1toplevel_1get_1state_FUNC,
+ gdk_1toplevel_1lower_FUNC,
+ gdk_1toplevel_1set_1icon_1list_FUNC,
+ gdk_1toplevel_1size_1get_1bounds_FUNC,
+ gdk_1toplevel_1size_1set_1min_1size_FUNC,
+ gdk_1toplevel_1size_1set_1size_FUNC,
+ gtk_1box_1append_FUNC,
+ gtk_1box_1insert_1child_1after_FUNC,
+ gtk_1box_1prepend_FUNC,
+ gtk_1button_1new_1from_1icon_1name_FUNC,
+ gtk_1button_1set_1child_FUNC,
+ gtk_1calendar_1get_1date_FUNC,
+ gtk_1calendar_1select_1day_FUNC,
+ gtk_1calendar_1set_1show_1day_1names_FUNC,
+ gtk_1calendar_1set_1show_1heading_FUNC,
+ gtk_1calendar_1set_1show_1week_1numbers_FUNC,
+ gtk_1check_1button_1get_1active_FUNC,
+ gtk_1check_1button_1set_1active_FUNC,
+ gtk_1check_1button_1set_1group_FUNC,
+ gtk_1check_1button_1set_1inconsistent_FUNC,
+ gtk_1check_1button_1set_1use_1underline_FUNC,
+ gtk_1combo_1box_1get_1child_FUNC,
+ gtk_1css_1provider_1load_1from_1data_FUNC,
+ gtk_1drag_1source_1new_FUNC,
+ gtk_1drag_1source_1set_1actions_FUNC,
+ gtk_1drag_1source_1set_1icon_FUNC,
+ gtk_1drop_1target_1async_1new_FUNC,
+ gtk_1drop_1target_1async_1set_1formats_FUNC,
+ gtk_1editable_1get_1delegate_FUNC,
+ gtk_1editable_1get_1text_FUNC,
+ gtk_1entry_1get_1buffer_FUNC,
+ gtk_1entry_1get_1text_1length_FUNC,
+ gtk_1entry_1set_1buffer_FUNC,
+ gtk_1event_1controller_1focus_1new_FUNC,
+ gtk_1event_1controller_1get_1current_1event_FUNC,
+ gtk_1event_1controller_1get_1current_1event_1state_FUNC,
+ gtk_1event_1controller_1key_1new_FUNC,
+ gtk_1event_1controller_1motion_1new_FUNC,
+ gtk_1event_1controller_1scroll_1new_FUNC,
+ gtk_1expander_1set_1child_FUNC,
+ gtk_1file_1chooser_1get_1file_FUNC,
+ gtk_1file_1chooser_1get_1files_FUNC,
+ gtk_1file_1chooser_1set_1current_1folder_FUNC,
+ gtk_1file_1chooser_1set_1file_FUNC,
+ gtk_1frame_1set_1child_FUNC,
+ gtk_1gesture_1click_1new_FUNC,
+ gtk_1hsv_1to_1rgb_FUNC,
+ gtk_1icon_1paintable_1get_1file_FUNC,
+ gtk_1icon_1theme_1get_1for_1display_FUNC,
+ gtk_1icon_1theme_1lookup_1by_1gicon_FUNC,
+ gtk_1icon_1theme_1lookup_1icon_FUNC,
+ gtk_1im_1context_1filter_1keypress_FUNC,
+ gtk_1image_1clear_FUNC,
+ gtk_1image_1new_1from_1icon_1name_FUNC,
+ gtk_1image_1set_1from_1paintable_FUNC,
+ gtk_1init_1check_FUNC,
+ gtk_1keyval_1trigger_1new_FUNC,
+ gtk_1label_1set_1wrap_FUNC,
+ gtk_1label_1set_1wrap_1mode_FUNC,
+ gtk_1menu_1button_1set_1use_1underline_FUNC,
+ gtk_1named_1action_1new_FUNC,
+ gtk_1native_1get_1surface_FUNC,
+ gtk_1picture_1new_FUNC,
+ gtk_1picture_1set_1can_1shrink_FUNC,
+ gtk_1picture_1set_1paintable_FUNC,
+ gtk_1popover_1menu_1bar_1new_1from_1model_FUNC,
+ gtk_1popover_1menu_1new_1from_1model_1full_FUNC,
+ gtk_1popover_1menu_1set_1menu_1model_FUNC,
+ gtk_1popover_1set_1has_1arrow_FUNC,
+ gtk_1rgb_1to_1hsv_FUNC,
+ gtk_1scrollbar_1get_1adjustment_FUNC,
+ gtk_1scrolled_1window_1get_1has_1frame_FUNC,
+ gtk_1scrolled_1window_1new_FUNC,
+ gtk_1scrolled_1window_1set_1child_FUNC,
+ gtk_1scrolled_1window_1set_1has_1frame_FUNC,
+ gtk_1shortcut_1controller_1add_1shortcut_FUNC,
+ gtk_1shortcut_1controller_1new_FUNC,
+ gtk_1shortcut_1controller_1remove_1shortcut_FUNC,
+ gtk_1shortcut_1controller_1set_1scope_FUNC,
+ gtk_1shortcut_1new_FUNC,
+ gtk_1snapshot_1append_1cairo_FUNC,
+ gtk_1style_1context_1add_1provider_1for_1display_FUNC,
+ gtk_1style_1context_1get_1border_FUNC,
+ gtk_1style_1context_1get_1color_FUNC,
+ gtk_1style_1context_1get_1margin_FUNC,
+ gtk_1style_1context_1get_1padding_FUNC,
+ gtk_1text_1get_1buffer_FUNC,
+ gtk_1text_1set_1placeholder_1text_FUNC,
+ gtk_1text_1set_1tabs_FUNC,
+ gtk_1text_1set_1visibility_FUNC,
+ gtk_1tree_1view_1column_1cell_1get_1size_FUNC,
+ gtk_1widget_1action_1set_1enabled_FUNC,
+ gtk_1widget_1activate_1action_FUNC,
+ gtk_1widget_1add_1controller_FUNC,
+ gtk_1widget_1class_1add_1binding_1signal_FUNC,
+ gtk_1widget_1get_1clipboard_FUNC,
+ gtk_1widget_1get_1first_1child_FUNC,
+ gtk_1widget_1get_1last_1child_FUNC,
+ gtk_1widget_1get_1native_FUNC,
+ gtk_1widget_1get_1next_1sibling_FUNC,
+ gtk_1widget_1get_1prev_1sibling_FUNC,
+ gtk_1widget_1get_1receives_1default_FUNC,
+ gtk_1widget_1get_1root_FUNC,
+ gtk_1widget_1measure_FUNC,
+ gtk_1widget_1set_1cursor_FUNC,
+ gtk_1widget_1set_1focusable_FUNC,
+ gtk_1widget_1size_1allocate_FUNC,
+ gtk_1widget_1snapshot_1child_FUNC,
+ gtk_1widget_1translate_1coordinates_FUNC,
+ gtk_1window_1destroy_FUNC,
+ gtk_1window_1get_1icon_1name_FUNC,
+ gtk_1window_1is_1maximized_FUNC,
+ gtk_1window_1maximize_FUNC,
+ gtk_1window_1minimize_FUNC,
+ gtk_1window_1new_FUNC,
+ gtk_1window_1set_1child_FUNC,
+ gtk_1window_1set_1default_1widget_FUNC,
+ gtk_1window_1set_1icon_1name_FUNC,
+ gtk_1window_1unminimize_FUNC,
+} GTK4_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/FILETIME.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_structs.c
index 434305269f..e88424776d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/FILETIME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_structs.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,13 +9,12 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.win32;
-public class FILETIME {
- public int dwLowDateTime;
- public int dwHighDateTime;
- static final public int sizeof = OS.FILETIME_sizeof ();
-}
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "swt.h"
+#include "gtk4_structs.h"
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_structs.h
new file mode 100644
index 0000000000..febed53c4d
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_structs.h
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
+/* DO NOT EDIT - your changes will be lost. */
+
+#include "gtk4.h"
+
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak
index 62f365f104..65c168f3fa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak
@@ -41,7 +41,6 @@ endif
CAIRO_PREFIX = swt-cairo
ATK_PREFIX = swt-atk
WEBKIT_PREFIX = swt-webkit
-WEBKIT_EXTENSION_PREFIX=swt-webkit2extension
GLX_PREFIX = swt-glx
SWT_LIB = lib$(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
@@ -53,26 +52,23 @@ GLX_LIB = lib$(GLX_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
WEBKIT_LIB = lib$(WEBKIT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
ALL_SWT_LIBS = $(SWT_LIB) $(AWT_LIB) $(SWTPI_LIB) $(CAIRO_LIB) $(ATK_LIB) $(GLX_LIB) $(WEBKIT_LIB)
-# Webkit extension lib has to be put into a separate folder and is treated differently from the other libraries.
-WEBKIT_EXTENSION_LIB = lib$(WEBKIT_EXTENSION_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-WEBEXTENSION_BASE_DIR = webkitextensions
-WEBEXTENSION_DIR = $(WEBEXTENSION_BASE_DIR)$(maj_ver)$(min_ver)r$(rev)
-
CAIROCFLAGS = `pkg-config --cflags cairo`
CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo
# Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0)
-GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
ifeq ($(GTK_VERSION), 4.0)
-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-4 -lcairo -lgthread-2.0
+GTKCFLAGS = `pkg-config --cflags gtk4 gtk4-x11 gtk4-unix-print`
+GTKLIBS = `pkg-config --libs-only-L gtk4 gtk4-x11 gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-4 -lcairo -lgthread-2.0
+ATKCFLAGS = `pkg-config --cflags atk gtk4 gtk4-unix-print`
else
+GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0
+ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
endif
AWT_LFLAGS = -shared ${SWT_LFLAGS}
AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
-ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
ATKLIBS = `pkg-config --libs-only-L atk` -latk-1.0
GLXLIBS = -lGL -lGLU -lm
@@ -83,19 +79,20 @@ GLXLIBS = -lGL -lGLU -lm
WEBKITLIBS = `pkg-config --libs-only-l gio-2.0`
WEBKITCFLAGS = `pkg-config --cflags gio-2.0`
-WEBKIT_EXTENSION_CFLAGS=`pkg-config --cflags gtk+-3.0 webkit2gtk-web-extension-4.0`
-WEBKIT_EXTENSION_LFLAGS=`pkg-config --libs gtk+-3.0 webkit2gtk-web-extension-4.0`
-
ifdef SWT_WEBKIT_DEBUG
# don't use 'webkit2gtk-4.0' in production, as some systems might not have those libs and we get crashes.
WEBKITLIBS += `pkg-config --libs-only-l webkit2gtk-4.0`
WEBKITCFLAGS += `pkg-config --cflags webkit2gtk-4.0`
endif
-
SWT_OBJECTS = swt.o c.o c_stats.o callback.o
AWT_OBJECTS = swt_awt.o
-SWTPI_OBJECTS = swt.o os.o os_structs.o os_custom.o os_stats.o
+ifeq ($(GTK_VERSION), 4.0)
+GTKX_OBJECTS = gtk4.o gtk4_stats.o gtk4_structs.o
+else
+GTKX_OBJECTS = gtk3.o gtk3_stats.o gtk3_structs.o
+endif
+SWTPI_OBJECTS = swt.o os.o os_structs.o os_custom.o os_stats.o $(GTKX_OBJECTS)
CAIRO_OBJECTS = swt.o cairo.o cairo_structs.o cairo_stats.o
ATK_OBJECTS = swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
WEBKIT_OBJECTS = swt.o webkitgtk.o webkitgtk_structs.o webkitgtk_stats.o webkitgtk_custom.o
@@ -112,6 +109,10 @@ CFLAGS := $(CFLAGS) \
${SWT_PTR_CFLAGS}
LFLAGS = -shared -fPIC ${SWT_LFLAGS}
+# Treat all warnings as errors. If your new code produces a warning, please
+# take time to properly understand and fix/silence it as necessary.
+CFLAGS += -Werror
+
ifndef NO_STRIP
# -s = Remove all symbol table and relocation information from the executable.
# i.e, more efficent code, but removes debug information. Should not be used if you want to debug.
@@ -132,7 +133,7 @@ $(SWT_LIB): $(SWT_OBJECTS)
$(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS)
callback.o: callback.c callback.h
- $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -DUSE_ASSEMBLER -c callback.c
$(SWTPI_LIB): $(SWTPI_OBJECTS)
$(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
@@ -148,6 +149,20 @@ os_custom.o: os_custom.c os_structs.h os.h swt.h
os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h
$(CC) $(CFLAGS) $(GTKCFLAGS) -c os_stats.c
+gtk3.o: gtk3.c gtk3.h swt.h
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -c gtk3.c
+gtk3_structs.o: gtk3_structs.c gtk3_structs.h gtk3.h swt.h
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -c gtk3_structs.c
+gtk3_stats.o: gtk3_stats.c gtk3_structs.h gtk3.h gtk3_stats.h swt.h
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -c gtk3_stats.c
+
+gtk4.o: gtk4.c gtk4.h swt.h
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -c gtk4.c
+gtk4_structs.o: gtk4_structs.c gtk4_structs.h gtk4.h swt.h
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -c gtk4_structs.c
+gtk4_stats.o: gtk4_stats.c gtk4_structs.h gtk4.h gtk4_stats.h swt.h
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -c gtk4_stats.c
+
#
# CAIRO libs
#
@@ -191,11 +206,7 @@ atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h
#
# WebKit lib
#
-ifeq ($(BUILD_WEBKIT2EXTENSION),yes)
-make_webkit: $(WEBKIT_LIB) make_webkit2extension
-else
make_webkit: $(WEBKIT_LIB)
-endif
$(WEBKIT_LIB): $(WEBKIT_OBJECTS)
$(CC) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) $(WEBKITLIBS)
@@ -212,16 +223,6 @@ webkitgtk_stats.o: webkitgtk_stats.c webkitgtk_stats.h
webkitgtk_custom.o: webkitgtk_custom.c
$(CC) $(CFLAGS) $(WEBKITCFLAGS) -c webkitgtk_custom.c
-
-# Webkit2 extension is a seperate .so lib.
-make_webkit2extension: $(WEBKIT_EXTENSION_LIB)
-
-$(WEBKIT_EXTENSION_LIB) : webkitgtk_extension.o
- $(CC) $(LFLAGS) -o $@ $^ $(WEBKIT_EXTENSION_LFLAGS)
-
-webkitgtk_extension.o : webkitgtk_extension.c
- $(CC) $(CFLAGS) $(WEBKIT_EXTENSION_CFLAGS) ${SWT_PTR_CFLAGS} -fPIC -c $^
-
#
# GLX lib
#
@@ -251,16 +252,6 @@ glx_stats.o: glx_stats.c glx_stats.h
# I hope there are no spaces in the path :-).
install: all
cp $(ALL_SWT_LIBS) $(OUTPUT_DIR)
-ifeq ($(BUILD_WEBKIT2EXTENSION),yes)
- @# Copy webextension into it's own folder, but create folder first.
- @# CAREFULLY delete '.so' files inside webextension*. Then carefully remove the directories. 'rm -rf' seemed too risky of an approach.
- @-[ "$$(ls -d $(OUTPUT_DIR)/$(WEBEXTENSION_BASE_DIR)*/*.so)" ] && rm -v `ls -d $(OUTPUT_DIR)/$(WEBEXTENSION_BASE_DIR)*/*.so`
- @-[ "$$(ls -d $(OUTPUT_DIR)/$(WEBEXTENSION_BASE_DIR)*)" ] && rmdir -v `ls -d $(OUTPUT_DIR)/$(WEBEXTENSION_BASE_DIR)*`
-
- @# Copying webextension is not critical for build to succeed, thus we use '-'. SWT can still function without a webextension.
- @-[ -d $(OUTPUT_DIR)/$(WEBEXTENSION_DIR) ] || mkdir -v $(OUTPUT_DIR)/$(WEBEXTENSION_DIR) # If folder does not exist, make it.
- -cp $(WEBKIT_EXTENSION_LIB) $(OUTPUT_DIR)/$(WEBEXTENSION_DIR)/
-endif
#
# Clean
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index 8e32951ff9..cea7169846 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2022 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -60,110 +60,26 @@ JNIEXPORT jboolean JNICALL GDK_NATIVE(GDK_1IS_1X11_1DISPLAY)
}
#endif
-#ifndef NO_GdkEventAny_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventAny_1sizeof)
+#ifndef NO_GDK_1TYPE_1PIXBUF
+JNIEXPORT jlong JNICALL GDK_NATIVE(GDK_1TYPE_1PIXBUF)
(JNIEnv *env, jclass that)
{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEventAny_1sizeof_FUNC);
- rc = (jint)GdkEventAny_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEventAny_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GdkEventButton_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventButton_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEventButton_1sizeof_FUNC);
- rc = (jint)GdkEventButton_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEventButton_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GdkEventCrossing_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventCrossing_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEventCrossing_1sizeof_FUNC);
- rc = (jint)GdkEventCrossing_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEventCrossing_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GdkEventFocus_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventFocus_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEventFocus_1sizeof_FUNC);
- rc = (jint)GdkEventFocus_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEventFocus_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GdkEventKey_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventKey_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEventKey_1sizeof_FUNC);
- rc = (jint)GdkEventKey_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEventKey_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GdkEventMotion_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventMotion_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEventMotion_1sizeof_FUNC);
- rc = (jint)GdkEventMotion_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEventMotion_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GdkEventWindowState_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventWindowState_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEventWindowState_1sizeof_FUNC);
- rc = (jint)GdkEventWindowState_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEventWindowState_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GdkEvent_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkEvent_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkEvent_1sizeof_FUNC);
- rc = (jint)GdkEvent_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkEvent_1sizeof_FUNC);
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, GDK_1TYPE_1PIXBUF_FUNC);
+ rc = (jlong)GDK_TYPE_PIXBUF;
+ GDK_NATIVE_EXIT(env, that, GDK_1TYPE_1PIXBUF_FUNC);
return rc;
}
#endif
-#ifndef NO_GdkGeometry_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkGeometry_1sizeof)
+#ifndef NO_GDK_1TYPE_1RGBA
+JNIEXPORT jlong JNICALL GDK_NATIVE(GDK_1TYPE_1RGBA)
(JNIEnv *env, jclass that)
{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkGeometry_1sizeof_FUNC);
- rc = (jint)GdkGeometry_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkGeometry_1sizeof_FUNC);
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, GDK_1TYPE_1RGBA_FUNC);
+ rc = (jlong)GDK_TYPE_RGBA;
+ GDK_NATIVE_EXIT(env, that, GDK_1TYPE_1RGBA_FUNC);
return rc;
}
#endif
@@ -204,49 +120,13 @@ JNIEXPORT jint JNICALL GDK_NATIVE(GdkRectangle_1sizeof)
}
#endif
-#ifndef NO_GdkWindowAttr_1sizeof
-JNIEXPORT jint JNICALL GDK_NATIVE(GdkWindowAttr_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, GdkWindowAttr_1sizeof_FUNC);
- rc = (jint)GdkWindowAttr_sizeof();
- GDK_NATIVE_EXIT(env, that, GdkWindowAttr_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1GDK_1TYPE_1PIXBUF
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1GDK_1TYPE_1PIXBUF)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1GDK_1TYPE_1PIXBUF_FUNC);
- rc = (jlong)GDK_TYPE_PIXBUF;
- GDK_NATIVE_EXIT(env, that, _1GDK_1TYPE_1PIXBUF_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1GDK_1TYPE_1RGBA
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1GDK_1TYPE_1RGBA)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1GDK_1TYPE_1RGBA_FUNC);
- rc = (jlong)GDK_TYPE_RGBA;
- GDK_NATIVE_EXIT(env, that, _1GDK_1TYPE_1RGBA_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1atom_1intern
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1atom_1intern)
+#ifndef NO_gdk_1atom_1intern
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1atom_1intern)
(JNIEnv *env, jclass that, jbyteArray arg0, jboolean arg1)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1atom_1intern_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1atom_1intern_FUNC);
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
/*
rc = (jlong)gdk_atom_intern((const gchar *)lparg0, arg1);
@@ -259,29 +139,41 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1atom_1intern)
}
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT);
- GDK_NATIVE_EXIT(env, that, _1gdk_1atom_1intern_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1atom_1intern_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1atom_1name
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1atom_1name)
+#ifndef NO_gdk_1atom_1name
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1atom_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1atom_1name_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1atom_1name_FUNC);
rc = (jlong)gdk_atom_name((GdkAtom)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1atom_1name_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1atom_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cairo_1create
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cairo_1create)
+#ifndef NO_gdk_1button_1event_1get_1button
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1button_1event_1get_1button)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1button_1event_1get_1button_FUNC);
+ rc = (jint)gdk_button_event_get_button((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1button_1event_1get_1button_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1cairo_1create
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1cairo_1create)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1create_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cairo_1create_FUNC);
/*
rc = (jlong)gdk_cairo_create((GdkWindow *)arg0);
*/
@@ -291,467 +183,415 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cairo_1create)
rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1create_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cairo_1create_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cairo_1get_1clip_1rectangle
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1cairo_1get_1clip_1rectangle)
+#ifndef NO_gdk_1cairo_1get_1clip_1rectangle
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1cairo_1get_1clip_1rectangle)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cairo_1get_1clip_1rectangle_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+/*
rc = (jboolean)gdk_cairo_get_clip_rectangle((cairo_t *)arg0, (GdkRectangle *)lparg1);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_cairo_get_clip_rectangle)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(cairo_t *, GdkRectangle *))fp)((cairo_t *)arg0, (GdkRectangle *)lparg1);
+ }
+ }
fail:
if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cairo_1get_1clip_1rectangle_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cairo_1region
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1region)
+#ifndef NO_gdk_1cairo_1region
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1cairo_1region)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1region_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cairo_1region_FUNC);
gdk_cairo_region((cairo_t *)arg0, (cairo_region_t *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1region_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cairo_1region_FUNC);
}
#endif
-#ifndef NO__1gdk_1cairo_1region_1create_1from_1surface
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cairo_1region_1create_1from_1surface)
+#ifndef NO_gdk_1cairo_1region_1create_1from_1surface
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1cairo_1region_1create_1from_1surface)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cairo_1region_1create_1from_1surface_FUNC);
rc = (jlong)gdk_cairo_region_create_from_surface((cairo_surface_t *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cairo_1region_1create_1from_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cairo_1set_1source_1pixbuf
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1pixbuf)
+#ifndef NO_gdk_1cairo_1set_1source_1pixbuf
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1cairo_1set_1source_1pixbuf)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cairo_1set_1source_1pixbuf_FUNC);
gdk_cairo_set_source_pixbuf((cairo_t *)arg0, (const GdkPixbuf *)arg1, (gdouble)arg2, (gdouble)arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cairo_1set_1source_1pixbuf_FUNC);
}
#endif
-#ifndef NO__1gdk_1cairo_1set_1source_1rgba
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1rgba)
+#ifndef NO_gdk_1cairo_1set_1source_1rgba
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1cairo_1set_1source_1rgba)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRGBA _arg1, *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1rgba_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cairo_1set_1source_1rgba_FUNC);
if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
gdk_cairo_set_source_rgba((cairo_t *)arg0, (const GdkRGBA *)lparg1);
fail:
if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1rgba_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cairo_1set_1source_1rgba_FUNC);
}
#endif
-#ifndef NO__1gdk_1cairo_1set_1source_1window
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1window)
+#ifndef NO_gdk_1cairo_1set_1source_1window
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1cairo_1set_1source_1window)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1window_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cairo_1set_1source_1window_FUNC);
gdk_cairo_set_source_window((cairo_t *)arg0, (GdkWindow *)arg1, (gdouble)arg2, (gdouble)arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1window_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cairo_1set_1source_1window_FUNC);
}
#endif
-#ifndef NO__1gdk_1clipboard_1set_1content
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1clipboard_1set_1content)
+#ifndef NO_gdk_1clipboard_1set_1content
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1clipboard_1set_1content)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1clipboard_1set_1content_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1clipboard_1set_1content_FUNC);
rc = (jlong)gdk_clipboard_set_content((GdkClipboard *)arg0, (GdkContentProvider *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1clipboard_1set_1content_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1clipboard_1set_1content_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cursor_1new_1for_1display
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1for_1display)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gdk_1crossing_1event_1get_1mode
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1crossing_1event_1get_1mode)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1for_1display_FUNC);
- rc = (jlong)gdk_cursor_new_for_display((GdkDisplay *)arg0, (GdkCursorType)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1for_1display_FUNC);
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1crossing_1event_1get_1mode_FUNC);
+ rc = (jint)gdk_crossing_event_get_mode((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1crossing_1event_1get_1mode_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cursor_1new_1from_1name__J_3B
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name__J_3B)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+#ifndef NO_gdk_1cursor_1new_1from_1name__JLjava_lang_String_2
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1cursor_1new_1from_1name__JLjava_lang_String_2)
+ (JNIEnv *env, jclass that, jlong arg0, jstring arg1)
{
- jbyte *lparg1=NULL;
+ const char *lparg1= NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name__J_3B_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ GDK_NATIVE_ENTER(env, that, gdk_1cursor_1new_1from_1name__JLjava_lang_String_2_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetStringUTFChars(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gdk_cursor_new_from_name((GdkDisplay *)arg0, (const gchar *)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name__J_3B_FUNC);
+ if (arg1 && lparg1) (*env)->ReleaseStringUTFChars(env, arg1, lparg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1cursor_1new_1from_1name__JLjava_lang_String_2_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cursor_1new_1from_1name___3BJ
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name___3BJ)
- (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
+#ifndef NO_gdk_1cursor_1new_1from_1name__Ljava_lang_String_2J
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1cursor_1new_1from_1name__Ljava_lang_String_2J)
+ (JNIEnv *env, jclass that, jstring arg0, jlong arg1)
{
- jbyte *lparg0=NULL;
+ const char *lparg0= NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name___3BJ_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ GDK_NATIVE_ENTER(env, that, gdk_1cursor_1new_1from_1name__Ljava_lang_String_2J_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetStringUTFChars(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gdk_cursor_new_from_name((const gchar *)lparg0, (GdkCursor *)arg1);
fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name___3BJ_FUNC);
+ if (arg0 && lparg0) (*env)->ReleaseStringUTFChars(env, arg0, lparg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1cursor_1new_1from_1name__Ljava_lang_String_2J_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cursor_1new_1from_1pixbuf
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1pixbuf)
+#ifndef NO_gdk_1cursor_1new_1from_1pixbuf
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1cursor_1new_1from_1pixbuf)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1pixbuf_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cursor_1new_1from_1pixbuf_FUNC);
rc = (jlong)gdk_cursor_new_from_pixbuf((GdkDisplay *)arg0, (GdkPixbuf *)arg1, (gint)arg2, (gint)arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1pixbuf_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cursor_1new_1from_1pixbuf_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1cursor_1new_1from_1texture
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1texture)
+#ifndef NO_gdk_1cursor_1new_1from_1texture
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1cursor_1new_1from_1texture)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jlong arg3)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1texture_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1cursor_1new_1from_1texture_FUNC);
rc = (jlong)gdk_cursor_new_from_texture((GdkTexture *)arg0, (gint)arg1, (gint)arg2, (GdkCursor *)arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1texture_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1cursor_1new_1from_1texture_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1device_1get_1associated_1device
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1device_1get_1associated_1device)
+#ifndef NO_gdk_1device_1get_1associated_1device
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1device_1get_1associated_1device)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1get_1associated_1device_FUNC);
- rc = (jlong)gdk_device_get_associated_device((GdkDevice *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1get_1associated_1device_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1device_1get_1seat
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1device_1get_1seat)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1get_1seat_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1device_1get_1associated_1device_FUNC);
/*
- rc = (jlong)gdk_device_get_seat((GdkDevice *)arg0);
+ rc = (jlong)gdk_device_get_associated_device((GdkDevice *)arg0);
*/
{
- GDK_LOAD_FUNCTION(fp, gdk_device_get_seat)
+ GDK_LOAD_FUNCTION(fp, gdk_device_get_associated_device)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDevice *))fp)((GdkDevice *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1get_1seat_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1device_1get_1associated_1device_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1device_1get_1surface_1at_1position
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1device_1get_1surface_1at_1position)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+#ifndef NO_gdk_1device_1get_1seat
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1device_1get_1seat)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1get_1surface_1at_1position_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jlong)gdk_device_get_surface_at_position((GdkDevice *)arg0, (gint *)lparg1, (gint *)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1get_1surface_1at_1position_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1device_1get_1seat_FUNC);
+ rc = (jlong)gdk_device_get_seat((GdkDevice *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1device_1get_1seat_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1device_1get_1window_1at_1position
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1device_1get_1window_1at_1position)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+#ifndef NO_gdk_1device_1get_1surface_1at_1position
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1device_1get_1surface_1at_1position)
+ (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
+ jdouble *lparg1=NULL;
+ jdouble *lparg2=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jlong)gdk_device_get_window_at_position((GdkDevice *)arg0, (gint *)lparg1, (gint *)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1device_1grab
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1device_1grab)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jboolean arg3, jint arg4, jlong arg5, jint arg6)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1grab_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1device_1get_1surface_1at_1position_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
- rc = (jint)gdk_device_grab((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6);
+ rc = (jlong)gdk_device_get_surface_at_position((GdkDevice *)arg0, (double *)lparg1, (double *)lparg2);
*/
{
- GDK_LOAD_FUNCTION(fp, gdk_device_grab)
+ GDK_LOAD_FUNCTION(fp, gdk_device_get_surface_at_position)
if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(GdkDevice *, GdkWindow *, jint, gboolean, GdkEventMask, GdkCursor *, guint32))fp)((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDevice *, double *, double *))fp)((GdkDevice *)arg0, (double *)lparg1, (double *)lparg2);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1grab_FUNC);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1device_1get_1surface_1at_1position_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1device_1manager_1get_1client_1pointer
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1device_1manager_1get_1client_1pointer)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gdk_1device_1get_1window_1at_1position
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1device_1get_1window_1at_1position)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1device_1get_1window_1at_1position_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
- rc = (jlong)gdk_device_manager_get_client_pointer(arg0);
+ rc = (jlong)gdk_device_get_window_at_position((GdkDevice *)arg0, (gint *)lparg1, (gint *)lparg2);
*/
{
- GDK_LOAD_FUNCTION(fp, gdk_device_manager_get_client_pointer)
+ GDK_LOAD_FUNCTION(fp, gdk_device_get_window_at_position)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDevice *, gint *, gint *))fp)((GdkDevice *)arg0, (gint *)lparg1, (gint *)lparg2);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1device_1get_1window_1at_1position_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1device_1ungrab
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1ungrab)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_gdk_1device_1warp
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1device_1warp)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1ungrab_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1device_1warp_FUNC);
/*
- gdk_device_ungrab((GdkDevice *)arg0, (guint32)arg1);
+ gdk_device_warp((GdkDevice *)arg0, (GdkScreen *)arg1, (gint)arg2, (gint)arg3);
*/
{
- GDK_LOAD_FUNCTION(fp, gdk_device_ungrab)
+ GDK_LOAD_FUNCTION(fp, gdk_device_warp)
if (fp) {
- ((void (CALLING_CONVENTION*)(GdkDevice *, guint32))fp)((GdkDevice *)arg0, (guint32)arg1);
+ ((void (CALLING_CONVENTION*)(GdkDevice *, GdkScreen *, gint, gint))fp)((GdkDevice *)arg0, (GdkScreen *)arg1, (gint)arg2, (gint)arg3);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1ungrab_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1device_1warp__JII
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp__JII)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp__JII_FUNC);
- gdk_device_warp((GdkDevice *)arg0, (gint)arg1, (gint)arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp__JII_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1device_1warp__JJII
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp__JJII)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp__JJII_FUNC);
- gdk_device_warp((GdkDevice *)arg0, (GdkScreen *)arg1, (gint)arg2, (gint)arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp__JJII_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1device_1warp_FUNC);
}
#endif
-#ifndef NO__1gdk_1display_1beep
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1display_1beep)
+#ifndef NO_gdk_1display_1beep
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1display_1beep)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1beep_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1beep_FUNC);
gdk_display_beep((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1beep_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1beep_FUNC);
}
#endif
-#ifndef NO__1gdk_1display_1get_1clipboard
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1clipboard)
+#ifndef NO_gdk_1display_1get_1clipboard
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1clipboard)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1clipboard_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1clipboard_FUNC);
+/*
rc = (jlong)gdk_display_get_clipboard((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1clipboard_FUNC);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_display_get_clipboard)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1clipboard_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1default
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1default)
+#ifndef NO_gdk_1display_1get_1default
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1default)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1default_FUNC);
rc = (jlong)gdk_display_get_default();
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1display_1get_1default_1group
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1default_1group)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_1group_FUNC);
- rc = (jlong)gdk_display_get_default_group((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_1group_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1default_1seat
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1default_1seat)
+#ifndef NO_gdk_1display_1get_1default_1group
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1default_1group)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_1seat_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1default_1group_FUNC);
/*
- rc = (jlong)gdk_display_get_default_seat(arg0);
+ rc = (jlong)gdk_display_get_default_group((GdkDisplay *)arg0);
*/
{
- GDK_LOAD_FUNCTION(fp, gdk_display_get_default_seat)
+ GDK_LOAD_FUNCTION(fp, gdk_display_get_default_group)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_1seat_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1default_1group_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1device_1manager
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1device_1manager)
+#ifndef NO_gdk_1display_1get_1default_1seat
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1default_1seat)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1device_1manager_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1default_1seat_FUNC);
/*
- rc = (jlong)gdk_display_get_device_manager((GdkDisplay *)arg0);
+ rc = (jlong)gdk_display_get_default_seat(arg0);
*/
{
- GDK_LOAD_FUNCTION(fp, gdk_display_get_device_manager)
+ GDK_LOAD_FUNCTION(fp, gdk_display_get_default_seat)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1device_1manager_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1display_1get_1keymap
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1keymap)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1keymap_FUNC);
- rc = (jlong)gdk_display_get_keymap((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1keymap_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1default_1seat_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1monitor
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1monitor)
+#ifndef NO_gdk_1display_1get_1monitor
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1monitor)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1monitor_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1monitor_FUNC);
/*
- rc = (jlong)gdk_display_get_monitor(arg0, arg1);
+ rc = (jlong)gdk_display_get_monitor((GdkDisplay *)arg0, arg1);
*/
{
GDK_LOAD_FUNCTION(fp, gdk_display_get_monitor)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *, jint))fp)((GdkDisplay *)arg0, arg1);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1monitor_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1monitor_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1monitor_1at_1point
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1monitor_1at_1point)
+#ifndef NO_gdk_1display_1get_1monitor_1at_1point
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1monitor_1at_1point)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1monitor_1at_1point_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1monitor_1at_1point_FUNC);
/*
- rc = (jlong)gdk_display_get_monitor_at_point(arg0, arg1, arg2);
+ rc = (jlong)gdk_display_get_monitor_at_point((GdkDisplay *)arg0, arg1, arg2);
*/
{
GDK_LOAD_FUNCTION(fp, gdk_display_get_monitor_at_point)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jint, jint))fp)(arg0, arg1, arg2);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *, jint, jint))fp)((GdkDisplay *)arg0, arg1, arg2);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1monitor_1at_1point_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1monitor_1at_1point_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1monitor_1at_1surface
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1monitor_1at_1surface)
+#ifndef NO_gdk_1display_1get_1monitor_1at_1surface
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1monitor_1at_1surface)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1monitor_1at_1surface_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1monitor_1at_1surface_FUNC);
rc = (jlong)gdk_display_get_monitor_at_surface((GdkDisplay *)arg0, (GdkSurface *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1monitor_1at_1surface_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1monitor_1at_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1monitor_1at_1window
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1monitor_1at_1window)
+#ifndef NO_gdk_1display_1get_1monitor_1at_1window
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1monitor_1at_1window)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1monitor_1at_1window_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1monitor_1at_1window_FUNC);
/*
rc = (jlong)gdk_display_get_monitor_at_window((GdkDisplay *)arg0, (GdkWindow *)arg1);
*/
@@ -761,278 +601,317 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1monitor_1at_1window)
rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *, GdkWindow *))fp)((GdkDisplay *)arg0, (GdkWindow *)arg1);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1monitor_1at_1window_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1monitor_1at_1window_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1display_1get_1monitors
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1monitors)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1monitors_FUNC);
+/*
+ rc = (jlong)gdk_display_get_monitors((GdkDisplay *)arg0);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_display_get_monitors)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1monitors_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1n_1monitors
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1display_1get_1n_1monitors)
+#ifndef NO_gdk_1display_1get_1n_1monitors
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1display_1get_1n_1monitors)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1n_1monitors_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1n_1monitors_FUNC);
/*
- rc = (jint)gdk_display_get_n_monitors(arg0);
+ rc = (jint)gdk_display_get_n_monitors((GdkDisplay *)arg0);
*/
{
GDK_LOAD_FUNCTION(fp, gdk_display_get_n_monitors)
if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jint)((jint (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1n_1monitors_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1n_1monitors_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1primary_1clipboard
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1primary_1clipboard)
+#ifndef NO_gdk_1display_1get_1primary_1clipboard
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1primary_1clipboard)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1primary_1clipboard_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1primary_1clipboard_FUNC);
+/*
rc = (jlong)gdk_display_get_primary_clipboard((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1primary_1clipboard_FUNC);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_display_get_primary_clipboard)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1primary_1clipboard_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1get_1primary_1monitor
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1get_1primary_1monitor)
+#ifndef NO_gdk_1display_1get_1primary_1monitor
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1display_1get_1primary_1monitor)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1primary_1monitor_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1get_1primary_1monitor_FUNC);
/*
- rc = (jlong)gdk_display_get_primary_monitor(arg0);
+ rc = (jlong)gdk_display_get_primary_monitor((GdkDisplay *)arg0);
*/
{
GDK_LOAD_FUNCTION(fp, gdk_display_get_primary_monitor)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1primary_1monitor_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1get_1primary_1monitor_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1is_1composited
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1display_1is_1composited)
+#ifndef NO_gdk_1display_1is_1composited
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1display_1is_1composited)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1is_1composited_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1is_1composited_FUNC);
+/*
rc = (jboolean)gdk_display_is_composited((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1is_1composited_FUNC);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_display_is_composited)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1is_1composited_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1peek_1event
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1display_1peek_1event)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gdk_1display_1map_1keyval
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1display_1map_1keyval)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlongArray arg2, jintArray arg3)
{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1peek_1event_FUNC);
- rc = (jlong)gdk_display_peek_event((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1peek_1event_FUNC);
+ jlong *lparg2=NULL;
+ jint *lparg3=NULL;
+ jboolean rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1map_1keyval_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+/*
+ rc = (jboolean)gdk_display_map_keyval((GdkDisplay *)arg0, (guint)arg1, (GdkKeymapKey**)lparg2, (gint*)lparg3);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_display_map_keyval)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkDisplay *, guint, GdkKeymapKey**, gint*))fp)((GdkDisplay *)arg0, (guint)arg1, (GdkKeymapKey**)lparg2, (gint*)lparg3);
+ }
+ }
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1map_1keyval_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1display_1put_1event
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1display_1put_1event)
+#ifndef NO_gdk_1display_1put_1event
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1display_1put_1event)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1put_1event_FUNC);
- gdk_display_put_event((GdkDisplay *)arg0, (const GdkEvent *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1put_1event_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1put_1event_FUNC);
+ gdk_display_put_event((GdkDisplay *)arg0, (GdkEvent *)arg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1put_1event_FUNC);
}
#endif
-#ifndef NO__1gdk_1display_1supports_1cursor_1color
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1display_1supports_1cursor_1color)
+#ifndef NO_gdk_1display_1supports_1cursor_1color
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1display_1supports_1cursor_1color)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1display_1supports_1cursor_1color_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1display_1supports_1cursor_1color_FUNC);
+/*
rc = (jboolean)gdk_display_supports_cursor_color((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1display_1supports_1cursor_1color_FUNC);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_display_supports_cursor_color)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1display_1supports_1cursor_1color_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1drag_1context_1get_1actions
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1drag_1context_1get_1actions)
+#ifndef NO_gdk_1drag_1context_1get_1actions
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1drag_1context_1get_1actions)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1actions_FUNC);
- rc = (jint)gdk_drag_context_get_actions((GdkDragContext *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1actions_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1drag_1context_1get_1actions_FUNC);
+/*
+ rc = (jint)gdk_drag_context_get_actions(arg0);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_drag_context_get_actions)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1drag_1context_1get_1actions_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1drag_1context_1get_1dest_1window
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1drag_1context_1get_1dest_1window)
+#ifndef NO_gdk_1drag_1context_1get_1dest_1window
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1drag_1context_1get_1dest_1window)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1drag_1context_1get_1dest_1window_FUNC);
rc = (jlong)gdk_drag_context_get_dest_window((GdkDragContext *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1drag_1context_1get_1dest_1window_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1drag_1context_1get_1selected_1action
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1drag_1context_1get_1selected_1action)
+#ifndef NO_gdk_1drag_1context_1get_1selected_1action
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1drag_1context_1get_1selected_1action)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC);
- rc = (jint)gdk_drag_context_get_selected_action((GdkDragContext *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1drag_1context_1get_1selected_1action_FUNC);
+/*
+ rc = (jint)gdk_drag_context_get_selected_action(arg0);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_drag_context_get_selected_action)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1drag_1context_1get_1selected_1action_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1drag_1context_1list_1targets
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1drag_1context_1list_1targets)
+#ifndef NO_gdk_1drag_1context_1list_1targets
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1drag_1context_1list_1targets)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1list_1targets_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1drag_1context_1list_1targets_FUNC);
rc = (jlong)gdk_drag_context_list_targets((GdkDragContext *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1list_1targets_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1drag_1context_1list_1targets_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1drag_1status
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1drag_1status)
+#ifndef NO_gdk_1drag_1status
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1drag_1status)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1status_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1drag_1status_FUNC);
gdk_drag_status((GdkDragContext *)arg0, (GdkDragAction)arg1, (guint32)arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1status_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1drawing_1context_1get_1cairo_1context
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1drawing_1context_1get_1cairo_1context)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1drawing_1context_1get_1cairo_1context_FUNC);
-/*
- rc = (jlong)gdk_drawing_context_get_cairo_context((GdkDrawingContext *)arg0);
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_drawing_context_get_cairo_context)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDrawingContext *))fp)((GdkDrawingContext *)arg0);
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1drawing_1context_1get_1cairo_1context_FUNC);
- return rc;
+ GDK_NATIVE_EXIT(env, that, gdk_1drag_1status_FUNC);
}
#endif
-#ifndef NO__1gdk_1event_1copy
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1copy)
+#ifndef NO_gdk_1event_1copy
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1copy)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1copy_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1copy_FUNC);
rc = (jlong)gdk_event_copy((GdkEvent *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1copy_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1copy_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1free
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1free)
+#ifndef NO_gdk_1event_1free
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1event_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1free_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1free_FUNC);
gdk_event_free((GdkEvent *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1free_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1free_FUNC);
}
#endif
-#ifndef NO__1gdk_1event_1get
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1get)
+#ifndef NO_gdk_1event_1get
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1get)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_FUNC);
rc = (jlong)gdk_event_get();
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1button
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1button)
+#ifndef NO_gdk_1event_1get_1button
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1button)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1button_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1button_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_event_get_button((GdkEvent *)arg0, (guint *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1button_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1button_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1coords
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1coords)
+#ifndef NO_gdk_1event_1get_1coords
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1coords)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1coords_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1coords_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_event_get_coords((GdkEvent *)arg0, (gdouble *)lparg1, (gdouble *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1coords_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1event_1get_1crossing_1mode
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1crossing_1mode)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
- jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1crossing_1mode_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)gdk_event_get_crossing_mode((GdkEvent *)arg0, (GdkCrossingMode *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1crossing_1mode_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1coords_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1event_1type
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1event_1get_1event_1type)
+#ifndef NO_gdk_1event_1get_1event_1type
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1event_1get_1event_1type)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1event_1type_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1event_1type_FUNC);
/*
rc = (jint)gdk_event_get_event_type((GdkEvent *)arg0);
*/
@@ -1042,135 +921,134 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1event_1get_1event_1type)
rc = (jint)((jint (CALLING_CONVENTION*)(GdkEvent *))fp)((GdkEvent *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1event_1type_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1event_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1focus_1in
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1focus_1in)
- (JNIEnv *env, jclass that, jlong arg0, jbooleanArray arg1)
+#ifndef NO_gdk_1event_1get_1keycode
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1keycode)
+ (JNIEnv *env, jclass that, jlong arg0, jshortArray arg1)
{
- jboolean *lparg1=NULL;
+ jshort *lparg1=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1focus_1in_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetBooleanArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)gdk_event_get_focus_in((GdkEvent *)arg0, (gboolean *)lparg1);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1keycode_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetShortArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jboolean)gdk_event_get_keycode((GdkEvent *)arg0, (guint16 *)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseBooleanArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1focus_1in_FUNC);
+ if (arg1 && lparg1) (*env)->ReleaseShortArrayElements(env, arg1, lparg1, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1keycode_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1key_1group
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1key_1group)
+#ifndef NO_gdk_1event_1get_1keyval
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1keyval)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1key_1group_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1keyval_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)gdk_event_get_key_group((GdkEvent *)arg0, (guint *)lparg1);
+ rc = (jboolean)gdk_event_get_keyval((GdkEvent *)arg0, (guint *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1key_1group_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1keyval_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1keycode
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1keycode)
- (JNIEnv *env, jclass that, jlong arg0, jshortArray arg1)
+#ifndef NO_gdk_1event_1get_1modifier_1state
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1event_1get_1modifier_1state)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jshort *lparg1=NULL;
- jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1keycode_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetShortArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)gdk_event_get_keycode((GdkEvent *)arg0, (guint16 *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseShortArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1keycode_FUNC);
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1modifier_1state_FUNC);
+ rc = (jint)gdk_event_get_modifier_state((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1modifier_1state_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1keyval
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1keyval)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
+#ifndef NO_gdk_1event_1get_1position
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1position)
+ (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
- jint *lparg1=NULL;
+ jdouble *lparg1=NULL;
+ jdouble *lparg2=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1keyval_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)gdk_event_get_keyval((GdkEvent *)arg0, (guint *)lparg1);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1position_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jboolean)gdk_event_get_position((GdkEvent *)arg0, (double *)lparg1, (double *)lparg2);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1keyval_FUNC);
+ if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1position_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1root_1coords
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1root_1coords)
+#ifndef NO_gdk_1event_1get_1root_1coords
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1root_1coords)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1root_1coords_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1root_1coords_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_event_get_root_coords((GdkEvent *)arg0, (gdouble *)lparg1, (gdouble *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1root_1coords_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1root_1coords_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1scroll_1deltas
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1scroll_1deltas)
+#ifndef NO_gdk_1event_1get_1scroll_1deltas
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1scroll_1deltas)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1scroll_1deltas_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_event_get_scroll_deltas((const GdkEvent *)arg0, (gdouble *)lparg1, (gdouble *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1scroll_1deltas_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1scroll_1direction
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1scroll_1direction)
+#ifndef NO_gdk_1event_1get_1scroll_1direction
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1scroll_1direction)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1scroll_1direction_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1scroll_1direction_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_event_get_scroll_direction((const GdkEvent *)arg0, (GdkScrollDirection *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1scroll_1direction_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1scroll_1direction_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1seat
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1get_1seat)
+#ifndef NO_gdk_1event_1get_1seat
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1get_1seat)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1seat_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1seat_FUNC);
/*
rc = (jlong)gdk_event_get_seat(arg0);
*/
@@ -1180,170 +1058,240 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1get_1seat)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1seat_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1seat_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1state
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1state)
+#ifndef NO_gdk_1event_1get_1state
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1event_1get_1state)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1state_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1state_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_event_get_state((GdkEvent *)arg0, (GdkModifierType *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1state_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1event_1get_1string
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1string)
- (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
-{
- jlong *lparg1=NULL;
- jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1string_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)gdk_event_get_string((GdkEvent *)arg0, (const char **)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1string_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1state_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1surface
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1get_1surface)
+#ifndef NO_gdk_1event_1get_1surface
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1get_1surface)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1surface_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1surface_FUNC);
rc = (jlong)gdk_event_get_surface((GdkEvent *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1surface_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1time
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1event_1get_1time)
+#ifndef NO_gdk_1event_1get_1time
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1event_1get_1time)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1time_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1time_FUNC);
rc = (jint)gdk_event_get_time((GdkEvent *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1time_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1time_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1get_1window
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1get_1window)
+#ifndef NO_gdk_1event_1get_1window
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1get_1window)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1window_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1get_1window_FUNC);
rc = (jlong)gdk_event_get_window((GdkEvent *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1window_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1get_1window_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1handler_1set
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1handler_1set)
+#ifndef NO_gdk_1event_1handler_1set
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1event_1handler_1set)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1handler_1set_FUNC);
- gdk_event_handler_set((GdkEventFunc)arg0, (gpointer)arg1, (GDestroyNotify)arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1handler_1set_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1handler_1set_FUNC);
+/*
+ gdk_event_handler_set(arg0, arg1, arg2);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_event_handler_set)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jlong, jlong, jlong))fp)(arg0, arg1, arg2);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1handler_1set_FUNC);
}
#endif
-#ifndef NO__1gdk_1event_1new
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1new)
+#ifndef NO_gdk_1event_1new
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1new)
(JNIEnv *env, jclass that, jint arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1new_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1new_FUNC);
rc = (jlong)gdk_event_new(arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1new_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1peek
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1event_1peek)
+#ifndef NO_gdk_1event_1peek
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1peek)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1peek_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1peek_FUNC);
rc = (jlong)gdk_event_peek();
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1peek_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1peek_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1event_1put
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1put)
+#ifndef NO_gdk_1event_1put
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1event_1put)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1put_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1put_FUNC);
gdk_event_put((GdkEvent *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1put_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1put_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1event_1ref
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1event_1ref)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1ref_FUNC);
+ rc = (jlong)gdk_event_ref((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1ref_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gdk_1event_1set_1device
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1set_1device)
+#ifndef NO_gdk_1event_1set_1device
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1event_1set_1device)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1event_1set_1device_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1set_1device_FUNC);
gdk_event_set_device((GdkEvent *)arg0, (GdkDevice *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1event_1set_1device_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1set_1device_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1event_1unref
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1event_1unref)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GDK_NATIVE_ENTER(env, that, gdk_1event_1unref_FUNC);
+ gdk_event_unref((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1event_1unref_FUNC);
}
#endif
-#ifndef NO__1gdk_1get_1default_1root_1window
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1get_1default_1root_1window)
+#ifndef NO_gdk_1focus_1event_1get_1in
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1focus_1event_1get_1in)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1focus_1event_1get_1in_FUNC);
+ rc = (jboolean)gdk_focus_event_get_in((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1focus_1event_1get_1in_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1get_1default_1root_1window
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1get_1default_1root_1window)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1get_1default_1root_1window_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1get_1default_1root_1window_FUNC);
rc = (jlong)gdk_get_default_root_window();
- GDK_NATIVE_EXIT(env, that, _1gdk_1get_1default_1root_1window_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1get_1default_1root_1window_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1key_1event_1get_1keycode
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1key_1event_1get_1keycode)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1key_1event_1get_1keycode_FUNC);
+ rc = (jint)gdk_key_event_get_keycode((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1key_1event_1get_1keycode_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1keymap_1get_1entries_1for_1keyval
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1keymap_1get_1entries_1for_1keyval)
+#ifndef NO_gdk_1key_1event_1get_1keyval
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1key_1event_1get_1keyval)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1key_1event_1get_1keyval_FUNC);
+ rc = (jint)gdk_key_event_get_keyval((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1key_1event_1get_1keyval_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1key_1event_1get_1layout
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1key_1event_1get_1layout)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1key_1event_1get_1layout_FUNC);
+ rc = (jint)gdk_key_event_get_layout((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1key_1event_1get_1layout_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1keymap_1get_1entries_1for_1keyval
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1keymap_1get_1entries_1for_1keyval)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlongArray arg2, jintArray arg3)
{
jlong *lparg2=NULL;
jint *lparg3=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1keymap_1get_1entries_1for_1keyval_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+/*
rc = (jboolean)gdk_keymap_get_entries_for_keyval((GdkKeymap*)arg0, (guint)arg1, (GdkKeymapKey**)lparg2, (gint*)lparg3);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_keymap_get_entries_for_keyval)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkKeymap*, guint, GdkKeymapKey**, gint*))fp)((GdkKeymap*)arg0, (guint)arg1, (GdkKeymapKey**)lparg2, (gint*)lparg3);
+ }
+ }
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1keymap_1get_1entries_1for_1keyval_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1keymap_1get_1for_1display
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1keymap_1get_1for_1display)
+#ifndef NO_gdk_1keymap_1get_1for_1display
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1keymap_1get_1for_1display)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1keymap_1get_1for_1display_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1keymap_1get_1for_1display_FUNC);
/*
rc = (jlong)gdk_keymap_get_for_display((GdkDisplay *)arg0);
*/
@@ -1353,13 +1301,13 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1keymap_1get_1for_1display)
rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1keymap_1get_1for_1display_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1keymap_1get_1for_1display_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1keymap_1translate_1keyboard_1state
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1keymap_1translate_1keyboard_1state)
+#ifndef NO_gdk_1keymap_1translate_1keyboard_1state
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1keymap_1translate_1keyboard_1state)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5, jintArray arg6, jintArray arg7)
{
jint *lparg4=NULL;
@@ -1367,52 +1315,72 @@ JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1keymap_1translate_1keyboard_1state)
jint *lparg6=NULL;
jint *lparg7=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1keymap_1translate_1keyboard_1state_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1keymap_1translate_1keyboard_1state_FUNC);
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail;
+/*
rc = (jboolean)gdk_keymap_translate_keyboard_state((GdkKeymap *)arg0, (guint)arg1, (GdkModifierType)arg2, (gint)arg3, (guint *)lparg4, (gint *)lparg5, (gint *)lparg6, (GdkModifierType *)lparg7);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_keymap_translate_keyboard_state)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkKeymap *, guint, GdkModifierType, gint, guint *, gint *, gint *, GdkModifierType *))fp)((GdkKeymap *)arg0, (guint)arg1, (GdkModifierType)arg2, (gint)arg3, (guint *)lparg4, (gint *)lparg5, (gint *)lparg6, (GdkModifierType *)lparg7);
+ }
+ }
fail:
if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1keymap_1translate_1keyboard_1state_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1keymap_1translate_1keyboard_1state_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1keyval_1to_1lower
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1keyval_1to_1lower)
+#ifndef NO_gdk_1keyval_1name
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1keyval_1name)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1keyval_1name_FUNC);
+ rc = (jlong)gdk_keyval_name((guint)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1keyval_1name_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1keyval_1to_1lower
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1keyval_1to_1lower)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1keyval_1to_1lower_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1keyval_1to_1lower_FUNC);
rc = (jlong)gdk_keyval_to_lower(arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1keyval_1to_1lower_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1keyval_1to_1lower_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1keyval_1to_1unicode
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1keyval_1to_1unicode)
+#ifndef NO_gdk_1keyval_1to_1unicode
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1keyval_1to_1unicode)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1keyval_1to_1unicode_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1keyval_1to_1unicode_FUNC);
rc = (jlong)gdk_keyval_to_unicode(arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1keyval_1to_1unicode_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1keyval_1to_1unicode_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1monitor_1get_1geometry
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1monitor_1get_1geometry)
+#ifndef NO_gdk_1monitor_1get_1geometry
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1monitor_1get_1geometry)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1monitor_1get_1geometry_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1monitor_1get_1geometry_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
/*
gdk_monitor_get_geometry(arg0, lparg1);
@@ -1425,16 +1393,16 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1monitor_1get_1geometry)
}
fail:
if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1monitor_1get_1geometry_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1monitor_1get_1geometry_FUNC);
}
#endif
-#ifndef NO__1gdk_1monitor_1get_1scale_1factor
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1monitor_1get_1scale_1factor)
+#ifndef NO_gdk_1monitor_1get_1scale_1factor
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1monitor_1get_1scale_1factor)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1monitor_1get_1scale_1factor_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1monitor_1get_1scale_1factor_FUNC);
/*
rc = (jint)gdk_monitor_get_scale_factor(arg0);
*/
@@ -1444,37 +1412,17 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1monitor_1get_1scale_1factor)
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1monitor_1get_1scale_1factor_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1monitor_1get_1width_1mm
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1monitor_1get_1width_1mm)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1monitor_1get_1width_1mm_FUNC);
-/*
- rc = (jint)gdk_monitor_get_width_mm(arg0);
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_monitor_get_width_mm)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1monitor_1get_1width_1mm_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1monitor_1get_1scale_1factor_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1monitor_1get_1workarea
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1monitor_1get_1workarea)
+#ifndef NO_gdk_1monitor_1get_1workarea
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1monitor_1get_1workarea)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1monitor_1get_1workarea_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1monitor_1get_1workarea_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
/*
gdk_monitor_get_workarea(arg0, lparg1);
@@ -1487,16 +1435,16 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1monitor_1get_1workarea)
}
fail:
if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1monitor_1get_1workarea_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1monitor_1get_1workarea_FUNC);
}
#endif
-#ifndef NO__1gdk_1pango_1context_1get
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pango_1context_1get)
+#ifndef NO_gdk_1pango_1context_1get
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pango_1context_1get)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pango_1context_1get_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pango_1context_1get_FUNC);
/*
rc = (jlong)gdk_pango_context_get();
*/
@@ -1506,354 +1454,406 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pango_1context_1get)
rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1pango_1context_1get_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pango_1context_1get_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pango_1layout_1get_1clip_1region
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pango_1layout_1get_1clip_1region)
+#ifndef NO_gdk_1pango_1layout_1get_1clip_1region
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pango_1layout_1get_1clip_1region)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3, jint arg4)
{
jint *lparg3=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pango_1layout_1get_1clip_1region_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pango_1layout_1get_1clip_1region_FUNC);
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
rc = (jlong)gdk_pango_layout_get_clip_region((PangoLayout *)arg0, arg1, arg2, (gint *)lparg3, arg4);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pango_1layout_1get_1clip_1region_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pango_1layout_1get_1clip_1region_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1animation_1get_1iter
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1get_1iter)
+#ifndef NO_gdk_1pixbuf_1animation_1get_1iter
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1get_1iter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1get_1iter_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1animation_1get_1iter_FUNC);
rc = (jlong)gdk_pixbuf_animation_get_iter((GdkPixbufAnimation *)arg0, (const GTimeVal *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1get_1iter_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1get_1iter_FUNC);
return rc;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1pixbuf_1animation_1get_1static_1image
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1get_1static_1image)
+#ifndef NO_gdk_1pixbuf_1animation_1get_1static_1image
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1get_1static_1image)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1get_1static_1image_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1animation_1get_1static_1image_FUNC);
rc = (jlong)gdk_pixbuf_animation_get_static_image((GdkPixbufAnimation *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1get_1static_1image_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1get_1static_1image_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1animation_1is_1static_1image
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1is_1static_1image)
+#ifndef NO_gdk_1pixbuf_1animation_1is_1static_1image
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1is_1static_1image)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1is_1static_1image_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1animation_1is_1static_1image_FUNC);
rc = (jboolean)gdk_pixbuf_animation_is_static_image((GdkPixbufAnimation *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1is_1static_1image_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1is_1static_1image_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1animation_1iter_1advance
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1iter_1advance)
+#ifndef NO_gdk_1pixbuf_1animation_1iter_1advance
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1iter_1advance)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1iter_1advance_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1animation_1iter_1advance_FUNC);
rc = (jboolean)gdk_pixbuf_animation_iter_advance((GdkPixbufAnimationIter *)arg0, (const GTimeVal *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1iter_1advance_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1iter_1advance_FUNC);
return rc;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1pixbuf_1animation_1iter_1get_1delay_1time
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1iter_1get_1delay_1time)
+#ifndef NO_gdk_1pixbuf_1animation_1iter_1get_1delay_1time
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1iter_1get_1delay_1time)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC);
rc = (jint)gdk_pixbuf_animation_iter_get_delay_time((GdkPixbufAnimationIter *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1animation_1iter_1get_1pixbuf
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1animation_1iter_1get_1pixbuf)
+#ifndef NO_gdk_1pixbuf_1animation_1iter_1get_1pixbuf
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1animation_1iter_1get_1pixbuf)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC);
rc = (jlong)gdk_pixbuf_animation_iter_get_pixbuf((GdkPixbufAnimationIter *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1copy
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1copy)
+#ifndef NO_gdk_1pixbuf_1copy
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1copy)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1copy_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1copy_FUNC);
rc = (jlong)gdk_pixbuf_copy((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1copy_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1copy_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1copy_1area
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1pixbuf_1copy_1area)
+#ifndef NO_gdk_1pixbuf_1copy_1area
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1pixbuf_1copy_1area)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jlong arg5, jint arg6, jint arg7)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1copy_1area_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1copy_1area_FUNC);
gdk_pixbuf_copy_area((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, (GdkPixbuf *)arg5, arg6, arg7);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1copy_1area_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1copy_1area_FUNC);
}
#endif
-#ifndef NO__1gdk_1pixbuf_1format_1get_1name
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1format_1get_1name)
+#ifndef NO_gdk_1pixbuf_1format_1get_1name
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1format_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1format_1get_1name_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1format_1get_1name_FUNC);
rc = (jlong)gdk_pixbuf_format_get_name((GdkPixbufFormat *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1format_1get_1name_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1format_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1bits_1per_1sample
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1bits_1per_1sample)
+#ifndef NO_gdk_1pixbuf_1get_1bits_1per_1sample
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1bits_1per_1sample)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1bits_1per_1sample_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1bits_1per_1sample_FUNC);
rc = (jint)gdk_pixbuf_get_bits_per_sample((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1bits_1per_1sample_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1bits_1per_1sample_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1byte_1length
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1byte_1length)
+#ifndef NO_gdk_1pixbuf_1get_1from_1surface
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1from_1surface)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1from_1surface_FUNC);
+/*
+ rc = (jlong)gdk_pixbuf_get_from_surface((cairo_surface_t *)arg0, arg1, arg2, arg3, arg4);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_surface)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(cairo_surface_t *, jint, jint, jint, jint))fp)((cairo_surface_t *)arg0, arg1, arg2, arg3, arg4);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1from_1surface_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1pixbuf_1get_1from_1texture
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1from_1texture)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1byte_1length_FUNC);
- rc = (jlong)gdk_pixbuf_get_byte_length((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1byte_1length_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1from_1texture_FUNC);
+/*
+ rc = (jlong)gdk_pixbuf_get_from_texture((GdkTexture *)arg0);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_texture)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkTexture *))fp)((GdkTexture *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1from_1texture_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1pixbuf_1get_1from_1window
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1from_1window)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1from_1window_FUNC);
+/*
+ rc = (jlong)gdk_pixbuf_get_from_window((GdkWindow *)arg0, arg1, arg2, arg3, arg4);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_window)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkWindow *, jint, jint, jint, jint))fp)((GdkWindow *)arg0, arg1, arg2, arg3, arg4);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1from_1window_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1has_1alpha
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1has_1alpha)
+#ifndef NO_gdk_1pixbuf_1get_1has_1alpha
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1has_1alpha)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1has_1alpha_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1has_1alpha_FUNC);
rc = (jboolean)gdk_pixbuf_get_has_alpha((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1has_1alpha_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1has_1alpha_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1height
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1height)
+#ifndef NO_gdk_1pixbuf_1get_1height
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1height)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1height_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1height_FUNC);
rc = (jint)gdk_pixbuf_get_height((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1height_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1n_1channels
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1n_1channels)
+#ifndef NO_gdk_1pixbuf_1get_1n_1channels
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1n_1channels)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1n_1channels_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1n_1channels_FUNC);
rc = (jint)gdk_pixbuf_get_n_channels((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1n_1channels_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1n_1channels_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1pixels
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1pixels)
+#ifndef NO_gdk_1pixbuf_1get_1pixels
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1pixels)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1pixels_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1pixels_FUNC);
rc = (jlong)gdk_pixbuf_get_pixels((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1pixels_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1pixels_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1rowstride
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1rowstride)
+#ifndef NO_gdk_1pixbuf_1get_1rowstride
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1rowstride)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1rowstride_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1rowstride_FUNC);
rc = (jint)gdk_pixbuf_get_rowstride((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1rowstride_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1rowstride_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1get_1width
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1width)
+#ifndef NO_gdk_1pixbuf_1get_1width
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1pixbuf_1get_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1width_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1get_1width_FUNC);
rc = (jint)gdk_pixbuf_get_width((const GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1width_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1get_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1loader_1close
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1close)
+#ifndef NO_gdk_1pixbuf_1loader_1close
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1close)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1close_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1loader_1close_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_pixbuf_loader_close((GdkPixbufLoader *)arg0, (GError **)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1close_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1loader_1close_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1loader_1get_1animation
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1get_1animation)
+#ifndef NO_gdk_1pixbuf_1loader_1get_1animation
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1get_1animation)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1get_1animation_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1loader_1get_1animation_FUNC);
rc = (jlong)gdk_pixbuf_loader_get_animation((GdkPixbufLoader *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1get_1animation_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1loader_1get_1animation_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1loader_1get_1format
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1get_1format)
+#ifndef NO_gdk_1pixbuf_1loader_1get_1format
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1get_1format)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1get_1format_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1loader_1get_1format_FUNC);
rc = (jlong)gdk_pixbuf_loader_get_format((GdkPixbufLoader *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1get_1format_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1loader_1get_1format_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1loader_1get_1pixbuf
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1get_1pixbuf)
+#ifndef NO_gdk_1pixbuf_1loader_1get_1pixbuf
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1get_1pixbuf)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1loader_1get_1pixbuf_FUNC);
rc = (jlong)gdk_pixbuf_loader_get_pixbuf((GdkPixbufLoader *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1loader_1get_1pixbuf_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1loader_1new
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1new)
+#ifndef NO_gdk_1pixbuf_1loader_1new
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1new_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1loader_1new_FUNC);
rc = (jlong)gdk_pixbuf_loader_new();
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1new_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1loader_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1loader_1write
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1write)
+#ifndef NO_gdk_1pixbuf_1loader_1write
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1loader_1write)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlongArray arg3)
{
jlong *lparg3=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1write_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1loader_1write_FUNC);
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
rc = (jboolean)gdk_pixbuf_loader_write((GdkPixbufLoader *)arg0, (const guchar *)arg1, (gsize)arg2, (GError **)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1write_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1loader_1write_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1new
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new)
+#ifndef NO_gdk_1pixbuf_1new
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1new)
(JNIEnv *env, jclass that, jint arg0, jboolean arg1, jint arg2, jint arg3, jint arg4)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1new_FUNC);
rc = (jlong)gdk_pixbuf_new((GdkColorspace)arg0, (gboolean)arg1, arg2, arg3, arg4);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1new_1from_1data
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new_1from_1data)
+#ifndef NO_gdk_1pixbuf_1new_1from_1data
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1new_1from_1data)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2, jint arg3, jint arg4, jint arg5, jint arg6, jlong arg7, jlong arg8)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_1from_1data_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1new_1from_1data_FUNC);
rc = (jlong)gdk_pixbuf_new_from_data((const guchar *)arg0, (GdkColorspace)arg1, (gboolean)arg2, arg3, arg4, arg5, arg6, (GdkPixbufDestroyNotify)arg7, (gpointer)arg8);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_1from_1data_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1new_1from_1data_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1new_1from_1file
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new_1from_1file)
+#ifndef NO_gdk_1pixbuf_1new_1from_1file
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1new_1from_1file)
(JNIEnv *env, jclass that, jbyteArray arg0, jlongArray arg1)
{
jbyte *lparg0=NULL;
jlong *lparg1=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_1from_1file_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1new_1from_1file_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gdk_pixbuf_new_from_file((const char *)lparg0, (GError**)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_1from_1file_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1new_1from_1file_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1save_1to_1bufferv
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1save_1to_1bufferv)
+#ifndef NO_gdk_1pixbuf_1save_1to_1bufferv
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1pixbuf_1save_1to_1bufferv)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jlongArray arg2, jbyteArray arg3, jlongArray arg4, jlongArray arg5, jlongArray arg6)
{
jlong *lparg1=NULL;
@@ -1863,7 +1863,7 @@ JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1save_1to_1bufferv)
jlong *lparg5=NULL;
jlong *lparg6=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1save_1to_1bufferv_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1save_1to_1bufferv_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
@@ -1878,25 +1878,65 @@ fail:
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1save_1to_1bufferv_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1save_1to_1bufferv_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1pixbuf_1scale_1simple
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1scale_1simple)
+#ifndef NO_gdk_1pixbuf_1scale_1simple
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1pixbuf_1scale_1simple)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1scale_1simple_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1pixbuf_1scale_1simple_FUNC);
rc = (jlong)gdk_pixbuf_scale_simple((const GdkPixbuf *)arg0, arg1, arg2, (GdkInterpType)arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1scale_1simple_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1pixbuf_1scale_1simple_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1popup_1get_1parent
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1popup_1get_1parent)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1popup_1get_1parent_FUNC);
+ rc = (jlong)gdk_popup_get_parent((GdkPopup *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1popup_1get_1parent_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1property_1get
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1property_1get)
+#ifndef NO_gdk_1popup_1layout_1new
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1popup_1layout_1new)
+ (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2)
+{
+ GdkRectangle _arg0, *lparg0=NULL;
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1popup_1layout_1new_FUNC);
+ if (arg0) if ((lparg0 = getGdkRectangleFields(env, arg0, &_arg0)) == NULL) goto fail;
+ rc = (jlong)gdk_popup_layout_new((const GdkRectangle *)lparg0, (GdkGravity)arg1, (GdkGravity)arg2);
+fail:
+ if (arg0 && lparg0) setGdkRectangleFields(env, arg0, lparg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1popup_1layout_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1popup_1present
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1popup_1present)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jlong arg3)
+{
+ jboolean rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1popup_1present_FUNC);
+ rc = (jboolean)gdk_popup_present((GdkPopup *)arg0, arg1, arg2, (GdkPopupLayout *)arg3);
+ GDK_NATIVE_EXIT(env, that, gdk_1popup_1present_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1property_1get
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1property_1get)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jint arg5, jlongArray arg6, jintArray arg7, jintArray arg8, jlongArray arg9)
{
jlong *lparg6=NULL;
@@ -1904,7 +1944,7 @@ JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1property_1get)
jint *lparg8=NULL;
jlong *lparg9=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1property_1get_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1property_1get_FUNC);
if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail;
if (arg8) if ((lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL)) == NULL) goto fail;
@@ -1915,90 +1955,74 @@ fail:
if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0);
if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1property_1get_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1property_1get_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1rgba_1free
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1rgba_1free)
+#ifndef NO_gdk_1rgba_1free
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1rgba_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1free_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1rgba_1free_FUNC);
gdk_rgba_free((GdkRGBA *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1free_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1rgba_1free_FUNC);
}
#endif
-#ifndef NO__1gdk_1rgba_1hash
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1rgba_1hash)
- (JNIEnv *env, jclass that, jobject arg0)
-{
- GdkRGBA _arg0, *lparg0=NULL;
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1hash_FUNC);
- if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jint)gdk_rgba_hash((GdkRGBA *)lparg0);
-fail:
- if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1hash_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1rgba_1parse
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1rgba_1parse)
+#ifndef NO_gdk_1rgba_1parse
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1rgba_1parse)
(JNIEnv *env, jclass that, jobject arg0, jbyteArray arg1)
{
GdkRGBA _arg0, *lparg0=NULL;
jbyte *lparg1=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1parse_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1rgba_1parse_FUNC);
if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gdk_rgba_parse((GdkRGBA *)lparg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1parse_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1rgba_1parse_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1rgba_1to_1string
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1rgba_1to_1string)
+#ifndef NO_gdk_1rgba_1to_1string
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1rgba_1to_1string)
(JNIEnv *env, jclass that, jobject arg0)
{
GdkRGBA _arg0, *lparg0=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1to_1string_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1rgba_1to_1string_FUNC);
if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail;
rc = (jlong)gdk_rgba_to_string((GdkRGBA *)lparg0);
fail:
if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1to_1string_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1rgba_1to_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1default
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1screen_1get_1default)
+#ifndef NO_gdk_1screen_1get_1default
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1screen_1get_1default)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1default_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1default_FUNC);
rc = (jlong)gdk_screen_get_default();
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1default_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1monitor_1at_1point
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1at_1point)
+#ifndef NO_gdk_1screen_1get_1monitor_1at_1point
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1screen_1get_1monitor_1at_1point)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1at_1point_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1monitor_1at_1point_FUNC);
/*
rc = (jint)gdk_screen_get_monitor_at_point((GdkScreen *)arg0, (gint)arg1, (gint)arg2);
*/
@@ -2008,17 +2032,17 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1at_1point)
rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, gint, gint))fp)((GdkScreen *)arg0, (gint)arg1, (gint)arg2);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1at_1point_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1monitor_1at_1point_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1monitor_1at_1window
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1at_1window)
+#ifndef NO_gdk_1screen_1get_1monitor_1at_1window
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1screen_1get_1monitor_1at_1window)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1at_1window_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1monitor_1at_1window_FUNC);
/*
rc = (jint)gdk_screen_get_monitor_at_window((GdkScreen *)arg0, (GdkWindow *)arg1);
*/
@@ -2028,17 +2052,17 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1at_1window)
rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, GdkWindow *))fp)((GdkScreen *)arg0, (GdkWindow *)arg1);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1at_1window_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1monitor_1at_1window_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1monitor_1geometry
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1geometry)
+#ifndef NO_gdk_1screen_1get_1monitor_1geometry
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1screen_1get_1monitor_1geometry)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
GdkRectangle _arg2, *lparg2=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1geometry_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1monitor_1geometry_FUNC);
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
/*
gdk_screen_get_monitor_geometry((GdkScreen *)arg0, arg1, lparg2);
@@ -2051,16 +2075,16 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1geometry)
}
fail:
if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1geometry_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1monitor_1geometry_FUNC);
}
#endif
-#ifndef NO__1gdk_1screen_1get_1monitor_1scale_1factor
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1scale_1factor)
+#ifndef NO_gdk_1screen_1get_1monitor_1scale_1factor
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1screen_1get_1monitor_1scale_1factor)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1monitor_1scale_1factor_FUNC);
/*
rc = (jint)gdk_screen_get_monitor_scale_factor((GdkScreen *)arg0, (gint)arg1);
*/
@@ -2070,17 +2094,17 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1scale_1factor)
rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, gint))fp)((GdkScreen *)arg0, (gint)arg1);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1monitor_1scale_1factor_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1monitor_1workarea
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1workarea)
+#ifndef NO_gdk_1screen_1get_1monitor_1workarea
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1screen_1get_1monitor_1workarea)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
GdkRectangle _arg2, *lparg2=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1workarea_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1monitor_1workarea_FUNC);
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
/*
gdk_screen_get_monitor_workarea((GdkScreen *)arg0, arg1, lparg2);
@@ -2093,16 +2117,16 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1workarea)
}
fail:
if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1workarea_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1monitor_1workarea_FUNC);
}
#endif
-#ifndef NO__1gdk_1screen_1get_1n_1monitors
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1n_1monitors)
+#ifndef NO_gdk_1screen_1get_1n_1monitors
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1screen_1get_1n_1monitors)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1n_1monitors_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1n_1monitors_FUNC);
/*
rc = (jint)gdk_screen_get_n_monitors((GdkScreen *)arg0);
*/
@@ -2112,17 +2136,17 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1n_1monitors)
rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1n_1monitors_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1n_1monitors_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1primary_1monitor
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1primary_1monitor)
+#ifndef NO_gdk_1screen_1get_1primary_1monitor
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1screen_1get_1primary_1monitor)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1primary_1monitor_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1primary_1monitor_FUNC);
/*
rc = (jint)gdk_screen_get_primary_monitor((GdkScreen *)arg0);
*/
@@ -2132,41 +2156,41 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1primary_1monitor)
rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1primary_1monitor_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1primary_1monitor_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1resolution
-JNIEXPORT jdouble JNICALL GDK_NATIVE(_1gdk_1screen_1get_1resolution)
+#ifndef NO_gdk_1screen_1get_1resolution
+JNIEXPORT jdouble JNICALL GDK_NATIVE(gdk_1screen_1get_1resolution)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1resolution_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1resolution_FUNC);
rc = (jdouble)gdk_screen_get_resolution((GdkScreen *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1resolution_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1resolution_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1get_1system_1visual
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1screen_1get_1system_1visual)
+#ifndef NO_gdk_1screen_1get_1system_1visual
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1screen_1get_1system_1visual)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1system_1visual_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1get_1system_1visual_FUNC);
rc = (jlong)gdk_screen_get_system_visual((GdkScreen *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1system_1visual_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1get_1system_1visual_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1height
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1height)
+#ifndef NO_gdk_1screen_1height
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1screen_1height)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1height_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1height_FUNC);
/*
rc = (jint)gdk_screen_height();
*/
@@ -2176,29 +2200,29 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1height)
rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1height_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1is_1composited
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1screen_1is_1composited)
+#ifndef NO_gdk_1screen_1is_1composited
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1screen_1is_1composited)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1is_1composited_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1is_1composited_FUNC);
rc = (jboolean)gdk_screen_is_composited((GdkScreen *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1is_1composited_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1is_1composited_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1screen_1width
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1width)
+#ifndef NO_gdk_1screen_1width
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1screen_1width)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1width_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1screen_1width_FUNC);
/*
rc = (jint)gdk_screen_width();
*/
@@ -2208,17 +2232,46 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1width)
rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1width_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1screen_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1seat_1get_1keyboard
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1seat_1get_1keyboard)
+#ifndef NO_gdk_1scroll_1event_1get_1deltas
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1scroll_1event_1get_1deltas)
+ (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
+{
+ jdouble *lparg1=NULL;
+ jdouble *lparg2=NULL;
+ GDK_NATIVE_ENTER(env, that, gdk_1scroll_1event_1get_1deltas_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gdk_scroll_event_get_deltas((GdkEvent *)arg0, lparg1, lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1scroll_1event_1get_1deltas_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1scroll_1event_1get_1direction
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1scroll_1event_1get_1direction)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1scroll_1event_1get_1direction_FUNC);
+ rc = (jint)gdk_scroll_event_get_direction((GdkEvent *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1scroll_1event_1get_1direction_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gdk_1seat_1get_1keyboard
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1seat_1get_1keyboard)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1seat_1get_1keyboard_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1seat_1get_1keyboard_FUNC);
/*
rc = (jlong)gdk_seat_get_keyboard(arg0);
*/
@@ -2228,17 +2281,17 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1seat_1get_1keyboard)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1seat_1get_1keyboard_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1seat_1get_1keyboard_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1seat_1get_1pointer
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1seat_1get_1pointer)
+#ifndef NO_gdk_1seat_1get_1pointer
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1seat_1get_1pointer)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1seat_1get_1pointer_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1seat_1get_1pointer_FUNC);
/*
rc = (jlong)gdk_seat_get_pointer(arg0);
*/
@@ -2248,17 +2301,17 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1seat_1get_1pointer)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1seat_1get_1pointer_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1seat_1get_1pointer_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1seat_1grab
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1seat_1grab)
+#ifndef NO_gdk_1seat_1grab
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1seat_1grab)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jboolean arg3, jlong arg4, jlong arg5, jlong arg6, jlong arg7)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1seat_1grab_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1seat_1grab_FUNC);
/*
rc = (jint)gdk_seat_grab(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
*/
@@ -2268,16 +2321,16 @@ JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1seat_1grab)
rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jlong, jint, jboolean, jlong, jlong, jlong, jlong))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1seat_1grab_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1seat_1grab_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1seat_1ungrab
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1seat_1ungrab)
+#ifndef NO_gdk_1seat_1ungrab
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1seat_1ungrab)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1seat_1ungrab_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1seat_1ungrab_FUNC);
/*
gdk_seat_ungrab(arg0);
*/
@@ -2287,36 +2340,36 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1seat_1ungrab)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1seat_1ungrab_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1seat_1ungrab_FUNC);
}
#endif
-#ifndef NO__1gdk_1selection_1owner_1get
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1selection_1owner_1get)
+#ifndef NO_gdk_1selection_1owner_1get
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1selection_1owner_1get)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1selection_1owner_1get_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1selection_1owner_1get_FUNC);
gdk_selection_owner_get((GdkAtom)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1selection_1owner_1get_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1selection_1owner_1get_FUNC);
}
#endif
-#ifndef NO__1gdk_1selection_1owner_1set
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1selection_1owner_1set)
+#ifndef NO_gdk_1selection_1owner_1set
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1selection_1owner_1set)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jboolean arg3)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1selection_1owner_1set_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1selection_1owner_1set_FUNC);
gdk_selection_owner_set((GdkWindow *)arg0, (GdkAtom)arg1, (guint32)arg2, (gboolean)arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1selection_1owner_1set_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1selection_1owner_1set_FUNC);
}
#endif
-#ifndef NO__1gdk_1set_1program_1class
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1set_1program_1class)
+#ifndef NO_gdk_1set_1program_1class
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1set_1program_1class)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1set_1program_1class_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1set_1program_1class_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
/*
gdk_set_program_class((const char *)lparg0);
@@ -2329,517 +2382,405 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1set_1program_1class)
}
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1set_1program_1class_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1set_1program_1class_FUNC);
}
#endif
-#ifndef NO__1gdk_1surface_1create_1similar_1surface
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1surface_1create_1similar_1surface)
+#ifndef NO_gdk_1surface_1create_1similar_1surface
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1surface_1create_1similar_1surface)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1create_1similar_1surface_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1create_1similar_1surface_FUNC);
rc = (jlong)gdk_surface_create_similar_surface((GdkSurface *)arg0, (cairo_content_t)arg1, arg2, arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1create_1similar_1surface_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1create_1similar_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1destroy
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1destroy)
+#ifndef NO_gdk_1surface_1destroy
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1surface_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1destroy_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1destroy_FUNC);
gdk_surface_destroy((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1destroy_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1destroy_FUNC);
}
#endif
-#ifndef NO__1gdk_1surface_1focus
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1focus)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_gdk_1surface_1get_1device_1position
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1surface_1get_1device_1position)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdoubleArray arg2, jdoubleArray arg3, jintArray arg4)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1focus_FUNC);
- gdk_surface_focus((GdkSurface *)arg0, arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1focus_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1get_1children
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1surface_1get_1children)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1children_FUNC);
- rc = (jlong)gdk_surface_get_children((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1children_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1get_1device_1position
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1surface_1get_1device_1position)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jintArray arg3, jintArray arg4)
-{
- jint *lparg2=NULL;
- jint *lparg3=NULL;
+ jdouble *lparg2=NULL;
+ jdouble *lparg3=NULL;
jint *lparg4=NULL;
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1device_1position_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1get_1device_1position_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jlong)gdk_surface_get_device_position((GdkSurface *)arg0, (GdkDevice *)arg1, (gint *)lparg2, (gint *)lparg3, (GdkModifierType *)lparg4);
+ gdk_surface_get_device_position((GdkSurface *)arg0, (GdkDevice *)arg1, (double *)lparg2, (double *)lparg3, (GdkModifierType *)lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1device_1position_FUNC);
- return rc;
+ if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1get_1device_1position_FUNC);
}
#endif
-#ifndef NO__1gdk_1surface_1get_1display
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1surface_1get_1display)
+#ifndef NO_gdk_1surface_1get_1display
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1surface_1get_1display)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1display_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1get_1display_FUNC);
rc = (jlong)gdk_surface_get_display((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1display_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1get_1display_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1get_1frame_1extents
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1get_1frame_1extents)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GdkRectangle _arg1, *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1frame_1extents_FUNC);
- if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
- gdk_surface_get_frame_extents((GdkSurface *)arg0, (GdkRectangle *)lparg1);
-fail:
- if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1frame_1extents_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1get_1height
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1surface_1get_1height)
+#ifndef NO_gdk_1surface_1get_1height
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1surface_1get_1height)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1height_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1get_1height_FUNC);
rc = (jint)gdk_surface_get_height((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1height_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1get_1origin
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1surface_1get_1origin)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1origin_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)gdk_surface_get_origin((GdkSurface *)arg0, (gint *)lparg1, (gint *)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1origin_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1get_1root_1origin
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1get_1root_1origin)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1root_1origin_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- gdk_surface_get_root_origin((GdkSurface *)arg0, (gint *)lparg1, (gint *)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1root_1origin_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1get_1state
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1surface_1get_1state)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1state_FUNC);
- rc = (jint)gdk_surface_get_state((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1state_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1get_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1get_1user_1data
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1get_1user_1data)
- (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
-{
- jlong *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1user_1data_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gdk_surface_get_user_data((GdkSurface *)arg0, (gpointer *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1user_1data_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1get_1width
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1surface_1get_1width)
+#ifndef NO_gdk_1surface_1get_1width
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1surface_1get_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1get_1width_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1get_1width_FUNC);
rc = (jint)gdk_surface_get_width((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1get_1width_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1get_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1hide
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1hide)
+#ifndef NO_gdk_1surface_1hide
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1surface_1hide)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1hide_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1hide_FUNC);
gdk_surface_hide((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1hide_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1hide_FUNC);
}
#endif
-#ifndef NO__1gdk_1surface_1invalidate_1rect
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1invalidate_1rect)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+#ifndef NO_gdk_1surface_1new_1popup
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1surface_1new_1popup)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GdkRectangle _arg1, *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1invalidate_1rect_FUNC);
- if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
- gdk_surface_invalidate_rect((GdkSurface *)arg0, (GdkRectangle *)lparg1);
-fail:
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1invalidate_1rect_FUNC);
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1new_1popup_FUNC);
+ rc = (jlong)gdk_surface_new_popup((GdkSurface *)arg0, arg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1new_1popup_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1invalidate_1region
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1invalidate_1region)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gdk_1surface_1new_1toplevel
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1surface_1new_1toplevel)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1invalidate_1region_FUNC);
- gdk_surface_invalidate_region((GdkSurface *)arg0, (const cairo_region_t *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1invalidate_1region_FUNC);
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1new_1toplevel_FUNC);
+/*
+ rc = (jlong)gdk_surface_new_toplevel((GdkDisplay *)arg0);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_surface_new_toplevel)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1new_1toplevel_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1lower
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1lower)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gdk_1surface_1set_1cursor
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1surface_1set_1cursor)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1lower_FUNC);
- gdk_surface_lower((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1lower_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1set_1cursor_FUNC);
+ gdk_surface_set_cursor((GdkSurface *)arg0, (GdkCursor *)arg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1set_1cursor_FUNC);
}
#endif
-#ifndef NO__1gdk_1surface_1move
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1move)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+#ifndef NO_gdk_1surface_1set_1input_1region
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1surface_1set_1input_1region)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1move_FUNC);
- gdk_surface_move((GdkSurface *)arg0, arg1, arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1move_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1set_1input_1region_FUNC);
+ gdk_surface_set_input_region((GdkSurface *)arg0, (cairo_region_t *)arg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1set_1input_1region_FUNC);
}
#endif
-#ifndef NO__1gdk_1surface_1move_1resize
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1move_1resize)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+#ifndef NO_gdk_1surface_1set_1opaque_1region
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1surface_1set_1opaque_1region)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1move_1resize_FUNC);
- gdk_surface_move_resize((GdkSurface *)arg0, arg1, arg2, arg3, arg4);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1move_1resize_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1surface_1set_1opaque_1region_FUNC);
+ gdk_surface_set_opaque_region((GdkSurface *)arg0, (cairo_region_t *)arg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1surface_1set_1opaque_1region_FUNC);
}
#endif
-#ifndef NO__1gdk_1surface_1new_1child
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1surface_1new_1child)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+#ifndef NO_gdk_1text_1property_1to_1utf8_1list_1for_1display
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1text_1property_1to_1utf8_1list_1for_1display)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jint arg4, jlongArray arg5)
{
- GdkRectangle _arg1, *lparg1=NULL;
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1new_1child_FUNC);
- if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jlong)gdk_surface_new_child((GdkSurface *)arg0, lparg1);
+ jlong *lparg5=NULL;
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC);
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jint)gdk_text_property_to_utf8_list_for_display((GdkDisplay *)arg0, (GdkAtom)arg1, arg2, (guchar *)arg3, arg4, (gchar ***)lparg5);
fail:
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1new_1child_FUNC);
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
+ GDK_NATIVE_EXIT(env, that, gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1raise
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1raise)
+#ifndef NO_gdk_1texture_1new_1for_1pixbuf
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1texture_1new_1for_1pixbuf)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1raise_FUNC);
- gdk_surface_raise((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1raise_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1resize
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1resize)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1resize_FUNC);
- gdk_surface_resize((GdkSurface *)arg0, arg1, arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1resize_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1surface_1restack
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1restack)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1restack_FUNC);
- gdk_surface_restack((GdkSurface *)arg0, (GdkSurface *)arg1, (gboolean)arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1restack_FUNC);
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1texture_1new_1for_1pixbuf_FUNC);
+ rc = (jlong)gdk_texture_new_for_pixbuf((GdkPixbuf *)arg0);
+ GDK_NATIVE_EXIT(env, that, gdk_1texture_1new_1for_1pixbuf_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1set_1cursor
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1set_1cursor)
+#ifndef NO_gdk_1texture_1new_1from_1file
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1texture_1new_1from_1file)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1set_1cursor_FUNC);
- gdk_surface_set_cursor((GdkSurface *)arg0, (GdkCursor *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1set_1cursor_FUNC);
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1texture_1new_1from_1file_FUNC);
+ rc = (jlong)gdk_texture_new_from_file((GFile *)arg0, (GError **)arg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1texture_1new_1from_1file_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gdk_1surface_1set_1decorations
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1set_1decorations)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_gdk_1threads_1add_1idle
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1threads_1add_1idle)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1set_1decorations_FUNC);
- gdk_surface_set_decorations((GdkSurface *)arg0, (GdkWMDecoration)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1set_1decorations_FUNC);
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1threads_1add_1idle_FUNC);
+ rc = (jint)gdk_threads_add_idle((GSourceFunc)arg0, (gpointer)arg1);
+ GDK_NATIVE_EXIT(env, that, gdk_1threads_1add_1idle_FUNC);
+ return rc;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1surface_1set_1functions
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1set_1functions)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_gdk_1threads_1add_1timeout
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1threads_1add_1timeout)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1set_1functions_FUNC);
- gdk_surface_set_functions((GdkSurface *)arg0, (GdkWMFunction)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1set_1functions_FUNC);
+ jint rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1threads_1add_1timeout_FUNC);
+ rc = (jint)gdk_threads_add_timeout(arg0, (GSourceFunc)arg1, (gpointer)arg2);
+ GDK_NATIVE_EXIT(env, that, gdk_1threads_1add_1timeout_FUNC);
+ return rc;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1surface_1set_1user_1data
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1set_1user_1data)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gdk_1threads_1enter
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1threads_1enter)
+ (JNIEnv *env, jclass that)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1set_1user_1data_FUNC);
- gdk_surface_set_user_data((GdkSurface *)arg0, (gpointer)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1set_1user_1data_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1threads_1enter_FUNC);
+ gdk_threads_enter();
+ GDK_NATIVE_EXIT(env, that, gdk_1threads_1enter_FUNC);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1surface_1show
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1show)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gdk_1threads_1init
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1threads_1init)
+ (JNIEnv *env, jclass that)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1show_FUNC);
- gdk_surface_show((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1show_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1threads_1init_FUNC);
+ gdk_threads_init();
+ GDK_NATIVE_EXIT(env, that, gdk_1threads_1init_FUNC);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1surface_1show_1unraised
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1show_1unraised)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gdk_1threads_1leave
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1threads_1leave)
+ (JNIEnv *env, jclass that)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1show_1unraised_FUNC);
- gdk_surface_show_unraised((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1show_1unraised_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1threads_1leave_FUNC);
+ gdk_threads_leave();
+ GDK_NATIVE_EXIT(env, that, gdk_1threads_1leave_FUNC);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1text_1property_1to_1utf8_1list_1for_1display
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1text_1property_1to_1utf8_1list_1for_1display)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jint arg4, jlongArray arg5)
+#ifndef NO_gdk_1toplevel_1layout_1new
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1toplevel_1layout_1new)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
{
- jlong *lparg5=NULL;
- jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC);
- if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)gdk_text_property_to_utf8_list_for_display((GdkDisplay *)arg0, (GdkAtom)arg1, arg2, (guchar *)arg3, arg4, (gchar ***)lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC);
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1toplevel_1layout_1new_FUNC);
+/*
+ rc = (jlong)gdk_toplevel_layout_new(arg0, arg1);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_toplevel_layout_new)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jint, jint))fp)(arg0, arg1);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1toplevel_1layout_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1texture_1new_1for_1pixbuf
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1texture_1new_1for_1pixbuf)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gdk_1toplevel_1present
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1toplevel_1present)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jlong arg3)
{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1texture_1new_1for_1pixbuf_FUNC);
- rc = (jlong)gdk_texture_new_for_pixbuf((GdkPixbuf *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1texture_1new_1for_1pixbuf_FUNC);
+ jboolean rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1toplevel_1present_FUNC);
+/*
+ rc = (jboolean)gdk_toplevel_present((GdkToplevel *)arg0, arg1, arg2, (GdkToplevelLayout *)arg3);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_toplevel_present)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkToplevel *, jint, jint, GdkToplevelLayout *))fp)((GdkToplevel *)arg0, arg1, arg2, (GdkToplevelLayout *)arg3);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1toplevel_1present_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1unicode_1to_1keyval
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1unicode_1to_1keyval)
+#ifndef NO_gdk_1unicode_1to_1keyval
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1unicode_1to_1keyval)
(JNIEnv *env, jclass that, jint arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1unicode_1to_1keyval_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1unicode_1to_1keyval_FUNC);
rc = (jint)gdk_unicode_to_keyval(arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1unicode_1to_1keyval_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1unicode_1to_1keyval_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1utf8_1to_1string_1target
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1utf8_1to_1string_1target)
+#ifndef NO_gdk_1utf8_1to_1string_1target
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1utf8_1to_1string_1target)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1utf8_1to_1string_1target_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1utf8_1to_1string_1target_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
rc = (jlong)gdk_utf8_to_string_target((const gchar *)lparg0);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_utf8_to_string_target)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
+ }
+ }
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1utf8_1to_1string_1target_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1utf8_1to_1string_1target_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1visual_1get_1depth
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1visual_1get_1depth)
+#ifndef NO_gdk_1visual_1get_1depth
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1visual_1get_1depth)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1visual_1get_1depth_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1visual_1get_1depth_FUNC);
rc = (jint)gdk_visual_get_depth((GdkVisual *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1visual_1get_1depth_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1visual_1get_1depth_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1begin_1draw_1frame
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1begin_1draw_1frame)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1begin_1draw_1frame_FUNC);
-/*
- rc = (jlong)gdk_window_begin_draw_frame((GdkWindow *)arg0, (cairo_region_t *)arg1);
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_window_begin_draw_frame)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkWindow *, cairo_region_t *))fp)((GdkWindow *)arg0, (cairo_region_t *)arg1);
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1begin_1draw_1frame_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1window_1create_1similar_1surface
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1create_1similar_1surface)
+#ifndef NO_gdk_1window_1create_1similar_1surface
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1window_1create_1similar_1surface)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1create_1similar_1surface_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1create_1similar_1surface_FUNC);
rc = (jlong)gdk_window_create_similar_surface((GdkWindow *)arg0, (cairo_content_t)arg1, arg2, arg3);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1create_1similar_1surface_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1create_1similar_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1destroy
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1destroy)
+#ifndef NO_gdk_1window_1destroy
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1destroy_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1destroy_FUNC);
gdk_window_destroy((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1destroy_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1destroy_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1end_1draw_1frame
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1end_1draw_1frame)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1end_1draw_1frame_FUNC);
-/*
- rc = (jlong)gdk_window_end_draw_frame((GdkWindow *)arg0, (GdkDrawingContext *)arg1);
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_window_end_draw_frame)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkWindow *, GdkDrawingContext *))fp)((GdkWindow *)arg0, (GdkDrawingContext *)arg1);
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1end_1draw_1frame_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1window_1focus
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1focus)
+#ifndef NO_gdk_1window_1focus
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1focus)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1focus_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1focus_FUNC);
gdk_window_focus((GdkWindow *)arg0, arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1focus_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1focus_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1get_1children
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1get_1children)
+#ifndef NO_gdk_1window_1get_1children
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1window_1get_1children)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1children_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1children_FUNC);
rc = (jlong)gdk_window_get_children((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1children_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1children_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1device_1position
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1get_1device_1position)
+#ifndef NO_gdk_1window_1get_1device_1position
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1window_1get_1device_1position)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jintArray arg3, jintArray arg4)
{
jint *lparg2=NULL;
jint *lparg3=NULL;
jint *lparg4=NULL;
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1device_1position_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1device_1position_FUNC);
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
@@ -2848,427 +2789,398 @@ fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1device_1position_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1device_1position_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1display
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1get_1display)
+#ifndef NO_gdk_1window_1get_1display
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1window_1get_1display)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1display_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1display_FUNC);
rc = (jlong)gdk_window_get_display((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1display_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1display_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1events
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1events)
+#ifndef NO_gdk_1window_1get_1events
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1window_1get_1events)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1events_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1events_FUNC);
rc = (jint)gdk_window_get_events((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1events_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1events_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1frame_1extents
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1frame_1extents)
+#ifndef NO_gdk_1window_1get_1frame_1extents
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1get_1frame_1extents)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1frame_1extents_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1frame_1extents_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
gdk_window_get_frame_extents((GdkWindow *)arg0, (GdkRectangle *)lparg1);
fail:
if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1frame_1extents_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1frame_1extents_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1get_1height
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1height)
+#ifndef NO_gdk_1window_1get_1height
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1window_1get_1height)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1height_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1height_FUNC);
rc = (jint)gdk_window_get_height((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1height_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1origin
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1origin)
+#ifndef NO_gdk_1window_1get_1origin
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1window_1get_1origin)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1origin_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1origin_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)gdk_window_get_origin((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1origin_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1origin_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1parent
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1get_1parent)
+#ifndef NO_gdk_1window_1get_1parent
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1window_1get_1parent)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1parent_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1parent_FUNC);
rc = (jlong)gdk_window_get_parent((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1parent_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1parent_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1root_1origin
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1root_1origin)
+#ifndef NO_gdk_1window_1get_1root_1origin
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1get_1root_1origin)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1root_1origin_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1root_1origin_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
gdk_window_get_root_origin((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1root_1origin_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1root_1origin_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1get_1state
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1state)
+#ifndef NO_gdk_1window_1get_1state
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1window_1get_1state)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1state_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1state_FUNC);
rc = (jint)gdk_window_get_state((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1state_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1state_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1user_1data
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1user_1data)
+#ifndef NO_gdk_1window_1get_1user_1data
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1get_1user_1data)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1user_1data_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1user_1data_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
gdk_window_get_user_data((GdkWindow *)arg0, (gpointer *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1user_1data_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1user_1data_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1get_1visible_1region
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1get_1visible_1region)
+#ifndef NO_gdk_1window_1get_1visible_1region
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1window_1get_1visible_1region)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1visible_1region_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1visible_1region_FUNC);
rc = (jlong)gdk_window_get_visible_region((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1visible_1region_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1visible_1region_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1get_1width
-JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1width)
+#ifndef NO_gdk_1window_1get_1width
+JNIEXPORT jint JNICALL GDK_NATIVE(gdk_1window_1get_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1width_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1get_1width_FUNC);
rc = (jint)gdk_window_get_width((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1width_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1get_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1window_1hide
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1hide)
+#ifndef NO_gdk_1window_1hide
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1hide)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1hide_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1hide_FUNC);
gdk_window_hide((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1hide_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1hide_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1invalidate_1rect
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1invalidate_1rect)
+#ifndef NO_gdk_1window_1invalidate_1rect
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1invalidate_1rect)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jboolean arg2)
{
GdkRectangle _arg1, *lparg1=NULL;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1rect_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1invalidate_1rect_FUNC);
if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
gdk_window_invalidate_rect((GdkWindow *)arg0, (GdkRectangle *)lparg1, (gboolean)arg2);
fail:
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1invalidate_1rect_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1invalidate_1rect_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1invalidate_1region
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1invalidate_1region)
+#ifndef NO_gdk_1window_1invalidate_1region
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1invalidate_1region)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1region_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1invalidate_1region_FUNC);
gdk_window_invalidate_region((GdkWindow *)arg0, (const cairo_region_t *)arg1, (gboolean)arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1invalidate_1region_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1invalidate_1region_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1lower
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1lower)
+#ifndef NO_gdk_1window_1lower
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1lower)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1lower_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1lower_FUNC);
gdk_window_lower((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1lower_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1lower_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1move
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1move)
+#ifndef NO_gdk_1window_1move
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1move)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1move_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1move_FUNC);
gdk_window_move((GdkWindow *)arg0, arg1, arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1move_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1move_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1move_1resize
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1move_1resize)
+#ifndef NO_gdk_1window_1move_1resize
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1move_1resize)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1move_1resize_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1move_1resize_FUNC);
gdk_window_move_resize((GdkWindow *)arg0, arg1, arg2, arg3, arg4);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1move_1resize_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1move_1resize_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1new
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1new)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
-{
- GdkWindowAttr _arg1, *lparg1=NULL;
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1new_FUNC);
- if (arg1) if ((lparg1 = getGdkWindowAttrFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jlong)gdk_window_new((GdkWindow *)arg0, lparg1, arg2);
-fail:
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1window_1process_1all_1updates
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1process_1all_1updates)
- (JNIEnv *env, jclass that)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1process_1all_1updates_FUNC);
-/*
- gdk_window_process_all_updates();
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_window_process_all_updates)
- if (fp) {
- ((void (CALLING_CONVENTION*)())fp)();
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1process_1all_1updates_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1window_1process_1updates
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1process_1updates)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1process_1updates_FUNC);
-/*
- gdk_window_process_updates((GdkWindow *)arg0, (gboolean)arg1);
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_window_process_updates)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GdkWindow *, gboolean))fp)((GdkWindow *)arg0, (gboolean)arg1);
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1process_1updates_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1window_1raise
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1raise)
+#ifndef NO_gdk_1window_1raise
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1raise)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1raise_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1raise_FUNC);
gdk_window_raise((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1raise_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1raise_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1resize
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1resize)
+#ifndef NO_gdk_1window_1resize
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1resize)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1resize_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1resize_FUNC);
gdk_window_resize((GdkWindow *)arg0, arg1, arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1resize_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1resize_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1restack
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1restack)
+#ifndef NO_gdk_1window_1restack
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1restack)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1restack_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1restack_FUNC);
gdk_window_restack((GdkWindow *)arg0, (GdkWindow *)arg1, (gboolean)arg2);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1restack_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1restack_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1set_1background_1pattern
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1background_1pattern)
+#ifndef NO_gdk_1window_1set_1background_1pattern
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1set_1background_1pattern)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1background_1pattern_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1set_1background_1pattern_FUNC);
gdk_window_set_background_pattern((GdkWindow *)arg0, (cairo_pattern_t *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1background_1pattern_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1set_1background_1pattern_FUNC);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1gdk_1window_1set_1cursor
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1cursor)
+#ifndef NO_gdk_1window_1set_1cursor
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1set_1cursor)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1cursor_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1set_1cursor_FUNC);
gdk_window_set_cursor((GdkWindow *)arg0, (GdkCursor *)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1cursor_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1set_1cursor_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1set_1decorations
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1decorations)
+#ifndef NO_gdk_1window_1set_1decorations
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1set_1decorations)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1decorations_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1set_1decorations_FUNC);
gdk_window_set_decorations((GdkWindow *)arg0, (GdkWMDecoration)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1decorations_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1set_1decorations_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1set_1events
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1events)
+#ifndef NO_gdk_1window_1set_1events
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1set_1events)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1events_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1set_1events_FUNC);
gdk_window_set_events((GdkWindow *)arg0, arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1events_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1set_1events_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1set_1functions
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1functions)
+#ifndef NO_gdk_1window_1set_1functions
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1set_1functions)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1functions_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1set_1functions_FUNC);
gdk_window_set_functions((GdkWindow *)arg0, (GdkWMFunction)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1functions_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1set_1functions_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1set_1override_1redirect
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1override_1redirect)
+#ifndef NO_gdk_1window_1set_1override_1redirect
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1set_1override_1redirect)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1override_1redirect_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1set_1override_1redirect_FUNC);
gdk_window_set_override_redirect((GdkWindow *)arg0, (gboolean)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1override_1redirect_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1set_1override_1redirect_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1set_1user_1data
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1user_1data)
+#ifndef NO_gdk_1window_1set_1user_1data
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1set_1user_1data)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1user_1data_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1set_1user_1data_FUNC);
gdk_window_set_user_data((GdkWindow *)arg0, (gpointer)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1user_1data_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1set_1user_1data_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1show
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1show)
+#ifndef NO_gdk_1window_1show
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1show)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1show_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1show_FUNC);
gdk_window_show((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1show_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1show_FUNC);
}
#endif
-#ifndef NO__1gdk_1window_1show_1unraised
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1show_1unraised)
+#ifndef NO_gdk_1window_1show_1unraised
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1window_1show_1unraised)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1window_1show_1unraised_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1window_1show_1unraised_FUNC);
gdk_window_show_unraised((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1window_1show_1unraised_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1window_1show_1unraised_FUNC);
}
#endif
-#ifndef NO__1gdk_1x11_1display_1error_1trap_1pop_1ignored
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1x11_1display_1error_1trap_1pop_1ignored)
+#ifndef NO_gdk_1x11_1display_1error_1trap_1pop_1ignored
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1x11_1display_1error_1trap_1pop_1ignored)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1error_1trap_1pop_1ignored_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1display_1error_1trap_1pop_1ignored_FUNC);
gdk_x11_display_error_trap_pop_ignored((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1error_1trap_1pop_1ignored_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1display_1error_1trap_1pop_1ignored_FUNC);
}
#endif
-#ifndef NO__1gdk_1x11_1display_1error_1trap_1push
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1x11_1display_1error_1trap_1push)
+#ifndef NO_gdk_1x11_1display_1error_1trap_1push
+JNIEXPORT void JNICALL GDK_NATIVE(gdk_1x11_1display_1error_1trap_1push)
(JNIEnv *env, jclass that, jlong arg0)
{
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1error_1trap_1push_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1display_1error_1trap_1push_FUNC);
gdk_x11_display_error_trap_push((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1error_1trap_1push_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1display_1error_1trap_1push_FUNC);
+}
+#endif
+
+#ifndef NO_gdk_1x11_1display_1get_1default_1group
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1display_1get_1default_1group)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1display_1get_1default_1group_FUNC);
+/*
+ rc = (jlong)gdk_x11_display_get_default_group((GdkDisplay *)arg0);
+*/
+ {
+ GDK_LOAD_FUNCTION(fp, gdk_x11_display_get_default_group)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+ }
+ }
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1display_1get_1default_1group_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1display_1get_1xdisplay
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1display_1get_1xdisplay)
+#ifndef NO_gdk_1x11_1display_1get_1xdisplay
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1display_1get_1xdisplay)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1display_1get_1xdisplay_FUNC);
rc = (jlong)gdk_x11_display_get_xdisplay((GdkDisplay *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1display_1get_1xdisplay_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1display_1utf8_1to_1compound_1text
-JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1x11_1display_1utf8_1to_1compound_1text)
+#ifndef NO_gdk_1x11_1display_1utf8_1to_1compound_1text
+JNIEXPORT jboolean JNICALL GDK_NATIVE(gdk_1x11_1display_1utf8_1to_1compound_1text)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlongArray arg2, jintArray arg3, jlongArray arg4, jintArray arg5)
{
jbyte *lparg1=NULL;
@@ -3277,7 +3189,7 @@ JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1x11_1display_1utf8_1to_1compound_1t
jlong *lparg4=NULL;
jint *lparg5=NULL;
jboolean rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
@@ -3290,29 +3202,29 @@ fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1get_1default_1xdisplay
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1get_1default_1xdisplay)
+#ifndef NO_gdk_1x11_1get_1default_1xdisplay
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1get_1default_1xdisplay)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1get_1default_1xdisplay_FUNC);
rc = (jlong)gdk_x11_get_default_xdisplay();
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1get_1default_1xdisplay_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1screen_1get_1window_1manager_1name
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1screen_1get_1window_1manager_1name)
+#ifndef NO_gdk_1x11_1screen_1get_1window_1manager_1name
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1screen_1get_1window_1manager_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1screen_1get_1window_1manager_1name_FUNC);
/*
rc = (jlong)gdk_x11_screen_get_window_manager_name(arg0);
*/
@@ -3322,17 +3234,17 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1screen_1get_1window_1manager_1nam
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1screen_1get_1window_1manager_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1screen_1lookup_1visual
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1screen_1lookup_1visual)
+#ifndef NO_gdk_1x11_1screen_1lookup_1visual
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1screen_1lookup_1visual)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1screen_1lookup_1visual_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1screen_1lookup_1visual_FUNC);
/*
rc = (jlong)gdk_x11_screen_lookup_visual(arg0, (VisualID)arg1);
*/
@@ -3342,2503 +3254,1646 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1screen_1lookup_1visual)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, VisualID))fp)(arg0, (VisualID)arg1);
}
}
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1screen_1lookup_1visual_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1screen_1lookup_1visual_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1surface_1get_1xid
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1surface_1get_1xid)
+#ifndef NO_gdk_1x11_1surface_1get_1xid
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1surface_1get_1xid)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1surface_1get_1xid_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1surface_1get_1xid_FUNC);
rc = (jlong)gdk_x11_surface_get_xid((GdkSurface *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1surface_1get_1xid_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1surface_1get_1xid_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1surface_1lookup_1for_1display
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1surface_1lookup_1for_1display)
+#ifndef NO_gdk_1x11_1surface_1lookup_1for_1display
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1surface_1lookup_1for_1display)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1surface_1lookup_1for_1display_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1surface_1lookup_1for_1display_FUNC);
rc = (jlong)gdk_x11_surface_lookup_for_display((GdkDisplay *)arg0, (Window)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1surface_1lookup_1for_1display_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gdk_1x11_1visual_1get_1xvisual
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1visual_1get_1xvisual)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1visual_1get_1xvisual_FUNC);
-/*
- rc = (jlong)gdk_x11_visual_get_xvisual(arg0);
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_x11_visual_get_xvisual)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1visual_1get_1xvisual_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1surface_1lookup_1for_1display_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1window_1get_1xid
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1window_1get_1xid)
+#ifndef NO_gdk_1x11_1window_1get_1xid
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1window_1get_1xid)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1window_1get_1xid_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1window_1get_1xid_FUNC);
rc = (jlong)gdk_x11_window_get_xid((GdkWindow *)arg0);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1window_1get_1xid_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1window_1get_1xid_FUNC);
return rc;
}
#endif
-#ifndef NO__1gdk_1x11_1window_1lookup_1for_1display
-JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1x11_1window_1lookup_1for_1display)
+#ifndef NO_gdk_1x11_1window_1lookup_1for_1display
+JNIEXPORT jlong JNICALL GDK_NATIVE(gdk_1x11_1window_1lookup_1for_1display)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1window_1lookup_1for_1display_FUNC);
+ GDK_NATIVE_ENTER(env, that, gdk_1x11_1window_1lookup_1for_1display_FUNC);
rc = (jlong)gdk_x11_window_lookup_for_display((GdkDisplay *)arg0, (Window)arg1);
- GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1window_1lookup_1for_1display_FUNC);
+ GDK_NATIVE_EXIT(env, that, gdk_1x11_1window_1lookup_1for_1display_FUNC);
return rc;
}
#endif
-#ifndef NO_gdk_1threads_1leave
-JNIEXPORT void JNICALL GDK_NATIVE(gdk_1threads_1leave)
- (JNIEnv *env, jclass that)
-{
- GDK_NATIVE_ENTER(env, that, gdk_1threads_1leave_FUNC);
- gdk_threads_leave();
- GDK_NATIVE_EXIT(env, that, gdk_1threads_1leave_FUNC);
-}
-#endif
-
#ifndef GTK_NATIVE
#define GTK_NATIVE(func) Java_org_eclipse_swt_internal_gtk_GTK_##func
#endif
-#ifndef NO_GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE
-JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE)
+#ifndef NO_GET_1FUNCTION_1POINTER_1gtk_1false
+JNIEXPORT jlong JNICALL GTK_NATIVE(GET_1FUNCTION_1POINTER_1gtk_1false)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC);
- rc = (jlong)GTK_TYPE_TEXT_VIEW_ACCESSIBLE;
- GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC);
+ GTK_NATIVE_ENTER(env, that, GET_1FUNCTION_1POINTER_1gtk_1false_FUNC);
+ rc = (jlong)GET_FUNCTION_POINTER_gtk_false();
+ GTK_NATIVE_EXIT(env, that, GET_1FUNCTION_1POINTER_1gtk_1false_FUNC);
return rc;
}
#endif
-#ifndef NO_GTK_1WIDGET_1GET_1CLASS
-JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1WIDGET_1GET_1CLASS)
+#ifndef NO_GTK_1IS_1ACCEL_1LABEL
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1ACCEL_1LABEL)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, GTK_1WIDGET_1GET_1CLASS_FUNC);
- rc = (jlong)GTK_WIDGET_GET_CLASS((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, GTK_1WIDGET_1GET_1CLASS_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GtkAllocation_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkAllocation_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkAllocation_1sizeof_FUNC);
- rc = (jint)GtkAllocation_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkAllocation_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GtkBorder_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkBorder_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkBorder_1sizeof_FUNC);
- rc = (jint)GtkBorder_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkBorder_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GtkCellRendererPixbufClass_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererPixbufClass_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkCellRendererPixbufClass_1sizeof_FUNC);
- rc = (jint)GtkCellRendererPixbufClass_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkCellRendererPixbufClass_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GtkCellRendererPixbuf_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererPixbuf_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkCellRendererPixbuf_1sizeof_FUNC);
- rc = (jint)GtkCellRendererPixbuf_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkCellRendererPixbuf_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GtkCellRendererTextClass_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererTextClass_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkCellRendererTextClass_1sizeof_FUNC);
- rc = (jint)GtkCellRendererTextClass_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkCellRendererTextClass_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1ACCEL_1LABEL_FUNC);
+ rc = (jboolean)GTK_IS_ACCEL_LABEL(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1ACCEL_1LABEL_FUNC);
return rc;
}
#endif
-#ifndef NO_GtkCellRendererText_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererText_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1BOX
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1BOX)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkCellRendererText_1sizeof_FUNC);
- rc = (jint)GtkCellRendererText_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkCellRendererText_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1BOX_FUNC);
+ rc = (jboolean)GTK_IS_BOX(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1BOX_FUNC);
return rc;
}
#endif
-#ifndef NO_GtkCellRendererToggleClass_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererToggleClass_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1BUTTON
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1BUTTON)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkCellRendererToggleClass_1sizeof_FUNC);
- rc = (jint)GtkCellRendererToggleClass_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkCellRendererToggleClass_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1BUTTON_FUNC);
+ rc = (jboolean)GTK_IS_BUTTON(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1BUTTON_FUNC);
return rc;
}
#endif
-#ifndef NO_GtkCellRendererToggle_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererToggle_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1CELL_1RENDERER_1PIXBUF
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1CELL_1RENDERER_1PIXBUF)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkCellRendererToggle_1sizeof_FUNC);
- rc = (jint)GtkCellRendererToggle_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkCellRendererToggle_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC);
+ rc = (jboolean)GTK_IS_CELL_RENDERER_PIXBUF(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC);
return rc;
}
#endif
-#ifndef NO_GtkRequisition_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkRequisition_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1CELL_1RENDERER_1TEXT
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1CELL_1RENDERER_1TEXT)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkRequisition_1sizeof_FUNC);
- rc = (jint)GtkRequisition_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkRequisition_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1CELL_1RENDERER_1TEXT_FUNC);
+ rc = (jboolean)GTK_IS_CELL_RENDERER_TEXT(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1CELL_1RENDERER_1TEXT_FUNC);
return rc;
}
#endif
-#ifndef NO_GtkTargetEntry_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkTargetEntry_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1CELL_1RENDERER_1TOGGLE
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1CELL_1RENDERER_1TOGGLE)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkTargetEntry_1sizeof_FUNC);
- rc = (jint)GtkTargetEntry_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkTargetEntry_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1CELL_1RENDERER_1TOGGLE_FUNC);
+ rc = (jboolean)GTK_IS_CELL_RENDERER_TOGGLE(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1CELL_1RENDERER_1TOGGLE_FUNC);
return rc;
}
#endif
-#ifndef NO_GtkTextIter_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkTextIter_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1CONTAINER
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1CONTAINER)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkTextIter_1sizeof_FUNC);
- rc = (jint)GtkTextIter_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkTextIter_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1CONTAINER_FUNC);
+ rc = (jboolean)GTK_IS_CONTAINER(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1CONTAINER_FUNC);
return rc;
}
#endif
-#ifndef NO_GtkTreeIter_1sizeof
-JNIEXPORT jint JNICALL GTK_NATIVE(GtkTreeIter_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1IM_1CONTEXT
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1IM_1CONTEXT)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, GtkTreeIter_1sizeof_FUNC);
- rc = (jint)GtkTreeIter_sizeof();
- GTK_NATIVE_EXIT(env, that, GtkTreeIter_1sizeof_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1IM_1CONTEXT_FUNC);
+ rc = (jboolean)GTK_IS_IM_CONTEXT(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1IM_1CONTEXT_FUNC);
return rc;
}
#endif
-#ifndef NO__1GET_1FUNCTION_1POINTER_1gtk_1false
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GET_1FUNCTION_1POINTER_1gtk_1false)
- (JNIEnv *env, jclass that)
+#ifndef NO_GTK_1IS_1LABEL
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1LABEL)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GET_1FUNCTION_1POINTER_1gtk_1false_FUNC);
- rc = (jlong)GET_FUNCTION_POINTER_gtk_false();
- GTK_NATIVE_EXIT(env, that, _1GET_1FUNCTION_1POINTER_1gtk_1false_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1LABEL_FUNC);
+ rc = (jboolean)GTK_IS_LABEL(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1LABEL_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1ACCESSIBLE
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1ACCESSIBLE)
+#ifndef NO_GTK_1IS_1PLUG
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1PLUG)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1ACCESSIBLE_FUNC);
- rc = (jlong)GTK_ACCESSIBLE(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1ACCESSIBLE_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1PLUG_FUNC);
+ rc = (jboolean)GTK_IS_PLUG(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1PLUG_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1ACCEL_1LABEL
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1ACCEL_1LABEL)
+#ifndef NO_GTK_1IS_1SCROLLED_1WINDOW
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1SCROLLED_1WINDOW)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1ACCEL_1LABEL_FUNC);
- rc = (jboolean)GTK_IS_ACCEL_LABEL(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1ACCEL_1LABEL_FUNC);
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1SCROLLED_1WINDOW_FUNC);
+ rc = (jboolean)GTK_IS_SCROLLED_WINDOW(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1SCROLLED_1WINDOW_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1BUTTON
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1BUTTON)
+#ifndef NO_GTK_1IS_1WINDOW
+JNIEXPORT jboolean JNICALL GTK_NATIVE(GTK_1IS_1WINDOW)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1BUTTON_FUNC);
- rc = (jboolean)GTK_IS_BUTTON(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1BUTTON_FUNC);
+ GTK_NATIVE_ENTER(env, that, GTK_1IS_1WINDOW_FUNC);
+ rc = (jboolean)GTK_IS_WINDOW(arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1IS_1WINDOW_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1CELL_1RENDERER_1PIXBUF
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1CELL_1RENDERER_1PIXBUF)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GTK_1TYPE_1CELL_1RENDERER_1PIXBUF
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1CELL_1RENDERER_1PIXBUF)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC);
- rc = (jboolean)GTK_IS_CELL_RENDERER_PIXBUF(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1CELL_1RENDERER_1PIXBUF_FUNC);
+ rc = (jlong)GTK_TYPE_CELL_RENDERER_PIXBUF;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1CELL_1RENDERER_1PIXBUF_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1CELL_1RENDERER_1TEXT
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1CELL_1RENDERER_1TEXT)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GTK_1TYPE_1CELL_1RENDERER_1TEXT
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1CELL_1RENDERER_1TEXT)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1CELL_1RENDERER_1TEXT_FUNC);
- rc = (jboolean)GTK_IS_CELL_RENDERER_TEXT(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1CELL_1RENDERER_1TEXT_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC);
+ rc = (jlong)GTK_TYPE_CELL_RENDERER_TEXT;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1CELL_1RENDERER_1TOGGLE
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1CELL_1RENDERER_1TOGGLE)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GTK_1TYPE_1CELL_1RENDERER_1TOGGLE
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1CELL_1RENDERER_1TOGGLE)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1CELL_1RENDERER_1TOGGLE_FUNC);
- rc = (jboolean)GTK_IS_CELL_RENDERER_TOGGLE(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1CELL_1RENDERER_1TOGGLE_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC);
+ rc = (jlong)GTK_TYPE_CELL_RENDERER_TOGGLE;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1CONTAINER
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1CONTAINER)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GTK_1TYPE_1IM_1MULTICONTEXT
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1IM_1MULTICONTEXT)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1CONTAINER_FUNC);
- rc = (jboolean)GTK_IS_CONTAINER(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1CONTAINER_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1IM_1MULTICONTEXT_FUNC);
+ rc = (jlong)GTK_TYPE_IM_MULTICONTEXT;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1IM_1MULTICONTEXT_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1IM_1CONTEXT
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1IM_1CONTEXT)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1IM_1CONTEXT_FUNC);
- rc = (jboolean)GTK_IS_IM_CONTEXT(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1IM_1CONTEXT_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC);
+ rc = (jlong)GTK_TYPE_TEXT_VIEW_ACCESSIBLE;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1LABEL
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1LABEL)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GTK_1TYPE_1WIDGET
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1WIDGET)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1LABEL_FUNC);
- rc = (jboolean)GTK_IS_LABEL(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1LABEL_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1WIDGET_FUNC);
+ rc = (jlong)GTK_TYPE_WIDGET;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1WIDGET_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1MENU_1ITEM
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1MENU_1ITEM)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GTK_1TYPE_1WINDOW
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1TYPE_1WINDOW)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1MENU_1ITEM_FUNC);
- rc = (jboolean)GTK_IS_MENU_ITEM(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1MENU_1ITEM_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1WINDOW_FUNC);
+ rc = (jlong)GTK_TYPE_WINDOW;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1WINDOW_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1PLUG
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1PLUG)
+#ifndef NO_GTK_1WIDGET_1GET_1CLASS
+JNIEXPORT jlong JNICALL GTK_NATIVE(GTK_1WIDGET_1GET_1CLASS)
(JNIEnv *env, jclass that, jlong arg0)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1PLUG_FUNC);
- rc = (jboolean)GTK_IS_PLUG(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1PLUG_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1WIDGET_1GET_1CLASS_FUNC);
+ rc = (jlong)GTK_WIDGET_GET_CLASS((GtkWidget *)arg0);
+ GTK_NATIVE_EXIT(env, that, GTK_1WIDGET_1GET_1CLASS_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1SCROLLED_1WINDOW
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1SCROLLED_1WINDOW)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GtkAllocation_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkAllocation_1sizeof)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1SCROLLED_1WINDOW_FUNC);
- rc = (jboolean)GTK_IS_SCROLLED_WINDOW(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1SCROLLED_1WINDOW_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkAllocation_1sizeof_FUNC);
+ rc = (jint)GtkAllocation_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkAllocation_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1IS_1WINDOW
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1WINDOW)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_GtkBorder_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkBorder_1sizeof)
+ (JNIEnv *env, jclass that)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1IS_1WINDOW_FUNC);
- rc = (jboolean)GTK_IS_WINDOW(arg0);
- GTK_NATIVE_EXIT(env, that, _1GTK_1IS_1WINDOW_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkBorder_1sizeof_FUNC);
+ rc = (jint)GtkBorder_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkBorder_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF)
+#ifndef NO_GtkCellRendererPixbufClass_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererPixbufClass_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF_FUNC);
- rc = (jlong)GTK_TYPE_CELL_RENDERER_PIXBUF;
- GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkCellRendererPixbufClass_1sizeof_FUNC);
+ rc = (jint)GtkCellRendererPixbufClass_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkCellRendererPixbufClass_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1TYPE_1CELL_1RENDERER_1TEXT
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1TYPE_1CELL_1RENDERER_1TEXT)
+#ifndef NO_GtkCellRendererPixbuf_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererPixbuf_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC);
- rc = (jlong)GTK_TYPE_CELL_RENDERER_TEXT;
- GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkCellRendererPixbuf_1sizeof_FUNC);
+ rc = (jint)GtkCellRendererPixbuf_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkCellRendererPixbuf_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE)
+#ifndef NO_GtkCellRendererTextClass_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererTextClass_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC);
- rc = (jlong)GTK_TYPE_CELL_RENDERER_TOGGLE;
- GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkCellRendererTextClass_1sizeof_FUNC);
+ rc = (jint)GtkCellRendererTextClass_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkCellRendererTextClass_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1TYPE_1IM_1MULTICONTEXT
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1TYPE_1IM_1MULTICONTEXT)
+#ifndef NO_GtkCellRendererText_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererText_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1IM_1MULTICONTEXT_FUNC);
- rc = (jlong)GTK_TYPE_IM_MULTICONTEXT;
- GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1IM_1MULTICONTEXT_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkCellRendererText_1sizeof_FUNC);
+ rc = (jint)GtkCellRendererText_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkCellRendererText_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1TYPE_1MENU
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1TYPE_1MENU)
+#ifndef NO_GtkCellRendererToggleClass_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererToggleClass_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1MENU_FUNC);
- rc = (jlong)GTK_TYPE_MENU;
- GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1MENU_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkCellRendererToggleClass_1sizeof_FUNC);
+ rc = (jint)GtkCellRendererToggleClass_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkCellRendererToggleClass_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1TYPE_1WIDGET
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1TYPE_1WIDGET)
+#ifndef NO_GtkCellRendererToggle_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkCellRendererToggle_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1WIDGET_FUNC);
- rc = (jlong)GTK_TYPE_WIDGET;
- GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1WIDGET_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkCellRendererToggle_1sizeof_FUNC);
+ rc = (jint)GtkCellRendererToggle_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkCellRendererToggle_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1GTK_1TYPE_1WINDOW
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1GTK_1TYPE_1WINDOW)
+#ifndef NO_GtkRequisition_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkRequisition_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1TYPE_1WINDOW_FUNC);
- rc = (jlong)GTK_TYPE_WINDOW;
- GTK_NATIVE_EXIT(env, that, _1GTK_1TYPE_1WINDOW_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkRequisition_1sizeof_FUNC);
+ rc = (jint)GtkRequisition_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkRequisition_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1accel_1group_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1accel_1group_1new)
+#ifndef NO_GtkTextIter_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkTextIter_1sizeof)
(JNIEnv *env, jclass that)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1accel_1group_1new_FUNC);
- rc = (jlong)gtk_accel_group_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1accel_1group_1new_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkTextIter_1sizeof_FUNC);
+ rc = (jint)GtkTextIter_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkTextIter_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1accel_1label_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1accel_1label_1new)
- (JNIEnv *env, jclass that, jbyteArray arg0)
+#ifndef NO_GtkTreeIter_1sizeof
+JNIEXPORT jint JNICALL GTK_NATIVE(GtkTreeIter_1sizeof)
+ (JNIEnv *env, jclass that)
{
- jbyte *lparg0=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1accel_1label_1new_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_accel_label_new((const gchar *)lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1accel_1label_1new_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, GtkTreeIter_1sizeof_FUNC);
+ rc = (jint)GtkTreeIter_sizeof();
+ GTK_NATIVE_EXIT(env, that, GtkTreeIter_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1accel_1label_1set_1accel
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1accel_1label_1set_1accel)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+#ifndef NO_gtk_1accel_1group_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1accel_1group_1new)
+ (JNIEnv *env, jclass that)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1accel_1label_1set_1accel_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1accel_1group_1new_FUNC);
/*
- gtk_accel_label_set_accel((GtkAccelLabel *)arg0, (guint)arg1, (GdkModifierType)arg2);
+ rc = (jlong)gtk_accel_group_new();
*/
{
- GTK_LOAD_FUNCTION(fp, gtk_accel_label_set_accel)
+ GTK_LOAD_FUNCTION(fp, gtk_accel_group_new)
if (fp) {
- ((void (CALLING_CONVENTION*)(GtkAccelLabel *, guint, GdkModifierType))fp)((GtkAccelLabel *)arg0, (guint)arg1, (GdkModifierType)arg2);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1accel_1label_1set_1accel_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1accel_1group_1new_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gtk_1accel_1label_1set_1accel_1widget
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1accel_1label_1set_1accel_1widget)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gtk_1accelerator_1get_1default_1mod_1mask
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1accelerator_1get_1default_1mod_1mask)
+ (JNIEnv *env, jclass that)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1accel_1label_1set_1accel_1widget_FUNC);
- gtk_accel_label_set_accel_widget((GtkAccelLabel *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1accel_1label_1set_1accel_1widget_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1accelerator_1get_1default_1mod_1mask_FUNC);
+ rc = (jint)gtk_accelerator_get_default_mod_mask();
+ GTK_NATIVE_EXIT(env, that, gtk_1accelerator_1get_1default_1mod_1mask_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gtk_1accelerator_1get_1default_1mod_1mask
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1accelerator_1get_1default_1mod_1mask)
- (JNIEnv *env, jclass that)
+#ifndef NO_gtk_1accelerator_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1accelerator_1name)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1accelerator_1get_1default_1mod_1mask_FUNC);
- rc = (jint)gtk_accelerator_get_default_mod_mask();
- GTK_NATIVE_EXIT(env, that, _1gtk_1accelerator_1get_1default_1mod_1mask_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1accelerator_1name_FUNC);
+ rc = (jlong)gtk_accelerator_name((guint)arg0, (GdkModifierType)arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1accelerator_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1accelerator_1parse
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1accelerator_1parse)
+#ifndef NO_gtk_1accelerator_1parse__J_3I_3I
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1accelerator_1parse__J_3I_3I)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1accelerator_1parse_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1accelerator_1parse__J_3I_3I_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_accelerator_parse((const gchar *)arg0, (guint *)lparg1, (GdkModifierType *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1accelerator_1parse_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1accelerator_1parse__J_3I_3I_FUNC);
}
#endif
-#ifndef NO__1gtk_1accessible_1get_1widget
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1accessible_1get_1widget)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gtk_1accelerator_1parse___3B_3I_3I
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1accelerator_1parse___3B_3I_3I)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jintArray arg1, jintArray arg2)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1accessible_1get_1widget_FUNC);
- rc = (jlong)gtk_accessible_get_widget((GtkAccessible *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1accessible_1get_1widget_FUNC);
- return rc;
+ jbyte *lparg0=NULL;
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1accelerator_1parse___3B_3I_3I_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_accelerator_parse((const gchar *)lparg0, (guint *)lparg1, (GdkModifierType *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ GTK_NATIVE_EXIT(env, that, gtk_1accelerator_1parse___3B_3I_3I_FUNC);
}
#endif
-#ifndef NO__1gtk_1adjustment_1configure
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1adjustment_1configure)
+#ifndef NO_gtk_1adjustment_1configure
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1adjustment_1configure)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jdouble arg6)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1configure_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1configure_FUNC);
gtk_adjustment_configure((GtkAdjustment *)arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1configure_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1configure_FUNC);
}
#endif
-#ifndef NO__1gtk_1adjustment_1get_1lower
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1adjustment_1get_1lower)
+#ifndef NO_gtk_1adjustment_1get_1lower
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1adjustment_1get_1lower)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1lower_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1get_1lower_FUNC);
rc = (jdouble)gtk_adjustment_get_lower((GtkAdjustment *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1lower_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1get_1lower_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1adjustment_1get_1page_1increment
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1adjustment_1get_1page_1increment)
+#ifndef NO_gtk_1adjustment_1get_1page_1increment
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1adjustment_1get_1page_1increment)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1page_1increment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1get_1page_1increment_FUNC);
rc = (jdouble)gtk_adjustment_get_page_increment((GtkAdjustment *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1page_1increment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1get_1page_1increment_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1adjustment_1get_1page_1size
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1adjustment_1get_1page_1size)
+#ifndef NO_gtk_1adjustment_1get_1page_1size
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1adjustment_1get_1page_1size)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1page_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1get_1page_1size_FUNC);
rc = (jdouble)gtk_adjustment_get_page_size((GtkAdjustment *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1page_1size_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1get_1page_1size_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1adjustment_1get_1step_1increment
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1adjustment_1get_1step_1increment)
+#ifndef NO_gtk_1adjustment_1get_1step_1increment
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1adjustment_1get_1step_1increment)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1step_1increment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1get_1step_1increment_FUNC);
rc = (jdouble)gtk_adjustment_get_step_increment((GtkAdjustment *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1step_1increment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1get_1step_1increment_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1adjustment_1get_1upper
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1adjustment_1get_1upper)
+#ifndef NO_gtk_1adjustment_1get_1upper
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1adjustment_1get_1upper)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1upper_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1get_1upper_FUNC);
rc = (jdouble)gtk_adjustment_get_upper((GtkAdjustment *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1upper_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1get_1upper_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1adjustment_1get_1value
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1adjustment_1get_1value)
+#ifndef NO_gtk_1adjustment_1get_1value
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1adjustment_1get_1value)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1value_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1get_1value_FUNC);
rc = (jdouble)gtk_adjustment_get_value((GtkAdjustment *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1value_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1get_1value_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1adjustment_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1adjustment_1new)
+#ifndef NO_gtk_1adjustment_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1adjustment_1new)
(JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1new_FUNC);
- rc = (jlong)gtk_adjustment_new((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1new_FUNC);
+ rc = (jlong)gtk_adjustment_new((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1adjustment_1set_1page_1increment
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1adjustment_1set_1page_1increment)
+#ifndef NO_gtk_1adjustment_1set_1page_1increment
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1adjustment_1set_1page_1increment)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1set_1page_1increment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1set_1page_1increment_FUNC);
gtk_adjustment_set_page_increment((GtkAdjustment *)arg0, (gdouble)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1set_1page_1increment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1set_1page_1increment_FUNC);
}
#endif
-#ifndef NO__1gtk_1adjustment_1set_1step_1increment
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1adjustment_1set_1step_1increment)
+#ifndef NO_gtk_1adjustment_1set_1step_1increment
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1adjustment_1set_1step_1increment)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1set_1step_1increment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1set_1step_1increment_FUNC);
gtk_adjustment_set_step_increment((GtkAdjustment *)arg0, (gdouble)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1set_1step_1increment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1set_1step_1increment_FUNC);
}
#endif
-#ifndef NO__1gtk_1adjustment_1set_1value
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1adjustment_1set_1value)
+#ifndef NO_gtk_1adjustment_1set_1value
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1adjustment_1set_1value)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1set_1value_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1adjustment_1set_1value_FUNC);
gtk_adjustment_set_value((GtkAdjustment *)arg0, (gdouble)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1set_1value_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1adjustment_1value_1changed
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1adjustment_1value_1changed)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1adjustment_1value_1changed_FUNC);
-/*
- gtk_adjustment_value_changed((GtkAdjustment *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_adjustment_value_changed)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1adjustment_1value_1changed_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1adjustment_1set_1value_FUNC);
}
#endif
-#ifndef NO__1gtk_1bin_1get_1child
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1bin_1get_1child)
+#ifndef NO_gtk_1border_1free
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1border_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1bin_1get_1child_FUNC);
- rc = (jlong)gtk_bin_get_child((GtkBin *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1bin_1get_1child_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1border_1free
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1border_1free)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1border_1free_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1border_1free_FUNC);
gtk_border_free((GtkBorder *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1border_1free_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1border_1free_FUNC);
}
#endif
-#ifndef NO__1gtk_1box_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1box_1new)
+#ifndef NO_gtk_1box_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1box_1new)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1box_1new_FUNC);
rc = (jlong)gtk_box_new((GtkOrientation)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1box_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1box_1pack_1end__JJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1box_1pack_1end__JJ)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1pack_1end__JJ_FUNC);
-/*
- gtk_box_pack_end((GtkBox *)arg0, (GtkWidget *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_box_pack_end)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkBox *, GtkWidget *))fp)((GtkBox *)arg0, (GtkWidget *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1pack_1end__JJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1box_1pack_1end__JJZZI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1box_1pack_1end__JJZZI)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2, jboolean arg3, jint arg4)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1pack_1end__JJZZI_FUNC);
-/*
- gtk_box_pack_end((GtkBox *)arg0, (GtkWidget *)arg1, (gboolean)arg2, (gboolean)arg3, (guint)arg4);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_box_pack_end)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkBox *, GtkWidget *, gboolean, gboolean, guint))fp)((GtkBox *)arg0, (GtkWidget *)arg1, (gboolean)arg2, (gboolean)arg3, (guint)arg4);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1pack_1end__JJZZI_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1box_1reorder_1child
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1box_1reorder_1child)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1reorder_1child_FUNC);
- gtk_box_reorder_child((GtkBox *)arg0, (GtkWidget *)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1reorder_1child_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1box_1set_1child_1packing__JJI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1box_1set_1child_1packing__JJI)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1set_1child_1packing__JJI_FUNC);
-/*
- gtk_box_set_child_packing((GtkBox *)arg0, (GtkWidget *)arg1, arg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_box_set_child_packing)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkBox *, GtkWidget *, jint))fp)((GtkBox *)arg0, (GtkWidget *)arg1, arg2);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1set_1child_1packing__JJI_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1box_1set_1child_1packing__JJZZII
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1box_1set_1child_1packing__JJZZII)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2, jboolean arg3, jint arg4, jint arg5)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1set_1child_1packing__JJZZII_FUNC);
-/*
- gtk_box_set_child_packing((GtkBox *)arg0, (GtkWidget *)arg1, arg2, arg3, arg4, arg5);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_box_set_child_packing)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkBox *, GtkWidget *, jboolean, jboolean, jint, jint))fp)((GtkBox *)arg0, (GtkWidget *)arg1, arg2, arg3, arg4, arg5);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1set_1child_1packing__JJZZII_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1box_1set_1homogeneous
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1box_1set_1homogeneous)
+#ifndef NO_gtk_1box_1set_1homogeneous
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1box_1set_1homogeneous)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1set_1homogeneous_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1box_1set_1homogeneous_FUNC);
gtk_box_set_homogeneous((GtkBox *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1set_1homogeneous_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1box_1set_1homogeneous_FUNC);
}
#endif
-#ifndef NO__1gtk_1box_1set_1spacing
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1box_1set_1spacing)
+#ifndef NO_gtk_1box_1set_1spacing
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1box_1set_1spacing)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1box_1set_1spacing_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1box_1set_1spacing_FUNC);
gtk_box_set_spacing((GtkBox *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1box_1set_1spacing_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1box_1set_1spacing_FUNC);
}
#endif
-#ifndef NO__1gtk_1button_1clicked
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1button_1clicked)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1button_1clicked_FUNC);
- gtk_button_clicked((GtkButton *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1button_1clicked_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1button_1new)
+#ifndef NO_gtk_1button_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1button_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1button_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1button_1new_FUNC);
rc = (jlong)gtk_button_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1button_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1button_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1button_1set_1image
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1button_1set_1image)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gtk_1button_1set_1label
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1button_1set_1label)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1button_1set_1image_FUNC);
+ jbyte *lparg1=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1button_1set_1label_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- gtk_button_set_image((GtkButton *)arg0, (GtkWidget *)arg1);
+ gtk_button_set_label((GtkButton *)arg0, (const char *)lparg1);
*/
{
- GTK_LOAD_FUNCTION(fp, gtk_button_set_image)
+ GTK_LOAD_FUNCTION(fp, gtk_button_set_label)
if (fp) {
- ((void (CALLING_CONVENTION*)(GtkButton *, GtkWidget *))fp)((GtkButton *)arg0, (GtkWidget *)arg1);
+ ((void (CALLING_CONVENTION*)(GtkButton *, const char *))fp)((GtkButton *)arg0, (const char *)lparg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1button_1set_1image_FUNC);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK_NATIVE_EXIT(env, that, gtk_1button_1set_1label_FUNC);
}
#endif
-#ifndef NO__1gtk_1calendar_1clear_1marks
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1calendar_1clear_1marks)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gtk_1button_1set_1use_1underline
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1button_1set_1use_1underline)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1calendar_1clear_1marks_FUNC);
- gtk_calendar_clear_marks((GtkCalendar *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1calendar_1clear_1marks_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1button_1set_1use_1underline_FUNC);
+ gtk_button_set_use_underline((GtkButton *)arg0, arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1button_1set_1use_1underline_FUNC);
}
#endif
-#ifndef NO__1gtk_1calendar_1get_1date
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1calendar_1get_1date)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2, jintArray arg3)
+#ifndef NO_gtk_1calendar_1clear_1marks
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1calendar_1clear_1marks)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1calendar_1get_1date_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- gtk_calendar_get_date((GtkCalendar *)arg0, (guint *)lparg1, (guint *)lparg2, (guint *)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1calendar_1get_1date_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1calendar_1clear_1marks_FUNC);
+ gtk_calendar_clear_marks((GtkCalendar *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1calendar_1clear_1marks_FUNC);
}
#endif
-#ifndef NO__1gtk_1calendar_1mark_1day
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1calendar_1mark_1day)
+#ifndef NO_gtk_1calendar_1mark_1day
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1calendar_1mark_1day)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1calendar_1mark_1day_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1calendar_1mark_1day_FUNC);
gtk_calendar_mark_day((GtkCalendar *)arg0, (guint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1calendar_1mark_1day_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1calendar_1mark_1day_FUNC);
}
#endif
-#ifndef NO__1gtk_1calendar_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1calendar_1new)
+#ifndef NO_gtk_1calendar_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1calendar_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1calendar_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1calendar_1new_FUNC);
rc = (jlong)gtk_calendar_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1calendar_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1calendar_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1calendar_1select_1day
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1calendar_1select_1day)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1calendar_1select_1day_FUNC);
- gtk_calendar_select_day((GtkCalendar *)arg0, (guint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1calendar_1select_1day_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1calendar_1select_1month
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1calendar_1select_1month)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1calendar_1select_1month_FUNC);
- gtk_calendar_select_month((GtkCalendar *)arg0, (guint)arg1, (guint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1calendar_1select_1month_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1calendar_1set_1display_1options
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1calendar_1set_1display_1options)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1calendar_1set_1display_1options_FUNC);
- gtk_calendar_set_display_options((GtkCalendar *)arg0, (GtkCalendarDisplayOptions)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1calendar_1set_1display_1options_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1cell_1layout_1clear
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1layout_1clear)
+#ifndef NO_gtk_1cell_1layout_1clear
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1layout_1clear)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1layout_1clear_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1layout_1clear_FUNC);
gtk_cell_layout_clear((GtkCellLayout *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1layout_1clear_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1layout_1clear_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1layout_1get_1cells
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1cell_1layout_1get_1cells)
+#ifndef NO_gtk_1cell_1layout_1get_1cells
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1cell_1layout_1get_1cells)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1layout_1get_1cells_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1layout_1get_1cells_FUNC);
rc = (jlong)gtk_cell_layout_get_cells((GtkCellLayout *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1layout_1get_1cells_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1layout_1get_1cells_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1cell_1layout_1pack_1start
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1layout_1pack_1start)
+#ifndef NO_gtk_1cell_1layout_1pack_1start
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1layout_1pack_1start)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1layout_1pack_1start_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1layout_1pack_1start_FUNC);
gtk_cell_layout_pack_start((GtkCellLayout *)arg0, (GtkCellRenderer *)arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1layout_1pack_1start_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1layout_1pack_1start_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1layout_1set_1attributes
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1layout_1set_1attributes)
+#ifndef NO_gtk_1cell_1layout_1set_1attributes
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1layout_1set_1attributes)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2, jint arg3, jlong arg4)
{
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1layout_1set_1attributes_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1layout_1set_1attributes_FUNC);
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_cell_layout_set_attributes((GtkCellLayout *)arg0, (GtkCellRenderer *)arg1, lparg2, arg3, (const gchar *)NULL);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1layout_1set_1attributes_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1layout_1set_1attributes_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1get_1fixed_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1get_1fixed_1size)
+#ifndef NO_gtk_1cell_1renderer_1get_1fixed_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1renderer_1get_1fixed_1size)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1get_1fixed_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1get_1fixed_1size_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_cell_renderer_get_fixed_size((GtkCellRenderer *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1get_1fixed_1size_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1get_1fixed_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1get_1padding
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1get_1padding)
+#ifndef NO_gtk_1cell_1renderer_1get_1padding
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1renderer_1get_1padding)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1get_1padding_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1get_1padding_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_cell_renderer_get_padding((GtkCellRenderer *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1get_1padding_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1get_1padding_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width)
+#ifndef NO_gtk_1cell_1renderer_1get_1preferred_1height_1for_1width
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1renderer_1get_1preferred_1height_1for_1width)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jintArray arg3, jintArray arg4)
{
jint *lparg3=NULL;
jint *lparg4=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC);
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
gtk_cell_renderer_get_preferred_height_for_width((GtkCellRenderer *)arg0, (GtkWidget *)arg1, (gint)arg2, (gint *)lparg3, (gint *)lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1get_1preferred_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1get_1preferred_1size)
+#ifndef NO_gtk_1cell_1renderer_1get_1preferred_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1renderer_1get_1preferred_1size)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jobject arg3)
{
GtkRequisition _arg2, *lparg2=NULL;
GtkRequisition _arg3, *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1get_1preferred_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1get_1preferred_1size_FUNC);
if (arg2) if ((lparg2 = getGtkRequisitionFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getGtkRequisitionFields(env, arg3, &_arg3)) == NULL) goto fail;
gtk_cell_renderer_get_preferred_size((GtkCellRenderer *)arg0, (GtkWidget *)arg1, (GtkRequisition *)lparg2, (GtkRequisition *)lparg3);
fail:
if (arg3 && lparg3) setGtkRequisitionFields(env, arg3, lparg3);
if (arg2 && lparg2) setGtkRequisitionFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1get_1preferred_1size_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1get_1preferred_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1pixbuf_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1pixbuf_1new)
+#ifndef NO_gtk_1cell_1renderer_1pixbuf_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1cell_1renderer_1pixbuf_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1pixbuf_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1pixbuf_1new_FUNC);
rc = (jlong)gtk_cell_renderer_pixbuf_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1pixbuf_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1pixbuf_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1set_1fixed_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1set_1fixed_1size)
+#ifndef NO_gtk_1cell_1renderer_1set_1fixed_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1renderer_1set_1fixed_1size)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1set_1fixed_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1set_1fixed_1size_FUNC);
gtk_cell_renderer_set_fixed_size((GtkCellRenderer *)arg0, (gint)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1set_1fixed_1size_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1set_1fixed_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1text_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1text_1new)
+#ifndef NO_gtk_1cell_1renderer_1text_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1cell_1renderer_1text_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1text_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1text_1new_FUNC);
rc = (jlong)gtk_cell_renderer_text_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1text_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1text_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1cell_1renderer_1toggle_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1cell_1renderer_1toggle_1new)
+#ifndef NO_gtk_1cell_1renderer_1toggle_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1cell_1renderer_1toggle_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1toggle_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1renderer_1toggle_1new_FUNC);
rc = (jlong)gtk_cell_renderer_toggle_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1toggle_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1renderer_1toggle_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1cell_1view_1set_1fit_1model
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1cell_1view_1set_1fit_1model)
+#ifndef NO_gtk_1cell_1view_1set_1fit_1model
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1cell_1view_1set_1fit_1model)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1cell_1view_1set_1fit_1model_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1cell_1view_1set_1fit_1model_FUNC);
gtk_cell_view_set_fit_model((GtkCellView *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1cell_1view_1set_1fit_1model_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1cell_1view_1set_1fit_1model_FUNC);
}
#endif
-#ifndef NO__1gtk_1check_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1check_1button_1new)
+#ifndef NO_gtk_1check_1button_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1check_1button_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1check_1button_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1check_1button_1new_FUNC);
rc = (jlong)gtk_check_button_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1check_1button_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1check_1menu_1item_1get_1active
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1check_1menu_1item_1get_1active)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1check_1menu_1item_1get_1active_FUNC);
- rc = (jboolean)gtk_check_menu_item_get_active((GtkCheckMenuItem *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1check_1menu_1item_1get_1active_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1check_1menu_1item_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1check_1menu_1item_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1check_1menu_1item_1new_FUNC);
- rc = (jlong)gtk_check_menu_item_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1check_1menu_1item_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1check_1button_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1check_1menu_1item_1set_1active
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1check_1menu_1item_1set_1active)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1check_1menu_1item_1set_1active_FUNC);
- gtk_check_menu_item_set_active((GtkCheckMenuItem *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1check_1menu_1item_1set_1active_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1check_1version
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1check_1version)
+#ifndef NO_gtk_1check_1version
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1check_1version)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1check_1version_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1check_1version_FUNC);
rc = (jlong)gtk_check_version(arg0, arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1check_1version_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1clipboard_1clear
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1clipboard_1clear)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1clipboard_1clear_FUNC);
- gtk_clipboard_clear((GtkClipboard *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1clipboard_1clear_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1clipboard_1get
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1clipboard_1get)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1clipboard_1get_FUNC);
- rc = (jlong)gtk_clipboard_get((GdkAtom)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1clipboard_1get_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1clipboard_1set_1can_1store
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1clipboard_1set_1can_1store)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1clipboard_1set_1can_1store_FUNC);
- gtk_clipboard_set_can_store((GtkClipboard *)arg0, (const GtkTargetEntry *)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1clipboard_1set_1can_1store_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1clipboard_1set_1with_1owner
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1clipboard_1set_1with_1owner)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4, jlong arg5)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1clipboard_1set_1with_1owner_FUNC);
- rc = (jboolean)gtk_clipboard_set_with_owner((GtkClipboard *)arg0, (const GtkTargetEntry *)arg1, (guint)arg2, (GtkClipboardGetFunc)arg3, (GtkClipboardClearFunc)arg4, (GObject *)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1clipboard_1set_1with_1owner_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1clipboard_1store
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1clipboard_1store)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1clipboard_1store_FUNC);
- gtk_clipboard_store((GtkClipboard *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1clipboard_1store_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1clipboard_1wait_1for_1contents
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1clipboard_1wait_1for_1contents)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1clipboard_1wait_1for_1contents_FUNC);
- rc = (jlong)gtk_clipboard_wait_for_contents((GtkClipboard *)arg0, (GdkAtom)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1clipboard_1wait_1for_1contents_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1check_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1color_1chooser_1add_1palette
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1color_1chooser_1add_1palette)
+#ifndef NO_gtk_1color_1chooser_1add_1palette
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1color_1chooser_1add_1palette)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jlong arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1add_1palette_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1color_1chooser_1add_1palette_FUNC);
gtk_color_chooser_add_palette((GtkColorChooser *)arg0, (GtkOrientation)arg1, (gint)arg2, (gint)arg3, (GdkRGBA *)arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1add_1palette_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1color_1chooser_1add_1palette_FUNC);
}
#endif
-#ifndef NO__1gtk_1color_1chooser_1dialog_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1color_1chooser_1dialog_1new)
+#ifndef NO_gtk_1color_1chooser_1dialog_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1color_1chooser_1dialog_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1dialog_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1color_1chooser_1dialog_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_color_chooser_dialog_new((const gchar *)lparg0, (GtkWindow *)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1dialog_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1color_1chooser_1dialog_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1color_1chooser_1get_1rgba
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1color_1chooser_1get_1rgba)
+#ifndef NO_gtk_1color_1chooser_1get_1rgba
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1color_1chooser_1get_1rgba)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRGBA _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1get_1rgba_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1color_1chooser_1get_1rgba_FUNC);
if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
gtk_color_chooser_get_rgba((GtkColorChooser *)arg0, (GdkRGBA *)lparg1);
fail:
if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1get_1rgba_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1color_1chooser_1get_1rgba_FUNC);
}
#endif
-#ifndef NO__1gtk_1color_1chooser_1get_1use_1alpha
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1color_1chooser_1get_1use_1alpha)
+#ifndef NO_gtk_1color_1chooser_1get_1use_1alpha
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1color_1chooser_1get_1use_1alpha)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1get_1use_1alpha_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1color_1chooser_1get_1use_1alpha_FUNC);
rc = (jboolean)gtk_color_chooser_get_use_alpha((GtkColorChooser *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1get_1use_1alpha_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1color_1chooser_1get_1use_1alpha_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1color_1chooser_1set_1rgba
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1color_1chooser_1set_1rgba)
+#ifndef NO_gtk_1color_1chooser_1set_1rgba
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1color_1chooser_1set_1rgba)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRGBA _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1set_1rgba_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1color_1chooser_1set_1rgba_FUNC);
if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
gtk_color_chooser_set_rgba((GtkColorChooser *)arg0, (GdkRGBA *)lparg1);
fail:
if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1set_1rgba_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1color_1chooser_1set_1rgba_FUNC);
}
#endif
-#ifndef NO__1gtk_1color_1chooser_1set_1use_1alpha
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1color_1chooser_1set_1use_1alpha)
+#ifndef NO_gtk_1color_1chooser_1set_1use_1alpha
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1color_1chooser_1set_1use_1alpha)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1set_1use_1alpha_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1color_1chooser_1set_1use_1alpha_FUNC);
gtk_color_chooser_set_use_alpha((GtkColorChooser *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1set_1use_1alpha_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1color_1chooser_1set_1use_1alpha_FUNC);
}
#endif
-#ifndef NO__1gtk_1combo_1box_1get_1active
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1combo_1box_1get_1active)
+#ifndef NO_gtk_1combo_1box_1get_1active
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1combo_1box_1get_1active)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1get_1active_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1get_1active_FUNC);
rc = (jint)gtk_combo_box_get_active((GtkComboBox *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1get_1active_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1get_1active_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1combo_1box_1get_1model
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1combo_1box_1get_1model)
+#ifndef NO_gtk_1combo_1box_1get_1model
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1combo_1box_1get_1model)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1get_1model_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1get_1model_FUNC);
rc = (jlong)gtk_combo_box_get_model((GtkComboBox *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1get_1model_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1combo_1box_1get_1wrap_1width
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1combo_1box_1get_1wrap_1width)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1get_1wrap_1width_FUNC);
- rc = (jint)gtk_combo_box_get_wrap_width((GtkComboBox *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1get_1wrap_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1get_1model_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1combo_1box_1popdown
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1popdown)
+#ifndef NO_gtk_1combo_1box_1popdown
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1combo_1box_1popdown)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1popdown_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1popdown_FUNC);
gtk_combo_box_popdown((GtkComboBox *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1popdown_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1popdown_FUNC);
}
#endif
-#ifndef NO__1gtk_1combo_1box_1popup
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1popup)
+#ifndef NO_gtk_1combo_1box_1popup
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1combo_1box_1popup)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1popup_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1popup_FUNC);
gtk_combo_box_popup((GtkComboBox *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1popup_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1popup_FUNC);
}
#endif
-#ifndef NO__1gtk_1combo_1box_1set_1active
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1set_1active)
+#ifndef NO_gtk_1combo_1box_1set_1active
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1combo_1box_1set_1active)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1set_1active_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1set_1active_FUNC);
gtk_combo_box_set_active((GtkComboBox *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1set_1active_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1combo_1box_1set_1focus_1on_1click
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1set_1focus_1on_1click)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1set_1focus_1on_1click_FUNC);
-/*
- gtk_combo_box_set_focus_on_click((GtkComboBox *)arg0, (gboolean)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_combo_box_set_focus_on_click)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkComboBox *, gboolean))fp)((GtkComboBox *)arg0, (gboolean)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1set_1focus_1on_1click_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1combo_1box_1set_1wrap_1width
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1set_1wrap_1width)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1set_1wrap_1width_FUNC);
- gtk_combo_box_set_wrap_width((GtkComboBox *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1set_1wrap_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1set_1active_FUNC);
}
#endif
-#ifndef NO__1gtk_1combo_1box_1text_1insert
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1text_1insert)
+#ifndef NO_gtk_1combo_1box_1text_1insert
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1combo_1box_1text_1insert)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jbyteArray arg2, jbyteArray arg3)
{
jbyte *lparg2=NULL;
jbyte *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1insert_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1text_1insert_FUNC);
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
gtk_combo_box_text_insert((GtkComboBoxText *)arg0, (gint)arg1, (const gchar *)lparg2, (const gchar *)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1insert_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1text_1insert_FUNC);
}
#endif
-#ifndef NO__1gtk_1combo_1box_1text_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1combo_1box_1text_1new)
+#ifndef NO_gtk_1combo_1box_1text_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1combo_1box_1text_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1text_1new_FUNC);
rc = (jlong)gtk_combo_box_text_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1text_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1combo_1box_1text_1new_1with_1entry
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1combo_1box_1text_1new_1with_1entry)
+#ifndef NO_gtk_1combo_1box_1text_1new_1with_1entry
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1combo_1box_1text_1new_1with_1entry)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1new_1with_1entry_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1text_1new_1with_1entry_FUNC);
rc = (jlong)gtk_combo_box_text_new_with_entry();
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1new_1with_1entry_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1text_1new_1with_1entry_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1combo_1box_1text_1remove
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1text_1remove)
+#ifndef NO_gtk_1combo_1box_1text_1remove
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1combo_1box_1text_1remove)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1remove_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1text_1remove_FUNC);
gtk_combo_box_text_remove((GtkComboBoxText *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1remove_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1text_1remove_FUNC);
}
#endif
-#ifndef NO__1gtk_1combo_1box_1text_1remove_1all
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1combo_1box_1text_1remove_1all)
+#ifndef NO_gtk_1combo_1box_1text_1remove_1all
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1combo_1box_1text_1remove_1all)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1remove_1all_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1combo_1box_1text_1remove_1all_FUNC);
gtk_combo_box_text_remove_all((GtkComboBoxText *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1remove_1all_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1container_1add
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1container_1add)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1container_1add_FUNC);
- gtk_container_add((GtkContainer *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1container_1add_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1combo_1box_1text_1remove_1all_FUNC);
}
#endif
-#ifndef NO__1gtk_1container_1forall
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1container_1forall)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1container_1forall_FUNC);
- gtk_container_forall((GtkContainer *)arg0, (GtkCallback)arg1, (gpointer)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1container_1forall_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1container_1get_1border_1width
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1container_1get_1border_1width)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1container_1get_1border_1width_FUNC);
- rc = (jint)gtk_container_get_border_width((GtkContainer *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1container_1get_1border_1width_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1container_1get_1children
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1container_1get_1children)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1container_1get_1children_FUNC);
- rc = (jlong)gtk_container_get_children((GtkContainer *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1container_1get_1children_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1container_1propagate_1draw
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1container_1propagate_1draw)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1container_1propagate_1draw_FUNC);
- gtk_container_propagate_draw((GtkContainer *)arg0, (GtkWidget *)arg1, (cairo_t *)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1container_1propagate_1draw_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1container_1remove
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1container_1remove)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1container_1remove_FUNC);
- gtk_container_remove((GtkContainer *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1container_1remove_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1container_1set_1border_1width
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1container_1set_1border_1width)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1container_1set_1border_1width_FUNC);
- gtk_container_set_border_width((GtkContainer *)arg0, (guint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1container_1set_1border_1width_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1css_1provider_1get_1named
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1css_1provider_1get_1named)
- (JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1)
-{
- jbyte *lparg0=NULL;
- jbyte *lparg1=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1get_1named_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_css_provider_get_named((const gchar *)lparg0, (const gchar *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1get_1named_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1css_1provider_1load_1from_1data__J_3BJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1css_1provider_1load_1from_1data__J_3BJ)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1load_1from_1data__J_3BJ_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_css_provider_load_from_data((GtkCssProvider *)arg0, (const gchar *)lparg1, (gssize)arg2);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1load_1from_1data__J_3BJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1css_1provider_1load_1from_1data__J_3BJ_3J
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1css_1provider_1load_1from_1data__J_3BJ_3J)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlongArray arg3)
-{
- jbyte *lparg1=NULL;
- jlong *lparg3=NULL;
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1load_1from_1data__J_3BJ_3J_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jboolean)gtk_css_provider_load_from_data((GtkCssProvider *)arg0, (const gchar *)lparg1, (gssize)arg2, (GError **)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1load_1from_1data__J_3BJ_3J_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1css_1provider_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1css_1provider_1new)
+#ifndef NO_gtk_1css_1provider_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1css_1provider_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1css_1provider_1new_FUNC);
rc = (jlong)gtk_css_provider_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1css_1provider_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1css_1provider_1to_1string
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1css_1provider_1to_1string)
+#ifndef NO_gtk_1css_1provider_1to_1string
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1css_1provider_1to_1string)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1to_1string_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1css_1provider_1to_1string_FUNC);
rc = (jlong)gtk_css_provider_to_string((GtkCssProvider *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1to_1string_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1css_1provider_1to_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1dialog_1add_1button
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1dialog_1add_1button)
+#ifndef NO_gtk_1dialog_1add_1button
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1dialog_1add_1button)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1dialog_1add_1button_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1dialog_1add_1button_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_dialog_add_button((GtkDialog *)arg0, (const gchar *)lparg1, (gint)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1dialog_1add_1button_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1dialog_1run
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1dialog_1run)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1dialog_1run_FUNC);
- rc = (jint)gtk_dialog_run((GtkDialog *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1dialog_1run_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1begin_1with_1coordinates__JJIIJII
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1drag_1begin_1with_1coordinates__JJIIJII)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jlong arg4, jint arg5, jint arg6)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1begin_1with_1coordinates__JJIIJII_FUNC);
-/*
- rc = (jlong)gtk_drag_begin_with_coordinates((GtkWidget *)arg0, (GtkTargetList *)arg1, (GdkDragAction)arg2, (gint)arg3, (GdkEvent *)arg4, (gint)arg5, (gint)arg6);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_drag_begin_with_coordinates)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *, GtkTargetList *, GdkDragAction, gint, GdkEvent *, gint, gint))fp)((GtkWidget *)arg0, (GtkTargetList *)arg1, (GdkDragAction)arg2, (gint)arg3, (GdkEvent *)arg4, (gint)arg5, (gint)arg6);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1begin_1with_1coordinates__JJIIJII_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1begin_1with_1coordinates__JJJIII
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1drag_1begin_1with_1coordinates__JJJIII)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3, jint arg4, jint arg5)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1begin_1with_1coordinates__JJJIII_FUNC);
- rc = (jlong)gtk_drag_begin_with_coordinates((GtkWidget *)arg0, (GdkDevice *)arg1, (GdkContentFormats *)arg2, (GdkDragAction)arg3, (gint)arg4, (gint)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1begin_1with_1coordinates__JJJIII_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1dialog_1add_1button_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1drag_1check_1threshold
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1drag_1check_1threshold)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1check_1threshold_FUNC);
- rc = (jboolean)gtk_drag_check_threshold((GtkWidget *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1check_1threshold_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1dest_1find_1target
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1drag_1dest_1find_1target)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1dest_1find_1target_FUNC);
- rc = (jlong)gtk_drag_dest_find_target((GtkWidget *)arg0, (GdkDragContext *)arg1, (GtkTargetList *)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1dest_1find_1target_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1dest_1set
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1drag_1dest_1set)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jint arg3, jint arg4)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1dest_1set_FUNC);
- gtk_drag_dest_set((GtkWidget *)arg0, (GtkDestDefaults)arg1, (const GtkTargetEntry *)arg2, (gint)arg3, (GdkDragAction)arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1dest_1set_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1dest_1unset
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1drag_1dest_1unset)
+#ifndef NO_gtk_1editable_1delete_1selection
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1editable_1delete_1selection)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1dest_1unset_FUNC);
- gtk_drag_dest_unset((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1dest_1unset_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1finish
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1drag_1finish)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1, jboolean arg2, jint arg3)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1finish_FUNC);
- gtk_drag_finish((GdkDragContext *)arg0, (gboolean)arg1, (gboolean)arg2, (guint32)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1finish_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1get_1data__JJJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1drag_1get_1data__JJJ)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1get_1data__JJJ_FUNC);
- gtk_drag_get_data((GtkWidget *)arg0, (GdkDrop *)arg1, (GdkAtom)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1get_1data__JJJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1get_1data__JJJI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1drag_1get_1data__JJJI)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1get_1data__JJJI_FUNC);
- gtk_drag_get_data((GtkWidget *)arg0, (GdkDragContext *)arg1, (GdkAtom)arg2, (guint32)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1get_1data__JJJI_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1drag_1set_1icon_1surface
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1drag_1set_1icon_1surface)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1set_1icon_1surface_FUNC);
- gtk_drag_set_icon_surface((GdkDragContext *)arg0, (cairo_surface_t *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1set_1icon_1surface_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1editable_1copy_1clipboard
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1copy_1clipboard)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1copy_1clipboard_FUNC);
- gtk_editable_copy_clipboard((GtkEditable *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1copy_1clipboard_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1editable_1cut_1clipboard
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1cut_1clipboard)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1cut_1clipboard_FUNC);
- gtk_editable_cut_clipboard((GtkEditable *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1cut_1clipboard_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1editable_1delete_1selection
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1delete_1selection)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1delete_1selection_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1delete_1selection_FUNC);
gtk_editable_delete_selection((GtkEditable *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1delete_1selection_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1delete_1selection_FUNC);
}
#endif
-#ifndef NO__1gtk_1editable_1delete_1text
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1delete_1text)
+#ifndef NO_gtk_1editable_1delete_1text
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1editable_1delete_1text)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1delete_1text_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1delete_1text_FUNC);
gtk_editable_delete_text((GtkEditable *)arg0, (gint)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1delete_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1delete_1text_FUNC);
}
#endif
-#ifndef NO__1gtk_1editable_1get_1editable
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1editable_1get_1editable)
+#ifndef NO_gtk_1editable_1get_1editable
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1editable_1get_1editable)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1get_1editable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1get_1editable_FUNC);
rc = (jboolean)gtk_editable_get_editable((GtkEditable *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1get_1editable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1get_1editable_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1editable_1get_1position
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1editable_1get_1position)
+#ifndef NO_gtk_1editable_1get_1position
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1editable_1get_1position)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1get_1position_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1get_1position_FUNC);
rc = (jint)gtk_editable_get_position((GtkEditable *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1get_1position_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1get_1position_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1editable_1get_1selection_1bounds
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1editable_1get_1selection_1bounds)
+#ifndef NO_gtk_1editable_1get_1selection_1bounds
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1editable_1get_1selection_1bounds)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1get_1selection_1bounds_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1get_1selection_1bounds_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jboolean)gtk_editable_get_selection_bounds((GtkEditable *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1get_1selection_1bounds_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1get_1selection_1bounds_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1editable_1insert_1text
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1insert_1text)
+#ifndef NO_gtk_1editable_1insert_1text
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1editable_1insert_1text)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jintArray arg3)
{
jbyte *lparg1=NULL;
jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1insert_1text_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1insert_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
gtk_editable_insert_text((GtkEditable *)arg0, (gchar *)lparg1, (gint)arg2, (gint *)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1insert_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1insert_1text_FUNC);
}
#endif
-#ifndef NO__1gtk_1editable_1paste_1clipboard
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1paste_1clipboard)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1paste_1clipboard_FUNC);
- gtk_editable_paste_clipboard((GtkEditable *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1paste_1clipboard_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1editable_1select_1region
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1select_1region)
+#ifndef NO_gtk_1editable_1select_1region
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1editable_1select_1region)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1select_1region_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1select_1region_FUNC);
gtk_editable_select_region((GtkEditable *)arg0, (gint)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1select_1region_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1select_1region_FUNC);
}
#endif
-#ifndef NO__1gtk_1editable_1set_1editable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1set_1editable)
+#ifndef NO_gtk_1editable_1set_1editable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1editable_1set_1editable)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1set_1editable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1set_1editable_FUNC);
gtk_editable_set_editable((GtkEditable *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1set_1editable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1set_1editable_FUNC);
}
#endif
-#ifndef NO__1gtk_1editable_1set_1position
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1editable_1set_1position)
+#ifndef NO_gtk_1editable_1set_1position
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1editable_1set_1position)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1editable_1set_1position_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1editable_1set_1position_FUNC);
gtk_editable_set_position((GtkEditable *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1editable_1set_1position_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1editable_1set_1position_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1get_1icon_1area
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1get_1icon_1area)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
+#ifndef NO_gtk_1entry_1buffer_1delete_1text
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1entry_1buffer_1delete_1text)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GdkRectangle _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1icon_1area_FUNC);
- if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
- gtk_entry_get_icon_area((GtkEntry *)arg0, (gint)arg1, (GdkRectangle *)lparg2);
-fail:
- if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1icon_1area_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1buffer_1delete_1text_FUNC);
+ rc = (jint)gtk_entry_buffer_delete_text((GtkEntryBuffer *)arg0, (guint)arg1, arg2);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1buffer_1delete_1text_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gtk_1entry_1get_1invisible_1char
-JNIEXPORT jchar JNICALL GTK_NATIVE(_1gtk_1entry_1get_1invisible_1char)
+#ifndef NO_gtk_1entry_1buffer_1get_1text
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1entry_1buffer_1get_1text)
(JNIEnv *env, jclass that, jlong arg0)
{
- jchar rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1invisible_1char_FUNC);
- rc = (jchar)gtk_entry_get_invisible_char((GtkEntry *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1invisible_1char_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1buffer_1get_1text_FUNC);
+ rc = (jlong)gtk_entry_buffer_get_text((GtkEntryBuffer *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1buffer_1get_1text_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1entry_1get_1layout
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1entry_1get_1layout)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_gtk_1entry_1buffer_1set_1text
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1buffer_1set_1text)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1layout_FUNC);
- rc = (jlong)gtk_entry_get_layout((GtkEntry *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1layout_FUNC);
- return rc;
+ jbyte *lparg1=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1buffer_1set_1text_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_entry_buffer_set_text((GtkEntryBuffer *)arg0, (const char *)lparg1, arg2);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1buffer_1set_1text_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1get_1layout_1offsets
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1get_1layout_1offsets)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
+#ifndef NO_gtk_1entry_1get_1icon_1area
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1get_1icon_1area)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1layout_1offsets_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- gtk_entry_get_layout_offsets((GtkEntry *)arg0, (gint *)lparg1, (gint *)lparg2);
+ GdkRectangle _arg2, *lparg2=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1get_1icon_1area_FUNC);
+ if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
+ gtk_entry_get_icon_area((GtkEntry *)arg0, (gint)arg1, (GdkRectangle *)lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1layout_1offsets_FUNC);
+ if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1get_1icon_1area_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1get_1max_1length
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1entry_1get_1max_1length)
+#ifndef NO_gtk_1entry_1get_1invisible_1char
+JNIEXPORT jchar JNICALL GTK_NATIVE(gtk_1entry_1get_1invisible_1char)
(JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1max_1length_FUNC);
- rc = (jint)gtk_entry_get_max_length((GtkEntry *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1max_1length_FUNC);
+ jchar rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1get_1invisible_1char_FUNC);
+ rc = (jchar)gtk_entry_get_invisible_char((GtkEntry *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1get_1invisible_1char_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1entry_1get_1text
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1entry_1get_1text)
+#ifndef NO_gtk_1entry_1get_1max_1length
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1entry_1get_1max_1length)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1text_FUNC);
- rc = (jlong)gtk_entry_get_text((GtkEntry *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1text_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1get_1max_1length_FUNC);
+ rc = (jint)gtk_entry_get_max_length((GtkEntry *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1get_1max_1length_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1entry_1get_1visibility
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1entry_1get_1visibility)
+#ifndef NO_gtk_1entry_1get_1visibility
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1entry_1get_1visibility)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1visibility_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1get_1visibility_FUNC);
rc = (jboolean)gtk_entry_get_visibility((GtkEntry *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1visibility_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1get_1visibility_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1entry_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1entry_1new)
+#ifndef NO_gtk_1entry_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1entry_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1new_FUNC);
rc = (jlong)gtk_entry_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1entry_1set_1alignment
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1alignment)
+#ifndef NO_gtk_1entry_1set_1alignment
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1alignment)
(JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1alignment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1alignment_FUNC);
gtk_entry_set_alignment((GtkEntry *)arg0, (gfloat)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1alignment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1alignment_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1has_1frame
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1has_1frame)
+#ifndef NO_gtk_1entry_1set_1has_1frame
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1has_1frame)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1has_1frame_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1has_1frame_FUNC);
gtk_entry_set_has_frame((GtkEntry *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1has_1frame_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1has_1frame_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1icon_1activatable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1icon_1activatable)
+#ifndef NO_gtk_1entry_1set_1icon_1activatable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1icon_1activatable)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1icon_1activatable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1icon_1activatable_FUNC);
gtk_entry_set_icon_activatable((GtkEntry *)arg0, (GtkEntryIconPosition)arg1, (gboolean)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1icon_1activatable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1icon_1activatable_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1icon_1from_1icon_1name
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1icon_1from_1icon_1name)
+#ifndef NO_gtk_1entry_1set_1icon_1from_1icon_1name
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1icon_1from_1icon_1name)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jbyteArray arg2)
{
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1icon_1from_1icon_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1icon_1from_1icon_1name_FUNC);
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_entry_set_icon_from_icon_name((GtkEntry *)arg0, (gint)arg1, (const gchar *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1icon_1from_1icon_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1icon_1from_1icon_1name_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1icon_1sensitive
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1icon_1sensitive)
+#ifndef NO_gtk_1entry_1set_1icon_1sensitive
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1icon_1sensitive)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1icon_1sensitive_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1icon_1sensitive_FUNC);
gtk_entry_set_icon_sensitive((GtkEntry *)arg0, (GtkEntryIconPosition)arg1, (gboolean)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1icon_1sensitive_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1icon_1sensitive_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1invisible_1char
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1invisible_1char)
+#ifndef NO_gtk_1entry_1set_1input_1hints
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1input_1hints)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1input_1hints_FUNC);
+ gtk_entry_set_input_hints((GtkEntry *)arg0, (GtkInputHints)arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1input_1hints_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1entry_1set_1invisible_1char
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1invisible_1char)
(JNIEnv *env, jclass that, jlong arg0, jchar arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1invisible_1char_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1invisible_1char_FUNC);
gtk_entry_set_invisible_char((GtkEntry *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1invisible_1char_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1invisible_1char_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1max_1length
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1max_1length)
+#ifndef NO_gtk_1entry_1set_1max_1length
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1max_1length)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1max_1length_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1max_1length_FUNC);
gtk_entry_set_max_length((GtkEntry *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1max_1length_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1max_1length_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1placeholder_1text
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1placeholder_1text)
+#ifndef NO_gtk_1entry_1set_1placeholder_1text
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1placeholder_1text)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1placeholder_1text_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1placeholder_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_entry_set_placeholder_text((GtkEntry *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1placeholder_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1placeholder_1text_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1tabs
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1tabs)
+#ifndef NO_gtk_1entry_1set_1tabs
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1tabs)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1tabs_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1tabs_FUNC);
gtk_entry_set_tabs((GtkEntry *)arg0, (PangoTabArray *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1tabs_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1entry_1set_1text
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1text)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1text_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_entry_set_text((GtkEntry *)arg0, (const gchar *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1tabs_FUNC);
}
#endif
-#ifndef NO__1gtk_1entry_1set_1visibility
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1visibility)
+#ifndef NO_gtk_1entry_1set_1visibility
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1entry_1set_1visibility)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1visibility_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1entry_1set_1visibility_FUNC);
gtk_entry_set_visibility((GtkEntry *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1visibility_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1entry_1set_1width_1chars
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1entry_1set_1width_1chars)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1width_1chars_FUNC);
- gtk_entry_set_width_chars((GtkEntry *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1width_1chars_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1entry_1text_1index_1to_1layout_1index
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1entry_1text_1index_1to_1layout_1index)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1entry_1text_1index_1to_1layout_1index_FUNC);
- rc = (jint)gtk_entry_text_index_to_layout_index((GtkEntry *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1entry_1text_1index_1to_1layout_1index_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1entry_1set_1visibility_FUNC);
}
#endif
-#ifndef NO__1gtk_1enumerate_1printers
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1enumerate_1printers)
+#ifndef NO_gtk_1enumerate_1printers
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1enumerate_1printers)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1enumerate_1printers_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1enumerate_1printers_FUNC);
gtk_enumerate_printers((GtkPrinterFunc)arg0, (gpointer)arg1, (GDestroyNotify)arg2, (gboolean)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1enumerate_1printers_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1enumerate_1printers_FUNC);
}
#endif
-#ifndef NO__1gtk_1event_1box_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1event_1box_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1event_1box_1new_FUNC);
-/*
- rc = (jlong)gtk_event_box_new();
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_event_box_new)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1event_1box_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1event_1controller_1get_1widget
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1event_1controller_1get_1widget)
+#ifndef NO_gtk_1event_1controller_1get_1widget
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1event_1controller_1get_1widget)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1event_1controller_1get_1widget_FUNC);
-/*
- rc = (jlong)gtk_event_controller_get_widget(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_event_controller_get_widget)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1event_1controller_1get_1widget_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1event_1controller_1handle_1event
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1event_1controller_1handle_1event)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1event_1controller_1handle_1event_FUNC);
-/*
- gtk_event_controller_handle_event(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_event_controller_handle_event)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1event_1controller_1handle_1event_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1event_1controller_1key_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1event_1controller_1key_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1event_1controller_1key_1new_FUNC);
- rc = (jlong)gtk_event_controller_key_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1event_1controller_1key_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1event_1controller_1get_1widget_FUNC);
+ rc = (jlong)gtk_event_controller_get_widget((GtkEventController *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1event_1controller_1get_1widget_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1event_1controller_1motion_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1event_1controller_1motion_1new)
- (JNIEnv *env, jclass that)
+#ifndef NO_gtk_1event_1controller_1set_1propagation_1phase
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1event_1controller_1set_1propagation_1phase)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1event_1controller_1motion_1new_FUNC);
- rc = (jlong)gtk_event_controller_motion_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1event_1controller_1motion_1new_FUNC);
- return rc;
+ GTK_NATIVE_ENTER(env, that, gtk_1event_1controller_1set_1propagation_1phase_FUNC);
+ gtk_event_controller_set_propagation_phase((GtkEventController *)arg0, (GtkPropagationPhase)arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1event_1controller_1set_1propagation_1phase_FUNC);
}
#endif
-#ifndef NO__1gtk_1event_1controller_1scroll_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1event_1controller_1scroll_1new)
- (JNIEnv *env, jclass that, jint arg0)
+#ifndef NO_gtk_1expander_1get_1expanded
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1expander_1get_1expanded)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1event_1controller_1scroll_1new_FUNC);
- rc = (jlong)gtk_event_controller_scroll_new(arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1event_1controller_1scroll_1new_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1expander_1get_1expanded_FUNC);
+ rc = (jboolean)gtk_expander_get_expanded((GtkExpander *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1expander_1get_1expanded_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1event_1controller_1set_1propagation_1phase
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1event_1controller_1set_1propagation_1phase)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1event_1controller_1set_1propagation_1phase_FUNC);
-/*
- gtk_event_controller_set_propagation_phase(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_event_controller_set_propagation_phase)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1event_1controller_1set_1propagation_1phase_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1expander_1get_1expanded
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1expander_1get_1expanded)
+#ifndef NO_gtk_1expander_1get_1label_1widget
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1expander_1get_1label_1widget)
(JNIEnv *env, jclass that, jlong arg0)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1expander_1get_1expanded_FUNC);
- rc = (jboolean)gtk_expander_get_expanded((GtkExpander *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1expander_1get_1expanded_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1expander_1get_1label_1widget_FUNC);
+ rc = (jlong)gtk_expander_get_label_widget((GtkExpander *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1expander_1get_1label_1widget_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1expander_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1expander_1new)
+#ifndef NO_gtk_1expander_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1expander_1new)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1expander_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1expander_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_expander_new((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1expander_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1expander_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1expander_1set_1expanded
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1expander_1set_1expanded)
+#ifndef NO_gtk_1expander_1set_1expanded
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1expander_1set_1expanded)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1expander_1set_1expanded_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1expander_1set_1expanded_FUNC);
gtk_expander_set_expanded((GtkExpander *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1expander_1set_1expanded_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1expander_1set_1expanded_FUNC);
}
#endif
-#ifndef NO__1gtk_1expander_1set_1label_1widget
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1expander_1set_1label_1widget)
+#ifndef NO_gtk_1expander_1set_1label_1widget
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1expander_1set_1label_1widget)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1expander_1set_1label_1widget_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1expander_1set_1label_1widget_FUNC);
gtk_expander_set_label_widget((GtkExpander *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1expander_1set_1label_1widget_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1expander_1set_1label_1widget_FUNC);
}
#endif
-#ifndef NO__1gtk_1file_1chooser_1add_1filter
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1add_1filter)
+#ifndef NO_gtk_1file_1chooser_1add_1filter
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1file_1chooser_1add_1filter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1add_1filter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1chooser_1add_1filter_FUNC);
gtk_file_chooser_add_filter((GtkFileChooser *)arg0, (GtkFileFilter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1add_1filter_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1dialog_1new___3BJIJIJIJ
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1dialog_1new___3BJIJIJIJ)
- (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jint arg2, jlong arg3, jint arg4, jlong arg5, jint arg6, jlong arg7)
-{
- jbyte *lparg0=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1dialog_1new___3BJIJIJIJ_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_file_chooser_dialog_new((const gchar *)lparg0, (GtkWindow *)arg1, arg2, (const gchar *)arg3, arg4, arg5, arg6, (const gchar *)NULL);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1dialog_1new___3BJIJIJIJ_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1dialog_1new___3BJI_3BI_3BIJ
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1dialog_1new___3BJI_3BI_3BIJ)
- (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jint arg2, jbyteArray arg3, jint arg4, jbyteArray arg5, jint arg6, jlong arg7)
-{
- jbyte *lparg0=NULL;
- jbyte *lparg3=NULL;
- jbyte *lparg5=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1dialog_1new___3BJI_3BI_3BIJ_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_file_chooser_dialog_new((const gchar *)lparg0, (GtkWindow *)arg1, arg2, (const gchar *)lparg3, arg4, lparg5, arg6, (const gchar *)NULL);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, JNI_ABORT);
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1dialog_1new___3BJI_3BI_3BIJ_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1chooser_1add_1filter_FUNC);
}
#endif
-#ifndef NO__1gtk_1file_1chooser_1get_1filename
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1get_1filename)
+#ifndef NO_gtk_1file_1chooser_1get_1filter
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1file_1chooser_1get_1filter)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1get_1filename_FUNC);
- rc = (jlong)gtk_file_chooser_get_filename((GtkFileChooser *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1get_1filename_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1get_1filenames
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1get_1filenames)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1get_1filenames_FUNC);
- rc = (jlong)gtk_file_chooser_get_filenames((GtkFileChooser *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1get_1filenames_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1get_1filter
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1get_1filter)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1get_1filter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1filter_FUNC);
rc = (jlong)gtk_file_chooser_get_filter((GtkFileChooser *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1get_1filter_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1get_1uri
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1get_1uri)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1get_1uri_FUNC);
- rc = (jlong)gtk_file_chooser_get_uri((GtkFileChooser *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1get_1uri_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1get_1uris
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1get_1uris)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1get_1uris_FUNC);
- rc = (jlong)gtk_file_chooser_get_uris((GtkFileChooser *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1get_1uris_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1filter_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1file_1chooser_1native_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1native_1new)
+#ifndef NO_gtk_1file_1chooser_1native_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1file_1chooser_1native_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jint arg2, jbyteArray arg3, jbyteArray arg4)
{
jbyte *lparg0=NULL;
jbyte *lparg3=NULL;
jbyte *lparg4=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1native_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1chooser_1native_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
@@ -5855,272 +4910,184 @@ fail:
if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, JNI_ABORT);
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, JNI_ABORT);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1native_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1chooser_1native_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1file_1chooser_1set_1current_1folder
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1current_1folder)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1current_1folder_FUNC);
- gtk_file_chooser_set_current_folder((GtkFileChooser *)arg0, (const gchar *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1current_1folder_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1set_1current_1folder_1uri
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1current_1folder_1uri)
+#ifndef NO_gtk_1file_1chooser_1set_1current_1name
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1file_1chooser_1set_1current_1name)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1current_1folder_1uri_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_file_chooser_set_current_folder_uri((GtkFileChooser *)arg0, (const gchar *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1current_1folder_1uri_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1set_1current_1name
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1current_1name)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1current_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1current_1name_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_file_chooser_set_current_name((GtkFileChooser *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1current_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1current_1name_FUNC);
}
#endif
-#ifndef NO__1gtk_1file_1chooser_1set_1do_1overwrite_1confirmation
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1do_1overwrite_1confirmation)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1do_1overwrite_1confirmation_FUNC);
- gtk_file_chooser_set_do_overwrite_confirmation((GtkFileChooser *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1do_1overwrite_1confirmation_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1set_1extra_1widget
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1extra_1widget)
+#ifndef NO_gtk_1file_1chooser_1set_1filter
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1file_1chooser_1set_1filter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1extra_1widget_FUNC);
- gtk_file_chooser_set_extra_widget((GtkFileChooser *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1extra_1widget_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1set_1filename
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1filename)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1filename_FUNC);
- gtk_file_chooser_set_filename((GtkFileChooser *)arg0, (const gchar *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1filename_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1set_1filter
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1filter)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1filter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1filter_FUNC);
gtk_file_chooser_set_filter((GtkFileChooser *)arg0, (GtkFileFilter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1filter_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1chooser_1set_1local_1only
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1local_1only)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1local_1only_FUNC);
- gtk_file_chooser_set_local_only((GtkFileChooser *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1local_1only_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1filter_FUNC);
}
#endif
-#ifndef NO__1gtk_1file_1chooser_1set_1select_1multiple
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1select_1multiple)
+#ifndef NO_gtk_1file_1chooser_1set_1select_1multiple
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1file_1chooser_1set_1select_1multiple)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1select_1multiple_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1select_1multiple_FUNC);
gtk_file_chooser_set_select_multiple((GtkFileChooser *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1select_1multiple_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1select_1multiple_FUNC);
}
#endif
-#ifndef NO__1gtk_1file_1chooser_1set_1uri
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1chooser_1set_1uri)
+#ifndef NO_gtk_1file_1filter_1add_1pattern
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1file_1filter_1add_1pattern)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1set_1uri_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_file_chooser_set_uri((GtkFileChooser *)arg0, (const char *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1set_1uri_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1filter_1add_1pattern
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1filter_1add_1pattern)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1filter_1add_1pattern_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1filter_1add_1pattern_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_file_filter_add_pattern((GtkFileFilter *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1filter_1add_1pattern_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1filter_1add_1pattern_FUNC);
}
#endif
-#ifndef NO__1gtk_1file_1filter_1get_1name
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1filter_1get_1name)
+#ifndef NO_gtk_1file_1filter_1get_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1file_1filter_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1filter_1get_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1filter_1get_1name_FUNC);
rc = (jlong)gtk_file_filter_get_name((GtkFileFilter *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1filter_1get_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1filter_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1file_1filter_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1file_1filter_1new)
+#ifndef NO_gtk_1file_1filter_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1file_1filter_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1filter_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1filter_1new_FUNC);
rc = (jlong)gtk_file_filter_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1filter_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1filter_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1file_1filter_1set_1name
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1file_1filter_1set_1name)
+#ifndef NO_gtk_1file_1filter_1set_1name
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1file_1filter_1set_1name)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1file_1filter_1set_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1file_1filter_1set_1name_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_file_filter_set_name((GtkFileFilter *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1file_1filter_1set_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1file_1filter_1set_1name_FUNC);
}
#endif
-#ifndef NO__1gtk_1font_1chooser_1dialog_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1font_1chooser_1dialog_1new)
+#ifndef NO_gtk_1font_1chooser_1dialog_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1font_1chooser_1dialog_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1font_1chooser_1dialog_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1font_1chooser_1dialog_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_font_chooser_dialog_new((const gchar *)lparg0, (GtkWindow *)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1font_1chooser_1dialog_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1font_1chooser_1dialog_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1font_1chooser_1get_1font
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1font_1chooser_1get_1font)
+#ifndef NO_gtk_1font_1chooser_1get_1font
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1font_1chooser_1get_1font)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1font_1chooser_1get_1font_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1font_1chooser_1get_1font_FUNC);
rc = (jlong)gtk_font_chooser_get_font((GtkFontChooser *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1font_1chooser_1get_1font_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1font_1chooser_1get_1font_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1font_1chooser_1set_1font
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1font_1chooser_1set_1font)
+#ifndef NO_gtk_1font_1chooser_1set_1font
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1font_1chooser_1set_1font)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1font_1chooser_1set_1font_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1font_1chooser_1set_1font_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_font_chooser_set_font((GtkFontChooser *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1font_1chooser_1set_1font_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1font_1chooser_1set_1font_FUNC);
}
#endif
-#ifndef NO__1gtk_1frame_1get_1label_1widget
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1frame_1get_1label_1widget)
+#ifndef NO_gtk_1frame_1get_1label_1widget
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1frame_1get_1label_1widget)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1frame_1get_1label_1widget_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1frame_1get_1label_1widget_FUNC);
rc = (jlong)gtk_frame_get_label_widget((GtkFrame *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1frame_1get_1label_1widget_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1frame_1get_1label_1widget_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1frame_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1frame_1new)
+#ifndef NO_gtk_1frame_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1frame_1new)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1frame_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1frame_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_frame_new((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1frame_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1frame_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1frame_1set_1label_1widget
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1frame_1set_1label_1widget)
+#ifndef NO_gtk_1frame_1set_1label_1widget
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1frame_1set_1label_1widget)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1frame_1set_1label_1widget_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1frame_1set_1label_1widget_FUNC);
gtk_frame_set_label_widget((GtkFrame *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1frame_1set_1label_1widget_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1frame_1set_1shadow_1type
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1frame_1set_1shadow_1type)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1frame_1set_1shadow_1type_FUNC);
- gtk_frame_set_shadow_type((GtkFrame *)arg0, (GtkShadowType)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1frame_1set_1shadow_1type_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1frame_1set_1label_1widget_FUNC);
}
#endif
-#ifndef NO__1gtk_1gesture_1drag_1get_1offset
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1gesture_1drag_1get_1offset)
+#ifndef NO_gtk_1gesture_1drag_1get_1offset
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1gesture_1drag_1get_1offset)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1drag_1get_1offset_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1drag_1get_1offset_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
@@ -6135,18 +5102,18 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1gesture_1drag_1get_1offset)
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1drag_1get_1offset_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1drag_1get_1offset_FUNC);
}
#endif
-#ifndef NO__1gtk_1gesture_1drag_1get_1start_1point
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1drag_1get_1start_1point)
+#ifndef NO_gtk_1gesture_1drag_1get_1start_1point
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1gesture_1drag_1get_1start_1point)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1drag_1get_1start_1point_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1drag_1get_1start_1point_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
@@ -6161,17 +5128,17 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1drag_1get_1start_1point)
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1drag_1get_1start_1point_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1drag_1get_1start_1point_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1drag_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1drag_1new)
+#ifndef NO_gtk_1gesture_1drag_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1gesture_1drag_1new)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1drag_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1drag_1new_FUNC);
/*
rc = (jlong)gtk_gesture_drag_new((GtkWidget *)arg0);
*/
@@ -6181,37 +5148,17 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1drag_1new)
rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1drag_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1get_1last_1event
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1get_1last_1event)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1get_1last_1event_FUNC);
-/*
- rc = (jlong)gtk_gesture_get_last_event(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_gesture_get_last_event)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1get_1last_1event_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1drag_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1get_1last_1updated_1sequence
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1get_1last_1updated_1sequence)
+#ifndef NO_gtk_1gesture_1get_1last_1updated_1sequence
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1gesture_1get_1last_1updated_1sequence)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1get_1last_1updated_1sequence_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1get_1last_1updated_1sequence_FUNC);
/*
rc = (jlong)gtk_gesture_get_last_updated_sequence(arg0);
*/
@@ -6221,19 +5168,19 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1get_1last_1updated_1sequence)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1get_1last_1updated_1sequence_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1get_1last_1updated_1sequence_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1get_1point
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1get_1point)
+#ifndef NO_gtk_1gesture_1get_1point
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1gesture_1get_1point)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdoubleArray arg2, jdoubleArray arg3)
{
jdouble *lparg2=NULL;
jdouble *lparg3=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1get_1point_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1get_1point_FUNC);
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
/*
@@ -6248,55 +5195,17 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1get_1point)
fail:
if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1get_1point_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1get_1point_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1get_1sequences
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1get_1sequences)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1get_1sequences_FUNC);
-/*
- rc = (jlong)gtk_gesture_get_sequences(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_gesture_get_sequences)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1get_1sequences_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1group
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1gesture_1group)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1group_FUNC);
-/*
- gtk_gesture_group(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_gesture_group)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1group_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1is_1recognized
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1is_1recognized)
+#ifndef NO_gtk_1gesture_1is_1recognized
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1gesture_1is_1recognized)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1is_1recognized_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1is_1recognized_FUNC);
/*
rc = (jboolean)gtk_gesture_is_recognized(arg0);
*/
@@ -6306,85 +5215,17 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1is_1recognized)
rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1is_1recognized_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1is_1recognized_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1multi_1press_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1multi_1press_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1multi_1press_1new_FUNC);
- rc = (jlong)gtk_gesture_multi_press_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1multi_1press_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1pan_1get_1orientation
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1pan_1get_1orientation)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1pan_1get_1orientation_FUNC);
-/*
- rc = (jlong)gtk_gesture_pan_get_orientation(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_gesture_pan_get_orientation)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1pan_1get_1orientation_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1pan_1new
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1gesture_1pan_1new)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1pan_1new_FUNC);
-/*
- gtk_gesture_pan_new(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_gesture_pan_new)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1pan_1new_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1pan_1set_1orientation
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1gesture_1pan_1set_1orientation)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1pan_1set_1orientation_FUNC);
-/*
- gtk_gesture_pan_set_orientation(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_gesture_pan_set_orientation)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1pan_1set_1orientation_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1rotate_1get_1angle_1delta
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1gesture_1rotate_1get_1angle_1delta)
+#ifndef NO_gtk_1gesture_1rotate_1get_1angle_1delta
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1gesture_1rotate_1get_1angle_1delta)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1rotate_1get_1angle_1delta_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1rotate_1get_1angle_1delta_FUNC);
/*
rc = (jdouble)gtk_gesture_rotate_get_angle_delta(arg0);
*/
@@ -6394,17 +5235,17 @@ JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1gesture_1rotate_1get_1angle_1delta)
rc = (jdouble)((jdouble (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1rotate_1get_1angle_1delta_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1rotate_1get_1angle_1delta_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1rotate_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1rotate_1new)
+#ifndef NO_gtk_1gesture_1rotate_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1gesture_1rotate_1new)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1rotate_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1rotate_1new_FUNC);
/*
rc = (jlong)gtk_gesture_rotate_new(arg0);
*/
@@ -6414,16 +5255,28 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1rotate_1new)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1rotate_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1rotate_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1single_1set_1button
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1gesture_1single_1set_1button)
+#ifndef NO_gtk_1gesture_1single_1get_1current_1button
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1gesture_1single_1get_1current_1button)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1single_1get_1current_1button_FUNC);
+ rc = (jint)gtk_gesture_single_get_current_button((GtkGestureSingle *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1single_1get_1current_1button_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_gtk_1gesture_1single_1set_1button
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1gesture_1single_1set_1button)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1single_1set_1button_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1single_1set_1button_FUNC);
/*
gtk_gesture_single_set_button(arg0, arg1);
*/
@@ -6433,18 +5286,18 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1gesture_1single_1set_1button)
((void (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1single_1set_1button_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1single_1set_1button_FUNC);
}
#endif
-#ifndef NO__1gtk_1gesture_1swipe_1get_1velocity
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1swipe_1get_1velocity)
+#ifndef NO_gtk_1gesture_1swipe_1get_1velocity
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1gesture_1swipe_1get_1velocity)
(JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jdoubleArray arg2)
{
jdouble *lparg1=NULL;
jdouble *lparg2=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1swipe_1get_1velocity_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1swipe_1get_1velocity_FUNC);
if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
@@ -6459,37 +5312,17 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1gesture_1swipe_1get_1velocity)
fail:
if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1swipe_1get_1velocity_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1gesture_1swipe_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1swipe_1new)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1swipe_1new_FUNC);
-/*
- rc = (jlong)gtk_gesture_swipe_new(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_gesture_swipe_new)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1swipe_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1swipe_1get_1velocity_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1zoom_1get_1scale_1delta
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1gesture_1zoom_1get_1scale_1delta)
+#ifndef NO_gtk_1gesture_1zoom_1get_1scale_1delta
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1gesture_1zoom_1get_1scale_1delta)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1zoom_1get_1scale_1delta_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1zoom_1get_1scale_1delta_FUNC);
/*
rc = (jdouble)gtk_gesture_zoom_get_scale_delta(arg0);
*/
@@ -6499,17 +5332,17 @@ JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1gesture_1zoom_1get_1scale_1delta)
rc = (jdouble)((jdouble (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1zoom_1get_1scale_1delta_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1zoom_1get_1scale_1delta_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1gesture_1zoom_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1zoom_1new)
+#ifndef NO_gtk_1gesture_1zoom_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1gesture_1zoom_1new)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1gesture_1zoom_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1gesture_1zoom_1new_FUNC);
/*
rc = (jlong)gtk_gesture_zoom_new(arg0);
*/
@@ -6519,247 +5352,87 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1gesture_1zoom_1new)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1gesture_1zoom_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1gesture_1zoom_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1get_1current_1event
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1get_1current_1event)
+#ifndef NO_gtk_1get_1default_1language
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1get_1default_1language)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1get_1current_1event_FUNC);
- rc = (jlong)gtk_get_current_event();
- GTK_NATIVE_EXIT(env, that, _1gtk_1get_1current_1event_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1get_1current_1event_1state
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1get_1current_1event_1state)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1get_1current_1event_1state_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jboolean)gtk_get_current_event_state((GdkModifierType*)lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1get_1current_1event_1state_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1get_1default_1language
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1get_1default_1language)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1get_1default_1language_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1get_1default_1language_FUNC);
rc = (jlong)gtk_get_default_language();
- GTK_NATIVE_EXIT(env, that, _1gtk_1get_1default_1language_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1get_1default_1language_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1get_1event_1widget
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1get_1event_1widget)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1get_1event_1widget_FUNC);
- rc = (jlong)gtk_get_event_widget((GdkEvent *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1get_1event_1widget_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1get_1major_1version
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1get_1major_1version)
+#ifndef NO_gtk_1get_1major_1version
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1get_1major_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1get_1major_1version_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1get_1major_1version_FUNC);
rc = (jint)gtk_get_major_version();
- GTK_NATIVE_EXIT(env, that, _1gtk_1get_1major_1version_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1get_1major_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1get_1micro_1version
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1get_1micro_1version)
+#ifndef NO_gtk_1get_1micro_1version
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1get_1micro_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1get_1micro_1version_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1get_1micro_1version_FUNC);
rc = (jint)gtk_get_micro_version();
- GTK_NATIVE_EXIT(env, that, _1gtk_1get_1micro_1version_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1get_1micro_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1get_1minor_1version
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1get_1minor_1version)
+#ifndef NO_gtk_1get_1minor_1version
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1get_1minor_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1get_1minor_1version_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1get_1minor_1version_FUNC);
rc = (jint)gtk_get_minor_version();
- GTK_NATIVE_EXIT(env, that, _1gtk_1get_1minor_1version_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1grab_1add
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1grab_1add)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1grab_1add_FUNC);
- gtk_grab_add((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1grab_1add_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1grab_1get_1current
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1grab_1get_1current)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1grab_1get_1current_FUNC);
- rc = (jlong)gtk_grab_get_current();
- GTK_NATIVE_EXIT(env, that, _1gtk_1grab_1get_1current_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1grab_1remove
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1grab_1remove)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1grab_1remove_FUNC);
- gtk_grab_remove((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1grab_1remove_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1hsv_1to_1rgb
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1hsv_1to_1rgb)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jdoubleArray arg5)
-{
- jdouble *lparg3=NULL;
- jdouble *lparg4=NULL;
- jdouble *lparg5=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1hsv_1to_1rgb_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL)) == NULL) goto fail;
- gtk_hsv_to_rgb((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble *)lparg3, (gdouble *)lparg4, (gdouble *)lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1hsv_1to_1rgb_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1icon_1info_1load_1icon
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1icon_1info_1load_1icon)
- (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
-{
- jlong *lparg1=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1icon_1info_1load_1icon_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_icon_info_load_icon((GtkIconInfo *)arg0, (GError **)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1icon_1info_1load_1icon_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1icon_1theme_1get_1default
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1icon_1theme_1get_1default)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1icon_1theme_1get_1default_FUNC);
- rc = (jlong)gtk_icon_theme_get_default();
- GTK_NATIVE_EXIT(env, that, _1gtk_1icon_1theme_1get_1default_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1icon_1theme_1load_1icon
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1icon_1theme_1load_1icon)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jint arg3, jlong arg4)
-{
- jbyte *lparg1=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1icon_1theme_1load_1icon_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_icon_theme_load_icon((GtkIconTheme *)arg0, (const gchar *)lparg1, (gint)arg2, (GtkIconLookupFlags)arg3, (GError **)arg4);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1icon_1theme_1load_1icon_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1icon_1theme_1lookup_1by_1gicon
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1icon_1theme_1lookup_1by_1gicon)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
- rc = (jlong)gtk_icon_theme_lookup_by_gicon((GtkIconTheme *)arg0, (GIcon *)arg1, (gint)arg2, (GtkIconLookupFlags)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1get_1minor_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1im_1context_1filter_1keypress
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1im_1context_1filter_1keypress)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1filter_1keypress_FUNC);
- rc = (jboolean)gtk_im_context_filter_keypress((GtkIMContext *)arg0, (GdkEventKey *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1filter_1keypress_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1im_1context_1focus_1in
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1im_1context_1focus_1in)
+#ifndef NO_gtk_1im_1context_1focus_1in
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1im_1context_1focus_1in)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1focus_1in_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1focus_1in_FUNC);
gtk_im_context_focus_in((GtkIMContext *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1focus_1in_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1focus_1in_FUNC);
}
#endif
-#ifndef NO__1gtk_1im_1context_1focus_1out
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1im_1context_1focus_1out)
+#ifndef NO_gtk_1im_1context_1focus_1out
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1im_1context_1focus_1out)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1focus_1out_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1focus_1out_FUNC);
gtk_im_context_focus_out((GtkIMContext *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1focus_1out_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1focus_1out_FUNC);
}
#endif
-#ifndef NO__1gtk_1im_1context_1get_1preedit_1string
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1im_1context_1get_1preedit_1string)
+#ifndef NO_gtk_1im_1context_1get_1preedit_1string
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1im_1context_1get_1preedit_1string)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jlongArray arg2, jintArray arg3)
{
jlong *lparg1=NULL;
jlong *lparg2=NULL;
jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1get_1preedit_1string_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1get_1preedit_1string_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
@@ -6768,1713 +5441,1365 @@ fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1get_1preedit_1string_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1get_1preedit_1string_FUNC);
}
#endif
-#ifndef NO__1gtk_1im_1context_1get_1type
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1im_1context_1get_1type)
+#ifndef NO_gtk_1im_1context_1get_1type
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1im_1context_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1get_1type_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1get_1type_FUNC);
rc = (jlong)gtk_im_context_get_type();
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1get_1type_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1im_1context_1reset
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1im_1context_1reset)
+#ifndef NO_gtk_1im_1context_1reset
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1im_1context_1reset)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1reset_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1reset_FUNC);
gtk_im_context_reset((GtkIMContext *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1reset_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1reset_FUNC);
}
#endif
-#ifndef NO__1gtk_1im_1context_1set_1client_1window
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1im_1context_1set_1client_1window)
+#ifndef NO_gtk_1im_1context_1set_1client_1window
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1im_1context_1set_1client_1window)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1set_1client_1window_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1set_1client_1window_FUNC);
gtk_im_context_set_client_window((GtkIMContext *)arg0, (GdkWindow *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1set_1client_1window_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1set_1client_1window_FUNC);
}
#endif
-#ifndef NO__1gtk_1im_1context_1set_1cursor_1location
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1im_1context_1set_1cursor_1location)
+#ifndef NO_gtk_1im_1context_1set_1cursor_1location
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1im_1context_1set_1cursor_1location)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1context_1set_1cursor_1location_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1set_1cursor_1location_FUNC);
if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
gtk_im_context_set_cursor_location((GtkIMContext *)arg0, (GdkRectangle *)lparg1);
fail:
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1context_1set_1cursor_1location_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1set_1cursor_1location_FUNC);
}
#endif
-#ifndef NO__1gtk_1im_1multicontext_1append_1menuitems
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1im_1multicontext_1append_1menuitems)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1multicontext_1append_1menuitems_FUNC);
-/*
- gtk_im_multicontext_append_menuitems((GtkIMMulticontext *)arg0, (GtkMenuShell *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_im_multicontext_append_menuitems)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkIMMulticontext *, GtkMenuShell *))fp)((GtkIMMulticontext *)arg0, (GtkMenuShell *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1multicontext_1append_1menuitems_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1im_1multicontext_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1im_1multicontext_1new)
+#ifndef NO_gtk_1im_1multicontext_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1im_1multicontext_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1im_1multicontext_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1im_1multicontext_1new_FUNC);
rc = (jlong)gtk_im_multicontext_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1im_1multicontext_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1im_1multicontext_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1image_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1image_1new)
+#ifndef NO_gtk_1image_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1image_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1image_1new_FUNC);
rc = (jlong)gtk_image_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1image_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1image_1new_1from_1icon_1name___3B
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1image_1new_1from_1icon_1name___3B)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1new_1from_1icon_1name___3B_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
- rc = (jlong)gtk_image_new_from_icon_name((const gchar *)lparg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_image_new_from_icon_name)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
- }
- }
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1new_1from_1icon_1name___3B_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1image_1new_1from_1icon_1name___3BI
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1image_1new_1from_1icon_1name___3BI)
- (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
-{
- jbyte *lparg0=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1new_1from_1icon_1name___3BI_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
- rc = (jlong)gtk_image_new_from_icon_name((const gchar *)lparg0, (GtkIconSize)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_image_new_from_icon_name)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(const gchar *, GtkIconSize))fp)((const gchar *)lparg0, (GtkIconSize)arg1);
- }
- }
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1new_1from_1icon_1name___3BI_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1image_1new_1from_1pixbuf
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1image_1new_1from_1pixbuf)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1new_1from_1pixbuf_FUNC);
- rc = (jlong)gtk_image_new_from_pixbuf((GdkPixbuf *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1new_1from_1pixbuf_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1image_1set_1from_1gicon__JJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1image_1set_1from_1gicon__JJ)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1set_1from_1gicon__JJ_FUNC);
-/*
- gtk_image_set_from_gicon((GtkImage *)arg0, (GIcon *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_image_set_from_gicon)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkImage *, GIcon *))fp)((GtkImage *)arg0, (GIcon *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1set_1from_1gicon__JJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1image_1set_1from_1gicon__JJI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1image_1set_1from_1gicon__JJI)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1set_1from_1gicon__JJI_FUNC);
-/*
- gtk_image_set_from_gicon((GtkImage *)arg0, (GIcon *)arg1, (GtkIconSize)arg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_image_set_from_gicon)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkImage *, GIcon *, GtkIconSize))fp)((GtkImage *)arg0, (GIcon *)arg1, (GtkIconSize)arg2);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1set_1from_1gicon__JJI_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1image_1set_1from_1icon_1name__J_3B
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1image_1set_1from_1icon_1name__J_3B)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1set_1from_1icon_1name__J_3B_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- gtk_image_set_from_icon_name((GtkImage *)arg0, (const gchar *)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_image_set_from_icon_name)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkImage *, const gchar *))fp)((GtkImage *)arg0, (const gchar *)lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1set_1from_1icon_1name__J_3B_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1image_1set_1from_1icon_1name__J_3BI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1image_1set_1from_1icon_1name__J_3BI)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1set_1from_1icon_1name__J_3BI_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- gtk_image_set_from_icon_name((GtkImage *)arg0, (const gchar *)lparg1, (GtkIconSize)arg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_image_set_from_icon_name)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkImage *, const gchar *, GtkIconSize))fp)((GtkImage *)arg0, (const gchar *)lparg1, (GtkIconSize)arg2);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1set_1from_1icon_1name__J_3BI_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1image_1set_1from_1pixbuf
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1image_1set_1from_1pixbuf)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1set_1from_1pixbuf_FUNC);
- gtk_image_set_from_pixbuf((GtkImage *)arg0, (GdkPixbuf *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1set_1from_1pixbuf_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1image_1set_1pixel_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1image_1set_1pixel_1size)
+#ifndef NO_gtk_1image_1set_1pixel_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1image_1set_1pixel_1size)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1image_1set_1pixel_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1image_1set_1pixel_1size_FUNC);
gtk_image_set_pixel_size((GtkImage *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1image_1set_1pixel_1size_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1init_1check__
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1init_1check__)
- (JNIEnv *env, jclass that)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1init_1check___FUNC);
-/*
- rc = (jboolean)gtk_init_check();
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_init_check)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)())fp)();
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1init_1check___FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1init_1check___3J_3J
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1init_1check___3J_3J)
- (JNIEnv *env, jclass that, jlongArray arg0, jlongArray arg1)
-{
- jlong *lparg0=NULL;
- jlong *lparg1=NULL;
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1init_1check___3J_3J_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- rc = (jboolean)gtk_init_check((int *)lparg0, (char ***)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_init_check)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(int *, char ***))fp)((int *)lparg0, (char ***)lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseLongArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1init_1check___3J_3J_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1image_1set_1pixel_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1label_1get_1layout
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1label_1get_1layout)
+#ifndef NO_gtk_1label_1get_1layout
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1label_1get_1layout)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1get_1layout_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1get_1layout_FUNC);
rc = (jlong)gtk_label_get_layout((GtkLabel *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1get_1layout_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1get_1layout_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1label_1get_1mnemonic_1keyval
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1label_1get_1mnemonic_1keyval)
+#ifndef NO_gtk_1label_1get_1mnemonic_1keyval
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1label_1get_1mnemonic_1keyval)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1get_1mnemonic_1keyval_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1get_1mnemonic_1keyval_FUNC);
rc = (jint)gtk_label_get_mnemonic_keyval((GtkLabel *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1get_1mnemonic_1keyval_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1get_1mnemonic_1keyval_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1label_1get_1type
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1label_1get_1type)
+#ifndef NO_gtk_1label_1get_1type
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1label_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1get_1type_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1get_1type_FUNC);
rc = (jlong)gtk_label_get_type();
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1get_1type_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1label_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1label_1new)
+#ifndef NO_gtk_1label_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1label_1new)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_label_new((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1label_1new_1with_1mnemonic
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1label_1new_1with_1mnemonic)
+#ifndef NO_gtk_1label_1new_1with_1mnemonic
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1label_1new_1with_1mnemonic)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1new_1with_1mnemonic_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1new_1with_1mnemonic_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_label_new_with_mnemonic((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1new_1with_1mnemonic_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1new_1with_1mnemonic_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1label_1set_1attributes
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1attributes)
+#ifndef NO_gtk_1label_1set_1attributes
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1attributes)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1attributes_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1attributes_FUNC);
gtk_label_set_attributes((GtkLabel *)arg0, (PangoAttrList *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1attributes_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1attributes_FUNC);
}
#endif
-#ifndef NO__1gtk_1label_1set_1justify
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1justify)
+#ifndef NO_gtk_1label_1set_1justify
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1justify)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1justify_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1justify_FUNC);
gtk_label_set_justify((GtkLabel *)arg0, (GtkJustification)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1justify_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1label_1set_1line_1wrap
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1line_1wrap)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1line_1wrap_FUNC);
- gtk_label_set_line_wrap((GtkLabel *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1line_1wrap_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1label_1set_1line_1wrap_1mode
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1line_1wrap_1mode)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1line_1wrap_1mode_FUNC);
- gtk_label_set_line_wrap_mode((GtkLabel *)arg0, (PangoWrapMode)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1line_1wrap_1mode_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1justify_FUNC);
}
#endif
-#ifndef NO__1gtk_1label_1set_1text__JJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1text__JJ)
+#ifndef NO_gtk_1label_1set_1text__JJ
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1text__JJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1text__JJ_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1text__JJ_FUNC);
gtk_label_set_text((GtkLabel *)arg0, (const gchar *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1text__JJ_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1text__JJ_FUNC);
}
#endif
-#ifndef NO__1gtk_1label_1set_1text__J_3B
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1text__J_3B)
+#ifndef NO_gtk_1label_1set_1text__J_3B
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1text__J_3B)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1text__J_3B_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1text__J_3B_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_label_set_text((GtkLabel *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1text__J_3B_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1text__J_3B_FUNC);
}
#endif
-#ifndef NO__1gtk_1label_1set_1text_1with_1mnemonic
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1text_1with_1mnemonic)
+#ifndef NO_gtk_1label_1set_1text_1with_1mnemonic
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1text_1with_1mnemonic)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1text_1with_1mnemonic_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1text_1with_1mnemonic_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_label_set_text_with_mnemonic((GtkLabel *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1text_1with_1mnemonic_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1text_1with_1mnemonic_FUNC);
}
#endif
-#ifndef NO__1gtk_1label_1set_1xalign
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1xalign)
+#ifndef NO_gtk_1label_1set_1xalign
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1xalign)
(JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1xalign_FUNC);
-/*
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1xalign_FUNC);
gtk_label_set_xalign((GtkLabel *)arg0, (gfloat)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_label_set_xalign)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkLabel *, gfloat))fp)((GtkLabel *)arg0, (gfloat)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1xalign_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1xalign_FUNC);
}
#endif
-#ifndef NO__1gtk_1label_1set_1yalign
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1label_1set_1yalign)
+#ifndef NO_gtk_1label_1set_1yalign
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1yalign)
(JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1label_1set_1yalign_FUNC);
-/*
+ GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1yalign_FUNC);
gtk_label_set_yalign((GtkLabel *)arg0, (gfloat)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_label_set_yalign)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkLabel *, gfloat))fp)((GtkLabel *)arg0, (gfloat)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1label_1set_1yalign_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1yalign_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1append
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1append)
+#ifndef NO_gtk_1list_1store_1append
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1append)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1append_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1append_FUNC);
gtk_list_store_append((GtkListStore *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1append_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1append_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1clear
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1clear)
+#ifndef NO_gtk_1list_1store_1clear
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1clear)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1clear_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1clear_FUNC);
gtk_list_store_clear((GtkListStore *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1clear_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1clear_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1insert
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1insert)
+#ifndef NO_gtk_1list_1store_1insert
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1insert)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1insert_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1insert_FUNC);
gtk_list_store_insert((GtkListStore *)arg0, (GtkTreeIter *)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1insert_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1insert_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1newv
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1list_1store_1newv)
+#ifndef NO_gtk_1list_1store_1newv
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1list_1store_1newv)
(JNIEnv *env, jclass that, jint arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1newv_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1newv_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_list_store_newv((gint)arg0, (GType *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1newv_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1newv_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1list_1store_1remove
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1remove)
+#ifndef NO_gtk_1list_1store_1remove
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1remove)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1remove_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1remove_FUNC);
gtk_list_store_remove((GtkListStore *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1remove_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1remove_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1set__JJIII
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1set__JJIII)
+#ifndef NO_gtk_1list_1store_1set__JJIII
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1set__JJIII)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIII_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1set__JJIII_FUNC);
gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIII_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1set__JJIII_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1set__JJIJI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1set__JJIJI)
+#ifndef NO_gtk_1list_1store_1set__JJIJI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1set__JJIJI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jint arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIJI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1set__JJIJI_FUNC);
gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIJI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1set__JJIJI_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I)
+#ifndef NO_gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jobject arg3, jint arg4)
{
GdkRGBA _arg3, *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
if (arg3) if ((lparg3 = getGdkRGBAFields(env, arg3, &_arg3)) == NULL) goto fail;
gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
fail:
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1set__JJIZI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1set__JJIZI)
+#ifndef NO_gtk_1list_1store_1set__JJIZI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1set__JJIZI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jboolean arg3, jint arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIZI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1set__JJIZI_FUNC);
gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIZI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1set__JJIZI_FUNC);
}
#endif
-#ifndef NO__1gtk_1list_1store_1set__JJI_3BI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1list_1store_1set__JJI_3BI)
+#ifndef NO_gtk_1list_1store_1set__JJI_3BI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1set__JJI_3BI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jbyteArray arg3, jint arg4)
{
jbyte *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJI_3BI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1set__JJI_3BI_FUNC);
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
fail:
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJI_3BI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1set__JJI_3BI_FUNC);
}
#endif
-#ifndef NO__1gtk_1main
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1main)
- (JNIEnv *env, jclass that)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1main_FUNC);
- gtk_main();
- GTK_NATIVE_EXIT(env, that, _1gtk_1main_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1main_1do_1event
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1main_1do_1event)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1main_1do_1event_FUNC);
- gtk_main_do_event((GdkEvent *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1main_1do_1event_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1bar_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1menu_1bar_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1bar_1new_FUNC);
- rc = (jlong)gtk_menu_bar_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1bar_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1item_1get_1submenu
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1menu_1item_1get_1submenu)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1item_1get_1submenu_FUNC);
- rc = (jlong)gtk_menu_item_get_submenu((GtkMenuItem *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1item_1get_1submenu_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1item_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1menu_1item_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1item_1new_FUNC);
- rc = (jlong)gtk_menu_item_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1item_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1item_1set_1submenu
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1item_1set_1submenu)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gtk_1list_1store_1set_1value
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1list_1store_1set_1value)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1item_1set_1submenu_FUNC);
- gtk_menu_item_set_submenu((GtkMenuItem *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1item_1set_1submenu_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1list_1store_1set_1value_FUNC);
+ gtk_list_store_set_value((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, (GValue *)arg3);
+ GTK_NATIVE_EXIT(env, that, gtk_1list_1store_1set_1value_FUNC);
}
#endif
-#ifndef NO__1gtk_1menu_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1menu_1new)
+#ifndef NO_gtk_1menu_1button_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1menu_1button_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1new_FUNC);
- rc = (jlong)gtk_menu_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1menu_1button_1new_FUNC);
+ rc = (jlong)gtk_menu_button_new();
+ GTK_NATIVE_EXIT(env, that, gtk_1menu_1button_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1menu_1popdown
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1popdown)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1popdown_FUNC);
- gtk_menu_popdown((GtkMenu *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1popdown_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1popup
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1popup)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jint arg5, jint arg6)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1popup_FUNC);
-/*
- gtk_menu_popup((GtkMenu *)arg0, (GtkWidget *)arg1, (GtkWidget *)arg2, (GtkMenuPositionFunc)arg3, (gpointer)arg4, (guint)arg5, (guint32)arg6);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_menu_popup)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkMenu *, GtkWidget *, GtkWidget *, GtkMenuPositionFunc, gpointer, guint, guint32))fp)((GtkMenu *)arg0, (GtkWidget *)arg1, (GtkWidget *)arg2, (GtkMenuPositionFunc)arg3, (gpointer)arg4, (guint)arg5, (guint32)arg6);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1popup_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1popup_1at_1pointer
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1popup_1at_1pointer)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1popup_1at_1pointer_FUNC);
-/*
- gtk_menu_popup_at_pointer(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_menu_popup_at_pointer)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1popup_1at_1pointer_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1popup_1at_1rect
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1popup_1at_1rect)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3, jint arg4, jlong arg5)
-{
- GdkRectangle _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1popup_1at_1rect_FUNC);
- if (arg2) if ((lparg2 = getGdkRectangleFields(env, arg2, &_arg2)) == NULL) goto fail;
-/*
- gtk_menu_popup_at_rect(arg0, arg1, lparg2, arg3, arg4, arg5);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_menu_popup_at_rect)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong, GdkRectangle *, jint, jint, jlong))fp)(arg0, arg1, lparg2, arg3, arg4, arg5);
- }
- }
-fail:
- if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1popup_1at_1rect_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1shell_1deactivate
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1shell_1deactivate)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1shell_1deactivate_FUNC);
- gtk_menu_shell_deactivate((GtkMenuShell *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1shell_1deactivate_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1shell_1insert
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1shell_1insert)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1shell_1insert_FUNC);
- gtk_menu_shell_insert((GtkMenuShell *)arg0, (GtkWidget *)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1shell_1insert_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1shell_1set_1take_1focus
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1menu_1shell_1set_1take_1focus)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1shell_1set_1take_1focus_FUNC);
- gtk_menu_shell_set_take_focus((GtkMenuShell *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1shell_1set_1take_1focus_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1menu_1tool_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1menu_1tool_1button_1new)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+#ifndef NO_gtk_1message_1dialog_1format_1secondary_1text
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1message_1dialog_1format_1secondary_1text)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1menu_1tool_1button_1new_FUNC);
+ jbyte *lparg2=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1message_1dialog_1format_1secondary_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_menu_tool_button_new((GtkWidget *)arg0, (const gchar *)lparg1);
+ if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ gtk_message_dialog_format_secondary_text((GtkMessageDialog *)arg0, (const gchar *)lparg1, (const gchar *)lparg2);
fail:
+ if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1menu_1tool_1button_1new_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1message_1dialog_1format_1secondary_1text_FUNC);
}
#endif
-#ifndef NO__1gtk_1message_1dialog_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1message_1dialog_1new)
+#ifndef NO_gtk_1message_1dialog_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1message_1dialog_1new)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jbyteArray arg4, jbyteArray arg5)
{
jbyte *lparg4=NULL;
jbyte *lparg5=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1message_1dialog_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1message_1dialog_1new_FUNC);
if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
rc = (jlong)gtk_message_dialog_new((GtkWindow *)arg0, (GtkDialogFlags)arg1, (GtkMessageType)arg2, (GtkButtonsType)arg3, (const gchar *)lparg4, (const gchar *)lparg5);
fail:
if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1message_1dialog_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1message_1dialog_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1misc_1set_1alignment
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1misc_1set_1alignment)
- (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2)
+#ifndef NO_gtk_1native_1dialog_1show
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1native_1dialog_1show)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1misc_1set_1alignment_FUNC);
-/*
- gtk_misc_set_alignment((GtkMisc *)arg0, (gfloat)arg1, (gfloat)arg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_misc_set_alignment)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkMisc *, gfloat, gfloat))fp)((GtkMisc *)arg0, (gfloat)arg1, (gfloat)arg2);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1misc_1set_1alignment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1native_1dialog_1show_FUNC);
+ gtk_native_dialog_show((GtkNativeDialog *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1native_1dialog_1show_FUNC);
}
#endif
-#ifndef NO__1gtk_1native_1dialog_1run
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1native_1dialog_1run)
+#ifndef NO_gtk_1notebook_1get_1current_1page
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1notebook_1get_1current_1page)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1native_1dialog_1run_FUNC);
- rc = (jint)gtk_native_dialog_run((GtkNativeDialog *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1native_1dialog_1run_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1get_1current_1page_FUNC);
+ rc = (jint)gtk_notebook_get_current_page((GtkNotebook *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1get_1current_1page_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1notebook_1get_1current_1page
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1notebook_1get_1current_1page)
+#ifndef NO_gtk_1notebook_1get_1n_1pages
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1notebook_1get_1n_1pages)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1get_1current_1page_FUNC);
- rc = (jint)gtk_notebook_get_current_page((GtkNotebook *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1get_1current_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1get_1n_1pages_FUNC);
+ rc = (jint)gtk_notebook_get_n_pages((GtkNotebook *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1get_1n_1pages_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1notebook_1get_1scrollable
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1notebook_1get_1scrollable)
+#ifndef NO_gtk_1notebook_1get_1scrollable
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1notebook_1get_1scrollable)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1get_1scrollable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1get_1scrollable_FUNC);
rc = (jboolean)gtk_notebook_get_scrollable((GtkNotebook *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1get_1scrollable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1get_1scrollable_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1notebook_1insert_1page
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1insert_1page)
+#ifndef NO_gtk_1notebook_1insert_1page
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1insert_1page)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1insert_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1insert_1page_FUNC);
gtk_notebook_insert_page((GtkNotebook *)arg0, (GtkWidget *)arg1, (GtkWidget *)arg2, (gint)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1insert_1page_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1insert_1page_FUNC);
}
#endif
-#ifndef NO__1gtk_1notebook_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1notebook_1new)
+#ifndef NO_gtk_1notebook_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1notebook_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1new_FUNC);
rc = (jlong)gtk_notebook_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1notebook_1next_1page
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1next_1page)
+#ifndef NO_gtk_1notebook_1next_1page
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1next_1page)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1next_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1next_1page_FUNC);
gtk_notebook_next_page((GtkNotebook *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1next_1page_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1next_1page_FUNC);
}
#endif
-#ifndef NO__1gtk_1notebook_1prev_1page
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1prev_1page)
+#ifndef NO_gtk_1notebook_1prev_1page
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1prev_1page)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1prev_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1prev_1page_FUNC);
gtk_notebook_prev_page((GtkNotebook *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1prev_1page_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1prev_1page_FUNC);
}
#endif
-#ifndef NO__1gtk_1notebook_1remove_1page
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1remove_1page)
+#ifndef NO_gtk_1notebook_1remove_1page
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1remove_1page)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1remove_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1remove_1page_FUNC);
gtk_notebook_remove_page((GtkNotebook *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1remove_1page_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1remove_1page_FUNC);
}
#endif
-#ifndef NO__1gtk_1notebook_1set_1current_1page
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1set_1current_1page)
+#ifndef NO_gtk_1notebook_1set_1current_1page
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1set_1current_1page)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1set_1current_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1set_1current_1page_FUNC);
gtk_notebook_set_current_page((GtkNotebook *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1set_1current_1page_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1set_1current_1page_FUNC);
}
#endif
-#ifndef NO__1gtk_1notebook_1set_1scrollable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1set_1scrollable)
+#ifndef NO_gtk_1notebook_1set_1scrollable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1set_1scrollable)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1set_1scrollable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1set_1scrollable_FUNC);
gtk_notebook_set_scrollable((GtkNotebook *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1set_1scrollable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1set_1scrollable_FUNC);
}
#endif
-#ifndef NO__1gtk_1notebook_1set_1show_1tabs
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1set_1show_1tabs)
+#ifndef NO_gtk_1notebook_1set_1show_1tabs
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1set_1show_1tabs)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1set_1show_1tabs_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1set_1show_1tabs_FUNC);
gtk_notebook_set_show_tabs((GtkNotebook *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1set_1show_1tabs_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1set_1show_1tabs_FUNC);
}
#endif
-#ifndef NO__1gtk_1notebook_1set_1tab_1pos
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1notebook_1set_1tab_1pos)
+#ifndef NO_gtk_1notebook_1set_1tab_1pos
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1notebook_1set_1tab_1pos)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1notebook_1set_1tab_1pos_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1notebook_1set_1tab_1pos_FUNC);
gtk_notebook_set_tab_pos((GtkNotebook *)arg0, (GtkPositionType)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1notebook_1set_1tab_1pos_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1notebook_1set_1tab_1pos_FUNC);
}
#endif
-#ifndef NO__1gtk_1orientable_1set_1orientation
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1orientable_1set_1orientation)
+#ifndef NO_gtk_1orientable_1set_1orientation
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1orientable_1set_1orientation)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1orientable_1set_1orientation_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1orientable_1set_1orientation_FUNC);
gtk_orientable_set_orientation((GtkOrientable *)arg0, (GtkOrientation)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1orientable_1set_1orientation_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1orientable_1set_1orientation_FUNC);
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1bottom_1margin
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1bottom_1margin)
+#ifndef NO_gtk_1page_1setup_1get_1bottom_1margin
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1bottom_1margin)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1bottom_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1bottom_1margin_FUNC);
rc = (jdouble)gtk_page_setup_get_bottom_margin((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1bottom_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1bottom_1margin_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1left_1margin
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1left_1margin)
+#ifndef NO_gtk_1page_1setup_1get_1left_1margin
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1left_1margin)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1left_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1left_1margin_FUNC);
rc = (jdouble)gtk_page_setup_get_left_margin((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1left_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1left_1margin_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1orientation
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1orientation)
+#ifndef NO_gtk_1page_1setup_1get_1orientation
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1orientation)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1orientation_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1orientation_FUNC);
rc = (jint)gtk_page_setup_get_orientation((GtkPageSetup *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1orientation_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1orientation_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1page_1height
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1page_1height)
+#ifndef NO_gtk_1page_1setup_1get_1page_1height
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1page_1height)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1page_1height_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1page_1height_FUNC);
rc = (jdouble)gtk_page_setup_get_page_height((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1page_1height_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1page_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1page_1width
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1page_1width)
+#ifndef NO_gtk_1page_1setup_1get_1page_1width
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1page_1width)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1page_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1page_1width_FUNC);
rc = (jdouble)gtk_page_setup_get_page_width((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1page_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1page_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1paper_1height
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1paper_1height)
+#ifndef NO_gtk_1page_1setup_1get_1paper_1height
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1paper_1height)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1paper_1height_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1paper_1height_FUNC);
rc = (jdouble)gtk_page_setup_get_paper_height((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1paper_1height_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1paper_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1paper_1size
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1paper_1size)
+#ifndef NO_gtk_1page_1setup_1get_1paper_1size
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1paper_1size)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1paper_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1paper_1size_FUNC);
rc = (jlong)gtk_page_setup_get_paper_size((GtkPageSetup *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1paper_1size_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1paper_1size_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1paper_1width
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1paper_1width)
+#ifndef NO_gtk_1page_1setup_1get_1paper_1width
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1paper_1width)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1paper_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1paper_1width_FUNC);
rc = (jdouble)gtk_page_setup_get_paper_width((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1paper_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1paper_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1right_1margin
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1right_1margin)
+#ifndef NO_gtk_1page_1setup_1get_1right_1margin
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1right_1margin)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1right_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1right_1margin_FUNC);
rc = (jdouble)gtk_page_setup_get_right_margin((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1right_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1right_1margin_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1get_1top_1margin
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1page_1setup_1get_1top_1margin)
+#ifndef NO_gtk_1page_1setup_1get_1top_1margin
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1page_1setup_1get_1top_1margin)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1get_1top_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1get_1top_1margin_FUNC);
rc = (jdouble)gtk_page_setup_get_top_margin((GtkPageSetup *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1get_1top_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1get_1top_1margin_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1page_1setup_1new)
+#ifndef NO_gtk_1page_1setup_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1page_1setup_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1new_FUNC);
rc = (jlong)gtk_page_setup_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1page_1setup_1set_1bottom_1margin
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1page_1setup_1set_1bottom_1margin)
+#ifndef NO_gtk_1page_1setup_1set_1bottom_1margin
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1page_1setup_1set_1bottom_1margin)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1set_1bottom_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1set_1bottom_1margin_FUNC);
gtk_page_setup_set_bottom_margin((GtkPageSetup *)arg0, (gdouble)arg1, (GtkUnit)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1set_1bottom_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1set_1bottom_1margin_FUNC);
}
#endif
-#ifndef NO__1gtk_1page_1setup_1set_1left_1margin
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1page_1setup_1set_1left_1margin)
+#ifndef NO_gtk_1page_1setup_1set_1left_1margin
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1page_1setup_1set_1left_1margin)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1set_1left_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1set_1left_1margin_FUNC);
gtk_page_setup_set_left_margin((GtkPageSetup *)arg0, (gdouble)arg1, (GtkUnit)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1set_1left_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1set_1left_1margin_FUNC);
}
#endif
-#ifndef NO__1gtk_1page_1setup_1set_1orientation
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1page_1setup_1set_1orientation)
+#ifndef NO_gtk_1page_1setup_1set_1orientation
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1page_1setup_1set_1orientation)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1set_1orientation_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1set_1orientation_FUNC);
gtk_page_setup_set_orientation((GtkPageSetup *)arg0, (GtkPageOrientation)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1set_1orientation_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1set_1orientation_FUNC);
}
#endif
-#ifndef NO__1gtk_1page_1setup_1set_1paper_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1page_1setup_1set_1paper_1size)
+#ifndef NO_gtk_1page_1setup_1set_1paper_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1page_1setup_1set_1paper_1size)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1set_1paper_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1set_1paper_1size_FUNC);
gtk_page_setup_set_paper_size((GtkPageSetup *)arg0, (GtkPaperSize *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1set_1paper_1size_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1set_1paper_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1page_1setup_1set_1right_1margin
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1page_1setup_1set_1right_1margin)
+#ifndef NO_gtk_1page_1setup_1set_1right_1margin
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1page_1setup_1set_1right_1margin)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1set_1right_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1set_1right_1margin_FUNC);
gtk_page_setup_set_right_margin((GtkPageSetup *)arg0, (gdouble)arg1, (GtkUnit)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1set_1right_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1set_1right_1margin_FUNC);
}
#endif
-#ifndef NO__1gtk_1page_1setup_1set_1top_1margin
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1page_1setup_1set_1top_1margin)
+#ifndef NO_gtk_1page_1setup_1set_1top_1margin
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1page_1setup_1set_1top_1margin)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1page_1setup_1set_1top_1margin_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1page_1setup_1set_1top_1margin_FUNC);
gtk_page_setup_set_top_margin((GtkPageSetup *)arg0, (gdouble)arg1, (GtkUnit)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1page_1setup_1set_1top_1margin_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1page_1setup_1set_1top_1margin_FUNC);
}
#endif
-#ifndef NO__1gtk_1paper_1size_1free
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1paper_1size_1free)
+#ifndef NO_gtk_1paper_1size_1free
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1paper_1size_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1free_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1free_FUNC);
gtk_paper_size_free((GtkPaperSize *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1free_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1free_FUNC);
}
#endif
-#ifndef NO__1gtk_1paper_1size_1get_1display_1name
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1paper_1size_1get_1display_1name)
+#ifndef NO_gtk_1paper_1size_1get_1display_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1paper_1size_1get_1display_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1get_1display_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1get_1display_1name_FUNC);
rc = (jlong)gtk_paper_size_get_display_name((GtkPaperSize *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1get_1display_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1get_1display_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1get_1height
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1paper_1size_1get_1height)
+#ifndef NO_gtk_1paper_1size_1get_1height
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1paper_1size_1get_1height)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1get_1height_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1get_1height_FUNC);
rc = (jdouble)gtk_paper_size_get_height((GtkPaperSize *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1get_1height_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1get_1height_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1get_1name
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1paper_1size_1get_1name)
+#ifndef NO_gtk_1paper_1size_1get_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1paper_1size_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1get_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1get_1name_FUNC);
rc = (jlong)gtk_paper_size_get_name((GtkPaperSize *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1get_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1get_1ppd_1name
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1paper_1size_1get_1ppd_1name)
+#ifndef NO_gtk_1paper_1size_1get_1ppd_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1paper_1size_1get_1ppd_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1get_1ppd_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1get_1ppd_1name_FUNC);
rc = (jlong)gtk_paper_size_get_ppd_name((GtkPaperSize *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1get_1ppd_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1get_1ppd_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1get_1width
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1paper_1size_1get_1width)
+#ifndef NO_gtk_1paper_1size_1get_1width
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1paper_1size_1get_1width)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1get_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1get_1width_FUNC);
rc = (jdouble)gtk_paper_size_get_width((GtkPaperSize *)arg0, (GtkUnit)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1get_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1get_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1is_1custom
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1paper_1size_1is_1custom)
+#ifndef NO_gtk_1paper_1size_1is_1custom
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1paper_1size_1is_1custom)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1is_1custom_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1is_1custom_FUNC);
rc = (jboolean)gtk_paper_size_is_custom((GtkPaperSize *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1is_1custom_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1is_1custom_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1paper_1size_1new)
+#ifndef NO_gtk_1paper_1size_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1paper_1size_1new)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_paper_size_new((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1new_1custom
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1paper_1size_1new_1custom)
+#ifndef NO_gtk_1paper_1size_1new_1custom
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1paper_1size_1new_1custom)
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jdouble arg2, jdouble arg3, jint arg4)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1new_1custom_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1new_1custom_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_paper_size_new_custom((const gchar *)lparg0, (const gchar *)lparg1, (gdouble)arg2, (gdouble)arg3, (GtkUnit)arg4);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1new_1custom_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1new_1custom_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1paper_1size_1new_1from_1ppd
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1paper_1size_1new_1from_1ppd)
+#ifndef NO_gtk_1paper_1size_1new_1from_1ppd
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1paper_1size_1new_1from_1ppd)
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jdouble arg2, jdouble arg3)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1paper_1size_1new_1from_1ppd_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1paper_1size_1new_1from_1ppd_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_paper_size_new_from_ppd((const gchar *)lparg0, (const gchar *)lparg1, (gdouble)arg2, (gdouble)arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1paper_1size_1new_1from_1ppd_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1paper_1size_1new_1from_1ppd_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1plug_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1plug_1new)
+#ifndef NO_gtk_1plug_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1plug_1new)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1plug_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1plug_1new_FUNC);
rc = (jlong)gtk_plug_new(arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1plug_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1plug_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1job_1get_1surface
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1job_1get_1surface)
+#ifndef NO_gtk_1popover_1popdown
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1popover_1popdown)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1popover_1popdown_FUNC);
+ gtk_popover_popdown((GtkPopover *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1popover_1popdown_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1popover_1popup
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1popover_1popup)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1popover_1popup_FUNC);
+ gtk_popover_popup((GtkPopover *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1popover_1popup_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1popover_1set_1pointing_1to
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1popover_1set_1pointing_1to)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ GdkRectangle _arg1, *lparg1=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1popover_1set_1pointing_1to_FUNC);
+ if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
+ gtk_popover_set_pointing_to((GtkPopover *)arg0, (const GdkRectangle *)lparg1);
+fail:
+ if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1popover_1set_1pointing_1to_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1popover_1set_1position
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1popover_1set_1position)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1popover_1set_1position_FUNC);
+ gtk_popover_set_position((GtkPopover *)arg0, (GtkPositionType)arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1popover_1set_1position_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1print_1job_1get_1surface
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1job_1get_1surface)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1job_1get_1surface_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1job_1get_1surface_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_print_job_get_surface((GtkPrintJob *)arg0, (GError **)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1job_1get_1surface_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1job_1get_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1job_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1job_1new)
+#ifndef NO_gtk_1print_1job_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1job_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jlong arg2, jlong arg3)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1job_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1job_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_print_job_new((const gchar *)lparg0, (GtkPrinter *)arg1, (GtkPrintSettings *)arg2, (GtkPageSetup *)arg3);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1job_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1job_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1job_1send
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1job_1send)
+#ifndef NO_gtk_1print_1job_1send
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1job_1send)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1job_1send_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1job_1send_FUNC);
gtk_print_job_send((GtkPrintJob *)arg0, (GtkPrintJobCompleteFunc)arg1, (gpointer)arg2, (GDestroyNotify)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1job_1send_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1job_1send_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1foreach
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1foreach)
+#ifndef NO_gtk_1print_1settings_1foreach
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1foreach)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1foreach_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1foreach_FUNC);
gtk_print_settings_foreach((GtkPrintSettings *)arg0, (GtkPrintSettingsFunc)arg1, (gpointer)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1foreach_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1foreach_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1get
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1settings_1get)
+#ifndef NO_gtk_1print_1settings_1get
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1settings_1get)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1get_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_print_settings_get((GtkPrintSettings *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1get_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1get_1collate
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1print_1settings_1get_1collate)
+#ifndef NO_gtk_1print_1settings_1get_1collate
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1print_1settings_1get_1collate)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1collate_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1get_1collate_FUNC);
rc = (jboolean)gtk_print_settings_get_collate((GtkPrintSettings *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1collate_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1get_1collate_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1get_1duplex
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1print_1settings_1get_1duplex)
+#ifndef NO_gtk_1print_1settings_1get_1duplex
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1print_1settings_1get_1duplex)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1duplex_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1get_1duplex_FUNC);
rc = (jint)gtk_print_settings_get_duplex((GtkPrintSettings *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1duplex_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1get_1duplex_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1get_1n_1copies
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1print_1settings_1get_1n_1copies)
+#ifndef NO_gtk_1print_1settings_1get_1n_1copies
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1print_1settings_1get_1n_1copies)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1n_1copies_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1get_1n_1copies_FUNC);
rc = (jint)gtk_print_settings_get_n_copies((GtkPrintSettings *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1n_1copies_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1get_1n_1copies_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1get_1page_1ranges
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1settings_1get_1page_1ranges)
+#ifndef NO_gtk_1print_1settings_1get_1page_1ranges
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1settings_1get_1page_1ranges)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1page_1ranges_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1get_1page_1ranges_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_print_settings_get_page_ranges((GtkPrintSettings *)arg0, (gint *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1page_1ranges_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1get_1page_1ranges_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1get_1print_1pages
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1print_1settings_1get_1print_1pages)
+#ifndef NO_gtk_1print_1settings_1get_1print_1pages
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1print_1settings_1get_1print_1pages)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1print_1pages_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1get_1print_1pages_FUNC);
rc = (jint)gtk_print_settings_get_print_pages((GtkPrintSettings *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1print_1pages_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1get_1print_1pages_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1get_1resolution
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1print_1settings_1get_1resolution)
+#ifndef NO_gtk_1print_1settings_1get_1resolution
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1print_1settings_1get_1resolution)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1resolution_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1get_1resolution_FUNC);
rc = (jint)gtk_print_settings_get_resolution((GtkPrintSettings *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1resolution_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1get_1resolution_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1settings_1new)
+#ifndef NO_gtk_1print_1settings_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1settings_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1new_FUNC);
rc = (jlong)gtk_print_settings_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set)
+#ifndef NO_gtk_1print_1settings_1set
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_print_settings_set((GtkPrintSettings *)arg0, (const gchar *)lparg1, (const gchar *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set_1collate
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set_1collate)
+#ifndef NO_gtk_1print_1settings_1set_1collate
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set_1collate)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1collate_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_1collate_FUNC);
gtk_print_settings_set_collate((GtkPrintSettings *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1collate_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_1collate_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set_1duplex
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set_1duplex)
+#ifndef NO_gtk_1print_1settings_1set_1duplex
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set_1duplex)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1duplex_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_1duplex_FUNC);
gtk_print_settings_set_duplex((GtkPrintSettings *)arg0, (GtkPrintDuplex)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1duplex_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_1duplex_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set_1n_1copies
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set_1n_1copies)
+#ifndef NO_gtk_1print_1settings_1set_1n_1copies
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set_1n_1copies)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1n_1copies_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_1n_1copies_FUNC);
gtk_print_settings_set_n_copies((GtkPrintSettings *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1n_1copies_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_1n_1copies_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set_1orientation
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set_1orientation)
+#ifndef NO_gtk_1print_1settings_1set_1orientation
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set_1orientation)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1orientation_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_1orientation_FUNC);
gtk_print_settings_set_orientation((GtkPrintSettings *)arg0, (GtkPageOrientation)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1orientation_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_1orientation_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set_1page_1ranges
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set_1page_1ranges)
+#ifndef NO_gtk_1print_1settings_1set_1page_1ranges
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set_1page_1ranges)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jint arg2)
{
jint *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1page_1ranges_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_1page_1ranges_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_print_settings_set_page_ranges((GtkPrintSettings *)arg0, (GtkPageRange *)lparg1, (gint)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1page_1ranges_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_1page_1ranges_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set_1print_1pages
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set_1print_1pages)
+#ifndef NO_gtk_1print_1settings_1set_1print_1pages
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set_1print_1pages)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1print_1pages_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_1print_1pages_FUNC);
gtk_print_settings_set_print_pages((GtkPrintSettings *)arg0, (GtkPrintPages)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1print_1pages_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_1print_1pages_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1settings_1set_1printer
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1settings_1set_1printer)
+#ifndef NO_gtk_1print_1settings_1set_1printer
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1settings_1set_1printer)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1set_1printer_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1settings_1set_1printer_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_print_settings_set_printer((GtkPrintSettings *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1set_1printer_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1settings_1set_1printer_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1get_1current_1page
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1get_1current_1page)
+#ifndef NO_gtk_1print_1unix_1dialog_1get_1current_1page
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1get_1current_1page)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1get_1current_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1get_1current_1page_FUNC);
rc = (jint)gtk_print_unix_dialog_get_current_page((GtkPrintUnixDialog *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1get_1current_1page_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1get_1current_1page_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1get_1page_1setup
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1get_1page_1setup)
+#ifndef NO_gtk_1print_1unix_1dialog_1get_1page_1setup
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1get_1page_1setup)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1get_1page_1setup_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1get_1page_1setup_FUNC);
rc = (jlong)gtk_print_unix_dialog_get_page_setup((GtkPrintUnixDialog *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1get_1page_1setup_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1get_1page_1setup_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1get_1selected_1printer
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1get_1selected_1printer)
+#ifndef NO_gtk_1print_1unix_1dialog_1get_1selected_1printer
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1get_1selected_1printer)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1get_1selected_1printer_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1get_1selected_1printer_FUNC);
rc = (jlong)gtk_print_unix_dialog_get_selected_printer((GtkPrintUnixDialog *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1get_1selected_1printer_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1get_1selected_1printer_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1get_1settings
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1get_1settings)
+#ifndef NO_gtk_1print_1unix_1dialog_1get_1settings
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1get_1settings)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1get_1settings_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1get_1settings_FUNC);
rc = (jlong)gtk_print_unix_dialog_get_settings((GtkPrintUnixDialog *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1get_1settings_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1get_1settings_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1new)
+#ifndef NO_gtk_1print_1unix_1dialog_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_print_unix_dialog_new((const gchar *)lparg0, (GtkWindow *)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1set_1current_1page
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1set_1current_1page)
+#ifndef NO_gtk_1print_1unix_1dialog_1set_1current_1page
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1set_1current_1page)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1set_1current_1page_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1set_1current_1page_FUNC);
gtk_print_unix_dialog_set_current_page((GtkPrintUnixDialog *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1set_1current_1page_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1set_1current_1page_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup)
+#ifndef NO_gtk_1print_1unix_1dialog_1set_1embed_1page_1setup
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1set_1embed_1page_1setup)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC);
gtk_print_unix_dialog_set_embed_page_setup((GtkPrintUnixDialog *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1print_1unix_1dialog_1set_1has_1selection
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1set_1has_1selection)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1set_1has_1selection_FUNC);
+ gtk_print_unix_dialog_set_has_selection((GtkPrintUnixDialog *)arg0, arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1set_1has_1selection_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1set_1manual_1capabilities
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1set_1manual_1capabilities)
+#ifndef NO_gtk_1print_1unix_1dialog_1set_1manual_1capabilities
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1set_1manual_1capabilities)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1set_1manual_1capabilities_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1set_1manual_1capabilities_FUNC);
gtk_print_unix_dialog_set_manual_capabilities((GtkPrintUnixDialog *)arg0, (GtkPrintCapabilities)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1set_1manual_1capabilities_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1set_1manual_1capabilities_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1set_1page_1setup
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1set_1page_1setup)
+#ifndef NO_gtk_1print_1unix_1dialog_1set_1page_1setup
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1set_1page_1setup)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1set_1page_1setup_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1set_1page_1setup_FUNC);
gtk_print_unix_dialog_set_page_setup((GtkPrintUnixDialog *)arg0, (GtkPageSetup *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1set_1page_1setup_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1set_1page_1setup_FUNC);
}
#endif
-#ifndef NO__1gtk_1print_1unix_1dialog_1set_1settings
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1print_1unix_1dialog_1set_1settings)
+#ifndef NO_gtk_1print_1unix_1dialog_1set_1settings
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1set_1settings)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1print_1unix_1dialog_1set_1settings_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1set_1settings_FUNC);
gtk_print_unix_dialog_set_settings((GtkPrintUnixDialog *)arg0, (GtkPrintSettings *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1print_1unix_1dialog_1set_1settings_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1set_1settings_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1print_1unix_1dialog_1set_1support_1selection
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1print_1unix_1dialog_1set_1support_1selection)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1print_1unix_1dialog_1set_1support_1selection_FUNC);
+ gtk_print_unix_dialog_set_support_selection((GtkPrintUnixDialog *)arg0, arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1print_1unix_1dialog_1set_1support_1selection_FUNC);
}
#endif
-#ifndef NO__1gtk_1printer_1get_1backend
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1printer_1get_1backend)
+#ifndef NO_gtk_1printer_1get_1backend
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1printer_1get_1backend)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1printer_1get_1backend_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1printer_1get_1backend_FUNC);
rc = (jlong)gtk_printer_get_backend((GtkPrinter *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1printer_1get_1backend_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1printer_1get_1backend_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1printer_1get_1name
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1printer_1get_1name)
+#ifndef NO_gtk_1printer_1get_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1printer_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1printer_1get_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1printer_1get_1name_FUNC);
rc = (jlong)gtk_printer_get_name((GtkPrinter *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1printer_1get_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1printer_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1printer_1is_1default
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1printer_1is_1default)
+#ifndef NO_gtk_1printer_1is_1default
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1printer_1is_1default)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1printer_1is_1default_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1printer_1is_1default_FUNC);
rc = (jboolean)gtk_printer_is_default((GtkPrinter *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1printer_1is_1default_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1printer_1is_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1printer_1option_1widget_1get_1type
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1printer_1option_1widget_1get_1type)
+#ifndef NO_gtk_1printer_1option_1widget_1get_1type
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1printer_1option_1widget_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1printer_1option_1widget_1get_1type_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1printer_1option_1widget_1get_1type_FUNC);
/*
rc = (jlong)gtk_printer_option_widget_get_type();
*/
@@ -8484,1194 +6809,588 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1printer_1option_1widget_1get_1type)
rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1printer_1option_1widget_1get_1type_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1printer_1option_1widget_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1progress_1bar_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1progress_1bar_1new)
+#ifndef NO_gtk_1progress_1bar_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1progress_1bar_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1progress_1bar_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1progress_1bar_1new_FUNC);
rc = (jlong)gtk_progress_bar_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1progress_1bar_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1progress_1bar_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1progress_1bar_1pulse
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1progress_1bar_1pulse)
+#ifndef NO_gtk_1progress_1bar_1pulse
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1progress_1bar_1pulse)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1progress_1bar_1pulse_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1progress_1bar_1pulse_FUNC);
gtk_progress_bar_pulse((GtkProgressBar *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1progress_1bar_1pulse_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1progress_1bar_1pulse_FUNC);
}
#endif
-#ifndef NO__1gtk_1progress_1bar_1set_1fraction
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1progress_1bar_1set_1fraction)
+#ifndef NO_gtk_1progress_1bar_1set_1fraction
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1progress_1bar_1set_1fraction)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1progress_1bar_1set_1fraction_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1progress_1bar_1set_1fraction_FUNC);
gtk_progress_bar_set_fraction((GtkProgressBar *)arg0, (gdouble)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1progress_1bar_1set_1fraction_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1progress_1bar_1set_1fraction_FUNC);
}
#endif
-#ifndef NO__1gtk_1progress_1bar_1set_1inverted
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1progress_1bar_1set_1inverted)
+#ifndef NO_gtk_1progress_1bar_1set_1inverted
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1progress_1bar_1set_1inverted)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1progress_1bar_1set_1inverted_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1progress_1bar_1set_1inverted_FUNC);
gtk_progress_bar_set_inverted((GtkProgressBar *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1progress_1bar_1set_1inverted_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1radio_1button_1get_1group
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1radio_1button_1get_1group)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1radio_1button_1get_1group_FUNC);
- rc = (jlong)gtk_radio_button_get_group((GtkRadioButton *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1radio_1button_1get_1group_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1progress_1bar_1set_1inverted_FUNC);
}
#endif
-#ifndef NO__1gtk_1radio_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1radio_1button_1new)
+#ifndef NO_gtk_1range_1get_1adjustment
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1range_1get_1adjustment)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1radio_1button_1new_FUNC);
- rc = (jlong)gtk_radio_button_new((GSList *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1radio_1button_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1radio_1menu_1item_1get_1group
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1radio_1menu_1item_1get_1group)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1radio_1menu_1item_1get_1group_FUNC);
- rc = (jlong)gtk_radio_menu_item_get_group((GtkRadioMenuItem *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1radio_1menu_1item_1get_1group_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1radio_1menu_1item_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1radio_1menu_1item_1new)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1radio_1menu_1item_1new_FUNC);
- rc = (jlong)gtk_radio_menu_item_new((GSList *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1radio_1menu_1item_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1range_1get_1adjustment
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1range_1get_1adjustment)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1range_1get_1adjustment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1range_1get_1adjustment_FUNC);
rc = (jlong)gtk_range_get_adjustment((GtkRange *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1range_1get_1adjustment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1range_1get_1adjustment_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1range_1get_1slider_1range
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1range_1get_1slider_1range)
+#ifndef NO_gtk_1range_1get_1slider_1range
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1range_1get_1slider_1range)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1range_1get_1slider_1range_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1range_1get_1slider_1range_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_range_get_slider_range((GtkRange *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1range_1get_1slider_1range_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1range_1get_1slider_1range_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1range_1get_1value
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1range_1get_1value)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jdouble rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1range_1get_1value_FUNC);
+ rc = (jdouble)gtk_range_get_value((GtkRange *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1range_1get_1value_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gtk_1range_1set_1increments
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1range_1set_1increments)
+#ifndef NO_gtk_1range_1set_1increments
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1range_1set_1increments)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1range_1set_1increments_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1range_1set_1increments_FUNC);
gtk_range_set_increments((GtkRange *)arg0, arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1range_1set_1increments_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1range_1set_1increments_FUNC);
}
#endif
-#ifndef NO__1gtk_1range_1set_1inverted
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1range_1set_1inverted)
+#ifndef NO_gtk_1range_1set_1inverted
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1range_1set_1inverted)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1range_1set_1inverted_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1range_1set_1inverted_FUNC);
gtk_range_set_inverted((GtkRange *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1range_1set_1inverted_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1range_1set_1inverted_FUNC);
}
#endif
-#ifndef NO__1gtk_1range_1set_1range
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1range_1set_1range)
+#ifndef NO_gtk_1range_1set_1range
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1range_1set_1range)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1range_1set_1range_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1range_1set_1range_FUNC);
gtk_range_set_range((GtkRange *)arg0, arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1range_1set_1range_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1range_1set_1range_FUNC);
}
#endif
-#ifndef NO__1gtk_1range_1set_1value
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1range_1set_1value)
+#ifndef NO_gtk_1range_1set_1value
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1range_1set_1value)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1range_1set_1value_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1range_1set_1value_FUNC);
gtk_range_set_value((GtkRange *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1range_1set_1value_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1range_1set_1value_FUNC);
}
#endif
-#ifndef NO__1gtk_1render_1background
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1render_1background)
+#ifndef NO_gtk_1render_1background
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1render_1background)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1render_1background_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1render_1background_FUNC);
gtk_render_background((GtkStyleContext *)arg0, (cairo_t *)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1render_1background_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1render_1background_FUNC);
}
#endif
-#ifndef NO__1gtk_1render_1focus
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1render_1focus)
+#ifndef NO_gtk_1render_1focus
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1render_1focus)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1render_1focus_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1render_1focus_FUNC);
gtk_render_focus((GtkStyleContext *)arg0, (cairo_t *)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1render_1focus_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1render_1focus_FUNC);
}
#endif
-#ifndef NO__1gtk_1render_1frame
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1render_1frame)
+#ifndef NO_gtk_1render_1frame
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1render_1frame)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1render_1frame_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1render_1frame_FUNC);
gtk_render_frame((GtkStyleContext *)arg0, (cairo_t *)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1render_1frame_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1render_1frame_FUNC);
}
#endif
-#ifndef NO__1gtk_1render_1handle
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1render_1handle)
+#ifndef NO_gtk_1render_1handle
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1render_1handle)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1render_1handle_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1render_1handle_FUNC);
gtk_render_handle((GtkStyleContext *)arg0, (cairo_t *)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1render_1handle_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1rgb_1to_1hsv
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1rgb_1to_1hsv)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jdoubleArray arg5)
-{
- jdouble *lparg3=NULL;
- jdouble *lparg4=NULL;
- jdouble *lparg5=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1rgb_1to_1hsv_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL)) == NULL) goto fail;
- gtk_rgb_to_hsv((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble *)lparg3, (gdouble *)lparg4, (gdouble *)lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1rgb_1to_1hsv_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1render_1handle_FUNC);
}
#endif
-#ifndef NO__1gtk_1scale_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scale_1new)
+#ifndef NO_gtk_1scale_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1scale_1new)
(JNIEnv *env, jclass that, jint arg0, jlong arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scale_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scale_1new_FUNC);
rc = (jlong)gtk_scale_new((GtkOrientation)arg0, (GtkAdjustment *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scale_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scale_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scale_1set_1digits
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1scale_1set_1digits)
+#ifndef NO_gtk_1scale_1set_1digits
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scale_1set_1digits)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1scale_1set_1digits_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scale_1set_1digits_FUNC);
gtk_scale_set_digits((GtkScale *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scale_1set_1digits_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scale_1set_1digits_FUNC);
}
#endif
-#ifndef NO__1gtk_1scale_1set_1draw_1value
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1scale_1set_1draw_1value)
+#ifndef NO_gtk_1scale_1set_1draw_1value
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scale_1set_1draw_1value)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1scale_1set_1draw_1value_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scale_1set_1draw_1value_FUNC);
gtk_scale_set_draw_value((GtkScale *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scale_1set_1draw_1value_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scale_1set_1draw_1value_FUNC);
}
#endif
-#ifndef NO__1gtk_1scrollable_1get_1vadjustment
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scrollable_1get_1vadjustment)
+#ifndef NO_gtk_1scrollable_1get_1vadjustment
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1scrollable_1get_1vadjustment)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrollable_1get_1vadjustment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrollable_1get_1vadjustment_FUNC);
rc = (jlong)gtk_scrollable_get_vadjustment((GtkScrollable *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrollable_1get_1vadjustment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrollable_1get_1vadjustment_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scrollbar_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scrollbar_1new)
+#ifndef NO_gtk_1scrollbar_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1scrollbar_1new)
(JNIEnv *env, jclass that, jint arg0, jlong arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrollbar_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrollbar_1new_FUNC);
rc = (jlong)gtk_scrollbar_new((GtkOrientation)arg0, (GtkAdjustment *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrollbar_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrollbar_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1get_1hadjustment
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1hadjustment)
+#ifndef NO_gtk_1scrolled_1window_1get_1hadjustment
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1scrolled_1window_1get_1hadjustment)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1hadjustment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1hadjustment_FUNC);
rc = (jlong)gtk_scrolled_window_get_hadjustment((GtkScrolledWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1hadjustment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1hadjustment_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1get_1hscrollbar
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1hscrollbar)
+#ifndef NO_gtk_1scrolled_1window_1get_1hscrollbar
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1scrolled_1window_1get_1hscrollbar)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1hscrollbar_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1hscrollbar_FUNC);
rc = (jlong)gtk_scrolled_window_get_hscrollbar((GtkScrolledWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1hscrollbar_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1hscrollbar_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1get_1overlay_1scrolling
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1overlay_1scrolling)
+#ifndef NO_gtk_1scrolled_1window_1get_1overlay_1scrolling
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1scrolled_1window_1get_1overlay_1scrolling)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1overlay_1scrolling_FUNC);
-/*
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1overlay_1scrolling_FUNC);
rc = (jboolean)gtk_scrolled_window_get_overlay_scrolling((GtkScrolledWindow *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_scrolled_window_get_overlay_scrolling)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GtkScrolledWindow *))fp)((GtkScrolledWindow *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1overlay_1scrolling_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1overlay_1scrolling_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1get_1policy
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1policy)
+#ifndef NO_gtk_1scrolled_1window_1get_1policy
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scrolled_1window_1get_1policy)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1policy_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1policy_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_scrolled_window_get_policy((GtkScrolledWindow *)arg0, (GtkPolicyType *)lparg1, (GtkPolicyType *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1policy_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1scrolled_1window_1get_1shadow_1type
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1shadow_1type)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1shadow_1type_FUNC);
- rc = (jint)gtk_scrolled_window_get_shadow_type((GtkScrolledWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1shadow_1type_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1policy_FUNC);
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1get_1vadjustment
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1vadjustment)
+#ifndef NO_gtk_1scrolled_1window_1get_1vadjustment
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1scrolled_1window_1get_1vadjustment)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1vadjustment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1vadjustment_FUNC);
rc = (jlong)gtk_scrolled_window_get_vadjustment((GtkScrolledWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1vadjustment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1vadjustment_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1get_1vscrollbar
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1vscrollbar)
+#ifndef NO_gtk_1scrolled_1window_1get_1vscrollbar
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1scrolled_1window_1get_1vscrollbar)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1vscrollbar_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1get_1vscrollbar_FUNC);
rc = (jlong)gtk_scrolled_window_get_vscrollbar((GtkScrolledWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1vscrollbar_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1get_1vscrollbar_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1new)
+#ifndef NO_gtk_1scrolled_1window_1set_1hadjustment
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scrolled_1window_1set_1hadjustment)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1new_FUNC);
- rc = (jlong)gtk_scrolled_window_new((GtkAdjustment *)arg0, (GtkAdjustment *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1new_FUNC);
- return rc;
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1set_1hadjustment_FUNC);
+ gtk_scrolled_window_set_hadjustment((GtkScrolledWindow *)arg0, (GtkAdjustment *)arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1set_1hadjustment_FUNC);
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1set_1policy
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1set_1policy)
+#ifndef NO_gtk_1scrolled_1window_1set_1policy
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scrolled_1window_1set_1policy)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1set_1policy_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1set_1policy_FUNC);
gtk_scrolled_window_set_policy((GtkScrolledWindow *)arg0, (GtkPolicyType)arg1, (GtkPolicyType)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1set_1policy_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1set_1policy_FUNC);
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1set_1shadow_1type
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1set_1shadow_1type)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_gtk_1scrolled_1window_1set_1vadjustment
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1scrolled_1window_1set_1vadjustment)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1set_1shadow_1type_FUNC);
- gtk_scrolled_window_set_shadow_type((GtkScrolledWindow *)arg0, (GtkShadowType)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1set_1shadow_1type_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1scrolled_1window_1set_1vadjustment_FUNC);
+ gtk_scrolled_window_set_vadjustment((GtkScrolledWindow *)arg0, (GtkAdjustment *)arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1scrolled_1window_1set_1vadjustment_FUNC);
}
#endif
-#ifndef NO__1gtk_1search_1entry_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1search_1entry_1new)
+#ifndef NO_gtk_1search_1entry_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1search_1entry_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1search_1entry_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1search_1entry_1new_FUNC);
rc = (jlong)gtk_search_entry_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1search_1entry_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1selection_1data_1free
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1selection_1data_1free)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1free_FUNC);
- gtk_selection_data_free((GtkSelectionData *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1free_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1selection_1data_1get_1data
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1selection_1data_1get_1data)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1data_FUNC);
- rc = (jlong)gtk_selection_data_get_data((GtkSelectionData *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1data_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1selection_1data_1get_1data_1type
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1selection_1data_1get_1data_1type)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1data_1type_FUNC);
- rc = (jlong)gtk_selection_data_get_data_type((GtkSelectionData *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1data_1type_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1selection_1data_1get_1format
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1selection_1data_1get_1format)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1format_FUNC);
- rc = (jint)gtk_selection_data_get_format((GtkSelectionData *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1format_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1selection_1data_1get_1length
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1selection_1data_1get_1length)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1length_FUNC);
- rc = (jint)gtk_selection_data_get_length((GtkSelectionData *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1length_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1selection_1data_1get_1target
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1selection_1data_1get_1target)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1target_FUNC);
- rc = (jlong)gtk_selection_data_get_target((GtkSelectionData *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1target_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1selection_1data_1set
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1selection_1data_1set)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jint arg4)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1set_FUNC);
- gtk_selection_data_set((GtkSelectionData *)arg0, (GdkAtom)arg1, (gint)arg2, (const guchar *)arg3, (gint)arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1set_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1separator_1menu_1item_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1separator_1menu_1item_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1separator_1menu_1item_1new_FUNC);
- rc = (jlong)gtk_separator_menu_item_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1separator_1menu_1item_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1search_1entry_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1separator_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1separator_1new)
+#ifndef NO_gtk_1separator_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1separator_1new)
(JNIEnv *env, jclass that, jint arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1separator_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1separator_1new_FUNC);
rc = (jlong)gtk_separator_new((GtkOrientation)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1separator_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1separator_1tool_1item_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1separator_1tool_1item_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1separator_1tool_1item_1new_FUNC);
- rc = (jlong)gtk_separator_tool_item_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1separator_1tool_1item_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1separator_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1separator_1tool_1item_1set_1draw
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1separator_1tool_1item_1set_1draw)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1separator_1tool_1item_1set_1draw_FUNC);
- gtk_separator_tool_item_set_draw((GtkSeparatorToolItem *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1separator_1tool_1item_1set_1draw_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1settings_1get_1default
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1settings_1get_1default)
+#ifndef NO_gtk_1settings_1get_1default
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1settings_1get_1default)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1settings_1get_1default_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1settings_1get_1default_FUNC);
rc = (jlong)gtk_settings_get_default();
- GTK_NATIVE_EXIT(env, that, _1gtk_1settings_1get_1default_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1settings_1get_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1snapshot_1append_1cairo
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1snapshot_1append_1cairo)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1snapshot_1append_1cairo_FUNC);
- rc = (jlong)gtk_snapshot_append_cairo((GtkSnapshot *)arg0, (const graphene_rect_t *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1snapshot_1append_1cairo_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1socket_1get_1id
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1socket_1get_1id)
+#ifndef NO_gtk_1socket_1get_1id
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1socket_1get_1id)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1socket_1get_1id_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1socket_1get_1id_FUNC);
rc = (jlong)gtk_socket_get_id((GtkSocket *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1socket_1get_1id_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1socket_1get_1id_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1socket_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1socket_1new)
+#ifndef NO_gtk_1socket_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1socket_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1socket_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1socket_1new_FUNC);
rc = (jlong)gtk_socket_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1socket_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1socket_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1spin_1button_1configure
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1configure)
+#ifndef NO_gtk_1spin_1button_1configure
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1spin_1button_1configure)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jint arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1configure_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1configure_FUNC);
gtk_spin_button_configure((GtkSpinButton*)arg0, (GtkAdjustment *)arg1, arg2, arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1configure_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1configure_FUNC);
}
#endif
-#ifndef NO__1gtk_1spin_1button_1get_1adjustment
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1spin_1button_1get_1adjustment)
+#ifndef NO_gtk_1spin_1button_1get_1adjustment
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1spin_1button_1get_1adjustment)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1get_1adjustment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1get_1adjustment_FUNC);
rc = (jlong)gtk_spin_button_get_adjustment((GtkSpinButton*)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1get_1adjustment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1get_1adjustment_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1spin_1button_1get_1digits
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1spin_1button_1get_1digits)
+#ifndef NO_gtk_1spin_1button_1get_1digits
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1spin_1button_1get_1digits)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1get_1digits_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1get_1digits_FUNC);
rc = (jint)gtk_spin_button_get_digits((GtkSpinButton*)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1get_1digits_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1get_1digits_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1spin_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1spin_1button_1new)
+#ifndef NO_gtk_1spin_1button_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1spin_1button_1new)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jint arg2)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1new_FUNC);
rc = (jlong)gtk_spin_button_new((GtkAdjustment *)arg0, arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1spin_1button_1set_1digits
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1set_1digits)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1set_1digits_FUNC);
- gtk_spin_button_set_digits((GtkSpinButton*)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1set_1digits_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1spin_1button_1set_1increments
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1set_1increments)
+#ifndef NO_gtk_1spin_1button_1set_1increments
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1spin_1button_1set_1increments)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1set_1increments_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1set_1increments_FUNC);
gtk_spin_button_set_increments((GtkSpinButton*)arg0, arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1set_1increments_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1set_1increments_FUNC);
}
#endif
-#ifndef NO__1gtk_1spin_1button_1set_1numeric
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1set_1numeric)
+#ifndef NO_gtk_1spin_1button_1set_1numeric
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1spin_1button_1set_1numeric)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1set_1numeric_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1set_1numeric_FUNC);
gtk_spin_button_set_numeric((GtkSpinButton*)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1set_1numeric_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1set_1numeric_FUNC);
}
#endif
-#ifndef NO__1gtk_1spin_1button_1set_1range
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1set_1range)
+#ifndef NO_gtk_1spin_1button_1set_1range
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1spin_1button_1set_1range)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1, jdouble arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1set_1range_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1set_1range_FUNC);
gtk_spin_button_set_range((GtkSpinButton*)arg0, arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1set_1range_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1set_1range_FUNC);
}
#endif
-#ifndef NO__1gtk_1spin_1button_1set_1value
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1set_1value)
+#ifndef NO_gtk_1spin_1button_1set_1value
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1spin_1button_1set_1value)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1set_1value_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1set_1value_FUNC);
gtk_spin_button_set_value((GtkSpinButton*)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1set_1value_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1set_1value_FUNC);
}
#endif
-#ifndef NO__1gtk_1spin_1button_1set_1wrap
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1set_1wrap)
+#ifndef NO_gtk_1spin_1button_1set_1wrap
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1spin_1button_1set_1wrap)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1set_1wrap_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1set_1wrap_FUNC);
gtk_spin_button_set_wrap((GtkSpinButton*)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1set_1wrap_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1set_1wrap_FUNC);
}
#endif
-#ifndef NO__1gtk_1spin_1button_1update
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1spin_1button_1update)
+#ifndef NO_gtk_1spin_1button_1update
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1spin_1button_1update)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1update_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1spin_1button_1update_FUNC);
gtk_spin_button_update((GtkSpinButton*)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1update_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1status_1icon_1get_1geometry
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1status_1icon_1get_1geometry)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jlong arg3)
-{
- GdkRectangle _arg2, *lparg2=NULL;
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1get_1geometry_FUNC);
- if (arg2) if ((lparg2 = getGdkRectangleFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jboolean)gtk_status_icon_get_geometry((GtkStatusIcon*)arg0, (GdkScreen**)arg1, (GdkRectangle*)lparg2, (GtkOrientation*)arg3);
-fail:
- if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1get_1geometry_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1status_1icon_1get_1visible
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1status_1icon_1get_1visible)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1get_1visible_FUNC);
- rc = (jboolean)gtk_status_icon_get_visible((GtkStatusIcon*)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1get_1visible_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1status_1icon_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1status_1icon_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1new_FUNC);
- rc = (jlong)gtk_status_icon_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1new_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1spin_1button_1update_FUNC);
}
#endif
-#ifndef NO__1gtk_1status_1icon_1position_1menu_1func
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1status_1icon_1position_1menu_1func)
+#ifndef NO_gtk_1status_1icon_1position_1menu_1func
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1status_1icon_1position_1menu_1func)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1position_1menu_1func_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1status_1icon_1position_1menu_1func_FUNC);
rc = (jlong)gtk_status_icon_position_menu_func();
- GTK_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1position_1menu_1func_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1status_1icon_1position_1menu_1func_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1status_1icon_1set_1from_1pixbuf
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1status_1icon_1set_1from_1pixbuf)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
- gtk_status_icon_set_from_pixbuf((GtkStatusIcon*)arg0, (GdkPixbuf*)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1status_1icon_1set_1tooltip_1text
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1status_1icon_1set_1tooltip_1text)
+#ifndef NO_gtk_1style_1context_1add_1class
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1add_1class)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1tooltip_1text_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_status_icon_set_tooltip_text((GtkStatusIcon *)arg0, (const gchar *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1tooltip_1text_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1status_1icon_1set_1visible
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1status_1icon_1set_1visible)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1visible_FUNC);
- gtk_status_icon_set_visible((GtkStatusIcon*)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1visible_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1add_1class
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1add_1class)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1class_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1class_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_style_context_add_class((GtkStyleContext *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1class_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1class_FUNC);
}
#endif
-#ifndef NO__1gtk_1style_1context_1add_1provider
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1add_1provider)
+#ifndef NO_gtk_1style_1context_1add_1provider
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1add_1provider)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1provider_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1provider_FUNC);
gtk_style_context_add_provider((GtkStyleContext *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1provider_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1add_1provider_1for_1display
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1add_1provider_1for_1display)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1provider_1for_1display_FUNC);
-/*
- gtk_style_context_add_provider_for_display((GdkDisplay *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_add_provider_for_display)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GdkDisplay *, GtkStyleProvider *, guint))fp)((GdkDisplay *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1provider_1for_1display_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1add_1provider_1for_1screen
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1add_1provider_1for_1screen)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
- gtk_style_context_add_provider_for_screen((GdkScreen *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get__JI_3B_3JJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get__JI_3B_3JJ)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jbyteArray arg2, jlongArray arg3, jlong arg4)
-{
- jbyte *lparg2=NULL;
- jlong *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get__JI_3B_3JJ_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
-/*
- gtk_style_context_get(arg0, arg1, (const gchar *)lparg2, lparg3, (const gchar *)NULL);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jint, const gchar *, jlong *, const gchar *))fp)(arg0, arg1, (const gchar *)lparg2, lparg3, (const gchar *)NULL);
- }
- }
-fail:
- if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, JNI_ABORT);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get__JI_3B_3JJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get__J_3B_3JJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get__J_3B_3JJ)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlongArray arg2, jlong arg3)
-{
- jbyte *lparg1=NULL;
- jlong *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get__J_3B_3JJ_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
-/*
- gtk_style_context_get(arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, const gchar *, jlong *, const gchar *))fp)(arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
- }
- }
-fail:
- if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get__J_3B_3JJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1background_1color
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1background_1color)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
-{
- GdkRGBA _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1background_1color_FUNC);
- if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
-/*
- gtk_style_context_get_background_color(arg0, arg1, lparg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_background_color)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1background_1color_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
-{
- GtkBorder _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
- if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
-/*
- gtk_style_context_get_border((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GtkBorder *)lparg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_border)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkStyleContext *, GtkStateFlags, GtkBorder *))fp)((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GtkBorder *)lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) setGtkBorderFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1border__JLorg_eclipse_swt_internal_gtk_GtkBorder_2
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1border__JLorg_eclipse_swt_internal_gtk_GtkBorder_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GtkBorder _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1border__JLorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
- if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
-/*
- gtk_style_context_get_border((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_border)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkStyleContext *, GtkBorder *))fp)((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) setGtkBorderFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1border__JLorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1color__JILorg_eclipse_swt_internal_gtk_GdkRGBA_2
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1color__JILorg_eclipse_swt_internal_gtk_GdkRGBA_2)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
-{
- GdkRGBA _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1color__JILorg_eclipse_swt_internal_gtk_GdkRGBA_2_FUNC);
- if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
-/*
- gtk_style_context_get_color((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GdkRGBA *)lparg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_color)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkStyleContext *, GtkStateFlags, GdkRGBA *))fp)((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GdkRGBA *)lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1color__JILorg_eclipse_swt_internal_gtk_GdkRGBA_2_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1color__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1color__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GdkRGBA _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1color__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2_FUNC);
- if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
-/*
- gtk_style_context_get_color((GtkStyleContext *)arg0, (GdkRGBA *)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_color)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkStyleContext *, GdkRGBA *))fp)((GtkStyleContext *)arg0, (GdkRGBA *)lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1color__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1font
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1font)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1font_FUNC);
-/*
- rc = (jlong)gtk_style_context_get_font(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_font)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1font_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1margin
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1margin)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GtkBorder _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1margin_FUNC);
- if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
- gtk_style_context_get_margin((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
-fail:
- if (arg1 && lparg1) setGtkBorderFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1margin_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1padding__JILorg_eclipse_swt_internal_gtk_GtkBorder_2
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1padding__JILorg_eclipse_swt_internal_gtk_GtkBorder_2)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
-{
- GtkBorder _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1padding__JILorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
- if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
-/*
- gtk_style_context_get_padding((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GtkBorder *)lparg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_padding)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkStyleContext *, GtkStateFlags, GtkBorder *))fp)((GtkStyleContext *)arg0, (GtkStateFlags)arg1, (GtkBorder *)lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) setGtkBorderFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1padding__JILorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1padding__JLorg_eclipse_swt_internal_gtk_GtkBorder_2
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1padding__JLorg_eclipse_swt_internal_gtk_GtkBorder_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GtkBorder _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1padding__JLorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
- if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
-/*
- gtk_style_context_get_padding((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_get_padding)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkStyleContext *, GtkBorder *))fp)((GtkStyleContext *)arg0, (GtkBorder *)lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) setGtkBorderFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1padding__JLorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1get_1parent
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1style_1context_1get_1parent)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1parent_FUNC);
- rc = (jlong)gtk_style_context_get_parent((GtkStyleContext *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1parent_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1style_1context_1invalidate
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1invalidate)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1invalidate_FUNC);
-/*
- gtk_style_context_invalidate(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_invalidate)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1invalidate_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1provider_FUNC);
}
#endif
-#ifndef NO__1gtk_1style_1context_1remove_1class
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1remove_1class)
+#ifndef NO_gtk_1style_1context_1remove_1class
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1remove_1class)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1remove_1class_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1remove_1class_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_style_context_remove_class((GtkStyleContext *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1remove_1class_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1remove_1class_FUNC);
}
#endif
-#ifndef NO__1gtk_1style_1context_1restore
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1restore)
+#ifndef NO_gtk_1style_1context_1restore
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1restore)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1restore_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1restore_FUNC);
gtk_style_context_restore((GtkStyleContext *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1restore_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1restore_FUNC);
}
#endif
-#ifndef NO__1gtk_1style_1context_1save
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1save)
+#ifndef NO_gtk_1style_1context_1save
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1save)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1save_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1save_FUNC);
gtk_style_context_save((GtkStyleContext *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1save_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1save_FUNC);
}
#endif
-#ifndef NO__1gtk_1style_1context_1set_1state
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1style_1context_1set_1state)
+#ifndef NO_gtk_1style_1context_1set_1state
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1set_1state)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1style_1context_1set_1state_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1set_1state_FUNC);
gtk_style_context_set_state((GtkStyleContext *)arg0, (GtkStateFlags)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1style_1context_1set_1state_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1target_1list_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1target_1list_1new)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1target_1list_1new_FUNC);
- rc = (jlong)gtk_target_list_new((const GtkTargetEntry *)arg0, (guint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1target_1list_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1target_1list_1unref
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1target_1list_1unref)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1target_1list_1unref_FUNC);
- gtk_target_list_unref((GtkTargetList *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1target_1list_1unref_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1set_1state_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1copy_1clipboard
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1copy_1clipboard)
+#ifndef NO_gtk_1text_1buffer_1copy_1clipboard
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1copy_1clipboard)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1copy_1clipboard_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1copy_1clipboard_FUNC);
/*
gtk_text_buffer_copy_clipboard((GtkTextBuffer *)arg0, arg1);
*/
@@ -9681,34 +7400,34 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1copy_1clipboard)
((void (CALLING_CONVENTION*)(GtkTextBuffer *, jlong))fp)((GtkTextBuffer *)arg0, arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1copy_1clipboard_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1copy_1clipboard_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1create_1mark
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1create_1mark)
+#ifndef NO_gtk_1text_1buffer_1create_1mark
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1text_1buffer_1create_1mark)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2, jboolean arg3)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1create_1mark_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1create_1mark_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jlong)gtk_text_buffer_create_mark((GtkTextBuffer *)arg0, (const gchar *)lparg1, (GtkTextIter *)lparg2, (gboolean)arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1create_1mark_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1create_1mark_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1cut_1clipboard
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1cut_1clipboard)
+#ifndef NO_gtk_1text_1buffer_1cut_1clipboard
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1cut_1clipboard)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1cut_1clipboard_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1cut_1clipboard_FUNC);
/*
gtk_text_buffer_cut_clipboard((GtkTextBuffer *)arg0, arg1, (gboolean)arg2);
*/
@@ -9718,211 +7437,211 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1cut_1clipboard)
((void (CALLING_CONVENTION*)(GtkTextBuffer *, jlong, gboolean))fp)((GtkTextBuffer *)arg0, arg1, (gboolean)arg2);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1cut_1clipboard_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1cut_1clipboard_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1delete
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1delete)
+#ifndef NO_gtk_1text_1buffer_1delete
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1delete)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1delete_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1delete_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_text_buffer_delete((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (GtkTextIter *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1delete_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1delete_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1bounds
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1bounds)
+#ifndef NO_gtk_1text_1buffer_1get_1bounds
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1bounds)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1bounds_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1bounds_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_text_buffer_get_bounds((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (GtkTextIter *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1bounds_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1bounds_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1end_1iter
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1end_1iter)
+#ifndef NO_gtk_1text_1buffer_1get_1end_1iter
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1end_1iter)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1end_1iter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1end_1iter_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_text_buffer_get_end_iter((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1end_1iter_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1end_1iter_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1insert
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1insert)
+#ifndef NO_gtk_1text_1buffer_1get_1insert
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1insert)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1insert_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1insert_FUNC);
rc = (jlong)gtk_text_buffer_get_insert((GtkTextBuffer *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1insert_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1insert_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1iter_1at_1line
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1iter_1at_1line)
+#ifndef NO_gtk_1text_1buffer_1get_1iter_1at_1line
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1iter_1at_1line)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1iter_1at_1line_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1iter_1at_1line_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_text_buffer_get_iter_at_line((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (gint)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1iter_1at_1line_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1iter_1at_1line_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1iter_1at_1mark
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1iter_1at_1mark)
+#ifndef NO_gtk_1text_1buffer_1get_1iter_1at_1mark
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1iter_1at_1mark)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1iter_1at_1mark_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1iter_1at_1mark_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_text_buffer_get_iter_at_mark((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (GtkTextMark *)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1iter_1at_1mark_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1iter_1at_1mark_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1iter_1at_1offset
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1iter_1at_1offset)
+#ifndef NO_gtk_1text_1buffer_1get_1iter_1at_1offset
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1iter_1at_1offset)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1iter_1at_1offset_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1iter_1at_1offset_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_text_buffer_get_iter_at_offset((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (gint)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1iter_1at_1offset_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1iter_1at_1offset_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1line_1count
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1line_1count)
+#ifndef NO_gtk_1text_1buffer_1get_1line_1count
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1line_1count)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1line_1count_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1line_1count_FUNC);
rc = (jint)gtk_text_buffer_get_line_count((GtkTextBuffer *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1line_1count_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1line_1count_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1selection_1bound
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1selection_1bound)
+#ifndef NO_gtk_1text_1buffer_1get_1selection_1bound
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1selection_1bound)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1selection_1bound_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1selection_1bound_FUNC);
rc = (jlong)gtk_text_buffer_get_selection_bound((GtkTextBuffer *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1selection_1bound_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1selection_1bound_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1selection_1bounds
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1selection_1bounds)
+#ifndef NO_gtk_1text_1buffer_1get_1selection_1bounds
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1selection_1bounds)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1selection_1bounds_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1selection_1bounds_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jboolean)gtk_text_buffer_get_selection_bounds((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (GtkTextIter *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1selection_1bounds_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1selection_1bounds_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1get_1text
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1get_1text)
+#ifndef NO_gtk_1text_1buffer_1get_1text
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1text_1buffer_1get_1text)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2, jboolean arg3)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1text_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1get_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jlong)gtk_text_buffer_get_text((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (GtkTextIter *)lparg2, (gboolean)arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1get_1text_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1insert__JJ_3BI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1insert__JJ_3BI)
+#ifndef NO_gtk_1text_1buffer_1insert__JJ_3BI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1insert__JJ_3BI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2, jint arg3)
{
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1insert__JJ_3BI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1insert__JJ_3BI_FUNC);
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_text_buffer_insert((GtkTextBuffer *)arg0, (GtkTextIter *)arg1, (const gchar *)lparg2, (gint)arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1insert__JJ_3BI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1insert__JJ_3BI_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1insert__J_3B_3BI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1insert__J_3B_3BI)
+#ifndef NO_gtk_1text_1buffer_1insert__J_3B_3BI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1insert__J_3B_3BI)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2, jint arg3)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1insert__J_3B_3BI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1insert__J_3B_3BI_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_text_buffer_insert((GtkTextBuffer *)arg0, (GtkTextIter *)lparg1, (const gchar *)lparg2, (gint)arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1insert__J_3B_3BI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1insert__J_3B_3BI_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1paste_1clipboard
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1paste_1clipboard)
+#ifndef NO_gtk_1text_1buffer_1paste_1clipboard
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1paste_1clipboard)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2, jboolean arg3)
{
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1paste_1clipboard_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1paste_1clipboard_FUNC);
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
gtk_text_buffer_paste_clipboard((GtkTextBuffer *)arg0, arg1, (GtkTextIter *)lparg2, (gboolean)arg3);
@@ -9935,217 +7654,184 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1paste_1clipboard)
}
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1paste_1clipboard_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1paste_1clipboard_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1place_1cursor
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1place_1cursor)
+#ifndef NO_gtk_1text_1buffer_1place_1cursor
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1place_1cursor)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1place_1cursor_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1place_1cursor_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_text_buffer_place_cursor((GtkTextBuffer *)arg0, (const GtkTextIter *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1place_1cursor_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1place_1cursor_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1select_1range
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1select_1range)
+#ifndef NO_gtk_1text_1buffer_1select_1range
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1select_1range)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1select_1range_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1select_1range_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_text_buffer_select_range((GtkTextBuffer *)arg0, (const GtkTextIter *)lparg1, (const GtkTextIter *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1select_1range_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1select_1range_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1buffer_1set_1text
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1buffer_1set_1text)
+#ifndef NO_gtk_1text_1buffer_1set_1text
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1buffer_1set_1text)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1set_1text_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1buffer_1set_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_text_buffer_set_text((GtkTextBuffer *)arg0, (const gchar *)lparg1, (gint)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1set_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1buffer_1set_1text_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1iter_1get_1line
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1text_1iter_1get_1line)
+#ifndef NO_gtk_1text_1iter_1get_1line
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1text_1iter_1get_1line)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1iter_1get_1line_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1iter_1get_1line_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)gtk_text_iter_get_line((const GtkTextIter *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1iter_1get_1line_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1iter_1get_1line_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1iter_1get_1offset
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1text_1iter_1get_1offset)
+#ifndef NO_gtk_1text_1iter_1get_1offset
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1text_1iter_1get_1offset)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1iter_1get_1offset_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1iter_1get_1offset_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)gtk_text_iter_get_offset((const GtkTextIter *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1iter_1get_1offset_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1iter_1get_1offset_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1view_1buffer_1to_1surface_1coords
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1buffer_1to_1surface_1coords)
+#ifndef NO_gtk_1text_1view_1buffer_1to_1window_1coords
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1buffer_1to_1window_1coords)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5)
{
jint *lparg4=NULL;
jint *lparg5=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1buffer_1to_1surface_1coords_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1buffer_1to_1window_1coords_FUNC);
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
-/*
- gtk_text_view_buffer_to_surface_coords((GtkTextView *)arg0, (GtkTextWindowType)arg1, (gint)arg2, (gint)arg3, (gint *)lparg4, (gint *)lparg5);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_text_view_buffer_to_surface_coords)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkTextView *, GtkTextWindowType, gint, gint, gint *, gint *))fp)((GtkTextView *)arg0, (GtkTextWindowType)arg1, (gint)arg2, (gint)arg3, (gint *)lparg4, (gint *)lparg5);
- }
- }
-fail:
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1buffer_1to_1surface_1coords_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1text_1view_1buffer_1to_1window_1coords
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1buffer_1to_1window_1coords)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5)
-{
- jint *lparg4=NULL;
- jint *lparg5=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1buffer_1to_1window_1coords_FUNC);
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
-/*
gtk_text_view_buffer_to_window_coords((GtkTextView *)arg0, (GtkTextWindowType)arg1, (gint)arg2, (gint)arg3, (gint *)lparg4, (gint *)lparg5);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_text_view_buffer_to_window_coords)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkTextView *, GtkTextWindowType, gint, gint, gint *, gint *))fp)((GtkTextView *)arg0, (GtkTextWindowType)arg1, (gint)arg2, (gint)arg3, (gint *)lparg4, (gint *)lparg5);
- }
- }
fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1buffer_1to_1window_1coords_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1buffer_1to_1window_1coords_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1get_1buffer
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1buffer)
+#ifndef NO_gtk_1text_1view_1get_1buffer
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1text_1view_1get_1buffer)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1buffer_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1buffer_FUNC);
rc = (jlong)gtk_text_view_get_buffer((GtkTextView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1buffer_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1buffer_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1view_1get_1editable
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1editable)
+#ifndef NO_gtk_1text_1view_1get_1editable
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1text_1view_1get_1editable)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1editable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1editable_FUNC);
rc = (jboolean)gtk_text_view_get_editable((GtkTextView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1editable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1editable_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1view_1get_1iter_1at_1location
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1iter_1at_1location)
+#ifndef NO_gtk_1text_1view_1get_1iter_1at_1location
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1get_1iter_1at_1location)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jint arg3)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1iter_1at_1location_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1iter_1at_1location_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_text_view_get_iter_at_location((GtkTextView *)arg0, (GtkTextIter *)lparg1, (gint)arg2, (gint)arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1iter_1at_1location_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1iter_1at_1location_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1get_1iter_1location
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1iter_1location)
+#ifndef NO_gtk_1text_1view_1get_1iter_1location
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1get_1iter_1location)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jobject arg2)
{
jbyte *lparg1=NULL;
GdkRectangle _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1iter_1location_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1iter_1location_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
gtk_text_view_get_iter_location((GtkTextView *)arg0, (const GtkTextIter *)lparg1, (GdkRectangle *)lparg2);
fail:
if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1iter_1location_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1iter_1location_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1get_1line_1at_1y
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1line_1at_1y)
+#ifndef NO_gtk_1text_1view_1get_1line_1at_1y
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1get_1line_1at_1y)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jintArray arg3)
{
jbyte *lparg1=NULL;
jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1line_1at_1y_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1line_1at_1y_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
gtk_text_view_get_line_at_y((GtkTextView *)arg0, (GtkTextIter *)lparg1, (gint)arg2, (gint *)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1line_1at_1y_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1line_1at_1y_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1get_1line_1yrange
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1line_1yrange)
+#ifndef NO_gtk_1text_1view_1get_1line_1yrange
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1get_1line_1yrange)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jintArray arg2, jintArray arg3)
{
jbyte *lparg1=NULL;
jint *lparg2=NULL;
jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1line_1yrange_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1line_1yrange_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
@@ -10154,1398 +7840,1141 @@ fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1line_1yrange_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1line_1yrange_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1get_1visible_1rect
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1visible_1rect)
+#ifndef NO_gtk_1text_1view_1get_1visible_1rect
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1get_1visible_1rect)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1visible_1rect_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1get_1visible_1rect_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
gtk_text_view_get_visible_rect((GtkTextView *)arg0, (GdkRectangle *)lparg1);
fail:
if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1visible_1rect_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1text_1view_1get_1window
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1text_1view_1get_1window)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1get_1window_FUNC);
- rc = (jlong)gtk_text_view_get_window((GtkTextView *)arg0, (GtkTextWindowType)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1get_1window_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1get_1visible_1rect_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1text_1view_1new)
+#ifndef NO_gtk_1text_1view_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1text_1view_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1new_FUNC);
rc = (jlong)gtk_text_view_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1view_1scroll_1to_1iter
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1text_1view_1scroll_1to_1iter)
+#ifndef NO_gtk_1text_1view_1scroll_1to_1iter
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1text_1view_1scroll_1to_1iter)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jdouble arg2, jboolean arg3, jdouble arg4, jdouble arg5)
{
jbyte *lparg1=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1scroll_1to_1iter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1scroll_1to_1iter_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)gtk_text_view_scroll_to_iter((GtkTextView *)arg0, (GtkTextIter *)lparg1, (gdouble)arg2, (gboolean)arg3, (gdouble)arg4, (gdouble)arg5);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1scroll_1to_1iter_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1scroll_1to_1iter_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1text_1view_1scroll_1to_1mark
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1scroll_1to_1mark)
+#ifndef NO_gtk_1text_1view_1scroll_1to_1mark
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1scroll_1to_1mark)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jdouble arg2, jboolean arg3, jdouble arg4, jdouble arg5)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1scroll_1to_1mark_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1scroll_1to_1mark_FUNC);
gtk_text_view_scroll_to_mark((GtkTextView *)arg0, (GtkTextMark *)arg1, (gdouble)arg2, (gboolean)arg3, (gdouble)arg4, (gdouble)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1scroll_1to_1mark_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1scroll_1to_1mark_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1set_1editable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1set_1editable)
+#ifndef NO_gtk_1text_1view_1set_1editable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1set_1editable)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1set_1editable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1set_1editable_FUNC);
gtk_text_view_set_editable((GtkTextView *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1set_1editable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1set_1editable_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1set_1justification
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1set_1justification)
+#ifndef NO_gtk_1text_1view_1set_1justification
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1set_1justification)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1set_1justification_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1set_1justification_FUNC);
gtk_text_view_set_justification((GtkTextView *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1set_1justification_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1set_1justification_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1set_1tabs
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1set_1tabs)
+#ifndef NO_gtk_1text_1view_1set_1tabs
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1set_1tabs)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1set_1tabs_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1set_1tabs_FUNC);
gtk_text_view_set_tabs((GtkTextView *)arg0, (PangoTabArray *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1set_1tabs_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1set_1tabs_FUNC);
}
#endif
-#ifndef NO__1gtk_1text_1view_1set_1wrap_1mode
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1text_1view_1set_1wrap_1mode)
+#ifndef NO_gtk_1text_1view_1set_1wrap_1mode
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1text_1view_1set_1wrap_1mode)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1text_1view_1set_1wrap_1mode_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1text_1view_1set_1wrap_1mode_FUNC);
gtk_text_view_set_wrap_mode((GtkTextView *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1text_1view_1set_1wrap_1mode_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1text_1view_1set_1wrap_1mode_FUNC);
}
#endif
-#ifndef NO__1gtk_1toggle_1button_1get_1active
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1toggle_1button_1get_1active)
+#ifndef NO_gtk_1toggle_1button_1get_1active
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1toggle_1button_1get_1active)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1button_1get_1active_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1toggle_1button_1get_1active_FUNC);
rc = (jboolean)gtk_toggle_button_get_active((GtkToggleButton *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1button_1get_1active_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1toggle_1button_1get_1active_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1toggle_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1toggle_1button_1new)
+#ifndef NO_gtk_1toggle_1button_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1toggle_1button_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1button_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1toggle_1button_1new_FUNC);
rc = (jlong)gtk_toggle_button_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1button_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1toggle_1button_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1toggle_1button_1set_1active
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toggle_1button_1set_1active)
+#ifndef NO_gtk_1toggle_1button_1set_1active
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1toggle_1button_1set_1active)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1button_1set_1active_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1toggle_1button_1set_1active_FUNC);
gtk_toggle_button_set_active((GtkToggleButton *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1button_1set_1active_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1toggle_1button_1set_1active_FUNC);
}
#endif
-#ifndef NO__1gtk_1toggle_1button_1set_1inconsistent
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toggle_1button_1set_1inconsistent)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1button_1set_1inconsistent_FUNC);
-/*
- gtk_toggle_button_set_inconsistent((GtkToggleButton *)arg0, (gboolean)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_toggle_button_set_inconsistent)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkToggleButton *, gboolean))fp)((GtkToggleButton *)arg0, (gboolean)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1button_1set_1inconsistent_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1toggle_1button_1set_1mode
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toggle_1button_1set_1mode)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1button_1set_1mode_FUNC);
-/*
- gtk_toggle_button_set_mode((GtkToggleButton *)arg0, (gboolean)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_toggle_button_set_mode)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkToggleButton *, gboolean))fp)((GtkToggleButton *)arg0, (gboolean)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1button_1set_1mode_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1toggle_1tool_1button_1get_1active
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1toggle_1tool_1button_1get_1active)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1tool_1button_1get_1active_FUNC);
- rc = (jboolean)gtk_toggle_tool_button_get_active((GtkToggleToolButton *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1tool_1button_1get_1active_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1toggle_1tool_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1toggle_1tool_1button_1new)
+#ifndef NO_gtk_1tooltip_1get_1type
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tooltip_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1tool_1button_1new_FUNC);
- rc = (jlong)gtk_toggle_tool_button_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1tool_1button_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1toggle_1tool_1button_1set_1active
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toggle_1tool_1button_1set_1active)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toggle_1tool_1button_1set_1active_FUNC);
- gtk_toggle_tool_button_set_active((GtkToggleToolButton *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1toggle_1tool_1button_1set_1active_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1button_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tool_1button_1new)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1button_1new_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_tool_button_new((GtkWidget *)arg0, (const gchar *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1button_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1button_1set_1icon_1widget
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tool_1button_1set_1icon_1widget)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1button_1set_1icon_1widget_FUNC);
- gtk_tool_button_set_icon_widget((GtkToolButton *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1button_1set_1icon_1widget_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1button_1set_1label
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tool_1button_1set_1label)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1button_1set_1label_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_tool_button_set_label((GtkToolButton *)arg0, (const gchar *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1button_1set_1label_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1button_1set_1label_1widget
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tool_1button_1set_1label_1widget)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1button_1set_1label_1widget_FUNC);
- gtk_tool_button_set_label_widget((GtkToolButton *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1button_1set_1label_1widget_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1button_1set_1use_1underline
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tool_1button_1set_1use_1underline)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1button_1set_1use_1underline_FUNC);
- gtk_tool_button_set_use_underline((GtkToolButton *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1button_1set_1use_1underline_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1item_1get_1proxy_1menu_1item
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tool_1item_1get_1proxy_1menu_1item)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1item_1get_1proxy_1menu_1item_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)gtk_tool_item_get_proxy_menu_item((GtkToolItem *)arg0, (const gchar *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1item_1get_1proxy_1menu_1item_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1item_1retrieve_1proxy_1menu_1item
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tool_1item_1retrieve_1proxy_1menu_1item)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1item_1retrieve_1proxy_1menu_1item_FUNC);
- rc = (jlong)gtk_tool_item_retrieve_proxy_menu_item((GtkToolItem *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1item_1retrieve_1proxy_1menu_1item_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1item_1set_1is_1important
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tool_1item_1set_1is_1important)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1item_1set_1is_1important_FUNC);
- gtk_tool_item_set_is_important((GtkToolItem *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1item_1set_1is_1important_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tool_1item_1set_1proxy_1menu_1item
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tool_1item_1set_1proxy_1menu_1item)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tool_1item_1set_1proxy_1menu_1item_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_tool_item_set_proxy_menu_item((GtkToolItem *)arg0, (const gchar *)lparg1, (GtkWidget *)arg2);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tool_1item_1set_1proxy_1menu_1item_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1toolbar_1insert
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toolbar_1insert)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toolbar_1insert_FUNC);
- gtk_toolbar_insert((GtkToolbar *)arg0, (GtkToolItem *)arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1toolbar_1insert_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1toolbar_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1toolbar_1new)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1toolbar_1new_FUNC);
- rc = (jlong)gtk_toolbar_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1toolbar_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1toolbar_1set_1icon_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toolbar_1set_1icon_1size)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toolbar_1set_1icon_1size_FUNC);
-/*
- gtk_toolbar_set_icon_size((GtkToolbar *)arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_toolbar_set_icon_size)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkToolbar *, jint))fp)((GtkToolbar *)arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1toolbar_1set_1icon_1size_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1toolbar_1set_1show_1arrow
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toolbar_1set_1show_1arrow)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toolbar_1set_1show_1arrow_FUNC);
- gtk_toolbar_set_show_arrow((GtkToolbar *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1toolbar_1set_1show_1arrow_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1toolbar_1set_1style
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1toolbar_1set_1style)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1toolbar_1set_1style_FUNC);
- gtk_toolbar_set_style((GtkToolbar *)arg0, (GtkToolbarStyle)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1toolbar_1set_1style_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tooltip_1get_1type
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tooltip_1get_1type)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tooltip_1get_1type_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tooltip_1get_1type_FUNC);
rc = (jlong)gtk_tooltip_get_type();
- GTK_NATIVE_EXIT(env, that, _1gtk_1tooltip_1get_1type_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tooltip_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tooltip_1set_1custom
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tooltip_1set_1custom)
+#ifndef NO_gtk_1tooltip_1set_1custom
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tooltip_1set_1custom)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tooltip_1set_1custom_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tooltip_1set_1custom_FUNC);
gtk_tooltip_set_custom((GtkTooltip *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tooltip_1set_1custom_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tooltip_1set_1custom_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1model_1get__JJI_3II
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1model_1get__JJI_3II)
+#ifndef NO_gtk_1tree_1model_1get__JJI_3II
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1model_1get__JJI_3II)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jintArray arg3, jint arg4)
{
jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3II_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get__JJI_3II_FUNC);
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
gtk_tree_model_get((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3II_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get__JJI_3II_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1model_1get__JJI_3JI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1model_1get__JJI_3JI)
+#ifndef NO_gtk_1tree_1model_1get__JJI_3JI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1model_1get__JJI_3JI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlongArray arg3, jint arg4)
{
jlong *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3JI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get__JJI_3JI_FUNC);
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
gtk_tree_model_get((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
fail:
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3JI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get__JJI_3JI_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1model_1get_1iter
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1model_1get_1iter)
+#ifndef NO_gtk_1tree_1model_1get_1iter
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1model_1get_1iter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get_1iter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get_1iter_FUNC);
rc = (jboolean)gtk_tree_model_get_iter((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, (GtkTreePath *)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get_1iter_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get_1iter_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1get_1iter_1first
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1model_1get_1iter_1first)
+#ifndef NO_gtk_1tree_1model_1get_1iter_1first
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1model_1get_1iter_1first)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get_1iter_1first_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get_1iter_1first_FUNC);
rc = (jboolean)gtk_tree_model_get_iter_first((GtkTreeModel *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get_1iter_1first_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get_1iter_1first_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1get_1n_1columns
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1model_1get_1n_1columns)
+#ifndef NO_gtk_1tree_1model_1get_1n_1columns
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1model_1get_1n_1columns)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get_1n_1columns_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get_1n_1columns_FUNC);
rc = (jint)gtk_tree_model_get_n_columns((GtkTreeModel *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get_1n_1columns_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get_1n_1columns_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1get_1path
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1model_1get_1path)
+#ifndef NO_gtk_1tree_1model_1get_1path
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1model_1get_1path)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get_1path_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get_1path_FUNC);
rc = (jlong)gtk_tree_model_get_path((GtkTreeModel *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get_1path_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get_1path_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1get_1type
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1model_1get_1type)
+#ifndef NO_gtk_1tree_1model_1get_1type
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1model_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get_1type_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get_1type_FUNC);
rc = (jlong)gtk_tree_model_get_type();
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get_1type_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1iter_1children
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1model_1iter_1children)
+#ifndef NO_gtk_1tree_1model_1get_1value
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1model_1get_1value)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1get_1value_FUNC);
+ gtk_tree_model_get_value((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, arg2, (GValue *)arg3);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1get_1value_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1model_1iter_1children
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1model_1iter_1children)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1iter_1children_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1iter_1children_FUNC);
rc = (jboolean)gtk_tree_model_iter_children((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, (GtkTreeIter *)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1iter_1children_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1iter_1children_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1iter_1n_1children
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1model_1iter_1n_1children)
+#ifndef NO_gtk_1tree_1model_1iter_1n_1children
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1model_1iter_1n_1children)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1iter_1n_1children_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1iter_1n_1children_FUNC);
rc = (jint)gtk_tree_model_iter_n_children((GtkTreeModel *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1iter_1n_1children_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1iter_1n_1children_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1iter_1next
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1model_1iter_1next)
+#ifndef NO_gtk_1tree_1model_1iter_1next
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1model_1iter_1next)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1iter_1next_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1iter_1next_FUNC);
rc = (jboolean)gtk_tree_model_iter_next((GtkTreeModel *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1iter_1next_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1iter_1next_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1model_1iter_1nth_1child
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1model_1iter_1nth_1child)
+#ifndef NO_gtk_1tree_1model_1iter_1nth_1child
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1model_1iter_1nth_1child)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1iter_1nth_1child_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1model_1iter_1nth_1child_FUNC);
rc = (jboolean)gtk_tree_model_iter_nth_child((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, (GtkTreeIter *)arg2, arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1iter_1nth_1child_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1model_1iter_1nth_1child_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1append_1index
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1path_1append_1index)
+#ifndef NO_gtk_1tree_1path_1append_1index
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1path_1append_1index)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1append_1index_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1append_1index_FUNC);
gtk_tree_path_append_index((GtkTreePath *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1append_1index_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1append_1index_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1path_1compare
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1path_1compare)
+#ifndef NO_gtk_1tree_1path_1compare
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1path_1compare)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1compare_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1compare_FUNC);
rc = (jlong)gtk_tree_path_compare((const GtkTreePath *)arg0, (const GtkTreePath *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1compare_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1compare_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1free
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1path_1free)
+#ifndef NO_gtk_1tree_1path_1free
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1path_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1free_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1free_FUNC);
gtk_tree_path_free((GtkTreePath *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1free_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1free_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1path_1get_1depth
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1path_1get_1depth)
+#ifndef NO_gtk_1tree_1path_1get_1depth
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1path_1get_1depth)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1get_1depth_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1get_1depth_FUNC);
rc = (jint)gtk_tree_path_get_depth((GtkTreePath *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1get_1depth_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1get_1depth_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1get_1indices
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1path_1get_1indices)
+#ifndef NO_gtk_1tree_1path_1get_1indices
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1path_1get_1indices)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1get_1indices_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1get_1indices_FUNC);
rc = (jlong)gtk_tree_path_get_indices((GtkTreePath *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1get_1indices_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1get_1indices_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1path_1new)
+#ifndef NO_gtk_1tree_1path_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1path_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1new_FUNC);
rc = (jlong)gtk_tree_path_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1new_1from_1string__J
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1path_1new_1from_1string__J)
+#ifndef NO_gtk_1tree_1path_1new_1from_1string__J
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1path_1new_1from_1string__J)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1new_1from_1string__J_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1new_1from_1string__J_FUNC);
rc = (jlong)gtk_tree_path_new_from_string((const gchar *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1new_1from_1string__J_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1new_1from_1string__J_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1new_1from_1string___3B
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1path_1new_1from_1string___3B)
+#ifndef NO_gtk_1tree_1path_1new_1from_1string___3B
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1path_1new_1from_1string___3B)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1new_1from_1string___3B_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1new_1from_1string___3B_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)gtk_tree_path_new_from_string((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1new_1from_1string___3B_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1new_1from_1string___3B_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1next
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1path_1next)
+#ifndef NO_gtk_1tree_1path_1next
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1path_1next)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1next_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1next_FUNC);
gtk_tree_path_next((GtkTreePath *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1next_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1next_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1path_1prev
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1path_1prev)
+#ifndef NO_gtk_1tree_1path_1prev
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1path_1prev)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1prev_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1prev_FUNC);
rc = (jboolean)gtk_tree_path_prev((GtkTreePath *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1prev_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1prev_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1path_1up
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1path_1up)
+#ifndef NO_gtk_1tree_1path_1up
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1path_1up)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1up_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1path_1up_FUNC);
rc = (jboolean)gtk_tree_path_up((GtkTreePath *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1up_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1path_1up_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1count_1selected_1rows
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1count_1selected_1rows)
+#ifndef NO_gtk_1tree_1selection_1count_1selected_1rows
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1selection_1count_1selected_1rows)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1count_1selected_1rows_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1count_1selected_1rows_FUNC);
rc = (jint)gtk_tree_selection_count_selected_rows((GtkTreeSelection *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1count_1selected_1rows_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1count_1selected_1rows_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1get_1select_1function
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1get_1select_1function)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1get_1select_1function_FUNC);
- rc = (jlong)gtk_tree_selection_get_select_function((GtkTreeSelection *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1get_1select_1function_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1tree_1selection_1get_1selected_1rows
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1get_1selected_1rows)
+#ifndef NO_gtk_1tree_1selection_1get_1selected_1rows
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1selection_1get_1selected_1rows)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1get_1selected_1rows_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1get_1selected_1rows_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_tree_selection_get_selected_rows((GtkTreeSelection *)arg0, (GtkTreeModel **)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1get_1selected_1rows_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1get_1selected_1rows_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1path_1is_1selected
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1path_1is_1selected)
+#ifndef NO_gtk_1tree_1selection_1path_1is_1selected
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1selection_1path_1is_1selected)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1path_1is_1selected_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1path_1is_1selected_FUNC);
rc = (jboolean)gtk_tree_selection_path_is_selected((GtkTreeSelection *)arg0, (GtkTreePath *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1path_1is_1selected_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1path_1is_1selected_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1select_1all
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1select_1all)
+#ifndef NO_gtk_1tree_1selection_1select_1all
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1selection_1select_1all)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1select_1all_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1select_1all_FUNC);
gtk_tree_selection_select_all((GtkTreeSelection *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1select_1all_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1select_1all_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1select_1iter
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1select_1iter)
+#ifndef NO_gtk_1tree_1selection_1select_1iter
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1selection_1select_1iter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1select_1iter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1select_1iter_FUNC);
gtk_tree_selection_select_iter((GtkTreeSelection *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1select_1iter_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1select_1iter_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1select_1path
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1select_1path)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1select_1path_FUNC);
- gtk_tree_selection_select_path((GtkTreeSelection *)arg0, (GtkTreePath *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1select_1path_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tree_1selection_1set_1mode
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1set_1mode)
+#ifndef NO_gtk_1tree_1selection_1set_1mode
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1selection_1set_1mode)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1set_1mode_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1set_1mode_FUNC);
gtk_tree_selection_set_mode((GtkTreeSelection *)arg0, (GtkSelectionMode)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1set_1mode_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1set_1mode_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1set_1select_1function
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1set_1select_1function)
+#ifndef NO_gtk_1tree_1selection_1set_1select_1function
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1selection_1set_1select_1function)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1set_1select_1function_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1set_1select_1function_FUNC);
gtk_tree_selection_set_select_function((GtkTreeSelection *)arg0, (GtkTreeSelectionFunc)arg1, (gpointer)arg2, (GDestroyNotify)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1set_1select_1function_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1set_1select_1function_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1unselect_1all
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1unselect_1all)
+#ifndef NO_gtk_1tree_1selection_1unselect_1all
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1selection_1unselect_1all)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1unselect_1all_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1unselect_1all_FUNC);
gtk_tree_selection_unselect_all((GtkTreeSelection *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1unselect_1all_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1unselect_1all_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1unselect_1iter
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1unselect_1iter)
+#ifndef NO_gtk_1tree_1selection_1unselect_1iter
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1selection_1unselect_1iter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1unselect_1iter_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1unselect_1iter_FUNC);
gtk_tree_selection_unselect_iter((GtkTreeSelection *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1unselect_1iter_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1unselect_1iter_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1selection_1unselect_1path
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1selection_1unselect_1path)
+#ifndef NO_gtk_1tree_1selection_1unselect_1path
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1selection_1unselect_1path)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1unselect_1path_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1selection_1unselect_1path_FUNC);
gtk_tree_selection_unselect_path((GtkTreeSelection *)arg0, (GtkTreePath *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1unselect_1path_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1selection_1unselect_1path_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1append
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1append)
+#ifndef NO_gtk_1tree_1store_1append
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1append)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1append_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1append_FUNC);
gtk_tree_store_append((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, (GtkTreeIter *)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1append_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1append_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1clear
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1clear)
+#ifndef NO_gtk_1tree_1store_1clear
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1clear)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1clear_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1clear_FUNC);
gtk_tree_store_clear((GtkTreeStore *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1clear_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1clear_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1insert
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1insert)
+#ifndef NO_gtk_1tree_1store_1insert
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1insert)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1insert_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1insert_FUNC);
gtk_tree_store_insert((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, (GtkTreeIter *)arg2, (gint)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1insert_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1insert_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1newv
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1store_1newv)
+#ifndef NO_gtk_1tree_1store_1insert_1after
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1insert_1after)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1insert_1after_FUNC);
+ gtk_tree_store_insert_after((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, (GtkTreeIter *)arg2, (GtkTreeIter *)arg3);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1insert_1after_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1store_1newv
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1store_1newv)
(JNIEnv *env, jclass that, jint arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1newv_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1newv_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_tree_store_newv(arg0, (GType *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1newv_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1newv_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1store_1remove
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1remove)
+#ifndef NO_gtk_1tree_1store_1prepend
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1prepend)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1prepend_FUNC);
+ gtk_tree_store_prepend((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, (GtkTreeIter *)arg2);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1prepend_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1store_1remove
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1remove)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1remove_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1remove_FUNC);
gtk_tree_store_remove((GtkTreeStore *)arg0, (GtkTreeIter *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1remove_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1remove_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1set__JJIII
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1set__JJIII)
+#ifndef NO_gtk_1tree_1store_1set__JJIII
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1set__JJIII)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIII_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1set__JJIII_FUNC);
gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIII_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1set__JJIII_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1set__JJIJI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1set__JJIJI)
+#ifndef NO_gtk_1tree_1store_1set__JJIJI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1set__JJIJI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jint arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIJI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1set__JJIJI_FUNC);
gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIJI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1set__JJIJI_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I)
+#ifndef NO_gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jobject arg3, jint arg4)
{
GdkRGBA _arg3, *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
if (arg3) if ((lparg3 = getGdkRGBAFields(env, arg3, &_arg3)) == NULL) goto fail;
gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
fail:
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1set__JJIZI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1set__JJIZI)
+#ifndef NO_gtk_1tree_1store_1set__JJIZI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1set__JJIZI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jboolean arg3, jint arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIZI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1set__JJIZI_FUNC);
gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIZI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1set__JJIZI_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1store_1set__JJI_3BI
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1store_1set__JJI_3BI)
+#ifndef NO_gtk_1tree_1store_1set__JJI_3BI
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1set__JJI_3BI)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jbyteArray arg3, jint arg4)
{
jbyte *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJI_3BI_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1set__JJI_3BI_FUNC);
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
fail:
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJI_3BI_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1set__JJI_3BI_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1store_1set_1value
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1store_1set_1value)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1store_1set_1value_FUNC);
+ gtk_tree_store_set_value((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, (GValue *)arg3);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1store_1set_1value_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1collapse_1row
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1collapse_1row)
+#ifndef NO_gtk_1tree_1view_1collapse_1row
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1collapse_1row)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1collapse_1row_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1collapse_1row_FUNC);
rc = (jboolean)gtk_tree_view_collapse_row((GtkTreeView *)arg0, (GtkTreePath *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1collapse_1row_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1collapse_1row_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1add_1attribute
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1add_1attribute)
+#ifndef NO_gtk_1tree_1view_1column_1add_1attribute
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1add_1attribute)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2, jint arg3)
{
jbyte *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1add_1attribute_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1add_1attribute_FUNC);
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_tree_view_column_add_attribute((GtkTreeViewColumn *)arg0, (GtkCellRenderer *)arg1, (const gchar *)lparg2, (gint)arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1add_1attribute_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1add_1attribute_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1cell_1get_1position
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1cell_1get_1position)
+#ifndef NO_gtk_1tree_1view_1column_1cell_1get_1position
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1cell_1get_1position)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jintArray arg3)
{
jint *lparg2=NULL;
jint *lparg3=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1cell_1get_1position_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1cell_1get_1position_FUNC);
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
rc = (jboolean)gtk_tree_view_column_cell_get_position((GtkTreeViewColumn *)arg0, (GtkCellRenderer *)arg1, (gint *)lparg2, (gint *)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1cell_1get_1position_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1cell_1get_1position_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1cell_1get_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1cell_1get_1size)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jintArray arg2, jintArray arg3, jintArray arg4, jintArray arg5)
-{
- GdkRectangle _arg1, *lparg1=NULL;
- jint *lparg2=NULL;
- jint *lparg3=NULL;
- jint *lparg4=NULL;
- jint *lparg5=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1cell_1get_1size_FUNC);
- if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- gtk_tree_view_column_cell_get_size((GtkTreeViewColumn *)arg0, (GdkRectangle *)lparg1, (gint *)lparg2, (gint *)lparg3, (gint *)lparg4, (gint *)lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1cell_1get_1size_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tree_1view_1column_1cell_1set_1cell_1data
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1cell_1set_1cell_1data)
+#ifndef NO_gtk_1tree_1view_1column_1cell_1set_1cell_1data
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1cell_1set_1cell_1data)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3, jboolean arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1cell_1set_1cell_1data_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1cell_1set_1cell_1data_FUNC);
gtk_tree_view_column_cell_set_cell_data((GtkTreeViewColumn *)arg0, (GtkTreeModel *)arg1, (GtkTreeIter *)arg2, arg3, arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1cell_1set_1cell_1data_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1cell_1set_1cell_1data_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1clear
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1clear)
+#ifndef NO_gtk_1tree_1view_1column_1clear
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1clear)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1clear_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1clear_FUNC);
gtk_tree_view_column_clear((GtkTreeViewColumn *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1clear_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1clear_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1get_1button
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1get_1button)
+#ifndef NO_gtk_1tree_1view_1column_1get_1button
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1get_1button)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1button_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1get_1button_FUNC);
rc = (jlong)gtk_tree_view_column_get_button((GtkTreeViewColumn *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1button_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1get_1button_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1get_1fixed_1width
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1get_1fixed_1width)
+#ifndef NO_gtk_1tree_1view_1column_1get_1fixed_1width
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1get_1fixed_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1fixed_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1get_1fixed_1width_FUNC);
rc = (jint)gtk_tree_view_column_get_fixed_width((GtkTreeViewColumn *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1fixed_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1get_1fixed_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1get_1reorderable
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1get_1reorderable)
+#ifndef NO_gtk_1tree_1view_1column_1get_1reorderable
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1get_1reorderable)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1reorderable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1get_1reorderable_FUNC);
rc = (jboolean)gtk_tree_view_column_get_reorderable((GtkTreeViewColumn *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1reorderable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1get_1reorderable_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1get_1resizable
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1get_1resizable)
+#ifndef NO_gtk_1tree_1view_1column_1get_1resizable
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1get_1resizable)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1resizable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1get_1resizable_FUNC);
rc = (jboolean)gtk_tree_view_column_get_resizable((GtkTreeViewColumn *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1resizable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1get_1resizable_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1get_1visible
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1get_1visible)
+#ifndef NO_gtk_1tree_1view_1column_1get_1visible
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1get_1visible)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1visible_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1get_1visible_FUNC);
rc = (jboolean)gtk_tree_view_column_get_visible((GtkTreeViewColumn *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1visible_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1get_1visible_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1get_1width
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1get_1width)
+#ifndef NO_gtk_1tree_1view_1column_1get_1width
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1get_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1get_1width_FUNC);
rc = (jint)gtk_tree_view_column_get_width((GtkTreeViewColumn *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1get_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1new)
+#ifndef NO_gtk_1tree_1view_1column_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1new_FUNC);
rc = (jlong)gtk_tree_view_column_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1pack_1end
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1pack_1end)
+#ifndef NO_gtk_1tree_1view_1column_1pack_1end
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1pack_1end)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1pack_1end_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1pack_1end_FUNC);
gtk_tree_view_column_pack_end((GtkTreeViewColumn *)arg0, (GtkCellRenderer *)arg1, (gboolean)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1pack_1end_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1pack_1end_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1pack_1start
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1pack_1start)
+#ifndef NO_gtk_1tree_1view_1column_1pack_1start
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1pack_1start)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1pack_1start_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1pack_1start_FUNC);
gtk_tree_view_column_pack_start((GtkTreeViewColumn *)arg0, (GtkCellRenderer *)arg1, (gboolean)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1pack_1start_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1pack_1start_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1alignment
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1alignment)
+#ifndef NO_gtk_1tree_1view_1column_1set_1alignment
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1alignment)
(JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1alignment_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1alignment_FUNC);
gtk_tree_view_column_set_alignment((GtkTreeViewColumn *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1alignment_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1alignment_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1cell_1data_1func
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1cell_1data_1func)
+#ifndef NO_gtk_1tree_1view_1column_1set_1cell_1data_1func
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1cell_1data_1func)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1cell_1data_1func_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1cell_1data_1func_FUNC);
gtk_tree_view_column_set_cell_data_func((GtkTreeViewColumn *)arg0, (GtkCellRenderer *)arg1, (GtkTreeCellDataFunc)arg2, (gpointer)arg3, (GDestroyNotify)arg4);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1cell_1data_1func_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1cell_1data_1func_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1clickable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1clickable)
+#ifndef NO_gtk_1tree_1view_1column_1set_1clickable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1clickable)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1clickable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1clickable_FUNC);
gtk_tree_view_column_set_clickable((GtkTreeViewColumn *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1clickable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1clickable_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1fixed_1width
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1fixed_1width)
+#ifndef NO_gtk_1tree_1view_1column_1set_1fixed_1width
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1fixed_1width)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1fixed_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1fixed_1width_FUNC);
gtk_tree_view_column_set_fixed_width((GtkTreeViewColumn *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1fixed_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1fixed_1width_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1min_1width
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1min_1width)
+#ifndef NO_gtk_1tree_1view_1column_1set_1min_1width
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1min_1width)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1min_1width_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1min_1width_FUNC);
gtk_tree_view_column_set_min_width((GtkTreeViewColumn *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1min_1width_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1min_1width_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1reorderable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1reorderable)
+#ifndef NO_gtk_1tree_1view_1column_1set_1reorderable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1reorderable)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1reorderable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1reorderable_FUNC);
gtk_tree_view_column_set_reorderable((GtkTreeViewColumn *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1reorderable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1reorderable_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1resizable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1resizable)
+#ifndef NO_gtk_1tree_1view_1column_1set_1resizable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1resizable)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1resizable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1resizable_FUNC);
gtk_tree_view_column_set_resizable((GtkTreeViewColumn *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1resizable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1resizable_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1sizing
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1sizing)
+#ifndef NO_gtk_1tree_1view_1column_1set_1sizing
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1sizing)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1sizing_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1sizing_FUNC);
gtk_tree_view_column_set_sizing((GtkTreeViewColumn *)arg0, (GtkTreeViewColumnSizing)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1sizing_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1sizing_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1sort_1indicator
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1sort_1indicator)
+#ifndef NO_gtk_1tree_1view_1column_1set_1sort_1indicator
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1sort_1indicator)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1sort_1indicator_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1sort_1indicator_FUNC);
gtk_tree_view_column_set_sort_indicator((GtkTreeViewColumn *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1sort_1indicator_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1sort_1indicator_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1sort_1order
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1sort_1order)
+#ifndef NO_gtk_1tree_1view_1column_1set_1sort_1order
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1sort_1order)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1sort_1order_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1sort_1order_FUNC);
gtk_tree_view_column_set_sort_order((GtkTreeViewColumn *)arg0, (GtkSortType)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1sort_1order_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1sort_1order_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1visible
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1visible)
+#ifndef NO_gtk_1tree_1view_1column_1set_1visible
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1visible)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1visible_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1visible_FUNC);
gtk_tree_view_column_set_visible((GtkTreeViewColumn *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1visible_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1visible_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1column_1set_1widget
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1column_1set_1widget)
+#ifndef NO_gtk_1tree_1view_1column_1set_1widget
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1column_1set_1widget)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1widget_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1column_1set_1widget_FUNC);
gtk_tree_view_column_set_widget((GtkTreeViewColumn *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1widget_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1column_1set_1widget_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords)
+#ifndef NO_gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3, jintArray arg4)
{
jint *lparg3=NULL;
jint *lparg4=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC);
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
gtk_tree_view_convert_bin_window_to_tree_coords((GtkTreeView *)arg0, (gint)arg1, (gint)arg2, (gint *)lparg3, (gint *)lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1tree_1view_1convert_1bin_1window_1to_1widget_1coords
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1convert_1bin_1window_1to_1widget_1coords)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3, jintArray arg4)
+{
+ jint *lparg3=NULL;
+ jint *lparg4=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1convert_1bin_1window_1to_1widget_1coords_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ gtk_tree_view_convert_bin_window_to_widget_coords((GtkTreeView *)arg0, arg1, arg2, (int *)lparg3, (int *)lparg4);
+fail:
+ if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1convert_1bin_1window_1to_1widget_1coords_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1create_1row_1drag_1icon
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1create_1row_1drag_1icon)
+#ifndef NO_gtk_1tree_1view_1create_1row_1drag_1icon
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1create_1row_1drag_1icon)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1create_1row_1drag_1icon_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1create_1row_1drag_1icon_FUNC);
rc = (jlong)gtk_tree_view_create_row_drag_icon((GtkTreeView *)arg0, (GtkTreePath *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1create_1row_1drag_1icon_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1create_1row_1drag_1icon_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1expand_1row
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1expand_1row)
+#ifndef NO_gtk_1tree_1view_1expand_1row
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1expand_1row)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1expand_1row_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1expand_1row_FUNC);
rc = (jboolean)gtk_tree_view_expand_row((GtkTreeView *)arg0, (GtkTreePath *)arg1, (gboolean)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1expand_1row_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1expand_1row_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1background_1area
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1background_1area)
+#ifndef NO_gtk_1tree_1view_1get_1background_1area
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1background_1area)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3)
{
GdkRectangle _arg3, *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1background_1area_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1background_1area_FUNC);
if (arg3) if ((lparg3 = getGdkRectangleFields(env, arg3, &_arg3)) == NULL) goto fail;
gtk_tree_view_get_background_area((GtkTreeView *)arg0, (GtkTreePath *)arg1, (GtkTreeViewColumn *)arg2, (GdkRectangle *)lparg3);
fail:
if (arg3 && lparg3) setGdkRectangleFields(env, arg3, lparg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1background_1area_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1tree_1view_1get_1bin_1window
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1bin_1window)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1bin_1window_FUNC);
- rc = (jlong)gtk_tree_view_get_bin_window((GtkTreeView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1bin_1window_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1background_1area_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1cell_1area
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1cell_1area)
+#ifndef NO_gtk_1tree_1view_1get_1cell_1area
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1cell_1area)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jobject arg3)
{
GdkRectangle _arg3, *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1cell_1area_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1cell_1area_FUNC);
if (arg3) if ((lparg3 = &_arg3) == NULL) goto fail;
gtk_tree_view_get_cell_area((GtkTreeView *)arg0, (GtkTreePath *)arg1, (GtkTreeViewColumn *)arg2, (GdkRectangle *)lparg3);
fail:
if (arg3 && lparg3) setGdkRectangleFields(env, arg3, lparg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1cell_1area_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1cell_1area_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1column
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1column)
+#ifndef NO_gtk_1tree_1view_1get_1column
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1column)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1column_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1column_FUNC);
rc = (jlong)gtk_tree_view_get_column((GtkTreeView *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1column_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1column_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1columns
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1columns)
+#ifndef NO_gtk_1tree_1view_1get_1columns
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1columns)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1columns_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1columns_FUNC);
rc = (jlong)gtk_tree_view_get_columns((GtkTreeView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1columns_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1columns_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1cursor
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1cursor)
+#ifndef NO_gtk_1tree_1view_1get_1cursor
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1cursor)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jlongArray arg2)
{
jlong *lparg1=NULL;
jlong *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1cursor_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1cursor_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_tree_view_get_cursor((GtkTreeView *)arg0, (GtkTreePath **)lparg1, (GtkTreeViewColumn **)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1cursor_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1cursor_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1expander_1column
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1expander_1column)
+#ifndef NO_gtk_1tree_1view_1get_1expander_1column
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1expander_1column)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1expander_1column_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1expander_1column_FUNC);
rc = (jlong)gtk_tree_view_get_expander_column((GtkTreeView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1expander_1column_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1expander_1column_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1grid_1lines
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1grid_1lines)
+#ifndef NO_gtk_1tree_1view_1get_1grid_1lines
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1grid_1lines)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1grid_1lines_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1grid_1lines_FUNC);
rc = (jint)gtk_tree_view_get_grid_lines((GtkTreeView*)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1grid_1lines_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1grid_1lines_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1headers_1visible
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1headers_1visible)
+#ifndef NO_gtk_1tree_1view_1get_1headers_1visible
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1headers_1visible)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1headers_1visible_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1headers_1visible_FUNC);
rc = (jboolean)gtk_tree_view_get_headers_visible((GtkTreeView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1headers_1visible_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1headers_1visible_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1path_1at_1pos
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1path_1at_1pos)
+#ifndef NO_gtk_1tree_1view_1get_1path_1at_1pos
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1path_1at_1pos)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jlongArray arg3, jlongArray arg4, jintArray arg5, jintArray arg6)
{
jlong *lparg3=NULL;
@@ -11553,7 +8982,7 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1path_1at_1pos)
jint *lparg5=NULL;
jint *lparg6=NULL;
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1path_1at_1pos_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1path_1at_1pos_FUNC);
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
@@ -11564,253 +8993,225 @@ fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1path_1at_1pos_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1path_1at_1pos_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1selection
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1selection)
+#ifndef NO_gtk_1tree_1view_1get_1selection
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1selection)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1selection_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1selection_FUNC);
rc = (jlong)gtk_tree_view_get_selection((GtkTreeView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1selection_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1selection_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1get_1visible_1rect
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1get_1visible_1rect)
+#ifndef NO_gtk_1tree_1view_1get_1visible_1rect
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1get_1visible_1rect)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1get_1visible_1rect_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1get_1visible_1rect_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
gtk_tree_view_get_visible_rect((GtkTreeView *)arg0, lparg1);
fail:
if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1get_1visible_1rect_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1get_1visible_1rect_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1insert_1column
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1tree_1view_1insert_1column)
+#ifndef NO_gtk_1tree_1view_1insert_1column
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1tree_1view_1insert_1column)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1insert_1column_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1insert_1column_FUNC);
rc = (jint)gtk_tree_view_insert_column((GtkTreeView *)arg0, (GtkTreeViewColumn *)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1insert_1column_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1insert_1column_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1move_1column_1after
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1move_1column_1after)
+#ifndef NO_gtk_1tree_1view_1move_1column_1after
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1move_1column_1after)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1move_1column_1after_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1move_1column_1after_FUNC);
gtk_tree_view_move_column_after((GtkTreeView *)arg0, (GtkTreeViewColumn *)arg1, (GtkTreeViewColumn *)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1move_1column_1after_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1move_1column_1after_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1new_1with_1model
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1tree_1view_1new_1with_1model)
+#ifndef NO_gtk_1tree_1view_1new_1with_1model
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1tree_1view_1new_1with_1model)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1new_1with_1model_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1new_1with_1model_FUNC);
rc = (jlong)gtk_tree_view_new_with_model((GtkTreeModel *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1new_1with_1model_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1new_1with_1model_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1remove_1column
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1remove_1column)
+#ifndef NO_gtk_1tree_1view_1remove_1column
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1remove_1column)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1remove_1column_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1remove_1column_FUNC);
gtk_tree_view_remove_column((GtkTreeView *)arg0, (GtkTreeViewColumn *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1remove_1column_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1remove_1column_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1row_1expanded
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1tree_1view_1row_1expanded)
+#ifndef NO_gtk_1tree_1view_1row_1expanded
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1tree_1view_1row_1expanded)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1row_1expanded_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1row_1expanded_FUNC);
rc = (jboolean)gtk_tree_view_row_expanded((GtkTreeView *)arg0, (GtkTreePath *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1row_1expanded_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1row_1expanded_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1tree_1view_1scroll_1to_1cell
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1scroll_1to_1cell)
+#ifndef NO_gtk_1tree_1view_1scroll_1to_1cell
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1scroll_1to_1cell)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3, jfloat arg4, jfloat arg5)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1scroll_1to_1cell_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1scroll_1to_1cell_FUNC);
gtk_tree_view_scroll_to_cell((GtkTreeView *)arg0, (GtkTreePath *)arg1, (GtkTreeViewColumn *)arg2, (gboolean)arg3, (gfloat)arg4, (gfloat)arg5);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1scroll_1to_1cell_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1scroll_1to_1cell_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1scroll_1to_1point
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1scroll_1to_1point)
+#ifndef NO_gtk_1tree_1view_1scroll_1to_1point
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1scroll_1to_1point)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1scroll_1to_1point_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1scroll_1to_1point_FUNC);
gtk_tree_view_scroll_to_point((GtkTreeView *)arg0, (gint)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1scroll_1to_1point_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1scroll_1to_1point_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1set_1cursor
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1set_1cursor)
+#ifndef NO_gtk_1tree_1view_1set_1cursor
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1set_1cursor)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1cursor_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1set_1cursor_FUNC);
gtk_tree_view_set_cursor((GtkTreeView *)arg0, (GtkTreePath *)arg1, (GtkTreeViewColumn *)arg2, arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1cursor_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1set_1cursor_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1set_1drag_1dest_1row
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1set_1drag_1dest_1row)
+#ifndef NO_gtk_1tree_1view_1set_1drag_1dest_1row
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1set_1drag_1dest_1row)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1drag_1dest_1row_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1set_1drag_1dest_1row_FUNC);
gtk_tree_view_set_drag_dest_row((GtkTreeView *)arg0, (GtkTreePath *)arg1, arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1drag_1dest_1row_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1set_1drag_1dest_1row_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1set_1grid_1lines
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1set_1grid_1lines)
+#ifndef NO_gtk_1tree_1view_1set_1grid_1lines
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1set_1grid_1lines)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1grid_1lines_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1set_1grid_1lines_FUNC);
gtk_tree_view_set_grid_lines((GtkTreeView*)arg0, (GtkTreeViewGridLines)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1grid_1lines_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1set_1grid_1lines_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1set_1headers_1visible
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1set_1headers_1visible)
+#ifndef NO_gtk_1tree_1view_1set_1headers_1visible
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1set_1headers_1visible)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1headers_1visible_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1set_1headers_1visible_FUNC);
gtk_tree_view_set_headers_visible((GtkTreeView *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1headers_1visible_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1set_1headers_1visible_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1set_1model
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1set_1model)
+#ifndef NO_gtk_1tree_1view_1set_1model
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1set_1model)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1model_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1set_1model_FUNC);
gtk_tree_view_set_model((GtkTreeView *)arg0, (GtkTreeModel *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1model_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1set_1model_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1set_1search_1column
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1set_1search_1column)
+#ifndef NO_gtk_1tree_1view_1set_1search_1column
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1tree_1view_1set_1search_1column)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1set_1search_1column_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1tree_1view_1set_1search_1column_FUNC);
gtk_tree_view_set_search_column((GtkTreeView *)arg0, (gint)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1set_1search_1column_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1tree_1view_1set_1search_1column_FUNC);
}
#endif
-#ifndef NO__1gtk_1tree_1view_1unset_1rows_1drag_1dest
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1unset_1rows_1drag_1dest)
+#ifndef NO_gtk_1widget_1activate
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1activate)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1unset_1rows_1drag_1dest_FUNC);
- gtk_tree_view_unset_rows_drag_dest((GtkTreeView *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1unset_1rows_1drag_1dest_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1viewport_1set_1shadow_1type
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1viewport_1set_1shadow_1type)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1viewport_1set_1shadow_1type_FUNC);
- gtk_viewport_set_shadow_type((GtkViewport *)arg0, (GtkShadowType)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1viewport_1set_1shadow_1type_FUNC);
+ jboolean rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1activate_FUNC);
+ rc = (jboolean)gtk_widget_activate((GtkWidget *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1activate_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1add_1accelerator
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1add_1accelerator)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jint arg3, jint arg4, jint arg5)
+#ifndef NO_gtk_1widget_1add_1css_1class
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1add_1css_1class)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1add_1accelerator_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1add_1css_1class_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_widget_add_accelerator((GtkWidget *)arg0, (const gchar *)lparg1, (GtkAccelGroup *)arg2, (guint)arg3, (GdkModifierType)arg4, arg5);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1add_1accelerator_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1add_1controller
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1add_1controller)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1add_1controller_FUNC);
- gtk_widget_add_controller((GtkWidget *)arg0, (GtkEventController *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1add_1controller_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1add_1events
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1add_1events)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1add_1events_FUNC);
/*
- gtk_widget_add_events((GtkWidget *)arg0, (gint)arg1);
+ gtk_widget_add_css_class((GtkWidget *)arg0, (const char *)lparg1);
*/
{
- GTK_LOAD_FUNCTION(fp, gtk_widget_add_events)
+ GTK_LOAD_FUNCTION(fp, gtk_widget_add_css_class)
if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, gint))fp)((GtkWidget *)arg0, (gint)arg1);
+ ((void (CALLING_CONVENTION*)(GtkWidget *, const char *))fp)((GtkWidget *)arg0, (const char *)lparg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1add_1events_FUNC);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1add_1css_1class_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1child_1focus
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1child_1focus)
+#ifndef NO_gtk_1widget_1child_1focus
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1child_1focus)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1child_1focus_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1child_1focus_FUNC);
rc = (jboolean)gtk_widget_child_focus((GtkWidget *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1child_1focus_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1child_1focus_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1class_1get_1css_1name
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1class_1get_1css_1name)
+#ifndef NO_gtk_1widget_1class_1get_1css_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1class_1get_1css_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1class_1get_1css_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1class_1get_1css_1name_FUNC);
/*
rc = (jlong)gtk_widget_class_get_css_name((GtkWidgetClass *)arg0);
*/
@@ -11820,225 +9221,83 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1class_1get_1css_1name)
rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidgetClass *))fp)((GtkWidgetClass *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1class_1get_1css_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1class_1get_1css_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1create_1pango_1layout__JJ
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1create_1pango_1layout__JJ)
+#ifndef NO_gtk_1widget_1create_1pango_1layout__JJ
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1create_1pango_1layout__JJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1create_1pango_1layout__JJ_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1create_1pango_1layout__JJ_FUNC);
rc = (jlong)gtk_widget_create_pango_layout((GtkWidget *)arg0, (const gchar *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1create_1pango_1layout__JJ_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1create_1pango_1layout__JJ_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1create_1pango_1layout__J_3B
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1create_1pango_1layout__J_3B)
+#ifndef NO_gtk_1widget_1create_1pango_1layout__J_3B
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1create_1pango_1layout__J_3B)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1create_1pango_1layout__J_3B_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1create_1pango_1layout__J_3B_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)gtk_widget_create_pango_layout((GtkWidget *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1create_1pango_1layout__J_3B_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1destroy
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1destroy)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1destroy_FUNC);
- gtk_widget_destroy((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1destroy_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1draw
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1draw)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1draw_FUNC);
-/*
- gtk_widget_draw((GtkWidget *)arg0, (cairo_t *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_draw)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, cairo_t *))fp)((GtkWidget *)arg0, (cairo_t *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1draw_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1event
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1event)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1event_FUNC);
- rc = (jboolean)gtk_widget_event((GtkWidget *)arg0, (GdkEvent *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1event_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1accessible
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1accessible)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1accessible_FUNC);
- rc = (jlong)gtk_widget_get_accessible((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1accessible_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1create_1pango_1layout__J_3B_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1allocation
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1get_1allocation)
+#ifndef NO_gtk_1widget_1get_1allocation
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1get_1allocation)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GtkAllocation _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1allocation_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1allocation_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
gtk_widget_get_allocation((GtkWidget *)arg0, (GtkAllocation *)lparg1);
fail:
if (arg1 && lparg1) setGtkAllocationFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1allocation_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1can_1default
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1can_1default)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1can_1default_FUNC);
- rc = (jboolean)gtk_widget_get_can_default((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1can_1default_FUNC);
- return rc;
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1allocation_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1get_1child_1visible
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1child_1visible)
+#ifndef NO_gtk_1widget_1get_1child_1visible
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1get_1child_1visible)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1child_1visible_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1child_1visible_FUNC);
rc = (jboolean)gtk_widget_get_child_visible((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1child_1visible_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1child_1visible_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1clip
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1get_1clip)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GtkAllocation _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1clip_FUNC);
- if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
-/*
- gtk_widget_get_clip((GtkWidget *)arg0, lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_clip)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, GtkAllocation *))fp)((GtkWidget *)arg0, lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) setGtkAllocationFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1clip_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1events
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1events)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1events_FUNC);
-/*
- rc = (jint)gtk_widget_get_events((GtkWidget *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_events)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1events_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1first_1child
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1first_1child)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1first_1child_FUNC);
- rc = (jlong)gtk_widget_get_first_child((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1first_1child_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1has_1surface
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1has_1surface)
+#ifndef NO_gtk_1widget_1get_1mapped
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1get_1mapped)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1has_1surface_FUNC);
- rc = (jboolean)gtk_widget_get_has_surface((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1has_1surface_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1has_1window
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1has_1window)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1has_1window_FUNC);
- rc = (jboolean)gtk_widget_get_has_window((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1has_1window_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1mapped
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1mapped)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1mapped_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1mapped_FUNC);
rc = (jboolean)gtk_widget_get_mapped((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1mapped_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1mapped_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1margin_1bottom
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1bottom)
+#ifndef NO_gtk_1widget_1get_1margin_1bottom
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1widget_1get_1margin_1bottom)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1margin_1bottom_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1margin_1bottom_FUNC);
/*
rc = (jint)gtk_widget_get_margin_bottom((GtkWidget *)arg0);
*/
@@ -12048,17 +9307,17 @@ JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1bottom)
rc = (jint)((jint (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1margin_1bottom_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1margin_1bottom_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1margin_1end
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1end)
+#ifndef NO_gtk_1widget_1get_1margin_1end
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1widget_1get_1margin_1end)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1margin_1end_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1margin_1end_FUNC);
/*
rc = (jint)gtk_widget_get_margin_end((GtkWidget *)arg0);
*/
@@ -12068,17 +9327,17 @@ JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1end)
rc = (jint)((jint (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1margin_1end_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1margin_1end_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1margin_1start
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1start)
+#ifndef NO_gtk_1widget_1get_1margin_1start
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1widget_1get_1margin_1start)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1margin_1start_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1margin_1start_FUNC);
/*
rc = (jint)gtk_widget_get_margin_start((GtkWidget *)arg0);
*/
@@ -12088,17 +9347,17 @@ JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1start)
rc = (jint)((jint (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1margin_1start_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1margin_1start_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1margin_1top
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1top)
+#ifndef NO_gtk_1widget_1get_1margin_1top
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1widget_1get_1margin_1top)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1margin_1top_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1margin_1top_FUNC);
/*
rc = (jint)gtk_widget_get_margin_top((GtkWidget *)arg0);
*/
@@ -12108,41 +9367,29 @@ JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1margin_1top)
rc = (jint)((jint (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1margin_1top_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1margin_1top_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1name
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1name)
+#ifndef NO_gtk_1widget_1get_1name
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1name_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1name_FUNC);
rc = (jlong)gtk_widget_get_name((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1next_1sibling
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1next_1sibling)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1next_1sibling_FUNC);
- rc = (jlong)gtk_widget_get_next_sibling((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1next_1sibling_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1opacity
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1widget_1get_1opacity)
+#ifndef NO_gtk_1widget_1get_1opacity
+JNIEXPORT jdouble JNICALL GTK_NATIVE(gtk_1widget_1get_1opacity)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1opacity_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1opacity_FUNC);
/*
rc = (jdouble)gtk_widget_get_opacity((GtkWidget *)arg0);
*/
@@ -12152,41 +9399,41 @@ JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1widget_1get_1opacity)
rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1opacity_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1opacity_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1pango_1context
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1pango_1context)
+#ifndef NO_gtk_1widget_1get_1pango_1context
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1pango_1context)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1pango_1context_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1pango_1context_FUNC);
rc = (jlong)gtk_widget_get_pango_context((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1pango_1context_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1pango_1context_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1parent
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1parent)
+#ifndef NO_gtk_1widget_1get_1parent
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1parent)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1parent_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1parent_FUNC);
rc = (jlong)gtk_widget_get_parent((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1parent_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1parent_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1parent_1surface
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1parent_1surface)
+#ifndef NO_gtk_1widget_1get_1parent_1surface
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1parent_1surface)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1parent_1surface_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1parent_1surface_FUNC);
/*
rc = (jlong)gtk_widget_get_parent_surface((GtkWidget *)arg0);
*/
@@ -12196,17 +9443,17 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1parent_1surface)
rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1parent_1surface_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1parent_1surface_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1parent_1window
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1parent_1window)
+#ifndef NO_gtk_1widget_1get_1parent_1window
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1parent_1window)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1parent_1window_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1parent_1window_FUNC);
/*
rc = (jlong)gtk_widget_get_parent_window((GtkWidget *)arg0);
*/
@@ -12216,603 +9463,276 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1parent_1window)
rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1parent_1window_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1parent_1window_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1preferred_1height
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1get_1preferred_1height)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1preferred_1height_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
-/*
- gtk_widget_get_preferred_height((GtkWidget *)arg0, (gint *)lparg1, (gint *)lparg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_preferred_height)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, gint *, gint *))fp)((GtkWidget *)arg0, (gint *)lparg1, (gint *)lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1preferred_1height_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1preferred_1height_1for_1width
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1get_1preferred_1height_1for_1width)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jintArray arg3)
-{
- jint *lparg2=NULL;
- jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1preferred_1height_1for_1width_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
-/*
- gtk_widget_get_preferred_height_for_width((GtkWidget *)arg0, (gint)arg1, (gint *)lparg2, (gint *)lparg3);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_preferred_height_for_width)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, gint, gint *, gint *))fp)((GtkWidget *)arg0, (gint)arg1, (gint *)lparg2, (gint *)lparg3);
- }
- }
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1preferred_1height_1for_1width_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1preferred_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1get_1preferred_1size)
+#ifndef NO_gtk_1widget_1get_1preferred_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1get_1preferred_1size)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jobject arg2)
{
GtkRequisition _arg1, *lparg1=NULL;
GtkRequisition _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1preferred_1size_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1preferred_1size_FUNC);
if (arg1) if ((lparg1 = getGtkRequisitionFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg2) if ((lparg2 = getGtkRequisitionFields(env, arg2, &_arg2)) == NULL) goto fail;
gtk_widget_get_preferred_size((GtkWidget *)arg0, (GtkRequisition *)lparg1, (GtkRequisition *)lparg2);
fail:
if (arg2 && lparg2) setGtkRequisitionFields(env, arg2, lparg2);
if (arg1 && lparg1) setGtkRequisitionFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1preferred_1size_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1preferred_1width_1for_1height
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1get_1preferred_1width_1for_1height)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jintArray arg3)
-{
- jint *lparg2=NULL;
- jint *lparg3=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1preferred_1width_1for_1height_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
-/*
- gtk_widget_get_preferred_width_for_height((GtkWidget *)arg0, (gint)arg1, (gint *)lparg2, (gint *)lparg3);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_preferred_width_for_height)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, gint, gint *, gint *))fp)((GtkWidget *)arg0, (gint)arg1, (gint *)lparg2, (gint *)lparg3);
- }
- }
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1preferred_1width_1for_1height_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1preferred_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1get_1realized
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1realized)
+#ifndef NO_gtk_1widget_1get_1realized
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1get_1realized)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1realized_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1realized_FUNC);
rc = (jboolean)gtk_widget_get_realized((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1realized_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1realized_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1screen
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1screen)
+#ifndef NO_gtk_1widget_1get_1scale_1factor
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1widget_1get_1scale_1factor)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1screen_FUNC);
- rc = (jlong)gtk_widget_get_screen((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1screen_FUNC);
+ jint rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1scale_1factor_FUNC);
+ rc = (jint)gtk_widget_get_scale_factor((GtkWidget *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1scale_1factor_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1sensitive
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1sensitive)
+#ifndef NO_gtk_1widget_1get_1sensitive
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1get_1sensitive)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1sensitive_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1sensitive_FUNC);
rc = (jboolean)gtk_widget_get_sensitive((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1sensitive_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1sensitive_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1size_1request
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1get_1size_1request)
+#ifndef NO_gtk_1widget_1get_1size_1request
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1get_1size_1request)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1size_1request_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1size_1request_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
gtk_widget_get_size_request((GtkWidget *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1size_1request_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1size_1request_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1get_1state_1flags
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1widget_1get_1state_1flags)
+#ifndef NO_gtk_1widget_1get_1state_1flags
+JNIEXPORT jint JNICALL GTK_NATIVE(gtk_1widget_1get_1state_1flags)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1state_1flags_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1state_1flags_FUNC);
rc = (jint)gtk_widget_get_state_flags((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1state_1flags_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1state_1flags_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1style_1context
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1style_1context)
+#ifndef NO_gtk_1widget_1get_1style_1context
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1style_1context)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1style_1context_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1style_1context_FUNC);
rc = (jlong)gtk_widget_get_style_context((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1style_1context_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1style_1context_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1surface
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1surface)
+#ifndef NO_gtk_1widget_1get_1tooltip_1text
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1tooltip_1text)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1surface_FUNC);
-/*
- rc = (jlong)gtk_widget_get_surface((GtkWidget *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_surface)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1surface_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1tooltip_1text
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1tooltip_1text)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1tooltip_1text_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1tooltip_1text_FUNC);
rc = (jlong)gtk_widget_get_tooltip_text((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1tooltip_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1tooltip_1text_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1get_1toplevel
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1toplevel)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1toplevel_FUNC);
- rc = (jlong)gtk_widget_get_toplevel((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1toplevel_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1visible
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1get_1visible)
+#ifndef NO_gtk_1widget_1get_1visible
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1get_1visible)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1visible_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1visible_FUNC);
rc = (jboolean)gtk_widget_get_visible((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1visible_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1get_1window
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1widget_1get_1window)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1window_FUNC);
-/*
- rc = (jlong)gtk_widget_get_window((GtkWidget *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_get_window)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1window_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1visible_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1grab_1focus
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1grab_1focus)
+#ifndef NO_gtk_1widget_1grab_1focus
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1grab_1focus)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1grab_1focus_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1grab_1focus_FUNC);
gtk_widget_grab_focus((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1grab_1focus_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1grab_1focus_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1has_1default
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1has_1default)
+#ifndef NO_gtk_1widget_1has_1default
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1has_1default)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1has_1default_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1has_1default_FUNC);
rc = (jboolean)gtk_widget_has_default((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1has_1default_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1has_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1has_1focus
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1has_1focus)
+#ifndef NO_gtk_1widget_1has_1focus
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1has_1focus)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1has_1focus_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1has_1focus_FUNC);
rc = (jboolean)gtk_widget_has_focus((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1has_1focus_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1has_1focus_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1hide
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1hide)
+#ifndef NO_gtk_1widget_1hide
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1hide)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1hide_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1hide_FUNC);
gtk_widget_hide((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1hide_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1hide_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1input_1shape_1combine_1region
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1input_1shape_1combine_1region)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gtk_1widget_1insert_1action_1group
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1insert_1action_1group)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1input_1shape_1combine_1region_FUNC);
- gtk_widget_input_shape_combine_region((GtkWidget *)arg0, (cairo_region_t *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1input_1shape_1combine_1region_FUNC);
+ jbyte *lparg1=NULL;
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1insert_1action_1group_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ gtk_widget_insert_action_group((GtkWidget *)arg0, (const char *)lparg1, (GActionGroup *)arg2);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1insert_1action_1group_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1is_1focus
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1is_1focus)
+#ifndef NO_gtk_1widget_1is_1focus
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1is_1focus)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1is_1focus_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1is_1focus_FUNC);
rc = (jboolean)gtk_widget_is_focus((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1is_1focus_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1is_1focus_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1map
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1map)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1map_FUNC);
- gtk_widget_map((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1map_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1measure
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1measure)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5, jintArray arg6)
-{
- jint *lparg3=NULL;
- jint *lparg4=NULL;
- jint *lparg5=NULL;
- jint *lparg6=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1measure_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- gtk_widget_measure((GtkWidget *)arg0, (GtkOrientation)arg1, (int)arg2, (int *)lparg3, (int *)lparg4, (int *)lparg5, (int *)lparg6);
-fail:
- if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1measure_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1mnemonic_1activate
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1mnemonic_1activate)
+#ifndef NO_gtk_1widget_1mnemonic_1activate
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1mnemonic_1activate)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1mnemonic_1activate_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1mnemonic_1activate_FUNC);
rc = (jboolean)gtk_widget_mnemonic_activate((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1mnemonic_1activate_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1mnemonic_1activate_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1widget_1override_1background_1color
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1override_1background_1color)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
-{
- GdkRGBA _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1background_1color_FUNC);
- if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
-/*
- gtk_widget_override_background_color(arg0, arg1, lparg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_override_background_color)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1background_1color_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1override_1color
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1override_1color)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
-{
- GdkRGBA _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1color_FUNC);
- if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
-/*
- gtk_widget_override_color(arg0, arg1, lparg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_override_color)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1color_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1override_1font
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1override_1font)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1font_FUNC);
-/*
- gtk_widget_override_font(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_override_font)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1font_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1queue_1draw
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1queue_1draw)
+#ifndef NO_gtk_1widget_1queue_1draw
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1queue_1draw)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1queue_1draw_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1queue_1draw_FUNC);
gtk_widget_queue_draw((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1queue_1draw_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1queue_1draw_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1queue_1resize
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1queue_1resize)
+#ifndef NO_gtk_1widget_1queue_1resize
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1queue_1resize)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1queue_1resize_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1queue_1resize_FUNC);
gtk_widget_queue_resize((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1queue_1resize_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1queue_1resize_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1realize
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1realize)
+#ifndef NO_gtk_1widget_1realize
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1realize)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1realize_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1realize_FUNC);
gtk_widget_realize((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1realize_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1remove_1accelerator
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1remove_1accelerator)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1remove_1accelerator_FUNC);
- gtk_widget_remove_accelerator((GtkWidget *)arg0, (GtkAccelGroup *)arg1, (guint)arg2, (GdkModifierType)arg3);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1remove_1accelerator_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1reparent
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1reparent)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1reparent_FUNC);
-/*
- gtk_widget_reparent((GtkWidget *)arg0, (GtkWidget *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_reparent)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, GtkWidget *))fp)((GtkWidget *)arg0, (GtkWidget *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1reparent_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1allocation
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1allocation)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GtkAllocation _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1allocation_FUNC);
- if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
-/*
- gtk_widget_set_allocation((GtkWidget *)arg0, (GtkAllocation *)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_set_allocation)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, GtkAllocation *))fp)((GtkWidget *)arg0, (GtkAllocation *)lparg1);
- }
- }
-fail:
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1allocation_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1can_1default
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1can_1default)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1can_1default_FUNC);
- gtk_widget_set_can_default((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1can_1default_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1realize_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1can_1focus
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1can_1focus)
+#ifndef NO_gtk_1widget_1set_1can_1focus
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1can_1focus)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1can_1focus_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1can_1focus_FUNC);
gtk_widget_set_can_focus((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1can_1focus_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1clip
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1clip)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GtkAllocation _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1clip_FUNC);
- if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
-/*
- gtk_widget_set_clip((GtkWidget *)arg0, lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_set_clip)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, GtkAllocation *))fp)((GtkWidget *)arg0, lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) setGtkAllocationFields(env, arg1, lparg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1clip_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1can_1focus_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1cursor
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1cursor)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1cursor_FUNC);
- gtk_widget_set_cursor((GtkWidget *)arg0, (GdkCursor *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1cursor_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1default_1direction
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1default_1direction)
+#ifndef NO_gtk_1widget_1set_1default_1direction
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1default_1direction)
(JNIEnv *env, jclass that, jint arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1default_1direction_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1default_1direction_FUNC);
gtk_widget_set_default_direction((GtkTextDirection)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1default_1direction_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1default_1direction_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1direction
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1direction)
+#ifndef NO_gtk_1widget_1set_1direction
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1direction)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1direction_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1direction_FUNC);
gtk_widget_set_direction((GtkWidget *)arg0, (GtkTextDirection)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1direction_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1direction_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1double_1buffered
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1double_1buffered)
+#ifndef NO_gtk_1widget_1set_1focus_1on_1click
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1focus_1on_1click)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1double_1buffered_FUNC);
-/*
- gtk_widget_set_double_buffered((GtkWidget *)arg0, (gboolean)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_set_double_buffered)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, gboolean))fp)((GtkWidget *)arg0, (gboolean)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1double_1buffered_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1focus_1on_1click
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1focus_1on_1click)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1focus_1on_1click_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1focus_1on_1click_FUNC);
/*
gtk_widget_set_focus_on_click((GtkWidget *)arg0, (gboolean)arg1);
*/
@@ -12822,55 +9742,35 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1focus_1on_1click)
((void (CALLING_CONVENTION*)(GtkWidget *, gboolean))fp)((GtkWidget *)arg0, (gboolean)arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1focus_1on_1click_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1focus_1on_1click_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1halign
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1halign)
+#ifndef NO_gtk_1widget_1set_1halign
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1halign)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1halign_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1halign_FUNC);
gtk_widget_set_halign((GtkWidget *)arg0, (GtkAlign)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1halign_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1halign_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1has_1surface
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1has_1surface)
+#ifndef NO_gtk_1widget_1set_1hexpand
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1hexpand)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1has_1surface_FUNC);
- gtk_widget_set_has_surface((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1has_1surface_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1has_1window
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1has_1window)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1has_1window_FUNC);
- gtk_widget_set_has_window((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1has_1window_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1hexpand
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1hexpand)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1hexpand_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1hexpand_FUNC);
gtk_widget_set_hexpand((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1hexpand_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1hexpand_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1margin_1bottom
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1bottom)
+#ifndef NO_gtk_1widget_1set_1margin_1bottom
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1margin_1bottom)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1margin_1bottom_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1margin_1bottom_FUNC);
/*
gtk_widget_set_margin_bottom((GtkWidget *)arg0, (gint)arg1);
*/
@@ -12880,15 +9780,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1bottom)
((void (CALLING_CONVENTION*)(GtkWidget *, gint))fp)((GtkWidget *)arg0, (gint)arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1margin_1bottom_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1margin_1bottom_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1margin_1end
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1end)
+#ifndef NO_gtk_1widget_1set_1margin_1end
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1margin_1end)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1margin_1end_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1margin_1end_FUNC);
/*
gtk_widget_set_margin_end((GtkWidget *)arg0, (gint)arg1);
*/
@@ -12898,15 +9798,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1end)
((void (CALLING_CONVENTION*)(GtkWidget *, gint))fp)((GtkWidget *)arg0, (gint)arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1margin_1end_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1margin_1end_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1margin_1start
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1start)
+#ifndef NO_gtk_1widget_1set_1margin_1start
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1margin_1start)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1margin_1start_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1margin_1start_FUNC);
/*
gtk_widget_set_margin_start((GtkWidget *)arg0, (gint)arg1);
*/
@@ -12916,15 +9816,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1start)
((void (CALLING_CONVENTION*)(GtkWidget *, gint))fp)((GtkWidget *)arg0, (gint)arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1margin_1start_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1margin_1start_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1margin_1top
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1top)
+#ifndef NO_gtk_1widget_1set_1margin_1top
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1margin_1top)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1margin_1top_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1margin_1top_FUNC);
/*
gtk_widget_set_margin_top((GtkWidget *)arg0, (gint)arg1);
*/
@@ -12934,29 +9834,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1margin_1top)
((void (CALLING_CONVENTION*)(GtkWidget *, gint))fp)((GtkWidget *)arg0, (gint)arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1margin_1top_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1name
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1name)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1name_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- gtk_widget_set_name((GtkWidget *)arg0, (const char *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1name_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1margin_1top_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1opacity
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1opacity)
+#ifndef NO_gtk_1widget_1set_1opacity
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1opacity)
(JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1opacity_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1opacity_FUNC);
/*
gtk_widget_set_opacity((GtkWidget *)arg0, arg1);
*/
@@ -12966,663 +9852,354 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1opacity)
((void (CALLING_CONVENTION*)(GtkWidget *, jdouble))fp)((GtkWidget *)arg0, arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1opacity_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1parent_1surface
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1parent_1surface)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1parent_1surface_FUNC);
- gtk_widget_set_parent_surface((GtkWidget *)arg0, (GdkSurface *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1parent_1surface_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1opacity_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1parent_1window
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1parent_1window)
+#ifndef NO_gtk_1widget_1set_1parent
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1parent)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1parent_1window_FUNC);
- gtk_widget_set_parent_window((GtkWidget *)arg0, (GdkWindow *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1parent_1window_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1receives_1default
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1receives_1default)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1receives_1default_FUNC);
- gtk_widget_set_receives_default((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1receives_1default_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1set_1redraw_1on_1allocate
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1redraw_1on_1allocate)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1redraw_1on_1allocate_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1parent_FUNC);
/*
- gtk_widget_set_redraw_on_allocate((GtkWidget *)arg0, (gboolean)arg1);
+ gtk_widget_set_parent((GtkWidget *)arg0, (GtkWidget *)arg1);
*/
{
- GTK_LOAD_FUNCTION(fp, gtk_widget_set_redraw_on_allocate)
+ GTK_LOAD_FUNCTION(fp, gtk_widget_set_parent)
if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, gboolean))fp)((GtkWidget *)arg0, (gboolean)arg1);
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GtkWidget *))fp)((GtkWidget *)arg0, (GtkWidget *)arg1);
}
}
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1redraw_1on_1allocate_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1parent_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1widget_1set_1receives_1default
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1receives_1default)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1receives_1default_FUNC);
+ gtk_widget_set_receives_default((GtkWidget *)arg0, (gboolean)arg1);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1receives_1default_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1sensitive
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1sensitive)
+#ifndef NO_gtk_1widget_1set_1sensitive
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1sensitive)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1sensitive_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1sensitive_FUNC);
gtk_widget_set_sensitive((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1sensitive_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1sensitive_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1size_1request
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1size_1request)
+#ifndef NO_gtk_1widget_1set_1size_1request
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1size_1request)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1size_1request_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1size_1request_FUNC);
gtk_widget_set_size_request((GtkWidget *)arg0, (gint)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1size_1request_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1size_1request_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1tooltip_1text
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1tooltip_1text)
+#ifndef NO_gtk_1widget_1set_1tooltip_1text
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1tooltip_1text)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1tooltip_1text_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1tooltip_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_widget_set_tooltip_text((GtkWidget *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1tooltip_1text_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1tooltip_1text_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1valign
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1valign)
+#ifndef NO_gtk_1widget_1set_1valign
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1valign)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1valign_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1valign_FUNC);
gtk_widget_set_valign((GtkWidget *)arg0, (GtkAlign)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1valign_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1valign_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1vexpand
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1vexpand)
+#ifndef NO_gtk_1widget_1set_1vexpand
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1vexpand)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1vexpand_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1vexpand_FUNC);
gtk_widget_set_vexpand((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1vexpand_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1vexpand_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1set_1visible
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1visible)
+#ifndef NO_gtk_1widget_1set_1visible
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1visible)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1visible_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1visible_FUNC);
gtk_widget_set_visible((GtkWidget *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1visible_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1visible_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1shape_1combine_1region
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1shape_1combine_1region)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1shape_1combine_1region_FUNC);
-/*
- gtk_widget_shape_combine_region((GtkWidget *)arg0, (cairo_region_t *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_shape_combine_region)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, cairo_region_t *))fp)((GtkWidget *)arg0, (cairo_region_t *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1shape_1combine_1region_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1show
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1show)
+#ifndef NO_gtk_1widget_1show
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1show)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1show_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1show_FUNC);
gtk_widget_show((GtkWidget *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1show_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1show_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- GtkAllocation _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2_FUNC);
- if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
-/*
- gtk_widget_size_allocate((GtkWidget *)arg0, (GtkAllocation *)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_size_allocate)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, GtkAllocation *))fp)((GtkWidget *)arg0, (GtkAllocation *)lparg1);
- }
- }
-fail:
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2I
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2I)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
+#ifndef NO_gtk_1widget_1unparent
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1unparent)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- GtkAllocation _arg1, *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2I_FUNC);
- if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
-/*
- gtk_widget_size_allocate((GtkWidget *)arg0, (GtkAllocation *)lparg1, arg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_size_allocate)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *, GtkAllocation *, jint))fp)((GtkWidget *)arg0, (GtkAllocation *)lparg1, arg2);
- }
- }
-fail:
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2I_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1widget_1unparent_FUNC);
+ gtk_widget_unparent((GtkWidget *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1widget_1unparent_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1snapshot_1child
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1snapshot_1child)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+#ifndef NO_gtk_1window_1fullscreen
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1fullscreen)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1snapshot_1child_FUNC);
- gtk_widget_snapshot_child((GtkWidget *)arg0, (GtkWidget *)arg1, (GtkSnapshot *)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1snapshot_1child_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1fullscreen_FUNC);
+ gtk_window_fullscreen((GtkWindow *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1fullscreen_FUNC);
}
#endif
-#ifndef NO__1gtk_1widget_1style_1get__J_3B_3IJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1style_1get__J_3B_3IJ)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jintArray arg2, jlong arg3)
+#ifndef NO_gtk_1window_1get_1default_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1get_1default_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
- jbyte *lparg1=NULL;
+ jint *lparg1=NULL;
jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1style_1get__J_3B_3IJ_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1get_1default_1size_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- gtk_widget_style_get((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+ gtk_window_get_default_size((GtkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1style_1get__J_3B_3IJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1style_1get__J_3B_3JJ
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1style_1get__J_3B_3JJ)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlongArray arg2, jlong arg3)
-{
- jbyte *lparg1=NULL;
- jlong *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1style_1get__J_3B_3JJ_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- gtk_widget_style_get((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1style_1get__J_3B_3JJ_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1widget_1translate_1coordinates
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1widget_1translate_1coordinates)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5)
-{
- jint *lparg4=NULL;
- jint *lparg5=NULL;
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1translate_1coordinates_FUNC);
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jboolean)gtk_widget_translate_coordinates((GtkWidget *)arg0, (GtkWidget *)arg1, arg2, arg3, (gint *)lparg4, (gint *)lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1translate_1coordinates_FUNC);
- return rc;
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1get_1default_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1activate_1default
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1window_1activate_1default)
+#ifndef NO_gtk_1window_1get_1default_1widget
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1window_1get_1default_1widget)
(JNIEnv *env, jclass that, jlong arg0)
{
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1activate_1default_FUNC);
- rc = (jboolean)gtk_window_activate_default((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1activate_1default_FUNC);
+ jlong rc = 0;
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1get_1default_1widget_FUNC);
+ rc = (jlong)gtk_window_get_default_widget((GtkWindow *)arg0);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1get_1default_1widget_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1window_1add_1accel_1group
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1add_1accel_1group)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1add_1accel_1group_FUNC);
- gtk_window_add_accel_group((GtkWindow *)arg0, (GtkAccelGroup *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1add_1accel_1group_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1deiconify
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1deiconify)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1deiconify_FUNC);
- gtk_window_deiconify((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1deiconify_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1fullscreen
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1fullscreen)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1fullscreen_FUNC);
- gtk_window_fullscreen((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1fullscreen_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1get_1focus
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1window_1get_1focus)
+#ifndef NO_gtk_1window_1get_1focus
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1window_1get_1focus)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1focus_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1get_1focus_FUNC);
rc = (jlong)gtk_window_get_focus((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1focus_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1get_1focus_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1window_1get_1group
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1window_1get_1group)
+#ifndef NO_gtk_1window_1get_1group
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1window_1get_1group)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1group_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1get_1group_FUNC);
rc = (jlong)gtk_window_get_group((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1group_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1window_1get_1icon_1list
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1window_1get_1icon_1list)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1icon_1list_FUNC);
- rc = (jlong)gtk_window_get_icon_list((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1icon_1list_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1get_1group_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1window_1get_1mnemonic_1modifier
-JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1window_1get_1mnemonic_1modifier)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1mnemonic_1modifier_FUNC);
- rc = (jint)gtk_window_get_mnemonic_modifier((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1mnemonic_1modifier_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1window_1get_1modal
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1window_1get_1modal)
+#ifndef NO_gtk_1window_1get_1modal
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1window_1get_1modal)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1modal_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1get_1modal_FUNC);
rc = (jboolean)gtk_window_get_modal((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1modal_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1get_1modal_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1window_1get_1position
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1get_1position)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1position_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- gtk_window_get_position((GtkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1position_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1get_1size
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1get_1size)
- (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1size_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- gtk_window_get_size((GtkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1size_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1group_1add_1window
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1group_1add_1window)
+#ifndef NO_gtk_1window_1group_1add_1window
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1group_1add_1window)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1group_1add_1window_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1group_1add_1window_FUNC);
gtk_window_group_add_window((GtkWindowGroup*)arg0, (GtkWindow*)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1group_1add_1window_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1group_1add_1window_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1group_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1window_1group_1new)
+#ifndef NO_gtk_1window_1group_1new
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1window_1group_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1group_1new_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1group_1new_FUNC);
rc = (jlong)gtk_window_group_new();
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1group_1new_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1group_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1window_1group_1remove_1window
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1group_1remove_1window)
+#ifndef NO_gtk_1window_1group_1remove_1window
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1group_1remove_1window)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1group_1remove_1window_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1group_1remove_1window_FUNC);
gtk_window_group_remove_window((GtkWindowGroup*)arg0, (GtkWindow*)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1group_1remove_1window_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1iconify
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1iconify)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1iconify_FUNC);
- gtk_window_iconify((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1iconify_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1group_1remove_1window_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1is_1active
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1window_1is_1active)
+#ifndef NO_gtk_1window_1is_1active
+JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1window_1is_1active)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1is_1active_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1is_1active_FUNC);
rc = (jboolean)gtk_window_is_active((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1is_1active_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1is_1active_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1window_1list_1toplevels
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1window_1list_1toplevels)
+#ifndef NO_gtk_1window_1list_1toplevels
+JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1window_1list_1toplevels)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1list_1toplevels_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1list_1toplevels_FUNC);
rc = (jlong)gtk_window_list_toplevels();
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1list_1toplevels_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1list_1toplevels_FUNC);
return rc;
}
#endif
-#ifndef NO__1gtk_1window_1maximize
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1maximize)
+#ifndef NO_gtk_1window_1maximize
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1maximize)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1maximize_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1maximize_FUNC);
gtk_window_maximize((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1maximize_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1move
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1move)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1move_FUNC);
- gtk_window_move((GtkWindow *)arg0, (gint)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1move_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1new
-JNIEXPORT jlong JNICALL GTK_NATIVE(_1gtk_1window_1new)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jlong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1new_FUNC);
- rc = (jlong)gtk_window_new((GtkWindowType)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1window_1remove_1accel_1group
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1remove_1accel_1group)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1remove_1accel_1group_FUNC);
- gtk_window_remove_accel_group((GtkWindow *)arg0, (GtkAccelGroup *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1remove_1accel_1group_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1resize
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1resize)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1resize_FUNC);
- gtk_window_resize((GtkWindow *)arg0, (gint)arg1, (gint)arg2);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1resize_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1set_1attached_1to
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1attached_1to)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1attached_1to_FUNC);
- gtk_window_set_attached_to((GtkWindow *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1attached_1to_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1maximize_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1set_1decorated
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1decorated)
+#ifndef NO_gtk_1window_1set_1decorated
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1set_1decorated)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1decorated_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1set_1decorated_FUNC);
gtk_window_set_decorated((GtkWindow *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1decorated_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1set_1decorated_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1set_1default
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1default)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_gtk_1window_1set_1default_1size
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1set_1default_1size)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1default_FUNC);
- gtk_window_set_default((GtkWindow *)arg0, (GtkWidget *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1default_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1set_1default_1size_FUNC);
+ gtk_window_set_default_size((GtkWindow *)arg0, (gint)arg1, (gint)arg2);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1set_1default_1size_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1set_1destroy_1with_1parent
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1destroy_1with_1parent)
+#ifndef NO_gtk_1window_1set_1destroy_1with_1parent
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1set_1destroy_1with_1parent)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1destroy_1with_1parent_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1set_1destroy_1with_1parent_FUNC);
gtk_window_set_destroy_with_parent((GtkWindow *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1destroy_1with_1parent_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1set_1geometry_1hints
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1geometry_1hints)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3)
-{
- GdkGeometry _arg2, *lparg2=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1geometry_1hints_FUNC);
- if (arg2) if ((lparg2 = getGdkGeometryFields(env, arg2, &_arg2)) == NULL) goto fail;
- gtk_window_set_geometry_hints((GtkWindow *)arg0, (GtkWidget *)arg1, lparg2, arg3);
-fail:
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1geometry_1hints_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1set_1icon_1list
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1icon_1list)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1icon_1list_FUNC);
- gtk_window_set_icon_list((GtkWindow *)arg0, (GList *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1icon_1list_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1set_1keep_1above
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1keep_1above)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1keep_1above_FUNC);
- gtk_window_set_keep_above((GtkWindow *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1keep_1above_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1set_1destroy_1with_1parent_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1set_1modal
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1modal)
+#ifndef NO_gtk_1window_1set_1modal
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1set_1modal)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1modal_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1set_1modal_FUNC);
gtk_window_set_modal((GtkWindow *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1modal_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1set_1modal_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1set_1resizable
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1resizable)
+#ifndef NO_gtk_1window_1set_1resizable
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1set_1resizable)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1resizable_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1set_1resizable_FUNC);
gtk_window_set_resizable((GtkWindow *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1resizable_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1set_1resizable_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1set_1skip_1taskbar_1hint
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1skip_1taskbar_1hint)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1skip_1taskbar_1hint_FUNC);
- gtk_window_set_skip_taskbar_hint((GtkWindow *)arg0, (gboolean)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1skip_1taskbar_1hint_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1set_1title
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1title)
+#ifndef NO_gtk_1window_1set_1title
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1set_1title)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1title_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1set_1title_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_window_set_title((GtkWindow *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1title_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1set_1title_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1set_1transient_1for
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1transient_1for)
+#ifndef NO_gtk_1window_1set_1transient_1for
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1set_1transient_1for)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1transient_1for_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1set_1transient_1for_FUNC);
gtk_window_set_transient_for((GtkWindow *)arg0, (GtkWindow *)arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1transient_1for_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1window_1set_1type_1hint
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1type_1hint)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1type_1hint_FUNC);
- gtk_window_set_type_hint((GtkWindow *)arg0, arg1);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1type_1hint_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1set_1transient_1for_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1unfullscreen
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1unfullscreen)
+#ifndef NO_gtk_1window_1unfullscreen
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1unfullscreen)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1unfullscreen_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1unfullscreen_FUNC);
gtk_window_unfullscreen((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1unfullscreen_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1unfullscreen_FUNC);
}
#endif
-#ifndef NO__1gtk_1window_1unmaximize
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1unmaximize)
+#ifndef NO_gtk_1window_1unmaximize
+JNIEXPORT void JNICALL GTK_NATIVE(gtk_1window_1unmaximize)
(JNIEnv *env, jclass that, jlong arg0)
{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1unmaximize_FUNC);
+ GTK_NATIVE_ENTER(env, that, gtk_1window_1unmaximize_FUNC);
gtk_window_unmaximize((GtkWindow *)arg0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1unmaximize_FUNC);
+ GTK_NATIVE_EXIT(env, that, gtk_1window_1unmaximize_FUNC);
}
#endif
@@ -13630,36 +10207,36 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1unmaximize)
#define Graphene_NATIVE(func) Java_org_eclipse_swt_internal_gtk_Graphene_##func
#endif
-#ifndef NO__1graphene_1rect_1alloc
-JNIEXPORT jlong JNICALL Graphene_NATIVE(_1graphene_1rect_1alloc)
+#ifndef NO_graphene_1rect_1alloc
+JNIEXPORT jlong JNICALL Graphene_NATIVE(graphene_1rect_1alloc)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- Graphene_NATIVE_ENTER(env, that, _1graphene_1rect_1alloc_FUNC);
+ Graphene_NATIVE_ENTER(env, that, graphene_1rect_1alloc_FUNC);
rc = (jlong)graphene_rect_alloc();
- Graphene_NATIVE_EXIT(env, that, _1graphene_1rect_1alloc_FUNC);
+ Graphene_NATIVE_EXIT(env, that, graphene_1rect_1alloc_FUNC);
return rc;
}
#endif
-#ifndef NO__1graphene_1rect_1free
-JNIEXPORT void JNICALL Graphene_NATIVE(_1graphene_1rect_1free)
+#ifndef NO_graphene_1rect_1free
+JNIEXPORT void JNICALL Graphene_NATIVE(graphene_1rect_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- Graphene_NATIVE_ENTER(env, that, _1graphene_1rect_1free_FUNC);
+ Graphene_NATIVE_ENTER(env, that, graphene_1rect_1free_FUNC);
graphene_rect_free((graphene_rect_t *)arg0);
- Graphene_NATIVE_EXIT(env, that, _1graphene_1rect_1free_FUNC);
+ Graphene_NATIVE_EXIT(env, that, graphene_1rect_1free_FUNC);
}
#endif
-#ifndef NO__1graphene_1rect_1init
-JNIEXPORT jlong JNICALL Graphene_NATIVE(_1graphene_1rect_1init)
+#ifndef NO_graphene_1rect_1init
+JNIEXPORT jlong JNICALL Graphene_NATIVE(graphene_1rect_1init)
(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4)
{
jlong rc = 0;
- Graphene_NATIVE_ENTER(env, that, _1graphene_1rect_1init_FUNC);
+ Graphene_NATIVE_ENTER(env, that, graphene_1rect_1init_FUNC);
rc = (jlong)graphene_rect_init((graphene_rect_t *)arg0, arg1, arg2, arg3, arg4);
- Graphene_NATIVE_EXIT(env, that, _1graphene_1rect_1init_FUNC);
+ Graphene_NATIVE_EXIT(env, that, graphene_1rect_1init_FUNC);
return rc;
}
#endif
@@ -13680,26 +10257,38 @@ JNIEXPORT jint JNICALL OS_NATIVE(Call__JJII)
}
#endif
-#ifndef NO_Call__JJIJ
-JNIEXPORT jlong JNICALL OS_NATIVE(Call__JJIJ)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3)
+#ifndef NO_Call__JJJ
+JNIEXPORT jint JNICALL OS_NATIVE(Call__JJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, Call__JJIJ_FUNC);
- rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3);
- OS_NATIVE_EXIT(env, that, Call__JJIJ_FUNC);
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, Call__JJJ_FUNC);
+ rc = (jint)((jint (*)())arg0)(arg1, arg2);
+ OS_NATIVE_EXIT(env, that, Call__JJJ_FUNC);
return rc;
}
#endif
-#ifndef NO_GInterfaceInfo_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GInterfaceInfo_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_FcConfigAppFontAddFile
+JNIEXPORT jboolean JNICALL OS_NATIVE(FcConfigAppFontAddFile)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GInterfaceInfo_1sizeof_FUNC);
- rc = (jint)GInterfaceInfo_sizeof();
- OS_NATIVE_EXIT(env, that, GInterfaceInfo_1sizeof_FUNC);
+ jbyte *lparg1=NULL;
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, FcConfigAppFontAddFile_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+ rc = (jboolean)FcConfigAppFontAddFile(arg0, lparg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, FcConfigAppFontAddFile)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
+ }
+ }
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, FcConfigAppFontAddFile_FUNC);
return rc;
}
#endif
@@ -13728,14 +10317,14 @@ JNIEXPORT jint JNICALL OS_NATIVE(GTypeInfo_1sizeof)
}
#endif
-#ifndef NO_GTypeQuery_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GTypeQuery_1sizeof)
+#ifndef NO_GValue_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(GValue_1sizeof)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, GTypeQuery_1sizeof_FUNC);
- rc = (jint)GTypeQuery_sizeof();
- OS_NATIVE_EXIT(env, that, GTypeQuery_1sizeof_FUNC);
+ OS_NATIVE_ENTER(env, that, GValue_1sizeof_FUNC);
+ rc = (jint)GValue_sizeof();
+ OS_NATIVE_EXIT(env, that, GValue_1sizeof_FUNC);
return rc;
}
#endif
@@ -13762,6 +10351,42 @@ JNIEXPORT void JNICALL OS_NATIVE(G_1OBJECT_1CLASS_1SET_1CONSTRUCTOR)
}
#endif
+#ifndef NO_G_1OBJECT_1GET_1CLASS
+JNIEXPORT jlong JNICALL OS_NATIVE(G_1OBJECT_1GET_1CLASS)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, G_1OBJECT_1GET_1CLASS_FUNC);
+ rc = (jlong)G_OBJECT_GET_CLASS(arg0);
+ OS_NATIVE_EXIT(env, that, G_1OBJECT_1GET_1CLASS_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_G_1OBJECT_1TYPE
+JNIEXPORT jlong JNICALL OS_NATIVE(G_1OBJECT_1TYPE)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, G_1OBJECT_1TYPE_FUNC);
+ rc = (jlong)G_OBJECT_TYPE(arg0);
+ OS_NATIVE_EXIT(env, that, G_1OBJECT_1TYPE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_G_1OBJECT_1TYPE_1NAME
+JNIEXPORT jlong JNICALL OS_NATIVE(G_1OBJECT_1TYPE_1NAME)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, G_1OBJECT_1TYPE_1NAME_FUNC);
+ rc = (jlong)G_OBJECT_TYPE_NAME(arg0);
+ OS_NATIVE_EXIT(env, that, G_1OBJECT_1TYPE_1NAME_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_G_1TYPE_1BOOLEAN
JNIEXPORT jlong JNICALL OS_NATIVE(G_1TYPE_1BOOLEAN)
(JNIEnv *env, jclass that)
@@ -13822,6 +10447,30 @@ JNIEXPORT jlong JNICALL OS_NATIVE(G_1TYPE_1INT64)
}
#endif
+#ifndef NO_G_1TYPE_1LONG
+JNIEXPORT jlong JNICALL OS_NATIVE(G_1TYPE_1LONG)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, G_1TYPE_1LONG_FUNC);
+ rc = (jlong)G_TYPE_LONG;
+ OS_NATIVE_EXIT(env, that, G_1TYPE_1LONG_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_G_1TYPE_1STRING
+JNIEXPORT jlong JNICALL OS_NATIVE(G_1TYPE_1STRING)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, G_1TYPE_1STRING_FUNC);
+ rc = (jlong)G_TYPE_STRING;
+ OS_NATIVE_EXIT(env, that, G_1TYPE_1STRING_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_G_1VALUE_1TYPE
JNIEXPORT jlong JNICALL OS_NATIVE(G_1VALUE_1TYPE)
(JNIEnv *env, jclass that, jlong arg0)
@@ -13834,6 +10483,66 @@ JNIEXPORT jlong JNICALL OS_NATIVE(G_1VALUE_1TYPE)
}
#endif
+#ifndef NO_PANGO_1PIXELS
+JNIEXPORT jint JNICALL OS_NATIVE(PANGO_1PIXELS)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, PANGO_1PIXELS_FUNC);
+ rc = (jint)PANGO_PIXELS(arg0);
+ OS_NATIVE_EXIT(env, that, PANGO_1PIXELS_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_PANGO_1TYPE_1FONT_1DESCRIPTION
+JNIEXPORT jlong JNICALL OS_NATIVE(PANGO_1TYPE_1FONT_1DESCRIPTION)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC);
+ rc = (jlong)PANGO_TYPE_FONT_DESCRIPTION;
+ OS_NATIVE_EXIT(env, that, PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_PANGO_1TYPE_1FONT_1FACE
+JNIEXPORT jlong JNICALL OS_NATIVE(PANGO_1TYPE_1FONT_1FACE)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, PANGO_1TYPE_1FONT_1FACE_FUNC);
+ rc = (jlong)PANGO_TYPE_FONT_FACE;
+ OS_NATIVE_EXIT(env, that, PANGO_1TYPE_1FONT_1FACE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_PANGO_1TYPE_1FONT_1FAMILY
+JNIEXPORT jlong JNICALL OS_NATIVE(PANGO_1TYPE_1FONT_1FAMILY)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, PANGO_1TYPE_1FONT_1FAMILY_FUNC);
+ rc = (jlong)PANGO_TYPE_FONT_FAMILY;
+ OS_NATIVE_EXIT(env, that, PANGO_1TYPE_1FONT_1FAMILY_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_PANGO_1TYPE_1LAYOUT
+JNIEXPORT jlong JNICALL OS_NATIVE(PANGO_1TYPE_1LAYOUT)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, PANGO_1TYPE_1LAYOUT_FUNC);
+ rc = (jlong)PANGO_TYPE_LAYOUT;
+ OS_NATIVE_EXIT(env, that, PANGO_1TYPE_1LAYOUT_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_PangoAttrColor_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(PangoAttrColor_1sizeof)
(JNIEnv *env, jclass that)
@@ -13930,50 +10639,50 @@ JNIEXPORT jint JNICALL OS_NATIVE(PangoRectangle_1sizeof)
}
#endif
-#ifndef NO_RTLD_1GLOBAL
-JNIEXPORT jint JNICALL OS_NATIVE(RTLD_1GLOBAL)
+#ifndef NO_XAnyEvent_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(XAnyEvent_1sizeof)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, RTLD_1GLOBAL_FUNC);
- rc = (jint)RTLD_GLOBAL;
- OS_NATIVE_EXIT(env, that, RTLD_1GLOBAL_FUNC);
+ OS_NATIVE_ENTER(env, that, XAnyEvent_1sizeof_FUNC);
+ rc = (jint)XAnyEvent_sizeof();
+ OS_NATIVE_EXIT(env, that, XAnyEvent_1sizeof_FUNC);
return rc;
}
#endif
-#ifndef NO_RTLD_1LAZY
-JNIEXPORT jint JNICALL OS_NATIVE(RTLD_1LAZY)
- (JNIEnv *env, jclass that)
+#ifndef NO_XCheckIfEvent
+JNIEXPORT jboolean JNICALL OS_NATIVE(XCheckIfEvent)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, RTLD_1LAZY_FUNC);
- rc = (jint)RTLD_LAZY;
- OS_NATIVE_EXIT(env, that, RTLD_1LAZY_FUNC);
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, XCheckIfEvent_FUNC);
+ rc = (jboolean)XCheckIfEvent((Display *)arg0, (XEvent *)arg1, (Bool (*)())arg2, (XPointer)arg3);
+ OS_NATIVE_EXIT(env, that, XCheckIfEvent_FUNC);
return rc;
}
#endif
-#ifndef NO_RTLD_1NOW
-JNIEXPORT jint JNICALL OS_NATIVE(RTLD_1NOW)
- (JNIEnv *env, jclass that)
+#ifndef NO_XDefaultRootWindow
+JNIEXPORT jlong JNICALL OS_NATIVE(XDefaultRootWindow)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, RTLD_1NOW_FUNC);
- rc = (jint)RTLD_NOW;
- OS_NATIVE_EXIT(env, that, RTLD_1NOW_FUNC);
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, XDefaultRootWindow_FUNC);
+ rc = (jlong)XDefaultRootWindow((Display *)arg0);
+ OS_NATIVE_EXIT(env, that, XDefaultRootWindow_FUNC);
return rc;
}
#endif
-#ifndef NO_XAnyEvent_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(XAnyEvent_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_XDefaultScreen
+JNIEXPORT jint JNICALL OS_NATIVE(XDefaultScreen)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, XAnyEvent_1sizeof_FUNC);
- rc = (jint)XAnyEvent_sizeof();
- OS_NATIVE_EXIT(env, that, XAnyEvent_1sizeof_FUNC);
+ OS_NATIVE_ENTER(env, that, XDefaultScreen_FUNC);
+ rc = (jint)XDefaultScreen((Display *)arg0);
+ OS_NATIVE_EXIT(env, that, XDefaultScreen_FUNC);
return rc;
}
#endif
@@ -14014,270 +10723,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(XFocusChangeEvent_1sizeof)
}
#endif
-#ifndef NO_X_1EVENT_1TYPE
-JNIEXPORT jint JNICALL OS_NATIVE(X_1EVENT_1TYPE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, X_1EVENT_1TYPE_FUNC);
- rc = (jint)X_EVENT_TYPE((XEvent *)arg0);
- OS_NATIVE_EXIT(env, that, X_1EVENT_1TYPE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_X_1EVENT_1WINDOW
-JNIEXPORT jlong JNICALL OS_NATIVE(X_1EVENT_1WINDOW)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, X_1EVENT_1WINDOW_FUNC);
- rc = (jlong)X_EVENT_WINDOW((XAnyEvent *)arg0);
- OS_NATIVE_EXIT(env, that, X_1EVENT_1WINDOW_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1Call
-JNIEXPORT jint JNICALL OS_NATIVE(_1Call)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1Call_FUNC);
- rc = (jint)((jint (*)())arg0)(arg1, arg2);
- OS_NATIVE_EXIT(env, that, _1Call_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1FcConfigAppFontAddFile
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1FcConfigAppFontAddFile)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1FcConfigAppFontAddFile_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- rc = (jboolean)FcConfigAppFontAddFile(arg0, lparg1);
-*/
- {
- OS_LOAD_FUNCTION(fp, FcConfigAppFontAddFile)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1FcConfigAppFontAddFile_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1GString_1len
-JNIEXPORT jint JNICALL OS_NATIVE(_1GString_1len)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1GString_1len_FUNC);
- rc = (jint)((GString *)arg0)->len;
- OS_NATIVE_EXIT(env, that, _1GString_1len_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1GString_1str
-JNIEXPORT jlong JNICALL OS_NATIVE(_1GString_1str)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1GString_1str_FUNC);
- rc = (jlong)((GString *)arg0)->str;
- OS_NATIVE_EXIT(env, that, _1GString_1str_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1G_1OBJECT_1CLASS
-JNIEXPORT jlong JNICALL OS_NATIVE(_1G_1OBJECT_1CLASS)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1G_1OBJECT_1CLASS_FUNC);
- rc = (jlong)G_OBJECT_CLASS(arg0);
- OS_NATIVE_EXIT(env, that, _1G_1OBJECT_1CLASS_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1G_1OBJECT_1GET_1CLASS
-JNIEXPORT jlong JNICALL OS_NATIVE(_1G_1OBJECT_1GET_1CLASS)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1G_1OBJECT_1GET_1CLASS_FUNC);
- rc = (jlong)G_OBJECT_GET_CLASS(arg0);
- OS_NATIVE_EXIT(env, that, _1G_1OBJECT_1GET_1CLASS_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1G_1OBJECT_1TYPE
-JNIEXPORT jlong JNICALL OS_NATIVE(_1G_1OBJECT_1TYPE)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1G_1OBJECT_1TYPE_FUNC);
- rc = (jlong)G_OBJECT_TYPE(arg0);
- OS_NATIVE_EXIT(env, that, _1G_1OBJECT_1TYPE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1G_1OBJECT_1TYPE_1NAME
-JNIEXPORT jlong JNICALL OS_NATIVE(_1G_1OBJECT_1TYPE_1NAME)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1G_1OBJECT_1TYPE_1NAME_FUNC);
- rc = (jlong)G_OBJECT_TYPE_NAME(arg0);
- OS_NATIVE_EXIT(env, that, _1G_1OBJECT_1TYPE_1NAME_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1G_1TYPE_1CHECK_1INSTANCE_1TYPE
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1G_1TYPE_1CHECK_1INSTANCE_1TYPE)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1G_1TYPE_1CHECK_1INSTANCE_1TYPE_FUNC);
- rc = (jboolean)G_TYPE_CHECK_INSTANCE_TYPE(arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1G_1TYPE_1CHECK_1INSTANCE_1TYPE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1G_1TYPE_1STRING
-JNIEXPORT jlong JNICALL OS_NATIVE(_1G_1TYPE_1STRING)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1G_1TYPE_1STRING_FUNC);
- rc = (jlong)G_TYPE_STRING;
- OS_NATIVE_EXIT(env, that, _1G_1TYPE_1STRING_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1PANGO_1PIXELS
-JNIEXPORT jint JNICALL OS_NATIVE(_1PANGO_1PIXELS)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1PANGO_1PIXELS_FUNC);
- rc = (jint)PANGO_PIXELS(arg0);
- OS_NATIVE_EXIT(env, that, _1PANGO_1PIXELS_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1PANGO_1TYPE_1FONT_1DESCRIPTION
-JNIEXPORT jlong JNICALL OS_NATIVE(_1PANGO_1TYPE_1FONT_1DESCRIPTION)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC);
- rc = (jlong)PANGO_TYPE_FONT_DESCRIPTION;
- OS_NATIVE_EXIT(env, that, _1PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1PANGO_1TYPE_1FONT_1FACE
-JNIEXPORT jlong JNICALL OS_NATIVE(_1PANGO_1TYPE_1FONT_1FACE)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1PANGO_1TYPE_1FONT_1FACE_FUNC);
- rc = (jlong)PANGO_TYPE_FONT_FACE;
- OS_NATIVE_EXIT(env, that, _1PANGO_1TYPE_1FONT_1FACE_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1PANGO_1TYPE_1FONT_1FAMILY
-JNIEXPORT jlong JNICALL OS_NATIVE(_1PANGO_1TYPE_1FONT_1FAMILY)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1PANGO_1TYPE_1FONT_1FAMILY_FUNC);
- rc = (jlong)PANGO_TYPE_FONT_FAMILY;
- OS_NATIVE_EXIT(env, that, _1PANGO_1TYPE_1FONT_1FAMILY_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1PANGO_1TYPE_1LAYOUT
-JNIEXPORT jlong JNICALL OS_NATIVE(_1PANGO_1TYPE_1LAYOUT)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1PANGO_1TYPE_1LAYOUT_FUNC);
- rc = (jlong)PANGO_TYPE_LAYOUT;
- OS_NATIVE_EXIT(env, that, _1PANGO_1TYPE_1LAYOUT_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1XCheckIfEvent
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1XCheckIfEvent)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
-{
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1XCheckIfEvent_FUNC);
- rc = (jboolean)XCheckIfEvent((Display *)arg0, (XEvent *)arg1, (Bool (*)())arg2, (XPointer)arg3);
- OS_NATIVE_EXIT(env, that, _1XCheckIfEvent_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1XDefaultRootWindow
-JNIEXPORT jlong JNICALL OS_NATIVE(_1XDefaultRootWindow)
+#ifndef NO_XFree
+JNIEXPORT void JNICALL OS_NATIVE(XFree)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1XDefaultRootWindow_FUNC);
- rc = (jlong)XDefaultRootWindow((Display *)arg0);
- OS_NATIVE_EXIT(env, that, _1XDefaultRootWindow_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1XDefaultScreen
-JNIEXPORT jint JNICALL OS_NATIVE(_1XDefaultScreen)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1XDefaultScreen_FUNC);
- rc = (jint)XDefaultScreen((Display *)arg0);
- OS_NATIVE_EXIT(env, that, _1XDefaultScreen_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1XFree
-JNIEXPORT void JNICALL OS_NATIVE(_1XFree)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- OS_NATIVE_ENTER(env, that, _1XFree_FUNC);
+ OS_NATIVE_ENTER(env, that, XFree_FUNC);
XFree((void *)arg0);
- OS_NATIVE_EXIT(env, that, _1XFree_FUNC);
+ OS_NATIVE_EXIT(env, that, XFree_FUNC);
}
#endif
-#ifndef NO__1XQueryPointer
-JNIEXPORT jint JNICALL OS_NATIVE(_1XQueryPointer)
+#ifndef NO_XQueryPointer
+JNIEXPORT jint JNICALL OS_NATIVE(XQueryPointer)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2, jlongArray arg3, jintArray arg4, jintArray arg5, jintArray arg6, jintArray arg7, jintArray arg8)
{
jlong *lparg2=NULL;
@@ -14288,7 +10745,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1XQueryPointer)
jint *lparg7=NULL;
jint *lparg8=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1XQueryPointer_FUNC);
+ OS_NATIVE_ENTER(env, that, XQueryPointer_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
@@ -14305,397 +10762,479 @@ fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, _1XQueryPointer_FUNC);
+ OS_NATIVE_EXIT(env, that, XQueryPointer_FUNC);
return rc;
}
#endif
-#ifndef NO__1XSetErrorHandler
-JNIEXPORT jlong JNICALL OS_NATIVE(_1XSetErrorHandler)
+#ifndef NO_XSetErrorHandler
+JNIEXPORT jlong JNICALL OS_NATIVE(XSetErrorHandler)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1XSetErrorHandler_FUNC);
+ OS_NATIVE_ENTER(env, that, XSetErrorHandler_FUNC);
rc = (jlong)XSetErrorHandler((XErrorHandler)arg0);
- OS_NATIVE_EXIT(env, that, _1XSetErrorHandler_FUNC);
+ OS_NATIVE_EXIT(env, that, XSetErrorHandler_FUNC);
return rc;
}
#endif
-#ifndef NO__1XSetIOErrorHandler
-JNIEXPORT jlong JNICALL OS_NATIVE(_1XSetIOErrorHandler)
+#ifndef NO_XSetIOErrorHandler
+JNIEXPORT jlong JNICALL OS_NATIVE(XSetIOErrorHandler)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1XSetIOErrorHandler_FUNC);
+ OS_NATIVE_ENTER(env, that, XSetIOErrorHandler_FUNC);
rc = (jlong)XSetIOErrorHandler((XIOErrorHandler)arg0);
- OS_NATIVE_EXIT(env, that, _1XSetIOErrorHandler_FUNC);
+ OS_NATIVE_EXIT(env, that, XSetIOErrorHandler_FUNC);
return rc;
}
#endif
-#ifndef NO__1XSetInputFocus
-JNIEXPORT jint JNICALL OS_NATIVE(_1XSetInputFocus)
+#ifndef NO_XSetInputFocus
+JNIEXPORT jint JNICALL OS_NATIVE(XSetInputFocus)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1XSetInputFocus_FUNC);
+ OS_NATIVE_ENTER(env, that, XSetInputFocus_FUNC);
rc = (jint)XSetInputFocus((Display *)arg0, (Window)arg1, arg2, arg3);
- OS_NATIVE_EXIT(env, that, _1XSetInputFocus_FUNC);
+ OS_NATIVE_EXIT(env, that, XSetInputFocus_FUNC);
return rc;
}
#endif
-#ifndef NO__1XSetTransientForHint
-JNIEXPORT jint JNICALL OS_NATIVE(_1XSetTransientForHint)
+#ifndef NO_XSetTransientForHint
+JNIEXPORT jint JNICALL OS_NATIVE(XSetTransientForHint)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1XSetTransientForHint_FUNC);
+ OS_NATIVE_ENTER(env, that, XSetTransientForHint_FUNC);
rc = (jint)XSetTransientForHint((Display *)arg0, (Window)arg1, (Window)arg2);
- OS_NATIVE_EXIT(env, that, _1XSetTransientForHint_FUNC);
+ OS_NATIVE_EXIT(env, that, XSetTransientForHint_FUNC);
return rc;
}
#endif
-#ifndef NO__1XSynchronize
-JNIEXPORT jlong JNICALL OS_NATIVE(_1XSynchronize)
+#ifndef NO_XSynchronize
+JNIEXPORT jlong JNICALL OS_NATIVE(XSynchronize)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1XSynchronize_FUNC);
+ OS_NATIVE_ENTER(env, that, XSynchronize_FUNC);
rc = (jlong)XSynchronize((Display *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1XSynchronize_FUNC);
+ OS_NATIVE_EXIT(env, that, XSynchronize_FUNC);
return rc;
}
#endif
-#ifndef NO__1access
-JNIEXPORT jint JNICALL OS_NATIVE(_1access)
- (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
+#ifndef NO_X_1EVENT_1TYPE
+JNIEXPORT jint JNICALL OS_NATIVE(X_1EVENT_1TYPE)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jbyte *lparg0=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1access_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jint)access((const char*)lparg0, arg1);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1access_FUNC);
+ OS_NATIVE_ENTER(env, that, X_1EVENT_1TYPE_FUNC);
+ rc = (jint)X_EVENT_TYPE((XEvent *)arg0);
+ OS_NATIVE_EXIT(env, that, X_1EVENT_1TYPE_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_X_1EVENT_1WINDOW
+JNIEXPORT jlong JNICALL OS_NATIVE(X_1EVENT_1WINDOW)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, X_1EVENT_1WINDOW_FUNC);
+ rc = (jlong)X_EVENT_WINDOW((XAnyEvent *)arg0);
+ OS_NATIVE_EXIT(env, that, X_1EVENT_1WINDOW_FUNC);
return rc;
}
#endif
-#ifndef NO__1call__JJJJJ
-JNIEXPORT jlong JNICALL OS_NATIVE(_1call__JJJJJ)
+#ifndef NO_addressof_1g_1free
+JNIEXPORT jlong JNICALL OS_NATIVE(addressof_1g_1free)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, addressof_1g_1free_FUNC);
+ rc = (jlong)&g_free;
+ OS_NATIVE_EXIT(env, that, addressof_1g_1free_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_call__JJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(call__JJJJJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1call__JJJJJ_FUNC);
+ OS_NATIVE_ENTER(env, that, call__JJJJJ_FUNC);
rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3, arg4);
- OS_NATIVE_EXIT(env, that, _1call__JJJJJ_FUNC);
+ OS_NATIVE_EXIT(env, that, call__JJJJJ_FUNC);
return rc;
}
#endif
-#ifndef NO__1call__JJJJJJJ
-JNIEXPORT jlong JNICALL OS_NATIVE(_1call__JJJJJJJ)
+#ifndef NO_call__JJJJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(call__JJJJJJJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1call__JJJJJJJ_FUNC);
+ OS_NATIVE_ENTER(env, that, call__JJJJJJJ_FUNC);
rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3, arg4, arg5, arg6);
- OS_NATIVE_EXIT(env, that, _1call__JJJJJJJ_FUNC);
+ OS_NATIVE_EXIT(env, that, call__JJJJJJJ_FUNC);
return rc;
}
#endif
-#ifndef NO__1call__JJJJJJJJ
-JNIEXPORT jlong JNICALL OS_NATIVE(_1call__JJJJJJJJ)
+#ifndef NO_call__JJJJJJJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(call__JJJJJJJJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6, jlong arg7)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1call__JJJJJJJJ_FUNC);
+ OS_NATIVE_ENTER(env, that, call__JJJJJJJJ_FUNC);
rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- OS_NATIVE_EXIT(env, that, _1call__JJJJJJJJ_FUNC);
+ OS_NATIVE_EXIT(env, that, call__JJJJJJJJ_FUNC);
return rc;
}
#endif
-#ifndef NO__1dlopen
-JNIEXPORT jlong JNICALL OS_NATIVE(_1dlopen)
- (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
+#ifndef NO_g_1action_1get_1enabled
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1action_1get_1enabled)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1action_1get_1enabled_FUNC);
+ rc = (jboolean)g_action_get_enabled((GAction *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1action_1get_1enabled_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1action_1get_1state
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1action_1get_1state)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1dlopen_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jlong)dlopen((const char *)lparg0, arg1);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1dlopen_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1action_1get_1state_FUNC);
+ rc = (jlong)g_action_get_state((GAction *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1action_1get_1state_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1create_1from_1commandline
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1app_1info_1create_1from_1commandline)
+#ifndef NO_g_1action_1map_1add_1action
+JNIEXPORT void JNICALL OS_NATIVE(g_1action_1map_1add_1action)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1action_1map_1add_1action_FUNC);
+ g_action_map_add_action((GActionMap *)arg0, (GAction *)arg1);
+ OS_NATIVE_EXIT(env, that, g_1action_1map_1add_1action_FUNC);
+}
+#endif
+
+#ifndef NO_g_1action_1map_1remove_1action
+JNIEXPORT void JNICALL OS_NATIVE(g_1action_1map_1remove_1action)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, g_1action_1map_1remove_1action_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ g_action_map_remove_action((GActionMap *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, g_1action_1map_1remove_1action_FUNC);
+}
+#endif
+
+#ifndef NO_g_1app_1info_1create_1from_1commandline
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1app_1info_1create_1from_1commandline)
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jlong arg2, jlong arg3)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1create_1from_1commandline_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1create_1from_1commandline_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_app_info_create_from_commandline((gchar *)lparg0, (gchar *)lparg1, (GAppInfoCreateFlags)arg2, (GError **)arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1create_1from_1commandline_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1create_1from_1commandline_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1get_1all
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1app_1info_1get_1all)
+#ifndef NO_g_1app_1info_1get_1all
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1app_1info_1get_1all)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1all_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1get_1all_FUNC);
rc = (jlong)g_app_info_get_all();
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1all_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1get_1all_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1get_1default_1for_1type
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1app_1info_1get_1default_1for_1type)
+#ifndef NO_g_1app_1info_1get_1default_1for_1type
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1app_1info_1get_1default_1for_1type)
(JNIEnv *env, jclass that, jbyteArray arg0, jboolean arg1)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1default_1for_1type_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1get_1default_1for_1type_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_app_info_get_default_for_type((gchar *)lparg0, (gboolean)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1default_1for_1type_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1get_1default_1for_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1get_1executable
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1app_1info_1get_1executable)
+#ifndef NO_g_1app_1info_1get_1executable
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1app_1info_1get_1executable)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1executable_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1get_1executable_FUNC);
rc = (jlong)g_app_info_get_executable((GAppInfo *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1executable_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1get_1executable_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1get_1icon
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1app_1info_1get_1icon)
+#ifndef NO_g_1app_1info_1get_1icon
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1app_1info_1get_1icon)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1icon_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1get_1icon_FUNC);
rc = (jlong)g_app_info_get_icon((GAppInfo *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1icon_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1get_1icon_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1get_1name
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1app_1info_1get_1name)
+#ifndef NO_g_1app_1info_1get_1name
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1app_1info_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1name_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1get_1name_FUNC);
rc = (jlong)g_app_info_get_name((GAppInfo *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1name_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1launch
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1launch)
+#ifndef NO_g_1app_1info_1launch
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1app_1info_1launch)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1launch_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1launch_FUNC);
rc = (jboolean)g_app_info_launch((GAppInfo *)arg0, (GList *)arg1, (GAppLaunchContext *)arg2, (GError **)arg3);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1launch_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1launch_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1launch_1default_1for_1uri
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1launch_1default_1for_1uri)
+#ifndef NO_g_1app_1info_1launch_1default_1for_1uri
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1app_1info_1launch_1default_1for_1uri)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1launch_1default_1for_1uri_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1launch_1default_1for_1uri_FUNC);
rc = (jboolean)g_app_info_launch_default_for_uri((char *)arg0, (GAppLaunchContext *)arg1, (GError **)arg2);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1launch_1default_1for_1uri_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1g_1app_1info_1should_1show
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1should_1show)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1should_1show_FUNC);
- rc = (jboolean)g_app_info_should_show((GAppInfo *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1should_1show_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1launch_1default_1for_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1app_1info_1supports_1uris
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1supports_1uris)
+#ifndef NO_g_1app_1info_1supports_1uris
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1app_1info_1supports_1uris)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1app_1info_1supports_1uris_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1app_1info_1supports_1uris_FUNC);
rc = (jboolean)g_app_info_supports_uris((GAppInfo *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1app_1info_1supports_1uris_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1app_1info_1supports_1uris_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1bus_1own_1name
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1bus_1own_1name)
+#ifndef NO_g_1bus_1own_1name
+JNIEXPORT jint JNICALL OS_NATIVE(g_1bus_1own_1name)
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6, jlong arg7)
{
jbyte *lparg1=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1bus_1own_1name_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1bus_1own_1name_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)g_bus_own_name((GBusType)arg0, (const gchar *)lparg1, (GBusNameOwnerFlags)arg2, (GBusAcquiredCallback)arg3, (GBusNameAcquiredCallback)arg4, (GBusNameLostCallback)arg5, (gpointer)arg6, (GDestroyNotify)arg7);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1bus_1own_1name_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1bus_1own_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1bytes_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1bytes_1new)
+#ifndef NO_g_1bytes_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1bytes_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1bytes_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1bytes_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_bytes_new((gconstpointer)lparg0, (gsize)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1bytes_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1bytes_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1bytes_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1bytes_1unref)
+#ifndef NO_g_1bytes_1unref
+JNIEXPORT void JNICALL OS_NATIVE(g_1bytes_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1bytes_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1bytes_1unref_FUNC);
g_bytes_unref((GBytes *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1bytes_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1bytes_1unref_FUNC);
}
#endif
-#ifndef NO__1g_1cclosure_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1cclosure_1new)
+#ifndef NO_g_1cclosure_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1cclosure_1new)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1cclosure_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1cclosure_1new_FUNC);
rc = (jlong)g_cclosure_new((GCallback)arg0, (gpointer)arg1, (GClosureNotify)arg2);
- OS_NATIVE_EXIT(env, that, _1g_1cclosure_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1cclosure_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1closure_1ref
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1closure_1ref)
+#ifndef NO_g_1closure_1ref
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1closure_1ref)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1closure_1ref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1closure_1ref_FUNC);
rc = (jlong)g_closure_ref((GClosure *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1closure_1ref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1closure_1ref_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1closure_1sink
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1closure_1sink)
+#ifndef NO_g_1closure_1sink
+JNIEXPORT void JNICALL OS_NATIVE(g_1closure_1sink)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1closure_1sink_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1closure_1sink_FUNC);
g_closure_sink((GClosure *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1closure_1sink_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1closure_1sink_FUNC);
}
#endif
-#ifndef NO__1g_1closure_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1closure_1unref)
+#ifndef NO_g_1closure_1unref
+JNIEXPORT void JNICALL OS_NATIVE(g_1closure_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1closure_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1closure_1unref_FUNC);
g_closure_unref((GClosure *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1closure_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1closure_1unref_FUNC);
}
#endif
-#ifndef NO__1g_1content_1type_1equals
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1content_1type_1equals)
+#ifndef NO_g_1content_1type_1equals
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1content_1type_1equals)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1content_1type_1equals_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1content_1type_1equals_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)g_content_type_equals((gchar *)arg0, (gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1content_1type_1equals_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1content_1type_1equals_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1content_1type_1is_1a
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1content_1type_1is_1a)
+#ifndef NO_g_1content_1type_1is_1a
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1content_1type_1is_1a)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1content_1type_1is_1a_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1content_1type_1is_1a_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)g_content_type_is_a((gchar *)arg0, (gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1content_1type_1is_1a_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1content_1type_1is_1a_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1dbus_1connection_1register_1object
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1dbus_1connection_1register_1object)
+#ifndef NO_g_1date_1time_1get_1ymd
+JNIEXPORT void JNICALL OS_NATIVE(g_1date_1time_1get_1ymd)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2, jintArray arg3)
+{
+ jint *lparg1=NULL;
+ jint *lparg2=NULL;
+ jint *lparg3=NULL;
+ OS_NATIVE_ENTER(env, that, g_1date_1time_1get_1ymd_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ g_date_time_get_ymd((GDateTime *)arg0, (gint *)lparg1, (gint *)lparg2, (gint *)lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, g_1date_1time_1get_1ymd_FUNC);
+}
+#endif
+
+#ifndef NO_g_1date_1time_1new_1local
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1date_1time_1new_1local)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jdouble arg5)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1date_1time_1new_1local_FUNC);
+ rc = (jlong)g_date_time_new_local((gint)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gdouble)arg5);
+ OS_NATIVE_EXIT(env, that, g_1date_1time_1new_1local_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1date_1time_1unref
+JNIEXPORT void JNICALL OS_NATIVE(g_1date_1time_1unref)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ OS_NATIVE_ENTER(env, that, g_1date_1time_1unref_FUNC);
+ g_date_time_unref((GDateTime *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1date_1time_1unref_FUNC);
+}
+#endif
+
+#ifndef NO_g_1dbus_1connection_1register_1object
+JNIEXPORT jint JNICALL OS_NATIVE(g_1dbus_1connection_1register_1object)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlongArray arg3, jlong arg4, jlong arg5, jlongArray arg6)
{
jbyte *lparg1=NULL;
jlong *lparg3=NULL;
jlong *lparg6=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1connection_1register_1object_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1connection_1register_1object_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
@@ -14704,122 +11243,106 @@ fail:
if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1connection_1register_1object_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1dbus_1connection_1register_1object_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1dbus_1method_1invocation_1return_1value
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1dbus_1method_1invocation_1return_1value)
+#ifndef NO_g_1dbus_1method_1invocation_1return_1value
+JNIEXPORT void JNICALL OS_NATIVE(g_1dbus_1method_1invocation_1return_1value)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1method_1invocation_1return_1value_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1method_1invocation_1return_1value_FUNC);
g_dbus_method_invocation_return_value((GDBusMethodInvocation *)arg0, (GVariant *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1method_1invocation_1return_1value_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1dbus_1method_1invocation_1return_1value_FUNC);
}
#endif
-#ifndef NO__1g_1dbus_1node_1info_1lookup_1interface
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1dbus_1node_1info_1lookup_1interface)
+#ifndef NO_g_1dbus_1node_1info_1lookup_1interface
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1dbus_1node_1info_1lookup_1interface)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1node_1info_1lookup_1interface_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1node_1info_1lookup_1interface_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_dbus_node_info_lookup_interface((GDBusNodeInfo *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1node_1info_1lookup_1interface_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1dbus_1node_1info_1lookup_1interface_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1dbus_1node_1info_1new_1for_1xml
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1dbus_1node_1info_1new_1for_1xml)
+#ifndef NO_g_1dbus_1node_1info_1new_1for_1xml
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1dbus_1node_1info_1new_1for_1xml)
(JNIEnv *env, jclass that, jbyteArray arg0, jlongArray arg1)
{
jbyte *lparg0=NULL;
jlong *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1node_1info_1new_1for_1xml_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1node_1info_1new_1for_1xml_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_dbus_node_info_new_for_xml((const gchar *)lparg0, (GError **)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1node_1info_1new_1for_1xml_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1dbus_1node_1info_1new_1for_1xml_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1dbus_1proxy_1call
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1dbus_1proxy_1call)
+#ifndef NO_g_1dbus_1proxy_1call
+JNIEXPORT void JNICALL OS_NATIVE(g_1dbus_1proxy_1call)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jint arg3, jint arg4, jlong arg5, jlong arg6, jlongArray arg7)
{
jbyte *lparg1=NULL;
jlong *lparg7=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1proxy_1call_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1proxy_1call_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg7) if ((lparg7 = (*env)->GetLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
g_dbus_proxy_call((GDBusProxy *)arg0, (const gchar *)lparg1, (GVariant *)arg2, arg3, arg4, (GCancellable *)arg5, (GAsyncReadyCallback)arg6, (GError **)lparg7);
fail:
if (arg7 && lparg7) (*env)->ReleaseLongArrayElements(env, arg7, lparg7, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1proxy_1call_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1dbus_1proxy_1call_1finish
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1dbus_1proxy_1call_1finish)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
-{
- jlong *lparg2=NULL;
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1proxy_1call_1finish_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jlong)g_dbus_proxy_call_finish((GDBusProxy *)arg0, (GAsyncResult *)arg1, (GError **)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1proxy_1call_1finish_FUNC);
- return rc;
+ OS_NATIVE_EXIT(env, that, g_1dbus_1proxy_1call_FUNC);
}
#endif
-#ifndef NO__1g_1dbus_1proxy_1call_1sync
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1dbus_1proxy_1call_1sync)
+#ifndef NO_g_1dbus_1proxy_1call_1sync
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1dbus_1proxy_1call_1sync)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jint arg3, jint arg4, jlong arg5, jlongArray arg6)
{
jbyte *lparg1=NULL;
jlong *lparg6=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1proxy_1call_1sync_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1proxy_1call_1sync_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
rc = (jlong)g_dbus_proxy_call_sync((GDBusProxy *)arg0, (const gchar *)lparg1, (GVariant *)arg2, arg3, arg4, (GCancellable *)arg5, (GError **)lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1proxy_1call_1sync_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1dbus_1proxy_1call_1sync_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1dbus_1proxy_1get_1name_1owner
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1dbus_1proxy_1get_1name_1owner)
+#ifndef NO_g_1dbus_1proxy_1get_1name_1owner
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1dbus_1proxy_1get_1name_1owner)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1proxy_1get_1name_1owner_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1proxy_1get_1name_1owner_FUNC);
rc = (jlong)g_dbus_proxy_get_name_owner((GDBusProxy *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1proxy_1get_1name_1owner_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1dbus_1proxy_1get_1name_1owner_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1dbus_1proxy_1new_1for_1bus_1sync
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1dbus_1proxy_1new_1for_1bus_1sync)
+#ifndef NO_g_1dbus_1proxy_1new_1for_1bus_1sync
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1dbus_1proxy_1new_1for_1bus_1sync)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jlong arg2, jbyteArray arg3, jbyteArray arg4, jbyteArray arg5, jlong arg6, jlongArray arg7)
{
jbyte *lparg3=NULL;
@@ -14827,7 +11350,7 @@ JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1dbus_1proxy_1new_1for_1bus_1sync)
jbyte *lparg5=NULL;
jlong *lparg7=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1dbus_1proxy_1new_1for_1bus_1sync_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1dbus_1proxy_1new_1for_1bus_1sync_FUNC);
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
@@ -14838,177 +11361,229 @@ fail:
if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- OS_NATIVE_EXIT(env, that, _1g_1dbus_1proxy_1new_1for_1bus_1sync_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1dbus_1proxy_1new_1for_1bus_1sync_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1error_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1error_1free)
+#ifndef NO_g_1dir_1make_1tmp
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1dir_1make_1tmp)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
+{
+ jlong *lparg1=NULL;
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1dir_1make_1tmp_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)g_dir_make_tmp((const gchar *)arg0, (GError **)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, g_1dir_1make_1tmp_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1error_1free
+JNIEXPORT void JNICALL OS_NATIVE(g_1error_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1error_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1error_1free_FUNC);
g_error_free((GError *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1error_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1error_1free_FUNC);
}
#endif
-#ifndef NO__1g_1error_1get_1message
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1error_1get_1message)
+#ifndef NO_g_1error_1get_1message
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1error_1get_1message)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1error_1get_1message_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1error_1get_1message_FUNC);
rc = (jlong)g_error_get_message((GError *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1error_1get_1message_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1error_1get_1message_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1error_1matches
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1error_1matches)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
+{
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1error_1matches_FUNC);
+ rc = (jboolean)g_error_matches((const GError *)arg0, (GQuark)arg1, (gint)arg2);
+ OS_NATIVE_EXIT(env, that, g_1error_1matches_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1file_1error_1quark
+JNIEXPORT jint JNICALL OS_NATIVE(g_1file_1error_1quark)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1file_1error_1quark_FUNC);
+ rc = (jint)g_file_error_quark();
+ OS_NATIVE_EXIT(env, that, g_1file_1error_1quark_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1file_1get_1path
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1file_1get_1path)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1file_1get_1path_FUNC);
+ rc = (jlong)g_file_get_path((GFile *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1file_1get_1path_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1file_1get_1uri
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1file_1get_1uri)
+#ifndef NO_g_1file_1get_1uri
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1file_1get_1uri)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1file_1get_1uri_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1file_1get_1uri_FUNC);
rc = (jlong)g_file_get_uri((GFile *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1file_1get_1uri_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1file_1get_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1file_1info_1get_1content_1type
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1file_1info_1get_1content_1type)
+#ifndef NO_g_1file_1info_1get_1content_1type
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1file_1info_1get_1content_1type)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1file_1info_1get_1content_1type_FUNC);
rc = (jlong)g_file_info_get_content_type((GFileInfo *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1file_1info_1get_1content_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1file_1new_1for_1commandline_1arg
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1file_1new_1for_1commandline_1arg)
+#ifndef NO_g_1file_1new_1for_1commandline_1arg
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1file_1new_1for_1commandline_1arg)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1file_1new_1for_1commandline_1arg_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1file_1new_1for_1commandline_1arg_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_file_new_for_commandline_arg((const char *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1file_1new_1for_1commandline_1arg_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1file_1new_1for_1commandline_1arg_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1file_1new_1for_1path
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1file_1new_1for_1path)
+#ifndef NO_g_1file_1new_1for_1path
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1file_1new_1for_1path)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1file_1new_1for_1path_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1file_1new_1for_1path_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_file_new_for_path((const char *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1file_1new_1for_1path_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1file_1new_1for_1path_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1file_1new_1for_1uri
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1file_1new_1for_1uri)
+#ifndef NO_g_1file_1new_1for_1uri
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1file_1new_1for_1uri)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1file_1new_1for_1uri_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1file_1new_1for_1uri_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_file_new_for_uri((const char *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1file_1new_1for_1uri_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1file_1new_1for_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1file_1query_1info
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1file_1query_1info)
+#ifndef NO_g_1file_1query_1info
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1file_1query_1info)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlong arg3, jlong arg4)
{
jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1file_1query_1info_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1file_1query_1info_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_file_query_info((GFile *)arg0, (const char *)lparg1, (GFileQueryInfoFlags)arg2, (GCancellable *)arg3, (GError **)arg4);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1file_1query_1info_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1file_1query_1info_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1file_1test
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1file_1test)
+#ifndef NO_g_1file_1test
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1file_1test)
(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
{
jbyte *lparg0=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1file_1test_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1file_1test_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jboolean)g_file_test((const gchar *)lparg0, (GFileTest)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1file_1test_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1file_1test_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1filename_1display_1name
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1filename_1display_1name)
+#ifndef NO_g_1filename_1display_1name
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1filename_1display_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1filename_1display_1name_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1filename_1display_1name_FUNC);
rc = (jlong)g_filename_display_name((const gchar *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1filename_1display_1name_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1filename_1display_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1filename_1from_1uri
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1filename_1from_1uri)
+#ifndef NO_g_1filename_1from_1uri
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1filename_1from_1uri)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jlongArray arg2)
{
jlong *lparg1=NULL;
jlong *lparg2=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1filename_1from_1uri_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1filename_1from_1uri_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jlong)g_filename_from_uri((const char *)arg0, (char **)lparg1, (GError **)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1filename_1from_1uri_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1filename_1from_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1filename_1from_1utf8
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1filename_1from_1utf8)
+#ifndef NO_g_1filename_1from_1utf8
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1filename_1from_1utf8)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2, jlongArray arg3, jlongArray arg4)
{
jlong *lparg2=NULL;
jlong *lparg3=NULL;
jlong *lparg4=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1filename_1from_1utf8_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1filename_1from_1utf8_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
@@ -15017,36 +11592,36 @@ fail:
if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, _1g_1filename_1from_1utf8_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1filename_1from_1utf8_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1filename_1to_1uri
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1filename_1to_1uri)
+#ifndef NO_g_1filename_1to_1uri
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1filename_1to_1uri)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
jlong *lparg2=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1filename_1to_1uri_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1filename_1to_1uri_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jlong)g_filename_to_uri((const char *)arg0, (const char *)arg1, (GError **)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, _1g_1filename_1to_1uri_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1filename_1to_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1filename_1to_1utf8
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1filename_1to_1utf8)
+#ifndef NO_g_1filename_1to_1utf8
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1filename_1to_1utf8)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2, jlongArray arg3, jlongArray arg4)
{
jlong *lparg2=NULL;
jlong *lparg3=NULL;
jlong *lparg4=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1filename_1to_1utf8_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1filename_1to_1utf8_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
@@ -15055,1210 +11630,1310 @@ fail:
if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, _1g_1filename_1to_1utf8_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1filename_1to_1utf8_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1free)
+#ifndef NO_g_1free
+JNIEXPORT void JNICALL OS_NATIVE(g_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1free_FUNC);
g_free((gpointer)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1free_FUNC);
}
#endif
-#ifndef NO__1g_1get_1current_1time
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1get_1current_1time)
+#ifndef NO_g_1get_1current_1time
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL OS_NATIVE(g_1get_1current_1time)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1get_1current_1time_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1get_1current_1time_FUNC);
g_get_current_time((GTimeVal *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1get_1current_1time_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1get_1current_1time_FUNC);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1g_1getenv
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1getenv)
+#ifndef NO_g_1getenv
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1getenv)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1getenv_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1getenv_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_getenv((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1getenv_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1g_1hash_1table_1get_1values
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1hash_1table_1get_1values)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1hash_1table_1get_1values_FUNC);
- rc = (jlong)g_hash_table_get_values((GHashTable *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1hash_1table_1get_1values_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1getenv_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1icon_1new_1for_1string
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1icon_1new_1for_1string)
+#ifndef NO_g_1icon_1new_1for_1string
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1icon_1new_1for_1string)
(JNIEnv *env, jclass that, jbyteArray arg0, jlongArray arg1)
{
jbyte *lparg0=NULL;
jlong *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1icon_1new_1for_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1icon_1new_1for_1string_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_icon_new_for_string((const gchar *)lparg0, (GError **)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1icon_1new_1for_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1icon_1new_1for_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1icon_1to_1string
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1icon_1to_1string)
+#ifndef NO_g_1icon_1to_1string
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1icon_1to_1string)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1icon_1to_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1icon_1to_1string_FUNC);
rc = (jlong)g_icon_to_string((GIcon *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1icon_1to_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1icon_1to_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1idle_1add
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1idle_1add)
+#ifndef NO_g_1idle_1add
+JNIEXPORT jint JNICALL OS_NATIVE(g_1idle_1add)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1idle_1add_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1idle_1add_FUNC);
rc = (jint)g_idle_add((GSourceFunc)arg0, (gpointer)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1idle_1add_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1idle_1add_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1append
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1append)
+#ifndef NO_g_1list_1append
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1list_1append)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1append_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1append_FUNC);
rc = (jlong)g_list_append((GList *)arg0, (gpointer)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1list_1append_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1list_1append_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1data
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1data)
+#ifndef NO_g_1list_1data
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1list_1data)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1data_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1data_FUNC);
rc = (jlong)g_list_data((GList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1list_1data_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1list_1data_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1list_1free)
+#ifndef NO_g_1list_1free
+JNIEXPORT void JNICALL OS_NATIVE(g_1list_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1list_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1free_FUNC);
g_list_free((GList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1list_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1list_1free_FUNC);
}
#endif
-#ifndef NO__1g_1list_1free_11
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1list_1free_11)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- OS_NATIVE_ENTER(env, that, _1g_1list_1free_11_FUNC);
- g_list_free_1((GList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1list_1free_11_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1list_1last
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1last)
+#ifndef NO_g_1list_1last
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1list_1last)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1last_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1last_FUNC);
rc = (jlong)g_list_last((GList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1list_1last_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1list_1last_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1length
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1list_1length)
+#ifndef NO_g_1list_1length
+JNIEXPORT jint JNICALL OS_NATIVE(g_1list_1length)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1length_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1length_FUNC);
rc = (jint)g_list_length((GList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1list_1length_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1list_1length_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1next
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1next)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_g_1list_1model_1get_1item
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1list_1model_1get_1item)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1next_FUNC);
- rc = (jlong)g_list_next(arg0);
- OS_NATIVE_EXIT(env, that, _1g_1list_1next_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1model_1get_1item_FUNC);
+ rc = (jlong)g_list_model_get_item((GListModel *)arg0, (guint)arg1);
+ OS_NATIVE_EXIT(env, that, g_1list_1model_1get_1item_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1nth
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1nth)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_g_1list_1model_1get_1n_1items
+JNIEXPORT jint JNICALL OS_NATIVE(g_1list_1model_1get_1n_1items)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1nth_FUNC);
- rc = (jlong)g_list_nth((GList *)arg0, (guint)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1list_1nth_FUNC);
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1list_1model_1get_1n_1items_FUNC);
+ rc = (jint)g_list_model_get_n_items((GListModel *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1list_1model_1get_1n_1items_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1nth_1data
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1nth_1data)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_g_1list_1next
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1list_1next)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1nth_1data_FUNC);
- rc = (jlong)g_list_nth_data((GList *)arg0, (guint)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1list_1nth_1data_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1next_FUNC);
+ rc = (jlong)g_list_next(arg0);
+ OS_NATIVE_EXIT(env, that, g_1list_1next_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1prepend
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1prepend)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_g_1list_1nth_1data
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1list_1nth_1data)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1prepend_FUNC);
- rc = (jlong)g_list_prepend((GList *)arg0, (gpointer)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1list_1prepend_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1nth_1data_FUNC);
+ rc = (jlong)g_list_nth_data((GList *)arg0, (guint)arg1);
+ OS_NATIVE_EXIT(env, that, g_1list_1nth_1data_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1previous
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1previous)
+#ifndef NO_g_1list_1previous
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1list_1previous)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1previous_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1list_1previous_FUNC);
rc = (jlong)g_list_previous(arg0);
- OS_NATIVE_EXIT(env, that, _1g_1list_1previous_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1list_1previous_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1list_1remove_1link
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1list_1remove_1link)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1list_1remove_1link_FUNC);
- rc = (jlong)g_list_remove_link((GList *)arg0, (GList *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1list_1remove_1link_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1g_1list_1set_1next
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1list_1set_1next)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- OS_NATIVE_ENTER(env, that, _1g_1list_1set_1next_FUNC);
- g_list_set_next((GList *)arg0, (GList *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1list_1set_1next_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1list_1set_1previous
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1list_1set_1previous)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- OS_NATIVE_ENTER(env, that, _1g_1list_1set_1previous_FUNC);
- g_list_set_previous((GList *)arg0, (GList *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1list_1set_1previous_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1log_1default_1handler
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1log_1default_1handler)
+#ifndef NO_g_1log_1default_1handler
+JNIEXPORT void JNICALL OS_NATIVE(g_1log_1default_1handler)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
- OS_NATIVE_ENTER(env, that, _1g_1log_1default_1handler_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1log_1default_1handler_FUNC);
g_log_default_handler((gchar *)arg0, (GLogLevelFlags)arg1, (gchar *)arg2, (gpointer)arg3);
- OS_NATIVE_EXIT(env, that, _1g_1log_1default_1handler_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1log_1default_1handler_FUNC);
}
#endif
-#ifndef NO__1g_1log_1remove_1handler
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1log_1remove_1handler)
+#ifndef NO_g_1log_1remove_1handler
+JNIEXPORT void JNICALL OS_NATIVE(g_1log_1remove_1handler)
(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
{
jbyte *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1log_1remove_1handler_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1log_1remove_1handler_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
g_log_remove_handler((gchar *)lparg0, (gint)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1log_1remove_1handler_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1log_1remove_1handler_FUNC);
}
#endif
-#ifndef NO__1g_1log_1set_1handler
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1log_1set_1handler)
+#ifndef NO_g_1log_1set_1handler
+JNIEXPORT jint JNICALL OS_NATIVE(g_1log_1set_1handler)
(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jlong arg2, jlong arg3)
{
jbyte *lparg0=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1log_1set_1handler_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1log_1set_1handler_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)g_log_set_handler((gchar *)lparg0, (GLogLevelFlags)arg1, (GLogFunc)arg2, (gpointer)arg3);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1log_1set_1handler_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1log_1set_1handler_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1acquire
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1main_1context_1acquire)
+#ifndef NO_g_1main_1context_1acquire
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1main_1context_1acquire)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1acquire_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1acquire_FUNC);
rc = (jboolean)g_main_context_acquire((GMainContext *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1acquire_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1acquire_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1check
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1main_1context_1check)
+#ifndef NO_g_1main_1context_1check
+JNIEXPORT jint JNICALL OS_NATIVE(g_1main_1context_1check)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jint arg3)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1check_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1check_FUNC);
rc = (jint)g_main_context_check((GMainContext *)arg0, arg1, (GPollFD *)arg2, arg3);
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1check_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1check_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1default
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1main_1context_1default)
+#ifndef NO_g_1main_1context_1default
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1main_1context_1default)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1default_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1default_FUNC);
rc = (jlong)g_main_context_default();
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1default_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1get_1poll_1func
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1main_1context_1get_1poll_1func)
+#ifndef NO_g_1main_1context_1get_1poll_1func
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1main_1context_1get_1poll_1func)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1get_1poll_1func_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1get_1poll_1func_FUNC);
rc = (jlong)g_main_context_get_poll_func((GMainContext *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1get_1poll_1func_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1get_1poll_1func_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1iteration
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1main_1context_1iteration)
+#ifndef NO_g_1main_1context_1iteration
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1main_1context_1iteration)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1iteration_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1iteration_FUNC);
rc = (jboolean)g_main_context_iteration((GMainContext *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1iteration_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1iteration_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1prepare
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1main_1context_1prepare)
+#ifndef NO_g_1main_1context_1prepare
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1main_1context_1prepare)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1prepare_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1prepare_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)g_main_context_prepare((GMainContext *)arg0, (gint *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1prepare_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1prepare_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1query
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1main_1context_1query)
+#ifndef NO_g_1main_1context_1query
+JNIEXPORT jint JNICALL OS_NATIVE(g_1main_1context_1query)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jlong arg3, jint arg4)
{
jint *lparg2=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1query_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1query_FUNC);
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)g_main_context_query((GMainContext *)arg0, arg1, (gint *)lparg2, (GPollFD *)arg3, arg4);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1query_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1query_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1main_1context_1release
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1main_1context_1release)
+#ifndef NO_g_1main_1context_1release
+JNIEXPORT void JNICALL OS_NATIVE(g_1main_1context_1release)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1main_1context_1release_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1release_FUNC);
g_main_context_release((GMainContext *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1main_1context_1release_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1release_FUNC);
}
#endif
-#ifndef NO__1g_1malloc
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1malloc)
+#ifndef NO_g_1main_1context_1wakeup
+JNIEXPORT void JNICALL OS_NATIVE(g_1main_1context_1wakeup)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ OS_NATIVE_ENTER(env, that, g_1main_1context_1wakeup_FUNC);
+ g_main_context_wakeup((GMainContext *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1main_1context_1wakeup_FUNC);
+}
+#endif
+
+#ifndef NO_g_1malloc
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1malloc)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1malloc_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1malloc_FUNC);
rc = (jlong)g_malloc((gulong)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1malloc_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1malloc_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1object_1class_1find_1property
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1object_1class_1find_1property)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+#ifndef NO_g_1memory_1input_1stream_1new_1from_1data
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1memory_1input_1stream_1new_1from_1data)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1memory_1input_1stream_1new_1from_1data_FUNC);
+ rc = (jlong)g_memory_input_stream_new_from_data((const void *)arg0, (gssize)arg1, (GDestroyNotify)arg2);
+ OS_NATIVE_EXIT(env, that, g_1memory_1input_1stream_1new_1from_1data_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1menu_1insert_1item
+JNIEXPORT void JNICALL OS_NATIVE(g_1menu_1insert_1item)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
+{
+ OS_NATIVE_ENTER(env, that, g_1menu_1insert_1item_FUNC);
+ g_menu_insert_item((GMenu *)arg0, arg1, (GMenuItem *)arg2);
+ OS_NATIVE_EXIT(env, that, g_1menu_1insert_1item_FUNC);
+}
+#endif
+
+#ifndef NO_g_1menu_1item_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1menu_1item_1new)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1)
{
+ jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1object_1class_1find_1property_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1menu_1item_1new_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)g_menu_item_new((const gchar *)lparg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ OS_NATIVE_EXIT(env, that, g_1menu_1item_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1menu_1item_1new_1section
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1menu_1item_1new_1section)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1menu_1item_1new_1section_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)g_menu_item_new_section((const gchar *)lparg0, (GMenuModel *)arg1);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ OS_NATIVE_EXIT(env, that, g_1menu_1item_1new_1section_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1menu_1item_1new_1submenu
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1menu_1item_1new_1submenu)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1menu_1item_1new_1submenu_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)g_menu_item_new_submenu((const gchar *)lparg0, (GMenuModel *)arg1);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ OS_NATIVE_EXIT(env, that, g_1menu_1item_1new_1submenu_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1menu_1item_1set_1attribute
+JNIEXPORT void JNICALL OS_NATIVE(g_1menu_1item_1set_1attribute)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2, jlong arg3)
+{
+ jbyte *lparg1=NULL;
+ jbyte *lparg2=NULL;
+ OS_NATIVE_ENTER(env, that, g_1menu_1item_1set_1attribute_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)g_object_class_find_property((GObjectClass *)arg0, (const gchar *)lparg1);
+ if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ g_menu_item_set_attribute((GMenuItem *)arg0, (const gchar *)lparg1, (const gchar *)lparg2, (const gchar *)arg3);
fail:
+ if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1object_1class_1find_1property_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1menu_1item_1set_1attribute_FUNC);
+}
+#endif
+
+#ifndef NO_g_1menu_1item_1set_1label
+JNIEXPORT void JNICALL OS_NATIVE(g_1menu_1item_1set_1label)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+{
+ jbyte *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, g_1menu_1item_1set_1label_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ g_menu_item_set_label((GMenuItem *)arg0, (const gchar *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, g_1menu_1item_1set_1label_FUNC);
+}
+#endif
+
+#ifndef NO_g_1menu_1item_1set_1submenu
+JNIEXPORT void JNICALL OS_NATIVE(g_1menu_1item_1set_1submenu)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1menu_1item_1set_1submenu_FUNC);
+ g_menu_item_set_submenu((GMenuItem *)arg0, (GMenuModel *)arg1);
+ OS_NATIVE_EXIT(env, that, g_1menu_1item_1set_1submenu_FUNC);
+}
+#endif
+
+#ifndef NO_g_1menu_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1menu_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1menu_1new_FUNC);
+ rc = (jlong)g_menu_new();
+ OS_NATIVE_EXIT(env, that, g_1menu_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1object_1get__J_3B_3IJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1get__J_3B_3IJ)
+#ifndef NO_g_1menu_1remove
+JNIEXPORT void JNICALL OS_NATIVE(g_1menu_1remove)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1menu_1remove_FUNC);
+ g_menu_remove((GMenu *)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, g_1menu_1remove_FUNC);
+}
+#endif
+
+#ifndef NO_g_1object_1get__J_3B_3IJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1get__J_3B_3IJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jintArray arg2, jlong arg3)
{
jbyte *lparg1=NULL;
jint *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1get__J_3B_3IJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1get__J_3B_3IJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
g_object_get((GObject *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1object_1get__J_3B_3IJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1get__J_3B_3IJ_FUNC);
}
#endif
-#ifndef NO__1g_1object_1get__J_3B_3JJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1get__J_3B_3JJ)
+#ifndef NO_g_1object_1get__J_3B_3JJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1get__J_3B_3JJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlongArray arg2, jlong arg3)
{
jbyte *lparg1=NULL;
jlong *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1get__J_3B_3JJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1get__J_3B_3JJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
g_object_get((GObject *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1object_1get__J_3B_3JJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1get__J_3B_3JJ_FUNC);
}
#endif
-#ifndef NO__1g_1object_1get_1qdata
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1object_1get_1qdata)
+#ifndef NO_g_1object_1get_1qdata
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1object_1get_1qdata)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1object_1get_1qdata_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1get_1qdata_FUNC);
rc = (jlong)g_object_get_qdata((GObject *)arg0, (GQuark)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1object_1get_1qdata_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1get_1qdata_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1object_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1object_1new)
+#ifndef NO_g_1object_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1object_1new)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1object_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1new_FUNC);
rc = (jlong)g_object_new((GType)arg0, (const gchar *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1object_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1object_1notify
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1notify)
+#ifndef NO_g_1object_1notify
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1notify)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1notify_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1notify_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_object_notify((GObject *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1object_1notify_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1notify_FUNC);
}
#endif
-#ifndef NO__1g_1object_1ref
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1object_1ref)
+#ifndef NO_g_1object_1ref
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1object_1ref)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1object_1ref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1ref_FUNC);
rc = (jlong)g_object_ref((gpointer)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1object_1ref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1ref_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1object_1ref_1sink
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1object_1ref_1sink)
+#ifndef NO_g_1object_1ref_1sink
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1object_1ref_1sink)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1object_1ref_1sink_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1ref_1sink_FUNC);
rc = (jlong)g_object_ref_sink((GObject *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1object_1ref_1sink_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1ref_1sink_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1object_1set__J_3BFJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__J_3BFJ)
+#ifndef NO_g_1object_1set__J_3BFJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1set__J_3BFJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jfloat arg2, jlong arg3)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1set__J_3BFJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1set__J_3BFJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_object_set((gpointer)arg0, (const gchar *)lparg1, arg2, (const gchar *)NULL);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1object_1set__J_3BFJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1set__J_3BFJ_FUNC);
}
#endif
-#ifndef NO__1g_1object_1set__J_3BIJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__J_3BIJ)
+#ifndef NO_g_1object_1set__J_3BIJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1set__J_3BIJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jlong arg3)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1set__J_3BIJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1set__J_3BIJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_object_set((gpointer)arg0, (const gchar *)lparg1, arg2, (const gchar *)NULL);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1object_1set__J_3BIJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1set__J_3BIJ_FUNC);
}
#endif
-#ifndef NO__1g_1object_1set__J_3BJJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__J_3BJJ)
+#ifndef NO_g_1object_1set__J_3BJJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1set__J_3BJJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlong arg3)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1set__J_3BJJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1set__J_3BJJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_object_set((gpointer)arg0, (const gchar *)lparg1, arg2, (const gchar *)NULL);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1object_1set__J_3BJJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1set__J_3BJJ_FUNC);
}
#endif
-#ifndef NO__1g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J)
+#ifndef NO_g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jobject arg2, jlong arg3)
{
jbyte *lparg1=NULL;
GdkRGBA _arg2, *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
g_object_set((gpointer)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
fail:
if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
}
#endif
-#ifndef NO__1g_1object_1set__J_3BZJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__J_3BZJ)
+#ifndef NO_g_1object_1set__J_3BZJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1set__J_3BZJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jboolean arg2, jlong arg3)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1set__J_3BZJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1set__J_3BZJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_object_set((gpointer)arg0, (const gchar *)lparg1, arg2, (const gchar *)NULL);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1object_1set__J_3BZJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1set__J_3BZJ_FUNC);
}
#endif
-#ifndef NO__1g_1object_1set__J_3B_3BJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__J_3B_3BJ)
+#ifndef NO_g_1object_1set__J_3B_3BJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1set__J_3B_3BJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2, jlong arg3)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1object_1set__J_3B_3BJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1set__J_3B_3BJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
g_object_set((gpointer)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1object_1set__J_3B_3BJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1set__J_3B_3BJ_FUNC);
}
#endif
-#ifndef NO__1g_1object_1set_1qdata
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set_1qdata)
+#ifndef NO_g_1object_1set_1qdata
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1set_1qdata)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
- OS_NATIVE_ENTER(env, that, _1g_1object_1set_1qdata_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1set_1qdata_FUNC);
g_object_set_qdata((GObject *)arg0, (GQuark)arg1, (gpointer)arg2);
- OS_NATIVE_EXIT(env, that, _1g_1object_1set_1qdata_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1set_1qdata_FUNC);
}
#endif
-#ifndef NO__1g_1object_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1unref)
+#ifndef NO_g_1object_1unref
+JNIEXPORT void JNICALL OS_NATIVE(g_1object_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1object_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1object_1unref_FUNC);
g_object_unref((gpointer)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1object_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1object_1unref_FUNC);
}
#endif
-#ifndef NO__1g_1quark_1from_1string
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1quark_1from_1string)
+#ifndef NO_g_1quark_1from_1string
+JNIEXPORT jint JNICALL OS_NATIVE(g_1quark_1from_1string)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1quark_1from_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1quark_1from_1string_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)g_quark_from_string((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1quark_1from_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1quark_1from_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1set_1prgname
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1set_1prgname)
+#ifndef NO_g_1set_1prgname
+JNIEXPORT void JNICALL OS_NATIVE(g_1set_1prgname)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1set_1prgname_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1set_1prgname_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
g_set_prgname((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1set_1prgname_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1set_1prgname_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1add_1emission_1hook
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1signal_1add_1emission_1hook)
+#ifndef NO_g_1signal_1add_1emission_1hook
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1signal_1add_1emission_1hook)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jlong arg2, jlong arg3, jlong arg4)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1add_1emission_1hook_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1add_1emission_1hook_FUNC);
rc = (jlong)g_signal_add_emission_hook((guint)arg0, (GQuark)arg1, (GSignalEmissionHook)arg2, (gpointer)arg3, (GDestroyNotify)arg4);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1add_1emission_1hook_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1add_1emission_1hook_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1signal_1connect
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1connect)
+#ifndef NO_g_1signal_1connect
+JNIEXPORT jint JNICALL OS_NATIVE(g_1signal_1connect)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlong arg3)
{
jbyte *lparg1=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1connect_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1connect_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)g_signal_connect((gpointer)arg0, (const gchar *)lparg1, (GCallback)arg2, (gpointer)arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1connect_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1connect_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1signal_1connect_1closure
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1connect_1closure)
+#ifndef NO_g_1signal_1connect_1closure
+JNIEXPORT jint JNICALL OS_NATIVE(g_1signal_1connect_1closure)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jboolean arg3)
{
jbyte *lparg1=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1connect_1closure_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1connect_1closure_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)g_signal_connect_closure((gpointer)arg0, (const gchar *)lparg1, (GClosure *)arg2, (gboolean)arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1connect_1closure_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1connect_1closure_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1signal_1connect_1closure_1by_1id
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1connect_1closure_1by_1id)
+#ifndef NO_g_1signal_1connect_1closure_1by_1id
+JNIEXPORT jint JNICALL OS_NATIVE(g_1signal_1connect_1closure_1by_1id)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jlong arg3, jboolean arg4)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1connect_1closure_1by_1id_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1connect_1closure_1by_1id_FUNC);
rc = (jint)g_signal_connect_closure_by_id((gpointer)arg0, (guint)arg1, (GQuark)arg2, (GClosure *)arg3, (gboolean)arg4);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1connect_1closure_1by_1id_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1connect_1closure_1by_1id_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1signal_1emit_1by_1name__J_3B
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__J_3B)
+#ifndef NO_g_1signal_1emit_1by_1name__J_3B
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1emit_1by_1name__J_3B)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__J_3B_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1emit_1by_1name__J_3B_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3B_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1emit_1by_1name__J_3B_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1emit_1by_1name__J_3BJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__J_3BJ)
+#ifndef NO_g_1signal_1emit_1by_1name__J_3BJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1emit_1by_1name__J_3BJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__J_3BJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1emit_1by_1name__J_3BJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3BJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1emit_1by_1name__J_3BJ_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1emit_1by_1name__J_3BJJ
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__J_3BJJ)
+#ifndef NO_g_1signal_1emit_1by_1name__J_3BJJ
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1emit_1by_1name__J_3BJJ)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlong arg3)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__J_3BJJ_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1emit_1by_1name__J_3BJJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1, arg2, arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3BJJ_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1emit_1by_1name__J_3BJJ_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2)
+#ifndef NO_g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jobject arg2)
{
jbyte *lparg1=NULL;
GdkRectangle _arg2, *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = getGdkRectangleFields(env, arg2, &_arg2)) == NULL) goto fail;
g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1, lparg2);
fail:
if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1emit_1by_1name__J_3B_3B
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__J_3B_3B)
+#ifndef NO_g_1signal_1emit_1by_1name__J_3B_3B
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1emit_1by_1name__J_3B_3B)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__J_3B_3B_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1emit_1by_1name__J_3B_3B_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1, lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3B_3B_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1emit_1by_1name__J_3B_3B_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1handler_1disconnect
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1handler_1disconnect)
+#ifndef NO_g_1signal_1handler_1disconnect
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1handler_1disconnect)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1g_1signal_1handler_1disconnect_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1handler_1disconnect_FUNC);
g_signal_handler_disconnect((gpointer)arg0, (gulong)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1handler_1disconnect_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1signal_1handler_1find
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handler_1find)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jlong arg4, jlong arg5, jlong arg6)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1handler_1find_FUNC);
- rc = (jint)g_signal_handler_find((gpointer)arg0, arg1, arg2, (GQuark)arg3, (GClosure *)arg4, (gpointer)arg5, (gpointer)arg6);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1handler_1find_FUNC);
- return rc;
+ OS_NATIVE_EXIT(env, that, g_1signal_1handler_1disconnect_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1handlers_1block_1matched
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handlers_1block_1matched)
+#ifndef NO_g_1signal_1handlers_1block_1matched
+JNIEXPORT jint JNICALL OS_NATIVE(g_1signal_1handlers_1block_1matched)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jlong arg4, jlong arg5, jlong arg6)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1handlers_1block_1matched_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1handlers_1block_1matched_FUNC);
rc = (jint)g_signal_handlers_block_matched((gpointer)arg0, (GSignalMatchType)arg1, (guint)arg2, (GQuark)arg3, (GClosure *)arg4, (gpointer)arg5, (gpointer)arg6);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1handlers_1block_1matched_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1handlers_1block_1matched_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1signal_1handlers_1unblock_1matched
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handlers_1unblock_1matched)
+#ifndef NO_g_1signal_1handlers_1unblock_1matched
+JNIEXPORT jint JNICALL OS_NATIVE(g_1signal_1handlers_1unblock_1matched)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jlong arg4, jlong arg5, jlong arg6)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1handlers_1unblock_1matched_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1handlers_1unblock_1matched_FUNC);
rc = (jint)g_signal_handlers_unblock_matched((gpointer)arg0, (GSignalMatchType)arg1, (guint)arg2, (GQuark)arg3, (GClosure *)arg4, (gpointer)arg5, (gpointer)arg6);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1handlers_1unblock_1matched_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1handlers_1unblock_1matched_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1signal_1lookup
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1lookup)
+#ifndef NO_g_1signal_1lookup
+JNIEXPORT jint JNICALL OS_NATIVE(g_1signal_1lookup)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
{
jbyte *lparg0=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1lookup_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1lookup_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)g_signal_lookup((const gchar *)lparg0, arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1lookup_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1lookup_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1signal_1remove_1emission_1hook
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1remove_1emission_1hook)
+#ifndef NO_g_1signal_1remove_1emission_1hook
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1remove_1emission_1hook)
(JNIEnv *env, jclass that, jint arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1g_1signal_1remove_1emission_1hook_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1remove_1emission_1hook_FUNC);
g_signal_remove_emission_hook((guint)arg0, (gulong)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1remove_1emission_1hook_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1remove_1emission_1hook_FUNC);
}
#endif
-#ifndef NO__1g_1signal_1stop_1emission_1by_1name
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1stop_1emission_1by_1name)
+#ifndef NO_g_1signal_1stop_1emission_1by_1name
+JNIEXPORT void JNICALL OS_NATIVE(g_1signal_1stop_1emission_1by_1name)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1signal_1stop_1emission_1by_1name_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1signal_1stop_1emission_1by_1name_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
g_signal_stop_emission_by_name((gpointer)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1signal_1stop_1emission_1by_1name_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1signal_1stop_1emission_1by_1name_FUNC);
+}
+#endif
+
+#ifndef NO_g_1simple_1action_1group_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1simple_1action_1group_1new)
+ (JNIEnv *env, jclass that)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1simple_1action_1group_1new_FUNC);
+ rc = (jlong)g_simple_action_group_new();
+ OS_NATIVE_EXIT(env, that, g_1simple_1action_1group_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1simple_1action_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1simple_1action_1new)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1simple_1action_1new_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)g_simple_action_new((const gchar *)lparg0, (const GVariantType *)arg1);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ OS_NATIVE_EXIT(env, that, g_1simple_1action_1new_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1simple_1action_1new_1stateful
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1simple_1action_1new_1stateful)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jlong arg2)
+{
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1simple_1action_1new_1stateful_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)g_simple_action_new_stateful((const gchar *)lparg0, (const GVariantType *)arg1, (GVariant *)arg2);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ OS_NATIVE_EXIT(env, that, g_1simple_1action_1new_1stateful_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1simple_1action_1set_1enabled
+JNIEXPORT void JNICALL OS_NATIVE(g_1simple_1action_1set_1enabled)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1simple_1action_1set_1enabled_FUNC);
+ g_simple_action_set_enabled((GSimpleAction *)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, g_1simple_1action_1set_1enabled_FUNC);
+}
+#endif
+
+#ifndef NO_g_1simple_1action_1set_1state
+JNIEXPORT void JNICALL OS_NATIVE(g_1simple_1action_1set_1state)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1simple_1action_1set_1state_FUNC);
+ g_simple_action_set_state((GSimpleAction *)arg0, (GVariant *)arg1);
+ OS_NATIVE_EXIT(env, that, g_1simple_1action_1set_1state_FUNC);
}
#endif
-#ifndef NO__1g_1slist_1append
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1slist_1append)
+#ifndef NO_g_1slist_1append
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1slist_1append)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1slist_1append_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1slist_1append_FUNC);
rc = (jlong)g_slist_append((GSList *)arg0, (gpointer)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1slist_1append_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1slist_1append_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1slist_1data
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1slist_1data)
+#ifndef NO_g_1slist_1data
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1slist_1data)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1slist_1data_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1slist_1data_FUNC);
rc = (jlong)g_slist_data((GSList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1slist_1data_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1slist_1data_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1slist_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1slist_1free)
+#ifndef NO_g_1slist_1free
+JNIEXPORT void JNICALL OS_NATIVE(g_1slist_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1slist_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1slist_1free_FUNC);
g_slist_free((GSList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1slist_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1slist_1free_FUNC);
}
#endif
-#ifndef NO__1g_1slist_1length
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1slist_1length)
+#ifndef NO_g_1slist_1length
+JNIEXPORT jint JNICALL OS_NATIVE(g_1slist_1length)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1slist_1length_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1slist_1length_FUNC);
rc = (jint)g_slist_length((GSList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1slist_1length_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1slist_1length_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1slist_1next
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1slist_1next)
+#ifndef NO_g_1slist_1next
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1slist_1next)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1slist_1next_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1slist_1next_FUNC);
rc = (jlong)g_slist_next((GSList *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1slist_1next_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1slist_1next_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1source_1remove
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1source_1remove)
+#ifndef NO_g_1source_1remove
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1source_1remove)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1source_1remove_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1source_1remove_FUNC);
rc = (jboolean)g_source_remove((guint)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1source_1remove_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1source_1remove_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1strfreev
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1strfreev)
+#ifndef NO_g_1strdup
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1strdup)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1strfreev_FUNC);
- g_strfreev((gchar **)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1strfreev_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1string_1free
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1string_1free)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1string_1free_FUNC);
- rc = (jlong)g_string_free((GString *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1string_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1strdup_FUNC);
+ rc = (jlong)g_strdup((char *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1strdup_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1string_1new_1len
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1string_1new_1len)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_g_1strfreev
+JNIEXPORT void JNICALL OS_NATIVE(g_1strfreev)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1string_1new_1len_FUNC);
- rc = (jlong)g_string_new_len((const gchar *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1string_1new_1len_FUNC);
- return rc;
+ OS_NATIVE_ENTER(env, that, g_1strfreev_FUNC);
+ g_strfreev((gchar **)arg0);
+ OS_NATIVE_EXIT(env, that, g_1strfreev_FUNC);
}
#endif
-#ifndef NO__1g_1strtod
-JNIEXPORT jdouble JNICALL OS_NATIVE(_1g_1strtod)
+#ifndef NO_g_1strtod
+JNIEXPORT jdouble JNICALL OS_NATIVE(g_1strtod)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jdouble rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1strtod_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1strtod_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jdouble)g_strtod((const gchar *)arg0, (gchar **)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1strtod_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1strtod_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1time_1val_1add
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1time_1val_1add)
+#ifndef NO_g_1time_1val_1add
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL OS_NATIVE(g_1time_1val_1add)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1g_1time_1val_1add_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1time_1val_1add_FUNC);
g_time_val_add((GTimeVal *)arg0, (glong)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1time_1val_1add_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1time_1val_1add_FUNC);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#ifndef NO__1g_1timeout_1add
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1timeout_1add)
+#ifndef NO_g_1timeout_1add
+JNIEXPORT jint JNICALL OS_NATIVE(g_1timeout_1add)
(JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1timeout_1add_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1timeout_1add_FUNC);
rc = (jint)g_timeout_add((guint32)arg0, (GSourceFunc)arg1, (gpointer)arg2);
- OS_NATIVE_EXIT(env, that, _1g_1timeout_1add_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1timeout_1add_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1type_1add_1interface_1static
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1type_1add_1interface_1static)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- OS_NATIVE_ENTER(env, that, _1g_1type_1add_1interface_1static_FUNC);
- g_type_add_interface_static((GType)arg0, (GType)arg1, (const GInterfaceInfo *)arg2);
- OS_NATIVE_EXIT(env, that, _1g_1type_1add_1interface_1static_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1type_1class_1peek
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1type_1class_1peek)
+#ifndef NO_g_1type_1class_1peek
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1type_1class_1peek)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1type_1class_1peek_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1class_1peek_FUNC);
rc = (jlong)g_type_class_peek((GType)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1type_1class_1peek_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1class_1peek_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1type_1class_1peek_1parent
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1type_1class_1peek_1parent)
+#ifndef NO_g_1type_1class_1peek_1parent
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1type_1class_1peek_1parent)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1type_1class_1peek_1parent_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1class_1peek_1parent_FUNC);
rc = (jlong)g_type_class_peek_parent((gpointer)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1type_1class_1peek_1parent_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1class_1peek_1parent_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1type_1class_1ref
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1type_1class_1ref)
+#ifndef NO_g_1type_1class_1ref
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1type_1class_1ref)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1type_1class_1ref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1class_1ref_FUNC);
rc = (jlong)g_type_class_ref((GType)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1type_1class_1ref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1class_1ref_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1type_1class_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1type_1class_1unref)
+#ifndef NO_g_1type_1class_1unref
+JNIEXPORT void JNICALL OS_NATIVE(g_1type_1class_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1type_1class_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1class_1unref_FUNC);
g_type_class_unref((gpointer)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1type_1class_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1class_1unref_FUNC);
}
#endif
-#ifndef NO__1g_1type_1interface_1peek_1parent
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1type_1interface_1peek_1parent)
+#ifndef NO_g_1type_1interface_1peek_1parent
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1type_1interface_1peek_1parent)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1type_1interface_1peek_1parent_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1interface_1peek_1parent_FUNC);
rc = (jlong)g_type_interface_peek_parent((gpointer)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1type_1interface_1peek_1parent_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1interface_1peek_1parent_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1type_1is_1a
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1type_1is_1a)
+#ifndef NO_g_1type_1is_1a
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1type_1is_1a)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1type_1is_1a_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1is_1a_FUNC);
rc = (jboolean)g_type_is_a((GType)arg0, (GType)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1type_1is_1a_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1is_1a_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1type_1parent
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1type_1parent)
+#ifndef NO_g_1type_1parent
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1type_1parent)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1type_1parent_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1parent_FUNC);
rc = (jlong)g_type_parent((GType)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1type_1parent_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1parent_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1type_1query
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1type_1query)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- OS_NATIVE_ENTER(env, that, _1g_1type_1query_FUNC);
- g_type_query((GType)arg0, (GTypeQuery *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1type_1query_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1type_1register_1static
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1type_1register_1static)
+#ifndef NO_g_1type_1register_1static
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1type_1register_1static)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jint arg3)
{
jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1type_1register_1static_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1type_1register_1static_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_type_register_static((GType)arg0, (const gchar *)lparg1, (const GTypeInfo *)arg2, (GTypeFlags)arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1type_1register_1static_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1type_1register_1static_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1unsetenv
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1unsetenv)
+#ifndef NO_g_1unsetenv
+JNIEXPORT void JNICALL OS_NATIVE(g_1unsetenv)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, _1g_1unsetenv_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1unsetenv_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
g_unsetenv((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1unsetenv_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1unsetenv_FUNC);
}
#endif
-#ifndef NO__1g_1utf16_1offset_1to_1pointer
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf16_1offset_1to_1pointer)
+#ifndef NO_g_1utf16_1offset_1to_1pointer
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf16_1offset_1to_1pointer)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf16_1offset_1to_1pointer_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf16_1offset_1to_1pointer_FUNC);
rc = (jlong)g_utf16_offset_to_pointer((const gchar *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1utf16_1offset_1to_1pointer_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf16_1offset_1to_1pointer_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf16_1offset_1to_1utf8_1offset
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf16_1offset_1to_1utf8_1offset)
+#ifndef NO_g_1utf16_1offset_1to_1utf8_1offset
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf16_1offset_1to_1utf8_1offset)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf16_1offset_1to_1utf8_1offset_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf16_1offset_1to_1utf8_1offset_FUNC);
rc = (jlong)g_utf16_offset_to_utf8_offset((const gchar *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1utf16_1offset_1to_1utf8_1offset_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf16_1offset_1to_1utf8_1offset_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf16_1pointer_1to_1offset
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf16_1pointer_1to_1offset)
+#ifndef NO_g_1utf16_1pointer_1to_1offset
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf16_1pointer_1to_1offset)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf16_1pointer_1to_1offset_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf16_1pointer_1to_1offset_FUNC);
rc = (jlong)g_utf16_pointer_to_offset((const gchar *)arg0, (const gchar *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1utf16_1pointer_1to_1offset_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf16_1pointer_1to_1offset_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf16_1strlen
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf16_1strlen)
+#ifndef NO_g_1utf16_1strlen
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf16_1strlen)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf16_1strlen_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf16_1strlen_FUNC);
rc = (jlong)g_utf16_strlen((const gchar *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1utf16_1strlen_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf16_1strlen_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf16_1to_1utf8
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf16_1to_1utf8)
+#ifndef NO_g_1utf16_1to_1utf8
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf16_1to_1utf8)
(JNIEnv *env, jclass that, jcharArray arg0, jlong arg1, jlongArray arg2, jlongArray arg3, jlongArray arg4)
{
jchar *lparg0=NULL;
@@ -16266,7 +12941,7 @@ JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf16_1to_1utf8)
jlong *lparg3=NULL;
jlong *lparg4=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf16_1to_1utf8_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf16_1to_1utf8_FUNC);
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
@@ -16277,56 +12952,56 @@ fail:
if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0);
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1utf16_1to_1utf8_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf16_1to_1utf8_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf8_1offset_1to_1utf16_1offset
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf8_1offset_1to_1utf16_1offset)
+#ifndef NO_g_1utf8_1offset_1to_1utf16_1offset
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf8_1offset_1to_1utf16_1offset)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf8_1offset_1to_1utf16_1offset_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf8_1offset_1to_1utf16_1offset_FUNC);
rc = (jlong)g_utf8_offset_to_utf16_offset((const gchar *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1utf8_1offset_1to_1utf16_1offset_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf8_1offset_1to_1utf16_1offset_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf8_1pointer_1to_1offset
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf8_1pointer_1to_1offset)
+#ifndef NO_g_1utf8_1pointer_1to_1offset
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf8_1pointer_1to_1offset)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf8_1pointer_1to_1offset_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf8_1pointer_1to_1offset_FUNC);
rc = (jlong)g_utf8_pointer_to_offset((const gchar *)arg0, (const gchar *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1utf8_1pointer_1to_1offset_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf8_1pointer_1to_1offset_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf8_1strlen
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf8_1strlen)
+#ifndef NO_g_1utf8_1strlen
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf8_1strlen)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf8_1strlen_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf8_1strlen_FUNC);
rc = (jlong)g_utf8_strlen((const gchar *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1g_1utf8_1strlen_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf8_1strlen_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf8_1to_1utf16__JJ_3J_3J_3J
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf8_1to_1utf16__JJ_3J_3J_3J)
+#ifndef NO_g_1utf8_1to_1utf16__JJ_3J_3J_3J
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf8_1to_1utf16__JJ_3J_3J_3J)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2, jlongArray arg3, jlongArray arg4)
{
jlong *lparg2=NULL;
jlong *lparg3=NULL;
jlong *lparg4=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf8_1to_1utf16__JJ_3J_3J_3J_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf8_1to_1utf16__JJ_3J_3J_3J_FUNC);
if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetPrimitiveArrayCritical(env, arg4, NULL)) == NULL) goto fail;
@@ -16335,13 +13010,13 @@ fail:
if (arg4 && lparg4) (*env)->ReleasePrimitiveArrayCritical(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0);
- OS_NATIVE_EXIT(env, that, _1g_1utf8_1to_1utf16__JJ_3J_3J_3J_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf8_1to_1utf16__JJ_3J_3J_3J_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1utf8_1to_1utf16___3BJ_3J_3J_3J
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf8_1to_1utf16___3BJ_3J_3J_3J)
+#ifndef NO_g_1utf8_1to_1utf16___3BJ_3J_3J_3J
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1utf8_1to_1utf16___3BJ_3J_3J_3J)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jlongArray arg2, jlongArray arg3, jlongArray arg4)
{
jbyte *lparg0=NULL;
@@ -16349,7 +13024,7 @@ JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1utf8_1to_1utf16___3BJ_3J_3J_3J)
jlong *lparg3=NULL;
jlong *lparg4=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1utf8_1to_1utf16___3BJ_3J_3J_3J_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1utf8_1to_1utf16___3BJ_3J_3J_3J_FUNC);
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
@@ -16360,254 +13035,352 @@ fail:
if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0);
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1utf8_1to_1utf16___3BJ_3J_3J_3J_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1utf8_1to_1utf16___3BJ_3J_3J_3J_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1get_1double
+JNIEXPORT jdouble JNICALL OS_NATIVE(g_1value_1get_1double)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jdouble rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1value_1get_1double_FUNC);
+ rc = (jdouble)g_value_get_double((GValue *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1value_1get_1double_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1get_1float
+JNIEXPORT jfloat JNICALL OS_NATIVE(g_1value_1get_1float)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jfloat rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1value_1get_1float_FUNC);
+ rc = (jfloat)g_value_get_float((GValue *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1value_1get_1float_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1get_1int
+JNIEXPORT jint JNICALL OS_NATIVE(g_1value_1get_1int)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1value_1get_1int_FUNC);
+ rc = (jint)g_value_get_int((GValue *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1value_1get_1int_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1get_1int64
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1get_1int64)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1value_1get_1int64_FUNC);
+ rc = (jlong)g_value_get_int64((GValue *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1value_1get_1int64_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1init
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1init)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1value_1init_FUNC);
+ rc = (jlong)g_value_init((GValue *)arg0, (GType)arg1);
+ OS_NATIVE_EXIT(env, that, g_1value_1init_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1value_1peek_1pointer
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1value_1peek_1pointer)
+#ifndef NO_g_1value_1peek_1pointer
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1peek_1pointer)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1value_1peek_1pointer_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1value_1peek_1pointer_FUNC);
rc = (jlong)g_value_peek_pointer((const GValue *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1value_1peek_1pointer_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1value_1peek_1pointer_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1builder_1add_1value
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1variant_1builder_1add_1value)
+#ifndef NO_g_1value_1set_1double
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1double)
+ (JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1value_1set_1double_FUNC);
+ g_value_set_double((GValue *)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, g_1value_1set_1double_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1set_1float
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1float)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1value_1set_1float_FUNC);
+ g_value_set_float((GValue *)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, g_1value_1set_1float_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1set_1int
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1int)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1value_1set_1int_FUNC);
+ g_value_set_int((GValue *)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, g_1value_1set_1int_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1set_1int64
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1int64)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ OS_NATIVE_ENTER(env, that, g_1value_1set_1int64_FUNC);
+ g_value_set_int64((GValue *)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, g_1value_1set_1int64_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1unset
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1unset)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ OS_NATIVE_ENTER(env, that, g_1value_1unset_FUNC);
+ g_value_unset((GValue *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1value_1unset_FUNC);
+}
+#endif
+
+#ifndef NO_g_1variant_1builder_1add_1value
+JNIEXPORT void JNICALL OS_NATIVE(g_1variant_1builder_1add_1value)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1g_1variant_1builder_1add_1value_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1builder_1add_1value_FUNC);
g_variant_builder_add_value((GVariantBuilder *)arg0, (GVariant *)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1builder_1add_1value_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1builder_1add_1value_FUNC);
}
#endif
-#ifndef NO__1g_1variant_1builder_1end
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1builder_1end)
+#ifndef NO_g_1variant_1builder_1end
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1builder_1end)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1builder_1end_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1builder_1end_FUNC);
rc = (jlong)g_variant_builder_end((GVariantBuilder *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1builder_1end_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1builder_1end_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1builder_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1builder_1new)
+#ifndef NO_g_1variant_1builder_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1builder_1new)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1builder_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1builder_1new_FUNC);
rc = (jlong)g_variant_builder_new((const GVariantType *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1builder_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1builder_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1builder_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1variant_1builder_1unref)
+#ifndef NO_g_1variant_1builder_1unref
+JNIEXPORT void JNICALL OS_NATIVE(g_1variant_1builder_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1variant_1builder_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1builder_1unref_FUNC);
g_variant_builder_unref((GVariantBuilder *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1builder_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1builder_1unref_FUNC);
}
#endif
-#ifndef NO__1g_1variant_1get_1boolean
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1variant_1get_1boolean)
+#ifndef NO_g_1variant_1get_1boolean
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1variant_1get_1boolean)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1boolean_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1boolean_FUNC);
rc = (jboolean)g_variant_get_boolean((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1boolean_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1boolean_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1get_1byte
-JNIEXPORT jbyte JNICALL OS_NATIVE(_1g_1variant_1get_1byte)
+#ifndef NO_g_1variant_1get_1byte
+JNIEXPORT jbyte JNICALL OS_NATIVE(g_1variant_1get_1byte)
(JNIEnv *env, jclass that, jlong arg0)
{
jbyte rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1byte_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1byte_FUNC);
rc = (jbyte)g_variant_get_byte((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1byte_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1byte_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1get_1child_1value
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1get_1child_1value)
+#ifndef NO_g_1variant_1get_1child_1value
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1get_1child_1value)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1child_1value_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1child_1value_FUNC);
rc = (jlong)g_variant_get_child_value((GVariant *)arg0, (gsize)arg1);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1child_1value_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1child_1value_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1get_1double
-JNIEXPORT jdouble JNICALL OS_NATIVE(_1g_1variant_1get_1double)
+#ifndef NO_g_1variant_1get_1double
+JNIEXPORT jdouble JNICALL OS_NATIVE(g_1variant_1get_1double)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1double_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1double_FUNC);
rc = (jdouble)g_variant_get_double((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1double_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1double_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1get_1int32
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1variant_1get_1int32)
+#ifndef NO_g_1variant_1get_1int32
+JNIEXPORT jint JNICALL OS_NATIVE(g_1variant_1get_1int32)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1int32_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1int32_FUNC);
rc = (jint)g_variant_get_int32((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1int32_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1int32_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1get_1string
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1get_1string)
+#ifndef NO_g_1variant_1get_1string
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1get_1string)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1string_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_variant_get_string((GVariant *)arg0, (gsize *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1get_1type
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1get_1type)
+#ifndef NO_g_1variant_1get_1type_1string
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1get_1type_1string)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1type_FUNC);
- rc = (jlong)g_variant_get_type((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1type_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1g_1variant_1get_1type_1string
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1get_1type_1string)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1type_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1type_1string_FUNC);
rc = (jlong)g_variant_get_type_string((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1type_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1type_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1get_1uint64
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1get_1uint64)
+#ifndef NO_g_1variant_1get_1uint64
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1get_1uint64)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1get_1uint64_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1get_1uint64_FUNC);
rc = (jlong)g_variant_get_uint64((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1get_1uint64_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1get_1uint64_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1is_1of_1type
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1variant_1is_1of_1type)
+#ifndef NO_g_1variant_1is_1of_1type
+JNIEXPORT jboolean JNICALL OS_NATIVE(g_1variant_1is_1of_1type)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1is_1of_1type_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1is_1of_1type_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)g_variant_is_of_type((GVariant *)arg0, (const GVariantType *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1is_1of_1type_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1is_1of_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1n_1children
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1n_1children)
+#ifndef NO_g_1variant_1n_1children
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1n_1children)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1n_1children_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1n_1children_FUNC);
rc = (jlong)g_variant_n_children((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1n_1children_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1n_1children_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new___3BZ_3B
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new___3BZ_3B)
+#ifndef NO_g_1variant_1new___3BZ_3B
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new___3BZ_3B)
(JNIEnv *env, jclass that, jbyteArray arg0, jboolean arg1, jbyteArray arg2)
{
jbyte *lparg0=NULL;
jbyte *lparg2=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new___3BZ_3B_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new___3BZ_3B_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jlong)g_variant_new((const gchar *)lparg0, (gboolean)arg1, (const gchar *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, JNI_ABORT);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new___3BZ_3B_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new___3BZ_3B_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new___3B_3B
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new___3B_3B)
+#ifndef NO_g_1variant_1new___3B_3B
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new___3B_3B)
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new___3B_3B_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new___3B_3B_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jlong)g_variant_new((const gchar *)lparg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new___3B_3B_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new___3B_3B_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new___3B_3B_3B
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new___3B_3B_3B)
+#ifndef NO_g_1variant_1new___3B_3B_3B
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new___3B_3B_3B)
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new___3B_3B_3B_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new___3B_3B_3B_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
@@ -16616,2054 +13389,1782 @@ fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, JNI_ABORT);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new___3B_3B_3B_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new___3B_3B_3B_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new_1boolean
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new_1boolean)
+#ifndef NO_g_1variant_1new_1boolean
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1boolean)
(JNIEnv *env, jclass that, jboolean arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new_1boolean_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1boolean_FUNC);
rc = (jlong)g_variant_new_boolean((gboolean)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new_1boolean_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1boolean_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new_1byte
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new_1byte)
+#ifndef NO_g_1variant_1new_1byte
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1byte)
(JNIEnv *env, jclass that, jbyte arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new_1byte_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1byte_FUNC);
rc = (jlong)g_variant_new_byte((guchar)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new_1byte_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1byte_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new_1double
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new_1double)
+#ifndef NO_g_1variant_1new_1double
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1double)
(JNIEnv *env, jclass that, jdouble arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new_1double_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1double_FUNC);
rc = (jlong)g_variant_new_double((gboolean)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new_1double_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1double_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new_1int32
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new_1int32)
+#ifndef NO_g_1variant_1new_1int32
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1int32)
(JNIEnv *env, jclass that, jint arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new_1int32_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1int32_FUNC);
rc = (jlong)g_variant_new_int32((gint32)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new_1int32_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1int32_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new_1string
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new_1string)
+#ifndef NO_g_1variant_1new_1string__J
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1string__J)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1string__J_FUNC);
+ rc = (jlong)g_variant_new_string((const gchar *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1string__J_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_g_1variant_1new_1string___3B
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1string___3B)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1string___3B_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_variant_new_string((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1string___3B_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new_1tuple
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new_1tuple)
+#ifndef NO_g_1variant_1new_1tuple
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1tuple)
(JNIEnv *env, jclass that, jlongArray arg0, jlong arg1)
{
jlong *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new_1tuple_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1tuple_FUNC);
if (arg0) if ((lparg0 = (*env)->GetLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_variant_new_tuple((GVariant * const *)lparg0, (gsize)arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseLongArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new_1tuple_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1tuple_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1new_1uint64
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1new_1uint64)
+#ifndef NO_g_1variant_1new_1uint64
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1new_1uint64)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1new_1uint64_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1new_1uint64_FUNC);
rc = (jlong)g_variant_new_uint64(arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1new_1uint64_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1new_1uint64_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1type_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1variant_1type_1free)
+#ifndef NO_g_1variant_1type_1free
+JNIEXPORT void JNICALL OS_NATIVE(g_1variant_1type_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1variant_1type_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1type_1free_FUNC);
g_variant_type_free((GVariantType *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1type_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1type_1free_FUNC);
}
#endif
-#ifndef NO__1g_1variant_1type_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1g_1variant_1type_1new)
+#ifndef NO_g_1variant_1type_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1variant_1type_1new)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1g_1variant_1type_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1type_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)g_variant_type_new((const gchar *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1type_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1type_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1g_1variant_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1variant_1unref)
+#ifndef NO_g_1variant_1unref
+JNIEXPORT void JNICALL OS_NATIVE(g_1variant_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1g_1variant_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, g_1variant_1unref_FUNC);
g_variant_unref((GVariant *)arg0);
- OS_NATIVE_EXIT(env, that, _1g_1variant_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, g_1variant_1unref_FUNC);
}
#endif
-#ifndef NO__1getpid
-JNIEXPORT jint JNICALL OS_NATIVE(_1getpid)
+#ifndef NO_glib_1major_1version
+JNIEXPORT jint JNICALL OS_NATIVE(glib_1major_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1getpid_FUNC);
- rc = (jint)getpid();
- OS_NATIVE_EXIT(env, that, _1getpid_FUNC);
+ OS_NATIVE_ENTER(env, that, glib_1major_1version_FUNC);
+ rc = (jint)glib_major_version;
+ OS_NATIVE_EXIT(env, that, glib_1major_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1glib_1major_1version
-JNIEXPORT jint JNICALL OS_NATIVE(_1glib_1major_1version)
+#ifndef NO_glib_1micro_1version
+JNIEXPORT jint JNICALL OS_NATIVE(glib_1micro_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1glib_1major_1version_FUNC);
- rc = (jint)glib_major_version;
- OS_NATIVE_EXIT(env, that, _1glib_1major_1version_FUNC);
+ OS_NATIVE_ENTER(env, that, glib_1micro_1version_FUNC);
+ rc = (jint)glib_micro_version;
+ OS_NATIVE_EXIT(env, that, glib_1micro_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1glib_1micro_1version
-JNIEXPORT jint JNICALL OS_NATIVE(_1glib_1micro_1version)
+#ifndef NO_glib_1minor_1version
+JNIEXPORT jint JNICALL OS_NATIVE(glib_1minor_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1glib_1micro_1version_FUNC);
- rc = (jint)glib_micro_version;
- OS_NATIVE_EXIT(env, that, _1glib_1micro_1version_FUNC);
+ OS_NATIVE_ENTER(env, that, glib_1minor_1version_FUNC);
+ rc = (jint)glib_minor_version;
+ OS_NATIVE_EXIT(env, that, glib_1minor_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1glib_1minor_1version
-JNIEXPORT jint JNICALL OS_NATIVE(_1glib_1minor_1version)
+#ifndef NO_localeconv_1decimal_1point
+JNIEXPORT jlong JNICALL OS_NATIVE(localeconv_1decimal_1point)
(JNIEnv *env, jclass that)
{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1glib_1minor_1version_FUNC);
- rc = (jint)glib_minor_version;
- OS_NATIVE_EXIT(env, that, _1glib_1minor_1version_FUNC);
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, localeconv_1decimal_1point_FUNC);
+ rc = (jlong)localeconv_decimal_point();
+ OS_NATIVE_EXIT(env, that, localeconv_1decimal_1point_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1background_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1background_1new)
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
+{
+ GTypeInfo _arg1, *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I_FUNC);
+ if (arg1) if ((lparg1 = getGTypeInfoFields(env, arg1, &_arg1)) == NULL) goto fail;
+ memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+ OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
+{
+ GdkRGBA _arg1, *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
+ if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
+ memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+ OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2_FUNC);
+ if (arg1) getGtkCellRendererClassFields(env, arg1, (GtkCellRendererClass *)arg0);
+ OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
+{
+ OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2_FUNC);
+ if (arg1) getGtkWidgetClassFields(env, arg1, (GtkWidgetClass *)arg0);
+ OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
+{
+ PangoAttribute _arg1, *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J_FUNC);
+ if (arg1) if ((lparg1 = getPangoAttributeFields(env, arg1, &_arg1)) == NULL) goto fail;
+ memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+ OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
+{
+ XExposeEvent _arg1, *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J_FUNC);
+ if (arg1) if ((lparg1 = getXExposeEventFields(env, arg1, &_arg1)) == NULL) goto fail;
+ memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+ OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkKeymapKey _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkKeymapKeyFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkRGBA _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GdkRectangle _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGdkRectangleFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ GtkBorder _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setGtkBorderFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
+{
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J_FUNC);
+ if (arg0) setGtkCellRendererClassFields(env, arg0, (GtkCellRendererClass *)arg1);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
+{
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J_FUNC);
+ if (arg0) setGtkWidgetClassFields(env, arg0, (GtkWidgetClass *)arg1);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ PangoAttrColor _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setPangoAttrColorFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ PangoAttrInt _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setPangoAttrIntFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ PangoAttribute _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setPangoAttributeFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ PangoItem _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setPangoItemFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ PangoLayoutLine _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setPangoLayoutLineFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ PangoLayoutRun _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setPangoLayoutRunFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ PangoLogAttr _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setPangoLogAttrFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ XExposeEvent _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setXExposeEventFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+{
+ XFocusChangeEvent _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ_FUNC);
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setXFocusChangeEventFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ_FUNC);
+}
+#endif
+
+#ifndef NO_pango_1attr_1background_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1background_1new)
(JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1background_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1background_1new_FUNC);
rc = (jlong)pango_attr_background_new(arg0, arg1, arg2);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1background_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1background_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1font_1desc_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1font_1desc_1new)
+#ifndef NO_pango_1attr_1font_1desc_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1font_1desc_1new)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1font_1desc_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1font_1desc_1new_FUNC);
rc = (jlong)pango_attr_font_desc_new((const PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1font_1desc_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1font_1desc_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1foreground_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1foreground_1new)
+#ifndef NO_pango_1attr_1foreground_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1foreground_1new)
(JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1foreground_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1foreground_1new_FUNC);
rc = (jlong)pango_attr_foreground_new(arg0, arg1, arg2);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1foreground_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1foreground_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1iterator_1destroy
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1attr_1iterator_1destroy)
+#ifndef NO_pango_1attr_1iterator_1destroy
+JNIEXPORT void JNICALL OS_NATIVE(pango_1attr_1iterator_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1iterator_1destroy_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1iterator_1destroy_FUNC);
pango_attr_iterator_destroy((PangoAttrIterator *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1iterator_1destroy_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1iterator_1destroy_FUNC);
}
#endif
-#ifndef NO__1pango_1attr_1iterator_1get
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1iterator_1get)
+#ifndef NO_pango_1attr_1iterator_1get
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1iterator_1get)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1iterator_1get_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1iterator_1get_FUNC);
rc = (jlong)pango_attr_iterator_get((PangoAttrIterator *)arg0, (PangoAttrType)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1iterator_1get_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1iterator_1get_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1iterator_1next
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1pango_1attr_1iterator_1next)
+#ifndef NO_pango_1attr_1iterator_1next
+JNIEXPORT jboolean JNICALL OS_NATIVE(pango_1attr_1iterator_1next)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1iterator_1next_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1iterator_1next_FUNC);
rc = (jboolean)pango_attr_iterator_next((PangoAttrIterator *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1iterator_1next_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1iterator_1next_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1iterator_1range
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1attr_1iterator_1range)
+#ifndef NO_pango_1attr_1iterator_1range
+JNIEXPORT void JNICALL OS_NATIVE(pango_1attr_1iterator_1range)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1iterator_1range_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1iterator_1range_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
pango_attr_iterator_range((PangoAttrIterator *)arg0, (gint *)lparg1, (gint *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1iterator_1range_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1iterator_1range_FUNC);
}
#endif
-#ifndef NO__1pango_1attr_1list_1get_1iterator
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1list_1get_1iterator)
+#ifndef NO_pango_1attr_1list_1get_1iterator
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1list_1get_1iterator)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1list_1get_1iterator_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1list_1get_1iterator_FUNC);
rc = (jlong)pango_attr_list_get_iterator((PangoAttrList *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1list_1get_1iterator_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1list_1get_1iterator_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1list_1insert
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1attr_1list_1insert)
+#ifndef NO_pango_1attr_1list_1insert
+JNIEXPORT void JNICALL OS_NATIVE(pango_1attr_1list_1insert)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1list_1insert_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1list_1insert_FUNC);
pango_attr_list_insert((PangoAttrList *)arg0, (PangoAttribute *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1list_1insert_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1list_1insert_FUNC);
}
#endif
-#ifndef NO__1pango_1attr_1list_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1list_1new)
+#ifndef NO_pango_1attr_1list_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1list_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1list_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1list_1new_FUNC);
rc = (jlong)pango_attr_list_new();
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1list_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1list_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1list_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1attr_1list_1unref)
+#ifndef NO_pango_1attr_1list_1unref
+JNIEXPORT void JNICALL OS_NATIVE(pango_1attr_1list_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1list_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1list_1unref_FUNC);
pango_attr_list_unref((PangoAttrList *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1list_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1list_1unref_FUNC);
}
#endif
-#ifndef NO__1pango_1attr_1rise_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1rise_1new)
+#ifndef NO_pango_1attr_1rise_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1rise_1new)
(JNIEnv *env, jclass that, jint arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1rise_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1rise_1new_FUNC);
rc = (jlong)pango_attr_rise_new(arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1rise_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1rise_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1shape_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1shape_1new)
+#ifndef NO_pango_1attr_1shape_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1shape_1new)
(JNIEnv *env, jclass that, jobject arg0, jobject arg1)
{
PangoRectangle _arg0, *lparg0=NULL;
PangoRectangle _arg1, *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1shape_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1shape_1new_FUNC);
if (arg0) if ((lparg0 = getPangoRectangleFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getPangoRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jlong)pango_attr_shape_new(lparg0, lparg1);
fail:
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1shape_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1shape_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1strikethrough_1color_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1strikethrough_1color_1new)
+#ifndef NO_pango_1attr_1strikethrough_1color_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1strikethrough_1color_1new)
(JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1strikethrough_1color_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1strikethrough_1color_1new_FUNC);
rc = (jlong)pango_attr_strikethrough_color_new(arg0, arg1, arg2);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1strikethrough_1color_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1strikethrough_1color_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1strikethrough_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1strikethrough_1new)
+#ifndef NO_pango_1attr_1strikethrough_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1strikethrough_1new)
(JNIEnv *env, jclass that, jboolean arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1strikethrough_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1strikethrough_1new_FUNC);
rc = (jlong)pango_attr_strikethrough_new(arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1strikethrough_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1strikethrough_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1underline_1color_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1underline_1color_1new)
+#ifndef NO_pango_1attr_1underline_1color_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1underline_1color_1new)
(JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1underline_1color_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1underline_1color_1new_FUNC);
rc = (jlong)pango_attr_underline_color_new(arg0, arg1, arg2);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1underline_1color_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1underline_1color_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1underline_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1underline_1new)
+#ifndef NO_pango_1attr_1underline_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1underline_1new)
(JNIEnv *env, jclass that, jint arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1underline_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1underline_1new_FUNC);
rc = (jlong)pango_attr_underline_new(arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1underline_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1underline_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attr_1weight_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attr_1weight_1new)
+#ifndef NO_pango_1attr_1weight_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attr_1weight_1new)
(JNIEnv *env, jclass that, jint arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attr_1weight_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attr_1weight_1new_FUNC);
rc = (jlong)pango_attr_weight_new(arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attr_1weight_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attr_1weight_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1attribute_1copy
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1attribute_1copy)
+#ifndef NO_pango_1attribute_1copy
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1attribute_1copy)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1attribute_1copy_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1attribute_1copy_FUNC);
rc = (jlong)pango_attribute_copy((const PangoAttribute *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1attribute_1copy_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1attribute_1copy_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1cairo_1context_1get_1font_1options
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1cairo_1context_1get_1font_1options)
+#ifndef NO_pango_1cairo_1context_1get_1font_1options
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1cairo_1context_1get_1font_1options)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1cairo_1context_1get_1font_1options_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1cairo_1context_1get_1font_1options_FUNC);
rc = (jlong)pango_cairo_context_get_font_options((PangoContext *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1cairo_1context_1get_1font_1options_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1cairo_1context_1get_1font_1options_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1cairo_1context_1set_1font_1options
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1cairo_1context_1set_1font_1options)
+#ifndef NO_pango_1cairo_1context_1set_1font_1options
+JNIEXPORT void JNICALL OS_NATIVE(pango_1cairo_1context_1set_1font_1options)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1cairo_1context_1set_1font_1options_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1cairo_1context_1set_1font_1options_FUNC);
pango_cairo_context_set_font_options((PangoContext *)arg0, ( cairo_font_options_t *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1cairo_1context_1set_1font_1options_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1cairo_1context_1set_1font_1options_FUNC);
}
#endif
-#ifndef NO__1pango_1cairo_1create_1layout
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1cairo_1create_1layout)
+#ifndef NO_pango_1cairo_1create_1layout
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1cairo_1create_1layout)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1cairo_1create_1layout_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1cairo_1create_1layout_FUNC);
rc = (jlong)pango_cairo_create_layout((cairo_t *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1cairo_1create_1layout_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1cairo_1create_1layout_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1cairo_1font_1map_1get_1default
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1cairo_1font_1map_1get_1default)
+#ifndef NO_pango_1cairo_1font_1map_1get_1default
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1cairo_1font_1map_1get_1default)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1cairo_1font_1map_1get_1default_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1cairo_1font_1map_1get_1default_FUNC);
rc = (jlong)pango_cairo_font_map_get_default();
- OS_NATIVE_EXIT(env, that, _1pango_1cairo_1font_1map_1get_1default_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1cairo_1font_1map_1get_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1cairo_1layout_1path
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1cairo_1layout_1path)
+#ifndef NO_pango_1cairo_1layout_1path
+JNIEXPORT void JNICALL OS_NATIVE(pango_1cairo_1layout_1path)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1cairo_1layout_1path_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1cairo_1layout_1path_FUNC);
pango_cairo_layout_path((cairo_t *)arg0, (PangoLayout *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1cairo_1layout_1path_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1cairo_1layout_1path_FUNC);
}
#endif
-#ifndef NO__1pango_1cairo_1show_1layout
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1cairo_1show_1layout)
+#ifndef NO_pango_1cairo_1show_1layout
+JNIEXPORT void JNICALL OS_NATIVE(pango_1cairo_1show_1layout)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1cairo_1show_1layout_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1cairo_1show_1layout_FUNC);
pango_cairo_show_layout((cairo_t *)arg0, (PangoLayout *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1cairo_1show_1layout_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1cairo_1show_1layout_FUNC);
}
#endif
-#ifndef NO__1pango_1context_1get_1base_1dir
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1context_1get_1base_1dir)
+#ifndef NO_pango_1context_1get_1base_1dir
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1context_1get_1base_1dir)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1context_1get_1base_1dir_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1context_1get_1base_1dir_FUNC);
rc = (jint)pango_context_get_base_dir((PangoContext *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1context_1get_1base_1dir_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1context_1get_1base_1dir_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1context_1get_1language
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1context_1get_1language)
+#ifndef NO_pango_1context_1get_1language
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1context_1get_1language)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1context_1get_1language_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1context_1get_1language_FUNC);
rc = (jlong)pango_context_get_language((PangoContext *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1context_1get_1language_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1context_1get_1language_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1context_1get_1metrics
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1context_1get_1metrics)
+#ifndef NO_pango_1context_1get_1metrics
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1context_1get_1metrics)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1context_1get_1metrics_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1context_1get_1metrics_FUNC);
rc = (jlong)pango_context_get_metrics((PangoContext *)arg0, (const PangoFontDescription *)arg1, (PangoLanguage *)arg2);
- OS_NATIVE_EXIT(env, that, _1pango_1context_1get_1metrics_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1context_1get_1metrics_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1context_1list_1families
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1context_1list_1families)
+#ifndef NO_pango_1context_1list_1families
+JNIEXPORT void JNICALL OS_NATIVE(pango_1context_1list_1families)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jintArray arg2)
{
jlong *lparg1=NULL;
jint *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1context_1list_1families_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1context_1list_1families_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
pango_context_list_families((PangoContext *)arg0, (PangoFontFamily ***)lparg1, (int *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1pango_1context_1list_1families_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1context_1list_1families_FUNC);
}
#endif
-#ifndef NO__1pango_1context_1set_1base_1dir
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1context_1set_1base_1dir)
+#ifndef NO_pango_1context_1set_1base_1dir
+JNIEXPORT void JNICALL OS_NATIVE(pango_1context_1set_1base_1dir)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1context_1set_1base_1dir_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1context_1set_1base_1dir_FUNC);
pango_context_set_base_dir((PangoContext *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1context_1set_1base_1dir_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1context_1set_1base_1dir_FUNC);
}
#endif
-#ifndef NO__1pango_1context_1set_1language
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1context_1set_1language)
+#ifndef NO_pango_1context_1set_1language
+JNIEXPORT void JNICALL OS_NATIVE(pango_1context_1set_1language)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1context_1set_1language_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1context_1set_1language_FUNC);
pango_context_set_language((PangoContext *)arg0, (PangoLanguage *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1context_1set_1language_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1context_1set_1language_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1copy
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1description_1copy)
+#ifndef NO_pango_1font_1description_1copy
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1description_1copy)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1copy_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1copy_FUNC);
rc = (jlong)pango_font_description_copy((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1copy_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1copy_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1description_1free)
+#ifndef NO_pango_1font_1description_1free
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1description_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1free_FUNC);
pango_font_description_free((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1free_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1from_1string
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1description_1from_1string)
+#ifndef NO_pango_1font_1description_1from_1string
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1description_1from_1string)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1from_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1from_1string_FUNC);
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
rc = (jlong)pango_font_description_from_string((const char *)lparg0);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1from_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1from_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1get_1family
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1description_1get_1family)
+#ifndef NO_pango_1font_1description_1get_1family
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1description_1get_1family)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1family_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1get_1family_FUNC);
rc = (jlong)pango_font_description_get_family((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1family_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1get_1family_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_pango_1font_1description_1get_1set_1fields
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1description_1get_1set_1fields)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1get_1set_1fields_FUNC);
+ rc = (jint)pango_font_description_get_set_fields((PangoFontDescription *)arg0);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1get_1set_1fields_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1get_1size
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1size)
+#ifndef NO_pango_1font_1description_1get_1size
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1description_1get_1size)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1size_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1get_1size_FUNC);
rc = (jint)pango_font_description_get_size((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1size_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1get_1size_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1get_1stretch
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1stretch)
+#ifndef NO_pango_1font_1description_1get_1stretch
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1description_1get_1stretch)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1stretch_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1get_1stretch_FUNC);
rc = (jint)pango_font_description_get_stretch((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1stretch_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1get_1stretch_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1get_1style
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1style)
+#ifndef NO_pango_1font_1description_1get_1style
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1description_1get_1style)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1style_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1get_1style_FUNC);
rc = (jint)pango_font_description_get_style((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1style_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1get_1style_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1get_1variant
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1variant)
+#ifndef NO_pango_1font_1description_1get_1variant
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1description_1get_1variant)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1variant_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1get_1variant_FUNC);
rc = (jint)pango_font_description_get_variant((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1variant_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1get_1variant_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1get_1weight
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1weight)
+#ifndef NO_pango_1font_1description_1get_1weight
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1description_1get_1weight)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1weight_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1get_1weight_FUNC);
rc = (jint)pango_font_description_get_weight((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1weight_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1get_1weight_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1description_1new)
+#ifndef NO_pango_1font_1description_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1description_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1new_FUNC);
rc = (jlong)pango_font_description_new();
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1description_1set_1family
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1description_1set_1family)
+#ifndef NO_pango_1font_1description_1set_1family
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1description_1set_1family)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1set_1family_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1set_1family_FUNC);
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
pango_font_description_set_family((PangoFontDescription *)arg0, (const char *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1set_1family_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1set_1family_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1set_1size
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1description_1set_1size)
+#ifndef NO_pango_1font_1description_1set_1size
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1description_1set_1size)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1set_1size_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1set_1size_FUNC);
pango_font_description_set_size((PangoFontDescription *)arg0, (gint)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1set_1size_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1set_1size_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1set_1stretch
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1description_1set_1stretch)
+#ifndef NO_pango_1font_1description_1set_1stretch
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1description_1set_1stretch)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1set_1stretch_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1set_1stretch_FUNC);
pango_font_description_set_stretch((PangoFontDescription *)arg0, (PangoStretch)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1set_1stretch_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1set_1stretch_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1set_1style
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1description_1set_1style)
+#ifndef NO_pango_1font_1description_1set_1style
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1description_1set_1style)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1set_1style_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1set_1style_FUNC);
pango_font_description_set_style((PangoFontDescription *)arg0, (PangoStyle)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1set_1style_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1set_1style_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1set_1variant
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1description_1set_1variant)
+#ifndef NO_pango_1font_1description_1set_1variant
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1description_1set_1variant)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1set_1variant_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1set_1variant_FUNC);
pango_font_description_set_variant((PangoFontDescription *)arg0, (PangoVariant)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1set_1variant_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1set_1variant_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1set_1weight
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1description_1set_1weight)
+#ifndef NO_pango_1font_1description_1set_1weight
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1description_1set_1weight)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1set_1weight_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1set_1weight_FUNC);
pango_font_description_set_weight((PangoFontDescription *)arg0, (PangoWeight)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1set_1weight_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1set_1weight_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1description_1to_1string
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1description_1to_1string)
+#ifndef NO_pango_1font_1description_1to_1string
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1description_1to_1string)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1to_1string_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1description_1to_1string_FUNC);
rc = (jlong)pango_font_description_to_string((PangoFontDescription *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1to_1string_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1description_1to_1string_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1face_1describe
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1face_1describe)
+#ifndef NO_pango_1font_1face_1describe
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1face_1describe)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1face_1describe_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1face_1describe_FUNC);
rc = (jlong)pango_font_face_describe((PangoFontFace *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1face_1describe_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1face_1describe_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1family_1get_1name
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1family_1get_1name)
+#ifndef NO_pango_1font_1family_1get_1name
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1family_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1family_1get_1name_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1family_1get_1name_FUNC);
rc = (jlong)pango_font_family_get_name((PangoFontFamily *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1family_1get_1name_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1family_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1family_1list_1faces
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1family_1list_1faces)
+#ifndef NO_pango_1font_1family_1list_1faces
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1family_1list_1faces)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jintArray arg2)
{
jlong *lparg1=NULL;
jint *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1family_1list_1faces_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1family_1list_1faces_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
pango_font_family_list_faces((PangoFontFamily *)arg0, (PangoFontFace ***)lparg1, (int *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1family_1list_1faces_FUNC);
-}
-#endif
-
-#ifndef NO__1pango_1font_1get_1metrics
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1get_1metrics)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1get_1metrics_FUNC);
- rc = (jlong)pango_font_get_metrics((PangoFont *)arg0, (PangoLanguage *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1get_1metrics_FUNC);
- return rc;
+ OS_NATIVE_EXIT(env, that, pango_1font_1family_1list_1faces_FUNC);
}
#endif
-#ifndef NO__1pango_1font_1map_1create_1context
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1font_1map_1create_1context)
+#ifndef NO_pango_1font_1map_1create_1context
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1font_1map_1create_1context)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1map_1create_1context_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1map_1create_1context_FUNC);
rc = (jlong)pango_font_map_create_context((PangoFontMap *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1map_1create_1context_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1map_1create_1context_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1metrics_1get_1approximate_1char_1width
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1metrics_1get_1approximate_1char_1width)
+#ifndef NO_pango_1font_1metrics_1get_1approximate_1char_1width
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1metrics_1get_1approximate_1char_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1metrics_1get_1approximate_1char_1width_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1metrics_1get_1approximate_1char_1width_FUNC);
rc = (jint)pango_font_metrics_get_approximate_char_width((PangoFontMetrics *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1metrics_1get_1approximate_1char_1width_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1metrics_1get_1approximate_1char_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1metrics_1get_1ascent
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1metrics_1get_1ascent)
+#ifndef NO_pango_1font_1metrics_1get_1ascent
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1metrics_1get_1ascent)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1metrics_1get_1ascent_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1metrics_1get_1ascent_FUNC);
rc = (jint)pango_font_metrics_get_ascent((PangoFontMetrics *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1metrics_1get_1ascent_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1metrics_1get_1ascent_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1metrics_1get_1descent
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1metrics_1get_1descent)
+#ifndef NO_pango_1font_1metrics_1get_1descent
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1font_1metrics_1get_1descent)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1font_1metrics_1get_1descent_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1metrics_1get_1descent_FUNC);
rc = (jint)pango_font_metrics_get_descent((PangoFontMetrics *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1metrics_1get_1descent_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1metrics_1get_1descent_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1font_1metrics_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1font_1metrics_1unref)
+#ifndef NO_pango_1font_1metrics_1unref
+JNIEXPORT void JNICALL OS_NATIVE(pango_1font_1metrics_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1pango_1font_1metrics_1unref_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1font_1metrics_1unref_FUNC);
pango_font_metrics_unref((PangoFontMetrics *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1font_1metrics_1unref_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1font_1metrics_1unref_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1context_1changed
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1context_1changed)
+#ifndef NO_pango_1layout_1context_1changed
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1context_1changed)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1context_1changed_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1context_1changed_FUNC);
pango_layout_context_changed((PangoLayout *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1context_1changed_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1context_1changed_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1get_1alignment
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1layout_1get_1alignment)
+#ifndef NO_pango_1layout_1get_1alignment
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1layout_1get_1alignment)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1alignment_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1alignment_FUNC);
rc = (jint)pango_layout_get_alignment((PangoLayout*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1alignment_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1alignment_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1context
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1layout_1get_1context)
+#ifndef NO_pango_1layout_1get_1context
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1layout_1get_1context)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1context_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1context_FUNC);
rc = (jlong)pango_layout_get_context((PangoLayout *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1context_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1context_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1indent
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1layout_1get_1indent)
+#ifndef NO_pango_1layout_1get_1indent
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1layout_1get_1indent)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1indent_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1indent_FUNC);
rc = (jint)pango_layout_get_indent((PangoLayout*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1indent_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1indent_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1iter
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1layout_1get_1iter)
+#ifndef NO_pango_1layout_1get_1iter
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1layout_1get_1iter)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1iter_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1iter_FUNC);
rc = (jlong)pango_layout_get_iter((PangoLayout*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1iter_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1iter_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1justify
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1pango_1layout_1get_1justify)
+#ifndef NO_pango_1layout_1get_1justify
+JNIEXPORT jboolean JNICALL OS_NATIVE(pango_1layout_1get_1justify)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1justify_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1justify_FUNC);
rc = (jboolean)pango_layout_get_justify((PangoLayout*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1justify_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1justify_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1line
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1layout_1get_1line)
+#ifndef NO_pango_1layout_1get_1line
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1layout_1get_1line)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1line_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1line_FUNC);
rc = (jlong)pango_layout_get_line((PangoLayout *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1line_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1line_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1line_1count
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1layout_1get_1line_1count)
+#ifndef NO_pango_1layout_1get_1line_1count
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1layout_1get_1line_1count)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1line_1count_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1line_1count_FUNC);
rc = (jint)pango_layout_get_line_count((PangoLayout*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1line_1count_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1line_1count_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1log_1attrs
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1get_1log_1attrs)
+#ifndef NO_pango_1layout_1get_1log_1attrs
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1get_1log_1attrs)
(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jintArray arg2)
{
jlong *lparg1=NULL;
jint *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1log_1attrs_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1log_1attrs_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
pango_layout_get_log_attrs((PangoLayout*)arg0, (PangoLogAttr **)lparg1, (int *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1log_1attrs_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1log_1attrs_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1get_1pixel_1size
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1get_1pixel_1size)
+#ifndef NO_pango_1layout_1get_1pixel_1size
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1get_1pixel_1size)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1pixel_1size_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1pixel_1size_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
pango_layout_get_pixel_size((PangoLayout *)arg0, (int *)lparg1, (int *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1pixel_1size_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1pixel_1size_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1get_1size
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1get_1size)
+#ifndef NO_pango_1layout_1get_1size
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1get_1size)
(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1size_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1size_FUNC);
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
pango_layout_get_size((PangoLayout *)arg0, (int *)lparg1, (int *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1size_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1size_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1get_1spacing
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1layout_1get_1spacing)
+#ifndef NO_pango_1layout_1get_1spacing
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1layout_1get_1spacing)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1spacing_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1spacing_FUNC);
rc = (jint)pango_layout_get_spacing((PangoLayout*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1spacing_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1spacing_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1text
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1layout_1get_1text)
+#ifndef NO_pango_1layout_1get_1text
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1layout_1get_1text)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1text_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1text_FUNC);
rc = (jlong)pango_layout_get_text((PangoLayout *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1text_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1text_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1get_1width
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1layout_1get_1width)
+#ifndef NO_pango_1layout_1get_1width
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1layout_1get_1width)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1width_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1get_1width_FUNC);
rc = (jint)pango_layout_get_width((PangoLayout *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1width_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1get_1width_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1index_1to_1pos
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1index_1to_1pos)
+#ifndef NO_pango_1layout_1index_1to_1pos
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1index_1to_1pos)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
PangoRectangle _arg2, *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1index_1to_1pos_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1index_1to_1pos_FUNC);
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
pango_layout_index_to_pos((PangoLayout*)arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) setPangoRectangleFields(env, arg2, lparg2);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1index_1to_1pos_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1index_1to_1pos_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1iter_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1iter_1free)
+#ifndef NO_pango_1layout_1iter_1free
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1iter_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1iter_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1iter_1free_FUNC);
pango_layout_iter_free((PangoLayoutIter*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1iter_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1iter_1free_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1iter_1get_1index
-JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1layout_1iter_1get_1index)
+#ifndef NO_pango_1layout_1iter_1get_1index
+JNIEXPORT jint JNICALL OS_NATIVE(pango_1layout_1iter_1get_1index)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1iter_1get_1index_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1iter_1get_1index_FUNC);
rc = (jint)pango_layout_iter_get_index((PangoLayoutIter*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1iter_1get_1index_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1iter_1get_1index_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1iter_1get_1line_1extents
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1iter_1get_1line_1extents)
+#ifndef NO_pango_1layout_1iter_1get_1line_1extents
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1iter_1get_1line_1extents)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jobject arg2)
{
PangoRectangle _arg1, *lparg1=NULL;
PangoRectangle _arg2, *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1iter_1get_1line_1extents_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1iter_1get_1line_1extents_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
pango_layout_iter_get_line_extents((PangoLayoutIter*)arg0, lparg1, lparg2);
fail:
if (arg2 && lparg2) setPangoRectangleFields(env, arg2, lparg2);
if (arg1 && lparg1) setPangoRectangleFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1iter_1get_1line_1extents_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1iter_1get_1line_1extents_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1iter_1get_1run
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1layout_1iter_1get_1run)
+#ifndef NO_pango_1layout_1iter_1get_1run
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1layout_1iter_1get_1run)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1iter_1get_1run_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1iter_1get_1run_FUNC);
rc = (jlong)pango_layout_iter_get_run((PangoLayoutIter*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1iter_1get_1run_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1iter_1get_1run_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1iter_1next_1line
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1pango_1layout_1iter_1next_1line)
+#ifndef NO_pango_1layout_1iter_1next_1line
+JNIEXPORT jboolean JNICALL OS_NATIVE(pango_1layout_1iter_1next_1line)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1iter_1next_1line_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1iter_1next_1line_FUNC);
rc = (jboolean)pango_layout_iter_next_line((PangoLayoutIter*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1iter_1next_1line_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1iter_1next_1line_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1iter_1next_1run
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1pango_1layout_1iter_1next_1run)
+#ifndef NO_pango_1layout_1iter_1next_1run
+JNIEXPORT jboolean JNICALL OS_NATIVE(pango_1layout_1iter_1next_1run)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1iter_1next_1run_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1iter_1next_1run_FUNC);
rc = (jboolean)pango_layout_iter_next_run((PangoLayoutIter*)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1iter_1next_1run_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1iter_1next_1run_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1line_1get_1extents
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1line_1get_1extents)
+#ifndef NO_pango_1layout_1line_1get_1extents
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1line_1get_1extents)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jobject arg2)
{
PangoRectangle _arg1, *lparg1=NULL;
PangoRectangle _arg2, *lparg2=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1line_1get_1extents_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1line_1get_1extents_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
pango_layout_line_get_extents((PangoLayoutLine*)arg0, (PangoRectangle *)lparg1, (PangoRectangle *)lparg2);
fail:
if (arg2 && lparg2) setPangoRectangleFields(env, arg2, lparg2);
if (arg1 && lparg1) setPangoRectangleFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1line_1get_1extents_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1line_1get_1extents_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1layout_1new)
+#ifndef NO_pango_1layout_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1layout_1new)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1new_FUNC);
rc = (jlong)pango_layout_new((PangoContext *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1layout_1set_1alignment
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1alignment)
+#ifndef NO_pango_1layout_1set_1alignment
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1alignment)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1alignment_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1alignment_FUNC);
pango_layout_set_alignment((PangoLayout *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1alignment_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1alignment_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1attributes
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1attributes)
+#ifndef NO_pango_1layout_1set_1attributes
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1attributes)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1attributes_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1attributes_FUNC);
pango_layout_set_attributes((PangoLayout *)arg0, (PangoAttrList *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1attributes_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1attributes_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1auto_1dir
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1auto_1dir)
+#ifndef NO_pango_1layout_1set_1auto_1dir
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1auto_1dir)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1auto_1dir_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1auto_1dir_FUNC);
pango_layout_set_auto_dir((PangoLayout *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1auto_1dir_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1auto_1dir_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1font_1description
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1font_1description)
+#ifndef NO_pango_1layout_1set_1font_1description
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1font_1description)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1font_1description_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1font_1description_FUNC);
pango_layout_set_font_description((PangoLayout *)arg0, (PangoFontDescription *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1font_1description_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1font_1description_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1indent
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1indent)
+#ifndef NO_pango_1layout_1set_1indent
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1indent)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1indent_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1indent_FUNC);
pango_layout_set_indent((PangoLayout*)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1indent_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1indent_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1justify
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1justify)
+#ifndef NO_pango_1layout_1set_1justify
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1justify)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1justify_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1justify_FUNC);
pango_layout_set_justify((PangoLayout*)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1justify_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1justify_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1single_1paragraph_1mode
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1single_1paragraph_1mode)
+#ifndef NO_pango_1layout_1set_1single_1paragraph_1mode
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1single_1paragraph_1mode)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1single_1paragraph_1mode_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1single_1paragraph_1mode_FUNC);
pango_layout_set_single_paragraph_mode((PangoLayout *)arg0, (gboolean)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1single_1paragraph_1mode_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1single_1paragraph_1mode_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1spacing
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1spacing)
+#ifndef NO_pango_1layout_1set_1spacing
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1spacing)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1spacing_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1spacing_FUNC);
pango_layout_set_spacing((PangoLayout *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1spacing_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1spacing_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1tabs
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1tabs)
+#ifndef NO_pango_1layout_1set_1tabs
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1tabs)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1tabs_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1tabs_FUNC);
pango_layout_set_tabs((PangoLayout *)arg0, (PangoTabArray *)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1tabs_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1tabs_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1text
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1text)
+#ifndef NO_pango_1layout_1set_1text
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1text)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1text_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1text_FUNC);
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
pango_layout_set_text((PangoLayout *)arg0, (const char *)lparg1, (int)arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1text_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1text_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1width
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1width)
+#ifndef NO_pango_1layout_1set_1width
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1width)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1width_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1width_FUNC);
pango_layout_set_width((PangoLayout *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1width_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1width_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1set_1wrap
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1set_1wrap)
+#ifndef NO_pango_1layout_1set_1wrap
+JNIEXPORT void JNICALL OS_NATIVE(pango_1layout_1set_1wrap)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1set_1wrap_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1set_1wrap_FUNC);
pango_layout_set_wrap((PangoLayout *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1set_1wrap_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1set_1wrap_FUNC);
}
#endif
-#ifndef NO__1pango_1layout_1xy_1to_1index
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1pango_1layout_1xy_1to_1index)
+#ifndef NO_pango_1layout_1xy_1to_1index
+JNIEXPORT jboolean JNICALL OS_NATIVE(pango_1layout_1xy_1to_1index)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3, jintArray arg4)
{
jint *lparg3=NULL;
jint *lparg4=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1layout_1xy_1to_1index_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1layout_1xy_1to_1index_FUNC);
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
rc = (jboolean)pango_layout_xy_to_index((PangoLayout *)arg0, arg1, arg2, (int *)lparg3, (int *)lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- OS_NATIVE_EXIT(env, that, _1pango_1layout_1xy_1to_1index_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1layout_1xy_1to_1index_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1tab_1array_1free
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1tab_1array_1free)
+#ifndef NO_pango_1tab_1array_1free
+JNIEXPORT void JNICALL OS_NATIVE(pango_1tab_1array_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- OS_NATIVE_ENTER(env, that, _1pango_1tab_1array_1free_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1tab_1array_1free_FUNC);
pango_tab_array_free((PangoTabArray *)arg0);
- OS_NATIVE_EXIT(env, that, _1pango_1tab_1array_1free_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1tab_1array_1free_FUNC);
}
#endif
-#ifndef NO__1pango_1tab_1array_1new
-JNIEXPORT jlong JNICALL OS_NATIVE(_1pango_1tab_1array_1new)
+#ifndef NO_pango_1tab_1array_1new
+JNIEXPORT jlong JNICALL OS_NATIVE(pango_1tab_1array_1new)
(JNIEnv *env, jclass that, jint arg0, jboolean arg1)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1pango_1tab_1array_1new_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1tab_1array_1new_FUNC);
rc = (jlong)pango_tab_array_new((gint)arg0, (gboolean)arg1);
- OS_NATIVE_EXIT(env, that, _1pango_1tab_1array_1new_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1tab_1array_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1pango_1tab_1array_1set_1tab
-JNIEXPORT void JNICALL OS_NATIVE(_1pango_1tab_1array_1set_1tab)
+#ifndef NO_pango_1tab_1array_1set_1tab
+JNIEXPORT void JNICALL OS_NATIVE(pango_1tab_1array_1set_1tab)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jint arg3)
{
- OS_NATIVE_ENTER(env, that, _1pango_1tab_1array_1set_1tab_FUNC);
+ OS_NATIVE_ENTER(env, that, pango_1tab_1array_1set_1tab_FUNC);
pango_tab_array_set_tab((PangoTabArray *)arg0, (gint)arg1, (PangoTabAlign)arg2, (gint)arg3);
- OS_NATIVE_EXIT(env, that, _1pango_1tab_1array_1set_1tab_FUNC);
-}
-#endif
-
-#ifndef NO__1swt_1debug_1on_1fatal_1warnings
-JNIEXPORT void JNICALL OS_NATIVE(_1swt_1debug_1on_1fatal_1warnings)
- (JNIEnv *env, jclass that)
-{
- OS_NATIVE_ENTER(env, that, _1swt_1debug_1on_1fatal_1warnings_FUNC);
- swt_debug_on_fatal_warnings();
- OS_NATIVE_EXIT(env, that, _1swt_1debug_1on_1fatal_1warnings_FUNC);
+ OS_NATIVE_EXIT(env, that, pango_1tab_1array_1set_1tab_FUNC);
}
#endif
-#ifndef NO__1swt_1fixed_1accessible_1get_1type
-JNIEXPORT jlong JNICALL OS_NATIVE(_1swt_1fixed_1accessible_1get_1type)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1swt_1fixed_1accessible_1get_1type_FUNC);
- rc = (jlong)swt_fixed_accessible_get_type();
- OS_NATIVE_EXIT(env, that, _1swt_1fixed_1accessible_1get_1type_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1swt_1fixed_1accessible_1register_1accessible
-JNIEXPORT void JNICALL OS_NATIVE(_1swt_1fixed_1accessible_1register_1accessible)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1, jlong arg2)
-{
- OS_NATIVE_ENTER(env, that, _1swt_1fixed_1accessible_1register_1accessible_FUNC);
- swt_fixed_accessible_register_accessible((AtkObject*)arg0, (gboolean)arg1, (GtkWidget *)arg2);
- OS_NATIVE_EXIT(env, that, _1swt_1fixed_1accessible_1register_1accessible_FUNC);
-}
-#endif
-
-#ifndef NO__1swt_1fixed_1get_1type
-JNIEXPORT jlong JNICALL OS_NATIVE(_1swt_1fixed_1get_1type)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1swt_1fixed_1get_1type_FUNC);
- rc = (jlong)swt_fixed_get_type();
- OS_NATIVE_EXIT(env, that, _1swt_1fixed_1get_1type_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1swt_1fixed_1move
-JNIEXPORT void JNICALL OS_NATIVE(_1swt_1fixed_1move)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
-{
- OS_NATIVE_ENTER(env, that, _1swt_1fixed_1move_FUNC);
- swt_fixed_move((SwtFixed*)arg0, (GtkWidget*)arg1, arg2, arg3);
- OS_NATIVE_EXIT(env, that, _1swt_1fixed_1move_FUNC);
-}
-#endif
-
-#ifndef NO__1swt_1fixed_1resize
-JNIEXPORT void JNICALL OS_NATIVE(_1swt_1fixed_1resize)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
-{
- OS_NATIVE_ENTER(env, that, _1swt_1fixed_1resize_FUNC);
- swt_fixed_resize((SwtFixed*)arg0, (GtkWidget*)arg1, arg2, arg3);
- OS_NATIVE_EXIT(env, that, _1swt_1fixed_1resize_FUNC);
-}
-#endif
-
-#ifndef NO__1swt_1fixed_1restack
-JNIEXPORT void JNICALL OS_NATIVE(_1swt_1fixed_1restack)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3)
-{
- OS_NATIVE_ENTER(env, that, _1swt_1fixed_1restack_FUNC);
- swt_fixed_restack((SwtFixed*)arg0, (GtkWidget*)arg1, (GtkWidget*)arg2, arg3);
- OS_NATIVE_EXIT(env, that, _1swt_1fixed_1restack_FUNC);
-}
-#endif
-
-#ifndef NO__1ubuntu_1menu_1proxy_1get
-JNIEXPORT jlong JNICALL OS_NATIVE(_1ubuntu_1menu_1proxy_1get)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, _1ubuntu_1menu_1proxy_1get_FUNC);
-/*
- rc = (jlong)ubuntu_menu_proxy_get();
-*/
- {
- OS_LOAD_FUNCTION(fp, ubuntu_menu_proxy_get)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
- }
- }
- OS_NATIVE_EXIT(env, that, _1ubuntu_1menu_1proxy_1get_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_g_1main_1context_1wakeup
-JNIEXPORT void JNICALL OS_NATIVE(g_1main_1context_1wakeup)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- OS_NATIVE_ENTER(env, that, g_1main_1context_1wakeup_FUNC);
- g_main_context_wakeup((GMainContext *)arg0);
- OS_NATIVE_EXIT(env, that, g_1main_1context_1wakeup_FUNC);
-}
-#endif
-
-#ifndef NO_g_1strdup
-JNIEXPORT jlong JNICALL OS_NATIVE(g_1strdup)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_realpath
+JNIEXPORT jlong JNICALL OS_NATIVE(realpath)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1)
{
+ jbyte *lparg0=NULL;
+ jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, g_1strdup_FUNC);
- rc = (jlong)g_strdup((char *)arg0);
- OS_NATIVE_EXIT(env, that, g_1strdup_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_g_1value_1get_1double
-JNIEXPORT jdouble JNICALL OS_NATIVE(g_1value_1get_1double)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jdouble rc = 0;
- OS_NATIVE_ENTER(env, that, g_1value_1get_1double_FUNC);
- rc = (jdouble)g_value_get_double((GValue *)arg0);
- OS_NATIVE_EXIT(env, that, g_1value_1get_1double_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_g_1value_1get_1float
-JNIEXPORT jfloat JNICALL OS_NATIVE(g_1value_1get_1float)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jfloat rc = 0;
- OS_NATIVE_ENTER(env, that, g_1value_1get_1float_FUNC);
- rc = (jfloat)g_value_get_float((GValue *)arg0);
- OS_NATIVE_EXIT(env, that, g_1value_1get_1float_FUNC);
+ OS_NATIVE_ENTER(env, that, realpath_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jlong)realpath((const char *)lparg0, (char *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ OS_NATIVE_EXIT(env, that, realpath_FUNC);
return rc;
}
#endif
-#ifndef NO_g_1value_1get_1int
-JNIEXPORT jint JNICALL OS_NATIVE(g_1value_1get_1int)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_strcmp
+JNIEXPORT jint JNICALL OS_NATIVE(strcmp)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
+ jbyte *lparg1=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, g_1value_1get_1int_FUNC);
- rc = (jint)g_value_get_int((GValue *)arg0);
- OS_NATIVE_EXIT(env, that, g_1value_1get_1int_FUNC);
+ OS_NATIVE_ENTER(env, that, strcmp_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jint)strcmp((const char*)arg0, (const char*)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, strcmp_FUNC);
return rc;
}
#endif
-#ifndef NO_g_1value_1get_1int64
-JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1get_1int64)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_swt_1debug_1on_1fatal_1warnings
+JNIEXPORT void JNICALL OS_NATIVE(swt_1debug_1on_1fatal_1warnings)
+ (JNIEnv *env, jclass that)
{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, g_1value_1get_1int64_FUNC);
- rc = (jlong)g_value_get_int64((GValue *)arg0);
- OS_NATIVE_EXIT(env, that, g_1value_1get_1int64_FUNC);
- return rc;
+ OS_NATIVE_ENTER(env, that, swt_1debug_1on_1fatal_1warnings_FUNC);
+ swt_debug_on_fatal_warnings();
+ OS_NATIVE_EXIT(env, that, swt_1debug_1on_1fatal_1warnings_FUNC);
}
#endif
-#ifndef NO_g_1value_1init
-JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1init)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_swt_1fixed_1accessible_1get_1type
+JNIEXPORT jlong JNICALL OS_NATIVE(swt_1fixed_1accessible_1get_1type)
+ (JNIEnv *env, jclass that)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, g_1value_1init_FUNC);
- rc = (jlong)g_value_init((GValue *)arg0, (GType)arg1);
- OS_NATIVE_EXIT(env, that, g_1value_1init_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1accessible_1get_1type_FUNC);
+ rc = (jlong)swt_fixed_accessible_get_type();
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1accessible_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO_g_1value_1set_1double
-JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1double)
- (JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
-{
- OS_NATIVE_ENTER(env, that, g_1value_1set_1double_FUNC);
- g_value_set_double((GValue *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, g_1value_1set_1double_FUNC);
-}
-#endif
-
-#ifndef NO_g_1value_1set_1float
-JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1float)
- (JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
-{
- OS_NATIVE_ENTER(env, that, g_1value_1set_1float_FUNC);
- g_value_set_float((GValue *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, g_1value_1set_1float_FUNC);
-}
-#endif
-
-#ifndef NO_g_1value_1set_1int
-JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1int)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_swt_1fixed_1accessible_1register_1accessible
+JNIEXPORT void JNICALL OS_NATIVE(swt_1fixed_1accessible_1register_1accessible)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1, jlong arg2)
{
- OS_NATIVE_ENTER(env, that, g_1value_1set_1int_FUNC);
- g_value_set_int((GValue *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, g_1value_1set_1int_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1accessible_1register_1accessible_FUNC);
+ swt_fixed_accessible_register_accessible((AtkObject*)arg0, (gboolean)arg1, (GtkWidget *)arg2);
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1accessible_1register_1accessible_FUNC);
}
#endif
-#ifndef NO_g_1value_1set_1int64
-JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1int64)
+#ifndef NO_swt_1fixed_1add
+JNIEXPORT void JNICALL OS_NATIVE(swt_1fixed_1add)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- OS_NATIVE_ENTER(env, that, g_1value_1set_1int64_FUNC);
- g_value_set_int64((GValue *)arg0, arg1);
- OS_NATIVE_EXIT(env, that, g_1value_1set_1int64_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1add_FUNC);
+ swt_fixed_add((SwtFixed*)arg0, (GtkWidget*)arg1);
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1add_FUNC);
}
#endif
-#ifndef NO_g_1value_1unset
-JNIEXPORT void JNICALL OS_NATIVE(g_1value_1unset)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- OS_NATIVE_ENTER(env, that, g_1value_1unset_FUNC);
- g_value_unset((GValue *)arg0);
- OS_NATIVE_EXIT(env, that, g_1value_1unset_FUNC);
-}
-#endif
-
-#ifndef NO_localeconv_1decimal_1point
-JNIEXPORT jlong JNICALL OS_NATIVE(localeconv_1decimal_1point)
+#ifndef NO_swt_1fixed_1get_1type
+JNIEXPORT jlong JNICALL OS_NATIVE(swt_1fixed_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, localeconv_1decimal_1point_FUNC);
- rc = (jlong)localeconv_decimal_point();
- OS_NATIVE_EXIT(env, that, localeconv_1decimal_1point_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1get_1type_FUNC);
+ rc = (jlong)swt_fixed_get_type();
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
-{
- GInterfaceInfo _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_FUNC);
- if (arg1) if ((lparg1 = getGInterfaceInfoFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GObjectClass_2
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GObjectClass_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GObjectClass_2_FUNC);
- if (arg1) getGObjectClassFields(env, arg1, (GObjectClass *)arg0);
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GObjectClass_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
-{
- GTypeInfo _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I_FUNC);
- if (arg1) if ((lparg1 = getGTypeInfoFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
-{
- GdkEventButton _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J_FUNC);
- if (arg1) if ((lparg1 = getGdkEventButtonFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
-{
- GdkEventKey _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J_FUNC);
- if (arg1) if ((lparg1 = getGdkEventKeyFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
-{
- GdkRGBA _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
- if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2_FUNC);
- if (arg1) getGtkCellRendererClassFields(env, arg1, (GtkCellRendererClass *)arg0);
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
-{
- GtkTargetEntry _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J_FUNC);
- if (arg1) if ((lparg1 = getGtkTargetEntryFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
-{
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2_FUNC);
- if (arg1) getGtkWidgetClassFields(env, arg1, (GtkWidgetClass *)arg0);
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
-{
- PangoAttribute _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J_FUNC);
- if (arg1) if ((lparg1 = getPangoAttributeFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
-{
- XExposeEvent _arg1, *lparg1=NULL;
- OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J_FUNC);
- if (arg1) if ((lparg1 = getXExposeEventFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
-{
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J_FUNC);
- if (arg0) setGObjectClassFields(env, arg0, (GObjectClass *)arg1);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GTypeQuery _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGTypeQueryFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkEventButton _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkEventButtonFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkEventCrossing _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkEventCrossingFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkEventFocus _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkEventFocusFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkEventKey _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkEventKeyFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkEventMotion _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkEventMotionFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkEventWindowState _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkEventWindowStateFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkKeymapKey _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkKeymapKeyFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkRGBA _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GdkRectangle _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGdkRectangleFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- GtkBorder _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setGtkBorderFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
-{
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J_FUNC);
- if (arg0) setGtkCellRendererClassFields(env, arg0, (GtkCellRendererClass *)arg1);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
-{
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J_FUNC);
- if (arg0) setGtkWidgetClassFields(env, arg0, (GtkWidgetClass *)arg1);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- PangoAttrColor _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setPangoAttrColorFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrColor_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- PangoAttrInt _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setPangoAttrIntFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttrInt_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- PangoAttribute _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setPangoAttributeFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
-{
- PangoItem _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setPangoItemFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2JJ_FUNC);
-}
-#endif
-
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+#ifndef NO_swt_1fixed_1move
+JNIEXPORT void JNICALL OS_NATIVE(swt_1fixed_1move)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
- PangoLayoutLine _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setPangoLayoutLineFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2JJ_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1move_FUNC);
+ swt_fixed_move((SwtFixed*)arg0, (GtkWidget*)arg1, arg2, arg3);
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1move_FUNC);
}
#endif
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+#ifndef NO_swt_1fixed_1remove
+JNIEXPORT void JNICALL OS_NATIVE(swt_1fixed_1remove)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- PangoLayoutRun _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setPangoLayoutRunFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2JJ_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1remove_FUNC);
+ swt_fixed_remove((SwtFixed*)arg0, (GtkWidget*)arg1);
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1remove_FUNC);
}
#endif
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+#ifndef NO_swt_1fixed_1resize
+JNIEXPORT void JNICALL OS_NATIVE(swt_1fixed_1resize)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
- PangoLogAttr _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setPangoLogAttrFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1resize_FUNC);
+ swt_fixed_resize((SwtFixed*)arg0, (GtkWidget*)arg1, arg2, arg3);
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1resize_FUNC);
}
#endif
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+#ifndef NO_swt_1fixed_1restack
+JNIEXPORT void JNICALL OS_NATIVE(swt_1fixed_1restack)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jboolean arg3)
{
- XExposeEvent _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setXExposeEventFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1fixed_1restack_FUNC);
+ swt_fixed_restack((SwtFixed*)arg0, (GtkWidget*)arg1, (GtkWidget*)arg2, arg3);
+ OS_NATIVE_EXIT(env, that, swt_1fixed_1restack_FUNC);
}
#endif
-#ifndef NO_memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ)
- (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
+#ifndef NO_swt_1set_1lock_1functions
+JNIEXPORT void JNICALL OS_NATIVE(swt_1set_1lock_1functions)
+ (JNIEnv *env, jclass that)
{
- XFocusChangeEvent _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ_FUNC);
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
- if (arg0 && lparg0) setXFocusChangeEventFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2JJ_FUNC);
+ OS_NATIVE_ENTER(env, that, swt_1set_1lock_1functions_FUNC);
+ swt_set_lock_functions();
+ OS_NATIVE_EXIT(env, that, swt_1set_1lock_1functions_FUNC);
}
#endif
-#ifndef NO_realpath
-JNIEXPORT jlong JNICALL OS_NATIVE(realpath)
- (JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1)
+#ifndef NO_ubuntu_1menu_1proxy_1get
+JNIEXPORT jlong JNICALL OS_NATIVE(ubuntu_1menu_1proxy_1get)
+ (JNIEnv *env, jclass that)
{
- jbyte *lparg0=NULL;
- jbyte *lparg1=NULL;
jlong rc = 0;
- OS_NATIVE_ENTER(env, that, realpath_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jlong)realpath((const char *)lparg0, (char *)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, realpath_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_strcmp
-JNIEXPORT jint JNICALL OS_NATIVE(strcmp)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, strcmp_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jint)strcmp((const char*)arg0, (const char*)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, strcmp_FUNC);
+ OS_NATIVE_ENTER(env, that, ubuntu_1menu_1proxy_1get_FUNC);
+/*
+ rc = (jlong)ubuntu_menu_proxy_get();
+*/
+ {
+ OS_LOAD_FUNCTION(fp, ubuntu_menu_proxy_get)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
+ }
+ }
+ OS_NATIVE_EXIT(env, that, ubuntu_1menu_1proxy_1get_FUNC);
return rc;
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index 98f86dd750..b0a074fc45 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -41,30 +41,24 @@
#else
#include <windows.h>
//#define NO_realpath // TODO [win32] use GetFullPathName instead;
-#define NO_RTLD_1GLOBAL
-#define NO_RTLD_1LAZY
-#define NO_RTLD_1NOW
-#define NO__1dlclose
-#define NO__1dlopen
-#define NO__1dlsym
-
-#define NO__1gtk_1enumerate_1printers
-#define NO__1gtk_1printer_1get_1name
-#define NO__1gtk_1printer_1is_1default
-#define NO__1gtk_1print_1job_1get_1surface
-#define NO__1gtk_1print_1unix_1dialog_1get_1current_1page
-#define NO__1gtk_1print_1unix_1dialog_1get_1selected_1printer
-#define NO__1gtk_1print_1unix_1dialog_1get_1settings
-#define NO__1gtk_1print_1unix_1dialog_1set_1settings
-#define NO__1gtk_1print_1unix_1dialog_1get_1page_1setup
-#define NO__1gtk_1print_1unix_1dialog_1set_1page_1setup
-#define NO__1gtk_1printer_1get_1backend
-#define NO__1gtk_1print_1unix_1dialog_1new
-#define NO__1gtk_1print_1job_1new
-#define NO__1gtk_1print_1job_1send
-#define NO__1gtk_1print_1unix_1dialog_1set_1current_1page
-#define NO__1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup
-#define NO__1gtk_1print_1unix_1dialog_1set_1manual_1capabilities
+
+#define NO_gtk_1enumerate_1printers
+#define NO_gtk_1printer_1get_1name
+#define NO_gtk_1printer_1is_1default
+#define NO_gtk_1print_1job_1get_1surface
+#define NO_gtk_1print_1unix_1dialog_1get_1current_1page
+#define NO_gtk_1print_1unix_1dialog_1get_1selected_1printer
+#define NO_gtk_1print_1unix_1dialog_1get_1settings
+#define NO_gtk_1print_1unix_1dialog_1set_1settings
+#define NO_gtk_1print_1unix_1dialog_1get_1page_1setup
+#define NO_gtk_1print_1unix_1dialog_1set_1page_1setup
+#define NO_gtk_1printer_1get_1backend
+#define NO_gtk_1print_1unix_1dialog_1new
+#define NO_gtk_1print_1job_1new
+#define NO_gtk_1print_1job_1send
+#define NO_gtk_1print_1unix_1dialog_1set_1current_1page
+#define NO_gtk_1print_1unix_1dialog_1set_1embed_1page_1setup
+#define NO_gtk_1print_1unix_1dialog_1set_1manual_1capabilities
// map realpath to a similar function in win32
#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
@@ -101,26 +95,29 @@
#if defined(GDK_WINDOWING_X11)
-#if !GTK_CHECK_VERSION(3,94,0)
+#if !GTK_CHECK_VERSION(4,0,0)
#include <gtk/gtkx.h>
-#define NO__1gdk_1x11_1surface_1get_1xid
-#define NO__1gdk_1x11_1surface_1lookup_1for_1display
+#define NO_gdk_1x11_1surface_1get_1xid
+#define NO_gdk_1x11_1surface_1lookup_1for_1display
#else
-#define NO__1gdk_1x11_1get_1default_1xdisplay
-#define NO__1gdk_1x11_1window_1get_1xid
-#define NO__1gdk_1x11_1window_1lookup_1for_1display
-#define NO__1GTK_1IS_1PLUG
-#define NO__1gtk_1plug_1new
-#define NO__1gtk_1socket_1get_1id
-#define NO__1gtk_1socket_1new
+#define NO_gdk_1x11_1get_1default_1xdisplay
+#define NO_gdk_1x11_1window_1get_1xid
+#define NO_gdk_1x11_1window_1lookup_1for_1display
+#define NO_GTK_1IS_1PLUG
+#define NO_gtk_1plug_1new
+#define NO_gtk_1socket_1get_1id
+#define NO_gtk_1socket_1new
#endif
+#if !GTK_CHECK_VERSION(4,0,0)
#include <gdk/gdkx.h>
#else
+#include <gdk/x11/gdkx.h>
+#endif
+#else
#define NO_GDK_1IS_1X11_1DISPLAY
/* X Structures */
-#define NO_XAnyEvent
#define NO_XExposeEvent
#define NO_XEvent
#define NO_XFocusChangeEvent
@@ -128,39 +125,39 @@
#define NO_X_1EVENT_1WINDOW
/* X functions */
-#define NO__1XCheckIfEvent
-#define NO__1XDefaultScreen
-#define NO__1XDefaultRootWindow
-#define NO__1XFree
-#define NO__1XGetWindowProperty
-#define NO__1XQueryPointer
-#define NO__1XKeysymToKeycode
-#define NO__1XSendEvent
-#define NO__1XSetInputFocus
-#define NO__1XSetErrorHandler
-#define NO__1XSetIOErrorHandler
-#define NO__1XSetTransientForHint
-#define NO__1XSynchronize
-#define NO__1XWarpPointer
-#define NO__1GDK_1PIXMAP_1XID
-#define NO__1gdk_1x11_1display_1error_1trap_1pop_1ignored
-#define NO__1gdk_1x11_1display_1error_1trap_1push
-#define NO__1gdk_1x11_1display_1get_1xdisplay
-#define NO__1gdk_1x11_1display_1utf8_1to_1compound_1text
-#define NO__1gdk_1x11_1drawable_1get_1xdisplay
-#define NO__1gdk_1x11_1drawable_1get_1xid
-#define NO__1gdk_1x11_1get_1default_1xdisplay
-#define NO__1gdk_1x11_1screen_1get_1window_1manager_1name
-#define NO__1gdk_1x11_1screen_1lookup_1visual
-#define NO__1gdk_1x11_1visual_1get_1xvisual
-#define NO__1gdk_1x11_1window_1get_1xid
-#define NO__1gdk_1x11_1window_1lookup_1for_1display
-#define NO__1gdk_window_lookup
-#define NO__1gdk_window_add_filter
-#define NO__1GTK_1IS_1PLUG
-#define NO__1gtk_1plug_1new
-#define NO__1gtk_1socket_1get_1id
-#define NO__1gtk_1socket_1new
+#define NO_XCheckIfEvent
+#define NO_XDefaultScreen
+#define NO_XDefaultRootWindow
+#define NO_XFree
+#define NO_XGetWindowProperty
+#define NO_XQueryPointer
+#define NO_XKeysymToKeycode
+#define NO_XSendEvent
+#define NO_XSetInputFocus
+#define NO_XSetErrorHandler
+#define NO_XSetIOErrorHandler
+#define NO_XSetTransientForHint
+#define NO_XSynchronize
+#define NO_XWarpPointer
+#define NO_GDK_1PIXMAP_1XID
+#define NO_gdk_1x11_1display_1error_1trap_1pop_1ignored
+#define NO_gdk_1x11_1display_1error_1trap_1push
+#define NO_gdk_1x11_1display_1get_1xdisplay
+#define NO_gdk_1x11_1display_1utf8_1to_1compound_1text
+#define NO_gdk_1x11_1drawable_1get_1xdisplay
+#define NO_gdk_1x11_1drawable_1get_1xid
+#define NO_gdk_1x11_1get_1default_1xdisplay
+#define NO_gdk_1x11_1screen_1get_1window_1manager_1name
+#define NO_gdk_1x11_1screen_1lookup_1visual
+#define NO_gdk_1x11_1visual_1get_1xvisual
+#define NO_gdk_1x11_1window_1get_1xid
+#define NO_gdk_1x11_1window_1lookup_1for_1display
+#define NO_gdk_window_lookup
+#define NO_gdk_window_add_filter
+#define NO_GTK_1IS_1PLUG
+#define NO_gtk_1plug_1new
+#define NO_gtk_1socket_1get_1id
+#define NO_gtk_1socket_1new
#define NO_memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J
#define NO_memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I
#define NO_memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I
@@ -171,307 +168,213 @@
#endif
-#if GTK_CHECK_VERSION(3,94,0)
+#if GTK_CHECK_VERSION(4,0,0)
#define GTK4 1
-// Structs which do not exist on GTK4
-#define NO_GtkTargetEntry
-#define NO_GdkEventWindowState
-#define NO_GdkWindowAttr
-#define NO_GdkEvent
-#define NO_GdkEventAny
-#define NO_GdkEventButton
-#define NO_GdkEventCrossing
-#define NO_GdkEventFocus
-#define NO_GdkEventKey
-#define NO_GdkEventMotion
-#define NO_GdkEventScroll
-
-// Memmoves for those structs which were removed in GTK4
-#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GtkTargetEntry_2I
-#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J
-#define NO_memmove__LLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2II
-#define NO_memmove__LLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2JJ
-#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEvent_2I
-#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEvent_2J
-#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventAny_2I
-#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventAny_2J
-#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventButton_2I
-#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2II
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ
-#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventCrossing_2I
-#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventCrossing_2J
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2II
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ
-#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventFocus_2I
-#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventFocus_2J
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2II
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ
-#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventKey_2I
-#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2II
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2II
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ
-#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventWindowState_2I
-#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventWindowState_2J
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2II
-#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ
-
-// No GtkClipboard on GTK4
-#define NO__1gtk_1clipboard_1clear
-#define NO__1gtk_1clipboard_1get
-#define NO__1gtk_1clipboard_1set_1can_1store
-#define NO__1gtk_1clipboard_1set_1with_1owner
-#define NO__1gtk_1clipboard_1store
-#define NO__1gtk_1clipboard_1wait_1for_1contents
-
// No GtkStatusIcon on GTK4
-#define NO__1gtk_1status_1icon_1get_1geometry
-#define NO__1gtk_1status_1icon_1get_1visible
-#define NO__1gtk_1status_1icon_1new
-#define NO__1gtk_1status_1icon_1position_1menu_1func
-#define NO__1gtk_1status_1icon_1set_1from_1pixbuf
-#define NO__1gtk_1status_1icon_1set_1tooltip_1text
-#define NO__1gtk_1status_1icon_1set_1visible
-
-// No GtkTargetList on GTK4
-#define NO__1gtk_1target_1list_1new
-#define NO__1gtk_1target_1list_1unref
+#define NO_gtk_1status_1icon_1position_1menu_1func
// No GdkScreen on GTK4, including parameter casts
-#define NO__1gtk_1widget_1get_1screen
-#define NO__1gtk_1style_1context_1add_1provider_1for_1screen
-#define NO__1gdk_1device_1warp__IIII
-#define NO__1gdk_1device_1warp__JJII
-#define NO__1gdk_1screen_1get_1default
-#define NO__1gdk_1screen_1get_1monitor_1at_1point
-#define NO__1gdk_1screen_1get_1monitor_1at_1window
-#define NO__1gdk_1screen_1get_1monitor_1geometry
-#define NO__1gdk_1screen_1get_1monitor_1scale_1factor
-#define NO__1gdk_1screen_1get_1monitor_1workarea
-#define NO__1gdk_1screen_1get_1n_1monitors
-#define NO__1gdk_1screen_1get_1primary_1monitor
-#define NO__1gdk_1screen_1get_1resolution
-#define NO__1gdk_1screen_1get_1system_1visual
-#define NO__1gdk_1screen_1get_1window_1stack
-#define NO__1gdk_1screen_1is_1composited
+#define NO_gdk_1screen_1get_1default
+#define NO_gdk_1screen_1get_1monitor_1at_1point
+#define NO_gdk_1screen_1get_1monitor_1at_1window
+#define NO_gdk_1screen_1get_1monitor_1geometry
+#define NO_gdk_1screen_1get_1monitor_1scale_1factor
+#define NO_gdk_1screen_1get_1monitor_1workarea
+#define NO_gdk_1screen_1get_1n_1monitors
+#define NO_gdk_1screen_1get_1primary_1monitor
+#define NO_gdk_1screen_1get_1resolution
+#define NO_gdk_1screen_1get_1system_1visual
+#define NO_gdk_1screen_1get_1window_1stack
+#define NO_gdk_1screen_1is_1composited
+
+// No GDK lock
+#define NO_gdk_1threads_1add_1idle
+#define NO_gdk_1threads_1add_1timeout
+#define NO_gdk_1threads_1enter
+#define NO_gdk_1threads_1init
+#define NO_gdk_1threads_1leave
// Miscellaneous functions removed from GTK4
-#define NO__1gtk_1misc_1set_1alignment
-#define NO__1gdk_1test_1simulate_1button
-#define NO__1gdk_1test_1simulate_1key
-#define NO__1gdk_1atom_1name
-#define NO__1gdk_1cairo_1create
-#define NO_gdk_1threads_1leave
-#define NO__1gdk_1selection_1owner_1set
-#define NO__1gdk_1selection_1owner_1get
-#define NO__1gdk_1visual_1get_1depth
-#define NO__1gtk_1widget_1style_1get__I_3B_3II
-#define NO__1gtk_1widget_1style_1get__J_3B_3IJ
-#define NO__1gtk_1widget_1style_1get__I_3B_3JI
-#define NO__1gtk_1widget_1style_1get__J_3B_3JJ
-#define NO__1gtk_1css_1provider_1load_1from_1data__I_3BI_3I
-#define NO__1gtk_1css_1provider_1load_1from_1data__J_3BJ_3J
-
-// Some GtkContainer functions don't exist on GTK4
-#define NO__1gtk_1container_1propagate_1draw
-#define NO__1gtk_1container_1set_1border_1width
-#define NO__1gtk_1container_1get_1border_1width
-
-/**
- * Some gtk_drag_* functions exist on both versions,
- * but with different signatures. Define them in both GTK4
- * and GTK3.
- */
-#define NO__1gtk_1drag_1begin_1with_1coordinates__IIIIIII
-#define NO__1gtk_1drag_1begin_1with_1coordinates__JJIIJII
-#define NO__1gtk_1drag_1get_1data__IIII
-#define NO__1gtk_1drag_1get_1data__JJJI
-
-// Some gtk_drag_* functions were removed in GTK4
-#define NO__1gtk_1drag_1begin
-#define NO__1gtk_1drag_1dest_1set
-#define NO__1gtk_1drag_1dest_1find_1target
-#define NO__1gtk_1drag_1finish
-#define NO__1gtk_1drag_1set_1icon_1surface
-
-// Some sizing functions are not available on GTK4
-#define NO__1gtk_1window_1set_1geometry_1hints
+#define NO_gtk_1misc_1set_1alignment
+#define NO_gdk_1test_1simulate_1button
+#define NO_gdk_1test_1simulate_1key
+#define NO_gdk_1atom_1name
+#define NO_gdk_1cairo_1create
+#define NO_gdk_1selection_1owner_1set
+#define NO_gdk_1selection_1owner_1get
+#define NO_gdk_1visual_1get_1depth
+#define NO_gdk_1pixbuf_1get_1from_1window
// No GdkWindow on GTK4, this includes parameter casting
-#define NO__1gtk_1widget_1set_1has_1window
-#define NO__1gtk_1widget_1get_1has_1window
-#define NO__1gtk_1im_1context_1set_1client_1window
-#define NO__1gtk_1widget_1set_1parent_1window
-#define NO__1gdk_1cairo_1set_1source_1window
-#define NO__1gdk_1device_1grab
-#define NO__1gdk_1display_1get_1monitor_1at_1window
-#define NO__1gdk_1get_1default_1root_1window
-#define NO__1gdk_1property_1get
-#define NO__1gdk_1window_1begin_1draw_1frame
-#define NO__1gdk_1window_1create_1similar_1surface
-#define NO__1gdk_1window_1destroy
-#define NO__1gdk_1window_1end_1draw_1frame
-#define NO__1gdk_1window_1focus
-#define NO__1gdk_1window_1get_1children
-#define NO__1gdk_1window_1get_1device_1position
-#define NO__1gdk_1window_1get_1display
-#define NO__1gdk_1window_1set_1events
-#define NO__1gdk_1window_1get_1events
-#define NO__1gdk_1window_1get_1frame_1extents
-#define NO__1gdk_1window_1get_1height
-#define NO__1gdk_1window_1get_1width
-#define NO__1gdk_1window_1get_1origin
-#define NO__1gdk_1window_1get_1parent
-#define NO__1gdk_1window_1get_1root_1origin
-#define NO__1gdk_1window_1get_1state
-#define NO__1gdk_1window_1get_1user_1data
-#define NO__1gdk_1window_1get_1visible_1region
-#define NO__1gdk_1window_1show
-#define NO__1gdk_1window_1hide
-#define NO__1gdk_1window_1invalidate_1rect
-#define NO__1gdk_1window_1invalidate_1region
-#define NO__1gdk_1window_1raise
-#define NO__1gdk_1window_1lower
-#define NO__1gdk_1window_1move
-#define NO__1gdk_1window_1move_1resize
-#define NO__1gdk_1window_1new
-#define NO__1gdk_1window_1process_1updates
-#define NO__1gdk_1window_1resize
-#define NO__1gdk_1window_1restack
-#define NO__1gdk_1window_1set_1cursor
-#define NO__1gdk_1window_1set_1decorations
-#define NO__1gdk_1window_1set_1functions
-#define NO__1gdk_1window_1set_1override_1redirect
-#define NO__1gdk_1window_1set_1user_1data
-#define NO__1gdk_1window_1show_1unraised
-#define NO__1gdk_1device_1get_1window_1at_1position
-#define NO__1gdk_1window_1set_1background_1pattern
-#define NO__1gdk_1event_1get_1window
+#define NO_gtk_1im_1context_1set_1client_1window
+#define NO_gdk_1cairo_1set_1source_1window
+#define NO_gdk_1device_1grab
+#define NO_gdk_1device_1warp
+#define NO_gdk_1display_1get_1monitor_1at_1window
+#define NO_gdk_1get_1default_1root_1window
+#define NO_gdk_1property_1get
+#define NO_gdk_1window_1begin_1draw_1frame
+#define NO_gdk_1window_1create_1similar_1surface
+#define NO_gdk_1window_1destroy
+#define NO_gdk_1window_1end_1draw_1frame
+#define NO_gdk_1window_1focus
+#define NO_gdk_1window_1get_1children
+#define NO_gdk_1window_1get_1device_1position
+#define NO_gdk_1window_1get_1display
+#define NO_gdk_1window_1set_1events
+#define NO_gdk_1window_1get_1events
+#define NO_gdk_1window_1get_1frame_1extents
+#define NO_gdk_1window_1get_1height
+#define NO_gdk_1window_1get_1width
+#define NO_gdk_1window_1get_1origin
+#define NO_gdk_1window_1get_1parent
+#define NO_gdk_1window_1get_1root_1origin
+#define NO_gdk_1window_1get_1state
+#define NO_gdk_1window_1get_1user_1data
+#define NO_gdk_1window_1get_1visible_1region
+#define NO_gdk_1window_1show
+#define NO_gdk_1window_1hide
+#define NO_gdk_1window_1invalidate_1rect
+#define NO_gdk_1window_1invalidate_1region
+#define NO_gdk_1window_1raise
+#define NO_gdk_1window_1lower
+#define NO_gdk_1window_1move
+#define NO_gdk_1window_1move_1resize
+#define NO_gdk_1window_1process_1updates
+#define NO_gdk_1window_1resize
+#define NO_gdk_1window_1restack
+#define NO_gdk_1window_1set_1cursor
+#define NO_gdk_1window_1set_1decorations
+#define NO_gdk_1window_1set_1functions
+#define NO_gdk_1window_1set_1override_1redirect
+#define NO_gdk_1window_1set_1user_1data
+#define NO_gdk_1window_1show_1unraised
+#define NO_gdk_1window_1set_1background_1pattern
+#define NO_gdk_1event_1get_1window
// GdkDragContext removals
-#define NO__1gdk_1drag_1context_1get_1dest_1window
-#define NO__1gdk_1drag_1context_1list_1targets
-#define NO__1gdk_1drag_1status
-
-// Some widgets have removed access to their GdkWindows in GTK4
-#define NO__1gtk_1text_1view_1get_1window
-#define NO__1gtk_1tree_1view_1get_1bin_1window
+#define NO_gdk_1drag_1context_1get_1dest_1window
+#define NO_gdk_1drag_1context_1list_1targets
+#define NO_gdk_1drag_1status
// Event related functions removed in GTK4
-#define NO__1gdk_1event_1free
-#define NO__1gdk_1event_1get
-#define NO__1gdk_1event_1peek
-#define NO__1gdk_1event_1put
+#define NO_gdk_1event_1copy
+#define NO_gdk_1event_1free
+#define NO_gdk_1event_1get
+#define NO_gdk_1event_1peek
+#define NO_gdk_1event_1put
+#define NO_gdk_1event_1get_1button
+#define NO_gdk_1event_1get_1coords
+#define NO_gdk_1event_1get_1root_1coords
+#define NO_gdk_1event_1get_1keycode
+#define NO_gdk_1event_1new
+#define NO_gdk_1event_1set_1device
+#define NO_gdk_1event_1get_1keyval
+#define NO_gdk_1event_1get_1scroll_1deltas
+#define NO_gdk_1event_1get_1scroll_1direction
+#define NO_gdk_1event_1get_1state
#define NO_GDK_1EVENT_1TYPE
#define NO_GDK_1EVENT_1WINDOW
// GdkCursor removals
-#define NO__1gdk_1cursor_1new_1for_1display
-#define NO__1gdk_1cursor_1new_1from_1pixbuf
-#define NO__1gdk_1display_1supports_1cursor_1color
-#define NO__1gdk_1cursor_1new_1from_1name__I_3B
-#define NO__1gdk_1cursor_1new_1from_1name__J_3B
+#define NO_gdk_1cursor_1new_1for_1display
+#define NO_gdk_1cursor_1new_1from_1pixbuf
+#define NO_gdk_1cursor_1new_1from_1name__JLjava_lang_String_2
-#else
+// GdkKeymap removals
+#define NO_gdk_1keymap_1translate_1keyboard_1state
+#define NO_gdk_1keymap_1get_1entries_1for_1keyval
-/**
- * Some gtk_drag_* functions exist on both versions,
- * but with different signatures. Define them in both GTK4
- * and GTK3.
- */
-#define NO__1gtk_1drag_1begin_1with_1coordinates__IIIIII
-#define NO__1gtk_1drag_1begin_1with_1coordinates__JJJIII
-#define NO__1gtk_1drag_1get_1data__III
-#define NO__1gtk_1drag_1get_1data__JJJ
+// GdkAtom removed
+#define NO_gtk_1drag_1get_1data__JJJ
+#define NO_gdk_1text_1property_1to_1utf8_1list_1for_1display
+#define NO_gdk_1x11_1display_1utf8_1to_1compound_1text
+
+// Accessibility interface changes
+#define NO_GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE
+#define NO_swt_1fixed_1accessible_1register_1accessible
+
+// GtkCellRenderer changes
+#define NO_GtkCellRendererPixbufClass_1sizeof
+#define NO_GtkCellRendererPixbuf_1sizeof
+#define NO_GtkCellRendererToggleClass_1sizeof
+#define NO_GtkCellRendererToggle_1sizeof
+
+// GTK3 only macros
+#define NO_GTK_1IS_1ACCEL_1LABEL
+#define NO_GTK_1IS_1CONTAINER
+
+#else
// No GdkSurface on GTK3
-#define NO__1gtk_1widget_1set_1has_1surface
-#define NO__1gtk_1widget_1get_1has_1surface
-#define NO__1gtk_1widget_1set_1parent_1surface
-#define NO__1gdk_1surface_1create_1similar_1surface
-#define NO__1gdk_1surface_1destroy
-#define NO__1gdk_1surface_1focus
-#define NO__1gdk_1device_1get_1surface_1at_1position
-#define NO__1gdk_1surface_1lower
-#define NO__1gdk_1surface_1raise
-#define NO__1gdk_1surface_1get_1children
-#define NO__1gdk_1surface_1get_1user_1data
-#define NO__1gdk_1surface_1get_1origin
-#define NO__1gdk_1surface_1invalidate_1rect
-#define NO__1gdk_1surface_1get_1display
-#define NO__1gdk_1surface_1set_1cursor
-#define NO__1gdk_1surface_1new_1child
-#define NO__1gdk_1surface_1set_1user_1data
-#define NO__1gdk_1surface_1restack
-#define NO__1gdk_1surface_1show_1unraised
-#define NO__1gdk_1surface_1show
-#define NO__1gdk_1surface_1get_1device_1position
-#define NO__1gdk_1display_1get_1monitor_1at_1surface
-#define NO__1gdk_1surface_1get_1frame_1extents
-#define NO__1gdk_1surface_1get_1width
-#define NO__1gdk_1surface_1get_1height
-#define NO__1gdk_1surface_1get_1state
-#define NO__1gdk_1surface_1resize
-#define NO__1gdk_1surface_1move
-#define NO__1gdk_1surface_1move_1resize
-#define NO__1gdk_1surface_1hide
-#define NO__1gdk_1surface_1set_1decorations
-#define NO__1gdk_1surface_1set_1functions
-#define NO__1gdk_1surface_1get_1root_1origin
-#define NO__1gdk_1surface_1invalidate_1region
-#define NO__1gdk_1event_1get_1surface
+#define NO_gdk_1surface_1create_1similar_1surface
+#define NO_gdk_1surface_1destroy
+#define NO_gdk_1surface_1get_1origin
+#define NO_gdk_1surface_1invalidate_1rect
+#define NO_gdk_1surface_1get_1display
+#define NO_gdk_1surface_1set_1cursor
+#define NO_gdk_1surface_1new_1popup
+#define NO_gdk_1surface_1get_1device_1position
+#define NO_gdk_1display_1get_1monitor_1at_1surface
+#define NO_gdk_1surface_1get_1width
+#define NO_gdk_1surface_1get_1height
+#define NO_gdk_1surface_1hide
+#define NO_gdk_1surface_1get_1root_1origin
+#define NO_gdk_1surface_1invalidate_1region
+#define NO_gdk_1event_1get_1surface
+#define NO_gdk_1surface_1set_1input_1region
+#define NO_gdk_1surface_1set_1opaque_1region
+
+// No GdkToplevel on GTK3
+#define NO_gdk_1toplevel_1present
// No GdkClipboard on GTK3
-#define NO__1gdk_1clipboard_1set_1content
-#define NO__1gdk_1display_1get_1clipboard
-#define NO__1gdk_1display_1get_1primary_1clipboard
-
-// No GtkSnapshot on GTK3
-#define NO__1gtk_1snapshot_1append_1cairo
-#define NO__1gtk_1widget_1snapshot_1child
+#define NO_gdk_1clipboard_1set_1content
// No Graphene library on GTK3
-#define NO__1graphene_1rect_1alloc
-#define NO__1graphene_1rect_1free
-#define NO__1graphene_1rect_1init
-
-// Miscellaneous functions not present on GTK3
-#define NO__1gdk_1device_1warp__III
-#define NO__1gdk_1device_1warp__JII
-#define NO__1gdk_1display_1get_1keymap
-#define NO__1gtk_1widget_1measure
-#define NO__1gtk_1style_1context_1add_1provider_1for_1display
-#define NO__1gtk_1widget_1get_1first_1child
-#define NO__1gtk_1widget_1get_1next_1sibling
-#define NO__1gtk_1css_1provider_1load_1from_1data__I_3BI
-#define NO__1gtk_1css_1provider_1load_1from_1data__J_3BJ
-#define NO__1gdk_1display_1is_1composited
-#define NO__1gtk_1gesture_1multi_1press_1new
-#define NO__1gtk_1style_1context_1get_1margin
+#define NO_graphene_1rect_1alloc
+#define NO_graphene_1rect_1free
+#define NO_graphene_1rect_1init
// GdkCursor API changes from GTK3 -> GTK4
-#define NO__1gdk_1cursor_1new_1from_1name___3BI
-#define NO__1gdk_1cursor_1new_1from_1name___3BJ
-#define NO__1gdk_1cursor_1new_1from_1texture
-#define NO__1gtk_1widget_1set_1cursor
+#define NO_gdk_1cursor_1new_1from_1name___3BI
+#define NO_gdk_1cursor_1new_1from_1name___3BJ
+#define NO_gdk_1cursor_1new_1from_1texture
// No GdkTexture on GTK3
-#define NO__1gdk_1texture_1new_1for_1pixbuf
-
-// GtkEventController related functions for GTK4
-#define NO__1gtk_1event_1controller_1key_1new
-#define NO__1gtk_1event_1controller_1motion_1new
-#define NO__1gtk_1event_1controller_1scroll_1new
-#define NO__1gtk_1widget_1add_1controller
+#define NO_gdk_1texture_1new_1for_1pixbuf
+#define NO_gdk_1texture_1new_1from_1file
+#define NO_gdk_1pixbuf_1get_1from_1texture
+#define NO_gdk_1texture_1new_1from_1file__J_3J
+#define NO_gdk_1texture_1new_1from_1file___3B_3J
// GdkEvent functions which do not exist on GTK3
-#define NO__1gdk_1event_1get_1focus_1in
-#define NO__1gdk_1event_1get_1string
-#define NO__1gdk_1event_1get_1key_1group
-#define NO__1gdk_1event_1get_1crossing_1mode
+#define NO_gdk_1focus_1event_1get_1in
+#define NO_gdk_1crossing_1event_1get_1mode
+#define NO_gdk_1button_1event_1get_1button
+#define NO_gdk_1event_1get_1position
+#define NO_gdk_1key_1event_1get_1keyval
+#define NO_gdk_1key_1event_1get_1keycode
+#define NO_gdk_1scroll_1event_1get_1deltas
+#define NO_gdk_1scroll_1event_1get_1direction
+#define NO_gdk_1event_1get_1modifier_1state
+#define NO_gdk_1key_1event_1get_1layout
+#define NO_gdk_1event_1ref
+#define NO_gdk_1event_1unref
+
+// GdkCursor API changes
+#define NO_gdk_1cursor_1new_1from_1name__Ljava_lang_String_2J
+
+// No GdkPopup on GTK3
+#define NO_gdk_1popup_1get_1parent
+#define NO_gdk_1popup_1layout_1new
+#define NO_gdk_1popup_1present
+
+// SWTFixed changes
+#define NO_swt_1fixed_1add
+#define NO_swt_1fixed_1remove
+
#endif
#include "os_custom.h"
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c
index 27629683ce..0583973ff9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c
@@ -19,48 +19,6 @@
#define OS_NATIVE(func) Java_org_eclipse_swt_internal_gtk_OS_##func
-JavaVM *cached_jvm = NULL;
-
-JNIEXPORT void JNICALL OS_NATIVE(_1cachejvmptr)
- (JNIEnv *env, jclass that)
-{
- /* cache the JavaVM pointer */
- if (cached_jvm == NULL) (*env)->GetJavaVM(env, &cached_jvm);
-}
-
-#ifndef NO__1call_1get_1size
-JNIEXPORT void JNICALL OS_NATIVE(_1call_1get_1size)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
-{
- /*
- * Bug in Solaris. For some reason, the assembler generated for this function (when not putting the parameters in the stack) crashes.
- * It seems that this is caused by a bug in the Sun Studio Compiler when the optimization level is greater or equal to two.
- * The fix is rewrite the function passing all parameters on the stack. Alternatively, the problem could be fixed by lowering the optimization level,
- * but this solution would significantly increase the size of the library.
- */
- const GdkRectangle rect;
- gint x, y, width, height;
- const GdkRectangle *lprect = NULL;
- gint* lpx = NULL;
- gint* lpy = NULL;
- gint* lpwidth = NULL;
- gint* lpheight = NULL;
- OS_NATIVE_ENTER(env, that, _1call_1get_1size_FUNC);
- if (arg3) lprect = &rect;
- if (arg4) lpx = &x;
- if (arg5) lpy = &y;
- if (arg6) lpwidth = &width;
- if (arg7) lpheight = &height;
- ((void (*)(GtkCellRenderer *, GtkWidget *, const GdkRectangle *, gint *, gint *, gint *, gint *))arg0)((GtkCellRenderer *)arg1, (GtkWidget *)arg2, lprect, lpx, lpy, lpwidth, lpheight);
- if (arg3) *((GdkRectangle *)arg3) = rect;
- if (arg4) *((gint *)arg4) = x;
- if (arg5) *((gint *)arg5) = y;
- if (arg6) *((gint *)arg6) = width;
- if (arg7) *((gint *)arg7) = height;
- OS_NATIVE_EXIT(env, that, _1call_1get_1size_FUNC);
-}
-#endif
-
#ifndef NO_GDK_1WINDOWING_1X11
JNIEXPORT jboolean JNICALL OS_NATIVE(GDK_1WINDOWING_1X11)
(JNIEnv *env, jclass that)
@@ -94,7 +52,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GDK_1WINDOWING_1WAYLAND)
#endif
#ifndef NO_imContextNewProc_1CALLBACK
-static jintLong superIMContextNewProc;
+static jlong superIMContextNewProc;
static GtkIMContext* lastIMContext;
static GtkIMContext* imContextNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
GtkIMContext* context = ((GtkIMContext * (*)(GType, guint, GObjectConstructParam *))superIMContextNewProc)(type, n_construct_properties, construct_properties);
@@ -102,96 +60,96 @@ static GtkIMContext* imContextNewProc (GType type, guint n_construct_properties,
return context;
}
#ifndef NO_imContextLast
-JNIEXPORT jintLong JNICALL OS_NATIVE(imContextLast)
+JNIEXPORT jlong JNICALL OS_NATIVE(imContextLast)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, imContextLast_FUNC);
- rc = (jintLong)lastIMContext;
+ rc = (jlong)lastIMContext;
OS_NATIVE_EXIT(env, that, imContextLast_FUNC);
return rc;
}
#endif
-JNIEXPORT jintLong JNICALL OS_NATIVE(imContextNewProc_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(imContextNewProc_1CALLBACK)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, imContextNewProc_1CALLBACK_FUNC);
superIMContextNewProc = arg0;
- rc = (jintLong)imContextNewProc;
+ rc = (jlong)imContextNewProc;
OS_NATIVE_EXIT(env, that, imContextNewProc_1CALLBACK_FUNC);
return rc;
}
#endif
#ifndef NO_pangoLayoutNewProc_1CALLBACK
-static jintLong superPangoLayoutNewProc;
+static jlong superPangoLayoutNewProc;
static PangoLayout * pangoLayoutNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
PangoLayout* layout = ((PangoLayout * (*)(GType, guint, GObjectConstructParam *))superPangoLayoutNewProc)(type, n_construct_properties, construct_properties);
pango_layout_set_auto_dir (layout, 0);
return layout;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(pangoLayoutNewProc_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(pangoLayoutNewProc_1CALLBACK)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, pangoLayoutNewProc_1CALLBACK_FUNC);
superPangoLayoutNewProc = arg0;
- rc = (jintLong)pangoLayoutNewProc;
+ rc = (jlong)pangoLayoutNewProc;
OS_NATIVE_EXIT(env, that, pangoLayoutNewProc_1CALLBACK_FUNC);
return rc;
}
#endif
#ifndef NO_pangoFontFamilyNewProc_1CALLBACK
-static jintLong superPangoFontFamilyNewProc;
+static jlong superPangoFontFamilyNewProc;
static PangoFontFamily * pangoFontFamilyNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
PangoFontFamily* fontFamily = ((PangoFontFamily * (*)(GType, guint, GObjectConstructParam *))superPangoFontFamilyNewProc)(type, n_construct_properties, construct_properties);
return fontFamily;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(pangoFontFamilyNewProc_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(pangoFontFamilyNewProc_1CALLBACK)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, pangoFontFamilyNewProc_1CALLBACK_FUNC);
superPangoFontFamilyNewProc = arg0;
- rc = (jintLong)pangoFontFamilyNewProc;
+ rc = (jlong)pangoFontFamilyNewProc;
OS_NATIVE_EXIT(env, that, pangoFontFamilyNewProc_1CALLBACK_FUNC);
return rc;
}
#endif
#ifndef NO_pangoFontFaceNewProc_1CALLBACK
-static jintLong superPangoFontFaceNewProc;
+static jlong superPangoFontFaceNewProc;
static PangoFontFace * pangoFontFaceNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
PangoFontFace* fontFace = ((PangoFontFace * (*)(GType, guint, GObjectConstructParam *))superPangoFontFaceNewProc)(type, n_construct_properties, construct_properties);
return fontFace;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(pangoFontFaceNewProc_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(pangoFontFaceNewProc_1CALLBACK)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, pangoFontFaceNewProc_1CALLBACK_FUNC);
superPangoFontFaceNewProc = arg0;
- rc = (jintLong)pangoFontFaceNewProc;
+ rc = (jlong)pangoFontFaceNewProc;
OS_NATIVE_EXIT(env, that, pangoFontFaceNewProc_1CALLBACK_FUNC);
return rc;
}
#endif
#ifndef NO_printerOptionWidgetNewProc_1CALLBACK
-static jintLong superPrinterOptionWidgetNewProc;
+static jlong superPrinterOptionWidgetNewProc;
static GType * printerOptionWidgetNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
GType* printerOptionWidget = ((GType * (*)(GType, guint, GObjectConstructParam *))superPrinterOptionWidgetNewProc)(type, n_construct_properties, construct_properties);
return printerOptionWidget;
}
-JNIEXPORT jintLong JNICALL OS_NATIVE(printerOptionWidgetNewProc_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(printerOptionWidgetNewProc_1CALLBACK)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, printerOptionWidgetNewProc_1CALLBACK_FUNC);
superPrinterOptionWidgetNewProc = arg0;
- rc = (jintLong)printerOptionWidgetNewProc;
+ rc = (jlong)printerOptionWidgetNewProc;
OS_NATIVE_EXIT(env, that, printerOptionWidgetNewProc_1CALLBACK_FUNC);
return rc;
}
@@ -497,7 +455,9 @@ static void swt_fixed_realize (GtkWidget *widget) {
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, widget);
if (NULL != gtk_check_version (3, 18, 0)) {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_style_context_set_background (gtk_widget_get_style_context (widget), window);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
}
@@ -746,55 +706,55 @@ enum {
PROP_VSCROLL_POLICY,
};
+enum {
+ RESIZE,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+static void swt_fixed_dispose(GObject* object);
+static void swt_fixed_finalize(GObject* object);
static void swt_fixed_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void swt_fixed_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void swt_fixed_finalize (GObject *object);
-static void swt_fixed_map (GtkWidget *widget);
-static AtkObject *swt_fixed_get_accessible (GtkWidget *widget);
+
static void swt_fixed_measure (GtkWidget *widget, GtkOrientation orientation, int for_size, int *minimum,
int *natural, int *minimum_baseline, int *natural_baseline);
-static void swt_fixed_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, int baseline);
-static void swt_fixed_add (GtkContainer *container, GtkWidget *widget);
-static void swt_fixed_remove (GtkContainer *container, GtkWidget *widget);
-static void swt_fixed_forall (GtkContainer *container, GtkCallback callback, gpointer callback_data);
+static void swt_fixed_size_allocate (GtkWidget *widget, int width, int height, int baseline);
-G_DEFINE_TYPE_WITH_CODE (SwtFixed, swt_fixed, GTK_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (SwtFixed, swt_fixed, GTK_TYPE_WIDGET,
G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL)
G_ADD_PRIVATE (SwtFixed))
static void swt_fixed_class_init (SwtFixedClass *class) {
+ /* GObject implementation */
GObjectClass *gobject_class = (GObjectClass*) class;
- GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
- GtkContainerClass *container_class = (GtkContainerClass*) class;
-
- /* GOject implementation */
gobject_class->set_property = swt_fixed_set_property;
gobject_class->get_property = swt_fixed_get_property;
gobject_class->finalize = swt_fixed_finalize;
+ gobject_class->dispose = swt_fixed_dispose;
- /* Scrollable implemetation */
+ /* Scrollable implementation */
g_object_class_override_property (gobject_class, PROP_HADJUSTMENT, "hadjustment");
g_object_class_override_property (gobject_class, PROP_VADJUSTMENT, "vadjustment");
g_object_class_override_property (gobject_class, PROP_HSCROLL_POLICY, "hscroll-policy");
g_object_class_override_property (gobject_class, PROP_VSCROLL_POLICY, "vscroll-policy");
/* Widget implementation */
- widget_class->map = swt_fixed_map;
+ GtkWidgetClass* widget_class = (GtkWidgetClass*) class;
widget_class->measure = swt_fixed_measure;
widget_class->size_allocate = swt_fixed_size_allocate;
- /* Accessibility implementation */
- widget_class->get_accessible = swt_fixed_get_accessible;
-
- /* Container implementation */
- container_class->add = swt_fixed_add;
- container_class->remove = swt_fixed_remove;
- container_class->forall = swt_fixed_forall;
-
+ signals[RESIZE] = g_signal_new(
+ "resize",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
}
void swt_fixed_restack (SwtFixed *fixed, GtkWidget *widget, GtkWidget *sibling, gboolean above) {
- SwtFixedPrivate *priv = fixed->priv;
+ SwtFixedPrivate* priv = swt_fixed_get_instance_private(fixed);
GList *list;
SwtFixedChild *child, *sibling_child;
@@ -827,44 +787,36 @@ void swt_fixed_restack (SwtFixed *fixed, GtkWidget *widget, GtkWidget *sibling,
list = above ? priv->children : NULL;
}
priv->children = g_list_insert_before (priv->children, list, child);
-
- /*
- {
- GdkWindow *sibling_window = NULL;
- if (list) {
- child = list->data;
- sibling_window = gtk_widget_get_window (child);
- }
- gdk_window_restack (gtk_widget_get_window (widget), sibling_window, above);
- }
- */
}
-static void swt_fixed_init (SwtFixed *widget) {
- SwtFixedPrivate *priv;
+static void swt_fixed_init (SwtFixed* fixed) {
+ SwtFixedPrivate* priv = swt_fixed_get_instance_private(fixed);
- priv = widget->priv = swt_fixed_get_instance_private (widget);
priv->children = NULL;
priv->hadjustment = NULL;
priv->vadjustment = NULL;
+}
- gtk_widget_set_has_surface(GTK_WIDGET(widget), FALSE);
+static void swt_fixed_dispose(GObject* object) {
+ GtkWidget* child;
+ while ((child = gtk_widget_get_first_child(GTK_WIDGET(object)))) {
+ swt_fixed_remove(SWT_FIXED(object), child);
+ }
+
+ G_OBJECT_CLASS(swt_fixed_parent_class)->dispose(object);
}
static void swt_fixed_finalize (GObject *object) {
- SwtFixed *widget = SWT_FIXED (object);
- SwtFixedPrivate *priv = widget->priv;
+ SwtFixedPrivate *priv = swt_fixed_get_instance_private(SWT_FIXED(object));
- g_object_unref (priv->hadjustment);
- g_object_unref (priv->vadjustment);
- g_clear_object (&widget->accessible);
+ g_object_unref(priv->hadjustment);
+ g_object_unref(priv->vadjustment);
- G_OBJECT_CLASS (swt_fixed_parent_class)->finalize (object);
+ G_OBJECT_CLASS(swt_fixed_parent_class)->finalize(object);
}
static void swt_fixed_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) {
- SwtFixed *widget = SWT_FIXED (object);
- SwtFixedPrivate *priv = widget->priv;
+ SwtFixedPrivate *priv = swt_fixed_get_instance_private(SWT_FIXED(object));
switch (prop_id) {
case PROP_HADJUSTMENT:
@@ -886,8 +838,7 @@ static void swt_fixed_get_property (GObject *object, guint prop_id, GValue *valu
}
static void swt_fixed_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) {
- SwtFixed *widget = SWT_FIXED (object);
- SwtFixedPrivate *priv = widget->priv;
+ SwtFixedPrivate *priv = swt_fixed_get_instance_private(SWT_FIXED(object));
GtkAdjustment *adjustment;
switch (prop_id) {
@@ -897,7 +848,7 @@ static void swt_fixed_set_property (GObject *object, guint prop_id, const GValue
if (priv->hadjustment != NULL) g_object_unref (priv->hadjustment);
if (adjustment == NULL) adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
priv->hadjustment = g_object_ref_sink (adjustment);
- g_object_notify (G_OBJECT (widget), "hadjustment");
+ g_object_notify (object, "hadjustment");
break;
case PROP_VADJUSTMENT:
adjustment = g_value_get_object (value);
@@ -905,7 +856,7 @@ static void swt_fixed_set_property (GObject *object, guint prop_id, const GValue
if (priv->vadjustment != NULL) g_object_unref (priv->vadjustment);
if (adjustment == NULL) adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
priv->vadjustment = g_object_ref_sink (adjustment);
- g_object_notify (G_OBJECT (widget), "vadjustment");
+ g_object_notify (object, "vadjustment");
break;
case PROP_HSCROLL_POLICY:
priv->hscroll_policy = g_value_get_enum (value);
@@ -919,252 +870,132 @@ static void swt_fixed_set_property (GObject *object, guint prop_id, const GValue
}
}
-/*
-static void swt_fixed_realize (GtkWidget *widget) {
- GtkAllocation allocation;
- GdkSurface *surface;
-
- if (!gtk_widget_get_has_surface (widget)) {
- GTK_WIDGET_CLASS (swt_fixed_parent_class)->realize (widget);
- return;
- }
-
- gtk_widget_get_allocation (widget, &allocation);
-
- surface = gdk_surface_new_child (gtk_widget_get_parent_surface (widget), &allocation);
- gtk_widget_set_surface(widget, surface);
- gdk_surface_set_user_data (surface, widget);
- return GTK_WIDGET_CLASS (swt_fixed_parent_class)->realize (widget);
-}*/
-
-static void swt_fixed_map (GtkWidget *widget) {
- SwtFixed *fixed = SWT_FIXED (widget);
- SwtFixedPrivate *priv = fixed->priv;
- GList *list;
-
- list = priv->children;
- while (list) {
- SwtFixedChild *child_data = list->data;
- GtkWidget *child = child_data->widget;
- list = list->next;
- if (gtk_widget_get_visible (child)) {
- if (!gtk_widget_get_mapped (child)) gtk_widget_map (child);
- }
- }
- if (gtk_widget_get_has_surface (widget)) {
- //NOTE: contrary to most of GTK, swt_fixed_* container does not raise windows upon showing them.
- //This has the effect that widgets are drawn *beneath* the previous one.
- //E.g if this line is changed to gdk_window_show (..) then widgets are drawn on top of the previous one.
- //This affects mostly only the absolute layout with overlapping widgets, e.g minimizied panels that
- //pop-out in Eclipse (aka fast-view).
- //As such, be attentive to swt_fixed_forall(..); traversing children may need to be done in reverse in some
- //cases.
- gdk_surface_show_unraised (gtk_widget_get_surface (widget));
- }
- return GTK_WIDGET_CLASS (swt_fixed_parent_class)->map (widget);
-}
-
-/* Accessibility */
-static AtkObject *swt_fixed_get_accessible (GtkWidget *widget) {
- SwtFixed *fixed = SWT_FIXED (widget);
-
- if (!fixed->accessible) {
- fixed->accessible = swt_fixed_accessible_new (widget);
- }
- return fixed->accessible;
-}
-
-static void swt_fixed_measure (GtkWidget *widget, GtkOrientation orientation, int for_size, int *minimum,
- int *natural, int *minimum_baseline, int *natural_baseline) {
- SwtFixed *fixed = SWT_FIXED (widget);
- SwtFixedPrivate *priv = fixed->priv;
- GList *list;
- int natural_size, child_nat;
-
- list = priv->children;
- natural_size = 0;
-
- while (list) {
- SwtFixedChild *child_data = list->data;
- GtkWidget *child = child_data->widget;
+static void swt_fixed_measure (GtkWidget *widget, GtkOrientation orientation, int for_size, int *minimum, int *natural, int *minimum_baseline, int *natural_baseline) {
+ for (GtkWidget* child = gtk_widget_get_first_child(widget); child != NULL; child = gtk_widget_get_next_sibling(child)) {
+ int child_nat = 0;
gtk_widget_measure(child, orientation, -1, NULL, &child_nat, NULL, NULL);
- if (child_nat > natural_size) natural_size = child_nat;
-
- list = list->next;
+ *natural = MAX(*natural, child_nat);
}
- if (natural) *natural = natural_size;
+
if (minimum) *minimum = 0;
if (minimum_baseline) *minimum_baseline = -1;
if (natural_baseline) *natural_baseline = -1;
- return;
}
-static void swt_fixed_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, int baseline) {
- SwtFixed *fixed = SWT_FIXED (widget);
- SwtFixedPrivate *priv = fixed->priv;
- GList *list;
- GtkAllocation child_allocation;
- GtkRequisition requisition;
- gint w, h;
+static void swt_fixed_size_allocate (GtkWidget *widget, int width, int height, int baseline) {
+ g_signal_emit (widget, signals[RESIZE], 0, width, height);
- if (gtk_widget_get_has_surface (widget)) {
- if (gtk_widget_get_realized (widget)) {
- gdk_surface_move_resize (gtk_widget_get_surface (widget), allocation->x, allocation->y, allocation->width, allocation->height);
- }
- }
+ SwtFixedPrivate *priv = swt_fixed_get_instance_private(SWT_FIXED(widget));
- list = priv->children;
+ GList* list = priv->children;
while (list) {
SwtFixedChild *child_data = list->data;
GtkWidget *child = child_data->widget;
- list = list->next;
+ GtkAllocation child_allocation;
child_allocation.x = child_data->x;
child_allocation.y = child_data->y;
- if (!gtk_widget_get_has_surface (widget)) {
- child_allocation.x += allocation->x;
- child_allocation.y += allocation->y;
- }
- w = child_data->width;
- h = child_data->height;
+ int w = child_data->width;
+ int h = child_data->height;
if (w == -1 || h == -1) {
+ GtkRequisition requisition;
gtk_widget_get_preferred_size (child, &requisition, NULL);
if (w == -1) w = requisition.width;
if (h == -1) h = requisition.height;
}
- // Feature in GTK: gtk_widget_preferred_size() has to be called before
- // gtk_widget_size_allocate otherwise a warning is thrown. See Bug 486068.
- gtk_widget_get_preferred_size (child, &requisition, NULL);
child_allocation.width = w;
child_allocation.height = h;
gtk_widget_size_allocate (child, &child_allocation, -1);
- }
+
+ list = list->next;
+ }
}
void swt_fixed_move (SwtFixed *fixed, GtkWidget *widget, gint x, gint y) {
- SwtFixedPrivate *priv = fixed->priv;
- GList *list;
+ SwtFixedPrivate* priv = swt_fixed_get_instance_private(fixed);
+ GList* list = priv->children;
- list = priv->children;
while (list) {
- SwtFixedChild *child_data = list->data;
- GtkWidget *child = child_data->widget;
+ SwtFixedChild* child_data = list->data;
+ GtkWidget* child = child_data->widget;
+
if (child == widget) {
child_data->x = x;
child_data->y = y;
break;
}
+
list = list->next;
}
}
void swt_fixed_resize (SwtFixed *fixed, GtkWidget *widget, gint width, gint height) {
- SwtFixedPrivate *priv = fixed->priv;
- GList *list;
+ SwtFixedPrivate* priv = swt_fixed_get_instance_private(fixed);
+ GList* list = priv->children;
- list = priv->children;
while (list) {
- SwtFixedChild *child_data = list->data;
- GtkWidget *child = child_data->widget;
+ SwtFixedChild* child_data = list->data;
+ GtkWidget* child = child_data->widget;
+
if (child == widget) {
child_data->width = width;
child_data->height = height;
-
- /*
- * Feature in GTK: sometimes the sizing of child SwtFixed widgets
- * does not happen quickly enough, causing miscalculations in SWT.
- * Allocate the size of the child directly when swt_fixed_resize()
- * is called. See bug 487160.
- */
- GtkAllocation allocation, to_allocate;
- GtkRequisition req;
- gtk_widget_get_allocation(child, &allocation);
-
- // Keep x and y values the same to prevent misplaced containers
- to_allocate.x = allocation.x;
- to_allocate.y = allocation.y;
- to_allocate.width = width;
- to_allocate.height = height;
-
- // Call gtk_widget_get_preferred_size() and finish the allocation.
- gtk_widget_get_preferred_size (child, &req, NULL);
- gtk_widget_size_allocate(child, &to_allocate, -1);
break;
}
+
list = list->next;
}
}
-static void swt_fixed_add (GtkContainer *container, GtkWidget *child) {
- GtkWidget *widget = GTK_WIDGET (container);
- SwtFixed *fixed = SWT_FIXED (container);
- SwtFixedPrivate *priv = fixed->priv;
- SwtFixedChild *child_data;
+void swt_fixed_add (SwtFixed *fixed, GtkWidget *widget) {
+ g_return_if_fail(SWT_IS_FIXED(fixed));
+ g_return_if_fail(GTK_IS_WIDGET(widget));
+ g_return_if_fail(gtk_widget_get_parent(widget) == NULL);
- child_data = g_new (SwtFixedChild, 1);
- child_data->widget = child;
+ SwtFixedPrivate *priv = swt_fixed_get_instance_private(fixed);
+
+ SwtFixedChild *child_data = g_new(SwtFixedChild, 1);
+ child_data->widget = widget;
child_data->x = child_data->y = 0;
child_data->width = child_data->height = -1;
- priv->children = g_list_append (priv->children, child_data);
- gtk_widget_set_parent (child, widget);
+ priv->children = g_list_append(priv->children, child_data);
+
+ gtk_widget_set_parent(widget, GTK_WIDGET(fixed));
}
-static void swt_fixed_remove (GtkContainer *container, GtkWidget *widget) {
- SwtFixed *fixed = SWT_FIXED (container);
- SwtFixedPrivate *priv = fixed->priv;
- GList *list;
+void swt_fixed_remove (SwtFixed *fixed, GtkWidget *widget) {
+ g_return_if_fail(SWT_IS_FIXED(fixed));
+ g_return_if_fail(GTK_IS_WIDGET(widget));
+ g_return_if_fail(gtk_widget_get_parent(widget) == GTK_WIDGET(fixed));
- list = priv->children;
- while (list) {
+ SwtFixedPrivate *priv = swt_fixed_get_instance_private(fixed);
+ GList *list = priv->children;
+
+ while (list != NULL) {
SwtFixedChild *child_data = list->data;
GtkWidget *child = child_data->widget;
+
if (child == widget) {
- gtk_widget_unparent (widget);
- priv->children = g_list_remove_link (priv->children, list);
- g_list_free_1 (list);
- g_free (child_data);
+ g_free(child_data);
+ priv->children = g_list_delete_link(priv->children, list);
+
+ gtk_widget_unparent(widget);
break;
}
- list = list->next;
- }
-}
-
-static void swt_fixed_forall (GtkContainer *container, GtkCallback callback, gpointer callback_data) {
- SwtFixed *fixed = SWT_FIXED (container);
- SwtFixedPrivate *priv = fixed->priv;
- GList *list;
-
- list = priv->children;
-
- // NOTE: The direction of the list traversal is conditional.
- //
- // 1) When we do a *_foreach() traversal (i.e, include_internals==FALSE), we traverse the list as normal
- // from front to back.
- // This is used to layout higher level widgets inside containers (e.g row/grid etc..) in the expected way.
- // If for a non-internal traversal we were to go in reverse, then widgets would get laid out in inverse order.
- // 2) When we do a *_forall() traversal (i.e, include_internals==TRUE), we traverse the list in *reverse* order.
- // This is an internal traversal of the internals of a widget. Reverse traversal is necessary for things like
- // DnD Drop and DnD Motion events to find the correct widget in the case of overlapping widgets on an absolute layout.
- // Reversal is required because in swt_fixed_map(..) we do not raise the widget when we show it, as a result
- // the stack is in reverse.
-
- while (list) {
- SwtFixedChild *child_data = list->data;
- GtkWidget *child = child_data->widget;
list = list->next;
-
- (* callback) (child, callback_data);
}
}
#endif
+
+#if !defined(GTK4)
static void swt_fixed_accessible_class_init (SwtFixedAccessibleClass *klass);
static void swt_fixed_accessible_finalize (GObject *object);
static void swt_fixed_accessible_initialize (AtkObject *obj, gpointer data);
@@ -1253,7 +1084,7 @@ AtkObject *swt_fixed_accessible_new (GtkWidget *widget) {
static void swt_fixed_accessible_finalize (GObject *object) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (object);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
// Call the Java implementation to ensure AccessibleObjects are removed
// from the HashMap on the Java side.
@@ -1305,7 +1136,7 @@ static void swt_fixed_accessible_initialize (AtkObject *obj, gpointer data) {
static AtkAttributeSet *swt_fixed_accessible_get_attributes (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_get_attributes", "(J)J", obj);
@@ -1318,7 +1149,7 @@ static AtkAttributeSet *swt_fixed_accessible_get_attributes (AtkObject *obj) {
static const gchar *swt_fixed_accessible_get_description (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_get_description", "(J)J", obj);
@@ -1331,7 +1162,7 @@ static const gchar *swt_fixed_accessible_get_description (AtkObject *obj) {
static gint swt_fixed_accessible_get_index_in_parent (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_get_index_in_parent", "(J)J", obj);
@@ -1344,7 +1175,7 @@ static gint swt_fixed_accessible_get_index_in_parent (AtkObject *obj) {
static gint swt_fixed_accessible_get_n_children (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_get_n_children", "(J)J", obj);
@@ -1357,7 +1188,7 @@ static gint swt_fixed_accessible_get_n_children (AtkObject *obj) {
static const gchar *swt_fixed_accessible_get_name (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_get_name", "(J)J", obj);
@@ -1370,7 +1201,7 @@ static const gchar *swt_fixed_accessible_get_name (AtkObject *obj) {
static AtkObject *swt_fixed_accessible_get_parent (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_get_parent", "(J)J", obj);
@@ -1383,7 +1214,7 @@ static AtkObject *swt_fixed_accessible_get_parent (AtkObject *obj) {
static AtkRole swt_fixed_accessible_get_role (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_get_role", "(J)J", obj);
@@ -1396,7 +1227,7 @@ static AtkRole swt_fixed_accessible_get_role (AtkObject *obj) {
static AtkObject *swt_fixed_accessible_ref_child (AtkObject *obj, gint i) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_ref_child", "(JJ)J", obj, i);
@@ -1409,7 +1240,7 @@ static AtkObject *swt_fixed_accessible_ref_child (AtkObject *obj, gint i) {
static AtkStateSet *swt_fixed_accesssible_ref_state_set (AtkObject *obj) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkObject_ref_state_set", "(J)J", obj);
@@ -1422,7 +1253,7 @@ static AtkStateSet *swt_fixed_accesssible_ref_state_set (AtkObject *obj) {
static gboolean swt_fixed_accessible_action_do_action (AtkAction *action, gint i) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (action);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkAction_do_action", "(JJ)J", action, i);
@@ -1433,7 +1264,7 @@ static gboolean swt_fixed_accessible_action_do_action (AtkAction *action, gint i
static const gchar *swt_fixed_accessible_action_get_description (AtkAction *action, gint i) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (action);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkAction_get_description", "(JJ)J", action, i);
@@ -1444,7 +1275,7 @@ static const gchar *swt_fixed_accessible_action_get_description (AtkAction *acti
static const gchar *swt_fixed_accessible_action_get_keybinding (AtkAction *action, gint i) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (action);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkAction_get_keybinding", "(JJ)J", action, i);
@@ -1455,7 +1286,7 @@ static const gchar *swt_fixed_accessible_action_get_keybinding (AtkAction *actio
static gint swt_fixed_accessible_action_get_n_actions (AtkAction *action) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (action);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkAction_get_n_actions", "(J)J", action);
@@ -1466,7 +1297,7 @@ static gint swt_fixed_accessible_action_get_n_actions (AtkAction *action) {
static const gchar *swt_fixed_accessible_action_get_name (AtkAction *action, gint i) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (action);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkAction_get_name", "(JJ)J", action, i);
@@ -1527,7 +1358,7 @@ static AtkObject *swt_fixed_accessible_component_ref_accessible_at_point (AtkCom
gint y, AtkCoordType coord_type) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (component);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkComponent_ref_accessible_at_point", "(JJJJ)J",
@@ -1591,7 +1422,7 @@ static gboolean swt_fixed_accessible_editable_text_set_run_attributes (AtkEditab
AtkAttributeSet *attrib_set, gint start_offset, gint end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkEditableText_set_run_attributes", "(JJJJ)J",
@@ -1613,7 +1444,7 @@ static void swt_fixed_accessible_editable_text_set_text_contents (AtkEditableTex
static AtkHyperlink *swt_fixed_accessible_hypertext_get_link (AtkHypertext *hypertext, gint link_index) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (hypertext);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkHypertext_get_link", "(JJ)J", hypertext, link_index);
@@ -1624,7 +1455,7 @@ static AtkHyperlink *swt_fixed_accessible_hypertext_get_link (AtkHypertext *hype
static gint swt_fixed_accessible_hypertext_get_link_index (AtkHypertext *hypertext, gint char_index) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (hypertext);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkHypertext_get_link_index", "(JJ)J", hypertext, char_index);
@@ -1635,7 +1466,7 @@ static gint swt_fixed_accessible_hypertext_get_link_index (AtkHypertext *hyperte
static gint swt_fixed_accessible_hypertext_get_n_links (AtkHypertext *hypertext) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (hypertext);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkHypertext_get_n_links", "(J)J", hypertext);
@@ -1646,7 +1477,7 @@ static gint swt_fixed_accessible_hypertext_get_n_links (AtkHypertext *hypertext)
static gboolean swt_fixed_accessible_selection_is_child_selected (AtkSelection *selection, gint i) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (selection);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkSelection_is_child_selected", "(JJ)J", selection, i);
@@ -1657,7 +1488,7 @@ static gboolean swt_fixed_accessible_selection_is_child_selected (AtkSelection *
static AtkObject *swt_fixed_accessible_selection_ref_selection (AtkSelection *selection, gint i) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (selection);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkSelection_ref_selection", "(JJ)J", selection, i);
@@ -1668,7 +1499,7 @@ static AtkObject *swt_fixed_accessible_selection_ref_selection (AtkSelection *se
static AtkObject *swt_fixed_accessible_table_ref_at (AtkTable *table, gint row, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_ref_at", "(JJJ)J", table, row, column);
@@ -1679,7 +1510,7 @@ static AtkObject *swt_fixed_accessible_table_ref_at (AtkTable *table, gint row,
static gint swt_fixed_accessible_table_get_index_at (AtkTable *table, gint row, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_index_at", "(JJJ)J", table, row, column);
@@ -1690,7 +1521,7 @@ static gint swt_fixed_accessible_table_get_index_at (AtkTable *table, gint row,
static gint swt_fixed_accessible_table_get_column_at_index (AtkTable *table, gint index) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_column_at_index", "(JJ)J", table, index);
@@ -1701,7 +1532,7 @@ static gint swt_fixed_accessible_table_get_column_at_index (AtkTable *table, gin
static gint swt_fixed_accessible_table_get_row_at_index (AtkTable *table, gint index) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_row_at_index", "(JJ)J", table, index);
@@ -1712,7 +1543,7 @@ static gint swt_fixed_accessible_table_get_row_at_index (AtkTable *table, gint i
static gint swt_fixed_accessible_table_get_n_columns (AtkTable *table) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_n_columns", "(J)J", table);
@@ -1723,7 +1554,7 @@ static gint swt_fixed_accessible_table_get_n_columns (AtkTable *table) {
static gint swt_fixed_accessible_table_get_n_rows (AtkTable *table) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_n_rows", "(J)J", table);
@@ -1734,7 +1565,7 @@ static gint swt_fixed_accessible_table_get_n_rows (AtkTable *table) {
static gint swt_fixed_accessible_table_get_column_extent_at (AtkTable *table, gint row, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_column_extent_at", "(JJJ)J",
@@ -1746,7 +1577,7 @@ static gint swt_fixed_accessible_table_get_column_extent_at (AtkTable *table, gi
static gint swt_fixed_accessible_table_get_row_extent_at (AtkTable *table, gint row, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_row_extent_at", "(JJJ)J",
@@ -1758,7 +1589,7 @@ static gint swt_fixed_accessible_table_get_row_extent_at (AtkTable *table, gint
static AtkObject *swt_fixed_accessible_table_get_caption (AtkTable *table) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_caption", "(J)J", table);
@@ -1769,7 +1600,7 @@ static AtkObject *swt_fixed_accessible_table_get_caption (AtkTable *table) {
static AtkObject *swt_fixed_accessible_table_get_summary (AtkTable *table) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_summary", "(J)J", table);
@@ -1780,7 +1611,7 @@ static AtkObject *swt_fixed_accessible_table_get_summary (AtkTable *table) {
static const gchar *swt_fixed_accessible_table_get_column_description (AtkTable *table, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_column_description", "(JJ)J",
@@ -1792,7 +1623,7 @@ static const gchar *swt_fixed_accessible_table_get_column_description (AtkTable
static AtkObject *swt_fixed_accessible_table_get_column_header (AtkTable *table, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_column_header", "(JJ)J",
@@ -1804,7 +1635,7 @@ static AtkObject *swt_fixed_accessible_table_get_column_header (AtkTable *table,
static const gchar *swt_fixed_accessible_table_get_row_description (AtkTable *table, gint row) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_row_description", "(JJ)J",
@@ -1816,7 +1647,7 @@ static const gchar *swt_fixed_accessible_table_get_row_description (AtkTable *ta
static AtkObject *swt_fixed_accessible_table_get_row_header (AtkTable *table, gint row) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_row_header", "(JJ)J",
@@ -1828,7 +1659,7 @@ static AtkObject *swt_fixed_accessible_table_get_row_header (AtkTable *table, gi
static gint swt_fixed_accessible_table_get_selected_rows (AtkTable *table, gint **selected) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_selected_rows", "(JJ)J",
@@ -1840,7 +1671,7 @@ static gint swt_fixed_accessible_table_get_selected_rows (AtkTable *table, gint
static gint swt_fixed_accessible_table_get_selected_columns (AtkTable *table, gint **selected) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_get_selected_columns", "(JJ)J",
@@ -1852,7 +1683,7 @@ static gint swt_fixed_accessible_table_get_selected_columns (AtkTable *table, gi
static gboolean swt_fixed_accessible_table_is_column_selected (AtkTable *table, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_is_column_selected", "(JJ)J",
@@ -1864,7 +1695,7 @@ static gboolean swt_fixed_accessible_table_is_column_selected (AtkTable *table,
static gboolean swt_fixed_accessible_table_is_row_selected (AtkTable *table, gint row) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_is_row_selected", "(JJ)J",
@@ -1876,7 +1707,7 @@ static gboolean swt_fixed_accessible_table_is_row_selected (AtkTable *table, gin
static gboolean swt_fixed_accessible_table_is_selected (AtkTable *table, gint row, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_is_selected", "(JJJ)J",
@@ -1888,7 +1719,7 @@ static gboolean swt_fixed_accessible_table_is_selected (AtkTable *table, gint ro
static gboolean swt_fixed_accessible_table_add_row_selection (AtkTable *table, gint row) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_add_row_selection", "(JJ)J",
@@ -1900,7 +1731,7 @@ static gboolean swt_fixed_accessible_table_add_row_selection (AtkTable *table, g
static gboolean swt_fixed_accessible_table_remove_row_selection (AtkTable *table, gint row) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_remove_row_selection", "(JJ)J",
@@ -1912,7 +1743,7 @@ static gboolean swt_fixed_accessible_table_remove_row_selection (AtkTable *table
static gboolean swt_fixed_accessible_table_add_column_selection (AtkTable *table, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_add_column_selection", "(JJ)J",
@@ -1924,7 +1755,7 @@ static gboolean swt_fixed_accessible_table_add_column_selection (AtkTable *table
static gboolean swt_fixed_accessible_table_remove_column_selection (AtkTable *table, gint column) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (table);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkTable_remove_row_selection", "(JJ)J",
@@ -1936,7 +1767,7 @@ static gboolean swt_fixed_accessible_table_remove_column_selection (AtkTable *ta
static gboolean swt_fixed_accessible_text_add_selection (AtkText *text, gint start_offset, gint end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_add_selection", "(JJJ)J",
@@ -1949,7 +1780,7 @@ static AtkTextRange **swt_fixed_accessible_text_get_bounded_ranges (AtkText *tex
AtkCoordType coord_type, AtkTextClipType x_clip_type, AtkTextClipType y_clip_type) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_bounded_ranges", "(JJJJJ)J",
@@ -1961,7 +1792,7 @@ static AtkTextRange **swt_fixed_accessible_text_get_bounded_ranges (AtkText *tex
static gint swt_fixed_accessible_text_get_caret_offset (AtkText *text) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_caret_offset", "(J)J", text);
@@ -1972,7 +1803,7 @@ static gint swt_fixed_accessible_text_get_caret_offset (AtkText *text) {
static gunichar swt_fixed_accessible_text_get_character_at_offset (AtkText *text, gint offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_character_at_offset", "(JJ)J", text, offset);
@@ -1983,7 +1814,7 @@ static gunichar swt_fixed_accessible_text_get_character_at_offset (AtkText *text
static gint swt_fixed_accessible_text_get_character_count (AtkText *text) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_character_count", "(J)J", text);
@@ -1994,7 +1825,7 @@ static gint swt_fixed_accessible_text_get_character_count (AtkText *text) {
static gint swt_fixed_accessible_text_get_n_selections (AtkText *text) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_n_selections", "(J)J", text);
@@ -2006,7 +1837,7 @@ static gint swt_fixed_accessible_text_get_offset_at_point (AtkText *text, gint x
AtkCoordType coords) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_offset_at_point", "(JJJJ)J", text, x, y, coords);
@@ -2030,7 +1861,7 @@ static AtkAttributeSet *swt_fixed_accessible_text_get_run_attributes (AtkText *t
gint *end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_run_attributes", "(JJJJ)J", text,
@@ -2043,7 +1874,7 @@ static gchar *swt_fixed_accessible_text_get_selection (AtkText *text, gint selec
gint *end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_selection", "(JJJJ)J", text,
@@ -2055,7 +1886,7 @@ static gchar *swt_fixed_accessible_text_get_selection (AtkText *text, gint selec
static gchar *swt_fixed_accessible_text_get_text (AtkText *text, gint start_offset, gint end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_text", "(JJJ)J", text,
@@ -2068,7 +1899,7 @@ static gchar *swt_fixed_accessible_text_get_text_after_offset (AtkText *text, gi
AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_text_after_offset", "(JJJJJ)J", text,
@@ -2081,7 +1912,7 @@ static gchar *swt_fixed_accessible_text_get_text_at_offset (AtkText *text, gint
AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_text_at_offset", "(JJJJJ)J", text,
@@ -2094,7 +1925,7 @@ static gchar *swt_fixed_accessible_text_get_text_before_offset (AtkText *text, g
AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_get_text_before_offset", "(JJJJJ)J", text,
@@ -2106,7 +1937,7 @@ static gchar *swt_fixed_accessible_text_get_text_before_offset (AtkText *text, g
static gboolean swt_fixed_accessible_text_remove_selection (AtkText *text, gint selection_num) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_remove_selection", "(JJ)J", text, selection_num);
@@ -2117,7 +1948,7 @@ static gboolean swt_fixed_accessible_text_remove_selection (AtkText *text, gint
static gboolean swt_fixed_accessible_text_set_caret_offset (AtkText *text, gint offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_set_caret_offset", "(JJ)J", text, offset);
@@ -2129,7 +1960,7 @@ static gboolean swt_fixed_accessible_text_set_selection (AtkText *text, gint sel
gint start_offset, gint end_offset) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (text);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkText_set_selection", "(JJJJ)J", text,
@@ -2171,7 +2002,7 @@ static void swt_fixed_accessible_value_get_minimum_value (AtkValue *obj, GValue
static gboolean swt_fixed_accessible_value_set_current_value (AtkValue *obj, const GValue *value) {
SwtFixedAccessible *fixed = SWT_FIXED_ACCESSIBLE (obj);
SwtFixedAccessiblePrivate *private = fixed->priv;
- jintLong returned_value = 0;
+ jlong returned_value = 0;
if (private->has_accessible) {
returned_value = call_accessible_object_function("atkValue_set_current_value", "(JJ)J", obj, value);
@@ -2272,8 +2103,8 @@ static void swt_fixed_accessible_value_iface_init (AtkValueIface *iface) {
iface->set_current_value = swt_fixed_accessible_value_set_current_value;
}
-jintLong call_accessible_object_function (const char *method_name, const char *method_signature,...) {
- jintLong result = 0;
+jlong call_accessible_object_function (const char *method_name, const char *method_signature,...) {
+ jlong result = 0;
va_list arg_list;
jclass cls;
JNIEnv *env;
@@ -2285,7 +2116,7 @@ jintLong call_accessible_object_function (const char *method_name, const char *m
}
// Get the JNIEnv pointer
- if ((*cached_jvm)->GetEnv(cached_jvm, (void **)&env, JNI_VERSION_1_2)) {
+ if ((*JVM)->GetEnv(JVM, (void **)&env, JNI_VERSION_1_2)) {
g_critical("Error fetching the JNIEnv pointer\n");
return 0;
}
@@ -2308,12 +2139,43 @@ jintLong call_accessible_object_function (const char *method_name, const char *m
va_start(arg_list, method_signature);
result = (*env)->CallStaticLongMethodV(env, cls, mid, arg_list);
va_end(arg_list);
+
+ // JNI documentation says:
+ // The JNI functions that invoke a Java method return the result of
+ // the Java method. The programmer must call ExceptionOccurred() to
+ // check for possible exceptions that occurred during the execution
+ // of the Java method.
+ if ((*env)->ExceptionCheck(env)) {
+ g_critical("JNI method thrown exception: %s\n", method_name);
+ // Note that this also clears the exception. That's good because
+ // we don't want the unexpected exception to cause even more
+ // problems in later JNI calls.
+ (*env)->ExceptionDescribe(env);
+ // Exceptions are not expected, but still, let's do at least
+ // something to avoid possible confusion.
+ result = 0;
+ }
}
return result;
}
-#if !defined(GTK4)
+static GRecMutex swt_gdk_lock;
+
+static void swt_threads_enter(void) {
+ g_rec_mutex_lock(&swt_gdk_lock);
+}
+
+static void swt_threads_leave(void) {
+ g_rec_mutex_unlock(&swt_gdk_lock);
+}
+
+void swt_set_lock_functions() {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gdk_threads_set_lock_functions(&swt_threads_enter, &swt_threads_leave);
+ G_GNUC_END_IGNORE_DEPRECATIONS
+}
+
//Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1
// env variable. Please see Eclipse bug 471477.
// PLEASE NOTE: this functionality is only available on GTK3.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index 64e70086d0..e6c65e1a64 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
@@ -19,12 +19,15 @@
/* Special sizeof's */
#define GPollFD_sizeof() sizeof(GPollFD)
+#define GValue_sizeof() sizeof(GValue)
#define GtkCellRendererText_sizeof() sizeof(GtkCellRendererText)
#define GtkCellRendererTextClass_sizeof() sizeof(GtkCellRendererTextClass)
+#if !defined(GTK4)
#define GtkCellRendererPixbuf_sizeof() sizeof(GtkCellRendererPixbuf)
#define GtkCellRendererPixbufClass_sizeof() sizeof(GtkCellRendererPixbufClass)
#define GtkCellRendererToggle_sizeof() sizeof(GtkCellRendererToggle)
#define GtkCellRendererToggleClass_sizeof() sizeof(GtkCellRendererToggleClass)
+#endif
#define GtkTextIter_sizeof() sizeof(GtkTextIter)
#define GtkTreeIter_sizeof() sizeof(GtkTreeIter)
@@ -36,10 +39,10 @@
#define LIB_ATK "libatk-1.0-0.dll"
#define LIB_FONTCONFIG "libfontconfig-1.dll"
#else
-#if GTK_CHECK_VERSION(3,94,0)
-#define LIB_GTK "libgtk-4.so.0.9400.0"
+#if defined(GTK4)
+#define LIB_GTK "libgtk-4.so.1"
// Point GDK to GTK for GTK4
-#define LIB_GDK "libgtk-4.so.0.9400.0"
+#define LIB_GDK "libgtk-4.so.1"
#else
#define LIB_GTK "libgtk-3.so.0"
#define LIB_GDK "libgdk-3.so.0"
@@ -58,21 +61,6 @@
/* Field accessors */
#define G_OBJECT_CLASS_CONSTRUCTOR(arg0) (arg0)->constructor
#define G_OBJECT_CLASS_SET_CONSTRUCTOR(arg0, arg1) (arg0)->constructor = (GObject* (*) (GType, guint, GObjectConstructParam *))arg1
-struct _GtkAccelLabelPrivate
-{
- GtkWidget *accel_widget; /* done */
- GClosure *accel_closure; /* has set function */
- GtkAccelGroup *accel_group; /* set by set_accel_closure() */
- gchar *accel_string; /* has set function */
- guint accel_padding; /* should be style property? */
- guint16 accel_string_width; /* seems to be private */
-};
-#define GTK_ACCEL_LABEL_SET_ACCEL_STRING(arg0, arg1) (arg0)->priv->accel_string = arg1
-#define GTK_ACCEL_LABEL_GET_ACCEL_STRING(arg0) (arg0)->priv->accel_string
-#define GTK_ENTRY_IM_CONTEXT(arg0) (arg0)->im_context
-#define GTK_TEXTVIEW_IM_CONTEXT(arg0) (arg0)->im_context
-#define GTK_WIDGET_REQUISITION_WIDTH(arg0) (arg0)->requisition.width
-#define GTK_WIDGET_REQUISITION_HEIGHT(arg0) (arg0)->requisition.height
#define GDK_EVENT_TYPE(arg0) (arg0)->type
#define GDK_EVENT_WINDOW(arg0) (arg0)->window
#define X_EVENT_TYPE(arg0) (arg0)->type
@@ -82,9 +70,6 @@ struct _GtkAccelLabelPrivate
#define g_slist_data(arg0) (arg0)->data
#define g_list_set_next(arg0, arg1) (arg0)->next = arg1
#define g_list_set_previous(arg0, arg1) (arg0)->prev = arg1
-#define gtk_style_get_font_desc(arg0) (arg0)->font_desc
-#define gtk_style_get_xthickness(arg0) (arg0)->xthickness
-#define gtk_style_get_ythickness(arg0) (arg0)->ythickness
#define localeconv_decimal_point() localeconv()->decimal_point
// Mechanism to get function pointers of C/gtk functions back to java.
@@ -92,11 +77,11 @@ struct _GtkAccelLabelPrivate
// NOTE: functions like gtk_false need to be linked to a lib. Eg see gtk_false_LIB above.
#define GET_FUNCTION_POINTER_gtk_false() 0; \
GTK_LOAD_FUNCTION(fp, gtk_false) \
-rc = (jintLong)fp;
+rc = (jlong)fp;
#define gtk_status_icon_position_menu_func() 0; \
GTK_LOAD_FUNCTION(fp, gtk_status_icon_position_menu) \
-rc = (jintLong)fp;
+rc = (jlong)fp;
glong g_utf16_pointer_to_offset(const gchar*, const gchar*);
gchar* g_utf16_offset_to_pointer(const gchar*, glong);
@@ -104,9 +89,6 @@ glong g_utf16_strlen(const gchar*, glong max);
glong g_utf16_offset_to_utf8_offset(const gchar*, glong);
glong g_utf8_offset_to_utf16_offset(const gchar*, glong);
-// Cached JVM pointer: see bug 521487.
-JavaVM *cached_jvm;
-
#define SWT_TYPE_FIXED (swt_fixed_get_type ())
#define SWT_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWT_TYPE_FIXED, SwtFixed))
#define SWT_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWT_TYPE_FIXED, SwtFixedClass))
@@ -119,6 +101,17 @@ typedef struct _SwtFixed SwtFixed;
typedef struct _SwtFixedPrivate SwtFixedPrivate;
typedef struct _SwtFixedClass SwtFixedClass;
+#if defined(GTK4)
+struct _SwtFixed
+{
+ GtkWidget container;
+};
+
+struct _SwtFixedClass
+{
+ GtkWidgetClass parent_class;
+};
+#else
struct _SwtFixed
{
GtkContainer container;
@@ -134,14 +127,21 @@ struct _SwtFixedClass
{
GtkContainerClass parent_class;
};
+#endif
GType swt_fixed_get_type (void) G_GNUC_CONST;
+#if defined(GTK4)
+void swt_fixed_add(SwtFixed* fixed, GtkWidget* widget);
+void swt_fixed_remove(SwtFixed* fixed, GtkWidget* widget);
+#endif
void swt_fixed_restack(SwtFixed *fixed, GtkWidget *widget, GtkWidget *sibling, gboolean above);
void swt_fixed_move(SwtFixed *fixed, GtkWidget *widget, gint x, gint y);
void swt_fixed_resize(SwtFixed *fixed, GtkWidget *widget, gint width, gint height);
+#if !defined(GTK4)
#include <gtk/gtk-a11y.h>
+#endif
#define SWT_TYPE_FIXED_ACCESSIBLE (swt_fixed_accessible_get_type ())
#define SWT_FIXED_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWT_TYPE_FIXED_ACCESSIBLE, SwtFixedAccessible))
@@ -151,6 +151,16 @@ typedef struct _SwtFixedAccessible SwtFixedAccessible;
typedef struct _SwtFixedAccessiblePrivate SwtFixedAccessiblePrivate;
typedef struct _SwtFixedAccessibleClass SwtFixedAccessibleClass;
+#if defined(GTK4)
+struct _SwtFixedAccessible
+{
+ SwtFixedAccessiblePrivate *priv;
+};
+
+struct _SwtFixedAccessibleClass
+{
+};
+#else
struct _SwtFixedAccessible
{
GtkContainerAccessible parent;
@@ -162,12 +172,16 @@ struct _SwtFixedAccessibleClass
{
GtkContainerAccessibleClass parent_class;
};
+#endif
GType swt_fixed_accessible_get_type (void) G_GNUC_CONST;
+#if !defined(GTK4)
AtkObject *swt_fixed_accessible_new (GtkWidget *widget);
void swt_fixed_accessible_register_accessible (AtkObject *obj, gboolean is_native, GtkWidget *to_map);
-jintLong call_accessible_object_function (const char *method_name, const char *method_signature,...);
+#endif
+jlong call_accessible_object_function (const char *method_name, const char *method_signature,...);
+void swt_set_lock_functions();
void swt_debug_on_fatal_warnings() ;
#endif /* ORG_ECLIPSE_SWT_GTK_OS_CUSTOM_H (include guard, this should be the last line) */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index b0eac77a80..0ab5dc85d2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2022 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -25,245 +25,225 @@ char * GDK_nativeFunctionNames[] = {
"GDK_1EVENT_1TYPE",
"GDK_1EVENT_1WINDOW",
"GDK_1IS_1X11_1DISPLAY",
- "GdkEventAny_1sizeof",
- "GdkEventButton_1sizeof",
- "GdkEventCrossing_1sizeof",
- "GdkEventFocus_1sizeof",
- "GdkEventKey_1sizeof",
- "GdkEventMotion_1sizeof",
- "GdkEventWindowState_1sizeof",
- "GdkEvent_1sizeof",
- "GdkGeometry_1sizeof",
+ "GDK_1TYPE_1PIXBUF",
+ "GDK_1TYPE_1RGBA",
"GdkKeymapKey_1sizeof",
"GdkRGBA_1sizeof",
"GdkRectangle_1sizeof",
- "GdkWindowAttr_1sizeof",
- "_1GDK_1TYPE_1PIXBUF",
- "_1GDK_1TYPE_1RGBA",
- "_1gdk_1atom_1intern",
- "_1gdk_1atom_1name",
- "_1gdk_1cairo_1create",
- "_1gdk_1cairo_1get_1clip_1rectangle",
- "_1gdk_1cairo_1region",
- "_1gdk_1cairo_1region_1create_1from_1surface",
- "_1gdk_1cairo_1set_1source_1pixbuf",
- "_1gdk_1cairo_1set_1source_1rgba",
- "_1gdk_1cairo_1set_1source_1window",
- "_1gdk_1clipboard_1set_1content",
- "_1gdk_1cursor_1new_1for_1display",
- "_1gdk_1cursor_1new_1from_1name__J_3B",
- "_1gdk_1cursor_1new_1from_1name___3BJ",
- "_1gdk_1cursor_1new_1from_1pixbuf",
- "_1gdk_1cursor_1new_1from_1texture",
- "_1gdk_1device_1get_1associated_1device",
- "_1gdk_1device_1get_1seat",
- "_1gdk_1device_1get_1surface_1at_1position",
- "_1gdk_1device_1get_1window_1at_1position",
- "_1gdk_1device_1grab",
- "_1gdk_1device_1manager_1get_1client_1pointer",
- "_1gdk_1device_1ungrab",
- "_1gdk_1device_1warp__JII",
- "_1gdk_1device_1warp__JJII",
- "_1gdk_1display_1beep",
- "_1gdk_1display_1get_1clipboard",
- "_1gdk_1display_1get_1default",
- "_1gdk_1display_1get_1default_1group",
- "_1gdk_1display_1get_1default_1seat",
- "_1gdk_1display_1get_1device_1manager",
- "_1gdk_1display_1get_1keymap",
- "_1gdk_1display_1get_1monitor",
- "_1gdk_1display_1get_1monitor_1at_1point",
- "_1gdk_1display_1get_1monitor_1at_1surface",
- "_1gdk_1display_1get_1monitor_1at_1window",
- "_1gdk_1display_1get_1n_1monitors",
- "_1gdk_1display_1get_1primary_1clipboard",
- "_1gdk_1display_1get_1primary_1monitor",
- "_1gdk_1display_1is_1composited",
- "_1gdk_1display_1peek_1event",
- "_1gdk_1display_1put_1event",
- "_1gdk_1display_1supports_1cursor_1color",
- "_1gdk_1drag_1context_1get_1actions",
- "_1gdk_1drag_1context_1get_1dest_1window",
- "_1gdk_1drag_1context_1get_1selected_1action",
- "_1gdk_1drag_1context_1list_1targets",
- "_1gdk_1drag_1status",
- "_1gdk_1drawing_1context_1get_1cairo_1context",
- "_1gdk_1event_1copy",
- "_1gdk_1event_1free",
- "_1gdk_1event_1get",
- "_1gdk_1event_1get_1button",
- "_1gdk_1event_1get_1coords",
- "_1gdk_1event_1get_1crossing_1mode",
- "_1gdk_1event_1get_1event_1type",
- "_1gdk_1event_1get_1focus_1in",
- "_1gdk_1event_1get_1key_1group",
- "_1gdk_1event_1get_1keycode",
- "_1gdk_1event_1get_1keyval",
- "_1gdk_1event_1get_1root_1coords",
- "_1gdk_1event_1get_1scroll_1deltas",
- "_1gdk_1event_1get_1scroll_1direction",
- "_1gdk_1event_1get_1seat",
- "_1gdk_1event_1get_1state",
- "_1gdk_1event_1get_1string",
- "_1gdk_1event_1get_1surface",
- "_1gdk_1event_1get_1time",
- "_1gdk_1event_1get_1window",
- "_1gdk_1event_1handler_1set",
- "_1gdk_1event_1new",
- "_1gdk_1event_1peek",
- "_1gdk_1event_1put",
- "_1gdk_1event_1set_1device",
- "_1gdk_1get_1default_1root_1window",
- "_1gdk_1keymap_1get_1entries_1for_1keyval",
- "_1gdk_1keymap_1get_1for_1display",
- "_1gdk_1keymap_1translate_1keyboard_1state",
- "_1gdk_1keyval_1to_1lower",
- "_1gdk_1keyval_1to_1unicode",
- "_1gdk_1monitor_1get_1geometry",
- "_1gdk_1monitor_1get_1scale_1factor",
- "_1gdk_1monitor_1get_1width_1mm",
- "_1gdk_1monitor_1get_1workarea",
- "_1gdk_1pango_1context_1get",
- "_1gdk_1pango_1layout_1get_1clip_1region",
- "_1gdk_1pixbuf_1animation_1get_1iter",
- "_1gdk_1pixbuf_1animation_1get_1static_1image",
- "_1gdk_1pixbuf_1animation_1is_1static_1image",
- "_1gdk_1pixbuf_1animation_1iter_1advance",
- "_1gdk_1pixbuf_1animation_1iter_1get_1delay_1time",
- "_1gdk_1pixbuf_1animation_1iter_1get_1pixbuf",
- "_1gdk_1pixbuf_1copy",
- "_1gdk_1pixbuf_1copy_1area",
- "_1gdk_1pixbuf_1format_1get_1name",
- "_1gdk_1pixbuf_1get_1bits_1per_1sample",
- "_1gdk_1pixbuf_1get_1byte_1length",
- "_1gdk_1pixbuf_1get_1has_1alpha",
- "_1gdk_1pixbuf_1get_1height",
- "_1gdk_1pixbuf_1get_1n_1channels",
- "_1gdk_1pixbuf_1get_1pixels",
- "_1gdk_1pixbuf_1get_1rowstride",
- "_1gdk_1pixbuf_1get_1width",
- "_1gdk_1pixbuf_1loader_1close",
- "_1gdk_1pixbuf_1loader_1get_1animation",
- "_1gdk_1pixbuf_1loader_1get_1format",
- "_1gdk_1pixbuf_1loader_1get_1pixbuf",
- "_1gdk_1pixbuf_1loader_1new",
- "_1gdk_1pixbuf_1loader_1write",
- "_1gdk_1pixbuf_1new",
- "_1gdk_1pixbuf_1new_1from_1data",
- "_1gdk_1pixbuf_1new_1from_1file",
- "_1gdk_1pixbuf_1save_1to_1bufferv",
- "_1gdk_1pixbuf_1scale_1simple",
- "_1gdk_1property_1get",
- "_1gdk_1rgba_1free",
- "_1gdk_1rgba_1hash",
- "_1gdk_1rgba_1parse",
- "_1gdk_1rgba_1to_1string",
- "_1gdk_1screen_1get_1default",
- "_1gdk_1screen_1get_1monitor_1at_1point",
- "_1gdk_1screen_1get_1monitor_1at_1window",
- "_1gdk_1screen_1get_1monitor_1geometry",
- "_1gdk_1screen_1get_1monitor_1scale_1factor",
- "_1gdk_1screen_1get_1monitor_1workarea",
- "_1gdk_1screen_1get_1n_1monitors",
- "_1gdk_1screen_1get_1primary_1monitor",
- "_1gdk_1screen_1get_1resolution",
- "_1gdk_1screen_1get_1system_1visual",
- "_1gdk_1screen_1height",
- "_1gdk_1screen_1is_1composited",
- "_1gdk_1screen_1width",
- "_1gdk_1seat_1get_1keyboard",
- "_1gdk_1seat_1get_1pointer",
- "_1gdk_1seat_1grab",
- "_1gdk_1seat_1ungrab",
- "_1gdk_1selection_1owner_1get",
- "_1gdk_1selection_1owner_1set",
- "_1gdk_1set_1program_1class",
- "_1gdk_1surface_1create_1similar_1surface",
- "_1gdk_1surface_1destroy",
- "_1gdk_1surface_1focus",
- "_1gdk_1surface_1get_1children",
- "_1gdk_1surface_1get_1device_1position",
- "_1gdk_1surface_1get_1display",
- "_1gdk_1surface_1get_1frame_1extents",
- "_1gdk_1surface_1get_1height",
- "_1gdk_1surface_1get_1origin",
- "_1gdk_1surface_1get_1root_1origin",
- "_1gdk_1surface_1get_1state",
- "_1gdk_1surface_1get_1user_1data",
- "_1gdk_1surface_1get_1width",
- "_1gdk_1surface_1hide",
- "_1gdk_1surface_1invalidate_1rect",
- "_1gdk_1surface_1invalidate_1region",
- "_1gdk_1surface_1lower",
- "_1gdk_1surface_1move",
- "_1gdk_1surface_1move_1resize",
- "_1gdk_1surface_1new_1child",
- "_1gdk_1surface_1raise",
- "_1gdk_1surface_1resize",
- "_1gdk_1surface_1restack",
- "_1gdk_1surface_1set_1cursor",
- "_1gdk_1surface_1set_1decorations",
- "_1gdk_1surface_1set_1functions",
- "_1gdk_1surface_1set_1user_1data",
- "_1gdk_1surface_1show",
- "_1gdk_1surface_1show_1unraised",
- "_1gdk_1text_1property_1to_1utf8_1list_1for_1display",
- "_1gdk_1texture_1new_1for_1pixbuf",
- "_1gdk_1unicode_1to_1keyval",
- "_1gdk_1utf8_1to_1string_1target",
- "_1gdk_1visual_1get_1depth",
- "_1gdk_1window_1begin_1draw_1frame",
- "_1gdk_1window_1create_1similar_1surface",
- "_1gdk_1window_1destroy",
- "_1gdk_1window_1end_1draw_1frame",
- "_1gdk_1window_1focus",
- "_1gdk_1window_1get_1children",
- "_1gdk_1window_1get_1device_1position",
- "_1gdk_1window_1get_1display",
- "_1gdk_1window_1get_1events",
- "_1gdk_1window_1get_1frame_1extents",
- "_1gdk_1window_1get_1height",
- "_1gdk_1window_1get_1origin",
- "_1gdk_1window_1get_1parent",
- "_1gdk_1window_1get_1root_1origin",
- "_1gdk_1window_1get_1state",
- "_1gdk_1window_1get_1user_1data",
- "_1gdk_1window_1get_1visible_1region",
- "_1gdk_1window_1get_1width",
- "_1gdk_1window_1hide",
- "_1gdk_1window_1invalidate_1rect",
- "_1gdk_1window_1invalidate_1region",
- "_1gdk_1window_1lower",
- "_1gdk_1window_1move",
- "_1gdk_1window_1move_1resize",
- "_1gdk_1window_1new",
- "_1gdk_1window_1process_1all_1updates",
- "_1gdk_1window_1process_1updates",
- "_1gdk_1window_1raise",
- "_1gdk_1window_1resize",
- "_1gdk_1window_1restack",
- "_1gdk_1window_1set_1background_1pattern",
- "_1gdk_1window_1set_1cursor",
- "_1gdk_1window_1set_1decorations",
- "_1gdk_1window_1set_1events",
- "_1gdk_1window_1set_1functions",
- "_1gdk_1window_1set_1override_1redirect",
- "_1gdk_1window_1set_1user_1data",
- "_1gdk_1window_1show",
- "_1gdk_1window_1show_1unraised",
- "_1gdk_1x11_1display_1error_1trap_1pop_1ignored",
- "_1gdk_1x11_1display_1error_1trap_1push",
- "_1gdk_1x11_1display_1get_1xdisplay",
- "_1gdk_1x11_1display_1utf8_1to_1compound_1text",
- "_1gdk_1x11_1get_1default_1xdisplay",
- "_1gdk_1x11_1screen_1get_1window_1manager_1name",
- "_1gdk_1x11_1screen_1lookup_1visual",
- "_1gdk_1x11_1surface_1get_1xid",
- "_1gdk_1x11_1surface_1lookup_1for_1display",
- "_1gdk_1x11_1visual_1get_1xvisual",
- "_1gdk_1x11_1window_1get_1xid",
- "_1gdk_1x11_1window_1lookup_1for_1display",
+ "gdk_1atom_1intern",
+ "gdk_1atom_1name",
+ "gdk_1button_1event_1get_1button",
+ "gdk_1cairo_1create",
+ "gdk_1cairo_1get_1clip_1rectangle",
+ "gdk_1cairo_1region",
+ "gdk_1cairo_1region_1create_1from_1surface",
+ "gdk_1cairo_1set_1source_1pixbuf",
+ "gdk_1cairo_1set_1source_1rgba",
+ "gdk_1cairo_1set_1source_1window",
+ "gdk_1clipboard_1set_1content",
+ "gdk_1crossing_1event_1get_1mode",
+ "gdk_1cursor_1new_1from_1name__JLjava_lang_String_2",
+ "gdk_1cursor_1new_1from_1name__Ljava_lang_String_2J",
+ "gdk_1cursor_1new_1from_1pixbuf",
+ "gdk_1cursor_1new_1from_1texture",
+ "gdk_1device_1get_1associated_1device",
+ "gdk_1device_1get_1seat",
+ "gdk_1device_1get_1surface_1at_1position",
+ "gdk_1device_1get_1window_1at_1position",
+ "gdk_1device_1warp",
+ "gdk_1display_1beep",
+ "gdk_1display_1get_1clipboard",
+ "gdk_1display_1get_1default",
+ "gdk_1display_1get_1default_1group",
+ "gdk_1display_1get_1default_1seat",
+ "gdk_1display_1get_1monitor",
+ "gdk_1display_1get_1monitor_1at_1point",
+ "gdk_1display_1get_1monitor_1at_1surface",
+ "gdk_1display_1get_1monitor_1at_1window",
+ "gdk_1display_1get_1monitors",
+ "gdk_1display_1get_1n_1monitors",
+ "gdk_1display_1get_1primary_1clipboard",
+ "gdk_1display_1get_1primary_1monitor",
+ "gdk_1display_1is_1composited",
+ "gdk_1display_1map_1keyval",
+ "gdk_1display_1put_1event",
+ "gdk_1display_1supports_1cursor_1color",
+ "gdk_1drag_1context_1get_1actions",
+ "gdk_1drag_1context_1get_1dest_1window",
+ "gdk_1drag_1context_1get_1selected_1action",
+ "gdk_1drag_1context_1list_1targets",
+ "gdk_1drag_1status",
+ "gdk_1event_1copy",
+ "gdk_1event_1free",
+ "gdk_1event_1get",
+ "gdk_1event_1get_1button",
+ "gdk_1event_1get_1coords",
+ "gdk_1event_1get_1event_1type",
+ "gdk_1event_1get_1keycode",
+ "gdk_1event_1get_1keyval",
+ "gdk_1event_1get_1modifier_1state",
+ "gdk_1event_1get_1position",
+ "gdk_1event_1get_1root_1coords",
+ "gdk_1event_1get_1scroll_1deltas",
+ "gdk_1event_1get_1scroll_1direction",
+ "gdk_1event_1get_1seat",
+ "gdk_1event_1get_1state",
+ "gdk_1event_1get_1surface",
+ "gdk_1event_1get_1time",
+ "gdk_1event_1get_1window",
+ "gdk_1event_1handler_1set",
+ "gdk_1event_1new",
+ "gdk_1event_1peek",
+ "gdk_1event_1put",
+ "gdk_1event_1ref",
+ "gdk_1event_1set_1device",
+ "gdk_1event_1unref",
+ "gdk_1focus_1event_1get_1in",
+ "gdk_1get_1default_1root_1window",
+ "gdk_1key_1event_1get_1keycode",
+ "gdk_1key_1event_1get_1keyval",
+ "gdk_1key_1event_1get_1layout",
+ "gdk_1keymap_1get_1entries_1for_1keyval",
+ "gdk_1keymap_1get_1for_1display",
+ "gdk_1keymap_1translate_1keyboard_1state",
+ "gdk_1keyval_1name",
+ "gdk_1keyval_1to_1lower",
+ "gdk_1keyval_1to_1unicode",
+ "gdk_1monitor_1get_1geometry",
+ "gdk_1monitor_1get_1scale_1factor",
+ "gdk_1monitor_1get_1workarea",
+ "gdk_1pango_1context_1get",
+ "gdk_1pango_1layout_1get_1clip_1region",
+ "gdk_1pixbuf_1animation_1get_1iter",
+ "gdk_1pixbuf_1animation_1get_1static_1image",
+ "gdk_1pixbuf_1animation_1is_1static_1image",
+ "gdk_1pixbuf_1animation_1iter_1advance",
+ "gdk_1pixbuf_1animation_1iter_1get_1delay_1time",
+ "gdk_1pixbuf_1animation_1iter_1get_1pixbuf",
+ "gdk_1pixbuf_1copy",
+ "gdk_1pixbuf_1copy_1area",
+ "gdk_1pixbuf_1format_1get_1name",
+ "gdk_1pixbuf_1get_1bits_1per_1sample",
+ "gdk_1pixbuf_1get_1from_1surface",
+ "gdk_1pixbuf_1get_1from_1texture",
+ "gdk_1pixbuf_1get_1from_1window",
+ "gdk_1pixbuf_1get_1has_1alpha",
+ "gdk_1pixbuf_1get_1height",
+ "gdk_1pixbuf_1get_1n_1channels",
+ "gdk_1pixbuf_1get_1pixels",
+ "gdk_1pixbuf_1get_1rowstride",
+ "gdk_1pixbuf_1get_1width",
+ "gdk_1pixbuf_1loader_1close",
+ "gdk_1pixbuf_1loader_1get_1animation",
+ "gdk_1pixbuf_1loader_1get_1format",
+ "gdk_1pixbuf_1loader_1get_1pixbuf",
+ "gdk_1pixbuf_1loader_1new",
+ "gdk_1pixbuf_1loader_1write",
+ "gdk_1pixbuf_1new",
+ "gdk_1pixbuf_1new_1from_1data",
+ "gdk_1pixbuf_1new_1from_1file",
+ "gdk_1pixbuf_1save_1to_1bufferv",
+ "gdk_1pixbuf_1scale_1simple",
+ "gdk_1popup_1get_1parent",
+ "gdk_1popup_1layout_1new",
+ "gdk_1popup_1present",
+ "gdk_1property_1get",
+ "gdk_1rgba_1free",
+ "gdk_1rgba_1parse",
+ "gdk_1rgba_1to_1string",
+ "gdk_1screen_1get_1default",
+ "gdk_1screen_1get_1monitor_1at_1point",
+ "gdk_1screen_1get_1monitor_1at_1window",
+ "gdk_1screen_1get_1monitor_1geometry",
+ "gdk_1screen_1get_1monitor_1scale_1factor",
+ "gdk_1screen_1get_1monitor_1workarea",
+ "gdk_1screen_1get_1n_1monitors",
+ "gdk_1screen_1get_1primary_1monitor",
+ "gdk_1screen_1get_1resolution",
+ "gdk_1screen_1get_1system_1visual",
+ "gdk_1screen_1height",
+ "gdk_1screen_1is_1composited",
+ "gdk_1screen_1width",
+ "gdk_1scroll_1event_1get_1deltas",
+ "gdk_1scroll_1event_1get_1direction",
+ "gdk_1seat_1get_1keyboard",
+ "gdk_1seat_1get_1pointer",
+ "gdk_1seat_1grab",
+ "gdk_1seat_1ungrab",
+ "gdk_1selection_1owner_1get",
+ "gdk_1selection_1owner_1set",
+ "gdk_1set_1program_1class",
+ "gdk_1surface_1create_1similar_1surface",
+ "gdk_1surface_1destroy",
+ "gdk_1surface_1get_1device_1position",
+ "gdk_1surface_1get_1display",
+ "gdk_1surface_1get_1height",
+ "gdk_1surface_1get_1width",
+ "gdk_1surface_1hide",
+ "gdk_1surface_1new_1popup",
+ "gdk_1surface_1new_1toplevel",
+ "gdk_1surface_1set_1cursor",
+ "gdk_1surface_1set_1input_1region",
+ "gdk_1surface_1set_1opaque_1region",
+ "gdk_1text_1property_1to_1utf8_1list_1for_1display",
+ "gdk_1texture_1new_1for_1pixbuf",
+ "gdk_1texture_1new_1from_1file",
+ "gdk_1threads_1add_1idle",
+ "gdk_1threads_1add_1timeout",
+ "gdk_1threads_1enter",
+ "gdk_1threads_1init",
"gdk_1threads_1leave",
+ "gdk_1toplevel_1layout_1new",
+ "gdk_1toplevel_1present",
+ "gdk_1unicode_1to_1keyval",
+ "gdk_1utf8_1to_1string_1target",
+ "gdk_1visual_1get_1depth",
+ "gdk_1window_1create_1similar_1surface",
+ "gdk_1window_1destroy",
+ "gdk_1window_1focus",
+ "gdk_1window_1get_1children",
+ "gdk_1window_1get_1device_1position",
+ "gdk_1window_1get_1display",
+ "gdk_1window_1get_1events",
+ "gdk_1window_1get_1frame_1extents",
+ "gdk_1window_1get_1height",
+ "gdk_1window_1get_1origin",
+ "gdk_1window_1get_1parent",
+ "gdk_1window_1get_1root_1origin",
+ "gdk_1window_1get_1state",
+ "gdk_1window_1get_1user_1data",
+ "gdk_1window_1get_1visible_1region",
+ "gdk_1window_1get_1width",
+ "gdk_1window_1hide",
+ "gdk_1window_1invalidate_1rect",
+ "gdk_1window_1invalidate_1region",
+ "gdk_1window_1lower",
+ "gdk_1window_1move",
+ "gdk_1window_1move_1resize",
+ "gdk_1window_1raise",
+ "gdk_1window_1resize",
+ "gdk_1window_1restack",
+ "gdk_1window_1set_1background_1pattern",
+ "gdk_1window_1set_1cursor",
+ "gdk_1window_1set_1decorations",
+ "gdk_1window_1set_1events",
+ "gdk_1window_1set_1functions",
+ "gdk_1window_1set_1override_1redirect",
+ "gdk_1window_1set_1user_1data",
+ "gdk_1window_1show",
+ "gdk_1window_1show_1unraised",
+ "gdk_1x11_1display_1error_1trap_1pop_1ignored",
+ "gdk_1x11_1display_1error_1trap_1push",
+ "gdk_1x11_1display_1get_1default_1group",
+ "gdk_1x11_1display_1get_1xdisplay",
+ "gdk_1x11_1display_1utf8_1to_1compound_1text",
+ "gdk_1x11_1get_1default_1xdisplay",
+ "gdk_1x11_1screen_1get_1window_1manager_1name",
+ "gdk_1x11_1screen_1lookup_1visual",
+ "gdk_1x11_1surface_1get_1xid",
+ "gdk_1x11_1surface_1lookup_1for_1display",
+ "gdk_1x11_1window_1get_1xid",
+ "gdk_1x11_1window_1lookup_1for_1display",
};
#define NATIVE_FUNCTION_COUNT sizeof(GDK_nativeFunctionNames) / sizeof(char*)
int GDK_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
@@ -293,7 +273,26 @@ JNIEXPORT jint JNICALL STATS_NATIVE(GDK_1GetFunctionCallCount)
#ifdef NATIVE_STATS
char * GTK_nativeFunctionNames[] = {
+ "GET_1FUNCTION_1POINTER_1gtk_1false",
+ "GTK_1IS_1ACCEL_1LABEL",
+ "GTK_1IS_1BOX",
+ "GTK_1IS_1BUTTON",
+ "GTK_1IS_1CELL_1RENDERER_1PIXBUF",
+ "GTK_1IS_1CELL_1RENDERER_1TEXT",
+ "GTK_1IS_1CELL_1RENDERER_1TOGGLE",
+ "GTK_1IS_1CONTAINER",
+ "GTK_1IS_1IM_1CONTEXT",
+ "GTK_1IS_1LABEL",
+ "GTK_1IS_1PLUG",
+ "GTK_1IS_1SCROLLED_1WINDOW",
+ "GTK_1IS_1WINDOW",
+ "GTK_1TYPE_1CELL_1RENDERER_1PIXBUF",
+ "GTK_1TYPE_1CELL_1RENDERER_1TEXT",
+ "GTK_1TYPE_1CELL_1RENDERER_1TOGGLE",
+ "GTK_1TYPE_1IM_1MULTICONTEXT",
"GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE",
+ "GTK_1TYPE_1WIDGET",
+ "GTK_1TYPE_1WINDOW",
"GTK_1WIDGET_1GET_1CLASS",
"GtkAllocation_1sizeof",
"GtkBorder_1sizeof",
@@ -304,776 +303,528 @@ char * GTK_nativeFunctionNames[] = {
"GtkCellRendererToggleClass_1sizeof",
"GtkCellRendererToggle_1sizeof",
"GtkRequisition_1sizeof",
- "GtkTargetEntry_1sizeof",
"GtkTextIter_1sizeof",
"GtkTreeIter_1sizeof",
- "_1GET_1FUNCTION_1POINTER_1gtk_1false",
- "_1GTK_1ACCESSIBLE",
- "_1GTK_1IS_1ACCEL_1LABEL",
- "_1GTK_1IS_1BUTTON",
- "_1GTK_1IS_1CELL_1RENDERER_1PIXBUF",
- "_1GTK_1IS_1CELL_1RENDERER_1TEXT",
- "_1GTK_1IS_1CELL_1RENDERER_1TOGGLE",
- "_1GTK_1IS_1CONTAINER",
- "_1GTK_1IS_1IM_1CONTEXT",
- "_1GTK_1IS_1LABEL",
- "_1GTK_1IS_1MENU_1ITEM",
- "_1GTK_1IS_1PLUG",
- "_1GTK_1IS_1SCROLLED_1WINDOW",
- "_1GTK_1IS_1WINDOW",
- "_1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF",
- "_1GTK_1TYPE_1CELL_1RENDERER_1TEXT",
- "_1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE",
- "_1GTK_1TYPE_1IM_1MULTICONTEXT",
- "_1GTK_1TYPE_1MENU",
- "_1GTK_1TYPE_1WIDGET",
- "_1GTK_1TYPE_1WINDOW",
- "_1gtk_1accel_1group_1new",
- "_1gtk_1accel_1label_1new",
- "_1gtk_1accel_1label_1set_1accel",
- "_1gtk_1accel_1label_1set_1accel_1widget",
- "_1gtk_1accelerator_1get_1default_1mod_1mask",
- "_1gtk_1accelerator_1parse",
- "_1gtk_1accessible_1get_1widget",
- "_1gtk_1adjustment_1configure",
- "_1gtk_1adjustment_1get_1lower",
- "_1gtk_1adjustment_1get_1page_1increment",
- "_1gtk_1adjustment_1get_1page_1size",
- "_1gtk_1adjustment_1get_1step_1increment",
- "_1gtk_1adjustment_1get_1upper",
- "_1gtk_1adjustment_1get_1value",
- "_1gtk_1adjustment_1new",
- "_1gtk_1adjustment_1set_1page_1increment",
- "_1gtk_1adjustment_1set_1step_1increment",
- "_1gtk_1adjustment_1set_1value",
- "_1gtk_1adjustment_1value_1changed",
- "_1gtk_1bin_1get_1child",
- "_1gtk_1border_1free",
- "_1gtk_1box_1new",
- "_1gtk_1box_1pack_1end__JJ",
- "_1gtk_1box_1pack_1end__JJZZI",
- "_1gtk_1box_1reorder_1child",
- "_1gtk_1box_1set_1child_1packing__JJI",
- "_1gtk_1box_1set_1child_1packing__JJZZII",
- "_1gtk_1box_1set_1homogeneous",
- "_1gtk_1box_1set_1spacing",
- "_1gtk_1button_1clicked",
- "_1gtk_1button_1new",
- "_1gtk_1button_1set_1image",
- "_1gtk_1calendar_1clear_1marks",
- "_1gtk_1calendar_1get_1date",
- "_1gtk_1calendar_1mark_1day",
- "_1gtk_1calendar_1new",
- "_1gtk_1calendar_1select_1day",
- "_1gtk_1calendar_1select_1month",
- "_1gtk_1calendar_1set_1display_1options",
- "_1gtk_1cell_1layout_1clear",
- "_1gtk_1cell_1layout_1get_1cells",
- "_1gtk_1cell_1layout_1pack_1start",
- "_1gtk_1cell_1layout_1set_1attributes",
- "_1gtk_1cell_1renderer_1get_1fixed_1size",
- "_1gtk_1cell_1renderer_1get_1padding",
- "_1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width",
- "_1gtk_1cell_1renderer_1get_1preferred_1size",
- "_1gtk_1cell_1renderer_1pixbuf_1new",
- "_1gtk_1cell_1renderer_1set_1fixed_1size",
- "_1gtk_1cell_1renderer_1text_1new",
- "_1gtk_1cell_1renderer_1toggle_1new",
- "_1gtk_1cell_1view_1set_1fit_1model",
- "_1gtk_1check_1button_1new",
- "_1gtk_1check_1menu_1item_1get_1active",
- "_1gtk_1check_1menu_1item_1new",
- "_1gtk_1check_1menu_1item_1set_1active",
- "_1gtk_1check_1version",
- "_1gtk_1clipboard_1clear",
- "_1gtk_1clipboard_1get",
- "_1gtk_1clipboard_1set_1can_1store",
- "_1gtk_1clipboard_1set_1with_1owner",
- "_1gtk_1clipboard_1store",
- "_1gtk_1clipboard_1wait_1for_1contents",
- "_1gtk_1color_1chooser_1add_1palette",
- "_1gtk_1color_1chooser_1dialog_1new",
- "_1gtk_1color_1chooser_1get_1rgba",
- "_1gtk_1color_1chooser_1get_1use_1alpha",
- "_1gtk_1color_1chooser_1set_1rgba",
- "_1gtk_1color_1chooser_1set_1use_1alpha",
- "_1gtk_1combo_1box_1get_1active",
- "_1gtk_1combo_1box_1get_1model",
- "_1gtk_1combo_1box_1get_1wrap_1width",
- "_1gtk_1combo_1box_1popdown",
- "_1gtk_1combo_1box_1popup",
- "_1gtk_1combo_1box_1set_1active",
- "_1gtk_1combo_1box_1set_1focus_1on_1click",
- "_1gtk_1combo_1box_1set_1wrap_1width",
- "_1gtk_1combo_1box_1text_1insert",
- "_1gtk_1combo_1box_1text_1new",
- "_1gtk_1combo_1box_1text_1new_1with_1entry",
- "_1gtk_1combo_1box_1text_1remove",
- "_1gtk_1combo_1box_1text_1remove_1all",
- "_1gtk_1container_1add",
- "_1gtk_1container_1forall",
- "_1gtk_1container_1get_1border_1width",
- "_1gtk_1container_1get_1children",
- "_1gtk_1container_1propagate_1draw",
- "_1gtk_1container_1remove",
- "_1gtk_1container_1set_1border_1width",
- "_1gtk_1css_1provider_1get_1named",
- "_1gtk_1css_1provider_1load_1from_1data__J_3BJ",
- "_1gtk_1css_1provider_1load_1from_1data__J_3BJ_3J",
- "_1gtk_1css_1provider_1new",
- "_1gtk_1css_1provider_1to_1string",
- "_1gtk_1dialog_1add_1button",
- "_1gtk_1dialog_1run",
- "_1gtk_1drag_1begin_1with_1coordinates__JJIIJII",
- "_1gtk_1drag_1begin_1with_1coordinates__JJJIII",
- "_1gtk_1drag_1check_1threshold",
- "_1gtk_1drag_1dest_1find_1target",
- "_1gtk_1drag_1dest_1set",
- "_1gtk_1drag_1dest_1unset",
- "_1gtk_1drag_1finish",
- "_1gtk_1drag_1get_1data__JJJ",
- "_1gtk_1drag_1get_1data__JJJI",
- "_1gtk_1drag_1set_1icon_1surface",
- "_1gtk_1editable_1copy_1clipboard",
- "_1gtk_1editable_1cut_1clipboard",
- "_1gtk_1editable_1delete_1selection",
- "_1gtk_1editable_1delete_1text",
- "_1gtk_1editable_1get_1editable",
- "_1gtk_1editable_1get_1position",
- "_1gtk_1editable_1get_1selection_1bounds",
- "_1gtk_1editable_1insert_1text",
- "_1gtk_1editable_1paste_1clipboard",
- "_1gtk_1editable_1select_1region",
- "_1gtk_1editable_1set_1editable",
- "_1gtk_1editable_1set_1position",
- "_1gtk_1entry_1get_1icon_1area",
- "_1gtk_1entry_1get_1invisible_1char",
- "_1gtk_1entry_1get_1layout",
- "_1gtk_1entry_1get_1layout_1offsets",
- "_1gtk_1entry_1get_1max_1length",
- "_1gtk_1entry_1get_1text",
- "_1gtk_1entry_1get_1visibility",
- "_1gtk_1entry_1new",
- "_1gtk_1entry_1set_1alignment",
- "_1gtk_1entry_1set_1has_1frame",
- "_1gtk_1entry_1set_1icon_1activatable",
- "_1gtk_1entry_1set_1icon_1from_1icon_1name",
- "_1gtk_1entry_1set_1icon_1sensitive",
- "_1gtk_1entry_1set_1invisible_1char",
- "_1gtk_1entry_1set_1max_1length",
- "_1gtk_1entry_1set_1placeholder_1text",
- "_1gtk_1entry_1set_1tabs",
- "_1gtk_1entry_1set_1text",
- "_1gtk_1entry_1set_1visibility",
- "_1gtk_1entry_1set_1width_1chars",
- "_1gtk_1entry_1text_1index_1to_1layout_1index",
- "_1gtk_1enumerate_1printers",
- "_1gtk_1event_1box_1new",
- "_1gtk_1event_1controller_1get_1widget",
- "_1gtk_1event_1controller_1handle_1event",
- "_1gtk_1event_1controller_1key_1new",
- "_1gtk_1event_1controller_1motion_1new",
- "_1gtk_1event_1controller_1scroll_1new",
- "_1gtk_1event_1controller_1set_1propagation_1phase",
- "_1gtk_1expander_1get_1expanded",
- "_1gtk_1expander_1new",
- "_1gtk_1expander_1set_1expanded",
- "_1gtk_1expander_1set_1label_1widget",
- "_1gtk_1file_1chooser_1add_1filter",
- "_1gtk_1file_1chooser_1dialog_1new___3BJIJIJIJ",
- "_1gtk_1file_1chooser_1dialog_1new___3BJI_3BI_3BIJ",
- "_1gtk_1file_1chooser_1get_1filename",
- "_1gtk_1file_1chooser_1get_1filenames",
- "_1gtk_1file_1chooser_1get_1filter",
- "_1gtk_1file_1chooser_1get_1uri",
- "_1gtk_1file_1chooser_1get_1uris",
- "_1gtk_1file_1chooser_1native_1new",
- "_1gtk_1file_1chooser_1set_1current_1folder",
- "_1gtk_1file_1chooser_1set_1current_1folder_1uri",
- "_1gtk_1file_1chooser_1set_1current_1name",
- "_1gtk_1file_1chooser_1set_1do_1overwrite_1confirmation",
- "_1gtk_1file_1chooser_1set_1extra_1widget",
- "_1gtk_1file_1chooser_1set_1filename",
- "_1gtk_1file_1chooser_1set_1filter",
- "_1gtk_1file_1chooser_1set_1local_1only",
- "_1gtk_1file_1chooser_1set_1select_1multiple",
- "_1gtk_1file_1chooser_1set_1uri",
- "_1gtk_1file_1filter_1add_1pattern",
- "_1gtk_1file_1filter_1get_1name",
- "_1gtk_1file_1filter_1new",
- "_1gtk_1file_1filter_1set_1name",
- "_1gtk_1font_1chooser_1dialog_1new",
- "_1gtk_1font_1chooser_1get_1font",
- "_1gtk_1font_1chooser_1set_1font",
- "_1gtk_1frame_1get_1label_1widget",
- "_1gtk_1frame_1new",
- "_1gtk_1frame_1set_1label_1widget",
- "_1gtk_1frame_1set_1shadow_1type",
- "_1gtk_1gesture_1drag_1get_1offset",
- "_1gtk_1gesture_1drag_1get_1start_1point",
- "_1gtk_1gesture_1drag_1new",
- "_1gtk_1gesture_1get_1last_1event",
- "_1gtk_1gesture_1get_1last_1updated_1sequence",
- "_1gtk_1gesture_1get_1point",
- "_1gtk_1gesture_1get_1sequences",
- "_1gtk_1gesture_1group",
- "_1gtk_1gesture_1is_1recognized",
- "_1gtk_1gesture_1multi_1press_1new",
- "_1gtk_1gesture_1pan_1get_1orientation",
- "_1gtk_1gesture_1pan_1new",
- "_1gtk_1gesture_1pan_1set_1orientation",
- "_1gtk_1gesture_1rotate_1get_1angle_1delta",
- "_1gtk_1gesture_1rotate_1new",
- "_1gtk_1gesture_1single_1set_1button",
- "_1gtk_1gesture_1swipe_1get_1velocity",
- "_1gtk_1gesture_1swipe_1new",
- "_1gtk_1gesture_1zoom_1get_1scale_1delta",
- "_1gtk_1gesture_1zoom_1new",
- "_1gtk_1get_1current_1event",
- "_1gtk_1get_1current_1event_1state",
- "_1gtk_1get_1default_1language",
- "_1gtk_1get_1event_1widget",
- "_1gtk_1get_1major_1version",
- "_1gtk_1get_1micro_1version",
- "_1gtk_1get_1minor_1version",
- "_1gtk_1grab_1add",
- "_1gtk_1grab_1get_1current",
- "_1gtk_1grab_1remove",
- "_1gtk_1hsv_1to_1rgb",
- "_1gtk_1icon_1info_1load_1icon",
- "_1gtk_1icon_1theme_1get_1default",
- "_1gtk_1icon_1theme_1load_1icon",
- "_1gtk_1icon_1theme_1lookup_1by_1gicon",
- "_1gtk_1im_1context_1filter_1keypress",
- "_1gtk_1im_1context_1focus_1in",
- "_1gtk_1im_1context_1focus_1out",
- "_1gtk_1im_1context_1get_1preedit_1string",
- "_1gtk_1im_1context_1get_1type",
- "_1gtk_1im_1context_1reset",
- "_1gtk_1im_1context_1set_1client_1window",
- "_1gtk_1im_1context_1set_1cursor_1location",
- "_1gtk_1im_1multicontext_1append_1menuitems",
- "_1gtk_1im_1multicontext_1new",
- "_1gtk_1image_1new",
- "_1gtk_1image_1new_1from_1icon_1name___3B",
- "_1gtk_1image_1new_1from_1icon_1name___3BI",
- "_1gtk_1image_1new_1from_1pixbuf",
- "_1gtk_1image_1set_1from_1gicon__JJ",
- "_1gtk_1image_1set_1from_1gicon__JJI",
- "_1gtk_1image_1set_1from_1icon_1name__J_3B",
- "_1gtk_1image_1set_1from_1icon_1name__J_3BI",
- "_1gtk_1image_1set_1from_1pixbuf",
- "_1gtk_1image_1set_1pixel_1size",
- "_1gtk_1init_1check__",
- "_1gtk_1init_1check___3J_3J",
- "_1gtk_1label_1get_1layout",
- "_1gtk_1label_1get_1mnemonic_1keyval",
- "_1gtk_1label_1get_1type",
- "_1gtk_1label_1new",
- "_1gtk_1label_1new_1with_1mnemonic",
- "_1gtk_1label_1set_1attributes",
- "_1gtk_1label_1set_1justify",
- "_1gtk_1label_1set_1line_1wrap",
- "_1gtk_1label_1set_1line_1wrap_1mode",
- "_1gtk_1label_1set_1text__JJ",
- "_1gtk_1label_1set_1text__J_3B",
- "_1gtk_1label_1set_1text_1with_1mnemonic",
- "_1gtk_1label_1set_1xalign",
- "_1gtk_1label_1set_1yalign",
- "_1gtk_1list_1store_1append",
- "_1gtk_1list_1store_1clear",
- "_1gtk_1list_1store_1insert",
- "_1gtk_1list_1store_1newv",
- "_1gtk_1list_1store_1remove",
- "_1gtk_1list_1store_1set__JJIII",
- "_1gtk_1list_1store_1set__JJIJI",
- "_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I",
- "_1gtk_1list_1store_1set__JJIZI",
- "_1gtk_1list_1store_1set__JJI_3BI",
- "_1gtk_1main",
- "_1gtk_1main_1do_1event",
- "_1gtk_1menu_1bar_1new",
- "_1gtk_1menu_1item_1get_1submenu",
- "_1gtk_1menu_1item_1new",
- "_1gtk_1menu_1item_1set_1submenu",
- "_1gtk_1menu_1new",
- "_1gtk_1menu_1popdown",
- "_1gtk_1menu_1popup",
- "_1gtk_1menu_1popup_1at_1pointer",
- "_1gtk_1menu_1popup_1at_1rect",
- "_1gtk_1menu_1shell_1deactivate",
- "_1gtk_1menu_1shell_1insert",
- "_1gtk_1menu_1shell_1set_1take_1focus",
- "_1gtk_1menu_1tool_1button_1new",
- "_1gtk_1message_1dialog_1new",
- "_1gtk_1misc_1set_1alignment",
- "_1gtk_1native_1dialog_1run",
- "_1gtk_1notebook_1get_1current_1page",
- "_1gtk_1notebook_1get_1scrollable",
- "_1gtk_1notebook_1insert_1page",
- "_1gtk_1notebook_1new",
- "_1gtk_1notebook_1next_1page",
- "_1gtk_1notebook_1prev_1page",
- "_1gtk_1notebook_1remove_1page",
- "_1gtk_1notebook_1set_1current_1page",
- "_1gtk_1notebook_1set_1scrollable",
- "_1gtk_1notebook_1set_1show_1tabs",
- "_1gtk_1notebook_1set_1tab_1pos",
- "_1gtk_1orientable_1set_1orientation",
- "_1gtk_1page_1setup_1get_1bottom_1margin",
- "_1gtk_1page_1setup_1get_1left_1margin",
- "_1gtk_1page_1setup_1get_1orientation",
- "_1gtk_1page_1setup_1get_1page_1height",
- "_1gtk_1page_1setup_1get_1page_1width",
- "_1gtk_1page_1setup_1get_1paper_1height",
- "_1gtk_1page_1setup_1get_1paper_1size",
- "_1gtk_1page_1setup_1get_1paper_1width",
- "_1gtk_1page_1setup_1get_1right_1margin",
- "_1gtk_1page_1setup_1get_1top_1margin",
- "_1gtk_1page_1setup_1new",
- "_1gtk_1page_1setup_1set_1bottom_1margin",
- "_1gtk_1page_1setup_1set_1left_1margin",
- "_1gtk_1page_1setup_1set_1orientation",
- "_1gtk_1page_1setup_1set_1paper_1size",
- "_1gtk_1page_1setup_1set_1right_1margin",
- "_1gtk_1page_1setup_1set_1top_1margin",
- "_1gtk_1paper_1size_1free",
- "_1gtk_1paper_1size_1get_1display_1name",
- "_1gtk_1paper_1size_1get_1height",
- "_1gtk_1paper_1size_1get_1name",
- "_1gtk_1paper_1size_1get_1ppd_1name",
- "_1gtk_1paper_1size_1get_1width",
- "_1gtk_1paper_1size_1is_1custom",
- "_1gtk_1paper_1size_1new",
- "_1gtk_1paper_1size_1new_1custom",
- "_1gtk_1paper_1size_1new_1from_1ppd",
- "_1gtk_1plug_1new",
- "_1gtk_1print_1job_1get_1surface",
- "_1gtk_1print_1job_1new",
- "_1gtk_1print_1job_1send",
- "_1gtk_1print_1settings_1foreach",
- "_1gtk_1print_1settings_1get",
- "_1gtk_1print_1settings_1get_1collate",
- "_1gtk_1print_1settings_1get_1duplex",
- "_1gtk_1print_1settings_1get_1n_1copies",
- "_1gtk_1print_1settings_1get_1page_1ranges",
- "_1gtk_1print_1settings_1get_1print_1pages",
- "_1gtk_1print_1settings_1get_1resolution",
- "_1gtk_1print_1settings_1new",
- "_1gtk_1print_1settings_1set",
- "_1gtk_1print_1settings_1set_1collate",
- "_1gtk_1print_1settings_1set_1duplex",
- "_1gtk_1print_1settings_1set_1n_1copies",
- "_1gtk_1print_1settings_1set_1orientation",
- "_1gtk_1print_1settings_1set_1page_1ranges",
- "_1gtk_1print_1settings_1set_1print_1pages",
- "_1gtk_1print_1settings_1set_1printer",
- "_1gtk_1print_1unix_1dialog_1get_1current_1page",
- "_1gtk_1print_1unix_1dialog_1get_1page_1setup",
- "_1gtk_1print_1unix_1dialog_1get_1selected_1printer",
- "_1gtk_1print_1unix_1dialog_1get_1settings",
- "_1gtk_1print_1unix_1dialog_1new",
- "_1gtk_1print_1unix_1dialog_1set_1current_1page",
- "_1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup",
- "_1gtk_1print_1unix_1dialog_1set_1manual_1capabilities",
- "_1gtk_1print_1unix_1dialog_1set_1page_1setup",
- "_1gtk_1print_1unix_1dialog_1set_1settings",
- "_1gtk_1printer_1get_1backend",
- "_1gtk_1printer_1get_1name",
- "_1gtk_1printer_1is_1default",
- "_1gtk_1printer_1option_1widget_1get_1type",
- "_1gtk_1progress_1bar_1new",
- "_1gtk_1progress_1bar_1pulse",
- "_1gtk_1progress_1bar_1set_1fraction",
- "_1gtk_1progress_1bar_1set_1inverted",
- "_1gtk_1radio_1button_1get_1group",
- "_1gtk_1radio_1button_1new",
- "_1gtk_1radio_1menu_1item_1get_1group",
- "_1gtk_1radio_1menu_1item_1new",
- "_1gtk_1range_1get_1adjustment",
- "_1gtk_1range_1get_1slider_1range",
- "_1gtk_1range_1set_1increments",
- "_1gtk_1range_1set_1inverted",
- "_1gtk_1range_1set_1range",
- "_1gtk_1range_1set_1value",
- "_1gtk_1render_1background",
- "_1gtk_1render_1focus",
- "_1gtk_1render_1frame",
- "_1gtk_1render_1handle",
- "_1gtk_1rgb_1to_1hsv",
- "_1gtk_1scale_1new",
- "_1gtk_1scale_1set_1digits",
- "_1gtk_1scale_1set_1draw_1value",
- "_1gtk_1scrollable_1get_1vadjustment",
- "_1gtk_1scrollbar_1new",
- "_1gtk_1scrolled_1window_1get_1hadjustment",
- "_1gtk_1scrolled_1window_1get_1hscrollbar",
- "_1gtk_1scrolled_1window_1get_1overlay_1scrolling",
- "_1gtk_1scrolled_1window_1get_1policy",
- "_1gtk_1scrolled_1window_1get_1shadow_1type",
- "_1gtk_1scrolled_1window_1get_1vadjustment",
- "_1gtk_1scrolled_1window_1get_1vscrollbar",
- "_1gtk_1scrolled_1window_1new",
- "_1gtk_1scrolled_1window_1set_1policy",
- "_1gtk_1scrolled_1window_1set_1shadow_1type",
- "_1gtk_1search_1entry_1new",
- "_1gtk_1selection_1data_1free",
- "_1gtk_1selection_1data_1get_1data",
- "_1gtk_1selection_1data_1get_1data_1type",
- "_1gtk_1selection_1data_1get_1format",
- "_1gtk_1selection_1data_1get_1length",
- "_1gtk_1selection_1data_1get_1target",
- "_1gtk_1selection_1data_1set",
- "_1gtk_1separator_1menu_1item_1new",
- "_1gtk_1separator_1new",
- "_1gtk_1separator_1tool_1item_1new",
- "_1gtk_1separator_1tool_1item_1set_1draw",
- "_1gtk_1settings_1get_1default",
- "_1gtk_1snapshot_1append_1cairo",
- "_1gtk_1socket_1get_1id",
- "_1gtk_1socket_1new",
- "_1gtk_1spin_1button_1configure",
- "_1gtk_1spin_1button_1get_1adjustment",
- "_1gtk_1spin_1button_1get_1digits",
- "_1gtk_1spin_1button_1new",
- "_1gtk_1spin_1button_1set_1digits",
- "_1gtk_1spin_1button_1set_1increments",
- "_1gtk_1spin_1button_1set_1numeric",
- "_1gtk_1spin_1button_1set_1range",
- "_1gtk_1spin_1button_1set_1value",
- "_1gtk_1spin_1button_1set_1wrap",
- "_1gtk_1spin_1button_1update",
- "_1gtk_1status_1icon_1get_1geometry",
- "_1gtk_1status_1icon_1get_1visible",
- "_1gtk_1status_1icon_1new",
- "_1gtk_1status_1icon_1position_1menu_1func",
- "_1gtk_1status_1icon_1set_1from_1pixbuf",
- "_1gtk_1status_1icon_1set_1tooltip_1text",
- "_1gtk_1status_1icon_1set_1visible",
- "_1gtk_1style_1context_1add_1class",
- "_1gtk_1style_1context_1add_1provider",
- "_1gtk_1style_1context_1add_1provider_1for_1display",
- "_1gtk_1style_1context_1add_1provider_1for_1screen",
- "_1gtk_1style_1context_1get__JI_3B_3JJ",
- "_1gtk_1style_1context_1get__J_3B_3JJ",
- "_1gtk_1style_1context_1get_1background_1color",
- "_1gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2",
- "_1gtk_1style_1context_1get_1border__JLorg_eclipse_swt_internal_gtk_GtkBorder_2",
- "_1gtk_1style_1context_1get_1color__JILorg_eclipse_swt_internal_gtk_GdkRGBA_2",
- "_1gtk_1style_1context_1get_1color__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2",
- "_1gtk_1style_1context_1get_1font",
- "_1gtk_1style_1context_1get_1margin",
- "_1gtk_1style_1context_1get_1padding__JILorg_eclipse_swt_internal_gtk_GtkBorder_2",
- "_1gtk_1style_1context_1get_1padding__JLorg_eclipse_swt_internal_gtk_GtkBorder_2",
- "_1gtk_1style_1context_1get_1parent",
- "_1gtk_1style_1context_1invalidate",
- "_1gtk_1style_1context_1remove_1class",
- "_1gtk_1style_1context_1restore",
- "_1gtk_1style_1context_1save",
- "_1gtk_1style_1context_1set_1state",
- "_1gtk_1target_1list_1new",
- "_1gtk_1target_1list_1unref",
- "_1gtk_1text_1buffer_1copy_1clipboard",
- "_1gtk_1text_1buffer_1create_1mark",
- "_1gtk_1text_1buffer_1cut_1clipboard",
- "_1gtk_1text_1buffer_1delete",
- "_1gtk_1text_1buffer_1get_1bounds",
- "_1gtk_1text_1buffer_1get_1end_1iter",
- "_1gtk_1text_1buffer_1get_1insert",
- "_1gtk_1text_1buffer_1get_1iter_1at_1line",
- "_1gtk_1text_1buffer_1get_1iter_1at_1mark",
- "_1gtk_1text_1buffer_1get_1iter_1at_1offset",
- "_1gtk_1text_1buffer_1get_1line_1count",
- "_1gtk_1text_1buffer_1get_1selection_1bound",
- "_1gtk_1text_1buffer_1get_1selection_1bounds",
- "_1gtk_1text_1buffer_1get_1text",
- "_1gtk_1text_1buffer_1insert__JJ_3BI",
- "_1gtk_1text_1buffer_1insert__J_3B_3BI",
- "_1gtk_1text_1buffer_1paste_1clipboard",
- "_1gtk_1text_1buffer_1place_1cursor",
- "_1gtk_1text_1buffer_1select_1range",
- "_1gtk_1text_1buffer_1set_1text",
- "_1gtk_1text_1iter_1get_1line",
- "_1gtk_1text_1iter_1get_1offset",
- "_1gtk_1text_1view_1buffer_1to_1surface_1coords",
- "_1gtk_1text_1view_1buffer_1to_1window_1coords",
- "_1gtk_1text_1view_1get_1buffer",
- "_1gtk_1text_1view_1get_1editable",
- "_1gtk_1text_1view_1get_1iter_1at_1location",
- "_1gtk_1text_1view_1get_1iter_1location",
- "_1gtk_1text_1view_1get_1line_1at_1y",
- "_1gtk_1text_1view_1get_1line_1yrange",
- "_1gtk_1text_1view_1get_1visible_1rect",
- "_1gtk_1text_1view_1get_1window",
- "_1gtk_1text_1view_1new",
- "_1gtk_1text_1view_1scroll_1to_1iter",
- "_1gtk_1text_1view_1scroll_1to_1mark",
- "_1gtk_1text_1view_1set_1editable",
- "_1gtk_1text_1view_1set_1justification",
- "_1gtk_1text_1view_1set_1tabs",
- "_1gtk_1text_1view_1set_1wrap_1mode",
- "_1gtk_1toggle_1button_1get_1active",
- "_1gtk_1toggle_1button_1new",
- "_1gtk_1toggle_1button_1set_1active",
- "_1gtk_1toggle_1button_1set_1inconsistent",
- "_1gtk_1toggle_1button_1set_1mode",
- "_1gtk_1toggle_1tool_1button_1get_1active",
- "_1gtk_1toggle_1tool_1button_1new",
- "_1gtk_1toggle_1tool_1button_1set_1active",
- "_1gtk_1tool_1button_1new",
- "_1gtk_1tool_1button_1set_1icon_1widget",
- "_1gtk_1tool_1button_1set_1label",
- "_1gtk_1tool_1button_1set_1label_1widget",
- "_1gtk_1tool_1button_1set_1use_1underline",
- "_1gtk_1tool_1item_1get_1proxy_1menu_1item",
- "_1gtk_1tool_1item_1retrieve_1proxy_1menu_1item",
- "_1gtk_1tool_1item_1set_1is_1important",
- "_1gtk_1tool_1item_1set_1proxy_1menu_1item",
- "_1gtk_1toolbar_1insert",
- "_1gtk_1toolbar_1new",
- "_1gtk_1toolbar_1set_1icon_1size",
- "_1gtk_1toolbar_1set_1show_1arrow",
- "_1gtk_1toolbar_1set_1style",
- "_1gtk_1tooltip_1get_1type",
- "_1gtk_1tooltip_1set_1custom",
- "_1gtk_1tree_1model_1get__JJI_3II",
- "_1gtk_1tree_1model_1get__JJI_3JI",
- "_1gtk_1tree_1model_1get_1iter",
- "_1gtk_1tree_1model_1get_1iter_1first",
- "_1gtk_1tree_1model_1get_1n_1columns",
- "_1gtk_1tree_1model_1get_1path",
- "_1gtk_1tree_1model_1get_1type",
- "_1gtk_1tree_1model_1iter_1children",
- "_1gtk_1tree_1model_1iter_1n_1children",
- "_1gtk_1tree_1model_1iter_1next",
- "_1gtk_1tree_1model_1iter_1nth_1child",
- "_1gtk_1tree_1path_1append_1index",
- "_1gtk_1tree_1path_1compare",
- "_1gtk_1tree_1path_1free",
- "_1gtk_1tree_1path_1get_1depth",
- "_1gtk_1tree_1path_1get_1indices",
- "_1gtk_1tree_1path_1new",
- "_1gtk_1tree_1path_1new_1from_1string__J",
- "_1gtk_1tree_1path_1new_1from_1string___3B",
- "_1gtk_1tree_1path_1next",
- "_1gtk_1tree_1path_1prev",
- "_1gtk_1tree_1path_1up",
- "_1gtk_1tree_1selection_1count_1selected_1rows",
- "_1gtk_1tree_1selection_1get_1select_1function",
- "_1gtk_1tree_1selection_1get_1selected_1rows",
- "_1gtk_1tree_1selection_1path_1is_1selected",
- "_1gtk_1tree_1selection_1select_1all",
- "_1gtk_1tree_1selection_1select_1iter",
- "_1gtk_1tree_1selection_1select_1path",
- "_1gtk_1tree_1selection_1set_1mode",
- "_1gtk_1tree_1selection_1set_1select_1function",
- "_1gtk_1tree_1selection_1unselect_1all",
- "_1gtk_1tree_1selection_1unselect_1iter",
- "_1gtk_1tree_1selection_1unselect_1path",
- "_1gtk_1tree_1store_1append",
- "_1gtk_1tree_1store_1clear",
- "_1gtk_1tree_1store_1insert",
- "_1gtk_1tree_1store_1newv",
- "_1gtk_1tree_1store_1remove",
- "_1gtk_1tree_1store_1set__JJIII",
- "_1gtk_1tree_1store_1set__JJIJI",
- "_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I",
- "_1gtk_1tree_1store_1set__JJIZI",
- "_1gtk_1tree_1store_1set__JJI_3BI",
- "_1gtk_1tree_1view_1collapse_1row",
- "_1gtk_1tree_1view_1column_1add_1attribute",
- "_1gtk_1tree_1view_1column_1cell_1get_1position",
- "_1gtk_1tree_1view_1column_1cell_1get_1size",
- "_1gtk_1tree_1view_1column_1cell_1set_1cell_1data",
- "_1gtk_1tree_1view_1column_1clear",
- "_1gtk_1tree_1view_1column_1get_1button",
- "_1gtk_1tree_1view_1column_1get_1fixed_1width",
- "_1gtk_1tree_1view_1column_1get_1reorderable",
- "_1gtk_1tree_1view_1column_1get_1resizable",
- "_1gtk_1tree_1view_1column_1get_1visible",
- "_1gtk_1tree_1view_1column_1get_1width",
- "_1gtk_1tree_1view_1column_1new",
- "_1gtk_1tree_1view_1column_1pack_1end",
- "_1gtk_1tree_1view_1column_1pack_1start",
- "_1gtk_1tree_1view_1column_1set_1alignment",
- "_1gtk_1tree_1view_1column_1set_1cell_1data_1func",
- "_1gtk_1tree_1view_1column_1set_1clickable",
- "_1gtk_1tree_1view_1column_1set_1fixed_1width",
- "_1gtk_1tree_1view_1column_1set_1min_1width",
- "_1gtk_1tree_1view_1column_1set_1reorderable",
- "_1gtk_1tree_1view_1column_1set_1resizable",
- "_1gtk_1tree_1view_1column_1set_1sizing",
- "_1gtk_1tree_1view_1column_1set_1sort_1indicator",
- "_1gtk_1tree_1view_1column_1set_1sort_1order",
- "_1gtk_1tree_1view_1column_1set_1visible",
- "_1gtk_1tree_1view_1column_1set_1widget",
- "_1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords",
- "_1gtk_1tree_1view_1create_1row_1drag_1icon",
- "_1gtk_1tree_1view_1expand_1row",
- "_1gtk_1tree_1view_1get_1background_1area",
- "_1gtk_1tree_1view_1get_1bin_1window",
- "_1gtk_1tree_1view_1get_1cell_1area",
- "_1gtk_1tree_1view_1get_1column",
- "_1gtk_1tree_1view_1get_1columns",
- "_1gtk_1tree_1view_1get_1cursor",
- "_1gtk_1tree_1view_1get_1expander_1column",
- "_1gtk_1tree_1view_1get_1grid_1lines",
- "_1gtk_1tree_1view_1get_1headers_1visible",
- "_1gtk_1tree_1view_1get_1path_1at_1pos",
- "_1gtk_1tree_1view_1get_1selection",
- "_1gtk_1tree_1view_1get_1visible_1rect",
- "_1gtk_1tree_1view_1insert_1column",
- "_1gtk_1tree_1view_1move_1column_1after",
- "_1gtk_1tree_1view_1new_1with_1model",
- "_1gtk_1tree_1view_1remove_1column",
- "_1gtk_1tree_1view_1row_1expanded",
- "_1gtk_1tree_1view_1scroll_1to_1cell",
- "_1gtk_1tree_1view_1scroll_1to_1point",
- "_1gtk_1tree_1view_1set_1cursor",
- "_1gtk_1tree_1view_1set_1drag_1dest_1row",
- "_1gtk_1tree_1view_1set_1grid_1lines",
- "_1gtk_1tree_1view_1set_1headers_1visible",
- "_1gtk_1tree_1view_1set_1model",
- "_1gtk_1tree_1view_1set_1search_1column",
- "_1gtk_1tree_1view_1unset_1rows_1drag_1dest",
- "_1gtk_1viewport_1set_1shadow_1type",
- "_1gtk_1widget_1add_1accelerator",
- "_1gtk_1widget_1add_1controller",
- "_1gtk_1widget_1add_1events",
- "_1gtk_1widget_1child_1focus",
- "_1gtk_1widget_1class_1get_1css_1name",
- "_1gtk_1widget_1create_1pango_1layout__JJ",
- "_1gtk_1widget_1create_1pango_1layout__J_3B",
- "_1gtk_1widget_1destroy",
- "_1gtk_1widget_1draw",
- "_1gtk_1widget_1event",
- "_1gtk_1widget_1get_1accessible",
- "_1gtk_1widget_1get_1allocation",
- "_1gtk_1widget_1get_1can_1default",
- "_1gtk_1widget_1get_1child_1visible",
- "_1gtk_1widget_1get_1clip",
- "_1gtk_1widget_1get_1events",
- "_1gtk_1widget_1get_1first_1child",
- "_1gtk_1widget_1get_1has_1surface",
- "_1gtk_1widget_1get_1has_1window",
- "_1gtk_1widget_1get_1mapped",
- "_1gtk_1widget_1get_1margin_1bottom",
- "_1gtk_1widget_1get_1margin_1end",
- "_1gtk_1widget_1get_1margin_1start",
- "_1gtk_1widget_1get_1margin_1top",
- "_1gtk_1widget_1get_1name",
- "_1gtk_1widget_1get_1next_1sibling",
- "_1gtk_1widget_1get_1opacity",
- "_1gtk_1widget_1get_1pango_1context",
- "_1gtk_1widget_1get_1parent",
- "_1gtk_1widget_1get_1parent_1surface",
- "_1gtk_1widget_1get_1parent_1window",
- "_1gtk_1widget_1get_1preferred_1height",
- "_1gtk_1widget_1get_1preferred_1height_1for_1width",
- "_1gtk_1widget_1get_1preferred_1size",
- "_1gtk_1widget_1get_1preferred_1width_1for_1height",
- "_1gtk_1widget_1get_1realized",
- "_1gtk_1widget_1get_1screen",
- "_1gtk_1widget_1get_1sensitive",
- "_1gtk_1widget_1get_1size_1request",
- "_1gtk_1widget_1get_1state_1flags",
- "_1gtk_1widget_1get_1style_1context",
- "_1gtk_1widget_1get_1surface",
- "_1gtk_1widget_1get_1tooltip_1text",
- "_1gtk_1widget_1get_1toplevel",
- "_1gtk_1widget_1get_1visible",
- "_1gtk_1widget_1get_1window",
- "_1gtk_1widget_1grab_1focus",
- "_1gtk_1widget_1has_1default",
- "_1gtk_1widget_1has_1focus",
- "_1gtk_1widget_1hide",
- "_1gtk_1widget_1input_1shape_1combine_1region",
- "_1gtk_1widget_1is_1focus",
- "_1gtk_1widget_1map",
- "_1gtk_1widget_1measure",
- "_1gtk_1widget_1mnemonic_1activate",
- "_1gtk_1widget_1override_1background_1color",
- "_1gtk_1widget_1override_1color",
- "_1gtk_1widget_1override_1font",
- "_1gtk_1widget_1queue_1draw",
- "_1gtk_1widget_1queue_1resize",
- "_1gtk_1widget_1realize",
- "_1gtk_1widget_1remove_1accelerator",
- "_1gtk_1widget_1reparent",
- "_1gtk_1widget_1set_1allocation",
- "_1gtk_1widget_1set_1can_1default",
- "_1gtk_1widget_1set_1can_1focus",
- "_1gtk_1widget_1set_1clip",
- "_1gtk_1widget_1set_1cursor",
- "_1gtk_1widget_1set_1default_1direction",
- "_1gtk_1widget_1set_1direction",
- "_1gtk_1widget_1set_1double_1buffered",
- "_1gtk_1widget_1set_1focus_1on_1click",
- "_1gtk_1widget_1set_1halign",
- "_1gtk_1widget_1set_1has_1surface",
- "_1gtk_1widget_1set_1has_1window",
- "_1gtk_1widget_1set_1hexpand",
- "_1gtk_1widget_1set_1margin_1bottom",
- "_1gtk_1widget_1set_1margin_1end",
- "_1gtk_1widget_1set_1margin_1start",
- "_1gtk_1widget_1set_1margin_1top",
- "_1gtk_1widget_1set_1name",
- "_1gtk_1widget_1set_1opacity",
- "_1gtk_1widget_1set_1parent_1surface",
- "_1gtk_1widget_1set_1parent_1window",
- "_1gtk_1widget_1set_1receives_1default",
- "_1gtk_1widget_1set_1redraw_1on_1allocate",
- "_1gtk_1widget_1set_1sensitive",
- "_1gtk_1widget_1set_1size_1request",
- "_1gtk_1widget_1set_1tooltip_1text",
- "_1gtk_1widget_1set_1valign",
- "_1gtk_1widget_1set_1vexpand",
- "_1gtk_1widget_1set_1visible",
- "_1gtk_1widget_1shape_1combine_1region",
- "_1gtk_1widget_1show",
- "_1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2",
- "_1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2I",
- "_1gtk_1widget_1snapshot_1child",
- "_1gtk_1widget_1style_1get__J_3B_3IJ",
- "_1gtk_1widget_1style_1get__J_3B_3JJ",
- "_1gtk_1widget_1translate_1coordinates",
- "_1gtk_1window_1activate_1default",
- "_1gtk_1window_1add_1accel_1group",
- "_1gtk_1window_1deiconify",
- "_1gtk_1window_1fullscreen",
- "_1gtk_1window_1get_1focus",
- "_1gtk_1window_1get_1group",
- "_1gtk_1window_1get_1icon_1list",
- "_1gtk_1window_1get_1mnemonic_1modifier",
- "_1gtk_1window_1get_1modal",
- "_1gtk_1window_1get_1position",
- "_1gtk_1window_1get_1size",
- "_1gtk_1window_1group_1add_1window",
- "_1gtk_1window_1group_1new",
- "_1gtk_1window_1group_1remove_1window",
- "_1gtk_1window_1iconify",
- "_1gtk_1window_1is_1active",
- "_1gtk_1window_1list_1toplevels",
- "_1gtk_1window_1maximize",
- "_1gtk_1window_1move",
- "_1gtk_1window_1new",
- "_1gtk_1window_1remove_1accel_1group",
- "_1gtk_1window_1resize",
- "_1gtk_1window_1set_1attached_1to",
- "_1gtk_1window_1set_1decorated",
- "_1gtk_1window_1set_1default",
- "_1gtk_1window_1set_1destroy_1with_1parent",
- "_1gtk_1window_1set_1geometry_1hints",
- "_1gtk_1window_1set_1icon_1list",
- "_1gtk_1window_1set_1keep_1above",
- "_1gtk_1window_1set_1modal",
- "_1gtk_1window_1set_1resizable",
- "_1gtk_1window_1set_1skip_1taskbar_1hint",
- "_1gtk_1window_1set_1title",
- "_1gtk_1window_1set_1transient_1for",
- "_1gtk_1window_1set_1type_1hint",
- "_1gtk_1window_1unfullscreen",
- "_1gtk_1window_1unmaximize",
+ "gtk_1accel_1group_1new",
+ "gtk_1accelerator_1get_1default_1mod_1mask",
+ "gtk_1accelerator_1name",
+ "gtk_1accelerator_1parse__J_3I_3I",
+ "gtk_1accelerator_1parse___3B_3I_3I",
+ "gtk_1adjustment_1configure",
+ "gtk_1adjustment_1get_1lower",
+ "gtk_1adjustment_1get_1page_1increment",
+ "gtk_1adjustment_1get_1page_1size",
+ "gtk_1adjustment_1get_1step_1increment",
+ "gtk_1adjustment_1get_1upper",
+ "gtk_1adjustment_1get_1value",
+ "gtk_1adjustment_1new",
+ "gtk_1adjustment_1set_1page_1increment",
+ "gtk_1adjustment_1set_1step_1increment",
+ "gtk_1adjustment_1set_1value",
+ "gtk_1border_1free",
+ "gtk_1box_1new",
+ "gtk_1box_1set_1homogeneous",
+ "gtk_1box_1set_1spacing",
+ "gtk_1button_1new",
+ "gtk_1button_1set_1label",
+ "gtk_1button_1set_1use_1underline",
+ "gtk_1calendar_1clear_1marks",
+ "gtk_1calendar_1mark_1day",
+ "gtk_1calendar_1new",
+ "gtk_1cell_1layout_1clear",
+ "gtk_1cell_1layout_1get_1cells",
+ "gtk_1cell_1layout_1pack_1start",
+ "gtk_1cell_1layout_1set_1attributes",
+ "gtk_1cell_1renderer_1get_1fixed_1size",
+ "gtk_1cell_1renderer_1get_1padding",
+ "gtk_1cell_1renderer_1get_1preferred_1height_1for_1width",
+ "gtk_1cell_1renderer_1get_1preferred_1size",
+ "gtk_1cell_1renderer_1pixbuf_1new",
+ "gtk_1cell_1renderer_1set_1fixed_1size",
+ "gtk_1cell_1renderer_1text_1new",
+ "gtk_1cell_1renderer_1toggle_1new",
+ "gtk_1cell_1view_1set_1fit_1model",
+ "gtk_1check_1button_1new",
+ "gtk_1check_1version",
+ "gtk_1color_1chooser_1add_1palette",
+ "gtk_1color_1chooser_1dialog_1new",
+ "gtk_1color_1chooser_1get_1rgba",
+ "gtk_1color_1chooser_1get_1use_1alpha",
+ "gtk_1color_1chooser_1set_1rgba",
+ "gtk_1color_1chooser_1set_1use_1alpha",
+ "gtk_1combo_1box_1get_1active",
+ "gtk_1combo_1box_1get_1model",
+ "gtk_1combo_1box_1popdown",
+ "gtk_1combo_1box_1popup",
+ "gtk_1combo_1box_1set_1active",
+ "gtk_1combo_1box_1text_1insert",
+ "gtk_1combo_1box_1text_1new",
+ "gtk_1combo_1box_1text_1new_1with_1entry",
+ "gtk_1combo_1box_1text_1remove",
+ "gtk_1combo_1box_1text_1remove_1all",
+ "gtk_1css_1provider_1new",
+ "gtk_1css_1provider_1to_1string",
+ "gtk_1dialog_1add_1button",
+ "gtk_1editable_1delete_1selection",
+ "gtk_1editable_1delete_1text",
+ "gtk_1editable_1get_1editable",
+ "gtk_1editable_1get_1position",
+ "gtk_1editable_1get_1selection_1bounds",
+ "gtk_1editable_1insert_1text",
+ "gtk_1editable_1select_1region",
+ "gtk_1editable_1set_1editable",
+ "gtk_1editable_1set_1position",
+ "gtk_1entry_1buffer_1delete_1text",
+ "gtk_1entry_1buffer_1get_1text",
+ "gtk_1entry_1buffer_1set_1text",
+ "gtk_1entry_1get_1icon_1area",
+ "gtk_1entry_1get_1invisible_1char",
+ "gtk_1entry_1get_1max_1length",
+ "gtk_1entry_1get_1visibility",
+ "gtk_1entry_1new",
+ "gtk_1entry_1set_1alignment",
+ "gtk_1entry_1set_1has_1frame",
+ "gtk_1entry_1set_1icon_1activatable",
+ "gtk_1entry_1set_1icon_1from_1icon_1name",
+ "gtk_1entry_1set_1icon_1sensitive",
+ "gtk_1entry_1set_1input_1hints",
+ "gtk_1entry_1set_1invisible_1char",
+ "gtk_1entry_1set_1max_1length",
+ "gtk_1entry_1set_1placeholder_1text",
+ "gtk_1entry_1set_1tabs",
+ "gtk_1entry_1set_1visibility",
+ "gtk_1enumerate_1printers",
+ "gtk_1event_1controller_1get_1widget",
+ "gtk_1event_1controller_1set_1propagation_1phase",
+ "gtk_1expander_1get_1expanded",
+ "gtk_1expander_1get_1label_1widget",
+ "gtk_1expander_1new",
+ "gtk_1expander_1set_1expanded",
+ "gtk_1expander_1set_1label_1widget",
+ "gtk_1file_1chooser_1add_1filter",
+ "gtk_1file_1chooser_1get_1filter",
+ "gtk_1file_1chooser_1native_1new",
+ "gtk_1file_1chooser_1set_1current_1name",
+ "gtk_1file_1chooser_1set_1filter",
+ "gtk_1file_1chooser_1set_1select_1multiple",
+ "gtk_1file_1filter_1add_1pattern",
+ "gtk_1file_1filter_1get_1name",
+ "gtk_1file_1filter_1new",
+ "gtk_1file_1filter_1set_1name",
+ "gtk_1font_1chooser_1dialog_1new",
+ "gtk_1font_1chooser_1get_1font",
+ "gtk_1font_1chooser_1set_1font",
+ "gtk_1frame_1get_1label_1widget",
+ "gtk_1frame_1new",
+ "gtk_1frame_1set_1label_1widget",
+ "gtk_1gesture_1drag_1get_1offset",
+ "gtk_1gesture_1drag_1get_1start_1point",
+ "gtk_1gesture_1drag_1new",
+ "gtk_1gesture_1get_1last_1updated_1sequence",
+ "gtk_1gesture_1get_1point",
+ "gtk_1gesture_1is_1recognized",
+ "gtk_1gesture_1rotate_1get_1angle_1delta",
+ "gtk_1gesture_1rotate_1new",
+ "gtk_1gesture_1single_1get_1current_1button",
+ "gtk_1gesture_1single_1set_1button",
+ "gtk_1gesture_1swipe_1get_1velocity",
+ "gtk_1gesture_1zoom_1get_1scale_1delta",
+ "gtk_1gesture_1zoom_1new",
+ "gtk_1get_1default_1language",
+ "gtk_1get_1major_1version",
+ "gtk_1get_1micro_1version",
+ "gtk_1get_1minor_1version",
+ "gtk_1im_1context_1focus_1in",
+ "gtk_1im_1context_1focus_1out",
+ "gtk_1im_1context_1get_1preedit_1string",
+ "gtk_1im_1context_1get_1type",
+ "gtk_1im_1context_1reset",
+ "gtk_1im_1context_1set_1client_1window",
+ "gtk_1im_1context_1set_1cursor_1location",
+ "gtk_1im_1multicontext_1new",
+ "gtk_1image_1new",
+ "gtk_1image_1set_1pixel_1size",
+ "gtk_1label_1get_1layout",
+ "gtk_1label_1get_1mnemonic_1keyval",
+ "gtk_1label_1get_1type",
+ "gtk_1label_1new",
+ "gtk_1label_1new_1with_1mnemonic",
+ "gtk_1label_1set_1attributes",
+ "gtk_1label_1set_1justify",
+ "gtk_1label_1set_1text__JJ",
+ "gtk_1label_1set_1text__J_3B",
+ "gtk_1label_1set_1text_1with_1mnemonic",
+ "gtk_1label_1set_1xalign",
+ "gtk_1label_1set_1yalign",
+ "gtk_1list_1store_1append",
+ "gtk_1list_1store_1clear",
+ "gtk_1list_1store_1insert",
+ "gtk_1list_1store_1newv",
+ "gtk_1list_1store_1remove",
+ "gtk_1list_1store_1set__JJIII",
+ "gtk_1list_1store_1set__JJIJI",
+ "gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I",
+ "gtk_1list_1store_1set__JJIZI",
+ "gtk_1list_1store_1set__JJI_3BI",
+ "gtk_1list_1store_1set_1value",
+ "gtk_1menu_1button_1new",
+ "gtk_1message_1dialog_1format_1secondary_1text",
+ "gtk_1message_1dialog_1new",
+ "gtk_1native_1dialog_1show",
+ "gtk_1notebook_1get_1current_1page",
+ "gtk_1notebook_1get_1n_1pages",
+ "gtk_1notebook_1get_1scrollable",
+ "gtk_1notebook_1insert_1page",
+ "gtk_1notebook_1new",
+ "gtk_1notebook_1next_1page",
+ "gtk_1notebook_1prev_1page",
+ "gtk_1notebook_1remove_1page",
+ "gtk_1notebook_1set_1current_1page",
+ "gtk_1notebook_1set_1scrollable",
+ "gtk_1notebook_1set_1show_1tabs",
+ "gtk_1notebook_1set_1tab_1pos",
+ "gtk_1orientable_1set_1orientation",
+ "gtk_1page_1setup_1get_1bottom_1margin",
+ "gtk_1page_1setup_1get_1left_1margin",
+ "gtk_1page_1setup_1get_1orientation",
+ "gtk_1page_1setup_1get_1page_1height",
+ "gtk_1page_1setup_1get_1page_1width",
+ "gtk_1page_1setup_1get_1paper_1height",
+ "gtk_1page_1setup_1get_1paper_1size",
+ "gtk_1page_1setup_1get_1paper_1width",
+ "gtk_1page_1setup_1get_1right_1margin",
+ "gtk_1page_1setup_1get_1top_1margin",
+ "gtk_1page_1setup_1new",
+ "gtk_1page_1setup_1set_1bottom_1margin",
+ "gtk_1page_1setup_1set_1left_1margin",
+ "gtk_1page_1setup_1set_1orientation",
+ "gtk_1page_1setup_1set_1paper_1size",
+ "gtk_1page_1setup_1set_1right_1margin",
+ "gtk_1page_1setup_1set_1top_1margin",
+ "gtk_1paper_1size_1free",
+ "gtk_1paper_1size_1get_1display_1name",
+ "gtk_1paper_1size_1get_1height",
+ "gtk_1paper_1size_1get_1name",
+ "gtk_1paper_1size_1get_1ppd_1name",
+ "gtk_1paper_1size_1get_1width",
+ "gtk_1paper_1size_1is_1custom",
+ "gtk_1paper_1size_1new",
+ "gtk_1paper_1size_1new_1custom",
+ "gtk_1paper_1size_1new_1from_1ppd",
+ "gtk_1plug_1new",
+ "gtk_1popover_1popdown",
+ "gtk_1popover_1popup",
+ "gtk_1popover_1set_1pointing_1to",
+ "gtk_1popover_1set_1position",
+ "gtk_1print_1job_1get_1surface",
+ "gtk_1print_1job_1new",
+ "gtk_1print_1job_1send",
+ "gtk_1print_1settings_1foreach",
+ "gtk_1print_1settings_1get",
+ "gtk_1print_1settings_1get_1collate",
+ "gtk_1print_1settings_1get_1duplex",
+ "gtk_1print_1settings_1get_1n_1copies",
+ "gtk_1print_1settings_1get_1page_1ranges",
+ "gtk_1print_1settings_1get_1print_1pages",
+ "gtk_1print_1settings_1get_1resolution",
+ "gtk_1print_1settings_1new",
+ "gtk_1print_1settings_1set",
+ "gtk_1print_1settings_1set_1collate",
+ "gtk_1print_1settings_1set_1duplex",
+ "gtk_1print_1settings_1set_1n_1copies",
+ "gtk_1print_1settings_1set_1orientation",
+ "gtk_1print_1settings_1set_1page_1ranges",
+ "gtk_1print_1settings_1set_1print_1pages",
+ "gtk_1print_1settings_1set_1printer",
+ "gtk_1print_1unix_1dialog_1get_1current_1page",
+ "gtk_1print_1unix_1dialog_1get_1page_1setup",
+ "gtk_1print_1unix_1dialog_1get_1selected_1printer",
+ "gtk_1print_1unix_1dialog_1get_1settings",
+ "gtk_1print_1unix_1dialog_1new",
+ "gtk_1print_1unix_1dialog_1set_1current_1page",
+ "gtk_1print_1unix_1dialog_1set_1embed_1page_1setup",
+ "gtk_1print_1unix_1dialog_1set_1has_1selection",
+ "gtk_1print_1unix_1dialog_1set_1manual_1capabilities",
+ "gtk_1print_1unix_1dialog_1set_1page_1setup",
+ "gtk_1print_1unix_1dialog_1set_1settings",
+ "gtk_1print_1unix_1dialog_1set_1support_1selection",
+ "gtk_1printer_1get_1backend",
+ "gtk_1printer_1get_1name",
+ "gtk_1printer_1is_1default",
+ "gtk_1printer_1option_1widget_1get_1type",
+ "gtk_1progress_1bar_1new",
+ "gtk_1progress_1bar_1pulse",
+ "gtk_1progress_1bar_1set_1fraction",
+ "gtk_1progress_1bar_1set_1inverted",
+ "gtk_1range_1get_1adjustment",
+ "gtk_1range_1get_1slider_1range",
+ "gtk_1range_1get_1value",
+ "gtk_1range_1set_1increments",
+ "gtk_1range_1set_1inverted",
+ "gtk_1range_1set_1range",
+ "gtk_1range_1set_1value",
+ "gtk_1render_1background",
+ "gtk_1render_1focus",
+ "gtk_1render_1frame",
+ "gtk_1render_1handle",
+ "gtk_1scale_1new",
+ "gtk_1scale_1set_1digits",
+ "gtk_1scale_1set_1draw_1value",
+ "gtk_1scrollable_1get_1vadjustment",
+ "gtk_1scrollbar_1new",
+ "gtk_1scrolled_1window_1get_1hadjustment",
+ "gtk_1scrolled_1window_1get_1hscrollbar",
+ "gtk_1scrolled_1window_1get_1overlay_1scrolling",
+ "gtk_1scrolled_1window_1get_1policy",
+ "gtk_1scrolled_1window_1get_1vadjustment",
+ "gtk_1scrolled_1window_1get_1vscrollbar",
+ "gtk_1scrolled_1window_1set_1hadjustment",
+ "gtk_1scrolled_1window_1set_1policy",
+ "gtk_1scrolled_1window_1set_1vadjustment",
+ "gtk_1search_1entry_1new",
+ "gtk_1separator_1new",
+ "gtk_1settings_1get_1default",
+ "gtk_1socket_1get_1id",
+ "gtk_1socket_1new",
+ "gtk_1spin_1button_1configure",
+ "gtk_1spin_1button_1get_1adjustment",
+ "gtk_1spin_1button_1get_1digits",
+ "gtk_1spin_1button_1new",
+ "gtk_1spin_1button_1set_1increments",
+ "gtk_1spin_1button_1set_1numeric",
+ "gtk_1spin_1button_1set_1range",
+ "gtk_1spin_1button_1set_1value",
+ "gtk_1spin_1button_1set_1wrap",
+ "gtk_1spin_1button_1update",
+ "gtk_1status_1icon_1position_1menu_1func",
+ "gtk_1style_1context_1add_1class",
+ "gtk_1style_1context_1add_1provider",
+ "gtk_1style_1context_1remove_1class",
+ "gtk_1style_1context_1restore",
+ "gtk_1style_1context_1save",
+ "gtk_1style_1context_1set_1state",
+ "gtk_1text_1buffer_1copy_1clipboard",
+ "gtk_1text_1buffer_1create_1mark",
+ "gtk_1text_1buffer_1cut_1clipboard",
+ "gtk_1text_1buffer_1delete",
+ "gtk_1text_1buffer_1get_1bounds",
+ "gtk_1text_1buffer_1get_1end_1iter",
+ "gtk_1text_1buffer_1get_1insert",
+ "gtk_1text_1buffer_1get_1iter_1at_1line",
+ "gtk_1text_1buffer_1get_1iter_1at_1mark",
+ "gtk_1text_1buffer_1get_1iter_1at_1offset",
+ "gtk_1text_1buffer_1get_1line_1count",
+ "gtk_1text_1buffer_1get_1selection_1bound",
+ "gtk_1text_1buffer_1get_1selection_1bounds",
+ "gtk_1text_1buffer_1get_1text",
+ "gtk_1text_1buffer_1insert__JJ_3BI",
+ "gtk_1text_1buffer_1insert__J_3B_3BI",
+ "gtk_1text_1buffer_1paste_1clipboard",
+ "gtk_1text_1buffer_1place_1cursor",
+ "gtk_1text_1buffer_1select_1range",
+ "gtk_1text_1buffer_1set_1text",
+ "gtk_1text_1iter_1get_1line",
+ "gtk_1text_1iter_1get_1offset",
+ "gtk_1text_1view_1buffer_1to_1window_1coords",
+ "gtk_1text_1view_1get_1buffer",
+ "gtk_1text_1view_1get_1editable",
+ "gtk_1text_1view_1get_1iter_1at_1location",
+ "gtk_1text_1view_1get_1iter_1location",
+ "gtk_1text_1view_1get_1line_1at_1y",
+ "gtk_1text_1view_1get_1line_1yrange",
+ "gtk_1text_1view_1get_1visible_1rect",
+ "gtk_1text_1view_1new",
+ "gtk_1text_1view_1scroll_1to_1iter",
+ "gtk_1text_1view_1scroll_1to_1mark",
+ "gtk_1text_1view_1set_1editable",
+ "gtk_1text_1view_1set_1justification",
+ "gtk_1text_1view_1set_1tabs",
+ "gtk_1text_1view_1set_1wrap_1mode",
+ "gtk_1toggle_1button_1get_1active",
+ "gtk_1toggle_1button_1new",
+ "gtk_1toggle_1button_1set_1active",
+ "gtk_1tooltip_1get_1type",
+ "gtk_1tooltip_1set_1custom",
+ "gtk_1tree_1model_1get__JJI_3II",
+ "gtk_1tree_1model_1get__JJI_3JI",
+ "gtk_1tree_1model_1get_1iter",
+ "gtk_1tree_1model_1get_1iter_1first",
+ "gtk_1tree_1model_1get_1n_1columns",
+ "gtk_1tree_1model_1get_1path",
+ "gtk_1tree_1model_1get_1type",
+ "gtk_1tree_1model_1get_1value",
+ "gtk_1tree_1model_1iter_1children",
+ "gtk_1tree_1model_1iter_1n_1children",
+ "gtk_1tree_1model_1iter_1next",
+ "gtk_1tree_1model_1iter_1nth_1child",
+ "gtk_1tree_1path_1append_1index",
+ "gtk_1tree_1path_1compare",
+ "gtk_1tree_1path_1free",
+ "gtk_1tree_1path_1get_1depth",
+ "gtk_1tree_1path_1get_1indices",
+ "gtk_1tree_1path_1new",
+ "gtk_1tree_1path_1new_1from_1string__J",
+ "gtk_1tree_1path_1new_1from_1string___3B",
+ "gtk_1tree_1path_1next",
+ "gtk_1tree_1path_1prev",
+ "gtk_1tree_1path_1up",
+ "gtk_1tree_1selection_1count_1selected_1rows",
+ "gtk_1tree_1selection_1get_1selected_1rows",
+ "gtk_1tree_1selection_1path_1is_1selected",
+ "gtk_1tree_1selection_1select_1all",
+ "gtk_1tree_1selection_1select_1iter",
+ "gtk_1tree_1selection_1set_1mode",
+ "gtk_1tree_1selection_1set_1select_1function",
+ "gtk_1tree_1selection_1unselect_1all",
+ "gtk_1tree_1selection_1unselect_1iter",
+ "gtk_1tree_1selection_1unselect_1path",
+ "gtk_1tree_1store_1append",
+ "gtk_1tree_1store_1clear",
+ "gtk_1tree_1store_1insert",
+ "gtk_1tree_1store_1insert_1after",
+ "gtk_1tree_1store_1newv",
+ "gtk_1tree_1store_1prepend",
+ "gtk_1tree_1store_1remove",
+ "gtk_1tree_1store_1set__JJIII",
+ "gtk_1tree_1store_1set__JJIJI",
+ "gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I",
+ "gtk_1tree_1store_1set__JJIZI",
+ "gtk_1tree_1store_1set__JJI_3BI",
+ "gtk_1tree_1store_1set_1value",
+ "gtk_1tree_1view_1collapse_1row",
+ "gtk_1tree_1view_1column_1add_1attribute",
+ "gtk_1tree_1view_1column_1cell_1get_1position",
+ "gtk_1tree_1view_1column_1cell_1set_1cell_1data",
+ "gtk_1tree_1view_1column_1clear",
+ "gtk_1tree_1view_1column_1get_1button",
+ "gtk_1tree_1view_1column_1get_1fixed_1width",
+ "gtk_1tree_1view_1column_1get_1reorderable",
+ "gtk_1tree_1view_1column_1get_1resizable",
+ "gtk_1tree_1view_1column_1get_1visible",
+ "gtk_1tree_1view_1column_1get_1width",
+ "gtk_1tree_1view_1column_1new",
+ "gtk_1tree_1view_1column_1pack_1end",
+ "gtk_1tree_1view_1column_1pack_1start",
+ "gtk_1tree_1view_1column_1set_1alignment",
+ "gtk_1tree_1view_1column_1set_1cell_1data_1func",
+ "gtk_1tree_1view_1column_1set_1clickable",
+ "gtk_1tree_1view_1column_1set_1fixed_1width",
+ "gtk_1tree_1view_1column_1set_1min_1width",
+ "gtk_1tree_1view_1column_1set_1reorderable",
+ "gtk_1tree_1view_1column_1set_1resizable",
+ "gtk_1tree_1view_1column_1set_1sizing",
+ "gtk_1tree_1view_1column_1set_1sort_1indicator",
+ "gtk_1tree_1view_1column_1set_1sort_1order",
+ "gtk_1tree_1view_1column_1set_1visible",
+ "gtk_1tree_1view_1column_1set_1widget",
+ "gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords",
+ "gtk_1tree_1view_1convert_1bin_1window_1to_1widget_1coords",
+ "gtk_1tree_1view_1create_1row_1drag_1icon",
+ "gtk_1tree_1view_1expand_1row",
+ "gtk_1tree_1view_1get_1background_1area",
+ "gtk_1tree_1view_1get_1cell_1area",
+ "gtk_1tree_1view_1get_1column",
+ "gtk_1tree_1view_1get_1columns",
+ "gtk_1tree_1view_1get_1cursor",
+ "gtk_1tree_1view_1get_1expander_1column",
+ "gtk_1tree_1view_1get_1grid_1lines",
+ "gtk_1tree_1view_1get_1headers_1visible",
+ "gtk_1tree_1view_1get_1path_1at_1pos",
+ "gtk_1tree_1view_1get_1selection",
+ "gtk_1tree_1view_1get_1visible_1rect",
+ "gtk_1tree_1view_1insert_1column",
+ "gtk_1tree_1view_1move_1column_1after",
+ "gtk_1tree_1view_1new_1with_1model",
+ "gtk_1tree_1view_1remove_1column",
+ "gtk_1tree_1view_1row_1expanded",
+ "gtk_1tree_1view_1scroll_1to_1cell",
+ "gtk_1tree_1view_1scroll_1to_1point",
+ "gtk_1tree_1view_1set_1cursor",
+ "gtk_1tree_1view_1set_1drag_1dest_1row",
+ "gtk_1tree_1view_1set_1grid_1lines",
+ "gtk_1tree_1view_1set_1headers_1visible",
+ "gtk_1tree_1view_1set_1model",
+ "gtk_1tree_1view_1set_1search_1column",
+ "gtk_1widget_1activate",
+ "gtk_1widget_1add_1css_1class",
+ "gtk_1widget_1child_1focus",
+ "gtk_1widget_1class_1get_1css_1name",
+ "gtk_1widget_1create_1pango_1layout__JJ",
+ "gtk_1widget_1create_1pango_1layout__J_3B",
+ "gtk_1widget_1get_1allocation",
+ "gtk_1widget_1get_1child_1visible",
+ "gtk_1widget_1get_1mapped",
+ "gtk_1widget_1get_1margin_1bottom",
+ "gtk_1widget_1get_1margin_1end",
+ "gtk_1widget_1get_1margin_1start",
+ "gtk_1widget_1get_1margin_1top",
+ "gtk_1widget_1get_1name",
+ "gtk_1widget_1get_1opacity",
+ "gtk_1widget_1get_1pango_1context",
+ "gtk_1widget_1get_1parent",
+ "gtk_1widget_1get_1parent_1surface",
+ "gtk_1widget_1get_1parent_1window",
+ "gtk_1widget_1get_1preferred_1size",
+ "gtk_1widget_1get_1realized",
+ "gtk_1widget_1get_1scale_1factor",
+ "gtk_1widget_1get_1sensitive",
+ "gtk_1widget_1get_1size_1request",
+ "gtk_1widget_1get_1state_1flags",
+ "gtk_1widget_1get_1style_1context",
+ "gtk_1widget_1get_1tooltip_1text",
+ "gtk_1widget_1get_1visible",
+ "gtk_1widget_1grab_1focus",
+ "gtk_1widget_1has_1default",
+ "gtk_1widget_1has_1focus",
+ "gtk_1widget_1hide",
+ "gtk_1widget_1insert_1action_1group",
+ "gtk_1widget_1is_1focus",
+ "gtk_1widget_1mnemonic_1activate",
+ "gtk_1widget_1queue_1draw",
+ "gtk_1widget_1queue_1resize",
+ "gtk_1widget_1realize",
+ "gtk_1widget_1set_1can_1focus",
+ "gtk_1widget_1set_1default_1direction",
+ "gtk_1widget_1set_1direction",
+ "gtk_1widget_1set_1focus_1on_1click",
+ "gtk_1widget_1set_1halign",
+ "gtk_1widget_1set_1hexpand",
+ "gtk_1widget_1set_1margin_1bottom",
+ "gtk_1widget_1set_1margin_1end",
+ "gtk_1widget_1set_1margin_1start",
+ "gtk_1widget_1set_1margin_1top",
+ "gtk_1widget_1set_1opacity",
+ "gtk_1widget_1set_1parent",
+ "gtk_1widget_1set_1receives_1default",
+ "gtk_1widget_1set_1sensitive",
+ "gtk_1widget_1set_1size_1request",
+ "gtk_1widget_1set_1tooltip_1text",
+ "gtk_1widget_1set_1valign",
+ "gtk_1widget_1set_1vexpand",
+ "gtk_1widget_1set_1visible",
+ "gtk_1widget_1show",
+ "gtk_1widget_1unparent",
+ "gtk_1window_1fullscreen",
+ "gtk_1window_1get_1default_1size",
+ "gtk_1window_1get_1default_1widget",
+ "gtk_1window_1get_1focus",
+ "gtk_1window_1get_1group",
+ "gtk_1window_1get_1modal",
+ "gtk_1window_1group_1add_1window",
+ "gtk_1window_1group_1new",
+ "gtk_1window_1group_1remove_1window",
+ "gtk_1window_1is_1active",
+ "gtk_1window_1list_1toplevels",
+ "gtk_1window_1maximize",
+ "gtk_1window_1set_1decorated",
+ "gtk_1window_1set_1default_1size",
+ "gtk_1window_1set_1destroy_1with_1parent",
+ "gtk_1window_1set_1modal",
+ "gtk_1window_1set_1resizable",
+ "gtk_1window_1set_1title",
+ "gtk_1window_1set_1transient_1for",
+ "gtk_1window_1unfullscreen",
+ "gtk_1window_1unmaximize",
};
#define NATIVE_FUNCTION_COUNT sizeof(GTK_nativeFunctionNames) / sizeof(char*)
int GTK_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
@@ -1103,9 +854,9 @@ JNIEXPORT jint JNICALL STATS_NATIVE(GTK_1GetFunctionCallCount)
#ifdef NATIVE_STATS
char * Graphene_nativeFunctionNames[] = {
- "_1graphene_1rect_1alloc",
- "_1graphene_1rect_1free",
- "_1graphene_1rect_1init",
+ "graphene_1rect_1alloc",
+ "graphene_1rect_1free",
+ "graphene_1rect_1init",
};
#define NATIVE_FUNCTION_COUNT sizeof(Graphene_nativeFunctionNames) / sizeof(char*)
int Graphene_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
@@ -1136,21 +887,31 @@ JNIEXPORT jint JNICALL STATS_NATIVE(Graphene_1GetFunctionCallCount)
char * OS_nativeFunctionNames[] = {
"Call__JJII",
- "Call__JJIJ",
+ "Call__JJJ",
+ "FcConfigAppFontAddFile",
"GDK_1WINDOWING_1WAYLAND",
"GDK_1WINDOWING_1X11",
- "GInterfaceInfo_1sizeof",
"GPollFD_1sizeof",
"GTypeInfo_1sizeof",
- "GTypeQuery_1sizeof",
+ "GValue_1sizeof",
"G_1OBJECT_1CLASS_1CONSTRUCTOR",
"G_1OBJECT_1CLASS_1SET_1CONSTRUCTOR",
+ "G_1OBJECT_1GET_1CLASS",
+ "G_1OBJECT_1TYPE",
+ "G_1OBJECT_1TYPE_1NAME",
"G_1TYPE_1BOOLEAN",
"G_1TYPE_1DOUBLE",
"G_1TYPE_1FLOAT",
"G_1TYPE_1INT",
"G_1TYPE_1INT64",
+ "G_1TYPE_1LONG",
+ "G_1TYPE_1STRING",
"G_1VALUE_1TYPE",
+ "PANGO_1PIXELS",
+ "PANGO_1TYPE_1FONT_1DESCRIPTION",
+ "PANGO_1TYPE_1FONT_1FACE",
+ "PANGO_1TYPE_1FONT_1FAMILY",
+ "PANGO_1TYPE_1LAYOUT",
"PangoAttrColor_1sizeof",
"PangoAttrInt_1sizeof",
"PangoAttribute_1sizeof",
@@ -1159,359 +920,234 @@ char * OS_nativeFunctionNames[] = {
"PangoLayoutRun_1sizeof",
"PangoLogAttr_1sizeof",
"PangoRectangle_1sizeof",
- "RTLD_1GLOBAL",
- "RTLD_1LAZY",
- "RTLD_1NOW",
"XAnyEvent_1sizeof",
+ "XCheckIfEvent",
+ "XDefaultRootWindow",
+ "XDefaultScreen",
"XEvent_1sizeof",
"XExposeEvent_1sizeof",
"XFocusChangeEvent_1sizeof",
+ "XFree",
+ "XQueryPointer",
+ "XSetErrorHandler",
+ "XSetIOErrorHandler",
+ "XSetInputFocus",
+ "XSetTransientForHint",
+ "XSynchronize",
"X_1EVENT_1TYPE",
"X_1EVENT_1WINDOW",
- "_1Call",
- "_1FcConfigAppFontAddFile",
- "_1GString_1len",
- "_1GString_1str",
- "_1G_1OBJECT_1CLASS",
- "_1G_1OBJECT_1GET_1CLASS",
- "_1G_1OBJECT_1TYPE",
- "_1G_1OBJECT_1TYPE_1NAME",
- "_1G_1TYPE_1CHECK_1INSTANCE_1TYPE",
- "_1G_1TYPE_1STRING",
- "_1PANGO_1PIXELS",
- "_1PANGO_1TYPE_1FONT_1DESCRIPTION",
- "_1PANGO_1TYPE_1FONT_1FACE",
- "_1PANGO_1TYPE_1FONT_1FAMILY",
- "_1PANGO_1TYPE_1LAYOUT",
- "_1XCheckIfEvent",
- "_1XDefaultRootWindow",
- "_1XDefaultScreen",
- "_1XFree",
- "_1XQueryPointer",
- "_1XSetErrorHandler",
- "_1XSetIOErrorHandler",
- "_1XSetInputFocus",
- "_1XSetTransientForHint",
- "_1XSynchronize",
- "_1access",
- "_1cachejvmptr",
- "_1call__JJJJJ",
- "_1call__JJJJJJJ",
- "_1call__JJJJJJJJ",
- "_1dlopen",
- "_1g_1app_1info_1create_1from_1commandline",
- "_1g_1app_1info_1get_1all",
- "_1g_1app_1info_1get_1default_1for_1type",
- "_1g_1app_1info_1get_1executable",
- "_1g_1app_1info_1get_1icon",
- "_1g_1app_1info_1get_1name",
- "_1g_1app_1info_1launch",
- "_1g_1app_1info_1launch_1default_1for_1uri",
- "_1g_1app_1info_1should_1show",
- "_1g_1app_1info_1supports_1uris",
- "_1g_1bus_1own_1name",
- "_1g_1bytes_1new",
- "_1g_1bytes_1unref",
- "_1g_1cclosure_1new",
- "_1g_1closure_1ref",
- "_1g_1closure_1sink",
- "_1g_1closure_1unref",
- "_1g_1content_1type_1equals",
- "_1g_1content_1type_1is_1a",
- "_1g_1dbus_1connection_1register_1object",
- "_1g_1dbus_1method_1invocation_1return_1value",
- "_1g_1dbus_1node_1info_1lookup_1interface",
- "_1g_1dbus_1node_1info_1new_1for_1xml",
- "_1g_1dbus_1proxy_1call",
- "_1g_1dbus_1proxy_1call_1finish",
- "_1g_1dbus_1proxy_1call_1sync",
- "_1g_1dbus_1proxy_1get_1name_1owner",
- "_1g_1dbus_1proxy_1new_1for_1bus_1sync",
- "_1g_1error_1free",
- "_1g_1error_1get_1message",
- "_1g_1file_1get_1uri",
- "_1g_1file_1info_1get_1content_1type",
- "_1g_1file_1new_1for_1commandline_1arg",
- "_1g_1file_1new_1for_1path",
- "_1g_1file_1new_1for_1uri",
- "_1g_1file_1query_1info",
- "_1g_1file_1test",
- "_1g_1filename_1display_1name",
- "_1g_1filename_1from_1uri",
- "_1g_1filename_1from_1utf8",
- "_1g_1filename_1to_1uri",
- "_1g_1filename_1to_1utf8",
- "_1g_1free",
- "_1g_1get_1current_1time",
- "_1g_1getenv",
- "_1g_1hash_1table_1get_1values",
- "_1g_1icon_1new_1for_1string",
- "_1g_1icon_1to_1string",
- "_1g_1idle_1add",
- "_1g_1list_1append",
- "_1g_1list_1data",
- "_1g_1list_1free",
- "_1g_1list_1free_11",
- "_1g_1list_1last",
- "_1g_1list_1length",
- "_1g_1list_1next",
- "_1g_1list_1nth",
- "_1g_1list_1nth_1data",
- "_1g_1list_1prepend",
- "_1g_1list_1previous",
- "_1g_1list_1remove_1link",
- "_1g_1list_1set_1next",
- "_1g_1list_1set_1previous",
- "_1g_1log_1default_1handler",
- "_1g_1log_1remove_1handler",
- "_1g_1log_1set_1handler",
- "_1g_1main_1context_1acquire",
- "_1g_1main_1context_1check",
- "_1g_1main_1context_1default",
- "_1g_1main_1context_1get_1poll_1func",
- "_1g_1main_1context_1iteration",
- "_1g_1main_1context_1prepare",
- "_1g_1main_1context_1query",
- "_1g_1main_1context_1release",
- "_1g_1malloc",
- "_1g_1object_1class_1find_1property",
- "_1g_1object_1get__J_3B_3IJ",
- "_1g_1object_1get__J_3B_3JJ",
- "_1g_1object_1get_1qdata",
- "_1g_1object_1new",
- "_1g_1object_1notify",
- "_1g_1object_1ref",
- "_1g_1object_1ref_1sink",
- "_1g_1object_1set__J_3BFJ",
- "_1g_1object_1set__J_3BIJ",
- "_1g_1object_1set__J_3BJJ",
- "_1g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J",
- "_1g_1object_1set__J_3BZJ",
- "_1g_1object_1set__J_3B_3BJ",
- "_1g_1object_1set_1qdata",
- "_1g_1object_1unref",
- "_1g_1quark_1from_1string",
- "_1g_1set_1prgname",
- "_1g_1signal_1add_1emission_1hook",
- "_1g_1signal_1connect",
- "_1g_1signal_1connect_1closure",
- "_1g_1signal_1connect_1closure_1by_1id",
- "_1g_1signal_1emit_1by_1name__J_3B",
- "_1g_1signal_1emit_1by_1name__J_3BJ",
- "_1g_1signal_1emit_1by_1name__J_3BJJ",
- "_1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2",
- "_1g_1signal_1emit_1by_1name__J_3B_3B",
- "_1g_1signal_1handler_1disconnect",
- "_1g_1signal_1handler_1find",
- "_1g_1signal_1handlers_1block_1matched",
- "_1g_1signal_1handlers_1unblock_1matched",
- "_1g_1signal_1lookup",
- "_1g_1signal_1remove_1emission_1hook",
- "_1g_1signal_1stop_1emission_1by_1name",
- "_1g_1slist_1append",
- "_1g_1slist_1data",
- "_1g_1slist_1free",
- "_1g_1slist_1length",
- "_1g_1slist_1next",
- "_1g_1source_1remove",
- "_1g_1strfreev",
- "_1g_1string_1free",
- "_1g_1string_1new_1len",
- "_1g_1strtod",
- "_1g_1time_1val_1add",
- "_1g_1timeout_1add",
- "_1g_1type_1add_1interface_1static",
- "_1g_1type_1class_1peek",
- "_1g_1type_1class_1peek_1parent",
- "_1g_1type_1class_1ref",
- "_1g_1type_1class_1unref",
- "_1g_1type_1interface_1peek_1parent",
- "_1g_1type_1is_1a",
- "_1g_1type_1parent",
- "_1g_1type_1query",
- "_1g_1type_1register_1static",
- "_1g_1unsetenv",
- "_1g_1utf16_1offset_1to_1pointer",
- "_1g_1utf16_1offset_1to_1utf8_1offset",
- "_1g_1utf16_1pointer_1to_1offset",
- "_1g_1utf16_1strlen",
- "_1g_1utf16_1to_1utf8",
- "_1g_1utf8_1offset_1to_1utf16_1offset",
- "_1g_1utf8_1pointer_1to_1offset",
- "_1g_1utf8_1strlen",
- "_1g_1utf8_1to_1utf16__JJ_3J_3J_3J",
- "_1g_1utf8_1to_1utf16___3BJ_3J_3J_3J",
- "_1g_1value_1peek_1pointer",
- "_1g_1variant_1builder_1add_1value",
- "_1g_1variant_1builder_1end",
- "_1g_1variant_1builder_1new",
- "_1g_1variant_1builder_1unref",
- "_1g_1variant_1get_1boolean",
- "_1g_1variant_1get_1byte",
- "_1g_1variant_1get_1child_1value",
- "_1g_1variant_1get_1double",
- "_1g_1variant_1get_1int32",
- "_1g_1variant_1get_1string",
- "_1g_1variant_1get_1type",
- "_1g_1variant_1get_1type_1string",
- "_1g_1variant_1get_1uint64",
- "_1g_1variant_1is_1of_1type",
- "_1g_1variant_1n_1children",
- "_1g_1variant_1new___3BZ_3B",
- "_1g_1variant_1new___3B_3B",
- "_1g_1variant_1new___3B_3B_3B",
- "_1g_1variant_1new_1boolean",
- "_1g_1variant_1new_1byte",
- "_1g_1variant_1new_1double",
- "_1g_1variant_1new_1int32",
- "_1g_1variant_1new_1string",
- "_1g_1variant_1new_1tuple",
- "_1g_1variant_1new_1uint64",
- "_1g_1variant_1type_1free",
- "_1g_1variant_1type_1new",
- "_1g_1variant_1unref",
- "_1getpid",
- "_1glib_1major_1version",
- "_1glib_1micro_1version",
- "_1glib_1minor_1version",
- "_1pango_1attr_1background_1new",
- "_1pango_1attr_1font_1desc_1new",
- "_1pango_1attr_1foreground_1new",
- "_1pango_1attr_1iterator_1destroy",
- "_1pango_1attr_1iterator_1get",
- "_1pango_1attr_1iterator_1next",
- "_1pango_1attr_1iterator_1range",
- "_1pango_1attr_1list_1get_1iterator",
- "_1pango_1attr_1list_1insert",
- "_1pango_1attr_1list_1new",
- "_1pango_1attr_1list_1unref",
- "_1pango_1attr_1rise_1new",
- "_1pango_1attr_1shape_1new",
- "_1pango_1attr_1strikethrough_1color_1new",
- "_1pango_1attr_1strikethrough_1new",
- "_1pango_1attr_1underline_1color_1new",
- "_1pango_1attr_1underline_1new",
- "_1pango_1attr_1weight_1new",
- "_1pango_1attribute_1copy",
- "_1pango_1cairo_1context_1get_1font_1options",
- "_1pango_1cairo_1context_1set_1font_1options",
- "_1pango_1cairo_1create_1layout",
- "_1pango_1cairo_1font_1map_1get_1default",
- "_1pango_1cairo_1layout_1path",
- "_1pango_1cairo_1show_1layout",
- "_1pango_1context_1get_1base_1dir",
- "_1pango_1context_1get_1language",
- "_1pango_1context_1get_1metrics",
- "_1pango_1context_1list_1families",
- "_1pango_1context_1set_1base_1dir",
- "_1pango_1context_1set_1language",
- "_1pango_1font_1description_1copy",
- "_1pango_1font_1description_1free",
- "_1pango_1font_1description_1from_1string",
- "_1pango_1font_1description_1get_1family",
- "_1pango_1font_1description_1get_1size",
- "_1pango_1font_1description_1get_1stretch",
- "_1pango_1font_1description_1get_1style",
- "_1pango_1font_1description_1get_1variant",
- "_1pango_1font_1description_1get_1weight",
- "_1pango_1font_1description_1new",
- "_1pango_1font_1description_1set_1family",
- "_1pango_1font_1description_1set_1size",
- "_1pango_1font_1description_1set_1stretch",
- "_1pango_1font_1description_1set_1style",
- "_1pango_1font_1description_1set_1variant",
- "_1pango_1font_1description_1set_1weight",
- "_1pango_1font_1description_1to_1string",
- "_1pango_1font_1face_1describe",
- "_1pango_1font_1family_1get_1name",
- "_1pango_1font_1family_1list_1faces",
- "_1pango_1font_1get_1metrics",
- "_1pango_1font_1map_1create_1context",
- "_1pango_1font_1metrics_1get_1approximate_1char_1width",
- "_1pango_1font_1metrics_1get_1ascent",
- "_1pango_1font_1metrics_1get_1descent",
- "_1pango_1font_1metrics_1unref",
- "_1pango_1layout_1context_1changed",
- "_1pango_1layout_1get_1alignment",
- "_1pango_1layout_1get_1context",
- "_1pango_1layout_1get_1indent",
- "_1pango_1layout_1get_1iter",
- "_1pango_1layout_1get_1justify",
- "_1pango_1layout_1get_1line",
- "_1pango_1layout_1get_1line_1count",
- "_1pango_1layout_1get_1log_1attrs",
- "_1pango_1layout_1get_1pixel_1size",
- "_1pango_1layout_1get_1size",
- "_1pango_1layout_1get_1spacing",
- "_1pango_1layout_1get_1text",
- "_1pango_1layout_1get_1width",
- "_1pango_1layout_1index_1to_1pos",
- "_1pango_1layout_1iter_1free",
- "_1pango_1layout_1iter_1get_1index",
- "_1pango_1layout_1iter_1get_1line_1extents",
- "_1pango_1layout_1iter_1get_1run",
- "_1pango_1layout_1iter_1next_1line",
- "_1pango_1layout_1iter_1next_1run",
- "_1pango_1layout_1line_1get_1extents",
- "_1pango_1layout_1new",
- "_1pango_1layout_1set_1alignment",
- "_1pango_1layout_1set_1attributes",
- "_1pango_1layout_1set_1auto_1dir",
- "_1pango_1layout_1set_1font_1description",
- "_1pango_1layout_1set_1indent",
- "_1pango_1layout_1set_1justify",
- "_1pango_1layout_1set_1single_1paragraph_1mode",
- "_1pango_1layout_1set_1spacing",
- "_1pango_1layout_1set_1tabs",
- "_1pango_1layout_1set_1text",
- "_1pango_1layout_1set_1width",
- "_1pango_1layout_1set_1wrap",
- "_1pango_1layout_1xy_1to_1index",
- "_1pango_1tab_1array_1free",
- "_1pango_1tab_1array_1new",
- "_1pango_1tab_1array_1set_1tab",
- "_1swt_1debug_1on_1fatal_1warnings",
- "_1swt_1fixed_1accessible_1get_1type",
- "_1swt_1fixed_1accessible_1register_1accessible",
- "_1swt_1fixed_1get_1type",
- "_1swt_1fixed_1move",
- "_1swt_1fixed_1resize",
- "_1swt_1fixed_1restack",
- "_1ubuntu_1menu_1proxy_1get",
+ "addressof_1g_1free",
+ "call__JJJJJ",
+ "call__JJJJJJJ",
+ "call__JJJJJJJJ",
+ "g_1action_1get_1enabled",
+ "g_1action_1get_1state",
+ "g_1action_1map_1add_1action",
+ "g_1action_1map_1remove_1action",
+ "g_1app_1info_1create_1from_1commandline",
+ "g_1app_1info_1get_1all",
+ "g_1app_1info_1get_1default_1for_1type",
+ "g_1app_1info_1get_1executable",
+ "g_1app_1info_1get_1icon",
+ "g_1app_1info_1get_1name",
+ "g_1app_1info_1launch",
+ "g_1app_1info_1launch_1default_1for_1uri",
+ "g_1app_1info_1supports_1uris",
+ "g_1bus_1own_1name",
+ "g_1bytes_1new",
+ "g_1bytes_1unref",
+ "g_1cclosure_1new",
+ "g_1closure_1ref",
+ "g_1closure_1sink",
+ "g_1closure_1unref",
+ "g_1content_1type_1equals",
+ "g_1content_1type_1is_1a",
+ "g_1date_1time_1get_1ymd",
+ "g_1date_1time_1new_1local",
+ "g_1date_1time_1unref",
+ "g_1dbus_1connection_1register_1object",
+ "g_1dbus_1method_1invocation_1return_1value",
+ "g_1dbus_1node_1info_1lookup_1interface",
+ "g_1dbus_1node_1info_1new_1for_1xml",
+ "g_1dbus_1proxy_1call",
+ "g_1dbus_1proxy_1call_1sync",
+ "g_1dbus_1proxy_1get_1name_1owner",
+ "g_1dbus_1proxy_1new_1for_1bus_1sync",
+ "g_1dir_1make_1tmp",
+ "g_1error_1free",
+ "g_1error_1get_1message",
+ "g_1error_1matches",
+ "g_1file_1error_1quark",
+ "g_1file_1get_1path",
+ "g_1file_1get_1uri",
+ "g_1file_1info_1get_1content_1type",
+ "g_1file_1new_1for_1commandline_1arg",
+ "g_1file_1new_1for_1path",
+ "g_1file_1new_1for_1uri",
+ "g_1file_1query_1info",
+ "g_1file_1test",
+ "g_1filename_1display_1name",
+ "g_1filename_1from_1uri",
+ "g_1filename_1from_1utf8",
+ "g_1filename_1to_1uri",
+ "g_1filename_1to_1utf8",
+ "g_1free",
+ "g_1get_1current_1time",
+ "g_1getenv",
+ "g_1icon_1new_1for_1string",
+ "g_1icon_1to_1string",
+ "g_1idle_1add",
+ "g_1list_1append",
+ "g_1list_1data",
+ "g_1list_1free",
+ "g_1list_1last",
+ "g_1list_1length",
+ "g_1list_1model_1get_1item",
+ "g_1list_1model_1get_1n_1items",
+ "g_1list_1next",
+ "g_1list_1nth_1data",
+ "g_1list_1previous",
+ "g_1log_1default_1handler",
+ "g_1log_1remove_1handler",
+ "g_1log_1set_1handler",
+ "g_1main_1context_1acquire",
+ "g_1main_1context_1check",
+ "g_1main_1context_1default",
+ "g_1main_1context_1get_1poll_1func",
+ "g_1main_1context_1iteration",
+ "g_1main_1context_1prepare",
+ "g_1main_1context_1query",
+ "g_1main_1context_1release",
"g_1main_1context_1wakeup",
+ "g_1malloc",
+ "g_1memory_1input_1stream_1new_1from_1data",
+ "g_1menu_1insert_1item",
+ "g_1menu_1item_1new",
+ "g_1menu_1item_1new_1section",
+ "g_1menu_1item_1new_1submenu",
+ "g_1menu_1item_1set_1attribute",
+ "g_1menu_1item_1set_1label",
+ "g_1menu_1item_1set_1submenu",
+ "g_1menu_1new",
+ "g_1menu_1remove",
+ "g_1object_1get__J_3B_3IJ",
+ "g_1object_1get__J_3B_3JJ",
+ "g_1object_1get_1qdata",
+ "g_1object_1new",
+ "g_1object_1notify",
+ "g_1object_1ref",
+ "g_1object_1ref_1sink",
+ "g_1object_1set__J_3BFJ",
+ "g_1object_1set__J_3BIJ",
+ "g_1object_1set__J_3BJJ",
+ "g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J",
+ "g_1object_1set__J_3BZJ",
+ "g_1object_1set__J_3B_3BJ",
+ "g_1object_1set_1qdata",
+ "g_1object_1unref",
+ "g_1quark_1from_1string",
+ "g_1set_1prgname",
+ "g_1signal_1add_1emission_1hook",
+ "g_1signal_1connect",
+ "g_1signal_1connect_1closure",
+ "g_1signal_1connect_1closure_1by_1id",
+ "g_1signal_1emit_1by_1name__J_3B",
+ "g_1signal_1emit_1by_1name__J_3BJ",
+ "g_1signal_1emit_1by_1name__J_3BJJ",
+ "g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2",
+ "g_1signal_1emit_1by_1name__J_3B_3B",
+ "g_1signal_1handler_1disconnect",
+ "g_1signal_1handlers_1block_1matched",
+ "g_1signal_1handlers_1unblock_1matched",
+ "g_1signal_1lookup",
+ "g_1signal_1remove_1emission_1hook",
+ "g_1signal_1stop_1emission_1by_1name",
+ "g_1simple_1action_1group_1new",
+ "g_1simple_1action_1new",
+ "g_1simple_1action_1new_1stateful",
+ "g_1simple_1action_1set_1enabled",
+ "g_1simple_1action_1set_1state",
+ "g_1slist_1append",
+ "g_1slist_1data",
+ "g_1slist_1free",
+ "g_1slist_1length",
+ "g_1slist_1next",
+ "g_1source_1remove",
"g_1strdup",
+ "g_1strfreev",
+ "g_1strtod",
+ "g_1time_1val_1add",
+ "g_1timeout_1add",
+ "g_1type_1class_1peek",
+ "g_1type_1class_1peek_1parent",
+ "g_1type_1class_1ref",
+ "g_1type_1class_1unref",
+ "g_1type_1interface_1peek_1parent",
+ "g_1type_1is_1a",
+ "g_1type_1parent",
+ "g_1type_1register_1static",
+ "g_1unsetenv",
+ "g_1utf16_1offset_1to_1pointer",
+ "g_1utf16_1offset_1to_1utf8_1offset",
+ "g_1utf16_1pointer_1to_1offset",
+ "g_1utf16_1strlen",
+ "g_1utf16_1to_1utf8",
+ "g_1utf8_1offset_1to_1utf16_1offset",
+ "g_1utf8_1pointer_1to_1offset",
+ "g_1utf8_1strlen",
+ "g_1utf8_1to_1utf16__JJ_3J_3J_3J",
+ "g_1utf8_1to_1utf16___3BJ_3J_3J_3J",
"g_1value_1get_1double",
"g_1value_1get_1float",
"g_1value_1get_1int",
"g_1value_1get_1int64",
"g_1value_1init",
+ "g_1value_1peek_1pointer",
"g_1value_1set_1double",
"g_1value_1set_1float",
"g_1value_1set_1int",
"g_1value_1set_1int64",
"g_1value_1unset",
+ "g_1variant_1builder_1add_1value",
+ "g_1variant_1builder_1end",
+ "g_1variant_1builder_1new",
+ "g_1variant_1builder_1unref",
+ "g_1variant_1get_1boolean",
+ "g_1variant_1get_1byte",
+ "g_1variant_1get_1child_1value",
+ "g_1variant_1get_1double",
+ "g_1variant_1get_1int32",
+ "g_1variant_1get_1string",
+ "g_1variant_1get_1type_1string",
+ "g_1variant_1get_1uint64",
+ "g_1variant_1is_1of_1type",
+ "g_1variant_1n_1children",
+ "g_1variant_1new___3BZ_3B",
+ "g_1variant_1new___3B_3B",
+ "g_1variant_1new___3B_3B_3B",
+ "g_1variant_1new_1boolean",
+ "g_1variant_1new_1byte",
+ "g_1variant_1new_1double",
+ "g_1variant_1new_1int32",
+ "g_1variant_1new_1string__J",
+ "g_1variant_1new_1string___3B",
+ "g_1variant_1new_1tuple",
+ "g_1variant_1new_1uint64",
+ "g_1variant_1type_1free",
+ "g_1variant_1type_1new",
+ "g_1variant_1unref",
+ "glib_1major_1version",
+ "glib_1micro_1version",
+ "glib_1minor_1version",
"imContextLast",
"imContextNewProc_1CALLBACK",
"localeconv_1decimal_1point",
- "memmove__JLorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I",
- "memmove__JLorg_eclipse_swt_internal_gtk_GObjectClass_2",
"memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I",
- "memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J",
- "memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J",
"memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J",
"memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2",
- "memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J",
"memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2",
"memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J",
"memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J",
- "memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J",
- "memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2JJ",
- "memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ",
- "memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ",
- "memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ",
- "memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ",
- "memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ",
- "memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ",
"memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ",
"memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ",
"memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ",
@@ -1530,9 +1166,116 @@ char * OS_nativeFunctionNames[] = {
"pangoFontFaceNewProc_1CALLBACK",
"pangoFontFamilyNewProc_1CALLBACK",
"pangoLayoutNewProc_1CALLBACK",
+ "pango_1attr_1background_1new",
+ "pango_1attr_1font_1desc_1new",
+ "pango_1attr_1foreground_1new",
+ "pango_1attr_1iterator_1destroy",
+ "pango_1attr_1iterator_1get",
+ "pango_1attr_1iterator_1next",
+ "pango_1attr_1iterator_1range",
+ "pango_1attr_1list_1get_1iterator",
+ "pango_1attr_1list_1insert",
+ "pango_1attr_1list_1new",
+ "pango_1attr_1list_1unref",
+ "pango_1attr_1rise_1new",
+ "pango_1attr_1shape_1new",
+ "pango_1attr_1strikethrough_1color_1new",
+ "pango_1attr_1strikethrough_1new",
+ "pango_1attr_1underline_1color_1new",
+ "pango_1attr_1underline_1new",
+ "pango_1attr_1weight_1new",
+ "pango_1attribute_1copy",
+ "pango_1cairo_1context_1get_1font_1options",
+ "pango_1cairo_1context_1set_1font_1options",
+ "pango_1cairo_1create_1layout",
+ "pango_1cairo_1font_1map_1get_1default",
+ "pango_1cairo_1layout_1path",
+ "pango_1cairo_1show_1layout",
+ "pango_1context_1get_1base_1dir",
+ "pango_1context_1get_1language",
+ "pango_1context_1get_1metrics",
+ "pango_1context_1list_1families",
+ "pango_1context_1set_1base_1dir",
+ "pango_1context_1set_1language",
+ "pango_1font_1description_1copy",
+ "pango_1font_1description_1free",
+ "pango_1font_1description_1from_1string",
+ "pango_1font_1description_1get_1family",
+ "pango_1font_1description_1get_1set_1fields",
+ "pango_1font_1description_1get_1size",
+ "pango_1font_1description_1get_1stretch",
+ "pango_1font_1description_1get_1style",
+ "pango_1font_1description_1get_1variant",
+ "pango_1font_1description_1get_1weight",
+ "pango_1font_1description_1new",
+ "pango_1font_1description_1set_1family",
+ "pango_1font_1description_1set_1size",
+ "pango_1font_1description_1set_1stretch",
+ "pango_1font_1description_1set_1style",
+ "pango_1font_1description_1set_1variant",
+ "pango_1font_1description_1set_1weight",
+ "pango_1font_1description_1to_1string",
+ "pango_1font_1face_1describe",
+ "pango_1font_1family_1get_1name",
+ "pango_1font_1family_1list_1faces",
+ "pango_1font_1map_1create_1context",
+ "pango_1font_1metrics_1get_1approximate_1char_1width",
+ "pango_1font_1metrics_1get_1ascent",
+ "pango_1font_1metrics_1get_1descent",
+ "pango_1font_1metrics_1unref",
+ "pango_1layout_1context_1changed",
+ "pango_1layout_1get_1alignment",
+ "pango_1layout_1get_1context",
+ "pango_1layout_1get_1indent",
+ "pango_1layout_1get_1iter",
+ "pango_1layout_1get_1justify",
+ "pango_1layout_1get_1line",
+ "pango_1layout_1get_1line_1count",
+ "pango_1layout_1get_1log_1attrs",
+ "pango_1layout_1get_1pixel_1size",
+ "pango_1layout_1get_1size",
+ "pango_1layout_1get_1spacing",
+ "pango_1layout_1get_1text",
+ "pango_1layout_1get_1width",
+ "pango_1layout_1index_1to_1pos",
+ "pango_1layout_1iter_1free",
+ "pango_1layout_1iter_1get_1index",
+ "pango_1layout_1iter_1get_1line_1extents",
+ "pango_1layout_1iter_1get_1run",
+ "pango_1layout_1iter_1next_1line",
+ "pango_1layout_1iter_1next_1run",
+ "pango_1layout_1line_1get_1extents",
+ "pango_1layout_1new",
+ "pango_1layout_1set_1alignment",
+ "pango_1layout_1set_1attributes",
+ "pango_1layout_1set_1auto_1dir",
+ "pango_1layout_1set_1font_1description",
+ "pango_1layout_1set_1indent",
+ "pango_1layout_1set_1justify",
+ "pango_1layout_1set_1single_1paragraph_1mode",
+ "pango_1layout_1set_1spacing",
+ "pango_1layout_1set_1tabs",
+ "pango_1layout_1set_1text",
+ "pango_1layout_1set_1width",
+ "pango_1layout_1set_1wrap",
+ "pango_1layout_1xy_1to_1index",
+ "pango_1tab_1array_1free",
+ "pango_1tab_1array_1new",
+ "pango_1tab_1array_1set_1tab",
"printerOptionWidgetNewProc_1CALLBACK",
"realpath",
"strcmp",
+ "swt_1debug_1on_1fatal_1warnings",
+ "swt_1fixed_1accessible_1get_1type",
+ "swt_1fixed_1accessible_1register_1accessible",
+ "swt_1fixed_1add",
+ "swt_1fixed_1get_1type",
+ "swt_1fixed_1move",
+ "swt_1fixed_1remove",
+ "swt_1fixed_1resize",
+ "swt_1fixed_1restack",
+ "swt_1set_1lock_1functions",
+ "ubuntu_1menu_1proxy_1get",
};
#define NATIVE_FUNCTION_COUNT sizeof(OS_nativeFunctionNames) / sizeof(char*)
int OS_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index 5145d14c27..057048bff8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2022 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -35,245 +35,225 @@ typedef enum {
GDK_1EVENT_1TYPE_FUNC,
GDK_1EVENT_1WINDOW_FUNC,
GDK_1IS_1X11_1DISPLAY_FUNC,
- GdkEventAny_1sizeof_FUNC,
- GdkEventButton_1sizeof_FUNC,
- GdkEventCrossing_1sizeof_FUNC,
- GdkEventFocus_1sizeof_FUNC,
- GdkEventKey_1sizeof_FUNC,
- GdkEventMotion_1sizeof_FUNC,
- GdkEventWindowState_1sizeof_FUNC,
- GdkEvent_1sizeof_FUNC,
- GdkGeometry_1sizeof_FUNC,
+ GDK_1TYPE_1PIXBUF_FUNC,
+ GDK_1TYPE_1RGBA_FUNC,
GdkKeymapKey_1sizeof_FUNC,
GdkRGBA_1sizeof_FUNC,
GdkRectangle_1sizeof_FUNC,
- GdkWindowAttr_1sizeof_FUNC,
- _1GDK_1TYPE_1PIXBUF_FUNC,
- _1GDK_1TYPE_1RGBA_FUNC,
- _1gdk_1atom_1intern_FUNC,
- _1gdk_1atom_1name_FUNC,
- _1gdk_1cairo_1create_FUNC,
- _1gdk_1cairo_1get_1clip_1rectangle_FUNC,
- _1gdk_1cairo_1region_FUNC,
- _1gdk_1cairo_1region_1create_1from_1surface_FUNC,
- _1gdk_1cairo_1set_1source_1pixbuf_FUNC,
- _1gdk_1cairo_1set_1source_1rgba_FUNC,
- _1gdk_1cairo_1set_1source_1window_FUNC,
- _1gdk_1clipboard_1set_1content_FUNC,
- _1gdk_1cursor_1new_1for_1display_FUNC,
- _1gdk_1cursor_1new_1from_1name__J_3B_FUNC,
- _1gdk_1cursor_1new_1from_1name___3BJ_FUNC,
- _1gdk_1cursor_1new_1from_1pixbuf_FUNC,
- _1gdk_1cursor_1new_1from_1texture_FUNC,
- _1gdk_1device_1get_1associated_1device_FUNC,
- _1gdk_1device_1get_1seat_FUNC,
- _1gdk_1device_1get_1surface_1at_1position_FUNC,
- _1gdk_1device_1get_1window_1at_1position_FUNC,
- _1gdk_1device_1grab_FUNC,
- _1gdk_1device_1manager_1get_1client_1pointer_FUNC,
- _1gdk_1device_1ungrab_FUNC,
- _1gdk_1device_1warp__JII_FUNC,
- _1gdk_1device_1warp__JJII_FUNC,
- _1gdk_1display_1beep_FUNC,
- _1gdk_1display_1get_1clipboard_FUNC,
- _1gdk_1display_1get_1default_FUNC,
- _1gdk_1display_1get_1default_1group_FUNC,
- _1gdk_1display_1get_1default_1seat_FUNC,
- _1gdk_1display_1get_1device_1manager_FUNC,
- _1gdk_1display_1get_1keymap_FUNC,
- _1gdk_1display_1get_1monitor_FUNC,
- _1gdk_1display_1get_1monitor_1at_1point_FUNC,
- _1gdk_1display_1get_1monitor_1at_1surface_FUNC,
- _1gdk_1display_1get_1monitor_1at_1window_FUNC,
- _1gdk_1display_1get_1n_1monitors_FUNC,
- _1gdk_1display_1get_1primary_1clipboard_FUNC,
- _1gdk_1display_1get_1primary_1monitor_FUNC,
- _1gdk_1display_1is_1composited_FUNC,
- _1gdk_1display_1peek_1event_FUNC,
- _1gdk_1display_1put_1event_FUNC,
- _1gdk_1display_1supports_1cursor_1color_FUNC,
- _1gdk_1drag_1context_1get_1actions_FUNC,
- _1gdk_1drag_1context_1get_1dest_1window_FUNC,
- _1gdk_1drag_1context_1get_1selected_1action_FUNC,
- _1gdk_1drag_1context_1list_1targets_FUNC,
- _1gdk_1drag_1status_FUNC,
- _1gdk_1drawing_1context_1get_1cairo_1context_FUNC,
- _1gdk_1event_1copy_FUNC,
- _1gdk_1event_1free_FUNC,
- _1gdk_1event_1get_FUNC,
- _1gdk_1event_1get_1button_FUNC,
- _1gdk_1event_1get_1coords_FUNC,
- _1gdk_1event_1get_1crossing_1mode_FUNC,
- _1gdk_1event_1get_1event_1type_FUNC,
- _1gdk_1event_1get_1focus_1in_FUNC,
- _1gdk_1event_1get_1key_1group_FUNC,
- _1gdk_1event_1get_1keycode_FUNC,
- _1gdk_1event_1get_1keyval_FUNC,
- _1gdk_1event_1get_1root_1coords_FUNC,
- _1gdk_1event_1get_1scroll_1deltas_FUNC,
- _1gdk_1event_1get_1scroll_1direction_FUNC,
- _1gdk_1event_1get_1seat_FUNC,
- _1gdk_1event_1get_1state_FUNC,
- _1gdk_1event_1get_1string_FUNC,
- _1gdk_1event_1get_1surface_FUNC,
- _1gdk_1event_1get_1time_FUNC,
- _1gdk_1event_1get_1window_FUNC,
- _1gdk_1event_1handler_1set_FUNC,
- _1gdk_1event_1new_FUNC,
- _1gdk_1event_1peek_FUNC,
- _1gdk_1event_1put_FUNC,
- _1gdk_1event_1set_1device_FUNC,
- _1gdk_1get_1default_1root_1window_FUNC,
- _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC,
- _1gdk_1keymap_1get_1for_1display_FUNC,
- _1gdk_1keymap_1translate_1keyboard_1state_FUNC,
- _1gdk_1keyval_1to_1lower_FUNC,
- _1gdk_1keyval_1to_1unicode_FUNC,
- _1gdk_1monitor_1get_1geometry_FUNC,
- _1gdk_1monitor_1get_1scale_1factor_FUNC,
- _1gdk_1monitor_1get_1width_1mm_FUNC,
- _1gdk_1monitor_1get_1workarea_FUNC,
- _1gdk_1pango_1context_1get_FUNC,
- _1gdk_1pango_1layout_1get_1clip_1region_FUNC,
- _1gdk_1pixbuf_1animation_1get_1iter_FUNC,
- _1gdk_1pixbuf_1animation_1get_1static_1image_FUNC,
- _1gdk_1pixbuf_1animation_1is_1static_1image_FUNC,
- _1gdk_1pixbuf_1animation_1iter_1advance_FUNC,
- _1gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC,
- _1gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC,
- _1gdk_1pixbuf_1copy_FUNC,
- _1gdk_1pixbuf_1copy_1area_FUNC,
- _1gdk_1pixbuf_1format_1get_1name_FUNC,
- _1gdk_1pixbuf_1get_1bits_1per_1sample_FUNC,
- _1gdk_1pixbuf_1get_1byte_1length_FUNC,
- _1gdk_1pixbuf_1get_1has_1alpha_FUNC,
- _1gdk_1pixbuf_1get_1height_FUNC,
- _1gdk_1pixbuf_1get_1n_1channels_FUNC,
- _1gdk_1pixbuf_1get_1pixels_FUNC,
- _1gdk_1pixbuf_1get_1rowstride_FUNC,
- _1gdk_1pixbuf_1get_1width_FUNC,
- _1gdk_1pixbuf_1loader_1close_FUNC,
- _1gdk_1pixbuf_1loader_1get_1animation_FUNC,
- _1gdk_1pixbuf_1loader_1get_1format_FUNC,
- _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC,
- _1gdk_1pixbuf_1loader_1new_FUNC,
- _1gdk_1pixbuf_1loader_1write_FUNC,
- _1gdk_1pixbuf_1new_FUNC,
- _1gdk_1pixbuf_1new_1from_1data_FUNC,
- _1gdk_1pixbuf_1new_1from_1file_FUNC,
- _1gdk_1pixbuf_1save_1to_1bufferv_FUNC,
- _1gdk_1pixbuf_1scale_1simple_FUNC,
- _1gdk_1property_1get_FUNC,
- _1gdk_1rgba_1free_FUNC,
- _1gdk_1rgba_1hash_FUNC,
- _1gdk_1rgba_1parse_FUNC,
- _1gdk_1rgba_1to_1string_FUNC,
- _1gdk_1screen_1get_1default_FUNC,
- _1gdk_1screen_1get_1monitor_1at_1point_FUNC,
- _1gdk_1screen_1get_1monitor_1at_1window_FUNC,
- _1gdk_1screen_1get_1monitor_1geometry_FUNC,
- _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC,
- _1gdk_1screen_1get_1monitor_1workarea_FUNC,
- _1gdk_1screen_1get_1n_1monitors_FUNC,
- _1gdk_1screen_1get_1primary_1monitor_FUNC,
- _1gdk_1screen_1get_1resolution_FUNC,
- _1gdk_1screen_1get_1system_1visual_FUNC,
- _1gdk_1screen_1height_FUNC,
- _1gdk_1screen_1is_1composited_FUNC,
- _1gdk_1screen_1width_FUNC,
- _1gdk_1seat_1get_1keyboard_FUNC,
- _1gdk_1seat_1get_1pointer_FUNC,
- _1gdk_1seat_1grab_FUNC,
- _1gdk_1seat_1ungrab_FUNC,
- _1gdk_1selection_1owner_1get_FUNC,
- _1gdk_1selection_1owner_1set_FUNC,
- _1gdk_1set_1program_1class_FUNC,
- _1gdk_1surface_1create_1similar_1surface_FUNC,
- _1gdk_1surface_1destroy_FUNC,
- _1gdk_1surface_1focus_FUNC,
- _1gdk_1surface_1get_1children_FUNC,
- _1gdk_1surface_1get_1device_1position_FUNC,
- _1gdk_1surface_1get_1display_FUNC,
- _1gdk_1surface_1get_1frame_1extents_FUNC,
- _1gdk_1surface_1get_1height_FUNC,
- _1gdk_1surface_1get_1origin_FUNC,
- _1gdk_1surface_1get_1root_1origin_FUNC,
- _1gdk_1surface_1get_1state_FUNC,
- _1gdk_1surface_1get_1user_1data_FUNC,
- _1gdk_1surface_1get_1width_FUNC,
- _1gdk_1surface_1hide_FUNC,
- _1gdk_1surface_1invalidate_1rect_FUNC,
- _1gdk_1surface_1invalidate_1region_FUNC,
- _1gdk_1surface_1lower_FUNC,
- _1gdk_1surface_1move_FUNC,
- _1gdk_1surface_1move_1resize_FUNC,
- _1gdk_1surface_1new_1child_FUNC,
- _1gdk_1surface_1raise_FUNC,
- _1gdk_1surface_1resize_FUNC,
- _1gdk_1surface_1restack_FUNC,
- _1gdk_1surface_1set_1cursor_FUNC,
- _1gdk_1surface_1set_1decorations_FUNC,
- _1gdk_1surface_1set_1functions_FUNC,
- _1gdk_1surface_1set_1user_1data_FUNC,
- _1gdk_1surface_1show_FUNC,
- _1gdk_1surface_1show_1unraised_FUNC,
- _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC,
- _1gdk_1texture_1new_1for_1pixbuf_FUNC,
- _1gdk_1unicode_1to_1keyval_FUNC,
- _1gdk_1utf8_1to_1string_1target_FUNC,
- _1gdk_1visual_1get_1depth_FUNC,
- _1gdk_1window_1begin_1draw_1frame_FUNC,
- _1gdk_1window_1create_1similar_1surface_FUNC,
- _1gdk_1window_1destroy_FUNC,
- _1gdk_1window_1end_1draw_1frame_FUNC,
- _1gdk_1window_1focus_FUNC,
- _1gdk_1window_1get_1children_FUNC,
- _1gdk_1window_1get_1device_1position_FUNC,
- _1gdk_1window_1get_1display_FUNC,
- _1gdk_1window_1get_1events_FUNC,
- _1gdk_1window_1get_1frame_1extents_FUNC,
- _1gdk_1window_1get_1height_FUNC,
- _1gdk_1window_1get_1origin_FUNC,
- _1gdk_1window_1get_1parent_FUNC,
- _1gdk_1window_1get_1root_1origin_FUNC,
- _1gdk_1window_1get_1state_FUNC,
- _1gdk_1window_1get_1user_1data_FUNC,
- _1gdk_1window_1get_1visible_1region_FUNC,
- _1gdk_1window_1get_1width_FUNC,
- _1gdk_1window_1hide_FUNC,
- _1gdk_1window_1invalidate_1rect_FUNC,
- _1gdk_1window_1invalidate_1region_FUNC,
- _1gdk_1window_1lower_FUNC,
- _1gdk_1window_1move_FUNC,
- _1gdk_1window_1move_1resize_FUNC,
- _1gdk_1window_1new_FUNC,
- _1gdk_1window_1process_1all_1updates_FUNC,
- _1gdk_1window_1process_1updates_FUNC,
- _1gdk_1window_1raise_FUNC,
- _1gdk_1window_1resize_FUNC,
- _1gdk_1window_1restack_FUNC,
- _1gdk_1window_1set_1background_1pattern_FUNC,
- _1gdk_1window_1set_1cursor_FUNC,
- _1gdk_1window_1set_1decorations_FUNC,
- _1gdk_1window_1set_1events_FUNC,
- _1gdk_1window_1set_1functions_FUNC,
- _1gdk_1window_1set_1override_1redirect_FUNC,
- _1gdk_1window_1set_1user_1data_FUNC,
- _1gdk_1window_1show_FUNC,
- _1gdk_1window_1show_1unraised_FUNC,
- _1gdk_1x11_1display_1error_1trap_1pop_1ignored_FUNC,
- _1gdk_1x11_1display_1error_1trap_1push_FUNC,
- _1gdk_1x11_1display_1get_1xdisplay_FUNC,
- _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC,
- _1gdk_1x11_1get_1default_1xdisplay_FUNC,
- _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC,
- _1gdk_1x11_1screen_1lookup_1visual_FUNC,
- _1gdk_1x11_1surface_1get_1xid_FUNC,
- _1gdk_1x11_1surface_1lookup_1for_1display_FUNC,
- _1gdk_1x11_1visual_1get_1xvisual_FUNC,
- _1gdk_1x11_1window_1get_1xid_FUNC,
- _1gdk_1x11_1window_1lookup_1for_1display_FUNC,
+ gdk_1atom_1intern_FUNC,
+ gdk_1atom_1name_FUNC,
+ gdk_1button_1event_1get_1button_FUNC,
+ gdk_1cairo_1create_FUNC,
+ gdk_1cairo_1get_1clip_1rectangle_FUNC,
+ gdk_1cairo_1region_FUNC,
+ gdk_1cairo_1region_1create_1from_1surface_FUNC,
+ gdk_1cairo_1set_1source_1pixbuf_FUNC,
+ gdk_1cairo_1set_1source_1rgba_FUNC,
+ gdk_1cairo_1set_1source_1window_FUNC,
+ gdk_1clipboard_1set_1content_FUNC,
+ gdk_1crossing_1event_1get_1mode_FUNC,
+ gdk_1cursor_1new_1from_1name__JLjava_lang_String_2_FUNC,
+ gdk_1cursor_1new_1from_1name__Ljava_lang_String_2J_FUNC,
+ gdk_1cursor_1new_1from_1pixbuf_FUNC,
+ gdk_1cursor_1new_1from_1texture_FUNC,
+ gdk_1device_1get_1associated_1device_FUNC,
+ gdk_1device_1get_1seat_FUNC,
+ gdk_1device_1get_1surface_1at_1position_FUNC,
+ gdk_1device_1get_1window_1at_1position_FUNC,
+ gdk_1device_1warp_FUNC,
+ gdk_1display_1beep_FUNC,
+ gdk_1display_1get_1clipboard_FUNC,
+ gdk_1display_1get_1default_FUNC,
+ gdk_1display_1get_1default_1group_FUNC,
+ gdk_1display_1get_1default_1seat_FUNC,
+ gdk_1display_1get_1monitor_FUNC,
+ gdk_1display_1get_1monitor_1at_1point_FUNC,
+ gdk_1display_1get_1monitor_1at_1surface_FUNC,
+ gdk_1display_1get_1monitor_1at_1window_FUNC,
+ gdk_1display_1get_1monitors_FUNC,
+ gdk_1display_1get_1n_1monitors_FUNC,
+ gdk_1display_1get_1primary_1clipboard_FUNC,
+ gdk_1display_1get_1primary_1monitor_FUNC,
+ gdk_1display_1is_1composited_FUNC,
+ gdk_1display_1map_1keyval_FUNC,
+ gdk_1display_1put_1event_FUNC,
+ gdk_1display_1supports_1cursor_1color_FUNC,
+ gdk_1drag_1context_1get_1actions_FUNC,
+ gdk_1drag_1context_1get_1dest_1window_FUNC,
+ gdk_1drag_1context_1get_1selected_1action_FUNC,
+ gdk_1drag_1context_1list_1targets_FUNC,
+ gdk_1drag_1status_FUNC,
+ gdk_1event_1copy_FUNC,
+ gdk_1event_1free_FUNC,
+ gdk_1event_1get_FUNC,
+ gdk_1event_1get_1button_FUNC,
+ gdk_1event_1get_1coords_FUNC,
+ gdk_1event_1get_1event_1type_FUNC,
+ gdk_1event_1get_1keycode_FUNC,
+ gdk_1event_1get_1keyval_FUNC,
+ gdk_1event_1get_1modifier_1state_FUNC,
+ gdk_1event_1get_1position_FUNC,
+ gdk_1event_1get_1root_1coords_FUNC,
+ gdk_1event_1get_1scroll_1deltas_FUNC,
+ gdk_1event_1get_1scroll_1direction_FUNC,
+ gdk_1event_1get_1seat_FUNC,
+ gdk_1event_1get_1state_FUNC,
+ gdk_1event_1get_1surface_FUNC,
+ gdk_1event_1get_1time_FUNC,
+ gdk_1event_1get_1window_FUNC,
+ gdk_1event_1handler_1set_FUNC,
+ gdk_1event_1new_FUNC,
+ gdk_1event_1peek_FUNC,
+ gdk_1event_1put_FUNC,
+ gdk_1event_1ref_FUNC,
+ gdk_1event_1set_1device_FUNC,
+ gdk_1event_1unref_FUNC,
+ gdk_1focus_1event_1get_1in_FUNC,
+ gdk_1get_1default_1root_1window_FUNC,
+ gdk_1key_1event_1get_1keycode_FUNC,
+ gdk_1key_1event_1get_1keyval_FUNC,
+ gdk_1key_1event_1get_1layout_FUNC,
+ gdk_1keymap_1get_1entries_1for_1keyval_FUNC,
+ gdk_1keymap_1get_1for_1display_FUNC,
+ gdk_1keymap_1translate_1keyboard_1state_FUNC,
+ gdk_1keyval_1name_FUNC,
+ gdk_1keyval_1to_1lower_FUNC,
+ gdk_1keyval_1to_1unicode_FUNC,
+ gdk_1monitor_1get_1geometry_FUNC,
+ gdk_1monitor_1get_1scale_1factor_FUNC,
+ gdk_1monitor_1get_1workarea_FUNC,
+ gdk_1pango_1context_1get_FUNC,
+ gdk_1pango_1layout_1get_1clip_1region_FUNC,
+ gdk_1pixbuf_1animation_1get_1iter_FUNC,
+ gdk_1pixbuf_1animation_1get_1static_1image_FUNC,
+ gdk_1pixbuf_1animation_1is_1static_1image_FUNC,
+ gdk_1pixbuf_1animation_1iter_1advance_FUNC,
+ gdk_1pixbuf_1animation_1iter_1get_1delay_1time_FUNC,
+ gdk_1pixbuf_1animation_1iter_1get_1pixbuf_FUNC,
+ gdk_1pixbuf_1copy_FUNC,
+ gdk_1pixbuf_1copy_1area_FUNC,
+ gdk_1pixbuf_1format_1get_1name_FUNC,
+ gdk_1pixbuf_1get_1bits_1per_1sample_FUNC,
+ gdk_1pixbuf_1get_1from_1surface_FUNC,
+ gdk_1pixbuf_1get_1from_1texture_FUNC,
+ gdk_1pixbuf_1get_1from_1window_FUNC,
+ gdk_1pixbuf_1get_1has_1alpha_FUNC,
+ gdk_1pixbuf_1get_1height_FUNC,
+ gdk_1pixbuf_1get_1n_1channels_FUNC,
+ gdk_1pixbuf_1get_1pixels_FUNC,
+ gdk_1pixbuf_1get_1rowstride_FUNC,
+ gdk_1pixbuf_1get_1width_FUNC,
+ gdk_1pixbuf_1loader_1close_FUNC,
+ gdk_1pixbuf_1loader_1get_1animation_FUNC,
+ gdk_1pixbuf_1loader_1get_1format_FUNC,
+ gdk_1pixbuf_1loader_1get_1pixbuf_FUNC,
+ gdk_1pixbuf_1loader_1new_FUNC,
+ gdk_1pixbuf_1loader_1write_FUNC,
+ gdk_1pixbuf_1new_FUNC,
+ gdk_1pixbuf_1new_1from_1data_FUNC,
+ gdk_1pixbuf_1new_1from_1file_FUNC,
+ gdk_1pixbuf_1save_1to_1bufferv_FUNC,
+ gdk_1pixbuf_1scale_1simple_FUNC,
+ gdk_1popup_1get_1parent_FUNC,
+ gdk_1popup_1layout_1new_FUNC,
+ gdk_1popup_1present_FUNC,
+ gdk_1property_1get_FUNC,
+ gdk_1rgba_1free_FUNC,
+ gdk_1rgba_1parse_FUNC,
+ gdk_1rgba_1to_1string_FUNC,
+ gdk_1screen_1get_1default_FUNC,
+ gdk_1screen_1get_1monitor_1at_1point_FUNC,
+ gdk_1screen_1get_1monitor_1at_1window_FUNC,
+ gdk_1screen_1get_1monitor_1geometry_FUNC,
+ gdk_1screen_1get_1monitor_1scale_1factor_FUNC,
+ gdk_1screen_1get_1monitor_1workarea_FUNC,
+ gdk_1screen_1get_1n_1monitors_FUNC,
+ gdk_1screen_1get_1primary_1monitor_FUNC,
+ gdk_1screen_1get_1resolution_FUNC,
+ gdk_1screen_1get_1system_1visual_FUNC,
+ gdk_1screen_1height_FUNC,
+ gdk_1screen_1is_1composited_FUNC,
+ gdk_1screen_1width_FUNC,
+ gdk_1scroll_1event_1get_1deltas_FUNC,
+ gdk_1scroll_1event_1get_1direction_FUNC,
+ gdk_1seat_1get_1keyboard_FUNC,
+ gdk_1seat_1get_1pointer_FUNC,
+ gdk_1seat_1grab_FUNC,
+ gdk_1seat_1ungrab_FUNC,
+ gdk_1selection_1owner_1get_FUNC,
+ gdk_1selection_1owner_1set_FUNC,
+ gdk_1set_1program_1class_FUNC,
+ gdk_1surface_1create_1similar_1surface_FUNC,
+ gdk_1surface_1destroy_FUNC,
+ gdk_1surface_1get_1device_1position_FUNC,
+ gdk_1surface_1get_1display_FUNC,
+ gdk_1surface_1get_1height_FUNC,
+ gdk_1surface_1get_1width_FUNC,
+ gdk_1surface_1hide_FUNC,
+ gdk_1surface_1new_1popup_FUNC,
+ gdk_1surface_1new_1toplevel_FUNC,
+ gdk_1surface_1set_1cursor_FUNC,
+ gdk_1surface_1set_1input_1region_FUNC,
+ gdk_1surface_1set_1opaque_1region_FUNC,
+ gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC,
+ gdk_1texture_1new_1for_1pixbuf_FUNC,
+ gdk_1texture_1new_1from_1file_FUNC,
+ gdk_1threads_1add_1idle_FUNC,
+ gdk_1threads_1add_1timeout_FUNC,
+ gdk_1threads_1enter_FUNC,
+ gdk_1threads_1init_FUNC,
gdk_1threads_1leave_FUNC,
+ gdk_1toplevel_1layout_1new_FUNC,
+ gdk_1toplevel_1present_FUNC,
+ gdk_1unicode_1to_1keyval_FUNC,
+ gdk_1utf8_1to_1string_1target_FUNC,
+ gdk_1visual_1get_1depth_FUNC,
+ gdk_1window_1create_1similar_1surface_FUNC,
+ gdk_1window_1destroy_FUNC,
+ gdk_1window_1focus_FUNC,
+ gdk_1window_1get_1children_FUNC,
+ gdk_1window_1get_1device_1position_FUNC,
+ gdk_1window_1get_1display_FUNC,
+ gdk_1window_1get_1events_FUNC,
+ gdk_1window_1get_1frame_1extents_FUNC,
+ gdk_1window_1get_1height_FUNC,
+ gdk_1window_1get_1origin_FUNC,
+ gdk_1window_1get_1parent_FUNC,
+ gdk_1window_1get_1root_1origin_FUNC,
+ gdk_1window_1get_1state_FUNC,
+ gdk_1window_1get_1user_1data_FUNC,
+ gdk_1window_1get_1visible_1region_FUNC,
+ gdk_1window_1get_1width_FUNC,
+ gdk_1window_1hide_FUNC,
+ gdk_1window_1invalidate_1rect_FUNC,
+ gdk_1window_1invalidate_1region_FUNC,
+ gdk_1window_1lower_FUNC,
+ gdk_1window_1move_FUNC,
+ gdk_1window_1move_1resize_FUNC,
+ gdk_1window_1raise_FUNC,
+ gdk_1window_1resize_FUNC,
+ gdk_1window_1restack_FUNC,
+ gdk_1window_1set_1background_1pattern_FUNC,
+ gdk_1window_1set_1cursor_FUNC,
+ gdk_1window_1set_1decorations_FUNC,
+ gdk_1window_1set_1events_FUNC,
+ gdk_1window_1set_1functions_FUNC,
+ gdk_1window_1set_1override_1redirect_FUNC,
+ gdk_1window_1set_1user_1data_FUNC,
+ gdk_1window_1show_FUNC,
+ gdk_1window_1show_1unraised_FUNC,
+ gdk_1x11_1display_1error_1trap_1pop_1ignored_FUNC,
+ gdk_1x11_1display_1error_1trap_1push_FUNC,
+ gdk_1x11_1display_1get_1default_1group_FUNC,
+ gdk_1x11_1display_1get_1xdisplay_FUNC,
+ gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC,
+ gdk_1x11_1get_1default_1xdisplay_FUNC,
+ gdk_1x11_1screen_1get_1window_1manager_1name_FUNC,
+ gdk_1x11_1screen_1lookup_1visual_FUNC,
+ gdk_1x11_1surface_1get_1xid_FUNC,
+ gdk_1x11_1surface_1lookup_1for_1display_FUNC,
+ gdk_1x11_1window_1get_1xid_FUNC,
+ gdk_1x11_1window_1lookup_1for_1display_FUNC,
} GDK_FUNCS;
#ifdef NATIVE_STATS
extern int GTK_nativeFunctionCount;
@@ -291,7 +271,26 @@ extern char* GTK_nativeFunctionNames[];
#endif
typedef enum {
+ GET_1FUNCTION_1POINTER_1gtk_1false_FUNC,
+ GTK_1IS_1ACCEL_1LABEL_FUNC,
+ GTK_1IS_1BOX_FUNC,
+ GTK_1IS_1BUTTON_FUNC,
+ GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC,
+ GTK_1IS_1CELL_1RENDERER_1TEXT_FUNC,
+ GTK_1IS_1CELL_1RENDERER_1TOGGLE_FUNC,
+ GTK_1IS_1CONTAINER_FUNC,
+ GTK_1IS_1IM_1CONTEXT_FUNC,
+ GTK_1IS_1LABEL_FUNC,
+ GTK_1IS_1PLUG_FUNC,
+ GTK_1IS_1SCROLLED_1WINDOW_FUNC,
+ GTK_1IS_1WINDOW_FUNC,
+ GTK_1TYPE_1CELL_1RENDERER_1PIXBUF_FUNC,
+ GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC,
+ GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC,
+ GTK_1TYPE_1IM_1MULTICONTEXT_FUNC,
GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC,
+ GTK_1TYPE_1WIDGET_FUNC,
+ GTK_1TYPE_1WINDOW_FUNC,
GTK_1WIDGET_1GET_1CLASS_FUNC,
GtkAllocation_1sizeof_FUNC,
GtkBorder_1sizeof_FUNC,
@@ -302,776 +301,528 @@ typedef enum {
GtkCellRendererToggleClass_1sizeof_FUNC,
GtkCellRendererToggle_1sizeof_FUNC,
GtkRequisition_1sizeof_FUNC,
- GtkTargetEntry_1sizeof_FUNC,
GtkTextIter_1sizeof_FUNC,
GtkTreeIter_1sizeof_FUNC,
- _1GET_1FUNCTION_1POINTER_1gtk_1false_FUNC,
- _1GTK_1ACCESSIBLE_FUNC,
- _1GTK_1IS_1ACCEL_1LABEL_FUNC,
- _1GTK_1IS_1BUTTON_FUNC,
- _1GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC,
- _1GTK_1IS_1CELL_1RENDERER_1TEXT_FUNC,
- _1GTK_1IS_1CELL_1RENDERER_1TOGGLE_FUNC,
- _1GTK_1IS_1CONTAINER_FUNC,
- _1GTK_1IS_1IM_1CONTEXT_FUNC,
- _1GTK_1IS_1LABEL_FUNC,
- _1GTK_1IS_1MENU_1ITEM_FUNC,
- _1GTK_1IS_1PLUG_FUNC,
- _1GTK_1IS_1SCROLLED_1WINDOW_FUNC,
- _1GTK_1IS_1WINDOW_FUNC,
- _1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF_FUNC,
- _1GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC,
- _1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC,
- _1GTK_1TYPE_1IM_1MULTICONTEXT_FUNC,
- _1GTK_1TYPE_1MENU_FUNC,
- _1GTK_1TYPE_1WIDGET_FUNC,
- _1GTK_1TYPE_1WINDOW_FUNC,
- _1gtk_1accel_1group_1new_FUNC,
- _1gtk_1accel_1label_1new_FUNC,
- _1gtk_1accel_1label_1set_1accel_FUNC,
- _1gtk_1accel_1label_1set_1accel_1widget_FUNC,
- _1gtk_1accelerator_1get_1default_1mod_1mask_FUNC,
- _1gtk_1accelerator_1parse_FUNC,
- _1gtk_1accessible_1get_1widget_FUNC,
- _1gtk_1adjustment_1configure_FUNC,
- _1gtk_1adjustment_1get_1lower_FUNC,
- _1gtk_1adjustment_1get_1page_1increment_FUNC,
- _1gtk_1adjustment_1get_1page_1size_FUNC,
- _1gtk_1adjustment_1get_1step_1increment_FUNC,
- _1gtk_1adjustment_1get_1upper_FUNC,
- _1gtk_1adjustment_1get_1value_FUNC,
- _1gtk_1adjustment_1new_FUNC,
- _1gtk_1adjustment_1set_1page_1increment_FUNC,
- _1gtk_1adjustment_1set_1step_1increment_FUNC,
- _1gtk_1adjustment_1set_1value_FUNC,
- _1gtk_1adjustment_1value_1changed_FUNC,
- _1gtk_1bin_1get_1child_FUNC,
- _1gtk_1border_1free_FUNC,
- _1gtk_1box_1new_FUNC,
- _1gtk_1box_1pack_1end__JJ_FUNC,
- _1gtk_1box_1pack_1end__JJZZI_FUNC,
- _1gtk_1box_1reorder_1child_FUNC,
- _1gtk_1box_1set_1child_1packing__JJI_FUNC,
- _1gtk_1box_1set_1child_1packing__JJZZII_FUNC,
- _1gtk_1box_1set_1homogeneous_FUNC,
- _1gtk_1box_1set_1spacing_FUNC,
- _1gtk_1button_1clicked_FUNC,
- _1gtk_1button_1new_FUNC,
- _1gtk_1button_1set_1image_FUNC,
- _1gtk_1calendar_1clear_1marks_FUNC,
- _1gtk_1calendar_1get_1date_FUNC,
- _1gtk_1calendar_1mark_1day_FUNC,
- _1gtk_1calendar_1new_FUNC,
- _1gtk_1calendar_1select_1day_FUNC,
- _1gtk_1calendar_1select_1month_FUNC,
- _1gtk_1calendar_1set_1display_1options_FUNC,
- _1gtk_1cell_1layout_1clear_FUNC,
- _1gtk_1cell_1layout_1get_1cells_FUNC,
- _1gtk_1cell_1layout_1pack_1start_FUNC,
- _1gtk_1cell_1layout_1set_1attributes_FUNC,
- _1gtk_1cell_1renderer_1get_1fixed_1size_FUNC,
- _1gtk_1cell_1renderer_1get_1padding_FUNC,
- _1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC,
- _1gtk_1cell_1renderer_1get_1preferred_1size_FUNC,
- _1gtk_1cell_1renderer_1pixbuf_1new_FUNC,
- _1gtk_1cell_1renderer_1set_1fixed_1size_FUNC,
- _1gtk_1cell_1renderer_1text_1new_FUNC,
- _1gtk_1cell_1renderer_1toggle_1new_FUNC,
- _1gtk_1cell_1view_1set_1fit_1model_FUNC,
- _1gtk_1check_1button_1new_FUNC,
- _1gtk_1check_1menu_1item_1get_1active_FUNC,
- _1gtk_1check_1menu_1item_1new_FUNC,
- _1gtk_1check_1menu_1item_1set_1active_FUNC,
- _1gtk_1check_1version_FUNC,
- _1gtk_1clipboard_1clear_FUNC,
- _1gtk_1clipboard_1get_FUNC,
- _1gtk_1clipboard_1set_1can_1store_FUNC,
- _1gtk_1clipboard_1set_1with_1owner_FUNC,
- _1gtk_1clipboard_1store_FUNC,
- _1gtk_1clipboard_1wait_1for_1contents_FUNC,
- _1gtk_1color_1chooser_1add_1palette_FUNC,
- _1gtk_1color_1chooser_1dialog_1new_FUNC,
- _1gtk_1color_1chooser_1get_1rgba_FUNC,
- _1gtk_1color_1chooser_1get_1use_1alpha_FUNC,
- _1gtk_1color_1chooser_1set_1rgba_FUNC,
- _1gtk_1color_1chooser_1set_1use_1alpha_FUNC,
- _1gtk_1combo_1box_1get_1active_FUNC,
- _1gtk_1combo_1box_1get_1model_FUNC,
- _1gtk_1combo_1box_1get_1wrap_1width_FUNC,
- _1gtk_1combo_1box_1popdown_FUNC,
- _1gtk_1combo_1box_1popup_FUNC,
- _1gtk_1combo_1box_1set_1active_FUNC,
- _1gtk_1combo_1box_1set_1focus_1on_1click_FUNC,
- _1gtk_1combo_1box_1set_1wrap_1width_FUNC,
- _1gtk_1combo_1box_1text_1insert_FUNC,
- _1gtk_1combo_1box_1text_1new_FUNC,
- _1gtk_1combo_1box_1text_1new_1with_1entry_FUNC,
- _1gtk_1combo_1box_1text_1remove_FUNC,
- _1gtk_1combo_1box_1text_1remove_1all_FUNC,
- _1gtk_1container_1add_FUNC,
- _1gtk_1container_1forall_FUNC,
- _1gtk_1container_1get_1border_1width_FUNC,
- _1gtk_1container_1get_1children_FUNC,
- _1gtk_1container_1propagate_1draw_FUNC,
- _1gtk_1container_1remove_FUNC,
- _1gtk_1container_1set_1border_1width_FUNC,
- _1gtk_1css_1provider_1get_1named_FUNC,
- _1gtk_1css_1provider_1load_1from_1data__J_3BJ_FUNC,
- _1gtk_1css_1provider_1load_1from_1data__J_3BJ_3J_FUNC,
- _1gtk_1css_1provider_1new_FUNC,
- _1gtk_1css_1provider_1to_1string_FUNC,
- _1gtk_1dialog_1add_1button_FUNC,
- _1gtk_1dialog_1run_FUNC,
- _1gtk_1drag_1begin_1with_1coordinates__JJIIJII_FUNC,
- _1gtk_1drag_1begin_1with_1coordinates__JJJIII_FUNC,
- _1gtk_1drag_1check_1threshold_FUNC,
- _1gtk_1drag_1dest_1find_1target_FUNC,
- _1gtk_1drag_1dest_1set_FUNC,
- _1gtk_1drag_1dest_1unset_FUNC,
- _1gtk_1drag_1finish_FUNC,
- _1gtk_1drag_1get_1data__JJJ_FUNC,
- _1gtk_1drag_1get_1data__JJJI_FUNC,
- _1gtk_1drag_1set_1icon_1surface_FUNC,
- _1gtk_1editable_1copy_1clipboard_FUNC,
- _1gtk_1editable_1cut_1clipboard_FUNC,
- _1gtk_1editable_1delete_1selection_FUNC,
- _1gtk_1editable_1delete_1text_FUNC,
- _1gtk_1editable_1get_1editable_FUNC,
- _1gtk_1editable_1get_1position_FUNC,
- _1gtk_1editable_1get_1selection_1bounds_FUNC,
- _1gtk_1editable_1insert_1text_FUNC,
- _1gtk_1editable_1paste_1clipboard_FUNC,
- _1gtk_1editable_1select_1region_FUNC,
- _1gtk_1editable_1set_1editable_FUNC,
- _1gtk_1editable_1set_1position_FUNC,
- _1gtk_1entry_1get_1icon_1area_FUNC,
- _1gtk_1entry_1get_1invisible_1char_FUNC,
- _1gtk_1entry_1get_1layout_FUNC,
- _1gtk_1entry_1get_1layout_1offsets_FUNC,
- _1gtk_1entry_1get_1max_1length_FUNC,
- _1gtk_1entry_1get_1text_FUNC,
- _1gtk_1entry_1get_1visibility_FUNC,
- _1gtk_1entry_1new_FUNC,
- _1gtk_1entry_1set_1alignment_FUNC,
- _1gtk_1entry_1set_1has_1frame_FUNC,
- _1gtk_1entry_1set_1icon_1activatable_FUNC,
- _1gtk_1entry_1set_1icon_1from_1icon_1name_FUNC,
- _1gtk_1entry_1set_1icon_1sensitive_FUNC,
- _1gtk_1entry_1set_1invisible_1char_FUNC,
- _1gtk_1entry_1set_1max_1length_FUNC,
- _1gtk_1entry_1set_1placeholder_1text_FUNC,
- _1gtk_1entry_1set_1tabs_FUNC,
- _1gtk_1entry_1set_1text_FUNC,
- _1gtk_1entry_1set_1visibility_FUNC,
- _1gtk_1entry_1set_1width_1chars_FUNC,
- _1gtk_1entry_1text_1index_1to_1layout_1index_FUNC,
- _1gtk_1enumerate_1printers_FUNC,
- _1gtk_1event_1box_1new_FUNC,
- _1gtk_1event_1controller_1get_1widget_FUNC,
- _1gtk_1event_1controller_1handle_1event_FUNC,
- _1gtk_1event_1controller_1key_1new_FUNC,
- _1gtk_1event_1controller_1motion_1new_FUNC,
- _1gtk_1event_1controller_1scroll_1new_FUNC,
- _1gtk_1event_1controller_1set_1propagation_1phase_FUNC,
- _1gtk_1expander_1get_1expanded_FUNC,
- _1gtk_1expander_1new_FUNC,
- _1gtk_1expander_1set_1expanded_FUNC,
- _1gtk_1expander_1set_1label_1widget_FUNC,
- _1gtk_1file_1chooser_1add_1filter_FUNC,
- _1gtk_1file_1chooser_1dialog_1new___3BJIJIJIJ_FUNC,
- _1gtk_1file_1chooser_1dialog_1new___3BJI_3BI_3BIJ_FUNC,
- _1gtk_1file_1chooser_1get_1filename_FUNC,
- _1gtk_1file_1chooser_1get_1filenames_FUNC,
- _1gtk_1file_1chooser_1get_1filter_FUNC,
- _1gtk_1file_1chooser_1get_1uri_FUNC,
- _1gtk_1file_1chooser_1get_1uris_FUNC,
- _1gtk_1file_1chooser_1native_1new_FUNC,
- _1gtk_1file_1chooser_1set_1current_1folder_FUNC,
- _1gtk_1file_1chooser_1set_1current_1folder_1uri_FUNC,
- _1gtk_1file_1chooser_1set_1current_1name_FUNC,
- _1gtk_1file_1chooser_1set_1do_1overwrite_1confirmation_FUNC,
- _1gtk_1file_1chooser_1set_1extra_1widget_FUNC,
- _1gtk_1file_1chooser_1set_1filename_FUNC,
- _1gtk_1file_1chooser_1set_1filter_FUNC,
- _1gtk_1file_1chooser_1set_1local_1only_FUNC,
- _1gtk_1file_1chooser_1set_1select_1multiple_FUNC,
- _1gtk_1file_1chooser_1set_1uri_FUNC,
- _1gtk_1file_1filter_1add_1pattern_FUNC,
- _1gtk_1file_1filter_1get_1name_FUNC,
- _1gtk_1file_1filter_1new_FUNC,
- _1gtk_1file_1filter_1set_1name_FUNC,
- _1gtk_1font_1chooser_1dialog_1new_FUNC,
- _1gtk_1font_1chooser_1get_1font_FUNC,
- _1gtk_1font_1chooser_1set_1font_FUNC,
- _1gtk_1frame_1get_1label_1widget_FUNC,
- _1gtk_1frame_1new_FUNC,
- _1gtk_1frame_1set_1label_1widget_FUNC,
- _1gtk_1frame_1set_1shadow_1type_FUNC,
- _1gtk_1gesture_1drag_1get_1offset_FUNC,
- _1gtk_1gesture_1drag_1get_1start_1point_FUNC,
- _1gtk_1gesture_1drag_1new_FUNC,
- _1gtk_1gesture_1get_1last_1event_FUNC,
- _1gtk_1gesture_1get_1last_1updated_1sequence_FUNC,
- _1gtk_1gesture_1get_1point_FUNC,
- _1gtk_1gesture_1get_1sequences_FUNC,
- _1gtk_1gesture_1group_FUNC,
- _1gtk_1gesture_1is_1recognized_FUNC,
- _1gtk_1gesture_1multi_1press_1new_FUNC,
- _1gtk_1gesture_1pan_1get_1orientation_FUNC,
- _1gtk_1gesture_1pan_1new_FUNC,
- _1gtk_1gesture_1pan_1set_1orientation_FUNC,
- _1gtk_1gesture_1rotate_1get_1angle_1delta_FUNC,
- _1gtk_1gesture_1rotate_1new_FUNC,
- _1gtk_1gesture_1single_1set_1button_FUNC,
- _1gtk_1gesture_1swipe_1get_1velocity_FUNC,
- _1gtk_1gesture_1swipe_1new_FUNC,
- _1gtk_1gesture_1zoom_1get_1scale_1delta_FUNC,
- _1gtk_1gesture_1zoom_1new_FUNC,
- _1gtk_1get_1current_1event_FUNC,
- _1gtk_1get_1current_1event_1state_FUNC,
- _1gtk_1get_1default_1language_FUNC,
- _1gtk_1get_1event_1widget_FUNC,
- _1gtk_1get_1major_1version_FUNC,
- _1gtk_1get_1micro_1version_FUNC,
- _1gtk_1get_1minor_1version_FUNC,
- _1gtk_1grab_1add_FUNC,
- _1gtk_1grab_1get_1current_FUNC,
- _1gtk_1grab_1remove_FUNC,
- _1gtk_1hsv_1to_1rgb_FUNC,
- _1gtk_1icon_1info_1load_1icon_FUNC,
- _1gtk_1icon_1theme_1get_1default_FUNC,
- _1gtk_1icon_1theme_1load_1icon_FUNC,
- _1gtk_1icon_1theme_1lookup_1by_1gicon_FUNC,
- _1gtk_1im_1context_1filter_1keypress_FUNC,
- _1gtk_1im_1context_1focus_1in_FUNC,
- _1gtk_1im_1context_1focus_1out_FUNC,
- _1gtk_1im_1context_1get_1preedit_1string_FUNC,
- _1gtk_1im_1context_1get_1type_FUNC,
- _1gtk_1im_1context_1reset_FUNC,
- _1gtk_1im_1context_1set_1client_1window_FUNC,
- _1gtk_1im_1context_1set_1cursor_1location_FUNC,
- _1gtk_1im_1multicontext_1append_1menuitems_FUNC,
- _1gtk_1im_1multicontext_1new_FUNC,
- _1gtk_1image_1new_FUNC,
- _1gtk_1image_1new_1from_1icon_1name___3B_FUNC,
- _1gtk_1image_1new_1from_1icon_1name___3BI_FUNC,
- _1gtk_1image_1new_1from_1pixbuf_FUNC,
- _1gtk_1image_1set_1from_1gicon__JJ_FUNC,
- _1gtk_1image_1set_1from_1gicon__JJI_FUNC,
- _1gtk_1image_1set_1from_1icon_1name__J_3B_FUNC,
- _1gtk_1image_1set_1from_1icon_1name__J_3BI_FUNC,
- _1gtk_1image_1set_1from_1pixbuf_FUNC,
- _1gtk_1image_1set_1pixel_1size_FUNC,
- _1gtk_1init_1check___FUNC,
- _1gtk_1init_1check___3J_3J_FUNC,
- _1gtk_1label_1get_1layout_FUNC,
- _1gtk_1label_1get_1mnemonic_1keyval_FUNC,
- _1gtk_1label_1get_1type_FUNC,
- _1gtk_1label_1new_FUNC,
- _1gtk_1label_1new_1with_1mnemonic_FUNC,
- _1gtk_1label_1set_1attributes_FUNC,
- _1gtk_1label_1set_1justify_FUNC,
- _1gtk_1label_1set_1line_1wrap_FUNC,
- _1gtk_1label_1set_1line_1wrap_1mode_FUNC,
- _1gtk_1label_1set_1text__JJ_FUNC,
- _1gtk_1label_1set_1text__J_3B_FUNC,
- _1gtk_1label_1set_1text_1with_1mnemonic_FUNC,
- _1gtk_1label_1set_1xalign_FUNC,
- _1gtk_1label_1set_1yalign_FUNC,
- _1gtk_1list_1store_1append_FUNC,
- _1gtk_1list_1store_1clear_FUNC,
- _1gtk_1list_1store_1insert_FUNC,
- _1gtk_1list_1store_1newv_FUNC,
- _1gtk_1list_1store_1remove_FUNC,
- _1gtk_1list_1store_1set__JJIII_FUNC,
- _1gtk_1list_1store_1set__JJIJI_FUNC,
- _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC,
- _1gtk_1list_1store_1set__JJIZI_FUNC,
- _1gtk_1list_1store_1set__JJI_3BI_FUNC,
- _1gtk_1main_FUNC,
- _1gtk_1main_1do_1event_FUNC,
- _1gtk_1menu_1bar_1new_FUNC,
- _1gtk_1menu_1item_1get_1submenu_FUNC,
- _1gtk_1menu_1item_1new_FUNC,
- _1gtk_1menu_1item_1set_1submenu_FUNC,
- _1gtk_1menu_1new_FUNC,
- _1gtk_1menu_1popdown_FUNC,
- _1gtk_1menu_1popup_FUNC,
- _1gtk_1menu_1popup_1at_1pointer_FUNC,
- _1gtk_1menu_1popup_1at_1rect_FUNC,
- _1gtk_1menu_1shell_1deactivate_FUNC,
- _1gtk_1menu_1shell_1insert_FUNC,
- _1gtk_1menu_1shell_1set_1take_1focus_FUNC,
- _1gtk_1menu_1tool_1button_1new_FUNC,
- _1gtk_1message_1dialog_1new_FUNC,
- _1gtk_1misc_1set_1alignment_FUNC,
- _1gtk_1native_1dialog_1run_FUNC,
- _1gtk_1notebook_1get_1current_1page_FUNC,
- _1gtk_1notebook_1get_1scrollable_FUNC,
- _1gtk_1notebook_1insert_1page_FUNC,
- _1gtk_1notebook_1new_FUNC,
- _1gtk_1notebook_1next_1page_FUNC,
- _1gtk_1notebook_1prev_1page_FUNC,
- _1gtk_1notebook_1remove_1page_FUNC,
- _1gtk_1notebook_1set_1current_1page_FUNC,
- _1gtk_1notebook_1set_1scrollable_FUNC,
- _1gtk_1notebook_1set_1show_1tabs_FUNC,
- _1gtk_1notebook_1set_1tab_1pos_FUNC,
- _1gtk_1orientable_1set_1orientation_FUNC,
- _1gtk_1page_1setup_1get_1bottom_1margin_FUNC,
- _1gtk_1page_1setup_1get_1left_1margin_FUNC,
- _1gtk_1page_1setup_1get_1orientation_FUNC,
- _1gtk_1page_1setup_1get_1page_1height_FUNC,
- _1gtk_1page_1setup_1get_1page_1width_FUNC,
- _1gtk_1page_1setup_1get_1paper_1height_FUNC,
- _1gtk_1page_1setup_1get_1paper_1size_FUNC,
- _1gtk_1page_1setup_1get_1paper_1width_FUNC,
- _1gtk_1page_1setup_1get_1right_1margin_FUNC,
- _1gtk_1page_1setup_1get_1top_1margin_FUNC,
- _1gtk_1page_1setup_1new_FUNC,
- _1gtk_1page_1setup_1set_1bottom_1margin_FUNC,
- _1gtk_1page_1setup_1set_1left_1margin_FUNC,
- _1gtk_1page_1setup_1set_1orientation_FUNC,
- _1gtk_1page_1setup_1set_1paper_1size_FUNC,
- _1gtk_1page_1setup_1set_1right_1margin_FUNC,
- _1gtk_1page_1setup_1set_1top_1margin_FUNC,
- _1gtk_1paper_1size_1free_FUNC,
- _1gtk_1paper_1size_1get_1display_1name_FUNC,
- _1gtk_1paper_1size_1get_1height_FUNC,
- _1gtk_1paper_1size_1get_1name_FUNC,
- _1gtk_1paper_1size_1get_1ppd_1name_FUNC,
- _1gtk_1paper_1size_1get_1width_FUNC,
- _1gtk_1paper_1size_1is_1custom_FUNC,
- _1gtk_1paper_1size_1new_FUNC,
- _1gtk_1paper_1size_1new_1custom_FUNC,
- _1gtk_1paper_1size_1new_1from_1ppd_FUNC,
- _1gtk_1plug_1new_FUNC,
- _1gtk_1print_1job_1get_1surface_FUNC,
- _1gtk_1print_1job_1new_FUNC,
- _1gtk_1print_1job_1send_FUNC,
- _1gtk_1print_1settings_1foreach_FUNC,
- _1gtk_1print_1settings_1get_FUNC,
- _1gtk_1print_1settings_1get_1collate_FUNC,
- _1gtk_1print_1settings_1get_1duplex_FUNC,
- _1gtk_1print_1settings_1get_1n_1copies_FUNC,
- _1gtk_1print_1settings_1get_1page_1ranges_FUNC,
- _1gtk_1print_1settings_1get_1print_1pages_FUNC,
- _1gtk_1print_1settings_1get_1resolution_FUNC,
- _1gtk_1print_1settings_1new_FUNC,
- _1gtk_1print_1settings_1set_FUNC,
- _1gtk_1print_1settings_1set_1collate_FUNC,
- _1gtk_1print_1settings_1set_1duplex_FUNC,
- _1gtk_1print_1settings_1set_1n_1copies_FUNC,
- _1gtk_1print_1settings_1set_1orientation_FUNC,
- _1gtk_1print_1settings_1set_1page_1ranges_FUNC,
- _1gtk_1print_1settings_1set_1print_1pages_FUNC,
- _1gtk_1print_1settings_1set_1printer_FUNC,
- _1gtk_1print_1unix_1dialog_1get_1current_1page_FUNC,
- _1gtk_1print_1unix_1dialog_1get_1page_1setup_FUNC,
- _1gtk_1print_1unix_1dialog_1get_1selected_1printer_FUNC,
- _1gtk_1print_1unix_1dialog_1get_1settings_FUNC,
- _1gtk_1print_1unix_1dialog_1new_FUNC,
- _1gtk_1print_1unix_1dialog_1set_1current_1page_FUNC,
- _1gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC,
- _1gtk_1print_1unix_1dialog_1set_1manual_1capabilities_FUNC,
- _1gtk_1print_1unix_1dialog_1set_1page_1setup_FUNC,
- _1gtk_1print_1unix_1dialog_1set_1settings_FUNC,
- _1gtk_1printer_1get_1backend_FUNC,
- _1gtk_1printer_1get_1name_FUNC,
- _1gtk_1printer_1is_1default_FUNC,
- _1gtk_1printer_1option_1widget_1get_1type_FUNC,
- _1gtk_1progress_1bar_1new_FUNC,
- _1gtk_1progress_1bar_1pulse_FUNC,
- _1gtk_1progress_1bar_1set_1fraction_FUNC,
- _1gtk_1progress_1bar_1set_1inverted_FUNC,
- _1gtk_1radio_1button_1get_1group_FUNC,
- _1gtk_1radio_1button_1new_FUNC,
- _1gtk_1radio_1menu_1item_1get_1group_FUNC,
- _1gtk_1radio_1menu_1item_1new_FUNC,
- _1gtk_1range_1get_1adjustment_FUNC,
- _1gtk_1range_1get_1slider_1range_FUNC,
- _1gtk_1range_1set_1increments_FUNC,
- _1gtk_1range_1set_1inverted_FUNC,
- _1gtk_1range_1set_1range_FUNC,
- _1gtk_1range_1set_1value_FUNC,
- _1gtk_1render_1background_FUNC,
- _1gtk_1render_1focus_FUNC,
- _1gtk_1render_1frame_FUNC,
- _1gtk_1render_1handle_FUNC,
- _1gtk_1rgb_1to_1hsv_FUNC,
- _1gtk_1scale_1new_FUNC,
- _1gtk_1scale_1set_1digits_FUNC,
- _1gtk_1scale_1set_1draw_1value_FUNC,
- _1gtk_1scrollable_1get_1vadjustment_FUNC,
- _1gtk_1scrollbar_1new_FUNC,
- _1gtk_1scrolled_1window_1get_1hadjustment_FUNC,
- _1gtk_1scrolled_1window_1get_1hscrollbar_FUNC,
- _1gtk_1scrolled_1window_1get_1overlay_1scrolling_FUNC,
- _1gtk_1scrolled_1window_1get_1policy_FUNC,
- _1gtk_1scrolled_1window_1get_1shadow_1type_FUNC,
- _1gtk_1scrolled_1window_1get_1vadjustment_FUNC,
- _1gtk_1scrolled_1window_1get_1vscrollbar_FUNC,
- _1gtk_1scrolled_1window_1new_FUNC,
- _1gtk_1scrolled_1window_1set_1policy_FUNC,
- _1gtk_1scrolled_1window_1set_1shadow_1type_FUNC,
- _1gtk_1search_1entry_1new_FUNC,
- _1gtk_1selection_1data_1free_FUNC,
- _1gtk_1selection_1data_1get_1data_FUNC,
- _1gtk_1selection_1data_1get_1data_1type_FUNC,
- _1gtk_1selection_1data_1get_1format_FUNC,
- _1gtk_1selection_1data_1get_1length_FUNC,
- _1gtk_1selection_1data_1get_1target_FUNC,
- _1gtk_1selection_1data_1set_FUNC,
- _1gtk_1separator_1menu_1item_1new_FUNC,
- _1gtk_1separator_1new_FUNC,
- _1gtk_1separator_1tool_1item_1new_FUNC,
- _1gtk_1separator_1tool_1item_1set_1draw_FUNC,
- _1gtk_1settings_1get_1default_FUNC,
- _1gtk_1snapshot_1append_1cairo_FUNC,
- _1gtk_1socket_1get_1id_FUNC,
- _1gtk_1socket_1new_FUNC,
- _1gtk_1spin_1button_1configure_FUNC,
- _1gtk_1spin_1button_1get_1adjustment_FUNC,
- _1gtk_1spin_1button_1get_1digits_FUNC,
- _1gtk_1spin_1button_1new_FUNC,
- _1gtk_1spin_1button_1set_1digits_FUNC,
- _1gtk_1spin_1button_1set_1increments_FUNC,
- _1gtk_1spin_1button_1set_1numeric_FUNC,
- _1gtk_1spin_1button_1set_1range_FUNC,
- _1gtk_1spin_1button_1set_1value_FUNC,
- _1gtk_1spin_1button_1set_1wrap_FUNC,
- _1gtk_1spin_1button_1update_FUNC,
- _1gtk_1status_1icon_1get_1geometry_FUNC,
- _1gtk_1status_1icon_1get_1visible_FUNC,
- _1gtk_1status_1icon_1new_FUNC,
- _1gtk_1status_1icon_1position_1menu_1func_FUNC,
- _1gtk_1status_1icon_1set_1from_1pixbuf_FUNC,
- _1gtk_1status_1icon_1set_1tooltip_1text_FUNC,
- _1gtk_1status_1icon_1set_1visible_FUNC,
- _1gtk_1style_1context_1add_1class_FUNC,
- _1gtk_1style_1context_1add_1provider_FUNC,
- _1gtk_1style_1context_1add_1provider_1for_1display_FUNC,
- _1gtk_1style_1context_1add_1provider_1for_1screen_FUNC,
- _1gtk_1style_1context_1get__JI_3B_3JJ_FUNC,
- _1gtk_1style_1context_1get__J_3B_3JJ_FUNC,
- _1gtk_1style_1context_1get_1background_1color_FUNC,
- _1gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC,
- _1gtk_1style_1context_1get_1border__JLorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC,
- _1gtk_1style_1context_1get_1color__JILorg_eclipse_swt_internal_gtk_GdkRGBA_2_FUNC,
- _1gtk_1style_1context_1get_1color__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2_FUNC,
- _1gtk_1style_1context_1get_1font_FUNC,
- _1gtk_1style_1context_1get_1margin_FUNC,
- _1gtk_1style_1context_1get_1padding__JILorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC,
- _1gtk_1style_1context_1get_1padding__JLorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC,
- _1gtk_1style_1context_1get_1parent_FUNC,
- _1gtk_1style_1context_1invalidate_FUNC,
- _1gtk_1style_1context_1remove_1class_FUNC,
- _1gtk_1style_1context_1restore_FUNC,
- _1gtk_1style_1context_1save_FUNC,
- _1gtk_1style_1context_1set_1state_FUNC,
- _1gtk_1target_1list_1new_FUNC,
- _1gtk_1target_1list_1unref_FUNC,
- _1gtk_1text_1buffer_1copy_1clipboard_FUNC,
- _1gtk_1text_1buffer_1create_1mark_FUNC,
- _1gtk_1text_1buffer_1cut_1clipboard_FUNC,
- _1gtk_1text_1buffer_1delete_FUNC,
- _1gtk_1text_1buffer_1get_1bounds_FUNC,
- _1gtk_1text_1buffer_1get_1end_1iter_FUNC,
- _1gtk_1text_1buffer_1get_1insert_FUNC,
- _1gtk_1text_1buffer_1get_1iter_1at_1line_FUNC,
- _1gtk_1text_1buffer_1get_1iter_1at_1mark_FUNC,
- _1gtk_1text_1buffer_1get_1iter_1at_1offset_FUNC,
- _1gtk_1text_1buffer_1get_1line_1count_FUNC,
- _1gtk_1text_1buffer_1get_1selection_1bound_FUNC,
- _1gtk_1text_1buffer_1get_1selection_1bounds_FUNC,
- _1gtk_1text_1buffer_1get_1text_FUNC,
- _1gtk_1text_1buffer_1insert__JJ_3BI_FUNC,
- _1gtk_1text_1buffer_1insert__J_3B_3BI_FUNC,
- _1gtk_1text_1buffer_1paste_1clipboard_FUNC,
- _1gtk_1text_1buffer_1place_1cursor_FUNC,
- _1gtk_1text_1buffer_1select_1range_FUNC,
- _1gtk_1text_1buffer_1set_1text_FUNC,
- _1gtk_1text_1iter_1get_1line_FUNC,
- _1gtk_1text_1iter_1get_1offset_FUNC,
- _1gtk_1text_1view_1buffer_1to_1surface_1coords_FUNC,
- _1gtk_1text_1view_1buffer_1to_1window_1coords_FUNC,
- _1gtk_1text_1view_1get_1buffer_FUNC,
- _1gtk_1text_1view_1get_1editable_FUNC,
- _1gtk_1text_1view_1get_1iter_1at_1location_FUNC,
- _1gtk_1text_1view_1get_1iter_1location_FUNC,
- _1gtk_1text_1view_1get_1line_1at_1y_FUNC,
- _1gtk_1text_1view_1get_1line_1yrange_FUNC,
- _1gtk_1text_1view_1get_1visible_1rect_FUNC,
- _1gtk_1text_1view_1get_1window_FUNC,
- _1gtk_1text_1view_1new_FUNC,
- _1gtk_1text_1view_1scroll_1to_1iter_FUNC,
- _1gtk_1text_1view_1scroll_1to_1mark_FUNC,
- _1gtk_1text_1view_1set_1editable_FUNC,
- _1gtk_1text_1view_1set_1justification_FUNC,
- _1gtk_1text_1view_1set_1tabs_FUNC,
- _1gtk_1text_1view_1set_1wrap_1mode_FUNC,
- _1gtk_1toggle_1button_1get_1active_FUNC,
- _1gtk_1toggle_1button_1new_FUNC,
- _1gtk_1toggle_1button_1set_1active_FUNC,
- _1gtk_1toggle_1button_1set_1inconsistent_FUNC,
- _1gtk_1toggle_1button_1set_1mode_FUNC,
- _1gtk_1toggle_1tool_1button_1get_1active_FUNC,
- _1gtk_1toggle_1tool_1button_1new_FUNC,
- _1gtk_1toggle_1tool_1button_1set_1active_FUNC,
- _1gtk_1tool_1button_1new_FUNC,
- _1gtk_1tool_1button_1set_1icon_1widget_FUNC,
- _1gtk_1tool_1button_1set_1label_FUNC,
- _1gtk_1tool_1button_1set_1label_1widget_FUNC,
- _1gtk_1tool_1button_1set_1use_1underline_FUNC,
- _1gtk_1tool_1item_1get_1proxy_1menu_1item_FUNC,
- _1gtk_1tool_1item_1retrieve_1proxy_1menu_1item_FUNC,
- _1gtk_1tool_1item_1set_1is_1important_FUNC,
- _1gtk_1tool_1item_1set_1proxy_1menu_1item_FUNC,
- _1gtk_1toolbar_1insert_FUNC,
- _1gtk_1toolbar_1new_FUNC,
- _1gtk_1toolbar_1set_1icon_1size_FUNC,
- _1gtk_1toolbar_1set_1show_1arrow_FUNC,
- _1gtk_1toolbar_1set_1style_FUNC,
- _1gtk_1tooltip_1get_1type_FUNC,
- _1gtk_1tooltip_1set_1custom_FUNC,
- _1gtk_1tree_1model_1get__JJI_3II_FUNC,
- _1gtk_1tree_1model_1get__JJI_3JI_FUNC,
- _1gtk_1tree_1model_1get_1iter_FUNC,
- _1gtk_1tree_1model_1get_1iter_1first_FUNC,
- _1gtk_1tree_1model_1get_1n_1columns_FUNC,
- _1gtk_1tree_1model_1get_1path_FUNC,
- _1gtk_1tree_1model_1get_1type_FUNC,
- _1gtk_1tree_1model_1iter_1children_FUNC,
- _1gtk_1tree_1model_1iter_1n_1children_FUNC,
- _1gtk_1tree_1model_1iter_1next_FUNC,
- _1gtk_1tree_1model_1iter_1nth_1child_FUNC,
- _1gtk_1tree_1path_1append_1index_FUNC,
- _1gtk_1tree_1path_1compare_FUNC,
- _1gtk_1tree_1path_1free_FUNC,
- _1gtk_1tree_1path_1get_1depth_FUNC,
- _1gtk_1tree_1path_1get_1indices_FUNC,
- _1gtk_1tree_1path_1new_FUNC,
- _1gtk_1tree_1path_1new_1from_1string__J_FUNC,
- _1gtk_1tree_1path_1new_1from_1string___3B_FUNC,
- _1gtk_1tree_1path_1next_FUNC,
- _1gtk_1tree_1path_1prev_FUNC,
- _1gtk_1tree_1path_1up_FUNC,
- _1gtk_1tree_1selection_1count_1selected_1rows_FUNC,
- _1gtk_1tree_1selection_1get_1select_1function_FUNC,
- _1gtk_1tree_1selection_1get_1selected_1rows_FUNC,
- _1gtk_1tree_1selection_1path_1is_1selected_FUNC,
- _1gtk_1tree_1selection_1select_1all_FUNC,
- _1gtk_1tree_1selection_1select_1iter_FUNC,
- _1gtk_1tree_1selection_1select_1path_FUNC,
- _1gtk_1tree_1selection_1set_1mode_FUNC,
- _1gtk_1tree_1selection_1set_1select_1function_FUNC,
- _1gtk_1tree_1selection_1unselect_1all_FUNC,
- _1gtk_1tree_1selection_1unselect_1iter_FUNC,
- _1gtk_1tree_1selection_1unselect_1path_FUNC,
- _1gtk_1tree_1store_1append_FUNC,
- _1gtk_1tree_1store_1clear_FUNC,
- _1gtk_1tree_1store_1insert_FUNC,
- _1gtk_1tree_1store_1newv_FUNC,
- _1gtk_1tree_1store_1remove_FUNC,
- _1gtk_1tree_1store_1set__JJIII_FUNC,
- _1gtk_1tree_1store_1set__JJIJI_FUNC,
- _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC,
- _1gtk_1tree_1store_1set__JJIZI_FUNC,
- _1gtk_1tree_1store_1set__JJI_3BI_FUNC,
- _1gtk_1tree_1view_1collapse_1row_FUNC,
- _1gtk_1tree_1view_1column_1add_1attribute_FUNC,
- _1gtk_1tree_1view_1column_1cell_1get_1position_FUNC,
- _1gtk_1tree_1view_1column_1cell_1get_1size_FUNC,
- _1gtk_1tree_1view_1column_1cell_1set_1cell_1data_FUNC,
- _1gtk_1tree_1view_1column_1clear_FUNC,
- _1gtk_1tree_1view_1column_1get_1button_FUNC,
- _1gtk_1tree_1view_1column_1get_1fixed_1width_FUNC,
- _1gtk_1tree_1view_1column_1get_1reorderable_FUNC,
- _1gtk_1tree_1view_1column_1get_1resizable_FUNC,
- _1gtk_1tree_1view_1column_1get_1visible_FUNC,
- _1gtk_1tree_1view_1column_1get_1width_FUNC,
- _1gtk_1tree_1view_1column_1new_FUNC,
- _1gtk_1tree_1view_1column_1pack_1end_FUNC,
- _1gtk_1tree_1view_1column_1pack_1start_FUNC,
- _1gtk_1tree_1view_1column_1set_1alignment_FUNC,
- _1gtk_1tree_1view_1column_1set_1cell_1data_1func_FUNC,
- _1gtk_1tree_1view_1column_1set_1clickable_FUNC,
- _1gtk_1tree_1view_1column_1set_1fixed_1width_FUNC,
- _1gtk_1tree_1view_1column_1set_1min_1width_FUNC,
- _1gtk_1tree_1view_1column_1set_1reorderable_FUNC,
- _1gtk_1tree_1view_1column_1set_1resizable_FUNC,
- _1gtk_1tree_1view_1column_1set_1sizing_FUNC,
- _1gtk_1tree_1view_1column_1set_1sort_1indicator_FUNC,
- _1gtk_1tree_1view_1column_1set_1sort_1order_FUNC,
- _1gtk_1tree_1view_1column_1set_1visible_FUNC,
- _1gtk_1tree_1view_1column_1set_1widget_FUNC,
- _1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC,
- _1gtk_1tree_1view_1create_1row_1drag_1icon_FUNC,
- _1gtk_1tree_1view_1expand_1row_FUNC,
- _1gtk_1tree_1view_1get_1background_1area_FUNC,
- _1gtk_1tree_1view_1get_1bin_1window_FUNC,
- _1gtk_1tree_1view_1get_1cell_1area_FUNC,
- _1gtk_1tree_1view_1get_1column_FUNC,
- _1gtk_1tree_1view_1get_1columns_FUNC,
- _1gtk_1tree_1view_1get_1cursor_FUNC,
- _1gtk_1tree_1view_1get_1expander_1column_FUNC,
- _1gtk_1tree_1view_1get_1grid_1lines_FUNC,
- _1gtk_1tree_1view_1get_1headers_1visible_FUNC,
- _1gtk_1tree_1view_1get_1path_1at_1pos_FUNC,
- _1gtk_1tree_1view_1get_1selection_FUNC,
- _1gtk_1tree_1view_1get_1visible_1rect_FUNC,
- _1gtk_1tree_1view_1insert_1column_FUNC,
- _1gtk_1tree_1view_1move_1column_1after_FUNC,
- _1gtk_1tree_1view_1new_1with_1model_FUNC,
- _1gtk_1tree_1view_1remove_1column_FUNC,
- _1gtk_1tree_1view_1row_1expanded_FUNC,
- _1gtk_1tree_1view_1scroll_1to_1cell_FUNC,
- _1gtk_1tree_1view_1scroll_1to_1point_FUNC,
- _1gtk_1tree_1view_1set_1cursor_FUNC,
- _1gtk_1tree_1view_1set_1drag_1dest_1row_FUNC,
- _1gtk_1tree_1view_1set_1grid_1lines_FUNC,
- _1gtk_1tree_1view_1set_1headers_1visible_FUNC,
- _1gtk_1tree_1view_1set_1model_FUNC,
- _1gtk_1tree_1view_1set_1search_1column_FUNC,
- _1gtk_1tree_1view_1unset_1rows_1drag_1dest_FUNC,
- _1gtk_1viewport_1set_1shadow_1type_FUNC,
- _1gtk_1widget_1add_1accelerator_FUNC,
- _1gtk_1widget_1add_1controller_FUNC,
- _1gtk_1widget_1add_1events_FUNC,
- _1gtk_1widget_1child_1focus_FUNC,
- _1gtk_1widget_1class_1get_1css_1name_FUNC,
- _1gtk_1widget_1create_1pango_1layout__JJ_FUNC,
- _1gtk_1widget_1create_1pango_1layout__J_3B_FUNC,
- _1gtk_1widget_1destroy_FUNC,
- _1gtk_1widget_1draw_FUNC,
- _1gtk_1widget_1event_FUNC,
- _1gtk_1widget_1get_1accessible_FUNC,
- _1gtk_1widget_1get_1allocation_FUNC,
- _1gtk_1widget_1get_1can_1default_FUNC,
- _1gtk_1widget_1get_1child_1visible_FUNC,
- _1gtk_1widget_1get_1clip_FUNC,
- _1gtk_1widget_1get_1events_FUNC,
- _1gtk_1widget_1get_1first_1child_FUNC,
- _1gtk_1widget_1get_1has_1surface_FUNC,
- _1gtk_1widget_1get_1has_1window_FUNC,
- _1gtk_1widget_1get_1mapped_FUNC,
- _1gtk_1widget_1get_1margin_1bottom_FUNC,
- _1gtk_1widget_1get_1margin_1end_FUNC,
- _1gtk_1widget_1get_1margin_1start_FUNC,
- _1gtk_1widget_1get_1margin_1top_FUNC,
- _1gtk_1widget_1get_1name_FUNC,
- _1gtk_1widget_1get_1next_1sibling_FUNC,
- _1gtk_1widget_1get_1opacity_FUNC,
- _1gtk_1widget_1get_1pango_1context_FUNC,
- _1gtk_1widget_1get_1parent_FUNC,
- _1gtk_1widget_1get_1parent_1surface_FUNC,
- _1gtk_1widget_1get_1parent_1window_FUNC,
- _1gtk_1widget_1get_1preferred_1height_FUNC,
- _1gtk_1widget_1get_1preferred_1height_1for_1width_FUNC,
- _1gtk_1widget_1get_1preferred_1size_FUNC,
- _1gtk_1widget_1get_1preferred_1width_1for_1height_FUNC,
- _1gtk_1widget_1get_1realized_FUNC,
- _1gtk_1widget_1get_1screen_FUNC,
- _1gtk_1widget_1get_1sensitive_FUNC,
- _1gtk_1widget_1get_1size_1request_FUNC,
- _1gtk_1widget_1get_1state_1flags_FUNC,
- _1gtk_1widget_1get_1style_1context_FUNC,
- _1gtk_1widget_1get_1surface_FUNC,
- _1gtk_1widget_1get_1tooltip_1text_FUNC,
- _1gtk_1widget_1get_1toplevel_FUNC,
- _1gtk_1widget_1get_1visible_FUNC,
- _1gtk_1widget_1get_1window_FUNC,
- _1gtk_1widget_1grab_1focus_FUNC,
- _1gtk_1widget_1has_1default_FUNC,
- _1gtk_1widget_1has_1focus_FUNC,
- _1gtk_1widget_1hide_FUNC,
- _1gtk_1widget_1input_1shape_1combine_1region_FUNC,
- _1gtk_1widget_1is_1focus_FUNC,
- _1gtk_1widget_1map_FUNC,
- _1gtk_1widget_1measure_FUNC,
- _1gtk_1widget_1mnemonic_1activate_FUNC,
- _1gtk_1widget_1override_1background_1color_FUNC,
- _1gtk_1widget_1override_1color_FUNC,
- _1gtk_1widget_1override_1font_FUNC,
- _1gtk_1widget_1queue_1draw_FUNC,
- _1gtk_1widget_1queue_1resize_FUNC,
- _1gtk_1widget_1realize_FUNC,
- _1gtk_1widget_1remove_1accelerator_FUNC,
- _1gtk_1widget_1reparent_FUNC,
- _1gtk_1widget_1set_1allocation_FUNC,
- _1gtk_1widget_1set_1can_1default_FUNC,
- _1gtk_1widget_1set_1can_1focus_FUNC,
- _1gtk_1widget_1set_1clip_FUNC,
- _1gtk_1widget_1set_1cursor_FUNC,
- _1gtk_1widget_1set_1default_1direction_FUNC,
- _1gtk_1widget_1set_1direction_FUNC,
- _1gtk_1widget_1set_1double_1buffered_FUNC,
- _1gtk_1widget_1set_1focus_1on_1click_FUNC,
- _1gtk_1widget_1set_1halign_FUNC,
- _1gtk_1widget_1set_1has_1surface_FUNC,
- _1gtk_1widget_1set_1has_1window_FUNC,
- _1gtk_1widget_1set_1hexpand_FUNC,
- _1gtk_1widget_1set_1margin_1bottom_FUNC,
- _1gtk_1widget_1set_1margin_1end_FUNC,
- _1gtk_1widget_1set_1margin_1start_FUNC,
- _1gtk_1widget_1set_1margin_1top_FUNC,
- _1gtk_1widget_1set_1name_FUNC,
- _1gtk_1widget_1set_1opacity_FUNC,
- _1gtk_1widget_1set_1parent_1surface_FUNC,
- _1gtk_1widget_1set_1parent_1window_FUNC,
- _1gtk_1widget_1set_1receives_1default_FUNC,
- _1gtk_1widget_1set_1redraw_1on_1allocate_FUNC,
- _1gtk_1widget_1set_1sensitive_FUNC,
- _1gtk_1widget_1set_1size_1request_FUNC,
- _1gtk_1widget_1set_1tooltip_1text_FUNC,
- _1gtk_1widget_1set_1valign_FUNC,
- _1gtk_1widget_1set_1vexpand_FUNC,
- _1gtk_1widget_1set_1visible_FUNC,
- _1gtk_1widget_1shape_1combine_1region_FUNC,
- _1gtk_1widget_1show_FUNC,
- _1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2_FUNC,
- _1gtk_1widget_1size_1allocate__JLorg_eclipse_swt_internal_gtk_GtkAllocation_2I_FUNC,
- _1gtk_1widget_1snapshot_1child_FUNC,
- _1gtk_1widget_1style_1get__J_3B_3IJ_FUNC,
- _1gtk_1widget_1style_1get__J_3B_3JJ_FUNC,
- _1gtk_1widget_1translate_1coordinates_FUNC,
- _1gtk_1window_1activate_1default_FUNC,
- _1gtk_1window_1add_1accel_1group_FUNC,
- _1gtk_1window_1deiconify_FUNC,
- _1gtk_1window_1fullscreen_FUNC,
- _1gtk_1window_1get_1focus_FUNC,
- _1gtk_1window_1get_1group_FUNC,
- _1gtk_1window_1get_1icon_1list_FUNC,
- _1gtk_1window_1get_1mnemonic_1modifier_FUNC,
- _1gtk_1window_1get_1modal_FUNC,
- _1gtk_1window_1get_1position_FUNC,
- _1gtk_1window_1get_1size_FUNC,
- _1gtk_1window_1group_1add_1window_FUNC,
- _1gtk_1window_1group_1new_FUNC,
- _1gtk_1window_1group_1remove_1window_FUNC,
- _1gtk_1window_1iconify_FUNC,
- _1gtk_1window_1is_1active_FUNC,
- _1gtk_1window_1list_1toplevels_FUNC,
- _1gtk_1window_1maximize_FUNC,
- _1gtk_1window_1move_FUNC,
- _1gtk_1window_1new_FUNC,
- _1gtk_1window_1remove_1accel_1group_FUNC,
- _1gtk_1window_1resize_FUNC,
- _1gtk_1window_1set_1attached_1to_FUNC,
- _1gtk_1window_1set_1decorated_FUNC,
- _1gtk_1window_1set_1default_FUNC,
- _1gtk_1window_1set_1destroy_1with_1parent_FUNC,
- _1gtk_1window_1set_1geometry_1hints_FUNC,
- _1gtk_1window_1set_1icon_1list_FUNC,
- _1gtk_1window_1set_1keep_1above_FUNC,
- _1gtk_1window_1set_1modal_FUNC,
- _1gtk_1window_1set_1resizable_FUNC,
- _1gtk_1window_1set_1skip_1taskbar_1hint_FUNC,
- _1gtk_1window_1set_1title_FUNC,
- _1gtk_1window_1set_1transient_1for_FUNC,
- _1gtk_1window_1set_1type_1hint_FUNC,
- _1gtk_1window_1unfullscreen_FUNC,
- _1gtk_1window_1unmaximize_FUNC,
+ gtk_1accel_1group_1new_FUNC,
+ gtk_1accelerator_1get_1default_1mod_1mask_FUNC,
+ gtk_1accelerator_1name_FUNC,
+ gtk_1accelerator_1parse__J_3I_3I_FUNC,
+ gtk_1accelerator_1parse___3B_3I_3I_FUNC,
+ gtk_1adjustment_1configure_FUNC,
+ gtk_1adjustment_1get_1lower_FUNC,
+ gtk_1adjustment_1get_1page_1increment_FUNC,
+ gtk_1adjustment_1get_1page_1size_FUNC,
+ gtk_1adjustment_1get_1step_1increment_FUNC,
+ gtk_1adjustment_1get_1upper_FUNC,
+ gtk_1adjustment_1get_1value_FUNC,
+ gtk_1adjustment_1new_FUNC,
+ gtk_1adjustment_1set_1page_1increment_FUNC,
+ gtk_1adjustment_1set_1step_1increment_FUNC,
+ gtk_1adjustment_1set_1value_FUNC,
+ gtk_1border_1free_FUNC,
+ gtk_1box_1new_FUNC,
+ gtk_1box_1set_1homogeneous_FUNC,
+ gtk_1box_1set_1spacing_FUNC,
+ gtk_1button_1new_FUNC,
+ gtk_1button_1set_1label_FUNC,
+ gtk_1button_1set_1use_1underline_FUNC,
+ gtk_1calendar_1clear_1marks_FUNC,
+ gtk_1calendar_1mark_1day_FUNC,
+ gtk_1calendar_1new_FUNC,
+ gtk_1cell_1layout_1clear_FUNC,
+ gtk_1cell_1layout_1get_1cells_FUNC,
+ gtk_1cell_1layout_1pack_1start_FUNC,
+ gtk_1cell_1layout_1set_1attributes_FUNC,
+ gtk_1cell_1renderer_1get_1fixed_1size_FUNC,
+ gtk_1cell_1renderer_1get_1padding_FUNC,
+ gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC,
+ gtk_1cell_1renderer_1get_1preferred_1size_FUNC,
+ gtk_1cell_1renderer_1pixbuf_1new_FUNC,
+ gtk_1cell_1renderer_1set_1fixed_1size_FUNC,
+ gtk_1cell_1renderer_1text_1new_FUNC,
+ gtk_1cell_1renderer_1toggle_1new_FUNC,
+ gtk_1cell_1view_1set_1fit_1model_FUNC,
+ gtk_1check_1button_1new_FUNC,
+ gtk_1check_1version_FUNC,
+ gtk_1color_1chooser_1add_1palette_FUNC,
+ gtk_1color_1chooser_1dialog_1new_FUNC,
+ gtk_1color_1chooser_1get_1rgba_FUNC,
+ gtk_1color_1chooser_1get_1use_1alpha_FUNC,
+ gtk_1color_1chooser_1set_1rgba_FUNC,
+ gtk_1color_1chooser_1set_1use_1alpha_FUNC,
+ gtk_1combo_1box_1get_1active_FUNC,
+ gtk_1combo_1box_1get_1model_FUNC,
+ gtk_1combo_1box_1popdown_FUNC,
+ gtk_1combo_1box_1popup_FUNC,
+ gtk_1combo_1box_1set_1active_FUNC,
+ gtk_1combo_1box_1text_1insert_FUNC,
+ gtk_1combo_1box_1text_1new_FUNC,
+ gtk_1combo_1box_1text_1new_1with_1entry_FUNC,
+ gtk_1combo_1box_1text_1remove_FUNC,
+ gtk_1combo_1box_1text_1remove_1all_FUNC,
+ gtk_1css_1provider_1new_FUNC,
+ gtk_1css_1provider_1to_1string_FUNC,
+ gtk_1dialog_1add_1button_FUNC,
+ gtk_1editable_1delete_1selection_FUNC,
+ gtk_1editable_1delete_1text_FUNC,
+ gtk_1editable_1get_1editable_FUNC,
+ gtk_1editable_1get_1position_FUNC,
+ gtk_1editable_1get_1selection_1bounds_FUNC,
+ gtk_1editable_1insert_1text_FUNC,
+ gtk_1editable_1select_1region_FUNC,
+ gtk_1editable_1set_1editable_FUNC,
+ gtk_1editable_1set_1position_FUNC,
+ gtk_1entry_1buffer_1delete_1text_FUNC,
+ gtk_1entry_1buffer_1get_1text_FUNC,
+ gtk_1entry_1buffer_1set_1text_FUNC,
+ gtk_1entry_1get_1icon_1area_FUNC,
+ gtk_1entry_1get_1invisible_1char_FUNC,
+ gtk_1entry_1get_1max_1length_FUNC,
+ gtk_1entry_1get_1visibility_FUNC,
+ gtk_1entry_1new_FUNC,
+ gtk_1entry_1set_1alignment_FUNC,
+ gtk_1entry_1set_1has_1frame_FUNC,
+ gtk_1entry_1set_1icon_1activatable_FUNC,
+ gtk_1entry_1set_1icon_1from_1icon_1name_FUNC,
+ gtk_1entry_1set_1icon_1sensitive_FUNC,
+ gtk_1entry_1set_1input_1hints_FUNC,
+ gtk_1entry_1set_1invisible_1char_FUNC,
+ gtk_1entry_1set_1max_1length_FUNC,
+ gtk_1entry_1set_1placeholder_1text_FUNC,
+ gtk_1entry_1set_1tabs_FUNC,
+ gtk_1entry_1set_1visibility_FUNC,
+ gtk_1enumerate_1printers_FUNC,
+ gtk_1event_1controller_1get_1widget_FUNC,
+ gtk_1event_1controller_1set_1propagation_1phase_FUNC,
+ gtk_1expander_1get_1expanded_FUNC,
+ gtk_1expander_1get_1label_1widget_FUNC,
+ gtk_1expander_1new_FUNC,
+ gtk_1expander_1set_1expanded_FUNC,
+ gtk_1expander_1set_1label_1widget_FUNC,
+ gtk_1file_1chooser_1add_1filter_FUNC,
+ gtk_1file_1chooser_1get_1filter_FUNC,
+ gtk_1file_1chooser_1native_1new_FUNC,
+ gtk_1file_1chooser_1set_1current_1name_FUNC,
+ gtk_1file_1chooser_1set_1filter_FUNC,
+ gtk_1file_1chooser_1set_1select_1multiple_FUNC,
+ gtk_1file_1filter_1add_1pattern_FUNC,
+ gtk_1file_1filter_1get_1name_FUNC,
+ gtk_1file_1filter_1new_FUNC,
+ gtk_1file_1filter_1set_1name_FUNC,
+ gtk_1font_1chooser_1dialog_1new_FUNC,
+ gtk_1font_1chooser_1get_1font_FUNC,
+ gtk_1font_1chooser_1set_1font_FUNC,
+ gtk_1frame_1get_1label_1widget_FUNC,
+ gtk_1frame_1new_FUNC,
+ gtk_1frame_1set_1label_1widget_FUNC,
+ gtk_1gesture_1drag_1get_1offset_FUNC,
+ gtk_1gesture_1drag_1get_1start_1point_FUNC,
+ gtk_1gesture_1drag_1new_FUNC,
+ gtk_1gesture_1get_1last_1updated_1sequence_FUNC,
+ gtk_1gesture_1get_1point_FUNC,
+ gtk_1gesture_1is_1recognized_FUNC,
+ gtk_1gesture_1rotate_1get_1angle_1delta_FUNC,
+ gtk_1gesture_1rotate_1new_FUNC,
+ gtk_1gesture_1single_1get_1current_1button_FUNC,
+ gtk_1gesture_1single_1set_1button_FUNC,
+ gtk_1gesture_1swipe_1get_1velocity_FUNC,
+ gtk_1gesture_1zoom_1get_1scale_1delta_FUNC,
+ gtk_1gesture_1zoom_1new_FUNC,
+ gtk_1get_1default_1language_FUNC,
+ gtk_1get_1major_1version_FUNC,
+ gtk_1get_1micro_1version_FUNC,
+ gtk_1get_1minor_1version_FUNC,
+ gtk_1im_1context_1focus_1in_FUNC,
+ gtk_1im_1context_1focus_1out_FUNC,
+ gtk_1im_1context_1get_1preedit_1string_FUNC,
+ gtk_1im_1context_1get_1type_FUNC,
+ gtk_1im_1context_1reset_FUNC,
+ gtk_1im_1context_1set_1client_1window_FUNC,
+ gtk_1im_1context_1set_1cursor_1location_FUNC,
+ gtk_1im_1multicontext_1new_FUNC,
+ gtk_1image_1new_FUNC,
+ gtk_1image_1set_1pixel_1size_FUNC,
+ gtk_1label_1get_1layout_FUNC,
+ gtk_1label_1get_1mnemonic_1keyval_FUNC,
+ gtk_1label_1get_1type_FUNC,
+ gtk_1label_1new_FUNC,
+ gtk_1label_1new_1with_1mnemonic_FUNC,
+ gtk_1label_1set_1attributes_FUNC,
+ gtk_1label_1set_1justify_FUNC,
+ gtk_1label_1set_1text__JJ_FUNC,
+ gtk_1label_1set_1text__J_3B_FUNC,
+ gtk_1label_1set_1text_1with_1mnemonic_FUNC,
+ gtk_1label_1set_1xalign_FUNC,
+ gtk_1label_1set_1yalign_FUNC,
+ gtk_1list_1store_1append_FUNC,
+ gtk_1list_1store_1clear_FUNC,
+ gtk_1list_1store_1insert_FUNC,
+ gtk_1list_1store_1newv_FUNC,
+ gtk_1list_1store_1remove_FUNC,
+ gtk_1list_1store_1set__JJIII_FUNC,
+ gtk_1list_1store_1set__JJIJI_FUNC,
+ gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC,
+ gtk_1list_1store_1set__JJIZI_FUNC,
+ gtk_1list_1store_1set__JJI_3BI_FUNC,
+ gtk_1list_1store_1set_1value_FUNC,
+ gtk_1menu_1button_1new_FUNC,
+ gtk_1message_1dialog_1format_1secondary_1text_FUNC,
+ gtk_1message_1dialog_1new_FUNC,
+ gtk_1native_1dialog_1show_FUNC,
+ gtk_1notebook_1get_1current_1page_FUNC,
+ gtk_1notebook_1get_1n_1pages_FUNC,
+ gtk_1notebook_1get_1scrollable_FUNC,
+ gtk_1notebook_1insert_1page_FUNC,
+ gtk_1notebook_1new_FUNC,
+ gtk_1notebook_1next_1page_FUNC,
+ gtk_1notebook_1prev_1page_FUNC,
+ gtk_1notebook_1remove_1page_FUNC,
+ gtk_1notebook_1set_1current_1page_FUNC,
+ gtk_1notebook_1set_1scrollable_FUNC,
+ gtk_1notebook_1set_1show_1tabs_FUNC,
+ gtk_1notebook_1set_1tab_1pos_FUNC,
+ gtk_1orientable_1set_1orientation_FUNC,
+ gtk_1page_1setup_1get_1bottom_1margin_FUNC,
+ gtk_1page_1setup_1get_1left_1margin_FUNC,
+ gtk_1page_1setup_1get_1orientation_FUNC,
+ gtk_1page_1setup_1get_1page_1height_FUNC,
+ gtk_1page_1setup_1get_1page_1width_FUNC,
+ gtk_1page_1setup_1get_1paper_1height_FUNC,
+ gtk_1page_1setup_1get_1paper_1size_FUNC,
+ gtk_1page_1setup_1get_1paper_1width_FUNC,
+ gtk_1page_1setup_1get_1right_1margin_FUNC,
+ gtk_1page_1setup_1get_1top_1margin_FUNC,
+ gtk_1page_1setup_1new_FUNC,
+ gtk_1page_1setup_1set_1bottom_1margin_FUNC,
+ gtk_1page_1setup_1set_1left_1margin_FUNC,
+ gtk_1page_1setup_1set_1orientation_FUNC,
+ gtk_1page_1setup_1set_1paper_1size_FUNC,
+ gtk_1page_1setup_1set_1right_1margin_FUNC,
+ gtk_1page_1setup_1set_1top_1margin_FUNC,
+ gtk_1paper_1size_1free_FUNC,
+ gtk_1paper_1size_1get_1display_1name_FUNC,
+ gtk_1paper_1size_1get_1height_FUNC,
+ gtk_1paper_1size_1get_1name_FUNC,
+ gtk_1paper_1size_1get_1ppd_1name_FUNC,
+ gtk_1paper_1size_1get_1width_FUNC,
+ gtk_1paper_1size_1is_1custom_FUNC,
+ gtk_1paper_1size_1new_FUNC,
+ gtk_1paper_1size_1new_1custom_FUNC,
+ gtk_1paper_1size_1new_1from_1ppd_FUNC,
+ gtk_1plug_1new_FUNC,
+ gtk_1popover_1popdown_FUNC,
+ gtk_1popover_1popup_FUNC,
+ gtk_1popover_1set_1pointing_1to_FUNC,
+ gtk_1popover_1set_1position_FUNC,
+ gtk_1print_1job_1get_1surface_FUNC,
+ gtk_1print_1job_1new_FUNC,
+ gtk_1print_1job_1send_FUNC,
+ gtk_1print_1settings_1foreach_FUNC,
+ gtk_1print_1settings_1get_FUNC,
+ gtk_1print_1settings_1get_1collate_FUNC,
+ gtk_1print_1settings_1get_1duplex_FUNC,
+ gtk_1print_1settings_1get_1n_1copies_FUNC,
+ gtk_1print_1settings_1get_1page_1ranges_FUNC,
+ gtk_1print_1settings_1get_1print_1pages_FUNC,
+ gtk_1print_1settings_1get_1resolution_FUNC,
+ gtk_1print_1settings_1new_FUNC,
+ gtk_1print_1settings_1set_FUNC,
+ gtk_1print_1settings_1set_1collate_FUNC,
+ gtk_1print_1settings_1set_1duplex_FUNC,
+ gtk_1print_1settings_1set_1n_1copies_FUNC,
+ gtk_1print_1settings_1set_1orientation_FUNC,
+ gtk_1print_1settings_1set_1page_1ranges_FUNC,
+ gtk_1print_1settings_1set_1print_1pages_FUNC,
+ gtk_1print_1settings_1set_1printer_FUNC,
+ gtk_1print_1unix_1dialog_1get_1current_1page_FUNC,
+ gtk_1print_1unix_1dialog_1get_1page_1setup_FUNC,
+ gtk_1print_1unix_1dialog_1get_1selected_1printer_FUNC,
+ gtk_1print_1unix_1dialog_1get_1settings_FUNC,
+ gtk_1print_1unix_1dialog_1new_FUNC,
+ gtk_1print_1unix_1dialog_1set_1current_1page_FUNC,
+ gtk_1print_1unix_1dialog_1set_1embed_1page_1setup_FUNC,
+ gtk_1print_1unix_1dialog_1set_1has_1selection_FUNC,
+ gtk_1print_1unix_1dialog_1set_1manual_1capabilities_FUNC,
+ gtk_1print_1unix_1dialog_1set_1page_1setup_FUNC,
+ gtk_1print_1unix_1dialog_1set_1settings_FUNC,
+ gtk_1print_1unix_1dialog_1set_1support_1selection_FUNC,
+ gtk_1printer_1get_1backend_FUNC,
+ gtk_1printer_1get_1name_FUNC,
+ gtk_1printer_1is_1default_FUNC,
+ gtk_1printer_1option_1widget_1get_1type_FUNC,
+ gtk_1progress_1bar_1new_FUNC,
+ gtk_1progress_1bar_1pulse_FUNC,
+ gtk_1progress_1bar_1set_1fraction_FUNC,
+ gtk_1progress_1bar_1set_1inverted_FUNC,
+ gtk_1range_1get_1adjustment_FUNC,
+ gtk_1range_1get_1slider_1range_FUNC,
+ gtk_1range_1get_1value_FUNC,
+ gtk_1range_1set_1increments_FUNC,
+ gtk_1range_1set_1inverted_FUNC,
+ gtk_1range_1set_1range_FUNC,
+ gtk_1range_1set_1value_FUNC,
+ gtk_1render_1background_FUNC,
+ gtk_1render_1focus_FUNC,
+ gtk_1render_1frame_FUNC,
+ gtk_1render_1handle_FUNC,
+ gtk_1scale_1new_FUNC,
+ gtk_1scale_1set_1digits_FUNC,
+ gtk_1scale_1set_1draw_1value_FUNC,
+ gtk_1scrollable_1get_1vadjustment_FUNC,
+ gtk_1scrollbar_1new_FUNC,
+ gtk_1scrolled_1window_1get_1hadjustment_FUNC,
+ gtk_1scrolled_1window_1get_1hscrollbar_FUNC,
+ gtk_1scrolled_1window_1get_1overlay_1scrolling_FUNC,
+ gtk_1scrolled_1window_1get_1policy_FUNC,
+ gtk_1scrolled_1window_1get_1vadjustment_FUNC,
+ gtk_1scrolled_1window_1get_1vscrollbar_FUNC,
+ gtk_1scrolled_1window_1set_1hadjustment_FUNC,
+ gtk_1scrolled_1window_1set_1policy_FUNC,
+ gtk_1scrolled_1window_1set_1vadjustment_FUNC,
+ gtk_1search_1entry_1new_FUNC,
+ gtk_1separator_1new_FUNC,
+ gtk_1settings_1get_1default_FUNC,
+ gtk_1socket_1get_1id_FUNC,
+ gtk_1socket_1new_FUNC,
+ gtk_1spin_1button_1configure_FUNC,
+ gtk_1spin_1button_1get_1adjustment_FUNC,
+ gtk_1spin_1button_1get_1digits_FUNC,
+ gtk_1spin_1button_1new_FUNC,
+ gtk_1spin_1button_1set_1increments_FUNC,
+ gtk_1spin_1button_1set_1numeric_FUNC,
+ gtk_1spin_1button_1set_1range_FUNC,
+ gtk_1spin_1button_1set_1value_FUNC,
+ gtk_1spin_1button_1set_1wrap_FUNC,
+ gtk_1spin_1button_1update_FUNC,
+ gtk_1status_1icon_1position_1menu_1func_FUNC,
+ gtk_1style_1context_1add_1class_FUNC,
+ gtk_1style_1context_1add_1provider_FUNC,
+ gtk_1style_1context_1remove_1class_FUNC,
+ gtk_1style_1context_1restore_FUNC,
+ gtk_1style_1context_1save_FUNC,
+ gtk_1style_1context_1set_1state_FUNC,
+ gtk_1text_1buffer_1copy_1clipboard_FUNC,
+ gtk_1text_1buffer_1create_1mark_FUNC,
+ gtk_1text_1buffer_1cut_1clipboard_FUNC,
+ gtk_1text_1buffer_1delete_FUNC,
+ gtk_1text_1buffer_1get_1bounds_FUNC,
+ gtk_1text_1buffer_1get_1end_1iter_FUNC,
+ gtk_1text_1buffer_1get_1insert_FUNC,
+ gtk_1text_1buffer_1get_1iter_1at_1line_FUNC,
+ gtk_1text_1buffer_1get_1iter_1at_1mark_FUNC,
+ gtk_1text_1buffer_1get_1iter_1at_1offset_FUNC,
+ gtk_1text_1buffer_1get_1line_1count_FUNC,
+ gtk_1text_1buffer_1get_1selection_1bound_FUNC,
+ gtk_1text_1buffer_1get_1selection_1bounds_FUNC,
+ gtk_1text_1buffer_1get_1text_FUNC,
+ gtk_1text_1buffer_1insert__JJ_3BI_FUNC,
+ gtk_1text_1buffer_1insert__J_3B_3BI_FUNC,
+ gtk_1text_1buffer_1paste_1clipboard_FUNC,
+ gtk_1text_1buffer_1place_1cursor_FUNC,
+ gtk_1text_1buffer_1select_1range_FUNC,
+ gtk_1text_1buffer_1set_1text_FUNC,
+ gtk_1text_1iter_1get_1line_FUNC,
+ gtk_1text_1iter_1get_1offset_FUNC,
+ gtk_1text_1view_1buffer_1to_1window_1coords_FUNC,
+ gtk_1text_1view_1get_1buffer_FUNC,
+ gtk_1text_1view_1get_1editable_FUNC,
+ gtk_1text_1view_1get_1iter_1at_1location_FUNC,
+ gtk_1text_1view_1get_1iter_1location_FUNC,
+ gtk_1text_1view_1get_1line_1at_1y_FUNC,
+ gtk_1text_1view_1get_1line_1yrange_FUNC,
+ gtk_1text_1view_1get_1visible_1rect_FUNC,
+ gtk_1text_1view_1new_FUNC,
+ gtk_1text_1view_1scroll_1to_1iter_FUNC,
+ gtk_1text_1view_1scroll_1to_1mark_FUNC,
+ gtk_1text_1view_1set_1editable_FUNC,
+ gtk_1text_1view_1set_1justification_FUNC,
+ gtk_1text_1view_1set_1tabs_FUNC,
+ gtk_1text_1view_1set_1wrap_1mode_FUNC,
+ gtk_1toggle_1button_1get_1active_FUNC,
+ gtk_1toggle_1button_1new_FUNC,
+ gtk_1toggle_1button_1set_1active_FUNC,
+ gtk_1tooltip_1get_1type_FUNC,
+ gtk_1tooltip_1set_1custom_FUNC,
+ gtk_1tree_1model_1get__JJI_3II_FUNC,
+ gtk_1tree_1model_1get__JJI_3JI_FUNC,
+ gtk_1tree_1model_1get_1iter_FUNC,
+ gtk_1tree_1model_1get_1iter_1first_FUNC,
+ gtk_1tree_1model_1get_1n_1columns_FUNC,
+ gtk_1tree_1model_1get_1path_FUNC,
+ gtk_1tree_1model_1get_1type_FUNC,
+ gtk_1tree_1model_1get_1value_FUNC,
+ gtk_1tree_1model_1iter_1children_FUNC,
+ gtk_1tree_1model_1iter_1n_1children_FUNC,
+ gtk_1tree_1model_1iter_1next_FUNC,
+ gtk_1tree_1model_1iter_1nth_1child_FUNC,
+ gtk_1tree_1path_1append_1index_FUNC,
+ gtk_1tree_1path_1compare_FUNC,
+ gtk_1tree_1path_1free_FUNC,
+ gtk_1tree_1path_1get_1depth_FUNC,
+ gtk_1tree_1path_1get_1indices_FUNC,
+ gtk_1tree_1path_1new_FUNC,
+ gtk_1tree_1path_1new_1from_1string__J_FUNC,
+ gtk_1tree_1path_1new_1from_1string___3B_FUNC,
+ gtk_1tree_1path_1next_FUNC,
+ gtk_1tree_1path_1prev_FUNC,
+ gtk_1tree_1path_1up_FUNC,
+ gtk_1tree_1selection_1count_1selected_1rows_FUNC,
+ gtk_1tree_1selection_1get_1selected_1rows_FUNC,
+ gtk_1tree_1selection_1path_1is_1selected_FUNC,
+ gtk_1tree_1selection_1select_1all_FUNC,
+ gtk_1tree_1selection_1select_1iter_FUNC,
+ gtk_1tree_1selection_1set_1mode_FUNC,
+ gtk_1tree_1selection_1set_1select_1function_FUNC,
+ gtk_1tree_1selection_1unselect_1all_FUNC,
+ gtk_1tree_1selection_1unselect_1iter_FUNC,
+ gtk_1tree_1selection_1unselect_1path_FUNC,
+ gtk_1tree_1store_1append_FUNC,
+ gtk_1tree_1store_1clear_FUNC,
+ gtk_1tree_1store_1insert_FUNC,
+ gtk_1tree_1store_1insert_1after_FUNC,
+ gtk_1tree_1store_1newv_FUNC,
+ gtk_1tree_1store_1prepend_FUNC,
+ gtk_1tree_1store_1remove_FUNC,
+ gtk_1tree_1store_1set__JJIII_FUNC,
+ gtk_1tree_1store_1set__JJIJI_FUNC,
+ gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkRGBA_2I_FUNC,
+ gtk_1tree_1store_1set__JJIZI_FUNC,
+ gtk_1tree_1store_1set__JJI_3BI_FUNC,
+ gtk_1tree_1store_1set_1value_FUNC,
+ gtk_1tree_1view_1collapse_1row_FUNC,
+ gtk_1tree_1view_1column_1add_1attribute_FUNC,
+ gtk_1tree_1view_1column_1cell_1get_1position_FUNC,
+ gtk_1tree_1view_1column_1cell_1set_1cell_1data_FUNC,
+ gtk_1tree_1view_1column_1clear_FUNC,
+ gtk_1tree_1view_1column_1get_1button_FUNC,
+ gtk_1tree_1view_1column_1get_1fixed_1width_FUNC,
+ gtk_1tree_1view_1column_1get_1reorderable_FUNC,
+ gtk_1tree_1view_1column_1get_1resizable_FUNC,
+ gtk_1tree_1view_1column_1get_1visible_FUNC,
+ gtk_1tree_1view_1column_1get_1width_FUNC,
+ gtk_1tree_1view_1column_1new_FUNC,
+ gtk_1tree_1view_1column_1pack_1end_FUNC,
+ gtk_1tree_1view_1column_1pack_1start_FUNC,
+ gtk_1tree_1view_1column_1set_1alignment_FUNC,
+ gtk_1tree_1view_1column_1set_1cell_1data_1func_FUNC,
+ gtk_1tree_1view_1column_1set_1clickable_FUNC,
+ gtk_1tree_1view_1column_1set_1fixed_1width_FUNC,
+ gtk_1tree_1view_1column_1set_1min_1width_FUNC,
+ gtk_1tree_1view_1column_1set_1reorderable_FUNC,
+ gtk_1tree_1view_1column_1set_1resizable_FUNC,
+ gtk_1tree_1view_1column_1set_1sizing_FUNC,
+ gtk_1tree_1view_1column_1set_1sort_1indicator_FUNC,
+ gtk_1tree_1view_1column_1set_1sort_1order_FUNC,
+ gtk_1tree_1view_1column_1set_1visible_FUNC,
+ gtk_1tree_1view_1column_1set_1widget_FUNC,
+ gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC,
+ gtk_1tree_1view_1convert_1bin_1window_1to_1widget_1coords_FUNC,
+ gtk_1tree_1view_1create_1row_1drag_1icon_FUNC,
+ gtk_1tree_1view_1expand_1row_FUNC,
+ gtk_1tree_1view_1get_1background_1area_FUNC,
+ gtk_1tree_1view_1get_1cell_1area_FUNC,
+ gtk_1tree_1view_1get_1column_FUNC,
+ gtk_1tree_1view_1get_1columns_FUNC,
+ gtk_1tree_1view_1get_1cursor_FUNC,
+ gtk_1tree_1view_1get_1expander_1column_FUNC,
+ gtk_1tree_1view_1get_1grid_1lines_FUNC,
+ gtk_1tree_1view_1get_1headers_1visible_FUNC,
+ gtk_1tree_1view_1get_1path_1at_1pos_FUNC,
+ gtk_1tree_1view_1get_1selection_FUNC,
+ gtk_1tree_1view_1get_1visible_1rect_FUNC,
+ gtk_1tree_1view_1insert_1column_FUNC,
+ gtk_1tree_1view_1move_1column_1after_FUNC,
+ gtk_1tree_1view_1new_1with_1model_FUNC,
+ gtk_1tree_1view_1remove_1column_FUNC,
+ gtk_1tree_1view_1row_1expanded_FUNC,
+ gtk_1tree_1view_1scroll_1to_1cell_FUNC,
+ gtk_1tree_1view_1scroll_1to_1point_FUNC,
+ gtk_1tree_1view_1set_1cursor_FUNC,
+ gtk_1tree_1view_1set_1drag_1dest_1row_FUNC,
+ gtk_1tree_1view_1set_1grid_1lines_FUNC,
+ gtk_1tree_1view_1set_1headers_1visible_FUNC,
+ gtk_1tree_1view_1set_1model_FUNC,
+ gtk_1tree_1view_1set_1search_1column_FUNC,
+ gtk_1widget_1activate_FUNC,
+ gtk_1widget_1add_1css_1class_FUNC,
+ gtk_1widget_1child_1focus_FUNC,
+ gtk_1widget_1class_1get_1css_1name_FUNC,
+ gtk_1widget_1create_1pango_1layout__JJ_FUNC,
+ gtk_1widget_1create_1pango_1layout__J_3B_FUNC,
+ gtk_1widget_1get_1allocation_FUNC,
+ gtk_1widget_1get_1child_1visible_FUNC,
+ gtk_1widget_1get_1mapped_FUNC,
+ gtk_1widget_1get_1margin_1bottom_FUNC,
+ gtk_1widget_1get_1margin_1end_FUNC,
+ gtk_1widget_1get_1margin_1start_FUNC,
+ gtk_1widget_1get_1margin_1top_FUNC,
+ gtk_1widget_1get_1name_FUNC,
+ gtk_1widget_1get_1opacity_FUNC,
+ gtk_1widget_1get_1pango_1context_FUNC,
+ gtk_1widget_1get_1parent_FUNC,
+ gtk_1widget_1get_1parent_1surface_FUNC,
+ gtk_1widget_1get_1parent_1window_FUNC,
+ gtk_1widget_1get_1preferred_1size_FUNC,
+ gtk_1widget_1get_1realized_FUNC,
+ gtk_1widget_1get_1scale_1factor_FUNC,
+ gtk_1widget_1get_1sensitive_FUNC,
+ gtk_1widget_1get_1size_1request_FUNC,
+ gtk_1widget_1get_1state_1flags_FUNC,
+ gtk_1widget_1get_1style_1context_FUNC,
+ gtk_1widget_1get_1tooltip_1text_FUNC,
+ gtk_1widget_1get_1visible_FUNC,
+ gtk_1widget_1grab_1focus_FUNC,
+ gtk_1widget_1has_1default_FUNC,
+ gtk_1widget_1has_1focus_FUNC,
+ gtk_1widget_1hide_FUNC,
+ gtk_1widget_1insert_1action_1group_FUNC,
+ gtk_1widget_1is_1focus_FUNC,
+ gtk_1widget_1mnemonic_1activate_FUNC,
+ gtk_1widget_1queue_1draw_FUNC,
+ gtk_1widget_1queue_1resize_FUNC,
+ gtk_1widget_1realize_FUNC,
+ gtk_1widget_1set_1can_1focus_FUNC,
+ gtk_1widget_1set_1default_1direction_FUNC,
+ gtk_1widget_1set_1direction_FUNC,
+ gtk_1widget_1set_1focus_1on_1click_FUNC,
+ gtk_1widget_1set_1halign_FUNC,
+ gtk_1widget_1set_1hexpand_FUNC,
+ gtk_1widget_1set_1margin_1bottom_FUNC,
+ gtk_1widget_1set_1margin_1end_FUNC,
+ gtk_1widget_1set_1margin_1start_FUNC,
+ gtk_1widget_1set_1margin_1top_FUNC,
+ gtk_1widget_1set_1opacity_FUNC,
+ gtk_1widget_1set_1parent_FUNC,
+ gtk_1widget_1set_1receives_1default_FUNC,
+ gtk_1widget_1set_1sensitive_FUNC,
+ gtk_1widget_1set_1size_1request_FUNC,
+ gtk_1widget_1set_1tooltip_1text_FUNC,
+ gtk_1widget_1set_1valign_FUNC,
+ gtk_1widget_1set_1vexpand_FUNC,
+ gtk_1widget_1set_1visible_FUNC,
+ gtk_1widget_1show_FUNC,
+ gtk_1widget_1unparent_FUNC,
+ gtk_1window_1fullscreen_FUNC,
+ gtk_1window_1get_1default_1size_FUNC,
+ gtk_1window_1get_1default_1widget_FUNC,
+ gtk_1window_1get_1focus_FUNC,
+ gtk_1window_1get_1group_FUNC,
+ gtk_1window_1get_1modal_FUNC,
+ gtk_1window_1group_1add_1window_FUNC,
+ gtk_1window_1group_1new_FUNC,
+ gtk_1window_1group_1remove_1window_FUNC,
+ gtk_1window_1is_1active_FUNC,
+ gtk_1window_1list_1toplevels_FUNC,
+ gtk_1window_1maximize_FUNC,
+ gtk_1window_1set_1decorated_FUNC,
+ gtk_1window_1set_1default_1size_FUNC,
+ gtk_1window_1set_1destroy_1with_1parent_FUNC,
+ gtk_1window_1set_1modal_FUNC,
+ gtk_1window_1set_1resizable_FUNC,
+ gtk_1window_1set_1title_FUNC,
+ gtk_1window_1set_1transient_1for_FUNC,
+ gtk_1window_1unfullscreen_FUNC,
+ gtk_1window_1unmaximize_FUNC,
} GTK_FUNCS;
#ifdef NATIVE_STATS
extern int Graphene_nativeFunctionCount;
@@ -1089,9 +840,9 @@ extern char* Graphene_nativeFunctionNames[];
#endif
typedef enum {
- _1graphene_1rect_1alloc_FUNC,
- _1graphene_1rect_1free_FUNC,
- _1graphene_1rect_1init_FUNC,
+ graphene_1rect_1alloc_FUNC,
+ graphene_1rect_1free_FUNC,
+ graphene_1rect_1init_FUNC,
} Graphene_FUNCS;
#ifdef NATIVE_STATS
extern int OS_nativeFunctionCount;
@@ -1110,21 +861,31 @@ extern char* OS_nativeFunctionNames[];
typedef enum {
Call__JJII_FUNC,
- Call__JJIJ_FUNC,
+ Call__JJJ_FUNC,
+ FcConfigAppFontAddFile_FUNC,
GDK_1WINDOWING_1WAYLAND_FUNC,
GDK_1WINDOWING_1X11_FUNC,
- GInterfaceInfo_1sizeof_FUNC,
GPollFD_1sizeof_FUNC,
GTypeInfo_1sizeof_FUNC,
- GTypeQuery_1sizeof_FUNC,
+ GValue_1sizeof_FUNC,
G_1OBJECT_1CLASS_1CONSTRUCTOR_FUNC,
G_1OBJECT_1CLASS_1SET_1CONSTRUCTOR_FUNC,
+ G_1OBJECT_1GET_1CLASS_FUNC,
+ G_1OBJECT_1TYPE_FUNC,
+ G_1OBJECT_1TYPE_1NAME_FUNC,
G_1TYPE_1BOOLEAN_FUNC,
G_1TYPE_1DOUBLE_FUNC,
G_1TYPE_1FLOAT_FUNC,
G_1TYPE_1INT_FUNC,
G_1TYPE_1INT64_FUNC,
+ G_1TYPE_1LONG_FUNC,
+ G_1TYPE_1STRING_FUNC,
G_1VALUE_1TYPE_FUNC,
+ PANGO_1PIXELS_FUNC,
+ PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC,
+ PANGO_1TYPE_1FONT_1FACE_FUNC,
+ PANGO_1TYPE_1FONT_1FAMILY_FUNC,
+ PANGO_1TYPE_1LAYOUT_FUNC,
PangoAttrColor_1sizeof_FUNC,
PangoAttrInt_1sizeof_FUNC,
PangoAttribute_1sizeof_FUNC,
@@ -1133,359 +894,234 @@ typedef enum {
PangoLayoutRun_1sizeof_FUNC,
PangoLogAttr_1sizeof_FUNC,
PangoRectangle_1sizeof_FUNC,
- RTLD_1GLOBAL_FUNC,
- RTLD_1LAZY_FUNC,
- RTLD_1NOW_FUNC,
XAnyEvent_1sizeof_FUNC,
+ XCheckIfEvent_FUNC,
+ XDefaultRootWindow_FUNC,
+ XDefaultScreen_FUNC,
XEvent_1sizeof_FUNC,
XExposeEvent_1sizeof_FUNC,
XFocusChangeEvent_1sizeof_FUNC,
+ XFree_FUNC,
+ XQueryPointer_FUNC,
+ XSetErrorHandler_FUNC,
+ XSetIOErrorHandler_FUNC,
+ XSetInputFocus_FUNC,
+ XSetTransientForHint_FUNC,
+ XSynchronize_FUNC,
X_1EVENT_1TYPE_FUNC,
X_1EVENT_1WINDOW_FUNC,
- _1Call_FUNC,
- _1FcConfigAppFontAddFile_FUNC,
- _1GString_1len_FUNC,
- _1GString_1str_FUNC,
- _1G_1OBJECT_1CLASS_FUNC,
- _1G_1OBJECT_1GET_1CLASS_FUNC,
- _1G_1OBJECT_1TYPE_FUNC,
- _1G_1OBJECT_1TYPE_1NAME_FUNC,
- _1G_1TYPE_1CHECK_1INSTANCE_1TYPE_FUNC,
- _1G_1TYPE_1STRING_FUNC,
- _1PANGO_1PIXELS_FUNC,
- _1PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC,
- _1PANGO_1TYPE_1FONT_1FACE_FUNC,
- _1PANGO_1TYPE_1FONT_1FAMILY_FUNC,
- _1PANGO_1TYPE_1LAYOUT_FUNC,
- _1XCheckIfEvent_FUNC,
- _1XDefaultRootWindow_FUNC,
- _1XDefaultScreen_FUNC,
- _1XFree_FUNC,
- _1XQueryPointer_FUNC,
- _1XSetErrorHandler_FUNC,
- _1XSetIOErrorHandler_FUNC,
- _1XSetInputFocus_FUNC,
- _1XSetTransientForHint_FUNC,
- _1XSynchronize_FUNC,
- _1access_FUNC,
- _1cachejvmptr_FUNC,
- _1call__JJJJJ_FUNC,
- _1call__JJJJJJJ_FUNC,
- _1call__JJJJJJJJ_FUNC,
- _1dlopen_FUNC,
- _1g_1app_1info_1create_1from_1commandline_FUNC,
- _1g_1app_1info_1get_1all_FUNC,
- _1g_1app_1info_1get_1default_1for_1type_FUNC,
- _1g_1app_1info_1get_1executable_FUNC,
- _1g_1app_1info_1get_1icon_FUNC,
- _1g_1app_1info_1get_1name_FUNC,
- _1g_1app_1info_1launch_FUNC,
- _1g_1app_1info_1launch_1default_1for_1uri_FUNC,
- _1g_1app_1info_1should_1show_FUNC,
- _1g_1app_1info_1supports_1uris_FUNC,
- _1g_1bus_1own_1name_FUNC,
- _1g_1bytes_1new_FUNC,
- _1g_1bytes_1unref_FUNC,
- _1g_1cclosure_1new_FUNC,
- _1g_1closure_1ref_FUNC,
- _1g_1closure_1sink_FUNC,
- _1g_1closure_1unref_FUNC,
- _1g_1content_1type_1equals_FUNC,
- _1g_1content_1type_1is_1a_FUNC,
- _1g_1dbus_1connection_1register_1object_FUNC,
- _1g_1dbus_1method_1invocation_1return_1value_FUNC,
- _1g_1dbus_1node_1info_1lookup_1interface_FUNC,
- _1g_1dbus_1node_1info_1new_1for_1xml_FUNC,
- _1g_1dbus_1proxy_1call_FUNC,
- _1g_1dbus_1proxy_1call_1finish_FUNC,
- _1g_1dbus_1proxy_1call_1sync_FUNC,
- _1g_1dbus_1proxy_1get_1name_1owner_FUNC,
- _1g_1dbus_1proxy_1new_1for_1bus_1sync_FUNC,
- _1g_1error_1free_FUNC,
- _1g_1error_1get_1message_FUNC,
- _1g_1file_1get_1uri_FUNC,
- _1g_1file_1info_1get_1content_1type_FUNC,
- _1g_1file_1new_1for_1commandline_1arg_FUNC,
- _1g_1file_1new_1for_1path_FUNC,
- _1g_1file_1new_1for_1uri_FUNC,
- _1g_1file_1query_1info_FUNC,
- _1g_1file_1test_FUNC,
- _1g_1filename_1display_1name_FUNC,
- _1g_1filename_1from_1uri_FUNC,
- _1g_1filename_1from_1utf8_FUNC,
- _1g_1filename_1to_1uri_FUNC,
- _1g_1filename_1to_1utf8_FUNC,
- _1g_1free_FUNC,
- _1g_1get_1current_1time_FUNC,
- _1g_1getenv_FUNC,
- _1g_1hash_1table_1get_1values_FUNC,
- _1g_1icon_1new_1for_1string_FUNC,
- _1g_1icon_1to_1string_FUNC,
- _1g_1idle_1add_FUNC,
- _1g_1list_1append_FUNC,
- _1g_1list_1data_FUNC,
- _1g_1list_1free_FUNC,
- _1g_1list_1free_11_FUNC,
- _1g_1list_1last_FUNC,
- _1g_1list_1length_FUNC,
- _1g_1list_1next_FUNC,
- _1g_1list_1nth_FUNC,
- _1g_1list_1nth_1data_FUNC,
- _1g_1list_1prepend_FUNC,
- _1g_1list_1previous_FUNC,
- _1g_1list_1remove_1link_FUNC,
- _1g_1list_1set_1next_FUNC,
- _1g_1list_1set_1previous_FUNC,
- _1g_1log_1default_1handler_FUNC,
- _1g_1log_1remove_1handler_FUNC,
- _1g_1log_1set_1handler_FUNC,
- _1g_1main_1context_1acquire_FUNC,
- _1g_1main_1context_1check_FUNC,
- _1g_1main_1context_1default_FUNC,
- _1g_1main_1context_1get_1poll_1func_FUNC,
- _1g_1main_1context_1iteration_FUNC,
- _1g_1main_1context_1prepare_FUNC,
- _1g_1main_1context_1query_FUNC,
- _1g_1main_1context_1release_FUNC,
- _1g_1malloc_FUNC,
- _1g_1object_1class_1find_1property_FUNC,
- _1g_1object_1get__J_3B_3IJ_FUNC,
- _1g_1object_1get__J_3B_3JJ_FUNC,
- _1g_1object_1get_1qdata_FUNC,
- _1g_1object_1new_FUNC,
- _1g_1object_1notify_FUNC,
- _1g_1object_1ref_FUNC,
- _1g_1object_1ref_1sink_FUNC,
- _1g_1object_1set__J_3BFJ_FUNC,
- _1g_1object_1set__J_3BIJ_FUNC,
- _1g_1object_1set__J_3BJJ_FUNC,
- _1g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC,
- _1g_1object_1set__J_3BZJ_FUNC,
- _1g_1object_1set__J_3B_3BJ_FUNC,
- _1g_1object_1set_1qdata_FUNC,
- _1g_1object_1unref_FUNC,
- _1g_1quark_1from_1string_FUNC,
- _1g_1set_1prgname_FUNC,
- _1g_1signal_1add_1emission_1hook_FUNC,
- _1g_1signal_1connect_FUNC,
- _1g_1signal_1connect_1closure_FUNC,
- _1g_1signal_1connect_1closure_1by_1id_FUNC,
- _1g_1signal_1emit_1by_1name__J_3B_FUNC,
- _1g_1signal_1emit_1by_1name__J_3BJ_FUNC,
- _1g_1signal_1emit_1by_1name__J_3BJJ_FUNC,
- _1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC,
- _1g_1signal_1emit_1by_1name__J_3B_3B_FUNC,
- _1g_1signal_1handler_1disconnect_FUNC,
- _1g_1signal_1handler_1find_FUNC,
- _1g_1signal_1handlers_1block_1matched_FUNC,
- _1g_1signal_1handlers_1unblock_1matched_FUNC,
- _1g_1signal_1lookup_FUNC,
- _1g_1signal_1remove_1emission_1hook_FUNC,
- _1g_1signal_1stop_1emission_1by_1name_FUNC,
- _1g_1slist_1append_FUNC,
- _1g_1slist_1data_FUNC,
- _1g_1slist_1free_FUNC,
- _1g_1slist_1length_FUNC,
- _1g_1slist_1next_FUNC,
- _1g_1source_1remove_FUNC,
- _1g_1strfreev_FUNC,
- _1g_1string_1free_FUNC,
- _1g_1string_1new_1len_FUNC,
- _1g_1strtod_FUNC,
- _1g_1time_1val_1add_FUNC,
- _1g_1timeout_1add_FUNC,
- _1g_1type_1add_1interface_1static_FUNC,
- _1g_1type_1class_1peek_FUNC,
- _1g_1type_1class_1peek_1parent_FUNC,
- _1g_1type_1class_1ref_FUNC,
- _1g_1type_1class_1unref_FUNC,
- _1g_1type_1interface_1peek_1parent_FUNC,
- _1g_1type_1is_1a_FUNC,
- _1g_1type_1parent_FUNC,
- _1g_1type_1query_FUNC,
- _1g_1type_1register_1static_FUNC,
- _1g_1unsetenv_FUNC,
- _1g_1utf16_1offset_1to_1pointer_FUNC,
- _1g_1utf16_1offset_1to_1utf8_1offset_FUNC,
- _1g_1utf16_1pointer_1to_1offset_FUNC,
- _1g_1utf16_1strlen_FUNC,
- _1g_1utf16_1to_1utf8_FUNC,
- _1g_1utf8_1offset_1to_1utf16_1offset_FUNC,
- _1g_1utf8_1pointer_1to_1offset_FUNC,
- _1g_1utf8_1strlen_FUNC,
- _1g_1utf8_1to_1utf16__JJ_3J_3J_3J_FUNC,
- _1g_1utf8_1to_1utf16___3BJ_3J_3J_3J_FUNC,
- _1g_1value_1peek_1pointer_FUNC,
- _1g_1variant_1builder_1add_1value_FUNC,
- _1g_1variant_1builder_1end_FUNC,
- _1g_1variant_1builder_1new_FUNC,
- _1g_1variant_1builder_1unref_FUNC,
- _1g_1variant_1get_1boolean_FUNC,
- _1g_1variant_1get_1byte_FUNC,
- _1g_1variant_1get_1child_1value_FUNC,
- _1g_1variant_1get_1double_FUNC,
- _1g_1variant_1get_1int32_FUNC,
- _1g_1variant_1get_1string_FUNC,
- _1g_1variant_1get_1type_FUNC,
- _1g_1variant_1get_1type_1string_FUNC,
- _1g_1variant_1get_1uint64_FUNC,
- _1g_1variant_1is_1of_1type_FUNC,
- _1g_1variant_1n_1children_FUNC,
- _1g_1variant_1new___3BZ_3B_FUNC,
- _1g_1variant_1new___3B_3B_FUNC,
- _1g_1variant_1new___3B_3B_3B_FUNC,
- _1g_1variant_1new_1boolean_FUNC,
- _1g_1variant_1new_1byte_FUNC,
- _1g_1variant_1new_1double_FUNC,
- _1g_1variant_1new_1int32_FUNC,
- _1g_1variant_1new_1string_FUNC,
- _1g_1variant_1new_1tuple_FUNC,
- _1g_1variant_1new_1uint64_FUNC,
- _1g_1variant_1type_1free_FUNC,
- _1g_1variant_1type_1new_FUNC,
- _1g_1variant_1unref_FUNC,
- _1getpid_FUNC,
- _1glib_1major_1version_FUNC,
- _1glib_1micro_1version_FUNC,
- _1glib_1minor_1version_FUNC,
- _1pango_1attr_1background_1new_FUNC,
- _1pango_1attr_1font_1desc_1new_FUNC,
- _1pango_1attr_1foreground_1new_FUNC,
- _1pango_1attr_1iterator_1destroy_FUNC,
- _1pango_1attr_1iterator_1get_FUNC,
- _1pango_1attr_1iterator_1next_FUNC,
- _1pango_1attr_1iterator_1range_FUNC,
- _1pango_1attr_1list_1get_1iterator_FUNC,
- _1pango_1attr_1list_1insert_FUNC,
- _1pango_1attr_1list_1new_FUNC,
- _1pango_1attr_1list_1unref_FUNC,
- _1pango_1attr_1rise_1new_FUNC,
- _1pango_1attr_1shape_1new_FUNC,
- _1pango_1attr_1strikethrough_1color_1new_FUNC,
- _1pango_1attr_1strikethrough_1new_FUNC,
- _1pango_1attr_1underline_1color_1new_FUNC,
- _1pango_1attr_1underline_1new_FUNC,
- _1pango_1attr_1weight_1new_FUNC,
- _1pango_1attribute_1copy_FUNC,
- _1pango_1cairo_1context_1get_1font_1options_FUNC,
- _1pango_1cairo_1context_1set_1font_1options_FUNC,
- _1pango_1cairo_1create_1layout_FUNC,
- _1pango_1cairo_1font_1map_1get_1default_FUNC,
- _1pango_1cairo_1layout_1path_FUNC,
- _1pango_1cairo_1show_1layout_FUNC,
- _1pango_1context_1get_1base_1dir_FUNC,
- _1pango_1context_1get_1language_FUNC,
- _1pango_1context_1get_1metrics_FUNC,
- _1pango_1context_1list_1families_FUNC,
- _1pango_1context_1set_1base_1dir_FUNC,
- _1pango_1context_1set_1language_FUNC,
- _1pango_1font_1description_1copy_FUNC,
- _1pango_1font_1description_1free_FUNC,
- _1pango_1font_1description_1from_1string_FUNC,
- _1pango_1font_1description_1get_1family_FUNC,
- _1pango_1font_1description_1get_1size_FUNC,
- _1pango_1font_1description_1get_1stretch_FUNC,
- _1pango_1font_1description_1get_1style_FUNC,
- _1pango_1font_1description_1get_1variant_FUNC,
- _1pango_1font_1description_1get_1weight_FUNC,
- _1pango_1font_1description_1new_FUNC,
- _1pango_1font_1description_1set_1family_FUNC,
- _1pango_1font_1description_1set_1size_FUNC,
- _1pango_1font_1description_1set_1stretch_FUNC,
- _1pango_1font_1description_1set_1style_FUNC,
- _1pango_1font_1description_1set_1variant_FUNC,
- _1pango_1font_1description_1set_1weight_FUNC,
- _1pango_1font_1description_1to_1string_FUNC,
- _1pango_1font_1face_1describe_FUNC,
- _1pango_1font_1family_1get_1name_FUNC,
- _1pango_1font_1family_1list_1faces_FUNC,
- _1pango_1font_1get_1metrics_FUNC,
- _1pango_1font_1map_1create_1context_FUNC,
- _1pango_1font_1metrics_1get_1approximate_1char_1width_FUNC,
- _1pango_1font_1metrics_1get_1ascent_FUNC,
- _1pango_1font_1metrics_1get_1descent_FUNC,
- _1pango_1font_1metrics_1unref_FUNC,
- _1pango_1layout_1context_1changed_FUNC,
- _1pango_1layout_1get_1alignment_FUNC,
- _1pango_1layout_1get_1context_FUNC,
- _1pango_1layout_1get_1indent_FUNC,
- _1pango_1layout_1get_1iter_FUNC,
- _1pango_1layout_1get_1justify_FUNC,
- _1pango_1layout_1get_1line_FUNC,
- _1pango_1layout_1get_1line_1count_FUNC,
- _1pango_1layout_1get_1log_1attrs_FUNC,
- _1pango_1layout_1get_1pixel_1size_FUNC,
- _1pango_1layout_1get_1size_FUNC,
- _1pango_1layout_1get_1spacing_FUNC,
- _1pango_1layout_1get_1text_FUNC,
- _1pango_1layout_1get_1width_FUNC,
- _1pango_1layout_1index_1to_1pos_FUNC,
- _1pango_1layout_1iter_1free_FUNC,
- _1pango_1layout_1iter_1get_1index_FUNC,
- _1pango_1layout_1iter_1get_1line_1extents_FUNC,
- _1pango_1layout_1iter_1get_1run_FUNC,
- _1pango_1layout_1iter_1next_1line_FUNC,
- _1pango_1layout_1iter_1next_1run_FUNC,
- _1pango_1layout_1line_1get_1extents_FUNC,
- _1pango_1layout_1new_FUNC,
- _1pango_1layout_1set_1alignment_FUNC,
- _1pango_1layout_1set_1attributes_FUNC,
- _1pango_1layout_1set_1auto_1dir_FUNC,
- _1pango_1layout_1set_1font_1description_FUNC,
- _1pango_1layout_1set_1indent_FUNC,
- _1pango_1layout_1set_1justify_FUNC,
- _1pango_1layout_1set_1single_1paragraph_1mode_FUNC,
- _1pango_1layout_1set_1spacing_FUNC,
- _1pango_1layout_1set_1tabs_FUNC,
- _1pango_1layout_1set_1text_FUNC,
- _1pango_1layout_1set_1width_FUNC,
- _1pango_1layout_1set_1wrap_FUNC,
- _1pango_1layout_1xy_1to_1index_FUNC,
- _1pango_1tab_1array_1free_FUNC,
- _1pango_1tab_1array_1new_FUNC,
- _1pango_1tab_1array_1set_1tab_FUNC,
- _1swt_1debug_1on_1fatal_1warnings_FUNC,
- _1swt_1fixed_1accessible_1get_1type_FUNC,
- _1swt_1fixed_1accessible_1register_1accessible_FUNC,
- _1swt_1fixed_1get_1type_FUNC,
- _1swt_1fixed_1move_FUNC,
- _1swt_1fixed_1resize_FUNC,
- _1swt_1fixed_1restack_FUNC,
- _1ubuntu_1menu_1proxy_1get_FUNC,
+ addressof_1g_1free_FUNC,
+ call__JJJJJ_FUNC,
+ call__JJJJJJJ_FUNC,
+ call__JJJJJJJJ_FUNC,
+ g_1action_1get_1enabled_FUNC,
+ g_1action_1get_1state_FUNC,
+ g_1action_1map_1add_1action_FUNC,
+ g_1action_1map_1remove_1action_FUNC,
+ g_1app_1info_1create_1from_1commandline_FUNC,
+ g_1app_1info_1get_1all_FUNC,
+ g_1app_1info_1get_1default_1for_1type_FUNC,
+ g_1app_1info_1get_1executable_FUNC,
+ g_1app_1info_1get_1icon_FUNC,
+ g_1app_1info_1get_1name_FUNC,
+ g_1app_1info_1launch_FUNC,
+ g_1app_1info_1launch_1default_1for_1uri_FUNC,
+ g_1app_1info_1supports_1uris_FUNC,
+ g_1bus_1own_1name_FUNC,
+ g_1bytes_1new_FUNC,
+ g_1bytes_1unref_FUNC,
+ g_1cclosure_1new_FUNC,
+ g_1closure_1ref_FUNC,
+ g_1closure_1sink_FUNC,
+ g_1closure_1unref_FUNC,
+ g_1content_1type_1equals_FUNC,
+ g_1content_1type_1is_1a_FUNC,
+ g_1date_1time_1get_1ymd_FUNC,
+ g_1date_1time_1new_1local_FUNC,
+ g_1date_1time_1unref_FUNC,
+ g_1dbus_1connection_1register_1object_FUNC,
+ g_1dbus_1method_1invocation_1return_1value_FUNC,
+ g_1dbus_1node_1info_1lookup_1interface_FUNC,
+ g_1dbus_1node_1info_1new_1for_1xml_FUNC,
+ g_1dbus_1proxy_1call_FUNC,
+ g_1dbus_1proxy_1call_1sync_FUNC,
+ g_1dbus_1proxy_1get_1name_1owner_FUNC,
+ g_1dbus_1proxy_1new_1for_1bus_1sync_FUNC,
+ g_1dir_1make_1tmp_FUNC,
+ g_1error_1free_FUNC,
+ g_1error_1get_1message_FUNC,
+ g_1error_1matches_FUNC,
+ g_1file_1error_1quark_FUNC,
+ g_1file_1get_1path_FUNC,
+ g_1file_1get_1uri_FUNC,
+ g_1file_1info_1get_1content_1type_FUNC,
+ g_1file_1new_1for_1commandline_1arg_FUNC,
+ g_1file_1new_1for_1path_FUNC,
+ g_1file_1new_1for_1uri_FUNC,
+ g_1file_1query_1info_FUNC,
+ g_1file_1test_FUNC,
+ g_1filename_1display_1name_FUNC,
+ g_1filename_1from_1uri_FUNC,
+ g_1filename_1from_1utf8_FUNC,
+ g_1filename_1to_1uri_FUNC,
+ g_1filename_1to_1utf8_FUNC,
+ g_1free_FUNC,
+ g_1get_1current_1time_FUNC,
+ g_1getenv_FUNC,
+ g_1icon_1new_1for_1string_FUNC,
+ g_1icon_1to_1string_FUNC,
+ g_1idle_1add_FUNC,
+ g_1list_1append_FUNC,
+ g_1list_1data_FUNC,
+ g_1list_1free_FUNC,
+ g_1list_1last_FUNC,
+ g_1list_1length_FUNC,
+ g_1list_1model_1get_1item_FUNC,
+ g_1list_1model_1get_1n_1items_FUNC,
+ g_1list_1next_FUNC,
+ g_1list_1nth_1data_FUNC,
+ g_1list_1previous_FUNC,
+ g_1log_1default_1handler_FUNC,
+ g_1log_1remove_1handler_FUNC,
+ g_1log_1set_1handler_FUNC,
+ g_1main_1context_1acquire_FUNC,
+ g_1main_1context_1check_FUNC,
+ g_1main_1context_1default_FUNC,
+ g_1main_1context_1get_1poll_1func_FUNC,
+ g_1main_1context_1iteration_FUNC,
+ g_1main_1context_1prepare_FUNC,
+ g_1main_1context_1query_FUNC,
+ g_1main_1context_1release_FUNC,
g_1main_1context_1wakeup_FUNC,
+ g_1malloc_FUNC,
+ g_1memory_1input_1stream_1new_1from_1data_FUNC,
+ g_1menu_1insert_1item_FUNC,
+ g_1menu_1item_1new_FUNC,
+ g_1menu_1item_1new_1section_FUNC,
+ g_1menu_1item_1new_1submenu_FUNC,
+ g_1menu_1item_1set_1attribute_FUNC,
+ g_1menu_1item_1set_1label_FUNC,
+ g_1menu_1item_1set_1submenu_FUNC,
+ g_1menu_1new_FUNC,
+ g_1menu_1remove_FUNC,
+ g_1object_1get__J_3B_3IJ_FUNC,
+ g_1object_1get__J_3B_3JJ_FUNC,
+ g_1object_1get_1qdata_FUNC,
+ g_1object_1new_FUNC,
+ g_1object_1notify_FUNC,
+ g_1object_1ref_FUNC,
+ g_1object_1ref_1sink_FUNC,
+ g_1object_1set__J_3BFJ_FUNC,
+ g_1object_1set__J_3BIJ_FUNC,
+ g_1object_1set__J_3BJJ_FUNC,
+ g_1object_1set__J_3BLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC,
+ g_1object_1set__J_3BZJ_FUNC,
+ g_1object_1set__J_3B_3BJ_FUNC,
+ g_1object_1set_1qdata_FUNC,
+ g_1object_1unref_FUNC,
+ g_1quark_1from_1string_FUNC,
+ g_1set_1prgname_FUNC,
+ g_1signal_1add_1emission_1hook_FUNC,
+ g_1signal_1connect_FUNC,
+ g_1signal_1connect_1closure_FUNC,
+ g_1signal_1connect_1closure_1by_1id_FUNC,
+ g_1signal_1emit_1by_1name__J_3B_FUNC,
+ g_1signal_1emit_1by_1name__J_3BJ_FUNC,
+ g_1signal_1emit_1by_1name__J_3BJJ_FUNC,
+ g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC,
+ g_1signal_1emit_1by_1name__J_3B_3B_FUNC,
+ g_1signal_1handler_1disconnect_FUNC,
+ g_1signal_1handlers_1block_1matched_FUNC,
+ g_1signal_1handlers_1unblock_1matched_FUNC,
+ g_1signal_1lookup_FUNC,
+ g_1signal_1remove_1emission_1hook_FUNC,
+ g_1signal_1stop_1emission_1by_1name_FUNC,
+ g_1simple_1action_1group_1new_FUNC,
+ g_1simple_1action_1new_FUNC,
+ g_1simple_1action_1new_1stateful_FUNC,
+ g_1simple_1action_1set_1enabled_FUNC,
+ g_1simple_1action_1set_1state_FUNC,
+ g_1slist_1append_FUNC,
+ g_1slist_1data_FUNC,
+ g_1slist_1free_FUNC,
+ g_1slist_1length_FUNC,
+ g_1slist_1next_FUNC,
+ g_1source_1remove_FUNC,
g_1strdup_FUNC,
+ g_1strfreev_FUNC,
+ g_1strtod_FUNC,
+ g_1time_1val_1add_FUNC,
+ g_1timeout_1add_FUNC,
+ g_1type_1class_1peek_FUNC,
+ g_1type_1class_1peek_1parent_FUNC,
+ g_1type_1class_1ref_FUNC,
+ g_1type_1class_1unref_FUNC,
+ g_1type_1interface_1peek_1parent_FUNC,
+ g_1type_1is_1a_FUNC,
+ g_1type_1parent_FUNC,
+ g_1type_1register_1static_FUNC,
+ g_1unsetenv_FUNC,
+ g_1utf16_1offset_1to_1pointer_FUNC,
+ g_1utf16_1offset_1to_1utf8_1offset_FUNC,
+ g_1utf16_1pointer_1to_1offset_FUNC,
+ g_1utf16_1strlen_FUNC,
+ g_1utf16_1to_1utf8_FUNC,
+ g_1utf8_1offset_1to_1utf16_1offset_FUNC,
+ g_1utf8_1pointer_1to_1offset_FUNC,
+ g_1utf8_1strlen_FUNC,
+ g_1utf8_1to_1utf16__JJ_3J_3J_3J_FUNC,
+ g_1utf8_1to_1utf16___3BJ_3J_3J_3J_FUNC,
g_1value_1get_1double_FUNC,
g_1value_1get_1float_FUNC,
g_1value_1get_1int_FUNC,
g_1value_1get_1int64_FUNC,
g_1value_1init_FUNC,
+ g_1value_1peek_1pointer_FUNC,
g_1value_1set_1double_FUNC,
g_1value_1set_1float_FUNC,
g_1value_1set_1int_FUNC,
g_1value_1set_1int64_FUNC,
g_1value_1unset_FUNC,
+ g_1variant_1builder_1add_1value_FUNC,
+ g_1variant_1builder_1end_FUNC,
+ g_1variant_1builder_1new_FUNC,
+ g_1variant_1builder_1unref_FUNC,
+ g_1variant_1get_1boolean_FUNC,
+ g_1variant_1get_1byte_FUNC,
+ g_1variant_1get_1child_1value_FUNC,
+ g_1variant_1get_1double_FUNC,
+ g_1variant_1get_1int32_FUNC,
+ g_1variant_1get_1string_FUNC,
+ g_1variant_1get_1type_1string_FUNC,
+ g_1variant_1get_1uint64_FUNC,
+ g_1variant_1is_1of_1type_FUNC,
+ g_1variant_1n_1children_FUNC,
+ g_1variant_1new___3BZ_3B_FUNC,
+ g_1variant_1new___3B_3B_FUNC,
+ g_1variant_1new___3B_3B_3B_FUNC,
+ g_1variant_1new_1boolean_FUNC,
+ g_1variant_1new_1byte_FUNC,
+ g_1variant_1new_1double_FUNC,
+ g_1variant_1new_1int32_FUNC,
+ g_1variant_1new_1string__J_FUNC,
+ g_1variant_1new_1string___3B_FUNC,
+ g_1variant_1new_1tuple_FUNC,
+ g_1variant_1new_1uint64_FUNC,
+ g_1variant_1type_1free_FUNC,
+ g_1variant_1type_1new_FUNC,
+ g_1variant_1unref_FUNC,
+ glib_1major_1version_FUNC,
+ glib_1micro_1version_FUNC,
+ glib_1minor_1version_FUNC,
imContextLast_FUNC,
imContextNewProc_1CALLBACK_FUNC,
localeconv_1decimal_1point_FUNC,
- memmove__JLorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_FUNC,
- memmove__JLorg_eclipse_swt_internal_gtk_GObjectClass_2_FUNC,
memmove__JLorg_eclipse_swt_internal_gtk_GTypeInfo_2I_FUNC,
- memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J_FUNC,
- memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J_FUNC,
memmove__JLorg_eclipse_swt_internal_gtk_GdkRGBA_2J_FUNC,
memmove__JLorg_eclipse_swt_internal_gtk_GtkCellRendererClass_2_FUNC,
- memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J_FUNC,
memmove__JLorg_eclipse_swt_internal_gtk_GtkWidgetClass_2_FUNC,
memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J_FUNC,
memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2JJ_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ_FUNC,
- memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GdkKeymapKey_2JJ_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GdkRGBA_2JJ_FUNC,
memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2JJ_FUNC,
@@ -1504,7 +1140,114 @@ typedef enum {
pangoFontFaceNewProc_1CALLBACK_FUNC,
pangoFontFamilyNewProc_1CALLBACK_FUNC,
pangoLayoutNewProc_1CALLBACK_FUNC,
+ pango_1attr_1background_1new_FUNC,
+ pango_1attr_1font_1desc_1new_FUNC,
+ pango_1attr_1foreground_1new_FUNC,
+ pango_1attr_1iterator_1destroy_FUNC,
+ pango_1attr_1iterator_1get_FUNC,
+ pango_1attr_1iterator_1next_FUNC,
+ pango_1attr_1iterator_1range_FUNC,
+ pango_1attr_1list_1get_1iterator_FUNC,
+ pango_1attr_1list_1insert_FUNC,
+ pango_1attr_1list_1new_FUNC,
+ pango_1attr_1list_1unref_FUNC,
+ pango_1attr_1rise_1new_FUNC,
+ pango_1attr_1shape_1new_FUNC,
+ pango_1attr_1strikethrough_1color_1new_FUNC,
+ pango_1attr_1strikethrough_1new_FUNC,
+ pango_1attr_1underline_1color_1new_FUNC,
+ pango_1attr_1underline_1new_FUNC,
+ pango_1attr_1weight_1new_FUNC,
+ pango_1attribute_1copy_FUNC,
+ pango_1cairo_1context_1get_1font_1options_FUNC,
+ pango_1cairo_1context_1set_1font_1options_FUNC,
+ pango_1cairo_1create_1layout_FUNC,
+ pango_1cairo_1font_1map_1get_1default_FUNC,
+ pango_1cairo_1layout_1path_FUNC,
+ pango_1cairo_1show_1layout_FUNC,
+ pango_1context_1get_1base_1dir_FUNC,
+ pango_1context_1get_1language_FUNC,
+ pango_1context_1get_1metrics_FUNC,
+ pango_1context_1list_1families_FUNC,
+ pango_1context_1set_1base_1dir_FUNC,
+ pango_1context_1set_1language_FUNC,
+ pango_1font_1description_1copy_FUNC,
+ pango_1font_1description_1free_FUNC,
+ pango_1font_1description_1from_1string_FUNC,
+ pango_1font_1description_1get_1family_FUNC,
+ pango_1font_1description_1get_1set_1fields_FUNC,
+ pango_1font_1description_1get_1size_FUNC,
+ pango_1font_1description_1get_1stretch_FUNC,
+ pango_1font_1description_1get_1style_FUNC,
+ pango_1font_1description_1get_1variant_FUNC,
+ pango_1font_1description_1get_1weight_FUNC,
+ pango_1font_1description_1new_FUNC,
+ pango_1font_1description_1set_1family_FUNC,
+ pango_1font_1description_1set_1size_FUNC,
+ pango_1font_1description_1set_1stretch_FUNC,
+ pango_1font_1description_1set_1style_FUNC,
+ pango_1font_1description_1set_1variant_FUNC,
+ pango_1font_1description_1set_1weight_FUNC,
+ pango_1font_1description_1to_1string_FUNC,
+ pango_1font_1face_1describe_FUNC,
+ pango_1font_1family_1get_1name_FUNC,
+ pango_1font_1family_1list_1faces_FUNC,
+ pango_1font_1map_1create_1context_FUNC,
+ pango_1font_1metrics_1get_1approximate_1char_1width_FUNC,
+ pango_1font_1metrics_1get_1ascent_FUNC,
+ pango_1font_1metrics_1get_1descent_FUNC,
+ pango_1font_1metrics_1unref_FUNC,
+ pango_1layout_1context_1changed_FUNC,
+ pango_1layout_1get_1alignment_FUNC,
+ pango_1layout_1get_1context_FUNC,
+ pango_1layout_1get_1indent_FUNC,
+ pango_1layout_1get_1iter_FUNC,
+ pango_1layout_1get_1justify_FUNC,
+ pango_1layout_1get_1line_FUNC,
+ pango_1layout_1get_1line_1count_FUNC,
+ pango_1layout_1get_1log_1attrs_FUNC,
+ pango_1layout_1get_1pixel_1size_FUNC,
+ pango_1layout_1get_1size_FUNC,
+ pango_1layout_1get_1spacing_FUNC,
+ pango_1layout_1get_1text_FUNC,
+ pango_1layout_1get_1width_FUNC,
+ pango_1layout_1index_1to_1pos_FUNC,
+ pango_1layout_1iter_1free_FUNC,
+ pango_1layout_1iter_1get_1index_FUNC,
+ pango_1layout_1iter_1get_1line_1extents_FUNC,
+ pango_1layout_1iter_1get_1run_FUNC,
+ pango_1layout_1iter_1next_1line_FUNC,
+ pango_1layout_1iter_1next_1run_FUNC,
+ pango_1layout_1line_1get_1extents_FUNC,
+ pango_1layout_1new_FUNC,
+ pango_1layout_1set_1alignment_FUNC,
+ pango_1layout_1set_1attributes_FUNC,
+ pango_1layout_1set_1auto_1dir_FUNC,
+ pango_1layout_1set_1font_1description_FUNC,
+ pango_1layout_1set_1indent_FUNC,
+ pango_1layout_1set_1justify_FUNC,
+ pango_1layout_1set_1single_1paragraph_1mode_FUNC,
+ pango_1layout_1set_1spacing_FUNC,
+ pango_1layout_1set_1tabs_FUNC,
+ pango_1layout_1set_1text_FUNC,
+ pango_1layout_1set_1width_FUNC,
+ pango_1layout_1set_1wrap_FUNC,
+ pango_1layout_1xy_1to_1index_FUNC,
+ pango_1tab_1array_1free_FUNC,
+ pango_1tab_1array_1new_FUNC,
+ pango_1tab_1array_1set_1tab_FUNC,
printerOptionWidgetNewProc_1CALLBACK_FUNC,
realpath_FUNC,
strcmp_FUNC,
+ swt_1debug_1on_1fatal_1warnings_FUNC,
+ swt_1fixed_1accessible_1get_1type_FUNC,
+ swt_1fixed_1accessible_1register_1accessible_FUNC,
+ swt_1fixed_1add_FUNC,
+ swt_1fixed_1get_1type_FUNC,
+ swt_1fixed_1move_FUNC,
+ swt_1fixed_1remove_FUNC,
+ swt_1fixed_1resize_FUNC,
+ swt_1fixed_1restack_FUNC,
+ swt_1set_1lock_1functions_FUNC,
+ ubuntu_1menu_1proxy_1get_FUNC,
} OS_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
index 0ded92b233..2f2f80ab5c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -19,43 +19,6 @@
#include "swt.h"
#include "os_structs.h"
-#ifndef NO_GInterfaceInfo
-typedef struct GInterfaceInfo_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID interface_init, interface_finalize, interface_data;
-} GInterfaceInfo_FID_CACHE;
-
-GInterfaceInfo_FID_CACHE GInterfaceInfoFc;
-
-void cacheGInterfaceInfoFields(JNIEnv *env, jobject lpObject)
-{
- if (GInterfaceInfoFc.cached) return;
- GInterfaceInfoFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GInterfaceInfoFc.interface_init = (*env)->GetFieldID(env, GInterfaceInfoFc.clazz, "interface_init", "J");
- GInterfaceInfoFc.interface_finalize = (*env)->GetFieldID(env, GInterfaceInfoFc.clazz, "interface_finalize", "J");
- GInterfaceInfoFc.interface_data = (*env)->GetFieldID(env, GInterfaceInfoFc.clazz, "interface_data", "J");
- GInterfaceInfoFc.cached = 1;
-}
-
-GInterfaceInfo *getGInterfaceInfoFields(JNIEnv *env, jobject lpObject, GInterfaceInfo *lpStruct)
-{
- if (!GInterfaceInfoFc.cached) cacheGInterfaceInfoFields(env, lpObject);
- lpStruct->interface_init = (GInterfaceInitFunc)(*env)->GetLongField(env, lpObject, GInterfaceInfoFc.interface_init);
- lpStruct->interface_finalize = (GInterfaceFinalizeFunc)(*env)->GetLongField(env, lpObject, GInterfaceInfoFc.interface_finalize);
- lpStruct->interface_data = (gpointer)(*env)->GetLongField(env, lpObject, GInterfaceInfoFc.interface_data);
- return lpStruct;
-}
-
-void setGInterfaceInfoFields(JNIEnv *env, jobject lpObject, GInterfaceInfo *lpStruct)
-{
- if (!GInterfaceInfoFc.cached) cacheGInterfaceInfoFields(env, lpObject);
- (*env)->SetLongField(env, lpObject, GInterfaceInfoFc.interface_init, (jlong)lpStruct->interface_init);
- (*env)->SetLongField(env, lpObject, GInterfaceInfoFc.interface_finalize, (jlong)lpStruct->interface_finalize);
- (*env)->SetLongField(env, lpObject, GInterfaceInfoFc.interface_data, (jlong)lpStruct->interface_data);
-}
-#endif
-
#ifndef NO_GObjectClass
typedef struct GObjectClass_FID_CACHE {
int cached;
@@ -163,514 +126,6 @@ void setGTypeInfoFields(JNIEnv *env, jobject lpObject, GTypeInfo *lpStruct)
}
#endif
-#ifndef NO_GTypeQuery
-typedef struct GTypeQuery_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID type, type_name, class_size, instance_size;
-} GTypeQuery_FID_CACHE;
-
-GTypeQuery_FID_CACHE GTypeQueryFc;
-
-void cacheGTypeQueryFields(JNIEnv *env, jobject lpObject)
-{
- if (GTypeQueryFc.cached) return;
- GTypeQueryFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GTypeQueryFc.type = (*env)->GetFieldID(env, GTypeQueryFc.clazz, "type", "I");
- GTypeQueryFc.type_name = (*env)->GetFieldID(env, GTypeQueryFc.clazz, "type_name", "J");
- GTypeQueryFc.class_size = (*env)->GetFieldID(env, GTypeQueryFc.clazz, "class_size", "I");
- GTypeQueryFc.instance_size = (*env)->GetFieldID(env, GTypeQueryFc.clazz, "instance_size", "I");
- GTypeQueryFc.cached = 1;
-}
-
-GTypeQuery *getGTypeQueryFields(JNIEnv *env, jobject lpObject, GTypeQuery *lpStruct)
-{
- if (!GTypeQueryFc.cached) cacheGTypeQueryFields(env, lpObject);
- lpStruct->type = (GType)(*env)->GetIntField(env, lpObject, GTypeQueryFc.type);
- lpStruct->type_name = (const gchar *)(*env)->GetLongField(env, lpObject, GTypeQueryFc.type_name);
- lpStruct->class_size = (guint)(*env)->GetIntField(env, lpObject, GTypeQueryFc.class_size);
- lpStruct->instance_size = (guint)(*env)->GetIntField(env, lpObject, GTypeQueryFc.instance_size);
- return lpStruct;
-}
-
-void setGTypeQueryFields(JNIEnv *env, jobject lpObject, GTypeQuery *lpStruct)
-{
- if (!GTypeQueryFc.cached) cacheGTypeQueryFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, GTypeQueryFc.type, (jint)lpStruct->type);
- (*env)->SetLongField(env, lpObject, GTypeQueryFc.type_name, (jlong)lpStruct->type_name);
- (*env)->SetIntField(env, lpObject, GTypeQueryFc.class_size, (jint)lpStruct->class_size);
- (*env)->SetIntField(env, lpObject, GTypeQueryFc.instance_size, (jint)lpStruct->instance_size);
-}
-#endif
-
-#ifndef NO_GdkEvent
-typedef struct GdkEvent_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID type;
-} GdkEvent_FID_CACHE;
-
-GdkEvent_FID_CACHE GdkEventFc;
-
-void cacheGdkEventFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventFc.cached) return;
- GdkEventFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventFc.type = (*env)->GetFieldID(env, GdkEventFc.clazz, "type", "I");
- GdkEventFc.cached = 1;
-}
-
-GdkEvent *getGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct)
-{
- if (!GdkEventFc.cached) cacheGdkEventFields(env, lpObject);
- lpStruct->type = (GdkEventType)(*env)->GetIntField(env, lpObject, GdkEventFc.type);
- return lpStruct;
-}
-
-void setGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct)
-{
- if (!GdkEventFc.cached) cacheGdkEventFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, GdkEventFc.type, (jint)lpStruct->type);
-}
-#endif
-
-#ifndef NO_GdkEventAny
-typedef struct GdkEventAny_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID window, send_event;
-} GdkEventAny_FID_CACHE;
-
-GdkEventAny_FID_CACHE GdkEventAnyFc;
-
-void cacheGdkEventAnyFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventAnyFc.cached) return;
- cacheGdkEventFields(env, lpObject);
- GdkEventAnyFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventAnyFc.window = (*env)->GetFieldID(env, GdkEventAnyFc.clazz, "window", "J");
- GdkEventAnyFc.send_event = (*env)->GetFieldID(env, GdkEventAnyFc.clazz, "send_event", "B");
- GdkEventAnyFc.cached = 1;
-}
-
-GdkEventAny *getGdkEventAnyFields(JNIEnv *env, jobject lpObject, GdkEventAny *lpStruct)
-{
- if (!GdkEventAnyFc.cached) cacheGdkEventAnyFields(env, lpObject);
- getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventAnyFc.window);
- lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventAnyFc.send_event);
- return lpStruct;
-}
-
-void setGdkEventAnyFields(JNIEnv *env, jobject lpObject, GdkEventAny *lpStruct)
-{
- if (!GdkEventAnyFc.cached) cacheGdkEventAnyFields(env, lpObject);
- setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- (*env)->SetLongField(env, lpObject, GdkEventAnyFc.window, (jlong)lpStruct->window);
- (*env)->SetByteField(env, lpObject, GdkEventAnyFc.send_event, (jbyte)lpStruct->send_event);
-}
-#endif
-
-#ifndef NO_GdkEventButton
-typedef struct GdkEventButton_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID window, send_event, time, x, y, axes, state, button, device, x_root, y_root;
-} GdkEventButton_FID_CACHE;
-
-GdkEventButton_FID_CACHE GdkEventButtonFc;
-
-void cacheGdkEventButtonFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventButtonFc.cached) return;
- cacheGdkEventFields(env, lpObject);
- GdkEventButtonFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventButtonFc.window = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "window", "J");
- GdkEventButtonFc.send_event = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "send_event", "B");
- GdkEventButtonFc.time = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "time", "I");
- GdkEventButtonFc.x = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "x", "D");
- GdkEventButtonFc.y = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "y", "D");
- GdkEventButtonFc.axes = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "axes", "J");
- GdkEventButtonFc.state = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "state", "I");
- GdkEventButtonFc.button = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "button", "I");
- GdkEventButtonFc.device = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "device", "J");
- GdkEventButtonFc.x_root = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "x_root", "D");
- GdkEventButtonFc.y_root = (*env)->GetFieldID(env, GdkEventButtonFc.clazz, "y_root", "D");
- GdkEventButtonFc.cached = 1;
-}
-
-GdkEventButton *getGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct)
-{
- if (!GdkEventButtonFc.cached) cacheGdkEventButtonFields(env, lpObject);
- getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventButtonFc.window);
- lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventButtonFc.send_event);
- lpStruct->time = (guint32)(*env)->GetIntField(env, lpObject, GdkEventButtonFc.time);
- lpStruct->x = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.x);
- lpStruct->y = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.y);
- lpStruct->axes = (gdouble *)(*env)->GetLongField(env, lpObject, GdkEventButtonFc.axes);
- lpStruct->state = (guint)(*env)->GetIntField(env, lpObject, GdkEventButtonFc.state);
- lpStruct->button = (guint)(*env)->GetIntField(env, lpObject, GdkEventButtonFc.button);
- lpStruct->device = (GdkDevice *)(*env)->GetLongField(env, lpObject, GdkEventButtonFc.device);
- lpStruct->x_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.x_root);
- lpStruct->y_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventButtonFc.y_root);
- return lpStruct;
-}
-
-void setGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct)
-{
- if (!GdkEventButtonFc.cached) cacheGdkEventButtonFields(env, lpObject);
- setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- (*env)->SetLongField(env, lpObject, GdkEventButtonFc.window, (jlong)lpStruct->window);
- (*env)->SetByteField(env, lpObject, GdkEventButtonFc.send_event, (jbyte)lpStruct->send_event);
- (*env)->SetIntField(env, lpObject, GdkEventButtonFc.time, (jint)lpStruct->time);
- (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.x, (jdouble)lpStruct->x);
- (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.y, (jdouble)lpStruct->y);
- (*env)->SetLongField(env, lpObject, GdkEventButtonFc.axes, (jlong)lpStruct->axes);
- (*env)->SetIntField(env, lpObject, GdkEventButtonFc.state, (jint)lpStruct->state);
- (*env)->SetIntField(env, lpObject, GdkEventButtonFc.button, (jint)lpStruct->button);
- (*env)->SetLongField(env, lpObject, GdkEventButtonFc.device, (jlong)lpStruct->device);
- (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.x_root, (jdouble)lpStruct->x_root);
- (*env)->SetDoubleField(env, lpObject, GdkEventButtonFc.y_root, (jdouble)lpStruct->y_root);
-}
-#endif
-
-#ifndef NO_GdkEventCrossing
-typedef struct GdkEventCrossing_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID window, send_event, subwindow, time, x, y, x_root, y_root, mode, detail, focus, state;
-} GdkEventCrossing_FID_CACHE;
-
-GdkEventCrossing_FID_CACHE GdkEventCrossingFc;
-
-void cacheGdkEventCrossingFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventCrossingFc.cached) return;
- cacheGdkEventFields(env, lpObject);
- GdkEventCrossingFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventCrossingFc.window = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "window", "J");
- GdkEventCrossingFc.send_event = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "send_event", "B");
- GdkEventCrossingFc.subwindow = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "subwindow", "J");
- GdkEventCrossingFc.time = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "time", "I");
- GdkEventCrossingFc.x = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "x", "D");
- GdkEventCrossingFc.y = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "y", "D");
- GdkEventCrossingFc.x_root = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "x_root", "D");
- GdkEventCrossingFc.y_root = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "y_root", "D");
- GdkEventCrossingFc.mode = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "mode", "I");
- GdkEventCrossingFc.detail = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "detail", "I");
- GdkEventCrossingFc.focus = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "focus", "Z");
- GdkEventCrossingFc.state = (*env)->GetFieldID(env, GdkEventCrossingFc.clazz, "state", "I");
- GdkEventCrossingFc.cached = 1;
-}
-
-GdkEventCrossing *getGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct)
-{
- if (!GdkEventCrossingFc.cached) cacheGdkEventCrossingFields(env, lpObject);
- getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventCrossingFc.window);
- lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventCrossingFc.send_event);
- lpStruct->subwindow = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventCrossingFc.subwindow);
- lpStruct->time = (*env)->GetIntField(env, lpObject, GdkEventCrossingFc.time);
- lpStruct->x = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.x);
- lpStruct->y = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.y);
- lpStruct->x_root = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.x_root);
- lpStruct->y_root = (*env)->GetDoubleField(env, lpObject, GdkEventCrossingFc.y_root);
- lpStruct->mode = (GdkCrossingMode)(*env)->GetIntField(env, lpObject, GdkEventCrossingFc.mode);
- lpStruct->detail = (GdkNotifyType)(*env)->GetIntField(env, lpObject, GdkEventCrossingFc.detail);
- lpStruct->focus = (gboolean)(*env)->GetBooleanField(env, lpObject, GdkEventCrossingFc.focus);
- lpStruct->state = (*env)->GetIntField(env, lpObject, GdkEventCrossingFc.state);
- return lpStruct;
-}
-
-void setGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct)
-{
- if (!GdkEventCrossingFc.cached) cacheGdkEventCrossingFields(env, lpObject);
- setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- (*env)->SetLongField(env, lpObject, GdkEventCrossingFc.window, (jlong)lpStruct->window);
- (*env)->SetByteField(env, lpObject, GdkEventCrossingFc.send_event, (jbyte)lpStruct->send_event);
- (*env)->SetLongField(env, lpObject, GdkEventCrossingFc.subwindow, (jlong)lpStruct->subwindow);
- (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.time, (jint)lpStruct->time);
- (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.x, (jdouble)lpStruct->x);
- (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.y, (jdouble)lpStruct->y);
- (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.x_root, (jdouble)lpStruct->x_root);
- (*env)->SetDoubleField(env, lpObject, GdkEventCrossingFc.y_root, (jdouble)lpStruct->y_root);
- (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.mode, (jint)lpStruct->mode);
- (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.detail, (jint)lpStruct->detail);
- (*env)->SetBooleanField(env, lpObject, GdkEventCrossingFc.focus, (jboolean)lpStruct->focus);
- (*env)->SetIntField(env, lpObject, GdkEventCrossingFc.state, (jint)lpStruct->state);
-}
-#endif
-
-#ifndef NO_GdkEventFocus
-typedef struct GdkEventFocus_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID window, send_event, in;
-} GdkEventFocus_FID_CACHE;
-
-GdkEventFocus_FID_CACHE GdkEventFocusFc;
-
-void cacheGdkEventFocusFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventFocusFc.cached) return;
- cacheGdkEventFields(env, lpObject);
- GdkEventFocusFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventFocusFc.window = (*env)->GetFieldID(env, GdkEventFocusFc.clazz, "window", "J");
- GdkEventFocusFc.send_event = (*env)->GetFieldID(env, GdkEventFocusFc.clazz, "send_event", "B");
- GdkEventFocusFc.in = (*env)->GetFieldID(env, GdkEventFocusFc.clazz, "in", "S");
- GdkEventFocusFc.cached = 1;
-}
-
-GdkEventFocus *getGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct)
-{
- if (!GdkEventFocusFc.cached) cacheGdkEventFocusFields(env, lpObject);
- getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventFocusFc.window);
- lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventFocusFc.send_event);
- lpStruct->in = (gint16)(*env)->GetShortField(env, lpObject, GdkEventFocusFc.in);
- return lpStruct;
-}
-
-void setGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct)
-{
- if (!GdkEventFocusFc.cached) cacheGdkEventFocusFields(env, lpObject);
- setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- (*env)->SetLongField(env, lpObject, GdkEventFocusFc.window, (jlong)lpStruct->window);
- (*env)->SetByteField(env, lpObject, GdkEventFocusFc.send_event, (jbyte)lpStruct->send_event);
- (*env)->SetShortField(env, lpObject, GdkEventFocusFc.in, (jshort)lpStruct->in);
-}
-#endif
-
-#ifndef NO_GdkEventKey
-typedef struct GdkEventKey_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID window, send_event, time, state, keyval, length, string, hardware_keycode, group, is_modifier;
-} GdkEventKey_FID_CACHE;
-
-GdkEventKey_FID_CACHE GdkEventKeyFc;
-
-void cacheGdkEventKeyFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventKeyFc.cached) return;
- cacheGdkEventFields(env, lpObject);
- GdkEventKeyFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventKeyFc.window = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "window", "J");
- GdkEventKeyFc.send_event = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "send_event", "B");
- GdkEventKeyFc.time = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "time", "I");
- GdkEventKeyFc.state = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "state", "I");
- GdkEventKeyFc.keyval = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "keyval", "I");
- GdkEventKeyFc.length = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "length", "I");
- GdkEventKeyFc.string = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "string", "J");
- GdkEventKeyFc.hardware_keycode = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "hardware_keycode", "S");
- GdkEventKeyFc.group = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "group", "B");
- GdkEventKeyFc.is_modifier = (*env)->GetFieldID(env, GdkEventKeyFc.clazz, "is_modifier", "I");
- GdkEventKeyFc.cached = 1;
-}
-
-GdkEventKey *getGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct)
-{
- if (!GdkEventKeyFc.cached) cacheGdkEventKeyFields(env, lpObject);
- getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventKeyFc.window);
- lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventKeyFc.send_event);
- lpStruct->time = (guint32)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.time);
- lpStruct->state = (guint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.state);
- lpStruct->keyval = (guint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.keyval);
- lpStruct->length = (gint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.length);
- lpStruct->string = (gchar *)(*env)->GetLongField(env, lpObject, GdkEventKeyFc.string);
- lpStruct->hardware_keycode = (guint16)(*env)->GetShortField(env, lpObject, GdkEventKeyFc.hardware_keycode);
- lpStruct->group = (guint8)(*env)->GetByteField(env, lpObject, GdkEventKeyFc.group);
- lpStruct->is_modifier = (guint)(*env)->GetIntField(env, lpObject, GdkEventKeyFc.is_modifier);
- return lpStruct;
-}
-
-void setGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct)
-{
- if (!GdkEventKeyFc.cached) cacheGdkEventKeyFields(env, lpObject);
- setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- (*env)->SetLongField(env, lpObject, GdkEventKeyFc.window, (jlong)lpStruct->window);
- (*env)->SetByteField(env, lpObject, GdkEventKeyFc.send_event, (jbyte)lpStruct->send_event);
- (*env)->SetIntField(env, lpObject, GdkEventKeyFc.time, (jint)lpStruct->time);
- (*env)->SetIntField(env, lpObject, GdkEventKeyFc.state, (jint)lpStruct->state);
- (*env)->SetIntField(env, lpObject, GdkEventKeyFc.keyval, (jint)lpStruct->keyval);
- (*env)->SetIntField(env, lpObject, GdkEventKeyFc.length, (jint)lpStruct->length);
- (*env)->SetLongField(env, lpObject, GdkEventKeyFc.string, (jlong)lpStruct->string);
- (*env)->SetShortField(env, lpObject, GdkEventKeyFc.hardware_keycode, (jshort)lpStruct->hardware_keycode);
- (*env)->SetByteField(env, lpObject, GdkEventKeyFc.group, (jbyte)lpStruct->group);
- (*env)->SetIntField(env, lpObject, GdkEventKeyFc.is_modifier, (jint)lpStruct->is_modifier);
-}
-#endif
-
-#ifndef NO_GdkEventMotion
-typedef struct GdkEventMotion_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID window, send_event, time, x, y, axes, state, is_hint, device, x_root, y_root;
-} GdkEventMotion_FID_CACHE;
-
-GdkEventMotion_FID_CACHE GdkEventMotionFc;
-
-void cacheGdkEventMotionFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventMotionFc.cached) return;
- cacheGdkEventFields(env, lpObject);
- GdkEventMotionFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventMotionFc.window = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "window", "J");
- GdkEventMotionFc.send_event = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "send_event", "B");
- GdkEventMotionFc.time = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "time", "I");
- GdkEventMotionFc.x = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "x", "D");
- GdkEventMotionFc.y = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "y", "D");
- GdkEventMotionFc.axes = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "axes", "J");
- GdkEventMotionFc.state = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "state", "I");
- GdkEventMotionFc.is_hint = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "is_hint", "S");
- GdkEventMotionFc.device = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "device", "J");
- GdkEventMotionFc.x_root = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "x_root", "D");
- GdkEventMotionFc.y_root = (*env)->GetFieldID(env, GdkEventMotionFc.clazz, "y_root", "D");
- GdkEventMotionFc.cached = 1;
-}
-
-GdkEventMotion *getGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct)
-{
- if (!GdkEventMotionFc.cached) cacheGdkEventMotionFields(env, lpObject);
- getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventMotionFc.window);
- lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventMotionFc.send_event);
- lpStruct->time = (guint32)(*env)->GetIntField(env, lpObject, GdkEventMotionFc.time);
- lpStruct->x = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.x);
- lpStruct->y = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.y);
- lpStruct->axes = (gdouble *)(*env)->GetLongField(env, lpObject, GdkEventMotionFc.axes);
- lpStruct->state = (guint)(*env)->GetIntField(env, lpObject, GdkEventMotionFc.state);
- lpStruct->is_hint = (gint16)(*env)->GetShortField(env, lpObject, GdkEventMotionFc.is_hint);
- lpStruct->device = (GdkDevice *)(*env)->GetLongField(env, lpObject, GdkEventMotionFc.device);
- lpStruct->x_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.x_root);
- lpStruct->y_root = (gdouble)(*env)->GetDoubleField(env, lpObject, GdkEventMotionFc.y_root);
- return lpStruct;
-}
-
-void setGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct)
-{
- if (!GdkEventMotionFc.cached) cacheGdkEventMotionFields(env, lpObject);
- setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- (*env)->SetLongField(env, lpObject, GdkEventMotionFc.window, (jlong)lpStruct->window);
- (*env)->SetByteField(env, lpObject, GdkEventMotionFc.send_event, (jbyte)lpStruct->send_event);
- (*env)->SetIntField(env, lpObject, GdkEventMotionFc.time, (jint)lpStruct->time);
- (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.x, (jdouble)lpStruct->x);
- (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.y, (jdouble)lpStruct->y);
- (*env)->SetLongField(env, lpObject, GdkEventMotionFc.axes, (jlong)lpStruct->axes);
- (*env)->SetIntField(env, lpObject, GdkEventMotionFc.state, (jint)lpStruct->state);
- (*env)->SetShortField(env, lpObject, GdkEventMotionFc.is_hint, (jshort)lpStruct->is_hint);
- (*env)->SetLongField(env, lpObject, GdkEventMotionFc.device, (jlong)lpStruct->device);
- (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.x_root, (jdouble)lpStruct->x_root);
- (*env)->SetDoubleField(env, lpObject, GdkEventMotionFc.y_root, (jdouble)lpStruct->y_root);
-}
-#endif
-
-#ifndef NO_GdkEventWindowState
-typedef struct GdkEventWindowState_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID window, send_event, changed_mask, new_window_state;
-} GdkEventWindowState_FID_CACHE;
-
-GdkEventWindowState_FID_CACHE GdkEventWindowStateFc;
-
-void cacheGdkEventWindowStateFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkEventWindowStateFc.cached) return;
- cacheGdkEventFields(env, lpObject);
- GdkEventWindowStateFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkEventWindowStateFc.window = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "window", "J");
- GdkEventWindowStateFc.send_event = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "send_event", "B");
- GdkEventWindowStateFc.changed_mask = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "changed_mask", "I");
- GdkEventWindowStateFc.new_window_state = (*env)->GetFieldID(env, GdkEventWindowStateFc.clazz, "new_window_state", "I");
- GdkEventWindowStateFc.cached = 1;
-}
-
-GdkEventWindowState *getGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct)
-{
- if (!GdkEventWindowStateFc.cached) cacheGdkEventWindowStateFields(env, lpObject);
- getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- lpStruct->window = (GdkWindow *)(*env)->GetLongField(env, lpObject, GdkEventWindowStateFc.window);
- lpStruct->send_event = (*env)->GetByteField(env, lpObject, GdkEventWindowStateFc.send_event);
- lpStruct->changed_mask = (*env)->GetIntField(env, lpObject, GdkEventWindowStateFc.changed_mask);
- lpStruct->new_window_state = (*env)->GetIntField(env, lpObject, GdkEventWindowStateFc.new_window_state);
- return lpStruct;
-}
-
-void setGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct)
-{
- if (!GdkEventWindowStateFc.cached) cacheGdkEventWindowStateFields(env, lpObject);
- setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
- (*env)->SetLongField(env, lpObject, GdkEventWindowStateFc.window, (jlong)lpStruct->window);
- (*env)->SetByteField(env, lpObject, GdkEventWindowStateFc.send_event, (jbyte)lpStruct->send_event);
- (*env)->SetIntField(env, lpObject, GdkEventWindowStateFc.changed_mask, (jint)lpStruct->changed_mask);
- (*env)->SetIntField(env, lpObject, GdkEventWindowStateFc.new_window_state, (jint)lpStruct->new_window_state);
-}
-#endif
-
-#ifndef NO_GdkGeometry
-typedef struct GdkGeometry_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID min_width, min_height, max_width, max_height, base_width, base_height, width_inc, height_inc, min_aspect, max_aspect, win_gravity;
-} GdkGeometry_FID_CACHE;
-
-GdkGeometry_FID_CACHE GdkGeometryFc;
-
-void cacheGdkGeometryFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkGeometryFc.cached) return;
- GdkGeometryFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkGeometryFc.min_width = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "min_width", "I");
- GdkGeometryFc.min_height = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "min_height", "I");
- GdkGeometryFc.max_width = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "max_width", "I");
- GdkGeometryFc.max_height = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "max_height", "I");
- GdkGeometryFc.base_width = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "base_width", "I");
- GdkGeometryFc.base_height = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "base_height", "I");
- GdkGeometryFc.width_inc = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "width_inc", "I");
- GdkGeometryFc.height_inc = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "height_inc", "I");
- GdkGeometryFc.min_aspect = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "min_aspect", "D");
- GdkGeometryFc.max_aspect = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "max_aspect", "D");
- GdkGeometryFc.win_gravity = (*env)->GetFieldID(env, GdkGeometryFc.clazz, "win_gravity", "I");
- GdkGeometryFc.cached = 1;
-}
-
-GdkGeometry *getGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct)
-{
- if (!GdkGeometryFc.cached) cacheGdkGeometryFields(env, lpObject);
- lpStruct->min_width = (*env)->GetIntField(env, lpObject, GdkGeometryFc.min_width);
- lpStruct->min_height = (*env)->GetIntField(env, lpObject, GdkGeometryFc.min_height);
- lpStruct->max_width = (*env)->GetIntField(env, lpObject, GdkGeometryFc.max_width);
- lpStruct->max_height = (*env)->GetIntField(env, lpObject, GdkGeometryFc.max_height);
- lpStruct->base_width = (*env)->GetIntField(env, lpObject, GdkGeometryFc.base_width);
- lpStruct->base_height = (*env)->GetIntField(env, lpObject, GdkGeometryFc.base_height);
- lpStruct->width_inc = (*env)->GetIntField(env, lpObject, GdkGeometryFc.width_inc);
- lpStruct->height_inc = (*env)->GetIntField(env, lpObject, GdkGeometryFc.height_inc);
- lpStruct->min_aspect = (*env)->GetDoubleField(env, lpObject, GdkGeometryFc.min_aspect);
- lpStruct->max_aspect = (*env)->GetDoubleField(env, lpObject, GdkGeometryFc.max_aspect);
- lpStruct->win_gravity = (*env)->GetIntField(env, lpObject, GdkGeometryFc.win_gravity);
- return lpStruct;
-}
-
-void setGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct)
-{
- if (!GdkGeometryFc.cached) cacheGdkGeometryFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.min_width, (jint)lpStruct->min_width);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.min_height, (jint)lpStruct->min_height);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.max_width, (jint)lpStruct->max_width);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.max_height, (jint)lpStruct->max_height);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.base_width, (jint)lpStruct->base_width);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.base_height, (jint)lpStruct->base_height);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.width_inc, (jint)lpStruct->width_inc);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.height_inc, (jint)lpStruct->height_inc);
- (*env)->SetDoubleField(env, lpObject, GdkGeometryFc.min_aspect, (jdouble)lpStruct->min_aspect);
- (*env)->SetDoubleField(env, lpObject, GdkGeometryFc.max_aspect, (jdouble)lpStruct->max_aspect);
- (*env)->SetIntField(env, lpObject, GdkGeometryFc.win_gravity, (jint)lpStruct->win_gravity);
-}
-#endif
-
#ifndef NO_GdkKeymapKey
typedef struct GdkKeymapKey_FID_CACHE {
int cached;
@@ -788,73 +243,6 @@ void setGdkRectangleFields(JNIEnv *env, jobject lpObject, GdkRectangle *lpStruct
}
#endif
-#ifndef NO_GdkWindowAttr
-typedef struct GdkWindowAttr_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID title, event_mask, x, y, width, height, wclass, visual, window_type, cursor, wmclass_name, wmclass_class, override_redirect;
-} GdkWindowAttr_FID_CACHE;
-
-GdkWindowAttr_FID_CACHE GdkWindowAttrFc;
-
-void cacheGdkWindowAttrFields(JNIEnv *env, jobject lpObject)
-{
- if (GdkWindowAttrFc.cached) return;
- GdkWindowAttrFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GdkWindowAttrFc.title = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "title", "J");
- GdkWindowAttrFc.event_mask = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "event_mask", "I");
- GdkWindowAttrFc.x = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "x", "I");
- GdkWindowAttrFc.y = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "y", "I");
- GdkWindowAttrFc.width = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "width", "I");
- GdkWindowAttrFc.height = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "height", "I");
- GdkWindowAttrFc.wclass = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "wclass", "I");
- GdkWindowAttrFc.visual = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "visual", "J");
- GdkWindowAttrFc.window_type = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "window_type", "I");
- GdkWindowAttrFc.cursor = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "cursor", "J");
- GdkWindowAttrFc.wmclass_name = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "wmclass_name", "J");
- GdkWindowAttrFc.wmclass_class = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "wmclass_class", "J");
- GdkWindowAttrFc.override_redirect = (*env)->GetFieldID(env, GdkWindowAttrFc.clazz, "override_redirect", "Z");
- GdkWindowAttrFc.cached = 1;
-}
-
-GdkWindowAttr *getGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct)
-{
- if (!GdkWindowAttrFc.cached) cacheGdkWindowAttrFields(env, lpObject);
- lpStruct->title = (gchar *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.title);
- lpStruct->event_mask = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.event_mask);
- lpStruct->x = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.x);
- lpStruct->y = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.y);
- lpStruct->width = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.width);
- lpStruct->height = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.height);
- lpStruct->wclass = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.wclass);
- lpStruct->visual = (GdkVisual *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.visual);
- lpStruct->window_type = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.window_type);
- lpStruct->cursor = (GdkCursor *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.cursor);
- lpStruct->wmclass_name = (gchar *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.wmclass_name);
- lpStruct->wmclass_class = (gchar *)(*env)->GetLongField(env, lpObject, GdkWindowAttrFc.wmclass_class);
- lpStruct->override_redirect = (*env)->GetBooleanField(env, lpObject, GdkWindowAttrFc.override_redirect);
- return lpStruct;
-}
-
-void setGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct)
-{
- if (!GdkWindowAttrFc.cached) cacheGdkWindowAttrFields(env, lpObject);
- (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.title, (jlong)lpStruct->title);
- (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.event_mask, (jint)lpStruct->event_mask);
- (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.x, (jint)lpStruct->x);
- (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.y, (jint)lpStruct->y);
- (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.width, (jint)lpStruct->width);
- (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.height, (jint)lpStruct->height);
- (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.wclass, (jint)lpStruct->wclass);
- (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.visual, (jlong)lpStruct->visual);
- (*env)->SetIntField(env, lpObject, GdkWindowAttrFc.window_type, (jint)lpStruct->window_type);
- (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.cursor, (jlong)lpStruct->cursor);
- (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.wmclass_name, (jlong)lpStruct->wmclass_name);
- (*env)->SetLongField(env, lpObject, GdkWindowAttrFc.wmclass_class, (jlong)lpStruct->wmclass_class);
- (*env)->SetBooleanField(env, lpObject, GdkWindowAttrFc.override_redirect, (jboolean)lpStruct->override_redirect);
-}
-#endif
-
#ifndef NO_GtkAllocation
typedef struct GtkAllocation_FID_CACHE {
int cached;
@@ -1014,43 +402,6 @@ void setGtkRequisitionFields(JNIEnv *env, jobject lpObject, GtkRequisition *lpSt
}
#endif
-#ifndef NO_GtkTargetEntry
-typedef struct GtkTargetEntry_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID target, flags, info;
-} GtkTargetEntry_FID_CACHE;
-
-GtkTargetEntry_FID_CACHE GtkTargetEntryFc;
-
-void cacheGtkTargetEntryFields(JNIEnv *env, jobject lpObject)
-{
- if (GtkTargetEntryFc.cached) return;
- GtkTargetEntryFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GtkTargetEntryFc.target = (*env)->GetFieldID(env, GtkTargetEntryFc.clazz, "target", "J");
- GtkTargetEntryFc.flags = (*env)->GetFieldID(env, GtkTargetEntryFc.clazz, "flags", "I");
- GtkTargetEntryFc.info = (*env)->GetFieldID(env, GtkTargetEntryFc.clazz, "info", "I");
- GtkTargetEntryFc.cached = 1;
-}
-
-GtkTargetEntry *getGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct)
-{
- if (!GtkTargetEntryFc.cached) cacheGtkTargetEntryFields(env, lpObject);
- lpStruct->target = (gchar *)(*env)->GetLongField(env, lpObject, GtkTargetEntryFc.target);
- lpStruct->flags = (guint)(*env)->GetIntField(env, lpObject, GtkTargetEntryFc.flags);
- lpStruct->info = (guint)(*env)->GetIntField(env, lpObject, GtkTargetEntryFc.info);
- return lpStruct;
-}
-
-void setGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct)
-{
- if (!GtkTargetEntryFc.cached) cacheGtkTargetEntryFields(env, lpObject);
- (*env)->SetLongField(env, lpObject, GtkTargetEntryFc.target, (jlong)lpStruct->target);
- (*env)->SetIntField(env, lpObject, GtkTargetEntryFc.flags, (jint)lpStruct->flags);
- (*env)->SetIntField(env, lpObject, GtkTargetEntryFc.info, (jint)lpStruct->info);
-}
-#endif
-
#ifndef NO_GtkWidgetClass
typedef struct GtkWidgetClass_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
index 7d66133db7..4672fa7e21 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -18,18 +18,6 @@
#include "os.h"
-#ifndef NO_GInterfaceInfo
-void cacheGInterfaceInfoFields(JNIEnv *env, jobject lpObject);
-GInterfaceInfo *getGInterfaceInfoFields(JNIEnv *env, jobject lpObject, GInterfaceInfo *lpStruct);
-void setGInterfaceInfoFields(JNIEnv *env, jobject lpObject, GInterfaceInfo *lpStruct);
-#define GInterfaceInfo_sizeof() sizeof(GInterfaceInfo)
-#else
-#define cacheGInterfaceInfoFields(a,b)
-#define getGInterfaceInfoFields(a,b,c) NULL
-#define setGInterfaceInfoFields(a,b,c)
-#define GInterfaceInfo_sizeof() 0
-#endif
-
#ifndef NO_GObjectClass
void cacheGObjectClassFields(JNIEnv *env, jobject lpObject);
GObjectClass *getGObjectClassFields(JNIEnv *env, jobject lpObject, GObjectClass *lpStruct);
@@ -54,126 +42,6 @@ void setGTypeInfoFields(JNIEnv *env, jobject lpObject, GTypeInfo *lpStruct);
#define GTypeInfo_sizeof() 0
#endif
-#ifndef NO_GTypeQuery
-void cacheGTypeQueryFields(JNIEnv *env, jobject lpObject);
-GTypeQuery *getGTypeQueryFields(JNIEnv *env, jobject lpObject, GTypeQuery *lpStruct);
-void setGTypeQueryFields(JNIEnv *env, jobject lpObject, GTypeQuery *lpStruct);
-#define GTypeQuery_sizeof() sizeof(GTypeQuery)
-#else
-#define cacheGTypeQueryFields(a,b)
-#define getGTypeQueryFields(a,b,c) NULL
-#define setGTypeQueryFields(a,b,c)
-#define GTypeQuery_sizeof() 0
-#endif
-
-#ifndef NO_GdkEvent
-void cacheGdkEventFields(JNIEnv *env, jobject lpObject);
-GdkEvent *getGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct);
-void setGdkEventFields(JNIEnv *env, jobject lpObject, GdkEvent *lpStruct);
-#define GdkEvent_sizeof() sizeof(GdkEvent)
-#else
-#define cacheGdkEventFields(a,b)
-#define getGdkEventFields(a,b,c) NULL
-#define setGdkEventFields(a,b,c)
-#define GdkEvent_sizeof() 0
-#endif
-
-#ifndef NO_GdkEventAny
-void cacheGdkEventAnyFields(JNIEnv *env, jobject lpObject);
-GdkEventAny *getGdkEventAnyFields(JNIEnv *env, jobject lpObject, GdkEventAny *lpStruct);
-void setGdkEventAnyFields(JNIEnv *env, jobject lpObject, GdkEventAny *lpStruct);
-#define GdkEventAny_sizeof() sizeof(GdkEventAny)
-#else
-#define cacheGdkEventAnyFields(a,b)
-#define getGdkEventAnyFields(a,b,c) NULL
-#define setGdkEventAnyFields(a,b,c)
-#define GdkEventAny_sizeof() 0
-#endif
-
-#ifndef NO_GdkEventButton
-void cacheGdkEventButtonFields(JNIEnv *env, jobject lpObject);
-GdkEventButton *getGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct);
-void setGdkEventButtonFields(JNIEnv *env, jobject lpObject, GdkEventButton *lpStruct);
-#define GdkEventButton_sizeof() sizeof(GdkEventButton)
-#else
-#define cacheGdkEventButtonFields(a,b)
-#define getGdkEventButtonFields(a,b,c) NULL
-#define setGdkEventButtonFields(a,b,c)
-#define GdkEventButton_sizeof() 0
-#endif
-
-#ifndef NO_GdkEventCrossing
-void cacheGdkEventCrossingFields(JNIEnv *env, jobject lpObject);
-GdkEventCrossing *getGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct);
-void setGdkEventCrossingFields(JNIEnv *env, jobject lpObject, GdkEventCrossing *lpStruct);
-#define GdkEventCrossing_sizeof() sizeof(GdkEventCrossing)
-#else
-#define cacheGdkEventCrossingFields(a,b)
-#define getGdkEventCrossingFields(a,b,c) NULL
-#define setGdkEventCrossingFields(a,b,c)
-#define GdkEventCrossing_sizeof() 0
-#endif
-
-#ifndef NO_GdkEventFocus
-void cacheGdkEventFocusFields(JNIEnv *env, jobject lpObject);
-GdkEventFocus *getGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct);
-void setGdkEventFocusFields(JNIEnv *env, jobject lpObject, GdkEventFocus *lpStruct);
-#define GdkEventFocus_sizeof() sizeof(GdkEventFocus)
-#else
-#define cacheGdkEventFocusFields(a,b)
-#define getGdkEventFocusFields(a,b,c) NULL
-#define setGdkEventFocusFields(a,b,c)
-#define GdkEventFocus_sizeof() 0
-#endif
-
-#ifndef NO_GdkEventKey
-void cacheGdkEventKeyFields(JNIEnv *env, jobject lpObject);
-GdkEventKey *getGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct);
-void setGdkEventKeyFields(JNIEnv *env, jobject lpObject, GdkEventKey *lpStruct);
-#define GdkEventKey_sizeof() sizeof(GdkEventKey)
-#else
-#define cacheGdkEventKeyFields(a,b)
-#define getGdkEventKeyFields(a,b,c) NULL
-#define setGdkEventKeyFields(a,b,c)
-#define GdkEventKey_sizeof() 0
-#endif
-
-#ifndef NO_GdkEventMotion
-void cacheGdkEventMotionFields(JNIEnv *env, jobject lpObject);
-GdkEventMotion *getGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct);
-void setGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpStruct);
-#define GdkEventMotion_sizeof() sizeof(GdkEventMotion)
-#else
-#define cacheGdkEventMotionFields(a,b)
-#define getGdkEventMotionFields(a,b,c) NULL
-#define setGdkEventMotionFields(a,b,c)
-#define GdkEventMotion_sizeof() 0
-#endif
-
-#ifndef NO_GdkEventWindowState
-void cacheGdkEventWindowStateFields(JNIEnv *env, jobject lpObject);
-GdkEventWindowState *getGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct);
-void setGdkEventWindowStateFields(JNIEnv *env, jobject lpObject, GdkEventWindowState *lpStruct);
-#define GdkEventWindowState_sizeof() sizeof(GdkEventWindowState)
-#else
-#define cacheGdkEventWindowStateFields(a,b)
-#define getGdkEventWindowStateFields(a,b,c) NULL
-#define setGdkEventWindowStateFields(a,b,c)
-#define GdkEventWindowState_sizeof() 0
-#endif
-
-#ifndef NO_GdkGeometry
-void cacheGdkGeometryFields(JNIEnv *env, jobject lpObject);
-GdkGeometry *getGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct);
-void setGdkGeometryFields(JNIEnv *env, jobject lpObject, GdkGeometry *lpStruct);
-#define GdkGeometry_sizeof() sizeof(GdkGeometry)
-#else
-#define cacheGdkGeometryFields(a,b)
-#define getGdkGeometryFields(a,b,c) NULL
-#define setGdkGeometryFields(a,b,c)
-#define GdkGeometry_sizeof() 0
-#endif
-
#ifndef NO_GdkKeymapKey
void cacheGdkKeymapKeyFields(JNIEnv *env, jobject lpObject);
GdkKeymapKey *getGdkKeymapKeyFields(JNIEnv *env, jobject lpObject, GdkKeymapKey *lpStruct);
@@ -210,18 +78,6 @@ void setGdkRectangleFields(JNIEnv *env, jobject lpObject, GdkRectangle *lpStruct
#define GdkRectangle_sizeof() 0
#endif
-#ifndef NO_GdkWindowAttr
-void cacheGdkWindowAttrFields(JNIEnv *env, jobject lpObject);
-GdkWindowAttr *getGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct);
-void setGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStruct);
-#define GdkWindowAttr_sizeof() sizeof(GdkWindowAttr)
-#else
-#define cacheGdkWindowAttrFields(a,b)
-#define getGdkWindowAttrFields(a,b,c) NULL
-#define setGdkWindowAttrFields(a,b,c)
-#define GdkWindowAttr_sizeof() 0
-#endif
-
#ifndef NO_GtkAllocation
void cacheGtkAllocationFields(JNIEnv *env, jobject lpObject);
GtkAllocation *getGtkAllocationFields(JNIEnv *env, jobject lpObject, GtkAllocation *lpStruct);
@@ -270,18 +126,6 @@ void setGtkRequisitionFields(JNIEnv *env, jobject lpObject, GtkRequisition *lpSt
#define GtkRequisition_sizeof() 0
#endif
-#ifndef NO_GtkTargetEntry
-void cacheGtkTargetEntryFields(JNIEnv *env, jobject lpObject);
-GtkTargetEntry *getGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct);
-void setGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpStruct);
-#define GtkTargetEntry_sizeof() sizeof(GtkTargetEntry)
-#else
-#define cacheGtkTargetEntryFields(a,b)
-#define getGtkTargetEntryFields(a,b,c) NULL
-#define setGtkTargetEntryFields(a,b,c)
-#define GtkTargetEntry_sizeof() 0
-#endif
-
#ifndef NO_GtkWidgetClass
void cacheGtkWidgetClassFields(JNIEnv *env, jobject lpObject);
GtkWidgetClass *getGtkWidgetClassFields(JNIEnv *env, jobject lpObject, GtkWidgetClass *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Lock.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Lock.java
deleted file mode 100644
index aff4e47255..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Lock.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal;
-
-/**
- * Instances of this represent a recursive monitor.
- */
-public class Lock {
- int count, waitCount;
- Thread owner;
-
-/**
- * Locks the monitor and returns the lock count. If
- * the lock is owned by another thread, wait until
- * the lock is released.
- *
- * @return the lock count
- */
-public int lock() {
- synchronized (this) {
- Thread current = Thread.currentThread();
- if (owner != current) {
- waitCount++;
- while (count > 0) {
- try {
- wait();
- } catch (InterruptedException e) {
- /* Wait forever, just like synchronized blocks */
- }
- }
- --waitCount;
- owner = current;
- }
- return ++count;
- }
-}
-
-/**
- * Unlocks the monitor. If the current thread is not
- * the monitor owner, do nothing.
- */
-public void unlock() {
- synchronized (this) {
- Thread current = Thread.currentThread();
- if (owner == current) {
- if (--count == 0) {
- owner = null;
- if (waitCount > 0) notifyAll();
- }
- }
- }
-}
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java
index 37f4d3a111..3b6c5e7258 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java
@@ -17,7 +17,6 @@ package org.eclipse.swt.internal;
public class Platform {
public static final String PLATFORM = "gtk"; //$NON-NLS-1$
- public static final Lock lock = new Lock ();
public static boolean isLoadable () {
return Library.isLoadable ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java
index cae0eb357a..e9ea39f900 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java
@@ -161,7 +161,6 @@ public class ATK extends OS {
/** Signals */
public static final byte[] selection_changed = OS.ascii ("selection_changed");
- public static final byte[] active_descendant_changed = OS.ascii ("active_descendant_changed");
public static final byte[] text_changed_insert = OS.ascii ("text_changed::insert");
public static final byte[] text_changed_delete = OS.ascii ("text_changed::delete");
public static final byte[] text_caret_moved = OS.ascii ("text_caret_moved");
@@ -169,7 +168,6 @@ public class ATK extends OS {
public static final byte[] load_complete = OS.ascii ("load-complete");
public static final byte[] load_stopped = OS.ascii ("load-stopped");
public static final byte[] reload = OS.ascii ("reload");
- public static final byte[] state_change = OS.ascii ("state-change");
public static final byte[] bounds_changed = OS.ascii ("bounds-changed");
public static final byte[] link_activated = OS.ascii ("link-activated");
public static final byte[] link_selected = OS.ascii ("link-selected");
@@ -220,186 +218,39 @@ public static final native long ATK_TYPE_TABLE ();
public static final native long ATK_TYPE_TEXT ();
/** @method flags=const */
public static final native long ATK_TYPE_VALUE ();
-/** @method flags=const */
-public static final native long ATK_TYPE_OBJECT_FACTORY ();
-public static final native long _ATK_ACTION_GET_IFACE (long obj);
-public static final long ATK_ACTION_GET_IFACE (long obj) {
- lock.lock();
- try {
- return _ATK_ACTION_GET_IFACE(obj);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _ATK_COMPONENT_GET_IFACE(long atkHandle);
-public static final long ATK_COMPONENT_GET_IFACE(long atkHandle) {
- lock.lock();
- try {
- return _ATK_COMPONENT_GET_IFACE(atkHandle);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _ATK_OBJECT_FACTORY_CLASS (long klass);
-public static final native long _ATK_SELECTION_GET_IFACE (long obj);
-public static final long ATK_SELECTION_GET_IFACE (long obj) {
- lock.lock();
- try {
- return _ATK_SELECTION_GET_IFACE(obj);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _ATK_EDITABLE_TEXT_GET_IFACE (long handle);
-public static final long ATK_EDITABLE_TEXT_GET_IFACE (long handle) {
- lock.lock();
- try {
- return _ATK_EDITABLE_TEXT_GET_IFACE(handle);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _ATK_HYPERTEXT_GET_IFACE (long handle);
-public static final long ATK_HYPERTEXT_GET_IFACE (long handle) {
- lock.lock();
- try {
- return _ATK_HYPERTEXT_GET_IFACE(handle);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _ATK_TABLE_GET_IFACE (long handle);
-public static final long ATK_TABLE_GET_IFACE (long handle) {
- lock.lock();
- try {
- return _ATK_TABLE_GET_IFACE(handle);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _ATK_TEXT_GET_IFACE (long handle);
-public static final long ATK_TEXT_GET_IFACE (long handle) {
- lock.lock();
- try {
- return _ATK_TEXT_GET_IFACE(handle);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _ATK_VALUE_GET_IFACE (long handle);
-public static final long ATK_VALUE_GET_IFACE (long handle) {
- lock.lock();
- try {
- return _ATK_VALUE_GET_IFACE(handle);
- } finally {
- lock.unlock();
- }
-}
+public static final native long ATK_ACTION_GET_IFACE(long obj);
+public static final native long ATK_COMPONENT_GET_IFACE(long atkHandle);
+public static final native long ATK_SELECTION_GET_IFACE(long obj);
+public static final native long ATK_EDITABLE_TEXT_GET_IFACE(long handle);
+public static final native long ATK_HYPERTEXT_GET_IFACE(long handle);
+public static final native long ATK_TABLE_GET_IFACE(long handle);
+public static final native long ATK_TEXT_GET_IFACE(long handle);
+public static final native long ATK_VALUE_GET_IFACE(long handle);
/** @param accessible cast=(AtkObject *) */
-public static final native void _atk_object_notify_state_change (long accessible, int state, boolean value);
-public static final void atk_object_notify_state_change (long accessible, int state, boolean value) {
- lock.lock();
- try {
- _atk_object_notify_state_change(accessible, state, value);
- } finally {
- lock.unlock();
- }
-}
+public static final native void atk_object_notify_state_change(long accessible, int state, boolean value);
/**
* @param object cast=(AtkObject *)
* @param relationship cast=(AtkRelationType)
* @param target cast=(AtkObject *)
*/
-public static final native boolean _atk_object_add_relationship (long object, int relationship, long target);
-public static final boolean atk_object_add_relationship (long object, int relationship, long target) {
- lock.lock();
- try {
- return _atk_object_add_relationship(object, relationship, target);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean atk_object_add_relationship(long object, int relationship, long target);
/**
* @param object cast=(AtkObject *)
* @param relationship cast=(AtkRelationType)
* @param target cast=(AtkObject *)
*/
-public static final native boolean _atk_object_remove_relationship (long object, int relationship, long target);
-public static final boolean atk_object_remove_relationship (long object, int relationship, long target) {
- lock.lock();
- try {
- return _atk_object_remove_relationship(object, relationship, target);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean atk_object_remove_relationship(long object, int relationship, long target);
/**
* @param set cast=(AtkStateSet *)
* @param type cast=(AtkStateType)
*/
-public static final native boolean _atk_state_set_add_state (long set, int type);
-public static final boolean atk_state_set_add_state (long set, int type) {
- lock.lock();
- try {
- return _atk_state_set_add_state(set, type);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _atk_text_attribute_get_name (int attr);
-public static final long atk_text_attribute_get_name (int attr) {
- lock.lock();
- try {
- return _atk_text_attribute_get_name(attr);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _atk_text_attribute_get_value (int attr, int index);
-public static final long atk_text_attribute_get_value (int attr, int index) {
- lock.lock();
- try {
- return _atk_text_attribute_get_value(attr, index);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _call (long function, long arg0);
-public static final long call (long function, long arg0) {
- lock.lock();
- try {
- return _call(function, arg0);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _call (long function, long arg0, long arg1);
-public static final long call (long function, long arg0, long arg1) {
- lock.lock();
- try {
- return _call(function, arg0, arg1);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _call (long function, long arg0, long arg1, long arg2);
-public static final long call (long function, long arg0, long arg1, long arg2) {
- lock.lock();
- try {
- return _call(function, arg0, arg1, arg2);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _call (long function, long arg0, long arg1, long arg2, long arg3, long arg4);
-public static final long call (long function, long arg0, long arg1, long arg2, long arg3, long arg4) {
- lock.lock();
- try {
- return _call(function, arg0, arg1, arg2, arg3, arg4);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean atk_state_set_add_state(long set, int type);
+public static final native long atk_text_attribute_get_name(int attr);
+public static final native long atk_text_attribute_get_value(int attr, int index);
+public static final native long call(long function, long arg0);
+public static final native long call(long function, long arg0, long arg1);
+public static final native long call(long function, long arg0, long arg1, long arg2);
+public static final native long call(long function, long arg0, long arg1, long arg2, long arg3, long arg4);
public static final native void memmove (AtkActionIface dest, long src);
public static final native void memmove (AtkComponentIface dest, long src);
public static final native void memmove (AtkEditableTextIface dest, long src);
@@ -409,15 +260,6 @@ public static final native void memmove (AtkSelectionIface dest, long src);
public static final native void memmove (AtkTableIface dest, long src);
public static final native void memmove (AtkTextIface dest, long src);
public static final native void memmove (AtkValueIface dest, long src);
-public static final native void memmove (long dest, AtkActionIface src);
-public static final native void memmove (long dest, AtkComponentIface src);
-public static final native void memmove (long dest, AtkEditableTextIface src);
-public static final native void memmove (long dest, AtkHypertextIface src);
-public static final native void memmove (long dest, AtkObjectClass src);
-public static final native void memmove (long dest, AtkSelectionIface src);
-public static final native void memmove (long dest, AtkTableIface src);
-public static final native void memmove (long dest, AtkTextIface src);
-public static final native void memmove (long dest, AtkValueIface src);
/**
* @param dest cast=(void *)
* @param src cast=(const void *),flags=no_out
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index 6132c5c132..7e5e26275b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 Red Hat Inc. and others. All rights reserved.
+ * Copyright (c) 2018, 2020 Red Hat Inc. and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -30,9 +30,6 @@ public class GDK extends OS {
public static final int GDK_Alt_L = 0xffe9;
public static final int GDK_Alt_R = 0xffea;
public static final int GDK_BackSpace = 0xff08;
- public static final int GDK_BOTTOM_LEFT_CORNER = 0xc;
- public static final int GDK_BOTTOM_RIGHT_CORNER = 0xe;
- public static final int GDK_BOTTOM_SIDE = 0x10;
public static final int GDK_BUTTON1_MASK = 0x100;
public static final int GDK_BUTTON2_MASK = 0x200;
public static final int GDK_BUTTON3_MASK = 0x400;
@@ -47,14 +44,11 @@ public class GDK extends OS {
public static final int GDK_COLORSPACE_RGB = 0;
public static final int GDK_CONFIGURE = 13;
public static final int GDK_CONTROL_MASK = 0x4;
- public static final int GDK_CROSS = 0x1e;
public static final int GDK_CROSSING_NORMAL = 0;
public static final int GDK_CROSSING_GRAB = 1;
public static final int GDK_CROSSING_UNGRAB = 2;
public static final int GDK_Break = 0xff6b;
- public static final int GDK_Cancel = 0xff69;
public static final int GDK_Caps_Lock = 0xffE5;
- public static final int GDK_Clear = 0xff0B;
public static final int GDK_Control_L = 0xffe3;
public static final int GDK_Control_R = 0xffe4;
public static final int GDK_CURRENT_TIME = 0x0;
@@ -64,7 +58,6 @@ public class GDK extends OS {
public static final int GDK_DECOR_MINIMIZE = 0x20;
public static final int GDK_DECOR_RESIZEH = 0x4;
public static final int GDK_DECOR_TITLE = 0x8;
- public static final int GDK_DOUBLE_ARROW = 0x2a;
public static final int GDK_Delete = 0xffff;
public static final int GDK_Down = 0xff54;
public static final int GDK_ENTER_NOTIFY_MASK = 0x1000;
@@ -97,7 +90,6 @@ public class GDK extends OS {
public static final int GDK_F9 = 0xffc6;
public static final int GDK_KEY_a = 0x061;
public static final int GDK_KEY_z = 0x07a;
- public static final int GDK_FLEUR = 0x34;
public static final int GDK_FOCUS_CHANGE = 0xc;
public static final int GDK_FOCUS_CHANGE_MASK = 0x4000;
public static final int GDK_FUNC_ALL = 1;
@@ -108,20 +100,10 @@ public class GDK extends OS {
public static final int GDK_FUNC_CLOSE = 32;
public static final int GDK_GRAB_SUCCESS = 0x0;
public static final int GDK_GRAVITY_NORTH_WEST = 1;
- public static final int GDK_GRAVITY_NORTH = 2;
- public static final int GDK_GRAVITY_NORTH_EAST = 3;
- public static final int GDK_GRAVITY_WEST = 4;
- public static final int GDK_GRAVITY_CENTER = 5;
- public static final int GDK_GRAVITY_EAST = 6;
- public static final int GDK_GRAVITY_SOUTH_WEST = 7;
- public static final int GDK_GRAVITY_SOUTH = 8;
- public static final int GDK_GRAVITY_SOUTH_EAST = 9;
- public static final int GDK_GRAVITY_STATIC = 10;
- public static final int GDK_HAND2 = 0x3c;
public static final int GDK_Help = 0xFF6A;
public static final int GDK_HINT_MIN_SIZE = 1 << 1;
+ public static final int GDK_HINT_MAX_SIZE = 1 << 2;
public static final int GDK_Home = 0xff50;
- public static final int GDK_INCLUDE_INFERIORS = 0x1;
public static final int GDK_INPUT_ONLY = 1;
public static final int GDK_INTERP_BILINEAR = 0x2;
public static final int GDK_Insert = 0xff63;
@@ -160,8 +142,6 @@ public class GDK extends OS {
public static final int GDK_KP_Up = 0xFF97;
public static final int GDK_LEAVE_NOTIFY = 11;
public static final int GDK_LEAVE_NOTIFY_MASK = 0x2000;
- public static final int GDK_LEFT_PTR = 0x44;
- public static final int GDK_LEFT_SIDE = 0x46;
public static final int GDK_Linefeed = 0xff0A;
public static final int GDK_Left = 0xff51;
public static final int GDK_Meta_L = 0xFFE7;
@@ -188,26 +168,18 @@ public class GDK extends OS {
public static final int GDK_MOTION_NOTIFY = 0x3;
public static final int GDK_NO_EXPOSE = 30;
public static final int GDK_NONE = 0;
- public static final int GDK_NOTIFY_INFERIOR = 2;
public static final int GDK_Num_Lock = 0xFF7F;
public static final int GDK_OWNERSHIP_NONE = 0;
- public static final int GDK_PIXBUF_ALPHA_BILEVEL = 0x0;
public static final int GDK_POINTER_MOTION_HINT_MASK = 0x8;
public static final int GDK_POINTER_MOTION_MASK = 0x4;
public static final int GDK_PROPERTY_NOTIFY = 16;
- public static final int GDK_PROPERTY_CHANGE_MASK = 1 << 16;
public static final int GDK_Page_Down = 0xff56;
public static final int GDK_Page_Up = 0xff55;
public static final int GDK_Pause = 0xff13;
public static final int GDK_Print = 0xff61;
- public static final int GDK_QUESTION_ARROW = 0x5c;
- public static final int GDK_RIGHT_SIDE = 0x60;
public static final int GDK_Return = 0xff0d;
public static final int GDK_Right = 0xff53;
public static final int GDK_space = 0x20;
- public static final int GDK_SB_H_DOUBLE_ARROW = 0x6c;
- public static final int GDK_SB_UP_ARROW = 0x72;
- public static final int GDK_SB_V_DOUBLE_ARROW = 0x74;
public static final int GDK_SEAT_CAPABILITY_NONE = 0;
public static final int GDK_SEAT_CAPABILITY_POINTER = 1 << 0;
public static final int GDK_SEAT_CAPABILITY_TOUCH = 1 << 1;
@@ -227,27 +199,17 @@ public class GDK extends OS {
public static final int GDK_SELECTION_NOTIFY = 19;
public static final int GDK_SELECTION_REQUEST = 18;
public static final int GDK_SHIFT_MASK = 0x1;
- public static final int GDK_SIZING = 0x78;
- public static final int GDK_STIPPLED = 0x2;
- public static final int GDK_SURFACE_STATE_ICONIFIED = 1 << 1;
+ public static final int GDK_SURFACE_STATE_MINIMIZED = 1 << 1;
public static final int GDK_SURFACE_STATE_MAXIMIZED = 1 << 2;
public static final int GDK_SURFACE_STATE_FULLSCREEN = 1 << 4;
- public static final int GDK_TILED = 0x1;
public static final int GDK_Shift_L = 0xffe1;
public static final int GDK_Shift_R = 0xffe2;
- public static final int GDK_SCROLL = 31;
public static final int GDK_Scroll_Lock = 0xff14;
- public static final int GDK_TOP_LEFT_CORNER = 0x86;
- public static final int GDK_TOP_RIGHT_CORNER = 0x88;
- public static final int GDK_TOP_SIDE = 0x8a;
public static final int GDK_Tab = 0xff09;
public static final int GDK_Up = 0xff52;
- public static final int GDK_WATCH = 0x96;
- public static final int GDK_XOR = 0x2;
- public static final int GDK_XTERM = 0x98;
- public static final int GDK_X_CURSOR = 0x0;
public static final int GDK_WINDOW_CHILD = 2;
public static final int GDK_WINDOW_STATE = 32;
+ public static final int GDK_WINDOW_STATE_WITHDRAWN = 1 << 0;
public static final int GDK_WINDOW_STATE_ICONIFIED = 1 << 1;
public static final int GDK_WINDOW_STATE_MAXIMIZED = 1 << 2;
public static final int GDK_WINDOW_STATE_FULLSCREEN = 1 << 4;
@@ -277,18 +239,7 @@ public class GDK extends OS {
/** sizeof(TYPE) for 32/64 bit support */
public static final native int GdkKeymapKey_sizeof();
public static final native int GdkRGBA_sizeof();
- public static final native int GdkEvent_sizeof();
- public static final native int GdkEventAny_sizeof();
- public static final native int GdkEventButton_sizeof();
- public static final native int GdkEventCrossing_sizeof();
- public static final native int GdkEventFocus_sizeof();
- public static final native int GdkEventKey_sizeof();
- public static final native int GdkEventMotion_sizeof();
- public static final native int GdkEventWindowState_sizeof();
- public static final native int GdkGeometry_sizeof();
public static final native int GdkRectangle_sizeof();
- public static final native int GdkWindowAttr_sizeof();
-
/** Macros */
/** @param event cast=(GdkEvent *) */
@@ -298,1090 +249,347 @@ public class GDK extends OS {
/** @param display cast=(GdkDisplay *) */
public static final native boolean GDK_IS_X11_DISPLAY(long display);
/** @method flags=const */
- public static final native long _GDK_TYPE_RGBA();
- public static final long GDK_TYPE_RGBA() {
- lock.lock();
- try {
- return _GDK_TYPE_RGBA();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GDK_TYPE_RGBA();
/** @method flags=const */
- public static final native long _GDK_TYPE_PIXBUF();
- public static final long GDK_TYPE_PIXBUF() {
- lock.lock();
- try {
- return _GDK_TYPE_PIXBUF();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GDK_TYPE_PIXBUF();
/** @param gdkdisplay cast=(GdkDisplay *) */
- public static final native long _gdk_x11_display_get_xdisplay(long gdkdisplay);
- public static final long gdk_x11_display_get_xdisplay (long gdkdisplay) {
- lock.lock();
- try {
- return _gdk_x11_display_get_xdisplay(gdkdisplay);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_x11_get_default_xdisplay();
- public static final long gdk_x11_get_default_xdisplay () {
- lock.lock();
- try {
- return _gdk_x11_get_default_xdisplay();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_x11_display_get_xdisplay(long gdkdisplay);
+ public static final native long gdk_x11_get_default_xdisplay();
/**
* @method flags=dynamic
* @param xvisualid cast=(VisualID)
*/
- public static final native long _gdk_x11_screen_lookup_visual(long screen, int xvisualid);
- /** [GTK3/GTK4, GTK3 uses GdkScreen but GTK4 uses GdkX11Screen -- method signature otherwise identical] */
- public static final long gdk_x11_screen_lookup_visual(long screen, int xvisualid) {
- lock.lock();
- try {
- return _gdk_x11_screen_lookup_visual(screen, xvisualid);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3/GTK4, GTK3 uses GdkScreen but GTK4 uses GdkX11Screen -- method signature otherwise identical] */
+ public static final native long gdk_x11_screen_lookup_visual(long screen, int xvisualid);
/**
* @method flags=dynamic
*/
- public static final native long _gdk_x11_screen_get_window_manager_name(long screen);
- /** [GTK3/GTK4, GTK3 uses GdkScreen but GTK4 uses GdkX11Screen -- method signature otherwise identical] */
- public static final long gdk_x11_screen_get_window_manager_name(long screen) {
- lock.lock();
- try {
- return _gdk_x11_screen_get_window_manager_name(screen);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native long _gdk_x11_visual_get_xvisual(long visual);
- /** [GTK3/GTK4, GTK3 uses GdkVisual but GTK4 uses GdkX11Visual -- method signature otherwise identical] */
- public static final long gdk_x11_visual_get_xvisual(long visual) {
- lock.lock();
- try {
- return _gdk_x11_visual_get_xvisual(visual);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3/GTK4, GTK3 uses GdkScreen but GTK4 uses GdkX11Screen -- method signature otherwise identical] */
+ public static final native long gdk_x11_screen_get_window_manager_name(long screen);
/**
* @param gdkwindow cast=(GdkWindow *)
*/
- public static final native long _gdk_x11_window_get_xid(long gdkwindow);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_x11_window_get_xid(long gdkwindow) {
- lock.lock();
- try {
- return _gdk_x11_window_get_xid(gdkwindow);
- } finally {
- lock.unlock();
-
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_x11_window_get_xid(long gdkwindow);
/**
* @param surface cast=(GdkSurface *)
*/
- public static final native long _gdk_x11_surface_get_xid(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_x11_surface_get_xid(long surface) {
- lock.lock();
- try {
- return _gdk_x11_surface_get_xid(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_x11_surface_get_xid(long surface);
/**
* @param gdkdisplay cast=(GdkDisplay *)
* @param xid cast=(Window)
*/
- public static final native long _gdk_x11_window_lookup_for_display(long gdkdisplay, long xid);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_x11_window_lookup_for_display(long gdkdisplay, long xid) {
- lock.lock();
- try {
- return _gdk_x11_window_lookup_for_display(gdkdisplay, xid);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_x11_window_lookup_for_display(long gdkdisplay, long xid);
/**
* @param gdkdisplay cast=(GdkDisplay *)
* @param xid cast=(Window)
*/
- public static final native long _gdk_x11_surface_lookup_for_display(long gdkdisplay, long xid);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_x11_surface_lookup_for_display(long gdkdisplay, long xid) {
- lock.lock();
- try {
- return _gdk_x11_surface_lookup_for_display(gdkdisplay, xid);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_x11_surface_lookup_for_display(long gdkdisplay, long xid);
/**
* @method flags=dynamic
* @param atom_name cast=(const gchar *),flags=no_out critical
*/
- public static final native long _gdk_atom_intern(byte[] atom_name, boolean only_if_exists);
- /** [GTK3 only] */
- public static final long gdk_atom_intern(byte[] atom_name, boolean only_if_exists) {
- lock.lock();
- try {
- return _gdk_atom_intern(atom_name, only_if_exists);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only] */
+ public static final native long gdk_atom_intern(byte[] atom_name, boolean only_if_exists);
/** @param atom cast=(GdkAtom) */
- public static final native long _gdk_atom_name(long atom);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_atom_name(long atom) {
- lock.lock();
- try {
- return _gdk_atom_name(atom);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param display cast=(GdkDisplay *)
- */
- public static final native void _gdk_display_beep(long display);
- public static final void gdk_display_beep(long display) {
- lock.lock();
- try {
- _gdk_display_beep(display);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_atom_name(long atom);
/**
* @method flags=dynamic
* @param window cast=(GdkWindow *)
*/
- public static final native long _gdk_cairo_create(long window);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final long gdk_cairo_create(long window) {
- lock.lock();
- try {
- return _gdk_cairo_create(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
+ public static final native long gdk_cairo_create(long window);
/**
+ * @method flags=dynamic
* @param cr cast=(cairo_t *)
* @param rect cast=(GdkRectangle *),flags=no_in
*/
- public static final native boolean _gdk_cairo_get_clip_rectangle(long cr, GdkRectangle rect);
- public static final boolean gdk_cairo_get_clip_rectangle(long cr, GdkRectangle rect) {
- lock.lock();
- try {
- return _gdk_cairo_get_clip_rectangle(cr, rect);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_cairo_get_clip_rectangle(long cr, GdkRectangle rect);
/**
* @param cairo cast=(cairo_t *)
* @param region cast=(cairo_region_t *)
*/
- public static final native void _gdk_cairo_region(long cairo, long region);
- public static final void gdk_cairo_region(long cairo, long region) {
- lock.lock();
- try {
- _gdk_cairo_region(cairo, region);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_cairo_region(long cairo, long region);
/**
* @param cairo cast=(cairo_t *)
* @param rgba cast=(const GdkRGBA *)
*/
- public static final native void _gdk_cairo_set_source_rgba(long cairo, GdkRGBA rgba);
- public static final void gdk_cairo_set_source_rgba(long cairo, GdkRGBA rgba) {
- lock.lock();
- try {
- _gdk_cairo_set_source_rgba(cairo, rgba);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_cairo_set_source_rgba(long cairo, GdkRGBA rgba);
/**
* @param window cast=(GdkWindow *)
- * @param region cast=(cairo_region_t *)
- * @method flags=dynamic
*/
- public static final native long _gdk_window_begin_draw_frame(long window, long region);
- public static final long gdk_window_begin_draw_frame(long window, long region) {
- lock.lock();
- try {
- return _gdk_window_begin_draw_frame(window, region);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_window_get_state(long window);
/**
* @param window cast=(GdkWindow *)
- * @param context cast=(GdkDrawingContext *)
- * @method flags=dynamic
*/
- public static final native long _gdk_window_end_draw_frame(long window, long context);
- public static final long gdk_window_end_draw_frame(long window, long context) {
- lock.lock();
- try {
- return _gdk_window_end_draw_frame(window, context);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_window_get_width(long window);
/**
- * @param window cast=(GdkWindow *)
+ * @param surface cast=(GdkSurface *)
*/
- public static final native int _gdk_window_get_state(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final int gdk_window_get_state(long window) {
- lock.lock();
- try {
- return _gdk_window_get_state(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native int gdk_surface_get_width(long surface);
/**
* @param window cast=(GdkWindow *)
*/
- public static final native int _gdk_window_get_width(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final int gdk_window_get_width(long window) {
- lock.lock();
- try {
- return _gdk_window_get_width(window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- */
- public static final native int _gdk_surface_get_width(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final int gdk_surface_get_width(long surface) {
- lock.lock();
- try {
- return _gdk_surface_get_width(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_window_get_visible_region(long window);
/**
- * @param surface cast=(GdkSurface *)
+ * @param window cast=(GdkWindow *)
*/
- public static final native int _gdk_surface_get_state(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final int gdk_surface_get_state(long surface) {
- lock.lock();
- try {
- return _gdk_surface_get_state(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_window_get_height(long window);
/**
- * @param window cast=(GdkWindow *)
+ * @param surface cast=(GdkSurface *)
*/
- public static final native long _gdk_window_get_visible_region(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_window_get_visible_region(long window) {
- lock.lock();
- try {
- return _gdk_window_get_visible_region(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native int gdk_surface_get_height(long surface);
/**
- * @param window cast=(GdkWindow *)
+ * @param surface cast=(GdkSurface *)
+ * @param region cast=(cairo_region_t *)
*/
- public static final native int _gdk_window_get_height(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final int gdk_window_get_height(long window) {
- lock.lock();
- try {
- return _gdk_window_get_height(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native void gdk_surface_set_input_region(long surface, long region);
/**
- * @param surface cast=(GdkSurface *)
+ * @param surface cast=(GdkSurface *)
+ * @param region cast=(cairo_region_t *)
*/
- public static final native int _gdk_surface_get_height(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final int gdk_surface_get_height(long surface) {
- lock.lock();
- try {
- return _gdk_surface_get_height(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native void gdk_surface_set_opaque_region(long surface, long region);
/**
* @param cairo cast=(cairo_t *)
* @param pixbuf cast=(const GdkPixbuf *)
* @param pixbuf_x cast=(gdouble)
* @param pixbuf_y cast=(gdouble)
*/
- public static final native void _gdk_cairo_set_source_pixbuf(long cairo, long pixbuf, double pixbuf_x, double pixbuf_y);
- public static final void gdk_cairo_set_source_pixbuf(long cairo, long pixbuf, double pixbuf_x, double pixbuf_y) {
- lock.lock();
- try {
- _gdk_cairo_set_source_pixbuf(cairo,pixbuf,pixbuf_x,pixbuf_y);
- }
- finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_cairo_set_source_pixbuf(long cairo, long pixbuf, double pixbuf_x, double pixbuf_y);
/**
* @param cairo cast=(cairo_t *)
* @param window cast=(GdkWindow *)
* @param x cast=(gdouble)
* @param y cast=(gdouble)
*/
- public static final native void _gdk_cairo_set_source_window(long cairo, long window, int x, int y);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_cairo_set_source_window(long cairo, long window, int x, int y) {
- lock.lock();
- try {
- _gdk_cairo_set_source_window(cairo, window, x, y);
- }
- finally {
- lock.unlock();
- }
- }
- /** @param display cast=(GdkDisplay *)
- * @param cursor_type cast=(GdkCursorType)
- */
- public static final native long _gdk_cursor_new_for_display(long display, long cursor_type);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_cursor_new_for_display(long display, long cursor_type) {
- lock.lock();
- try {
- return _gdk_cursor_new_for_display(display, cursor_type);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_cairo_set_source_window(long cairo, long window, int x, int y);
+
+
+ /* GdkCursor [GTK3 only] */
/**
* @param display cast=(GdkDisplay *)
* @param cursor_name cast=(const gchar *)
*/
- public static final native long _gdk_cursor_new_from_name(long display, byte[] cursor_name);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_cursor_new_from_name(long display, byte[] cursor_name) {
- lock.lock();
- try {
- return _gdk_cursor_new_from_name(display, cursor_name);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param cursor_name cast=(const gchar *)
- * @param fallback cast=(GdkCursor *)
- */
- public static final native long _gdk_cursor_new_from_name(byte[] cursor_name, long fallback);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_cursor_new_from_name(byte[] cursor_name, long fallback) {
- lock.lock();
- try {
- return _gdk_cursor_new_from_name(cursor_name, fallback);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_cursor_new_from_name(long display, String cursor_name);
/**
* @param display cast=(GdkDisplay *)
* @param pixbuf cast=(GdkPixbuf *)
* @param x cast=(gint)
* @param y cast=(gint)
*/
- public static final native long _gdk_cursor_new_from_pixbuf(long display, long pixbuf, int x, int y);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_cursor_new_from_pixbuf(long display, long pixbuf, int x, int y) {
- lock.lock();
- try {
- return _gdk_cursor_new_from_pixbuf(display, pixbuf, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_cursor_new_from_pixbuf(long display, long pixbuf, int x, int y);
+
+ /* GdkCursor [GTK4 only] */
/**
- * @param texture cast=(GdkTexture *)
- * @param x cast=(gint)
- * @param y cast=(gint)
+ * @param cursor_name cast=(const gchar *)
* @param fallback cast=(GdkCursor *)
*/
- public static final native long _gdk_cursor_new_from_texture(long texture, int x, int y, long fallback);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_cursor_new_from_texture(long texture, int x, int y, long fallback) {
- lock.lock();
- try {
- return _gdk_cursor_new_from_texture(texture, x, y, fallback);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param device cast=(GdkDevice *)
- * @param screen cast=(GdkScreen *)
- * @param x cast=(gint)
- * @param y cast=(gint)
- */
- public static final native void _gdk_device_warp(long device, long screen, int x, int y);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_device_warp(long device, long screen, int x, int y) {
- lock.lock();
- try {
- _gdk_device_warp(device, screen, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_cursor_new_from_name(String cursor_name, long fallback);
/**
- * @param device cast=(GdkDevice *)
+ * @param texture cast=(GdkTexture *)
* @param x cast=(gint)
* @param y cast=(gint)
+ * @param fallback cast=(GdkCursor *)
*/
- public static final native void _gdk_device_warp(long device, int x, int y);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_device_warp(long device, int x, int y) {
- lock.lock();
- try {
- _gdk_device_warp(device, x, y);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_display_get_default();
- public static final long gdk_display_get_default() {
- lock.lock();
- try {
- return _gdk_display_get_default();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param display cast=(GdkDisplay *)
- */
- public static final native long _gdk_display_get_default_group(long display);
- public static final long gdk_display_get_default_group(long display) {
- lock.lock();
- try {
- return _gdk_display_get_default_group(display);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param display cast=(GdkDisplay *)
- */
- public static final native long _gdk_display_get_clipboard(long display);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_display_get_clipboard(long display) {
- lock.lock();
- try {
- return _gdk_display_get_clipboard(display);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param display cast=(GdkDisplay *)
- */
- public static final native long _gdk_display_get_primary_clipboard(long display);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_display_get_primary_clipboard(long display) {
- lock.lock();
- try {
- return _gdk_display_get_primary_clipboard(display);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_cursor_new_from_texture(long texture, int x, int y, long fallback);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
*/
- public static final native long _gdk_display_get_default_seat(long display);
- public static final long gdk_display_get_default_seat(long display) {
- lock.lock();
- try {
- return _gdk_display_get_default_seat(display);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_x11_display_get_default_group(long display);
/**
* @param window cast=(GdkWindow *)
*/
- public static final native long _gdk_window_get_display(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_window_get_display(long window) {
- lock.lock();
- try {
- return _gdk_window_get_display(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_window_get_display(long window);
/**
* @param surface cast=(GdkSurface *)
*/
- public static final native long _gdk_surface_get_display(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_surface_get_display(long surface) {
- lock.lock();
- try {
- return _gdk_surface_get_display(surface);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param display cast=(GdkDisplay *)
- */
- public static final native long _gdk_display_get_device_manager(long display);
- public static final long gdk_display_get_device_manager(long display) {
- lock.lock();
- try {
- return _gdk_display_get_device_manager(display);
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=dynamic */
- public static final native long _gdk_device_manager_get_client_pointer(long device_manager);
- public static final long gdk_device_manager_get_client_pointer(long device_manager) {
- lock.lock();
- try {
- return _gdk_device_manager_get_client_pointer(device_manager);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param device cast=(GdkDevice *)
- * @param win_x cast=(gint *)
- * @param win_y cast=(gint *)
- */
- public static final native long _gdk_device_get_window_at_position(long device, int[] win_x, int[] win_y);
- /** [GTK3 only] */
- public static final long gdk_device_get_window_at_position(long device, int[] win_x, int[] win_y) {
- lock.lock();
- try {
- return _gdk_device_get_window_at_position(device, win_x, win_y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param device cast=(GdkDevice *)
- * @param win_x cast=(gint *)
- * @param win_y cast=(gint *)
- */
- public static final native long _gdk_device_get_surface_at_position(long device, int[] win_x, int[] win_y);
- /** [GTK4 only] */
- public static final long gdk_device_get_surface_at_position(long device, int[] win_x, int[] win_y) {
- lock.lock();
- try {
- return _gdk_device_get_surface_at_position(device, win_x, win_y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param display cast=(GdkDisplay *)
- */
- public static final native boolean _gdk_display_supports_cursor_color(long display);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gdk_display_supports_cursor_color(long display) {
- lock.lock();
- try {
- return _gdk_display_supports_cursor_color(display);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_surface_get_display(long surface);
+
/**
- * @param context cast=(GdkDragContext *)
+ * @method flags=dynamic
*/
- public static final native int _gdk_drag_context_get_actions(long context);
- public static final int gdk_drag_context_get_actions(long context) {
- lock.lock();
- try {
- return _gdk_drag_context_get_actions(context);
- } finally {
- lock.unlock();
- }
- }
+ // TODO GTK4 function removed
+ public static final native int gdk_drag_context_get_actions(long context);
/**
* @param context cast=(GdkDragContext *)
*/
- public static final native long _gdk_drag_context_get_dest_window(long context);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_drag_context_get_dest_window(long context) {
- lock.lock();
- try {
- return _gdk_drag_context_get_dest_window(context);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_drag_context_get_dest_window(long context);
/**
- * @param context cast=(GdkDragContext *)
+ * @method flags=dynamic
*/
- public static final native int _gdk_drag_context_get_selected_action(long context);
- public static final int gdk_drag_context_get_selected_action(long context) {
- lock.lock();
- try {
- return _gdk_drag_context_get_selected_action(context);
- } finally {
- lock.unlock();
- }
- }
+ // TODO GTK4 function removed
+ public static final native int gdk_drag_context_get_selected_action(long context);
/**
* @param context cast=(GdkDragContext *)
*/
- public static final native long _gdk_drag_context_list_targets(long context);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_drag_context_list_targets(long context) {
- lock.lock();
- try {
- return _gdk_drag_context_list_targets(context);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_drag_context_list_targets(long context);
/**
* @param context cast=(GdkDragContext *)
* @param action cast=(GdkDragAction)
* @param time cast=(guint32)
*/
- public static final native void _gdk_drag_status(long context, int action, int time);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_drag_status(long context, int action, int time) {
- lock.lock();
- try {
- _gdk_drag_status(context, action, time);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GdkDrawingContext *)
- * @method flags=dynamic
- */
- public static final native long _gdk_drawing_context_get_cairo_context(long context);
- public static final long gdk_drawing_context_get_cairo_context(long context) {
- lock.lock();
- try {
- return _gdk_drawing_context_get_cairo_context(context);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_drag_status(long context, int action, int time);
+
+ /* GDK Events [GTK3 only, if-def'd in os.h] */
/** @param event cast=(GdkEvent *) */
- public static final native long _gdk_event_copy(long event);
- public static final long gdk_event_copy(long event) {
- lock.lock();
- try {
- return _gdk_event_copy(event);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_event_copy(long event);
/** @param event cast=(GdkEvent *) */
- public static final native void _gdk_event_free(long event);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_event_free(long event) {
- lock.lock();
- try {
- _gdk_event_free(event);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_event_get();
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_event_get() {
- lock.lock();
- try {
- return _gdk_event_get();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_event_free(long event);
+ public static final native long gdk_event_get();
/**
* @param event cast=(GdkEvent *)
* @param px cast=(gdouble *)
* @param py cast=(gdouble *)
*/
- public static final native boolean _gdk_event_get_coords(long event, double[] px, double[] py);
- public static final boolean gdk_event_get_coords(long event, double[] px, double[] py) {
- lock.lock();
- try {
- return _gdk_event_get_coords(event, px, py);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param event cast=(GdkEvent *)
- * @param mode cast=(GdkCrossingMode *)
- */
- public static final native boolean _gdk_event_get_crossing_mode(long event, int [] mode);
- /** [GTK4 only, if-def'd in os.h] */
- public static final boolean gdk_event_get_crossing_mode(long event, int [] mode) {
- lock.lock();
- try {
- return _gdk_event_get_crossing_mode(event, mode);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_coords(long event, double[] px, double[] py);
/**
* @param event cast=(GdkEvent *)
* @param button cast=(guint *)
*/
- public static final native boolean _gdk_event_get_button(long event, int[] button);
- public static final boolean gdk_event_get_button(long event, int[] button) {
- lock.lock();
- try {
- return _gdk_event_get_button(event, button);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param event cast=(GdkEvent *)
- * @param in cast=(gboolean *)
- */
- public static final native boolean _gdk_event_get_focus_in(long event, boolean [] in);
- /** [GTK4 only, if-def'd in os.h] */
- public static final boolean gdk_event_get_focus_in(long event, boolean [] in) {
- lock.lock();
- try {
- return _gdk_event_get_focus_in(event, in);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_button(long event, int[] button);
/**
* @param event cast=(GdkEvent *)
* @param keyval cast=(guint *)
*/
- public static final native boolean _gdk_event_get_keyval(long event,int [] keyval);
- public static final boolean gdk_event_get_keyval(long event, int [] keyval) {
- lock.lock();
- try {
- return _gdk_event_get_keyval(event, keyval);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_keyval(long event,int [] keyval);
/**
* @param event cast=(GdkEvent *)
* @param keycode cast=(guint16 *)
*/
- public static final native boolean _gdk_event_get_keycode(long event, short [] keycode);
- public static final boolean gdk_event_get_keycode(long event, short [] keycode) {
- lock.lock();
- try {
- return _gdk_event_get_keycode(event, keycode);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param event cast=(GdkEvent *)
- * @param group cast=(guint *)
- */
- public static final native boolean _gdk_event_get_key_group(long event,int [] group);
- /** [GTK4 only, if-def'd in os.h] */
- public static final boolean gdk_event_get_key_group(long event, int [] group) {
- lock.lock();
- try {
- return _gdk_event_get_key_group(event, group);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_keycode(long event, short [] keycode);
/**
* @param event cast=(GdkEvent *)
* @param x cast=(gdouble *)
* @param y cast=(gdouble *)
*/
- public static final native boolean _gdk_event_get_root_coords(long event, double[] x, double[] y);
- public static final boolean gdk_event_get_root_coords(long event, double[] x, double[] y) {
- lock.lock();
- try {
- return _gdk_event_get_root_coords(event, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_root_coords(long event, double[] x, double[] y);
/**
* @param event cast=(GdkEvent *)
* @param pmod cast=(GdkModifierType *)
*/
- public static final native boolean _gdk_event_get_state(long event, int[] pmod);
- public static final boolean gdk_event_get_state(long event, int[] pmod) {
- lock.lock();
- try {
- return _gdk_event_get_state(event, pmod);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param event cast=(GdkEvent *)
- * @param string cast=(const char **)
- */
- public static final native boolean _gdk_event_get_string(long event, long [] string);
- /** [GTK4 only, if-def'd in os.h] */
- public static final boolean gdk_event_get_string(long event, long [] string) {
- lock.lock();
- try {
- return _gdk_event_get_string(event, string);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_state(long event, int[] pmod);
/**
* @param event cast=(const GdkEvent *)
* @param delta_x cast=(gdouble *)
* @param delta_y cast=(gdouble *)
*/
- public static final native boolean _gdk_event_get_scroll_deltas(long event, double[] delta_x, double[] delta_y);
- public static final boolean gdk_event_get_scroll_deltas(long event, double[] delta_x, double[] delta_y) {
- lock.lock();
- try {
- return _gdk_event_get_scroll_deltas(event, delta_x, delta_y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_scroll_deltas(long event, double[] delta_x, double[] delta_y);
/**
* @param event cast=(const GdkEvent *)
* @param direction cast=(GdkScrollDirection *)
*/
- public static final native boolean _gdk_event_get_scroll_direction(long event, int [] direction);
- public static final boolean gdk_event_get_scroll_direction(long event, int [] direction) {
- lock.lock();
- try {
- return _gdk_event_get_scroll_direction(event, direction);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_event_get_scroll_direction(long event, int [] direction);
+
+
+ /* GDK Events (GTK4 only, if-def'd in os.h) */
+ /** @param event cast=(GdkEvent *) */
+ public static final native long gdk_event_ref(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native void gdk_event_unref(long event);
+ /**
+ * @param event cast=(GdkEvent *)
+ * @param px cast=(double *)
+ * @param py cast=(double *)
+ */
+ public static final native boolean gdk_event_get_position(long event, double[] px, double[] py);
+ /** @param event cast=(GdkEvent *) */
+ public static final native int gdk_crossing_event_get_mode(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native int gdk_button_event_get_button(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native boolean gdk_focus_event_get_in(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native int gdk_key_event_get_keycode(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native int gdk_key_event_get_keyval(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native int gdk_key_event_get_layout(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native int gdk_event_get_modifier_state(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native void gdk_scroll_event_get_deltas(long event, double[] delta_x, double[] delta_y);
+ /** @param event cast=(GdkEvent *) */
+ public static final native int gdk_scroll_event_get_direction(long event);
+
/**
* @method flags=dynamic
*/
- public static final native long _gdk_event_get_seat(long event);
- public static final long gdk_event_get_seat(long event) {
- lock.lock();
- try {
- return _gdk_event_get_seat(event);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_event_get_seat(long event);
/**
* @param event cast=(GdkEvent *)
*/
- public static final native long _gdk_event_get_surface(long event);
- /** [GTK4 only, if-def'd in os.h] **/
- public static final long gdk_event_get_surface(long event) {
- lock.lock();
- try {
- return _gdk_event_get_surface(event);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] **/
+ public static final native long gdk_event_get_surface(long event);
/**
* @param event cast=(GdkEvent *)
*/
- public static final native long _gdk_event_get_window(long event);
- /** [GTK3 only, if-def'd in os.h] **/
- public static final long gdk_event_get_window(long event) {
- lock.lock();
- try {
- return _gdk_event_get_window(event);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] **/
+ public static final native long gdk_event_get_window(long event);
/** @param event cast=(GdkEvent *) */
- public static final native int _gdk_event_get_time(long event);
- public static final int gdk_event_get_time(long event) {
- lock.lock();
- try {
- return _gdk_event_get_time(event);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_event_get_time(long event);
/**
* @method flags=dynamic
* @param event cast=(GdkEvent *)
*/
- public static final native int _gdk_event_get_event_type(long event);
- /** [GTK3.10+] */
- public static final int gdk_event_get_event_type(long event) {
- lock.lock();
- try {
- return _gdk_event_get_event_type(event);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3.10+] */
+ public static final native int gdk_event_get_event_type(long event);
/**
- * @param func cast=(GdkEventFunc)
- * @param data cast=(gpointer)
- * @param notify cast=(GDestroyNotify)
- */
- public static final native void _gdk_event_handler_set(long func, long data, long notify);
- public static final void gdk_event_handler_set(long func, long data, long notify) {
- lock.lock();
- try {
- _gdk_event_handler_set(func, data, notify);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_event_new(int type);
- public static final long gdk_event_new(int type) {
- lock.lock();
- try {
- return _gdk_event_new(type);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_event_peek();
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_event_peek() {
- lock.lock();
- try {
- return _gdk_event_peek();
- } finally {
- lock.unlock();
- }
- }
+ * @method flags=dynamic
+ */
+ // TODO GTK4 function removed
+ public static final native void gdk_event_handler_set(long func, long data, long notify);
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_event_new(int type);
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_event_peek();
/**
* @param event cast=(GdkEvent *)
* @param device cast=(GdkDevice *)
*/
- public static final native void _gdk_event_set_device(long event, long device);
- public static final void gdk_event_set_device(long event, long device) {
- lock.lock();
- try {
- _gdk_event_set_device(event, device);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_event_set_device(long event, long device);
/** @param event cast=(GdkEvent *) */
- public static final native void _gdk_event_put(long event);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_event_put(long event) {
- lock.lock();
- try {
- _gdk_event_put(event);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_event_put(long event);
/**
* @param display cast=(GdkDisplay *)
*/
- public static final native void _gdk_x11_display_error_trap_push(long display);
- public static final void gdk_x11_display_error_trap_push(long display) {
- lock.lock();
- try {
- _gdk_x11_display_error_trap_push(display);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_x11_display_error_trap_push(long display);
/**
* @param display cast=(GdkDisplay *)
*/
- public static final native void _gdk_x11_display_error_trap_pop_ignored(long display);
- public static final void gdk_x11_display_error_trap_pop_ignored(long display) {
- lock.lock();
- try {
- _gdk_x11_display_error_trap_pop_ignored(display);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_get_default_root_window();
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_get_default_root_window() {
- lock.lock();
- try {
- return _gdk_get_default_root_window();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_x11_display_error_trap_pop_ignored(long display);
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_get_default_root_window();
/**
* @method flags=dynamic
* @param display cast=(GdkDisplay *)
*/
- public static final native long _gdk_keymap_get_for_display(long display);
- /** [GTK3 only] */
- public static final long gdk_keymap_get_for_display(long display) {
- lock.lock();
- try {
- return _gdk_keymap_get_for_display(display);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param display cast=(GdkDisplay *)
- */
- public static final native long _gdk_display_get_keymap(long display);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_display_get_keymap(long display) {
- lock.lock();
- try {
- return _gdk_display_get_keymap(display);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only] */
+ public static final native long gdk_keymap_get_for_display(long display);
+
/**
+ * @method flags=dynamic
* @param keymap cast=(GdkKeymap *)
* @param hardware_keycode cast=(guint)
* @param state cast=(GdkModifierType)
@@ -1391,273 +599,79 @@ public class GDK extends OS {
* @param level cast=(gint *)
* @param consumed_modifiers cast=(GdkModifierType *)
*/
- public static final native boolean _gdk_keymap_translate_keyboard_state (long keymap, int hardware_keycode, int state, int group, int[] keyval, int[] effective_group, int[] level, int[] consumed_modifiers);
- public static final boolean gdk_keymap_translate_keyboard_state (long keymap, int hardware_keycode, int state, int group, int[] keyval, int[] effective_group, int[] level, int[] consumed_modifiers) {
- lock.lock();
- try {
- return _gdk_keymap_translate_keyboard_state(keymap, hardware_keycode, state, group, keyval, effective_group, level, consumed_modifiers);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only] */
+ public static final native boolean gdk_keymap_translate_keyboard_state(long keymap, int hardware_keycode, int state, int group, int[] keyval, int[] effective_group, int[] level, int[] consumed_modifiers);
/**
+ * @method flags=dynamic
* @param keymap cast=(GdkKeymap*)
* @param keyval cast=(guint)
* @param keys cast=(GdkKeymapKey**)
* @param n_keys cast=(gint*)
*/
- public static final native boolean _gdk_keymap_get_entries_for_keyval (long keymap, int keyval, long [] keys, int[] n_keys);
- public static final boolean gdk_keymap_get_entries_for_keyval (long keymap, int keyval, long [] keys, int[] n_keys) {
- lock.lock();
- try {
- return _gdk_keymap_get_entries_for_keyval(keymap, keyval, keys, n_keys);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_keyval_to_lower(long keyval);
- public static final long gdk_keyval_to_lower(long keyval) {
- lock.lock();
- try {
- return _gdk_keyval_to_lower(keyval);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_keyval_to_unicode(long keyval);
- public static final long gdk_keyval_to_unicode(long keyval) {
- lock.lock();
- try {
- return _gdk_keyval_to_unicode(keyval);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only] */
+ public static final native boolean gdk_keymap_get_entries_for_keyval(long keymap, int keyval, long [] keys, int[] n_keys);
+ public static final native long gdk_keyval_to_lower(long keyval);
+ public static final native long gdk_keyval_to_unicode(long keyval);
+ /** @param keyval cast=(guint) */
+ public static final native long gdk_keyval_name(int keyval);
/**
* @method flags=dynamic
*/
- public static final native long _gdk_pango_context_get();
- /** [GTK3 only] */
- public static final long gdk_pango_context_get() {
- lock.lock();
- try {
- return _gdk_pango_context_get();
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only] */
+ public static final native long gdk_pango_context_get();
/**
* @param layout cast=(PangoLayout *)
* @param index_ranges cast=(gint *)
*/
- public static final native long _gdk_pango_layout_get_clip_region(long layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges);
- public static final long gdk_pango_layout_get_clip_region(long layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges) {
- lock.lock();
- try {
- return _gdk_pango_layout_get_clip_region(layout, x_origin, y_origin, index_ranges, n_ranges);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pango_layout_get_clip_region(long layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges);
+
/** @param animation cast=(GdkPixbufAnimation *) */
- public static final native boolean _gdk_pixbuf_animation_is_static_image(long animation);
- public static final boolean gdk_pixbuf_animation_is_static_image(long animation) {
- lock.lock();
- try {
- return _gdk_pixbuf_animation_is_static_image(animation);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_pixbuf_animation_is_static_image(long animation);
/** @param iter cast=(GdkPixbufAnimationIter *) */
- public static final native int _gdk_pixbuf_animation_iter_get_delay_time(long iter);
- public static final int gdk_pixbuf_animation_iter_get_delay_time(long iter) {
- lock.lock();
- try {
- return _gdk_pixbuf_animation_iter_get_delay_time(iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_pixbuf_animation_iter_get_delay_time(long iter);
/** @param iter cast=(GdkPixbufAnimationIter *) */
- public static final native long _gdk_pixbuf_animation_iter_get_pixbuf(long iter);
- public static final long gdk_pixbuf_animation_iter_get_pixbuf(long iter) {
- lock.lock();
- try {
- return _gdk_pixbuf_animation_iter_get_pixbuf(iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_animation_iter_get_pixbuf(long iter);
/**
+ * @method flags=ignore_deprecations
* @param iter cast=(GdkPixbufAnimationIter *)
* @param current_time cast=(const GTimeVal *)
*/
- public static final native boolean _gdk_pixbuf_animation_iter_advance(long iter, long current_time);
- public static final boolean gdk_pixbuf_animation_iter_advance(long iter, long current_time) {
- lock.lock();
- try {
- return _gdk_pixbuf_animation_iter_advance(iter, current_time);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_pixbuf_animation_iter_advance(long iter, long current_time);
/**
+ * @method flags=ignore_deprecations
* @param animation cast=(GdkPixbufAnimation *)
* @param start_time cast=(const GTimeVal *)
*/
- public static final native long _gdk_pixbuf_animation_get_iter(long animation, long start_time);
- public static final long gdk_pixbuf_animation_get_iter(long animation, long start_time) {
- lock.lock();
- try {
- return _gdk_pixbuf_animation_get_iter(animation, start_time);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_animation_get_iter(long animation, long start_time);
/** @param animation cast=(GdkPixbufAnimation *) */
- public static final native long _gdk_pixbuf_animation_get_static_image(long animation);
- public static final long gdk_pixbuf_animation_get_static_image(long animation) {
- lock.lock();
- try {
- return _gdk_pixbuf_animation_get_static_image(animation);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_animation_get_static_image(long animation);
/**
* @param src_pixbuf cast=(GdkPixbuf *)
* @param dest_pixbuf cast=(GdkPixbuf *)
*/
- public static final native void _gdk_pixbuf_copy_area(long src_pixbuf, int src_x, int src_y, int width, int height, long dest_pixbuf, int dest_x, int dest_y);
- public static final void gdk_pixbuf_copy_area(long src_pixbuf, int src_x, int src_y, int width, int height, long dest_pixbuf, int dest_x, int dest_y) {
- lock.lock();
- try {
- _gdk_pixbuf_copy_area(src_pixbuf, src_x, src_y, width, height, dest_pixbuf, dest_x, dest_y);
- } finally {
- lock.unlock();
- }
- }
- /** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native boolean _gdk_pixbuf_get_has_alpha(long pixbuf);
- public static final boolean gdk_pixbuf_get_has_alpha(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_has_alpha(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_pixbuf_copy_area(long src_pixbuf, int src_x, int src_y, int width, int height, long dest_pixbuf, int dest_x, int dest_y);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native int _gdk_pixbuf_get_height(long pixbuf);
- public static final int gdk_pixbuf_get_height(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_height(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_pixbuf_get_has_alpha(long pixbuf);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native long _gdk_pixbuf_get_pixels(long pixbuf);
- public static final long gdk_pixbuf_get_pixels(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_pixels(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_pixbuf_get_height(long pixbuf);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native int _gdk_pixbuf_get_rowstride(long pixbuf);
- public static final int gdk_pixbuf_get_rowstride(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_rowstride(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_get_pixels(long pixbuf);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native int _gdk_pixbuf_get_width(long pixbuf);
- public static final int gdk_pixbuf_get_width(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_width(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_pixbuf_get_rowstride(long pixbuf);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native long _gdk_pixbuf_get_byte_length(long pixbuf);
- public static final long gdk_pixbuf_get_byte_length(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_byte_length(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_pixbuf_get_width(long pixbuf);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native int _gdk_pixbuf_get_n_channels(long pixbuf);
- public static final int gdk_pixbuf_get_n_channels(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_n_channels(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_pixbuf_get_n_channels(long pixbuf);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native int _gdk_pixbuf_get_bits_per_sample(long pixbuf);
- public static final int gdk_pixbuf_get_bits_per_sample(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_get_bits_per_sample(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_pixbuf_get_bits_per_sample(long pixbuf);
/** @param pixbuf cast=(const GdkPixbuf *) */
- public static final native long _gdk_pixbuf_copy(long pixbuf);
- public static final long gdk_pixbuf_copy(long pixbuf) {
- lock.lock();
- try {
- return _gdk_pixbuf_copy(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_copy(long pixbuf);
/** @param loader cast=(GdkPixbufLoader *) */
- public static final native long _gdk_pixbuf_loader_get_format(long loader);
- public static final long gdk_pixbuf_loader_get_format(long loader) {
- lock.lock();
- try {
- return _gdk_pixbuf_loader_get_format(loader);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_loader_get_format(long loader);
/** @param format cast=(GdkPixbufFormat *) */
- public static final native long _gdk_pixbuf_format_get_name(long format);
- public static final long gdk_pixbuf_format_get_name(long format) {
- lock.lock();
- try {
- return _gdk_pixbuf_format_get_name(format);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_format_get_name(long format);
/** @param loader cast=(GdkPixbufLoader *) */
- public static final native long _gdk_pixbuf_loader_get_animation(long loader);
- public static final long gdk_pixbuf_loader_get_animation(long loader) {
- lock.lock();
- try {
- return _gdk_pixbuf_loader_get_animation(loader);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_loader_get_animation(long loader);
/**
* @param data cast=(const guchar *)
* @param colorspace cast=(GdkColorspace)
@@ -1665,88 +679,32 @@ public class GDK extends OS {
* @param destroy_fn cast=(GdkPixbufDestroyNotify)
* @param destroy_fn_data cast=(gpointer)
*/
- public static final native long _gdk_pixbuf_new_from_data(long data, int colorspace, boolean has_alpha, int bits_per_sample, int width, int height, int rowstride, long destroy_fn, long destroy_fn_data);
- public static final long gdk_pixbuf_new_from_data(long data, int colorspace, boolean has_alpha, int bits_per_sample, int width, int height, int rowstride, long destroy_fn, long destroy_fn_data) {
- lock.lock();
- try {
- return _gdk_pixbuf_new_from_data(data, colorspace, has_alpha, bits_per_sample, width, height, rowstride, destroy_fn, destroy_fn_data);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_pixbuf_loader_new();
- public static final long gdk_pixbuf_loader_new() {
- lock.lock();
- try {
- return _gdk_pixbuf_loader_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_new_from_data(long data, int colorspace, boolean has_alpha, int bits_per_sample, int width, int height, int rowstride, long destroy_fn, long destroy_fn_data);
+ public static final native long gdk_pixbuf_loader_new();
/**
* @param loader cast=(GdkPixbufLoader *)
* @param error cast=(GError **)
*/
- public static final native boolean _gdk_pixbuf_loader_close(long loader, long [] error);
- public static final boolean gdk_pixbuf_loader_close(long loader, long [] error) {
- lock.lock();
- try {
- return _gdk_pixbuf_loader_close(loader, error);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_pixbuf_loader_close(long loader, long [] error);
/** @param loader cast=(GdkPixbufLoader *) */
- public static final native long _gdk_pixbuf_loader_get_pixbuf(long loader);
- public static final long gdk_pixbuf_loader_get_pixbuf(long loader) {
- lock.lock();
- try {
- return _gdk_pixbuf_loader_get_pixbuf(loader);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_loader_get_pixbuf(long loader);
/**
* @param loader cast=(GdkPixbufLoader *)
* @param buffer cast=(const guchar *)
* @param count cast=(gsize)
* @param error cast=(GError **)
*/
- public static final native boolean _gdk_pixbuf_loader_write(long loader, long buffer, int count, long [] error);
- public static final boolean gdk_pixbuf_loader_write(long loader, long buffer, int count, long [] error) {
- lock.lock();
- try {
- return _gdk_pixbuf_loader_write(loader, buffer, count, error);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_pixbuf_loader_write(long loader, long buffer, int count, long [] error);
/**
* @param colorspace cast=(GdkColorspace)
* @param has_alpha cast=(gboolean)
*/
- public static final native long _gdk_pixbuf_new(int colorspace, boolean has_alpha, int bits_per_sample, int width, int height);
- public static final long gdk_pixbuf_new(int colorspace, boolean has_alpha, int bits_per_sample, int width, int height) {
- lock.lock();
- try {
- return _gdk_pixbuf_new(colorspace, has_alpha, bits_per_sample, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_new(int colorspace, boolean has_alpha, int bits_per_sample, int width, int height);
/**
* @param filename cast=(const char *)
* @param error cast=(GError**)
*/
- public static final native long _gdk_pixbuf_new_from_file(byte[] filename, long [] error);
- public static final long gdk_pixbuf_new_from_file(byte[] filename, long [] error) {
- lock.lock();
- try {
- return _gdk_pixbuf_new_from_file(filename, error);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_new_from_file(byte[] filename, long [] error);
/**
* @param pixbuf cast=(GdkPixbuf *)
* @param buffer cast=(gchar **)
@@ -1756,87 +714,69 @@ public class GDK extends OS {
* @param option_values cast=(char **)
* @param error cast=(GError **)
*/
- public static final native boolean _gdk_pixbuf_save_to_bufferv(long pixbuf, long [] buffer, long [] buffer_size, byte [] type, long [] option_keys, long [] option_values, long [] error);
- public static final boolean gdk_pixbuf_save_to_bufferv(long pixbuf, long [] buffer, long [] buffer_size, byte [] type, long [] option_keys, long [] option_values, long [] error) {
- lock.lock();
- try {
- return _gdk_pixbuf_save_to_bufferv(pixbuf, buffer, buffer_size, type, option_keys, option_values, error);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_pixbuf_save_to_bufferv(long pixbuf, long [] buffer, long [] buffer_size, byte [] type, long [] option_keys, long [] option_values, long [] error);
/**
* @param src cast=(const GdkPixbuf *)
* @param interp_type cast=(GdkInterpType)
*/
- public static final native long _gdk_pixbuf_scale_simple(long src, int dest_width, int dest_height, int interp_type);
- public static final long gdk_pixbuf_scale_simple(long src, int dest_width, int dest_height, int interp_type) {
- lock.lock();
- try {
- return _gdk_pixbuf_scale_simple(src, dest_width, dest_height, interp_type);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_pixbuf_scale_simple(long src, int dest_width, int dest_height, int interp_type);
+
+ /* GdkPixbuf Interaction [GTK3 only] */
/**
* @method flags=dynamic
- * @param device cast=(GdkDevice *)
* @param window cast=(GdkWindow *)
- * @param owner_events cast=(gboolean)
- * @param event_mask cast=(GdkEventMask)
- * @param cursor cast=(GdkCursor *)
- * @param time_ cast=(guint32)
- */
- public static final native int _gdk_device_grab(long device, long window, int grab_ownership, boolean owner_events, int event_mask, long cursor, int time_);
- /** [GTK3 only, if-def'd in os.h; 3.20 deprecated, replaced] */
- public static final int gdk_device_grab(long device, long window, int grab_ownership, boolean owner_events, int event_mask, long cursor, int time_) {
- lock.lock();
- try {
- return _gdk_device_grab(device, window, grab_ownership, owner_events, event_mask, cursor,time_);
- } finally {
- lock.unlock();
- }
- }
+ */
+ public static final native long gdk_pixbuf_get_from_window(long window, int x, int y, int width, int height);
+
+ /* GdkPixbuf Interaction [GTK4 only] */
/**
- * @method flags=dynamic
- * @param device cast=(GdkDevice *)
- * @param time_ cast=(guint32)
- */
- public static final native void _gdk_device_ungrab(long device, int time_);
- /** [GTK3; 3.20 deprecated] */
- public static final void gdk_device_ungrab(long device, int time_) {
- lock.lock();
- try {
- _gdk_device_ungrab(device, time_);
- } finally {
- lock.unlock();
- }
- }
+ * @method flags=dynamic
+ * @param texture cast=(GdkTexture *)
+ */
+ public static final native long gdk_pixbuf_get_from_texture(long texture);
+ /**
+ * @method flags=dynamic
+ * @param surface cast=(cairo_surface_t *)
+ */
+ public static final native long gdk_pixbuf_get_from_surface(long surface, int src_x, int src_y, int width, int height);
+
+
+ /* GdkDevice */
+ /**@param device cast=(GdkDevice *) */
+ public static final native long gdk_device_get_seat(long device);
+
+ /* GdkDevice [GTK3 only] */
/**
+ * @method flags=dynamic
* @param device cast=(GdkDevice *)
*/
- public static final native long _gdk_device_get_associated_device(long device);
- public static final long gdk_device_get_associated_device(long device) {
- lock.lock();
- try {
- return _gdk_device_get_associated_device(device);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_device_get_associated_device(long device);
/**
* @method flags=dynamic
* @param device cast=(GdkDevice *)
+ * @param screen cast=(GdkScreen *)
+ * @param x cast=(gint)
+ * @param y cast=(gint)
*/
- public static final native long _gdk_device_get_seat(long device);
- public static final long gdk_device_get_seat(long device) {
- lock.lock();
- try {
- return _gdk_device_get_seat(device);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_device_warp(long device, long screen, int x, int y);
+ /**
+ * @method flags=dynamic
+ * @param device cast=(GdkDevice *)
+ * @param win_x cast=(gint *)
+ * @param win_y cast=(gint *)
+ */
+ public static final native long gdk_device_get_window_at_position(long device, int[] win_x, int[] win_y);
+
+ /* GdkDevice [GTK4 only] */
+ /**
+ * @method flags=dynamic
+ * @param device cast=(GdkDevice *)
+ * @param win_x cast=(double *)
+ * @param win_y cast=(double *)
+ */
+ public static final native long gdk_device_get_surface_at_position(long device, double[] win_x, double[] win_y);
+
+
/**
* @param window cast=(GdkWindow *)
* @param property cast=(GdkAtom)
@@ -1846,520 +786,236 @@ public class GDK extends OS {
* @param actual_length cast=(gint *)
* @param data cast=(guchar **)
*/
- public static final native boolean _gdk_property_get(long window, long property, long type, long offset, long length, int pdelete, long [] actual_property_type, int[] actual_format, int[] actual_length, long [] data);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gdk_property_get(long window, long property, long type, long offset, long length, int pdelete, long [] actual_property_type, int[] actual_format, int[] actual_length, long [] data) {
- lock.lock();
- try {
- return _gdk_property_get(window, property, type, offset, length, pdelete, actual_property_type, actual_format, actual_length, data);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native boolean gdk_property_get(long window, long property, long type, long offset, long length, int pdelete, long [] actual_property_type, int[] actual_format, int[] actual_length, long [] data);
/**
* @param surface cast=(cairo_surface_t *)
*/
- public static final native long _gdk_cairo_region_create_from_surface(long surface);
- public static final long gdk_cairo_region_create_from_surface(long surface) {
- lock.lock();
- try {
- return _gdk_cairo_region_create_from_surface(surface);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param rgba cast=(GdkRGBA *)
- */
- public static final native long _gdk_rgba_to_string(GdkRGBA rgba);
- public static final long gdk_rgba_to_string(GdkRGBA rgba) {
- lock.lock();
- try {
- return _gdk_rgba_to_string(rgba);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_cairo_region_create_from_surface(long surface);
/**
* @param rgba cast=(GdkRGBA *)
*/
- public static final native void _gdk_rgba_free(long rgba);
- public static final void gdk_rgba_free(long rgba) {
- lock.lock();
- try {
- _gdk_rgba_free(rgba);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_rgba_to_string(GdkRGBA rgba);
/**
* @param rgba cast=(GdkRGBA *)
*/
- public static final native int _gdk_rgba_hash(GdkRGBA rgba);
- public static final int gdk_rgba_hash(GdkRGBA rgba) {
- lock.lock();
- try {
- return _gdk_rgba_hash(rgba);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_rgba_free(long rgba);
/**
* @param rgba cast=(GdkRGBA *)
* @param property cast=(const gchar *)
*/
- public static final native long _gdk_rgba_parse(GdkRGBA rgba, byte[] property);
- public static final long gdk_rgba_parse(GdkRGBA rgba, byte[] property) {
- lock.lock();
- try {
- return _gdk_rgba_parse(rgba, property);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gdk_screen_get_default();
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_screen_get_default() {
- lock.lock();
- try {
- return _gdk_screen_get_default();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param screen cast=(GdkScreen *)
- */
- public static final native double _gdk_screen_get_resolution(long screen);
- /** [GTK3 only, if-def'd in os.h] */
- public static final double gdk_screen_get_resolution(long screen) {
- lock.lock();
- try {
- return _gdk_screen_get_resolution(screen);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_rgba_parse(GdkRGBA rgba, byte[] property);
/**
* @param clipboard cast=(GdkClipboard *)
* @param provider cast=(GdkContentProvider *)
*/
- public static final native long _gdk_clipboard_set_content(long clipboard, long provider);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_clipboard_set_content(long clipboard, long provider) {
- lock.lock();
- try {
- return _gdk_clipboard_set_content(clipboard, provider);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_clipboard_set_content(long clipboard, long provider);
+
+
+ /* GdkDisplay */
+ /** @param display cast=(GdkDisplay *) */
+ public static final native void gdk_display_beep(long display);
+ /**
+ * @param display cast=(GdkDisplay *)
+ * @param event cast=(GdkEvent *)
+ */
+ public static final native void gdk_display_put_event(long display, long event);
+ public static final native long gdk_display_get_default();
+ /** @method flags=dynamic */
+ public static final native long gdk_display_get_default_seat(long display);
+
+ /* GdkDisplay [GTK3 only] */
/**
* @method flags=dynamic
- * @param screen cast=(GdkScreen *)
- * @param monitor_num cast=(gint)
+ * @param display cast=(GdkDisplay *)
*/
- public static final native int _gdk_screen_get_monitor_scale_factor(long screen, int monitor_num);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final int gdk_screen_get_monitor_scale_factor(long screen, int monitor_num) {
- lock.lock();
- try {
- return _gdk_screen_get_monitor_scale_factor(screen, monitor_num);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_display_get_n_monitors(long display);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
*/
- public static final native int _gdk_monitor_get_scale_factor(long window);
- public static final int gdk_monitor_get_scale_factor(long window) {
- lock.lock();
- try {
- return _gdk_monitor_get_scale_factor(window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_display_get_primary_monitor(long display);
/**
* @method flags=dynamic
- * @param screen cast=(GdkScreen *)
- * @param x cast=(gint)
- * @param y cast=(gint)
+ * @param display cast=(GdkDisplay *)
*/
- public static final native int _gdk_screen_get_monitor_at_point (long screen, int x, int y);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final int gdk_screen_get_monitor_at_point (long screen, int x, int y) {
- lock.lock();
- try {
- return _gdk_screen_get_monitor_at_point (screen, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_display_get_monitor_at_point(long display, int x, int y);
/**
* @method flags=dynamic
- * @param screen cast=(GdkScreen *)
- * @param window cast=(GdkWindow *)
+ * @param display cast=(GdkDisplay *)
*/
- public static final native int _gdk_screen_get_monitor_at_window(long screen, long window);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final int gdk_screen_get_monitor_at_window(long screen, long window) {
- lock.lock();
- try {
- return _gdk_screen_get_monitor_at_window(screen, window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_display_get_monitor(long display, int monitor_num);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
*/
- public static final native long _gdk_display_get_monitor(long display, int monitor_num);
- public static final long gdk_display_get_monitor(long display, int monitor_num) {
- lock.lock();
- try {
- return _gdk_display_get_monitor(display, monitor_num);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_display_supports_cursor_color(long display);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
*/
- public static final native long _gdk_display_get_monitor_at_point(long display, int x, int y);
- public static final long gdk_display_get_monitor_at_point(long display, int x, int y) {
- lock.lock();
- try {
- return _gdk_display_get_monitor_at_point(display, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_display_get_default_group(long display);
/**
* @method flags=dynamic
* @param display cast=(GdkDisplay *)
* @param window cast=(GdkWindow *)
*/
- public static final native long _gdk_display_get_monitor_at_window(long display, long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_display_get_monitor_at_window(long display, long window) {
- lock.lock();
- try {
- return _gdk_display_get_monitor_at_window(display, window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_display_get_monitor_at_window(long display, long window);
+
+ /* GdkDisplay [GTK4 only] */
/**
+ * @method flags=dynamic
* @param display cast=(GdkDisplay *)
- * @param surface cast=(GdkSurface *)
*/
- public static final native long _gdk_display_get_monitor_at_surface(long display, long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_display_get_monitor_at_surface(long display, long surface) {
- lock.lock();
- try {
- return _gdk_display_get_monitor_at_surface(display, surface);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_display_get_monitors(long display);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
+ * @param keyval cast=(guint)
+ * @param keys cast=(GdkKeymapKey**)
+ * @param n_keys cast=(gint*)
*/
- public static final native int _gdk_display_get_n_monitors(long display);
- public static final int gdk_display_get_n_monitors(long display) {
- lock.lock();
- try {
- return _gdk_display_get_n_monitors(display);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_display_map_keyval(long display, int keyval, long[] keys, int[] n_keys);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
*/
- public static final native int _gdk_monitor_get_width_mm(long monitor);
- public static final int gdk_monitor_get_width_mm(long monitor) {
- lock.lock();
- try {
- return _gdk_monitor_get_width_mm(monitor);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_display_is_composited(long display);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
*/
- public static final native long _gdk_display_get_primary_monitor(long display);
- public static final long gdk_display_get_primary_monitor(long display) {
- lock.lock();
- try {
- return _gdk_display_get_primary_monitor(display);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_display_get_clipboard(long display);
/**
+ * @method flags=dynamic
* @param display cast=(GdkDisplay *)
*/
- public static final native boolean _gdk_display_is_composited(long display);
- /** [GTK4 only, if-def'd in os.h] */
- public static final boolean gdk_display_is_composited(long display) {
- lock.lock();
- try {
- return _gdk_display_is_composited(display);
- } finally {
- lock.unlock();
- }
- }
- /** @param display cast=(GdkDisplay *) */
- public static final native long _gdk_display_peek_event(long display);
- public static final long gdk_display_peek_event(long display) {
- lock.lock();
- try {
- return _gdk_display_peek_event(display);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_display_get_primary_clipboard(long display);
/**
* @param display cast=(GdkDisplay *)
- * @param event cast=(const GdkEvent *)
+ * @param surface cast=(GdkSurface *)
*/
- public static final native void _gdk_display_put_event(long display, long event);
- public static final void gdk_display_put_event(long display, long event) {
- lock.lock();
- try {
- _gdk_display_put_event(display, event);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_display_get_monitor_at_surface(long display, long surface);
+
+
+ /* GdkMonitor */
+ /** @method flags=dynamic */
+ public static final native int gdk_monitor_get_scale_factor(long window);
/**
* @method flags=dynamic
- * @param screen cast=(GdkScreen *)
* @param dest flags=no_in
*/
- public static final native void _gdk_screen_get_monitor_geometry (long screen, int monitor_num, GdkRectangle dest);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final void gdk_screen_get_monitor_geometry (long screen, int monitor_num, GdkRectangle dest) {
- lock.lock();
- try {
- _gdk_screen_get_monitor_geometry(screen, monitor_num, dest);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_monitor_get_geometry(long monitor, GdkRectangle dest);
+
+ /* GdkMonitor [GTK3 only] */
/**
* @method flags=dynamic
* @param dest flags=no_in
*/
- public static final native void _gdk_monitor_get_geometry (long monitor, GdkRectangle dest);
- public static final void gdk_monitor_get_geometry (long monitor, GdkRectangle dest) {
- lock.lock();
- try {
- _gdk_monitor_get_geometry(monitor, dest);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_monitor_get_workarea(long monitor, GdkRectangle dest);
+
+
+ /* GdkScreen [GTK3 only] */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_screen_get_default();
+ /** @param screen cast=(GdkScreen *) */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native double gdk_screen_get_resolution(long screen);
+ /** @param screen cast=(GdkScreen *) */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native boolean gdk_screen_is_composited(long screen);
+ /** @param screen cast=(GdkScreen *) */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_screen_get_system_visual(long screen);
+
+ /* GdkScreen [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
/**
* @method flags=dynamic
+ * @param screen cast=(GdkScreen *)
* @param dest flags=no_in
*/
- public static final native void _gdk_monitor_get_workarea (long monitor, GdkRectangle dest);
- public static final void gdk_monitor_get_workarea (long monitor, GdkRectangle dest) {
- lock.lock();
- try {
- _gdk_monitor_get_workarea(monitor, dest);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_screen_get_monitor_geometry(long screen, int monitor_num, GdkRectangle dest);
/**
* @method flags=dynamic
* @param screen cast=(GdkScreen *)
* @param dest flags=no_in
*/
- public static final native void _gdk_screen_get_monitor_workarea (long screen, int monitor_num, GdkRectangle dest);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final void gdk_screen_get_monitor_workarea (long screen, int monitor_num, GdkRectangle dest) {
- lock.lock();
- try {
- _gdk_screen_get_monitor_workarea(screen, monitor_num, dest);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_screen_get_monitor_workarea(long screen, int monitor_num, GdkRectangle dest);
/**
* @method flags=dynamic
* @param screen cast=(GdkScreen *)
*/
- public static final native int _gdk_screen_get_n_monitors(long screen);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final int gdk_screen_get_n_monitors(long screen) {
- lock.lock();
- try {
- return _gdk_screen_get_n_monitors(screen);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_screen_get_n_monitors(long screen);
/**
* @method flags=dynamic
* @param screen cast=(GdkScreen *)
*/
- public static final native int _gdk_screen_get_primary_monitor(long screen);
- /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */
- public static final int gdk_screen_get_primary_monitor(long screen) {
- lock.lock();
- try {
- return _gdk_screen_get_primary_monitor(screen);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_screen_get_primary_monitor(long screen);
/**
+ * @method flags=dynamic
* @param screen cast=(GdkScreen *)
+ * @param monitor_num cast=(gint)
*/
- public static final native long _gdk_screen_get_system_visual(long screen);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_screen_get_system_visual(long screen) {
- lock.lock();
- try {
- return _gdk_screen_get_system_visual(screen);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_screen_get_monitor_scale_factor(long screen, int monitor_num);
/**
* @method flags=dynamic
+ * @param screen cast=(GdkScreen *)
+ * @param x cast=(gint)
+ * @param y cast=(gint)
*/
- public static final native int _gdk_screen_height();
- public static final int gdk_screen_height() {
- lock.lock();
- try {
- return _gdk_screen_height();
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_screen_get_monitor_at_point(long screen, int x, int y);
/**
+ * @method flags=dynamic
* @param screen cast=(GdkScreen *)
+ * @param window cast=(GdkWindow *)
*/
- public static final native boolean _gdk_screen_is_composited(long screen);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gdk_screen_is_composited(long screen) {
- lock.lock();
- try {
- return _gdk_screen_is_composited(screen);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_screen_get_monitor_at_window(long screen, long window);
+
+
/**
* @method flags=dynamic
*/
- public static final native int _gdk_screen_width();
- public static final int gdk_screen_width() {
- lock.lock();
- try {
- return _gdk_screen_width();
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_screen_height();
/**
* @method flags=dynamic
*/
- public static final native int _gdk_seat_grab(long seat, long window, int capabilities, boolean owner_events, long cursor, long event, long func, long func_data);
- public static final int gdk_seat_grab(long seat, long window, int capabilities, boolean owner_events, long cursor, long event, long func, long func_data) {
- lock.lock();
- try {
- return _gdk_seat_grab(seat, window, capabilities, owner_events, cursor, event, func, func_data);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_screen_width();
/**
* @method flags=dynamic
*/
- public static final native void _gdk_seat_ungrab(long seat);
- public static final void gdk_seat_ungrab(long seat) {
- lock.lock();
- try {
- _gdk_seat_ungrab(seat);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_seat_grab(long seat, long window, int capabilities, boolean owner_events, long cursor, long event, long func, long func_data);
/**
* @method flags=dynamic
*/
- public static final native long _gdk_seat_get_pointer(long seat);
- public static final long gdk_seat_get_pointer(long seat) {
- lock.lock();
- try {
- return _gdk_seat_get_pointer(seat);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gdk_seat_ungrab(long seat);
/**
* @method flags=dynamic
*/
- public static final native long _gdk_seat_get_keyboard(long seat);
- public static final long gdk_seat_get_keyboard(long seat) {
- lock.lock();
- try {
- return _gdk_seat_get_keyboard(seat);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_seat_get_pointer(long seat);
+ /**
+ * @method flags=dynamic
+ */
+ public static final native long gdk_seat_get_keyboard(long seat);
/**
* @method flags=dynamic
* @param program_class cast=(const char *)
*/
- public static final native void _gdk_set_program_class(byte[] program_class);
- /** [GTK3 only] */
- public static final void gdk_set_program_class(byte[] program_class) {
- lock.lock();
- try {
- _gdk_set_program_class(program_class);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only] */
+ public static final native void gdk_set_program_class(byte[] program_class);
/** @param atom cast=(GdkAtom) */
- public static final native void _gdk_selection_owner_get(long atom);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_selection_owner_get(long atom) {
- lock.lock();
- try {
- _gdk_selection_owner_get(atom);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_selection_owner_get(long atom);
/**
* @param owner cast=(GdkWindow *)
* @param atom cast=(GdkAtom)
* @param time cast=(guint32)
* @param send_event cast=(gboolean)
*/
- public static final native void _gdk_selection_owner_set(long owner, long atom, int time, boolean send_event);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_selection_owner_set(long owner, long atom, int time, boolean send_event) {
- lock.lock();
- try {
- _gdk_selection_owner_set(owner, atom, time, send_event);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_selection_owner_set(long owner, long atom, int time, boolean send_event);
/**
* @param display cast=(GdkDisplay *)
* @param str cast=(const gchar*)
@@ -2368,239 +1024,99 @@ public class GDK extends OS {
* @param ctext cast=(guchar **)
* @param length cast=(gint *)
*/
- public static final native boolean _gdk_x11_display_utf8_to_compound_text(long display, byte[] str, long [] encoding, int[] format, long [] ctext, int[] length);
- public static final boolean gdk_x11_display_utf8_to_compound_text(long display, byte[] str, long [] encoding, int[] format, long [] ctext, int[] length) {
- lock.lock();
- try {
- return _gdk_x11_display_utf8_to_compound_text(display, str, encoding, format, ctext, length);
- } finally {
- lock.unlock();
- }
- }
- /** @param str cast=(const gchar *) */
- public static final native long _gdk_utf8_to_string_target(byte[] str);
- public static final long gdk_utf8_to_string_target(byte[] str) {
- lock.lock();
- try {
- return _gdk_utf8_to_string_target(str);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gdk_x11_display_utf8_to_compound_text(long display, byte[] str, long [] encoding, int[] format, long [] ctext, int[] length);
+ /**
+ * @method flags=dynamic
+ * @param str cast=(const gchar *)
+ */
+ /* [GTK3 only] */
+ public static final native long gdk_utf8_to_string_target(byte[] str);
/**
* @param display cast=(GdkDisplay *)
* @param encoding cast=(GdkAtom)
* @param text cast=(guchar *)
* @param list cast=(gchar ***)
*/
- public static final native int _gdk_text_property_to_utf8_list_for_display (long display, long encoding, int format, long text, int length, long [] list);
- public static final int gdk_text_property_to_utf8_list_for_display (long display, long encoding, int format, long text, int length, long [] list) {
- lock.lock();
- try {
- return _gdk_text_property_to_utf8_list_for_display(display, encoding, format, text, length, list);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_text_property_to_utf8_list_for_display(long display, long encoding, int format, long text, int length, long [] list);
+
+
+ /* GdkTexture [GTK4 only] */
+ /** @param pixbuf cast=(GdkPixbuf *) */
+ public static final native long gdk_texture_new_for_pixbuf(long pixbuf);
/**
- * @param pixbuf cast=(GdkPixbuf *)
+ * @param file cast=(GFile *)
+ * @param error cast=(GError **)
*/
- public static final native long _gdk_texture_new_for_pixbuf (long pixbuf);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_texture_new_for_pixbuf (long pixbuf) {
- lock.lock();
- try {
- return _gdk_texture_new_for_pixbuf(pixbuf);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gdk_texture_new_from_file(long file, long error);
+ /**
+ * @method flags=ignore_deprecations
+ * @param function cast=(GSourceFunc)
+ * @param data cast=(gpointer)
+ */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_threads_add_idle(long function, long data);
+ /**
+ * @method flags=ignore_deprecations
+ * @param function cast=(GSourceFunc)
+ * @param data cast=(gpointer)
+ */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_threads_add_timeout (int interval, long function, long data);
+ /** @method flags=ignore_deprecations */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_threads_enter ();
+ /** @method flags=ignore_deprecations */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_threads_init ();
+ /** @method flags=ignore_deprecations */
+ /* [GTK3 only, if-def'd in os.h] */
public static final native void gdk_threads_leave ();
- public static final native int _gdk_unicode_to_keyval(int wc);
- public static final int gdk_unicode_to_keyval(int wc) {
- lock.lock();
- try {
- return _gdk_unicode_to_keyval(wc);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gdk_unicode_to_keyval(int wc);
/**
* @param visual cast=(GdkVisual *)
*/
- public static final native int _gdk_visual_get_depth(long visual);
- /** [GTK3 only, if-def'd in os.h] */
- public static final int gdk_visual_get_depth(long visual) {
- lock.lock();
- try {
- return _gdk_visual_get_depth(visual);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_visual_get_depth(long visual);
/**
* @param window cast=(GdkWindow *)
* @param content cast=(cairo_content_t)
*/
- public static final native long _gdk_window_create_similar_surface(long window, int content, int width, int height);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_window_create_similar_surface(long window, int content, int width, int height) {
- lock.lock();
- try {
- return _gdk_window_create_similar_surface(window, content, width, height);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_window_create_similar_surface(long window, int content, int width, int height);
/**
* @param window cast=(GdkSurface *)
* @param content cast=(cairo_content_t)
*/
- public static final native long _gdk_surface_create_similar_surface(long window, int content, int width, int height);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_surface_create_similar_surface(long window, int content, int width, int height) {
- lock.lock();
- try {
- return _gdk_surface_create_similar_surface(window, content, width, height);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_surface_create_similar_surface(long window, int content, int width, int height);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_destroy(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_destroy(long window) {
- lock.lock();
- try {
- _gdk_window_destroy(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_destroy(long window);
/** @param window cast=(GdkSurface *) */
- public static final native void _gdk_surface_destroy(long window);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_destroy(long window) {
- lock.lock();
- try {
- _gdk_surface_destroy(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native void gdk_surface_destroy(long window);
/** @param window cast=(GdkWindow *) */
- public static final native long _gdk_window_get_children(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_window_get_children(long window) {
- lock.lock();
- try {
- return _gdk_window_get_children(window);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native long _gdk_surface_get_children(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_surface_get_children(long surface) {
- lock.lock();
- try {
- return _gdk_surface_get_children(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_window_get_children(long window);
/** @param window cast=(GdkWindow *) */
- public static final native int _gdk_window_get_events(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final int gdk_window_get_events(long window) {
- lock.lock();
- try {
- return _gdk_window_get_events(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_window_get_events(long window);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_focus(long window, int timestamp);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_focus(long window, int timestamp) {
- lock.lock();
- try {
- _gdk_window_focus(window, timestamp);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_focus(long surface, int timestamp);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_focus(long surface, int timestamp) {
- lock.lock();
- try {
- _gdk_surface_focus(surface, timestamp);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_focus(long window, int timestamp);
/**
* @param window cast=(GdkWindow *)
* @param rect cast=(GdkRectangle *),flags=no_in
*/
- public static final native void _gdk_window_get_frame_extents(long window, GdkRectangle rect);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_get_frame_extents(long window, GdkRectangle rect) {
- lock.lock();
- try {
- _gdk_window_get_frame_extents(window, rect);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param rect cast=(GdkRectangle *),flags=no_in
- */
- public static final native void _gdk_surface_get_frame_extents(long surface, GdkRectangle rect);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_get_frame_extents(long surface, GdkRectangle rect) {
- lock.lock();
- try {
- _gdk_surface_get_frame_extents(surface, rect);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_get_frame_extents(long window, GdkRectangle rect);
/**
* @param window cast=(GdkWindow *)
* @param x cast=(gint *)
* @param y cast=(gint *)
*/
- public static final native int _gdk_window_get_origin(long window, int[] x, int[] y);
- /** [GTK3 only, if-def'd in os.h] */
- public static final int gdk_window_get_origin(long window, int[] x, int[] y) {
- lock.lock();
- try {
- return _gdk_window_get_origin(window, x, y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param x cast=(gint *)
- * @param y cast=(gint *)
- */
- public static final native int _gdk_surface_get_origin(long surface, int[] x, int[] y);
- /** [GTK4 only, if-def'd in os.h] */
- public static final int gdk_surface_get_origin(long surface, int[] x, int[] y) {
- lock.lock();
- try {
- return _gdk_surface_get_origin(surface, x, y);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native int gdk_window_get_origin(long window, int[] x, int[] y);
/**
* @param window cast=(GdkWindow *)
* @param device cast=(GdkDevice *)
@@ -2608,583 +1124,168 @@ public class GDK extends OS {
* @param y cast=(gint *)
* @param mask cast=(GdkModifierType *)
*/
- public static final native long _gdk_window_get_device_position(long window, long device, int[] x, int[] y, int[] mask);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_window_get_device_position(long window, long device, int[] x, int[] y, int[] mask) {
- lock.lock();
- try {
- return _gdk_window_get_device_position(window, device, x, y, mask);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_window_get_device_position(long window, long device, int[] x, int[] y, int[] mask);
/**
* @param surface cast=(GdkSurface *)
* @param device cast=(GdkDevice *)
- * @param x cast=(gint *)
- * @param y cast=(gint *)
+ * @param x cast=(double *)
+ * @param y cast=(double *)
* @param mask cast=(GdkModifierType *)
*/
- public static final native long _gdk_surface_get_device_position(long surface, long device, int[] x, int[] y, int[] mask);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_surface_get_device_position(long surface, long device, int[] x, int[] y, int[] mask) {
- lock.lock();
- try {
- return _gdk_surface_get_device_position(surface, device, x, y, mask);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native void gdk_surface_get_device_position(long surface, long device, double[] x, double[] y, int[] mask);
/** @param window cast=(GdkWindow *) */
- public static final native long _gdk_window_get_parent(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_window_get_parent(long window) {
- lock.lock();
- try {
- return _gdk_window_get_parent(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native long gdk_window_get_parent(long window);
/**
* @param window cast=(GdkWindow *)
* @param x cast=(gint *)
* @param y cast=(gint *)
*/
- public static final native void _gdk_window_get_root_origin(long window, int[] x, int[] y);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_get_root_origin(long window, int[] x, int[] y) {
- lock.lock();
- try {
- _gdk_window_get_root_origin(window, x, y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param x cast=(gint *)
- * @param y cast=(gint *)
- */
- public static final native void _gdk_surface_get_root_origin(long surface, int[] x, int[] y);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_get_root_origin(long surface, int[] x, int[] y) {
- lock.lock();
- try {
- _gdk_surface_get_root_origin(surface, x, y);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_get_root_origin(long window, int[] x, int[] y);
/**
* @param window cast=(GdkWindow *)
* @param data cast=(gpointer *)
*/
- public static final native void _gdk_window_get_user_data(long window, long [] data);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_get_user_data(long window, long [] data) {
- lock.lock();
- try {
- _gdk_window_get_user_data(window, data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param data cast=(gpointer *)
- */
- public static final native void _gdk_surface_get_user_data(long surface, long [] data);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_get_user_data(long surface, long [] data) {
- lock.lock();
- try {
- _gdk_surface_get_user_data(surface, data);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_get_user_data(long window, long [] data);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_hide(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_hide(long window) {
- lock.lock();
- try {
- _gdk_window_hide(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_hide(long window);
/** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_hide(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_hide(long surface) {
- lock.lock();
- try {
- _gdk_surface_hide(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native void gdk_surface_hide(long surface);
/**
* @param window cast=(GdkWindow *)
* @param rectangle cast=(GdkRectangle *),flags=no_out
* @param invalidate_children cast=(gboolean)
*/
- public static final native void _gdk_window_invalidate_rect(long window, GdkRectangle rectangle, boolean invalidate_children);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_invalidate_rect(long window, GdkRectangle rectangle, boolean invalidate_children) {
- lock.lock();
- try {
- _gdk_window_invalidate_rect(window, rectangle, invalidate_children);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param rectangle cast=(GdkRectangle *),flags=no_out
- */
- public static final native void _gdk_surface_invalidate_rect(long surface, GdkRectangle rectangle);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_invalidate_rect(long surface, GdkRectangle rectangle) {
- lock.lock();
- try {
- _gdk_surface_invalidate_rect(surface, rectangle);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_invalidate_rect(long window, GdkRectangle rectangle, boolean invalidate_children);
/**
* @param window cast=(GdkWindow *)
* @param region cast=(const cairo_region_t *)
* @param invalidate_children cast=(gboolean)
*/
- public static final native void _gdk_window_invalidate_region(long window, long region, boolean invalidate_children);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_invalidate_region(long window, long region, boolean invalidate_children) {
- lock.lock();
- try {
- _gdk_window_invalidate_region(window, region, invalidate_children);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param region cast=(const cairo_region_t *)
- */
- public static final native void _gdk_surface_invalidate_region(long surface, long region);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_invalidate_region(long surface, long region) {
- lock.lock();
- try {
- _gdk_surface_invalidate_region(surface, region);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_invalidate_region(long window, long region, boolean invalidate_children);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_move(long window, int x, int y);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_move(long window, int x, int y) {
- lock.lock();
- try {
- _gdk_window_move(window, x, y);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_move(long surface, int x, int y);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_move(long surface, int x, int y) {
- lock.lock();
- try {
- _gdk_surface_move(surface, x, y);
- } finally {
- lock.unlock();
- }
- }
- /** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_move_resize(long window, int x, int y, int width, int height);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_move_resize(long window, int x, int y, int width, int height) {
- lock.lock();
- try {
- _gdk_window_move_resize(window, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_move_resize(long surface, int x, int y, int width, int height);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_move_resize(long surface, int x, int y, int width, int height) {
- lock.lock();
- try {
- _gdk_surface_move_resize(surface, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param parent cast=(GdkWindow *)
- * @param attributes flags=no_out
- */
- public static final native long _gdk_window_new(long parent, GdkWindowAttr attributes, int attributes_mask);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gdk_window_new(long parent, GdkWindowAttr attributes, int attributes_mask) {
- lock.lock();
- try {
- return _gdk_window_new(parent, attributes, attributes_mask);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param rect flags=no_out
- */
- public static final native long _gdk_surface_new_child(long surface, GdkRectangle rect);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gdk_surface_new_child(long surface, GdkRectangle rect) {
- lock.lock();
- try {
- return _gdk_surface_new_child(surface, rect);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_move(long window, int x, int y);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_lower(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_lower(long window) {
- lock.lock();
- try {
- _gdk_window_lower(window);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_lower(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_lower(long surface) {
- lock.lock();
- try {
- _gdk_surface_lower(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_move_resize(long window, int x, int y, int width, int height);
/**
* @method flags=dynamic
+ * @param display cast=(GdkDisplay *)
*/
- public static final native void _gdk_window_process_all_updates();
- /** [GTK3 only; 3.16 deprecated, replaced] */
- public static final void gdk_window_process_all_updates() {
- lock.lock();
- try {
- _gdk_window_process_all_updates();
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_surface_new_toplevel(long display);
+ /** @param parent cast=(GdkSurface *) */
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long gdk_surface_new_popup(long parent, boolean autohide);
+ /** @param window cast=(GdkWindow *) */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_lower(long window);
+ /** @param window cast=(GdkWindow *) */
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_raise(long window);
/**
* @method flags=dynamic
- * @param window cast=(GdkWindow *)
- * @param update_children cast=(gboolean)
- */
- public static final native void _gdk_window_process_updates(long window, boolean update_children);
- /** [GTK3 only, if-def'd in os.h; 3.16 deprecated, replaced] */
- public static final void gdk_window_process_updates(long window, boolean update_children) {
- lock.lock();
- try {
- _gdk_window_process_updates(window, update_children);
- } finally {
- lock.unlock();
- }
- }
- /** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_raise(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_raise(long window) {
- lock.lock();
- try {
- _gdk_window_raise(window);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_raise(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_raise(long surface) {
- lock.lock();
- try {
- _gdk_surface_raise(surface);
- } finally {
- lock.unlock();
- }
- }
+ * @param toplevel cast=(GdkToplevel *)
+ * @param layout cast=(GdkToplevelLayout *)
+ * */
+ /* [GTK4 only] */
+ public static final native boolean gdk_toplevel_present(long toplevel, int width, int height, long layout);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_resize(long window, int width, int height);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_resize(long window, int width, int height) {
- lock.lock();
- try {
- _gdk_window_resize(window, width, height);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_resize(long surface, int width, int height);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_resize(long surface, int width, int height) {
- lock.lock();
- try {
- _gdk_surface_resize(surface, width, height);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_resize(long window, int width, int height);
/**
* @param window cast=(GdkWindow *)
* @param sibling cast=(GdkWindow *)
* @param above cast=(gboolean)
*/
- public static final native void _gdk_window_restack(long window, long sibling, boolean above);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_restack(long window, long sibling, boolean above) {
- lock.lock();
- try {
- _gdk_window_restack(window, sibling, above);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param sibling cast=(GdkSurface *)
- * @param above cast=(gboolean)
- */
- public static final native void _gdk_surface_restack(long surface, long sibling, boolean above);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_restack(long surface, long sibling, boolean above) {
- lock.lock();
- try {
- _gdk_surface_restack(surface, sibling, above);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_restack(long window, long sibling, boolean above);
/**
+ * @method flags=ignore_deprecations
* @param window cast=(GdkWindow *)
* @param pattern cast=(cairo_pattern_t *)
*/
- public static final native void _gdk_window_set_background_pattern(long window, long pattern);
- /** [GTK3 only; 3.22 deprecated] */
- public static final void gdk_window_set_background_pattern(long window, long pattern) {
- lock.lock();
- try {
- _gdk_window_set_background_pattern(window, pattern);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only; 3.22 deprecated] */
+ public static final native void gdk_window_set_background_pattern(long window, long pattern);
/**
* @param window cast=(GdkWindow *)
* @param cursor cast=(GdkCursor *)
*/
- public static final native void _gdk_window_set_cursor(long window, long cursor);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_set_cursor(long window, long cursor) {
- lock.lock();
- try {
- _gdk_window_set_cursor(window, cursor);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_set_cursor(long window, long cursor);
/**
* @param surface cast=(GdkSurface *)
* @param cursor cast=(GdkCursor *)
*/
- public static final native void _gdk_surface_set_cursor(long surface, long cursor);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_set_cursor(long surface, long cursor) {
- lock.lock();
- try {
- _gdk_surface_set_cursor(surface, cursor);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native void gdk_surface_set_cursor(long surface, long cursor);
/**
* @param window cast=(GdkWindow *)
* @param decorations cast=(GdkWMDecoration)
*/
- public static final native void _gdk_window_set_decorations(long window, int decorations);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_set_decorations(long window, int decorations) {
- lock.lock();
- try {
- _gdk_window_set_decorations(window, decorations);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param decorations cast=(GdkWMDecoration)
- */
- public static final native void _gdk_surface_set_decorations(long surface, int decorations);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_set_decorations(long surface, int decorations) {
- lock.lock();
- try {
- _gdk_surface_set_decorations(surface, decorations);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_set_decorations(long window, int decorations);
/**
* @param window cast=(GdkWindow *)
* @param functions cast=(GdkWMFunction)
*/
- public static final native void _gdk_window_set_functions(long window, int functions);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_set_functions(long window, int functions) {
- lock.lock();
- try {
- _gdk_window_set_functions(window, functions);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param functions cast=(GdkWMFunction)
- */
- public static final native void _gdk_surface_set_functions(long surface, int functions);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_set_functions(long surface, int functions) {
- lock.lock();
- try {
- _gdk_surface_set_functions(surface, functions);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_set_functions(long window, int functions);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_set_events(long window, int event_mask);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_set_events(long window, int event_mask) {
- lock.lock();
- try {
- _gdk_window_set_events(window, event_mask);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_set_events(long window, int event_mask);
/**
* @param window cast=(GdkWindow *)
* @param override_redirect cast=(gboolean)
*/
- public static final native void _gdk_window_set_override_redirect(long window, boolean override_redirect);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_set_override_redirect(long window, boolean override_redirect) {
- lock.lock();
- try {
- _gdk_window_set_override_redirect(window, override_redirect);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_set_override_redirect(long window, boolean override_redirect);
/**
* @param window cast=(GdkWindow *)
* @param user_data cast=(gpointer)
*/
- public static final native void _gdk_window_set_user_data(long window, long user_data);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_set_user_data(long window, long user_data) {
- lock.lock();
- try {
- _gdk_window_set_user_data(window, user_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param surface cast=(GdkSurface *)
- * @param user_data cast=(gpointer)
- */
- public static final native void _gdk_surface_set_user_data(long surface, long user_data);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_set_user_data(long surface, long user_data) {
- lock.lock();
- try {
- _gdk_surface_set_user_data(surface, user_data);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_set_user_data(long window, long user_data);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_show(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_show(long window) {
- lock.lock();
- try {
- _gdk_window_show(window);
- } finally {
- lock.unlock();
- }
- }
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_show(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_show(long surface) {
- lock.lock();
- try {
- _gdk_surface_show(surface);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_show(long window);
/** @param window cast=(GdkWindow *) */
- public static final native void _gdk_window_show_unraised(long window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gdk_window_show_unraised(long window) {
- lock.lock();
- try {
- _gdk_window_show_unraised(window);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3 only, if-def'd in os.h] */
+ public static final native void gdk_window_show_unraised(long window);
- /** @param surface cast=(GdkSurface *) */
- public static final native void _gdk_surface_show_unraised(long surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gdk_surface_show_unraised(long surface) {
- lock.lock();
- try {
- _gdk_surface_show_unraised(surface);
- } finally {
- lock.unlock();
- }
- }
+
+ /* GdkToplevelLayout [GTK4 only] */
+ /** @method flags=dynamic */
+ public static final native long gdk_toplevel_layout_new(int min_width, int min_height);
+
+ /* GdkPopup [GTK4 only] */
+ /** @param popup cast=(GdkPopup *) */
+ public static final native long gdk_popup_get_parent(long popup);
+ /**
+ * @param popup cast=(GdkPopup *)
+ * @param layout cast=(GdkPopupLayout *)
+ */
+ public static final native boolean gdk_popup_present(long popup, int width, int height, long layout);
+
+ /* GdkPopupLayout [GTK4 only] */
+ /**
+ * @param anchor_rect cast=(const GdkRectangle *)
+ * @param rect_anchor cast=(GdkGravity)
+ * @param surface_anchor cast=(GdkGravity)
+ */
+ public static final native long gdk_popup_layout_new(GdkRectangle anchor_rect, int rect_anchor, int surface_anchor);
public static long gdk_get_pointer (long display) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- long default_seat = GDK.gdk_display_get_default_seat(display);
- return GDK.gdk_seat_get_pointer(default_seat);
- } else {
- long device_manager = GDK.gdk_display_get_device_manager(display);
- return GDK.gdk_device_manager_get_client_pointer(device_manager);
- }
+ long default_seat = GDK.gdk_display_get_default_seat(display);
+ return GDK.gdk_seat_get_pointer(default_seat);
}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GInterfaceInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GInterfaceInfo.java
deleted file mode 100644
index da2aba88b7..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GInterfaceInfo.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
-
-public class GInterfaceInfo {
- /** @field cast=(GInterfaceInitFunc) */
- public long interface_init;
- /** @field cast=(GInterfaceFinalizeFunc) */
- public long interface_finalize;
- /** @field cast=(gpointer) */
- public long interface_data;
- public static final int sizeof = OS.GInterfaceInfo_sizeof();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index fa288104ba..dba5a85888 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -21,6 +21,9 @@ package org.eclipse.swt.internal.gtk;
*/
public class GTK extends OS {
+ public static final int GTK_VERSION = OS.VERSION(GTK.gtk_get_major_version(), GTK.gtk_get_minor_version(), GTK.gtk_get_micro_version());
+ public static final boolean GTK4 = GTK_VERSION >= OS.VERSION(4, 0, 0);
+
/** Constants */
public static final int GTK_ACCEL_VISIBLE = 0x1;
public static final int GTK_ALIGN_FILL = 0x0; //Gtk3 GtkAlign Enum
@@ -36,9 +39,6 @@ public class GTK extends OS {
public static final int GTK_CELL_RENDERER_MODE_ACTIVATABLE = 1;
public static final int GTK_CELL_RENDERER_SELECTED = 1 << 0;
public static final int GTK_CELL_RENDERER_FOCUSED = 1 << 4;
- public static final int GTK_CLIST_SHOW_TITLES = 0x4;
- public static final int GTK_CORNER_TOP_LEFT = 0x0;
- public static final int GTK_CORNER_TOP_RIGHT = 0x2;
public static final int GTK_DIALOG_DESTROY_WITH_PARENT = 1 << 1;
public static final int GTK_DIALOG_MODAL = 1 << 0;
public static final int GTK_DIR_TAB_FORWARD = 0;
@@ -48,22 +48,19 @@ public class GTK extends OS {
public static final int GTK_FILE_CHOOSER_ACTION_OPEN = 0;
public static final int GTK_FILE_CHOOSER_ACTION_SAVE = 1;
public static final int GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER = 2;
- public static final int GTK_FRAME_LABEL_PAD = 1;
- public static final int GTK_FRAME_LABEL_SIDE_PAD = 2;
public static final int GTK_ICON_SIZE_MENU = 1;
public static final int GTK_ICON_SIZE_SMALL_TOOLBAR = 2;
public static final int GTK_ICON_SIZE_DIALOG = 6;
public static final int GTK_ICON_LOOKUP_FORCE_SIZE = 4;
+ public static final int GTK_ICON_LOOKUP_FORCE_REGULAR = 0;
public static final int GTK_JUSTIFY_CENTER = 0x2;
public static final int GTK_JUSTIFY_LEFT = 0x0;
public static final int GTK_JUSTIFY_RIGHT = 0x1;
- public static final int GTK_MAPPED = 1 << 7;
public static final int GTK_MESSAGE_INFO = 0;
public static final int GTK_MESSAGE_WARNING = 1;
public static final int GTK_MESSAGE_QUESTION = 2;
public static final int GTK_MESSAGE_ERROR = 3;
public static final int GTK_MOVEMENT_VISUAL_POSITIONS = 1;
- public static final int GTK_NO_WINDOW = 1 << 5;
public static final int GTK_ORIENTATION_HORIZONTAL = 0x0;
public static final int GTK_ORIENTATION_VERTICAL = 0x1;
public static final int GTK_PACK_END = 1;
@@ -79,39 +76,22 @@ public class GTK extends OS {
public static final int GTK_PRINT_CAPABILITY_PAGE_SET = 1 << 0;
public static final int GTK_PRINT_CAPABILITY_COPIES = 1 << 1;
public static final int GTK_PRINT_CAPABILITY_COLLATE = 1 << 2;
- public static final int GTK_PRINT_CAPABILITY_REVERSE = 1 << 3;
- public static final int GTK_PRINT_CAPABILITY_SCALE = 1 << 4;
- public static final int GTK_PRINT_CAPABILITY_GENERATE_PDF = 1 << 5;
- public static final int GTK_PRINT_CAPABILITY_GENERATE_PS = 1 << 6;
- public static final int GTK_PRINT_CAPABILITY_PREVIEW = 1 << 7;
public static final int GTK_PRINT_PAGES_ALL = 0;
public static final int GTK_PRINT_PAGES_CURRENT = 1;
public static final int GTK_PRINT_PAGES_RANGES = 2;
+ public static final int GTK_PRINT_PAGES_SELECTION = 3;
public static final int GTK_PRINT_DUPLEX_SIMPLEX = 0;
public static final int GTK_PRINT_DUPLEX_HORIZONTAL = 1;
public static final int GTK_PRINT_DUPLEX_VERTICAL = 2;
- public static final int GTK_EVENT_CONTROLLER_SCROLL_NONE = 0;
- public static final int GTK_EVENT_CONTROLLER_SCROLL_VERTICAL = 1;
- public static final int GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL = 2;
- public static final int GTK_EVENT_CONTROLLER_SCROLL_DISCRETE = 3;
- public static final int GTK_EVENT_CONTROLLER_SCROLL_KINETIC = 4;
public static final int GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES = 5;
- public static final int GTK_PHASE_NONE = 0;
public static final int GTK_PHASE_CAPTURE = 1;
public static final int GTK_PHASE_BUBBLE = 2;
public static final int GTK_PHASE_TARGET = 3;
- public static final int GTK_PROGRESS_CONTINUOUS = 0x0;
- public static final int GTK_PROGRESS_DISCRETE = 0x1;
public static final int GTK_PROGRESS_LEFT_TO_RIGHT = 0x0;
public static final int GTK_PROGRESS_BOTTOM_TO_TOP = 0x2;
- public static final int GTK_RECEIVES_DEFAULT = 1 << 20;
- public static final int GTK_RELIEF_NONE = 0x2;
- public static final int GTK_RELIEF_NORMAL = 0;
- public static final int GTK_RESPONSE_APPLY = 0xfffffff6;
public static final int GTK_RESPONSE_CANCEL = 0xfffffffa;
public static final int GTK_RESPONSE_OK = 0xfffffffb;
public static final int GTK_RESPONSE_ACCEPT = -3;
- public static final int GTK_RESPONSE_DELETE_EVENT = -4;
public static final int GTK_SCROLL_NONE = 0;
public static final int GTK_SCROLL_JUMP = 1;
public static final int GTK_SCROLL_STEP_BACKWARD = 2;
@@ -130,17 +110,11 @@ public class GTK extends OS {
public static final int GTK_SCROLL_END = 15;
public static final int GTK_SELECTION_BROWSE = 0x2;
public static final int GTK_SELECTION_MULTIPLE = 0x3;
- public static final int GTK_SENSITIVE = 0x200;
public static final int GTK_SHADOW_ETCHED_IN = 0x3;
public static final int GTK_SHADOW_ETCHED_OUT = 0x4;
public static final int GTK_SHADOW_IN = 0x1;
public static final int GTK_SHADOW_NONE = 0x0;
public static final int GTK_SHADOW_OUT = 0x2;
- public static final int GTK_STATE_ACTIVE = 0x1;
- public static final int GTK_STATE_INSENSITIVE = 0x4;
- public static final int GTK_STATE_NORMAL = 0x0;
- public static final int GTK_STATE_PRELIGHT = 0x2;
- public static final int GTK_STATE_SELECTED = 0x3;
public static final int GTK_STATE_FLAG_NORMAL = 0;
public static final int GTK_STATE_FLAG_ACTIVE = 1 << 0;
public static final int GTK_STATE_FLAG_PRELIGHT = 1 << 1;
@@ -149,13 +123,11 @@ public class GTK extends OS {
public static final int GTK_STATE_FLAG_INCONSISTENT = 1 << 4;
public static final int GTK_STATE_FLAG_FOCUSED = 1 << 5;
public static final int GTK_STATE_FLAG_BACKDROP = 1 << 6;
+ public static final int GTK_STATE_FLAG_LINK = 1 << 9;
+ public static final int GTK_TEXT_DIR_NONE = 0;
public static final int GTK_TEXT_DIR_LTR = 1;
- public static final int GTK_TEXT_DIR_NONE = 0 ;
public static final int GTK_TEXT_DIR_RTL = 2;
public static final int GTK_TEXT_WINDOW_TEXT = 2;
- public static final int GTK_TOOLBAR_CHILD_BUTTON = 0x1;
- public static final int GTK_TOOLBAR_CHILD_RADIOBUTTON = 0x3;
- public static final int GTK_TOOLBAR_CHILD_TOGGLEBUTTON = 0x2;
public static final int GTK_TOOLBAR_ICONS = 0;
public static final int GTK_TOOLBAR_TEXT = 1;
public static final int GTK_TOOLBAR_BOTH = 2;
@@ -182,13 +154,10 @@ public class GTK extends OS {
public static final int GTK_WRAP_NONE = 0;
public static final int GTK_WRAP_WORD = 2;
public static final int GTK_WRAP_WORD_CHAR = 3;
- public static final int GTK_EXPANDER_COLAPSED = 0;
- public static final int GTK_EXPANDER_SEMI_COLLAPSED = 1;
- public static final int GTK_EXPANDER_SEMI_EXPANDED = 2;
- public static final int GTK_EXPANDER_EXPANDED = 3;
+ public static final int GTK_SHORTCUT_SCOPE_GLOBAL = 2;
+ public static final int GTK_INPUT_HINT_NO_EMOJI = 1024;
/** Classes */
- public static final byte[] GTK_STYLE_CLASS_TOOLTIP = OS.ascii("tooltip");
public static final byte[] GTK_STYLE_CLASS_VIEW = OS.ascii("view");
public static final byte[] GTK_STYLE_CLASS_CELL = OS.ascii("cell");
public static final byte[] GTK_STYLE_CLASS_PANE_SEPARATOR = OS.ascii("pane-separator");
@@ -201,11 +170,10 @@ public class GTK extends OS {
public static final byte[] gtk_cursor_blink_time = OS.ascii("gtk-cursor-blink-time");
public static final byte[] gtk_double_click_time = OS.ascii("gtk-double-click-time");
public static final byte[] gtk_entry_select_on_focus = OS.ascii("gtk-entry-select-on-focus");
- public static final byte[] gtk_style_property_font = OS.ascii("font");
+ public static final byte[] gtk_style_property_font = GTK.GTK4 ? OS.ascii("gtk-font-name") : OS.ascii("font");
public static final byte[] gtk_menu_bar_accel = OS.ascii("gtk-menu-bar-accel");
- public static final byte[] gtk_menu_images = OS.ascii("gtk-menu-images");
public static final byte[] gtk_theme_name = OS.ascii("gtk-theme-name");
-
+ public static final byte[] gtk_im_module = OS.ascii("gtk-im-module");
/** Misc **/
public static final byte[] GTK_PRINT_SETTINGS_OUTPUT_URI = OS.ascii("output-uri");
@@ -230,23 +198,20 @@ public class GTK extends OS {
public static final byte[] GTK_NAMED_LABEL_OK = OS.ascii("_OK");
public static final byte[] GTK_NAMED_LABEL_CANCEL = OS.ascii("_Cancel");
- public static final int GTK_VERSION = OS.VERSION(GTK.gtk_get_major_version(), GTK.gtk_get_minor_version(), GTK.gtk_get_micro_version());
- public static final boolean GTK4 = GTK_VERSION >= OS.VERSION(3, 94, 0);
-
/** SWT Tools translates TYPE_sizeof() into sizeof(TYPE) at native level. os.c will have a binding to functions auto-generated in os_structs.h */
public static final native int GtkAllocation_sizeof();
public static final native int GtkBorder_sizeof();
public static final native int GtkRequisition_sizeof();
- public static final native int GtkTargetEntry_sizeof();
public static final native int GtkTextIter_sizeof();
public static final native int GtkCellRendererText_sizeof();
public static final native int GtkCellRendererTextClass_sizeof();
+ public static final native int GtkTreeIter_sizeof();
+
+ /** GTK3 sizeof() [if-def'd in os.h] */
public static final native int GtkCellRendererPixbuf_sizeof();
public static final native int GtkCellRendererPixbufClass_sizeof();
public static final native int GtkCellRendererToggle_sizeof();
public static final native int GtkCellRendererToggleClass_sizeof();
- public static final native int GtkTreeIter_sizeof();
-
/**
@@ -254,784 +219,174 @@ public class GTK extends OS {
*
* Some of these are not found in dev documentation, only in the sources.
*/
-
/** @param widget cast=(GtkWidget *) */
public static final native long GTK_WIDGET_GET_CLASS(long widget);
/** @method flags=const */
public static final native long GTK_TYPE_TEXT_VIEW_ACCESSIBLE ();
- public static final native long _GTK_ACCESSIBLE (long handle);
- public static final native boolean _GTK_IS_ACCEL_LABEL(long obj);
- public static final boolean GTK_IS_ACCEL_LABEL(long obj) {
- lock.lock();
- try {
- return _GTK_IS_ACCEL_LABEL(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_BUTTON(long obj);
- public static final boolean GTK_IS_BUTTON(long obj) {
- lock.lock();
- try {
- return _GTK_IS_BUTTON(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_LABEL(long obj);
- public static final boolean GTK_IS_LABEL(long obj) {
- lock.lock();
- try {
- return _GTK_IS_LABEL(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_IM_CONTEXT(long obj);
- public static final boolean GTK_IS_IM_CONTEXT(long obj) {
- lock.lock();
- try {
- return _GTK_IS_IM_CONTEXT(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_SCROLLED_WINDOW(long obj);
- public static final boolean GTK_IS_SCROLLED_WINDOW(long obj) {
- lock.lock();
- try {
- return _GTK_IS_SCROLLED_WINDOW(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_WINDOW(long obj);
- public static final boolean GTK_IS_WINDOW(long obj) {
- lock.lock();
- try {
- return _GTK_IS_WINDOW(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_CELL_RENDERER_PIXBUF(long obj);
- public static final boolean GTK_IS_CELL_RENDERER_PIXBUF(long obj) {
- lock.lock();
- try {
- return _GTK_IS_CELL_RENDERER_PIXBUF(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_CELL_RENDERER_TEXT(long obj);
- public static final boolean GTK_IS_CELL_RENDERER_TEXT(long obj) {
- lock.lock();
- try {
- return _GTK_IS_CELL_RENDERER_TEXT(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_CELL_RENDERER_TOGGLE(long obj);
- public static final boolean GTK_IS_CELL_RENDERER_TOGGLE(long obj) {
- lock.lock();
- try {
- return _GTK_IS_CELL_RENDERER_TOGGLE(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_CONTAINER(long obj);
- public static final boolean GTK_IS_CONTAINER(long obj) {
- lock.lock();
- try {
- return _GTK_IS_CONTAINER(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_MENU_ITEM(long obj);
- public static final boolean GTK_IS_MENU_ITEM(long obj) {
- lock.lock();
- try {
- return _GTK_IS_MENU_ITEM(obj);
- } finally {
- lock.unlock();
- }
- }
- public static final native boolean _GTK_IS_PLUG(long obj);
- public static final boolean GTK_IS_PLUG(long obj) {
- lock.lock();
- try {
- return _GTK_IS_PLUG(obj);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean GTK_IS_BOX(long obj);
+ public static final native boolean GTK_IS_BUTTON(long obj);
+ public static final native boolean GTK_IS_LABEL(long obj);
+ public static final native boolean GTK_IS_IM_CONTEXT(long obj);
+ public static final native boolean GTK_IS_SCROLLED_WINDOW(long obj);
+ public static final native boolean GTK_IS_WINDOW(long obj);
+ public static final native boolean GTK_IS_CELL_RENDERER_PIXBUF(long obj);
+ public static final native boolean GTK_IS_CELL_RENDERER_TEXT(long obj);
+ public static final native boolean GTK_IS_CELL_RENDERER_TOGGLE(long obj);
+ public static final native boolean GTK_IS_PLUG(long obj);
/** @method flags=const */
- public static final native long _GTK_TYPE_CELL_RENDERER_TEXT();
- public static final long GTK_TYPE_CELL_RENDERER_TEXT() {
- lock.lock();
- try {
- return _GTK_TYPE_CELL_RENDERER_TEXT();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GTK_TYPE_CELL_RENDERER_TEXT();
/** @method flags=const */
- public static final native long _GTK_TYPE_CELL_RENDERER_PIXBUF();
- public static final long GTK_TYPE_CELL_RENDERER_PIXBUF() {
- lock.lock();
- try {
- return _GTK_TYPE_CELL_RENDERER_PIXBUF();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GTK_TYPE_CELL_RENDERER_PIXBUF();
/** @method flags=const */
- public static final native long _GTK_TYPE_CELL_RENDERER_TOGGLE();
- public static final long GTK_TYPE_CELL_RENDERER_TOGGLE() {
- lock.lock();
- try {
- return _GTK_TYPE_CELL_RENDERER_TOGGLE();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GTK_TYPE_CELL_RENDERER_TOGGLE();
/** @method flags=const */
- public static final native long _GTK_TYPE_IM_MULTICONTEXT();
- public static final long GTK_TYPE_IM_MULTICONTEXT() {
- lock.lock();
- try {
- return _GTK_TYPE_IM_MULTICONTEXT();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GTK_TYPE_IM_MULTICONTEXT();
/** @method flags=const */
- public static final native long _GTK_TYPE_MENU();
- public static final long GTK_TYPE_MENU() {
- lock.lock();
- try {
- return _GTK_TYPE_MENU();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GTK_TYPE_WIDGET();
/** @method flags=const */
- public static final native long _GTK_TYPE_WIDGET();
- public static final long GTK_TYPE_WIDGET() {
- lock.lock();
- try {
- return _GTK_TYPE_WIDGET();
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=const */
- public static final native long _GTK_TYPE_WINDOW();
- public static final long GTK_TYPE_WINDOW() {
- lock.lock();
- try {
- return _GTK_TYPE_WINDOW();
- } finally {
- lock.unlock();
- }
- }
-
- // See os_custom.h
- // Dynamically get's the function pointer to gtk_false(). Gtk2/Gtk3.
- public static final native long _GET_FUNCTION_POINTER_gtk_false();
- public static final long GET_FUNCTION_POINTER_gtk_false() {
- lock.lock();
- try {
- return _GET_FUNCTION_POINTER_gtk_false();
- } finally {
- lock.unlock();
- }
- }
-
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_has_default(long widget);
- public static final boolean gtk_widget_has_default(long widget) {
- lock.lock();
- try {
- return _gtk_widget_has_default(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long GTK_TYPE_WINDOW();
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_get_sensitive(long widget);
- public static final boolean gtk_widget_get_sensitive(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_sensitive(widget);
- } finally {
- lock.unlock();
- }
- }
+ /** GTK3 Macros [if-def'd in os.h] */
+ public static final native boolean GTK_IS_ACCEL_LABEL(long obj);
+ public static final native boolean GTK_IS_CONTAINER(long obj);
- /** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_first_child(long widget);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_widget_get_first_child(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_first_child(widget);
- } finally {
- lock.unlock();
- }
- }
-
- /** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_next_sibling(long widget);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_widget_get_next_sibling(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_next_sibling(widget);
- } finally {
- lock.unlock();
- }
- }
-
- /**
- * @param widget cast=(GtkWidget *)
- */
- public static final native long _gtk_widget_get_screen(long widget);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_widget_get_screen(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_screen(widget);
- } finally {
- lock.unlock();
- }
- }
-
- /** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_name(long widget);
- public static final long gtk_widget_get_name(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_name(widget);
- } finally {
- lock.unlock();
- }
- }
-
- /** @method flags=dynamic
- * @param widget_class cast=(GtkWidgetClass *)
- */
- public static final native long _gtk_widget_class_get_css_name(long widget_class);
- public static final long gtk_widget_class_get_css_name(long widget_class) {
- lock.lock();
- try {
- return _gtk_widget_class_get_css_name(widget_class);
- } finally {
- lock.unlock();
- }
- }
-
- /** @param button cast=(GtkButton *) */
- public static final native void _gtk_button_clicked(long button);
- public static final void gtk_button_clicked(long button) {
- lock.lock();
- try {
- _gtk_button_clicked(button);
- } finally {
- lock.unlock();
- }
- }
+ // See os_custom.h
+ // Dynamically get's the function pointer to gtk_false(). Gtk3.
+ public static final native long GET_FUNCTION_POINTER_gtk_false();
- public static final native long _gtk_button_new();
- public static final long gtk_button_new() {
- lock.lock();
- try {
- return _gtk_button_new();
- } finally {
- lock.unlock();
- }
- }
+ /* GtkButton */
+ public static final native long gtk_button_new();
/**
* @method flags=dynamic
* @param button cast=(GtkButton *)
- * @param image cast=(GtkWidget *)
- */
- public static final native void _gtk_button_set_image(long button, long image);
- /** [GTK3 only] */
- public static final void gtk_button_set_image(long button, long image) {
- lock.lock();
- try {
- _gtk_button_set_image(button, image);
- } finally {
- lock.unlock();
- }
- }
+ * @param label cast=(const char *)
+ */
+ public static final native void gtk_button_set_label(long button, byte[] label);
+ /** @param button cast=(GtkButton *) */
+ public static final native void gtk_button_set_use_underline(long button, boolean use_underline);
- /**
- * @method flags=dynamic
- * @param accel_label cast=(GtkAccelLabel *)
- * @param accel_key cast=(guint)
- * @param accel_mods cast=(GdkModifierType)
- */
- public static final native void _gtk_accel_label_set_accel(long accel_label, int accel_key, int accel_mods);
- public static final void gtk_accel_label_set_accel(long accel_label, int accel_key, int accel_mods) {
- lock.lock();
- try {
- _gtk_accel_label_set_accel(accel_label, accel_key, accel_mods);
- } finally {
- lock.unlock();
- }
- }
- public static final native int _gtk_accelerator_get_default_mod_mask();
- public static final int gtk_accelerator_get_default_mod_mask() {
- lock.lock();
- try {
- return _gtk_accelerator_get_default_mod_mask();
- } finally {
- lock.unlock();
- }
- }
+ /* Keyboard Accelerators */
+ public static final native int gtk_accelerator_get_default_mod_mask();
/**
* @param accelerator cast=(const gchar *)
* @param accelerator_key cast=(guint *)
* @param accelerator_mods cast=(GdkModifierType *)
*/
- public static final native void _gtk_accelerator_parse(long accelerator, int [] accelerator_key, int [] accelerator_mods);
- public static final void gtk_accelerator_parse(long accelerator, int [] accelerator_key, int [] accelerator_mods) {
- lock.lock();
- try {
- _gtk_accelerator_parse(accelerator, accelerator_key, accelerator_mods);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_accel_group_new();
- public static final long gtk_accel_group_new() {
- lock.lock();
- try {
- return _gtk_accel_group_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param accel_label cast=(GtkAccelLabel *)
- * @param accel_widget cast=(GtkWidget *)
- */
- public static final native void _gtk_accel_label_set_accel_widget(long accel_label, long accel_widget);
- public static final void gtk_accel_label_set_accel_widget(long accel_label, long accel_widget) {
- lock.lock();
- try {
- _gtk_accel_label_set_accel_widget(accel_label, accel_widget);
- } finally {
- lock.unlock();
- }
- }
- /** @param label cast=(const gchar *) */
- public static final native long _gtk_accel_label_new(byte[] label);
- public static final long gtk_accel_label_new(byte[] label) {
- lock.lock();
- try {
- return _gtk_accel_label_new(label);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param accessible cast=(GtkAccessible *)
- */
- public static final native long _gtk_accessible_get_widget(long accessible);
- public static final long gtk_accessible_get_widget(long accessible) {
- lock.lock();
- try {
- return _gtk_accessible_get_widget(accessible);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_accelerator_parse(long accelerator, int [] accelerator_key, int [] accelerator_mods);
/**
- * @param adjustment cast=(GtkAdjustment *)
+ * @param accelerator_key cast=(guint)
+ * @param accelerator_mods cast=(GdkModifierType)
+ */
+ public static final native long gtk_accelerator_name(int accelerator_key, int accelerator_mods);
+ /**
+ * @param accelerator cast=(const gchar *)
+ * @param accelerator_key cast=(guint *)
+ * @param accelerator_mods cast=(GdkModifierType *)
*/
- public static final native void _gtk_adjustment_configure(long adjustment, double value, double lower, double upper, double step_increment, double page_increment, double page_size);
- public static final void gtk_adjustment_configure(long adjustment, double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
- lock.lock();
- try {
- _gtk_adjustment_configure(adjustment, value, lower, upper, step_increment, page_increment, page_size);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_accelerator_parse(byte[] accelerator, int[] accelerator_key, int[] accelerator_mods);
+ /** @method flags=dynamic */
+ public static final native long gtk_accel_group_new();
+
+ /* GtkAdjustment */
+ /** @param adjustment cast=(GtkAdjustment *) */
+ public static final native void gtk_adjustment_configure(long adjustment, double value, double lower, double upper, double step_increment, double page_increment, double page_size);
/**
* @param value cast=(gdouble)
* @param lower cast=(gdouble)
* @param upper cast=(gdouble)
* @param step_increment cast=(gdouble)
* @param page_increment cast=(gdouble)
+ * @param page_size cast=(gdouble)
*/
- public static final native long _gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size);
- public static final long gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
- lock.lock();
- try {
- return _gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param adjustment cast=(GtkAdjustment *)
- */
- public static final native double _gtk_adjustment_get_lower(long adjustment);
- public static final double gtk_adjustment_get_lower(long adjustment) {
- lock.lock();
- try {
- return _gtk_adjustment_get_lower(adjustment);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param adjustment cast=(GtkAdjustment *)
- */
- public static final native double _gtk_adjustment_get_page_increment(long adjustment);
- public static final double gtk_adjustment_get_page_increment(long adjustment) {
- lock.lock();
- try {
- return _gtk_adjustment_get_page_increment(adjustment);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param adjustment cast=(GtkAdjustment *)
- */
- public static final native double _gtk_adjustment_get_page_size(long adjustment);
- public static final double gtk_adjustment_get_page_size(long adjustment) {
- lock.lock();
- try {
- return _gtk_adjustment_get_page_size(adjustment);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param adjustment cast=(GtkAdjustment *)
- */
- public static final native double _gtk_adjustment_get_step_increment(long adjustment);
- public static final double gtk_adjustment_get_step_increment(long adjustment) {
- lock.lock();
- try {
- return _gtk_adjustment_get_step_increment(adjustment);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param adjustment cast=(GtkAdjustment *)
- */
- public static final native double _gtk_adjustment_get_upper(long adjustment);
- public static final double gtk_adjustment_get_upper(long adjustment) {
- lock.lock();
- try {
- return _gtk_adjustment_get_upper(adjustment);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param adjustment cast=(GtkAdjustment *)
- */
- public static final native double _gtk_adjustment_get_value(long adjustment);
- public static final double gtk_adjustment_get_value(long adjustment) {
- lock.lock();
- try {
- return _gtk_adjustment_get_value(adjustment);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size);
+ /** @param adjustment cast=(GtkAdjustment *) */
+ public static final native double gtk_adjustment_get_lower(long adjustment);
+ /** @param adjustment cast=(GtkAdjustment *) */
+ public static final native double gtk_adjustment_get_page_increment(long adjustment);
+ /** @param adjustment cast=(GtkAdjustment *) */
+ public static final native double gtk_adjustment_get_page_size(long adjustment);
+ /** @param adjustment cast=(GtkAdjustment *) */
+ public static final native double gtk_adjustment_get_step_increment(long adjustment);
+ /** @param adjustment cast=(GtkAdjustment *) */
+ public static final native double gtk_adjustment_get_upper(long adjustment);
+ /** @param adjustment cast=(GtkAdjustment *) */
+ public static final native double gtk_adjustment_get_value(long adjustment);
/**
* @param adjustment cast=(GtkAdjustment *)
* @param value cast=(gdouble)
*/
- public static final native void _gtk_adjustment_set_value(long adjustment, double value);
- public static final void gtk_adjustment_set_value(long adjustment, double value) {
- lock.lock();
- try {
- _gtk_adjustment_set_value(adjustment, value);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_adjustment_set_value(long adjustment, double value);
/**
* @param adjustment cast=(GtkAdjustment *)
* @param value cast=(gdouble)
*/
- public static final native void _gtk_adjustment_set_step_increment(long adjustment, double value);
- public static final void gtk_adjustment_set_step_increment(long adjustment, double value) {
- lock.lock();
- try {
- _gtk_adjustment_set_step_increment(adjustment, value);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_adjustment_set_step_increment(long adjustment, double value);
/**
* @param adjustment cast=(GtkAdjustment *)
* @param value cast=(gdouble)
*/
- public static final native void _gtk_adjustment_set_page_increment(long adjustment, double value);
- public static final void gtk_adjustment_set_page_increment(long adjustment, double value) {
- lock.lock();
- try {
- _gtk_adjustment_set_page_increment(adjustment, value);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param adjustment cast=(GtkAdjustment *)
- * */
- public static final native void _gtk_adjustment_value_changed(long adjustment);
- /** [GTK2/GTK3; 3.18 deprecated, replaced] */
- public static final void gtk_adjustment_value_changed(long adjustment) {
- lock.lock();
- try {
- _gtk_adjustment_value_changed(adjustment);
- } finally {
- lock.unlock();
- }
- }
- /** @param bin cast=(GtkBin *) */
- public static final native long _gtk_bin_get_child(long bin);
- public static final long gtk_bin_get_child(long bin) {
- lock.lock();
- try {
- return _gtk_bin_get_child(bin);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_adjustment_set_page_increment(long adjustment, double value);
+
+ /* GtkBorder */
/** @param border cast=(GtkBorder *) */
- public static final native void _gtk_border_free(long border);
- public static final void gtk_border_free(long border) {
- lock.lock();
- try {
- _gtk_border_free(border);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_border_free(long border);
+
+ /* GtkBox */
/** @param box cast=(GtkBox *) */
- public static final native void _gtk_box_set_spacing(long box, int spacing);
- public static final void gtk_box_set_spacing(long box, int spacing) {
- lock.lock();
- try {
- _gtk_box_set_spacing(box, spacing);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_box_set_spacing(long box, int spacing);
/**
- * @method flags=dynamic
- * @param box cast=(GtkBox *)
- * @param child cast=(GtkWidget *)
+ * @param orientation cast=(GtkOrientation)
+ * @param spacing cast=(gint)
*/
- public static final native void _gtk_box_set_child_packing(long box, long child, boolean expand, boolean fill, int padding, int pack_type);
- /** [GTK3 only] */
- public static final void gtk_box_set_child_packing(long box, long child, boolean expand, boolean fill, int padding, int pack_type) {
- lock.lock();
- try {
- _gtk_box_set_child_packing(box, child, expand, fill, padding, pack_type);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_box_new(int orientation, int spacing);
/**
- * @method flags=dynamic
* @param box cast=(GtkBox *)
- * @param child cast=(GtkWidget *)
- */
- public static final native void _gtk_box_set_child_packing(long box, long child, int pack_type);
- /** [GTK4 only] */
- public static final void gtk_box_set_child_packing(long box, long child, int pack_type) {
- lock.lock();
- try {
- _gtk_box_set_child_packing(box, child, pack_type);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_calendar_new();
- public static final long gtk_calendar_new() {
- lock.lock();
- try {
- return _gtk_calendar_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param calendar cast=(GtkCalendar *)
- * @param month cast=(guint)
- * @param year cast=(guint)
- */
- public static final native void /*long*/ _gtk_calendar_select_month(long calendar, int month, int year);
- public static final void /*long*/ gtk_calendar_select_month(long calendar, int month, int year) {
- lock.lock();
- try {
- _gtk_calendar_select_month(calendar, month, year);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param calendar cast=(GtkCalendar *)
- * @param day cast=(guint)
+ * @param homogeneous cast=(gboolean)
*/
- public static final native void _gtk_calendar_select_day(long calendar, int day);
- public static final void gtk_calendar_select_day(long calendar, int day) {
- lock.lock();
- try {
- _gtk_calendar_select_day(calendar, day);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_box_set_homogeneous(long box, boolean homogeneous);
+
+ /* GtkCalendar */
+ public static final native long gtk_calendar_new();
/**
* @param calendar cast=(GtkCalendar *)
* @param day cast=(guint)
*/
- public static final native void _gtk_calendar_mark_day(long calendar, int day);
- public static final void gtk_calendar_mark_day(long calendar, int day) {
- lock.lock();
- try {
- _gtk_calendar_mark_day(calendar, day);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_calendar_mark_day(long calendar, int day);
/**
* @param calendar cast=(GtkCalendar *)
*/
- public static final native void _gtk_calendar_clear_marks(long calendar);
- public static final void gtk_calendar_clear_marks(long calendar) {
- lock.lock();
- try {
- _gtk_calendar_clear_marks(calendar);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param calendar cast=(GtkCalendar *)
- * @param flags cast=(GtkCalendarDisplayOptions)
- */
- public static final native void _gtk_calendar_set_display_options(long calendar, int flags);
- public static final void gtk_calendar_set_display_options(long calendar, int flags) {
- lock.lock();
- try {
- _gtk_calendar_set_display_options(calendar, flags);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param calendar cast=(GtkCalendar *)
- * @param year cast=(guint *)
- * @param month cast=(guint *)
- * @param day cast=(guint *)
- */
- public static final native void _gtk_calendar_get_date(long calendar, int[] year, int[] month, int[] day);
- public static final void gtk_calendar_get_date(long calendar, int[] year, int[] month, int[] day) {
- lock.lock();
- try {
- _gtk_calendar_get_date(calendar, year, month, day);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_calendar_clear_marks(long calendar);
+
+
/** @param cell_layout cast=(GtkCellLayout *) */
- public static final native void _gtk_cell_layout_clear(long cell_layout);
- public static final void gtk_cell_layout_clear(long cell_layout) {
- lock.lock();
- try {
- _gtk_cell_layout_clear(cell_layout);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_layout_clear(long cell_layout);
/** @param cell_layout cast=(GtkCellLayout *) */
- public static final native long _gtk_cell_layout_get_cells(long cell_layout);
- public static final long gtk_cell_layout_get_cells(long cell_layout) {
- lock.lock();
- try {
- return _gtk_cell_layout_get_cells(cell_layout);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_cell_layout_get_cells(long cell_layout);
/**
* @param cell_layout cast=(GtkCellLayout *)
* @param cell cast=(GtkCellRenderer *)
* @param sentinel cast=(const gchar *),flags=sentinel
*/
- public static final native void _gtk_cell_layout_set_attributes(long cell_layout, long cell, byte[] attribute, int column, long sentinel);
- public static final void gtk_cell_layout_set_attributes(long cell_layout, long cell, byte[] attribute, int column, long sentinel) {
- lock.lock();
- try {
- _gtk_cell_layout_set_attributes(cell_layout, cell, attribute, column, sentinel);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_layout_set_attributes(long cell_layout, long cell, byte[] attribute, int column, long sentinel);
/**
* @param cell_layout cast=(GtkCellLayout *)
* @param cell cast=(GtkCellRenderer *)
*/
- public static final native void _gtk_cell_layout_pack_start(long cell_layout, long cell, boolean expand);
- public static final void gtk_cell_layout_pack_start(long cell_layout, long cell, boolean expand) {
- lock.lock();
- try {
- _gtk_cell_layout_pack_start(cell_layout, cell, expand);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_layout_pack_start(long cell_layout, long cell, boolean expand);
/**
* @param cell cast=(GtkCellRenderer *)
* @param widget cast=(GtkWidget *)
* @param minimum_size cast=(GtkRequisition *)
* @param natural_size cast=(GtkRequisition *)
*/
- public static final native void _gtk_cell_renderer_get_preferred_size(long cell, long widget, GtkRequisition minimum_size, GtkRequisition natural_size);
- public static final void gtk_cell_renderer_get_preferred_size(long cell, long widget, GtkRequisition minimum_size, GtkRequisition natural_size) {
- lock.lock();
- try {
- _gtk_cell_renderer_get_preferred_size(cell, widget, minimum_size, natural_size);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_renderer_get_preferred_size(long cell, long widget, GtkRequisition minimum_size, GtkRequisition natural_size);
/**
* @param cell cast=(GtkCellRenderer *)
* @param xpad cast=(gint *)
* @param ypad cast=(gint *)
*/
- public static final native void _gtk_cell_renderer_get_padding(long cell, int [] xpad, int [] ypad);
- public static final void gtk_cell_renderer_get_padding(long cell, int [] xpad, int [] ypad) {
- lock.lock();
- try {
- _gtk_cell_renderer_get_padding(cell, xpad, ypad);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_renderer_get_padding(long cell, int [] xpad, int [] ypad);
/**
* @param cell cast=(GtkCellRenderer *)
* @param widget cast=(GtkWidget *)
@@ -1039,279 +394,83 @@ public class GTK extends OS {
* @param minimum_height cast=(gint *)
* @param natural_height cast=(gint *)
*/
- public static final native void _gtk_cell_renderer_get_preferred_height_for_width(long cell, long widget, int width, int[] minimum_height, int[] natural_height);
- public static final void gtk_cell_renderer_get_preferred_height_for_width(long cell, long widget, int width, int[] minimum_height, int[] natural_height) {
- lock.lock();
- try {
- _gtk_cell_renderer_get_preferred_height_for_width(cell, widget, width, minimum_height, natural_height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_renderer_get_preferred_height_for_width(long cell, long widget, int width, int[] minimum_height, int[] natural_height);
/**
* @param cell cast=(GtkCellRenderer *)
* @param width cast=(gint)
* @param height cast=(gint)
*/
- public static final native void _gtk_cell_renderer_set_fixed_size(long cell, int width, int height);
- public static final void gtk_cell_renderer_set_fixed_size (long cell, int width, int height) {
- lock.lock();
- try {
- _gtk_cell_renderer_set_fixed_size(cell, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_renderer_set_fixed_size(long cell, int width, int height);
/**
* @param cell cast=(GtkCellRenderer *)
* @param width cast=(gint *)
* @param height cast=(gint *)
*/
- public static final native void _gtk_cell_renderer_get_fixed_size(long cell, int[] width, int[] height);
- public static final void gtk_cell_renderer_get_fixed_size (long cell, int[] width, int[] height) {
- lock.lock();
- try {
- _gtk_cell_renderer_get_fixed_size(cell, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_renderer_get_fixed_size(long cell, int[] width, int[] height);
+ public static final native long gtk_cell_renderer_pixbuf_new();
+ public static final native long gtk_cell_renderer_text_new();
+ public static final native long gtk_cell_renderer_toggle_new();
/**
- * @param widget cast=(GtkWidget *)
- * @param minimum_size cast=(GtkRequisition *)
- * @param natural_size cast=(GtkRequisition *)
+ * @param cell_view cast=(GtkCellView *)
+ * @param fit_model cast=(gboolean)
*/
- public static final native void _gtk_widget_get_preferred_size(long widget, GtkRequisition minimum_size, GtkRequisition natural_size);
- public static final void gtk_widget_get_preferred_size(long widget, GtkRequisition minimum_size, GtkRequisition natural_size) {
- lock.lock();
- try {
- _gtk_widget_get_preferred_size(widget, minimum_size, natural_size);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_cell_view_set_fit_model(long cell_view, boolean fit_model);
+
+
+ /* GtkCheckButton */
+ public static final native long gtk_check_button_new();
+
+ /* General Gtk Functions */
+ public static final native long gtk_check_version(int required_major, int required_minor, int required_micro);
+ public static final native long gtk_get_default_language();
+ public static final native int gtk_get_major_version();
+ public static final native int gtk_get_minor_version();
+ public static final native int gtk_get_micro_version();
/**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param width cast=(gint)
- * @param minimum_size cast=(gint *)
- * @param natural_size cast=(gint *)
- */
- public static final native void _gtk_widget_get_preferred_height_for_width(long widget, int width, int[] minimum_size, int[] natural_size);
- /** [GTK3 only] */
- public static final void gtk_widget_get_preferred_height_for_width(long widget, int width, int[] minimum_size, int[] natural_size) {
- lock.lock();
- try {
- _gtk_widget_get_preferred_height_for_width(widget, width, minimum_size, natural_size);
- } finally {
- lock.unlock();
- }
- }
+ * @param context cast=(GtkStyleContext *)
+ * @param cr cast=(cairo_t *)
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+ public static final native void gtk_render_frame(long context, long cr, double x , double y, double width, double height);
/**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param minimum_size cast=(gint *)
- * @param natural_size cast=(gint *)
- */
- public static final native void _gtk_widget_get_preferred_height(long widget, int[] minimum_size, int[] natural_size);
- /** [GTK3 only] */
- public static final void gtk_widget_get_preferred_height(long widget, int[] minimum_size, int[] natural_size) {
- lock.lock();
- try {
- _gtk_widget_get_preferred_height(widget, minimum_size, natural_size);
- } finally {
- lock.unlock();
- }
- }
+ * @param context cast=(GtkStyleContext *)
+ * @param cr cast=(cairo_t *)
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+ public static final native void gtk_render_background(long context, long cr, double x , double y, double width, double height);
/**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param height cast=(gint)
- * @param minimum_size cast=(gint *)
- * @param natural_size cast=(gint *)
- */
- public static final native void _gtk_widget_get_preferred_width_for_height(long widget, int height, int[] minimum_size, int[] natural_size);
- /** [GTK3 only] */
- public static final void gtk_widget_get_preferred_width_for_height(long widget, int height, int[] minimum_size, int[] natural_size) {
- lock.lock();
- try {
- _gtk_widget_get_preferred_width_for_height(widget, height, minimum_size, natural_size);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_cell_renderer_pixbuf_new();
- public static final long gtk_cell_renderer_pixbuf_new() {
- lock.lock();
- try {
- return _gtk_cell_renderer_pixbuf_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_cell_renderer_text_new();
- public static final long gtk_cell_renderer_text_new() {
- lock.lock();
- try {
- return _gtk_cell_renderer_text_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_cell_renderer_toggle_new();
- public static final long gtk_cell_renderer_toggle_new() {
- lock.lock();
- try {
- return _gtk_cell_renderer_toggle_new();
- } finally {
- lock.unlock();
- }
- }
+ * @param context cast=(GtkStyleContext *)
+ * @param cr cast=(cairo_t *)
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+ public static final native void gtk_render_focus(long context, long cr, double x , double y, double width, double height);
/**
- * @param cell_view cast=(GtkCellView *)
- * @param fit_model cast=(gboolean)
+ * @param context cast=(GtkStyleContext *)
+ * @param cr cast=(cairo_t *)
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
*/
- public static final native void _gtk_cell_view_set_fit_model(long cell_view, boolean fit_model);
- public static final void gtk_cell_view_set_fit_model(long cell_view, boolean fit_model) {
- lock.lock();
- try {
- _gtk_cell_view_set_fit_model(cell_view, fit_model);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_check_button_new();
- public static final long gtk_check_button_new() {
- lock.lock();
- try {
- return _gtk_check_button_new();
- } finally {
- lock.unlock();
- }
- }
- /** @param check_menu_item cast=(GtkCheckMenuItem *) */
- public static final native boolean _gtk_check_menu_item_get_active(long check_menu_item);
- public static final boolean gtk_check_menu_item_get_active(long check_menu_item) {
- lock.lock();
- try {
- return _gtk_check_menu_item_get_active(check_menu_item);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_check_menu_item_new();
- public static final long gtk_check_menu_item_new() {
- lock.lock();
- try {
- return _gtk_check_menu_item_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param wid cast=(GtkCheckMenuItem *)
- * @param active cast=(gboolean)
- */
- public static final native void _gtk_check_menu_item_set_active(long wid, boolean active);
- public static final void gtk_check_menu_item_set_active(long wid, boolean active) {
- lock.lock();
- try {
- _gtk_check_menu_item_set_active(wid, active);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_check_version(int required_major, int required_minor, int required_micro);
- public static final long gtk_check_version(int required_major, int required_minor, int required_micro) {
- lock.lock();
- try {
- return _gtk_check_version(required_major, required_minor, required_micro);
- } finally {
- lock.unlock();
- }
- }
- /** @param clipboard cast=(GtkClipboard *) */
- public static final native void _gtk_clipboard_clear(long clipboard);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_clipboard_clear(long clipboard) {
- lock.lock();
- try {
- _gtk_clipboard_clear(clipboard);
- } finally {
- lock.unlock();
- }
- }
- /** @param selection cast=(GdkAtom) */
- public static final native long _gtk_clipboard_get(long selection);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_clipboard_get(long selection) {
- lock.lock();
- try {
- return _gtk_clipboard_get(selection);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param clipboard cast=(GtkClipboard *)
- * @param target cast=(const GtkTargetEntry *)
- * @param n_targets cast=(guint)
- * @param get_func cast=(GtkClipboardGetFunc)
- * @param clear_func cast=(GtkClipboardClearFunc)
- * @param user_data cast=(GObject *)
- */
- public static final native boolean _gtk_clipboard_set_with_owner(long clipboard, long target, int n_targets, long get_func, long clear_func, long user_data);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gtk_clipboard_set_with_owner(long clipboard, long target, int n_targets, long get_func, long clear_func, long user_data) {
- lock.lock();
- try {
- return _gtk_clipboard_set_with_owner(clipboard, target, n_targets, get_func, clear_func, user_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param clipboard cast=(GtkClipboard *)
- * @param targets cast=(const GtkTargetEntry *)
- * @param n_targets cast=(gint)
- */
- public static final native void _gtk_clipboard_set_can_store(long clipboard, long targets, int n_targets);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_clipboard_set_can_store(long clipboard, long targets, int n_targets) {
- lock.lock();
- try {
- _gtk_clipboard_set_can_store(clipboard, targets, n_targets);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param clipboard cast=(GtkClipboard *)
- */
- public static final native void _gtk_clipboard_store(long clipboard);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_clipboard_store(long clipboard) {
- lock.lock();
- try {
- _gtk_clipboard_store(clipboard);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param clipboard cast=(GtkClipboard *)
- * @param target cast=(GdkAtom)
- */
- public static final native long _gtk_clipboard_wait_for_contents(long clipboard, long target);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_clipboard_wait_for_contents(long clipboard, long target) {
- lock.lock();
- try {
- return _gtk_clipboard_wait_for_contents(clipboard, target);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_render_handle(long context, long cr, double x , double y, double width, double height);
+ /**
+ * @param func cast=(GtkPrinterFunc)
+ * @param data cast=(gpointer)
+ * @param destroy cast=(GDestroyNotify)
+ * @param wait cast=(gboolean)
+ */
+ public static final native void gtk_enumerate_printers(long func, long data, long destroy, boolean wait);
+
+ /* GtkColorChooser Interface */
/**
* @param chooser cast=(GtkColorChooser *)
* @param orientation cast=(GtkOrientation)
@@ -1319,1254 +478,267 @@ public class GTK extends OS {
* @param n_colors cast=(gint)
* @param colors cast=(GdkRGBA *)
*/
- public static final native void _gtk_color_chooser_add_palette(long chooser, int orientation, int colors_per_line, int n_colors, long colors);
- public static final void gtk_color_chooser_add_palette(long chooser, int orientation, int colors_per_line, int n_colors, long colors) {
- lock.lock();
- try {
- _gtk_color_chooser_add_palette(chooser, orientation, colors_per_line, n_colors, colors);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param title cast=(const gchar *)
- * @param parent cast=(GtkWindow *)
- */
- public static final native long _gtk_color_chooser_dialog_new (byte[] title, long parent);
- public static final long gtk_color_chooser_dialog_new (byte[] title, long parent) {
- lock.lock();
- try {
- return _gtk_color_chooser_dialog_new (title, parent);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_color_chooser_add_palette(long chooser, int orientation, int colors_per_line, int n_colors, long colors);
/**
* @param chooser cast=(GtkColorChooser *)
* @param use_alpha cast=(gboolean)
*/
- public static final native void _gtk_color_chooser_set_use_alpha (long chooser, boolean use_alpha);
- public static final void gtk_color_chooser_set_use_alpha (long chooser, boolean use_alpha) {
- lock.lock();
- try {
- _gtk_color_chooser_set_use_alpha (chooser, use_alpha);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_color_chooser_set_use_alpha(long chooser, boolean use_alpha);
/**
* @param chooser cast=(GtkColorChooser *)
*/
- public static final native boolean _gtk_color_chooser_get_use_alpha (long chooser);
- public static final boolean gtk_color_chooser_get_use_alpha (long chooser) {
- lock.lock();
- try {
- return _gtk_color_chooser_get_use_alpha (chooser);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_color_chooser_get_use_alpha(long chooser);
/**
* @param chooser cast=(GtkColorChooser *)
* @param color cast=(GdkRGBA *)
*/
- public static final native void _gtk_color_chooser_set_rgba(long chooser, GdkRGBA color);
- public static final void gtk_color_chooser_get_rgba(long chooser, GdkRGBA color) {
- lock.lock();
- try {
- _gtk_color_chooser_get_rgba(chooser, color);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_color_chooser_set_rgba(long chooser, GdkRGBA color);
/**
* @param chooser cast=(GtkColorChooser *)
* @param color cast=(GdkRGBA *)
*/
- public static final native void _gtk_color_chooser_get_rgba(long chooser, GdkRGBA color);
- public static final void gtk_color_chooser_set_rgba(long chooser, GdkRGBA color) {
- lock.lock();
- try {
- _gtk_color_chooser_set_rgba(chooser, color);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_color_chooser_get_rgba(long chooser, GdkRGBA color);
/**
- * @method flags=dynamic
- * @param combo cast=(GtkComboBox *)
- * @param val cast=(gboolean)
+ * @param title cast=(const gchar *)
+ * @param parent cast=(GtkWindow *)
*/
- public static final native void _gtk_combo_box_set_focus_on_click(long combo, boolean val);
- /** [GTK2/GTK3; 3.20 deprecated, replaced] */
- public static final void gtk_combo_box_set_focus_on_click(long combo, boolean val) {
- lock.lock();
- try {
- _gtk_combo_box_set_focus_on_click(combo, val);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_combo_box_text_new();
- public static final long gtk_combo_box_text_new() {
- lock.lock();
- try {
- return _gtk_combo_box_text_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_combo_box_text_new_with_entry();
- public static final long gtk_combo_box_text_new_with_entry() {
- lock.lock();
- try {
- return _gtk_combo_box_text_new_with_entry();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_color_chooser_dialog_new(byte[] title, long parent);
+
+ /* GtkComboBox */
+ public static final native long gtk_combo_box_text_new();
+ public static final native long gtk_combo_box_text_new_with_entry();
/**
* @param combo_box cast=(GtkComboBoxText *)
* @param position cast=(gint)
* @param id cast=(const gchar *)
* @param text cast=(const gchar *)
*/
- public static final native void _gtk_combo_box_text_insert(long combo_box, int position, byte[] id, byte[] text);
- /** Do not call directly, instead use Combo.gtk_combo_box_insert(..) */
- public static final void gtk_combo_box_text_insert(long combo_box, int position, byte[] id, byte[] text) {
- lock.lock();
- try {
- _gtk_combo_box_text_insert(combo_box, position, id, text);
- } finally {
- lock.unlock();
- }
- }
+ /* Do not call directly, instead use Combo.gtk_combo_box_insert(..) */
+ public static final native void gtk_combo_box_text_insert(long combo_box, int position, byte[] id, byte[] text);
/** @param combo_box cast=(GtkComboBoxText *) */
- public static final native void _gtk_combo_box_text_remove(long combo_box, int position);
- public static final void gtk_combo_box_text_remove(long combo_box, int position) {
- lock.lock();
- try {
- _gtk_combo_box_text_remove(combo_box, position);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_combo_box_text_remove(long combo_box, int position);
/**
* @param combo_box cast=(GtkComboBoxText *)
*/
- public static final native void _gtk_combo_box_text_remove_all(long combo_box);
- /** Do not call directly. Call Combo.gtk_combo_box_text_remove_all(..) instead). */
- public static final void gtk_combo_box_text_remove_all(long combo_box) {
- lock.lock();
- try {
- _gtk_combo_box_text_remove_all(combo_box);
- } finally {
- lock.unlock();
- }
- }
+ /* Do not call directly. Call Combo.gtk_combo_box_text_remove_all(..) instead). */
+ public static final native void gtk_combo_box_text_remove_all(long combo_box);
/**
* @param combo_box cast=(GtkComboBox *)
*/
- public static final native int _gtk_combo_box_get_active(long combo_box);
- public static final int gtk_combo_box_get_active(long combo_box) {
- lock.lock();
- try {
- return _gtk_combo_box_get_active(combo_box);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_combo_box_get_active(long combo_box);
/**
* @param combo_box cast=(GtkComboBox *)
*/
- public static final native long _gtk_combo_box_get_model(long combo_box);
- public static final long gtk_combo_box_get_model(long combo_box) {
- lock.lock();
- try {
- return _gtk_combo_box_get_model(combo_box);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_combo_box_get_model(long combo_box);
/**
* @param combo_box cast=(GtkComboBox *)
* @param index cast=(gint)
*/
- public static final native void _gtk_combo_box_set_active(long combo_box, int index);
- public static final void gtk_combo_box_set_active(long combo_box, int index) {
- lock.lock();
- try {
- _gtk_combo_box_set_active(combo_box, index);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param combo_box cast=(GtkComboBox *)
- * @param width cast=(gint)
- */
- public static final native void _gtk_combo_box_set_wrap_width(long combo_box, int width);
- /**
- * Do not use directly. Instead use Combo.gtk_combo_box_toggle_wrap(..)
- */
- public static final void gtk_combo_box_set_wrap_width(long combo_box, int width) {
- lock.lock();
- try {
- _gtk_combo_box_set_wrap_width(combo_box, width);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_combo_box_set_active(long combo_box, int index);
/**
- * @param combo_box cast=(GtkComboBox *)
- * @return cast=(gint)
- */
- public static final native int _gtk_combo_box_get_wrap_width(long combo_box);
- public static final int gtk_combo_box_get_wrap_width(long combo_box) {
- lock.lock();
- try {
- return _gtk_combo_box_get_wrap_width(combo_box);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param combo_box cast=(GtkComboBox *)
*/
- public static final native void _gtk_combo_box_popup(long combo_box);
- public static final void gtk_combo_box_popup(long combo_box) {
- lock.lock();
- try {
- _gtk_combo_box_popup(combo_box);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_combo_box_popup(long combo_box);
/**
* @param combo_box cast=(GtkComboBox *)
*/
- public static final native void _gtk_combo_box_popdown(long combo_box);
- public static final void gtk_combo_box_popdown(long combo_box) {
- lock.lock();
- try {
- _gtk_combo_box_popdown(combo_box);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param container cast=(GtkContainer *)
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_container_add(long container, long widget);
- public static final void gtk_container_add(long container, long widget) {
- lock.lock();
- try {
- _gtk_container_add(container, widget);
- } finally {
- lock.unlock();
- }
- }
- //Do not confuse this function with gtk_container_foreach(..).
- //Make sure you know what you are doing when using this. Please be attentive to swt_fixed_forall(..)
- // found in os_custom.c, which overrides this function for swtFixed container with custom behaviour.
- /**
- * @param container cast=(GtkContainer *)
- * @param callback cast=(GtkCallback)
- * @param callback_data cast=(gpointer)
- */
- public static final native void _gtk_container_forall(long container, long callback, long callback_data);
- public static final void gtk_container_forall(long container, long callback, long callback_data) {
- lock.lock();
- try {
- _gtk_container_forall(container, callback, callback_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param container cast=(GtkContainer *)
- * @param child cast=(GtkWidget *)
- * @param cairo cast=(cairo_t *)
- */
- public static final native void _gtk_container_propagate_draw(long container, long child, long cairo);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_container_propagate_draw(long container, long child, long cairo) {
- lock.lock();
- try {
- _gtk_container_propagate_draw(container, child, cairo);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param container cast=(GtkContainer *)
- */
- public static final native int _gtk_container_get_border_width(long container);
- /** [GTK3 only, if-def'd in os.h] */
- public static final int gtk_container_get_border_width(long container) {
- lock.lock();
- try {
- return _gtk_container_get_border_width(container);
- } finally {
- lock.unlock();
- }
- }
- /** @param container cast=(GtkContainer *) */
- public static final native long _gtk_container_get_children(long container);
- public static final long gtk_container_get_children(long container) {
- lock.lock();
- try {
- return _gtk_container_get_children(container);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param container cast=(GtkContainer *)
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_container_remove(long container, long widget);
- public static final void gtk_container_remove(long container, long widget) {
- lock.lock();
- try {
- _gtk_container_remove(container, widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param container cast=(GtkContainer *)
- * @param border_width cast=(guint)
- */
- public static final native void _gtk_container_set_border_width(long container, int border_width);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_container_set_border_width(long container, int border_width) {
- lock.lock();
- try {
- _gtk_container_set_border_width(container, border_width);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_combo_box_popdown(long combo_box);
+
+ /* GtkDialog */
/**
* @param dialog cast=(GtkDialog *)
* @param button_text cast=(const gchar *)
* @param response_id cast=(gint)
*/
- public static final native long _gtk_dialog_add_button(long dialog, byte[] button_text, int response_id);
- public static final long gtk_dialog_add_button(long dialog, byte[] button_text, int response_id) {
- lock.lock();
- try {
- return _gtk_dialog_add_button(dialog, button_text, response_id);
- } finally {
- lock.unlock();
- }
- }
- /** @param dialog cast=(GtkDialog *) */
- public static final native int _gtk_dialog_run(long dialog);
- public static final int gtk_dialog_run(long dialog) {
- lock.lock();
- try {
- return _gtk_dialog_run(dialog);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param targets cast=(GtkTargetList *)
- * @param actions cast=(GdkDragAction)
- * @param button cast=(gint)
- * @param event cast=(GdkEvent *)
- * @param x cast=(gint)
- * @param y cast=(gint)
- */
- public static final native long _gtk_drag_begin_with_coordinates(long widget, long targets, int actions, int button, long event, int x, int y);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_drag_begin_with_coordinates(long widget, long targets, int actions, int button, long event, int x, int y) {
- lock.lock();
- try {
- return _gtk_drag_begin_with_coordinates(widget, targets, actions, button, event, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_dialog_add_button(long dialog, byte[] button_text, int response_id);
+
+ /* GtkEditable Interface */
/**
- * @param widget cast=(GtkWidget *)
- * @param device cast=(GdkDevice *)
- * @param targets cast=(GdkContentFormats *)
- * @param actions cast=(GdkDragAction)
- * @param x cast=(gint)
- * @param y cast=(gint)
+ * @param editable cast=(GtkEditable *)
+ * @param start cast=(gint)
+ * @param end cast=(gint)
*/
- public static final native long _gtk_drag_begin_with_coordinates(long widget, long device, long targets, int actions, int x, int y);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_drag_begin_with_coordinates(long widget, long device, long targets, int actions, int x, int y) {
- lock.lock();
- try {
- return _gtk_drag_begin_with_coordinates(widget, device, targets, actions, x, y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param start_x cast=(gint)
- * @param start_y cast=(gint)
- * @param current_x cast=(gint)
- * @param current_y cast=(gint)
- */
- public static final native boolean _gtk_drag_check_threshold(long widget, int start_x, int start_y, int current_x, int current_y);
- public static final boolean gtk_drag_check_threshold(long widget, int start_x, int start_y, int current_x, int current_y) {
- lock.lock();
- try {
- return _gtk_drag_check_threshold(widget, start_x, start_y, current_x, current_y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param context cast=(GdkDragContext *)
- * @param target_list cast=(GtkTargetList *)
- */
- public static final native long _gtk_drag_dest_find_target(long widget, long context, long target_list);
- /** [GTK3/GTK4: both have identical signatures but accept differing parameters at the native level] */
- public static final long gtk_drag_dest_find_target(long widget, long context, long target_list) {
- lock.lock();
- try {
- return _gtk_drag_dest_find_target(widget, context, target_list);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param flags cast=(GtkDestDefaults)
- * @param targets cast=(const GtkTargetEntry *)
- * @param n_targets cast=(gint)
- * @param actions cast=(GdkDragAction)
- */
- public static final native void _gtk_drag_dest_set(long widget, int flags, long targets, int n_targets, int actions);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_drag_dest_set(long widget, int flags, long targets, int n_targets, int actions) {
- lock.lock();
- try {
- _gtk_drag_dest_set(widget, flags, targets, n_targets, actions);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_drag_dest_unset(long widget);
- public static final void gtk_drag_dest_unset(long widget) {
- lock.lock();
- try {
- _gtk_drag_dest_unset(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GdkDragContext *)
- * @param success cast=(gboolean)
- * @param delete cast=(gboolean)
- * @param time cast=(guint32)
- */
- public static final native void _gtk_drag_finish(long context, boolean success, boolean delete, int time);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_drag_finish(long context, boolean success, boolean delete, int time) {
- lock.lock();
- try {
- _gtk_drag_finish(context, success, delete, time);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param context cast=(GdkDragContext *)
- * @param target cast=(GdkAtom)
- * @param time cast=(guint32)
- */
- public static final native void _gtk_drag_get_data(long widget, long context, long target, int time);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_drag_get_data(long widget, long context, long target, int time) {
- lock.lock();
- try {
- _gtk_drag_get_data(widget, context, target, time);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param drop cast=(GdkDrop *)
- * @param target cast=(GdkAtom)
- */
- public static final native void _gtk_drag_get_data(long widget, long drop, long target);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_drag_get_data(long widget, long drop, long target) {
- lock.lock();
- try {
- _gtk_drag_get_data(widget, drop, target);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GdkDragContext *)
- * @param surface cast=(cairo_surface_t *)
- */
- public static final native void _gtk_drag_set_icon_surface(long context, long surface);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_drag_set_icon_surface(long context, long surface) {
- lock.lock();
- try {
- _gtk_drag_set_icon_surface(context, surface);
- } finally {
- lock.unlock();
- }
- }
- /** @param editable cast=(GtkEditable *) */
- public static final native void _gtk_editable_copy_clipboard(long editable);
- public static final void gtk_editable_copy_clipboard(long editable) {
- lock.lock();
- try {
- _gtk_editable_copy_clipboard(editable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_editable_select_region(long editable, int start, int end);
/** @param editable cast=(GtkEditable *) */
- public static final native void _gtk_editable_cut_clipboard(long editable);
- public static final void gtk_editable_cut_clipboard(long editable) {
- lock.lock();
- try {
- _gtk_editable_cut_clipboard(editable);
- } finally {
- lock.unlock();
- }
- }
- /** @param editable cast=(GtkEditable *) */
- public static final native void _gtk_editable_delete_selection(long editable);
- public static final void gtk_editable_delete_selection(long editable) {
- lock.lock();
- try {
- _gtk_editable_delete_selection(editable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_editable_delete_selection(long editable);
/**
* @param editable cast=(GtkEditable *)
* @param start_pos cast=(gint)
* @param end_pos cast=(gint)
*/
- public static final native void _gtk_editable_delete_text(long editable, int start_pos, int end_pos);
- public static final void gtk_editable_delete_text(long editable, int start_pos, int end_pos) {
- lock.lock();
- try {
- _gtk_editable_delete_text(editable, start_pos, end_pos);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_editable_delete_text(long editable, int start_pos, int end_pos);
+ /**
+ * @param entry cast=(GtkEditable *)
+ * @param editable cast=(gboolean)
+ */
+ public static final native void gtk_editable_set_editable(long entry, boolean editable);
/** @param editable cast=(GtkEditable *) */
- public static final native boolean _gtk_editable_get_editable(long editable);
- public static final boolean gtk_editable_get_editable(long editable) {
- lock.lock();
- try {
- return _gtk_editable_get_editable(editable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_editable_get_editable(long editable);
+ /**
+ * @param editable cast=(GtkEditable *)
+ * @param position cast=(gint)
+ */
+ public static final native void gtk_editable_set_position(long editable, int position);
/** @param editable cast=(GtkEditable *) */
- public static final native int _gtk_editable_get_position(long editable);
- public static final int gtk_editable_get_position(long editable) {
- lock.lock();
- try {
- return _gtk_editable_get_position(editable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_editable_get_position(long editable);
/**
* @param editable cast=(GtkEditable *)
* @param start cast=(gint *)
* @param end cast=(gint *)
*/
- public static final native boolean _gtk_editable_get_selection_bounds(long editable, int[] start, int[] end);
- public static final boolean gtk_editable_get_selection_bounds(long editable, int[] start, int[] end) {
- lock.lock();
- try {
- return _gtk_editable_get_selection_bounds(editable, start, end);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_editable_get_selection_bounds(long editable, int[] start, int[] end);
/**
* @param editable cast=(GtkEditable *)
* @param new_text cast=(gchar *)
* @param new_text_length cast=(gint)
* @param position cast=(gint *)
*/
- public static final native void _gtk_editable_insert_text(long editable, byte[] new_text, int new_text_length, int[] position);
- public static final void gtk_editable_insert_text(long editable, byte[] new_text, int new_text_length, int[] position) {
- lock.lock();
- try {
- _gtk_editable_insert_text(editable, new_text, new_text_length, position);
- } finally {
- lock.unlock();
- }
- }
- /** @param editable cast=(GtkEditable *) */
- public static final native void _gtk_editable_paste_clipboard(long editable);
- public static final void gtk_editable_paste_clipboard(long editable) {
- lock.lock();
- try {
- _gtk_editable_paste_clipboard(editable);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param editable cast=(GtkEditable *)
- * @param start cast=(gint)
- * @param end cast=(gint)
- */
- public static final native void _gtk_editable_select_region(long editable, int start, int end);
- public static final void gtk_editable_select_region(long editable, int start, int end) {
- lock.lock();
- try {
- _gtk_editable_select_region(editable, start, end);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param entry cast=(GtkEditable *)
- * @param editable cast=(gboolean)
- */
- public static final native void _gtk_editable_set_editable(long entry, boolean editable);
- public static final void gtk_editable_set_editable(long entry, boolean editable) {
- lock.lock();
- try {
- _gtk_editable_set_editable(entry, editable);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param editable cast=(GtkEditable *)
- * @param position cast=(gint)
- */
- public static final native void _gtk_editable_set_position(long editable, int position);
- public static final void gtk_editable_set_position(long editable, int position) {
- lock.lock();
- try {
- _gtk_editable_set_position(editable, position);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param self cast=(GtkEntry *)
- * @param n_chars cast=(gint)
- */
- public static final native void _gtk_entry_set_width_chars (long self, int n_chars);
- public static final void gtk_entry_set_width_chars (long self, int n_chars) {
- lock.lock();
- try {
- _gtk_entry_set_width_chars(self, n_chars);
- } finally {
- lock.unlock();
- }
- }
- /** @param entry cast=(GtkEntry *) */
- public static final native char _gtk_entry_get_invisible_char(long entry);
- public static final char gtk_entry_get_invisible_char(long entry) {
- lock.lock();
- try {
- return _gtk_entry_get_invisible_char(entry);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_editable_insert_text(long editable, byte[] new_text, int new_text_length, int[] position);
+
+ /* GtkEntry */
+ public static final native long gtk_entry_new();
/** @param entry cast=(GtkEntry *) */
- public static final native long _gtk_entry_get_layout (long entry);
- public static final long gtk_entry_get_layout (long entry) {
- lock.lock();
- try {
- return _gtk_entry_get_layout(entry);
- } finally {
- lock.unlock();
- }
- }
+ public static final native char gtk_entry_get_invisible_char(long entry);
/**
* @param entry cast=(GtkEntry *)
- * @param x cast=(gint *)
- * @param y cast=(gint *)
+ * @param ch cast=(gint)
*/
- public static final native void _gtk_entry_get_layout_offsets (long entry, int[] x, int[] y);
- public static final void gtk_entry_get_layout_offsets (long entry, int[] x, int[] y) {
- lock.lock();
- try {
- _gtk_entry_get_layout_offsets(entry, x, y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param entry cast=(GtkEntry *)
- * @param index cast=(gint)
- */
- public static final native int _gtk_entry_text_index_to_layout_index (long entry, int index);
- public static final int gtk_entry_text_index_to_layout_index (long entry, int index) {
- lock.lock();
- try {
- return _gtk_entry_text_index_to_layout_index(entry, index);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_invisible_char(long entry, char ch);
/**
* @param entry cast=(GtkEntry *)
* @param icon_pos cast=(gint)
* @param icon_area cast=(GdkRectangle *),flags=no_in
*/
- public static final native void _gtk_entry_get_icon_area(long entry, int icon_pos, GdkRectangle icon_area);
- public static final void gtk_entry_get_icon_area(long entry, int icon_pos, GdkRectangle icon_area) {
- lock.lock();
- try {
- _gtk_entry_get_icon_area(entry, icon_pos, icon_area);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_get_icon_area(long entry, int icon_pos, GdkRectangle icon_area);
/** @param entry cast=(GtkEntry *) */
- public static final native int _gtk_entry_get_max_length(long entry);
- public static final int gtk_entry_get_max_length(long entry) {
- lock.lock();
- try {
- return _gtk_entry_get_max_length(entry);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_entry_get_max_length(long entry);
/** @param entry cast=(GtkEntry *) */
- public static final native long _gtk_entry_get_text(long entry);
- public static final long gtk_entry_get_text(long entry) {
- lock.lock();
- try {
- return _gtk_entry_get_text(entry);
- } finally {
- lock.unlock();
- }
- }
- /** @param entry cast=(GtkEntry *) */
- public static final native boolean _gtk_entry_get_visibility(long entry);
- public static final boolean gtk_entry_get_visibility(long entry) {
- lock.lock();
- try {
- return _gtk_entry_get_visibility(entry);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_entry_new();
- public static final long gtk_entry_new() {
- lock.lock();
- try {
- return _gtk_entry_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_entry_get_visibility(long entry);
+ /**
+ * @param entry cast=(GtkEntry *)
+ * @param visible cast=(gboolean)
+ */
+ public static final native void gtk_entry_set_visibility(long entry, boolean visible);
/**
* @param entry cast=(GtkEntry *)
* @param xalign cast=(gfloat)
*/
- public static final native void _gtk_entry_set_alignment(long entry, float xalign);
- public static final void gtk_entry_set_alignment(long entry, float xalign) {
- lock.lock();
- try {
- _gtk_entry_set_alignment(entry, xalign);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_alignment(long entry, float xalign);
/**
* @param entry cast=(GtkEntry *)
* @param setting cast=(gboolean)
*/
- public static final native void _gtk_entry_set_has_frame(long entry, boolean setting);
- public static final void gtk_entry_set_has_frame(long entry, boolean setting) {
- lock.lock();
- try {
- _gtk_entry_set_has_frame(entry, setting);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_has_frame(long entry, boolean setting);
/**
* @param entry cast=(GtkEntry *)
* @param iconPos cast=(gint)
* @param stock cast=(const gchar *)
*/
- public static final native void _gtk_entry_set_icon_from_icon_name(long entry, int iconPos, byte[] stock);
- public static final void gtk_entry_set_icon_from_icon_name(long entry, int iconPos, byte[] iconName) {
- lock.lock();
- try {
- _gtk_entry_set_icon_from_icon_name(entry, iconPos, iconName);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_icon_from_icon_name(long entry, int iconPos, byte[] stock);
/**
* @param entry cast=(GtkEntry *)
* @param icon_pos cast=(GtkEntryIconPosition)
* @param activatable cast=(gboolean)
*/
- public static final native void _gtk_entry_set_icon_activatable(long entry, int icon_pos, boolean activatable);
- public static final void gtk_entry_set_icon_activatable(long entry, int icon_pos, boolean activatable) {
- lock.lock();
- try {
- _gtk_entry_set_icon_activatable(entry, icon_pos, activatable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_icon_activatable(long entry, int icon_pos, boolean activatable);
/**
* @param entry cast=(GtkEntry *)
* @param icon_pos cast=(GtkEntryIconPosition)
* @param sensitive cast=(gboolean)
*/
- public static final native void _gtk_entry_set_icon_sensitive(long entry, int icon_pos, boolean sensitive);
- public static final void gtk_entry_set_icon_sensitive(long entry, int icon_pos, boolean sensitive) {
- lock.lock();
- try {
- _gtk_entry_set_icon_sensitive(entry, icon_pos, sensitive);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_icon_sensitive(long entry, int icon_pos, boolean sensitive);
/**
* @param entry cast=(GtkEntry *)
- * @param ch cast=(gint)
+ * @param text cast=(const gchar *)
*/
- public static final native void _gtk_entry_set_invisible_char(long entry, char ch);
- public static final void gtk_entry_set_invisible_char(long entry, char ch) {
- lock.lock();
- try {
- _gtk_entry_set_invisible_char(entry, ch);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_placeholder_text(long entry, byte[] text);
/**
* @param entry cast=(GtkEntry *)
* @param max cast=(gint)
*/
- public static final native void _gtk_entry_set_max_length(long entry, int max);
- public static final void gtk_entry_set_max_length(long entry, int max) {
- lock.lock();
- try {
- _gtk_entry_set_max_length(entry, max);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_max_length(long entry, int max);
/**
* @param entry cast=(GtkEntry *)
* @param tabs cast=(PangoTabArray *)
*/
- public static final native void _gtk_entry_set_tabs(long entry, long tabs);
- public static final void gtk_entry_set_tabs(long entry, long tabs) {
- lock.lock();
- try {
- _gtk_entry_set_tabs(entry, tabs);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_tabs(long entry, long tabs);
+
/**
* @param entry cast=(GtkEntry *)
- * @param text cast=(const gchar *)
+ * @param hint cast=(GtkInputHints)
*/
- public static final native void _gtk_entry_set_text(long entry, byte[] text);
- public static final void gtk_entry_set_text(long entry, byte[] text) {
- lock.lock();
- try {
- _gtk_entry_set_text(entry, text);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_set_input_hints(long entry, int hint);
+
+ /* GtkEntryBuffer */
/**
- * @param entry cast=(GtkEntry *)
- * @param text cast=(const gchar *)
+ * @param buffer cast=(GtkEntryBuffer *)
+ * @param position cast=(guint)
*/
- public static final native void _gtk_entry_set_placeholder_text(long entry, byte[] text);
- public static final void gtk_entry_set_placeholder_text(long entry, byte[] text) {
- lock.lock();
- try {
- _gtk_entry_set_placeholder_text(entry, text);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_entry_buffer_delete_text(long buffer, int position, int n_chars);
/**
- * @param entry cast=(GtkEntry *)
- * @param visible cast=(gboolean)
+ * @param buffer cast=(GtkEntryBuffer *)
+ * @param chars cast=(const char *)
*/
- public static final native void _gtk_entry_set_visibility(long entry, boolean visible);
- public static final void gtk_entry_set_visibility(long entry, boolean visible) {
- lock.lock();
- try {
- _gtk_entry_set_visibility(entry, visible);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_entry_buffer_set_text(long buffer, byte[] chars, int n_chars);
+ /** @param buffer cast=(GtkEntryBuffer *) */
+ public static final native long gtk_entry_buffer_get_text(long buffer);
+
+ /* GtkExpander */
+ /** @param label cast=(const gchar *) */
+ public static final native long gtk_expander_new(byte[] label);
/** @param expander cast=(GtkExpander *) */
- public static final native boolean _gtk_expander_get_expanded(long expander);
- public static final boolean gtk_expander_get_expanded(long expander) {
- lock.lock();
- try {
- return _gtk_expander_get_expanded(expander);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param label cast=(const gchar *)
- */
- public static final native long _gtk_expander_new(byte[] label);
- public static final long gtk_expander_new(byte[] label) {
- lock.lock();
- try {
- return _gtk_expander_new(label);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_expander_get_expanded(long expander);
/** @param expander cast=(GtkExpander *) */
- public static final native void _gtk_expander_set_expanded(long expander, boolean expanded);
- public static final void gtk_expander_set_expanded(long expander, boolean expanded) {
- lock.lock();
- try {
- _gtk_expander_set_expanded(expander, expanded);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_expander_set_expanded(long expander, boolean expanded);
/**
* @param expander cast=(GtkExpander *)
* @param label_widget cast=(GtkWidget *)
*/
- public static final native void _gtk_expander_set_label_widget(long expander, long label_widget);
- public static final void gtk_expander_set_label_widget(long expander, long label_widget) {
- lock.lock();
- try {
- _gtk_expander_set_label_widget(expander, label_widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_expander_set_label_widget(long expander, long label_widget);
+ /** @param expander cast=(GtkExpander *) */
+ public static final native long gtk_expander_get_label_widget(long expander);
+
+ /* GtkFileChooser */
/**
* @param chooser cast=(GtkFileChooser *)
* @param filter cast=(GtkFileFilter *)
*/
- public static final native void _gtk_file_chooser_add_filter(long chooser, long filter);
- public static final void gtk_file_chooser_add_filter(long chooser, long filter) {
- lock.lock();
- try {
- _gtk_file_chooser_add_filter(chooser, filter);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param title cast=(const gchar *),flags=no_out
- * @param parent cast=(GtkWindow *)
- * @param first_button_text cast=(const gchar *),flags=no_out
- * @param terminator cast=(const gchar *),flags=sentinel
- */
- public static final native long _gtk_file_chooser_dialog_new(byte[] title, long parent, int action, byte[] first_button_text, int first_button_id, byte[] second_button_text, int second_button_id, long terminator);
- public static final long gtk_file_chooser_dialog_new(byte[] title, long parent, int action, byte[] first_button_text, int first_button_id, byte[] second_button_text, int second_button_id, long terminator) {
- lock.lock();
- try {
- return _gtk_file_chooser_dialog_new(title, parent, action, first_button_text, first_button_id, second_button_text, second_button_id, terminator);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param title cast=(const gchar *),flags=no_out
- * @param parent cast=(GtkWindow *)
- * @param first_button_text cast=(const gchar *),flags=no_out
- * @param terminator cast=(const gchar *),flags=sentinel
- */
- public static final native long _gtk_file_chooser_dialog_new(byte[] title, long parent, int action, long first_button_text, int first_button_id, long second_button_text, int second_button_id, long terminator);
- public static final long gtk_file_chooser_dialog_new(byte[] title, long parent, int action, long first_button_text, int first_button_id, long second_button_text, int second_button_id, long terminator) {
- lock.lock();
- try {
- return _gtk_file_chooser_dialog_new(title, parent, action, first_button_text, first_button_id, second_button_text, second_button_id, terminator);
- } finally {
- lock.unlock();
- }
- }
- /** @param chooser cast=(GtkFileChooser *) */
- public static final native long _gtk_file_chooser_get_filename(long chooser);
- public static final long gtk_file_chooser_get_filename(long chooser) {
- lock.lock();
- try {
- return _gtk_file_chooser_get_filename(chooser);
- } finally {
- lock.unlock();
- }
- }
- /** @param chooser cast=(GtkFileChooser *) */
- public static final native long _gtk_file_chooser_get_filenames(long chooser);
- public static final long gtk_file_chooser_get_filenames(long chooser) {
- lock.lock();
- try {
- return _gtk_file_chooser_get_filenames(chooser);
- } finally {
- lock.unlock();
- }
- }
- /** @param chooser cast=(GtkFileChooser *) */
- public static final native long _gtk_file_chooser_get_uri(long chooser);
- public static final long gtk_file_chooser_get_uri(long chooser) {
- lock.lock();
- try {
- return _gtk_file_chooser_get_uri(chooser);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_file_chooser_add_filter(long chooser, long filter);
/** @param chooser cast=(GtkFileChooser *) */
- public static final native long _gtk_file_chooser_get_uris(long chooser);
- public static final long gtk_file_chooser_get_uris(long chooser) {
- lock.lock();
- try {
- return _gtk_file_chooser_get_uris(chooser);
- } finally {
- lock.unlock();
- }
- }
- /** @param chooser cast=(GtkFileChooser *) */
- public static final native long _gtk_file_chooser_get_filter(long chooser);
- public static final long gtk_file_chooser_get_filter(long chooser) {
- lock.lock();
- try {
- return _gtk_file_chooser_get_filter(chooser);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param chooser cast=(GtkFileChooser *)
- * @param filename cast=(const gchar *)
- */
- public static final native void _gtk_file_chooser_set_current_folder(long chooser, long filename);
- public static final void gtk_file_chooser_set_current_folder(long chooser, long filename) {
- lock.lock();
- try {
- _gtk_file_chooser_set_current_folder(chooser, filename);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param chooser cast=(GtkFileChooser *)
- * @param uri cast=(const gchar *)
- */
- public static final native void _gtk_file_chooser_set_current_folder_uri(long chooser, byte [] uri);
- public static final void gtk_file_chooser_set_current_folder_uri(long chooser, byte [] uri) {
- lock.lock();
- try {
- _gtk_file_chooser_set_current_folder_uri(chooser, uri);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param chooser cast=(GtkFileChooser *)
- * @param name cast=(const gchar *)
- */
- public static final native void _gtk_file_chooser_set_current_name(long chooser, byte[] name);
- public static final void gtk_file_chooser_set_current_name(long chooser, byte[] name) {
- lock.lock();
- try {
- _gtk_file_chooser_set_current_name(chooser, name);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param chooser cast=(GtkFileChooser *)
- * @param local_only cast=(gboolean)
- */
- public static final native void _gtk_file_chooser_set_local_only(long chooser, boolean local_only);
- public static final void gtk_file_chooser_set_local_only(long chooser, boolean local_only) {
- lock.lock();
- try {
- _gtk_file_chooser_set_local_only(chooser, local_only);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param chooser cast=(GtkFileChooser *)
- * @param do_overwrite_confirmation cast=(gboolean)
- */
- public static final native void _gtk_file_chooser_set_do_overwrite_confirmation(long chooser, boolean do_overwrite_confirmation);
- public static final void gtk_file_chooser_set_do_overwrite_confirmation(long chooser, boolean do_overwrite_confirmation) {
- lock.lock();
- try {
- _gtk_file_chooser_set_do_overwrite_confirmation(chooser, do_overwrite_confirmation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param chooser cast=(GtkFileChooser *)
- * @param extra_widget cast=(GtkWidget *)
- */
- public static final native void _gtk_file_chooser_set_extra_widget(long chooser, long extra_widget);
- public static final void gtk_file_chooser_set_extra_widget(long chooser, long extra_widget) {
- lock.lock();
- try {
- _gtk_file_chooser_set_extra_widget(chooser, extra_widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_file_chooser_get_filter(long chooser);
/**
* @param chooser cast=(GtkFileChooser *)
* @param name cast=(const gchar *)
*/
- public static final native void _gtk_file_chooser_set_filename(long chooser, long name);
- public static final void gtk_file_chooser_set_filename(long chooser, long name) {
- lock.lock();
- try {
- _gtk_file_chooser_set_filename(chooser, name);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_file_chooser_set_current_name(long chooser, byte[] name);
/**
* @param chooser cast=(GtkFileChooser *)
* @param filter cast=(GtkFileFilter *)
*/
- public static final native void _gtk_file_chooser_set_filter(long chooser, long filter);
- public static final void gtk_file_chooser_set_filter(long chooser, long filter) {
- lock.lock();
- try {
- _gtk_file_chooser_set_filter(chooser, filter);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param chooser cast=(GtkFileChooser *)
- * @param uri cast=(const char *)
- */
- public static final native void _gtk_file_chooser_set_uri(long chooser, byte [] uri);
- public static final void gtk_file_chooser_set_uri(long chooser, byte [] uri) {
- lock.lock();
- try {
- _gtk_file_chooser_set_uri(chooser, uri);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_file_chooser_set_filter(long chooser, long filter);
/**
* @param chooser cast=(GtkFileChooser *)
* @param select_multiple cast=(gboolean)
*/
- public static final native void _gtk_file_chooser_set_select_multiple(long chooser, boolean select_multiple);
- public static final void gtk_file_chooser_set_select_multiple(long chooser, boolean select_multiple) {
- lock.lock();
- try {
- _gtk_file_chooser_set_select_multiple(chooser, select_multiple);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_gesture_multi_press_new();
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_gesture_multi_press_new() {
- lock.lock();
- try {
- return _gtk_gesture_multi_press_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_event_controller_key_new();
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_event_controller_key_new() {
- lock.lock();
- try {
- return _gtk_event_controller_key_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_event_controller_motion_new();
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_event_controller_motion_new() {
- lock.lock();
- try {
- return _gtk_event_controller_motion_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_event_controller_scroll_new(int flag);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_event_controller_scroll_new(int flag) {
- lock.lock();
- try {
- return _gtk_event_controller_scroll_new(flag);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_file_chooser_set_select_multiple(long chooser, boolean select_multiple);
+
+ /* GtkEventController */
/**
- * @param widget cast=(GtkWidget *)
* @param controller cast=(GtkEventController *)
+ * @param phase cast=(GtkPropagationPhase)
*/
- public static final native void _gtk_widget_add_controller(long widget, long controller);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_widget_add_controller(long widget, long controller) {
- lock.lock();
- try {
- _gtk_widget_add_controller(widget, controller);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_event_controller_set_propagation_phase(long controller, int phase);
- public static final void gtk_event_controller_set_propagation_phase(long controller, int phase) {
- lock.lock();
- try {
- _gtk_event_controller_set_propagation_phase(controller, phase);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_event_controller_set_propagation_phase(long controller, int phase);
+ /** @param controller cast=(GtkEventController *) */
+ public static final native long gtk_event_controller_get_widget(long controller);
+
+ /* GtkGestureSingle */
+ /** @method flags=dynamic */
+ public static final native void gtk_gesture_single_set_button(long gesture, int button);
+ /** @param gesture cast=(GtkGestureSingle *) */
+ public static final native int gtk_gesture_single_get_current_button(long gesture);
+
+ /* GtkFileChooserNative */
/**
* @method flags=dynamic
* @param title cast=(const gchar *),flags=no_out
@@ -2574,1754 +746,328 @@ public class GTK extends OS {
* @param accept_label cast=(const gchar *),flags=no_out
* @param cancel_label cast=(const gchar *),flags=no_out
*/
- public static final native long _gtk_file_chooser_native_new(byte[] title, long parent, int action, byte[] accept_label, byte[] cancel_label);
- public static final long gtk_file_chooser_native_new(byte[] title, long parent, int action, byte[] accept_label, byte[] cancel_label) {
- lock.lock();
- try {
- return _gtk_file_chooser_native_new(title, parent, action, accept_label, cancel_label);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_event_controller_handle_event(long gesture, long event);
- public static final void gtk_event_controller_handle_event(long gesture, long event) {
- lock.lock();
- try {
- _gtk_event_controller_handle_event(gesture, event);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native long _gtk_event_controller_get_widget(long controller);
- public static final long gtk_event_controller_get_widget(long controller) {
- lock.lock();
- try {
- return _gtk_event_controller_get_widget(controller);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_file_chooser_native_new(byte[] title, long parent, int action, byte[] accept_label, byte[] cancel_label);
+
+ /* GtkFileFilter */
+ public static final native long gtk_file_filter_new();
/**
* @param filter cast=(GtkFileFilter *)
* @param pattern cast=(const gchar *)
*/
- public static final native void _gtk_file_filter_add_pattern(long filter, byte[] pattern);
- public static final void gtk_file_filter_add_pattern(long filter, byte[] pattern) {
- lock.lock();
- try {
- _gtk_file_filter_add_pattern(filter, pattern);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_file_filter_new();
- public static final long gtk_file_filter_new() {
- lock.lock();
- try {
- return _gtk_file_filter_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_file_filter_add_pattern(long filter, byte[] pattern);
/** @param filter cast=(GtkFileFilter *) */
- public static final native long _gtk_file_filter_get_name(long filter);
- public static final long gtk_file_filter_get_name(long filter) {
- lock.lock();
- try {
- return _gtk_file_filter_get_name(filter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_file_filter_get_name(long filter);
/**
* @param filter cast=(GtkFileFilter *)
* @param name cast=(const gchar *)
*/
- public static final native void _gtk_file_filter_set_name(long filter, byte[] name);
- public static final void gtk_file_filter_set_name(long filter, byte[] name) {
- lock.lock();
- try {
- _gtk_file_filter_set_name(filter, name);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_file_filter_set_name(long filter, byte[] name);
+
/**
* @method flags=dynamic
*/
- public static final native boolean _gtk_gesture_drag_get_start_point(long gesture, double[] x, double [] y);
- public static final boolean gtk_gesture_drag_get_start_point(long gesture, double[] x, double [] y) {
- lock.lock();
- try {
- return _gtk_gesture_drag_get_start_point(gesture, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_gesture_drag_get_start_point(long gesture, double[] x, double [] y);
/**
* @method flags=dynamic
*/
- public static final native boolean _gtk_gesture_is_recognized(long gesture);
- public static final boolean gtk_gesture_is_recognized(long gesture) {
- lock.lock();
- try {
- return _gtk_gesture_is_recognized(gesture);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_gesture_is_recognized(long gesture);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native long _gtk_gesture_drag_new(long widget);
- public static final long gtk_gesture_drag_new(long widget) {
- lock.lock();
- try {
- return _gtk_gesture_drag_new(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native long _gtk_gesture_get_last_event(long gesture, long sequence);
- public static final long gtk_gesture_get_last_event(long gesture, long sequence) {
- lock.lock();
- try {
- return _gtk_gesture_get_last_event(gesture,sequence);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native long _gtk_gesture_get_last_updated_sequence(long gesture);
- public static final long gtk_gesture_get_last_updated_sequence(long gesture) {
- lock.lock();
- try {
- return _gtk_gesture_get_last_updated_sequence(gesture);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_gesture_drag_new(long widget);
/**
* @method flags=dynamic
*/
- public static final native boolean _gtk_gesture_get_point(long gesture, long sequence, double[] x, double [] y);
- public static final boolean gtk_gesture_get_point(long gesture, long sequence, double[] x, double [] y) {
- lock.lock();
- try {
- return _gtk_gesture_get_point(gesture, sequence, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_gesture_get_last_updated_sequence(long gesture);
/**
* @method flags=dynamic
*/
- public static final native long _gtk_gesture_get_sequences(long gesture);
- public static final long gtk_gesture_get_sequences(long gesture) {
- lock.lock();
- try {
- return _gtk_gesture_get_sequences(gesture);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_gesture_get_point(long gesture, long sequence, double[] x, double [] y);
/**
* @method flags=dynamic
*/
- public static final native void _gtk_gesture_group (long group_gesture, long gesture);
- public static final void gtk_gesture_group (long group_gesture, long gesture) {
- lock.lock();
- try {
- _gtk_gesture_group(group_gesture, gesture);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_gesture_swipe_get_velocity(long gesture, double [] velocity_x, double[] velocity_y);
/**
* @method flags=dynamic
*/
- public static final native void _gtk_gesture_pan_set_orientation(long orientation);
- public static final void gtk_gesture_pan_set_orientation(long orientation) {
- lock.lock();
- try {
- _gtk_gesture_pan_set_orientation(orientation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native long _gtk_gesture_pan_get_orientation(long gesture);
- public static final long gtk_gesture_pan_get_orientation(long gesture) {
- lock.lock();
- try {
- return _gtk_gesture_pan_get_orientation(gesture);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_gesture_pan_new (long widget, long orientation);
- public static final void gtk_gesture_pan_new (long widget, long orientation) {
- lock.lock();
- try {
- _gtk_gesture_pan_new(widget, orientation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_gesture_single_set_button(long gesture, int button);
- public static final void gtk_gesture_single_set_button(long gesture, int button) {
- lock.lock();
- try {
- _gtk_gesture_single_set_button(gesture, button);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native boolean _gtk_gesture_swipe_get_velocity(long gesture, double [] velocity_x, double[] velocity_y);
- public static final boolean gtk_gesture_swipe_get_velocity(long gesture, double [] velocity_x, double[] velocity_y) {
- lock.lock();
- try {
- return _gtk_gesture_swipe_get_velocity(gesture, velocity_x, velocity_y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native long _gtk_gesture_swipe_new (long widget);
- public static final long gtk_gesture_swipe_new (long widget) {
- lock.lock();
- try {
- return _gtk_gesture_swipe_new(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_gesture_drag_get_offset(long gesture, double[] x, double[] y);
- public static final void gtk_gesture_drag_get_offset(long gesture, double[] x, double[] y) {
- lock.lock();
- try {
- _gtk_gesture_drag_get_offset(gesture, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_gesture_drag_get_offset(long gesture, double[] x, double[] y);
/**
* @method flags=dynamic
*/
- public static final native double _gtk_gesture_rotate_get_angle_delta (long gesture);
- public static final double gtk_gesture_rotate_get_angle_delta (long gesture) {
- lock.lock();
- try {
- return _gtk_gesture_rotate_get_angle_delta(gesture);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_gesture_rotate_get_angle_delta(long gesture);
/**
* @method flags=dynamic
*/
- public static final native long _gtk_gesture_rotate_new(long widget);
- public static final long gtk_gesture_rotate_new(long widget) {
- lock.lock();
- try {
- return _gtk_gesture_rotate_new(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_gesture_rotate_new(long widget);
/**
* @method flags=dynamic
*/
- public static final native long _gtk_gesture_zoom_new(long widget);
- public static final long gtk_gesture_zoom_new(long widget) {
- lock.lock();
- try {
- return _gtk_gesture_zoom_new(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_gesture_zoom_new(long widget);
/**
* @method flags=dynamic
*/
- public static final native double _gtk_gesture_zoom_get_scale_delta (long gesture);
- public static final double gtk_gesture_zoom_get_scale_delta (long gesture) {
- lock.lock();
- try {
- return _gtk_gesture_zoom_get_scale_delta(gesture);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_widget_set_clip(long widget, GtkAllocation allocation);
- public static final void gtk_widget_set_clip(long widget, GtkAllocation allocation) {
- lock.lock();
- try {
- _gtk_widget_set_clip(widget, allocation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_widget_get_clip(long widget, GtkAllocation allocation);
- public static final void gtk_widget_get_clip(long widget, GtkAllocation allocation) {
- lock.lock();
- try {
- _gtk_widget_get_clip(widget, allocation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param has_window cast=(gboolean)
- */
- public static final native void _gtk_widget_set_has_window(long widget, boolean has_window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_widget_set_has_window(long widget, boolean has_window) {
- lock.lock();
- try {
- _gtk_widget_set_has_window(widget, has_window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param has_surface cast=(gboolean)
- */
- public static final native void _gtk_widget_set_has_surface(long widget, boolean has_surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_widget_set_has_surface(long widget, boolean has_surface) {
- lock.lock();
- try {
- _gtk_widget_set_has_surface(widget, has_surface);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param expand cast=(gboolean)
- */
- public static final native void _gtk_widget_set_hexpand(long widget, boolean expand);
- public static final void gtk_widget_set_hexpand(long widget, boolean expand) {
- lock.lock();
- try {
- _gtk_widget_set_hexpand(widget, expand);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param expand cast=(gboolean)
- */
- public static final native void _gtk_widget_set_vexpand(long widget, boolean expand);
- public static final void gtk_widget_set_vexpand(long widget, boolean expand) {
- lock.lock();
- try {
- _gtk_widget_set_vexpand(widget, expand);
- } finally {
- lock.unlock();
- }
- }
- //since Gtk 3.16. For pre-gtk3.16, use gtk_misc_set_alignment(..)
- /**
- * @method flags=dynamic
- * @param label cast=(GtkLabel *)
- * @param xalign cast=(gfloat)
- *
- */
- public static final native void _gtk_label_set_xalign(long label, float xalign);
- public static final void gtk_label_set_xalign(long label, float xalign) {
- lock.lock();
- try {
- _gtk_label_set_xalign(label, xalign);
- } finally {
- lock.unlock();
- }
- }
- //since Gtk 3.16. For pre-gtk3.16, use gtk_misc_set_alignment(..)
- /**
- * @method flags=dynamic
- * @param label cast=(GtkLabel *)
- * @param yalign cast=(gfloat)
- *
- */
- public static final native void _gtk_label_set_yalign(long label, float yalign);
- public static final void gtk_label_set_yalign(long label, float yalign) {
- lock.lock();
- try {
- _gtk_label_set_yalign(label, yalign);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param gtk_align cast=(GtkAlign)
- */
- public static final native void _gtk_widget_set_halign(long widget, int gtk_align);
- public static final void gtk_widget_set_halign(long widget, int gtk_align) {
- lock.lock();
- try {
- _gtk_widget_set_halign(widget, gtk_align);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param gtk_align cast=(GtkAlign)
- */
- public static final native void _gtk_widget_set_valign(long widget, int gtk_align);
- public static final void gtk_widget_set_valign(long widget, int gtk_align ) {
- lock.lock();
- try {
- _gtk_widget_set_valign(widget, gtk_align);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void _gtk_widget_set_margin_start (long widget, int margin);
- public static final void gtk_widget_set_margin_start (long widget, int margin) {
- lock.lock();
- try {
- _gtk_widget_set_margin_start(widget, margin);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void _gtk_widget_set_margin_end (long widget, int margin);
- public static final void gtk_widget_set_margin_end (long widget, int margin) {
- lock.lock();
- try {
- _gtk_widget_set_margin_end(widget, margin);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void _gtk_widget_set_margin_top (long widget, int margin);
- public static final void gtk_widget_set_margin_top (long widget, int margin) {
- lock.lock();
- try {
- _gtk_widget_set_margin_top(widget, margin);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void _gtk_widget_set_margin_bottom (long widget, int margin);
- public static final void gtk_widget_set_margin_bottom (long widget, int margin) {
- lock.lock();
- try {
- _gtk_widget_set_margin_bottom(widget, margin);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_gesture_zoom_get_scale_delta(long gesture);
+
+ /* GtkFontChooserDialog */
/**
* @param title cast=(const gchar *)
* @param parent cast=(GtkWindow *)
*/
- public static final native long _gtk_font_chooser_dialog_new(byte[] title, long parent);
- public static final long gtk_font_chooser_dialog_new(byte[] title, long parent) {
- lock.lock();
- try {
- return _gtk_font_chooser_dialog_new(title, parent);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param fontchooser cast=(GtkFontChooser *)
- */
- public static final native long _gtk_font_chooser_get_font(long fontchooser);
- public static final long gtk_font_chooser_get_font(long fontchooser) {
- lock.lock();
- try {
- return _gtk_font_chooser_get_font(fontchooser);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_font_chooser_dialog_new(byte[] title, long parent);
+
+ /* GtkFontChooser Interface */
+ /** @param fontchooser cast=(GtkFontChooser *) */
+ public static final native long gtk_font_chooser_get_font(long fontchooser);
/**
* @param fsd cast=(GtkFontChooser *)
* @param fontname cast=(const gchar *)
*/
- public static final native void _gtk_font_chooser_set_font(long fsd, byte[] fontname);
- public static final void gtk_font_chooser_set_font(long fsd, byte[] fontname) {
- lock.lock();
- try {
- _gtk_font_chooser_set_font(fsd, fontname);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_font_chooser_set_font(long fsd, byte[] fontname);
+
+ /* GtkFrame */
/** @param label cast=(const gchar *) */
- public static final native long _gtk_frame_new(byte[] label);
- public static final long gtk_frame_new(byte[] label) {
- lock.lock();
- try {
- return _gtk_frame_new(label);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_frame_new(byte[] label);
/** @param frame cast=(GtkFrame *) */
- public static final native long _gtk_frame_get_label_widget(long frame);
- public static final long gtk_frame_get_label_widget(long frame) {
- lock.lock();
- try {
- return _gtk_frame_get_label_widget(frame);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_frame_get_label_widget(long frame);
/**
* @param frame cast=(GtkFrame *)
* @param label_widget cast=(GtkWidget *)
*/
- public static final native void _gtk_frame_set_label_widget(long frame, long label_widget);
- public static final void gtk_frame_set_label_widget(long frame, long label_widget) {
- lock.lock();
- try {
- _gtk_frame_set_label_widget(frame, label_widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param frame cast=(GtkFrame *)
- * @param type cast=(GtkShadowType)
- */
- public static final native void _gtk_frame_set_shadow_type(long frame, int type);
- public static final void gtk_frame_set_shadow_type(long frame, int type) {
- lock.lock();
- try {
- _gtk_frame_set_shadow_type(frame, type);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_get_current_event();
- public static final long gtk_get_current_event() {
- lock.lock();
- try {
- return _gtk_get_current_event();
- } finally {
- lock.unlock();
- }
- }
- /** @param state cast=(GdkModifierType*) */
- public static final native boolean _gtk_get_current_event_state (int[] state);
- public static final boolean gtk_get_current_event_state (int[] state) {
- lock.lock();
- try {
- return _gtk_get_current_event_state(state);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_get_default_language();
- public static final long gtk_get_default_language() {
- lock.lock();
- try {
- return _gtk_get_default_language();
- } finally {
- lock.unlock();
- }
- }
- /** @param event cast=(GdkEvent *) */
- public static final native long _gtk_get_event_widget(long event);
- public static final long gtk_get_event_widget(long event) {
- lock.lock();
- try {
- return _gtk_get_event_widget(event);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_grab_add(long widget);
- public static final void gtk_grab_add(long widget) {
- lock.lock();
- try {
- _gtk_grab_add(widget);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_grab_get_current();
- public static final long gtk_grab_get_current() {
- lock.lock();
- try {
- return _gtk_grab_get_current();
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_grab_remove(long widget);
- public static final void gtk_grab_remove(long widget) {
- lock.lock();
- try {
- _gtk_grab_remove(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param h cast=(gdouble)
- * @param s cast=(gdouble)
- * @param v cast=(gdouble)
- * @param r cast=(gdouble *)
- * @param g cast=(gdouble *)
- * @param b cast=(gdouble *)
- */
- public static final native void _gtk_hsv_to_rgb(double h, double s, double v, double[] r, double[] g, double[] b);
- public static final void gtk_hsv_to_rgb(double h, double s, double v, double[] r, double[] g, double[] b) {
- lock.lock();
- try {
- _gtk_hsv_to_rgb(h, s, v, r, g, b);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param r cast=(gdouble)
- * @param g cast=(gdouble)
- * @param b cast=(gdouble)
- * @param h cast=(gdouble *)
- * @param s cast=(gdouble *)
- * @param v cast=(gdouble *)
- */
- public static final native void _gtk_rgb_to_hsv(double r, double g, double b, double[] h, double[] s, double[] v);
- public static final void gtk_rgb_to_hsv(double r, double g, double b, double[] h, double[] s, double[] v) {
- lock.lock();
- try {
- _gtk_rgb_to_hsv(r, g, b, h, s, v);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param orientation cast=(GtkOrientation)
- * @param spacing cast=(gint)
- */
- public static final native long _gtk_box_new(int orientation, int spacing);
- public static final long gtk_box_new(int orientation, int spacing) {
- lock.lock();
- try {
- return _gtk_box_new(orientation, spacing);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param box cast=(GtkBox *)
- * @param widget cast=(GtkWidget *)
- * @param expand cast=(gboolean)
- * @param fill cast=(gboolean)
- * @param padding cast=(guint)
- */
- public static final native void _gtk_box_pack_end(long box, long widget,
- boolean expand, boolean fill, int padding);
- /** [GTK3 only] */
- public static final void gtk_box_pack_end(long box, long widget,
- boolean expand, boolean fill, int padding) {
- lock.lock();
- try {
- _gtk_box_pack_end(box, widget, expand, fill, padding);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param box cast=(GtkBox *)
- * @param child cast=(GtkWidget *)
- */
- public static final native void _gtk_box_pack_end(long box, long child);
- /** [GTK4 only] */
- public static final void gtk_box_pack_end(long box, long child) {
- lock.lock();
- try {
- _gtk_box_pack_end(box, child);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param box cast=(GtkBox *)
- * @param child cast=(GtkWidget *)
- * @param position cast=(gint)
- */
- public static final native void _gtk_box_reorder_child(long box, long child, int position);
- public static final void gtk_box_reorder_child(long box, long child, int position) {
- lock.lock();
- try {
- _gtk_box_reorder_child(box, child, position);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_frame_set_label_widget(long frame, long label_widget);
+
+ /* GtkScale */
/**
- * @param box cast=(GtkBox *)
- * @param homogeneous cast=(gboolean)
+ * @param orientation cast=(GtkOrientation)
+ * @param adjustment cast=(GtkAdjustment *)
*/
- public static final native void _gtk_box_set_homogeneous(long box, boolean homogeneous);
- public static final void gtk_box_set_homogeneous(long box, boolean homogeneous) {
- lock.lock();
- try {
- _gtk_box_set_homogeneous(box, homogeneous);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_scale_new(int orientation, long adjustment);
/**
- * @method flags=dynamic
+ * @param scale cast=(GtkScale *)
+ * @param digits cast=(gint)
*/
- public static final native long _gtk_event_box_new();
- /** [GTK3 only] */
- public static final long gtk_event_box_new() {
- lock.lock();
- try {
- return _gtk_event_box_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_scale_set_digits(long scale, int digits);
/**
- * @param orientation cast=(GtkOrientation)
- * @param adjustment cast=(GtkAdjustment *)
+ * @param scale cast=(GtkScale *)
+ * @param draw_value cast=(gboolean)
*/
- public static final native long _gtk_scale_new(int orientation, long adjustment);
- public static final long gtk_scale_new(int orientation, long adjustment) {
- lock.lock();
- try {
- return _gtk_scale_new(orientation, adjustment);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_scale_set_draw_value(long scale, boolean draw_value);
+
+ /* GtkScrollbar */
/**
* @param orientation cast=(GtkOrientation)
* @param adjustment cast=(GtkAdjustment *)
- * */
- public static final native long _gtk_scrollbar_new(int orientation, long adjustment);
- public static final long gtk_scrollbar_new(int orientation, long adjustment) {
- lock.lock();
- try {
- return _gtk_scrollbar_new(orientation, adjustment);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_search_entry_new();
- public static final long gtk_search_entry_new() {
- lock.lock();
- try {
- return _gtk_search_entry_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param orientation cast=(GtkOrientation)
*/
- public static final native long _gtk_separator_new(int orientation);
- public static final long gtk_separator_new(int orientation) {
- lock.lock();
- try {
- return _gtk_separator_new(orientation);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_scrollbar_new(int orientation, long adjustment);
+
+ /* GtkSearchEntry */
+ public static final native long gtk_search_entry_new();
+
+ /* GtkSeparator */
+ /** @param orientation cast=(GtkOrientation) */
+ public static final native long gtk_separator_new(int orientation);
+
// Get function pointer to gtk_status_icon_position_menu
// See os_custom.h
- public static final native long _gtk_status_icon_position_menu_func();
- public static final long gtk_status_icon_position_menu_func() {
- lock.lock();
- try {
- return _gtk_status_icon_position_menu_func();
- } finally {
- lock.unlock();
- }
- }
- /** @return cast=(GtkIconTheme *) */
- public static final native long _gtk_icon_theme_get_default();
- public static final long gtk_icon_theme_get_default() {
- lock.lock();
- try {
- return _gtk_icon_theme_get_default ();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param icon_theme cast=(GtkIconTheme *)
- * @param icon cast=(GIcon *)
- * @param size cast=(gint)
- * @param flags cast=(GtkIconLookupFlags)
- */
- public static final native long _gtk_icon_theme_lookup_by_gicon(long icon_theme, long icon, int size, int flags);
- public static final long gtk_icon_theme_lookup_by_gicon(long icon_theme, long icon, int size, int flags) {
- lock.lock();
- try {
- return _gtk_icon_theme_lookup_by_gicon (icon_theme, icon, size, flags);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param icon_theme cast=(GtkIconTheme *)
- * @param icon_name cast=(const gchar *)
- * @param size cast=(gint)
- * @param flags cast=(GtkIconLookupFlags)
- * @param error cast=(GError **)
- */
- public static final native long _gtk_icon_theme_load_icon(long icon_theme, byte[] icon_name, int size, int flags, long error);
- public static final long gtk_icon_theme_load_icon(long icon_theme, byte[] icon_name, int size, int flags, long error) {
- lock.lock();
- try {
- return _gtk_icon_theme_load_icon (icon_theme, icon_name, size, flags, error);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param icon_info cast=(GtkIconInfo *)
- * @param error cast=(GError **)
- */
- public static final native long _gtk_icon_info_load_icon(long icon_info, long error[]);
- public static final long gtk_icon_info_load_icon(long icon_info, long error[]) {
- lock.lock();
- try {
- return _gtk_icon_info_load_icon(icon_info, error);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkIMContext *)
- * @param event cast=(GdkEventKey *)
- */
- public static final native boolean _gtk_im_context_filter_keypress(long context, long event);
- public static final boolean gtk_im_context_filter_keypress(long context, long event) {
- lock.lock();
- try {
- return _gtk_im_context_filter_keypress(context, event);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_status_icon_position_menu_func();
+
+ /* GtkIMContext */
/** @param context cast=(GtkIMContext *) */
- public static final native void _gtk_im_context_focus_in(long context);
- public static final void gtk_im_context_focus_in(long context) {
- lock.lock();
- try {
- _gtk_im_context_focus_in(context);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_im_context_focus_in(long context);
/** @param context cast=(GtkIMContext *) */
- public static final native void _gtk_im_context_focus_out(long context);
- public static final void gtk_im_context_focus_out(long context) {
- lock.lock();
- try {
- _gtk_im_context_focus_out(context);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_im_context_focus_out(long context);
/**
* @param context cast=(GtkIMContext *)
* @param str cast=(gchar **)
* @param attrs cast=(PangoAttrList **)
* @param cursor_pos cast=(gint *)
*/
- public static final native void _gtk_im_context_get_preedit_string(long context, long [] str, long [] attrs, int[] cursor_pos);
- public static final void gtk_im_context_get_preedit_string(long context, long [] str, long [] attrs, int[] cursor_pos) {
- lock.lock();
- try {
- _gtk_im_context_get_preedit_string(context, str, attrs, cursor_pos);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_im_context_get_type();
- public static final long gtk_im_context_get_type() {
- lock.lock();
- try {
- return _gtk_im_context_get_type();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_im_context_get_preedit_string(long context, long [] str, long [] attrs, int[] cursor_pos);
+ public static final native long gtk_im_context_get_type();
/** @param context cast=(GtkIMContext *) */
- public static final native void _gtk_im_context_reset(long context);
- public static final void gtk_im_context_reset(long context) {
- lock.lock();
- try {
- _gtk_im_context_reset(context);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_im_context_reset(long context);
/**
* @param context cast=(GtkIMContext *)
* @param window cast=(GdkWindow *)
*/
- public static final native void _gtk_im_context_set_client_window(long context, long window);
- public static final void gtk_im_context_set_client_window(long context, long window) {
- lock.lock();
- try {
- _gtk_im_context_set_client_window(context, window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_im_context_set_client_window(long context, long window);
/**
* @param context cast=(GtkIMContext *)
* @param area cast=(GdkRectangle *),flags=no_out
*/
- public static final native void _gtk_im_context_set_cursor_location(long context, GdkRectangle area);
- public static final void gtk_im_context_set_cursor_location(long context, GdkRectangle area) {
- lock.lock();
- try {
- _gtk_im_context_set_cursor_location(context, area);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param context cast=(GtkIMMulticontext *)
- * @param menushell cast=(GtkMenuShell *)
- */
- public static final native void _gtk_im_multicontext_append_menuitems (long context, long menushell);
- public static final void gtk_im_multicontext_append_menuitems (long context, long menushell) {
- lock.lock();
- try {
- _gtk_im_multicontext_append_menuitems(context, menushell);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_im_multicontext_new();
- public static final long gtk_im_multicontext_new() {
- lock.lock();
- try {
- return _gtk_im_multicontext_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_image_new();
- public static final long gtk_image_new() {
- lock.lock();
- try {
- return _gtk_image_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_im_context_set_cursor_location(long context, GdkRectangle area);
+
+ /* GtkIMMulticontext */
+ public static final native long gtk_im_multicontext_new();
+
+ /* GtkImage */
+ public static final native long gtk_image_new();
/**
* @param image cast=(GtkImage *)
* @param pixel_size cast=(gint)
*/
- public static final native void _gtk_image_set_pixel_size(long image, int pixel_size);
- public static final void gtk_image_set_pixel_size(long image, int pixel_size) {
- lock.lock();
- try {
- _gtk_image_set_pixel_size(image, pixel_size);
- } finally {
- lock.unlock();
- }
- }
- /** @param pixbuf cast=(GdkPixbuf *) */
- public static final native long _gtk_image_new_from_pixbuf(long pixbuf);
- public static final long gtk_image_new_from_pixbuf(long pixbuf) {
- lock.lock();
- try {
- return _gtk_image_new_from_pixbuf(pixbuf);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param image cast=(GtkImage *)
- * @param pixbuf cast=(GdkPixbuf *)
- */
- public static final native void _gtk_image_set_from_pixbuf(long image, long pixbuf);
- public static final void gtk_image_set_from_pixbuf(long image, long pixbuf) {
- lock.lock();
- try {
- _gtk_image_set_from_pixbuf(image, pixbuf);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param image cast=(GtkImage *)
- * @param gicon cast=(GIcon *)
- * @param size cast=(GtkIconSize)
- */
- public static final native void _gtk_image_set_from_gicon(long image, long gicon, int size);
- /** [GTK3 only] */
- public static final void gtk_image_set_from_gicon(long image, long gicon, int size) {
- lock.lock();
- try {
- _gtk_image_set_from_gicon(image, gicon, size);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param image cast=(GtkImage *)
- * @param gicon cast=(GIcon *)
- */
- public static final native void _gtk_image_set_from_gicon(long image, long gicon);
- /** [GTK4 only] */
- public static final void gtk_image_set_from_gicon(long image, long gicon) {
- lock.lock();
- try {
- _gtk_image_set_from_gicon(image, gicon);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param icon_name cast=(const gchar *)
- * @param size cast=(GtkIconSize)
- */
- public static final native long _gtk_image_new_from_icon_name (byte[] icon_name, int size);
- /** [GTK3 only] */
- public static final long gtk_image_new_from_icon_name (byte[] icon_name, int size) {
- lock.lock();
- try {
- return _gtk_image_new_from_icon_name (icon_name, size);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param icon_name cast=(const gchar *)
- */
- public static final native long _gtk_image_new_from_icon_name (byte[] icon_name);
- /** [GTK4 only] */
- public static final long gtk_image_new_from_icon_name (byte[] icon_name) {
- lock.lock();
- try {
- return _gtk_image_new_from_icon_name (icon_name);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param image cast=(GtkImage *)
- * @param icon_name cast=(const gchar *)
- * @param size cast=(GtkIconSize)
- */
- public static final native void _gtk_image_set_from_icon_name (long image, byte[] icon_name, int size);
- /** [GTK3 only] */
- public static final void gtk_image_set_from_icon_name (long image, byte[] icon_name, int size) {
- lock.lock();
- try {
- _gtk_image_set_from_icon_name (image, icon_name, size);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param image cast=(GtkImage *)
- * @param icon_name cast=(const gchar *)
- */
- public static final native void _gtk_image_set_from_icon_name (long image, byte[] icon_name);
- /** [GTK4 only] */
- public static final void gtk_image_set_from_icon_name (long image, byte[] icon_name) {
- lock.lock();
- try {
- _gtk_image_set_from_icon_name (image, icon_name);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param argc cast=(int *)
- * @param argv cast=(char ***)
- */
- public static final native boolean _gtk_init_check(long [] argc, long [] argv);
- /** [GTK3 only] */
- public static final boolean gtk_init_check(long [] argc, long [] argv) {
- lock.lock();
- try {
- return _gtk_init_check(argc, argv);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native boolean _gtk_init_check();
- /** [GTK4 only] */
- public static final boolean gtk_init_check() {
- lock.lock();
- try {
- return _gtk_init_check();
- } finally {
- lock.unlock();
- }
- }
- /** @param label cast=(GtkLabel *) */
- public static final native long _gtk_label_get_layout(long label);
- public static final long gtk_label_get_layout(long label) {
- lock.lock();
- try {
- return _gtk_label_get_layout(label);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_label_get_type();
- public static final long gtk_label_get_type() {
- lock.lock();
- try {
- return _gtk_label_get_type();
- } finally {
- lock.unlock();
- }
- }
- /** @param label cast=(GtkLabel *) */
- public static final native int _gtk_label_get_mnemonic_keyval(long label);
- public static final int gtk_label_get_mnemonic_keyval(long label) {
- lock.lock();
- try {
- return _gtk_label_get_mnemonic_keyval(label);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_image_set_pixel_size(long image, int pixel_size);
+
+ /* GtkLabel */
+ public static final native long gtk_label_get_type();
/** @param label cast=(const gchar *) */
- public static final native long _gtk_label_new(byte[] label);
- public static final long gtk_label_new(byte[] label) {
- lock.lock();
- try {
- return _gtk_label_new(label);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_label_new(byte[] label);
/** @param str cast=(const gchar *) */
- public static final native long _gtk_label_new_with_mnemonic(byte[] str);
- public static final long gtk_label_new_with_mnemonic(byte[] str) {
- lock.lock();
- try {
- return _gtk_label_new_with_mnemonic(str);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_label_new_with_mnemonic(byte[] str);
+ /** @param label cast=(GtkLabel *) */
+ public static final native long gtk_label_get_layout(long label);
+ /** @param label cast=(GtkLabel *) */
+ public static final native int gtk_label_get_mnemonic_keyval(long label);
/**
* @param label cast=(GtkLabel *)
* @param attrs cast=(PangoAttrList *)
*/
- public static final native void _gtk_label_set_attributes(long label, long attrs);
- public static final void gtk_label_set_attributes(long label, long attrs) {
- lock.lock();
- try {
- _gtk_label_set_attributes(label, attrs);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_label_set_attributes(long label, long attrs);
/**
* @param label cast=(GtkLabel *)
* @param jtype cast=(GtkJustification)
*/
- public static final native void _gtk_label_set_justify(long label, int jtype);
- public static final void gtk_label_set_justify(long label, int jtype) {
- lock.lock();
- try {
- _gtk_label_set_justify(label, jtype);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param label cast=(GtkLabel *)
- * @param wrap cast=(gboolean)
- */
- public static final native void _gtk_label_set_line_wrap(long label, boolean wrap);
- public static final void gtk_label_set_line_wrap(long label, boolean wrap) {
- lock.lock();
- try {
- _gtk_label_set_line_wrap(label, wrap);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_label_set_justify(long label, int jtype);
/**
* @param label cast=(GtkLabel *)
- * @param wrap_mode cast=(PangoWrapMode)
- */
- public static final native void _gtk_label_set_line_wrap_mode(long label, int wrap_mode);
- public static final void gtk_label_set_line_wrap_mode(long label, int wrap_mode) {
- lock.lock();
- try {
- _gtk_label_set_line_wrap_mode(label, wrap_mode);
- } finally {
- lock.unlock();
- }
- }
+ * @param str cast=(const gchar *)
+ */
+ public static final native void gtk_label_set_text(long label, long str);
/**
* @param label cast=(GtkLabel *)
* @param str cast=(const gchar *)
*/
- public static final native void _gtk_label_set_text(long label, long str);
- public static final void gtk_label_set_text(long label, long str) {
- lock.lock();
- try {
- _gtk_label_set_text(label, str);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_label_set_text(long label, byte[] str);
/**
* @param label cast=(GtkLabel *)
* @param str cast=(const gchar *)
*/
- public static final native void _gtk_label_set_text(long label, byte[] str);
- public static final void gtk_label_set_text(long label, byte[] str) {
- lock.lock();
- try {
- _gtk_label_set_text(label, str);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_label_set_text_with_mnemonic(long label, byte[] str);
/**
* @param label cast=(GtkLabel *)
- * @param str cast=(const gchar *)
+ * @param xalign cast=(gfloat)
+ *
*/
- public static final native void _gtk_label_set_text_with_mnemonic(long label, byte[] str);
- public static final void gtk_label_set_text_with_mnemonic(long label, byte[] str) {
- lock.lock();
- try {
- _gtk_label_set_text_with_mnemonic(label, str);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_label_set_xalign(long label, float xalign);
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param yalign cast=(gfloat)
+ *
+ */
+ public static final native void gtk_label_set_yalign(long label, float yalign);
+
+ /* GtkListStore */
/**
* @param list_store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_list_store_append(long list_store, long iter);
- public static final void gtk_list_store_append(long list_store, long iter) {
- lock.lock();
- try {
- _gtk_list_store_append(list_store, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_append(long list_store, long iter);
/** @param store cast=(GtkListStore *) */
- public static final native void _gtk_list_store_clear(long store);
- public static final void gtk_list_store_clear(long store) {
- lock.lock();
- try {
- _gtk_list_store_clear(store);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_clear(long store);
/**
* @param list_store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
* @param position cast=(gint)
*/
- public static final native void _gtk_list_store_insert(long list_store, long iter, int position);
- public static final void gtk_list_store_insert(long list_store, long iter, int position) {
- lock.lock();
- try {
- _gtk_list_store_insert(list_store, iter, position);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_insert(long list_store, long iter, int position);
/**
* @param numColumns cast=(gint)
* @param types cast=(GType *)
*/
- public static final native long _gtk_list_store_newv(int numColumns, long [] types);
- public static final long gtk_list_store_newv(int numColumns, long [] types) {
- lock.lock();
- try {
- return _gtk_list_store_newv(numColumns, types);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param css_provider cast=(GtkCssProvider *)
- * @param data cast=(const gchar *)
- * @param length cast=(gssize)
- * @param error cast=(GError **)
- */
- public static final native boolean _gtk_css_provider_load_from_data(long css_provider, byte[] data, long length, long error[]);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gtk_css_provider_load_from_data(long css_provider, byte[] data, long length, long error[] ) {
- lock.lock();
- try {
- return _gtk_css_provider_load_from_data(css_provider, data, length, error);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param css_provider cast=(GtkCssProvider *)
- * @param data cast=(const gchar *)
- * @param length cast=(gssize)
- */
- public static final native void _gtk_css_provider_load_from_data(long css_provider, byte[] data, long length);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_css_provider_load_from_data(long css_provider, byte[] data, long length) {
- lock.lock();
- try {
- _gtk_css_provider_load_from_data(css_provider, data, length);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_css_provider_new();
- public static final long gtk_css_provider_new() {
- lock.lock();
- try {
- return _gtk_css_provider_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param provider cast=(GtkCssProvider *)
- */
- public static final native long _gtk_css_provider_to_string(long provider);
- public static final long gtk_css_provider_to_string(long provider) {
- lock.lock();
- try {
- return _gtk_css_provider_to_string(provider);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param name cast=(const gchar *)
- * @param variant cast=(const gchar *)
- */
- public static final native long _gtk_css_provider_get_named (byte[] name, byte[] variant);
- public static final long gtk_css_provider_get_named(byte[] name, byte[] variant) {
- lock.lock();
- try {
- return _gtk_css_provider_get_named(name, variant);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param screen cast=(GdkScreen *)
- * @param provider cast=(GtkStyleProvider *)
- * @param priority cast=(guint)
- */
- public static final native void _gtk_style_context_add_provider_for_screen (long screen, long provider, int priority);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_style_context_add_provider_for_screen(long screen, long provider, int priority) {
- lock.lock();
- try {
- _gtk_style_context_add_provider_for_screen(screen, provider, priority);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param display cast=(GdkDisplay *)
- * @param provider cast=(GtkStyleProvider *)
- * @param priority cast=(guint)
- */
- public static final native void _gtk_style_context_add_provider_for_display (long display, long provider, int priority);
- /** [GTK4 only] */
- public static final void gtk_style_context_add_provider_for_display(long display, long provider, int priority) {
- lock.lock();
- try {
- _gtk_style_context_add_provider_for_display(display, provider, priority);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param provider cast=(GtkStyleProvider *)
- * @param priority cast=(guint)
- */
- public static final native void _gtk_style_context_add_provider (long context, long provider, int priority);
- public static final void gtk_style_context_add_provider(
- long context, long provider, int priority) {
- lock.lock();
- try {
- _gtk_style_context_add_provider(context, provider, priority);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_list_store_newv(int numColumns, long [] types);
/**
* @param list_store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_list_store_remove(long list_store, long iter);
- public static final void gtk_list_store_remove(long list_store, long iter) {
- lock.lock();
- try {
- _gtk_list_store_remove(list_store, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_remove(long list_store, long iter);
/**
* @param store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_list_store_set(long store, long iter, int column, byte[] value, int terminator);
- public static final void gtk_list_store_set(long store, long iter, int column, byte[] value, int terminator) {
- lock.lock();
- try {
- _gtk_list_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_set(long store, long iter, int column, byte[] value, int terminator);
/**
* @param store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_list_store_set(long store, long iter, int column, int value, int terminator);
- public static final void gtk_list_store_set(long store, long iter, int column, int value, int terminator) {
- lock.lock();
- try {
- _gtk_list_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_set(long store, long iter, int column, int value, int terminator);
/**
* @param store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_list_store_set(long store, long iter, int column, long value, int terminator);
- public static final void gtk_list_store_set(long store, long iter, int column, long value, int terminator) {
- lock.lock();
- try {
- _gtk_list_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_set(long store, long iter, int column, long value, int terminator);
/**
* @param store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
* @param value flags=no_out
*/
- public static final native void _gtk_list_store_set(long store, long iter, int column, GdkRGBA value, int terminator);
- public static final void gtk_list_store_set(long store, long iter, int column, GdkRGBA value, int terminator) {
- lock.lock();
- try {
- _gtk_list_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_set(long store, long iter, int column, GdkRGBA value, int terminator);
/**
* @param store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_list_store_set(long store, long iter, int column, boolean value, int terminator);
- public static final void gtk_list_store_set(long store, long iter, int column, boolean value, int terminator) {
- lock.lock();
- try {
- _gtk_list_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
- public static final native int _gtk_get_major_version();
- public static final int gtk_get_major_version() {
- lock.lock();
- try {
- return _gtk_get_major_version();
- } finally {
- lock.unlock();
- }
- }
- public static final native int _gtk_get_minor_version();
- public static final int gtk_get_minor_version() {
- lock.lock();
- try {
- return _gtk_get_minor_version();
- } finally {
- lock.unlock();
- }
- }
- public static final native int _gtk_get_micro_version();
- public static final int gtk_get_micro_version() {
- lock.lock();
- try {
- return _gtk_get_micro_version();
- } finally {
- lock.unlock();
- }
- }
- public static final native void _gtk_main();
- public static final void gtk_main() {
- lock.lock();
- try {
- _gtk_main();
- } finally {
- lock.unlock();
- }
- }
- /** @param event cast=(GdkEvent *) */
- public static final native void _gtk_main_do_event(long event);
- public static final void gtk_main_do_event(long event) {
- lock.lock();
- try {
- _gtk_main_do_event(event);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_menu_bar_new();
- public static final long gtk_menu_bar_new() {
- lock.lock();
- try {
- return _gtk_menu_bar_new();
- } finally {
- lock.unlock();
- }
- }
- /** @param menu_item cast=(GtkMenuItem *) */
- public static final native long _gtk_menu_item_get_submenu(long menu_item);
- public static final long gtk_menu_item_get_submenu(long menu_item) {
- lock.lock();
- try {
- return _gtk_menu_item_get_submenu(menu_item);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_menu_item_new();
- public static final long gtk_menu_item_new() {
- lock.lock();
- try {
- return _gtk_menu_item_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param menu_item cast=(GtkMenuItem *)
- * @param submenu cast=(GtkWidget *)
- */
- public static final native void _gtk_menu_item_set_submenu(long menu_item, long submenu);
- public static final void gtk_menu_item_set_submenu(long menu_item, long submenu) {
- lock.lock();
- try {
- _gtk_menu_item_set_submenu(menu_item, submenu);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_menu_new();
- public static final long gtk_menu_new() {
- lock.lock();
- try {
- return _gtk_menu_new();
- } finally {
- lock.unlock();
- }
- }
- /** @param menu cast=(GtkMenu *) */
- public static final native void _gtk_menu_popdown(long menu);
- public static final void gtk_menu_popdown(long menu) {
- lock.lock();
- try {
- _gtk_menu_popdown(menu);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_list_store_set(long store, long iter, int column, boolean value, int terminator);
/**
- * @method flags=dynamic
- * @param menu cast=(GtkMenu *)
- * @param parent_menu_shell cast=(GtkWidget *)
- * @param parent_menu_item cast=(GtkWidget *)
- * @param func cast=(GtkMenuPositionFunc)
- * @param data cast=(gpointer)
- * @param button cast=(guint)
- * @param activate_time cast=(guint32)
- */
- public static final native void _gtk_menu_popup(long menu, long parent_menu_shell, long parent_menu_item, long func, long data, int button, int activate_time);
- /** [GTK2/GTK3; 3.22 deprecated, replaced] */
- public static final void gtk_menu_popup(long menu, long parent_menu_shell, long parent_menu_item, long func, long data, int button, int activate_time) {
- lock.lock();
- try {
- _gtk_menu_popup(menu, parent_menu_shell, parent_menu_item, func, data, button, activate_time);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_menu_popup_at_pointer(long menu, long trigger_event);
- public static void gtk_menu_popup_at_pointer(long menu, long trigger_event) {
- lock.lock();
- try {
- _gtk_menu_popup_at_pointer(menu, trigger_event);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_menu_popup_at_rect(long menu, long rect_window, GdkRectangle rect, int rect_anchor, int menu_anchor, long trigger_event);
- public static void gtk_menu_popup_at_rect(long menu, long rect_window, GdkRectangle rect, int rect_anchor, int menu_anchor, long trigger_event) {
- lock.lock();
- try {
- _gtk_menu_popup_at_rect(menu, rect_window, rect, rect_anchor, menu_anchor, trigger_event);
- } finally {
- lock.unlock();
- }
- }
- /** @param menu_shell cast=(GtkMenuShell *) */
- public static final native void _gtk_menu_shell_deactivate(long menu_shell);
- public static final void gtk_menu_shell_deactivate(long menu_shell) {
- lock.lock();
- try {
- _gtk_menu_shell_deactivate(menu_shell);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param menu_shell cast=(GtkMenuShell *)
- * @param child cast=(GtkWidget *)
- * @param position cast=(gint)
+ * @param store cast=(GtkListStore *)
+ * @param iter cast=(GtkTreeIter *)
+ * @param value cast=(GValue *)
+ */
+ public static final native void gtk_list_store_set_value(long store, long iter, int column, long value);
+
+ /* GtkCssProvider */
+ public static final native long gtk_css_provider_new();
+ /** @param provider cast=(GtkCssProvider *) */
+ public static final native long gtk_css_provider_to_string(long provider);
+
+ /* GtkStyleContext */
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param provider cast=(GtkStyleProvider *)
+ * @param priority cast=(guint)
+ */
+ public static final native void gtk_style_context_add_provider(long context, long provider, int priority);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param class_name cast=(const gchar *)
+ */
+ public static final native void gtk_style_context_add_class(long context, byte[] class_name);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param class_name cast=(const gchar *)
+ */
+ public static final native void gtk_style_context_remove_class(long context, byte[] class_name);
+ /** @param self cast=(GtkStyleContext *) */
+ public static final native void gtk_style_context_save(long self);
+ /** @param self cast=(GtkStyleContext *) */
+ public static final native void gtk_style_context_restore(long self);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param flags cast=(GtkStateFlags)
+ */
+ public static final native void gtk_style_context_set_state(long context, long flags);
+
+ /* GtkPopover */
+ /** @param popover cast=(GtkPopover *) */
+ public static final native void gtk_popover_popdown(long popover);
+ /** @param popover cast=(GtkPopover *) */
+ public static final native void gtk_popover_popup(long popover);
+ /**
+ * @param popover cast=(GtkPopover *)
+ * @param position cast=(GtkPositionType)
+ */
+ public static final native void gtk_popover_set_position(long popover, int position);
+
+ /**
+ * @param popover cast=(GtkPopover *)
+ * @param rect cast=(const GdkRectangle *)
*/
- public static final native void _gtk_menu_shell_insert(long menu_shell, long child, int position);
- public static final void gtk_menu_shell_insert(long menu_shell, long child, int position) {
- lock.lock();
- try {
- _gtk_menu_shell_insert(menu_shell, child, position);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param menu_shell cast=(GtkMenuShell *)
- * @param take_focus cast=(gboolean)
- */
- public static final native void _gtk_menu_shell_set_take_focus(long menu_shell, boolean take_focus);
- public static final void gtk_menu_shell_set_take_focus(long menu_shell, boolean take_focus) {
- lock.lock();
- try {
- _gtk_menu_shell_set_take_focus(menu_shell, take_focus);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param icon_widget cast=(GtkWidget *)
- * @param label cast=(const gchar *)
- */
- public static final native long _gtk_menu_tool_button_new(long icon_widget, byte[] label);
- public static final long gtk_menu_tool_button_new(long icon_widget, byte[] label) {
- lock.lock();
- try {
- return _gtk_menu_tool_button_new(icon_widget, label);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_popover_set_pointing_to(long popover, GdkRectangle rect);
+
+ /* GtkMenuButton */
+ public static final native long gtk_menu_button_new();
+
+ /* GtkMessageDialog */
/**
* @param parent cast=(GtkWindow *)
* @param flags cast=(GtkDialogFlags)
@@ -4330,493 +1076,163 @@ public class GTK extends OS {
* @param message_format cast=(const gchar *)
* @param arg cast=(const gchar *)
*/
- public static final native long _gtk_message_dialog_new(long parent, int flags, int type, int buttons, byte[] message_format, byte[] arg);
- public static final long gtk_message_dialog_new(long parent, int flags, int type, int buttons, byte[] message_format, byte[] arg) {
- lock.lock();
- try {
- return _gtk_message_dialog_new(parent, flags, type, buttons, message_format, arg);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_message_dialog_new(long parent, int flags, int type, int buttons, byte[] message_format, byte[] arg);
/**
- * @method flags=dynamic
- * @param misc cast=(GtkMisc *)
- * @param xalign cast=(gfloat)
- * @param yalign cast=(gfloat)
- */
- public static final native void _gtk_misc_set_alignment(long misc, float xalign, float yalign);
- /** [GTK3 only, if-def'd in os.h; 3.14 deprecated, replaced] */
- public static final void gtk_misc_set_alignment(long misc, float xalign, float yalign) {
- lock.lock();
- try {
- _gtk_misc_set_alignment(misc, xalign, yalign);
- } finally {
- lock.unlock();
- }
- }
+ * @param message_dialog cast=(GtkMessageDialog *)
+ * @param message_format cast=(const gchar *)
+ * @param arg cast=(const gchar *)
+ */
+ public static final native void gtk_message_dialog_format_secondary_text(long message_dialog, byte[] message_format, byte[] arg);
+
+ /* GtkNativeDialog */
/** @param dialog cast=(GtkNativeDialog *) */
- public static final native int _gtk_native_dialog_run(long dialog);
- public static final int gtk_native_dialog_run(long dialog) {
- lock.lock();
- try {
- return _gtk_native_dialog_run(dialog);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_native_dialog_show(long dialog);
+
+ /* GtkNotebook */
+ public static final native long gtk_notebook_new();
/** @param notebook cast=(GtkNotebook *) */
- public static final native int _gtk_notebook_get_current_page(long notebook);
- public static final int gtk_notebook_get_current_page(long notebook) {
- lock.lock();
- try {
- return _gtk_notebook_get_current_page(notebook);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_notebook_get_n_pages(long notebook);
/** @param notebook cast=(GtkNotebook *) */
- public static final native boolean _gtk_notebook_get_scrollable(long notebook);
- public static final boolean gtk_notebook_get_scrollable(long notebook) {
- lock.lock();
- try {
- return _gtk_notebook_get_scrollable(notebook);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_notebook_get_current_page(long notebook);
/**
* @param notebook cast=(GtkNotebook *)
- * @param child cast=(GtkWidget *)
- * @param tab_label cast=(GtkWidget *)
- * @param position cast=(gint)
+ * @param page_num cast=(gint)
*/
- public static final native void _gtk_notebook_insert_page(long notebook, long child, long tab_label, int position);
- public static final void gtk_notebook_insert_page(long notebook, long child, long tab_label, int position) {
- lock.lock();
- try {
- _gtk_notebook_insert_page(notebook, child, tab_label, position);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_notebook_new();
- public static final long gtk_notebook_new() {
- lock.lock();
- try {
- return _gtk_notebook_new();
- } finally {
- lock.unlock();
- }
- }
- /** @param notebook cast=(GtkNotebook *) */
- public static final native void _gtk_notebook_next_page(long notebook);
- public static final void gtk_notebook_next_page(long notebook) {
- lock.lock();
- try {
- _gtk_notebook_next_page(notebook);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_notebook_set_current_page(long notebook, int page_num);
/** @param notebook cast=(GtkNotebook *) */
- public static final native void _gtk_notebook_prev_page(long notebook);
- public static final void gtk_notebook_prev_page(long notebook) {
- lock.lock();
- try {
- _gtk_notebook_prev_page(notebook);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_notebook_get_scrollable(long notebook);
/**
* @param notebook cast=(GtkNotebook *)
- * @param page_num cast=(gint)
+ * @param scrollable cast=(gboolean)
*/
- public static final native void _gtk_notebook_remove_page(long notebook, int page_num);
- public static final void gtk_notebook_remove_page(long notebook, int page_num) {
- lock.lock();
- try {
- _gtk_notebook_remove_page(notebook, page_num);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_notebook_set_scrollable(long notebook, boolean scrollable);
/**
* @param notebook cast=(GtkNotebook *)
- * @param page_num cast=(gint)
+ * @param child cast=(GtkWidget *)
+ * @param tab_label cast=(GtkWidget *)
+ * @param position cast=(gint)
*/
- public static final native void _gtk_notebook_set_current_page(long notebook, int page_num);
- public static final void gtk_notebook_set_current_page(long notebook, int page_num) {
- lock.lock();
- try {
- _gtk_notebook_set_current_page(notebook, page_num);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_notebook_insert_page(long notebook, long child, long tab_label, int position);
/**
* @param notebook cast=(GtkNotebook *)
- * @param scrollable cast=(gboolean)
+ * @param page_num cast=(gint)
*/
- public static final native void _gtk_notebook_set_scrollable(long notebook, boolean scrollable);
- public static final void gtk_notebook_set_scrollable(long notebook, boolean scrollable) {
- lock.lock();
- try {
- _gtk_notebook_set_scrollable(notebook, scrollable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_notebook_remove_page(long notebook, int page_num);
+ /** @param notebook cast=(GtkNotebook *) */
+ public static final native void gtk_notebook_next_page(long notebook);
+ /** @param notebook cast=(GtkNotebook *) */
+ public static final native void gtk_notebook_prev_page(long notebook);
/**
* @param notebook cast=(GtkNotebook *)
* @param show_tabs cast=(gboolean)
*/
- public static final native void _gtk_notebook_set_show_tabs(long notebook, boolean show_tabs);
- public static final void gtk_notebook_set_show_tabs(long notebook, boolean show_tabs) {
- lock.lock();
- try {
- _gtk_notebook_set_show_tabs(notebook, show_tabs);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_notebook_set_show_tabs(long notebook, boolean show_tabs);
/**
* @param notebook cast=(GtkNotebook *)
* @param pos cast=(GtkPositionType)
*/
- public static final native void _gtk_notebook_set_tab_pos(long notebook, int pos);
- public static final void gtk_notebook_set_tab_pos(long notebook, int pos) {
- lock.lock();
- try {
- _gtk_notebook_set_tab_pos(notebook, pos);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_notebook_set_tab_pos(long notebook, int pos);
+
+ /* GtkOrientable Interface */
/**
* @param orientable cast=(GtkOrientable *)
* @param orientation cast=(GtkOrientation)
*/
- public static final native void _gtk_orientable_set_orientation(long orientable, int orientation);
- public static final void gtk_orientable_set_orientation(long orientable, int orientation) {
- lock.lock();
- try {
- _gtk_orientable_set_orientation(orientable, orientation);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_page_setup_new ();
- public static final long gtk_page_setup_new () {
- lock.lock();
- try {
- return _gtk_page_setup_new ();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param setup cast=(GtkPageSetup *)
- */
- public static final native int _gtk_page_setup_get_orientation(long setup);
- public static final int gtk_page_setup_get_orientation(long setup) {
- lock.lock();
- try {
- return _gtk_page_setup_get_orientation(setup);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_orientable_set_orientation(long orientable, int orientation);
+
+ /* GtkPageSetup */
+ public static final native long gtk_page_setup_new();
+ /** @param setup cast=(GtkPageSetup *) */
+ public static final native int gtk_page_setup_get_orientation(long setup);
/**
* @param setup cast=(GtkPageSetup *)
* @param orientation cast=(GtkPageOrientation)
*/
- public static final native void _gtk_page_setup_set_orientation(long setup, int orientation);
- public static final void gtk_page_setup_set_orientation(long setup, int orientation) {
- lock.lock();
- try {
- _gtk_page_setup_set_orientation(setup, orientation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param setup cast=(GtkPageSetup *)
- */
- public static final native long _gtk_page_setup_get_paper_size(long setup);
- public static final long gtk_page_setup_get_paper_size(long setup) {
- lock.lock();
- try {
- return _gtk_page_setup_get_paper_size(setup);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_page_setup_set_orientation(long setup, int orientation);
+ /** @param setup cast=(GtkPageSetup *) */
+ public static final native long gtk_page_setup_get_paper_size(long setup);
/**
* @param setup cast=(GtkPageSetup *)
* @param size cast=(GtkPaperSize *)
*/
- public static final native void _gtk_page_setup_set_paper_size(long setup, long size);
- public static final void gtk_page_setup_set_paper_size(long setup, long size) {
- lock.lock();
- try {
- _gtk_page_setup_set_paper_size(setup, size);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_page_setup_set_paper_size(long setup, long size);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_page_setup_get_top_margin(long setup, int unit);
- public static final double gtk_page_setup_get_top_margin(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_top_margin(setup, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_top_margin(long setup, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param margin cast=(gdouble)
* @param unit cast=(GtkUnit)
*/
- public static final native void _gtk_page_setup_set_top_margin(long setup, double margin, int unit);
- public static final void gtk_page_setup_set_top_margin(long setup, double margin, int unit) {
- lock.lock();
- try {
- _gtk_page_setup_set_top_margin(setup, margin, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_page_setup_set_top_margin(long setup, double margin, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
- *
*/
- public static final native double _gtk_page_setup_get_bottom_margin(long setup, int unit);
- public static final double gtk_page_setup_get_bottom_margin(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_bottom_margin(setup, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_bottom_margin(long setup, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param margin cast=(gdouble)
* @param unit cast=(GtkUnit)
*/
- public static final native void _gtk_page_setup_set_bottom_margin(long setup, double margin, int unit);
- public static final void gtk_page_setup_set_bottom_margin(long setup, double margin, int unit) {
- lock.lock();
- try {
- _gtk_page_setup_set_bottom_margin(setup, margin, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_page_setup_set_bottom_margin(long setup, double margin, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_page_setup_get_left_margin(long setup, int unit);
- public static final double gtk_page_setup_get_left_margin(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_left_margin(setup, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_left_margin(long setup, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param margin cast=(gdouble)
* @param unit cast=(GtkUnit)
*/
- public static final native void _gtk_page_setup_set_left_margin(long setup, double margin, int unit);
- public static final void gtk_page_setup_set_left_margin(long setup, double margin, int unit) {
- lock.lock();
- try {
- _gtk_page_setup_set_left_margin(setup, margin, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_page_setup_set_left_margin(long setup, double margin, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_page_setup_get_right_margin(long setup, int unit);
- public static final double gtk_page_setup_get_right_margin(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_right_margin(setup, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_right_margin(long setup, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param margin cast=(gdouble)
* @param unit cast=(GtkUnit)
*/
- public static final native void _gtk_page_setup_set_right_margin(long setup, double margin, int unit);
- public static final void gtk_page_setup_set_right_margin(long setup, double margin, int unit) {
- lock.lock();
- try {
- _gtk_page_setup_set_right_margin(setup, margin, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_page_setup_set_right_margin(long setup, double margin, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_page_setup_get_paper_width(long setup, int unit);
- public static final double gtk_page_setup_get_paper_width(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_paper_width(setup, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_paper_width(long setup, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_page_setup_get_paper_height(long setup, int unit);
- public static final double gtk_page_setup_get_paper_height(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_paper_height(setup, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_paper_height(long setup, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_page_setup_get_page_width(long setup, int unit);
- public static final double gtk_page_setup_get_page_width(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_page_width(setup, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_page_width(long setup, int unit);
/**
* @param setup cast=(GtkPageSetup *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_page_setup_get_page_height(long setup, int unit);
- public static final double gtk_page_setup_get_page_height(long setup, int unit) {
- lock.lock();
- try {
- return _gtk_page_setup_get_page_height(setup, unit);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param cr cast=(cairo_t *)
- * @param x cast=(gdouble)
- * @param y cast=(gdouble)
- * @param width cast=(gdouble)
- * @param height cast=(gdouble)
- */
- public static final native void _gtk_render_frame(long context, long cr, double x , double y, double width, double height);
- public static final void gtk_render_frame(long context, long cr, double x , double y, double width, double height) {
- lock.lock();
- try {
- _gtk_render_frame(context, cr, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param cr cast=(cairo_t *)
- * @param x cast=(gdouble)
- * @param y cast=(gdouble)
- * @param width cast=(gdouble)
- * @param height cast=(gdouble)
- */
- public static final native void _gtk_render_background(long context, long cr, double x , double y, double width, double height);
- public static final void gtk_render_background(long context, long cr, double x , double y, double width, double height) {
- lock.lock();
- try {
- _gtk_render_background(context, cr, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param cr cast=(cairo_t *)
- * @param x cast=(gdouble)
- * @param y cast=(gdouble)
- * @param width cast=(gdouble)
- * @param height cast=(gdouble)
- */
- public static final native void _gtk_render_focus(long context, long cr, double x , double y, double width, double height);
- public static final void gtk_render_focus(long context, long cr, double x , double y, double width, double height) {
- lock.lock();
- try {
- _gtk_render_focus(context, cr, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param size cast=(GtkPaperSize *)
- */
- public static final native void _gtk_paper_size_free(long size);
- public static final void gtk_paper_size_free(long size) {
- lock.lock();
- try {
- _gtk_paper_size_free(size);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param name cast=(const gchar *)
- */
- public static final native long _gtk_paper_size_new(byte [] name);
- public static final long gtk_paper_size_new(byte [] name) {
- lock.lock();
- try {
- return _gtk_paper_size_new(name);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_page_setup_get_page_height(long setup, int unit);
+
+ /* GtkPaperSize */
+ /** @param size cast=(GtkPaperSize *) */
+ public static final native void gtk_paper_size_free(long size);
+ /** @param name cast=(const gchar *) */
+ public static final native long gtk_paper_size_new(byte [] name);
/**
* @param ppd_name cast=(const gchar *)
* @param ppd_display_name cast=(const gchar *)
* @param width cast=(gdouble)
* @param height cast=(gdouble)
*/
- public static final native long _gtk_paper_size_new_from_ppd(byte [] ppd_name, byte [] ppd_display_name, double width, double height);
- public static final long gtk_paper_size_new_from_ppd(byte [] ppd_name, byte [] ppd_display_name, double width, double height) {
- lock.lock();
- try {
- return _gtk_paper_size_new_from_ppd(ppd_name, ppd_display_name, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_paper_size_new_from_ppd(byte [] ppd_name, byte [] ppd_display_name, double width, double height);
/**
* @param name cast=(const gchar *)
* @param display_name cast=(const gchar *)
@@ -4824,1789 +1240,398 @@ public class GTK extends OS {
* @param height cast=(gdouble)
* @param unit cast=(GtkUnit)
*/
- public static final native long _gtk_paper_size_new_custom(byte [] name, byte [] display_name, double width, double height, int unit);
- public static final long gtk_paper_size_new_custom(byte [] name, byte [] display_name, double width, double height, int unit) {
- lock.lock();
- try {
- return _gtk_paper_size_new_custom(name, display_name, width, height, unit);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param size cast=(GtkPaperSize *)
- */
- public static final native long _gtk_paper_size_get_name(long size);
- public static final long gtk_paper_size_get_name(long size) {
- lock.lock();
- try {
- return _gtk_paper_size_get_name(size);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param size cast=(GtkPaperSize *)
- */
- public static final native long _gtk_paper_size_get_display_name(long size);
- public static final long gtk_paper_size_get_display_name(long size) {
- lock.lock();
- try {
- return _gtk_paper_size_get_display_name(size);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param size cast=(GtkPaperSize *)
- */
- public static final native long _gtk_paper_size_get_ppd_name(long size);
- public static final long gtk_paper_size_get_ppd_name(long size) {
- lock.lock();
- try {
- return _gtk_paper_size_get_ppd_name(size);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_paper_size_new_custom(byte [] name, byte [] display_name, double width, double height, int unit);
+ /** @param size cast=(GtkPaperSize *) */
+ public static final native long gtk_paper_size_get_name(long size);
+ /** @param size cast=(GtkPaperSize *) */
+ public static final native long gtk_paper_size_get_display_name(long size);
+ /** @param size cast=(GtkPaperSize *) */
+ public static final native long gtk_paper_size_get_ppd_name(long size);
/**
* @param size cast=(GtkPaperSize *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_paper_size_get_width(long size, int unit);
- public static final double gtk_paper_size_get_width(long size, int unit) {
- lock.lock();
- try {
- return _gtk_paper_size_get_width(size, unit);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_paper_size_get_width(long size, int unit);
/**
* @param size cast=(GtkPaperSize *)
* @param unit cast=(GtkUnit)
*/
- public static final native double _gtk_paper_size_get_height(long size, int unit);
- public static final double gtk_paper_size_get_height(long size, int unit) {
- lock.lock();
- try {
- return _gtk_paper_size_get_height(size, unit);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param size cast=(GtkPaperSize *)
- */
- public static final native boolean _gtk_paper_size_is_custom(long size);
- public static final boolean gtk_paper_size_is_custom(long size) {
- lock.lock();
- try {
- return _gtk_paper_size_is_custom(size);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_plug_new(long socket_id);
- public static final long gtk_plug_new(long socket_id) {
- lock.lock();
- try {
- return _gtk_plug_new(socket_id);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param printer cast=(GtkPrinter *)
- */
- public static final native long _gtk_printer_get_backend(long printer);
- public static final long gtk_printer_get_backend(long printer) {
- lock.lock();
- try {
- return _gtk_printer_get_backend(printer);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param printer cast=(GtkPrinter *)
- */
- public static final native long _gtk_printer_get_name(long printer);
- public static final long gtk_printer_get_name(long printer) {
- lock.lock();
- try {
- return _gtk_printer_get_name(printer);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param printer cast=(GtkPrinter *)
- */
- public static final native boolean _gtk_printer_is_default(long printer);
- public static final boolean gtk_printer_is_default(long printer) {
- lock.lock();
- try {
- return _gtk_printer_is_default(printer);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param func cast=(GtkPrinterFunc)
- * @param data cast=(gpointer)
- * @param destroy cast=(GDestroyNotify)
- * @param wait cast=(gboolean)
- */
- public static final native void _gtk_enumerate_printers(long func, long data, long destroy, boolean wait);
- public static final void gtk_enumerate_printers(long func, long data, long destroy, boolean wait) {
- lock.lock();
- try {
- _gtk_enumerate_printers(func, data, destroy, wait);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_paper_size_get_height(long size, int unit);
+ /** @param size cast=(GtkPaperSize *) */
+ public static final native boolean gtk_paper_size_is_custom(long size);
+
+ /* GtkPrinter */
+ /** @param printer cast=(GtkPrinter *) */
+ public static final native long gtk_printer_get_backend(long printer);
+ /** @param printer cast=(GtkPrinter *) */
+ public static final native long gtk_printer_get_name(long printer);
+ /** @param printer cast=(GtkPrinter *) */
+ public static final native boolean gtk_printer_is_default(long printer);
+
+ /* GtkPrintJob */
/**
* @param title cast=(const gchar *)
* @param printer cast=(GtkPrinter *)
* @param settings cast=(GtkPrintSettings *)
* @param page_setup cast=(GtkPageSetup *)
*/
- public static final native long _gtk_print_job_new(byte[] title, long printer, long settings, long page_setup);
- public static final long gtk_print_job_new(byte[] title, long printer, long settings, long page_setup) {
- lock.lock();
- try {
- return _gtk_print_job_new(title, printer, settings, page_setup);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_print_job_new(byte[] title, long printer, long settings, long page_setup);
/**
* @param job cast=(GtkPrintJob *)
* @param error cast=(GError **)
*/
- public static final native long _gtk_print_job_get_surface(long job, long error[]);
- public static final long gtk_print_job_get_surface(long job, long error[]) {
- lock.lock();
- try {
- return _gtk_print_job_get_surface(job, error);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_print_job_get_surface(long job, long error[]);
/**
* @param job cast=(GtkPrintJob *)
* @param callback cast=(GtkPrintJobCompleteFunc)
* @param user_data cast=(gpointer)
* @param dnotify cast=(GDestroyNotify)
*/
- public static final native void _gtk_print_job_send(long job, long callback, long user_data, long dnotify);
- public static final void gtk_print_job_send(long job, long callback, long user_data, long dnotify) {
- lock.lock();
- try {
- _gtk_print_job_send(job, callback, user_data, dnotify);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_print_settings_new();
- public static final long gtk_print_settings_new() {
- lock.lock();
- try {
- return _gtk_print_settings_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_job_send(long job, long callback, long user_data, long dnotify);
+
+ /* GtkPrintSettings */
+ public static final native long gtk_print_settings_new();
/**
* @param settings cast=(GtkPrintSettings *)
* @param func cast=(GtkPrintSettingsFunc)
* @param data cast=(gpointer)
*/
- public static final native void _gtk_print_settings_foreach(long settings, long func, long data);
- public static final void gtk_print_settings_foreach(long settings, long func, long data) {
- lock.lock();
- try {
- _gtk_print_settings_foreach(settings, func, data);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_foreach(long settings, long func, long data);
/**
* @param settings cast=(GtkPrintSettings *)
* @param key cast=(const gchar *)
*/
- public static final native long _gtk_print_settings_get(long settings, byte [] key);
- public static final long gtk_print_settings_get(long settings, byte [] key) {
- lock.lock();
- try {
- return _gtk_print_settings_get(settings, key);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_print_settings_get(long settings, byte [] key);
/**
* @param settings cast=(GtkPrintSettings *)
* @param key cast=(const gchar *)
* @param value cast=(const gchar *)
*/
- public static final native void _gtk_print_settings_set(long settings, byte [] key, byte [] value);
- public static final void gtk_print_settings_set(long settings, byte [] key, byte [] value) {
- lock.lock();
- try {
- _gtk_print_settings_set(settings, key, value);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set(long settings, byte [] key, byte [] value);
/**
* @param settings cast=(GtkPrintSettings *)
* @param printer cast=(const gchar *)
*/
- public static final native void _gtk_print_settings_set_printer(long settings, byte[] printer);
- public static final void gtk_print_settings_set_printer(long settings, byte[] printer) {
- lock.lock();
- try {
- _gtk_print_settings_set_printer(settings, printer);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set_printer(long settings, byte[] printer);
/**
* @param settings cast=(GtkPrintSettings *)
* @param orientation cast=(GtkPageOrientation)
*/
- public static final native void _gtk_print_settings_set_orientation(long settings, int orientation);
- public static final void gtk_print_settings_set_orientation(long settings, int orientation) {
- lock.lock();
- try {
- _gtk_print_settings_set_orientation(settings, orientation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param settings cast=(GtkPrintSettings *)
- */
- public static final native boolean _gtk_print_settings_get_collate(long settings);
- public static final boolean gtk_print_settings_get_collate(long settings) {
- lock.lock();
- try {
- return _gtk_print_settings_get_collate(settings);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set_orientation(long settings, int orientation);
+ /** @param settings cast=(GtkPrintSettings *) */
+ public static final native boolean gtk_print_settings_get_collate(long settings);
/**
* @param settings cast=(GtkPrintSettings *)
* @param collate cast=(gboolean)
*/
- public static final native void _gtk_print_settings_set_collate(long settings, boolean collate);
- public static final void gtk_print_settings_set_collate(long settings, boolean collate) {
- lock.lock();
- try {
- _gtk_print_settings_set_collate(settings, collate);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param settings cast=(GtkPrintSettings *)
- */
- public static final native int _gtk_print_settings_get_duplex(long settings);
- public static final int gtk_print_settings_get_duplex(long settings) {
- lock.lock();
- try {
- return _gtk_print_settings_get_duplex(settings);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set_collate(long settings, boolean collate);
+ /** @param settings cast=(GtkPrintSettings *) */
+ public static final native int gtk_print_settings_get_duplex(long settings);
/**
* @param settings cast=(GtkPrintSettings *)
* @param duplex cast=(GtkPrintDuplex)
*/
- public static final native void _gtk_print_settings_set_duplex(long settings, int duplex);
- public static final void gtk_print_settings_set_duplex(long settings, int duplex) {
- lock.lock();
- try {
- _gtk_print_settings_set_duplex(settings, duplex);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param settings cast=(GtkPrintSettings *)
- */
- public static final native int _gtk_print_settings_get_n_copies(long settings);
- public static final int gtk_print_settings_get_n_copies(long settings) {
- lock.lock();
- try {
- return _gtk_print_settings_get_n_copies(settings);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set_duplex(long settings, int duplex);
+ /** @param settings cast=(GtkPrintSettings *) */
+ public static final native int gtk_print_settings_get_n_copies(long settings);
/**
* @param settings cast=(GtkPrintSettings *)
* @param num_copies cast=(gint)
*/
- public static final native void _gtk_print_settings_set_n_copies(long settings, int num_copies);
- public static final void gtk_print_settings_set_n_copies(long settings, int num_copies) {
- lock.lock();
- try {
- _gtk_print_settings_set_n_copies(settings, num_copies);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param settings cast=(GtkPrintSettings *)
- */
- public static final native int _gtk_print_settings_get_print_pages(long settings);
- public static final int gtk_print_settings_get_print_pages(long settings) {
- lock.lock();
- try {
- return _gtk_print_settings_get_print_pages(settings);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set_n_copies(long settings, int num_copies);
+ /** @param settings cast=(GtkPrintSettings *) */
+ public static final native int gtk_print_settings_get_print_pages(long settings);
/**
* @param settings cast=(GtkPrintSettings *)
* @param pages cast=(GtkPrintPages)
*/
- public static final native void _gtk_print_settings_set_print_pages(long settings, int pages);
- public static final void gtk_print_settings_set_print_pages(long settings, int pages) {
- lock.lock();
- try {
- _gtk_print_settings_set_print_pages(settings, pages);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set_print_pages(long settings, int pages);
/**
* @param settings cast=(GtkPrintSettings *)
* @param num_ranges cast=(gint *)
*/
- public static final native long _gtk_print_settings_get_page_ranges(long settings, int[] num_ranges);
- public static final long gtk_print_settings_get_page_ranges(long settings, int[] num_ranges) {
- lock.lock();
- try {
- return _gtk_print_settings_get_page_ranges(settings, num_ranges);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_print_settings_get_page_ranges(long settings, int[] num_ranges);
/**
* @param settings cast=(GtkPrintSettings *)
* @param page_ranges cast=(GtkPageRange *)
* @param num_ranges cast=(gint)
*/
- public static final native void _gtk_print_settings_set_page_ranges(long settings, int[] page_ranges, int num_ranges);
- public static final void gtk_print_settings_set_page_ranges(long settings, int[] page_ranges, int num_ranges) {
- lock.lock();
- try {
- _gtk_print_settings_set_page_ranges(settings, page_ranges, num_ranges);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param settings cast=(GtkPrintSettings *)
- */
- public static final native int _gtk_print_settings_get_resolution(long settings);
- public static final int gtk_print_settings_get_resolution(long settings) {
- lock.lock();
- try {
- return _gtk_print_settings_get_resolution(settings);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_settings_set_page_ranges(long settings, int[] page_ranges, int num_ranges);
+ /** @param settings cast=(GtkPrintSettings *) */
+ public static final native int gtk_print_settings_get_resolution(long settings);
+
+ /* GtkPrintUnixDialog */
/**
* @param title cast=(const gchar *)
* @param parent cast=(GtkWindow *)
*/
- public static final native long _gtk_print_unix_dialog_new(byte[] title, long parent);
- public static final long gtk_print_unix_dialog_new(byte[] title, long parent) {
- lock.lock();
- try {
- return _gtk_print_unix_dialog_new(title, parent);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_print_unix_dialog_new(byte[] title, long parent);
/**
* @param dialog cast=(GtkPrintUnixDialog *)
* @param embed cast=(gboolean)
*/
- public static final native void _gtk_print_unix_dialog_set_embed_page_setup(long dialog, boolean embed);
- public static final void gtk_print_unix_dialog_set_embed_page_setup(long dialog, boolean embed) {
- lock.lock();
- try {
- _gtk_print_unix_dialog_set_embed_page_setup(dialog, embed);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_unix_dialog_set_embed_page_setup(long dialog, boolean embed);
/**
* @param dialog cast=(GtkPrintUnixDialog *)
* @param page_setup cast=(GtkPageSetup *)
*/
- public static final native void _gtk_print_unix_dialog_set_page_setup(long dialog, long page_setup);
- public static final void gtk_print_unix_dialog_set_page_setup(long dialog, long page_setup) {
- lock.lock();
- try {
- _gtk_print_unix_dialog_set_page_setup(dialog, page_setup);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param dialog cast=(GtkPrintUnixDialog *)
- */
- public static final native long _gtk_print_unix_dialog_get_page_setup(long dialog);
- public static final long gtk_print_unix_dialog_get_page_setup(long dialog) {
- lock.lock();
- try {
- return _gtk_print_unix_dialog_get_page_setup(dialog);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_unix_dialog_set_page_setup(long dialog, long page_setup);
+ /** @param dialog cast=(GtkPrintUnixDialog *) */
+ public static final native long gtk_print_unix_dialog_get_page_setup(long dialog);
/**
* @param dialog cast=(GtkPrintUnixDialog *)
* @param current_page cast=(gint)
*/
- public static final native void _gtk_print_unix_dialog_set_current_page(long dialog, int current_page);
- public static final void gtk_print_unix_dialog_set_current_page(long dialog, int current_page) {
- lock.lock();
- try {
- _gtk_print_unix_dialog_set_current_page(dialog, current_page);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param dialog cast=(GtkPrintUnixDialog *)
- */
- public static final native int _gtk_print_unix_dialog_get_current_page(long dialog);
- public static final int gtk_print_unix_dialog_get_current_page(long dialog) {
- lock.lock();
- try {
- return _gtk_print_unix_dialog_get_current_page(dialog);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_unix_dialog_set_current_page(long dialog, int current_page);
+ /** @param dialog cast=(GtkPrintUnixDialog *) */
+ public static final native int gtk_print_unix_dialog_get_current_page(long dialog);
/**
* @param dialog cast=(GtkPrintUnixDialog *)
* @param settings cast=(GtkPrintSettings *)
*/
- public static final native void _gtk_print_unix_dialog_set_settings(long dialog, long settings);
- public static final void gtk_print_unix_dialog_set_settings(long dialog, long settings) {
- lock.lock();
- try {
- _gtk_print_unix_dialog_set_settings(dialog, settings);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param dialog cast=(GtkPrintUnixDialog *)
- */
- public static final native long _gtk_print_unix_dialog_get_settings(long dialog);
- public static final long gtk_print_unix_dialog_get_settings(long dialog) {
- lock.lock();
- try {
- return _gtk_print_unix_dialog_get_settings(dialog);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param dialog cast=(GtkPrintUnixDialog *)
- */
- public static final native long _gtk_print_unix_dialog_get_selected_printer(long dialog);
- public static final long gtk_print_unix_dialog_get_selected_printer(long dialog) {
- lock.lock();
- try {
- return _gtk_print_unix_dialog_get_selected_printer(dialog);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_unix_dialog_set_settings(long dialog, long settings);
+ /** @param dialog cast=(GtkPrintUnixDialog *) */
+ public static final native long gtk_print_unix_dialog_get_settings(long dialog);
+ /** @param dialog cast=(GtkPrintUnixDialog *) */
+ public static final native long gtk_print_unix_dialog_get_selected_printer(long dialog);
/**
* @param dialog cast=(GtkPrintUnixDialog *)
* @param capabilities cast=(GtkPrintCapabilities)
*/
- public static final native void _gtk_print_unix_dialog_set_manual_capabilities(long dialog, long capabilities);
- public static final void gtk_print_unix_dialog_set_manual_capabilities(long dialog, long capabilities) {
- lock.lock();
- try {
- _gtk_print_unix_dialog_set_manual_capabilities(dialog, capabilities);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_progress_bar_new();
- public static final long gtk_progress_bar_new() {
- lock.lock();
- try {
- return _gtk_progress_bar_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_print_unix_dialog_set_manual_capabilities(long dialog, long capabilities);
+ /** @param dialog cast=(GtkPrintUnixDialog *) */
+ public static final native void gtk_print_unix_dialog_set_support_selection(long dialog, boolean support_selection);
+ /** @param dialog cast=(GtkPrintUnixDialog *) */
+ public static final native void gtk_print_unix_dialog_set_has_selection(long dialog, boolean has_selection);
+
+ /* GtkProgressBar */
+ public static final native long gtk_progress_bar_new();
/** @param pbar cast=(GtkProgressBar *) */
- public static final native void _gtk_progress_bar_pulse(long pbar);
- public static final void gtk_progress_bar_pulse(long pbar) {
- lock.lock();
- try {
- _gtk_progress_bar_pulse(pbar);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_progress_bar_pulse(long pbar);
/**
* @param pbar cast=(GtkProgressBar *)
* @param fraction cast=(gdouble)
*/
- public static final native void _gtk_progress_bar_set_fraction(long pbar, double fraction);
- public static final void gtk_progress_bar_set_fraction(long pbar, double fraction) {
- lock.lock();
- try {
- _gtk_progress_bar_set_fraction(pbar, fraction);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_progress_bar_set_fraction(long pbar, double fraction);
/**
* @param pbar cast=(GtkProgressBar *)
* @param inverted cast=(gboolean)
*/
- public static final native void _gtk_progress_bar_set_inverted(long pbar, boolean inverted);
- public static final void gtk_progress_bar_set_inverted(long pbar, boolean inverted) {
- lock.lock();
- try {
- _gtk_progress_bar_set_inverted(pbar, inverted);
- } finally {
- lock.unlock();
- }
- }
- /** @param radio_button cast=(GtkRadioButton *) */
- public static final native long _gtk_radio_button_get_group(long radio_button);
- public static final long gtk_radio_button_get_group(long radio_button) {
- lock.lock();
- try {
- return _gtk_radio_button_get_group(radio_button);
- } finally {
- lock.unlock();
- }
- }
- /** @param group cast=(GSList *) */
- public static final native long _gtk_radio_button_new(long group);
- public static final long gtk_radio_button_new(long group) {
- lock.lock();
- try {
- return _gtk_radio_button_new(group);
- } finally {
- lock.unlock();
- }
- }
- /** @param radio_menu_item cast=(GtkRadioMenuItem *) */
- public static final native long _gtk_radio_menu_item_get_group(long radio_menu_item);
- public static final long gtk_radio_menu_item_get_group(long radio_menu_item) {
- lock.lock();
- try {
- return _gtk_radio_menu_item_get_group(radio_menu_item);
- } finally {
- lock.unlock();
- }
- }
- /** @param group cast=(GSList *) */
- public static final native long _gtk_radio_menu_item_new(long group);
- public static final long gtk_radio_menu_item_new(long group) {
- lock.lock();
- try {
- return _gtk_radio_menu_item_new(group);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_progress_bar_set_inverted(long pbar, boolean inverted);
+
+ /* GtkRange */
/** @param range cast=(GtkRange *) */
- public static final native long _gtk_range_get_adjustment(long range);
- public static final long gtk_range_get_adjustment(long range) {
- lock.lock();
- try {
- return _gtk_range_get_adjustment(range);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_range_get_adjustment(long range);
/** @param range cast=(GtkRange *) */
- public static final native void _gtk_range_set_increments(long range, double step, double page);
- public static final void gtk_range_set_increments(long range, double step, double page) {
- lock.lock();
- try {
- _gtk_range_set_increments(range, step, page);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_range_set_increments(long range, double step, double page);
/** @param range cast=(GtkRange *) */
- public static final native void _gtk_range_set_inverted(long range, boolean setting);
- public static final void gtk_range_set_inverted(long range, boolean setting) {
- lock.lock();
- try {
- _gtk_range_set_inverted(range, setting);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_range_set_inverted(long range, boolean setting);
/** @param range cast=(GtkRange *) */
- public static final native void _gtk_range_set_range(long range, double min, double max);
- public static final void gtk_range_set_range(long range, double min, double max) {
- lock.lock();
- try {
- _gtk_range_set_range(range, min, max);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_range_set_range(long range, double min, double max);
/** @param range cast=(GtkRange *) */
- public static final native void _gtk_range_set_value(long range, double value);
- public static final void gtk_range_set_value(long range, double value) {
- lock.lock();
- try {
- _gtk_range_set_value(range, value);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_range_get_value(long range);
+ /** @param range cast=(GtkRange *) */
+ public static final native void gtk_range_set_value(long range, double value);
/**
* @param range cast=(GtkRange *)
* @param slider_start cast=(gint *)
* @param slider_end cast=(gint *)
*/
- public static final native void _gtk_range_get_slider_range(long range, int[] slider_start, int[] slider_end);
- public static final void gtk_range_get_slider_range(long range, int[] slider_start, int[] slider_end) {
- lock.lock();
- try {
- _gtk_range_get_slider_range(range, slider_start, slider_end);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param scale cast=(GtkScale *)
- * @param digits cast=(gint)
- */
- public static final native void _gtk_scale_set_digits(long scale, int digits);
- public static final void gtk_scale_set_digits(long scale, int digits) {
- lock.lock();
- try {
- _gtk_scale_set_digits(scale, digits);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param scale cast=(GtkScale *)
- * @param draw_value cast=(gboolean)
- */
- public static final native void _gtk_scale_set_draw_value(long scale, boolean draw_value);
- public static final void gtk_scale_set_draw_value(long scale, boolean draw_value) {
- lock.lock();
- try {
- _gtk_scale_set_draw_value(scale, draw_value);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param scrollable cast=(GtkScrollable *)
- */
- public static final native long _gtk_scrollable_get_vadjustment(long scrollable);
- public static final long gtk_scrollable_get_vadjustment(long scrollable) {
- lock.lock();
- try {
- return _gtk_scrollable_get_vadjustment(scrollable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_range_get_slider_range(long range, int[] slider_start, int[] slider_end);
+
+ /* GtkScrollable */
+ /** @param scrollable cast=(GtkScrollable *) */
+ public static final native long gtk_scrollable_get_vadjustment(long scrollable);
+
+ /* GtkScrolledWindow */
/** @param scrolled_window cast=(GtkScrolledWindow *) */
- public static final native long _gtk_scrolled_window_get_hadjustment(long scrolled_window);
- public static final long gtk_scrolled_window_get_hadjustment(long scrolled_window) {
- lock.lock();
- try {
- return _gtk_scrolled_window_get_hadjustment(scrolled_window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param scrolled_window cast=(GtkScrolledWindow *)
- */
- public static final native long _gtk_scrolled_window_get_hscrollbar(long scrolled_window);
- public static final long gtk_scrolled_window_get_hscrollbar(long scrolled_window) {
- lock.lock();
- try {
- return _gtk_scrolled_window_get_hscrollbar(scrolled_window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_scrolled_window_get_hadjustment(long scrolled_window);
+ /** @param scrolled_window cast=(GtkScrolledWindow *) */
+ public static final native long gtk_scrolled_window_get_hscrollbar(long scrolled_window);
/**
* @param scrolled_window cast=(GtkScrolledWindow *)
* @param hscrollbar_policy cast=(GtkPolicyType *)
* @param vscrollbar_policy cast=(GtkPolicyType *)
*/
- public static final native void _gtk_scrolled_window_get_policy(long scrolled_window, int[] hscrollbar_policy, int[] vscrollbar_policy);
- public static final void gtk_scrolled_window_get_policy(long scrolled_window, int[] hscrollbar_policy, int[] vscrollbar_policy) {
- lock.lock();
- try {
- _gtk_scrolled_window_get_policy(scrolled_window, hscrollbar_policy, vscrollbar_policy);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_scrolled_window_get_policy(long scrolled_window, int[] hscrollbar_policy, int[] vscrollbar_policy);
/** @param scrolled_window cast=(GtkScrolledWindow *) */
- public static final native int _gtk_scrolled_window_get_shadow_type(long scrolled_window);
- public static final int gtk_scrolled_window_get_shadow_type(long scrolled_window) {
- lock.lock();
- try {
- return _gtk_scrolled_window_get_shadow_type(scrolled_window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_scrolled_window_get_vadjustment(long scrolled_window);
/** @param scrolled_window cast=(GtkScrolledWindow *) */
- public static final native long _gtk_scrolled_window_get_vadjustment(long scrolled_window);
- public static final long gtk_scrolled_window_get_vadjustment(long scrolled_window) {
- lock.lock();
- try {
- return _gtk_scrolled_window_get_vadjustment(scrolled_window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param scrolled_window cast=(GtkScrolledWindow *)
- */
- public static final native long _gtk_scrolled_window_get_vscrollbar(long scrolled_window);
- public static final long gtk_scrolled_window_get_vscrollbar(long scrolled_window) {
- lock.lock();
- try {
- return _gtk_scrolled_window_get_vscrollbar(scrolled_window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param hadjustment cast=(GtkAdjustment *)
- * @param vadjustment cast=(GtkAdjustment *)
- */
- public static final native long _gtk_scrolled_window_new(long hadjustment, long vadjustment);
- public static final long gtk_scrolled_window_new(long hadjustment, long vadjustment) {
- lock.lock();
- try {
- return _gtk_scrolled_window_new(hadjustment, vadjustment);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_scrolled_window_get_vscrollbar(long scrolled_window);
/**
* @param scrolled_window cast=(GtkScrolledWindow *)
* @param hscrollbar_policy cast=(GtkPolicyType)
* @param vscrollbar_policy cast=(GtkPolicyType)
*/
- public static final native void _gtk_scrolled_window_set_policy(long scrolled_window, int hscrollbar_policy, int vscrollbar_policy);
- public static final void gtk_scrolled_window_set_policy(long scrolled_window, int hscrollbar_policy, int vscrollbar_policy) {
- lock.lock();
- try {
- _gtk_scrolled_window_set_policy(scrolled_window, hscrollbar_policy, vscrollbar_policy);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_scrolled_window_set_policy(long scrolled_window, int hscrollbar_policy, int vscrollbar_policy);
+ /** @param scrolled_window cast=(GtkScrolledWindow *) */
+ public static final native boolean gtk_scrolled_window_get_overlay_scrolling(long scrolled_window);
/**
- * @method flags=dynamic
* @param scrolled_window cast=(GtkScrolledWindow *)
- */
- public static final native boolean _gtk_scrolled_window_get_overlay_scrolling(long scrolled_window);
- public static final boolean gtk_scrolled_window_get_overlay_scrolling(long scrolled_window) {
- lock.lock();
- try {
- return _gtk_scrolled_window_get_overlay_scrolling(scrolled_window);
- } finally {
- lock.unlock();
- }
- }
+ * @param adjustment cast=(GtkAdjustment *)
+ * */
+ public static final native void gtk_scrolled_window_set_vadjustment(long scrolled_window, long adjustment);
/**
* @param scrolled_window cast=(GtkScrolledWindow *)
- * @param type cast=(GtkShadowType)
- */
- public static final native void _gtk_scrolled_window_set_shadow_type(long scrolled_window, int type);
- public static final void gtk_scrolled_window_set_shadow_type(long scrolled_window, int type) {
- lock.lock();
- try {
- _gtk_scrolled_window_set_shadow_type(scrolled_window, type);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_settings_get_default();
- public static final long gtk_settings_get_default() {
- lock.lock();
- try {
- return _gtk_settings_get_default();
- } finally {
- lock.unlock();
- }
- }
- /** @param selection_data cast=(GtkSelectionData *) */
- public static final native void _gtk_selection_data_free(long selection_data);
- public static final void gtk_selection_data_free(long selection_data) {
- lock.lock();
- try {
- _gtk_selection_data_free(selection_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection_data cast=(GtkSelectionData *)
- */
- public static final native long _gtk_selection_data_get_data(long selection_data);
- public static final long gtk_selection_data_get_data(long selection_data) {
- lock.lock();
- try {
- return _gtk_selection_data_get_data(selection_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection_data cast=(GtkSelectionData *)
- */
- public static final native int _gtk_selection_data_get_format(long selection_data);
- public static final int gtk_selection_data_get_format(long selection_data) {
- lock.lock();
- try {
- return _gtk_selection_data_get_format(selection_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection_data cast=(GtkSelectionData *)
- */
- public static final native int _gtk_selection_data_get_length(long selection_data);
- public static final int gtk_selection_data_get_length(long selection_data) {
- lock.lock();
- try {
- return _gtk_selection_data_get_length(selection_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection_data cast=(GtkSelectionData *)
- */
- public static final native long _gtk_selection_data_get_target(long selection_data);
- public static final long gtk_selection_data_get_target(long selection_data) {
- lock.lock();
- try {
- return _gtk_selection_data_get_target(selection_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection_data cast=(GtkSelectionData *)
- */
- public static final native long _gtk_selection_data_get_data_type(long selection_data);
- public static final long gtk_selection_data_get_data_type(long selection_data) {
- lock.lock();
- try {
- return _gtk_selection_data_get_data_type(selection_data);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection_data cast=(GtkSelectionData *)
- * @param type cast=(GdkAtom)
- * @param format cast=(gint)
- * @param data cast=(const guchar *)
- * @param length cast=(gint)
- */
- public static final native void _gtk_selection_data_set(long selection_data, long type, int format, long data, int length);
- public static final void gtk_selection_data_set(long selection_data, long type, int format, long data, int length) {
- lock.lock();
- try {
- _gtk_selection_data_set(selection_data, type, format, data, length);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_separator_menu_item_new();
- public static final long gtk_separator_menu_item_new() {
- lock.lock();
- try {
- return _gtk_separator_menu_item_new();
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_separator_tool_item_new();
- public static final long gtk_separator_tool_item_new() {
- lock.lock();
- try {
- return _gtk_separator_tool_item_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param item cast=(GtkSeparatorToolItem *)
- * @param draw cast=(gboolean)
- */
- public static final native void _gtk_separator_tool_item_set_draw(long item, boolean draw);
- public static final void gtk_separator_tool_item_set_draw(long item, boolean draw) {
- lock.lock();
- try {
- _gtk_separator_tool_item_set_draw(item, draw);
- } finally {
- lock.unlock();
- }
- }
- /** @param socket cast=(GtkSocket *) */
- public static final native long _gtk_socket_get_id(long socket);
- public static final long gtk_socket_get_id(long socket) {
- lock.lock();
- try {
- return _gtk_socket_get_id(socket);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_socket_new();
- public static final long gtk_socket_new() {
- lock.lock();
- try {
- return _gtk_socket_new();
- } finally {
- lock.unlock();
- }
- }
+ * @param adjustment cast=(GtkAdjustment *)
+ * */
+ public static final native void gtk_scrolled_window_set_hadjustment(long scrolled_window, long adjustment);
+
+ /* GtkSettings */
+ public static final native long gtk_settings_get_default();
+
+ /* GtkSpinButton */
/** @param adjustment cast=(GtkAdjustment *) */
- public static final native long _gtk_spin_button_new(long adjustment, double climb_rate, int digits);
- public static final long gtk_spin_button_new(long adjustment, double climb_rate, int digits) {
- lock.lock();
- try {
- return _gtk_spin_button_new(adjustment, climb_rate, digits);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_spin_button_new(long adjustment, double climb_rate, int digits);
/**
* @param spin_button cast=(GtkSpinButton*)
* @param numeric cast=(gboolean)
**/
- public static final native void _gtk_spin_button_set_numeric(long spin_button, boolean numeric);
- public static final void gtk_spin_button_set_numeric(long spin_button, boolean numeric) {
- lock.lock();
- try {
- _gtk_spin_button_set_numeric(spin_button, numeric);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_spin_button_set_numeric(long spin_button, boolean numeric);
/**
* @param spin_button cast=(GtkSpinButton*)
* @param adjustment cast=(GtkAdjustment *)
**/
- public static final native void _gtk_spin_button_configure(long spin_button, long adjustment, double climb_rate, int digits);
- public static final void gtk_spin_button_configure(long spin_button, long adjustment, double climb_rate, int digits) {
- lock.lock();
- try {
- _gtk_spin_button_configure(spin_button, adjustment, climb_rate, digits);
- } finally {
- lock.unlock();
- }
- }
- /** @param spin_button cast=(GtkSpinButton*) */
- public static final native long _gtk_spin_button_get_adjustment(long spin_button);
- public static final long gtk_spin_button_get_adjustment(long spin_button) {
- lock.lock();
- try {
- return _gtk_spin_button_get_adjustment(spin_button);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_spin_button_configure(long spin_button, long adjustment, double climb_rate, int digits);
/** @param spin_button cast=(GtkSpinButton*) */
- public static final native int _gtk_spin_button_get_digits(long spin_button);
- public static final int gtk_spin_button_get_digits(long spin_button) {
- lock.lock();
- try {
- return _gtk_spin_button_get_digits(spin_button);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_spin_button_get_adjustment(long spin_button);
/** @param spin_button cast=(GtkSpinButton*) */
- public static final native void _gtk_spin_button_set_digits(long spin_button, int digits);
- public static final void gtk_spin_button_set_digits(long spin_button, int digits) {
- lock.lock();
- try {
- _gtk_spin_button_set_digits(spin_button, digits);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_spin_button_get_digits(long spin_button);
/** @param spin_button cast=(GtkSpinButton*) */
- public static final native void _gtk_spin_button_set_increments(long spin_button, double step, double page);
- public static final void gtk_spin_button_set_increments(long spin_button, double step, double page) {
- lock.lock();
- try {
- _gtk_spin_button_set_increments(spin_button, step, page);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_spin_button_set_increments(long spin_button, double step, double page);
/** @param spin_button cast=(GtkSpinButton*) */
- public static final native void _gtk_spin_button_set_range(long spin_button, double max, double min);
- public static final void gtk_spin_button_set_range(long spin_button, double max, double min) {
- lock.lock();
- try {
- _gtk_spin_button_set_range(spin_button, max, min);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_spin_button_set_range(long spin_button, double max, double min);
/** @param spin_button cast=(GtkSpinButton*) */
- public static final native void _gtk_spin_button_set_value(long spin_button, double value);
- public static final void gtk_spin_button_set_value(long spin_button, double value) {
- lock.lock();
- try {
- _gtk_spin_button_set_value(spin_button, value);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_spin_button_set_value(long spin_button, double value);
/** @param spin_button cast=(GtkSpinButton*) */
- public static final native void _gtk_spin_button_set_wrap(long spin_button, boolean wrap);
- public static final void gtk_spin_button_set_wrap(long spin_button, boolean wrap) {
- lock.lock();
- try {
- _gtk_spin_button_set_wrap(spin_button, wrap);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_spin_button_set_wrap(long spin_button, boolean wrap);
/** @param spin_button cast=(GtkSpinButton*) */
- public static final native void _gtk_spin_button_update(long spin_button);
- public static final void gtk_spin_button_update(long spin_button) {
- lock.lock();
- try {
- _gtk_spin_button_update(spin_button);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param snapshot cast=(GtkSnapshot *)
- * @param rect cast=(const graphene_rect_t *)
- */
- public static final native long _gtk_snapshot_append_cairo(long snapshot, long rect);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long gtk_snapshot_append_cairo(long snapshot, long rect) {
- lock.lock();
- try {
- return _gtk_snapshot_append_cairo(snapshot, rect);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkStatusIcon*)
- * @param screen cast=(GdkScreen**)
- * @param area cast=(GdkRectangle*)
- * @param orientation cast=(GtkOrientation*)
- */
- public static final native boolean _gtk_status_icon_get_geometry(long handle, long screen, GdkRectangle area, long orientation);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gtk_status_icon_get_geometry(long handle, long screen, GdkRectangle area, long orientation) {
- lock.lock();
- try {
- return _gtk_status_icon_get_geometry(handle, screen, area, orientation);
- } finally {
- lock.unlock();
- }
- }
- /** @param handle cast=(GtkStatusIcon*) */
- public static final native boolean _gtk_status_icon_get_visible(long handle);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gtk_status_icon_get_visible(long handle) {
- lock.lock();
- try {
- return _gtk_status_icon_get_visible(handle);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_status_icon_new();
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_status_icon_new() {
- lock.lock();
- try {
- return _gtk_status_icon_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkStatusIcon*)
- * @param pixbuf cast=(GdkPixbuf*)
- */
- public static final native void _gtk_status_icon_set_from_pixbuf(long handle, long pixbuf);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_status_icon_set_from_pixbuf(long handle, long pixbuf) {
- lock.lock();
- try {
- _gtk_status_icon_set_from_pixbuf(handle, pixbuf);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkStatusIcon*)
- * @param visible cast=(gboolean)
- */
- public static final native void _gtk_status_icon_set_visible(long handle, boolean visible);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_status_icon_set_visible(long handle, boolean visible) {
- lock.lock();
- try {
- _gtk_status_icon_set_visible(handle, visible);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkStatusIcon *)
- * @param tip_text cast=(const gchar *)
- */
- public static final native void _gtk_status_icon_set_tooltip_text(long handle, byte[] tip_text);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_status_icon_set_tooltip_text(long handle, byte[] tip_text) {
- lock.lock();
- try {
- _gtk_status_icon_set_tooltip_text(handle, tip_text);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param class_name cast=(const gchar *)
- */
- public static final native void _gtk_style_context_add_class(long context, byte[] class_name);
- public static final void gtk_style_context_add_class(long context, byte[] class_name) {
- lock.lock();
- try {
- _gtk_style_context_add_class(context, class_name);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param class_name cast=(const gchar *)
- */
- public static final native void _gtk_style_context_remove_class(long context, byte[] class_name);
- public static final void gtk_style_context_remove_class(long context, byte[] class_name) {
- lock.lock();
- try {
- _gtk_style_context_remove_class(context, class_name);
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=dynamic */
- public static final native void _gtk_style_context_get_background_color(long context, int state, GdkRGBA color);
- /** [GTK3; 3.16 deprecated, replaced] */
- public static final void gtk_style_context_get_background_color(long context, int state, GdkRGBA color) {
- lock.lock();
- try {
- _gtk_style_context_get_background_color(context, state, color);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param context cast=(GtkStyleContext *)
- * @param state cast=(GtkStateFlags)
- * @param color cast=(GdkRGBA *)
- */
- public static final native void _gtk_style_context_get_color(long context, int state, GdkRGBA color);
- /** [GTK3 only] */
- public static final void gtk_style_context_get_color(long context, int state, GdkRGBA color) {
- lock.lock();
- try {
- _gtk_style_context_get_color(context, state, color);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param context cast=(GtkStyleContext *)
- * @param color cast=(GdkRGBA *)
- */
- public static final native void _gtk_style_context_get_color(long context, GdkRGBA color);
- /** [GTK4 only] */
- public static final void gtk_style_context_get_color(long context, GdkRGBA color) {
- lock.lock();
- try {
- _gtk_style_context_get_color(context, color);
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=dynamic */
- public static final native long _gtk_style_context_get_font(long context, int state);
- /** [GTK3; 3.8 deprecated, replaced] */
- public static final long gtk_style_context_get_font(long context, int state) {
- lock.lock();
- try {
- return _gtk_style_context_get_font(context, state);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param context cast=(GtkStyleContext *)
- * @param state cast=(GtkStateFlags)
- * @param padding cast=(GtkBorder *),flags=no_in
- */
- public static final native void _gtk_style_context_get_padding(long context, int state, GtkBorder padding);
- /** [GTK3 only] */
- public static final void gtk_style_context_get_padding(long context, int state, GtkBorder padding) {
- lock.lock();
- try {
- _gtk_style_context_get_padding(context, state, padding);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- */
- public static final native long _gtk_style_context_get_parent(long context);
- public static final long gtk_style_context_get_parent(long context) {
- lock.lock();
- try {
- return _gtk_style_context_get_parent(context);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param context cast=(GtkStyleContext *)
- * @param padding cast=(GtkBorder *),flags=no_in
- */
- public static final native void _gtk_style_context_get_padding(long context, GtkBorder padding);
- /** [GTK4 only] */
- public static final void gtk_style_context_get_padding(long context, GtkBorder padding) {
- lock.lock();
- try {
- _gtk_style_context_get_padding(context, padding);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param margin cast=(GtkBorder *),flags=no_in
- */
- public static final native void _gtk_style_context_get_margin(long context, GtkBorder margin);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_style_context_get_margin(long context, GtkBorder margin) {
- lock.lock();
- try {
- _gtk_style_context_get_margin(context, margin);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param property cast=(const gchar *),flags=no_out
- * @param terminator cast=(const gchar *),flags=sentinel
- */
- public static final native void _gtk_style_context_get(long context, int state, byte [] property, long [] value, long terminator);
- public static final void gtk_style_context_get(long context, int state, byte [] property, long [] value, long terminator) {
- lock.lock();
- try {
- _gtk_style_context_get(context, state, property, value, terminator);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param property cast=(const gchar *),flags=no_out
- * @param terminator cast=(const gchar *),flags=sentinel
- */
- public static final native void _gtk_style_context_get(long context, byte [] property, long [] value, long terminator);
- public static final void gtk_style_context_get(long context, byte [] property, long [] value, long terminator) {
- lock.lock();
- try {
- _gtk_style_context_get(context, property, value, terminator);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param context cast=(GtkStyleContext *)
- * @param state cast=(GtkStateFlags)
- * @param padding cast=(GtkBorder *),flags=no_in
- */
- public static final native void _gtk_style_context_get_border(long context, int state, GtkBorder padding);
- /** [GTK3 only] */
- public static final void gtk_style_context_get_border(long context, int state, GtkBorder padding) {
- lock.lock();
- try {
- _gtk_style_context_get_border(context, state, padding);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param context cast=(GtkStyleContext *)
- * @param padding cast=(GtkBorder *),flags=no_in
- */
- public static final native void _gtk_style_context_get_border(long context, GtkBorder padding);
- /** [GTK4 only] */
- public static final void gtk_style_context_get_border(long context, GtkBorder padding) {
- lock.lock();
- try {
- _gtk_style_context_get_border(context, padding);
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=dynamic */
- public static final native void _gtk_style_context_invalidate(long context);
- /** [GTK3; 3.12 deprecated] */
- public static final void gtk_style_context_invalidate(long context) {
- lock.lock();
- try {
- _gtk_style_context_invalidate(context);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param self cast=(GtkStyleContext *)
- */
- public static final native void _gtk_style_context_save(long self);
- public static final void gtk_style_context_save(long self) {
- lock.lock();
- try {
- _gtk_style_context_save(self);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- */
- public static final native void _gtk_style_context_restore(long context);
- public static final void gtk_style_context_restore(long context) {
- lock.lock();
- try {
- _gtk_style_context_restore(context);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param self cast=(GtkWidget *)
- */
- public static final native int _gtk_widget_get_state_flags(long self);
- public static final int gtk_widget_get_state_flags(long self) {
- lock.lock();
- try {
- return _gtk_widget_get_state_flags(self);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param context cast=(GtkStyleContext *)
- * @param flags cast=(GtkStateFlags)
- */
- public static final native void _gtk_style_context_set_state(long context, long flags);
- public static final void gtk_style_context_set_state(long context, long flags) {
- lock.lock();
- try {
- _gtk_style_context_set_state(context,flags);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param targets cast=(const GtkTargetEntry *)
- * @param ntargets cast=(guint)
- */
- public static final native long _gtk_target_list_new(long targets, int ntargets);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_target_list_new(long targets, int ntargets) {
- lock.lock();
- try {
- return _gtk_target_list_new(targets, ntargets);
- } finally {
- lock.unlock();
- }
- }
- /** @param list cast=(GtkTargetList *) */
- public static final native void _gtk_target_list_unref(long list);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_target_list_unref(long list) {
- lock.lock();
- try {
- _gtk_target_list_unref(list);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_spin_button_update(long spin_button);
+
+ /* GtkTextBuffer */
/**
* @method flags=dynamic
* @param buffer cast=(GtkTextBuffer *)
*/
- public static final native void _gtk_text_buffer_copy_clipboard(long buffer, long clipboard);
- /** [GTK3/GTK4, GTK3 uses GtkClipboard but GTK4 uses GdkClipboard -- method signature otherwise identical] */
- public static final void gtk_text_buffer_copy_clipboard(long buffer, long clipboard) {
- lock.lock();
- try {
- _gtk_text_buffer_copy_clipboard(buffer, clipboard);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3/GTK4, GTK3 uses GtkClipboard but GTK4 uses GdkClipboard -- method signature otherwise identical] */
+ public static final native void gtk_text_buffer_copy_clipboard(long buffer, long clipboard);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param mark_name cast=(const gchar *)
* @param where cast=(GtkTextIter *)
* @param left_gravity cast=(gboolean)
*/
- public static final native long _gtk_text_buffer_create_mark(long buffer, byte [] mark_name, byte [] where, boolean left_gravity);
- public static final long gtk_text_buffer_create_mark(long buffer, byte [] mark_name, byte [] where, boolean left_gravity) {
- lock.lock();
- try {
- return _gtk_text_buffer_create_mark(buffer, mark_name, where, left_gravity);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_text_buffer_create_mark(long buffer, byte [] mark_name, byte [] where, boolean left_gravity);
/**
* @method flags=dynamic
* @param buffer cast=(GtkTextBuffer *)
* @param default_editable cast=(gboolean)
*/
- public static final native void _gtk_text_buffer_cut_clipboard(long buffer, long clipboard, boolean default_editable);
- /** [GTK3/GTK4, GTK3 uses GtkClipboard but GTK4 uses GdkClipboard -- method signature otherwise identical] */
- public static final void gtk_text_buffer_cut_clipboard(long buffer, long clipboard, boolean default_editable) {
- lock.lock();
- try {
- _gtk_text_buffer_cut_clipboard(buffer, clipboard, default_editable);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3/GTK4, GTK3 uses GtkClipboard but GTK4 uses GdkClipboard -- method signature otherwise identical] */
+ public static final native void gtk_text_buffer_cut_clipboard(long buffer, long clipboard, boolean default_editable);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param start cast=(GtkTextIter *)
* @param end cast=(GtkTextIter *)
*/
- public static final native void _gtk_text_buffer_delete(long buffer, byte[] start, byte[] end);
- public static final void gtk_text_buffer_delete(long buffer, byte[] start, byte[] end) {
- lock.lock();
- try {
- _gtk_text_buffer_delete(buffer, start, end);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_delete(long buffer, byte[] start, byte[] end);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param start cast=(GtkTextIter *)
* @param end cast=(GtkTextIter *)
*/
- public static final native void _gtk_text_buffer_get_bounds(long buffer, byte[] start, byte[] end);
- public static final void gtk_text_buffer_get_bounds(long buffer, byte[] start, byte[] end) {
- lock.lock();
- try {
- _gtk_text_buffer_get_bounds(buffer, start, end);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_get_bounds(long buffer, byte[] start, byte[] end);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param iter cast=(GtkTextIter *)
*/
- public static final native void _gtk_text_buffer_get_end_iter(long buffer, byte[] iter);
- public static final void gtk_text_buffer_get_end_iter(long buffer, byte[] iter) {
- lock.lock();
- try {
- _gtk_text_buffer_get_end_iter(buffer, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_get_end_iter(long buffer, byte[] iter);
/** @param buffer cast=(GtkTextBuffer *) */
- public static final native long _gtk_text_buffer_get_insert(long buffer);
- public static final long gtk_text_buffer_get_insert(long buffer) {
- lock.lock();
- try {
- return _gtk_text_buffer_get_insert(buffer);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_text_buffer_get_insert(long buffer);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param iter cast=(GtkTextIter *)
* @param line_number cast=(gint)
*/
- public static final native void _gtk_text_buffer_get_iter_at_line(long buffer, byte[] iter, int line_number);
- public static final void gtk_text_buffer_get_iter_at_line(long buffer, byte[] iter, int line_number) {
- lock.lock();
- try {
- _gtk_text_buffer_get_iter_at_line(buffer, iter, line_number);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_get_iter_at_line(long buffer, byte[] iter, int line_number);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param iter cast=(GtkTextIter *)
* @param mark cast=(GtkTextMark *)
*/
- public static final native void _gtk_text_buffer_get_iter_at_mark(long buffer, byte[] iter, long mark);
- public static final void gtk_text_buffer_get_iter_at_mark(long buffer, byte[] iter, long mark) {
- lock.lock();
- try {
- _gtk_text_buffer_get_iter_at_mark(buffer, iter, mark);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_get_iter_at_mark(long buffer, byte[] iter, long mark);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param iter cast=(GtkTextIter *)
* @param char_offset cast=(gint)
*/
- public static final native void _gtk_text_buffer_get_iter_at_offset(long buffer, byte[] iter, int char_offset);
- public static final void gtk_text_buffer_get_iter_at_offset(long buffer, byte[] iter, int char_offset) {
- lock.lock();
- try {
- _gtk_text_buffer_get_iter_at_offset(buffer, iter, char_offset);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_get_iter_at_offset(long buffer, byte[] iter, int char_offset);
/** @param buffer cast=(GtkTextBuffer *) */
- public static final native int _gtk_text_buffer_get_line_count(long buffer);
- public static final int gtk_text_buffer_get_line_count(long buffer) {
- lock.lock();
- try {
- return _gtk_text_buffer_get_line_count(buffer);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_text_buffer_get_line_count(long buffer);
/** @param buffer cast=(GtkTextBuffer *) */
- public static final native long _gtk_text_buffer_get_selection_bound(long buffer);
- public static final long gtk_text_buffer_get_selection_bound(long buffer) {
- lock.lock();
- try {
- return _gtk_text_buffer_get_selection_bound(buffer);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_text_buffer_get_selection_bound(long buffer);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param start cast=(GtkTextIter *)
* @param end cast=(GtkTextIter *)
*/
- public static final native boolean _gtk_text_buffer_get_selection_bounds(long buffer, byte[] start, byte[] end);
- public static final boolean gtk_text_buffer_get_selection_bounds(long buffer, byte[] start, byte[] end) {
- lock.lock();
- try {
- return _gtk_text_buffer_get_selection_bounds(buffer, start, end);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_text_buffer_get_selection_bounds(long buffer, byte[] start, byte[] end);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param start cast=(GtkTextIter *)
* @param end cast=(GtkTextIter *)
* @param include_hidden_chars cast=(gboolean)
*/
- public static final native long _gtk_text_buffer_get_text(long buffer, byte[] start, byte[] end, boolean include_hidden_chars);
- public static final long gtk_text_buffer_get_text(long buffer, byte[] start, byte[] end, boolean include_hidden_chars) {
- lock.lock();
- try {
- return _gtk_text_buffer_get_text(buffer, start, end, include_hidden_chars);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_text_buffer_get_text(long buffer, byte[] start, byte[] end, boolean include_hidden_chars);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param iter cast=(GtkTextIter *)
* @param text cast=(const gchar *)
* @param len cast=(gint)
*/
- public static final native void _gtk_text_buffer_insert(long buffer, byte[] iter, byte[] text, int len);
- public static final void gtk_text_buffer_insert(long buffer, byte[] iter, byte[] text, int len) {
- lock.lock();
- try {
- _gtk_text_buffer_insert(buffer, iter, text, len);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_insert(long buffer, byte[] iter, byte[] text, int len);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param iter cast=(GtkTextIter *)
* @param text cast=(const gchar *)
* @param len cast=(gint)
*/
- public static final native void _gtk_text_buffer_insert(long buffer, long iter, byte[] text, int len);
- public static final void gtk_text_buffer_insert(long buffer, long iter, byte[] text, int len) {
- lock.lock();
- try {
- _gtk_text_buffer_insert(buffer, iter, text, len);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_insert(long buffer, long iter, byte[] text, int len);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param ins cast=(const GtkTextIter *)
* @param bound cast=(const GtkTextIter *)
*/
- public static final native void _gtk_text_buffer_select_range (long buffer, byte[] ins, byte[] bound);
- public static final void gtk_text_buffer_select_range (long buffer, byte[] ins, byte[] bound) {
- lock.lock();
- try {
- _gtk_text_buffer_select_range(buffer, ins, bound);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_select_range(long buffer, byte[] ins, byte[] bound);
/**
* @method flags=dynamic
* @param buffer cast=(GtkTextBuffer *)
* @param override_location cast=(GtkTextIter *)
* @param default_editable cast=(gboolean)
*/
- public static final native void _gtk_text_buffer_paste_clipboard(long buffer, long clipboard, byte[] override_location, boolean default_editable);
- /** [GTK3/GTK4, GTK3 uses GtkClipboard but GTK4 uses GdkClipboard -- method signature otherwise identical] */
- public static final void gtk_text_buffer_paste_clipboard(long buffer, long clipboard, byte[] override_location, boolean default_editable) {
- lock.lock();
- try {
- _gtk_text_buffer_paste_clipboard(buffer, clipboard, override_location, default_editable);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK3/GTK4, GTK3 uses GtkClipboard but GTK4 uses GdkClipboard -- method signature otherwise identical] */
+ public static final native void gtk_text_buffer_paste_clipboard(long buffer, long clipboard, byte[] override_location, boolean default_editable);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param where cast=(const GtkTextIter *)
*/
- public static final native void _gtk_text_buffer_place_cursor(long buffer, byte[] where);
- public static final void gtk_text_buffer_place_cursor(long buffer, byte[] where) {
- lock.lock();
- try {
- _gtk_text_buffer_place_cursor(buffer, where);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_place_cursor(long buffer, byte[] where);
/**
* @param buffer cast=(GtkTextBuffer *)
* @param text cast=(const gchar *)
* @param len cast=(gint)
*/
- public static final native void _gtk_text_buffer_set_text(long buffer, byte[] text, int len);
- public static final void gtk_text_buffer_set_text(long buffer, byte[] text, int len) {
- lock.lock();
- try {
- _gtk_text_buffer_set_text(buffer, text, len);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_buffer_set_text(long buffer, byte[] text, int len);
+
+ /* GtkTextIter */
/** @param iter cast=(const GtkTextIter *) */
- public static final native int _gtk_text_iter_get_line(byte[] iter);
- public static final int gtk_text_iter_get_line(byte[] iter) {
- lock.lock();
- try {
- return _gtk_text_iter_get_line(iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_text_iter_get_line(byte[] iter);
/** @param iter cast=(const GtkTextIter *) */
- public static final native int _gtk_text_iter_get_offset(byte[] iter);
- public static final int gtk_text_iter_get_offset(byte[] iter) {
- lock.lock();
- try {
- return _gtk_text_iter_get_offset(iter);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param text_view cast=(GtkTextView *)
- * @param win cast=(GtkTextWindowType)
- * @param buffer_x cast=(gint)
- * @param buffer_y cast=(gint)
- * @param window_x cast=(gint *)
- * @param window_y cast=(gint *)
- */
- public static final native void _gtk_text_view_buffer_to_window_coords(long text_view, int win, int buffer_x, int buffer_y, int[] window_x, int[] window_y);
- /** [GTK3 only] */
- public static final void gtk_text_view_buffer_to_window_coords(long text_view, int win, int buffer_x, int buffer_y, int[] window_x, int[] window_y) {
- lock.lock();
- try {
- _gtk_text_view_buffer_to_window_coords(text_view, win, buffer_x, buffer_y, window_x, window_y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_text_iter_get_offset(byte[] iter);
+
+ /* GtkTextView */
+ public static final native long gtk_text_view_new();
/**
- * @method flags=dynamic
* @param text_view cast=(GtkTextView *)
* @param win cast=(GtkTextWindowType)
* @param buffer_x cast=(gint)
@@ -6614,131 +1639,43 @@ public class GTK extends OS {
* @param window_x cast=(gint *)
* @param window_y cast=(gint *)
*/
- public static final native void _gtk_text_view_buffer_to_surface_coords(long text_view, int win, int buffer_x, int buffer_y, int[] window_x, int[] window_y);
- /** [GTK4 only] */
- public static final void gtk_text_view_buffer_to_surface_coords(long text_view, int win, int buffer_x, int buffer_y, int[] window_x, int[] window_y) {
- lock.lock();
- try {
- _gtk_text_view_buffer_to_surface_coords(text_view, win, buffer_x, buffer_y, window_x, window_y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_buffer_to_window_coords(long text_view, int win, int buffer_x, int buffer_y, int[] window_x, int[] window_y);
/** @param text_view cast=(GtkTextView *) */
- public static final native long _gtk_text_view_get_buffer(long text_view);
- public static final long gtk_text_view_get_buffer(long text_view) {
- lock.lock();
- try {
- return _gtk_text_view_get_buffer(text_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_text_view_get_buffer(long text_view);
/** @param text_view cast=(GtkTextView *) */
- public static final native boolean _gtk_text_view_get_editable(long text_view);
- public static final boolean gtk_text_view_get_editable(long text_view) {
- lock.lock();
- try {
- return _gtk_text_view_get_editable(text_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_text_view_get_editable(long text_view);
/**
* @param text_view cast=(GtkTextView *)
* @param iter cast=(GtkTextIter *)
* @param x cast=(gint)
* @param y cast=(gint)
*/
- public static final native void _gtk_text_view_get_iter_at_location(long text_view, byte[] iter, int x, int y);
- public static final void gtk_text_view_get_iter_at_location(long text_view, byte[] iter, int x, int y) {
- lock.lock();
- try {
- _gtk_text_view_get_iter_at_location(text_view, iter, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_get_iter_at_location(long text_view, byte[] iter, int x, int y);
/**
* @param text_view cast=(GtkTextView *)
* @param iter cast=(const GtkTextIter *)
* @param location cast=(GdkRectangle *),flags=no_in
*/
- public static final native void _gtk_text_view_get_iter_location(long text_view, byte[] iter, GdkRectangle location);
- public static final void gtk_text_view_get_iter_location(long text_view, byte[] iter, GdkRectangle location) {
- lock.lock();
- try {
- _gtk_text_view_get_iter_location(text_view, iter, location);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_get_iter_location(long text_view, byte[] iter, GdkRectangle location);
/**
* @param text_view cast=(GtkTextView *)
* @param target_iter cast=(GtkTextIter *)
* @param y cast=(gint)
* @param line_top cast=(gint *)
*/
- public static final native void _gtk_text_view_get_line_at_y(long text_view, byte[] target_iter, int y, int[] line_top);
- public static final void gtk_text_view_get_line_at_y(long text_view, byte[] target_iter, int y, int[] line_top) {
- lock.lock();
- try {
- _gtk_text_view_get_line_at_y(text_view, target_iter, y, line_top);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_get_line_at_y(long text_view, byte[] target_iter, int y, int[] line_top);
/**
* @param text_view cast=(GtkTextView *)
* @param target_iter cast=(GtkTextIter *)
* @param y cast=(gint *)
* @param height cast=(gint *)
*/
- public static final native void _gtk_text_view_get_line_yrange(long text_view, byte[] target_iter, int[] y, int[] height);
- public static final void gtk_text_view_get_line_yrange(long text_view, byte[] target_iter, int[] y, int[] height) {
- lock.lock();
- try {
- _gtk_text_view_get_line_yrange(text_view, target_iter, y, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_get_line_yrange(long text_view, byte[] target_iter, int[] y, int[] height);
/**
* @param text_view cast=(GtkTextView *)
* @param visible_rect cast=(GdkRectangle *),flags=no_in
*/
- public static final native void _gtk_text_view_get_visible_rect(long text_view, GdkRectangle visible_rect);
- public static final void gtk_text_view_get_visible_rect(long text_view, GdkRectangle visible_rect) {
- lock.lock();
- try {
- _gtk_text_view_get_visible_rect(text_view, visible_rect);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param text_view cast=(GtkTextView *)
- * @param win cast=(GtkTextWindowType)
- */
- public static final native long _gtk_text_view_get_window(long text_view, int win);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_text_view_get_window(long text_view, int win) {
- lock.lock();
- try {
- return _gtk_text_view_get_window(text_view, win);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_text_view_new();
- public static final long gtk_text_view_new() {
- lock.lock();
- try {
- return _gtk_text_view_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_get_visible_rect(long text_view, GdkRectangle visible_rect);
/**
* @param text_view cast=(GtkTextView *)
* @param mark cast=(GtkTextMark *)
@@ -6747,15 +1684,7 @@ public class GTK extends OS {
* @param xalign cast=(gdouble)
* @param yalign cast=(gdouble)
*/
- public static final native void _gtk_text_view_scroll_to_mark(long text_view, long mark, double within_margin, boolean use_align, double xalign, double yalign);
- public static final void gtk_text_view_scroll_to_mark(long text_view, long mark, double within_margin, boolean use_align, double xalign, double yalign) {
- lock.lock();
- try {
- _gtk_text_view_scroll_to_mark(text_view, mark, within_margin, use_align, xalign, yalign);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_scroll_to_mark(long text_view, long mark, double within_margin, boolean use_align, double xalign, double yalign);
/**
* @param text_view cast=(GtkTextView *)
* @param iter cast=(GtkTextIter *)
@@ -6764,1088 +1693,290 @@ public class GTK extends OS {
* @param xalign cast=(gdouble)
* @param yalign cast=(gdouble)
*/
- public static final native boolean _gtk_text_view_scroll_to_iter(long text_view, byte[] iter, double within_margin, boolean use_align, double xalign, double yalign);
- public static final boolean gtk_text_view_scroll_to_iter(long text_view, byte[] iter, double within_margin, boolean use_align, double xalign, double yalign) {
- lock.lock();
- try {
- return _gtk_text_view_scroll_to_iter(text_view, iter, within_margin, use_align, xalign, yalign);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_text_view_scroll_to_iter(long text_view, byte[] iter, double within_margin, boolean use_align, double xalign, double yalign);
/**
* @param text_view cast=(GtkTextView *)
* @param setting cast=(gboolean)
*/
- public static final native void _gtk_text_view_set_editable(long text_view, boolean setting);
- public static final void gtk_text_view_set_editable(long text_view, boolean setting) {
- lock.lock();
- try {
- _gtk_text_view_set_editable(text_view, setting);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_set_editable(long text_view, boolean setting);
/** @param text_view cast=(GtkTextView *) */
- public static final native void _gtk_text_view_set_justification(long text_view, int justification);
- public static final void gtk_text_view_set_justification(long text_view, int justification) {
- lock.lock();
- try {
- _gtk_text_view_set_justification(text_view, justification);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_set_justification(long text_view, int justification);
/**
* @param text_view cast=(GtkTextView *)
* @param tabs cast=(PangoTabArray *)
*/
- public static final native void _gtk_text_view_set_tabs(long text_view, long tabs);
- public static final void gtk_text_view_set_tabs(long text_view, long tabs) {
- lock.lock();
- try {
- _gtk_text_view_set_tabs(text_view, tabs);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_set_tabs(long text_view, long tabs);
/** @param text_view cast=(GtkTextView *) */
- public static final native void _gtk_text_view_set_wrap_mode(long text_view, int wrap_mode);
- public static final void gtk_text_view_set_wrap_mode(long text_view, int wrap_mode) {
- lock.lock();
- try {
- _gtk_text_view_set_wrap_mode(text_view, wrap_mode);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_text_view_set_wrap_mode(long text_view, int wrap_mode);
+
+ /* GtkToggleButton */
+ public static final native long gtk_toggle_button_new();
/** @param toggle_button cast=(GtkToggleButton *) */
- public static final native boolean _gtk_toggle_button_get_active(long toggle_button);
- public static final boolean gtk_toggle_button_get_active(long toggle_button) {
- lock.lock();
- try {
- return _gtk_toggle_button_get_active(toggle_button);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_toggle_button_new();
- public static final long gtk_toggle_button_new() {
- lock.lock();
- try {
- return _gtk_toggle_button_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_toggle_button_get_active(long toggle_button);
/**
* @param toggle_button cast=(GtkToggleButton *)
* @param is_active cast=(gboolean)
*/
- public static final native void _gtk_toggle_button_set_active(long toggle_button, boolean is_active);
- public static final void gtk_toggle_button_set_active(long toggle_button, boolean is_active) {
- lock.lock();
- try {
- _gtk_toggle_button_set_active(toggle_button, is_active);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param toggle_button cast=(GtkToggleButton *)
- * @param setting cast=(gboolean)
- */
- public static final native void _gtk_toggle_button_set_inconsistent(long toggle_button, boolean setting);
- /** [GTK3 only] */
- public static final void gtk_toggle_button_set_inconsistent(long toggle_button, boolean setting) {
- lock.lock();
- try {
- _gtk_toggle_button_set_inconsistent(toggle_button, setting);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param toggle_button cast=(GtkToggleButton *)
- * @param draw_indicator cast=(gboolean)
- */
- public static final native void _gtk_toggle_button_set_mode(long toggle_button, boolean draw_indicator);
- /** [GTK3 only] */
- public static final void gtk_toggle_button_set_mode(long toggle_button, boolean draw_indicator) {
- lock.lock();
- try {
- _gtk_toggle_button_set_mode(toggle_button, draw_indicator);
- } finally {
- lock.unlock();
- }
- }
- /** @param button cast=(GtkToggleToolButton *) */
- public static final native boolean _gtk_toggle_tool_button_get_active(long button);
- public static final boolean gtk_toggle_tool_button_get_active(long button) {
- lock.lock();
- try {
- return _gtk_toggle_tool_button_get_active(button);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_toggle_tool_button_new();
- public static final long gtk_toggle_tool_button_new() {
- lock.lock();
- try {
- return _gtk_toggle_tool_button_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param item cast=(GtkToggleToolButton *)
- * @param selected cast=(gboolean)
- */
- public static final native void _gtk_toggle_tool_button_set_active(long item, boolean selected);
- public static final void gtk_toggle_tool_button_set_active(long item, boolean selected) {
- lock.lock();
- try {
- _gtk_toggle_tool_button_set_active(item, selected);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param icon_widget cast=(GtkWidget *)
- * @param label cast=(const gchar *)
- */
- public static final native long _gtk_tool_button_new(long icon_widget, byte[] label);
- public static final long gtk_tool_button_new(long icon_widget, byte[] label) {
- lock.lock();
- try {
- return _gtk_tool_button_new(icon_widget, label);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param button cast=(GtkToolButton *)
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_tool_button_set_icon_widget(long button, long widget);
- public static final void gtk_tool_button_set_icon_widget(long button, long widget) {
- lock.lock();
- try {
- _gtk_tool_button_set_icon_widget(button, widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param button cast=(GtkToolButton *)
- * @param label cast=(const gchar *)
- */
- public static final native void _gtk_tool_button_set_label(long button, byte[] label);
- public static final void gtk_tool_button_set_label(long button, byte[] label) {
- lock.lock();
- try {
- _gtk_tool_button_set_label(button, label);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param button cast=(GtkToolButton *)
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_tool_button_set_label_widget(long button, long widget);
- public static final void gtk_tool_button_set_label_widget(long button, long widget) {
- lock.lock();
- try {
- _gtk_tool_button_set_label_widget(button, widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param item cast=(GtkToolButton *)
- * @param underline cast=(gboolean)
- */
- public static final native void _gtk_tool_button_set_use_underline(long item, boolean underline);
- public static final void gtk_tool_button_set_use_underline(long item, boolean underline) {
- lock.lock();
- try {
- _gtk_tool_button_set_use_underline(item, underline);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param item cast=(GtkToolItem *)
- * @param menu_id cast=(const gchar *)
- */
- public static final native long _gtk_tool_item_get_proxy_menu_item(long item, byte[] menu_id);
- public static final long gtk_tool_item_get_proxy_menu_item(long item, byte[] menu_id) {
- lock.lock();
- try {
- return _gtk_tool_item_get_proxy_menu_item(item, menu_id);
- } finally {
- lock.unlock();
- }
- }
- /** @param item cast=(GtkToolItem *) */
- public static final native long _gtk_tool_item_retrieve_proxy_menu_item(long item);
- public static final long gtk_tool_item_retrieve_proxy_menu_item(long item) {
- lock.lock();
- try {
- return _gtk_tool_item_retrieve_proxy_menu_item(item);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param item cast=(GtkToolItem *)
- * @param important cast=(gboolean)
- */
- public static final native void _gtk_tool_item_set_is_important(long item, boolean important);
- public static final void gtk_tool_item_set_is_important(long item, boolean important) {
- lock.lock();
- try {
- _gtk_tool_item_set_is_important(item, important);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param item cast=(GtkToolItem *)
- * @param menu_id cast=(const gchar *)
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_tool_item_set_proxy_menu_item(long item, byte[] menu_id, long widget);
- public static final void gtk_tool_item_set_proxy_menu_item(long item, byte[] menu_id, long widget) {
- lock.lock();
- try {
- _gtk_tool_item_set_proxy_menu_item(item, menu_id, widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param toolbar cast=(GtkToolbar *)
- * @param item cast=(GtkToolItem *)
- */
- public static final native void _gtk_toolbar_insert(long toolbar, long item, int pos);
- public static final void gtk_toolbar_insert(long toolbar, long item, int pos) {
- lock.lock();
- try {
- _gtk_toolbar_insert(toolbar, item, pos);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_toolbar_new();
- public static final long gtk_toolbar_new() {
- lock.lock();
- try {
- return _gtk_toolbar_new();
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param toolbar cast=(GtkToolbar *)
- * @param show_arrow cast=(gboolean)
- */
- public static final native void _gtk_toolbar_set_show_arrow(long toolbar, boolean show_arrow);
- public static final void gtk_toolbar_set_show_arrow(long toolbar, boolean show_arrow) {
- lock.lock();
- try {
- _gtk_toolbar_set_show_arrow(toolbar, show_arrow);
- } finally {
- lock.unlock();
- }
- }
- /** @param toolbar cast=(GtkToolbar *)
- * @param style cast=(GtkToolbarStyle)
- */
- public static final native void _gtk_toolbar_set_style(long toolbar, int style);
- public static final void gtk_toolbar_set_style(long toolbar, int style) {
- lock.lock();
- try {
- _gtk_toolbar_set_style(toolbar, style);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param toolbar cast=(GtkToolbar *)
- */
- public static final native void _gtk_toolbar_set_icon_size(long toolbar, int size);
- /** [GTK3 only] */
- public static final void gtk_toolbar_set_icon_size(long toolbar, int size) {
- lock.lock();
- try {
- _gtk_toolbar_set_icon_size(toolbar, size);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_tooltip_get_type();
- public static final long gtk_tooltip_get_type() {
- lock.lock();
- try {
- return _gtk_tooltip_get_type();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_toggle_button_set_active(long toggle_button, boolean is_active);
+
+ /* GtkToolTip */
+ public static final native long gtk_tooltip_get_type();
/**
* @param tooltip cast=(GtkTooltip *)
* @param custom_widget cast=(GtkWidget *)
*/
- public static final native void _gtk_tooltip_set_custom(long tooltip, long custom_widget);
- public static final void gtk_tooltip_set_custom(long tooltip, long custom_widget) {
- lock.lock();
- try {
- _gtk_tooltip_set_custom(tooltip, custom_widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tooltip_set_custom(long tooltip, long custom_widget);
+
+ /* GtkTreeModel */
/**
* @param tree_model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_model_get(long tree_model, long iter, int column, long[] value, int terminator);
- public static final void gtk_tree_model_get(long tree_model, long iter, int column, long[] value, int terminator) {
- lock.lock();
- try {
- _gtk_tree_model_get(tree_model, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_model_get(long tree_model, long iter, int column, long[] value, int terminator);
/**
* @param tree_model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_model_get(long tree_model, long iter, int column, int[] value, int terminator);
- public static final void gtk_tree_model_get(long tree_model, long iter, int column, int[] value, int terminator) {
- lock.lock();
- try {
- _gtk_tree_model_get(tree_model, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_model_get(long tree_model, long iter, int column, int[] value, int terminator);
/**
* @param tree_model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
* @param path cast=(GtkTreePath *)
*/
- public static final native boolean _gtk_tree_model_get_iter(long tree_model, long iter, long path);
- public static final boolean gtk_tree_model_get_iter(long tree_model, long iter, long path) {
- lock.lock();
- try {
- return _gtk_tree_model_get_iter(tree_model, iter, path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_model_get_iter(long tree_model, long iter, long path);
/**
* @param tree_model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native boolean _gtk_tree_model_get_iter_first(long tree_model, long iter);
- public static final boolean gtk_tree_model_get_iter_first(long tree_model, long iter) {
- lock.lock();
- try {
- return _gtk_tree_model_get_iter_first(tree_model, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_model_get_iter_first(long tree_model, long iter);
/** @param tree_model cast=(GtkTreeModel *) */
- public static final native int _gtk_tree_model_get_n_columns(long tree_model);
- public static final int gtk_tree_model_get_n_columns(long tree_model) {
- lock.lock();
- try {
- return _gtk_tree_model_get_n_columns(tree_model);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_tree_model_get_n_columns(long tree_model);
+ /**
+ * @param tree_model cast=(GtkTreeModel *)
+ * @param iter cast=(GtkTreeIter *)
+ */
+ public static final native long gtk_tree_model_get_path(long tree_model, long iter);
+ public static final native long gtk_tree_model_get_type();
/**
* @param tree_model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
+ * @param value cast=(GValue *)
*/
- public static final native long _gtk_tree_model_get_path(long tree_model, long iter);
- public static final long gtk_tree_model_get_path(long tree_model, long iter) {
- lock.lock();
- try {
- return _gtk_tree_model_get_path(tree_model, iter);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_tree_model_get_type();
- public static final long gtk_tree_model_get_type() {
- lock.lock();
- try {
- return _gtk_tree_model_get_type();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_model_get_value(long tree_model, long iter, int column, long value);
+
/**
* @param model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
* @param parent cast=(GtkTreeIter *)
*/
- public static final native boolean _gtk_tree_model_iter_children(long model, long iter, long parent);
- public static final boolean gtk_tree_model_iter_children(long model, long iter, long parent) {
- lock.lock();
- try {
- return _gtk_tree_model_iter_children(model, iter, parent);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_model_iter_children(long model, long iter, long parent);
/**
* @param model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native int _gtk_tree_model_iter_n_children(long model, long iter);
- public static final int gtk_tree_model_iter_n_children(long model, long iter) {
- lock.lock();
- try {
- return _gtk_tree_model_iter_n_children(model, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_tree_model_iter_n_children(long model, long iter);
/**
* @param model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native boolean _gtk_tree_model_iter_next(long model, long iter);
- public static final boolean gtk_tree_model_iter_next(long model, long iter) {
- lock.lock();
- try {
- return _gtk_tree_model_iter_next(model, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_model_iter_next(long model, long iter);
/**
* @param tree_model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
* @param parent cast=(GtkTreeIter *)
*/
- public static final native boolean _gtk_tree_model_iter_nth_child(long tree_model, long iter, long parent, int n);
- public static final boolean gtk_tree_model_iter_nth_child(long tree_model, long iter, long parent, int n) {
- lock.lock();
- try {
- return _gtk_tree_model_iter_nth_child(tree_model, iter, parent, n);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_model_iter_nth_child(long tree_model, long iter, long parent, int n);
+
+ /* GtkTreePath */
/** @param path cast=(GtkTreePath *) */
- public static final native void _gtk_tree_path_append_index(long path, int index);
- public static final void gtk_tree_path_append_index(long path, int index) {
- lock.lock();
- try {
- _gtk_tree_path_append_index(path, index);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_path_append_index(long path, int index);
/**
* @param a cast=(const GtkTreePath *)
* @param b cast=(const GtkTreePath *)
*/
- public static final native long _gtk_tree_path_compare(long a, long b);
- public static final long gtk_tree_path_compare(long a, long b) {
- lock.lock();
- try {
- return _gtk_tree_path_compare(a, b);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_path_compare(long a, long b);
/** @param path cast=(GtkTreePath *) */
- public static final native void _gtk_tree_path_free(long path);
- public static final void gtk_tree_path_free(long path) {
- lock.lock();
- try {
- _gtk_tree_path_free(path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_path_free(long path);
/** @param path cast=(GtkTreePath *) */
- public static final native int _gtk_tree_path_get_depth(long path);
- public static final int gtk_tree_path_get_depth(long path) {
- lock.lock();
- try {
- return _gtk_tree_path_get_depth(path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_tree_path_get_depth(long path);
/** @param path cast=(GtkTreePath *) */
- public static final native long _gtk_tree_path_get_indices(long path);
- public static final long gtk_tree_path_get_indices(long path) {
- lock.lock();
- try {
- return _gtk_tree_path_get_indices(path);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_tree_path_new();
- public static final long gtk_tree_path_new() {
- lock.lock();
- try {
- return _gtk_tree_path_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_path_get_indices(long path);
+ public static final native long gtk_tree_path_new();
/** @param path cast=(const gchar *) */
- public static final native long _gtk_tree_path_new_from_string(byte[] path);
- public static final long gtk_tree_path_new_from_string(byte[] path) {
- lock.lock();
- try {
- return _gtk_tree_path_new_from_string(path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_path_new_from_string(byte[] path);
/** @param path cast=(const gchar *) */
- public static final native long _gtk_tree_path_new_from_string(long path);
- public static final long gtk_tree_path_new_from_string(long path) {
- lock.lock();
- try {
- return _gtk_tree_path_new_from_string(path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_path_new_from_string(long path);
/** @param path cast=(GtkTreePath *) */
- public static final native void _gtk_tree_path_next(long path);
- public static final void gtk_tree_path_next(long path) {
- lock.lock();
- try {
- _gtk_tree_path_next(path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_path_next(long path);
/** @param path cast=(GtkTreePath *) */
- public static final native boolean _gtk_tree_path_prev(long path);
- public static final boolean gtk_tree_path_prev(long path) {
- lock.lock();
- try {
- return _gtk_tree_path_prev(path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_path_prev(long path);
/** @param path cast=(GtkTreePath *) */
- public static final native boolean _gtk_tree_path_up(long path);
- public static final boolean gtk_tree_path_up(long path) {
- lock.lock();
- try {
- return _gtk_tree_path_up(path);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection cast=(GtkTreeSelection *)
- */
- public static final native int _gtk_tree_selection_count_selected_rows(long selection);
- public static final int gtk_tree_selection_count_selected_rows(long selection) {
- lock.lock();
- try {
- return _gtk_tree_selection_count_selected_rows(selection);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_path_up(long path);
+
+ /* GtkTreeSelection */
+ /** @param selection cast=(GtkTreeSelection *) */
+ public static final native int gtk_tree_selection_count_selected_rows(long selection);
/**
* @param selection cast=(GtkTreeSelection *)
* @param model cast=(GtkTreeModel **)
*/
- public static final native long _gtk_tree_selection_get_selected_rows(long selection, long [] model);
- public static final long gtk_tree_selection_get_selected_rows(long selection, long [] model) {
- lock.lock();
- try {
- return _gtk_tree_selection_get_selected_rows(selection, model);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_selection_get_selected_rows(long selection, long [] model);
/**
* @param selection cast=(GtkTreeSelection *)
* @param path cast=(GtkTreePath *)
*/
- public static final native boolean _gtk_tree_selection_path_is_selected(long selection, long path);
- public static final boolean gtk_tree_selection_path_is_selected(long selection, long path) {
- lock.lock();
- try {
- return _gtk_tree_selection_path_is_selected(selection, path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_selection_path_is_selected(long selection, long path);
/** @param selection cast=(GtkTreeSelection *) */
- public static final native void _gtk_tree_selection_select_all(long selection);
- public static final void gtk_tree_selection_select_all(long selection) {
- lock.lock();
- try {
- _gtk_tree_selection_select_all(selection);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_selection_select_all(long selection);
/**
* @param selection cast=(GtkTreeSelection *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_selection_select_iter(long selection, long iter);
- public static final void gtk_tree_selection_select_iter(long selection, long iter) {
- lock.lock();
- try {
- _gtk_tree_selection_select_iter(selection, iter);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection cast=(GtkTreeSelection *)
- */
- public static final native long _gtk_tree_selection_get_select_function(long selection);
- public static final long gtk_tree_selection_get_select_function(long selection) {
- lock.lock();
- try {
- return _gtk_tree_selection_get_select_function(selection);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_selection_select_iter(long selection, long iter);
/**
* @param selection cast=(GtkTreeSelection *)
* @param func cast=(GtkTreeSelectionFunc)
* @param data cast=(gpointer)
* @param destroy cast=(GDestroyNotify)
*/
- public static final native void _gtk_tree_selection_set_select_function(long selection, long func, long data, long destroy);
- public static final void gtk_tree_selection_set_select_function(long selection, long func, long data, long destroy) {
- lock.lock();
- try {
- _gtk_tree_selection_set_select_function(selection, func, data, destroy);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param selection cast=(GtkTreeSelection *)
- * @param path cast=(GtkTreePath *)
- */
- public static final native void _gtk_tree_selection_select_path(long selection, long path);
- public static final void gtk_tree_selection_select_path(long selection, long path) {
- lock.lock();
- try {
- _gtk_tree_selection_select_path(selection, path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_selection_set_select_function(long selection, long func, long data, long destroy);
/**
* @param selection cast=(GtkTreeSelection *)
* @param mode cast=(GtkSelectionMode)
*/
- public static final native void _gtk_tree_selection_set_mode(long selection, int mode);
- public static final void gtk_tree_selection_set_mode(long selection, int mode) {
- lock.lock();
- try {
- _gtk_tree_selection_set_mode(selection, mode);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_selection_set_mode(long selection, int mode);
/**
* @param selection cast=(GtkTreeSelection *)
* @param path cast=(GtkTreePath *)
*/
- public static final native void _gtk_tree_selection_unselect_path(long selection, long path);
- public static final void gtk_tree_selection_unselect_path(long selection, long path) {
- lock.lock();
- try {
- _gtk_tree_selection_unselect_path(selection, path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_selection_unselect_path(long selection, long path);
/** @param selection cast=(GtkTreeSelection *) */
- public static final native void _gtk_tree_selection_unselect_all(long selection);
- public static final void gtk_tree_selection_unselect_all(long selection) {
- lock.lock();
- try {
- _gtk_tree_selection_unselect_all(selection);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_selection_unselect_all(long selection);
/**
* @param selection cast=(GtkTreeSelection *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_selection_unselect_iter(long selection, long iter);
- public static final void gtk_tree_selection_unselect_iter(long selection, long iter) {
- lock.lock();
- try {
- _gtk_tree_selection_unselect_iter(selection, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_selection_unselect_iter(long selection, long iter);
+
+ /* GtkTreeStore */
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
* @param parent cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_store_append(long store, long iter, long parent);
- public static final void gtk_tree_store_append(long store, long iter, long parent) {
- lock.lock();
- try {
- _gtk_tree_store_append(store, iter, parent);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_append(long store, long iter, long parent);
/** @param store cast=(GtkTreeStore *) */
- public static final native void _gtk_tree_store_clear(long store);
- public static final void gtk_tree_store_clear(long store) {
- lock.lock();
- try {
- _gtk_tree_store_clear(store);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_clear(long store);
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
* @param parent cast=(GtkTreeIter *)
* @param position cast=(gint)
*/
- public static final native void _gtk_tree_store_insert(long store, long iter, long parent, int position);
- public static final void gtk_tree_store_insert(long store, long iter, long parent, int position) {
- lock.lock();
- try {
- _gtk_tree_store_insert(store, iter, parent, position);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_insert(long store, long iter, long parent, int position);
+ /**
+ * @param store cast=(GtkTreeStore *)
+ * @param iter cast=(GtkTreeIter *)
+ * @param parent cast=(GtkTreeIter *)
+ * @param sibling cast=(GtkTreeIter *)
+ */
+ public static final native void gtk_tree_store_insert_after(long store, long iter, long parent, long sibling);
/** @param types cast=(GType *) */
- public static final native long _gtk_tree_store_newv(int numColumns, long [] types);
- public static final long gtk_tree_store_newv(int numColumns, long [] types) {
- lock.lock();
- try {
- return _gtk_tree_store_newv(numColumns, types);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_store_newv(int numColumns, long [] types);
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
+ * @param parent cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_store_remove(long store, long iter);
- public static final void gtk_tree_store_remove(long store, long iter) {
- lock.lock();
- try {
- _gtk_tree_store_remove(store, iter);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_prepend(long store, long iter, long parent);
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_store_set(long store, long iter, int column, byte[] value, int terminator);
- public static final void gtk_tree_store_set(long store, long iter, int column, byte[] value, int terminator) {
- lock.lock();
- try {
- _gtk_tree_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_remove(long store, long iter);
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_store_set(long store, long iter, int column, int value, int terminator);
- public static final void gtk_tree_store_set(long store, long iter, int column, int value, int terminator) {
- lock.lock();
- try {
- _gtk_tree_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_set(long store, long iter, int column, byte[] value, int terminator);
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_store_set(long store, long iter, int column, long value, int terminator);
- public static final void gtk_tree_store_set(long store, long iter, int column, long value, int terminator) {
- lock.lock();
- try {
- _gtk_tree_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_set(long store, long iter, int column, int value, int terminator);
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
- * @param value flags=no_out
*/
- public static final native void _gtk_tree_store_set(long store, long iter, int column, GdkRGBA value, int terminator);
- public static final void gtk_tree_store_set(long store, long iter, int column, GdkRGBA value, int terminator) {
- lock.lock();
- try {
- _gtk_tree_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_set(long store, long iter, int column, long value, int terminator);
/**
* @param store cast=(GtkTreeStore *)
* @param iter cast=(GtkTreeIter *)
+ * @param value flags=no_out
*/
- public static final native void _gtk_tree_store_set(long store, long iter, int column, boolean value, int terminator);
- public static final void gtk_tree_store_set(long store, long iter, int column, boolean value, int terminator) {
- lock.lock();
- try {
- _gtk_tree_store_set(store, iter, column, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_set(long store, long iter, int column, GdkRGBA value, int terminator);
/**
- * @param view cast=(GtkTreeView *)
- * @param path cast=(GtkTreePath *)
+ * @param store cast=(GtkTreeStore *)
+ * @param iter cast=(GtkTreeIter *)
*/
- public static final native long _gtk_tree_view_create_row_drag_icon(long view, long path);
- public static final long gtk_tree_view_create_row_drag_icon(long view, long path) {
- lock.lock();
- try {
- return _gtk_tree_view_create_row_drag_icon(view, path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_set(long store, long iter, int column, boolean value, int terminator);
/**
- * @param view cast=(GtkTreeView *)
- * @param path cast=(GtkTreePath *)
+ * @param store cast=(GtkTreeStore *)
+ * @param iter cast=(GtkTreeIter *)
+ * @param value cast=(GValue *)
*/
- public static final native boolean _gtk_tree_view_collapse_row(long view, long path);
- public static final boolean gtk_tree_view_collapse_row(long view, long path) {
- lock.lock();
- try {
- return _gtk_tree_view_collapse_row(view, path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_store_set_value(long store, long iter, int column, long value);
+
+ /* GtkTreeViewColumn */
/**
* @param treeColumn cast=(GtkTreeViewColumn *)
* @param cellRenderer cast=(GtkCellRenderer *)
* @param attribute cast=(const gchar *)
* @param column cast=(gint)
*/
- public static final native void _gtk_tree_view_column_add_attribute(long treeColumn, long cellRenderer, byte[] attribute, int column);
- public static final void gtk_tree_view_column_add_attribute(long treeColumn, long cellRenderer, byte[] attribute, int column) {
- lock.lock();
- try {
- _gtk_tree_view_column_add_attribute(treeColumn, cellRenderer, attribute, column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_add_attribute(long treeColumn, long cellRenderer, byte[] attribute, int column);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param cell_renderer cast=(GtkCellRenderer *)
* @param start_pos cast=(gint *)
* @param width cast=(gint *)
*/
- public static final native boolean _gtk_tree_view_column_cell_get_position(long tree_column, long cell_renderer, int[] start_pos, int[] width);
- public static final boolean gtk_tree_view_column_cell_get_position(long tree_column, long cell_renderer, int[] start_pos, int[] width) {
- lock.lock();
- try {
- return _gtk_tree_view_column_cell_get_position(tree_column, cell_renderer, start_pos, width);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param tree_column cast=(GtkTreeViewColumn *)
- * @param cell_area cast=(GdkRectangle *),flags=no_in
- * @param x_offset cast=(gint *)
- * @param y_offset cast=(gint *)
- * @param width cast=(gint *)
- * @param height cast=(gint *)
- */
- public static final native void _gtk_tree_view_column_cell_get_size(long tree_column, GdkRectangle cell_area, int[] x_offset, int[] y_offset, int[] width, int[] height);
- public static final void gtk_tree_view_column_cell_get_size(long tree_column, GdkRectangle cell_area, int[] x_offset, int[] y_offset, int[] width, int[] height) {
- lock.lock();
- try {
- _gtk_tree_view_column_cell_get_size(tree_column, cell_area, x_offset, y_offset, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_column_cell_get_position(long tree_column, long cell_renderer, int[] start_pos, int[] width);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param tree_model cast=(GtkTreeModel *)
* @param iter cast=(GtkTreeIter *)
*/
- public static final native void _gtk_tree_view_column_cell_set_cell_data(long tree_column, long tree_model, long iter, boolean is_expander, boolean is_expanded);
- public static final void gtk_tree_view_column_cell_set_cell_data(long tree_column, long tree_model, long iter, boolean is_expander, boolean is_expanded) {
- lock.lock();
- try {
- _gtk_tree_view_column_cell_set_cell_data(tree_column, tree_model, iter, is_expander, is_expanded);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_cell_set_cell_data(long tree_column, long tree_model, long iter, boolean is_expander, boolean is_expanded);
/** @param tree_column cast=(GtkTreeViewColumn *) */
- public static final native void _gtk_tree_view_column_clear(long tree_column);
- public static final void gtk_tree_view_column_clear(long tree_column) {
- lock.lock();
- try {
- _gtk_tree_view_column_clear(tree_column);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param column cast=(GtkTreeViewColumn *)
- */
- public static final native long _gtk_tree_view_column_get_button(long column);
- public static final long gtk_tree_view_column_get_button(long column) {
- lock.lock();
- try {
- return _gtk_tree_view_column_get_button(column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_clear(long tree_column);
/** @param column cast=(GtkTreeViewColumn *) */
- public static final native int _gtk_tree_view_column_get_fixed_width(long column);
- public static final int gtk_tree_view_column_get_fixed_width(long column) {
- lock.lock();
- try {
- return _gtk_tree_view_column_get_fixed_width(column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_view_column_get_button(long column);
/** @param column cast=(GtkTreeViewColumn *) */
- public static final native boolean _gtk_tree_view_column_get_reorderable(long column);
- public static final boolean gtk_tree_view_column_get_reorderable(long column) {
- lock.lock();
- try {
- return _gtk_tree_view_column_get_reorderable(column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_tree_view_column_get_fixed_width(long column);
/** @param column cast=(GtkTreeViewColumn *) */
- public static final native boolean _gtk_tree_view_column_get_resizable(long column);
- public static final boolean gtk_tree_view_column_get_resizable(long column) {
- lock.lock();
- try {
- return _gtk_tree_view_column_get_resizable(column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_column_get_reorderable(long column);
/** @param column cast=(GtkTreeViewColumn *) */
- public static final native boolean _gtk_tree_view_column_get_visible(long column);
- public static final boolean gtk_tree_view_column_get_visible(long column) {
- lock.lock();
- try {
- return _gtk_tree_view_column_get_visible(column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_column_get_resizable(long column);
/** @param column cast=(GtkTreeViewColumn *) */
- public static final native int _gtk_tree_view_column_get_width(long column);
- public static final int gtk_tree_view_column_get_width(long column) {
- lock.lock();
- try {
- return _gtk_tree_view_column_get_width(column);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_tree_view_column_new();
- public static final long gtk_tree_view_column_new() {
- lock.lock();
- try {
- return _gtk_tree_view_column_new();
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_column_get_visible(long column);
+ /** @param column cast=(GtkTreeViewColumn *) */
+ public static final native int gtk_tree_view_column_get_width(long column);
+ public static final native long gtk_tree_view_column_new();
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param cell_renderer cast=(GtkCellRenderer *)
* @param expand cast=(gboolean)
*/
- public static final native void _gtk_tree_view_column_pack_start(long tree_column, long cell_renderer, boolean expand);
- public static final void gtk_tree_view_column_pack_start(long tree_column, long cell_renderer, boolean expand) {
- lock.lock();
- try {
- _gtk_tree_view_column_pack_start(tree_column, cell_renderer, expand);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_pack_start(long tree_column, long cell_renderer, boolean expand);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param cell_renderer cast=(GtkCellRenderer *)
* @param expand cast=(gboolean)
*/
- public static final native void _gtk_tree_view_column_pack_end(long tree_column, long cell_renderer, boolean expand);
- public static final void gtk_tree_view_column_pack_end(long tree_column, long cell_renderer, boolean expand) {
- lock.lock();
- try {
- _gtk_tree_view_column_pack_end(tree_column, cell_renderer, expand);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_pack_end(long tree_column, long cell_renderer, boolean expand);
/** @param tree_column cast=(GtkTreeViewColumn *) */
- public static final native void _gtk_tree_view_column_set_alignment(long tree_column, float xalign);
- public static final void gtk_tree_view_column_set_alignment(long tree_column, float xalign) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_alignment(tree_column, xalign);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_alignment(long tree_column, float xalign);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param cell_renderer cast=(GtkCellRenderer *)
@@ -7853,269 +1984,108 @@ public class GTK extends OS {
* @param func_data cast=(gpointer)
* @param destroy cast=(GDestroyNotify)
*/
- public static final native void _gtk_tree_view_column_set_cell_data_func(long tree_column, long cell_renderer, long func, long func_data, long destroy);
- public static final void gtk_tree_view_column_set_cell_data_func(long tree_column, long cell_renderer, long func, long func_data, long destroy) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_cell_data_func(tree_column, cell_renderer, func, func_data, destroy);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_cell_data_func(long tree_column, long cell_renderer, long func, long func_data, long destroy);
/**
* @param column cast=(GtkTreeViewColumn *)
* @param clickable cast=(gboolean)
*/
- public static final native void _gtk_tree_view_column_set_clickable(long column, boolean clickable);
- public static final void gtk_tree_view_column_set_clickable(long column, boolean clickable) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_clickable(column, clickable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_clickable(long column, boolean clickable);
/**
* @param column cast=(GtkTreeViewColumn *)
* @param fixed_width cast=(gint)
*/
- public static final native void _gtk_tree_view_column_set_fixed_width(long column, int fixed_width);
- public static final void gtk_tree_view_column_set_fixed_width(long column, int fixed_width) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_fixed_width(column, fixed_width);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_fixed_width(long column, int fixed_width);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param min_width cast=(gint)
*/
- public static final native void _gtk_tree_view_column_set_min_width(long tree_column, int min_width);
- public static final void gtk_tree_view_column_set_min_width(long tree_column, int min_width) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_min_width(tree_column, min_width);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_min_width(long tree_column, int min_width);
/**
* @param column cast=(GtkTreeViewColumn *)
* @param reorderable cast=(gboolean)
*/
- public static final native void _gtk_tree_view_column_set_reorderable(long column, boolean reorderable);
- public static final void gtk_tree_view_column_set_reorderable(long column, boolean reorderable) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_reorderable(column, reorderable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_reorderable(long column, boolean reorderable);
/**
* @param column cast=(GtkTreeViewColumn *)
* @param resizable cast=(gboolean)
*/
- public static final native void _gtk_tree_view_column_set_resizable(long column, boolean resizable);
- public static final void gtk_tree_view_column_set_resizable(long column, boolean resizable) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_resizable(column, resizable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_resizable(long column, boolean resizable);
/**
* @param column cast=(GtkTreeViewColumn *)
* @param type cast=(GtkTreeViewColumnSizing)
*/
- public static final native void _gtk_tree_view_column_set_sizing(long column, int type);
- public static final void gtk_tree_view_column_set_sizing(long column, int type) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_sizing(column, type);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_sizing(long column, int type);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param setting cast=(gboolean)
*/
- public static final native void _gtk_tree_view_column_set_sort_indicator(long tree_column, boolean setting);
- public static final void gtk_tree_view_column_set_sort_indicator(long tree_column, boolean setting) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_sort_indicator(tree_column, setting);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_sort_indicator(long tree_column, boolean setting);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param order cast=(GtkSortType)
*/
- public static final native void _gtk_tree_view_column_set_sort_order(long tree_column, int order);
- public static final void gtk_tree_view_column_set_sort_order(long tree_column, int order) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_sort_order(tree_column, order);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_sort_order(long tree_column, int order);
/** @param tree_column cast=(GtkTreeViewColumn *) */
- public static final native void _gtk_tree_view_column_set_visible (long tree_column, boolean visible);
- public static final void gtk_tree_view_column_set_visible (long tree_column, boolean visible) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_visible(tree_column, visible);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_visible(long tree_column, boolean visible);
/**
* @param tree_column cast=(GtkTreeViewColumn *)
* @param widget cast=(GtkWidget *)
*/
- public static final native void _gtk_tree_view_column_set_widget(long tree_column, long widget);
- public static final void gtk_tree_view_column_set_widget(long tree_column, long widget) {
- lock.lock();
- try {
- _gtk_tree_view_column_set_widget(tree_column, widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_column_set_widget(long tree_column, long widget);
+
+ /* GtkTreeView */
+ /**
+ * @param view cast=(GtkTreeView *)
+ * @param path cast=(GtkTreePath *)
+ */
+ public static final native long gtk_tree_view_create_row_drag_icon(long view, long path);
/**
* @param view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
*/
- public static final native void _gtk_tree_view_set_drag_dest_row(long view, long path, int pos);
- public static final void gtk_tree_view_set_drag_dest_row(long view, long path, int pos) {
- lock.lock();
- try {
- _gtk_tree_view_set_drag_dest_row(view, path, pos);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_collapse_row(long view, long path);
+ /**
+ * @param view cast=(GtkTreeView *)
+ * @param path cast=(GtkTreePath *)
+ */
+ public static final native void gtk_tree_view_set_drag_dest_row(long view, long path, int pos);
/**
* @param view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
* @param open_all cast=(gboolean)
*/
- public static final native boolean _gtk_tree_view_expand_row(long view, long path, boolean open_all);
- public static final boolean gtk_tree_view_expand_row(long view, long path, boolean open_all) {
- lock.lock();
- try {
- return _gtk_tree_view_expand_row(view, path, open_all);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_expand_row(long view, long path, boolean open_all);
/**
* @param tree_view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
* @param column cast=(GtkTreeViewColumn *)
* @param rect cast=(GdkRectangle *)
*/
- public static final native void _gtk_tree_view_get_background_area(long tree_view, long path, long column, GdkRectangle rect);
- public static final void gtk_tree_view_get_background_area(long tree_view, long path, long column, GdkRectangle rect) {
- lock.lock();
- try {
- _gtk_tree_view_get_background_area(tree_view, path, column, rect);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param tree_view cast=(GtkTreeView *)
- */
- public static final native long _gtk_tree_view_get_bin_window(long tree_view);
- /** [GTK3 only, if-def'd in os.h] */
- public static final long gtk_tree_view_get_bin_window(long tree_view) {
- lock.lock();
- try {
- return _gtk_tree_view_get_bin_window(tree_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_get_background_area(long tree_view, long path, long column, GdkRectangle rect);
/**
* @param tree_view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
* @param column cast=(GtkTreeViewColumn *)
* @param rect cast=(GdkRectangle *),flags=no_in
*/
- public static final native void _gtk_tree_view_get_cell_area(long tree_view, long path, long column, GdkRectangle rect);
- public static final void gtk_tree_view_get_cell_area(long tree_view, long path, long column, GdkRectangle rect) {
- lock.lock();
- try {
- _gtk_tree_view_get_cell_area(tree_view, path, column, rect);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_get_cell_area(long tree_view, long path, long column, GdkRectangle rect);
/** @param tree_view cast=(GtkTreeView *) */
- public static final native long _gtk_tree_view_get_expander_column(long tree_view);
- public static final long gtk_tree_view_get_expander_column(long tree_view) {
- lock.lock();
- try {
- return _gtk_tree_view_get_expander_column(tree_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_view_get_expander_column(long tree_view);
/**
* @param tree_view cast=(GtkTreeView *)
* @param n cast=(gint)
*/
- public static final native long _gtk_tree_view_get_column(long tree_view, int n);
- public static final long gtk_tree_view_get_column(long tree_view, int n) {
- lock.lock();
- try {
- return _gtk_tree_view_get_column(tree_view, n);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_view_get_column(long tree_view, int n);
/** @param tree_view cast=(GtkTreeView *) */
- public static final native long _gtk_tree_view_get_columns(long tree_view);
- public static final long gtk_tree_view_get_columns(long tree_view) {
- lock.lock();
- try {
- return _gtk_tree_view_get_columns(tree_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_view_get_columns(long tree_view);
/**
* @param tree_view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath **)
* @param focus_column cast=(GtkTreeViewColumn **)
*/
- public static final native void _gtk_tree_view_get_cursor(long tree_view, long [] path, long [] focus_column);
- public static final void gtk_tree_view_get_cursor(long tree_view, long [] path, long [] focus_column) {
- lock.lock();
- try {
- _gtk_tree_view_get_cursor(tree_view, path, focus_column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_get_cursor(long tree_view, long [] path, long [] focus_column);
/** @param tree_view cast=(GtkTreeView *) */
- public static final native boolean _gtk_tree_view_get_headers_visible(long tree_view);
- public static final boolean gtk_tree_view_get_headers_visible(long tree_view) {
- lock.lock();
- try {
- return _gtk_tree_view_get_headers_visible(tree_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_get_headers_visible(long tree_view);
/**
* @param tree_view cast=(GtkTreeView *)
* @param x cast=(gint)
@@ -8125,102 +2095,38 @@ public class GTK extends OS {
* @param cell_x cast=(gint *)
* @param cell_y cast=(gint *)
*/
- public static final native boolean _gtk_tree_view_get_path_at_pos(long tree_view, int x, int y, long [] path, long [] column, int[] cell_x, int[] cell_y);
- public static final boolean gtk_tree_view_get_path_at_pos(long tree_view, int x, int y, long [] path, long [] column, int[] cell_x, int[] cell_y) {
- lock.lock();
- try {
- return _gtk_tree_view_get_path_at_pos(tree_view, x, y, path, column, cell_x, cell_y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_get_path_at_pos(long tree_view, int x, int y, long [] path, long [] column, int[] cell_x, int[] cell_y);
/** @param tree_view cast=(GtkTreeView *) */
- public static final native long _gtk_tree_view_get_selection(long tree_view);
- public static final long gtk_tree_view_get_selection(long tree_view) {
- lock.lock();
- try {
- return _gtk_tree_view_get_selection(tree_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_view_get_selection(long tree_view);
/**
* @param tree_view cast=(GtkTreeView *)
* @param visible_rect flags=no_in
*/
- public static final native void _gtk_tree_view_get_visible_rect(long tree_view, GdkRectangle visible_rect);
- public static final void gtk_tree_view_get_visible_rect(long tree_view, GdkRectangle visible_rect) {
- lock.lock();
- try {
- _gtk_tree_view_get_visible_rect(tree_view, visible_rect);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_get_visible_rect(long tree_view, GdkRectangle visible_rect);
/**
* @param tree_view cast=(GtkTreeView *)
* @param column cast=(GtkTreeViewColumn *)
* @param position cast=(gint)
*/
- public static final native int _gtk_tree_view_insert_column(long tree_view, long column, int position);
- public static final int gtk_tree_view_insert_column(long tree_view, long column, int position) {
- lock.lock();
- try {
- return _gtk_tree_view_insert_column(tree_view, column, position);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_tree_view_insert_column(long tree_view, long column, int position);
/**
* @param tree_view cast=(GtkTreeView *)
* @param column cast=(GtkTreeViewColumn *)
* @param base_column cast=(GtkTreeViewColumn *)
*/
- public static final native void _gtk_tree_view_move_column_after(long tree_view, long column, long base_column);
- public static final void gtk_tree_view_move_column_after(long tree_view, long column, long base_column) {
- lock.lock();
- try {
- _gtk_tree_view_move_column_after(tree_view, column, base_column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_move_column_after(long tree_view, long column, long base_column);
/** @param model cast=(GtkTreeModel *) */
- public static final native long _gtk_tree_view_new_with_model(long model);
- public static final long gtk_tree_view_new_with_model(long model) {
- lock.lock();
- try {
- return _gtk_tree_view_new_with_model(model);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_tree_view_new_with_model(long model);
/**
* @param tree_view cast=(GtkTreeView *)
* @param column cast=(GtkTreeViewColumn *)
*/
- public static final native void _gtk_tree_view_remove_column(long tree_view, long column);
- public static final void gtk_tree_view_remove_column(long tree_view, long column) {
- lock.lock();
- try {
- _gtk_tree_view_remove_column(tree_view, column);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_remove_column(long tree_view, long column);
/**
* @param view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
*/
- public static final native boolean _gtk_tree_view_row_expanded(long view, long path);
- public static final boolean gtk_tree_view_row_expanded(long view, long path) {
- lock.lock();
- try {
- return _gtk_tree_view_row_expanded(view, path);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_tree_view_row_expanded(long view, long path);
/**
* @param tree_view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
@@ -8229,117 +2135,41 @@ public class GTK extends OS {
* @param row_aligh cast=(gfloat)
* @param column_align cast=(gfloat)
*/
- public static final native void _gtk_tree_view_scroll_to_cell(long tree_view, long path, long column, boolean use_align, float row_aligh, float column_align);
- public static final void gtk_tree_view_scroll_to_cell(long tree_view, long path, long column, boolean use_align, float row_aligh, float column_align) {
- lock.lock();
- try {
- _gtk_tree_view_scroll_to_cell(tree_view, path, column, use_align, row_aligh, column_align);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_scroll_to_cell(long tree_view, long path, long column, boolean use_align, float row_aligh, float column_align);
/**
* @param tree_view cast=(GtkTreeView *)
* @param tree_x cast=(gint)
* @param tree_y cast=(gint)
*/
- public static final native void _gtk_tree_view_scroll_to_point (long tree_view, int tree_x, int tree_y);
- public static final void gtk_tree_view_scroll_to_point (long tree_view, int tree_x, int tree_y) {
- lock.lock();
- try {
- _gtk_tree_view_scroll_to_point(tree_view, tree_x, tree_y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_scroll_to_point(long tree_view, int tree_x, int tree_y);
/**
* @param tree_view cast=(GtkTreeView *)
* @param path cast=(GtkTreePath *)
* @param focus_column cast=(GtkTreeViewColumn *)
*/
- public static final native void _gtk_tree_view_set_cursor(long tree_view, long path, long focus_column, boolean start_editing);
- public static final void gtk_tree_view_set_cursor(long tree_view, long path, long focus_column, boolean start_editing) {
- lock.lock();
- try {
- _gtk_tree_view_set_cursor(tree_view, path, focus_column, start_editing);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_set_cursor(long tree_view, long path, long focus_column, boolean start_editing);
/**
* @param tree_view cast=(GtkTreeView*)
* @param grid_lines cast=(GtkTreeViewGridLines)
*/
- public static final native void _gtk_tree_view_set_grid_lines(long tree_view, int grid_lines);
- public static final void gtk_tree_view_set_grid_lines(long tree_view, int grid_lines) {
- lock.lock();
- try {
- _gtk_tree_view_set_grid_lines(tree_view, grid_lines);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param tree_view cast=(GtkTreeView*)
- */
- public static final native int _gtk_tree_view_get_grid_lines(long tree_view);
- public static final int gtk_tree_view_get_grid_lines(long tree_view) {
- lock.lock();
- try {
- return _gtk_tree_view_get_grid_lines(tree_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_set_grid_lines(long tree_view, int grid_lines);
+ /** @param tree_view cast=(GtkTreeView*) */
+ public static final native int gtk_tree_view_get_grid_lines(long tree_view);
/**
* @param tree_view cast=(GtkTreeView *)
* @param visible cast=(gboolean)
*/
- public static final native void _gtk_tree_view_set_headers_visible(long tree_view, boolean visible);
- public static final void gtk_tree_view_set_headers_visible(long tree_view, boolean visible) {
- lock.lock();
- try {
- _gtk_tree_view_set_headers_visible(tree_view, visible);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_set_headers_visible(long tree_view, boolean visible);
/**
* @param tree_view cast=(GtkTreeView *)
* @param model cast=(GtkTreeModel *)
*/
- public static final native void _gtk_tree_view_set_model(long tree_view, long model);
- public static final void gtk_tree_view_set_model(long tree_view, long model) {
- lock.lock();
- try {
- _gtk_tree_view_set_model(tree_view, model);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_set_model(long tree_view, long model);
/**
* @param tree_view cast=(GtkTreeView *)
* @param column cast=(gint)
*/
- public static final native void _gtk_tree_view_set_search_column(long tree_view, int column);
- public static final void gtk_tree_view_set_search_column(long tree_view, int column) {
- lock.lock();
- try {
- _gtk_tree_view_set_search_column(tree_view, column);
- } finally {
- lock.unlock();
- }
- }
- /** @param tree_view cast=(GtkTreeView *) */
- public static final native void _gtk_tree_view_unset_rows_drag_dest(long tree_view);
- public static final void gtk_tree_view_unset_rows_drag_dest(long tree_view) {
- lock.lock();
- try {
- _gtk_tree_view_unset_rows_drag_dest(tree_view);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_set_search_column(long tree_view, int column);
/**
* @param tree_view cast=(GtkTreeView *)
* @param bx cast=(gint)
@@ -8347,1443 +2177,336 @@ public class GTK extends OS {
* @param tx cast=(gint *)
* @param ty cast=(gint *)
*/
- public static final native void _gtk_tree_view_convert_bin_window_to_tree_coords(long tree_view, int bx, int by, int[] tx, int[] ty);
- public static final void gtk_tree_view_convert_bin_window_to_tree_coords(long tree_view, int bx, int by, int[] tx, int[] ty) {
- lock.lock();
- try {
- _gtk_tree_view_convert_bin_window_to_tree_coords(tree_view, bx, by, tx, ty);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param viewport cast=(GtkViewport *)
- * @param type cast=(GtkShadowType)
- */
- public static final native void _gtk_viewport_set_shadow_type(long viewport, int type);
- public static final void gtk_viewport_set_shadow_type(long viewport, int type) {
- lock.lock();
- try {
- _gtk_viewport_set_shadow_type(viewport, type);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_tree_view_convert_bin_window_to_tree_coords(long tree_view, int bx, int by, int[] tx, int[] ty);
/**
- * @param widget cast=(GtkWidget *)
- * @param accel_signal cast=(const gchar *)
- * @param accel_group cast=(GtkAccelGroup *)
- * @param accel_key cast=(guint)
- * @param accel_mods cast=(GdkModifierType)
- */
- public static final native void _gtk_widget_add_accelerator(long widget, byte[] accel_signal, long accel_group, int accel_key, int accel_mods, int accel_flags);
- public static final void gtk_widget_add_accelerator(long widget, byte[] accel_signal, long accel_group, int accel_key, int accel_mods, int accel_flags) {
- lock.lock();
- try {
- _gtk_widget_add_accelerator(widget, accel_signal, accel_group, accel_key, accel_mods, accel_flags);
- } finally {
- lock.unlock();
- }
- }
+ * @param tree_view cast=(GtkTreeView *)
+ * @param wx cast=(int *)
+ * @param wy cast=(int *)
+ */
+ public static final native void gtk_tree_view_convert_bin_window_to_widget_coords(long tree_view, int bx, int by, int[]wx, int[] wy);
+
+ /* GtkWidget */
+ /** @param widget cast=(GtkWidget *) */
+ public static final native int gtk_widget_get_scale_factor(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_name(long widget);
/**
* @method flags=dynamic
+ * @param widget_class cast=(GtkWidgetClass *)
+ */
+ public static final native long gtk_widget_class_get_css_name(long widget_class);
+ /**
* @param widget cast=(GtkWidget *)
- * @param events cast=(gint)
- */
- public static final native void _gtk_widget_add_events(long widget, int events);
- /** [GTK3 only] */
- public static final void gtk_widget_add_events(long widget, int events) {
- lock.lock();
- try {
- _gtk_widget_add_events(widget, events);
- } finally {
- lock.unlock();
- }
- }
+ * @param minimum_size cast=(GtkRequisition *)
+ * @param natural_size cast=(GtkRequisition *)
+ */
+ public static final native void gtk_widget_get_preferred_size(long widget, GtkRequisition minimum_size, GtkRequisition natural_size);
/** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_child_focus(long widget, int direction);
- public static final boolean gtk_widget_child_focus(long widget, int direction) {
- lock.lock();
- try {
- return _gtk_widget_child_focus(widget, direction);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_unparent(long widget);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param text cast=(const gchar *)
+ * @param parent cast=(GtkWidget *)
*/
- public static final native long _gtk_widget_create_pango_layout(long widget, byte[] text);
- public static final long gtk_widget_create_pango_layout(long widget, byte[] text) {
- lock.lock();
- try {
- return _gtk_widget_create_pango_layout(widget, text);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_parent(long widget, long parent);
/**
* @param widget cast=(GtkWidget *)
- * @param text cast=(const gchar *)
+ * @param expand cast=(gboolean)
*/
- public static final native long _gtk_widget_create_pango_layout(long widget, long text);
- public static final long gtk_widget_create_pango_layout(long widget, long text) {
- lock.lock();
- try {
- return _gtk_widget_create_pango_layout(widget, text);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_destroy(long widget);
- public static final void gtk_widget_destroy(long widget) {
- lock.lock();
- try {
- _gtk_widget_destroy(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_hexpand(long widget, boolean expand);
/**
- * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param cr cast=(cairo_t *)
+ * @param expand cast=(gboolean)
*/
- public static final native void _gtk_widget_draw(long widget, long cr);
- /** [GTK3 only] */
- public static final void gtk_widget_draw(long widget, long cr) {
- lock.lock();
- try {
- _gtk_widget_draw(widget, cr);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_vexpand(long widget, boolean expand);
/**
* @param widget cast=(GtkWidget *)
- * @param event cast=(GdkEvent *)
- */
- public static final native boolean _gtk_widget_event(long widget, long event);
- public static final boolean gtk_widget_event(long widget, long event) {
- lock.lock();
- try {
- return _gtk_widget_event(widget, event);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_accessible (long widget);
- public static final long gtk_widget_get_accessible (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_accessible(widget);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_get_visible (long widget);
- public static final boolean gtk_widget_get_visible (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_visible(widget);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_get_realized (long widget);
- public static final boolean gtk_widget_get_realized (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_realized(widget);
- } finally {
- lock.unlock();
- }
- }
+ * @param gtk_align cast=(GtkAlign)
+ */
+ public static final native void gtk_widget_set_halign(long widget, int gtk_align);
/**
* @param widget cast=(GtkWidget *)
+ * @param gtk_align cast=(GtkAlign)
*/
- public static final native boolean _gtk_widget_get_has_window (long widget);
- /** [GTK3 only, if-def'd in os.h] */
- public static final boolean gtk_widget_get_has_window (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_has_window(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_valign(long widget, int gtk_align);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param margin cast=(gint)
*/
- public static final native boolean _gtk_widget_get_has_surface (long widget);
- /** [GTK4 only, if-def'd in os.h] */
- public static final boolean gtk_widget_get_has_surface (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_has_surface(widget);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_get_can_default (long widget);
- public static final boolean gtk_widget_get_can_default (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_can_default(widget);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_get_child_visible (long widget);
- public static final boolean gtk_widget_get_child_visible (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_child_visible(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_margin_start(long widget, int margin);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param margin cast=(gint)
*/
- public static final native int _gtk_widget_get_events(long widget);
- /** [GTK3 only] */
- public static final int gtk_widget_get_events(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_events(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_margin_end(long widget, int margin);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param margin cast=(gint)
*/
- public static final native long _gtk_widget_get_window (long widget);
- /** [GTK3 only] */
- public static final long gtk_widget_get_window (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_window(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_margin_top(long widget, int margin);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param margin cast=(gint)
+ */
+ public static final native void gtk_widget_set_margin_bottom(long widget, int margin);
+ /** @param self cast=(GtkWidget *) */
+ public static final native int gtk_widget_get_state_flags(long self);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_has_default(long widget);
+
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_sensitive(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param css_class cast=(const char *)
+ * */
+ public static final native void gtk_widget_add_css_class(long widget, byte[] css_class);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_child_focus(long widget, int direction);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param text cast=(const gchar *)
*/
- public static final native long _gtk_widget_get_surface (long widget);
- /** [GTK4 only] */
- public static final long gtk_widget_get_surface (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_surface(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_widget_create_pango_layout(long widget, byte[] text);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param text cast=(const gchar *)
+ */
+ public static final native long gtk_widget_create_pango_layout(long widget, long text);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_visible(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_realized(long widget);
+
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_child_visible(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native int _gtk_widget_get_margin_start (long widget);
- public static final int gtk_widget_get_margin_start (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_margin_start(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_widget_get_margin_start(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native int _gtk_widget_get_margin_end (long widget);
- public static final int gtk_widget_get_margin_end (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_margin_end(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_widget_get_margin_end(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native int _gtk_widget_get_margin_top (long widget);
- public static final int gtk_widget_get_margin_top (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_margin_top(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_widget_get_margin_top(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native int _gtk_widget_get_margin_bottom (long widget);
- public static final int gtk_widget_get_margin_bottom (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_margin_bottom(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native int gtk_widget_get_margin_bottom(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_get_mapped(long widget);
- public static final boolean gtk_widget_get_mapped(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_mapped(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_widget_get_mapped(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_pango_context(long widget);
- public static final long gtk_widget_get_pango_context(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_pango_context(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_widget_get_pango_context(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_parent(long widget);
- public static final long gtk_widget_get_parent(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_parent(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_widget_get_parent(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native long _gtk_widget_get_parent_window(long widget);
- public static final long gtk_widget_get_parent_window(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_parent_window(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_widget_get_parent_window(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native long _gtk_widget_get_parent_surface(long widget);
- public static final long gtk_widget_get_parent_surface(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_parent_surface(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_widget_get_parent_surface(long widget);
/**
* @param widget cast=(GtkWidget *)
* @param allocation cast=(GtkAllocation *),flags=no_in
* */
- public static final native void _gtk_widget_get_allocation (long widget, GtkAllocation allocation);
- public static final void gtk_widget_get_allocation (long widget, GtkAllocation allocation) {
- lock.lock();
- try {
- _gtk_widget_get_allocation(widget, allocation);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_get_allocation(long widget, GtkAllocation allocation);
/**
- * @param context cast=(GtkStyleContext *)
- * @param cr cast=(cairo_t *)
- * @param x cast=(gdouble)
- * @param y cast=(gdouble)
- * @param width cast=(gdouble)
- * @param height cast=(gdouble)
+ * @param widget cast=(GtkWidget *)
+ * @param group_cycling cast=(gboolean)
*/
- public static final native void _gtk_render_handle(long context, long cr, double x , double y, double width, double height);
- public static final void gtk_render_handle(long context, long cr, double x , double y, double width, double height) {
- lock.lock();
- try {
- _gtk_render_handle(context,cr, x ,y, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_widget_mnemonic_activate(long widget, boolean group_cycling);
/**
* @param widget cast=(GtkWidget *)
*/
- public static final native long _gtk_widget_get_style_context(long widget);
- public static final long gtk_widget_get_style_context(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_style_context(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_widget_get_style_context(long widget);
/**
* @param widget cast=(GtkWidget *)
* @param width cast=(gint *)
* @param height cast=(gint *)
*/
- public static final native void _gtk_widget_get_size_request(long widget, int [] width, int [] height);
- public static final void gtk_widget_get_size_request(long widget, int [] width, int [] height) {
- lock.lock();
- try {
- _gtk_widget_get_size_request(widget, width, height);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_toplevel (long widget);
- public static final long gtk_widget_get_toplevel (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_toplevel(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_get_size_request(long widget, int [] width, int [] height);
/** @param widget cast=(GtkWidget *) */
- public static final native long _gtk_widget_get_tooltip_text (long widget);
- public static final long gtk_widget_get_tooltip_text (long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_tooltip_text(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_grab_focus(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_grab_focus(long widget);
- public static final void gtk_widget_grab_focus(long widget) {
- lock.lock();
- try {
- _gtk_widget_grab_focus(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_widget_has_focus(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_has_focus(long widget);
- public static final boolean gtk_widget_has_focus(long widget) {
- lock.lock();
- try {
- return _gtk_widget_has_focus(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_hide(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_hide(long widget);
- public static final void gtk_widget_hide(long widget) {
- lock.lock();
- try {
- _gtk_widget_hide(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param region cast=(cairo_region_t *)
- */
- public static final native void _gtk_widget_input_shape_combine_region(long widget, long region);
- public static final void gtk_widget_input_shape_combine_region(long widget, long region) {
- lock.lock();
- try {
- _gtk_widget_input_shape_combine_region(widget, region);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_widget_is_focus(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native boolean _gtk_widget_is_focus(long widget);
- public static final boolean gtk_widget_is_focus(long widget) {
- lock.lock();
- try {
- return _gtk_widget_is_focus(widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_queue_resize(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_map(long widget);
- public static final void gtk_widget_map(long widget) {
- lock.lock();
- try {
- _gtk_widget_map(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param orientation cast=(GtkOrientation)
- * @param for_size cast=(int)
- * @param minimum cast=(int *)
- * @param natural cast=(int *)
- * @param minimum_baseline cast=(int *)
- * @param natural_baseline cast=(int *)
- */
- public static final native void _gtk_widget_measure(long widget, int orientation, int for_size, int[] minimum, int[] natural, int[] minimum_baseline, int[] natural_baseline);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_widget_measure(long widget, int orientation, int for_size, int[] minimum, int[] natural, int[] minimum_baseline, int[] natural_baseline) {
- lock.lock();
- try {
- _gtk_widget_measure(widget, orientation, for_size, minimum, natural, minimum_baseline, natural_baseline);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param group_cycling cast=(gboolean)
- */
- public static final native boolean _gtk_widget_mnemonic_activate(long widget, boolean group_cycling);
- public static final boolean gtk_widget_mnemonic_activate(long widget, boolean group_cycling) {
- lock.lock();
- try {
- return _gtk_widget_mnemonic_activate(widget, group_cycling);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_widget_override_color(long widget, int state, GdkRGBA color);
- /** [GTK3; 3.16 deprecated, replaced]*/
- public static final void gtk_widget_override_color(long widget, int state, GdkRGBA color) {
- lock.lock();
- try {
- _gtk_widget_override_color(widget, state, color);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_widget_override_background_color(long widget, int state, GdkRGBA color);
- /** [GTK3; 3.16 deprecated, replaced] */
- public static final void gtk_widget_override_background_color(long widget, int state, GdkRGBA color) {
- lock.lock();
- try {
- _gtk_widget_override_background_color(widget, state, color);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_widget_override_font(long widget, long font);
- /** [GTK3; 3.16 deprecated] */
- public static final void gtk_widget_override_font(long widget, long font) {
- lock.lock();
- try {
- _gtk_widget_override_font(widget, font);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_queue_resize(long widget);
- public static final void gtk_widget_queue_resize(long widget) {
- lock.lock();
- try {
- _gtk_widget_queue_resize(widget);
- } finally {
- lock.unlock();
- }
- }
- /** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_realize(long widget);
- public static final void gtk_widget_realize(long widget) {
- lock.lock();
- try {
- _gtk_widget_realize(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param accel_group cast=(GtkAccelGroup *)
- * @param accel_key cast=(guint)
- * @param accel_mods cast=(GdkModifierType)
- */
- public static final native void _gtk_widget_remove_accelerator(long widget, long accel_group, int accel_key, int accel_mods);
- public static final void gtk_widget_remove_accelerator(long widget, long accel_group, int accel_key, int accel_mods) {
- lock.lock();
- try {
- _gtk_widget_remove_accelerator(widget, accel_group, accel_key, accel_mods);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param new_parent cast=(GtkWidget *)
- */
- public static final native void _gtk_widget_reparent(long widget, long new_parent);
- /** deprecated as of 3.14 */
- public static final void gtk_widget_reparent(long widget, long new_parent) {
- lock.lock();
- try {
- _gtk_widget_reparent(widget, new_parent);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_realize(long widget);
/** @param dir cast=(GtkTextDirection) */
- public static final native void _gtk_widget_set_default_direction(int dir);
- public static final void gtk_widget_set_default_direction(int dir) {
- lock.lock();
- try {
- _gtk_widget_set_default_direction(dir);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param can_default cast=(gboolean)
- */
- public static final native void _gtk_widget_set_can_default(long widget, boolean can_default);
- public static final void gtk_widget_set_can_default(long widget, boolean can_default) {
- lock.lock();
- try {
- _gtk_widget_set_can_default(widget,can_default) ;
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_default_direction(int dir);
/** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_queue_draw(long widget);
- public static final void gtk_widget_queue_draw(long widget) {
- lock.lock();
- try {
- _gtk_widget_queue_draw(widget) ;
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_queue_draw(long widget);
/**
* @param widget cast=(GtkWidget *)
* @param can_focus cast=(gboolean)
*/
- public static final native void _gtk_widget_set_can_focus(long widget, boolean can_focus);
- public static final void gtk_widget_set_can_focus(long widget, boolean can_focus) {
- lock.lock();
- try {
- _gtk_widget_set_can_focus(widget,can_focus);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param cursor cast=(GdkCursor *)
- */
- public static final native void _gtk_widget_set_cursor(long widget, long cursor);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_widget_set_cursor(long widget, long cursor) {
- lock.lock();
- try {
- _gtk_widget_set_cursor(widget, cursor);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_can_focus(long widget, boolean can_focus);
/**
* @param widget cast=(GtkWidget *)
* @param visible cast=(gboolean)
*/
- public static final native void _gtk_widget_set_visible(long widget, boolean visible);
- public static final void gtk_widget_set_visible(long widget, boolean visible) {
- lock.lock();
- try {
- _gtk_widget_set_visible(widget, visible);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_visible(long widget, boolean visible);
/**
* @param widget cast=(GtkWidget *)
* @param dir cast=(GtkTextDirection)
*/
- public static final native void _gtk_widget_set_direction(long widget, int dir);
- public static final void gtk_widget_set_direction(long widget, int dir) {
- lock.lock();
- try {
- _gtk_widget_set_direction(widget, dir);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_direction(long widget, int dir);
/**
* @param widget cast=(GtkWidget *)
* @param receives_default cast=(gboolean)
*/
- public static final native void _gtk_widget_set_receives_default(long widget, boolean receives_default);
- public static final void gtk_widget_set_receives_default(long widget, boolean receives_default) {
- lock.lock();
- try {
- _gtk_widget_set_receives_default(widget, receives_default);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param double_buffered cast=(gboolean)
- */
- public static final native void _gtk_widget_set_double_buffered(long widget, boolean double_buffered);
- /** [GTK3 only; 3.14 deprecated] */
- public static final void gtk_widget_set_double_buffered(long widget, boolean double_buffered) {
- lock.lock();
- try {
- _gtk_widget_set_double_buffered(widget, double_buffered);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_receives_default(long widget, boolean receives_default);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param val cast=(gboolean)
*/
- public static final native void _gtk_widget_set_focus_on_click(long widget, boolean val);
- public static final void gtk_widget_set_focus_on_click(long widget, boolean val) {
- lock.lock();
- try {
- _gtk_widget_set_focus_on_click(widget, val);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param name cast=(const char *)
- */
- public static final native void _gtk_widget_set_name(long widget, byte[] name);
- public static final void gtk_widget_set_name(long widget, byte[] name) {
- lock.lock();
- try {
- _gtk_widget_set_name(widget, name);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_focus_on_click(long widget, boolean val);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native void _gtk_widget_set_opacity(long widget, double opacity);
- public static final void gtk_widget_set_opacity(long widget, double opacity) {
- lock.lock();
- try {
- _gtk_widget_set_opacity(widget, opacity);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_opacity(long widget, double opacity);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native double _gtk_widget_get_opacity(long widget);
- public static final double gtk_widget_get_opacity(long widget) {
- lock.lock();
- try {
- return _gtk_widget_get_opacity(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param redraw cast=(gboolean)
- */
- public static final native void _gtk_widget_set_redraw_on_allocate(long widget, boolean redraw);
- /** [GTK3 only] */
- public static final void gtk_widget_set_redraw_on_allocate(long widget, boolean redraw) {
- lock.lock();
- try {
- _gtk_widget_set_redraw_on_allocate(widget, redraw);
- } finally {
- lock.unlock();
- }
- }
+ public static final native double gtk_widget_get_opacity(long widget);
/**
* @param widget cast=(GtkWidget *)
* @param sensitive cast=(gboolean)
*/
- public static final native void _gtk_widget_set_sensitive(long widget, boolean sensitive);
- public static final void gtk_widget_set_sensitive(long widget, boolean sensitive) {
- lock.lock();
- try {
- _gtk_widget_set_sensitive(widget, sensitive);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_sensitive(long widget, boolean sensitive);
/**
* @param widget cast=(GtkWidget *)
* @param width cast=(gint)
* @param height cast=(gint)
*/
- public static final native void _gtk_widget_set_size_request(long widget, int width, int height);
- public static final void gtk_widget_set_size_request(long widget, int width, int height) {
- lock.lock();
- try {
- _gtk_widget_set_size_request(widget, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_set_size_request(long widget, int width, int height);
/** @param widget cast=(GtkWidget *) */
- public static final native void _gtk_widget_show(long widget);
- public static final void gtk_widget_show(long widget) {
- lock.lock();
- try {
- _gtk_widget_show(widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param allocation cast=(GtkAllocation *),flags=no_out
- */
- public static final native void _gtk_widget_size_allocate(long widget, GtkAllocation allocation);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_widget_size_allocate(long widget, GtkAllocation allocation) {
- lock.lock();
- try {
- _gtk_widget_size_allocate(widget, allocation);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param allocation cast=(GtkAllocation *),flags=no_out
- */
- public static final native void _gtk_widget_size_allocate(long widget, GtkAllocation allocation, int baseline);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_widget_size_allocate(long widget, GtkAllocation allocation, int baseline) {
- lock.lock();
- try {
- _gtk_widget_size_allocate(widget, allocation, baseline);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param allocation cast=(GtkAllocation *),flags=no_out
- */
- public static final native void _gtk_widget_set_allocation(long widget, GtkAllocation allocation);
- /** [GTK3 only] */
- public static final void gtk_widget_set_allocation(long widget, GtkAllocation allocation) {
- lock.lock();
- try {
- _gtk_widget_set_allocation(widget, allocation);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_widget_show(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_activate(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_tooltip_text(long widget);
/**
* @param widget cast=(GtkWidget *)
- * @param property_name cast=(const gchar *)
- * @param terminator cast=(const gchar *),flags=sentinel
- */
- public static final native void _gtk_widget_style_get(long widget, byte[] property_name, int[] value, long terminator);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_widget_style_get(long widget, byte[] property_name, int[] value, long terminator) {
- lock.lock();
- try {
- _gtk_widget_style_get(widget, property_name, value, terminator);
- } finally {
- lock.unlock();
- }
- }
+ * @param tip_text cast=(const gchar *)
+ */
+ public static final native void gtk_widget_set_tooltip_text(long widget, byte[] tip_text);
/**
* @param widget cast=(GtkWidget *)
- * @param property_name cast=(const gchar *)
- * @param terminator cast=(const gchar *),flags=sentinel
- */
- public static final native void _gtk_widget_style_get(long widget, byte[] property_name, long[] value, long terminator);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_widget_style_get(long widget, byte[] property_name, long[] value, long terminator) {
- lock.lock();
- try {
- _gtk_widget_style_get(widget, property_name, value, terminator);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param src_widget cast=(GtkWidget *)
- * @param dest_widget cast=(GtkWidget *)
- * @param dest_x cast=(gint *)
- * @param dest_y cast=(gint *)
- */
- public static final native boolean _gtk_widget_translate_coordinates(long src_widget, long dest_widget, int src_x, int src_y, int[] dest_x, int[] dest_y);
- public static final boolean gtk_widget_translate_coordinates(long src_widget, long dest_widget, int src_x, int src_y, int[] dest_x, int[] dest_y) {
- lock.lock();
- try {
- return _gtk_widget_translate_coordinates(src_widget, dest_widget, src_x, src_y, dest_x, dest_y);
- } finally {
- lock.unlock();
- }
- }
- /** @param window cast=(GtkWindow *) */
- public static final native boolean _gtk_window_activate_default(long window);
- public static final boolean gtk_window_activate_default(long window) {
- lock.lock();
- try {
- return _gtk_window_activate_default(window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param accel_group cast=(GtkAccelGroup *)
- */
- public static final native void _gtk_window_add_accel_group(long window, long accel_group);
- public static final void gtk_window_add_accel_group(long window, long accel_group) {
- lock.lock();
- try {
- _gtk_window_add_accel_group(window, accel_group);
- } finally {
- lock.unlock();
- }
- }
- /** @param handle cast=(GtkWindow *) */
- public static final native void _gtk_window_deiconify(long handle);
- public static final void gtk_window_deiconify(long handle) {
- lock.lock();
- try {
- _gtk_window_deiconify(handle);
- } finally {
- lock.unlock();
- }
- }
+ * @param name cast=(const char *)
+ * @param group cast=(GActionGroup *)
+ */
+ public static final native void gtk_widget_insert_action_group(long widget, byte[] name, long group);
+
+ /* GtkWindow */
/** @param window cast=(GtkWindow *) */
- public static final native long _gtk_window_get_focus(long window);
- public static final long gtk_window_get_focus(long window) {
- lock.lock();
- try {
- return _gtk_window_get_focus(window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_window_get_focus(long window);
/**
* @param window cast=(GtkWindow *)
*/
- public static final native long _gtk_window_get_group(long window);
- public static final long gtk_window_get_group(long window) {
- lock.lock();
- try {
- return _gtk_window_get_group(window);
- } finally {
- lock.unlock();
- }
- }
- /** @param window cast=(GtkWindow *) */
- public static final native long _gtk_window_get_icon_list(long window);
- public static final long gtk_window_get_icon_list(long window) {
- lock.lock();
- try {
- return _gtk_window_get_icon_list(window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native long gtk_window_get_group(long window);
/** @param window cast=(GtkWindow *) */
- public static final native boolean _gtk_window_get_modal(long window);
- public static final boolean gtk_window_get_modal(long window) {
- lock.lock();
- try {
- return _gtk_window_get_modal(window);
- } finally {
- lock.unlock();
- }
- }
- /** @param window cast=(GtkWindow *) */
- public static final native int _gtk_window_get_mnemonic_modifier(long window);
- public static final int gtk_window_get_mnemonic_modifier(long window) {
- lock.lock();
- try {
- return _gtk_window_get_mnemonic_modifier(window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkWindow *)
- * @param x cast=(gint *)
- * @param y cast=(gint *)
- */
- public static final native void _gtk_window_get_position(long handle, int[] x, int[] y);
- public static final void gtk_window_get_position(long handle, int[] x, int[] y) {
- lock.lock();
- try {
- _gtk_window_get_position(handle, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_window_get_modal(long window);
/**
* @param group cast=(GtkWindowGroup*)
* @param window cast=(GtkWindow*)
*/
- public static final native void _gtk_window_group_add_window(long group, long window);
- public static final void gtk_window_group_add_window(long group, long window) {
- lock.lock();
- try {
- _gtk_window_group_add_window(group, window);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_group_add_window(long group, long window);
/**
* @param group cast=(GtkWindowGroup*)
* @param window cast=(GtkWindow*)
*/
- public static final native void _gtk_window_group_remove_window(long group, long window);
- public static final void gtk_window_group_remove_window(long group, long window) {
- lock.lock();
- try {
- _gtk_window_group_remove_window(group, window);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_window_group_new();
- public static final long gtk_window_group_new() {
- lock.lock();
- try {
- return _gtk_window_group_new();
- } finally {
- lock.unlock();
- }
- }
- /** @param handle cast=(GtkWindow *) */
- public static final native boolean _gtk_window_is_active(long handle);
- public static final boolean gtk_window_is_active(long handle) {
- lock.lock();
- try {
- return _gtk_window_is_active(handle);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_group_remove_window(long group, long window);
+ public static final native long gtk_window_group_new();
/** @param handle cast=(GtkWindow *) */
- public static final native void _gtk_window_iconify(long handle);
- public static final void gtk_window_iconify(long handle) {
- lock.lock();
- try {
- _gtk_window_iconify(handle);
- } finally {
- lock.unlock();
- }
- }
- public static final native long _gtk_window_list_toplevels ();
- public static final long gtk_window_list_toplevels () {
- lock.lock();
- try {
- return _gtk_window_list_toplevels ();
- } finally {
- lock.unlock();
- }
- }
+ public static final native boolean gtk_window_is_active(long handle);
+ public static final native long gtk_window_list_toplevels();
/** @param handle cast=(GtkWindow *) */
- public static final native void _gtk_window_maximize(long handle);
- public static final void gtk_window_maximize(long handle) {
- lock.lock();
- try {
- _gtk_window_maximize(handle);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_maximize(long handle);
/** @param handle cast=(GtkWindow *) */
- public static final native void _gtk_window_fullscreen(long handle);
- public static final void gtk_window_fullscreen(long handle) {
- lock.lock();
- try {
- _gtk_window_fullscreen(handle);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_fullscreen(long handle);
/** @param handle cast=(GtkWindow *) */
- public static final native void _gtk_window_unfullscreen(long handle);
- public static final void gtk_window_unfullscreen(long handle) {
- lock.lock();
- try {
- _gtk_window_unfullscreen(handle);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkWindow *)
- * @param x cast=(gint)
- * @param y cast=(gint)
- */
- public static final native void _gtk_window_move(long handle, int x, int y);
- public static final void gtk_window_move(long handle, int x, int y) {
- lock.lock();
- try {
- _gtk_window_move(handle, x, y);
- } finally {
- lock.unlock();
- }
- }
- /** @param type cast=(GtkWindowType) */
- public static final native long _gtk_window_new(int type);
- public static final long gtk_window_new(int type) {
- lock.lock();
- try {
- return _gtk_window_new(type);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param accel_group cast=(GtkAccelGroup *)
- */
- public static final native void _gtk_window_remove_accel_group(long window, long accel_group);
- public static final void gtk_window_remove_accel_group(long window, long accel_group) {
- lock.lock();
- try {
- _gtk_window_remove_accel_group(window, accel_group);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkWindow *)
- * @param x cast=(gint)
- * @param y cast=(gint)
- */
- public static final native void _gtk_window_resize(long handle, int x, int y);
- public static final void gtk_window_resize(long handle, int x, int y) {
- lock.lock();
- try {
- _gtk_window_resize(handle, x, y);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param handle cast=(GtkWindow *)
- * @param width cast=(gint *)
- * @param height cast=(gint *)
- */
- public static final native void _gtk_window_get_size(long handle, int[] width, int[] height);
- public static final void gtk_window_get_size(long handle, int[] width, int[] height) {
- lock.lock();
- try {
- _gtk_window_get_size(handle, width, height);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param attach_widget cast=(GtkWidget *)
- */
- public static final native void _gtk_window_set_attached_to(long window, long attach_widget);
- public static final void gtk_window_set_attached_to(long window, long attach_widget) {
- lock.lock();
- try {
- _gtk_window_set_attached_to(window, attach_widget);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param widget cast=(GtkWidget *)
- */
- public static final native void _gtk_window_set_default(long window, long widget);
- public static final void gtk_window_set_default(long window, long widget) {
- lock.lock();
- try {
- _gtk_window_set_default(window, widget);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_unfullscreen(long handle);
/**
* @param window cast=(GtkWindow *)
* @param decorated cast=(gboolean)
*/
- public static final native void _gtk_window_set_decorated(long window, boolean decorated);
- public static final void gtk_window_set_decorated(long window, boolean decorated) {
- lock.lock();
- try {
- _gtk_window_set_decorated(window, decorated);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param setting cast=(gboolean)
- */
- public static final native void _gtk_window_set_destroy_with_parent(long window, boolean setting);
- public static final void gtk_window_set_destroy_with_parent(long window, boolean setting) {
- lock.lock();
- try {
- _gtk_window_set_destroy_with_parent(window, setting);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param geometry_widget cast=(GtkWidget *)
- * @param geometry flags=no_out
- */
- public static final native void _gtk_window_set_geometry_hints(long window, long geometry_widget, GdkGeometry geometry, int geom_mask);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_window_set_geometry_hints(long window, long geometry_widget, GdkGeometry geometry, int geom_mask) {
- lock.lock();
- try {
- _gtk_window_set_geometry_hints(window, geometry_widget, geometry, geom_mask);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param list cast=(GList *)
- */
- public static final native void _gtk_window_set_icon_list(long window, long list);
- public static final void gtk_window_set_icon_list(long window, long list) {
- lock.lock();
- try {
- _gtk_window_set_icon_list(window, list);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_set_decorated(long window, boolean decorated);
/**
* @param window cast=(GtkWindow *)
* @param setting cast=(gboolean)
*/
- public static final native void _gtk_window_set_keep_above(long window, boolean setting);
- public static final void gtk_window_set_keep_above(long window, boolean setting) {
- lock.lock();
- try {
- _gtk_window_set_keep_above(window, setting);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_set_destroy_with_parent(long window, boolean setting);
/**
* @param window cast=(GtkWindow *)
* @param modal cast=(gboolean)
*/
- public static final native void _gtk_window_set_modal(long window, boolean modal);
- public static final void gtk_window_set_modal(long window, boolean modal) {
- lock.lock();
- try {
- _gtk_window_set_modal(window, modal);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param tip_text cast=(const gchar *)
- */
- public static final native void _gtk_widget_set_tooltip_text(long widget, byte[] tip_text);
- public static final void gtk_widget_set_tooltip_text(long widget, byte[] tip_text) {
- lock.lock();
- try {
- _gtk_widget_set_tooltip_text(widget, tip_text);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param parent_window cast=(GdkWindow *)
- */
- public static final native void _gtk_widget_set_parent_window(long widget, long parent_window);
- /** [GTK3 only, if-def'd in os.h] */
- public static final void gtk_widget_set_parent_window(long widget, long parent_window) {
- lock.lock();
- try {
- _gtk_widget_set_parent_window(widget, parent_window);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param widget cast=(GtkWidget *)
- * @param parent_surface cast=(GdkSurface *)
- */
- public static final native void _gtk_widget_set_parent_surface(long widget, long parent_surface);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_widget_set_parent_surface(long widget, long parent_surface) {
- lock.lock();
- try {
- _gtk_widget_set_parent_surface(widget, parent_surface);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_set_modal(long window, boolean modal);
/**
* @param window cast=(GtkWindow *)
* @param resizable cast=(gboolean)
*/
- public static final native void _gtk_window_set_resizable(long window, boolean resizable);
- public static final void gtk_window_set_resizable(long window, boolean resizable) {
- lock.lock();
- try {
- _gtk_window_set_resizable(window, resizable);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_set_resizable(long window, boolean resizable);
/**
* @param window cast=(GtkWindow *)
* @param title cast=(const gchar *)
*/
- public static final native void _gtk_window_set_title(long window, byte[] title);
- public static final void gtk_window_set_title(long window, byte[] title) {
- lock.lock();
- try {
- _gtk_window_set_title(window, title);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @param window cast=(GtkWindow *)
- * @param skips_taskbar cast=(gboolean)
- */
- public static final native void _gtk_window_set_skip_taskbar_hint(long window, boolean skips_taskbar);
- public static final void gtk_window_set_skip_taskbar_hint(long window, boolean skips_taskbar) {
- lock.lock();
- try {
- _gtk_window_set_skip_taskbar_hint(window, skips_taskbar);
- } finally {
- lock.unlock();
- }
- }
- /** @param window cast=(GtkWindow *) */
- public static final native void _gtk_window_set_type_hint(long window, int hint);
- public static final void gtk_window_set_type_hint(long window, int hint) {
- lock.lock();
- try {
- _gtk_window_set_type_hint(window, hint);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_set_title(long window, byte[] title);
/**
* @param window cast=(GtkWindow *)
* @param parent cast=(GtkWindow *)
*/
- public static final native void _gtk_window_set_transient_for(long window, long parent);
- public static final void gtk_window_set_transient_for(long window, long parent) {
- lock.lock();
- try {
- _gtk_window_set_transient_for(window, parent);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_set_transient_for(long window, long parent);
/** @param handle cast=(GtkWindow *) */
- public static final native void _gtk_window_unmaximize(long handle);
- public static final void gtk_window_unmaximize(long handle) {
- lock.lock();
- try {
- _gtk_window_unmaximize(handle);
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=dynamic */
- public static final native long _gtk_printer_option_widget_get_type();
- public static final long gtk_printer_option_widget_get_type() {
- lock.lock();
- try {
- return _gtk_printer_option_widget_get_type();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void gtk_window_unmaximize(long handle);
+ /** @param window cast=(GtkWindow *) */
+ public static final native long gtk_window_get_default_widget(long window);
/**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param region cast=(cairo_region_t *)
- */
- public static final native void _gtk_widget_shape_combine_region(long widget, long region);
- /** [GTK3 only] */
- public static final void gtk_widget_shape_combine_region(long widget, long region) {
- lock.lock();
- try {
- _gtk_widget_shape_combine_region(widget,region);
- } finally {
- lock.unlock();
- }
- }
+ * @param window cast=(GtkWindow *)
+ * @param width cast=(gint)
+ * @param height cast=(gint)
+ */
+ public static final native void gtk_window_set_default_size(long window, int width, int height);
/**
- * @param widget cast=(GtkWidget *)
- * @param child cast=(GtkWidget *)
- * @param snapshot cast=(GtkSnapshot *)
- */
- public static final native void _gtk_widget_snapshot_child(long widget, long child, long snapshot);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void gtk_widget_snapshot_child(long widget, long child, long snapshot) {
- lock.lock();
- try {
- _gtk_widget_snapshot_child(widget,child,snapshot);
- } finally {
- lock.unlock();
- }
- }
+ * @param window cast=(GtkWindow *)
+ * @param width cast=(gint *)
+ * @param height cast=(gint *)
+ */
+ public static final native void gtk_window_get_default_size(long window, int[] width, int[] height);
+
+ /* GtkPlug */
+ public static final native long gtk_plug_new(long socket_id);
+
+ /* GtkPrinterOption */
+ /** @method flags=dynamic */
+ public static final native long gtk_printer_option_widget_get_type();
+
+ /* GtkSocket */
+ public static final native long gtk_socket_new();
+ /** @param socket cast=(GtkSocket *) */
+ public static final native long gtk_socket_get_id(long socket);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTypeQuery.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTypeQuery.java
deleted file mode 100644
index 18e9b9a654..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTypeQuery.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
-
-public class GTypeQuery {
- /** @field cast=(GType) */
- public int type;
- /** @field cast=(const gchar *) */
- public long type_name;
- /** @field cast=(guint) */
- public int class_size;
- /** @field cast=(guint) */
- public int instance_size;
- public static final int sizeof = OS.GTypeQuery_sizeof();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java
deleted file mode 100644
index dbe4bc12ec..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
-
-public class GdkEventAny extends GdkEvent {
- /** @field cast=(GdkWindow *) */
- public long window;
- /** @field cast=(gint8) */
- public byte send_event;
- public static final int sizeof = GDK.GdkEventAny_sizeof();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java
deleted file mode 100644
index 49d6db39d0..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
-
-public class GdkGeometry {
- public int min_width;
- public int min_height;
- public int max_width;
- public int max_height;
- public int base_width;
- public int base_height;
- public int width_inc;
- public int height_inc;
- public double min_aspect;
- public double max_aspect;
- public int win_gravity;
- public static final int sizeof = GDK.GdkGeometry_sizeof();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java
index 4e547d07e8..7623e32142 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java
@@ -14,6 +14,7 @@
*******************************************************************************/
package org.eclipse.swt.internal.gtk;
+import org.eclipse.swt.graphics.Rectangle;
public class GdkRectangle {
/** @field cast=(gint) */
@@ -36,4 +37,8 @@ public class GdkRectangle {
public String toString() {
return "GdkRectangle {" + x + ", " + y + ", " + width + ", " + height + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
+
+ public Rectangle toRectangle() {
+ return new Rectangle(x, y, width, height);
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GeometryInterface.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GeometryInterface.java
new file mode 100644
index 0000000000..c75c4b314a
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GeometryInterface.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk;
+
+public interface GeometryInterface {
+
+ public int getMinWidth();
+ public int getMinHeight();
+ public int getMaxWidth();
+ public int getMaxHeight();
+ public boolean getResize();
+ public boolean getMinSizeRequested();
+ public int getRequestedWidth();
+ public int getRequestedHeight();
+
+ public void setMinWidth(int value);
+ public void setMinHeight(int value);
+ public void setMaxWidth(int value);
+ public void setMaxHeight(int value);
+ public void setResize(boolean value);
+ public void setMinSizeRequested(boolean value);
+ public void setRequestedWidth(int value);
+ public void setRequestedHeight(int value);
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/Graphene.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/Graphene.java
index 0ec033ea11..c87d546a4e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/Graphene.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/Graphene.java
@@ -21,41 +21,17 @@ package org.eclipse.swt.internal.gtk;
* In contrast to OS.java, dynamic functions are automatically linked, no need to add os_custom.h entries.
*/
public class Graphene extends OS {
+ /* [GTK4 only, if-def'd in os.h] */
- public static final native long _graphene_rect_alloc();
- /** [GTK4 only, if-def'd in os.h] */
- public static final long graphene_rect_alloc() {
- lock.lock();
- try {
- return _graphene_rect_alloc();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long graphene_rect_alloc();
/**
* @param rectangle cast=(graphene_rect_t *)
*/
- public static final native void _graphene_rect_free(long rectangle);
- /** [GTK4 only, if-def'd in os.h] */
- public static final void graphene_rect_free(long rectangle) {
- lock.lock();
- try {
- _graphene_rect_free(rectangle);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native void graphene_rect_free(long rectangle);
/**
* @param rectangle cast=(graphene_rect_t *)
*/
- public static final native long _graphene_rect_init(long rectangle, float x, float y, float width, float height);
- /** [GTK4 only, if-def'd in os.h] */
- public static final long graphene_rect_init(long rectangle, float x, float y, float width, float height) {
- lock.lock();
- try {
- return _graphene_rect_init(rectangle, x, y, width, height);
- } finally {
- lock.unlock();
- }
- }
+ /* [GTK4 only, if-def'd in os.h] */
+ public static final native long graphene_rect_init(long rectangle, float x, float y, float width, float height);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 213b7d8e70..64d9ac9fba 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2022 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -14,36 +14,43 @@
*******************************************************************************/
package org.eclipse.swt.internal.gtk;
+import java.util.*;
import org.eclipse.swt.internal.*;
// Common type translation table:
-// C -> Java
+// C -> Java
// --------------------
// Primitives:
-// int -> int
-// guint -> long #Reason:
-// c : unsigned int range: 4294967295
-// java : int range : 2147483647 (less than c unsigned int)
-// Java : long range: 9,223,372,036,854,775,807
-// // Note: Not to be used for pointers.
+// int -> int
+// gint* -> int[]
//
-// gint* -> int[]
-// boolean -> int ex setenv
-// gboolean -> boolean
+// Unsigned integer:
+// * Note that java's int is signed, which introduces difficulties
+// * for values > 0x7FFFFFFF. Java's long can fit such values, but
+// * java's long is 8 bytes, while guint is 4 bytes. For that reason,
+// * java's long CAN'T be used for pointers or arrays.
+// guint -> int/long
+// guint* -> int[]
+//
+// Boolean:
+// * Java's boolean is handy, but it's 1 byte, while gboolean is 4
+// * bytes. For that reason, it CAN'T be used for pointers or arrays.
+// gboolean -> int/boolean
+// gboolean* -> int
//
// Pointers:
-// gpointer -> long
-// void * -> long
+// gpointer -> long
+// void * -> long
//
// Strings:
-// gchar * -> long
-// const char * -> byte[] ex setenv
-// const gchar* -> byte[] ex g_log_remove_handler
+// gchar * -> long // You're responsible for allocating/deallocating memory buffer.
+// const char * -> byte[] // Example: setenv()
+// const gchar* -> byte[] // Example: g_log_remove_handler()
//
// Special types:
-// GQuark -> int
-// GError ** -> long [] ex g_filename_to_uri
+// GQuark -> int
+// GError ** -> long[] // Example: g_filename_to_uri()
/**
@@ -74,21 +81,22 @@ public class OS extends C {
/** Initialization; load native libraries */
static {
String propertyName = "SWT_GTK4";
- String gtk4 = getEnvironmentalVariable (propertyName);
+ String gtk4 = getEnvironmentalVariable(propertyName);
if (gtk4 != null && gtk4.equals("1")) {
try {
Library.loadLibrary("swt-pi4");
} catch (Throwable e) {
+ System.err.println("SWT OS.java Error: Failed to load swt-pi4, loading swt-pi3 as fallback.");
Library.loadLibrary("swt-pi3");
}
} else {
try {
Library.loadLibrary("swt-pi3");
} catch (Throwable e) {
+ System.err.println("SWT OS.java Error: Failed to load swt-pi3, loading swt-pi4 as fallback.");
Library.loadLibrary("swt-pi4");
}
}
- cachejvmptr();
}
//Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1
@@ -137,18 +145,16 @@ public class OS extends C {
}
/** Constants */
+ public static final int G_FILE_ERROR_IO = 21;
public static final int G_FILE_TEST_IS_DIR = 1 << 2;
public static final int G_FILE_TEST_IS_EXECUTABLE = 1 << 3;
- public static final int G_SIGNAL_MATCH_FUNC = 1 << 3;
public static final int G_SIGNAL_MATCH_DATA = 1 << 4;
public static final int G_SIGNAL_MATCH_ID = 1 << 0;
public static final int G_LOG_FLAG_FATAL = 0x2;
public static final int G_LOG_FLAG_RECURSION = 0x1;
public static final int G_LOG_LEVEL_MASK = 0xfffffffc;
public static final int G_APP_INFO_CREATE_NONE = 0;
- public static final int G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0);
public static final int G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1);
- public static final int None = 0;
public static final int PANGO_ALIGN_LEFT = 0;
public static final int PANGO_ALIGN_CENTER = 1;
public static final int PANGO_ALIGN_RIGHT = 2;
@@ -181,27 +187,17 @@ public class OS extends C {
public static final int PANGO_VARIANT_SMALL_CAPS = 1;
public static final int PANGO_WEIGHT_BOLD = 0x2bc;
public static final int PANGO_WEIGHT_NORMAL = 0x190;
- public static final int PANGO_WRAP_WORD = 0;
public static final int PANGO_WRAP_WORD_CHAR = 2;
- public static final int RTLD_GLOBAL = OS.IsWin32 ? 0 : OS.RTLD_GLOBAL();
- public static final int RTLD_LAZY = OS.IsWin32 ? 0 : OS.RTLD_LAZY();
- public static final int RTLD_MEMBER = 0x00040000;
- public static final int RTLD_NOW = OS.IsWin32 ? 0 : OS.RTLD_NOW();
-
+ public static final int PANGO_FONT_MASK_FAMILY = 1 << 0;
+ public static final int PANGO_FONT_MASK_STYLE = 1 << 1;
+ public static final int PANGO_FONT_MASK_WEIGHT = 1 << 3;
+ public static final int PANGO_FONT_MASK_SIZE = 1 << 5;
/**
* GDBus Session types.
* @category gdbus */
- public static final int G_BUS_TYPE_STARTER = -1; //An alias for the message bus that activated the process, if any.
- /** @category gdbus */
- public static final int G_BUS_TYPE_NONE = 0; // Not a message bus.
- /** @category gdbus */
- public static final int G_BUS_TYPE_SYSTEM = 1; // The system-wide message bus.
- /** @category gdbus */
public static final int G_BUS_TYPE_SESSION = 2; //The login session message bus.
/** @category gdbus */
- public static final int G_BUS_NAME_OWNER_FLAGS_NONE = 0; //No flags set.
- /** @category gdbus */
public static final int G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0); //Allow another message bus connection to claim the name.
/**
* If another message bus connection owns the name and have
@@ -210,15 +206,11 @@ public class OS extends C {
public static final int G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1);
// Proxy flags found here: https://developer.gnome.org/gio/stable/GDBusProxy.html#GDBusProxyFlags
- public static final int G_DBUS_PROXY_FLAGS_NONE = 0;
public static final int G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = 1;
public static final int G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = 2;
public static final int G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = 3;
- public static final int G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES = 4;
- public static final int G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION = 5;
public static final int G_DBUS_CALL_FLAGS_NONE = 0;
- public static final int G_DBUS_CALL_FLAGS_NO_AUTO_START = (1<<0);
/**
* DBus Data types as defined by:
@@ -274,7 +266,7 @@ public class OS extends C {
/** Signals */
- public static final byte[] accel_closures_changed = ascii("accel-closures-changed"); // Gtk2,3,4
+ public static final byte[] accel_closures_changed = ascii("accel-closures-changed"); // Gtk3,4
public static final byte[] activate = ascii("activate"); // ?
public static final byte[] angle_changed = ascii("angle_changed"); // Gtk3/4, Guesture related.
public static final byte[] backspace = ascii("backspace");
@@ -282,7 +274,6 @@ public class OS extends C {
public static final byte[] button_press_event = ascii("button-press-event");
public static final byte[] button_release_event = ascii("button-release-event");
public static final byte[] changed = ascii("changed");
- public static final byte[] change_current_page = ascii("change-current-page");
public static final byte[] change_value = ascii("change-value");
public static final byte[] clicked = ascii("clicked");
public static final byte[] close_request = ascii("close-request");
@@ -291,15 +282,14 @@ public class OS extends C {
public static final byte[] copy_clipboard = ascii("copy-clipboard");
public static final byte[] cut_clipboard = ascii("cut-clipboard");
public static final byte[] create_menu_proxy = ascii("create-menu-proxy");
- public static final byte[] destroy = ascii("destroy");
public static final byte[] delete_event = ascii("delete-event");
public static final byte[] delete_from_cursor = ascii("delete-from-cursor");
public static final byte[] day_selected = ascii("day-selected");
public static final byte[] day_selected_double_click = ascii("day-selected-double-click");
- public static final byte[] decelerate= ascii("decelerate");
public static final byte[] delete_range = ascii("delete-range");
public static final byte[] delete_text = ascii("delete-text");
public static final byte[] direction_changed = ascii("direction-changed");
+ public static final byte[] dpi_changed = ascii("notify::scale-factor");
public static final byte[] drag_begin = ascii("drag_begin");
public static final byte[] drag_data_delete = ascii("drag_data_delete");
public static final byte[] drag_data_get = ascii("drag_data_get");
@@ -308,6 +298,7 @@ public class OS extends C {
public static final byte[] drag_end = ascii("drag_end");
public static final byte[] drag_leave = ascii("drag_leave");
public static final byte[] drag_motion = ascii("drag_motion");
+ public static final byte[] prepare = ascii("prepare");
public static final byte[] draw = ascii("draw");
public static final byte[] end = ascii("end");
public static final byte[] enter_notify_event = ascii("enter-notify-event");
@@ -315,7 +306,6 @@ public class OS extends C {
public static final byte[] event = ascii("event");
public static final byte[] event_after = ascii("event-after");
public static final byte[] expand_collapse_cursor_row = ascii("expand-collapse-cursor-row");
- public static final byte[] expose_event = ascii("expose-event");
public static final byte[] focus = ascii("focus");
public static final byte[] focus_in_event = ascii("focus-in-event");
public static final byte[] focus_in = ascii("focus-in");
@@ -324,8 +314,6 @@ public class OS extends C {
public static final byte[] grab_focus = ascii("grab-focus");
public static final byte[] hide = ascii("hide");
public static final byte[] icon_release = ascii("icon-release");
- public static final byte[] im_update = ascii("im-update");
- public static final byte[] input = ascii("input");
public static final byte[] insert_text = ascii("insert-text");
public static final byte[] key_press_event = ascii("key-press-event");
public static final byte[] key_release_event = ascii("key-release-event");
@@ -334,11 +322,14 @@ public class OS extends C {
public static final byte[] keys_changed = ascii("keys-changed");
public static final byte[] leave_notify_event = ascii("leave-notify-event");
public static final byte[] leave = ascii("leave");
- public static final byte[] link_color = ascii("link-color");
public static final byte[] map = ascii("map");
public static final byte[] map_event = ascii("map-event");
public static final byte[] mnemonic_activate = ascii("mnemonic-activate");
public static final byte[] month_changed = ascii("month-changed");
+ public static final byte[] next_month = ascii("next-month");
+ public static final byte[] prev_month = ascii("prev-month");
+ public static final byte[] next_year = ascii("next-year");
+ public static final byte[] prev_year = ascii("prev-year");
public static final byte[] motion_notify_event = ascii("motion-notify-event");
public static final byte[] motion = ascii("motion");
public static final byte[] move_cursor = ascii("move-cursor");
@@ -351,44 +342,42 @@ public class OS extends C {
public static final byte[] popup_menu = ascii("popup-menu");
public static final byte[] populate_popup = ascii("populate-popup");
public static final byte[] preedit_changed = ascii("preedit-changed");
- public static final byte[] property_notify_event = ascii("property-notify-event");
public static final byte[] realize = ascii("realize");
public static final byte[] row_activated = ascii("row-activated");
public static final byte[] row_changed = ascii("row-changed");
public static final byte[] row_has_child_toggled = ascii("row-has-child-toggled");
- public static final byte[] row_inserted = ascii("row-inserted");
- public static final byte[] row_deleted = ascii("row-deleted");
public static final byte[] scale_changed = ascii("scale-changed");
public static final byte[] scroll_child = ascii("scroll-child");
public static final byte[] scroll_event = ascii("scroll-event");
public static final byte[] scroll = ascii("scroll");
- public static final byte[] scroll_begin = ascii("scroll-begin");
- public static final byte[] scroll_end = ascii("scroll-end");
public static final byte[] select = ascii("select");
public static final byte[] selection_done = ascii("selection-done");
public static final byte[] show = ascii("show");
public static final byte[] show_help = ascii("show-help");
public static final byte[] size_allocate = ascii("size-allocate");
- public static final byte[] size_request = ascii("size-request");
+ public static final byte[] resize = ascii("resize");
public static final byte[] start_interactive_search = ascii("start-interactive-search");
public static final byte[] style_updated = ascii("style-updated");
- public static final byte[] swipe = ascii("swipe");
public static final byte[] switch_page = ascii("switch-page");
public static final byte[] test_collapse_row = ascii("test-collapse-row");
public static final byte[] test_expand_row = ascii("test-expand-row");
public static final byte[] toggled = ascii("toggled");
public static final byte[] unmap = ascii("unmap");
public static final byte[] unmap_event = ascii("unmap-event");
- public static final byte[] unrealize = ascii("unrealize");
public static final byte[] value_changed = ascii("value-changed");
public static final byte[] window_state_event = ascii("window-state-event");
public static final byte[] notify_state = ascii("notify::state");
+ public static final byte[] notify_default_height = ascii("notify::default-height");
+ public static final byte[] notify_default_width = ascii("notify::default-width");
+ public static final byte[] notify_maximized = ascii("notify::maximized");
+ public static final byte[] notify_is_active = ascii("notify::is-active");
+ public static final byte[] notify_theme_change = ascii("notify::gtk-application-prefer-dark-theme");
+ public static final byte[] response = ascii("response");
+ public static final byte[] compute_size = ascii("compute-size");
/** Properties */
public static final byte[] active = ascii("active");
- public static final byte[] background_gdk = ascii("background-gdk");
public static final byte[] background_rgba = ascii("background-rgba");
- public static final byte[] button_relief = ascii("button-relief");
public static final byte[] cell_background_rgba = ascii("cell-background-rgba");
public static final byte[] default_border = ascii("default-border");
public static final byte[] expander_size = ascii("expander-size");
@@ -396,7 +385,6 @@ public class OS extends C {
public static final byte[] focus_line_width = ascii("focus-line-width");
public static final byte[] focus_padding = ascii("focus-padding");
public static final byte[] font_desc = ascii("font-desc");
- public static final byte[] foreground_gdk = ascii("foreground-gdk");
public static final byte[] foreground_rgba = ascii("foreground-rgba");
public static final byte[] grid_line_width = ascii("grid-line-width");
public static final byte[] inner_border = ascii("inner-border");
@@ -422,6 +410,10 @@ public class OS extends C {
public static final byte[] margin_top = ascii("margin-top");
public static final byte[] scrollbar_spacing = ascii("scrollbar-spacing");
+ /** Actions */
+ public static final byte[] action_copy_clipboard = ascii("clipboard.copy");
+ public static final byte[] action_cut_clipboard = ascii("clipboard.cut");
+ public static final byte[] action_paste_clipboard = ascii("clipboard.paste");
/** CUSTOM_CODE START
*
@@ -483,227 +475,97 @@ public class OS extends C {
/** @method flags=no_gen
* @category custom
*/
- public static final native void _cachejvmptr ();
- /** Cache the JVM pointer so that it's usable in other implementations. */
- public static final void cachejvmptr() {
- // See bug 521487.
- lock.lock();
- try {
- _cachejvmptr();
- } finally {
- lock.unlock();
- }
- }
/** @category custom */
- public static final native void _swt_debug_on_fatal_warnings();
- /** Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1
+ /* Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1
* env variable. Please see Eclipse bug 471477 */
- public static final void swt_debug_on_fatal_warnings() {
- lock.lock();
- try {
- _swt_debug_on_fatal_warnings ();
- } finally {
- lock.unlock();
- }
- }
+ public static final native void swt_debug_on_fatal_warnings();
/** @category custom */
- public static final native long _swt_fixed_get_type();
- public static final long swt_fixed_get_type() {
- lock.lock();
- try {
- return _swt_fixed_get_type();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long swt_fixed_get_type();
/** @category custom */
- public static final native long _swt_fixed_accessible_get_type();
- public static final long swt_fixed_accessible_get_type() {
- lock.lock();
- try {
- return _swt_fixed_accessible_get_type();
- } finally {
- lock.unlock();
- }
- }
+ public static final native long swt_fixed_accessible_get_type();
/**
* @param obj cast=(AtkObject*)
* @param is_native cast=(gboolean)
* @param to_map cast=(GtkWidget *)
* @category custom
*/
- public static final native void _swt_fixed_accessible_register_accessible(long obj, boolean is_native, long to_map);
- public static final void swt_fixed_accessible_register_accessible(long obj, boolean is_native, long to_map) {
- lock.lock();
- try {
- _swt_fixed_accessible_register_accessible(obj, is_native, to_map);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void swt_fixed_accessible_register_accessible(long obj, boolean is_native, long to_map);
/**
* @param fixed cast=(SwtFixed*)
* @param widget cast=(GtkWidget*)
* @param sibling cast=(GtkWidget*)
* @category custom
*/
- public static final native void _swt_fixed_restack(long fixed, long widget, long sibling, boolean above);
- public static final void swt_fixed_restack(long fixed, long widget, long sibling, boolean above) {
- lock.lock();
- try {
- _swt_fixed_restack(fixed, widget, sibling, above);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void swt_fixed_restack(long fixed, long widget, long sibling, boolean above);
/**
* @param fixed cast=(SwtFixed*)
* @param widget cast=(GtkWidget*)
* @category custom
*/
- public static final native void _swt_fixed_move(long fixed, long widget, int x, int y);
- public static final void swt_fixed_move(long fixed, long widget, int x, int y) {
- lock.lock();
- try {
- _swt_fixed_move(fixed, widget, x, y);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void swt_fixed_move(long fixed, long widget, int x, int y);
/**
* @param fixed cast=(SwtFixed*)
* @param widget cast=(GtkWidget*)
* @category custom
*/
- public static final native void _swt_fixed_resize(long fixed, long widget, int width, int height);
- public static final void swt_fixed_resize(long fixed, long widget, int width, int height) {
- lock.lock();
- try {
- _swt_fixed_resize(fixed, widget, width, height);
- } finally {
- lock.unlock();
- }
- }
+ public static final native void swt_fixed_resize(long fixed, long widget, int width, int height);
- /** @param result cast=(GTimeVal *)*/
- public static final native void _g_get_current_time(long result);
- public static final void g_get_current_time(long result) {
- lock.lock();
- try {
- _g_get_current_time(result);
- } finally {
- lock.unlock();
- }
- }
/**
- * @param result cast=(GTimeVal *)
- * @param microseconds cast=(glong)
+ * @param container cast=(SwtFixed*)
+ * @param widget cast=(GtkWidget*)
+ * @category custom
*/
- public static final native void _g_time_val_add(long result, long microseconds);
- public static final void g_time_val_add(long result, long microseconds) {
- lock.lock();
- try {
- _g_time_val_add(result, microseconds);
- } finally {
- lock.unlock();
- }
- }
-
+ public static final native void swt_fixed_add(long container, long widget);
+ /**
+ * @param container cast=(SwtFixed*)
+ * @param widget cast=(GtkWidget*)
+ * @category custom
+ */
+ public static final native void swt_fixed_remove(long container, long widget);
+ public static final native void swt_set_lock_functions();
/** @param str cast=(const gchar *)
* @category custom
*/
- public static final native long _g_utf16_offset_to_pointer(long str, long offset);
- /** Custom version of g_utf8_pointer_to_offset */
- public static final long g_utf16_offset_to_pointer(long str, long offset) {
- lock.lock();
- try {
- return _g_utf16_offset_to_pointer(str, offset);
- } finally {
- lock.unlock();
- }
- }
+ /* Custom version of g_utf8_pointer_to_offset */
+ public static final native long g_utf16_offset_to_pointer(long str, long offset);
/**
* @param str cast=(const gchar *)
* @param pos cast=(const gchar *)
* @category custom
*/
- public static final native long _g_utf16_pointer_to_offset(long str, long pos);
- /** Custom version of g_utf8_pointer_to_offset */
- public static final long g_utf16_pointer_to_offset(long str, long pos) {
- lock.lock();
- try {
- return _g_utf16_pointer_to_offset(str, pos);
- } finally {
- lock.unlock();
- }
- }
+ /* Custom version of g_utf8_pointer_to_offset */
+ public static final native long g_utf16_pointer_to_offset(long str, long pos);
/** @param str cast=(const gchar *)
* @category custom
*/
- public static final native long _g_utf16_strlen(long str, long max);
- /** custom version of g_utf8 for 16 bit */
- public static final long g_utf16_strlen(long str, long max) {
- lock.lock();
- try {
- return _g_utf16_strlen(str, max);
- } finally {
- lock.unlock();
- }
- }
+ /* custom version of g_utf8 for 16 bit */
+ public static final native long g_utf16_strlen(long str, long max);
/** @param str cast=(const gchar *)
* @category custom
*/
- public static final native long _g_utf8_offset_to_utf16_offset(long str, long offset);
- /** custom version of g_utf8 for 16 bit */
- public static final long g_utf8_offset_to_utf16_offset(long str, long offset) {
- lock.lock();
- try {
- return _g_utf8_offset_to_utf16_offset(str, offset);
- } finally {
- lock.unlock();
- }
- }
+ /* custom version of g_utf8 for 16 bit */
+ public static final native long g_utf8_offset_to_utf16_offset(long str, long offset);
/** @param str cast=(const gchar *)
* @category custom
*/
- public static final native long _g_utf16_offset_to_utf8_offset(long str, long offset);
- /** custom version of g_utf8 for 16 bit */
- public static final long g_utf16_offset_to_utf8_offset(long str, long offset) {
- lock.lock();
- try {
- return _g_utf16_offset_to_utf8_offset(str, offset);
- } finally {
- lock.unlock();
- }
- }
+ /* custom version of g_utf8 for 16 bit */
+ public static final native long g_utf16_offset_to_utf8_offset(long str, long offset);
/** CUSTOM_CODE END */
-
-
-
-
-
/**
* Gtk has a minimum glib version. (But it's not a 1:1 link, one can have a newer version of glib and older gtk).
*
* Minimum Glib version requirement of gtk can be found in gtk's 'configure.ac' file, see line 'm4_define([glib_required_version],[2.*.*]).
*
* For reference:
- * Gtk3.4 has min version of glib 2.32
- * Gtk3.6 has min version of glib 2.33.1
- * Gtk3.8 has min version of glib 2.35.3
- * Gtk3.10 has min version of glib 2.37.5
- * Gtk3.12 has min version of glib 2.39.5
- * Gtk3.14 has min version of glib 2.41.2
- * Gtk3.16 has min version of glib 2.43.4
- * Gtk3.18 has min version of glib 2.45.8
- * Gtk3.20 has min version of glib 2.45.8
* Gtk3.22 has min version of glib 2.49.4
+ * Gtk3.24 has min version of glib 2.58
+ * Gtk4.0 has min version of glib 2.66
*/
public static final int GLIB_VERSION = VERSION(glib_major_version(), glib_minor_version(), glib_micro_version());
@@ -737,12 +599,16 @@ public class OS extends C {
* A string containing the theme name supplied via the GTK_THEME
* environment variable. Otherwise this will contain an empty string.
*/
- public static final String GTK_THEME_NAME;
+ public static final String GTK_THEME_SET_NAME;
/**
- * True if GTK_THEME_SET is true, and if the dark variant was
- * specified via the GTK_THEME environment variable.
+ * True iff overlay scrolling has been disabled via GTK_OVERLAY_SCROLLING=0.
+ * See bug 546248.
*/
- public static final boolean GTK_THEME_DARK;
+ public static final boolean GTK_OVERLAY_SCROLLING_DISABLED;
+ /**
+ * True if SWT is running on the GNOME desktop environment.
+ */
+ public static final boolean isGNOME;
/* Feature in Gtk: with the switch to GtkMenuItems from GtkImageMenuItems
* in Gtk3 came a small Gtk shortfall: a small amount of padding on the left hand
@@ -768,7 +634,7 @@ public class OS extends C {
String menuLocationProperty = "SWT_MENU_LOCATION_DEBUGGING";
String menuLocationCheck = getEnvironmentalVariable(menuLocationProperty);
boolean menuLocationDebuggingEnabled = false;
- if (menuLocationCheck != null && menuLocationCheck.equals("1")) {
+ if (menuLocationCheck != null && menuLocationCheck.equals("1") && !GTK.GTK4) {
menuLocationDebuggingEnabled = true;
}
SWT_MENU_LOCATION_DEBUGGING = menuLocationDebuggingEnabled;
@@ -785,16 +651,28 @@ public class OS extends C {
String gtkThemeCheck = getEnvironmentalVariable(gtkThemeProperty);
boolean gtkThemeSet = false;
String gtkThemeName = "";
- boolean gtkThemeDark = false;
if (gtkThemeCheck != null && !gtkThemeCheck.isEmpty()) {
gtkThemeSet = true;
- gtkThemeDark = gtkThemeCheck.contains(":dark") ? true : false;
- String [] themeNameSplit = gtkThemeCheck.split(":");
- gtkThemeName = themeNameSplit[0];
+ gtkThemeName = gtkThemeCheck;
}
GTK_THEME_SET = gtkThemeSet;
- GTK_THEME_NAME = gtkThemeName;
- GTK_THEME_DARK = gtkThemeDark;
+ GTK_THEME_SET_NAME = gtkThemeName;
+
+ String scrollingProperty = "GTK_OVERLAY_SCROLLING";
+ String scrollingCheck = getEnvironmentalVariable(scrollingProperty);
+ boolean scrollingDisabled = false;
+ if (scrollingCheck != null && scrollingCheck.equals("0")) {
+ scrollingDisabled = true;
+ }
+ GTK_OVERLAY_SCROLLING_DISABLED = scrollingDisabled;
+
+ Map<String, String> env = System.getenv();
+ String desktopEnvironment = env.get("XDG_CURRENT_DESKTOP");
+ boolean gnomeDetected = false;
+ if (desktopEnvironment != null) {
+ gnomeDetected = desktopEnvironment.contains("GNOME");
+ }
+ isGNOME = gnomeDetected;
System.setProperty("org.eclipse.swt.internal.gtk.version",
(GTK.GTK_VERSION >>> 16) + "." + (GTK.GTK_VERSION >>> 8 & 0xFF) + "." + (GTK.GTK_VERSION & 0xFF));
@@ -824,10 +702,9 @@ public static boolean isX11 () {
}
/** 64 bit */
-public static final native int GInterfaceInfo_sizeof ();
public static final native int GPollFD_sizeof ();
public static final native int GTypeInfo_sizeof ();
-public static final native int GTypeQuery_sizeof ();
+public static final native int GValue_sizeof();
public static final native int PangoAttribute_sizeof();
public static final native int PangoAttrColor_sizeof();
public static final native int PangoAttrInt_sizeof();
@@ -862,113 +739,36 @@ public static final native int X_EVENT_TYPE(long xevent);
public static final native long X_EVENT_WINDOW(long xevent);
/** X11 Native methods and constants */
-public static final int Above = 0;
-public static final int Below = 1;
-public static final int ButtonRelease = 5;
public static final int CurrentTime = 0;
-public static final int CWSibling = 0x20;
-public static final int CWStackMode = 0x40;
-public static final int EnterNotify = 7;
public static final int Expose = 12;
-public static final int FocusChangeMask = 1 << 21;
public static final int FocusIn = 9;
public static final int FocusOut = 10;
public static final int GraphicsExpose = 13;
-public static final int NoExpose = 14;
public static final int ExposureMask = 1 << 15;
-public static final long NoEventMask = 0;
public static final int NotifyNormal = 0;
-public static final int NotifyGrab = 1;
-public static final int NotifyHint = 1;
-public static final int NotifyUngrab = 2;
public static final int NotifyWhileGrabbed = 3;
public static final int NotifyAncestor = 0;
public static final int NotifyVirtual = 1;
public static final int NotifyNonlinear = 3;
public static final int NotifyNonlinearVirtual = 4;
-public static final int NotifyPointer = 5;
public static final int RevertToParent = 2;
-public static final native int _Call(long proc, long arg1, long arg2);
-public static final int Call(long proc, long arg1, long arg2) {
- lock.lock();
- try {
- return _Call(proc, arg1, arg2);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _call (long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6);
-public static final long call (long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6) {
- lock.lock();
- try {
- return _call(function, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _call (long function, long arg0, long arg1, long arg2, long arg3);
-public static final long call (long function, long arg0, long arg1, long arg2, long arg3) {
- lock.lock();
- try {
- return _call(function, arg0, arg1, arg2, arg3);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _call (long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5);
-public static final long call (long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5) {
- lock.lock();
- try {
- return _call(function, arg0, arg1, arg2, arg3, arg4, arg5);
- } finally {
- lock.unlock();
- }
-}
+public static final native int Call(long proc, long arg1, long arg2);
+public static final native long call(long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6);
+public static final native long call(long function, long arg0, long arg1, long arg2, long arg3);
+public static final native long call(long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5);
/**
* @param display cast=(Display *)
* @param event_return cast=(XEvent *)
* @param predicate cast=(Bool (*)())
* @param arg cast=(XPointer)
*/
-public static final native boolean _XCheckIfEvent(long display, long event_return, long predicate, long arg);
-public static final boolean XCheckIfEvent(long display, long event_return, long predicate, long arg) {
- lock.lock();
- try {
- return _XCheckIfEvent(display, event_return, predicate, arg);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean XCheckIfEvent(long display, long event_return, long predicate, long arg);
/** @param display cast=(Display *) */
-public static final native int _XDefaultScreen(long display);
-public static final int XDefaultScreen(long display) {
- lock.lock();
- try {
- return _XDefaultScreen(display);
- } finally {
- lock.unlock();
- }
-}
+public static final native int XDefaultScreen(long display);
/** @param display cast=(Display *) */
-public static final native long _XDefaultRootWindow(long display);
-public static final long XDefaultRootWindow(long display) {
- lock.lock();
- try {
- return _XDefaultRootWindow(display);
- } finally {
- lock.unlock();
- }
-}
+public static final native long XDefaultRootWindow(long display);
/** @param address cast=(void *) */
-public static final native void _XFree(long address);
-public static final void XFree(long address) {
- lock.lock();
- try {
- _XFree(address);
- } finally {
- lock.unlock();
- }
-}
+public static final native void XFree(long address);
/**
* @param display cast=(Display *)
@@ -981,72 +781,24 @@ public static final void XFree(long address) {
* @param win_y_return cast=(int *)
* @param mask_return cast=(unsigned int *)
*/
-public static final native int _XQueryPointer(long display, long w, long [] root_return, long [] child_return, int[] root_x_return, int[] root_y_return, int[] win_x_return, int[] win_y_return, int[] mask_return);
-public static final int XQueryPointer(long display, long w, long [] root_return, long [] child_return, int[] root_x_return, int[] root_y_return, int[] win_x_return, int[] win_y_return, int[] mask_return) {
- lock.lock();
- try {
- return _XQueryPointer(display, w, root_return, child_return, root_x_return, root_y_return, win_x_return, win_y_return, mask_return);
- } finally {
- lock.unlock();
- }
-}
+public static final native int XQueryPointer(long display, long w, long [] root_return, long [] child_return, int[] root_x_return, int[] root_y_return, int[] win_x_return, int[] win_y_return, int[] mask_return);
/** @param handler cast=(XIOErrorHandler) */
-public static final native long _XSetIOErrorHandler(long handler);
-public static final long XSetIOErrorHandler(long handler) {
- lock.lock();
- try {
- return _XSetIOErrorHandler(handler);
- } finally {
- lock.unlock();
- }
-}
+public static final native long XSetIOErrorHandler(long handler);
/** @param handler cast=(XErrorHandler) */
-public static final native long _XSetErrorHandler(long handler);
-public static final long XSetErrorHandler(long handler) {
- lock.lock();
- try {
- return _XSetErrorHandler(handler);
- } finally {
- lock.unlock();
- }
-}
+public static final native long XSetErrorHandler(long handler);
/**
* @param display cast=(Display *)
* @param window cast=(Window)
*/
-public static final native int _XSetInputFocus(long display, long window, int revert, int time);
-public static final int XSetInputFocus(long display, long window, int revert, int time) {
- lock.lock();
- try {
- return _XSetInputFocus(display, window, revert, time);
- } finally {
- lock.unlock();
- }
-}
+public static final native int XSetInputFocus(long display, long window, int revert, int time);
/**
* @param display cast=(Display *)
* @param w cast=(Window)
* @param prop_window cast=(Window)
*/
-public static final native int _XSetTransientForHint(long display, long w, long prop_window);
-public static final int XSetTransientForHint(long display, long w, long prop_window) {
- lock.lock();
- try {
- return _XSetTransientForHint(display, w, prop_window);
- } finally {
- lock.unlock();
- }
-}
+public static final native int XSetTransientForHint(long display, long w, long prop_window);
/** @param display cast=(Display *) */
-public static final native long _XSynchronize(long display, boolean onoff);
-public static final long XSynchronize(long display, boolean onoff) {
- lock.lock();
- try {
- return _XSynchronize(display, onoff);
- } finally {
- lock.unlock();
- }
-}
+public static final native long XSynchronize(long display, boolean onoff);
/**
* @param dest cast=(void *)
* @param src cast=(const void *),flags=no_out
@@ -1066,61 +818,11 @@ public static final native void memmove(XExposeEvent dest, long src, long size);
*/
public static final native void memmove(XFocusChangeEvent dest, long src, long size);
-/** @method flags=const */
-public static final native int RTLD_GLOBAL();
-/** @method flags=const */
-public static final native int RTLD_NOW();
-/** @method flags=const */
-public static final native int RTLD_LAZY();
-
/** Natives */
public static final native int Call (long func, long arg0, int arg1, int arg2);
-public static final native long Call (long func, long arg0, int arg1, long arg2);
-public static final native long _G_OBJECT_CLASS (long klass);
-public static final long G_OBJECT_CLASS (long klass) {
- lock.lock();
- try {
- return _G_OBJECT_CLASS(klass);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _G_OBJECT_GET_CLASS (long object);
-public static final long G_OBJECT_GET_CLASS (long object) {
- lock.lock();
- try {
- return _G_OBJECT_GET_CLASS(object);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _G_OBJECT_TYPE_NAME (long object);
-public static final long G_OBJECT_TYPE_NAME (long object) {
- lock.lock();
- try {
- return _G_OBJECT_TYPE_NAME(object);
- } finally {
- lock.unlock();
- }
-}
-
-public static final native boolean _G_TYPE_CHECK_INSTANCE_TYPE (long instance, long type);
-/**
- * Note: G_TYPE_CHECK_INSTANCE_TYPE is not a good way to check for instance type,
- * The C-Macro doesn't seem to work reliably in the context of being invoked from Java
- * via JNI on a dynamically loaded library.
- * But webkit1 development has halted and it's not worth the effort to change this.
- * I.e, kept for legacy reason but don't use this. Instead, to identify type, use user_data. (see Webkit proc3 as example).
- */
-public static final boolean G_TYPE_CHECK_INSTANCE_TYPE (long instance, long type) {
- lock.lock();
- try {
- return _G_TYPE_CHECK_INSTANCE_TYPE(instance, type);
- } finally {
- lock.unlock();
- }
-}
+public static final native long G_OBJECT_GET_CLASS(long object);
+public static final native long G_OBJECT_TYPE_NAME(long object);
/** @method flags=const */
public static final native long G_TYPE_BOOLEAN();
/** @method flags=const */
@@ -1128,322 +830,109 @@ public static final native long G_TYPE_DOUBLE();
/** @method flags=const */
public static final native long G_TYPE_FLOAT();
/** @method flags=const */
+public static final native long G_TYPE_LONG();
+/** @method flags=const */
public static final native long G_TYPE_INT();
/** @method flags=const */
public static final native long G_TYPE_INT64();
public static final native long G_VALUE_TYPE(long value);
-public static final native long _G_OBJECT_TYPE (long instance);
-public static final long G_OBJECT_TYPE (long instance) {
- lock.lock();
- try {
- return _G_OBJECT_TYPE(instance);
- } finally {
- lock.unlock();
- }
-}
+public static final native long G_OBJECT_TYPE(long instance);
/** @method flags=const */
-public static final native long _G_TYPE_STRING();
-public static final long G_TYPE_STRING() {
- lock.lock();
- try {
- return _G_TYPE_STRING();
- } finally {
- lock.unlock();
- }
-}
-public static final native int _PANGO_PIXELS(int dimension);
-public static final int PANGO_PIXELS(int dimension) {
- lock.lock();
- try {
- return _PANGO_PIXELS(dimension);
- } finally {
- lock.unlock();
- }
-}
+public static final native long G_TYPE_STRING();
+public static final native int PANGO_PIXELS(int dimension);
/** @method flags=const */
-public static final native long _PANGO_TYPE_FONT_DESCRIPTION();
-public static final long PANGO_TYPE_FONT_DESCRIPTION() {
- lock.lock();
- try {
- return _PANGO_TYPE_FONT_DESCRIPTION();
- } finally {
- lock.unlock();
- }
-}
+public static final native long PANGO_TYPE_FONT_DESCRIPTION();
/** @method flags=const */
-public static final native long _PANGO_TYPE_FONT_FAMILY();
-public static final long PANGO_TYPE_FONT_FAMILY() {
- lock.lock();
- try {
- return _PANGO_TYPE_FONT_FAMILY();
- } finally {
- lock.unlock();
- }
-}
+public static final native long PANGO_TYPE_FONT_FAMILY();
/** @method flags=const */
-public static final native long _PANGO_TYPE_FONT_FACE();
-public static final long PANGO_TYPE_FONT_FACE() {
- lock.lock();
- try {
- return _PANGO_TYPE_FONT_FACE();
- } finally {
- lock.unlock();
- }
-}
+public static final native long PANGO_TYPE_FONT_FACE();
/** @method flags=const */
-public static final native long _PANGO_TYPE_LAYOUT();
-public static final long PANGO_TYPE_LAYOUT() {
- lock.lock();
- try {
- return _PANGO_TYPE_LAYOUT();
- } finally {
- lock.unlock();
- }
-}
-/** @param filename cast=(const char *) */
-public static final native long _dlopen(byte[] filename, int flag);
-public static final long dlopen(byte[] filename, int flag) {
- lock.lock();
- try {
- return _dlopen(filename, flag);
- } finally {
- lock.unlock();
- }
-}
+public static final native long PANGO_TYPE_LAYOUT();
/**
* @param commandline cast=(gchar *)
* @param applName cast=(gchar *)
* @param flags cast=(GAppInfoCreateFlags)
* @param error cast=(GError **)
*/
-public static final native long _g_app_info_create_from_commandline(byte[] commandline, byte[] applName, long flags, long error);
-public static final long g_app_info_create_from_commandline(byte[] commandline, byte[] applName, long flags, long error) {
- lock.lock();
- try {
- return _g_app_info_create_from_commandline(commandline, applName, flags, error);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _g_app_info_get_all();
-public static final long g_app_info_get_all() {
- lock.lock();
- try {
- return _g_app_info_get_all();
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_app_info_create_from_commandline(byte[] commandline, byte[] applName, long flags, long error);
+public static final native long g_app_info_get_all();
/**
* @param appInfo cast=(GAppInfo *)
*/
-public static final native long _g_app_info_get_executable(long appInfo);
-public static final long g_app_info_get_executable(long appInfo) {
- lock.lock();
- try {
- return _g_app_info_get_executable(appInfo);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_app_info_get_executable(long appInfo);
/**
* @param appInfo cast=(GAppInfo *)
*/
-public static final native long _g_app_info_get_icon(long appInfo);
-public static final long g_app_info_get_icon(long appInfo) {
- lock.lock();
- try {
- return _g_app_info_get_icon(appInfo);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_app_info_get_icon(long appInfo);
/**
* @param appInfo cast=(GAppInfo *)
*/
-public static final native long _g_app_info_get_name(long appInfo);
-public static final long g_app_info_get_name(long appInfo) {
- lock.lock();
- try {
- return _g_app_info_get_name(appInfo);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_app_info_get_name(long appInfo);
/**
* @param appInfo cast=(GAppInfo *)
* @param list cast=(GList *)
* @param launchContext cast=(GAppLaunchContext *)
* @param error cast=(GError **)
*/
-public static final native boolean _g_app_info_launch(long appInfo, long list, long launchContext, long error);
-public static final boolean g_app_info_launch(long appInfo, long list, long launchContext, long error) {
- lock.lock();
- try {
- return _g_app_info_launch(appInfo, list, launchContext, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_app_info_launch(long appInfo, long list, long launchContext, long error);
/**
* @param mimeType cast=(gchar *)
* @param mustSupportURIs cast=(gboolean)
*/
-public static final native long _g_app_info_get_default_for_type(byte[] mimeType, boolean mustSupportURIs);
-public static final long g_app_info_get_default_for_type(byte[] mimeType, boolean mustSupportURIs) {
- lock.lock();
- try {
- return _g_app_info_get_default_for_type(mimeType, mustSupportURIs);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_app_info_get_default_for_type(byte[] mimeType, boolean mustSupportURIs);
/**
* @param uri cast=(char *)
* @param launchContext cast=(GAppLaunchContext *)
* @param error cast=(GError **)
*/
-public static final native boolean _g_app_info_launch_default_for_uri(long uri, long launchContext, long error);
-public static final boolean g_app_info_launch_default_for_uri(long uri, long launchContext, long error) {
- lock.lock();
- try {
- return _g_app_info_launch_default_for_uri(uri, launchContext, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_app_info_launch_default_for_uri(long uri, long launchContext, long error);
/**
* @param appInfo cast=(GAppInfo *)
*/
-public static final native boolean _g_app_info_should_show(long appInfo);
-public static final boolean g_app_info_should_show(long appInfo) {
- lock.lock();
- try {
- return _g_app_info_should_show(appInfo);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_app_info_supports_uris(long appInfo);
/**
- * @param appInfo cast=(GAppInfo *)
+ * @param error cast=(GError *)
*/
-public static final native boolean _g_app_info_supports_uris(long appInfo);
-public static final boolean g_app_info_supports_uris(long appInfo) {
- lock.lock();
- try {
- return _g_app_info_supports_uris(appInfo);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_error_get_message(long error);
/**
- * @param error cast=(GError *)
+ * @param error cast=(const GError *)
+ * @param domain cast=(GQuark)
+ * @param code cast=(gint)
*/
-public static final native long _g_error_get_message (long error);
-public static final long g_error_get_message (long error) {
- lock.lock();
- try {
- return _g_error_get_message (error);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_error_matches(long error, int domain, int code);
/**
* @param gerror cast=(GError *)
*/
-public static final native void _g_error_free(long gerror);
-public static final void g_error_free(long gerror) {
- lock.lock();
- try {
- _g_error_free(gerror);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_error_free(long gerror);
/**
* @param type1 cast=(gchar *)
* @param type2 cast=(gchar *)
*/
-public static final native boolean _g_content_type_equals(long type1, byte[] type2);
-public static final boolean g_content_type_equals(long type1, byte[] type2) {
- lock.lock();
- try {
- return _g_content_type_equals(type1, type2);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_content_type_equals(long type1, byte[] type2);
/**
* @param type cast=(gchar *)
* @param supertype cast=(gchar *)
*/
-public static final native boolean _g_content_type_is_a(long type, byte[] supertype);
-public static final boolean g_content_type_is_a(long type, byte[] supertype) {
- lock.lock();
- try {
- return _g_content_type_is_a(type, supertype);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_content_type_is_a(long type, byte[] supertype);
+public static final native int g_file_error_quark();
/**
* @param info cast=(GFileInfo *)
*/
-public static final native long _g_file_info_get_content_type (long info);
-public static final long g_file_info_get_content_type (long info) {
- lock.lock();
- try {
- return _g_file_info_get_content_type (info);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_file_info_get_content_type(long info);
/**
* @param file cast=(GFile *)
*/
-public static final native long _g_file_get_uri(long file);
-public static final long g_file_get_uri (long file) {
- lock.lock();
- try {
- return _g_file_get_uri(file);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_file_get_uri(long file);
/** @param fileName cast=(const char *) */
-public static final native long _g_file_new_for_path(byte[] fileName);
-public static final long g_file_new_for_path(byte[] fileName) {
- lock.lock();
- try {
- return _g_file_new_for_path(fileName);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_file_new_for_path(byte[] fileName);
/**
* @param fileName cast=(const char *)
*/
-public static final native long _g_file_new_for_commandline_arg(byte[] fileName);
-public static final long g_file_new_for_commandline_arg(byte[] fileName) {
- lock.lock();
- try {
- return _g_file_new_for_commandline_arg(fileName);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_file_new_for_commandline_arg(byte[] fileName);
/** @param fileName cast=(const char *) */
-public static final native long _g_file_new_for_uri(byte[] fileName);
-public static final long g_file_new_for_uri(byte[] fileName) {
- lock.lock();
- try {
- return _g_file_new_for_uri(fileName);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_file_new_for_uri(byte[] fileName);
/**
* @param file cast=(GFile *)
* @param attributes cast=(const char *)
@@ -1451,51 +940,19 @@ public static final long g_file_new_for_uri(byte[] fileName) {
* @param cancellable cast=(GCancellable *)
* @param error cast=(GError **)
*/
-public static final native long _g_file_query_info (long file, byte[] attributes, long flags, long cancellable, long error);
-public static final long g_file_query_info (long file,byte[] attributes, long flags, long cancellable, long error) {
- lock.lock();
- try {
- return _g_file_query_info (file, attributes, flags, cancellable, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_file_query_info(long file, byte[] attributes, long flags, long cancellable, long error);
/**
* @param file cast=(const gchar *)
* @param test cast=(GFileTest)
*/
-public static final native boolean /*long*/ _g_file_test(byte[] file, int test);
-public static final boolean /*long*/ g_file_test(byte[] file, int test) {
- lock.lock();
- try {
- return _g_file_test(file, test);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean /*long*/ g_file_test(byte[] file, int test);
/** @param icon cast=(GIcon *) */
-public static final native long _g_icon_to_string(long icon);
-public static final long g_icon_to_string (long icon) {
- lock.lock();
- try {
- return _g_icon_to_string(icon);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_icon_to_string(long icon);
/**
* @param str cast=(const gchar *)
* @param error cast=(GError **)
*/
-public static final native long _g_icon_new_for_string(byte[] str, long error[]);
-public static final long g_icon_new_for_string (byte[] str, long error[]) {
- lock.lock();
- try {
- return _g_icon_new_for_string(str, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_icon_new_for_string(byte[] str, long error[]);
/**
* @param signal_id cast=(guint)
* @param detail cast=(GQuark)
@@ -1503,161 +960,49 @@ public static final long g_icon_new_for_string (byte[] str, long error[]) {
* @param hook_data cast=(gpointer)
* @param data_destroy cast=(GDestroyNotify)
*/
-public static final native long _g_signal_add_emission_hook(int signal_id, int detail, long hook_func, long hook_data, long data_destroy);
-public static final long g_signal_add_emission_hook(int signal_id, int detail, long hook_func, long hook_data, long data_destroy) {
- lock.lock();
- try {
- return _g_signal_add_emission_hook(signal_id, detail, hook_func, hook_data, data_destroy);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_signal_add_emission_hook(int signal_id, int detail, long hook_func, long hook_data, long data_destroy);
/**
* @param signal_id cast=(guint)
* @param hook_id cast=(gulong)
*/
-public static final native void _g_signal_remove_emission_hook(int signal_id, long hook_id);
-public static final void g_signal_remove_emission_hook(int signal_id, long hook_id) {
- lock.lock();
- try {
- _g_signal_remove_emission_hook (signal_id, hook_id);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_remove_emission_hook(int signal_id, long hook_id);
/**
* @param callback_func cast=(GCallback)
* @param user_data cast=(gpointer)
* @param destroy_data cast=(GClosureNotify)
*/
-public static final native long _g_cclosure_new(long callback_func, long user_data, long destroy_data);
-public static final long g_cclosure_new(long callback_func, long user_data, long destroy_data) {
- lock.lock();
- try {
- return _g_cclosure_new(callback_func, user_data, destroy_data);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_cclosure_new(long callback_func, long user_data, long destroy_data);
/** @param closure cast=(GClosure *) */
-public static final native long _g_closure_ref(long closure);
-public static final long g_closure_ref(long closure) {
- lock.lock();
- try {
- return _g_closure_ref(closure);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_closure_ref(long closure);
/** @param closure cast=(GClosure *) */
-public static final native void _g_closure_sink(long closure);
-public static final void g_closure_sink(long closure) {
- lock.lock();
- try {
- _g_closure_sink(closure);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_closure_sink(long closure);
/** @param closure cast=(GClosure *) */
-public static final native void _g_closure_unref(long closure);
-public static final void g_closure_unref(long closure) {
- lock.lock();
- try {
- _g_closure_unref(closure);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_closure_unref(long closure);
/** @param context cast=(GMainContext *) */
-public static final native boolean _g_main_context_acquire(long context);
-public static final boolean g_main_context_acquire(long context) {
- lock.lock();
- try {
- return _g_main_context_acquire(context);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_main_context_acquire(long context);
/**
* @param context cast=(GMainContext *)
* @param fds cast=(GPollFD *)
*/
-public static final native int _g_main_context_check(long context, int max_priority, long fds, int n_fds);
-public static final int g_main_context_check(long context, int max_priority, long fds, int n_fds) {
- lock.lock();
- try {
- return _g_main_context_check(context, max_priority, fds, n_fds);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _g_main_context_default();
-public static final long g_main_context_default() {
- lock.lock();
- try {
- return _g_main_context_default();
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_main_context_check(long context, int max_priority, long fds, int n_fds);
+public static final native long g_main_context_default();
/** @param context cast=(GMainContext *) */
-public static final native boolean _g_main_context_iteration(long context, boolean may_block);
-public static final boolean g_main_context_iteration(long context, boolean may_block) {
- lock.lock();
- try {
- return _g_main_context_iteration(context, may_block);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_main_context_iteration(long context, boolean may_block);
/** @param context cast=(GMainContext *) */
-public static final native long _g_main_context_get_poll_func(long context);
-public static final long g_main_context_get_poll_func(long context) {
- lock.lock();
- try {
- return _g_main_context_get_poll_func(context);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_main_context_get_poll_func(long context);
/**
* @param context cast=(GMainContext *)
* @param priority cast=(gint *)
*/
-public static final native boolean _g_main_context_prepare(long context, int[] priority);
-public static final boolean g_main_context_prepare(long context, int[] priority) {
- lock.lock();
- try {
- return _g_main_context_prepare(context, priority);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_main_context_prepare(long context, int[] priority);
/**
* @param context cast=(GMainContext *)
* @param fds cast=(GPollFD *)
* @param timeout_ cast=(gint *)
*/
-public static final native int _g_main_context_query(long context, int max_priority, int[] timeout_, long fds, int n_fds);
-public static final int g_main_context_query(long context, int max_priority, int[] timeout_, long fds, int n_fds) {
- lock.lock();
- try {
- return _g_main_context_query(context, max_priority, timeout_, fds, n_fds);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_main_context_query(long context, int max_priority, int[] timeout_, long fds, int n_fds);
/** @param context cast=(GMainContext *) */
-public static final native void _g_main_context_release(long context);
-public static final void g_main_context_release(long context) {
- lock.lock();
- try {
- _g_main_context_release(context);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_main_context_release(long context);
/** @param context cast=(GMainContext *) */
public static final native void g_main_context_wakeup(long context);
/**
@@ -1667,39 +1012,15 @@ public static final native void g_main_context_wakeup(long context);
* @param bytes_written cast=(gsize *)
* @param error cast=(GError **)
*/
-public static final native long _g_filename_to_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error);
-public static final long g_filename_to_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error) {
- lock.lock();
- try {
- return _g_filename_to_utf8(opsysstring, len, bytes_read, bytes_written, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_filename_to_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error);
/** @param filename cast=(const gchar *) */
-public static final native long _g_filename_display_name(long filename);
-public static final long g_filename_display_name(long filename) {
- lock.lock();
- try {
- return _g_filename_display_name(filename);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_filename_display_name(long filename);
/**
* @param filename cast=(const char *)
* @param hostname cast=(const char *)
* @param error cast=(GError **)
*/
-public static final native long _g_filename_to_uri(long filename, long hostname, long [] error);
-public static final long g_filename_to_uri(long filename, long hostname, long [] error) {
- lock.lock();
- try {
- return _g_filename_to_uri(filename, hostname, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_filename_to_uri(long filename, long hostname, long [] error);
/**
* @param opsysstring cast=(const gchar *)
* @param len cast=(gssize)
@@ -1707,408 +1028,121 @@ public static final long g_filename_to_uri(long filename, long hostname, long []
* @param bytes_written cast=(gsize *)
* @param error cast=(GError **)
*/
-public static final native long _g_filename_from_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error);
-public static final long g_filename_from_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error) {
- lock.lock();
- try {
- return _g_filename_from_utf8(opsysstring, len, bytes_read, bytes_written, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_filename_from_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error);
/**
* @param uri cast=(const char *)
* @param hostname cast=(char **)
* @param error cast=(GError **)
*/
-public static final native long _g_filename_from_uri(long uri, long [] hostname, long [] error);
-public static final long g_filename_from_uri(long uri, long [] hostname, long [] error) {
- lock.lock();
- try {
- return _g_filename_from_uri(uri, hostname, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_filename_from_uri(long uri, long [] hostname, long [] error);
/** @param mem cast=(gpointer) */
-public static final native void _g_free(long mem);
-public static final void g_free(long mem) {
- lock.lock();
- try {
- _g_free(mem);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_free(long mem);
+/** @method accessor=g_free,flags=const address */
+public static final native long addressof_g_free();
/**
* @param variable cast=(const gchar *),flags=no_out
*/
-public static final native long _g_getenv(byte [] variable);
-public static final long g_getenv(byte [] variable) {
- lock.lock();
- try {
- return _g_getenv(variable);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_getenv(byte [] variable);
/**
- * @param table cast=(GHashTable *)
+ * @method flags=ignore_deprecations
+ * @param result cast=(GTimeVal *)
*/
-public static final native long _g_hash_table_get_values(long table);
-public static final long g_hash_table_get_values(long table) {
- lock.lock();
- try {
- return _g_hash_table_get_values(table);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_get_current_time(long result);
+/**
+ * @method flags=ignore_deprecations
+ * @param result cast=(GTimeVal *)
+ * @param microseconds cast=(glong)
+ */
+public static final native void g_time_val_add(long result, long microseconds);
/**
* @param function cast=(GSourceFunc)
* @param data cast=(gpointer)
*/
-public static final native int _g_idle_add(long function, long data);
-public static final int g_idle_add(long function, long data) {
- lock.lock();
- try {
- return _g_idle_add(function, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_idle_add(long function, long data);
/**
* @param list cast=(GList *)
* @param data cast=(gpointer)
*/
-public static final native long _g_list_append(long list, long data);
-public static final long g_list_append(long list, long data) {
- lock.lock();
- try {
- return _g_list_append(list, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_list_append(long list, long data);
/** @param list cast=(GList *) */
-public static final native long _g_list_data(long list);
-public static final long g_list_data(long list) {
- lock.lock();
- try {
- return _g_list_data(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_list_data(long list);
/** @param list cast=(GList *) */
-public static final native void _g_list_free(long list);
-public static final void g_list_free(long list) {
- lock.lock();
- try {
- _g_list_free(list);
- } finally {
- lock.unlock();
- }
-}
-/** @param list cast=(GList *) */
-public static final native void _g_list_free_1(long list);
-public static final void g_list_free_1(long list) {
- lock.lock();
- try {
- _g_list_free_1(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_list_free(long list);
/**
* @param list cast=(GList *)
*/
-public static final native long _g_list_last(long list);
-public static final long g_list_last(long list) {
- lock.lock();
- try {
- return _g_list_last(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_list_last(long list);
/** @param list cast=(GList *) */
-public static final native int _g_list_length(long list);
-public static final int g_list_length(long list) {
- lock.lock();
- try {
- return _g_list_length(list);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param list cast=(GList *)
- * @param llist cast=(GList *)
- */
-public static final native void _g_list_set_next(long list, long llist);
-public static final void g_list_set_next(long list, long llist) {
- lock.lock();
- try {
- _g_list_set_next(list, llist);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _g_list_next(long list);
-public static final long g_list_next(long list) {
- lock.lock();
- try {
- return _g_list_next(list);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param list cast=(GList *)
- * @param n cast=(guint)
- */
-public static final native long _g_list_nth(long list, int n);
-public static final long g_list_nth(long list, int n) {
- lock.lock();
- try {
- return _g_list_nth(list, n);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_list_length(long list);
+public static final native long g_list_next(long list);
/**
* @param list cast=(GList *)
* @param n cast=(guint)
*/
-public static final native long _g_list_nth_data(long list, int n);
-public static final long g_list_nth_data(long list, int n) {
- lock.lock();
- try {
- return _g_list_nth_data(list, n);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param list cast=(GList *)
- * @param data cast=(gpointer)
- */
-public static final native long _g_list_prepend(long list, long data);
-public static final long g_list_prepend(long list, long data) {
- lock.lock();
- try {
- return _g_list_prepend(list, data);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param list cast=(GList *)
- * @param llist cast=(GList *)
- */
-public static final native void _g_list_set_previous(long list, long llist);
-public static final void g_list_set_previous(long list, long llist) {
- lock.lock();
- try {
- _g_list_set_previous(list, llist);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _g_list_previous(long list);
-public static final long g_list_previous(long list) {
- lock.lock();
- try {
- return _g_list_previous(list);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param list cast=(GList *)
- * @param link cast=(GList *)
- */
-public static final native long _g_list_remove_link(long list, long link);
-public static final long g_list_remove_link(long list, long link) {
- lock.lock();
- try {
- return _g_list_remove_link(list, link);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_list_nth_data(long list, int n);
+public static final native long g_list_previous(long list);
/**
* @param log_domain cast=(gchar *)
* @param log_levels cast=(GLogLevelFlags)
* @param message cast=(gchar *)
* @param unused_data cast=(gpointer)
*/
-public static final native void _g_log_default_handler(long log_domain, int log_levels, long message, long unused_data);
-public static final void g_log_default_handler(long log_domain, int log_levels, long message, long unused_data) {
- lock.lock();
- try {
- _g_log_default_handler(log_domain, log_levels, message, unused_data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_log_default_handler(long log_domain, int log_levels, long message, long unused_data);
/**
* @param log_domain cast=(gchar *),flags=no_out
* @param handler_id cast=(gint)
*/
-public static final native void _g_log_remove_handler(byte[] log_domain, int handler_id);
-public static final void g_log_remove_handler(byte[] log_domain, int handler_id) {
- lock.lock();
- try {
- _g_log_remove_handler(log_domain, handler_id);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_log_remove_handler(byte[] log_domain, int handler_id);
/**
* @param log_domain cast=(gchar *),flags=no_out
* @param log_levels cast=(GLogLevelFlags)
* @param log_func cast=(GLogFunc)
* @param user_data cast=(gpointer)
*/
-public static final native int _g_log_set_handler(byte[] log_domain, int log_levels, long log_func, long user_data);
-public static final int g_log_set_handler(byte[] log_domain, int log_levels, long log_func, long user_data) {
- lock.lock();
- try {
- return _g_log_set_handler(log_domain, log_levels, log_func, user_data);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_log_set_handler(byte[] log_domain, int log_levels, long log_func, long user_data);
/** @param size cast=(gulong) */
-public static final native long _g_malloc(long size);
-public static final long g_malloc(long size) {
- lock.lock();
- try {
- return _g_malloc(size);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param oclass cast=(GObjectClass *)
- * @param property_name cast=(const gchar *)
- */
-public static final native long _g_object_class_find_property(long oclass, byte[] property_name);
-public static final long g_object_class_find_property(long oclass, byte[] property_name) {
- lock.lock();
- try {
- return _g_object_class_find_property(oclass, property_name);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_malloc(long size);
/**
* @param object cast=(GObject *)
* @param first_property_name cast=(const gchar *),flags=no_out
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_get(long object, byte[] first_property_name, int[] value, long terminator);
-public static final void g_object_get(long object, byte[] first_property_name, int[] value, long terminator) {
- lock.lock();
- try {
- _g_object_get(object, first_property_name, value, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_get(long object, byte[] first_property_name, int[] value, long terminator);
/**
* @param object cast=(GObject *)
* @param first_property_name cast=(const gchar *),flags=no_out
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_get(long object, byte[] first_property_name, long[] value, long terminator);
-public static final void g_object_get(long object, byte[] first_property_name, long[] value, long terminator) {
- lock.lock();
- try {
- _g_object_get(object, first_property_name, value, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_get(long object, byte[] first_property_name, long[] value, long terminator);
/**
* @param object cast=(GObject *)
* @param quark cast=(GQuark)
*/
-public static final native long _g_object_get_qdata(long object, int quark);
-public static final long g_object_get_qdata(long object, int quark) {
- lock.lock();
- try {
- return _g_object_get_qdata(object, quark);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_object_get_qdata(long object, int quark);
/**
* @param type cast=(GType)
* @param first_property_name cast=(const gchar *)
*/
-public static final native long _g_object_new (long type, long first_property_name);
-public static final long g_object_new (long type, long first_property_name) {
- lock.lock();
- try {
- return _g_object_new(type, first_property_name);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_object_new(long type, long first_property_name);
/**
* @param object cast=(GObject *)
* @param property_name cast=(const gchar *)
*/
-public static final native void _g_object_notify (long object, byte[] property_name);
-public static final void g_object_notify (long object, byte[] property_name) {
- lock.lock();
- try {
- _g_object_notify(object, property_name);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_notify(long object, byte[] property_name);
/** @param object cast=(gpointer) */
-public static final native long _g_object_ref(long object);
-public static final long g_object_ref(long object) {
- lock.lock();
- try {
- return _g_object_ref(object);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_object_ref(long object);
/**
* @param object cast=(gpointer)
* @param first_property_name cast=(const gchar *),flags=no_out
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_set(long object, byte[] first_property_name, boolean data, long terminator);
-public static final void g_object_set(long object, byte[] first_property_name, boolean data, long terminator) {
- lock.lock();
- try {
- _g_object_set(object, first_property_name, data, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_set(long object, byte[] first_property_name, boolean data, long terminator);
/**
* @param object cast=(gpointer)
* @param first_property_name cast=(const gchar *),flags=no_out
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_set(long object, byte[] first_property_name, byte[] data, long terminator);
-public static final void g_object_set(long object, byte[] first_property_name, byte[] data, long terminator) {
- lock.lock();
- try {
- _g_object_set(object, first_property_name, data, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_set(long object, byte[] first_property_name, byte[] data, long terminator);
//Note, the function below is handled in a special way in os.h because of the GdkRGBA (gtk3 only) struct. See os.h
//So although it is not marked as dynamic, it is only build on gtk3.
@@ -2117,161 +1151,64 @@ public static final void g_object_set(long object, byte[] first_property_name, b
* @param first_property_name cast=(const gchar *)
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_set(long object, byte[] first_property_name, GdkRGBA data, long terminator);
-public static final void g_object_set(long object, byte[] first_property_name, GdkRGBA data, long terminator) {
- lock.lock();
- try {
- _g_object_set(object, first_property_name, data, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_set(long object, byte[] first_property_name, GdkRGBA data, long terminator);
/**
* @param object cast=(gpointer)
* @param first_property_name cast=(const gchar *),flags=no_out
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_set(long object, byte[] first_property_name, int data, long terminator);
-public static final void g_object_set(long object, byte[] first_property_name, int data, long terminator) {
- lock.lock();
- try {
- _g_object_set(object, first_property_name, data, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_set(long object, byte[] first_property_name, int data, long terminator);
/**
* @param object cast=(gpointer)
* @param first_property_name cast=(const gchar *),flags=no_out
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_set(long object, byte[] first_property_name, float data, long terminator);
-public static final void g_object_set(long object, byte[] first_property_name, float data, long terminator) {
- lock.lock();
- try {
- _g_object_set(object, first_property_name, data, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_set(long object, byte[] first_property_name, float data, long terminator);
/**
* @param object cast=(gpointer)
* @param first_property_name cast=(const gchar *),flags=no_out
* @param terminator cast=(const gchar *),flags=sentinel
*/
-public static final native void _g_object_set(long object, byte[] first_property_name, long data, long terminator);
-public static final void g_object_set(long object, byte[] first_property_name, long data, long terminator) {
- lock.lock();
- try {
- _g_object_set(object, first_property_name, data, terminator);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_set(long object, byte[] first_property_name, long data, long terminator);
/**
* @param object cast=(GObject *)
* @param quark cast=(GQuark)
* @param data cast=(gpointer)
*/
-public static final native void _g_object_set_qdata(long object, int quark, long data);
-public static final void g_object_set_qdata(long object, int quark, long data) {
- lock.lock();
- try {
- _g_object_set_qdata(object, quark, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_object_set_qdata(long object, int quark, long data);
/** @param object cast=(gpointer) */
-public static final native void _g_object_unref(long object);
-public static final void g_object_unref(long object) {
- lock.lock();
- try {
- _g_object_unref(object);
- } finally {
- lock.unlock();
- }
-}
-
+public static final native void g_object_unref(long object);
/**
* @param data cast=(gconstpointer)
* @param size cast=(gsize)
*/
-public static final native long _g_bytes_new (byte [] data, long size);
-public static final long g_bytes_new (byte [] data, long size) {
- lock.lock();
- try {
- return _g_bytes_new (data, size);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_bytes_new(byte [] data, long size);
/**
* @param gBytes cast=(GBytes *)
*/
-public static final native void _g_bytes_unref (long gBytes);
-public static final void g_bytes_unref (long gBytes) {
- lock.lock();
- try {
- _g_bytes_unref (gBytes);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_bytes_unref(long gBytes);
/** @param string cast=(const gchar *),flags=no_out */
-public static final native int _g_quark_from_string(byte[] string);
-public static final int g_quark_from_string(byte[] string) {
- lock.lock();
- try {
- return _g_quark_from_string(string);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_quark_from_string(byte[] string);
/** @param prgname cast=(const gchar *),flags=no_out */
-public static final native void _g_set_prgname(byte[] prgname);
-public static final void g_set_prgname(byte[] prgname) {
- lock.lock();
- try {
- _g_set_prgname(prgname);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_set_prgname(byte[] prgname);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *),flags=no_out
* @param proc cast=(GCallback)
* @param data cast=(gpointer)
*/
-public static final native int _g_signal_connect(long instance, byte[] detailed_signal, long proc, long data);
-public static final int g_signal_connect(long instance, byte[] detailed_signal, long proc, long data) {
- lock.lock();
- try {
- return _g_signal_connect(instance, detailed_signal, proc, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_signal_connect(long instance, byte[] detailed_signal, long proc, long data);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *)
* @param closure cast=(GClosure *)
* @param after cast=(gboolean)
*/
-public static final native int _g_signal_connect_closure(long instance, byte[] detailed_signal, long closure, boolean after);
-public static final int g_signal_connect_closure(long instance, byte[] detailed_signal, long closure, boolean after) {
- lock.lock();
- try {
- return _g_signal_connect_closure(instance, detailed_signal, closure, after);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_signal_connect_closure(long instance, byte[] detailed_signal, long closure, boolean after);
/**
* @param instance cast=(gpointer)
* @param signal_id cast=(guint)
@@ -2279,109 +1216,37 @@ public static final int g_signal_connect_closure(long instance, byte[] detailed_
* @param closure cast=(GClosure *)
* @param after cast=(gboolean)
*/
-public static final native int _g_signal_connect_closure_by_id(long instance, int signal_id, int detail, long closure, boolean after);
-public static final int g_signal_connect_closure_by_id(long instance, int signal_id, int detail, long closure, boolean after) {
- lock.lock();
- try {
- return _g_signal_connect_closure_by_id(instance, signal_id, detail, closure, after);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_signal_connect_closure_by_id(long instance, int signal_id, int detail, long closure, boolean after);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *),flags=no_out
*/
-public static final native void _g_signal_emit_by_name(long instance, byte[] detailed_signal);
-public static final void g_signal_emit_by_name(long instance, byte[] detailed_signal) {
- lock.lock();
- try {
- _g_signal_emit_by_name(instance, detailed_signal);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *),flags=no_out
*/
-public static final native void _g_signal_emit_by_name(long instance, byte[] detailed_signal, long data);
-public static final void g_signal_emit_by_name(long instance, byte[] detailed_signal, long data) {
- lock.lock();
- try {
- _g_signal_emit_by_name(instance, detailed_signal, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, long data);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *),flags=no_out
*/
-public static final native void _g_signal_emit_by_name(long instance, byte[] detailed_signal, GdkRectangle data);
-public static final void g_signal_emit_by_name(long instance, byte[] detailed_signal, GdkRectangle data) {
- lock.lock();
- try {
- _g_signal_emit_by_name(instance, detailed_signal, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, GdkRectangle data);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *),flags=no_out
*/
-public static final native void _g_signal_emit_by_name(long instance, byte[] detailed_signal, long data1, long data2);
-public static final void g_signal_emit_by_name(long instance, byte[] detailed_signal, long data1, long data2) {
- lock.lock();
- try {
- _g_signal_emit_by_name(instance, detailed_signal, data1, data2);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, long data1, long data2);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *),flags=no_out
*/
-public static final native void _g_signal_emit_by_name(long instance, byte[] detailed_signal, byte [] data);
-public static final void g_signal_emit_by_name(long instance, byte[] detailed_signal, byte [] data) {
- lock.lock();
- try {
- _g_signal_emit_by_name(instance, detailed_signal, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, byte [] data);
/**
* @param instance cast=(gpointer)
* @param handler_id cast=(gulong)
*/
-public static final native void _g_signal_handler_disconnect(long instance, int handler_id);
-public static final void g_signal_handler_disconnect(long instance, int handler_id) {
- lock.lock();
- try {
- _g_signal_handler_disconnect(instance, handler_id);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param instance cast=(gpointer)
- * @param detail cast=(GQuark)
- * @param closure cast=(GClosure *)
- * @param func cast=(gpointer)
- * @param data cast=(gpointer)
- */
-public static final native int _g_signal_handler_find(long instance, int mask, int signal_id, int detail, long closure, long func, long data);
-public static final int g_signal_handler_find(long instance, int mask, int signal_id, int detail, long closure, long func, long data) {
- lock.lock();
- try {
- return _g_signal_handler_find(instance, mask, signal_id, detail, closure, func, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_handler_disconnect(long instance, int handler_id);
/**
* @param instance cast=(gpointer)
* @param mask cast=(GSignalMatchType)
@@ -2391,15 +1256,7 @@ public static final int g_signal_handler_find(long instance, int mask, int signa
* @param func cast=(gpointer)
* @param data cast=(gpointer)
*/
-public static final native int _g_signal_handlers_block_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data);
-public static final int g_signal_handlers_block_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data) {
- lock.lock();
- try {
- return _g_signal_handlers_block_matched(instance, mask, signal_id, detail, closure, func, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_signal_handlers_block_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data);
/**
* @param instance cast=(gpointer)
* @param mask cast=(GSignalMatchType)
@@ -2409,296 +1266,62 @@ public static final int g_signal_handlers_block_matched(long instance, int mask,
* @param func cast=(gpointer)
* @param data cast=(gpointer)
*/
-public static final native int _g_signal_handlers_unblock_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data);
-public static final int g_signal_handlers_unblock_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data) {
- lock.lock();
- try {
- return _g_signal_handlers_unblock_matched(instance, mask, signal_id, detail, closure, func, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_signal_handlers_unblock_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data);
/** @param name cast=(const gchar *),flags=no_out */
-public static final native int _g_signal_lookup (byte[] name, long itype);
-public static final int g_signal_lookup (byte[] name, long itype) {
- lock.lock();
- try {
- return _g_signal_lookup(name, itype);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_signal_lookup(byte[] name, long itype);
/**
* @param instance cast=(gpointer)
* @param detailed_signal cast=(const gchar *),flags=no_out
*/
-public static final native void _g_signal_stop_emission_by_name(long instance, byte[] detailed_signal);
-public static final void g_signal_stop_emission_by_name(long instance, byte[] detailed_signal) {
- lock.lock();
- try {
- _g_signal_stop_emission_by_name(instance, detailed_signal);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_signal_stop_emission_by_name(long instance, byte[] detailed_signal);
/** @param tag cast=(guint) */
-public static final native boolean /*long*/ _g_source_remove (long tag);
-public static final boolean /*long*/ g_source_remove (long tag) {
- lock.lock();
- try {
- return _g_source_remove(tag);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean /*long*/ g_source_remove(long tag);
/**
* @param list cast=(GSList *)
* @param data cast=(gpointer)
*/
-public static final native long _g_slist_append(long list, long data);
-public static final long g_slist_append(long list, long data) {
- lock.lock();
- try {
- return _g_slist_append(list, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_slist_append(long list, long data);
/** @param list cast=(GSList *) */
-public static final native long _g_slist_data (long list);
-public static final long g_slist_data (long list) {
- lock.lock();
- try {
- return _g_slist_data(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_slist_data(long list);
/** @param list cast=(GSList *) */
-public static final native void _g_slist_free (long list);
-public static final void g_slist_free (long list) {
- lock.lock();
- try {
- _g_slist_free(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_slist_free(long list);
/** @param list cast=(GSList *) */
-public static final native long _g_slist_next (long list);
-public static final long g_slist_next (long list) {
- lock.lock();
- try {
- return _g_slist_next(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_slist_next(long list);
/** @param list cast=(GSList *) */
-public static final native int _g_slist_length (long list);
-public static final int g_slist_length (long list) {
- lock.lock();
- try {
- return _g_slist_length(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_slist_length(long list);
/** @param string_array cast=(gchar **) */
-public static final native void _g_strfreev(long string_array);
-public static final void g_strfreev(long string_array) {
- lock.lock();
- try {
- _g_strfreev(string_array);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @method flags=getter
- * @param string cast=(GString *)
- */
-public static final native int _GString_len(long string);
-public static final int GString_len(long string) {
- lock.lock();
- try {
- return _GString_len(string);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @method flags=getter
- * @param string cast=(GString *)
- */
-public static final native long _GString_str(long string);
-public static final long GString_str(long string) {
- lock.lock();
- try {
- return _GString_str(string);
- } finally {
- lock.unlock();
- }
-}
-
-/**
- * @param init cast=(const gchar *)
- */
-public static final native long _g_string_new_len(long init, long gssize);
-/** GString * g_string_new_len (const gchar *init, gssize len); */
-public static final long g_string_new_len(long init, long gssize) {
- lock.lock();
- try {
- return _g_string_new_len(init, gssize);
- } finally {
- lock.unlock();
- }
-}
-
-/**
- * @param GString cast=(GString *)
- */
-public static final native long _g_string_free(long GString, int gboolen_free_segment);
-/** gchar * g_string_free (GString *string, gboolean free_segment);*/
-public static final long g_string_free(long GString, int gboolen_free_segment) {
- lock.lock();
- try {
- return _g_string_free(GString, gboolen_free_segment);
- } finally {
- lock.unlock();
- }
-}
-
+public static final native void g_strfreev(long string_array);
/**
* @param str cast=(const gchar *)
* @param endptr cast=(gchar **)
*/
-public static final native double _g_strtod(long str, long [] endptr);
-public static final double g_strtod(long str, long [] endptr) {
- lock.lock();
- try {
- return _g_strtod(str, endptr);
- } finally {
- lock.unlock();
- }
-}
+public static final native double g_strtod(long str, long [] endptr);
/** @param str cast=(char *) */
public static final native long g_strdup (long str);
-/**
- * @param instance_type cast=(GType)
- * @param interface_type cast=(GType)
- * @param info cast=(const GInterfaceInfo *)
- */
-public static final native void _g_type_add_interface_static (long instance_type, long interface_type, long info);
-public static final void g_type_add_interface_static (long instance_type, long interface_type, long info) {
- lock.lock();
- try {
- _g_type_add_interface_static(instance_type, interface_type, info);
- } finally {
- lock.unlock();
- }
-}
/** @param g_class cast=(GType) */
-public static final native long _g_type_class_peek (long g_class);
-public static final long g_type_class_peek (long g_class) {
- lock.lock();
- try {
- return _g_type_class_peek(g_class);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_type_class_peek(long g_class);
/** @param g_class cast=(gpointer) */
-public static final native long _g_type_class_peek_parent (long g_class);
-public static final long g_type_class_peek_parent (long g_class) {
- lock.lock();
- try {
- return _g_type_class_peek_parent(g_class);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_type_class_peek_parent(long g_class);
/** @param g_class cast=(GType) */
-public static final native long _g_type_class_ref (long g_class);
-public static final long g_type_class_ref (long g_class) {
- lock.lock();
- try {
- return _g_type_class_ref(g_class);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_type_class_ref(long g_class);
/** @param g_class cast=(gpointer) */
-public static final native void _g_type_class_unref (long g_class);
-public static final void g_type_class_unref (long g_class) {
- lock.lock();
- try {
- _g_type_class_unref(g_class);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_type_class_unref(long g_class);
/** @param iface cast=(gpointer) */
-public static final native long _g_type_interface_peek_parent (long iface);
-public static final long g_type_interface_peek_parent (long iface) {
- lock.lock();
- try {
- return _g_type_interface_peek_parent(iface);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_type_interface_peek_parent(long iface);
/**
* @param type cast=(GType)
* @param is_a_type cast=(GType)
*/
-public static final native boolean _g_type_is_a (long type, long is_a_type);
-public static final boolean g_type_is_a (long type, long is_a_type) {
- lock.lock();
- try {
- return _g_type_is_a(type, is_a_type);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_type_is_a(long type, long is_a_type);
/** @param type cast=(GType) */
-public static final native long _g_type_parent (long type);
-public static final long g_type_parent (long type) {
- lock.lock();
- try {
- return _g_type_parent(type);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param type cast=(GType)
- * @param query cast=(GTypeQuery *)
- */
-public static final native void _g_type_query (long type, long query);
-public static final void g_type_query (long type, long query) {
- lock.lock();
- try {
- _g_type_query(type, query);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_type_parent(long type);
/**
* @param parent_type cast=(GType)
* @param type_name cast=(const gchar *)
* @param info cast=(const GTypeInfo *)
* @param flags cast=(GTypeFlags)
*/
-public static final native long _g_type_register_static (long parent_type, byte[] type_name, long info, int flags);
-public static final long g_type_register_static (long parent_type, byte[] type_name, long info, int flags) {
- lock.lock();
- try {
- return _g_type_register_static(parent_type, type_name, info, flags);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_type_register_static(long parent_type, byte[] type_name, long info, int flags);
/**
* @param str cast=(const gunichar2 *),flags=no_out critical
* @param len cast=(glong)
@@ -2706,38 +1329,14 @@ public static final long g_type_register_static (long parent_type, byte[] type_n
* @param items_written cast=(glong *),flags=critical
* @param error cast=(GError **),flags=critical
*/
-public static final native long _g_utf16_to_utf8(char[] str, long len, long [] items_read, long [] items_written, long [] error);
-public static final long g_utf16_to_utf8(char[] str, long len, long [] items_read, long [] items_written, long [] error) {
- lock.lock();
- try {
- return _g_utf16_to_utf8(str, len, items_read, items_written, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_utf16_to_utf8(char[] str, long len, long [] items_read, long [] items_written, long [] error);
/**
* @param str cast=(const gchar *)
* @param pos cast=(const gchar *)
*/
-public static final native long _g_utf8_pointer_to_offset(long str, long pos);
-public static final long g_utf8_pointer_to_offset(long str, long pos) {
- lock.lock();
- try {
- return _g_utf8_pointer_to_offset(str, pos);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_utf8_pointer_to_offset(long str, long pos);
/** @param str cast=(const gchar *) */
-public static final native long _g_utf8_strlen(long str, long max);
-public static final long g_utf8_strlen(long str, long max) {
- lock.lock();
- try {
- return _g_utf8_strlen(str, max);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_utf8_strlen(long str, long max);
/**
* @param str cast=(const gchar *),flags=no_out critical
* @param len cast=(glong)
@@ -2745,15 +1344,7 @@ public static final long g_utf8_strlen(long str, long max) {
* @param items_written cast=(glong *),flags=critical
* @param error cast=(GError **),flags=critical
*/
-public static final native long _g_utf8_to_utf16(byte[] str, long len, long [] items_read, long [] items_written, long [] error);
-public static final long g_utf8_to_utf16(byte[] str, long len, long [] items_read, long [] items_written, long [] error) {
- lock.lock();
- try {
- return _g_utf8_to_utf16(str, len, items_read, items_written, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_utf8_to_utf16(byte[] str, long len, long [] items_read, long [] items_written, long [] error);
/**
* @param str cast=(const gchar *)
* @param len cast=(glong)
@@ -2761,15 +1352,7 @@ public static final long g_utf8_to_utf16(byte[] str, long len, long [] items_rea
* @param items_written cast=(glong *),flags=critical
* @param error cast=(GError **),flags=critical
*/
-public static final native long _g_utf8_to_utf16(long str, long len, long [] items_read, long [] items_written, long [] error);
-public static final long g_utf8_to_utf16(long str, long len, long [] items_read, long [] items_written, long [] error) {
- lock.lock();
- try {
- return _g_utf8_to_utf16(str, len, items_read, items_written, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_utf8_to_utf16(long str, long len, long [] items_read, long [] items_written, long [] error);
/**
* @param value cast=(GValue *)
* @param type cast=(GType)
@@ -2794,109 +1377,27 @@ public static final native void g_value_set_int64 (long value, long v);
/** @param value cast=(GValue *) */
public static final native void g_value_unset (long value);
/** @param value cast=(const GValue *) */
-public static final native long _g_value_peek_pointer (long value);
-public static final long g_value_peek_pointer (long value) {
- lock.lock();
- try {
- return _g_value_peek_pointer(value);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_value_peek_pointer(long value);
/**
* @param variable cast=(const gchar *),flags=no_out
*/
-public static final native void _g_unsetenv(byte [] variable);
-public static final void g_unsetenv(byte [] variable) {
- lock.lock();
- try {
- _g_unsetenv(variable);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_unsetenv(byte [] variable);
/** @method flags=const */
-public static final native int _glib_major_version();
-public static final int glib_major_version() {
- lock.lock();
- try {
- return _glib_major_version();
- } finally {
- lock.unlock();
- }
-}
+public static final native int glib_major_version();
/** @method flags=const */
-public static final native int _glib_minor_version();
-public static final int glib_minor_version() {
- lock.lock();
- try {
- return _glib_minor_version();
- } finally {
- lock.unlock();
- }
-}
+public static final native int glib_minor_version();
/** @method flags=const */
-public static final native int _glib_micro_version();
-public static final int glib_micro_version() {
- lock.lock();
- try {
- return _glib_micro_version();
- } finally {
- lock.unlock();
- }
-}
-
+public static final native int glib_micro_version();
/**
* @param interval cast=(guint32)
* @param function cast=(GSourceFunc)
* @param data cast=(gpointer)
*/
-public static final native int _g_timeout_add(int interval, long function, long data);
-public static final int g_timeout_add(int interval, long function, long data) {
- lock.lock();
- try {
- return _g_timeout_add(interval, function, data);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_timeout_add(int interval, long function, long data);
/** @method flags=dynamic */
-public static final native boolean _FcConfigAppFontAddFile(long config, byte[] file);
-public static final boolean FcConfigAppFontAddFile(long config, byte[] file) {
- lock.lock();
- try {
- return _FcConfigAppFontAddFile(config, file);
- } finally {
- lock.unlock();
- }
-}
-
+public static final native boolean FcConfigAppFontAddFile(long config, byte[] file);
-// Technically works on OSX also, but currently only used on Linux.
-// Once SWT is moved to Java 9, consider using 'ProcessHandle.current().getPid();' instead,
-// but for now getpid() should do.
-// https://stackoverflow.com/questions/35842/how-can-a-java-program-get-its-own-process-id
-public static final native int _getpid ();
-public static final int getpid() {
- lock.lock();
- try {
- return _getpid();
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
-public static final native void memmove(long dest, GInterfaceInfo src, int size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *),flags=no_out
- */
-public static final native void memmove(long dest, GObjectClass src);
/**
* @param dest cast=(void *)
* @param src cast=(const void *),flags=no_out
@@ -2908,25 +1409,7 @@ public static final native void memmove(long dest, GTypeInfo src, int size);
* @param src cast=(const void *),flags=no_out
* @param size cast=(size_t)
*/
-public static final native void memmove(long dest, GtkTargetEntry src, long size);
-/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
public static final native void memmove(long dest, GdkRGBA src, long size);
-/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
-public static final native void memmove(long dest, GdkEventButton src, long size);
-/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
-public static final native void memmove(long dest, GdkEventKey src, long size);
/** @param src flags=no_out */
public static final native void memmove(long dest, GtkWidgetClass src);
/**
@@ -2935,17 +1418,6 @@ public static final native void memmove(long dest, GtkWidgetClass src);
* @param size cast=(size_t)
*/
public static final native void memmove(long dest, PangoAttribute src, long size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- */
-public static final native void memmove(GObjectClass dest, long src);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GTypeQuery dest, long src, long size);
/** @param dest flags=no_in */
public static final native void memmove(GtkWidgetClass dest, long src);
/**
@@ -2966,42 +1438,6 @@ public static final native void memmove(GdkKeymapKey dest, long src, long size);
* @param size cast=(size_t)
*/
public static final native void memmove(GdkRGBA dest, long src, long size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GdkEventButton dest, long src, long size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GdkEventCrossing dest, long src, long size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GdkEventFocus dest, long src, long size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GdkEventKey dest, long src, long size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GdkEventMotion dest, long src, long size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GdkEventWindowState dest, long src, long size);
public static final native void memmove(long dest, GtkCellRendererClass src);
public static final native void memmove(GtkCellRendererClass dest, long src);
/**
@@ -3053,1095 +1489,321 @@ public static final native void memmove(PangoLayoutRun dest, long src, long size
*/
public static final native void memmove(PangoLogAttr dest, long src, long size);
/** @param attribute cast=(const PangoAttribute *) */
-public static final native long _pango_attribute_copy (long attribute);
-public static final long pango_attribute_copy (long attribute) {
- lock.lock();
- try {
- return _pango_attribute_copy(attribute);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_background_new (short red, short green, short blue);
-public static final long pango_attr_background_new (short red, short green, short blue) {
- lock.lock();
- try {
- return _pango_attr_background_new(red, green, blue);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_attribute_copy(long attribute);
+public static final native long pango_attr_background_new(short red, short green, short blue);
/** @param desc cast=(const PangoFontDescription *) */
-public static final native long _pango_attr_font_desc_new(long desc);
-public static final long pango_attr_font_desc_new(long desc) {
- lock.lock();
- try {
- return _pango_attr_font_desc_new(desc);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_foreground_new (short red, short green, short blue);
-public static final long pango_attr_foreground_new (short red, short green, short blue) {
- lock.lock();
- try {
- return _pango_attr_foreground_new(red, green, blue);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_rise_new(int rise);
-public static final long pango_attr_rise_new(int rise) {
- lock.lock();
- try {
- return _pango_attr_rise_new(rise);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_attr_font_desc_new(long desc);
+public static final native long pango_attr_foreground_new(short red, short green, short blue);
+public static final native long pango_attr_rise_new(int rise);
/**
* @param ink_rect flags=no_out
* @param logical_rect flags=no_out
*/
-public static final native long _pango_attr_shape_new(PangoRectangle ink_rect, PangoRectangle logical_rect);
-public static final long pango_attr_shape_new(PangoRectangle ink_rect, PangoRectangle logical_rect) {
- lock.lock();
- try {
- return _pango_attr_shape_new(ink_rect, logical_rect);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_attr_shape_new(PangoRectangle ink_rect, PangoRectangle logical_rect);
/**
* @param list cast=(PangoAttrList *)
* @param attr cast=(PangoAttribute *)
*/
-public static final native void _pango_attr_list_insert(long list, long attr);
-public static final void pango_attr_list_insert(long list, long attr) {
- lock.lock();
- try {
- _pango_attr_list_insert(list, attr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_attr_list_insert(long list, long attr);
/** @param list cast=(PangoAttrList *) */
-public static final native long _pango_attr_list_get_iterator(long list);
-public static final long pango_attr_list_get_iterator(long list) {
- lock.lock();
- try {
- return _pango_attr_list_get_iterator(list);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_attr_list_get_iterator(long list);
/** @param iterator cast=(PangoAttrIterator *) */
-public static final native boolean _pango_attr_iterator_next(long iterator);
-public static final boolean pango_attr_iterator_next(long iterator) {
- lock.lock();
- try {
- return _pango_attr_iterator_next(iterator);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean pango_attr_iterator_next(long iterator);
/**
* @param iterator cast=(PangoAttrIterator *)
* @param start cast=(gint *)
* @param end cast=(gint *)
*/
-public static final native void _pango_attr_iterator_range(long iterator, int[] start, int[] end);
-public static final void pango_attr_iterator_range(long iterator, int[] start, int[] end) {
- lock.lock();
- try {
- _pango_attr_iterator_range(iterator, start, end);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_attr_iterator_range(long iterator, int[] start, int[] end);
/**
* @param iterator cast=(PangoAttrIterator *)
* @param type cast=(PangoAttrType)
*/
-public static final native long _pango_attr_iterator_get(long iterator, int type);
-public static final long pango_attr_iterator_get(long iterator, int type) {
- lock.lock();
- try {
- return _pango_attr_iterator_get(iterator, type);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_attr_iterator_get(long iterator, int type);
/** @param iterator cast=(PangoAttrIterator *) */
-public static final native void _pango_attr_iterator_destroy(long iterator);
-public static final void pango_attr_iterator_destroy(long iterator) {
- lock.lock();
- try {
- _pango_attr_iterator_destroy(iterator);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_list_new();
-public static final long pango_attr_list_new() {
- lock.lock();
- try {
- return _pango_attr_list_new();
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_attr_iterator_destroy(long iterator);
+public static final native long pango_attr_list_new();
/** @param list cast=(PangoAttrList *) */
-public static final native void _pango_attr_list_unref(long list);
-public static final void pango_attr_list_unref(long list) {
- lock.lock();
- try {
- _pango_attr_list_unref(list);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_strikethrough_color_new(short red, short green, short blue);
-public static final long pango_attr_strikethrough_color_new(short red, short green, short blue) {
- lock.lock();
- try {
- return _pango_attr_strikethrough_color_new(red, green, blue);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_strikethrough_new(boolean strikethrough);
-public static final long pango_attr_strikethrough_new(boolean strikethrough) {
- lock.lock();
- try {
- return _pango_attr_strikethrough_new(strikethrough);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_underline_color_new(short red, short green, short blue);
-public static final long pango_attr_underline_color_new(short red, short green, short blue) {
- lock.lock();
- try {
- return _pango_attr_underline_color_new(red, green, blue);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_underline_new(int underline);
-public static final long pango_attr_underline_new(int underline) {
- lock.lock();
- try {
- return _pango_attr_underline_new(underline);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_attr_weight_new(int weight);
-public static final long pango_attr_weight_new(int weight) {
- lock.lock();
- try {
- return _pango_attr_weight_new(weight);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_attr_list_unref(long list);
+public static final native long pango_attr_strikethrough_color_new(short red, short green, short blue);
+public static final native long pango_attr_strikethrough_new(boolean strikethrough);
+public static final native long pango_attr_underline_color_new(short red, short green, short blue);
+public static final native long pango_attr_underline_new(int underline);
+public static final native long pango_attr_weight_new(int weight);
/**
* @param cairo cast=(cairo_t *)
*/
-public static final native long _pango_cairo_create_layout(long cairo);
-public static final long pango_cairo_create_layout(long cairo) {
- lock.lock();
- try {
- return _pango_cairo_create_layout(cairo);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_cairo_font_map_get_default();
-public static final long pango_cairo_font_map_get_default() {
- lock.lock();
- try {
- return _pango_cairo_font_map_get_default();
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_cairo_create_layout(long cairo);
+public static final native long pango_cairo_font_map_get_default();
/**
* @param context cast=(PangoContext *)
*/
-public static final native long _pango_cairo_context_get_font_options(long context);
-public static final long pango_cairo_context_get_font_options(long context) {
- lock.lock();
- try {
- return _pango_cairo_context_get_font_options(context);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_cairo_context_get_font_options(long context);
/**
* @param context cast=(PangoContext *)
* @param options cast=( cairo_font_options_t *)
*/
-public static final native void _pango_cairo_context_set_font_options(long context, long options);
-public static final void pango_cairo_context_set_font_options(long context, long options) {
- lock.lock();
- try {
- _pango_cairo_context_set_font_options(context, options);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_cairo_context_set_font_options(long context, long options);
/**
* @param cairo cast=(cairo_t *)
* @param layout cast=(PangoLayout *)
*/
-public static final native void _pango_cairo_layout_path(long cairo, long layout);
-public static final void pango_cairo_layout_path(long cairo, long layout) {
- lock.lock();
- try {
- _pango_cairo_layout_path(cairo, layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_cairo_layout_path(long cairo, long layout);
/**
* @param cairo cast=(cairo_t *)
* @param layout cast=(PangoLayout *)
*/
-public static final native void _pango_cairo_show_layout(long cairo, long layout);
-public static final void pango_cairo_show_layout(long cairo, long layout) {
- lock.lock();
- try {
- _pango_cairo_show_layout(cairo, layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_cairo_show_layout(long cairo, long layout);
/** @param context cast=(PangoContext *) */
-public static final native int _pango_context_get_base_dir(long context);
-public static final int pango_context_get_base_dir(long context) {
- lock.lock();
- try {
- return _pango_context_get_base_dir(context);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_context_get_base_dir(long context);
/** @param context cast=(PangoContext *) */
-public static final native long _pango_context_get_language(long context);
-public static final long pango_context_get_language(long context) {
- lock.lock();
- try {
- return _pango_context_get_language(context);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_context_get_language(long context);
/**
* @param context cast=(PangoContext *)
* @param desc cast=(const PangoFontDescription *)
* @param language cast=(PangoLanguage *)
*/
-public static final native long _pango_context_get_metrics(long context, long desc, long language);
-public static final long pango_context_get_metrics(long context, long desc, long language) {
- lock.lock();
- try {
- return _pango_context_get_metrics(context, desc, language);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_context_get_metrics(long context, long desc, long language);
/**
* @param context cast=(PangoContext *)
* @param families cast=(PangoFontFamily ***)
* @param n_families cast=(int *)
*/
-public static final native void _pango_context_list_families(long context, long [] families, int[] n_families);
-public static final void pango_context_list_families(long context, long [] families, int[] n_families) {
- lock.lock();
- try {
- _pango_context_list_families(context, families, n_families);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_context_list_families(long context, long [] families, int[] n_families);
/** @param context cast=(PangoContext *) */
-public static final native void _pango_context_set_base_dir(long context, int direction);
-public static final void pango_context_set_base_dir(long context, int direction) {
- lock.lock();
- try {
- _pango_context_set_base_dir(context, direction);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_context_set_base_dir(long context, int direction);
/**
* @param context cast=(PangoContext *)
* @param language cast=(PangoLanguage *)
*/
-public static final native void _pango_context_set_language(long context, long language);
-public static final void pango_context_set_language(long context, long language) {
- lock.lock();
- try {
- _pango_context_set_language(context, language);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_context_set_language(long context, long language);
+
+
+/* PangoFontDescription */
/** @param desc cast=(PangoFontDescription *) */
-public static final native long _pango_font_description_copy(long desc);
-public static final long pango_font_description_copy(long desc) {
- lock.lock();
- try {
- return _pango_font_description_copy(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_font_description_copy(long desc);
/** @param desc cast=(PangoFontDescription *) */
-public static final native void _pango_font_description_free(long desc);
-public static final void pango_font_description_free(long desc) {
- lock.lock();
- try {
- _pango_font_description_free(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_description_free(long desc);
/** @param str cast=(const char *),flags=no_out critical */
-public static final native long _pango_font_description_from_string(byte[] str);
-public static final long pango_font_description_from_string(byte[] str) {
- lock.lock();
- try {
- return _pango_font_description_from_string(str);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_font_description_from_string(byte[] str);
/** @param desc cast=(PangoFontDescription *) */
-public static final native long _pango_font_description_get_family(long desc);
-public static final long pango_font_description_get_family(long desc) {
- lock.lock();
- try {
- return _pango_font_description_get_family(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_font_description_get_family(long desc);
/** @param desc cast=(PangoFontDescription *) */
-public static final native int _pango_font_description_get_size(long desc);
-public static final int pango_font_description_get_size(long desc) {
- lock.lock();
- try {
- return _pango_font_description_get_size(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_font_description_get_size(long desc);
/** @param desc cast=(PangoFontDescription *) */
-public static final native int _pango_font_description_get_stretch(long desc);
-public static final int pango_font_description_get_stretch(long desc) {
- lock.lock();
- try {
- return _pango_font_description_get_stretch(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_font_description_get_stretch(long desc);
/** @param desc cast=(PangoFontDescription *) */
-public static final native int _pango_font_description_get_variant(long desc);
-public static final int pango_font_description_get_variant(long desc) {
- lock.lock();
- try {
- return _pango_font_description_get_variant(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_font_description_get_variant(long desc);
/** @param desc cast=(PangoFontDescription *) */
-public static final native int _pango_font_description_get_style(long desc);
-public static final int pango_font_description_get_style(long desc) {
- lock.lock();
- try {
- return _pango_font_description_get_style(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_font_description_get_style(long desc);
/** @param desc cast=(PangoFontDescription *) */
-public static final native int _pango_font_description_get_weight(long desc);
-public static final int pango_font_description_get_weight(long desc) {
- lock.lock();
- try {
- return _pango_font_description_get_weight(desc);
- } finally {
- lock.unlock();
- }
-}
-public static final native long _pango_font_description_new();
-public static final long pango_font_description_new() {
- lock.lock();
- try {
- return _pango_font_description_new();
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_font_description_get_weight(long desc);
+public static final native long pango_font_description_new();
/**
* @param desc cast=(PangoFontDescription *)
* @param family cast=(const char *),flags=no_out critical
*/
-public static final native void _pango_font_description_set_family(long desc, byte[] family);
-public static final void pango_font_description_set_family(long desc, byte[] family) {
- lock.lock();
- try {
- _pango_font_description_set_family(desc, family);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_description_set_family(long desc, byte[] family);
/**
* @param desc cast=(PangoFontDescription *)
* @param size cast=(gint)
*/
-public static final native void _pango_font_description_set_size(long desc, int size);
-public static final void pango_font_description_set_size(long desc, int size) {
- lock.lock();
- try {
- _pango_font_description_set_size(desc, size);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_description_set_size(long desc, int size);
/**
* @param desc cast=(PangoFontDescription *)
* @param stretch cast=(PangoStretch)
*/
-public static final native void _pango_font_description_set_stretch(long desc, int stretch);
-public static final void pango_font_description_set_stretch(long desc, int stretch) {
- lock.lock();
- try {
- _pango_font_description_set_stretch(desc, stretch);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_description_set_stretch(long desc, int stretch);
/**
* @param desc cast=(PangoFontDescription *)
* @param weight cast=(PangoStyle)
*/
-public static final native void _pango_font_description_set_style(long desc, int weight);
-public static final void pango_font_description_set_style(long desc, int weight) {
- lock.lock();
- try {
- _pango_font_description_set_style(desc, weight);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_description_set_style(long desc, int weight);
/**
* @param desc cast=(PangoFontDescription *)
* @param weight cast=(PangoWeight)
*/
-public static final native void _pango_font_description_set_weight(long desc, int weight);
-public static final void pango_font_description_set_weight(long desc, int weight) {
- lock.lock();
- try {
- _pango_font_description_set_weight(desc, weight);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_description_set_weight(long desc, int weight);
/**
* @param desc cast=(PangoFontDescription *)
* @param variant cast=(PangoVariant)
*/
-public static final native void _pango_font_description_set_variant(long desc, int variant);
-public static final void pango_font_description_set_variant(long desc, int variant) {
- lock.lock();
- try {
- _pango_font_description_set_variant(desc, variant);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_description_set_variant(long desc, int variant);
/** @param desc cast=(PangoFontDescription *) */
-public static final native long _pango_font_description_to_string(long desc);
-public static final long pango_font_description_to_string(long desc) {
- lock.lock();
- try {
- return _pango_font_description_to_string(desc);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_font_description_to_string(long desc);
+/** @param desc cast=(PangoFontDescription *) */
+public static final native int pango_font_description_get_set_fields(long desc);
+
+
+/* PangoFontFace */
/** @param face cast=(PangoFontFace *) */
-public static final native long _pango_font_face_describe(long face);
-public static final long pango_font_face_describe(long face) {
- lock.lock();
- try {
- return _pango_font_face_describe(face);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_font_face_describe(long face);
+
+
+/* PangoFontFamily */
/** @param family cast=(PangoFontFamily *) */
-public static final native long _pango_font_family_get_name(long family);
-public static final long pango_font_family_get_name(long family) {
- lock.lock();
- try {
- return _pango_font_family_get_name(family);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_font_family_get_name(long family);
/**
* @param family cast=(PangoFontFamily *)
* @param faces cast=(PangoFontFace ***)
* @param n_faces cast=(int *)
*/
-public static final native void _pango_font_family_list_faces(long family, long [] faces, int[] n_faces);
-public static final void pango_font_family_list_faces(long family, long [] faces, int[] n_faces) {
- lock.lock();
- try {
- _pango_font_family_list_faces(family, faces, n_faces);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param font cast=(PangoFont *)
- * @param language cast=(PangoLanguage *)
- */
-public static final native long _pango_font_get_metrics(long font, long language);
-public static final long pango_font_get_metrics(long font, long language) {
- lock.lock();
- try {
- return _pango_font_get_metrics(font, language);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param fontMap cast=(PangoFontMap *)
- */
-public static final native long _pango_font_map_create_context(long fontMap);
-public static final long pango_font_map_create_context(long fontMap) {
- lock.lock();
- try {
- return _pango_font_map_create_context(fontMap);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_family_list_faces(long family, long [] faces, int[] n_faces);
+
+
+/* PangoFontMap */
+/** @param fontMap cast=(PangoFontMap *) */
+public static final native long pango_font_map_create_context(long fontMap);
/** @param metrics cast=(PangoFontMetrics *) */
-public static final native int _pango_font_metrics_get_approximate_char_width(long metrics);
-public static final int pango_font_metrics_get_approximate_char_width(long metrics) {
- lock.lock();
- try {
- return _pango_font_metrics_get_approximate_char_width(metrics);
- } finally {
- lock.unlock();
- }
-}
+
+
+/* PangoFontMetrics */
+public static final native int pango_font_metrics_get_approximate_char_width(long metrics);
/** @param metrics cast=(PangoFontMetrics *) */
-public static final native int _pango_font_metrics_get_ascent(long metrics);
-public static final int pango_font_metrics_get_ascent(long metrics) {
- lock.lock();
- try {
- return _pango_font_metrics_get_ascent(metrics);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_font_metrics_get_ascent(long metrics);
/** @param metrics cast=(PangoFontMetrics *) */
-public static final native int _pango_font_metrics_get_descent(long metrics);
-public static final int pango_font_metrics_get_descent(long metrics) {
- lock.lock();
- try {
- return _pango_font_metrics_get_descent(metrics);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_font_metrics_get_descent(long metrics);
/** @param metrics cast=(PangoFontMetrics *) */
-public static final native void _pango_font_metrics_unref(long metrics);
-public static final void pango_font_metrics_unref(long metrics) {
- lock.lock();
- try {
- _pango_font_metrics_unref(metrics);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_font_metrics_unref(long metrics);
+
+/* PangoLayout */
/** @param layout cast=(PangoLayout *) */
-public static final native void _pango_layout_context_changed(long layout);
-public static final void pango_layout_context_changed(long layout) {
- lock.lock();
- try {
- _pango_layout_context_changed(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_context_changed(long layout);
/** @param layout cast=(PangoLayout*) */
-public static final native int _pango_layout_get_alignment(long layout);
-public static final int pango_layout_get_alignment(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_alignment(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_layout_get_alignment(long layout);
/** @param layout cast=(PangoLayout *) */
-public static final native long _pango_layout_get_context(long layout);
-public static final long pango_layout_get_context(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_context(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_layout_get_context(long layout);
/** @param layout cast=(PangoLayout*) */
-public static final native int _pango_layout_get_indent(long layout);
-public static final int pango_layout_get_indent(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_indent(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_layout_get_indent(long layout);
/** @param layout cast=(PangoLayout*) */
-public static final native long _pango_layout_get_iter(long layout);
-public static final long pango_layout_get_iter(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_iter(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_layout_get_iter(long layout);
/** @param layout cast=(PangoLayout*) */
-public static final native boolean _pango_layout_get_justify(long layout);
-public static final boolean pango_layout_get_justify(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_justify(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean pango_layout_get_justify(long layout);
/** @param layout cast=(PangoLayout *) */
-public static final native long _pango_layout_get_line(long layout, int line);
-public static final long pango_layout_get_line(long layout, int line) {
- lock.lock();
- try {
- return _pango_layout_get_line(layout, line);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_layout_get_line(long layout, int line);
/** @param layout cast=(PangoLayout*) */
-public static final native int _pango_layout_get_line_count(long layout);
-public static final int pango_layout_get_line_count(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_line_count(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_layout_get_line_count(long layout);
/**
* @param layout cast=(PangoLayout*)
* @param attrs cast=(PangoLogAttr **)
* @param n_attrs cast=(int *)
*/
-public static final native void _pango_layout_get_log_attrs(long layout, long [] attrs, int[] n_attrs);
-public static final void pango_layout_get_log_attrs(long layout, long [] attrs, int[] n_attrs) {
- lock.lock();
- try {
- _pango_layout_get_log_attrs(layout, attrs, n_attrs);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_get_log_attrs(long layout, long [] attrs, int[] n_attrs);
/**
* @param layout cast=(PangoLayout *)
* @param width cast=(int *)
* @param height cast=(int *)
*/
-public static final native void _pango_layout_get_size(long layout, int[] width, int[] height);
-public static final void pango_layout_get_size(long layout, int[] width, int[] height) {
- lock.lock();
- try {
- _pango_layout_get_size(layout, width, height);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_get_size(long layout, int[] width, int[] height);
/**
* @param layout cast=(PangoLayout *)
* @param width cast=(int *)
* @param height cast=(int *)
*/
-public static final native void _pango_layout_get_pixel_size(long layout, int[] width, int[] height);
-public static final void pango_layout_get_pixel_size(long layout, int[] width, int[] height) {
- lock.lock();
- try {
- _pango_layout_get_pixel_size(layout, width, height);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_get_pixel_size(long layout, int[] width, int[] height);
/** @param layout cast=(PangoLayout*) */
-public static final native int _pango_layout_get_spacing(long layout);
-public static final int pango_layout_get_spacing(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_spacing(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_layout_get_spacing(long layout);
/** @param layout cast=(PangoLayout *) */
-public static final native long _pango_layout_get_text(long layout);
-public static final long pango_layout_get_text(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_text(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_layout_get_text(long layout);
/** @param layout cast=(PangoLayout *) */
-public static final native int _pango_layout_get_width(long layout);
-public static final int pango_layout_get_width(long layout) {
- lock.lock();
- try {
- return _pango_layout_get_width(layout);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_layout_get_width(long layout);
/**
* @param layout cast=(PangoLayout*)
* @param pos flags=no_in
*/
-public static final native void _pango_layout_index_to_pos(long layout, int index, PangoRectangle pos);
-public static final void pango_layout_index_to_pos(long layout, int index, PangoRectangle pos) {
- lock.lock();
- try {
- _pango_layout_index_to_pos(layout, index, pos);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_index_to_pos(long layout, int index, PangoRectangle pos);
/** @param iter cast=(PangoLayoutIter*) */
-public static final native void _pango_layout_iter_free(long iter);
-public static final void pango_layout_iter_free(long iter) {
- lock.lock();
- try {
- _pango_layout_iter_free(iter);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_iter_free(long iter);
/**
* @param iter cast=(PangoLayoutIter*)
* @param ink_rect flags=no_in
* @param logical_rect flags=no_in
*/
-public static final native void _pango_layout_iter_get_line_extents(long iter, PangoRectangle ink_rect, PangoRectangle logical_rect);
-public static final void pango_layout_iter_get_line_extents(long iter, PangoRectangle ink_rect, PangoRectangle logical_rect) {
- lock.lock();
- try {
- _pango_layout_iter_get_line_extents(iter, ink_rect, logical_rect);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_iter_get_line_extents(long iter, PangoRectangle ink_rect, PangoRectangle logical_rect);
/** @param iter cast=(PangoLayoutIter*) */
-public static final native int _pango_layout_iter_get_index(long iter);
-public static final int pango_layout_iter_get_index(long iter) {
- lock.lock();
- try {
- return _pango_layout_iter_get_index(iter);
- } finally {
- lock.unlock();
- }
-}
+public static final native int pango_layout_iter_get_index(long iter);
/** @param iter cast=(PangoLayoutIter*) */
-public static final native long _pango_layout_iter_get_run(long iter);
-public static final long pango_layout_iter_get_run(long iter) {
- lock.lock();
- try {
- return _pango_layout_iter_get_run(iter);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_layout_iter_get_run(long iter);
/** @param iter cast=(PangoLayoutIter*) */
-public static final native boolean _pango_layout_iter_next_line(long iter);
-public static final boolean pango_layout_iter_next_line(long iter) {
- lock.lock();
- try {
- return _pango_layout_iter_next_line(iter);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean pango_layout_iter_next_line(long iter);
/** @param iter cast=(PangoLayoutIter*) */
-public static final native boolean _pango_layout_iter_next_run(long iter);
-public static final boolean pango_layout_iter_next_run(long iter) {
- lock.lock();
- try {
- return _pango_layout_iter_next_run(iter);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean pango_layout_iter_next_run(long iter);
/**
* @param line cast=(PangoLayoutLine*)
* @param ink_rect cast=(PangoRectangle *),flags=no_in
* @param logical_rect cast=(PangoRectangle *),flags=no_in
*/
-public static final native void _pango_layout_line_get_extents(long line, PangoRectangle ink_rect, PangoRectangle logical_rect);
-public static final void pango_layout_line_get_extents(long line, PangoRectangle ink_rect, PangoRectangle logical_rect) {
- lock.lock();
- try {
- _pango_layout_line_get_extents(line, ink_rect, logical_rect);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_line_get_extents(long line, PangoRectangle ink_rect, PangoRectangle logical_rect);
/** @param context cast=(PangoContext *) */
-public static final native long _pango_layout_new(long context);
-public static final long pango_layout_new(long context) {
- lock.lock();
- try {
- return _pango_layout_new(context);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_layout_new(long context);
/** @param layout cast=(PangoLayout *) */
-public static final native void _pango_layout_set_alignment (long layout, int alignment);
-public static final void pango_layout_set_alignment (long layout, int alignment) {
- lock.lock();
- try {
- _pango_layout_set_alignment(layout, alignment);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_alignment(long layout, int alignment);
/**
* @param layout cast=(PangoLayout *)
* @param attrs cast=(PangoAttrList *)
*/
-public static final native void _pango_layout_set_attributes(long layout, long attrs);
-public static final void pango_layout_set_attributes(long layout, long attrs) {
- lock.lock();
- try {
- _pango_layout_set_attributes(layout, attrs);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_attributes(long layout, long attrs);
/**
* @param layout cast=(PangoLayout *)
*/
-public static final native void _pango_layout_set_auto_dir(long layout, boolean auto_dir);
-public static final void pango_layout_set_auto_dir(long layout, boolean auto_dir) {
- lock.lock();
- try {
- _pango_layout_set_auto_dir(layout, auto_dir);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_auto_dir(long layout, boolean auto_dir);
/**
* @param context cast=(PangoLayout *)
* @param descr cast=(PangoFontDescription *)
*/
-public static final native void _pango_layout_set_font_description(long context, long descr);
-public static final void pango_layout_set_font_description(long context, long descr) {
- lock.lock();
- try {
- _pango_layout_set_font_description(context, descr);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_font_description(long context, long descr);
/** @param layout cast=(PangoLayout*) */
-public static final native void _pango_layout_set_indent(long layout, int indent);
-public static final void pango_layout_set_indent(long layout, int indent) {
- lock.lock();
- try {
- _pango_layout_set_indent(layout, indent);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_indent(long layout, int indent);
/** @param layout cast=(PangoLayout*) */
-public static final native void _pango_layout_set_justify(long layout, boolean justify);
-public static final void pango_layout_set_justify(long layout, boolean justify) {
- lock.lock();
- try {
- _pango_layout_set_justify(layout, justify);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_justify(long layout, boolean justify);
/**
* @param context cast=(PangoLayout *)
* @param setting cast=(gboolean)
*/
-public static final native void _pango_layout_set_single_paragraph_mode(long context, boolean setting);
-public static final void pango_layout_set_single_paragraph_mode(long context, boolean setting) {
- lock.lock();
- try {
- _pango_layout_set_single_paragraph_mode(context, setting);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_single_paragraph_mode(long context, boolean setting);
/** @param layout cast=(PangoLayout *) */
-public static final native void _pango_layout_set_spacing(long layout, int spacing);
-public static final void pango_layout_set_spacing(long layout, int spacing) {
- lock.lock();
- try {
- _pango_layout_set_spacing(layout, spacing);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_spacing(long layout, int spacing);
/**
* @param layout cast=(PangoLayout *)
* @param tabs cast=(PangoTabArray *)
*/
-public static final native void _pango_layout_set_tabs(long layout, long tabs);
-public static final void pango_layout_set_tabs(long layout, long tabs) {
- lock.lock();
- try {
- _pango_layout_set_tabs(layout, tabs);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_tabs(long layout, long tabs);
/**
* @param layout cast=(PangoLayout *)
* @param text cast=(const char *),flags=no_out critical
* @param length cast=(int)
*/
-public static final native void _pango_layout_set_text(long layout, byte[] text, int length);
-public static final void pango_layout_set_text(long layout, byte[] text, int length) {
- lock.lock();
- try {
- _pango_layout_set_text(layout, text, length);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_text(long layout, byte[] text, int length);
/** @param layout cast=(PangoLayout *) */
-public static final native void _pango_layout_set_width(long layout, int width);
-public static final void pango_layout_set_width(long layout, int width) {
- lock.lock();
- try {
- _pango_layout_set_width(layout, width);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_width(long layout, int width);
/** @param layout cast=(PangoLayout *) */
-public static final native void _pango_layout_set_wrap (long layout, int wrap);
-public static final void pango_layout_set_wrap (long layout, int wrap) {
- lock.lock();
- try {
- _pango_layout_set_wrap(layout, wrap);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_layout_set_wrap(long layout, int wrap);
/**
* @param layout cast=(PangoLayout *)
* @param index cast=(int *)
* @param trailing cast=(int *)
*/
-public static final native boolean _pango_layout_xy_to_index(long layout, int x, int y, int[] index, int[] trailing);
-public static final boolean pango_layout_xy_to_index(long layout, int x, int y, int[] index, int[] trailing) {
- lock.lock();
- try {
- return _pango_layout_xy_to_index(layout, x, y, index, trailing);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean pango_layout_xy_to_index(long layout, int x, int y, int[] index, int[] trailing);
+
+
/** @param tab_array cast=(PangoTabArray *) */
-public static final native void _pango_tab_array_free(long tab_array);
-public static final void pango_tab_array_free(long tab_array) {
- lock.lock();
- try {
- _pango_tab_array_free(tab_array);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_tab_array_free(long tab_array);
/**
* @param initial_size cast=(gint)
* @param positions_in_pixels cast=(gboolean)
*/
-public static final native long _pango_tab_array_new(int initial_size, boolean positions_in_pixels);
-public static final long pango_tab_array_new(int initial_size, boolean positions_in_pixels) {
- lock.lock();
- try {
- return _pango_tab_array_new(initial_size, positions_in_pixels);
- } finally {
- lock.unlock();
- }
-}
+public static final native long pango_tab_array_new(int initial_size, boolean positions_in_pixels);
/**
* @param tab_array cast=(PangoTabArray *)
* @param tab_index cast=(gint)
* @param alignment cast=(PangoTabAlign)
* @param location cast=(gint)
*/
-public static final native void _pango_tab_array_set_tab(long tab_array, int tab_index, long alignment, int location);
-public static final void pango_tab_array_set_tab(long tab_array, int tab_index, long alignment, int location) {
- lock.lock();
- try {
- _pango_tab_array_set_tab(tab_array, tab_index, alignment, location);
- } finally {
- lock.unlock();
- }
-}
+public static final native void pango_tab_array_set_tab(long tab_array, int tab_index, long alignment, int location);
/**
* @method flags=dynamic
*/
-public static final native long _ubuntu_menu_proxy_get();
-public static final long ubuntu_menu_proxy_get() {
- lock.lock();
- try {
- return _ubuntu_menu_proxy_get();
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param path cast=(const char*)
- */
-public static final native int _access (byte [] path, int amode);
-public static final int access (byte [] path, int amode) {
- lock.lock();
- try {
- return _access(path, amode);
- } finally {
- lock.unlock();
- }
-}
+public static final native long ubuntu_menu_proxy_get();
/**
* @param s1 cast=(const char*)
* @param s2 cast=(const char*)
@@ -4201,6 +1863,33 @@ public static final byte [] getThemeNameBytes() {
}
/**
+ * Experimental API for dark theme.
+ * <p>
+ * On Windows, there is no OS API for dark theme yet, and this method only
+ * configures various tweaks. Some of these tweaks have drawbacks. The tweaks
+ * are configured with defaults that fit Eclipse. Non-Eclipse applications are
+ * expected to configure individual tweaks instead of calling this method.
+ * Please see <code>Display#setData()</code> and documentation for string keys
+ * used there.
+ * </p>
+ * <p>
+ * On GTK, behavior may be different as the boolean flag doesn't force dark
+ * theme instead it specify that dark theme is preferred.
+ * </p>
+ *
+ * @param isDarkTheme <code>true</code> for dark theme
+ */
+public static final void setTheme(boolean isDarkTheme) {
+ setDarkThemePreferred (isDarkTheme);
+}
+
+/**
+ * @param tmpl cast=(const gchar *)
+ * @param error cast=(GError **)
+ */
+public static final native long g_dir_make_tmp(long tmpl, long [] error);
+
+/**
* @param info cast=(GDBusInterfaceInfo *)
* @param name cast=(const gchar *)
* @param object_path cast=(const gchar *)
@@ -4209,17 +1898,8 @@ public static final byte [] getThemeNameBytes() {
* @param error cast=(GError **)
* @category gdbus
*/
-public static final native long _g_dbus_proxy_new_for_bus_sync (int bus_type, int flags, long info, byte [] name, byte [] object_path, byte [] interface_name,
+public static final native long g_dbus_proxy_new_for_bus_sync(int bus_type, int flags, long info, byte [] name, byte [] object_path, byte [] interface_name,
long cancellable, long [] error);
-public static final long g_dbus_proxy_new_for_bus_sync (int bus_type, int flags, long info, byte [] name, byte [] object_path, byte [] interface_name,
- long cancellable, long [] error) {
- lock.lock();
- try {
- return _g_dbus_proxy_new_for_bus_sync (bus_type, flags, info, name, object_path, interface_name, cancellable, error);
- } finally {
- lock.unlock();
- }
-}
/**
* @param proxy cast=(GDBusProxy *)
@@ -4229,15 +1909,7 @@ public static final long g_dbus_proxy_new_for_bus_sync (int bus_type, int flags,
* @param error cast=(GError **)
* @category gdbus
*/
-public static final native long _g_dbus_proxy_call_sync (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long [] error);
-public static final long g_dbus_proxy_call_sync (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long [] error) {
- lock.lock();
- try {
- return _g_dbus_proxy_call_sync (proxy, method_name, parameters, flags, timeout_msec, cancellable, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_dbus_proxy_call_sync (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long [] error);
/**
* @param proxy cast=(GDBusProxy *)
@@ -4248,61 +1920,20 @@ public static final long g_dbus_proxy_call_sync (long proxy, byte[] method_name,
* @param error cast=(GError **)
* @category gdbus
*/
-public static final native void _g_dbus_proxy_call (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long callback, long [] error);
-public static final void g_dbus_proxy_call (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long callback, long [] error) {
- lock.lock();
- try {
- _g_dbus_proxy_call (proxy, method_name, parameters, flags, timeout_msec, cancellable, callback, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_dbus_proxy_call (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long callback, long [] error);
/**
* @param proxy cast=(GDBusProxy *)
* @category gdbus
*/
-public static final native long _g_dbus_proxy_get_name_owner (long proxy);
-public static final long g_dbus_proxy_get_name_owner (long proxy) {
- lock.lock();
- try {
- return _g_dbus_proxy_get_name_owner (proxy);
- } finally {
- lock.unlock();
- }
-}
-
-/**
- * @param proxy cast=(GDBusProxy *)
- * @param res cast=(GAsyncResult *)
- * @param error cast=(GError **)
- * @category gdbus
- */
-public static final native long _g_dbus_proxy_call_finish (long proxy, long res, long [] error);
-public static final long g_dbus_proxy_call_finish (long proxy, long res, long [] error) {
- lock.lock();
- try {
- return _g_dbus_proxy_call_finish (proxy, res, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_dbus_proxy_get_name_owner(long proxy);
/**
* @param xml_data cast=(const gchar *)
* @param error cast=(GError **)
* @category gdbus
*/
-public static final native long _g_dbus_node_info_new_for_xml (byte[] xml_data, long [] error);
-/** @category gdbus */
-public static final long g_dbus_node_info_new_for_xml (byte[] xml_data, long [] error) {
- lock.lock();
- try {
- return _g_dbus_node_info_new_for_xml (xml_data, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_dbus_node_info_new_for_xml(byte[] xml_data, long [] error);
/**
* @param bus_type cast=(GBusType)
@@ -4315,16 +1946,7 @@ public static final long g_dbus_node_info_new_for_xml (byte[] xml_data, long []
* @param user_data_free_func cast=(GDestroyNotify)
* @category gdbus
*/
-public static final native int _g_bus_own_name (int bus_type, byte[] name, int flags, long bus_acquired_handler, long name_acquired_handler, long name_lost_handler, long user_data, long user_data_free_func);
-/** @category gdbus */
-public static final int g_bus_own_name (int bus_type, byte[] name, int flags, long bus_acquired_handler, long name_acquired_handler, long name_lost_handler, long user_data, long user_data_free_func) {
- lock.lock();
- try {
- return _g_bus_own_name(bus_type, name, flags, bus_acquired_handler, name_acquired_handler, name_lost_handler, user_data, user_data_free_func);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_bus_own_name(int bus_type, byte[] name, int flags, long bus_acquired_handler, long name_acquired_handler, long name_lost_handler, long user_data, long user_data_free_func);
/**
* @param connection cast=(GDBusConnection *)
@@ -4336,155 +1958,65 @@ public static final int g_bus_own_name (int bus_type, byte[] name, int flags, lo
* @param error cast=(GError **)
* @category gdbus
*/
-public static final native int _g_dbus_connection_register_object (long connection, byte[] object_path, long interface_info, long [] vtable, long user_data, long user_data_free_func, long [] error);
-/** @category gdbus */
-public static final int g_dbus_connection_register_object (long connection, byte[] object_path, long interface_info, long [] vtable, long user_data, long user_data_free_func, long [] error) {
- lock.lock();
- try {
- return _g_dbus_connection_register_object( connection, object_path, interface_info, vtable, user_data, user_data_free_func, error);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_dbus_connection_register_object(long connection, byte[] object_path, long interface_info, long [] vtable, long user_data, long user_data_free_func, long [] error);
/**
* @param info cast=(GDBusNodeInfo *)
* @param name cast=(const gchar *)
* @category gdbus
*/
-public static final native long _g_dbus_node_info_lookup_interface (long info, byte [] name);
-/** @category gdbus */
-public static final long g_dbus_node_info_lookup_interface (long info, byte [] name) {
- lock.lock();
- try {
- return _g_dbus_node_info_lookup_interface(info, name);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_dbus_node_info_lookup_interface(long info, byte [] name);
/**
* @param invocation cast=(GDBusMethodInvocation *)
* @param parameters cast=(GVariant *)
* @category gdbus
*/
-public static final native void _g_dbus_method_invocation_return_value (long invocation, long parameters);
-/** @category gdbus */
-public static final void g_dbus_method_invocation_return_value (long invocation, long parameters) {
- lock.lock();
- try {
- _g_dbus_method_invocation_return_value (invocation, parameters);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_dbus_method_invocation_return_value(long invocation, long parameters);
/**
* @param type cast=(const GVariantType *)
* @category gdbus
*/
-public static final native long _g_variant_builder_new (long type);
-/** @category gdbus */
-public static final long g_variant_builder_new (long type) {
- lock.lock();
- try {
- return _g_variant_builder_new(type);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_builder_new(long type);
/**
* @param builder cast=(GVariantBuilder *)
* @param value cast=(GVariant *)
* @category gdbus
*/
-public static final native void _g_variant_builder_add_value (long builder, long value);
-/** @category gdbus */
-public static final void g_variant_builder_add_value (long builder, long value) {
- lock.lock();
- try {
- _g_variant_builder_add_value(builder, value);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_variant_builder_add_value(long builder, long value);
/**
* @param type cast=(GVariantType *)
* @category gdbus
*/
-public static final native void _g_variant_type_free (long type);
-/** @category gdbus */
-public static final void g_variant_type_free (long type) {
- lock.lock();
- try {
- _g_variant_type_free(type);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_variant_type_free(long type);
/**
* @param type cast=(const gchar *)
* @category gdbus
*/
-public static final native long _g_variant_type_new (byte [] type);
-/** @category gdbus */
-public static final long g_variant_type_new (byte [] type) {
- lock.lock();
- try {
- return _g_variant_type_new(type);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_type_new(byte [] type);
/**
* @param builder cast=(GVariantBuilder *)
* @category gdbus
*/
-public static final native long _g_variant_builder_end (long builder);
-/** @category gdbus */
-public static final long g_variant_builder_end (long builder) {
- lock.lock();
- try {
- return _g_variant_builder_end(builder);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_builder_end(long builder);
/**
* @param builder cast=(GVariantBuilder *)
* @category gdbus
*/
-public static final native void _g_variant_builder_unref (long builder);
-/** @category gdbus */
-public static final void g_variant_builder_unref (long builder) {
- lock.lock();
- try {
- _g_variant_builder_unref(builder);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_variant_builder_unref(long builder);
/**
* @param format_string cast=(const gchar *),flags=no_out
* @param arg0 cast=(const gchar *),flags=no_out
* @category gdbus
*/
-public static final native long _g_variant_new (byte[] format_string, byte[] arg0);
-/** @category gdbus */
-public static final long g_variant_new (byte[] format_string, byte[] arg0) {
- lock.lock();
- try {
- return _g_variant_new(format_string, arg0);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new (byte[] format_string, byte[] arg0);
/**
* @param format_string cast=(const gchar *),flags=no_out
@@ -4492,16 +2024,7 @@ public static final long g_variant_new (byte[] format_string, byte[] arg0) {
* @param arg1 cast=(const gchar *),flags=no_out
* @category gdbus
*/
-public static final native long _g_variant_new (byte[] format_string, boolean arg0, byte[] arg1);
-/** @category gdbus */
-public static final long g_variant_new (byte[] format_string, boolean arg0, byte[] arg1) {
- lock.lock();
- try {
- return _g_variant_new(format_string, arg0, arg1);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new (byte[] format_string, boolean arg0, byte[] arg1);
/**
* @param format_string cast=(const gchar *),flags=no_out
@@ -4509,31 +2032,13 @@ public static final long g_variant_new (byte[] format_string, boolean arg0, byte
* @param arg1 cast=(const gchar *),flags=no_out
* @category gdbus
*/
-public static final native long _g_variant_new (byte[] format_string, byte[] arg0, byte[] arg1);
-/** @category gdbus */
-public static final long g_variant_new (byte[] format_string, byte[] arg0, byte[] arg1) {
- lock.lock();
- try {
- return _g_variant_new(format_string, arg0, arg1);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new (byte[] format_string, byte[] arg0, byte[] arg1);
/**
* @param intval cast=(gint32)
* @category gdbus
*/
-public static final native long _g_variant_new_int32 (int intval);
-/** @category gdbus */
-public static final long g_variant_new_int32 (int intval) {
- lock.lock();
- try {
- return _g_variant_new_int32(intval);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new_int32(int intval);
/**
@@ -4541,284 +2046,246 @@ public static final long g_variant_new_int32 (int intval) {
* @category gdbus
* @return int
*/
-public static final native int _g_variant_get_int32 (long gvariant);
-/** @category gdbus */
-public static final int g_variant_get_int32 (long gvariant) {
- lock.lock();
- try {
- return _g_variant_get_int32 (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native int g_variant_get_int32(long gvariant);
/**
* @param gvariant cast=(GVariant *)
* @category gdbus
* @return guchar
*/
-public static final native byte _g_variant_get_byte (long gvariant);
-/** @category gdbus */
-public static final byte g_variant_get_byte (long gvariant) {
- lock.lock();
- try {
- return _g_variant_get_byte (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native byte g_variant_get_byte(long gvariant);
/**
* @param gvariant cast=(GVariant *)
* @category gdbus
*/
-public static final native boolean _g_variant_get_boolean (long gvariant);
-/** @category gdbus */
-public static final boolean g_variant_get_boolean (long gvariant) {
- lock.lock();
- try {
- return _g_variant_get_boolean (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_variant_get_boolean(long gvariant);
/**
* @param gvariant cast=(GVariant *)
* @param index cast=(gsize)
* @category gdbus
*/
-public static final native long _g_variant_get_child_value (long gvariant, int index);
-/** @category gdbus */
-public static final long g_variant_get_child_value (long gvariant, int index) {
- lock.lock();
- try {
- return _g_variant_get_child_value (gvariant, index);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_get_child_value(long gvariant, int index);
/**
* @param gvariant cast=(GVariant *)
* @category gdbus
*/
-public static final native double _g_variant_get_double (long gvariant);
-/** @category gdbus */
-public static final double g_variant_get_double (long gvariant) {
- lock.lock();
- try {
- return _g_variant_get_double (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native double g_variant_get_double(long gvariant);
-public static final native long _g_variant_new_uint64 (long value);
-public static final long g_variant_new_uint64 (long value) {
- lock.lock();
- try {
- return _g_variant_new_uint64 (value);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new_uint64(long value);
/**
* @param gvariant cast=(GVariant *)
* @category gdbus
*/
-public static final native long _g_variant_get_uint64 (long gvariant);
-/** @category gdbus */
-public static final long g_variant_get_uint64 (long gvariant) {
- lock.lock();
- try {
- return _g_variant_get_uint64 (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_get_uint64(long gvariant);
/**
* @param gvariant cast=(GVariant *)
* @param length cast=(gsize *)
* @category gdbus
*/
-public static final native long _g_variant_get_string (long gvariant, long[] length);
-/** @category gdbus */
-public static final long g_variant_get_string (long gvariant, long[] length) {
- lock.lock();
- try {
- return _g_variant_get_string (gvariant, length);
- } finally {
- lock.unlock();
- }
-}
-
-/**
- * @param gvariant cast=(GVariant *)
- * @return const GVariantType *
- * @category gdbus
- */
-public static final native long _g_variant_get_type (long gvariant);
-/** @category gdbus */
-public static final long g_variant_get_type (long gvariant) {
- lock.lock();
- try {
- return _g_variant_get_type (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_get_string(long gvariant, long[] length);
/**
* @param gvariant cast=(GVariant *)
* @category gdbus
*/
-public static final native long _g_variant_get_type_string (long gvariant);
-/** @category gdbus */
-public static final long g_variant_get_type_string (long gvariant) {
- lock.lock();
- try {
- return _g_variant_get_type_string (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_get_type_string(long gvariant);
/**
* @param gvariant cast=(GVariant *)
* @param type cast=(const GVariantType *)
* @category gdbus
*/
-public static final native boolean _g_variant_is_of_type (long gvariant, byte[] type);
-/** @category gdbus */
-public static final boolean g_variant_is_of_type (long gvariant, byte[] type) {
- lock.lock();
- try {
- return _g_variant_is_of_type (gvariant, type);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean g_variant_is_of_type(long gvariant, byte[] type);
/**
* @param gvariant cast=(GVariant *)
* @category gdbus
*/
-public static final native long _g_variant_n_children (long gvariant);
-/** @category gdbus */
-public static final long g_variant_n_children (long gvariant) {
- lock.lock();
- try {
- return _g_variant_n_children (gvariant);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_n_children(long gvariant);
/**
* @param value cast=(gboolean)
* @category gdbus
*/
-public static final native long _g_variant_new_boolean (boolean value);
-/** @category gdbus */
-public static final long g_variant_new_boolean (boolean value) {
- lock.lock();
- try {
- return _g_variant_new_boolean (value);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new_boolean(boolean value);
/**
* @param value cast=(gboolean)
* @category gdbus
*/
-public static final native long _g_variant_new_double (double value);
-/** @category gdbus */
-public static final long g_variant_new_double (double value) {
- lock.lock();
- try {
- return _g_variant_new_double (value);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new_double(double value);
/**
* @param value cast=(guchar)
* @category gdbus
*/
-public static final native long _g_variant_new_byte (byte value);
-/** @category gdbus */
-public static final long g_variant_new_byte (byte value) {
- lock.lock();
- try {
- return _g_variant_new_byte (value);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new_byte(byte value);
/**
* @param items cast=(GVariant * const *)
* @param length cast=(gsize)
* @category gdbus
*/
-public static final native long _g_variant_new_tuple (long [] items, long length);
-/** @category gdbus */
-public static final long g_variant_new_tuple (long [] items, long length ) {
- lock.lock();
- try {
- return _g_variant_new_tuple (items, length);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new_tuple(long [] items, long length);
/**
* @param string cast=(const gchar *)
* @category gdbus
*/
-public static final native long _g_variant_new_string (byte[] string);
-/** @category gdbus */
-public static final long g_variant_new_string (byte[] string) {
- lock.lock();
- try {
- return _g_variant_new_string (string);
- } finally {
- lock.unlock();
- }
-}
+public static final native long g_variant_new_string(byte[] string);
+
+/**
+ * @param string cast=(const gchar *)
+ * @category gdbus
+ */
+public static final native long g_variant_new_string(long string);
/**
* @param value cast=(GVariant *)
* @category gdbus
*/
-public static final native void _g_variant_unref (long value);
-/** @category gdbus */
-public static final void g_variant_unref (long value) {
- lock.lock();
- try {
- _g_variant_unref (value);
- } finally {
- lock.unlock();
- }
-}
+public static final native void g_variant_unref(long value);
/**
* @param object cast=(GObject *)
*/
-public static final native long _g_object_ref_sink(long object);
+public static final native long g_object_ref_sink(long object);
+
+/* GDateTime */
+/**
+ * @param dateTime cast=(GDateTime *)
+ * @param year cast=(gint *)
+ * @param month cast=(gint *)
+ * @param day cast=(gint *)
+ */
+public static final native void g_date_time_get_ymd(long dateTime, int[] year, int[] month, int[] day);
+/**
+ * Ranges:
+ * year must be between 1 - 9999,
+ * month must be between 1 - 12,
+ * day must be between 1 and 28, 29, 30, 31,
+ * hour must be between 0 - 23,
+ * minute must be between 0 - 59,
+ * seconds must be between 0.0 - 60.0
+ *
+ * @param year cast=(gint)
+ * @param month cast=(gint)
+ * @param day cast=(gint)
+ * @param hour cast=(gint)
+ * @param minute cast=(gint)
+ * @param seconds cast=(gdouble)
+ */
+public static final native long g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds);
+/** @param datetime cast=(GDateTime *) */
+public static final native void g_date_time_unref(long datetime);
+
+/** @param file cast=(GFile *) */
+public static final native long g_file_get_path(long file);
+
+
+/* GMenu */
+public static final native long g_menu_new();
+/**
+ * @param label cast=(const gchar *)
+ * @param submenu cast=(GMenuModel *)
+ */
+public static final native long g_menu_item_new_submenu(byte[] label, long submenu);
+/**
+ * @param label cast=(const gchar *)
+ * @param section cast=(GMenuModel *)
+ */
+public static final native long g_menu_item_new_section(byte[] label, long section);
+/**
+ * @param label cast=(const gchar *)
+ * @param detailed_action cast=(const gchar *)
+ */
+public static final native long g_menu_item_new(byte[] label, byte[] detailed_action);
+/**
+ * @param menu_item cast=(GMenuItem *)
+ * @param submenu cast=(GMenuModel *)
+ */
+public static final native void g_menu_item_set_submenu(long menu_item, long submenu);
+/**
+ * @param menu cast=(GMenu *)
+ * @param item cast=(GMenuItem *)
+ */
+public static final native void g_menu_insert_item(long menu, int position, long item);
+/** @param menu cast=(GMenu *) */
+public static final native void g_menu_remove(long menu, int position);
+/**
+ * @param menu_item cast=(GMenuItem *)
+ * @param label cast=(const gchar *)
+ */
+public static final native void g_menu_item_set_label(long menu_item, byte[] label);
+/**
+ * @param menu_item cast=(GMenuItem *)
+ * @param attribute cast=(const gchar *)
+ * @param format_string cast=(const gchar *)
+ * @param data cast=(const gchar *)
+ */
+public static final native void g_menu_item_set_attribute(long menu_item, byte[] attribute, byte[] format_string, long data);
+
+/* GSimpleActionGroup */
+public static final native long g_simple_action_group_new();
+
+/* GSimpleAction */
+/**
+ * @param name cast=(const gchar *)
+ * @param parameter_type cast=(const GVariantType *)
+ */
+public static final native long g_simple_action_new(byte[] name, long parameter_type);
+/**
+ * @param name cast=(const gchar *)
+ * @param parameter_type cast=(const GVariantType *)
+ * @param initial_state cast=(GVariant *)
+ */
+public static final native long g_simple_action_new_stateful(byte[] name, long parameter_type, long initial_state);
+/**
+ * @param simple_action cast=(GSimpleAction *)
+ * @param value cast=(GVariant *)
+ */
+public static final native void g_simple_action_set_state(long simple_action, long value);
+/** @param simple_action cast=(GSimpleAction *) */
+public static final native void g_simple_action_set_enabled(long simple_action, boolean enabled);
+
+/* GAction */
+/** @param action cast=(GAction *) */
+public static final native boolean g_action_get_enabled(long action);
+/** @param action cast=(GAction *) */
+public static final native long g_action_get_state(long action);
+
+/* GActionMap */
+/**
+ * @param action_map cast=(GActionMap *)
+ * @param action cast=(GAction *)
+ */
+public static final native void g_action_map_add_action(long action_map, long action);
+/**
+ * @param action_map cast=(GActionMap *)
+ * @param action_name cast=(const gchar *)
+ */
+public static final native void g_action_map_remove_action(long action_map, byte[] action_name);
+
+/* GListModel */
+/** @param list cast=(GListModel *) */
+public static final native int g_list_model_get_n_items(long list);
+/**
+ * @param list cast=(GListModel *)
+ * @param position cast=(guint)
+ */
+public static final native long g_list_model_get_item(long list, int position);
+
+/* GMemoryInputStream */
+/**
+ * @param data cast=(const void *)
+ * @param len cast=(gssize)
+ * @param destroy cast=(GDestroyNotify)
+ */
+public static final native long g_memory_input_stream_new_from_data(long data, long len, long destroy);
-public static final long g_object_ref_sink(long object) {
- lock.lock();
- try {
- return _g_object_ref_sink(object);
- } finally {
- lock.unlock();
- }
-}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/package.html b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/package.html
index 93198b31ea..1fa8a15746 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/package.html
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/package.html
@@ -6,10 +6,10 @@
<title>Package-level Javadoc</title>
</head>
<body>
-SWT internal GTK2 implementation classes.
+SWT internal GTK implementation classes.
<h2>
Package Specification</h2>
-This package contains the classes which represent the GTK2
+This package contains the classes which represent the GTK
platform interface that the gtk variant of SWT is built from.
<p>
Referencing any of the classes in this package directly guarantees
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css
index a74e9fbe4a..a74e9fbe4a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css
deleted file mode 100644
index 4ed146c449..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css
+++ /dev/null
@@ -1,13 +0,0 @@
-/* These CSS fixes have 'functinal' impact, no visual impact. E.g allow keyboard navigation in trees etc.. */
-.undershoot.top, .undershoot.right, .undershoot.bottom, .undershoot.lef {
- background-image: none;
-}
-
-@binding-set SWTTreeViewBinding {
- bind "Left" { "expand-collapse-cursor-row" (0,0,0)};
- bind "Right" {"expand-collapse-cursor-row" (0,1,0)};
-}
-
-GtkTreeView {
- gtk-key-bindings: SWTTreeViewBinding;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css
index fb0cccb789..ee046e201c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css
@@ -22,4 +22,4 @@ entry {
tab {
padding-left: 6px;
padding-right: 6px;
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css
new file mode 100644
index 0000000000..3aab49552e
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css
@@ -0,0 +1,3 @@
+button {
+ padding: 4px 8px;
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css
deleted file mode 100644
index 4b68e8a08b..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css
+++ /dev/null
@@ -1,15 +0,0 @@
-/* These have an impact on visual aspects of SWT. Padding etc..
- There should not be hard-coded color fixes because this can break dark variants of themes.
- Instead either use OS.setDarkThemePreferred() if your theme has dark version or style manually via api */
-GtkToolbar {
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-GtkToolbar GtkButton {
- padding: 2px 4px 2px 4px;
-}
-
-GtkToolbar GtkMenuButton {
- padding: 1px 0px 1px 0px;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java
new file mode 100644
index 0000000000..225ec6eb8b
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java
@@ -0,0 +1,1092 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Syntevo and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Syntevo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk3;
+
+import org.eclipse.swt.internal.gtk.*;
+
+/**
+ * This class contains native functions that are present in GTK3 only.
+ */
+public class GTK3 {
+
+ /* Macros */
+ public static final native boolean GTK_IS_MENU_ITEM(long obj);
+ /** @method flags=const */
+ public static final native long GTK_TYPE_MENU();
+
+ /**
+ * @param context cast=(GtkIMContext *)
+ * @param event cast=(GdkEventKey *)
+ */
+ public static final native boolean gtk_im_context_filter_keypress(long context, long event);
+
+ /* GtkButton */
+ /**
+ * @param button cast=(GtkButton *)
+ * @param image cast=(GtkWidget *)
+ */
+ public static final native void gtk_button_set_image(long button, long image);
+
+ /* GtkAccelLabel */
+ /**
+ * @param label cast=(const gchar *)
+ */
+ public static final native long gtk_accel_label_new(byte[] label);
+ /**
+ * @param accel_label cast=(GtkAccelLabel *)
+ * @param accel_widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_accel_label_set_accel_widget(long accel_label, long accel_widget);
+ /**
+ * @param accel_label cast=(GtkAccelLabel *)
+ * @param accel_key cast=(guint)
+ * @param accel_mods cast=(GdkModifierType)
+ */
+ public static final native void gtk_accel_label_set_accel(long accel_label, int accel_key, int accel_mods);
+
+ /* GtkBin */
+ /** @param bin cast=(GtkBin *) */
+ public static final native long gtk_bin_get_child(long bin);
+
+ /* GtkBox */
+ /**
+ * @param box cast=(GtkBox *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_box_set_child_packing(long box, long child, boolean expand, boolean fill, int padding, int pack_type);
+ /**
+ * @param box cast=(GtkBox *)
+ * @param child cast=(GtkWidget *)
+ * @param position cast=(gint)
+ */
+ public static final native void gtk_box_reorder_child(long box, long child, int position);
+ /**
+ * @param box cast=(GtkBox *)
+ * @param widget cast=(GtkWidget *)
+ * @param expand cast=(gboolean)
+ * @param fill cast=(gboolean)
+ * @param padding cast=(guint)
+ */
+ public static final native void gtk_box_pack_end(long box, long widget, boolean expand, boolean fill, int padding);
+
+ /* GtkCalendar */
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param month cast=(guint)
+ * @param year cast=(guint)
+ */
+ public static final native void gtk_calendar_select_month(long calendar, int month, int year);
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param day cast=(guint)
+ */
+ public static final native void gtk_calendar_select_day(long calendar, int day);
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param flags cast=(GtkCalendarDisplayOptions)
+ */
+ public static final native void gtk_calendar_set_display_options(long calendar, int flags);
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param year cast=(guint *)
+ * @param month cast=(guint *)
+ * @param day cast=(guint *)
+ */
+ public static final native void gtk_calendar_get_date(long calendar, int[] year, int[] month, int[] day);
+
+ /* GtkColorChooser Interface */
+ /**
+ * @param h cast=(gdouble)
+ * @param s cast=(gdouble)
+ * @param v cast=(gdouble)
+ * @param r cast=(gdouble *)
+ * @param g cast=(gdouble *)
+ * @param b cast=(gdouble *)
+ */
+ public static final native void gtk_hsv_to_rgb(double h, double s, double v, double[] r, double[] g, double[] b);
+ /**
+ * @param r cast=(gdouble)
+ * @param g cast=(gdouble)
+ * @param b cast=(gdouble)
+ * @param h cast=(gdouble *)
+ * @param s cast=(gdouble *)
+ * @param v cast=(gdouble *)
+ */
+ public static final native void gtk_rgb_to_hsv(double r, double g, double b, double[] h, double[] s, double[] v);
+
+ /* GtkContainer */
+ /**
+ * @param container cast=(GtkContainer *)
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_container_add(long container, long widget);
+ // Do not confuse this function with gtk_container_foreach(..).
+ // Make sure you know what you are doing when using this. Please be attentive to swt_fixed_forall(..)
+ // found in os_custom.c, which overrides this function for swtFixed container with custom behaviour.
+ /**
+ * @param container cast=(GtkContainer *)
+ * @param callback cast=(GtkCallback)
+ * @param callback_data cast=(gpointer)
+ */
+ public static final native void gtk_container_forall(long container, long callback, long callback_data);
+ /**
+ * @param container cast=(GtkContainer *)
+ * @param child cast=(GtkWidget *)
+ * @param cairo cast=(cairo_t *)
+ */
+ public static final native void gtk_container_propagate_draw(long container, long child, long cairo);
+ /** @param container cast=(GtkContainer *) */
+ public static final native int gtk_container_get_border_width(long container);
+ /** @param container cast=(GtkContainer *) */
+ public static final native long gtk_container_get_children(long container);
+ /**
+ * @param container cast=(GtkContainer *)
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_container_remove(long container, long widget);
+ /**
+ * @param container cast=(GtkContainer *)
+ * @param border_width cast=(guint)
+ */
+ public static final native void gtk_container_set_border_width(long container, int border_width);
+
+ /* GtkDialog */
+ /** @param dialog cast=(GtkDialog *) */
+ public static final native int gtk_dialog_run(long dialog);
+
+ /* GTK Initialization */
+ /**
+ * @param argc cast=(int *)
+ * @param argv cast=(char ***)
+ */
+ public static final native boolean gtk_init_check(long [] argc, long [] argv);
+
+ /* GtkGrab */
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_grab_add(long widget);
+ public static final native long gtk_grab_get_current();
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_grab_remove(long widget);
+
+ /* Events */
+ public static final native long gtk_get_current_event();
+ /** @param state cast=(GdkModifierType*) */
+ public static final native boolean gtk_get_current_event_state(int[] state);
+ /** @param event cast=(GdkEvent *) */
+ public static final native long gtk_get_event_widget(long event);
+ /** @param event cast=(GdkEvent *) */
+ public static final native void gtk_main_do_event(long event);
+ public static final native boolean gtk_main_iteration_do(boolean blocking);
+ public static final native boolean gtk_events_pending();
+
+ /* GtkWindow */
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param list cast=(GList *)
+ */
+ public static final native void gtk_window_set_icon_list(long window, long list);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param accel_group cast=(GtkAccelGroup *)
+ */
+ public static final native void gtk_window_add_accel_group(long window, long accel_group);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param accel_group cast=(GtkAccelGroup *)
+ */
+ public static final native void gtk_window_remove_accel_group(long window, long accel_group);
+ /** @param handle cast=(GtkWindow *) */
+ public static final native void gtk_window_deiconify(long handle);
+ /** @param handle cast=(GtkWindow *) */
+ public static final native void gtk_window_iconify(long handle);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_window_set_default(long window, long widget);
+ /** @param window cast=(GtkWindow *) */
+ public static final native boolean gtk_window_activate_default(long window);
+ /** @param window cast=(GtkWindow *) */
+ public static final native void gtk_window_set_type_hint(long window, int hint);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param skips_taskbar cast=(gboolean)
+ */
+ public static final native void gtk_window_set_skip_taskbar_hint(long window, boolean skips_taskbar);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param setting cast=(gboolean)
+ */
+ public static final native void gtk_window_set_keep_above(long window, boolean setting);
+ /** @param window cast=(GtkWindow *) */
+ public static final native long gtk_window_get_icon_list(long window);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param attach_widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_window_set_attached_to(long window, long attach_widget);
+ /**
+ * @param handle cast=(GtkWindow *)
+ * @param x cast=(gint)
+ * @param y cast=(gint)
+ */
+ public static final native void gtk_window_move(long handle, int x, int y);
+ /** @param type cast=(GtkWindowType) */
+ public static final native long gtk_window_new(int type);
+ /**
+ * @param handle cast=(GtkWindow *)
+ * @param x cast=(gint *)
+ * @param y cast=(gint *)
+ */
+ public static final native void gtk_window_get_position(long handle, int[] x, int[] y);
+ /** @param window cast=(GtkWindow *) */
+ public static final native int gtk_window_get_mnemonic_modifier(long window);
+ /**
+ * @param handle cast=(GtkWindow *)
+ * @param x cast=(gint)
+ * @param y cast=(gint)
+ */
+ public static final native void gtk_window_resize(long handle, int x, int y);
+ /**
+ * @param handle cast=(GtkWindow *)
+ * @param width cast=(gint *)
+ * @param height cast=(gint *)
+ */
+ public static final native void gtk_window_get_size(long handle, int[] width, int[] height);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param geometry_widget cast=(GtkWidget *)
+ * @param geometry flags=no_out
+ */
+ public static final native void gtk_window_set_geometry_hints(long window, long geometry_widget, GdkGeometry geometry, int geom_mask);
+
+ /* GtkWidget */
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_accessible(long widget);
+ /**
+ * @method flags=ignore_deprecations
+ * @param widget cast=(GtkWidget *)
+ * @param font cast=(const PangoFontDescription *)
+ */
+ /* deprecated as of 3.16 */
+ public static final native void gtk_widget_override_font(long widget, long font);
+ /**
+ * @method flags=ignore_deprecations
+ * @param widget cast=(GtkWidget *)
+ * @param new_parent cast=(GtkWidget *)
+ */
+ /* deprecated as of 3.14 */
+ public static final native void gtk_widget_reparent(long widget, long new_parent);
+ /**
+ * @method flags=ignore_deprecations
+ * @param widget cast=(GtkWidget *)
+ * @param double_buffered cast=(gboolean)
+ */
+ /* deprecated as of 3.14 */
+ public static final native void gtk_widget_set_double_buffered(long widget, boolean double_buffered);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param width cast=(gint)
+ * @param minimum_size cast=(gint *)
+ * @param natural_size cast=(gint *)
+ */
+ public static final native void gtk_widget_get_preferred_height_for_width(long widget, int width, int[] minimum_size, int[] natural_size);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param minimum_size cast=(gint *)
+ * @param natural_size cast=(gint *)
+ */
+ public static final native void gtk_widget_get_preferred_height(long widget, int[] minimum_size, int[] natural_size);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param height cast=(gint)
+ * @param minimum_size cast=(gint *)
+ * @param natural_size cast=(gint *)
+ */
+ public static final native void gtk_widget_get_preferred_width_for_height(long widget, int height, int[] minimum_size, int[] natural_size);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_screen(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param has_window cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_has_window(long widget, boolean has_window);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param accel_signal cast=(const gchar *)
+ * @param accel_group cast=(GtkAccelGroup *)
+ * @param accel_key cast=(guint)
+ * @param accel_mods cast=(GdkModifierType)
+ */
+ public static final native void gtk_widget_add_accelerator(long widget, byte[] accel_signal, long accel_group, int accel_key, int accel_mods, int accel_flags);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param accel_group cast=(GtkAccelGroup *)
+ * @param accel_key cast=(guint)
+ * @param accel_mods cast=(GdkModifierType)
+ */
+ public static final native void gtk_widget_remove_accelerator(long widget, long accel_group, int accel_key, int accel_mods);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param events cast=(gint)
+ */
+ public static final native void gtk_widget_add_events(long widget, int events);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_widget_destroy(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native int gtk_widget_get_events(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_window(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_toplevel(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param redraw cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_redraw_on_allocate(long widget, boolean redraw);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param event cast=(GdkEvent *)
+ */
+ public static final native boolean gtk_widget_event(long widget, long event);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param cr cast=(cairo_t *)
+ */
+ public static final native void gtk_widget_draw(long widget, long cr);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_has_window(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_can_default(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param can_default cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_can_default(long widget, boolean can_default);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param parent_window cast=(GdkWindow *)
+ */
+ public static final native void gtk_widget_set_parent_window(long widget, long parent_window);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param region cast=(cairo_region_t *)
+ */
+ public static final native void gtk_widget_shape_combine_region(long widget, long region);
+ /**
+ * @param src_widget cast=(GtkWidget *)
+ * @param dest_widget cast=(GtkWidget *)
+ * @param dest_x cast=(gint *)
+ * @param dest_y cast=(gint *)
+ */
+ public static final native boolean gtk_widget_translate_coordinates(long src_widget, long dest_widget, int src_x, int src_y, int[] dest_x, int[] dest_y);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param property_name cast=(const gchar *)
+ * @param terminator cast=(const gchar *),flags=sentinel
+ */
+ public static final native void gtk_widget_style_get(long widget, byte[] property_name, int[] value, long terminator);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param property_name cast=(const gchar *)
+ * @param terminator cast=(const gchar *),flags=sentinel
+ */
+ public static final native void gtk_widget_style_get(long widget, byte[] property_name, long[] value, long terminator);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param region cast=(cairo_region_t *)
+ */
+ public static final native void gtk_widget_input_shape_combine_region(long widget, long region);
+ /** @param widget cast=(GtkWidget *)*/
+ public static final native void gtk_widget_set_clip(long widget, GtkAllocation allocation);
+ /** @param widget cast=(GtkWidget *)*/
+ public static final native void gtk_widget_get_clip(long widget, GtkAllocation allocation);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param allocation cast=(GtkAllocation *),flags=no_out
+ */
+ public static final native void gtk_widget_set_allocation(long widget, GtkAllocation allocation);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param allocation cast=(GtkAllocation *),flags=no_out
+ */
+ public static final native void gtk_widget_size_allocate(long widget, GtkAllocation allocation);
+
+ /* Drag and Drop API */
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param targets cast=(GtkTargetList *)
+ * @param actions cast=(GdkDragAction)
+ * @param button cast=(gint)
+ * @param event cast=(GdkEvent *)
+ * @param x cast=(gint)
+ * @param y cast=(gint)
+ */
+ public static final native long gtk_drag_begin_with_coordinates(long widget, long targets, int actions, int button, long event, int x, int y);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param start_x cast=(gint)
+ * @param start_y cast=(gint)
+ * @param current_x cast=(gint)
+ * @param current_y cast=(gint)
+ */
+ public static final native boolean gtk_drag_check_threshold(long widget, int start_x, int start_y, int current_x, int current_y);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param flags cast=(GtkDestDefaults)
+ * @param targets cast=(const GtkTargetEntry *)
+ * @param n_targets cast=(gint)
+ * @param actions cast=(GdkDragAction)
+ */
+ public static final native void gtk_drag_dest_set(long widget, int flags, long targets, int n_targets, int actions);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_drag_dest_unset(long widget);
+ /**
+ * @param context cast=(GdkDragContext *)
+ * @param success cast=(gboolean)
+ * @param delete cast=(gboolean)
+ * @param time cast=(guint32)
+ */
+ public static final native void gtk_drag_finish(long context, boolean success, boolean delete, int time);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param context cast=(GdkDragContext *)
+ * @param target cast=(GdkAtom)
+ * @param time cast=(guint32)
+ */
+ public static final native void gtk_drag_get_data(long widget, long context, long target, int time);
+ /**
+ * @param context cast=(GdkDragContext *)
+ * @param surface cast=(cairo_surface_t *)
+ */
+ public static final native void gtk_drag_set_icon_surface(long context, long surface);
+
+ /* GtkFileChooser */
+ /** @param chooser cast=(GtkFileChooser *) */
+ public static final native long gtk_file_chooser_get_filename(long chooser);
+ /** @param chooser cast=(GtkFileChooser *) */
+ public static final native long gtk_file_chooser_get_filenames(long chooser);
+ /** @param chooser cast=(GtkFileChooser *) */
+ public static final native long gtk_file_chooser_get_uri(long chooser);
+ /** @param chooser cast=(GtkFileChooser *) */
+ public static final native long gtk_file_chooser_get_uris(long chooser);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param filename cast=(const gchar *)
+ */
+ public static final native void gtk_file_chooser_set_current_folder(long chooser, long filename);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param uri cast=(const gchar *)
+ */
+ public static final native void gtk_file_chooser_set_current_folder_uri(long chooser, byte [] uri);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param local_only cast=(gboolean)
+ */
+ public static final native void gtk_file_chooser_set_local_only(long chooser, boolean local_only);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param do_overwrite_confirmation cast=(gboolean)
+ */
+ public static final native void gtk_file_chooser_set_do_overwrite_confirmation(long chooser, boolean do_overwrite_confirmation);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param name cast=(const gchar *)
+ */
+ public static final native void gtk_file_chooser_set_filename(long chooser, long name);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param uri cast=(const char *)
+ */
+ public static final native void gtk_file_chooser_set_uri(long chooser, byte [] uri);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param extra_widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_file_chooser_set_extra_widget(long chooser, long extra_widget);
+
+ /* GtkRadioButton */
+ /** @param radio_button cast=(GtkRadioButton *) */
+ public static final native long gtk_radio_button_get_group(long radio_button);
+ /** @param group cast=(GSList *) */
+ public static final native long gtk_radio_button_new(long group);
+
+ /* GtkNativeDialog */
+ /** @param dialog cast=(GtkNativeDialog *) */
+ public static final native int gtk_native_dialog_run(long dialog);
+
+ /* GtkScrolledWindow */
+ /**
+ * @param hadjustment cast=(GtkAdjustment *)
+ * @param vadjustment cast=(GtkAdjustment *)
+ */
+ public static final native long gtk_scrolled_window_new(long hadjustment, long vadjustment);
+ /**
+ * @param scrolled_window cast=(GtkScrolledWindow *)
+ * @param type cast=(GtkShadowType)
+ */
+ public static final native void gtk_scrolled_window_set_shadow_type(long scrolled_window, int type);
+ /** @param scrolled_window cast=(GtkScrolledWindow *) */
+ public static final native int gtk_scrolled_window_get_shadow_type(long scrolled_window);
+
+ /* GtkClipboard */
+ /** @param clipboard cast=(GtkClipboard *) */
+ public static final native void gtk_clipboard_clear(long clipboard);
+ /** @param selection cast=(GdkAtom) */
+ public static final native long gtk_clipboard_get(long selection);
+ /**
+ * @param clipboard cast=(GtkClipboard *)
+ * @param target cast=(const GtkTargetEntry *)
+ * @param n_targets cast=(guint)
+ * @param get_func cast=(GtkClipboardGetFunc)
+ * @param clear_func cast=(GtkClipboardClearFunc)
+ * @param user_data cast=(GObject *)
+ */
+ public static final native boolean gtk_clipboard_set_with_owner(long clipboard, long target, int n_targets, long get_func, long clear_func, long user_data);
+ /**
+ * @param clipboard cast=(GtkClipboard *)
+ * @param targets cast=(const GtkTargetEntry *)
+ * @param n_targets cast=(gint)
+ */
+ public static final native void gtk_clipboard_set_can_store(long clipboard, long targets, int n_targets);
+ /** @param clipboard cast=(GtkClipboard *) */
+ public static final native void gtk_clipboard_store(long clipboard);
+ /**
+ * @param clipboard cast=(GtkClipboard *)
+ * @param target cast=(GdkAtom)
+ */
+ public static final native long gtk_clipboard_wait_for_contents(long clipboard, long target);
+
+ /* GtkStatusIcon */
+ /**
+ * @method flags=ignore_deprecations
+ * @param handle cast=(GtkStatusIcon*)
+ */
+ public static final native boolean gtk_status_icon_get_visible(long handle);
+ /** @method flags=ignore_deprecations */
+ public static final native long gtk_status_icon_new();
+ /**
+ * @method flags=ignore_deprecations
+ * @param handle cast=(GtkStatusIcon*)
+ * @param pixbuf cast=(GdkPixbuf*)
+ */
+ public static final native void gtk_status_icon_set_from_pixbuf(long handle, long pixbuf);
+ /**
+ * @method flags=ignore_deprecations
+ * @param handle cast=(GtkStatusIcon*)
+ * @param visible cast=(gboolean)
+ */
+ public static final native void gtk_status_icon_set_visible(long handle, boolean visible);
+ /**
+ * @method flags=ignore_deprecations
+ * @param handle cast=(GtkStatusIcon *)
+ * @param tip_text cast=(const gchar *)
+ */
+ public static final native void gtk_status_icon_set_tooltip_text(long handle, byte[] tip_text);
+ /**
+ * @method flags=ignore_deprecations
+ * @param handle cast=(GtkStatusIcon*)
+ * @param screen cast=(GdkScreen**)
+ * @param area cast=(GdkRectangle*)
+ * @param orientation cast=(GtkOrientation*)
+ */
+ public static final native boolean gtk_status_icon_get_geometry(long handle, long screen, GdkRectangle area, long orientation);
+
+ /* GtkTargetList */
+ /**
+ * @param targets cast=(const GtkTargetEntry *)
+ * @param ntargets cast=(guint)
+ */
+ public static final native long gtk_target_list_new(long targets, int ntargets);
+ /** @param list cast=(GtkTargetList *) */
+ public static final native void gtk_target_list_unref(long list);
+
+ /* GtkSelectionData */
+ /** @param selection_data cast=(GtkSelectionData *) */
+ public static final native void gtk_selection_data_free(long selection_data);
+ /** @param selection_data cast=(GtkSelectionData *) */
+ public static final native long gtk_selection_data_get_data(long selection_data);
+ /** @param selection_data cast=(GtkSelectionData *) */
+ public static final native int gtk_selection_data_get_format(long selection_data);
+ /** @param selection_data cast=(GtkSelectionData *) */
+ public static final native int gtk_selection_data_get_length(long selection_data);
+ /** @param selection_data cast=(GtkSelectionData *) */
+ public static final native long gtk_selection_data_get_target(long selection_data);
+ /** @param selection_data cast=(GtkSelectionData *) */
+ public static final native long gtk_selection_data_get_data_type(long selection_data);
+ /**
+ * @param selection_data cast=(GtkSelectionData *)
+ * @param type cast=(GdkAtom)
+ * @param format cast=(gint)
+ * @param data cast=(const guchar *)
+ * @param length cast=(gint)
+ */
+ public static final native void gtk_selection_data_set(long selection_data, long type, int format, long data, int length);
+
+ /* GtkMenu */
+ public static final native long gtk_menu_new();
+ /** @param menu cast=(GtkMenu *) */
+ public static final native void gtk_menu_popdown(long menu);
+ /**
+ * @method flags=ignore_deprecations
+ * @param menu cast=(GtkMenu *)
+ * @param parent_menu_shell cast=(GtkWidget *)
+ * @param parent_menu_item cast=(GtkWidget *)
+ * @param func cast=(GtkMenuPositionFunc)
+ * @param data cast=(gpointer)
+ * @param button cast=(guint)
+ * @param activate_time cast=(guint32)
+ */
+ /* [GTK3; 3.22 deprecated, replaced] */
+ public static final native void gtk_menu_popup(long menu, long parent_menu_shell, long parent_menu_item, long func, long data, int button, int activate_time);
+ /**
+ * @param menu cast=(GtkMenu *)
+ * @param trigger_event cast=(const GdkEvent*)
+ */
+ public static final native void gtk_menu_popup_at_pointer(long menu, long trigger_event);
+
+ /* GtkMenuBar */
+ public static final native long gtk_menu_bar_new();
+
+ /* GtkMenuItem */
+ /** @param menu_item cast=(GtkMenuItem *) */
+ public static final native long gtk_menu_item_get_submenu(long menu_item);
+ public static final native long gtk_menu_item_new();
+ /**
+ * @param menu_item cast=(GtkMenuItem *)
+ * @param submenu cast=(GtkWidget *)
+ */
+ public static final native void gtk_menu_item_set_submenu(long menu_item, long submenu);
+ /** @param check_menu_item cast=(GtkCheckMenuItem *) */
+ public static final native boolean gtk_check_menu_item_get_active(long check_menu_item);
+ public static final native long gtk_check_menu_item_new();
+ /**
+ * @param wid cast=(GtkCheckMenuItem *)
+ * @param active cast=(gboolean)
+ */
+ public static final native void gtk_check_menu_item_set_active(long wid, boolean active);
+ /** @param radio_menu_item cast=(GtkRadioMenuItem *) */
+ public static final native long gtk_radio_menu_item_get_group(long radio_menu_item);
+ /** @param group cast=(GSList *) */
+ public static final native long gtk_radio_menu_item_new(long group);
+ public static final native long gtk_separator_menu_item_new();
+ /**
+ * @param menu cast=(GtkMenu *)
+ * @param rect_window cast=(GdkWindow *)
+ * @param rect cast=(GdkRectangle *)
+ * @param rect_anchor cast=(GdkGravity)
+ * @param menu_anchor cast=(GdkGravity)
+ * @param trigger_event cast=(const GdkEvent *)
+ */
+ public static final native void gtk_menu_popup_at_rect(long menu, long rect_window, GdkRectangle rect, int rect_anchor, int menu_anchor, long trigger_event);
+
+ /* GtkMenuShell */
+ /** @param menu_shell cast=(GtkMenuShell *) */
+ public static final native void gtk_menu_shell_deactivate(long menu_shell);
+ /**
+ * @param menu_shell cast=(GtkMenuShell *)
+ * @param child cast=(GtkWidget *)
+ * @param position cast=(gint)
+ */
+ public static final native void gtk_menu_shell_insert(long menu_shell, long child, int position);
+ /**
+ * @param menu_shell cast=(GtkMenuShell *)
+ * @param take_focus cast=(gboolean)
+ */
+ public static final native void gtk_menu_shell_set_take_focus(long menu_shell, boolean take_focus);
+
+ /* GtkToolbar */
+ public static final native long gtk_toolbar_new();
+ /**
+ * @param toolbar cast=(GtkToolbar *)
+ * @param item cast=(GtkToolItem *)
+ */
+ public static final native void gtk_toolbar_insert(long toolbar, long item, int pos);
+ /**
+ * @param toolbar cast=(GtkToolbar *)
+ * @param show_arrow cast=(gboolean)
+ */
+ public static final native void gtk_toolbar_set_show_arrow(long toolbar, boolean show_arrow);
+ /**
+ * @param toolbar cast=(GtkToolbar *)
+ * @param style cast=(GtkToolbarStyle)
+ */
+ public static final native void gtk_toolbar_set_style(long toolbar, int style);
+ /** @param toolbar cast=(GtkToolbar *)*/
+ public static final native void gtk_toolbar_set_icon_size(long toolbar, int size);
+
+ /* GtkToolItem */
+ /**
+ * @param item cast=(GtkToolItem *)
+ * @param menu_id cast=(const gchar *)
+ */
+ public static final native long gtk_tool_item_get_proxy_menu_item(long item, byte[] menu_id);
+ /** @param item cast=(GtkToolItem *) */
+ public static final native long gtk_tool_item_retrieve_proxy_menu_item(long item);
+ /**
+ * @param item cast=(GtkToolItem *)
+ * @param important cast=(gboolean)
+ */
+ public static final native void gtk_tool_item_set_is_important(long item, boolean important);
+ /**
+ * @param item cast=(GtkToolItem *)
+ * @param homogeneous cast=(gboolean)
+ */
+ public static final native void gtk_tool_item_set_homogeneous(long item, boolean homogeneous);
+ /**
+ * @param item cast=(GtkToolItem *)
+ * @param menu_id cast=(const gchar *)
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_tool_item_set_proxy_menu_item(long item, byte[] menu_id, long widget);
+
+ /* GtkSeparatorToolItem */
+ public static final native long gtk_separator_tool_item_new();
+ /**
+ * @param item cast=(GtkSeparatorToolItem *)
+ * @param draw cast=(gboolean)
+ */
+ public static final native void gtk_separator_tool_item_set_draw(long item, boolean draw);
+
+ /* GtkToolButton */
+ /**
+ * @param icon_widget cast=(GtkWidget *)
+ * @param label cast=(const gchar *)
+ */
+ public static final native long gtk_tool_button_new(long icon_widget, byte[] label);
+ /**
+ * @param button cast=(GtkToolButton *)
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_tool_button_set_icon_widget(long button, long widget);
+ /**
+ * @param button cast=(GtkToolButton *)
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_tool_button_set_label_widget(long button, long widget);
+ /**
+ * @param item cast=(GtkToolButton *)
+ * @param underline cast=(gboolean)
+ */
+ public static final native void gtk_tool_button_set_use_underline(long item, boolean underline);
+
+ /* GtkToggleToolButton */
+ /** @param button cast=(GtkToggleToolButton *) */
+ public static final native boolean gtk_toggle_tool_button_get_active(long button);
+ public static final native long gtk_toggle_tool_button_new();
+ /**
+ * @param item cast=(GtkToggleToolButton *)
+ * @param selected cast=(gboolean)
+ */
+ public static final native void gtk_toggle_tool_button_set_active(long item, boolean selected);
+
+ /* GtkMenuToolButton */
+ /**
+ * @param icon_widget cast=(GtkWidget *)
+ * @param label cast=(const gchar *)
+ */
+ public static final native long gtk_menu_tool_button_new(long icon_widget, byte[] label);
+
+ /* GtkIconTheme */
+ /**
+ * @param icon_theme cast=(GtkIconTheme *)
+ * @param icon cast=(GIcon *)
+ * @param size cast=(gint)
+ * @param flags cast=(GtkIconLookupFlags)
+ */
+ public static final native long gtk_icon_theme_lookup_by_gicon(long icon_theme, long icon, int size, int flags);
+ /**
+ * @param icon_theme cast=(GtkIconTheme *)
+ * @param icon_name cast=(const gchar *)
+ * @param size cast=(gint)
+ * @param flags cast=(GtkIconLookupFlags)
+ * @param error cast=(GError **)
+ */
+ public static final native long gtk_icon_theme_load_icon(long icon_theme, byte[] icon_name, int size, int flags, long error);
+ public static final native long gtk_icon_theme_get_default();
+ /**
+ * @param icon_info cast=(GtkIconInfo *)
+ * @param error cast=(GError **)
+ */
+ public static final native long gtk_icon_info_load_icon(long icon_info, long error[]);
+
+ /* GtkEditable Interface */
+ /** @param editable cast=(GtkEditable *) */
+ public static final native void gtk_editable_copy_clipboard(long editable);
+ /** @param editable cast=(GtkEditable *) */
+ public static final native void gtk_editable_cut_clipboard(long editable);
+ /** @param editable cast=(GtkEditable *) */
+ public static final native void gtk_editable_paste_clipboard(long editable);
+
+ /* GtkEntry */
+ /**
+ * @param self cast=(GtkEntry *)
+ * @param n_chars cast=(gint)
+ */
+ public static final native void gtk_entry_set_width_chars(long self, int n_chars);
+ /** @param entry cast=(GtkEntry *) */
+ public static final native long gtk_entry_get_layout(long entry);
+ /**
+ * @param entry cast=(GtkEntry *)
+ * @param x cast=(gint *)
+ * @param y cast=(gint *)
+ */
+ public static final native void gtk_entry_get_layout_offsets(long entry, int[] x, int[] y);
+ /**
+ * @param entry cast=(GtkEntry *)
+ * @param index cast=(gint)
+ */
+ public static final native int gtk_entry_text_index_to_layout_index(long entry, int index);
+ /** @param entry cast=(GtkEntry *) */
+ public static final native long gtk_entry_get_text(long entry);
+ /**
+ * @param entry cast=(GtkEntry *)
+ * @param text cast=(const gchar *)
+ */
+ public static final native void gtk_entry_set_text(long entry, byte[] text);
+
+ /* GtkEventController */
+ /**
+ * @param gesture cast=(GtkEventController *)
+ * @param event cast=(const GdkEvent *)
+ */
+ public static final native void gtk_event_controller_handle_event(long gesture, long event);
+
+ /* GtkFrame */
+ /**
+ * @param frame cast=(GtkFrame *)
+ * @param type cast=(GtkShadowType)
+ */
+ public static final native void gtk_frame_set_shadow_type(long frame, int type);
+
+ /* GtkViewport */
+ /**
+ * @param viewport cast=(GtkViewport *)
+ * @param type cast=(GtkShadowType)
+ */
+ public static final native void gtk_viewport_set_shadow_type(long viewport, int type);
+
+ /* GtkAccessible */
+ /** @param accessible cast=(GtkAccessible *) */
+ public static final native long gtk_accessible_get_widget(long accessible);
+
+ /* GtkComboBox */
+ /**
+ * @param combo_box cast=(GtkComboBox *)
+ * @param width cast=(gint)
+ */
+ /* Do not use directly. Instead use Combo.gtk_combo_box_toggle_wrap(..) */
+ public static final native void gtk_combo_box_set_wrap_width(long combo_box, int width);
+ /**
+ * @param combo_box cast=(GtkComboBox *)
+ * @return cast=(gint)
+ */
+ public static final native int gtk_combo_box_get_wrap_width(long combo_box);
+
+ /* GtkEventBox */
+ public static final native long gtk_event_box_new();
+
+ /* GtkImage */
+ /**
+ * @param image cast=(GtkImage *)
+ * @param surface cast=(cairo_surface_t *)
+ */
+ public static final native void gtk_image_set_from_surface(long image, long surface);
+ /**
+ * @param icon_name cast=(const gchar *)
+ * @param size cast=(GtkIconSize)
+ */
+ public static final native long gtk_image_new_from_icon_name(byte[] icon_name, int size);
+ /**
+ * @param image cast=(GtkImage *)
+ * @param icon_name cast=(const gchar *)
+ * @param size cast=(GtkIconSize)
+ */
+ public static final native void gtk_image_set_from_icon_name(long image, byte[] icon_name, int size);
+ /** @param surface cast=(cairo_surface_t *) */
+ public static final native long gtk_image_new_from_surface(long surface);
+
+ /* GtkCssProvider */
+ /**
+ * @param css_provider cast=(GtkCssProvider *)
+ * @param data cast=(const gchar *)
+ * @param length cast=(gssize)
+ * @param error cast=(GError **)
+ */
+ public static final native boolean gtk_css_provider_load_from_data(long css_provider, byte[] data, long length, long error[]);
+
+ /* GtkStyleContext */
+ /**
+ * @method flags=ignore_deprecations
+ * @param context cast=(GtkStyleContext *)
+ */
+ public static final native void gtk_style_context_invalidate(long context);
+ /**
+ * @param screen cast=(GdkScreen *)
+ * @param provider cast=(GtkStyleProvider *)
+ * @param priority cast=(guint)
+ */
+ public static final native void gtk_style_context_add_provider_for_screen(long screen, long provider, int priority);
+ /**
+ * @method flags=ignore_deprecations
+ * @param context cast=(GtkStyleContext *)
+ * @param state cast=(GtkStateFlags)
+ */
+ /* [GTK3; 3.8 deprecated, replaced] */
+ public static final native long gtk_style_context_get_font(long context, int state);
+ /** @param context cast=(GtkStyleContext *) */
+ public static final native long gtk_style_context_get_parent(long context);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param state cast=(GtkStateFlags)
+ * @param property cast=(const gchar *),flags=no_out
+ * @param terminator cast=(const gchar *),flags=sentinel
+ */
+ public static final native void gtk_style_context_get(long context, int state, byte [] property, long [] value, long terminator);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param state cast=(GtkStateFlags)
+ * @param padding cast=(GtkBorder *),flags=no_in
+ */
+ public static final native void gtk_style_context_get_padding(long context, int state, GtkBorder padding);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param state cast=(GtkStateFlags)
+ * @param color cast=(GdkRGBA *)
+ */
+ public static final native void gtk_style_context_get_color(long context, int state, GdkRGBA color);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param state cast=(GtkStateFlags)
+ * @param padding cast=(GtkBorder *),flags=no_in
+ */
+ public static final native void gtk_style_context_get_border(long context, int state, GtkBorder padding);
+
+ /* GtkLabel */
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap cast=(gboolean)
+ */
+ public static final native void gtk_label_set_line_wrap(long label, boolean wrap);
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap_mode cast=(PangoWrapMode)
+ */
+ public static final native void gtk_label_set_line_wrap_mode(long label, int wrap_mode);
+
+ /* GtkTextView */
+ /**
+ * @param text_view cast=(GtkTextView *)
+ * @param win cast=(GtkTextWindowType)
+ */
+ public static final native long gtk_text_view_get_window(long text_view, int win);
+
+ /* GtkToggleButton */
+ /**
+ * @param toggle_button cast=(GtkToggleButton *)
+ * @param setting cast=(gboolean)
+ */
+ public static final native void gtk_toggle_button_set_inconsistent(long toggle_button, boolean setting);
+
+ /* GtkTreeView */
+ /** @param tree_view cast=(GtkTreeView *) */
+ public static final native long gtk_tree_view_get_bin_window(long tree_view);
+
+ /* GtkTreeViewColumn */
+ /**
+ * @param tree_column cast=(GtkTreeViewColumn *)
+ * @param cell_area cast=(GdkRectangle *),flags=no_in
+ * @param x_offset cast=(gint *)
+ * @param y_offset cast=(gint *)
+ * @param width cast=(gint *)
+ * @param height cast=(gint *)
+ */
+ public static final native void gtk_tree_view_column_cell_get_size(long tree_column, GdkRectangle cell_area, int[] x_offset, int[] y_offset, int[] width, int[] height);
+
+ /* GdkWindow */
+ /**
+ * @param parent cast=(GdkWindow *)
+ * @param attributes flags=no_out
+ */
+ public static final native long gdk_window_new(long parent, GdkWindowAttr attributes, int attributes_mask);
+
+ /* Memmove */
+ /**
+ * @param dest cast=(void *),flags=no_in
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(GdkEventButton dest, long src, long size);
+ /**
+ * @param dest cast=(void *),flags=no_in
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(GdkEventCrossing dest, long src, long size);
+ /**
+ * @param dest cast=(void *),flags=no_in
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(GdkEventFocus dest, long src, long size);
+ /**
+ * @param dest cast=(void *),flags=no_in
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(GdkEventKey dest, long src, long size);
+ /**
+ * @param dest cast=(void *),flags=no_in
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(GdkEventMotion dest, long src, long size);
+ /**
+ * @param dest cast=(void *),flags=no_in
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(GdkEventWindowState dest, long src, long size);
+ /**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(long dest, GdkEventButton src, long size);
+ /**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(long dest, GdkEventKey src, long size);
+ /**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+ public static final native void memmove(long dest, GtkTargetEntry src, long size);
+
+ /* Sizeof */
+ public static final native int GtkTargetEntry_sizeof();
+ public static final native int GdkEvent_sizeof();
+ public static final native int GdkEventButton_sizeof();
+ public static final native int GdkEventCrossing_sizeof();
+ public static final native int GdkEventFocus_sizeof();
+ public static final native int GdkEventKey_sizeof();
+ public static final native int GdkEventMotion_sizeof();
+ public static final native int GdkEventWindowState_sizeof();
+ public static final native int GdkGeometry_sizeof();
+ public static final native int GdkWindowAttr_sizeof();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEvent.java
index 277bfe911d..fecdae447c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEvent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,11 +12,10 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkEvent {
/** @field cast=(GdkEventType) */
public int type;
- public static final int sizeof = GDK.GdkEvent_sizeof();
+ public static final int sizeof = GTK3.GdkEvent_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventButton.java
index ef08a3c918..8f7a304e4d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventButton.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkEventButton extends GdkEvent {
/** @field cast=(GdkWindow *) */
@@ -38,5 +37,5 @@ public class GdkEventButton extends GdkEvent {
public double x_root;
/** @field cast=(gdouble) */
public double y_root;
- public static final int sizeof = GDK.GdkEventButton_sizeof();
+ public static final int sizeof = GTK3.GdkEventButton_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventCrossing.java
index 2e25d4a024..3893550743 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventCrossing.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkEventCrossing extends GdkEvent {
/** @field cast=(GdkWindow *) */
@@ -34,5 +33,5 @@ public class GdkEventCrossing extends GdkEvent {
/** @field cast=(gboolean) */
public boolean focus;
public int state;
- public static final int sizeof = GDK.GdkEventCrossing_sizeof();
+ public static final int sizeof = GTK3.GdkEventCrossing_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventFocus.java
index 59741dfec7..fa5dcf2ed1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventFocus.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkEventFocus extends GdkEvent {
/** @field cast=(GdkWindow *) */
@@ -22,5 +21,5 @@ public class GdkEventFocus extends GdkEvent {
public byte send_event;
/** @field cast=(gint16) */
public short in;
- public static final int sizeof = GDK.GdkEventFocus_sizeof();
+ public static final int sizeof = GTK3.GdkEventFocus_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventKey.java
index 0e9767477c..cba45bf727 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventKey.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkEventKey extends GdkEvent {
/** @field cast=(GdkWindow *) */
@@ -32,9 +31,9 @@ public class GdkEventKey extends GdkEvent {
public long string;
/** @field cast=(guint16) */
public short hardware_keycode;
- /** @field cast=(guint8) */
+ /** @field cast=(guint8) */
public byte group;
/** @field cast=(guint) */
public int is_modifier;
- public static final int sizeof = GDK.GdkEventKey_sizeof();
+ public static final int sizeof = GTK3.GdkEventKey_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventMotion.java
index ed2b76ad8c..01475ee84a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventMotion.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkEventMotion extends GdkEvent {
/** @field cast=(GdkWindow *) */
@@ -38,5 +37,5 @@ public class GdkEventMotion extends GdkEvent {
public double x_root;
/** @field cast=(gdouble) */
public double y_root;
- public static final int sizeof = GDK.GdkEventMotion_sizeof();
+ public static final int sizeof = GTK3.GdkEventMotion_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventWindowState.java
index 2eb6886e09..0a1f6f0350 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkEventWindowState.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkEventWindowState extends GdkEvent {
/** @field cast=(GdkWindow *) */
@@ -21,5 +20,5 @@ public class GdkEventWindowState extends GdkEvent {
public byte send_event;
public int changed_mask;
public int new_window_state;
- public static final int sizeof = GDK.GdkEventWindowState_sizeof();
+ public static final int sizeof = GTK3.GdkEventWindowState_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkGeometry.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkGeometry.java
new file mode 100644
index 0000000000..6729264257
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkGeometry.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt). The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html. If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk3;
+
+import org.eclipse.swt.internal.gtk.*;
+public class GdkGeometry implements GeometryInterface{
+ public int min_width;
+ public int min_height;
+ public int max_width;
+ public int max_height;
+ public int base_width;
+ public int base_height;
+ public int width_inc;
+ public int height_inc;
+ public double min_aspect;
+ public double max_aspect;
+ public int win_gravity;
+ public static final int sizeof = GTK3.GdkGeometry_sizeof();
+
+ @Override
+ public int getMinWidth() {
+ return min_width;
+ }
+ @Override
+ public int getMinHeight() {
+ return min_height;
+ }
+ @Override
+ public int getMaxWidth() {
+ return max_width;
+ }
+ @Override
+ public int getMaxHeight() {
+ return max_height;
+ }
+ @Override
+ public boolean getResize() {
+ return false;
+ }
+ @Override
+ public int getRequestedWidth() {
+ return 0;
+ }
+ @Override
+ public int getRequestedHeight() {
+ return 0;
+ }
+ @Override
+ public void setMinWidth(int value) {
+ min_width = value;
+ }
+ @Override
+ public void setMinHeight(int value) {
+ min_height = value;
+ }
+ @Override
+ public void setMaxWidth(int value) {
+ max_width = value;
+ }
+ @Override
+ public void setMaxHeight(int value) {
+ max_height = value;
+ }
+ @Override
+ public void setResize(boolean value) {
+ }
+ @Override
+ public void setRequestedWidth(int value) {
+ }
+ @Override
+ public void setRequestedHeight(int value) {
+ }
+ @Override
+ public boolean getMinSizeRequested() {
+ return false;
+ }
+ @Override
+ public void setMinSizeRequested(boolean value) {
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkWindowAttr.java
index 6ea862a85e..e772a53a82 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GdkWindowAttr.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GdkWindowAttr {
/** @field cast=(gchar *) */
@@ -33,5 +32,5 @@ public class GdkWindowAttr {
/** @field cast=(gchar *) */
public long wmclass_class;
public boolean override_redirect;
- public static final int sizeof = GDK.GdkWindowAttr_sizeof();
+ public static final int sizeof = GTK3.GdkWindowAttr_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkTargetEntry.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GtkTargetEntry.java
index 8785cbae5a..811bbadf24 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkTargetEntry.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GtkTargetEntry.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -12,8 +12,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
+package org.eclipse.swt.internal.gtk3;
public class GtkTargetEntry {
/** @field cast=(gchar *) */
@@ -22,5 +21,5 @@ public class GtkTargetEntry {
public int flags;
/** @field cast=(guint) */
public int info;
- public static final int sizeof = GTK.GtkTargetEntry_sizeof();
+ public static final int sizeof = GTK3.GtkTargetEntry_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
new file mode 100644
index 0000000000..ecff340801
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
@@ -0,0 +1,563 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Syntevo and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Syntevo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk4;
+
+import org.eclipse.swt.internal.gtk.*;
+
+/**
+ * This class contains native functions that are present in GTK4 only.
+ */
+public class GTK4 {
+
+ public static final int GTK_POPOVER_MENU_NESTED = 1 << 0;
+
+ /**
+ * @param context cast=(GtkIMContext *)
+ * @param event cast=(GdkEvent *)
+ */
+ public static final native boolean gtk_im_context_filter_keypress(long context, long event);
+
+ /* GtkButton */
+ /** @param icon_name cast=(const gchar *) */
+ public static final native long gtk_button_new_from_icon_name(byte[] icon_name);
+ /**
+ * @param button cast=(GtkButton *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_button_set_child(long button, long child);
+
+ /* GtkColorChooser Interface */
+ /**
+ * @param r cast=(float *)
+ * @param g cast=(float *)
+ * @param b cast=(float *)
+ */
+ public static final native void gtk_hsv_to_rgb(float h, float s, float v, float[] r, float[] g, float[] b);
+ /**
+ * @param h cast=(float *)
+ * @param s cast=(float *)
+ * @param v cast=(float *)
+ */
+ public static final native void gtk_rgb_to_hsv(float r, float g, float b, float[] h, float[] s, float[] v);
+
+ /* GtkBox */
+ /**
+ * @param box cast=(GtkBox *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_box_append(long box, long child);
+ /**
+ * @param box cast=(GtkBox *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_box_prepend(long box, long child);
+ /**
+ * @param box cast=(GtkBox *)
+ * @param child cast=(GtkWidget *)
+ * @param sibling cast=(GtkWidget *)
+ */
+ public static final native void gtk_box_insert_child_after(long box, long child, long sibling);
+
+ /* GtkCalendar */
+ /** @param calendar cast=(GtkCalendar *) */
+ public static final native long gtk_calendar_get_date(long calendar);
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param date cast=(GDateTime *)
+ */
+ public static final native void gtk_calendar_select_day(long calendar, long date);
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param value cast=(gboolean)
+ */
+ public static final native void gtk_calendar_set_show_day_names(long calendar, boolean value);
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param value cast=(gboolean)
+ */
+ public static final native void gtk_calendar_set_show_heading(long calendar, boolean value);
+ /**
+ * @param calendar cast=(GtkCalendar *)
+ * @param value cast=(gboolean)
+ */
+ public static final native void gtk_calendar_set_show_week_numbers(long calendar, boolean value);
+
+ /* GtkCheckButton */
+ /** @param check_button cast=(GtkCheckButton *) */
+ public static final native void gtk_check_button_set_use_underline(long check_button, boolean use_underline);
+ /** @param check_button cast=(GtkCheckButton *) */
+ public static final native void gtk_check_button_set_inconsistent(long check_button, boolean inconsistent);
+ /**
+ * @param check_button cast=(GtkCheckButton *)
+ * @param group cast=(GtkCheckButton *)
+ */
+ public static final native void gtk_check_button_set_group(long check_button, long group);
+ /** @param check_button cast=(GtkCheckButton *) */
+ public static final native void gtk_check_button_set_active(long check_button, boolean setting);
+ /** @param check_button cast=(GtkCheckButton *) */
+ public static final native boolean gtk_check_button_get_active(long check_button);
+
+ /** @param editable cast=(GtkEditable *) */
+ public static final native long gtk_editable_get_text(long editable);
+ /** @param editable cast=(GtkEditable *) */
+ public static final native long gtk_editable_get_delegate(long editable);
+
+ /* GtkPicture */
+ public static final native long gtk_picture_new();
+ /**
+ * @param picture cast=(GtkPicture *)
+ * @param paintable cast=(GdkPaintable *)
+ */
+ public static final native void gtk_picture_set_paintable(long picture, long paintable);
+ /** @param picture cast=(GtkPicture *) */
+ public static final native void gtk_picture_set_can_shrink(long picture, boolean can_shrink);
+
+ /* GTK Initialization */
+ public static final native boolean gtk_init_check();
+
+ /* GdkToplevel */
+ /** @param toplevel cast=(GdkToplevel *) */
+ public static final native int gdk_toplevel_get_state(long toplevel);
+ /**
+ * @param toplevel cast=(GdkToplevel *)
+ * @param textures cast=(GList *)
+ */
+ public static final native void gdk_toplevel_set_icon_list(long toplevel, long textures);
+ /** @param toplevel cast=(GdkToplevel *) */
+ public static final native boolean gdk_toplevel_lower(long toplevel);
+ /** @param surface cast=(GdkToplevel *) */
+ public static final native void gdk_toplevel_focus(long surface, int timestamp);
+
+ /* GtkDragSource */
+ public static final native long gtk_drag_source_new();
+ /**
+ * @param source cast=(GtkDragSource *)
+ * @param actions cast=(GdkDragAction)
+ */
+ public static final native void gtk_drag_source_set_actions(long source, int actions);
+ /**
+ * @param source cast=(GtkDragSource *)
+ * @param paintable cast=(GdkPaintable *)
+ */
+ public static final native void gtk_drag_source_set_icon(long source, long paintable, int hot_x, int hot_y);
+
+ /* GtkDropTarget */
+ /**
+ * @param formats cast=(GdkContentFormats *)
+ * @param actions cast=(GdkDragAction)
+ */
+ public static final native long gtk_drop_target_async_new(long formats, int actions);
+ /**
+ * @param target cast=(GtkDropTargetAsync *)
+ * @param formats cast=(GdkContentFormats *)
+ */
+ public static final native void gtk_drop_target_async_set_formats(long target, long formats);
+
+ /* GdkContentFormats */
+ public static final native long gdk_content_formats_builder_new();
+ /**
+ * @param builder cast=(GdkContentFormatsBuilder *)
+ * @param mime_type cast=(const char *)
+ */
+ public static final native void gdk_content_formats_builder_add_mime_type(long builder, byte[] mime_type);
+ /** @param builder cast=(GdkContentFormatsBuilder *) */
+ public static final native long gdk_content_formats_builder_free_to_formats(long builder);
+
+ /* GtkFileChooser */
+ /** @param chooser cast=(GtkFileChooser *) */
+ public static final native long gtk_file_chooser_get_files(long chooser);
+ /** @param chooser cast=(GtkFileChooser *) */
+ public static final native long gtk_file_chooser_get_file(long chooser);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param file cast=(GFile *)
+ * @param error cast=(GError **)
+ */
+ public static final native boolean gtk_file_chooser_set_current_folder(long chooser, long file, long error);
+ /**
+ * @param chooser cast=(GtkFileChooser *)
+ * @param file cast=(GFile *)
+ * @param error cast=(GError **)
+ */
+ public static final native boolean gtk_file_chooser_set_file(long chooser, long file, long error);
+
+ /* GtkScrolledWindow */
+ public static final native long gtk_scrolled_window_new();
+ /** @param scrolled_window cast=(GtkScrolledWindow *) */
+ public static final native void gtk_scrolled_window_set_has_frame(long scrolled_window, boolean has_frame);
+ /** @param scrolled_window cast=(GtkScrolledWindow *) */
+ public static final native boolean gtk_scrolled_window_get_has_frame(long scrolled_window);
+ /**
+ * @param scrolled_window cast=(GtkScrolledWindow *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_scrolled_window_set_child(long scrolled_window, long child);
+
+ /* GtkWindow */
+ public static final native long gtk_window_new();
+ /** @param window cast=(GtkWindow *) */
+ public static final native void gtk_window_maximize(long window);
+ /** @param window cast=(GtkWindow *) */
+ public static final native void gtk_window_minimize(long window);
+ /** @param window cast=(GtkWindow *) */
+ public static final native void gtk_window_unminimize(long window);
+ /** @param window cast=(GtkWindow *) */
+ public static final native boolean gtk_window_is_maximized(long window);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param default_widget cast=(GtkWidget *)
+ */
+ public static final native void gtk_window_set_default_widget(long window, long default_widget);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_window_set_child(long window, long child);
+ /** @param window cast=(GtkWindow *) */
+ public static final native void gtk_window_destroy(long window);
+ /** @param window cast=(GtkWindow *) */
+ public static final native long gtk_window_get_icon_name(long window);
+ /**
+ * @param window cast=(GtkWindow *)
+ * @param name cast=(const char *)
+ * */
+ public static final native void gtk_window_set_icon_name(long window, long name);
+
+ /* GtkShortcutController */
+ public static final native long gtk_shortcut_controller_new();
+ /**
+ * @param controller cast=(GtkShortcutController *)
+ * @param scope cast=(GtkShortcutScope)
+ */
+ public static final native void gtk_shortcut_controller_set_scope(long controller, int scope);
+ /**
+ * @param controller cast=(GtkShortcutController *)
+ * @param shortcut cast=(GtkShortcut *)
+ */
+ public static final native void gtk_shortcut_controller_add_shortcut(long controller, long shortcut);
+ /**
+ * @param controller cast=(GtkShortcutController *)
+ * @param shortcut cast=(GtkShortcut *)
+ */
+ public static final native void gtk_shortcut_controller_remove_shortcut(long controller, long shortcut);
+
+ /* GtkShortcut */
+ /**
+ * @param trigger cast=(GtkShortcutTrigger *)
+ * @param action cast=(GtkShortcutAction *)
+ */
+ public static final native long gtk_shortcut_new(long trigger, long action);
+
+ /* GtkShortcutTrigger */
+ /**
+ * @param keyval cast=(guint)
+ * @param modifiers cast=(GdkModifierType)
+ */
+ public static final native long gtk_keyval_trigger_new(int keyval, int modifiers);
+
+ /* GtkShortcutAction */
+ /** @param name cast=(const char *) */
+ public static final native long gtk_named_action_new(byte[] name);
+
+ /* GtkIconPaintable */
+ /** @param paintable cast=(GtkIconPaintable *) */
+ public static final native long gtk_icon_paintable_get_file(long paintable);
+
+ /* GtkText */
+ /** @param self cast=(GtkText *) */
+ public static final native long gtk_text_get_buffer(long self);
+ /** @param self cast=(GtkText *) */
+ public static final native void gtk_text_set_visibility(long self, boolean visible);
+ /**
+ * @param self cast=(GtkText *)
+ * @param text cast=(const gchar *)
+ */
+ public static final native void gtk_text_set_placeholder_text(long self, byte[] text);
+ /**
+ * @param entry cast=(GtkText *)
+ * @param tabs cast=(PangoTabArray *)
+ */
+ public static final native void gtk_text_set_tabs(long entry, long tabs);
+
+ /* GtkPopoverMenu */
+ /**
+ * @param model cast=(GMenuModel *)
+ * @param flags cast=(GtkPopoverMenuFlags)
+ */
+ public static final native long gtk_popover_menu_new_from_model_full(long model, int flags);
+ /**
+ * @param popover cast=(GtkPopoverMenu *)
+ * @param model cast=(GMenuModel *)
+ */
+ public static final native void gtk_popover_menu_set_menu_model(long popover, long model);
+
+ /* GtkPopover */
+ /** @param popover cast=(GtkPopover *) */
+ public static final native void gtk_popover_set_has_arrow(long popover, boolean has_arrow);
+
+ /* GtkPopoverMenuBar */
+ /** @param model cast=(GMenuModel *) */
+ public static final native long gtk_popover_menu_bar_new_from_model(long model);
+
+ /* GtkIconTheme */
+ /** @param display cast=(GdkDisplay *) */
+ public static final native long gtk_icon_theme_get_for_display(long display);
+ /**
+ * @param self cast=(GtkIconTheme *)
+ * @param icon_name cast=(const char *)
+ * @param fallbacks cast=(const char **)
+ * @param direction cast=(GtkTextDirection)
+ * @param flags cast=(GtkIconLookupFlags)
+ */
+ public static final native long gtk_icon_theme_lookup_icon(long self, byte[] icon_name, long fallbacks, int size, int scale, int direction, int flags);
+ /**
+ * @param self cast=(GtkIconTheme *)
+ * @param icon cast=(GIcon *)
+ * @param direction cast=(GtkTextDirection)
+ * @param flags cast=(GtkIconLookupFlags)
+ */
+ public static final native long gtk_icon_theme_lookup_by_gicon(long self, long icon, int size, int scale, int direction, int flags);
+
+ /* GtkNative */
+ /** @param self cast=(GtkNative *) */
+ public static final native long gtk_native_get_surface(long self);
+
+ /* GtkEntry */
+ /**
+ * @param entry cast=(GtkEntry *)
+ * @param buffer cast=(GtkEntryBuffer *)
+ */
+ public static final native void gtk_entry_set_buffer(long entry, long buffer);
+ /** @param entry cast=(GtkEntry *) */
+ public static final native long gtk_entry_get_buffer(long entry);
+ /** @param entry cast=(GtkEntry *) */
+ public static final native int gtk_entry_get_text_length(long entry);
+
+ /* GtkExpander */
+ /**
+ * @param expander cast=(GtkExpander *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_expander_set_child(long expander, long child);
+
+ /* GtkEventController */
+ public static final native long gtk_event_controller_focus_new();
+ /** @param controller cast=(GtkEventController *) */
+ public static final native long gtk_event_controller_get_current_event(long controller);
+ /** @param controller cast=(GtkEventController *) */
+ public static final native int gtk_event_controller_get_current_event_state(long controller);
+ public static final native long gtk_event_controller_key_new();
+ public static final native long gtk_event_controller_motion_new();
+ /** @param flag cast=(GtkEventControllerScrollFlags) */
+ public static final native long gtk_event_controller_scroll_new(int flag);
+
+ /* GtkGestureClick */
+ public static final native long gtk_gesture_click_new();
+
+ /* GtkFrame */
+ /**
+ * @param frame cast=(GtkFrame *)
+ * @param child cast=(GtkWidget *)
+ */
+ public static final native void gtk_frame_set_child(long frame, long child);
+
+ /* GtkScrollbar */
+ /** @param scrollbar cast=(GtkScrollbar *) */
+ public static final native long gtk_scrollbar_get_adjustment(long scrollbar);
+
+ /* GtkWidget */
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param child cast=(GtkWidget *)
+ * @param snapshot cast=(GtkSnapshot *)
+ */
+ public static final native void gtk_widget_snapshot_child(long widget, long child, long snapshot);
+ /**
+ * @param src_widget cast=(GtkWidget *)
+ * @param dest_widget cast=(GtkWidget *)
+ * @param dest_x cast=(double *)
+ * @param dest_y cast=(double *)
+ */
+ public static final native boolean gtk_widget_translate_coordinates(long src_widget, long dest_widget, double src_x, double src_y, double[] dest_x, double[] dest_y);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param cursor cast=(GdkCursor *)
+ */
+ public static final native void gtk_widget_set_cursor(long widget, long cursor);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param orientation cast=(GtkOrientation)
+ * @param for_size cast=(int)
+ * @param minimum cast=(int *)
+ * @param natural cast=(int *)
+ * @param minimum_baseline cast=(int *)
+ * @param natural_baseline cast=(int *)
+ */
+ public static final native void gtk_widget_measure(long widget, int orientation, int for_size, int[] minimum, int[] natural, int[] minimum_baseline, int[] natural_baseline);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_native(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param name cast=(const char *)
+ * @param format_string cast=(const char *)
+ */
+ public static final native boolean gtk_widget_activate_action(long widget, byte[] name, byte[] format_string);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param action_name cast=(const char *)
+ */
+ public static final native void gtk_widget_action_set_enabled(long widget, byte[] action_name, boolean enabled);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param controller cast=(GtkEventController *)
+ */
+ public static final native void gtk_widget_add_controller(long widget, long controller);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_first_child(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_last_child(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_next_sibling(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_prev_sibling(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_root(long widget);
+ /**
+ * @param widget_class cast=(GtkWidgetClass *)
+ * @param mods cast=(GdkModifierType)
+ * @param signal cast=(const char *)
+ * @param format_string cast=(const char *)
+ */
+ public static final native void gtk_widget_class_add_binding_signal(long widget_class, int keyval, int mods, byte[] signal, byte[] format_string, boolean arg1, boolean arg2, boolean arg3);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_receives_default(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param focusable cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_focusable(long widget, boolean focusable);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_clipboard(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param allocation cast=(GtkAllocation *),flags=no_out
+ */
+ public static final native void gtk_widget_size_allocate(long widget, GtkAllocation allocation, int baseline);
+
+ /* GtkComboBox */
+ /** @param combo_box cast=(GtkComboBox *) */
+ public static final native long gtk_combo_box_get_child(long combo_box);
+
+ /* GtkSnapshot */
+ /**
+ * @param snapshot cast=(GtkSnapshot *)
+ * @param rect cast=(const graphene_rect_t *)
+ */
+ public static final native long gtk_snapshot_append_cairo(long snapshot, long rect);
+
+ /* GtkImage */
+ /**
+ * @param image cast=(GtkImage *)
+ * @param paintable cast=(GdkPaintable *)
+ */
+ public static final native void gtk_image_set_from_paintable(long image, long paintable);
+ /** @param icon_name cast=(const char *) */
+ public static final native long gtk_image_new_from_icon_name(byte[] icon_name);
+ /** @param image cast=(GtkImage *) */
+ public static final native void gtk_image_clear(long image);
+
+ /* GtkCssProvider */
+ /**
+ * @param css_provider cast=(GtkCssProvider *)
+ * @param data cast=(const gchar *)
+ * @param length cast=(gssize)
+ */
+ public static final native void gtk_css_provider_load_from_data(long css_provider, byte[] data, long length);
+
+ /* GtkLabel */
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap cast=(gboolean)
+ */
+ public static final native void gtk_label_set_wrap(long label, boolean wrap);
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap_mode cast=(PangoWrapMode)
+ */
+ public static final native void gtk_label_set_wrap_mode(long label, int wrap_mode);
+
+ /* GtkStyleContext */
+ /**
+ * @param display cast=(GdkDisplay *)
+ * @param provider cast=(GtkStyleProvider *)
+ * @param priority cast=(guint)
+ */
+ public static final native void gtk_style_context_add_provider_for_display(long display, long provider, int priority);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param color cast=(GdkRGBA *)
+ */
+ public static final native void gtk_style_context_get_color(long context, GdkRGBA color);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param padding cast=(GtkBorder *),flags=no_in
+ */
+ public static final native void gtk_style_context_get_padding(long context, GtkBorder padding);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param margin cast=(GtkBorder *),flags=no_in
+ */
+ public static final native void gtk_style_context_get_margin(long context, GtkBorder margin);
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param padding cast=(GtkBorder *),flags=no_in
+ */
+ public static final native void gtk_style_context_get_border(long context, GtkBorder padding);
+
+ /* GtkMenuButton */
+ /** @param menu_button cast=(GtkMenuButton *) */
+ public static final native void gtk_menu_button_set_use_underline(long menu_button, boolean use_underline);
+
+ /* GtkTreeViewColumn */
+ /**
+ * @param tree_column cast=(GtkTreeViewColumn *)
+ * @param x_offset cast=(int *)
+ * @param y_offset cast=(int *)
+ * @param width cast=(int *)
+ * @param height cast=(int *)
+ */
+ public static final native void gtk_tree_view_column_cell_get_size(long tree_column, int[] x_offset, int[] y_offset, int[] width, int[] height);
+
+ /* GdkToplevelSize */
+ /**
+ * @param size cast=(GdkToplevelSize*)
+ * @param bounds_width cast=(int *)
+ * @param bounds_height cast=(int *)
+ */
+ public static final native void gdk_toplevel_size_get_bounds(long size, int[] bounds_width, int[] bounds_height);
+ /**
+ * @param size cast=(GdkToplevelSize*)
+ * @param min_width cast=(int)
+ * @param min_height cast=(int)
+ */
+ public static final native void gdk_toplevel_size_set_min_size(long size, int min_width, int min_height);
+ /**
+ * @param size cast=(GdkToplevelSize*)
+ * @param width cast=(int)
+ * @param height cast=(int)
+ */
+ public static final native void gdk_toplevel_size_set_size(long size, int width, int height);
+
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat
index 7931672eeb..41e5f87770 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat
@@ -1,5 +1,5 @@
@rem ***************************************************************************
-@rem Copyright (c) 2000, 2018 IBM Corporation and others.
+@rem Copyright (c) 2000, 2021 IBM Corporation and others.
@rem
@rem This program and the accompanying materials
@rem are made available under the terms of the Eclipse Public License 2.0
@@ -19,70 +19,167 @@
echo
echo INFO Starting build of binaries. Detailed system setup instructions can be found in /Readme.Win32.md
-@rem builddir used for 32 bit building with webkit. Not needed on 64 bit builds.
+@rem SWT_BUILDDIR defaults to "W:" on the SWT Windows native build infrastructure machine.
IF "x.%SWT_BUILDDIR%"=="x." set "SWT_BUILDDIR=W:"
echo SWT build dir: %SWT_BUILDDIR%
-IF "x.%MSSDK%"=="x." set "MSSDK=%ProgramFiles(x86)%\Windows Kits\10"
-echo Microsoft Windows10 SDK dir: %MSSDK%
-IF "x.%WEBKIT_DIR%"=="x." set "WEBKIT_DIR=%SWT_BUILDDIR%\WebKit\r72896"
-echo Webkit dir: %WEBKIT_DIR%
-IF "x.%WEBKIT_SUPPORT_DIR%"=="x." set "WEBKIT_SUPPORT_DIR=%SWT_BUILDDIR%\WebKit\SupportLibrary"
-echo Webkit SupportLibrary dir: %WEBKIT_SUPPORT_DIR%
-
-
-IF "x.%MSVC_HOME%"=="x." set "MSVC_HOME=%SWT_BUILDDIR%\Microsoft\Visual Studio\2017\"
-IF NOT EXIST "%MSVC_HOME%" set "MSVC_HOME=%ProgramFiles(x86)%\Microsoft Visual Studio\2017"
-IF EXIST "%MSVC_HOME%" (
- echo "Microsoft Visual Studio 2017 dir: %MSVC_HOME%"
+
+@rem Specify VisualStudio Edition: 'Community', 'Enterprise', 'Professional' etc.
+IF "x.%MSVC_EDITION%"=="x." set "MSVC_EDITION=auto"
+
+@rem Specify VisualStudio Version: '2022', '2019', '2017' etc.
+IF "x.%MSVC_VERSION%"=="x." set "MSVC_VERSION=auto"
+
+@rem Search for a usable Visual Studio
+@rem ---------------------------------
+IF "%MSVC_HOME%"=="" CALL :ECHO "'MSVC_HOME' was not provided, auto-searching for Visual Studio..."
+@rem Bug 572308: Path used on older SWT build machines
+IF "%MSVC_HOME%"=="" CALL :FindVisualStudio "%SWT_BUILDDIR%\Microsoft\Visual Studio\$MSVC_VERSION$"
+@rem Bug 574007: Path used on Azure build machines
+IF "%MSVC_HOME%"=="" CALL :FindVisualStudio "%ProgramFiles(x86)%\Microsoft Visual Studio\$MSVC_VERSION$\BuildTools"
+@rem Bug 578519: Common installation paths; VisualStudio is installed in x64 ProgramFiles since VS2022
+IF "%MSVC_HOME%"=="" CALL :FindVisualStudio "%ProgramFiles%\Microsoft Visual Studio\$MSVC_VERSION$\$MSVC_EDITION$"
+@rem Bug 578519: Common installation paths; VisualStudio is installed in x86 ProgramFiles before VS2022
+IF "%MSVC_HOME%"=="" CALL :FindVisualStudio "%ProgramFiles(x86)%\Microsoft Visual Studio\$MSVC_VERSION$\$MSVC_EDITION$"
+@rem Report
+IF NOT EXIST "%MSVC_HOME%" (
+ CALL :ECHO "WARNING: Microsoft Visual Studio was not found (for edition=%MSVC_EDITION% version=%MSVC_VERSION%)"
+ CALL :ECHO " Refer steps for SWT Windows native setup: https://www.eclipse.org/swt/swt_win_native.php"
) ELSE (
- echo "WARNING: Microsoft Visual Studio 2017 was not found."
+ CALL :ECHO "MSVC_HOME: %MSVC_HOME%"
)
-IF "x.%1"=="x.x86" GOTO X86
-IF "x.%1"=="x.x86_64" GOTO X86_64
-
-:X86
-IF "x.%OUTPUT_DIR%"=="x." set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86
-IF "x.%SWT_JAVA_HOME%"=="x." set "SWT_JAVA_HOME=%SWT_BUILDDIR%\Java\Oracle\jdk1.8.0-latest\x86"
-IF "x.%SWT_JAVA_HOME%"=="x." (
- echo "WARNING: x86 Java JDK not found. Please set SWT_JAVA_HOME to your JDK directory."
+@rem Search for a usable JDK
+@rem -----------------------
+IF "%SWT_JAVA_HOME%"=="" CALL :ECHO "'SWT_JAVA_HOME' was not provided, auto-searching for JDK..."
+@rem Bug 572733: JDK path used on Azure build machines
+IF "%SWT_JAVA_HOME%"=="" CALL :TryToUseJdk "%ProgramFiles%\AdoptOpenJDK\jdk-8.0.292.10-hotspot"
+@rem Bug 526802: Probably some kind of legacy build machine path
+IF "%SWT_JAVA_HOME%"=="" CALL :TryToUseJdk "%SWT_BUILDDIR%\Java\Oracle\jdk1.8.0-latest\x64"
+@rem Search for generic JDKs so that user can build with little configuration
+@rem Note that first found JDK wins, so sort them by order of preference.
+IF "%SWT_JAVA_HOME%"=="" CALL :TryToUseJdk "%ProgramFiles%\Java\jdk*"
+IF "%SWT_JAVA_HOME%"=="" CALL :TryToUseJdk "%ProgramFiles%\AdoptOpenJDK\jdk*"
+@rem Report
+IF NOT EXIST "%SWT_JAVA_HOME%" (
+ CALL :ECHO "WARNING: x64 Java JDK not found. Please set SWT_JAVA_HOME to your JDK directory."
+ CALL :ECHO " Refer steps for SWT Windows native setup: https://www.eclipse.org/swt/swt_win_native.php"
) ELSE (
- echo "SWT_JAVA_HOME x86: %SWT_JAVA_HOME%"
+ CALL :ECHO "SWT_JAVA_HOME x64: %SWT_JAVA_HOME%"
+)
+
+@rem -----------------------
+IF NOT "x.%1"=="x.x86_64" (
+ CALL :ECHO "ERROR: 32-bit builds are no longer supported."
+ EXIT /B 1
)
-call "%MSVC_HOME%\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
-IF x.%1==x.x86 shift
-GOTO MAKE
-:X86_64
set PROCESSOR_ARCHITECTURE=AMD64
IF "x.%OUTPUT_DIR%"=="x." set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86_64
-IF "x.%SWT_JAVA_HOME%"=="x." (
- IF exist "%SWT_BUILDDIR%\Java\Oracle\jdk1.8.0-latest\x64" (
- set "SWT_JAVA_HOME=%SWT_BUILDDIR%\Java\Oracle\jdk1.8.0-latest\x64"
- ) ELSE (
- IF exist "C:\Program Files\Java\jdk*" (
- echo "Found Java in C:\Program Files\Java\jdk, automatically setting SWT_JAVA_HOME to latest java"
- for /d %%i in ("\Program Files\Java\jdk*") do set SWT_JAVA_HOME=%%i
- )
- )
-)
-IF "x.%SWT_JAVA_HOME%"=="x." (
- echo "WARNING: x64 Java JDK not found. Please set SWT_JAVA_HOME to your JDK directory."
-) ELSE (
- echo "SWT_JAVA_HOME x64: %SWT_JAVA_HOME%"
-)
-
set CFLAGS=-DJNI64
-call "%MSVC_HOME%\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
+call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x64
shift
-GOTO MAKE
-:MAKE
@rem if call to vcvarsall.bat (which sets up environment) silently fails, then provide advice to user.
WHERE cl
if %ERRORLEVEL% NEQ 0 (
- echo "WARNING: cl (Microsoft C compiler) not found on path. Please install Microsoft Visual Studio."
- echo " If already installed, try launching eclipse from the 'Developer Command Prompt for VS' "
+ CALL :ECHO "WARNING: cl (Microsoft C compiler) not found on path. Please install Microsoft Visual Studio."
+ CALL :ECHO " If already installed, try launching eclipse from the 'Developer Command Prompt for VS'"
+ CALL :ECHO " Refer steps for SWT Windows native setup: https://www.eclipse.org/swt/swt_win_native.php"
)
-nmake -f make_win32.mak %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file
+nmake -f make_win32.mak %1 %2 %3 %4 %5 %6 %7 %8 %9
+GOTO :EOF
+
+@rem Find Visual Studio
+@rem %1 = path template with '$MSVC_VERSION$' and '$MSVC_EDITION$' tokens
+:FindVisualStudio
+ @rem Early return if already found
+ IF NOT "%MSVC_HOME%"=="" GOTO :EOF
+
+ IF "%MSVC_VERSION%"=="auto" (
+ CALL :FindVisualStudio2 "%~1" "2022"
+ CALL :FindVisualStudio2 "%~1" "2019"
+ CALL :FindVisualStudio2 "%~1" "2017"
+ ) ELSE (
+ CALL :FindVisualStudio2 "%~1" "%MSVC_VERSION%"
+ )
+GOTO :EOF
+
+@rem Find Visual Studio
+@rem %1 = path template with '$MSVC_VERSION$' and '$MSVC_EDITION$' tokens
+@rem %2 = value for '$MSVC_VERSION$'
+:FindVisualStudio2
+ @rem Early return if already found
+ IF NOT "%MSVC_HOME%"=="" GOTO :EOF
+
+ IF "%MSVC_EDITION%"=="auto" (
+ CALL :FindVisualStudio3 "%~1" "%~2" "Community"
+ CALL :FindVisualStudio3 "%~1" "%~2" "Enterprise"
+ CALL :FindVisualStudio3 "%~1" "%~2" "Professional"
+ ) ELSE (
+ CALL :FindVisualStudio3 "%~1" "%~2" "%MSVC_EDITION%"
+ )
+GOTO :EOF
+
+@rem Find Visual Studio
+@rem %1 = path template with '$MSVC_VERSION$' and '$MSVC_EDITION$' tokens
+@rem %2 = value for '$MSVC_VERSION$'
+@rem %3 = value for '$MSVC_EDITION$'
+:FindVisualStudio3
+ @rem Early return if already found
+ IF NOT "%MSVC_HOME%"=="" GOTO :EOF
+
+ SET "TESTED_VS_PATH=%~1"
+ @rem Substitute '$MSVC_VERSION$' and '$MSVC_EDITION$'
+ CALL SET "TESTED_VS_PATH=%%TESTED_VS_PATH:$MSVC_VERSION$=%~2%%"
+ CALL SET "TESTED_VS_PATH=%%TESTED_VS_PATH:$MSVC_EDITION$=%~3%%"
+
+ @rem If the folder isn't there, then skip it without printing errors
+ IF NOT EXIST "%TESTED_VS_PATH%" GOTO :EOF
+
+ @rem Try this path
+ CALL :TryToUseVisualStudio "%TESTED_VS_PATH%"
+GOTO :EOF
+
+@rem Test Visual Studio and set '%MSVC_HOME%' on success
+@rem %1 = tested path
+:TryToUseVisualStudio
+ SET "TESTED_VS_PATH=%~1"
+ IF NOT EXIST "%TESTED_VS_PATH%\VC\Auxiliary\Build\vcvarsall.bat" (
+ CALL :ECHO "-- VisualStudio '%TESTED_VS_PATH%' is bad: 'vcvarsall.bat' not found"
+ GOTO :EOF
+ )
+ CALL :ECHO "-- VisualStudio '%TESTED_VS_PATH%' looks good, selecting it"
+ SET "MSVC_HOME=%TESTED_VS_PATH%"
+GOTO :EOF
+
+:TryToUseJdk
+ SET "TESTED_JDK_PATH_MASK=%~1"
+ @rem Loop over all directories matching mask.
+ @rem Note that directories are iterated in alphabetical order and *last* hit will
+ @rem be selected in hopes to select the highest available JDK version.
+ FOR /D %%I IN ("%TESTED_JDK_PATH_MASK%") DO (
+ IF NOT EXIST "%%~I" (
+ CALL :ECHO "-- JDK '%%~I' doesn't exist on disk"
+ GOTO :EOF
+ )
+ IF NOT EXIST "%%~I\include\jni.h" (
+ CALL :ECHO "-- JDK '%%~I' is bad: no jni.h"
+ GOTO :EOF
+ )
+ CALL :ECHO "-- JDK '%%~I' looks good, selecting it"
+ SET "SWT_JAVA_HOME=%%~I"
+ )
+GOTO :EOF
+
+@rem Regular ECHO has trouble with special characters such as ().
+@rem At the same time, if its argument is quoted, the quotes are printed literally.
+@rem The workaround is to escape all special characters with ^
+:ECHO
+SET "ECHO_STRING=%~1"
+SET "ECHO_STRING=%ECHO_STRING:<=^<%"
+SET "ECHO_STRING=%ECHO_STRING:>=^>%"
+SET "ECHO_STRING=%ECHO_STRING:(=^(%"
+SET "ECHO_STRING=%ECHO_STRING:)=^)%"
+ECHO %ECHO_STRING%
+GOTO :EOF
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/cancel.ico b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/cancel.ico
new file mode 100644
index 0000000000..d113216165
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/cancel.ico
Binary files differ
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c
index 114489f28b..a6caa6962a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -23,57 +23,6 @@
#define COM_NATIVE(func) Java_org_eclipse_swt_internal_ole_win32_COM_##func
#endif
-#ifndef NO_AccessibleChildren
-JNIEXPORT jint JNICALL COM_NATIVE(AccessibleChildren)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintLong arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, AccessibleChildren_FUNC);
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
-/*
- rc = (jint)AccessibleChildren((IAccessible *)arg0, (LONG)arg1, (LONG)arg2, (VARIANT *)arg3, (LONG *)lparg4);
-*/
- {
- COM_LOAD_FUNCTION(fp, AccessibleChildren)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(IAccessible *, LONG, LONG, VARIANT *, LONG *))fp)((IAccessible *)arg0, (LONG)arg1, (LONG)arg2, (VARIANT *)arg3, (LONG *)lparg4);
- }
- }
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- COM_NATIVE_EXIT(env, that, AccessibleChildren_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_AccessibleObjectFromWindow
-JNIEXPORT jint JNICALL COM_NATIVE(AccessibleObjectFromWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2, jintLongArray arg3)
-{
- GUID _arg2, *lparg2=NULL;
- jintLong *lparg3=NULL;
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, AccessibleObjectFromWindow_FUNC);
- if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
-/*
- rc = (jint)AccessibleObjectFromWindow((HWND)arg0, (DWORD)arg1, lparg2, (LPVOID *)lparg3);
-*/
- {
- COM_LOAD_FUNCTION(fp, AccessibleObjectFromWindow)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(HWND, DWORD, GUID *, LPVOID *))fp)((HWND)arg0, (DWORD)arg1, lparg2, (LPVOID *)lparg3);
- }
- }
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
- COM_NATIVE_EXIT(env, that, AccessibleObjectFromWindow_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CAUUID_1sizeof
JNIEXPORT jint JNICALL COM_NATIVE(CAUUID_1sizeof)
(JNIEnv *env, jclass that)
@@ -95,11 +44,11 @@ JNIEXPORT jint JNICALL COM_NATIVE(CLSIDFromProgID)
jint rc = 0;
COM_NATIVE_ENTER(env, that, CLSIDFromProgID_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
rc = (jint)CLSIDFromProgID((LPCOLESTR)lparg0, lparg1);
fail:
if (arg1 && lparg1) setGUIDFields(env, arg1, lparg1);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
COM_NATIVE_EXIT(env, that, CLSIDFromProgID_FUNC);
return rc;
}
@@ -114,11 +63,11 @@ JNIEXPORT jint JNICALL COM_NATIVE(CLSIDFromString)
jint rc = 0;
COM_NATIVE_ENTER(env, that, CLSIDFromString_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
rc = (jint)CLSIDFromString((LPOLESTR)lparg0, lparg1);
fail:
if (arg1 && lparg1) setGUIDFields(env, arg1, lparg1);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
COM_NATIVE_EXIT(env, that, CLSIDFromString_FUNC);
return rc;
}
@@ -136,35 +85,21 @@ JNIEXPORT jint JNICALL COM_NATIVE(CONTROLINFO_1sizeof)
}
#endif
-#ifndef NO_COSERVERINFO_1sizeof
-JNIEXPORT jint JNICALL COM_NATIVE(COSERVERINFO_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, COSERVERINFO_1sizeof_FUNC);
- rc = (jint)COSERVERINFO_sizeof();
- COM_NATIVE_EXIT(env, that, COSERVERINFO_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CoCreateInstance
JNIEXPORT jint JNICALL COM_NATIVE(CoCreateInstance)
- (JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2, jobject arg3, jintLongArray arg4)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2, jobject arg3, jlongArray arg4)
{
GUID _arg0, *lparg0=NULL;
GUID _arg3, *lparg3=NULL;
- jintLong *lparg4=NULL;
+ jlong *lparg4=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, CoCreateInstance_FUNC);
if (arg0) if ((lparg0 = getGUIDFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
rc = (jint)CoCreateInstance(lparg0, (LPUNKNOWN)arg1, arg2, lparg3, (LPVOID *)lparg4);
fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
+ if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
COM_NATIVE_EXIT(env, that, CoCreateInstance_FUNC);
return rc;
}
@@ -182,21 +117,19 @@ JNIEXPORT void JNICALL COM_NATIVE(CoFreeUnusedLibraries)
#ifndef NO_CoGetClassObject
JNIEXPORT jint JNICALL COM_NATIVE(CoGetClassObject)
- (JNIEnv *env, jclass that, jobject arg0, jint arg1, jintLong arg2, jobject arg3, jintLongArray arg4)
+ (JNIEnv *env, jclass that, jobject arg0, jint arg1, jlong arg2, jobject arg3, jlongArray arg4)
{
GUID _arg0, *lparg0=NULL;
GUID _arg3, *lparg3=NULL;
- jintLong *lparg4=NULL;
+ jlong *lparg4=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, CoGetClassObject_FUNC);
if (arg0) if ((lparg0 = getGUIDFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
rc = (jint)CoGetClassObject(lparg0, arg1, (COSERVERINFO *)arg2, lparg3, (LPVOID *)lparg4);
fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
+ if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
COM_NATIVE_EXIT(env, that, CoGetClassObject_FUNC);
return rc;
}
@@ -204,7 +137,7 @@ fail:
#ifndef NO_CoLockObjectExternal
JNIEXPORT jint JNICALL COM_NATIVE(CoLockObjectExternal)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1, jboolean arg2)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, CoLockObjectExternal_FUNC);
@@ -214,60 +147,66 @@ JNIEXPORT jint JNICALL COM_NATIVE(CoLockObjectExternal)
}
#endif
-#ifndef NO_CreateStdAccessibleObject
-JNIEXPORT jint JNICALL COM_NATIVE(CreateStdAccessibleObject)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2, jintLongArray arg3)
+#ifndef NO_CreateCoreWebView2EnvironmentWithOptions
+JNIEXPORT jint JNICALL COM_NATIVE(CreateCoreWebView2EnvironmentWithOptions)
+ (JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1, jlong arg2, jlong arg3)
{
- GUID _arg2, *lparg2=NULL;
- jintLong *lparg3=NULL;
+ jchar *lparg0=NULL;
+ jchar *lparg1=NULL;
jint rc = 0;
- COM_NATIVE_ENTER(env, that, CreateStdAccessibleObject_FUNC);
- if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ COM_NATIVE_ENTER(env, that, CreateCoreWebView2EnvironmentWithOptions_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- rc = (jint)CreateStdAccessibleObject((HWND)arg0, arg1, lparg2, (LPVOID *)lparg3);
+ rc = (jint)CreateCoreWebView2EnvironmentWithOptions(lparg0, lparg1, arg2, arg3);
*/
{
- COM_LOAD_FUNCTION(fp, CreateStdAccessibleObject)
+ COM_LOAD_FUNCTION(fp, CreateCoreWebView2EnvironmentWithOptions)
if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(HWND, jint, GUID *, LPVOID *))fp)((HWND)arg0, arg1, lparg2, (LPVOID *)lparg3);
+ rc = (jint)((jint (CALLING_CONVENTION*)(jchar *, jchar *, jlong, jlong))fp)(lparg0, lparg1, arg2, arg3);
}
}
fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
- COM_NATIVE_EXIT(env, that, CreateStdAccessibleObject_FUNC);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
+ COM_NATIVE_EXIT(env, that, CreateCoreWebView2EnvironmentWithOptions_FUNC);
return rc;
}
#endif
-#ifndef NO_DISPPARAMS_1sizeof
-JNIEXPORT jint JNICALL COM_NATIVE(DISPPARAMS_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_CreateStdAccessibleObject
+JNIEXPORT jint JNICALL COM_NATIVE(CreateStdAccessibleObject)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2, jlongArray arg3)
{
+ GUID _arg2, *lparg2=NULL;
+ jlong *lparg3=NULL;
jint rc = 0;
- COM_NATIVE_ENTER(env, that, DISPPARAMS_1sizeof_FUNC);
- rc = (jint)DISPPARAMS_sizeof();
- COM_NATIVE_EXIT(env, that, DISPPARAMS_1sizeof_FUNC);
+ COM_NATIVE_ENTER(env, that, CreateStdAccessibleObject_FUNC);
+ if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)CreateStdAccessibleObject((HWND)arg0, arg1, lparg2, (LPVOID *)lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ COM_NATIVE_EXIT(env, that, CreateStdAccessibleObject_FUNC);
return rc;
}
#endif
-#ifndef NO_DVTARGETDEVICE_1sizeof
-JNIEXPORT jint JNICALL COM_NATIVE(DVTARGETDEVICE_1sizeof)
+#ifndef NO_DISPPARAMS_1sizeof
+JNIEXPORT jint JNICALL COM_NATIVE(DISPPARAMS_1sizeof)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- COM_NATIVE_ENTER(env, that, DVTARGETDEVICE_1sizeof_FUNC);
- rc = (jint)DVTARGETDEVICE_sizeof();
- COM_NATIVE_EXIT(env, that, DVTARGETDEVICE_1sizeof_FUNC);
+ COM_NATIVE_ENTER(env, that, DISPPARAMS_1sizeof_FUNC);
+ rc = (jint)DISPPARAMS_sizeof();
+ COM_NATIVE_EXIT(env, that, DISPPARAMS_1sizeof_FUNC);
return rc;
}
#endif
#ifndef NO_DoDragDrop
JNIEXPORT jint JNICALL COM_NATIVE(DoDragDrop)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
jint rc = 0;
@@ -350,11 +289,11 @@ JNIEXPORT jint JNICALL COM_NATIVE(GetClassFile)
jint rc = 0;
COM_NATIVE_ENTER(env, that, GetClassFile_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
rc = (jint)GetClassFile((LPCWSTR)lparg0, lparg1);
fail:
if (arg1 && lparg1) setGUIDFields(env, arg1, lparg1);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
COM_NATIVE_EXIT(env, that, GetClassFile_FUNC);
return rc;
}
@@ -369,11 +308,11 @@ JNIEXPORT jint JNICALL COM_NATIVE(IIDFromString)
jint rc = 0;
COM_NATIVE_ENTER(env, that, IIDFromString_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
rc = (jint)IIDFromString((LPOLESTR)lparg0, lparg1);
fail:
if (arg1 && lparg1) setGUIDFields(env, arg1, lparg1);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
COM_NATIVE_EXIT(env, that, IIDFromString_FUNC);
return rc;
}
@@ -391,8 +330,6 @@ JNIEXPORT jboolean JNICALL COM_NATIVE(IsEqualGUID)
if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)IsEqualGUID(lparg0, lparg1);
fail:
- if (arg1 && lparg1) setGUIDFields(env, arg1, lparg1);
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
COM_NATIVE_EXIT(env, that, IsEqualGUID_FUNC);
return rc;
}
@@ -411,396 +348,182 @@ JNIEXPORT jint JNICALL COM_NATIVE(LICINFO_1sizeof)
#endif
#ifndef NO_LresultFromObject
-JNIEXPORT jintLong JNICALL COM_NATIVE(LresultFromObject)
- (JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+JNIEXPORT jlong JNICALL COM_NATIVE(LresultFromObject)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jlong arg2)
{
GUID _arg0, *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
COM_NATIVE_ENTER(env, that, LresultFromObject_FUNC);
if (arg0) if ((lparg0 = getGUIDFields(env, arg0, &_arg0)) == NULL) goto fail;
-/*
- rc = (jintLong)LresultFromObject(lparg0, arg1, (LPUNKNOWN)arg2);
-*/
- {
- COM_LOAD_FUNCTION(fp, LresultFromObject)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GUID *, jintLong, LPUNKNOWN))fp)(lparg0, arg1, (LPUNKNOWN)arg2);
- }
- }
+ rc = (jlong)LresultFromObject(lparg0, arg1, (LPUNKNOWN)arg2);
fail:
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
COM_NATIVE_EXIT(env, that, LresultFromObject_FUNC);
return rc;
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
FORMATETC _arg1, *lparg1=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getFORMATETCFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_GUID_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_GUID_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
-{
- GUID _arg1, *lparg1=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_GUID_2I_FUNC);
-#endif
- if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
- MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
-fail:
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_GUID_2I_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
OLEINPLACEFRAMEINFO _arg1, *lparg1=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getOLEINPLACEFRAMEINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STATSTG_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STATSTG_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
-{
- STATSTG _arg1, *lparg1=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STATSTG_2I_FUNC);
-#endif
- if (arg1) if ((lparg1 = getSTATSTGFields(env, arg1, &_arg1)) == NULL) goto fail;
- MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
-fail:
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STATSTG_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
STGMEDIUM _arg1, *lparg1=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getSTGMEDIUMFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
DISPPARAMS _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setDISPPARAMSFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
FORMATETC _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setFORMATETCFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
FUNCDESC _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setFUNCDESCFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
GUID _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
-{
- STATSTG _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2JI_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setSTATSTGFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
STGMEDIUM _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setSTGMEDIUMFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
TYPEATTR _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setTYPEATTRFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
VARDESC _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setVARDESCFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
VARIANT _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setVARIANTFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI
+JNIEXPORT void JNICALL COM_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
RECT _arg0, *lparg0=NULL;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II_FUNC);
-#else
COM_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setRECTFields(env, arg0, lparg0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II_FUNC);
-#else
COM_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI_FUNC);
-#endif
}
#endif
@@ -830,24 +553,21 @@ JNIEXPORT jint JNICALL COM_NATIVE(OLEINPLACEFRAMEINFO_1sizeof)
#ifndef NO_OleCreate
JNIEXPORT jint JNICALL COM_NATIVE(OleCreate)
- (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jobject arg3, jintLong arg4, jintLong arg5, jintLongArray arg6)
+ (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jobject arg3, jlong arg4, jlong arg5, jlongArray arg6)
{
GUID _arg0, *lparg0=NULL;
GUID _arg1, *lparg1=NULL;
FORMATETC _arg3, *lparg3=NULL;
- jintLong *lparg6=NULL;
+ jlong *lparg6=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleCreate_FUNC);
if (arg0) if ((lparg0 = getGUIDFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg3) if ((lparg3 = getFORMATETCFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetIntLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
+ if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
rc = (jint)OleCreate(lparg0, lparg1, arg2, lparg3, (IOleClientSite *)arg4, (IStorage *)arg5, (void **)lparg6);
fail:
- if (arg6 && lparg6) (*env)->ReleaseIntLongArrayElements(env, arg6, lparg6, 0);
- if (arg3 && lparg3) setFORMATETCFields(env, arg3, lparg3);
- if (arg1 && lparg1) setGUIDFields(env, arg1, lparg1);
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
+ if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
COM_NATIVE_EXIT(env, that, OleCreate_FUNC);
return rc;
}
@@ -855,27 +575,24 @@ fail:
#ifndef NO_OleCreateFromFile
JNIEXPORT jint JNICALL COM_NATIVE(OleCreateFromFile)
- (JNIEnv *env, jclass that, jobject arg0, jcharArray arg1, jobject arg2, jint arg3, jobject arg4, jintLong arg5, jintLong arg6, jintLongArray arg7)
+ (JNIEnv *env, jclass that, jobject arg0, jcharArray arg1, jobject arg2, jint arg3, jobject arg4, jlong arg5, jlong arg6, jlongArray arg7)
{
GUID _arg0, *lparg0=NULL;
jchar *lparg1=NULL;
GUID _arg2, *lparg2=NULL;
FORMATETC _arg4, *lparg4=NULL;
- jintLong *lparg7=NULL;
+ jlong *lparg7=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleCreateFromFile_FUNC);
if (arg0) if ((lparg0 = getGUIDFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg4) if ((lparg4 = getFORMATETCFields(env, arg4, &_arg4)) == NULL) goto fail;
- if (arg7) if ((lparg7 = (*env)->GetIntLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
+ if (arg7) if ((lparg7 = (*env)->GetLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
rc = (jint)OleCreateFromFile(lparg0, (LPCOLESTR)lparg1, lparg2, arg3, lparg4, (LPOLECLIENTSITE)arg5, (LPSTORAGE)arg6, (LPVOID *)lparg7);
fail:
- if (arg7 && lparg7) (*env)->ReleaseIntLongArrayElements(env, arg7, lparg7, 0);
- if (arg4 && lparg4) setFORMATETCFields(env, arg4, lparg4);
- if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
+ if (arg7 && lparg7) (*env)->ReleaseLongArrayElements(env, arg7, lparg7, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
COM_NATIVE_EXIT(env, that, OleCreateFromFile_FUNC);
return rc;
}
@@ -883,18 +600,18 @@ fail:
#ifndef NO_OleCreatePropertyFrame
JNIEXPORT jint JNICALL COM_NATIVE(OleCreatePropertyFrame)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jcharArray arg3, jint arg4, jintLongArray arg5, jint arg6, jintLong arg7, jint arg8, jint arg9, jintLong arg10)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jcharArray arg3, jint arg4, jlongArray arg5, jint arg6, jlong arg7, jint arg8, jint arg9, jlong arg10)
{
jchar *lparg3=NULL;
- jintLong *lparg5=NULL;
+ jlong *lparg5=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleCreatePropertyFrame_FUNC);
if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
rc = (jint)OleCreatePropertyFrame((HWND)arg0, arg1, arg2, (LPCOLESTR)lparg3, arg4, (LPUNKNOWN FAR*)lparg5, arg6, (LPCLSID)arg7, (LCID)arg8, arg9, (LPVOID)arg10);
fail:
- if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
- if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
+ if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, JNI_ABORT);
COM_NATIVE_EXIT(env, that, OleCreatePropertyFrame_FUNC);
return rc;
}
@@ -902,7 +619,7 @@ fail:
#ifndef NO_OleDraw
JNIEXPORT jint JNICALL COM_NATIVE(OleDraw)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleDraw_FUNC);
@@ -926,15 +643,15 @@ JNIEXPORT jint JNICALL COM_NATIVE(OleFlushClipboard)
#ifndef NO_OleGetClipboard
JNIEXPORT jint JNICALL COM_NATIVE(OleGetClipboard)
- (JNIEnv *env, jclass that, jintLongArray arg0)
+ (JNIEnv *env, jclass that, jlongArray arg0)
{
- jintLong *lparg0=NULL;
+ jlong *lparg0=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleGetClipboard_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg0) if ((lparg0 = (*env)->GetLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)OleGetClipboard((IDataObject **)lparg0);
fail:
- if (arg0 && lparg0) (*env)->ReleaseIntLongArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseLongArrayElements(env, arg0, lparg0, 0);
COM_NATIVE_EXIT(env, that, OleGetClipboard_FUNC);
return rc;
}
@@ -942,7 +659,7 @@ fail:
#ifndef NO_OleIsCurrentClipboard
JNIEXPORT jint JNICALL COM_NATIVE(OleIsCurrentClipboard)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleIsCurrentClipboard_FUNC);
@@ -954,7 +671,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(OleIsCurrentClipboard)
#ifndef NO_OleIsRunning
JNIEXPORT jboolean JNICALL COM_NATIVE(OleIsRunning)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
COM_NATIVE_ENTER(env, that, OleIsRunning_FUNC);
@@ -964,28 +681,9 @@ JNIEXPORT jboolean JNICALL COM_NATIVE(OleIsRunning)
}
#endif
-#ifndef NO_OleLoad
-JNIEXPORT jint JNICALL COM_NATIVE(OleLoad)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2, jintLongArray arg3)
-{
- GUID _arg1, *lparg1=NULL;
- jintLong *lparg3=NULL;
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, OleLoad_FUNC);
- if (arg1) if ((lparg1 = getGUIDFields(env, arg1, &_arg1)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)OleLoad((IStorage *)arg0, lparg1, (IOleClientSite *)arg2, (LPVOID *)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) setGUIDFields(env, arg1, lparg1);
- COM_NATIVE_EXIT(env, that, OleLoad_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_OleRun
JNIEXPORT jint JNICALL COM_NATIVE(OleRun)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleRun_FUNC);
@@ -997,7 +695,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(OleRun)
#ifndef NO_OleSave
JNIEXPORT jint JNICALL COM_NATIVE(OleSave)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleSave_FUNC);
@@ -1009,7 +707,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(OleSave)
#ifndef NO_OleSetClipboard
JNIEXPORT jint JNICALL COM_NATIVE(OleSetClipboard)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleSetClipboard_FUNC);
@@ -1021,7 +719,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(OleSetClipboard)
#ifndef NO_OleSetContainedObject
JNIEXPORT jint JNICALL COM_NATIVE(OleSetContainedObject)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, OleSetContainedObject_FUNC);
@@ -1033,19 +731,19 @@ JNIEXPORT jint JNICALL COM_NATIVE(OleSetContainedObject)
#ifndef NO_OleSetMenuDescriptor
JNIEXPORT jint JNICALL COM_NATIVE(OleSetMenuDescriptor)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
jint rc = 0;
- COM_NATIVE_ENTER_TRY(env, that, OleSetMenuDescriptor_FUNC);
+ COM_NATIVE_ENTER(env, that, OleSetMenuDescriptor_FUNC);
rc = (jint)OleSetMenuDescriptor((HOLEMENU)arg0, (HWND)arg1, (HWND)arg2, (LPOLEINPLACEFRAME)arg3, (LPOLEINPLACEACTIVEOBJECT)arg4);
- COM_NATIVE_EXIT_CATCH(env, that, OleSetMenuDescriptor_FUNC);
+ COM_NATIVE_EXIT(env, that, OleSetMenuDescriptor_FUNC);
return rc;
}
#endif
#ifndef NO_OleTranslateColor
JNIEXPORT jint JNICALL COM_NATIVE(OleTranslateColor)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jintArray arg2)
{
jint *lparg2=NULL;
jint rc = 0;
@@ -1059,20 +757,38 @@ fail:
}
#endif
+#ifndef NO_PathToPIDL
+JNIEXPORT jint JNICALL COM_NATIVE(PathToPIDL)
+ (JNIEnv *env, jclass that, jcharArray arg0, jlongArray arg1)
+{
+ jchar *lparg0=NULL;
+ jlong *lparg1=NULL;
+ jint rc = 0;
+ COM_NATIVE_ENTER(env, that, PathToPIDL_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ rc = (jint)PathToPIDL((PCWSTR)lparg0, (PIDLIST_ABSOLUTE *)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ COM_NATIVE_EXIT(env, that, PathToPIDL_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_ProgIDFromCLSID
JNIEXPORT jint JNICALL COM_NATIVE(ProgIDFromCLSID)
- (JNIEnv *env, jclass that, jobject arg0, jintLongArray arg1)
+ (JNIEnv *env, jclass that, jobject arg0, jlongArray arg1)
{
GUID _arg0, *lparg0=NULL;
- jintLong *lparg1=NULL;
+ jlong *lparg1=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, ProgIDFromCLSID_FUNC);
if (arg0) if ((lparg0 = getGUIDFields(env, arg0, &_arg0)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)ProgIDFromCLSID(lparg0, (LPOLESTR *)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
COM_NATIVE_EXIT(env, that, ProgIDFromCLSID_FUNC);
return rc;
}
@@ -1080,7 +796,7 @@ fail:
#ifndef NO_RegisterDragDrop
JNIEXPORT jint JNICALL COM_NATIVE(RegisterDragDrop)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, RegisterDragDrop_FUNC);
@@ -1092,7 +808,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(RegisterDragDrop)
#ifndef NO_ReleaseStgMedium
JNIEXPORT void JNICALL COM_NATIVE(ReleaseStgMedium)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
COM_NATIVE_ENTER(env, that, ReleaseStgMedium_FUNC);
ReleaseStgMedium((STGMEDIUM *)arg0);
@@ -1102,7 +818,7 @@ JNIEXPORT void JNICALL COM_NATIVE(ReleaseStgMedium)
#ifndef NO_RevokeDragDrop
JNIEXPORT jint JNICALL COM_NATIVE(RevokeDragDrop)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, RevokeDragDrop_FUNC);
@@ -1112,30 +828,39 @@ JNIEXPORT jint JNICALL COM_NATIVE(RevokeDragDrop)
}
#endif
-#ifndef NO_SHDoDragDrop
-JNIEXPORT jint JNICALL COM_NATIVE(SHDoDragDrop)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jintArray arg4)
+#ifndef NO_SHCreateItemFromParsingName
+JNIEXPORT jint JNICALL COM_NATIVE(SHCreateItemFromParsingName)
+ (JNIEnv *env, jclass that, jcharArray arg0, jlong arg1, jobject arg2, jlongArray arg3)
{
- jint *lparg4=NULL;
+ jchar *lparg0=NULL;
+ GUID _arg2, *lparg2=NULL;
+ jlong *lparg3=NULL;
jint rc = 0;
- COM_NATIVE_ENTER(env, that, SHDoDragDrop_FUNC);
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)SHDoDragDrop((HWND)arg0, (IDataObject *)arg1, (IDropSource *)arg2, arg3, (DWORD *)lparg4);
+ COM_NATIVE_ENTER(env, that, SHCreateItemFromParsingName_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)SHCreateItemFromParsingName((PCWSTR)lparg0, (IBindCtx *)arg1, lparg2, (void **)lparg3);
fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- COM_NATIVE_EXIT(env, that, SHDoDragDrop_FUNC);
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
+ COM_NATIVE_EXIT(env, that, SHCreateItemFromParsingName_FUNC);
return rc;
}
#endif
-#ifndef NO_STATSTG_1sizeof
-JNIEXPORT jint JNICALL COM_NATIVE(STATSTG_1sizeof)
- (JNIEnv *env, jclass that)
+#ifndef NO_SHCreateMemStream
+JNIEXPORT jlong JNICALL COM_NATIVE(SHCreateMemStream)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, STATSTG_1sizeof_FUNC);
- rc = (jint)STATSTG_sizeof();
- COM_NATIVE_EXIT(env, that, STATSTG_1sizeof_FUNC);
+ jbyte *lparg0=NULL;
+ jlong rc = 0;
+ COM_NATIVE_ENTER(env, that, SHCreateMemStream_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)SHCreateMemStream((BYTE *)lparg0, arg1);
+fail:
+ if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
+ COM_NATIVE_EXIT(env, that, SHCreateMemStream_FUNC);
return rc;
}
#endif
@@ -1154,18 +879,18 @@ JNIEXPORT jint JNICALL COM_NATIVE(STGMEDIUM_1sizeof)
#ifndef NO_StgCreateDocfile
JNIEXPORT jint JNICALL COM_NATIVE(StgCreateDocfile)
- (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jint arg2, jintLongArray arg3)
+ (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jint arg2, jlongArray arg3)
{
jchar *lparg0=NULL;
- jintLong *lparg3=NULL;
+ jlong *lparg3=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, StgCreateDocfile_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)StgCreateDocfile(lparg0, arg1, arg2, (IStorage **)lparg3);
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)StgCreateDocfile((const WCHAR *)lparg0, arg1, arg2, (IStorage **)lparg3);
fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
COM_NATIVE_EXIT(env, that, StgCreateDocfile_FUNC);
return rc;
}
@@ -1181,7 +906,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(StgIsStorageFile)
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)StgIsStorageFile((const WCHAR *)lparg0);
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
COM_NATIVE_EXIT(env, that, StgIsStorageFile_FUNC);
return rc;
}
@@ -1189,61 +914,58 @@ fail:
#ifndef NO_StgOpenStorage
JNIEXPORT jint JNICALL COM_NATIVE(StgOpenStorage)
- (JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4, jintLongArray arg5)
+ (JNIEnv *env, jclass that, jcharArray arg0, jlong arg1, jint arg2, jlong arg3, jint arg4, jlongArray arg5)
{
jchar *lparg0=NULL;
- jintLong *lparg5=NULL;
+ jlong *lparg5=NULL;
jint rc = 0;
COM_NATIVE_ENTER(env, that, StgOpenStorage_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
rc = (jint)StgOpenStorage((const WCHAR *)lparg0, (IStorage *)arg1, arg2, (SNB)arg3, arg4, (IStorage **)lparg5);
fail:
- if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
COM_NATIVE_EXIT(env, that, StgOpenStorage_FUNC);
return rc;
}
#endif
-#ifndef NO_StringFromCLSID
-JNIEXPORT jint JNICALL COM_NATIVE(StringFromCLSID)
- (JNIEnv *env, jclass that, jobject arg0, jintLongArray arg1)
+#ifndef NO_SysAllocString
+JNIEXPORT jlong JNICALL COM_NATIVE(SysAllocString)
+ (JNIEnv *env, jclass that, jcharArray arg0)
{
- GUID _arg0, *lparg0=NULL;
- jintLong *lparg1=NULL;
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, StringFromCLSID_FUNC);
- if (arg0) if ((lparg0 = getGUIDFields(env, arg0, &_arg0)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jint)StringFromCLSID(lparg0, (LPOLESTR *)lparg1);
+ jchar *lparg0=NULL;
+ jlong rc = 0;
+ COM_NATIVE_ENTER(env, that, SysAllocString_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jlong)SysAllocString((OLECHAR *)lparg0);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) setGUIDFields(env, arg0, lparg0);
- COM_NATIVE_EXIT(env, that, StringFromCLSID_FUNC);
+ if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT);
+ COM_NATIVE_EXIT(env, that, SysAllocString_FUNC);
return rc;
}
#endif
-#ifndef NO_SysAllocString
-JNIEXPORT jintLong JNICALL COM_NATIVE(SysAllocString)
- (JNIEnv *env, jclass that, jcharArray arg0)
+#ifndef NO_SysAllocStringLen
+JNIEXPORT jlong JNICALL COM_NATIVE(SysAllocStringLen)
+ (JNIEnv *env, jclass that, jcharArray arg0, jint arg1)
{
jchar *lparg0=NULL;
- jintLong rc = 0;
- COM_NATIVE_ENTER(env, that, SysAllocString_FUNC);
+ jlong rc = 0;
+ COM_NATIVE_ENTER(env, that, SysAllocStringLen_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)SysAllocString((OLECHAR *)lparg0);
+ rc = (jlong)SysAllocStringLen((OLECHAR *)lparg0, arg1);
fail:
if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
- COM_NATIVE_EXIT(env, that, SysAllocString_FUNC);
+ COM_NATIVE_EXIT(env, that, SysAllocStringLen_FUNC);
return rc;
}
#endif
#ifndef NO_SysFreeString
JNIEXPORT void JNICALL COM_NATIVE(SysFreeString)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
COM_NATIVE_ENTER(env, that, SysFreeString_FUNC);
SysFreeString((BSTR)arg0);
@@ -1253,7 +975,7 @@ JNIEXPORT void JNICALL COM_NATIVE(SysFreeString)
#ifndef NO_SysStringByteLen
JNIEXPORT jint JNICALL COM_NATIVE(SysStringByteLen)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, SysStringByteLen_FUNC);
@@ -1265,7 +987,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(SysStringByteLen)
#ifndef NO_SysStringLen
JNIEXPORT jint JNICALL COM_NATIVE(SysStringLen)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, SysStringLen_FUNC);
@@ -1325,7 +1047,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(VARIANT_1sizeof)
#ifndef NO_VariantChangeType
JNIEXPORT jint JNICALL COM_NATIVE(VariantChangeType)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jshort arg2, jshort arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jshort arg2, jshort arg3)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, VariantChangeType_FUNC);
@@ -1337,7 +1059,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(VariantChangeType)
#ifndef NO_VariantClear
JNIEXPORT jint JNICALL COM_NATIVE(VariantClear)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
COM_NATIVE_ENTER(env, that, VariantClear_FUNC);
@@ -1349,7 +1071,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(VariantClear)
#ifndef NO_VariantInit
JNIEXPORT void JNICALL COM_NATIVE(VariantInit)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
COM_NATIVE_ENTER(env, that, VariantInit_FUNC);
VariantInit((VARIANTARG FAR* )arg0);
@@ -1357,2243 +1079,1181 @@ JNIEXPORT void JNICALL COM_NATIVE(VariantInit)
}
#endif
-#if (!defined(NO_VtblCall__IIIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
-#endif
+#ifndef NO_VtblCall__IJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1)
{
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIII_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIIII_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIII_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIIII_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong))(*(jlong **)arg1)[arg0])(arg1);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIIII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
-#endif
+#ifndef NO_VtblCall__IJD
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJD)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jdouble arg2)
{
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIIII_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIIIII_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIIII_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIIIII_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJD_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jdouble))(*(jlong **)arg1)[arg0])(arg1, arg2);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJD_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIIIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIIIIJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintLong arg7)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIIIIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintLong arg7)
-#endif
+#ifndef NO_VtblCall__IJI
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2)
{
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIIIII_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIIIIIJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, jint, jint, jintLong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIIIII_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIIIIIJ_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJI_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint))(*(jlong **)arg1)[arg0])(arg1, arg2);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJI_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIIIIIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJJJIIII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIIIIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jint arg6, jint arg7, jint arg8, jint arg9)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJJJIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jint arg6, jint arg7, jint arg8, jint arg9)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIIIIIII_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJJJJIIII_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jintLong, jintLong, jintLong, jintLong, jint, jint, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIIIIIII_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJJJJIIII_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jobject arg5, jint arg6, jobject arg7, jint arg8)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jobject arg5, jint arg6, jobject arg7, jint arg8)
-#endif
+#ifndef NO_VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jobject arg5, jlong arg6, jobject arg7, jlong arg8)
{
DISPPARAMS _arg5, *lparg5=NULL;
EXCEPINFO _arg7, *lparg7=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I_FUNC);
-#endif
- if (arg5) if ((lparg5 = getDISPPARAMSFields(env, arg5, &_arg5)) == NULL) goto fail;
- if (arg7) if ((lparg7 = getEXCEPINFOFields(env, arg7, &_arg7)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, DISPPARAMS *, jint, EXCEPINFO *, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5, arg6, lparg7, arg8);
-fail:
- if (arg7 && lparg7) setEXCEPINFOFields(env, arg7, lparg7);
- if (arg5 && lparg5) setDISPPARAMSFields(env, arg5, lparg5);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jobject arg5, jlong arg6, jobject arg7, jlong arg8)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jobject arg5, jlong arg6, jobject arg7, jlong arg8)
-#endif
-{
- DISPPARAMS _arg5, *lparg5=NULL;
- EXCEPINFO _arg7, *lparg7=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J_FUNC);
-#endif
if (arg5) if ((lparg5 = getDISPPARAMSFields(env, arg5, &_arg5)) == NULL) goto fail;
if (arg7) if ((lparg7 = getEXCEPINFOFields(env, arg7, &_arg7)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, DISPPARAMS *, jlong, EXCEPINFO *, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5, arg6, lparg7, arg8);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jint, jint, DISPPARAMS *, jlong, EXCEPINFO *, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5, arg6, lparg7, arg8);
fail:
if (arg7 && lparg7) setEXCEPINFOFields(env, arg7, lparg7);
if (arg5 && lparg5) setDISPPARAMSFields(env, arg5, lparg5);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIIJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jlong arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jlong arg4)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIJ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIIJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIJ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIIJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jobject arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jobject arg5)
-#endif
+#ifndef NO_VtblCall__IJIIJLorg_eclipse_swt_internal_win32_SIZE_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIJLorg_eclipse_swt_internal_win32_SIZE_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jint arg3, jlong arg4, jobject arg5)
{
- DVTARGETDEVICE _arg4, *lparg4=NULL;
SIZE _arg5, *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#endif
- if (arg4) if ((lparg4 = getDVTARGETDEVICEFields(env, arg4, &_arg4)) == NULL) goto fail;
+ COM_NATIVE_ENTER(env, that, VtblCall__IJIIJLorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
if (arg5) if ((lparg5 = getSIZEFields(env, arg5, &_arg5)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, DVTARGETDEVICE *, SIZE *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, lparg5);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jint, jlong, SIZE *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
fail:
if (arg5 && lparg5) setSIZEFields(env, arg5, lparg5);
- if (arg4 && lparg4) setDVTARGETDEVICEFields(env, arg4, lparg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJIIJLorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jintArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jintArray arg6)
-#endif
+#ifndef NO_VtblCall__IJIJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlong arg3)
{
- GUID _arg4, *lparg4=NULL;
- jint *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_FUNC);
-#endif
- if (arg4) if ((lparg4 = getGUIDFields(env, arg4, &_arg4)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, GUID *, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, arg5, lparg6);
-fail:
- if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- if (arg4 && lparg4) setGUIDFields(env, arg4, lparg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJIJ_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJIJ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIILorg_eclipse_swt_internal_win32_POINT_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIILorg_eclipse_swt_internal_win32_POINT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIILorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jint arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIILorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jint arg5)
-#endif
+#ifndef NO_VtblCall__IJIJI_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIJI_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlong arg3, jint arg4, jlongArray arg5)
{
- POINT _arg4, *lparg4=NULL;
+ jlong *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
- if (arg4) if ((lparg4 = getPOINTFields(env, arg4, &_arg4)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, POINT *, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, arg5);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJIJI_3J_FUNC);
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
fail:
- if (arg4 && lparg4) setPOINTFields(env, arg4, lparg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJIJI_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIIZ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jboolean arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jboolean arg4)
-#endif
+#ifndef NO_VtblCall__IJIJJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIJJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4)
{
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIIZ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIIZ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jboolean))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIIZ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIIZ_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJIJJ_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJIJJ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJII_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jintArray arg4)
-#endif
+#ifndef NO_VtblCall__IJIJ_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIJ_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlong arg3, jintArray arg4)
{
jint *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIII_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJII_3I_FUNC);
-#endif
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIII_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJII_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIII_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJII_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jlongArray arg4)
-#endif
-{
- jlong *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIII_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJII_3J_FUNC);
-#endif
- if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIII_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJII_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIJ_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIJ_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jintArray arg4)
-#endif
-{
- jint *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIJ_3I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJIJ_3I_FUNC);
-#endif
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong, jint *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIJ_3I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJIJ_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jintArray arg4)
-#endif
-{
- FORMATETC _arg3, *lparg3=NULL;
- jint *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = getFORMATETCFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, FORMATETC *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) setFORMATETCFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3)
-#endif
+#ifndef NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jobject arg3)
{
GUID _arg3, *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, GUID *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, GUID *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3);
fail:
if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2II) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5)
-#endif
-{
- GUID _arg3, *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC);
-#endif
- if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, GUID *, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5);
-fail:
- if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5, jobject arg6, jint arg7, jobject arg8, jintArray arg9)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5, jobject arg6, jint arg7, jobject arg8, jintArray arg9)
-#endif
+#ifndef NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jobject arg3, jint arg4, jint arg5, jobject arg6, jlong arg7, jobject arg8, jintArray arg9)
{
GUID _arg3, *lparg3=NULL;
DISPPARAMS _arg6, *lparg6=NULL;
EXCEPINFO _arg8, *lparg8=NULL;
jint *lparg9=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg6) if ((lparg6 = getDISPPARAMSFields(env, arg6, &_arg6)) == NULL) goto fail;
- if (arg8) if ((lparg8 = getEXCEPINFOFields(env, arg8, &_arg8)) == NULL) goto fail;
- if (arg9) if ((lparg9 = (*env)->GetIntArrayElements(env, arg9, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, GUID *, jint, jint, DISPPARAMS *, jint, EXCEPINFO *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5, lparg6, arg7, lparg8, lparg9);
-fail:
- if (arg9 && lparg9) (*env)->ReleaseIntArrayElements(env, arg9, lparg9, 0);
- if (arg8 && lparg8) setEXCEPINFOFields(env, arg8, lparg8);
- if (arg6 && lparg6) setDISPPARAMSFields(env, arg6, lparg6);
- if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5, jobject arg6, jlong arg7, jobject arg8, jintArray arg9)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5, jobject arg6, jlong arg7, jobject arg8, jintArray arg9)
-#endif
-{
- GUID _arg3, *lparg3=NULL;
- DISPPARAMS _arg6, *lparg6=NULL;
- EXCEPINFO _arg8, *lparg8=NULL;
- jint *lparg9=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#endif
if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
if (arg6) if ((lparg6 = getDISPPARAMSFields(env, arg6, &_arg6)) == NULL) goto fail;
if (arg8) if ((lparg8 = getEXCEPINFOFields(env, arg8, &_arg8)) == NULL) goto fail;
if (arg9) if ((lparg9 = (*env)->GetIntArrayElements(env, arg9, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, GUID *, jint, jint, DISPPARAMS *, jlong, EXCEPINFO *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5, lparg6, arg7, lparg8, lparg9);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, GUID *, jint, jint, DISPPARAMS *, jlong, EXCEPINFO *, jint *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5, lparg6, arg7, lparg8, lparg9);
fail:
if (arg9 && lparg9) (*env)->ReleaseIntArrayElements(env, arg9, lparg9, 0);
if (arg8 && lparg8) setEXCEPINFOFields(env, arg8, lparg8);
if (arg6 && lparg6) setDISPPARAMSFields(env, arg6, lparg6);
if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2JJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2JJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jlong arg4, jlong arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jlong arg4, jlong arg5)
-#endif
+#ifndef NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jobject arg3, jlong arg4, jlong arg5)
{
GUID _arg3, *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2JJ_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ_FUNC);
-#endif
if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, GUID *, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, GUID *, jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5);
fail:
if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2JJ_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jintArray arg4)
-#endif
+#ifndef NO_VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jobject arg3, jobject arg4, jobject arg5)
{
- STATSTG _arg3, *lparg3=NULL;
- jint *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = getSTATSTGFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, STATSTG *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) setSTATSTGFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5, jint arg6, jobject arg7)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4, jint arg5, jint arg6, jobject arg7)
-#endif
-{
- MSG _arg3, *lparg3=NULL;
- RECT _arg7, *lparg7=NULL;
+ GUID _arg3, *lparg3=NULL;
+ GUID _arg4, *lparg4=NULL;
+ GUID _arg5, *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
- if (arg3) if ((lparg3 = getMSGFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg7) if ((lparg7 = getRECTFields(env, arg7, &_arg7)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, MSG *, jint, jint, jint, RECT *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5, arg6, lparg7);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
+ if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = getGUIDFields(env, arg4, &_arg4)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = getGUIDFields(env, arg5, &_arg5)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, GUID *, GUID *, GUID *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4, lparg5);
fail:
- if (arg7 && lparg7) setRECTFields(env, arg7, lparg7);
- if (arg3 && lparg3) setMSGFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
+ if (arg5 && lparg5) setGUIDFields(env, arg5, lparg5);
+ if (arg4 && lparg4) setGUIDFields(env, arg4, lparg4);
+ if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jlong arg4, jint arg5, jlong arg6, jobject arg7)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jlong arg4, jint arg5, jlong arg6, jobject arg7)
-#endif
+#ifndef NO_VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jobject arg3, jlong arg4, jint arg5, jlong arg6, jobject arg7)
{
MSG _arg3, *lparg3=NULL;
RECT _arg7, *lparg7=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getMSGFields(env, arg3, &_arg3)) == NULL) goto fail;
if (arg7) if ((lparg7 = getRECTFields(env, arg7, &_arg7)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, MSG *, jlong, jint, jlong, RECT *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5, arg6, lparg7);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, MSG *, jlong, jint, jlong, RECT *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, arg5, arg6, lparg7);
fail:
if (arg7 && lparg7) setRECTFields(env, arg7, lparg7);
if (arg3 && lparg3) setMSGFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_win32_POINT_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_win32_POINT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4)
-#endif
-{
- POINT _arg3, *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
- if (arg3) if ((lparg3 = getPOINTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, POINT *, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4);
-fail:
- if (arg3 && lparg3) setPOINTFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jobject arg3)
-#endif
+#ifndef NO_VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jobject arg3)
{
SIZE _arg3, *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getSIZEFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, SIZE *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, SIZE *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3);
fail:
if (arg3 && lparg3) setSIZEFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIIZ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jboolean arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jboolean arg3)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIIZ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJIZ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jboolean))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIIZ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJIZ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__III_3II_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3II_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3II_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4, jintArray arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3II_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4, jintArray arg5)
-#endif
+#ifndef NO_VtblCall__IJI_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
- jint *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__III_3II_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJI_3II_3I_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJI_3I_FUNC);
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, lparg5);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jint *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3);
fail:
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__III_3II_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJI_3II_3I_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJI_3I_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__III_3I_3I_3I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3I_3I_3I_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3I_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5, jintArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3I_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5, jintArray arg6)
-#endif
+#ifndef NO_VtblCall__IJI_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlongArray arg3)
{
- jint *lparg3=NULL;
- jint *lparg4=NULL;
- jint *lparg5=NULL;
- jint *lparg6=NULL;
+ jlong *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__III_3I_3I_3I_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJI_3I_3I_3I_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *, jint *, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4, lparg5, lparg6);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJI_3J_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3);
fail:
- if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__III_3I_3I_3I_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJI_3I_3I_3I_3I_FUNC);
-#endif
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJI_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__III_3JI_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3JI_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3JI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3, jint arg4, jintArray arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3JI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3, jint arg4, jintArray arg5)
-#endif
+#ifndef NO_VtblCall__IJI_3JI_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3JI_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlongArray arg3, jint arg4, jintArray arg5)
{
jlong *lparg3=NULL;
jint *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__III_3JI_3I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJI_3JI_3I_FUNC);
-#endif
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong *, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, lparg5);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong *, jint, jint *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, arg4, lparg5);
fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__III_3JI_3I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJI_3JI_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__III_3J_3J_3I_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3J_3J_3I_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3J_3J_3I_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3, jlongArray arg4, jintArray arg5, jlongArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3J_3J_3I_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3, jlongArray arg4, jintArray arg5, jlongArray arg6)
+#ifndef NO_VtblCall__IJI_3J_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3J_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlongArray arg3, jintArray arg4)
+{
+ jlong *lparg3=NULL;
+ jint *lparg4=NULL;
+ jint rc = 0;
+ COM_NATIVE_ENTER(env, that, VtblCall__IJI_3J_3I_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong *, jint *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
+fail:
+ if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJI_3J_3I_FUNC);
+ return rc;
+}
#endif
+
+#ifndef NO_VtblCall__IJI_3J_3J_3I_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3J_3J_3I_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jlongArray arg3, jlongArray arg4, jintArray arg5, jlongArray arg6)
{
jlong *lparg3=NULL;
jlong *lparg4=NULL;
jint *lparg5=NULL;
jlong *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__III_3J_3J_3I_3J_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJI_3J_3J_3I_3J_FUNC);
-#endif
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong *, jlong *, jint *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4, lparg5, lparg6);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jlong *, jlong *, jint *, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4, lparg5, lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__III_3J_3J_3I_3J_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJI_3J_3J_3I_3J_FUNC);
+ return rc;
+}
#endif
+
+#ifndef NO_VtblCall__IJJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2)
+{
+ jint rc = 0;
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJ_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJ_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_VtblCall__IJJI
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJI)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jint arg3)
+{
+ jint rc = 0;
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJI_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jint))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJI_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJI_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jintArray arg4)
+#ifndef NO_VtblCall__IJJII_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJII_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jint arg3, jint arg4, jlongArray arg5)
+{
+ jlong *lparg5=NULL;
+ jint rc = 0;
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJII_3J_FUNC);
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jint, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
+fail:
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJII_3J_FUNC);
+ return rc;
+}
#endif
+
+#ifndef NO_VtblCall__IJJI_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJI_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jint arg3, jintArray arg4)
{
jint *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJI_3I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJJI_3I_FUNC);
-#endif
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jint, jint *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJI_3I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJJI_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJI_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlongArray arg4)
-#endif
+#ifndef NO_VtblCall__IJJI_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJI_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jint arg3, jlongArray arg4)
{
jlong *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJI_3J_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJJI_3J_FUNC);
-#endif
if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJI_3J_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJJI_3J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jobject arg4, jlong arg5, jlongArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jobject arg4, jlong arg5, jlongArray arg6)
-#endif
+#ifndef NO_VtblCall__IJJJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlong arg3)
{
- GUID _arg4, *lparg4=NULL;
- jlong *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC);
-#endif
- if (arg4) if ((lparg4 = getGUIDFields(env, arg4, &_arg4)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, GUID *, jlong, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, arg5, lparg6);
-fail:
- if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
- if (arg4 && lparg4) setGUIDFields(env, arg4, lparg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJJ_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJJ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJJLorg_eclipse_swt_internal_win32_POINT_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJJLorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jobject arg4, jint arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jobject arg4, jint arg5)
-#endif
+#ifndef NO_VtblCall__IJJJI_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJI_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlong arg3, jint arg4, jlongArray arg5)
{
- POINT _arg4, *lparg4=NULL;
+ jlong *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
- if (arg4) if ((lparg4 = getPOINTFields(env, arg4, &_arg4)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, POINT *, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, arg5);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJJI_3J_FUNC);
+ if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
fail:
- if (arg4 && lparg4) setPOINTFields(env, arg4, lparg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
+ if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJJI_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJJZ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJJZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jboolean arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jboolean arg4)
-#endif
+#ifndef NO_VtblCall__IJJJJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJJZ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJJZ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jboolean))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJJZ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJJZ_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJJJ_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJJJ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJJ_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJ_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJJ_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJ_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlongArray arg4)
-#endif
+#ifndef NO_VtblCall__IJJJJJJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJJJJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5, jlong arg6)
{
- jlong *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJJ_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJJ_3J_FUNC);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJJJJJ_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong, jlong, jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJJJJJ_FUNC);
+ return rc;
+}
#endif
- if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
+
+#ifndef NO_VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlong arg3, jobject arg4, jlong arg5, jlongArray arg6)
+{
+ GUID _arg4, *lparg4=NULL;
+ jlong *lparg6=NULL;
+ jint rc = 0;
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC);
+ if (arg4) if ((lparg4 = getGUIDFields(env, arg4, &_arg4)) == NULL) goto fail;
+ if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong, GUID *, jlong, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, arg5, lparg6);
fail:
- if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJJ_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJJ_3J_FUNC);
-#endif
+ if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
+ if (arg4 && lparg4) setGUIDFields(env, arg4, lparg4);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jobject arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jobject arg3, jlongArray arg4)
-#endif
+#ifndef NO_VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlong arg3, jobject arg4, jint arg5)
{
- FORMATETC _arg3, *lparg3=NULL;
- jlong *lparg4=NULL;
+ POINT _arg4, *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J_FUNC);
-#endif
- if (arg3) if ((lparg3 = getFORMATETCFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, FORMATETC *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
+ if (arg4) if ((lparg4 = getPOINTFields(env, arg4, &_arg4)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong, POINT *, jint))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, arg5);
fail:
- if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) setFORMATETCFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J_FUNC);
-#endif
+ if (arg4 && lparg4) setPOINTFields(env, arg4, lparg4);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jobject arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jobject arg3, jlongArray arg4)
-#endif
+#ifndef NO_VtblCall__IJJJ_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJ_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlong arg3, jlongArray arg4)
{
- STATSTG _arg3, *lparg3=NULL;
jlong *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J_FUNC);
-#endif
- if (arg3) if ((lparg3 = getSTATSTGFields(env, arg3, &_arg3)) == NULL) goto fail;
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJJ_3J_FUNC);
if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, STATSTG *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) setSTATSTGFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJJ_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJLorg_eclipse_swt_internal_win32_POINT_2J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJLorg_eclipse_swt_internal_win32_POINT_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jobject arg3, jlong arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jobject arg3, jlong arg4)
-#endif
+#ifndef NO_VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jobject arg3, jlong arg4)
{
POINT _arg3, *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJLorg_eclipse_swt_internal_win32_POINT_2J_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J_FUNC);
-#endif
if (arg3) if ((lparg3 = getPOINTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, POINT *, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, POINT *, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3, arg4);
fail:
if (arg3 && lparg3) setPOINTFields(env, arg3, lparg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJLorg_eclipse_swt_internal_win32_POINT_2J_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJZ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jboolean arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jboolean arg3)
-#endif
+#ifndef NO_VtblCall__IJJ_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJ_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jintArray arg3)
{
+ jint *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJZ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJZ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jboolean))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJZ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJZ_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJJ_3I_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jint *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJJ_3I_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIJ_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJ_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJ_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlongArray arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJ_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlongArray arg3)
-#endif
+#ifndef NO_VtblCall__IJJ_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJ_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jlongArray arg3)
{
jlong *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIJ_3J_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJJ_3J_FUNC);
-#endif
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jlong *))(*(jlong **)arg1)[arg0])(arg1, arg2, lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIJ_3J_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJJ_3J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
CAUUID _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getCAUUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, CAUUID *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, CAUUID *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
if (arg2 && lparg2) setCAUUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
CONTROLINFO _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getCONTROLINFOFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, CONTROLINFO *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, CONTROLINFO *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
if (arg2 && lparg2) setCONTROLINFOFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
FORMATETC _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getFORMATETCFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, FORMATETC *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, FORMATETC *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
if (arg2 && lparg2) setFORMATETCFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jobject arg3)
{
FORMATETC _arg2, *lparg2=NULL;
STGMEDIUM _arg3, *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getFORMATETCFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getSTGMEDIUMFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, FORMATETC *, STGMEDIUM *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, FORMATETC *, STGMEDIUM *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3);
fail:
if (arg3 && lparg3) setSTGMEDIUMFields(env, arg3, lparg3);
if (arg2 && lparg2) setFORMATETCFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3, jboolean arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3, jboolean arg4)
-#endif
-{
- FORMATETC _arg2, *lparg2=NULL;
- STGMEDIUM _arg3, *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_FUNC);
-#endif
- if (arg2) if ((lparg2 = getFORMATETCFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = getSTGMEDIUMFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, FORMATETC *, STGMEDIUM *, jboolean))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, arg4);
-fail:
- if (arg3 && lparg3) setSTGMEDIUMFields(env, arg3, lparg3);
- if (arg2 && lparg2) setFORMATETCFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
GUID _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, GUID *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6)
-#endif
-{
- GUID _arg2, *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIII_FUNC);
-#endif
- if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, jint, jint, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, arg6);
-fail:
- if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIII_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2III_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2III_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
-#endif
-{
- GUID _arg2, *lparg2=NULL;
- jint *lparg6=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, jint, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
-fail:
- if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jlong arg5, jlong arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jlong arg5, jlong arg6)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jint arg3, jint arg4, jlong arg5, jlong arg6)
{
GUID _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ_FUNC);
-#endif
if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, jint, jint, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, arg6);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, GUID *, jint, jint, jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, arg6);
fail:
if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jobject arg4, jobject arg5)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jobject arg4, jobject arg5)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jint arg3, jobject arg4, jlong arg5)
{
GUID _arg2, *lparg2=NULL;
OLECMD _arg4, *lparg4=NULL;
- OLECMDTEXT _arg5, *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2J_FUNC);
if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg4) if ((lparg4 = getOLECMDFields(env, arg4, &_arg4)) == NULL) goto fail;
- if (arg5) if ((lparg5 = getOLECMDTEXTFields(env, arg5, &_arg5)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, jint, OLECMD *, OLECMDTEXT *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, lparg4, lparg5);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, GUID *, jint, OLECMD *, jlong))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, lparg4, arg5);
fail:
- if (arg5 && lparg5) setOLECMDTEXTFields(env, arg5, lparg5);
if (arg4 && lparg4) setOLECMDFields(env, arg4, lparg4);
if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3, jint arg4, jint arg5, jintArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3, jint arg4, jint arg5, jintArray arg6)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jlong arg3, jint arg4, jint arg5, jintArray arg6)
{
GUID _arg2, *lparg2=NULL;
jint *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I_FUNC);
-#endif
if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, jlong, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, GUID *, jlong, jint, jint, jint *))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3, jintArray arg4)
-#endif
-{
- GUID _arg2, *lparg2=NULL;
- GUID _arg3, *lparg3=NULL;
- jint *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, GUID *, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
- if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3, jlongArray arg4)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jobject arg3, jlongArray arg4)
{
GUID _arg2, *lparg2=NULL;
GUID _arg3, *lparg3=NULL;
jlong *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#endif
if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, GUID *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, GUID *, GUID *, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jintArray arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jintArray arg3)
-#endif
-{
- GUID _arg2, *lparg2=NULL;
- jint *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlongArray arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlongArray arg3)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jlongArray arg3)
{
GUID _arg2, *lparg2=NULL;
jlong *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#endif
if (arg2) if ((lparg2 = getGUIDFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, GUID *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, GUID *, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) setGUIDFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
LICINFO _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getLICINFOFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, LICINFO *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, LICINFO *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
if (arg2 && lparg2) setLICINFOFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
MSG _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getMSGFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, MSG *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, MSG *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
if (arg2 && lparg2) setMSGFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_POINT_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jint arg3)
{
POINT _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
if (arg2) if ((lparg2 = getPOINTFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, POINT *, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, POINT *, jint))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3);
fail:
if (arg2 && lparg2) setPOINTFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jlong arg3)
{
- RECT _arg2, *lparg2=NULL;
+ PROPERTYKEY _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
- if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
+ if (arg2) if ((lparg2 = getPROPERTYKEYFields(env, arg2, &_arg2)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, PROPERTYKEY *, jlong))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3);
fail:
- if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
+ if (arg2 && lparg2) setPROPERTYKEYFields(env, arg2, lparg2);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2II) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2II) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
RECT _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2II_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2II_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, *lparg2, arg3, arg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, RECT *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2II_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2II_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2IZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jboolean arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2IZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3, jboolean arg4)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JI
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JI)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jlong arg3, jint arg4)
{
RECT _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2IZ_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JI_FUNC);
if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT *, jint, jboolean))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, RECT *, jlong, jint))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, arg4);
fail:
if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2IZ_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JI_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3, jlong arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3, jlong arg4)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jlong arg3, jlong arg4)
{
RECT _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JJ_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ_FUNC);
-#endif
if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, *lparg2, arg3, arg4);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, RECT, jlong, jlong))(*(jlong **)arg1)[arg0])(arg1, *lparg2, arg3, arg4);
fail:
if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JJ_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JZ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3, jboolean arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3, jboolean arg4)
-#endif
-{
- RECT _arg2, *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JZ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JZ_FUNC);
-#endif
- if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT *, jlong, jboolean))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4);
-fail:
- if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JZ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JZ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jobject arg3)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2, jobject arg3)
{
RECT _arg2, *lparg2=NULL;
RECT _arg3, *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = getRECTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT *, RECT *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, RECT *, RECT *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3);
fail:
if (arg3 && lparg3) setRECTFields(env, arg3, lparg3);
if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
-#endif
+#ifndef NO_VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
{
- SHDRAGIMAGE _arg2, *lparg2=NULL;
+ TF_DISPLAYATTRIBUTE _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#endif
- if (arg2) if ((lparg2 = getSHDRAGIMAGEFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, SHDRAGIMAGE *, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC);
+ if (arg2) if ((lparg2 = getTF_DISPLAYATTRIBUTEFields(env, arg2, &_arg2)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, TF_DISPLAYATTRIBUTE *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
- if (arg2 && lparg2) setSHDRAGIMAGEFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#endif
+ if (arg2 && lparg2) setTF_DISPLAYATTRIBUTEFields(env, arg2, lparg2);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3)
-#endif
+#ifndef NO_VtblCall__IJ_3C
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2)
{
- SHDRAGIMAGE _arg2, *lparg2=NULL;
+ jchar *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J_FUNC);
-#endif
- if (arg2) if ((lparg2 = getSHDRAGIMAGEFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, SHDRAGIMAGE *, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
- if (arg2 && lparg2) setSHDRAGIMAGEFields(env, arg2, lparg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J_FUNC);
-#endif
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIZ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJZ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jboolean arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJZ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jboolean arg2)
-#endif
+#ifndef NO_VtblCall__IJ_3CI
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CI)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jint arg3)
{
+ jchar *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIZ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJZ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jboolean))(*(jintLong **)arg1)[arg0])(arg1, arg2);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIZ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJZ_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CI_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jint))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CI_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIZI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJZI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIZI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jboolean arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJZI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jboolean arg2, jint arg3)
-#endif
+#ifndef NO_VtblCall__IJ_3CIII_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CIII_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jlongArray arg6)
{
+ jchar *lparg2=NULL;
+ jlong *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIZI_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJZI_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jboolean, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIZI_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJZI_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CIII_3J_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jint, jint, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
+fail:
+ if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CIII_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IIZJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJZJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIZJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jboolean arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJZJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jboolean arg2, jlong arg3)
-#endif
+#ifndef NO_VtblCall__IJ_3CII_3I_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CII_3I_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6)
{
+ jchar *lparg2=NULL;
+ jint *lparg5=NULL;
+ jint *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IIZJ_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJZJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jboolean, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IIZJ_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJZJ_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CII_3I_3I_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jint, jint, jint *, jint *))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, lparg5, lparg6);
+fail:
+ if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
+ if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CII_3I_3I_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3CIIII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CIIII_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintArray arg7)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintArray arg7)
-#endif
+#ifndef NO_VtblCall__IJ_3CJ
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CJ)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jlong arg3)
{
jchar *lparg2=NULL;
- jint *lparg7=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3CIIII_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CIIII_3I_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CJ_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint, jint, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, arg6, lparg7);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jlong))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3);
fail:
- if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3CIIII_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CIIII_3I_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CJ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3CIII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CIII_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
-#endif
+#ifndef NO_VtblCall__IJ_3CJIII_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CJIII_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jlong arg3, jint arg4, jint arg5, jint arg6, jlongArray arg7)
{
jchar *lparg2=NULL;
- jint *lparg6=NULL;
+ jlong *lparg7=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3CIII_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CIII_3I_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CJIII_3J_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
+ if (arg7) if ((lparg7 = (*env)->GetLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jlong, jint, jint, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, arg6, lparg7);
fail:
- if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
+ if (arg7 && lparg7) (*env)->ReleaseLongArrayElements(env, arg7, lparg7, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3CIII_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CIII_3I_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CJIII_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3CIII_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CIII_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CIII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jlongArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CIII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jlongArray arg6)
-#endif
+#ifndef NO_VtblCall__IJ_3CJII_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CJII_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jlong arg3, jint arg4, jint arg5, jlongArray arg6)
{
jchar *lparg2=NULL;
jlong *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3CIII_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CIII_3J_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CJII_3J_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint, jint, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jlong, jint, jint, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3CIII_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CIII_3J_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CJII_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3CI_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CI_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jintArray arg4)
-#endif
+#ifndef NO_VtblCall__IJ_3C_3C
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C_3C)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jcharArray arg3)
{
jchar *lparg2=NULL;
- jint *lparg4=NULL;
+ jchar *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3CI_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CI_3I_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_3C_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, lparg4);
+ if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jchar *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3);
fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3CI_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CI_3I_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_3C_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3CJIII_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CJIII_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CJIII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3, jint arg4, jint arg5, jint arg6, jlongArray arg7)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CJIII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3, jint arg4, jint arg5, jint arg6, jlongArray arg7)
-#endif
+#ifndef NO_VtblCall__IJ_3C_3CJ_3C_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C_3CJ_3C_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jcharArray arg3, jlong arg4, jcharArray arg5, jlongArray arg6)
{
jchar *lparg2=NULL;
- jlong *lparg7=NULL;
+ jchar *lparg3=NULL;
+ jchar *lparg5=NULL;
+ jlong *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3CJIII_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CJIII_3J_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_3CJ_3C_3J_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg7) if ((lparg7 = (*env)->GetLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jlong, jint, jint, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, arg6, lparg7);
+ if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetCharArrayElements(env, arg5, NULL)) == NULL) goto fail;
+ if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jchar *, jlong, jchar *, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3, arg4, lparg5, lparg6);
fail:
- if (arg7 && lparg7) (*env)->ReleaseLongArrayElements(env, arg7, lparg7, 0);
+ if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
+ if (arg5 && lparg5) (*env)->ReleaseCharArrayElements(env, arg5, lparg5, 0);
+ if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3CJIII_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CJIII_3J_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_3CJ_3C_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3CJII_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CJII_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3, jint arg4, jint arg5, jlongArray arg6)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3, jint arg4, jint arg5, jlongArray arg6)
-#endif
+#ifndef NO_VtblCall__IJ_3C_3C_3C_3C_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C_3C_3C_3C_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jcharArray arg3, jcharArray arg4, jcharArray arg5, jlongArray arg6)
{
jchar *lparg2=NULL;
+ jchar *lparg3=NULL;
+ jchar *lparg4=NULL;
+ jchar *lparg5=NULL;
jlong *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3CJII_3J_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CJII_3J_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_3C_3C_3C_3J_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = (*env)->GetCharArrayElements(env, arg5, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetLongArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jlong, jint, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, arg5, lparg6);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jchar *, jchar *, jchar *, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4, lparg5, lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseLongArrayElements(env, arg6, lparg6, 0);
+ if (arg5 && lparg5) (*env)->ReleaseCharArrayElements(env, arg5, lparg5, 0);
+ if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3CJII_3J_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CJII_3J_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_3C_3C_3C_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3C_3C) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3C_3C) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3C_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jcharArray arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jcharArray arg3)
-#endif
+#ifndef NO_VtblCall__IJ_3C_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jcharArray arg2, jlongArray arg3)
{
jchar *lparg2=NULL;
- jchar *lparg3=NULL;
+ jlong *lparg3=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3C_3C_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_3C_FUNC);
-#endif
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_3J_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jchar *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3);
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jchar *, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3);
fail:
- if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3C_3C_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_3C_FUNC);
-#endif
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__II_3C_3I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3C_3I_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3C_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jintArray arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jintArray arg3, jintArray arg4)
-#endif
+#ifndef NO_VtblCall__IJ_3I
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3I)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jintArray arg2)
{
- jchar *lparg2=NULL;
- jint *lparg3=NULL;
- jint *lparg4=NULL;
+ jint *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__II_3C_3I_3I_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_3I_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3I_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__II_3C_3I_3I_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_3I_3I_FUNC);
-#endif
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3I_FUNC);
return rc;
}
#endif
-#ifndef NO_VtblCall__IJIIIIJ
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIIIIJ)
- (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jlong arg6)
+#ifndef NO_VtblCall__IJ_3ILorg_eclipse_swt_internal_ole_win32_GUID_2_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3ILorg_eclipse_swt_internal_ole_win32_GUID_2_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jintArray arg2, jobject arg3, jlongArray arg4)
{
+ jint *lparg2=NULL;
+ GUID _arg3, *lparg3=NULL;
+ jlong *lparg4=NULL;
jint rc = 0;
- COM_NATIVE_ENTER(env, that, VtblCall__IJIIIIJ_FUNC);
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint, jint, jint, jint, jlong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6);
- COM_NATIVE_EXIT(env, that, VtblCall__IJIIIIJ_FUNC);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3ILorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = getGUIDFields(env, arg3, &_arg3)) == NULL) goto fail;
+ if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jint *, GUID *, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
+fail:
+ if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
+ if (arg3 && lparg3) setGUIDFields(env, arg3, lparg3);
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3ILorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_VtblCall__IJJIIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJIIIIJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJIIIII)(JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintLong arg7)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJIIIIJ)(JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintLong arg7)
-#endif
+#ifndef NO_VtblCall__IJ_3J
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3J)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlongArray arg2)
{
+ jlong *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- COM_NATIVE_ENTER(env, that, VtblCall__IJJIIIII_FUNC);
-#else
- COM_NATIVE_ENTER(env, that, VtblCall__IJJIIIIJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong, jint, jint, jint, jint, jintLong))(*(jlong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
-#ifndef JNI64
- COM_NATIVE_EXIT(env, that, VtblCall__IJJIIIII_FUNC);
-#else
- COM_NATIVE_EXIT(env, that, VtblCall__IJJIIIIJ_FUNC);
+ COM_NATIVE_ENTER(env, that, VtblCall__IJ_3J_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, jlong *))(*(jlong **)arg1)[arg0])(arg1, lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
+ COM_NATIVE_EXIT(env, that, VtblCall__IJ_3J_FUNC);
+ return rc;
+}
#endif
+
+#ifndef NO_VtblCall_1put_1Bounds
+JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1put_1Bounds)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jobject arg2)
+{
+ RECT _arg2, *lparg2=NULL;
+ jint rc = 0;
+ COM_NATIVE_ENTER(env, that, VtblCall_1put_1Bounds_FUNC);
+ if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jlong, RECT))(*(jlong **)arg1)[arg0])(arg1, *lparg2);
+fail:
+ if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
+ COM_NATIVE_EXIT(env, that, VtblCall_1put_1Bounds_FUNC);
return rc;
}
#endif
#ifndef NO_WriteClassStg
JNIEXPORT jint JNICALL COM_NATIVE(WriteClassStg)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GUID _arg1, *lparg1=NULL;
jint rc = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.h
index c6784f9e60..2a32b136fb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.h
@@ -18,13 +18,10 @@
#include "os_structs.h"
#include "com_custom.h"
-#define COM_LOAD_FUNCTION LOAD_FUNCTION
+#ifndef jintLong
+#define jintLong jlong
+#endif
-#define COM_NATIVE_ENTER_TRY(env, that, func) \
- COM_NATIVE_ENTER(env, that, func); \
- NATIVE_TRY(env, that, func);
-#define COM_NATIVE_EXIT_CATCH(env, that, func) \
- NATIVE_CATCH(env, that, func); \
- COM_NATIVE_EXIT(env, that, func);
+#define COM_LOAD_FUNCTION LOAD_FUNCTION
#endif /* INC_com_H */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c
deleted file mode 100644
index 99b4c863e3..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "swt.h"
-#include "com_structs.h"
-#include "com_stats.h"
-
-#define COM_NATIVE(func) Java_org_eclipse_swt_internal_ole_win32_COM_##func
-
-#ifndef NO_get_1accChild_1CALLBACK
-static jintLong get_accChild_CALLBACK;
-static HRESULT CALLBACK get_accChild(void* ppVTable, VARIANT varChildID, IDispatch** ppdispChild)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, IDispatch**))get_accChild_CALLBACK)(ppVTable, &varChildID, ppdispChild);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accChild_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accChild_CALLBACK = func;
- return (jintLong)get_accChild;
-}
-#endif
-
-#ifndef NO_get_1accName_1CALLBACK
-static jintLong get_accName_CALLBACK;
-static HRESULT CALLBACK get_accName(void* ppVTable, VARIANT varID, BSTR* pszName)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))get_accName_CALLBACK)(ppVTable, &varID, pszName);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accName_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accName_CALLBACK = func;
- return (jintLong)get_accName;
-}
-#endif
-
-#ifndef NO_get_1accValue_1CALLBACK
-static jintLong get_accValue_CALLBACK;
-static HRESULT CALLBACK get_accValue(void* ppVTable, VARIANT varID, BSTR* pszValue)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))get_accValue_CALLBACK)(ppVTable, &varID, pszValue);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accValue_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accValue_CALLBACK = func;
- return (jintLong)get_accValue;
-}
-#endif
-
-#ifndef NO_get_1accDescription_1CALLBACK
-static jintLong get_accDescription_CALLBACK;
-static HRESULT CALLBACK get_accDescription( void* ppVTable, VARIANT varID, BSTR* pszDescription)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))get_accDescription_CALLBACK)(ppVTable, &varID, pszDescription);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accDescription_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accDescription_CALLBACK = func;
- return (jintLong)get_accDescription;
-}
-#endif
-
-#ifndef NO_get_1accRole_1CALLBACK
-static jintLong get_accRole_CALLBACK;
-static HRESULT CALLBACK get_accRole(void* ppVTable, VARIANT varID, VARIANT* pvarRole)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, VARIANT*))get_accRole_CALLBACK)(ppVTable, &varID, pvarRole);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accRole_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accRole_CALLBACK = func;
- return (jintLong)get_accRole;
-}
-#endif
-
-#ifndef NO_get_1accState_1CALLBACK
-static jintLong get_accState_CALLBACK;
-static HRESULT CALLBACK get_accState(void* ppVTable, VARIANT varID, VARIANT* pvarState)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, VARIANT*))get_accState_CALLBACK)(ppVTable, &varID, pvarState);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accState_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accState_CALLBACK = func;
- return (jintLong)get_accState;
-}
-#endif
-
-#ifndef NO_get_1accHelp_1CALLBACK
-static jintLong get_accHelp_CALLBACK;
-static HRESULT CALLBACK get_accHelp(void* ppVTable, VARIANT varID, BSTR* pszHelp)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))get_accHelp_CALLBACK)(ppVTable, &varID, pszHelp);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accHelp_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accHelp_CALLBACK = func;
- return (jintLong)get_accHelp;
-}
-#endif
-
-#ifndef NO_get_1accHelpTopic_1CALLBACK
-static jintLong get_accHelpTopic_CALLBACK;
-static HRESULT CALLBACK get_accHelpTopic(void* ppVTable, BSTR* pszHelpFile, VARIANT varChild, long* pidTopic)
-{
- return ((HRESULT (CALLBACK *)(void*, BSTR*, VARIANT*, long*))get_accHelpTopic_CALLBACK)(ppVTable, pszHelpFile, &varChild, pidTopic);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accHelpTopic_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accHelpTopic_CALLBACK = func;
- return (jintLong)get_accHelpTopic;
-}
-#endif
-
-#ifndef NO_get_1accKeyboardShortcut_1CALLBACK
-static jintLong get_accKeyboardShortcut_CALLBACK;
-static HRESULT CALLBACK get_accKeyboardShortcut(void* ppVTable, VARIANT varID, BSTR* pszKeyboardShortcut)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))get_accKeyboardShortcut_CALLBACK)(ppVTable, &varID, pszKeyboardShortcut);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accKeyboardShortcut_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accKeyboardShortcut_CALLBACK = func;
- return (jintLong)get_accKeyboardShortcut;
-}
-#endif
-
-#ifndef NO_get_1accDefaultAction_1CALLBACK
-static jintLong get_accDefaultAction_CALLBACK;
-static HRESULT CALLBACK get_accDefaultAction(void* ppVTable, VARIANT varID, BSTR* pszDefaultAction)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))get_accDefaultAction_CALLBACK)(ppVTable, &varID, pszDefaultAction);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(get_1accDefaultAction_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- get_accDefaultAction_CALLBACK = func;
- return (jintLong)get_accDefaultAction;
-}
-#endif
-
-#ifndef NO_accSelect_1CALLBACK
-static jintLong accSelect_CALLBACK;
-static HRESULT CALLBACK accSelect(void* ppVTable, long flagsSelect, VARIANT varID)
-{
- return ((HRESULT (CALLBACK *)(void*, long, VARIANT*))accSelect_CALLBACK)(ppVTable, flagsSelect, &varID);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(accSelect_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- accSelect_CALLBACK = func;
- return (jintLong)accSelect;
-}
-#endif
-
-#ifndef NO_accLocation_1CALLBACK
-static jintLong accLocation_CALLBACK;
-static HRESULT CALLBACK accLocation(void* ppVTable, long* pxLeft, long* pyTop, long* pcxWidth, long* pcyHeight, VARIANT varID)
-{
- return ((HRESULT (CALLBACK *)(void*, long*, long*, long*, long*, VARIANT*))accLocation_CALLBACK)(ppVTable, pxLeft, pyTop, pcxWidth, pcyHeight, &varID);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(accLocation_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- accLocation_CALLBACK = func;
- return (jintLong)accLocation;
-}
-#endif
-
-#ifndef NO_accNavigate_1CALLBACK
-static jintLong accNavigate_CALLBACK;
-static HRESULT CALLBACK accNavigate(void* ppVTable, long navDir, VARIANT varStart, VARIANT* pvarEnd)
-{
- return ((HRESULT (CALLBACK *)(void*, long, VARIANT*, VARIANT*))accNavigate_CALLBACK)(ppVTable, navDir, &varStart, pvarEnd);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(accNavigate_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- accNavigate_CALLBACK = func;
- return (jintLong)accNavigate;
-}
-#endif
-
-#ifndef NO_accDoDefaultAction_1CALLBACK
-static jintLong accDoDefaultAction_CALLBACK;
-static HRESULT CALLBACK accDoDefaultAction(void* ppVTable, VARIANT varID)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*))accDoDefaultAction_CALLBACK)(ppVTable, &varID);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(accDoDefaultAction_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- accDoDefaultAction_CALLBACK = func;
- return (jintLong)accDoDefaultAction;
-}
-#endif
-
-#ifndef NO_put_1accName_1CALLBACK
-static jintLong put_accName_CALLBACK;
-static HRESULT CALLBACK put_accName(void* ppVTable, VARIANT varID, BSTR* pszName)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))put_accName_CALLBACK)(ppVTable, &varID, pszName);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(put_1accName_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- put_accName_CALLBACK = func;
- return (jintLong)put_accName;
-}
-#endif
-
-#ifndef NO_put_1accValue_1CALLBACK
-static jintLong put_accValue_CALLBACK;
-static HRESULT CALLBACK put_accValue(void* ppVTable, VARIANT varID, BSTR* pszValue)
-{
- return ((HRESULT (CALLBACK *)(void*, VARIANT*, BSTR*))put_accValue_CALLBACK)(ppVTable, &varID, pszValue);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(put_1accValue_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- put_accValue_CALLBACK = func;
- return (jintLong)put_accValue;
-}
-#endif
-
-#ifndef NO_CALLBACK_1setCurrentValue
-static jintLong CALLBACK_setCurrentValue;
-static HRESULT CALLBACK setCurrentValue(void* ppVTable, VARIANT arg0) {
- return ((HRESULT (CALLBACK *)(void*, VARIANT*))CALLBACK_setCurrentValue)(ppVTable, &arg0);
-}
-JNIEXPORT jintLong JNICALL COM_NATIVE(CALLBACK_1setCurrentValue)
- (JNIEnv *env, jclass that, jintLong func)
-{
- CALLBACK_setCurrentValue = func;
- return (jintLong)setCurrentValue;
-}
-#endif
-
-#ifndef NO_VtblCall_1PPPPVARIANT
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1PPPPVARIANT)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, VtblCall_1PPPPVARIANT_FUNC);
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jintLong, jintLong, jintLong, jintLong, VARIANT))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, *(VARIANT *)arg6);
- COM_NATIVE_EXIT(env, that, VtblCall_1PPPPVARIANT_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_VtblCall_1IVARIANT
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1IVARIANT)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintLong arg3)
-{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, VtblCall_1IVARIANT_FUNC);
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, VARIANT))(*(jintLong **)arg1)[arg0])(arg1, arg2, *(VARIANT *)arg3);
- COM_NATIVE_EXIT(env, that, VtblCall_1IVARIANT_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_VtblCall_1PVARIANTP
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1PVARIANTP)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, VtblCall_1PVARIANTP_FUNC);
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jintLong, VARIANT, jintLong))(*(jintLong **)arg1)[arg0])(arg1, arg2, *(VARIANT *)arg3, arg4);
- COM_NATIVE_EXIT(env, that, VtblCall_1PVARIANTP_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_VtblCall_1IVARIANTP
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1IVARIANTP)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4)
-{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, VtblCall_1IVARIANTP_FUNC);
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, VARIANT, jintLong))(*(jintLong **)arg1)[arg0])(arg1, arg2, *(VARIANT *)arg3, arg4);
- COM_NATIVE_EXIT(env, that, VtblCall_1IVARIANTP_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_VtblCall_1VARIANT
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1VARIANT)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2)
-{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, VtblCall_1VARIANT_FUNC);
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, VARIANT))(*(jintLong **)arg1)[arg0])(arg1, *(VARIANT *)arg2);
- COM_NATIVE_EXIT(env, that, VtblCall_1VARIANT_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_VtblCall_1VARIANTI
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1VARIANTP)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-{
- jint rc = 0;
- COM_NATIVE_ENTER(env, that, VtblCall_1VARIANTP_FUNC);
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, VARIANT, jintLong))(*(jintLong **)arg1)[arg0])(arg1, *(VARIANT *)arg2, arg3);
- COM_NATIVE_EXIT(env, that, VtblCall_1VARIANTP_FUNC);
- return rc;
-}
-#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.cpp b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.cpp
new file mode 100644
index 0000000000..4b615bd659
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.cpp
@@ -0,0 +1,430 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Paul Pazderski - Bug 547634: PathToPIDL
+ *******************************************************************************/
+
+#include "swt.h"
+#include <Shlobj.h>
+
+#define COM_NATIVE(func) Java_org_eclipse_swt_internal_ole_win32_COM_##func
+
+extern "C" {
+
+class CFileSysBindData : public IFileSystemBindData
+{
+public:
+ CFileSysBindData() : refCount(1)
+ {
+ ZeroMemory(&findData, sizeof(findData));
+ }
+
+ IFACEMETHODIMP QueryInterface(REFIID riid, void **ppv)
+ {
+ *ppv = nullptr;
+ HRESULT hr = E_NOINTERFACE;
+ if (riid == IID_IUnknown || riid == IID_IFileSystemBindData) {
+ *ppv = static_cast<IFileSystemBindData*>(this);
+ AddRef();
+ hr = S_OK;
+ }
+ return hr;
+ }
+
+ IFACEMETHODIMP_(ULONG) AddRef()
+ {
+ return InterlockedIncrement(&refCount);
+ }
+
+ IFACEMETHODIMP_(ULONG) Release()
+ {
+ long rc = InterlockedDecrement(&refCount);
+ if (!rc)
+ delete this;
+ return rc;
+ }
+
+ IFACEMETHODIMP SetFindData(const WIN32_FIND_DATAW *pfd)
+ {
+ findData = *pfd;
+ return S_OK;
+ }
+
+ IFACEMETHODIMP GetFindData(WIN32_FIND_DATAW *pfd)
+ {
+ *pfd = findData;
+ return S_OK;
+ }
+
+private:
+ long refCount;
+ WIN32_FIND_DATAW findData;
+};
+
+/*
+ * An extended version of SHParseDisplayName which use bind context to support
+ * creation of simple PIDLs in case the normal PIDL creation failed.
+ * (most likley due to non existing file/directory)
+ */
+HRESULT PathToPIDL(PCWSTR pszName, PIDLIST_ABSOLUTE *ppidl)
+{
+ if (!ppidl) return E_FAIL;
+ *ppidl = nullptr;
+
+ SFGAOF sfgao = 0;
+ HRESULT hr = SHParseDisplayName(pszName, nullptr, ppidl, sfgao, &sfgao);
+ if (hr == S_OK) return hr;
+
+ IFileSystemBindData *pfsbd = new CFileSysBindData();
+ if (!pfsbd) return E_OUTOFMEMORY;
+
+ WIN32_FIND_DATAW data = {};
+ pfsbd->SetFindData(&data);
+
+ IBindCtx* pbc;
+
+ hr = CreateBindCtx(0, &pbc);
+ if (hr == S_OK)
+ {
+ BIND_OPTS bo = { sizeof(bo), 0, STGM_CREATE, 0 };
+ hr = pbc->SetBindOptions(&bo);
+ if (hr == S_OK)
+ {
+ hr = pbc->RegisterObjectParam(STR_FILE_SYS_BIND_DATA, pfsbd);
+ if (hr == S_OK)
+ {
+ sfgao = 0;
+ hr = SHParseDisplayName(pszName, pbc, ppidl, sfgao, &sfgao);
+ }
+ }
+ pbc->Release();
+ }
+ pfsbd->Release();
+ return hr;
+}
+
+// Stand-in for all WebView2 *EventHandler and *CompletedHandler interfaces.
+interface ISwtWebView2Callback : IUnknown {
+ virtual HRESULT Invoke(UINT_PTR arg0, UINT_PTR arg1) = 0;
+};
+
+class SwtWebView2Callback : public ISwtWebView2Callback {
+ ULONG refCount;
+ jobject object;
+ jmethodID methodID;
+
+ SwtWebView2Callback(jobject object, jmethodID methodID)
+ : refCount(1), object(object), methodID(methodID) {}
+
+ ~SwtWebView2Callback() {
+ JNIEnv *env = nullptr;
+ if (JVM->GetEnv((void **)&env, JNI_VERSION_1_2) != JNI_OK) {
+ return;
+ }
+ env->DeleteGlobalRef(object);
+ }
+
+public:
+ static ISwtWebView2Callback *Create(JNIEnv *env, jobject callback) {
+ jclass cls = env->GetObjectClass(callback);
+ jmethodID methodID = env->GetMethodID(cls, "Invoke", "(JJ)I");
+ jobject object = env->NewGlobalRef(callback);
+ if (object == nullptr) return nullptr;
+ return new SwtWebView2Callback(object, methodID);
+ }
+
+ // IUnknown
+
+ HRESULT QueryInterface(REFIID riid, void **ppv) override {
+ *ppv = nullptr;
+ if (riid == IID_IUnknown) {
+ *ppv = this;
+ AddRef();
+ return S_OK;
+ }
+ return E_NOINTERFACE;
+ }
+
+ ULONG AddRef() override {
+ return ++refCount;
+ }
+
+ ULONG Release() override {
+ long rc = --refCount;
+ if (!rc) delete this;
+ return rc;
+ }
+
+ // ISwtWebView2Callback
+
+ HRESULT Invoke(UINT_PTR arg0, UINT_PTR arg1) override {
+ JNIEnv *env = nullptr;
+ if (JVM->GetEnv((void **)&env, JNI_VERSION_1_2) != JNI_OK) {
+ return E_FAIL;
+ }
+ if (env->ExceptionCheck()) {
+ return E_FAIL;
+ }
+ HRESULT result = (HRESULT)env->CallIntMethod(
+ object, methodID, (jlong)arg0, (jlong)arg1);
+ if (env->ExceptionCheck()) {
+ return E_FAIL;
+ }
+ return result;
+ }
+};
+
+// Callback interface exposed to WebView2 via AddHostObjectToScript.
+interface ISwtWebView2Host : IDispatch {
+ virtual BSTR CallJava(int index, BSTR token, BSTR args) = 0;
+};
+
+class SwtWebView2Host : public ISwtWebView2Host {
+ ULONG refCount;
+ jobject object;
+ jmethodID methodID;
+ ITypeInfo *pTypeInfo;
+
+ SwtWebView2Host(jobject object, jmethodID methodID, ITypeInfo *pTypeInfo)
+ : refCount(1), object(object), methodID(methodID), pTypeInfo(pTypeInfo) {}
+
+ ~SwtWebView2Host() {
+ pTypeInfo->Release();
+ JNIEnv *env = nullptr;
+ if (JVM->GetEnv((void **)&env, JNI_VERSION_1_2) != JNI_OK) {
+ return;
+ }
+ env->DeleteGlobalRef(object);
+ }
+
+public:
+ static IDispatch* Create(JNIEnv *env, jobject host) {
+ jclass cls = env->GetObjectClass(host);
+ jmethodID methodID = env->GetMethodID(cls, "CallJava", "(IJJ)J");
+ jobject object = env->NewGlobalRef(host);
+ if (object == nullptr) goto error;
+
+ // NB: CreateDispTypeInfo doesn't support parameters
+ static PARAMDATA params[] = {
+ {L"index", VT_I4}, {L"token", VT_BSTR}, {L"args", VT_BSTR}
+ };
+ static METHODDATA methods[] = {
+ {L"CallJava", params, 1, 7, CC_STDCALL, ARRAYSIZE(params), DISPATCH_METHOD, VT_BSTR},
+ };
+ static INTERFACEDATA iface = {methods, 1};
+ ITypeInfo *pTypeInfo = nullptr;
+ HRESULT hr = CreateDispTypeInfo(&iface, LOCALE_NEUTRAL, &pTypeInfo);
+ if (hr != S_OK) goto error;
+
+ return new SwtWebView2Host(object, methodID, pTypeInfo);
+
+ error:
+ if (object != nullptr) env->DeleteGlobalRef(object);
+ if (pTypeInfo != nullptr) pTypeInfo->Release();
+ return nullptr;
+ }
+
+ // IUnknown
+
+ HRESULT QueryInterface(REFIID riid, void **ppv) override {
+ *ppv = nullptr;
+ if (riid == IID_IUnknown || riid == IID_IDispatch) {
+ *ppv = this;
+ AddRef();
+ return S_OK;
+ }
+ return E_NOINTERFACE;
+ }
+
+ ULONG AddRef() override {
+ return ++refCount;
+ }
+
+ ULONG Release() override {
+ long rc = --refCount;
+ if (!rc) delete this;
+ return rc;
+ }
+
+ // IDispatch
+
+ HRESULT GetTypeInfoCount(UINT *pctinfo) override {
+ *pctinfo = 1;
+ return S_OK;
+ }
+
+ HRESULT GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override {
+ *ppTInfo = nullptr;
+ if (iTInfo != 0) {
+ return DISP_E_BADINDEX;
+ }
+ pTypeInfo->AddRef();
+ *ppTInfo = pTypeInfo;
+ return S_OK;
+ }
+
+ HRESULT GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames,
+ LCID lcid, DISPID *rgDispId) override {
+ return pTypeInfo->GetIDsOfNames(rgszNames, cNames, rgDispId);
+ }
+
+ HRESULT Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
+ WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo, UINT *puArgErr) override {
+ return pTypeInfo->Invoke(this, dispIdMember, wFlags, pDispParams,
+ pVarResult, pExcepInfo, puArgErr);
+ }
+
+ // ISwtWebView2Host
+
+ BSTR CallJava(int index, BSTR token, BSTR args) override {
+ JNIEnv *env = nullptr;
+ if (JVM->GetEnv((void **)&env, JNI_VERSION_1_2) != JNI_OK) {
+ return NULL;
+ }
+ if (env->ExceptionCheck()) {
+ return NULL;
+ }
+ BSTR result = (BSTR)env->CallLongMethod(
+ object, methodID, index, (jlong)token, (jlong)args);
+ if (env->ExceptionCheck()) {
+ return NULL;
+ }
+ return result;
+ }
+};
+
+static const IID IID_ICoreWebView2EnvironmentOptions =
+ {0x2fde08a8, 0x1e9a, 0x4766, {0x8c, 0x05, 0x95, 0xa9, 0xce, 0xb9, 0xd1, 0xc5}};
+
+interface ICoreWebView2EnvironmentOptions : IUnknown {
+ virtual HRESULT get_AdditionalBrowserArguments(LPWSTR *value) = 0;
+ virtual HRESULT put_AdditionalBrowserArguments(LPCWSTR value) = 0;
+ virtual HRESULT get_Language(LPWSTR *value) = 0;
+ virtual HRESULT put_Language(LPCWSTR value) = 0;
+ virtual HRESULT get_TargetCompatibleBrowserVersion(LPWSTR *value) = 0;
+ virtual HRESULT put_TargetCompatibleBrowserVersion(LPCWSTR value) = 0;
+ virtual HRESULT get_AllowSingleSignOnUsingOSPrimaryAccount(BOOL *allow) = 0;
+ virtual HRESULT put_AllowSingleSignOnUsingOSPrimaryAccount(BOOL allow) = 0;
+};
+
+class SwtWebView2Options : public ICoreWebView2EnvironmentOptions {
+ ULONG refCount = 1;
+ LPWSTR args = nullptr;
+ LPWSTR language = nullptr;
+ LPWSTR version = nullptr;
+ BOOL allowSSO = FALSE;
+
+ HRESULT CopyString(LPCWSTR pszSrc, LPWSTR *ppszDest) {
+ if (pszSrc) {
+ size_t cbSize = (wcslen(pszSrc) + 1) * sizeof(WCHAR);
+ *ppszDest = (LPWSTR)CoTaskMemAlloc(cbSize);
+ if (!*ppszDest) return E_OUTOFMEMORY;
+ memcpy(*ppszDest, pszSrc, cbSize);
+ } else {
+ *ppszDest = nullptr;
+ }
+ return S_OK;
+ }
+
+ ~SwtWebView2Options() {
+ CoTaskMemFree(args);
+ CoTaskMemFree(language);
+ CoTaskMemFree(version);
+ }
+
+public:
+ static IUnknown *Create() {
+ return new SwtWebView2Options();
+ }
+
+ // IUnknown
+
+ HRESULT QueryInterface(REFIID riid, void **ppv) override {
+ *ppv = nullptr;
+ if (riid == IID_IUnknown || riid == IID_ICoreWebView2EnvironmentOptions) {
+ *ppv = this;
+ AddRef();
+ return S_OK;
+ }
+ return E_NOINTERFACE;
+ }
+
+ ULONG AddRef() override {
+ return ++refCount;
+ }
+
+ ULONG Release() override {
+ long rc = --refCount;
+ if (!rc) delete this;
+ return rc;
+ }
+
+ // ICoreWebView2EnvironmentOptions
+
+ HRESULT get_AdditionalBrowserArguments(LPWSTR* value) override {
+ return CopyString(args, value);
+ }
+
+ HRESULT put_AdditionalBrowserArguments(LPCWSTR value) override {
+ CoTaskMemFree(args);
+ return CopyString(value, &args);
+ }
+
+ HRESULT get_Language(LPWSTR* value) override {
+ return CopyString(language, value);
+ }
+
+ HRESULT put_Language(LPCWSTR value) override {
+ CoTaskMemFree(language);
+ return CopyString(value, &language);
+ }
+
+ HRESULT get_TargetCompatibleBrowserVersion(LPWSTR* value) override {
+ return CopyString(version, value);
+ }
+
+ HRESULT put_TargetCompatibleBrowserVersion(LPCWSTR value) override {
+ CoTaskMemFree(version);
+ return CopyString(value, &version);
+ }
+
+ HRESULT get_AllowSingleSignOnUsingOSPrimaryAccount(BOOL* allow) override {
+ *allow = allowSSO;
+ return S_OK;
+ }
+
+ HRESULT put_AllowSingleSignOnUsingOSPrimaryAccount(BOOL allow) override {
+ allowSSO = allow;
+ return S_OK;
+ }
+};
+
+JNIEXPORT jlong JNICALL COM_NATIVE(CreateSwtWebView2Callback)
+ (JNIEnv *env, jclass that, jobject callback)
+{
+ return (jlong)SwtWebView2Callback::Create(env, callback);
+}
+
+JNIEXPORT jlong JNICALL COM_NATIVE(CreateSwtWebView2Host)
+ (JNIEnv *env, jclass that, jobject host)
+{
+ return (jlong)SwtWebView2Host::Create(env, host);
+}
+
+JNIEXPORT jlong JNICALL COM_NATIVE(CreateSwtWebView2Options)
+ (JNIEnv *env, jclass that, jobject host)
+{
+ return (jlong)SwtWebView2Options::Create();
+}
+
+} // extern "C"
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h
index d7bbd072b4..7cff7fbb4b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,3 +21,13 @@
#define AccessibleObjectFromWindow_LIB "oleacc.dll"
#define CreateStdAccessibleObject_LIB "oleacc.dll"
#define LresultFromObject_LIB "oleacc.dll"
+#define CreateCoreWebView2EnvironmentWithOptions_LIB "WebView2Loader.dll"
+
+/* Custom functions */
+#ifdef __cplusplus
+extern "C" {
+#endif
+HRESULT PathToPIDL(_In_ PCWSTR pszName, _Outptr_ PIDLIST_ABSOLUTE *ppidl);
+#ifdef __cplusplus
+}
+#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c
index aeef236d34..fe93cffb47 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,21 +21,20 @@
#ifdef NATIVE_STATS
char * COM_nativeFunctionNames[] = {
- "AccessibleChildren",
- "AccessibleObjectFromWindow",
- "CALLBACK_1setCurrentValue",
"CAUUID_1sizeof",
"CLSIDFromProgID",
"CLSIDFromString",
"CONTROLINFO_1sizeof",
- "COSERVERINFO_1sizeof",
"CoCreateInstance",
"CoFreeUnusedLibraries",
"CoGetClassObject",
"CoLockObjectExternal",
+ "CreateCoreWebView2EnvironmentWithOptions",
"CreateStdAccessibleObject",
+ "CreateSwtWebView2Callback",
+ "CreateSwtWebView2Host",
+ "CreateSwtWebView2Options",
"DISPPARAMS_1sizeof",
- "DVTARGETDEVICE_1sizeof",
"DoDragDrop",
"ELEMDESC_1sizeof",
"EXCEPINFO_1sizeof",
@@ -47,81 +46,18 @@ char * COM_nativeFunctionNames[] = {
"IsEqualGUID",
"LICINFO_1sizeof",
"LresultFromObject",
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I",
-#else
- "MoveMemory__JLorg_eclipse_swt_internal_ole_win32_GUID_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I",
-#else
- "MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STATSTG_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II",
-#else
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI",
-#endif
"OLECMD_1sizeof",
"OLEINPLACEFRAMEINFO_1sizeof",
"OleCreate",
@@ -132,25 +68,25 @@ char * COM_nativeFunctionNames[] = {
"OleGetClipboard",
"OleIsCurrentClipboard",
"OleIsRunning",
- "OleLoad",
"OleRun",
"OleSave",
"OleSetClipboard",
"OleSetContainedObject",
"OleSetMenuDescriptor",
"OleTranslateColor",
+ "PathToPIDL",
"ProgIDFromCLSID",
"RegisterDragDrop",
"ReleaseStgMedium",
"RevokeDragDrop",
- "SHDoDragDrop",
- "STATSTG_1sizeof",
+ "SHCreateItemFromParsingName",
+ "SHCreateMemStream",
"STGMEDIUM_1sizeof",
"StgCreateDocfile",
"StgIsStorageFile",
"StgOpenStorage",
- "StringFromCLSID",
"SysAllocString",
+ "SysAllocStringLen",
"SysFreeString",
"SysStringByteLen",
"SysStringLen",
@@ -161,425 +97,76 @@ char * COM_nativeFunctionNames[] = {
"VariantChangeType",
"VariantClear",
"VariantInit",
-#ifndef JNI64
- "VtblCall__IIIIII",
-#else
- "VtblCall__IJIIII",
-#endif
-#ifndef JNI64
- "VtblCall__IIIIIII",
-#else
- "VtblCall__IJIIIII",
-#endif
-#ifndef JNI64
- "VtblCall__IIIIIIII",
-#else
- "VtblCall__IJIIIIIJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIIIIIIIII",
-#else
- "VtblCall__IJJJJJIIII",
-#endif
-#ifndef JNI64
- "VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I",
-#else
- "VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I",
-#endif
-#ifndef JNI64
- "VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J",
-#else
+ "VtblCall__IJ",
+ "VtblCall__IJD",
+ "VtblCall__IJI",
"VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J",
-#endif
-#ifndef JNI64
- "VtblCall__IIIIJ",
-#else
- "VtblCall__IJIIJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2",
-#else
- "VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2",
-#endif
-#ifndef JNI64
- "VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I",
-#else
- "VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIIILorg_eclipse_swt_internal_win32_POINT_2I",
-#else
- "VtblCall__IJIILorg_eclipse_swt_internal_win32_POINT_2I",
-#endif
-#ifndef JNI64
- "VtblCall__IIIIZ",
-#else
- "VtblCall__IJIIZ",
-#endif
-#ifndef JNI64
- "VtblCall__IIII_3I",
-#else
- "VtblCall__IJII_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIII_3J",
-#else
- "VtblCall__IJII_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIIJ_3I",
-#else
+ "VtblCall__IJIIJLorg_eclipse_swt_internal_win32_SIZE_2",
+ "VtblCall__IJIJ",
+ "VtblCall__IJIJI_3J",
+ "VtblCall__IJIJJ",
"VtblCall__IJIJ_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I",
-#else
- "VtblCall__IJILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2",
-#else
"VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II",
-#else
- "VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2II",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I",
-#else
- "VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I",
-#else
"VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2JJ",
-#else
"VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I",
-#else
- "VtblCall__IJILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2",
-#else
- "VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2",
-#else
+ "VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2",
"VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_win32_POINT_2I",
-#else
- "VtblCall__IJILorg_eclipse_swt_internal_win32_POINT_2I",
-#endif
-#ifndef JNI64
- "VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2",
-#else
"VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2",
-#endif
-#ifndef JNI64
- "VtblCall__IIIZ",
-#else
- "VtblCall__IJIZ",
-#endif
-#ifndef JNI64
- "VtblCall__III_3II_3I",
-#else
- "VtblCall__IJI_3II_3I",
-#endif
-#ifndef JNI64
- "VtblCall__III_3I_3I_3I_3I",
-#else
- "VtblCall__IJI_3I_3I_3I_3I",
-#endif
-#ifndef JNI64
- "VtblCall__III_3JI_3I",
-#else
+ "VtblCall__IJI_3I",
+ "VtblCall__IJI_3J",
"VtblCall__IJI_3JI_3I",
-#endif
-#ifndef JNI64
- "VtblCall__III_3J_3J_3I_3J",
-#else
+ "VtblCall__IJI_3J_3I",
"VtblCall__IJI_3J_3J_3I_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJI_3I",
-#else
+ "VtblCall__IJJ",
+ "VtblCall__IJJI",
+ "VtblCall__IJJII_3J",
"VtblCall__IJJI_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIJI_3J",
-#else
"VtblCall__IJJI_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J",
-#else
+ "VtblCall__IJJJ",
+ "VtblCall__IJJJI_3J",
+ "VtblCall__IJJJJ",
+ "VtblCall__IJJJJJJ",
"VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJJLorg_eclipse_swt_internal_win32_POINT_2I",
-#else
"VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I",
-#endif
-#ifndef JNI64
- "VtblCall__IIJJZ",
-#else
- "VtblCall__IJJJZ",
-#endif
-#ifndef JNI64
- "VtblCall__IIJJ_3J",
-#else
"VtblCall__IJJJ_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J",
-#else
- "VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J",
-#else
- "VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJLorg_eclipse_swt_internal_win32_POINT_2J",
-#else
"VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJZ",
-#else
- "VtblCall__IJJZ",
-#endif
-#ifndef JNI64
- "VtblCall__IIJ_3J",
-#else
+ "VtblCall__IJJ_3I",
"VtblCall__IJJ_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIII",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2III_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I",
-#else
+ "VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2J",
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3J",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_POINT_2I",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2",
-#else
+ "VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J",
"VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2II",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2II",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2IZ",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JJ",
-#else
+ "VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JI",
"VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JZ",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JZ",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2",
-#else
"VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J",
-#endif
-#ifndef JNI64
- "VtblCall__IIZ",
-#else
- "VtblCall__IJZ",
-#endif
-#ifndef JNI64
- "VtblCall__IIZI",
-#else
- "VtblCall__IJZI",
-#endif
-#ifndef JNI64
- "VtblCall__IIZJ",
-#else
- "VtblCall__IJZJ",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CIIII_3I",
-#else
- "VtblCall__IJ_3CIIII_3I",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CIII_3I",
-#else
- "VtblCall__IJ_3CIII_3I",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CIII_3J",
-#else
+ "VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2",
+ "VtblCall__IJ_3C",
+ "VtblCall__IJ_3CI",
"VtblCall__IJ_3CIII_3J",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CI_3I",
-#else
- "VtblCall__IJ_3CI_3I",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CJIII_3J",
-#else
+ "VtblCall__IJ_3CII_3I_3I",
+ "VtblCall__IJ_3CJ",
"VtblCall__IJ_3CJIII_3J",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CJII_3J",
-#else
"VtblCall__IJ_3CJII_3J",
-#endif
-#ifndef JNI64
- "VtblCall__II_3C_3C",
-#else
"VtblCall__IJ_3C_3C",
-#endif
-#ifndef JNI64
- "VtblCall__II_3C_3I_3I",
-#else
- "VtblCall__IJ_3C_3I_3I",
-#endif
- "VtblCall__IJIIIIJ",
-#ifndef JNI64
- "VtblCall__IJJIIIII",
-#else
- "VtblCall__IJJIIIIJ",
-#endif
- "VtblCall_1IVARIANT",
- "VtblCall_1IVARIANTP",
- "VtblCall_1PPPPVARIANT",
- "VtblCall_1PVARIANTP",
- "VtblCall_1VARIANT",
- "VtblCall_1VARIANTP",
+ "VtblCall__IJ_3C_3CJ_3C_3J",
+ "VtblCall__IJ_3C_3C_3C_3C_3J",
+ "VtblCall__IJ_3C_3J",
+ "VtblCall__IJ_3I",
+ "VtblCall__IJ_3ILorg_eclipse_swt_internal_ole_win32_GUID_2_3J",
+ "VtblCall__IJ_3J",
+ "VtblCall_1put_1Bounds",
"WriteClassStg",
- "accDoDefaultAction_1CALLBACK",
- "accLocation_1CALLBACK",
- "accNavigate_1CALLBACK",
- "accSelect_1CALLBACK",
- "get_1accChild_1CALLBACK",
- "get_1accDefaultAction_1CALLBACK",
- "get_1accDescription_1CALLBACK",
- "get_1accHelpTopic_1CALLBACK",
- "get_1accHelp_1CALLBACK",
- "get_1accKeyboardShortcut_1CALLBACK",
- "get_1accName_1CALLBACK",
- "get_1accRole_1CALLBACK",
- "get_1accState_1CALLBACK",
- "get_1accValue_1CALLBACK",
- "put_1accName_1CALLBACK",
- "put_1accValue_1CALLBACK",
};
#define NATIVE_FUNCTION_COUNT sizeof(COM_nativeFunctionNames) / sizeof(char*)
int COM_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h
index d87ddca958..8f1e7e01cf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -31,21 +31,20 @@ extern char* COM_nativeFunctionNames[];
#endif
typedef enum {
- AccessibleChildren_FUNC,
- AccessibleObjectFromWindow_FUNC,
- CALLBACK_1setCurrentValue_FUNC,
CAUUID_1sizeof_FUNC,
CLSIDFromProgID_FUNC,
CLSIDFromString_FUNC,
CONTROLINFO_1sizeof_FUNC,
- COSERVERINFO_1sizeof_FUNC,
CoCreateInstance_FUNC,
CoFreeUnusedLibraries_FUNC,
CoGetClassObject_FUNC,
CoLockObjectExternal_FUNC,
+ CreateCoreWebView2EnvironmentWithOptions_FUNC,
CreateStdAccessibleObject_FUNC,
+ CreateSwtWebView2Callback_FUNC,
+ CreateSwtWebView2Host_FUNC,
+ CreateSwtWebView2Options_FUNC,
DISPPARAMS_1sizeof_FUNC,
- DVTARGETDEVICE_1sizeof_FUNC,
DoDragDrop_FUNC,
ELEMDESC_1sizeof_FUNC,
EXCEPINFO_1sizeof_FUNC,
@@ -57,81 +56,18 @@ typedef enum {
IsEqualGUID_FUNC,
LICINFO_1sizeof_FUNC,
LresultFromObject_FUNC,
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I_FUNC,
-#else
- MoveMemory__JLorg_eclipse_swt_internal_ole_win32_GUID_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I_FUNC,
-#else
- MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STATSTG_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II_FUNC,
-#else
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARIANT_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2JI_FUNC,
-#endif
OLECMD_1sizeof_FUNC,
OLEINPLACEFRAMEINFO_1sizeof_FUNC,
OleCreate_FUNC,
@@ -142,25 +78,25 @@ typedef enum {
OleGetClipboard_FUNC,
OleIsCurrentClipboard_FUNC,
OleIsRunning_FUNC,
- OleLoad_FUNC,
OleRun_FUNC,
OleSave_FUNC,
OleSetClipboard_FUNC,
OleSetContainedObject_FUNC,
OleSetMenuDescriptor_FUNC,
OleTranslateColor_FUNC,
+ PathToPIDL_FUNC,
ProgIDFromCLSID_FUNC,
RegisterDragDrop_FUNC,
ReleaseStgMedium_FUNC,
RevokeDragDrop_FUNC,
- SHDoDragDrop_FUNC,
- STATSTG_1sizeof_FUNC,
+ SHCreateItemFromParsingName_FUNC,
+ SHCreateMemStream_FUNC,
STGMEDIUM_1sizeof_FUNC,
StgCreateDocfile_FUNC,
StgIsStorageFile_FUNC,
StgOpenStorage_FUNC,
- StringFromCLSID_FUNC,
SysAllocString_FUNC,
+ SysAllocStringLen_FUNC,
SysFreeString_FUNC,
SysStringByteLen_FUNC,
SysStringLen_FUNC,
@@ -171,423 +107,74 @@ typedef enum {
VariantChangeType_FUNC,
VariantClear_FUNC,
VariantInit_FUNC,
-#ifndef JNI64
- VtblCall__IIIIII_FUNC,
-#else
- VtblCall__IJIIII_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIIIII_FUNC,
-#else
- VtblCall__IJIIIII_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIIIIII_FUNC,
-#else
- VtblCall__IJIIIIIJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIIIIIIII_FUNC,
-#else
- VtblCall__IJJJJJIIII_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I_FUNC,
-#else
- VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J_FUNC,
-#else
+ VtblCall__IJ_FUNC,
+ VtblCall__IJD_FUNC,
+ VtblCall__IJI_FUNC,
VtblCall__IJIIILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIIJ_FUNC,
-#else
- VtblCall__IJIIJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_FUNC,
-#else
- VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_FUNC,
-#else
- VtblCall__IJIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#else
- VtblCall__IJIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIIZ_FUNC,
-#else
- VtblCall__IJIIZ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIII_3I_FUNC,
-#else
- VtblCall__IJII_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIII_3J_FUNC,
-#else
- VtblCall__IJII_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIJ_3I_FUNC,
-#else
+ VtblCall__IJIIJLorg_eclipse_swt_internal_win32_SIZE_2_FUNC,
+ VtblCall__IJIJ_FUNC,
+ VtblCall__IJIJI_3J_FUNC,
+ VtblCall__IJIJJ_FUNC,
VtblCall__IJIJ_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_FUNC,
-#else
- VtblCall__IJILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC,
-#else
VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC,
-#else
- VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2II_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC,
-#else
- VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC,
-#else
VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2JLorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2JJ_FUNC,
-#else
VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2JJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_FUNC,
-#else
- VtblCall__IJILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#else
- VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#else
+ VtblCall__IJILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC,
VtblCall__IJILorg_eclipse_swt_internal_win32_MSG_2JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#else
- VtblCall__IJILorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2_FUNC,
-#else
VtblCall__IJILorg_eclipse_swt_internal_win32_SIZE_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIZ_FUNC,
-#else
- VtblCall__IJIZ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_3II_3I_FUNC,
-#else
- VtblCall__IJI_3II_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_3I_3I_3I_3I_FUNC,
-#else
- VtblCall__IJI_3I_3I_3I_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_3JI_3I_FUNC,
-#else
+ VtblCall__IJI_3I_FUNC,
+ VtblCall__IJI_3J_FUNC,
VtblCall__IJI_3JI_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_3J_3J_3I_3J_FUNC,
-#else
+ VtblCall__IJI_3J_3I_FUNC,
VtblCall__IJI_3J_3J_3I_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJI_3I_FUNC,
-#else
+ VtblCall__IJJ_FUNC,
+ VtblCall__IJJI_FUNC,
+ VtblCall__IJJII_3J_FUNC,
VtblCall__IJJI_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJI_3J_FUNC,
-#else
VtblCall__IJJI_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC,
-#else
+ VtblCall__IJJJ_FUNC,
+ VtblCall__IJJJI_3J_FUNC,
+ VtblCall__IJJJJ_FUNC,
+ VtblCall__IJJJJJJ_FUNC,
VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#else
VtblCall__IJJJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJJZ_FUNC,
-#else
- VtblCall__IJJJZ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJJ_3J_FUNC,
-#else
VtblCall__IJJJ_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J_FUNC,
-#else
- VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J_FUNC,
-#else
- VtblCall__IJJLorg_eclipse_swt_internal_ole_win32_STATSTG_2_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJLorg_eclipse_swt_internal_win32_POINT_2J_FUNC,
-#else
VtblCall__IJJLorg_eclipse_swt_internal_win32_POINT_2J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJZ_FUNC,
-#else
- VtblCall__IJJZ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJ_3J_FUNC,
-#else
+ VtblCall__IJJ_3I_FUNC,
VtblCall__IJJ_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CAUUID_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIII_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2IIJJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I_FUNC,
-#else
+ VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2J_FUNC,
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2JII_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2Lorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_ole_win32_LICINFO_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_win32_MSG_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#else
+ VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC,
VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2II_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2II_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2IZ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JJ_FUNC,
-#else
+ VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JI_FUNC,
VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2JZ_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JZ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#else
VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIZ_FUNC,
-#else
- VtblCall__IJZ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIZI_FUNC,
-#else
- VtblCall__IJZI_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIZJ_FUNC,
-#else
- VtblCall__IJZJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CIIII_3I_FUNC,
-#else
- VtblCall__IJ_3CIIII_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CIII_3I_FUNC,
-#else
- VtblCall__IJ_3CIII_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CIII_3J_FUNC,
-#else
+ VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC,
+ VtblCall__IJ_3C_FUNC,
+ VtblCall__IJ_3CI_FUNC,
VtblCall__IJ_3CIII_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CI_3I_FUNC,
-#else
- VtblCall__IJ_3CI_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CJIII_3J_FUNC,
-#else
+ VtblCall__IJ_3CII_3I_3I_FUNC,
+ VtblCall__IJ_3CJ_FUNC,
VtblCall__IJ_3CJIII_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CJII_3J_FUNC,
-#else
VtblCall__IJ_3CJII_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3C_3C_FUNC,
-#else
VtblCall__IJ_3C_3C_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3C_3I_3I_FUNC,
-#else
- VtblCall__IJ_3C_3I_3I_FUNC,
-#endif
- VtblCall__IJIIIIJ_FUNC,
-#ifndef JNI64
- VtblCall__IJJIIIII_FUNC,
-#else
- VtblCall__IJJIIIIJ_FUNC,
-#endif
- VtblCall_1IVARIANT_FUNC,
- VtblCall_1IVARIANTP_FUNC,
- VtblCall_1PPPPVARIANT_FUNC,
- VtblCall_1PVARIANTP_FUNC,
- VtblCall_1VARIANT_FUNC,
- VtblCall_1VARIANTP_FUNC,
+ VtblCall__IJ_3C_3CJ_3C_3J_FUNC,
+ VtblCall__IJ_3C_3C_3C_3C_3J_FUNC,
+ VtblCall__IJ_3C_3J_FUNC,
+ VtblCall__IJ_3I_FUNC,
+ VtblCall__IJ_3ILorg_eclipse_swt_internal_ole_win32_GUID_2_3J_FUNC,
+ VtblCall__IJ_3J_FUNC,
+ VtblCall_1put_1Bounds_FUNC,
WriteClassStg_FUNC,
- accDoDefaultAction_1CALLBACK_FUNC,
- accLocation_1CALLBACK_FUNC,
- accNavigate_1CALLBACK_FUNC,
- accSelect_1CALLBACK_FUNC,
- get_1accChild_1CALLBACK_FUNC,
- get_1accDefaultAction_1CALLBACK_FUNC,
- get_1accDescription_1CALLBACK_FUNC,
- get_1accHelpTopic_1CALLBACK_FUNC,
- get_1accHelp_1CALLBACK_FUNC,
- get_1accKeyboardShortcut_1CALLBACK_FUNC,
- get_1accName_1CALLBACK_FUNC,
- get_1accRole_1CALLBACK_FUNC,
- get_1accState_1CALLBACK_FUNC,
- get_1accValue_1CALLBACK_FUNC,
- put_1accName_1CALLBACK_FUNC,
- put_1accValue_1CALLBACK_FUNC,
} COM_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.c
index 434a123b0a..19ee53f693 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -32,7 +32,7 @@ void cacheCAUUIDFields(JNIEnv *env, jobject lpObject)
if (CAUUIDFc.cached) return;
CAUUIDFc.clazz = (*env)->GetObjectClass(env, lpObject);
CAUUIDFc.cElems = (*env)->GetFieldID(env, CAUUIDFc.clazz, "cElems", "I");
- CAUUIDFc.pElems = (*env)->GetFieldID(env, CAUUIDFc.clazz, "pElems", I_J);
+ CAUUIDFc.pElems = (*env)->GetFieldID(env, CAUUIDFc.clazz, "pElems", "J");
CAUUIDFc.cached = 1;
}
@@ -40,7 +40,7 @@ CAUUID *getCAUUIDFields(JNIEnv *env, jobject lpObject, CAUUID *lpStruct)
{
if (!CAUUIDFc.cached) cacheCAUUIDFields(env, lpObject);
lpStruct->cElems = (*env)->GetIntField(env, lpObject, CAUUIDFc.cElems);
- lpStruct->pElems = (GUID FAR *)(*env)->GetIntLongField(env, lpObject, CAUUIDFc.pElems);
+ lpStruct->pElems = (GUID FAR *)(*env)->GetLongField(env, lpObject, CAUUIDFc.pElems);
return lpStruct;
}
@@ -48,7 +48,7 @@ void setCAUUIDFields(JNIEnv *env, jobject lpObject, CAUUID *lpStruct)
{
if (!CAUUIDFc.cached) cacheCAUUIDFields(env, lpObject);
(*env)->SetIntField(env, lpObject, CAUUIDFc.cElems, (jint)lpStruct->cElems);
- (*env)->SetIntLongField(env, lpObject, CAUUIDFc.pElems, (jintLong)lpStruct->pElems);
+ (*env)->SetLongField(env, lpObject, CAUUIDFc.pElems, (jlong)lpStruct->pElems);
}
#endif
@@ -66,7 +66,7 @@ void cacheCONTROLINFOFields(JNIEnv *env, jobject lpObject)
if (CONTROLINFOFc.cached) return;
CONTROLINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
CONTROLINFOFc.cb = (*env)->GetFieldID(env, CONTROLINFOFc.clazz, "cb", "I");
- CONTROLINFOFc.hAccel = (*env)->GetFieldID(env, CONTROLINFOFc.clazz, "hAccel", I_J);
+ CONTROLINFOFc.hAccel = (*env)->GetFieldID(env, CONTROLINFOFc.clazz, "hAccel", "J");
CONTROLINFOFc.cAccel = (*env)->GetFieldID(env, CONTROLINFOFc.clazz, "cAccel", "S");
CONTROLINFOFc.dwFlags = (*env)->GetFieldID(env, CONTROLINFOFc.clazz, "dwFlags", "I");
CONTROLINFOFc.cached = 1;
@@ -76,7 +76,7 @@ CONTROLINFO *getCONTROLINFOFields(JNIEnv *env, jobject lpObject, CONTROLINFO *lp
{
if (!CONTROLINFOFc.cached) cacheCONTROLINFOFields(env, lpObject);
lpStruct->cb = (*env)->GetIntField(env, lpObject, CONTROLINFOFc.cb);
- lpStruct->hAccel = (HACCEL)(*env)->GetIntLongField(env, lpObject, CONTROLINFOFc.hAccel);
+ lpStruct->hAccel = (HACCEL)(*env)->GetLongField(env, lpObject, CONTROLINFOFc.hAccel);
lpStruct->cAccel = (*env)->GetShortField(env, lpObject, CONTROLINFOFc.cAccel);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, CONTROLINFOFc.dwFlags);
return lpStruct;
@@ -86,52 +86,12 @@ void setCONTROLINFOFields(JNIEnv *env, jobject lpObject, CONTROLINFO *lpStruct)
{
if (!CONTROLINFOFc.cached) cacheCONTROLINFOFields(env, lpObject);
(*env)->SetIntField(env, lpObject, CONTROLINFOFc.cb, (jint)lpStruct->cb);
- (*env)->SetIntLongField(env, lpObject, CONTROLINFOFc.hAccel, (jintLong)lpStruct->hAccel);
+ (*env)->SetLongField(env, lpObject, CONTROLINFOFc.hAccel, (jlong)lpStruct->hAccel);
(*env)->SetShortField(env, lpObject, CONTROLINFOFc.cAccel, (jshort)lpStruct->cAccel);
(*env)->SetIntField(env, lpObject, CONTROLINFOFc.dwFlags, (jint)lpStruct->dwFlags);
}
#endif
-#ifndef NO_COSERVERINFO
-typedef struct COSERVERINFO_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID dwReserved1, pwszName, pAuthInfo, dwReserved2;
-} COSERVERINFO_FID_CACHE;
-
-COSERVERINFO_FID_CACHE COSERVERINFOFc;
-
-void cacheCOSERVERINFOFields(JNIEnv *env, jobject lpObject)
-{
- if (COSERVERINFOFc.cached) return;
- COSERVERINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
- COSERVERINFOFc.dwReserved1 = (*env)->GetFieldID(env, COSERVERINFOFc.clazz, "dwReserved1", "I");
- COSERVERINFOFc.pwszName = (*env)->GetFieldID(env, COSERVERINFOFc.clazz, "pwszName", I_J);
- COSERVERINFOFc.pAuthInfo = (*env)->GetFieldID(env, COSERVERINFOFc.clazz, "pAuthInfo", I_J);
- COSERVERINFOFc.dwReserved2 = (*env)->GetFieldID(env, COSERVERINFOFc.clazz, "dwReserved2", "I");
- COSERVERINFOFc.cached = 1;
-}
-
-COSERVERINFO *getCOSERVERINFOFields(JNIEnv *env, jobject lpObject, COSERVERINFO *lpStruct)
-{
- if (!COSERVERINFOFc.cached) cacheCOSERVERINFOFields(env, lpObject);
- lpStruct->dwReserved1 = (*env)->GetIntField(env, lpObject, COSERVERINFOFc.dwReserved1);
- lpStruct->pwszName = (LPWSTR)(*env)->GetIntLongField(env, lpObject, COSERVERINFOFc.pwszName);
- lpStruct->pAuthInfo = (COAUTHINFO *)(*env)->GetIntLongField(env, lpObject, COSERVERINFOFc.pAuthInfo);
- lpStruct->dwReserved2 = (*env)->GetIntField(env, lpObject, COSERVERINFOFc.dwReserved2);
- return lpStruct;
-}
-
-void setCOSERVERINFOFields(JNIEnv *env, jobject lpObject, COSERVERINFO *lpStruct)
-{
- if (!COSERVERINFOFc.cached) cacheCOSERVERINFOFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, COSERVERINFOFc.dwReserved1, (jint)lpStruct->dwReserved1);
- (*env)->SetIntLongField(env, lpObject, COSERVERINFOFc.pwszName, (jintLong)lpStruct->pwszName);
- (*env)->SetIntLongField(env, lpObject, COSERVERINFOFc.pAuthInfo, (jintLong)lpStruct->pAuthInfo);
- (*env)->SetIntField(env, lpObject, COSERVERINFOFc.dwReserved2, (jint)lpStruct->dwReserved2);
-}
-#endif
-
#ifndef NO_DISPPARAMS
typedef struct DISPPARAMS_FID_CACHE {
int cached;
@@ -145,8 +105,8 @@ void cacheDISPPARAMSFields(JNIEnv *env, jobject lpObject)
{
if (DISPPARAMSFc.cached) return;
DISPPARAMSFc.clazz = (*env)->GetObjectClass(env, lpObject);
- DISPPARAMSFc.rgvarg = (*env)->GetFieldID(env, DISPPARAMSFc.clazz, "rgvarg", I_J);
- DISPPARAMSFc.rgdispidNamedArgs = (*env)->GetFieldID(env, DISPPARAMSFc.clazz, "rgdispidNamedArgs", I_J);
+ DISPPARAMSFc.rgvarg = (*env)->GetFieldID(env, DISPPARAMSFc.clazz, "rgvarg", "J");
+ DISPPARAMSFc.rgdispidNamedArgs = (*env)->GetFieldID(env, DISPPARAMSFc.clazz, "rgdispidNamedArgs", "J");
DISPPARAMSFc.cArgs = (*env)->GetFieldID(env, DISPPARAMSFc.clazz, "cArgs", "I");
DISPPARAMSFc.cNamedArgs = (*env)->GetFieldID(env, DISPPARAMSFc.clazz, "cNamedArgs", "I");
DISPPARAMSFc.cached = 1;
@@ -155,8 +115,8 @@ void cacheDISPPARAMSFields(JNIEnv *env, jobject lpObject)
DISPPARAMS *getDISPPARAMSFields(JNIEnv *env, jobject lpObject, DISPPARAMS *lpStruct)
{
if (!DISPPARAMSFc.cached) cacheDISPPARAMSFields(env, lpObject);
- lpStruct->rgvarg = (VARIANTARG FAR *)(*env)->GetIntLongField(env, lpObject, DISPPARAMSFc.rgvarg);
- lpStruct->rgdispidNamedArgs = (DISPID FAR *)(*env)->GetIntLongField(env, lpObject, DISPPARAMSFc.rgdispidNamedArgs);
+ lpStruct->rgvarg = (VARIANTARG FAR *)(*env)->GetLongField(env, lpObject, DISPPARAMSFc.rgvarg);
+ lpStruct->rgdispidNamedArgs = (DISPID FAR *)(*env)->GetLongField(env, lpObject, DISPPARAMSFc.rgdispidNamedArgs);
lpStruct->cArgs = (*env)->GetIntField(env, lpObject, DISPPARAMSFc.cArgs);
lpStruct->cNamedArgs = (*env)->GetIntField(env, lpObject, DISPPARAMSFc.cNamedArgs);
return lpStruct;
@@ -165,65 +125,13 @@ DISPPARAMS *getDISPPARAMSFields(JNIEnv *env, jobject lpObject, DISPPARAMS *lpStr
void setDISPPARAMSFields(JNIEnv *env, jobject lpObject, DISPPARAMS *lpStruct)
{
if (!DISPPARAMSFc.cached) cacheDISPPARAMSFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, DISPPARAMSFc.rgvarg, (jintLong)lpStruct->rgvarg);
- (*env)->SetIntLongField(env, lpObject, DISPPARAMSFc.rgdispidNamedArgs, (jintLong)lpStruct->rgdispidNamedArgs);
+ (*env)->SetLongField(env, lpObject, DISPPARAMSFc.rgvarg, (jlong)lpStruct->rgvarg);
+ (*env)->SetLongField(env, lpObject, DISPPARAMSFc.rgdispidNamedArgs, (jlong)lpStruct->rgdispidNamedArgs);
(*env)->SetIntField(env, lpObject, DISPPARAMSFc.cArgs, (jint)lpStruct->cArgs);
(*env)->SetIntField(env, lpObject, DISPPARAMSFc.cNamedArgs, (jint)lpStruct->cNamedArgs);
}
#endif
-#ifndef NO_DVTARGETDEVICE
-typedef struct DVTARGETDEVICE_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID tdSize, tdDriverNameOffset, tdDeviceNameOffset, tdPortNameOffset, tdExtDevmodeOffset, tdData;
-} DVTARGETDEVICE_FID_CACHE;
-
-DVTARGETDEVICE_FID_CACHE DVTARGETDEVICEFc;
-
-void cacheDVTARGETDEVICEFields(JNIEnv *env, jobject lpObject)
-{
- if (DVTARGETDEVICEFc.cached) return;
- DVTARGETDEVICEFc.clazz = (*env)->GetObjectClass(env, lpObject);
- DVTARGETDEVICEFc.tdSize = (*env)->GetFieldID(env, DVTARGETDEVICEFc.clazz, "tdSize", "I");
- DVTARGETDEVICEFc.tdDriverNameOffset = (*env)->GetFieldID(env, DVTARGETDEVICEFc.clazz, "tdDriverNameOffset", "S");
- DVTARGETDEVICEFc.tdDeviceNameOffset = (*env)->GetFieldID(env, DVTARGETDEVICEFc.clazz, "tdDeviceNameOffset", "S");
- DVTARGETDEVICEFc.tdPortNameOffset = (*env)->GetFieldID(env, DVTARGETDEVICEFc.clazz, "tdPortNameOffset", "S");
- DVTARGETDEVICEFc.tdExtDevmodeOffset = (*env)->GetFieldID(env, DVTARGETDEVICEFc.clazz, "tdExtDevmodeOffset", "S");
- DVTARGETDEVICEFc.tdData = (*env)->GetFieldID(env, DVTARGETDEVICEFc.clazz, "tdData", "[B");
- DVTARGETDEVICEFc.cached = 1;
-}
-
-DVTARGETDEVICE *getDVTARGETDEVICEFields(JNIEnv *env, jobject lpObject, DVTARGETDEVICE *lpStruct)
-{
- if (!DVTARGETDEVICEFc.cached) cacheDVTARGETDEVICEFields(env, lpObject);
- lpStruct->tdSize = (*env)->GetIntField(env, lpObject, DVTARGETDEVICEFc.tdSize);
- lpStruct->tdDriverNameOffset = (*env)->GetShortField(env, lpObject, DVTARGETDEVICEFc.tdDriverNameOffset);
- lpStruct->tdDeviceNameOffset = (*env)->GetShortField(env, lpObject, DVTARGETDEVICEFc.tdDeviceNameOffset);
- lpStruct->tdPortNameOffset = (*env)->GetShortField(env, lpObject, DVTARGETDEVICEFc.tdPortNameOffset);
- lpStruct->tdExtDevmodeOffset = (*env)->GetShortField(env, lpObject, DVTARGETDEVICEFc.tdExtDevmodeOffset);
- {
- jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, DVTARGETDEVICEFc.tdData);
- (*env)->GetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->tdData), (jbyte *)lpStruct->tdData);
- }
- return lpStruct;
-}
-
-void setDVTARGETDEVICEFields(JNIEnv *env, jobject lpObject, DVTARGETDEVICE *lpStruct)
-{
- if (!DVTARGETDEVICEFc.cached) cacheDVTARGETDEVICEFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, DVTARGETDEVICEFc.tdSize, (jint)lpStruct->tdSize);
- (*env)->SetShortField(env, lpObject, DVTARGETDEVICEFc.tdDriverNameOffset, (jshort)lpStruct->tdDriverNameOffset);
- (*env)->SetShortField(env, lpObject, DVTARGETDEVICEFc.tdDeviceNameOffset, (jshort)lpStruct->tdDeviceNameOffset);
- (*env)->SetShortField(env, lpObject, DVTARGETDEVICEFc.tdPortNameOffset, (jshort)lpStruct->tdPortNameOffset);
- (*env)->SetShortField(env, lpObject, DVTARGETDEVICEFc.tdExtDevmodeOffset, (jshort)lpStruct->tdExtDevmodeOffset);
- {
- jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, DVTARGETDEVICEFc.tdData);
- (*env)->SetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->tdData), (jbyte *)lpStruct->tdData);
- }
-}
-#endif
-
#ifndef NO_EXCEPINFO
typedef struct EXCEPINFO_FID_CACHE {
int cached;
@@ -239,12 +147,12 @@ void cacheEXCEPINFOFields(JNIEnv *env, jobject lpObject)
EXCEPINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
EXCEPINFOFc.wCode = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "wCode", "S");
EXCEPINFOFc.wReserved = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "wReserved", "S");
- EXCEPINFOFc.bstrSource = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "bstrSource", I_J);
- EXCEPINFOFc.bstrDescription = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "bstrDescription", I_J);
- EXCEPINFOFc.bstrHelpFile = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "bstrHelpFile", I_J);
+ EXCEPINFOFc.bstrSource = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "bstrSource", "J");
+ EXCEPINFOFc.bstrDescription = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "bstrDescription", "J");
+ EXCEPINFOFc.bstrHelpFile = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "bstrHelpFile", "J");
EXCEPINFOFc.dwHelpContext = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "dwHelpContext", "I");
- EXCEPINFOFc.pvReserved = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "pvReserved", I_J);
- EXCEPINFOFc.pfnDeferredFillIn = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "pfnDeferredFillIn", I_J);
+ EXCEPINFOFc.pvReserved = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "pvReserved", "J");
+ EXCEPINFOFc.pfnDeferredFillIn = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "pfnDeferredFillIn", "J");
EXCEPINFOFc.scode = (*env)->GetFieldID(env, EXCEPINFOFc.clazz, "scode", "I");
EXCEPINFOFc.cached = 1;
}
@@ -254,12 +162,12 @@ EXCEPINFO *getEXCEPINFOFields(JNIEnv *env, jobject lpObject, EXCEPINFO *lpStruct
if (!EXCEPINFOFc.cached) cacheEXCEPINFOFields(env, lpObject);
lpStruct->wCode = (*env)->GetShortField(env, lpObject, EXCEPINFOFc.wCode);
lpStruct->wReserved = (*env)->GetShortField(env, lpObject, EXCEPINFOFc.wReserved);
- lpStruct->bstrSource = (BSTR)(*env)->GetIntLongField(env, lpObject, EXCEPINFOFc.bstrSource);
- lpStruct->bstrDescription = (BSTR)(*env)->GetIntLongField(env, lpObject, EXCEPINFOFc.bstrDescription);
- lpStruct->bstrHelpFile = (BSTR)(*env)->GetIntLongField(env, lpObject, EXCEPINFOFc.bstrHelpFile);
+ lpStruct->bstrSource = (BSTR)(*env)->GetLongField(env, lpObject, EXCEPINFOFc.bstrSource);
+ lpStruct->bstrDescription = (BSTR)(*env)->GetLongField(env, lpObject, EXCEPINFOFc.bstrDescription);
+ lpStruct->bstrHelpFile = (BSTR)(*env)->GetLongField(env, lpObject, EXCEPINFOFc.bstrHelpFile);
lpStruct->dwHelpContext = (*env)->GetIntField(env, lpObject, EXCEPINFOFc.dwHelpContext);
- lpStruct->pvReserved = (void FAR *)(*env)->GetIntLongField(env, lpObject, EXCEPINFOFc.pvReserved);
- lpStruct->pfnDeferredFillIn = (HRESULT (STDAPICALLTYPE FAR* )(struct tagEXCEPINFO FAR*))(*env)->GetIntLongField(env, lpObject, EXCEPINFOFc.pfnDeferredFillIn);
+ lpStruct->pvReserved = (void FAR *)(*env)->GetLongField(env, lpObject, EXCEPINFOFc.pvReserved);
+ lpStruct->pfnDeferredFillIn = (HRESULT (STDAPICALLTYPE FAR* )(struct tagEXCEPINFO FAR*))(*env)->GetLongField(env, lpObject, EXCEPINFOFc.pfnDeferredFillIn);
lpStruct->scode = (*env)->GetIntField(env, lpObject, EXCEPINFOFc.scode);
return lpStruct;
}
@@ -269,12 +177,12 @@ void setEXCEPINFOFields(JNIEnv *env, jobject lpObject, EXCEPINFO *lpStruct)
if (!EXCEPINFOFc.cached) cacheEXCEPINFOFields(env, lpObject);
(*env)->SetShortField(env, lpObject, EXCEPINFOFc.wCode, (jshort)lpStruct->wCode);
(*env)->SetShortField(env, lpObject, EXCEPINFOFc.wReserved, (jshort)lpStruct->wReserved);
- (*env)->SetIntLongField(env, lpObject, EXCEPINFOFc.bstrSource, (jintLong)lpStruct->bstrSource);
- (*env)->SetIntLongField(env, lpObject, EXCEPINFOFc.bstrDescription, (jintLong)lpStruct->bstrDescription);
- (*env)->SetIntLongField(env, lpObject, EXCEPINFOFc.bstrHelpFile, (jintLong)lpStruct->bstrHelpFile);
+ (*env)->SetLongField(env, lpObject, EXCEPINFOFc.bstrSource, (jlong)lpStruct->bstrSource);
+ (*env)->SetLongField(env, lpObject, EXCEPINFOFc.bstrDescription, (jlong)lpStruct->bstrDescription);
+ (*env)->SetLongField(env, lpObject, EXCEPINFOFc.bstrHelpFile, (jlong)lpStruct->bstrHelpFile);
(*env)->SetIntField(env, lpObject, EXCEPINFOFc.dwHelpContext, (jint)lpStruct->dwHelpContext);
- (*env)->SetIntLongField(env, lpObject, EXCEPINFOFc.pvReserved, (jintLong)lpStruct->pvReserved);
- (*env)->SetIntLongField(env, lpObject, EXCEPINFOFc.pfnDeferredFillIn, (jintLong)lpStruct->pfnDeferredFillIn);
+ (*env)->SetLongField(env, lpObject, EXCEPINFOFc.pvReserved, (jlong)lpStruct->pvReserved);
+ (*env)->SetLongField(env, lpObject, EXCEPINFOFc.pfnDeferredFillIn, (jlong)lpStruct->pfnDeferredFillIn);
(*env)->SetIntField(env, lpObject, EXCEPINFOFc.scode, (jint)lpStruct->scode);
}
#endif
@@ -293,7 +201,7 @@ void cacheFORMATETCFields(JNIEnv *env, jobject lpObject)
if (FORMATETCFc.cached) return;
FORMATETCFc.clazz = (*env)->GetObjectClass(env, lpObject);
FORMATETCFc.cfFormat = (*env)->GetFieldID(env, FORMATETCFc.clazz, "cfFormat", "I");
- FORMATETCFc.ptd = (*env)->GetFieldID(env, FORMATETCFc.clazz, "ptd", I_J);
+ FORMATETCFc.ptd = (*env)->GetFieldID(env, FORMATETCFc.clazz, "ptd", "J");
FORMATETCFc.dwAspect = (*env)->GetFieldID(env, FORMATETCFc.clazz, "dwAspect", "I");
FORMATETCFc.lindex = (*env)->GetFieldID(env, FORMATETCFc.clazz, "lindex", "I");
FORMATETCFc.tymed = (*env)->GetFieldID(env, FORMATETCFc.clazz, "tymed", "I");
@@ -304,7 +212,7 @@ FORMATETC *getFORMATETCFields(JNIEnv *env, jobject lpObject, FORMATETC *lpStruct
{
if (!FORMATETCFc.cached) cacheFORMATETCFields(env, lpObject);
lpStruct->cfFormat = (CLIPFORMAT)(*env)->GetIntField(env, lpObject, FORMATETCFc.cfFormat);
- lpStruct->ptd = (DVTARGETDEVICE *)(*env)->GetIntLongField(env, lpObject, FORMATETCFc.ptd);
+ lpStruct->ptd = (DVTARGETDEVICE *)(*env)->GetLongField(env, lpObject, FORMATETCFc.ptd);
lpStruct->dwAspect = (*env)->GetIntField(env, lpObject, FORMATETCFc.dwAspect);
lpStruct->lindex = (*env)->GetIntField(env, lpObject, FORMATETCFc.lindex);
lpStruct->tymed = (*env)->GetIntField(env, lpObject, FORMATETCFc.tymed);
@@ -315,7 +223,7 @@ void setFORMATETCFields(JNIEnv *env, jobject lpObject, FORMATETC *lpStruct)
{
if (!FORMATETCFc.cached) cacheFORMATETCFields(env, lpObject);
(*env)->SetIntField(env, lpObject, FORMATETCFc.cfFormat, (jint)lpStruct->cfFormat);
- (*env)->SetIntLongField(env, lpObject, FORMATETCFc.ptd, (jintLong)lpStruct->ptd);
+ (*env)->SetLongField(env, lpObject, FORMATETCFc.ptd, (jlong)lpStruct->ptd);
(*env)->SetIntField(env, lpObject, FORMATETCFc.dwAspect, (jint)lpStruct->dwAspect);
(*env)->SetIntField(env, lpObject, FORMATETCFc.lindex, (jint)lpStruct->lindex);
(*env)->SetIntField(env, lpObject, FORMATETCFc.tymed, (jint)lpStruct->tymed);
@@ -336,8 +244,8 @@ void cacheFUNCDESCFields(JNIEnv *env, jobject lpObject)
if (FUNCDESCFc.cached) return;
FUNCDESCFc.clazz = (*env)->GetObjectClass(env, lpObject);
FUNCDESCFc.memid = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "memid", "I");
- FUNCDESCFc.lprgscode = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "lprgscode", I_J);
- FUNCDESCFc.lprgelemdescParam = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "lprgelemdescParam", I_J);
+ FUNCDESCFc.lprgscode = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "lprgscode", "J");
+ FUNCDESCFc.lprgelemdescParam = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "lprgelemdescParam", "J");
FUNCDESCFc.funckind = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "funckind", "I");
FUNCDESCFc.invkind = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "invkind", "I");
FUNCDESCFc.callconv = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "callconv", "I");
@@ -345,9 +253,9 @@ void cacheFUNCDESCFields(JNIEnv *env, jobject lpObject)
FUNCDESCFc.cParamsOpt = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "cParamsOpt", "S");
FUNCDESCFc.oVft = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "oVft", "S");
FUNCDESCFc.cScodes = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "cScodes", "S");
- FUNCDESCFc.elemdescFunc_tdesc_union = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "elemdescFunc_tdesc_union", I_J);
+ FUNCDESCFc.elemdescFunc_tdesc_union = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "elemdescFunc_tdesc_union", "J");
FUNCDESCFc.elemdescFunc_tdesc_vt = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "elemdescFunc_tdesc_vt", "S");
- FUNCDESCFc.elemdescFunc_paramdesc_pparamdescex = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "elemdescFunc_paramdesc_pparamdescex", I_J);
+ FUNCDESCFc.elemdescFunc_paramdesc_pparamdescex = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "elemdescFunc_paramdesc_pparamdescex", "J");
FUNCDESCFc.elemdescFunc_paramdesc_wParamFlags = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "elemdescFunc_paramdesc_wParamFlags", "S");
FUNCDESCFc.wFuncFlags = (*env)->GetFieldID(env, FUNCDESCFc.clazz, "wFuncFlags", "S");
FUNCDESCFc.cached = 1;
@@ -357,8 +265,8 @@ FUNCDESC *getFUNCDESCFields(JNIEnv *env, jobject lpObject, FUNCDESC *lpStruct)
{
if (!FUNCDESCFc.cached) cacheFUNCDESCFields(env, lpObject);
lpStruct->memid = (MEMBERID)(*env)->GetIntField(env, lpObject, FUNCDESCFc.memid);
- lpStruct->lprgscode = (SCODE FAR *)(*env)->GetIntLongField(env, lpObject, FUNCDESCFc.lprgscode);
- lpStruct->lprgelemdescParam = (ELEMDESC FAR *)(*env)->GetIntLongField(env, lpObject, FUNCDESCFc.lprgelemdescParam);
+ lpStruct->lprgscode = (SCODE FAR *)(*env)->GetLongField(env, lpObject, FUNCDESCFc.lprgscode);
+ lpStruct->lprgelemdescParam = (ELEMDESC FAR *)(*env)->GetLongField(env, lpObject, FUNCDESCFc.lprgelemdescParam);
lpStruct->funckind = (FUNCKIND)(*env)->GetIntField(env, lpObject, FUNCDESCFc.funckind);
lpStruct->invkind = (INVOKEKIND)(*env)->GetIntField(env, lpObject, FUNCDESCFc.invkind);
lpStruct->callconv = (CALLCONV)(*env)->GetIntField(env, lpObject, FUNCDESCFc.callconv);
@@ -366,9 +274,9 @@ FUNCDESC *getFUNCDESCFields(JNIEnv *env, jobject lpObject, FUNCDESC *lpStruct)
lpStruct->cParamsOpt = (*env)->GetShortField(env, lpObject, FUNCDESCFc.cParamsOpt);
lpStruct->oVft = (*env)->GetShortField(env, lpObject, FUNCDESCFc.oVft);
lpStruct->cScodes = (*env)->GetShortField(env, lpObject, FUNCDESCFc.cScodes);
- lpStruct->elemdescFunc.tdesc.lptdesc = (struct FARSTRUCT tagTYPEDESC FAR* )(*env)->GetIntLongField(env, lpObject, FUNCDESCFc.elemdescFunc_tdesc_union);
+ lpStruct->elemdescFunc.tdesc.lptdesc = (struct FARSTRUCT tagTYPEDESC FAR* )(*env)->GetLongField(env, lpObject, FUNCDESCFc.elemdescFunc_tdesc_union);
lpStruct->elemdescFunc.tdesc.vt = (*env)->GetShortField(env, lpObject, FUNCDESCFc.elemdescFunc_tdesc_vt);
- lpStruct->elemdescFunc.paramdesc.pparamdescex = (LPPARAMDESCEX)(*env)->GetIntLongField(env, lpObject, FUNCDESCFc.elemdescFunc_paramdesc_pparamdescex);
+ lpStruct->elemdescFunc.paramdesc.pparamdescex = (LPPARAMDESCEX)(*env)->GetLongField(env, lpObject, FUNCDESCFc.elemdescFunc_paramdesc_pparamdescex);
lpStruct->elemdescFunc.paramdesc.wParamFlags = (*env)->GetShortField(env, lpObject, FUNCDESCFc.elemdescFunc_paramdesc_wParamFlags);
lpStruct->wFuncFlags = (*env)->GetShortField(env, lpObject, FUNCDESCFc.wFuncFlags);
return lpStruct;
@@ -378,8 +286,8 @@ void setFUNCDESCFields(JNIEnv *env, jobject lpObject, FUNCDESC *lpStruct)
{
if (!FUNCDESCFc.cached) cacheFUNCDESCFields(env, lpObject);
(*env)->SetIntField(env, lpObject, FUNCDESCFc.memid, (jint)lpStruct->memid);
- (*env)->SetIntLongField(env, lpObject, FUNCDESCFc.lprgscode, (jintLong)lpStruct->lprgscode);
- (*env)->SetIntLongField(env, lpObject, FUNCDESCFc.lprgelemdescParam, (jintLong)lpStruct->lprgelemdescParam);
+ (*env)->SetLongField(env, lpObject, FUNCDESCFc.lprgscode, (jlong)lpStruct->lprgscode);
+ (*env)->SetLongField(env, lpObject, FUNCDESCFc.lprgelemdescParam, (jlong)lpStruct->lprgelemdescParam);
(*env)->SetIntField(env, lpObject, FUNCDESCFc.funckind, (jint)lpStruct->funckind);
(*env)->SetIntField(env, lpObject, FUNCDESCFc.invkind, (jint)lpStruct->invkind);
(*env)->SetIntField(env, lpObject, FUNCDESCFc.callconv, (jint)lpStruct->callconv);
@@ -387,9 +295,9 @@ void setFUNCDESCFields(JNIEnv *env, jobject lpObject, FUNCDESC *lpStruct)
(*env)->SetShortField(env, lpObject, FUNCDESCFc.cParamsOpt, (jshort)lpStruct->cParamsOpt);
(*env)->SetShortField(env, lpObject, FUNCDESCFc.oVft, (jshort)lpStruct->oVft);
(*env)->SetShortField(env, lpObject, FUNCDESCFc.cScodes, (jshort)lpStruct->cScodes);
- (*env)->SetIntLongField(env, lpObject, FUNCDESCFc.elemdescFunc_tdesc_union, (jintLong)lpStruct->elemdescFunc.tdesc.lptdesc);
+ (*env)->SetLongField(env, lpObject, FUNCDESCFc.elemdescFunc_tdesc_union, (jlong)lpStruct->elemdescFunc.tdesc.lptdesc);
(*env)->SetShortField(env, lpObject, FUNCDESCFc.elemdescFunc_tdesc_vt, (jshort)lpStruct->elemdescFunc.tdesc.vt);
- (*env)->SetIntLongField(env, lpObject, FUNCDESCFc.elemdescFunc_paramdesc_pparamdescex, (jintLong)lpStruct->elemdescFunc.paramdesc.pparamdescex);
+ (*env)->SetLongField(env, lpObject, FUNCDESCFc.elemdescFunc_paramdesc_pparamdescex, (jlong)lpStruct->elemdescFunc.paramdesc.pparamdescex);
(*env)->SetShortField(env, lpObject, FUNCDESCFc.elemdescFunc_paramdesc_wParamFlags, (jshort)lpStruct->elemdescFunc.paramdesc.wParamFlags);
(*env)->SetShortField(env, lpObject, FUNCDESCFc.wFuncFlags, (jshort)lpStruct->wFuncFlags);
}
@@ -512,52 +420,6 @@ void setOLECMDFields(JNIEnv *env, jobject lpObject, OLECMD *lpStruct)
}
#endif
-#ifndef NO_OLECMDTEXT
-typedef struct OLECMDTEXT_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID cmdtextf, cwActual, cwBuf, rgwz;
-} OLECMDTEXT_FID_CACHE;
-
-OLECMDTEXT_FID_CACHE OLECMDTEXTFc;
-
-void cacheOLECMDTEXTFields(JNIEnv *env, jobject lpObject)
-{
- if (OLECMDTEXTFc.cached) return;
- OLECMDTEXTFc.clazz = (*env)->GetObjectClass(env, lpObject);
- OLECMDTEXTFc.cmdtextf = (*env)->GetFieldID(env, OLECMDTEXTFc.clazz, "cmdtextf", "I");
- OLECMDTEXTFc.cwActual = (*env)->GetFieldID(env, OLECMDTEXTFc.clazz, "cwActual", "I");
- OLECMDTEXTFc.cwBuf = (*env)->GetFieldID(env, OLECMDTEXTFc.clazz, "cwBuf", "I");
- OLECMDTEXTFc.rgwz = (*env)->GetFieldID(env, OLECMDTEXTFc.clazz, "rgwz", "[S");
- OLECMDTEXTFc.cached = 1;
-}
-
-OLECMDTEXT *getOLECMDTEXTFields(JNIEnv *env, jobject lpObject, OLECMDTEXT *lpStruct)
-{
- if (!OLECMDTEXTFc.cached) cacheOLECMDTEXTFields(env, lpObject);
- lpStruct->cmdtextf = (*env)->GetIntField(env, lpObject, OLECMDTEXTFc.cmdtextf);
- lpStruct->cwActual = (*env)->GetIntField(env, lpObject, OLECMDTEXTFc.cwActual);
- lpStruct->cwBuf = (*env)->GetIntField(env, lpObject, OLECMDTEXTFc.cwBuf);
- {
- jshortArray lpObject1 = (jshortArray)(*env)->GetObjectField(env, lpObject, OLECMDTEXTFc.rgwz);
- (*env)->GetShortArrayRegion(env, lpObject1, 0, sizeof(lpStruct->rgwz) / sizeof(jshort), (jshort *)lpStruct->rgwz);
- }
- return lpStruct;
-}
-
-void setOLECMDTEXTFields(JNIEnv *env, jobject lpObject, OLECMDTEXT *lpStruct)
-{
- if (!OLECMDTEXTFc.cached) cacheOLECMDTEXTFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, OLECMDTEXTFc.cmdtextf, (jint)lpStruct->cmdtextf);
- (*env)->SetIntField(env, lpObject, OLECMDTEXTFc.cwActual, (jint)lpStruct->cwActual);
- (*env)->SetIntField(env, lpObject, OLECMDTEXTFc.cwBuf, (jint)lpStruct->cwBuf);
- {
- jshortArray lpObject1 = (jshortArray)(*env)->GetObjectField(env, lpObject, OLECMDTEXTFc.rgwz);
- (*env)->SetShortArrayRegion(env, lpObject1, 0, sizeof(lpStruct->rgwz) / sizeof(jshort), (jshort *)lpStruct->rgwz);
- }
-}
-#endif
-
#ifndef NO_OLEINPLACEFRAMEINFO
typedef struct OLEINPLACEFRAMEINFO_FID_CACHE {
int cached;
@@ -573,8 +435,8 @@ void cacheOLEINPLACEFRAMEINFOFields(JNIEnv *env, jobject lpObject)
OLEINPLACEFRAMEINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
OLEINPLACEFRAMEINFOFc.cb = (*env)->GetFieldID(env, OLEINPLACEFRAMEINFOFc.clazz, "cb", "I");
OLEINPLACEFRAMEINFOFc.fMDIApp = (*env)->GetFieldID(env, OLEINPLACEFRAMEINFOFc.clazz, "fMDIApp", "I");
- OLEINPLACEFRAMEINFOFc.hwndFrame = (*env)->GetFieldID(env, OLEINPLACEFRAMEINFOFc.clazz, "hwndFrame", I_J);
- OLEINPLACEFRAMEINFOFc.haccel = (*env)->GetFieldID(env, OLEINPLACEFRAMEINFOFc.clazz, "haccel", I_J);
+ OLEINPLACEFRAMEINFOFc.hwndFrame = (*env)->GetFieldID(env, OLEINPLACEFRAMEINFOFc.clazz, "hwndFrame", "J");
+ OLEINPLACEFRAMEINFOFc.haccel = (*env)->GetFieldID(env, OLEINPLACEFRAMEINFOFc.clazz, "haccel", "J");
OLEINPLACEFRAMEINFOFc.cAccelEntries = (*env)->GetFieldID(env, OLEINPLACEFRAMEINFOFc.clazz, "cAccelEntries", "I");
OLEINPLACEFRAMEINFOFc.cached = 1;
}
@@ -584,8 +446,8 @@ OLEINPLACEFRAMEINFO *getOLEINPLACEFRAMEINFOFields(JNIEnv *env, jobject lpObject,
if (!OLEINPLACEFRAMEINFOFc.cached) cacheOLEINPLACEFRAMEINFOFields(env, lpObject);
lpStruct->cb = (*env)->GetIntField(env, lpObject, OLEINPLACEFRAMEINFOFc.cb);
lpStruct->fMDIApp = (*env)->GetIntField(env, lpObject, OLEINPLACEFRAMEINFOFc.fMDIApp);
- lpStruct->hwndFrame = (HWND)(*env)->GetIntLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.hwndFrame);
- lpStruct->haccel = (HACCEL)(*env)->GetIntLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.haccel);
+ lpStruct->hwndFrame = (HWND)(*env)->GetLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.hwndFrame);
+ lpStruct->haccel = (HACCEL)(*env)->GetLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.haccel);
lpStruct->cAccelEntries = (*env)->GetIntField(env, lpObject, OLEINPLACEFRAMEINFOFc.cAccelEntries);
return lpStruct;
}
@@ -595,97 +457,12 @@ void setOLEINPLACEFRAMEINFOFields(JNIEnv *env, jobject lpObject, OLEINPLACEFRAME
if (!OLEINPLACEFRAMEINFOFc.cached) cacheOLEINPLACEFRAMEINFOFields(env, lpObject);
(*env)->SetIntField(env, lpObject, OLEINPLACEFRAMEINFOFc.cb, (jint)lpStruct->cb);
(*env)->SetIntField(env, lpObject, OLEINPLACEFRAMEINFOFc.fMDIApp, (jint)lpStruct->fMDIApp);
- (*env)->SetIntLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.hwndFrame, (jintLong)lpStruct->hwndFrame);
- (*env)->SetIntLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.haccel, (jintLong)lpStruct->haccel);
+ (*env)->SetLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.hwndFrame, (jlong)lpStruct->hwndFrame);
+ (*env)->SetLongField(env, lpObject, OLEINPLACEFRAMEINFOFc.haccel, (jlong)lpStruct->haccel);
(*env)->SetIntField(env, lpObject, OLEINPLACEFRAMEINFOFc.cAccelEntries, (jint)lpStruct->cAccelEntries);
}
#endif
-#ifndef NO_STATSTG
-typedef struct STATSTG_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID pwcsName, type, cbSize, mtime_dwLowDateTime, mtime_dwHighDateTime, ctime_dwLowDateTime, ctime_dwHighDateTime, atime_dwLowDateTime, atime_dwHighDateTime, grfMode, grfLocksSupported, clsid_Data1, clsid_Data2, clsid_Data3, clsid_Data4, grfStateBits, reserved;
-} STATSTG_FID_CACHE;
-
-STATSTG_FID_CACHE STATSTGFc;
-
-void cacheSTATSTGFields(JNIEnv *env, jobject lpObject)
-{
- if (STATSTGFc.cached) return;
- STATSTGFc.clazz = (*env)->GetObjectClass(env, lpObject);
- STATSTGFc.pwcsName = (*env)->GetFieldID(env, STATSTGFc.clazz, "pwcsName", I_J);
- STATSTGFc.type = (*env)->GetFieldID(env, STATSTGFc.clazz, "type", "I");
- STATSTGFc.cbSize = (*env)->GetFieldID(env, STATSTGFc.clazz, "cbSize", "J");
- STATSTGFc.mtime_dwLowDateTime = (*env)->GetFieldID(env, STATSTGFc.clazz, "mtime_dwLowDateTime", "I");
- STATSTGFc.mtime_dwHighDateTime = (*env)->GetFieldID(env, STATSTGFc.clazz, "mtime_dwHighDateTime", "I");
- STATSTGFc.ctime_dwLowDateTime = (*env)->GetFieldID(env, STATSTGFc.clazz, "ctime_dwLowDateTime", "I");
- STATSTGFc.ctime_dwHighDateTime = (*env)->GetFieldID(env, STATSTGFc.clazz, "ctime_dwHighDateTime", "I");
- STATSTGFc.atime_dwLowDateTime = (*env)->GetFieldID(env, STATSTGFc.clazz, "atime_dwLowDateTime", "I");
- STATSTGFc.atime_dwHighDateTime = (*env)->GetFieldID(env, STATSTGFc.clazz, "atime_dwHighDateTime", "I");
- STATSTGFc.grfMode = (*env)->GetFieldID(env, STATSTGFc.clazz, "grfMode", "I");
- STATSTGFc.grfLocksSupported = (*env)->GetFieldID(env, STATSTGFc.clazz, "grfLocksSupported", "I");
- STATSTGFc.clsid_Data1 = (*env)->GetFieldID(env, STATSTGFc.clazz, "clsid_Data1", "I");
- STATSTGFc.clsid_Data2 = (*env)->GetFieldID(env, STATSTGFc.clazz, "clsid_Data2", "S");
- STATSTGFc.clsid_Data3 = (*env)->GetFieldID(env, STATSTGFc.clazz, "clsid_Data3", "S");
- STATSTGFc.clsid_Data4 = (*env)->GetFieldID(env, STATSTGFc.clazz, "clsid_Data4", "[B");
- STATSTGFc.grfStateBits = (*env)->GetFieldID(env, STATSTGFc.clazz, "grfStateBits", "I");
- STATSTGFc.reserved = (*env)->GetFieldID(env, STATSTGFc.clazz, "reserved", "I");
- STATSTGFc.cached = 1;
-}
-
-STATSTG *getSTATSTGFields(JNIEnv *env, jobject lpObject, STATSTG *lpStruct)
-{
- if (!STATSTGFc.cached) cacheSTATSTGFields(env, lpObject);
- lpStruct->pwcsName = (LPWSTR)(*env)->GetIntLongField(env, lpObject, STATSTGFc.pwcsName);
- lpStruct->type = (*env)->GetIntField(env, lpObject, STATSTGFc.type);
- lpStruct->cbSize.QuadPart = (*env)->GetLongField(env, lpObject, STATSTGFc.cbSize);
- lpStruct->mtime.dwLowDateTime = (*env)->GetIntField(env, lpObject, STATSTGFc.mtime_dwLowDateTime);
- lpStruct->mtime.dwHighDateTime = (*env)->GetIntField(env, lpObject, STATSTGFc.mtime_dwHighDateTime);
- lpStruct->ctime.dwLowDateTime = (*env)->GetIntField(env, lpObject, STATSTGFc.ctime_dwLowDateTime);
- lpStruct->ctime.dwHighDateTime = (*env)->GetIntField(env, lpObject, STATSTGFc.ctime_dwHighDateTime);
- lpStruct->atime.dwLowDateTime = (*env)->GetIntField(env, lpObject, STATSTGFc.atime_dwLowDateTime);
- lpStruct->atime.dwHighDateTime = (*env)->GetIntField(env, lpObject, STATSTGFc.atime_dwHighDateTime);
- lpStruct->grfMode = (*env)->GetIntField(env, lpObject, STATSTGFc.grfMode);
- lpStruct->grfLocksSupported = (*env)->GetIntField(env, lpObject, STATSTGFc.grfLocksSupported);
- lpStruct->clsid.Data1 = (*env)->GetIntField(env, lpObject, STATSTGFc.clsid_Data1);
- lpStruct->clsid.Data2 = (*env)->GetShortField(env, lpObject, STATSTGFc.clsid_Data2);
- lpStruct->clsid.Data3 = (*env)->GetShortField(env, lpObject, STATSTGFc.clsid_Data3);
- {
- jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, STATSTGFc.clsid_Data4);
- (*env)->GetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->clsid.Data4), (jbyte *)lpStruct->clsid.Data4);
- }
- lpStruct->grfStateBits = (*env)->GetIntField(env, lpObject, STATSTGFc.grfStateBits);
- lpStruct->reserved = (*env)->GetIntField(env, lpObject, STATSTGFc.reserved);
- return lpStruct;
-}
-
-void setSTATSTGFields(JNIEnv *env, jobject lpObject, STATSTG *lpStruct)
-{
- if (!STATSTGFc.cached) cacheSTATSTGFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, STATSTGFc.pwcsName, (jintLong)lpStruct->pwcsName);
- (*env)->SetIntField(env, lpObject, STATSTGFc.type, (jint)lpStruct->type);
- (*env)->SetLongField(env, lpObject, STATSTGFc.cbSize, (jlong)lpStruct->cbSize.QuadPart);
- (*env)->SetIntField(env, lpObject, STATSTGFc.mtime_dwLowDateTime, (jint)lpStruct->mtime.dwLowDateTime);
- (*env)->SetIntField(env, lpObject, STATSTGFc.mtime_dwHighDateTime, (jint)lpStruct->mtime.dwHighDateTime);
- (*env)->SetIntField(env, lpObject, STATSTGFc.ctime_dwLowDateTime, (jint)lpStruct->ctime.dwLowDateTime);
- (*env)->SetIntField(env, lpObject, STATSTGFc.ctime_dwHighDateTime, (jint)lpStruct->ctime.dwHighDateTime);
- (*env)->SetIntField(env, lpObject, STATSTGFc.atime_dwLowDateTime, (jint)lpStruct->atime.dwLowDateTime);
- (*env)->SetIntField(env, lpObject, STATSTGFc.atime_dwHighDateTime, (jint)lpStruct->atime.dwHighDateTime);
- (*env)->SetIntField(env, lpObject, STATSTGFc.grfMode, (jint)lpStruct->grfMode);
- (*env)->SetIntField(env, lpObject, STATSTGFc.grfLocksSupported, (jint)lpStruct->grfLocksSupported);
- (*env)->SetIntField(env, lpObject, STATSTGFc.clsid_Data1, (jint)lpStruct->clsid.Data1);
- (*env)->SetShortField(env, lpObject, STATSTGFc.clsid_Data2, (jshort)lpStruct->clsid.Data2);
- (*env)->SetShortField(env, lpObject, STATSTGFc.clsid_Data3, (jshort)lpStruct->clsid.Data3);
- {
- jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, STATSTGFc.clsid_Data4);
- (*env)->SetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->clsid.Data4), (jbyte *)lpStruct->clsid.Data4);
- }
- (*env)->SetIntField(env, lpObject, STATSTGFc.grfStateBits, (jint)lpStruct->grfStateBits);
- (*env)->SetIntField(env, lpObject, STATSTGFc.reserved, (jint)lpStruct->reserved);
-}
-#endif
-
#ifndef NO_STGMEDIUM
typedef struct STGMEDIUM_FID_CACHE {
int cached;
@@ -700,8 +477,8 @@ void cacheSTGMEDIUMFields(JNIEnv *env, jobject lpObject)
if (STGMEDIUMFc.cached) return;
STGMEDIUMFc.clazz = (*env)->GetObjectClass(env, lpObject);
STGMEDIUMFc.tymed = (*env)->GetFieldID(env, STGMEDIUMFc.clazz, "tymed", "I");
- STGMEDIUMFc.unionField = (*env)->GetFieldID(env, STGMEDIUMFc.clazz, "unionField", I_J);
- STGMEDIUMFc.pUnkForRelease = (*env)->GetFieldID(env, STGMEDIUMFc.clazz, "pUnkForRelease", I_J);
+ STGMEDIUMFc.unionField = (*env)->GetFieldID(env, STGMEDIUMFc.clazz, "unionField", "J");
+ STGMEDIUMFc.pUnkForRelease = (*env)->GetFieldID(env, STGMEDIUMFc.clazz, "pUnkForRelease", "J");
STGMEDIUMFc.cached = 1;
}
@@ -709,8 +486,8 @@ STGMEDIUM *getSTGMEDIUMFields(JNIEnv *env, jobject lpObject, STGMEDIUM *lpStruct
{
if (!STGMEDIUMFc.cached) cacheSTGMEDIUMFields(env, lpObject);
lpStruct->tymed = (*env)->GetIntField(env, lpObject, STGMEDIUMFc.tymed);
- lpStruct->hGlobal = (HGLOBAL)(*env)->GetIntLongField(env, lpObject, STGMEDIUMFc.unionField);
- lpStruct->pUnkForRelease = (IUnknown *)(*env)->GetIntLongField(env, lpObject, STGMEDIUMFc.pUnkForRelease);
+ lpStruct->hGlobal = (HGLOBAL)(*env)->GetLongField(env, lpObject, STGMEDIUMFc.unionField);
+ lpStruct->pUnkForRelease = (IUnknown *)(*env)->GetLongField(env, lpObject, STGMEDIUMFc.pUnkForRelease);
return lpStruct;
}
@@ -718,8 +495,8 @@ void setSTGMEDIUMFields(JNIEnv *env, jobject lpObject, STGMEDIUM *lpStruct)
{
if (!STGMEDIUMFc.cached) cacheSTGMEDIUMFields(env, lpObject);
(*env)->SetIntField(env, lpObject, STGMEDIUMFc.tymed, (jint)lpStruct->tymed);
- (*env)->SetIntLongField(env, lpObject, STGMEDIUMFc.unionField, (jintLong)lpStruct->hGlobal);
- (*env)->SetIntLongField(env, lpObject, STGMEDIUMFc.pUnkForRelease, (jintLong)lpStruct->pUnkForRelease);
+ (*env)->SetLongField(env, lpObject, STGMEDIUMFc.unionField, (jlong)lpStruct->hGlobal);
+ (*env)->SetLongField(env, lpObject, STGMEDIUMFc.pUnkForRelease, (jlong)lpStruct->pUnkForRelease);
}
#endif
@@ -744,7 +521,7 @@ void cacheTYPEATTRFields(JNIEnv *env, jobject lpObject)
TYPEATTRFc.dwReserved = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "dwReserved", "I");
TYPEATTRFc.memidConstructor = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "memidConstructor", "I");
TYPEATTRFc.memidDestructor = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "memidDestructor", "I");
- TYPEATTRFc.lpstrSchema = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "lpstrSchema", I_J);
+ TYPEATTRFc.lpstrSchema = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "lpstrSchema", "J");
TYPEATTRFc.cbSizeInstance = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "cbSizeInstance", "I");
TYPEATTRFc.typekind = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "typekind", "I");
TYPEATTRFc.cFuncs = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "cFuncs", "S");
@@ -755,7 +532,7 @@ void cacheTYPEATTRFields(JNIEnv *env, jobject lpObject)
TYPEATTRFc.wTypeFlags = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "wTypeFlags", "S");
TYPEATTRFc.wMajorVerNum = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "wMajorVerNum", "S");
TYPEATTRFc.wMinorVerNum = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "wMinorVerNum", "S");
- TYPEATTRFc.tdescAlias_unionField = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "tdescAlias_unionField", I_J);
+ TYPEATTRFc.tdescAlias_unionField = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "tdescAlias_unionField", "J");
TYPEATTRFc.tdescAlias_vt = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "tdescAlias_vt", "S");
TYPEATTRFc.idldescType_dwReserved = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "idldescType_dwReserved", "I");
TYPEATTRFc.idldescType_wIDLFlags = (*env)->GetFieldID(env, TYPEATTRFc.clazz, "idldescType_wIDLFlags", "S");
@@ -776,7 +553,7 @@ TYPEATTR *getTYPEATTRFields(JNIEnv *env, jobject lpObject, TYPEATTR *lpStruct)
lpStruct->dwReserved = (*env)->GetIntField(env, lpObject, TYPEATTRFc.dwReserved);
lpStruct->memidConstructor = (*env)->GetIntField(env, lpObject, TYPEATTRFc.memidConstructor);
lpStruct->memidDestructor = (*env)->GetIntField(env, lpObject, TYPEATTRFc.memidDestructor);
- lpStruct->lpstrSchema = (OLECHAR FAR *)(*env)->GetIntLongField(env, lpObject, TYPEATTRFc.lpstrSchema);
+ lpStruct->lpstrSchema = (OLECHAR FAR *)(*env)->GetLongField(env, lpObject, TYPEATTRFc.lpstrSchema);
lpStruct->cbSizeInstance = (*env)->GetIntField(env, lpObject, TYPEATTRFc.cbSizeInstance);
lpStruct->typekind = (*env)->GetIntField(env, lpObject, TYPEATTRFc.typekind);
lpStruct->cFuncs = (*env)->GetShortField(env, lpObject, TYPEATTRFc.cFuncs);
@@ -787,7 +564,7 @@ TYPEATTR *getTYPEATTRFields(JNIEnv *env, jobject lpObject, TYPEATTR *lpStruct)
lpStruct->wTypeFlags = (*env)->GetShortField(env, lpObject, TYPEATTRFc.wTypeFlags);
lpStruct->wMajorVerNum = (*env)->GetShortField(env, lpObject, TYPEATTRFc.wMajorVerNum);
lpStruct->wMinorVerNum = (*env)->GetShortField(env, lpObject, TYPEATTRFc.wMinorVerNum);
- lpStruct->tdescAlias.lptdesc = (struct FARSTRUCT tagTYPEDESC FAR *)(*env)->GetIntLongField(env, lpObject, TYPEATTRFc.tdescAlias_unionField);
+ lpStruct->tdescAlias.lptdesc = (struct FARSTRUCT tagTYPEDESC FAR *)(*env)->GetLongField(env, lpObject, TYPEATTRFc.tdescAlias_unionField);
lpStruct->tdescAlias.vt = (*env)->GetShortField(env, lpObject, TYPEATTRFc.tdescAlias_vt);
lpStruct->idldescType.dwReserved = (*env)->GetIntField(env, lpObject, TYPEATTRFc.idldescType_dwReserved);
lpStruct->idldescType.wIDLFlags = (*env)->GetShortField(env, lpObject, TYPEATTRFc.idldescType_wIDLFlags);
@@ -808,7 +585,7 @@ void setTYPEATTRFields(JNIEnv *env, jobject lpObject, TYPEATTR *lpStruct)
(*env)->SetIntField(env, lpObject, TYPEATTRFc.dwReserved, (jint)lpStruct->dwReserved);
(*env)->SetIntField(env, lpObject, TYPEATTRFc.memidConstructor, (jint)lpStruct->memidConstructor);
(*env)->SetIntField(env, lpObject, TYPEATTRFc.memidDestructor, (jint)lpStruct->memidDestructor);
- (*env)->SetIntLongField(env, lpObject, TYPEATTRFc.lpstrSchema, (jintLong)lpStruct->lpstrSchema);
+ (*env)->SetLongField(env, lpObject, TYPEATTRFc.lpstrSchema, (jlong)lpStruct->lpstrSchema);
(*env)->SetIntField(env, lpObject, TYPEATTRFc.cbSizeInstance, (jint)lpStruct->cbSizeInstance);
(*env)->SetIntField(env, lpObject, TYPEATTRFc.typekind, (jint)lpStruct->typekind);
(*env)->SetShortField(env, lpObject, TYPEATTRFc.cFuncs, (jshort)lpStruct->cFuncs);
@@ -819,7 +596,7 @@ void setTYPEATTRFields(JNIEnv *env, jobject lpObject, TYPEATTR *lpStruct)
(*env)->SetShortField(env, lpObject, TYPEATTRFc.wTypeFlags, (jshort)lpStruct->wTypeFlags);
(*env)->SetShortField(env, lpObject, TYPEATTRFc.wMajorVerNum, (jshort)lpStruct->wMajorVerNum);
(*env)->SetShortField(env, lpObject, TYPEATTRFc.wMinorVerNum, (jshort)lpStruct->wMinorVerNum);
- (*env)->SetIntLongField(env, lpObject, TYPEATTRFc.tdescAlias_unionField, (jintLong)lpStruct->tdescAlias.lptdesc);
+ (*env)->SetLongField(env, lpObject, TYPEATTRFc.tdescAlias_unionField, (jlong)lpStruct->tdescAlias.lptdesc);
(*env)->SetShortField(env, lpObject, TYPEATTRFc.tdescAlias_vt, (jshort)lpStruct->tdescAlias.vt);
(*env)->SetIntField(env, lpObject, TYPEATTRFc.idldescType_dwReserved, (jint)lpStruct->idldescType.dwReserved);
(*env)->SetShortField(env, lpObject, TYPEATTRFc.idldescType_wIDLFlags, (jshort)lpStruct->idldescType.wIDLFlags);
@@ -840,11 +617,11 @@ void cacheVARDESCFields(JNIEnv *env, jobject lpObject)
if (VARDESCFc.cached) return;
VARDESCFc.clazz = (*env)->GetObjectClass(env, lpObject);
VARDESCFc.memid = (*env)->GetFieldID(env, VARDESCFc.clazz, "memid", "I");
- VARDESCFc.lpstrSchema = (*env)->GetFieldID(env, VARDESCFc.clazz, "lpstrSchema", I_J);
+ VARDESCFc.lpstrSchema = (*env)->GetFieldID(env, VARDESCFc.clazz, "lpstrSchema", "J");
VARDESCFc.oInst = (*env)->GetFieldID(env, VARDESCFc.clazz, "oInst", "I");
- VARDESCFc.elemdescVar_tdesc_union = (*env)->GetFieldID(env, VARDESCFc.clazz, "elemdescVar_tdesc_union", I_J);
+ VARDESCFc.elemdescVar_tdesc_union = (*env)->GetFieldID(env, VARDESCFc.clazz, "elemdescVar_tdesc_union", "J");
VARDESCFc.elemdescVar_tdesc_vt = (*env)->GetFieldID(env, VARDESCFc.clazz, "elemdescVar_tdesc_vt", "S");
- VARDESCFc.elemdescVar_paramdesc_pparamdescex = (*env)->GetFieldID(env, VARDESCFc.clazz, "elemdescVar_paramdesc_pparamdescex", I_J);
+ VARDESCFc.elemdescVar_paramdesc_pparamdescex = (*env)->GetFieldID(env, VARDESCFc.clazz, "elemdescVar_paramdesc_pparamdescex", "J");
VARDESCFc.elemdescVar_paramdesc_wParamFlags = (*env)->GetFieldID(env, VARDESCFc.clazz, "elemdescVar_paramdesc_wParamFlags", "S");
VARDESCFc.wVarFlags = (*env)->GetFieldID(env, VARDESCFc.clazz, "wVarFlags", "S");
VARDESCFc.varkind = (*env)->GetFieldID(env, VARDESCFc.clazz, "varkind", "I");
@@ -855,11 +632,11 @@ VARDESC *getVARDESCFields(JNIEnv *env, jobject lpObject, VARDESC *lpStruct)
{
if (!VARDESCFc.cached) cacheVARDESCFields(env, lpObject);
lpStruct->memid = (*env)->GetIntField(env, lpObject, VARDESCFc.memid);
- lpStruct->lpstrSchema = (OLECHAR FAR *)(*env)->GetIntLongField(env, lpObject, VARDESCFc.lpstrSchema);
+ lpStruct->lpstrSchema = (OLECHAR FAR *)(*env)->GetLongField(env, lpObject, VARDESCFc.lpstrSchema);
lpStruct->oInst = (*env)->GetIntField(env, lpObject, VARDESCFc.oInst);
- lpStruct->elemdescVar.tdesc.lptdesc = (struct FARSTRUCT tagTYPEDESC FAR *)(*env)->GetIntLongField(env, lpObject, VARDESCFc.elemdescVar_tdesc_union);
+ lpStruct->elemdescVar.tdesc.lptdesc = (struct FARSTRUCT tagTYPEDESC FAR *)(*env)->GetLongField(env, lpObject, VARDESCFc.elemdescVar_tdesc_union);
lpStruct->elemdescVar.tdesc.vt = (*env)->GetShortField(env, lpObject, VARDESCFc.elemdescVar_tdesc_vt);
- lpStruct->elemdescVar.paramdesc.pparamdescex = (LPPARAMDESCEX)(*env)->GetIntLongField(env, lpObject, VARDESCFc.elemdescVar_paramdesc_pparamdescex);
+ lpStruct->elemdescVar.paramdesc.pparamdescex = (LPPARAMDESCEX)(*env)->GetLongField(env, lpObject, VARDESCFc.elemdescVar_paramdesc_pparamdescex);
lpStruct->elemdescVar.paramdesc.wParamFlags = (*env)->GetShortField(env, lpObject, VARDESCFc.elemdescVar_paramdesc_wParamFlags);
lpStruct->wVarFlags = (*env)->GetShortField(env, lpObject, VARDESCFc.wVarFlags);
lpStruct->varkind = (*env)->GetIntField(env, lpObject, VARDESCFc.varkind);
@@ -870,11 +647,11 @@ void setVARDESCFields(JNIEnv *env, jobject lpObject, VARDESC *lpStruct)
{
if (!VARDESCFc.cached) cacheVARDESCFields(env, lpObject);
(*env)->SetIntField(env, lpObject, VARDESCFc.memid, (jint)lpStruct->memid);
- (*env)->SetIntLongField(env, lpObject, VARDESCFc.lpstrSchema, (jintLong)lpStruct->lpstrSchema);
+ (*env)->SetLongField(env, lpObject, VARDESCFc.lpstrSchema, (jlong)lpStruct->lpstrSchema);
(*env)->SetIntField(env, lpObject, VARDESCFc.oInst, (jint)lpStruct->oInst);
- (*env)->SetIntLongField(env, lpObject, VARDESCFc.elemdescVar_tdesc_union, (jintLong)lpStruct->elemdescVar.tdesc.lptdesc);
+ (*env)->SetLongField(env, lpObject, VARDESCFc.elemdescVar_tdesc_union, (jlong)lpStruct->elemdescVar.tdesc.lptdesc);
(*env)->SetShortField(env, lpObject, VARDESCFc.elemdescVar_tdesc_vt, (jshort)lpStruct->elemdescVar.tdesc.vt);
- (*env)->SetIntLongField(env, lpObject, VARDESCFc.elemdescVar_paramdesc_pparamdescex, (jintLong)lpStruct->elemdescVar.paramdesc.pparamdescex);
+ (*env)->SetLongField(env, lpObject, VARDESCFc.elemdescVar_paramdesc_pparamdescex, (jlong)lpStruct->elemdescVar.paramdesc.pparamdescex);
(*env)->SetShortField(env, lpObject, VARDESCFc.elemdescVar_paramdesc_wParamFlags, (jshort)lpStruct->elemdescVar.paramdesc.wParamFlags);
(*env)->SetShortField(env, lpObject, VARDESCFc.wVarFlags, (jshort)lpStruct->wVarFlags);
(*env)->SetIntField(env, lpObject, VARDESCFc.varkind, (jint)lpStruct->varkind);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.h
index 73266764ce..0a84aa3bb5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com_structs.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -41,18 +41,6 @@ void setCONTROLINFOFields(JNIEnv *env, jobject lpObject, CONTROLINFO *lpStruct);
#define CONTROLINFO_sizeof() 0
#endif
-#ifndef NO_COSERVERINFO
-void cacheCOSERVERINFOFields(JNIEnv *env, jobject lpObject);
-COSERVERINFO *getCOSERVERINFOFields(JNIEnv *env, jobject lpObject, COSERVERINFO *lpStruct);
-void setCOSERVERINFOFields(JNIEnv *env, jobject lpObject, COSERVERINFO *lpStruct);
-#define COSERVERINFO_sizeof() sizeof(COSERVERINFO)
-#else
-#define cacheCOSERVERINFOFields(a,b)
-#define getCOSERVERINFOFields(a,b,c) NULL
-#define setCOSERVERINFOFields(a,b,c)
-#define COSERVERINFO_sizeof() 0
-#endif
-
#ifndef NO_DISPPARAMS
void cacheDISPPARAMSFields(JNIEnv *env, jobject lpObject);
DISPPARAMS *getDISPPARAMSFields(JNIEnv *env, jobject lpObject, DISPPARAMS *lpStruct);
@@ -65,18 +53,6 @@ void setDISPPARAMSFields(JNIEnv *env, jobject lpObject, DISPPARAMS *lpStruct);
#define DISPPARAMS_sizeof() 0
#endif
-#ifndef NO_DVTARGETDEVICE
-void cacheDVTARGETDEVICEFields(JNIEnv *env, jobject lpObject);
-DVTARGETDEVICE *getDVTARGETDEVICEFields(JNIEnv *env, jobject lpObject, DVTARGETDEVICE *lpStruct);
-void setDVTARGETDEVICEFields(JNIEnv *env, jobject lpObject, DVTARGETDEVICE *lpStruct);
-#define DVTARGETDEVICE_sizeof() sizeof(DVTARGETDEVICE)
-#else
-#define cacheDVTARGETDEVICEFields(a,b)
-#define getDVTARGETDEVICEFields(a,b,c) NULL
-#define setDVTARGETDEVICEFields(a,b,c)
-#define DVTARGETDEVICE_sizeof() 0
-#endif
-
#ifndef NO_EXCEPINFO
void cacheEXCEPINFOFields(JNIEnv *env, jobject lpObject);
EXCEPINFO *getEXCEPINFOFields(JNIEnv *env, jobject lpObject, EXCEPINFO *lpStruct);
@@ -149,18 +125,6 @@ void setOLECMDFields(JNIEnv *env, jobject lpObject, OLECMD *lpStruct);
#define OLECMD_sizeof() 0
#endif
-#ifndef NO_OLECMDTEXT
-void cacheOLECMDTEXTFields(JNIEnv *env, jobject lpObject);
-OLECMDTEXT *getOLECMDTEXTFields(JNIEnv *env, jobject lpObject, OLECMDTEXT *lpStruct);
-void setOLECMDTEXTFields(JNIEnv *env, jobject lpObject, OLECMDTEXT *lpStruct);
-#define OLECMDTEXT_sizeof() sizeof(OLECMDTEXT)
-#else
-#define cacheOLECMDTEXTFields(a,b)
-#define getOLECMDTEXTFields(a,b,c) NULL
-#define setOLECMDTEXTFields(a,b,c)
-#define OLECMDTEXT_sizeof() 0
-#endif
-
#ifndef NO_OLEINPLACEFRAMEINFO
void cacheOLEINPLACEFRAMEINFOFields(JNIEnv *env, jobject lpObject);
OLEINPLACEFRAMEINFO *getOLEINPLACEFRAMEINFOFields(JNIEnv *env, jobject lpObject, OLEINPLACEFRAMEINFO *lpStruct);
@@ -173,18 +137,6 @@ void setOLEINPLACEFRAMEINFOFields(JNIEnv *env, jobject lpObject, OLEINPLACEFRAME
#define OLEINPLACEFRAMEINFO_sizeof() 0
#endif
-#ifndef NO_STATSTG
-void cacheSTATSTGFields(JNIEnv *env, jobject lpObject);
-STATSTG *getSTATSTGFields(JNIEnv *env, jobject lpObject, STATSTG *lpStruct);
-void setSTATSTGFields(JNIEnv *env, jobject lpObject, STATSTG *lpStruct);
-#define STATSTG_sizeof() sizeof(STATSTG)
-#else
-#define cacheSTATSTGFields(a,b)
-#define getSTATSTGFields(a,b,c) NULL
-#define setSTATSTGFields(a,b,c)
-#define STATSTG_sizeof() 0
-#endif
-
#ifndef NO_STGMEDIUM
void cacheSTGMEDIUMFields(JNIEnv *env, jobject lpObject);
STGMEDIUM *getSTGMEDIUMFields(JNIEnv *env, jobject lpObject, STGMEDIUM *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip.cpp b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip.cpp
index b31aa2b56d..4346678b24 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip.cpp
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip.cpp
@@ -24,9 +24,9 @@
#endif
#ifndef NO_BitmapData_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(BitmapData_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(BitmapData_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(BitmapData_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, BitmapData_1delete_FUNC);
delete (BitmapData *)arg0;
@@ -35,56 +35,56 @@ JNIEXPORT void JNICALL Gdip_NATIVE(BitmapData_1delete)
#endif
#ifndef NO_BitmapData_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(BitmapData_1new)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(BitmapData_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(BitmapData_1new)(JNIEnv *env, jclass that);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(BitmapData_1new)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, BitmapData_1new_FUNC);
- rc = (jintLong)new BitmapData();
+ rc = (jlong)new BitmapData();
Gdip_NATIVE_EXIT(env, that, BitmapData_1new_FUNC);
return rc;
}
#endif
#ifndef NO_Bitmap_1GetHBITMAP
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1GetHBITMAP)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLongArray arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1GetHBITMAP)(JNIEnv *env, jclass that, jlong arg0, jint arg1, jlongArray arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1GetHBITMAP)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLongArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlongArray arg2)
{
- jintLong *lparg2=NULL;
+ jlong *lparg2=NULL;
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Bitmap_1GetHBITMAP_FUNC);
- if (arg2) if ((lparg2 = env->GetIntLongArrayElements(arg2, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = env->GetLongArrayElements(arg2, NULL)) == NULL) goto fail;
rc = (jint)((Bitmap*)arg0)->GetHBITMAP((Color)arg1, (HBITMAP*)lparg2);
fail:
- if (arg2 && lparg2) env->ReleaseIntLongArrayElements(arg2, lparg2, 0);
+ if (arg2 && lparg2) env->ReleaseLongArrayElements(arg2, lparg2, 0);
Gdip_NATIVE_EXIT(env, that, Bitmap_1GetHBITMAP_FUNC);
return rc;
}
#endif
#ifndef NO_Bitmap_1GetHICON
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1GetHICON)(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1GetHICON)(JNIEnv *env, jclass that, jlong arg0, jlongArray arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1GetHICON)
- (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
- jintLong *lparg1=NULL;
+ jlong *lparg1=NULL;
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Bitmap_1GetHICON_FUNC);
- if (arg1) if ((lparg1 = env->GetIntLongArrayElements(arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = env->GetLongArrayElements(arg1, NULL)) == NULL) goto fail;
rc = (jint)((Bitmap*)arg0)->GetHICON((HICON*)lparg1);
fail:
- if (arg1 && lparg1) env->ReleaseIntLongArrayElements(arg1, lparg1, 0);
+ if (arg1 && lparg1) env->ReleaseLongArrayElements(arg1, lparg1, 0);
Gdip_NATIVE_EXIT(env, that, Bitmap_1GetHICON_FUNC);
return rc;
}
#endif
#ifndef NO_Bitmap_1LockBits
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1LockBits)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1LockBits)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jlong arg4);
JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1LockBits)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jlong arg4)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Bitmap_1LockBits_FUNC);
@@ -95,9 +95,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1LockBits)
#endif
#ifndef NO_Bitmap_1UnlockBits
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1UnlockBits)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1UnlockBits)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1UnlockBits)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Bitmap_1UnlockBits_FUNC);
@@ -108,9 +108,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Bitmap_1UnlockBits)
#endif
#ifndef NO_Bitmap_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Bitmap_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Bitmap_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(Bitmap_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, Bitmap_1delete_FUNC);
delete (Bitmap *)arg0;
@@ -118,91 +118,55 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Bitmap_1delete)
}
#endif
-#if (!defined(NO_Bitmap_1new__I) && !defined(JNI64)) || (!defined(NO_Bitmap_1new__J) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__I)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__I)(JNIEnv *env, jclass that, jintLong arg0)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__J)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__J)(JNIEnv *env, jclass that, jintLong arg0)
-#endif
+#ifndef NO_Bitmap_1new__IIIIJ
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new__IIIIJ)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jlong arg4);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new__IIIIJ)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jlong arg4)
{
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Bitmap_1new__I_FUNC);
-#else
- Gdip_NATIVE_ENTER(env, that, Bitmap_1new__J_FUNC);
-#endif
- rc = (jintLong)new Bitmap((HICON)arg0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Bitmap_1new__I_FUNC);
-#else
- Gdip_NATIVE_EXIT(env, that, Bitmap_1new__J_FUNC);
-#endif
+ jlong rc = 0;
+ Gdip_NATIVE_ENTER(env, that, Bitmap_1new__IIIIJ_FUNC);
+ rc = (jlong)new Bitmap(arg0, arg1, arg2, (PixelFormat)arg3, (BYTE *)arg4);
+ Gdip_NATIVE_EXIT(env, that, Bitmap_1new__IIIIJ_FUNC);
return rc;
}
#endif
-#if (!defined(NO_Bitmap_1new__II) && !defined(JNI64)) || (!defined(NO_Bitmap_1new__JJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#endif
+#ifndef NO_Bitmap_1new__J
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new__J)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new__J)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Bitmap_1new__II_FUNC);
-#else
- Gdip_NATIVE_ENTER(env, that, Bitmap_1new__JJ_FUNC);
-#endif
- rc = (jintLong)new Bitmap((HBITMAP)arg0, (HPALETTE)arg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Bitmap_1new__II_FUNC);
-#else
- Gdip_NATIVE_EXIT(env, that, Bitmap_1new__JJ_FUNC);
-#endif
+ jlong rc = 0;
+ Gdip_NATIVE_ENTER(env, that, Bitmap_1new__J_FUNC);
+ rc = (jlong)new Bitmap((HICON)arg0);
+ Gdip_NATIVE_EXIT(env, that, Bitmap_1new__J_FUNC);
return rc;
}
#endif
-#if (!defined(NO_Bitmap_1new__IIIII) && !defined(JNI64)) || (!defined(NO_Bitmap_1new__IIIIJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__IIIII)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintLong arg4);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__IIIII)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintLong arg4)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__IIIIJ)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintLong arg4);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new__IIIIJ)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintLong arg4)
-#endif
+#ifndef NO_Bitmap_1new__JJ
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new__JJ)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new__JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Bitmap_1new__IIIII_FUNC);
-#else
- Gdip_NATIVE_ENTER(env, that, Bitmap_1new__IIIIJ_FUNC);
-#endif
- rc = (jintLong)new Bitmap(arg0, arg1, arg2, (PixelFormat)arg3, (BYTE *)arg4);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Bitmap_1new__IIIII_FUNC);
-#else
- Gdip_NATIVE_EXIT(env, that, Bitmap_1new__IIIIJ_FUNC);
-#endif
+ jlong rc = 0;
+ Gdip_NATIVE_ENTER(env, that, Bitmap_1new__JJ_FUNC);
+ rc = (jlong)new Bitmap((HBITMAP)arg0, (HPALETTE)arg1);
+ Gdip_NATIVE_EXIT(env, that, Bitmap_1new__JJ_FUNC);
return rc;
}
#endif
#ifndef NO_Bitmap_1new___3CZ
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new___3CZ)(JNIEnv *env, jclass that, jcharArray arg0, jboolean arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Bitmap_1new___3CZ)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new___3CZ)(JNIEnv *env, jclass that, jcharArray arg0, jboolean arg1);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Bitmap_1new___3CZ)
(JNIEnv *env, jclass that, jcharArray arg0, jboolean arg1)
{
jchar *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Bitmap_1new___3CZ_FUNC);
if (arg0) if ((lparg0 = env->GetCharArrayElements(arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)new Bitmap((WCHAR*)lparg0, arg1);
+ rc = (jlong)new Bitmap((WCHAR*)lparg0, arg1);
fail:
if (arg0 && lparg0) env->ReleaseCharArrayElements(arg0, lparg0, 0);
Gdip_NATIVE_EXIT(env, that, Bitmap_1new___3CZ_FUNC);
@@ -211,22 +175,22 @@ fail:
#endif
#ifndef NO_Brush_1Clone
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Brush_1Clone)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Brush_1Clone)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Brush_1Clone)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Brush_1Clone)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Brush_1Clone_FUNC);
- rc = (jintLong)((Brush *)arg0)->Clone();
+ rc = (jlong)((Brush *)arg0)->Clone();
Gdip_NATIVE_EXIT(env, that, Brush_1Clone_FUNC);
return rc;
}
#endif
#ifndef NO_Brush_1GetType
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Brush_1GetType)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Brush_1GetType)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Brush_1GetType)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Brush_1GetType_FUNC);
@@ -250,9 +214,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(ColorPalette_1sizeof)
#endif
#ifndef NO_FontFamily_1GetFamilyName
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(FontFamily_1GetFamilyName)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jchar arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(FontFamily_1GetFamilyName)(JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jchar arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(FontFamily_1GetFamilyName)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jchar arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jchar arg2)
{
jchar *lparg1=NULL;
jint rc = 0;
@@ -267,9 +231,9 @@ fail:
#endif
#ifndef NO_FontFamily_1IsAvailable
-extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(FontFamily_1IsAvailable)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(FontFamily_1IsAvailable)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jboolean JNICALL Gdip_NATIVE(FontFamily_1IsAvailable)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
Gdip_NATIVE_ENTER(env, that, FontFamily_1IsAvailable_FUNC);
@@ -280,9 +244,9 @@ JNIEXPORT jboolean JNICALL Gdip_NATIVE(FontFamily_1IsAvailable)
#endif
#ifndef NO_FontFamily_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(FontFamily_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(FontFamily_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(FontFamily_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, FontFamily_1delete_FUNC);
delete (FontFamily *)arg0;
@@ -291,51 +255,39 @@ JNIEXPORT void JNICALL Gdip_NATIVE(FontFamily_1delete)
#endif
#ifndef NO_FontFamily_1new__
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(FontFamily_1new__)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(FontFamily_1new__)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(FontFamily_1new__)(JNIEnv *env, jclass that);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(FontFamily_1new__)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, FontFamily_1new___FUNC);
- rc = (jintLong)new FontFamily();
+ rc = (jlong)new FontFamily();
Gdip_NATIVE_EXIT(env, that, FontFamily_1new___FUNC);
return rc;
}
#endif
-#if (!defined(NO_FontFamily_1new___3CI) && !defined(JNI64)) || (!defined(NO_FontFamily_1new___3CJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(FontFamily_1new___3CI)(JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(FontFamily_1new___3CI)(JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(FontFamily_1new___3CJ)(JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(FontFamily_1new___3CJ)(JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1)
-#endif
+#ifndef NO_FontFamily_1new___3CJ
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(FontFamily_1new___3CJ)(JNIEnv *env, jclass that, jcharArray arg0, jlong arg1);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(FontFamily_1new___3CJ)
+ (JNIEnv *env, jclass that, jcharArray arg0, jlong arg1)
{
jchar *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, FontFamily_1new___3CI_FUNC);
-#else
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, FontFamily_1new___3CJ_FUNC);
-#endif
if (arg0) if ((lparg0 = env->GetCharArrayElements(arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)new FontFamily((const WCHAR *)lparg0, (const FontCollection *)arg1);
+ rc = (jlong)new FontFamily((const WCHAR *)lparg0, (const FontCollection *)arg1);
fail:
if (arg0 && lparg0) env->ReleaseCharArrayElements(arg0, lparg0, 0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, FontFamily_1new___3CI_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, FontFamily_1new___3CJ_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Font_1GetFamily
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetFamily)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetFamily)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetFamily)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1GetFamily_FUNC);
@@ -346,9 +298,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetFamily)
#endif
#ifndef NO_Font_1GetLogFontW
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetLogFontW)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetLogFontW)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetLogFontW)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1GetLogFontW_FUNC);
@@ -359,9 +311,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetLogFontW)
#endif
#ifndef NO_Font_1GetSize
-extern "C" JNIEXPORT jfloat JNICALL Gdip_NATIVE(Font_1GetSize)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jfloat JNICALL Gdip_NATIVE(Font_1GetSize)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jfloat JNICALL Gdip_NATIVE(Font_1GetSize)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jfloat rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1GetSize_FUNC);
@@ -372,9 +324,9 @@ JNIEXPORT jfloat JNICALL Gdip_NATIVE(Font_1GetSize)
#endif
#ifndef NO_Font_1GetStyle
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetStyle)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetStyle)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetStyle)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1GetStyle_FUNC);
@@ -385,9 +337,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Font_1GetStyle)
#endif
#ifndef NO_Font_1IsAvailable
-extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(Font_1IsAvailable)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(Font_1IsAvailable)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jboolean JNICALL Gdip_NATIVE(Font_1IsAvailable)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1IsAvailable_FUNC);
@@ -398,9 +350,9 @@ JNIEXPORT jboolean JNICALL Gdip_NATIVE(Font_1IsAvailable)
#endif
#ifndef NO_Font_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Font_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Font_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(Font_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, Font_1delete_FUNC);
delete (Font *)arg0;
@@ -408,89 +360,53 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Font_1delete)
}
#endif
-#if (!defined(NO_Font_1new__IFII) && !defined(JNI64)) || (!defined(NO_Font_1new__JFII) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__IFII)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2, jint arg3);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__IFII)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2, jint arg3)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__JFII)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2, jint arg3);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__JFII)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2, jint arg3)
-#endif
+#ifndef NO_Font_1new__JFII
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Font_1new__JFII)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jint arg2, jint arg3);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Font_1new__JFII)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jint arg2, jint arg3)
{
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Font_1new__IFII_FUNC);
-#else
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1new__JFII_FUNC);
-#endif
- rc = (jintLong)new Font((const FontFamily *)arg0, (REAL)arg1, (INT)arg2, (Unit)arg3);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Font_1new__IFII_FUNC);
-#else
+ rc = (jlong)new Font((const FontFamily *)arg0, (REAL)arg1, (INT)arg2, (Unit)arg3);
Gdip_NATIVE_EXIT(env, that, Font_1new__JFII_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Font_1new__II) && !defined(JNI64)) || (!defined(NO_Font_1new__JJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#endif
+#ifndef NO_Font_1new__JJ
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Font_1new__JJ)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Font_1new__JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Font_1new__II_FUNC);
-#else
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1new__JJ_FUNC);
-#endif
- rc = (jintLong)new Font((HDC)arg0, (HFONT)arg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Font_1new__II_FUNC);
-#else
+ rc = (jlong)new Font((HDC)arg0, (HFONT)arg1);
Gdip_NATIVE_EXIT(env, that, Font_1new__JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Font_1new___3CFIII) && !defined(JNI64)) || (!defined(NO_Font_1new___3CFIIJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new___3CFIII)(JNIEnv *env, jclass that, jcharArray arg0, jfloat arg1, jint arg2, jint arg3, jintLong arg4);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new___3CFIII)(JNIEnv *env, jclass that, jcharArray arg0, jfloat arg1, jint arg2, jint arg3, jintLong arg4)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new___3CFIIJ)(JNIEnv *env, jclass that, jcharArray arg0, jfloat arg1, jint arg2, jint arg3, jintLong arg4);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Font_1new___3CFIIJ)(JNIEnv *env, jclass that, jcharArray arg0, jfloat arg1, jint arg2, jint arg3, jintLong arg4)
-#endif
+#ifndef NO_Font_1new___3CFIIJ
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Font_1new___3CFIIJ)(JNIEnv *env, jclass that, jcharArray arg0, jfloat arg1, jint arg2, jint arg3, jlong arg4);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Font_1new___3CFIIJ)
+ (JNIEnv *env, jclass that, jcharArray arg0, jfloat arg1, jint arg2, jint arg3, jlong arg4)
{
jchar *lparg0=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Font_1new___3CFIII_FUNC);
-#else
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Font_1new___3CFIIJ_FUNC);
-#endif
if (arg0) if ((lparg0 = env->GetCharArrayElements(arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)new Font((const WCHAR *)lparg0, (REAL)arg1, (INT)arg2, (Unit)arg3, (const FontCollection *)arg4);
+ rc = (jlong)new Font((const WCHAR *)lparg0, (REAL)arg1, (INT)arg2, (Unit)arg3, (const FontCollection *)arg4);
fail:
if (arg0 && lparg0) env->ReleaseCharArrayElements(arg0, lparg0, 0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Font_1new___3CFIII_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Font_1new___3CFIIJ_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_GdiplusShutdown
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(GdiplusShutdown)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(GdiplusShutdown)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(GdiplusShutdown)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, GdiplusShutdown_FUNC);
GdiplusShutdown((ULONG_PTR)arg0);
@@ -499,20 +415,20 @@ JNIEXPORT void JNICALL Gdip_NATIVE(GdiplusShutdown)
#endif
#ifndef NO_GdiplusStartup
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GdiplusStartup)(JNIEnv *env, jclass that, jintLongArray arg0, jobject arg1, jintLong arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GdiplusStartup)(JNIEnv *env, jclass that, jlongArray arg0, jobject arg1, jlong arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(GdiplusStartup)
- (JNIEnv *env, jclass that, jintLongArray arg0, jobject arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlongArray arg0, jobject arg1, jlong arg2)
{
- jintLong *lparg0=NULL;
+ jlong *lparg0=NULL;
GdiplusStartupInput _arg1, *lparg1=NULL;
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GdiplusStartup_FUNC);
- if (arg0) if ((lparg0 = env->GetIntLongArrayElements(arg0, NULL)) == NULL) goto fail;
+ if (arg0) if ((lparg0 = env->GetLongArrayElements(arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = getGdiplusStartupInputFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jint)GdiplusStartup((ULONG_PTR *)lparg0, (const GdiplusStartupInput *)lparg1, (GdiplusStartupOutput *)arg2);
fail:
if (arg1 && lparg1) setGdiplusStartupInputFields(env, arg1, lparg1);
- if (arg0 && lparg0) env->ReleaseIntLongArrayElements(arg0, lparg0, 0);
+ if (arg0 && lparg0) env->ReleaseLongArrayElements(arg0, lparg0, 0);
Gdip_NATIVE_EXIT(env, that, GdiplusStartup_FUNC);
return rc;
}
@@ -532,9 +448,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GdiplusStartupInput_1sizeof)
#endif
#ifndef NO_GraphicsPath_1AddArc
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddArc)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddArc)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddArc)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1AddArc_FUNC);
@@ -545,9 +461,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddArc)
#endif
#ifndef NO_GraphicsPath_1AddBezier
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddBezier)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6, jfloat arg7, jfloat arg8);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddBezier)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6, jfloat arg7, jfloat arg8);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddBezier)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6, jfloat arg7, jfloat arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6, jfloat arg7, jfloat arg8)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1AddBezier_FUNC);
@@ -558,9 +474,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddBezier)
#endif
#ifndef NO_GraphicsPath_1AddLine
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddLine)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddLine)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddLine)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1AddLine_FUNC);
@@ -571,9 +487,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddLine)
#endif
#ifndef NO_GraphicsPath_1AddPath
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddPath)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddPath)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddPath)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1AddPath_FUNC);
@@ -584,9 +500,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddPath)
#endif
#ifndef NO_GraphicsPath_1AddRectangle
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddRectangle)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddRectangle)(JNIEnv *env, jclass that, jlong arg0, jobject arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddRectangle)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RectF _arg1, *lparg1=NULL;
jint rc = 0;
@@ -601,9 +517,9 @@ fail:
#endif
#ifndef NO_GraphicsPath_1AddString
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddString)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jint arg4, jfloat arg5, jobject arg6, jintLong arg7);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddString)(JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jint arg4, jfloat arg5, jobject arg6, jlong arg7);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1AddString)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jint arg4, jfloat arg5, jobject arg6, jintLong arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jint arg4, jfloat arg5, jobject arg6, jlong arg7)
{
jchar *lparg1=NULL;
PointF _arg6, *lparg6=NULL;
@@ -621,22 +537,22 @@ fail:
#endif
#ifndef NO_GraphicsPath_1Clone
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(GraphicsPath_1Clone)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(GraphicsPath_1Clone)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(GraphicsPath_1Clone)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(GraphicsPath_1Clone)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1Clone_FUNC);
- rc = (jintLong)((GraphicsPath *)arg0)->Clone();
+ rc = (jlong)((GraphicsPath *)arg0)->Clone();
Gdip_NATIVE_EXIT(env, that, GraphicsPath_1Clone_FUNC);
return rc;
}
#endif
#ifndef NO_GraphicsPath_1CloseFigure
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1CloseFigure)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1CloseFigure)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1CloseFigure)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1CloseFigure_FUNC);
@@ -647,9 +563,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1CloseFigure)
#endif
#ifndef NO_GraphicsPath_1Flatten
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Flatten)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloat arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Flatten)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jfloat arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Flatten)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jfloat arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jfloat arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1Flatten_FUNC);
@@ -660,9 +576,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Flatten)
#endif
#ifndef NO_GraphicsPath_1GetBounds
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetBounds)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2, jintLong arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetBounds)(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2, jlong arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetBounds)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2, jlong arg3)
{
RectF _arg1, *lparg1=NULL;
jint rc = 0;
@@ -677,9 +593,9 @@ fail:
#endif
#ifndef NO_GraphicsPath_1GetLastPoint
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetLastPoint)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetLastPoint)(JNIEnv *env, jclass that, jlong arg0, jobject arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetLastPoint)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
PointF _arg1, *lparg1=NULL;
jint rc = 0;
@@ -694,9 +610,9 @@ fail:
#endif
#ifndef NO_GraphicsPath_1GetPathPoints
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPathPoints)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPathPoints)(JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPathPoints)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2)
{
jfloat *lparg1=NULL;
jint rc = 0;
@@ -711,9 +627,9 @@ fail:
#endif
#ifndef NO_GraphicsPath_1GetPathTypes
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPathTypes)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPathTypes)(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPathTypes)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
jint rc = 0;
@@ -728,9 +644,9 @@ fail:
#endif
#ifndef NO_GraphicsPath_1GetPointCount
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPointCount)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPointCount)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPointCount)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1GetPointCount_FUNC);
@@ -741,9 +657,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1GetPointCount)
#endif
#ifndef NO_GraphicsPath_1IsOutlineVisible
-extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsOutlineVisible)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jintLong arg3, jintLong arg4);
+extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsOutlineVisible)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jlong arg3, jlong arg4);
JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsOutlineVisible)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jintLong arg3, jintLong arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jlong arg3, jlong arg4)
{
jboolean rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1IsOutlineVisible_FUNC);
@@ -754,9 +670,9 @@ JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsOutlineVisible)
#endif
#ifndef NO_GraphicsPath_1IsVisible
-extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsVisible)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jintLong arg3);
+extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsVisible)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jlong arg3);
JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsVisible)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jlong arg3)
{
jboolean rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1IsVisible_FUNC);
@@ -767,9 +683,9 @@ JNIEXPORT jboolean JNICALL Gdip_NATIVE(GraphicsPath_1IsVisible)
#endif
#ifndef NO_GraphicsPath_1SetFillMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1SetFillMode)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1SetFillMode)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1SetFillMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1SetFillMode_FUNC);
@@ -780,9 +696,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1SetFillMode)
#endif
#ifndef NO_GraphicsPath_1StartFigure
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1StartFigure)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1StartFigure)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1StartFigure)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1StartFigure_FUNC);
@@ -793,9 +709,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1StartFigure)
#endif
#ifndef NO_GraphicsPath_1Transform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Transform)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Transform)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Transform)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1Transform_FUNC);
@@ -806,9 +722,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(GraphicsPath_1Transform)
#endif
#ifndef NO_GraphicsPath_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(GraphicsPath_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(GraphicsPath_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(GraphicsPath_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1delete_FUNC);
delete (GraphicsPath *)arg0;
@@ -817,30 +733,30 @@ JNIEXPORT void JNICALL Gdip_NATIVE(GraphicsPath_1delete)
#endif
#ifndef NO_GraphicsPath_1new__I
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(GraphicsPath_1new__I)(JNIEnv *env, jclass that, jint arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(GraphicsPath_1new__I)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(GraphicsPath_1new__I)(JNIEnv *env, jclass that, jint arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(GraphicsPath_1new__I)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1new__I_FUNC);
- rc = (jintLong)new GraphicsPath((FillMode)arg0);
+ rc = (jlong)new GraphicsPath((FillMode)arg0);
Gdip_NATIVE_EXIT(env, that, GraphicsPath_1new__I_FUNC);
return rc;
}
#endif
#ifndef NO_GraphicsPath_1new___3I_3BII
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(GraphicsPath_1new___3I_3BII)(JNIEnv *env, jclass that, jintArray arg0, jbyteArray arg1, jint arg2, jint arg3);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(GraphicsPath_1new___3I_3BII)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(GraphicsPath_1new___3I_3BII)(JNIEnv *env, jclass that, jintArray arg0, jbyteArray arg1, jint arg2, jint arg3);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(GraphicsPath_1new___3I_3BII)
(JNIEnv *env, jclass that, jintArray arg0, jbyteArray arg1, jint arg2, jint arg3)
{
jint *lparg0=NULL;
jbyte *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, GraphicsPath_1new___3I_3BII_FUNC);
if (arg0) if ((lparg0 = env->GetIntArrayElements(arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = env->GetByteArrayElements(arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)new GraphicsPath((const Point *)lparg0, (const BYTE *)lparg1, arg2, (FillMode)arg3);
+ rc = (jlong)new GraphicsPath((const Point *)lparg0, (const BYTE *)lparg1, arg2, (FillMode)arg3);
fail:
if (arg1 && lparg1) env->ReleaseByteArrayElements(arg1, lparg1, JNI_ABORT);
if (arg0 && lparg0) env->ReleaseIntArrayElements(arg0, lparg0, JNI_ABORT);
@@ -850,9 +766,9 @@ fail:
#endif
#ifndef NO_Graphics_1DrawArc
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawArc)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawArc)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawArc)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawArc_FUNC);
@@ -862,68 +778,44 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawArc)
}
#endif
-#if (!defined(NO_Graphics_1DrawDriverString__IIIIILorg_eclipse_swt_internal_gdip_PointF_2II) && !defined(JNI64)) || (!defined(NO_Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__IIIIILorg_eclipse_swt_internal_gdip_PointF_2II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jobject arg5, jint arg6, jintLong arg7);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__IIIIILorg_eclipse_swt_internal_gdip_PointF_2II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jobject arg5, jint arg6, jintLong arg7)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jobject arg5, jint arg6, jintLong arg7);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jobject arg5, jint arg6, jintLong arg7)
-#endif
+#ifndef NO_Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4, jobject arg5, jint arg6, jlong arg7);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4, jobject arg5, jint arg6, jlong arg7)
{
PointF _arg5, *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1DrawDriverString__IIIIILorg_eclipse_swt_internal_gdip_PointF_2II_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ_FUNC);
-#endif
if (arg5) if ((lparg5 = getPointFFields(env, arg5, &_arg5)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->DrawDriverString((const UINT16 *)arg1, arg2, (const Font *)arg3, (const Brush *)arg4, (const PointF *)lparg5, arg6, (const Matrix *)arg7);
fail:
if (arg5 && lparg5) setPointFFields(env, arg5, lparg5);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1DrawDriverString__IIIIILorg_eclipse_swt_internal_gdip_PointF_2II_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1DrawDriverString__IIIII_3FII) && !defined(JNI64)) || (!defined(NO_Graphics_1DrawDriverString__JJIJJ_3FIJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__IIIII_3FII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jfloatArray arg5, jint arg6, jintLong arg7);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__IIIII_3FII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jfloatArray arg5, jint arg6, jintLong arg7)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJ_3FIJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jfloatArray arg5, jint arg6, jintLong arg7);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJ_3FIJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jfloatArray arg5, jint arg6, jintLong arg7)
-#endif
+#ifndef NO_Graphics_1DrawDriverString__JJIJJ_3FIJ
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJ_3FIJ)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4, jfloatArray arg5, jint arg6, jlong arg7);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawDriverString__JJIJJ_3FIJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4, jfloatArray arg5, jint arg6, jlong arg7)
{
jfloat *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1DrawDriverString__IIIII_3FII_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawDriverString__JJIJJ_3FIJ_FUNC);
-#endif
if (arg5) if ((lparg5 = env->GetFloatArrayElements(arg5, NULL)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->DrawDriverString((const UINT16 *)arg1, arg2, (const Font *)arg3, (const Brush *)arg4, (const PointF *)lparg5, arg6, (const Matrix *)arg7);
fail:
if (arg5 && lparg5) env->ReleaseFloatArrayElements(arg5, lparg5, JNI_ABORT);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1DrawDriverString__IIIII_3FII_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1DrawDriverString__JJIJJ_3FIJ_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Graphics_1DrawEllipse
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawEllipse)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawEllipse)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawEllipse)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawEllipse_FUNC);
@@ -933,64 +825,40 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawEllipse)
}
#endif
-#if (!defined(NO_Graphics_1DrawImage__IIII) && !defined(JNI64)) || (!defined(NO_Graphics_1DrawImage__JJII) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__IIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__IIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
-#endif
+#ifndef NO_Graphics_1DrawImage__JJII
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJII)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJII)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1DrawImage__IIII_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawImage__JJII_FUNC);
-#endif
rc = (jint)((Graphics *)arg0)->DrawImage((Image *)arg1, (INT)arg2, (INT)arg3);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1DrawImage__IIII_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1DrawImage__JJII_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1DrawImage__IILorg_eclipse_swt_internal_gdip_Rect_2IIIIIIII) && !defined(JNI64)) || (!defined(NO_Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__IILorg_eclipse_swt_internal_gdip_Rect_2IIIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jintLong arg8, jintLong arg9, jintLong arg10);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__IILorg_eclipse_swt_internal_gdip_Rect_2IIIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jintLong arg8, jintLong arg9, jintLong arg10)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jintLong arg8, jintLong arg9, jintLong arg10);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jintLong arg8, jintLong arg9, jintLong arg10)
-#endif
+#ifndef NO_Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jlong arg8, jlong arg9, jlong arg10);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jlong arg8, jlong arg9, jlong arg10)
{
Rect _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1DrawImage__IILorg_eclipse_swt_internal_gdip_Rect_2IIIIIIII_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ_FUNC);
-#endif
if (arg2) if ((lparg2 = getRectFields(env, arg2, &_arg2)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->DrawImage((Image *)arg1, *(const Rect *)lparg2, (INT)arg3, (INT)arg4, (INT)arg5, (INT)arg6, (Unit)arg7, (ImageAttributes *)arg8, (DrawImageAbort)arg9, (VOID *)arg10);
fail:
if (arg2 && lparg2) setRectFields(env, arg2, lparg2);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1DrawImage__IILorg_eclipse_swt_internal_gdip_Rect_2IIIIIIII_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Graphics_1DrawLine
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawLine)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawLine)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawLine)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawLine_FUNC);
@@ -1001,9 +869,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawLine)
#endif
#ifndef NO_Graphics_1DrawLines
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawLines)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawLines)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawLines)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jint arg3)
{
jint *lparg2=NULL;
jint rc = 0;
@@ -1018,9 +886,9 @@ fail:
#endif
#ifndef NO_Graphics_1DrawPath
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawPath)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawPath)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawPath)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawPath_FUNC);
@@ -1031,9 +899,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawPath)
#endif
#ifndef NO_Graphics_1DrawPolygon
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawPolygon)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawPolygon)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawPolygon)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jint arg3)
{
jint *lparg2=NULL;
jint rc = 0;
@@ -1048,9 +916,9 @@ fail:
#endif
#ifndef NO_Graphics_1DrawRectangle
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawRectangle)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawRectangle)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawRectangle)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawRectangle_FUNC);
@@ -1060,74 +928,50 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawRectangle)
}
#endif
-#if (!defined(NO_Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2I) && !defined(JNI64)) || (!defined(NO_Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2I)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2I)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5)
-#endif
+#ifndef NO_Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J)(JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jlong arg5);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jlong arg5)
{
jchar *lparg1=NULL;
PointF _arg4, *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2I_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J_FUNC);
-#endif
if (arg1) if ((lparg1 = env->GetCharArrayElements(arg1, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = getPointFFields(env, arg4, &_arg4)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->DrawString((WCHAR *)lparg1, (int)arg2, (Font *)arg3, *lparg4, (Brush *)arg5);
fail:
if (arg4 && lparg4) setPointFFields(env, arg4, lparg4);
if (arg1 && lparg1) env->ReleaseCharArrayElements(arg1, lparg1, 0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2I_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2II) && !defined(JNI64)) || (!defined(NO_Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2II)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jintLong arg6);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2II)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jintLong arg6)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jintLong arg6);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jintLong arg6)
-#endif
+#ifndef NO_Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ)(JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jlong arg5, jlong arg6);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jlong arg5, jlong arg6)
{
jchar *lparg1=NULL;
PointF _arg4, *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2II_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ_FUNC);
-#endif
if (arg1) if ((lparg1 = env->GetCharArrayElements(arg1, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = getPointFFields(env, arg4, &_arg4)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->DrawString((WCHAR *)lparg1, (int)arg2, (Font *)arg3, *lparg4, (StringFormat *)arg5, (Brush *)arg6);
fail:
if (arg4 && lparg4) setPointFFields(env, arg4, lparg4);
if (arg1 && lparg1) env->ReleaseCharArrayElements(arg1, lparg1, 0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2II_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Graphics_1FillEllipse
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillEllipse)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillEllipse)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillEllipse)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1FillEllipse_FUNC);
@@ -1138,9 +982,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillEllipse)
#endif
#ifndef NO_Graphics_1FillPath
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPath)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPath)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPath)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1FillPath_FUNC);
@@ -1151,9 +995,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPath)
#endif
#ifndef NO_Graphics_1FillPie
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPie)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPie)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPie)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jfloat arg6, jfloat arg7)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1FillPie_FUNC);
@@ -1164,9 +1008,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPie)
#endif
#ifndef NO_Graphics_1FillPolygon
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPolygon)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3, jint arg4);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPolygon)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jint arg3, jint arg4);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillPolygon)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2, jint arg3, jint arg4)
{
jint *lparg2=NULL;
jint rc = 0;
@@ -1181,9 +1025,9 @@ fail:
#endif
#ifndef NO_Graphics_1FillRectangle
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillRectangle)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillRectangle)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillRectangle)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1FillRectangle_FUNC);
@@ -1194,9 +1038,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1FillRectangle)
#endif
#ifndef NO_Graphics_1Flush
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1Flush)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1Flush)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1Flush)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
Gdip_NATIVE_ENTER(env, that, Graphics_1Flush_FUNC);
((Graphics *)arg0)->Flush((FlushIntention)arg1);
@@ -1205,9 +1049,9 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1Flush)
#endif
#ifndef NO_Graphics_1GetClip
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClip)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClip)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClip)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1GetClip_FUNC);
@@ -1217,81 +1061,57 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClip)
}
#endif
-#if (!defined(NO_Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_RectF_2) && !defined(JNI64)) || (!defined(NO_Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
-#endif
+#ifndef NO_Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jlong arg0, jobject arg1);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RectF _arg1, *lparg1=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#endif
if (arg1) if ((lparg1 = getRectFFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->GetClipBounds(lparg1);
fail:
if (arg1 && lparg1) setRectFFields(env, arg1, lparg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_Rect_2) && !defined(JNI64)) || (!defined(NO_Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_Rect_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_Rect_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
-#endif
+#ifndef NO_Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2)(JNIEnv *env, jclass that, jlong arg0, jobject arg1);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
Rect _arg1, *lparg1=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_Rect_2_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2_FUNC);
-#endif
if (arg1) if ((lparg1 = getRectFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->GetClipBounds(lparg1);
fail:
if (arg1 && lparg1) setRectFields(env, arg1, lparg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_Rect_2_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Graphics_1GetHDC
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Graphics_1GetHDC)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Graphics_1GetHDC)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Graphics_1GetHDC)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Graphics_1GetHDC)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1GetHDC_FUNC);
- rc = (jintLong)((Graphics *)arg0)->GetHDC();
+ rc = (jlong)((Graphics *)arg0)->GetHDC();
Gdip_NATIVE_EXIT(env, that, Graphics_1GetHDC_FUNC);
return rc;
}
#endif
#ifndef NO_Graphics_1GetInterpolationMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetInterpolationMode)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetInterpolationMode)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetInterpolationMode)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1GetInterpolationMode_FUNC);
@@ -1302,9 +1122,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetInterpolationMode)
#endif
#ifndef NO_Graphics_1GetSmoothingMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetSmoothingMode)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetSmoothingMode)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetSmoothingMode)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1GetSmoothingMode_FUNC);
@@ -1315,9 +1135,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetSmoothingMode)
#endif
#ifndef NO_Graphics_1GetTextRenderingHint
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTextRenderingHint)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTextRenderingHint)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTextRenderingHint)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1GetTextRenderingHint_FUNC);
@@ -1328,9 +1148,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTextRenderingHint)
#endif
#ifndef NO_Graphics_1GetTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTransform)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTransform)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1GetTransform_FUNC);
@@ -1341,9 +1161,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetTransform)
#endif
#ifndef NO_Graphics_1GetVisibleClipBounds
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetVisibleClipBounds)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetVisibleClipBounds)(JNIEnv *env, jclass that, jlong arg0, jobject arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1GetVisibleClipBounds)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
Rect _arg1, *lparg1=NULL;
jint rc = 0;
@@ -1358,9 +1178,9 @@ fail:
#endif
#ifndef NO_Graphics_1MeasureDriverString
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureDriverString)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jfloatArray arg4, jint arg5, jintLong arg6, jobject arg7);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureDriverString)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jfloatArray arg4, jint arg5, jlong arg6, jobject arg7);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureDriverString)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jfloatArray arg4, jint arg5, jintLong arg6, jobject arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jfloatArray arg4, jint arg5, jlong arg6, jobject arg7)
{
jfloat *lparg4=NULL;
RectF _arg7, *lparg7=NULL;
@@ -1377,24 +1197,16 @@ fail:
}
#endif
-#if (!defined(NO_Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2ILorg_eclipse_swt_internal_gdip_RectF_2) && !defined(JNI64)) || (!defined(NO_Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2ILorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jobject arg6);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2ILorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jobject arg6)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jobject arg6);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jintLong arg5, jobject arg6)
-#endif
+#ifndef NO_Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jlong arg5, jobject arg6);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jlong arg5, jobject arg6)
{
jchar *lparg1=NULL;
PointF _arg4, *lparg4=NULL;
RectF _arg6, *lparg6=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2ILorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#endif
if (arg1) if ((lparg1 = env->GetCharArrayElements(arg1, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = getPointFFields(env, arg4, &_arg4)) == NULL) goto fail;
if (arg6) if ((lparg6 = getRectFFields(env, arg6, &_arg6)) == NULL) goto fail;
@@ -1403,33 +1215,21 @@ fail:
if (arg6 && lparg6) setRectFFields(env, arg6, lparg6);
if (arg4 && lparg4) setPointFFields(env, arg4, lparg4);
if (arg1 && lparg1) env->ReleaseCharArrayElements(arg1, lparg1, 0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2ILorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2) && !defined(JNI64)) || (!defined(NO_Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jobject arg5);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jobject arg5)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jobject arg5);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jintLong arg3, jobject arg4, jobject arg5)
-#endif
+#ifndef NO_Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2)(JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jobject arg5);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jlong arg3, jobject arg4, jobject arg5)
{
jchar *lparg1=NULL;
PointF _arg4, *lparg4=NULL;
RectF _arg5, *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#endif
if (arg1) if ((lparg1 = env->GetCharArrayElements(arg1, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = getPointFFields(env, arg4, &_arg4)) == NULL) goto fail;
if (arg5) if ((lparg5 = getRectFFields(env, arg5, &_arg5)) == NULL) goto fail;
@@ -1438,19 +1238,15 @@ fail:
if (arg5 && lparg5) setRectFFields(env, arg5, lparg5);
if (arg4 && lparg4) setPointFFields(env, arg4, lparg4);
if (arg1 && lparg1) env->ReleaseCharArrayElements(arg1, lparg1, 0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Graphics_1ReleaseHDC
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1ReleaseHDC)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1ReleaseHDC)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1ReleaseHDC)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
Gdip_NATIVE_ENTER(env, that, Graphics_1ReleaseHDC_FUNC);
((Graphics *)arg0)->ReleaseHDC((HDC)arg1);
@@ -1459,9 +1255,9 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1ReleaseHDC)
#endif
#ifndef NO_Graphics_1ResetClip
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ResetClip)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ResetClip)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ResetClip)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1ResetClip_FUNC);
@@ -1472,9 +1268,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ResetClip)
#endif
#ifndef NO_Graphics_1Restore
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Restore)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Restore)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Restore)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1Restore_FUNC);
@@ -1485,9 +1281,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Restore)
#endif
#ifndef NO_Graphics_1Save
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Save)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Save)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Save)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1Save_FUNC);
@@ -1498,9 +1294,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1Save)
#endif
#ifndef NO_Graphics_1ScaleTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ScaleTransform)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ScaleTransform)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ScaleTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1ScaleTransform_FUNC);
@@ -1510,114 +1306,66 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1ScaleTransform)
}
#endif
-#if (!defined(NO_Graphics_1SetClip__III) && !defined(JNI64)) || (!defined(NO_Graphics_1SetClip__JJI) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_Graphics_1SetClip__JJI
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JJI)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JJI)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1SetClip__III_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1SetClip__JJI_FUNC);
-#endif
rc = (jint)((Graphics *)arg0)->SetClip((Region *)arg1, (CombineMode)arg2);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1SetClip__III_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1SetClip__JJI_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1SetClip__ILorg_eclipse_swt_internal_gdip_Rect_2I) && !defined(JNI64)) || (!defined(NO_Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__ILorg_eclipse_swt_internal_gdip_Rect_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__ILorg_eclipse_swt_internal_gdip_Rect_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I)(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
Rect _arg1, *lparg1=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1SetClip__ILorg_eclipse_swt_internal_gdip_Rect_2I_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getRectFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jint)((Graphics *)arg0)->SetClip(*(Rect *)lparg1, (CombineMode)arg2);
fail:
if (arg1 && lparg1) setRectFields(env, arg1, lparg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1SetClip__ILorg_eclipse_swt_internal_gdip_Rect_2I_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1SetClipPath__II) && !defined(JNI64)) || (!defined(NO_Graphics_1SetClipPath__JJ) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-#endif
+#ifndef NO_Graphics_1SetClipPath__JJ
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJ)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJ)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1SetClipPath__II_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1SetClipPath__JJ_FUNC);
-#endif
rc = (jint)((Graphics *)arg0)->SetClip((GraphicsPath *)arg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1SetClipPath__II_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1SetClipPath__JJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Graphics_1SetClipPath__III) && !defined(JNI64)) || (!defined(NO_Graphics_1SetClipPath__JJI) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_Graphics_1SetClipPath__JJI
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJI)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetClipPath__JJI)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Graphics_1SetClipPath__III_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Graphics_1SetClipPath__JJI_FUNC);
-#endif
rc = (jint)((Graphics *)arg0)->SetClip((GraphicsPath *)arg1, (CombineMode)arg2);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Graphics_1SetClipPath__III_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Graphics_1SetClipPath__JJI_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Graphics_1SetCompositingQuality
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetCompositingQuality)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetCompositingQuality)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetCompositingQuality)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1SetCompositingQuality_FUNC);
@@ -1628,9 +1376,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetCompositingQuality)
#endif
#ifndef NO_Graphics_1SetInterpolationMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetInterpolationMode)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetInterpolationMode)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetInterpolationMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1SetInterpolationMode_FUNC);
@@ -1641,9 +1389,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetInterpolationMode)
#endif
#ifndef NO_Graphics_1SetPageUnit
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPageUnit)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPageUnit)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPageUnit)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1SetPageUnit_FUNC);
@@ -1654,9 +1402,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPageUnit)
#endif
#ifndef NO_Graphics_1SetPixelOffsetMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPixelOffsetMode)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPixelOffsetMode)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPixelOffsetMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1SetPixelOffsetMode_FUNC);
@@ -1667,9 +1415,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetPixelOffsetMode)
#endif
#ifndef NO_Graphics_1SetSmoothingMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetSmoothingMode)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetSmoothingMode)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetSmoothingMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1SetSmoothingMode_FUNC);
@@ -1680,9 +1428,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetSmoothingMode)
#endif
#ifndef NO_Graphics_1SetTextRenderingHint
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTextRenderingHint)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTextRenderingHint)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTextRenderingHint)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1SetTextRenderingHint_FUNC);
@@ -1693,9 +1441,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTextRenderingHint)
#endif
#ifndef NO_Graphics_1SetTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTransform)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTransform)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1SetTransform_FUNC);
@@ -1706,9 +1454,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1SetTransform)
#endif
#ifndef NO_Graphics_1TranslateTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1TranslateTransform)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1TranslateTransform)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1TranslateTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1TranslateTransform_FUNC);
@@ -1719,9 +1467,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Graphics_1TranslateTransform)
#endif
#ifndef NO_Graphics_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, Graphics_1delete_FUNC);
delete (Graphics *)arg0;
@@ -1730,22 +1478,22 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Graphics_1delete)
#endif
#ifndef NO_Graphics_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Graphics_1new)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Graphics_1new)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Graphics_1new)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Graphics_1new)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Graphics_1new_FUNC);
- rc = (jintLong)new Graphics((HDC)arg0);
+ rc = (jlong)new Graphics((HDC)arg0);
Gdip_NATIVE_EXIT(env, that, Graphics_1new_FUNC);
return rc;
}
#endif
#ifndef NO_HatchBrush_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(HatchBrush_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(HatchBrush_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(HatchBrush_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, HatchBrush_1delete_FUNC);
delete (HatchBrush *)arg0;
@@ -1754,22 +1502,22 @@ JNIEXPORT void JNICALL Gdip_NATIVE(HatchBrush_1delete)
#endif
#ifndef NO_HatchBrush_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(HatchBrush_1new)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(HatchBrush_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(HatchBrush_1new)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(HatchBrush_1new)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, HatchBrush_1new_FUNC);
- rc = (jintLong)new HatchBrush((HatchStyle)arg0, (Color)arg1, (Color)arg2);
+ rc = (jlong)new HatchBrush((HatchStyle)arg0, (Color)arg1, (Color)arg2);
Gdip_NATIVE_EXIT(env, that, HatchBrush_1new_FUNC);
return rc;
}
#endif
#ifndef NO_ImageAttributes_1SetColorMatrix
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(ImageAttributes_1SetColorMatrix)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(ImageAttributes_1SetColorMatrix)(JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(ImageAttributes_1SetColorMatrix)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2, jint arg3)
{
jfloat *lparg1=NULL;
jint rc = 0;
@@ -1784,9 +1532,9 @@ fail:
#endif
#ifndef NO_ImageAttributes_1SetWrapMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(ImageAttributes_1SetWrapMode)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(ImageAttributes_1SetWrapMode)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(ImageAttributes_1SetWrapMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, ImageAttributes_1SetWrapMode_FUNC);
@@ -1797,9 +1545,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(ImageAttributes_1SetWrapMode)
#endif
#ifndef NO_ImageAttributes_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(ImageAttributes_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(ImageAttributes_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(ImageAttributes_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, ImageAttributes_1delete_FUNC);
delete (ImageAttributes *)arg0;
@@ -1808,22 +1556,35 @@ JNIEXPORT void JNICALL Gdip_NATIVE(ImageAttributes_1delete)
#endif
#ifndef NO_ImageAttributes_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(ImageAttributes_1new)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(ImageAttributes_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(ImageAttributes_1new)(JNIEnv *env, jclass that);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(ImageAttributes_1new)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, ImageAttributes_1new_FUNC);
- rc = (jintLong)new ImageAttributes();
+ rc = (jlong)new ImageAttributes();
Gdip_NATIVE_EXIT(env, that, ImageAttributes_1new_FUNC);
return rc;
}
#endif
+#ifndef NO_Image_1Clone
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Image_1Clone)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Image_1Clone)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ Gdip_NATIVE_ENTER(env, that, Image_1Clone_FUNC);
+ rc = (jlong)((Image *)arg0)->Clone();
+ Gdip_NATIVE_EXIT(env, that, Image_1Clone_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_Image_1GetHeight
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetHeight)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetHeight)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetHeight)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Image_1GetHeight_FUNC);
@@ -1834,9 +1595,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetHeight)
#endif
#ifndef NO_Image_1GetLastStatus
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetLastStatus)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetLastStatus)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetLastStatus)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Image_1GetLastStatus_FUNC);
@@ -1847,9 +1608,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetLastStatus)
#endif
#ifndef NO_Image_1GetPalette
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPalette)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPalette)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPalette)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Image_1GetPalette_FUNC);
@@ -1860,9 +1621,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPalette)
#endif
#ifndef NO_Image_1GetPaletteSize
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPaletteSize)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPaletteSize)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPaletteSize)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Image_1GetPaletteSize_FUNC);
@@ -1873,9 +1634,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPaletteSize)
#endif
#ifndef NO_Image_1GetPixelFormat
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPixelFormat)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPixelFormat)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPixelFormat)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Image_1GetPixelFormat_FUNC);
@@ -1886,9 +1647,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetPixelFormat)
#endif
#ifndef NO_Image_1GetWidth
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetWidth)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetWidth)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetWidth)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Image_1GetWidth_FUNC);
@@ -1898,10 +1659,21 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Image_1GetWidth)
}
#endif
+#ifndef NO_Image_1delete
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Image_1delete)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT void JNICALL Gdip_NATIVE(Image_1delete)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ Gdip_NATIVE_ENTER(env, that, Image_1delete_FUNC);
+ delete (Image *)arg0;
+ Gdip_NATIVE_EXIT(env, that, Image_1delete_FUNC);
+}
+#endif
+
#ifndef NO_LinearGradientBrush_1ResetTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ResetTransform)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ResetTransform)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ResetTransform)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, LinearGradientBrush_1ResetTransform_FUNC);
@@ -1912,9 +1684,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ResetTransform)
#endif
#ifndef NO_LinearGradientBrush_1ScaleTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ScaleTransform)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ScaleTransform)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ScaleTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, LinearGradientBrush_1ScaleTransform_FUNC);
@@ -1925,9 +1697,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1ScaleTransform)
#endif
#ifndef NO_LinearGradientBrush_1SetInterpolationColors
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1SetInterpolationColors)(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jfloatArray arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1SetInterpolationColors)(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jfloatArray arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1SetInterpolationColors)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jfloatArray arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jfloatArray arg2, jint arg3)
{
jint *lparg1=NULL;
jfloat *lparg2=NULL;
@@ -1945,9 +1717,9 @@ fail:
#endif
#ifndef NO_LinearGradientBrush_1SetWrapMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1SetWrapMode)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1SetWrapMode)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1SetWrapMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, LinearGradientBrush_1SetWrapMode_FUNC);
@@ -1958,9 +1730,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1SetWrapMode)
#endif
#ifndef NO_LinearGradientBrush_1TranslateTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1TranslateTransform)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1TranslateTransform)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1TranslateTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, LinearGradientBrush_1TranslateTransform_FUNC);
@@ -1971,9 +1743,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(LinearGradientBrush_1TranslateTransform)
#endif
#ifndef NO_LinearGradientBrush_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(LinearGradientBrush_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(LinearGradientBrush_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(LinearGradientBrush_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, LinearGradientBrush_1delete_FUNC);
delete (LinearGradientBrush *)arg0;
@@ -1982,17 +1754,17 @@ JNIEXPORT void JNICALL Gdip_NATIVE(LinearGradientBrush_1delete)
#endif
#ifndef NO_LinearGradientBrush_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(LinearGradientBrush_1new)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jint arg3);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(LinearGradientBrush_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(LinearGradientBrush_1new)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jint arg3);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(LinearGradientBrush_1new)
(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jint arg3)
{
PointF _arg0, *lparg0=NULL;
PointF _arg1, *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, LinearGradientBrush_1new_FUNC);
if (arg0) if ((lparg0 = getPointFFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getPointFFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jintLong)new LinearGradientBrush(*lparg0, *lparg1, (Color)arg2, (Color)arg3);
+ rc = (jlong)new LinearGradientBrush(*lparg0, *lparg1, (Color)arg2, (Color)arg3);
fail:
if (arg1 && lparg1) setPointFFields(env, arg1, lparg1);
if (arg0 && lparg0) setPointFFields(env, arg0, lparg0);
@@ -2002,9 +1774,9 @@ fail:
#endif
#ifndef NO_Matrix_1GetElements
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1GetElements)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1GetElements)(JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1GetElements)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1)
{
jfloat *lparg1=NULL;
jint rc = 0;
@@ -2019,9 +1791,9 @@ fail:
#endif
#ifndef NO_Matrix_1Invert
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Invert)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Invert)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Invert)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1Invert_FUNC);
@@ -2032,9 +1804,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Invert)
#endif
#ifndef NO_Matrix_1IsIdentity
-extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(Matrix_1IsIdentity)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(Matrix_1IsIdentity)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jboolean JNICALL Gdip_NATIVE(Matrix_1IsIdentity)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1IsIdentity_FUNC);
@@ -2045,9 +1817,9 @@ JNIEXPORT jboolean JNICALL Gdip_NATIVE(Matrix_1IsIdentity)
#endif
#ifndef NO_Matrix_1Multiply
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Multiply)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Multiply)(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Multiply)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1Multiply_FUNC);
@@ -2058,9 +1830,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Multiply)
#endif
#ifndef NO_Matrix_1Rotate
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Rotate)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Rotate)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jint arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Rotate)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jint arg2)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1Rotate_FUNC);
@@ -2071,9 +1843,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Rotate)
#endif
#ifndef NO_Matrix_1Scale
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Scale)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Scale)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Scale)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1Scale_FUNC);
@@ -2084,9 +1856,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Scale)
#endif
#ifndef NO_Matrix_1SetElements
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1SetElements)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1SetElements)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1SetElements)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jfloat arg6)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1SetElements_FUNC);
@@ -2097,9 +1869,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1SetElements)
#endif
#ifndef NO_Matrix_1Shear
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Shear)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Shear)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Shear)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1Shear_FUNC);
@@ -2109,68 +1881,44 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Shear)
}
#endif
-#if (!defined(NO_Matrix_1TransformPoints__ILorg_eclipse_swt_internal_gdip_PointF_2I) && !defined(JNI64)) || (!defined(NO_Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__ILorg_eclipse_swt_internal_gdip_PointF_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__ILorg_eclipse_swt_internal_gdip_PointF_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I)(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
PointF _arg1, *lparg1=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Matrix_1TransformPoints__ILorg_eclipse_swt_internal_gdip_PointF_2I_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getPointFFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jint)((Matrix *)arg0)->TransformPoints(lparg1, arg2);
fail:
if (arg1 && lparg1) setPointFFields(env, arg1, lparg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Matrix_1TransformPoints__ILorg_eclipse_swt_internal_gdip_PointF_2I_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_Matrix_1TransformPoints__I_3FI) && !defined(JNI64)) || (!defined(NO_Matrix_1TransformPoints__J_3FI) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__I_3FI)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__I_3FI)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2)
-#else
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__J_3FI)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2);
-JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__J_3FI)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2)
-#endif
+#ifndef NO_Matrix_1TransformPoints__J_3FI
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__J_3FI)(JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2);
+JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformPoints__J_3FI)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2)
{
jfloat *lparg1=NULL;
jint rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Matrix_1TransformPoints__I_3FI_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, Matrix_1TransformPoints__J_3FI_FUNC);
-#endif
if (arg1) if ((lparg1 = env->GetFloatArrayElements(arg1, NULL)) == NULL) goto fail;
rc = (jint)((Matrix *)arg0)->TransformPoints((PointF *)lparg1, arg2);
fail:
if (arg1 && lparg1) env->ReleaseFloatArrayElements(arg1, lparg1, 0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Matrix_1TransformPoints__I_3FI_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, Matrix_1TransformPoints__J_3FI_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Matrix_1TransformVectors
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformVectors)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformVectors)(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1TransformVectors)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
PointF _arg1, *lparg1=NULL;
jint rc = 0;
@@ -2185,9 +1933,9 @@ fail:
#endif
#ifndef NO_Matrix_1Translate
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Translate)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Translate)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Translate)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1Translate_FUNC);
@@ -2198,9 +1946,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Matrix_1Translate)
#endif
#ifndef NO_Matrix_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Matrix_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Matrix_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(Matrix_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, Matrix_1delete_FUNC);
delete (Matrix *)arg0;
@@ -2209,72 +1957,48 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Matrix_1delete)
#endif
#ifndef NO_Matrix_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Matrix_1new)(JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Matrix_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Matrix_1new)(JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Matrix_1new)
(JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Matrix_1new_FUNC);
- rc = (jintLong)new Matrix((REAL)arg0, (REAL)arg1, (REAL)arg2, (REAL)arg3, (REAL)arg4, (REAL)arg5);
+ rc = (jlong)new Matrix((REAL)arg0, (REAL)arg1, (REAL)arg2, (REAL)arg3, (REAL)arg4, (REAL)arg5);
Gdip_NATIVE_EXIT(env, that, Matrix_1new_FUNC);
return rc;
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1);
-JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
-#else
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1);
-JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J)(JNIEnv *env, jclass that, jobject arg0, jlong arg1);
+JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1)
{
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2I_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J_FUNC);
-#endif
if (arg0) setBitmapDataFields(env, arg0, (BitmapData *)arg1);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2I_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2);
-JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2);
-JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI)(JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2);
+JNIEXPORT void JNICALL Gdip_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
ColorPalette _arg0, *lparg0=NULL;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2II_FUNC);
-#else
Gdip_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = getColorPaletteFields(env, arg0, &_arg0)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID*)arg1, arg2);
fail:
if (arg0 && lparg0) setColorPaletteFields(env, arg0, lparg0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2II_FUNC);
-#else
Gdip_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI_FUNC);
-#endif
}
#endif
#ifndef NO_PathGradientBrush_1SetCenterColor
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetCenterColor)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetCenterColor)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetCenterColor)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, PathGradientBrush_1SetCenterColor_FUNC);
@@ -2285,9 +2009,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetCenterColor)
#endif
#ifndef NO_PathGradientBrush_1SetCenterPoint
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetCenterPoint)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetCenterPoint)(JNIEnv *env, jclass that, jlong arg0, jobject arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetCenterPoint)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
PointF _arg1, *lparg1=NULL;
jint rc = 0;
@@ -2302,9 +2026,9 @@ fail:
#endif
#ifndef NO_PathGradientBrush_1SetGraphicsPath
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetGraphicsPath)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetGraphicsPath)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetGraphicsPath)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, PathGradientBrush_1SetGraphicsPath_FUNC);
@@ -2315,9 +2039,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetGraphicsPath)
#endif
#ifndef NO_PathGradientBrush_1SetInterpolationColors
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetInterpolationColors)(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jfloatArray arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetInterpolationColors)(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jfloatArray arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetInterpolationColors)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jfloatArray arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jfloatArray arg2, jint arg3)
{
jint *lparg1=NULL;
jfloat *lparg2=NULL;
@@ -2335,9 +2059,9 @@ fail:
#endif
#ifndef NO_PathGradientBrush_1SetSurroundColors
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetSurroundColors)(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetSurroundColors)(JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetSurroundColors)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
@@ -2355,9 +2079,9 @@ fail:
#endif
#ifndef NO_PathGradientBrush_1SetWrapMode
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetWrapMode)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetWrapMode)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetWrapMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, PathGradientBrush_1SetWrapMode_FUNC);
@@ -2368,9 +2092,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(PathGradientBrush_1SetWrapMode)
#endif
#ifndef NO_PathGradientBrush_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(PathGradientBrush_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(PathGradientBrush_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(PathGradientBrush_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, PathGradientBrush_1delete_FUNC);
delete (PathGradientBrush *)arg0;
@@ -2379,35 +2103,35 @@ JNIEXPORT void JNICALL Gdip_NATIVE(PathGradientBrush_1delete)
#endif
#ifndef NO_PathGradientBrush_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(PathGradientBrush_1new)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(PathGradientBrush_1new)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(PathGradientBrush_1new)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(PathGradientBrush_1new)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, PathGradientBrush_1new_FUNC);
- rc = (jintLong)new PathGradientBrush((GraphicsPath *)arg0);
+ rc = (jlong)new PathGradientBrush((GraphicsPath *)arg0);
Gdip_NATIVE_EXIT(env, that, PathGradientBrush_1new_FUNC);
return rc;
}
#endif
#ifndef NO_Pen_1GetBrush
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Pen_1GetBrush)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Pen_1GetBrush)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Pen_1GetBrush)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Pen_1GetBrush)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1GetBrush_FUNC);
- rc = (jintLong)((Pen *)arg0)->GetBrush();
+ rc = (jlong)((Pen *)arg0)->GetBrush();
Gdip_NATIVE_EXIT(env, that, Pen_1GetBrush_FUNC);
return rc;
}
#endif
#ifndef NO_Pen_1SetBrush
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetBrush)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetBrush)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetBrush)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1SetBrush_FUNC);
@@ -2418,9 +2142,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetBrush)
#endif
#ifndef NO_Pen_1SetDashOffset
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashOffset)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashOffset)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashOffset)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1SetDashOffset_FUNC);
@@ -2431,9 +2155,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashOffset)
#endif
#ifndef NO_Pen_1SetDashPattern
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashPattern)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashPattern)(JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashPattern)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2)
{
jfloat *lparg1=NULL;
jint rc = 0;
@@ -2448,9 +2172,9 @@ fail:
#endif
#ifndef NO_Pen_1SetDashStyle
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashStyle)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashStyle)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashStyle)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1SetDashStyle_FUNC);
@@ -2461,9 +2185,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetDashStyle)
#endif
#ifndef NO_Pen_1SetLineCap
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineCap)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineCap)(JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineCap)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1SetLineCap_FUNC);
@@ -2474,9 +2198,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineCap)
#endif
#ifndef NO_Pen_1SetLineJoin
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineJoin)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineJoin)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineJoin)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1SetLineJoin_FUNC);
@@ -2487,9 +2211,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetLineJoin)
#endif
#ifndef NO_Pen_1SetMiterLimit
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetMiterLimit)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetMiterLimit)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetMiterLimit)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1SetMiterLimit_FUNC);
@@ -2500,9 +2224,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetMiterLimit)
#endif
#ifndef NO_Pen_1SetWidth
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetWidth)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetWidth)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetWidth)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1SetWidth_FUNC);
@@ -2513,9 +2237,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(Pen_1SetWidth)
#endif
#ifndef NO_Pen_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Pen_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Pen_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(Pen_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, Pen_1delete_FUNC);
delete (Pen *)arg0;
@@ -2524,22 +2248,22 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Pen_1delete)
#endif
#ifndef NO_Pen_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Pen_1new)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Pen_1new)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Pen_1new)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Pen_1new)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Pen_1new_FUNC);
- rc = (jintLong)new Pen((Brush *)arg0, (REAL)arg1);
+ rc = (jlong)new Pen((Brush *)arg0, (REAL)arg1);
Gdip_NATIVE_EXIT(env, that, Pen_1new_FUNC);
return rc;
}
#endif
#ifndef NO_Point_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Point_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Point_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(Point_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, Point_1delete_FUNC);
delete (Point *)arg0;
@@ -2548,22 +2272,22 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Point_1delete)
#endif
#ifndef NO_Point_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Point_1new)(JNIEnv *env, jclass that, jint arg0, jint arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Point_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Point_1new)(JNIEnv *env, jclass that, jint arg0, jint arg1);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Point_1new)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Point_1new_FUNC);
- rc = (jintLong)new Point(arg0, arg1);
+ rc = (jlong)new Point(arg0, arg1);
Gdip_NATIVE_EXIT(env, that, Point_1new_FUNC);
return rc;
}
#endif
#ifndef NO_PrivateFontCollection_1AddFontFile
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PrivateFontCollection_1AddFontFile)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(PrivateFontCollection_1AddFontFile)(JNIEnv *env, jclass that, jlong arg0, jcharArray arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(PrivateFontCollection_1AddFontFile)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1)
{
jchar *lparg1=NULL;
jint rc = 0;
@@ -2578,9 +2302,9 @@ fail:
#endif
#ifndef NO_PrivateFontCollection_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(PrivateFontCollection_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(PrivateFontCollection_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(PrivateFontCollection_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, PrivateFontCollection_1delete_FUNC);
delete (PrivateFontCollection *)arg0;
@@ -2589,35 +2313,35 @@ JNIEXPORT void JNICALL Gdip_NATIVE(PrivateFontCollection_1delete)
#endif
#ifndef NO_PrivateFontCollection_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(PrivateFontCollection_1new)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(PrivateFontCollection_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(PrivateFontCollection_1new)(JNIEnv *env, jclass that);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(PrivateFontCollection_1new)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, PrivateFontCollection_1new_FUNC);
- rc = (jintLong)new PrivateFontCollection();
+ rc = (jlong)new PrivateFontCollection();
Gdip_NATIVE_EXIT(env, that, PrivateFontCollection_1new_FUNC);
return rc;
}
#endif
#ifndef NO_Region_1GetHRGN
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1GetHRGN)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1GetHRGN)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1GetHRGN)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1GetHRGN)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Region_1GetHRGN_FUNC);
- rc = (jintLong)((Region *)arg0)->GetHRGN((Graphics *)arg1);
+ rc = (jlong)((Region *)arg0)->GetHRGN((Graphics *)arg1);
Gdip_NATIVE_EXIT(env, that, Region_1GetHRGN_FUNC);
return rc;
}
#endif
#ifndef NO_Region_1IsInfinite
-extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(Region_1IsInfinite)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jboolean JNICALL Gdip_NATIVE(Region_1IsInfinite)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jboolean JNICALL Gdip_NATIVE(Region_1IsInfinite)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
Gdip_NATIVE_ENTER(env, that, Region_1IsInfinite_FUNC);
@@ -2628,9 +2352,9 @@ JNIEXPORT jboolean JNICALL Gdip_NATIVE(Region_1IsInfinite)
#endif
#ifndef NO_Region_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Region_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(Region_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(Region_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, Region_1delete_FUNC);
delete (Region *)arg0;
@@ -2639,60 +2363,48 @@ JNIEXPORT void JNICALL Gdip_NATIVE(Region_1delete)
#endif
#ifndef NO_Region_1new__
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1new__)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1new__)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1new__)(JNIEnv *env, jclass that);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1new__)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Region_1new___FUNC);
- rc = (jintLong)new Region();
+ rc = (jlong)new Region();
Gdip_NATIVE_EXIT(env, that, Region_1new___FUNC);
return rc;
}
#endif
-#if (!defined(NO_Region_1new__I) && !defined(JNI64)) || (!defined(NO_Region_1new__J) && defined(JNI64))
-#ifndef JNI64
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1new__I)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1new__I)(JNIEnv *env, jclass that, jintLong arg0)
-#else
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1new__J)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1new__J)(JNIEnv *env, jclass that, jintLong arg0)
-#endif
+#ifndef NO_Region_1new__J
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1new__J)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1new__J)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
-#ifndef JNI64
- Gdip_NATIVE_ENTER(env, that, Region_1new__I_FUNC);
-#else
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Region_1new__J_FUNC);
-#endif
- rc = (jintLong)new Region((HRGN)arg0);
-#ifndef JNI64
- Gdip_NATIVE_EXIT(env, that, Region_1new__I_FUNC);
-#else
+ rc = (jlong)new Region((HRGN)arg0);
Gdip_NATIVE_EXIT(env, that, Region_1new__J_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_Region_1newGraphicsPath
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1newGraphicsPath)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(Region_1newGraphicsPath)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1newGraphicsPath)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(Region_1newGraphicsPath)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, Region_1newGraphicsPath_FUNC);
- rc = (jintLong)new Region((GraphicsPath*)arg0);
+ rc = (jlong)new Region((GraphicsPath*)arg0);
Gdip_NATIVE_EXIT(env, that, Region_1newGraphicsPath_FUNC);
return rc;
}
#endif
#ifndef NO_SolidBrush_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(SolidBrush_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(SolidBrush_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(SolidBrush_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, SolidBrush_1delete_FUNC);
delete (SolidBrush *)arg0;
@@ -2701,61 +2413,61 @@ JNIEXPORT void JNICALL Gdip_NATIVE(SolidBrush_1delete)
#endif
#ifndef NO_SolidBrush_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(SolidBrush_1new)(JNIEnv *env, jclass that, jint arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(SolidBrush_1new)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(SolidBrush_1new)(JNIEnv *env, jclass that, jint arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(SolidBrush_1new)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, SolidBrush_1new_FUNC);
- rc = (jintLong)new SolidBrush((Color)arg0);
+ rc = (jlong)new SolidBrush((Color)arg0);
Gdip_NATIVE_EXIT(env, that, SolidBrush_1new_FUNC);
return rc;
}
#endif
#ifndef NO_StringFormat_1Clone
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(StringFormat_1Clone)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(StringFormat_1Clone)
- (JNIEnv *env, jclass that, jintLong arg0)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(StringFormat_1Clone)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(StringFormat_1Clone)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, StringFormat_1Clone_FUNC);
- rc = (jintLong)((StringFormat *)arg0)->Clone();
+ rc = (jlong)((StringFormat *)arg0)->Clone();
Gdip_NATIVE_EXIT(env, that, StringFormat_1Clone_FUNC);
return rc;
}
#endif
#ifndef NO_StringFormat_1GenericDefault
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(StringFormat_1GenericDefault)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(StringFormat_1GenericDefault)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(StringFormat_1GenericDefault)(JNIEnv *env, jclass that);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(StringFormat_1GenericDefault)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, StringFormat_1GenericDefault_FUNC);
- rc = (jintLong)StringFormat::GenericDefault();
+ rc = (jlong)StringFormat::GenericDefault();
Gdip_NATIVE_EXIT(env, that, StringFormat_1GenericDefault_FUNC);
return rc;
}
#endif
#ifndef NO_StringFormat_1GenericTypographic
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(StringFormat_1GenericTypographic)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(StringFormat_1GenericTypographic)
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(StringFormat_1GenericTypographic)(JNIEnv *env, jclass that);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(StringFormat_1GenericTypographic)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
Gdip_NATIVE_ENTER(env, that, StringFormat_1GenericTypographic_FUNC);
- rc = (jintLong)StringFormat::GenericTypographic();
+ rc = (jlong)StringFormat::GenericTypographic();
Gdip_NATIVE_EXIT(env, that, StringFormat_1GenericTypographic_FUNC);
return rc;
}
#endif
#ifndef NO_StringFormat_1GetFormatFlags
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1GetFormatFlags)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1GetFormatFlags)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1GetFormatFlags)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, StringFormat_1GetFormatFlags_FUNC);
@@ -2766,9 +2478,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1GetFormatFlags)
#endif
#ifndef NO_StringFormat_1SetFormatFlags
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetFormatFlags)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetFormatFlags)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetFormatFlags)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, StringFormat_1SetFormatFlags_FUNC);
@@ -2779,9 +2491,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetFormatFlags)
#endif
#ifndef NO_StringFormat_1SetHotkeyPrefix
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetHotkeyPrefix)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetHotkeyPrefix)(JNIEnv *env, jclass that, jlong arg0, jint arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetHotkeyPrefix)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, StringFormat_1SetHotkeyPrefix_FUNC);
@@ -2792,9 +2504,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetHotkeyPrefix)
#endif
#ifndef NO_StringFormat_1SetTabStops
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetTabStops)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2, jfloatArray arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetTabStops)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jint arg2, jfloatArray arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(StringFormat_1SetTabStops)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jint arg2, jfloatArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jint arg2, jfloatArray arg3)
{
jfloat *lparg3=NULL;
jint rc = 0;
@@ -2809,9 +2521,9 @@ fail:
#endif
#ifndef NO_StringFormat_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(StringFormat_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(StringFormat_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(StringFormat_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, StringFormat_1delete_FUNC);
delete (StringFormat *)arg0;
@@ -2819,10 +2531,23 @@ JNIEXPORT void JNICALL Gdip_NATIVE(StringFormat_1delete)
}
#endif
+#ifndef NO_TextureBrush_1GetImage
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(TextureBrush_1GetImage)(JNIEnv *env, jclass that, jlong arg0);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(TextureBrush_1GetImage)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ Gdip_NATIVE_ENTER(env, that, TextureBrush_1GetImage_FUNC);
+ rc = (jlong)((TextureBrush *)arg0)->GetImage();
+ Gdip_NATIVE_EXIT(env, that, TextureBrush_1GetImage_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_TextureBrush_1ResetTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ResetTransform)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ResetTransform)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ResetTransform)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, TextureBrush_1ResetTransform_FUNC);
@@ -2833,9 +2558,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ResetTransform)
#endif
#ifndef NO_TextureBrush_1ScaleTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ScaleTransform)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ScaleTransform)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ScaleTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, TextureBrush_1ScaleTransform_FUNC);
@@ -2846,9 +2571,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1ScaleTransform)
#endif
#ifndef NO_TextureBrush_1SetTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1SetTransform)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1SetTransform)(JNIEnv *env, jclass that, jlong arg0, jlong arg1);
JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1SetTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, TextureBrush_1SetTransform_FUNC);
@@ -2859,9 +2584,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1SetTransform)
#endif
#ifndef NO_TextureBrush_1TranslateTransform
-extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1TranslateTransform)(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3);
+extern "C" JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1TranslateTransform)(JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3);
JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1TranslateTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloat arg1, jfloat arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jfloat arg1, jfloat arg2, jint arg3)
{
jint rc = 0;
Gdip_NATIVE_ENTER(env, that, TextureBrush_1TranslateTransform_FUNC);
@@ -2872,9 +2597,9 @@ JNIEXPORT jint JNICALL Gdip_NATIVE(TextureBrush_1TranslateTransform)
#endif
#ifndef NO_TextureBrush_1delete
-extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(TextureBrush_1delete)(JNIEnv *env, jclass that, jintLong arg0);
+extern "C" JNIEXPORT void JNICALL Gdip_NATIVE(TextureBrush_1delete)(JNIEnv *env, jclass that, jlong arg0);
JNIEXPORT void JNICALL Gdip_NATIVE(TextureBrush_1delete)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
Gdip_NATIVE_ENTER(env, that, TextureBrush_1delete_FUNC);
delete (TextureBrush *)arg0;
@@ -2882,15 +2607,32 @@ JNIEXPORT void JNICALL Gdip_NATIVE(TextureBrush_1delete)
}
#endif
-#ifndef NO_TextureBrush_1new
-extern "C" JNIEXPORT jintLong JNICALL Gdip_NATIVE(TextureBrush_1new)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5);
-JNIEXPORT jintLong JNICALL Gdip_NATIVE(TextureBrush_1new)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5)
+#ifndef NO_TextureBrush_1new__JIFFFF
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(TextureBrush_1new__JIFFFF)(JNIEnv *env, jclass that, jlong arg0, jint arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(TextureBrush_1new__JIFFFF)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5)
+{
+ jlong rc = 0;
+ Gdip_NATIVE_ENTER(env, that, TextureBrush_1new__JIFFFF_FUNC);
+ rc = (jlong)new TextureBrush((Image *)arg0, (WrapMode)arg1, arg2, arg3, arg4, arg5);
+ Gdip_NATIVE_EXIT(env, that, TextureBrush_1new__JIFFFF_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_TextureBrush_1new__JLorg_eclipse_swt_internal_gdip_Rect_2J
+extern "C" JNIEXPORT jlong JNICALL Gdip_NATIVE(TextureBrush_1new__JLorg_eclipse_swt_internal_gdip_Rect_2J)(JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2);
+JNIEXPORT jlong JNICALL Gdip_NATIVE(TextureBrush_1new__JLorg_eclipse_swt_internal_gdip_Rect_2J)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
- jintLong rc = 0;
- Gdip_NATIVE_ENTER(env, that, TextureBrush_1new_FUNC);
- rc = (jintLong)new TextureBrush((Image *)arg0, (WrapMode)arg1, arg2, arg3, arg4, arg5);
- Gdip_NATIVE_EXIT(env, that, TextureBrush_1new_FUNC);
+ Rect _arg1, *lparg1=NULL;
+ jlong rc = 0;
+ Gdip_NATIVE_ENTER(env, that, TextureBrush_1new__JLorg_eclipse_swt_internal_gdip_Rect_2J_FUNC);
+ if (arg1) if ((lparg1 = getRectFields(env, arg1, &_arg1)) == NULL) goto fail;
+ rc = (jlong)new TextureBrush((Image *)arg0, *(Rect *)lparg1, (ImageAttributes *)arg2);
+fail:
+ if (arg1 && lparg1) setRectFields(env, arg1, lparg1);
+ Gdip_NATIVE_EXIT(env, that, TextureBrush_1new__JLorg_eclipse_swt_internal_gdip_Rect_2J_FUNC);
return rc;
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.cpp b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.cpp
index de67fb8e79..5b8d8e7e56 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.cpp
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.cpp
@@ -28,21 +28,9 @@ char * Gdip_nativeFunctionNames[] = {
"Bitmap_1LockBits",
"Bitmap_1UnlockBits",
"Bitmap_1delete",
-#ifndef JNI64
- "Bitmap_1new__I",
-#else
+ "Bitmap_1new__IIIIJ",
"Bitmap_1new__J",
-#endif
-#ifndef JNI64
- "Bitmap_1new__II",
-#else
"Bitmap_1new__JJ",
-#endif
-#ifndef JNI64
- "Bitmap_1new__IIIII",
-#else
- "Bitmap_1new__IIIIJ",
-#endif
"Bitmap_1new___3CZ",
"Brush_1Clone",
"Brush_1GetType",
@@ -51,32 +39,16 @@ char * Gdip_nativeFunctionNames[] = {
"FontFamily_1IsAvailable",
"FontFamily_1delete",
"FontFamily_1new__",
-#ifndef JNI64
- "FontFamily_1new___3CI",
-#else
"FontFamily_1new___3CJ",
-#endif
"Font_1GetFamily",
"Font_1GetLogFontW",
"Font_1GetSize",
"Font_1GetStyle",
"Font_1IsAvailable",
"Font_1delete",
-#ifndef JNI64
- "Font_1new__IFII",
-#else
"Font_1new__JFII",
-#endif
-#ifndef JNI64
- "Font_1new__II",
-#else
"Font_1new__JJ",
-#endif
-#ifndef JNI64
- "Font_1new___3CFIII",
-#else
"Font_1new___3CFIIJ",
-#endif
"GdiplusShutdown",
"GdiplusStartup",
"GdiplusStartupInput_1sizeof",
@@ -103,42 +75,18 @@ char * Gdip_nativeFunctionNames[] = {
"GraphicsPath_1new__I",
"GraphicsPath_1new___3I_3BII",
"Graphics_1DrawArc",
-#ifndef JNI64
- "Graphics_1DrawDriverString__IIIIILorg_eclipse_swt_internal_gdip_PointF_2II",
-#else
"Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ",
-#endif
-#ifndef JNI64
- "Graphics_1DrawDriverString__IIIII_3FII",
-#else
"Graphics_1DrawDriverString__JJIJJ_3FIJ",
-#endif
"Graphics_1DrawEllipse",
-#ifndef JNI64
- "Graphics_1DrawImage__IIII",
-#else
"Graphics_1DrawImage__JJII",
-#endif
-#ifndef JNI64
- "Graphics_1DrawImage__IILorg_eclipse_swt_internal_gdip_Rect_2IIIIIIII",
-#else
"Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ",
-#endif
"Graphics_1DrawLine",
"Graphics_1DrawLines",
"Graphics_1DrawPath",
"Graphics_1DrawPolygon",
"Graphics_1DrawRectangle",
-#ifndef JNI64
- "Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2I",
-#else
"Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J",
-#endif
-#ifndef JNI64
- "Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2II",
-#else
"Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ",
-#endif
"Graphics_1FillEllipse",
"Graphics_1FillPath",
"Graphics_1FillPie",
@@ -146,16 +94,8 @@ char * Gdip_nativeFunctionNames[] = {
"Graphics_1FillRectangle",
"Graphics_1Flush",
"Graphics_1GetClip",
-#ifndef JNI64
- "Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_RectF_2",
-#else
"Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2",
-#endif
-#ifndef JNI64
- "Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_Rect_2",
-#else
"Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2",
-#endif
"Graphics_1GetHDC",
"Graphics_1GetInterpolationMode",
"Graphics_1GetSmoothingMode",
@@ -163,41 +103,17 @@ char * Gdip_nativeFunctionNames[] = {
"Graphics_1GetTransform",
"Graphics_1GetVisibleClipBounds",
"Graphics_1MeasureDriverString",
-#ifndef JNI64
- "Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2ILorg_eclipse_swt_internal_gdip_RectF_2",
-#else
"Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2",
-#endif
-#ifndef JNI64
- "Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2",
-#else
"Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2",
-#endif
"Graphics_1ReleaseHDC",
"Graphics_1ResetClip",
"Graphics_1Restore",
"Graphics_1Save",
"Graphics_1ScaleTransform",
-#ifndef JNI64
- "Graphics_1SetClip__III",
-#else
"Graphics_1SetClip__JJI",
-#endif
-#ifndef JNI64
- "Graphics_1SetClip__ILorg_eclipse_swt_internal_gdip_Rect_2I",
-#else
"Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I",
-#endif
-#ifndef JNI64
- "Graphics_1SetClipPath__II",
-#else
"Graphics_1SetClipPath__JJ",
-#endif
-#ifndef JNI64
- "Graphics_1SetClipPath__III",
-#else
"Graphics_1SetClipPath__JJI",
-#endif
"Graphics_1SetCompositingQuality",
"Graphics_1SetInterpolationMode",
"Graphics_1SetPageUnit",
@@ -214,12 +130,14 @@ char * Gdip_nativeFunctionNames[] = {
"ImageAttributes_1SetWrapMode",
"ImageAttributes_1delete",
"ImageAttributes_1new",
+ "Image_1Clone",
"Image_1GetHeight",
"Image_1GetLastStatus",
"Image_1GetPalette",
"Image_1GetPaletteSize",
"Image_1GetPixelFormat",
"Image_1GetWidth",
+ "Image_1delete",
"LinearGradientBrush_1ResetTransform",
"LinearGradientBrush_1ScaleTransform",
"LinearGradientBrush_1SetInterpolationColors",
@@ -235,30 +153,14 @@ char * Gdip_nativeFunctionNames[] = {
"Matrix_1Scale",
"Matrix_1SetElements",
"Matrix_1Shear",
-#ifndef JNI64
- "Matrix_1TransformPoints__ILorg_eclipse_swt_internal_gdip_PointF_2I",
-#else
"Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I",
-#endif
-#ifndef JNI64
- "Matrix_1TransformPoints__I_3FI",
-#else
"Matrix_1TransformPoints__J_3FI",
-#endif
"Matrix_1TransformVectors",
"Matrix_1Translate",
"Matrix_1delete",
"Matrix_1new",
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2I",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI",
-#endif
"PathGradientBrush_1SetCenterColor",
"PathGradientBrush_1SetCenterPoint",
"PathGradientBrush_1SetGraphicsPath",
@@ -287,11 +189,7 @@ char * Gdip_nativeFunctionNames[] = {
"Region_1IsInfinite",
"Region_1delete",
"Region_1new__",
-#ifndef JNI64
- "Region_1new__I",
-#else
"Region_1new__J",
-#endif
"Region_1newGraphicsPath",
"SolidBrush_1delete",
"SolidBrush_1new",
@@ -303,12 +201,14 @@ char * Gdip_nativeFunctionNames[] = {
"StringFormat_1SetHotkeyPrefix",
"StringFormat_1SetTabStops",
"StringFormat_1delete",
+ "TextureBrush_1GetImage",
"TextureBrush_1ResetTransform",
"TextureBrush_1ScaleTransform",
"TextureBrush_1SetTransform",
"TextureBrush_1TranslateTransform",
"TextureBrush_1delete",
- "TextureBrush_1new",
+ "TextureBrush_1new__JIFFFF",
+ "TextureBrush_1new__JLorg_eclipse_swt_internal_gdip_Rect_2J",
};
#define NATIVE_FUNCTION_COUNT sizeof(Gdip_nativeFunctionNames) / sizeof(char*)
int Gdip_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.h
index 53f5ad67aa..c40fac9af8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_stats.h
@@ -38,21 +38,9 @@ typedef enum {
Bitmap_1LockBits_FUNC,
Bitmap_1UnlockBits_FUNC,
Bitmap_1delete_FUNC,
-#ifndef JNI64
- Bitmap_1new__I_FUNC,
-#else
+ Bitmap_1new__IIIIJ_FUNC,
Bitmap_1new__J_FUNC,
-#endif
-#ifndef JNI64
- Bitmap_1new__II_FUNC,
-#else
Bitmap_1new__JJ_FUNC,
-#endif
-#ifndef JNI64
- Bitmap_1new__IIIII_FUNC,
-#else
- Bitmap_1new__IIIIJ_FUNC,
-#endif
Bitmap_1new___3CZ_FUNC,
Brush_1Clone_FUNC,
Brush_1GetType_FUNC,
@@ -61,32 +49,16 @@ typedef enum {
FontFamily_1IsAvailable_FUNC,
FontFamily_1delete_FUNC,
FontFamily_1new___FUNC,
-#ifndef JNI64
- FontFamily_1new___3CI_FUNC,
-#else
FontFamily_1new___3CJ_FUNC,
-#endif
Font_1GetFamily_FUNC,
Font_1GetLogFontW_FUNC,
Font_1GetSize_FUNC,
Font_1GetStyle_FUNC,
Font_1IsAvailable_FUNC,
Font_1delete_FUNC,
-#ifndef JNI64
- Font_1new__IFII_FUNC,
-#else
Font_1new__JFII_FUNC,
-#endif
-#ifndef JNI64
- Font_1new__II_FUNC,
-#else
Font_1new__JJ_FUNC,
-#endif
-#ifndef JNI64
- Font_1new___3CFIII_FUNC,
-#else
Font_1new___3CFIIJ_FUNC,
-#endif
GdiplusShutdown_FUNC,
GdiplusStartup_FUNC,
GdiplusStartupInput_1sizeof_FUNC,
@@ -113,42 +85,18 @@ typedef enum {
GraphicsPath_1new__I_FUNC,
GraphicsPath_1new___3I_3BII_FUNC,
Graphics_1DrawArc_FUNC,
-#ifndef JNI64
- Graphics_1DrawDriverString__IIIIILorg_eclipse_swt_internal_gdip_PointF_2II_FUNC,
-#else
Graphics_1DrawDriverString__JJIJJLorg_eclipse_swt_internal_gdip_PointF_2IJ_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1DrawDriverString__IIIII_3FII_FUNC,
-#else
Graphics_1DrawDriverString__JJIJJ_3FIJ_FUNC,
-#endif
Graphics_1DrawEllipse_FUNC,
-#ifndef JNI64
- Graphics_1DrawImage__IIII_FUNC,
-#else
Graphics_1DrawImage__JJII_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1DrawImage__IILorg_eclipse_swt_internal_gdip_Rect_2IIIIIIII_FUNC,
-#else
Graphics_1DrawImage__JJLorg_eclipse_swt_internal_gdip_Rect_2IIIIIJJJ_FUNC,
-#endif
Graphics_1DrawLine_FUNC,
Graphics_1DrawLines_FUNC,
Graphics_1DrawPath_FUNC,
Graphics_1DrawPolygon_FUNC,
Graphics_1DrawRectangle_FUNC,
-#ifndef JNI64
- Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2I_FUNC,
-#else
Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2J_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1DrawString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2II_FUNC,
-#else
Graphics_1DrawString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JJ_FUNC,
-#endif
Graphics_1FillEllipse_FUNC,
Graphics_1FillPath_FUNC,
Graphics_1FillPie_FUNC,
@@ -156,16 +104,8 @@ typedef enum {
Graphics_1FillRectangle_FUNC,
Graphics_1Flush_FUNC,
Graphics_1GetClip_FUNC,
-#ifndef JNI64
- Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_RectF_2_FUNC,
-#else
Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_RectF_2_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1GetClipBounds__ILorg_eclipse_swt_internal_gdip_Rect_2_FUNC,
-#else
Graphics_1GetClipBounds__JLorg_eclipse_swt_internal_gdip_Rect_2_FUNC,
-#endif
Graphics_1GetHDC_FUNC,
Graphics_1GetInterpolationMode_FUNC,
Graphics_1GetSmoothingMode_FUNC,
@@ -173,41 +113,17 @@ typedef enum {
Graphics_1GetTransform_FUNC,
Graphics_1GetVisibleClipBounds_FUNC,
Graphics_1MeasureDriverString_FUNC,
-#ifndef JNI64
- Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2ILorg_eclipse_swt_internal_gdip_RectF_2_FUNC,
-#else
Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2JLorg_eclipse_swt_internal_gdip_RectF_2_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1MeasureString__I_3CIILorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2_FUNC,
-#else
Graphics_1MeasureString__J_3CIJLorg_eclipse_swt_internal_gdip_PointF_2Lorg_eclipse_swt_internal_gdip_RectF_2_FUNC,
-#endif
Graphics_1ReleaseHDC_FUNC,
Graphics_1ResetClip_FUNC,
Graphics_1Restore_FUNC,
Graphics_1Save_FUNC,
Graphics_1ScaleTransform_FUNC,
-#ifndef JNI64
- Graphics_1SetClip__III_FUNC,
-#else
Graphics_1SetClip__JJI_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1SetClip__ILorg_eclipse_swt_internal_gdip_Rect_2I_FUNC,
-#else
Graphics_1SetClip__JLorg_eclipse_swt_internal_gdip_Rect_2I_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1SetClipPath__II_FUNC,
-#else
Graphics_1SetClipPath__JJ_FUNC,
-#endif
-#ifndef JNI64
- Graphics_1SetClipPath__III_FUNC,
-#else
Graphics_1SetClipPath__JJI_FUNC,
-#endif
Graphics_1SetCompositingQuality_FUNC,
Graphics_1SetInterpolationMode_FUNC,
Graphics_1SetPageUnit_FUNC,
@@ -224,12 +140,14 @@ typedef enum {
ImageAttributes_1SetWrapMode_FUNC,
ImageAttributes_1delete_FUNC,
ImageAttributes_1new_FUNC,
+ Image_1Clone_FUNC,
Image_1GetHeight_FUNC,
Image_1GetLastStatus_FUNC,
Image_1GetPalette_FUNC,
Image_1GetPaletteSize_FUNC,
Image_1GetPixelFormat_FUNC,
Image_1GetWidth_FUNC,
+ Image_1delete_FUNC,
LinearGradientBrush_1ResetTransform_FUNC,
LinearGradientBrush_1ScaleTransform_FUNC,
LinearGradientBrush_1SetInterpolationColors_FUNC,
@@ -245,30 +163,14 @@ typedef enum {
Matrix_1Scale_FUNC,
Matrix_1SetElements_FUNC,
Matrix_1Shear_FUNC,
-#ifndef JNI64
- Matrix_1TransformPoints__ILorg_eclipse_swt_internal_gdip_PointF_2I_FUNC,
-#else
Matrix_1TransformPoints__JLorg_eclipse_swt_internal_gdip_PointF_2I_FUNC,
-#endif
-#ifndef JNI64
- Matrix_1TransformPoints__I_3FI_FUNC,
-#else
Matrix_1TransformPoints__J_3FI_FUNC,
-#endif
Matrix_1TransformVectors_FUNC,
Matrix_1Translate_FUNC,
Matrix_1delete_FUNC,
Matrix_1new_FUNC,
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2I_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_gdip_BitmapData_2J_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_gdip_ColorPalette_2JI_FUNC,
-#endif
PathGradientBrush_1SetCenterColor_FUNC,
PathGradientBrush_1SetCenterPoint_FUNC,
PathGradientBrush_1SetGraphicsPath_FUNC,
@@ -297,11 +199,7 @@ typedef enum {
Region_1IsInfinite_FUNC,
Region_1delete_FUNC,
Region_1new___FUNC,
-#ifndef JNI64
- Region_1new__I_FUNC,
-#else
Region_1new__J_FUNC,
-#endif
Region_1newGraphicsPath_FUNC,
SolidBrush_1delete_FUNC,
SolidBrush_1new_FUNC,
@@ -313,10 +211,12 @@ typedef enum {
StringFormat_1SetHotkeyPrefix_FUNC,
StringFormat_1SetTabStops_FUNC,
StringFormat_1delete_FUNC,
+ TextureBrush_1GetImage_FUNC,
TextureBrush_1ResetTransform_FUNC,
TextureBrush_1ScaleTransform_FUNC,
TextureBrush_1SetTransform_FUNC,
TextureBrush_1TranslateTransform_FUNC,
TextureBrush_1delete_FUNC,
- TextureBrush_1new_FUNC,
+ TextureBrush_1new__JIFFFF_FUNC,
+ TextureBrush_1new__JLorg_eclipse_swt_internal_gdip_Rect_2J_FUNC,
} Gdip_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_structs.cpp b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_structs.cpp
index abe3a0de43..d9fe2b9f84 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_structs.cpp
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/gdip_structs.cpp
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -35,8 +35,8 @@ void cacheBitmapDataFields(JNIEnv *env, jobject lpObject)
BitmapDataFc.Height = env->GetFieldID(BitmapDataFc.clazz, "Height", "I");
BitmapDataFc.Stride = env->GetFieldID(BitmapDataFc.clazz, "Stride", "I");
BitmapDataFc.PixelFormat = env->GetFieldID(BitmapDataFc.clazz, "PixelFormat", "I");
- BitmapDataFc.Scan0 = env->GetFieldID(BitmapDataFc.clazz, "Scan0", I_J);
- BitmapDataFc.Reserved = env->GetFieldID(BitmapDataFc.clazz, "Reserved", I_J);
+ BitmapDataFc.Scan0 = env->GetFieldID(BitmapDataFc.clazz, "Scan0", "J");
+ BitmapDataFc.Reserved = env->GetFieldID(BitmapDataFc.clazz, "Reserved", "J");
BitmapDataFc.cached = 1;
}
@@ -47,8 +47,8 @@ BitmapData *getBitmapDataFields(JNIEnv *env, jobject lpObject, BitmapData *lpStr
lpStruct->Height = env->GetIntField(lpObject, BitmapDataFc.Height);
lpStruct->Stride = env->GetIntField(lpObject, BitmapDataFc.Stride);
lpStruct->PixelFormat = (PixelFormat)env->GetIntField(lpObject, BitmapDataFc.PixelFormat);
- lpStruct->Scan0 = (void*)env->GetIntLongField(lpObject, BitmapDataFc.Scan0);
- lpStruct->Reserved = (UINT_PTR)env->GetIntLongField(lpObject, BitmapDataFc.Reserved);
+ lpStruct->Scan0 = (void*)env->GetLongField(lpObject, BitmapDataFc.Scan0);
+ lpStruct->Reserved = (UINT_PTR)env->GetLongField(lpObject, BitmapDataFc.Reserved);
return lpStruct;
}
@@ -59,8 +59,8 @@ void setBitmapDataFields(JNIEnv *env, jobject lpObject, BitmapData *lpStruct)
env->SetIntField(lpObject, BitmapDataFc.Height, (jint)lpStruct->Height);
env->SetIntField(lpObject, BitmapDataFc.Stride, (jint)lpStruct->Stride);
env->SetIntField(lpObject, BitmapDataFc.PixelFormat, (jint)lpStruct->PixelFormat);
- env->SetIntLongField(lpObject, BitmapDataFc.Scan0, (jintLong)lpStruct->Scan0);
- env->SetIntLongField(lpObject, BitmapDataFc.Reserved, (jintLong)lpStruct->Reserved);
+ env->SetLongField(lpObject, BitmapDataFc.Scan0, (jlong)lpStruct->Scan0);
+ env->SetLongField(lpObject, BitmapDataFc.Reserved, (jlong)lpStruct->Reserved);
}
#endif
@@ -121,7 +121,7 @@ void cacheGdiplusStartupInputFields(JNIEnv *env, jobject lpObject)
if (GdiplusStartupInputFc.cached) return;
GdiplusStartupInputFc.clazz = env->GetObjectClass(lpObject);
GdiplusStartupInputFc.GdiplusVersion = env->GetFieldID(GdiplusStartupInputFc.clazz, "GdiplusVersion", "I");
- GdiplusStartupInputFc.DebugEventCallback = env->GetFieldID(GdiplusStartupInputFc.clazz, "DebugEventCallback", I_J);
+ GdiplusStartupInputFc.DebugEventCallback = env->GetFieldID(GdiplusStartupInputFc.clazz, "DebugEventCallback", "J");
GdiplusStartupInputFc.SuppressBackgroundThread = env->GetFieldID(GdiplusStartupInputFc.clazz, "SuppressBackgroundThread", "Z");
GdiplusStartupInputFc.SuppressExternalCodecs = env->GetFieldID(GdiplusStartupInputFc.clazz, "SuppressExternalCodecs", "Z");
GdiplusStartupInputFc.cached = 1;
@@ -131,7 +131,7 @@ GdiplusStartupInput *getGdiplusStartupInputFields(JNIEnv *env, jobject lpObject,
{
if (!GdiplusStartupInputFc.cached) cacheGdiplusStartupInputFields(env, lpObject);
lpStruct->GdiplusVersion = env->GetIntField(lpObject, GdiplusStartupInputFc.GdiplusVersion);
- lpStruct->DebugEventCallback = (DebugEventProc)env->GetIntLongField(lpObject, GdiplusStartupInputFc.DebugEventCallback);
+ lpStruct->DebugEventCallback = (DebugEventProc)env->GetLongField(lpObject, GdiplusStartupInputFc.DebugEventCallback);
lpStruct->SuppressBackgroundThread = (BOOL)env->GetBooleanField(lpObject, GdiplusStartupInputFc.SuppressBackgroundThread);
lpStruct->SuppressExternalCodecs = (BOOL)env->GetBooleanField(lpObject, GdiplusStartupInputFc.SuppressExternalCodecs);
return lpStruct;
@@ -141,7 +141,7 @@ void setGdiplusStartupInputFields(JNIEnv *env, jobject lpObject, GdiplusStartupI
{
if (!GdiplusStartupInputFc.cached) cacheGdiplusStartupInputFields(env, lpObject);
env->SetIntField(lpObject, GdiplusStartupInputFc.GdiplusVersion, (jint)lpStruct->GdiplusVersion);
- env->SetIntLongField(lpObject, GdiplusStartupInputFc.DebugEventCallback, (jintLong)lpStruct->DebugEventCallback);
+ env->SetLongField(lpObject, GdiplusStartupInputFc.DebugEventCallback, (jlong)lpStruct->DebugEventCallback);
env->SetBooleanField(lpObject, GdiplusStartupInputFc.SuppressBackgroundThread, (jboolean)lpStruct->SuppressBackgroundThread);
env->SetBooleanField(lpObject, GdiplusStartupInputFc.SuppressExternalCodecs, (jboolean)lpStruct->SuppressExternalCodecs);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/javaw.exe.manifest b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/javaw.exe.manifest
index 20c6887e2e..2778a89b49 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/javaw.exe.manifest
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/javaw.exe.manifest
@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="SWT.javaw" type="win32" />
- <description>Standard Widget Toolkit</description>
- <dependency>
- <dependentAssembly>
- <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
- </dependentAssembly>
- </dependency>
- <application xmlns="urn:schemas-microsoft-com:asm.v3">
- <windowsSettings>
- <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
- <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
- <!-- Un-comment the line below to enable GDI-scaling in this project. This will enable text -->
- <!-- to render crisply in DPI-unaware content -->
- <!--<gdiScaling xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">true</gdiScaling>-->
- </windowsSettings>
- </application>
- <!--Specifically targeting your application for Windows 8.1 or Windows 10: https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx -->
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
- <application>
- <!-- Windows 10 -->
- <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
- <!-- Windows 8.1 -->
- <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
- <!-- Windows Vista -->
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
- <!-- Windows 7 -->
- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
- <!-- Windows 8 -->
- <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
- </application>
- </compatibility>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="SWT.javaw" type="win32" />
+ <description>Standard Widget Toolkit</description>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
+ </dependentAssembly>
+ </dependency>
+ <application xmlns="urn:schemas-microsoft-com:asm.v3">
+ <windowsSettings>
+ <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
+ <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
+ <!-- Un-comment the line below to enable GDI-scaling in this project. This will enable text -->
+ <!-- to render crisply in DPI-unaware content -->
+ <!--<gdiScaling xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">true</gdiScaling>-->
+ </windowsSettings>
+ </application>
+ <!--Specifically targeting your application for Windows 8.1 or Windows 10: https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx -->
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- Windows 10 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ </application>
+ </compatibility>
</assembly> \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak
index 6b7637b80b..e70c3dd343 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak
@@ -1,5 +1,5 @@
#*******************************************************************************
-# Copyright (c) 2000, 2018 IBM Corporation and others.
+# Copyright (c) 2000, 2022 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -25,8 +25,8 @@ WS_PREFIX = win32
SWT_VERSION = $(maj_ver)$(min_ver)r$(rev)
SWT_LIB = $(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).dll
SWT_LIBS = comctl32.lib shell32.lib imm32.lib oleacc.lib usp10.lib \
- wininet.lib Crypt32.lib Shlwapi.lib Uxtheme.lib Propsys.lib Urlmon.lib \
- Msimg32.lib
+ wininet.lib Shlwapi.lib Uxtheme.lib Propsys.lib Urlmon.lib \
+ Msimg32.lib Dwmapi.lib
SWT_OBJS = swt.obj callback.obj c.obj c_stats.obj \
os.obj os_structs.obj os_custom.obj os_stats.obj \
com_structs.obj com.obj com_stats.obj com_custom.obj
@@ -41,11 +41,6 @@ AWT_LIB = $(AWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).dll
AWT_LIBS = "$(SWT_JAVA_HOME)\lib\jawt.lib"
AWT_OBJS = swt_awt.obj
-WEBKIT_PREFIX = swt-webkit
-WEBKIT_LIB = $(WEBKIT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).dll
-WEBKIT_LIBS = $(WEBKIT_DIR)\lib\webkit.lib $(WEBKIT_SUPPORT_DIR)\win\lib\CFNetwork.lib $(WEBKIT_SUPPORT_DIR)\win\lib\CoreFoundation.lib
-WEBKIT_OBJS = webkit_win32.obj webkit_win32_stats.obj webkit_win32_custom.obj webkit_win32_structs.obj
-
WGL_PREFIX = swt-wgl
WGL_LIB = $(WGL_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).dll
WGL_LIBS = opengl32.lib
@@ -54,19 +49,11 @@ WGL_OBJS = wgl.obj wgl_structs.obj wgl_stats.obj
# Uncomment for Native Stats tool
#NATIVE_STATS = -DNATIVE_STATS
-WEBKITCFLAGS = -c -O1\
- -DSWT_VERSION=$(SWT_VERSION) \
- $(NATIVE_STATS) \
- -I"$(SWT_JAVA_HOME)\include" -I"$(SWT_JAVA_HOME)\include\win32" \
- -I"$(WEBKIT_DIR)" \
- -I"$(WEBKIT_DIR)\WebKit\win" \
- -I"$(WEBKIT_DIR)\JavaScriptCore\ForwardingHeaders" \
- -I"$(WEBKIT_SUPPORT_DIR)\win\include"
-
#CFLAGS = $(cdebug) $(cflags) $(cvarsmt) $(CFLAGS) \
CFLAGS = -O1 -DNDEBUG -DUNICODE -D_UNICODE /c $(cflags) $(cvarsmt) $(CFLAGS) \
-DSWT_VERSION=$(maj_ver)$(min_ver) -DSWT_REVISION=$(rev) $(NATIVE_STATS) -DUSE_ASSEMBLER \
/I"$(SWT_JAVA_HOME)\include" /I"$(SWT_JAVA_HOME)\include\win32" /I.
+
RCFLAGS = $(rcflags) $(rcvars) $(RCFLAGS) -DSWT_FILE_VERSION=\"$(maj_ver).$(min_ver).$(rev).0\" -DSWT_COMMA_VERSION=$(comma_ver)
ldebug = /RELEASE /INCREMENTAL:NO /NOLOGO
dlllflags = -dll
@@ -75,15 +62,6 @@ olelibsmt = ole32.lib uuid.lib oleaut32.lib $(guilibsmt)
all: make_swt make_awt make_gdip make_wgl
-webkit_win32_custom.obj: webkit_win32_custom.cpp
- cl $(WEBKITCFLAGS) webkit_win32_custom.cpp
-webkit_win32_stats.obj: webkit_win32_stats.cpp
- cl $(WEBKITCFLAGS) webkit_win32_stats.cpp
-webkit_win32_structs.obj: webkit_win32_structs.cpp
- cl $(WEBKITCFLAGS) webkit_win32_structs.cpp
-webkit_win32.obj: webkit_win32.cpp
- cl $(WEBKITCFLAGS) webkit_win32.cpp
-
.c.obj:
cl $(CFLAGS) $*.c
@@ -117,15 +95,6 @@ make_awt: $(AWT_OBJS) swt_awt.res
link @templrf
del templrf
-make_webkit: $(WEBKIT_OBJS) swt_webkit.res
- echo $(ldebug) $(dlllflags) >templrf
- echo $(WEBKIT_LIBS) >>templrf
- echo $(WEBKIT_OBJS) >>templrf
- echo swt_webkit.res >>templrf
- echo -out:$(WEBKIT_LIB) >>templrf
- link @templrf
- del templrf
-
make_wgl: $(WGL_OBJS) swt_wgl.res
echo $(ldebug) $(dlllflags) $(guilibsmt) >templrf
echo $(WGL_LIBS) >>templrf
@@ -144,9 +113,6 @@ swt_gdip.res:
swt_awt.res:
rc $(RCFLAGS) -DSWT_ORG_FILENAME=\"$(AWT_LIB)\" -r -fo swt_awt.res swt_awt.rc
-swt_webkit.res:
- rc $(RCFLAGS) -DSWT_ORG_FILENAME=\"$(WEBKIT_LIB)\" -r -fo swt_webkit.res swt_webkit.rc
-
swt_wgl.res:
rc $(RCFLAGS) -DSWT_ORG_FILENAME=\"$(WGL_LIB)\" -r -fo swt_wgl.res swt_wgl.rc
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
index ee960d35cb..fd0a44c49c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -49,7 +49,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ACTCTX_1sizeof)
#ifndef NO_AbortDoc
JNIEXPORT jint JNICALL OS_NATIVE(AbortDoc)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, AbortDoc_FUNC);
@@ -61,27 +61,27 @@ JNIEXPORT jint JNICALL OS_NATIVE(AbortDoc)
#ifndef NO_ActivateActCtx
JNIEXPORT jboolean JNICALL OS_NATIVE(ActivateActCtx)
- (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
- jintLong *lparg1=NULL;
+ jlong *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ActivateActCtx_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)ActivateActCtx((HANDLE)arg0, (ULONG_PTR*)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, ActivateActCtx_FUNC);
return rc;
}
#endif
#ifndef NO_ActivateKeyboardLayout
-JNIEXPORT jintLong JNICALL OS_NATIVE(ActivateKeyboardLayout)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(ActivateKeyboardLayout)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, ActivateKeyboardLayout_FUNC);
- rc = (jintLong)ActivateKeyboardLayout((HKL)arg0, arg1);
+ rc = (jlong)ActivateKeyboardLayout((HKL)arg0, arg1);
OS_NATIVE_EXIT(env, that, ActivateKeyboardLayout_FUNC);
return rc;
}
@@ -89,7 +89,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(ActivateKeyboardLayout)
#ifndef NO_AddFontResourceEx
JNIEXPORT jint JNICALL OS_NATIVE(AddFontResourceEx)
- (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jlong arg2)
{
jchar *lparg0=NULL;
jint rc = 0;
@@ -97,7 +97,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(AddFontResourceEx)
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)AddFontResourceEx(lparg0, arg1, (PVOID)arg2);
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, AddFontResourceEx_FUNC);
return rc;
}
@@ -133,7 +133,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(AllowSetForegroundWindow)
#ifndef NO_AlphaBlend
JNIEXPORT jboolean JNICALL OS_NATIVE(AlphaBlend)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jint arg6, jint arg7, jint arg8, jint arg9, jobject arg10)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jlong arg5, jint arg6, jint arg7, jint arg8, jint arg9, jobject arg10)
{
BLENDFUNCTION _arg10, *lparg10=NULL;
jboolean rc = 0;
@@ -149,7 +149,7 @@ fail:
#ifndef NO_Arc
JNIEXPORT jboolean JNICALL OS_NATIVE(Arc)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, Arc_FUNC);
@@ -173,12 +173,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(AssocQueryString)
if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)AssocQueryString(arg0, arg1, lparg2, lparg3, lparg4, lparg5);
+ rc = (jint)AssocQueryString(arg0, arg1, lparg2, lparg3, lparg4, (DWORD *)lparg5);
fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+ if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, JNI_ABORT);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
OS_NATIVE_EXIT(env, that, AssocQueryString_FUNC);
return rc;
}
@@ -232,18 +232,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(BP_1PAINTPARAMS_1sizeof)
}
#endif
-#ifndef NO_BROWSEINFO_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(BROWSEINFO_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, BROWSEINFO_1sizeof_FUNC);
- rc = (jint)BROWSEINFO_sizeof();
- OS_NATIVE_EXIT(env, that, BROWSEINFO_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_BUTTON_1IMAGELIST_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(BUTTON_1IMAGELIST_1sizeof)
(JNIEnv *env, jclass that)
@@ -257,48 +245,47 @@ JNIEXPORT jint JNICALL OS_NATIVE(BUTTON_1IMAGELIST_1sizeof)
#endif
#ifndef NO_BeginBufferedPaint
-JNIEXPORT jintLong JNICALL OS_NATIVE(BeginBufferedPaint)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2, jobject arg3, jintLongArray arg4)
+JNIEXPORT jlong JNICALL OS_NATIVE(BeginBufferedPaint)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2, jobject arg3, jlongArray arg4)
{
RECT _arg1, *lparg1=NULL;
BP_PAINTPARAMS _arg3, *lparg3=NULL;
- jintLong *lparg4=NULL;
- jintLong rc = 0;
+ jlong *lparg4=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, BeginBufferedPaint_FUNC);
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg3) if ((lparg3 = getBP_PAINTPARAMSFields(env, arg3, &_arg3)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jintLong)BeginBufferedPaint((HDC)arg0, lparg1, arg2, lparg3, (HDC*)lparg4);
+ if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ rc = (jlong)BeginBufferedPaint((HDC)arg0, lparg1, arg2, lparg3, (HDC*)lparg4);
fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
+ if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) setBP_PAINTPARAMSFields(env, arg3, lparg3);
- if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, BeginBufferedPaint_FUNC);
return rc;
}
#endif
#ifndef NO_BeginDeferWindowPos
-JNIEXPORT jintLong JNICALL OS_NATIVE(BeginDeferWindowPos)
+JNIEXPORT jlong JNICALL OS_NATIVE(BeginDeferWindowPos)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, BeginDeferWindowPos_FUNC);
- rc = (jintLong)BeginDeferWindowPos(arg0);
+ rc = (jlong)BeginDeferWindowPos(arg0);
OS_NATIVE_EXIT(env, that, BeginDeferWindowPos_FUNC);
return rc;
}
#endif
#ifndef NO_BeginPaint
-JNIEXPORT jintLong JNICALL OS_NATIVE(BeginPaint)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(BeginPaint)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
PAINTSTRUCT _arg1, *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, BeginPaint_FUNC);
- if (arg1) if ((lparg1 = getPAINTSTRUCTFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jintLong)BeginPaint((HWND)arg0, lparg1);
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+ rc = (jlong)BeginPaint((HWND)arg0, lparg1);
fail:
if (arg1 && lparg1) setPAINTSTRUCTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, BeginPaint_FUNC);
@@ -306,21 +293,9 @@ fail:
}
#endif
-#ifndef NO_BeginPath
-JNIEXPORT jboolean JNICALL OS_NATIVE(BeginPath)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, BeginPath_FUNC);
- rc = (jboolean)BeginPath((HDC)arg0);
- OS_NATIVE_EXIT(env, that, BeginPath_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_BitBlt
JNIEXPORT jboolean JNICALL OS_NATIVE(BitBlt)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jint arg6, jint arg7, jint arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jlong arg5, jint arg6, jint arg7, jint arg8)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, BitBlt_FUNC);
@@ -332,7 +307,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(BitBlt)
#ifndef NO_BringWindowToTop
JNIEXPORT jboolean JNICALL OS_NATIVE(BringWindowToTop)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, BringWindowToTop_FUNC);
@@ -378,54 +353,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(CANDIDATEFORM_1sizeof)
}
#endif
-#ifndef NO_CERT_1CONTEXT_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CERT_1CONTEXT_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CERT_1CONTEXT_1sizeof_FUNC);
- rc = (jint)CERT_CONTEXT_sizeof();
- OS_NATIVE_EXIT(env, that, CERT_1CONTEXT_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CERT_1INFO_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CERT_1INFO_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CERT_1INFO_1sizeof_FUNC);
- rc = (jint)CERT_INFO_sizeof();
- OS_NATIVE_EXIT(env, that, CERT_1INFO_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CERT_1NAME_1BLOB_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CERT_1NAME_1BLOB_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CERT_1NAME_1BLOB_1sizeof_FUNC);
- rc = (jint)CERT_NAME_BLOB_sizeof();
- OS_NATIVE_EXIT(env, that, CERT_1NAME_1BLOB_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CERT_1PUBLIC_1KEY_1INFO_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CERT_1PUBLIC_1KEY_1INFO_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CERT_1PUBLIC_1KEY_1INFO_1sizeof_FUNC);
- rc = (jint)CERT_PUBLIC_KEY_INFO_sizeof();
- OS_NATIVE_EXIT(env, that, CERT_1PUBLIC_1KEY_1INFO_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CHOOSECOLOR_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(CHOOSECOLOR_1sizeof)
(JNIEnv *env, jclass that)
@@ -450,6 +377,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(CHOOSEFONT_1sizeof)
}
#endif
+#ifndef NO_CIDA_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(CIDA_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, CIDA_1sizeof_FUNC);
+ rc = (jint)CIDA_sizeof();
+ OS_NATIVE_EXIT(env, that, CIDA_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_COMBOBOXINFO_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(COMBOBOXINFO_1sizeof)
(JNIEnv *env, jclass that)
@@ -486,121 +425,70 @@ JNIEXPORT jint JNICALL OS_NATIVE(CREATESTRUCT_1sizeof)
}
#endif
-#ifndef NO_CRYPT_1ALGORITHM_1IDENTIFIER_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CRYPT_1ALGORITHM_1IDENTIFIER_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CRYPT_1ALGORITHM_1IDENTIFIER_1sizeof_FUNC);
- rc = (jint)CRYPT_ALGORITHM_IDENTIFIER_sizeof();
- OS_NATIVE_EXIT(env, that, CRYPT_1ALGORITHM_1IDENTIFIER_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CRYPT_1BIT_1BLOB_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CRYPT_1BIT_1BLOB_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CRYPT_1BIT_1BLOB_1sizeof_FUNC);
- rc = (jint)CRYPT_BIT_BLOB_sizeof();
- OS_NATIVE_EXIT(env, that, CRYPT_1BIT_1BLOB_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CRYPT_1INTEGER_1BLOB_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CRYPT_1INTEGER_1BLOB_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CRYPT_1INTEGER_1BLOB_1sizeof_FUNC);
- rc = (jint)CRYPT_INTEGER_BLOB_sizeof();
- OS_NATIVE_EXIT(env, that, CRYPT_1INTEGER_1BLOB_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CRYPT_1OBJID_1BLOB_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(CRYPT_1OBJID_1BLOB_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CRYPT_1OBJID_1BLOB_1sizeof_FUNC);
- rc = (jint)CRYPT_OBJID_BLOB_sizeof();
- OS_NATIVE_EXIT(env, that, CRYPT_1OBJID_1BLOB_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CallNextHookEx
-JNIEXPORT jintLong JNICALL OS_NATIVE(CallNextHookEx)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(CallNextHookEx)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CallNextHookEx_FUNC);
- rc = (jintLong)CallNextHookEx((HHOOK)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
+ rc = (jlong)CallNextHookEx((HHOOK)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
OS_NATIVE_EXIT(env, that, CallNextHookEx_FUNC);
return rc;
}
#endif
#ifndef NO_CallWindowProc
-JNIEXPORT jintLong JNICALL OS_NATIVE(CallWindowProc)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4)
+JNIEXPORT jlong JNICALL OS_NATIVE(CallWindowProc)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CallWindowProc_FUNC);
- rc = (jintLong)CallWindowProc((WNDPROC)arg0, (HWND)arg1, arg2, arg3, arg4);
+ rc = (jlong)CallWindowProc((WNDPROC)arg0, (HWND)arg1, arg2, arg3, arg4);
OS_NATIVE_EXIT(env, that, CallWindowProc_FUNC);
return rc;
}
#endif
-#ifndef NO_CertNameToStr
-JNIEXPORT jint JNICALL OS_NATIVE(CertNameToStr)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2, jcharArray arg3, jint arg4)
-{
- CERT_NAME_BLOB _arg1, *lparg1=NULL;
- jchar *lparg3=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CertNameToStr_FUNC);
- if (arg1) if ((lparg1 = getCERT_NAME_BLOBFields(env, arg1, &_arg1)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)CertNameToStr(arg0, (PCERT_NAME_BLOB)lparg1, arg2, (LPWSTR)lparg3, arg4);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) setCERT_NAME_BLOBFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, CertNameToStr_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CharLower
-JNIEXPORT jintLong JNICALL OS_NATIVE(CharLower)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CharLower)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CharLower_FUNC);
- rc = (jintLong)CharLower((LPWSTR)arg0);
+ rc = (jlong)CharLower((LPWSTR)arg0);
OS_NATIVE_EXIT(env, that, CharLower_FUNC);
return rc;
}
#endif
#ifndef NO_CharUpper
-JNIEXPORT jintLong JNICALL OS_NATIVE(CharUpper)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CharUpper)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CharUpper_FUNC);
- rc = (jintLong)CharUpper((LPWSTR)arg0);
+ rc = (jlong)CharUpper((LPWSTR)arg0);
OS_NATIVE_EXIT(env, that, CharUpper_FUNC);
return rc;
}
#endif
+#ifndef NO_ChildWindowFromPointEx
+JNIEXPORT jlong JNICALL OS_NATIVE(ChildWindowFromPointEx)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
+{
+ POINT _arg1, *lparg1=NULL;
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, ChildWindowFromPointEx_FUNC);
+ if (arg1) if ((lparg1 = getPOINTFields(env, arg1, &_arg1)) == NULL) goto fail;
+ rc = (jlong)ChildWindowFromPointEx((HWND)arg0, *lparg1, (UINT)arg2);
+fail:
+ if (arg1 && lparg1) setPOINTFields(env, arg1, lparg1);
+ OS_NATIVE_EXIT(env, that, ChildWindowFromPointEx_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_ChooseColor
JNIEXPORT jboolean JNICALL OS_NATIVE(ChooseColor)
(JNIEnv *env, jclass that, jobject arg0)
@@ -609,7 +497,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ChooseColor)
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ChooseColor_FUNC);
if (arg0) if ((lparg0 = getCHOOSECOLORFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jboolean)ChooseColor((LPCHOOSECOLORW)lparg0);
+ rc = (jboolean)ChooseColor(lparg0);
fail:
if (arg0 && lparg0) setCHOOSECOLORFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, ChooseColor_FUNC);
@@ -625,7 +513,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ChooseFont)
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ChooseFont_FUNC);
if (arg0) if ((lparg0 = getCHOOSEFONTFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jboolean)ChooseFont((LPCHOOSEFONTW)lparg0);
+ rc = (jboolean)ChooseFont(lparg0);
fail:
if (arg0 && lparg0) setCHOOSEFONTFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, ChooseFont_FUNC);
@@ -635,7 +523,7 @@ fail:
#ifndef NO_ClientToScreen
JNIEXPORT jboolean JNICALL OS_NATIVE(ClientToScreen)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
POINT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -662,32 +550,24 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(CloseClipboard)
#endif
#ifndef NO_CloseEnhMetaFile
-JNIEXPORT jintLong JNICALL OS_NATIVE(CloseEnhMetaFile)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CloseEnhMetaFile)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CloseEnhMetaFile_FUNC);
- rc = (jintLong)CloseEnhMetaFile((HDC)arg0);
+ rc = (jlong)CloseEnhMetaFile((HDC)arg0);
OS_NATIVE_EXIT(env, that, CloseEnhMetaFile_FUNC);
return rc;
}
#endif
#ifndef NO_CloseGestureInfoHandle
-JNIEXPORT jintLong JNICALL OS_NATIVE(CloseGestureInfoHandle)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CloseGestureInfoHandle)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CloseGestureInfoHandle_FUNC);
-/*
- rc = (jintLong)CloseGestureInfoHandle((HGESTUREINFO)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CloseGestureInfoHandle)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(HGESTUREINFO))fp)((HGESTUREINFO)arg0);
- }
- }
+ rc = (jlong)CloseGestureInfoHandle((HGESTUREINFO)arg0);
OS_NATIVE_EXIT(env, that, CloseGestureInfoHandle_FUNC);
return rc;
}
@@ -695,7 +575,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CloseGestureInfoHandle)
#ifndef NO_CloseHandle
JNIEXPORT jboolean JNICALL OS_NATIVE(CloseHandle)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, CloseHandle_FUNC);
@@ -707,7 +587,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(CloseHandle)
#ifndef NO_ClosePrinter
JNIEXPORT jboolean JNICALL OS_NATIVE(ClosePrinter)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ClosePrinter_FUNC);
@@ -719,7 +599,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ClosePrinter)
#ifndef NO_CloseThemeData
JNIEXPORT jint JNICALL OS_NATIVE(CloseThemeData)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, CloseThemeData_FUNC);
@@ -731,46 +611,16 @@ JNIEXPORT jint JNICALL OS_NATIVE(CloseThemeData)
#ifndef NO_CloseTouchInputHandle
JNIEXPORT jboolean JNICALL OS_NATIVE(CloseTouchInputHandle)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, CloseTouchInputHandle_FUNC);
-/*
rc = (jboolean)CloseTouchInputHandle((HTOUCHINPUT)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, CloseTouchInputHandle)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(HTOUCHINPUT))fp)((HTOUCHINPUT)arg0);
- }
- }
OS_NATIVE_EXIT(env, that, CloseTouchInputHandle_FUNC);
return rc;
}
#endif
-#ifndef NO_CoCreateInstance
-JNIEXPORT jint JNICALL OS_NATIVE(CoCreateInstance)
- (JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLongArray arg4)
-{
- jbyte *lparg0=NULL;
- jbyte *lparg3=NULL;
- jintLong *lparg4=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CoCreateInstance_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)CoCreateInstance((REFCLSID)lparg0, (LPUNKNOWN)arg1, arg2, (REFIID)lparg3, (LPVOID *)lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, CoCreateInstance_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CoInternetIsFeatureEnabled
JNIEXPORT jint JNICALL OS_NATIVE(CoInternetIsFeatureEnabled)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
@@ -796,12 +646,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(CoInternetSetFeatureEnabled)
#endif
#ifndef NO_CoTaskMemAlloc
-JNIEXPORT jintLong JNICALL OS_NATIVE(CoTaskMemAlloc)
+JNIEXPORT jlong JNICALL OS_NATIVE(CoTaskMemAlloc)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CoTaskMemAlloc_FUNC);
- rc = (jintLong)CoTaskMemAlloc((ULONG)arg0);
+ rc = (jlong)CoTaskMemAlloc((ULONG)arg0);
OS_NATIVE_EXIT(env, that, CoTaskMemAlloc_FUNC);
return rc;
}
@@ -809,7 +659,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CoTaskMemAlloc)
#ifndef NO_CoTaskMemFree
JNIEXPORT void JNICALL OS_NATIVE(CoTaskMemFree)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, CoTaskMemFree_FUNC);
CoTaskMemFree((LPVOID)arg0);
@@ -819,7 +669,7 @@ JNIEXPORT void JNICALL OS_NATIVE(CoTaskMemFree)
#ifndef NO_CombineRgn
JNIEXPORT jint JNICALL OS_NATIVE(CombineRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, CombineRgn_FUNC);
@@ -829,55 +679,43 @@ JNIEXPORT jint JNICALL OS_NATIVE(CombineRgn)
}
#endif
-#ifndef NO_CommDlgExtendedError
-JNIEXPORT jint JNICALL OS_NATIVE(CommDlgExtendedError)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, CommDlgExtendedError_FUNC);
- rc = (jint)CommDlgExtendedError();
- OS_NATIVE_EXIT(env, that, CommDlgExtendedError_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CopyImage
-JNIEXPORT jintLong JNICALL OS_NATIVE(CopyImage)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+JNIEXPORT jlong JNICALL OS_NATIVE(CopyImage)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CopyImage_FUNC);
- rc = (jintLong)CopyImage((HANDLE)arg0, arg1, arg2, arg3, arg4);
+ rc = (jlong)CopyImage((HANDLE)arg0, arg1, arg2, arg3, arg4);
OS_NATIVE_EXIT(env, that, CopyImage_FUNC);
return rc;
}
#endif
#ifndef NO_CreateAcceleratorTable
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateAcceleratorTable)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateAcceleratorTable)
(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
{
jbyte *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateAcceleratorTable_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)CreateAcceleratorTable((LPACCEL)lparg0, arg1);
+ rc = (jlong)CreateAcceleratorTable((LPACCEL)lparg0, arg1);
fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, CreateAcceleratorTable_FUNC);
return rc;
}
#endif
#ifndef NO_CreateActCtx
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateActCtx)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateActCtx)
(JNIEnv *env, jclass that, jobject arg0)
{
ACTCTX _arg0, *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateActCtx_FUNC);
if (arg0) if ((lparg0 = getACTCTXFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)CreateActCtx(lparg0);
+ rc = (jlong)CreateActCtx(lparg0);
fail:
OS_NATIVE_EXIT(env, that, CreateActCtx_FUNC);
return rc;
@@ -885,14 +723,14 @@ fail:
#endif
#ifndef NO_CreateBitmap
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateBitmap)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateBitmap)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jbyteArray arg4)
{
jbyte *lparg4=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateBitmap_FUNC);
if (arg4) if ((lparg4 = (*env)->GetPrimitiveArrayCritical(env, arg4, NULL)) == NULL) goto fail;
- rc = (jintLong)CreateBitmap(arg0, arg1, arg2, arg3, (CONST VOID *)lparg4);
+ rc = (jlong)CreateBitmap(arg0, arg1, arg2, arg3, (CONST VOID *)lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleasePrimitiveArrayCritical(env, arg4, lparg4, JNI_ABORT);
OS_NATIVE_EXIT(env, that, CreateBitmap_FUNC);
@@ -902,7 +740,7 @@ fail:
#ifndef NO_CreateCaret
JNIEXPORT jboolean JNICALL OS_NATIVE(CreateCaret)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, CreateCaret_FUNC);
@@ -913,40 +751,40 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(CreateCaret)
#endif
#ifndef NO_CreateCompatibleBitmap
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateCompatibleBitmap)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateCompatibleBitmap)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateCompatibleBitmap_FUNC);
- rc = (jintLong)CreateCompatibleBitmap((HDC)arg0, arg1, arg2);
+ rc = (jlong)CreateCompatibleBitmap((HDC)arg0, arg1, arg2);
OS_NATIVE_EXIT(env, that, CreateCompatibleBitmap_FUNC);
return rc;
}
#endif
#ifndef NO_CreateCompatibleDC
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateCompatibleDC)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateCompatibleDC)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateCompatibleDC_FUNC);
- rc = (jintLong)CreateCompatibleDC((HDC)arg0);
+ rc = (jlong)CreateCompatibleDC((HDC)arg0);
OS_NATIVE_EXIT(env, that, CreateCompatibleDC_FUNC);
return rc;
}
#endif
#ifndef NO_CreateCursor
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateCursor)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jbyteArray arg5, jbyteArray arg6)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateCursor)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jbyteArray arg5, jbyteArray arg6)
{
jbyte *lparg5=NULL;
jbyte *lparg6=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateCursor_FUNC);
if (arg5) if ((lparg5 = (*env)->GetPrimitiveArrayCritical(env, arg5, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetPrimitiveArrayCritical(env, arg6, NULL)) == NULL) goto fail;
- rc = (jintLong)CreateCursor((HINSTANCE)arg0, arg1, arg2, arg3, arg4, (CONST VOID *)lparg5, (CONST VOID *)lparg6);
+ rc = (jlong)CreateCursor((HINSTANCE)arg0, arg1, arg2, arg3, arg4, (CONST VOID *)lparg5, (CONST VOID *)lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleasePrimitiveArrayCritical(env, arg6, lparg6, JNI_ABORT);
if (arg5 && lparg5) (*env)->ReleasePrimitiveArrayCritical(env, arg5, lparg5, JNI_ABORT);
@@ -956,16 +794,16 @@ fail:
#endif
#ifndef NO_CreateDC
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateDC)
- (JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1, jintLong arg2, jintLong arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateDC)
+ (JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1, jlong arg2, jlong arg3)
{
jchar *lparg0=NULL;
jchar *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateDC_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)CreateDC((LPWSTR)lparg0, (LPWSTR)lparg1, (LPWSTR)arg2, (CONST DEVMODEW *)arg3);
+ rc = (jlong)CreateDC((LPWSTR)lparg0, (LPWSTR)lparg1, (LPWSTR)arg2, (CONST DEVMODEW *)arg3);
fail:
if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
@@ -974,117 +812,83 @@ fail:
}
#endif
-#if (!defined(NO_CreateDIBSection__III_3III) && !defined(JNI64)) || (!defined(NO_CreateDIBSection__JJI_3JJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateDIBSection__III_3III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLongArray arg3, jintLong arg4, jint arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateDIBSection__JJI_3JJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLongArray arg3, jintLong arg4, jint arg5)
-#endif
+#ifndef NO_CreateDIBSection__JJI_3JJI
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateDIBSection__JJI_3JJI)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlongArray arg3, jlong arg4, jint arg5)
{
- jintLong *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, CreateDIBSection__III_3III_FUNC);
-#else
+ jlong *lparg3=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateDIBSection__JJI_3JJI_FUNC);
-#endif
if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)CreateDIBSection((HDC)arg0, (BITMAPINFO *)arg1, arg2, (VOID **)lparg3, (HANDLE)arg4, arg5);
+ rc = (jlong)CreateDIBSection((HDC)arg0, (BITMAPINFO *)arg1, arg2, (VOID **)lparg3, (HANDLE)arg4, arg5);
fail:
if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, CreateDIBSection__III_3III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, CreateDIBSection__JJI_3JJI_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_CreateDIBSection__I_3BI_3III) && !defined(JNI64)) || (!defined(NO_CreateDIBSection__J_3BI_3JJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateDIBSection__I_3BI_3III)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2, jintLongArray arg3, jintLong arg4, jint arg5)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateDIBSection__J_3BI_3JJI)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2, jintLongArray arg3, jintLong arg4, jint arg5)
-#endif
+#ifndef NO_CreateDIBSection__J_3BI_3JJI
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateDIBSection__J_3BI_3JJI)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jlongArray arg3, jlong arg4, jint arg5)
{
jbyte *lparg1=NULL;
- jintLong *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, CreateDIBSection__I_3BI_3III_FUNC);
-#else
+ jlong *lparg3=NULL;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateDIBSection__J_3BI_3JJI_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)CreateDIBSection((HDC)arg0, (BITMAPINFO *)lparg1, arg2, (VOID **)lparg3, (HANDLE)arg4, arg5);
+ rc = (jlong)CreateDIBSection((HDC)arg0, (BITMAPINFO *)lparg1, arg2, (VOID **)lparg3, (HANDLE)arg4, arg5);
fail:
if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, 0);
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, CreateDIBSection__I_3BI_3III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, CreateDIBSection__J_3BI_3JJI_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_CreateEnhMetaFile
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateEnhMetaFile)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jobject arg2, jcharArray arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateEnhMetaFile)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jobject arg2, jcharArray arg3)
{
jchar *lparg1=NULL;
RECT _arg2, *lparg2=NULL;
jchar *lparg3=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateEnhMetaFile_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)CreateEnhMetaFile((HDC)arg0, (LPCWSTR)lparg1, lparg2, (LPCWSTR)lparg3);
+ rc = (jlong)CreateEnhMetaFile((HDC)arg0, (LPCWSTR)lparg1, lparg2, (LPCWSTR)lparg3);
fail:
- if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, CreateEnhMetaFile_FUNC);
return rc;
}
#endif
-#if (!defined(NO_CreateFontIndirect__I) && !defined(JNI64)) || (!defined(NO_CreateFontIndirect__J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateFontIndirect__I)(JNIEnv *env, jclass that, jintLong arg0)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateFontIndirect__J)(JNIEnv *env, jclass that, jintLong arg0)
-#endif
+#ifndef NO_CreateFontIndirect__J
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateFontIndirect__J)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, CreateFontIndirect__I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateFontIndirect__J_FUNC);
-#endif
- rc = (jintLong)CreateFontIndirect((LPLOGFONTW)arg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, CreateFontIndirect__I_FUNC);
-#else
+ rc = (jlong)CreateFontIndirect((LPLOGFONTW)arg0);
OS_NATIVE_EXIT(env, that, CreateFontIndirect__J_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_CreateFontIndirect__Lorg_eclipse_swt_internal_win32_LOGFONT_2
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateFontIndirect__Lorg_eclipse_swt_internal_win32_LOGFONT_2)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateFontIndirect__Lorg_eclipse_swt_internal_win32_LOGFONT_2)
(JNIEnv *env, jclass that, jobject arg0)
{
LOGFONT _arg0, *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateFontIndirect__Lorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC);
if (arg0) if ((lparg0 = getLOGFONTFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)CreateFontIndirect(lparg0);
+ rc = (jlong)CreateFontIndirect(lparg0);
fail:
OS_NATIVE_EXIT(env, that, CreateFontIndirect__Lorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC);
return rc;
@@ -1092,14 +896,14 @@ fail:
#endif
#ifndef NO_CreateIconIndirect
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateIconIndirect)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateIconIndirect)
(JNIEnv *env, jclass that, jobject arg0)
{
ICONINFO _arg0, *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateIconIndirect_FUNC);
if (arg0) if ((lparg0 = getICONINFOFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)CreateIconIndirect(lparg0);
+ rc = (jlong)CreateIconIndirect(lparg0);
fail:
OS_NATIVE_EXIT(env, that, CreateIconIndirect_FUNC);
return rc;
@@ -1107,66 +911,50 @@ fail:
#endif
#ifndef NO_CreateMenu
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateMenu)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateMenu)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateMenu_FUNC);
- rc = (jintLong)CreateMenu();
+ rc = (jlong)CreateMenu();
OS_NATIVE_EXIT(env, that, CreateMenu_FUNC);
return rc;
}
#endif
-#ifndef NO_CreatePalette
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreatePalette)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, CreatePalette_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)CreatePalette((LOGPALETTE *)lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, CreatePalette_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_CreatePatternBrush
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreatePatternBrush)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreatePatternBrush)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreatePatternBrush_FUNC);
- rc = (jintLong)CreatePatternBrush((HBITMAP)arg0);
+ rc = (jlong)CreatePatternBrush((HBITMAP)arg0);
OS_NATIVE_EXIT(env, that, CreatePatternBrush_FUNC);
return rc;
}
#endif
#ifndef NO_CreatePen
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreatePen)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreatePen)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreatePen_FUNC);
- rc = (jintLong)CreatePen(arg0, arg1, (COLORREF)arg2);
+ rc = (jlong)CreatePen(arg0, arg1, (COLORREF)arg2);
OS_NATIVE_EXIT(env, that, CreatePen_FUNC);
return rc;
}
#endif
#ifndef NO_CreatePolygonRgn
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreatePolygonRgn)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreatePolygonRgn)
(JNIEnv *env, jclass that, jintArray arg0, jint arg1, jint arg2)
{
jint *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreatePolygonRgn_FUNC);
if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)CreatePolygonRgn((CONST POINT *)lparg0, arg1, arg2);
+ rc = (jlong)CreatePolygonRgn((CONST POINT *)lparg0, arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
OS_NATIVE_EXIT(env, that, CreatePolygonRgn_FUNC);
@@ -1175,12 +963,12 @@ fail:
#endif
#ifndef NO_CreatePopupMenu
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreatePopupMenu)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreatePopupMenu)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreatePopupMenu_FUNC);
- rc = (jintLong)CreatePopupMenu();
+ rc = (jlong)CreatePopupMenu();
OS_NATIVE_EXIT(env, that, CreatePopupMenu_FUNC);
return rc;
}
@@ -1188,42 +976,41 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CreatePopupMenu)
#ifndef NO_CreateProcess
JNIEXPORT jboolean JNICALL OS_NATIVE(CreateProcess)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jboolean arg4, jint arg5, jintLong arg6, jintLong arg7, jobject arg8, jobject arg9)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jboolean arg4, jint arg5, jlong arg6, jlong arg7, jobject arg8, jobject arg9)
{
STARTUPINFO _arg8, *lparg8=NULL;
PROCESS_INFORMATION _arg9, *lparg9=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, CreateProcess_FUNC);
if (arg8) if ((lparg8 = getSTARTUPINFOFields(env, arg8, &_arg8)) == NULL) goto fail;
- if (arg9) if ((lparg9 = getPROCESS_INFORMATIONFields(env, arg9, &_arg9)) == NULL) goto fail;
- rc = (jboolean)CreateProcess((LPCWSTR)arg0, (LPWSTR)arg1, (LPSECURITY_ATTRIBUTES)arg2, (LPSECURITY_ATTRIBUTES)arg3, arg4, arg5, (LPVOID)arg6, (LPWSTR)arg7, (LPSTARTUPINFOW)lparg8, (LPPROCESS_INFORMATION)lparg9);
+ if (arg9) if ((lparg9 = &_arg9) == NULL) goto fail;
+ rc = (jboolean)CreateProcess((LPCWSTR)arg0, (LPWSTR)arg1, (LPSECURITY_ATTRIBUTES)arg2, (LPSECURITY_ATTRIBUTES)arg3, arg4, arg5, (LPVOID)arg6, (LPWSTR)arg7, lparg8, lparg9);
fail:
if (arg9 && lparg9) setPROCESS_INFORMATIONFields(env, arg9, lparg9);
- if (arg8 && lparg8) setSTARTUPINFOFields(env, arg8, lparg8);
OS_NATIVE_EXIT(env, that, CreateProcess_FUNC);
return rc;
}
#endif
#ifndef NO_CreateRectRgn
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateRectRgn)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateRectRgn)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateRectRgn_FUNC);
- rc = (jintLong)CreateRectRgn(arg0, arg1, arg2, arg3);
+ rc = (jlong)CreateRectRgn(arg0, arg1, arg2, arg3);
OS_NATIVE_EXIT(env, that, CreateRectRgn_FUNC);
return rc;
}
#endif
#ifndef NO_CreateSolidBrush
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateSolidBrush)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateSolidBrush)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateSolidBrush_FUNC);
- rc = (jintLong)CreateSolidBrush((COLORREF)arg0);
+ rc = (jlong)CreateSolidBrush((COLORREF)arg0);
OS_NATIVE_EXIT(env, that, CreateSolidBrush_FUNC);
return rc;
}
@@ -1231,37 +1018,37 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CreateSolidBrush)
#ifndef NO_CreateStreamOnHGlobal
JNIEXPORT jint JNICALL OS_NATIVE(CreateStreamOnHGlobal)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1, jintLongArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1, jlongArray arg2)
{
- jintLong *lparg2=NULL;
+ jlong *lparg2=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, CreateStreamOnHGlobal_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)CreateStreamOnHGlobal((HGLOBAL)arg0, (BOOL)arg1, (LPSTREAM *)lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
OS_NATIVE_EXIT(env, that, CreateStreamOnHGlobal_FUNC);
return rc;
}
#endif
#ifndef NO_CreateWindowEx
-JNIEXPORT jintLong JNICALL OS_NATIVE(CreateWindowEx)
- (JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jintLong arg8, jintLong arg9, jintLong arg10, jobject arg11)
+JNIEXPORT jlong JNICALL OS_NATIVE(CreateWindowEx)
+ (JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jlong arg8, jlong arg9, jlong arg10, jobject arg11)
{
jchar *lparg1=NULL;
jchar *lparg2=NULL;
CREATESTRUCT _arg11, *lparg11=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, CreateWindowEx_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg11) if ((lparg11 = getCREATESTRUCTFields(env, arg11, &_arg11)) == NULL) goto fail;
- rc = (jintLong)CreateWindowEx(arg0, (LPWSTR)lparg1, (LPWSTR)lparg2, arg3, arg4, arg5, arg6, arg7, (HWND)arg8, (HMENU)arg9, (HINSTANCE)arg10, lparg11);
+ rc = (jlong)CreateWindowEx(arg0, (LPWSTR)lparg1, (LPWSTR)lparg2, arg3, arg4, arg5, arg6, arg7, (HWND)arg8, (HMENU)arg9, (HINSTANCE)arg10, lparg11);
fail:
if (arg11 && lparg11) setCREATESTRUCTFields(env, arg11, lparg11);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, CreateWindowEx_FUNC);
return rc;
}
@@ -1339,61 +1126,49 @@ JNIEXPORT jint JNICALL OS_NATIVE(DROPFILES_1sizeof)
}
#endif
-#ifndef NO_DTTOPTS_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(DTTOPTS_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, DTTOPTS_1sizeof_FUNC);
- rc = (jint)DTTOPTS_sizeof();
- OS_NATIVE_EXIT(env, that, DTTOPTS_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_DefFrameProc
-JNIEXPORT jintLong JNICALL OS_NATIVE(DefFrameProc)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4)
+JNIEXPORT jlong JNICALL OS_NATIVE(DefFrameProc)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jlong arg4)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, DefFrameProc_FUNC);
- rc = (jintLong)DefFrameProc((HWND)arg0, (HWND)arg1, arg2, (WPARAM)arg3, (LPARAM)arg4);
+ rc = (jlong)DefFrameProc((HWND)arg0, (HWND)arg1, arg2, (WPARAM)arg3, (LPARAM)arg4);
OS_NATIVE_EXIT(env, that, DefFrameProc_FUNC);
return rc;
}
#endif
#ifndef NO_DefMDIChildProc
-JNIEXPORT jintLong JNICALL OS_NATIVE(DefMDIChildProc)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(DefMDIChildProc)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, DefMDIChildProc_FUNC);
- rc = (jintLong)DefMDIChildProc((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
+ rc = (jlong)DefMDIChildProc((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
OS_NATIVE_EXIT(env, that, DefMDIChildProc_FUNC);
return rc;
}
#endif
#ifndef NO_DefWindowProc
-JNIEXPORT jintLong JNICALL OS_NATIVE(DefWindowProc)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(DefWindowProc)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, DefWindowProc_FUNC);
- rc = (jintLong)DefWindowProc((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
+ rc = (jlong)DefWindowProc((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
OS_NATIVE_EXIT(env, that, DefWindowProc_FUNC);
return rc;
}
#endif
#ifndef NO_DeferWindowPos
-JNIEXPORT jintLong JNICALL OS_NATIVE(DeferWindowPos)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7)
+JNIEXPORT jlong JNICALL OS_NATIVE(DeferWindowPos)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, DeferWindowPos_FUNC);
- rc = (jintLong)DeferWindowPos((HDWP)arg0, (HWND)arg1, (HWND)arg2, arg3, arg4, arg5, arg6, arg7);
+ rc = (jlong)DeferWindowPos((HDWP)arg0, (HWND)arg1, (HWND)arg2, arg3, arg4, arg5, arg6, arg7);
OS_NATIVE_EXIT(env, that, DeferWindowPos_FUNC);
return rc;
}
@@ -1401,7 +1176,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(DeferWindowPos)
#ifndef NO_DeleteDC
JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteDC)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DeleteDC_FUNC);
@@ -1413,7 +1188,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteDC)
#ifndef NO_DeleteEnhMetaFile
JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteEnhMetaFile)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DeleteEnhMetaFile_FUNC);
@@ -1425,7 +1200,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteEnhMetaFile)
#ifndef NO_DeleteMenu
JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteMenu)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DeleteMenu_FUNC);
@@ -1437,7 +1212,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteMenu)
#ifndef NO_DeleteObject
JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteObject)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DeleteObject_FUNC);
@@ -1449,7 +1224,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DeleteObject)
#ifndef NO_DestroyAcceleratorTable
JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyAcceleratorTable)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DestroyAcceleratorTable_FUNC);
@@ -1473,7 +1248,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyCaret)
#ifndef NO_DestroyCursor
JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyCursor)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DestroyCursor_FUNC);
@@ -1485,7 +1260,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyCursor)
#ifndef NO_DestroyIcon
JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyIcon)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DestroyIcon_FUNC);
@@ -1497,7 +1272,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyIcon)
#ifndef NO_DestroyMenu
JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyMenu)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DestroyMenu_FUNC);
@@ -1509,7 +1284,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyMenu)
#ifndef NO_DestroyWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyWindow)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DestroyWindow_FUNC);
@@ -1520,14 +1295,14 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DestroyWindow)
#endif
#ifndef NO_DispatchMessage
-JNIEXPORT jintLong JNICALL OS_NATIVE(DispatchMessage)
+JNIEXPORT jlong JNICALL OS_NATIVE(DispatchMessage)
(JNIEnv *env, jclass that, jobject arg0)
{
MSG _arg0, *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, DispatchMessage_FUNC);
if (arg0) if ((lparg0 = getMSGFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)DispatchMessage(lparg0);
+ rc = (jlong)DispatchMessage(lparg0);
fail:
if (arg0 && lparg0) setMSGFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, DispatchMessage_FUNC);
@@ -1537,7 +1312,7 @@ fail:
#ifndef NO_DocumentProperties
JNIEXPORT jint JNICALL OS_NATIVE(DocumentProperties)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2, jintLong arg3, jintLong arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jcharArray arg2, jlong arg3, jlong arg4, jint arg5)
{
jchar *lparg2=NULL;
jint rc = 0;
@@ -1553,7 +1328,7 @@ fail:
#ifndef NO_DragDetect
JNIEXPORT jboolean JNICALL OS_NATIVE(DragDetect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
POINT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -1569,7 +1344,7 @@ fail:
#ifndef NO_DragFinish
JNIEXPORT void JNICALL OS_NATIVE(DragFinish)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
OS_NATIVE_ENTER(env, that, DragFinish_FUNC);
DragFinish((HDROP)arg0);
@@ -1579,7 +1354,7 @@ JNIEXPORT void JNICALL OS_NATIVE(DragFinish)
#ifndef NO_DragQueryFile
JNIEXPORT jint JNICALL OS_NATIVE(DragQueryFile)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jcharArray arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jcharArray arg2, jint arg3)
{
jchar *lparg2=NULL;
jint rc = 0;
@@ -1595,7 +1370,7 @@ fail:
#ifndef NO_DrawEdge
JNIEXPORT jboolean JNICALL OS_NATIVE(DrawEdge)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2, jint arg3)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -1611,7 +1386,7 @@ fail:
#ifndef NO_DrawFocusRect
JNIEXPORT jboolean JNICALL OS_NATIVE(DrawFocusRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -1619,7 +1394,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DrawFocusRect)
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)DrawFocusRect((HDC)arg0, lparg1);
fail:
- if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, DrawFocusRect_FUNC);
return rc;
}
@@ -1627,7 +1401,7 @@ fail:
#ifndef NO_DrawFrameControl
JNIEXPORT jboolean JNICALL OS_NATIVE(DrawFrameControl)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2, jint arg3)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -1635,7 +1409,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DrawFrameControl)
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)DrawFrameControl((HDC)arg0, lparg1, arg2, arg3);
fail:
- if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, DrawFrameControl_FUNC);
return rc;
}
@@ -1643,7 +1416,7 @@ fail:
#ifndef NO_DrawIconEx
JNIEXPORT jboolean JNICALL OS_NATIVE(DrawIconEx)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintLong arg3, jint arg4, jint arg5, jint arg6, jintLong arg7, jint arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jlong arg3, jint arg4, jint arg5, jint arg6, jlong arg7, jint arg8)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DrawIconEx_FUNC);
@@ -1655,7 +1428,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DrawIconEx)
#ifndef NO_DrawMenuBar
JNIEXPORT jboolean JNICALL OS_NATIVE(DrawMenuBar)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DrawMenuBar_FUNC);
@@ -1667,7 +1440,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(DrawMenuBar)
#ifndef NO_DrawText
JNIEXPORT jint JNICALL OS_NATIVE(DrawText)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jobject arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jobject arg3, jint arg4)
{
jchar *lparg1=NULL;
RECT _arg3, *lparg3=NULL;
@@ -1686,7 +1459,7 @@ fail:
#ifndef NO_DrawThemeBackground
JNIEXPORT jint JNICALL OS_NATIVE(DrawThemeBackground)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jobject arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jobject arg4, jobject arg5)
{
RECT _arg4, *lparg4=NULL;
RECT _arg5, *lparg5=NULL;
@@ -1694,10 +1467,8 @@ JNIEXPORT jint JNICALL OS_NATIVE(DrawThemeBackground)
OS_NATIVE_ENTER(env, that, DrawThemeBackground_FUNC);
if (arg4) if ((lparg4 = getRECTFields(env, arg4, &_arg4)) == NULL) goto fail;
if (arg5) if ((lparg5 = getRECTFields(env, arg5, &_arg5)) == NULL) goto fail;
- rc = (jint)DrawThemeBackground((HTHEME)arg0, (HDC)arg1, arg2, arg3, (const RECT *)lparg4, (const RECT *)lparg5);
+ rc = (jint)DrawThemeBackground((HTHEME)arg0, (HDC)arg1, arg2, arg3, lparg4, lparg5);
fail:
- if (arg5 && lparg5) setRECTFields(env, arg5, lparg5);
- if (arg4 && lparg4) setRECTFields(env, arg4, lparg4);
OS_NATIVE_EXIT(env, that, DrawThemeBackground_FUNC);
return rc;
}
@@ -1705,7 +1476,7 @@ fail:
#ifndef NO_DrawThemeText
JNIEXPORT jint JNICALL OS_NATIVE(DrawThemeText)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jcharArray arg4, jint arg5, jint arg6, jint arg7, jobject arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jcharArray arg4, jint arg5, jint arg6, jint arg7, jobject arg8)
{
jchar *lparg4=NULL;
RECT _arg8, *lparg8=NULL;
@@ -1715,8 +1486,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(DrawThemeText)
if (arg8) if ((lparg8 = getRECTFields(env, arg8, &_arg8)) == NULL) goto fail;
rc = (jint)DrawThemeText((HTHEME)arg0, (HDC)arg1, arg2, arg3, lparg4, arg5, arg6, arg7, lparg8);
fail:
- if (arg8 && lparg8) setRECTFields(env, arg8, lparg8);
- if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
+ if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, JNI_ABORT);
OS_NATIVE_EXIT(env, that, DrawThemeText_FUNC);
return rc;
}
@@ -1724,20 +1494,36 @@ fail:
#ifndef NO_DuplicateHandle
JNIEXPORT jboolean JNICALL OS_NATIVE(DuplicateHandle)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLongArray arg3, jint arg4, jboolean arg5, jint arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlongArray arg3, jint arg4, jboolean arg5, jint arg6)
{
- jintLong *lparg3=NULL;
+ jlong *lparg3=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, DuplicateHandle_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
rc = (jboolean)DuplicateHandle((HANDLE)arg0, (HANDLE)arg1, (HANDLE)arg2, (LPHANDLE)lparg3, (DWORD)arg4, arg5, (DWORD)arg6);
fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
OS_NATIVE_EXIT(env, that, DuplicateHandle_FUNC);
return rc;
}
#endif
+#ifndef NO_DwmSetWindowAttribute
+JNIEXPORT jboolean JNICALL OS_NATIVE(DwmSetWindowAttribute)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jint arg3)
+{
+ jint *lparg2=NULL;
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, DwmSetWindowAttribute_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jboolean)DwmSetWindowAttribute((HDC)arg0, arg1, lparg2, arg3);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ OS_NATIVE_EXIT(env, that, DwmSetWindowAttribute_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_EMREXTCREATEFONTINDIRECTW_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(EMREXTCREATEFONTINDIRECTW_1sizeof)
(JNIEnv *env, jclass that)
@@ -1776,7 +1562,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(EXTLOGFONTW_1sizeof)
#ifndef NO_Ellipse
JNIEXPORT jboolean JNICALL OS_NATIVE(Ellipse)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, Ellipse_FUNC);
@@ -1788,7 +1574,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(Ellipse)
#ifndef NO_EnableMenuItem
JNIEXPORT jboolean JNICALL OS_NATIVE(EnableMenuItem)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EnableMenuItem_FUNC);
@@ -1800,7 +1586,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EnableMenuItem)
#ifndef NO_EnableScrollBar
JNIEXPORT jboolean JNICALL OS_NATIVE(EnableScrollBar)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EnableScrollBar_FUNC);
@@ -1812,7 +1598,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EnableScrollBar)
#ifndef NO_EnableWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(EnableWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EnableWindow_FUNC);
@@ -1824,7 +1610,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EnableWindow)
#ifndef NO_EndBufferedPaint
JNIEXPORT jint JNICALL OS_NATIVE(EndBufferedPaint)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, EndBufferedPaint_FUNC);
@@ -1836,7 +1622,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(EndBufferedPaint)
#ifndef NO_EndDeferWindowPos
JNIEXPORT jboolean JNICALL OS_NATIVE(EndDeferWindowPos)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EndDeferWindowPos_FUNC);
@@ -1848,7 +1634,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EndDeferWindowPos)
#ifndef NO_EndDoc
JNIEXPORT jint JNICALL OS_NATIVE(EndDoc)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, EndDoc_FUNC);
@@ -1860,7 +1646,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(EndDoc)
#ifndef NO_EndPage
JNIEXPORT jint JNICALL OS_NATIVE(EndPage)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, EndPage_FUNC);
@@ -1872,7 +1658,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(EndPage)
#ifndef NO_EndPaint
JNIEXPORT jint JNICALL OS_NATIVE(EndPaint)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
PAINTSTRUCT _arg1, *lparg1=NULL;
jint rc = 0;
@@ -1880,7 +1666,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(EndPaint)
if (arg1) if ((lparg1 = getPAINTSTRUCTFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jint)EndPaint((HWND)arg0, lparg1);
fail:
- if (arg1 && lparg1) setPAINTSTRUCTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, EndPaint_FUNC);
return rc;
}
@@ -1888,15 +1673,14 @@ fail:
#ifndef NO_EnumDisplayMonitors
JNIEXPORT jboolean JNICALL OS_NATIVE(EnumDisplayMonitors)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2, jint arg3)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EnumDisplayMonitors_FUNC);
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jboolean)EnumDisplayMonitors((HDC)arg0, (LPCRECT)lparg1, (MONITORENUMPROC)arg2, (LPARAM)arg3);
+ rc = (jboolean)EnumDisplayMonitors((HDC)arg0, lparg1, (MONITORENUMPROC)arg2, (LPARAM)arg3);
fail:
- if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, EnumDisplayMonitors_FUNC);
return rc;
}
@@ -1904,7 +1688,7 @@ fail:
#ifndef NO_EnumEnhMetaFile
JNIEXPORT jboolean JNICALL OS_NATIVE(EnumEnhMetaFile)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jobject arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jobject arg4)
{
RECT _arg4, *lparg4=NULL;
jboolean rc = 0;
@@ -1920,7 +1704,7 @@ fail:
#ifndef NO_EnumFontFamilies
JNIEXPORT jint JNICALL OS_NATIVE(EnumFontFamilies)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jlong arg2, jlong arg3)
{
jchar *lparg1=NULL;
jint rc = 0;
@@ -1928,7 +1712,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(EnumFontFamilies)
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)EnumFontFamilies((HDC)arg0, (LPCWSTR)lparg1, (FONTENUMPROCW)arg2, (LPARAM)arg3);
fail:
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, EnumFontFamilies_FUNC);
return rc;
}
@@ -1936,7 +1720,7 @@ fail:
#ifndef NO_EnumSystemLanguageGroups
JNIEXPORT jboolean JNICALL OS_NATIVE(EnumSystemLanguageGroups)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EnumSystemLanguageGroups_FUNC);
@@ -1948,7 +1732,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EnumSystemLanguageGroups)
#ifndef NO_EnumSystemLocales
JNIEXPORT jboolean JNICALL OS_NATIVE(EnumSystemLocales)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, EnumSystemLocales_FUNC);
@@ -1968,7 +1752,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(EqualRect)
OS_NATIVE_ENTER(env, that, EqualRect_FUNC);
if (arg0) if ((lparg0 = getRECTFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jboolean)EqualRect((CONST RECT *)lparg0, (CONST RECT *)lparg1);
+ rc = (jboolean)EqualRect(lparg0, lparg1);
fail:
OS_NATIVE_EXIT(env, that, EqualRect_FUNC);
return rc;
@@ -1977,7 +1761,7 @@ fail:
#ifndef NO_ExcludeClipRect
JNIEXPORT jint JNICALL OS_NATIVE(ExcludeClipRect)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ExcludeClipRect_FUNC);
@@ -2000,42 +1784,41 @@ JNIEXPORT jint JNICALL OS_NATIVE(ExpandEnvironmentStrings)
rc = (jint)ExpandEnvironmentStrings(lparg0, lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, ExpandEnvironmentStrings_FUNC);
return rc;
}
#endif
#ifndef NO_ExtCreatePen
-JNIEXPORT jintLong JNICALL OS_NATIVE(ExtCreatePen)
+JNIEXPORT jlong JNICALL OS_NATIVE(ExtCreatePen)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jint arg3, jintArray arg4)
{
LOGBRUSH _arg2, *lparg2=NULL;
jint *lparg4=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, ExtCreatePen_FUNC);
if (arg2) if ((lparg2 = getLOGBRUSHFields(env, arg2, &_arg2)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jintLong)ExtCreatePen(arg0, arg1, (CONST LOGBRUSH *)lparg2, arg3, (CONST DWORD *)lparg4);
+ rc = (jlong)ExtCreatePen(arg0, arg1, lparg2, arg3, (CONST DWORD *)lparg4);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg2 && lparg2) setLOGBRUSHFields(env, arg2, lparg2);
OS_NATIVE_EXIT(env, that, ExtCreatePen_FUNC);
return rc;
}
#endif
#ifndef NO_ExtCreateRegion
-JNIEXPORT jintLong JNICALL OS_NATIVE(ExtCreateRegion)
+JNIEXPORT jlong JNICALL OS_NATIVE(ExtCreateRegion)
(JNIEnv *env, jclass that, jfloatArray arg0, jint arg1, jintArray arg2)
{
jfloat *lparg0=NULL;
jint *lparg2=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, ExtCreateRegion_FUNC);
if (arg0) if ((lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)ExtCreateRegion((XFORM *)lparg0, arg1, (CONST RGNDATA *)lparg2);
+ rc = (jlong)ExtCreateRegion((XFORM *)lparg0, arg1, (CONST RGNDATA *)lparg2);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg0 && lparg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
@@ -2046,7 +1829,7 @@ fail:
#ifndef NO_ExtTextOut
JNIEXPORT jboolean JNICALL OS_NATIVE(ExtTextOut)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jobject arg4, jcharArray arg5, jint arg6, jintArray arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jobject arg4, jcharArray arg5, jint arg6, jintArray arg7)
{
RECT _arg4, *lparg4=NULL;
jchar *lparg5=NULL;
@@ -2067,38 +1850,26 @@ fail:
#ifndef NO_ExtractIconEx
JNIEXPORT jint JNICALL OS_NATIVE(ExtractIconEx)
- (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jintLongArray arg2, jintLongArray arg3, jint arg4)
+ (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jlongArray arg2, jlongArray arg3, jint arg4)
{
jchar *lparg0=NULL;
- jintLong *lparg2=NULL;
- jintLong *lparg3=NULL;
+ jlong *lparg2=NULL;
+ jlong *lparg3=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, ExtractIconEx_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
rc = (jint)ExtractIconEx((LPWSTR)lparg0, arg1, (HICON FAR *)lparg2, (HICON FAR *)lparg3, arg4);
fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
OS_NATIVE_EXIT(env, that, ExtractIconEx_FUNC);
return rc;
}
#endif
-#ifndef NO_FILETIME_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(FILETIME_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, FILETIME_1sizeof_FUNC);
- rc = (jint)FILETIME_sizeof();
- OS_NATIVE_EXIT(env, that, FILETIME_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_FLICK_1DATA_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(FLICK_1DATA_1sizeof)
(JNIEnv *env, jclass that)
@@ -2123,28 +1894,9 @@ JNIEXPORT jint JNICALL OS_NATIVE(FLICK_1POINT_1sizeof)
}
#endif
-#ifndef NO_FileTimeToSystemTime
-JNIEXPORT jboolean JNICALL OS_NATIVE(FileTimeToSystemTime)
- (JNIEnv *env, jclass that, jobject arg0, jobject arg1)
-{
- FILETIME _arg0, *lparg0=NULL;
- SYSTEMTIME _arg1, *lparg1=NULL;
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, FileTimeToSystemTime_FUNC);
- if (arg0) if ((lparg0 = getFILETIMEFields(env, arg0, &_arg0)) == NULL) goto fail;
- if (arg1) if ((lparg1 = getSYSTEMTIMEFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jboolean)FileTimeToSystemTime(lparg0, lparg1);
-fail:
- if (arg1 && lparg1) setSYSTEMTIMEFields(env, arg1, lparg1);
- if (arg0 && lparg0) setFILETIMEFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, FileTimeToSystemTime_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_FillRect
JNIEXPORT jint JNICALL OS_NATIVE(FillRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
{
RECT _arg1, *lparg1=NULL;
jint rc = 0;
@@ -2157,22 +1909,6 @@ fail:
}
#endif
-#ifndef NO_FormatMessage
-JNIEXPORT jint JNICALL OS_NATIVE(FormatMessage)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jintLongArray arg4, jint arg5, jintLong arg6)
-{
- jintLong *lparg4=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, FormatMessage_FUNC);
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)FormatMessage(arg0, (LPCVOID)arg1, arg2, arg3, (LPWSTR)lparg4, arg5, (va_list*)arg6);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
- OS_NATIVE_EXIT(env, that, FormatMessage_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GCP_1RESULTS_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(GCP_1RESULTS_1sizeof)
(JNIEnv *env, jclass that)
@@ -2209,42 +1945,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GESTUREINFO_1sizeof)
}
#endif
-#ifndef NO_GET_1WHEEL_1DELTA_1WPARAM
-JNIEXPORT jint JNICALL OS_NATIVE(GET_1WHEEL_1DELTA_1WPARAM)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GET_1WHEEL_1DELTA_1WPARAM_FUNC);
- rc = (jint)GET_WHEEL_DELTA_WPARAM(arg0);
- OS_NATIVE_EXIT(env, that, GET_1WHEEL_1DELTA_1WPARAM_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GET_1X_1LPARAM
-JNIEXPORT jint JNICALL OS_NATIVE(GET_1X_1LPARAM)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GET_1X_1LPARAM_FUNC);
- rc = (jint)GET_X_LPARAM(arg0);
- OS_NATIVE_EXIT(env, that, GET_1X_1LPARAM_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GET_1Y_1LPARAM
-JNIEXPORT jint JNICALL OS_NATIVE(GET_1Y_1LPARAM)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GET_1Y_1LPARAM_FUNC);
- rc = (jint)GET_Y_LPARAM(arg0);
- OS_NATIVE_EXIT(env, that, GET_1Y_1LPARAM_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GID_1ROTATE_1ANGLE_1FROM_1ARGUMENT
JNIEXPORT jdouble JNICALL OS_NATIVE(GID_1ROTATE_1ANGLE_1FROM_1ARGUMENT)
(JNIEnv *env, jclass that, jlong arg0)
@@ -2306,12 +2006,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetACP)
#endif
#ifndef NO_GetActiveWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetActiveWindow)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetActiveWindow)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetActiveWindow_FUNC);
- rc = (jintLong)GetActiveWindow();
+ rc = (jlong)GetActiveWindow();
OS_NATIVE_EXIT(env, that, GetActiveWindow_FUNC);
return rc;
}
@@ -2319,7 +2019,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetActiveWindow)
#ifndef NO_GetBkColor
JNIEXPORT jint JNICALL OS_NATIVE(GetBkColor)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetBkColor_FUNC);
@@ -2330,12 +2030,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetBkColor)
#endif
#ifndef NO_GetCapture
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetCapture)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetCapture)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetCapture_FUNC);
- rc = (jintLong)GetCapture();
+ rc = (jlong)GetCapture();
OS_NATIVE_EXIT(env, that, GetCapture_FUNC);
return rc;
}
@@ -2348,7 +2048,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GetCaretPos)
POINT _arg0, *lparg0=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetCaretPos_FUNC);
- if (arg0) if ((lparg0 = getPOINTFields(env, arg0, &_arg0)) == NULL) goto fail;
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
rc = (jboolean)GetCaretPos(lparg0);
fail:
if (arg0 && lparg0) setPOINTFields(env, arg0, lparg0);
@@ -2359,7 +2059,7 @@ fail:
#ifndef NO_GetCharABCWidths
JNIEXPORT jboolean JNICALL OS_NATIVE(GetCharABCWidths)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
jboolean rc = 0;
@@ -2375,7 +2075,7 @@ fail:
#ifndef NO_GetCharWidth
JNIEXPORT jboolean JNICALL OS_NATIVE(GetCharWidth)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
jboolean rc = 0;
@@ -2391,7 +2091,7 @@ fail:
#ifndef NO_GetCharacterPlacement
JNIEXPORT jint JNICALL OS_NATIVE(GetCharacterPlacement)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jint arg3, jobject arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jint arg3, jobject arg4, jint arg5)
{
jchar *lparg1=NULL;
GCP_RESULTS _arg4, *lparg4=NULL;
@@ -2399,7 +2099,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetCharacterPlacement)
OS_NATIVE_ENTER(env, that, GetCharacterPlacement_FUNC);
if (arg4) if ((lparg4 = getGCP_RESULTSFields(env, arg4, &_arg4)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
- rc = (jint)GetCharacterPlacement((HDC)arg0, (LPWSTR)lparg1, arg2, arg3, (LPGCP_RESULTSW)lparg4, arg5);
+ rc = (jint)GetCharacterPlacement((HDC)arg0, (LPWSTR)lparg1, arg2, arg3, lparg4, arg5);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
if (arg4 && lparg4) setGCP_RESULTSFields(env, arg4, lparg4);
@@ -2410,7 +2110,7 @@ fail:
#ifndef NO_GetClassInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetClassInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jobject arg2)
{
jchar *lparg1=NULL;
WNDCLASS _arg2, *lparg2=NULL;
@@ -2418,10 +2118,10 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GetClassInfo)
OS_NATIVE_ENTER(env, that, GetClassInfo_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = getWNDCLASSFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jboolean)GetClassInfo((HINSTANCE)arg0, (LPWSTR)lparg1, (LPWNDCLASSW)lparg2);
+ rc = (jboolean)GetClassInfo((HINSTANCE)arg0, (LPWSTR)lparg1, lparg2);
fail:
if (arg2 && lparg2) setWNDCLASSFields(env, arg2, lparg2);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, GetClassInfo_FUNC);
return rc;
}
@@ -2429,7 +2129,7 @@ fail:
#ifndef NO_GetClassName
JNIEXPORT jint JNICALL OS_NATIVE(GetClassName)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2)
{
jchar *lparg1=NULL;
jint rc = 0;
@@ -2445,12 +2145,12 @@ fail:
#ifndef NO_GetClientRect
JNIEXPORT jboolean JNICALL OS_NATIVE(GetClientRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetClientRect_FUNC);
- if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
rc = (jboolean)GetClientRect((HWND)arg0, lparg1);
fail:
if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
@@ -2461,12 +2161,12 @@ fail:
#ifndef NO_GetClipBox
JNIEXPORT jint JNICALL OS_NATIVE(GetClipBox)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RECT _arg1, *lparg1=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetClipBox_FUNC);
- if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
rc = (jint)GetClipBox((HDC)arg0, lparg1);
fail:
if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
@@ -2477,7 +2177,7 @@ fail:
#ifndef NO_GetClipRgn
JNIEXPORT jint JNICALL OS_NATIVE(GetClipRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetClipRgn_FUNC);
@@ -2488,12 +2188,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetClipRgn)
#endif
#ifndef NO_GetClipboardData
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetClipboardData)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetClipboardData)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetClipboardData_FUNC);
- rc = (jintLong)GetClipboardData(arg0);
+ rc = (jlong)GetClipboardData(arg0);
OS_NATIVE_EXIT(env, that, GetClipboardData_FUNC);
return rc;
}
@@ -2517,7 +2217,7 @@ fail:
#ifndef NO_GetComboBoxInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetComboBoxInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
COMBOBOXINFO _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -2532,24 +2232,24 @@ fail:
#endif
#ifndef NO_GetCurrentObject
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetCurrentObject)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetCurrentObject)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetCurrentObject_FUNC);
- rc = (jintLong)GetCurrentObject((HDC)arg0, arg1);
+ rc = (jlong)GetCurrentObject((HDC)arg0, arg1);
OS_NATIVE_EXIT(env, that, GetCurrentObject_FUNC);
return rc;
}
#endif
#ifndef NO_GetCurrentProcess
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetCurrentProcess)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetCurrentProcess)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetCurrentProcess_FUNC);
- rc = (jintLong)GetCurrentProcess();
+ rc = (jlong)GetCurrentProcess();
OS_NATIVE_EXIT(env, that, GetCurrentProcess_FUNC);
return rc;
}
@@ -2557,23 +2257,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetCurrentProcess)
#ifndef NO_GetCurrentProcessExplicitAppUserModelID
JNIEXPORT jint JNICALL OS_NATIVE(GetCurrentProcessExplicitAppUserModelID)
- (JNIEnv *env, jclass that, jintLongArray arg0)
+ (JNIEnv *env, jclass that, jlongArray arg0)
{
- jintLong *lparg0=NULL;
+ jlong *lparg0=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetCurrentProcessExplicitAppUserModelID_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
- rc = (jint)GetCurrentProcessExplicitAppUserModelID(lparg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, GetCurrentProcessExplicitAppUserModelID)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jintLong *))fp)(lparg0);
- }
- }
+ if (arg0) if ((lparg0 = (*env)->GetLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ rc = (jint)GetCurrentProcessExplicitAppUserModelID((PWSTR *)lparg0);
fail:
- if (arg0 && lparg0) (*env)->ReleaseIntLongArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseLongArrayElements(env, arg0, lparg0, 0);
OS_NATIVE_EXIT(env, that, GetCurrentProcessExplicitAppUserModelID_FUNC);
return rc;
}
@@ -2604,12 +2296,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetCurrentThreadId)
#endif
#ifndef NO_GetCursor
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetCursor)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetCursor)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetCursor_FUNC);
- rc = (jintLong)GetCursor();
+ rc = (jlong)GetCursor();
OS_NATIVE_EXIT(env, that, GetCursor_FUNC);
return rc;
}
@@ -2632,24 +2324,24 @@ fail:
#endif
#ifndef NO_GetDC
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetDC)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetDC)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetDC_FUNC);
- rc = (jintLong)GetDC((HWND)arg0);
+ rc = (jlong)GetDC((HWND)arg0);
OS_NATIVE_EXIT(env, that, GetDC_FUNC);
return rc;
}
#endif
#ifndef NO_GetDCEx
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetDCEx)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetDCEx)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetDCEx_FUNC);
- rc = (jintLong)GetDCEx((HWND)arg0, (HRGN)arg1, arg2);
+ rc = (jlong)GetDCEx((HWND)arg0, (HRGN)arg1, arg2);
OS_NATIVE_EXIT(env, that, GetDCEx_FUNC);
return rc;
}
@@ -2657,7 +2349,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetDCEx)
#ifndef NO_GetDIBColorTable
JNIEXPORT jint JNICALL OS_NATIVE(GetDIBColorTable)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jbyteArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jbyteArray arg3)
{
jbyte *lparg3=NULL;
jint rc = 0;
@@ -2673,7 +2365,7 @@ fail:
#ifndef NO_GetDIBits
JNIEXPORT jint JNICALL OS_NATIVE(GetDIBits)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jbyteArray arg4, jbyteArray arg5, jint arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jbyteArray arg4, jbyteArray arg5, jint arg6)
{
jbyte *lparg4=NULL;
jbyte *lparg5=NULL;
@@ -2691,12 +2383,12 @@ fail:
#endif
#ifndef NO_GetDesktopWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetDesktopWindow)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetDesktopWindow)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetDesktopWindow_FUNC);
- rc = (jintLong)GetDesktopWindow();
+ rc = (jlong)GetDesktopWindow();
OS_NATIVE_EXIT(env, that, GetDesktopWindow_FUNC);
return rc;
}
@@ -2704,7 +2396,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetDesktopWindow)
#ifndef NO_GetDeviceCaps
JNIEXPORT jint JNICALL OS_NATIVE(GetDeviceCaps)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetDeviceCaps_FUNC);
@@ -2727,12 +2419,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetDialogBaseUnits)
#endif
#ifndef NO_GetDlgItem
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetDlgItem)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetDlgItem)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetDlgItem_FUNC);
- rc = (jintLong)GetDlgItem((HWND)arg0, arg1);
+ rc = (jlong)GetDlgItem((HWND)arg0, arg1);
OS_NATIVE_EXIT(env, that, GetDlgItem_FUNC);
return rc;
}
@@ -2752,7 +2444,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetDoubleClickTime)
#ifndef NO_GetDpiForMonitor
JNIEXPORT jint JNICALL OS_NATIVE(GetDpiForMonitor)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2, jintArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jintArray arg3)
{
jint *lparg2=NULL;
jint *lparg3=NULL;
@@ -2766,7 +2458,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetDpiForMonitor)
{
OS_LOAD_FUNCTION(fp, GetDpiForMonitor)
if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jint, jint *, jint *))fp)(arg0, arg1, lparg2, lparg3);
+ rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jint, jint *, jint *))fp)(arg0, arg1, lparg2, lparg3);
}
}
fail:
@@ -2778,12 +2470,12 @@ fail:
#endif
#ifndef NO_GetFocus
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetFocus)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetFocus)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetFocus_FUNC);
- rc = (jintLong)GetFocus();
+ rc = (jlong)GetFocus();
OS_NATIVE_EXIT(env, that, GetFocus_FUNC);
return rc;
}
@@ -2791,7 +2483,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetFocus)
#ifndef NO_GetFontLanguageInfo
JNIEXPORT jint JNICALL OS_NATIVE(GetFontLanguageInfo)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetFontLanguageInfo_FUNC);
@@ -2802,12 +2494,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetFontLanguageInfo)
#endif
#ifndef NO_GetForegroundWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetForegroundWindow)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetForegroundWindow)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetForegroundWindow_FUNC);
- rc = (jintLong)GetForegroundWindow();
+ rc = (jlong)GetForegroundWindow();
OS_NATIVE_EXIT(env, that, GetForegroundWindow_FUNC);
return rc;
}
@@ -2831,21 +2523,13 @@ fail:
#ifndef NO_GetGestureInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetGestureInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GESTUREINFO _arg1, *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetGestureInfo_FUNC);
if (arg1) if ((lparg1 = getGESTUREINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
-/*
- rc = (jboolean)GetGestureInfo((HGESTUREINFO)arg0, (PGESTUREINFO)lparg1);
-*/
- {
- OS_LOAD_FUNCTION(fp, GetGestureInfo)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(HGESTUREINFO, PGESTUREINFO))fp)((HGESTUREINFO)arg0, (PGESTUREINFO)lparg1);
- }
- }
+ rc = (jboolean)GetGestureInfo((HGESTUREINFO)arg0, lparg1);
fail:
if (arg1 && lparg1) setGESTUREINFOFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, GetGestureInfo_FUNC);
@@ -2855,7 +2539,7 @@ fail:
#ifndef NO_GetGlyphIndices
JNIEXPORT jint JNICALL OS_NATIVE(GetGlyphIndices)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jshortArray arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jshortArray arg3, jint arg4)
{
jchar *lparg1=NULL;
jshort *lparg3=NULL;
@@ -2866,7 +2550,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetGlyphIndices)
rc = (jint)GetGlyphIndices((HDC)arg0, lparg1, arg2, (LPWORD)lparg3, arg4);
fail:
if (arg3 && lparg3) (*env)->ReleaseShortArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, GetGlyphIndices_FUNC);
return rc;
}
@@ -2874,7 +2558,7 @@ fail:
#ifndef NO_GetGraphicsMode
JNIEXPORT jint JNICALL OS_NATIVE(GetGraphicsMode)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetGraphicsMode_FUNC);
@@ -2886,7 +2570,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetGraphicsMode)
#ifndef NO_GetIconInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetIconInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
ICONINFO _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -2913,12 +2597,12 @@ JNIEXPORT jshort JNICALL OS_NATIVE(GetKeyState)
#endif
#ifndef NO_GetKeyboardLayout
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetKeyboardLayout)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetKeyboardLayout)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetKeyboardLayout_FUNC);
- rc = (jintLong)GetKeyboardLayout(arg0);
+ rc = (jlong)GetKeyboardLayout(arg0);
OS_NATIVE_EXIT(env, that, GetKeyboardLayout_FUNC);
return rc;
}
@@ -2926,15 +2610,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetKeyboardLayout)
#ifndef NO_GetKeyboardLayoutList
JNIEXPORT jint JNICALL OS_NATIVE(GetKeyboardLayoutList)
- (JNIEnv *env, jclass that, jint arg0, jintLongArray arg1)
+ (JNIEnv *env, jclass that, jint arg0, jlongArray arg1)
{
- jintLong *lparg1=NULL;
+ jlong *lparg1=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetKeyboardLayoutList_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)GetKeyboardLayoutList(arg0, (HKL FAR *)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, GetKeyboardLayoutList_FUNC);
return rc;
}
@@ -2957,12 +2641,12 @@ fail:
#endif
#ifndef NO_GetLastActivePopup
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetLastActivePopup)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetLastActivePopup)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetLastActivePopup_FUNC);
- rc = (jintLong)GetLastActivePopup((HWND)arg0);
+ rc = (jlong)GetLastActivePopup((HWND)arg0);
OS_NATIVE_EXIT(env, that, GetLastActivePopup_FUNC);
return rc;
}
@@ -2982,7 +2666,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetLastError)
#ifndef NO_GetLayeredWindowAttributes
JNIEXPORT jboolean JNICALL OS_NATIVE(GetLayeredWindowAttributes)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jbyteArray arg2, jintArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jbyteArray arg2, jintArray arg3)
{
jint *lparg1=NULL;
jbyte *lparg2=NULL;
@@ -2992,7 +2676,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GetLayeredWindowAttributes)
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jboolean)GetLayeredWindowAttributes((HWND)arg0, lparg1, lparg2, lparg3);
+ rc = (jboolean)GetLayeredWindowAttributes((HWND)arg0, (COLORREF *)lparg1, (BYTE *)lparg2, (DWORD *)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
@@ -3004,7 +2688,7 @@ fail:
#ifndef NO_GetLayout
JNIEXPORT jint JNICALL OS_NATIVE(GetLayout)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetLayout_FUNC);
@@ -3031,12 +2715,12 @@ fail:
#endif
#ifndef NO_GetMenu
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetMenu)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetMenu)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetMenu_FUNC);
- rc = (jintLong)GetMenu((HWND)arg0);
+ rc = (jlong)GetMenu((HWND)arg0);
OS_NATIVE_EXIT(env, that, GetMenu_FUNC);
return rc;
}
@@ -3044,7 +2728,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetMenu)
#ifndef NO_GetMenuBarInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetMenuBarInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jobject arg3)
{
MENUBARINFO _arg3, *lparg3=NULL;
jboolean rc = 0;
@@ -3060,7 +2744,7 @@ fail:
#ifndef NO_GetMenuDefaultItem
JNIEXPORT jint JNICALL OS_NATIVE(GetMenuDefaultItem)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetMenuDefaultItem_FUNC);
@@ -3072,7 +2756,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetMenuDefaultItem)
#ifndef NO_GetMenuInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetMenuInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
MENUINFO _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -3088,7 +2772,7 @@ fail:
#ifndef NO_GetMenuItemCount
JNIEXPORT jint JNICALL OS_NATIVE(GetMenuItemCount)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetMenuItemCount_FUNC);
@@ -3100,7 +2784,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetMenuItemCount)
#ifndef NO_GetMenuItemInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetMenuItemInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2, jobject arg3)
{
MENUITEMINFO _arg3, *lparg3=NULL;
jboolean rc = 0;
@@ -3116,12 +2800,12 @@ fail:
#ifndef NO_GetMenuItemRect
JNIEXPORT jboolean JNICALL OS_NATIVE(GetMenuItemRect)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jobject arg3)
{
RECT _arg3, *lparg3=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetMenuItemRect_FUNC);
- if (arg3) if ((lparg3 = getRECTFields(env, arg3, &_arg3)) == NULL) goto fail;
+ if (arg3) if ((lparg3 = &_arg3) == NULL) goto fail;
rc = (jboolean)GetMenuItemRect((HWND)arg0, (HMENU)arg1, arg2, lparg3);
fail:
if (arg3 && lparg3) setRECTFields(env, arg3, lparg3);
@@ -3132,12 +2816,12 @@ fail:
#ifndef NO_GetMessage
JNIEXPORT jboolean JNICALL OS_NATIVE(GetMessage)
- (JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2, jint arg3)
{
MSG _arg0, *lparg0=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetMessage_FUNC);
- if (arg0) if ((lparg0 = getMSGFields(env, arg0, &_arg0)) == NULL) goto fail;
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
rc = (jboolean)GetMessage(lparg0, (HWND)arg1, arg2, arg3);
fail:
if (arg0 && lparg0) setMSGFields(env, arg0, lparg0);
@@ -3172,7 +2856,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetMessageTime)
#ifndef NO_GetMetaRgn
JNIEXPORT jint JNICALL OS_NATIVE(GetMetaRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetMetaRgn_FUNC);
@@ -3184,7 +2868,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetMetaRgn)
#ifndef NO_GetModuleFileName
JNIEXPORT jint JNICALL OS_NATIVE(GetModuleFileName)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2)
{
jchar *lparg1=NULL;
jint rc = 0;
@@ -3199,16 +2883,16 @@ fail:
#endif
#ifndef NO_GetModuleHandle
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetModuleHandle)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetModuleHandle)
(JNIEnv *env, jclass that, jcharArray arg0)
{
jchar *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetModuleHandle_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)GetModuleHandle((LPWSTR)lparg0);
+ rc = (jlong)GetModuleHandle((LPWSTR)lparg0);
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, GetModuleHandle_FUNC);
return rc;
}
@@ -3216,13 +2900,13 @@ fail:
#ifndef NO_GetMonitorInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetMonitorInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
MONITORINFO _arg1, *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetMonitorInfo_FUNC);
if (arg1) if ((lparg1 = getMONITORINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jboolean)GetMonitorInfo((HMONITOR)arg0, (LPMONITORINFO)lparg1);
+ rc = (jboolean)GetMonitorInfo((HMONITOR)arg0, lparg1);
fail:
if (arg1 && lparg1) setMONITORINFOFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, GetMonitorInfo_FUNC);
@@ -3230,168 +2914,85 @@ fail:
}
#endif
-#ifndef NO_GetNearestPaletteIndex
-JNIEXPORT jint JNICALL OS_NATIVE(GetNearestPaletteIndex)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GetNearestPaletteIndex_FUNC);
- rc = (jint)GetNearestPaletteIndex((HPALETTE)arg0, (COLORREF)arg1);
- OS_NATIVE_EXIT(env, that, GetNearestPaletteIndex_FUNC);
- return rc;
-}
-#endif
-
-#if (!defined(NO_GetObject__III) && !defined(JNI64)) || (!defined(NO_GetObject__JIJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__III)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JIJ)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
-#endif
+#ifndef NO_GetObject__JIJ
+JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JIJ)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, GetObject__III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, GetObject__JIJ_FUNC);
-#endif
rc = (jint)GetObject((HGDIOBJ)arg0, arg1, (LPVOID)arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, GetObject__III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, GetObject__JIJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_GetObject__IILorg_eclipse_swt_internal_win32_BITMAP_2) && !defined(JNI64)) || (!defined(NO_GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__IILorg_eclipse_swt_internal_win32_BITMAP_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#endif
+#ifndef NO_GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2
+JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
BITMAP _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, GetObject__IILorg_eclipse_swt_internal_win32_BITMAP_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2_FUNC);
-#endif
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
rc = (jint)GetObject((HGDIOBJ)arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) setBITMAPFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, GetObject__IILorg_eclipse_swt_internal_win32_BITMAP_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_GetObject__IILorg_eclipse_swt_internal_win32_DIBSECTION_2) && !defined(JNI64)) || (!defined(NO_GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__IILorg_eclipse_swt_internal_win32_DIBSECTION_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#endif
+#ifndef NO_GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2
+JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
DIBSECTION _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, GetObject__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2_FUNC);
-#endif
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
rc = (jint)GetObject((HGDIOBJ)arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) setDIBSECTIONFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, GetObject__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_GetObject__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2) && !defined(JNI64)) || (!defined(NO_GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#endif
+#ifndef NO_GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2
+JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
LOGBRUSH _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, GetObject__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2_FUNC);
-#endif
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
rc = (jint)GetObject((HGDIOBJ)arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) setLOGBRUSHFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, GetObject__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_GetObject__IILorg_eclipse_swt_internal_win32_LOGFONT_2) && !defined(JNI64)) || (!defined(NO_GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__IILorg_eclipse_swt_internal_win32_LOGFONT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-#endif
+#ifndef NO_GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2
+JNIEXPORT jint JNICALL OS_NATIVE(GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
LOGFONT _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, GetObject__IILorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC);
-#else
OS_NATIVE_ENTER(env, that, GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC);
-#endif
if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
rc = (jint)GetObject((HGDIOBJ)arg0, arg1, lparg2);
fail:
if (arg2 && lparg2) setLOGFONTFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, GetObject__IILorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#ifndef NO_GetOpenFileName
-JNIEXPORT jboolean JNICALL OS_NATIVE(GetOpenFileName)
- (JNIEnv *env, jclass that, jobject arg0)
-{
- OPENFILENAME _arg0, *lparg0=NULL;
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, GetOpenFileName_FUNC);
- if (arg0) if ((lparg0 = getOPENFILENAMEFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jboolean)GetOpenFileName((LPOPENFILENAMEW)lparg0);
-fail:
- if (arg0 && lparg0) setOPENFILENAMEFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, GetOpenFileName_FUNC);
return rc;
}
#endif
#ifndef NO_GetOutlineTextMetrics
JNIEXPORT jint JNICALL OS_NATIVE(GetOutlineTextMetrics)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
OUTLINETEXTMETRIC _arg2, *lparg2=NULL;
jint rc = 0;
@@ -3405,29 +3006,13 @@ fail:
}
#endif
-#ifndef NO_GetPaletteEntries
-JNIEXPORT jint JNICALL OS_NATIVE(GetPaletteEntries)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jbyteArray arg3)
-{
- jbyte *lparg3=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GetPaletteEntries_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)GetPaletteEntries((HPALETTE)arg0, arg1, arg2, (LPPALETTEENTRY)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, 0);
- OS_NATIVE_EXIT(env, that, GetPaletteEntries_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GetParent
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetParent)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetParent)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetParent_FUNC);
- rc = (jintLong)GetParent((HWND)arg0);
+ rc = (jlong)GetParent((HWND)arg0);
OS_NATIVE_EXIT(env, that, GetParent_FUNC);
return rc;
}
@@ -3435,7 +3020,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetParent)
#ifndef NO_GetPixel
JNIEXPORT jint JNICALL OS_NATIVE(GetPixel)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetPixel_FUNC);
@@ -3447,7 +3032,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetPixel)
#ifndef NO_GetPolyFillMode
JNIEXPORT jint JNICALL OS_NATIVE(GetPolyFillMode)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetPolyFillMode_FUNC);
@@ -3458,12 +3043,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetPolyFillMode)
#endif
#ifndef NO_GetProcessHeap
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetProcessHeap)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetProcessHeap)
(JNIEnv *env, jclass that)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetProcessHeap_FUNC);
- rc = (jintLong)GetProcessHeap();
+ rc = (jlong)GetProcessHeap();
OS_NATIVE_EXIT(env, that, GetProcessHeap_FUNC);
return rc;
}
@@ -3486,21 +3071,21 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetProfileString)
rc = (jint)GetProfileString((LPWSTR)lparg0, (LPWSTR)lparg1, (LPWSTR)lparg2, (LPWSTR)lparg3, arg4);
fail:
if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, GetProfileString_FUNC);
return rc;
}
#endif
#ifndef NO_GetProp
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetProp)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetProp)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetProp_FUNC);
- rc = (jintLong)GetProp((HWND)arg0, (LPCWSTR)arg1);
+ rc = (jlong)GetProp((HWND)arg0, (LPCWSTR)arg1);
OS_NATIVE_EXIT(env, that, GetProp_FUNC);
return rc;
}
@@ -3508,7 +3093,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetProp)
#ifndef NO_GetROP2
JNIEXPORT jint JNICALL OS_NATIVE(GetROP2)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetROP2_FUNC);
@@ -3520,7 +3105,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetROP2)
#ifndef NO_GetRandomRgn
JNIEXPORT jint JNICALL OS_NATIVE(GetRandomRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetRandomRgn_FUNC);
@@ -3532,7 +3117,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetRandomRgn)
#ifndef NO_GetRegionData
JNIEXPORT jint JNICALL OS_NATIVE(GetRegionData)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2)
{
jint *lparg2=NULL;
jint rc = 0;
@@ -3548,7 +3133,7 @@ fail:
#ifndef NO_GetRgnBox
JNIEXPORT jint JNICALL OS_NATIVE(GetRgnBox)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RECT _arg1, *lparg1=NULL;
jint rc = 0;
@@ -3562,25 +3147,9 @@ fail:
}
#endif
-#ifndef NO_GetSaveFileName
-JNIEXPORT jboolean JNICALL OS_NATIVE(GetSaveFileName)
- (JNIEnv *env, jclass that, jobject arg0)
-{
- OPENFILENAME _arg0, *lparg0=NULL;
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, GetSaveFileName_FUNC);
- if (arg0) if ((lparg0 = getOPENFILENAMEFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jboolean)GetSaveFileName((LPOPENFILENAMEW)lparg0);
-fail:
- if (arg0 && lparg0) setOPENFILENAMEFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, GetSaveFileName_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GetScrollBarInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetScrollBarInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
SCROLLBARINFO _arg2, *lparg2=NULL;
jboolean rc = 0;
@@ -3596,7 +3165,7 @@ fail:
#ifndef NO_GetScrollInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetScrollInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2)
{
SCROLLINFO _arg2, *lparg2=NULL;
jboolean rc = 0;
@@ -3617,7 +3186,7 @@ JNIEXPORT void JNICALL OS_NATIVE(GetStartupInfo)
STARTUPINFO _arg0, *lparg0=NULL;
OS_NATIVE_ENTER(env, that, GetStartupInfo_FUNC);
if (arg0) if ((lparg0 = getSTARTUPINFOFields(env, arg0, &_arg0)) == NULL) goto fail;
- GetStartupInfo((LPSTARTUPINFOW)lparg0);
+ GetStartupInfo(lparg0);
fail:
if (arg0 && lparg0) setSTARTUPINFOFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, GetStartupInfo_FUNC);
@@ -3625,12 +3194,12 @@ fail:
#endif
#ifndef NO_GetStockObject
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetStockObject)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetStockObject)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetStockObject_FUNC);
- rc = (jintLong)GetStockObject(arg0);
+ rc = (jlong)GetStockObject(arg0);
OS_NATIVE_EXIT(env, that, GetStockObject_FUNC);
return rc;
}
@@ -3649,36 +3218,24 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetSysColor)
#endif
#ifndef NO_GetSysColorBrush
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetSysColorBrush)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetSysColorBrush)
(JNIEnv *env, jclass that, jint arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetSysColorBrush_FUNC);
- rc = (jintLong)GetSysColorBrush(arg0);
+ rc = (jlong)GetSysColorBrush(arg0);
OS_NATIVE_EXIT(env, that, GetSysColorBrush_FUNC);
return rc;
}
#endif
-#ifndef NO_GetSystemDefaultUILanguage
-JNIEXPORT jshort JNICALL OS_NATIVE(GetSystemDefaultUILanguage)
- (JNIEnv *env, jclass that)
-{
- jshort rc = 0;
- OS_NATIVE_ENTER(env, that, GetSystemDefaultUILanguage_FUNC);
- rc = (jshort)GetSystemDefaultUILanguage();
- OS_NATIVE_EXIT(env, that, GetSystemDefaultUILanguage_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GetSystemMenu
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetSystemMenu)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetSystemMenu)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetSystemMenu_FUNC);
- rc = (jintLong)GetSystemMenu((HWND)arg0, arg1);
+ rc = (jlong)GetSystemMenu((HWND)arg0, arg1);
OS_NATIVE_EXIT(env, that, GetSystemMenu_FUNC);
return rc;
}
@@ -3696,25 +3253,9 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetSystemMetrics)
}
#endif
-#ifndef NO_GetSystemPaletteEntries
-JNIEXPORT jint JNICALL OS_NATIVE(GetSystemPaletteEntries)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jbyteArray arg3)
-{
- jbyte *lparg3=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GetSystemPaletteEntries_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)GetSystemPaletteEntries((HDC)arg0, (UINT)arg1, (UINT)arg2, (LPPALETTEENTRY)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, 0);
- OS_NATIVE_EXIT(env, that, GetSystemPaletteEntries_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GetTextColor
JNIEXPORT jint JNICALL OS_NATIVE(GetTextColor)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetTextColor_FUNC);
@@ -3726,7 +3267,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetTextColor)
#ifndef NO_GetTextExtentPoint32
JNIEXPORT jboolean JNICALL OS_NATIVE(GetTextExtentPoint32)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jobject arg3)
{
jchar *lparg1=NULL;
SIZE _arg3, *lparg3=NULL;
@@ -3745,7 +3286,7 @@ fail:
#ifndef NO_GetTextMetrics
JNIEXPORT jboolean JNICALL OS_NATIVE(GetTextMetrics)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
TEXTMETRIC _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -3761,7 +3302,7 @@ fail:
#ifndef NO_GetThemePartSize
JNIEXPORT jint JNICALL OS_NATIVE(GetThemePartSize)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jobject arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jobject arg6)
{
RECT _arg4, *lparg4=NULL;
SIZE _arg6, *lparg6=NULL;
@@ -3779,7 +3320,7 @@ fail:
#ifndef NO_GetThemeTextExtent
JNIEXPORT jint JNICALL OS_NATIVE(GetThemeTextExtent)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jcharArray arg4, jint arg5, jint arg6, jobject arg7, jobject arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jcharArray arg4, jint arg5, jint arg6, jobject arg7, jobject arg8)
{
jchar *lparg4=NULL;
RECT _arg7, *lparg7=NULL;
@@ -3788,12 +3329,11 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetThemeTextExtent)
OS_NATIVE_ENTER(env, that, GetThemeTextExtent_FUNC);
if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg7) if ((lparg7 = getRECTFields(env, arg7, &_arg7)) == NULL) goto fail;
- if (arg8) if ((lparg8 = getRECTFields(env, arg8, &_arg8)) == NULL) goto fail;
+ if (arg8) if ((lparg8 = &_arg8) == NULL) goto fail;
rc = (jint)GetThemeTextExtent((HTHEME)arg0, (HDC)arg1, arg2, arg3, lparg4, arg5, arg6, lparg7, lparg8);
fail:
if (arg8 && lparg8) setRECTFields(env, arg8, lparg8);
- if (arg7 && lparg7) setRECTFields(env, arg7, lparg7);
- if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
+ if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, JNI_ABORT);
OS_NATIVE_EXIT(env, that, GetThemeTextExtent_FUNC);
return rc;
}
@@ -3801,19 +3341,11 @@ fail:
#ifndef NO_GetTouchInputInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(GetTouchInputInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jint arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetTouchInputInfo_FUNC);
-/*
rc = (jboolean)GetTouchInputInfo((HTOUCHINPUT)arg0, (UINT)arg1, (PTOUCHINPUT)arg2, arg3);
-*/
- {
- OS_LOAD_FUNCTION(fp, GetTouchInputInfo)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(HTOUCHINPUT, UINT, PTOUCHINPUT, jint))fp)((HTOUCHINPUT)arg0, (UINT)arg1, (PTOUCHINPUT)arg2, arg3);
- }
- }
OS_NATIVE_EXIT(env, that, GetTouchInputInfo_FUNC);
return rc;
}
@@ -3821,13 +3353,13 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GetTouchInputInfo)
#ifndef NO_GetUpdateRect
JNIEXPORT jboolean JNICALL OS_NATIVE(GetUpdateRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jboolean arg2)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GetUpdateRect_FUNC);
- if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jboolean)GetUpdateRect((HWND)arg0, (LPRECT)lparg1, (BOOL)arg2);
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+ rc = (jboolean)GetUpdateRect((HWND)arg0, lparg1, (BOOL)arg2);
fail:
if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, GetUpdateRect_FUNC);
@@ -3837,7 +3369,7 @@ fail:
#ifndef NO_GetUpdateRgn
JNIEXPORT jint JNICALL OS_NATIVE(GetUpdateRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetUpdateRgn_FUNC);
@@ -3860,24 +3392,24 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetVersion)
#endif
#ifndef NO_GetWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetWindow)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetWindow_FUNC);
- rc = (jintLong)GetWindow((HWND)arg0, arg1);
+ rc = (jlong)GetWindow((HWND)arg0, arg1);
OS_NATIVE_EXIT(env, that, GetWindow_FUNC);
return rc;
}
#endif
#ifndef NO_GetWindowDC
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetWindowDC)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetWindowDC)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetWindowDC_FUNC);
- rc = (jintLong)GetWindowDC((HWND)arg0);
+ rc = (jlong)GetWindowDC((HWND)arg0);
OS_NATIVE_EXIT(env, that, GetWindowDC_FUNC);
return rc;
}
@@ -3885,7 +3417,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetWindowDC)
#ifndef NO_GetWindowLong
JNIEXPORT jint JNICALL OS_NATIVE(GetWindowLong)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetWindowLong_FUNC);
@@ -3896,12 +3428,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetWindowLong)
#endif
#ifndef NO_GetWindowLongPtr
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetWindowLongPtr)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetWindowLongPtr)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetWindowLongPtr_FUNC);
- rc = (jintLong)GetWindowLongPtr((HWND)arg0, arg1);
+ rc = (jlong)GetWindowLongPtr((HWND)arg0, arg1);
OS_NATIVE_EXIT(env, that, GetWindowLongPtr_FUNC);
return rc;
}
@@ -3909,7 +3441,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetWindowLongPtr)
#ifndef NO_GetWindowOrgEx
JNIEXPORT jboolean JNICALL OS_NATIVE(GetWindowOrgEx)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
POINT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -3925,7 +3457,7 @@ fail:
#ifndef NO_GetWindowPlacement
JNIEXPORT jboolean JNICALL OS_NATIVE(GetWindowPlacement)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
WINDOWPLACEMENT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -3941,7 +3473,7 @@ fail:
#ifndef NO_GetWindowRect
JNIEXPORT jboolean JNICALL OS_NATIVE(GetWindowRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -3957,7 +3489,7 @@ fail:
#ifndef NO_GetWindowRgn
JNIEXPORT jint JNICALL OS_NATIVE(GetWindowRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetWindowRgn_FUNC);
@@ -3969,7 +3501,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetWindowRgn)
#ifndef NO_GetWindowText
JNIEXPORT jint JNICALL OS_NATIVE(GetWindowText)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2)
{
jchar *lparg1=NULL;
jint rc = 0;
@@ -3985,7 +3517,7 @@ fail:
#ifndef NO_GetWindowTextLength
JNIEXPORT jint JNICALL OS_NATIVE(GetWindowTextLength)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GetWindowTextLength_FUNC);
@@ -3997,7 +3529,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetWindowTextLength)
#ifndef NO_GetWindowThreadProcessId
JNIEXPORT jint JNICALL OS_NATIVE(GetWindowThreadProcessId)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1)
{
jint *lparg1=NULL;
jint rc = 0;
@@ -4021,43 +3553,43 @@ JNIEXPORT jint JNICALL OS_NATIVE(GlobalAddAtom)
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
rc = (jint)GlobalAddAtom((LPCWSTR)lparg0);
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, GlobalAddAtom_FUNC);
return rc;
}
#endif
#ifndef NO_GlobalAlloc
-JNIEXPORT jintLong JNICALL OS_NATIVE(GlobalAlloc)
+JNIEXPORT jlong JNICALL OS_NATIVE(GlobalAlloc)
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GlobalAlloc_FUNC);
- rc = (jintLong)GlobalAlloc(arg0, arg1);
+ rc = (jlong)GlobalAlloc(arg0, arg1);
OS_NATIVE_EXIT(env, that, GlobalAlloc_FUNC);
return rc;
}
#endif
#ifndef NO_GlobalFree
-JNIEXPORT jintLong JNICALL OS_NATIVE(GlobalFree)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(GlobalFree)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GlobalFree_FUNC);
- rc = (jintLong)GlobalFree((HANDLE)arg0);
+ rc = (jlong)GlobalFree((HANDLE)arg0);
OS_NATIVE_EXIT(env, that, GlobalFree_FUNC);
return rc;
}
#endif
#ifndef NO_GlobalLock
-JNIEXPORT jintLong JNICALL OS_NATIVE(GlobalLock)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(GlobalLock)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, GlobalLock_FUNC);
- rc = (jintLong)GlobalLock((HANDLE)arg0);
+ rc = (jlong)GlobalLock((HANDLE)arg0);
OS_NATIVE_EXIT(env, that, GlobalLock_FUNC);
return rc;
}
@@ -4065,7 +3597,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GlobalLock)
#ifndef NO_GlobalSize
JNIEXPORT jint JNICALL OS_NATIVE(GlobalSize)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, GlobalSize_FUNC);
@@ -4077,7 +3609,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(GlobalSize)
#ifndef NO_GlobalUnlock
JNIEXPORT jboolean JNICALL OS_NATIVE(GlobalUnlock)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GlobalUnlock_FUNC);
@@ -4089,7 +3621,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GlobalUnlock)
#ifndef NO_GradientFill
JNIEXPORT jboolean JNICALL OS_NATIVE(GradientFill)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3, jint arg4, jint arg5)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, GradientFill_FUNC);
@@ -4159,25 +3691,13 @@ JNIEXPORT jint JNICALL OS_NATIVE(HIGHCONTRAST_1sizeof)
}
#endif
-#ifndef NO_HIWORD
-JNIEXPORT jint JNICALL OS_NATIVE(HIWORD)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, HIWORD_FUNC);
- rc = (jint)HIWORD(arg0);
- OS_NATIVE_EXIT(env, that, HIWORD_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_HeapAlloc
-JNIEXPORT jintLong JNICALL OS_NATIVE(HeapAlloc)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(HeapAlloc)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, HeapAlloc_FUNC);
- rc = (jintLong)HeapAlloc((HANDLE)arg0, arg1, arg2);
+ rc = (jlong)HeapAlloc((HANDLE)arg0, arg1, arg2);
OS_NATIVE_EXIT(env, that, HeapAlloc_FUNC);
return rc;
}
@@ -4185,7 +3705,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(HeapAlloc)
#ifndef NO_HeapFree
JNIEXPORT jboolean JNICALL OS_NATIVE(HeapFree)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, HeapFree_FUNC);
@@ -4197,7 +3717,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(HeapFree)
#ifndef NO_HideCaret
JNIEXPORT jboolean JNICALL OS_NATIVE(HideCaret)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, HideCaret_FUNC);
@@ -4232,12 +3752,24 @@ JNIEXPORT jint JNICALL OS_NATIVE(IIDFromString)
rc = (jint)IIDFromString((LPOLESTR)lparg0, (LPIID)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, IIDFromString_FUNC);
return rc;
}
#endif
+#ifndef NO_ILGetSize
+JNIEXPORT jint JNICALL OS_NATIVE(ILGetSize)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, ILGetSize_FUNC);
+ rc = (jint)ILGetSize((PCIDLIST_ABSOLUTE)arg0);
+ OS_NATIVE_EXIT(env, that, ILGetSize_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_INITCOMMONCONTROLSEX_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(INITCOMMONCONTROLSEX_1sizeof)
(JNIEnv *env, jclass that)
@@ -4264,7 +3796,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(INPUT_1sizeof)
#ifndef NO_ImageList_1Add
JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1Add)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1Add_FUNC);
@@ -4276,7 +3808,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1Add)
#ifndef NO_ImageList_1AddMasked
JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1AddMasked)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1AddMasked_FUNC);
@@ -4288,7 +3820,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1AddMasked)
#ifndef NO_ImageList_1BeginDrag
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1BeginDrag)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1BeginDrag_FUNC);
@@ -4299,12 +3831,12 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1BeginDrag)
#endif
#ifndef NO_ImageList_1Create
-JNIEXPORT jintLong JNICALL OS_NATIVE(ImageList_1Create)
+JNIEXPORT jlong JNICALL OS_NATIVE(ImageList_1Create)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1Create_FUNC);
- rc = (jintLong)ImageList_Create(arg0, arg1, arg2, arg3, arg4);
+ rc = (jlong)ImageList_Create(arg0, arg1, arg2, arg3, arg4);
OS_NATIVE_EXIT(env, that, ImageList_1Create_FUNC);
return rc;
}
@@ -4312,7 +3844,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(ImageList_1Create)
#ifndef NO_ImageList_1Destroy
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1Destroy)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1Destroy_FUNC);
@@ -4324,7 +3856,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1Destroy)
#ifndef NO_ImageList_1DragEnter
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1DragEnter)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1DragEnter_FUNC);
@@ -4336,7 +3868,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1DragEnter)
#ifndef NO_ImageList_1DragLeave
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1DragLeave)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1DragLeave_FUNC);
@@ -4382,7 +3914,7 @@ JNIEXPORT void JNICALL OS_NATIVE(ImageList_1EndDrag)
#ifndef NO_ImageList_1GetIconSize
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1GetIconSize)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
@@ -4401,7 +3933,7 @@ fail:
#ifndef NO_ImageList_1GetImageCount
JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1GetImageCount)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1GetImageCount_FUNC);
@@ -4413,7 +3945,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1GetImageCount)
#ifndef NO_ImageList_1Remove
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1Remove)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1Remove_FUNC);
@@ -4425,7 +3957,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1Remove)
#ifndef NO_ImageList_1Replace
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1Replace)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1Replace_FUNC);
@@ -4437,7 +3969,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1Replace)
#ifndef NO_ImageList_1ReplaceIcon
JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1ReplaceIcon)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1ReplaceIcon_FUNC);
@@ -4449,7 +3981,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ImageList_1ReplaceIcon)
#ifndef NO_ImageList_1SetIconSize
JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1SetIconSize)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImageList_1SetIconSize_FUNC);
@@ -4459,51 +3991,15 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImageList_1SetIconSize)
}
#endif
-#ifndef NO_ImmAssociateContext
-JNIEXPORT jintLong JNICALL OS_NATIVE(ImmAssociateContext)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, ImmAssociateContext_FUNC);
- rc = (jintLong)ImmAssociateContext((HWND)arg0, (HIMC)arg1);
- OS_NATIVE_EXIT(env, that, ImmAssociateContext_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_ImmCreateContext
-JNIEXPORT jintLong JNICALL OS_NATIVE(ImmCreateContext)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, ImmCreateContext_FUNC);
- rc = (jintLong)ImmCreateContext();
- OS_NATIVE_EXIT(env, that, ImmCreateContext_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_ImmDestroyContext
-JNIEXPORT jboolean JNICALL OS_NATIVE(ImmDestroyContext)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, ImmDestroyContext_FUNC);
- rc = (jboolean)ImmDestroyContext((HIMC)arg0);
- OS_NATIVE_EXIT(env, that, ImmDestroyContext_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_ImmEscape
-JNIEXPORT jintLong JNICALL OS_NATIVE(ImmEscape)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jcharArray arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(ImmEscape)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jcharArray arg3)
{
jchar *lparg3=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, ImmEscape_FUNC);
if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)ImmEscape((HKL)arg0, (HIMC)arg1, arg2, (LPVOID)lparg3);
+ rc = (jlong)ImmEscape((HKL)arg0, (HIMC)arg1, arg2, (LPVOID)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
OS_NATIVE_EXIT(env, that, ImmEscape_FUNC);
@@ -4513,12 +4009,12 @@ fail:
#ifndef NO_ImmGetCompositionFont
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmGetCompositionFont)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
LOGFONT _arg1, *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImmGetCompositionFont_FUNC);
- if (arg1) if ((lparg1 = getLOGFONTFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
rc = (jboolean)ImmGetCompositionFont((HIMC)arg0, lparg1);
fail:
if (arg1 && lparg1) setLOGFONTFields(env, arg1, lparg1);
@@ -4527,94 +4023,61 @@ fail:
}
#endif
-#if (!defined(NO_ImmGetCompositionString__II_3BI) && !defined(JNI64)) || (!defined(NO_ImmGetCompositionString__JI_3BI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__II_3BI)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jbyteArray arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__JI_3BI)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jbyteArray arg2, jint arg3)
-#endif
+#ifndef NO_ImmGetCompositionString__JI_3BI
+JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__JI_3BI)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jbyteArray arg2, jint arg3)
{
jbyte *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, ImmGetCompositionString__II_3BI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, ImmGetCompositionString__JI_3BI_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)ImmGetCompositionString((HIMC)arg0, arg1, (LPWSTR)lparg2, arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, ImmGetCompositionString__II_3BI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, ImmGetCompositionString__JI_3BI_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_ImmGetCompositionString__II_3CI) && !defined(JNI64)) || (!defined(NO_ImmGetCompositionString__JI_3CI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__II_3CI)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jcharArray arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__JI_3CI)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jcharArray arg2, jint arg3)
-#endif
+#ifndef NO_ImmGetCompositionString__JI_3CI
+JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__JI_3CI)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jcharArray arg2, jint arg3)
{
jchar *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, ImmGetCompositionString__II_3CI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, ImmGetCompositionString__JI_3CI_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)ImmGetCompositionString((HIMC)arg0, arg1, (LPWSTR)lparg2, arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, ImmGetCompositionString__II_3CI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, ImmGetCompositionString__JI_3CI_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_ImmGetCompositionString__II_3II) && !defined(JNI64)) || (!defined(NO_ImmGetCompositionString__JI_3II) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__II_3II)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__JI_3II)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2, jint arg3)
-#endif
+#ifndef NO_ImmGetCompositionString__JI_3II
+JNIEXPORT jint JNICALL OS_NATIVE(ImmGetCompositionString__JI_3II)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jint arg3)
{
jint *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, ImmGetCompositionString__II_3II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, ImmGetCompositionString__JI_3II_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)ImmGetCompositionString((HIMC)arg0, arg1, (LPWSTR)lparg2, arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, ImmGetCompositionString__II_3II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, ImmGetCompositionString__JI_3II_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_ImmGetContext
-JNIEXPORT jintLong JNICALL OS_NATIVE(ImmGetContext)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(ImmGetContext)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, ImmGetContext_FUNC);
- rc = (jintLong)ImmGetContext((HWND)arg0);
+ rc = (jlong)ImmGetContext((HWND)arg0);
OS_NATIVE_EXIT(env, that, ImmGetContext_FUNC);
return rc;
}
@@ -4622,7 +4085,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(ImmGetContext)
#ifndef NO_ImmGetConversionStatus
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmGetConversionStatus)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jintArray arg2)
{
jint *lparg1=NULL;
jint *lparg2=NULL;
@@ -4640,12 +4103,12 @@ fail:
#endif
#ifndef NO_ImmGetDefaultIMEWnd
-JNIEXPORT jintLong JNICALL OS_NATIVE(ImmGetDefaultIMEWnd)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(ImmGetDefaultIMEWnd)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, ImmGetDefaultIMEWnd_FUNC);
- rc = (jintLong)ImmGetDefaultIMEWnd((HWND)arg0);
+ rc = (jlong)ImmGetDefaultIMEWnd((HWND)arg0);
OS_NATIVE_EXIT(env, that, ImmGetDefaultIMEWnd_FUNC);
return rc;
}
@@ -4653,7 +4116,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(ImmGetDefaultIMEWnd)
#ifndef NO_ImmGetOpenStatus
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmGetOpenStatus)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImmGetOpenStatus_FUNC);
@@ -4665,7 +4128,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmGetOpenStatus)
#ifndef NO_ImmNotifyIME
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmNotifyIME)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImmNotifyIME_FUNC);
@@ -4677,7 +4140,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmNotifyIME)
#ifndef NO_ImmReleaseContext
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmReleaseContext)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImmReleaseContext_FUNC);
@@ -4689,7 +4152,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmReleaseContext)
#ifndef NO_ImmSetCandidateWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetCandidateWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
CANDIDATEFORM _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -4697,7 +4160,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetCandidateWindow)
if (arg1) if ((lparg1 = getCANDIDATEFORMFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)ImmSetCandidateWindow((HIMC)arg0, lparg1);
fail:
- if (arg1 && lparg1) setCANDIDATEFORMFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, ImmSetCandidateWindow_FUNC);
return rc;
}
@@ -4705,7 +4167,7 @@ fail:
#ifndef NO_ImmSetCompositionFont
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetCompositionFont)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
LOGFONT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -4713,7 +4175,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetCompositionFont)
if (arg1) if ((lparg1 = getLOGFONTFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)ImmSetCompositionFont((HIMC)arg0, lparg1);
fail:
- if (arg1 && lparg1) setLOGFONTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, ImmSetCompositionFont_FUNC);
return rc;
}
@@ -4721,7 +4182,7 @@ fail:
#ifndef NO_ImmSetCompositionWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetCompositionWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
COMPOSITIONFORM _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -4729,7 +4190,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetCompositionWindow)
if (arg1) if ((lparg1 = getCOMPOSITIONFORMFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)ImmSetCompositionWindow((HIMC)arg0, lparg1);
fail:
- if (arg1 && lparg1) setCOMPOSITIONFORMFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, ImmSetCompositionWindow_FUNC);
return rc;
}
@@ -4737,7 +4197,7 @@ fail:
#ifndef NO_ImmSetConversionStatus
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetConversionStatus)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImmSetConversionStatus_FUNC);
@@ -4749,7 +4209,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetConversionStatus)
#ifndef NO_ImmSetOpenStatus
JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetOpenStatus)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ImmSetOpenStatus_FUNC);
@@ -4759,16 +4219,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ImmSetOpenStatus)
}
#endif
-#ifndef NO_InitCommonControls
-JNIEXPORT void JNICALL OS_NATIVE(InitCommonControls)
- (JNIEnv *env, jclass that)
-{
- OS_NATIVE_ENTER(env, that, InitCommonControls_FUNC);
- InitCommonControls();
- OS_NATIVE_EXIT(env, that, InitCommonControls_FUNC);
-}
-#endif
-
#ifndef NO_InitCommonControlsEx
JNIEXPORT jboolean JNICALL OS_NATIVE(InitCommonControlsEx)
(JNIEnv *env, jclass that, jobject arg0)
@@ -4779,7 +4229,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(InitCommonControlsEx)
if (arg0) if ((lparg0 = getINITCOMMONCONTROLSEXFields(env, arg0, &_arg0)) == NULL) goto fail;
rc = (jboolean)InitCommonControlsEx(lparg0);
fail:
- if (arg0 && lparg0) setINITCOMMONCONTROLSEXFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, InitCommonControlsEx_FUNC);
return rc;
}
@@ -4787,15 +4236,14 @@ fail:
#ifndef NO_InsertMenuItem
JNIEXPORT jboolean JNICALL OS_NATIVE(InsertMenuItem)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2, jobject arg3)
{
MENUITEMINFO _arg3, *lparg3=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, InsertMenuItem_FUNC);
if (arg3) if ((lparg3 = getMENUITEMINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jboolean)InsertMenuItem((HMENU)arg0, arg1, arg2, (LPMENUITEMINFOW)lparg3);
+ rc = (jboolean)InsertMenuItem((HMENU)arg0, arg1, arg2, lparg3);
fail:
- if (arg3 && lparg3) setMENUITEMINFOFields(env, arg3, lparg3);
OS_NATIVE_EXIT(env, that, InsertMenuItem_FUNC);
return rc;
}
@@ -4819,8 +4267,8 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(InternetGetCookie)
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, InternetGetCookie_FUNC);
return rc;
}
@@ -4840,9 +4288,9 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(InternetSetCookie)
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jboolean)InternetSetCookie((LPCWSTR)lparg0, (LPCWSTR)lparg1, (LPCWSTR)lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, InternetSetCookie_FUNC);
return rc;
}
@@ -4850,7 +4298,7 @@ fail:
#ifndef NO_InternetSetOption
JNIEXPORT jboolean JNICALL OS_NATIVE(InternetSetOption)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jint arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, InternetSetOption_FUNC);
@@ -4862,7 +4310,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(InternetSetOption)
#ifndef NO_IntersectClipRect
JNIEXPORT jint JNICALL OS_NATIVE(IntersectClipRect)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, IntersectClipRect_FUNC);
@@ -4894,7 +4342,7 @@ fail:
#ifndef NO_InvalidateRect
JNIEXPORT jboolean JNICALL OS_NATIVE(InvalidateRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jboolean arg2)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -4910,7 +4358,7 @@ fail:
#ifndef NO_InvalidateRgn
JNIEXPORT jboolean JNICALL OS_NATIVE(InvalidateRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, InvalidateRgn_FUNC);
@@ -4934,7 +4382,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(IsAppThemed)
#ifndef NO_IsHungAppWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(IsHungAppWindow)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, IsHungAppWindow_FUNC);
@@ -4946,7 +4394,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(IsHungAppWindow)
#ifndef NO_IsIconic
JNIEXPORT jboolean JNICALL OS_NATIVE(IsIconic)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, IsIconic_FUNC);
@@ -4958,21 +4406,13 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(IsIconic)
#ifndef NO_IsTouchWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(IsTouchWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jlongArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1)
{
jlong *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, IsTouchWindow_FUNC);
if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
rc = (jboolean)IsTouchWindow((HWND)arg0, (PULONG)lparg1);
-*/
- {
- OS_LOAD_FUNCTION(fp, IsTouchWindow)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(HWND, PULONG))fp)((HWND)arg0, (PULONG)lparg1);
- }
- }
fail:
if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
OS_NATIVE_EXIT(env, that, IsTouchWindow_FUNC);
@@ -4982,7 +4422,7 @@ fail:
#ifndef NO_IsWindowEnabled
JNIEXPORT jboolean JNICALL OS_NATIVE(IsWindowEnabled)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, IsWindowEnabled_FUNC);
@@ -4994,7 +4434,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(IsWindowEnabled)
#ifndef NO_IsWindowVisible
JNIEXPORT jboolean JNICALL OS_NATIVE(IsWindowVisible)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, IsWindowVisible_FUNC);
@@ -5006,7 +4446,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(IsWindowVisible)
#ifndef NO_IsZoomed
JNIEXPORT jboolean JNICALL OS_NATIVE(IsZoomed)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, IsZoomed_FUNC);
@@ -5030,7 +4470,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(KEYBDINPUT_1sizeof)
#ifndef NO_KillTimer
JNIEXPORT jboolean JNICALL OS_NATIVE(KillTimer)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, KillTimer_FUNC);
@@ -5052,18 +4492,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(LITEM_1sizeof)
}
#endif
-#ifndef NO_LODWORD
-JNIEXPORT jint JNICALL OS_NATIVE(LODWORD)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, LODWORD_FUNC);
- rc = (jint)LODWORD(arg0);
- OS_NATIVE_EXIT(env, that, LODWORD_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_LOGBRUSH_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(LOGBRUSH_1sizeof)
(JNIEnv *env, jclass that)
@@ -5100,21 +4528,9 @@ JNIEXPORT jint JNICALL OS_NATIVE(LOGPEN_1sizeof)
}
#endif
-#ifndef NO_LOWORD
-JNIEXPORT jint JNICALL OS_NATIVE(LOWORD)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, LOWORD_FUNC);
- rc = (jint)LOWORD(arg0);
- OS_NATIVE_EXIT(env, that, LOWORD_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_LPtoDP
JNIEXPORT jboolean JNICALL OS_NATIVE(LPtoDP)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
POINT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -5178,7 +4594,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(LVITEM_1sizeof)
#ifndef NO_LineTo
JNIEXPORT jboolean JNICALL OS_NATIVE(LineTo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, LineTo_FUNC);
@@ -5189,113 +4605,81 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(LineTo)
#endif
#ifndef NO_LoadBitmap
-JNIEXPORT jintLong JNICALL OS_NATIVE(LoadBitmap)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(LoadBitmap)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, LoadBitmap_FUNC);
- rc = (jintLong)LoadBitmap((HINSTANCE)arg0, (LPWSTR)arg1);
+ rc = (jlong)LoadBitmap((HINSTANCE)arg0, (LPWSTR)arg1);
OS_NATIVE_EXIT(env, that, LoadBitmap_FUNC);
return rc;
}
#endif
#ifndef NO_LoadCursor
-JNIEXPORT jintLong JNICALL OS_NATIVE(LoadCursor)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(LoadCursor)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, LoadCursor_FUNC);
- rc = (jintLong)LoadCursor((HINSTANCE)arg0, (LPWSTR)arg1);
+ rc = (jlong)LoadCursor((HINSTANCE)arg0, (LPWSTR)arg1);
OS_NATIVE_EXIT(env, that, LoadCursor_FUNC);
return rc;
}
#endif
#ifndef NO_LoadIcon
-JNIEXPORT jintLong JNICALL OS_NATIVE(LoadIcon)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(LoadIcon)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, LoadIcon_FUNC);
- rc = (jintLong)LoadIcon((HINSTANCE)arg0, (LPWSTR)arg1);
+ rc = (jlong)LoadIcon((HINSTANCE)arg0, (LPWSTR)arg1);
OS_NATIVE_EXIT(env, that, LoadIcon_FUNC);
return rc;
}
#endif
+#ifndef NO_LoadIconMetric
+JNIEXPORT jint JNICALL OS_NATIVE(LoadIconMetric)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlongArray arg3)
+{
+ jlong *lparg3=NULL;
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, LoadIconMetric_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+ rc = (jint)LoadIconMetric((HINSTANCE)arg0, (PCWSTR)arg1, arg2, (HICON *)lparg3);
+fail:
+ if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+ OS_NATIVE_EXIT(env, that, LoadIconMetric_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_LoadImage
-JNIEXPORT jintLong JNICALL OS_NATIVE(LoadImage)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+JNIEXPORT jlong JNICALL OS_NATIVE(LoadImage)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, LoadImage_FUNC);
- rc = (jintLong)LoadImage((HINSTANCE)arg0, (LPWSTR)arg1, arg2, arg3, arg4, arg5);
+ rc = (jlong)LoadImage((HINSTANCE)arg0, (LPWSTR)arg1, arg2, arg3, arg4, arg5);
OS_NATIVE_EXIT(env, that, LoadImage_FUNC);
return rc;
}
#endif
#ifndef NO_LocalFree
-JNIEXPORT jintLong JNICALL OS_NATIVE(LocalFree)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(LocalFree)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, LocalFree_FUNC);
- rc = (jintLong)LocalFree((HLOCAL)arg0);
+ rc = (jlong)LocalFree((HLOCAL)arg0);
OS_NATIVE_EXIT(env, that, LocalFree_FUNC);
return rc;
}
#endif
-#ifndef NO_MAKELPARAM
-JNIEXPORT jintLong JNICALL OS_NATIVE(MAKELPARAM)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, MAKELPARAM_FUNC);
- rc = (jintLong)MAKELPARAM(arg0, arg1);
- OS_NATIVE_EXIT(env, that, MAKELPARAM_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_MAKELRESULT
-JNIEXPORT jintLong JNICALL OS_NATIVE(MAKELRESULT)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, MAKELRESULT_FUNC);
- rc = (jintLong)MAKELRESULT(arg0, arg1);
- OS_NATIVE_EXIT(env, that, MAKELRESULT_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_MAKEWORD
-JNIEXPORT jint JNICALL OS_NATIVE(MAKEWORD)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, MAKEWORD_FUNC);
- rc = (jint)MAKEWORD(arg0, arg1);
- OS_NATIVE_EXIT(env, that, MAKEWORD_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_MAKEWPARAM
-JNIEXPORT jintLong JNICALL OS_NATIVE(MAKEWPARAM)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, MAKEWPARAM_FUNC);
- rc = (jintLong)MAKEWPARAM(arg0, arg1);
- OS_NATIVE_EXIT(env, that, MAKEWPARAM_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_MARGINS_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(MARGINS_1sizeof)
(JNIEnv *env, jclass that)
@@ -5417,12 +4801,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(MSG_1sizeof)
#endif
#ifndef NO_MapViewOfFile
-JNIEXPORT jintLong JNICALL OS_NATIVE(MapViewOfFile)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+JNIEXPORT jlong JNICALL OS_NATIVE(MapViewOfFile)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, MapViewOfFile_FUNC);
- rc = (jintLong)MapViewOfFile((HANDLE)arg0, (DWORD)arg1, (DWORD)arg2, (DWORD)arg3, arg4);
+ rc = (jlong)MapViewOfFile((HANDLE)arg0, (DWORD)arg1, (DWORD)arg2, (DWORD)arg3, arg4);
OS_NATIVE_EXIT(env, that, MapViewOfFile_FUNC);
return rc;
}
@@ -5440,56 +4824,34 @@ JNIEXPORT jint JNICALL OS_NATIVE(MapVirtualKey)
}
#endif
-#if (!defined(NO_MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I) && !defined(JNI64)) || (!defined(NO_MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3)
-#endif
+#ifndef NO_MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I
+JNIEXPORT jint JNICALL OS_NATIVE(MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3)
{
POINT _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
if (arg2) if ((lparg2 = getPOINTFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)MapWindowPoints((HWND)arg0, (HWND)arg1, (LPPOINT)lparg2, arg3);
+ rc = (jint)MapWindowPoints((HWND)arg0, (HWND)arg1, lparg2, arg3);
fail:
if (arg2 && lparg2) setPOINTFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I) && !defined(JNI64)) || (!defined(NO_MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jint arg3)
-#endif
+#ifndef NO_MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I
+JNIEXPORT jint JNICALL OS_NATIVE(MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3)
{
RECT _arg2, *lparg2=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#endif
if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail;
rc = (jint)MapWindowPoints((HWND)arg0, (HWND)arg1, (LPPOINT)lparg2, arg3);
fail:
if (arg2 && lparg2) setRECTFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#endif
return rc;
}
#endif
@@ -5508,7 +4870,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(MessageBeep)
#ifndef NO_MessageBox
JNIEXPORT jint JNICALL OS_NATIVE(MessageBox)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jcharArray arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jcharArray arg2, jint arg3)
{
jchar *lparg1=NULL;
jchar *lparg2=NULL;
@@ -5518,8 +4880,8 @@ JNIEXPORT jint JNICALL OS_NATIVE(MessageBox)
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)MessageBox((HWND)arg0, (LPWSTR)lparg1, (LPWSTR)lparg2, arg3);
fail:
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, MessageBox_FUNC);
return rc;
}
@@ -5527,7 +4889,7 @@ fail:
#ifndef NO_ModifyWorldTransform
JNIEXPORT jboolean JNICALL OS_NATIVE(ModifyWorldTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2)
{
jfloat *lparg1=NULL;
jboolean rc = 0;
@@ -5542,812 +4904,409 @@ fail:
#endif
#ifndef NO_MonitorFromWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(MonitorFromWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(MonitorFromWindow)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, MonitorFromWindow_FUNC);
- rc = (jintLong)MonitorFromWindow((HWND)arg0, arg1);
+ rc = (jlong)MonitorFromWindow((HWND)arg0, arg1);
OS_NATIVE_EXIT(env, that, MonitorFromWindow_FUNC);
return rc;
}
#endif
-#if (!defined(NO_MoveMemory__III) && !defined(JNI64)) || (!defined(NO_MoveMemory__JJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JJI)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JJI_FUNC);
-#endif
MoveMemory((PVOID)arg0, (CONST VOID *)arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JJI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_DEVMODE_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_DEVMODE_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_CIDA_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_CIDA_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
+{
+ CIDA _arg1, *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_CIDA_2I_FUNC);
+ if (arg1) if ((lparg1 = getCIDAFields(env, arg1, &_arg1)) == NULL) goto fail;
+ MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
+fail:
+ OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_CIDA_2I_FUNC);
+}
#endif
+
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
DEVMODE _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_DEVMODE_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getDEVMODEFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_DEVMODE_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
DOCHOSTUIINFO _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getDOCHOSTUIINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
DROPFILES _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getDROPFILESFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_GESTURECONFIG_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_GESTURECONFIG_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_GESTURECONFIG_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_GESTURECONFIG_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
-{
- GESTURECONFIG _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_GESTURECONFIG_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_GESTURECONFIG_2I_FUNC);
-#endif
- if (arg1) if ((lparg1 = getGESTURECONFIGFields(env, arg1, &_arg1)) == NULL) goto fail;
- MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
-fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_GESTURECONFIG_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_GESTURECONFIG_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
GRADIENT_RECT _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getGRADIENT_RECTFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_KEYBDINPUT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_KEYBDINPUT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
-{
- KEYBDINPUT _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_FUNC);
-#endif
- if (arg1) if ((lparg1 = getKEYBDINPUTFields(env, arg1, &_arg1)) == NULL) goto fail;
- MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
-fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONT_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
LOGFONT _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONT_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getLOGFONTFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONT_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
MEASUREITEMSTRUCT _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getMEASUREITEMSTRUCTFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
MINMAXINFO _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getMINMAXINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_MOUSEINPUT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_MOUSEINPUT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
-{
- MOUSEINPUT _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_FUNC);
-#endif
- if (arg1) if ((lparg1 = getMOUSEINPUTFields(env, arg1, &_arg1)) == NULL) goto fail;
- MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
-fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
MSG _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getMSGFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
NMLVCUSTOMDRAW _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getNMLVCUSTOMDRAWFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
NMLVDISPINFO _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getNMLVDISPINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
NMTBCUSTOMDRAW _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getNMTBCUSTOMDRAWFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
NMTTDISPINFO _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getNMTTDISPINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
NMTVCUSTOMDRAW _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getNMTVCUSTOMDRAWFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
NMTVDISPINFO _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getNMTVDISPINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_OPENFILENAME_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_OPENFILENAME_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
-{
- OPENFILENAME _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC);
-#endif
- if (arg1) if ((lparg1 = getOPENFILENAMEFields(env, arg1, &_arg1)) == NULL) goto fail;
- MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
-fail:
- if (arg1 && lparg1) setOPENFILENAMEFields(env, arg1, lparg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
RECT _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
SAFEARRAY _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getSAFEARRAYFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
SHDRAGIMAGE _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getSHDRAGIMAGEFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
TRIVERTEX _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getTRIVERTEXFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
UDACCEL _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getUDACCELFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jint arg2)
{
WINDOWPOS _arg1, *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I_FUNC);
-#endif
if (arg1) if ((lparg1 = getWINDOWPOSFields(env, arg1, &_arg1)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__I_3BI) && !defined(JNI64)) || (!defined(NO_MoveMemory__J_3BI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__I_3BI)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3BI)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__J_3BI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3BI)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__I_3BI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__J_3BI_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__I_3BI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__J_3BI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__I_3CI) && !defined(JNI64)) || (!defined(NO_MoveMemory__J_3CI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__I_3CI)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3CI)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__J_3CI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3CI)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2)
{
jchar *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__I_3CI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__J_3CI_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__I_3CI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__J_3CI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__I_3DI) && !defined(JNI64)) || (!defined(NO_MoveMemory__J_3DI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__I_3DI)(JNIEnv *env, jclass that, jintLong arg0, jdoubleArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3DI)(JNIEnv *env, jclass that, jintLong arg0, jdoubleArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__J_3DI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3DI)
+ (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jint arg2)
{
jdouble *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__I_3DI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__J_3DI_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__I_3DI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__J_3DI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__I_3FI) && !defined(JNI64)) || (!defined(NO_MoveMemory__J_3FI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__I_3FI)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3FI)(JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__J_3FI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3FI)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jint arg2)
{
jfloat *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__I_3FI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__J_3FI_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__I_3FI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__J_3FI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__I_3II) && !defined(JNI64)) || (!defined(NO_MoveMemory__J_3II) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__I_3II)(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3II)(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__J_3II
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3II)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jint arg2)
{
jint *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__I_3II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__J_3II_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__I_3II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__J_3II_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__I_3JI) && !defined(JNI64)) || (!defined(NO_MoveMemory__J_3JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__I_3JI)(JNIEnv *env, jclass that, jintLong arg0, jlongArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3JI)(JNIEnv *env, jclass that, jintLong arg0, jlongArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__J_3JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3JI)
+ (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jint arg2)
{
jlong *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__I_3JI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__J_3JI_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__I_3JI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__J_3JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__I_3SI) && !defined(JNI64)) || (!defined(NO_MoveMemory__J_3SI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__I_3SI)(JNIEnv *env, jclass that, jintLong arg0, jshortArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3SI)(JNIEnv *env, jclass that, jintLong arg0, jshortArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__J_3SI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__J_3SI)
+ (JNIEnv *env, jclass that, jlong arg0, jshortArray arg1, jint arg2)
{
jshort *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__I_3SI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__J_3SI_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
fail:
if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__I_3SI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__J_3SI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
BITMAPINFOHEADER _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setBITMAPINFOHEADERFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI_FUNC);
-#endif
}
#endif
@@ -6368,959 +5327,499 @@ fail:
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
-{
- CERT_CONTEXT _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2JI_FUNC);
-#endif
- if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setCERT_CONTEXTFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2JI_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_CIDA_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_CIDA_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
- CERT_INFO _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2JI_FUNC);
-#endif
+ CIDA _arg0, *lparg0=NULL;
+ OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CIDA_2JI_FUNC);
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
- if (arg0 && lparg0) setCERT_INFOFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2JI_FUNC);
-#endif
+ if (arg0 && lparg0) setCIDAFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_CIDA_2JI_FUNC);
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
DEVMODE _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setDEVMODEFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
DOCHOSTUIINFO _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setDOCHOSTUIINFOFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
DRAWITEMSTRUCT _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setDRAWITEMSTRUCTFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
EMREXTCREATEFONTINDIRECTW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setEMREXTCREATEFONTINDIRECTWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
EMR _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setEMRFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3II)(JNIEnv *env, jclass that, jobject arg0, jintLongArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI)(JNIEnv *env, jclass that, jobject arg0, jintLongArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlongArray arg1, jint arg2)
{
FLICK_DATA _arg0, *lparg0=NULL;
- jintLong *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3II_FUNC);
-#else
+ jlong *lparg1=NULL;
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)lparg1, arg2);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, JNI_ABORT);
if (arg0 && lparg0) setFLICK_DATAFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3II)(JNIEnv *env, jclass that, jobject arg0, jintLongArray arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI)(JNIEnv *env, jclass that, jobject arg0, jintLongArray arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlongArray arg1, jint arg2)
{
FLICK_POINT _arg0, *lparg0=NULL;
- jintLong *lparg1=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3II_FUNC);
-#else
+ jlong *lparg1=NULL;
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)lparg1, arg2);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, JNI_ABORT);
if (arg0 && lparg0) setFLICK_POINTFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
HDITEM _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setHDITEMFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
HELPINFO _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setHELPINFOFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
LOGFONT _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setLOGFONTFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
MEASUREITEMSTRUCT _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setMEASUREITEMSTRUCTFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
MINMAXINFO _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setMINMAXINFOFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
MSG _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setMSGFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMCUSTOMDRAW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMCUSTOMDRAWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMHDR _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMHDRFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMHEADER _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMHEADERFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMLINK _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMLINKFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMLISTVIEW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMLISTVIEWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMLVCUSTOMDRAW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMLVCUSTOMDRAWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMLVDISPINFO _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMLVDISPINFOFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMLVODSTATECHANGE _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMLVODSTATECHANGEFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMREBARCHEVRON _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMREBARCHEVRONFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMREBARCHILDSIZE _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMREBARCHILDSIZEFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTBCUSTOMDRAW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTBCUSTOMDRAWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTBHOTITEM _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTBHOTITEMFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTOOLBAR _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTOOLBARFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTREEVIEW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTREEVIEWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTTCUSTOMDRAW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTTCUSTOMDRAWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTTDISPINFO _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTTDISPINFOFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTVCUSTOMDRAW _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTVCUSTOMDRAWFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTVDISPINFO _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTVDISPINFOFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMTVITEMCHANGE _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMTVITEMCHANGEFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
NMUPDOWN _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setNMUPDOWNFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
-{
- OFNOTIFY _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2JI_FUNC);
-#endif
- if (arg0) if ((lparg0 = getOFNOTIFYFields(env, arg0, &_arg0)) == NULL) goto fail;
- MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setOFNOTIFYFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
-{
- OPENFILENAME _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2JI_FUNC);
-#endif
- if (arg0) if ((lparg0 = getOPENFILENAMEFields(env, arg0, &_arg0)) == NULL) goto fail;
- MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
-fail:
- if (arg0 && lparg0) setOPENFILENAMEFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2JI_FUNC);
-#endif
-}
-#endif
-
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
POINT _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setPOINTFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI_FUNC);
-#endif
}
#endif
@@ -7341,228 +5840,129 @@ fail:
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
SAFEARRAY _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = getSAFEARRAYFields(env, arg0, &_arg0)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setSAFEARRAYFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
SCRIPT_ITEM _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setSCRIPT_ITEMFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
SCRIPT_LOGATTR _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setSCRIPT_LOGATTRFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
SCRIPT_PROPERTIES _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setSCRIPT_PROPERTIESFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
TEXTMETRIC _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setTEXTMETRICFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
TOUCHINPUT _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setTOUCHINPUTFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
UDACCEL _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setUDACCELFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II) && !defined(JNI64)) || (!defined(NO_MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2)
{
WINDOWPOS _arg0, *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI_FUNC);
-#endif
if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) setWINDOWPOSFields(env, arg0, lparg0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory___3BII) && !defined(JNI64)) || (!defined(NO_MoveMemory___3BJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3BII)(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3BJI)(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory___3BJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3BJI)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jint arg2)
{
jbyte *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory___3BII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory___3BJI_FUNC);
-#endif
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory___3BII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory___3BJI_FUNC);
-#endif
}
#endif
@@ -7598,159 +5998,93 @@ fail:
}
#endif
-#if (!defined(NO_MoveMemory___3CII) && !defined(JNI64)) || (!defined(NO_MoveMemory___3CJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3CII)(JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3CJI)(JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory___3CJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3CJI)
+ (JNIEnv *env, jclass that, jcharArray arg0, jlong arg1, jint arg2)
{
jchar *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory___3CII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory___3CJI_FUNC);
-#endif
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory___3CII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory___3CJI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory___3DII) && !defined(JNI64)) || (!defined(NO_MoveMemory___3DJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3DII)(JNIEnv *env, jclass that, jdoubleArray arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3DJI)(JNIEnv *env, jclass that, jdoubleArray arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory___3DJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3DJI)
+ (JNIEnv *env, jclass that, jdoubleArray arg0, jlong arg1, jint arg2)
{
jdouble *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory___3DII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory___3DJI_FUNC);
-#endif
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory___3DII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory___3DJI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory___3FII) && !defined(JNI64)) || (!defined(NO_MoveMemory___3FJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3FII)(JNIEnv *env, jclass that, jfloatArray arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3FJI)(JNIEnv *env, jclass that, jfloatArray arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory___3FJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3FJI)
+ (JNIEnv *env, jclass that, jfloatArray arg0, jlong arg1, jint arg2)
{
jfloat *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory___3FII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory___3FJI_FUNC);
-#endif
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory___3FII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory___3FJI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory___3III) && !defined(JNI64)) || (!defined(NO_MoveMemory___3IJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3III)(JNIEnv *env, jclass that, jintArray arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3IJI)(JNIEnv *env, jclass that, jintArray arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory___3IJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3IJI)
+ (JNIEnv *env, jclass that, jintArray arg0, jlong arg1, jint arg2)
{
jint *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory___3III_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory___3IJI_FUNC);
-#endif
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory___3III_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory___3IJI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory___3JII) && !defined(JNI64)) || (!defined(NO_MoveMemory___3JJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3JII)(JNIEnv *env, jclass that, jlongArray arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3JJI)(JNIEnv *env, jclass that, jlongArray arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory___3JJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3JJI)
+ (JNIEnv *env, jclass that, jlongArray arg0, jlong arg1, jint arg2)
{
jlong *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory___3JII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory___3JJI_FUNC);
-#endif
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory___3JII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory___3JJI_FUNC);
-#endif
}
#endif
-#if (!defined(NO_MoveMemory___3SII) && !defined(JNI64)) || (!defined(NO_MoveMemory___3SJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3SII)(JNIEnv *env, jclass that, jshortArray arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3SJI)(JNIEnv *env, jclass that, jshortArray arg0, jintLong arg1, jint arg2)
-#endif
+#ifndef NO_MoveMemory___3SJI
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory___3SJI)
+ (JNIEnv *env, jclass that, jshortArray arg0, jlong arg1, jint arg2)
{
jshort *lparg0=NULL;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MoveMemory___3SII_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MoveMemory___3SJI_FUNC);
-#endif
if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
fail:
if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MoveMemory___3SII_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MoveMemory___3SJI_FUNC);
-#endif
}
#endif
#ifndef NO_MoveToEx
JNIEXPORT jboolean JNICALL OS_NATIVE(MoveToEx)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jlong arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, MoveToEx_FUNC);
@@ -7760,29 +6094,18 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(MoveToEx)
}
#endif
-#if (!defined(NO_MultiByteToWideChar__IIII_3CI) && !defined(JNI64)) || (!defined(NO_MultiByteToWideChar__IIJI_3CI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(MultiByteToWideChar__IIII_3CI)(JNIEnv *env, jclass that, jint arg0, jint arg1, jintLong arg2, jint arg3, jcharArray arg4, jint arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(MultiByteToWideChar__IIJI_3CI)(JNIEnv *env, jclass that, jint arg0, jint arg1, jintLong arg2, jint arg3, jcharArray arg4, jint arg5)
-#endif
+#ifndef NO_MultiByteToWideChar__IIJI_3CI
+JNIEXPORT jint JNICALL OS_NATIVE(MultiByteToWideChar__IIJI_3CI)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jlong arg2, jint arg3, jcharArray arg4, jint arg5)
{
jchar *lparg4=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, MultiByteToWideChar__IIII_3CI_FUNC);
-#else
OS_NATIVE_ENTER(env, that, MultiByteToWideChar__IIJI_3CI_FUNC);
-#endif
if (arg4) if ((lparg4 = (*env)->GetPrimitiveArrayCritical(env, arg4, NULL)) == NULL) goto fail;
rc = (jint)MultiByteToWideChar(arg0, arg1, (LPCSTR)arg2, arg3, (LPWSTR)lparg4, arg5);
fail:
if (arg4 && lparg4) (*env)->ReleasePrimitiveArrayCritical(env, arg4, lparg4, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, MultiByteToWideChar__IIII_3CI_FUNC);
-#else
OS_NATIVE_EXIT(env, that, MultiByteToWideChar__IIJI_3CI_FUNC);
-#endif
return rc;
}
#endif
@@ -8084,7 +6407,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(NOTIFYICONDATA_1V2_1SIZE)
#ifndef NO_NotifyWinEvent
JNIEXPORT void JNICALL OS_NATIVE(NotifyWinEvent)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jint arg2, jint arg3)
{
OS_NATIVE_ENTER(env, that, NotifyWinEvent_FUNC);
NotifyWinEvent((DWORD)arg0, (HWND)arg1, (LONG)arg2, (LONG)arg3);
@@ -8092,26 +6415,14 @@ JNIEXPORT void JNICALL OS_NATIVE(NotifyWinEvent)
}
#endif
-#ifndef NO_OFNOTIFY_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(OFNOTIFY_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, OFNOTIFY_1sizeof_FUNC);
- rc = (jint)OFNOTIFY_sizeof();
- OS_NATIVE_EXIT(env, that, OFNOTIFY_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_OPENFILENAME_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(OPENFILENAME_1sizeof)
+#ifndef NO_OSVERSIONINFOEX_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(OSVERSIONINFOEX_1sizeof)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- OS_NATIVE_ENTER(env, that, OPENFILENAME_1sizeof_FUNC);
- rc = (jint)OPENFILENAME_sizeof();
- OS_NATIVE_EXIT(env, that, OPENFILENAME_1sizeof_FUNC);
+ OS_NATIVE_ENTER(env, that, OSVERSIONINFOEX_1sizeof_FUNC);
+ rc = (jint)OSVERSIONINFOEX_sizeof();
+ OS_NATIVE_EXIT(env, that, OSVERSIONINFOEX_1sizeof_FUNC);
return rc;
}
#endif
@@ -8146,7 +6457,7 @@ fail:
#ifndef NO_OffsetRgn
JNIEXPORT jint JNICALL OS_NATIVE(OffsetRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, OffsetRgn_FUNC);
@@ -8158,7 +6469,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(OffsetRgn)
#ifndef NO_OleInitialize
JNIEXPORT jint JNICALL OS_NATIVE(OleInitialize)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, OleInitialize_FUNC);
@@ -8180,7 +6491,7 @@ JNIEXPORT void JNICALL OS_NATIVE(OleUninitialize)
#ifndef NO_OpenClipboard
JNIEXPORT jboolean JNICALL OS_NATIVE(OpenClipboard)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, OpenClipboard_FUNC);
@@ -8192,46 +6503,46 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(OpenClipboard)
#ifndef NO_OpenPrinter
JNIEXPORT jboolean JNICALL OS_NATIVE(OpenPrinter)
- (JNIEnv *env, jclass that, jcharArray arg0, jintLongArray arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jcharArray arg0, jlongArray arg1, jlong arg2)
{
jchar *lparg0=NULL;
- jintLong *lparg1=NULL;
+ jlong *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, OpenPrinter_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ if (arg1) if ((lparg1 = (*env)->GetLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)OpenPrinter((LPWSTR)lparg0, (LPHANDLE)lparg1, (LPPRINTER_DEFAULTSW)arg2);
fail:
- if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg1 && lparg1) (*env)->ReleaseLongArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, OpenPrinter_FUNC);
return rc;
}
#endif
#ifndef NO_OpenProcess
-JNIEXPORT jintLong JNICALL OS_NATIVE(OpenProcess)
+JNIEXPORT jlong JNICALL OS_NATIVE(OpenProcess)
(JNIEnv *env, jclass that, jint arg0, jboolean arg1, jint arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, OpenProcess_FUNC);
- rc = (jintLong)OpenProcess((DWORD)arg0, arg1, (DWORD)arg2);
+ rc = (jlong)OpenProcess((DWORD)arg0, arg1, (DWORD)arg2);
OS_NATIVE_EXIT(env, that, OpenProcess_FUNC);
return rc;
}
#endif
#ifndef NO_OpenThemeData
-JNIEXPORT jintLong JNICALL OS_NATIVE(OpenThemeData)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(OpenThemeData)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1)
{
jchar *lparg1=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, OpenThemeData_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)OpenThemeData((HWND)arg0, (LPCWSTR)lparg1);
+ rc = (jlong)OpenThemeData((HWND)arg0, (LPCWSTR)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, OpenThemeData_FUNC);
return rc;
}
@@ -8249,32 +6560,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(PAINTSTRUCT_1sizeof)
}
#endif
-#ifndef NO_PANOSE_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(PANOSE_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, PANOSE_1sizeof_FUNC);
- rc = (jint)PANOSE_sizeof();
- OS_NATIVE_EXIT(env, that, PANOSE_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_POINTSTOPOINT
-JNIEXPORT void JNICALL OS_NATIVE(POINTSTOPOINT)
- (JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
-{
- POINT _arg0, *lparg0=NULL;
- OS_NATIVE_ENTER(env, that, POINTSTOPOINT_FUNC);
- if (arg0) if ((lparg0 = getPOINTFields(env, arg0, &_arg0)) == NULL) goto fail;
- POINTSTOPOINT(*lparg0, arg1);
-fail:
- if (arg0 && lparg0) setPOINTFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, POINTSTOPOINT_FUNC);
-}
-#endif
-
#ifndef NO_POINT_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(POINT_1sizeof)
(JNIEnv *env, jclass that)
@@ -8287,18 +6572,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(POINT_1sizeof)
}
#endif
-#ifndef NO_PRIMARYLANGID
-JNIEXPORT jshort JNICALL OS_NATIVE(PRIMARYLANGID)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jshort rc = 0;
- OS_NATIVE_ENTER(env, that, PRIMARYLANGID_FUNC);
- rc = (jshort)PRIMARYLANGID(arg0);
- OS_NATIVE_EXIT(env, that, PRIMARYLANGID_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_PRINTDLG_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(PRINTDLG_1sizeof)
(JNIEnv *env, jclass that)
@@ -8356,11 +6629,11 @@ JNIEXPORT jint JNICALL OS_NATIVE(PSPropertyKeyFromString)
jint rc = 0;
OS_NATIVE_ENTER(env, that, PSPropertyKeyFromString_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = getPROPERTYKEYFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jint)PSPropertyKeyFromString(lparg0, lparg1);
+ if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+ rc = (jint)PSPropertyKeyFromString((LPCWSTR)lparg0, lparg1);
fail:
if (arg1 && lparg1) setPROPERTYKEYFields(env, arg1, lparg1);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, PSPropertyKeyFromString_FUNC);
return rc;
}
@@ -8368,7 +6641,7 @@ fail:
#ifndef NO_PatBlt
JNIEXPORT jboolean JNICALL OS_NATIVE(PatBlt)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PatBlt_FUNC);
@@ -8380,7 +6653,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(PatBlt)
#ifndef NO_PathIsExe
JNIEXPORT jboolean JNICALL OS_NATIVE(PathIsExe)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PathIsExe_FUNC);
@@ -8392,12 +6665,12 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(PathIsExe)
#ifndef NO_PeekMessage
JNIEXPORT jboolean JNICALL OS_NATIVE(PeekMessage)
- (JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
+ (JNIEnv *env, jclass that, jobject arg0, jlong arg1, jint arg2, jint arg3, jint arg4)
{
MSG _arg0, *lparg0=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PeekMessage_FUNC);
- if (arg0) if ((lparg0 = getMSGFields(env, arg0, &_arg0)) == NULL) goto fail;
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
rc = (jboolean)PeekMessage(lparg0, (HWND)arg1, arg2, arg3, arg4);
fail:
if (arg0 && lparg0) setMSGFields(env, arg0, lparg0);
@@ -8408,7 +6681,7 @@ fail:
#ifndef NO_Pie
JNIEXPORT jboolean JNICALL OS_NATIVE(Pie)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, Pie_FUNC);
@@ -8420,7 +6693,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(Pie)
#ifndef NO_Polygon
JNIEXPORT jboolean JNICALL OS_NATIVE(Polygon)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jint arg2)
{
jint *lparg1=NULL;
jboolean rc = 0;
@@ -8436,7 +6709,7 @@ fail:
#ifndef NO_Polyline
JNIEXPORT jboolean JNICALL OS_NATIVE(Polyline)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jint arg2)
{
jint *lparg1=NULL;
jboolean rc = 0;
@@ -8452,7 +6725,7 @@ fail:
#ifndef NO_PostMessage
JNIEXPORT jboolean JNICALL OS_NATIVE(PostMessage)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PostMessage_FUNC);
@@ -8464,7 +6737,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(PostMessage)
#ifndef NO_PostThreadMessage
JNIEXPORT jboolean JNICALL OS_NATIVE(PostThreadMessage)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintLong arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jlong arg2, jlong arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PostThreadMessage_FUNC);
@@ -8482,7 +6755,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(PrintDlg)
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PrintDlg_FUNC);
if (arg0) if ((lparg0 = getPRINTDLGFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jboolean)PrintDlg((LPPRINTDLGW)lparg0);
+ rc = (jboolean)PrintDlg(lparg0);
fail:
if (arg0 && lparg0) setPRINTDLGFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, PrintDlg_FUNC);
@@ -8492,7 +6765,7 @@ fail:
#ifndef NO_PrintWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(PrintWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PrintWindow_FUNC);
@@ -8521,7 +6794,7 @@ fail:
#ifndef NO_PtInRegion
JNIEXPORT jboolean JNICALL OS_NATIVE(PtInRegion)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, PtInRegion_FUNC);
@@ -8555,21 +6828,9 @@ JNIEXPORT jint JNICALL OS_NATIVE(RECT_1sizeof)
}
#endif
-#ifndef NO_RealizePalette
-JNIEXPORT jint JNICALL OS_NATIVE(RealizePalette)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, RealizePalette_FUNC);
- rc = (jint)RealizePalette((HDC)arg0);
- OS_NATIVE_EXIT(env, that, RealizePalette_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_RectInRegion
JNIEXPORT jboolean JNICALL OS_NATIVE(RectInRegion)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -8584,7 +6845,7 @@ fail:
#ifndef NO_Rectangle
JNIEXPORT jboolean JNICALL OS_NATIVE(Rectangle)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, Rectangle_FUNC);
@@ -8596,7 +6857,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(Rectangle)
#ifndef NO_RedrawWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(RedrawWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2, jint arg3)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -8604,7 +6865,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(RedrawWindow)
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)RedrawWindow((HWND)arg0, lparg1, (HRGN)arg2, arg3);
fail:
- if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, RedrawWindow_FUNC);
return rc;
}
@@ -8612,7 +6872,7 @@ fail:
#ifndef NO_RegCloseKey
JNIEXPORT jint JNICALL OS_NATIVE(RegCloseKey)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegCloseKey_FUNC);
@@ -8624,24 +6884,24 @@ JNIEXPORT jint JNICALL OS_NATIVE(RegCloseKey)
#ifndef NO_RegCreateKeyEx
JNIEXPORT jint JNICALL OS_NATIVE(RegCreateKeyEx)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jcharArray arg3, jint arg4, jint arg5, jintLong arg6, jintLongArray arg7, jintLongArray arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jcharArray arg3, jint arg4, jint arg5, jlong arg6, jlongArray arg7, jlongArray arg8)
{
jchar *lparg1=NULL;
jchar *lparg3=NULL;
- jintLong *lparg7=NULL;
- jintLong *lparg8=NULL;
+ jlong *lparg7=NULL;
+ jlong *lparg8=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegCreateKeyEx_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg7) if ((lparg7 = (*env)->GetIntLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
- if (arg8) if ((lparg8 = (*env)->GetIntLongArrayElements(env, arg8, NULL)) == NULL) goto fail;
- rc = (jint)RegCreateKeyEx((HKEY)arg0, (LPWSTR)lparg1, arg2, (LPWSTR)lparg3, arg4, arg5, (LPSECURITY_ATTRIBUTES)arg6, (PHKEY)lparg7, (LPDWORD)lparg8);
-fail:
- if (arg8 && lparg8) (*env)->ReleaseIntLongArrayElements(env, arg8, lparg8, 0);
- if (arg7 && lparg7) (*env)->ReleaseIntLongArrayElements(env, arg7, lparg7, 0);
- if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg7) if ((lparg7 = (*env)->GetLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
+ if (arg8) if ((lparg8 = (*env)->GetLongArrayElements(env, arg8, NULL)) == NULL) goto fail;
+ rc = (jint)RegCreateKeyEx((HKEY)arg0, (LPCWSTR)lparg1, arg2, (LPWSTR)lparg3, arg4, arg5, (LPSECURITY_ATTRIBUTES)arg6, (PHKEY)lparg7, (LPDWORD)lparg8);
+fail:
+ if (arg8 && lparg8) (*env)->ReleaseLongArrayElements(env, arg8, lparg8, 0);
+ if (arg7 && lparg7) (*env)->ReleaseLongArrayElements(env, arg7, lparg7, 0);
+ if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegCreateKeyEx_FUNC);
return rc;
}
@@ -8649,15 +6909,15 @@ fail:
#ifndef NO_RegDeleteValue
JNIEXPORT jint JNICALL OS_NATIVE(RegDeleteValue)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1)
{
jchar *lparg1=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegDeleteValue_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jint)RegDeleteValue((HKEY)arg0, (LPWSTR)lparg1);
+ rc = (jint)RegDeleteValue((HKEY)arg0, (LPCWSTR)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegDeleteValue_FUNC);
return rc;
}
@@ -8665,14 +6925,13 @@ fail:
#ifndef NO_RegEnumKeyEx
JNIEXPORT jint JNICALL OS_NATIVE(RegEnumKeyEx)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jcharArray arg2, jintArray arg3, jintArray arg4, jcharArray arg5, jintArray arg6, jobject arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jcharArray arg2, jintArray arg3, jintArray arg4, jcharArray arg5, jintArray arg6, jlong arg7)
{
jchar *lparg2=NULL;
jint *lparg3=NULL;
jint *lparg4=NULL;
jchar *lparg5=NULL;
jint *lparg6=NULL;
- FILETIME _arg7, *lparg7=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegEnumKeyEx_FUNC);
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
@@ -8680,10 +6939,8 @@ JNIEXPORT jint JNICALL OS_NATIVE(RegEnumKeyEx)
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetCharArrayElements(env, arg5, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- if (arg7) if ((lparg7 = getFILETIMEFields(env, arg7, &_arg7)) == NULL) goto fail;
- rc = (jint)RegEnumKeyEx((HKEY)arg0, arg1, (LPWSTR)lparg2, (LPDWORD)lparg3, (LPDWORD)lparg4, (LPWSTR)lparg5, (LPDWORD)lparg6, lparg7);
+ rc = (jint)RegEnumKeyEx((HKEY)arg0, arg1, (LPWSTR)lparg2, (LPDWORD)lparg3, (LPDWORD)lparg4, (LPWSTR)lparg5, (LPDWORD)lparg6, (PFILETIME)arg7);
fail:
- if (arg7 && lparg7) setFILETIMEFields(env, arg7, lparg7);
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
if (arg5 && lparg5) (*env)->ReleaseCharArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
@@ -8696,98 +6953,76 @@ fail:
#ifndef NO_RegOpenKeyEx
JNIEXPORT jint JNICALL OS_NATIVE(RegOpenKeyEx)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jint arg3, jintLongArray arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jint arg3, jlongArray arg4)
{
jchar *lparg1=NULL;
- jintLong *lparg4=NULL;
+ jlong *lparg4=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegOpenKeyEx_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)RegOpenKeyEx((HKEY)arg0, (LPWSTR)lparg1, arg2, arg3, (PHKEY)lparg4);
+ if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+ rc = (jint)RegOpenKeyEx((HKEY)arg0, (LPCWSTR)lparg1, arg2, arg3, (PHKEY)lparg4);
fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegOpenKeyEx_FUNC);
return rc;
}
#endif
-#if (!defined(NO_RegQueryValueEx__I_3CI_3I_3C_3I) && !defined(JNI64)) || (!defined(NO_RegQueryValueEx__J_3CJ_3I_3C_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(RegQueryValueEx__I_3CI_3I_3C_3I)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2, jintArray arg3, jcharArray arg4, jintArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(RegQueryValueEx__J_3CJ_3I_3C_3I)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2, jintArray arg3, jcharArray arg4, jintArray arg5)
-#endif
+#ifndef NO_RegQueryValueEx__J_3CJ_3I_3C_3I
+JNIEXPORT jint JNICALL OS_NATIVE(RegQueryValueEx__J_3CJ_3I_3C_3I)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jlong arg2, jintArray arg3, jcharArray arg4, jintArray arg5)
{
jchar *lparg1=NULL;
jint *lparg3=NULL;
jchar *lparg4=NULL;
jint *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, RegQueryValueEx__I_3CI_3I_3C_3I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, RegQueryValueEx__J_3CJ_3I_3C_3I_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)RegQueryValueEx((HKEY)arg0, (LPWSTR)lparg1, (LPDWORD)arg2, (LPDWORD)lparg3, (LPBYTE)lparg4, (LPDWORD)lparg5);
+ rc = (jint)RegQueryValueEx((HKEY)arg0, (LPCWSTR)lparg1, (LPDWORD)arg2, (LPDWORD)lparg3, (LPBYTE)lparg4, (LPDWORD)lparg5);
fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, RegQueryValueEx__I_3CI_3I_3C_3I_FUNC);
-#else
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegQueryValueEx__J_3CJ_3I_3C_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_RegQueryValueEx__I_3CI_3I_3I_3I) && !defined(JNI64)) || (!defined(NO_RegQueryValueEx__J_3CJ_3I_3I_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(RegQueryValueEx__I_3CI_3I_3I_3I)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2, jintArray arg3, jintArray arg4, jintArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(RegQueryValueEx__J_3CJ_3I_3I_3I)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2, jintArray arg3, jintArray arg4, jintArray arg5)
-#endif
+#ifndef NO_RegQueryValueEx__J_3CJ_3I_3I_3I
+JNIEXPORT jint JNICALL OS_NATIVE(RegQueryValueEx__J_3CJ_3I_3I_3I)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jlong arg2, jintArray arg3, jintArray arg4, jintArray arg5)
{
jchar *lparg1=NULL;
jint *lparg3=NULL;
jint *lparg4=NULL;
jint *lparg5=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, RegQueryValueEx__I_3CI_3I_3I_3I_FUNC);
-#else
OS_NATIVE_ENTER(env, that, RegQueryValueEx__J_3CJ_3I_3I_3I_FUNC);
-#endif
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)RegQueryValueEx((HKEY)arg0, (LPWSTR)lparg1, (LPDWORD)arg2, (LPDWORD)lparg3, (LPBYTE)lparg4, (LPDWORD)lparg5);
+ rc = (jint)RegQueryValueEx((HKEY)arg0, (LPCWSTR)lparg1, (LPDWORD)arg2, (LPDWORD)lparg3, (LPBYTE)lparg4, (LPDWORD)lparg5);
fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, RegQueryValueEx__I_3CI_3I_3I_3I_FUNC);
-#else
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegQueryValueEx__J_3CJ_3I_3I_3I_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_RegSetValueEx
JNIEXPORT jint JNICALL OS_NATIVE(RegSetValueEx)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jint arg3, jintArray arg4, jint arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jint arg2, jint arg3, jintArray arg4, jint arg5)
{
jchar *lparg1=NULL;
jint *lparg4=NULL;
@@ -8795,10 +7030,10 @@ JNIEXPORT jint JNICALL OS_NATIVE(RegSetValueEx)
OS_NATIVE_ENTER(env, that, RegSetValueEx_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)RegSetValueEx((HKEY)arg0, (LPWSTR)lparg1, arg2, arg3, (const BYTE*)lparg4, arg5);
+ rc = (jint)RegSetValueEx((HKEY)arg0, (LPCWSTR)lparg1, arg2, arg3, (const BYTE*)lparg4, arg5);
fail:
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegSetValueEx_FUNC);
return rc;
}
@@ -8812,9 +7047,8 @@ JNIEXPORT jint JNICALL OS_NATIVE(RegisterClass)
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegisterClass_FUNC);
if (arg0) if ((lparg0 = getWNDCLASSFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jint)RegisterClass((LPWNDCLASSW)lparg0);
+ rc = (jint)RegisterClass(lparg0);
fail:
- if (arg0 && lparg0) setWNDCLASSFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, RegisterClass_FUNC);
return rc;
}
@@ -8828,9 +7062,9 @@ JNIEXPORT jint JNICALL OS_NATIVE(RegisterClipboardFormat)
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegisterClipboardFormat_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jint)RegisterClipboardFormat((LPWSTR)lparg0);
+ rc = (jint)RegisterClipboardFormat((LPCWSTR)lparg0);
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegisterClipboardFormat_FUNC);
return rc;
}
@@ -8838,19 +7072,11 @@ fail:
#ifndef NO_RegisterTouchWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(RegisterTouchWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, RegisterTouchWindow_FUNC);
-/*
rc = (jboolean)RegisterTouchWindow((HWND)arg0, (ULONG)arg1);
-*/
- {
- OS_LOAD_FUNCTION(fp, RegisterTouchWindow)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(HWND, ULONG))fp)((HWND)arg0, (ULONG)arg1);
- }
- }
OS_NATIVE_EXIT(env, that, RegisterTouchWindow_FUNC);
return rc;
}
@@ -8864,9 +7090,9 @@ JNIEXPORT jint JNICALL OS_NATIVE(RegisterWindowMessage)
jint rc = 0;
OS_NATIVE_ENTER(env, that, RegisterWindowMessage_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jint)RegisterWindowMessage((LPWSTR)lparg0);
+ rc = (jint)RegisterWindowMessage((LPCWSTR)lparg0);
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, RegisterWindowMessage_FUNC);
return rc;
}
@@ -8886,7 +7112,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ReleaseCapture)
#ifndef NO_ReleaseDC
JNIEXPORT jint JNICALL OS_NATIVE(ReleaseDC)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ReleaseDC_FUNC);
@@ -8898,7 +7124,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ReleaseDC)
#ifndef NO_RemoveMenu
JNIEXPORT jboolean JNICALL OS_NATIVE(RemoveMenu)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, RemoveMenu_FUNC);
@@ -8909,12 +7135,12 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(RemoveMenu)
#endif
#ifndef NO_RemoveProp
-JNIEXPORT jintLong JNICALL OS_NATIVE(RemoveProp)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(RemoveProp)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, RemoveProp_FUNC);
- rc = (jintLong)RemoveProp((HWND)arg0, (LPCWSTR)arg1);
+ rc = (jlong)RemoveProp((HWND)arg0, (LPCWSTR)arg1);
OS_NATIVE_EXIT(env, that, RemoveProp_FUNC);
return rc;
}
@@ -8922,7 +7148,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(RemoveProp)
#ifndef NO_ReplyMessage
JNIEXPORT jboolean JNICALL OS_NATIVE(ReplyMessage)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ReplyMessage_FUNC);
@@ -8934,7 +7160,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ReplyMessage)
#ifndef NO_RestoreDC
JNIEXPORT jboolean JNICALL OS_NATIVE(RestoreDC)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, RestoreDC_FUNC);
@@ -8946,7 +7172,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(RestoreDC)
#ifndef NO_RoundRect
JNIEXPORT jboolean JNICALL OS_NATIVE(RoundRect)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, RoundRect_FUNC);
@@ -8956,6 +7182,30 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(RoundRect)
}
#endif
+#ifndef NO_RtlGetVersion
+JNIEXPORT jint JNICALL OS_NATIVE(RtlGetVersion)
+ (JNIEnv *env, jclass that, jobject arg0)
+{
+ OSVERSIONINFOEX _arg0, *lparg0=NULL;
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, RtlGetVersion_FUNC);
+ if (arg0) if ((lparg0 = getOSVERSIONINFOEXFields(env, arg0, &_arg0)) == NULL) goto fail;
+/*
+ rc = (jint)RtlGetVersion(lparg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, RtlGetVersion)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(OSVERSIONINFOEX *))fp)(lparg0);
+ }
+ }
+fail:
+ if (arg0 && lparg0) setOSVERSIONINFOEXFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, RtlGetVersion_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_SAFEARRAYBOUND_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(SAFEARRAYBOUND_1sizeof)
(JNIEnv *env, jclass that)
@@ -9004,18 +7254,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(SCRIPT_1CONTROL_1sizeof)
}
#endif
-#ifndef NO_SCRIPT_1DIGITSUBSTITUTE_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(SCRIPT_1DIGITSUBSTITUTE_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SCRIPT_1DIGITSUBSTITUTE_1sizeof_FUNC);
- rc = (jint)SCRIPT_DIGITSUBSTITUTE_sizeof();
- OS_NATIVE_EXIT(env, that, SCRIPT_1DIGITSUBSTITUTE_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SCRIPT_1FONTPROPERTIES_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(SCRIPT_1FONTPROPERTIES_1sizeof)
(JNIEnv *env, jclass that)
@@ -9112,91 +7350,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(SCROLLINFO_1sizeof)
}
#endif
-#ifndef NO_SHBrowseForFolder
-JNIEXPORT jintLong JNICALL OS_NATIVE(SHBrowseForFolder)
- (JNIEnv *env, jclass that, jobject arg0)
-{
- BROWSEINFO _arg0, *lparg0=NULL;
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, SHBrowseForFolder_FUNC);
- if (arg0) if ((lparg0 = getBROWSEINFOFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)SHBrowseForFolder((LPBROWSEINFOW)lparg0);
-fail:
- if (arg0 && lparg0) setBROWSEINFOFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, SHBrowseForFolder_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_SHCreateItemFromParsingName
-JNIEXPORT jint JNICALL OS_NATIVE(SHCreateItemFromParsingName)
- (JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1, jbyteArray arg2, jintLongArray arg3)
-{
- jchar *lparg0=NULL;
- jbyte *lparg2=NULL;
- jintLong *lparg3=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SHCreateItemFromParsingName_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)SHCreateItemFromParsingName(lparg0, (IBindCtx *)arg1, (REFIID)lparg2, (void **)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, SHCreateItemFromParsingName_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_SHCreateItemFromRelativeName
-JNIEXPORT jint JNICALL OS_NATIVE(SHCreateItemFromRelativeName)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2, jbyteArray arg3, jintLongArray arg4)
-{
- jchar *lparg1=NULL;
- jbyte *lparg3=NULL;
- jintLong *lparg4=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SHCreateItemFromRelativeName_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)SHCreateItemFromRelativeName((IShellItem *)arg0, lparg1, (IBindCtx *)arg2, (REFIID)lparg3, (void **)lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, SHCreateItemFromRelativeName_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_SHCreateItemInKnownFolder
-JNIEXPORT jint JNICALL OS_NATIVE(SHCreateItemInKnownFolder)
- (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jcharArray arg2, jbyteArray arg3, jintLongArray arg4)
-{
- jbyte *lparg0=NULL;
- jchar *lparg2=NULL;
- jbyte *lparg3=NULL;
- jintLong *lparg4=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SHCreateItemInKnownFolder_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)SHCreateItemInKnownFolder((REFKNOWNFOLDERID)lparg0, arg1, lparg2, (REFIID)lparg3, (void **)lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, SHCreateItemInKnownFolder_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SHDRAGIMAGE_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(SHDRAGIMAGE_1sizeof)
(JNIEnv *env, jclass that)
@@ -9234,56 +7387,24 @@ JNIEXPORT jint JNICALL OS_NATIVE(SHFILEINFO_1sizeof)
#endif
#ifndef NO_SHGetFileInfo
-JNIEXPORT jintLong JNICALL OS_NATIVE(SHGetFileInfo)
+JNIEXPORT jlong JNICALL OS_NATIVE(SHGetFileInfo)
(JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jobject arg2, jint arg3, jint arg4)
{
jchar *lparg0=NULL;
SHFILEINFO _arg2, *lparg2=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SHGetFileInfo_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = getSHFILEINFOFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jintLong)SHGetFileInfo((LPCWSTR)lparg0, arg1, (SHFILEINFOW *)lparg2, arg3, arg4);
+ rc = (jlong)SHGetFileInfo((LPCWSTR)lparg0, arg1, lparg2, arg3, arg4);
fail:
if (arg2 && lparg2) setSHFILEINFOFields(env, arg2, lparg2);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, SHGetFileInfo_FUNC);
return rc;
}
#endif
-#ifndef NO_SHGetMalloc
-JNIEXPORT jint JNICALL OS_NATIVE(SHGetMalloc)
- (JNIEnv *env, jclass that, jintLongArray arg0)
-{
- jintLong *lparg0=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SHGetMalloc_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jint)SHGetMalloc((LPMALLOC *)lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseIntLongArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, SHGetMalloc_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_SHGetPathFromIDList
-JNIEXPORT jboolean JNICALL OS_NATIVE(SHGetPathFromIDList)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1)
-{
- jchar *lparg1=NULL;
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, SHGetPathFromIDList_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)SHGetPathFromIDList((LPCITEMIDLIST)arg0, (LPWSTR)lparg1);
-fail:
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- OS_NATIVE_EXIT(env, that, SHGetPathFromIDList_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SIZE_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(SIZE_1sizeof)
(JNIEnv *env, jclass that)
@@ -9322,7 +7443,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(SYSTEMTIME_1sizeof)
#ifndef NO_SaveDC
JNIEXPORT jint JNICALL OS_NATIVE(SaveDC)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SaveDC_FUNC);
@@ -9334,7 +7455,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(SaveDC)
#ifndef NO_ScreenToClient
JNIEXPORT jboolean JNICALL OS_NATIVE(ScreenToClient)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
POINT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -9350,21 +7471,18 @@ fail:
#ifndef NO_ScriptApplyDigitSubstitution
JNIEXPORT jint JNICALL OS_NATIVE(ScriptApplyDigitSubstitution)
- (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jobject arg2)
{
- SCRIPT_DIGITSUBSTITUTE _arg0, *lparg0=NULL;
SCRIPT_CONTROL _arg1, *lparg1=NULL;
SCRIPT_STATE _arg2, *lparg2=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, ScriptApplyDigitSubstitution_FUNC);
- if (arg0) if ((lparg0 = getSCRIPT_DIGITSUBSTITUTEFields(env, arg0, &_arg0)) == NULL) goto fail;
if (arg1) if ((lparg1 = getSCRIPT_CONTROLFields(env, arg1, &_arg1)) == NULL) goto fail;
if (arg2) if ((lparg2 = getSCRIPT_STATEFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)ScriptApplyDigitSubstitution((const SCRIPT_DIGITSUBSTITUTE*)lparg0, (SCRIPT_CONTROL*)lparg1, (SCRIPT_STATE*)lparg2);
+ rc = (jint)ScriptApplyDigitSubstitution((const SCRIPT_DIGITSUBSTITUTE*)arg0, (SCRIPT_CONTROL*)lparg1, (SCRIPT_STATE*)lparg2);
fail:
if (arg2 && lparg2) setSCRIPT_STATEFields(env, arg2, lparg2);
if (arg1 && lparg1) setSCRIPT_CONTROLFields(env, arg1, lparg1);
- if (arg0 && lparg0) setSCRIPT_DIGITSUBSTITUTEFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, ScriptApplyDigitSubstitution_FUNC);
return rc;
}
@@ -9372,7 +7490,7 @@ fail:
#ifndef NO_ScriptBreak
JNIEXPORT jint JNICALL OS_NATIVE(ScriptBreak)
- (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jobject arg2, jintLong arg3)
+ (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jobject arg2, jlong arg3)
{
jchar *lparg0=NULL;
SCRIPT_ANALYSIS _arg2, *lparg2=NULL;
@@ -9382,8 +7500,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptBreak)
if (arg2) if ((lparg2 = getSCRIPT_ANALYSISFields(env, arg2, &_arg2)) == NULL) goto fail;
rc = (jint)ScriptBreak((const WCHAR *)lparg0, arg1, (const SCRIPT_ANALYSIS *)lparg2, (SCRIPT_LOGATTR *)arg3);
fail:
- if (arg2 && lparg2) setSCRIPT_ANALYSISFields(env, arg2, lparg2);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, ScriptBreak_FUNC);
return rc;
}
@@ -9391,7 +7508,7 @@ fail:
#ifndef NO_ScriptCPtoX
JNIEXPORT jint JNICALL OS_NATIVE(ScriptCPtoX)
- (JNIEnv *env, jclass that, jint arg0, jboolean arg1, jint arg2, jint arg3, jintLong arg4, jintLong arg5, jintLong arg6, jobject arg7, jintArray arg8)
+ (JNIEnv *env, jclass that, jint arg0, jboolean arg1, jint arg2, jint arg3, jlong arg4, jlong arg5, jlong arg6, jobject arg7, jintArray arg8)
{
SCRIPT_ANALYSIS _arg7, *lparg7=NULL;
jint *lparg8=NULL;
@@ -9402,7 +7519,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptCPtoX)
rc = (jint)ScriptCPtoX(arg0, arg1, arg2, arg3, (const WORD *)arg4, (const SCRIPT_VISATTR *)arg5, (const int *)arg6, (const SCRIPT_ANALYSIS *)lparg7, (int *)lparg8);
fail:
if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0);
- if (arg7 && lparg7) setSCRIPT_ANALYSISFields(env, arg7, lparg7);
OS_NATIVE_EXIT(env, that, ScriptCPtoX_FUNC);
return rc;
}
@@ -9410,7 +7526,7 @@ fail:
#ifndef NO_ScriptCacheGetHeight
JNIEXPORT jint JNICALL OS_NATIVE(ScriptCacheGetHeight)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jintArray arg2)
{
jint *lparg2=NULL;
jint rc = 0;
@@ -9426,7 +7542,7 @@ fail:
#ifndef NO_ScriptFreeCache
JNIEXPORT jint JNICALL OS_NATIVE(ScriptFreeCache)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ScriptFreeCache_FUNC);
@@ -9438,7 +7554,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptFreeCache)
#ifndef NO_ScriptGetCMap
JNIEXPORT jint JNICALL OS_NATIVE(ScriptGetCMap)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jshortArray arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jcharArray arg2, jint arg3, jint arg4, jshortArray arg5)
{
jchar *lparg2=NULL;
jshort *lparg5=NULL;
@@ -9449,7 +7565,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptGetCMap)
rc = (jint)ScriptGetCMap((HDC)arg0, (SCRIPT_CACHE *)arg1, (const WCHAR *)lparg2, arg3, arg4, (WORD*)lparg5);
fail:
if (arg5 && lparg5) (*env)->ReleaseShortArrayElements(env, arg5, lparg5, 0);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
OS_NATIVE_EXIT(env, that, ScriptGetCMap_FUNC);
return rc;
}
@@ -9457,7 +7573,7 @@ fail:
#ifndef NO_ScriptGetFontProperties
JNIEXPORT jint JNICALL OS_NATIVE(ScriptGetFontProperties)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
SCRIPT_FONTPROPERTIES _arg2, *lparg2=NULL;
jint rc = 0;
@@ -9473,7 +7589,7 @@ fail:
#ifndef NO_ScriptGetLogicalWidths
JNIEXPORT jint JNICALL OS_NATIVE(ScriptGetLogicalWidths)
- (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintArray arg6)
+ (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2, jlong arg3, jlong arg4, jlong arg5, jintArray arg6)
{
SCRIPT_ANALYSIS _arg0, *lparg0=NULL;
jint *lparg6=NULL;
@@ -9484,7 +7600,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptGetLogicalWidths)
rc = (jint)ScriptGetLogicalWidths((const SCRIPT_ANALYSIS *)lparg0, arg1, arg2, (const int *)arg3, (const WORD *)arg4, (const SCRIPT_VISATTR *)arg5, (int *)lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- if (arg0 && lparg0) setSCRIPT_ANALYSISFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, ScriptGetLogicalWidths_FUNC);
return rc;
}
@@ -9492,18 +7607,18 @@ fail:
#ifndef NO_ScriptGetProperties
JNIEXPORT jint JNICALL OS_NATIVE(ScriptGetProperties)
- (JNIEnv *env, jclass that, jintLongArray arg0, jintArray arg1)
+ (JNIEnv *env, jclass that, jlongArray arg0, jintArray arg1)
{
- jintLong *lparg0=NULL;
+ jlong *lparg0=NULL;
jint *lparg1=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, ScriptGetProperties_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ if (arg0) if ((lparg0 = (*env)->GetLongArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jint)ScriptGetProperties((const SCRIPT_PROPERTIES ***)lparg0, (int *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseIntLongArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseLongArrayElements(env, arg0, lparg0, 0);
OS_NATIVE_EXIT(env, that, ScriptGetProperties_FUNC);
return rc;
}
@@ -9511,7 +7626,7 @@ fail:
#ifndef NO_ScriptItemize
JNIEXPORT jint JNICALL OS_NATIVE(ScriptItemize)
- (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jint arg2, jobject arg3, jobject arg4, jintLong arg5, jintArray arg6)
+ (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jint arg2, jobject arg3, jobject arg4, jlong arg5, jintArray arg6)
{
jchar *lparg0=NULL;
SCRIPT_CONTROL _arg3, *lparg3=NULL;
@@ -9526,9 +7641,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptItemize)
rc = (jint)ScriptItemize((const WCHAR *)lparg0, arg1, arg2, (const SCRIPT_CONTROL *)lparg3, (const SCRIPT_STATE *)lparg4, (SCRIPT_ITEM *)arg5, (int *)lparg6);
fail:
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- if (arg4 && lparg4) setSCRIPT_STATEFields(env, arg4, lparg4);
- if (arg3 && lparg3) setSCRIPT_CONTROLFields(env, arg3, lparg3);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, ScriptItemize_FUNC);
return rc;
}
@@ -9536,7 +7649,7 @@ fail:
#ifndef NO_ScriptJustify
JNIEXPORT jint JNICALL OS_NATIVE(ScriptJustify)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintLong arg5)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jlong arg5)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ScriptJustify_FUNC);
@@ -9562,7 +7675,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptLayout)
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, ScriptLayout_FUNC);
return rc;
}
@@ -9570,7 +7683,7 @@ fail:
#ifndef NO_ScriptPlace
JNIEXPORT jint JNICALL OS_NATIVE(ScriptPlace)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jintLong arg4, jobject arg5, jintLong arg6, jintLong arg7, jintArray arg8)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jint arg3, jlong arg4, jobject arg5, jlong arg6, jlong arg7, jintArray arg8)
{
SCRIPT_ANALYSIS _arg5, *lparg5=NULL;
jint *lparg8=NULL;
@@ -9587,25 +7700,9 @@ fail:
}
#endif
-#ifndef NO_ScriptRecordDigitSubstitution
-JNIEXPORT jint JNICALL OS_NATIVE(ScriptRecordDigitSubstitution)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1)
-{
- SCRIPT_DIGITSUBSTITUTE _arg1, *lparg1=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, ScriptRecordDigitSubstitution_FUNC);
- if (arg1) if ((lparg1 = getSCRIPT_DIGITSUBSTITUTEFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jint)ScriptRecordDigitSubstitution((LCID)arg0, (SCRIPT_DIGITSUBSTITUTE*)lparg1);
-fail:
- if (arg1 && lparg1) setSCRIPT_DIGITSUBSTITUTEFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, ScriptRecordDigitSubstitution_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_ScriptShape
JNIEXPORT jint JNICALL OS_NATIVE(ScriptShape)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jobject arg5, jintLong arg6, jintLong arg7, jintLong arg8, jintArray arg9)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jcharArray arg2, jint arg3, jint arg4, jobject arg5, jlong arg6, jlong arg7, jlong arg8, jintArray arg9)
{
jchar *lparg2=NULL;
SCRIPT_ANALYSIS _arg5, *lparg5=NULL;
@@ -9619,7 +7716,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptShape)
fail:
if (arg9 && lparg9) (*env)->ReleaseIntArrayElements(env, arg9, lparg9, 0);
if (arg5 && lparg5) setSCRIPT_ANALYSISFields(env, arg5, lparg5);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
OS_NATIVE_EXIT(env, that, ScriptShape_FUNC);
return rc;
}
@@ -9627,7 +7724,7 @@ fail:
#ifndef NO_ScriptStringAnalyse
JNIEXPORT jint JNICALL OS_NATIVE(ScriptStringAnalyse)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jobject arg7, jobject arg8, jintLong arg9, jintLong arg10, jintLong arg11, jintLong arg12)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jobject arg7, jobject arg8, jlong arg9, jlong arg10, jlong arg11, jlong arg12)
{
SCRIPT_CONTROL _arg7, *lparg7=NULL;
SCRIPT_STATE _arg8, *lparg8=NULL;
@@ -9646,7 +7743,7 @@ fail:
#ifndef NO_ScriptStringFree
JNIEXPORT jint JNICALL OS_NATIVE(ScriptStringFree)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, ScriptStringFree_FUNC);
@@ -9658,7 +7755,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptStringFree)
#ifndef NO_ScriptStringOut
JNIEXPORT jint JNICALL OS_NATIVE(ScriptStringOut)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jint arg6, jboolean arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jint arg6, jboolean arg7)
{
RECT _arg4, *lparg4=NULL;
jint rc = 0;
@@ -9674,7 +7771,7 @@ fail:
#ifndef NO_ScriptTextOut
JNIEXPORT jint JNICALL OS_NATIVE(ScriptTextOut)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jobject arg5, jobject arg6, jintLong arg7, jint arg8, jintLong arg9, jint arg10, jintLong arg11, jintLong arg12, jintLong arg13)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jobject arg5, jobject arg6, jlong arg7, jint arg8, jlong arg9, jint arg10, jlong arg11, jlong arg12, jlong arg13)
{
RECT _arg5, *lparg5=NULL;
SCRIPT_ANALYSIS _arg6, *lparg6=NULL;
@@ -9684,8 +7781,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptTextOut)
if (arg6) if ((lparg6 = getSCRIPT_ANALYSISFields(env, arg6, &_arg6)) == NULL) goto fail;
rc = (jint)ScriptTextOut((const HDC)arg0, (SCRIPT_CACHE *)arg1, arg2, arg3, arg4, (const RECT *)lparg5, (const SCRIPT_ANALYSIS *)lparg6, (const WCHAR *)arg7, arg8, (const WORD *)arg9, arg10, (const int *)arg11, (const int *)arg12, (const GOFFSET *)arg13);
fail:
- if (arg6 && lparg6) setSCRIPT_ANALYSISFields(env, arg6, lparg6);
- if (arg5 && lparg5) setRECTFields(env, arg5, lparg5);
OS_NATIVE_EXIT(env, that, ScriptTextOut_FUNC);
return rc;
}
@@ -9693,7 +7788,7 @@ fail:
#ifndef NO_ScriptXtoCP
JNIEXPORT jint JNICALL OS_NATIVE(ScriptXtoCP)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintLong arg3, jintLong arg4, jintLong arg5, jobject arg6, jintArray arg7, jintArray arg8)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jlong arg3, jlong arg4, jlong arg5, jobject arg6, jintArray arg7, jintArray arg8)
{
SCRIPT_ANALYSIS _arg6, *lparg6=NULL;
jint *lparg7=NULL;
@@ -9707,7 +7802,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(ScriptXtoCP)
fail:
if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0);
if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
- if (arg6 && lparg6) setSCRIPT_ANALYSISFields(env, arg6, lparg6);
OS_NATIVE_EXIT(env, that, ScriptXtoCP_FUNC);
return rc;
}
@@ -9715,7 +7809,7 @@ fail:
#ifndef NO_ScrollWindowEx
JNIEXPORT jint JNICALL OS_NATIVE(ScrollWindowEx)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jobject arg3, jobject arg4, jintLong arg5, jobject arg6, jint arg7)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jobject arg3, jobject arg4, jlong arg5, jobject arg6, jint arg7)
{
RECT _arg3, *lparg3=NULL;
RECT _arg4, *lparg4=NULL;
@@ -9737,7 +7831,7 @@ fail:
#ifndef NO_SelectClipRgn
JNIEXPORT jint JNICALL OS_NATIVE(SelectClipRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SelectClipRgn_FUNC);
@@ -9748,857 +7842,518 @@ JNIEXPORT jint JNICALL OS_NATIVE(SelectClipRgn)
#endif
#ifndef NO_SelectObject
-JNIEXPORT jintLong JNICALL OS_NATIVE(SelectObject)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(SelectObject)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SelectObject_FUNC);
- rc = (jintLong)SelectObject((HDC)arg0, (HGDIOBJ)arg1);
+ rc = (jlong)SelectObject((HDC)arg0, (HGDIOBJ)arg1);
OS_NATIVE_EXIT(env, that, SelectObject_FUNC);
return rc;
}
#endif
-#ifndef NO_SelectPalette
-JNIEXPORT jintLong JNICALL OS_NATIVE(SelectPalette)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, SelectPalette_FUNC);
- rc = (jintLong)SelectPalette((HDC)arg0, (HPALETTE)arg1, arg2);
- OS_NATIVE_EXIT(env, that, SelectPalette_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SendInput
JNIEXPORT jint JNICALL OS_NATIVE(SendInput)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2)
+ (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2)
{
+ INPUT _arg1, *lparg1=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, SendInput_FUNC);
- rc = (jint)SendInput(arg0, (LPINPUT)arg1, arg2);
+ if (arg1) if ((lparg1 = getINPUTFields(env, arg1, &_arg1)) == NULL) goto fail;
+ rc = (jint)SendInput(arg0, lparg1, arg2);
+fail:
OS_NATIVE_EXIT(env, that, SendInput_FUNC);
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIII) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIII)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJJ)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
-#endif
+#ifndef NO_SendMessage__JIJJ
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJJ)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
{
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIII_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJJ_FUNC);
-#endif
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIII_FUNC);
-#else
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
OS_NATIVE_EXIT(env, that, SendMessage__JIJJ_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
BUTTON_IMAGELIST _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getBUTTON_IMAGELISTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setBUTTON_IMAGELISTFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_HDHITTESTINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_HDHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
HDHITTESTINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_HDHITTESTINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getHDHITTESTINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setHDHITTESTINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_HDHITTESTINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_HDITEM_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_HDITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
HDITEM _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_HDITEM_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getHDITEMFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setHDITEMFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_HDITEM_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_HDLAYOUT_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_HDLAYOUT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
HDLAYOUT _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_HDLAYOUT_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getHDLAYOUTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setHDLAYOUTFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_HDLAYOUT_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_LITEM_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_LITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
LITEM _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LITEM_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getLITEMFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setLITEMFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LITEM_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
LVCOLUMN _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getLVCOLUMNFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setLVCOLUMNFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
LVHITTESTINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getLVHITTESTINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setLVHITTESTINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
LVINSERTMARK _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getLVINSERTMARKFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setLVINSERTMARKFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_LVITEM_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_LVITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
LVITEM _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVITEM_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getLVITEMFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setLVITEMFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_LVITEM_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_MARGINS_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_MARGINS_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
MARGINS _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_MARGINS_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getMARGINSFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setMARGINSFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_MARGINS_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_MCHITTESTINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_MCHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
MCHITTESTINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_MCHITTESTINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getMCHITTESTINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setMCHITTESTINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_MCHITTESTINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
REBARBANDINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getREBARBANDINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setREBARBANDINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_RECT_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
RECT _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getRECTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setRECTFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
SHDRAGIMAGE _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getSHDRAGIMAGEFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setSHDRAGIMAGEFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_SIZE_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_SIZE_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
SIZE _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getSIZEFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setSIZEFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_SYSTEMTIME_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_SYSTEMTIME_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
SYSTEMTIME _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_SYSTEMTIME_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getSYSTEMTIMEFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setSYSTEMTIMEFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_SYSTEMTIME_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TBBUTTONINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTBBUTTONINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTBBUTTONINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TBBUTTON _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTBBUTTONFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTBBUTTONFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TCHITTESTINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TCHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TCHITTESTINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TCHITTESTINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTCHITTESTINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTCHITTESTINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TCHITTESTINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TCITEM_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TCITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TCITEM _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TCITEM_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTCITEMFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTCITEMFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TCITEM_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TOOLINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTOOLINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTOOLINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TVHITTESTINFO _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTVHITTESTINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTVHITTESTINFOFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TVINSERTSTRUCT _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTVINSERTSTRUCTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTVINSERTSTRUCTFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TVITEM_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TVITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TVITEM _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVITEM_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTVITEMFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTVITEMFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVITEM_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_TVSORTCB_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_TVSORTCB_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
TVSORTCB _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVSORTCB_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getTVSORTCBFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setTVSORTCBFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_TVSORTCB_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__IIILorg_eclipse_swt_internal_win32_UDACCEL_2) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__IIILorg_eclipse_swt_internal_win32_UDACCEL_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
-#endif
+#ifndef NO_SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jobject arg3)
{
UDACCEL _arg3, *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_UDACCEL_2_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2_FUNC);
-#endif
if (arg3) if ((lparg3 = getUDACCELFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) setUDACCELFields(env, arg3, lparg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__IIILorg_eclipse_swt_internal_win32_UDACCEL_2_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__III_3C) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJ_3C) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__III_3C)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jcharArray arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJ_3C)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jcharArray arg3)
-#endif
+#ifndef NO_SendMessage__JIJ_3C
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJ_3C)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jcharArray arg3)
{
jchar *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__III_3C_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJ_3C_FUNC);
-#endif
if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__III_3C_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJ_3C_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__III_3I) && !defined(JNI64)) || (!defined(NO_SendMessage__JIJ_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__III_3I)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintArray arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JIJ_3I)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintArray arg3)
-#endif
+#ifndef NO_SendMessage__JIJ_3I
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JIJ_3I)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jintArray arg3)
{
jint *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__III_3I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JIJ_3I_FUNC);
-#endif
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__III_3I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JIJ_3I_FUNC);
-#endif
return rc;
}
#endif
-#if (!defined(NO_SendMessage__II_3I_3I) && !defined(JNI64)) || (!defined(NO_SendMessage__JI_3I_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__II_3I_3I)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2, jintArray arg3)
-#else
-JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessage__JI_3I_3I)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2, jintArray arg3)
-#endif
+#ifndef NO_SendMessage__JI_3I_3I
+JNIEXPORT jlong JNICALL OS_NATIVE(SendMessage__JI_3I_3I)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jintArray arg2, jintArray arg3)
{
jint *lparg2=NULL;
jint *lparg3=NULL;
- jintLong rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, SendMessage__II_3I_3I_FUNC);
-#else
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SendMessage__JI_3I_3I_FUNC);
-#endif
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)SendMessage((HWND)arg0, arg1, (WPARAM)lparg2, (LPARAM)lparg3);
+ rc = (jlong)SendMessage((HWND)arg0, arg1, (WPARAM)lparg2, (LPARAM)lparg3);
fail:
if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, SendMessage__II_3I_3I_FUNC);
-#else
OS_NATIVE_EXIT(env, that, SendMessage__JI_3I_3I_FUNC);
-#endif
return rc;
}
#endif
#ifndef NO_SetActiveWindow
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetActiveWindow)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetActiveWindow)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetActiveWindow_FUNC);
- rc = (jintLong)SetActiveWindow((HWND)arg0);
+ rc = (jlong)SetActiveWindow((HWND)arg0);
OS_NATIVE_EXIT(env, that, SetActiveWindow_FUNC);
return rc;
}
@@ -10606,7 +8361,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(SetActiveWindow)
#ifndef NO_SetBkColor
JNIEXPORT jint JNICALL OS_NATIVE(SetBkColor)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetBkColor_FUNC);
@@ -10618,7 +8373,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetBkColor)
#ifndef NO_SetBkMode
JNIEXPORT jint JNICALL OS_NATIVE(SetBkMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetBkMode_FUNC);
@@ -10630,13 +8385,13 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetBkMode)
#ifndef NO_SetBrushOrgEx
JNIEXPORT jboolean JNICALL OS_NATIVE(SetBrushOrgEx)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jobject arg3)
{
POINT _arg3, *lparg3=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetBrushOrgEx_FUNC);
- if (arg3) if ((lparg3 = getPOINTFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jboolean)SetBrushOrgEx((HDC)arg0, arg1, arg2, (LPPOINT)lparg3);
+ if (arg3) if ((lparg3 = &_arg3) == NULL) goto fail;
+ rc = (jboolean)SetBrushOrgEx((HDC)arg0, arg1, arg2, lparg3);
fail:
if (arg3 && lparg3) setPOINTFields(env, arg3, lparg3);
OS_NATIVE_EXIT(env, that, SetBrushOrgEx_FUNC);
@@ -10645,12 +8400,12 @@ fail:
#endif
#ifndef NO_SetCapture
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetCapture)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetCapture)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetCapture_FUNC);
- rc = (jintLong)SetCapture((HWND)arg0);
+ rc = (jlong)SetCapture((HWND)arg0);
OS_NATIVE_EXIT(env, that, SetCapture_FUNC);
return rc;
}
@@ -10676,29 +8431,21 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetCurrentProcessExplicitAppUserModelID)
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetCurrentProcessExplicitAppUserModelID_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
rc = (jint)SetCurrentProcessExplicitAppUserModelID(lparg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, SetCurrentProcessExplicitAppUserModelID)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jchar *))fp)(lparg0);
- }
- }
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, SetCurrentProcessExplicitAppUserModelID_FUNC);
return rc;
}
#endif
#ifndef NO_SetCursor
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetCursor)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetCursor)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetCursor_FUNC);
- rc = (jintLong)SetCursor((HCURSOR)arg0);
+ rc = (jlong)SetCursor((HCURSOR)arg0);
OS_NATIVE_EXIT(env, that, SetCursor_FUNC);
return rc;
}
@@ -10718,7 +8465,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetCursorPos)
#ifndef NO_SetDIBColorTable
JNIEXPORT jint JNICALL OS_NATIVE(SetDIBColorTable)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jbyteArray arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jbyteArray arg3)
{
jbyte *lparg3=NULL;
jint rc = 0;
@@ -10732,41 +8479,13 @@ fail:
}
#endif
-#ifndef NO_SetDllDirectory
-JNIEXPORT jboolean JNICALL OS_NATIVE(SetDllDirectory)
- (JNIEnv *env, jclass that, jcharArray arg0)
-{
- jchar *lparg0=NULL;
- jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, SetDllDirectory_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jboolean)SetDllDirectory(lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, SetDllDirectory_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_SetErrorMode
-JNIEXPORT jint JNICALL OS_NATIVE(SetErrorMode)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SetErrorMode_FUNC);
- rc = (jint)SetErrorMode(arg0);
- OS_NATIVE_EXIT(env, that, SetErrorMode_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SetFocus
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetFocus)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetFocus)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetFocus_FUNC);
- rc = (jintLong)SetFocus((HWND)arg0);
+ rc = (jlong)SetFocus((HWND)arg0);
OS_NATIVE_EXIT(env, that, SetFocus_FUNC);
return rc;
}
@@ -10774,7 +8493,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(SetFocus)
#ifndef NO_SetForegroundWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(SetForegroundWindow)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetForegroundWindow_FUNC);
@@ -10786,19 +8505,14 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetForegroundWindow)
#ifndef NO_SetGestureConfig
JNIEXPORT jboolean JNICALL OS_NATIVE(SetGestureConfig)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintLong arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jobject arg3, jint arg4)
{
+ GESTURECONFIG _arg3, *lparg3=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetGestureConfig_FUNC);
-/*
- rc = (jboolean)SetGestureConfig((HWND)arg0, arg1, arg2, (PGESTURECONFIG)arg3, arg4);
-*/
- {
- OS_LOAD_FUNCTION(fp, SetGestureConfig)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(HWND, jint, jint, PGESTURECONFIG, jint))fp)((HWND)arg0, arg1, arg2, (PGESTURECONFIG)arg3, arg4);
- }
- }
+ if (arg3) if ((lparg3 = getGESTURECONFIGFields(env, arg3, &_arg3)) == NULL) goto fail;
+ rc = (jboolean)SetGestureConfig((HWND)arg0, arg1, arg2, lparg3, arg4);
+fail:
OS_NATIVE_EXIT(env, that, SetGestureConfig_FUNC);
return rc;
}
@@ -10806,7 +8520,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetGestureConfig)
#ifndef NO_SetGraphicsMode
JNIEXPORT jint JNICALL OS_NATIVE(SetGraphicsMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetGraphicsMode_FUNC);
@@ -10818,7 +8532,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetGraphicsMode)
#ifndef NO_SetLayeredWindowAttributes
JNIEXPORT jboolean JNICALL OS_NATIVE(SetLayeredWindowAttributes)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jbyte arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jbyte arg2, jint arg3)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetLayeredWindowAttributes_FUNC);
@@ -10830,7 +8544,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetLayeredWindowAttributes)
#ifndef NO_SetLayout
JNIEXPORT jint JNICALL OS_NATIVE(SetLayout)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetLayout_FUNC);
@@ -10842,7 +8556,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetLayout)
#ifndef NO_SetMenu
JNIEXPORT jboolean JNICALL OS_NATIVE(SetMenu)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetMenu_FUNC);
@@ -10854,7 +8568,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetMenu)
#ifndef NO_SetMenuDefaultItem
JNIEXPORT jboolean JNICALL OS_NATIVE(SetMenuDefaultItem)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetMenuDefaultItem_FUNC);
@@ -10866,7 +8580,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetMenuDefaultItem)
#ifndef NO_SetMenuInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(SetMenuInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
MENUINFO _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -10874,7 +8588,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetMenuInfo)
if (arg1) if ((lparg1 = getMENUINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)SetMenuInfo((HMENU)arg0, lparg1);
fail:
- if (arg1 && lparg1) setMENUINFOFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, SetMenuInfo_FUNC);
return rc;
}
@@ -10882,15 +8595,14 @@ fail:
#ifndef NO_SetMenuItemInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(SetMenuItemInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2, jobject arg3)
{
MENUITEMINFO _arg3, *lparg3=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetMenuItemInfo_FUNC);
if (arg3) if ((lparg3 = getMENUITEMINFOFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jboolean)SetMenuItemInfo((HMENU)arg0, arg1, arg2, (LPMENUITEMINFOW)lparg3);
+ rc = (jboolean)SetMenuItemInfo((HMENU)arg0, arg1, arg2, lparg3);
fail:
- if (arg3 && lparg3) setMENUITEMINFOFields(env, arg3, lparg3);
OS_NATIVE_EXIT(env, that, SetMenuItemInfo_FUNC);
return rc;
}
@@ -10898,7 +8610,7 @@ fail:
#ifndef NO_SetMetaRgn
JNIEXPORT jint JNICALL OS_NATIVE(SetMetaRgn)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetMetaRgn_FUNC);
@@ -10908,29 +8620,13 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetMetaRgn)
}
#endif
-#ifndef NO_SetPaletteEntries
-JNIEXPORT jint JNICALL OS_NATIVE(SetPaletteEntries)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jbyteArray arg3)
-{
- jbyte *lparg3=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SetPaletteEntries_FUNC);
- if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)SetPaletteEntries((HPALETTE)arg0, arg1, arg2, (PALETTEENTRY *)lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, JNI_ABORT);
- OS_NATIVE_EXIT(env, that, SetPaletteEntries_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SetParent
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetParent)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetParent)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetParent_FUNC);
- rc = (jintLong)SetParent((HWND)arg0, (HWND)arg1);
+ rc = (jlong)SetParent((HWND)arg0, (HWND)arg1);
OS_NATIVE_EXIT(env, that, SetParent_FUNC);
return rc;
}
@@ -10938,7 +8634,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(SetParent)
#ifndef NO_SetPixel
JNIEXPORT jint JNICALL OS_NATIVE(SetPixel)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetPixel_FUNC);
@@ -10950,7 +8646,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetPixel)
#ifndef NO_SetPolyFillMode
JNIEXPORT jint JNICALL OS_NATIVE(SetPolyFillMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetPolyFillMode_FUNC);
@@ -10974,7 +8670,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetProcessDPIAware)
#ifndef NO_SetProp
JNIEXPORT jboolean JNICALL OS_NATIVE(SetProp)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetProp_FUNC);
@@ -10986,7 +8682,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetProp)
#ifndef NO_SetROP2
JNIEXPORT jint JNICALL OS_NATIVE(SetROP2)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetROP2_FUNC);
@@ -11014,7 +8710,7 @@ fail:
#ifndef NO_SetRectRgn
JNIEXPORT jboolean JNICALL OS_NATIVE(SetRectRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetRectRgn_FUNC);
@@ -11026,7 +8722,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetRectRgn)
#ifndef NO_SetScrollInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(SetScrollInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2, jboolean arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jobject arg2, jboolean arg3)
{
SCROLLINFO _arg2, *lparg2=NULL;
jboolean rc = 0;
@@ -11034,7 +8730,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetScrollInfo)
if (arg2) if ((lparg2 = getSCROLLINFOFields(env, arg2, &_arg2)) == NULL) goto fail;
rc = (jboolean)SetScrollInfo((HWND)arg0, arg1, lparg2, arg3);
fail:
- if (arg2 && lparg2) setSCROLLINFOFields(env, arg2, lparg2);
OS_NATIVE_EXIT(env, that, SetScrollInfo_FUNC);
return rc;
}
@@ -11042,7 +8737,7 @@ fail:
#ifndef NO_SetStretchBltMode
JNIEXPORT jint JNICALL OS_NATIVE(SetStretchBltMode)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetStretchBltMode_FUNC);
@@ -11054,7 +8749,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetStretchBltMode)
#ifndef NO_SetTextColor
JNIEXPORT jint JNICALL OS_NATIVE(SetTextColor)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetTextColor_FUNC);
@@ -11065,12 +8760,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetTextColor)
#endif
#ifndef NO_SetTimer
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetTimer)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetTimer)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlong arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetTimer_FUNC);
- rc = (jintLong)SetTimer((HWND)arg0, arg1, arg2, (TIMERPROC)arg3);
+ rc = (jlong)SetTimer((HWND)arg0, arg1, arg2, (TIMERPROC)arg3);
OS_NATIVE_EXIT(env, that, SetTimer_FUNC);
return rc;
}
@@ -11078,7 +8773,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(SetTimer)
#ifndef NO_SetWindowLong
JNIEXPORT jint JNICALL OS_NATIVE(SetWindowLong)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetWindowLong_FUNC);
@@ -11089,12 +8784,12 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetWindowLong)
#endif
#ifndef NO_SetWindowLongPtr
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetWindowLongPtr)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetWindowLongPtr)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetWindowLongPtr_FUNC);
- rc = (jintLong)SetWindowLongPtr((HWND)arg0, arg1, (LONG_PTR)arg2);
+ rc = (jlong)SetWindowLongPtr((HWND)arg0, arg1, (LONG_PTR)arg2);
OS_NATIVE_EXIT(env, that, SetWindowLongPtr_FUNC);
return rc;
}
@@ -11102,7 +8797,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(SetWindowLongPtr)
#ifndef NO_SetWindowOrgEx
JNIEXPORT jboolean JNICALL OS_NATIVE(SetWindowOrgEx)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jobject arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jobject arg3)
{
POINT _arg3, *lparg3=NULL;
jboolean rc = 0;
@@ -11118,7 +8813,7 @@ fail:
#ifndef NO_SetWindowPlacement
JNIEXPORT jboolean JNICALL OS_NATIVE(SetWindowPlacement)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
WINDOWPLACEMENT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -11126,7 +8821,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetWindowPlacement)
if (arg1) if ((lparg1 = getWINDOWPLACEMENTFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)SetWindowPlacement((HWND)arg0, lparg1);
fail:
- if (arg1 && lparg1) setWINDOWPLACEMENTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, SetWindowPlacement_FUNC);
return rc;
}
@@ -11134,7 +8828,7 @@ fail:
#ifndef NO_SetWindowPos
JNIEXPORT jboolean JNICALL OS_NATIVE(SetWindowPos)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetWindowPos_FUNC);
@@ -11146,7 +8840,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetWindowPos)
#ifndef NO_SetWindowRgn
JNIEXPORT jint JNICALL OS_NATIVE(SetWindowRgn)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jboolean arg2)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, SetWindowRgn_FUNC);
@@ -11158,15 +8852,15 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetWindowRgn)
#ifndef NO_SetWindowText
JNIEXPORT jboolean JNICALL OS_NATIVE(SetWindowText)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1)
{
jchar *lparg1=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, SetWindowText_FUNC);
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
- rc = (jboolean)SetWindowText((HWND)arg0, (LPWSTR)lparg1);
+ rc = (jboolean)SetWindowText((HWND)arg0, (LPCWSTR)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, SetWindowText_FUNC);
return rc;
}
@@ -11174,7 +8868,7 @@ fail:
#ifndef NO_SetWindowTheme
JNIEXPORT jint JNICALL OS_NATIVE(SetWindowTheme)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jcharArray arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jcharArray arg2)
{
jchar *lparg1=NULL;
jchar *lparg2=NULL;
@@ -11184,20 +8878,20 @@ JNIEXPORT jint JNICALL OS_NATIVE(SetWindowTheme)
if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)SetWindowTheme((HWND)arg0, (LPCWSTR)lparg1, (LPCWSTR)lparg2);
fail:
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+ if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, JNI_ABORT);
+ if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, SetWindowTheme_FUNC);
return rc;
}
#endif
#ifndef NO_SetWindowsHookEx
-JNIEXPORT jintLong JNICALL OS_NATIVE(SetWindowsHookEx)
- (JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jint arg3)
+JNIEXPORT jlong JNICALL OS_NATIVE(SetWindowsHookEx)
+ (JNIEnv *env, jclass that, jint arg0, jlong arg1, jlong arg2, jint arg3)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, SetWindowsHookEx_FUNC);
- rc = (jintLong)SetWindowsHookEx(arg0, (HOOKPROC)arg1, (HINSTANCE)arg2, arg3);
+ rc = (jlong)SetWindowsHookEx(arg0, (HOOKPROC)arg1, (HINSTANCE)arg2, arg3);
OS_NATIVE_EXIT(env, that, SetWindowsHookEx_FUNC);
return rc;
}
@@ -11205,7 +8899,7 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(SetWindowsHookEx)
#ifndef NO_SetWorldTransform
JNIEXPORT jboolean JNICALL OS_NATIVE(SetWorldTransform)
- (JNIEnv *env, jclass that, jintLong arg0, jfloatArray arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1)
{
jfloat *lparg1=NULL;
jboolean rc = 0;
@@ -11213,7 +8907,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SetWorldTransform)
if (arg1) if ((lparg1 = (*env)->GetFloatArrayElements(env, arg1, NULL)) == NULL) goto fail;
rc = (jboolean)SetWorldTransform((HDC)arg0, (XFORM *)lparg1);
fail:
- if (arg1 && lparg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, 0);
+ if (arg1 && lparg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, JNI_ABORT);
OS_NATIVE_EXIT(env, that, SetWorldTransform_FUNC);
return rc;
}
@@ -11227,7 +8921,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ShellExecuteEx)
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ShellExecuteEx_FUNC);
if (arg0) if ((lparg0 = getSHELLEXECUTEINFOFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jboolean)ShellExecuteEx((LPSHELLEXECUTEINFOW)lparg0);
+ rc = (jboolean)ShellExecuteEx(lparg0);
fail:
if (arg0 && lparg0) setSHELLEXECUTEINFOFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, ShellExecuteEx_FUNC);
@@ -11245,7 +8939,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(Shell_1NotifyIcon)
if (arg1) if ((lparg1 = getNOTIFYICONDATAFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)Shell_NotifyIcon(arg0, lparg1);
fail:
- if (arg1 && lparg1) setNOTIFYICONDATAFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, Shell_1NotifyIcon_FUNC);
return rc;
}
@@ -11253,7 +8946,7 @@ fail:
#ifndef NO_ShowCaret
JNIEXPORT jboolean JNICALL OS_NATIVE(ShowCaret)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ShowCaret_FUNC);
@@ -11265,7 +8958,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ShowCaret)
#ifndef NO_ShowOwnedPopups
JNIEXPORT jboolean JNICALL OS_NATIVE(ShowOwnedPopups)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ShowOwnedPopups_FUNC);
@@ -11277,7 +8970,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ShowOwnedPopups)
#ifndef NO_ShowScrollBar
JNIEXPORT jboolean JNICALL OS_NATIVE(ShowScrollBar)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jboolean arg2)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ShowScrollBar_FUNC);
@@ -11289,7 +8982,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ShowScrollBar)
#ifndef NO_ShowWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(ShowWindow)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, ShowWindow_FUNC);
@@ -11301,15 +8994,14 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ShowWindow)
#ifndef NO_StartDoc
JNIEXPORT jint JNICALL OS_NATIVE(StartDoc)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
DOCINFO _arg1, *lparg1=NULL;
jint rc = 0;
OS_NATIVE_ENTER(env, that, StartDoc_FUNC);
if (arg1) if ((lparg1 = getDOCINFOFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jint)StartDoc((HDC)arg0, (LPDOCINFOW)lparg1);
+ rc = (jint)StartDoc((HDC)arg0, lparg1);
fail:
- if (arg1 && lparg1) setDOCINFOFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, StartDoc_FUNC);
return rc;
}
@@ -11317,7 +9009,7 @@ fail:
#ifndef NO_StartPage
JNIEXPORT jint JNICALL OS_NATIVE(StartPage)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, StartPage_FUNC);
@@ -11329,7 +9021,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(StartPage)
#ifndef NO_StretchBlt
JNIEXPORT jboolean JNICALL OS_NATIVE(StretchBlt)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jlong arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, StretchBlt_FUNC);
@@ -11511,18 +9203,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(TOUCHINPUT_1sizeof)
}
#endif
-#ifndef NO_TOUCH_1COORD_1TO_1PIXEL
-JNIEXPORT jlong JNICALL OS_NATIVE(TOUCH_1COORD_1TO_1PIXEL)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- OS_NATIVE_ENTER(env, that, TOUCH_1COORD_1TO_1PIXEL_FUNC);
- rc = (jlong)TOUCH_COORD_TO_PIXEL(arg0);
- OS_NATIVE_EXIT(env, that, TOUCH_1COORD_1TO_1PIXEL_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_TRACKMOUSEEVENT_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(TRACKMOUSEEVENT_1sizeof)
(JNIEnv *env, jclass that)
@@ -11571,18 +9251,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(TVINSERTSTRUCT_1sizeof)
}
#endif
-#ifndef NO_TVITEMEX_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(TVITEMEX_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, TVITEMEX_1sizeof_FUNC);
- rc = (jint)TVITEMEX_sizeof();
- OS_NATIVE_EXIT(env, that, TVITEMEX_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_TVITEM_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(TVITEM_1sizeof)
(JNIEnv *env, jclass that)
@@ -11644,7 +9312,7 @@ fail:
#ifndef NO_TrackPopupMenu
JNIEXPORT jboolean JNICALL OS_NATIVE(TrackPopupMenu)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jobject arg6)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jlong arg5, jobject arg6)
{
RECT _arg6, *lparg6=NULL;
jboolean rc = 0;
@@ -11660,7 +9328,7 @@ fail:
#ifndef NO_TranslateAccelerator
JNIEXPORT jint JNICALL OS_NATIVE(TranslateAccelerator)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2)
{
MSG _arg2, *lparg2=NULL;
jint rc = 0;
@@ -11676,7 +9344,7 @@ fail:
#ifndef NO_TranslateCharsetInfo
JNIEXPORT jboolean JNICALL OS_NATIVE(TranslateCharsetInfo)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jint arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jint arg2)
{
jint *lparg1=NULL;
jboolean rc = 0;
@@ -11692,7 +9360,7 @@ fail:
#ifndef NO_TranslateMDISysAccel
JNIEXPORT jboolean JNICALL OS_NATIVE(TranslateMDISysAccel)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
MSG _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -11724,7 +9392,7 @@ fail:
#ifndef NO_TransparentBlt
JNIEXPORT jboolean JNICALL OS_NATIVE(TransparentBlt)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jlong arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, TransparentBlt_FUNC);
@@ -11736,7 +9404,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(TransparentBlt)
#ifndef NO_TreeView_1GetItemRect
JNIEXPORT jboolean JNICALL OS_NATIVE(TreeView_1GetItemRect)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jboolean arg3)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jboolean arg3)
{
RECT _arg2, *lparg2=NULL;
jboolean rc = 0;
@@ -11764,7 +9432,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(UDACCEL_1sizeof)
#ifndef NO_UnhookWindowsHookEx
JNIEXPORT jboolean JNICALL OS_NATIVE(UnhookWindowsHookEx)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, UnhookWindowsHookEx_FUNC);
@@ -11776,7 +9444,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(UnhookWindowsHookEx)
#ifndef NO_UnmapViewOfFile
JNIEXPORT jboolean JNICALL OS_NATIVE(UnmapViewOfFile)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, UnmapViewOfFile_FUNC);
@@ -11788,15 +9456,15 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(UnmapViewOfFile)
#ifndef NO_UnregisterClass
JNIEXPORT jboolean JNICALL OS_NATIVE(UnregisterClass)
- (JNIEnv *env, jclass that, jcharArray arg0, jintLong arg1)
+ (JNIEnv *env, jclass that, jcharArray arg0, jlong arg1)
{
jchar *lparg0=NULL;
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, UnregisterClass_FUNC);
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jboolean)UnregisterClass((LPWSTR)lparg0, (HINSTANCE)arg1);
+ rc = (jboolean)UnregisterClass((LPCWSTR)lparg0, (HINSTANCE)arg1);
fail:
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, UnregisterClass_FUNC);
return rc;
}
@@ -11804,19 +9472,11 @@ fail:
#ifndef NO_UnregisterTouchWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(UnregisterTouchWindow)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, UnregisterTouchWindow_FUNC);
-/*
rc = (jboolean)UnregisterTouchWindow((HWND)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, UnregisterTouchWindow)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(HWND))fp)((HWND)arg0);
- }
- }
OS_NATIVE_EXIT(env, that, UnregisterTouchWindow_FUNC);
return rc;
}
@@ -11824,7 +9484,7 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(UnregisterTouchWindow)
#ifndef NO_UpdateWindow
JNIEXPORT jboolean JNICALL OS_NATIVE(UpdateWindow)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
OS_NATIVE_ENTER(env, that, UpdateWindow_FUNC);
@@ -11846,11 +9506,11 @@ JNIEXPORT jint JNICALL OS_NATIVE(UrlCreateFromPath)
if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)UrlCreateFromPath((LPCWSTR)lparg0, (LPWSTR)lparg1, lparg2, arg3);
+ rc = (jint)UrlCreateFromPath((LPCWSTR)lparg0, (LPWSTR)lparg1, (DWORD *)lparg2, arg3);
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
- if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+ if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, JNI_ABORT);
OS_NATIVE_EXIT(env, that, UrlCreateFromPath_FUNC);
return rc;
}
@@ -11858,7 +9518,7 @@ fail:
#ifndef NO_ValidateRect
JNIEXPORT jboolean JNICALL OS_NATIVE(ValidateRect)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+ (JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
RECT _arg1, *lparg1=NULL;
jboolean rc = 0;
@@ -11866,7 +9526,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(ValidateRect)
if (arg1) if ((lparg1 = getRECTFields(env, arg1, &_arg1)) == NULL) goto fail;
rc = (jboolean)ValidateRect((HWND)arg0, lparg1);
fail:
- if (arg1 && lparg1) setRECTFields(env, arg1, lparg1);
OS_NATIVE_EXIT(env, that, ValidateRect_FUNC);
return rc;
}
@@ -11884,1010 +9543,6 @@ JNIEXPORT jshort JNICALL OS_NATIVE(VkKeyScan)
}
#endif
-#if (!defined(NO_VtblCall__II) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER_TRY(env, that, VtblCall__II_FUNC);
-#else
- OS_NATIVE_ENTER_TRY(env, that, VtblCall__IJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong))(*(jintLong **)arg1)[arg0])(arg1);
-#ifndef JNI64
- OS_NATIVE_EXIT_CATCH(env, that, VtblCall__II_FUNC);
-#else
- OS_NATIVE_EXIT_CATCH(env, that, VtblCall__IJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__III) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__III)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__III_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJI_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__III_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJI_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIII_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJII_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIII_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJII_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIIII_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJIII_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIIII_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJIII_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIII_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5)
-#endif
-{
- jint *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIIII_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJIII_3I_FUNC);
-#endif
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIIII_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJIII_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIII_3C_3CI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJII_3C_3CI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIII_3C_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jcharArray arg4, jcharArray arg5, jint arg6)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJII_3C_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jcharArray arg4, jcharArray arg5, jint arg6)
-#endif
-{
- jchar *lparg4=NULL;
- jchar *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIII_3C_3CI_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJII_3C_3CI_FUNC);
-#endif
- if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetCharArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jchar *, jchar *, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, lparg5, arg6);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseCharArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIII_3C_3CI_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJII_3C_3CI_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIIJ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJIJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIIJ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJIJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIJI_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIJI_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4, jlongArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4, jlongArray arg5)
-#endif
-{
- jlong *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIIJI_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJIJI_3J_FUNC);
-#endif
- if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIIJI_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJIJI_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIJJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jlong arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jlong arg4)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIIJJ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJIJJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIIJJ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJIJJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__III_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__III_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3)
-#endif
-{
- jint *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__III_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJI_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__III_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJI_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__III_3I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3J_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__III_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintLongArray arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJI_3J_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintLongArray arg3, jintArray arg4)
-#endif
-{
- jintLong *lparg3=NULL;
- jint *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__III_3I_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJI_3J_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jintLong *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__III_3I_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJI_3J_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__III_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__III_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
-#endif
-{
- jlong *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__III_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJI_3J_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__III_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJI_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJI_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJI_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJI_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJI_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJII_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jintArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jintArray arg5)
-#endif
-{
- jint *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJII_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJII_3I_FUNC);
-#endif
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJII_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJII_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJII_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJII_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jlongArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jlongArray arg5)
-#endif
-{
- jlong *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJII_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJII_3J_FUNC);
-#endif
- if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJII_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJII_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJI_3C_3CJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI_3C_3CJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJI_3C_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jcharArray arg4, jcharArray arg5, jlong arg6)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJI_3C_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jcharArray arg4, jcharArray arg5, jlong arg6)
-#endif
-{
- jchar *lparg4=NULL;
- jchar *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJI_3C_3CJ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJI_3C_3CJ_FUNC);
-#endif
- if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetCharArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jchar *, jchar *, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, lparg5, arg6);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseCharArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJI_3C_3CJ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJI_3C_3CJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJJ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJJ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJJI_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJI_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jint arg4, jlongArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jint arg4, jlongArray arg5)
-#endif
-{
- jlong *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJJI_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJJI_3J_FUNC);
-#endif
- if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJJI_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJJI_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJJJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4)
-#endif
-{
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJJJ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJJJ_FUNC);
-#endif
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJJJ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJJJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJ_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJ_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jintArray arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jintArray arg3)
-#endif
-{
- jint *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJ_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJ_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJ_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJ_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJ_3I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJ_3I_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJ_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jintArray arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJ_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jintArray arg3, jintArray arg4)
-#endif
-{
- jint *lparg3=NULL;
- jint *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJ_3I_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJ_3I_3I_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJ_3I_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJ_3I_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIJ_3J_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJ_3J_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJ_3J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlongArray arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJ_3J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlongArray arg3, jlongArray arg4)
-#endif
-{
- jlong *lparg3=NULL;
- jlong *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIJ_3J_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJJ_3J_3J_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIJ_3J_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJJ_3J_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
-#endif
-{
- PROPERTYKEY _arg2, *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
-#endif
- if (arg2) if ((lparg2 = getPROPERTYKEYFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, PROPERTYKEY *, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
-fail:
- if (arg2 && lparg2) setPROPERTYKEYFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3)
-#endif
-{
- PROPERTYKEY _arg2, *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
-#endif
- if (arg2) if ((lparg2 = getPROPERTYKEYFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, PROPERTYKEY *, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
-fail:
- if (arg2 && lparg2) setPROPERTYKEYFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
-#endif
-{
- TF_DISPLAYATTRIBUTE _arg2, *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC);
-#endif
- if (arg2) if ((lparg2 = getTF_DISPLAYATTRIBUTEFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, TF_DISPLAYATTRIBUTE *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
-fail:
- if (arg2 && lparg2) setTF_DISPLAYATTRIBUTEFields(env, arg2, lparg2);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIS_3B_3B_3B) && !defined(JNI64)) || (!defined(NO_VtblCall__IJS_3B_3B_3B) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIS_3B_3B_3B)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jshort arg2, jbyteArray arg3, jbyteArray arg4, jbyteArray arg5)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJS_3B_3B_3B)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jshort arg2, jbyteArray arg3, jbyteArray arg4, jbyteArray arg5)
-#endif
-{
- jbyte *lparg3=NULL;
- jbyte *lparg4=NULL;
- jbyte *lparg5=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__IIS_3B_3B_3B_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJS_3B_3B_3B_FUNC);
-#endif
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jshort, jbyte *, jbyte *, jbyte *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4, lparg5);
-fail:
- if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
- if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__IIS_3B_3B_3B_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJS_3B_3B_3B_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3B_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3B_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3B_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyteArray arg2, jintArray arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3B_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyteArray arg2, jintArray arg3)
-#endif
-{
- jbyte *lparg2=NULL;
- jint *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3B_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3B_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jbyte *, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3B_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3B_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3B_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3B_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3B_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyteArray arg2, jlongArray arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3B_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyteArray arg2, jlongArray arg3)
-#endif
-{
- jbyte *lparg2=NULL;
- jlong *lparg3=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3B_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3B_3J_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jbyte *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3);
-fail:
- if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3B_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3B_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3C) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3C) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2)
-#endif
-{
- jchar *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3C_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3C_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3C_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3C_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3CI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3)
-#endif
-{
- jchar *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3CI_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3CI_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3CI_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3CI_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3CII_3I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CII_3I_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3CII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3CII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6)
-#endif
-{
- jchar *lparg2=NULL;
- jint *lparg5=NULL;
- jint *lparg6=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3CII_3I_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3CII_3I_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
- if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint, jint, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4, lparg5, lparg6);
-fail:
- if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3CII_3I_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3CII_3I_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3CJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3)
-#endif
-{
- jchar *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3CJ_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3CJ_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3CJ_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3CJ_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2)
-#endif
-{
- jint *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3I_3B_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3I_3B_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3I_3B_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jintArray arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3I_3B_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jintArray arg4)
-#endif
-{
- jint *lparg2=NULL;
- jbyte *lparg3=NULL;
- jint *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3I_3B_3I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3I_3B_3I_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint *, jbyte *, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3I_3B_3I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3I_3B_3I_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3I_3B_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3I_3B_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3I_3B_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jlongArray arg4)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3I_3B_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jlongArray arg4)
-#endif
-{
- jint *lparg2=NULL;
- jbyte *lparg3=NULL;
- jlong *lparg4=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3I_3B_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3I_3B_3J_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint *, jbyte *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
-fail:
- if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3I_3B_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3I_3B_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlongArray arg2)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlongArray arg2)
-#endif
-{
- jlong *lparg2=NULL;
- jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, VtblCall__II_3J_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, VtblCall__IJ_3J_FUNC);
-#endif
- if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, VtblCall__II_3J_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, VtblCall__IJ_3J_FUNC);
-#endif
- return rc;
-}
-#endif
-
#ifndef NO_WINDOWPLACEMENT_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(WINDOWPLACEMENT_1sizeof)
(JNIEnv *env, jclass that)
@@ -12936,85 +9591,74 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(WaitMessage)
}
#endif
-#if (!defined(NO_WideCharToMultiByte__II_3CIII_3B_3Z) && !defined(JNI64)) || (!defined(NO_WideCharToMultiByte__II_3CIJI_3B_3Z) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(WideCharToMultiByte__II_3CIII_3B_3Z)(JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2, jint arg3, jintLong arg4, jint arg5, jbyteArray arg6, jbooleanArray arg7)
-#else
-JNIEXPORT jint JNICALL OS_NATIVE(WideCharToMultiByte__II_3CIJI_3B_3Z)(JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2, jint arg3, jintLong arg4, jint arg5, jbyteArray arg6, jbooleanArray arg7)
-#endif
+#ifndef NO_WideCharToMultiByte__II_3CIJI_3B_3I
+JNIEXPORT jint JNICALL OS_NATIVE(WideCharToMultiByte__II_3CIJI_3B_3I)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2, jint arg3, jlong arg4, jint arg5, jbyteArray arg6, jintArray arg7)
{
jchar *lparg2=NULL;
jbyte *lparg6=NULL;
- jboolean *lparg7=NULL;
+ jint *lparg7=NULL;
jint rc = 0;
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, WideCharToMultiByte__II_3CIII_3B_3Z_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, WideCharToMultiByte__II_3CIJI_3B_3Z_FUNC);
-#endif
+ OS_NATIVE_ENTER(env, that, WideCharToMultiByte__II_3CIJI_3B_3I_FUNC);
if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
- if (arg7) if ((lparg7 = (*env)->GetBooleanArrayElements(env, arg7, NULL)) == NULL) goto fail;
+ if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail;
rc = (jint)WideCharToMultiByte(arg0, arg1, (LPCWSTR)lparg2, arg3, (LPSTR)arg4, arg5, (LPCSTR)lparg6, (LPBOOL)lparg7);
fail:
if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, JNI_ABORT);
- if (arg7 && lparg7) (*env)->ReleaseBooleanArrayElements(env, arg7, lparg7, 0);
+ if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, WideCharToMultiByte__II_3CIII_3B_3Z_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, WideCharToMultiByte__II_3CIJI_3B_3Z_FUNC);
-#endif
+ OS_NATIVE_EXIT(env, that, WideCharToMultiByte__II_3CIJI_3B_3I_FUNC);
return rc;
}
#endif
-#ifndef NO_WideCharToMultiByte__II_3CI_3BI_3B_3Z
-JNIEXPORT jint JNICALL OS_NATIVE(WideCharToMultiByte__II_3CI_3BI_3B_3Z)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2, jint arg3, jbyteArray arg4, jint arg5, jbyteArray arg6, jbooleanArray arg7)
+#ifndef NO_WideCharToMultiByte__II_3CI_3BI_3B_3I
+JNIEXPORT jint JNICALL OS_NATIVE(WideCharToMultiByte__II_3CI_3BI_3B_3I)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2, jint arg3, jbyteArray arg4, jint arg5, jbyteArray arg6, jintArray arg7)
{
jchar *lparg2=NULL;
jbyte *lparg4=NULL;
jbyte *lparg6=NULL;
- jboolean *lparg7=NULL;
+ jint *lparg7=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, WideCharToMultiByte__II_3CI_3BI_3B_3Z_FUNC);
+ OS_NATIVE_ENTER(env, that, WideCharToMultiByte__II_3CI_3BI_3B_3I_FUNC);
if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
- if (arg7) if ((lparg7 = (*env)->GetBooleanArrayElements(env, arg7, NULL)) == NULL) goto fail;
+ if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetPrimitiveArrayCritical(env, arg4, NULL)) == NULL) goto fail;
rc = (jint)WideCharToMultiByte(arg0, arg1, (LPCWSTR)lparg2, arg3, (LPSTR)lparg4, arg5, (LPCSTR)lparg6, (LPBOOL)lparg7);
fail:
if (arg4 && lparg4) (*env)->ReleasePrimitiveArrayCritical(env, arg4, lparg4, 0);
if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, JNI_ABORT);
- if (arg7 && lparg7) (*env)->ReleaseBooleanArrayElements(env, arg7, lparg7, 0);
+ if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
- OS_NATIVE_EXIT(env, that, WideCharToMultiByte__II_3CI_3BI_3B_3Z_FUNC);
+ OS_NATIVE_EXIT(env, that, WideCharToMultiByte__II_3CI_3BI_3B_3I_FUNC);
return rc;
}
#endif
#ifndef NO_WindowFromDC
-JNIEXPORT jintLong JNICALL OS_NATIVE(WindowFromDC)
- (JNIEnv *env, jclass that, jintLong arg0)
+JNIEXPORT jlong JNICALL OS_NATIVE(WindowFromDC)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, WindowFromDC_FUNC);
- rc = (jintLong)WindowFromDC((HDC)arg0);
+ rc = (jlong)WindowFromDC((HDC)arg0);
OS_NATIVE_EXIT(env, that, WindowFromDC_FUNC);
return rc;
}
#endif
#ifndef NO_WindowFromPoint
-JNIEXPORT jintLong JNICALL OS_NATIVE(WindowFromPoint)
+JNIEXPORT jlong JNICALL OS_NATIVE(WindowFromPoint)
(JNIEnv *env, jclass that, jobject arg0)
{
POINT _arg0, *lparg0=NULL;
- jintLong rc = 0;
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, WindowFromPoint_FUNC);
if (arg0) if ((lparg0 = getPOINTFields(env, arg0, &_arg0)) == NULL) goto fail;
- rc = (jintLong)WindowFromPoint(*lparg0);
+ rc = (jlong)WindowFromPoint(*lparg0);
fail:
if (arg0 && lparg0) setPOINTFields(env, arg0, lparg0);
OS_NATIVE_EXIT(env, that, WindowFromPoint_FUNC);
@@ -13024,7 +9668,7 @@ fail:
#ifndef NO_wcslen
JNIEXPORT jint JNICALL OS_NATIVE(wcslen)
- (JNIEnv *env, jclass that, jintLong arg0)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
OS_NATIVE_ENTER(env, that, wcslen_FUNC);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h
index 60808257d2..f0453030c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h
@@ -43,23 +43,4 @@
#include "os_custom.h"
-#define NATIVE_TRY(env, that, func) \
- __try {
-#define NATIVE_CATCH(env, that, func) \
- } __except(EXCEPTION_EXECUTE_HANDLER) { \
- jclass expClass = (*env)->FindClass(env, "org/eclipse/swt/SWTError"); \
- if (expClass) { \
- char buffer[64]; \
- wsprintfA(buffer, "caught native exception: 0x%x", GetExceptionCode()); \
- (*env)->ThrowNew(env, expClass, buffer); \
- } \
- }
-
-#define OS_NATIVE_ENTER_TRY(env, that, func) \
- OS_NATIVE_ENTER(env, that, func); \
- NATIVE_TRY(env, that, func);
-#define OS_NATIVE_EXIT_CATCH(env, that, func) \
- NATIVE_CATCH(env, that, func); \
- OS_NATIVE_EXIT(env, that, func);
-
#endif /* INC_os_H */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c
index e9fb072b2f..d39a7b96be 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c
@@ -23,7 +23,7 @@ HRESULT DllGetVersion(DLLVERSIONINFO *dvi)
{
dvi->dwMajorVersion = SWT_VERSION / 1000;
dvi->dwMinorVersion = SWT_VERSION % 1000;
- dvi->dwBuildNumber = SWT_REVISION;
+ dvi->dwBuildNumber = SWT_REVISION;
dvi->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
return 1;
}
@@ -38,13 +38,246 @@ BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
}
#ifndef NO_GetLibraryHandle
-JNIEXPORT jintLong JNICALL OS_NATIVE(GetLibraryHandle)
+JNIEXPORT jlong JNICALL OS_NATIVE(GetLibraryHandle)
(JNIEnv *env, jclass that)
{
- jintLong rc;
+ jlong rc;
OS_NATIVE_ENTER(env, that, GetLibraryHandle_FUNC)
- rc = (jintLong)g_hInstance;
+ rc = (jlong)g_hInstance;
OS_NATIVE_EXIT(env, that, GetLibraryHandle_FUNC)
return rc;
}
#endif
+
+BOOL Validate_AllowDarkModeForWindow(const BYTE* functionPtr)
+{
+ /*
+ * 'AllowDarkModeForWindow' is rather long, but it uses
+ * an ATOM value of 0xA91E which is unlikely to change
+ */
+
+#ifdef _M_X64
+ /* Win10 builds from 20236 */
+ if ((functionPtr[0x52] == 0xBA) && // mov edx,
+ (*(const DWORD*)(functionPtr + 0x53) == 0xA91E)) // 0A91Eh
+ {
+ return TRUE;
+ }
+
+ /* Win10 builds from 17763 to 19041 */
+ if ((functionPtr[0x15] == 0xBA) && // mov edx,
+ (*(const DWORD*)(functionPtr + 0x16) == 0xA91E)) // 0A91Eh
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+#else
+ #error Unsupported processor type
+#endif
+}
+
+typedef BOOL(WINAPI* TYPE_AllowDarkModeForWindow)(HWND a_HWND, BOOL a_Allow);
+TYPE_AllowDarkModeForWindow Locate_AllowDarkModeForWindow()
+{
+ const HMODULE hUxtheme = GetModuleHandle(L"uxtheme.dll");
+ if (!hUxtheme)
+ return 0;
+
+ /*
+ * Function is only exported by ordinal.
+ * Hopefully one day Microsoft will finally export it by name.
+ */
+ const BYTE* candidate = (const BYTE*)GetProcAddress(hUxtheme, MAKEINTRESOURCEA(133));
+ if (!candidate)
+ return 0;
+
+ /*
+ * In next Windows version, some other function can end up having this ordinal.
+ * Compare function's code to known signature to make sure.
+ */
+ if (!Validate_AllowDarkModeForWindow(candidate))
+ return 0;
+
+ return (TYPE_AllowDarkModeForWindow)candidate;
+}
+
+BOOL Validate_AllowDarkModeForWindowWithTelemetryId(const BYTE* functionPtr)
+{
+#ifdef _M_X64
+ /* This function is rather long, but it uses an ATOM value of 0xA91E which is unlikely to change */
+
+ /* Win10 builds from 21301 */
+ if ((functionPtr[0x31] == 0xBA) && // mov edx,
+ (*(const DWORD*)(functionPtr + 0x32) == 0xA91E)) // 0A91Eh
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+#else
+ #error Unsupported processor type
+#endif
+}
+
+typedef BOOL (WINAPI* TYPE_AllowDarkModeForWindowWithTelemetryId)(HWND a_HWND, BOOL a_Allow, int a_TelemetryID);
+TYPE_AllowDarkModeForWindowWithTelemetryId Locate_AllowDarkModeForWindowWithTelemetryId()
+{
+ const HMODULE hUxtheme = GetModuleHandle(L"uxtheme.dll");
+ if (!hUxtheme)
+ return 0;
+
+ /*
+ * Function is only exported by ordinal.
+ * Hopefully one day Microsoft will finally export it by name.
+ */
+ const BYTE* candidate = (const BYTE*)GetProcAddress(hUxtheme, MAKEINTRESOURCEA(140));
+ if (!candidate)
+ return 0;
+
+ /*
+ * In next Windows version, some other function can end up having this ordinal.
+ * Compare function's code to known signature to make sure.
+ */
+ if (!Validate_AllowDarkModeForWindowWithTelemetryId(candidate))
+ return 0;
+
+ return (TYPE_AllowDarkModeForWindowWithTelemetryId)candidate;
+}
+
+#ifndef NO_AllowDarkModeForWindow
+JNIEXPORT jboolean JNICALL OS_NATIVE(AllowDarkModeForWindow)
+(JNIEnv* env, jclass that, jlong arg0, jboolean arg1)
+{
+ /* Cache the search result for performance reasons */
+ static TYPE_AllowDarkModeForWindow fn_AllowDarkModeForWindow = 0;
+ static TYPE_AllowDarkModeForWindowWithTelemetryId fn_AllowDarkModeForWindowWithTelemetryId = 0;
+ static int isInitialized = 0;
+ if (!isInitialized)
+ {
+ fn_AllowDarkModeForWindow = Locate_AllowDarkModeForWindow();
+ fn_AllowDarkModeForWindowWithTelemetryId = Locate_AllowDarkModeForWindowWithTelemetryId();
+ isInitialized = 1;
+ }
+
+ if (fn_AllowDarkModeForWindow)
+ {
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, AllowDarkModeForWindow_FUNC);
+ rc = (jboolean)fn_AllowDarkModeForWindow((HWND)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, AllowDarkModeForWindow_FUNC);
+ return rc;
+ }
+
+ // In Win11, 'AllowDarkModeForWindow' is a thin wrapper for 'AllowDarkModeForWindowWithTelemetryId'.
+ // It's hard to verify the wrapper, but it's easy enough to verify the target.
+ // For this reason, call 'AllowDarkModeForWindowWithTelemetryId' here.
+ if (fn_AllowDarkModeForWindowWithTelemetryId)
+ {
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, AllowDarkModeForWindow_FUNC);
+ rc = (jboolean)fn_AllowDarkModeForWindowWithTelemetryId((HWND)arg0, arg1, 0);
+ OS_NATIVE_EXIT(env, that, AllowDarkModeForWindow_FUNC);
+ return rc;
+ }
+
+ return 0;
+}
+#endif
+
+BOOL Validate_SetPreferredAppMode(const BYTE* functionPtr)
+{
+#ifdef _M_X64
+ /*
+ * This function is very simple, so validate entire body.
+ * The only thing we don't know is the variable address.
+ */
+ const DWORD varOffset1 = *(const DWORD*)(functionPtr + 0x02);
+ const DWORD varOffset2 = *(const DWORD*)(functionPtr + 0x08);
+ if (varOffset1 != (varOffset2 + 6))
+ return FALSE;
+
+ return
+ (functionPtr[0x00] == 0x8B) && (functionPtr[0x01] == 0x05) && // mov eax,dword ptr [uxtheme!g_preferredAppMode]
+ (functionPtr[0x06] == 0x87) && (functionPtr[0x07] == 0x0D) && // xchg ecx,dword ptr [uxtheme!g_preferredAppMode]
+ (functionPtr[0x0C] == 0xC3); // ret
+#else
+ #error Unsupported processor type
+#endif
+}
+
+typedef DWORD(WINAPI* TYPE_SetPreferredAppMode)(DWORD value);
+TYPE_SetPreferredAppMode Locate_SetPreferredAppMode()
+{
+ const HMODULE hUxtheme = GetModuleHandle(L"uxtheme.dll");
+ if (!hUxtheme)
+ return 0;
+
+ /*
+ * Function is only exported by ordinal.
+ * Hopefully one day Microsoft will finally export it by name.
+ */
+ const BYTE* candidate = (const BYTE*)GetProcAddress(hUxtheme, MAKEINTRESOURCEA(135));
+ if (!candidate)
+ return 0;
+
+ /*
+ * In next Windows version, some other function can end up having this ordinal.
+ * Compare function's code to known signature to make sure.
+ */
+ if (!Validate_SetPreferredAppMode(candidate))
+ return 0;
+
+ return (TYPE_SetPreferredAppMode)candidate;
+}
+
+#ifndef NO_SetPreferredAppMode
+JNIEXPORT jint JNICALL OS_NATIVE(SetPreferredAppMode)
+(JNIEnv* env, jclass that, jint arg0)
+{
+ /* Cache the search result for performance reasons */
+ static TYPE_SetPreferredAppMode fn_SetPreferredAppMode = 0;
+ static int isInitialized = 0;
+ if (!isInitialized)
+ {
+ fn_SetPreferredAppMode = Locate_SetPreferredAppMode();
+ isInitialized = 1;
+ }
+
+ if (!fn_SetPreferredAppMode)
+ return 0;
+
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, SetPreferredAppMode_FUNC);
+ rc = (jint)fn_SetPreferredAppMode(arg0);
+ OS_NATIVE_EXIT(env, that, SetPreferredAppMode_FUNC);
+ return rc;
+}
+#endif
+
+jboolean isDarkThemeAvailable() {
+ if (!Locate_SetPreferredAppMode())
+ return JNI_FALSE;
+
+ if (!Locate_AllowDarkModeForWindow() && !Locate_AllowDarkModeForWindowWithTelemetryId())
+ return JNI_FALSE;
+
+ return JNI_TRUE;
+}
+
+#ifndef NO_IsDarkModeAvailable
+JNIEXPORT jboolean JNICALL OS_NATIVE(IsDarkModeAvailable)
+(JNIEnv* env, jclass that)
+{
+ /* Cache the search result for performance reasons */
+ static jboolean isAvailable = 0;
+ static int isInitialized = 0;
+ if (!isInitialized)
+ {
+ isAvailable = isDarkThemeAvailable();
+ isInitialized = 1;
+ }
+
+ return isAvailable;
+}
+#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h
index e3ad68a964..fe17bb57e9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h
@@ -15,16 +15,8 @@
/* Special sizeof's */
#define SCRIPT_STRING_ANALYSIS_sizeof() sizeof(SCRIPT_STRING_ANALYSIS)
#define PROPVARIANT_sizeof() sizeof(PROPVARIANT)
+#define LOGPEN_sizeof() sizeof(LOGPEN)
/* Libraries for dynamic loaded functions */
-#define CloseGestureInfoHandle_LIB "user32.dll"
-#define CloseTouchInputHandle_LIB "user32.dll"
-#define GetCurrentProcessExplicitAppUserModelID_LIB "shell32.dll"
#define GetDpiForMonitor_LIB "shcore.dll"
-#define GetGestureInfo_LIB "user32.dll"
-#define GetTouchInputInfo_LIB "user32.dll"
-#define IsTouchWindow_LIB "user32.dll"
-#define RegisterTouchWindow_LIB "user32.dll"
-#define SetCurrentProcessExplicitAppUserModelID_LIB "shell32.dll"
-#define SetGestureConfig_LIB "user32.dll"
-#define UnregisterTouchWindow_LIB "user32.dll"
+#define RtlGetVersion_LIB "ntdll.dll"
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
index 6713d7da63..927226b396 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -28,6 +28,7 @@ char * OS_nativeFunctionNames[] = {
"ActivateKeyboardLayout",
"AddFontResourceEx",
"AdjustWindowRectEx",
+ "AllowDarkModeForWindow",
"AllowSetForegroundWindow",
"AlphaBlend",
"Arc",
@@ -36,35 +37,26 @@ char * OS_nativeFunctionNames[] = {
"BITMAP_1sizeof",
"BLENDFUNCTION_1sizeof",
"BP_1PAINTPARAMS_1sizeof",
- "BROWSEINFO_1sizeof",
"BUTTON_1IMAGELIST_1sizeof",
"BeginBufferedPaint",
"BeginDeferWindowPos",
"BeginPaint",
- "BeginPath",
"BitBlt",
"BringWindowToTop",
"BufferedPaintInit",
"BufferedPaintUnInit",
"CANDIDATEFORM_1sizeof",
- "CERT_1CONTEXT_1sizeof",
- "CERT_1INFO_1sizeof",
- "CERT_1NAME_1BLOB_1sizeof",
- "CERT_1PUBLIC_1KEY_1INFO_1sizeof",
"CHOOSECOLOR_1sizeof",
"CHOOSEFONT_1sizeof",
+ "CIDA_1sizeof",
"COMBOBOXINFO_1sizeof",
"COMPOSITIONFORM_1sizeof",
"CREATESTRUCT_1sizeof",
- "CRYPT_1ALGORITHM_1IDENTIFIER_1sizeof",
- "CRYPT_1BIT_1BLOB_1sizeof",
- "CRYPT_1INTEGER_1BLOB_1sizeof",
- "CRYPT_1OBJID_1BLOB_1sizeof",
"CallNextHookEx",
"CallWindowProc",
- "CertNameToStr",
"CharLower",
"CharUpper",
+ "ChildWindowFromPointEx",
"ChooseColor",
"ChooseFont",
"ClientToScreen",
@@ -75,13 +67,11 @@ char * OS_nativeFunctionNames[] = {
"ClosePrinter",
"CloseThemeData",
"CloseTouchInputHandle",
- "CoCreateInstance",
"CoInternetIsFeatureEnabled",
"CoInternetSetFeatureEnabled",
"CoTaskMemAlloc",
"CoTaskMemFree",
"CombineRgn",
- "CommDlgExtendedError",
"CopyImage",
"CreateAcceleratorTable",
"CreateActCtx",
@@ -91,26 +81,13 @@ char * OS_nativeFunctionNames[] = {
"CreateCompatibleDC",
"CreateCursor",
"CreateDC",
-#ifndef JNI64
- "CreateDIBSection__III_3III",
-#else
"CreateDIBSection__JJI_3JJI",
-#endif
-#ifndef JNI64
- "CreateDIBSection__I_3BI_3III",
-#else
"CreateDIBSection__J_3BI_3JJI",
-#endif
"CreateEnhMetaFile",
-#ifndef JNI64
- "CreateFontIndirect__I",
-#else
"CreateFontIndirect__J",
-#endif
"CreateFontIndirect__Lorg_eclipse_swt_internal_win32_LOGFONT_2",
"CreateIconIndirect",
"CreateMenu",
- "CreatePalette",
"CreatePatternBrush",
"CreatePen",
"CreatePolygonRgn",
@@ -126,7 +103,6 @@ char * OS_nativeFunctionNames[] = {
"DOCINFO_1sizeof",
"DRAWITEMSTRUCT_1sizeof",
"DROPFILES_1sizeof",
- "DTTOPTS_1sizeof",
"DefFrameProc",
"DefMDIChildProc",
"DefWindowProc",
@@ -155,6 +131,7 @@ char * OS_nativeFunctionNames[] = {
"DrawThemeBackground",
"DrawThemeText",
"DuplicateHandle",
+ "DwmSetWindowAttribute",
"EMREXTCREATEFONTINDIRECTW_1sizeof",
"EMR_1sizeof",
"EXTLOGFONTW_1sizeof",
@@ -179,18 +156,12 @@ char * OS_nativeFunctionNames[] = {
"ExtCreateRegion",
"ExtTextOut",
"ExtractIconEx",
- "FILETIME_1sizeof",
"FLICK_1DATA_1sizeof",
"FLICK_1POINT_1sizeof",
- "FileTimeToSystemTime",
"FillRect",
- "FormatMessage",
"GCP_1RESULTS_1sizeof",
"GESTURECONFIG_1sizeof",
"GESTUREINFO_1sizeof",
- "GET_1WHEEL_1DELTA_1WPARAM",
- "GET_1X_1LPARAM",
- "GET_1Y_1LPARAM",
"GID_1ROTATE_1ANGLE_1FROM_1ARGUMENT",
"GRADIENT_1RECT_1sizeof",
"GUITHREADINFO_1sizeof",
@@ -260,35 +231,12 @@ char * OS_nativeFunctionNames[] = {
"GetModuleFileName",
"GetModuleHandle",
"GetMonitorInfo",
- "GetNearestPaletteIndex",
-#ifndef JNI64
- "GetObject__III",
-#else
"GetObject__JIJ",
-#endif
-#ifndef JNI64
- "GetObject__IILorg_eclipse_swt_internal_win32_BITMAP_2",
-#else
"GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2",
-#endif
-#ifndef JNI64
- "GetObject__IILorg_eclipse_swt_internal_win32_DIBSECTION_2",
-#else
"GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2",
-#endif
-#ifndef JNI64
- "GetObject__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2",
-#else
"GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2",
-#endif
-#ifndef JNI64
- "GetObject__IILorg_eclipse_swt_internal_win32_LOGFONT_2",
-#else
"GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2",
-#endif
- "GetOpenFileName",
"GetOutlineTextMetrics",
- "GetPaletteEntries",
"GetParent",
"GetPixel",
"GetPolyFillMode",
@@ -299,17 +247,14 @@ char * OS_nativeFunctionNames[] = {
"GetRandomRgn",
"GetRegionData",
"GetRgnBox",
- "GetSaveFileName",
"GetScrollBarInfo",
"GetScrollInfo",
"GetStartupInfo",
"GetStockObject",
"GetSysColor",
"GetSysColorBrush",
- "GetSystemDefaultUILanguage",
"GetSystemMenu",
"GetSystemMetrics",
- "GetSystemPaletteEntries",
"GetTextColor",
"GetTextExtentPoint32",
"GetTextMetrics",
@@ -342,12 +287,12 @@ char * OS_nativeFunctionNames[] = {
"HDLAYOUT_1sizeof",
"HELPINFO_1sizeof",
"HIGHCONTRAST_1sizeof",
- "HIWORD",
"HeapAlloc",
"HeapFree",
"HideCaret",
"ICONINFO_1sizeof",
"IIDFromString",
+ "ILGetSize",
"INITCOMMONCONTROLSEX_1sizeof",
"INPUT_1sizeof",
"ImageList_1Add",
@@ -366,26 +311,11 @@ char * OS_nativeFunctionNames[] = {
"ImageList_1Replace",
"ImageList_1ReplaceIcon",
"ImageList_1SetIconSize",
- "ImmAssociateContext",
- "ImmCreateContext",
- "ImmDestroyContext",
"ImmEscape",
"ImmGetCompositionFont",
-#ifndef JNI64
- "ImmGetCompositionString__II_3BI",
-#else
"ImmGetCompositionString__JI_3BI",
-#endif
-#ifndef JNI64
- "ImmGetCompositionString__II_3CI",
-#else
"ImmGetCompositionString__JI_3CI",
-#endif
-#ifndef JNI64
- "ImmGetCompositionString__II_3II",
-#else
"ImmGetCompositionString__JI_3II",
-#endif
"ImmGetContext",
"ImmGetConversionStatus",
"ImmGetDefaultIMEWnd",
@@ -397,7 +327,6 @@ char * OS_nativeFunctionNames[] = {
"ImmSetCompositionWindow",
"ImmSetConversionStatus",
"ImmSetOpenStatus",
- "InitCommonControls",
"InitCommonControlsEx",
"InsertMenuItem",
"InternetGetCookie",
@@ -408,6 +337,7 @@ char * OS_nativeFunctionNames[] = {
"InvalidateRect",
"InvalidateRgn",
"IsAppThemed",
+ "IsDarkModeAvailable",
"IsHungAppWindow",
"IsIconic",
"IsTouchWindow",
@@ -417,11 +347,9 @@ char * OS_nativeFunctionNames[] = {
"KEYBDINPUT_1sizeof",
"KillTimer",
"LITEM_1sizeof",
- "LODWORD",
"LOGBRUSH_1sizeof",
"LOGFONT_1sizeof",
"LOGPEN_1sizeof",
- "LOWORD",
"LPtoDP",
"LVCOLUMN_1sizeof",
"LVHITTESTINFO_1sizeof",
@@ -431,12 +359,9 @@ char * OS_nativeFunctionNames[] = {
"LoadBitmap",
"LoadCursor",
"LoadIcon",
+ "LoadIconMetric",
"LoadImage",
"LocalFree",
- "MAKELPARAM",
- "MAKELRESULT",
- "MAKEWORD",
- "MAKEWPARAM",
"MARGINS_1sizeof",
"MCHITTESTINFO_1sizeof",
"MEASUREITEMSTRUCT_1sizeof",
@@ -449,460 +374,98 @@ char * OS_nativeFunctionNames[] = {
"MSG_1sizeof",
"MapViewOfFile",
"MapVirtualKey",
-#ifndef JNI64
- "MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I",
-#else
"MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I",
-#endif
-#ifndef JNI64
- "MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I",
-#else
"MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I",
-#endif
"MessageBeep",
"MessageBox",
"ModifyWorldTransform",
"MonitorFromWindow",
-#ifndef JNI64
- "MoveMemory__III",
-#else
"MoveMemory__JJI",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_DEVMODE_2I",
-#else
+ "MoveMemory__JLorg_eclipse_swt_internal_win32_CIDA_2I",
"MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_GESTURECONFIG_2I",
-#else
- "MoveMemory__JLorg_eclipse_swt_internal_win32_GESTURECONFIG_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I",
-#else
- "MoveMemory__JLorg_eclipse_swt_internal_win32_KEYBDINPUT_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONT_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I",
-#else
- "MoveMemory__JLorg_eclipse_swt_internal_win32_MOUSEINPUT_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I",
-#else
- "MoveMemory__JLorg_eclipse_swt_internal_win32_OPENFILENAME_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I",
-#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I",
-#endif
-#ifndef JNI64
- "MoveMemory__I_3BI",
-#else
"MoveMemory__J_3BI",
-#endif
-#ifndef JNI64
- "MoveMemory__I_3CI",
-#else
"MoveMemory__J_3CI",
-#endif
-#ifndef JNI64
- "MoveMemory__I_3DI",
-#else
"MoveMemory__J_3DI",
-#endif
-#ifndef JNI64
- "MoveMemory__I_3FI",
-#else
"MoveMemory__J_3FI",
-#endif
-#ifndef JNI64
- "MoveMemory__I_3II",
-#else
"MoveMemory__J_3II",
-#endif
-#ifndef JNI64
- "MoveMemory__I_3JI",
-#else
"MoveMemory__J_3JI",
-#endif
-#ifndef JNI64
- "MoveMemory__I_3SI",
-#else
"MoveMemory__J_3SI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI",
-#endif
"MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2_3BI",
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2II",
-#else
- "MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2II",
-#else
- "MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2II",
-#else
+ "MoveMemory__Lorg_eclipse_swt_internal_win32_CIDA_2JI",
"MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II",
-#else
- "MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II",
-#else
- "MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI",
-#endif
"MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2_3JI",
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II",
-#else
"MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI",
-#endif
-#ifndef JNI64
- "MoveMemory___3BII",
-#else
"MoveMemory___3BJI",
-#endif
"MoveMemory___3BLorg_eclipse_swt_internal_win32_ACCEL_2I",
"MoveMemory___3BLorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2I",
-#ifndef JNI64
- "MoveMemory___3CII",
-#else
"MoveMemory___3CJI",
-#endif
-#ifndef JNI64
- "MoveMemory___3DII",
-#else
"MoveMemory___3DJI",
-#endif
-#ifndef JNI64
- "MoveMemory___3FII",
-#else
"MoveMemory___3FJI",
-#endif
-#ifndef JNI64
- "MoveMemory___3III",
-#else
"MoveMemory___3IJI",
-#endif
-#ifndef JNI64
- "MoveMemory___3JII",
-#else
"MoveMemory___3JJI",
-#endif
-#ifndef JNI64
- "MoveMemory___3SII",
-#else
"MoveMemory___3SJI",
-#endif
"MoveToEx",
-#ifndef JNI64
- "MultiByteToWideChar__IIII_3CI",
-#else
"MultiByteToWideChar__IIJI_3CI",
-#endif
"MultiByteToWideChar__II_3BI_3CI",
"NMCUSTOMDRAW_1sizeof",
"NMHDR_1sizeof",
@@ -928,8 +491,7 @@ char * OS_nativeFunctionNames[] = {
"NONCLIENTMETRICS_1sizeof",
"NOTIFYICONDATA_1V2_1SIZE",
"NotifyWinEvent",
- "OFNOTIFY_1sizeof",
- "OPENFILENAME_1sizeof",
+ "OSVERSIONINFOEX_1sizeof",
"OUTLINETEXTMETRIC_1sizeof",
"OffsetRect",
"OffsetRgn",
@@ -940,10 +502,7 @@ char * OS_nativeFunctionNames[] = {
"OpenProcess",
"OpenThemeData",
"PAINTSTRUCT_1sizeof",
- "PANOSE_1sizeof",
- "POINTSTOPOINT",
"POINT_1sizeof",
- "PRIMARYLANGID",
"PRINTDLG_1sizeof",
"PROCESS_1INFORMATION_1sizeof",
"PROPERTYKEY_1sizeof",
@@ -963,7 +522,6 @@ char * OS_nativeFunctionNames[] = {
"PtInRegion",
"REBARBANDINFO_1sizeof",
"RECT_1sizeof",
- "RealizePalette",
"RectInRegion",
"Rectangle",
"RedrawWindow",
@@ -972,16 +530,8 @@ char * OS_nativeFunctionNames[] = {
"RegDeleteValue",
"RegEnumKeyEx",
"RegOpenKeyEx",
-#ifndef JNI64
- "RegQueryValueEx__I_3CI_3I_3C_3I",
-#else
"RegQueryValueEx__J_3CJ_3I_3C_3I",
-#endif
-#ifndef JNI64
- "RegQueryValueEx__I_3CI_3I_3I_3I",
-#else
"RegQueryValueEx__J_3CJ_3I_3I_3I",
-#endif
"RegSetValueEx",
"RegisterClass",
"RegisterClipboardFormat",
@@ -994,11 +544,11 @@ char * OS_nativeFunctionNames[] = {
"ReplyMessage",
"RestoreDC",
"RoundRect",
+ "RtlGetVersion",
"SAFEARRAYBOUND_1sizeof",
"SAFEARRAY_1sizeof",
"SCRIPT_1ANALYSIS_1sizeof",
"SCRIPT_1CONTROL_1sizeof",
- "SCRIPT_1DIGITSUBSTITUTE_1sizeof",
"SCRIPT_1FONTPROPERTIES_1sizeof",
"SCRIPT_1ITEM_1sizeof",
"SCRIPT_1LOGATTR_1sizeof",
@@ -1007,16 +557,10 @@ char * OS_nativeFunctionNames[] = {
"SCRIPT_1STRING_1ANALYSIS_1sizeof",
"SCROLLBARINFO_1sizeof",
"SCROLLINFO_1sizeof",
- "SHBrowseForFolder",
- "SHCreateItemFromParsingName",
- "SHCreateItemFromRelativeName",
- "SHCreateItemInKnownFolder",
"SHDRAGIMAGE_1sizeof",
"SHELLEXECUTEINFO_1sizeof",
"SHFILEINFO_1sizeof",
"SHGetFileInfo",
- "SHGetMalloc",
- "SHGetPathFromIDList",
"SIZE_1sizeof",
"STARTUPINFO_1sizeof",
"SYSTEMTIME_1sizeof",
@@ -1035,7 +579,6 @@ char * OS_nativeFunctionNames[] = {
"ScriptJustify",
"ScriptLayout",
"ScriptPlace",
- "ScriptRecordDigitSubstitution",
"ScriptShape",
"ScriptStringAnalyse",
"ScriptStringFree",
@@ -1045,158 +588,37 @@ char * OS_nativeFunctionNames[] = {
"ScrollWindowEx",
"SelectClipRgn",
"SelectObject",
- "SelectPalette",
"SendInput",
-#ifndef JNI64
- "SendMessage__IIII",
-#else
"SendMessage__JIJJ",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_HDHITTESTINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_HDITEM_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_HDLAYOUT_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_LITEM_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_LVITEM_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_MARGINS_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_MCHITTESTINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_RECT_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_SIZE_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_SYSTEMTIME_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TCHITTESTINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TCITEM_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TVITEM_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_TVSORTCB_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2",
-#endif
-#ifndef JNI64
- "SendMessage__IIILorg_eclipse_swt_internal_win32_UDACCEL_2",
-#else
"SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2",
-#endif
-#ifndef JNI64
- "SendMessage__III_3C",
-#else
"SendMessage__JIJ_3C",
-#endif
-#ifndef JNI64
- "SendMessage__III_3I",
-#else
"SendMessage__JIJ_3I",
-#endif
-#ifndef JNI64
- "SendMessage__II_3I_3I",
-#else
"SendMessage__JI_3I_3I",
-#endif
"SetActiveWindow",
"SetBkColor",
"SetBkMode",
@@ -1207,8 +629,6 @@ char * OS_nativeFunctionNames[] = {
"SetCursor",
"SetCursorPos",
"SetDIBColorTable",
- "SetDllDirectory",
- "SetErrorMode",
"SetFocus",
"SetForegroundWindow",
"SetGestureConfig",
@@ -1220,10 +640,10 @@ char * OS_nativeFunctionNames[] = {
"SetMenuInfo",
"SetMenuItemInfo",
"SetMetaRgn",
- "SetPaletteEntries",
"SetParent",
"SetPixel",
"SetPolyFillMode",
+ "SetPreferredAppMode",
"SetProcessDPIAware",
"SetProp",
"SetROP2",
@@ -1265,12 +685,10 @@ char * OS_nativeFunctionNames[] = {
"TF_1DISPLAYATTRIBUTE_1sizeof",
"TOOLINFO_1sizeof",
"TOUCHINPUT_1sizeof",
- "TOUCH_1COORD_1TO_1PIXEL",
"TRACKMOUSEEVENT_1sizeof",
"TRIVERTEX_1sizeof",
"TVHITTESTINFO_1sizeof",
"TVINSERTSTRUCT_1sizeof",
- "TVITEMEX_1sizeof",
"TVITEM_1sizeof",
"TVSORTCB_1sizeof",
"ToUnicode",
@@ -1291,201 +709,12 @@ char * OS_nativeFunctionNames[] = {
"UrlCreateFromPath",
"ValidateRect",
"VkKeyScan",
-#ifndef JNI64
- "VtblCall__II",
-#else
- "VtblCall__IJ",
-#endif
-#ifndef JNI64
- "VtblCall__III",
-#else
- "VtblCall__IJI",
-#endif
-#ifndef JNI64
- "VtblCall__IIII",
-#else
- "VtblCall__IJII",
-#endif
-#ifndef JNI64
- "VtblCall__IIIII",
-#else
- "VtblCall__IJIII",
-#endif
-#ifndef JNI64
- "VtblCall__IIIII_3I",
-#else
- "VtblCall__IJIII_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIII_3C_3CI",
-#else
- "VtblCall__IJII_3C_3CI",
-#endif
-#ifndef JNI64
- "VtblCall__IIIJ",
-#else
- "VtblCall__IJIJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIIJI_3J",
-#else
- "VtblCall__IJIJI_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIIJJ",
-#else
- "VtblCall__IJIJJ",
-#endif
-#ifndef JNI64
- "VtblCall__III_3I",
-#else
- "VtblCall__IJI_3I",
-#endif
-#ifndef JNI64
- "VtblCall__III_3I_3I",
-#else
- "VtblCall__IJI_3J_3I",
-#endif
-#ifndef JNI64
- "VtblCall__III_3J",
-#else
- "VtblCall__IJI_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJ",
-#else
- "VtblCall__IJJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIJI",
-#else
- "VtblCall__IJJI",
-#endif
-#ifndef JNI64
- "VtblCall__IIJII_3I",
-#else
- "VtblCall__IJJII_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIJII_3J",
-#else
- "VtblCall__IJJII_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJI_3C_3CJ",
-#else
- "VtblCall__IJJI_3C_3CJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIJJ",
-#else
- "VtblCall__IJJJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIJJI_3J",
-#else
- "VtblCall__IJJJI_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IIJJJ",
-#else
- "VtblCall__IJJJJ",
-#endif
-#ifndef JNI64
- "VtblCall__IIJ_3I",
-#else
- "VtblCall__IJJ_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIJ_3I_3I",
-#else
- "VtblCall__IJJ_3I_3I",
-#endif
-#ifndef JNI64
- "VtblCall__IIJ_3J_3J",
-#else
- "VtblCall__IJJ_3J_3J",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J",
-#endif
-#ifndef JNI64
- "VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2",
-#else
- "VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2",
-#endif
-#ifndef JNI64
- "VtblCall__IIS_3B_3B_3B",
-#else
- "VtblCall__IJS_3B_3B_3B",
-#endif
-#ifndef JNI64
- "VtblCall__II_3B_3I",
-#else
- "VtblCall__IJ_3B_3I",
-#endif
-#ifndef JNI64
- "VtblCall__II_3B_3J",
-#else
- "VtblCall__IJ_3B_3J",
-#endif
-#ifndef JNI64
- "VtblCall__II_3C",
-#else
- "VtblCall__IJ_3C",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CI",
-#else
- "VtblCall__IJ_3CI",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CII_3I_3I",
-#else
- "VtblCall__IJ_3CII_3I_3I",
-#endif
-#ifndef JNI64
- "VtblCall__II_3CJ",
-#else
- "VtblCall__IJ_3CJ",
-#endif
-#ifndef JNI64
- "VtblCall__II_3I",
-#else
- "VtblCall__IJ_3I",
-#endif
-#ifndef JNI64
- "VtblCall__II_3I_3B_3I",
-#else
- "VtblCall__IJ_3I_3B_3I",
-#endif
-#ifndef JNI64
- "VtblCall__II_3I_3B_3J",
-#else
- "VtblCall__IJ_3I_3B_3J",
-#endif
-#ifndef JNI64
- "VtblCall__II_3J",
-#else
- "VtblCall__IJ_3J",
-#endif
"WINDOWPLACEMENT_1sizeof",
"WINDOWPOS_1sizeof",
"WNDCLASS_1sizeof",
"WaitMessage",
-#ifndef JNI64
- "WideCharToMultiByte__II_3CIII_3B_3Z",
-#else
- "WideCharToMultiByte__II_3CIJI_3B_3Z",
-#endif
- "WideCharToMultiByte__II_3CI_3BI_3B_3Z",
+ "WideCharToMultiByte__II_3CIJI_3B_3I",
+ "WideCharToMultiByte__II_3CI_3BI_3B_3I",
"WindowFromDC",
"WindowFromPoint",
"wcslen",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
index 8e2fb4ee60..f1417d6928 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,6 +38,7 @@ typedef enum {
ActivateKeyboardLayout_FUNC,
AddFontResourceEx_FUNC,
AdjustWindowRectEx_FUNC,
+ AllowDarkModeForWindow_FUNC,
AllowSetForegroundWindow_FUNC,
AlphaBlend_FUNC,
Arc_FUNC,
@@ -46,35 +47,26 @@ typedef enum {
BITMAP_1sizeof_FUNC,
BLENDFUNCTION_1sizeof_FUNC,
BP_1PAINTPARAMS_1sizeof_FUNC,
- BROWSEINFO_1sizeof_FUNC,
BUTTON_1IMAGELIST_1sizeof_FUNC,
BeginBufferedPaint_FUNC,
BeginDeferWindowPos_FUNC,
BeginPaint_FUNC,
- BeginPath_FUNC,
BitBlt_FUNC,
BringWindowToTop_FUNC,
BufferedPaintInit_FUNC,
BufferedPaintUnInit_FUNC,
CANDIDATEFORM_1sizeof_FUNC,
- CERT_1CONTEXT_1sizeof_FUNC,
- CERT_1INFO_1sizeof_FUNC,
- CERT_1NAME_1BLOB_1sizeof_FUNC,
- CERT_1PUBLIC_1KEY_1INFO_1sizeof_FUNC,
CHOOSECOLOR_1sizeof_FUNC,
CHOOSEFONT_1sizeof_FUNC,
+ CIDA_1sizeof_FUNC,
COMBOBOXINFO_1sizeof_FUNC,
COMPOSITIONFORM_1sizeof_FUNC,
CREATESTRUCT_1sizeof_FUNC,
- CRYPT_1ALGORITHM_1IDENTIFIER_1sizeof_FUNC,
- CRYPT_1BIT_1BLOB_1sizeof_FUNC,
- CRYPT_1INTEGER_1BLOB_1sizeof_FUNC,
- CRYPT_1OBJID_1BLOB_1sizeof_FUNC,
CallNextHookEx_FUNC,
CallWindowProc_FUNC,
- CertNameToStr_FUNC,
CharLower_FUNC,
CharUpper_FUNC,
+ ChildWindowFromPointEx_FUNC,
ChooseColor_FUNC,
ChooseFont_FUNC,
ClientToScreen_FUNC,
@@ -85,13 +77,11 @@ typedef enum {
ClosePrinter_FUNC,
CloseThemeData_FUNC,
CloseTouchInputHandle_FUNC,
- CoCreateInstance_FUNC,
CoInternetIsFeatureEnabled_FUNC,
CoInternetSetFeatureEnabled_FUNC,
CoTaskMemAlloc_FUNC,
CoTaskMemFree_FUNC,
CombineRgn_FUNC,
- CommDlgExtendedError_FUNC,
CopyImage_FUNC,
CreateAcceleratorTable_FUNC,
CreateActCtx_FUNC,
@@ -101,26 +91,13 @@ typedef enum {
CreateCompatibleDC_FUNC,
CreateCursor_FUNC,
CreateDC_FUNC,
-#ifndef JNI64
- CreateDIBSection__III_3III_FUNC,
-#else
CreateDIBSection__JJI_3JJI_FUNC,
-#endif
-#ifndef JNI64
- CreateDIBSection__I_3BI_3III_FUNC,
-#else
CreateDIBSection__J_3BI_3JJI_FUNC,
-#endif
CreateEnhMetaFile_FUNC,
-#ifndef JNI64
- CreateFontIndirect__I_FUNC,
-#else
CreateFontIndirect__J_FUNC,
-#endif
CreateFontIndirect__Lorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC,
CreateIconIndirect_FUNC,
CreateMenu_FUNC,
- CreatePalette_FUNC,
CreatePatternBrush_FUNC,
CreatePen_FUNC,
CreatePolygonRgn_FUNC,
@@ -136,7 +113,6 @@ typedef enum {
DOCINFO_1sizeof_FUNC,
DRAWITEMSTRUCT_1sizeof_FUNC,
DROPFILES_1sizeof_FUNC,
- DTTOPTS_1sizeof_FUNC,
DefFrameProc_FUNC,
DefMDIChildProc_FUNC,
DefWindowProc_FUNC,
@@ -165,6 +141,7 @@ typedef enum {
DrawThemeBackground_FUNC,
DrawThemeText_FUNC,
DuplicateHandle_FUNC,
+ DwmSetWindowAttribute_FUNC,
EMREXTCREATEFONTINDIRECTW_1sizeof_FUNC,
EMR_1sizeof_FUNC,
EXTLOGFONTW_1sizeof_FUNC,
@@ -189,18 +166,12 @@ typedef enum {
ExtCreateRegion_FUNC,
ExtTextOut_FUNC,
ExtractIconEx_FUNC,
- FILETIME_1sizeof_FUNC,
FLICK_1DATA_1sizeof_FUNC,
FLICK_1POINT_1sizeof_FUNC,
- FileTimeToSystemTime_FUNC,
FillRect_FUNC,
- FormatMessage_FUNC,
GCP_1RESULTS_1sizeof_FUNC,
GESTURECONFIG_1sizeof_FUNC,
GESTUREINFO_1sizeof_FUNC,
- GET_1WHEEL_1DELTA_1WPARAM_FUNC,
- GET_1X_1LPARAM_FUNC,
- GET_1Y_1LPARAM_FUNC,
GID_1ROTATE_1ANGLE_1FROM_1ARGUMENT_FUNC,
GRADIENT_1RECT_1sizeof_FUNC,
GUITHREADINFO_1sizeof_FUNC,
@@ -270,35 +241,12 @@ typedef enum {
GetModuleFileName_FUNC,
GetModuleHandle_FUNC,
GetMonitorInfo_FUNC,
- GetNearestPaletteIndex_FUNC,
-#ifndef JNI64
- GetObject__III_FUNC,
-#else
GetObject__JIJ_FUNC,
-#endif
-#ifndef JNI64
- GetObject__IILorg_eclipse_swt_internal_win32_BITMAP_2_FUNC,
-#else
GetObject__JILorg_eclipse_swt_internal_win32_BITMAP_2_FUNC,
-#endif
-#ifndef JNI64
- GetObject__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_FUNC,
-#else
GetObject__JILorg_eclipse_swt_internal_win32_DIBSECTION_2_FUNC,
-#endif
-#ifndef JNI64
- GetObject__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_FUNC,
-#else
GetObject__JILorg_eclipse_swt_internal_win32_LOGBRUSH_2_FUNC,
-#endif
-#ifndef JNI64
- GetObject__IILorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC,
-#else
GetObject__JILorg_eclipse_swt_internal_win32_LOGFONT_2_FUNC,
-#endif
- GetOpenFileName_FUNC,
GetOutlineTextMetrics_FUNC,
- GetPaletteEntries_FUNC,
GetParent_FUNC,
GetPixel_FUNC,
GetPolyFillMode_FUNC,
@@ -309,17 +257,14 @@ typedef enum {
GetRandomRgn_FUNC,
GetRegionData_FUNC,
GetRgnBox_FUNC,
- GetSaveFileName_FUNC,
GetScrollBarInfo_FUNC,
GetScrollInfo_FUNC,
GetStartupInfo_FUNC,
GetStockObject_FUNC,
GetSysColor_FUNC,
GetSysColorBrush_FUNC,
- GetSystemDefaultUILanguage_FUNC,
GetSystemMenu_FUNC,
GetSystemMetrics_FUNC,
- GetSystemPaletteEntries_FUNC,
GetTextColor_FUNC,
GetTextExtentPoint32_FUNC,
GetTextMetrics_FUNC,
@@ -352,12 +297,12 @@ typedef enum {
HDLAYOUT_1sizeof_FUNC,
HELPINFO_1sizeof_FUNC,
HIGHCONTRAST_1sizeof_FUNC,
- HIWORD_FUNC,
HeapAlloc_FUNC,
HeapFree_FUNC,
HideCaret_FUNC,
ICONINFO_1sizeof_FUNC,
IIDFromString_FUNC,
+ ILGetSize_FUNC,
INITCOMMONCONTROLSEX_1sizeof_FUNC,
INPUT_1sizeof_FUNC,
ImageList_1Add_FUNC,
@@ -376,26 +321,11 @@ typedef enum {
ImageList_1Replace_FUNC,
ImageList_1ReplaceIcon_FUNC,
ImageList_1SetIconSize_FUNC,
- ImmAssociateContext_FUNC,
- ImmCreateContext_FUNC,
- ImmDestroyContext_FUNC,
ImmEscape_FUNC,
ImmGetCompositionFont_FUNC,
-#ifndef JNI64
- ImmGetCompositionString__II_3BI_FUNC,
-#else
ImmGetCompositionString__JI_3BI_FUNC,
-#endif
-#ifndef JNI64
- ImmGetCompositionString__II_3CI_FUNC,
-#else
ImmGetCompositionString__JI_3CI_FUNC,
-#endif
-#ifndef JNI64
- ImmGetCompositionString__II_3II_FUNC,
-#else
ImmGetCompositionString__JI_3II_FUNC,
-#endif
ImmGetContext_FUNC,
ImmGetConversionStatus_FUNC,
ImmGetDefaultIMEWnd_FUNC,
@@ -407,7 +337,6 @@ typedef enum {
ImmSetCompositionWindow_FUNC,
ImmSetConversionStatus_FUNC,
ImmSetOpenStatus_FUNC,
- InitCommonControls_FUNC,
InitCommonControlsEx_FUNC,
InsertMenuItem_FUNC,
InternetGetCookie_FUNC,
@@ -418,6 +347,7 @@ typedef enum {
InvalidateRect_FUNC,
InvalidateRgn_FUNC,
IsAppThemed_FUNC,
+ IsDarkModeAvailable_FUNC,
IsHungAppWindow_FUNC,
IsIconic_FUNC,
IsTouchWindow_FUNC,
@@ -427,11 +357,9 @@ typedef enum {
KEYBDINPUT_1sizeof_FUNC,
KillTimer_FUNC,
LITEM_1sizeof_FUNC,
- LODWORD_FUNC,
LOGBRUSH_1sizeof_FUNC,
LOGFONT_1sizeof_FUNC,
LOGPEN_1sizeof_FUNC,
- LOWORD_FUNC,
LPtoDP_FUNC,
LVCOLUMN_1sizeof_FUNC,
LVHITTESTINFO_1sizeof_FUNC,
@@ -441,12 +369,9 @@ typedef enum {
LoadBitmap_FUNC,
LoadCursor_FUNC,
LoadIcon_FUNC,
+ LoadIconMetric_FUNC,
LoadImage_FUNC,
LocalFree_FUNC,
- MAKELPARAM_FUNC,
- MAKELRESULT_FUNC,
- MAKEWORD_FUNC,
- MAKEWPARAM_FUNC,
MARGINS_1sizeof_FUNC,
MCHITTESTINFO_1sizeof_FUNC,
MEASUREITEMSTRUCT_1sizeof_FUNC,
@@ -459,460 +384,98 @@ typedef enum {
MSG_1sizeof_FUNC,
MapViewOfFile_FUNC,
MapVirtualKey_FUNC,
-#ifndef JNI64
- MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#else
MapWindowPoints__JJLorg_eclipse_swt_internal_win32_POINT_2I_FUNC,
-#endif
-#ifndef JNI64
- MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I_FUNC,
-#else
MapWindowPoints__JJLorg_eclipse_swt_internal_win32_RECT_2I_FUNC,
-#endif
MessageBeep_FUNC,
MessageBox_FUNC,
ModifyWorldTransform_FUNC,
MonitorFromWindow_FUNC,
-#ifndef JNI64
- MoveMemory__III_FUNC,
-#else
MoveMemory__JJI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_DEVMODE_2I_FUNC,
-#else
+ MoveMemory__JLorg_eclipse_swt_internal_win32_CIDA_2I_FUNC,
MoveMemory__JLorg_eclipse_swt_internal_win32_DEVMODE_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_DROPFILES_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_GESTURECONFIG_2I_FUNC,
-#else
- MoveMemory__JLorg_eclipse_swt_internal_win32_GESTURECONFIG_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_FUNC,
-#else
- MoveMemory__JLorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONT_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_LOGFONT_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_MINMAXINFO_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_FUNC,
-#else
- MoveMemory__JLorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_MSG_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_NMTTDISPINFO_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC,
-#else
- MoveMemory__JLorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_TRIVERTEX_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_UDACCEL_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I_FUNC,
-#else
MoveMemory__JLorg_eclipse_swt_internal_win32_WINDOWPOS_2I_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__I_3BI_FUNC,
-#else
MoveMemory__J_3BI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__I_3CI_FUNC,
-#else
MoveMemory__J_3CI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__I_3DI_FUNC,
-#else
MoveMemory__J_3DI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__I_3FI_FUNC,
-#else
MoveMemory__J_3FI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__I_3II_FUNC,
-#else
MoveMemory__J_3II_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__I_3JI_FUNC,
-#else
MoveMemory__J_3JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__I_3SI_FUNC,
-#else
MoveMemory__J_3SI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2JI_FUNC,
-#endif
MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2_3BI_FUNC,
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2II_FUNC,
-#else
- MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1CONTEXT_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2II_FUNC,
-#else
- MoveMemory__Lorg_eclipse_swt_internal_win32_CERT_1INFO_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2II_FUNC,
-#else
+ MoveMemory__Lorg_eclipse_swt_internal_win32_CIDA_2JI_FUNC,
MoveMemory__Lorg_eclipse_swt_internal_win32_DEVMODE_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_DOCHOSTUIINFO_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_EMREXTCREATEFONTINDIRECTW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_EMR_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1DATA_2_3JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_FLICK_1POINT_2_3JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONT_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMLINK_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVODSTATECHANGE_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHILDSIZE_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBCUSTOMDRAW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTBHOTITEM_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTREEVIEW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTCUSTOMDRAW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFO_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_FUNC,
-#else
- MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_FUNC,
-#else
- MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2JI_FUNC,
-#endif
MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2_3JI_FUNC,
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_SAFEARRAY_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_TEXTMETRIC_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_TOUCHINPUT_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_UDACCEL_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II_FUNC,
-#else
MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2JI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory___3BII_FUNC,
-#else
MoveMemory___3BJI_FUNC,
-#endif
MoveMemory___3BLorg_eclipse_swt_internal_win32_ACCEL_2I_FUNC,
MoveMemory___3BLorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2I_FUNC,
-#ifndef JNI64
- MoveMemory___3CII_FUNC,
-#else
MoveMemory___3CJI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory___3DII_FUNC,
-#else
MoveMemory___3DJI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory___3FII_FUNC,
-#else
MoveMemory___3FJI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory___3III_FUNC,
-#else
MoveMemory___3IJI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory___3JII_FUNC,
-#else
MoveMemory___3JJI_FUNC,
-#endif
-#ifndef JNI64
- MoveMemory___3SII_FUNC,
-#else
MoveMemory___3SJI_FUNC,
-#endif
MoveToEx_FUNC,
-#ifndef JNI64
- MultiByteToWideChar__IIII_3CI_FUNC,
-#else
MultiByteToWideChar__IIJI_3CI_FUNC,
-#endif
MultiByteToWideChar__II_3BI_3CI_FUNC,
NMCUSTOMDRAW_1sizeof_FUNC,
NMHDR_1sizeof_FUNC,
@@ -938,8 +501,7 @@ typedef enum {
NONCLIENTMETRICS_1sizeof_FUNC,
NOTIFYICONDATA_1V2_1SIZE_FUNC,
NotifyWinEvent_FUNC,
- OFNOTIFY_1sizeof_FUNC,
- OPENFILENAME_1sizeof_FUNC,
+ OSVERSIONINFOEX_1sizeof_FUNC,
OUTLINETEXTMETRIC_1sizeof_FUNC,
OffsetRect_FUNC,
OffsetRgn_FUNC,
@@ -950,10 +512,7 @@ typedef enum {
OpenProcess_FUNC,
OpenThemeData_FUNC,
PAINTSTRUCT_1sizeof_FUNC,
- PANOSE_1sizeof_FUNC,
- POINTSTOPOINT_FUNC,
POINT_1sizeof_FUNC,
- PRIMARYLANGID_FUNC,
PRINTDLG_1sizeof_FUNC,
PROCESS_1INFORMATION_1sizeof_FUNC,
PROPERTYKEY_1sizeof_FUNC,
@@ -973,7 +532,6 @@ typedef enum {
PtInRegion_FUNC,
REBARBANDINFO_1sizeof_FUNC,
RECT_1sizeof_FUNC,
- RealizePalette_FUNC,
RectInRegion_FUNC,
Rectangle_FUNC,
RedrawWindow_FUNC,
@@ -982,16 +540,8 @@ typedef enum {
RegDeleteValue_FUNC,
RegEnumKeyEx_FUNC,
RegOpenKeyEx_FUNC,
-#ifndef JNI64
- RegQueryValueEx__I_3CI_3I_3C_3I_FUNC,
-#else
RegQueryValueEx__J_3CJ_3I_3C_3I_FUNC,
-#endif
-#ifndef JNI64
- RegQueryValueEx__I_3CI_3I_3I_3I_FUNC,
-#else
RegQueryValueEx__J_3CJ_3I_3I_3I_FUNC,
-#endif
RegSetValueEx_FUNC,
RegisterClass_FUNC,
RegisterClipboardFormat_FUNC,
@@ -1004,11 +554,11 @@ typedef enum {
ReplyMessage_FUNC,
RestoreDC_FUNC,
RoundRect_FUNC,
+ RtlGetVersion_FUNC,
SAFEARRAYBOUND_1sizeof_FUNC,
SAFEARRAY_1sizeof_FUNC,
SCRIPT_1ANALYSIS_1sizeof_FUNC,
SCRIPT_1CONTROL_1sizeof_FUNC,
- SCRIPT_1DIGITSUBSTITUTE_1sizeof_FUNC,
SCRIPT_1FONTPROPERTIES_1sizeof_FUNC,
SCRIPT_1ITEM_1sizeof_FUNC,
SCRIPT_1LOGATTR_1sizeof_FUNC,
@@ -1017,16 +567,10 @@ typedef enum {
SCRIPT_1STRING_1ANALYSIS_1sizeof_FUNC,
SCROLLBARINFO_1sizeof_FUNC,
SCROLLINFO_1sizeof_FUNC,
- SHBrowseForFolder_FUNC,
- SHCreateItemFromParsingName_FUNC,
- SHCreateItemFromRelativeName_FUNC,
- SHCreateItemInKnownFolder_FUNC,
SHDRAGIMAGE_1sizeof_FUNC,
SHELLEXECUTEINFO_1sizeof_FUNC,
SHFILEINFO_1sizeof_FUNC,
SHGetFileInfo_FUNC,
- SHGetMalloc_FUNC,
- SHGetPathFromIDList_FUNC,
SIZE_1sizeof_FUNC,
STARTUPINFO_1sizeof_FUNC,
SYSTEMTIME_1sizeof_FUNC,
@@ -1045,7 +589,6 @@ typedef enum {
ScriptJustify_FUNC,
ScriptLayout_FUNC,
ScriptPlace_FUNC,
- ScriptRecordDigitSubstitution_FUNC,
ScriptShape_FUNC,
ScriptStringAnalyse_FUNC,
ScriptStringFree_FUNC,
@@ -1055,158 +598,37 @@ typedef enum {
ScrollWindowEx_FUNC,
SelectClipRgn_FUNC,
SelectObject_FUNC,
- SelectPalette_FUNC,
SendInput_FUNC,
-#ifndef JNI64
- SendMessage__IIII_FUNC,
-#else
SendMessage__JIJJ_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_HDHITTESTINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_HDHITTESTINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_HDITEM_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_HDITEM_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_HDLAYOUT_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_HDLAYOUT_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_LITEM_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_LITEM_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_LVCOLUMN_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_LVITEM_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_LVITEM_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_MARGINS_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_MARGINS_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_MCHITTESTINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_MCHITTESTINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_REBARBANDINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_RECT_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_SIZE_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_SIZE_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_SYSTEMTIME_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_SYSTEMTIME_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TBBUTTON_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TCHITTESTINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TCHITTESTINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TCITEM_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TCITEM_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TOOLINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TVITEM_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TVITEM_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_TVSORTCB_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_TVSORTCB_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__IIILorg_eclipse_swt_internal_win32_UDACCEL_2_FUNC,
-#else
SendMessage__JIJLorg_eclipse_swt_internal_win32_UDACCEL_2_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__III_3C_FUNC,
-#else
SendMessage__JIJ_3C_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__III_3I_FUNC,
-#else
SendMessage__JIJ_3I_FUNC,
-#endif
-#ifndef JNI64
- SendMessage__II_3I_3I_FUNC,
-#else
SendMessage__JI_3I_3I_FUNC,
-#endif
SetActiveWindow_FUNC,
SetBkColor_FUNC,
SetBkMode_FUNC,
@@ -1217,8 +639,6 @@ typedef enum {
SetCursor_FUNC,
SetCursorPos_FUNC,
SetDIBColorTable_FUNC,
- SetDllDirectory_FUNC,
- SetErrorMode_FUNC,
SetFocus_FUNC,
SetForegroundWindow_FUNC,
SetGestureConfig_FUNC,
@@ -1230,10 +650,10 @@ typedef enum {
SetMenuInfo_FUNC,
SetMenuItemInfo_FUNC,
SetMetaRgn_FUNC,
- SetPaletteEntries_FUNC,
SetParent_FUNC,
SetPixel_FUNC,
SetPolyFillMode_FUNC,
+ SetPreferredAppMode_FUNC,
SetProcessDPIAware_FUNC,
SetProp_FUNC,
SetROP2_FUNC,
@@ -1275,12 +695,10 @@ typedef enum {
TF_1DISPLAYATTRIBUTE_1sizeof_FUNC,
TOOLINFO_1sizeof_FUNC,
TOUCHINPUT_1sizeof_FUNC,
- TOUCH_1COORD_1TO_1PIXEL_FUNC,
TRACKMOUSEEVENT_1sizeof_FUNC,
TRIVERTEX_1sizeof_FUNC,
TVHITTESTINFO_1sizeof_FUNC,
TVINSERTSTRUCT_1sizeof_FUNC,
- TVITEMEX_1sizeof_FUNC,
TVITEM_1sizeof_FUNC,
TVSORTCB_1sizeof_FUNC,
ToUnicode_FUNC,
@@ -1301,201 +719,12 @@ typedef enum {
UrlCreateFromPath_FUNC,
ValidateRect_FUNC,
VkKeyScan_FUNC,
-#ifndef JNI64
- VtblCall__II_FUNC,
-#else
- VtblCall__IJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_FUNC,
-#else
- VtblCall__IJI_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIII_FUNC,
-#else
- VtblCall__IJII_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIII_FUNC,
-#else
- VtblCall__IJIII_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIII_3I_FUNC,
-#else
- VtblCall__IJIII_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIII_3C_3CI_FUNC,
-#else
- VtblCall__IJII_3C_3CI_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIJ_FUNC,
-#else
- VtblCall__IJIJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIJI_3J_FUNC,
-#else
- VtblCall__IJIJI_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIIJJ_FUNC,
-#else
- VtblCall__IJIJJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_3I_FUNC,
-#else
- VtblCall__IJI_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_3I_3I_FUNC,
-#else
- VtblCall__IJI_3J_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__III_3J_FUNC,
-#else
- VtblCall__IJI_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJ_FUNC,
-#else
- VtblCall__IJJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJI_FUNC,
-#else
- VtblCall__IJJI_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJII_3I_FUNC,
-#else
- VtblCall__IJJII_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJII_3J_FUNC,
-#else
- VtblCall__IJJII_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJI_3C_3CJ_FUNC,
-#else
- VtblCall__IJJI_3C_3CJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJJ_FUNC,
-#else
- VtblCall__IJJJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJJI_3J_FUNC,
-#else
- VtblCall__IJJJI_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJJJ_FUNC,
-#else
- VtblCall__IJJJJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJ_3I_FUNC,
-#else
- VtblCall__IJJ_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJ_3I_3I_FUNC,
-#else
- VtblCall__IJJ_3I_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIJ_3J_3J_FUNC,
-#else
- VtblCall__IJJ_3J_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC,
-#else
- VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__IIS_3B_3B_3B_FUNC,
-#else
- VtblCall__IJS_3B_3B_3B_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3B_3I_FUNC,
-#else
- VtblCall__IJ_3B_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3B_3J_FUNC,
-#else
- VtblCall__IJ_3B_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3C_FUNC,
-#else
- VtblCall__IJ_3C_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CI_FUNC,
-#else
- VtblCall__IJ_3CI_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CII_3I_3I_FUNC,
-#else
- VtblCall__IJ_3CII_3I_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3CJ_FUNC,
-#else
- VtblCall__IJ_3CJ_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3I_FUNC,
-#else
- VtblCall__IJ_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3I_3B_3I_FUNC,
-#else
- VtblCall__IJ_3I_3B_3I_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3I_3B_3J_FUNC,
-#else
- VtblCall__IJ_3I_3B_3J_FUNC,
-#endif
-#ifndef JNI64
- VtblCall__II_3J_FUNC,
-#else
- VtblCall__IJ_3J_FUNC,
-#endif
WINDOWPLACEMENT_1sizeof_FUNC,
WINDOWPOS_1sizeof_FUNC,
WNDCLASS_1sizeof_FUNC,
WaitMessage_FUNC,
-#ifndef JNI64
- WideCharToMultiByte__II_3CIII_3B_3Z_FUNC,
-#else
- WideCharToMultiByte__II_3CIJI_3B_3Z_FUNC,
-#endif
- WideCharToMultiByte__II_3CI_3BI_3B_3Z_FUNC,
+ WideCharToMultiByte__II_3CIJI_3B_3I_FUNC,
+ WideCharToMultiByte__II_3CI_3BI_3B_3I_FUNC,
WindowFromDC_FUNC,
WindowFromPoint_FUNC,
wcslen_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
index 0f420fa214..b7a6f7ec6b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -70,13 +70,13 @@ void cacheACTCTXFields(JNIEnv *env, jobject lpObject)
ACTCTXFc.clazz = (*env)->GetObjectClass(env, lpObject);
ACTCTXFc.cbSize = (*env)->GetFieldID(env, ACTCTXFc.clazz, "cbSize", "I");
ACTCTXFc.dwFlags = (*env)->GetFieldID(env, ACTCTXFc.clazz, "dwFlags", "I");
- ACTCTXFc.lpSource = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpSource", I_J);
+ ACTCTXFc.lpSource = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpSource", "J");
ACTCTXFc.wProcessorArchitecture = (*env)->GetFieldID(env, ACTCTXFc.clazz, "wProcessorArchitecture", "S");
ACTCTXFc.wLangId = (*env)->GetFieldID(env, ACTCTXFc.clazz, "wLangId", "S");
- ACTCTXFc.lpAssemblyDirectory = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpAssemblyDirectory", I_J);
- ACTCTXFc.lpResourceName = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpResourceName", I_J);
- ACTCTXFc.lpApplicationName = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpApplicationName", I_J);
- ACTCTXFc.hModule = (*env)->GetFieldID(env, ACTCTXFc.clazz, "hModule", I_J);
+ ACTCTXFc.lpAssemblyDirectory = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpAssemblyDirectory", "J");
+ ACTCTXFc.lpResourceName = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpResourceName", "J");
+ ACTCTXFc.lpApplicationName = (*env)->GetFieldID(env, ACTCTXFc.clazz, "lpApplicationName", "J");
+ ACTCTXFc.hModule = (*env)->GetFieldID(env, ACTCTXFc.clazz, "hModule", "J");
ACTCTXFc.cached = 1;
}
@@ -85,13 +85,13 @@ ACTCTX *getACTCTXFields(JNIEnv *env, jobject lpObject, ACTCTX *lpStruct)
if (!ACTCTXFc.cached) cacheACTCTXFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, ACTCTXFc.cbSize);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, ACTCTXFc.dwFlags);
- lpStruct->lpSource = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, ACTCTXFc.lpSource);
+ lpStruct->lpSource = (LPCTSTR)(*env)->GetLongField(env, lpObject, ACTCTXFc.lpSource);
lpStruct->wProcessorArchitecture = (*env)->GetShortField(env, lpObject, ACTCTXFc.wProcessorArchitecture);
lpStruct->wLangId = (*env)->GetShortField(env, lpObject, ACTCTXFc.wLangId);
- lpStruct->lpAssemblyDirectory = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, ACTCTXFc.lpAssemblyDirectory);
- lpStruct->lpResourceName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, ACTCTXFc.lpResourceName);
- lpStruct->lpApplicationName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, ACTCTXFc.lpApplicationName);
- lpStruct->hModule = (HMODULE)(*env)->GetIntLongField(env, lpObject, ACTCTXFc.hModule);
+ lpStruct->lpAssemblyDirectory = (LPCTSTR)(*env)->GetLongField(env, lpObject, ACTCTXFc.lpAssemblyDirectory);
+ lpStruct->lpResourceName = (LPCTSTR)(*env)->GetLongField(env, lpObject, ACTCTXFc.lpResourceName);
+ lpStruct->lpApplicationName = (LPCTSTR)(*env)->GetLongField(env, lpObject, ACTCTXFc.lpApplicationName);
+ lpStruct->hModule = (HMODULE)(*env)->GetLongField(env, lpObject, ACTCTXFc.hModule);
return lpStruct;
}
@@ -100,13 +100,13 @@ void setACTCTXFields(JNIEnv *env, jobject lpObject, ACTCTX *lpStruct)
if (!ACTCTXFc.cached) cacheACTCTXFields(env, lpObject);
(*env)->SetIntField(env, lpObject, ACTCTXFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, ACTCTXFc.dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetIntLongField(env, lpObject, ACTCTXFc.lpSource, (jintLong)lpStruct->lpSource);
+ (*env)->SetLongField(env, lpObject, ACTCTXFc.lpSource, (jlong)lpStruct->lpSource);
(*env)->SetShortField(env, lpObject, ACTCTXFc.wProcessorArchitecture, (jshort)lpStruct->wProcessorArchitecture);
(*env)->SetShortField(env, lpObject, ACTCTXFc.wLangId, (jshort)lpStruct->wLangId);
- (*env)->SetIntLongField(env, lpObject, ACTCTXFc.lpAssemblyDirectory, (jintLong)lpStruct->lpAssemblyDirectory);
- (*env)->SetIntLongField(env, lpObject, ACTCTXFc.lpResourceName, (jintLong)lpStruct->lpResourceName);
- (*env)->SetIntLongField(env, lpObject, ACTCTXFc.lpApplicationName, (jintLong)lpStruct->lpApplicationName);
- (*env)->SetIntLongField(env, lpObject, ACTCTXFc.hModule, (jintLong)lpStruct->hModule);
+ (*env)->SetLongField(env, lpObject, ACTCTXFc.lpAssemblyDirectory, (jlong)lpStruct->lpAssemblyDirectory);
+ (*env)->SetLongField(env, lpObject, ACTCTXFc.lpResourceName, (jlong)lpStruct->lpResourceName);
+ (*env)->SetLongField(env, lpObject, ACTCTXFc.lpApplicationName, (jlong)lpStruct->lpApplicationName);
+ (*env)->SetLongField(env, lpObject, ACTCTXFc.hModule, (jlong)lpStruct->hModule);
}
#endif
@@ -129,7 +129,7 @@ void cacheBITMAPFields(JNIEnv *env, jobject lpObject)
BITMAPFc.bmWidthBytes = (*env)->GetFieldID(env, BITMAPFc.clazz, "bmWidthBytes", "I");
BITMAPFc.bmPlanes = (*env)->GetFieldID(env, BITMAPFc.clazz, "bmPlanes", "S");
BITMAPFc.bmBitsPixel = (*env)->GetFieldID(env, BITMAPFc.clazz, "bmBitsPixel", "S");
- BITMAPFc.bmBits = (*env)->GetFieldID(env, BITMAPFc.clazz, "bmBits", I_J);
+ BITMAPFc.bmBits = (*env)->GetFieldID(env, BITMAPFc.clazz, "bmBits", "J");
BITMAPFc.cached = 1;
}
@@ -142,7 +142,7 @@ BITMAP *getBITMAPFields(JNIEnv *env, jobject lpObject, BITMAP *lpStruct)
lpStruct->bmWidthBytes = (*env)->GetIntField(env, lpObject, BITMAPFc.bmWidthBytes);
lpStruct->bmPlanes = (*env)->GetShortField(env, lpObject, BITMAPFc.bmPlanes);
lpStruct->bmBitsPixel = (*env)->GetShortField(env, lpObject, BITMAPFc.bmBitsPixel);
- lpStruct->bmBits = (LPVOID)(*env)->GetIntLongField(env, lpObject, BITMAPFc.bmBits);
+ lpStruct->bmBits = (LPVOID)(*env)->GetLongField(env, lpObject, BITMAPFc.bmBits);
return lpStruct;
}
@@ -155,7 +155,7 @@ void setBITMAPFields(JNIEnv *env, jobject lpObject, BITMAP *lpStruct)
(*env)->SetIntField(env, lpObject, BITMAPFc.bmWidthBytes, (jint)lpStruct->bmWidthBytes);
(*env)->SetShortField(env, lpObject, BITMAPFc.bmPlanes, (jshort)lpStruct->bmPlanes);
(*env)->SetShortField(env, lpObject, BITMAPFc.bmBitsPixel, (jshort)lpStruct->bmBitsPixel);
- (*env)->SetIntLongField(env, lpObject, BITMAPFc.bmBits, (jintLong)lpStruct->bmBits);
+ (*env)->SetLongField(env, lpObject, BITMAPFc.bmBits, (jlong)lpStruct->bmBits);
}
#endif
@@ -275,8 +275,8 @@ void cacheBP_PAINTPARAMSFields(JNIEnv *env, jobject lpObject)
BP_PAINTPARAMSFc.clazz = (*env)->GetObjectClass(env, lpObject);
BP_PAINTPARAMSFc.cbSize = (*env)->GetFieldID(env, BP_PAINTPARAMSFc.clazz, "cbSize", "I");
BP_PAINTPARAMSFc.dwFlags = (*env)->GetFieldID(env, BP_PAINTPARAMSFc.clazz, "dwFlags", "I");
- BP_PAINTPARAMSFc.prcExclude = (*env)->GetFieldID(env, BP_PAINTPARAMSFc.clazz, "prcExclude", I_J);
- BP_PAINTPARAMSFc.pBlendFunction = (*env)->GetFieldID(env, BP_PAINTPARAMSFc.clazz, "pBlendFunction", I_J);
+ BP_PAINTPARAMSFc.prcExclude = (*env)->GetFieldID(env, BP_PAINTPARAMSFc.clazz, "prcExclude", "J");
+ BP_PAINTPARAMSFc.pBlendFunction = (*env)->GetFieldID(env, BP_PAINTPARAMSFc.clazz, "pBlendFunction", "J");
BP_PAINTPARAMSFc.cached = 1;
}
@@ -285,8 +285,8 @@ BP_PAINTPARAMS *getBP_PAINTPARAMSFields(JNIEnv *env, jobject lpObject, BP_PAINTP
if (!BP_PAINTPARAMSFc.cached) cacheBP_PAINTPARAMSFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, BP_PAINTPARAMSFc.cbSize);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, BP_PAINTPARAMSFc.dwFlags);
- lpStruct->prcExclude = (RECT*)(*env)->GetIntLongField(env, lpObject, BP_PAINTPARAMSFc.prcExclude);
- lpStruct->pBlendFunction = (BLENDFUNCTION*)(*env)->GetIntLongField(env, lpObject, BP_PAINTPARAMSFc.pBlendFunction);
+ lpStruct->prcExclude = (RECT*)(*env)->GetLongField(env, lpObject, BP_PAINTPARAMSFc.prcExclude);
+ lpStruct->pBlendFunction = (BLENDFUNCTION*)(*env)->GetLongField(env, lpObject, BP_PAINTPARAMSFc.pBlendFunction);
return lpStruct;
}
@@ -295,60 +295,8 @@ void setBP_PAINTPARAMSFields(JNIEnv *env, jobject lpObject, BP_PAINTPARAMS *lpSt
if (!BP_PAINTPARAMSFc.cached) cacheBP_PAINTPARAMSFields(env, lpObject);
(*env)->SetIntField(env, lpObject, BP_PAINTPARAMSFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, BP_PAINTPARAMSFc.dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetIntLongField(env, lpObject, BP_PAINTPARAMSFc.prcExclude, (jintLong)lpStruct->prcExclude);
- (*env)->SetIntLongField(env, lpObject, BP_PAINTPARAMSFc.pBlendFunction, (jintLong)lpStruct->pBlendFunction);
-}
-#endif
-
-#ifndef NO_BROWSEINFO
-typedef struct BROWSEINFO_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID hwndOwner, pidlRoot, pszDisplayName, lpszTitle, ulFlags, lpfn, lParam, iImage;
-} BROWSEINFO_FID_CACHE;
-
-BROWSEINFO_FID_CACHE BROWSEINFOFc;
-
-void cacheBROWSEINFOFields(JNIEnv *env, jobject lpObject)
-{
- if (BROWSEINFOFc.cached) return;
- BROWSEINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
- BROWSEINFOFc.hwndOwner = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "hwndOwner", I_J);
- BROWSEINFOFc.pidlRoot = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "pidlRoot", I_J);
- BROWSEINFOFc.pszDisplayName = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "pszDisplayName", I_J);
- BROWSEINFOFc.lpszTitle = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lpszTitle", I_J);
- BROWSEINFOFc.ulFlags = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "ulFlags", "I");
- BROWSEINFOFc.lpfn = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lpfn", I_J);
- BROWSEINFOFc.lParam = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lParam", I_J);
- BROWSEINFOFc.iImage = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "iImage", "I");
- BROWSEINFOFc.cached = 1;
-}
-
-BROWSEINFO *getBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct)
-{
- if (!BROWSEINFOFc.cached) cacheBROWSEINFOFields(env, lpObject);
- lpStruct->hwndOwner = (HWND)(*env)->GetIntLongField(env, lpObject, BROWSEINFOFc.hwndOwner);
- lpStruct->pidlRoot = (LPCITEMIDLIST)(*env)->GetIntLongField(env, lpObject, BROWSEINFOFc.pidlRoot);
- lpStruct->pszDisplayName = (LPTSTR)(*env)->GetIntLongField(env, lpObject, BROWSEINFOFc.pszDisplayName);
- lpStruct->lpszTitle = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, BROWSEINFOFc.lpszTitle);
- lpStruct->ulFlags = (*env)->GetIntField(env, lpObject, BROWSEINFOFc.ulFlags);
- lpStruct->lpfn = (BFFCALLBACK)(*env)->GetIntLongField(env, lpObject, BROWSEINFOFc.lpfn);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, BROWSEINFOFc.lParam);
- lpStruct->iImage = (*env)->GetIntField(env, lpObject, BROWSEINFOFc.iImage);
- return lpStruct;
-}
-
-void setBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct)
-{
- if (!BROWSEINFOFc.cached) cacheBROWSEINFOFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, BROWSEINFOFc.hwndOwner, (jintLong)lpStruct->hwndOwner);
- (*env)->SetIntLongField(env, lpObject, BROWSEINFOFc.pidlRoot, (jintLong)lpStruct->pidlRoot);
- (*env)->SetIntLongField(env, lpObject, BROWSEINFOFc.pszDisplayName, (jintLong)lpStruct->pszDisplayName);
- (*env)->SetIntLongField(env, lpObject, BROWSEINFOFc.lpszTitle, (jintLong)lpStruct->lpszTitle);
- (*env)->SetIntField(env, lpObject, BROWSEINFOFc.ulFlags, (jint)lpStruct->ulFlags);
- (*env)->SetIntLongField(env, lpObject, BROWSEINFOFc.lpfn, (jintLong)lpStruct->lpfn);
- (*env)->SetIntLongField(env, lpObject, BROWSEINFOFc.lParam, (jintLong)lpStruct->lParam);
- (*env)->SetIntField(env, lpObject, BROWSEINFOFc.iImage, (jint)lpStruct->iImage);
+ (*env)->SetLongField(env, lpObject, BP_PAINTPARAMSFc.prcExclude, (jlong)lpStruct->prcExclude);
+ (*env)->SetLongField(env, lpObject, BP_PAINTPARAMSFc.pBlendFunction, (jlong)lpStruct->pBlendFunction);
}
#endif
@@ -365,7 +313,7 @@ void cacheBUTTON_IMAGELISTFields(JNIEnv *env, jobject lpObject)
{
if (BUTTON_IMAGELISTFc.cached) return;
BUTTON_IMAGELISTFc.clazz = (*env)->GetObjectClass(env, lpObject);
- BUTTON_IMAGELISTFc.himl = (*env)->GetFieldID(env, BUTTON_IMAGELISTFc.clazz, "himl", I_J);
+ BUTTON_IMAGELISTFc.himl = (*env)->GetFieldID(env, BUTTON_IMAGELISTFc.clazz, "himl", "J");
BUTTON_IMAGELISTFc.margin_left = (*env)->GetFieldID(env, BUTTON_IMAGELISTFc.clazz, "margin_left", "I");
BUTTON_IMAGELISTFc.margin_top = (*env)->GetFieldID(env, BUTTON_IMAGELISTFc.clazz, "margin_top", "I");
BUTTON_IMAGELISTFc.margin_right = (*env)->GetFieldID(env, BUTTON_IMAGELISTFc.clazz, "margin_right", "I");
@@ -377,7 +325,7 @@ void cacheBUTTON_IMAGELISTFields(JNIEnv *env, jobject lpObject)
BUTTON_IMAGELIST *getBUTTON_IMAGELISTFields(JNIEnv *env, jobject lpObject, BUTTON_IMAGELIST *lpStruct)
{
if (!BUTTON_IMAGELISTFc.cached) cacheBUTTON_IMAGELISTFields(env, lpObject);
- lpStruct->himl = (HIMAGELIST)(*env)->GetIntLongField(env, lpObject, BUTTON_IMAGELISTFc.himl);
+ lpStruct->himl = (HIMAGELIST)(*env)->GetLongField(env, lpObject, BUTTON_IMAGELISTFc.himl);
lpStruct->margin.left = (LONG)(*env)->GetIntField(env, lpObject, BUTTON_IMAGELISTFc.margin_left);
lpStruct->margin.top = (LONG)(*env)->GetIntField(env, lpObject, BUTTON_IMAGELISTFc.margin_top);
lpStruct->margin.right = (LONG)(*env)->GetIntField(env, lpObject, BUTTON_IMAGELISTFc.margin_right);
@@ -389,7 +337,7 @@ BUTTON_IMAGELIST *getBUTTON_IMAGELISTFields(JNIEnv *env, jobject lpObject, BUTTO
void setBUTTON_IMAGELISTFields(JNIEnv *env, jobject lpObject, BUTTON_IMAGELIST *lpStruct)
{
if (!BUTTON_IMAGELISTFc.cached) cacheBUTTON_IMAGELISTFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, BUTTON_IMAGELISTFc.himl, (jintLong)lpStruct->himl);
+ (*env)->SetLongField(env, lpObject, BUTTON_IMAGELISTFc.himl, (jlong)lpStruct->himl);
(*env)->SetIntField(env, lpObject, BUTTON_IMAGELISTFc.margin_left, (jint)lpStruct->margin.left);
(*env)->SetIntField(env, lpObject, BUTTON_IMAGELISTFc.margin_top, (jint)lpStruct->margin.top);
(*env)->SetIntField(env, lpObject, BUTTON_IMAGELISTFc.margin_right, (jint)lpStruct->margin.right);
@@ -450,247 +398,6 @@ void setCANDIDATEFORMFields(JNIEnv *env, jobject lpObject, CANDIDATEFORM *lpStru
}
#endif
-#ifndef NO_CERT_CONTEXT
-typedef struct CERT_CONTEXT_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID dwCertEncodingType, pbCertEncoded, cbCertEncoded, pCertInfo, hCertStore;
-} CERT_CONTEXT_FID_CACHE;
-
-CERT_CONTEXT_FID_CACHE CERT_CONTEXTFc;
-
-void cacheCERT_CONTEXTFields(JNIEnv *env, jobject lpObject)
-{
- if (CERT_CONTEXTFc.cached) return;
- CERT_CONTEXTFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CERT_CONTEXTFc.dwCertEncodingType = (*env)->GetFieldID(env, CERT_CONTEXTFc.clazz, "dwCertEncodingType", "I");
- CERT_CONTEXTFc.pbCertEncoded = (*env)->GetFieldID(env, CERT_CONTEXTFc.clazz, "pbCertEncoded", I_J);
- CERT_CONTEXTFc.cbCertEncoded = (*env)->GetFieldID(env, CERT_CONTEXTFc.clazz, "cbCertEncoded", "I");
- CERT_CONTEXTFc.pCertInfo = (*env)->GetFieldID(env, CERT_CONTEXTFc.clazz, "pCertInfo", I_J);
- CERT_CONTEXTFc.hCertStore = (*env)->GetFieldID(env, CERT_CONTEXTFc.clazz, "hCertStore", I_J);
- CERT_CONTEXTFc.cached = 1;
-}
-
-CERT_CONTEXT *getCERT_CONTEXTFields(JNIEnv *env, jobject lpObject, CERT_CONTEXT *lpStruct)
-{
- if (!CERT_CONTEXTFc.cached) cacheCERT_CONTEXTFields(env, lpObject);
- lpStruct->dwCertEncodingType = (*env)->GetIntField(env, lpObject, CERT_CONTEXTFc.dwCertEncodingType);
- lpStruct->pbCertEncoded = (BYTE *)(*env)->GetIntLongField(env, lpObject, CERT_CONTEXTFc.pbCertEncoded);
- lpStruct->cbCertEncoded = (*env)->GetIntField(env, lpObject, CERT_CONTEXTFc.cbCertEncoded);
- lpStruct->pCertInfo = (PCERT_INFO)(*env)->GetIntLongField(env, lpObject, CERT_CONTEXTFc.pCertInfo);
- lpStruct->hCertStore = (HCERTSTORE)(*env)->GetIntLongField(env, lpObject, CERT_CONTEXTFc.hCertStore);
- return lpStruct;
-}
-
-void setCERT_CONTEXTFields(JNIEnv *env, jobject lpObject, CERT_CONTEXT *lpStruct)
-{
- if (!CERT_CONTEXTFc.cached) cacheCERT_CONTEXTFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, CERT_CONTEXTFc.dwCertEncodingType, (jint)lpStruct->dwCertEncodingType);
- (*env)->SetIntLongField(env, lpObject, CERT_CONTEXTFc.pbCertEncoded, (jintLong)lpStruct->pbCertEncoded);
- (*env)->SetIntField(env, lpObject, CERT_CONTEXTFc.cbCertEncoded, (jint)lpStruct->cbCertEncoded);
- (*env)->SetIntLongField(env, lpObject, CERT_CONTEXTFc.pCertInfo, (jintLong)lpStruct->pCertInfo);
- (*env)->SetIntLongField(env, lpObject, CERT_CONTEXTFc.hCertStore, (jintLong)lpStruct->hCertStore);
-}
-#endif
-
-#ifndef NO_CERT_INFO
-typedef struct CERT_INFO_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID dwVersion, SerialNumber, SignatureAlgorithm, Issuer, NotBefore, NotAfter, Subject, SubjectPublicKeyInfo, IssuerUniqueId, SubjectUniqueId, cExtension, rgExtension;
-} CERT_INFO_FID_CACHE;
-
-CERT_INFO_FID_CACHE CERT_INFOFc;
-
-void cacheCERT_INFOFields(JNIEnv *env, jobject lpObject)
-{
- if (CERT_INFOFc.cached) return;
- CERT_INFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CERT_INFOFc.dwVersion = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "dwVersion", "I");
- CERT_INFOFc.SerialNumber = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "SerialNumber", "Lorg/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB;");
- CERT_INFOFc.SignatureAlgorithm = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "SignatureAlgorithm", "Lorg/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER;");
- CERT_INFOFc.Issuer = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "Issuer", "Lorg/eclipse/swt/internal/win32/CERT_NAME_BLOB;");
- CERT_INFOFc.NotBefore = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "NotBefore", "Lorg/eclipse/swt/internal/win32/FILETIME;");
- CERT_INFOFc.NotAfter = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "NotAfter", "Lorg/eclipse/swt/internal/win32/FILETIME;");
- CERT_INFOFc.Subject = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "Subject", "Lorg/eclipse/swt/internal/win32/CERT_NAME_BLOB;");
- CERT_INFOFc.SubjectPublicKeyInfo = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "SubjectPublicKeyInfo", "Lorg/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO;");
- CERT_INFOFc.IssuerUniqueId = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "IssuerUniqueId", "Lorg/eclipse/swt/internal/win32/CRYPT_BIT_BLOB;");
- CERT_INFOFc.SubjectUniqueId = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "SubjectUniqueId", "Lorg/eclipse/swt/internal/win32/CRYPT_BIT_BLOB;");
- CERT_INFOFc.cExtension = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "cExtension", "I");
- CERT_INFOFc.rgExtension = (*env)->GetFieldID(env, CERT_INFOFc.clazz, "rgExtension", I_J);
- CERT_INFOFc.cached = 1;
-}
-
-CERT_INFO *getCERT_INFOFields(JNIEnv *env, jobject lpObject, CERT_INFO *lpStruct)
-{
- if (!CERT_INFOFc.cached) cacheCERT_INFOFields(env, lpObject);
- lpStruct->dwVersion = (*env)->GetIntField(env, lpObject, CERT_INFOFc.dwVersion);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SerialNumber);
- if (lpObject1 != NULL) getCRYPT_INTEGER_BLOBFields(env, lpObject1, &lpStruct->SerialNumber);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SignatureAlgorithm);
- if (lpObject1 != NULL) getCRYPT_ALGORITHM_IDENTIFIERFields(env, lpObject1, &lpStruct->SignatureAlgorithm);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.Issuer);
- if (lpObject1 != NULL) getCERT_NAME_BLOBFields(env, lpObject1, &lpStruct->Issuer);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.NotBefore);
- if (lpObject1 != NULL) getFILETIMEFields(env, lpObject1, &lpStruct->NotBefore);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.NotAfter);
- if (lpObject1 != NULL) getFILETIMEFields(env, lpObject1, &lpStruct->NotAfter);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.Subject);
- if (lpObject1 != NULL) getCERT_NAME_BLOBFields(env, lpObject1, &lpStruct->Subject);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SubjectPublicKeyInfo);
- if (lpObject1 != NULL) getCERT_PUBLIC_KEY_INFOFields(env, lpObject1, &lpStruct->SubjectPublicKeyInfo);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.IssuerUniqueId);
- if (lpObject1 != NULL) getCRYPT_BIT_BLOBFields(env, lpObject1, &lpStruct->IssuerUniqueId);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SubjectUniqueId);
- if (lpObject1 != NULL) getCRYPT_BIT_BLOBFields(env, lpObject1, &lpStruct->SubjectUniqueId);
- }
- lpStruct->cExtension = (*env)->GetIntField(env, lpObject, CERT_INFOFc.cExtension);
- lpStruct->rgExtension = (PCERT_EXTENSION)(*env)->GetIntLongField(env, lpObject, CERT_INFOFc.rgExtension);
- return lpStruct;
-}
-
-void setCERT_INFOFields(JNIEnv *env, jobject lpObject, CERT_INFO *lpStruct)
-{
- if (!CERT_INFOFc.cached) cacheCERT_INFOFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, CERT_INFOFc.dwVersion, (jint)lpStruct->dwVersion);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SerialNumber);
- if (lpObject1 != NULL) setCRYPT_INTEGER_BLOBFields(env, lpObject1, &lpStruct->SerialNumber);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SignatureAlgorithm);
- if (lpObject1 != NULL) setCRYPT_ALGORITHM_IDENTIFIERFields(env, lpObject1, &lpStruct->SignatureAlgorithm);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.Issuer);
- if (lpObject1 != NULL) setCERT_NAME_BLOBFields(env, lpObject1, &lpStruct->Issuer);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.NotBefore);
- if (lpObject1 != NULL) setFILETIMEFields(env, lpObject1, &lpStruct->NotBefore);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.NotAfter);
- if (lpObject1 != NULL) setFILETIMEFields(env, lpObject1, &lpStruct->NotAfter);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.Subject);
- if (lpObject1 != NULL) setCERT_NAME_BLOBFields(env, lpObject1, &lpStruct->Subject);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SubjectPublicKeyInfo);
- if (lpObject1 != NULL) setCERT_PUBLIC_KEY_INFOFields(env, lpObject1, &lpStruct->SubjectPublicKeyInfo);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.IssuerUniqueId);
- if (lpObject1 != NULL) setCRYPT_BIT_BLOBFields(env, lpObject1, &lpStruct->IssuerUniqueId);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_INFOFc.SubjectUniqueId);
- if (lpObject1 != NULL) setCRYPT_BIT_BLOBFields(env, lpObject1, &lpStruct->SubjectUniqueId);
- }
- (*env)->SetIntField(env, lpObject, CERT_INFOFc.cExtension, (jint)lpStruct->cExtension);
- (*env)->SetIntLongField(env, lpObject, CERT_INFOFc.rgExtension, (jintLong)lpStruct->rgExtension);
-}
-#endif
-
-#ifndef NO_CERT_NAME_BLOB
-typedef struct CERT_NAME_BLOB_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID cbData, pbData;
-} CERT_NAME_BLOB_FID_CACHE;
-
-CERT_NAME_BLOB_FID_CACHE CERT_NAME_BLOBFc;
-
-void cacheCERT_NAME_BLOBFields(JNIEnv *env, jobject lpObject)
-{
- if (CERT_NAME_BLOBFc.cached) return;
- CERT_NAME_BLOBFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CERT_NAME_BLOBFc.cbData = (*env)->GetFieldID(env, CERT_NAME_BLOBFc.clazz, "cbData", "I");
- CERT_NAME_BLOBFc.pbData = (*env)->GetFieldID(env, CERT_NAME_BLOBFc.clazz, "pbData", I_J);
- CERT_NAME_BLOBFc.cached = 1;
-}
-
-CERT_NAME_BLOB *getCERT_NAME_BLOBFields(JNIEnv *env, jobject lpObject, CERT_NAME_BLOB *lpStruct)
-{
- if (!CERT_NAME_BLOBFc.cached) cacheCERT_NAME_BLOBFields(env, lpObject);
- lpStruct->cbData = (*env)->GetIntField(env, lpObject, CERT_NAME_BLOBFc.cbData);
- lpStruct->pbData = (BYTE *)(*env)->GetIntLongField(env, lpObject, CERT_NAME_BLOBFc.pbData);
- return lpStruct;
-}
-
-void setCERT_NAME_BLOBFields(JNIEnv *env, jobject lpObject, CERT_NAME_BLOB *lpStruct)
-{
- if (!CERT_NAME_BLOBFc.cached) cacheCERT_NAME_BLOBFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, CERT_NAME_BLOBFc.cbData, (jint)lpStruct->cbData);
- (*env)->SetIntLongField(env, lpObject, CERT_NAME_BLOBFc.pbData, (jintLong)lpStruct->pbData);
-}
-#endif
-
-#ifndef NO_CERT_PUBLIC_KEY_INFO
-typedef struct CERT_PUBLIC_KEY_INFO_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID Algorithm, PublicKey;
-} CERT_PUBLIC_KEY_INFO_FID_CACHE;
-
-CERT_PUBLIC_KEY_INFO_FID_CACHE CERT_PUBLIC_KEY_INFOFc;
-
-void cacheCERT_PUBLIC_KEY_INFOFields(JNIEnv *env, jobject lpObject)
-{
- if (CERT_PUBLIC_KEY_INFOFc.cached) return;
- CERT_PUBLIC_KEY_INFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CERT_PUBLIC_KEY_INFOFc.Algorithm = (*env)->GetFieldID(env, CERT_PUBLIC_KEY_INFOFc.clazz, "Algorithm", "Lorg/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER;");
- CERT_PUBLIC_KEY_INFOFc.PublicKey = (*env)->GetFieldID(env, CERT_PUBLIC_KEY_INFOFc.clazz, "PublicKey", "Lorg/eclipse/swt/internal/win32/CRYPT_BIT_BLOB;");
- CERT_PUBLIC_KEY_INFOFc.cached = 1;
-}
-
-CERT_PUBLIC_KEY_INFO *getCERT_PUBLIC_KEY_INFOFields(JNIEnv *env, jobject lpObject, CERT_PUBLIC_KEY_INFO *lpStruct)
-{
- if (!CERT_PUBLIC_KEY_INFOFc.cached) cacheCERT_PUBLIC_KEY_INFOFields(env, lpObject);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_PUBLIC_KEY_INFOFc.Algorithm);
- if (lpObject1 != NULL) getCRYPT_ALGORITHM_IDENTIFIERFields(env, lpObject1, &lpStruct->Algorithm);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_PUBLIC_KEY_INFOFc.PublicKey);
- if (lpObject1 != NULL) getCRYPT_BIT_BLOBFields(env, lpObject1, &lpStruct->PublicKey);
- }
- return lpStruct;
-}
-
-void setCERT_PUBLIC_KEY_INFOFields(JNIEnv *env, jobject lpObject, CERT_PUBLIC_KEY_INFO *lpStruct)
-{
- if (!CERT_PUBLIC_KEY_INFOFc.cached) cacheCERT_PUBLIC_KEY_INFOFields(env, lpObject);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_PUBLIC_KEY_INFOFc.Algorithm);
- if (lpObject1 != NULL) setCRYPT_ALGORITHM_IDENTIFIERFields(env, lpObject1, &lpStruct->Algorithm);
- }
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CERT_PUBLIC_KEY_INFOFc.PublicKey);
- if (lpObject1 != NULL) setCRYPT_BIT_BLOBFields(env, lpObject1, &lpStruct->PublicKey);
- }
-}
-#endif
-
#ifndef NO_CHOOSECOLOR
typedef struct CHOOSECOLOR_FID_CACHE {
int cached;
@@ -705,14 +412,14 @@ void cacheCHOOSECOLORFields(JNIEnv *env, jobject lpObject)
if (CHOOSECOLORFc.cached) return;
CHOOSECOLORFc.clazz = (*env)->GetObjectClass(env, lpObject);
CHOOSECOLORFc.lStructSize = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lStructSize", "I");
- CHOOSECOLORFc.hwndOwner = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "hwndOwner", I_J);
- CHOOSECOLORFc.hInstance = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "hInstance", I_J);
+ CHOOSECOLORFc.hwndOwner = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "hwndOwner", "J");
+ CHOOSECOLORFc.hInstance = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "hInstance", "J");
CHOOSECOLORFc.rgbResult = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "rgbResult", "I");
- CHOOSECOLORFc.lpCustColors = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lpCustColors", I_J);
+ CHOOSECOLORFc.lpCustColors = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lpCustColors", "J");
CHOOSECOLORFc.Flags = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "Flags", "I");
- CHOOSECOLORFc.lCustData = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lCustData", I_J);
- CHOOSECOLORFc.lpfnHook = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lpfnHook", I_J);
- CHOOSECOLORFc.lpTemplateName = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lpTemplateName", I_J);
+ CHOOSECOLORFc.lCustData = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lCustData", "J");
+ CHOOSECOLORFc.lpfnHook = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lpfnHook", "J");
+ CHOOSECOLORFc.lpTemplateName = (*env)->GetFieldID(env, CHOOSECOLORFc.clazz, "lpTemplateName", "J");
CHOOSECOLORFc.cached = 1;
}
@@ -720,14 +427,14 @@ CHOOSECOLOR *getCHOOSECOLORFields(JNIEnv *env, jobject lpObject, CHOOSECOLOR *lp
{
if (!CHOOSECOLORFc.cached) cacheCHOOSECOLORFields(env, lpObject);
lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, CHOOSECOLORFc.lStructSize);
- lpStruct->hwndOwner = (HWND)(*env)->GetIntLongField(env, lpObject, CHOOSECOLORFc.hwndOwner);
- lpStruct->hInstance = (HANDLE)(*env)->GetIntLongField(env, lpObject, CHOOSECOLORFc.hInstance);
+ lpStruct->hwndOwner = (HWND)(*env)->GetLongField(env, lpObject, CHOOSECOLORFc.hwndOwner);
+ lpStruct->hInstance = (HANDLE)(*env)->GetLongField(env, lpObject, CHOOSECOLORFc.hInstance);
lpStruct->rgbResult = (*env)->GetIntField(env, lpObject, CHOOSECOLORFc.rgbResult);
- lpStruct->lpCustColors = (COLORREF *)(*env)->GetIntLongField(env, lpObject, CHOOSECOLORFc.lpCustColors);
+ lpStruct->lpCustColors = (COLORREF *)(*env)->GetLongField(env, lpObject, CHOOSECOLORFc.lpCustColors);
lpStruct->Flags = (*env)->GetIntField(env, lpObject, CHOOSECOLORFc.Flags);
- lpStruct->lCustData = (*env)->GetIntLongField(env, lpObject, CHOOSECOLORFc.lCustData);
- lpStruct->lpfnHook = (LPCCHOOKPROC)(*env)->GetIntLongField(env, lpObject, CHOOSECOLORFc.lpfnHook);
- lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, CHOOSECOLORFc.lpTemplateName);
+ lpStruct->lCustData = (*env)->GetLongField(env, lpObject, CHOOSECOLORFc.lCustData);
+ lpStruct->lpfnHook = (LPCCHOOKPROC)(*env)->GetLongField(env, lpObject, CHOOSECOLORFc.lpfnHook);
+ lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetLongField(env, lpObject, CHOOSECOLORFc.lpTemplateName);
return lpStruct;
}
@@ -735,14 +442,14 @@ void setCHOOSECOLORFields(JNIEnv *env, jobject lpObject, CHOOSECOLOR *lpStruct)
{
if (!CHOOSECOLORFc.cached) cacheCHOOSECOLORFields(env, lpObject);
(*env)->SetIntField(env, lpObject, CHOOSECOLORFc.lStructSize, (jint)lpStruct->lStructSize);
- (*env)->SetIntLongField(env, lpObject, CHOOSECOLORFc.hwndOwner, (jintLong)lpStruct->hwndOwner);
- (*env)->SetIntLongField(env, lpObject, CHOOSECOLORFc.hInstance, (jintLong)lpStruct->hInstance);
+ (*env)->SetLongField(env, lpObject, CHOOSECOLORFc.hwndOwner, (jlong)lpStruct->hwndOwner);
+ (*env)->SetLongField(env, lpObject, CHOOSECOLORFc.hInstance, (jlong)lpStruct->hInstance);
(*env)->SetIntField(env, lpObject, CHOOSECOLORFc.rgbResult, (jint)lpStruct->rgbResult);
- (*env)->SetIntLongField(env, lpObject, CHOOSECOLORFc.lpCustColors, (jintLong)lpStruct->lpCustColors);
+ (*env)->SetLongField(env, lpObject, CHOOSECOLORFc.lpCustColors, (jlong)lpStruct->lpCustColors);
(*env)->SetIntField(env, lpObject, CHOOSECOLORFc.Flags, (jint)lpStruct->Flags);
- (*env)->SetIntLongField(env, lpObject, CHOOSECOLORFc.lCustData, (jintLong)lpStruct->lCustData);
- (*env)->SetIntLongField(env, lpObject, CHOOSECOLORFc.lpfnHook, (jintLong)lpStruct->lpfnHook);
- (*env)->SetIntLongField(env, lpObject, CHOOSECOLORFc.lpTemplateName, (jintLong)lpStruct->lpTemplateName);
+ (*env)->SetLongField(env, lpObject, CHOOSECOLORFc.lCustData, (jlong)lpStruct->lCustData);
+ (*env)->SetLongField(env, lpObject, CHOOSECOLORFc.lpfnHook, (jlong)lpStruct->lpfnHook);
+ (*env)->SetLongField(env, lpObject, CHOOSECOLORFc.lpTemplateName, (jlong)lpStruct->lpTemplateName);
}
#endif
@@ -760,17 +467,17 @@ void cacheCHOOSEFONTFields(JNIEnv *env, jobject lpObject)
if (CHOOSEFONTFc.cached) return;
CHOOSEFONTFc.clazz = (*env)->GetObjectClass(env, lpObject);
CHOOSEFONTFc.lStructSize = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lStructSize", "I");
- CHOOSEFONTFc.hwndOwner = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "hwndOwner", I_J);
- CHOOSEFONTFc.hDC = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "hDC", I_J);
- CHOOSEFONTFc.lpLogFont = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpLogFont", I_J);
+ CHOOSEFONTFc.hwndOwner = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "hwndOwner", "J");
+ CHOOSEFONTFc.hDC = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "hDC", "J");
+ CHOOSEFONTFc.lpLogFont = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpLogFont", "J");
CHOOSEFONTFc.iPointSize = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "iPointSize", "I");
CHOOSEFONTFc.Flags = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "Flags", "I");
CHOOSEFONTFc.rgbColors = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "rgbColors", "I");
- CHOOSEFONTFc.lCustData = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lCustData", I_J);
- CHOOSEFONTFc.lpfnHook = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpfnHook", I_J);
- CHOOSEFONTFc.lpTemplateName = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpTemplateName", I_J);
- CHOOSEFONTFc.hInstance = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "hInstance", I_J);
- CHOOSEFONTFc.lpszStyle = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpszStyle", I_J);
+ CHOOSEFONTFc.lCustData = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lCustData", "J");
+ CHOOSEFONTFc.lpfnHook = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpfnHook", "J");
+ CHOOSEFONTFc.lpTemplateName = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpTemplateName", "J");
+ CHOOSEFONTFc.hInstance = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "hInstance", "J");
+ CHOOSEFONTFc.lpszStyle = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "lpszStyle", "J");
CHOOSEFONTFc.nFontType = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "nFontType", "S");
CHOOSEFONTFc.nSizeMin = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "nSizeMin", "I");
CHOOSEFONTFc.nSizeMax = (*env)->GetFieldID(env, CHOOSEFONTFc.clazz, "nSizeMax", "I");
@@ -781,17 +488,17 @@ CHOOSEFONT *getCHOOSEFONTFields(JNIEnv *env, jobject lpObject, CHOOSEFONT *lpStr
{
if (!CHOOSEFONTFc.cached) cacheCHOOSEFONTFields(env, lpObject);
lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lStructSize);
- lpStruct->hwndOwner = (HWND)(*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.hwndOwner);
- lpStruct->hDC = (HDC)(*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.hDC);
- lpStruct->lpLogFont = (LPLOGFONT)(*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.lpLogFont);
+ lpStruct->hwndOwner = (HWND)(*env)->GetLongField(env, lpObject, CHOOSEFONTFc.hwndOwner);
+ lpStruct->hDC = (HDC)(*env)->GetLongField(env, lpObject, CHOOSEFONTFc.hDC);
+ lpStruct->lpLogFont = (LPLOGFONT)(*env)->GetLongField(env, lpObject, CHOOSEFONTFc.lpLogFont);
lpStruct->iPointSize = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.iPointSize);
lpStruct->Flags = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.Flags);
lpStruct->rgbColors = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.rgbColors);
- lpStruct->lCustData = (*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.lCustData);
- lpStruct->lpfnHook = (LPCFHOOKPROC)(*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.lpfnHook);
- lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.lpTemplateName);
- lpStruct->hInstance = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.hInstance);
- lpStruct->lpszStyle = (LPTSTR)(*env)->GetIntLongField(env, lpObject, CHOOSEFONTFc.lpszStyle);
+ lpStruct->lCustData = (*env)->GetLongField(env, lpObject, CHOOSEFONTFc.lCustData);
+ lpStruct->lpfnHook = (LPCFHOOKPROC)(*env)->GetLongField(env, lpObject, CHOOSEFONTFc.lpfnHook);
+ lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetLongField(env, lpObject, CHOOSEFONTFc.lpTemplateName);
+ lpStruct->hInstance = (HINSTANCE)(*env)->GetLongField(env, lpObject, CHOOSEFONTFc.hInstance);
+ lpStruct->lpszStyle = (LPTSTR)(*env)->GetLongField(env, lpObject, CHOOSEFONTFc.lpszStyle);
lpStruct->nFontType = (*env)->GetShortField(env, lpObject, CHOOSEFONTFc.nFontType);
lpStruct->nSizeMin = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.nSizeMin);
lpStruct->nSizeMax = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.nSizeMax);
@@ -802,23 +509,57 @@ void setCHOOSEFONTFields(JNIEnv *env, jobject lpObject, CHOOSEFONT *lpStruct)
{
if (!CHOOSEFONTFc.cached) cacheCHOOSEFONTFields(env, lpObject);
(*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lStructSize, (jint)lpStruct->lStructSize);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.hwndOwner, (jintLong)lpStruct->hwndOwner);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.hDC, (jintLong)lpStruct->hDC);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.lpLogFont, (jintLong)lpStruct->lpLogFont);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.hwndOwner, (jlong)lpStruct->hwndOwner);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.hDC, (jlong)lpStruct->hDC);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.lpLogFont, (jlong)lpStruct->lpLogFont);
(*env)->SetIntField(env, lpObject, CHOOSEFONTFc.iPointSize, (jint)lpStruct->iPointSize);
(*env)->SetIntField(env, lpObject, CHOOSEFONTFc.Flags, (jint)lpStruct->Flags);
(*env)->SetIntField(env, lpObject, CHOOSEFONTFc.rgbColors, (jint)lpStruct->rgbColors);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.lCustData, (jintLong)lpStruct->lCustData);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.lpfnHook, (jintLong)lpStruct->lpfnHook);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.lpTemplateName, (jintLong)lpStruct->lpTemplateName);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.hInstance, (jintLong)lpStruct->hInstance);
- (*env)->SetIntLongField(env, lpObject, CHOOSEFONTFc.lpszStyle, (jintLong)lpStruct->lpszStyle);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.lCustData, (jlong)lpStruct->lCustData);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.lpfnHook, (jlong)lpStruct->lpfnHook);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.lpTemplateName, (jlong)lpStruct->lpTemplateName);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.hInstance, (jlong)lpStruct->hInstance);
+ (*env)->SetLongField(env, lpObject, CHOOSEFONTFc.lpszStyle, (jlong)lpStruct->lpszStyle);
(*env)->SetShortField(env, lpObject, CHOOSEFONTFc.nFontType, (jshort)lpStruct->nFontType);
(*env)->SetIntField(env, lpObject, CHOOSEFONTFc.nSizeMin, (jint)lpStruct->nSizeMin);
(*env)->SetIntField(env, lpObject, CHOOSEFONTFc.nSizeMax, (jint)lpStruct->nSizeMax);
}
#endif
+#ifndef NO_CIDA
+typedef struct CIDA_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID cidl, aoffset;
+} CIDA_FID_CACHE;
+
+CIDA_FID_CACHE CIDAFc;
+
+void cacheCIDAFields(JNIEnv *env, jobject lpObject)
+{
+ if (CIDAFc.cached) return;
+ CIDAFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ CIDAFc.cidl = (*env)->GetFieldID(env, CIDAFc.clazz, "cidl", "I");
+ CIDAFc.aoffset = (*env)->GetFieldID(env, CIDAFc.clazz, "aoffset", "I");
+ CIDAFc.cached = 1;
+}
+
+CIDA *getCIDAFields(JNIEnv *env, jobject lpObject, CIDA *lpStruct)
+{
+ if (!CIDAFc.cached) cacheCIDAFields(env, lpObject);
+ lpStruct->cidl = (*env)->GetIntField(env, lpObject, CIDAFc.cidl);
+ lpStruct->aoffset[0] = (*env)->GetIntField(env, lpObject, CIDAFc.aoffset);
+ return lpStruct;
+}
+
+void setCIDAFields(JNIEnv *env, jobject lpObject, CIDA *lpStruct)
+{
+ if (!CIDAFc.cached) cacheCIDAFields(env, lpObject);
+ (*env)->SetIntField(env, lpObject, CIDAFc.cidl, (jint)lpStruct->cidl);
+ (*env)->SetIntField(env, lpObject, CIDAFc.aoffset, (jint)lpStruct->aoffset[0]);
+}
+#endif
+
#ifndef NO_COMBOBOXINFO
typedef struct COMBOBOXINFO_FID_CACHE {
int cached;
@@ -842,9 +583,9 @@ void cacheCOMBOBOXINFOFields(JNIEnv *env, jobject lpObject)
COMBOBOXINFOFc.buttonRight = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "buttonRight", "I");
COMBOBOXINFOFc.buttonBottom = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "buttonBottom", "I");
COMBOBOXINFOFc.stateButton = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "stateButton", "I");
- COMBOBOXINFOFc.hwndCombo = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "hwndCombo", I_J);
- COMBOBOXINFOFc.hwndItem = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "hwndItem", I_J);
- COMBOBOXINFOFc.hwndList = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "hwndList", I_J);
+ COMBOBOXINFOFc.hwndCombo = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "hwndCombo", "J");
+ COMBOBOXINFOFc.hwndItem = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "hwndItem", "J");
+ COMBOBOXINFOFc.hwndList = (*env)->GetFieldID(env, COMBOBOXINFOFc.clazz, "hwndList", "J");
COMBOBOXINFOFc.cached = 1;
}
@@ -861,9 +602,9 @@ COMBOBOXINFO *getCOMBOBOXINFOFields(JNIEnv *env, jobject lpObject, COMBOBOXINFO
lpStruct->rcButton.right = (*env)->GetIntField(env, lpObject, COMBOBOXINFOFc.buttonRight);
lpStruct->rcButton.bottom = (*env)->GetIntField(env, lpObject, COMBOBOXINFOFc.buttonBottom);
lpStruct->stateButton = (*env)->GetIntField(env, lpObject, COMBOBOXINFOFc.stateButton);
- lpStruct->hwndCombo = (HWND)(*env)->GetIntLongField(env, lpObject, COMBOBOXINFOFc.hwndCombo);
- lpStruct->hwndItem = (HWND)(*env)->GetIntLongField(env, lpObject, COMBOBOXINFOFc.hwndItem);
- lpStruct->hwndList = (HWND)(*env)->GetIntLongField(env, lpObject, COMBOBOXINFOFc.hwndList);
+ lpStruct->hwndCombo = (HWND)(*env)->GetLongField(env, lpObject, COMBOBOXINFOFc.hwndCombo);
+ lpStruct->hwndItem = (HWND)(*env)->GetLongField(env, lpObject, COMBOBOXINFOFc.hwndItem);
+ lpStruct->hwndList = (HWND)(*env)->GetLongField(env, lpObject, COMBOBOXINFOFc.hwndList);
return lpStruct;
}
@@ -880,9 +621,9 @@ void setCOMBOBOXINFOFields(JNIEnv *env, jobject lpObject, COMBOBOXINFO *lpStruct
(*env)->SetIntField(env, lpObject, COMBOBOXINFOFc.buttonRight, (jint)lpStruct->rcButton.right);
(*env)->SetIntField(env, lpObject, COMBOBOXINFOFc.buttonBottom, (jint)lpStruct->rcButton.bottom);
(*env)->SetIntField(env, lpObject, COMBOBOXINFOFc.stateButton, (jint)lpStruct->stateButton);
- (*env)->SetIntLongField(env, lpObject, COMBOBOXINFOFc.hwndCombo, (jintLong)lpStruct->hwndCombo);
- (*env)->SetIntLongField(env, lpObject, COMBOBOXINFOFc.hwndItem, (jintLong)lpStruct->hwndItem);
- (*env)->SetIntLongField(env, lpObject, COMBOBOXINFOFc.hwndList, (jintLong)lpStruct->hwndList);
+ (*env)->SetLongField(env, lpObject, COMBOBOXINFOFc.hwndCombo, (jlong)lpStruct->hwndCombo);
+ (*env)->SetLongField(env, lpObject, COMBOBOXINFOFc.hwndItem, (jlong)lpStruct->hwndItem);
+ (*env)->SetLongField(env, lpObject, COMBOBOXINFOFc.hwndList, (jlong)lpStruct->hwndList);
}
#endif
@@ -948,17 +689,17 @@ void cacheCREATESTRUCTFields(JNIEnv *env, jobject lpObject)
{
if (CREATESTRUCTFc.cached) return;
CREATESTRUCTFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CREATESTRUCTFc.lpCreateParams = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "lpCreateParams", I_J);
- CREATESTRUCTFc.hInstance = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "hInstance", I_J);
- CREATESTRUCTFc.hMenu = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "hMenu", I_J);
- CREATESTRUCTFc.hwndParent = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "hwndParent", I_J);
+ CREATESTRUCTFc.lpCreateParams = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "lpCreateParams", "J");
+ CREATESTRUCTFc.hInstance = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "hInstance", "J");
+ CREATESTRUCTFc.hMenu = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "hMenu", "J");
+ CREATESTRUCTFc.hwndParent = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "hwndParent", "J");
CREATESTRUCTFc.cy = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "cy", "I");
CREATESTRUCTFc.cx = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "cx", "I");
CREATESTRUCTFc.y = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "y", "I");
CREATESTRUCTFc.x = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "x", "I");
CREATESTRUCTFc.style = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "style", "I");
- CREATESTRUCTFc.lpszName = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "lpszName", I_J);
- CREATESTRUCTFc.lpszClass = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "lpszClass", I_J);
+ CREATESTRUCTFc.lpszName = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "lpszName", "J");
+ CREATESTRUCTFc.lpszClass = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "lpszClass", "J");
CREATESTRUCTFc.dwExStyle = (*env)->GetFieldID(env, CREATESTRUCTFc.clazz, "dwExStyle", "I");
CREATESTRUCTFc.cached = 1;
}
@@ -966,17 +707,17 @@ void cacheCREATESTRUCTFields(JNIEnv *env, jobject lpObject)
CREATESTRUCT *getCREATESTRUCTFields(JNIEnv *env, jobject lpObject, CREATESTRUCT *lpStruct)
{
if (!CREATESTRUCTFc.cached) cacheCREATESTRUCTFields(env, lpObject);
- lpStruct->lpCreateParams = (LPVOID)(*env)->GetIntLongField(env, lpObject, CREATESTRUCTFc.lpCreateParams);
- lpStruct->hInstance = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, CREATESTRUCTFc.hInstance);
- lpStruct->hMenu = (HMENU)(*env)->GetIntLongField(env, lpObject, CREATESTRUCTFc.hMenu);
- lpStruct->hwndParent = (HWND)(*env)->GetIntLongField(env, lpObject, CREATESTRUCTFc.hwndParent);
+ lpStruct->lpCreateParams = (LPVOID)(*env)->GetLongField(env, lpObject, CREATESTRUCTFc.lpCreateParams);
+ lpStruct->hInstance = (HINSTANCE)(*env)->GetLongField(env, lpObject, CREATESTRUCTFc.hInstance);
+ lpStruct->hMenu = (HMENU)(*env)->GetLongField(env, lpObject, CREATESTRUCTFc.hMenu);
+ lpStruct->hwndParent = (HWND)(*env)->GetLongField(env, lpObject, CREATESTRUCTFc.hwndParent);
lpStruct->cy = (*env)->GetIntField(env, lpObject, CREATESTRUCTFc.cy);
lpStruct->cx = (*env)->GetIntField(env, lpObject, CREATESTRUCTFc.cx);
lpStruct->y = (*env)->GetIntField(env, lpObject, CREATESTRUCTFc.y);
lpStruct->x = (*env)->GetIntField(env, lpObject, CREATESTRUCTFc.x);
lpStruct->style = (*env)->GetIntField(env, lpObject, CREATESTRUCTFc.style);
- lpStruct->lpszName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, CREATESTRUCTFc.lpszName);
- lpStruct->lpszClass = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, CREATESTRUCTFc.lpszClass);
+ lpStruct->lpszName = (LPCTSTR)(*env)->GetLongField(env, lpObject, CREATESTRUCTFc.lpszName);
+ lpStruct->lpszClass = (LPCTSTR)(*env)->GetLongField(env, lpObject, CREATESTRUCTFc.lpszClass);
lpStruct->dwExStyle = (*env)->GetIntField(env, lpObject, CREATESTRUCTFc.dwExStyle);
return lpStruct;
}
@@ -984,166 +725,21 @@ CREATESTRUCT *getCREATESTRUCTFields(JNIEnv *env, jobject lpObject, CREATESTRUCT
void setCREATESTRUCTFields(JNIEnv *env, jobject lpObject, CREATESTRUCT *lpStruct)
{
if (!CREATESTRUCTFc.cached) cacheCREATESTRUCTFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, CREATESTRUCTFc.lpCreateParams, (jintLong)lpStruct->lpCreateParams);
- (*env)->SetIntLongField(env, lpObject, CREATESTRUCTFc.hInstance, (jintLong)lpStruct->hInstance);
- (*env)->SetIntLongField(env, lpObject, CREATESTRUCTFc.hMenu, (jintLong)lpStruct->hMenu);
- (*env)->SetIntLongField(env, lpObject, CREATESTRUCTFc.hwndParent, (jintLong)lpStruct->hwndParent);
+ (*env)->SetLongField(env, lpObject, CREATESTRUCTFc.lpCreateParams, (jlong)lpStruct->lpCreateParams);
+ (*env)->SetLongField(env, lpObject, CREATESTRUCTFc.hInstance, (jlong)lpStruct->hInstance);
+ (*env)->SetLongField(env, lpObject, CREATESTRUCTFc.hMenu, (jlong)lpStruct->hMenu);
+ (*env)->SetLongField(env, lpObject, CREATESTRUCTFc.hwndParent, (jlong)lpStruct->hwndParent);
(*env)->SetIntField(env, lpObject, CREATESTRUCTFc.cy, (jint)lpStruct->cy);
(*env)->SetIntField(env, lpObject, CREATESTRUCTFc.cx, (jint)lpStruct->cx);
(*env)->SetIntField(env, lpObject, CREATESTRUCTFc.y, (jint)lpStruct->y);
(*env)->SetIntField(env, lpObject, CREATESTRUCTFc.x, (jint)lpStruct->x);
(*env)->SetIntField(env, lpObject, CREATESTRUCTFc.style, (jint)lpStruct->style);
- (*env)->SetIntLongField(env, lpObject, CREATESTRUCTFc.lpszName, (jintLong)lpStruct->lpszName);
- (*env)->SetIntLongField(env, lpObject, CREATESTRUCTFc.lpszClass, (jintLong)lpStruct->lpszClass);
+ (*env)->SetLongField(env, lpObject, CREATESTRUCTFc.lpszName, (jlong)lpStruct->lpszName);
+ (*env)->SetLongField(env, lpObject, CREATESTRUCTFc.lpszClass, (jlong)lpStruct->lpszClass);
(*env)->SetIntField(env, lpObject, CREATESTRUCTFc.dwExStyle, (jint)lpStruct->dwExStyle);
}
#endif
-#ifndef NO_CRYPT_ALGORITHM_IDENTIFIER
-typedef struct CRYPT_ALGORITHM_IDENTIFIER_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID pszObjId, Parameters;
-} CRYPT_ALGORITHM_IDENTIFIER_FID_CACHE;
-
-CRYPT_ALGORITHM_IDENTIFIER_FID_CACHE CRYPT_ALGORITHM_IDENTIFIERFc;
-
-void cacheCRYPT_ALGORITHM_IDENTIFIERFields(JNIEnv *env, jobject lpObject)
-{
- if (CRYPT_ALGORITHM_IDENTIFIERFc.cached) return;
- CRYPT_ALGORITHM_IDENTIFIERFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CRYPT_ALGORITHM_IDENTIFIERFc.pszObjId = (*env)->GetFieldID(env, CRYPT_ALGORITHM_IDENTIFIERFc.clazz, "pszObjId", I_J);
- CRYPT_ALGORITHM_IDENTIFIERFc.Parameters = (*env)->GetFieldID(env, CRYPT_ALGORITHM_IDENTIFIERFc.clazz, "Parameters", "Lorg/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB;");
- CRYPT_ALGORITHM_IDENTIFIERFc.cached = 1;
-}
-
-CRYPT_ALGORITHM_IDENTIFIER *getCRYPT_ALGORITHM_IDENTIFIERFields(JNIEnv *env, jobject lpObject, CRYPT_ALGORITHM_IDENTIFIER *lpStruct)
-{
- if (!CRYPT_ALGORITHM_IDENTIFIERFc.cached) cacheCRYPT_ALGORITHM_IDENTIFIERFields(env, lpObject);
- lpStruct->pszObjId = (LPSTR)(*env)->GetIntLongField(env, lpObject, CRYPT_ALGORITHM_IDENTIFIERFc.pszObjId);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CRYPT_ALGORITHM_IDENTIFIERFc.Parameters);
- if (lpObject1 != NULL) getCRYPT_OBJID_BLOBFields(env, lpObject1, &lpStruct->Parameters);
- }
- return lpStruct;
-}
-
-void setCRYPT_ALGORITHM_IDENTIFIERFields(JNIEnv *env, jobject lpObject, CRYPT_ALGORITHM_IDENTIFIER *lpStruct)
-{
- if (!CRYPT_ALGORITHM_IDENTIFIERFc.cached) cacheCRYPT_ALGORITHM_IDENTIFIERFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, CRYPT_ALGORITHM_IDENTIFIERFc.pszObjId, (jintLong)lpStruct->pszObjId);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, CRYPT_ALGORITHM_IDENTIFIERFc.Parameters);
- if (lpObject1 != NULL) setCRYPT_OBJID_BLOBFields(env, lpObject1, &lpStruct->Parameters);
- }
-}
-#endif
-
-#ifndef NO_CRYPT_BIT_BLOB
-typedef struct CRYPT_BIT_BLOB_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID cbData, pbData, cUnusedBits;
-} CRYPT_BIT_BLOB_FID_CACHE;
-
-CRYPT_BIT_BLOB_FID_CACHE CRYPT_BIT_BLOBFc;
-
-void cacheCRYPT_BIT_BLOBFields(JNIEnv *env, jobject lpObject)
-{
- if (CRYPT_BIT_BLOBFc.cached) return;
- CRYPT_BIT_BLOBFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CRYPT_BIT_BLOBFc.cbData = (*env)->GetFieldID(env, CRYPT_BIT_BLOBFc.clazz, "cbData", "I");
- CRYPT_BIT_BLOBFc.pbData = (*env)->GetFieldID(env, CRYPT_BIT_BLOBFc.clazz, "pbData", I_J);
- CRYPT_BIT_BLOBFc.cUnusedBits = (*env)->GetFieldID(env, CRYPT_BIT_BLOBFc.clazz, "cUnusedBits", "I");
- CRYPT_BIT_BLOBFc.cached = 1;
-}
-
-CRYPT_BIT_BLOB *getCRYPT_BIT_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_BIT_BLOB *lpStruct)
-{
- if (!CRYPT_BIT_BLOBFc.cached) cacheCRYPT_BIT_BLOBFields(env, lpObject);
- lpStruct->cbData = (*env)->GetIntField(env, lpObject, CRYPT_BIT_BLOBFc.cbData);
- lpStruct->pbData = (BYTE *)(*env)->GetIntLongField(env, lpObject, CRYPT_BIT_BLOBFc.pbData);
- lpStruct->cUnusedBits = (*env)->GetIntField(env, lpObject, CRYPT_BIT_BLOBFc.cUnusedBits);
- return lpStruct;
-}
-
-void setCRYPT_BIT_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_BIT_BLOB *lpStruct)
-{
- if (!CRYPT_BIT_BLOBFc.cached) cacheCRYPT_BIT_BLOBFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, CRYPT_BIT_BLOBFc.cbData, (jint)lpStruct->cbData);
- (*env)->SetIntLongField(env, lpObject, CRYPT_BIT_BLOBFc.pbData, (jintLong)lpStruct->pbData);
- (*env)->SetIntField(env, lpObject, CRYPT_BIT_BLOBFc.cUnusedBits, (jint)lpStruct->cUnusedBits);
-}
-#endif
-
-#ifndef NO_CRYPT_INTEGER_BLOB
-typedef struct CRYPT_INTEGER_BLOB_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID cbData, pbData;
-} CRYPT_INTEGER_BLOB_FID_CACHE;
-
-CRYPT_INTEGER_BLOB_FID_CACHE CRYPT_INTEGER_BLOBFc;
-
-void cacheCRYPT_INTEGER_BLOBFields(JNIEnv *env, jobject lpObject)
-{
- if (CRYPT_INTEGER_BLOBFc.cached) return;
- CRYPT_INTEGER_BLOBFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CRYPT_INTEGER_BLOBFc.cbData = (*env)->GetFieldID(env, CRYPT_INTEGER_BLOBFc.clazz, "cbData", "I");
- CRYPT_INTEGER_BLOBFc.pbData = (*env)->GetFieldID(env, CRYPT_INTEGER_BLOBFc.clazz, "pbData", I_J);
- CRYPT_INTEGER_BLOBFc.cached = 1;
-}
-
-CRYPT_INTEGER_BLOB *getCRYPT_INTEGER_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_INTEGER_BLOB *lpStruct)
-{
- if (!CRYPT_INTEGER_BLOBFc.cached) cacheCRYPT_INTEGER_BLOBFields(env, lpObject);
- lpStruct->cbData = (*env)->GetIntField(env, lpObject, CRYPT_INTEGER_BLOBFc.cbData);
- lpStruct->pbData = (BYTE *)(*env)->GetIntLongField(env, lpObject, CRYPT_INTEGER_BLOBFc.pbData);
- return lpStruct;
-}
-
-void setCRYPT_INTEGER_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_INTEGER_BLOB *lpStruct)
-{
- if (!CRYPT_INTEGER_BLOBFc.cached) cacheCRYPT_INTEGER_BLOBFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, CRYPT_INTEGER_BLOBFc.cbData, (jint)lpStruct->cbData);
- (*env)->SetIntLongField(env, lpObject, CRYPT_INTEGER_BLOBFc.pbData, (jintLong)lpStruct->pbData);
-}
-#endif
-
-#ifndef NO_CRYPT_OBJID_BLOB
-typedef struct CRYPT_OBJID_BLOB_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID cbData, pbData;
-} CRYPT_OBJID_BLOB_FID_CACHE;
-
-CRYPT_OBJID_BLOB_FID_CACHE CRYPT_OBJID_BLOBFc;
-
-void cacheCRYPT_OBJID_BLOBFields(JNIEnv *env, jobject lpObject)
-{
- if (CRYPT_OBJID_BLOBFc.cached) return;
- CRYPT_OBJID_BLOBFc.clazz = (*env)->GetObjectClass(env, lpObject);
- CRYPT_OBJID_BLOBFc.cbData = (*env)->GetFieldID(env, CRYPT_OBJID_BLOBFc.clazz, "cbData", "I");
- CRYPT_OBJID_BLOBFc.pbData = (*env)->GetFieldID(env, CRYPT_OBJID_BLOBFc.clazz, "pbData", I_J);
- CRYPT_OBJID_BLOBFc.cached = 1;
-}
-
-CRYPT_OBJID_BLOB *getCRYPT_OBJID_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_OBJID_BLOB *lpStruct)
-{
- if (!CRYPT_OBJID_BLOBFc.cached) cacheCRYPT_OBJID_BLOBFields(env, lpObject);
- lpStruct->cbData = (*env)->GetIntField(env, lpObject, CRYPT_OBJID_BLOBFc.cbData);
- lpStruct->pbData = (BYTE *)(*env)->GetIntLongField(env, lpObject, CRYPT_OBJID_BLOBFc.pbData);
- return lpStruct;
-}
-
-void setCRYPT_OBJID_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_OBJID_BLOB *lpStruct)
-{
- if (!CRYPT_OBJID_BLOBFc.cached) cacheCRYPT_OBJID_BLOBFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, CRYPT_OBJID_BLOBFc.cbData, (jint)lpStruct->cbData);
- (*env)->SetIntLongField(env, lpObject, CRYPT_OBJID_BLOBFc.pbData, (jintLong)lpStruct->pbData);
-}
-#endif
-
#ifndef NO_DEVMODE
typedef struct DEVMODE_FID_CACHE {
int cached;
@@ -1314,7 +910,7 @@ void cacheDIBSECTIONFields(JNIEnv *env, jobject lpObject)
DIBSECTIONFc.dsBitfields0 = (*env)->GetFieldID(env, DIBSECTIONFc.clazz, "dsBitfields0", "I");
DIBSECTIONFc.dsBitfields1 = (*env)->GetFieldID(env, DIBSECTIONFc.clazz, "dsBitfields1", "I");
DIBSECTIONFc.dsBitfields2 = (*env)->GetFieldID(env, DIBSECTIONFc.clazz, "dsBitfields2", "I");
- DIBSECTIONFc.dshSection = (*env)->GetFieldID(env, DIBSECTIONFc.clazz, "dshSection", I_J);
+ DIBSECTIONFc.dshSection = (*env)->GetFieldID(env, DIBSECTIONFc.clazz, "dshSection", "J");
DIBSECTIONFc.dsOffset = (*env)->GetFieldID(env, DIBSECTIONFc.clazz, "dsOffset", "I");
DIBSECTIONFc.cached = 1;
}
@@ -1337,7 +933,7 @@ DIBSECTION *getDIBSECTIONFields(JNIEnv *env, jobject lpObject, DIBSECTION *lpStr
lpStruct->dsBitfields[0] = (*env)->GetIntField(env, lpObject, DIBSECTIONFc.dsBitfields0);
lpStruct->dsBitfields[1] = (*env)->GetIntField(env, lpObject, DIBSECTIONFc.dsBitfields1);
lpStruct->dsBitfields[2] = (*env)->GetIntField(env, lpObject, DIBSECTIONFc.dsBitfields2);
- lpStruct->dshSection = (HANDLE)(*env)->GetIntLongField(env, lpObject, DIBSECTIONFc.dshSection);
+ lpStruct->dshSection = (HANDLE)(*env)->GetLongField(env, lpObject, DIBSECTIONFc.dshSection);
lpStruct->dsOffset = (*env)->GetIntField(env, lpObject, DIBSECTIONFc.dsOffset);
return lpStruct;
}
@@ -1360,7 +956,7 @@ void setDIBSECTIONFields(JNIEnv *env, jobject lpObject, DIBSECTION *lpStruct)
(*env)->SetIntField(env, lpObject, DIBSECTIONFc.dsBitfields0, (jint)lpStruct->dsBitfields[0]);
(*env)->SetIntField(env, lpObject, DIBSECTIONFc.dsBitfields1, (jint)lpStruct->dsBitfields[1]);
(*env)->SetIntField(env, lpObject, DIBSECTIONFc.dsBitfields2, (jint)lpStruct->dsBitfields[2]);
- (*env)->SetIntLongField(env, lpObject, DIBSECTIONFc.dshSection, (jintLong)lpStruct->dshSection);
+ (*env)->SetLongField(env, lpObject, DIBSECTIONFc.dshSection, (jlong)lpStruct->dshSection);
(*env)->SetIntField(env, lpObject, DIBSECTIONFc.dsOffset, (jint)lpStruct->dsOffset);
}
#endif
@@ -1381,8 +977,8 @@ void cacheDOCHOSTUIINFOFields(JNIEnv *env, jobject lpObject)
DOCHOSTUIINFOFc.cbSize = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "cbSize", "I");
DOCHOSTUIINFOFc.dwFlags = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "dwFlags", "I");
DOCHOSTUIINFOFc.dwDoubleClick = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "dwDoubleClick", "I");
- DOCHOSTUIINFOFc.pchHostCss = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "pchHostCss", I_J);
- DOCHOSTUIINFOFc.pchHostNS = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "pchHostNS", I_J);
+ DOCHOSTUIINFOFc.pchHostCss = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "pchHostCss", "J");
+ DOCHOSTUIINFOFc.pchHostNS = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "pchHostNS", "J");
DOCHOSTUIINFOFc.cached = 1;
}
@@ -1392,8 +988,8 @@ DOCHOSTUIINFO *getDOCHOSTUIINFOFields(JNIEnv *env, jobject lpObject, DOCHOSTUIIN
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, DOCHOSTUIINFOFc.cbSize);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, DOCHOSTUIINFOFc.dwFlags);
lpStruct->dwDoubleClick = (*env)->GetIntField(env, lpObject, DOCHOSTUIINFOFc.dwDoubleClick);
- lpStruct->pchHostCss = (OLECHAR *)(*env)->GetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostCss);
- lpStruct->pchHostNS = (OLECHAR *)(*env)->GetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostNS);
+ lpStruct->pchHostCss = (OLECHAR *)(*env)->GetLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostCss);
+ lpStruct->pchHostNS = (OLECHAR *)(*env)->GetLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostNS);
return lpStruct;
}
@@ -1403,8 +999,8 @@ void setDOCHOSTUIINFOFields(JNIEnv *env, jobject lpObject, DOCHOSTUIINFO *lpStru
(*env)->SetIntField(env, lpObject, DOCHOSTUIINFOFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, DOCHOSTUIINFOFc.dwFlags, (jint)lpStruct->dwFlags);
(*env)->SetIntField(env, lpObject, DOCHOSTUIINFOFc.dwDoubleClick, (jint)lpStruct->dwDoubleClick);
- (*env)->SetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostCss, (jintLong)lpStruct->pchHostCss);
- (*env)->SetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostNS, (jintLong)lpStruct->pchHostNS);
+ (*env)->SetLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostCss, (jlong)lpStruct->pchHostCss);
+ (*env)->SetLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostNS, (jlong)lpStruct->pchHostNS);
}
#endif
@@ -1422,9 +1018,9 @@ void cacheDOCINFOFields(JNIEnv *env, jobject lpObject)
if (DOCINFOFc.cached) return;
DOCINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
DOCINFOFc.cbSize = (*env)->GetFieldID(env, DOCINFOFc.clazz, "cbSize", "I");
- DOCINFOFc.lpszDocName = (*env)->GetFieldID(env, DOCINFOFc.clazz, "lpszDocName", I_J);
- DOCINFOFc.lpszOutput = (*env)->GetFieldID(env, DOCINFOFc.clazz, "lpszOutput", I_J);
- DOCINFOFc.lpszDatatype = (*env)->GetFieldID(env, DOCINFOFc.clazz, "lpszDatatype", I_J);
+ DOCINFOFc.lpszDocName = (*env)->GetFieldID(env, DOCINFOFc.clazz, "lpszDocName", "J");
+ DOCINFOFc.lpszOutput = (*env)->GetFieldID(env, DOCINFOFc.clazz, "lpszOutput", "J");
+ DOCINFOFc.lpszDatatype = (*env)->GetFieldID(env, DOCINFOFc.clazz, "lpszDatatype", "J");
DOCINFOFc.fwType = (*env)->GetFieldID(env, DOCINFOFc.clazz, "fwType", "I");
DOCINFOFc.cached = 1;
}
@@ -1433,9 +1029,9 @@ DOCINFO *getDOCINFOFields(JNIEnv *env, jobject lpObject, DOCINFO *lpStruct)
{
if (!DOCINFOFc.cached) cacheDOCINFOFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, DOCINFOFc.cbSize);
- lpStruct->lpszDocName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, DOCINFOFc.lpszDocName);
- lpStruct->lpszOutput = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, DOCINFOFc.lpszOutput);
- lpStruct->lpszDatatype = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, DOCINFOFc.lpszDatatype);
+ lpStruct->lpszDocName = (LPCTSTR)(*env)->GetLongField(env, lpObject, DOCINFOFc.lpszDocName);
+ lpStruct->lpszOutput = (LPCTSTR)(*env)->GetLongField(env, lpObject, DOCINFOFc.lpszOutput);
+ lpStruct->lpszDatatype = (LPCTSTR)(*env)->GetLongField(env, lpObject, DOCINFOFc.lpszDatatype);
lpStruct->fwType = (*env)->GetIntField(env, lpObject, DOCINFOFc.fwType);
return lpStruct;
}
@@ -1444,9 +1040,9 @@ void setDOCINFOFields(JNIEnv *env, jobject lpObject, DOCINFO *lpStruct)
{
if (!DOCINFOFc.cached) cacheDOCINFOFields(env, lpObject);
(*env)->SetIntField(env, lpObject, DOCINFOFc.cbSize, (jint)lpStruct->cbSize);
- (*env)->SetIntLongField(env, lpObject, DOCINFOFc.lpszDocName, (jintLong)lpStruct->lpszDocName);
- (*env)->SetIntLongField(env, lpObject, DOCINFOFc.lpszOutput, (jintLong)lpStruct->lpszOutput);
- (*env)->SetIntLongField(env, lpObject, DOCINFOFc.lpszDatatype, (jintLong)lpStruct->lpszDatatype);
+ (*env)->SetLongField(env, lpObject, DOCINFOFc.lpszDocName, (jlong)lpStruct->lpszDocName);
+ (*env)->SetLongField(env, lpObject, DOCINFOFc.lpszOutput, (jlong)lpStruct->lpszOutput);
+ (*env)->SetLongField(env, lpObject, DOCINFOFc.lpszDatatype, (jlong)lpStruct->lpszDatatype);
(*env)->SetIntField(env, lpObject, DOCINFOFc.fwType, (jint)lpStruct->fwType);
}
#endif
@@ -1469,13 +1065,13 @@ void cacheDRAWITEMSTRUCTFields(JNIEnv *env, jobject lpObject)
DRAWITEMSTRUCTFc.itemID = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "itemID", "I");
DRAWITEMSTRUCTFc.itemAction = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "itemAction", "I");
DRAWITEMSTRUCTFc.itemState = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "itemState", "I");
- DRAWITEMSTRUCTFc.hwndItem = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "hwndItem", I_J);
- DRAWITEMSTRUCTFc.hDC = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "hDC", I_J);
+ DRAWITEMSTRUCTFc.hwndItem = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "hwndItem", "J");
+ DRAWITEMSTRUCTFc.hDC = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "hDC", "J");
DRAWITEMSTRUCTFc.left = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "left", "I");
DRAWITEMSTRUCTFc.top = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "top", "I");
DRAWITEMSTRUCTFc.bottom = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "bottom", "I");
DRAWITEMSTRUCTFc.right = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "right", "I");
- DRAWITEMSTRUCTFc.itemData = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "itemData", I_J);
+ DRAWITEMSTRUCTFc.itemData = (*env)->GetFieldID(env, DRAWITEMSTRUCTFc.clazz, "itemData", "J");
DRAWITEMSTRUCTFc.cached = 1;
}
@@ -1487,13 +1083,13 @@ DRAWITEMSTRUCT *getDRAWITEMSTRUCTFields(JNIEnv *env, jobject lpObject, DRAWITEMS
lpStruct->itemID = (*env)->GetIntField(env, lpObject, DRAWITEMSTRUCTFc.itemID);
lpStruct->itemAction = (*env)->GetIntField(env, lpObject, DRAWITEMSTRUCTFc.itemAction);
lpStruct->itemState = (*env)->GetIntField(env, lpObject, DRAWITEMSTRUCTFc.itemState);
- lpStruct->hwndItem = (HWND)(*env)->GetIntLongField(env, lpObject, DRAWITEMSTRUCTFc.hwndItem);
- lpStruct->hDC = (HDC)(*env)->GetIntLongField(env, lpObject, DRAWITEMSTRUCTFc.hDC);
+ lpStruct->hwndItem = (HWND)(*env)->GetLongField(env, lpObject, DRAWITEMSTRUCTFc.hwndItem);
+ lpStruct->hDC = (HDC)(*env)->GetLongField(env, lpObject, DRAWITEMSTRUCTFc.hDC);
lpStruct->rcItem.left = (*env)->GetIntField(env, lpObject, DRAWITEMSTRUCTFc.left);
lpStruct->rcItem.top = (*env)->GetIntField(env, lpObject, DRAWITEMSTRUCTFc.top);
lpStruct->rcItem.bottom = (*env)->GetIntField(env, lpObject, DRAWITEMSTRUCTFc.bottom);
lpStruct->rcItem.right = (*env)->GetIntField(env, lpObject, DRAWITEMSTRUCTFc.right);
- lpStruct->itemData = (*env)->GetIntLongField(env, lpObject, DRAWITEMSTRUCTFc.itemData);
+ lpStruct->itemData = (*env)->GetLongField(env, lpObject, DRAWITEMSTRUCTFc.itemData);
return lpStruct;
}
@@ -1505,13 +1101,13 @@ void setDRAWITEMSTRUCTFields(JNIEnv *env, jobject lpObject, DRAWITEMSTRUCT *lpSt
(*env)->SetIntField(env, lpObject, DRAWITEMSTRUCTFc.itemID, (jint)lpStruct->itemID);
(*env)->SetIntField(env, lpObject, DRAWITEMSTRUCTFc.itemAction, (jint)lpStruct->itemAction);
(*env)->SetIntField(env, lpObject, DRAWITEMSTRUCTFc.itemState, (jint)lpStruct->itemState);
- (*env)->SetIntLongField(env, lpObject, DRAWITEMSTRUCTFc.hwndItem, (jintLong)lpStruct->hwndItem);
- (*env)->SetIntLongField(env, lpObject, DRAWITEMSTRUCTFc.hDC, (jintLong)lpStruct->hDC);
+ (*env)->SetLongField(env, lpObject, DRAWITEMSTRUCTFc.hwndItem, (jlong)lpStruct->hwndItem);
+ (*env)->SetLongField(env, lpObject, DRAWITEMSTRUCTFc.hDC, (jlong)lpStruct->hDC);
(*env)->SetIntField(env, lpObject, DRAWITEMSTRUCTFc.left, (jint)lpStruct->rcItem.left);
(*env)->SetIntField(env, lpObject, DRAWITEMSTRUCTFc.top, (jint)lpStruct->rcItem.top);
(*env)->SetIntField(env, lpObject, DRAWITEMSTRUCTFc.bottom, (jint)lpStruct->rcItem.bottom);
(*env)->SetIntField(env, lpObject, DRAWITEMSTRUCTFc.right, (jint)lpStruct->rcItem.right);
- (*env)->SetIntLongField(env, lpObject, DRAWITEMSTRUCTFc.itemData, (jintLong)lpStruct->itemData);
+ (*env)->SetLongField(env, lpObject, DRAWITEMSTRUCTFc.itemData, (jlong)lpStruct->itemData);
}
#endif
@@ -1558,85 +1154,6 @@ void setDROPFILESFields(JNIEnv *env, jobject lpObject, DROPFILES *lpStruct)
}
#endif
-#ifndef NO_DTTOPTS
-typedef struct DTTOPTS_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID dwSize, dwFlags, crText, crBorder, crShadow, iTextShadowType, ptShadowOffset, iBorderSize, iFontPropId, iColorPropId, iStateId, fApplyOverlay, iGlowSize, pfnDrawTextCallback, lParam;
-} DTTOPTS_FID_CACHE;
-
-DTTOPTS_FID_CACHE DTTOPTSFc;
-
-void cacheDTTOPTSFields(JNIEnv *env, jobject lpObject)
-{
- if (DTTOPTSFc.cached) return;
- DTTOPTSFc.clazz = (*env)->GetObjectClass(env, lpObject);
- DTTOPTSFc.dwSize = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "dwSize", "I");
- DTTOPTSFc.dwFlags = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "dwFlags", "I");
- DTTOPTSFc.crText = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "crText", "I");
- DTTOPTSFc.crBorder = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "crBorder", "I");
- DTTOPTSFc.crShadow = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "crShadow", "I");
- DTTOPTSFc.iTextShadowType = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "iTextShadowType", "I");
- DTTOPTSFc.ptShadowOffset = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "ptShadowOffset", "Lorg/eclipse/swt/internal/win32/POINT;");
- DTTOPTSFc.iBorderSize = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "iBorderSize", "I");
- DTTOPTSFc.iFontPropId = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "iFontPropId", "I");
- DTTOPTSFc.iColorPropId = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "iColorPropId", "I");
- DTTOPTSFc.iStateId = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "iStateId", "I");
- DTTOPTSFc.fApplyOverlay = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "fApplyOverlay", "Z");
- DTTOPTSFc.iGlowSize = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "iGlowSize", "I");
- DTTOPTSFc.pfnDrawTextCallback = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "pfnDrawTextCallback", I_J);
- DTTOPTSFc.lParam = (*env)->GetFieldID(env, DTTOPTSFc.clazz, "lParam", I_J);
- DTTOPTSFc.cached = 1;
-}
-
-DTTOPTS *getDTTOPTSFields(JNIEnv *env, jobject lpObject, DTTOPTS *lpStruct)
-{
- if (!DTTOPTSFc.cached) cacheDTTOPTSFields(env, lpObject);
- lpStruct->dwSize = (*env)->GetIntField(env, lpObject, DTTOPTSFc.dwSize);
- lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, DTTOPTSFc.dwFlags);
- lpStruct->crText = (*env)->GetIntField(env, lpObject, DTTOPTSFc.crText);
- lpStruct->crBorder = (*env)->GetIntField(env, lpObject, DTTOPTSFc.crBorder);
- lpStruct->crShadow = (*env)->GetIntField(env, lpObject, DTTOPTSFc.crShadow);
- lpStruct->iTextShadowType = (*env)->GetIntField(env, lpObject, DTTOPTSFc.iTextShadowType);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, DTTOPTSFc.ptShadowOffset);
- if (lpObject1 != NULL) getPOINTFields(env, lpObject1, &lpStruct->ptShadowOffset);
- }
- lpStruct->iBorderSize = (*env)->GetIntField(env, lpObject, DTTOPTSFc.iBorderSize);
- lpStruct->iFontPropId = (*env)->GetIntField(env, lpObject, DTTOPTSFc.iFontPropId);
- lpStruct->iColorPropId = (*env)->GetIntField(env, lpObject, DTTOPTSFc.iColorPropId);
- lpStruct->iStateId = (*env)->GetIntField(env, lpObject, DTTOPTSFc.iStateId);
- lpStruct->fApplyOverlay = (*env)->GetBooleanField(env, lpObject, DTTOPTSFc.fApplyOverlay);
- lpStruct->iGlowSize = (*env)->GetIntField(env, lpObject, DTTOPTSFc.iGlowSize);
- lpStruct->pfnDrawTextCallback = (DTT_CALLBACK_PROC)(*env)->GetIntLongField(env, lpObject, DTTOPTSFc.pfnDrawTextCallback);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, DTTOPTSFc.lParam);
- return lpStruct;
-}
-
-void setDTTOPTSFields(JNIEnv *env, jobject lpObject, DTTOPTS *lpStruct)
-{
- if (!DTTOPTSFc.cached) cacheDTTOPTSFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.dwSize, (jint)lpStruct->dwSize);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.crText, (jint)lpStruct->crText);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.crBorder, (jint)lpStruct->crBorder);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.crShadow, (jint)lpStruct->crShadow);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.iTextShadowType, (jint)lpStruct->iTextShadowType);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, DTTOPTSFc.ptShadowOffset);
- if (lpObject1 != NULL) setPOINTFields(env, lpObject1, &lpStruct->ptShadowOffset);
- }
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.iBorderSize, (jint)lpStruct->iBorderSize);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.iFontPropId, (jint)lpStruct->iFontPropId);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.iColorPropId, (jint)lpStruct->iColorPropId);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.iStateId, (jint)lpStruct->iStateId);
- (*env)->SetBooleanField(env, lpObject, DTTOPTSFc.fApplyOverlay, (jboolean)lpStruct->fApplyOverlay);
- (*env)->SetIntField(env, lpObject, DTTOPTSFc.iGlowSize, (jint)lpStruct->iGlowSize);
- (*env)->SetIntLongField(env, lpObject, DTTOPTSFc.pfnDrawTextCallback, (jintLong)lpStruct->pfnDrawTextCallback);
- (*env)->SetIntLongField(env, lpObject, DTTOPTSFc.lParam, (jintLong)lpStruct->lParam);
-}
-#endif
-
#ifndef NO_EMR
typedef struct EMR_FID_CACHE {
int cached;
@@ -1724,7 +1241,7 @@ void setEMREXTCREATEFONTINDIRECTWFields(JNIEnv *env, jobject lpObject, EMREXTCRE
typedef struct EXTLOGFONTW_FID_CACHE {
int cached;
jclass clazz;
- jfieldID elfLogFont, elfFullName, elfStyle, elfVersion, elfStyleSize, elfMatch, elfReserved, elfVendorId, elfCulture, elfPanose;
+ jfieldID elfLogFont;
} EXTLOGFONTW_FID_CACHE;
EXTLOGFONTW_FID_CACHE EXTLOGFONTWFc;
@@ -1734,15 +1251,6 @@ void cacheEXTLOGFONTWFields(JNIEnv *env, jobject lpObject)
if (EXTLOGFONTWFc.cached) return;
EXTLOGFONTWFc.clazz = (*env)->GetObjectClass(env, lpObject);
EXTLOGFONTWFc.elfLogFont = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfLogFont", "Lorg/eclipse/swt/internal/win32/LOGFONT;");
- EXTLOGFONTWFc.elfFullName = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfFullName", "[C");
- EXTLOGFONTWFc.elfStyle = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfStyle", "[C");
- EXTLOGFONTWFc.elfVersion = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfVersion", "I");
- EXTLOGFONTWFc.elfStyleSize = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfStyleSize", "I");
- EXTLOGFONTWFc.elfMatch = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfMatch", "I");
- EXTLOGFONTWFc.elfReserved = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfReserved", "I");
- EXTLOGFONTWFc.elfVendorId = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfVendorId", "[B");
- EXTLOGFONTWFc.elfCulture = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfCulture", "I");
- EXTLOGFONTWFc.elfPanose = (*env)->GetFieldID(env, EXTLOGFONTWFc.clazz, "elfPanose", "Lorg/eclipse/swt/internal/win32/PANOSE;");
EXTLOGFONTWFc.cached = 1;
}
@@ -1753,27 +1261,6 @@ EXTLOGFONTW *getEXTLOGFONTWFields(JNIEnv *env, jobject lpObject, EXTLOGFONTW *lp
jobject lpObject1 = (*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfLogFont);
if (lpObject1 != NULL) getLOGFONTFields(env, lpObject1, &lpStruct->elfLogFont);
}
- {
- jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfFullName);
- (*env)->GetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->elfFullName) / sizeof(jchar), (jchar *)lpStruct->elfFullName);
- }
- {
- jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfStyle);
- (*env)->GetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->elfStyle) / sizeof(jchar), (jchar *)lpStruct->elfStyle);
- }
- lpStruct->elfVersion = (*env)->GetIntField(env, lpObject, EXTLOGFONTWFc.elfVersion);
- lpStruct->elfStyleSize = (*env)->GetIntField(env, lpObject, EXTLOGFONTWFc.elfStyleSize);
- lpStruct->elfMatch = (*env)->GetIntField(env, lpObject, EXTLOGFONTWFc.elfMatch);
- lpStruct->elfReserved = (*env)->GetIntField(env, lpObject, EXTLOGFONTWFc.elfReserved);
- {
- jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfVendorId);
- (*env)->GetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->elfVendorId), (jbyte *)lpStruct->elfVendorId);
- }
- lpStruct->elfCulture = (*env)->GetIntField(env, lpObject, EXTLOGFONTWFc.elfCulture);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfPanose);
- if (lpObject1 != NULL) getPANOSEFields(env, lpObject1, &lpStruct->elfPanose);
- }
return lpStruct;
}
@@ -1784,61 +1271,6 @@ void setEXTLOGFONTWFields(JNIEnv *env, jobject lpObject, EXTLOGFONTW *lpStruct)
jobject lpObject1 = (*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfLogFont);
if (lpObject1 != NULL) setLOGFONTFields(env, lpObject1, &lpStruct->elfLogFont);
}
- {
- jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfFullName);
- (*env)->SetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->elfFullName) / sizeof(jchar), (jchar *)lpStruct->elfFullName);
- }
- {
- jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfStyle);
- (*env)->SetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->elfStyle) / sizeof(jchar), (jchar *)lpStruct->elfStyle);
- }
- (*env)->SetIntField(env, lpObject, EXTLOGFONTWFc.elfVersion, (jint)lpStruct->elfVersion);
- (*env)->SetIntField(env, lpObject, EXTLOGFONTWFc.elfStyleSize, (jint)lpStruct->elfStyleSize);
- (*env)->SetIntField(env, lpObject, EXTLOGFONTWFc.elfMatch, (jint)lpStruct->elfMatch);
- (*env)->SetIntField(env, lpObject, EXTLOGFONTWFc.elfReserved, (jint)lpStruct->elfReserved);
- {
- jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfVendorId);
- (*env)->SetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->elfVendorId), (jbyte *)lpStruct->elfVendorId);
- }
- (*env)->SetIntField(env, lpObject, EXTLOGFONTWFc.elfCulture, (jint)lpStruct->elfCulture);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, EXTLOGFONTWFc.elfPanose);
- if (lpObject1 != NULL) setPANOSEFields(env, lpObject1, &lpStruct->elfPanose);
- }
-}
-#endif
-
-#ifndef NO_FILETIME
-typedef struct FILETIME_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID dwLowDateTime, dwHighDateTime;
-} FILETIME_FID_CACHE;
-
-FILETIME_FID_CACHE FILETIMEFc;
-
-void cacheFILETIMEFields(JNIEnv *env, jobject lpObject)
-{
- if (FILETIMEFc.cached) return;
- FILETIMEFc.clazz = (*env)->GetObjectClass(env, lpObject);
- FILETIMEFc.dwLowDateTime = (*env)->GetFieldID(env, FILETIMEFc.clazz, "dwLowDateTime", "I");
- FILETIMEFc.dwHighDateTime = (*env)->GetFieldID(env, FILETIMEFc.clazz, "dwHighDateTime", "I");
- FILETIMEFc.cached = 1;
-}
-
-FILETIME *getFILETIMEFields(JNIEnv *env, jobject lpObject, FILETIME *lpStruct)
-{
- if (!FILETIMEFc.cached) cacheFILETIMEFields(env, lpObject);
- lpStruct->dwLowDateTime = (*env)->GetIntField(env, lpObject, FILETIMEFc.dwLowDateTime);
- lpStruct->dwHighDateTime = (*env)->GetIntField(env, lpObject, FILETIMEFc.dwHighDateTime);
- return lpStruct;
-}
-
-void setFILETIMEFields(JNIEnv *env, jobject lpObject, FILETIME *lpStruct)
-{
- if (!FILETIMEFc.cached) cacheFILETIMEFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, FILETIMEFc.dwLowDateTime, (jint)lpStruct->dwLowDateTime);
- (*env)->SetIntField(env, lpObject, FILETIMEFc.dwHighDateTime, (jint)lpStruct->dwHighDateTime);
}
#endif
@@ -1948,12 +1380,12 @@ void cacheGCP_RESULTSFields(JNIEnv *env, jobject lpObject)
if (GCP_RESULTSFc.cached) return;
GCP_RESULTSFc.clazz = (*env)->GetObjectClass(env, lpObject);
GCP_RESULTSFc.lStructSize = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lStructSize", "I");
- GCP_RESULTSFc.lpOutString = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpOutString", I_J);
- GCP_RESULTSFc.lpOrder = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpOrder", I_J);
- GCP_RESULTSFc.lpDx = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpDx", I_J);
- GCP_RESULTSFc.lpCaretPos = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpCaretPos", I_J);
- GCP_RESULTSFc.lpClass = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpClass", I_J);
- GCP_RESULTSFc.lpGlyphs = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpGlyphs", I_J);
+ GCP_RESULTSFc.lpOutString = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpOutString", "J");
+ GCP_RESULTSFc.lpOrder = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpOrder", "J");
+ GCP_RESULTSFc.lpDx = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpDx", "J");
+ GCP_RESULTSFc.lpCaretPos = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpCaretPos", "J");
+ GCP_RESULTSFc.lpClass = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpClass", "J");
+ GCP_RESULTSFc.lpGlyphs = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "lpGlyphs", "J");
GCP_RESULTSFc.nGlyphs = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "nGlyphs", "I");
GCP_RESULTSFc.nMaxFit = (*env)->GetFieldID(env, GCP_RESULTSFc.clazz, "nMaxFit", "I");
GCP_RESULTSFc.cached = 1;
@@ -1963,12 +1395,12 @@ GCP_RESULTS *getGCP_RESULTSFields(JNIEnv *env, jobject lpObject, GCP_RESULTS *lp
{
if (!GCP_RESULTSFc.cached) cacheGCP_RESULTSFields(env, lpObject);
lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, GCP_RESULTSFc.lStructSize);
- lpStruct->lpOutString = (LPTSTR)(*env)->GetIntLongField(env, lpObject, GCP_RESULTSFc.lpOutString);
- lpStruct->lpOrder = (UINT *)(*env)->GetIntLongField(env, lpObject, GCP_RESULTSFc.lpOrder);
- lpStruct->lpDx = (int *)(*env)->GetIntLongField(env, lpObject, GCP_RESULTSFc.lpDx);
- lpStruct->lpCaretPos = (int *)(*env)->GetIntLongField(env, lpObject, GCP_RESULTSFc.lpCaretPos);
- lpStruct->lpClass = (LPSTR)(*env)->GetIntLongField(env, lpObject, GCP_RESULTSFc.lpClass);
- lpStruct->lpGlyphs = (LPWSTR)(*env)->GetIntLongField(env, lpObject, GCP_RESULTSFc.lpGlyphs);
+ lpStruct->lpOutString = (LPTSTR)(*env)->GetLongField(env, lpObject, GCP_RESULTSFc.lpOutString);
+ lpStruct->lpOrder = (UINT *)(*env)->GetLongField(env, lpObject, GCP_RESULTSFc.lpOrder);
+ lpStruct->lpDx = (int *)(*env)->GetLongField(env, lpObject, GCP_RESULTSFc.lpDx);
+ lpStruct->lpCaretPos = (int *)(*env)->GetLongField(env, lpObject, GCP_RESULTSFc.lpCaretPos);
+ lpStruct->lpClass = (LPSTR)(*env)->GetLongField(env, lpObject, GCP_RESULTSFc.lpClass);
+ lpStruct->lpGlyphs = (LPWSTR)(*env)->GetLongField(env, lpObject, GCP_RESULTSFc.lpGlyphs);
lpStruct->nGlyphs = (*env)->GetIntField(env, lpObject, GCP_RESULTSFc.nGlyphs);
lpStruct->nMaxFit = (*env)->GetIntField(env, lpObject, GCP_RESULTSFc.nMaxFit);
return lpStruct;
@@ -1978,12 +1410,12 @@ void setGCP_RESULTSFields(JNIEnv *env, jobject lpObject, GCP_RESULTS *lpStruct)
{
if (!GCP_RESULTSFc.cached) cacheGCP_RESULTSFields(env, lpObject);
(*env)->SetIntField(env, lpObject, GCP_RESULTSFc.lStructSize, (jint)lpStruct->lStructSize);
- (*env)->SetIntLongField(env, lpObject, GCP_RESULTSFc.lpOutString, (jintLong)lpStruct->lpOutString);
- (*env)->SetIntLongField(env, lpObject, GCP_RESULTSFc.lpOrder, (jintLong)lpStruct->lpOrder);
- (*env)->SetIntLongField(env, lpObject, GCP_RESULTSFc.lpDx, (jintLong)lpStruct->lpDx);
- (*env)->SetIntLongField(env, lpObject, GCP_RESULTSFc.lpCaretPos, (jintLong)lpStruct->lpCaretPos);
- (*env)->SetIntLongField(env, lpObject, GCP_RESULTSFc.lpClass, (jintLong)lpStruct->lpClass);
- (*env)->SetIntLongField(env, lpObject, GCP_RESULTSFc.lpGlyphs, (jintLong)lpStruct->lpGlyphs);
+ (*env)->SetLongField(env, lpObject, GCP_RESULTSFc.lpOutString, (jlong)lpStruct->lpOutString);
+ (*env)->SetLongField(env, lpObject, GCP_RESULTSFc.lpOrder, (jlong)lpStruct->lpOrder);
+ (*env)->SetLongField(env, lpObject, GCP_RESULTSFc.lpDx, (jlong)lpStruct->lpDx);
+ (*env)->SetLongField(env, lpObject, GCP_RESULTSFc.lpCaretPos, (jlong)lpStruct->lpCaretPos);
+ (*env)->SetLongField(env, lpObject, GCP_RESULTSFc.lpClass, (jlong)lpStruct->lpClass);
+ (*env)->SetLongField(env, lpObject, GCP_RESULTSFc.lpGlyphs, (jlong)lpStruct->lpGlyphs);
(*env)->SetIntField(env, lpObject, GCP_RESULTSFc.nGlyphs, (jint)lpStruct->nGlyphs);
(*env)->SetIntField(env, lpObject, GCP_RESULTSFc.nMaxFit, (jint)lpStruct->nMaxFit);
}
@@ -2042,7 +1474,7 @@ void cacheGESTUREINFOFields(JNIEnv *env, jobject lpObject)
GESTUREINFOFc.cbSize = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "cbSize", "I");
GESTUREINFOFc.dwFlags = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "dwFlags", "I");
GESTUREINFOFc.dwID = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "dwID", "I");
- GESTUREINFOFc.hwndTarget = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "hwndTarget", I_J);
+ GESTUREINFOFc.hwndTarget = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "hwndTarget", "J");
GESTUREINFOFc.x = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "x", "S");
GESTUREINFOFc.y = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "y", "S");
GESTUREINFOFc.dwInstanceID = (*env)->GetFieldID(env, GESTUREINFOFc.clazz, "dwInstanceID", "I");
@@ -2058,7 +1490,7 @@ GESTUREINFO *getGESTUREINFOFields(JNIEnv *env, jobject lpObject, GESTUREINFO *lp
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, GESTUREINFOFc.cbSize);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, GESTUREINFOFc.dwFlags);
lpStruct->dwID = (*env)->GetIntField(env, lpObject, GESTUREINFOFc.dwID);
- lpStruct->hwndTarget = (HWND)(*env)->GetIntLongField(env, lpObject, GESTUREINFOFc.hwndTarget);
+ lpStruct->hwndTarget = (HWND)(*env)->GetLongField(env, lpObject, GESTUREINFOFc.hwndTarget);
lpStruct->ptsLocation.x = (*env)->GetShortField(env, lpObject, GESTUREINFOFc.x);
lpStruct->ptsLocation.y = (*env)->GetShortField(env, lpObject, GESTUREINFOFc.y);
lpStruct->dwInstanceID = (*env)->GetIntField(env, lpObject, GESTUREINFOFc.dwInstanceID);
@@ -2074,7 +1506,7 @@ void setGESTUREINFOFields(JNIEnv *env, jobject lpObject, GESTUREINFO *lpStruct)
(*env)->SetIntField(env, lpObject, GESTUREINFOFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, GESTUREINFOFc.dwFlags, (jint)lpStruct->dwFlags);
(*env)->SetIntField(env, lpObject, GESTUREINFOFc.dwID, (jint)lpStruct->dwID);
- (*env)->SetIntLongField(env, lpObject, GESTUREINFOFc.hwndTarget, (jintLong)lpStruct->hwndTarget);
+ (*env)->SetLongField(env, lpObject, GESTUREINFOFc.hwndTarget, (jlong)lpStruct->hwndTarget);
(*env)->SetShortField(env, lpObject, GESTUREINFOFc.x, (jshort)lpStruct->ptsLocation.x);
(*env)->SetShortField(env, lpObject, GESTUREINFOFc.y, (jshort)lpStruct->ptsLocation.y);
(*env)->SetIntField(env, lpObject, GESTUREINFOFc.dwInstanceID, (jint)lpStruct->dwInstanceID);
@@ -2133,12 +1565,12 @@ void cacheGUITHREADINFOFields(JNIEnv *env, jobject lpObject)
GUITHREADINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
GUITHREADINFOFc.cbSize = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "cbSize", "I");
GUITHREADINFOFc.flags = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "flags", "I");
- GUITHREADINFOFc.hwndActive = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndActive", I_J);
- GUITHREADINFOFc.hwndFocus = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndFocus", I_J);
- GUITHREADINFOFc.hwndCapture = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndCapture", I_J);
- GUITHREADINFOFc.hwndMenuOwner = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndMenuOwner", I_J);
- GUITHREADINFOFc.hwndMoveSize = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndMoveSize", I_J);
- GUITHREADINFOFc.hwndCaret = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndCaret", I_J);
+ GUITHREADINFOFc.hwndActive = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndActive", "J");
+ GUITHREADINFOFc.hwndFocus = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndFocus", "J");
+ GUITHREADINFOFc.hwndCapture = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndCapture", "J");
+ GUITHREADINFOFc.hwndMenuOwner = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndMenuOwner", "J");
+ GUITHREADINFOFc.hwndMoveSize = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndMoveSize", "J");
+ GUITHREADINFOFc.hwndCaret = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "hwndCaret", "J");
GUITHREADINFOFc.left = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "left", "I");
GUITHREADINFOFc.top = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "top", "I");
GUITHREADINFOFc.right = (*env)->GetFieldID(env, GUITHREADINFOFc.clazz, "right", "I");
@@ -2151,12 +1583,12 @@ GUITHREADINFO *getGUITHREADINFOFields(JNIEnv *env, jobject lpObject, GUITHREADIN
if (!GUITHREADINFOFc.cached) cacheGUITHREADINFOFields(env, lpObject);
lpStruct->cbSize = (DWORD)(*env)->GetIntField(env, lpObject, GUITHREADINFOFc.cbSize);
lpStruct->flags = (DWORD)(*env)->GetIntField(env, lpObject, GUITHREADINFOFc.flags);
- lpStruct->hwndActive = (HWND)(*env)->GetIntLongField(env, lpObject, GUITHREADINFOFc.hwndActive);
- lpStruct->hwndFocus = (HWND)(*env)->GetIntLongField(env, lpObject, GUITHREADINFOFc.hwndFocus);
- lpStruct->hwndCapture = (HWND)(*env)->GetIntLongField(env, lpObject, GUITHREADINFOFc.hwndCapture);
- lpStruct->hwndMenuOwner = (HWND)(*env)->GetIntLongField(env, lpObject, GUITHREADINFOFc.hwndMenuOwner);
- lpStruct->hwndMoveSize = (HWND)(*env)->GetIntLongField(env, lpObject, GUITHREADINFOFc.hwndMoveSize);
- lpStruct->hwndCaret = (HWND)(*env)->GetIntLongField(env, lpObject, GUITHREADINFOFc.hwndCaret);
+ lpStruct->hwndActive = (HWND)(*env)->GetLongField(env, lpObject, GUITHREADINFOFc.hwndActive);
+ lpStruct->hwndFocus = (HWND)(*env)->GetLongField(env, lpObject, GUITHREADINFOFc.hwndFocus);
+ lpStruct->hwndCapture = (HWND)(*env)->GetLongField(env, lpObject, GUITHREADINFOFc.hwndCapture);
+ lpStruct->hwndMenuOwner = (HWND)(*env)->GetLongField(env, lpObject, GUITHREADINFOFc.hwndMenuOwner);
+ lpStruct->hwndMoveSize = (HWND)(*env)->GetLongField(env, lpObject, GUITHREADINFOFc.hwndMoveSize);
+ lpStruct->hwndCaret = (HWND)(*env)->GetLongField(env, lpObject, GUITHREADINFOFc.hwndCaret);
lpStruct->rcCaret.left = (*env)->GetIntField(env, lpObject, GUITHREADINFOFc.left);
lpStruct->rcCaret.top = (*env)->GetIntField(env, lpObject, GUITHREADINFOFc.top);
lpStruct->rcCaret.right = (*env)->GetIntField(env, lpObject, GUITHREADINFOFc.right);
@@ -2169,12 +1601,12 @@ void setGUITHREADINFOFields(JNIEnv *env, jobject lpObject, GUITHREADINFO *lpStru
if (!GUITHREADINFOFc.cached) cacheGUITHREADINFOFields(env, lpObject);
(*env)->SetIntField(env, lpObject, GUITHREADINFOFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, GUITHREADINFOFc.flags, (jint)lpStruct->flags);
- (*env)->SetIntLongField(env, lpObject, GUITHREADINFOFc.hwndActive, (jintLong)lpStruct->hwndActive);
- (*env)->SetIntLongField(env, lpObject, GUITHREADINFOFc.hwndFocus, (jintLong)lpStruct->hwndFocus);
- (*env)->SetIntLongField(env, lpObject, GUITHREADINFOFc.hwndCapture, (jintLong)lpStruct->hwndCapture);
- (*env)->SetIntLongField(env, lpObject, GUITHREADINFOFc.hwndMenuOwner, (jintLong)lpStruct->hwndMenuOwner);
- (*env)->SetIntLongField(env, lpObject, GUITHREADINFOFc.hwndMoveSize, (jintLong)lpStruct->hwndMoveSize);
- (*env)->SetIntLongField(env, lpObject, GUITHREADINFOFc.hwndCaret, (jintLong)lpStruct->hwndCaret);
+ (*env)->SetLongField(env, lpObject, GUITHREADINFOFc.hwndActive, (jlong)lpStruct->hwndActive);
+ (*env)->SetLongField(env, lpObject, GUITHREADINFOFc.hwndFocus, (jlong)lpStruct->hwndFocus);
+ (*env)->SetLongField(env, lpObject, GUITHREADINFOFc.hwndCapture, (jlong)lpStruct->hwndCapture);
+ (*env)->SetLongField(env, lpObject, GUITHREADINFOFc.hwndMenuOwner, (jlong)lpStruct->hwndMenuOwner);
+ (*env)->SetLongField(env, lpObject, GUITHREADINFOFc.hwndMoveSize, (jlong)lpStruct->hwndMoveSize);
+ (*env)->SetLongField(env, lpObject, GUITHREADINFOFc.hwndCaret, (jlong)lpStruct->hwndCaret);
(*env)->SetIntField(env, lpObject, GUITHREADINFOFc.left, (jint)lpStruct->rcCaret.left);
(*env)->SetIntField(env, lpObject, GUITHREADINFOFc.top, (jint)lpStruct->rcCaret.top);
(*env)->SetIntField(env, lpObject, GUITHREADINFOFc.right, (jint)lpStruct->rcCaret.right);
@@ -2237,15 +1669,15 @@ void cacheHDITEMFields(JNIEnv *env, jobject lpObject)
HDITEMFc.clazz = (*env)->GetObjectClass(env, lpObject);
HDITEMFc.mask = (*env)->GetFieldID(env, HDITEMFc.clazz, "mask", "I");
HDITEMFc.cxy = (*env)->GetFieldID(env, HDITEMFc.clazz, "cxy", "I");
- HDITEMFc.pszText = (*env)->GetFieldID(env, HDITEMFc.clazz, "pszText", I_J);
- HDITEMFc.hbm = (*env)->GetFieldID(env, HDITEMFc.clazz, "hbm", I_J);
+ HDITEMFc.pszText = (*env)->GetFieldID(env, HDITEMFc.clazz, "pszText", "J");
+ HDITEMFc.hbm = (*env)->GetFieldID(env, HDITEMFc.clazz, "hbm", "J");
HDITEMFc.cchTextMax = (*env)->GetFieldID(env, HDITEMFc.clazz, "cchTextMax", "I");
HDITEMFc.fmt = (*env)->GetFieldID(env, HDITEMFc.clazz, "fmt", "I");
- HDITEMFc.lParam = (*env)->GetFieldID(env, HDITEMFc.clazz, "lParam", I_J);
+ HDITEMFc.lParam = (*env)->GetFieldID(env, HDITEMFc.clazz, "lParam", "J");
HDITEMFc.iImage = (*env)->GetFieldID(env, HDITEMFc.clazz, "iImage", "I");
HDITEMFc.iOrder = (*env)->GetFieldID(env, HDITEMFc.clazz, "iOrder", "I");
HDITEMFc.type = (*env)->GetFieldID(env, HDITEMFc.clazz, "type", "I");
- HDITEMFc.pvFilter = (*env)->GetFieldID(env, HDITEMFc.clazz, "pvFilter", I_J);
+ HDITEMFc.pvFilter = (*env)->GetFieldID(env, HDITEMFc.clazz, "pvFilter", "J");
HDITEMFc.cached = 1;
}
@@ -2254,15 +1686,15 @@ HDITEM *getHDITEMFields(JNIEnv *env, jobject lpObject, HDITEM *lpStruct)
if (!HDITEMFc.cached) cacheHDITEMFields(env, lpObject);
lpStruct->mask = (*env)->GetIntField(env, lpObject, HDITEMFc.mask);
lpStruct->cxy = (*env)->GetIntField(env, lpObject, HDITEMFc.cxy);
- lpStruct->pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, HDITEMFc.pszText);
- lpStruct->hbm = (HBITMAP)(*env)->GetIntLongField(env, lpObject, HDITEMFc.hbm);
+ lpStruct->pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, HDITEMFc.pszText);
+ lpStruct->hbm = (HBITMAP)(*env)->GetLongField(env, lpObject, HDITEMFc.hbm);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, HDITEMFc.cchTextMax);
lpStruct->fmt = (*env)->GetIntField(env, lpObject, HDITEMFc.fmt);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, HDITEMFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, HDITEMFc.lParam);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, HDITEMFc.iImage);
lpStruct->iOrder = (*env)->GetIntField(env, lpObject, HDITEMFc.iOrder);
lpStruct->type = (*env)->GetIntField(env, lpObject, HDITEMFc.type);
- lpStruct->pvFilter = (void *)(*env)->GetIntLongField(env, lpObject, HDITEMFc.pvFilter);
+ lpStruct->pvFilter = (void *)(*env)->GetLongField(env, lpObject, HDITEMFc.pvFilter);
return lpStruct;
}
@@ -2271,15 +1703,15 @@ void setHDITEMFields(JNIEnv *env, jobject lpObject, HDITEM *lpStruct)
if (!HDITEMFc.cached) cacheHDITEMFields(env, lpObject);
(*env)->SetIntField(env, lpObject, HDITEMFc.mask, (jint)lpStruct->mask);
(*env)->SetIntField(env, lpObject, HDITEMFc.cxy, (jint)lpStruct->cxy);
- (*env)->SetIntLongField(env, lpObject, HDITEMFc.pszText, (jintLong)lpStruct->pszText);
- (*env)->SetIntLongField(env, lpObject, HDITEMFc.hbm, (jintLong)lpStruct->hbm);
+ (*env)->SetLongField(env, lpObject, HDITEMFc.pszText, (jlong)lpStruct->pszText);
+ (*env)->SetLongField(env, lpObject, HDITEMFc.hbm, (jlong)lpStruct->hbm);
(*env)->SetIntField(env, lpObject, HDITEMFc.cchTextMax, (jint)lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, HDITEMFc.fmt, (jint)lpStruct->fmt);
- (*env)->SetIntLongField(env, lpObject, HDITEMFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, HDITEMFc.lParam, (jlong)lpStruct->lParam);
(*env)->SetIntField(env, lpObject, HDITEMFc.iImage, (jint)lpStruct->iImage);
(*env)->SetIntField(env, lpObject, HDITEMFc.iOrder, (jint)lpStruct->iOrder);
(*env)->SetIntField(env, lpObject, HDITEMFc.type, (jint)lpStruct->type);
- (*env)->SetIntLongField(env, lpObject, HDITEMFc.pvFilter, (jintLong)lpStruct->pvFilter);
+ (*env)->SetLongField(env, lpObject, HDITEMFc.pvFilter, (jlong)lpStruct->pvFilter);
}
#endif
@@ -2296,24 +1728,24 @@ void cacheHDLAYOUTFields(JNIEnv *env, jobject lpObject)
{
if (HDLAYOUTFc.cached) return;
HDLAYOUTFc.clazz = (*env)->GetObjectClass(env, lpObject);
- HDLAYOUTFc.prc = (*env)->GetFieldID(env, HDLAYOUTFc.clazz, "prc", I_J);
- HDLAYOUTFc.pwpos = (*env)->GetFieldID(env, HDLAYOUTFc.clazz, "pwpos", I_J);
+ HDLAYOUTFc.prc = (*env)->GetFieldID(env, HDLAYOUTFc.clazz, "prc", "J");
+ HDLAYOUTFc.pwpos = (*env)->GetFieldID(env, HDLAYOUTFc.clazz, "pwpos", "J");
HDLAYOUTFc.cached = 1;
}
HDLAYOUT *getHDLAYOUTFields(JNIEnv *env, jobject lpObject, HDLAYOUT *lpStruct)
{
if (!HDLAYOUTFc.cached) cacheHDLAYOUTFields(env, lpObject);
- lpStruct->prc = (RECT *)(*env)->GetIntLongField(env, lpObject, HDLAYOUTFc.prc);
- lpStruct->pwpos = (WINDOWPOS *)(*env)->GetIntLongField(env, lpObject, HDLAYOUTFc.pwpos);
+ lpStruct->prc = (RECT *)(*env)->GetLongField(env, lpObject, HDLAYOUTFc.prc);
+ lpStruct->pwpos = (WINDOWPOS *)(*env)->GetLongField(env, lpObject, HDLAYOUTFc.pwpos);
return lpStruct;
}
void setHDLAYOUTFields(JNIEnv *env, jobject lpObject, HDLAYOUT *lpStruct)
{
if (!HDLAYOUTFc.cached) cacheHDLAYOUTFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, HDLAYOUTFc.prc, (jintLong)lpStruct->prc);
- (*env)->SetIntLongField(env, lpObject, HDLAYOUTFc.pwpos, (jintLong)lpStruct->pwpos);
+ (*env)->SetLongField(env, lpObject, HDLAYOUTFc.prc, (jlong)lpStruct->prc);
+ (*env)->SetLongField(env, lpObject, HDLAYOUTFc.pwpos, (jlong)lpStruct->pwpos);
}
#endif
@@ -2333,7 +1765,7 @@ void cacheHELPINFOFields(JNIEnv *env, jobject lpObject)
HELPINFOFc.cbSize = (*env)->GetFieldID(env, HELPINFOFc.clazz, "cbSize", "I");
HELPINFOFc.iContextType = (*env)->GetFieldID(env, HELPINFOFc.clazz, "iContextType", "I");
HELPINFOFc.iCtrlId = (*env)->GetFieldID(env, HELPINFOFc.clazz, "iCtrlId", "I");
- HELPINFOFc.hItemHandle = (*env)->GetFieldID(env, HELPINFOFc.clazz, "hItemHandle", I_J);
+ HELPINFOFc.hItemHandle = (*env)->GetFieldID(env, HELPINFOFc.clazz, "hItemHandle", "J");
HELPINFOFc.dwContextId = (*env)->GetFieldID(env, HELPINFOFc.clazz, "dwContextId", "I");
HELPINFOFc.x = (*env)->GetFieldID(env, HELPINFOFc.clazz, "x", "I");
HELPINFOFc.y = (*env)->GetFieldID(env, HELPINFOFc.clazz, "y", "I");
@@ -2346,7 +1778,7 @@ HELPINFO *getHELPINFOFields(JNIEnv *env, jobject lpObject, HELPINFO *lpStruct)
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, HELPINFOFc.cbSize);
lpStruct->iContextType = (*env)->GetIntField(env, lpObject, HELPINFOFc.iContextType);
lpStruct->iCtrlId = (*env)->GetIntField(env, lpObject, HELPINFOFc.iCtrlId);
- lpStruct->hItemHandle = (HANDLE)(*env)->GetIntLongField(env, lpObject, HELPINFOFc.hItemHandle);
+ lpStruct->hItemHandle = (HANDLE)(*env)->GetLongField(env, lpObject, HELPINFOFc.hItemHandle);
lpStruct->dwContextId = (*env)->GetIntField(env, lpObject, HELPINFOFc.dwContextId);
lpStruct->MousePos.x = (*env)->GetIntField(env, lpObject, HELPINFOFc.x);
lpStruct->MousePos.y = (*env)->GetIntField(env, lpObject, HELPINFOFc.y);
@@ -2359,7 +1791,7 @@ void setHELPINFOFields(JNIEnv *env, jobject lpObject, HELPINFO *lpStruct)
(*env)->SetIntField(env, lpObject, HELPINFOFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, HELPINFOFc.iContextType, (jint)lpStruct->iContextType);
(*env)->SetIntField(env, lpObject, HELPINFOFc.iCtrlId, (jint)lpStruct->iCtrlId);
- (*env)->SetIntLongField(env, lpObject, HELPINFOFc.hItemHandle, (jintLong)lpStruct->hItemHandle);
+ (*env)->SetLongField(env, lpObject, HELPINFOFc.hItemHandle, (jlong)lpStruct->hItemHandle);
(*env)->SetIntField(env, lpObject, HELPINFOFc.dwContextId, (jint)lpStruct->dwContextId);
(*env)->SetIntField(env, lpObject, HELPINFOFc.x, (jint)lpStruct->MousePos.x);
(*env)->SetIntField(env, lpObject, HELPINFOFc.y, (jint)lpStruct->MousePos.y);
@@ -2381,7 +1813,7 @@ void cacheHIGHCONTRASTFields(JNIEnv *env, jobject lpObject)
HIGHCONTRASTFc.clazz = (*env)->GetObjectClass(env, lpObject);
HIGHCONTRASTFc.cbSize = (*env)->GetFieldID(env, HIGHCONTRASTFc.clazz, "cbSize", "I");
HIGHCONTRASTFc.dwFlags = (*env)->GetFieldID(env, HIGHCONTRASTFc.clazz, "dwFlags", "I");
- HIGHCONTRASTFc.lpszDefaultScheme = (*env)->GetFieldID(env, HIGHCONTRASTFc.clazz, "lpszDefaultScheme", I_J);
+ HIGHCONTRASTFc.lpszDefaultScheme = (*env)->GetFieldID(env, HIGHCONTRASTFc.clazz, "lpszDefaultScheme", "J");
HIGHCONTRASTFc.cached = 1;
}
@@ -2390,7 +1822,7 @@ HIGHCONTRAST *getHIGHCONTRASTFields(JNIEnv *env, jobject lpObject, HIGHCONTRAST
if (!HIGHCONTRASTFc.cached) cacheHIGHCONTRASTFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, HIGHCONTRASTFc.cbSize);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, HIGHCONTRASTFc.dwFlags);
- lpStruct->lpszDefaultScheme = (LPTSTR)(*env)->GetIntLongField(env, lpObject, HIGHCONTRASTFc.lpszDefaultScheme);
+ lpStruct->lpszDefaultScheme = (LPTSTR)(*env)->GetLongField(env, lpObject, HIGHCONTRASTFc.lpszDefaultScheme);
return lpStruct;
}
@@ -2399,7 +1831,7 @@ void setHIGHCONTRASTFields(JNIEnv *env, jobject lpObject, HIGHCONTRAST *lpStruct
if (!HIGHCONTRASTFc.cached) cacheHIGHCONTRASTFields(env, lpObject);
(*env)->SetIntField(env, lpObject, HIGHCONTRASTFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, HIGHCONTRASTFc.dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetIntLongField(env, lpObject, HIGHCONTRASTFc.lpszDefaultScheme, (jintLong)lpStruct->lpszDefaultScheme);
+ (*env)->SetLongField(env, lpObject, HIGHCONTRASTFc.lpszDefaultScheme, (jlong)lpStruct->lpszDefaultScheme);
}
#endif
@@ -2419,8 +1851,8 @@ void cacheICONINFOFields(JNIEnv *env, jobject lpObject)
ICONINFOFc.fIcon = (*env)->GetFieldID(env, ICONINFOFc.clazz, "fIcon", "Z");
ICONINFOFc.xHotspot = (*env)->GetFieldID(env, ICONINFOFc.clazz, "xHotspot", "I");
ICONINFOFc.yHotspot = (*env)->GetFieldID(env, ICONINFOFc.clazz, "yHotspot", "I");
- ICONINFOFc.hbmMask = (*env)->GetFieldID(env, ICONINFOFc.clazz, "hbmMask", I_J);
- ICONINFOFc.hbmColor = (*env)->GetFieldID(env, ICONINFOFc.clazz, "hbmColor", I_J);
+ ICONINFOFc.hbmMask = (*env)->GetFieldID(env, ICONINFOFc.clazz, "hbmMask", "J");
+ ICONINFOFc.hbmColor = (*env)->GetFieldID(env, ICONINFOFc.clazz, "hbmColor", "J");
ICONINFOFc.cached = 1;
}
@@ -2430,8 +1862,8 @@ ICONINFO *getICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct)
lpStruct->fIcon = (*env)->GetBooleanField(env, lpObject, ICONINFOFc.fIcon);
lpStruct->xHotspot = (*env)->GetIntField(env, lpObject, ICONINFOFc.xHotspot);
lpStruct->yHotspot = (*env)->GetIntField(env, lpObject, ICONINFOFc.yHotspot);
- lpStruct->hbmMask = (HBITMAP)(*env)->GetIntLongField(env, lpObject, ICONINFOFc.hbmMask);
- lpStruct->hbmColor = (HBITMAP)(*env)->GetIntLongField(env, lpObject, ICONINFOFc.hbmColor);
+ lpStruct->hbmMask = (HBITMAP)(*env)->GetLongField(env, lpObject, ICONINFOFc.hbmMask);
+ lpStruct->hbmColor = (HBITMAP)(*env)->GetLongField(env, lpObject, ICONINFOFc.hbmColor);
return lpStruct;
}
@@ -2441,8 +1873,8 @@ void setICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct)
(*env)->SetBooleanField(env, lpObject, ICONINFOFc.fIcon, (jboolean)lpStruct->fIcon);
(*env)->SetIntField(env, lpObject, ICONINFOFc.xHotspot, (jint)lpStruct->xHotspot);
(*env)->SetIntField(env, lpObject, ICONINFOFc.yHotspot, (jint)lpStruct->yHotspot);
- (*env)->SetIntLongField(env, lpObject, ICONINFOFc.hbmMask, (jintLong)lpStruct->hbmMask);
- (*env)->SetIntLongField(env, lpObject, ICONINFOFc.hbmColor, (jintLong)lpStruct->hbmColor);
+ (*env)->SetLongField(env, lpObject, ICONINFOFc.hbmMask, (jlong)lpStruct->hbmMask);
+ (*env)->SetLongField(env, lpObject, ICONINFOFc.hbmColor, (jlong)lpStruct->hbmColor);
}
#endif
@@ -2484,7 +1916,7 @@ void setINITCOMMONCONTROLSEXFields(JNIEnv *env, jobject lpObject, INITCOMMONCONT
typedef struct INPUT_FID_CACHE {
int cached;
jclass clazz;
- jfieldID type;
+ jfieldID type, ki, mi;
} INPUT_FID_CACHE;
INPUT_FID_CACHE INPUTFc;
@@ -2494,6 +1926,8 @@ void cacheINPUTFields(JNIEnv *env, jobject lpObject)
if (INPUTFc.cached) return;
INPUTFc.clazz = (*env)->GetObjectClass(env, lpObject);
INPUTFc.type = (*env)->GetFieldID(env, INPUTFc.clazz, "type", "I");
+ INPUTFc.ki = (*env)->GetFieldID(env, INPUTFc.clazz, "ki", "Lorg/eclipse/swt/internal/win32/KEYBDINPUT;");
+ INPUTFc.mi = (*env)->GetFieldID(env, INPUTFc.clazz, "mi", "Lorg/eclipse/swt/internal/win32/MOUSEINPUT;");
INPUTFc.cached = 1;
}
@@ -2501,6 +1935,14 @@ INPUT *getINPUTFields(JNIEnv *env, jobject lpObject, INPUT *lpStruct)
{
if (!INPUTFc.cached) cacheINPUTFields(env, lpObject);
lpStruct->type = (*env)->GetIntField(env, lpObject, INPUTFc.type);
+ {
+ jobject lpObject1 = (*env)->GetObjectField(env, lpObject, INPUTFc.ki);
+ if (lpObject1 != NULL) getKEYBDINPUTFields(env, lpObject1, &lpStruct->ki);
+ }
+ {
+ jobject lpObject1 = (*env)->GetObjectField(env, lpObject, INPUTFc.mi);
+ if (lpObject1 != NULL) getMOUSEINPUTFields(env, lpObject1, &lpStruct->mi);
+ }
return lpStruct;
}
@@ -2508,6 +1950,14 @@ void setINPUTFields(JNIEnv *env, jobject lpObject, INPUT *lpStruct)
{
if (!INPUTFc.cached) cacheINPUTFields(env, lpObject);
(*env)->SetIntField(env, lpObject, INPUTFc.type, (jint)lpStruct->type);
+ {
+ jobject lpObject1 = (*env)->GetObjectField(env, lpObject, INPUTFc.ki);
+ if (lpObject1 != NULL) setKEYBDINPUTFields(env, lpObject1, &lpStruct->ki);
+ }
+ {
+ jobject lpObject1 = (*env)->GetObjectField(env, lpObject, INPUTFc.mi);
+ if (lpObject1 != NULL) setMOUSEINPUTFields(env, lpObject1, &lpStruct->mi);
+ }
}
#endif
@@ -2528,7 +1978,7 @@ void cacheKEYBDINPUTFields(JNIEnv *env, jobject lpObject)
KEYBDINPUTFc.wScan = (*env)->GetFieldID(env, KEYBDINPUTFc.clazz, "wScan", "S");
KEYBDINPUTFc.dwFlags = (*env)->GetFieldID(env, KEYBDINPUTFc.clazz, "dwFlags", "I");
KEYBDINPUTFc.time = (*env)->GetFieldID(env, KEYBDINPUTFc.clazz, "time", "I");
- KEYBDINPUTFc.dwExtraInfo = (*env)->GetFieldID(env, KEYBDINPUTFc.clazz, "dwExtraInfo", I_J);
+ KEYBDINPUTFc.dwExtraInfo = (*env)->GetFieldID(env, KEYBDINPUTFc.clazz, "dwExtraInfo", "J");
KEYBDINPUTFc.cached = 1;
}
@@ -2539,7 +1989,7 @@ KEYBDINPUT *getKEYBDINPUTFields(JNIEnv *env, jobject lpObject, KEYBDINPUT *lpStr
lpStruct->wScan = (*env)->GetShortField(env, lpObject, KEYBDINPUTFc.wScan);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, KEYBDINPUTFc.dwFlags);
lpStruct->time = (*env)->GetIntField(env, lpObject, KEYBDINPUTFc.time);
- lpStruct->dwExtraInfo = (*env)->GetIntLongField(env, lpObject, KEYBDINPUTFc.dwExtraInfo);
+ lpStruct->dwExtraInfo = (*env)->GetLongField(env, lpObject, KEYBDINPUTFc.dwExtraInfo);
return lpStruct;
}
@@ -2550,7 +2000,7 @@ void setKEYBDINPUTFields(JNIEnv *env, jobject lpObject, KEYBDINPUT *lpStruct)
(*env)->SetShortField(env, lpObject, KEYBDINPUTFc.wScan, (jshort)lpStruct->wScan);
(*env)->SetIntField(env, lpObject, KEYBDINPUTFc.dwFlags, (jint)lpStruct->dwFlags);
(*env)->SetIntField(env, lpObject, KEYBDINPUTFc.time, (jint)lpStruct->time);
- (*env)->SetIntLongField(env, lpObject, KEYBDINPUTFc.dwExtraInfo, (jintLong)lpStruct->dwExtraInfo);
+ (*env)->SetLongField(env, lpObject, KEYBDINPUTFc.dwExtraInfo, (jlong)lpStruct->dwExtraInfo);
}
#endif
@@ -2627,7 +2077,7 @@ void cacheLOGBRUSHFields(JNIEnv *env, jobject lpObject)
LOGBRUSHFc.clazz = (*env)->GetObjectClass(env, lpObject);
LOGBRUSHFc.lbStyle = (*env)->GetFieldID(env, LOGBRUSHFc.clazz, "lbStyle", "I");
LOGBRUSHFc.lbColor = (*env)->GetFieldID(env, LOGBRUSHFc.clazz, "lbColor", "I");
- LOGBRUSHFc.lbHatch = (*env)->GetFieldID(env, LOGBRUSHFc.clazz, "lbHatch", I_J);
+ LOGBRUSHFc.lbHatch = (*env)->GetFieldID(env, LOGBRUSHFc.clazz, "lbHatch", "J");
LOGBRUSHFc.cached = 1;
}
@@ -2636,7 +2086,7 @@ LOGBRUSH *getLOGBRUSHFields(JNIEnv *env, jobject lpObject, LOGBRUSH *lpStruct)
if (!LOGBRUSHFc.cached) cacheLOGBRUSHFields(env, lpObject);
lpStruct->lbStyle = (*env)->GetIntField(env, lpObject, LOGBRUSHFc.lbStyle);
lpStruct->lbColor = (*env)->GetIntField(env, lpObject, LOGBRUSHFc.lbColor);
- lpStruct->lbHatch = (*env)->GetIntLongField(env, lpObject, LOGBRUSHFc.lbHatch);
+ lpStruct->lbHatch = (*env)->GetLongField(env, lpObject, LOGBRUSHFc.lbHatch);
return lpStruct;
}
@@ -2645,7 +2095,7 @@ void setLOGBRUSHFields(JNIEnv *env, jobject lpObject, LOGBRUSH *lpStruct)
if (!LOGBRUSHFc.cached) cacheLOGBRUSHFields(env, lpObject);
(*env)->SetIntField(env, lpObject, LOGBRUSHFc.lbStyle, (jint)lpStruct->lbStyle);
(*env)->SetIntField(env, lpObject, LOGBRUSHFc.lbColor, (jint)lpStruct->lbColor);
- (*env)->SetIntLongField(env, lpObject, LOGBRUSHFc.lbHatch, (jintLong)lpStruct->lbHatch);
+ (*env)->SetLongField(env, lpObject, LOGBRUSHFc.lbHatch, (jlong)lpStruct->lbHatch);
}
#endif
@@ -2725,46 +2175,6 @@ void setLOGFONTFields(JNIEnv *env, jobject lpObject, LOGFONT *lpStruct)
}
#endif
-#ifndef NO_LOGPEN
-typedef struct LOGPEN_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID lopnStyle, x, y, lopnColor;
-} LOGPEN_FID_CACHE;
-
-LOGPEN_FID_CACHE LOGPENFc;
-
-void cacheLOGPENFields(JNIEnv *env, jobject lpObject)
-{
- if (LOGPENFc.cached) return;
- LOGPENFc.clazz = (*env)->GetObjectClass(env, lpObject);
- LOGPENFc.lopnStyle = (*env)->GetFieldID(env, LOGPENFc.clazz, "lopnStyle", "I");
- LOGPENFc.x = (*env)->GetFieldID(env, LOGPENFc.clazz, "x", "I");
- LOGPENFc.y = (*env)->GetFieldID(env, LOGPENFc.clazz, "y", "I");
- LOGPENFc.lopnColor = (*env)->GetFieldID(env, LOGPENFc.clazz, "lopnColor", "I");
- LOGPENFc.cached = 1;
-}
-
-LOGPEN *getLOGPENFields(JNIEnv *env, jobject lpObject, LOGPEN *lpStruct)
-{
- if (!LOGPENFc.cached) cacheLOGPENFields(env, lpObject);
- lpStruct->lopnStyle = (*env)->GetIntField(env, lpObject, LOGPENFc.lopnStyle);
- lpStruct->lopnWidth.x = (*env)->GetIntField(env, lpObject, LOGPENFc.x);
- lpStruct->lopnWidth.y = (*env)->GetIntField(env, lpObject, LOGPENFc.y);
- lpStruct->lopnColor = (*env)->GetIntField(env, lpObject, LOGPENFc.lopnColor);
- return lpStruct;
-}
-
-void setLOGPENFields(JNIEnv *env, jobject lpObject, LOGPEN *lpStruct)
-{
- if (!LOGPENFc.cached) cacheLOGPENFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, LOGPENFc.lopnStyle, (jint)lpStruct->lopnStyle);
- (*env)->SetIntField(env, lpObject, LOGPENFc.x, (jint)lpStruct->lopnWidth.x);
- (*env)->SetIntField(env, lpObject, LOGPENFc.y, (jint)lpStruct->lopnWidth.y);
- (*env)->SetIntField(env, lpObject, LOGPENFc.lopnColor, (jint)lpStruct->lopnColor);
-}
-#endif
-
#ifndef NO_LVCOLUMN
typedef struct LVCOLUMN_FID_CACHE {
int cached;
@@ -2781,7 +2191,7 @@ void cacheLVCOLUMNFields(JNIEnv *env, jobject lpObject)
LVCOLUMNFc.mask = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "mask", "I");
LVCOLUMNFc.fmt = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "fmt", "I");
LVCOLUMNFc.cx = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "cx", "I");
- LVCOLUMNFc.pszText = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "pszText", I_J);
+ LVCOLUMNFc.pszText = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "pszText", "J");
LVCOLUMNFc.cchTextMax = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "cchTextMax", "I");
LVCOLUMNFc.iSubItem = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "iSubItem", "I");
LVCOLUMNFc.iImage = (*env)->GetFieldID(env, LVCOLUMNFc.clazz, "iImage", "I");
@@ -2795,7 +2205,7 @@ LVCOLUMN *getLVCOLUMNFields(JNIEnv *env, jobject lpObject, LVCOLUMN *lpStruct)
lpStruct->mask = (*env)->GetIntField(env, lpObject, LVCOLUMNFc.mask);
lpStruct->fmt = (*env)->GetIntField(env, lpObject, LVCOLUMNFc.fmt);
lpStruct->cx = (*env)->GetIntField(env, lpObject, LVCOLUMNFc.cx);
- lpStruct->pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, LVCOLUMNFc.pszText);
+ lpStruct->pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, LVCOLUMNFc.pszText);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, LVCOLUMNFc.cchTextMax);
lpStruct->iSubItem = (*env)->GetIntField(env, lpObject, LVCOLUMNFc.iSubItem);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, LVCOLUMNFc.iImage);
@@ -2809,7 +2219,7 @@ void setLVCOLUMNFields(JNIEnv *env, jobject lpObject, LVCOLUMN *lpStruct)
(*env)->SetIntField(env, lpObject, LVCOLUMNFc.mask, (jint)lpStruct->mask);
(*env)->SetIntField(env, lpObject, LVCOLUMNFc.fmt, (jint)lpStruct->fmt);
(*env)->SetIntField(env, lpObject, LVCOLUMNFc.cx, (jint)lpStruct->cx);
- (*env)->SetIntLongField(env, lpObject, LVCOLUMNFc.pszText, (jintLong)lpStruct->pszText);
+ (*env)->SetLongField(env, lpObject, LVCOLUMNFc.pszText, (jlong)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, LVCOLUMNFc.cchTextMax, (jint)lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, LVCOLUMNFc.iSubItem, (jint)lpStruct->iSubItem);
(*env)->SetIntField(env, lpObject, LVCOLUMNFc.iImage, (jint)lpStruct->iImage);
@@ -2918,14 +2328,14 @@ void cacheLVITEMFields(JNIEnv *env, jobject lpObject)
LVITEMFc.iSubItem = (*env)->GetFieldID(env, LVITEMFc.clazz, "iSubItem", "I");
LVITEMFc.state = (*env)->GetFieldID(env, LVITEMFc.clazz, "state", "I");
LVITEMFc.stateMask = (*env)->GetFieldID(env, LVITEMFc.clazz, "stateMask", "I");
- LVITEMFc.pszText = (*env)->GetFieldID(env, LVITEMFc.clazz, "pszText", I_J);
+ LVITEMFc.pszText = (*env)->GetFieldID(env, LVITEMFc.clazz, "pszText", "J");
LVITEMFc.cchTextMax = (*env)->GetFieldID(env, LVITEMFc.clazz, "cchTextMax", "I");
LVITEMFc.iImage = (*env)->GetFieldID(env, LVITEMFc.clazz, "iImage", "I");
- LVITEMFc.lParam = (*env)->GetFieldID(env, LVITEMFc.clazz, "lParam", I_J);
+ LVITEMFc.lParam = (*env)->GetFieldID(env, LVITEMFc.clazz, "lParam", "J");
LVITEMFc.iIndent = (*env)->GetFieldID(env, LVITEMFc.clazz, "iIndent", "I");
LVITEMFc.iGroupId = (*env)->GetFieldID(env, LVITEMFc.clazz, "iGroupId", "I");
LVITEMFc.cColumns = (*env)->GetFieldID(env, LVITEMFc.clazz, "cColumns", "I");
- LVITEMFc.puColumns = (*env)->GetFieldID(env, LVITEMFc.clazz, "puColumns", I_J);
+ LVITEMFc.puColumns = (*env)->GetFieldID(env, LVITEMFc.clazz, "puColumns", "J");
LVITEMFc.cached = 1;
}
@@ -2937,14 +2347,14 @@ LVITEM *getLVITEMFields(JNIEnv *env, jobject lpObject, LVITEM *lpStruct)
lpStruct->iSubItem = (*env)->GetIntField(env, lpObject, LVITEMFc.iSubItem);
lpStruct->state = (*env)->GetIntField(env, lpObject, LVITEMFc.state);
lpStruct->stateMask = (*env)->GetIntField(env, lpObject, LVITEMFc.stateMask);
- lpStruct->pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, LVITEMFc.pszText);
+ lpStruct->pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, LVITEMFc.pszText);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, LVITEMFc.cchTextMax);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, LVITEMFc.iImage);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, LVITEMFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, LVITEMFc.lParam);
lpStruct->iIndent = (*env)->GetIntField(env, lpObject, LVITEMFc.iIndent);
lpStruct->iGroupId = (*env)->GetIntField(env, lpObject, LVITEMFc.iGroupId);
lpStruct->cColumns = (*env)->GetIntField(env, lpObject, LVITEMFc.cColumns);
- lpStruct->puColumns = (PUINT)(*env)->GetIntLongField(env, lpObject, LVITEMFc.puColumns);
+ lpStruct->puColumns = (PUINT)(*env)->GetLongField(env, lpObject, LVITEMFc.puColumns);
return lpStruct;
}
@@ -2956,14 +2366,14 @@ void setLVITEMFields(JNIEnv *env, jobject lpObject, LVITEM *lpStruct)
(*env)->SetIntField(env, lpObject, LVITEMFc.iSubItem, (jint)lpStruct->iSubItem);
(*env)->SetIntField(env, lpObject, LVITEMFc.state, (jint)lpStruct->state);
(*env)->SetIntField(env, lpObject, LVITEMFc.stateMask, (jint)lpStruct->stateMask);
- (*env)->SetIntLongField(env, lpObject, LVITEMFc.pszText, (jintLong)lpStruct->pszText);
+ (*env)->SetLongField(env, lpObject, LVITEMFc.pszText, (jlong)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, LVITEMFc.cchTextMax, (jint)lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, LVITEMFc.iImage, (jint)lpStruct->iImage);
- (*env)->SetIntLongField(env, lpObject, LVITEMFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, LVITEMFc.lParam, (jlong)lpStruct->lParam);
(*env)->SetIntField(env, lpObject, LVITEMFc.iIndent, (jint)lpStruct->iIndent);
(*env)->SetIntField(env, lpObject, LVITEMFc.iGroupId, (jint)lpStruct->iGroupId);
(*env)->SetIntField(env, lpObject, LVITEMFc.cColumns, (jint)lpStruct->cColumns);
- (*env)->SetIntLongField(env, lpObject, LVITEMFc.puColumns, (jintLong)lpStruct->puColumns);
+ (*env)->SetLongField(env, lpObject, LVITEMFc.puColumns, (jlong)lpStruct->puColumns);
}
#endif
@@ -3077,7 +2487,7 @@ void cacheMEASUREITEMSTRUCTFields(JNIEnv *env, jobject lpObject)
MEASUREITEMSTRUCTFc.itemID = (*env)->GetFieldID(env, MEASUREITEMSTRUCTFc.clazz, "itemID", "I");
MEASUREITEMSTRUCTFc.itemWidth = (*env)->GetFieldID(env, MEASUREITEMSTRUCTFc.clazz, "itemWidth", "I");
MEASUREITEMSTRUCTFc.itemHeight = (*env)->GetFieldID(env, MEASUREITEMSTRUCTFc.clazz, "itemHeight", "I");
- MEASUREITEMSTRUCTFc.itemData = (*env)->GetFieldID(env, MEASUREITEMSTRUCTFc.clazz, "itemData", I_J);
+ MEASUREITEMSTRUCTFc.itemData = (*env)->GetFieldID(env, MEASUREITEMSTRUCTFc.clazz, "itemData", "J");
MEASUREITEMSTRUCTFc.cached = 1;
}
@@ -3089,7 +2499,7 @@ MEASUREITEMSTRUCT *getMEASUREITEMSTRUCTFields(JNIEnv *env, jobject lpObject, MEA
lpStruct->itemID = (*env)->GetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemID);
lpStruct->itemWidth = (*env)->GetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemWidth);
lpStruct->itemHeight = (*env)->GetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemHeight);
- lpStruct->itemData = (*env)->GetIntLongField(env, lpObject, MEASUREITEMSTRUCTFc.itemData);
+ lpStruct->itemData = (*env)->GetLongField(env, lpObject, MEASUREITEMSTRUCTFc.itemData);
return lpStruct;
}
@@ -3101,7 +2511,7 @@ void setMEASUREITEMSTRUCTFields(JNIEnv *env, jobject lpObject, MEASUREITEMSTRUCT
(*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemID, (jint)lpStruct->itemID);
(*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemWidth, (jint)lpStruct->itemWidth);
(*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemHeight, (jint)lpStruct->itemHeight);
- (*env)->SetIntLongField(env, lpObject, MEASUREITEMSTRUCTFc.itemData, (jintLong)lpStruct->itemData);
+ (*env)->SetLongField(env, lpObject, MEASUREITEMSTRUCTFc.itemData, (jlong)lpStruct->itemData);
}
#endif
@@ -3123,8 +2533,8 @@ void cacheMENUBARINFOFields(JNIEnv *env, jobject lpObject)
MENUBARINFOFc.top = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "top", "I");
MENUBARINFOFc.right = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "right", "I");
MENUBARINFOFc.bottom = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "bottom", "I");
- MENUBARINFOFc.hMenu = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "hMenu", I_J);
- MENUBARINFOFc.hwndMenu = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "hwndMenu", I_J);
+ MENUBARINFOFc.hMenu = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "hMenu", "J");
+ MENUBARINFOFc.hwndMenu = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "hwndMenu", "J");
MENUBARINFOFc.fBarFocused = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "fBarFocused", "Z");
MENUBARINFOFc.fFocused = (*env)->GetFieldID(env, MENUBARINFOFc.clazz, "fFocused", "Z");
MENUBARINFOFc.cached = 1;
@@ -3138,8 +2548,8 @@ MENUBARINFO *getMENUBARINFOFields(JNIEnv *env, jobject lpObject, MENUBARINFO *lp
lpStruct->rcBar.top = (*env)->GetIntField(env, lpObject, MENUBARINFOFc.top);
lpStruct->rcBar.right = (*env)->GetIntField(env, lpObject, MENUBARINFOFc.right);
lpStruct->rcBar.bottom = (*env)->GetIntField(env, lpObject, MENUBARINFOFc.bottom);
- lpStruct->hMenu = (HMENU)(*env)->GetIntLongField(env, lpObject, MENUBARINFOFc.hMenu);
- lpStruct->hwndMenu = (HWND)(*env)->GetIntLongField(env, lpObject, MENUBARINFOFc.hwndMenu);
+ lpStruct->hMenu = (HMENU)(*env)->GetLongField(env, lpObject, MENUBARINFOFc.hMenu);
+ lpStruct->hwndMenu = (HWND)(*env)->GetLongField(env, lpObject, MENUBARINFOFc.hwndMenu);
lpStruct->fBarFocused = (*env)->GetBooleanField(env, lpObject, MENUBARINFOFc.fBarFocused);
lpStruct->fFocused = (*env)->GetBooleanField(env, lpObject, MENUBARINFOFc.fFocused);
return lpStruct;
@@ -3153,8 +2563,8 @@ void setMENUBARINFOFields(JNIEnv *env, jobject lpObject, MENUBARINFO *lpStruct)
(*env)->SetIntField(env, lpObject, MENUBARINFOFc.top, (jint)lpStruct->rcBar.top);
(*env)->SetIntField(env, lpObject, MENUBARINFOFc.right, (jint)lpStruct->rcBar.right);
(*env)->SetIntField(env, lpObject, MENUBARINFOFc.bottom, (jint)lpStruct->rcBar.bottom);
- (*env)->SetIntLongField(env, lpObject, MENUBARINFOFc.hMenu, (jintLong)lpStruct->hMenu);
- (*env)->SetIntLongField(env, lpObject, MENUBARINFOFc.hwndMenu, (jintLong)lpStruct->hwndMenu);
+ (*env)->SetLongField(env, lpObject, MENUBARINFOFc.hMenu, (jlong)lpStruct->hMenu);
+ (*env)->SetLongField(env, lpObject, MENUBARINFOFc.hwndMenu, (jlong)lpStruct->hwndMenu);
(*env)->SetBooleanField(env, lpObject, MENUBARINFOFc.fBarFocused, (jboolean)lpStruct->fBarFocused);
(*env)->SetBooleanField(env, lpObject, MENUBARINFOFc.fFocused, (jboolean)lpStruct->fFocused);
}
@@ -3177,9 +2587,9 @@ void cacheMENUINFOFields(JNIEnv *env, jobject lpObject)
MENUINFOFc.fMask = (*env)->GetFieldID(env, MENUINFOFc.clazz, "fMask", "I");
MENUINFOFc.dwStyle = (*env)->GetFieldID(env, MENUINFOFc.clazz, "dwStyle", "I");
MENUINFOFc.cyMax = (*env)->GetFieldID(env, MENUINFOFc.clazz, "cyMax", "I");
- MENUINFOFc.hbrBack = (*env)->GetFieldID(env, MENUINFOFc.clazz, "hbrBack", I_J);
+ MENUINFOFc.hbrBack = (*env)->GetFieldID(env, MENUINFOFc.clazz, "hbrBack", "J");
MENUINFOFc.dwContextHelpID = (*env)->GetFieldID(env, MENUINFOFc.clazz, "dwContextHelpID", "I");
- MENUINFOFc.dwMenuData = (*env)->GetFieldID(env, MENUINFOFc.clazz, "dwMenuData", I_J);
+ MENUINFOFc.dwMenuData = (*env)->GetFieldID(env, MENUINFOFc.clazz, "dwMenuData", "J");
MENUINFOFc.cached = 1;
}
@@ -3190,9 +2600,9 @@ MENUINFO *getMENUINFOFields(JNIEnv *env, jobject lpObject, MENUINFO *lpStruct)
lpStruct->fMask = (*env)->GetIntField(env, lpObject, MENUINFOFc.fMask);
lpStruct->dwStyle = (*env)->GetIntField(env, lpObject, MENUINFOFc.dwStyle);
lpStruct->cyMax = (*env)->GetIntField(env, lpObject, MENUINFOFc.cyMax);
- lpStruct->hbrBack = (HBRUSH)(*env)->GetIntLongField(env, lpObject, MENUINFOFc.hbrBack);
+ lpStruct->hbrBack = (HBRUSH)(*env)->GetLongField(env, lpObject, MENUINFOFc.hbrBack);
lpStruct->dwContextHelpID = (*env)->GetIntField(env, lpObject, MENUINFOFc.dwContextHelpID);
- lpStruct->dwMenuData = (*env)->GetIntLongField(env, lpObject, MENUINFOFc.dwMenuData);
+ lpStruct->dwMenuData = (*env)->GetLongField(env, lpObject, MENUINFOFc.dwMenuData);
return lpStruct;
}
@@ -3203,9 +2613,9 @@ void setMENUINFOFields(JNIEnv *env, jobject lpObject, MENUINFO *lpStruct)
(*env)->SetIntField(env, lpObject, MENUINFOFc.fMask, (jint)lpStruct->fMask);
(*env)->SetIntField(env, lpObject, MENUINFOFc.dwStyle, (jint)lpStruct->dwStyle);
(*env)->SetIntField(env, lpObject, MENUINFOFc.cyMax, (jint)lpStruct->cyMax);
- (*env)->SetIntLongField(env, lpObject, MENUINFOFc.hbrBack, (jintLong)lpStruct->hbrBack);
+ (*env)->SetLongField(env, lpObject, MENUINFOFc.hbrBack, (jlong)lpStruct->hbrBack);
(*env)->SetIntField(env, lpObject, MENUINFOFc.dwContextHelpID, (jint)lpStruct->dwContextHelpID);
- (*env)->SetIntLongField(env, lpObject, MENUINFOFc.dwMenuData, (jintLong)lpStruct->dwMenuData);
+ (*env)->SetLongField(env, lpObject, MENUINFOFc.dwMenuData, (jlong)lpStruct->dwMenuData);
}
#endif
@@ -3227,13 +2637,13 @@ void cacheMENUITEMINFOFields(JNIEnv *env, jobject lpObject)
MENUITEMINFOFc.fType = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "fType", "I");
MENUITEMINFOFc.fState = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "fState", "I");
MENUITEMINFOFc.wID = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "wID", "I");
- MENUITEMINFOFc.hSubMenu = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hSubMenu", I_J);
- MENUITEMINFOFc.hbmpChecked = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hbmpChecked", I_J);
- MENUITEMINFOFc.hbmpUnchecked = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hbmpUnchecked", I_J);
- MENUITEMINFOFc.dwItemData = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "dwItemData", I_J);
- MENUITEMINFOFc.dwTypeData = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "dwTypeData", I_J);
+ MENUITEMINFOFc.hSubMenu = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hSubMenu", "J");
+ MENUITEMINFOFc.hbmpChecked = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hbmpChecked", "J");
+ MENUITEMINFOFc.hbmpUnchecked = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hbmpUnchecked", "J");
+ MENUITEMINFOFc.dwItemData = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "dwItemData", "J");
+ MENUITEMINFOFc.dwTypeData = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "dwTypeData", "J");
MENUITEMINFOFc.cch = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "cch", "I");
- MENUITEMINFOFc.hbmpItem = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hbmpItem", I_J);
+ MENUITEMINFOFc.hbmpItem = (*env)->GetFieldID(env, MENUITEMINFOFc.clazz, "hbmpItem", "J");
MENUITEMINFOFc.cached = 1;
}
@@ -3245,13 +2655,13 @@ MENUITEMINFO *getMENUITEMINFOFields(JNIEnv *env, jobject lpObject, MENUITEMINFO
lpStruct->fType = (*env)->GetIntField(env, lpObject, MENUITEMINFOFc.fType);
lpStruct->fState = (*env)->GetIntField(env, lpObject, MENUITEMINFOFc.fState);
lpStruct->wID = (*env)->GetIntField(env, lpObject, MENUITEMINFOFc.wID);
- lpStruct->hSubMenu = (HMENU)(*env)->GetIntLongField(env, lpObject, MENUITEMINFOFc.hSubMenu);
- lpStruct->hbmpChecked = (HBITMAP)(*env)->GetIntLongField(env, lpObject, MENUITEMINFOFc.hbmpChecked);
- lpStruct->hbmpUnchecked = (HBITMAP)(*env)->GetIntLongField(env, lpObject, MENUITEMINFOFc.hbmpUnchecked);
- lpStruct->dwItemData = (*env)->GetIntLongField(env, lpObject, MENUITEMINFOFc.dwItemData);
- lpStruct->dwTypeData = (LPTSTR)(*env)->GetIntLongField(env, lpObject, MENUITEMINFOFc.dwTypeData);
+ lpStruct->hSubMenu = (HMENU)(*env)->GetLongField(env, lpObject, MENUITEMINFOFc.hSubMenu);
+ lpStruct->hbmpChecked = (HBITMAP)(*env)->GetLongField(env, lpObject, MENUITEMINFOFc.hbmpChecked);
+ lpStruct->hbmpUnchecked = (HBITMAP)(*env)->GetLongField(env, lpObject, MENUITEMINFOFc.hbmpUnchecked);
+ lpStruct->dwItemData = (*env)->GetLongField(env, lpObject, MENUITEMINFOFc.dwItemData);
+ lpStruct->dwTypeData = (LPTSTR)(*env)->GetLongField(env, lpObject, MENUITEMINFOFc.dwTypeData);
lpStruct->cch = (*env)->GetIntField(env, lpObject, MENUITEMINFOFc.cch);
- lpStruct->hbmpItem = (HBITMAP)(*env)->GetIntLongField(env, lpObject, MENUITEMINFOFc.hbmpItem);
+ lpStruct->hbmpItem = (HBITMAP)(*env)->GetLongField(env, lpObject, MENUITEMINFOFc.hbmpItem);
return lpStruct;
}
@@ -3263,13 +2673,13 @@ void setMENUITEMINFOFields(JNIEnv *env, jobject lpObject, MENUITEMINFO *lpStruct
(*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fType, (jint)lpStruct->fType);
(*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fState, (jint)lpStruct->fState);
(*env)->SetIntField(env, lpObject, MENUITEMINFOFc.wID, (jint)lpStruct->wID);
- (*env)->SetIntLongField(env, lpObject, MENUITEMINFOFc.hSubMenu, (jintLong)lpStruct->hSubMenu);
- (*env)->SetIntLongField(env, lpObject, MENUITEMINFOFc.hbmpChecked, (jintLong)lpStruct->hbmpChecked);
- (*env)->SetIntLongField(env, lpObject, MENUITEMINFOFc.hbmpUnchecked, (jintLong)lpStruct->hbmpUnchecked);
- (*env)->SetIntLongField(env, lpObject, MENUITEMINFOFc.dwItemData, (jintLong)lpStruct->dwItemData);
- (*env)->SetIntLongField(env, lpObject, MENUITEMINFOFc.dwTypeData, (jintLong)lpStruct->dwTypeData);
+ (*env)->SetLongField(env, lpObject, MENUITEMINFOFc.hSubMenu, (jlong)lpStruct->hSubMenu);
+ (*env)->SetLongField(env, lpObject, MENUITEMINFOFc.hbmpChecked, (jlong)lpStruct->hbmpChecked);
+ (*env)->SetLongField(env, lpObject, MENUITEMINFOFc.hbmpUnchecked, (jlong)lpStruct->hbmpUnchecked);
+ (*env)->SetLongField(env, lpObject, MENUITEMINFOFc.dwItemData, (jlong)lpStruct->dwItemData);
+ (*env)->SetLongField(env, lpObject, MENUITEMINFOFc.dwTypeData, (jlong)lpStruct->dwTypeData);
(*env)->SetIntField(env, lpObject, MENUITEMINFOFc.cch, (jint)lpStruct->cch);
- (*env)->SetIntLongField(env, lpObject, MENUITEMINFOFc.hbmpItem, (jintLong)lpStruct->hbmpItem);
+ (*env)->SetLongField(env, lpObject, MENUITEMINFOFc.hbmpItem, (jlong)lpStruct->hbmpItem);
}
#endif
@@ -3407,7 +2817,7 @@ void cacheMOUSEINPUTFields(JNIEnv *env, jobject lpObject)
MOUSEINPUTFc.mouseData = (*env)->GetFieldID(env, MOUSEINPUTFc.clazz, "mouseData", "I");
MOUSEINPUTFc.dwFlags = (*env)->GetFieldID(env, MOUSEINPUTFc.clazz, "dwFlags", "I");
MOUSEINPUTFc.time = (*env)->GetFieldID(env, MOUSEINPUTFc.clazz, "time", "I");
- MOUSEINPUTFc.dwExtraInfo = (*env)->GetFieldID(env, MOUSEINPUTFc.clazz, "dwExtraInfo", I_J);
+ MOUSEINPUTFc.dwExtraInfo = (*env)->GetFieldID(env, MOUSEINPUTFc.clazz, "dwExtraInfo", "J");
MOUSEINPUTFc.cached = 1;
}
@@ -3419,7 +2829,7 @@ MOUSEINPUT *getMOUSEINPUTFields(JNIEnv *env, jobject lpObject, MOUSEINPUT *lpStr
lpStruct->mouseData = (*env)->GetIntField(env, lpObject, MOUSEINPUTFc.mouseData);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, MOUSEINPUTFc.dwFlags);
lpStruct->time = (*env)->GetIntField(env, lpObject, MOUSEINPUTFc.time);
- lpStruct->dwExtraInfo = (*env)->GetIntLongField(env, lpObject, MOUSEINPUTFc.dwExtraInfo);
+ lpStruct->dwExtraInfo = (*env)->GetLongField(env, lpObject, MOUSEINPUTFc.dwExtraInfo);
return lpStruct;
}
@@ -3431,7 +2841,7 @@ void setMOUSEINPUTFields(JNIEnv *env, jobject lpObject, MOUSEINPUT *lpStruct)
(*env)->SetIntField(env, lpObject, MOUSEINPUTFc.mouseData, (jint)lpStruct->mouseData);
(*env)->SetIntField(env, lpObject, MOUSEINPUTFc.dwFlags, (jint)lpStruct->dwFlags);
(*env)->SetIntField(env, lpObject, MOUSEINPUTFc.time, (jint)lpStruct->time);
- (*env)->SetIntLongField(env, lpObject, MOUSEINPUTFc.dwExtraInfo, (jintLong)lpStruct->dwExtraInfo);
+ (*env)->SetLongField(env, lpObject, MOUSEINPUTFc.dwExtraInfo, (jlong)lpStruct->dwExtraInfo);
}
#endif
@@ -3448,10 +2858,10 @@ void cacheMSGFields(JNIEnv *env, jobject lpObject)
{
if (MSGFc.cached) return;
MSGFc.clazz = (*env)->GetObjectClass(env, lpObject);
- MSGFc.hwnd = (*env)->GetFieldID(env, MSGFc.clazz, "hwnd", I_J);
+ MSGFc.hwnd = (*env)->GetFieldID(env, MSGFc.clazz, "hwnd", "J");
MSGFc.message = (*env)->GetFieldID(env, MSGFc.clazz, "message", "I");
- MSGFc.wParam = (*env)->GetFieldID(env, MSGFc.clazz, "wParam", I_J);
- MSGFc.lParam = (*env)->GetFieldID(env, MSGFc.clazz, "lParam", I_J);
+ MSGFc.wParam = (*env)->GetFieldID(env, MSGFc.clazz, "wParam", "J");
+ MSGFc.lParam = (*env)->GetFieldID(env, MSGFc.clazz, "lParam", "J");
MSGFc.time = (*env)->GetFieldID(env, MSGFc.clazz, "time", "I");
MSGFc.x = (*env)->GetFieldID(env, MSGFc.clazz, "x", "I");
MSGFc.y = (*env)->GetFieldID(env, MSGFc.clazz, "y", "I");
@@ -3461,10 +2871,10 @@ void cacheMSGFields(JNIEnv *env, jobject lpObject)
MSG *getMSGFields(JNIEnv *env, jobject lpObject, MSG *lpStruct)
{
if (!MSGFc.cached) cacheMSGFields(env, lpObject);
- lpStruct->hwnd = (HWND)(*env)->GetIntLongField(env, lpObject, MSGFc.hwnd);
+ lpStruct->hwnd = (HWND)(*env)->GetLongField(env, lpObject, MSGFc.hwnd);
lpStruct->message = (*env)->GetIntField(env, lpObject, MSGFc.message);
- lpStruct->wParam = (*env)->GetIntLongField(env, lpObject, MSGFc.wParam);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, MSGFc.lParam);
+ lpStruct->wParam = (*env)->GetLongField(env, lpObject, MSGFc.wParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, MSGFc.lParam);
lpStruct->time = (*env)->GetIntField(env, lpObject, MSGFc.time);
lpStruct->pt.x = (*env)->GetIntField(env, lpObject, MSGFc.x);
lpStruct->pt.y = (*env)->GetIntField(env, lpObject, MSGFc.y);
@@ -3474,10 +2884,10 @@ MSG *getMSGFields(JNIEnv *env, jobject lpObject, MSG *lpStruct)
void setMSGFields(JNIEnv *env, jobject lpObject, MSG *lpStruct)
{
if (!MSGFc.cached) cacheMSGFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, MSGFc.hwnd, (jintLong)lpStruct->hwnd);
+ (*env)->SetLongField(env, lpObject, MSGFc.hwnd, (jlong)lpStruct->hwnd);
(*env)->SetIntField(env, lpObject, MSGFc.message, (jint)lpStruct->message);
- (*env)->SetIntLongField(env, lpObject, MSGFc.wParam, (jintLong)lpStruct->wParam);
- (*env)->SetIntLongField(env, lpObject, MSGFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, MSGFc.wParam, (jlong)lpStruct->wParam);
+ (*env)->SetLongField(env, lpObject, MSGFc.lParam, (jlong)lpStruct->lParam);
(*env)->SetIntField(env, lpObject, MSGFc.time, (jint)lpStruct->time);
(*env)->SetIntField(env, lpObject, MSGFc.x, (jint)lpStruct->pt.x);
(*env)->SetIntField(env, lpObject, MSGFc.y, (jint)lpStruct->pt.y);
@@ -3499,14 +2909,14 @@ void cacheNMCUSTOMDRAWFields(JNIEnv *env, jobject lpObject)
cacheNMHDRFields(env, lpObject);
NMCUSTOMDRAWFc.clazz = (*env)->GetObjectClass(env, lpObject);
NMCUSTOMDRAWFc.dwDrawStage = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "dwDrawStage", "I");
- NMCUSTOMDRAWFc.hdc = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "hdc", I_J);
+ NMCUSTOMDRAWFc.hdc = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "hdc", "J");
NMCUSTOMDRAWFc.left = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "left", "I");
NMCUSTOMDRAWFc.top = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "top", "I");
NMCUSTOMDRAWFc.right = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "right", "I");
NMCUSTOMDRAWFc.bottom = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "bottom", "I");
- NMCUSTOMDRAWFc.dwItemSpec = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "dwItemSpec", I_J);
+ NMCUSTOMDRAWFc.dwItemSpec = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "dwItemSpec", "J");
NMCUSTOMDRAWFc.uItemState = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "uItemState", "I");
- NMCUSTOMDRAWFc.lItemlParam = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "lItemlParam", I_J);
+ NMCUSTOMDRAWFc.lItemlParam = (*env)->GetFieldID(env, NMCUSTOMDRAWFc.clazz, "lItemlParam", "J");
NMCUSTOMDRAWFc.cached = 1;
}
@@ -3515,14 +2925,14 @@ NMCUSTOMDRAW *getNMCUSTOMDRAWFields(JNIEnv *env, jobject lpObject, NMCUSTOMDRAW
if (!NMCUSTOMDRAWFc.cached) cacheNMCUSTOMDRAWFields(env, lpObject);
getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
lpStruct->dwDrawStage = (*env)->GetIntField(env, lpObject, NMCUSTOMDRAWFc.dwDrawStage);
- lpStruct->hdc = (HDC)(*env)->GetIntLongField(env, lpObject, NMCUSTOMDRAWFc.hdc);
+ lpStruct->hdc = (HDC)(*env)->GetLongField(env, lpObject, NMCUSTOMDRAWFc.hdc);
lpStruct->rc.left = (*env)->GetIntField(env, lpObject, NMCUSTOMDRAWFc.left);
lpStruct->rc.top = (*env)->GetIntField(env, lpObject, NMCUSTOMDRAWFc.top);
lpStruct->rc.right = (*env)->GetIntField(env, lpObject, NMCUSTOMDRAWFc.right);
lpStruct->rc.bottom = (*env)->GetIntField(env, lpObject, NMCUSTOMDRAWFc.bottom);
- lpStruct->dwItemSpec = (*env)->GetIntLongField(env, lpObject, NMCUSTOMDRAWFc.dwItemSpec);
+ lpStruct->dwItemSpec = (*env)->GetLongField(env, lpObject, NMCUSTOMDRAWFc.dwItemSpec);
lpStruct->uItemState = (*env)->GetIntField(env, lpObject, NMCUSTOMDRAWFc.uItemState);
- lpStruct->lItemlParam = (*env)->GetIntLongField(env, lpObject, NMCUSTOMDRAWFc.lItemlParam);
+ lpStruct->lItemlParam = (*env)->GetLongField(env, lpObject, NMCUSTOMDRAWFc.lItemlParam);
return lpStruct;
}
@@ -3531,14 +2941,14 @@ void setNMCUSTOMDRAWFields(JNIEnv *env, jobject lpObject, NMCUSTOMDRAW *lpStruct
if (!NMCUSTOMDRAWFc.cached) cacheNMCUSTOMDRAWFields(env, lpObject);
setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
(*env)->SetIntField(env, lpObject, NMCUSTOMDRAWFc.dwDrawStage, (jint)lpStruct->dwDrawStage);
- (*env)->SetIntLongField(env, lpObject, NMCUSTOMDRAWFc.hdc, (jintLong)lpStruct->hdc);
+ (*env)->SetLongField(env, lpObject, NMCUSTOMDRAWFc.hdc, (jlong)lpStruct->hdc);
(*env)->SetIntField(env, lpObject, NMCUSTOMDRAWFc.left, (jint)lpStruct->rc.left);
(*env)->SetIntField(env, lpObject, NMCUSTOMDRAWFc.top, (jint)lpStruct->rc.top);
(*env)->SetIntField(env, lpObject, NMCUSTOMDRAWFc.right, (jint)lpStruct->rc.right);
(*env)->SetIntField(env, lpObject, NMCUSTOMDRAWFc.bottom, (jint)lpStruct->rc.bottom);
- (*env)->SetIntLongField(env, lpObject, NMCUSTOMDRAWFc.dwItemSpec, (jintLong)lpStruct->dwItemSpec);
+ (*env)->SetLongField(env, lpObject, NMCUSTOMDRAWFc.dwItemSpec, (jlong)lpStruct->dwItemSpec);
(*env)->SetIntField(env, lpObject, NMCUSTOMDRAWFc.uItemState, (jint)lpStruct->uItemState);
- (*env)->SetIntLongField(env, lpObject, NMCUSTOMDRAWFc.lItemlParam, (jintLong)lpStruct->lItemlParam);
+ (*env)->SetLongField(env, lpObject, NMCUSTOMDRAWFc.lItemlParam, (jlong)lpStruct->lItemlParam);
}
#endif
@@ -3555,8 +2965,8 @@ void cacheNMHDRFields(JNIEnv *env, jobject lpObject)
{
if (NMHDRFc.cached) return;
NMHDRFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NMHDRFc.hwndFrom = (*env)->GetFieldID(env, NMHDRFc.clazz, "hwndFrom", I_J);
- NMHDRFc.idFrom = (*env)->GetFieldID(env, NMHDRFc.clazz, "idFrom", I_J);
+ NMHDRFc.hwndFrom = (*env)->GetFieldID(env, NMHDRFc.clazz, "hwndFrom", "J");
+ NMHDRFc.idFrom = (*env)->GetFieldID(env, NMHDRFc.clazz, "idFrom", "J");
NMHDRFc.code = (*env)->GetFieldID(env, NMHDRFc.clazz, "code", "I");
NMHDRFc.cached = 1;
}
@@ -3564,8 +2974,8 @@ void cacheNMHDRFields(JNIEnv *env, jobject lpObject)
NMHDR *getNMHDRFields(JNIEnv *env, jobject lpObject, NMHDR *lpStruct)
{
if (!NMHDRFc.cached) cacheNMHDRFields(env, lpObject);
- lpStruct->hwndFrom = (HWND)(*env)->GetIntLongField(env, lpObject, NMHDRFc.hwndFrom);
- lpStruct->idFrom = (*env)->GetIntLongField(env, lpObject, NMHDRFc.idFrom);
+ lpStruct->hwndFrom = (HWND)(*env)->GetLongField(env, lpObject, NMHDRFc.hwndFrom);
+ lpStruct->idFrom = (*env)->GetLongField(env, lpObject, NMHDRFc.idFrom);
lpStruct->code = (*env)->GetIntField(env, lpObject, NMHDRFc.code);
return lpStruct;
}
@@ -3573,8 +2983,8 @@ NMHDR *getNMHDRFields(JNIEnv *env, jobject lpObject, NMHDR *lpStruct)
void setNMHDRFields(JNIEnv *env, jobject lpObject, NMHDR *lpStruct)
{
if (!NMHDRFc.cached) cacheNMHDRFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, NMHDRFc.hwndFrom, (jintLong)lpStruct->hwndFrom);
- (*env)->SetIntLongField(env, lpObject, NMHDRFc.idFrom, (jintLong)lpStruct->idFrom);
+ (*env)->SetLongField(env, lpObject, NMHDRFc.hwndFrom, (jlong)lpStruct->hwndFrom);
+ (*env)->SetLongField(env, lpObject, NMHDRFc.idFrom, (jlong)lpStruct->idFrom);
(*env)->SetIntField(env, lpObject, NMHDRFc.code, (jint)lpStruct->code);
}
#endif
@@ -3595,7 +3005,7 @@ void cacheNMHEADERFields(JNIEnv *env, jobject lpObject)
NMHEADERFc.clazz = (*env)->GetObjectClass(env, lpObject);
NMHEADERFc.iItem = (*env)->GetFieldID(env, NMHEADERFc.clazz, "iItem", "I");
NMHEADERFc.iButton = (*env)->GetFieldID(env, NMHEADERFc.clazz, "iButton", "I");
- NMHEADERFc.pitem = (*env)->GetFieldID(env, NMHEADERFc.clazz, "pitem", I_J);
+ NMHEADERFc.pitem = (*env)->GetFieldID(env, NMHEADERFc.clazz, "pitem", "J");
NMHEADERFc.cached = 1;
}
@@ -3605,7 +3015,7 @@ NMHEADER *getNMHEADERFields(JNIEnv *env, jobject lpObject, NMHEADER *lpStruct)
getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
lpStruct->iItem = (*env)->GetIntField(env, lpObject, NMHEADERFc.iItem);
lpStruct->iButton = (*env)->GetIntField(env, lpObject, NMHEADERFc.iButton);
- lpStruct->pitem = (HDITEM FAR *)(*env)->GetIntLongField(env, lpObject, NMHEADERFc.pitem);
+ lpStruct->pitem = (HDITEM FAR *)(*env)->GetLongField(env, lpObject, NMHEADERFc.pitem);
return lpStruct;
}
@@ -3615,7 +3025,7 @@ void setNMHEADERFields(JNIEnv *env, jobject lpObject, NMHEADER *lpStruct)
setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
(*env)->SetIntField(env, lpObject, NMHEADERFc.iItem, (jint)lpStruct->iItem);
(*env)->SetIntField(env, lpObject, NMHEADERFc.iButton, (jint)lpStruct->iButton);
- (*env)->SetIntLongField(env, lpObject, NMHEADERFc.pitem, (jintLong)lpStruct->pitem);
+ (*env)->SetLongField(env, lpObject, NMHEADERFc.pitem, (jlong)lpStruct->pitem);
}
#endif
@@ -3701,7 +3111,7 @@ void cacheNMLISTVIEWFields(JNIEnv *env, jobject lpObject)
NMLISTVIEWFc.uChanged = (*env)->GetFieldID(env, NMLISTVIEWFc.clazz, "uChanged", "I");
NMLISTVIEWFc.x = (*env)->GetFieldID(env, NMLISTVIEWFc.clazz, "x", "I");
NMLISTVIEWFc.y = (*env)->GetFieldID(env, NMLISTVIEWFc.clazz, "y", "I");
- NMLISTVIEWFc.lParam = (*env)->GetFieldID(env, NMLISTVIEWFc.clazz, "lParam", I_J);
+ NMLISTVIEWFc.lParam = (*env)->GetFieldID(env, NMLISTVIEWFc.clazz, "lParam", "J");
NMLISTVIEWFc.cached = 1;
}
@@ -3716,7 +3126,7 @@ NMLISTVIEW *getNMLISTVIEWFields(JNIEnv *env, jobject lpObject, NMLISTVIEW *lpStr
lpStruct->uChanged = (*env)->GetIntField(env, lpObject, NMLISTVIEWFc.uChanged);
lpStruct->ptAction.x = (*env)->GetIntField(env, lpObject, NMLISTVIEWFc.x);
lpStruct->ptAction.y = (*env)->GetIntField(env, lpObject, NMLISTVIEWFc.y);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, NMLISTVIEWFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, NMLISTVIEWFc.lParam);
return lpStruct;
}
@@ -3731,7 +3141,7 @@ void setNMLISTVIEWFields(JNIEnv *env, jobject lpObject, NMLISTVIEW *lpStruct)
(*env)->SetIntField(env, lpObject, NMLISTVIEWFc.uChanged, (jint)lpStruct->uChanged);
(*env)->SetIntField(env, lpObject, NMLISTVIEWFc.x, (jint)lpStruct->ptAction.x);
(*env)->SetIntField(env, lpObject, NMLISTVIEWFc.y, (jint)lpStruct->ptAction.y);
- (*env)->SetIntLongField(env, lpObject, NMLISTVIEWFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, NMLISTVIEWFc.lParam, (jlong)lpStruct->lParam);
}
#endif
@@ -3827,14 +3237,14 @@ void cacheNMLVDISPINFOFields(JNIEnv *env, jobject lpObject)
NMLVDISPINFOFc.iSubItem = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "iSubItem", "I");
NMLVDISPINFOFc.state = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "state", "I");
NMLVDISPINFOFc.stateMask = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "stateMask", "I");
- NMLVDISPINFOFc.pszText = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "pszText", I_J);
+ NMLVDISPINFOFc.pszText = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "pszText", "J");
NMLVDISPINFOFc.cchTextMax = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "cchTextMax", "I");
NMLVDISPINFOFc.iImage = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "iImage", "I");
- NMLVDISPINFOFc.lParam = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "lParam", I_J);
+ NMLVDISPINFOFc.lParam = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "lParam", "J");
NMLVDISPINFOFc.iIndent = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "iIndent", "I");
NMLVDISPINFOFc.iGroupId = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "iGroupId", "I");
NMLVDISPINFOFc.cColumns = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "cColumns", "I");
- NMLVDISPINFOFc.puColumns = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "puColumns", I_J);
+ NMLVDISPINFOFc.puColumns = (*env)->GetFieldID(env, NMLVDISPINFOFc.clazz, "puColumns", "J");
NMLVDISPINFOFc.cached = 1;
}
@@ -3847,14 +3257,14 @@ NMLVDISPINFO *getNMLVDISPINFOFields(JNIEnv *env, jobject lpObject, NMLVDISPINFO
lpStruct->item.iSubItem = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.iSubItem);
lpStruct->item.state = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.state);
lpStruct->item.stateMask = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.stateMask);
- lpStruct->item.pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, NMLVDISPINFOFc.pszText);
+ lpStruct->item.pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, NMLVDISPINFOFc.pszText);
lpStruct->item.cchTextMax = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.cchTextMax);
lpStruct->item.iImage = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.iImage);
- lpStruct->item.lParam = (*env)->GetIntLongField(env, lpObject, NMLVDISPINFOFc.lParam);
+ lpStruct->item.lParam = (*env)->GetLongField(env, lpObject, NMLVDISPINFOFc.lParam);
lpStruct->item.iIndent = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.iIndent);
lpStruct->item.iGroupId = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.iGroupId);
lpStruct->item.cColumns = (*env)->GetIntField(env, lpObject, NMLVDISPINFOFc.cColumns);
- lpStruct->item.puColumns = (PUINT)(*env)->GetIntLongField(env, lpObject, NMLVDISPINFOFc.puColumns);
+ lpStruct->item.puColumns = (PUINT)(*env)->GetLongField(env, lpObject, NMLVDISPINFOFc.puColumns);
return lpStruct;
}
@@ -3867,14 +3277,14 @@ void setNMLVDISPINFOFields(JNIEnv *env, jobject lpObject, NMLVDISPINFO *lpStruct
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.iSubItem, (jint)lpStruct->item.iSubItem);
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.state, (jint)lpStruct->item.state);
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.stateMask, (jint)lpStruct->item.stateMask);
- (*env)->SetIntLongField(env, lpObject, NMLVDISPINFOFc.pszText, (jintLong)lpStruct->item.pszText);
+ (*env)->SetLongField(env, lpObject, NMLVDISPINFOFc.pszText, (jlong)lpStruct->item.pszText);
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.cchTextMax, (jint)lpStruct->item.cchTextMax);
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.iImage, (jint)lpStruct->item.iImage);
- (*env)->SetIntLongField(env, lpObject, NMLVDISPINFOFc.lParam, (jintLong)lpStruct->item.lParam);
+ (*env)->SetLongField(env, lpObject, NMLVDISPINFOFc.lParam, (jlong)lpStruct->item.lParam);
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.iIndent, (jint)lpStruct->item.iIndent);
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.iGroupId, (jint)lpStruct->item.iGroupId);
(*env)->SetIntField(env, lpObject, NMLVDISPINFOFc.cColumns, (jint)lpStruct->item.cColumns);
- (*env)->SetIntLongField(env, lpObject, NMLVDISPINFOFc.puColumns, (jintLong)lpStruct->item.puColumns);
+ (*env)->SetLongField(env, lpObject, NMLVDISPINFOFc.puColumns, (jlong)lpStruct->item.puColumns);
}
#endif
@@ -3894,8 +3304,8 @@ void cacheNMLVFINDITEMFields(JNIEnv *env, jobject lpObject)
NMLVFINDITEMFc.clazz = (*env)->GetObjectClass(env, lpObject);
NMLVFINDITEMFc.iStart = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "iStart", "I");
NMLVFINDITEMFc.flags = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "flags", "I");
- NMLVFINDITEMFc.psz = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "psz", I_J);
- NMLVFINDITEMFc.lParam = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "lParam", I_J);
+ NMLVFINDITEMFc.psz = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "psz", "J");
+ NMLVFINDITEMFc.lParam = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "lParam", "J");
NMLVFINDITEMFc.x = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "x", "I");
NMLVFINDITEMFc.y = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "y", "I");
NMLVFINDITEMFc.vkDirection = (*env)->GetFieldID(env, NMLVFINDITEMFc.clazz, "vkDirection", "I");
@@ -3908,8 +3318,8 @@ NMLVFINDITEM *getNMLVFINDITEMFields(JNIEnv *env, jobject lpObject, NMLVFINDITEM
getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
lpStruct->iStart = (*env)->GetIntField(env, lpObject, NMLVFINDITEMFc.iStart);
lpStruct->lvfi.flags = (*env)->GetIntField(env, lpObject, NMLVFINDITEMFc.flags);
- lpStruct->lvfi.psz = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, NMLVFINDITEMFc.psz);
- lpStruct->lvfi.lParam = (*env)->GetIntLongField(env, lpObject, NMLVFINDITEMFc.lParam);
+ lpStruct->lvfi.psz = (LPCTSTR)(*env)->GetLongField(env, lpObject, NMLVFINDITEMFc.psz);
+ lpStruct->lvfi.lParam = (*env)->GetLongField(env, lpObject, NMLVFINDITEMFc.lParam);
lpStruct->lvfi.pt.x = (*env)->GetIntField(env, lpObject, NMLVFINDITEMFc.x);
lpStruct->lvfi.pt.y = (*env)->GetIntField(env, lpObject, NMLVFINDITEMFc.y);
lpStruct->lvfi.vkDirection = (*env)->GetIntField(env, lpObject, NMLVFINDITEMFc.vkDirection);
@@ -3922,8 +3332,8 @@ void setNMLVFINDITEMFields(JNIEnv *env, jobject lpObject, NMLVFINDITEM *lpStruct
setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
(*env)->SetIntField(env, lpObject, NMLVFINDITEMFc.iStart, (jint)lpStruct->iStart);
(*env)->SetIntField(env, lpObject, NMLVFINDITEMFc.flags, (jint)lpStruct->lvfi.flags);
- (*env)->SetIntLongField(env, lpObject, NMLVFINDITEMFc.psz, (jintLong)lpStruct->lvfi.psz);
- (*env)->SetIntLongField(env, lpObject, NMLVFINDITEMFc.lParam, (jintLong)lpStruct->lvfi.lParam);
+ (*env)->SetLongField(env, lpObject, NMLVFINDITEMFc.psz, (jlong)lpStruct->lvfi.psz);
+ (*env)->SetLongField(env, lpObject, NMLVFINDITEMFc.lParam, (jlong)lpStruct->lvfi.lParam);
(*env)->SetIntField(env, lpObject, NMLVFINDITEMFc.x, (jint)lpStruct->lvfi.pt.x);
(*env)->SetIntField(env, lpObject, NMLVFINDITEMFc.y, (jint)lpStruct->lvfi.pt.y);
(*env)->SetIntField(env, lpObject, NMLVFINDITEMFc.vkDirection, (jint)lpStruct->lvfi.vkDirection);
@@ -3989,12 +3399,12 @@ void cacheNMREBARCHEVRONFields(JNIEnv *env, jobject lpObject)
NMREBARCHEVRONFc.clazz = (*env)->GetObjectClass(env, lpObject);
NMREBARCHEVRONFc.uBand = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "uBand", "I");
NMREBARCHEVRONFc.wID = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "wID", "I");
- NMREBARCHEVRONFc.lParam = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "lParam", I_J);
+ NMREBARCHEVRONFc.lParam = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "lParam", "J");
NMREBARCHEVRONFc.left = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "left", "I");
NMREBARCHEVRONFc.top = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "top", "I");
NMREBARCHEVRONFc.right = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "right", "I");
NMREBARCHEVRONFc.bottom = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "bottom", "I");
- NMREBARCHEVRONFc.lParamNM = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "lParamNM", I_J);
+ NMREBARCHEVRONFc.lParamNM = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "lParamNM", "J");
NMREBARCHEVRONFc.cached = 1;
}
@@ -4004,12 +3414,12 @@ NMREBARCHEVRON *getNMREBARCHEVRONFields(JNIEnv *env, jobject lpObject, NMREBARCH
getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
lpStruct->uBand = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.uBand);
lpStruct->wID = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.wID);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, NMREBARCHEVRONFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, NMREBARCHEVRONFc.lParam);
lpStruct->rc.left = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.left);
lpStruct->rc.top = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.top);
lpStruct->rc.right = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.right);
lpStruct->rc.bottom = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.bottom);
- lpStruct->lParamNM = (*env)->GetIntLongField(env, lpObject, NMREBARCHEVRONFc.lParamNM);
+ lpStruct->lParamNM = (*env)->GetLongField(env, lpObject, NMREBARCHEVRONFc.lParamNM);
return lpStruct;
}
@@ -4019,12 +3429,12 @@ void setNMREBARCHEVRONFields(JNIEnv *env, jobject lpObject, NMREBARCHEVRON *lpSt
setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
(*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.uBand, (jint)lpStruct->uBand);
(*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.wID, (jint)lpStruct->wID);
- (*env)->SetIntLongField(env, lpObject, NMREBARCHEVRONFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, NMREBARCHEVRONFc.lParam, (jlong)lpStruct->lParam);
(*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.left, (jint)lpStruct->rc.left);
(*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.top, (jint)lpStruct->rc.top);
(*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.right, (jint)lpStruct->rc.right);
(*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.bottom, (jint)lpStruct->rc.bottom);
- (*env)->SetIntLongField(env, lpObject, NMREBARCHEVRONFc.lParamNM, (jintLong)lpStruct->lParamNM);
+ (*env)->SetLongField(env, lpObject, NMREBARCHEVRONFc.lParamNM, (jlong)lpStruct->lParamNM);
}
#endif
@@ -4093,7 +3503,7 @@ void setNMREBARCHILDSIZEFields(JNIEnv *env, jobject lpObject, NMREBARCHILDSIZE *
typedef struct NMTBCUSTOMDRAW_FID_CACHE {
int cached;
jclass clazz;
- jfieldID nmcd, hbrMonoDither, hbrLines, hpenLines, clrText, clrMark, clrTextHighlight, clrBtnFace, clrBtnHighlight, clrHighlightHotTrack, rcText_left, rcText_top, rcText_right, rcText_bottom, nStringBkMode, nHLStringBkMode, iListGap;
+ jfieldID hbrMonoDither, hbrLines, hpenLines, clrText, clrMark, clrTextHighlight, clrBtnFace, clrBtnHighlight, clrHighlightHotTrack, rcText_left, rcText_top, rcText_right, rcText_bottom, nStringBkMode, nHLStringBkMode, iListGap;
} NMTBCUSTOMDRAW_FID_CACHE;
NMTBCUSTOMDRAW_FID_CACHE NMTBCUSTOMDRAWFc;
@@ -4103,10 +3513,9 @@ void cacheNMTBCUSTOMDRAWFields(JNIEnv *env, jobject lpObject)
if (NMTBCUSTOMDRAWFc.cached) return;
cacheNMCUSTOMDRAWFields(env, lpObject);
NMTBCUSTOMDRAWFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NMTBCUSTOMDRAWFc.nmcd = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "nmcd", "Lorg/eclipse/swt/internal/win32/NMCUSTOMDRAW;");
- NMTBCUSTOMDRAWFc.hbrMonoDither = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "hbrMonoDither", I_J);
- NMTBCUSTOMDRAWFc.hbrLines = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "hbrLines", I_J);
- NMTBCUSTOMDRAWFc.hpenLines = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "hpenLines", I_J);
+ NMTBCUSTOMDRAWFc.hbrMonoDither = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "hbrMonoDither", "J");
+ NMTBCUSTOMDRAWFc.hbrLines = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "hbrLines", "J");
+ NMTBCUSTOMDRAWFc.hpenLines = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "hpenLines", "J");
NMTBCUSTOMDRAWFc.clrText = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "clrText", "I");
NMTBCUSTOMDRAWFc.clrMark = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "clrMark", "I");
NMTBCUSTOMDRAWFc.clrTextHighlight = (*env)->GetFieldID(env, NMTBCUSTOMDRAWFc.clazz, "clrTextHighlight", "I");
@@ -4127,13 +3536,9 @@ NMTBCUSTOMDRAW *getNMTBCUSTOMDRAWFields(JNIEnv *env, jobject lpObject, NMTBCUSTO
{
if (!NMTBCUSTOMDRAWFc.cached) cacheNMTBCUSTOMDRAWFields(env, lpObject);
getNMCUSTOMDRAWFields(env, lpObject, (NMCUSTOMDRAW *)lpStruct);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, NMTBCUSTOMDRAWFc.nmcd);
- if (lpObject1 != NULL) getNMCUSTOMDRAWFields(env, lpObject1, &lpStruct->nmcd);
- }
- lpStruct->hbrMonoDither = (HBRUSH)(*env)->GetIntLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrMonoDither);
- lpStruct->hbrLines = (HBRUSH)(*env)->GetIntLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrLines);
- lpStruct->hpenLines = (HPEN)(*env)->GetIntLongField(env, lpObject, NMTBCUSTOMDRAWFc.hpenLines);
+ lpStruct->hbrMonoDither = (HBRUSH)(*env)->GetLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrMonoDither);
+ lpStruct->hbrLines = (HBRUSH)(*env)->GetLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrLines);
+ lpStruct->hpenLines = (HPEN)(*env)->GetLongField(env, lpObject, NMTBCUSTOMDRAWFc.hpenLines);
lpStruct->clrText = (*env)->GetIntField(env, lpObject, NMTBCUSTOMDRAWFc.clrText);
lpStruct->clrMark = (*env)->GetIntField(env, lpObject, NMTBCUSTOMDRAWFc.clrMark);
lpStruct->clrTextHighlight = (*env)->GetIntField(env, lpObject, NMTBCUSTOMDRAWFc.clrTextHighlight);
@@ -4154,13 +3559,9 @@ void setNMTBCUSTOMDRAWFields(JNIEnv *env, jobject lpObject, NMTBCUSTOMDRAW *lpSt
{
if (!NMTBCUSTOMDRAWFc.cached) cacheNMTBCUSTOMDRAWFields(env, lpObject);
setNMCUSTOMDRAWFields(env, lpObject, (NMCUSTOMDRAW *)lpStruct);
- {
- jobject lpObject1 = (*env)->GetObjectField(env, lpObject, NMTBCUSTOMDRAWFc.nmcd);
- if (lpObject1 != NULL) setNMCUSTOMDRAWFields(env, lpObject1, &lpStruct->nmcd);
- }
- (*env)->SetIntLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrMonoDither, (jintLong)lpStruct->hbrMonoDither);
- (*env)->SetIntLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrLines, (jintLong)lpStruct->hbrLines);
- (*env)->SetIntLongField(env, lpObject, NMTBCUSTOMDRAWFc.hpenLines, (jintLong)lpStruct->hpenLines);
+ (*env)->SetLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrMonoDither, (jlong)lpStruct->hbrMonoDither);
+ (*env)->SetLongField(env, lpObject, NMTBCUSTOMDRAWFc.hbrLines, (jlong)lpStruct->hbrLines);
+ (*env)->SetLongField(env, lpObject, NMTBCUSTOMDRAWFc.hpenLines, (jlong)lpStruct->hpenLines);
(*env)->SetIntField(env, lpObject, NMTBCUSTOMDRAWFc.clrText, (jint)lpStruct->clrText);
(*env)->SetIntField(env, lpObject, NMTBCUSTOMDRAWFc.clrMark, (jint)lpStruct->clrMark);
(*env)->SetIntField(env, lpObject, NMTBCUSTOMDRAWFc.clrTextHighlight, (jint)lpStruct->clrTextHighlight);
@@ -4236,10 +3637,10 @@ void cacheNMTOOLBARFields(JNIEnv *env, jobject lpObject)
NMTOOLBARFc.idCommand = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "idCommand", "I");
NMTOOLBARFc.fsState = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "fsState", "B");
NMTOOLBARFc.fsStyle = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "fsStyle", "B");
- NMTOOLBARFc.dwData = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "dwData", I_J);
- NMTOOLBARFc.iString = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "iString", I_J);
+ NMTOOLBARFc.dwData = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "dwData", "J");
+ NMTOOLBARFc.iString = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "iString", "J");
NMTOOLBARFc.cchText = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "cchText", "I");
- NMTOOLBARFc.pszText = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "pszText", I_J);
+ NMTOOLBARFc.pszText = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "pszText", "J");
NMTOOLBARFc.left = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "left", "I");
NMTOOLBARFc.top = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "top", "I");
NMTOOLBARFc.right = (*env)->GetFieldID(env, NMTOOLBARFc.clazz, "right", "I");
@@ -4256,10 +3657,10 @@ NMTOOLBAR *getNMTOOLBARFields(JNIEnv *env, jobject lpObject, NMTOOLBAR *lpStruct
lpStruct->tbButton.idCommand = (*env)->GetIntField(env, lpObject, NMTOOLBARFc.idCommand);
lpStruct->tbButton.fsState = (*env)->GetByteField(env, lpObject, NMTOOLBARFc.fsState);
lpStruct->tbButton.fsStyle = (*env)->GetByteField(env, lpObject, NMTOOLBARFc.fsStyle);
- lpStruct->tbButton.dwData = (*env)->GetIntLongField(env, lpObject, NMTOOLBARFc.dwData);
- lpStruct->tbButton.iString = (*env)->GetIntLongField(env, lpObject, NMTOOLBARFc.iString);
+ lpStruct->tbButton.dwData = (*env)->GetLongField(env, lpObject, NMTOOLBARFc.dwData);
+ lpStruct->tbButton.iString = (*env)->GetLongField(env, lpObject, NMTOOLBARFc.iString);
lpStruct->cchText = (*env)->GetIntField(env, lpObject, NMTOOLBARFc.cchText);
- lpStruct->pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, NMTOOLBARFc.pszText);
+ lpStruct->pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, NMTOOLBARFc.pszText);
lpStruct->rcButton.left = (*env)->GetIntField(env, lpObject, NMTOOLBARFc.left);
lpStruct->rcButton.top = (*env)->GetIntField(env, lpObject, NMTOOLBARFc.top);
lpStruct->rcButton.right = (*env)->GetIntField(env, lpObject, NMTOOLBARFc.right);
@@ -4276,10 +3677,10 @@ void setNMTOOLBARFields(JNIEnv *env, jobject lpObject, NMTOOLBAR *lpStruct)
(*env)->SetIntField(env, lpObject, NMTOOLBARFc.idCommand, (jint)lpStruct->tbButton.idCommand);
(*env)->SetByteField(env, lpObject, NMTOOLBARFc.fsState, (jbyte)lpStruct->tbButton.fsState);
(*env)->SetByteField(env, lpObject, NMTOOLBARFc.fsStyle, (jbyte)lpStruct->tbButton.fsStyle);
- (*env)->SetIntLongField(env, lpObject, NMTOOLBARFc.dwData, (jintLong)lpStruct->tbButton.dwData);
- (*env)->SetIntLongField(env, lpObject, NMTOOLBARFc.iString, (jintLong)lpStruct->tbButton.iString);
+ (*env)->SetLongField(env, lpObject, NMTOOLBARFc.dwData, (jlong)lpStruct->tbButton.dwData);
+ (*env)->SetLongField(env, lpObject, NMTOOLBARFc.iString, (jlong)lpStruct->tbButton.iString);
(*env)->SetIntField(env, lpObject, NMTOOLBARFc.cchText, (jint)lpStruct->cchText);
- (*env)->SetIntLongField(env, lpObject, NMTOOLBARFc.pszText, (jintLong)lpStruct->pszText);
+ (*env)->SetLongField(env, lpObject, NMTOOLBARFc.pszText, (jlong)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, NMTOOLBARFc.left, (jint)lpStruct->rcButton.left);
(*env)->SetIntField(env, lpObject, NMTOOLBARFc.top, (jint)lpStruct->rcButton.top);
(*env)->SetIntField(env, lpObject, NMTOOLBARFc.right, (jint)lpStruct->rcButton.right);
@@ -4402,11 +3803,11 @@ void cacheNMTTDISPINFOFields(JNIEnv *env, jobject lpObject)
if (NMTTDISPINFOFc.cached) return;
cacheNMHDRFields(env, lpObject);
NMTTDISPINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
- NMTTDISPINFOFc.lpszText = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "lpszText", I_J);
+ NMTTDISPINFOFc.lpszText = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "lpszText", "J");
NMTTDISPINFOFc.szText = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "szText", "[C");
- NMTTDISPINFOFc.hinst = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "hinst", I_J);
+ NMTTDISPINFOFc.hinst = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "hinst", "J");
NMTTDISPINFOFc.uFlags = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "uFlags", "I");
- NMTTDISPINFOFc.lParam = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "lParam", I_J);
+ NMTTDISPINFOFc.lParam = (*env)->GetFieldID(env, NMTTDISPINFOFc.clazz, "lParam", "J");
NMTTDISPINFOFc.cached = 1;
}
@@ -4414,14 +3815,14 @@ NMTTDISPINFO *getNMTTDISPINFOFields(JNIEnv *env, jobject lpObject, NMTTDISPINFO
{
if (!NMTTDISPINFOFc.cached) cacheNMTTDISPINFOFields(env, lpObject);
getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
- lpStruct->lpszText = (void *)(*env)->GetIntLongField(env, lpObject, NMTTDISPINFOFc.lpszText);
+ lpStruct->lpszText = (void *)(*env)->GetLongField(env, lpObject, NMTTDISPINFOFc.lpszText);
{
jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, NMTTDISPINFOFc.szText);
(*env)->GetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szText) / sizeof(jchar), (jchar *)lpStruct->szText);
}
- lpStruct->hinst = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, NMTTDISPINFOFc.hinst);
+ lpStruct->hinst = (HINSTANCE)(*env)->GetLongField(env, lpObject, NMTTDISPINFOFc.hinst);
lpStruct->uFlags = (*env)->GetIntField(env, lpObject, NMTTDISPINFOFc.uFlags);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, NMTTDISPINFOFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, NMTTDISPINFOFc.lParam);
return lpStruct;
}
@@ -4429,14 +3830,14 @@ void setNMTTDISPINFOFields(JNIEnv *env, jobject lpObject, NMTTDISPINFO *lpStruct
{
if (!NMTTDISPINFOFc.cached) cacheNMTTDISPINFOFields(env, lpObject);
setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
- (*env)->SetIntLongField(env, lpObject, NMTTDISPINFOFc.lpszText, (jintLong)lpStruct->lpszText);
+ (*env)->SetLongField(env, lpObject, NMTTDISPINFOFc.lpszText, (jlong)lpStruct->lpszText);
{
jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, NMTTDISPINFOFc.szText);
(*env)->SetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szText) / sizeof(jchar), (jchar *)lpStruct->szText);
}
- (*env)->SetIntLongField(env, lpObject, NMTTDISPINFOFc.hinst, (jintLong)lpStruct->hinst);
+ (*env)->SetLongField(env, lpObject, NMTTDISPINFOFc.hinst, (jlong)lpStruct->hinst);
(*env)->SetIntField(env, lpObject, NMTTDISPINFOFc.uFlags, (jint)lpStruct->uFlags);
- (*env)->SetIntLongField(env, lpObject, NMTTDISPINFOFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, NMTTDISPINFOFc.lParam, (jlong)lpStruct->lParam);
}
#endif
@@ -4495,15 +3896,15 @@ void cacheNMTVDISPINFOFields(JNIEnv *env, jobject lpObject)
cacheNMHDRFields(env, lpObject);
NMTVDISPINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
NMTVDISPINFOFc.mask = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "mask", "I");
- NMTVDISPINFOFc.hItem = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "hItem", I_J);
+ NMTVDISPINFOFc.hItem = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "hItem", "J");
NMTVDISPINFOFc.state = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "state", "I");
NMTVDISPINFOFc.stateMask = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "stateMask", "I");
- NMTVDISPINFOFc.pszText = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "pszText", I_J);
+ NMTVDISPINFOFc.pszText = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "pszText", "J");
NMTVDISPINFOFc.cchTextMax = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "cchTextMax", "I");
NMTVDISPINFOFc.iImage = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "iImage", "I");
NMTVDISPINFOFc.iSelectedImage = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "iSelectedImage", "I");
NMTVDISPINFOFc.cChildren = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "cChildren", "I");
- NMTVDISPINFOFc.lParam = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "lParam", I_J);
+ NMTVDISPINFOFc.lParam = (*env)->GetFieldID(env, NMTVDISPINFOFc.clazz, "lParam", "J");
NMTVDISPINFOFc.cached = 1;
}
@@ -4512,15 +3913,15 @@ NMTVDISPINFO *getNMTVDISPINFOFields(JNIEnv *env, jobject lpObject, NMTVDISPINFO
if (!NMTVDISPINFOFc.cached) cacheNMTVDISPINFOFields(env, lpObject);
getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
lpStruct->item.mask = (*env)->GetIntField(env, lpObject, NMTVDISPINFOFc.mask);
- lpStruct->item.hItem = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, NMTVDISPINFOFc.hItem);
+ lpStruct->item.hItem = (HTREEITEM)(*env)->GetLongField(env, lpObject, NMTVDISPINFOFc.hItem);
lpStruct->item.state = (*env)->GetIntField(env, lpObject, NMTVDISPINFOFc.state);
lpStruct->item.stateMask = (*env)->GetIntField(env, lpObject, NMTVDISPINFOFc.stateMask);
- lpStruct->item.pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, NMTVDISPINFOFc.pszText);
+ lpStruct->item.pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, NMTVDISPINFOFc.pszText);
lpStruct->item.cchTextMax = (*env)->GetIntField(env, lpObject, NMTVDISPINFOFc.cchTextMax);
lpStruct->item.iImage = (*env)->GetIntField(env, lpObject, NMTVDISPINFOFc.iImage);
lpStruct->item.iSelectedImage = (*env)->GetIntField(env, lpObject, NMTVDISPINFOFc.iSelectedImage);
lpStruct->item.cChildren = (*env)->GetIntField(env, lpObject, NMTVDISPINFOFc.cChildren);
- lpStruct->item.lParam = (*env)->GetIntLongField(env, lpObject, NMTVDISPINFOFc.lParam);
+ lpStruct->item.lParam = (*env)->GetLongField(env, lpObject, NMTVDISPINFOFc.lParam);
return lpStruct;
}
@@ -4529,15 +3930,15 @@ void setNMTVDISPINFOFields(JNIEnv *env, jobject lpObject, NMTVDISPINFO *lpStruct
if (!NMTVDISPINFOFc.cached) cacheNMTVDISPINFOFields(env, lpObject);
setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
(*env)->SetIntField(env, lpObject, NMTVDISPINFOFc.mask, (jint)lpStruct->item.mask);
- (*env)->SetIntLongField(env, lpObject, NMTVDISPINFOFc.hItem, (jintLong)lpStruct->item.hItem);
+ (*env)->SetLongField(env, lpObject, NMTVDISPINFOFc.hItem, (jlong)lpStruct->item.hItem);
(*env)->SetIntField(env, lpObject, NMTVDISPINFOFc.state, (jint)lpStruct->item.state);
(*env)->SetIntField(env, lpObject, NMTVDISPINFOFc.stateMask, (jint)lpStruct->item.stateMask);
- (*env)->SetIntLongField(env, lpObject, NMTVDISPINFOFc.pszText, (jintLong)lpStruct->item.pszText);
+ (*env)->SetLongField(env, lpObject, NMTVDISPINFOFc.pszText, (jlong)lpStruct->item.pszText);
(*env)->SetIntField(env, lpObject, NMTVDISPINFOFc.cchTextMax, (jint)lpStruct->item.cchTextMax);
(*env)->SetIntField(env, lpObject, NMTVDISPINFOFc.iImage, (jint)lpStruct->item.iImage);
(*env)->SetIntField(env, lpObject, NMTVDISPINFOFc.iSelectedImage, (jint)lpStruct->item.iSelectedImage);
(*env)->SetIntField(env, lpObject, NMTVDISPINFOFc.cChildren, (jint)lpStruct->item.cChildren);
- (*env)->SetIntLongField(env, lpObject, NMTVDISPINFOFc.lParam, (jintLong)lpStruct->item.lParam);
+ (*env)->SetLongField(env, lpObject, NMTVDISPINFOFc.lParam, (jlong)lpStruct->item.lParam);
}
#endif
@@ -4556,10 +3957,10 @@ void cacheNMTVITEMCHANGEFields(JNIEnv *env, jobject lpObject)
cacheNMHDRFields(env, lpObject);
NMTVITEMCHANGEFc.clazz = (*env)->GetObjectClass(env, lpObject);
NMTVITEMCHANGEFc.uChanged = (*env)->GetFieldID(env, NMTVITEMCHANGEFc.clazz, "uChanged", "I");
- NMTVITEMCHANGEFc.hItem = (*env)->GetFieldID(env, NMTVITEMCHANGEFc.clazz, "hItem", I_J);
+ NMTVITEMCHANGEFc.hItem = (*env)->GetFieldID(env, NMTVITEMCHANGEFc.clazz, "hItem", "J");
NMTVITEMCHANGEFc.uStateNew = (*env)->GetFieldID(env, NMTVITEMCHANGEFc.clazz, "uStateNew", "I");
NMTVITEMCHANGEFc.uStateOld = (*env)->GetFieldID(env, NMTVITEMCHANGEFc.clazz, "uStateOld", "I");
- NMTVITEMCHANGEFc.lParam = (*env)->GetFieldID(env, NMTVITEMCHANGEFc.clazz, "lParam", I_J);
+ NMTVITEMCHANGEFc.lParam = (*env)->GetFieldID(env, NMTVITEMCHANGEFc.clazz, "lParam", "J");
NMTVITEMCHANGEFc.cached = 1;
}
@@ -4568,10 +3969,10 @@ NMTVITEMCHANGE *getNMTVITEMCHANGEFields(JNIEnv *env, jobject lpObject, NMTVITEMC
if (!NMTVITEMCHANGEFc.cached) cacheNMTVITEMCHANGEFields(env, lpObject);
getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
lpStruct->uChanged = (*env)->GetIntField(env, lpObject, NMTVITEMCHANGEFc.uChanged);
- lpStruct->hItem = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, NMTVITEMCHANGEFc.hItem);
+ lpStruct->hItem = (HTREEITEM)(*env)->GetLongField(env, lpObject, NMTVITEMCHANGEFc.hItem);
lpStruct->uStateNew = (*env)->GetIntField(env, lpObject, NMTVITEMCHANGEFc.uStateNew);
lpStruct->uStateOld = (*env)->GetIntField(env, lpObject, NMTVITEMCHANGEFc.uStateOld);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, NMTVITEMCHANGEFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, NMTVITEMCHANGEFc.lParam);
return lpStruct;
}
@@ -4580,10 +3981,10 @@ void setNMTVITEMCHANGEFields(JNIEnv *env, jobject lpObject, NMTVITEMCHANGE *lpSt
if (!NMTVITEMCHANGEFc.cached) cacheNMTVITEMCHANGEFields(env, lpObject);
setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
(*env)->SetIntField(env, lpObject, NMTVITEMCHANGEFc.uChanged, (jint)lpStruct->uChanged);
- (*env)->SetIntLongField(env, lpObject, NMTVITEMCHANGEFc.hItem, (jintLong)lpStruct->hItem);
+ (*env)->SetLongField(env, lpObject, NMTVITEMCHANGEFc.hItem, (jlong)lpStruct->hItem);
(*env)->SetIntField(env, lpObject, NMTVITEMCHANGEFc.uStateNew, (jint)lpStruct->uStateNew);
(*env)->SetIntField(env, lpObject, NMTVITEMCHANGEFc.uStateOld, (jint)lpStruct->uStateOld);
- (*env)->SetIntLongField(env, lpObject, NMTVITEMCHANGEFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, NMTVITEMCHANGEFc.lParam, (jlong)lpStruct->lParam);
}
#endif
@@ -4741,11 +4142,11 @@ void cacheNOTIFYICONDATAFields(JNIEnv *env, jobject lpObject)
if (NOTIFYICONDATAFc.cached) return;
NOTIFYICONDATAFc.clazz = (*env)->GetObjectClass(env, lpObject);
NOTIFYICONDATAFc.cbSize = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "cbSize", "I");
- NOTIFYICONDATAFc.hWnd = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "hWnd", I_J);
+ NOTIFYICONDATAFc.hWnd = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "hWnd", "J");
NOTIFYICONDATAFc.uID = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "uID", "I");
NOTIFYICONDATAFc.uFlags = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "uFlags", "I");
NOTIFYICONDATAFc.uCallbackMessage = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "uCallbackMessage", "I");
- NOTIFYICONDATAFc.hIcon = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "hIcon", I_J);
+ NOTIFYICONDATAFc.hIcon = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "hIcon", "J");
NOTIFYICONDATAFc.szTip = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "szTip", "[C");
NOTIFYICONDATAFc.dwState = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "dwState", "I");
NOTIFYICONDATAFc.dwStateMask = (*env)->GetFieldID(env, NOTIFYICONDATAFc.clazz, "dwStateMask", "I");
@@ -4760,11 +4161,11 @@ NOTIFYICONDATA *getNOTIFYICONDATAFields(JNIEnv *env, jobject lpObject, NOTIFYICO
{
if (!NOTIFYICONDATAFc.cached) cacheNOTIFYICONDATAFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, NOTIFYICONDATAFc.cbSize);
- lpStruct->hWnd = (HWND)(*env)->GetIntLongField(env, lpObject, NOTIFYICONDATAFc.hWnd);
+ lpStruct->hWnd = (HWND)(*env)->GetLongField(env, lpObject, NOTIFYICONDATAFc.hWnd);
lpStruct->uID = (*env)->GetIntField(env, lpObject, NOTIFYICONDATAFc.uID);
lpStruct->uFlags = (*env)->GetIntField(env, lpObject, NOTIFYICONDATAFc.uFlags);
lpStruct->uCallbackMessage = (*env)->GetIntField(env, lpObject, NOTIFYICONDATAFc.uCallbackMessage);
- lpStruct->hIcon = (HICON)(*env)->GetIntLongField(env, lpObject, NOTIFYICONDATAFc.hIcon);
+ lpStruct->hIcon = (HICON)(*env)->GetLongField(env, lpObject, NOTIFYICONDATAFc.hIcon);
{
jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, NOTIFYICONDATAFc.szTip);
(*env)->GetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szTip) / sizeof(jchar), (jchar *)lpStruct->szTip);
@@ -4788,11 +4189,11 @@ void setNOTIFYICONDATAFields(JNIEnv *env, jobject lpObject, NOTIFYICONDATA *lpSt
{
if (!NOTIFYICONDATAFc.cached) cacheNOTIFYICONDATAFields(env, lpObject);
(*env)->SetIntField(env, lpObject, NOTIFYICONDATAFc.cbSize, (jint)lpStruct->cbSize);
- (*env)->SetIntLongField(env, lpObject, NOTIFYICONDATAFc.hWnd, (jintLong)lpStruct->hWnd);
+ (*env)->SetLongField(env, lpObject, NOTIFYICONDATAFc.hWnd, (jlong)lpStruct->hWnd);
(*env)->SetIntField(env, lpObject, NOTIFYICONDATAFc.uID, (jint)lpStruct->uID);
(*env)->SetIntField(env, lpObject, NOTIFYICONDATAFc.uFlags, (jint)lpStruct->uFlags);
(*env)->SetIntField(env, lpObject, NOTIFYICONDATAFc.uCallbackMessage, (jint)lpStruct->uCallbackMessage);
- (*env)->SetIntLongField(env, lpObject, NOTIFYICONDATAFc.hIcon, (jintLong)lpStruct->hIcon);
+ (*env)->SetLongField(env, lpObject, NOTIFYICONDATAFc.hIcon, (jlong)lpStruct->hIcon);
{
jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, NOTIFYICONDATAFc.szTip);
(*env)->SetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szTip) / sizeof(jchar), (jchar *)lpStruct->szTip);
@@ -4812,137 +4213,70 @@ void setNOTIFYICONDATAFields(JNIEnv *env, jobject lpObject, NOTIFYICONDATA *lpSt
}
#endif
-#ifndef NO_OFNOTIFY
-typedef struct OFNOTIFY_FID_CACHE {
+#ifndef NO_OSVERSIONINFOEX
+typedef struct OSVERSIONINFOEX_FID_CACHE {
int cached;
jclass clazz;
- jfieldID lpOFN, pszFile;
-} OFNOTIFY_FID_CACHE;
+ jfieldID dwOSVersionInfoSize, dwMajorVersion, dwMinorVersion, dwBuildNumber, dwPlatformId, szCSDVersion, wServicePackMajor, wServicePackMinor, wSuiteMask, wProductType, wReserved;
+} OSVERSIONINFOEX_FID_CACHE;
-OFNOTIFY_FID_CACHE OFNOTIFYFc;
+OSVERSIONINFOEX_FID_CACHE OSVERSIONINFOEXFc;
-void cacheOFNOTIFYFields(JNIEnv *env, jobject lpObject)
+void cacheOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject)
{
- if (OFNOTIFYFc.cached) return;
- cacheNMHDRFields(env, lpObject);
- OFNOTIFYFc.clazz = (*env)->GetObjectClass(env, lpObject);
- OFNOTIFYFc.lpOFN = (*env)->GetFieldID(env, OFNOTIFYFc.clazz, "lpOFN", I_J);
- OFNOTIFYFc.pszFile = (*env)->GetFieldID(env, OFNOTIFYFc.clazz, "pszFile", I_J);
- OFNOTIFYFc.cached = 1;
+ if (OSVERSIONINFOEXFc.cached) return;
+ OSVERSIONINFOEXFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ OSVERSIONINFOEXFc.dwOSVersionInfoSize = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "dwOSVersionInfoSize", "I");
+ OSVERSIONINFOEXFc.dwMajorVersion = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "dwMajorVersion", "I");
+ OSVERSIONINFOEXFc.dwMinorVersion = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "dwMinorVersion", "I");
+ OSVERSIONINFOEXFc.dwBuildNumber = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "dwBuildNumber", "I");
+ OSVERSIONINFOEXFc.dwPlatformId = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "dwPlatformId", "I");
+ OSVERSIONINFOEXFc.szCSDVersion = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "szCSDVersion", "[C");
+ OSVERSIONINFOEXFc.wServicePackMajor = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wServicePackMajor", "I");
+ OSVERSIONINFOEXFc.wServicePackMinor = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wServicePackMinor", "I");
+ OSVERSIONINFOEXFc.wSuiteMask = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wSuiteMask", "I");
+ OSVERSIONINFOEXFc.wProductType = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wProductType", "I");
+ OSVERSIONINFOEXFc.wReserved = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wReserved", "I");
+ OSVERSIONINFOEXFc.cached = 1;
}
-OFNOTIFY *getOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct)
+OSVERSIONINFOEX *getOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct)
{
- if (!OFNOTIFYFc.cached) cacheOFNOTIFYFields(env, lpObject);
- getNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
- lpStruct->lpOFN = (LPOPENFILENAME)(*env)->GetIntLongField(env, lpObject, OFNOTIFYFc.lpOFN);
- lpStruct->pszFile = (LPTSTR)(*env)->GetIntLongField(env, lpObject, OFNOTIFYFc.pszFile);
+ if (!OSVERSIONINFOEXFc.cached) cacheOSVERSIONINFOEXFields(env, lpObject);
+ lpStruct->dwOSVersionInfoSize = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.dwOSVersionInfoSize);
+ lpStruct->dwMajorVersion = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.dwMajorVersion);
+ lpStruct->dwMinorVersion = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.dwMinorVersion);
+ lpStruct->dwBuildNumber = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.dwBuildNumber);
+ lpStruct->dwPlatformId = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.dwPlatformId);
+ {
+ jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, OSVERSIONINFOEXFc.szCSDVersion);
+ (*env)->GetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szCSDVersion) / sizeof(jchar), (jchar *)lpStruct->szCSDVersion);
+ }
+ lpStruct->wServicePackMajor = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor);
+ lpStruct->wServicePackMinor = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor);
+ lpStruct->wSuiteMask = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask);
+ lpStruct->wProductType = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.wProductType);
+ lpStruct->wReserved = (*env)->GetIntField(env, lpObject, OSVERSIONINFOEXFc.wReserved);
return lpStruct;
}
-void setOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct)
+void setOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct)
{
- if (!OFNOTIFYFc.cached) cacheOFNOTIFYFields(env, lpObject);
- setNMHDRFields(env, lpObject, (NMHDR *)lpStruct);
- (*env)->SetIntLongField(env, lpObject, OFNOTIFYFc.lpOFN, (jintLong)lpStruct->lpOFN);
- (*env)->SetIntLongField(env, lpObject, OFNOTIFYFc.pszFile, (jintLong)lpStruct->pszFile);
-}
-#endif
-
-#ifndef NO_OPENFILENAME
-typedef struct OPENFILENAME_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID lStructSize, hwndOwner, hInstance, lpstrFilter, lpstrCustomFilter, nMaxCustFilter, nFilterIndex, lpstrFile, nMaxFile, lpstrFileTitle, nMaxFileTitle, lpstrInitialDir, lpstrTitle, Flags, nFileOffset, nFileExtension, lpstrDefExt, lCustData, lpfnHook, lpTemplateName, pvReserved, dwReserved, FlagsEx;
-} OPENFILENAME_FID_CACHE;
-
-OPENFILENAME_FID_CACHE OPENFILENAMEFc;
-
-void cacheOPENFILENAMEFields(JNIEnv *env, jobject lpObject)
-{
- if (OPENFILENAMEFc.cached) return;
- OPENFILENAMEFc.clazz = (*env)->GetObjectClass(env, lpObject);
- OPENFILENAMEFc.lStructSize = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lStructSize", "I");
- OPENFILENAMEFc.hwndOwner = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "hwndOwner", I_J);
- OPENFILENAMEFc.hInstance = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "hInstance", I_J);
- OPENFILENAMEFc.lpstrFilter = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpstrFilter", I_J);
- OPENFILENAMEFc.lpstrCustomFilter = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpstrCustomFilter", I_J);
- OPENFILENAMEFc.nMaxCustFilter = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "nMaxCustFilter", "I");
- OPENFILENAMEFc.nFilterIndex = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "nFilterIndex", "I");
- OPENFILENAMEFc.lpstrFile = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpstrFile", I_J);
- OPENFILENAMEFc.nMaxFile = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "nMaxFile", "I");
- OPENFILENAMEFc.lpstrFileTitle = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpstrFileTitle", I_J);
- OPENFILENAMEFc.nMaxFileTitle = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "nMaxFileTitle", "I");
- OPENFILENAMEFc.lpstrInitialDir = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpstrInitialDir", I_J);
- OPENFILENAMEFc.lpstrTitle = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpstrTitle", I_J);
- OPENFILENAMEFc.Flags = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "Flags", "I");
- OPENFILENAMEFc.nFileOffset = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "nFileOffset", "S");
- OPENFILENAMEFc.nFileExtension = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "nFileExtension", "S");
- OPENFILENAMEFc.lpstrDefExt = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpstrDefExt", I_J);
- OPENFILENAMEFc.lCustData = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lCustData", I_J);
- OPENFILENAMEFc.lpfnHook = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpfnHook", I_J);
- OPENFILENAMEFc.lpTemplateName = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "lpTemplateName", I_J);
- OPENFILENAMEFc.pvReserved = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "pvReserved", I_J);
- OPENFILENAMEFc.dwReserved = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "dwReserved", "I");
- OPENFILENAMEFc.FlagsEx = (*env)->GetFieldID(env, OPENFILENAMEFc.clazz, "FlagsEx", "I");
- OPENFILENAMEFc.cached = 1;
-}
-
-OPENFILENAME *getOPENFILENAMEFields(JNIEnv *env, jobject lpObject, OPENFILENAME *lpStruct)
-{
- if (!OPENFILENAMEFc.cached) cacheOPENFILENAMEFields(env, lpObject);
- lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.lStructSize);
- lpStruct->hwndOwner = (HWND)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.hwndOwner);
- lpStruct->hInstance = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.hInstance);
- lpStruct->lpstrFilter = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrFilter);
- lpStruct->lpstrCustomFilter = (LPTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrCustomFilter);
- lpStruct->nMaxCustFilter = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.nMaxCustFilter);
- lpStruct->nFilterIndex = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.nFilterIndex);
- lpStruct->lpstrFile = (LPTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrFile);
- lpStruct->nMaxFile = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.nMaxFile);
- lpStruct->lpstrFileTitle = (LPTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrFileTitle);
- lpStruct->nMaxFileTitle = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.nMaxFileTitle);
- lpStruct->lpstrInitialDir = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrInitialDir);
- lpStruct->lpstrTitle = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrTitle);
- lpStruct->Flags = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.Flags);
- lpStruct->nFileOffset = (*env)->GetShortField(env, lpObject, OPENFILENAMEFc.nFileOffset);
- lpStruct->nFileExtension = (*env)->GetShortField(env, lpObject, OPENFILENAMEFc.nFileExtension);
- lpStruct->lpstrDefExt = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrDefExt);
- lpStruct->lCustData = (*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lCustData);
- lpStruct->lpfnHook = (LPOFNHOOKPROC)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpfnHook);
- lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.lpTemplateName);
- lpStruct->pvReserved = (void *)(*env)->GetIntLongField(env, lpObject, OPENFILENAMEFc.pvReserved);
- lpStruct->dwReserved = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.dwReserved);
- lpStruct->FlagsEx = (*env)->GetIntField(env, lpObject, OPENFILENAMEFc.FlagsEx);
- return lpStruct;
-}
-
-void setOPENFILENAMEFields(JNIEnv *env, jobject lpObject, OPENFILENAME *lpStruct)
-{
- if (!OPENFILENAMEFc.cached) cacheOPENFILENAMEFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.lStructSize, (jint)lpStruct->lStructSize);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.hwndOwner, (jintLong)lpStruct->hwndOwner);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.hInstance, (jintLong)lpStruct->hInstance);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrFilter, (jintLong)lpStruct->lpstrFilter);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrCustomFilter, (jintLong)lpStruct->lpstrCustomFilter);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.nMaxCustFilter, (jint)lpStruct->nMaxCustFilter);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.nFilterIndex, (jint)lpStruct->nFilterIndex);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrFile, (jintLong)lpStruct->lpstrFile);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.nMaxFile, (jint)lpStruct->nMaxFile);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrFileTitle, (jintLong)lpStruct->lpstrFileTitle);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.nMaxFileTitle, (jint)lpStruct->nMaxFileTitle);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrInitialDir, (jintLong)lpStruct->lpstrInitialDir);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrTitle, (jintLong)lpStruct->lpstrTitle);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.Flags, (jint)lpStruct->Flags);
- (*env)->SetShortField(env, lpObject, OPENFILENAMEFc.nFileOffset, (jshort)lpStruct->nFileOffset);
- (*env)->SetShortField(env, lpObject, OPENFILENAMEFc.nFileExtension, (jshort)lpStruct->nFileExtension);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpstrDefExt, (jintLong)lpStruct->lpstrDefExt);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lCustData, (jintLong)lpStruct->lCustData);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpfnHook, (jintLong)lpStruct->lpfnHook);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.lpTemplateName, (jintLong)lpStruct->lpTemplateName);
- (*env)->SetIntLongField(env, lpObject, OPENFILENAMEFc.pvReserved, (jintLong)lpStruct->pvReserved);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.dwReserved, (jint)lpStruct->dwReserved);
- (*env)->SetIntField(env, lpObject, OPENFILENAMEFc.FlagsEx, (jint)lpStruct->FlagsEx);
+ if (!OSVERSIONINFOEXFc.cached) cacheOSVERSIONINFOEXFields(env, lpObject);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.dwOSVersionInfoSize, (jint)lpStruct->dwOSVersionInfoSize);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.dwMajorVersion, (jint)lpStruct->dwMajorVersion);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.dwMinorVersion, (jint)lpStruct->dwMinorVersion);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.dwBuildNumber, (jint)lpStruct->dwBuildNumber);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.dwPlatformId, (jint)lpStruct->dwPlatformId);
+ {
+ jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, OSVERSIONINFOEXFc.szCSDVersion);
+ (*env)->SetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szCSDVersion) / sizeof(jchar), (jchar *)lpStruct->szCSDVersion);
+ }
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor, (jint)lpStruct->wServicePackMajor);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor, (jint)lpStruct->wServicePackMinor);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask, (jint)lpStruct->wSuiteMask);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.wProductType, (jint)lpStruct->wProductType);
+ (*env)->SetIntField(env, lpObject, OSVERSIONINFOEXFc.wReserved, (jint)lpStruct->wReserved);
}
#endif
@@ -4996,10 +4330,10 @@ void cacheOUTLINETEXTMETRICFields(JNIEnv *env, jobject lpObject)
OUTLINETEXTMETRICFc.otmsStrikeoutPosition = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmsStrikeoutPosition", "I");
OUTLINETEXTMETRICFc.otmsUnderscoreSize = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmsUnderscoreSize", "I");
OUTLINETEXTMETRICFc.otmsUnderscorePosition = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmsUnderscorePosition", "I");
- OUTLINETEXTMETRICFc.otmpFamilyName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpFamilyName", I_J);
- OUTLINETEXTMETRICFc.otmpFaceName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpFaceName", I_J);
- OUTLINETEXTMETRICFc.otmpStyleName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpStyleName", I_J);
- OUTLINETEXTMETRICFc.otmpFullName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpFullName", I_J);
+ OUTLINETEXTMETRICFc.otmpFamilyName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpFamilyName", "J");
+ OUTLINETEXTMETRICFc.otmpFaceName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpFaceName", "J");
+ OUTLINETEXTMETRICFc.otmpStyleName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpStyleName", "J");
+ OUTLINETEXTMETRICFc.otmpFullName = (*env)->GetFieldID(env, OUTLINETEXTMETRICFc.clazz, "otmpFullName", "J");
OUTLINETEXTMETRICFc.cached = 1;
}
@@ -5061,10 +4395,10 @@ OUTLINETEXTMETRIC *getOUTLINETEXTMETRICFields(JNIEnv *env, jobject lpObject, OUT
lpStruct->otmsStrikeoutPosition = (*env)->GetIntField(env, lpObject, OUTLINETEXTMETRICFc.otmsStrikeoutPosition);
lpStruct->otmsUnderscoreSize = (*env)->GetIntField(env, lpObject, OUTLINETEXTMETRICFc.otmsUnderscoreSize);
lpStruct->otmsUnderscorePosition = (*env)->GetIntField(env, lpObject, OUTLINETEXTMETRICFc.otmsUnderscorePosition);
- lpStruct->otmpFamilyName = (PSTR)(*env)->GetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFamilyName);
- lpStruct->otmpFaceName = (PSTR)(*env)->GetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFaceName);
- lpStruct->otmpStyleName = (PSTR)(*env)->GetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpStyleName);
- lpStruct->otmpFullName = (PSTR)(*env)->GetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFullName);
+ lpStruct->otmpFamilyName = (PSTR)(*env)->GetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFamilyName);
+ lpStruct->otmpFaceName = (PSTR)(*env)->GetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFaceName);
+ lpStruct->otmpStyleName = (PSTR)(*env)->GetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpStyleName);
+ lpStruct->otmpFullName = (PSTR)(*env)->GetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFullName);
return lpStruct;
}
@@ -5126,10 +4460,10 @@ void setOUTLINETEXTMETRICFields(JNIEnv *env, jobject lpObject, OUTLINETEXTMETRIC
(*env)->SetIntField(env, lpObject, OUTLINETEXTMETRICFc.otmsStrikeoutPosition, (jint)lpStruct->otmsStrikeoutPosition);
(*env)->SetIntField(env, lpObject, OUTLINETEXTMETRICFc.otmsUnderscoreSize, (jint)lpStruct->otmsUnderscoreSize);
(*env)->SetIntField(env, lpObject, OUTLINETEXTMETRICFc.otmsUnderscorePosition, (jint)lpStruct->otmsUnderscorePosition);
- (*env)->SetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFamilyName, (jintLong)lpStruct->otmpFamilyName);
- (*env)->SetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFaceName, (jintLong)lpStruct->otmpFaceName);
- (*env)->SetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpStyleName, (jintLong)lpStruct->otmpStyleName);
- (*env)->SetIntLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFullName, (jintLong)lpStruct->otmpFullName);
+ (*env)->SetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFamilyName, (jlong)lpStruct->otmpFamilyName);
+ (*env)->SetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFaceName, (jlong)lpStruct->otmpFaceName);
+ (*env)->SetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpStyleName, (jlong)lpStruct->otmpStyleName);
+ (*env)->SetLongField(env, lpObject, OUTLINETEXTMETRICFc.otmpFullName, (jlong)lpStruct->otmpFullName);
}
#endif
@@ -5146,7 +4480,7 @@ void cachePAINTSTRUCTFields(JNIEnv *env, jobject lpObject)
{
if (PAINTSTRUCTFc.cached) return;
PAINTSTRUCTFc.clazz = (*env)->GetObjectClass(env, lpObject);
- PAINTSTRUCTFc.hdc = (*env)->GetFieldID(env, PAINTSTRUCTFc.clazz, "hdc", I_J);
+ PAINTSTRUCTFc.hdc = (*env)->GetFieldID(env, PAINTSTRUCTFc.clazz, "hdc", "J");
PAINTSTRUCTFc.fErase = (*env)->GetFieldID(env, PAINTSTRUCTFc.clazz, "fErase", "Z");
PAINTSTRUCTFc.left = (*env)->GetFieldID(env, PAINTSTRUCTFc.clazz, "left", "I");
PAINTSTRUCTFc.top = (*env)->GetFieldID(env, PAINTSTRUCTFc.clazz, "top", "I");
@@ -5161,7 +4495,7 @@ void cachePAINTSTRUCTFields(JNIEnv *env, jobject lpObject)
PAINTSTRUCT *getPAINTSTRUCTFields(JNIEnv *env, jobject lpObject, PAINTSTRUCT *lpStruct)
{
if (!PAINTSTRUCTFc.cached) cachePAINTSTRUCTFields(env, lpObject);
- lpStruct->hdc = (HDC)(*env)->GetIntLongField(env, lpObject, PAINTSTRUCTFc.hdc);
+ lpStruct->hdc = (HDC)(*env)->GetLongField(env, lpObject, PAINTSTRUCTFc.hdc);
lpStruct->fErase = (*env)->GetBooleanField(env, lpObject, PAINTSTRUCTFc.fErase);
lpStruct->rcPaint.left = (*env)->GetIntField(env, lpObject, PAINTSTRUCTFc.left);
lpStruct->rcPaint.top = (*env)->GetIntField(env, lpObject, PAINTSTRUCTFc.top);
@@ -5179,7 +4513,7 @@ PAINTSTRUCT *getPAINTSTRUCTFields(JNIEnv *env, jobject lpObject, PAINTSTRUCT *lp
void setPAINTSTRUCTFields(JNIEnv *env, jobject lpObject, PAINTSTRUCT *lpStruct)
{
if (!PAINTSTRUCTFc.cached) cachePAINTSTRUCTFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, PAINTSTRUCTFc.hdc, (jintLong)lpStruct->hdc);
+ (*env)->SetLongField(env, lpObject, PAINTSTRUCTFc.hdc, (jlong)lpStruct->hdc);
(*env)->SetBooleanField(env, lpObject, PAINTSTRUCTFc.fErase, (jboolean)lpStruct->fErase);
(*env)->SetIntField(env, lpObject, PAINTSTRUCTFc.left, (jint)lpStruct->rcPaint.left);
(*env)->SetIntField(env, lpObject, PAINTSTRUCTFc.top, (jint)lpStruct->rcPaint.top);
@@ -5194,64 +4528,6 @@ void setPAINTSTRUCTFields(JNIEnv *env, jobject lpObject, PAINTSTRUCT *lpStruct)
}
#endif
-#ifndef NO_PANOSE
-typedef struct PANOSE_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID bFamilyType, bSerifStyle, bWeight, bProportion, bContrast, bStrokeVariation, bArmStyle, bLetterform, bMidline, bXHeight;
-} PANOSE_FID_CACHE;
-
-PANOSE_FID_CACHE PANOSEFc;
-
-void cachePANOSEFields(JNIEnv *env, jobject lpObject)
-{
- if (PANOSEFc.cached) return;
- PANOSEFc.clazz = (*env)->GetObjectClass(env, lpObject);
- PANOSEFc.bFamilyType = (*env)->GetFieldID(env, PANOSEFc.clazz, "bFamilyType", "B");
- PANOSEFc.bSerifStyle = (*env)->GetFieldID(env, PANOSEFc.clazz, "bSerifStyle", "B");
- PANOSEFc.bWeight = (*env)->GetFieldID(env, PANOSEFc.clazz, "bWeight", "B");
- PANOSEFc.bProportion = (*env)->GetFieldID(env, PANOSEFc.clazz, "bProportion", "B");
- PANOSEFc.bContrast = (*env)->GetFieldID(env, PANOSEFc.clazz, "bContrast", "B");
- PANOSEFc.bStrokeVariation = (*env)->GetFieldID(env, PANOSEFc.clazz, "bStrokeVariation", "B");
- PANOSEFc.bArmStyle = (*env)->GetFieldID(env, PANOSEFc.clazz, "bArmStyle", "B");
- PANOSEFc.bLetterform = (*env)->GetFieldID(env, PANOSEFc.clazz, "bLetterform", "B");
- PANOSEFc.bMidline = (*env)->GetFieldID(env, PANOSEFc.clazz, "bMidline", "B");
- PANOSEFc.bXHeight = (*env)->GetFieldID(env, PANOSEFc.clazz, "bXHeight", "B");
- PANOSEFc.cached = 1;
-}
-
-PANOSE *getPANOSEFields(JNIEnv *env, jobject lpObject, PANOSE *lpStruct)
-{
- if (!PANOSEFc.cached) cachePANOSEFields(env, lpObject);
- lpStruct->bFamilyType = (*env)->GetByteField(env, lpObject, PANOSEFc.bFamilyType);
- lpStruct->bSerifStyle = (*env)->GetByteField(env, lpObject, PANOSEFc.bSerifStyle);
- lpStruct->bWeight = (*env)->GetByteField(env, lpObject, PANOSEFc.bWeight);
- lpStruct->bProportion = (*env)->GetByteField(env, lpObject, PANOSEFc.bProportion);
- lpStruct->bContrast = (*env)->GetByteField(env, lpObject, PANOSEFc.bContrast);
- lpStruct->bStrokeVariation = (*env)->GetByteField(env, lpObject, PANOSEFc.bStrokeVariation);
- lpStruct->bArmStyle = (*env)->GetByteField(env, lpObject, PANOSEFc.bArmStyle);
- lpStruct->bLetterform = (*env)->GetByteField(env, lpObject, PANOSEFc.bLetterform);
- lpStruct->bMidline = (*env)->GetByteField(env, lpObject, PANOSEFc.bMidline);
- lpStruct->bXHeight = (*env)->GetByteField(env, lpObject, PANOSEFc.bXHeight);
- return lpStruct;
-}
-
-void setPANOSEFields(JNIEnv *env, jobject lpObject, PANOSE *lpStruct)
-{
- if (!PANOSEFc.cached) cachePANOSEFields(env, lpObject);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bFamilyType, (jbyte)lpStruct->bFamilyType);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bSerifStyle, (jbyte)lpStruct->bSerifStyle);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bWeight, (jbyte)lpStruct->bWeight);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bProportion, (jbyte)lpStruct->bProportion);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bContrast, (jbyte)lpStruct->bContrast);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bStrokeVariation, (jbyte)lpStruct->bStrokeVariation);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bArmStyle, (jbyte)lpStruct->bArmStyle);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bLetterform, (jbyte)lpStruct->bLetterform);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bMidline, (jbyte)lpStruct->bMidline);
- (*env)->SetByteField(env, lpObject, PANOSEFc.bXHeight, (jbyte)lpStruct->bXHeight);
-}
-#endif
-
#ifndef NO_POINT
typedef struct POINT_FID_CACHE {
int cached;
@@ -5300,24 +4576,24 @@ void cachePRINTDLGFields(JNIEnv *env, jobject lpObject)
if (PRINTDLGFc.cached) return;
PRINTDLGFc.clazz = (*env)->GetObjectClass(env, lpObject);
PRINTDLGFc.lStructSize = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lStructSize", "I");
- PRINTDLGFc.hwndOwner = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hwndOwner", I_J);
- PRINTDLGFc.hDevMode = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hDevMode", I_J);
- PRINTDLGFc.hDevNames = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hDevNames", I_J);
- PRINTDLGFc.hDC = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hDC", I_J);
+ PRINTDLGFc.hwndOwner = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hwndOwner", "J");
+ PRINTDLGFc.hDevMode = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hDevMode", "J");
+ PRINTDLGFc.hDevNames = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hDevNames", "J");
+ PRINTDLGFc.hDC = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hDC", "J");
PRINTDLGFc.Flags = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "Flags", "I");
PRINTDLGFc.nFromPage = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "nFromPage", "S");
PRINTDLGFc.nToPage = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "nToPage", "S");
PRINTDLGFc.nMinPage = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "nMinPage", "S");
PRINTDLGFc.nMaxPage = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "nMaxPage", "S");
PRINTDLGFc.nCopies = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "nCopies", "S");
- PRINTDLGFc.hInstance = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hInstance", I_J);
- PRINTDLGFc.lCustData = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lCustData", I_J);
- PRINTDLGFc.lpfnPrintHook = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpfnPrintHook", I_J);
- PRINTDLGFc.lpfnSetupHook = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpfnSetupHook", I_J);
- PRINTDLGFc.lpPrintTemplateName = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpPrintTemplateName", I_J);
- PRINTDLGFc.lpSetupTemplateName = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpSetupTemplateName", I_J);
- PRINTDLGFc.hPrintTemplate = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hPrintTemplate", I_J);
- PRINTDLGFc.hSetupTemplate = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hSetupTemplate", I_J);
+ PRINTDLGFc.hInstance = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hInstance", "J");
+ PRINTDLGFc.lCustData = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lCustData", "J");
+ PRINTDLGFc.lpfnPrintHook = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpfnPrintHook", "J");
+ PRINTDLGFc.lpfnSetupHook = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpfnSetupHook", "J");
+ PRINTDLGFc.lpPrintTemplateName = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpPrintTemplateName", "J");
+ PRINTDLGFc.lpSetupTemplateName = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "lpSetupTemplateName", "J");
+ PRINTDLGFc.hPrintTemplate = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hPrintTemplate", "J");
+ PRINTDLGFc.hSetupTemplate = (*env)->GetFieldID(env, PRINTDLGFc.clazz, "hSetupTemplate", "J");
PRINTDLGFc.cached = 1;
}
@@ -5325,24 +4601,24 @@ PRINTDLG *getPRINTDLGFields(JNIEnv *env, jobject lpObject, PRINTDLG *lpStruct)
{
if (!PRINTDLGFc.cached) cachePRINTDLGFields(env, lpObject);
lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, PRINTDLGFc.lStructSize);
- lpStruct->hwndOwner = (HWND)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.hwndOwner);
- lpStruct->hDevMode = (HGLOBAL)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.hDevMode);
- lpStruct->hDevNames = (HGLOBAL)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.hDevNames);
- lpStruct->hDC = (HDC)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.hDC);
+ lpStruct->hwndOwner = (HWND)(*env)->GetLongField(env, lpObject, PRINTDLGFc.hwndOwner);
+ lpStruct->hDevMode = (HGLOBAL)(*env)->GetLongField(env, lpObject, PRINTDLGFc.hDevMode);
+ lpStruct->hDevNames = (HGLOBAL)(*env)->GetLongField(env, lpObject, PRINTDLGFc.hDevNames);
+ lpStruct->hDC = (HDC)(*env)->GetLongField(env, lpObject, PRINTDLGFc.hDC);
lpStruct->Flags = (*env)->GetIntField(env, lpObject, PRINTDLGFc.Flags);
lpStruct->nFromPage = (*env)->GetShortField(env, lpObject, PRINTDLGFc.nFromPage);
lpStruct->nToPage = (*env)->GetShortField(env, lpObject, PRINTDLGFc.nToPage);
lpStruct->nMinPage = (*env)->GetShortField(env, lpObject, PRINTDLGFc.nMinPage);
lpStruct->nMaxPage = (*env)->GetShortField(env, lpObject, PRINTDLGFc.nMaxPage);
lpStruct->nCopies = (*env)->GetShortField(env, lpObject, PRINTDLGFc.nCopies);
- lpStruct->hInstance = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.hInstance);
- lpStruct->lCustData = (*env)->GetIntLongField(env, lpObject, PRINTDLGFc.lCustData);
- lpStruct->lpfnPrintHook = (LPPRINTHOOKPROC)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.lpfnPrintHook);
- lpStruct->lpfnSetupHook = (LPPRINTHOOKPROC)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.lpfnSetupHook);
- lpStruct->lpPrintTemplateName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.lpPrintTemplateName);
- lpStruct->lpSetupTemplateName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.lpSetupTemplateName);
- lpStruct->hPrintTemplate = (HGLOBAL)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.hPrintTemplate);
- lpStruct->hSetupTemplate = (HGLOBAL)(*env)->GetIntLongField(env, lpObject, PRINTDLGFc.hSetupTemplate);
+ lpStruct->hInstance = (HINSTANCE)(*env)->GetLongField(env, lpObject, PRINTDLGFc.hInstance);
+ lpStruct->lCustData = (*env)->GetLongField(env, lpObject, PRINTDLGFc.lCustData);
+ lpStruct->lpfnPrintHook = (LPPRINTHOOKPROC)(*env)->GetLongField(env, lpObject, PRINTDLGFc.lpfnPrintHook);
+ lpStruct->lpfnSetupHook = (LPPRINTHOOKPROC)(*env)->GetLongField(env, lpObject, PRINTDLGFc.lpfnSetupHook);
+ lpStruct->lpPrintTemplateName = (LPCTSTR)(*env)->GetLongField(env, lpObject, PRINTDLGFc.lpPrintTemplateName);
+ lpStruct->lpSetupTemplateName = (LPCTSTR)(*env)->GetLongField(env, lpObject, PRINTDLGFc.lpSetupTemplateName);
+ lpStruct->hPrintTemplate = (HGLOBAL)(*env)->GetLongField(env, lpObject, PRINTDLGFc.hPrintTemplate);
+ lpStruct->hSetupTemplate = (HGLOBAL)(*env)->GetLongField(env, lpObject, PRINTDLGFc.hSetupTemplate);
return lpStruct;
}
@@ -5350,24 +4626,24 @@ void setPRINTDLGFields(JNIEnv *env, jobject lpObject, PRINTDLG *lpStruct)
{
if (!PRINTDLGFc.cached) cachePRINTDLGFields(env, lpObject);
(*env)->SetIntField(env, lpObject, PRINTDLGFc.lStructSize, (jint)lpStruct->lStructSize);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.hwndOwner, (jintLong)lpStruct->hwndOwner);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.hDevMode, (jintLong)lpStruct->hDevMode);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.hDevNames, (jintLong)lpStruct->hDevNames);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.hDC, (jintLong)lpStruct->hDC);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.hwndOwner, (jlong)lpStruct->hwndOwner);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.hDevMode, (jlong)lpStruct->hDevMode);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.hDevNames, (jlong)lpStruct->hDevNames);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.hDC, (jlong)lpStruct->hDC);
(*env)->SetIntField(env, lpObject, PRINTDLGFc.Flags, (jint)lpStruct->Flags);
(*env)->SetShortField(env, lpObject, PRINTDLGFc.nFromPage, (jshort)lpStruct->nFromPage);
(*env)->SetShortField(env, lpObject, PRINTDLGFc.nToPage, (jshort)lpStruct->nToPage);
(*env)->SetShortField(env, lpObject, PRINTDLGFc.nMinPage, (jshort)lpStruct->nMinPage);
(*env)->SetShortField(env, lpObject, PRINTDLGFc.nMaxPage, (jshort)lpStruct->nMaxPage);
(*env)->SetShortField(env, lpObject, PRINTDLGFc.nCopies, (jshort)lpStruct->nCopies);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.hInstance, (jintLong)lpStruct->hInstance);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.lCustData, (jintLong)lpStruct->lCustData);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.lpfnPrintHook, (jintLong)lpStruct->lpfnPrintHook);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.lpfnSetupHook, (jintLong)lpStruct->lpfnSetupHook);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.lpPrintTemplateName, (jintLong)lpStruct->lpPrintTemplateName);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.lpSetupTemplateName, (jintLong)lpStruct->lpSetupTemplateName);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.hPrintTemplate, (jintLong)lpStruct->hPrintTemplate);
- (*env)->SetIntLongField(env, lpObject, PRINTDLGFc.hSetupTemplate, (jintLong)lpStruct->hSetupTemplate);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.hInstance, (jlong)lpStruct->hInstance);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.lCustData, (jlong)lpStruct->lCustData);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.lpfnPrintHook, (jlong)lpStruct->lpfnPrintHook);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.lpfnSetupHook, (jlong)lpStruct->lpfnSetupHook);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.lpPrintTemplateName, (jlong)lpStruct->lpPrintTemplateName);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.lpSetupTemplateName, (jlong)lpStruct->lpSetupTemplateName);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.hPrintTemplate, (jlong)lpStruct->hPrintTemplate);
+ (*env)->SetLongField(env, lpObject, PRINTDLGFc.hSetupTemplate, (jlong)lpStruct->hSetupTemplate);
}
#endif
@@ -5384,8 +4660,8 @@ void cachePROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject)
{
if (PROCESS_INFORMATIONFc.cached) return;
PROCESS_INFORMATIONFc.clazz = (*env)->GetObjectClass(env, lpObject);
- PROCESS_INFORMATIONFc.hProcess = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "hProcess", I_J);
- PROCESS_INFORMATIONFc.hThread = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "hThread", I_J);
+ PROCESS_INFORMATIONFc.hProcess = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "hProcess", "J");
+ PROCESS_INFORMATIONFc.hThread = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "hThread", "J");
PROCESS_INFORMATIONFc.dwProcessId = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "dwProcessId", "I");
PROCESS_INFORMATIONFc.dwThreadId = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "dwThreadId", "I");
PROCESS_INFORMATIONFc.cached = 1;
@@ -5394,8 +4670,8 @@ void cachePROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject)
PROCESS_INFORMATION *getPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMATION *lpStruct)
{
if (!PROCESS_INFORMATIONFc.cached) cachePROCESS_INFORMATIONFields(env, lpObject);
- lpStruct->hProcess = (HANDLE)(*env)->GetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hProcess);
- lpStruct->hThread = (HANDLE)(*env)->GetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hThread);
+ lpStruct->hProcess = (HANDLE)(*env)->GetLongField(env, lpObject, PROCESS_INFORMATIONFc.hProcess);
+ lpStruct->hThread = (HANDLE)(*env)->GetLongField(env, lpObject, PROCESS_INFORMATIONFc.hThread);
lpStruct->dwProcessId = (*env)->GetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwProcessId);
lpStruct->dwThreadId = (*env)->GetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwThreadId);
return lpStruct;
@@ -5404,8 +4680,8 @@ PROCESS_INFORMATION *getPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject,
void setPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMATION *lpStruct)
{
if (!PROCESS_INFORMATIONFc.cached) cachePROCESS_INFORMATIONFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hProcess, (jintLong)lpStruct->hProcess);
- (*env)->SetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hThread, (jintLong)lpStruct->hThread);
+ (*env)->SetLongField(env, lpObject, PROCESS_INFORMATIONFc.hProcess, (jlong)lpStruct->hProcess);
+ (*env)->SetLongField(env, lpObject, PROCESS_INFORMATIONFc.hThread, (jlong)lpStruct->hThread);
(*env)->SetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwProcessId, (jint)lpStruct->dwProcessId);
(*env)->SetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwThreadId, (jint)lpStruct->dwThreadId);
}
@@ -5469,20 +4745,20 @@ void cacheREBARBANDINFOFields(JNIEnv *env, jobject lpObject)
REBARBANDINFOFc.fStyle = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "fStyle", "I");
REBARBANDINFOFc.clrFore = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "clrFore", "I");
REBARBANDINFOFc.clrBack = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "clrBack", "I");
- REBARBANDINFOFc.lpText = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "lpText", I_J);
+ REBARBANDINFOFc.lpText = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "lpText", "J");
REBARBANDINFOFc.cch = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cch", "I");
REBARBANDINFOFc.iImage = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "iImage", "I");
- REBARBANDINFOFc.hwndChild = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "hwndChild", I_J);
+ REBARBANDINFOFc.hwndChild = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "hwndChild", "J");
REBARBANDINFOFc.cxMinChild = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cxMinChild", "I");
REBARBANDINFOFc.cyMinChild = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cyMinChild", "I");
REBARBANDINFOFc.cx = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cx", "I");
- REBARBANDINFOFc.hbmBack = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "hbmBack", I_J);
+ REBARBANDINFOFc.hbmBack = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "hbmBack", "J");
REBARBANDINFOFc.wID = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "wID", "I");
REBARBANDINFOFc.cyChild = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cyChild", "I");
REBARBANDINFOFc.cyMaxChild = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cyMaxChild", "I");
REBARBANDINFOFc.cyIntegral = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cyIntegral", "I");
REBARBANDINFOFc.cxIdeal = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cxIdeal", "I");
- REBARBANDINFOFc.lParam = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "lParam", I_J);
+ REBARBANDINFOFc.lParam = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "lParam", "J");
REBARBANDINFOFc.cxHeader = (*env)->GetFieldID(env, REBARBANDINFOFc.clazz, "cxHeader", "I");
REBARBANDINFOFc.cached = 1;
}
@@ -5495,20 +4771,20 @@ REBARBANDINFO *getREBARBANDINFOFields(JNIEnv *env, jobject lpObject, REBARBANDIN
lpStruct->fStyle = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.fStyle);
lpStruct->clrFore = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.clrFore);
lpStruct->clrBack = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.clrBack);
- lpStruct->lpText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, REBARBANDINFOFc.lpText);
+ lpStruct->lpText = (LPTSTR)(*env)->GetLongField(env, lpObject, REBARBANDINFOFc.lpText);
lpStruct->cch = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cch);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.iImage);
- lpStruct->hwndChild = (HWND)(*env)->GetIntLongField(env, lpObject, REBARBANDINFOFc.hwndChild);
+ lpStruct->hwndChild = (HWND)(*env)->GetLongField(env, lpObject, REBARBANDINFOFc.hwndChild);
lpStruct->cxMinChild = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cxMinChild);
lpStruct->cyMinChild = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cyMinChild);
lpStruct->cx = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cx);
- lpStruct->hbmBack = (HBITMAP)(*env)->GetIntLongField(env, lpObject, REBARBANDINFOFc.hbmBack);
+ lpStruct->hbmBack = (HBITMAP)(*env)->GetLongField(env, lpObject, REBARBANDINFOFc.hbmBack);
lpStruct->wID = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.wID);
lpStruct->cyChild = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cyChild);
lpStruct->cyMaxChild = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cyMaxChild);
lpStruct->cyIntegral = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cyIntegral);
lpStruct->cxIdeal = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cxIdeal);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, REBARBANDINFOFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, REBARBANDINFOFc.lParam);
lpStruct->cxHeader = (*env)->GetIntField(env, lpObject, REBARBANDINFOFc.cxHeader);
return lpStruct;
}
@@ -5521,20 +4797,20 @@ void setREBARBANDINFOFields(JNIEnv *env, jobject lpObject, REBARBANDINFO *lpStru
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.fStyle, (jint)lpStruct->fStyle);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.clrFore, (jint)lpStruct->clrFore);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.clrBack, (jint)lpStruct->clrBack);
- (*env)->SetIntLongField(env, lpObject, REBARBANDINFOFc.lpText, (jintLong)lpStruct->lpText);
+ (*env)->SetLongField(env, lpObject, REBARBANDINFOFc.lpText, (jlong)lpStruct->lpText);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cch, (jint)lpStruct->cch);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.iImage, (jint)lpStruct->iImage);
- (*env)->SetIntLongField(env, lpObject, REBARBANDINFOFc.hwndChild, (jintLong)lpStruct->hwndChild);
+ (*env)->SetLongField(env, lpObject, REBARBANDINFOFc.hwndChild, (jlong)lpStruct->hwndChild);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cxMinChild, (jint)lpStruct->cxMinChild);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cyMinChild, (jint)lpStruct->cyMinChild);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cx, (jint)lpStruct->cx);
- (*env)->SetIntLongField(env, lpObject, REBARBANDINFOFc.hbmBack, (jintLong)lpStruct->hbmBack);
+ (*env)->SetLongField(env, lpObject, REBARBANDINFOFc.hbmBack, (jlong)lpStruct->hbmBack);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.wID, (jint)lpStruct->wID);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cyChild, (jint)lpStruct->cyChild);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cyMaxChild, (jint)lpStruct->cyMaxChild);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cyIntegral, (jint)lpStruct->cyIntegral);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cxIdeal, (jint)lpStruct->cxIdeal);
- (*env)->SetIntLongField(env, lpObject, REBARBANDINFOFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, REBARBANDINFOFc.lParam, (jlong)lpStruct->lParam);
(*env)->SetIntField(env, lpObject, REBARBANDINFOFc.cxHeader, (jint)lpStruct->cxHeader);
}
#endif
@@ -5596,7 +4872,7 @@ void cacheSAFEARRAYFields(JNIEnv *env, jobject lpObject)
SAFEARRAYFc.fFeatures = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "fFeatures", "S");
SAFEARRAYFc.cbElements = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cbElements", "I");
SAFEARRAYFc.cLocks = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cLocks", "I");
- SAFEARRAYFc.pvData = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "pvData", I_J);
+ SAFEARRAYFc.pvData = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "pvData", "J");
SAFEARRAYFc.rgsabound = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "rgsabound", "Lorg/eclipse/swt/internal/win32/SAFEARRAYBOUND;");
SAFEARRAYFc.cached = 1;
}
@@ -5608,7 +4884,7 @@ SAFEARRAY *getSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct
lpStruct->fFeatures = (*env)->GetShortField(env, lpObject, SAFEARRAYFc.fFeatures);
lpStruct->cbElements = (*env)->GetIntField(env, lpObject, SAFEARRAYFc.cbElements);
lpStruct->cLocks = (*env)->GetIntField(env, lpObject, SAFEARRAYFc.cLocks);
- lpStruct->pvData = (PVOID)(*env)->GetIntLongField(env, lpObject, SAFEARRAYFc.pvData);
+ lpStruct->pvData = (PVOID)(*env)->GetLongField(env, lpObject, SAFEARRAYFc.pvData);
{
jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SAFEARRAYFc.rgsabound);
if (lpObject1 != NULL) getSAFEARRAYBOUNDFields(env, lpObject1, &lpStruct->rgsabound[0]);
@@ -5623,7 +4899,7 @@ void setSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct)
(*env)->SetShortField(env, lpObject, SAFEARRAYFc.fFeatures, (jshort)lpStruct->fFeatures);
(*env)->SetIntField(env, lpObject, SAFEARRAYFc.cbElements, (jint)lpStruct->cbElements);
(*env)->SetIntField(env, lpObject, SAFEARRAYFc.cLocks, (jint)lpStruct->cLocks);
- (*env)->SetIntLongField(env, lpObject, SAFEARRAYFc.pvData, (jintLong)lpStruct->pvData);
+ (*env)->SetLongField(env, lpObject, SAFEARRAYFc.pvData, (jlong)lpStruct->pvData);
{
jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SAFEARRAYFc.rgsabound);
if (lpObject1 != NULL) setSAFEARRAYBOUNDFields(env, lpObject1, &lpStruct->rgsabound[0]);
@@ -5727,7 +5003,7 @@ void setSCRIPT_ANALYSISFields(JNIEnv *env, jobject lpObject, SCRIPT_ANALYSIS *lp
typedef struct SCRIPT_CONTROL_FID_CACHE {
int cached;
jclass clazz;
- jfieldID uDefaultLanguage, fContextDigits, fInvertPreBoundDir, fInvertPostBoundDir, fLinkStringBefore, fLinkStringAfter, fNeutralOverride, fNumericOverride, fLegacyBidiClass, fReserved;
+ jfieldID uDefaultLanguage, fContextDigits, fInvertPreBoundDir, fInvertPostBoundDir, fLinkStringBefore, fLinkStringAfter, fNeutralOverride, fNumericOverride, fLegacyBidiClass, fMergeNeutralItems, fUseStandardBidi, fReserved;
} SCRIPT_CONTROL_FID_CACHE;
SCRIPT_CONTROL_FID_CACHE SCRIPT_CONTROLFc;
@@ -5745,6 +5021,8 @@ void cacheSCRIPT_CONTROLFields(JNIEnv *env, jobject lpObject)
SCRIPT_CONTROLFc.fNeutralOverride = (*env)->GetFieldID(env, SCRIPT_CONTROLFc.clazz, "fNeutralOverride", "Z");
SCRIPT_CONTROLFc.fNumericOverride = (*env)->GetFieldID(env, SCRIPT_CONTROLFc.clazz, "fNumericOverride", "Z");
SCRIPT_CONTROLFc.fLegacyBidiClass = (*env)->GetFieldID(env, SCRIPT_CONTROLFc.clazz, "fLegacyBidiClass", "Z");
+ SCRIPT_CONTROLFc.fMergeNeutralItems = (*env)->GetFieldID(env, SCRIPT_CONTROLFc.clazz, "fMergeNeutralItems", "Z");
+ SCRIPT_CONTROLFc.fUseStandardBidi = (*env)->GetFieldID(env, SCRIPT_CONTROLFc.clazz, "fUseStandardBidi", "Z");
SCRIPT_CONTROLFc.fReserved = (*env)->GetFieldID(env, SCRIPT_CONTROLFc.clazz, "fReserved", "I");
SCRIPT_CONTROLFc.cached = 1;
}
@@ -5761,6 +5039,8 @@ SCRIPT_CONTROL *getSCRIPT_CONTROLFields(JNIEnv *env, jobject lpObject, SCRIPT_CO
lpStruct->fNeutralOverride = (*env)->GetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fNeutralOverride);
lpStruct->fNumericOverride = (*env)->GetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fNumericOverride);
lpStruct->fLegacyBidiClass = (*env)->GetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fLegacyBidiClass);
+ lpStruct->fMergeNeutralItems = (*env)->GetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fMergeNeutralItems);
+ lpStruct->fUseStandardBidi = (*env)->GetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fUseStandardBidi);
lpStruct->fReserved = (*env)->GetIntField(env, lpObject, SCRIPT_CONTROLFc.fReserved);
return lpStruct;
}
@@ -5777,50 +5057,12 @@ void setSCRIPT_CONTROLFields(JNIEnv *env, jobject lpObject, SCRIPT_CONTROL *lpSt
(*env)->SetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fNeutralOverride, (jboolean)lpStruct->fNeutralOverride);
(*env)->SetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fNumericOverride, (jboolean)lpStruct->fNumericOverride);
(*env)->SetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fLegacyBidiClass, (jboolean)lpStruct->fLegacyBidiClass);
+ (*env)->SetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fMergeNeutralItems, (jboolean)lpStruct->fMergeNeutralItems);
+ (*env)->SetBooleanField(env, lpObject, SCRIPT_CONTROLFc.fUseStandardBidi, (jboolean)lpStruct->fUseStandardBidi);
(*env)->SetIntField(env, lpObject, SCRIPT_CONTROLFc.fReserved, (jint)lpStruct->fReserved);
}
#endif
-#ifndef NO_SCRIPT_DIGITSUBSTITUTE
-typedef struct SCRIPT_DIGITSUBSTITUTE_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID NationalDigitLanguage, TraditionalDigitLanguage, DigitSubstitute, dwReserved;
-} SCRIPT_DIGITSUBSTITUTE_FID_CACHE;
-
-SCRIPT_DIGITSUBSTITUTE_FID_CACHE SCRIPT_DIGITSUBSTITUTEFc;
-
-void cacheSCRIPT_DIGITSUBSTITUTEFields(JNIEnv *env, jobject lpObject)
-{
- if (SCRIPT_DIGITSUBSTITUTEFc.cached) return;
- SCRIPT_DIGITSUBSTITUTEFc.clazz = (*env)->GetObjectClass(env, lpObject);
- SCRIPT_DIGITSUBSTITUTEFc.NationalDigitLanguage = (*env)->GetFieldID(env, SCRIPT_DIGITSUBSTITUTEFc.clazz, "NationalDigitLanguage", "S");
- SCRIPT_DIGITSUBSTITUTEFc.TraditionalDigitLanguage = (*env)->GetFieldID(env, SCRIPT_DIGITSUBSTITUTEFc.clazz, "TraditionalDigitLanguage", "S");
- SCRIPT_DIGITSUBSTITUTEFc.DigitSubstitute = (*env)->GetFieldID(env, SCRIPT_DIGITSUBSTITUTEFc.clazz, "DigitSubstitute", "B");
- SCRIPT_DIGITSUBSTITUTEFc.dwReserved = (*env)->GetFieldID(env, SCRIPT_DIGITSUBSTITUTEFc.clazz, "dwReserved", "I");
- SCRIPT_DIGITSUBSTITUTEFc.cached = 1;
-}
-
-SCRIPT_DIGITSUBSTITUTE *getSCRIPT_DIGITSUBSTITUTEFields(JNIEnv *env, jobject lpObject, SCRIPT_DIGITSUBSTITUTE *lpStruct)
-{
- if (!SCRIPT_DIGITSUBSTITUTEFc.cached) cacheSCRIPT_DIGITSUBSTITUTEFields(env, lpObject);
- lpStruct->NationalDigitLanguage = (*env)->GetShortField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.NationalDigitLanguage);
- lpStruct->TraditionalDigitLanguage = (*env)->GetShortField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.TraditionalDigitLanguage);
- lpStruct->DigitSubstitute = (*env)->GetByteField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.DigitSubstitute);
- lpStruct->dwReserved = (*env)->GetIntField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.dwReserved);
- return lpStruct;
-}
-
-void setSCRIPT_DIGITSUBSTITUTEFields(JNIEnv *env, jobject lpObject, SCRIPT_DIGITSUBSTITUTE *lpStruct)
-{
- if (!SCRIPT_DIGITSUBSTITUTEFc.cached) cacheSCRIPT_DIGITSUBSTITUTEFields(env, lpObject);
- (*env)->SetShortField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.NationalDigitLanguage, (jshort)lpStruct->NationalDigitLanguage);
- (*env)->SetShortField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.TraditionalDigitLanguage, (jshort)lpStruct->TraditionalDigitLanguage);
- (*env)->SetByteField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.DigitSubstitute, (jbyte)lpStruct->DigitSubstitute);
- (*env)->SetIntField(env, lpObject, SCRIPT_DIGITSUBSTITUTEFc.dwReserved, (jint)lpStruct->dwReserved);
-}
-#endif
-
#ifndef NO_SCRIPT_FONTPROPERTIES
typedef struct SCRIPT_FONTPROPERTIES_FID_CACHE {
int cached;
@@ -6212,7 +5454,7 @@ void cacheSHDRAGIMAGEFields(JNIEnv *env, jobject lpObject)
SHDRAGIMAGEFc.clazz = (*env)->GetObjectClass(env, lpObject);
SHDRAGIMAGEFc.sizeDragImage = (*env)->GetFieldID(env, SHDRAGIMAGEFc.clazz, "sizeDragImage", "Lorg/eclipse/swt/internal/win32/SIZE;");
SHDRAGIMAGEFc.ptOffset = (*env)->GetFieldID(env, SHDRAGIMAGEFc.clazz, "ptOffset", "Lorg/eclipse/swt/internal/win32/POINT;");
- SHDRAGIMAGEFc.hbmpDragImage = (*env)->GetFieldID(env, SHDRAGIMAGEFc.clazz, "hbmpDragImage", I_J);
+ SHDRAGIMAGEFc.hbmpDragImage = (*env)->GetFieldID(env, SHDRAGIMAGEFc.clazz, "hbmpDragImage", "J");
SHDRAGIMAGEFc.crColorKey = (*env)->GetFieldID(env, SHDRAGIMAGEFc.clazz, "crColorKey", "I");
SHDRAGIMAGEFc.cached = 1;
}
@@ -6228,7 +5470,7 @@ SHDRAGIMAGE *getSHDRAGIMAGEFields(JNIEnv *env, jobject lpObject, SHDRAGIMAGE *lp
jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SHDRAGIMAGEFc.ptOffset);
if (lpObject1 != NULL) getPOINTFields(env, lpObject1, &lpStruct->ptOffset);
}
- lpStruct->hbmpDragImage = (HBITMAP)(*env)->GetIntLongField(env, lpObject, SHDRAGIMAGEFc.hbmpDragImage);
+ lpStruct->hbmpDragImage = (HBITMAP)(*env)->GetLongField(env, lpObject, SHDRAGIMAGEFc.hbmpDragImage);
lpStruct->crColorKey = (*env)->GetIntField(env, lpObject, SHDRAGIMAGEFc.crColorKey);
return lpStruct;
}
@@ -6244,7 +5486,7 @@ void setSHDRAGIMAGEFields(JNIEnv *env, jobject lpObject, SHDRAGIMAGE *lpStruct)
jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SHDRAGIMAGEFc.ptOffset);
if (lpObject1 != NULL) setPOINTFields(env, lpObject1, &lpStruct->ptOffset);
}
- (*env)->SetIntLongField(env, lpObject, SHDRAGIMAGEFc.hbmpDragImage, (jintLong)lpStruct->hbmpDragImage);
+ (*env)->SetLongField(env, lpObject, SHDRAGIMAGEFc.hbmpDragImage, (jlong)lpStruct->hbmpDragImage);
(*env)->SetIntField(env, lpObject, SHDRAGIMAGEFc.crColorKey, (jint)lpStruct->crColorKey);
}
#endif
@@ -6264,19 +5506,19 @@ void cacheSHELLEXECUTEINFOFields(JNIEnv *env, jobject lpObject)
SHELLEXECUTEINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
SHELLEXECUTEINFOFc.cbSize = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "cbSize", "I");
SHELLEXECUTEINFOFc.fMask = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "fMask", "I");
- SHELLEXECUTEINFOFc.hwnd = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hwnd", I_J);
- SHELLEXECUTEINFOFc.lpVerb = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpVerb", I_J);
- SHELLEXECUTEINFOFc.lpFile = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpFile", I_J);
- SHELLEXECUTEINFOFc.lpParameters = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpParameters", I_J);
- SHELLEXECUTEINFOFc.lpDirectory = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpDirectory", I_J);
+ SHELLEXECUTEINFOFc.hwnd = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hwnd", "J");
+ SHELLEXECUTEINFOFc.lpVerb = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpVerb", "J");
+ SHELLEXECUTEINFOFc.lpFile = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpFile", "J");
+ SHELLEXECUTEINFOFc.lpParameters = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpParameters", "J");
+ SHELLEXECUTEINFOFc.lpDirectory = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpDirectory", "J");
SHELLEXECUTEINFOFc.nShow = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "nShow", "I");
- SHELLEXECUTEINFOFc.hInstApp = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hInstApp", I_J);
- SHELLEXECUTEINFOFc.lpIDList = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpIDList", I_J);
- SHELLEXECUTEINFOFc.lpClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpClass", I_J);
- SHELLEXECUTEINFOFc.hkeyClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hkeyClass", I_J);
+ SHELLEXECUTEINFOFc.hInstApp = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hInstApp", "J");
+ SHELLEXECUTEINFOFc.lpIDList = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpIDList", "J");
+ SHELLEXECUTEINFOFc.lpClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpClass", "J");
+ SHELLEXECUTEINFOFc.hkeyClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hkeyClass", "J");
SHELLEXECUTEINFOFc.dwHotKey = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "dwHotKey", "I");
- SHELLEXECUTEINFOFc.hIcon = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hIcon", I_J);
- SHELLEXECUTEINFOFc.hProcess = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hProcess", I_J);
+ SHELLEXECUTEINFOFc.hIcon = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hIcon", "J");
+ SHELLEXECUTEINFOFc.hProcess = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hProcess", "J");
SHELLEXECUTEINFOFc.cached = 1;
}
@@ -6285,19 +5527,19 @@ SHELLEXECUTEINFO *getSHELLEXECUTEINFOFields(JNIEnv *env, jobject lpObject, SHELL
if (!SHELLEXECUTEINFOFc.cached) cacheSHELLEXECUTEINFOFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOFc.cbSize);
lpStruct->fMask = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOFc.fMask);
- lpStruct->hwnd = (HWND)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hwnd);
- lpStruct->lpVerb = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpVerb);
- lpStruct->lpFile = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpFile);
- lpStruct->lpParameters = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpParameters);
- lpStruct->lpDirectory = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpDirectory);
+ lpStruct->hwnd = (HWND)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.hwnd);
+ lpStruct->lpVerb = (LPCTSTR)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpVerb);
+ lpStruct->lpFile = (LPCTSTR)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpFile);
+ lpStruct->lpParameters = (LPCTSTR)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpParameters);
+ lpStruct->lpDirectory = (LPCTSTR)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpDirectory);
lpStruct->nShow = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOFc.nShow);
- lpStruct->hInstApp = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hInstApp);
- lpStruct->lpIDList = (LPVOID)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpIDList);
- lpStruct->lpClass = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpClass);
- lpStruct->hkeyClass = (HKEY)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hkeyClass);
+ lpStruct->hInstApp = (HINSTANCE)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.hInstApp);
+ lpStruct->lpIDList = (LPVOID)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpIDList);
+ lpStruct->lpClass = (LPCTSTR)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpClass);
+ lpStruct->hkeyClass = (HKEY)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.hkeyClass);
lpStruct->dwHotKey = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOFc.dwHotKey);
- lpStruct->hIcon = (HANDLE)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hIcon);
- lpStruct->hProcess = (HANDLE)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hProcess);
+ lpStruct->hIcon = (HANDLE)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.hIcon);
+ lpStruct->hProcess = (HANDLE)(*env)->GetLongField(env, lpObject, SHELLEXECUTEINFOFc.hProcess);
return lpStruct;
}
@@ -6306,19 +5548,19 @@ void setSHELLEXECUTEINFOFields(JNIEnv *env, jobject lpObject, SHELLEXECUTEINFO *
if (!SHELLEXECUTEINFOFc.cached) cacheSHELLEXECUTEINFOFields(env, lpObject);
(*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOFc.fMask, (jint)lpStruct->fMask);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hwnd, (jintLong)lpStruct->hwnd);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpVerb, (jintLong)lpStruct->lpVerb);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpFile, (jintLong)lpStruct->lpFile);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpParameters, (jintLong)lpStruct->lpParameters);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpDirectory, (jintLong)lpStruct->lpDirectory);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.hwnd, (jlong)lpStruct->hwnd);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpVerb, (jlong)lpStruct->lpVerb);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpFile, (jlong)lpStruct->lpFile);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpParameters, (jlong)lpStruct->lpParameters);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpDirectory, (jlong)lpStruct->lpDirectory);
(*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOFc.nShow, (jint)lpStruct->nShow);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hInstApp, (jintLong)lpStruct->hInstApp);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpIDList, (jintLong)lpStruct->lpIDList);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.lpClass, (jintLong)lpStruct->lpClass);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hkeyClass, (jintLong)lpStruct->hkeyClass);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.hInstApp, (jlong)lpStruct->hInstApp);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpIDList, (jlong)lpStruct->lpIDList);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.lpClass, (jlong)lpStruct->lpClass);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.hkeyClass, (jlong)lpStruct->hkeyClass);
(*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOFc.dwHotKey, (jint)lpStruct->dwHotKey);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hIcon, (jintLong)lpStruct->hIcon);
- (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOFc.hProcess, (jintLong)lpStruct->hProcess);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.hIcon, (jlong)lpStruct->hIcon);
+ (*env)->SetLongField(env, lpObject, SHELLEXECUTEINFOFc.hProcess, (jlong)lpStruct->hProcess);
}
#endif
@@ -6335,7 +5577,7 @@ void cacheSHFILEINFOFields(JNIEnv *env, jobject lpObject)
{
if (SHFILEINFOFc.cached) return;
SHFILEINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
- SHFILEINFOFc.hIcon = (*env)->GetFieldID(env, SHFILEINFOFc.clazz, "hIcon", I_J);
+ SHFILEINFOFc.hIcon = (*env)->GetFieldID(env, SHFILEINFOFc.clazz, "hIcon", "J");
SHFILEINFOFc.iIcon = (*env)->GetFieldID(env, SHFILEINFOFc.clazz, "iIcon", "I");
SHFILEINFOFc.dwAttributes = (*env)->GetFieldID(env, SHFILEINFOFc.clazz, "dwAttributes", "I");
SHFILEINFOFc.szDisplayName = (*env)->GetFieldID(env, SHFILEINFOFc.clazz, "szDisplayName", "[C");
@@ -6346,7 +5588,7 @@ void cacheSHFILEINFOFields(JNIEnv *env, jobject lpObject)
SHFILEINFO *getSHFILEINFOFields(JNIEnv *env, jobject lpObject, SHFILEINFO *lpStruct)
{
if (!SHFILEINFOFc.cached) cacheSHFILEINFOFields(env, lpObject);
- lpStruct->hIcon = (HICON)(*env)->GetIntLongField(env, lpObject, SHFILEINFOFc.hIcon);
+ lpStruct->hIcon = (HICON)(*env)->GetLongField(env, lpObject, SHFILEINFOFc.hIcon);
lpStruct->iIcon = (*env)->GetIntField(env, lpObject, SHFILEINFOFc.iIcon);
lpStruct->dwAttributes = (*env)->GetIntField(env, lpObject, SHFILEINFOFc.dwAttributes);
{
@@ -6363,7 +5605,7 @@ SHFILEINFO *getSHFILEINFOFields(JNIEnv *env, jobject lpObject, SHFILEINFO *lpStr
void setSHFILEINFOFields(JNIEnv *env, jobject lpObject, SHFILEINFO *lpStruct)
{
if (!SHFILEINFOFc.cached) cacheSHFILEINFOFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, SHFILEINFOFc.hIcon, (jintLong)lpStruct->hIcon);
+ (*env)->SetLongField(env, lpObject, SHFILEINFOFc.hIcon, (jlong)lpStruct->hIcon);
(*env)->SetIntField(env, lpObject, SHFILEINFOFc.iIcon, (jint)lpStruct->iIcon);
(*env)->SetIntField(env, lpObject, SHFILEINFOFc.dwAttributes, (jint)lpStruct->dwAttributes);
{
@@ -6425,9 +5667,9 @@ void cacheSTARTUPINFOFields(JNIEnv *env, jobject lpObject)
if (STARTUPINFOFc.cached) return;
STARTUPINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
STARTUPINFOFc.cb = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "cb", "I");
- STARTUPINFOFc.lpReserved = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpReserved", I_J);
- STARTUPINFOFc.lpDesktop = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpDesktop", I_J);
- STARTUPINFOFc.lpTitle = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpTitle", I_J);
+ STARTUPINFOFc.lpReserved = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpReserved", "J");
+ STARTUPINFOFc.lpDesktop = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpDesktop", "J");
+ STARTUPINFOFc.lpTitle = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpTitle", "J");
STARTUPINFOFc.dwX = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "dwX", "I");
STARTUPINFOFc.dwY = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "dwY", "I");
STARTUPINFOFc.dwXSize = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "dwXSize", "I");
@@ -6438,10 +5680,10 @@ void cacheSTARTUPINFOFields(JNIEnv *env, jobject lpObject)
STARTUPINFOFc.dwFlags = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "dwFlags", "I");
STARTUPINFOFc.wShowWindow = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "wShowWindow", "S");
STARTUPINFOFc.cbReserved2 = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "cbReserved2", "S");
- STARTUPINFOFc.lpReserved2 = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpReserved2", I_J);
- STARTUPINFOFc.hStdInput = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "hStdInput", I_J);
- STARTUPINFOFc.hStdOutput = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "hStdOutput", I_J);
- STARTUPINFOFc.hStdError = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "hStdError", I_J);
+ STARTUPINFOFc.lpReserved2 = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "lpReserved2", "J");
+ STARTUPINFOFc.hStdInput = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "hStdInput", "J");
+ STARTUPINFOFc.hStdOutput = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "hStdOutput", "J");
+ STARTUPINFOFc.hStdError = (*env)->GetFieldID(env, STARTUPINFOFc.clazz, "hStdError", "J");
STARTUPINFOFc.cached = 1;
}
@@ -6449,9 +5691,9 @@ STARTUPINFO *getSTARTUPINFOFields(JNIEnv *env, jobject lpObject, STARTUPINFO *lp
{
if (!STARTUPINFOFc.cached) cacheSTARTUPINFOFields(env, lpObject);
lpStruct->cb = (*env)->GetIntField(env, lpObject, STARTUPINFOFc.cb);
- lpStruct->lpReserved = (LPTSTR)(*env)->GetIntLongField(env, lpObject, STARTUPINFOFc.lpReserved);
- lpStruct->lpDesktop = (LPTSTR)(*env)->GetIntLongField(env, lpObject, STARTUPINFOFc.lpDesktop);
- lpStruct->lpTitle = (LPTSTR)(*env)->GetIntLongField(env, lpObject, STARTUPINFOFc.lpTitle);
+ lpStruct->lpReserved = (LPTSTR)(*env)->GetLongField(env, lpObject, STARTUPINFOFc.lpReserved);
+ lpStruct->lpDesktop = (LPTSTR)(*env)->GetLongField(env, lpObject, STARTUPINFOFc.lpDesktop);
+ lpStruct->lpTitle = (LPTSTR)(*env)->GetLongField(env, lpObject, STARTUPINFOFc.lpTitle);
lpStruct->dwX = (*env)->GetIntField(env, lpObject, STARTUPINFOFc.dwX);
lpStruct->dwY = (*env)->GetIntField(env, lpObject, STARTUPINFOFc.dwY);
lpStruct->dwXSize = (*env)->GetIntField(env, lpObject, STARTUPINFOFc.dwXSize);
@@ -6462,10 +5704,10 @@ STARTUPINFO *getSTARTUPINFOFields(JNIEnv *env, jobject lpObject, STARTUPINFO *lp
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, STARTUPINFOFc.dwFlags);
lpStruct->wShowWindow = (*env)->GetShortField(env, lpObject, STARTUPINFOFc.wShowWindow);
lpStruct->cbReserved2 = (*env)->GetShortField(env, lpObject, STARTUPINFOFc.cbReserved2);
- lpStruct->lpReserved2 = (LPBYTE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOFc.lpReserved2);
- lpStruct->hStdInput = (HANDLE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOFc.hStdInput);
- lpStruct->hStdOutput = (HANDLE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOFc.hStdOutput);
- lpStruct->hStdError = (HANDLE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOFc.hStdError);
+ lpStruct->lpReserved2 = (LPBYTE)(*env)->GetLongField(env, lpObject, STARTUPINFOFc.lpReserved2);
+ lpStruct->hStdInput = (HANDLE)(*env)->GetLongField(env, lpObject, STARTUPINFOFc.hStdInput);
+ lpStruct->hStdOutput = (HANDLE)(*env)->GetLongField(env, lpObject, STARTUPINFOFc.hStdOutput);
+ lpStruct->hStdError = (HANDLE)(*env)->GetLongField(env, lpObject, STARTUPINFOFc.hStdError);
return lpStruct;
}
@@ -6473,9 +5715,9 @@ void setSTARTUPINFOFields(JNIEnv *env, jobject lpObject, STARTUPINFO *lpStruct)
{
if (!STARTUPINFOFc.cached) cacheSTARTUPINFOFields(env, lpObject);
(*env)->SetIntField(env, lpObject, STARTUPINFOFc.cb, (jint)lpStruct->cb);
- (*env)->SetIntLongField(env, lpObject, STARTUPINFOFc.lpReserved, (jintLong)lpStruct->lpReserved);
- (*env)->SetIntLongField(env, lpObject, STARTUPINFOFc.lpDesktop, (jintLong)lpStruct->lpDesktop);
- (*env)->SetIntLongField(env, lpObject, STARTUPINFOFc.lpTitle, (jintLong)lpStruct->lpTitle);
+ (*env)->SetLongField(env, lpObject, STARTUPINFOFc.lpReserved, (jlong)lpStruct->lpReserved);
+ (*env)->SetLongField(env, lpObject, STARTUPINFOFc.lpDesktop, (jlong)lpStruct->lpDesktop);
+ (*env)->SetLongField(env, lpObject, STARTUPINFOFc.lpTitle, (jlong)lpStruct->lpTitle);
(*env)->SetIntField(env, lpObject, STARTUPINFOFc.dwX, (jint)lpStruct->dwX);
(*env)->SetIntField(env, lpObject, STARTUPINFOFc.dwY, (jint)lpStruct->dwY);
(*env)->SetIntField(env, lpObject, STARTUPINFOFc.dwXSize, (jint)lpStruct->dwXSize);
@@ -6486,10 +5728,10 @@ void setSTARTUPINFOFields(JNIEnv *env, jobject lpObject, STARTUPINFO *lpStruct)
(*env)->SetIntField(env, lpObject, STARTUPINFOFc.dwFlags, (jint)lpStruct->dwFlags);
(*env)->SetShortField(env, lpObject, STARTUPINFOFc.wShowWindow, (jshort)lpStruct->wShowWindow);
(*env)->SetShortField(env, lpObject, STARTUPINFOFc.cbReserved2, (jshort)lpStruct->cbReserved2);
- (*env)->SetIntLongField(env, lpObject, STARTUPINFOFc.lpReserved2, (jintLong)lpStruct->lpReserved2);
- (*env)->SetIntLongField(env, lpObject, STARTUPINFOFc.hStdInput, (jintLong)lpStruct->hStdInput);
- (*env)->SetIntLongField(env, lpObject, STARTUPINFOFc.hStdOutput, (jintLong)lpStruct->hStdOutput);
- (*env)->SetIntLongField(env, lpObject, STARTUPINFOFc.hStdError, (jintLong)lpStruct->hStdError);
+ (*env)->SetLongField(env, lpObject, STARTUPINFOFc.lpReserved2, (jlong)lpStruct->lpReserved2);
+ (*env)->SetLongField(env, lpObject, STARTUPINFOFc.hStdInput, (jlong)lpStruct->hStdInput);
+ (*env)->SetLongField(env, lpObject, STARTUPINFOFc.hStdOutput, (jlong)lpStruct->hStdOutput);
+ (*env)->SetLongField(env, lpObject, STARTUPINFOFc.hStdError, (jlong)lpStruct->hStdError);
}
#endif
@@ -6562,8 +5804,8 @@ void cacheTBBUTTONFields(JNIEnv *env, jobject lpObject)
TBBUTTONFc.idCommand = (*env)->GetFieldID(env, TBBUTTONFc.clazz, "idCommand", "I");
TBBUTTONFc.fsState = (*env)->GetFieldID(env, TBBUTTONFc.clazz, "fsState", "B");
TBBUTTONFc.fsStyle = (*env)->GetFieldID(env, TBBUTTONFc.clazz, "fsStyle", "B");
- TBBUTTONFc.dwData = (*env)->GetFieldID(env, TBBUTTONFc.clazz, "dwData", I_J);
- TBBUTTONFc.iString = (*env)->GetFieldID(env, TBBUTTONFc.clazz, "iString", I_J);
+ TBBUTTONFc.dwData = (*env)->GetFieldID(env, TBBUTTONFc.clazz, "dwData", "J");
+ TBBUTTONFc.iString = (*env)->GetFieldID(env, TBBUTTONFc.clazz, "iString", "J");
TBBUTTONFc.cached = 1;
}
@@ -6574,8 +5816,8 @@ TBBUTTON *getTBBUTTONFields(JNIEnv *env, jobject lpObject, TBBUTTON *lpStruct)
lpStruct->idCommand = (*env)->GetIntField(env, lpObject, TBBUTTONFc.idCommand);
lpStruct->fsState = (*env)->GetByteField(env, lpObject, TBBUTTONFc.fsState);
lpStruct->fsStyle = (*env)->GetByteField(env, lpObject, TBBUTTONFc.fsStyle);
- lpStruct->dwData = (*env)->GetIntLongField(env, lpObject, TBBUTTONFc.dwData);
- lpStruct->iString = (*env)->GetIntLongField(env, lpObject, TBBUTTONFc.iString);
+ lpStruct->dwData = (*env)->GetLongField(env, lpObject, TBBUTTONFc.dwData);
+ lpStruct->iString = (*env)->GetLongField(env, lpObject, TBBUTTONFc.iString);
return lpStruct;
}
@@ -6586,8 +5828,8 @@ void setTBBUTTONFields(JNIEnv *env, jobject lpObject, TBBUTTON *lpStruct)
(*env)->SetIntField(env, lpObject, TBBUTTONFc.idCommand, (jint)lpStruct->idCommand);
(*env)->SetByteField(env, lpObject, TBBUTTONFc.fsState, (jbyte)lpStruct->fsState);
(*env)->SetByteField(env, lpObject, TBBUTTONFc.fsStyle, (jbyte)lpStruct->fsStyle);
- (*env)->SetIntLongField(env, lpObject, TBBUTTONFc.dwData, (jintLong)lpStruct->dwData);
- (*env)->SetIntLongField(env, lpObject, TBBUTTONFc.iString, (jintLong)lpStruct->iString);
+ (*env)->SetLongField(env, lpObject, TBBUTTONFc.dwData, (jlong)lpStruct->dwData);
+ (*env)->SetLongField(env, lpObject, TBBUTTONFc.iString, (jlong)lpStruct->iString);
}
#endif
@@ -6611,8 +5853,8 @@ void cacheTBBUTTONINFOFields(JNIEnv *env, jobject lpObject)
TBBUTTONINFOFc.fsState = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "fsState", "B");
TBBUTTONINFOFc.fsStyle = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "fsStyle", "B");
TBBUTTONINFOFc.cx = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "cx", "S");
- TBBUTTONINFOFc.lParam = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "lParam", I_J);
- TBBUTTONINFOFc.pszText = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "pszText", I_J);
+ TBBUTTONINFOFc.lParam = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "lParam", "J");
+ TBBUTTONINFOFc.pszText = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "pszText", "J");
TBBUTTONINFOFc.cchText = (*env)->GetFieldID(env, TBBUTTONINFOFc.clazz, "cchText", "I");
TBBUTTONINFOFc.cached = 1;
}
@@ -6627,8 +5869,8 @@ TBBUTTONINFO *getTBBUTTONINFOFields(JNIEnv *env, jobject lpObject, TBBUTTONINFO
lpStruct->fsState = (*env)->GetByteField(env, lpObject, TBBUTTONINFOFc.fsState);
lpStruct->fsStyle = (*env)->GetByteField(env, lpObject, TBBUTTONINFOFc.fsStyle);
lpStruct->cx = (*env)->GetShortField(env, lpObject, TBBUTTONINFOFc.cx);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, TBBUTTONINFOFc.lParam);
- lpStruct->pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, TBBUTTONINFOFc.pszText);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, TBBUTTONINFOFc.lParam);
+ lpStruct->pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, TBBUTTONINFOFc.pszText);
lpStruct->cchText = (*env)->GetIntField(env, lpObject, TBBUTTONINFOFc.cchText);
return lpStruct;
}
@@ -6643,8 +5885,8 @@ void setTBBUTTONINFOFields(JNIEnv *env, jobject lpObject, TBBUTTONINFO *lpStruct
(*env)->SetByteField(env, lpObject, TBBUTTONINFOFc.fsState, (jbyte)lpStruct->fsState);
(*env)->SetByteField(env, lpObject, TBBUTTONINFOFc.fsStyle, (jbyte)lpStruct->fsStyle);
(*env)->SetShortField(env, lpObject, TBBUTTONINFOFc.cx, (jshort)lpStruct->cx);
- (*env)->SetIntLongField(env, lpObject, TBBUTTONINFOFc.lParam, (jintLong)lpStruct->lParam);
- (*env)->SetIntLongField(env, lpObject, TBBUTTONINFOFc.pszText, (jintLong)lpStruct->pszText);
+ (*env)->SetLongField(env, lpObject, TBBUTTONINFOFc.lParam, (jlong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, TBBUTTONINFOFc.pszText, (jlong)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, TBBUTTONINFOFc.cchText, (jint)lpStruct->cchText);
}
#endif
@@ -6702,10 +5944,10 @@ void cacheTCITEMFields(JNIEnv *env, jobject lpObject)
TCITEMFc.mask = (*env)->GetFieldID(env, TCITEMFc.clazz, "mask", "I");
TCITEMFc.dwState = (*env)->GetFieldID(env, TCITEMFc.clazz, "dwState", "I");
TCITEMFc.dwStateMask = (*env)->GetFieldID(env, TCITEMFc.clazz, "dwStateMask", "I");
- TCITEMFc.pszText = (*env)->GetFieldID(env, TCITEMFc.clazz, "pszText", I_J);
+ TCITEMFc.pszText = (*env)->GetFieldID(env, TCITEMFc.clazz, "pszText", "J");
TCITEMFc.cchTextMax = (*env)->GetFieldID(env, TCITEMFc.clazz, "cchTextMax", "I");
TCITEMFc.iImage = (*env)->GetFieldID(env, TCITEMFc.clazz, "iImage", "I");
- TCITEMFc.lParam = (*env)->GetFieldID(env, TCITEMFc.clazz, "lParam", I_J);
+ TCITEMFc.lParam = (*env)->GetFieldID(env, TCITEMFc.clazz, "lParam", "J");
TCITEMFc.cached = 1;
}
@@ -6715,10 +5957,10 @@ TCITEM *getTCITEMFields(JNIEnv *env, jobject lpObject, TCITEM *lpStruct)
lpStruct->mask = (*env)->GetIntField(env, lpObject, TCITEMFc.mask);
lpStruct->dwState = (*env)->GetIntField(env, lpObject, TCITEMFc.dwState);
lpStruct->dwStateMask = (*env)->GetIntField(env, lpObject, TCITEMFc.dwStateMask);
- lpStruct->pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, TCITEMFc.pszText);
+ lpStruct->pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, TCITEMFc.pszText);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, TCITEMFc.cchTextMax);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, TCITEMFc.iImage);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, TCITEMFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, TCITEMFc.lParam);
return lpStruct;
}
@@ -6728,10 +5970,10 @@ void setTCITEMFields(JNIEnv *env, jobject lpObject, TCITEM *lpStruct)
(*env)->SetIntField(env, lpObject, TCITEMFc.mask, (jint)lpStruct->mask);
(*env)->SetIntField(env, lpObject, TCITEMFc.dwState, (jint)lpStruct->dwState);
(*env)->SetIntField(env, lpObject, TCITEMFc.dwStateMask, (jint)lpStruct->dwStateMask);
- (*env)->SetIntLongField(env, lpObject, TCITEMFc.pszText, (jintLong)lpStruct->pszText);
+ (*env)->SetLongField(env, lpObject, TCITEMFc.pszText, (jlong)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, TCITEMFc.cchTextMax, (jint)lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, TCITEMFc.iImage, (jint)lpStruct->iImage);
- (*env)->SetIntLongField(env, lpObject, TCITEMFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, TCITEMFc.lParam, (jlong)lpStruct->lParam);
}
#endif
@@ -6936,16 +6178,16 @@ void cacheTOOLINFOFields(JNIEnv *env, jobject lpObject)
TOOLINFOFc.clazz = (*env)->GetObjectClass(env, lpObject);
TOOLINFOFc.cbSize = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "cbSize", "I");
TOOLINFOFc.uFlags = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "uFlags", "I");
- TOOLINFOFc.hwnd = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "hwnd", I_J);
- TOOLINFOFc.uId = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "uId", I_J);
+ TOOLINFOFc.hwnd = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "hwnd", "J");
+ TOOLINFOFc.uId = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "uId", "J");
TOOLINFOFc.left = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "left", "I");
TOOLINFOFc.top = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "top", "I");
TOOLINFOFc.right = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "right", "I");
TOOLINFOFc.bottom = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "bottom", "I");
- TOOLINFOFc.hinst = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "hinst", I_J);
- TOOLINFOFc.lpszText = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "lpszText", I_J);
- TOOLINFOFc.lParam = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "lParam", I_J);
- TOOLINFOFc.lpReserved = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "lpReserved", I_J);
+ TOOLINFOFc.hinst = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "hinst", "J");
+ TOOLINFOFc.lpszText = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "lpszText", "J");
+ TOOLINFOFc.lParam = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "lParam", "J");
+ TOOLINFOFc.lpReserved = (*env)->GetFieldID(env, TOOLINFOFc.clazz, "lpReserved", "J");
TOOLINFOFc.cached = 1;
}
@@ -6954,16 +6196,16 @@ TOOLINFO *getTOOLINFOFields(JNIEnv *env, jobject lpObject, TOOLINFO *lpStruct)
if (!TOOLINFOFc.cached) cacheTOOLINFOFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, TOOLINFOFc.cbSize);
lpStruct->uFlags = (*env)->GetIntField(env, lpObject, TOOLINFOFc.uFlags);
- lpStruct->hwnd = (HWND)(*env)->GetIntLongField(env, lpObject, TOOLINFOFc.hwnd);
- lpStruct->uId = (*env)->GetIntLongField(env, lpObject, TOOLINFOFc.uId);
+ lpStruct->hwnd = (HWND)(*env)->GetLongField(env, lpObject, TOOLINFOFc.hwnd);
+ lpStruct->uId = (*env)->GetLongField(env, lpObject, TOOLINFOFc.uId);
lpStruct->rect.left = (*env)->GetIntField(env, lpObject, TOOLINFOFc.left);
lpStruct->rect.top = (*env)->GetIntField(env, lpObject, TOOLINFOFc.top);
lpStruct->rect.right = (*env)->GetIntField(env, lpObject, TOOLINFOFc.right);
lpStruct->rect.bottom = (*env)->GetIntField(env, lpObject, TOOLINFOFc.bottom);
- lpStruct->hinst = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, TOOLINFOFc.hinst);
- lpStruct->lpszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, TOOLINFOFc.lpszText);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, TOOLINFOFc.lParam);
- lpStruct->lpReserved = (void *)(*env)->GetIntLongField(env, lpObject, TOOLINFOFc.lpReserved);
+ lpStruct->hinst = (HINSTANCE)(*env)->GetLongField(env, lpObject, TOOLINFOFc.hinst);
+ lpStruct->lpszText = (LPTSTR)(*env)->GetLongField(env, lpObject, TOOLINFOFc.lpszText);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, TOOLINFOFc.lParam);
+ lpStruct->lpReserved = (void *)(*env)->GetLongField(env, lpObject, TOOLINFOFc.lpReserved);
return lpStruct;
}
@@ -6972,16 +6214,16 @@ void setTOOLINFOFields(JNIEnv *env, jobject lpObject, TOOLINFO *lpStruct)
if (!TOOLINFOFc.cached) cacheTOOLINFOFields(env, lpObject);
(*env)->SetIntField(env, lpObject, TOOLINFOFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, TOOLINFOFc.uFlags, (jint)lpStruct->uFlags);
- (*env)->SetIntLongField(env, lpObject, TOOLINFOFc.hwnd, (jintLong)lpStruct->hwnd);
- (*env)->SetIntLongField(env, lpObject, TOOLINFOFc.uId, (jintLong)lpStruct->uId);
+ (*env)->SetLongField(env, lpObject, TOOLINFOFc.hwnd, (jlong)lpStruct->hwnd);
+ (*env)->SetLongField(env, lpObject, TOOLINFOFc.uId, (jlong)lpStruct->uId);
(*env)->SetIntField(env, lpObject, TOOLINFOFc.left, (jint)lpStruct->rect.left);
(*env)->SetIntField(env, lpObject, TOOLINFOFc.top, (jint)lpStruct->rect.top);
(*env)->SetIntField(env, lpObject, TOOLINFOFc.right, (jint)lpStruct->rect.right);
(*env)->SetIntField(env, lpObject, TOOLINFOFc.bottom, (jint)lpStruct->rect.bottom);
- (*env)->SetIntLongField(env, lpObject, TOOLINFOFc.hinst, (jintLong)lpStruct->hinst);
- (*env)->SetIntLongField(env, lpObject, TOOLINFOFc.lpszText, (jintLong)lpStruct->lpszText);
- (*env)->SetIntLongField(env, lpObject, TOOLINFOFc.lParam, (jintLong)lpStruct->lParam);
- (*env)->SetIntLongField(env, lpObject, TOOLINFOFc.lpReserved, (jintLong)lpStruct->lpReserved);
+ (*env)->SetLongField(env, lpObject, TOOLINFOFc.hinst, (jlong)lpStruct->hinst);
+ (*env)->SetLongField(env, lpObject, TOOLINFOFc.lpszText, (jlong)lpStruct->lpszText);
+ (*env)->SetLongField(env, lpObject, TOOLINFOFc.lParam, (jlong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, TOOLINFOFc.lpReserved, (jlong)lpStruct->lpReserved);
}
#endif
@@ -7000,12 +6242,12 @@ void cacheTOUCHINPUTFields(JNIEnv *env, jobject lpObject)
TOUCHINPUTFc.clazz = (*env)->GetObjectClass(env, lpObject);
TOUCHINPUTFc.x = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "x", "I");
TOUCHINPUTFc.y = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "y", "I");
- TOUCHINPUTFc.hSource = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "hSource", I_J);
+ TOUCHINPUTFc.hSource = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "hSource", "J");
TOUCHINPUTFc.dwID = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "dwID", "I");
TOUCHINPUTFc.dwFlags = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "dwFlags", "I");
TOUCHINPUTFc.dwMask = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "dwMask", "I");
TOUCHINPUTFc.dwTime = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "dwTime", "I");
- TOUCHINPUTFc.dwExtraInfo = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "dwExtraInfo", I_J);
+ TOUCHINPUTFc.dwExtraInfo = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "dwExtraInfo", "J");
TOUCHINPUTFc.cxContact = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "cxContact", "I");
TOUCHINPUTFc.cyContact = (*env)->GetFieldID(env, TOUCHINPUTFc.clazz, "cyContact", "I");
TOUCHINPUTFc.cached = 1;
@@ -7016,12 +6258,12 @@ TOUCHINPUT *getTOUCHINPUTFields(JNIEnv *env, jobject lpObject, TOUCHINPUT *lpStr
if (!TOUCHINPUTFc.cached) cacheTOUCHINPUTFields(env, lpObject);
lpStruct->x = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.x);
lpStruct->y = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.y);
- lpStruct->hSource = (HWND)(*env)->GetIntLongField(env, lpObject, TOUCHINPUTFc.hSource);
+ lpStruct->hSource = (HWND)(*env)->GetLongField(env, lpObject, TOUCHINPUTFc.hSource);
lpStruct->dwID = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.dwID);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.dwFlags);
lpStruct->dwMask = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.dwMask);
lpStruct->dwTime = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.dwTime);
- lpStruct->dwExtraInfo = (*env)->GetIntLongField(env, lpObject, TOUCHINPUTFc.dwExtraInfo);
+ lpStruct->dwExtraInfo = (*env)->GetLongField(env, lpObject, TOUCHINPUTFc.dwExtraInfo);
lpStruct->cxContact = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.cxContact);
lpStruct->cyContact = (*env)->GetIntField(env, lpObject, TOUCHINPUTFc.cyContact);
return lpStruct;
@@ -7032,12 +6274,12 @@ void setTOUCHINPUTFields(JNIEnv *env, jobject lpObject, TOUCHINPUT *lpStruct)
if (!TOUCHINPUTFc.cached) cacheTOUCHINPUTFields(env, lpObject);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.x, (jint)lpStruct->x);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.y, (jint)lpStruct->y);
- (*env)->SetIntLongField(env, lpObject, TOUCHINPUTFc.hSource, (jintLong)lpStruct->hSource);
+ (*env)->SetLongField(env, lpObject, TOUCHINPUTFc.hSource, (jlong)lpStruct->hSource);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.dwID, (jint)lpStruct->dwID);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.dwFlags, (jint)lpStruct->dwFlags);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.dwMask, (jint)lpStruct->dwMask);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.dwTime, (jint)lpStruct->dwTime);
- (*env)->SetIntLongField(env, lpObject, TOUCHINPUTFc.dwExtraInfo, (jintLong)lpStruct->dwExtraInfo);
+ (*env)->SetLongField(env, lpObject, TOUCHINPUTFc.dwExtraInfo, (jlong)lpStruct->dwExtraInfo);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.cxContact, (jint)lpStruct->cxContact);
(*env)->SetIntField(env, lpObject, TOUCHINPUTFc.cyContact, (jint)lpStruct->cyContact);
}
@@ -7058,7 +6300,7 @@ void cacheTRACKMOUSEEVENTFields(JNIEnv *env, jobject lpObject)
TRACKMOUSEEVENTFc.clazz = (*env)->GetObjectClass(env, lpObject);
TRACKMOUSEEVENTFc.cbSize = (*env)->GetFieldID(env, TRACKMOUSEEVENTFc.clazz, "cbSize", "I");
TRACKMOUSEEVENTFc.dwFlags = (*env)->GetFieldID(env, TRACKMOUSEEVENTFc.clazz, "dwFlags", "I");
- TRACKMOUSEEVENTFc.hwndTrack = (*env)->GetFieldID(env, TRACKMOUSEEVENTFc.clazz, "hwndTrack", I_J);
+ TRACKMOUSEEVENTFc.hwndTrack = (*env)->GetFieldID(env, TRACKMOUSEEVENTFc.clazz, "hwndTrack", "J");
TRACKMOUSEEVENTFc.dwHoverTime = (*env)->GetFieldID(env, TRACKMOUSEEVENTFc.clazz, "dwHoverTime", "I");
TRACKMOUSEEVENTFc.cached = 1;
}
@@ -7068,7 +6310,7 @@ TRACKMOUSEEVENT *getTRACKMOUSEEVENTFields(JNIEnv *env, jobject lpObject, TRACKMO
if (!TRACKMOUSEEVENTFc.cached) cacheTRACKMOUSEEVENTFields(env, lpObject);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, TRACKMOUSEEVENTFc.cbSize);
lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, TRACKMOUSEEVENTFc.dwFlags);
- lpStruct->hwndTrack = (HWND)(*env)->GetIntLongField(env, lpObject, TRACKMOUSEEVENTFc.hwndTrack);
+ lpStruct->hwndTrack = (HWND)(*env)->GetLongField(env, lpObject, TRACKMOUSEEVENTFc.hwndTrack);
lpStruct->dwHoverTime = (*env)->GetIntField(env, lpObject, TRACKMOUSEEVENTFc.dwHoverTime);
return lpStruct;
}
@@ -7078,7 +6320,7 @@ void setTRACKMOUSEEVENTFields(JNIEnv *env, jobject lpObject, TRACKMOUSEEVENT *lp
if (!TRACKMOUSEEVENTFc.cached) cacheTRACKMOUSEEVENTFields(env, lpObject);
(*env)->SetIntField(env, lpObject, TRACKMOUSEEVENTFc.cbSize, (jint)lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, TRACKMOUSEEVENTFc.dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetIntLongField(env, lpObject, TRACKMOUSEEVENTFc.hwndTrack, (jintLong)lpStruct->hwndTrack);
+ (*env)->SetLongField(env, lpObject, TRACKMOUSEEVENTFc.hwndTrack, (jlong)lpStruct->hwndTrack);
(*env)->SetIntField(env, lpObject, TRACKMOUSEEVENTFc.dwHoverTime, (jint)lpStruct->dwHoverTime);
}
#endif
@@ -7145,7 +6387,7 @@ void cacheTVHITTESTINFOFields(JNIEnv *env, jobject lpObject)
TVHITTESTINFOFc.x = (*env)->GetFieldID(env, TVHITTESTINFOFc.clazz, "x", "I");
TVHITTESTINFOFc.y = (*env)->GetFieldID(env, TVHITTESTINFOFc.clazz, "y", "I");
TVHITTESTINFOFc.flags = (*env)->GetFieldID(env, TVHITTESTINFOFc.clazz, "flags", "I");
- TVHITTESTINFOFc.hItem = (*env)->GetFieldID(env, TVHITTESTINFOFc.clazz, "hItem", I_J);
+ TVHITTESTINFOFc.hItem = (*env)->GetFieldID(env, TVHITTESTINFOFc.clazz, "hItem", "J");
TVHITTESTINFOFc.cached = 1;
}
@@ -7155,7 +6397,7 @@ TVHITTESTINFO *getTVHITTESTINFOFields(JNIEnv *env, jobject lpObject, TVHITTESTIN
lpStruct->pt.x = (*env)->GetIntField(env, lpObject, TVHITTESTINFOFc.x);
lpStruct->pt.y = (*env)->GetIntField(env, lpObject, TVHITTESTINFOFc.y);
lpStruct->flags = (*env)->GetIntField(env, lpObject, TVHITTESTINFOFc.flags);
- lpStruct->hItem = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, TVHITTESTINFOFc.hItem);
+ lpStruct->hItem = (HTREEITEM)(*env)->GetLongField(env, lpObject, TVHITTESTINFOFc.hItem);
return lpStruct;
}
@@ -7165,7 +6407,7 @@ void setTVHITTESTINFOFields(JNIEnv *env, jobject lpObject, TVHITTESTINFO *lpStru
(*env)->SetIntField(env, lpObject, TVHITTESTINFOFc.x, (jint)lpStruct->pt.x);
(*env)->SetIntField(env, lpObject, TVHITTESTINFOFc.y, (jint)lpStruct->pt.y);
(*env)->SetIntField(env, lpObject, TVHITTESTINFOFc.flags, (jint)lpStruct->flags);
- (*env)->SetIntLongField(env, lpObject, TVHITTESTINFOFc.hItem, (jintLong)lpStruct->hItem);
+ (*env)->SetLongField(env, lpObject, TVHITTESTINFOFc.hItem, (jlong)lpStruct->hItem);
}
#endif
@@ -7182,18 +6424,18 @@ void cacheTVINSERTSTRUCTFields(JNIEnv *env, jobject lpObject)
{
if (TVINSERTSTRUCTFc.cached) return;
TVINSERTSTRUCTFc.clazz = (*env)->GetObjectClass(env, lpObject);
- TVINSERTSTRUCTFc.hParent = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "hParent", I_J);
- TVINSERTSTRUCTFc.hInsertAfter = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "hInsertAfter", I_J);
+ TVINSERTSTRUCTFc.hParent = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "hParent", "J");
+ TVINSERTSTRUCTFc.hInsertAfter = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "hInsertAfter", "J");
TVINSERTSTRUCTFc.mask = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "mask", "I");
- TVINSERTSTRUCTFc.hItem = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "hItem", I_J);
+ TVINSERTSTRUCTFc.hItem = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "hItem", "J");
TVINSERTSTRUCTFc.state = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "state", "I");
TVINSERTSTRUCTFc.stateMask = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "stateMask", "I");
- TVINSERTSTRUCTFc.pszText = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "pszText", I_J);
+ TVINSERTSTRUCTFc.pszText = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "pszText", "J");
TVINSERTSTRUCTFc.cchTextMax = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "cchTextMax", "I");
TVINSERTSTRUCTFc.iImage = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "iImage", "I");
TVINSERTSTRUCTFc.iSelectedImage = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "iSelectedImage", "I");
TVINSERTSTRUCTFc.cChildren = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "cChildren", "I");
- TVINSERTSTRUCTFc.lParam = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "lParam", I_J);
+ TVINSERTSTRUCTFc.lParam = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "lParam", "J");
TVINSERTSTRUCTFc.iIntegral = (*env)->GetFieldID(env, TVINSERTSTRUCTFc.clazz, "iIntegral", "I");
TVINSERTSTRUCTFc.cached = 1;
}
@@ -7201,18 +6443,18 @@ void cacheTVINSERTSTRUCTFields(JNIEnv *env, jobject lpObject)
TVINSERTSTRUCT *getTVINSERTSTRUCTFields(JNIEnv *env, jobject lpObject, TVINSERTSTRUCT *lpStruct)
{
if (!TVINSERTSTRUCTFc.cached) cacheTVINSERTSTRUCTFields(env, lpObject);
- lpStruct->hParent = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, TVINSERTSTRUCTFc.hParent);
- lpStruct->hInsertAfter = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, TVINSERTSTRUCTFc.hInsertAfter);
+ lpStruct->hParent = (HTREEITEM)(*env)->GetLongField(env, lpObject, TVINSERTSTRUCTFc.hParent);
+ lpStruct->hInsertAfter = (HTREEITEM)(*env)->GetLongField(env, lpObject, TVINSERTSTRUCTFc.hInsertAfter);
lpStruct->item.mask = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.mask);
- lpStruct->item.hItem = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, TVINSERTSTRUCTFc.hItem);
+ lpStruct->item.hItem = (HTREEITEM)(*env)->GetLongField(env, lpObject, TVINSERTSTRUCTFc.hItem);
lpStruct->item.state = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.state);
lpStruct->item.stateMask = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.stateMask);
- lpStruct->item.pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, TVINSERTSTRUCTFc.pszText);
+ lpStruct->item.pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, TVINSERTSTRUCTFc.pszText);
lpStruct->item.cchTextMax = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.cchTextMax);
lpStruct->item.iImage = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.iImage);
lpStruct->item.iSelectedImage = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.iSelectedImage);
lpStruct->item.cChildren = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.cChildren);
- lpStruct->item.lParam = (*env)->GetIntLongField(env, lpObject, TVINSERTSTRUCTFc.lParam);
+ lpStruct->item.lParam = (*env)->GetLongField(env, lpObject, TVINSERTSTRUCTFc.lParam);
lpStruct->itemex.iIntegral = (*env)->GetIntField(env, lpObject, TVINSERTSTRUCTFc.iIntegral);
return lpStruct;
}
@@ -7220,18 +6462,18 @@ TVINSERTSTRUCT *getTVINSERTSTRUCTFields(JNIEnv *env, jobject lpObject, TVINSERTS
void setTVINSERTSTRUCTFields(JNIEnv *env, jobject lpObject, TVINSERTSTRUCT *lpStruct)
{
if (!TVINSERTSTRUCTFc.cached) cacheTVINSERTSTRUCTFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, TVINSERTSTRUCTFc.hParent, (jintLong)lpStruct->hParent);
- (*env)->SetIntLongField(env, lpObject, TVINSERTSTRUCTFc.hInsertAfter, (jintLong)lpStruct->hInsertAfter);
+ (*env)->SetLongField(env, lpObject, TVINSERTSTRUCTFc.hParent, (jlong)lpStruct->hParent);
+ (*env)->SetLongField(env, lpObject, TVINSERTSTRUCTFc.hInsertAfter, (jlong)lpStruct->hInsertAfter);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.mask, (jint)lpStruct->item.mask);
- (*env)->SetIntLongField(env, lpObject, TVINSERTSTRUCTFc.hItem, (jintLong)lpStruct->item.hItem);
+ (*env)->SetLongField(env, lpObject, TVINSERTSTRUCTFc.hItem, (jlong)lpStruct->item.hItem);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.state, (jint)lpStruct->item.state);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.stateMask, (jint)lpStruct->item.stateMask);
- (*env)->SetIntLongField(env, lpObject, TVINSERTSTRUCTFc.pszText, (jintLong)lpStruct->item.pszText);
+ (*env)->SetLongField(env, lpObject, TVINSERTSTRUCTFc.pszText, (jlong)lpStruct->item.pszText);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.cchTextMax, (jint)lpStruct->item.cchTextMax);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.iImage, (jint)lpStruct->item.iImage);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.iSelectedImage, (jint)lpStruct->item.iSelectedImage);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.cChildren, (jint)lpStruct->item.cChildren);
- (*env)->SetIntLongField(env, lpObject, TVINSERTSTRUCTFc.lParam, (jintLong)lpStruct->item.lParam);
+ (*env)->SetLongField(env, lpObject, TVINSERTSTRUCTFc.lParam, (jlong)lpStruct->item.lParam);
(*env)->SetIntField(env, lpObject, TVINSERTSTRUCTFc.iIntegral, (jint)lpStruct->itemex.iIntegral);
}
#endif
@@ -7250,15 +6492,15 @@ void cacheTVITEMFields(JNIEnv *env, jobject lpObject)
if (TVITEMFc.cached) return;
TVITEMFc.clazz = (*env)->GetObjectClass(env, lpObject);
TVITEMFc.mask = (*env)->GetFieldID(env, TVITEMFc.clazz, "mask", "I");
- TVITEMFc.hItem = (*env)->GetFieldID(env, TVITEMFc.clazz, "hItem", I_J);
+ TVITEMFc.hItem = (*env)->GetFieldID(env, TVITEMFc.clazz, "hItem", "J");
TVITEMFc.state = (*env)->GetFieldID(env, TVITEMFc.clazz, "state", "I");
TVITEMFc.stateMask = (*env)->GetFieldID(env, TVITEMFc.clazz, "stateMask", "I");
- TVITEMFc.pszText = (*env)->GetFieldID(env, TVITEMFc.clazz, "pszText", I_J);
+ TVITEMFc.pszText = (*env)->GetFieldID(env, TVITEMFc.clazz, "pszText", "J");
TVITEMFc.cchTextMax = (*env)->GetFieldID(env, TVITEMFc.clazz, "cchTextMax", "I");
TVITEMFc.iImage = (*env)->GetFieldID(env, TVITEMFc.clazz, "iImage", "I");
TVITEMFc.iSelectedImage = (*env)->GetFieldID(env, TVITEMFc.clazz, "iSelectedImage", "I");
TVITEMFc.cChildren = (*env)->GetFieldID(env, TVITEMFc.clazz, "cChildren", "I");
- TVITEMFc.lParam = (*env)->GetFieldID(env, TVITEMFc.clazz, "lParam", I_J);
+ TVITEMFc.lParam = (*env)->GetFieldID(env, TVITEMFc.clazz, "lParam", "J");
TVITEMFc.cached = 1;
}
@@ -7266,15 +6508,15 @@ TVITEM *getTVITEMFields(JNIEnv *env, jobject lpObject, TVITEM *lpStruct)
{
if (!TVITEMFc.cached) cacheTVITEMFields(env, lpObject);
lpStruct->mask = (*env)->GetIntField(env, lpObject, TVITEMFc.mask);
- lpStruct->hItem = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, TVITEMFc.hItem);
+ lpStruct->hItem = (HTREEITEM)(*env)->GetLongField(env, lpObject, TVITEMFc.hItem);
lpStruct->state = (*env)->GetIntField(env, lpObject, TVITEMFc.state);
lpStruct->stateMask = (*env)->GetIntField(env, lpObject, TVITEMFc.stateMask);
- lpStruct->pszText = (LPTSTR)(*env)->GetIntLongField(env, lpObject, TVITEMFc.pszText);
+ lpStruct->pszText = (LPTSTR)(*env)->GetLongField(env, lpObject, TVITEMFc.pszText);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, TVITEMFc.cchTextMax);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, TVITEMFc.iImage);
lpStruct->iSelectedImage = (*env)->GetIntField(env, lpObject, TVITEMFc.iSelectedImage);
lpStruct->cChildren = (*env)->GetIntField(env, lpObject, TVITEMFc.cChildren);
- lpStruct->lParam = (*env)->GetIntLongField(env, lpObject, TVITEMFc.lParam);
+ lpStruct->lParam = (*env)->GetLongField(env, lpObject, TVITEMFc.lParam);
return lpStruct;
}
@@ -7282,49 +6524,15 @@ void setTVITEMFields(JNIEnv *env, jobject lpObject, TVITEM *lpStruct)
{
if (!TVITEMFc.cached) cacheTVITEMFields(env, lpObject);
(*env)->SetIntField(env, lpObject, TVITEMFc.mask, (jint)lpStruct->mask);
- (*env)->SetIntLongField(env, lpObject, TVITEMFc.hItem, (jintLong)lpStruct->hItem);
+ (*env)->SetLongField(env, lpObject, TVITEMFc.hItem, (jlong)lpStruct->hItem);
(*env)->SetIntField(env, lpObject, TVITEMFc.state, (jint)lpStruct->state);
(*env)->SetIntField(env, lpObject, TVITEMFc.stateMask, (jint)lpStruct->stateMask);
- (*env)->SetIntLongField(env, lpObject, TVITEMFc.pszText, (jintLong)lpStruct->pszText);
+ (*env)->SetLongField(env, lpObject, TVITEMFc.pszText, (jlong)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, TVITEMFc.cchTextMax, (jint)lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, TVITEMFc.iImage, (jint)lpStruct->iImage);
(*env)->SetIntField(env, lpObject, TVITEMFc.iSelectedImage, (jint)lpStruct->iSelectedImage);
(*env)->SetIntField(env, lpObject, TVITEMFc.cChildren, (jint)lpStruct->cChildren);
- (*env)->SetIntLongField(env, lpObject, TVITEMFc.lParam, (jintLong)lpStruct->lParam);
-}
-#endif
-
-#ifndef NO_TVITEMEX
-typedef struct TVITEMEX_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID iIntegral;
-} TVITEMEX_FID_CACHE;
-
-TVITEMEX_FID_CACHE TVITEMEXFc;
-
-void cacheTVITEMEXFields(JNIEnv *env, jobject lpObject)
-{
- if (TVITEMEXFc.cached) return;
- cacheTVITEMFields(env, lpObject);
- TVITEMEXFc.clazz = (*env)->GetObjectClass(env, lpObject);
- TVITEMEXFc.iIntegral = (*env)->GetFieldID(env, TVITEMEXFc.clazz, "iIntegral", "I");
- TVITEMEXFc.cached = 1;
-}
-
-TVITEMEX *getTVITEMEXFields(JNIEnv *env, jobject lpObject, TVITEMEX *lpStruct)
-{
- if (!TVITEMEXFc.cached) cacheTVITEMEXFields(env, lpObject);
- getTVITEMFields(env, lpObject, (TVITEM *)lpStruct);
- lpStruct->iIntegral = (*env)->GetIntField(env, lpObject, TVITEMEXFc.iIntegral);
- return lpStruct;
-}
-
-void setTVITEMEXFields(JNIEnv *env, jobject lpObject, TVITEMEX *lpStruct)
-{
- if (!TVITEMEXFc.cached) cacheTVITEMEXFields(env, lpObject);
- setTVITEMFields(env, lpObject, (TVITEM *)lpStruct);
- (*env)->SetIntField(env, lpObject, TVITEMEXFc.iIntegral, (jint)lpStruct->iIntegral);
+ (*env)->SetLongField(env, lpObject, TVITEMFc.lParam, (jlong)lpStruct->lParam);
}
#endif
@@ -7341,27 +6549,27 @@ void cacheTVSORTCBFields(JNIEnv *env, jobject lpObject)
{
if (TVSORTCBFc.cached) return;
TVSORTCBFc.clazz = (*env)->GetObjectClass(env, lpObject);
- TVSORTCBFc.hParent = (*env)->GetFieldID(env, TVSORTCBFc.clazz, "hParent", I_J);
- TVSORTCBFc.lpfnCompare = (*env)->GetFieldID(env, TVSORTCBFc.clazz, "lpfnCompare", I_J);
- TVSORTCBFc.lParam = (*env)->GetFieldID(env, TVSORTCBFc.clazz, "lParam", I_J);
+ TVSORTCBFc.hParent = (*env)->GetFieldID(env, TVSORTCBFc.clazz, "hParent", "J");
+ TVSORTCBFc.lpfnCompare = (*env)->GetFieldID(env, TVSORTCBFc.clazz, "lpfnCompare", "J");
+ TVSORTCBFc.lParam = (*env)->GetFieldID(env, TVSORTCBFc.clazz, "lParam", "J");
TVSORTCBFc.cached = 1;
}
TVSORTCB *getTVSORTCBFields(JNIEnv *env, jobject lpObject, TVSORTCB *lpStruct)
{
if (!TVSORTCBFc.cached) cacheTVSORTCBFields(env, lpObject);
- lpStruct->hParent = (HTREEITEM)(*env)->GetIntLongField(env, lpObject, TVSORTCBFc.hParent);
- lpStruct->lpfnCompare = (PFNTVCOMPARE)(*env)->GetIntLongField(env, lpObject, TVSORTCBFc.lpfnCompare);
- lpStruct->lParam = (LPARAM)(*env)->GetIntLongField(env, lpObject, TVSORTCBFc.lParam);
+ lpStruct->hParent = (HTREEITEM)(*env)->GetLongField(env, lpObject, TVSORTCBFc.hParent);
+ lpStruct->lpfnCompare = (PFNTVCOMPARE)(*env)->GetLongField(env, lpObject, TVSORTCBFc.lpfnCompare);
+ lpStruct->lParam = (LPARAM)(*env)->GetLongField(env, lpObject, TVSORTCBFc.lParam);
return lpStruct;
}
void setTVSORTCBFields(JNIEnv *env, jobject lpObject, TVSORTCB *lpStruct)
{
if (!TVSORTCBFc.cached) cacheTVSORTCBFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, TVSORTCBFc.hParent, (jintLong)lpStruct->hParent);
- (*env)->SetIntLongField(env, lpObject, TVSORTCBFc.lpfnCompare, (jintLong)lpStruct->lpfnCompare);
- (*env)->SetIntLongField(env, lpObject, TVSORTCBFc.lParam, (jintLong)lpStruct->lParam);
+ (*env)->SetLongField(env, lpObject, TVSORTCBFc.hParent, (jlong)lpStruct->hParent);
+ (*env)->SetLongField(env, lpObject, TVSORTCBFc.lpfnCompare, (jlong)lpStruct->lpfnCompare);
+ (*env)->SetLongField(env, lpObject, TVSORTCBFc.lParam, (jlong)lpStruct->lParam);
}
#endif
@@ -7473,8 +6681,8 @@ void cacheWINDOWPOSFields(JNIEnv *env, jobject lpObject)
{
if (WINDOWPOSFc.cached) return;
WINDOWPOSFc.clazz = (*env)->GetObjectClass(env, lpObject);
- WINDOWPOSFc.hwnd = (*env)->GetFieldID(env, WINDOWPOSFc.clazz, "hwnd", I_J);
- WINDOWPOSFc.hwndInsertAfter = (*env)->GetFieldID(env, WINDOWPOSFc.clazz, "hwndInsertAfter", I_J);
+ WINDOWPOSFc.hwnd = (*env)->GetFieldID(env, WINDOWPOSFc.clazz, "hwnd", "J");
+ WINDOWPOSFc.hwndInsertAfter = (*env)->GetFieldID(env, WINDOWPOSFc.clazz, "hwndInsertAfter", "J");
WINDOWPOSFc.x = (*env)->GetFieldID(env, WINDOWPOSFc.clazz, "x", "I");
WINDOWPOSFc.y = (*env)->GetFieldID(env, WINDOWPOSFc.clazz, "y", "I");
WINDOWPOSFc.cx = (*env)->GetFieldID(env, WINDOWPOSFc.clazz, "cx", "I");
@@ -7486,8 +6694,8 @@ void cacheWINDOWPOSFields(JNIEnv *env, jobject lpObject)
WINDOWPOS *getWINDOWPOSFields(JNIEnv *env, jobject lpObject, WINDOWPOS *lpStruct)
{
if (!WINDOWPOSFc.cached) cacheWINDOWPOSFields(env, lpObject);
- lpStruct->hwnd = (HWND)(*env)->GetIntLongField(env, lpObject, WINDOWPOSFc.hwnd);
- lpStruct->hwndInsertAfter = (HWND)(*env)->GetIntLongField(env, lpObject, WINDOWPOSFc.hwndInsertAfter);
+ lpStruct->hwnd = (HWND)(*env)->GetLongField(env, lpObject, WINDOWPOSFc.hwnd);
+ lpStruct->hwndInsertAfter = (HWND)(*env)->GetLongField(env, lpObject, WINDOWPOSFc.hwndInsertAfter);
lpStruct->x = (*env)->GetIntField(env, lpObject, WINDOWPOSFc.x);
lpStruct->y = (*env)->GetIntField(env, lpObject, WINDOWPOSFc.y);
lpStruct->cx = (*env)->GetIntField(env, lpObject, WINDOWPOSFc.cx);
@@ -7499,8 +6707,8 @@ WINDOWPOS *getWINDOWPOSFields(JNIEnv *env, jobject lpObject, WINDOWPOS *lpStruct
void setWINDOWPOSFields(JNIEnv *env, jobject lpObject, WINDOWPOS *lpStruct)
{
if (!WINDOWPOSFc.cached) cacheWINDOWPOSFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, WINDOWPOSFc.hwnd, (jintLong)lpStruct->hwnd);
- (*env)->SetIntLongField(env, lpObject, WINDOWPOSFc.hwndInsertAfter, (jintLong)lpStruct->hwndInsertAfter);
+ (*env)->SetLongField(env, lpObject, WINDOWPOSFc.hwnd, (jlong)lpStruct->hwnd);
+ (*env)->SetLongField(env, lpObject, WINDOWPOSFc.hwndInsertAfter, (jlong)lpStruct->hwndInsertAfter);
(*env)->SetIntField(env, lpObject, WINDOWPOSFc.x, (jint)lpStruct->x);
(*env)->SetIntField(env, lpObject, WINDOWPOSFc.y, (jint)lpStruct->y);
(*env)->SetIntField(env, lpObject, WINDOWPOSFc.cx, (jint)lpStruct->cx);
@@ -7523,15 +6731,15 @@ void cacheWNDCLASSFields(JNIEnv *env, jobject lpObject)
if (WNDCLASSFc.cached) return;
WNDCLASSFc.clazz = (*env)->GetObjectClass(env, lpObject);
WNDCLASSFc.style = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "style", "I");
- WNDCLASSFc.lpfnWndProc = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "lpfnWndProc", I_J);
+ WNDCLASSFc.lpfnWndProc = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "lpfnWndProc", "J");
WNDCLASSFc.cbClsExtra = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "cbClsExtra", "I");
WNDCLASSFc.cbWndExtra = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "cbWndExtra", "I");
- WNDCLASSFc.hInstance = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hInstance", I_J);
- WNDCLASSFc.hIcon = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hIcon", I_J);
- WNDCLASSFc.hCursor = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hCursor", I_J);
- WNDCLASSFc.hbrBackground = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hbrBackground", I_J);
- WNDCLASSFc.lpszMenuName = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "lpszMenuName", I_J);
- WNDCLASSFc.lpszClassName = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "lpszClassName", I_J);
+ WNDCLASSFc.hInstance = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hInstance", "J");
+ WNDCLASSFc.hIcon = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hIcon", "J");
+ WNDCLASSFc.hCursor = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hCursor", "J");
+ WNDCLASSFc.hbrBackground = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "hbrBackground", "J");
+ WNDCLASSFc.lpszMenuName = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "lpszMenuName", "J");
+ WNDCLASSFc.lpszClassName = (*env)->GetFieldID(env, WNDCLASSFc.clazz, "lpszClassName", "J");
WNDCLASSFc.cached = 1;
}
@@ -7539,15 +6747,15 @@ WNDCLASS *getWNDCLASSFields(JNIEnv *env, jobject lpObject, WNDCLASS *lpStruct)
{
if (!WNDCLASSFc.cached) cacheWNDCLASSFields(env, lpObject);
lpStruct->style = (*env)->GetIntField(env, lpObject, WNDCLASSFc.style);
- lpStruct->lpfnWndProc = (WNDPROC)(*env)->GetIntLongField(env, lpObject, WNDCLASSFc.lpfnWndProc);
+ lpStruct->lpfnWndProc = (WNDPROC)(*env)->GetLongField(env, lpObject, WNDCLASSFc.lpfnWndProc);
lpStruct->cbClsExtra = (*env)->GetIntField(env, lpObject, WNDCLASSFc.cbClsExtra);
lpStruct->cbWndExtra = (*env)->GetIntField(env, lpObject, WNDCLASSFc.cbWndExtra);
- lpStruct->hInstance = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, WNDCLASSFc.hInstance);
- lpStruct->hIcon = (HICON)(*env)->GetIntLongField(env, lpObject, WNDCLASSFc.hIcon);
- lpStruct->hCursor = (HCURSOR)(*env)->GetIntLongField(env, lpObject, WNDCLASSFc.hCursor);
- lpStruct->hbrBackground = (HBRUSH)(*env)->GetIntLongField(env, lpObject, WNDCLASSFc.hbrBackground);
- lpStruct->lpszMenuName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, WNDCLASSFc.lpszMenuName);
- lpStruct->lpszClassName = (LPCTSTR)(*env)->GetIntLongField(env, lpObject, WNDCLASSFc.lpszClassName);
+ lpStruct->hInstance = (HINSTANCE)(*env)->GetLongField(env, lpObject, WNDCLASSFc.hInstance);
+ lpStruct->hIcon = (HICON)(*env)->GetLongField(env, lpObject, WNDCLASSFc.hIcon);
+ lpStruct->hCursor = (HCURSOR)(*env)->GetLongField(env, lpObject, WNDCLASSFc.hCursor);
+ lpStruct->hbrBackground = (HBRUSH)(*env)->GetLongField(env, lpObject, WNDCLASSFc.hbrBackground);
+ lpStruct->lpszMenuName = (LPCTSTR)(*env)->GetLongField(env, lpObject, WNDCLASSFc.lpszMenuName);
+ lpStruct->lpszClassName = (LPCTSTR)(*env)->GetLongField(env, lpObject, WNDCLASSFc.lpszClassName);
return lpStruct;
}
@@ -7555,15 +6763,15 @@ void setWNDCLASSFields(JNIEnv *env, jobject lpObject, WNDCLASS *lpStruct)
{
if (!WNDCLASSFc.cached) cacheWNDCLASSFields(env, lpObject);
(*env)->SetIntField(env, lpObject, WNDCLASSFc.style, (jint)lpStruct->style);
- (*env)->SetIntLongField(env, lpObject, WNDCLASSFc.lpfnWndProc, (jintLong)lpStruct->lpfnWndProc);
+ (*env)->SetLongField(env, lpObject, WNDCLASSFc.lpfnWndProc, (jlong)lpStruct->lpfnWndProc);
(*env)->SetIntField(env, lpObject, WNDCLASSFc.cbClsExtra, (jint)lpStruct->cbClsExtra);
(*env)->SetIntField(env, lpObject, WNDCLASSFc.cbWndExtra, (jint)lpStruct->cbWndExtra);
- (*env)->SetIntLongField(env, lpObject, WNDCLASSFc.hInstance, (jintLong)lpStruct->hInstance);
- (*env)->SetIntLongField(env, lpObject, WNDCLASSFc.hIcon, (jintLong)lpStruct->hIcon);
- (*env)->SetIntLongField(env, lpObject, WNDCLASSFc.hCursor, (jintLong)lpStruct->hCursor);
- (*env)->SetIntLongField(env, lpObject, WNDCLASSFc.hbrBackground, (jintLong)lpStruct->hbrBackground);
- (*env)->SetIntLongField(env, lpObject, WNDCLASSFc.lpszMenuName, (jintLong)lpStruct->lpszMenuName);
- (*env)->SetIntLongField(env, lpObject, WNDCLASSFc.lpszClassName, (jintLong)lpStruct->lpszClassName);
+ (*env)->SetLongField(env, lpObject, WNDCLASSFc.hInstance, (jlong)lpStruct->hInstance);
+ (*env)->SetLongField(env, lpObject, WNDCLASSFc.hIcon, (jlong)lpStruct->hIcon);
+ (*env)->SetLongField(env, lpObject, WNDCLASSFc.hCursor, (jlong)lpStruct->hCursor);
+ (*env)->SetLongField(env, lpObject, WNDCLASSFc.hbrBackground, (jlong)lpStruct->hbrBackground);
+ (*env)->SetLongField(env, lpObject, WNDCLASSFc.lpszMenuName, (jlong)lpStruct->lpszMenuName);
+ (*env)->SetLongField(env, lpObject, WNDCLASSFc.lpszClassName, (jlong)lpStruct->lpszClassName);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
index c704b10f8c..371671910f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -89,18 +89,6 @@ void setBP_PAINTPARAMSFields(JNIEnv *env, jobject lpObject, BP_PAINTPARAMS *lpSt
#define BP_PAINTPARAMS_sizeof() 0
#endif
-#ifndef NO_BROWSEINFO
-void cacheBROWSEINFOFields(JNIEnv *env, jobject lpObject);
-BROWSEINFO *getBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct);
-void setBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct);
-#define BROWSEINFO_sizeof() sizeof(BROWSEINFO)
-#else
-#define cacheBROWSEINFOFields(a,b)
-#define getBROWSEINFOFields(a,b,c) NULL
-#define setBROWSEINFOFields(a,b,c)
-#define BROWSEINFO_sizeof() 0
-#endif
-
#ifndef NO_BUTTON_IMAGELIST
void cacheBUTTON_IMAGELISTFields(JNIEnv *env, jobject lpObject);
BUTTON_IMAGELIST *getBUTTON_IMAGELISTFields(JNIEnv *env, jobject lpObject, BUTTON_IMAGELIST *lpStruct);
@@ -125,54 +113,6 @@ void setCANDIDATEFORMFields(JNIEnv *env, jobject lpObject, CANDIDATEFORM *lpStru
#define CANDIDATEFORM_sizeof() 0
#endif
-#ifndef NO_CERT_CONTEXT
-void cacheCERT_CONTEXTFields(JNIEnv *env, jobject lpObject);
-CERT_CONTEXT *getCERT_CONTEXTFields(JNIEnv *env, jobject lpObject, CERT_CONTEXT *lpStruct);
-void setCERT_CONTEXTFields(JNIEnv *env, jobject lpObject, CERT_CONTEXT *lpStruct);
-#define CERT_CONTEXT_sizeof() sizeof(CERT_CONTEXT)
-#else
-#define cacheCERT_CONTEXTFields(a,b)
-#define getCERT_CONTEXTFields(a,b,c) NULL
-#define setCERT_CONTEXTFields(a,b,c)
-#define CERT_CONTEXT_sizeof() 0
-#endif
-
-#ifndef NO_CERT_INFO
-void cacheCERT_INFOFields(JNIEnv *env, jobject lpObject);
-CERT_INFO *getCERT_INFOFields(JNIEnv *env, jobject lpObject, CERT_INFO *lpStruct);
-void setCERT_INFOFields(JNIEnv *env, jobject lpObject, CERT_INFO *lpStruct);
-#define CERT_INFO_sizeof() sizeof(CERT_INFO)
-#else
-#define cacheCERT_INFOFields(a,b)
-#define getCERT_INFOFields(a,b,c) NULL
-#define setCERT_INFOFields(a,b,c)
-#define CERT_INFO_sizeof() 0
-#endif
-
-#ifndef NO_CERT_NAME_BLOB
-void cacheCERT_NAME_BLOBFields(JNIEnv *env, jobject lpObject);
-CERT_NAME_BLOB *getCERT_NAME_BLOBFields(JNIEnv *env, jobject lpObject, CERT_NAME_BLOB *lpStruct);
-void setCERT_NAME_BLOBFields(JNIEnv *env, jobject lpObject, CERT_NAME_BLOB *lpStruct);
-#define CERT_NAME_BLOB_sizeof() sizeof(CERT_NAME_BLOB)
-#else
-#define cacheCERT_NAME_BLOBFields(a,b)
-#define getCERT_NAME_BLOBFields(a,b,c) NULL
-#define setCERT_NAME_BLOBFields(a,b,c)
-#define CERT_NAME_BLOB_sizeof() 0
-#endif
-
-#ifndef NO_CERT_PUBLIC_KEY_INFO
-void cacheCERT_PUBLIC_KEY_INFOFields(JNIEnv *env, jobject lpObject);
-CERT_PUBLIC_KEY_INFO *getCERT_PUBLIC_KEY_INFOFields(JNIEnv *env, jobject lpObject, CERT_PUBLIC_KEY_INFO *lpStruct);
-void setCERT_PUBLIC_KEY_INFOFields(JNIEnv *env, jobject lpObject, CERT_PUBLIC_KEY_INFO *lpStruct);
-#define CERT_PUBLIC_KEY_INFO_sizeof() sizeof(CERT_PUBLIC_KEY_INFO)
-#else
-#define cacheCERT_PUBLIC_KEY_INFOFields(a,b)
-#define getCERT_PUBLIC_KEY_INFOFields(a,b,c) NULL
-#define setCERT_PUBLIC_KEY_INFOFields(a,b,c)
-#define CERT_PUBLIC_KEY_INFO_sizeof() 0
-#endif
-
#ifndef NO_CHOOSECOLOR
void cacheCHOOSECOLORFields(JNIEnv *env, jobject lpObject);
CHOOSECOLOR *getCHOOSECOLORFields(JNIEnv *env, jobject lpObject, CHOOSECOLOR *lpStruct);
@@ -197,6 +137,18 @@ void setCHOOSEFONTFields(JNIEnv *env, jobject lpObject, CHOOSEFONT *lpStruct);
#define CHOOSEFONT_sizeof() 0
#endif
+#ifndef NO_CIDA
+void cacheCIDAFields(JNIEnv *env, jobject lpObject);
+CIDA *getCIDAFields(JNIEnv *env, jobject lpObject, CIDA *lpStruct);
+void setCIDAFields(JNIEnv *env, jobject lpObject, CIDA *lpStruct);
+#define CIDA_sizeof() sizeof(CIDA)
+#else
+#define cacheCIDAFields(a,b)
+#define getCIDAFields(a,b,c) NULL
+#define setCIDAFields(a,b,c)
+#define CIDA_sizeof() 0
+#endif
+
#ifndef NO_COMBOBOXINFO
void cacheCOMBOBOXINFOFields(JNIEnv *env, jobject lpObject);
COMBOBOXINFO *getCOMBOBOXINFOFields(JNIEnv *env, jobject lpObject, COMBOBOXINFO *lpStruct);
@@ -233,54 +185,6 @@ void setCREATESTRUCTFields(JNIEnv *env, jobject lpObject, CREATESTRUCT *lpStruct
#define CREATESTRUCT_sizeof() 0
#endif
-#ifndef NO_CRYPT_ALGORITHM_IDENTIFIER
-void cacheCRYPT_ALGORITHM_IDENTIFIERFields(JNIEnv *env, jobject lpObject);
-CRYPT_ALGORITHM_IDENTIFIER *getCRYPT_ALGORITHM_IDENTIFIERFields(JNIEnv *env, jobject lpObject, CRYPT_ALGORITHM_IDENTIFIER *lpStruct);
-void setCRYPT_ALGORITHM_IDENTIFIERFields(JNIEnv *env, jobject lpObject, CRYPT_ALGORITHM_IDENTIFIER *lpStruct);
-#define CRYPT_ALGORITHM_IDENTIFIER_sizeof() sizeof(CRYPT_ALGORITHM_IDENTIFIER)
-#else
-#define cacheCRYPT_ALGORITHM_IDENTIFIERFields(a,b)
-#define getCRYPT_ALGORITHM_IDENTIFIERFields(a,b,c) NULL
-#define setCRYPT_ALGORITHM_IDENTIFIERFields(a,b,c)
-#define CRYPT_ALGORITHM_IDENTIFIER_sizeof() 0
-#endif
-
-#ifndef NO_CRYPT_BIT_BLOB
-void cacheCRYPT_BIT_BLOBFields(JNIEnv *env, jobject lpObject);
-CRYPT_BIT_BLOB *getCRYPT_BIT_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_BIT_BLOB *lpStruct);
-void setCRYPT_BIT_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_BIT_BLOB *lpStruct);
-#define CRYPT_BIT_BLOB_sizeof() sizeof(CRYPT_BIT_BLOB)
-#else
-#define cacheCRYPT_BIT_BLOBFields(a,b)
-#define getCRYPT_BIT_BLOBFields(a,b,c) NULL
-#define setCRYPT_BIT_BLOBFields(a,b,c)
-#define CRYPT_BIT_BLOB_sizeof() 0
-#endif
-
-#ifndef NO_CRYPT_INTEGER_BLOB
-void cacheCRYPT_INTEGER_BLOBFields(JNIEnv *env, jobject lpObject);
-CRYPT_INTEGER_BLOB *getCRYPT_INTEGER_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_INTEGER_BLOB *lpStruct);
-void setCRYPT_INTEGER_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_INTEGER_BLOB *lpStruct);
-#define CRYPT_INTEGER_BLOB_sizeof() sizeof(CRYPT_INTEGER_BLOB)
-#else
-#define cacheCRYPT_INTEGER_BLOBFields(a,b)
-#define getCRYPT_INTEGER_BLOBFields(a,b,c) NULL
-#define setCRYPT_INTEGER_BLOBFields(a,b,c)
-#define CRYPT_INTEGER_BLOB_sizeof() 0
-#endif
-
-#ifndef NO_CRYPT_OBJID_BLOB
-void cacheCRYPT_OBJID_BLOBFields(JNIEnv *env, jobject lpObject);
-CRYPT_OBJID_BLOB *getCRYPT_OBJID_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_OBJID_BLOB *lpStruct);
-void setCRYPT_OBJID_BLOBFields(JNIEnv *env, jobject lpObject, CRYPT_OBJID_BLOB *lpStruct);
-#define CRYPT_OBJID_BLOB_sizeof() sizeof(CRYPT_OBJID_BLOB)
-#else
-#define cacheCRYPT_OBJID_BLOBFields(a,b)
-#define getCRYPT_OBJID_BLOBFields(a,b,c) NULL
-#define setCRYPT_OBJID_BLOBFields(a,b,c)
-#define CRYPT_OBJID_BLOB_sizeof() 0
-#endif
-
#ifndef NO_DEVMODE
void cacheDEVMODEFields(JNIEnv *env, jobject lpObject);
DEVMODE *getDEVMODEFields(JNIEnv *env, jobject lpObject, DEVMODE *lpStruct);
@@ -353,18 +257,6 @@ void setDROPFILESFields(JNIEnv *env, jobject lpObject, DROPFILES *lpStruct);
#define DROPFILES_sizeof() 0
#endif
-#ifndef NO_DTTOPTS
-void cacheDTTOPTSFields(JNIEnv *env, jobject lpObject);
-DTTOPTS *getDTTOPTSFields(JNIEnv *env, jobject lpObject, DTTOPTS *lpStruct);
-void setDTTOPTSFields(JNIEnv *env, jobject lpObject, DTTOPTS *lpStruct);
-#define DTTOPTS_sizeof() sizeof(DTTOPTS)
-#else
-#define cacheDTTOPTSFields(a,b)
-#define getDTTOPTSFields(a,b,c) NULL
-#define setDTTOPTSFields(a,b,c)
-#define DTTOPTS_sizeof() 0
-#endif
-
#ifndef NO_EMR
void cacheEMRFields(JNIEnv *env, jobject lpObject);
EMR *getEMRFields(JNIEnv *env, jobject lpObject, EMR *lpStruct);
@@ -401,18 +293,6 @@ void setEXTLOGFONTWFields(JNIEnv *env, jobject lpObject, EXTLOGFONTW *lpStruct);
#define EXTLOGFONTW_sizeof() 0
#endif
-#ifndef NO_FILETIME
-void cacheFILETIMEFields(JNIEnv *env, jobject lpObject);
-FILETIME *getFILETIMEFields(JNIEnv *env, jobject lpObject, FILETIME *lpStruct);
-void setFILETIMEFields(JNIEnv *env, jobject lpObject, FILETIME *lpStruct);
-#define FILETIME_sizeof() sizeof(FILETIME)
-#else
-#define cacheFILETIMEFields(a,b)
-#define getFILETIMEFields(a,b,c) NULL
-#define setFILETIMEFields(a,b,c)
-#define FILETIME_sizeof() 0
-#endif
-
#ifndef NO_FLICK_DATA
void cacheFLICK_DATAFields(JNIEnv *env, jobject lpObject);
FLICK_DATA *getFLICK_DATAFields(JNIEnv *env, jobject lpObject, FLICK_DATA *lpStruct);
@@ -641,18 +521,6 @@ void setLOGFONTFields(JNIEnv *env, jobject lpObject, LOGFONT *lpStruct);
#define LOGFONT_sizeof() 0
#endif
-#ifndef NO_LOGPEN
-void cacheLOGPENFields(JNIEnv *env, jobject lpObject);
-LOGPEN *getLOGPENFields(JNIEnv *env, jobject lpObject, LOGPEN *lpStruct);
-void setLOGPENFields(JNIEnv *env, jobject lpObject, LOGPEN *lpStruct);
-#define LOGPEN_sizeof() sizeof(LOGPEN)
-#else
-#define cacheLOGPENFields(a,b)
-#define getLOGPENFields(a,b,c) NULL
-#define setLOGPENFields(a,b,c)
-#define LOGPEN_sizeof() 0
-#endif
-
#ifndef NO_LVCOLUMN
void cacheLVCOLUMNFields(JNIEnv *env, jobject lpObject);
LVCOLUMN *getLVCOLUMNFields(JNIEnv *env, jobject lpObject, LVCOLUMN *lpStruct);
@@ -1097,28 +965,16 @@ void setNOTIFYICONDATAFields(JNIEnv *env, jobject lpObject, NOTIFYICONDATA *lpSt
#define NOTIFYICONDATA_sizeof() 0
#endif
-#ifndef NO_OFNOTIFY
-void cacheOFNOTIFYFields(JNIEnv *env, jobject lpObject);
-OFNOTIFY *getOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct);
-void setOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct);
-#define OFNOTIFY_sizeof() sizeof(OFNOTIFY)
+#ifndef NO_OSVERSIONINFOEX
+void cacheOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject);
+OSVERSIONINFOEX *getOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct);
+void setOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct);
+#define OSVERSIONINFOEX_sizeof() sizeof(OSVERSIONINFOEX)
#else
-#define cacheOFNOTIFYFields(a,b)
-#define getOFNOTIFYFields(a,b,c) NULL
-#define setOFNOTIFYFields(a,b,c)
-#define OFNOTIFY_sizeof() 0
-#endif
-
-#ifndef NO_OPENFILENAME
-void cacheOPENFILENAMEFields(JNIEnv *env, jobject lpObject);
-OPENFILENAME *getOPENFILENAMEFields(JNIEnv *env, jobject lpObject, OPENFILENAME *lpStruct);
-void setOPENFILENAMEFields(JNIEnv *env, jobject lpObject, OPENFILENAME *lpStruct);
-#define OPENFILENAME_sizeof() sizeof(OPENFILENAME)
-#else
-#define cacheOPENFILENAMEFields(a,b)
-#define getOPENFILENAMEFields(a,b,c) NULL
-#define setOPENFILENAMEFields(a,b,c)
-#define OPENFILENAME_sizeof() 0
+#define cacheOSVERSIONINFOEXFields(a,b)
+#define getOSVERSIONINFOEXFields(a,b,c) NULL
+#define setOSVERSIONINFOEXFields(a,b,c)
+#define OSVERSIONINFOEX_sizeof() 0
#endif
#ifndef NO_OUTLINETEXTMETRIC
@@ -1145,18 +1001,6 @@ void setPAINTSTRUCTFields(JNIEnv *env, jobject lpObject, PAINTSTRUCT *lpStruct);
#define PAINTSTRUCT_sizeof() 0
#endif
-#ifndef NO_PANOSE
-void cachePANOSEFields(JNIEnv *env, jobject lpObject);
-PANOSE *getPANOSEFields(JNIEnv *env, jobject lpObject, PANOSE *lpStruct);
-void setPANOSEFields(JNIEnv *env, jobject lpObject, PANOSE *lpStruct);
-#define PANOSE_sizeof() sizeof(PANOSE)
-#else
-#define cachePANOSEFields(a,b)
-#define getPANOSEFields(a,b,c) NULL
-#define setPANOSEFields(a,b,c)
-#define PANOSE_sizeof() 0
-#endif
-
#ifndef NO_POINT
void cachePOINTFields(JNIEnv *env, jobject lpObject);
POINT *getPOINTFields(JNIEnv *env, jobject lpObject, POINT *lpStruct);
@@ -1277,18 +1121,6 @@ void setSCRIPT_CONTROLFields(JNIEnv *env, jobject lpObject, SCRIPT_CONTROL *lpSt
#define SCRIPT_CONTROL_sizeof() 0
#endif
-#ifndef NO_SCRIPT_DIGITSUBSTITUTE
-void cacheSCRIPT_DIGITSUBSTITUTEFields(JNIEnv *env, jobject lpObject);
-SCRIPT_DIGITSUBSTITUTE *getSCRIPT_DIGITSUBSTITUTEFields(JNIEnv *env, jobject lpObject, SCRIPT_DIGITSUBSTITUTE *lpStruct);
-void setSCRIPT_DIGITSUBSTITUTEFields(JNIEnv *env, jobject lpObject, SCRIPT_DIGITSUBSTITUTE *lpStruct);
-#define SCRIPT_DIGITSUBSTITUTE_sizeof() sizeof(SCRIPT_DIGITSUBSTITUTE)
-#else
-#define cacheSCRIPT_DIGITSUBSTITUTEFields(a,b)
-#define getSCRIPT_DIGITSUBSTITUTEFields(a,b,c) NULL
-#define setSCRIPT_DIGITSUBSTITUTEFields(a,b,c)
-#define SCRIPT_DIGITSUBSTITUTE_sizeof() 0
-#endif
-
#ifndef NO_SCRIPT_FONTPROPERTIES
void cacheSCRIPT_FONTPROPERTIESFields(JNIEnv *env, jobject lpObject);
SCRIPT_FONTPROPERTIES *getSCRIPT_FONTPROPERTIESFields(JNIEnv *env, jobject lpObject, SCRIPT_FONTPROPERTIES *lpStruct);
@@ -1613,18 +1445,6 @@ void setTVITEMFields(JNIEnv *env, jobject lpObject, TVITEM *lpStruct);
#define TVITEM_sizeof() 0
#endif
-#ifndef NO_TVITEMEX
-void cacheTVITEMEXFields(JNIEnv *env, jobject lpObject);
-TVITEMEX *getTVITEMEXFields(JNIEnv *env, jobject lpObject, TVITEMEX *lpStruct);
-void setTVITEMEXFields(JNIEnv *env, jobject lpObject, TVITEMEX *lpStruct);
-#define TVITEMEX_sizeof() sizeof(TVITEMEX)
-#else
-#define cacheTVITEMEXFields(a,b)
-#define getTVITEMEXFields(a,b,c) NULL
-#define setTVITEMEXFields(a,b,c)
-#define TVITEMEX_sizeof() 0
-#endif
-
#ifndef NO_TVSORTCB
void cacheTVSORTCBFields(JNIEnv *env, jobject lpObject);
TVSORTCB *getTVSORTCBFields(JNIEnv *env, jobject lpObject, TVSORTCB *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/search.ico b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/search.ico
new file mode 100644
index 0000000000..5eaf35c21e
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/search.ico
Binary files differ
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.rc b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.rc
index 651f8dc0cf..3057b6dd33 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.rc
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.rc
@@ -50,3 +50,7 @@ BEGIN
VALUE "Translation", 0x409, 1200
END
END
+
+/* Icons for Text widget */
+101 ICON "search.ico"
+102 ICON "cancel.ico"
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Lock.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Lock.java
deleted file mode 100644
index 971795e6e8..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Lock.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal;
-
-/**
- * Instances of this represent a recursive monitor. Note that this
- * is an empty implementation which does not actually perform locking.
- */
-public class Lock {
-
-/**
- * Locks the monitor and returns the lock count. If
- * the lock is owned by another thread, wait until
- * the lock is released.
- *
- * @return the lock count
- */
-public int lock() {
- return 0;
-}
-
-/**
- * Unlocks the monitor. If the current thread is not
- * the monitor owner, do nothing.
- */
-public void unlock() {
-}
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java
index 3f1d620f71..7ae0c40f7a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/Platform.java
@@ -16,7 +16,6 @@ package org.eclipse.swt.internal;
public class Platform {
public static final String PLATFORM = "win32"; //$NON-NLS-1$
- public static final Lock lock = new Lock ();
public static boolean isLoadable () {
return Library.isLoadable ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
deleted file mode 100644
index a9f8bdf8e2..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 Martin Karpisek and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Martin Karpisek <martin.karpisek@gmail.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.com.win32;
-
-/**
- * Function number constants for IFileDialog COM interface
- */
-public class FileDialogVtbl{
- public static final int QUERY_INTERFACE = 0;
- public static final int ADD_REF = 1;
- public static final int RELEASE = 2;
- public static final int SHOW = 3;
- public static final int SET_FILE_TYPES = 4;
- public static final int SET_FILE_TYPE_INDEX = 5;
- public static final int GET_FILE_TYPE_INDEX = 6;
- public static final int ADVISE = 7;
- public static final int UNADVISE = 8;
- public static final int SET_OPTIONS = 9;
- public static final int GET_OPTIONS = 10;
- public static final int SET_DEFAULT_FOLDER = 11;
- public static final int SET_FOLDER = 12;
- public static final int GET_FOLDER = 13;
- public static final int GET_CURRENT_SELECTION = 14;
- public static final int SET_FILE_NAME = 15;
- public static final int GET_FILE_NAME = 16;
- public static final int SET_TITLE = 17;
- public static final int SET_OK_BUTTON_LABEL = 18;
- public static final int SET_FILE_NAME_LABEL = 19;
- public static final int GET_RESULT = 20;
- public static final int ADD_PLACE = 21;
- public static final int SET_DEFAULT_EXTENSION = 22;
- public static final int CLOSE = 23;
- public static final int SET_CLIENT_GUID = 24;
- public static final int CLEAR_CLIENT_DATA = 25;
- public static final int SET_FILTER = 26;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
deleted file mode 100644
index 4ab2c96ef5..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 Martin Karpisek and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Martin Karpisek <martin.karpisek@gmail.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.com.win32;
-
-/**
- * Function number constants for IShellItem COM interface
- */
-public class ShellItemVtbl{
- public static final int QUERY_INTERFACE = 0;
- public static final int ADD_REF = 1;
- public static final int RELEASE = 2;
- public static final int BIND_TO_HANDLER = 3;
- public static final int GET_PARENT = 4;
- public static final int GET_DISPLAY_NAME = 5;
- public static final int GET_ATTRIBUTES = 6;
- public static final int COMPARE = 7;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/BitmapData.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/BitmapData.java
index 2a4efb711d..457100c2b3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/BitmapData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/BitmapData.java
@@ -20,7 +20,7 @@ public class BitmapData {
/** @field cast=(PixelFormat) */
public int PixelFormat;
/** @field cast=(void*) */
- public long /*int*/ Scan0;
+ public long Scan0;
/** @field cast=(UINT_PTR) */
- public long /*int*/ Reserved;
+ public long Reserved;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/Gdip.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/Gdip.java
index 61c790c9ea..2dd436c4e3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/Gdip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/Gdip.java
@@ -151,50 +151,50 @@ public static final native int GdiplusStartupInput_sizeof();
* @param input cast=(const GdiplusStartupInput *)
* @param output cast=(GdiplusStartupOutput *)
*/
-public static final native int GdiplusStartup(long /*int*/[] token, GdiplusStartupInput input, long /*int*/ output);
+public static final native int GdiplusStartup(long[] token, GdiplusStartupInput input, long output);
/** @param token cast=(ULONG_PTR) */
-public static final native void GdiplusShutdown(long /*int*/ token);
+public static final native void GdiplusShutdown(long token);
/**
* @method flags=new
* @param hbm cast=(HBITMAP)
* @param hpal cast=(HPALETTE)
*/
-public static final native long /*int*/ Bitmap_new(long /*int*/ hbm, long /*int*/ hpal);
+public static final native long Bitmap_new(long hbm, long hpal);
/**
* @method flags=new
* @param hicon cast=(HICON)
*/
-public static final native long /*int*/ Bitmap_new(long /*int*/ hicon);
+public static final native long Bitmap_new(long hicon);
/**
* @method flags=new
* @param format cast=(PixelFormat)
* @param scan0 cast=(BYTE *)
*/
-public static final native long /*int*/ Bitmap_new(int width, int height, int stride, int format, long /*int*/ scan0);
+public static final native long Bitmap_new(int width, int height, int stride, int format, long scan0);
/**
* @method flags=new
* @param filename cast=(WCHAR*)
*/
-public static final native long /*int*/ Bitmap_new(char[] filename, boolean useIcm);
+public static final native long Bitmap_new(char[] filename, boolean useIcm);
/** @method flags=delete */
-public static final native void Bitmap_delete(long /*int*/ bitmap);
+public static final native void Bitmap_delete(long bitmap);
/**
* @method flags=cpp
* @param bitmap cast=(Bitmap*)
* @param colorBackground cast=(Color)
* @param hbmReturn cast=(HBITMAP*)
*/
-public static final native int Bitmap_GetHBITMAP(long /*int*/ bitmap, int colorBackground, long /*int*/[] hbmReturn);
+public static final native int Bitmap_GetHBITMAP(long bitmap, int colorBackground, long[] hbmReturn);
/**
* @method flags=cpp
* @param bitmap cast=(Bitmap*)
* @param hicon cast=(HICON*)
*/
-public static final native int Bitmap_GetHICON(long /*int*/ bitmap, long /*int*/[] hicon);
+public static final native int Bitmap_GetHICON(long bitmap, long[] hicon);
/** @method flags=new */
-public static final native long /*int*/ BitmapData_new();
+public static final native long BitmapData_new();
/** @method flags=delete */
-public static final native void BitmapData_delete(long /*int*/ bitmapData);
+public static final native void BitmapData_delete(long bitmapData);
/**
* @method flags=cpp
* @param bitmap cast=(Bitmap*)
@@ -202,39 +202,39 @@ public static final native void BitmapData_delete(long /*int*/ bitmapData);
* @param pixelFormat cast=(PixelFormat)
* @param lockedBitmapData cast=(BitmapData*)
*/
-public static final native int Bitmap_LockBits(long /*int*/ bitmap, long /*int*/ rect, int flags, int pixelFormat, long /*int*/ lockedBitmapData);
+public static final native int Bitmap_LockBits(long bitmap, long rect, int flags, int pixelFormat, long lockedBitmapData);
/**
* @method flags=cpp
* @param bitmap cast=(Bitmap*)
* @param lockedBitmapData cast=(BitmapData*)
*/
-public static final native int Bitmap_UnlockBits(long /*int*/ bitmap, long /*int*/ lockedBitmapData);
+public static final native int Bitmap_UnlockBits(long bitmap, long lockedBitmapData);
/**
* @method flags=cpp
* @param brush cast=(Brush *)
*/
-public static final native long /*int*/ Brush_Clone(long /*int*/ brush);
+public static final native long Brush_Clone(long brush);
/**
* @method flags=cpp
* @param brush cast=(Brush *)
*/
-public static final native int Brush_GetType(long /*int*/ brush);
+public static final native int Brush_GetType(long brush);
/** @method flags=new */
-public static final native long /*int*/ PrivateFontCollection_new();
+public static final native long PrivateFontCollection_new();
/** @method flags=delete */
-public static final native void PrivateFontCollection_delete(long /*int*/ collection);
+public static final native void PrivateFontCollection_delete(long collection);
/**
* @method flags=cpp
* @param collection cast=(PrivateFontCollection *)
* @param filename cast=(const WCHAR *)
*/
-public static final native int PrivateFontCollection_AddFontFile(long /*int*/ collection, char[] filename);
+public static final native int PrivateFontCollection_AddFontFile(long collection, char[] filename);
/**
* @method flags=new
* @param hdc cast=(HDC)
* @param hfont cast=(HFONT)
*/
-public static final native long /*int*/ Font_new(long /*int*/ hdc, long /*int*/ hfont);
+public static final native long Font_new(long hdc, long hfont);
/**
* @method flags=new
* @param family cast=(const FontFamily *)
@@ -242,7 +242,7 @@ public static final native long /*int*/ Font_new(long /*int*/ hdc, long /*int*/
* @param style cast=(INT)
* @param unit cast=(Unit)
*/
-public static final native long /*int*/ Font_new(long /*int*/ family, float emSize, int style, int unit);
+public static final native long Font_new(long family, float emSize, int style, int unit);
/**
* @method flags=new
* @param familyName cast=(const WCHAR *)
@@ -251,72 +251,72 @@ public static final native long /*int*/ Font_new(long /*int*/ family, float emSi
* @param unit cast=(Unit)
* @param fontCollection cast=(const FontCollection *)
*/
-public static final native long /*int*/ Font_new(char[] familyName, float emSize, int style, int unit, long /*int*/ fontCollection);
+public static final native long Font_new(char[] familyName, float emSize, int style, int unit, long fontCollection);
/** @method flags=delete */
-public static final native void Font_delete(long /*int*/ font);
+public static final native void Font_delete(long font);
/**
* @method flags=cpp
* @param font cast=(Font *)
* @param family cast=(FontFamily *)
*/
-public static final native int Font_GetFamily(long /*int*/ font, long /*int*/ family);
+public static final native int Font_GetFamily(long font, long family);
/**
* @method flags=cpp
* @param font cast=(Font *)
*/
-public static final native float Font_GetSize(long /*int*/ font);
+public static final native float Font_GetSize(long font);
/**
* @method flags=cpp
* @param font cast=(Font *)
*/
-public static final native int Font_GetStyle(long /*int*/ font);
+public static final native int Font_GetStyle(long font);
/**
* @method flags=cpp
* @param font cast=(Font *)
* @param g cast=(const Graphics *)
* @param logfontW cast=(LOGFONTW *)
*/
-public static final native int Font_GetLogFontW (long /*int*/ font, long /*int*/ g, long /*int*/ logfontW);
+public static final native int Font_GetLogFontW (long font, long g, long logfontW);
/**
* @method flags=cpp
* @param font cast=(Font *)
*/
-public static final native boolean Font_IsAvailable(long /*int*/ font);
+public static final native boolean Font_IsAvailable(long font);
/** @method flags=new */
-public static final native long /*int*/ FontFamily_new();
+public static final native long FontFamily_new();
/**
* @method flags=new
* @param name cast=(const WCHAR *)
* @param fontCollection cast=(const FontCollection *)
*/
-public static final native long /*int*/ FontFamily_new(char[] name, long /*int*/ fontCollection);
+public static final native long FontFamily_new(char[] name, long fontCollection);
/** @method flags=delete */
-public static final native void FontFamily_delete(long /*int*/ family);
+public static final native void FontFamily_delete(long family);
/**
* @method flags=cpp
* @param family cast=(FontFamily *)
* @param name cast=(WCHAR *)
* @param language cast=(WCHAR)
*/
-public static final native int FontFamily_GetFamilyName(long /*int*/ family, char[] name, char language);
+public static final native int FontFamily_GetFamilyName(long family, char[] name, char language);
/**
* @method flags=cpp
* @param family cast=(FontFamily *)
*/
-public static final native boolean FontFamily_IsAvailable(long /*int*/ family);
+public static final native boolean FontFamily_IsAvailable(long family);
/**
* @method flags=new
* @param hdc cast=(HDC)
*/
-public static final native long /*int*/ Graphics_new(long /*int*/ hdc);
+public static final native long Graphics_new(long hdc);
/** @method flags=delete */
-public static final native void Graphics_delete(long /*int*/ graphics);
+public static final native void Graphics_delete(long graphics);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param pen cast=(Pen *)
*/
-public static final native int Graphics_DrawArc(long /*int*/ graphics, long /*int*/ pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
+public static final native int Graphics_DrawArc(long graphics, long pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -326,7 +326,7 @@ public static final native int Graphics_DrawArc(long /*int*/ graphics, long /*in
* @param positions cast=(const PointF *)
* @param matrix cast=(const Matrix *)
*/
-public static final native int Graphics_DrawDriverString(long /*int*/ graphics, long /*int*/ text, int length, long /*int*/ font, long /*int*/ brush, PointF /*long*/ positions, int flags, long /*int*/ matrix);
+public static final native int Graphics_DrawDriverString(long graphics, long text, int length, long font, long brush, PointF /*long*/ positions, int flags, long matrix);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -336,13 +336,13 @@ public static final native int Graphics_DrawDriverString(long /*int*/ graphics,
* @param positions cast=(const PointF *),flags=no_out
* @param matrix cast=(const Matrix *)
*/
-public static final native int Graphics_DrawDriverString(long /*int*/ graphics, long /*int*/ text, int length, long /*int*/ font, long /*int*/ brush, float[] positions, int flags, long /*int*/ matrix);
+public static final native int Graphics_DrawDriverString(long graphics, long text, int length, long font, long brush, float[] positions, int flags, long matrix);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param pen cast=(Pen *)
*/
-public static final native int Graphics_DrawEllipse(long /*int*/ graphics, long /*int*/ pen, int x, int y, int width, int height);
+public static final native int Graphics_DrawEllipse(long graphics, long pen, int x, int y, int width, int height);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -350,7 +350,7 @@ public static final native int Graphics_DrawEllipse(long /*int*/ graphics, long
* @param x cast=(INT)
* @param y cast=(INT)
*/
-public static final native int Graphics_DrawImage(long /*int*/ graphics, long /*int*/ image, int x, int y);
+public static final native int Graphics_DrawImage(long graphics, long image, int x, int y);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -365,13 +365,13 @@ public static final native int Graphics_DrawImage(long /*int*/ graphics, long /*
* @param callback cast=(DrawImageAbort)
* @param callbackData cast=(VOID *)
*/
-public static final native int Graphics_DrawImage(long /*int*/ graphics, long /*int*/ image, Rect destRect, int srcx, int srcy, int srcwidth, int srcheight, int srcUnit, long /*int*/ imageAttributes, long /*int*/ callback, long /*int*/ callbackData);
+public static final native int Graphics_DrawImage(long graphics, long image, Rect destRect, int srcx, int srcy, int srcwidth, int srcheight, int srcUnit, long imageAttributes, long callback, long callbackData);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param pen cast=(Pen *)
*/
-public static final native int Graphics_DrawLine(long /*int*/ graphics, long /*int*/ pen, int x1, int y1, int x2, int y2);
+public static final native int Graphics_DrawLine(long graphics, long pen, int x1, int y1, int x2, int y2);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -379,14 +379,14 @@ public static final native int Graphics_DrawLine(long /*int*/ graphics, long /*i
* @param points cast=(const Point *),flags=no_out
* @param count cast=(INT)
*/
-public static final native int Graphics_DrawLines(long /*int*/ graphics, long /*int*/ pen, int[] points, int count);
+public static final native int Graphics_DrawLines(long graphics, long pen, int[] points, int count);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param pen cast=(Pen *)
* @param path cast=(GraphicsPath *)
*/
-public static final native int Graphics_DrawPath(long /*int*/ graphics, long /*int*/ pen, long /*int*/ path);
+public static final native int Graphics_DrawPath(long graphics, long pen, long path);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -394,13 +394,13 @@ public static final native int Graphics_DrawPath(long /*int*/ graphics, long /*i
* @param points cast=(Point *)
* @param count cast=(INT)
*/
-public static final native int Graphics_DrawPolygon(long /*int*/ graphics, long /*int*/ pen, int[] points, int count);
+public static final native int Graphics_DrawPolygon(long graphics, long pen, int[] points, int count);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param pen cast=(Pen *)
*/
-public static final native int Graphics_DrawRectangle(long /*int*/ graphics, long /*int*/ pen, int x, int y, int width, int height);
+public static final native int Graphics_DrawRectangle(long graphics, long pen, int x, int y, int width, int height);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -410,7 +410,7 @@ public static final native int Graphics_DrawRectangle(long /*int*/ graphics, lon
* @param origin flags=struct
* @param brush cast=(Brush *)
*/
-public static final native int Graphics_DrawString(long /*int*/ graphics, char[] string, int length, long /*int*/ font, PointF origin, long /*int*/ brush);
+public static final native int Graphics_DrawString(long graphics, char[] string, int length, long font, PointF origin, long brush);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -421,7 +421,7 @@ public static final native int Graphics_DrawString(long /*int*/ graphics, char[]
* @param format cast=(StringFormat *)
* @param brush cast=(Brush *)
*/
-public static final native int Graphics_DrawString(long /*int*/ graphics, char[] string, int length, long /*int*/ font, PointF origin, long /*int*/ format, long /*int*/ brush);
+public static final native int Graphics_DrawString(long graphics, char[] string, int length, long font, PointF origin, long format, long brush);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -431,20 +431,20 @@ public static final native int Graphics_DrawString(long /*int*/ graphics, char[]
* @param width cast=(INT)
* @param height cast=(INT)
*/
-public static final native int Graphics_FillEllipse(long /*int*/ graphics, long /*int*/ brush, int x, int y, int width, int height);
+public static final native int Graphics_FillEllipse(long graphics, long brush, int x, int y, int width, int height);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param brush cast=(Brush *)
* @param path cast=(GraphicsPath *)
*/
-public static final native int Graphics_FillPath(long /*int*/ graphics, long /*int*/ brush, long /*int*/ path);
+public static final native int Graphics_FillPath(long graphics, long brush, long path);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param intention cast=(FlushIntention)
*/
-public static final native void Graphics_Flush(long /*int*/ graphics, int intention);
+public static final native void Graphics_Flush(long graphics, int intention);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -456,7 +456,7 @@ public static final native void Graphics_Flush(long /*int*/ graphics, int intent
* @param startAngle cast=(REAL)
* @param sweepAngle cast=(REAL)
*/
-public static final native int Graphics_FillPie(long /*int*/ graphics, long /*int*/ brush, int x, int y, int width, int height, float startAngle, float sweepAngle);
+public static final native int Graphics_FillPie(long graphics, long brush, int x, int y, int width, int height, float startAngle, float sweepAngle);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -465,7 +465,7 @@ public static final native int Graphics_FillPie(long /*int*/ graphics, long /*in
* @param count cast=(INT)
* @param fillMode cast=(FillMode)
*/
-public static final native int Graphics_FillPolygon(long /*int*/ graphics, long /*int*/ brush, int[] points, int count, int fillMode);
+public static final native int Graphics_FillPolygon(long graphics, long brush, int[] points, int count, int fillMode);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -475,60 +475,60 @@ public static final native int Graphics_FillPolygon(long /*int*/ graphics, long
* @param width cast=(INT)
* @param height cast=(INT)
*/
-public static final native int Graphics_FillRectangle(long /*int*/ graphics, long /*int*/ brush, int x, int y, int width, int height);
+public static final native int Graphics_FillRectangle(long graphics, long brush, int x, int y, int width, int height);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_GetClipBounds(long /*int*/ graphics, RectF rect);
+public static final native int Graphics_GetClipBounds(long graphics, RectF rect);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_GetClipBounds(long /*int*/ graphics, Rect rect);
+public static final native int Graphics_GetClipBounds(long graphics, Rect rect);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param region cast=(Region *)
*/
-public static final native int Graphics_GetClip(long /*int*/ graphics, long /*int*/ region);
+public static final native int Graphics_GetClip(long graphics, long region);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native long /*int*/ Graphics_GetHDC(long /*int*/ graphics);
+public static final native long Graphics_GetHDC(long graphics);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param hdc cast=(HDC)
*/
-public static final native void Graphics_ReleaseHDC(long /*int*/ graphics, long /*int*/ hdc);
+public static final native void Graphics_ReleaseHDC(long graphics, long hdc);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_GetInterpolationMode(long /*int*/ graphics);
+public static final native int Graphics_GetInterpolationMode(long graphics);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_GetSmoothingMode(long /*int*/ graphics);
+public static final native int Graphics_GetSmoothingMode(long graphics);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_GetTextRenderingHint(long /*int*/ graphics);
+public static final native int Graphics_GetTextRenderingHint(long graphics);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param matrix cast=(Matrix *)
*/
-public static final native int Graphics_GetTransform(long /*int*/ graphics, long /*int*/ matrix);
+public static final native int Graphics_GetTransform(long graphics, long matrix);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_GetVisibleClipBounds(long /*int*/ graphics, Rect rect);
+public static final native int Graphics_GetVisibleClipBounds(long graphics, Rect rect);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -537,7 +537,7 @@ public static final native int Graphics_GetVisibleClipBounds(long /*int*/ graphi
* @param positions cast=(const PointF *),flags=no_out
* @param matrix cast=(const Matrix *)
*/
-public static final native int Graphics_MeasureDriverString(long /*int*/ graphics, long /*int*/ text, int length, long /*int*/ font, float[] positions, int flags, long /*int*/ matrix, RectF boundingBox);
+public static final native int Graphics_MeasureDriverString(long graphics, long text, int length, long font, float[] positions, int flags, long matrix, RectF boundingBox);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -547,7 +547,7 @@ public static final native int Graphics_MeasureDriverString(long /*int*/ graphic
* @param origin cast=(const PointF *),flags=struct
* @param boundingBox cast=(RectF *)
*/
-public static final native int Graphics_MeasureString(long /*int*/ graphics, char[] string, int length, long /*int*/ font, PointF origin, RectF boundingBox);
+public static final native int Graphics_MeasureString(long graphics, char[] string, int length, long font, PointF origin, RectF boundingBox);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
@@ -557,118 +557,118 @@ public static final native int Graphics_MeasureString(long /*int*/ graphics, cha
* @param origin cast=(const PointF *),flags=struct
* @param format cast=(StringFormat *)
*/
-public static final native int Graphics_MeasureString(long /*int*/ graphics, char[] string, int length, long /*int*/ font, PointF origin, long /*int*/ format, RectF boundingBox);
+public static final native int Graphics_MeasureString(long graphics, char[] string, int length, long font, PointF origin, long format, RectF boundingBox);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_ResetClip(long /*int*/ graphics);
+public static final native int Graphics_ResetClip(long graphics);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param gstate cast=(GraphicsState)
*/
-public static final native int Graphics_Restore(long /*int*/ graphics, int gstate);
+public static final native int Graphics_Restore(long graphics, int gstate);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
*/
-public static final native int Graphics_Save(long /*int*/ graphics);
+public static final native int Graphics_Save(long graphics);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param order cast=(MatrixOrder)
*/
-public static final native int Graphics_ScaleTransform(long /*int*/ graphics, float sx, float sy, int order);
+public static final native int Graphics_ScaleTransform(long graphics, float sx, float sy, int order);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param hrgn cast=(Region *)
* @param combineMode cast=(CombineMode)
*/
-public static final native int Graphics_SetClip(long /*int*/ graphics, long /*int*/ hrgn, int combineMode);
+public static final native int Graphics_SetClip(long graphics, long hrgn, int combineMode);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param rect cast=(Rect *),flags=struct
* @param combineMode cast=(CombineMode)
*/
-public static final native int Graphics_SetClip(long /*int*/ graphics, Rect rect, int combineMode);
+public static final native int Graphics_SetClip(long graphics, Rect rect, int combineMode);
/**
* @method accessor=SetClip,flags=cpp
* @param graphics cast=(Graphics *)
* @param path cast=(GraphicsPath *)
*/
-public static final native int Graphics_SetClipPath(long /*int*/ graphics, long /*int*/ path);
+public static final native int Graphics_SetClipPath(long graphics, long path);
/**
* @method accessor=SetClip,flags=cpp
* @param graphics cast=(Graphics *)
* @param path cast=(GraphicsPath *)
* @param combineMode cast=(CombineMode)
*/
-public static final native int Graphics_SetClipPath(long /*int*/ graphics, long /*int*/ path, int combineMode);
+public static final native int Graphics_SetClipPath(long graphics, long path, int combineMode);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param compositingQuality cast=(CompositingQuality)
*/
-public static final native int Graphics_SetCompositingQuality(long /*int*/ graphics, int compositingQuality);
+public static final native int Graphics_SetCompositingQuality(long graphics, int compositingQuality);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param unit cast=(Unit)
*/
-public static final native int Graphics_SetPageUnit(long /*int*/ graphics, int unit);
+public static final native int Graphics_SetPageUnit(long graphics, int unit);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param pixelOffsetMode cast=(PixelOffsetMode)
*/
-public static final native int Graphics_SetPixelOffsetMode(long /*int*/ graphics, int pixelOffsetMode);
+public static final native int Graphics_SetPixelOffsetMode(long graphics, int pixelOffsetMode);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param smoothingMode cast=(SmoothingMode)
*/
-public static final native int Graphics_SetSmoothingMode(long /*int*/ graphics, int smoothingMode);
+public static final native int Graphics_SetSmoothingMode(long graphics, int smoothingMode);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param matrix cast=(Matrix *)
*/
-public static final native int Graphics_SetTransform(long /*int*/ graphics, long /*int*/ matrix);
+public static final native int Graphics_SetTransform(long graphics, long matrix);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param mode cast=(InterpolationMode)
*/
-public static final native int Graphics_SetInterpolationMode(long /*int*/ graphics, int mode);
+public static final native int Graphics_SetInterpolationMode(long graphics, int mode);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param mode cast=(TextRenderingHint)
*/
-public static final native int Graphics_SetTextRenderingHint(long /*int*/ graphics, int mode);
+public static final native int Graphics_SetTextRenderingHint(long graphics, int mode);
/**
* @method flags=cpp
* @param graphics cast=(Graphics *)
* @param order cast=(MatrixOrder)
*/
-public static final native int Graphics_TranslateTransform(long /*int*/ graphics, float dx, float dy, int order);
+public static final native int Graphics_TranslateTransform(long graphics, float dx, float dy, int order);
/**
* @method flags=new
* @param fillMode cast=(FillMode)
*/
-public static final native long /*int*/ GraphicsPath_new(int fillMode);
+public static final native long GraphicsPath_new(int fillMode);
/**
* @method flags=new
* @param points cast=(const Point *),flags=no_out
* @param types cast=(const BYTE *),flags=no_out
* @param fillMode cast=(FillMode)
*/
-public static final native long /*int*/ GraphicsPath_new(int[] points, byte[] types, int count, int fillMode);
+public static final native long GraphicsPath_new(int[] points, byte[] types, int count, int fillMode);
/** @method flags=delete */
-public static final native void GraphicsPath_delete(long /*int*/ path);
+public static final native void GraphicsPath_delete(long path);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
@@ -679,7 +679,7 @@ public static final native void GraphicsPath_delete(long /*int*/ path);
* @param startAngle cast=(REAL)
* @param sweepAngle cast=(REAL)
*/
-public static final native int GraphicsPath_AddArc(long /*int*/ path, float x, float y, float width, float height, float startAngle, float sweepAngle);
+public static final native int GraphicsPath_AddArc(long path, float x, float y, float width, float height, float startAngle, float sweepAngle);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
@@ -692,7 +692,7 @@ public static final native int GraphicsPath_AddArc(long /*int*/ path, float x, f
* @param x4 cast=(REAL)
* @param y4 cast=(REAL)
*/
-public static final native int GraphicsPath_AddBezier(long /*int*/ path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
+public static final native int GraphicsPath_AddBezier(long path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
@@ -701,20 +701,20 @@ public static final native int GraphicsPath_AddBezier(long /*int*/ path, float x
* @param x2 cast=(REAL)
* @param y2 cast=(REAL)
*/
-public static final native int GraphicsPath_AddLine(long /*int*/ path, float x1, float y1, float x2, float y2);
+public static final native int GraphicsPath_AddLine(long path, float x1, float y1, float x2, float y2);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param addingPath cast=(GraphicsPath *)
* @param connect cast=(BOOL)
*/
-public static final native int GraphicsPath_AddPath(long /*int*/ path, long /*int*/ addingPath, boolean connect);
+public static final native int GraphicsPath_AddPath(long path, long addingPath, boolean connect);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param rect flags=struct
*/
-public static final native int GraphicsPath_AddRectangle(long /*int*/ path, RectF rect);
+public static final native int GraphicsPath_AddRectangle(long path, RectF rect);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
@@ -726,131 +726,138 @@ public static final native int GraphicsPath_AddRectangle(long /*int*/ path, Rect
* @param origin cast=(const PointF *),flags=struct
* @param format cast=(const StringFormat *)
*/
-public static final native int GraphicsPath_AddString(long /*int*/ path, char[] string, int length, long /*int*/ family, int style, float emSize, PointF origin, long /*int*/ format);
+public static final native int GraphicsPath_AddString(long path, char[] string, int length, long family, int style, float emSize, PointF origin, long format);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
*/
-public static final native int GraphicsPath_CloseFigure(long /*int*/ path);
+public static final native int GraphicsPath_CloseFigure(long path);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
*/
-public static final native long /*int*/ GraphicsPath_Clone(long /*int*/ path);
+public static final native long GraphicsPath_Clone(long path);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param matrix cast=(Matrix *)
*/
-public static final native int GraphicsPath_Flatten(long /*int*/ path, long /*int*/ matrix, float flatness);
+public static final native int GraphicsPath_Flatten(long path, long matrix, float flatness);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param matrix cast=(Matrix *)
* @param pen cast=(Pen *)
*/
-public static final native int GraphicsPath_GetBounds(long /*int*/ path, RectF bounds, long /*int*/ matrix, long /*int*/ pen);
+public static final native int GraphicsPath_GetBounds(long path, RectF bounds, long matrix, long pen);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param lastPoint cast=(PointF *)
*/
-public static final native int GraphicsPath_GetLastPoint(long /*int*/ path, PointF lastPoint);
+public static final native int GraphicsPath_GetLastPoint(long path, PointF lastPoint);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param points cast=(PointF *)
*/
-public static final native int GraphicsPath_GetPathPoints(long /*int*/ path, float[] points, int count);
+public static final native int GraphicsPath_GetPathPoints(long path, float[] points, int count);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param types cast=(BYTE *)
*/
-public static final native int GraphicsPath_GetPathTypes(long /*int*/ path, byte[] types, int count);
+public static final native int GraphicsPath_GetPathTypes(long path, byte[] types, int count);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
*/
-public static final native int GraphicsPath_GetPointCount(long /*int*/ path);
+public static final native int GraphicsPath_GetPointCount(long path);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param pen cast=(const Pen *)
* @param g cast=(const Graphics *)
*/
-public static final native boolean GraphicsPath_IsOutlineVisible(long /*int*/ path, float x, float y, long /*int*/ pen, long /*int*/ g);
+public static final native boolean GraphicsPath_IsOutlineVisible(long path, float x, float y, long pen, long g);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param g cast=(const Graphics *)
*/
-public static final native boolean GraphicsPath_IsVisible(long /*int*/ path, float x, float y, long /*int*/ g);
+public static final native boolean GraphicsPath_IsVisible(long path, float x, float y, long g);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param fillmode cast=(FillMode)
*/
-public static final native int GraphicsPath_SetFillMode(long /*int*/ path, int fillmode);
+public static final native int GraphicsPath_SetFillMode(long path, int fillmode);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
*/
-public static final native int GraphicsPath_StartFigure(long /*int*/ path);
+public static final native int GraphicsPath_StartFigure(long path);
/**
* @method flags=cpp
* @param path cast=(GraphicsPath *)
* @param matrix cast=(Matrix *)
*/
-public static final native int GraphicsPath_Transform(long /*int*/ path, long /*int*/ matrix);
+public static final native int GraphicsPath_Transform(long path, long matrix);
/**
* @method flags=new
* @param hatchStyle cast=(HatchStyle)
* @param foreColor cast=(Color)
* @param backColor cast=(Color)
*/
-public static final native long /*int*/ HatchBrush_new(int hatchStyle, int foreColor, int backColor);
+public static final native long HatchBrush_new(int hatchStyle, int foreColor, int backColor);
+/** @method flags=delete */
+public static final native void Image_delete(long image);
+/**
+ * @method flags=cpp
+ * @param image cast=(Image *)
+ */
+public static final native long Image_Clone(long image);
/**
* @method flags=cpp
* @param image cast=(Image*)
*/
-public static final native int Image_GetLastStatus(long /*int*/ image);
+public static final native int Image_GetLastStatus(long image);
/**
* @method flags=cpp
* @param image cast=(Image*)
*/
-public static final native int Image_GetPixelFormat(long /*int*/ image);
+public static final native int Image_GetPixelFormat(long image);
/**
* @method flags=cpp
* @param image cast=(Image *)
*/
-public static final native int Image_GetWidth(long /*int*/ image);
+public static final native int Image_GetWidth(long image);
/**
* @method flags=cpp
* @param image cast=(Image *)
*/
-public static final native int Image_GetHeight(long /*int*/ image);
+public static final native int Image_GetHeight(long image);
/**
* @method flags=cpp
* @param image cast=(Image*)
* @param palette cast=(ColorPalette*)
*/
-public static final native int Image_GetPalette(long /*int*/ image, long /*int*/ palette, int size);
+public static final native int Image_GetPalette(long image, long palette, int size);
/**
* @method flags=cpp
* @param image cast=(Image*)
*/
-public static final native int Image_GetPaletteSize(long /*int*/ image);
+public static final native int Image_GetPaletteSize(long image);
/** @method flags=new */
-public static final native long /*int*/ ImageAttributes_new();
+public static final native long ImageAttributes_new();
/** @method flags=delete */
-public static final native void ImageAttributes_delete(long /*int*/ attrib);
+public static final native void ImageAttributes_delete(long attrib);
/**
* @method flags=cpp
* @param attrib cast=(ImageAttributes *)
* @param wrap cast=(WrapMode)
*/
-public static final native int ImageAttributes_SetWrapMode(long /*int*/ attrib, int wrap);
+public static final native int ImageAttributes_SetWrapMode(long attrib, int wrap);
/**
* @method flags=cpp
* @param attrib cast=(ImageAttributes *)
@@ -858,9 +865,9 @@ public static final native int ImageAttributes_SetWrapMode(long /*int*/ attrib,
* @param mode cast=(ColorMatrixFlags)
* @param type cast=(ColorAdjustType)
*/
-public static final native int ImageAttributes_SetColorMatrix(long /*int*/ attrib, float[] matrix, int mode, int type);
+public static final native int ImageAttributes_SetColorMatrix(long attrib, float[] matrix, int mode, int type);
/** @method flags=delete */
-public static final native void HatchBrush_delete(long /*int*/ brush);
+public static final native void HatchBrush_delete(long brush);
/**
* @method flags=new
* @param point1 flags=struct
@@ -868,39 +875,39 @@ public static final native void HatchBrush_delete(long /*int*/ brush);
* @param color1 cast=(Color)
* @param color2 cast=(Color)
*/
-public static final native long /*int*/ LinearGradientBrush_new(PointF point1, PointF point2, int color1, int color2);
+public static final native long LinearGradientBrush_new(PointF point1, PointF point2, int color1, int color2);
/** @method flags=delete */
-public static final native void LinearGradientBrush_delete(long /*int*/ brush);
+public static final native void LinearGradientBrush_delete(long brush);
/**
* @method flags=cpp
* @param brush cast=(LinearGradientBrush *)
* @param presetColors cast=(const Color *),flags=no_out
* @param blendPositions cast=(const REAL *),flags=no_out
*/
-public static final native int LinearGradientBrush_SetInterpolationColors(long /*int*/ brush, int [] presetColors, float[] blendPositions, int count);
+public static final native int LinearGradientBrush_SetInterpolationColors(long brush, int [] presetColors, float[] blendPositions, int count);
/**
* @method flags=cpp
* @param brush cast=(LinearGradientBrush *)
* @param wrapMode cast=(WrapMode)
*/
-public static final native int LinearGradientBrush_SetWrapMode(long /*int*/ brush, int wrapMode);
+public static final native int LinearGradientBrush_SetWrapMode(long brush, int wrapMode);
/**
* @method flags=cpp
* @param brush cast=(LinearGradientBrush *)
*/
-public static final native int LinearGradientBrush_ResetTransform(long /*int*/ brush);
+public static final native int LinearGradientBrush_ResetTransform(long brush);
/**
* @method flags=cpp
* @param brush cast=(LinearGradientBrush *)
* @param order cast=(MatrixOrder)
*/
-public static final native int LinearGradientBrush_ScaleTransform(long /*int*/ brush, float sx, float sy, int order);
+public static final native int LinearGradientBrush_ScaleTransform(long brush, float sx, float sy, int order);
/**
* @method flags=cpp
* @param brush cast=(LinearGradientBrush *)
* @param order cast=(MatrixOrder)
*/
-public static final native int LinearGradientBrush_TranslateTransform(long /*int*/ brush, float dx, float dy, int order);
+public static final native int LinearGradientBrush_TranslateTransform(long brush, float dx, float dy, int order);
/**
* @method flags=new
* @param m11 cast=(REAL)
@@ -910,39 +917,39 @@ public static final native int LinearGradientBrush_TranslateTransform(long /*int
* @param dx cast=(REAL)
* @param dy cast=(REAL)
*/
-public static final native long /*int*/ Matrix_new(float m11, float m12, float m21, float m22, float dx, float dy);
+public static final native long Matrix_new(float m11, float m12, float m21, float m22, float dx, float dy);
/** @method flags=delete */
-public static final native void Matrix_delete(long /*int*/ matrix);
+public static final native void Matrix_delete(long matrix);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
* @param m cast=(REAL *)
*/
-public static final native int Matrix_GetElements(long /*int*/ matrix, float[] m);
+public static final native int Matrix_GetElements(long matrix, float[] m);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
*/
-public static final native int Matrix_Invert(long /*int*/ matrix);
+public static final native int Matrix_Invert(long matrix);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
*/
-public static final native boolean Matrix_IsIdentity(long /*int*/ matrix);
+public static final native boolean Matrix_IsIdentity(long matrix);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
* @param matrix1 cast=(Matrix *)
* @param order cast=(MatrixOrder)
*/
-public static final native int Matrix_Multiply(long /*int*/ matrix, long /*int*/ matrix1, int order);
+public static final native int Matrix_Multiply(long matrix, long matrix1, int order);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
* @param angle cast=(REAL)
* @param order cast=(MatrixOrder)
*/
-public static final native int Matrix_Rotate(long /*int*/ matrix, float angle, int order);
+public static final native int Matrix_Rotate(long matrix, float angle, int order);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
@@ -950,7 +957,7 @@ public static final native int Matrix_Rotate(long /*int*/ matrix, float angle, i
* @param scaleY cast=(REAL)
* @param order cast=(MatrixOrder)
*/
-public static final native int Matrix_Scale(long /*int*/ matrix, float scaleX, float scaleY, int order);
+public static final native int Matrix_Scale(long matrix, float scaleX, float scaleY, int order);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
@@ -958,23 +965,23 @@ public static final native int Matrix_Scale(long /*int*/ matrix, float scaleX, f
* @param shearY cast=(REAL)
* @param order cast=(MatrixOrder)
*/
-public static final native int Matrix_Shear(long /*int*/ matrix, float shearX, float shearY, int order);
+public static final native int Matrix_Shear(long matrix, float shearX, float shearY, int order);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
*/
-public static final native int Matrix_TransformPoints(long /*int*/ matrix, PointF pts, int count);
+public static final native int Matrix_TransformPoints(long matrix, PointF pts, int count);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
* @param pts cast=(PointF *)
*/
-public static final native int Matrix_TransformPoints(long /*int*/ matrix, float[] pts, int count);
+public static final native int Matrix_TransformPoints(long matrix, float[] pts, int count);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
*/
-public static final native int Matrix_TransformVectors(long /*int*/ matrix, PointF pts, int count);
+public static final native int Matrix_TransformVectors(long matrix, PointF pts, int count);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
@@ -982,7 +989,7 @@ public static final native int Matrix_TransformVectors(long /*int*/ matrix, Poin
* @param offsetY cast=(REAL)
* @param order cast=(MatrixOrder)
*/
-public static final native int Matrix_Translate(long /*int*/ matrix, float offsetX, float offsetY, int order);
+public static final native int Matrix_Translate(long matrix, float offsetX, float offsetY, int order);
/**
* @method flags=cpp
* @param matrix cast=(Matrix *)
@@ -993,99 +1000,99 @@ public static final native int Matrix_Translate(long /*int*/ matrix, float offse
* @param dx cast=(REAL)
* @param dy cast=(REAL)
*/
-public static final native int Matrix_SetElements(long /*int*/ matrix, float m11, float m12, float m21, float m22, float dx, float dy);
+public static final native int Matrix_SetElements(long matrix, float m11, float m12, float m21, float m22, float dx, float dy);
/**
* @param Destination cast=(PVOID)
* @param SourcePtr cast=(CONST VOID*)
*/
-public static final native void MoveMemory(ColorPalette Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory(ColorPalette Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID)
* @param SourcePtr cast=(CONST VOID*)
*/
-public static final native void MoveMemory(BitmapData Destination, long /*int*/ SourcePtr);
+public static final native void MoveMemory(BitmapData Destination, long SourcePtr);
/**
* @method flags=new
* @param path cast=(GraphicsPath *)
*/
-public static final native long /*int*/ PathGradientBrush_new(long /*int*/ path);
+public static final native long PathGradientBrush_new(long path);
/** @method flags=delete */
-public static final native void PathGradientBrush_delete(long /*int*/ brush);
+public static final native void PathGradientBrush_delete(long brush);
/**
* @method flags=cpp
* @param brush cast=(PathGradientBrush *)
* @param color cast=(Color)
*/
-public static final native int PathGradientBrush_SetCenterColor(long /*int*/ brush, int color);
+public static final native int PathGradientBrush_SetCenterColor(long brush, int color);
/**
* @method flags=cpp
* @param brush cast=(PathGradientBrush *)
* @param pt flags=struct
*/
-public static final native int PathGradientBrush_SetCenterPoint(long /*int*/ brush, PointF pt);
+public static final native int PathGradientBrush_SetCenterPoint(long brush, PointF pt);
/**
* @method flags=cpp
* @param brush cast=(PathGradientBrush *)
* @param presetColors cast=(const Color *),flags=no_out
* @param blendPositions cast=(const REAL *),flags=no_out
*/
-public static final native int PathGradientBrush_SetInterpolationColors(long /*int*/ brush, int [] presetColors, float[] blendPositions, int count);
+public static final native int PathGradientBrush_SetInterpolationColors(long brush, int [] presetColors, float[] blendPositions, int count);
/**
* @method flags=cpp
* @param brush cast=(PathGradientBrush *)
* @param colors cast=(const Color *),flags=no_out
* @param count cast=(INT *)
*/
-public static final native int PathGradientBrush_SetSurroundColors(long /*int*/ brush, int [] colors, int[] count);
+public static final native int PathGradientBrush_SetSurroundColors(long brush, int [] colors, int[] count);
/**
* @method flags=cpp
* @param brush cast=(PathGradientBrush *)
* @param path cast=(GraphicsPath *)
*/
-public static final native int PathGradientBrush_SetGraphicsPath(long /*int*/ brush, long /*int*/ path);
+public static final native int PathGradientBrush_SetGraphicsPath(long brush, long path);
/**
* @method flags=cpp
* @param brush cast=(PathGradientBrush *)
* @param wrapMode cast=(WrapMode)
*/
-public static final native int PathGradientBrush_SetWrapMode(long /*int*/ brush, int wrapMode);
+public static final native int PathGradientBrush_SetWrapMode(long brush, int wrapMode);
/**
* @method flags=new
* @param brush cast=(Brush *)
* @param width cast=(REAL)
*/
-public static final native long /*int*/ Pen_new(long /*int*/ brush, float width);
+public static final native long Pen_new(long brush, float width);
/** @method flags=delete */
-public static final native void Pen_delete(long /*int*/ pen);
+public static final native void Pen_delete(long pen);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
*/
-public static final native long /*int*/ Pen_GetBrush(long /*int*/ pen);
+public static final native long Pen_GetBrush(long pen);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
* @param brush cast=(Brush *)
*/
-public static final native int Pen_SetBrush(long /*int*/ pen, long /*int*/ brush);
+public static final native int Pen_SetBrush(long pen, long brush);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
*/
-public static final native int Pen_SetDashOffset(long /*int*/ pen, float dashOffset);
+public static final native int Pen_SetDashOffset(long pen, float dashOffset);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
* @param dashArray cast=(REAL *)
* @param count cast=(int)
*/
-public static final native int Pen_SetDashPattern(long /*int*/ pen, float[] dashArray, int count);
+public static final native int Pen_SetDashPattern(long pen, float[] dashArray, int count);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
* @param dashStyle cast=(DashStyle)
*/
-public static final native int Pen_SetDashStyle(long /*int*/ pen, int dashStyle);
+public static final native int Pen_SetDashStyle(long pen, int dashStyle);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
@@ -1093,123 +1100,135 @@ public static final native int Pen_SetDashStyle(long /*int*/ pen, int dashStyle)
* @param endCap cast=(LineCap)
* @param dashCap cast=(DashCap)
*/
-public static final native int Pen_SetLineCap(long /*int*/ pen, int startCap, int endCap, int dashCap);
+public static final native int Pen_SetLineCap(long pen, int startCap, int endCap, int dashCap);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
* @param lineJoin cast=(LineJoin)
*/
-public static final native int Pen_SetLineJoin(long /*int*/ pen, int lineJoin);
+public static final native int Pen_SetLineJoin(long pen, int lineJoin);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
*/
-public static final native int Pen_SetMiterLimit(long /*int*/ pen, float miterLimit);
+public static final native int Pen_SetMiterLimit(long pen, float miterLimit);
/**
* @method flags=cpp
* @param pen cast=(Pen *)
* @param width cast=(REAL)
*/
-public static final native int Pen_SetWidth(long /*int*/ pen, float width);
+public static final native int Pen_SetWidth(long pen, float width);
/** @method flags=new */
-public static final native long /*int*/ Point_new(int x, int y);
+public static final native long Point_new(int x, int y);
/** @method flags=delete */
-public static final native void Point_delete(long /*int*/ point);
+public static final native void Point_delete(long point);
/**
* @method flags=new
* @param hRgn cast=(HRGN)
*/
-public static final native long /*int*/ Region_new(long /*int*/ hRgn);
+public static final native long Region_new(long hRgn);
/**
* @method flags=new
* @param path cast=(GraphicsPath*)
*/
-public static final native long /*int*/ Region_newGraphicsPath(long /*int*/ path);
+public static final native long Region_newGraphicsPath(long path);
/** @method flags=new */
-public static final native long /*int*/ Region_new();
+public static final native long Region_new();
/** @method flags=delete */
-public static final native void Region_delete(long /*int*/ region);
+public static final native void Region_delete(long region);
/**
* @method flags=cpp
* @param region cast=(Region *)
* @param graphics cast=(Graphics *)
*/
-public static final native long /*int*/ Region_GetHRGN(long /*int*/ region, long /*int*/ graphics);
+public static final native long Region_GetHRGN(long region, long graphics);
/**
* @method flags=cpp
* @param region cast=(Region *)
* @param graphics cast=(Graphics *)
*/
-public static final native boolean Region_IsInfinite(long /*int*/ region, long /*int*/ graphics);
+public static final native boolean Region_IsInfinite(long region, long graphics);
/**
* @method flags=new
* @param color cast=(Color)
*/
-public static final native long /*int*/ SolidBrush_new(int color);
+public static final native long SolidBrush_new(int color);
/** @method flags=delete */
-public static final native void SolidBrush_delete(long /*int*/ brush);
+public static final native void SolidBrush_delete(long brush);
/** @method flags=delete */
-public static final native void StringFormat_delete(long /*int*/ format);
+public static final native void StringFormat_delete(long format);
/**
* @method flags=cpp
* @param format cast=(StringFormat *)
*/
-public static final native long /*int*/ StringFormat_Clone(long /*int*/ format);
+public static final native long StringFormat_Clone(long format);
/** @method accessor=StringFormat::GenericDefault */
-public static final native long /*int*/ StringFormat_GenericDefault();
+public static final native long StringFormat_GenericDefault();
/** @method accessor=StringFormat::GenericTypographic */
-public static final native long /*int*/ StringFormat_GenericTypographic();
+public static final native long StringFormat_GenericTypographic();
/**
* @method flags=cpp
* @param format cast=(StringFormat *)
*/
-public static final native int StringFormat_GetFormatFlags(long /*int*/ format);
+public static final native int StringFormat_GetFormatFlags(long format);
/**
* @method flags=cpp
* @param format cast=(StringFormat *)
* @param hotkeyPrefix cast=(HotkeyPrefix)
*/
-public static final native int StringFormat_SetHotkeyPrefix(long /*int*/ format, int hotkeyPrefix);
+public static final native int StringFormat_SetHotkeyPrefix(long format, int hotkeyPrefix);
/**
* @method flags=cpp
* @param format cast=(StringFormat *)
* @param flags cast=(StringFormatFlags)
*/
-public static final native int StringFormat_SetFormatFlags(long /*int*/ format, int flags);
+public static final native int StringFormat_SetFormatFlags(long format, int flags);
/**
* @method flags=cpp
* @param format cast=(StringFormat *)
*/
-public static final native int StringFormat_SetTabStops(long /*int*/ format, float firstTabOffset, int count, float[] tabStops);
+public static final native int StringFormat_SetTabStops(long format, float firstTabOffset, int count, float[] tabStops);
/**
* @method flags=new
* @param image cast=(Image *)
* @param wrapMode cast=(WrapMode)
*/
-public static final native long /*int*/ TextureBrush_new(long /*int*/ image, int wrapMode, float dstX, float dstY, float dstWidth, float dstHeight);
+public static final native long TextureBrush_new(long image, int wrapMode, float dstX, float dstY, float dstWidth, float dstHeight);
+/**
+ * @method flags=new
+ * @param image cast=(Image *)
+ * @param rect cast=(Rect *),flags=struct
+ * @param attribs cast=(ImageAttributes *)
+ */
+public static final native long TextureBrush_new(long image, Rect rect, long attribs);
/** @method flags=delete */
-public static final native void TextureBrush_delete(long /*int*/ brush);
+public static final native void TextureBrush_delete(long brush);
/**
* @method flags=cpp
* @param brush cast=(TextureBrush *)
* @param matrix cast=(Matrix *)
*/
-public static final native int TextureBrush_SetTransform(long /*int*/ brush, long /*int*/ matrix);
+public static final native int TextureBrush_SetTransform(long brush, long matrix);
/**
* @method flags=cpp
* @param brush cast=(TextureBrush *)
*/
-public static final native int TextureBrush_ResetTransform(long /*int*/ brush);
+public static final native int TextureBrush_ResetTransform(long brush);
/**
* @method flags=cpp
* @param brush cast=(TextureBrush *)
* @param order cast=(MatrixOrder)
*/
-public static final native int TextureBrush_ScaleTransform(long /*int*/ brush, float sx, float sy, int order);
+public static final native int TextureBrush_ScaleTransform(long brush, float sx, float sy, int order);
/**
* @method flags=cpp
* @param brush cast=(TextureBrush *)
* @param order cast=(MatrixOrder)
*/
-public static final native int TextureBrush_TranslateTransform(long /*int*/ brush, float dx, float dy, int order);
-}
+public static final native int TextureBrush_TranslateTransform(long brush, float dx, float dy, int order);
+/**
+ * @method flags=cpp
+ * @param brush cast=(TextureBrush *)
+ */
+public static final native long TextureBrush_GetImage(long brush);
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/GdiplusStartupInput.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/GdiplusStartupInput.java
index 427b7d599b..e9c782a31f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/GdiplusStartupInput.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/GdiplusStartupInput.java
@@ -17,7 +17,7 @@ package org.eclipse.swt.internal.gdip;
public class GdiplusStartupInput {
public int GdiplusVersion;
/** @field cast=(DebugEventProc) */
- public long /*int*/ DebugEventCallback;
+ public long DebugEventCallback;
/** @field cast=(BOOL) */
public boolean SuppressBackgroundThread;
/** @field cast=(BOOL) */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CAUUID.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CAUUID.java
index 70ae9d51bd..11b964578f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CAUUID.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CAUUID.java
@@ -16,6 +16,6 @@ package org.eclipse.swt.internal.ole.win32;
public final class CAUUID {
public int cElems;
/** @field cast=(GUID FAR *) */
- public long /*int*/ pElems;
+ public long pElems;
public static final int sizeof = COM.CAUUID_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java
index d43b8f76dd..2dd789b2f8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java
@@ -17,32 +17,36 @@ import org.eclipse.swt.internal.win32.*;
public class COM extends OS {
/** GUID Constants */
+ public static final GUID CLSID_CMultiLanguage = IIDFromString("{275c23e2-3747-11d0-9fea-00aa003f8646}");
+ public static final GUID CLSID_DestinationList = IIDFromString ("{77f10cf0-3db5-4966-b520-b7c54fd35ed6}"); //$NON-NLS-1$
public static final GUID CLSID_DragDropHelper = COM.IIDFromString("{4657278A-411B-11d2-839A-00C04FD918D0}"); //$NON-NLS-1$
- public static final GUID IID_IDropTargetHelper = COM.IIDFromString("{4657278B-411B-11d2-839A-00C04FD918D0}"); //$NON-NLS-1$
- public static final GUID IID_IDragSourceHelper = COM.IIDFromString("{DE5BF786-477A-11d2-839D-00C04FD918D0}"); //$NON-NLS-1$
- public static final GUID IID_IDragSourceHelper2 = COM.IIDFromString("{83E07D0D-0C5F-4163-BF1A-60B274051E40}"); //$NON-NLS-1$
+ public static final GUID CLSID_EnumerableObjectCollection = IIDFromString ("{2d3468c1-36a7-43b6-ac24-d3f02fd9607a}"); //$NON-NLS-1$
+ public static final GUID CLSID_FileOpenDialog = IIDFromString("{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}"); //$NON-NLS-1$
+ public static final GUID CLSID_FileSaveDialog = IIDFromString("{C0B4E2F3-BA21-4773-8DBA-335EC946EB8B}"); //$NON-NLS-1$
+ public static final GUID CLSID_ShellLink = IIDFromString ("{00021401-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+ public static final GUID CLSID_TaskbarList = IIDFromString ("{56FDF344-FD6D-11d0-958A-006097C9A090}"); //$NON-NLS-1$
+ public static final GUID CLSID_TF_InputProcessorProfiles = IIDFromString("{33C53A50-F456-4884-B049-85FD643ECFED}"); //$NON-NLS-1$
+ public static final GUID GUID_TFCAT_TIP_KEYBOARD = IIDFromString("{34745C63-B2F0-4784-8B67-5E12C8701A31}"); //$NON-NLS-1$
+ public static final GUID IID_ICustomDestinationList = IIDFromString ("{6332debf-87b5-4670-90c0-5e57b408a49e}"); //$NON-NLS-1$
+ public static final GUID IID_IDropTargetHelper = COM.IIDFromString("{4657278B-411B-11D2-839A-00C04FD918D0}"); //$NON-NLS-1$
+ public static final GUID IID_IFileOpenDialog = IIDFromString("{d57c7288-d4ad-4768-be02-9d969532d960}"); //$NON-NLS-1$
+ public static final GUID IID_IFileSaveDialog = IIDFromString("{84bccd23-5fde-4cdb-aea4-af64b83d78ab}"); //$NON-NLS-1$
+ public static final GUID IID_IMLangFontLink2 = IIDFromString("{DCCFC162-2B38-11d2-B7EC-00C04F8F5D9A}");
+ public static final GUID IID_IObjectArray = IIDFromString ("{92CA9DCD-5622-4bba-A805-5E9F541BD8C9}"); //$NON-NLS-1$
+ public static final GUID IID_IObjectCollection = IIDFromString ("{5632b1a4-e38a-400a-928a-d4cd63230295}"); //$NON-NLS-1$
+ public static final GUID IID_IPropertyStore = IIDFromString ("{886d8eeb-8cf2-4446-8d02-cdba1dbdcf99}"); //$NON-NLS-1$
+ public static final GUID IID_IShellItem = IIDFromString("{43826d1e-e718-42ee-bc55-a1e261c37bfe}"); //$NON-NLS-1$
+ public static final GUID IID_IShellLinkW = IIDFromString ("{000214F9-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+ public static final GUID IID_ITaskbarList3 = IIDFromString ("{ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf}"); //$NON-NLS-1$
+ public static final GUID IID_ITfDisplayAttributeProvider = IIDFromString("{fee47777-163c-4769-996a-6e9c50ad8f54}"); //$NON-NLS-1$
+ public static final GUID IID_ITfInputProcessorProfiles = IIDFromString("{1F02B6C5-7842-4EE6-8A0B-9A24183A95CA}"); //$NON-NLS-1$
public static final GUID IIDJavaBeansBridge = COM.IIDFromString("{8AD9C840-044E-11D1-B3E9-00805F499D93}"); //$NON-NLS-1$
public static final GUID IIDShockwaveActiveXControl = COM.IIDFromString("{166B1BCA-3F9C-11CF-8075-444553540000}"); //$NON-NLS-1$
- public static final GUID IIDIEditorSiteTime = IIDFromString("{6BD2AEFE-7876-45e6-A6E7-3BFCDF6540AA}"); //$NON-NLS-1$
- public static final GUID IIDIEditorSiteProperty = IIDFromString("{D381A1F4-2326-4f3c-AFB9-B7537DB9E238}"); //$NON-NLS-1$
- public static final GUID IIDIEditorBaseProperty = IIDFromString("{61E55B0B-2647-47c4-8C89-E736EF15D636}"); //$NON-NLS-1$
- public static final GUID IIDIEditorSite = IIDFromString("{CDD88AB9-B01D-426E-B0F0-30973E9A074B}"); //$NON-NLS-1$
- public static final GUID IIDIEditorService = IIDFromString("{BEE283FE-7B42-4FF3-8232-0F07D43ABCF1}"); //$NON-NLS-1$
- public static final GUID IIDIEditorManager = IIDFromString("{EFDE08C4-BE87-4B1A-BF84-15FC30207180}"); //$NON-NLS-1$
public static final GUID IIDIAccessible = IIDFromString("{618736E0-3C3D-11CF-810C-00AA00389B71}"); //$NON-NLS-1$
- //public static final GUID IIDIAccessibleHandler = IIDFromString("{03022430-ABC4-11D0-BDE2-00AA001A1953}"); //$NON-NLS-1$
- //public static final GUID IIDIAccessor = IIDFromString("{0C733A8C-2A1C-11CE-ADE5-00AA0044773D}"); //$NON-NLS-1$
public static final GUID IIDIAdviseSink = IIDFromString("{0000010F-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIAdviseSink2 = IIDFromString("{00000125-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIBindCtx = IIDFromString("{0000000E-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIClassFactory = IIDFromString("{00000001-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIClassFactory2 = IIDFromString("{B196B28F-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
- public static final GUID IIDIConnectionPoint = IIDFromString("{B196B286-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
public static final GUID IIDIConnectionPointContainer = IIDFromString("{B196B284-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
- //public static final GUID IIDICreateErrorInfo = IIDFromString("{22F03340-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$
- //public static final GUID IIDICreateTypeInfo = IIDFromString("{00020405-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDICreateTypeLib = IIDFromString("{00020406-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIDataAdviseHolder = IIDFromString("{00000110-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIDataObject = IIDFromString("{0000010E-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIDispatch = IIDFromString("{00020400-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIDispatchEx = IIDFromString("{A6EF9860-C720-11D0-9337-00A0C90DCAA9}"); //$NON-NLS-1$
@@ -50,91 +54,38 @@ public class COM extends OS {
public static final GUID IIDIDocHostShowUI = IIDFromString("{C4D244B0-D43E-11CF-893B-00AA00BDCE1A}"); //$NON-NLS-1$
public static final GUID IIDIDropSource = IIDFromString("{00000121-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIDropTarget = IIDFromString("{00000122-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumConnectionPoints = IIDFromString("{B196B285-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumConnections = IIDFromString("{B196B287-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
public static final GUID IIDIEnumFORMATETC = IIDFromString("{00000103-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumMoniker = IIDFromString("{00000102-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumOLEVERB = IIDFromString("{00000104-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumSTATDATA = IIDFromString("{00000105-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumSTATSTG = IIDFromString("{0000000D-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumString = IIDFromString("{00000101-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIEnumUnknown = IIDFromString("{00000100-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIEnumVARIANT = IIDFromString("{00020404-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIErrorInfo = IIDFromString("{1CF2B120-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$
- //public static final GUID IIDIErrorLog = IIDFromString("{3127CA40-446E-11CE-8135-00AA004BB851}"); //$NON-NLS-1$
- //public static final GUID IIDIExternalConnection = IIDFromString("{00000019-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- public static final GUID IIDIFont = IIDFromString("{BEF6E002-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$
- //public static final GUID IIDIFontDisp = IIDFromString("{BEF6E003-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$
public static final /*GUID*/ String IIDIHTMLDocumentEvents2 = /*IIDFromString(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/;
public static final GUID IIDIInternetSecurityManager = IIDFromString("{79eac9ee-baf9-11ce-8c82-00aa004ba90b}"); //$NON-NLS-1$
public static final GUID IIDIAuthenticate = IIDFromString("{79eac9d0-baf9-11ce-8c82-00aa004ba90b}"); //$NON-NLS-1$
public static final GUID IIDIJScriptTypeInfo = IIDFromString("{C59C6B12-F6C1-11CF-8835-00A0C911E8B2}"); //$NON-NLS-1$
- //public static final GUID IIDILockBytes = IIDFromString("{0000000A-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIMalloc = IIDFromString("{00000002-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIMallocSpy = IIDFromString("{0000001D-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIMarshal = IIDFromString("{00000003-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIMessageFilter = IIDFromString("{00000016-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIMoniker = IIDFromString("{0000000F-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIOleAdviseHolder = IIDFromString("{00000111-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIOleCache = IIDFromString("{0000011E-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIOleCache2 = IIDFromString("{00000128-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIOleCacheControl = IIDFromString("{00000129-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleClientSite = IIDFromString("{00000118-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleCommandTarget = IIDFromString("{B722BCCB-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$
- public static final GUID IIDIOleContainer = IIDFromString("{0000011B-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleControl = IIDFromString("{B196B288-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
public static final GUID IIDIOleControlSite = IIDFromString("{B196B289-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
public static final GUID IIDIOleDocument = IIDFromString("{B722BCC5-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$
public static final GUID IIDIOleDocumentSite = IIDFromString("{B722BCC7-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$
- public static final GUID IIDIOleInPlaceActiveObject = IIDFromString("{00000117-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleInPlaceFrame = IIDFromString("{00000116-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleInPlaceObject = IIDFromString("{00000113-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleInPlaceSite = IIDFromString("{00000119-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- public static final GUID IIDIOleInPlaceUIWindow = IIDFromString("{00000115-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIOleItemContainer = IIDFromString("{0000011C-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleLink = IIDFromString("{0000011D-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIOleObject = IIDFromString("{00000112-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- public static final GUID IIDIOleWindow = IIDFromString("{00000114-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIParseDisplayName = IIDFromString("{0000011A-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIPerPropertyBrowsing = IIDFromString("{376BD3AA-3845-101B-84ED-08002B2EC713}"); //$NON-NLS-1$
public static final GUID IIDIPersist = IIDFromString("{0000010C-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIPersistFile = IIDFromString("{0000010B-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIPersistMemory = IIDFromString("{BD1AE5E0-A6AE-11CE-BD37-504200C10000}"); //$NON-NLS-1$
- //public static final GUID IIDIPersistPropertyBag = IIDFromString("{37D84F60-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$
public static final GUID IIDIPersistStorage = IIDFromString("{0000010A-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- public static final GUID IIDIPersistStream = IIDFromString("{00000109-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIPersistStreamInit = IIDFromString("{7FD52380-4E07-101B-AE2D-08002B2EC713}"); //$NON-NLS-1$
- //public static final GUID IIDIPicture = IIDFromString("{7BF80980-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$
- //public static final GUID IIDIPictureDisp = IIDFromString("{7BF80981-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$
- //public static final GUID IIDIPropertyBag = IIDFromString("{55272A00-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$
public static final GUID IIDIPropertyNotifySink = IIDFromString("{9BFBBC02-EFF1-101A-84ED-00AA00341D07}"); //$NON-NLS-1$
- //public static final GUID IIDIPropertyPage = IIDFromString("{B196B28D-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
- //public static final GUID IIDIPropertyPage2 = IIDFromString("{01E44665-24AC-101B-84ED-08002B2EC713}"); //$NON-NLS-1$
- //public static final GUID IIDIPropertyPageSite = IIDFromString("{B196B28C-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
public static final GUID IIDIProvideClassInfo = IIDFromString("{B196B283-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
public static final GUID IIDIProvideClassInfo2 = IIDFromString("{A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851}"); //$NON-NLS-1$
- //public static final GUID IIDIPSFactoryBuffer = IIDFromString("{D5F569D0-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
- //public static final GUID IIDIRootStorage = IIDFromString("{00000012-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIROTData = IIDFromString("{F29F6BC0-5021-11CE-AA15-00006901293F}"); //$NON-NLS-1$
- //public static final GUID IIDIRpcChannelBuffer = IIDFromString("{D5F56B60-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
- //public static final GUID IIDIRpcProxyBuffer = IIDFromString("{D5F56A34-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
- //public static final GUID IIDIRpcStubBuffer = IIDFromString("{D5F56AFC-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
- //public static final GUID IIDIRunnableObject = IIDFromString("{00000126-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIRunningObjectTable = IIDFromString("{00000010-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDISimpleFrameSite = IIDFromString("{742B0E01-14E6-101B-914E-00AA00300CAB}"); //$NON-NLS-1$
public static final GUID IIDIServiceProvider = IIDFromString("{6d5140c1-7436-11ce-8034-00aa006009fa}"); //$NON-NLS-1$
public static final GUID IIDISpecifyPropertyPages = IIDFromString("{B196B28B-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
- //public static final GUID IIDIStdMarshalInfo = IIDFromString("{00000018-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- public static final GUID IIDIStorage = IIDFromString("{0000000B-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- public static final GUID IIDIStream = IIDFromString("{0000000C-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDISupportErrorInfo = IIDFromString("{DF0B3D60-548F-101B-8E65-08002B2BD119}"); //$NON-NLS-1$
- //public static final GUID IIDITypeComp = IIDFromString("{00020403-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDITypeLib = IIDFromString("{00020402-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIUnknown = IIDFromString("{00000000-0000-0000-C000-000000000046}"); //$NON-NLS-1$
- //public static final GUID IIDIViewObject = IIDFromString("{0000010D-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID IIDIViewObject2 = IIDFromString("{00000127-0000-0000-C000-000000000046}"); //$NON-NLS-1$
public static final GUID CGID_DocHostCommandHandler = IIDFromString("{f38bc242-b950-11d1-8918-00c04fc2c836}"); //$NON-NLS-1$
public static final GUID CGID_Explorer = IIDFromString("{000214D0-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+ public static final GUID IID_ICoreWebView2Environment2 = IIDFromString("{41F3632B-5EF4-404F-AD82-2D606C5A9A21}"); //$NON-NLS-1$
+ public static final GUID IID_ICoreWebView2_2 = IIDFromString("{9E8F0CF8-E670-4B5E-B2BC-73E061E3184C}"); //$NON-NLS-1$
// IA2 related GUIDS
public static final GUID IIDIAccessible2 = IIDFromString("{E89F726E-C4F4-4c19-BB19-B647D7FA8478}"); //$NON-NLS-1$
@@ -154,13 +105,6 @@ public class COM extends OS {
public static final GUID IIDIAccessibleContext = IIDFromString("{77A123E4-5794-44e0-B8BF-DE600C9D29BD}"); //$NON-NLS-1$
/** Constants */
- //public static final int ADVF_DATAONSTOP = 64;
- //public static final int ADVF_NODATA = 1;
- //public static final int ADVF_ONLYONCE = 2;
- //public static final int ADVF_PRIMEFIRST = 4;
- //public static final int ADVFCACHE_FORCEBUILTIN = 16;
- //public static final int ADVFCACHE_NOHANDLER = 8;
- //public static final int ADVFCACHE_ONSAVE = 32;
public static final int CF_TEXT = 1;
public static final int CF_BITMAP = 2;
public static final int CF_METAFILEPICT = 3;
@@ -181,12 +125,6 @@ public class COM extends OS {
public static final int CLSCTX_INPROC_HANDLER = 2;
public static final int CLSCTX_INPROC_SERVER = 1;
public static final int CLSCTX_LOCAL_SERVER = 4;
- public static final int CLSCTX_REMOTE_SERVER = 16;
- public static final int CO_E_CLASSSTRING = -2147221005;
- //public static final int COINIT_APARTMENTTHREADED = 2;
- //public static final int COINIT_DISABLE_OLE1DDE = 4;
- //public static final int COINIT_MULTITHREADED = 0;
- //public static final int COINIT_SPEED_OVER_MEMORY = 8;
public static final int DATADIR_GET = 1;
public static final int DATADIR_SET = 2;
public static final int DISPATCH_CONSTRUCT = 0x4000;
@@ -194,28 +132,16 @@ public class COM extends OS {
public static final int DISP_E_MEMBERNOTFOUND = -2147352573;
public static final int DISP_E_UNKNOWNINTERFACE = 0x80020001;
public static final int DISP_E_UNKNOWNNAME = 0x80020006;
- //public static final int DISPID_AMBIENT_APPEARANCE = -716;
- //public static final int DISPID_AMBIENT_AUTOCLIP = -715;
public static final int DISPID_AMBIENT_BACKCOLOR = -701;
- //public static final int DISPID_AMBIENT_CHARSET = -727;
- //public static final int DISPID_AMBIENT_CODEPAGE = -725;
- //public static final int DISPID_AMBIENT_DISPLAYASDEFAULT = -713;
- //public static final int DISPID_AMBIENT_DISPLAYNAME = -702;
public static final int DISPID_AMBIENT_FONT = -703;
public static final int DISPID_AMBIENT_FORECOLOR = -704;
public static final int DISPID_AMBIENT_LOCALEID = -705;
public static final int DISPID_AMBIENT_MESSAGEREFLECT = -706;
public static final int DISPID_AMBIENT_OFFLINEIFNOTCONNECTED = -5501;
- //public static final int DISPID_AMBIENT_PALETTE = -726;
- //public static final int DISPID_AMBIENT_RIGHTTOLEFT = -732;
- //public static final int DISPID_AMBIENT_SCALEUNITS = -707;
public static final int DISPID_AMBIENT_SHOWGRABHANDLES = -711;
public static final int DISPID_AMBIENT_SHOWHATCHING = -712;
public static final int DISPID_AMBIENT_SILENT = -5502;
public static final int DISPID_AMBIENT_SUPPORTSMNEMONICS = -714;
- //public static final int DISPID_AMBIENT_TEXTALIGN = -708;
- //public static final int DISPID_AMBIENT_TOPTOBOTTOM = -733;
- //public static final int DISPID_AMBIENT_TRANSFERPRIORITY = -728;
public static final int DISPID_AMBIENT_UIDEAD = -710;
public static final int DISPID_AMBIENT_USERMODE = -709;
public static final int DISPID_BACKCOLOR = -501;
@@ -242,8 +168,6 @@ public class COM extends OS {
public static final int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEUP = 0xFFFFFDA1;
public static final int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEWHEEL = 1033;
- //public static final int DISPID_READYSTATE = -525;
- //public static final int DISPID_READYSTATECHANGE = -609;
public static final int DRAGDROP_S_DROP = 0x00040100;
public static final int DRAGDROP_S_CANCEL = 0x00040101;
public static final int DRAGDROP_S_USEDEFAULTCURSORS = 0x00040102;
@@ -251,166 +175,54 @@ public class COM extends OS {
public static final int DROPEFFECT_COPY = 1;
public static final int DROPEFFECT_MOVE = 2;
public static final int DROPEFFECT_LINK = 4;
- public static final int DROPEFFECT_SCROLL = 0x80000000;
- public static final int DSH_ALLOWDROPDESCRIPTIONTEXT = 0x1;
public static final int DV_E_FORMATETC = -2147221404;
public static final int DV_E_STGMEDIUM = -2147221402;
public static final int DV_E_TYMED = -2147221399;
public static final int DVASPECT_CONTENT = 1;
- //public static final int DVASPECT_DOCPRINT = 8;
- //public static final int DVASPECT_ICON = 4;
- //public static final int DVASPECT_THUMBNAIL = 2;
public static final int E_ACCESSDENIED = 0x80070005;
public static final int E_FAIL = -2147467259;
public static final int E_INVALIDARG = -2147024809;
public static final int E_NOINTERFACE = -2147467262;
public static final int E_NOTIMPL = -2147467263;
public static final int E_NOTSUPPORTED = 0x80040100;
- //public static final int E_NOTLICENSED = -2147221230;
public static final int E_OUTOFMEMORY = -2147024882;
- //public static final int E_POINTER = -2147467261;
public static final int GMEM_FIXED = 0;
- //public static final int GMEM_MOVABLE = 2;
- //public static final int GMEM_NODISCARD = 32;
public static final int GMEM_ZEROINIT = 64;
public static final int GUIDKIND_DEFAULT_SOURCE_DISP_IID = 1;
public static final int IMPLTYPEFLAG_FDEFAULT = 1;
- //public static final int IMPLTYPEFLAG_FDEFAULTVTABLE = 2048;
public static final int IMPLTYPEFLAG_FRESTRICTED = 4;
public static final int IMPLTYPEFLAG_FSOURCE = 2;
- public static final int LOCALE_SYSTEM_DEFAULT = 1024;
public static final int LOCALE_USER_DEFAULT = 2048;
- //public static final int MEMCTX_TASK = 1;
- //public static final int OLEACTIVATEAUTO = 3;
- //public static final int OLEACTIVATEDOUBLECLICK = 2;
- //public static final int OLEACTIVATEGETFOCUS = 1;
- //public static final int OLEACTIVATEMANUAL = 0;
- //public static final int OLEAUTOMATIC = 0;
- //public static final int OLECHANGED = 0;
public static final int OLECLOSE_NOSAVE = 1;
- //public static final int OLECLOSE_PROMPTSAVE = 2;
public static final int OLECLOSE_SAVEIFDIRTY = 0;
- //public static final int OLECLOSED = 2;
- //public static final int OLECONTF_EMBEDDINGS = 1;
- //public static final int OLECONTF_LINKS = 2;
- //public static final int OLECONTF_ONLYIFRUNNING = 16;
- //public static final int OLECONTF_ONLYUSER = 8;
- //public static final int OLECONTF_OTHERS = 4;
- //public static final int OLEDEACTIVATEMANUAL = 1;
- //public static final int OLEDEACTIVATEONLOSEFOCUS = 0;
- //public static final int OLEDECBORDER = 1;
- //public static final int OLEDECBORDERANDNIBS = 3;
- //public static final int OLEDECNIBS = 2;
- //public static final int OLEDECNONE = 0;
- //public static final int OLEDISPLAYCONTENT = 0;
- //public static final int OLEDISPLAYICON = 1;
- //public static final int OLEEITHER = 2;
public static final int OLEEMBEDDED = 1;
- //public static final int OLEFROZEN = 1;
- public static final int OLEIVERB_DISCARDUNDOSTATE = -6;
- //public static final int OLEIVERB_HIDE = -3;
- public static final int OLEIVERB_INPLACEACTIVATE = -5;
- //public static final int OLEIVERB_OPEN = -2;
- public static final int OLEIVERB_PRIMARY = 0;
- //public static final int OLEIVERB_PROPERTIES = -7;
- //public static final int OLEIVERB_SHOW = -1;
- //public static final int OLEIVERB_UIACTIVATE = -4;
public static final int OLELINKED = 0;
- //public static final int OLEMANUAL = 2;
- //public static final int OLEMISC_ACTIVATEWHENVISIBLE = 256;
- //public static final int OLEMISC_ACTSLIKEBUTTON = 4096;
- //public static final int OLEMISC_ACTSLIKELABEL = 8192;
- //public static final int OLEMISC_ALIGNABLE = 32768;
- //public static final int OLEMISC_ALWAYSRUN = 2048;
- //public static final int OLEMISC_CANLINKBYOLE1 = 32;
- //public static final int OLEMISC_CANTLINKINSIDE = 16;
- //public static final int OLEMISC_IGNOREACTIVATEWHENVISIBLE = 524288;
- //public static final int OLEMISC_IMEMODE = 262144;
- //public static final int OLEMISC_INSERTNOTREPLACE = 4;
- //public static final int OLEMISC_INSIDEOUT = 128;
- //public static final int OLEMISC_INVISIBLEATRUNTIME = 1024;
- //public static final int OLEMISC_ISLINKOBJECT = 64;
- //public static final int OLEMISC_NOUIACTIVATE = 16384;
- //public static final int OLEMISC_ONLYICONIC = 2;
- //public static final int OLEMISC_RECOMPOSEONRESIZE = 1;
- //public static final int OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512;
- //public static final int OLEMISC_SETCLIENTSITEFIRST = 131072;
- //public static final int OLEMISC_SIMPLEFRAME = 65536;
- //public static final int OLEMISC_STATIC = 8;
- //public static final int OLEMISC_SUPPORTSMULTILEVELUNDO = 2097152;
- //public static final int OLEMISC_WANTSTOMENUMERGE = 1048576;
- //public static final int OLENONE = 3;
- //public static final int OLERENAMED = 3;
- //public static final int OLERENDER_ASIS = 3;
public static final int OLERENDER_DRAW = 1;
- //public static final int OLERENDER_FORMAT = 2;
- //public static final int OLERENDER_NONE = 0;
- //public static final int OLESAVED = 1;
- //public static final int OLESIZEAUTOSIZE = 2;
- //public static final int OLESIZECLIP = 0;
- //public static final int OLESIZESTRETCH = 1;
- //public static final int OLESIZEZOOM = 3;
- //public static final int OLEWHICHMK_CONTAINER = 1;
- //public static final int OLEWHICHMK_OBJFULL = 3;
- //public static final int OLEWHICHMK_OBJREL = 2;
+ public static final int REGDB_E_CLASSNOTREG = 0x80040154;
public static final int S_FALSE = 1;
public static final int S_OK = 0;
- public static final int STG_E_FILENOTFOUND = 0x80030002;
- public static final int STG_S_CONVERTED = 0x00030200;
- //public static final int STGC_CONSOLIDATE = 8;
- //public static final int STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4;
public static final int STGC_DEFAULT = 0;
- //public static final int STGC_ONLYIFCURRENT = 2;
- //public static final int STGC_OVERWRITE = 1;
- public static final int STGM_CONVERT = 0x00020000;
public static final int STGM_CREATE = 0x00001000;
public static final int STGM_DELETEONRELEASE = 0x04000000;
public static final int STGM_DIRECT = 0x00000000;
- public static final int STGM_DIRECT_SWMR = 0x00400000;
- public static final int STGM_FAILIFTHERE = 0x00000000;
- public static final int STGM_NOSCRATCH = 0x00100000;
- public static final int STGM_NOSNAPSHOT = 0x00200000;
- public static final int STGM_PRIORITY = 0x00040000;
public static final int STGM_READ = 0x00000000;
public static final int STGM_READWRITE = 0x00000002;
- public static final int STGM_SHARE_DENY_NONE = 0x00000040;
- public static final int STGM_SHARE_DENY_READ = 0x00000030;
- public static final int STGM_SHARE_DENY_WRITE = 0x00000020;
public static final int STGM_SHARE_EXCLUSIVE = 0x00000010;
- public static final int STGM_SIMPLE = 0x08000000;
public static final int STGM_TRANSACTED = 0x00010000;
- public static final int STGM_WRITE = 0x00000001;
- public static final int STGTY_STORAGE = 1;
- public static final int STGTY_STREAM = 2;
- public static final int STGTY_LOCKBYTES = 3;
- public static final int STGTY_PROPERTY = 4;
- //public static final int TYMED_ENHMF = 64;
- //public static final int TYMED_FILE = 2;
- //public static final int TYMED_GDI = 16;
public static final int TYMED_HGLOBAL = 1;
- //public static final int TYMED_ISTORAGE = 8;
- //public static final int TYMED_ISTREAM = 4;
- //public static final int TYMED_MFPICT = 32;
- //public static final int TYMED_NULL = 0;
public static final short DISPATCH_METHOD = 0x1;
public static final short DISPATCH_PROPERTYGET = 0x2;
public static final short DISPATCH_PROPERTYPUT = 0x4;
public static final short DISPATCH_PROPERTYPUTREF = 0x8;
- //public static final short DISPID_CONSTRUCTOR = -6;
- //public static final short DISPID_DESTRUCTOR = -7;
- //public static final short DISPID_EVALUATE = -5;
- //public static final short DISPID_NEWENUM = -4;
public static final short DISPID_PROPERTYPUT = -3;
public static final short DISPID_UNKNOWN = -1;
public static final short DISPID_VALUE = 0;
public static final short VT_BOOL = 11;
public static final short VT_BSTR = 8;
public static final short VT_BYREF = 16384;
- public static final short VT_CY = 6;
public static final short VT_DATE = 7;
public static final short VT_DISPATCH = 9;
public static final short VT_EMPTY = 0;
- public static final short VT_ERROR = 10;
public static final short VT_I1 = 16;
public static final short VT_I2 = 2;
public static final short VT_I4 = 3;
@@ -424,6 +236,10 @@ public class COM extends OS {
public static final short VT_UNKNOWN = 13;
public static final short VT_VARIANT = 12;
+ public static final int COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC = 0;
+ public static final int COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT = 1;
+ public static final int COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS = 2;
+
public static boolean FreeUnusedLibraries = true;
private static GUID IIDFromString(String lpsz) {
@@ -437,370 +253,350 @@ private static GUID IIDFromString(String lpsz) {
/** Natives */
-/** @param lpszProgID cast=(LPCOLESTR) */
+/**
+ * @param lpszProgID cast=(LPCOLESTR),flags=no_out
+ * @param pclsid flags=no_in
+ */
public static final native int CLSIDFromProgID(char[] lpszProgID, GUID pclsid);
-/** @param lpsz cast=(LPOLESTR) */
+/**
+ * @param lpsz cast=(LPOLESTR),flags=no_out
+ * @param pclsid flags=no_in
+ */
public static final native int CLSIDFromString(char[] lpsz, GUID pclsid);
/**
+ * @param rclsid flags=no_out
* @param pUnkOuter cast=(LPUNKNOWN)
+ * @param riid flags=no_out
* @param ppv cast=(LPVOID *)
*/
-public static final native int CoCreateInstance(GUID rclsid, long /*int*/ pUnkOuter, int dwClsContext, GUID riid, long /*int*/[] ppv);
+public static final native int CoCreateInstance(GUID rclsid, long pUnkOuter, int dwClsContext, GUID riid, long[] ppv);
public static final native void CoFreeUnusedLibraries();
/**
+ * @param rclsid flags=no_out
* @param pServerInfo cast=(COSERVERINFO *)
+ * @param riid flags=no_out
* @param ppv cast=(LPVOID *)
*/
-public static final native int CoGetClassObject(GUID rclsid, int dwClsContext, long /*int*/ pServerInfo, GUID riid, long /*int*/[] ppv);
+public static final native int CoGetClassObject(GUID rclsid, int dwClsContext, long pServerInfo, GUID riid, long[] ppv);
/**
* @param pUnk cast=(IUnknown *)
* @param fLock cast=(BOOL)
* @param fLastUnlockReleases cast=(BOOL)
*/
-public static final native int CoLockObjectExternal(long /*int*/ pUnk, boolean fLock, boolean fLastUnlockReleases);
+public static final native int CoLockObjectExternal(long pUnk, boolean fLock, boolean fLastUnlockReleases);
/**
* @param pDataObject cast=(IDataObject *)
* @param pDropSource cast=(IDropSource *)
* @param pdwEffect cast=(LPDWORD)
*/
-public static final native int DoDragDrop(long /*int*/ pDataObject, long /*int*/ pDropSource, int dwOKEffect, int[] pdwEffect);
-/** @param szFileName cast=(LPCWSTR) */
+public static final native int DoDragDrop(long pDataObject, long pDropSource, int dwOKEffect, int[] pdwEffect);
+/**
+ * @param szFileName cast=(LPCWSTR),flags=no_out
+ * @param clsid flags=no_in
+ */
public static final native int GetClassFile(char[] szFileName, GUID clsid);
-/** @param lpsz cast=(LPOLESTR) */
-public static final native int IIDFromString(char[] lpsz, GUID lpiid);
-public static final native boolean IsEqualGUID(GUID rguid1, GUID rguid2);
/**
- * @param Destination cast=(PVOID)
- * @param Source cast=(CONST VOID *),flags=no_out
+ * @param lpsz cast=(LPOLESTR),flags=no_out
+ * @param lpiid flags=no_in
*/
-public static final native void MoveMemory(long /*int*/ Destination, FORMATETC Source, int Length);
+public static final native int IIDFromString(char[] lpsz, GUID lpiid);
/**
- * @param DestinationPtr cast=(PVOID)
- * @param Source cast=(CONST VOID *),flags=no_out
+ * @param rguid1 flags=no_out
+ * @param rguid2 flags=no_out
*/
-public static final native void MoveMemory(long /*int*/ DestinationPtr, GUID Source, int Length);
+public static final native boolean IsEqualGUID(GUID rguid1, GUID rguid2);
/**
- * @param DestinationPtr cast=(PVOID)
+ * @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory(long /*int*/ DestinationPtr, OLEINPLACEFRAMEINFO Source, int Length);
+public static final native void MoveMemory(long Destination, FORMATETC Source, int Length);
/**
- * @param Destination cast=(PVOID)
+ * @param DestinationPtr cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory(long /*int*/ Destination, STATSTG Source, int Length);
+public static final native void MoveMemory(long DestinationPtr, OLEINPLACEFRAMEINFO Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory(long /*int*/ Destination, STGMEDIUM Source, int Length);
+public static final native void MoveMemory(long Destination, STGMEDIUM Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory(STGMEDIUM Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory(STGMEDIUM Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory(DISPPARAMS Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory(DISPPARAMS Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory(FORMATETC Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory(FORMATETC Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory(GUID Destination, long /*int*/ SourcePtr, int Length);
-/**
- * @param Destination cast=(PVOID),flags=no_in
- * @param Source cast=(CONST VOID *)
- */
-public static final native void MoveMemory(STATSTG Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory(GUID Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory(TYPEATTR Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory(TYPEATTR Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory(RECT Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory(RECT Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory(FUNCDESC Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory(FUNCDESC Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory(VARDESC Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory(VARDESC Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory(VARIANT Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory(VARIANT Destination, long Source, int Length);
/**
+ * @param rclsid flags=no_out
+ * @param riid flags=no_out
+ * @param pFormatEtc flags=no_out
* @param pClientSite cast=(IOleClientSite *)
* @param pStg cast=(IStorage *)
* @param ppvObject cast=(void **)
*/
-public static final native int OleCreate(GUID rclsid, GUID riid, int renderopt, FORMATETC pFormatEtc, long /*int*/ pClientSite, long /*int*/ pStg, long /*int*/[] ppvObject);
+public static final native int OleCreate(GUID rclsid, GUID riid, int renderopt, FORMATETC pFormatEtc, long pClientSite, long pStg, long[] ppvObject);
/**
- * @param lpszFileName cast=(LPCOLESTR)
+ * @param rclsid flags=no_out
+ * @param lpszFileName cast=(LPCOLESTR),flags=no_out
+ * @param riid flags=no_out
+ * @param pFormatEtc flags=no_out
* @param pClientSite cast=(LPOLECLIENTSITE)
* @param pStg cast=(LPSTORAGE)
* @param ppvObj cast=(LPVOID *)
*/
-public static final native int OleCreateFromFile(GUID rclsid, char[] lpszFileName, GUID riid, int renderopt, FORMATETC pFormatEtc, long /*int*/ pClientSite, long /*int*/ pStg, long /*int*/[] ppvObj);
+public static final native int OleCreateFromFile(GUID rclsid, char[] lpszFileName, GUID riid, int renderopt, FORMATETC pFormatEtc, long pClientSite, long pStg, long[] ppvObj);
/**
* @param hwndOwner cast=(HWND)
- * @param lpszCaption cast=(LPCOLESTR)
+ * @param lpszCaption cast=(LPCOLESTR),flags=no_out
* @param lplpUnk cast=(LPUNKNOWN FAR*)
* @param lpPageClsID cast=(LPCLSID)
* @param lcid cast=(LCID)
* @param lpvReserved cast=(LPVOID)
*/
-public static final native int OleCreatePropertyFrame(long /*int*/ hwndOwner,int x, int y, char[] lpszCaption, int cObjects, long /*int*/[] lplpUnk, int cPages, long /*int*/ lpPageClsID, int lcid, int dwReserved, long /*int*/ lpvReserved);
+public static final native int OleCreatePropertyFrame(long hwndOwner,int x, int y, char[] lpszCaption, int cObjects, long[] lplpUnk, int cPages, long lpPageClsID, int lcid, int dwReserved, long lpvReserved);
/**
* @param pUnk cast=(LPUNKNOWN)
* @param dwAspect cast=(DWORD)
* @param hdcDraw cast=(HDC)
* @param lprcBounds cast=(LPRECT)
*/
-public static final native int OleDraw(long /*int*/ pUnk, int dwAspect, long /*int*/ hdcDraw, long /*int*/ lprcBounds);
+public static final native int OleDraw(long pUnk, int dwAspect, long hdcDraw, long lprcBounds);
public static final native int OleFlushClipboard();
/** @param ppDataObject cast=(IDataObject **) */
-public static final native int OleGetClipboard(long /*int*/[] ppDataObject);
+public static final native int OleGetClipboard(long[] ppDataObject);
/** @param pDataObject cast=(IDataObject *) */
-public static final native int OleIsCurrentClipboard(long /*int*/ pDataObject);
+public static final native int OleIsCurrentClipboard(long pDataObject);
/** @param pObject cast=(LPOLEOBJECT) */
-public static final native boolean OleIsRunning(long /*int*/ pObject);
-/**
- * @param pStg cast=(IStorage *)
- * @param pClientSite cast=(IOleClientSite *)
- * @param ppvObj cast=(LPVOID *)
- */
-public static final native int OleLoad(long /*int*/ pStg, GUID riid, long /*int*/ pClientSite, long /*int*/[] ppvObj);
+public static final native boolean OleIsRunning(long pObject);
/** @param pUnknown cast=(LPUNKNOWN) */
-public static final native int OleRun(long /*int*/ pUnknown);
+public static final native int OleRun(long pUnknown);
/**
* @param pPS cast=(IPersistStorage *)
* @param pStg cast=(IStorage *)
*/
-public static final native int OleSave(long /*int*/ pPS, long /*int*/ pStg, boolean fSameAsLoad);
+public static final native int OleSave(long pPS, long pStg, boolean fSameAsLoad);
/** @param pDataObject cast=(IDataObject *) */
-public static final native int OleSetClipboard(long /*int*/ pDataObject);
+public static final native int OleSetClipboard(long pDataObject);
/** @param pUnk cast=(LPUNKNOWN) */
-public static final native int OleSetContainedObject(long /*int*/ pUnk, boolean fContained);
+public static final native int OleSetContainedObject(long pUnk, boolean fContained);
/**
- * @method flags=trycatch
* @param holemenu cast=(HOLEMENU)
* @param hwndFrame cast=(HWND)
* @param hwndActiveObject cast=(HWND)
* @param lpFrame cast=(LPOLEINPLACEFRAME)
* @param lpActiveObj cast=(LPOLEINPLACEACTIVEOBJECT)
*/
-public static final native int OleSetMenuDescriptor(long /*int*/ holemenu, long /*int*/ hwndFrame, long /*int*/ hwndActiveObject, long /*int*/ lpFrame, long /*int*/ lpActiveObj);
+public static final native int OleSetMenuDescriptor(long holemenu, long hwndFrame, long hwndActiveObject, long lpFrame, long lpActiveObj);
/**
* @param clr cast=(OLE_COLOR)
* @param hpal cast=(HPALETTE)
* @param pcolorref cast=(COLORREF *)
*/
-public static final native int OleTranslateColor(int clr, long /*int*/ hpal, int[] pcolorref);
-/** @param lplpszProgID cast=(LPOLESTR *) */
-public static final native int ProgIDFromCLSID(GUID clsid, long /*int*/[] lplpszProgID);
+public static final native int OleTranslateColor(int clr, long hpal, int[] pcolorref);
+/**
+ * Custom native function.
+ * @param pszName cast=(PCWSTR)
+ * @param ppidl cast=(PIDLIST_ABSOLUTE *)
+ */
+public static final native int PathToPIDL (char [] pszName, long [] ppidl);
+/**
+ * @param clsid flags=no_out
+ * @param lplpszProgID cast=(LPOLESTR *)
+ */
+public static final native int ProgIDFromCLSID(GUID clsid, long[] lplpszProgID);
/**
* @param hwnd cast=(HWND)
* @param pDropTarget cast=(IDropTarget *)
*/
-public static final native int RegisterDragDrop(long /*int*/ hwnd, long /*int*/ pDropTarget);
+public static final native int RegisterDragDrop(long hwnd, long pDropTarget);
/** @param pmedium cast=(STGMEDIUM *) */
-public static final native void ReleaseStgMedium(long /*int*/ pmedium);
+public static final native void ReleaseStgMedium(long pmedium);
/** @param hwnd cast=(HWND) */
-public static final native int RevokeDragDrop(long /*int*/ hwnd);
+public static final native int RevokeDragDrop(long hwnd);
/**
- * @param hwnd cast=(HWND)
- * @param pDataObject cast=(IDataObject *)
- * @param pDropSource cast=(IDropSource *)
- * @param pdwEffect cast=(DWORD *)
+ * @param pszName cast=(PCWSTR),flags=no_out
+ * @param pbc cast=(IBindCtx *)
+ * @param riid flags=no_out
+ * @param ppv cast=(void **)
+ */
+public static final native int SHCreateItemFromParsingName (char [] pszName, long pbc, GUID riid, long [] ppv);
+/**
+ * @param pwcsName cast=(const WCHAR *),flags=no_out
+ * @param ppstgOpen cast=(IStorage **)
*/
-public static final native int SHDoDragDrop(long /*int*/ hwnd, long /*int*/ pDataObject, long /*int*/ pDropSource, int dwOKEffect, int[] pdwEffect);
-/** @param ppstgOpen cast=(IStorage **) */
-public static final native int StgCreateDocfile(char[] pwcsName, int grfMode, int reserved, long /*int*/[] ppstgOpen);
-/** @param pwcsName cast=(const WCHAR *) */
+public static final native int StgCreateDocfile(char[] pwcsName, int grfMode, int reserved, long[] ppstgOpen);
+/** @param pInit cast=(BYTE *),flags=critical */
+public static final native long SHCreateMemStream(byte[] pInit, int cbInit);
+/** @param pwcsName cast=(const WCHAR *),flags=no_out */
public static final native int StgIsStorageFile(char[] pwcsName);
/**
- * @param pwcsName cast=(const WCHAR *)
+ * @param pwcsName cast=(const WCHAR *),flags=no_out
* @param pstgPriority cast=(IStorage *)
* @param snbExclude cast=(SNB)
* @param ppstgOpen cast=(IStorage **)
*/
-public static final native int StgOpenStorage(char[] pwcsName, long /*int*/ pstgPriority, int grfMode, long /*int*/ snbExclude, int reserved, long /*int*/[] ppstgOpen);
-/** @param ppsz cast=(LPOLESTR *) */
-public static final native int StringFromCLSID(GUID rclsid, long /*int*/[] ppsz);
+public static final native int StgOpenStorage(char[] pwcsName, long pstgPriority, int grfMode, long snbExclude, int reserved, long[] ppstgOpen);
+/** @param sz cast=(OLECHAR *),flags=no_out critical */
+public static final native long SysAllocString(char [] sz);
/** @param sz cast=(OLECHAR *) */
-public static final native long /*int*/ SysAllocString(char [] sz);
+public static final native long SysAllocStringLen(char [] sz, int ui);
/** @param bstr cast=(BSTR) */
-public static final native void SysFreeString(long /*int*/ bstr);
+public static final native void SysFreeString(long bstr);
/** @param bstr cast=(BSTR) */
-public static final native int SysStringByteLen(long /*int*/ bstr);
+public static final native int SysStringByteLen(long bstr);
/** @param bstr cast=(BSTR) */
-public static final native int SysStringLen(long /*int*/ bstr);
+public static final native int SysStringLen(long bstr);
/**
* @param pvargDest cast=(VARIANTARG FAR* )
* @param pvarSrc cast=(VARIANTARG FAR* )
* @param vt cast=(VARTYPE)
*/
-public static final native int VariantChangeType(long /*int*/ pvargDest, long /*int*/ pvarSrc, short wFlags, short vt);
+public static final native int VariantChangeType(long pvargDest, long pvarSrc, short wFlags, short vt);
/** @param pvarg cast=(VARIANTARG FAR* ) */
-public static final native int VariantClear(long /*int*/ pvarg);
+public static final native int VariantClear(long pvarg);
/** @param pvarg cast=(VARIANTARG FAR* ) */
-public static final native void VariantInit(long /*int*/ pvarg);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] arg0, char[] arg1);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, POINT arg2, int arg3);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, long arg1, POINT arg2, int arg3);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, POINT arg1, int arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, POINT arg1, long arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, POINT arg0, int arg1);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, SHDRAGIMAGE arg0, int arg1);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, SHDRAGIMAGE arg0, long arg1);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, int[] arg4);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, long[] arg4);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] arg0, long arg1, int arg2, int arg3, long[] arg4);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, int arg4, int [] arg5);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] arg0, long arg1, int arg2, int arg3, int arg4, long[] arg5);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, long[] arg1);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int[] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, int arg1, long[] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, long arg1, long[] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, long[] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, long arg1, int[] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, int arg1, int[] arg2);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, long arg2);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, DVTARGETDEVICE arg2, SIZE arg3);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, GUID arg2, int arg3, int [] arg4);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, long arg1, GUID arg2, long arg3, long [] arg4);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, FORMATETC arg1, int [] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, FORMATETC arg1, long[] arg2);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, GUID arg1);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, GUID arg1, int arg2, int arg3);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, GUID arg1, long arg2, long arg3);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, GUID arg1, int arg2, int arg3, DISPPARAMS arg4, int arg5, EXCEPINFO arg6, int[] arg7);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, GUID arg1, int arg2, int arg3, DISPPARAMS arg4, long arg5, EXCEPINFO arg6, int[] arg7);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, STATSTG arg1, int [] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, STATSTG arg1, long[] arg2);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, MSG arg0);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, MSG arg1, int arg2, int arg3, int arg4, RECT arg5);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, MSG arg1, long arg2, int arg3, long arg4, RECT arg5);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, SIZE arg1);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, boolean arg1);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, boolean arg1);
-
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, boolean arg0);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, boolean arg0, int arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, boolean arg0, long arg1);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, CAUUID arg0);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, CONTROLINFO arg0);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, FORMATETC arg0);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, FORMATETC arg0, STGMEDIUM arg1);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, FORMATETC arg0, STGMEDIUM arg1, boolean arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, int[] arg1);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, long[] arg1);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, GUID arg1, int[] arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, GUID arg1, long[] arg2);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, int arg1, int arg2, int arg3, int[] arg4);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, long arg1, int arg2, int arg3, int[] arg4);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, int arg1, int arg2, int arg3, int arg4);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, int arg1, int arg2, long arg3, long arg4);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, GUID arg0, int arg1, OLECMD arg2, OLECMDTEXT arg3);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, LICINFO arg0);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, RECT arg0, int arg1, boolean arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, RECT arg0, long arg1, boolean arg2);
+public static final native void VariantInit(long pvarg);
+/** @param pStg cast=(IStorage *) */
+public static final native int WriteClassStg(long pStg, GUID rclsid);
/**
- * @param arg0 flags=struct
- */
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, RECT arg0, int arg1, int arg2);
-/**
- * @param arg0 flags=struct
+ * @method flags=dynamic
+ * @param browserExecutableFolder flags=no_out
+ * @param userDataFolder flags=no_out
*/
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, RECT arg0, long arg1, long arg2);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, RECT arg0, RECT arg1);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, RECT arg0);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int [] arg1, int [] arg2, int[] arg3, int [] arg4);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, long[] arg1, long[] arg2, int[] arg3, long[] arg4);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int [] arg1, int arg2, int[] arg3);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, long[] arg1, int arg2, int[] arg3);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int arg2, DISPPARAMS arg3, int arg4, EXCEPINFO arg5, int arg6);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int arg2, DISPPARAMS arg3, long arg4, EXCEPINFO arg5, long arg6);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] pszPropName, int[] pVar, int[] pErrorLog);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, char[] pszPropName, int pVar, int[] pErrorLog);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int type, int listener, boolean useCapture);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long type, long listener, boolean useCapture);
-
-/** @param pStg cast=(IStorage *) */
-public static final native int WriteClassStg(long /*int*/ pStg, GUID rclsid);
+public static final native int CreateCoreWebView2EnvironmentWithOptions(char[] browserExecutableFolder, char[] userDataFolder, long environmentOptions, long environmentCreatedHandler);
+/** @method flags=no_gen */
+public static final native long CreateSwtWebView2Callback(ICoreWebView2SwtCallback handler);
+/** @method flags=no_gen */
+public static final native long CreateSwtWebView2Host(ICoreWebView2SwtHost host);
+/** @method flags=no_gen */
+public static final native long CreateSwtWebView2Options();
+
+public static final native int VtblCall(int fnNumber, long ppVtbl);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long arg1, int arg2, long[] arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long arg1, int arg2, long[] arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, int arg1, int arg2, long[] arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, int arg1, int arg2, int[] arg3, int[] arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int[] arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long[] arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long[] arg1, int[] arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, TF_DISPLAYATTRIBUTE arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long arg1, long arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long arg1, long arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, int arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, long arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, long[] arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, PROPERTYKEY arg0, long arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, int[] arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, int[] arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long[] arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, char[] arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long arg1, POINT arg2, int arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int[] arg0, GUID arg1, long[] arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, POINT arg1, long arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, POINT arg0, int arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, int arg1, int arg2, int arg3, long[] arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, long arg1, int arg2, int arg3, long[] arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] arg0, long arg1, int arg2, int arg3, int arg4, long[] arg5);
+public static final native int VtblCall(int fnNumber, long ppVtbl, char[] uri, char[] method, long l, char[] headers, long[] request);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long[] arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, int arg1, long[] arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long arg1, long[] arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long arg1, int[] arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, int arg1, int[] arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, int arg1, long arg2, SIZE arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long arg1, GUID arg2, long arg3, long [] arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, GUID arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, GUID arg1, long arg2, long arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, GUID arg1, int arg2, int arg3, DISPPARAMS arg4, long arg5, EXCEPINFO arg6, int[] arg7);
+public static final native int VtblCall(int fnNumber, long ppVtbl, MSG arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, MSG arg1, long arg2, int arg3, long arg4, RECT arg5);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, SIZE arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, int arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, CAUUID arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, CONTROLINFO arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, FORMATETC arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, FORMATETC arg0, STGMEDIUM arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, GUID arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, GUID arg0, long[] arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, GUID arg0, GUID arg1, long[] arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, GUID arg0, long arg1, int arg2, int arg3, int[] arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, GUID arg0, int arg1, int arg2, long arg3, long arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, GUID arg0, int arg1, OLECMD arg2, long arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, GUID arg1, GUID arg2, GUID arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, LICINFO arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, RECT arg0, long arg1, int arg2);
+public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, RECT arg0, RECT arg1);
+public static final native int VtblCall(int fnNumber, long ppVtbl, RECT arg0);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long[] arg1, long[] arg2, int[] arg3, long[] arg4);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, long[] arg1, int arg2, int[] arg3);
+public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, int arg1, int arg2, DISPPARAMS arg3, long arg4, EXCEPINFO arg5, long arg6);
+public static final native int VtblCall(int fnNumber, long address, char[] arg0, char[] arg1, char[] arg2, char[] arg3, long[] arg4);
+public static final native int VtblCall(int fnNumber, long address, double arg0);
+
+/** @param arg0 flags=struct */
+public static final native int VtblCall(int fnNumber, long ppVtbl, RECT arg0, long arg1, long arg2);
+/** @param arg0 flags=struct */
+public static final native int VtblCall_put_Bounds(int fnNumber, long ppVtbl, RECT arg0);
/** Accessibility constants */
public static final int CHILDID_SELF = 0;
public static final int CO_E_OBJNOTCONNECTED = 0x800401FD;
-//public static final int ROLE_SYSTEM_TITLEBAR = 0x1;
public static final int ROLE_SYSTEM_MENUBAR = 0x2;
public static final int ROLE_SYSTEM_SCROLLBAR = 0x3;
-//public static final int ROLE_SYSTEM_GRIP = 0x4;
-//public static final int ROLE_SYSTEM_SOUND = 0x5;
-//public static final int ROLE_SYSTEM_CURSOR = 0x6;
-//public static final int ROLE_SYSTEM_CARET = 0x7;
public static final int ROLE_SYSTEM_ALERT = 0x8;
public static final int ROLE_SYSTEM_WINDOW = 0x9;
public static final int ROLE_SYSTEM_CLIENT = 0xa;
public static final int ROLE_SYSTEM_MENUPOPUP = 0xb;
public static final int ROLE_SYSTEM_MENUITEM = 0xc;
public static final int ROLE_SYSTEM_TOOLTIP = 0xd;
-//public static final int ROLE_SYSTEM_APPLICATION = 0xe;
public static final int ROLE_SYSTEM_DOCUMENT = 0xf;
-//public static final int ROLE_SYSTEM_PANE = 0x10;
-//public static final int ROLE_SYSTEM_CHART = 0x11;
public static final int ROLE_SYSTEM_DIALOG = 0x12;
-//public static final int ROLE_SYSTEM_BORDER = 0x13;
public static final int ROLE_SYSTEM_GROUPING = 0x14;
public static final int ROLE_SYSTEM_SEPARATOR = 0x15;
public static final int ROLE_SYSTEM_TOOLBAR = 0x16;
@@ -812,15 +608,11 @@ public static final int ROLE_SYSTEM_COLUMN = 0x1b;
public static final int ROLE_SYSTEM_ROW = 0x1c;
public static final int ROLE_SYSTEM_CELL = 0x1d;
public static final int ROLE_SYSTEM_LINK = 0x1e;
-//public static final int ROLE_SYSTEM_HELPBALLOON = 0x1f;
-//public static final int ROLE_SYSTEM_CHARACTER = 0x20;
public static final int ROLE_SYSTEM_LIST = 0x21;
public static final int ROLE_SYSTEM_LISTITEM = 0x22;
public static final int ROLE_SYSTEM_OUTLINE = 0x23;
public static final int ROLE_SYSTEM_OUTLINEITEM = 0x24;
public static final int ROLE_SYSTEM_PAGETAB = 0x25;
-//public static final int ROLE_SYSTEM_PROPERTYPAGE = 0x26;
-//public static final int ROLE_SYSTEM_INDICATOR = 0x27;
public static final int ROLE_SYSTEM_GRAPHIC = 0x28;
public static final int ROLE_SYSTEM_STATICTEXT = 0x29;
public static final int ROLE_SYSTEM_TEXT = 0x2a;
@@ -830,22 +622,12 @@ public static final int ROLE_SYSTEM_RADIOBUTTON = 0x2d;
public static final int ROLE_SYSTEM_COMBOBOX = 0x2e;
public static final int ROLE_SYSTEM_DROPLIST = 0x2f;
public static final int ROLE_SYSTEM_PROGRESSBAR = 0x30;
-//public static final int ROLE_SYSTEM_DIAL = 0x31;
-//public static final int ROLE_SYSTEM_HOTKEYFIELD = 0x32;
public static final int ROLE_SYSTEM_SLIDER = 0x33;
public static final int ROLE_SYSTEM_SPINBUTTON = 0x34;
-//public static final int ROLE_SYSTEM_DIAGRAM = 0x35;
public static final int ROLE_SYSTEM_ANIMATION = 0x36;
-//public static final int ROLE_SYSTEM_EQUATION = 0x37;
-//public static final int ROLE_SYSTEM_BUTTONDROPDOWN = 0x38;
-//public static final int ROLE_SYSTEM_BUTTONMENU = 0x39;
-//public static final int ROLE_SYSTEM_BUTTONDROPDOWNGRID = 0x3a;
-//public static final int ROLE_SYSTEM_WHITESPACE = 0x3b;
public static final int ROLE_SYSTEM_PAGETABLIST = 0x3c;
public static final int ROLE_SYSTEM_CLOCK = 0x3d;
public static final int ROLE_SYSTEM_SPLITBUTTON = 0x3e;
-//public static final int ROLE_SYSTEM_IPADDRESS = 0x3f;
-//public static final int ROLE_SYSTEM_OUTLINEBUTTON = 0x40;
public static final int STATE_SYSTEM_NORMAL = 0;
public static final int STATE_SYSTEM_UNAVAILABLE = 0x1;
@@ -856,187 +638,100 @@ public static final int STATE_SYSTEM_CHECKED = 0x10;
public static final int STATE_SYSTEM_MIXED = 0x20;
public static final int STATE_SYSTEM_READONLY = 0x40;
public static final int STATE_SYSTEM_HOTTRACKED = 0x80;
-//public static final int STATE_SYSTEM_DEFAULT = 0x100;
public static final int STATE_SYSTEM_EXPANDED = 0x200;
public static final int STATE_SYSTEM_COLLAPSED = 0x400;
public static final int STATE_SYSTEM_BUSY = 0x800;
-//public static final int STATE_SYSTEM_FLOATING = 0x1000;
-//public static final int STATE_SYSTEM_MARQUEED = 0x2000;
-//public static final int STATE_SYSTEM_ANIMATED = 0x4000;
public static final int STATE_SYSTEM_INVISIBLE = 0x8000;
public static final int STATE_SYSTEM_OFFSCREEN = 0x10000;
public static final int STATE_SYSTEM_SIZEABLE = 0x20000;
-//public static final int STATE_SYSTEM_MOVEABLE = 0x40000;
-//public static final int STATE_SYSTEM_SELFVOICING = 0x80000;
public static final int STATE_SYSTEM_FOCUSABLE = 0x100000;
public static final int STATE_SYSTEM_SELECTABLE = 0x200000;
public static final int STATE_SYSTEM_LINKED = 0x400000;
-//public static final int STATE_SYSTEM_TRAVERSED = 0x800000;
public static final int STATE_SYSTEM_MULTISELECTABLE = 0x1000000;
-//public static final int STATE_SYSTEM_EXTSELECTABLE = 0x2000000;
-//public static final int STATE_SYSTEM_ALERT_LOW = 0x4000000;
-//public static final int STATE_SYSTEM_ALERT_MEDIUM = 0x8000000;
-//public static final int STATE_SYSTEM_ALERT_HIGH = 0x10000000;
-//public static final int STATE_SYSTEM_PROTECTED = 0x20000000;
-//public static final int STATE_SYSTEM_VALID = 0x3fffffff;
-public static final int EVENT_OBJECT_SELECTIONWITHIN = 0x8009;
-public static final int EVENT_OBJECT_STATECHANGE = 0x800A;
-public static final int EVENT_OBJECT_LOCATIONCHANGE = 0x800B;
-public static final int EVENT_OBJECT_NAMECHANGE = 0x800C;
-public static final int EVENT_OBJECT_DESCRIPTIONCHANGE = 0x800D;
-public static final int EVENT_OBJECT_VALUECHANGE = 0x800E;
+public static final int EVENT_OBJECT_SELECTIONWITHIN = 0x8009;
+public static final int EVENT_OBJECT_STATECHANGE = 0x800A;
+public static final int EVENT_OBJECT_LOCATIONCHANGE = 0x800B;
+public static final int EVENT_OBJECT_NAMECHANGE = 0x800C;
+public static final int EVENT_OBJECT_DESCRIPTIONCHANGE = 0x800D;
+public static final int EVENT_OBJECT_VALUECHANGE = 0x800E;
public static final int EVENT_OBJECT_TEXTSELECTIONCHANGED = 0x8014;
/* IA2 additional constants */
public static final int IA2_COORDTYPE_SCREEN_RELATIVE = 0;
public static final int IA2_COORDTYPE_PARENT_RELATIVE = 1;
-public static final int IA2_STATE_ACTIVE = 0x00000001;
-public static final int IA2_STATE_SINGLE_LINE = 0x00002000;
-public static final int IA2_STATE_MULTI_LINE = 0x00000200;
-public static final int IA2_STATE_REQUIRED = 0x00000800;
-public static final int IA2_STATE_INVALID_ENTRY = 0x00000040;
-public static final int IA2_STATE_SUPPORTS_AUTOCOMPLETION = 0x00008000;
-public static final int IA2_STATE_EDITABLE = 0x00000008;
-
-public static final int IA2_EVENT_DOCUMENT_LOAD_COMPLETE = 0x00000105;
-public static final int IA2_EVENT_DOCUMENT_LOAD_STOPPED = 0x00000106;
-public static final int IA2_EVENT_DOCUMENT_RELOAD = 0x00000107;
-public static final int IA2_EVENT_PAGE_CHANGED = 0x00000111;
-public static final int IA2_EVENT_SECTION_CHANGED = 0x00000112;
-public static final int IA2_EVENT_ACTION_CHANGED = 0x00000101;
-public static final int IA2_EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0000010d;
-public static final int IA2_EVENT_HYPERLINK_END_INDEX_CHANGED = 0x00000108;
-public static final int IA2_EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED = 0x00000109;
+public static final int IA2_STATE_ACTIVE = 0x00000001;
+public static final int IA2_STATE_SINGLE_LINE = 0x00002000;
+public static final int IA2_STATE_MULTI_LINE = 0x00000200;
+public static final int IA2_STATE_REQUIRED = 0x00000800;
+public static final int IA2_STATE_INVALID_ENTRY = 0x00000040;
+public static final int IA2_STATE_SUPPORTS_AUTOCOMPLETION = 0x00008000;
+public static final int IA2_STATE_EDITABLE = 0x00000008;
+
+public static final int IA2_EVENT_DOCUMENT_LOAD_COMPLETE = 0x00000105;
+public static final int IA2_EVENT_DOCUMENT_LOAD_STOPPED = 0x00000106;
+public static final int IA2_EVENT_DOCUMENT_RELOAD = 0x00000107;
+public static final int IA2_EVENT_PAGE_CHANGED = 0x00000111;
+public static final int IA2_EVENT_SECTION_CHANGED = 0x00000112;
+public static final int IA2_EVENT_ACTION_CHANGED = 0x00000101;
+public static final int IA2_EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0000010d;
+public static final int IA2_EVENT_HYPERLINK_END_INDEX_CHANGED = 0x00000108;
+public static final int IA2_EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED = 0x00000109;
public static final int IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x0000010a;
-public static final int IA2_EVENT_HYPERLINK_ACTIVATED = 0x0000010b;
-public static final int IA2_EVENT_HYPERTEXT_LINK_SELECTED = 0x0000010c;
-public static final int IA2_EVENT_HYPERTEXT_LINK_COUNT_CHANGED = 0x0000010f;
-public static final int IA2_EVENT_ATTRIBUTE_CHANGED = 0x00000110;
-public static final int IA2_EVENT_TABLE_CAPTION_CHANGED = 0x00000113;
+public static final int IA2_EVENT_HYPERLINK_ACTIVATED = 0x0000010b;
+public static final int IA2_EVENT_HYPERTEXT_LINK_SELECTED = 0x0000010c;
+public static final int IA2_EVENT_HYPERTEXT_LINK_COUNT_CHANGED = 0x0000010f;
+public static final int IA2_EVENT_ATTRIBUTE_CHANGED = 0x00000110;
+public static final int IA2_EVENT_TABLE_CAPTION_CHANGED = 0x00000113;
public static final int IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x00000114;
-public static final int IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x00000115;
-public static final int IA2_EVENT_TABLE_CHANGED = 0x00000116;
-public static final int IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x00000117;
-public static final int IA2_EVENT_TABLE_ROW_HEADER_CHANGED = 0x00000118;
-public static final int IA2_EVENT_TABLE_SUMMARY_CHANGED = 0x00000119;
-public static final int IA2_EVENT_TEXT_ATTRIBUTE_CHANGED = 0x0000011a;
-public static final int IA2_EVENT_TEXT_CARET_MOVED = 0x0000011b;
-public static final int IA2_EVENT_TEXT_COLUMN_CHANGED = 0x0000011d;
-public static final int IA2_EVENT_TEXT_INSERTED = 0x0000011e;
-public static final int IA2_EVENT_TEXT_REMOVED = 0x0000011f;
-
-public static final int IA2_TEXT_BOUNDARY_CHAR = 0;
-public static final int IA2_TEXT_BOUNDARY_WORD = 1;
-public static final int IA2_TEXT_BOUNDARY_SENTENCE = 2;
-public static final int IA2_TEXT_BOUNDARY_PARAGRAPH = 3;
-public static final int IA2_TEXT_BOUNDARY_LINE = 4;
-public static final int IA2_TEXT_BOUNDARY_ALL = 5;
-
-public static final int IA2_TEXT_OFFSET_LENGTH = -1;
-public static final int IA2_TEXT_OFFSET_CARET = -2;
-
-public static final int IA2_SCROLL_TYPE_TOP_LEFT = 0;
-public static final int IA2_SCROLL_TYPE_BOTTOM_RIGHT = 1;
-public static final int IA2_SCROLL_TYPE_TOP_EDGE = 2;
-public static final int IA2_SCROLL_TYPE_BOTTOM_EDGE = 3;
-public static final int IA2_SCROLL_TYPE_LEFT_EDGE = 4;
-public static final int IA2_SCROLL_TYPE_RIGHT_EDGE = 5;
-public static final int IA2_SCROLL_TYPE_ANYWHERE = 6;
+public static final int IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x00000115;
+public static final int IA2_EVENT_TABLE_CHANGED = 0x00000116;
+public static final int IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x00000117;
+public static final int IA2_EVENT_TABLE_ROW_HEADER_CHANGED = 0x00000118;
+public static final int IA2_EVENT_TABLE_SUMMARY_CHANGED = 0x00000119;
+public static final int IA2_EVENT_TEXT_ATTRIBUTE_CHANGED = 0x0000011a;
+public static final int IA2_EVENT_TEXT_CARET_MOVED = 0x0000011b;
+public static final int IA2_EVENT_TEXT_COLUMN_CHANGED = 0x0000011d;
+public static final int IA2_EVENT_TEXT_INSERTED = 0x0000011e;
+public static final int IA2_EVENT_TEXT_REMOVED = 0x0000011f;
+
+public static final int IA2_TEXT_BOUNDARY_CHAR = 0;
+public static final int IA2_TEXT_BOUNDARY_WORD = 1;
+public static final int IA2_TEXT_BOUNDARY_SENTENCE = 2;
+public static final int IA2_TEXT_BOUNDARY_PARAGRAPH = 3;
+public static final int IA2_TEXT_BOUNDARY_LINE = 4;
+public static final int IA2_TEXT_BOUNDARY_ALL = 5;
+
+public static final int IA2_TEXT_OFFSET_LENGTH = -1;
+public static final int IA2_TEXT_OFFSET_CARET = -2;
+
+public static final int IA2_SCROLL_TYPE_TOP_LEFT = 0;
+public static final int IA2_SCROLL_TYPE_BOTTOM_RIGHT = 1;
+public static final int IA2_SCROLL_TYPE_TOP_EDGE = 2;
+public static final int IA2_SCROLL_TYPE_BOTTOM_EDGE = 3;
+public static final int IA2_SCROLL_TYPE_LEFT_EDGE = 4;
+public static final int IA2_SCROLL_TYPE_RIGHT_EDGE = 5;
+public static final int IA2_SCROLL_TYPE_ANYWHERE = 6;
/** Accessibility natives */
/**
- * @method flags=dynamic
- * @param hwnd cast=(HWND)
- * @param dwObjectID cast=(DWORD)
- * @param ppvObject cast=(LPVOID *)
- */
-public static final native int AccessibleObjectFromWindow (long /*int*/ hwnd, int dwObjectID, GUID riid, long /*int*/[] ppvObject);
-/**
- * @method flags=dynamic
* @param hwnd cast=(HWND)
+ * @param riidInterface flags=no_out
* @param ppvObject cast=(LPVOID *)
*/
-public static final native int CreateStdAccessibleObject (long /*int*/ hwnd, int idObject, GUID riidInterface, long /*int*/[] ppvObject);
+public static final native int CreateStdAccessibleObject (long hwnd, int idObject, GUID riidInterface, long[] ppvObject);
/**
- * @method flags=dynamic
+ * @param riid flags=no_out
* @param pAcc cast=(LPUNKNOWN)
*/
-public static final native long /*int*/ LresultFromObject (GUID riid, long /*int*/ wParam, long /*int*/ pAcc);
-/**
- * @method flags=dynamic
- * @param paccContainer cast=(IAccessible *)
- * @param iChildStart cast=(LONG)
- * @param cChildren cast=(LONG)
- * @param rgvarChildren cast=(VARIANT *)
- * @param pcObtained cast=(LONG *)
- */
-public static final native int AccessibleChildren(long /*int*/ paccContainer, int iChildStart, int cChildren, long /*int*/ rgvarChildren, int [] pcObtained);
-
-/*USED*/public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int arg2, int arg3);
-/*USED*/public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4);
-/*USED,NEW*/public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, int arg1, int arg2, int arg3, long arg4);
-/*USED*/public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, long /*int*/ arg5);
-/*USED,NEW*/public static final native int VtblCall(int fnNumber, long ppVtbl, long arg0, int arg1, int arg2, int arg3, int arg4, long /*int*/ arg5);
-/*USED*/public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, int arg4, int arg5, int arg6, int arg7);
-
-/** Custom accessibility natives */
-
-/** @method flags=no_gen */
-public static final native int VtblCall_VARIANT(int fnNumber, long /*int*/ ppVtbl, long /*int*/ arg0);
-/** @method flags=no_gen */
-public static final native int VtblCall_VARIANTP(int fnNumber, long /*int*/ ppVtbl, long /*int*/ arg0, long /*int*/ arg1);
-/** @method flags=no_gen */
-public static final native int VtblCall_IVARIANT(int fnNumber, long /*int*/ ppVtbl, int arg0, long /*int*/ arg1);
-/** @method flags=no_gen */
-public static final native int VtblCall_IVARIANTP(int fnNumber, long /*int*/ ppVtbl, int arg0, long /*int*/ arg1, long /*int*/ arg2);
-/** @method flags=no_gen */
-public static final native int VtblCall_PVARIANTP(int fnNumber, long /*int*/ ppVtbl, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2);
-/** @method flags=no_gen */
-public static final native int VtblCall_PPPPVARIANT(int fnNumber, long /*int*/ ppVtbl, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accChild_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accName_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accValue_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accDescription_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accRole_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accState_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accHelp_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accHelpTopic_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accKeyboardShortcut_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ get_accDefaultAction_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ accSelect_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ accLocation_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ accNavigate_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ accDoDefaultAction_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ put_accName_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ put_accValue_CALLBACK(long /*int*/ func);
-/** @method flags=no_gen,callback_types=HRESULT;VARIANT;,callback_flags=none;struct; */
-public static final native long /*int*/ CALLBACK_setCurrentValue(long /*int*/ func);
+public static final native long LresultFromObject (GUID riid, long wParam, long pAcc);
/* sizeof's */
public static final native int CAUUID_sizeof();
public static final native int CONTROLINFO_sizeof();
-public static final native int COSERVERINFO_sizeof();
public static final native int DISPPARAMS_sizeof();
-public static final native int DVTARGETDEVICE_sizeof();
public static final native int ELEMDESC_sizeof();
public static final native int EXCEPINFO_sizeof();
public static final native int FORMATETC_sizeof();
@@ -1045,10 +740,10 @@ public static final native int GUID_sizeof();
public static final native int LICINFO_sizeof();
public static final native int OLECMD_sizeof();
public static final native int OLEINPLACEFRAMEINFO_sizeof();
-public static final native int STATSTG_sizeof();
public static final native int STGMEDIUM_sizeof();
public static final native int TYPEATTR_sizeof();
public static final native int TYPEDESC_sizeof();
public static final native int VARDESC_sizeof();
public static final native int VARIANT_sizeof();
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CONTROLINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CONTROLINFO.java
index 447e96b8d8..3e9db86972 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CONTROLINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/CONTROLINFO.java
@@ -16,7 +16,7 @@ package org.eclipse.swt.internal.ole.win32;
public final class CONTROLINFO {
public int cb;
/** @field cast=(HACCEL) */
- public long /*int*/ hAccel;
+ public long hAccel;
public short cAccel;
public int dwFlags;
public static final int sizeof = COM.CONTROLINFO_sizeof ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DISPPARAMS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DISPPARAMS.java
index f7e70c7068..6d4dd054bb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DISPPARAMS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DISPPARAMS.java
@@ -15,9 +15,9 @@ package org.eclipse.swt.internal.ole.win32;
public final class DISPPARAMS {
/** @field cast=(VARIANTARG FAR *) */
- public long /*int*/ rgvarg;
+ public long rgvarg;
/** @field cast=(DISPID FAR *) */
- public long /*int*/ rgdispidNamedArgs;
+ public long rgdispidNamedArgs;
public int cArgs;
public int cNamedArgs;
public static final int sizeof = COM.DISPPARAMS_sizeof ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DVTARGETDEVICE.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DVTARGETDEVICE.java
deleted file mode 100644
index b5b2a31526..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/DVTARGETDEVICE.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.ole.win32;
-
-public final class DVTARGETDEVICE {
- public int tdSize;
- public short tdDriverNameOffset;
- public short tdDeviceNameOffset;
- public short tdPortNameOffset;
- public short tdExtDevmodeOffset;
- public byte[] tdData = new byte[1];
- public static final int sizeof = COM.DVTARGETDEVICE_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/EXCEPINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/EXCEPINFO.java
index dade6b3384..0a48daa0f4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/EXCEPINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/EXCEPINFO.java
@@ -17,16 +17,16 @@ public final class EXCEPINFO {
public short wCode;
public short wReserved;
/** @field cast=(BSTR) */
- public long /*int*/ bstrSource;
+ public long bstrSource;
/** @field cast=(BSTR) */
- public long /*int*/ bstrDescription;
+ public long bstrDescription;
/** @field cast=(BSTR) */
- public long /*int*/ bstrHelpFile;
+ public long bstrHelpFile;
public int dwHelpContext;
/** @field cast=(void FAR *) */
- public long /*int*/ pvReserved;
+ public long pvReserved;
/** @field cast=(HRESULT (STDAPICALLTYPE FAR* )(struct tagEXCEPINFO FAR*)) */
- public long /*int*/ pfnDeferredFillIn;
+ public long pfnDeferredFillIn;
public int scode;
public static final int sizeof = COM.EXCEPINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FORMATETC.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FORMATETC.java
index 1ac26025ee..4796c7f65c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FORMATETC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FORMATETC.java
@@ -17,7 +17,7 @@ public final class FORMATETC {
/** @field cast=(CLIPFORMAT) */
public int cfFormat;
/** @field cast=(DVTARGETDEVICE *) */
- public long /*int*/ ptd;
+ public long ptd;
public int dwAspect;
public int lindex;
public int tymed;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FUNCDESC.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FUNCDESC.java
index 63bbf90da2..3cd2aecbd7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FUNCDESC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/FUNCDESC.java
@@ -17,9 +17,9 @@ public class FUNCDESC {
/** @field cast=(MEMBERID) */
public int memid;
/** @field cast=(SCODE FAR *) */
- public long /*int*/ lprgscode;
+ public long lprgscode;
/** @field cast=(ELEMDESC FAR *) */
- public long /*int*/ lprgelemdescParam;
+ public long lprgelemdescParam;
/** @field cast=(FUNCKIND) */
public int funckind;
/** @field cast=(INVOKEKIND) */
@@ -33,12 +33,12 @@ public class FUNCDESC {
// ELEMDESC elemdescFunc;
// TYPEDESC elemdescFunc.tdesc
/** @field accessor=elemdescFunc.tdesc.lptdesc,cast=(struct FARSTRUCT tagTYPEDESC FAR* ) */
- public long /*int*/ elemdescFunc_tdesc_union;
+ public long elemdescFunc_tdesc_union;
/** @field accessor=elemdescFunc.tdesc.vt */
public short elemdescFunc_tdesc_vt;
// PARAMDESC elemdescFunc.paramdesc
/** @field accessor=elemdescFunc.paramdesc.pparamdescex,cast=(LPPARAMDESCEX) */
- public long /*int*/ elemdescFunc_paramdesc_pparamdescex;
+ public long elemdescFunc_paramdesc_pparamdescex;
/** @field accessor=elemdescFunc.paramdesc.wParamFlags */
public short elemdescFunc_paramdesc_wParamFlags;
public short wFuncFlags;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java
index 293692e149..ee1a6b8715 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java
@@ -34,10 +34,10 @@ static String toHex (int v, int length) {
@Override
public String toString () {
return '{' + toHex (Data1, 8) + '-' +
- toHex (Data2, 4) + '-' +
- toHex (Data3, 4) + '-' +
- toHex (Data4[0], 2) + toHex (Data4[1], 2) + '-' +
- toHex (Data4[2], 2) + toHex (Data4[3], 2) + toHex (Data4[4], 2) + toHex (Data4[5], 2) + toHex (Data4[6], 2) + toHex (Data4[7], 2) + '}';
+ toHex (Data2, 4) + '-' +
+ toHex (Data3, 4) + '-' +
+ toHex (Data4[0], 2) + toHex (Data4[1], 2) + '-' +
+ toHex (Data4[2], 2) + toHex (Data4[3], 2) + toHex (Data4[4], 2) + toHex (Data4[5], 2) + toHex (Data4[6], 2) + toHex (Data4[7], 2) + '}';
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java
index 31a465aa6d..7bb82c31f4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IAccessible.java
@@ -13,75 +13,73 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IAccessible extends IDispatch {
-public IAccessible(long /*int*/ address) {
+public IAccessible(long address) {
super(address);
}
-public int get_accParent(long /*int*/ ppdispParent) {
- return OS.VtblCall(7, address, ppdispParent);
+public int get_accParent(long ppdispParent) {
+ return COM.VtblCall(7, address, ppdispParent);
}
-public int get_accChildCount(long /*int*/ pcountChildren) {
- return OS.VtblCall(8, address, pcountChildren);
+public int get_accChildCount(long pcountChildren) {
+ return COM.VtblCall(8, address, pcountChildren);
}
-public int get_accChild(long /*int*/ variant, long /*int*/ ppdispChild) {
- return COM.VtblCall_VARIANTP(9, address, variant, ppdispChild);
+public int get_accChild(long variant, long ppdispChild) {
+ return COM.VtblCall(9, address, variant, ppdispChild);
}
-public int get_accName(long /*int*/ variant, long /*int*/ pszName) {
- return COM.VtblCall_VARIANTP(10, address, variant, pszName);
+public int get_accName(long variant, long pszName) {
+ return COM.VtblCall(10, address, variant, pszName);
}
-public int get_accValue(long /*int*/ variant, long /*int*/ pszValue) {
- return COM.VtblCall_VARIANTP(11, address, variant, pszValue);
+public int get_accValue(long variant, long pszValue) {
+ return COM.VtblCall(11, address, variant, pszValue);
}
-public int get_accDescription(long /*int*/ variant, long /*int*/ pszDescription) {
- return COM.VtblCall_VARIANTP(12, address, variant, pszDescription);
+public int get_accDescription(long variant, long pszDescription) {
+ return COM.VtblCall(12, address, variant, pszDescription);
}
-public int get_accRole(long /*int*/ variant, long /*int*/ pvarRole) {
- return COM.VtblCall_VARIANTP(13, address, variant, pvarRole);
+public int get_accRole(long variant, long pvarRole) {
+ return COM.VtblCall(13, address, variant, pvarRole);
}
-public int get_accState(long /*int*/ variant, long /*int*/ pvarState) {
- return COM.VtblCall_VARIANTP(14, address, variant, pvarState);
+public int get_accState(long variant, long pvarState) {
+ return COM.VtblCall(14, address, variant, pvarState);
}
-public int get_accHelp(long /*int*/ variant, long /*int*/ pszHelp) {
- return COM.VtblCall_VARIANTP(15, address, variant, pszHelp);
+public int get_accHelp(long variant, long pszHelp) {
+ return COM.VtblCall(15, address, variant, pszHelp);
}
-public int get_accHelpTopic(long /*int*/ pszHelpFile, long /*int*/ variant, long /*int*/ pidTopic) {
- return COM.VtblCall_PVARIANTP(16, address, pszHelpFile, variant, pidTopic);
+public int get_accHelpTopic(long pszHelpFile, long variant, long pidTopic) {
+ return COM.VtblCall(16, address, pszHelpFile, variant, pidTopic);
}
-public int get_accKeyboardShortcut(long /*int*/ variant, long /*int*/ pszKeyboardShortcut) {
- return COM.VtblCall_VARIANTP(17, address, variant, pszKeyboardShortcut);
+public int get_accKeyboardShortcut(long variant, long pszKeyboardShortcut) {
+ return COM.VtblCall(17, address, variant, pszKeyboardShortcut);
}
-public int get_accFocus(long /*int*/ pvarChild) {
- return OS.VtblCall(18, address, pvarChild);
+public int get_accFocus(long pvarChild) {
+ return COM.VtblCall(18, address, pvarChild);
}
-public int get_accSelection(long /*int*/ pvarChildren) {
- return OS.VtblCall(19, address, pvarChildren);
+public int get_accSelection(long pvarChildren) {
+ return COM.VtblCall(19, address, pvarChildren);
}
-public int get_accDefaultAction(long /*int*/ variant, long /*int*/ pszDefaultAction) {
- return COM.VtblCall_VARIANTP(20, address, variant, pszDefaultAction);
+public int get_accDefaultAction(long variant, long pszDefaultAction) {
+ return COM.VtblCall(20, address, variant, pszDefaultAction);
}
-public int accSelect(int flagsSelect, long /*int*/ variant) {
- return COM.VtblCall_IVARIANT(21, address, flagsSelect, variant);
+public int accSelect(int flagsSelect, long variant) {
+ return COM.VtblCall(21, address, flagsSelect, variant);
}
-public int accLocation(long /*int*/ pxLeft, long /*int*/ pyTop, long /*int*/ pcxWidth, long /*int*/ pcyHeight, long /*int*/ variant) {
- return COM.VtblCall_PPPPVARIANT(22, address, pxLeft, pyTop, pcxWidth, pcyHeight, variant);
+public int accLocation(long pxLeft, long pyTop, long pcxWidth, long pcyHeight, long variant) {
+ return COM.VtblCall(22, address, pxLeft, pyTop, pcxWidth, pcyHeight, variant);
}
-public int accNavigate(int navDir, long /*int*/ variant, long /*int*/ pvarEndUpAt) {
- return COM.VtblCall_IVARIANTP(23, address, navDir, variant, pvarEndUpAt);
+public int accNavigate(int navDir, long variant, long pvarEndUpAt) {
+ return COM.VtblCall(23, address, navDir, variant, pvarEndUpAt);
}
-public int accHitTest(int xLeft, int yTop, long /*int*/ pvarChild) {
+public int accHitTest(int xLeft, int yTop, long pvarChild) {
return COM.VtblCall(24, address, xLeft, yTop, pvarChild);
}
-public int accDoDefaultAction(long /*int*/ variant) {
- return COM.VtblCall_VARIANT(25, address, variant);
+public int accDoDefaultAction(long variant) {
+ return COM.VtblCall(25, address, variant);
}
-public int put_accName(long /*int*/ variant, long /*int*/ szName) {
- return COM.VtblCall_VARIANTP(26, address, variant, szName);
+public int put_accName(long variant, long szName) {
+ return COM.VtblCall(26, address, variant, szName);
}
-public int put_accValue(long /*int*/ variant, long /*int*/ szValue) {
- return COM.VtblCall_VARIANTP(27, address, variant, szValue);
+public int put_accValue(long variant, long szValue) {
+ return COM.VtblCall(27, address, variant, szValue);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java
index 78dc614e93..4a98133d94 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IClassFactory2.java
@@ -13,20 +13,18 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IClassFactory2 extends IUnknown
{
-public IClassFactory2(long /*int*/ address) {
+public IClassFactory2(long address) {
super(address);
}
-public int CreateInstanceLic(long /*int*/ pUnkOuter, long /*int*/ pUnkReserved, GUID riid, long /*int*/ bstrKey, long /*int*/ ppvObject[]) {
+public int CreateInstanceLic(long pUnkOuter, long pUnkReserved, GUID riid, long bstrKey, long ppvObject[]) {
return COM.VtblCall(7, address, pUnkOuter, pUnkReserved, riid, bstrKey, ppvObject);
}
public int GetLicInfo(LICINFO licInfo) {
return COM.VtblCall(5, address, licInfo);
}
-public int RequestLicKey(int dwReserved, long /*int*/[] pBstrKey) {
- return OS.VtblCall(6, address, dwReserved, pBstrKey);
+public int RequestLicKey(int dwReserved, long[] pBstrKey) {
+ return COM.VtblCall(6, address, dwReserved, pBstrKey);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java
index 1fd82c5a40..2ccfb8e485 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPoint.java
@@ -13,17 +13,15 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IConnectionPoint extends IUnknown
{
-public IConnectionPoint(long /*int*/ address) {
+public IConnectionPoint(long address) {
super(address);
}
-public int Advise(long /*int*/ pUnk, int[] pdwCookie) {
- return OS.VtblCall(5, address, pUnk, pdwCookie);
+public int Advise(long pUnk, int[] pdwCookie) {
+ return COM.VtblCall(5, address, pUnk, pdwCookie);
}
public int Unadvise(int dwCookie) {
- return OS.VtblCall(6, address, dwCookie);
+ return COM.VtblCall(6, address, dwCookie);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPointContainer.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPointContainer.java
index 8880b387ef..66eb77124d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPointContainer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IConnectionPointContainer.java
@@ -15,10 +15,10 @@ package org.eclipse.swt.internal.ole.win32;
public class IConnectionPointContainer extends IUnknown
{
-public IConnectionPointContainer(long /*int*/ address) {
+public IConnectionPointContainer(long address) {
super(address);
}
-public int FindConnectionPoint(GUID riid, long /*int*/[] ppCP) {
+public int FindConnectionPoint(GUID riid, long[] ppCP) {
return COM.VtblCall(4, address, riid, ppCP);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2.java
new file mode 100644
index 0000000000..77b3c8e5f5
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2 extends IUnknown {
+
+public ICoreWebView2(long address) {
+ super(address);
+}
+
+public int get_Settings(long[] settings) {
+ return COM.VtblCall(3, address, settings);
+}
+
+public int get_Source(long[] uri) {
+ return COM.VtblCall(4, address, uri);
+}
+
+public int Navigate(char[] uri) {
+ return COM.VtblCall(5, address, uri);
+}
+
+public int NavigateToString(char[] htmlContent) {
+ return COM.VtblCall(6, address, htmlContent);
+}
+
+public int add_NavigationStarting(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(7, address, eventHandler.address, token);
+}
+
+public int add_ContentLoading(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(9, address, eventHandler.address, token);
+}
+
+public int add_SourceChanged(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(11, address, eventHandler.address, token);
+}
+
+public int add_HistoryChanged(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(13, address, eventHandler.address, token);
+}
+
+public int add_NavigationCompleted(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(15, address, eventHandler.address, token);
+}
+
+public int add_FrameNavigationStarting(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(17, address, eventHandler.address, token);
+}
+
+public int add_FrameNavigationCompleted(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(19, address, eventHandler.address, token);
+}
+
+public int AddScriptToExecuteOnDocumentCreated(char[] javaScript, long handler) {
+ return COM.VtblCall(27, address, javaScript, handler);
+}
+
+public int ExecuteScript(char[] javaScript, IUnknown handler) {
+ return COM.VtblCall(29, address, javaScript, handler.address);
+}
+
+public int Reload() {
+ return COM.VtblCall(31, address);
+}
+
+public int PostWebMessageAsJson(char[] webMessageAsJson) {
+ return COM.VtblCall(32, address, webMessageAsJson);
+}
+
+public int add_WebMessageReceived(long handler, long[] token) {
+ return COM.VtblCall(34, address, handler, token);
+}
+
+public int get_CanGoBack(int[] canGoBack) {
+ return COM.VtblCall(38, address, canGoBack);
+}
+
+public int get_CanGoForward(int[] canGoForward) {
+ return COM.VtblCall(39, address, canGoForward);
+}
+
+public int GoBack() {
+ return COM.VtblCall(40, address);
+}
+
+public int GoForward() {
+ return COM.VtblCall(41, address);
+}
+
+public int Stop() {
+ return COM.VtblCall(43, address);
+}
+
+public int add_NewWindowRequested(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(44, address, eventHandler.address, token);
+}
+
+public int add_DocumentTitleChanged(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(46, address, eventHandler.address, token);
+}
+
+public int get_DocumentTitle(long[] title) {
+ return COM.VtblCall(48, address, title);
+}
+
+public int AddHostObjectToScript(char[] name, long[] object) {
+ return COM.VtblCall(49, address, name, object);
+}
+
+public int add_ContainsFullScreenElementChanged(long eventHandler, long[] token) {
+ return COM.VtblCall(52, address, eventHandler, token);
+}
+
+public int get_ContainsFullScreenElement(int[] containsFullScreenElement) {
+ return COM.VtblCall(54, address, containsFullScreenElement);
+}
+
+public int add_WindowCloseRequested(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(59, address, eventHandler.address, token);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Controller.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Controller.java
new file mode 100644
index 0000000000..18156ea9df
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Controller.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+import org.eclipse.swt.internal.win32.*;
+
+public class ICoreWebView2Controller extends IUnknown {
+
+public ICoreWebView2Controller(long address) {
+ super(address);
+}
+
+public int put_IsVisible(boolean isVisible) {
+ return COM.VtblCall(4, address, isVisible ? 1 : 0);
+}
+
+public int put_Bounds(RECT bounds) {
+ return COM.VtblCall_put_Bounds(6, address, bounds);
+}
+
+public int MoveFocus(int reason) {
+ return COM.VtblCall(12, address, reason);
+}
+
+public int add_MoveFocusRequested(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(13, address, eventHandler.address, token);
+}
+
+public int add_GotFocus(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(15, address, eventHandler.address, token);
+}
+
+public int add_LostFocus(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(17, address, eventHandler.address, token);
+}
+
+public int add_AcceleratorKeyPressed(IUnknown eventHandler, long[] token) {
+ return COM.VtblCall(19, address, eventHandler.address, token);
+}
+
+public int NotifyParentWindowPositionChanged() {
+ return COM.VtblCall(23, address);
+}
+
+public int Close() {
+ return COM.VtblCall(24, address);
+}
+
+public int get_CoreWebView2(long[] coreWebView2) {
+ return COM.VtblCall(25, address, coreWebView2);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Cookie.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Cookie.java
new file mode 100644
index 0000000000..26536a0bad
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Cookie.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2Cookie extends IUnknown {
+
+public ICoreWebView2Cookie(long address) {
+ super(address);
+}
+
+public int get_Name(long[] name) {
+ return COM.VtblCall(3, address, name);
+}
+
+public int get_Value(long[] value) {
+ return COM.VtblCall(4, address, value);
+}
+
+public int put_Value(char[] value) {
+ return COM.VtblCall(5, address, value);
+}
+
+public int put_Expires(double expires) {
+ return COM.VtblCall(9, address, expires);
+}
+
+public int put_IsHttpOnly(boolean isHttpOnly) {
+ return COM.VtblCall(11, address, isHttpOnly ? 1 : 0);
+}
+
+public int put_IsSecure(boolean isSecure) {
+ return COM.VtblCall(15, address, isSecure ? 1 : 0);
+}
+
+public int get_IsSession(int[] isSession) {
+ return COM.VtblCall(16, address, isSession);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieList.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieList.java
new file mode 100644
index 0000000000..cc96768f29
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieList.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2CookieList extends IUnknown {
+
+public ICoreWebView2CookieList(long address) {
+ super(address);
+}
+
+public int get_Count(int[] count) {
+ return COM.VtblCall(3, address, count);
+}
+
+public int GetValueAtIndex(int index, long[] cookie) {
+ return COM.VtblCall(4, address, index, cookie);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieManager.java
new file mode 100644
index 0000000000..b37e2ab753
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2CookieManager.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2CookieManager extends IUnknown {
+
+public ICoreWebView2CookieManager(long address) {
+ super(address);
+}
+
+public int CreateCookie(char[] name, char[] value, char[] domain, char[] path, long[] cookie) {
+ return COM.VtblCall(3, address, name, value, domain, path, cookie);
+}
+
+public int GetCookies(char[] uri, IUnknown handler) {
+ return COM.VtblCall(5, address, uri, handler.getAddress());
+}
+
+public int AddOrUpdateCookie(ICoreWebView2Cookie cookie) {
+ return COM.VtblCall(6, address, cookie.getAddress());
+}
+
+public int DeleteCookie(ICoreWebView2Cookie cookie) {
+ return COM.VtblCall(7, address, cookie.getAddress());
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2DOMContentLoadedEventArgs.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2DOMContentLoadedEventArgs.java
new file mode 100644
index 0000000000..92a212abcc
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2DOMContentLoadedEventArgs.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2DOMContentLoadedEventArgs extends IUnknown {
+
+public ICoreWebView2DOMContentLoadedEventArgs(long address) {
+ super(address);
+}
+
+public int get_NavigationId(long[] navigationId) {
+ return COM.VtblCall(3, address, navigationId);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLECMDTEXT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Deferral.java
index fb0dc4d4ee..736f452b74 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLECMDTEXT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Deferral.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2020 Nikita Nemkin and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,13 +9,18 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-public class OLECMDTEXT {
- public int cmdtextf;
- public int cwActual;
- public int cwBuf;
- public short[] rgwz = new short[1];
+public class ICoreWebView2Deferral extends IUnknown {
+
+public ICoreWebView2Deferral(long address) {
+ super(address);
+}
+
+public int Complete() {
+ return COM.VtblCall(3, address);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment.java
new file mode 100644
index 0000000000..38ebab58dc
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2Environment extends IUnknown {
+
+public ICoreWebView2Environment(long address) {
+ super(address);
+}
+
+public int CreateCoreWebView2Controller(long parentWindow, IUnknown handler) {
+ return COM.VtblCall(3, address, parentWindow, handler.address);
+}
+
+public int get_BrowserVersionString(long[] versionInfo) {
+ return COM.VtblCall(5, address, versionInfo);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment2.java
new file mode 100644
index 0000000000..a780f9ed62
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Environment2.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2Environment2 extends ICoreWebView2Environment {
+
+public ICoreWebView2Environment2(long address) {
+ super(address);
+}
+
+public int CreateWebResourceRequest(char[] uri, char[] method, IStream postData, char[] headers, long[] request) {
+ return COM.VtblCall(8, address, uri, method, (postData != null) ? postData.address : 0, headers, request);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2EnvironmentOptions.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2EnvironmentOptions.java
new file mode 100644
index 0000000000..0ccda75c78
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2EnvironmentOptions.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2EnvironmentOptions extends IUnknown {
+
+public ICoreWebView2EnvironmentOptions(long address) {
+ super(address);
+}
+
+public int put_AdditionalBrowserArguments(char[] value) {
+ return COM.VtblCall(4, address, value);
+}
+
+public int put_Language(char[] value) {
+ return COM.VtblCall(6, address, value);
+}
+
+public int put_TargetCompatibleBrowserVersion(char[] value) {
+ return COM.VtblCall(8, address, value);
+}
+
+public int put_AllowSingleSignOnUsingOSPrimaryAccount(int[] allow) {
+ return COM.VtblCall(10, address, allow);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2MoveFocusRequestedEventArgs.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2MoveFocusRequestedEventArgs.java
new file mode 100644
index 0000000000..256d67ba3a
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2MoveFocusRequestedEventArgs.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2MoveFocusRequestedEventArgs extends IUnknown {
+
+public ICoreWebView2MoveFocusRequestedEventArgs(long address) {
+ super(address);
+}
+
+public int get_Reason(int[] value) {
+ return COM.VtblCall(3, address, value);
+}
+
+public int put_Handled(boolean value) {
+ return COM.VtblCall(5, address, value ? 1 : 0);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationCompletedEventArgs.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationCompletedEventArgs.java
new file mode 100644
index 0000000000..9f1dc7a244
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationCompletedEventArgs.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2NavigationCompletedEventArgs extends IUnknown {
+
+public ICoreWebView2NavigationCompletedEventArgs(long address) {
+ super(address);
+}
+
+public int get_IsSuccess(int[] isSuccess) {
+ return COM.VtblCall(3, address, isSuccess);
+}
+
+public int get_WebErrorStatus(int[] status) {
+ return COM.VtblCall(4, address, status);
+}
+
+public int get_NavigationId(long[] navigationId) {
+ return COM.VtblCall(5, address, navigationId);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationStartingEventArgs.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationStartingEventArgs.java
new file mode 100644
index 0000000000..78242d2848
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NavigationStartingEventArgs.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2NavigationStartingEventArgs extends IUnknown {
+
+public ICoreWebView2NavigationStartingEventArgs(long address) {
+ super(address);
+}
+
+public int get_Uri(long[] uri) {
+ return COM.VtblCall(3, address, uri);
+}
+
+public int get_IsUserInitiated(int[] isUserInitiated) {
+ return COM.VtblCall(4, address, isUserInitiated);
+}
+
+public int get_IsRedirected(int[] isRedirected) {
+ return COM.VtblCall(5, address, isRedirected);
+}
+
+public int get_RequestHeaders(long[] requestHeaders) {
+ return COM.VtblCall(6, address, requestHeaders);
+}
+
+public int get_Cancel(int[] cancel) {
+ return COM.VtblCall(7, address, cancel);
+}
+
+public int put_Cancel(boolean cancel) {
+ return COM.VtblCall(8, address, cancel ? 1 : 0);
+}
+
+public int get_NavigationId(long[] navigationId) {
+ return COM.VtblCall(9, address, navigationId);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NewWindowRequestedEventArgs.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NewWindowRequestedEventArgs.java
new file mode 100644
index 0000000000..2ab5c8a615
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2NewWindowRequestedEventArgs.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2NewWindowRequestedEventArgs extends IUnknown {
+
+public ICoreWebView2NewWindowRequestedEventArgs(long address) {
+ super(address);
+}
+
+public int get_Uri(long[] uri) {
+ return COM.VtblCall(3, address, uri);
+}
+
+public int put_NewWindow(long newWindow) {
+ return COM.VtblCall(4, address, newWindow);
+}
+
+public int get_NewWindow(long[] newWindow) {
+ return COM.VtblCall(5, address, newWindow);
+}
+
+public int put_Handled(boolean handled) {
+ return COM.VtblCall(6, address, handled ? 1 : 0);
+}
+
+public int get_Handled(int[] handled) {
+ return COM.VtblCall(7, address, handled);
+}
+
+public int get_IsUserInitiated(int[] isUserInitiated) {
+ return COM.VtblCall(8, address, isUserInitiated);
+}
+
+public int GetDeferral(long[] deferral) {
+ return COM.VtblCall(9, address, deferral);
+}
+
+public int get_WindowFeatures(long[] value) {
+ return COM.VtblCall(10, address, value);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Settings.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Settings.java
new file mode 100644
index 0000000000..04788ca3ac
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2Settings.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2Settings extends IUnknown {
+
+public ICoreWebView2Settings(long address) {
+ super(address);
+}
+
+public int get_IsScriptEnabled(int[] isScriptEnabled) {
+ return COM.VtblCall(3, address, isScriptEnabled);
+}
+
+public int put_IsScriptEnabled(boolean isScriptEnabled) {
+ return COM.VtblCall(4, address, isScriptEnabled ? 1 : 0);
+}
+
+public int get_IsWebMessageEnabled(int[] isWebMessageEnabled) {
+ return COM.VtblCall(5, address, isWebMessageEnabled);
+}
+
+public int put_IsWebMessageEnabled(boolean isWebMessageEnabled) {
+ return COM.VtblCall(6, address, isWebMessageEnabled ? 1 : 0);
+}
+
+public int get_AreDefaultScriptDialogsEnabled(int[] areDefaultScriptDialogsEnabled) {
+ return COM.VtblCall(7, address, areDefaultScriptDialogsEnabled);
+}
+
+public int put_AreDefaultScriptDialogsEnabled(boolean areDefaultScriptDialogsEnabled) {
+ return COM.VtblCall(8, address, areDefaultScriptDialogsEnabled ? 1 : 0);
+}
+
+public int get_IsStatusBarEnabled(int[] isStatusBarEnabled) {
+ return COM.VtblCall(9, address, isStatusBarEnabled);
+}
+
+public int put_IsStatusBarEnabled(boolean isStatusBarEnabled) {
+ return COM.VtblCall(10, address, isStatusBarEnabled ? 1 : 0);
+}
+
+public int get_AreDevToolsEnabled(int[] areDevToolsEnabled) {
+ return COM.VtblCall(11, address, areDevToolsEnabled);
+}
+
+public int put_AreDevToolsEnabled(boolean areDevToolsEnabled) {
+ return COM.VtblCall(12, address, areDevToolsEnabled ? 1 : 0);
+}
+
+public int get_AreDefaultContextMenusEnabled(int[] enabled) {
+ return COM.VtblCall(13, address, enabled);
+}
+
+public int put_AreDefaultContextMenusEnabled(boolean enabled) {
+ return COM.VtblCall(14, address, enabled ? 1 : 0);
+}
+
+public int get_AreHostObjectsAllowed(int[] allowed) {
+ return COM.VtblCall(15, address, allowed);
+}
+
+public int put_AreHostObjectsAllowed(boolean allowed) {
+ return COM.VtblCall(16, address, allowed ? 1 : 0);
+}
+
+public int get_IsZoomControlEnabled(int[] enabled) {
+ return COM.VtblCall(17, address, enabled);
+}
+
+public int put_IsZoomControlEnabled(boolean enabled) {
+ return COM.VtblCall(18, address, enabled ? 1 : 0);
+}
+
+public int get_IsBuiltInErrorPageEnabled(int[] enabled) {
+ return COM.VtblCall(19, address, enabled);
+}
+
+public int put_IsBuiltInErrorPageEnabled(boolean enabled) {
+ return COM.VtblCall(20, address, enabled ? 1 : 0);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SourceChangedEventArgs.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SourceChangedEventArgs.java
new file mode 100644
index 0000000000..e2de93b16d
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SourceChangedEventArgs.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2SourceChangedEventArgs extends IUnknown {
+
+public ICoreWebView2SourceChangedEventArgs(long address) {
+ super(address);
+}
+
+public int get_IsNewDocument(int[] isNewDocument) {
+ return COM.VtblCall(3, address, isNewDocument);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IMoniker.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SwtCallback.java
index fe5d2c8dd9..3e1c1f471e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IMoniker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SwtCallback.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2020 Nikita Nemkin and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,13 +9,10 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-public class IMoniker extends IPersist
-{
-public IMoniker(long /*int*/ address) {
- super(address);
-}
+public interface ICoreWebView2SwtCallback {
+ int Invoke(long arg0, long arg1);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumSTATSTG.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SwtHost.java
index a333bdd9f4..bd041bcd16 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumSTATSTG.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2SwtHost.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2020 Nikita Nemkin and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,12 +9,10 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-public class IEnumSTATSTG extends IEnum {
-public IEnumSTATSTG(long /*int*/ address) {
- super(address);
-}
+public interface ICoreWebView2SwtHost {
+ long CallJava(int index, long bstrToken, long bstrArgsJson);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WebMessageReceivedEventArgs.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WebMessageReceivedEventArgs.java
new file mode 100644
index 0000000000..1af6fc1880
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WebMessageReceivedEventArgs.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2WebMessageReceivedEventArgs extends IUnknown {
+
+public ICoreWebView2WebMessageReceivedEventArgs(long address) {
+ super(address);
+}
+
+public int get_Source(long[] source) {
+ return COM.VtblCall(3, address, source);
+}
+
+public int get_WebMessageAsJson(long[] webMessageAsJson) {
+ return COM.VtblCall(4, address, webMessageAsJson);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WindowFeatures.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WindowFeatures.java
new file mode 100644
index 0000000000..d8b1bb1239
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2WindowFeatures.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2WindowFeatures extends IUnknown {
+
+ public ICoreWebView2WindowFeatures(long address) {
+ super(address);
+ }
+
+ public int get_HasPosition(int[] value) {
+ return COM.VtblCall(3, address, value);
+ }
+
+ public int get_HasSize(int[] value) {
+ return COM.VtblCall(4, address, value);
+ }
+
+ public int get_Left(int[] value) {
+ return COM.VtblCall(5, address, value);
+ }
+
+ public int get_Top(int[] value) {
+ return COM.VtblCall(6, address, value);
+ }
+
+ public int get_Height(int[] value) {
+ return COM.VtblCall(7, address, value);
+ }
+
+ public int get_Width(int[] value) {
+ return COM.VtblCall(8, address, value);
+ }
+
+ public int get_ShouldDisplayMenuBar(int[] value) {
+ return COM.VtblCall(9, address, value);
+ }
+
+ public int get_ShouldDisplayStatus(int[] value) {
+ return COM.VtblCall(10, address, value);
+ }
+
+ public int get_ShouldDisplayToolbar(int[] value) {
+ return COM.VtblCall(11, address, value);
+ }
+
+ public int get_ShouldDisplayScrollBars(int[] value) {
+ return COM.VtblCall(12, address, value);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2_2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2_2.java
new file mode 100644
index 0000000000..1050bb8c66
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICoreWebView2_2.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICoreWebView2_2 extends ICoreWebView2 {
+
+public ICoreWebView2_2(long address) {
+ super(address);
+}
+
+public int NavigateWithWebResourceRequest(IUnknown request) {
+ return COM.VtblCall(63, address, request.address);
+}
+
+public int add_DOMContentLoaded(IUnknown handler, long[] token) {
+ return COM.VtblCall(64, address, handler.getAddress(), token);
+}
+
+public int get_CookieManager(long[] cookieManager) {
+ return COM.VtblCall(66, address, cookieManager);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICustomDestinationList.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICustomDestinationList.java
new file mode 100644
index 0000000000..c5f09a8eb4
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ICustomDestinationList.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ICustomDestinationList extends IUnknown {
+
+public ICustomDestinationList(long address) {
+ super(address);
+}
+
+public int SetAppID(char[] pszAppID) {
+ return COM.VtblCall(3, address, pszAppID);
+}
+
+public int BeginList(int[] pcMinSlots, GUID riid, long[] ppv) {
+ return COM.VtblCall(4, address, pcMinSlots, riid, ppv);
+}
+
+public int AppendCategory(char[] pszCategory, IObjectArray poa) {
+ return COM.VtblCall(5, address, pszCategory, poa.address);
+}
+
+public int AddUserTasks(IUnknown poa) {
+ return COM.VtblCall(7, address, poa.address);
+}
+
+public int CommitList() {
+ return COM.VtblCall(8, address);
+}
+
+public int DeleteList(char[] pszAppID) {
+ return COM.VtblCall(10, address, pszAppID);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java
index 1357a24b0e..1f8214e24a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDataObject.java
@@ -13,14 +13,12 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IDataObject extends IUnknown {
-public IDataObject(long /*int*/ address) {
+public IDataObject(long address) {
super(address);
}
-public int EnumFormatEtc(int dwDirection, long /*int*/[] ppenumFormatetc) {
- return OS.VtblCall(8, address, dwDirection, ppenumFormatetc);
+public int EnumFormatEtc(int dwDirection, long[] ppenumFormatetc) {
+ return COM.VtblCall(8, address, dwDirection, ppenumFormatetc);
}
public int GetData(FORMATETC pFormatetc, STGMEDIUM pmedium) {
//Called by a data consumer to obtain data from a source data object.
@@ -29,20 +27,7 @@ public int GetData(FORMATETC pFormatetc, STGMEDIUM pmedium) {
//The caller then assumes responsibility for releasing the STGMEDIUM structure.
return COM.VtblCall(3, address, pFormatetc, pmedium);
}
-public int GetDataHere(FORMATETC pFormatetc, STGMEDIUM pmedium) {
- //Called by a data consumer to obtain data from a source data object.
- //This method differs from the GetData method in that the caller must
- //allocate and free the specified storage medium.
- return COM.VtblCall(4, address, pFormatetc, pmedium);
-}
public int QueryGetData(FORMATETC pFormatetc) {
return COM.VtblCall(5, address, pFormatetc);
}
-public int SetData(
- FORMATETC pFormatetc, // Pointer to the FORMATETC structure
- STGMEDIUM pmedium, // Pointer to STGMEDIUM structure
- boolean fRelease // Indicates which object owns the storage medium after the call is completed
- ){
- return COM.VtblCall(7, address, pFormatetc, pmedium, fRelease);
-}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java
index ce77169239..98797c3c6f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatch.java
@@ -18,7 +18,7 @@ import org.eclipse.swt.internal.win32.*;
public class IDispatch extends IUnknown {
-public IDispatch(long /*int*/ address) {
+public IDispatch(long address) {
super(address);
}
public int GetIDsOfNames(GUID riid, String[] rgszNames, int cNames, int lcid, int[] rgDispId) {
@@ -27,9 +27,9 @@ public int GetIDsOfNames(GUID riid, String[] rgszNames, int cNames, int lcid, in
int size = rgszNames.length;
// create an array to hold the addresses
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * C.PTR_SIZEOF);
- long /*int*/[] memTracker = new long /*int*/[size];
+ long hHeap = OS.GetProcessHeap();
+ long ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * C.PTR_SIZEOF);
+ long[] memTracker = new long[size];
try {
// add the address of each string to the array
@@ -40,10 +40,10 @@ public int GetIDsOfNames(GUID riid, String[] rgszNames, int cNames, int lcid, in
buffer = new char[nameSize +1];
rgszNames[i].getChars(0, nameSize, buffer, 0);
// get the address of the start of the array of char
- long /*int*/ pName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
+ long pName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
OS.MoveMemory(pName, buffer, buffer.length * 2);
// copy the address to the array of addresses
- OS.MoveMemory(ppNames + C.PTR_SIZEOF * i, new long /*int*/[]{pName}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppNames + C.PTR_SIZEOF * i, new long[]{pName}, C.PTR_SIZEOF);
// keep track of the Global Memory so we can free it
memTracker[i] = pName;
}
@@ -52,19 +52,16 @@ public int GetIDsOfNames(GUID riid, String[] rgszNames, int cNames, int lcid, in
} finally {
// free the memory
- for (int i=0; i<memTracker.length; i++){
- OS.HeapFree(hHeap, 0, memTracker[i]);
+ for (long tracker : memTracker) {
+ OS.HeapFree(hHeap, 0, tracker);
}
OS.HeapFree(hHeap, 0, ppNames);
}
}
-public int GetTypeInfo(int iTInfo, int lcid, long /*int*/[] ppTInfo ){
+public int GetTypeInfo(int iTInfo, int lcid, long[] ppTInfo ){
return COM.VtblCall(4, address, iTInfo, lcid, ppTInfo);
}
-public int GetTypeInfoCount(int [] pctinfo ){
- return OS.VtblCall(3, address, pctinfo);
-}
-public int Invoke(int dispIdMember, GUID riid, int lcid, int dwFlags, DISPPARAMS pDispParams, long /*int*/ pVarResult, EXCEPINFO pExcepInfo, int[] pArgErr) {
+public int Invoke(int dispIdMember, GUID riid, int lcid, int dwFlags, DISPPARAMS pDispParams, long pVarResult, EXCEPINFO pExcepInfo, int[] pArgErr) {
return COM.VtblCall(6, address, dispIdMember, riid, lcid, dwFlags, pDispParams, pVarResult, pExcepInfo, pArgErr);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java
index 3e03bffeb8..08f5f1c6b9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDispatchEx.java
@@ -13,43 +13,14 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IDispatchEx extends IDispatch {
-public IDispatchEx (long /*int*/ address) {
+public IDispatchEx (long address) {
super (address);
}
-public int GetDispID (long /*int*/ bstrName, int grfdex, int[] pid) {
- return COM.VtblCall (7, address, bstrName, grfdex, pid);
-}
-
-public int InvokeEx (int id, int lcid, int wFlags, DISPPARAMS pdp, long /*int*/ pvarRes, EXCEPINFO pei, long /*int*/ pspCaller) {
+public int InvokeEx (int id, int lcid, int wFlags, DISPPARAMS pdp, long pvarRes, EXCEPINFO pei, long pspCaller) {
return COM.VtblCall (8, address, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
}
-public int DeleteMemberByName (long /*int*/ bstrName, int grfdex) {
- return OS.VtblCall (9, address, bstrName, grfdex);
-}
-
-public int DeleteMemberByDispID (int id) {
- return OS.VtblCall (10, address, id);
-}
-
-public int GetMemberProperties (int id, int grfdexFetch, int[] pgrfdex) {
- return COM.VtblCall (11, address, id, grfdexFetch, pgrfdex);
-}
-
-public int GetMemberName (int id, long /*int*/[] pbstrName) {
- return OS.VtblCall (12, address, id, pbstrName);
-}
-
-public int GetNextDispID (int grfdex, int id, int[] pid) {
- return COM.VtblCall (13, address, grfdex, id, pid);
-}
-
-public int GetNameSpaceParent (long /*int*/[] ppunk) {
- return OS.VtblCall (14, address, ppunk);
-}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper.java
deleted file mode 100644
index 9e8a6cceb0..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.ole.win32;
-
-import org.eclipse.swt.internal.win32.*;
-
-public class IDragSourceHelper extends IUnknown {
-public IDragSourceHelper(long /*int*/ address) {
- super(address);
-}
-public int InitializeFromBitmap(SHDRAGIMAGE pshdi, long /*int*/ pDataObject) {
- return COM.VtblCall(3, address, pshdi, pDataObject);
-}
-public int InitializeFromWindow(long /*int*/ hwnd, POINT ppt, long /*int*/ pDataObject) {
- return COM.VtblCall(4, address, hwnd, ppt, pDataObject);
-}
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java
deleted file mode 100644
index a6652bcd9c..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDropTargetHelper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.ole.win32;
-
-import org.eclipse.swt.internal.win32.*;
-
-public class IDropTargetHelper extends IUnknown {
-public IDropTargetHelper(long /*int*/ address) {
- super(address);
-}
-public int DragEnter(long /*int*/ hwndTarget, long /*int*/ pDataObject, POINT ppt, int dwEffect) {
- return COM.VtblCall(3, address, hwndTarget, pDataObject, ppt, dwEffect);
-}
-public int DragLeave() {
- return OS.VtblCall(4, address);
-}
-public int DragOver(POINT ppt, int dwEffect) {
- return COM.VtblCall(5, address, ppt, dwEffect);
-}
-public int Drop(long /*int*/ pDataObject, POINT ppt, int dwEffect) {
- return COM.VtblCall(6, address, pDataObject, ppt, dwEffect);
-}
-public int Show(boolean fShow) {
- return COM.VtblCall(7, address, fShow);
-}
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java
index 41ec305443..793703ea49 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnum.java
@@ -13,23 +13,21 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IEnum extends IUnknown
{
-public IEnum(long /*int*/ address) {
+public IEnum(long address) {
super(address);
}
-public int Clone( long /*int*/[] ppenum ){
- return OS.VtblCall(6, address, ppenum);
+public int Clone( long[] ppenum ){
+ return COM.VtblCall(6, address, ppenum);
}
-public int Next(int celt, long /*int*/ rgelt, int[] pceltFetched ){
+public int Next(int celt, long rgelt, int[] pceltFetched ){
return COM.VtblCall(3, address, celt, rgelt, pceltFetched);
}
public int Reset() {
- return OS.VtblCall(5, address);
+ return COM.VtblCall(5, address);
}
public int Skip(int celt){
- return OS.VtblCall(4, address, celt);
+ return COM.VtblCall(4, address, celt);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumFORMATETC.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumFORMATETC.java
index fffde6444c..664fe05c51 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumFORMATETC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumFORMATETC.java
@@ -14,7 +14,7 @@
package org.eclipse.swt.internal.ole.win32;
public class IEnumFORMATETC extends IEnum {
-public IEnumFORMATETC(long /*int*/ address) {
+public IEnumFORMATETC(long address) {
super(address);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumTfDisplayAttributeInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumTfDisplayAttributeInfo.java
new file mode 100644
index 0000000000..f8365b664c
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumTfDisplayAttributeInfo.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IEnumTfDisplayAttributeInfo extends IUnknown {
+
+public IEnumTfDisplayAttributeInfo(long address) {
+ super(address);
+}
+
+public int Next(int celt, long[] rgelt, int[] pceltFetched) {
+ return COM.VtblCall(4, address, celt, rgelt, pceltFetched);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumVARIANT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumVARIANT.java
index ee33a6cfa7..0efbf3774a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumVARIANT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IEnumVARIANT.java
@@ -14,7 +14,7 @@
package org.eclipse.swt.internal.ole.win32;
public class IEnumVARIANT extends IEnum {
-public IEnumVARIANT(long /*int*/ address) {
+public IEnumVARIANT(long address) {
super(address);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFileDialog.java
new file mode 100644
index 0000000000..68dd863348
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFileDialog.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IFileDialog extends IUnknown {
+
+public IFileDialog(long address) {
+ super(address);
+}
+
+// IModalWindow
+
+public int Show(long hwndOwner) {
+ return COM.VtblCall(3, address, hwndOwner);
+}
+
+// IFileDialog
+
+public int SetFileTypes(int cFileTypes, long [] rgFilterSpec) {
+ return COM.VtblCall(4, address, cFileTypes, rgFilterSpec);
+}
+
+public int SetFileTypeIndex(int iFileType) {
+ return COM.VtblCall(5, address, iFileType);
+}
+
+public int GetFileTypeIndex(int [] piFileType) {
+ return COM.VtblCall(6, address, piFileType);
+}
+
+public int SetOptions(int fos) {
+ return COM.VtblCall(9, address, fos);
+}
+
+public int GetOptions(int[] pfos) {
+ return COM.VtblCall(10, address, pfos);
+}
+
+public int SetDefaultFolder(IShellItem psi) {
+ return COM.VtblCall(11, address, psi.address);
+}
+
+public int SetFolder(IShellItem psi) {
+ return COM.VtblCall(12, address, psi.address);
+}
+
+public int SetFileName(char [] pszName) {
+ return COM.VtblCall(15, address, pszName);
+}
+
+public int SetTitle(char[] pszTitle) {
+ return COM.VtblCall(17, address, pszTitle);
+}
+
+public int GetResult(long[] ppsi) {
+ return COM.VtblCall(20, address, ppsi);
+}
+
+public int SetDefaultExtension(char[] pszDefaultExtension) {
+ return COM.VtblCall(22, address, pszDefaultExtension);
+}
+
+public int ClearClientData() {
+ return COM.VtblCall(25, address);
+}
+
+// IFileOpenDialog
+
+public int GetResults(long [] ppenum) {
+ return COM.VtblCall(27, address, ppenum);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IMLangFontLink2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IMLangFontLink2.java
new file mode 100644
index 0000000000..9f6f4fc6db
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IMLangFontLink2.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IMLangFontLink2 extends IUnknown {
+
+public IMLangFontLink2(long address) {
+ super(address);
+}
+
+// IMLangCodePages
+
+public int GetStrCodePages(char[] pszSrc, int cchSrc, int dwPriorityCodePages, int[] pdwCodePages, int[] pcchCodePages) {
+ return COM.VtblCall(4, address, pszSrc, cchSrc, dwPriorityCodePages, pdwCodePages, pcchCodePages);
+}
+
+// IMLangFontLink2
+
+public int ReleaseFont(long hFont) {
+ return COM.VtblCall(8, address, hFont);
+}
+
+public int MapFont(long hDC, int dwCodePages, char chSrc, long[] phDestFont) {
+ return COM.VtblCall(10, address, hDC, dwCodePages, chSrc, phDestFont);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IObjectArray.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IObjectArray.java
new file mode 100644
index 0000000000..a9883ce666
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IObjectArray.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IObjectArray extends IUnknown {
+
+public IObjectArray(long address) {
+ super(address);
+}
+
+public int GetCount(int[] count) {
+ return COM.VtblCall(3, address, count);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IObjectCollection.java
index f603090f90..55844f7c52 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IDragSourceHelper2.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IObjectCollection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,17 +9,18 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
+public class IObjectCollection extends IObjectArray {
-public class IDragSourceHelper2 extends IDragSourceHelper {
-public IDragSourceHelper2(long /*int*/ address) {
+public IObjectCollection(long address) {
super(address);
}
-public int SetFlags(int dwFlags) {
- return OS.VtblCall(5, address, dwFlags);
+
+public int AddObject(IUnknown punk) {
+ return COM.VtblCall(5, address, punk.address);
}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleCommandTarget.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleCommandTarget.java
index c5c06b45ef..d7103958f5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleCommandTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleCommandTarget.java
@@ -14,15 +14,15 @@
package org.eclipse.swt.internal.ole.win32;
public class IOleCommandTarget extends IUnknown {
-public IOleCommandTarget(long /*int*/ address) {
+public IOleCommandTarget(long address) {
super(address);
}
public int Exec(
GUID pguidCmdGroup, // Pointer to command group
int nCmdID, // Identifier of command to execute
int nCmdExecOpt, // Options for executing the command
- long /*int*/ pvaIn, // Pointer to input arguments
- long /*int*/ pvaOut // Pointer to command output
+ long pvaIn, // Pointer to input arguments
+ long pvaOut // Pointer to command output
){
return COM.VtblCall(4, address, pguidCmdGroup, nCmdID, nCmdExecOpt, pvaIn, pvaOut);
}
@@ -30,7 +30,7 @@ public int QueryStatus(
GUID pguidCmdGroup, // Pointer to command group
int cCmds, // Number of commands in prgCmds array
OLECMD prgCmds, // Array of commands
- OLECMDTEXT pCmdText // Pointer to name or status of command
+ long pCmdText // Pointer to name or status of command
){
// we only support querying for one command at a time
if (cCmds > 1) return COM.E_INVALIDARG;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleControl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleControl.java
index d1c14a0d7f..a2a80c5049 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleControl.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleControl.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.ole.win32;
public class IOleControl extends IUnknown
{
-public IOleControl(long /*int*/ address) {
+public IOleControl(long address) {
super(address);
}
public int GetControlInfo(CONTROLINFO pCI) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java
index b6f4c3f1e0..fca3f3098c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocument.java
@@ -13,14 +13,12 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IOleDocument extends IUnknown
{
-public IOleDocument(long /*int*/ address) {
+public IOleDocument(long address) {
super(address);
}
-public int CreateView(long /*int*/ pIPSite,long /*int*/ pstm, int dwReserved, long /*int*/[] ppView) {
- return OS.VtblCall(3, address, pIPSite, pstm, dwReserved, ppView);
+public int CreateView(long pIPSite,long pstm, int dwReserved, long[] ppView) {
+ return COM.VtblCall(3, address, pIPSite, pstm, dwReserved, ppView);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java
index efebe480e2..ffe055d7f5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleDocumentView.java
@@ -18,19 +18,19 @@ import org.eclipse.swt.internal.win32.*;
public class IOleDocumentView extends IUnknown
{
-public IOleDocumentView(long /*int*/ address) {
+public IOleDocumentView(long address) {
super(address);
}
-public int SetInPlaceSite(long /*int*/ pIPSite) {
- return OS.VtblCall(3, address, pIPSite);
+public int SetInPlaceSite(long pIPSite) {
+ return COM.VtblCall(3, address, pIPSite);
}
public int SetRect(RECT prcView) {
return COM.VtblCall(6, address, prcView);
}
public int Show(int fShow) {
- return OS.VtblCall(9, address, fShow);
+ return COM.VtblCall(9, address, fShow);
}
public int UIActivate(int fUIActivate) {
- return OS.VtblCall(10, address, fUIActivate);
+ return COM.VtblCall(10, address, fUIActivate);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java
index 9a04980528..059a3a942b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java
@@ -17,20 +17,17 @@ import org.eclipse.swt.internal.win32.*;
public class IOleInPlaceActiveObject extends IOleWindow
{
-public IOleInPlaceActiveObject(long /*int*/ address) {
+public IOleInPlaceActiveObject(long address) {
super(address);
}
public int TranslateAccelerator(MSG lpmsg) {
- //lpmsg - Pointer to message that may need translating
- return COM.VtblCall(5, address, lpmsg);
+ //lpmsg - Pointer to message that may need translating
+ return COM.VtblCall(5, address, lpmsg);
}
public void OnFrameWindowActivate(boolean fActivate) {
- COM.VtblCall(6, getAddress(), fActivate);
+ COM.VtblCall(6, address, fActivate ? 1 : 0);
}
-public void OnDocWindowActivate(boolean fActivate) {
- COM.VtblCall(7, getAddress(), fActivate);
-}
-public int ResizeBorder(RECT prcBorder, long /*int*/ pUIWindow, boolean fFrameWindow) {
- return COM.VtblCall(8, address, prcBorder, pUIWindow, fFrameWindow);
+public int ResizeBorder(RECT prcBorder, long pUIWindow, boolean fFrameWindow) {
+ return COM.VtblCall(8, address, prcBorder, pUIWindow, fFrameWindow ? 1 : 0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java
index dbdad4f245..3ba5c507d7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceObject.java
@@ -17,19 +17,16 @@ import org.eclipse.swt.internal.win32.*;
public class IOleInPlaceObject extends IOleWindow
{
-public IOleInPlaceObject(long /*int*/ address) {
+public IOleInPlaceObject(long address) {
super(address);
}
public int InPlaceDeactivate() {
- return OS.VtblCall(5, address);
+ return COM.VtblCall(5, address);
}
public int UIDeactivate() {
- return OS.VtblCall(6, address);
+ return COM.VtblCall(6, address);
}
public int SetObjectRects(RECT lprcPosRect, RECT lprcClipRect) {
return COM.VtblCall(7, address, lprcPosRect, lprcClipRect);
}
-public int ReactivateAndUndo() {
- return OS.VtblCall(8, address);
-}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java
index 785a8f981b..7b364ae603 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleLink.java
@@ -13,17 +13,15 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IOleLink extends IUnknown
{
-public IOleLink(long /*int*/ address) {
+public IOleLink(long address) {
super(address);
}
public int BindIfRunning() {
- return OS.VtblCall(10, address);
+ return COM.VtblCall(10, address);
}
-public int GetSourceMoniker(long /*int*/[] ppmk) {
- return OS.VtblCall(6, address, ppmk);
+public int GetSourceMoniker(long[] ppmk) {
+ return COM.VtblCall(6, address, ppmk);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java
index 8e6715f1d8..ca4abce317 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java
@@ -17,26 +17,26 @@ import org.eclipse.swt.internal.win32.*;
public class IOleObject extends IUnknown
{
-public IOleObject(long /*int*/ address) {
+public IOleObject(long address) {
super(address);
}
-public int Advise(long /*int*/ pAdvSink, int[] pdwConnection) {
- return OS.VtblCall(19, address, pAdvSink, pdwConnection);
+public int Advise(long pAdvSink, int[] pdwConnection) {
+ return COM.VtblCall(19, address, pAdvSink, pdwConnection);
}
public int Close(int dwSaveOption) {
- return OS.VtblCall(6, address, dwSaveOption);
+ return COM.VtblCall(6, address, dwSaveOption);
}
-public int DoVerb(int iVerb, MSG lpmsg, long /*int*/ pActiveSite, int lindex, long /*int*/ hwndParent, RECT lprcPosRect) {
+public int DoVerb(int iVerb, MSG lpmsg, long pActiveSite, int lindex, long hwndParent, RECT lprcPosRect) {
return COM.VtblCall(11, address, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect);
}
-public int GetClientSite(long /*int*/[] ppvClientSite) {
- return OS.VtblCall(4, address, ppvClientSite);
+public int GetClientSite(long[] ppvClientSite) {
+ return COM.VtblCall(4, address, ppvClientSite);
}
public int GetExtent(int dwDrawAspect, SIZE pSizel) {
return COM.VtblCall(18, address, dwDrawAspect, pSizel);
}
-public int SetClientSite(long /*int*/ pClientSite) {
- return OS.VtblCall(3, address, pClientSite);
+public int SetClientSite(long pClientSite) {
+ return COM.VtblCall(3, address, pClientSite);
}
public int SetExtent(int dwDrawAspect, SIZE pSizel) {
return COM.VtblCall(17, address, dwDrawAspect, pSizel);
@@ -61,9 +61,9 @@ public int SetHostNames(String szContainerApp, String szContainerObj) {
return COM.VtblCall(5, address, buffer1, buffer2);
}
public int Unadvise(int token) {
- return OS.VtblCall(20, address, token);
+ return COM.VtblCall(20, address, token);
}
public int Update() {
- return OS.VtblCall(13, address);
+ return COM.VtblCall(13, address);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java
index 7dc026711d..7a9c254b3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleWindow.java
@@ -13,13 +13,11 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IOleWindow extends IUnknown {
-public IOleWindow(long /*int*/ address) {
+public IOleWindow(long address) {
super(address);
}
-public int GetWindow(long /*int*/[] phwnd) {
- return OS.VtblCall(3, address, phwnd);
+public int GetWindow(long[] phwnd) {
+ return COM.VtblCall(3, address, phwnd);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersist.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersist.java
index 2b563d6388..fdede1c292 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersist.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersist.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.ole.win32;
public class IPersist extends IUnknown
{
-public IPersist(long /*int*/ address) {
+public IPersist(long address) {
super(address);
}
public int GetClassID(GUID pClassID) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java
index 609c30e3f0..52f2797719 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistFile.java
@@ -13,26 +13,12 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IPersistFile extends IPersist
{
-public IPersistFile(long /*int*/ address) {
+public IPersistFile(long address) {
super(address);
}
public int IsDirty() {
- return OS.VtblCall(4, address);
-}
-public int Load(long /*int*/ pszFileName, int dwMode) {
- return OS.VtblCall(5, address, pszFileName, dwMode);
-}
-public int Save(long /*int*/ pszFileName, boolean fRemember) {
- return COM.VtblCall(6, address, pszFileName, fRemember);
-}
-public int SaveCompleted(long /*int*/ pszFileName) {
- return OS.VtblCall(7, address, pszFileName);
-}
-public int GetCurFile(long /*int*/ [] ppszFileName){
- return OS.VtblCall(8, address, ppszFileName);
+ return COM.VtblCall(4, address);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java
index e4acf5af83..5e6f2aa51b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStorage.java
@@ -13,29 +13,24 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IPersistStorage extends IPersist
{
-public IPersistStorage(long /*int*/ address) {
+public IPersistStorage(long address) {
super(address);
}
-public int IsDirty() {
- return OS.VtblCall(4, address);
-}
-public int InitNew(long /*int*/ pStg) {
- return OS.VtblCall(5, address, pStg);
+public int InitNew(long pStg) {
+ return COM.VtblCall(5, address, pStg);
}
-public int Load(long /*int*/ pStg) {
- return OS.VtblCall(6, address, pStg);
+public int Load(long pStg) {
+ return COM.VtblCall(6, address, pStg);
}
-public int Save(long /*int*/ pStgSave, boolean fSameAsLoad) {
- return COM.VtblCall(7, address, pStgSave, fSameAsLoad);
+public int Save(long pStgSave, boolean fSameAsLoad) {
+ return COM.VtblCall(7, address, pStgSave, fSameAsLoad ? 1 : 0);
}
-public int SaveCompleted(long /*int*/ pStgNew) {
- return OS.VtblCall(8, address, pStgNew);
+public int SaveCompleted(long pStgNew) {
+ return COM.VtblCall(8, address, pStgNew);
}
public int HandsOffStorage(){
- return OS.VtblCall(9, address);
+ return COM.VtblCall(9, address);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java
index e09925b2c6..4253622fa9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPersistStreamInit.java
@@ -13,19 +13,17 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IPersistStreamInit extends IPersist
{
-public IPersistStreamInit(long /*int*/ address) {
+public IPersistStreamInit(long address) {
super(address);
}
-public int Load(long /*int*/ pStm) {
- return OS.VtblCall(5, address, pStm);
+public int Load(long pStm) {
+ return COM.VtblCall(5, address, pStm);
}
public int InitNew() {
- return OS.VtblCall(8, address);
+ return COM.VtblCall(8, address);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyBag.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyBag.java
index 21a3ab71c6..f234be670d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyBag.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyBag.java
@@ -16,11 +16,11 @@ package org.eclipse.swt.internal.ole.win32;
public class IPropertyBag extends IUnknown {
-public IPropertyBag (long /*int*/ address) {
+public IPropertyBag (long address) {
super (address);
}
-public int Read (long /*int*/ pszPropName, long /*int*/ pVar, long /*int*/[] pErrorLog) {
+public int Read (long pszPropName, long pVar, long[] pErrorLog) {
return COM.VtblCall (3, getAddress(), pszPropName, pVar, pErrorLog);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyStore.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyStore.java
new file mode 100644
index 0000000000..c946313f5f
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IPropertyStore.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+import org.eclipse.swt.internal.win32.*;
+
+public class IPropertyStore extends IUnknown {
+
+public IPropertyStore(long address) {
+ super(address);
+}
+
+public int SetValue(PROPERTYKEY key, long propvar) {
+ return COM.VtblCall(6, address, key, propvar);
+}
+
+public int Commit() {
+ return COM.VtblCall(7, address);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java
index 7462d68341..b08d77ca96 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo.java
@@ -13,14 +13,12 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IProvideClassInfo extends IUnknown
{
-public IProvideClassInfo(long /*int*/ address) {
+public IProvideClassInfo(long address) {
super(address);
}
-public int GetClassInfo(long /*int*/[] ppTI) {
- return OS.VtblCall(3, address, ppTI);
+public int GetClassInfo(long[] ppTI) {
+ return COM.VtblCall(3, address, ppTI);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo2.java
index 3996b0bdb8..61f7fbbfa9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo2.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IProvideClassInfo2.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.ole.win32;
public class IProvideClassInfo2 extends IProvideClassInfo
{
-public IProvideClassInfo2(long /*int*/ address) {
+public IProvideClassInfo2(long address) {
super(address);
}
public int GetGUID(int dwGuidKind, GUID pGUID) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java
index 395ea2717a..0ac2256dde 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java
@@ -15,10 +15,10 @@ package org.eclipse.swt.internal.ole.win32;
public class IServiceProvider extends IUnknown
{
-public IServiceProvider(long /*int*/ address) {
+public IServiceProvider(long address) {
super(address);
}
-public int QueryService(GUID iid1, GUID iid2, long /*int*/ ppvObject[]) {
+public int QueryService(GUID iid1, GUID iid2, long ppvObject[]) {
return COM.VtblCall(3, address, iid1, iid2, ppvObject);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItem.java
new file mode 100644
index 0000000000..a0f77de869
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItem.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IShellItem extends IUnknown {
+
+public IShellItem(long address) {
+ super(address);
+}
+
+public int GetDisplayName(int sigdnName, long[] ppszName) {
+ return COM.VtblCall(5, address, sigdnName, ppszName);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItemArray.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItemArray.java
new file mode 100644
index 0000000000..73b52cb530
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellItemArray.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2020 Nikita Nemkin and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IShellItemArray extends IUnknown {
+
+public IShellItemArray(long address) {
+ super(address);
+}
+
+public int GetCount(int [] pdwNumItems) {
+ return COM.VtblCall(7, address, pdwNumItems);
+}
+
+public int GetItemAt(int dwIndex, long [] ppsi) {
+ return COM.VtblCall(8, address, dwIndex, ppsi);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellLink.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellLink.java
new file mode 100644
index 0000000000..d487c438bb
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IShellLink.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IShellLink extends IUnknown {
+
+public IShellLink(long address) {
+ super(address);
+}
+
+public int SetDescription(char[] pszName) {
+ return COM.VtblCall(7, address, pszName);
+}
+
+public int SetArguments(char[] pszArgs) {
+ return COM.VtblCall(11, address, pszArgs);
+}
+
+public int SetIconLocation(char[] pszIconPath, int iIcon) {
+ return COM.VtblCall(17, address, pszIconPath, iIcon);
+}
+
+public int SetPath(char[] pszFile) {
+ return COM.VtblCall(20, address, pszFile);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ISpecifyPropertyPages.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ISpecifyPropertyPages.java
index 53192153a3..31b382d546 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ISpecifyPropertyPages.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ISpecifyPropertyPages.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.ole.win32;
public class ISpecifyPropertyPages extends IUnknown {
-public ISpecifyPropertyPages(long /*int*/ address) {
+public ISpecifyPropertyPages(long address) {
super(address);
}
public int GetPages(CAUUID pPages){
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java
index 075411a3dc..173f5f14c4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java
@@ -13,50 +13,32 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IStorage extends IUnknown
{
-public IStorage(long /*int*/ address) {
+public IStorage(long address) {
super(address);
}
public int Commit(int grfCommitFlag) {
- return OS.VtblCall(9, address, grfCommitFlag);
+ return COM.VtblCall(9, address, grfCommitFlag);
}
public int CopyTo(
int ciidExclude, //Number of elements in rgiidExclude
- GUID rgiidExclude, //Array of interface identifiers (IIDs)
- String[] snbExclude, //Points to a block of stream names in the storage object
- long /*int*/ pstgDest //Points to destination storage object
- ){
+ GUID rgiidExclude, //Array of interface identifiers (IIDs)
+ String[] snbExclude, //Points to a block of stream names in the storage object
+ long pstgDest //Points to destination storage object
+ ){
// we only support snbExclude = null
if (snbExclude != null) {
return COM.E_INVALIDARG;
}
return COM.VtblCall(7, address, ciidExclude, rgiidExclude, 0, pstgDest);
}
-public int CreateStorage(
- String pwcsName, //Pointer to the name of the new storage object
- int grfMode, //Access mode for the new storage object
- int reserved1, //Reserved; must be zero
- int reserved2, //Reserved; must be zero
- long /*int*/[] ppStg //Pointer to new storage object
-){
-
- // create a null terminated array of char
- char[] buffer = null;
- if (pwcsName != null) {
- buffer = (pwcsName+"\0").toCharArray();
- }
-
- return COM.VtblCall(5, address, buffer, grfMode, reserved1, reserved2, ppStg);
-}
public int CreateStream(
String pwcsName, //Pointer to the name of the new stream
int grfMode, //Access mode for the new stream
int reserved1, //Reserved; must be zero
int reserved2, //Reserved; must be zero
- long /*int*/[] ppStm //Pointer to new stream object
+ long[] ppStm //Pointer to new stream object
){
// create a null terminated array of char
@@ -67,52 +49,12 @@ public int CreateStream(
return COM.VtblCall(3, address, buffer, grfMode, reserved1, reserved2, ppStm);
}
-public int DestroyElement(String pwcsName) {
-
- // create a null terminated array of char
- char[] buffer = null;
- if (pwcsName != null) {
- buffer = (pwcsName+"\0").toCharArray();
- }
- return OS.VtblCall(12, address, buffer);
-}
-public int EnumElements(
- int reserved1, //Reserved; must be zero
- long /*int*/ reserved2, //Reserved; must be NULL
- int reserved3, //Reserved; must be zero
- long /*int*/[] ppenum //Pointer to output variable that
- // receives the IEnumSTATSTG interface
-){
- return OS.VtblCall(11, address, reserved1, reserved2, reserved3, ppenum);
-}
-public int OpenStorage(
- String pwcsName, //Pointer to the name of the
- // storage object to open
- long /*int*/ pstgPriority, //Must be NULL.
- int grfMode, //Access mode for the new storage object
- String snbExclude[], //Must be NULL.
- int reserved, //Reserved; must be zero
- long /*int*/[] ppStg //Pointer to opened storage object
-){
-
- // create a null terminated array of char
- char[] buffer = null;
- if (pwcsName != null) {
- buffer = (pwcsName+"\0").toCharArray();
- }
-
- // we only support the case where snbExclude = null
- if (snbExclude != null) {
- return COM.E_INVALIDARG;
- }
- return COM.VtblCall(6, address, buffer, pstgPriority, grfMode, 0, reserved, ppStg);
-}
public int OpenStream(
String pwcsName, //Pointer to name of stream to open
- long /*int*/ reserved1, //Reserved; must be NULL
+ long reserved1, //Reserved; must be NULL
int grfMode, //Access mode for the new stream
int reserved2, //Reserved; must be zero
- long /*int*/[] ppStm //Pointer to output variable
+ long[] ppStm //Pointer to output variable
// that receives the IStream interface pointer
) {
@@ -124,31 +66,4 @@ public int OpenStream(
return COM.VtblCall(4, address, buffer, reserved1, grfMode, reserved2, ppStm);
}
-public int RenameElement(
- String pwcsOldName, //Pointer to the name of the
- // element to be changed
- String pwcsNewName //Pointer to the new name for
- // the specified element
-){
-
- // create a null terminated array of char
- char[] buffer1 = null;
- if (pwcsOldName != null) {
- buffer1 = (pwcsOldName+"\0").toCharArray();
- }
- // create a null terminated array of char
- char[] buffer2 = null;
- if (pwcsNewName != null) {
- buffer2 = (pwcsNewName+"\0").toCharArray();
- }
- return COM.VtblCall(13, address, buffer1, buffer2);
-}
-public int Revert() {
- return OS.VtblCall(10, address);
-}
-public int SetClass(
- GUID clsid //CLSID to be assigned to the storage object
-){
- return COM.VtblCall(15, address, clsid);
-}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java
index f92973db82..36109589d9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStream.java
@@ -13,28 +13,18 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IStream extends IUnknown {
-public IStream(long /*int*/ address) {
+public IStream(long address) {
super(address);
}
-public int Clone(
- long /*int*/[] ppstm //Pointer to location for pointer to the new stream object
-){
- return OS.VtblCall(13, address, ppstm);
-}
public int Commit( int grfCommitFlags //Specifies how changes are committed
){
- return OS.VtblCall(8, address, grfCommitFlags);
+ return COM.VtblCall(8, address, grfCommitFlags);
}
-public int Read(long /*int*/ pv, int cb, int[] pcbWritten) {
+public int Read(long pv, int cb, int[] pcbWritten) {
return COM.VtblCall(3, address, pv, cb, pcbWritten);
}
-public int Revert(){
- return OS.VtblCall(9, address);
-}
-public int Write(long /*int*/ pv, int cb, int[] pcbWritten) {
+public int Write(long pv, int cb, int[] pcbWritten) {
return COM.VtblCall(4, address, pv, cb, pcbWritten);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITaskbarList3.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITaskbarList3.java
new file mode 100644
index 0000000000..222857be7c
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITaskbarList3.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ITaskbarList3 extends IUnknown {
+
+public ITaskbarList3(long address) {
+ super(address);
+}
+
+public int SetProgressValue(long hwnd, long ullCompleted, long ullTotal) {
+ return COM.VtblCall(9, address, hwnd, ullCompleted, ullTotal);
+}
+
+public int SetProgressState(long hwnd, int tbpFlags) {
+ return COM.VtblCall(10, address, hwnd, tbpFlags);
+}
+
+public int SetOverlayIcon(long hwnd, long hIcon, long pszDescription) {
+ return COM.VtblCall(18, address, hwnd, hIcon, pszDescription);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFont.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfDisplayAttributeInfo.java
index 24b368c07d..a21658bcb3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IFont.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfDisplayAttributeInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,17 +9,20 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
import org.eclipse.swt.internal.win32.*;
-public class IFont extends IUnknown {
-public IFont(long /*int*/ address) {
+public class ITfDisplayAttributeInfo extends IUnknown {
+
+public ITfDisplayAttributeInfo(long address) {
super(address);
}
-public int get_hFont(long /*int*/[] phfont){
- return OS.VtblCall(3, address, phfont);
+
+public int GetAttributeInfo(TF_DISPLAYATTRIBUTE pda) {
+ return COM.VtblCall(5, address, pda);
}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfDisplayAttributeProvider.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfDisplayAttributeProvider.java
new file mode 100644
index 0000000000..3f8f9851ed
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfDisplayAttributeProvider.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ITfDisplayAttributeProvider extends IUnknown {
+
+public ITfDisplayAttributeProvider(long address) {
+ super(address);
+}
+
+public int EnumDisplayAttributeInfo(long [] ppEnum) {
+ return COM.VtblCall(3, address, ppEnum);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfInputProcessorProfiles.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfInputProcessorProfiles.java
new file mode 100644
index 0000000000..29e06c9e68
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITfInputProcessorProfiles.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Nikita Nemkin <nikita@nemkin.ru> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class ITfInputProcessorProfiles extends IUnknown {
+
+public ITfInputProcessorProfiles(long address) {
+ super(address);
+}
+
+public int GetDefaultLanguageProfile(int langid, GUID catid, GUID pclsid, GUID pguidProfile) {
+ return COM.VtblCall(8, address, langid, catid, pclsid, pguidProfile);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java
index e1690ee8f3..ad33f5debf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/ITypeInfo.java
@@ -14,22 +14,21 @@
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.win32.*;
public class ITypeInfo extends IUnknown
{
-public ITypeInfo(long /*int*/ address) {
+public ITypeInfo(long address) {
super(address);
}
public int GetDocumentation(int index, String[] name, String[] docString, int[] pdwHelpContext, String[] helpFile ) {
- long /*int*/[] pBstrName = null;
- if (name != null) pBstrName = new long /*int*/[1];
- long /*int*/[] pBstrDocString = null;
- if (docString != null) pBstrDocString = new long /*int*/[1];
- long /*int*/[] pBstrHelpFile = null;
- if (helpFile != null) pBstrHelpFile = new long /*int*/[1];
+ long[] pBstrName = null;
+ if (name != null) pBstrName = new long[1];
+ long[] pBstrDocString = null;
+ if (docString != null) pBstrDocString = new long[1];
+ long[] pBstrHelpFile = null;
+ if (helpFile != null) pBstrHelpFile = new long[1];
int rc = COM.VtblCall(12, address, index, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
if (name != null && pBstrName[0] != 0) {
int size = COM.SysStringByteLen(pBstrName[0]);
@@ -72,54 +71,16 @@ public int GetDocumentation(int index, String[] name, String[] docString, int[]
}
return rc;
}
-public int GetFuncDesc(int index, long /*int*/[] ppFuncDesc) {
- return OS.VtblCall(5, address, index, ppFuncDesc);
+public int GetFuncDesc(int index, long[] ppFuncDesc) {
+ return COM.VtblCall(5, address, index, ppFuncDesc);
}
-public int GetIDsOfNames(String[] rgszNames, int cNames, int[] pMemId) {
-
- char[] buffer;
- int size = rgszNames.length;
-
- // create an array to hold the addresses
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * C.PTR_SIZEOF);
- long /*int*/[] memTracker = new long /*int*/[size];
-
- try {
- // add the address of each string to the array
-
- for (int i=0; i<size; i++){
- // create a null terminated array of char for each String
- int nameSize = rgszNames[i].length();
- buffer = new char[nameSize +1];
- rgszNames[i].getChars(0, nameSize, buffer, 0);
- // get the address of the start of the array of char
- long /*int*/ pName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
- OS.MoveMemory(pName, buffer, buffer.length * 2);
- // copy the address to the array of addresses
- OS.MoveMemory(ppNames + C.PTR_SIZEOF * i, new long /*int*/[]{pName}, C.PTR_SIZEOF);
- // keep track of the Global Memory so we can free it
- memTracker[i] = pName;
- }
-
- return COM.VtblCall(10, address, ppNames, cNames, pMemId);
-
- } finally {
- // free the memory
- for (int i=0; i<memTracker.length; i++){
- OS.HeapFree(hHeap, 0, memTracker[i]);
- }
- OS.HeapFree(hHeap, 0, ppNames);
- }
-}
-
public int GetImplTypeFlags(int index, int[] pImplTypeFlags) {
- return OS.VtblCall(9, address, index, pImplTypeFlags);
+ return COM.VtblCall(9, address, index, pImplTypeFlags);
}
public int GetNames(int memid, String[] names, int cMaxNames, int[] pcNames){
int nameSize = names.length;
- long /*int*/[] rgBstrNames = new long /*int*/[nameSize];
+ long[] rgBstrNames = new long[nameSize];
int rc = COM.VtblCall(7, address, memid, rgBstrNames, nameSize, pcNames);
if (rc == COM.S_OK) {
@@ -140,25 +101,25 @@ public int GetNames(int memid, String[] names, int cMaxNames, int[] pcNames){
return rc;
}
-public int GetRefTypeInfo(int hRefType, long /*int*/[] ppTInfo) {
- return OS.VtblCall(14, address, hRefType, ppTInfo);
+public int GetRefTypeInfo(int hRefType, long[] ppTInfo) {
+ return COM.VtblCall(14, address, hRefType, ppTInfo);
}
public int GetRefTypeOfImplType(int index, int[] pRefType) {
- return OS.VtblCall(8, address, index, pRefType);
+ return COM.VtblCall(8, address, index, pRefType);
}
-public int GetTypeAttr(long /*int*/[] ppTypeAttr) {
- return OS.VtblCall(3, address, ppTypeAttr);
+public int GetTypeAttr(long[] ppTypeAttr) {
+ return COM.VtblCall(3, address, ppTypeAttr);
}
-public int GetVarDesc(int index, long /*int*/[] ppVarDesc ) {
- return OS.VtblCall(6, address, index, ppVarDesc);
+public int GetVarDesc(int index, long[] ppVarDesc ) {
+ return COM.VtblCall(6, address, index, ppVarDesc);
}
-public int ReleaseFuncDesc(long /*int*/ pFuncDesc ) {
- return OS.VtblCall(20, address, pFuncDesc);
+public int ReleaseFuncDesc(long pFuncDesc ) {
+ return COM.VtblCall(20, address, pFuncDesc);
}
-public int ReleaseTypeAttr(long /*int*/ pTypeAttr) {
- return OS.VtblCall(19, address, pTypeAttr);
+public int ReleaseTypeAttr(long pTypeAttr) {
+ return COM.VtblCall(19, address, pTypeAttr);
}
-public int ReleaseVarDesc(long /*int*/ pVarDesc ) {
- return OS.VtblCall(21, address, pVarDesc);
+public int ReleaseVarDesc(long pVarDesc ) {
+ return COM.VtblCall(21, address, pVarDesc);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java
index 99089c7d5b..613713a828 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IUnknown.java
@@ -13,24 +13,22 @@
*******************************************************************************/
package org.eclipse.swt.internal.ole.win32;
-import org.eclipse.swt.internal.win32.*;
-
public class IUnknown
{
- long /*int*/ address;
-public IUnknown(long /*int*/ address) {
+ long address;
+public IUnknown(long address) {
this.address = address;
}
public int AddRef() {
- return OS.VtblCall(1, address);
+ return COM.VtblCall(1, address);
}
-public long /*int*/ getAddress() {
+public long getAddress() {
return address;
}
-public int QueryInterface(GUID riid, long /*int*/[] ppvObject) {
+public int QueryInterface(GUID riid, long[] ppvObject) {
return COM.VtblCall(0, address, riid, ppvObject);
}
public int Release() {
- return OS.VtblCall(2, address);
+ return COM.VtblCall(2, address);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IViewObject2.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IViewObject2.java
index 5becd13db0..606fa9e89d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IViewObject2.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IViewObject2.java
@@ -17,13 +17,13 @@ import org.eclipse.swt.internal.win32.*;
public class IViewObject2 extends IUnknown
{
-public IViewObject2(long /*int*/ address) {
+public IViewObject2(long address) {
super(address);
}
-public int GetExtent(int dwAspect, int lindex, DVTARGETDEVICE ptd, SIZE lpsizel) {
+public int GetExtent(int dwAspect, int lindex, long ptd, SIZE lpsizel) {
return COM.VtblCall(9, address, dwAspect, lindex, ptd, lpsizel);
}
-public int SetAdvise(int dwAspects, int dwAdvf, long /*int*/ pIAdviseSink) {
+public int SetAdvise(int dwAspects, int dwAdvf, long pIAdviseSink) {
return COM.VtblCall(7, address, dwAspects, dwAdvf, pIAdviseSink);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLEINPLACEFRAMEINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLEINPLACEFRAMEINFO.java
index a845fc2529..1c28d09ba8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLEINPLACEFRAMEINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/OLEINPLACEFRAMEINFO.java
@@ -17,9 +17,9 @@ public final class OLEINPLACEFRAMEINFO {
public int cb;
public int fMDIApp;
/** @field cast=(HWND) */
- public long /*int*/ hwndFrame;
+ public long hwndFrame;
/** @field cast=(HACCEL) */
- public long /*int*/ haccel;
+ public long haccel;
public int cAccelEntries;
public static final int sizeof = COM.OLEINPLACEFRAMEINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STATSTG.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STATSTG.java
deleted file mode 100644
index 2a83c1f5ef..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STATSTG.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.ole.win32;
-
-public class STATSTG {
- /** @field cast=(LPWSTR) */
- public long /*int*/ pwcsName;
- public int type;
- /** @field accessor=cbSize.QuadPart */
- public long cbSize;
-// FILETIME mtime;
- /** @field accessor=mtime.dwLowDateTime */
- public int mtime_dwLowDateTime;
- /** @field accessor=mtime.dwHighDateTime */
- public int mtime_dwHighDateTime;
-// FILETIME ctime;
- /** @field accessor=ctime.dwLowDateTime */
- public int ctime_dwLowDateTime;
- /** @field accessor=ctime.dwHighDateTime */
- public int ctime_dwHighDateTime;
-// FILETIME atime;
- /** @field accessor=atime.dwLowDateTime */
- public int atime_dwLowDateTime;
- /** @field accessor=atime.dwHighDateTime */
- public int atime_dwHighDateTime;
- public int grfMode;
- public int grfLocksSupported;
-// GUID clsid;
- /** @field accessor=clsid.Data1 */
- public int clsid_Data1;
- /** @field accessor=clsid.Data2 */
- public short clsid_Data2;
- /** @field accessor=clsid.Data3 */
- public short clsid_Data3;
- /** @field accessor=clsid.Data4 */
- public byte[] clsid_Data4 = new byte[8];
- public int grfStateBits;
- public int reserved;
- public static final int sizeof = COM.STATSTG_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STGMEDIUM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STGMEDIUM.java
index 51e884fb58..4f25f70a97 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STGMEDIUM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/STGMEDIUM.java
@@ -16,8 +16,8 @@ package org.eclipse.swt.internal.ole.win32;
public final class STGMEDIUM {
public int tymed;
/** @field accessor=hGlobal,cast=(HGLOBAL) */
- public long /*int*/ unionField;
+ public long unionField;
/** @field cast=(IUnknown *) */
- public long /*int*/ pUnkForRelease;
+ public long pUnkForRelease;
public static final int sizeof = COM.STGMEDIUM_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/TYPEATTR.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/TYPEATTR.java
index 292e35d839..97e9b2feae 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/TYPEATTR.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/TYPEATTR.java
@@ -28,7 +28,7 @@ public final class TYPEATTR {
public int memidConstructor;
public int memidDestructor;
/** @field cast=(OLECHAR FAR *) */
- public long /*int*/ lpstrSchema;
+ public long lpstrSchema;
public int cbSizeInstance;
public int typekind;
public short cFuncs;
@@ -41,7 +41,7 @@ public final class TYPEATTR {
public short wMinorVerNum;
// TYPEDESC tdescAlias
/** @field accessor=tdescAlias.lptdesc,cast=(struct FARSTRUCT tagTYPEDESC FAR *) */
- public long /*int*/ tdescAlias_unionField;
+ public long tdescAlias_unionField;
/** @field accessor=tdescAlias.vt */
public short tdescAlias_vt;
// IDLDESC idldesctype
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/VARDESC.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/VARDESC.java
index 4e825bd78d..0618a7b927 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/VARDESC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/VARDESC.java
@@ -16,17 +16,17 @@ package org.eclipse.swt.internal.ole.win32;
public class VARDESC {
public int memid;
/** @field cast=(OLECHAR FAR *) */
- public long /*int*/ lpstrSchema;
+ public long lpstrSchema;
public int oInst;
// ELEMDESC elemdescVar
// TYPEDESC elemdescVar.tdesc
/** @field accessor=elemdescVar.tdesc.lptdesc,cast=(struct FARSTRUCT tagTYPEDESC FAR *) */
- public long /*int*/ elemdescVar_tdesc_union;
+ public long elemdescVar_tdesc_union;
/** @field accessor=elemdescVar.tdesc.vt */
public short elemdescVar_tdesc_vt;
// PARAMDESC elemdescFunc.paramdesc
/** @field accessor=elemdescVar.paramdesc.pparamdescex,cast=(LPPARAMDESCEX) */
- public long /*int*/ elemdescVar_paramdesc_pparamdescex;
+ public long elemdescVar_paramdesc_pparamdescex;
/** @field accessor=elemdescVar.paramdesc.wParamFlags */
public short elemdescVar_paramdesc_wParamFlags;
public short wVarFlags;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ACTCTX.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ACTCTX.java
index 4145171c91..4b187b3903 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ACTCTX.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ACTCTX.java
@@ -17,16 +17,16 @@ public class ACTCTX {
public int cbSize;
public int dwFlags;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpSource;
+ public long lpSource;
public short wProcessorArchitecture;
public short wLangId;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpAssemblyDirectory;
+ public long lpAssemblyDirectory;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpResourceName;
+ public long lpResourceName;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpApplicationName;
+ public long lpApplicationName;
/** @field cast=(HMODULE) */
- public long /*int*/ hModule;
+ public long hModule;
public static final int sizeof = OS.ACTCTX_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BITMAP.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BITMAP.java
index fe3cf842e0..01084c607a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BITMAP.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BITMAP.java
@@ -21,6 +21,6 @@ public class BITMAP {
public short bmPlanes;
public short bmBitsPixel;
/** @field cast=(LPVOID) */
- public long /*int*/ bmBits;
+ public long bmBits;
public static final int sizeof = OS.BITMAP_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BP_PAINTPARAMS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BP_PAINTPARAMS.java
index a8a4048f94..388560f3cb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BP_PAINTPARAMS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BP_PAINTPARAMS.java
@@ -17,8 +17,8 @@ public class BP_PAINTPARAMS {
public int cbSize;
public int dwFlags;
/** @field cast=(RECT*) */
- public long /*int*/ prcExclude;
+ public long prcExclude;
/** @field cast=(BLENDFUNCTION*) */
- public long /*int*/ pBlendFunction;
+ public long pBlendFunction;
public static final int sizeof = OS.BP_PAINTPARAMS_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BROWSEINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BROWSEINFO.java
deleted file mode 100644
index ac60f6e9b2..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BROWSEINFO.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-public class BROWSEINFO {
- /** @field cast=(HWND) */
- public long /*int*/ hwndOwner;
- /** @field cast=(LPCITEMIDLIST) */
- public long /*int*/ pidlRoot;
- /** @field cast=(LPTSTR) */
- public long /*int*/ pszDisplayName;
- /** @field cast=(LPCTSTR) */
- public long /*int*/ lpszTitle;
- public int ulFlags;
- /** @field cast=(BFFCALLBACK) */
- public long /*int*/ lpfn;
- public long /*int*/ lParam;
- public int iImage;
- public static final int sizeof = OS.BROWSEINFO_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BUTTON_IMAGELIST.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BUTTON_IMAGELIST.java
index a74138089e..13b39edd7c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BUTTON_IMAGELIST.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/BUTTON_IMAGELIST.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.win32;
public class BUTTON_IMAGELIST {
/** @field cast=(HIMAGELIST) */
- public long /*int*/ himl;
+ public long himl;
/** @field accessor=margin.left,cast=(LONG) */
public int margin_left;
/** @field accessor=margin.top,cast=(LONG) */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java
deleted file mode 100644
index 987c45e81a..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class CERT_INFO {
- public int dwVersion;
- public CRYPT_INTEGER_BLOB SerialNumber = new CRYPT_INTEGER_BLOB ();
- public CRYPT_ALGORITHM_IDENTIFIER SignatureAlgorithm = new CRYPT_ALGORITHM_IDENTIFIER ();
- public CERT_NAME_BLOB Issuer = new CERT_NAME_BLOB ();
- public FILETIME NotBefore = new FILETIME ();
- public FILETIME NotAfter = new FILETIME ();
- public CERT_NAME_BLOB Subject = new CERT_NAME_BLOB ();
- public CERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo = new CERT_PUBLIC_KEY_INFO ();
- public CRYPT_BIT_BLOB IssuerUniqueId = new CRYPT_BIT_BLOB ();
- public CRYPT_BIT_BLOB SubjectUniqueId = new CRYPT_BIT_BLOB ();
- public int cExtension;
- /** @field cast=(PCERT_EXTENSION) */
- public long /*int*/ rgExtension;
-
- public static final int sizeof = OS.CERT_INFO_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java
deleted file mode 100644
index c2452c5cfc..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class CERT_NAME_BLOB {
- public int cbData;
- /** @field cast=(BYTE *) */
- public long /*int*/ pbData;
-
- static final public int sizeof = OS.CERT_NAME_BLOB_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java
deleted file mode 100644
index dc29608fbc..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class CERT_PUBLIC_KEY_INFO {
- public CRYPT_ALGORITHM_IDENTIFIER Algorithm = new CRYPT_ALGORITHM_IDENTIFIER ();
- public CRYPT_BIT_BLOB PublicKey = new CRYPT_BIT_BLOB ();
-
- static final public int sizeof = OS.CERT_PUBLIC_KEY_INFO_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSECOLOR.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSECOLOR.java
index c158a49365..22015a0cac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSECOLOR.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSECOLOR.java
@@ -16,17 +16,17 @@ package org.eclipse.swt.internal.win32;
public class CHOOSECOLOR {
public int lStructSize;
/** @field cast=(HWND) */
- public long /*int*/ hwndOwner;
+ public long hwndOwner;
/** @field cast=(HANDLE) */
- public long /*int*/ hInstance;
+ public long hInstance;
public int rgbResult;
/** @field cast=(COLORREF *) */
- public long /*int*/ lpCustColors;
+ public long lpCustColors;
public int Flags;
- public long /*int*/ lCustData;
+ public long lCustData;
/** @field cast=(LPCCHOOKPROC) */
- public long /*int*/ lpfnHook;
+ public long lpfnHook;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpTemplateName;
+ public long lpTemplateName;
public static final int sizeof = OS.CHOOSECOLOR_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSEFONT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSEFONT.java
index 1c3e4e6803..5b0773cd9a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSEFONT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CHOOSEFONT.java
@@ -16,23 +16,23 @@ package org.eclipse.swt.internal.win32;
public class CHOOSEFONT {
public int lStructSize;
/** @field cast=(HWND) */
- public long /*int*/ hwndOwner;
+ public long hwndOwner;
/** @field cast=(HDC) */
- public long /*int*/ hDC;
+ public long hDC;
/** @field cast=(LPLOGFONT) */
- public long /*int*/ lpLogFont;
+ public long lpLogFont;
public int iPointSize;
public int Flags;
public int rgbColors;
- public long /*int*/ lCustData;
+ public long lCustData;
/** @field cast=(LPCFHOOKPROC) */
- public long /*int*/ lpfnHook;
+ public long lpfnHook;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpTemplateName;
+ public long lpTemplateName;
/** @field cast=(HINSTANCE) */
- public long /*int*/ hInstance;
+ public long hInstance;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpszStyle;
+ public long lpszStyle;
public short nFontType;
public int nSizeMin;
public int nSizeMax;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_CONTEXT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CIDA.java
index 79fa46d377..ad0085386f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_CONTEXT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CIDA.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2019 Paul Pazderski and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -9,20 +9,17 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * Paul Pazderski - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.win32;
-
-public class CERT_CONTEXT {
- public int dwCertEncodingType;
- /** @field cast=(BYTE *) */
- public long /*int*/ pbCertEncoded;
- public int cbCertEncoded;
- /** @field cast=(PCERT_INFO) */
- public long /*int*/ pCertInfo;
- /** @field cast=(HCERTSTORE) */
- public long /*int*/ hCertStore;
-
- public static final int sizeof = OS.CERT_CONTEXT_sizeof ();
+/**
+ * @see <a href="https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/ns-shlobj_core-_ida">WinAPI documentation: CIDA</a>
+ */
+public class CIDA {
+ public int cidl;
+ /** @field accessor=aoffset[0] */
+ public int aoffset;
+ // minimum size since the actual size depends on the number of offsets
+ public static final int sizeof = OS.CIDA_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/COMBOBOXINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/COMBOBOXINFO.java
index 4c990d0270..aa46d5fa5a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/COMBOBOXINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/COMBOBOXINFO.java
@@ -33,10 +33,10 @@ public class COMBOBOXINFO {
public int buttonBottom;
public int stateButton;
/** @field cast=(HWND) */
- public long /*int*/ hwndCombo;
+ public long hwndCombo;
/** @field cast=(HWND) */
- public long /*int*/ hwndItem;
+ public long hwndItem;
/** @field cast=(HWND) */
- public long /*int*/ hwndList;
+ public long hwndList;
public static final int sizeof = OS.COMBOBOXINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CREATESTRUCT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CREATESTRUCT.java
index e12ff6e1be..0f25f7af24 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CREATESTRUCT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CREATESTRUCT.java
@@ -15,22 +15,22 @@ package org.eclipse.swt.internal.win32;
public class CREATESTRUCT {
/** @field cast=(LPVOID) */
- public long /*int*/ lpCreateParams;
+ public long lpCreateParams;
/** @field cast=(HINSTANCE) */
- public long /*int*/ hInstance;
+ public long hInstance;
/** @field cast=(HMENU) */
- public long /*int*/ hMenu;
+ public long hMenu;
/** @field cast=(HWND) */
- public long /*int*/ hwndParent;
+ public long hwndParent;
public int cy;
public int cx;
public int y;
public int x;
public int style;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpszName;
+ public long lpszName;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpszClass;
+ public long lpszClass;
public int dwExStyle;
public static final int sizeof = OS.CREATESTRUCT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java
deleted file mode 100644
index 80f3f0e7ce..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class CRYPT_ALGORITHM_IDENTIFIER {
- /** @field cast=(LPSTR) */
- public long /*int*/ pszObjId;
- public CRYPT_OBJID_BLOB Parameters = new CRYPT_OBJID_BLOB ();
-
- static final public int sizeof = OS.CRYPT_ALGORITHM_IDENTIFIER_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java
deleted file mode 100644
index 33a3e4d501..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class CRYPT_BIT_BLOB {
- public int cbData;
- /** @field cast=(BYTE *) */
- public long /*int*/ pbData;
- public int cUnusedBits;
-
- static final public int sizeof = OS.CRYPT_BIT_BLOB_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java
deleted file mode 100644
index 6a04f2c1ee..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class CRYPT_INTEGER_BLOB {
- public int cbData;
- /** @field cast=(BYTE *) */
- public long /*int*/ pbData;
-
- static final public int sizeof = OS.CRYPT_INTEGER_BLOB_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java
deleted file mode 100644
index c57acceec0..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class CRYPT_OBJID_BLOB {
- public int cbData;
- /** @field cast=(BYTE *) */
- public long /*int*/ pbData;
-
- static final public int sizeof = OS.CRYPT_OBJID_BLOB_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DIBSECTION.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DIBSECTION.java
index 23fc7794ef..80bebafa3b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DIBSECTION.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DIBSECTION.java
@@ -43,7 +43,7 @@ public class DIBSECTION extends BITMAP {
/** @field accessor=dsBitfields[2] */
public int dsBitfields2;
/** @field cast=(HANDLE) */
- public long /*int*/ dshSection;
+ public long dshSection;
public int dsOffset;
public static final int sizeof = OS.DIBSECTION_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java
index 3dc5f2dc48..5cca035f3c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java
@@ -18,8 +18,8 @@ public class DOCHOSTUIINFO {
public int dwFlags;
public int dwDoubleClick;
/** @field cast=(OLECHAR *) */
- public long /*int*/ pchHostCss;
+ public long pchHostCss;
/** @field cast=(OLECHAR *) */
- public long /*int*/ pchHostNS;
+ public long pchHostNS;
public static final int sizeof = OS.DOCHOSTUIINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCINFO.java
index 6ebab62159..e0ad9abfa3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCINFO.java
@@ -16,11 +16,11 @@ package org.eclipse.swt.internal.win32;
public class DOCINFO {
public int cbSize;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpszDocName; // LPCTSTR
+ public long lpszDocName; // LPCTSTR
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpszOutput; // LPCTSTR
+ public long lpszOutput; // LPCTSTR
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpszDatatype;// LPCTSTR
+ public long lpszDatatype;// LPCTSTR
public int fwType; // DWORD
public static final int sizeof = OS.DOCINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DRAWITEMSTRUCT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DRAWITEMSTRUCT.java
index 32ad51e8df..0a7cb9427a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DRAWITEMSTRUCT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DRAWITEMSTRUCT.java
@@ -20,9 +20,9 @@ public class DRAWITEMSTRUCT {
public int itemAction;
public int itemState;
/** @field cast=(HWND) */
- public long /*int*/ hwndItem;
+ public long hwndItem;
/** @field cast=(HDC) */
- public long /*int*/ hDC;
+ public long hDC;
// RECT rcItem;
/** @field accessor=rcItem.left */
public int left;
@@ -32,6 +32,6 @@ public class DRAWITEMSTRUCT {
public int bottom;
/** @field accessor=rcItem.right */
public int right;
- public long /*int*/ itemData;
+ public long itemData;
public static final int sizeof = OS.DRAWITEMSTRUCT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java
index 1cd93e3105..a618b72b57 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java
@@ -21,10 +21,10 @@ public class DROPFILES {
/** @field accessor=pt.y */
public int pt_y;
public int fNC; // Nonclient area flag. If this member is TRUE, pt specifies the screen
- // coordinates of a point in a window's nonclient area. If it is FALSE,
- // pt specifies the client coordinates of a point in the client area.
+ // coordinates of a point in a window's nonclient area. If it is FALSE,
+ // pt specifies the client coordinates of a point in the client area.
public int fWide; // Value that indicates whether the file contains ANSI or Unicode
// characters. If it is zero, it contains ANSI characters. Otherwise, it
- // contains Unicode characters.
+ // contains Unicode characters.
public static final int sizeof = OS.DROPFILES_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DTTOPTS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DTTOPTS.java
deleted file mode 100644
index c79349d625..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DTTOPTS.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-
-public class DTTOPTS {
- public int dwSize;
- public int dwFlags;
- public int crText;
- public int crBorder;
- public int crShadow;
- public int iTextShadowType;
- public POINT ptShadowOffset;
- public int iBorderSize;
- public int iFontPropId;
- public int iColorPropId;
- public int iStateId;
- public boolean fApplyOverlay;
- public int iGlowSize;
- /** @field cast=(DTT_CALLBACK_PROC) */
- public long /*int*/ pfnDrawTextCallback;
- public long /*int*/ lParam;
- public static final int sizeof = OS.DTTOPTS_sizeof ();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/EXTLOGFONTW.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/EXTLOGFONTW.java
index 5ca4ddb112..d3cb745728 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/EXTLOGFONTW.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/EXTLOGFONTW.java
@@ -15,14 +15,6 @@ package org.eclipse.swt.internal.win32;
public class EXTLOGFONTW {
public LOGFONT elfLogFont = new LOGFONT();
- public char[] elfFullName = new char[OS.LF_FULLFACESIZE];
- public char[] elfStyle = new char[OS.LF_FACESIZE];
- public int elfVersion;
- public int elfStyleSize;
- public int elfMatch;
- public int elfReserved;
- public byte[] elfVendorId = new byte[OS.ELF_VENDOR_SIZE];
- public int elfCulture;
- public PANOSE elfPanose = new PANOSE();
+ // the rest of the fields are omitted
public static final int sizeof = OS.EXTLOGFONTW_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GCP_RESULTS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GCP_RESULTS.java
index 884a5dd657..00312c6553 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GCP_RESULTS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GCP_RESULTS.java
@@ -16,17 +16,17 @@ package org.eclipse.swt.internal.win32;
public class GCP_RESULTS {
public int lStructSize;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpOutString;
+ public long lpOutString;
/** @field cast=(UINT *) */
- public long /*int*/ lpOrder;
+ public long lpOrder;
/** @field cast=(int *) */
- public long /*int*/ lpDx;
+ public long lpDx;
/** @field cast=(int *) */
- public long /*int*/ lpCaretPos;
+ public long lpCaretPos;
/** @field cast=(LPSTR) */
- public long /*int*/ lpClass;
+ public long lpClass;
/** @field cast=(LPWSTR) */
- public long /*int*/ lpGlyphs;
+ public long lpGlyphs;
public int nGlyphs;
public int nMaxFit;
public static final int sizeof = OS.GCP_RESULTS_sizeof ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java
index 258b1f6e6d..c6ecf6eeeb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.win32;
public class GESTURECONFIG {
public int dwID; // gesture ID
- public int dwWant; // settings related to gesture ID that are to be turned on
- public int dwBlock; // settings related to gesture ID that are to be turned off
- public static final int sizeof = OS.GESTURECONFIG_sizeof ();
+ public int dwWant; // settings related to gesture ID that are to be turned on
+ public int dwBlock; // settings related to gesture ID that are to be turned off
+ public static final int sizeof = OS.GESTURECONFIG_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java
index 1bbd3ebfe1..991c6a9713 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java
@@ -14,19 +14,19 @@
package org.eclipse.swt.internal.win32;
public class GESTUREINFO {
- public int cbSize;
- public int dwFlags;
- public int dwID;
- /** @field cast=(HWND) */
- public long /*int*/ hwndTarget;
- // POINTS ptsLocation
- /** @field accessor=ptsLocation.x */
- public short x;
- /** @field accessor=ptsLocation.y */
- public short y;
- public int dwInstanceID;
- public int dwSequenceID;
- public long ullArguments;
- public int cbExtraArgs;
- public static final int sizeof = OS.GESTUREINFO_sizeof ();
+ public int cbSize;
+ public int dwFlags;
+ public int dwID;
+ /** @field cast=(HWND) */
+ public long hwndTarget;
+ // POINTS ptsLocation
+ /** @field accessor=ptsLocation.x */
+ public short x;
+ /** @field accessor=ptsLocation.y */
+ public short y;
+ public int dwInstanceID;
+ public int dwSequenceID;
+ public long ullArguments;
+ public int cbExtraArgs;
+ public static final int sizeof = OS.GESTUREINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GUITHREADINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GUITHREADINFO.java
index 53fca826dc..4b25342791 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GUITHREADINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GUITHREADINFO.java
@@ -19,17 +19,17 @@ public class GUITHREADINFO {
/** @field cast=(DWORD) */
public int flags;
/** @field cast=(HWND) */
- public long /*int*/ hwndActive;
+ public long hwndActive;
/** @field cast=(HWND) */
- public long /*int*/ hwndFocus;
+ public long hwndFocus;
/** @field cast=(HWND) */
- public long /*int*/ hwndCapture;
+ public long hwndCapture;
/** @field cast=(HWND) */
- public long /*int*/ hwndMenuOwner;
+ public long hwndMenuOwner;
/** @field cast=(HWND) */
- public long /*int*/ hwndMoveSize;
+ public long hwndMoveSize;
/** @field cast=(HWND) */
- public long /*int*/ hwndCaret;
+ public long hwndCaret;
// RECT rcCaret;
/** @field accessor=rcCaret.left */
public int left;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDITEM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDITEM.java
index a393ad7e27..57503ae7c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDITEM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDITEM.java
@@ -17,16 +17,16 @@ public class HDITEM {
public int mask;
public int cxy;
/** @field cast=(LPTSTR) */
- public long /*int*/ pszText;
+ public long pszText;
/** @field cast=(HBITMAP) */
- public long /*int*/ hbm;
+ public long hbm;
public int cchTextMax;
public int fmt;
- public long /*int*/ lParam;
+ public long lParam;
public int iImage;
public int iOrder;
public int type;
/** @field cast=(void *) */
- public long /*int*/ pvFilter;
+ public long pvFilter;
public static int sizeof = OS.HDITEM_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDLAYOUT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDLAYOUT.java
index 7cb25fca62..59c67a2450 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDLAYOUT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HDLAYOUT.java
@@ -15,8 +15,8 @@ package org.eclipse.swt.internal.win32;
public class HDLAYOUT {
/** @field cast=(RECT *) */
- public long /*int*/ prc;
+ public long prc;
/** @field cast=(WINDOWPOS *) */
- public long /*int*/ pwpos;
+ public long pwpos;
public static final int sizeof = OS.HDLAYOUT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HELPINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HELPINFO.java
index d5d6ffc261..91163409f6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HELPINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HELPINFO.java
@@ -18,7 +18,7 @@ public class HELPINFO {
public int iContextType;
public int iCtrlId;
/** @field cast=(HANDLE) */
- public long /*int*/ hItemHandle;
+ public long hItemHandle;
public int dwContextId;
// POINT MousePos
/** @field accessor=MousePos.x */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HIGHCONTRAST.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HIGHCONTRAST.java
index 69fddfd480..aff9bc1a1d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HIGHCONTRAST.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/HIGHCONTRAST.java
@@ -17,6 +17,6 @@ public class HIGHCONTRAST {
public int cbSize;
public int dwFlags;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpszDefaultScheme;
+ public long lpszDefaultScheme;
public static final int sizeof = OS.HIGHCONTRAST_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ICONINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ICONINFO.java
index f47e322ee6..edc107fb5c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ICONINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/ICONINFO.java
@@ -18,8 +18,8 @@ public class ICONINFO {
public int xHotspot;
public int yHotspot;
/** @field cast=(HBITMAP) */
- public long /*int*/ hbmMask;
+ public long hbmMask;
/** @field cast=(HBITMAP) */
- public long /*int*/ hbmColor;
+ public long hbmColor;
public static final int sizeof = OS.ICONINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/INPUT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/INPUT.java
index 0a293400f7..e4b1f29a71 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/INPUT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/INPUT.java
@@ -15,5 +15,8 @@ package org.eclipse.swt.internal.win32;
public class INPUT {
public int type;
+ // union
+ public KEYBDINPUT ki;
+ public MOUSEINPUT mi;
public static final int sizeof = OS.INPUT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/KEYBDINPUT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/KEYBDINPUT.java
index ce7272c7d1..d502bc0b24 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/KEYBDINPUT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/KEYBDINPUT.java
@@ -18,6 +18,6 @@ public class KEYBDINPUT {
public short wScan;
public int dwFlags;
public int time;
- public long /*int*/ dwExtraInfo;
+ public long dwExtraInfo;
public static final int sizeof = OS.KEYBDINPUT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGBRUSH.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGBRUSH.java
index a7eb9ac3ff..0b09d1586d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGBRUSH.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGBRUSH.java
@@ -16,6 +16,6 @@ package org.eclipse.swt.internal.win32;
public class LOGBRUSH {
public int lbStyle;
public int lbColor;
- public long /*int*/ lbHatch;
+ public long lbHatch;
public static final int sizeof = OS.LOGBRUSH_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGPEN.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGPEN.java
deleted file mode 100644
index dec9b460bd..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LOGPEN.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-public class LOGPEN {
- public int lopnStyle;
-// POINT lopnWidth;
- /** @field accessor=lopnWidth.x */
- public int x;
- /** @field accessor=lopnWidth.y */
- public int y;
- public int lopnColor;
- public static final int sizeof = OS.LOGPEN_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LRESULT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LRESULT.java
index 6821254273..c76f7e2cac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LRESULT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LRESULT.java
@@ -15,11 +15,11 @@ package org.eclipse.swt.internal.win32;
/** @jniclass flags=no_gen */
public class LRESULT {
- public long /*int*/ value;
+ public long value;
public static final LRESULT ONE = new LRESULT (1);
public static final LRESULT ZERO = new LRESULT (0);
-public LRESULT (long /*int*/ value) {
+public LRESULT (long value) {
this.value = value;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVCOLUMN.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVCOLUMN.java
index ce1807ddfd..b30d10fa23 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVCOLUMN.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVCOLUMN.java
@@ -18,7 +18,7 @@ public class LVCOLUMN {
public int fmt;
public int cx;
/** @field cast=(LPTSTR) */
- public long /*int*/ pszText;
+ public long pszText;
public int cchTextMax;
public int iSubItem;
public int iImage;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVITEM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVITEM.java
index 8a0fde81f1..ccfc1c1edb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVITEM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVITEM.java
@@ -20,14 +20,14 @@ public class LVITEM {
public int state;
public int stateMask;
/** @field cast=(LPTSTR) */
- public long /*int*/ pszText;
+ public long pszText;
public int cchTextMax;
public int iImage;
- public long /*int*/ lParam;
+ public long lParam;
public int iIndent;
public int iGroupId;
public int cColumns;
/** @field cast=(PUINT) */
- public long /*int*/ puColumns;
+ public long puColumns;
public static final int sizeof = OS.LVITEM_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java
index f32dd68020..8d719d3804 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java
@@ -16,9 +16,9 @@ package org.eclipse.swt.internal.win32;
public class MEASUREITEMSTRUCT {
public int CtlType;
public int CtlID;
- public int itemID;
+ public int itemID;
public int itemWidth;
public int itemHeight;
- public long /*int*/ itemData;
+ public long itemData;
public static final int sizeof = OS.MEASUREITEMSTRUCT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUBARINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUBARINFO.java
index fdfd5a725b..873e646df3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUBARINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUBARINFO.java
@@ -25,9 +25,9 @@ public class MENUBARINFO {
/** @field accessor=rcBar.bottom */
public int bottom;
/** @field cast=(HMENU) */
- public long /*int*/ hMenu;
+ public long hMenu;
/** @field cast=(HWND) */
- public long /*int*/ hwndMenu;
+ public long hwndMenu;
public boolean fBarFocused;
public boolean fFocused;
public static final int sizeof = OS.MENUBARINFO_sizeof ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUINFO.java
index 613cc04cd0..cfb2a7f7af 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUINFO.java
@@ -19,8 +19,8 @@ public class MENUINFO {
public int dwStyle;
public int cyMax;
/** @field cast=(HBRUSH) */
- public long /*int*/ hbrBack;
+ public long hbrBack;
public int dwContextHelpID;
- public long /*int*/ dwMenuData;
+ public long dwMenuData;
public static final int sizeof = OS.MENUINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUITEMINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUITEMINFO.java
index 9a5c6fa6a8..63df535687 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUITEMINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MENUITEMINFO.java
@@ -20,16 +20,16 @@ public class MENUITEMINFO {
public int fState;
public int wID;
/** @field cast=(HMENU) */
- public long /*int*/ hSubMenu;
+ public long hSubMenu;
/** @field cast=(HBITMAP) */
- public long /*int*/ hbmpChecked;
+ public long hbmpChecked;
/** @field cast=(HBITMAP) */
- public long /*int*/ hbmpUnchecked;
- public long /*int*/ dwItemData;
+ public long hbmpUnchecked;
+ public long dwItemData;
/** @field cast=(LPTSTR) */
- public long /*int*/ dwTypeData;
+ public long dwTypeData;
public int cch;
/** @field cast=(HBITMAP) */
- public long /*int*/ hbmpItem;
+ public long hbmpItem;
public static final int sizeof = OS.MENUITEMINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MOUSEINPUT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MOUSEINPUT.java
index ed7e2c7bbd..87f0f9fa58 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MOUSEINPUT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MOUSEINPUT.java
@@ -19,6 +19,6 @@ public class MOUSEINPUT {
public int mouseData;
public int dwFlags;
public int time;
- public long /*int*/ dwExtraInfo;
+ public long dwExtraInfo;
public static final int sizeof = OS.MOUSEINPUT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MSG.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MSG.java
index 4c75016696..c4652ecfa7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MSG.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MSG.java
@@ -15,10 +15,10 @@ package org.eclipse.swt.internal.win32;
public class MSG {
/** @field cast=(HWND) */
- public long /*int*/ hwnd;
+ public long hwnd;
public int message;
- public long /*int*/ wParam;
- public long /*int*/ lParam;
+ public long wParam;
+ public long lParam;
public int time;
// POINT pt;
/** @field accessor=pt.x */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMCUSTOMDRAW.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMCUSTOMDRAW.java
index 93090ea26e..5fcc48292f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMCUSTOMDRAW.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMCUSTOMDRAW.java
@@ -16,7 +16,7 @@ package org.eclipse.swt.internal.win32;
public class NMCUSTOMDRAW extends NMHDR {
public int dwDrawStage;
/** @field cast=(HDC) */
- public long /*int*/ hdc;
+ public long hdc;
// RECT rc;
/** @field accessor=rc.left */
public int left;
@@ -26,8 +26,8 @@ public class NMCUSTOMDRAW extends NMHDR {
public int right;
/** @field accessor=rc.bottom */
public int bottom;
- public long /*int*/ dwItemSpec;
+ public long dwItemSpec;
public int uItemState;
- public long /*int*/ lItemlParam;
+ public long lItemlParam;
public static final int sizeof = OS.NMCUSTOMDRAW_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHDR.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHDR.java
index e134786d1f..2ce1e1111e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHDR.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHDR.java
@@ -15,8 +15,8 @@ package org.eclipse.swt.internal.win32;
public class NMHDR {
/** @field cast=(HWND) */
- public long /*int*/ hwndFrom;
- public long /*int*/ idFrom;
+ public long hwndFrom;
+ public long idFrom;
public int code;
public static final int sizeof = OS.NMHDR_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHEADER.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHEADER.java
index 164f970e66..15b302f2fb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHEADER.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMHEADER.java
@@ -17,6 +17,6 @@ public class NMHEADER extends NMHDR {
public int iItem;
public int iButton;
/** @field cast=(HDITEM FAR *) */
- public long /*int*/ pitem;
+ public long pitem;
public static int sizeof = OS.NMHEADER_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLISTVIEW.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLISTVIEW.java
index 0af65e337d..dcbfaee2ad 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLISTVIEW.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLISTVIEW.java
@@ -24,6 +24,6 @@ public class NMLISTVIEW extends NMHDR {
public int x;
/** @field accessor=ptAction.y */
public int y;
- public long /*int*/ lParam;
+ public long lParam;
public static int sizeof = OS.NMLISTVIEW_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVDISPINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVDISPINFO.java
index 603826982e..3d550e8e27 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVDISPINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVDISPINFO.java
@@ -26,13 +26,13 @@ public class NMLVDISPINFO extends NMHDR {
/** @field accessor=item.stateMask */
public int stateMask;
/** @field accessor=item.pszText,cast=(LPTSTR) */
- public long /*int*/ pszText;
+ public long pszText;
/** @field accessor=item.cchTextMax */
public int cchTextMax;
/** @field accessor=item.iImage */
public int iImage;
/** @field accessor=item.lParam */
- public long /*int*/ lParam;
+ public long lParam;
/** @field accessor=item.iIndent */
public int iIndent;
/** @field accessor=item.iGroupId */
@@ -40,6 +40,6 @@ public class NMLVDISPINFO extends NMHDR {
/** @field accessor=item.cColumns */
public int cColumns;
/** @field accessor=item.puColumns,cast=(PUINT) */
- public long /*int*/ puColumns;
+ public long puColumns;
public static final int sizeof = OS.NMLVDISPINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVFINDITEM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVFINDITEM.java
index e356ece1bf..29daa5d0d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVFINDITEM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMLVFINDITEM.java
@@ -19,9 +19,9 @@ public class NMLVFINDITEM extends NMHDR {
/** @field accessor=lvfi.flags */
public int flags;
/** @field accessor=lvfi.psz,cast=(LPCTSTR) */
- public long /*int*/ psz;
+ public long psz;
/** @field accessor=lvfi.lParam */
- public long /*int*/ lParam;
+ public long lParam;
// POINT pt;
/** @field accessor=lvfi.pt.x */
public int x;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMREBARCHEVRON.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMREBARCHEVRON.java
index 783c31b0f3..85c311b894 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMREBARCHEVRON.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMREBARCHEVRON.java
@@ -16,7 +16,7 @@ package org.eclipse.swt.internal.win32;
public class NMREBARCHEVRON extends NMHDR {
public int uBand;
public int wID;
- public long /*int*/ lParam;
+ public long lParam;
// RECT rc;
/** @field accessor=rc.left */
public int left;
@@ -26,6 +26,6 @@ public class NMREBARCHEVRON extends NMHDR {
public int right;
/** @field accessor=rc.bottom */
public int bottom;
- public long /*int*/ lParamNM;
+ public long lParamNM;
public static int sizeof = OS.NMREBARCHEVRON_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTBCUSTOMDRAW.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTBCUSTOMDRAW.java
index 4976f57f7b..2b3cc7a355 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTBCUSTOMDRAW.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTBCUSTOMDRAW.java
@@ -14,13 +14,12 @@
package org.eclipse.swt.internal.win32;
public class NMTBCUSTOMDRAW extends NMCUSTOMDRAW {
- public NMCUSTOMDRAW nmcd;
/** @field cast=(HBRUSH) */
- public long /*int*/ hbrMonoDither;
+ public long hbrMonoDither;
/** @field cast=(HBRUSH) */
- public long /*int*/ hbrLines;
+ public long hbrLines;
/** @field cast=(HPEN) */
- public long /*int*/ hpenLines;
+ public long hpenLines;
public int clrText;
public int clrMark;
public int clrTextHighlight;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTOOLBAR.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTOOLBAR.java
index 91d7a72262..9383762cec 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTOOLBAR.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTOOLBAR.java
@@ -25,12 +25,12 @@ public class NMTOOLBAR extends NMHDR {
/** @field accessor=tbButton.fsStyle */
public byte fsStyle;
/** @field accessor=tbButton.dwData */
- public long /*int*/ dwData;
+ public long dwData;
/** @field accessor=tbButton.iString */
- public long /*int*/ iString;
+ public long iString;
public int cchText;
/** @field cast=(LPTSTR) */
- public long /*int*/ pszText;
+ public long pszText;
// RECT rcButton;
/** @field accessor=rcButton.left */
public int left;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTTDISPINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTTDISPINFO.java
index 815f919960..5c040e9fa2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTTDISPINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTTDISPINFO.java
@@ -15,11 +15,11 @@ package org.eclipse.swt.internal.win32;
public class NMTTDISPINFO extends NMHDR {
/** @field cast=(void *) */
- public long /*int*/ lpszText;
+ public long lpszText;
public char[] szText = new char[80];
/** @field cast=(HINSTANCE) */
- public long /*int*/ hinst;
+ public long hinst;
public int uFlags;
- public long /*int*/ lParam;
+ public long lParam;
public static final int sizeof = OS.NMTTDISPINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java
index 9aa4612de1..cae9d2aa5f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java
@@ -18,22 +18,22 @@ public class NMTVDISPINFO extends NMHDR {
/** @field accessor=item.mask */
public int mask;
/** @field accessor=item.hItem,cast=(HTREEITEM) */
- public long /*int*/ hItem;
+ public long hItem;
/** @field accessor=item.state */
public int state;
/** @field accessor=item.stateMask */
public int stateMask;
/** @field accessor=item.pszText,cast=(LPTSTR) */
- public long /*int*/ pszText;
- /** @field accessor=item.cchTextMax */
+ public long pszText;
+ /** @field accessor=item.cchTextMax */
public int cchTextMax;
- /** @field accessor=item.iImage */
+ /** @field accessor=item.iImage */
public int iImage;
- /** @field accessor=item.iSelectedImage */
+ /** @field accessor=item.iSelectedImage */
public int iSelectedImage;
/** @field accessor=item.cChildren */
public int cChildren;
/** @field accessor=item.lParam */
- public long /*int*/ lParam;
+ public long lParam;
public static final int sizeof = OS.NMTVDISPINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVITEMCHANGE.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVITEMCHANGE.java
index ee9a98c131..53f1991ec9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVITEMCHANGE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVITEMCHANGE.java
@@ -16,9 +16,9 @@ package org.eclipse.swt.internal.win32;
public class NMTVITEMCHANGE extends NMHDR {
public int uChanged;
/** @field cast=(HTREEITEM) */
- public long /*int*/ hItem;
+ public long hItem;
public int uStateNew;
public int uStateOld;
- public long /*int*/ lParam;
+ public long lParam;
public static int sizeof = OS.NMTVITEMCHANGE_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NOTIFYICONDATA.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NOTIFYICONDATA.java
index b3ff09169b..d226b47a85 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NOTIFYICONDATA.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NOTIFYICONDATA.java
@@ -16,12 +16,12 @@ package org.eclipse.swt.internal.win32;
public class NOTIFYICONDATA {
public int cbSize;
/** @field cast=(HWND) */
- public long /*int*/ hWnd;
+ public long hWnd;
public int uID;
public int uFlags;
public int uCallbackMessage;
/** @field cast=(HICON) */
- public long /*int*/ hIcon;
+ public long hIcon;
public char szTip[] = new char [128];
public int dwState;
public int dwStateMask;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OFNOTIFY.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OFNOTIFY.java
deleted file mode 100644
index 3a9d2e5a1c..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OFNOTIFY.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-public class OFNOTIFY extends NMHDR {
- /** @field cast=(LPOPENFILENAME) */
- public long /*int*/ lpOFN;
- /** @field cast=(LPTSTR) */
- public long /*int*/ pszFile;
- public static int sizeof = OS.OFNOTIFY_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OPENFILENAME.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OPENFILENAME.java
deleted file mode 100644
index 60a6584083..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OPENFILENAME.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-public class OPENFILENAME {
- public int lStructSize;
- /** @field cast=(HWND) */
- public long /*int*/ hwndOwner;
- /** @field cast=(HINSTANCE) */
- public long /*int*/ hInstance;
- /** @field cast=(LPCTSTR) */
- public long /*int*/ lpstrFilter;
- /** @field cast=(LPTSTR) */
- public long /*int*/ lpstrCustomFilter;
- public int nMaxCustFilter;
- public int nFilterIndex;
- /** @field cast=(LPTSTR) */
- public long /*int*/ lpstrFile;
- public int nMaxFile;
- /** @field cast=(LPTSTR) */
- public long /*int*/ lpstrFileTitle;
- public int nMaxFileTitle;
- /** @field cast=(LPCTSTR) */
- public long /*int*/ lpstrInitialDir;
- /** @field cast=(LPCTSTR) */
- public long /*int*/ lpstrTitle;
- public int Flags;
- public short nFileOffset;
- public short nFileExtension;
- /** @field cast=(LPCTSTR) */
- public long /*int*/ lpstrDefExt;
- public long /*int*/ lCustData;
- /** @field cast=(LPOFNHOOKPROC) */
- public long /*int*/ lpfnHook;
- /** @field cast=(LPCTSTR) */
- public long /*int*/ lpTemplateName;
- /** @field cast=(void *) */
- public long /*int*/ pvReserved;
- public int dwReserved;
- public int FlagsEx;
- public static final int sizeof = OS.OPENFILENAME_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
index 2e77e7ecf9..372eb78785 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -15,7 +15,11 @@
package org.eclipse.swt.internal.win32;
+import java.util.*;
+
+import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.widgets.*;
public class OS extends C {
static {
@@ -26,7 +30,27 @@ public class OS extends C {
* SWT Windows flags
*/
public static final boolean IsDBLocale;
+ /**
+ * WARNING: This value can't be trusted since Win10. If the launcher's exe
+ * doesn't have compatibility GUID in its manifest:<br>
+ * &lt;supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/&gt;<br>
+ * then '6.2.9200' will be returned (version number for Win8).
+ * JDK11 has the compatibility GUID, but Eclipse's launcher doesn't!
+ * This may cause different behavior in debugger and in released SWT.
+ */
public static final int WIN32_VERSION;
+ /**
+ * Always reports the correct build number, regardless of manifest and
+ * compatibility GUIDs. Note that build number alone is sufficient to
+ * identify Windows version.
+ */
+ public static final int WIN32_BUILD;
+ /**
+ * Values taken from https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions
+ */
+ public static final int WIN32_BUILD_WIN10_1809 = 17763; // "Windows 10 October 2018 Update"
+ public static final int WIN32_BUILD_WIN10_2004 = 19041; // "Windows 10 May 2020 Update"
+ public static final int WIN32_BUILD_WIN11_21H2 = 22000; // Initial Windows 11 release
public static final String NO_MANIFEST = "org.eclipse.swt.internal.win32.OS.NO_MANIFEST";
@@ -42,6 +66,20 @@ public class OS extends C {
int dwVersion = OS.GetVersion ();
WIN32_VERSION = VERSION (dwVersion & 0xff, (dwVersion >> 8) & 0xff);
+ /*
+ * Starting with Windows 10, GetVersionEx() lies about version unless
+ * application manifest has a proper entry. RtlGetVersion() always
+ * reports true version.
+ */
+ OSVERSIONINFOEX osVersionInfoEx = new OSVERSIONINFOEX ();
+ osVersionInfoEx.dwOSVersionInfoSize = OSVERSIONINFOEX.sizeof;
+ if (0 == OS.RtlGetVersion (osVersionInfoEx)) {
+ WIN32_BUILD = osVersionInfoEx.dwBuildNumber;
+ } else {
+ System.err.println ("SWT: OS: Failed to detect Windows build number");
+ WIN32_BUILD = 0;
+ }
+
/* Load the manifest to force the XP Theme */
if (System.getProperty (NO_MANIFEST) == null) {
ACTCTX pActCtx = new ACTCTX ();
@@ -49,8 +87,8 @@ public class OS extends C {
pActCtx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_HMODULE_VALID | ACTCTX_FLAG_SET_PROCESS_DEFAULT;
pActCtx.hModule = OS.GetLibraryHandle ();
pActCtx.lpResourceName = MANIFEST_RESOURCE_ID;
- long /*int*/ hActCtx = OS.CreateActCtx (pActCtx);
- long /*int*/ [] lpCookie = new long /*int*/ [1];
+ long hActCtx = OS.CreateActCtx (pActCtx);
+ long [] lpCookie = new long [1];
OS.ActivateActCtx (hActCtx, lpCookie);
/*
* NOTE: A single activation context is created and activated
@@ -77,8 +115,8 @@ public class OS extends C {
public static final int ABS_LEFTPRESSED = 11;
public static final int ABS_RIGHTDISABLED = 16;
public static final int ABS_RIGHTHOT = 14;
- public static final int ABS_RIGHTNORMAL = 13;
- public static final int ABS_RIGHTPRESSED = 15;
+ public static final int ABS_RIGHTNORMAL = 13;
+ public static final int ABS_RIGHTPRESSED = 15;
public static final int ABS_UPDISABLED = 4;
public static final int ABS_UPHOT = 2;
public static final int ABS_UPNORMAL = 1;
@@ -105,27 +143,11 @@ public class OS extends C {
public static final int BCM_GETNOTELENGTH = BCM_FIRST + 0xb;
public static final int BCM_SETIMAGELIST = BCM_FIRST + 0x2;
public static final int BCM_SETNOTE = BCM_FIRST + 0x9;
- public static final int BDR_RAISEDOUTER = 0x0001;
- public static final int BDR_SUNKENOUTER = 0x0002;
- public static final int BDR_RAISEDINNER = 0x0004;
public static final int BDR_SUNKENINNER = 0x0008;
- public static final int BDR_OUTER = 0x0003;
- public static final int BDR_INNER = 0x000c;
- public static final int BDR_RAISED = 0x0005;
- public static final int BDR_SUNKEN = 0x000a;
- public static final int BFFM_INITIALIZED = 0x1;
- public static final int BFFM_SETSELECTION = 0x467;
- public static final int BFFM_VALIDATEFAILED = 0x4;
- public static final int BF_ADJUST = 0x2000;
public static final int BF_LEFT = 0x0001;
public static final int BF_TOP = 0x0002;
public static final int BF_RIGHT = 0x0004;
public static final int BF_BOTTOM = 0x0008;
- public static final int BF_RECT = (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM);
- public static final int BIF_EDITBOX = 0x10;
- public static final int BIF_NEWDIALOGSTYLE = 0x40;
- public static final int BIF_RETURNONLYFSDIRS = 0x1;
- public static final int BIF_VALIDATE = 0x20;
public static final int BITSPIXEL = 0xc;
public static final int BI_BITFIELDS = 3;
public static final int BI_RGB = 0;
@@ -142,12 +164,6 @@ public class OS extends C {
public static final int BN_CLICKED = 0x0;
public static final int BN_DOUBLECLICKED = 0x5;
public static final int BPBF_COMPATIBLEBITMAP = 0;
- public static final int BPBF_DIB = 1;
- public static final int BPBF_TOPDOWNDIB = 2;
- public static final int BPBF_TOPDOWNMONODIB = 3;
- public static final int BPPF_ERASE = 0x0001;
- public static final int BPPF_NOCLIP = 0x0002;
- public static final int BPPF_NONCLIENT = 0x0004;
public static final int BP_PUSHBUTTON = 1;
public static final int BP_RADIOBUTTON = 2;
public static final int BP_CHECKBOX = 3;
@@ -232,9 +248,6 @@ public class OS extends C {
public static final int CCHDEVICENAME = 32;
public static final int CCHFORMNAME = 32;
public static final int CCHILDREN_SCROLLBAR = 5;
- public static final int CCM_FIRST = 0x2000;
- public static final int CCM_SETBKCOLOR = 0x2001;
- public static final int CCM_SETVERSION = 0x2007;
public static final int CCS_NODIVIDER = 0x40;
public static final int CCS_NORESIZE = 0x4;
public static final int CCS_VERT = 0x80;
@@ -276,23 +289,7 @@ public class OS extends C {
public static final int CDRF_NOTIFYSUBITEMDRAW = 0x00000020;
public static final int CDRF_SKIPDEFAULT = 0x04;
public static final int CDRF_SKIPPOSTPAINT = 0x00000100;
- public static final int CERT_SIMPLE_NAME_STR = 1;
- public static final int CFE_AUTOCOLOR = 0x40000000;
- public static final int CFE_ITALIC = 0x2;
- public static final int CFE_STRIKEOUT = 0x8;
- public static final int CFE_UNDERLINE = 0x4;
- public static final int CFM_BOLD = 0x1;
- public static final int CFM_CHARSET = 0x8000000;
- public static final int CFM_COLOR = 0x40000000;
- public static final int CFM_FACE = 0x20000000;
- public static final int CFM_ITALIC = 0x2;
- public static final int CFM_SIZE = 0x80000000;
- public static final int CFM_STRIKEOUT = 0x8;
- public static final int CFM_UNDERLINE = 0x4;
- public static final int CFM_WEIGHT = 0x400000;
- public static final int CFS_POINT = 0x2;
public static final int CFS_RECT = 0x1;
- public static final int CFS_CANDIDATEPOS = 0x0040;
public static final int CFS_EXCLUDE = 0x0080;
public static final int CF_EFFECTS = 0x100;
public static final int CF_INITTOLOGFONTSTRUCT = 0x40;
@@ -303,9 +300,6 @@ public class OS extends C {
public static final int CLR_DEFAULT = 0xff000000;
public static final int CLR_INVALID = 0xffffffff;
public static final int CLR_NONE = 0xffffffff;
- public static final int CLSCTX_INPROC_SERVER = 1;
- public static final int CSIDL_APPDATA = 0x1a;
- public static final int CSIDL_LOCAL_APPDATA = 0x1c;
public static final int COLORONCOLOR = 0x3;
public static final int COLOR_3DDKSHADOW = 0x15;
public static final int COLOR_3DFACE = 0xf;
@@ -347,12 +341,9 @@ public class OS extends C {
public static final int CS_VREDRAW = 0x1;
public static final int CS_OWNDC = 0x20;
public static final int CW_USEDEFAULT = 0x80000000;
+ public static final int CWP_SKIPINVISIBLE = 0x0001;
public static final String DATETIMEPICK_CLASS = "SysDateTimePick32"; //$NON-NLS-1$
public static final int DCX_CACHE = 0x2;
- public static final int DCX_CLIPCHILDREN = 0x8;
- public static final int DCX_CLIPSIBLINGS = 0x10;
- public static final int DCX_INTERSECTRGN = 0x80;
- public static final int DCX_WINDOW = 0x1;
public static final int DEFAULT_CHARSET = 0x1;
public static final int DEFAULT_GUI_FONT = 0x11;
public static final int DFCS_BUTTONCHECK = 0x0;
@@ -367,7 +358,6 @@ public class OS extends C {
public static final int DFC_BUTTON = 0x4;
public static final int DFC_SCROLL = 0x3;
public static final int DIB_RGB_COLORS = 0x0;
- public static final int DISP_E_EXCEPTION = 0x80020009;
public static final int DI_NORMAL = 0x3;
public static final int DI_NOMIRROR = 0x10;
public static final int DLGC_BUTTON = 0x2000;
@@ -433,11 +423,8 @@ public class OS extends C {
public static final int EBP_HEADERBACKGROUND = 1;
public static final int EC_LEFTMARGIN = 0x1;
public static final int EC_RIGHTMARGIN = 0x2;
- public static final int EDGE_RAISED = (BDR_RAISEDOUTER | BDR_RAISEDINNER);
- public static final int EDGE_SUNKEN = (BDR_SUNKENOUTER | BDR_SUNKENINNER);
- public static final int EDGE_ETCHED = (BDR_SUNKENOUTER | BDR_RAISEDINNER);
- public static final int EDGE_BUMP = (BDR_RAISEDOUTER | BDR_SUNKENINNER);
- public static final int ELF_VENDOR_SIZE = 4;
+ public static final int EDGE_SUNKEN = 10;
+ public static final int EDGE_ETCHED = 6;
public static final int EM_CANUNDO = 0xc6;
public static final int EM_CHARFROMPOS = 0xd7;
public static final int EM_DISPLAYBAND = 0x433;
@@ -495,16 +482,11 @@ public class OS extends C {
public static final int ETS_FOCUSED = 5;
public static final int ETS_READONLY = 6;
public static final int EVENT_OBJECT_FOCUS = 0x8005;
- public static final int EVENT_OBJECT_LOCATIONCHANGE = 0x800B;
- public static final int EVENT_OBJECT_SELECTIONWITHIN = 0x8009;
- public static final int EVENT_OBJECT_VALUECHANGE = 0x800E;
public static final short FADF_FIXEDSIZE = 0x10;
- public static final short FADF_HAVEVARTYPE = 0x80;
public static final int FALT = 0x10;
public static final int FCONTROL = 0x8;
public static final int FE_FONTSMOOTHINGCLEARTYPE = 0x0002;
public static final int FEATURE_DISABLE_NAVIGATION_SOUNDS = 21;
- public static final int FILE_ATTRIBUTE_DIRECTORY = 0x00000010;
public static final int FILE_ATTRIBUTE_NORMAL = 0x00000080;
public static final int FILE_MAP_READ = 4;
public static final int FLICKDIRECTION_RIGHT = 0;
@@ -516,27 +498,14 @@ public class OS extends C {
public static final int FLICKDIRECTION_DOWN = 6;
public static final int FLICKDIRECTION_DOWNRIGHT = 7;
public static final int FLICKDIRECTION_INVALID = 8;
- public static final int FNERR_INVALIDFILENAME = 0x3002;
- public static final int FNERR_BUFFERTOOSMALL = 0x3003;
- public static final int FOF_SILENT = 0x0004;
- public static final int FOF_NOCONFIRMATION = 0x0010;
- public static final int FOF_NOCONFIRMMKDIR = 0x0200;
- public static final int FOF_NOERRORUI = 0x0400;
- public static final int FOF_NO_UI = (FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR);
- public static final int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100;
- public static final int FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000;
- public static final int FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200;
+ public static final int FOS_OVERWRITEPROMPT = 0x2;
public static final int FOS_NOCHANGEDIR = 0x8;
public static final int FOS_PICKFOLDERS = 0x20;
public static final int FOS_FORCEFILESYSTEM = 0x40;
+ public static final int FOS_ALLOWMULTISELECT = 0x200;
public static final int FR_PRIVATE = 0x10;
public static final int FSHIFT = 0x4;
public static final int FVIRTKEY = 0x1;
- public static final int GBS_NORMAL = 1;
- public static final int GBS_DISABLED = 2;
- public static final int GBF_DIRECT = 0x00000001;
- public static final int GBF_COPY = 0x00000002;
- public static final int GBF_VALIDBITS = 0x00000003;
public static final int GCP_REORDER = 0x0002;
public static final int GCP_GLYPHSHAPE = 0x0010;
public static final int GCP_CLASSIN = 0x00080000;
@@ -558,8 +527,6 @@ public class OS extends C {
public static final int GID_ROTATE = 5;
public static final int GID_TWOFINGERTAP = 6;
public static final int GID_PRESSANDTAP = 7;
- public static final int GLPS_CLOSED = 1;
- public static final int GLPS_OPENED = 2;
public static final int GM_ADVANCED = 2;
public static final int GMDI_USEDISABLED = 0x1;
public static final int GMEM_FIXED = 0x0;
@@ -567,8 +534,6 @@ public class OS extends C {
public static final int GMEM_ZEROINIT = 0x40;
public static final int GRADIENT_FILL_RECT_H = 0x0;
public static final int GRADIENT_FILL_RECT_V = 0x1;
- public static final int GUI_16BITTASK = 0x20;
- public static final int GUI_CARETBLINKING = 0x1;
public static final int GUI_INMENUMODE = 0x4;
public static final int GUI_INMOVESIZE = 0x2;
public static final int GUI_POPUPMENUMODE = 0x10;
@@ -589,7 +554,7 @@ public class OS extends C {
public static final int GW_HWNDNEXT = 0x2;
public static final int GW_HWNDPREV = 0x3;
public static final int GW_OWNER = 0x4;
- public static final int HBMMENU_CALLBACK = 0xffffffff;
+ public static final long HBMMENU_CALLBACK = -1;
public static final int HCBT_CREATEWND = 3;
public static final int HCF_HIGHCONTRASTON = 0x1;
public static final int HDF_BITMAP = 0x2000;
@@ -632,15 +597,9 @@ public class OS extends C {
public static final int HDN_ITEMCLICK = HDN_FIRST - 22;
public static final int HDN_ITEMDBLCLICK = HDN_FIRST - 23;
public static final int HDS_BUTTONS = 0x2;
- public static final int HDS_CHECKBOXES = 0x400;
public static final int HDS_DRAGDROP = 0x0040;
- public static final int HDS_FILTERBAR = 0x100;
- public static final int HDS_FLAT = 0x200;
public static final int HDS_FULLDRAG = 0x80;
public static final int HDS_HIDDEN = 0x8;
- public static final int HDS_HOTTRACK = 0x4;
- public static final int HDS_NOSIZING = 0x800;
- public static final int HDS_OVERFLOW = 0x1000;
public static final int HEAP_ZERO_MEMORY = 0x8;
public static final int HELPINFO_MENUITEM = 0x2;
public static final int HHT_ONDIVIDER = 0x4;
@@ -648,7 +607,6 @@ public class OS extends C {
public static final int HICF_ARROWKEYS = 0x2;
public static final int HICF_LEAVING = 0x20;
public static final int HICF_MOUSE = 0x1;
- public static final int HINST_COMMCTRL = 0xffffffff;
public static final int HKEY_CLASSES_ROOT = 0x80000000;
public static final int HKEY_CURRENT_USER = 0x80000001;
public static final int HKEY_LOCAL_MACHINE = 0x80000002;
@@ -667,16 +625,11 @@ public class OS extends C {
public static final int HWND_TOP = 0x0;
public static final int HWND_TOPMOST = 0xffffffff;
public static final int HWND_NOTOPMOST = -2;
- public static final int ICC_COOL_CLASSES = 0x400;
- public static final int ICC_DATE_CLASSES = 0x100;
- public static final int ICM_NOTOPEN = 0x0;
public static final int ICON_BIG = 0x1;
public static final int ICON_SMALL = 0x0;
public static final int I_IMAGECALLBACK = -1;
public static final int I_IMAGENONE = -2;
public static final int IDABORT = 0x3;
- public static final int IDANI_CAPTION = 3;
- public static final int IDB_STD_SMALL_COLOR = 0x0;
public static final int IDC_APPSTARTING = 0x7f8a;
public static final int IDC_ARROW = 0x7f00;
public static final int IDC_CROSS = 0x7f03;
@@ -716,8 +669,6 @@ public class OS extends C {
public static final int INPUT_MOUSE = 0;
public static final int INTERNET_MAX_URL_LENGTH = 2084;
public static final int INTERNET_OPTION_END_BROWSER_SESSION = 42;
- public static final int KEY_ENUMERATE_SUB_KEYS = 0x8;
- public static final int KEY_NOTIFY = 0x10;
public static final int KEY_QUERY_VALUE = 0x1;
public static final int KEY_READ = 0x20019;
public static final int KEY_WRITE = 0x20006;
@@ -727,7 +678,6 @@ public class OS extends C {
public static final int LANG_JAPANESE = 0x11;
public static final int LANG_KOREAN = 0x12;
public static final int LANG_NEUTRAL = 0x0;
- public static final int LANG_USER_DEFAULT = 1 << 10;
public static final int LAYOUT_RTL = 0x1;
public static final int LBN_DBLCLK = 0x2;
public static final int LBN_SELCHANGE = 0x1;
@@ -763,19 +713,19 @@ public class OS extends C {
public static final int LB_SETHORIZONTALEXTENT = 0x194;
public static final int LB_SETSEL = 0x185;
public static final int LB_SETTOPINDEX = 0x197;
- public static final int LF_FULLFACESIZE = 64;
public static final int LF_FACESIZE = 32;
public static final int LGRPID_ARABIC = 0xd;
public static final int LGRPID_HEBREW = 0xc;
public static final int LGRPID_INSTALLED = 1;
public static final int LIF_ITEMINDEX = 0x1;
public static final int LIF_STATE = 0x2;
+ public static final int LIM_SMALL = 0;
public static final int LIS_FOCUSED = 0x1;
public static final int LIS_ENABLED = 0x2;
public static final int LISS_HOT = 0x2;
public static final int LISS_SELECTED = 0x3;
public static final int LISS_SELECTEDNOTFOCUS = 0x5;
- public static final int LM_GETIDEALHEIGHT = 0x701;
+ public static final int LM_GETIDEALSIZE = 0x701;
public static final int LM_SETITEM = 0x702;
public static final int LM_GETITEM = 0x703;
public static final int LCID_SUPPORTED = 0x2;
@@ -896,7 +846,6 @@ public class OS extends C {
public static final int LVS_EX_TRACKSELECT = 0x8;
public static final int LVS_EX_TRANSPARENTBKGND = 0x800000;
public static final int LVS_EX_TWOCLICKACTIVATE = 0x80;
- public static final int LVS_LIST = 0x3;
public static final int LVS_NOCOLUMNHEADER = 0x4000;
public static final int LVS_NOSCROLL = 0x2000;
public static final int LVS_OWNERDATA = 0x1000;
@@ -1044,7 +993,6 @@ public class OS extends C {
public static final int NULLREGION = 0x1;
public static final int NULL_BRUSH = 0x5;
public static final int NULL_PEN = 0x8;
- public static final int NUMRESERVED = 106;
public static final int OBJID_WINDOW = 0x00000000;
public static final int OBJID_SYSMENU = 0xFFFFFFFF;
public static final int OBJID_TITLEBAR = 0xFFFFFFFE;
@@ -1065,13 +1013,6 @@ public class OS extends C {
public static final int OBM_CHECKBOXES = 0x7ff7;
public static final int ODS_SELECTED = 0x1;
public static final int ODT_MENU = 0x1;
- public static final int OFN_ALLOWMULTISELECT = 0x200;
- public static final int OFN_EXPLORER = 0x80000;
- public static final int OFN_ENABLEHOOK = 0x20;
- public static final int OFN_ENABLESIZING = 0x800000;
- public static final int OFN_HIDEREADONLY = 0x4;
- public static final int OFN_NOCHANGEDIR = 0x8;
- public static final int OFN_OVERWRITEPROMPT = 0x2;
public static final int OIC_BANG = 0x7F03;
public static final int OIC_HAND = 0x7F01;
public static final int OIC_INFORMATION = 0x7F04;
@@ -1105,7 +1046,6 @@ public class OS extends C {
public static final int PD_COLLATE = 0x10;
public static final int PD_PAGENUMS = 0x2;
public static final int PD_PRINTTOFILE = 0x20;
- public static final int PD_RETURNDC = 0x100;
public static final int PD_RETURNDEFAULT = 0x00000400;
public static final int PD_SELECTION = 0x1;
public static final int PD_USEDEVMODECOPIESANDCOLLATE = 0x40000;
@@ -1134,10 +1074,6 @@ public class OS extends C {
public static final int PM_QS_SENDMESSAGE = QS_SENDMESSAGE << 16;
public static final int PM_REMOVE = 0x1;
public static final String PROGRESS_CLASS = "msctls_progress32"; //$NON-NLS-1$
- public static final int PP_BAR = 1;
- public static final int PP_BARVERT = 2;
- public static final int PP_CHUNK = 3;
- public static final int PP_CHUNKVERT = 4;
public static final int PRF_CHILDREN = 16;
public static final int PRF_CLIENT = 0x4;
public static final int PRF_ERASEBKGND = 0x8;
@@ -1210,7 +1146,6 @@ public class OS extends C {
public static final int RB_SETBANDINFO = 0x40b;
public static final int RB_SETBKCOLOR = 0x413;
public static final int RB_SETTEXTCOLOR = 0x415;
- public static final int RC_PALETTE = 0x100;
public static final int RDW_ALLCHILDREN = 0x80;
public static final int RDW_ERASE = 0x4;
public static final int RDW_FRAME = 0x400;
@@ -1224,17 +1159,7 @@ public class OS extends C {
public static final int RGN_DIFF = 0x4;
public static final int RGN_ERROR = 0;
public static final int RGN_OR = 0x2;
- public static final int RP_BAND = 3;
public static final int SBP_ARROWBTN = 0x1;
- public static final int SBP_THUMBBTNHORZ = 2;
- public static final int SBP_THUMBBTNVERT = 3;
- public static final int SBP_LOWERTRACKHORZ = 4;
- public static final int SBP_UPPERTRACKHORZ = 5;
- public static final int SBP_LOWERTRACKVERT = 6;
- public static final int SBP_UPPERTRACKVERT = 7;
- public static final int SBP_GRIPPERHORZ = 8;
- public static final int SBP_GRIPPERVERT = 9;
- public static final int SBP_SIZEBOX = 10;
public static final int SBS_HORZ = 0x0;
public static final int SBS_VERT = 0x1;
public static final int SB_BOTH = 0x3;
@@ -1269,7 +1194,6 @@ public class OS extends C {
public static final int SCRBS_HOT = 2;
public static final int SCRBS_PRESSED = 3;
public static final int SCRBS_DISABLED = 4;
- public static final int SEM_FAILCRITICALERRORS = 0x1;
public static final int SET_FEATURE_ON_PROCESS = 0x2;
public static final int SHADEBLENDCAPS = 120;
public static final int SHGFI_ICON = 0x000000100;
@@ -1282,13 +1206,9 @@ public class OS extends C {
public static final int SIF_POS = 0x4;
public static final int SIF_RANGE = 0x1;
public static final int SIF_TRACKPOS = 0x10;
- public static final int SIP_DOWN = 1;
- public static final int SIP_UP = 0;
- public static final int SIPF_ON = 0x1;
public static final int SIZE_RESTORED = 0;
public static final int SIZE_MINIMIZED = 1;
public static final int SIZE_MAXIMIZED = 2;
- public static final int SIZEPALETTE = 104;
public static final int SM_CMONITORS = 80;
public static final int SM_CXBORDER = 0x5;
public static final int SM_CXCURSOR = 0xd;
@@ -1309,11 +1229,14 @@ public class OS extends C {
public static final int SM_CXVSCROLL = 0x2;
public static final int SM_CYBORDER = 0x6;
public static final int SM_CYCURSOR = 0xe;
+ public static final int SM_CYEDGE = 0x2e;
public static final int SM_CYFOCUSBORDER = 84;
public static final int SM_CYHSCROLL = 0x3;
public static final int SM_CYMENU = 0xf;
public static final int SM_CXMINTRACK = 34;
public static final int SM_CYMINTRACK = 35;
+ public static final int SM_CXMAXTRACK = 59;
+ public static final int SM_CYMAXTRACK = 60;
public static final int SM_CMOUSEBUTTONS = 43;
public static final int SM_CYSCREEN = 0x1;
public static final int SM_CYVSCROLL = 0x14;
@@ -1324,6 +1247,7 @@ public class OS extends C {
public static final int SPI_GETWORKAREA = 0x30;
public static final int SPI_GETMOUSEVANISH = 0x1020;
public static final int SPI_GETNONCLIENTMETRICS = 41;
+ public static final int SPI_GETWHEELSCROLLCHARS = 108;
public static final int SPI_GETWHEELSCROLLLINES = 104;
public static final int SPI_GETCARETWIDTH = 0x2006;
public static final int SPI_SETSIPINFO = 224;
@@ -1361,6 +1285,7 @@ public class OS extends C {
public static final int STM_SETIMAGE = 0x172;
public static final int SWP_ASYNCWINDOWPOS = 0x4000;
public static final int SWP_DRAWFRAME = 0x20;
+ public static final int SWP_FRAMECHANGED = 0x0020;
public static final int SWP_NOACTIVATE = 0x10;
public static final int SWP_NOCOPYBITS = 0x100;
public static final int SWP_NOMOVE = 0x2;
@@ -1383,23 +1308,7 @@ public class OS extends C {
public static final int SYSRGN = 0x4;
public static final int SYSTEM_FONT = 0xd;
public static final int S_OK = 0x0;
- public static final int TABP_TABITEM = 1;
- public static final int TABP_TABITEMLEFTEDGE = 2;
- public static final int TABP_TABITEMRIGHTEDGE = 3;
- public static final int TABP_TABITEMBOTHEDGE = 4;
- public static final int TABP_TOPTABITEM = 5;
- public static final int TABP_TOPTABITEMLEFTEDGE = 6;
- public static final int TABP_TOPTABITEMRIGHTEDGE = 7;
- public static final int TABP_TOPTABITEMBOTHEDGE = 8;
- public static final int TABP_PANE = 9;
public static final int TABP_BODY = 10;
- public static final int TBCDRF_BLENDICON = 0x200000;
- public static final int TBCDRF_HILITEHOTTRACK = 0x20000;
- public static final int TBCDRF_NOBACKGROUND = 0x400000;
- public static final int TBCDRF_NOEDGES = 0x10000;
- public static final int TBCDRF_NOETCHEDEFFECT = 0x100000;
- public static final int TBCDRF_NOMARK = 0x80000;
- public static final int TBCDRF_NOOFFSET = 0x40000;
public static final int TBCDRF_USECDCOLORS = 0x800000;
public static final int TBIF_COMMAND = 0x20;
public static final int TBIF_STATE = 0x4;
@@ -1522,21 +1431,6 @@ public class OS extends C {
public static final int TF_LS_DOT = 2;
public static final int TF_LS_DASH = 3;
public static final int TF_LS_SQUIGGLE = 4;
- public static final int TIS_NORMAL = 1;
- public static final int TIS_HOT = 2;
- public static final int TIS_SELECTED = 3;
- public static final int TIS_DISABLED = 4;
- public static final int TIS_FOCUSED = 5;
- public static final int TKP_TRACK = 1;
- public static final int TKP_TRACKVERT = 2;
- public static final int TKP_THUMB = 3;
- public static final int TKP_THUMBBOTTOM = 4;
- public static final int TKP_THUMBTOP = 5;
- public static final int TKP_THUMBVERT = 6;
- public static final int TKP_THUMBLEFT = 7;
- public static final int TKP_THUMBRIGHT = 8;
- public static final int TKP_TICS = 9;
- public static final int TKP_TICSVERT = 10;
public static final int TME_HOVER = 0x1;
public static final int TME_LEAVE = 0x2;
public static final int TME_QUERY = 0x40000000;
@@ -1551,12 +1445,6 @@ public class OS extends C {
public static final int TOUCHEVENTF_PALM = 0x0080;
public static final String TOOLBARCLASSNAME = "ToolbarWindow32"; //$NON-NLS-1$
public static final String TOOLTIPS_CLASS = "tooltips_class32"; //$NON-NLS-1$
- public static final int TP_BUTTON = 1;
- public static final int TP_DROPDOWNBUTTON = 2;
- public static final int TP_SPLITBUTTON = 3;
- public static final int TP_SPLITBUTTONDROPDOWN = 4;
- public static final int TP_SEPARATOR = 5;
- public static final int TP_SEPARATORVERT = 6;
public static final int TPM_LEFTALIGN = 0x0;
public static final int TPM_LEFTBUTTON = 0x0;
public static final int TPM_RIGHTBUTTON = 0x2;
@@ -1642,10 +1530,10 @@ public class OS extends C {
public static final int TVIS_EXPANDED = 0x20;
public static final int TVIS_SELECTED = 0x2;
public static final int TVIS_STATEIMAGEMASK = 0xf000;
- public static final long /*int*/ TVI_FIRST = -0x0FFFF;
- public static final long /*int*/ TVI_LAST = -0x0FFFE;
- public static final long /*int*/ TVI_ROOT = -0x10000;
- public static final long /*int*/ TVI_SORT = -0x0FFFD;
+ public static final long TVI_FIRST = -0x0FFFF;
+ public static final long TVI_LAST = -0x0FFFE;
+ public static final long TVI_ROOT = -0x10000;
+ public static final long TVI_SORT = -0x0FFFD;
public static final int TVM_CREATEDRAGIMAGE = TV_FIRST + 18;
public static final int TVM_DELETEITEM = 0x1101;
public static final int TVM_ENSUREVISIBLE = 0x1114;
@@ -1900,13 +1788,15 @@ public class OS extends C {
public static final int WM_NOTIFY = 0x4e;
public static final int WM_NULL = 0x0;
public static final int WM_PAINT = 0xf;
- public static final int WM_PALETTECHANGED = 0x311;
public static final int WM_PARENTNOTIFY = 0x0210;
+ public static final int WM_ENTERMENULOOP = 0x0211;
+ public static final int WM_EXITMENULOOP = 0x0212;
+ public static final int WM_ENTERSIZEMOVE = 0x0231;
+ public static final int WM_EXITSIZEMOVE = 0x0232;
public static final int WM_PASTE = 0x302;
public static final int WM_PRINT = 0x0317;
public static final int WM_PRINTCLIENT = 0x0318;
public static final int WM_QUERYENDSESSION = 0x11;
- public static final int WM_QUERYNEWPALETTE = 0x30f;
public static final int WM_QUERYOPEN = 0x13;
public static final int WM_QUERYUISTATE = 0x129;
public static final int WM_RBUTTONDBLCLK = 0x206;
@@ -1977,7 +1867,6 @@ public class OS extends C {
public static final int WM_XBUTTONDBLCLK = 0x020D;
public static final int XBUTTON1 = 0x1;
public static final int XBUTTON2 = 0x2;
- public static final int X509_ASN_ENCODING = 1;
public static int VERSION (int major, int minor) {
return major << 16 | minor;
@@ -1990,33 +1879,22 @@ public static final native int BITMAP_sizeof ();
public static final native int BITMAPINFOHEADER_sizeof ();
public static final native int BLENDFUNCTION_sizeof ();
public static final native int BP_PAINTPARAMS_sizeof ();
-public static final native int BROWSEINFO_sizeof ();
public static final native int BUTTON_IMAGELIST_sizeof ();
public static final native int CANDIDATEFORM_sizeof ();
-public static final native int CERT_CONTEXT_sizeof ();
-public static final native int CERT_INFO_sizeof ();
-public static final native int CERT_NAME_BLOB_sizeof ();
-public static final native int CERT_PUBLIC_KEY_INFO_sizeof ();
public static final native int CHOOSECOLOR_sizeof ();
public static final native int CHOOSEFONT_sizeof ();
public static final native int COMBOBOXINFO_sizeof ();
public static final native int COMPOSITIONFORM_sizeof ();
public static final native int CREATESTRUCT_sizeof ();
-public static final native int CRYPT_ALGORITHM_IDENTIFIER_sizeof ();
-public static final native int CRYPT_BIT_BLOB_sizeof ();
-public static final native int CRYPT_INTEGER_BLOB_sizeof ();
-public static final native int CRYPT_OBJID_BLOB_sizeof ();
public static final native int DEVMODE_sizeof ();
public static final native int DIBSECTION_sizeof ();
public static final native int DOCHOSTUIINFO_sizeof ();
public static final native int DOCINFO_sizeof ();
public static final native int DRAWITEMSTRUCT_sizeof ();
public static final native int DROPFILES_sizeof ();
-public static final native int DTTOPTS_sizeof ();
public static final native int EMR_sizeof ();
public static final native int EMREXTCREATEFONTINDIRECTW_sizeof ();
public static final native int EXTLOGFONTW_sizeof ();
-public static final native int FILETIME_sizeof ();
public static final native int FLICK_DATA_sizeof ();
public static final native int FLICK_POINT_sizeof ();
public static final native int GCP_RESULTS_sizeof ();
@@ -2030,6 +1908,7 @@ public static final native int HDHITTESTINFO_sizeof ();
public static final native int HELPINFO_sizeof ();
public static final native int HIGHCONTRAST_sizeof ();
public static final native int ICONINFO_sizeof ();
+public static final native int CIDA_sizeof ();
public static final native int INITCOMMONCONTROLSEX_sizeof ();
public static final native int INPUT_sizeof ();
public static final native int KEYBDINPUT_sizeof ();
@@ -2075,11 +1954,9 @@ public static final native int NMUPDOWN_sizeof ();
public static final native int NONCLIENTMETRICS_sizeof ();
/** @method flags=const */
public static final native int NOTIFYICONDATA_V2_SIZE ();
-public static final native int OFNOTIFY_sizeof ();
-public static final native int OPENFILENAME_sizeof ();
public static final native int OUTLINETEXTMETRIC_sizeof ();
+public static final native int OSVERSIONINFOEX_sizeof ();
public static final native int PAINTSTRUCT_sizeof ();
-public static final native int PANOSE_sizeof ();
public static final native int POINT_sizeof ();
public static final native int PRINTDLG_sizeof ();
public static final native int PROCESS_INFORMATION_sizeof ();
@@ -2091,7 +1968,6 @@ public static final native int SAFEARRAY_sizeof ();
public static final native int SAFEARRAYBOUND_sizeof ();
public static final native int SCRIPT_ANALYSIS_sizeof ();
public static final native int SCRIPT_CONTROL_sizeof ();
-public static final native int SCRIPT_DIGITSUBSTITUTE_sizeof ();
public static final native int SCRIPT_FONTPROPERTIES_sizeof ();
public static final native int SCRIPT_ITEM_sizeof ();
public static final native int SCRIPT_LOGATTR_sizeof ();
@@ -2120,7 +1996,6 @@ public static final native int TRIVERTEX_sizeof ();
public static final native int TVHITTESTINFO_sizeof ();
public static final native int TVINSERTSTRUCT_sizeof ();
public static final native int TVITEM_sizeof ();
-public static final native int TVITEMEX_sizeof ();
public static final native int TVSORTCB_sizeof ();
public static final native int UDACCEL_sizeof ();
public static final native int WINDOWPLACEMENT_sizeof ();
@@ -2129,7 +2004,7 @@ public static final native int WNDCLASS_sizeof ();
/** Ansi/Unicode wrappers */
-public static final long /*int*/ AddFontResourceEx (TCHAR lpszFilename, int fl, long /*int*/ pdv) {
+public static final long AddFontResourceEx (TCHAR lpszFilename, int fl, long pdv) {
char [] lpszFilename1 = lpszFilename == null ? null : lpszFilename.chars;
return AddFontResourceEx (lpszFilename1, fl, pdv);
}
@@ -2141,24 +2016,24 @@ public static final int AssocQueryString(int flags, int str, TCHAR pszAssoc, TCH
return AssocQueryString (flags, str, pszAssoc1, pszExtra1, pszOut1, pcchOut);
}
-public static final long /*int*/ CreateDC (TCHAR lpszDriver, TCHAR lpszDevice, long /*int*/ lpszOutput, long /*int*/ lpInitData) {
+public static final long CreateDC (TCHAR lpszDriver, TCHAR lpszDevice, long lpszOutput, long lpInitData) {
char [] lpszDriver1 = lpszDriver == null ? null : lpszDriver.chars;
char [] lpszDevice1 = lpszDevice == null ? null : lpszDevice.chars;
return CreateDC (lpszDriver1, lpszDevice1, lpszOutput, lpInitData);
}
-public static final long /*int*/ CreateWindowEx (int dwExStyle, TCHAR lpClassName, TCHAR lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, long /*int*/ hWndParent, long /*int*/ hMenu, long /*int*/ hInstance, CREATESTRUCT lpParam) {
+public static final long CreateWindowEx (int dwExStyle, TCHAR lpClassName, TCHAR lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, long hWndParent, long hMenu, long hInstance, CREATESTRUCT lpParam) {
char [] lpClassName1 = lpClassName == null ? null : lpClassName.chars;
char [] lpWindowName1 = lpWindowName == null ? null : lpWindowName.chars;
return CreateWindowEx (dwExStyle, lpClassName1, lpWindowName1, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
}
-public static final int DocumentProperties (long /*int*/ hWnd, long /*int*/ hPrinter, TCHAR pDeviceName, long /*int*/ pDevModeOutput, long /*int*/ pDevModeInput, int fMode) {
+public static final int DocumentProperties (long hWnd, long hPrinter, TCHAR pDeviceName, long pDevModeOutput, long pDevModeInput, int fMode) {
char [] pDeviceName1 = pDeviceName == null ? null : pDeviceName.chars;
return DocumentProperties (hWnd, hPrinter, pDeviceName1, pDevModeOutput, pDevModeInput, fMode);
}
-public static final int DrawText (long /*int*/ hDC, TCHAR lpString, int nCount, RECT lpRect, int uFormat) {
+public static final int DrawText (long hDC, TCHAR lpString, int nCount, RECT lpRect, int uFormat) {
char [] lpString1 = lpString == null ? null : lpString.chars;
return DrawText (hDC, lpString1, nCount, lpRect, uFormat);
}
@@ -2169,12 +2044,12 @@ public static final int ExpandEnvironmentStrings (TCHAR lpSrc, TCHAR lpDst, int
return ExpandEnvironmentStrings (lpSrc1, lpDst1, nSize);
}
-public static final int ExtractIconEx (TCHAR lpszFile, int nIconIndex, long /*int*/ [] phiconLarge, long /*int*/ [] phiconSmall, int nIcons) {
+public static final int ExtractIconEx (TCHAR lpszFile, int nIconIndex, long [] phiconLarge, long [] phiconSmall, int nIcons) {
char [] lpszFile1 = lpszFile == null ? null : lpszFile.chars;
return ExtractIconEx (lpszFile1, nIconIndex, phiconLarge, phiconSmall, nIcons);
}
-public static final boolean GetClassInfo (long /*int*/ hInstance, TCHAR lpClassName, WNDCLASS lpWndClass) {
+public static final boolean GetClassInfo (long hInstance, TCHAR lpClassName, WNDCLASS lpWndClass) {
boolean result;
char [] lpClassName1 = lpClassName == null ? null : lpClassName.chars;
@@ -2197,7 +2072,7 @@ public static final int GetLocaleInfo (int Locale, int LCType, TCHAR lpLCData, i
return GetLocaleInfo (Locale, LCType, lpLCData1, cchData);
}
-public static final int GetModuleFileName (long /*int*/ hModule, TCHAR lpFilename, int inSize) {
+public static final int GetModuleFileName (long hModule, TCHAR lpFilename, int inSize) {
char [] lpFilename1 = lpFilename == null ? null : lpFilename.chars;
return GetModuleFileName (hModule, lpFilename1, inSize);
}
@@ -2210,7 +2085,7 @@ public static final int GetProfileString (TCHAR lpAppName, TCHAR lpKeyName, TCHA
return GetProfileString (lpAppName1, lpKeyName1, lpDefault1, lpReturnedString1, nSize);
}
-public static final int GetWindowText (long /*int*/ hWnd, TCHAR lpString, int nMaxCount) {
+public static final int GetWindowText (long hWnd, TCHAR lpString, int nMaxCount) {
char [] lpString1 = lpString == null ? null : lpString.chars;
return GetWindowText (hWnd, lpString1, nMaxCount);
}
@@ -2220,7 +2095,7 @@ public static final int GlobalAddAtom (TCHAR lpString) {
return GlobalAddAtom (lpString1);
}
-public static final long /*int*/ ImmEscape (long /*int*/ hKL,long /*int*/ hIMC, int uEscape, TCHAR lpData) {
+public static final long ImmEscape (long hKL,long hIMC, int uEscape, TCHAR lpData) {
char [] lpData1 = lpData == null ? null : lpData.chars;
return ImmEscape (hKL, hIMC, uEscape, lpData1);
}
@@ -2239,39 +2114,63 @@ public static final boolean InternetSetCookie (TCHAR lpszUrl, TCHAR lpszCookieNa
return InternetSetCookie (url, cookieName, cookieData);
}
-public static final int MessageBox (long /*int*/ hWnd, TCHAR lpText, TCHAR lpCaption, int uType) {
+public static final int MessageBox (long hWnd, TCHAR lpText, TCHAR lpCaption, int uType) {
char [] lpText1 = lpText == null ? null : lpText.chars;
char [] lpCaption1 = lpCaption == null ? null : lpCaption.chars;
return MessageBox (hWnd, lpText1, lpCaption1, uType);
}
-public static final void MoveMemory (long /*int*/ Destination, TCHAR Source, int Length) {
+public static final void MoveMemory (long Destination, TCHAR Source, int Length) {
char [] Source1 = Source == null ? null : Source.chars;
MoveMemory (Destination, Source1, Length);
}
-public static final void MoveMemory (TCHAR Destination, long /*int*/ Source, int Length) {
+public static final void MoveMemory (TCHAR Destination, long Source, int Length) {
char [] Destination1 = Destination == null ? null : Destination.chars;
MoveMemory (Destination1, Source, Length);
}
-public static final boolean OpenPrinter (TCHAR pPrinterName, long /*int*/ [] phPrinter, long /*int*/ pDefault) {
+public static final boolean OpenPrinter (TCHAR pPrinterName, long [] phPrinter, long pDefault) {
char [] pPrinterName1 = pPrinterName == null ? null : pPrinterName.chars;
return OpenPrinter (pPrinterName1, phPrinter, pDefault);
}
-public static final int RegCreateKeyEx (long /*int*/ hKey, TCHAR lpSubKey, int Reserved, TCHAR lpClass, int dwOptions, int samDesired, long /*int*/ lpSecurityAttributes, long /*int*/[] phkResult, long /*int*/[] lpdwDisposition) {
+public static final int[] readRegistryDwords(int hkeyLocation, String key, String valueName) {
+ final int ERROR_MORE_DATA = 234;
+ Objects.requireNonNull("key", key);
+ Objects.requireNonNull("valueName", valueName);
+ long[] phkResult = new long[1];
+ TCHAR regKey = new TCHAR(0, key, true);
+ TCHAR lpValueName = new TCHAR(0, valueName, true);
+ if (OS.RegOpenKeyEx(hkeyLocation, regKey, 0, OS.KEY_READ, phkResult) != 0) {
+ return null; // Registry entry not found
+ }
+ int size = 2;
+ int result;
+ do {
+ int[] lpcbData = new int[] { 4 * size }; // 4 bytes per int
+ int[] lpData = new int[size];
+ result = OS.RegQueryValueEx(phkResult[0], lpValueName, 0, null, lpData, lpcbData);
+ OS.RegCloseKey(phkResult[0]);
+ if (result == 0) {
+ return lpData;
+ }
+ size *= 2;
+ } while (result == ERROR_MORE_DATA);
+ return null; // other error
+}
+public static final int RegCreateKeyEx (long hKey, TCHAR lpSubKey, int Reserved, TCHAR lpClass, int dwOptions, int samDesired, long lpSecurityAttributes, long[] phkResult, long[] lpdwDisposition) {
char [] lpClass1 = lpClass == null ? null : lpClass.chars;
char [] lpSubKey1 = lpSubKey == null ? null : lpSubKey.chars;
return RegCreateKeyEx (hKey, lpSubKey1, Reserved, lpClass1, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition);
}
-public static final int RegDeleteValue (long /*int*/ hKey, TCHAR lpValueName) {
+public static final int RegDeleteValue (long hKey, TCHAR lpValueName) {
char [] lpValueName1 = lpValueName == null ? null : lpValueName.chars;
return RegDeleteValue (hKey, lpValueName1);
}
-public static final int RegEnumKeyEx (long /*int*/ hKey, int dwIndex, TCHAR lpName, int [] lpcName, int [] lpReserved, TCHAR lpClass, int [] lpcClass, FILETIME lpftLastWriteTime) {
+public static final int RegEnumKeyEx (long hKey, int dwIndex, TCHAR lpName, int [] lpcName, int [] lpReserved, TCHAR lpClass, int [] lpcClass, long lpftLastWriteTime) {
char [] lpName1 = lpName == null ? null : lpName.chars;
char [] lpClass1 = lpClass == null ? null : lpClass.chars;
return RegEnumKeyEx (hKey, dwIndex, lpName1, lpcName, lpReserved, lpClass1, lpcClass, lpftLastWriteTime);
@@ -2279,7 +2178,7 @@ public static final int RegEnumKeyEx (long /*int*/ hKey, int dwIndex, TCHAR lpNa
public static final int RegisterClass (TCHAR lpszClassName, WNDCLASS lpWndClass) {
/* Allocate a native string */
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int byteCount = lpszClassName.length () * TCHAR.sizeof;
lpWndClass.lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpWndClass.lpszClassName, lpszClassName, byteCount);
@@ -2303,48 +2202,85 @@ public static final int RegisterWindowMessage (TCHAR lpString) {
return RegisterWindowMessage (lpString1);
}
-public static final int RegOpenKeyEx (long /*int*/ hKey, TCHAR lpSubKey, int ulOptions, int samDesired, long /*int*/[] phkResult) {
+public static final int RegOpenKeyEx (long hKey, TCHAR lpSubKey, int ulOptions, int samDesired, long[] phkResult) {
char [] lpSubKey1 = lpSubKey == null ? null : lpSubKey.chars;
return RegOpenKeyEx (hKey, lpSubKey1, ulOptions, samDesired, phkResult);
}
-public static final int RegQueryValueEx (long /*int*/ hKey, TCHAR lpValueName, long /*int*/ lpReserved, int[] lpType, TCHAR lpData, int[] lpcbData) {
+public static final int RegQueryValueEx (long hKey, TCHAR lpValueName, long lpReserved, int[] lpType, TCHAR lpData, int[] lpcbData) {
char [] lpValueName1 = lpValueName == null ? null : lpValueName.chars;
char [] lpData1 = lpData == null ? null : lpData.chars;
return RegQueryValueEx (hKey, lpValueName1, lpReserved, lpType, lpData1, lpcbData);
}
-public static final int RegQueryValueEx (long /*int*/ hKey, TCHAR lpValueName, long /*int*/ lpReserved, int[] lpType, int [] lpData, int[] lpcbData) {
+public static final int RegQueryValueEx (long hKey, TCHAR lpValueName, long lpReserved, int[] lpType, int [] lpData, int[] lpcbData) {
char [] lpValueName1 = lpValueName == null ? null : lpValueName.chars;
return RegQueryValueEx (hKey, lpValueName1, lpReserved, lpType, lpData, lpcbData);
}
-public static final int RegSetValueEx (long /*int*/ hKey, TCHAR lpValueName, int Reserved, int dwType, int[] lpData, int cbData) {
+public static final int RegSetValueEx (long hKey, TCHAR lpValueName, int Reserved, int dwType, int[] lpData, int cbData) {
char [] lpValueName1 = lpValueName == null ? null : lpValueName.chars;
return RegSetValueEx (hKey, lpValueName1, Reserved, dwType, lpData, cbData);
}
-public static final long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TCHAR lParam) {
+public static final long SendMessage (long hWnd, int Msg, long wParam, TCHAR lParam) {
char [] lParam1 = lParam == null ? null : lParam.chars;
return SendMessage (hWnd, Msg, wParam, lParam1);
}
-public static final boolean SetDllDirectory (TCHAR lpPathName) {
- char [] lpPathName1 = lpPathName == null ? null : lpPathName.chars;
- return SetDllDirectory (lpPathName1);
+/**
+ * Experimental API for dark theme.
+ * <p>
+ * On Windows, there is no OS API for dark theme yet, and this method only
+ * configures various tweaks. Some of these tweaks have drawbacks. The tweaks
+ * are configured with defaults that fit Eclipse. Non-Eclipse applications are
+ * expected to configure individual tweaks instead of calling this method.
+ * Please see <code>Display#setData()</code> and documentation for string keys
+ * used there.
+ * </p>
+ * <p>
+ * On GTK, behavior may be different as the boolean flag doesn't force dark
+ * theme instead it specify that dark theme is preferred.
+ * </p>
+ *
+ * @param isDarkTheme <code>true</code> for dark theme
+ */
+public static final void setTheme(boolean isDarkTheme) {
+ /*
+ * On macOS and GTK, setting dark theme is supported by system API.
+ * Probably this is why it was chosen to have 'OS.setTheme()' SWT API
+ * in 'OS' rather then 'Display'. However, on Windows, there is no
+ * official API yet, just some tweaks to tailor things that SWT can't
+ * color properly. These use settings in Display to allow applications
+ * to configure individual tweaks.
+ */
+
+ Display display = Display.getCurrent();
+ if (display == null)
+ throw new NullPointerException("Display must be already created before you call OS.setTheme()");
+
+ display.setData("org.eclipse.swt.internal.win32.useDarkModeExplorerTheme", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.useShellTitleColoring", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.menuBarForegroundColor", isDarkTheme ? new Color(display, 0xD0, 0xD0, 0xD0) : null);
+ display.setData("org.eclipse.swt.internal.win32.menuBarBackgroundColor", isDarkTheme ? new Color(display, 0x30, 0x30, 0x30) : null);
+ display.setData("org.eclipse.swt.internal.win32.menuBarBorderColor", isDarkTheme ? new Color(display, 0x50, 0x50, 0x50) : null);
+ display.setData("org.eclipse.swt.internal.win32.Canvas.use_WS_BORDER", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.List.use_WS_BORDER", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.Table.use_WS_BORDER", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.Text.use_WS_BORDER", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.Tree.use_WS_BORDER", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.Table.headerLineColor", isDarkTheme ? new Color(display, 0x50, 0x50, 0x50) : null);
+ display.setData("org.eclipse.swt.internal.win32.Label.disabledForegroundColor", isDarkTheme ? new Color(display, 0x80, 0x80, 0x80) : null);
+ display.setData("org.eclipse.swt.internal.win32.Combo.useDarkTheme", isDarkTheme);
+ display.setData("org.eclipse.swt.internal.win32.ProgressBar.useColors", isDarkTheme);
}
-public static final boolean SetWindowText (long /*int*/ hWnd, TCHAR lpString) {
+public static final boolean SetWindowText (long hWnd, TCHAR lpString) {
char [] lpString1 = lpString == null ? null : lpString.chars;
return SetWindowText (hWnd, lpString1);
}
-public static final boolean SHGetPathFromIDList (long /*int*/ pidl, TCHAR pszPath) {
- char [] pszPath1 = pszPath == null ? null : pszPath.chars;
- return SHGetPathFromIDList (pidl, pszPath1);
-}
-
-public static final boolean UnregisterClass (TCHAR lpClassName, long /*int*/ hInstance) {
+public static final boolean UnregisterClass (TCHAR lpClassName, long hInstance) {
char [] lpClassName1 = lpClassName == null ? null : lpClassName.chars;
return UnregisterClass (lpClassName1, hInstance);
}
@@ -2355,47 +2291,77 @@ public static final int UrlCreateFromPath (TCHAR pszPath, TCHAR pszURL, int[] pc
return UrlCreateFromPath (path, url, pcchUrl, flags);
}
+/* Macros */
+
+public static final int GET_WHEEL_DELTA_WPARAM (long wParam) { return (short)HIWORD (wParam); }
+public static final int GET_X_LPARAM (long lp) { return (short)LOWORD (lp); }
+public static final int GET_Y_LPARAM (long lp) { return (short)HIWORD (lp); }
+public static final int HIWORD (long l) { return (int)l >>> 16; }
+public static final int LOWORD (long l) { return (int)l & 0xffff; }
+public static final int MAKEWORD (int l, int h) { return (l & 0xff) | ((h & 0xff) << 8); }
+public static final long MAKELPARAM (int l, int h) { return ((l & 0xffff) | (h << 16)) & 0xffffffffL; }
+public static final long MAKELRESULT (int l, int h) { return MAKELPARAM (l, h); }
+public static final long MAKEWPARAM (int l, int h) { return MAKELPARAM (l, h); }
+public static final void POINTSTOPOINT (POINT pt, long pts) { pt.x = (short)LOWORD (pts); pt.y = (short)HIWORD (pts); }
+public static final int PRIMARYLANGID (int lgid) { return lgid & 0x3ff; }
+public static final int TOUCH_COORD_TO_PIXEL (int touchCoord) { return touchCoord / 100; }
+public static int HRESULT_FROM_WIN32(int x) {
+ return x <= 0 ? x : ((x & 0x0000FFFF) | 0x80070000);
+}
+
/** Natives */
/** @param hdc cast=(HDC) */
-public static final native int AbortDoc (long /*int*/ hdc);
+public static final native int AbortDoc (long hdc);
/**
* @param hActCtx cast=(HANDLE)
* @param lpCookie cast=(ULONG_PTR*)
*/
-public static final native boolean ActivateActCtx (long /*int*/ hActCtx, long /*int*/ [] lpCookie);
+public static final native boolean ActivateActCtx (long hActCtx, long [] lpCookie);
/** @param hkl cast=(HKL) */
-public static final native long /*int*/ ActivateKeyboardLayout(long /*int*/ hkl, int Flags);
-/** @param pdv cast=(PVOID) */
-public static final native int AddFontResourceEx(char[] lpszFilename, int fl, long /*int*/ pdv);
+public static final native long ActivateKeyboardLayout(long hkl, int Flags);
+/**
+ * @param lpszFilename flags=no_out
+ * @param pdv cast=(PVOID)
+ */
+public static final native int AddFontResourceEx(char[] lpszFilename, int fl, long pdv);
public static final native boolean AdjustWindowRectEx (RECT lpRect, int dwStyle, boolean bMenu, int dwExStyle);
+/** @method flags=no_gen */
+public static final native boolean AllowDarkModeForWindow(long hWnd, boolean allow);
public static final native boolean AllowSetForegroundWindow (int dwProcessId);
/**
* @param hdcDest cast=(HDC)
* @param hdcSrc cast=(HDC)
* @param blendFunction flags=struct
*/
-public static final native boolean AlphaBlend(long /*int*/ hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, long /*int*/ hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, BLENDFUNCTION blendFunction);
+public static final native boolean AlphaBlend(long hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, long hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, BLENDFUNCTION blendFunction);
/** @param hdc cast=(HDC) */
-public static final native boolean Arc (long /*int*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc);
+public static final native boolean Arc (long hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc);
+/**
+ * @param pszAssoc flags=no_out
+ * @param pszExtra flags=no_out
+ * @param pcchOut cast=(DWORD *)
+ */
public static final native int AssocQueryString (int flags, int str, char[] pszAssoc, char[] pszExtra, char[] pszOut, int[] pcchOut);
/**
* @param hdcTarget cast=(HDC)
+ * @param prcTarget flags=no_out
* @param phdc cast=(HDC*)
*/
-public static final native long /*int*/ BeginBufferedPaint (long /*int*/ hdcTarget, RECT prcTarget, int dwFormat, BP_PAINTPARAMS pPaintParams, long /*int*/ [] phdc);
-public static final native long /*int*/ BeginDeferWindowPos (int nNumWindows);
-/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ BeginPaint (long /*int*/ hWnd, PAINTSTRUCT lpPaint);
-/** @param hdc cast=(HDC) */
-public static final native boolean BeginPath(long /*int*/ hdc);
+public static final native long BeginBufferedPaint (long hdcTarget, RECT prcTarget, int dwFormat, BP_PAINTPARAMS pPaintParams, long [] phdc);
+public static final native long BeginDeferWindowPos (int nNumWindows);
+/**
+ * @param hWnd cast=(HWND)
+ * @param lpPaint flags=no_in
+ */
+public static final native long BeginPaint (long hWnd, PAINTSTRUCT lpPaint);
/**
* @param hdcDest cast=(HDC)
* @param hdcSrc cast=(HDC)
*/
-public static final native boolean BitBlt (long /*int*/ hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, long /*int*/ hdcSrc, int nXSrc, int nYSrc, int dwRop);
+public static final native boolean BitBlt (long hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, long hdcSrc, int nXSrc, int nYSrc, int dwRop);
/** @param hWnd cast=(HWND) */
-public static final native boolean BringWindowToTop (long /*int*/ hWnd);
+public static final native boolean BringWindowToTop (long hWnd);
public static final native int BufferedPaintInit ();
public static final native int BufferedPaintUnInit ();
/**
@@ -2403,53 +2369,39 @@ public static final native int BufferedPaintUnInit ();
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ CallNextHookEx(long /*int*/ hhk, int nCode, long /*int*/ wParam, long /*int*/ lParam);
+public static final native long CallNextHookEx(long hhk, int nCode, long wParam, long lParam);
/**
* @param lpPrevWndFunc cast=(WNDPROC)
* @param hWnd cast=(HWND)
*/
-public static final native long /*int*/ CallWindowProc (long /*int*/ lpPrevWndFunc, long /*int*/ hWnd, int Msg, long /*int*/ wParam, long /*int*/ lParam);
-/**
- * @param pName cast=(PCERT_NAME_BLOB)
- * @param psz cast=(LPWSTR)
- */
-public static final native int CertNameToStr (int dwCertEncodingType, CERT_NAME_BLOB pName, int dwStrType, char[] psz, int csz);
+public static final native long CallWindowProc (long lpPrevWndFunc, long hWnd, int Msg, long wParam, long lParam);
/** @param ch cast=(LPWSTR) */
-public static final native long /*int*/ CharLower (long /*int*/ ch);
+public static final native long CharLower (long ch);
/** @param ch cast=(LPWSTR) */
-public static final native long /*int*/ CharUpper (long /*int*/ ch);
-/** @param lpcc cast=(LPCHOOSECOLORW) */
+public static final native long CharUpper (long ch);
+/**
+ * @param hWndParent cast=(HWND)
+ * @param pt flags=struct
+ * @param flags cast=(UINT)
+ */
+public static final native long ChildWindowFromPointEx (long hWndParent, POINT pt, int flags);
public static final native boolean ChooseColor (CHOOSECOLOR lpcc);
-/** @param chooseFont cast=(LPCHOOSEFONTW) */
public static final native boolean ChooseFont (CHOOSEFONT chooseFont);
/** @param hWnd cast=(HWND) */
-public static final native boolean ClientToScreen (long /*int*/ hWnd, POINT lpPoint);
+public static final native boolean ClientToScreen (long hWnd, POINT lpPoint);
public static final native boolean CloseClipboard ();
/** @param hdc cast=(HDC) */
-public static final native long /*int*/ CloseEnhMetaFile (long /*int*/ hdc);
-/**
- * @method flags=dynamic
- * @param hGesture cast=(HGESTUREINFO)
- */
-public static final native long /*int*/ CloseGestureInfoHandle (long /*int*/ hGesture);
+public static final native long CloseEnhMetaFile (long hdc);
+/** @param hGesture cast=(HGESTUREINFO) */
+public static final native long CloseGestureInfoHandle (long hGesture);
/** @param hObject cast=(HANDLE) */
-public static final native boolean CloseHandle (long /*int*/ hObject);
+public static final native boolean CloseHandle (long hObject);
/** @param hPrinter cast=(HANDLE) */
-public static final native boolean ClosePrinter (long /*int*/ hPrinter);
+public static final native boolean ClosePrinter (long hPrinter);
/** @param hTheme cast=(HTHEME) */
-public static final native int CloseThemeData (long /*int*/ hTheme);
-/**
- * @method flags=dynamic
- * @param hTouchInput cast=(HTOUCHINPUT)
- */
-public static final native boolean CloseTouchInputHandle(long /*int*/ hTouchInput);
-/**
- * @param rclsid cast=(REFCLSID)
- * @param pUnkOuter cast=(LPUNKNOWN)
- * @param riid cast=(REFIID)
- * @param ppv cast=(LPVOID *)
- */
-public static final native int CoCreateInstance (byte[] rclsid, long /*int*/ pUnkOuter, int dwClsContext, byte[] riid, long /*int*/[] ppv);
+public static final native int CloseThemeData (long hTheme);
+/** @param hTouchInput cast=(HTOUCHINPUT) */
+public static final native boolean CloseTouchInputHandle(long hTouchInput);
public static final native int CoInternetIsFeatureEnabled (int FeatureEntry, int dwFlags);
/** @param fEnable cast=(BOOL) */
public static final native int CoInternetSetFeatureEnabled (int FeatureEntry, int dwFlags, boolean fEnable);
@@ -2458,78 +2410,76 @@ public static final native int CoInternetSetFeatureEnabled (int FeatureEntry, in
* @param hrgnSrc1 cast=(HRGN)
* @param hrgnSrc2 cast=(HRGN)
*/
-public static final native int CombineRgn (long /*int*/ hrgnDest, long /*int*/ hrgnSrc1, long /*int*/ hrgnSrc2, int fnCombineMode);
-public static final native int CommDlgExtendedError ();
+public static final native int CombineRgn (long hrgnDest, long hrgnSrc1, long hrgnSrc2, int fnCombineMode);
/** @param hImage cast=(HANDLE) */
-public static final native long /*int*/ CopyImage (long /*int*/ hImage, int uType, int cxDesired, int cyDesired, int fuFlags);
+public static final native long CopyImage (long hImage, int uType, int cxDesired, int cyDesired, int fuFlags);
/** @param cb cast=(ULONG) */
-public static final native long /*int*/ CoTaskMemAlloc(int cb);
+public static final native long CoTaskMemAlloc(int cb);
/** @param pv cast=(LPVOID) */
-public static final native void CoTaskMemFree(long /*int*/ pv);
-/** @param lpaccl cast=(LPACCEL) */
-public static final native long /*int*/ CreateAcceleratorTable (byte [] lpaccl, int cEntries);
+public static final native void CoTaskMemFree(long pv);
+/** @param lpaccl cast=(LPACCEL),flags=no_out */
+public static final native long CreateAcceleratorTable (byte [] lpaccl, int cEntries);
/** @param pActCtx flags=no_out */
-public static final native long /*int*/ CreateActCtx (ACTCTX pActCtx);
+public static final native long CreateActCtx (ACTCTX pActCtx);
/** @param lpvBits cast=(CONST VOID *),flags=no_out critical */
-public static final native long /*int*/ CreateBitmap (int nWidth, int nHeight, int cPlanes, int cBitsPerPel, byte [] lpvBits);
+public static final native long CreateBitmap (int nWidth, int nHeight, int cPlanes, int cBitsPerPel, byte [] lpvBits);
/**
* @param hWnd cast=(HWND)
* @param hBitmap cast=(HBITMAP)
*/
-public static final native boolean CreateCaret (long /*int*/ hWnd, long /*int*/ hBitmap, int nWidth, int nHeight);
+public static final native boolean CreateCaret (long hWnd, long hBitmap, int nWidth, int nHeight);
/** @param hdc cast=(HDC) */
-public static final native long /*int*/ CreateCompatibleBitmap (long /*int*/ hdc, int nWidth, int nHeight);
+public static final native long CreateCompatibleBitmap (long hdc, int nWidth, int nHeight);
/** @param hdc cast=(HDC) */
-public static final native long /*int*/ CreateCompatibleDC (long /*int*/ hdc);
+public static final native long CreateCompatibleDC (long hdc);
/**
* @param hInst cast=(HINSTANCE)
* @param pvANDPlane cast=(CONST VOID *),flags=no_out critical
* @param pvXORPlane cast=(CONST VOID *),flags=no_out critical
*/
-public static final native long /*int*/ CreateCursor (long /*int*/ hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte [] pvANDPlane, byte [] pvXORPlane);
+public static final native long CreateCursor (long hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte [] pvANDPlane, byte [] pvXORPlane);
/**
* @param lpszDriver cast=(LPWSTR)
* @param lpszDevice cast=(LPWSTR)
* @param lpszOutput cast=(LPWSTR)
* @param lpInitData cast=(CONST DEVMODEW *)
*/
-public static final native long /*int*/ CreateDC (char [] lpszDriver, char [] lpszDevice, long /*int*/ lpszOutput, long /*int*/ lpInitData);
+public static final native long CreateDC (char [] lpszDriver, char [] lpszDevice, long lpszOutput, long lpInitData);
/**
* @param hdc cast=(HDC)
* @param pbmi cast=(BITMAPINFO *),flags=no_out critical
* @param ppvBits cast=(VOID **),flags=no_in critical
* @param hSection cast=(HANDLE)
*/
-public static final native long /*int*/ CreateDIBSection(long /*int*/ hdc, byte[] pbmi, int iUsage, long /*int*/[] ppvBits, long /*int*/ hSection, int dwOffset);
+public static final native long CreateDIBSection(long hdc, byte[] pbmi, int iUsage, long[] ppvBits, long hSection, int dwOffset);
/**
* @param hdc cast=(HDC)
* @param pbmi cast=(BITMAPINFO *),flags=no_out critical
* @param ppvBits cast=(VOID **),flags=no_in critical
* @param hSection cast=(HANDLE)
*/
-public static final native long /*int*/ CreateDIBSection(long /*int*/ hdc, long /*int*/ pbmi, int iUsage, long /*int*/[] ppvBits, long /*int*/ hSection, int dwOffset);
+public static final native long CreateDIBSection(long hdc, long pbmi, int iUsage, long[] ppvBits, long hSection, int dwOffset);
/**
* @param hdcRef cast=(HDC)
- * @param lpFilename cast=(LPCWSTR)
- * @param lpDescription cast=(LPCWSTR)
+ * @param lpFilename cast=(LPCWSTR),flags=no_out
+ * @param lpRect flags=no_out
+ * @param lpDescription cast=(LPCWSTR),flags=no_out
*/
-public static final native long /*int*/ CreateEnhMetaFile (long /*int*/ hdcRef, char[] lpFilename, RECT lpRect, char[] lpDescription);
+public static final native long CreateEnhMetaFile (long hdcRef, char[] lpFilename, RECT lpRect, char[] lpDescription);
/** @param lplf cast=(LPLOGFONTW) */
-public static final native long /*int*/ CreateFontIndirect (long /*int*/ lplf);
+public static final native long CreateFontIndirect (long lplf);
/** @param lplf flags=no_out */
-public static final native long /*int*/ CreateFontIndirect (LOGFONT lplf);
+public static final native long CreateFontIndirect (LOGFONT lplf);
/** @param lplf flags=no_out */
-public static final native long /*int*/ CreateIconIndirect (ICONINFO lplf);
-public static final native long /*int*/ CreateMenu ();
-/** @param logPalette cast=(LOGPALETTE *),flags=no_out critical */
-public static final native long /*int*/ CreatePalette (byte[] logPalette);
+public static final native long CreateIconIndirect (ICONINFO lplf);
+public static final native long CreateMenu ();
/** @param hbmp cast=(HBITMAP) */
-public static final native long /*int*/ CreatePatternBrush (long /*int*/ hbmp);
+public static final native long CreatePatternBrush (long hbmp);
/** @param crColor cast=(COLORREF) */
-public static final native long /*int*/ CreatePen (int fnPenStyle, int nWidth, int crColor);
+public static final native long CreatePen (int fnPenStyle, int nWidth, int crColor);
/** @param lppt cast=(CONST POINT *) */
-public static final native long /*int*/ CreatePolygonRgn(int[] lppt, int cPoints, int fnPolyFillMode);
-public static final native long /*int*/ CreatePopupMenu ();
+public static final native long CreatePolygonRgn(int[] lppt, int cPoints, int fnPolyFillMode);
+public static final native long CreatePopupMenu ();
/**
* @param lpApplicationName cast=(LPCWSTR)
* @param lpCommandLine cast=(LPWSTR)
@@ -2537,72 +2487,72 @@ public static final native long /*int*/ CreatePopupMenu ();
* @param lpThreadAttributes cast=(LPSECURITY_ATTRIBUTES)
* @param lpEnvironment cast=(LPVOID)
* @param lpCurrentDirectory cast=(LPWSTR)
- * @param lpStartupInfo cast=(LPSTARTUPINFOW)
- * @param lpProcessInformation cast=(LPPROCESS_INFORMATION)
+ * @param lpStartupInfo flags=no_out
+ * @param lpProcessInformation flags=no_in
*/
-public static final native boolean CreateProcess (long /*int*/ lpApplicationName, long /*int*/ lpCommandLine, long /*int*/ lpProcessAttributes, long /*int*/ lpThreadAttributes, boolean bInheritHandles, int dwCreationFlags, long /*int*/ lpEnvironment, long /*int*/ lpCurrentDirectory, STARTUPINFO lpStartupInfo, PROCESS_INFORMATION lpProcessInformation);
-public static final native long /*int*/ CreateRectRgn (int left, int top, int right, int bottom);
+public static final native boolean CreateProcess (long lpApplicationName, long lpCommandLine, long lpProcessAttributes, long lpThreadAttributes, boolean bInheritHandles, int dwCreationFlags, long lpEnvironment, long lpCurrentDirectory, STARTUPINFO lpStartupInfo, PROCESS_INFORMATION lpProcessInformation);
+public static final native long CreateRectRgn (int left, int top, int right, int bottom);
/** @param colorRef cast=(COLORREF) */
-public static final native long /*int*/ CreateSolidBrush (int colorRef);
+public static final native long CreateSolidBrush (int colorRef);
/**
* @param hGlobal cast=(HGLOBAL)
* @param fDeleteOnRelease cast=(BOOL)
* @param ppstm cast=(LPSTREAM *)
*/
-public static final native int CreateStreamOnHGlobal(long /*int*/ hGlobal, boolean fDeleteOnRelease, long /*int*/[] ppstm);
+public static final native int CreateStreamOnHGlobal(long hGlobal, boolean fDeleteOnRelease, long[] ppstm);
/**
- * @param lpClassName cast=(LPWSTR)
- * @param lpWindowName cast=(LPWSTR)
+ * @param lpClassName cast=(LPWSTR),flags=no_out
+ * @param lpWindowName cast=(LPWSTR),flags=no_out
* @param hWndParent cast=(HWND)
* @param hMenu cast=(HMENU)
* @param hInstance cast=(HINSTANCE)
*/
-public static final native long /*int*/ CreateWindowEx (int dwExStyle, char [] lpClassName, char [] lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, long /*int*/ hWndParent, long /*int*/ hMenu, long /*int*/ hInstance, CREATESTRUCT lpParam);
+public static final native long CreateWindowEx (int dwExStyle, char [] lpClassName, char [] lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, long hWndParent, long hMenu, long hInstance, CREATESTRUCT lpParam);
/**
* @param hWinPosInfo cast=(HDWP)
* @param hWnd cast=(HWND)
* @param hWndInsertAfter cast=(HWND)
*/
-public static final native long /*int*/ DeferWindowPos (long /*int*/ hWinPosInfo, long /*int*/ hWnd, long /*int*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
+public static final native long DeferWindowPos (long hWinPosInfo, long hWnd, long hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ DefMDIChildProc (long /*int*/ hWnd, int Msg, long /*int*/ wParam, long /*int*/ lParam);
+public static final native long DefMDIChildProc (long hWnd, int Msg, long wParam, long lParam);
/**
* @param hWnd cast=(HWND)
* @param hWndMDIClient cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ DefFrameProc (long /*int*/ hWnd, long /*int*/ hWndMDIClient, int Msg, long /*int*/ wParam, long /*int*/ lParam);
+public static final native long DefFrameProc (long hWnd, long hWndMDIClient, int Msg, long wParam, long lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ DefWindowProc (long /*int*/ hWnd, int Msg, long /*int*/ wParam, long /*int*/ lParam);
+public static final native long DefWindowProc (long hWnd, int Msg, long wParam, long lParam);
/** @param hdc cast=(HDC) */
-public static final native boolean DeleteDC (long /*int*/ hdc);
+public static final native boolean DeleteDC (long hdc);
/** @param hemf cast=(HENHMETAFILE) */
-public static final native boolean DeleteEnhMetaFile (long /*int*/ hemf);
+public static final native boolean DeleteEnhMetaFile (long hemf);
/** @param hMenu cast=(HMENU) */
-public static final native boolean DeleteMenu (long /*int*/ hMenu, int uPosition, int uFlags);
+public static final native boolean DeleteMenu (long hMenu, int uPosition, int uFlags);
/** @param hGdiObj cast=(HGDIOBJ) */
-public static final native boolean DeleteObject (long /*int*/ hGdiObj);
+public static final native boolean DeleteObject (long hGdiObj);
/** @param hAccel cast=(HACCEL) */
-public static final native boolean DestroyAcceleratorTable (long /*int*/ hAccel);
+public static final native boolean DestroyAcceleratorTable (long hAccel);
public static final native boolean DestroyCaret ();
/** @param hCursor cast=(HCURSOR) */
-public static final native boolean DestroyCursor (long /*int*/ hCursor);
+public static final native boolean DestroyCursor (long hCursor);
/** @param hIcon cast=(HICON) */
-public static final native boolean DestroyIcon (long /*int*/ hIcon);
+public static final native boolean DestroyIcon (long hIcon);
/** @param hMenu cast=(HMENU) */
-public static final native boolean DestroyMenu (long /*int*/ hMenu);
+public static final native boolean DestroyMenu (long hMenu);
/** @param hWnd cast=(HWND) */
-public static final native boolean DestroyWindow (long /*int*/ hWnd);
-public static final native long /*int*/ DispatchMessage (MSG lpmsg);
+public static final native boolean DestroyWindow (long hWnd);
+public static final native long DispatchMessage (MSG lpmsg);
/**
* @param hWnd cast=(HWND)
* @param hPrinter cast=(HANDLE)
@@ -2610,242 +2560,248 @@ public static final native long /*int*/ DispatchMessage (MSG lpmsg);
* @param pDevModeOutput cast=(PDEVMODEW)
* @param pDevModeInput cast=(PDEVMODEW)
*/
-public static final native int DocumentProperties (long /*int*/ hWnd, long /*int*/ hPrinter, char[] pDeviceName, long /*int*/ pDevModeOutput, long /*int*/ pDevModeInput, int fMode);
+public static final native int DocumentProperties (long hWnd, long hPrinter, char[] pDeviceName, long pDevModeOutput, long pDevModeInput, int fMode);
/**
* @param hwnd cast=(HWND)
* @param pt flags=struct
*/
-public static final native boolean DragDetect (long /*int*/ hwnd, POINT pt);
+public static final native boolean DragDetect (long hwnd, POINT pt);
/** @param hDrop cast=(HDROP) */
-public static final native void DragFinish (long /*int*/ hDrop);
+public static final native void DragFinish (long hDrop);
/**
* @param hDrop cast=(HDROP)
* @param lpszFile cast=(LPWSTR)
*/
-public static final native int DragQueryFile (long /*int*/ hDrop, int iFile, char[] lpszFile, int cch);
+public static final native int DragQueryFile (long hDrop, int iFile, char[] lpszFile, int cch);
/** @param hdc cast=(HDC) */
-public static final native boolean DrawEdge (long /*int*/ hdc, RECT qrc, int edge, int grfFlags);
-/** @param hDC cast=(HDC) */
-public static final native boolean DrawFocusRect (long /*int*/ hDC, RECT lpRect);
-/** @param hdc cast=(HDC) */
-public static final native boolean DrawFrameControl (long /*int*/ hdc, RECT lprc, int uType, int uState);
+public static final native boolean DrawEdge (long hdc, RECT qrc, int edge, int grfFlags);
+/**
+ * @param hDC cast=(HDC)
+ * @param lpRect flags=no_out
+ */
+public static final native boolean DrawFocusRect (long hDC, RECT lpRect);
+/**
+ * @param hdc cast=(HDC)
+ * @param lprc flags=no_out
+ */
+public static final native boolean DrawFrameControl (long hdc, RECT lprc, int uType, int uState);
/**
* @param hdc cast=(HDC)
* @param hIcon cast=(HICON)
* @param hbrFlickerFreeDraw cast=(HBRUSH)
*/
-public static final native boolean DrawIconEx (long /*int*/ hdc, int xLeft, int yTop, long /*int*/ hIcon, int cxWidth, int cyWidth, int istepIfAniCur, long /*int*/ hbrFlickerFreeDraw, int diFlags);
+public static final native boolean DrawIconEx (long hdc, int xLeft, int yTop, long hIcon, int cxWidth, int cyWidth, int istepIfAniCur, long hbrFlickerFreeDraw, int diFlags);
/** @param hWnd cast=(HWND) */
-public static final native boolean DrawMenuBar (long /*int*/ hWnd);
+public static final native boolean DrawMenuBar (long hWnd);
/**
* @param hDC cast=(HDC)
* @param lpString cast=(LPWSTR),flags=no_out critical
*/
-public static final native int DrawText (long /*int*/ hDC, char [] lpString, int nCount, RECT lpRect, int uFormat);
+public static final native int DrawText (long hDC, char [] lpString, int nCount, RECT lpRect, int uFormat);
/**
* @param hTheme cast=(HTHEME)
* @param hdc cast=(HDC)
- * @param pRect cast=(const RECT *)
- * @param pClipRect cast=(const RECT *)
+ * @param pRect flags=no_out
+ * @param pClipRect flags=no_out
*/
-public static final native int DrawThemeBackground (long /*int*/ hTheme, long /*int*/ hdc, int iPartId, int iStateId, RECT pRect, RECT pClipRect);
+public static final native int DrawThemeBackground (long hTheme, long hdc, int iPartId, int iStateId, RECT pRect, RECT pClipRect);
/**
* @param hTheme cast=(HTHEME)
* @param hdc cast=(HDC)
+ * @param pszText flags=no_out
+ * @param pRect flags=no_out
*/
-public static final native int DrawThemeText (long /*int*/ hTheme, long /*int*/ hdc, int iPartId, int iStateId, char[] pszText, int iCharCount, int dwTextFlags, int dwTextFlags2, RECT pRect);
+public static final native int DrawThemeText (long hTheme, long hdc, int iPartId, int iStateId, char[] pszText, int iCharCount, int dwTextFlags, int dwTextFlags2, RECT pRect);
+/** @param hwnd cast=(HDC) */
+public static final native boolean DwmSetWindowAttribute (long hwnd, int dwAttribute, int[] pvAttribute, int cbAttribute);
/** @param hdc cast=(HDC) */
-public static final native boolean Ellipse (long /*int*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
+public static final native boolean Ellipse (long hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
/** @param hMenu cast=(HMENU) */
-public static final native boolean EnableMenuItem (long /*int*/ hMenu, int uIDEnableItem, int uEnable);
+public static final native boolean EnableMenuItem (long hMenu, int uIDEnableItem, int uEnable);
/** @param hWnd cast=(HWND) */
-public static final native boolean EnableScrollBar (long /*int*/ hWnd, int wSBflags, int wArrows);
+public static final native boolean EnableScrollBar (long hWnd, int wSBflags, int wArrows);
/** @param hWnd cast=(HWND) */
-public static final native boolean EnableWindow (long /*int*/ hWnd, boolean bEnable);
+public static final native boolean EnableWindow (long hWnd, boolean bEnable);
/**
* @param pLangGroupEnumProc cast=(LANGUAGEGROUP_ENUMPROCW)
* @param lParam cast=(LONG_PTR)
*/
-public static final native boolean EnumSystemLanguageGroups (long /*int*/ pLangGroupEnumProc, int dwFlags, long /*int*/ lParam);
+public static final native boolean EnumSystemLanguageGroups (long pLangGroupEnumProc, int dwFlags, long lParam);
/** @param lpLocaleEnumProc cast=(LOCALE_ENUMPROCW) */
-public static final native boolean EnumSystemLocales (long /*int*/ lpLocaleEnumProc, int dwFlags);
+public static final native boolean EnumSystemLocales (long lpLocaleEnumProc, int dwFlags);
/** @param hWinPosInfo cast=(HDWP) */
-public static final native boolean EndDeferWindowPos (long /*int*/ hWinPosInfo);
+public static final native boolean EndDeferWindowPos (long hWinPosInfo);
/** @param hBufferedPaint cast=(HPAINTBUFFER) */
-public static final native int EndBufferedPaint (long /*int*/ hBufferedPaint, boolean fUpdateTarget);
+public static final native int EndBufferedPaint (long hBufferedPaint, boolean fUpdateTarget);
/** @param hdc cast=(HDC) */
-public static final native int EndDoc (long /*int*/ hdc);
+public static final native int EndDoc (long hdc);
/** @param hdc cast=(HDC) */
-public static final native int EndPage (long /*int*/ hdc);
-/** @param hWnd cast=(HWND) */
-public static final native int EndPaint (long /*int*/ hWnd, PAINTSTRUCT lpPaint);
+public static final native int EndPage (long hdc);
+/**
+ * @param hWnd cast=(HWND)
+ * @param lpPaint flags=no_out
+ */
+public static final native int EndPaint (long hWnd, PAINTSTRUCT lpPaint);
/**
* @param hdc cast=(HDC)
- * @param lprcClip cast=(LPCRECT)
+ * @param lprcClip flags=no_out
* @param lpfnEnum cast=(MONITORENUMPROC)
* @param dwData cast=(LPARAM)
*/
-public static final native boolean EnumDisplayMonitors (long /*int*/ hdc, RECT lprcClip, long /*int*/ lpfnEnum, int dwData);
+public static final native boolean EnumDisplayMonitors (long hdc, RECT lprcClip, long lpfnEnum, int dwData);
/**
* @param hdc cast=(HDC)
* @param hemf cast=(HENHMETAFILE)
* @param lpEnhMetaFunc cast=(ENHMFENUMPROC)
* @param lpData cast=(LPVOID)
*/
-public static final native boolean EnumEnhMetaFile(long /*int*/ hdc, long /*int*/ hemf, long /*int*/ lpEnhMetaFunc, long /*int*/ lpData, RECT lpRect);
+public static final native boolean EnumEnhMetaFile(long hdc, long hemf, long lpEnhMetaFunc, long lpData, RECT lpRect);
/**
* @param hdc cast=(HDC)
- * @param lpszFamily cast=(LPCWSTR)
+ * @param lpszFamily cast=(LPCWSTR),flags=no_out
* @param lpEnumFontFamProc cast=(FONTENUMPROCW)
* @param lParam cast=(LPARAM)
*/
-public static final native int EnumFontFamilies (long /*int*/ hdc, char [] lpszFamily, long /*int*/ lpEnumFontFamProc, long /*int*/ lParam);
+public static final native int EnumFontFamilies (long hdc, char [] lpszFamily, long lpEnumFontFamProc, long lParam);
/**
- * @param lprc1 cast=(CONST RECT *),flags=no_out
- * @param lprc2 cast=(CONST RECT *),flags=no_out
+ * @param lprc1 flags=no_out
+ * @param lprc2 flags=no_out
*/
public static final native boolean EqualRect (RECT lprc1, RECT lprc2);
/** @param hdc cast=(HDC) */
-public static final native int ExcludeClipRect (long /*int*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
+public static final native int ExcludeClipRect (long hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
+/** @param lpSrc flags=no_out */
public static final native int ExpandEnvironmentStrings (char [] lpSrc, char [] lsDst, int nSize);
/**
- * @param lplb cast=(CONST LOGBRUSH *)
+ * @param lplb flags=no_out
* @param lpStyle cast=(CONST DWORD *)
*/
-public static final native long /*int*/ ExtCreatePen (int dwPenStyle, int dwWidth, LOGBRUSH lplb, int dwStyleCount, int[] lpStyle);
+public static final native long ExtCreatePen (int dwPenStyle, int dwWidth, LOGBRUSH lplb, int dwStyleCount, int[] lpStyle);
/**
* @param lpXform cast=(XFORM *)
* @param lpRgnData cast=(CONST RGNDATA *)
*/
-public static final native long /*int*/ ExtCreateRegion (float[] lpXform, int nCount, int[] lpRgnData);
+public static final native long ExtCreateRegion (float[] lpXform, int nCount, int[] lpRgnData);
/**
* @param hdc cast=(HDC)
* @param lprc flags=no_out
* @param lpString cast=(LPWSTR),flags=no_out critical
* @param lpDx cast=(CONST INT *),flags=no_out critical
*/
-public static final native boolean ExtTextOut (long /*int*/ hdc, int X, int Y, int fuOptions, RECT lprc, char[] lpString, int cbCount, int[] lpDx);
+public static final native boolean ExtTextOut (long hdc, int X, int Y, int fuOptions, RECT lprc, char[] lpString, int cbCount, int[] lpDx);
/**
* @param lpszFile cast=(LPWSTR)
* @param phiconLarge cast=(HICON FAR *)
* @param phiconSmall cast=(HICON FAR *)
*/
-public static final native int ExtractIconEx (char [] lpszFile, int nIconIndex, long /*int*/ [] phiconLarge, long /*int*/ [] phiconSmall, int nIcons);
-public static final native boolean FileTimeToSystemTime (FILETIME lpFileTime, SYSTEMTIME lpSystemTime);
+public static final native int ExtractIconEx (char [] lpszFile, int nIconIndex, long [] phiconLarge, long [] phiconSmall, int nIcons);
/**
* @param hDC cast=(HDC)
* @param lprc flags=no_out
* @param hbr cast=(HBRUSH)
*/
-public static final native int FillRect (long /*int*/ hDC, RECT lprc, long /*int*/ hbr);
-/**
- * @param lpSource cast=(LPCVOID)
- * @param lpBuffer cast=(LPWSTR)
- * @param Arguments cast=(va_list*)
- */
-public static final native int FormatMessage (int dwFlags, long /*int*/ lpSource, int dwMessageId, int dwLanguageId, long /*int*/ [] lpBuffer, int nSize, long /*int*/ Arguments);
+public static final native int FillRect (long hDC, RECT lprc, long hbr);
/** @param dwLimit cast=(DWORD) */
public static final native int GdiSetBatchLimit (int dwLimit);
-public static final native int GET_WHEEL_DELTA_WPARAM(long /*int*/ wParam);
-public static final native int GET_X_LPARAM(long /*int*/ lp);
-public static final native int GET_Y_LPARAM(long /*int*/ lp);
public static final native int GetACP ();
-public static final native long /*int*/ GetActiveWindow ();
+public static final native long GetActiveWindow ();
/** @param hDC cast=(HDC) */
-public static final native int GetBkColor (long /*int*/ hDC);
-public static final native long /*int*/ GetCapture ();
+public static final native int GetBkColor (long hDC);
+public static final native long GetCapture ();
+/** @param lpPoint flags=no_in */
public static final native boolean GetCaretPos (POINT lpPoint);
/**
* @param hdc cast=(HDC)
* @param lpabc cast=(LPABC),flags=no_in critical
*/
-public static final native boolean GetCharABCWidths (long /*int*/ hdc, int iFirstChar, int iLastChar, int [] lpabc);
+public static final native boolean GetCharABCWidths (long hdc, int iFirstChar, int iLastChar, int [] lpabc);
/**
* @param hdc cast=(HDC)
* @param lpString cast=(LPWSTR),flags=no_out critical
- * @param lpResults cast=(LPGCP_RESULTSW)
*/
-public static final native int GetCharacterPlacement (long /*int*/ hdc, char[] lpString, int nCount, int nMaxExtent, GCP_RESULTS lpResults, int dwFlags);
+public static final native int GetCharacterPlacement (long hdc, char[] lpString, int nCount, int nMaxExtent, GCP_RESULTS lpResults, int dwFlags);
/**
* @param hdc cast=(HDC)
* @param lpBuffer cast=(LPINT),flags=no_in critical
*/
-public static final native boolean GetCharWidth (long /*int*/ hdc, int iFirstChar, int iLastChar, int [] lpBuffer);
+public static final native boolean GetCharWidth (long hdc, int iFirstChar, int iLastChar, int [] lpBuffer);
/**
* @param hInstance cast=(HINSTANCE)
- * @param lpClassName cast=(LPWSTR)
- * @param lpWndClass cast=(LPWNDCLASSW)
+ * @param lpClassName cast=(LPWSTR),flags=no_out
*/
-public static final native boolean GetClassInfo (long /*int*/ hInstance, char [] lpClassName, WNDCLASS lpWndClass);
-/** @param hWnd cast=(HWND) */
-public static final native int GetClassName (long /*int*/ hWnd, char [] lpClassName, int nMaxCount);
+public static final native boolean GetClassInfo (long hInstance, char [] lpClassName, WNDCLASS lpWndClass);
/** @param hWnd cast=(HWND) */
-public static final native boolean GetClientRect (long /*int*/ hWnd, RECT lpRect);
-public static final native long /*int*/ GetClipboardData (int uFormat);
+public static final native int GetClassName (long hWnd, char [] lpClassName, int nMaxCount);
+/**
+ * @param hWnd cast=(HWND)
+ * @param lpRect flags=no_in
+ */
+public static final native boolean GetClientRect (long hWnd, RECT lpRect);
+public static final native long GetClipboardData (int uFormat);
/** @param lpszFormatName cast=(LPWSTR) */
public static final native int GetClipboardFormatName (int format, char[] lpszFormatName, int cchMaxCount);
-/** @param hdc cast=(HDC) */
-public static final native int GetClipBox (long /*int*/ hdc, RECT lprc);
+/**
+ * @param hdc cast=(HDC)
+ * @param lprc flags=no_in
+ */
+public static final native int GetClipBox (long hdc, RECT lprc);
/**
* @param hdc cast=(HDC)
* @param hrgn cast=(HRGN)
*/
-public static final native int GetClipRgn (long /*int*/ hdc, long /*int*/ hrgn);
+public static final native int GetClipRgn (long hdc, long hrgn);
/** @param hwndCombo cast=(HWND) */
-public static final native boolean GetComboBoxInfo (long /*int*/ hwndCombo, COMBOBOXINFO pcbi);
+public static final native boolean GetComboBoxInfo (long hwndCombo, COMBOBOXINFO pcbi);
/** @param hdc cast=(HDC) */
-public static final native long /*int*/ GetCurrentObject (long /*int*/ hdc, int uObjectType);
+public static final native long GetCurrentObject (long hdc, int uObjectType);
public static final native int GetCurrentProcessId ();
public static final native int GetCurrentThreadId ();
-/** @method flags=dynamic */
-public static final native int GetCurrentProcessExplicitAppUserModelID(long /*int*/[] AppID);
-public static final native long /*int*/ GetCursor ();
+/** @param AppID cast=(PWSTR *) */
+public static final native int GetCurrentProcessExplicitAppUserModelID(long[] AppID);
+public static final native long GetCursor ();
public static final native boolean GetCursorPos (POINT lpPoint);
/** @param hwnd cast=(HWND) */
-public static final native long /*int*/ GetDC (long /*int*/ hwnd);
+public static final native long GetDC (long hwnd);
/**
* @param hWnd cast=(HWND)
* @param hrgnClip cast=(HRGN)
*/
-public static final native long /*int*/ GetDCEx (long /*int*/ hWnd, long /*int*/ hrgnClip, int flags);
-public static final native long /*int*/ GetDesktopWindow ();
+public static final native long GetDCEx (long hWnd, long hrgnClip, int flags);
+public static final native long GetDesktopWindow ();
/** @param hdc cast=(HDC) */
-public static final native int GetDeviceCaps (long /*int*/ hdc, int nIndex);
+public static final native int GetDeviceCaps (long hdc, int nIndex);
public static final native int GetDialogBaseUnits ();
/**
* @param hdc cast=(HDC)
* @param pColors cast=(RGBQUAD *),flags=no_in critical
*/
-public static final native int GetDIBColorTable (long /*int*/ hdc, int uStartIndex, int cEntries, byte[] pColors);
+public static final native int GetDIBColorTable (long hdc, int uStartIndex, int cEntries, byte[] pColors);
/**
* @param hdc cast=(HDC)
* @param hbmp cast=(HBITMAP)
* @param lpvBits cast=(LPVOID),flags=critical
* @param lpbi cast=(LPBITMAPINFO),flags=critical
*/
-public static final native int GetDIBits (long /*int*/ hdc, long /*int*/ hbmp, int uStartScan, int cScanLines, byte[] lpvBits, byte[] lpbi, int uUsage);
+public static final native int GetDIBits (long hdc, long hbmp, int uStartScan, int cScanLines, byte[] lpvBits, byte[] lpbi, int uUsage);
/** @param hDlg cast=(HWND) */
-public static final native long /*int*/ GetDlgItem (long /*int*/ hDlg, int nIDDlgItem);
+public static final native long GetDlgItem (long hDlg, int nIDDlgItem);
public static final native int GetDoubleClickTime ();
/** @method flags=dynamic */
-public static final native int GetDpiForMonitor (long /*int*/ hmonitor, int dpiType, int [] dpiX, int [] dpiY);
-public static final native long /*int*/ GetFocus ();
+public static final native int GetDpiForMonitor (long hmonitor, int dpiType, int [] dpiX, int [] dpiY);
+public static final native long GetFocus ();
/** @param hdc cast=(HDC) */
-public static final native int GetFontLanguageInfo (long /*int*/ hdc);
-public static final native long /*int*/ GetForegroundWindow ();
-/**
- * @method flags=dynamic
- * @param hGestureInfo cast=(HGESTUREINFO)
- * @param pGestureInfo cast=(PGESTUREINFO)
- */
-public static final native boolean GetGestureInfo(long /*int*/ hGestureInfo, GESTUREINFO pGestureInfo);
+public static final native int GetFontLanguageInfo (long hdc);
+public static final native long GetForegroundWindow ();
+/** @param hGestureInfo cast=(HGESTUREINFO) */
+public static final native boolean GetGestureInfo(long hGestureInfo, GESTUREINFO pGestureInfo);
/** @param hdc cast=(HDC) */
-public static final native int GetGraphicsMode (long /*int*/ hdc);
+public static final native int GetGraphicsMode (long hdc);
/**
* @param hdc cast=(HDC)
+ * @param lpstr flags=no_out
* @param pgi cast=(LPWORD)
*/
-public static final native int GetGlyphIndices (long /*int*/ hdc, char[] lpstr, int c, short[] pgi, int fl);
+public static final native int GetGlyphIndices (long hdc, char[] lpstr, int c, short[] pgi, int fl);
/**
* @param idThread cast=(DWORD)
* @param lpgui cast=(LPGUITHREADINFO)
@@ -2855,134 +2811,131 @@ public static final native boolean GetGUIThreadInfo (int idThread, GUITHREADINFO
* @param hIcon cast=(HICON)
* @param piconinfo flags=no_in
*/
-public static final native boolean GetIconInfo (long /*int*/ hIcon, ICONINFO piconinfo);
+public static final native boolean GetIconInfo (long hIcon, ICONINFO piconinfo);
/** @param lpList cast=(HKL FAR *) */
-public static final native int GetKeyboardLayoutList (int nBuff, long /*int*/ [] lpList);
-public static final native long /*int*/ GetKeyboardLayout (int idThread);
+public static final native int GetKeyboardLayoutList (int nBuff, long [] lpList);
+public static final native long GetKeyboardLayout (int idThread);
public static final native short GetKeyState (int nVirtKey);
/** @param lpKeyState cast=(PBYTE) */
public static final native boolean GetKeyboardState (byte [] lpKeyState);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ GetLastActivePopup (long /*int*/ hWnd);
+public static final native long GetLastActivePopup (long hWnd);
public static final native int GetLastError ();
-/** @param hwnd cast=(HWND) */
-public static final native boolean GetLayeredWindowAttributes (long /*int*/ hwnd, int [] pcrKey, byte [] pbAlpha, int [] pdwFlags);
+/**
+ * @param hwnd cast=(HWND)
+ * @param pcrKey cast=(COLORREF *)
+ * @param pbAlpha cast=(BYTE *)
+ * @param pdwFlags cast=(DWORD *)
+ */
+public static final native boolean GetLayeredWindowAttributes (long hwnd, int [] pcrKey, byte [] pbAlpha, int [] pdwFlags);
/** @param hdc cast=(HDC) */
-public static final native int GetLayout (long /*int*/ hdc);
+public static final native int GetLayout (long hdc);
/* returns the instance handle to the swt library */
/** @method flags=no_gen */
-public static final native long /*int*/ GetLibraryHandle ();
+public static final native long GetLibraryHandle ();
/** @param lpLCData cast=(LPWSTR) */
public static final native int GetLocaleInfo (int Locale, int LCType, char [] lpLCData, int cchData);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ GetMenu (long /*int*/ hWnd);
+public static final native long GetMenu (long hWnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean GetMenuBarInfo (long /*int*/ hWnd, int idObject, int idItem, MENUBARINFO pmbi);
+public static final native boolean GetMenuBarInfo (long hWnd, int idObject, int idItem, MENUBARINFO pmbi);
/** @param hMenu cast=(HMENU) */
-public static final native int GetMenuDefaultItem (long /*int*/ hMenu, int fByPos, int gmdiFlags);
+public static final native int GetMenuDefaultItem (long hMenu, int fByPos, int gmdiFlags);
/** @param hmenu cast=(HMENU) */
-public static final native boolean GetMenuInfo (long /*int*/ hmenu, MENUINFO lpcmi);
+public static final native boolean GetMenuInfo (long hmenu, MENUINFO lpcmi);
/** @param hMenu cast=(HMENU) */
-public static final native int GetMenuItemCount (long /*int*/ hMenu);
+public static final native int GetMenuItemCount (long hMenu);
/**
* @param hMenu cast=(HMENU)
* @param lpmii cast=(LPMENUITEMINFOW)
*/
-public static final native boolean GetMenuItemInfo (long /*int*/ hMenu, int uItem, boolean fByPosition, MENUITEMINFO lpmii);
+public static final native boolean GetMenuItemInfo (long hMenu, int uItem, boolean fByPosition, MENUITEMINFO lpmii);
/**
* @param hWnd cast=(HWND)
* @param hMenu cast=(HMENU)
+ * @param lprcItem flags=no_in
*/
-public static final native boolean GetMenuItemRect (long /*int*/ hWnd, long /*int*/ hMenu, int uItem, RECT lprcItem);
-/** @param hWnd cast=(HWND) */
-public static final native boolean GetMessage (MSG lpMsg, long /*int*/ hWnd, int wMsgFilterMin, int wMsgFilterMax);
+public static final native boolean GetMenuItemRect (long hWnd, long hMenu, int uItem, RECT lprcItem);
+/**
+ * @param lpMsg flags=no_in
+ * @param hWnd cast=(HWND)
+ */
+public static final native boolean GetMessage (MSG lpMsg, long hWnd, int wMsgFilterMin, int wMsgFilterMax);
public static final native int GetMessagePos ();
public static final native int GetMessageTime ();
/**
* @param hdc cast=(HDC)
* @param hrgn cast=(HRGN)
*/
-public static final native int GetMetaRgn (long /*int*/ hdc, long /*int*/ hrgn);
+public static final native int GetMetaRgn (long hdc, long hrgn);
/**
* @param hTheme cast=(HTHEME)
* @param hdc cast=(HDC)
* @param prc flags=no_out
* @param psz flags=no_in
*/
-public static final native int GetThemePartSize(long /*int*/ hTheme, long /*int*/ hdc, int iPartId, int iStateId, RECT prc, int eSize, SIZE psz);
+public static final native int GetThemePartSize(long hTheme, long hdc, int iPartId, int iStateId, RECT prc, int eSize, SIZE psz);
/**
* @param hTheme cast=(HTHEME)
* @param hdc cast=(HDC)
+ * @param pszText flags=no_out
+ * @param pBoundingRect flags=no_out
+ * @param pExtentRect flags=no_in
*/
-public static final native int GetThemeTextExtent (long /*int*/ hTheme, long /*int*/ hdc, int iPartId, int iStateId, char[] pszText, int iCharCount, int dwTextFlags, RECT pBoundingRect, RECT pExtentRect);
+public static final native int GetThemeTextExtent (long hTheme, long hdc, int iPartId, int iStateId, char[] pszText, int iCharCount, int dwTextFlags, RECT pBoundingRect, RECT pExtentRect);
/**
* @param hModule cast=(HMODULE)
* @param lpFilename cast=(LPWSTR)
*/
-public static final native int GetModuleFileName (long /*int*/ hModule, char [] lpFilename, int inSize);
-/** @param lpModuleName cast=(LPWSTR) */
-public static final native long /*int*/ GetModuleHandle (char [] lpModuleName);
-/**
- * @param hmonitor cast=(HMONITOR)
- * @param lpmi cast=(LPMONITORINFO)
- */
-public static final native boolean GetMonitorInfo (long /*int*/ hmonitor, MONITORINFO lpmi);
-/**
- * @param hPal cast=(HPALETTE)
- * @param crColor cast=(COLORREF)
- */
-public static final native int GetNearestPaletteIndex (long /*int*/ hPal, int crColor);
+public static final native int GetModuleFileName (long hModule, char [] lpFilename, int inSize);
+/** @param lpModuleName cast=(LPWSTR),flags=no_out */
+public static final native long GetModuleHandle (char [] lpModuleName);
+/** @param hmonitor cast=(HMONITOR) */
+public static final native boolean GetMonitorInfo (long hmonitor, MONITORINFO lpmi);
/**
* @param hgdiobj cast=(HGDIOBJ)
* @param lpvObject flags=no_in
*/
-public static final native int GetObject (long /*int*/ hgdiobj, int cbBuffer, BITMAP lpvObject);
+public static final native int GetObject (long hgdiobj, int cbBuffer, BITMAP lpvObject);
/**
* @param hgdiobj cast=(HGDIOBJ)
* @param lpvObject flags=no_in
*/
-public static final native int GetObject (long /*int*/ hgdiobj, int cbBuffer, DIBSECTION lpvObject);
+public static final native int GetObject (long hgdiobj, int cbBuffer, DIBSECTION lpvObject);
/**
* @param hgdiobj cast=(HGDIOBJ)
* @param lpvObject flags=no_in
*/
-public static final native int GetObject (long /*int*/ hgdiobj, int cbBuffer, LOGBRUSH lpvObject);
+public static final native int GetObject (long hgdiobj, int cbBuffer, LOGBRUSH lpvObject);
/**
* @param hgdiobj cast=(HGDIOBJ)
* @param lpvObject flags=no_in
*/
-public static final native int GetObject (long /*int*/ hgdiobj, int cbBuffer, LOGFONT lpvObject);
+public static final native int GetObject (long hgdiobj, int cbBuffer, LOGFONT lpvObject);
/**
* @param hgdiobj cast=(HGDIOBJ)
* @param lpvObject cast=(LPVOID),flags=no_in
*/
-public static final native int GetObject (long /*int*/ hgdiobj, int cbBuffer, long /*int*/ lpvObject);
-/** @param lpofn cast=(LPOPENFILENAMEW) */
-public static final native boolean GetOpenFileName (OPENFILENAME lpofn);
+public static final native int GetObject (long hgdiobj, int cbBuffer, long lpvObject);
/** @param hdc cast=(HDC) */
-public static final native int GetOutlineTextMetrics (long /*int*/ hdc, int cbData, OUTLINETEXTMETRIC lpOTM);
-/**
- * @param hPalette cast=(HPALETTE)
- * @param logPalette cast=(LPPALETTEENTRY),flags=no_in critical
- */
-public static final native int GetPaletteEntries (long /*int*/ hPalette, int iStartIndex, int nEntries, byte[] logPalette);
+public static final native int GetOutlineTextMetrics (long hdc, int cbData, OUTLINETEXTMETRIC lpOTM);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ GetParent (long /*int*/ hWnd);
+public static final native long GetParent (long hWnd);
/** @param hdc cast=(HDC) */
-public static final native int GetPixel (long /*int*/ hdc, int x, int y);
+public static final native int GetPixel (long hdc, int x, int y);
/** @param hdc cast=(HDC) */
-public static final native int GetPolyFillMode (long /*int*/ hdc);
+public static final native int GetPolyFillMode (long hdc);
/**
- * @param pPrinterName cast=(LPWSTR)
+ * @param pPrinterName cast=(LPWSTR),flags=no_out
* @param phPrinter cast=(LPHANDLE)
* @param pDefault cast=(LPPRINTER_DEFAULTSW)
*/
-public static final native boolean OpenPrinter (char[] pPrinterName, long /*int*/ [] phPrinter, long /*int*/ pDefault);
-public static final native long /*int*/ GetProcessHeap ();
+public static final native boolean OpenPrinter (char[] pPrinterName, long [] phPrinter, long pDefault);
+public static final native long GetProcessHeap ();
/**
- * @param lpAppName cast=(LPWSTR)
- * @param lpKeyName cast=(LPWSTR)
- * @param lpDefault cast=(LPWSTR)
+ * @param lpAppName cast=(LPWSTR),flags=no_out
+ * @param lpDefault cast=(LPWSTR),flags=no_out
+ * @param lpKeyName cast=(LPWSTR),flags=no_out
* @param lpReturnedString cast=(LPWSTR)
*/
public static final native int GetProfileString (char [] lpAppName, char [] lpKeyName, char [] lpDefault, char [] lpReturnedString, int nSize);
@@ -2990,121 +2943,109 @@ public static final native int GetProfileString (char [] lpAppName, char [] lpKe
* @param hWnd cast=(HWND)
* @param lpString cast=(LPCWSTR)
*/
-public static final native long /*int*/ GetProp (long /*int*/ hWnd, long /*int*/ lpString);
+public static final native long GetProp (long hWnd, long lpString);
/**
* @param hdc cast=(HDC)
* @param hrgn cast=(HRGN)
*/
-public static final native int GetRandomRgn (long /*int*/ hdc, long /*int*/ hrgn, int iNum);
+public static final native int GetRandomRgn (long hdc, long hrgn, int iNum);
/**
* @param hRgn cast=(HRGN)
* @param lpRgnData cast=(RGNDATA *),flags=no_in critical
*/
-public static final native int GetRegionData (long /*int*/ hRgn, int dwCount, int [] lpRgnData);
+public static final native int GetRegionData (long hRgn, int dwCount, int [] lpRgnData);
/**
* @param hrgn cast=(HRGN)
* @param lprc flags=no_in
*/
-public static final native int GetRgnBox (long /*int*/ hrgn, RECT lprc);
+public static final native int GetRgnBox (long hrgn, RECT lprc);
/** @param hdc cast=(HDC) */
-public static final native int GetROP2 (long /*int*/ hdc);
-/** @param lpofn cast=(LPOPENFILENAMEW) */
-public static final native boolean GetSaveFileName (OPENFILENAME lpofn);
+public static final native int GetROP2 (long hdc);
/** @param hwnd cast=(HWND) */
-public static final native boolean GetScrollBarInfo (long /*int*/ hwnd, int idObject, SCROLLBARINFO psbi);
+public static final native boolean GetScrollBarInfo (long hwnd, int idObject, SCROLLBARINFO psbi);
/** @param hwnd cast=(HWND) */
-public static final native boolean GetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info);
-/** @param lpStartupInfo cast=(LPSTARTUPINFOW) */
+public static final native boolean GetScrollInfo (long hwnd, int flags, SCROLLINFO info);
public static final native void GetStartupInfo (STARTUPINFO lpStartupInfo);
-public static final native long /*int*/ GetStockObject (int fnObject);
+public static final native long GetStockObject (int fnObject);
public static final native int GetSysColor (int nIndex);
-public static final native long /*int*/ GetSysColorBrush (int nIndex);
-public static final native short GetSystemDefaultUILanguage ();
+public static final native long GetSysColorBrush (int nIndex);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ GetSystemMenu (long /*int*/ hWnd, boolean bRevert);
+public static final native long GetSystemMenu (long hWnd, boolean bRevert);
public static final native int GetSystemMetrics (int nIndex);
-/**
- * @param hdc cast=(HDC)
- * @param iStartIndex cast=(UINT)
- * @param nEntries cast=(UINT)
- * @param lppe cast=(LPPALETTEENTRY),flags=no_in critical
- */
-public static final native int GetSystemPaletteEntries (long /*int*/ hdc, int iStartIndex, int nEntries, byte[] lppe);
/** @param hDC cast=(HDC) */
-public static final native int GetTextColor (long /*int*/ hDC);
+public static final native int GetTextColor (long hDC);
/**
* @param hdc cast=(HDC)
* @param lpString cast=(LPWSTR),flags=no_out critical
* @param lpSize flags=no_in
*/
-public static final native boolean GetTextExtentPoint32 (long /*int*/ hdc, char [] lpString, int cbString, SIZE lpSize);
+public static final native boolean GetTextExtentPoint32 (long hdc, char [] lpString, int cbString, SIZE lpSize);
/**
* @param hdc cast=(HDC)
* @param lptm flags=no_in
*/
-public static final native boolean GetTextMetrics (long /*int*/ hdc, TEXTMETRIC lptm);
+public static final native boolean GetTextMetrics (long hdc, TEXTMETRIC lptm);
/**
- * @method flags=dynamic
* @param hTouchInput cast=(HTOUCHINPUT)
* @param cInputs cast=(UINT)
* @param pTouchInputs cast=(PTOUCHINPUT)
*/
-public static final native boolean GetTouchInputInfo(long /*int*/ hTouchInput, int cInputs, long /*int*/ pTouchInputs, int cbSize);
+public static final native boolean GetTouchInputInfo(long hTouchInput, int cInputs, long pTouchInputs, int cbSize);
/**
* @param hWnd cast=(HWND)
- * @param lpRect cast=(LPRECT)
+ * @param lpRect flags=no_in
* @param bErase cast=(BOOL)
*/
-public static final native boolean GetUpdateRect (long /*int*/ hWnd, RECT lpRect, boolean bErase);
+public static final native boolean GetUpdateRect (long hWnd, RECT lpRect, boolean bErase);
/**
* @param hWnd cast=(HWND)
* @param hRgn cast=(HRGN)
*/
-public static final native int GetUpdateRgn (long /*int*/ hWnd, long /*int*/ hRgn, boolean bErase);
+public static final native int GetUpdateRgn (long hWnd, long hRgn, boolean bErase);
public static final native int GetVersion ();
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ GetWindow (long /*int*/ hWnd, int uCmd);
+public static final native long GetWindow (long hWnd, int uCmd);
/** @param hWnd cast=(HWND) */
-public static final native int GetWindowLong (long /*int*/ hWnd, int nIndex);
+public static final native int GetWindowLong (long hWnd, int nIndex);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ GetWindowLongPtr (long /*int*/ hWnd, int nIndex);
+public static final native long GetWindowLongPtr (long hWnd, int nIndex);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ GetWindowDC (long /*int*/ hWnd);
+public static final native long GetWindowDC (long hWnd);
/** @param hdc cast=(HDC) */
-public static final native boolean GetWindowOrgEx (long /*int*/ hdc, POINT lpPoint);
+public static final native boolean GetWindowOrgEx (long hdc, POINT lpPoint);
/** @param hWnd cast=(HWND) */
-public static final native boolean GetWindowPlacement (long /*int*/ hWnd, WINDOWPLACEMENT lpwndpl);
+public static final native boolean GetWindowPlacement (long hWnd, WINDOWPLACEMENT lpwndpl);
/** @param hWnd cast=(HWND) */
-public static final native boolean GetWindowRect (long /*int*/ hWnd, RECT lpRect);
+public static final native boolean GetWindowRect (long hWnd, RECT lpRect);
/**
* @param hWnd cast=(HWND)
* @param hRgn cast=(HRGN)
*/
-public static final native int GetWindowRgn (long /*int*/ hWnd, long /*int*/ hRgn);
+public static final native int GetWindowRgn (long hWnd, long hRgn);
/**
* @param hWnd cast=(HWND)
* @param lpString cast=(LPWSTR)
*/
-public static final native int GetWindowText (long /*int*/ hWnd, char [] lpString, int nMaxCount);
+public static final native int GetWindowText (long hWnd, char [] lpString, int nMaxCount);
/** @param hWnd cast=(HWND) */
-public static final native int GetWindowTextLength (long /*int*/ hWnd);
+public static final native int GetWindowTextLength (long hWnd);
/**
* @param hWnd cast=(HWND)
* @param lpdwProcessId cast=(LPDWORD)
*/
-public static final native int GetWindowThreadProcessId (long /*int*/ hWnd, int [] lpdwProcessId);
+public static final native int GetWindowThreadProcessId (long hWnd, int [] lpdwProcessId);
public static final native double GID_ROTATE_ANGLE_FROM_ARGUMENT(long dwArgument);
-/** @param lpString cast=(LPCWSTR) */
+/** @param lpString cast=(LPCWSTR),flags=no_out */
public static final native int GlobalAddAtom (char [] lpString);
-public static final native long /*int*/ GlobalAlloc (int uFlags, int dwBytes);
+public static final native long GlobalAlloc (int uFlags, int dwBytes);
/** @param hMem cast=(HANDLE) */
-public static final native long /*int*/ GlobalFree (long /*int*/ hMem);
+public static final native long GlobalFree (long hMem);
/** @param hMem cast=(HANDLE) */
-public static final native long /*int*/ GlobalLock (long /*int*/ hMem);
+public static final native long GlobalLock (long hMem);
/** @param hMem cast=(HANDLE) */
-public static final native int GlobalSize (long /*int*/ hMem);
+public static final native int GlobalSize (long hMem);
/** @param hMem cast=(HANDLE) */
-public static final native boolean GlobalUnlock (long /*int*/ hMem);
+public static final native boolean GlobalUnlock (long hMem);
/**
* @param hdc cast=(HDC)
* @param pVertex cast=(PTRIVERTEX)
@@ -3113,43 +3054,46 @@ public static final native boolean GlobalUnlock (long /*int*/ hMem);
* @param dwNumMesh cast=(ULONG)
* @param dwMode cast=(ULONG)
*/
-public static final native boolean GradientFill (long /*int*/ hdc, long /*int*/ pVertex, int dwNumVertex, long /*int*/ pMesh, int dwNumMesh, int dwMode);
-public static final native int HIWORD(long /*int*/ l);
+public static final native boolean GradientFill (long hdc, long pVertex, int dwNumVertex, long pMesh, int dwNumMesh, int dwMode);
/** @param hHeap cast=(HANDLE) */
-public static final native long /*int*/ HeapAlloc (long /*int*/ hHeap, int dwFlags, int dwBytes);
+public static final native long HeapAlloc (long hHeap, int dwFlags, int dwBytes);
/**
* @param hHeap cast=(HANDLE)
* @param lpMem cast=(LPVOID)
*/
-public static final native boolean HeapFree (long /*int*/ hHeap, int dwFlags, long /*int*/ lpMem);
+public static final native boolean HeapFree (long hHeap, int dwFlags, long lpMem);
/** @param hWnd cast=(HWND) */
-public static final native boolean HideCaret (long /*int*/ hWnd);
+public static final native boolean HideCaret (long hWnd);
/**
- * @param lpsz cast=(LPOLESTR)
+ * @param lpsz cast=(LPOLESTR),flags=no_out
* @param lpiid cast=(LPIID)
*/
public static final native int IIDFromString (char[] lpsz, byte[] lpiid);
/**
+ * @param pidl cast=(PCIDLIST_ABSOLUTE)
+ */
+public static final native int ILGetSize(long pidl);
+/**
* @param himl cast=(HIMAGELIST)
* @param hbmImage cast=(HBITMAP)
* @param hbmMask cast=(HBITMAP)
*/
-public static final native int ImageList_Add (long /*int*/ himl, long /*int*/ hbmImage, long /*int*/ hbmMask);
+public static final native int ImageList_Add (long himl, long hbmImage, long hbmMask);
/**
* @param himl cast=(HIMAGELIST)
* @param hbmImage cast=(HBITMAP)
* @param crMask cast=(COLORREF)
*/
-public static final native int ImageList_AddMasked (long /*int*/ himl, long /*int*/ hbmImage, int crMask);
+public static final native int ImageList_AddMasked (long himl, long hbmImage, int crMask);
/** @param himl cast=(HIMAGELIST) */
-public static final native boolean ImageList_BeginDrag (long /*int*/ himl, int iTrack, int dxHotspot, int dyHotspot);
-public static final native long /*int*/ ImageList_Create (int cx, int cy, int flags, int cInitial, int cGrow);
+public static final native boolean ImageList_BeginDrag (long himl, int iTrack, int dxHotspot, int dyHotspot);
+public static final native long ImageList_Create (int cx, int cy, int flags, int cInitial, int cGrow);
/** @param himl cast=(HIMAGELIST) */
-public static final native boolean ImageList_Destroy (long /*int*/ himl);
+public static final native boolean ImageList_Destroy (long himl);
/** @param hwndLock cast=(HWND) */
-public static final native boolean ImageList_DragEnter (long /*int*/ hwndLock, int x, int y);
+public static final native boolean ImageList_DragEnter (long hwndLock, int x, int y);
/** @param hwndLock cast=(HWND) */
-public static final native boolean ImageList_DragLeave (long /*int*/ hwndLock);
+public static final native boolean ImageList_DragLeave (long hwndLock);
public static final native boolean ImageList_DragMove (int x, int y);
/** @param fShow cast=(BOOL) */
public static final native boolean ImageList_DragShowNolock (boolean fShow);
@@ -3159,111 +3103,115 @@ public static final native void ImageList_EndDrag ();
* @param cx cast=(int *)
* @param cy cast=(int *)
*/
-public static final native boolean ImageList_GetIconSize (long /*int*/ himl, int [] cx, int [] cy);
+public static final native boolean ImageList_GetIconSize (long himl, int [] cx, int [] cy);
/** @param himl cast=(HIMAGELIST) */
-public static final native int ImageList_GetImageCount (long /*int*/ himl);
+public static final native int ImageList_GetImageCount (long himl);
/** @param himl cast=(HIMAGELIST) */
-public static final native boolean ImageList_Remove (long /*int*/ himl, int i);
+public static final native boolean ImageList_Remove (long himl, int i);
/**
* @param himl cast=(HIMAGELIST)
* @param hbmImage cast=(HBITMAP)
* @param hbmMask cast=(HBITMAP)
*/
-public static final native boolean ImageList_Replace (long /*int*/ himl, int i, long /*int*/ hbmImage, long /*int*/ hbmMask);
+public static final native boolean ImageList_Replace (long himl, int i, long hbmImage, long hbmMask);
/**
* @param himl cast=(HIMAGELIST)
* @param hicon cast=(HICON)
*/
-public static final native int ImageList_ReplaceIcon (long /*int*/ himl, int i, long /*int*/ hicon);
+public static final native int ImageList_ReplaceIcon (long himl, int i, long hicon);
/** @param himl cast=(HIMAGELIST) */
-public static final native boolean ImageList_SetIconSize (long /*int*/ himl, int cx, int cy);
+public static final native boolean ImageList_SetIconSize (long himl, int cx, int cy);
/**
- * @param hWnd cast=(HWND)
+ * @param hKL cast=(HKL)
* @param hIMC cast=(HIMC)
+ * @param lpData cast=(LPVOID)
*/
-public static final native long /*int*/ ImmAssociateContext (long /*int*/ hWnd, long /*int*/ hIMC);
-public static final native long /*int*/ ImmCreateContext ();
-/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmDestroyContext (long /*int*/ hIMC);
+public static final native long ImmEscape (long hKL, long hIMC, int uEscape, char[] lpData);
/**
- * @param hKL cast=(HKL)
* @param hIMC cast=(HIMC)
- * @param lpData cast=(LPVOID)
+ * @param lplf flags=no_in
*/
-public static final native long /*int*/ ImmEscape (long /*int*/ hKL, long /*int*/ hIMC, int uEscape, char[] lpData);
-/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmGetCompositionFont (long /*int*/ hIMC, LOGFONT lplf);
+public static final native boolean ImmGetCompositionFont (long hIMC, LOGFONT lplf);
/**
* @param hIMC cast=(HIMC)
* @param lpBuf cast=(LPWSTR)
*/
-public static final native int ImmGetCompositionString (long /*int*/ hIMC, int dwIndex, char [] lpBuf, int dwBufLen);
+public static final native int ImmGetCompositionString (long hIMC, int dwIndex, char [] lpBuf, int dwBufLen);
/**
* @param hIMC cast=(HIMC)
* @param lpBuf cast=(LPWSTR)
*/
-public static final native int ImmGetCompositionString (long /*int*/ hIMC, int dwIndex, int [] lpBuf, int dwBufLen);
+public static final native int ImmGetCompositionString (long hIMC, int dwIndex, int [] lpBuf, int dwBufLen);
/**
* @param hIMC cast=(HIMC)
* @param lpBuf cast=(LPWSTR)
*/
-public static final native int ImmGetCompositionString (long /*int*/ hIMC, int dwIndex, byte [] lpBuf, int dwBufLen);
+public static final native int ImmGetCompositionString (long hIMC, int dwIndex, byte [] lpBuf, int dwBufLen);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ ImmGetContext (long /*int*/ hWnd);
+public static final native long ImmGetContext (long hWnd);
/**
* @param hIMC cast=(HIMC)
* @param lpfdwConversion cast=(LPDWORD)
* @param lpfdwSentence cast=(LPDWORD)
*/
-public static final native boolean ImmGetConversionStatus (long /*int*/ hIMC, int [] lpfdwConversion, int [] lpfdwSentence);
+public static final native boolean ImmGetConversionStatus (long hIMC, int [] lpfdwConversion, int [] lpfdwSentence);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ ImmGetDefaultIMEWnd (long /*int*/ hWnd);
+public static final native long ImmGetDefaultIMEWnd (long hWnd);
/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmGetOpenStatus (long /*int*/ hIMC);
+public static final native boolean ImmGetOpenStatus (long hIMC);
/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmNotifyIME (long /*int*/ hIMC, int dwAction, int dwIndex, int dwValue);
+public static final native boolean ImmNotifyIME (long hIMC, int dwAction, int dwIndex, int dwValue);
/**
* @param hWnd cast=(HWND)
* @param hIMC cast=(HIMC)
*/
-public static final native boolean ImmReleaseContext (long /*int*/ hWnd, long /*int*/ hIMC);
-/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmSetCompositionFont (long /*int*/ hIMC, LOGFONT lplf);
-/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmSetCompositionWindow (long /*int*/ hIMC, COMPOSITIONFORM lpCompForm);
-/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmSetCandidateWindow (long /*int*/ hIMC, CANDIDATEFORM lpCandidate);
+public static final native boolean ImmReleaseContext (long hWnd, long hIMC);
+/**
+ * @param hIMC cast=(HIMC)
+ * @param lplf flags=no_out
+ */
+public static final native boolean ImmSetCompositionFont (long hIMC, LOGFONT lplf);
+/**
+ * @param hIMC cast=(HIMC)
+ * @param lpCompForm flags=no_out
+ */
+public static final native boolean ImmSetCompositionWindow (long hIMC, COMPOSITIONFORM lpCompForm);
+/**
+ * @param hIMC cast=(HIMC)
+ * @param lpCandidate flags=no_out
+ */
+public static final native boolean ImmSetCandidateWindow (long hIMC, CANDIDATEFORM lpCandidate);
/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmSetConversionStatus (long /*int*/ hIMC, int fdwConversion, int dwSentence);
+public static final native boolean ImmSetConversionStatus (long hIMC, int fdwConversion, int dwSentence);
/** @param hIMC cast=(HIMC) */
-public static final native boolean ImmSetOpenStatus (long /*int*/ hIMC, boolean fOpen);
-public static final native void InitCommonControls ();
+public static final native boolean ImmSetOpenStatus (long hIMC, boolean fOpen);
+/** @param lpInitCtrls flags=no_out */
public static final native boolean InitCommonControlsEx (INITCOMMONCONTROLSEX lpInitCtrls);
/**
* @param hMenu cast=(HMENU)
- * @param lpmii cast=(LPMENUITEMINFOW)
+ * @param lpmii flags=no_out
*/
-public static final native boolean InsertMenuItem (long /*int*/ hMenu, int uItem, boolean fByPosition, MENUITEMINFO lpmii);
+public static final native boolean InsertMenuItem (long hMenu, int uItem, boolean fByPosition, MENUITEMINFO lpmii);
/**
- * @param lpszUrl cast=(LPCWSTR)
- * @param lpszCookieName cast=(LPCWSTR)
+ * @param lpszUrl cast=(LPCWSTR),flags=no_out
+ * @param lpszCookieName cast=(LPCWSTR),flags=no_out
* @param lpszCookieData cast=(LPWSTR)
* @param lpdwSize cast=(LPDWORD)
*/
public static final native boolean InternetGetCookie (char[] lpszUrl, char[] lpszCookieName, char[] lpszCookieData, int[] lpdwSize);
/**
- * @param lpszUrl cast=(LPCWSTR)
- * @param lpszCookieName cast=(LPCWSTR)
- * @param lpszCookieData cast=(LPCWSTR)
+ * @param lpszUrl cast=(LPCWSTR),flags=no_out
+ * @param lpszCookieName cast=(LPCWSTR),flags=no_out
+ * @param lpszCookieData cast=(LPCWSTR),flags=no_out
*/
public static final native boolean InternetSetCookie (char[] lpszUrl, char[] lpszCookieName, char[] lpszCookieData);
/**
* @param hInternet cast=(HINTERNET)
* @param lpBuffer cast=(LPVOID)
*/
-public static final native boolean InternetSetOption (long /*int*/ hInternet, int dwOption, long /*int*/ lpBuffer, int dwBufferLength);
+public static final native boolean InternetSetOption (long hInternet, int dwOption, long lpBuffer, int dwBufferLength);
/** @param hdc cast=(HDC) */
-public static final native int IntersectClipRect (long /*int*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
+public static final native int IntersectClipRect (long hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
/**
* @param lprcDst flags=no_in
* @param lprcSrc1 flags=no_out
@@ -3271,100 +3219,100 @@ public static final native int IntersectClipRect (long /*int*/ hdc, int nLeftRec
*/
public static final native boolean IntersectRect (RECT lprcDst, RECT lprcSrc1, RECT lprcSrc2);
/** @param hWnd cast=(HWND) */
-public static final native boolean InvalidateRect (long /*int*/ hWnd, RECT lpRect, boolean bErase);
+public static final native boolean InvalidateRect (long hWnd, RECT lpRect, boolean bErase);
/**
* @param hWnd cast=(HWND)
* @param hRgn cast=(HRGN)
*/
-public static final native boolean InvalidateRgn (long /*int*/ hWnd, long /*int*/ hRgn, boolean bErase);
+public static final native boolean InvalidateRgn (long hWnd, long hRgn, boolean bErase);
public static final native boolean IsAppThemed ();
+/** @method flags=no_gen */
+public static final native boolean IsDarkModeAvailable();
/** @param hWnd cast=(HWND) */
-public static final native boolean IsHungAppWindow (long /*int*/ hWnd);
+public static final native boolean IsHungAppWindow (long hWnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean IsIconic (long /*int*/ hWnd);
+public static final native boolean IsIconic (long hWnd);
/**
- * @method flags=dynamic
* @param hWnd cast=(HWND)
* @param outFlags cast=(PULONG)
*/
-public static final native boolean IsTouchWindow (long /*int*/ hWnd, long[] outFlags);
+public static final native boolean IsTouchWindow (long hWnd, long[] outFlags);
/** @param hWnd cast=(HWND) */
-public static final native boolean IsWindowEnabled (long /*int*/ hWnd);
+public static final native boolean IsWindowEnabled (long hWnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean IsWindowVisible (long /*int*/ hWnd);
+public static final native boolean IsWindowVisible (long hWnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean IsZoomed (long /*int*/ hWnd);
+public static final native boolean IsZoomed (long hWnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean KillTimer (long /*int*/ hWnd, long /*int*/ uIDEvent);
+public static final native boolean KillTimer (long hWnd, long uIDEvent);
/** @param hdc cast=(HDC) */
-public static final native boolean LineTo (long /*int*/ hdc, int x1, int x2);
+public static final native boolean LineTo (long hdc, int x1, int x2);
/**
* @param hInstance cast=(HINSTANCE)
* @param lpBitmapName cast=(LPWSTR)
*/
-public static final native long /*int*/ LoadBitmap (long /*int*/ hInstance, long /*int*/ lpBitmapName);
+public static final native long LoadBitmap (long hInstance, long lpBitmapName);
/**
* @param hInstance cast=(HINSTANCE)
* @param lpCursorName cast=(LPWSTR)
*/
-public static final native long /*int*/ LoadCursor (long /*int*/ hInstance, long /*int*/ lpCursorName);
+public static final native long LoadCursor (long hInstance, long lpCursorName);
/**
* @param hInstance cast=(HINSTANCE)
* @param lpIconName cast=(LPWSTR)
*/
-public static final native long /*int*/ LoadIcon (long /*int*/ hInstance, long /*int*/ lpIconName);
+public static final native long LoadIcon (long hInstance, long lpIconName);
+/**
+ * @param hinst cast=(HINSTANCE)
+ * @param pszName cast=(PCWSTR)
+ * @param phico cast=(HICON *)
+ */
+public static final native int LoadIconMetric (long hinst, long pszName, int lims, long [] phico);
/**
* @param hinst cast=(HINSTANCE)
* @param lpszName cast=(LPWSTR)
*/
-public static final native long /*int*/ LoadImage (long /*int*/ hinst, long /*int*/ lpszName, int uType, int cxDesired, int cyDesired, int fuLoad);
+public static final native long LoadImage (long hinst, long lpszName, int uType, int cxDesired, int cyDesired, int fuLoad);
/** @param hMem cast=(HLOCAL) */
-public static final native long /*int*/ LocalFree (long /*int*/ hMem);
-public static final native int LODWORD (long l);
-public static final native int LOWORD (long /*int*/ l);
+public static final native long LocalFree (long hMem);
/** @param hdc cast=(HDC) */
-public static final native boolean LPtoDP (long /*int*/ hdc, POINT lpPoints, int nCount);
-public static final native int MAKEWORD(int l, int h);
-public static final native long /*int*/ MAKEWPARAM(int l, int h);
-public static final native long /*int*/ MAKELPARAM(int l, int h);
-public static final native long /*int*/ MAKELRESULT(int l, int h);
+public static final native boolean LPtoDP (long hdc, POINT lpPoints, int nCount);
public static final native int MapVirtualKey (int uCode, int uMapType);
/**
* @param hWndFrom cast=(HWND)
* @param hWndTo cast=(HWND)
- * @param lpPoints cast=(LPPOINT)
*/
-public static final native int MapWindowPoints (long /*int*/ hWndFrom, long /*int*/ hWndTo, POINT lpPoints, int cPoints);
+public static final native int MapWindowPoints (long hWndFrom, long hWndTo, POINT lpPoints, int cPoints);
/**
* @param hWndFrom cast=(HWND)
* @param hWndTo cast=(HWND)
* @param lpPoints cast=(LPPOINT)
*/
-public static final native int MapWindowPoints (long /*int*/ hWndFrom, long /*int*/ hWndTo, RECT lpPoints, int cPoints);
+public static final native int MapWindowPoints (long hWndFrom, long hWndTo, RECT lpPoints, int cPoints);
public static final native boolean MessageBeep (int uType);
/**
* @param hWnd cast=(HWND)
- * @param lpText cast=(LPWSTR)
- * @param lpCaption cast=(LPWSTR)
+ * @param lpText cast=(LPWSTR),flags=no_out
+ * @param lpCaption cast=(LPWSTR),flags=no_out
*/
-public static final native int MessageBox (long /*int*/ hWnd, char [] lpText, char [] lpCaption, int uType);
+public static final native int MessageBox (long hWnd, char [] lpText, char [] lpCaption, int uType);
/**
* @param hdc cast=(HDC)
* @param lpXform cast=(XFORM *)
*/
-public static final native boolean ModifyWorldTransform(long /*int*/ hdc, float [] lpXform, int iMode);
+public static final native boolean ModifyWorldTransform(long hdc, float [] lpXform, int iMode);
/** @param hwnd cast=(HWND) */
-public static final native long /*int*/ MonitorFromWindow (long /*int*/ hwnd, int dwFlags);
+public static final native long MonitorFromWindow (long hwnd, int dwFlags);
/**
* @param Destination cast=(PVOID),flags=no_in critical
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (char[] Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory (char[] Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in critical
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (byte [] Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (byte [] Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in critical
* @param Source cast=(CONST VOID *),flags=no_out
@@ -3379,122 +3327,117 @@ public static final native void MoveMemory (byte [] Destination, BITMAPINFOHEADE
* @param Destination cast=(PVOID),flags=no_in critical
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (int [] Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (int [] Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in critical
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (long [] Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory (long [] Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in critical
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (double[] Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory (double[] Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in critical
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (float[] Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory (float[] Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in critical
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (short[] Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory (short[] Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (long /*int*/ Destination, byte [] Source, int Length);
+public static final native void MoveMemory (long Destination, byte [] Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (long /*int*/ Destination, char [] Source, int Length);
+public static final native void MoveMemory (long Destination, char [] Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (long /*int*/ Destination, int [] Source, int Length);
+public static final native void MoveMemory (long Destination, int [] Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (long /*int*/ Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (long Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, DEVMODE Source, int Length);
+public static final native void MoveMemory (long Destination, DEVMODE Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, DOCHOSTUIINFO Source, int Length);
+public static final native void MoveMemory (long Destination, DOCHOSTUIINFO Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, GRADIENT_RECT Source, int Length);
+public static final native void MoveMemory (long Destination, GRADIENT_RECT Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, LOGFONT Source, int Length);
+public static final native void MoveMemory (long Destination, LOGFONT Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, MEASUREITEMSTRUCT Source, int Length);
+public static final native void MoveMemory (long Destination, MEASUREITEMSTRUCT Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, MINMAXINFO Source, int Length);
+public static final native void MoveMemory (long Destination, MINMAXINFO Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, MSG Source, int Length);
+public static final native void MoveMemory (long Destination, MSG Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, UDACCEL Source, int Length);
+public static final native void MoveMemory (long Destination, UDACCEL Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, NMTTDISPINFO Source, int Length);
-/**
- * @param Destination cast=(PVOID)
- * @param Source cast=(CONST VOID *)
- */
-public static final native void MoveMemory (long /*int*/ Destination, OPENFILENAME Source, int Length);
+public static final native void MoveMemory (long Destination, NMTTDISPINFO Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, RECT Source, int Length);
+public static final native void MoveMemory (long Destination, RECT Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, SAFEARRAY Source, int Length);
+public static final native void MoveMemory (long Destination, SAFEARRAY Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (SAFEARRAY Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (SAFEARRAY Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, TRIVERTEX Source, int Length);
+public static final native void MoveMemory (long Destination, TRIVERTEX Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, WINDOWPOS Source, int Length);
+public static final native void MoveMemory (long Destination, WINDOWPOS Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *),flags=no_out critical
@@ -3504,82 +3447,62 @@ public static final native void MoveMemory (BITMAPINFOHEADER Destination, byte [
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (BITMAPINFOHEADER Destination, long /*int*/ Source, int Length);
-/**
- * @param Destination cast=(PVOID),flags=no_in
- * @param Source cast=(CONST VOID *)
- */
-public static final native void MoveMemory (CERT_CONTEXT Destination, long /*int*/ Source, int Length);
-/**
- * @param Destination cast=(PVOID),flags=no_in
- * @param Source cast=(CONST VOID *)
- */
-public static final native void MoveMemory (CERT_INFO Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (BITMAPINFOHEADER Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (DEVMODE Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (DEVMODE Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (DOCHOSTUIINFO Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (DOCHOSTUIINFO Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (DRAWITEMSTRUCT Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (DRAWITEMSTRUCT Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (FLICK_DATA Destination, long /*int*/ [] Source, int Length);
+public static final native void MoveMemory (FLICK_DATA Destination, long [] Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (FLICK_POINT Destination, long /*int*/ [] Source, int Length);
+public static final native void MoveMemory (FLICK_POINT Destination, long [] Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (HDITEM Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (HDITEM Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (HELPINFO Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (HELPINFO Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (LOGFONT Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (LOGFONT Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (MEASUREITEMSTRUCT Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (MEASUREITEMSTRUCT Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (MINMAXINFO Destination, long /*int*/ Source, int Length);
-/**
- * @param Destination cast=(PVOID)
- * @param Source cast=(CONST VOID *)
- */
-public static final native void MoveMemory (OFNOTIFY Destination, long /*int*/ Source, int Length);
-/**
- * @param Destination cast=(PVOID)
- * @param Source cast=(CONST VOID *)
- */
-public static final native void MoveMemory (OPENFILENAME Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (MINMAXINFO Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (POINT Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (POINT Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *),flags=no_out critical
@@ -3589,227 +3512,222 @@ public static final native void MoveMemory (POINT Destination, long[] Source, in
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMHDR Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMHDR Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMCUSTOMDRAW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMCUSTOMDRAW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMLVCUSTOMDRAW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMLVCUSTOMDRAW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTBCUSTOMDRAW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTBCUSTOMDRAW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTBHOTITEM Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTBHOTITEM Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTREEVIEW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTREEVIEW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTVCUSTOMDRAW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTVCUSTOMDRAW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTVITEMCHANGE Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTVITEMCHANGE Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMUPDOWN Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMUPDOWN Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, NMLVCUSTOMDRAW Source, int Length);
+public static final native void MoveMemory (long Destination, NMLVCUSTOMDRAW Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, NMTBCUSTOMDRAW Source, int Length);
+public static final native void MoveMemory (long Destination, NMTBCUSTOMDRAW Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, NMTVCUSTOMDRAW Source, int Length);
+public static final native void MoveMemory (long Destination, NMTVCUSTOMDRAW Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, NMLVDISPINFO Source, int Length);
+public static final native void MoveMemory (long Destination, NMLVDISPINFO Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, NMTVDISPINFO Source, int Length);
+public static final native void MoveMemory (long Destination, NMTVDISPINFO Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMLVDISPINFO Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMLVDISPINFO Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTVDISPINFO Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTVDISPINFO Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMLVODSTATECHANGE Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMLVODSTATECHANGE Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMHEADER Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMHEADER Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMLINK Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMLINK Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMLISTVIEW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMLISTVIEW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMREBARCHILDSIZE Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMREBARCHILDSIZE Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMREBARCHEVRON Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMREBARCHEVRON Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTOOLBAR Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTOOLBAR Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTTCUSTOMDRAW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTTCUSTOMDRAW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (NMTTDISPINFO Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (NMTTDISPINFO Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (EMR Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (EMR Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (EMREXTCREATEFONTINDIRECTW Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (EMREXTCREATEFONTINDIRECTW Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, SHDRAGIMAGE Source, int Length);
+public static final native void MoveMemory (long Destination, SHDRAGIMAGE Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (TEXTMETRIC Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (TEXTMETRIC Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (TOUCHINPUT Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (TOUCHINPUT Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (WINDOWPOS Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (WINDOWPOS Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (MSG Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (MSG Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (UDACCEL Destination, long /*int*/ Source, int Length);
+public static final native void MoveMemory (UDACCEL Destination, long Source, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, DROPFILES Source, int Length);
+public static final native void MoveMemory (long Destination, DROPFILES Source, int Length);
/**
* @param DestinationPtr cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (long /*int*/ DestinationPtr, double[] Source, int Length);
+public static final native void MoveMemory (long DestinationPtr, double[] Source, int Length);
/**
* @param DestinationPtr cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (long /*int*/ DestinationPtr, float[] Source, int Length);
+public static final native void MoveMemory (long DestinationPtr, float[] Source, int Length);
/**
* @param DestinationPtr cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (long /*int*/ DestinationPtr, long[] Source, int Length);
+public static final native void MoveMemory (long DestinationPtr, long[] Source, int Length);
/**
* @param DestinationPtr cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out critical
*/
-public static final native void MoveMemory (long /*int*/ DestinationPtr, short[] Source, int Length);
+public static final native void MoveMemory (long DestinationPtr, short[] Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (SCRIPT_ITEM Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory (SCRIPT_ITEM Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (SCRIPT_LOGATTR Destination, long /*int*/ SourcePtr, int Length);
+public static final native void MoveMemory (SCRIPT_LOGATTR Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in
* @param SourcePtr cast=(CONST VOID *)
*/
-public static final native void MoveMemory (SCRIPT_PROPERTIES Destination, long /*int*/ SourcePtr, int Length);
-/**
- * @param Destination cast=(PVOID)
- * @param Source cast=(CONST VOID *),flags=no_out
- */
-public static final native void MoveMemory (long /*int*/ Destination, KEYBDINPUT Source, int Length);
+public static final native void MoveMemory (SCRIPT_PROPERTIES Destination, long SourcePtr, int Length);
/**
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
-public static final native void MoveMemory (long /*int*/ Destination, MOUSEINPUT Source, int Length);
+public static final native void MoveMemory (long Destination, CIDA Source, int Length);
/**
- * @param Destination cast=(PVOID)
- * @param Source cast=(CONST VOID *),flags=no_out
+ * @param Destination cast=(PVOID),flags=no_in
+ * @param Source cast=(CONST VOID *)
*/
-public static final native void MoveMemory (long /*int*/ Destination, GESTURECONFIG Source, int Length);
+public static final native void MoveMemory (CIDA Destination, long Source, int Length);
/**
* @param hdc cast=(HDC)
* @param lPoint cast=(LPPOINT)
*/
-public static final native boolean MoveToEx (long /*int*/ hdc, int x1, int x2, long /*int*/ lPoint);
+public static final native boolean MoveToEx (long hdc, int x1, int x2, long lPoint);
/**
* @param lpMultiByteStr cast=(LPCSTR),flags=no_out critical
* @param lpWideCharStr cast=(LPWSTR),flags=no_in critical
@@ -3819,66 +3737,69 @@ public static final native int MultiByteToWideChar (int CodePage, int dwFlags, b
* @param lpMultiByteStr cast=(LPCSTR)
* @param lpWideCharStr cast=(LPWSTR),flags=no_in critical
*/
-public static final native int MultiByteToWideChar (int CodePage, int dwFlags, long /*int*/ lpMultiByteStr, int cchMultiByte, char [] lpWideCharStr, int cchWideChar);
+public static final native int MultiByteToWideChar (int CodePage, int dwFlags, long lpMultiByteStr, int cchMultiByte, char [] lpWideCharStr, int cchWideChar);
/**
* @param event cast=(DWORD)
* @param hwnd cast=(HWND)
* @param idObject cast=(LONG)
* @param idChild cast=(LONG)
*/
-public static final native void NotifyWinEvent (int event, long /*int*/ hwnd, int idObject, int idChild);
+public static final native void NotifyWinEvent (int event, long hwnd, int idObject, int idChild);
public static final native boolean OffsetRect (RECT lprc, int dx, int dy);
/** @param hrgn cast=(HRGN) */
-public static final native int OffsetRgn (long /*int*/ hrgn, int nXOffset, int nYOffset);
+public static final native int OffsetRgn (long hrgn, int nXOffset, int nYOffset);
/** @param pvReserved cast=(LPVOID) */
-public static final native int OleInitialize (long /*int*/ pvReserved);
+public static final native int OleInitialize (long pvReserved);
public static final native void OleUninitialize ();
/** @param hWndNewOwner cast=(HWND) */
-public static final native boolean OpenClipboard (long /*int*/ hWndNewOwner);
+public static final native boolean OpenClipboard (long hWndNewOwner);
/**
* @param hwnd cast=(HWND)
- * @param pszClassList cast=(LPCWSTR)
+ * @param pszClassList cast=(LPCWSTR),flags=no_out
*/
-public static final native long /*int*/ OpenThemeData (long /*int*/ hwnd, char[] pszClassList);
+public static final native long OpenThemeData (long hwnd, char[] pszClassList);
/** @param hdc cast=(HDC) */
-public static final native boolean PatBlt (long /*int*/ hdc, int x1, int x2, int w, int h, int rop);
+public static final native boolean PatBlt (long hdc, int x1, int x2, int w, int h, int rop);
/** @param szfile cast=(LPCWSTR) */
-public static final native boolean PathIsExe (long /*int*/ szfile);
-/** @param hWnd cast=(HWND) */
-public static final native boolean PeekMessage (MSG lpMsg, long /*int*/ hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg);
+public static final native boolean PathIsExe (long szfile);
+/**
+ * @param lpMsg flags=no_in
+ * @param hWnd cast=(HWND)
+ */
+public static final native boolean PeekMessage (MSG lpMsg, long hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg);
/** @param hdc cast=(HDC) */
-public static final native boolean Pie (long /*int*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc);
-/** @param pt flags=struct */
-public static final native void POINTSTOPOINT(POINT pt, long /*int*/ pts);
+public static final native boolean Pie (long hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc);
/**
* @param hdc cast=(HDC)
* @param points cast=(CONST POINT *),flags=no_out critical
*/
-public static final native boolean Polygon (long /*int*/ hdc, int [] points, int nPoints);
+public static final native boolean Polygon (long hdc, int [] points, int nPoints);
/**
* @param hdc cast=(HDC)
* @param points cast=(CONST POINT *),flags=no_out critical
*/
-public static final native boolean Polyline (long /*int*/ hdc, int[] points, int nPoints);
+public static final native boolean Polyline (long hdc, int[] points, int nPoints);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native boolean PostMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, long /*int*/ lParam);
+public static final native boolean PostMessage (long hWnd, int Msg, long wParam, long lParam);
/**
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native boolean PostThreadMessage (int idThread, int Msg, long /*int*/ wParam, long /*int*/ lParam);
-public static final native short PRIMARYLANGID (int lgid);
-/** @param lppd cast=(LPPRINTDLGW) */
+public static final native boolean PostThreadMessage (int idThread, int Msg, long wParam, long lParam);
public static final native boolean PrintDlg (PRINTDLG lppd);
/**
* @param hwnd cast=(HWND)
* @param hdcBlt cast=(HDC)
*/
-public static final native boolean PrintWindow (long /*int*/ hwnd, long /*int*/ hdcBlt, int nFlags);
+public static final native boolean PrintWindow (long hwnd, long hdcBlt, int nFlags);
+/**
+ * @param pszString cast=(LPCWSTR),flags=no_out
+ * @param pkey flags=no_in
+ */
public static final native int PSPropertyKeyFromString (char[] pszString, PROPERTYKEY pkey);
/**
* @param rect flags=no_out
@@ -3886,37 +3807,36 @@ public static final native int PSPropertyKeyFromString (char[] pszString, PROPER
*/
public static final native boolean PtInRect (RECT rect, POINT pt);
/** @param hrgn cast=(HRGN) */
-public static final native boolean PtInRegion (long /*int*/ hrgn, int X, int Y);
-/** @param hDC cast=(HDC) */
-public static final native int RealizePalette (long /*int*/ hDC);
+public static final native boolean PtInRegion (long hrgn, int X, int Y);
/** @param hdc cast=(HDC) */
-public static final native boolean Rectangle (long /*int*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
+public static final native boolean Rectangle (long hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
/**
* @param hrgn cast=(HRGN)
* @param lprc flags=no_out
*/
-public static final native boolean RectInRegion (long /*int*/ hrgn, RECT lprc);
+public static final native boolean RectInRegion (long hrgn, RECT lprc);
/**
* @param hWnd cast=(HWND)
+ * @param lprcUpdate flags=no_out
* @param hrgnUpdate cast=(HRGN)
*/
-public static final native boolean RedrawWindow (long /*int*/ hWnd, RECT lprcUpdate, long /*int*/ hrgnUpdate, int flags);
+public static final native boolean RedrawWindow (long hWnd, RECT lprcUpdate, long hrgnUpdate, int flags);
/** @param hKey cast=(HKEY) */
-public static final native int RegCloseKey (long /*int*/ hKey);
+public static final native int RegCloseKey (long hKey);
/**
* @param hKey cast=(HKEY)
- * @param lpSubKey cast=(LPWSTR)
- * @param lpClass cast=(LPWSTR)
+ * @param lpSubKey cast=(LPCWSTR),flags=no_out
+ * @param lpClass cast=(LPWSTR),flags=no_out
* @param lpSecurityAttributes cast=(LPSECURITY_ATTRIBUTES)
* @param phkResult cast=(PHKEY)
* @param lpdwDisposition cast=(LPDWORD)
*/
-public static final native int RegCreateKeyEx (long /*int*/ hKey, char[] lpSubKey, int Reserved, char[] lpClass, int dwOptions, int samDesired, long /*int*/ lpSecurityAttributes, long /*int*/[] phkResult, long /*int*/[] lpdwDisposition);
+public static final native int RegCreateKeyEx (long hKey, char[] lpSubKey, int Reserved, char[] lpClass, int dwOptions, int samDesired, long lpSecurityAttributes, long[] phkResult, long[] lpdwDisposition);
/**
* @param hKey cast=(HKEY)
- * @param lpValueName cast=(LPWSTR)
+ * @param lpValueName cast=(LPCWSTR),flags=no_out
*/
-public static final native int RegDeleteValue (long /*int*/ hKey, char[] lpValueName);
+public static final native int RegDeleteValue (long hKey, char[] lpValueName);
/**
* @param hKey cast=(HKEY)
* @param lpName cast=(LPWSTR)
@@ -3924,138 +3844,140 @@ public static final native int RegDeleteValue (long /*int*/ hKey, char[] lpValue
* @param lpReserved cast=(LPDWORD)
* @param lpClass cast=(LPWSTR)
* @param lpcClass cast=(LPDWORD)
+ * @param lpftLastWriteTime cast=(PFILETIME)
*/
-public static final native int RegEnumKeyEx (long /*int*/ hKey, int dwIndex, char [] lpName, int [] lpcName, int [] lpReserved, char [] lpClass, int [] lpcClass, FILETIME lpftLastWriteTime);
-/** @param lpWndClass cast=(LPWNDCLASSW) */
+public static final native int RegEnumKeyEx (long hKey, int dwIndex, char [] lpName, int [] lpcName, int [] lpReserved, char [] lpClass, int [] lpcClass, long lpftLastWriteTime);
+/** @param lpWndClass flags=no_out */
public static final native int RegisterClass (WNDCLASS lpWndClass);
/**
- * @method flags=dynamic
* @param hWnd cast=(HWND)
* @param ulFlags cast=(ULONG)
*/
-public static final native boolean RegisterTouchWindow(long /*int*/ hWnd, int ulFlags);
-/** @param lpString cast=(LPWSTR) */
+public static final native boolean RegisterTouchWindow(long hWnd, int ulFlags);
+/** @param lpString cast=(LPCWSTR),flags=no_out */
public static final native int RegisterWindowMessage (char [] lpString);
-/** @param lpszFormat cast=(LPWSTR) */
+/** @param lpszFormat cast=(LPCWSTR),flags=no_out */
public static final native int RegisterClipboardFormat (char[] lpszFormat);
/**
* @param hKey cast=(HKEY)
- * @param lpSubKey cast=(LPWSTR)
+ * @param lpSubKey cast=(LPCWSTR),flags=no_out
* @param phkResult cast=(PHKEY)
*/
-public static final native int RegOpenKeyEx (long /*int*/ hKey, char[] lpSubKey, int ulOptions, int samDesired, long /*int*/[] phkResult);
+public static final native int RegOpenKeyEx (long hKey, char[] lpSubKey, int ulOptions, int samDesired, long[] phkResult);
/**
* @param hKey cast=(HKEY)
- * @param lpValueName cast=(LPWSTR)
+ * @param lpValueName cast=(LPCWSTR),flags=no_out
* @param lpReserved cast=(LPDWORD)
* @param lpType cast=(LPDWORD)
* @param lpData cast=(LPBYTE)
* @param lpcbData cast=(LPDWORD)
*/
-public static final native int RegQueryValueEx (long /*int*/ hKey, char[] lpValueName, long /*int*/ lpReserved, int[] lpType, char [] lpData, int[] lpcbData);
+public static final native int RegQueryValueEx (long hKey, char[] lpValueName, long lpReserved, int[] lpType, char [] lpData, int[] lpcbData);
/**
* @param hKey cast=(HKEY)
- * @param lpValueName cast=(LPWSTR)
+ * @param lpValueName cast=(LPCWSTR),flags=no_out
* @param lpReserved cast=(LPDWORD)
* @param lpType cast=(LPDWORD)
* @param lpData cast=(LPBYTE)
* @param lpcbData cast=(LPDWORD)
*/
-public static final native int RegQueryValueEx (long /*int*/ hKey, char[] lpValueName, long /*int*/ lpReserved, int[] lpType, int [] lpData, int[] lpcbData);
+public static final native int RegQueryValueEx (long hKey, char[] lpValueName, long lpReserved, int[] lpType, int [] lpData, int[] lpcbData);
/**
* @param hKey cast=(HKEY)
- * @param lpValueName cast=(LPWSTR)
+ * @param lpValueName cast=(LPCWSTR),flags=no_out
* @param lpData cast=(const BYTE*)
*/
-public static final native int RegSetValueEx (long /*int*/ hKey, char[] lpValueName, int Reserved, int dwType, int[] lpData, int cbData);
+public static final native int RegSetValueEx (long hKey, char[] lpValueName, int Reserved, int dwType, int[] lpData, int cbData);
public static final native boolean ReleaseCapture ();
/**
* @param hWnd cast=(HWND)
* @param hDC cast=(HDC)
*/
-public static final native int ReleaseDC (long /*int*/ hWnd, long /*int*/ hDC);
+public static final native int ReleaseDC (long hWnd, long hDC);
/** @param hMenu cast=(HMENU) */
-public static final native boolean RemoveMenu (long /*int*/ hMenu, int uPosition, int uFlags);
+public static final native boolean RemoveMenu (long hMenu, int uPosition, int uFlags);
/**
* @param hWnd cast=(HWND)
* @param lpString cast=(LPCWSTR)
*/
-public static final native long /*int*/ RemoveProp (long /*int*/ hWnd, long /*int*/ lpString);
-public static final native boolean ReplyMessage (long /*int*/ lResult);
+public static final native long RemoveProp (long hWnd, long lpString);
+public static final native boolean ReplyMessage (long lResult);
/**
* @param hdc cast=(HDC)
* @param nSavedDC cast=(int)
*/
-public static final native boolean RestoreDC (long /*int*/ hdc, int nSavedDC);
+public static final native boolean RestoreDC (long hdc, int nSavedDC);
/** @param hdc cast=(HDC) */
-public static final native boolean RoundRect (long /*int*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidth, int nHeight);
+public static final native boolean RoundRect (long hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidth, int nHeight);
+/** @method flags=dynamic */
+public static final native int RtlGetVersion (OSVERSIONINFOEX lpVersionInformation);
/** @param hdc cast=(HDC) */
-public static final native int SaveDC (long /*int*/ hdc);
+public static final native int SaveDC (long hdc);
/** @param hWnd cast=(HWND) */
-public static final native boolean ScreenToClient (long /*int*/ hWnd, POINT lpPoint);
+public static final native boolean ScreenToClient (long hWnd, POINT lpPoint);
/**
* @param psds cast=(const SCRIPT_DIGITSUBSTITUTE*)
* @param psc cast=(SCRIPT_CONTROL*)
* @param pss cast=(SCRIPT_STATE*)
*/
-public static final native int ScriptApplyDigitSubstitution (SCRIPT_DIGITSUBSTITUTE psds, SCRIPT_CONTROL psc, SCRIPT_STATE pss);
+public static final native int ScriptApplyDigitSubstitution (long psds, SCRIPT_CONTROL psc, SCRIPT_STATE pss);
/**
- * @param pwcChars cast=(const WCHAR *)
- * @param psa cast=(const SCRIPT_ANALYSIS *)
+ * @param pwcChars cast=(const WCHAR *),flags=no_out
+ * @param psa cast=(const SCRIPT_ANALYSIS *),flags=no_out
* @param psla cast=(SCRIPT_LOGATTR *)
*/
-public static final native int ScriptBreak (char[] pwcChars, int cChars, SCRIPT_ANALYSIS psa, long /*int*/ psla);
+public static final native int ScriptBreak (char[] pwcChars, int cChars, SCRIPT_ANALYSIS psa, long psla);
/**
* @param ppSp cast=(const SCRIPT_PROPERTIES ***)
* @param piNumScripts cast=(int *)
*/
-public static final native int ScriptGetProperties (long /*int*/[] ppSp, int[] piNumScripts);
+public static final native int ScriptGetProperties (long[] ppSp, int[] piNumScripts);
/**
* @param hdc cast=(HDC)
* @param psc cast=(SCRIPT_CACHE *)
* @param tmHeight cast=(long *)
*/
-public static final native int ScriptCacheGetHeight (long /*int*/ hdc, long /*int*/ psc, int[] tmHeight);
+public static final native int ScriptCacheGetHeight (long hdc, long psc, int[] tmHeight);
/**
* @param pwLogClust cast=(const WORD *)
* @param psva cast=(const SCRIPT_VISATTR *)
* @param piAdvance cast=(const int *)
- * @param psa cast=(const SCRIPT_ANALYSIS *)
+ * @param psa cast=(const SCRIPT_ANALYSIS *),flags=no_out
* @param piX cast=(int *)
*/
-public static final native int ScriptCPtoX (int iCP, boolean fTrailing, int cChars, int cGlyphs, long /*int*/ pwLogClust, long /*int*/ psva, long /*int*/ piAdvance, SCRIPT_ANALYSIS psa, int[] piX);
+public static final native int ScriptCPtoX (int iCP, boolean fTrailing, int cChars, int cGlyphs, long pwLogClust, long psva, long piAdvance, SCRIPT_ANALYSIS psa, int[] piX);
/** @param psc cast=(SCRIPT_CACHE *) */
-public static final native int ScriptFreeCache (long /*int*/ psc);
+public static final native int ScriptFreeCache (long psc);
/**
* @param hdc cast=(HDC)
* @param psc cast=(SCRIPT_CACHE *)
* @param sfp cast=(SCRIPT_FONTPROPERTIES *)
*/
-public static final native int ScriptGetFontProperties (long /*int*/ hdc, long /*int*/ psc, SCRIPT_FONTPROPERTIES sfp);
+public static final native int ScriptGetFontProperties (long hdc, long psc, SCRIPT_FONTPROPERTIES sfp);
/**
- * @param psa cast=(const SCRIPT_ANALYSIS *)
+ * @param psa cast=(const SCRIPT_ANALYSIS *),flags=no_out
* @param piGlyphWidth cast=(const int *)
* @param pwLogClust cast=(const WORD *)
* @param psva cast=(const SCRIPT_VISATTR *)
* @param piDx cast=(int *)
*/
-public static final native int ScriptGetLogicalWidths (SCRIPT_ANALYSIS psa, int cChars, int cGlyphs, long /*int*/ piGlyphWidth, long /*int*/ pwLogClust, long /*int*/ psva, int[] piDx);
+public static final native int ScriptGetLogicalWidths (SCRIPT_ANALYSIS psa, int cChars, int cGlyphs, long piGlyphWidth, long pwLogClust, long psva, int[] piDx);
/**
- * @param pwcInChars cast=(const WCHAR *)
- * @param psControl cast=(const SCRIPT_CONTROL *)
- * @param psState cast=(const SCRIPT_STATE *)
+ * @param pwcInChars cast=(const WCHAR *),flags=no_out
+ * @param psControl cast=(const SCRIPT_CONTROL *),flags=no_out
+ * @param psState cast=(const SCRIPT_STATE *),flags=no_out
* @param pItems cast=(SCRIPT_ITEM *)
* @param pcItems cast=(int *)
*/
-public static final native int ScriptItemize (char[] pwcInChars, int cInChars, int cMaxItems, SCRIPT_CONTROL psControl, SCRIPT_STATE psState, long /*int*/ pItems, int[] pcItems);
+public static final native int ScriptItemize (char[] pwcInChars, int cInChars, int cMaxItems, SCRIPT_CONTROL psControl, SCRIPT_STATE psState, long pItems, int[] pcItems);
/**
* @param psva cast=(SCRIPT_VISATTR *)
* @param piAdvance cast=(const int *)
* @param piJustify cast=(int *)
*/
-public static final native int ScriptJustify (long /*int*/ psva, long /*int*/ piAdvance, int cGlyphs, int iDx, int iMinKashida, long /*int*/ piJustify);
+public static final native int ScriptJustify (long psva, long piAdvance, int cGlyphs, int iDx, int iMinKashida, long piJustify);
/**
- * @param pbLevel cast=(const BYTE *)
+ * @param pbLevel cast=(const BYTE *),flags=no_out
* @param piVisualToLogical cast=(int *)
* @param piLogicalToVisual cast=(int *)
*/
@@ -4070,30 +3992,25 @@ public static final native int ScriptLayout (int cRuns, byte[] pbLevel, int[] pi
* @param pGoffset cast=(GOFFSET *)
* @param pABC cast=(ABC *)
*/
-public static final native int ScriptPlace (long /*int*/ hdc, long /*int*/ psc, long /*int*/ pwGlyphs, int cGlyphs, long /*int*/ psva, SCRIPT_ANALYSIS psa, long /*int*/ piAdvance, long /*int*/ pGoffset, int[] pABC);
-/**
- * @param Locale cast=(LCID)
- * @param psds cast=(SCRIPT_DIGITSUBSTITUTE*)
- */
-public static final native int ScriptRecordDigitSubstitution (int Locale, SCRIPT_DIGITSUBSTITUTE psds);
+public static final native int ScriptPlace (long hdc, long psc, long pwGlyphs, int cGlyphs, long psva, SCRIPT_ANALYSIS psa, long piAdvance, long pGoffset, int[] pABC);
/**
* @param hdc cast=(HDC)
* @param psc cast=(SCRIPT_CACHE *)
- * @param pwcChars cast=(const WCHAR *)
+ * @param pwcChars cast=(const WCHAR *),flags=no_out
* @param pwOutGlyphs cast=(WORD*)
*/
-public static final native int ScriptGetCMap (long /*int*/ hdc, long /*int*/ psc, char[] pwcChars, int cChars, int dwFlags, short[] pwOutGlyphs);
+public static final native int ScriptGetCMap (long hdc, long psc, char[] pwcChars, int cChars, int dwFlags, short[] pwOutGlyphs);
/**
* @param hdc cast=(HDC)
* @param psc cast=(SCRIPT_CACHE *)
- * @param pwcChars cast=(const WCHAR *)
+ * @param pwcChars cast=(const WCHAR *),flags=no_out
* @param psa cast=(SCRIPT_ANALYSIS *)
* @param pwOutGlyphs cast=(WORD *)
* @param pwLogClust cast=(WORD *)
* @param psva cast=(SCRIPT_VISATTR *)
* @param pcGlyphs cast=(int *)
*/
-public static final native int ScriptShape (long /*int*/ hdc, long /*int*/ psc, char[] pwcChars, int cChars, int cMaxGlyphs, SCRIPT_ANALYSIS psa, long /*int*/ pwOutGlyphs, long /*int*/ pwLogClust, long /*int*/ psva, int[] pcGlyphs);
+public static final native int ScriptShape (long hdc, long psc, char[] pwcChars, int cChars, int cMaxGlyphs, SCRIPT_ANALYSIS psa, long pwOutGlyphs, long pwLogClust, long psva, int[] pcGlyphs);
/**
* @param hdc cast=(HDC)
* @param pString cast=(const void*)
@@ -4102,437 +4019,404 @@ public static final native int ScriptShape (long /*int*/ hdc, long /*int*/ psc,
* @param pbInClass cast=(const BYTE*)
* @param pssa cast=(SCRIPT_STRING_ANALYSIS*)
*/
-public static final native int ScriptStringAnalyse (long /*int*/ hdc, long /*int*/ pString, int cString, int cGlyphs, int iCharset, int dwFlags, int iReqWidth, SCRIPT_CONTROL psControl, SCRIPT_STATE psState, long /*int*/ piDx, long /*int*/ pTabdef, long /*int*/ pbInClass, long /*int*/ pssa);
+public static final native int ScriptStringAnalyse (long hdc, long pString, int cString, int cGlyphs, int iCharset, int dwFlags, int iReqWidth, SCRIPT_CONTROL psControl, SCRIPT_STATE psState, long piDx, long pTabdef, long pbInClass, long pssa);
/** @param ssa cast=(SCRIPT_STRING_ANALYSIS*),flags=struct */
-public static final native int ScriptStringOut(long /*int*/ ssa, int iX, int iY, int uOptions, RECT prc, int iMinSel, int iMaxSel, boolean fDisabled);
+public static final native int ScriptStringOut(long ssa, int iX, int iY, int uOptions, RECT prc, int iMinSel, int iMaxSel, boolean fDisabled);
/** @param pssa cast=(SCRIPT_STRING_ANALYSIS*) */
-public static final native int ScriptStringFree(long /*int*/ pssa);
+public static final native int ScriptStringFree(long pssa);
/**
* @param hdc cast=(const HDC)
* @param psc cast=(SCRIPT_CACHE *)
- * @param lprc cast=(const RECT *)
- * @param psa cast=(const SCRIPT_ANALYSIS *)
+ * @param lprc cast=(const RECT *),flags=no_out
+ * @param psa cast=(const SCRIPT_ANALYSIS *),flags=no_out
* @param pwcReserved cast=(const WCHAR *)
* @param pwGlyphs cast=(const WORD *)
* @param piAdvance cast=(const int *)
* @param piJustify cast=(const int *)
* @param pGoffset cast=(const GOFFSET *)
*/
-public static final native int ScriptTextOut (long /*int*/ hdc, long /*int*/ psc, int x, int y, int fuOptions, RECT lprc, SCRIPT_ANALYSIS psa, long /*int*/ pwcReserved, int iReserved, long /*int*/ pwGlyphs, int cGlyphs, long /*int*/ piAdvance, long /*int*/ piJustify, long /*int*/ pGoffset);
+public static final native int ScriptTextOut (long hdc, long psc, int x, int y, int fuOptions, RECT lprc, SCRIPT_ANALYSIS psa, long pwcReserved, int iReserved, long pwGlyphs, int cGlyphs, long piAdvance, long piJustify, long pGoffset);
/**
* @param pwLogClust cast=(const WORD *)
* @param psva cast=(const SCRIPT_VISATTR *)
* @param piAdvance cast=(const int *)
- * @param psa cast=(const SCRIPT_ANALYSIS *)
+ * @param psa cast=(const SCRIPT_ANALYSIS *),flags=no_out
* @param piCP cast=(int *)
* @param piTrailing cast=(int *)
*/
-public static final native int ScriptXtoCP (int iX, int cChars, int cGlyphs, long /*int*/ pwLogClust, long /*int*/ psva, long /*int*/ piAdvance, SCRIPT_ANALYSIS psa, int[] piCP, int[] piTrailing);
+public static final native int ScriptXtoCP (int iX, int cChars, int cGlyphs, long pwLogClust, long psva, long piAdvance, SCRIPT_ANALYSIS psa, int[] piCP, int[] piTrailing);
/**
* @param hWnd cast=(HWND)
* @param hrgnUpdate cast=(HRGN)
*/
-public static final native int ScrollWindowEx (long /*int*/ hWnd, int dx, int dy, RECT prcScroll, RECT prcClip, long /*int*/ hrgnUpdate, RECT prcUpdate, int flags);
+public static final native int ScrollWindowEx (long hWnd, int dx, int dy, RECT prcScroll, RECT prcClip, long hrgnUpdate, RECT prcUpdate, int flags);
/**
* @param hdc cast=(HDC)
* @param hrgn cast=(HRGN)
*/
-public static final native int SelectClipRgn (long /*int*/ hdc, long /*int*/ hrgn);
+public static final native int SelectClipRgn (long hdc, long hrgn);
/**
* @param hDC cast=(HDC)
* @param HGDIObj cast=(HGDIOBJ)
*/
-public static final native long /*int*/ SelectObject (long /*int*/ hDC, long /*int*/ HGDIObj);
-/**
- * @param hDC cast=(HDC)
- * @param hpal cast=(HPALETTE)
- */
-public static final native long /*int*/ SelectPalette (long /*int*/ hDC, long /*int*/ hpal, boolean bForceBackground);
-/** @param pInputs cast=(LPINPUT) */
-public static final native int SendInput (int nInputs, long /*int*/ pInputs, int cbSize);
+public static final native long SelectObject (long hDC, long HGDIObj);
+/** @param pInputs flags=no_out */
+public static final native int SendInput (int nInputs, INPUT pInputs, int cbSize);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, int [] wParam, int [] lParam);
+public static final native long SendMessage (long hWnd, int Msg, int [] wParam, int [] lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, char [] lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, char [] lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, int [] lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, int [] lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, long /*int*/ lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, long lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, LVCOLUMN lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, LVCOLUMN lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, LVHITTESTINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, LVHITTESTINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, LITEM lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, LITEM lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, LVITEM lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, LVITEM lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, LVINSERTMARK lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, LVINSERTMARK lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, MARGINS lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, MARGINS lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, MCHITTESTINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, MCHITTESTINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, REBARBANDINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, REBARBANDINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, RECT lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, RECT lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, SYSTEMTIME lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, SYSTEMTIME lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, SHDRAGIMAGE lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, SHDRAGIMAGE lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TBBUTTON lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TBBUTTON lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TBBUTTONINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TBBUTTONINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TCITEM lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TCITEM lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TCHITTESTINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TCHITTESTINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TOOLINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TOOLINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TVHITTESTINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TVHITTESTINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TVINSERTSTRUCT lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TVINSERTSTRUCT lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TVITEM lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TVITEM lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, TVSORTCB lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, TVSORTCB lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, UDACCEL lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, UDACCEL lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, HDHITTESTINFO lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, HDHITTESTINFO lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, HDITEM lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, HDITEM lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, HDLAYOUT lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, HDLAYOUT lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, BUTTON_IMAGELIST lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, BUTTON_IMAGELIST lParam);
/**
* @param hWnd cast=(HWND)
* @param wParam cast=(WPARAM)
* @param lParam cast=(LPARAM)
*/
-public static final native long /*int*/ SendMessage (long /*int*/ hWnd, int Msg, long /*int*/ wParam, SIZE lParam);
+public static final native long SendMessage (long hWnd, int Msg, long wParam, SIZE lParam);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ SetActiveWindow (long /*int*/ hWnd);
+public static final native long SetActiveWindow (long hWnd);
/**
* @param hdc cast=(HDC)
* @param colorRef cast=(COLORREF)
*/
-public static final native int SetBkColor (long /*int*/ hdc, int colorRef);
+public static final native int SetBkColor (long hdc, int colorRef);
/** @param hdc cast=(HDC) */
-public static final native int SetBkMode (long /*int*/ hdc, int mode);
+public static final native int SetBkMode (long hdc, int mode);
/**
* @param hdc cast=(HDC)
- * @param lppt cast=(LPPOINT)
+ * @param lppt flags=no_in
*/
-public static final native boolean SetBrushOrgEx (long /*int*/ hdc, int nXOrg, int nYOrg, POINT lppt);
+public static final native boolean SetBrushOrgEx (long hdc, int nXOrg, int nYOrg, POINT lppt);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ SetCapture (long /*int*/ hWnd);
+public static final native long SetCapture (long hWnd);
public static final native boolean SetCaretPos (int X, int Y);
-/** @method flags=dynamic */
+/** @param AppID flags=no_out */
public static final native int SetCurrentProcessExplicitAppUserModelID (char[] AppID);
/** @param hCursor cast=(HCURSOR) */
-public static final native long /*int*/ SetCursor (long /*int*/ hCursor);
+public static final native long SetCursor (long hCursor);
public static final native boolean SetCursorPos (int X, int Y);
/**
* @param hdc cast=(HDC)
* @param pColors cast=(RGBQUAD *),flags=no_out critical
*/
-public static final native int SetDIBColorTable (long /*int*/ hdc, int uStartIndex, int cEntries, byte[] pColors);
-public static final native boolean SetDllDirectory (char [] lpString);
-public static final native int SetErrorMode (int uMode);
+public static final native int SetDIBColorTable (long hdc, int uStartIndex, int cEntries, byte[] pColors);
/** @param hWnd cast=(HWND) */
-public static final native long /*int*/ SetFocus (long /*int*/ hWnd);
+public static final native long SetFocus (long hWnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean SetForegroundWindow (long /*int*/ hWnd);
+public static final native boolean SetForegroundWindow (long hWnd);
/**
- * @method flags=dynamic
* @param hwnd cast=(HWND)
- * @param pGestureConfig cast=(PGESTURECONFIG)
+ * @param pGestureConfig flags=no_out
*/
-public static final native boolean SetGestureConfig(long /*int*/ hwnd, int dwReserved, int cIDs, long /*int*/ pGestureConfig, int cbSize);
+public static final native boolean SetGestureConfig(long hwnd, int dwReserved, int cIDs, GESTURECONFIG pGestureConfig, int cbSize);
/** @param hdc cast=(HDC) */
-public static final native int SetGraphicsMode (long /*int*/ hdc, int iMode);
+public static final native int SetGraphicsMode (long hdc, int iMode);
/** @param hwnd cast=(HWND) */
-public static final native boolean SetLayeredWindowAttributes(long /*int*/ hwnd, int crKey, byte bAlpha, int dwFlags);
+public static final native boolean SetLayeredWindowAttributes(long hwnd, int crKey, byte bAlpha, int dwFlags);
/**
* @param hdc cast=(HDC)
* @param dwLayout cast=(DWORD)
*/
-public static final native int SetLayout (long /*int*/ hdc, int dwLayout);
+public static final native int SetLayout (long hdc, int dwLayout);
/**
* @param hWnd cast=(HWND)
* @param hMenu cast=(HMENU)
*/
-public static final native boolean SetMenu (long /*int*/ hWnd, long /*int*/ hMenu);
+public static final native boolean SetMenu (long hWnd, long hMenu);
/** @param hMenu cast=(HMENU) */
-public static final native boolean SetMenuDefaultItem (long /*int*/ hMenu, int uItem, int fByPos);
-/** @param hmenu cast=(HMENU) */
-public static final native boolean SetMenuInfo (long /*int*/ hmenu, MENUINFO lpcmi);
+public static final native boolean SetMenuDefaultItem (long hMenu, int uItem, int fByPos);
/**
- * @param hMenu cast=(HMENU)
- * @param lpmii cast=(LPMENUITEMINFOW)
+ * @param hmenu cast=(HMENU)
+ * @param lpcmi flags=no_out
*/
-public static final native boolean SetMenuItemInfo (long /*int*/ hMenu, int uItem, boolean fByPosition, MENUITEMINFO lpmii);
-/** @param hdc cast=(HDC) */
-public static final native int SetMetaRgn (long /*int*/ hdc);
+public static final native boolean SetMenuInfo (long hmenu, MENUINFO lpcmi);
/**
- * @param hPal cast=(HPALETTE)
- * @param lppe cast=(PALETTEENTRY *),flags=no_out critical
+ * @param hMenu cast=(HMENU)
+ * @param lpmii flags=no_out
*/
-public static final native int SetPaletteEntries (long /*int*/ hPal, int iStart, int cEntries, byte[] lppe);
+public static final native boolean SetMenuItemInfo (long hMenu, int uItem, boolean fByPosition, MENUITEMINFO lpmii);
+/** @param hdc cast=(HDC) */
+public static final native int SetMetaRgn (long hdc);
/**
* @param hWndChild cast=(HWND)
* @param hWndNewParent cast=(HWND)
*/
-public static final native long /*int*/ SetParent (long /*int*/ hWndChild, long /*int*/ hWndNewParent);
+public static final native long SetParent (long hWndChild, long hWndNewParent);
/** @param hdc cast=(HDC) */
-public static final native int SetPixel (long /*int*/ hdc, int X, int Y, int crColor);
+public static final native int SetPixel (long hdc, int X, int Y, int crColor);
/** @param hdc cast=(HDC) */
-public static final native int SetPolyFillMode (long /*int*/ hdc, int iPolyFillMode);
+public static final native int SetPolyFillMode (long hdc, int iPolyFillMode);
public static final native boolean SetProcessDPIAware ();
+/** @method flags=no_gen */
+public static final native int SetPreferredAppMode(int mode);
/** @param lprc flags=no_in */
public static final native boolean SetRect (RECT lprc, int xLeft, int yTop, int xRight, int yBottom);
/** @param hrgn cast=(HRGN) */
-public static final native boolean SetRectRgn (long /*int*/ hrgn, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
+public static final native boolean SetRectRgn (long hrgn, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
/** @param hdc cast=(HDC) */
-public static final native int SetROP2 (long /*int*/ hdc, int fnDrawMode);
-/** @param hwnd cast=(HWND) */
-public static final native boolean SetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw);
+public static final native int SetROP2 (long hdc, int fnDrawMode);
+/**
+ * @param hwnd cast=(HWND)
+ * @param info flags=no_out
+ */
+public static final native boolean SetScrollInfo (long hwnd, int flags, SCROLLINFO info, boolean fRedraw);
/** @param hdc cast=(HDC) */
-public static final native int SetStretchBltMode (long /*int*/ hdc, int iStretchMode);
+public static final native int SetStretchBltMode (long hdc, int iStretchMode);
/**
* @param hWnd cast=(HWND)
* @param lpString cast=(LPCWSTR)
* @param hData cast=(HANDLE)
*/
-public static final native boolean SetProp (long /*int*/ hWnd, long /*int*/ lpString, long /*int*/ hData);
+public static final native boolean SetProp (long hWnd, long lpString, long hData);
/**
* @param hdc cast=(HDC)
* @param colorRef cast=(COLORREF)
*/
-public static final native int SetTextColor (long /*int*/ hdc, int colorRef);
+public static final native int SetTextColor (long hdc, int colorRef);
/**
* @param hWnd cast=(HWND)
* @param lpTimerFunc cast=(TIMERPROC)
*/
-public static final native long /*int*/ SetTimer (long /*int*/ hWnd, long /*int*/ nIDEvent, int Elapse, long /*int*/ lpTimerFunc);
+public static final native long SetTimer (long hWnd, long nIDEvent, int Elapse, long lpTimerFunc);
/** @param hWnd cast=(HWND) */
-public static final native int SetWindowLong (long /*int*/ hWnd, int nIndex, int dwNewLong);
+public static final native int SetWindowLong (long hWnd, int nIndex, int dwNewLong);
/**
* @param hWnd cast=(HWND)
* @param dwNewLong cast=(LONG_PTR)
*/
-public static final native long /*int*/ SetWindowLongPtr (long /*int*/ hWnd, int nIndex, long /*int*/ dwNewLong);
+public static final native long SetWindowLongPtr (long hWnd, int nIndex, long dwNewLong);
/** @param hdc cast=(HDC) */
-public static final native boolean SetWindowOrgEx (long /*int*/ hdc, int X, int Y, POINT lpPoint);
-/** @param hWnd cast=(HWND) */
-public static final native boolean SetWindowPlacement (long /*int*/ hWnd, WINDOWPLACEMENT lpwndpl);
+public static final native boolean SetWindowOrgEx (long hdc, int X, int Y, POINT lpPoint);
+/**
+ * @param hWnd cast=(HWND)
+ * @param lpwndpl flags=no_out
+ */
+public static final native boolean SetWindowPlacement (long hWnd, WINDOWPLACEMENT lpwndpl);
/**
* @param hWnd cast=(HWND)
* @param hWndInsertAfter cast=(HWND)
*/
-public static final native boolean SetWindowPos(long /*int*/ hWnd, long /*int*/ hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
+public static final native boolean SetWindowPos(long hWnd, long hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
/**
* @param hWnd cast=(HWND)
* @param hRgn cast=(HRGN)
*/
-public static final native int SetWindowRgn (long /*int*/ hWnd, long /*int*/ hRgn, boolean bRedraw);
+public static final native int SetWindowRgn (long hWnd, long hRgn, boolean bRedraw);
/**
* @param hWnd cast=(HWND)
- * @param lpString cast=(LPWSTR)
+ * @param lpString cast=(LPCWSTR),flags=no_out
*/
-public static final native boolean SetWindowText (long /*int*/ hWnd, char [] lpString);
+public static final native boolean SetWindowText (long hWnd, char [] lpString);
/**
* @param hwnd cast=(HWND)
- * @param pszSubAppName cast=(LPCWSTR)
- * @param pszSubIdList cast=(LPCWSTR)
+ * @param pszSubAppName cast=(LPCWSTR),flags=no_out
+ * @param pszSubIdList cast=(LPCWSTR),flags=no_out
*/
-public static final native int SetWindowTheme (long /*int*/ hwnd, char [] pszSubAppName, char [] pszSubIdList);
+public static final native int SetWindowTheme (long hwnd, char [] pszSubAppName, char [] pszSubIdList);
/**
* @param lpfn cast=(HOOKPROC)
* @param hMod cast=(HINSTANCE)
*/
-public static final native long /*int*/ SetWindowsHookEx (int idHook, long /*int*/ lpfn, long /*int*/ hMod, int dwThreadId);
+public static final native long SetWindowsHookEx (int idHook, long lpfn, long hMod, int dwThreadId);
/**
* @param hdc cast=(HDC)
- * @param lpXform cast=(XFORM *)
+ * @param lpXform cast=(XFORM *),flags=no_out
*/
-public static final native boolean SetWorldTransform(long /*int*/ hdc, float[] lpXform);
-/** @param lpbi cast=(LPBROWSEINFOW) */
-public static final native long /*int*/ SHBrowseForFolder (BROWSEINFO lpbi);
-/**
- * @param pszPath cast=(LPCWSTR)
- * @param psfi cast=(SHFILEINFOW *)
- */
-public static final native long /*int*/ SHGetFileInfo (char [] pszPath, int dwFileAttributes, SHFILEINFO psfi, int cbFileInfo, int uFlags);
-/** @param lpExecInfo cast=(LPSHELLEXECUTEINFOW) */
+public static final native boolean SetWorldTransform(long hdc, float[] lpXform);
+/** @param pszPath cast=(LPCWSTR),flags=no_out */
+public static final native long SHGetFileInfo (char [] pszPath, int dwFileAttributes, SHFILEINFO psfi, int cbFileInfo, int uFlags);
public static final native boolean ShellExecuteEx (SHELLEXECUTEINFO lpExecInfo);
+/** @param lpData flags=no_out */
public static final native boolean Shell_NotifyIcon (int dwMessage, NOTIFYICONDATA lpData);
-/** @param ppMalloc cast=(LPMALLOC *) */
-public static final native int SHGetMalloc (long /*int*/ [] ppMalloc);
-/**
- * @param pidl cast=(LPCITEMIDLIST)
- * @param pszPath cast=(LPWSTR)
- */
-public static final native boolean SHGetPathFromIDList (long /*int*/ pidl, char [] pszPath);
-/**
- * @param kfid cast=(REFKNOWNFOLDERID)
- * @param riid cast=(REFIID)
- * @param ppv cast=(void **)
- */
-public static final native int SHCreateItemInKnownFolder (byte [] kfid, int dwKFFlags, char [] pszItem, byte [] riid, long /*int*/ [] ppv);
-/**
- * @param psiParent cast=(IShellItem *)
- * @param pbc cast=(IBindCtx *)
- * @param riid cast=(REFIID)
- * @param ppv cast=(void **)
- */
-public static final native int SHCreateItemFromRelativeName (long /*int*/ psiParent, char [] pszName, long /*int*/ pbc, byte [] riid, long /*int*/ [] ppv);
-/**
- * @param pbc cast=(IBindCtx *)
- * @param riid cast=(REFIID)
- * @param ppv cast=(void **)
- */
-public static final native int SHCreateItemFromParsingName (char [] pszName, long /*int*/ pbc, byte [] riid, long /*int*/ [] ppv);
/** @param hWnd cast=(HWND) */
-public static final native boolean ShowCaret (long /*int*/ hWnd);
+public static final native boolean ShowCaret (long hWnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean ShowOwnedPopups (long /*int*/ hWnd, boolean fShow);
+public static final native boolean ShowOwnedPopups (long hWnd, boolean fShow);
/** @param hWnd cast=(HWND) */
-public static final native boolean ShowScrollBar (long /*int*/ hWnd, int wBar, boolean bShow);
+public static final native boolean ShowScrollBar (long hWnd, int wBar, boolean bShow);
/** @param hWnd cast=(HWND) */
-public static final native boolean ShowWindow (long /*int*/ hWnd, int nCmdShow);
+public static final native boolean ShowWindow (long hWnd, int nCmdShow);
/**
* @param hdc cast=(HDC)
- * @param lpdi cast=(LPDOCINFOW)
+ * @param lpdi flags=no_out
*/
-public static final native int StartDoc (long /*int*/ hdc, DOCINFO lpdi);
+public static final native int StartDoc (long hdc, DOCINFO lpdi);
/** @param hdc cast=(HDC) */
-public static final native int StartPage (long /*int*/ hdc);
+public static final native int StartPage (long hdc);
/**
* @param hdcDest cast=(HDC)
* @param hdcSrc cast=(HDC)
*/
-public static final native boolean StretchBlt (long /*int*/ hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, long /*int*/ hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, int dwRop);
+public static final native boolean StretchBlt (long hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, long hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, int dwRop);
public static final native boolean SystemParametersInfo (int uiAction, int uiParam, HIGHCONTRAST pvParam, int fWinIni);
public static final native boolean SystemParametersInfo (int uiAction, int uiParam, RECT pvParam, int fWinIni);
public static final native boolean SystemParametersInfo (int uiAction, int uiParam, NONCLIENTMETRICS pvParam, int fWinIni);
@@ -4542,107 +4426,63 @@ public static final native boolean SystemParametersInfo (int uiAction, int uiPar
* @param pwszBuff cast=(LPWSTR)
*/
public static final native int ToUnicode (int wVirtKey, int wScanCode, byte [] lpKeyState, char [] pwszBuff, int cchBuff, int wFlags);
-public static final native long TOUCH_COORD_TO_PIXEL(long touchCoord);
/**
* @param hwndTV cast=(HWND)
* @param hitem cast=(HTREEITEM)
*/
-public static final native boolean TreeView_GetItemRect (long /*int*/ hwndTV, long /*int*/ hitem, RECT prc, boolean fItemRect);
+public static final native boolean TreeView_GetItemRect (long hwndTV, long hitem, RECT prc, boolean fItemRect);
public static final native boolean TrackMouseEvent (TRACKMOUSEEVENT lpEventTrack);
/**
* @param hMenu cast=(HMENU)
* @param hWnd cast=(HWND)
*/
-public static final native boolean TrackPopupMenu (long /*int*/ hMenu, int uFlags, int x, int y, int nReserved, long /*int*/ hWnd, RECT prcRect);
+public static final native boolean TrackPopupMenu (long hMenu, int uFlags, int x, int y, int nReserved, long hWnd, RECT prcRect);
/**
* @param hWnd cast=(HWND)
* @param hAccTable cast=(HACCEL)
*/
-public static final native int TranslateAccelerator (long /*int*/ hWnd, long /*int*/ hAccTable, MSG lpMsg);
+public static final native int TranslateAccelerator (long hWnd, long hAccTable, MSG lpMsg);
/**
* @param lpSrc cast=(DWORD *)
* @param lpCs cast=(LPCHARSETINFO)
*/
-public static final native boolean TranslateCharsetInfo (long /*int*/ lpSrc, int [] lpCs, int dwFlags);
+public static final native boolean TranslateCharsetInfo (long lpSrc, int [] lpCs, int dwFlags);
/**
* @param hWndClient cast=(HWND)
* @param lpMsg cast=(LPMSG)
*/
-public static final native boolean TranslateMDISysAccel (long /*int*/ hWndClient, MSG lpMsg);
+public static final native boolean TranslateMDISysAccel (long hWndClient, MSG lpMsg);
public static final native boolean TranslateMessage (MSG lpmsg);
/**
* @param hdcDest cast=(HDC)
* @param hdcSrc cast=(HDC)
*/
-public static final native boolean TransparentBlt (long /*int*/ hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int hHeightDest, long /*int*/ hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, int crTransparent);
+public static final native boolean TransparentBlt (long hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int hHeightDest, long hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, int crTransparent);
/** @param hhk cast=(HHOOK) */
-public static final native boolean UnhookWindowsHookEx (long /*int*/ hhk);
+public static final native boolean UnhookWindowsHookEx (long hhk);
/**
- * @param lpClassName cast=(LPWSTR)
+ * @param lpClassName cast=(LPCWSTR),flags=no_out
* @param hInstance cast=(HINSTANCE)
*/
-public static final native boolean UnregisterClass (char [] lpClassName, long /*int*/ hInstance);
-/**
- * @method flags=dynamic
- * @param hwnd cast=(HWND)
- */
-public static final native boolean UnregisterTouchWindow (long /*int*/ hwnd);
+public static final native boolean UnregisterClass (char [] lpClassName, long hInstance);
+/** @param hwnd cast=(HWND) */
+public static final native boolean UnregisterTouchWindow (long hwnd);
/** @param hWnd cast=(HWND) */
-public static final native boolean UpdateWindow (long /*int*/ hWnd);
+public static final native boolean UpdateWindow (long hWnd);
/**
- * @param pszPath cast=(LPCWSTR)
+ * @param pszPath cast=(LPCWSTR),flags=no_out
* @param pszURL cast=(LPWSTR)
+ * @param pcchUrl cast=(DWORD *)
*/
public static final native int UrlCreateFromPath (char[] pszPath, char[] pszURL, int[] pcchUrl, int flags);
-/** @param hWnd cast=(HWND) */
-public static final native boolean ValidateRect (long /*int*/ hWnd, RECT lpRect);
+/**
+ * @param hWnd cast=(HWND)
+ * @param lpRect flags=no_out
+ */
+public static final native boolean ValidateRect (long hWnd, RECT lpRect);
/** @param ch cast=(WCHAR) */
public static final native short VkKeyScan (short ch);
-/** @method flags=trycatch */
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl);
-
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0);
-
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int arg2, int[] arg3);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, int arg1, int arg2, int[] arg3);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, long arg1, int arg2, long[] arg3);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, long arg1, int arg2, long[] arg3);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, int arg1, int arg2, long[] arg3);
-
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, char[] arg0, int arg1, int arg2, int[] arg3, int[] arg4);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, short arg0, byte[] arg1, byte[] arg2, byte[] arg3);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int[] arg0);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long[] arg0);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, byte[] arg0, int[] arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, byte[] arg0, long[] arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, long /*int*/[] arg1, int[] arg2);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, int[] arg1, int[] arg2);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, long[] arg1, long[] arg2);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, TF_DISPLAYATTRIBUTE arg0);
-
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, int arg0, long arg1, long arg2);
-public static final native int VtblCall(int fnNumber, long /*int*/ ppVtbl, long arg0, long arg1, long arg2);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, int arg2);
-
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, long arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, long arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, int arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int[] arg0, byte[] arg1, int[] arg2);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int[] arg0, byte[] arg1, long[] arg2);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, char[] arg0);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, char[] arg0, int arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, char[] arg0, long arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, PROPERTYKEY arg0, int arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, PROPERTYKEY arg0, long arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, int arg1, char[] arg2, char[] arg3, int arg4);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, int arg1, char[] arg2, char[] arg3, long arg4);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, int[] arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, long arg0, int[] arg1);
-public static final native int VtblCall (int fnNumber, long /*int*/ ppVtbl, int arg0, long[] arg1);
-
public static final native boolean WaitMessage ();
/**
* @param lpWideCharStr cast=(LPCWSTR),flags=no_out critical
@@ -4650,29 +4490,29 @@ public static final native boolean WaitMessage ();
* @param lpDefaultChar cast=(LPCSTR)
* @param lpUsedDefaultChar cast=(LPBOOL)
*/
-public static final native int WideCharToMultiByte (int CodePage, int dwFlags, char [] lpWideCharStr, int cchWideChar, byte [] lpMultiByteStr, int cchMultiByte, byte [] lpDefaultChar, boolean [] lpUsedDefaultChar);
+public static final native int WideCharToMultiByte (int CodePage, int dwFlags, char [] lpWideCharStr, int cchWideChar, byte [] lpMultiByteStr, int cchMultiByte, byte [] lpDefaultChar, int [] lpUsedDefaultChar);
/**
* @param lpWideCharStr cast=(LPCWSTR),flags=no_out critical
* @param lpMultiByteStr cast=(LPSTR)
* @param lpDefaultChar cast=(LPCSTR)
* @param lpUsedDefaultChar cast=(LPBOOL)
*/
-public static final native int WideCharToMultiByte (int CodePage, int dwFlags, char [] lpWideCharStr, int cchWideChar, long /*int*/ lpMultiByteStr, int cchMultiByte, byte [] lpDefaultChar, boolean [] lpUsedDefaultChar);
+public static final native int WideCharToMultiByte (int CodePage, int dwFlags, char [] lpWideCharStr, int cchWideChar, long lpMultiByteStr, int cchMultiByte, byte [] lpDefaultChar, int [] lpUsedDefaultChar);
/** @param hDC cast=(HDC) */
-public static final native long /*int*/ WindowFromDC (long /*int*/ hDC);
+public static final native long WindowFromDC (long hDC);
/** @param lpPoint flags=struct */
-public static final native long /*int*/ WindowFromPoint (POINT lpPoint);
+public static final native long WindowFromPoint (POINT lpPoint);
/** @param string cast=(const wchar_t *) */
-public static final native int wcslen (long /*int*/ string);
+public static final native int wcslen (long string);
/** @param hFileMappingObject cast=(HANDLE)
* @param dwDesiredAccess cast=(DWORD)
* @param dwFileOffsetHigh cast=(DWORD)
* @param dwFileOffsetLow cast=(DWORD)
*/
-public static final native long /*int*/ MapViewOfFile(long /*int*/ hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap);
+public static final native long MapViewOfFile(long hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap);
/** @param lpBaseAddress cast=(LPCVOID) */
-public static final native boolean UnmapViewOfFile(long /*int*/ lpBaseAddress);
+public static final native boolean UnmapViewOfFile(long lpBaseAddress);
public static final int PROCESS_DUP_HANDLE = 0x0040;
public static final int PROCESS_VM_READ = 0x0010;
@@ -4682,9 +4522,9 @@ public static final int DUPLICATE_SAME_ACCESS = 2;
* @param dwDesiredAccess cast=(DWORD)
* @param dwProcessId cast=(DWORD)
*/
-public static final native long /*int*/ OpenProcess(int dwDesiredAccess, boolean bInheritHandle, int dwProcessId);
+public static final native long OpenProcess(int dwDesiredAccess, boolean bInheritHandle, int dwProcessId);
-public static final native long /*int*/ GetCurrentProcess();
+public static final native long GetCurrentProcess();
/**
* @param hSourceProcessHandle cast=(HANDLE)
@@ -4694,7 +4534,7 @@ public static final native long /*int*/ GetCurrentProcess();
* @param dwDesiredAccess cast=(DWORD)
* @param dwOptions cast=(DWORD)
*/
-public static final native boolean DuplicateHandle(long /*int*/ hSourceProcessHandle, long /*int*/ hSourceHandle, long /*int*/ hTargetProcessHandle,
- long /*int*/ [] lpTargetHandle, int dwDesiredAccess, boolean b, int dwOptions);
+public static final native boolean DuplicateHandle(long hSourceProcessHandle, long hSourceHandle, long hTargetProcessHandle,
+ long [] lpTargetHandle, int dwDesiredAccess, boolean b, int dwOptions);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java
new file mode 100644
index 0000000000..ecec0b653e
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Syntevo and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Syntevo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class OSVERSIONINFOEX {
+ public int dwOSVersionInfoSize;
+ public int dwMajorVersion;
+ public int dwMinorVersion;
+ public int dwBuildNumber;
+ public int dwPlatformId;
+ public char[] szCSDVersion = new char[128];
+ public int wServicePackMajor;
+ public int wServicePackMinor;
+ public int wSuiteMask;
+ public int wProductType;
+ public int wReserved;
+
+ public static final int sizeof = OS.OSVERSIONINFOEX_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java
index 0b80d30201..daacae7e8e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java
@@ -16,58 +16,58 @@ package org.eclipse.swt.internal.win32;
public class OUTLINETEXTMETRIC {
public int otmSize;
public TEXTMETRIC otmTextMetrics = new TEXTMETRIC ();
- public byte otmFiller;
- /** @field accessor=otmPanoseNumber.bFamilyType */
+ public byte otmFiller;
+ /** @field accessor=otmPanoseNumber.bFamilyType */
public byte otmPanoseNumber_bFamilyType;
- /** @field accessor=otmPanoseNumber.bSerifStyle */
+ /** @field accessor=otmPanoseNumber.bSerifStyle */
public byte otmPanoseNumber_bSerifStyle;
- /** @field accessor=otmPanoseNumber.bWeight */
+ /** @field accessor=otmPanoseNumber.bWeight */
public byte otmPanoseNumber_bWeight;
- /** @field accessor=otmPanoseNumber.bProportion */
+ /** @field accessor=otmPanoseNumber.bProportion */
public byte otmPanoseNumber_bProportion;
- /** @field accessor=otmPanoseNumber.bContrast */
+ /** @field accessor=otmPanoseNumber.bContrast */
public byte otmPanoseNumber_bContrast;
- /** @field accessor=otmPanoseNumber.bStrokeVariation */
+ /** @field accessor=otmPanoseNumber.bStrokeVariation */
public byte otmPanoseNumber_bStrokeVariation;
- /** @field accessor=otmPanoseNumber.bArmStyle */
+ /** @field accessor=otmPanoseNumber.bArmStyle */
public byte otmPanoseNumber_bArmStyle;
- /** @field accessor=otmPanoseNumber.bLetterform */
+ /** @field accessor=otmPanoseNumber.bLetterform */
public byte otmPanoseNumber_bLetterform;
- /** @field accessor=otmPanoseNumber.bMidline */
+ /** @field accessor=otmPanoseNumber.bMidline */
public byte otmPanoseNumber_bMidline;
- /** @field accessor=otmPanoseNumber.bXHeight */
+ /** @field accessor=otmPanoseNumber.bXHeight */
public byte otmPanoseNumber_bXHeight;
- public int otmfsSelection;
- public int otmfsType;
- public int otmsCharSlopeRise;
- public int otmsCharSlopeRun;
- public int otmItalicAngle;
- public int otmEMSquare;
- public int otmAscent;
- public int otmDescent;
- public int otmLineGap;
- public int otmsCapEmHeight;
- public int otmsXHeight;
+ public int otmfsSelection;
+ public int otmfsType;
+ public int otmsCharSlopeRise;
+ public int otmsCharSlopeRun;
+ public int otmItalicAngle;
+ public int otmEMSquare;
+ public int otmAscent;
+ public int otmDescent;
+ public int otmLineGap;
+ public int otmsCapEmHeight;
+ public int otmsXHeight;
public RECT otmrcFontBox = new RECT();
- public int otmMacAscent;
- public int otmMacDescent;
- public int otmMacLineGap;
- public int otmusMinimumPPEM;
+ public int otmMacAscent;
+ public int otmMacDescent;
+ public int otmMacLineGap;
+ public int otmusMinimumPPEM;
public POINT otmptSubscriptSize = new POINT();
public POINT otmptSubscriptOffset = new POINT();
public POINT otmptSuperscriptSize = new POINT();
public POINT otmptSuperscriptOffset = new POINT();
- public int otmsStrikeoutSize;
- public int otmsStrikeoutPosition;
- public int otmsUnderscoreSize;
- public int otmsUnderscorePosition;
- /** @field cast=(PSTR) */
- public long /*int*/ otmpFamilyName;
- /** @field cast=(PSTR) */
- public long /*int*/ otmpFaceName;
- /** @field cast=(PSTR) */
- public long /*int*/ otmpStyleName;
- /** @field cast=(PSTR) */
- public long /*int*/ otmpFullName;
+ public int otmsStrikeoutSize;
+ public int otmsStrikeoutPosition;
+ public int otmsUnderscoreSize;
+ public int otmsUnderscorePosition;
+ /** @field cast=(PSTR) */
+ public long otmpFamilyName;
+ /** @field cast=(PSTR) */
+ public long otmpFaceName;
+ /** @field cast=(PSTR) */
+ public long otmpStyleName;
+ /** @field cast=(PSTR) */
+ public long otmpFullName;
public static final int sizeof = OS.OUTLINETEXTMETRIC_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PAINTSTRUCT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PAINTSTRUCT.java
index d1acaf45a6..7da7b4f054 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PAINTSTRUCT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PAINTSTRUCT.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.win32;
public class PAINTSTRUCT {
/** @field cast=(HDC) */
- public long /*int*/ hdc;
+ public long hdc;
public boolean fErase;
// public RECT rcPaint;
/** @field accessor=rcPaint.left */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PANOSE.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PANOSE.java
deleted file mode 100644
index 86ac7aadc3..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PANOSE.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-public class PANOSE {
- public byte bFamilyType;
- public byte bSerifStyle;
- public byte bWeight;
- public byte bProportion;
- public byte bContrast;
- public byte bStrokeVariation;
- public byte bArmStyle;
- public byte bLetterform;
- public byte bMidline;
- public byte bXHeight;
- public static final int sizeof = OS.PANOSE_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PRINTDLG.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PRINTDLG.java
index 3d845bbc4a..93b2ad2d26 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PRINTDLG.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PRINTDLG.java
@@ -16,13 +16,13 @@ package org.eclipse.swt.internal.win32;
public class PRINTDLG {
public int lStructSize; // DWORD
/** @field cast=(HWND) */
- public long /*int*/ hwndOwner; // HWND
+ public long hwndOwner; // HWND
/** @field cast=(HGLOBAL) */
- public long /*int*/ hDevMode; // HGLOBAL
+ public long hDevMode; // HGLOBAL
/** @field cast=(HGLOBAL) */
- public long /*int*/ hDevNames; // HGLOBAL
+ public long hDevNames; // HGLOBAL
/** @field cast=(HDC) */
- public long /*int*/ hDC; // HDC
+ public long hDC; // HDC
public int Flags; // DWORD
public short nFromPage; // WORD
public short nToPage; // WORD
@@ -30,19 +30,19 @@ public class PRINTDLG {
public short nMaxPage; // WORD
public short nCopies; // WORD
/** @field cast=(HINSTANCE) */
- public long /*int*/ hInstance; // HINSTANCE
- public long /*int*/ lCustData; // LPARAM
+ public long hInstance; // HINSTANCE
+ public long lCustData; // LPARAM
/** @field cast=(LPPRINTHOOKPROC) */
- public long /*int*/ lpfnPrintHook; // LPPRINTHOOKPROC
+ public long lpfnPrintHook; // LPPRINTHOOKPROC
/** @field cast=(LPPRINTHOOKPROC) */
- public long /*int*/ lpfnSetupHook; // LPSETUPHOOKPROC
+ public long lpfnSetupHook; // LPSETUPHOOKPROC
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpPrintTemplateName; // LPCTSTR
+ public long lpPrintTemplateName; // LPCTSTR
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpSetupTemplateName; // LPCTSTR
+ public long lpSetupTemplateName; // LPCTSTR
/** @field cast=(HGLOBAL) */
- public long /*int*/ hPrintTemplate; // HGLOBAL
+ public long hPrintTemplate; // HGLOBAL
/** @field cast=(HGLOBAL) */
- public long /*int*/ hSetupTemplate; // HGLOBAL
+ public long hSetupTemplate; // HGLOBAL
public static final int sizeof = OS.PRINTDLG_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java
index 9d143a8512..39a71f7368 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java
@@ -15,9 +15,9 @@ package org.eclipse.swt.internal.win32;
public class PROCESS_INFORMATION {
/** @field cast=(HANDLE) */
- public long /*int*/ hProcess;
+ public long hProcess;
/** @field cast=(HANDLE) */
- public long /*int*/ hThread;
+ public long hThread;
public int dwProcessId;
public int dwThreadId;
public static int sizeof = OS.PROCESS_INFORMATION_sizeof ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/REBARBANDINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/REBARBANDINFO.java
index 81aa663fe1..8a5e32139d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/REBARBANDINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/REBARBANDINFO.java
@@ -20,22 +20,22 @@ public class REBARBANDINFO {
public int clrFore;
public int clrBack;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpText;
+ public long lpText;
public int cch;
public int iImage;
/** @field cast=(HWND) */
- public long /*int*/ hwndChild;
+ public long hwndChild;
public int cxMinChild;
public int cyMinChild;
public int cx;
/** @field cast=(HBITMAP) */
- public long /*int*/ hbmBack;
+ public long hbmBack;
public int wID;
public int cyChild;
public int cyMaxChild;
public int cyIntegral;
public int cxIdeal;
- public long /*int*/ lParam;
+ public long lParam;
public int cxHeader;
public static final int sizeof = OS.REBARBANDINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/RECT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/RECT.java
index 4d13015c0c..e8280fb053 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/RECT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/RECT.java
@@ -19,4 +19,15 @@ public class RECT {
public int right;
public int bottom;
public static final int sizeof = OS.RECT_sizeof ();
+
+ public RECT() {
+
+ }
+
+ public RECT(int left, int top, int right, int bottom) {
+ this.left = left;
+ this.top = top;
+ this.right = right;
+ this.bottom = bottom;
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java
index c1d47b0d31..ea4085fe48 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java
@@ -19,7 +19,7 @@ public class SAFEARRAY {
public int cbElements;
public int cLocks;
/** @field cast=(PVOID) */
- public long /*int*/ pvData;
+ public long pvData;
/** @field accessor=rgsabound[0] */
public SAFEARRAYBOUND rgsabound;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_CONTROL.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_CONTROL.java
index cba4c60633..2b7b0900a6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_CONTROL.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_CONTROL.java
@@ -23,6 +23,8 @@ public class SCRIPT_CONTROL {
public boolean fNeutralOverride;
public boolean fNumericOverride;
public boolean fLegacyBidiClass;
+ public boolean fMergeNeutralItems;
+ public boolean fUseStandardBidi;
public int fReserved;
public static final int sizeof = OS.SCRIPT_CONTROL_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_DIGITSUBSTITUTE.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_DIGITSUBSTITUTE.java
deleted file mode 100644
index 09712951cd..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SCRIPT_DIGITSUBSTITUTE.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.win32;
-
-public class SCRIPT_DIGITSUBSTITUTE {
- public short NationalDigitLanguage;
- public short TraditionalDigitLanguage;
- public byte DigitSubstitute;
- public int dwReserved;
- public static final int sizeof = OS.SCRIPT_DIGITSUBSTITUTE_sizeof ();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHDRAGIMAGE.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHDRAGIMAGE.java
index 4c506c37f9..66f2552eab 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHDRAGIMAGE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHDRAGIMAGE.java
@@ -17,7 +17,7 @@ public final class SHDRAGIMAGE {
public SIZE sizeDragImage = new SIZE ();
public POINT ptOffset = new POINT ();
/** @field cast=(HBITMAP) */
- public long /*int*/ hbmpDragImage;
+ public long hbmpDragImage;
public int crColorKey;
public static final int sizeof = OS.SHDRAGIMAGE_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFO.java
index a8b7bb7b76..c3ebf66f33 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFO.java
@@ -17,34 +17,34 @@ public class SHELLEXECUTEINFO {
public int cbSize;
public int fMask;
/** @field cast=(HWND) */
- public long /*int*/ hwnd;
+ public long hwnd;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpVerb;
+ public long lpVerb;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpFile;
+ public long lpFile;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpParameters;
+ public long lpParameters;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpDirectory;
+ public long lpDirectory;
public int nShow;
/** @field cast=(HINSTANCE) */
- public long /*int*/ hInstApp;
+ public long hInstApp;
// Optional members
/** @field cast=(LPVOID) */
- public long /*int*/ lpIDList;
+ public long lpIDList;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpClass;
+ public long lpClass;
/** @field cast=(HKEY) */
- public long /*int*/ hkeyClass;
+ public long hkeyClass;
public int dwHotKey;
// union {
// HANDLE hIcon;
// HANDLE hMonitor;
// };
/** @field cast=(HANDLE) */
- public long /*int*/ hIcon;
+ public long hIcon;
/** @field cast=(HANDLE) */
- public long /*int*/ hProcess;
+ public long hProcess;
public static final int sizeof = OS.SHELLEXECUTEINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHFILEINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHFILEINFO.java
index bb97cfc16d..a1858677ac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHFILEINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SHFILEINFO.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.win32;
public class SHFILEINFO {
/** @field cast=(HICON) */
- public long /*int*/ hIcon;
+ public long hIcon;
public int iIcon;
public int dwAttributes;
public char [] szDisplayName = new char [OS.MAX_PATH];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/STARTUPINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/STARTUPINFO.java
index c744b74351..00780f69ed 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/STARTUPINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/STARTUPINFO.java
@@ -16,11 +16,11 @@ package org.eclipse.swt.internal.win32;
public class STARTUPINFO {
public int cb;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpReserved;
+ public long lpReserved;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpDesktop;
+ public long lpDesktop;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpTitle;
+ public long lpTitle;
public int dwX;
public int dwY;
public int dwXSize;
@@ -32,12 +32,12 @@ public class STARTUPINFO {
public short wShowWindow;
public short cbReserved2;
/** @field cast=(LPBYTE) */
- public long /*int*/ lpReserved2;
+ public long lpReserved2;
/** @field cast=(HANDLE) */
- public long /*int*/ hStdInput;
+ public long hStdInput;
/** @field cast=(HANDLE) */
- public long /*int*/ hStdOutput;
+ public long hStdOutput;
/** @field cast=(HANDLE) */
- public long /*int*/ hStdError;
+ public long hStdError;
public static int sizeof = OS.STARTUPINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTON.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTON.java
index bc2c361ad2..b2f17c60ce 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTON.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTON.java
@@ -18,7 +18,7 @@ public class TBBUTTON {
public int idCommand;
public byte fsState;
public byte fsStyle;
- public long /*int*/ dwData;
- public long /*int*/ iString;
+ public long dwData;
+ public long iString;
public static final int sizeof = OS.TBBUTTON_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTONINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTONINFO.java
index 183c002948..db1c8bb7f0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTONINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TBBUTTONINFO.java
@@ -21,9 +21,9 @@ public class TBBUTTONINFO {
public byte fsState;
public byte fsStyle;
public short cx;
- public long /*int*/ lParam;
+ public long lParam;
/** @field cast=(LPTSTR) */
- public long /*int*/ pszText;
+ public long pszText;
public int cchText;
public static final int sizeof = OS.TBBUTTONINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCITEM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCITEM.java
index 97735190de..b9b1b70dd4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCITEM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCITEM.java
@@ -18,9 +18,9 @@ public class TCITEM {
public int dwState;
public int dwStateMask;
/** @field cast=(LPTSTR) */
- public long /*int*/ pszText;
+ public long pszText;
public int cchTextMax;
public int iImage;
- public long /*int*/ lParam;
+ public long lParam;
public static final int sizeof = OS.TCITEM_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOOLINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOOLINFO.java
index 81b3a3b348..e14f703c56 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOOLINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOOLINFO.java
@@ -17,8 +17,8 @@ public class TOOLINFO {
public int cbSize;
public int uFlags;
/** @field cast=(HWND) */
- public long /*int*/ hwnd;
- public long /*int*/ uId;
+ public long hwnd;
+ public long uId;
// public RECT rect;
/** @field accessor=rect.left */
public int left;
@@ -29,11 +29,11 @@ public class TOOLINFO {
/** @field accessor=rect.bottom */
public int bottom;
/** @field cast=(HINSTANCE) */
- public long /*int*/ hinst;
+ public long hinst;
/** @field cast=(LPTSTR) */
- public long /*int*/ lpszText;
- public long /*int*/ lParam;
+ public long lpszText;
+ public long lParam;
/** @field cast=(void *) */
- public long /*int*/ lpReserved;
+ public long lpReserved;
public static int sizeof = OS.TOOLINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOUCHINPUT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOUCHINPUT.java
index 8fca5a7ed7..84c3093fc5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOUCHINPUT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TOUCHINPUT.java
@@ -17,12 +17,12 @@ public class TOUCHINPUT {
public int x;
public int y;
/** @field cast=(HWND) */
- public long /*int*/ hSource;
+ public long hSource;
public int dwID;
public int dwFlags;
public int dwMask;
public int dwTime;
- public long /*int*/ dwExtraInfo;
+ public long dwExtraInfo;
public int cxContact;
public int cyContact;
public static final int sizeof = OS.TOUCHINPUT_sizeof();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TRACKMOUSEEVENT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TRACKMOUSEEVENT.java
index b1d608dfdc..b56fa1f22b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TRACKMOUSEEVENT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TRACKMOUSEEVENT.java
@@ -17,7 +17,7 @@ public class TRACKMOUSEEVENT {
public int cbSize;
public int dwFlags;
/** @field cast=(HWND) */
- public long /*int*/ hwndTrack;
+ public long hwndTrack;
public int dwHoverTime;
public static final int sizeof = OS.TRACKMOUSEEVENT_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVHITTESTINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVHITTESTINFO.java
index b33d4f4698..0d3b85e059 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVHITTESTINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVHITTESTINFO.java
@@ -21,6 +21,6 @@ public class TVHITTESTINFO {
public int y;
public int flags;
/** @field cast=(HTREEITEM) */
- public long /*int*/ hItem;
+ public long hItem;
public static int sizeof = OS.TVHITTESTINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java
index e79561172f..59a332aa32 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java
@@ -15,30 +15,30 @@ package org.eclipse.swt.internal.win32;
public class TVINSERTSTRUCT {
/** @field cast=(HTREEITEM) */
- public long /*int*/ hParent;
+ public long hParent;
/** @field cast=(HTREEITEM) */
- public long /*int*/ hInsertAfter;
+ public long hInsertAfter;
// public TVITEMEX item;
/** @field accessor=item.mask */
public int mask;
/** @field accessor=item.hItem,cast=(HTREEITEM) */
- public long /*int*/ hItem;
+ public long hItem;
/** @field accessor=item.state */
public int state;
/** @field accessor=item.stateMask */
public int stateMask;
/** @field accessor=item.pszText,cast=(LPTSTR) */
- public long /*int*/ pszText;
- /** @field accessor=item.cchTextMax */
+ public long pszText;
+ /** @field accessor=item.cchTextMax */
public int cchTextMax;
- /** @field accessor=item.iImage */
+ /** @field accessor=item.iImage */
public int iImage;
- /** @field accessor=item.iSelectedImage */
+ /** @field accessor=item.iSelectedImage */
public int iSelectedImage;
/** @field accessor=item.cChildren */
public int cChildren;
/** @field accessor=item.lParam */
- public long /*int*/ lParam;
+ public long lParam;
/** @field accessor=itemex.iIntegral */
public int iIntegral;
public static final int sizeof = OS.TVINSERTSTRUCT_sizeof ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java
index 98a90ed790..8952603595 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java
@@ -16,15 +16,15 @@ package org.eclipse.swt.internal.win32;
public class TVITEM {
public int mask;
/** @field cast=(HTREEITEM) */
- public long /*int*/ hItem;
+ public long hItem;
public int state;
public int stateMask;
/** @field cast=(LPTSTR) */
- public long /*int*/ pszText;
- public int cchTextMax;
- public int iImage;
- public int iSelectedImage;
+ public long pszText;
+ public int cchTextMax;
+ public int iImage;
+ public int iSelectedImage;
public int cChildren;
- public long /*int*/ lParam;
+ public long lParam;
public static final int sizeof = OS.TVITEM_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVSORTCB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVSORTCB.java
index 2b5ff1c36b..fd9ff29108 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVSORTCB.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVSORTCB.java
@@ -15,10 +15,10 @@ package org.eclipse.swt.internal.win32;
public class TVSORTCB {
/** @field cast=(HTREEITEM) */
- public long /*int*/ hParent;
+ public long hParent;
/** @field cast=(PFNTVCOMPARE) */
- public long /*int*/ lpfnCompare;
+ public long lpfnCompare;
/** @field cast=(LPARAM) */
- public long /*int*/ lParam;
+ public long lParam;
public static final int sizeof = OS.TVSORTCB_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WINDOWPOS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WINDOWPOS.java
index f74f969cc1..cb9d33659a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WINDOWPOS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WINDOWPOS.java
@@ -15,9 +15,9 @@ package org.eclipse.swt.internal.win32;
public class WINDOWPOS {
/** @field cast=(HWND) */
- public long /*int*/ hwnd;
+ public long hwnd;
/** @field cast=(HWND) */
- public long /*int*/ hwndInsertAfter;
+ public long hwndInsertAfter;
public int x;
public int y;
public int cx;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WNDCLASS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WNDCLASS.java
index 90bc05b742..02998074c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WNDCLASS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/WNDCLASS.java
@@ -16,20 +16,20 @@ package org.eclipse.swt.internal.win32;
public class WNDCLASS {
public int style;
/** @field cast=(WNDPROC) */
- public long /*int*/ lpfnWndProc;
+ public long lpfnWndProc;
public int cbClsExtra;
public int cbWndExtra;
/** @field cast=(HINSTANCE) */
- public long /*int*/ hInstance;
+ public long hInstance;
/** @field cast=(HICON) */
- public long /*int*/ hIcon;
+ public long hIcon;
/** @field cast=(HCURSOR) */
- public long /*int*/ hCursor;
+ public long hCursor;
/** @field cast=(HBRUSH) */
- public long /*int*/ hbrBackground;
+ public long hbrBackground;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpszMenuName;
+ public long lpszMenuName;
/** @field cast=(LPCTSTR) */
- public long /*int*/ lpszClassName;
+ public long lpszClassName;
public static final int sizeof = OS.WNDCLASS_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java
index 04fecbc70f..0ee5b440e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java
@@ -157,7 +157,7 @@ public PrinterData open() {
NSPrintPanel panel = NSPrintPanel.printPanel();
NSPrintInfo printInfo = new NSPrintInfo(NSPrintInfo.sharedPrintInfo().copy());
if (printerData.duplex != SWT.DEFAULT) {
- long /*int*/ settings = printInfo.PMPrintSettings();
+ long settings = printInfo.PMPrintSettings();
int duplex = printerData.duplex == PrinterData.DUPLEX_SHORT_EDGE ? OS.kPMDuplexTumble
: printerData.duplex == PrinterData.DUPLEX_LONG_EDGE ? OS.kPMDuplexNoTumble
: OS.kPMDuplexNone;
@@ -186,11 +186,7 @@ public PrinterData open() {
dict.setValue(NSNumber.numberWithInt(printerData.startPage), OS.NSPrintFirstPage);
dict.setValue(NSNumber.numberWithInt(printerData.endPage), OS.NSPrintLastPage);
}
- // NSPrintSelectionOnly is not available in version 10.5
- // dict.setValue(NSNumber.numberWithBool(printerData.scope == PrinterData.SELECTION), OS.NSPrintSelectionOnly);
- if (OS.VERSION >= 0x1060) {
- printInfo.setSelectionOnly (printerData.scope == PrinterData.SELECTION);
- }
+ printInfo.setSelectionOnly (printerData.scope == PrinterData.SELECTION);
panel.setOptions(OS.NSPrintPanelShowsPageSetupAccessory | OS.NSPrintPanelShowsPrintSelection | panel.options());
Shell parent = getParent();
@@ -199,7 +195,7 @@ public PrinterData open() {
if ((getStyle () & SWT.SHEET) != 0) {
initClasses();
SWTPrintPanelDelegate delegate = (SWTPrintPanelDelegate)new SWTPrintPanelDelegate().alloc().init();
- long /*int*/ jniRef = OS.NewGlobalRef(this);
+ long jniRef = OS.NewGlobalRef(this);
if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, SWT_OBJECT, jniRef);
returnCode = -1;
@@ -212,7 +208,7 @@ public PrinterData open() {
response = returnCode;
} else {
display.setData(SET_MODAL_DIALOG, this);
- response = (int)/*64*/panel.runModalWithPrintInfo(printInfo);
+ response = (int)panel.runModalWithPrintInfo(printInfo);
}
display.setData(SET_MODAL_DIALOG, null);
if (response != OS.NSCancelButton) {
@@ -224,7 +220,7 @@ public PrinterData open() {
NSString filename = new NSString(dict.objectForKey(OS.NSPrintSavePath));
data.fileName = filename.getString();
}
- if (OS.VERSION >= 0x1060 && printInfo.isSelectionOnly ()) {
+ if (printInfo.isSelectionOnly ()) {
data.scope = PrinterData.SELECTION;
} else {
data.scope = new NSNumber(dict.objectForKey(OS.NSPrintAllPages)).intValue() != 0 ? PrinterData.ALL_PAGES : PrinterData.PAGE_RANGE;
@@ -238,14 +234,14 @@ public PrinterData open() {
data.copyCount = new NSNumber(dict.objectForKey(OS.NSPrintCopies)).intValue();
data.copyCount = 1; //TODO: Only set to 1 if the printer does the copy internally (most printers do)
data.orientation = new NSNumber(dict.objectForKey(OS.NSPrintOrientation)).intValue() == OS.NSLandscapeOrientation ? PrinterData.LANDSCAPE : PrinterData.PORTRAIT;
- long /*int*/ settings = printInfo.PMPrintSettings();
+ long settings = printInfo.PMPrintSettings();
int outDuplexSetting[] = new int[1];
OS.PMGetDuplex(settings, outDuplexSetting);
data.duplex = outDuplexSetting[0] == OS.kPMDuplexTumble ? PrinterData.DUPLEX_SHORT_EDGE
: outDuplexSetting[0] == OS.kPMDuplexNoTumble ? PrinterData.DUPLEX_LONG_EDGE
: PrinterData.DUPLEX_NONE;
NSData nsData = NSKeyedArchiver.archivedDataWithRootObject(printInfo);
- data.otherData = new byte[(int)/*64*/nsData.length()];
+ data.otherData = new byte[(int)nsData.length()];
C.memmove(data.otherData, nsData.bytes(), data.otherData.length);
printerData = data;
}
@@ -276,8 +272,8 @@ static boolean getSheetEnabled () {
return !"false".equals(System.getProperty("org.eclipse.swt.sheet"));
}
-static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
- long /*int*/ [] jniRef = new long /*int*/ [1];
+static long dialogProc(long id, long sel, long arg0, long arg1, long arg2) {
+ long [] jniRef = new long [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
if (sel == OS.sel_panelDidEnd_returnCode_contextInfo_) {
@@ -293,19 +289,18 @@ void initClasses () {
if (OS.objc_lookUpClass (className) != 0) return;
dialogCallback5 = new Callback(getClass(), "dialogProc", 5);
- long /*int*/ dialogProc5 = dialogCallback5.getAddress();
- if (dialogProc5 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long dialogProc5 = dialogCallback5.getAddress();
byte[] types = {'*','\0'};
int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
- long /*int*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+ long cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addMethod(cls, OS.sel_panelDidEnd_returnCode_contextInfo_, dialogProc5, "@:@i@");
OS.objc_registerClassPair(cls);
}
-void panelDidEnd_returnCode_contextInfo(long /*int*/ id, long /*int*/ sel, long /*int*/ alert, long /*int*/ returnCode, long /*int*/ contextInfo) {
- this.returnCode = (int)/*64*/returnCode;
+void panelDidEnd_returnCode_contextInfo(long id, long sel, long alert, long returnCode, long contextInfo) {
+ this.returnCode = (int)returnCode;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java
index e5ea0d06e8..25c5e66601 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java
@@ -62,7 +62,7 @@ public static PrinterData[] getPrinterList() {
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
NSArray printers = NSPrinter.printerNames();
- int count = (int)/*64*/printers.count();
+ int count = (int)printers.count();
PrinterData[] result = new PrinterData[count];
for (int i = 0; i < count; i++) {
NSString str = new NSString(printers.objectAtIndex(i));
@@ -216,7 +216,7 @@ protected void create(DeviceData deviceData) {
printInfo.setPrinter(printer);
}
if (data.duplex != SWT.DEFAULT) {
- long /*int*/ settings = printInfo.PMPrintSettings();
+ long settings = printInfo.PMPrintSettings();
int duplex = data.duplex == PrinterData.DUPLEX_SHORT_EDGE ? OS.kPMDuplexTumble
: data.duplex == PrinterData.DUPLEX_LONG_EDGE ? OS.kPMDuplexNoTumble
: OS.kPMDuplexNone;
@@ -237,7 +237,7 @@ protected void create(DeviceData deviceData) {
* the user chooses the preview button. The fix is to reset the job disposition.
*/
NSString job = printInfo.jobDisposition();
- if (job.isEqual(new NSString(OS.NSPrintPreviewJob()))) {
+ if (job.isEqual(OS.NSPrintPreviewJob)) {
printInfo.setJobDisposition(job);
}
NSRect rect = new NSRect();
@@ -245,7 +245,7 @@ protected void create(DeviceData deviceData) {
window.initWithContentRect(rect, OS.NSBorderlessWindowMask, OS.NSBackingStoreBuffered, false);
String className = "SWTPrinterView"; //$NON-NLS-1$
if (OS.objc_lookUpClass(className) == 0) {
- long /*int*/ cls = OS.objc_allocateClassPair(OS.class_NSView, className, 0);
+ long cls = OS.objc_allocateClassPair(OS.class_NSView, className, 0);
OS.class_addMethod(cls, OS.sel_isFlipped, OS.isFlipped_CALLBACK(), "@:");
OS.objc_registerClassPair(cls);
}
@@ -302,7 +302,7 @@ protected void destroy() {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC(GCData data) {
+public long internal_new_GC(GCData data) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
@@ -367,7 +367,7 @@ protected void init () {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC(long /*int*/ hDC, GCData data) {
+public void internal_dispose_GC(long hDC, GCData data) {
if (data != null) isGCCreated = false;
}
@@ -424,6 +424,7 @@ public boolean startJob(String jobName) {
operation.setJobTitle(NSString.stringWith(jobName));
}
if (createContext()) {
+ NSGraphicsContext.setCurrentContext(operation.context());
view.beginDocument();
return true;
}
@@ -584,12 +585,12 @@ public Point getDPI() {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- long /*int*/ pmPrintSession = printInfo.PMPrintSession();
- long /*int*/ printer[] = new long /*int*/ [1];
- long /*int*/ err = OS.PMSessionGetCurrentPrinter(pmPrintSession, printer);
+ long pmPrintSession = printInfo.PMPrintSession();
+ long printer[] = new long [1];
+ long err = OS.PMSessionGetCurrentPrinter(pmPrintSession, printer);
if (err == OS.noErr) {
- long /*int*/ printSettings = printInfo.PMPrintSettings();
+ long printSettings = printInfo.PMPrintSettings();
short[] destType = new short[1];
if (OS.PMSessionGetDestinationType(pmPrintSession, printSettings, destType) == OS.noErr) {
if (destType[0] == OS.kPMDestinationPrinter) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java
index 768619dc73..3f8ce5ff10 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java
@@ -175,7 +175,7 @@ public final class PrinterData extends DeviceData {
*/
public static final int LANDSCAPE = 2;
- /**
+ /**
* <code>duplex</code> field value indicating
* single-sided printing.
* <p>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java
index c42f9ca2df..182fbeee8e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java
@@ -17,6 +17,8 @@ package org.eclipse.swt.printing;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
import org.eclipse.swt.widgets.*;
/**
@@ -299,8 +301,8 @@ public PrinterData open() {
}
handle = GTK.gtk_print_unix_dialog_new(titleBytes, topHandle);
- //TODO: Not currently implemented. May need new API. For now, disable 'Current' in the dialog. (see gtk bug 344519)
- GTK.gtk_print_unix_dialog_set_current_page(handle, -1);
+ GTK.gtk_print_unix_dialog_set_support_selection(handle, true);
+ GTK.gtk_print_unix_dialog_set_has_selection(handle, true);
GTK.gtk_print_unix_dialog_set_manual_capabilities(handle,
GTK.GTK_PRINT_CAPABILITY_COLLATE | GTK.GTK_PRINT_CAPABILITY_COPIES | GTK.GTK_PRINT_CAPABILITY_PAGE_SET);
@@ -340,10 +342,6 @@ public PrinterData open() {
pageRange[1] = printerData.endPage - 1;
GTK.gtk_print_settings_set_page_ranges(settings, pageRange, 1);
break;
- case PrinterData.SELECTION:
- //TODO: Not correctly implemented. May need new API. For now, set to ALL. (see gtk bug 344519)
- GTK.gtk_print_settings_set_print_pages(settings, GTK.GTK_PRINT_PAGES_ALL);
- break;
}
if ((printerData.printToFile || Printer.GTK_FILE_BACKEND.equals(printerData.driver)) && printerData.fileName != null) {
// TODO: GTK_FILE_BACKEND is not GTK API (see gtk bug 345590)
@@ -395,15 +393,11 @@ public PrinterData open() {
oldModal = display.getData (GET_MODAL_DIALOG);
display.setData (SET_MODAL_DIALOG, this);
}
+ String key = "org.eclipse.swt.internal.gtk.externalEventLoop"; //$NON-NLS-1$
+ display.setData (key, Boolean.TRUE);
display.sendPreExternalEventDispatchEvent ();
- int response = GTK.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
+ int response = GTK3.gtk_dialog_run (handle);
+ display.setData (key, Boolean.FALSE);
display.sendPostExternalEventDispatchEvent ();
if (GTK.gtk_window_get_modal (handle)) {
display.setData (SET_MODAL_DIALOG, oldModal);
@@ -440,10 +434,12 @@ public PrinterData open() {
data.endPage = max == 0 ? 1 : max;
break;
case GTK.GTK_PRINT_PAGES_CURRENT:
- //TODO: Disabled in dialog (see above). This code will not run. (see gtk bug 344519)
data.scope = PrinterData.SELECTION;
data.startPage = data.endPage = GTK.gtk_print_unix_dialog_get_current_page(handle);
break;
+ case GTK.GTK_PRINT_PAGES_SELECTION:
+ data.scope = PrinterData.SELECTION;
+ break;
}
data.printToFile = Printer.GTK_FILE_BACKEND.equals(data.driver); // TODO: GTK_FILE_BACKEND is not GTK API (see gtk bug 345590)
@@ -466,7 +462,6 @@ public PrinterData open() {
/* Save other print_settings data as key/value pairs in otherData. */
Callback printSettingsCallback = new Callback(this, "GtkPrintSettingsFunc", 3); //$NON-NLS-1$
long GtkPrintSettingsFunc = printSettingsCallback.getAddress();
- if (GtkPrintSettingsFunc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
index = 0;
settingsData = new byte[1024];
GTK.gtk_print_settings_foreach (settings, GtkPrintSettingsFunc, 0);
@@ -494,7 +489,11 @@ public PrinterData open() {
}
}
display.setData (REMOVE_IDLE_PROC_KEY, null);
- GTK.gtk_widget_destroy (handle);
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(handle);
+ } else {
+ GTK3.gtk_widget_destroy(handle);
+ }
return data;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
index a5c2a1d122..9512ea48ee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are used to print to a printer.
@@ -69,9 +71,14 @@ public final class Printer extends Device {
static boolean disablePrinting = OS.IsWin32 || System.getProperty("org.eclipse.swt.internal.gtk.disablePrinting") != null; //$NON-NLS-1$
static void gtk_init() {
- if (!GTK.gtk_init_check (new long [] {0}, null)) {
- SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]");
+ boolean init;
+ if (GTK.GTK4) {
+ init = GTK4.gtk_init_check();
+ } else {
+ init = GTK3.gtk_init_check(new long[]{0}, null);
}
+
+ if (!init) SWT.error(SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]");
}
/**
@@ -88,16 +95,7 @@ public static PrinterData[] getPrinterList() {
}
gtk_init();
Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_List", 2); //$NON-NLS-1$
- long GtkPrinterFunc_List = printerCallback.getAddress();
- if (GtkPrinterFunc_List == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- GTK.gtk_enumerate_printers(GtkPrinterFunc_List, 0, 0, true);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
+ GTK.gtk_enumerate_printers(printerCallback.getAddress(), 0, 0, true);
printerCallback.dispose ();
return printerList;
}
@@ -112,9 +110,9 @@ static long GtkPrinterFunc_List (long printer, long user_data) {
* Bug in GTK. While performing a gtk_enumerate_printers(), GTK finds all of the
* available printers from each backend and can hang. If a backend requires more
* time to gather printer info, GTK will start an event loop waiting for a done
- * signal before continuing. For the Lpr backend, GTK does not send a done signal
- * which means the event loop never ends. The fix is to check to see if the driver
- * is of type Lpr, and stop the enumeration, which exits the event loop.
+ * signal before continuing. For the Lpr backend, GTK does not send a done signal
+ * which means the event loop never ends. The fix is to check to see if the driver
+ * is of type Lpr, and stop the enumeration, which exits the event loop.
*/
if (printerList[length].driver.equals (GTK_LPR_BACKEND)) return 1;
return 0;
@@ -136,16 +134,7 @@ public static PrinterData getDefaultPrinterData() {
}
gtk_init();
Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_Default", 2); //$NON-NLS-1$
- long GtkPrinterFunc_Default = printerCallback.getAddress();
- if (GtkPrinterFunc_Default == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- GTK.gtk_enumerate_printers(GtkPrinterFunc_Default, 0, 0, true);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
+ GTK.gtk_enumerate_printers(printerCallback.getAddress(), 0, 0, true);
printerCallback.dispose ();
return findData;
}
@@ -161,18 +150,9 @@ static long GtkPrinterFunc_Default (long printer, long user_data) {
static long gtkPrinterFromPrinterData(PrinterData data) {
gtk_init();
Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_FindNamedPrinter", 2); //$NON-NLS-1$
- long GtkPrinterFunc_FindNamedPrinter = printerCallback.getAddress();
- if (GtkPrinterFunc_FindNamedPrinter == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
findPrinter = 0;
findData = data;
- GTK.gtk_enumerate_printers(GtkPrinterFunc_FindNamedPrinter, 0, 0, true);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
+ GTK.gtk_enumerate_printers(printerCallback.getAddress(), 0, 0, true);
printerCallback.dispose ();
return findPrinter;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java
index aaf0ad6fbb..dd0c96241d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java
@@ -290,8 +290,8 @@ public PrinterData open() {
/* Get the owner HWND for the dialog */
Control parent = getParent();
int style = getStyle();
- long /*int*/ hwndOwner = parent.handle;
- long /*int*/ hwndParent = parent.handle;
+ long hwndOwner = parent.handle;
+ long hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the BIDI orientation
@@ -327,13 +327,10 @@ public PrinterData open() {
boolean success = false;
if (printerData.name != null) {
/* Ensure that the printer name is in the current list of printers. */
- PrinterData printerList[] = Printer.getPrinterList();
- if (printerList.length > 0) {
- for (int p = 0; p < printerList.length; p++) {
- if (printerList[p].name.equals(printerData.name)) {
- success = true;
- break;
- }
+ for (PrinterData element : Printer.getPrinterList()) {
+ if (element.name.equals(printerData.name)) {
+ success = true;
+ break;
}
}
if (success) {
@@ -343,8 +340,8 @@ public PrinterData open() {
short[] offsets = new short[4]; // DEVNAMES (4 offsets)
int offsetsSize = offsets.length * 2; // 2 bytes each
offsets[1] = (short) offsets.length; // offset 1 points to wDeviceOffset
- long /*int*/ hMem = OS.GlobalAlloc(OS.GMEM_MOVEABLE | OS.GMEM_ZEROINIT, offsetsSize + size);
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long hMem = OS.GlobalAlloc(OS.GMEM_MOVEABLE | OS.GMEM_ZEROINIT, offsetsSize + size);
+ long ptr = OS.GlobalLock(hMem);
OS.MoveMemory(ptr, offsets, offsetsSize);
OS.MoveMemory(ptr + offsetsSize, buffer, size);
OS.GlobalUnlock(hMem);
@@ -352,11 +349,14 @@ public PrinterData open() {
}
}
Display display = parent.getDisplay();
+ String externalLoopKey = "org.eclipse.swt.internal.win32.externalEventLoop";
if (!success) {
/* Initialize PRINTDLG fields, including DEVMODE, for the default printer. */
pd.Flags = OS.PD_RETURNDEFAULT;
+ display.setData(externalLoopKey, Boolean.TRUE);
display.sendPreExternalEventDispatchEvent ();
success = OS.PrintDlg(pd);
+ display.setData(externalLoopKey, Boolean.FALSE);
display.sendPostExternalEventDispatchEvent ();
if (success) {
if (pd.hDevNames != 0) {
@@ -373,8 +373,8 @@ public PrinterData open() {
*/
byte devmodeData [] = printerData.otherData;
if (devmodeData != null && devmodeData.length != 0) {
- long /*int*/ hMem = OS.GlobalAlloc(OS.GMEM_MOVEABLE | OS.GMEM_ZEROINIT, devmodeData.length);
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long hMem = OS.GlobalAlloc(OS.GMEM_MOVEABLE | OS.GMEM_ZEROINIT, devmodeData.length);
+ long ptr = OS.GlobalLock(hMem);
OS.MoveMemory(ptr, devmodeData, devmodeData.length);
OS.GlobalUnlock(hMem);
if (pd.hDevMode != 0) OS.GlobalFree(pd.hDevMode);
@@ -382,12 +382,12 @@ public PrinterData open() {
}
/* Initialize the DEVMODE struct's fields from the printerData. */
- long /*int*/ hMem = pd.hDevMode;
+ long hMem = pd.hDevMode;
if (hMem == 0) {
hMem = OS.GlobalAlloc(OS.GMEM_MOVEABLE | OS.GMEM_ZEROINIT, DEVMODE.sizeof);
pd.hDevMode = hMem;
}
- long /*int*/ ptr = OS.GlobalLock(hMem);
+ long ptr = OS.GlobalLock(hMem);
DEVMODE devmode = new DEVMODE ();
OS.MoveMemory(devmode, ptr, DEVMODE.sizeof);
if (printerData.name != null) {
@@ -443,14 +443,16 @@ public PrinterData open() {
String key = "org.eclipse.swt.internal.win32.runMessagesInIdle"; //$NON-NLS-1$
Object oldValue = display.getData(key);
display.setData(key, Boolean.TRUE);
+ display.setData(externalLoopKey, Boolean.TRUE);
display.sendPreExternalEventDispatchEvent ();
success = OS.PrintDlg(pd);
+ display.setData(externalLoopKey, Boolean.FALSE);
display.sendPostExternalEventDispatchEvent ();
display.setData(key, oldValue);
if ((getStyle() & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
- for (int i=0; i<shells.length; i++) {
- if (shells[i] != null && !shells[i].isDisposed ()) {
- shells[i].setEnabled(true);
+ for (Shell shell : shells) {
+ if (shell != null && !shell.isDisposed ()) {
+ shell.setEnabled(true);
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java
index d157b99fb5..89743c283e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java
@@ -53,7 +53,7 @@ public final class Printer extends Device {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
/**
* the printer data describing this printer
@@ -86,7 +86,6 @@ public final class Printer extends Device {
*/
public static PrinterData[] getPrinterList() {
int length = 1024;
- /* Use the character encoding for the default locale */
TCHAR buf = new TCHAR(0, length);
TCHAR nullBuf = new TCHAR(0, 1);
int n = OS.GetProfileString(profile, null, nullBuf, buf, length);
@@ -134,7 +133,6 @@ public static PrinterData[] getPrinterList() {
public static PrinterData getDefaultPrinterData() {
String deviceName = null;
int length = 1024;
- /* Use the character encoding for the default locale */
TCHAR buf = new TCHAR(0, length);
TCHAR nullBuf = new TCHAR(0, 1);
int n = OS.GetProfileString(appName, keyName, nullBuf, buf, length);
@@ -215,18 +213,17 @@ public Printer(PrinterData data) {
@Override
protected void create(DeviceData deviceData) {
data = (PrinterData)deviceData;
- /* Use the character encoding for the default locale */
TCHAR driver = new TCHAR(0, data.driver, true);
TCHAR device = new TCHAR(0, data.name, true);
- long /*int*/ lpInitData = 0;
+ long lpInitData = 0;
byte devmodeData [] = data.otherData;
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
if (devmodeData != null && devmodeData.length != 0) {
/* If user setup info from a print dialog was specified, restore the DEVMODE struct. */
lpInitData = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, devmodeData.length);
OS.MoveMemory(lpInitData, devmodeData, devmodeData.length);
} else {
- long /*int*/ [] hPrinter = new long /*int*/ [1];
+ long [] hPrinter = new long [1];
OS.OpenPrinter(device, hPrinter, 0);
if (hPrinter[0] != 0) {
int dwNeeded = OS.DocumentProperties(0, hPrinter[0], device, 0, 0, 0);
@@ -287,7 +284,7 @@ protected void create(DeviceData deviceData) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC(GCData data) {
+public long internal_new_GC(GCData data) {
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (data != null) {
if (isGCCreated) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -320,7 +317,7 @@ public long /*int*/ internal_new_GC(GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC(long /*int*/ hDC, GCData data) {
+public void internal_dispose_GC(long hDC, GCData data) {
if (data != null) isGCCreated = false;
}
@@ -357,23 +354,21 @@ public boolean startJob(String jobName) {
checkDevice();
DOCINFO di = new DOCINFO();
di.cbSize = DOCINFO.sizeof;
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ lpszDocName = 0;
+ long hHeap = OS.GetProcessHeap();
+ long lpszDocName = 0;
if (jobName != null && jobName.length() != 0) {
- /* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR(0, jobName, true);
int byteCount = buffer.length() * TCHAR.sizeof;
lpszDocName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory(lpszDocName, buffer, byteCount);
di.lpszDocName = lpszDocName;
}
- long /*int*/ lpszOutput = 0;
+ long lpszOutput = 0;
if (data.printToFile) {
if (data.fileName == null) {
/* Prompt the user for a file name. */
data.fileName = "FILE:"; //$NON-NLS-1$
}
- /* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR(0, data.fileName, true);
int byteCount = buffer.length() * TCHAR.sizeof;
lpszOutput = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java
index 609a5ae0b7..4fc59fecb8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java
@@ -75,7 +75,7 @@ public static Program findProgram (String extension) {
if (ext != null) {
byte[] fsRef = new byte[80];
if (OS.LSGetApplicationForInfo(OS.kLSUnknownType, OS.kLSUnknownCreator, ext.id, OS.kLSRolesAll, fsRef, null) == OS.noErr) {
- long /*int*/ url = OS.CFURLCreateFromFSRef(OS.kCFAllocatorDefault(), fsRef);
+ long url = OS.CFURLCreateFromFSRef(OS.kCFAllocatorDefault(), fsRef);
if (url != 0) {
NSString bundlePath = new NSURL(url).path();
NSBundle bundle = NSBundle.bundleWithPath(bundlePath);
@@ -105,7 +105,7 @@ public static String [] getExtensions () {
NSString CFBundleDocumentTypes = NSString.stringWith("CFBundleDocumentTypes");
NSString CFBundleTypeExtensions = NSString.stringWith("CFBundleTypeExtensions");
NSArray array = new NSArray(OS.NSSearchPathForDirectoriesInDomains(OS.NSAllApplicationsDirectory, OS.NSAllDomainsMask, true));
- int count = (int)/*64*/array.count();
+ int count = (int)array.count();
for (int i = 0; i < count; i++) {
NSString path = new NSString(array.objectAtIndex(i));
NSFileManager fileManager = NSFileManager.defaultManager();
@@ -135,7 +135,7 @@ public static String [] getExtensions () {
}
}
int i = 0;
- String[] exts = new String[(int)/*64*/supportedDocumentTypes.count()];
+ String[] exts = new String[(int)supportedDocumentTypes.count()];
NSEnumerator enumerator = supportedDocumentTypes.objectEnumerator();
id id;
while ((id = enumerator.nextObject()) != null) {
@@ -159,19 +159,19 @@ static Program getProgram(NSBundle bundle) {
NSString fullPath = bundle.bundlePath();
NSString identifier = bundle.bundleIdentifier();
id bundleName = bundle.objectForInfoDictionaryKey(CFBundleDisplayName);
- if (bundleName == null) {
- bundleName = bundle.objectForInfoDictionaryKey(CFBundleName);
- }
- if (bundleName == null) {
- if (fullPath == null) return null;
- bundleName = fullPath.lastPathComponent().stringByDeletingPathExtension();
- }
- NSString name = new NSString(bundleName.id);
- Program program = new Program();
- program.name = name.getString();
- if (fullPath != null) program.fullPath = fullPath.getString();
- program.identifier = identifier != null ? identifier.getString() : "";
- return program;
+ if (bundleName == null) {
+ bundleName = bundle.objectForInfoDictionaryKey(CFBundleName);
+ }
+ if (bundleName == null) {
+ if (fullPath == null) return null;
+ bundleName = fullPath.lastPathComponent().stringByDeletingPathExtension();
+ }
+ NSString name = new NSString(bundleName.id);
+ Program program = new Program();
+ program.name = name.getString();
+ if (fullPath != null) program.fullPath = fullPath.getString();
+ program.identifier = identifier != null ? identifier.getString() : "";
+ return program;
}
/**
@@ -187,7 +187,7 @@ public static Program [] getPrograms () {
LinkedHashSet<Program> programs = new LinkedHashSet<>();
NSWorkspace workspace = NSWorkspace.sharedWorkspace();
NSArray array = new NSArray(OS.NSSearchPathForDirectoriesInDomains(OS.NSAllApplicationsDirectory, OS.NSAllDomainsMask, true));
- int count = (int)/*64*/array.count();
+ int count = (int)array.count();
for (int i = 0; i < count; i++) {
NSString path = new NSString(array.objectAtIndex(i));
NSFileManager fileManager = NSFileManager.defaultManager();
@@ -225,7 +225,7 @@ static NSURL getURL (String fileName) {
if (NSFileManager.defaultManager().fileExistsAtPath(fullPath)) {
fullPath = NSURL.fileURLWithPath(fullPath).absoluteString();
}
- long /*int*/ ptr = OS.CFURLCreateStringByAddingPercentEscapes(0, fullPath.id, unescapedStr.id, 0, OS.kCFStringEncodingUTF8);
+ long ptr = OS.CFURLCreateStringByAddingPercentEscapes(0, fullPath.id, unescapedStr.id, 0, OS.kCFStringEncodingUTF8);
NSString escapedString = new NSString(ptr);
NSURL url = NSURL.URLWithString(escapedString);
OS.CFRelease(ptr);
@@ -233,7 +233,7 @@ static NSURL getURL (String fileName) {
}
static boolean isExecutable (String fileName) {
- long /*int*/ ptr = C.malloc(1);
+ long ptr = C.malloc(1);
NSString path = NSString.stringWith(fileName);
boolean result = false;
NSFileManager manager = NSFileManager.defaultManager();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index 05e9ba0c87..d78ea39379 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -23,7 +23,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent programs and
@@ -37,7 +38,6 @@ public final class Program {
String name = ""; //$NON-NLS-1$
String command;
String iconPath;
- Display display;
/* GIO specific
* true if command expects a URI
@@ -112,31 +112,12 @@ static String[] parseCommand(String cmd) {
* </ul>
*/
public static Program findProgram(String extension) {
- return findProgram(Display.getCurrent(), extension);
-}
-
-/*
- * API: When support for multiple displays is added, this method will
- * become public and the original method above can be deprecated.
- */
-static Program findProgram(Display display, String extension) {
if (extension == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (extension.length() == 0) return null;
if (extension.charAt(0) != '.') extension = "." + extension;
String mimeType = gio_getMimeType(extension);
if (mimeType == null) return null;
- return gio_getProgram(display, mimeType);
-}
-
-/**
- * Answers all available programs in the operating system. Note
- * that a <code>Display</code> must already exist to guarantee
- * that this method returns an appropriate result.
- *
- * @return an array of programs
- */
-public static Program[] getPrograms() {
- return getPrograms(Display.getCurrent());
+ return gio_getProgram(mimeType);
}
/**
@@ -149,46 +130,72 @@ public static Program[] getPrograms() {
public ImageData getImageData() {
if (iconPath == null) return null;
ImageData data = null;
- long icon_theme =GTK.gtk_icon_theme_get_default();
- byte[] icon = Converter.wcsToMbcs (iconPath, true);
- long gicon = OS.g_icon_new_for_string(icon, null);
+
+ long gicon = OS.g_icon_new_for_string(Converter.javaStringToCString(iconPath), null);
if (gicon != 0) {
- long gicon_info = GTK.gtk_icon_theme_lookup_by_gicon (icon_theme, gicon, 16/*size*/, 0);
- if (gicon_info != 0) {
- long pixbuf = GTK.gtk_icon_info_load_icon(gicon_info, null);
- if (pixbuf != 0) {
- int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf);
- long pixels = GDK.gdk_pixbuf_get_pixels(pixbuf);
- int height = GDK.gdk_pixbuf_get_height(pixbuf);
- int width = GDK.gdk_pixbuf_get_width(pixbuf);
- boolean hasAlpha = GDK.gdk_pixbuf_get_has_alpha(pixbuf);
- byte[] srcData = new byte[stride * height];
- C.memmove(srcData, pixels, srcData.length);
- OS.g_object_unref(pixbuf);
- if (hasAlpha) {
- PaletteData palette = new PaletteData(0xFF000000, 0xFF0000, 0xFF00);
- data = new ImageData(width, height, 32, palette, 4, srcData);
- data.bytesPerLine = stride;
- int s = 3, a = 0;
- byte[] alphaData = new byte[width*height];
- for (int y=0; y<height; y++) {
- for (int x=0; x<width; x++) {
- alphaData[a++] = srcData[s];
- srcData[s] = 0;
- s+=4;
- }
+ long pixbuf = 0;
+ if (GTK.GTK4) {
+ /*
+ * Specified size will not be respected as in order to get the pixbuf,
+ * we get the original image file which could be any size. Also, note
+ * that gtk_icon_theme_lookup_by_gicon never returns NULL, it will
+ * return a error icon if gicon can't be found.
+ */
+ long icon_theme = GTK4.gtk_icon_theme_get_for_display(GDK.gdk_display_get_default()); // default display needs to exist
+ long paintable = GTK4.gtk_icon_theme_lookup_by_gicon(icon_theme, gicon, 16, 1, GTK.GTK_TEXT_DIR_NONE, GTK.GTK_ICON_LOOKUP_FORCE_REGULAR);
+ long file = GTK4.gtk_icon_paintable_get_file(paintable);
+ long texture = GDK.gdk_texture_new_from_file(file, 0);
+ pixbuf = GDK.gdk_pixbuf_get_from_texture(texture);
+
+ OS.g_object_unref(texture);
+ OS.g_object_unref(file);
+ OS.g_object_unref(paintable);
+ } else {
+ long icon_theme = GTK3.gtk_icon_theme_get_default();
+ long gicon_info = GTK3.gtk_icon_theme_lookup_by_gicon(icon_theme, gicon, 16/*size*/, 0);
+ if (gicon_info != 0) {
+ pixbuf = GTK3.gtk_icon_info_load_icon(gicon_info, null);
+ OS.g_object_unref(gicon_info);
+ }
+ }
+
+ // Unref gicon as we have retrieved the required pixbuf
+ OS.g_object_unref(gicon);
+
+ if (pixbuf != 0) {
+ int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf);
+ long pixels = GDK.gdk_pixbuf_get_pixels(pixbuf);
+ int height = GDK.gdk_pixbuf_get_height(pixbuf);
+ int width = GDK.gdk_pixbuf_get_width(pixbuf);
+ boolean hasAlpha = GDK.gdk_pixbuf_get_has_alpha(pixbuf);
+
+ // Move pixbuf memory to srcData and unref pixbuf
+ byte[] srcData = new byte[stride * height];
+ C.memmove(srcData, pixels, srcData.length);
+ OS.g_object_unref(pixbuf);
+
+ if (hasAlpha) {
+ PaletteData palette = new PaletteData(0xFF000000, 0xFF0000, 0xFF00);
+ data = new ImageData(width, height, 32, palette, 4, srcData);
+ data.bytesPerLine = stride;
+ int s = 3, a = 0;
+ byte[] alphaData = new byte[width * height];
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ alphaData[a++] = srcData[s];
+ srcData[s] = 0;
+ s+=4;
}
- data.alphaData = alphaData;
- } else {
- PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
- data = new ImageData(width, height, 24, palette, 4, srcData);
- data.bytesPerLine = stride;
}
+ data.alphaData = alphaData;
+ } else {
+ PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
+ data = new ImageData(width, height, 24, palette, 4, srcData);
+ data.bytesPerLine = stride;
}
- OS.g_object_unref(gicon_info);
}
- OS.g_object_unref(gicon);
}
+
return data;
}
@@ -218,7 +225,7 @@ public ImageData getImageData() {
List<String> mimeTypes = new ArrayList<>();
String mimeType = line.substring(0, separatorIndex);
String extensionFormat = line.substring(separatorIndex + 1);
- int extensionIndex = extensionFormat.indexOf(".");
+ int extensionIndex = extensionFormat.indexOf('.');
if (extensionIndex > 0) {
String extension = extensionFormat.substring(extensionIndex);
if (mimeTable.containsKey(extension)) {
@@ -252,19 +259,18 @@ static String gio_getMimeType(String extension) {
return mimeType;
}
-static Program gio_getProgram(Display display, String mimeType) {
+static Program gio_getProgram(String mimeType) {
Program program = null;
byte[] mimeTypeBuffer = Converter.wcsToMbcs (mimeType, true);
long application = OS.g_app_info_get_default_for_type (mimeTypeBuffer, false);
if (application != 0) {
- program = gio_getProgram(display, application);
+ program = gio_getProgram(application);
}
return program;
}
-static Program gio_getProgram (Display display, long application) {
+static Program gio_getProgram (long application) {
Program program = new Program();
- program.display = display;
int length;
byte[] buffer;
long applicationName = OS.g_app_info_get_name (application);
@@ -298,16 +304,18 @@ static Program gio_getProgram (Display display, long application) {
}
OS.g_free(icon_name);
}
- OS.g_object_unref(icon);
}
return program.command != null ? program : null;
}
-/*
- * API: When support for multiple displays is added, this method will
- * become public and the original method above can be deprecated.
+/**
+ * Answers all available programs in the operating system. Note
+ * that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @return an array of programs
*/
-static Program[] getPrograms(Display display) {
+public static Program[] getPrograms() {
long applicationList = OS.g_app_info_get_all ();
long list = applicationList;
Program program;
@@ -317,9 +325,10 @@ static Program[] getPrograms(Display display) {
if (application != 0) {
//TODO: Should the list be filtered or not?
// if (OS.g_app_info_should_show(application)) {
- program = gio_getProgram(display, application);
+ program = gio_getProgram(application);
if (program != null) programs.add(program);
// }
+ OS.g_object_unref(application);
}
list = OS.g_list_next(list);
}
@@ -432,7 +441,7 @@ public static String[] getExtensions() {
* </ul>
*/
public static boolean launch(String fileName) {
- return launch(Display.getCurrent(), fileName, null);
+ return launch(fileName, null);
}
/**
@@ -455,14 +464,6 @@ public static boolean launch(String fileName) {
* @since 3.6
*/
public static boolean launch (String fileName, String workingDir) {
- return launch(Display.getCurrent(), fileName, workingDir);
-}
-
-/*
- * API: When support for multiple displays is added, this method will
- * become public and the original method above can be deprecated.
- */
-static boolean launch (Display display, String fileName, String workingDir) {
if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (workingDir != null && isExecutable(fileName)) {
try {
@@ -476,14 +477,14 @@ static boolean launch (Display display, String fileName, String workingDir) {
int index = fileName.lastIndexOf ('.');
if (index != -1) {
String extension = fileName.substring (index);
- Program program = Program.findProgram (display, extension);
+ Program program = Program.findProgram (extension);
if (program != null && program.execute (fileName)) return true;
}
String lowercaseName = fileName.toLowerCase ();
if (lowercaseName.startsWith (PREFIX_HTTP) || lowercaseName.startsWith (PREFIX_HTTPS)) {
- Program program = Program.findProgram (display, ".html"); //$NON-NLS-1$
+ Program program = Program.findProgram (".html"); //$NON-NLS-1$
if (program == null) {
- program = Program.findProgram (display, ".htm"); //$NON-NLS-1$
+ program = Program.findProgram (".htm"); //$NON-NLS-1$
}
if (program != null && program.execute (fileName)) return true;
}
@@ -511,7 +512,7 @@ public boolean equals(Object other) {
if (this == other) return true;
if (!(other instanceof Program)) return false;
Program program = (Program)other;
- return display == program.display && name.equals(program.name) && command.equals(program.command)
+ return name.equals(program.name) && command.equals(program.command)
&& gioExpectUri == program.gioExpectUri;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java
index f0ccac8d63..1345448d11 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java
@@ -14,6 +14,8 @@
package org.eclipse.swt.program;
import java.util.*;
+import java.util.concurrent.*;
+import java.util.stream.*;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
@@ -84,7 +86,6 @@ public static Program findProgram (String extension) {
if (extension == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (extension.length () == 0) return null;
if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$
- /* Use the character encoding for the default locale */
TCHAR key = new TCHAR (0, extension, true);
Program program = null;
String command = assocQueryString (OS.ASSOCSTR_COMMAND, key, true);
@@ -115,9 +116,8 @@ public static String [] getExtensions () {
String [] extensions = new String [1024];
char [] lpName = new char [1024];
int [] lpcName = {lpName.length};
- FILETIME ft = new FILETIME ();
int dwIndex = 0, count = 0;
- while (OS.RegEnumKeyEx (OS.HKEY_CLASSES_ROOT, dwIndex, lpName, lpcName, null, null, null, ft) != OS.ERROR_NO_MORE_ITEMS) {
+ while (OS.RegEnumKeyEx (OS.HKEY_CLASSES_ROOT, dwIndex, lpName, lpcName, null, null, null, 0) != OS.ERROR_NO_MORE_ITEMS) {
String extension = new String (lpName, 0, lpcName [0]);
lpcName [0] = lpName.length;
if (extension.length () > 0 && extension.charAt (0) == '.') {
@@ -139,9 +139,8 @@ public static String [] getExtensions () {
}
static String getKeyValue (String string, boolean expand) {
- /* Use the character encoding for the default locale */
TCHAR key = new TCHAR (0, string, true);
- long /*int*/ [] phkResult = new long /*int*/ [1];
+ long [] phkResult = new long [1];
if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult) != 0) {
return null;
}
@@ -221,21 +220,28 @@ static Program getProgram (String key, String extension) {
* @return an array of programs
*/
public static Program [] getPrograms () {
- LinkedHashSet<Program> programs = new LinkedHashSet<>(1024);
char [] lpName = new char [1024];
int [] lpcName = new int [] {lpName.length};
- FILETIME ft = new FILETIME ();
int dwIndex = 0;
- while (OS.RegEnumKeyEx (OS.HKEY_CLASSES_ROOT, dwIndex, lpName, lpcName, null, null, null, ft) != OS.ERROR_NO_MORE_ITEMS) {
+ LinkedHashSet<String> paths = new LinkedHashSet<>();
+ // enumerating all class names takes ~ 1/5 of the time:
+ while (OS.RegEnumKeyEx (OS.HKEY_CLASSES_ROOT, dwIndex, lpName, lpcName, null, null, null, 0) != OS.ERROR_NO_MORE_ITEMS) {
String path = new String (lpName, 0, lpcName [0]);
lpcName [0] = lpName.length;
- Program program = getProgram (path, null);
- if (program != null) {
- programs.add(program);
- }
+ paths.add(path);
dwIndex++;
}
- return programs.toArray(new Program[programs.size()]);
+ //map paths to programs in parallel which takes now ~ 4/5 of time:
+ ConcurrentHashMap<String, Program> programs = new ConcurrentHashMap<>(paths.size());
+ paths.stream().parallel().forEach(path -> {
+ Program program = getProgram(path, null); // getProgram takes most time
+ if (program != null) {
+ programs.put(path, program);
+ }
+ });
+ // restore sort order and make distinct in terms of Program::equals:
+ LinkedHashSet<Program> sortedPrograms = paths.stream().map(name->programs.get(name)).filter(p->p!=null).collect(Collectors.toCollection(LinkedHashSet::new));
+ return sortedPrograms.toArray(new Program[sortedPrograms.size()]);
}
/**
@@ -252,7 +258,7 @@ public static Program [] getPrograms () {
* </ul>
*/
public static boolean launch (String fileName) {
- return launch(fileName, null);
+ return launch(fileName, null);
}
/**
@@ -277,19 +283,18 @@ public static boolean launch (String fileName) {
public static boolean launch (String fileName, String workingDir) {
if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- /* Use the character encoding for the default locale */
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (0, fileName, true);
int byteCount = buffer.length () * TCHAR.sizeof;
- long /*int*/ lpFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long lpFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpFile, buffer, byteCount);
- long /*int*/ lpDirectory = 0;
+ long lpDirectory = 0;
if (workingDir != null && OS.PathIsExe(lpFile)) {
- TCHAR buffer1 = new TCHAR (0, workingDir, true);
- byteCount = buffer1.length () * TCHAR.sizeof;
- lpDirectory = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- OS.MoveMemory (lpDirectory, buffer1, byteCount);
+ TCHAR buffer1 = new TCHAR (0, workingDir, true);
+ byteCount = buffer1.length () * TCHAR.sizeof;
+ lpDirectory = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ OS.MoveMemory (lpDirectory, buffer1, byteCount);
}
SHELLEXECUTEINFO info = new SHELLEXECUTEINFO ();
@@ -333,11 +338,10 @@ public boolean execute (String fileName) {
}
if (append) fileName = " \"" + fileName + "\"";
String commandLine = prefix + fileName + suffix;
- long /*int*/ hHeap = OS.GetProcessHeap ();
- /* Use the character encoding for the default locale */
+ long hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (0, commandLine, true);
int byteCount = buffer.length () * TCHAR.sizeof;
- long /*int*/ lpCommandLine = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long lpCommandLine = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (lpCommandLine, buffer, byteCount);
STARTUPINFO lpStartupInfo = new STARTUPINFO ();
lpStartupInfo.cb = STARTUPINFO.sizeof;
@@ -386,9 +390,8 @@ public ImageData getImageData () {
fileName = fileName.substring (1, length - 1);
}
}
- /* Use the character encoding for the default locale */
TCHAR lpszFile = new TCHAR (0, fileName, true);
- long /*int*/ [] phiconSmall = new long /*int*/[1], phiconLarge = null;
+ long [] phiconSmall = new long[1], phiconLarge = null;
OS.ExtractIconEx (lpszFile, nIconIndex, phiconLarge, phiconSmall, 1);
if (phiconSmall [0] == 0) return null;
Image image = Image.win32_new (null, SWT.ICON, phiconSmall [0]);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
index 7f2eccdac7..3ad4a5091d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
@@ -31,7 +31,7 @@ class WebKit extends WebBrowser {
boolean loadingText, untrustedText;
String lastHoveredLinkURL, lastNavigateURL;
String html;
- long /*int*/ identifier;
+ long identifier;
int resourceCount;
String url = ""; //$NON-NLS-1$
Point location;
@@ -41,7 +41,7 @@ class WebKit extends WebBrowser {
//TEMPORARY CODE
// boolean doit;
- static long /*int*/ delegateClass;
+ static long delegateClass;
static boolean Initialized;
// the following Callbacks are never freed
static Callback Callback3, Callback4, Callback5, Callback6, Callback7;
@@ -74,7 +74,7 @@ class WebKit extends WebBrowser {
NativeClearSessions = () -> {
NSHTTPCookieStorage storage = NSHTTPCookieStorage.sharedHTTPCookieStorage();
NSArray cookies = storage.cookies();
- int count = (int)/*64*/cookies.count ();
+ int count = (int)cookies.count ();
for (int i = 0; i < count; i++) {
NSHTTPCookie cookie = new NSHTTPCookie(cookies.objectAtIndex(i));
if (cookie.isSessionOnly()) {
@@ -87,7 +87,7 @@ class WebKit extends WebBrowser {
NSHTTPCookieStorage storage = NSHTTPCookieStorage.sharedHTTPCookieStorage ();
NSURL url = NSURL.URLWithString (NSString.stringWith (CookieUrl));
NSArray cookies = storage.cookiesForURL (url);
- int count = (int)/*64*/cookies.count ();
+ int count = (int)cookies.count ();
if (count == 0) return;
NSString name = NSString.stringWith (CookieName);
@@ -123,22 +123,16 @@ public void create (Composite parent, int style) {
if (delegateClass == 0) {
Class webKitClass = this.getClass();
Callback3 = new Callback(webKitClass, "browserProc", 3); //$NON-NLS-1$
- long /*int*/ proc3 = Callback3.getAddress();
- if (proc3 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc3 = Callback3.getAddress();
Callback4 = new Callback(webKitClass, "browserProc", 4); //$NON-NLS-1$
- long /*int*/ proc4 = Callback4.getAddress();
- if (proc4 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc4 = Callback4.getAddress();
Callback5 = new Callback(webKitClass, "browserProc", 5); //$NON-NLS-1$
- long /*int*/ proc5 = Callback5.getAddress();
- if (proc5 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc5 = Callback5.getAddress();
Callback6 = new Callback(webKitClass, "browserProc", 6); //$NON-NLS-1$
- long /*int*/ proc6 = Callback6.getAddress();
- if (proc6 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc6 = Callback6.getAddress();
Callback7 = new Callback(webKitClass, "browserProc", 7); //$NON-NLS-1$
- long /*int*/ proc7 = Callback7.getAddress();
- if (proc7 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- long /*int*/ setFrameProc = OS.CALLBACK_webView_setFrame_(proc4);
- if (setFrameProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc7 = Callback7.getAddress();
+ long setFrameProc = OS.CALLBACK_webView_setFrame_(proc4);
String className = "SWTWebViewDelegate"; //$NON-NLS-1$
byte[] types = {'*','\0'};
@@ -189,7 +183,7 @@ public void create (Composite parent, int style) {
OS.class_addMethod(delegateClass, OS.sel_createPanelDidEnd, proc5, "@:@@@"); //$NON-NLS-1$
OS.objc_registerClassPair(delegateClass);
- long /*int*/ metaClass = OS.objc_getMetaClass (className);
+ long metaClass = OS.objc_getMetaClass (className);
OS.class_addMethod(metaClass, OS.sel_isSelectorExcludedFromWebScript_, proc3, "@:@"); //$NON-NLS-1$
OS.class_addMethod(metaClass, OS.sel_webScriptNameForSelector_, proc3, "@:@"); //$NON-NLS-1$
}
@@ -288,7 +282,7 @@ public boolean back() {
return webView.goBack();
}
-static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+static long browserProc(long id, long sel, long arg0) {
if (id == delegateClass) {
if (sel == OS.sel_isSelectorExcludedFromWebScript_) {
return isSelectorExcludedFromWebScript (arg0) ? 1 : 0;
@@ -316,7 +310,7 @@ static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/
return 0;
}
-static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+static long browserProc(long id, long sel, long arg0, long arg1) {
Display d = Display.getCurrent();
if (d == null || d.isDisposed()) return 0;
Widget widget = d.findWidget(id);
@@ -360,7 +354,7 @@ static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/
return 0;
}
-static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+static long browserProc(long id, long sel, long arg0, long arg1, long arg2) {
Display d = Display.getCurrent();
if (d == null || d.isDisposed()) return 0;
Widget widget = d.findWidget(id);
@@ -392,7 +386,7 @@ static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/
return 0;
}
-static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
+static long browserProc(long id, long sel, long arg0, long arg1, long arg2, long arg3) {
Display d = Display.getCurrent();
if (d == null || d.isDisposed()) return 0;
Widget widget = d.findWidget(id);
@@ -411,7 +405,7 @@ static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/
return 0;
}
-static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4) {
+static long browserProc(long id, long sel, long arg0, long arg1, long arg2, long arg3, long arg4) {
Display d = Display.getCurrent();
if (d == null || d.isDisposed()) return 0;
Widget widget = d.findWidget(id);
@@ -429,11 +423,11 @@ static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/
return 0;
}
-static boolean isSelectorExcludedFromWebScript (long /*int*/ aSelector) {
+static boolean isSelectorExcludedFromWebScript (long aSelector) {
return !(aSelector == OS.sel_callJava || aSelector == OS.sel_callRunBeforeUnloadConfirmPanelWithMessage);
}
-static long /*int*/ webScriptNameForSelector (long /*int*/ aSelector) {
+static long webScriptNameForSelector (long aSelector) {
if (aSelector == OS.sel_callJava) {
return NSString.stringWith ("callJava").id; //$NON-NLS-1$
}
@@ -459,7 +453,7 @@ boolean close (boolean showPrompters) {
if (!jsEnabled) return true;
String functionName = EXECUTE_ID + "CLOSE"; // $NON-NLS-1$
- StringBuffer buffer = new StringBuffer ("function "); // $NON-NLS-1$
+ StringBuilder buffer = new StringBuilder ("function "); // $NON-NLS-1$
buffer.append (functionName);
buffer.append ("(win) {\n"); // $NON-NLS-1$
buffer.append ("var fn = win.onbeforeunload; if (fn != null) {try {var str = fn(); "); // $NON-NLS-1$
@@ -483,15 +477,15 @@ boolean close (boolean showPrompters) {
@Override
public boolean execute (String script) {
WebFrame frame = webView.mainFrame();
- long /*int*/ context = frame.globalContext();
+ long context = frame.globalContext();
byte[] bytes = (script + '\0').getBytes(StandardCharsets.UTF_8); //$NON-NLS-1$
- long /*int*/ scriptString = OS.JSStringCreateWithUTF8CString(bytes);
+ long scriptString = OS.JSStringCreateWithUTF8CString(bytes);
bytes = (getUrl() + '\0').getBytes(StandardCharsets.UTF_8); //$NON-NLS-1$
- long /*int*/ urlString = OS.JSStringCreateWithUTF8CString(bytes);
+ long urlString = OS.JSStringCreateWithUTF8CString(bytes);
- long /*int*/ result = OS.JSEvaluateScript(context, scriptString, 0, urlString, 0, null);
+ long result = OS.JSEvaluateScript(context, scriptString, 0, urlString, 0, null);
OS.JSStringRelease(urlString);
OS.JSStringRelease(scriptString);
return result != 0;
@@ -575,7 +569,7 @@ public boolean setUrl(String url, String postData, String[] headers) {
NSString str = NSString.stringWith(url);
NSString unescapedStr = NSString.stringWith("%#"); //$NON-NLS-1$
- long /*int*/ ptr = OS.CFURLCreateStringByAddingPercentEscapes(0, str.id, unescapedStr.id, 0, OS.kCFStringEncodingUTF8);
+ long ptr = OS.CFURLCreateStringByAddingPercentEscapes(0, str.id, unescapedStr.id, 0, OS.kCFStringEncodingUTF8);
NSString escapedString = new NSString(ptr);
NSURL inURL = NSURL.URLWithString(escapedString);
OS.CFRelease(ptr);
@@ -629,13 +623,13 @@ boolean translateMnemonics() {
/* WebFrameLoadDelegate */
-void webView_didChangeLocationWithinPageForFrame(long /*int*/ sender, long /*int*/ frameID) {
+void webView_didChangeLocationWithinPageForFrame(long sender, long frameID) {
WebFrame frame = new WebFrame(frameID);
WebDataSource dataSource = frame.dataSource();
NSURLRequest request = dataSource.request();
NSURL url = request.URL();
NSString s = url.absoluteString();
- int length = (int)/*64*/s.length();
+ int length = (int)s.length();
if (length == 0) return;
String url2 = s.getString();
/*
@@ -673,7 +667,7 @@ void webView_didChangeLocationWithinPageForFrame(long /*int*/ sender, long /*int
}
}
-void webView_didFailProvisionalLoadWithError_forFrame(long /*int*/ sender, long /*int*/ error, long /*int*/ frame) {
+void webView_didFailProvisionalLoadWithError_forFrame(long sender, long error, long frame) {
if (frame == webView.mainFrame().id) {
/*
* Feature on WebKit. The identifier is used here as a marker for the events
@@ -692,7 +686,7 @@ void webView_didFailProvisionalLoadWithError_forFrame(long /*int*/ sender, long
}
NSError nserror = new NSError(error);
- long /*int*/ errorCode = nserror.code();
+ long errorCode = nserror.code();
if (OS.NSURLErrorBadURL < errorCode) return;
NSURL failingURL = null;
@@ -705,34 +699,35 @@ void webView_didFailProvisionalLoadWithError_forFrame(long /*int*/ sender, long
if (failingURL != null && OS.NSURLErrorServerCertificateNotYetValid <= errorCode && errorCode <= OS.NSURLErrorSecureConnectionFailed) {
/* handle invalid certificate error */
id certificates = info.objectForKey(NSString.stringWith("NSErrorPeerCertificateChainKey")); //$NON-NLS-1$
-
- long /*int*/[] policySearch = new long /*int*/[1];
- long /*int*/[] policyRef = new long /*int*/[1];
- long /*int*/[] trustRef = new long /*int*/[1];
- boolean success = false;
- int result = OS.SecPolicySearchCreate(OS.CSSM_CERT_X_509v3, 0, 0, policySearch);
- if (result == 0 && policySearch[0] != 0) {
- result = OS.SecPolicySearchCopyNext(policySearch[0], policyRef);
- if (result == 0 && policyRef[0] != 0) {
- result = OS.SecTrustCreateWithCertificates(certificates.id, policyRef[0], trustRef);
- if (result == 0 && trustRef[0] != 0) {
- SFCertificateTrustPanel panel = SFCertificateTrustPanel.sharedCertificateTrustPanel();
- String failingUrlString = failingURL.absoluteString().getString();
- String message = Compatibility.getMessage("SWT_InvalidCert_Message", new Object[] {failingUrlString}); //$NON-NLS-1$
- panel.setAlternateButtonTitle(NSString.stringWith(Compatibility.getMessage("SWT_Cancel"))); //$NON-NLS-1$
- panel.setShowsHelp(true);
- failingURL.retain();
- NSWindow window = browser.getShell().view.window();
- panel.beginSheetForWindow(window, delegate, OS.sel_createPanelDidEnd, failingURL.id, trustRef[0], NSString.stringWith(message));
- success = true;
+ if (certificates != null) {
+ long[] policySearch = new long[1];
+ long[] policyRef = new long[1];
+ long[] trustRef = new long[1];
+ boolean success = false;
+ int result = OS.SecPolicySearchCreate(OS.CSSM_CERT_X_509v3, 0, 0, policySearch);
+ if (result == 0 && policySearch[0] != 0) {
+ result = OS.SecPolicySearchCopyNext(policySearch[0], policyRef);
+ if (result == 0 && policyRef[0] != 0) {
+ result = OS.SecTrustCreateWithCertificates(certificates.id, policyRef[0], trustRef);
+ if (result == 0 && trustRef[0] != 0) {
+ SFCertificateTrustPanel panel = SFCertificateTrustPanel.sharedCertificateTrustPanel();
+ String failingUrlString = failingURL.absoluteString().getString();
+ String message = Compatibility.getMessage("SWT_InvalidCert_Message", new Object[] {failingUrlString}); //$NON-NLS-1$
+ panel.setAlternateButtonTitle(NSString.stringWith(Compatibility.getMessage("SWT_Cancel"))); //$NON-NLS-1$
+ panel.setShowsHelp(true);
+ failingURL.retain();
+ NSWindow window = browser.getShell().view.window();
+ panel.beginSheetForWindow(window, delegate, OS.sel_createPanelDidEnd, failingURL.id, trustRef[0], NSString.stringWith(message));
+ success = true;
+ }
}
}
- }
- if (trustRef[0] != 0) OS.CFRelease(trustRef[0]);
- if (policyRef[0] != 0) OS.CFRelease(policyRef[0]);
- if (policySearch[0] != 0) OS.CFRelease(policySearch[0]);
- if (success) return;
+ if (trustRef[0] != 0) OS.CFRelease(trustRef[0]);
+ if (policyRef[0] != 0) OS.CFRelease(policyRef[0]);
+ if (policySearch[0] != 0) OS.CFRelease(policySearch[0]);
+ if (success) return;
+ }
}
/* handle other types of errors */
@@ -747,19 +742,19 @@ void webView_didFailProvisionalLoadWithError_forFrame(long /*int*/ sender, long
}
}
-void createPanelDidEnd(long /*int*/ sheet, long /*int*/ returnCode, long /*int*/ contextInfo) {
+void createPanelDidEnd(long sheet, long returnCode, long contextInfo) {
NSURL failingURL = new NSURL(contextInfo);
failingURL.autorelease();
if (returnCode != OS.NSFileHandlingPanelOKButton) return; /* nothing more to do */
- long /*int*/ method = OS.class_getClassMethod(OS.class_NSURLRequest, OS.sel_setAllowsAnyHTTPSCertificate);
+ long method = OS.class_getClassMethod(OS.class_NSURLRequest, OS.sel_setAllowsAnyHTTPSCertificate);
if (method != 0) {
OS.objc_msgSend(OS.class_NSURLRequest, OS.sel_setAllowsAnyHTTPSCertificate, 1, failingURL.host().id);
setUrl(failingURL.absoluteString().getString(), null, null);
}
}
-void webView_didFinishLoadForFrame(long /*int*/ sender, long /*int*/ frameID) {
+void webView_didFinishLoadForFrame(long sender, long frameID) {
if (frameID == webView.mainFrame().id) {
/*
* If html is not null then there is html from a previous setText() call
@@ -841,7 +836,7 @@ void webView_didFinishLoadForFrame(long /*int*/ sender, long /*int*/ frameID) {
}
}
-void hookDOMKeyListeners(long /*int*/ frameID) {
+void hookDOMKeyListeners(long frameID) {
WebFrame frame = new WebFrame(frameID);
DOMDocument document = frame.DOMDocument();
if (document == null) return;
@@ -853,7 +848,7 @@ void hookDOMKeyListeners(long /*int*/ frameID) {
document.addEventListener(type, delegate, false);
}
-void hookDOMMouseListeners(long /*int*/ frameID) {
+void hookDOMMouseListeners(long frameID) {
WebFrame frame = new WebFrame(frameID);
DOMDocument document = frame.DOMDocument();
if (document == null) return;
@@ -871,7 +866,7 @@ void hookDOMMouseListeners(long /*int*/ frameID) {
document.addEventListener(type, delegate, false);
}
-void webView_didReceiveTitle_forFrame(long /*int*/ sender, long /*int*/ titleID, long /*int*/ frameID) {
+void webView_didReceiveTitle_forFrame(long sender, long titleID, long frameID) {
if (frameID == webView.mainFrame().id) {
NSString title = new NSString(titleID);
String newTitle = title.getString();
@@ -885,7 +880,7 @@ void webView_didReceiveTitle_forFrame(long /*int*/ sender, long /*int*/ titleID,
}
}
-void webView_didStartProvisionalLoadForFrame(long /*int*/ sender, long /*int*/ frameID) {
+void webView_didStartProvisionalLoadForFrame(long sender, long frameID) {
/*
* This code is intentionally commented. WebFrameLoadDelegate:didStartProvisionalLoadForFrame is
* called before WebResourceLoadDelegate:willSendRequest and
@@ -898,13 +893,13 @@ void webView_didStartProvisionalLoadForFrame(long /*int*/ sender, long /*int*/ f
// }
}
-void webView_didCommitLoadForFrame(long /*int*/ sender, long /*int*/ frameID) {
+void webView_didCommitLoadForFrame(long sender, long frameID) {
WebFrame frame = new WebFrame(frameID);
WebDataSource dataSource = frame.dataSource();
NSURLRequest request = dataSource.request();
NSURL url = request.URL();
NSString s = url.absoluteString();
- int length = (int)/*64*/s.length();
+ int length = (int)s.length();
if (length == 0) return;
String url2 = s.getString();
/*
@@ -977,7 +972,7 @@ void webView_didCommitLoadForFrame(long /*int*/ sender, long /*int*/ frameID) {
}
}
-void webView_windowScriptObjectAvailable (long /*int*/ webView, long /*int*/ windowScriptObject) {
+void webView_windowScriptObjectAvailable (long webView, long windowScriptObject) {
NSObject scriptObject = new NSObject (windowScriptObject);
NSString key = NSString.stringWith ("external"); //$NON-NLS-1$
scriptObject.setValue (delegate, key);
@@ -985,7 +980,7 @@ void webView_windowScriptObjectAvailable (long /*int*/ webView, long /*int*/ win
/* WebResourceLoadDelegate */
-void webView_resource_didFinishLoadingFromDataSource(long /*int*/ sender, long /*int*/ identifier, long /*int*/ dataSource) {
+void webView_resource_didFinishLoadingFromDataSource(long sender, long identifier, long dataSource) {
/*
* Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
@@ -1003,7 +998,7 @@ void webView_resource_didFinishLoadingFromDataSource(long /*int*/ sender, long /
//if (this.identifier == identifier) this.identifier = 0;
}
-void webView_resource_didFailLoadingWithError_fromDataSource(long /*int*/ sender, long /*int*/ identifier, long /*int*/ error, long /*int*/ dataSource) {
+void webView_resource_didFailLoadingWithError_fromDataSource(long sender, long identifier, long error, long dataSource) {
/*
* Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
@@ -1021,7 +1016,7 @@ void webView_resource_didFailLoadingWithError_fromDataSource(long /*int*/ sender
//if (this.identifier == identifier) this.identifier = 0;
}
-void webView_resource_didReceiveAuthenticationChallenge_fromDataSource (long /*int*/ sender, long /*int*/ identifier, long /*int*/ challenge, long /*int*/ dataSource) {
+void webView_resource_didReceiveAuthenticationChallenge_fromDataSource (long sender, long identifier, long challenge, long dataSource) {
NSURLAuthenticationChallenge nsChallenge = new NSURLAuthenticationChallenge (challenge);
/*
@@ -1051,11 +1046,11 @@ void webView_resource_didReceiveAuthenticationChallenge_fromDataSource (long /*i
}
/* no listener handled the challenge, so try to invoke the native panel */
- long /*int*/ cls = OS.class_WebPanelAuthenticationHandler;
+ long cls = OS.class_WebPanelAuthenticationHandler;
if (cls != 0) {
- long /*int*/ method = OS.class_getClassMethod (cls, OS.sel_sharedHandler);
+ long method = OS.class_getClassMethod (cls, OS.sel_sharedHandler);
if (method != 0) {
- long /*int*/ handler = OS.objc_msgSend (cls, OS.sel_sharedHandler);
+ long handler = OS.objc_msgSend (cls, OS.sel_sharedHandler);
if (handler != 0) {
OS.objc_msgSend (handler, OS.sel_startAuthentication, challenge, webView.window ().id);
return;
@@ -1159,7 +1154,7 @@ boolean showAuthenticationDialog (final String[] user, final String[] password,
return result[0];
}
-long /*int*/ webView_identifierForInitialRequest_fromDataSource(long /*int*/ sender, long /*int*/ request, long /*int*/ dataSourceID) {
+long webView_identifierForInitialRequest_fromDataSource(long sender, long request, long dataSourceID) {
ProgressEvent progress = new ProgressEvent(browser);
progress.display = browser.getDisplay();
progress.widget = browser;
@@ -1180,7 +1175,7 @@ long /*int*/ webView_identifierForInitialRequest_fromDataSource(long /*int*/ sen
}
-long /*int*/ webView_resource_willSendRequest_redirectResponse_fromDataSource(long /*int*/ sender, long /*int*/ identifier, long /*int*/ request, long /*int*/ redirectResponse, long /*int*/ dataSource) {
+long webView_resource_willSendRequest_redirectResponse_fromDataSource(long sender, long identifier, long request, long redirectResponse, long dataSource) {
NSURLRequest nsRequest = new NSURLRequest (request);
NSURL url = nsRequest.URL ();
if (url.isFileURL ()) {
@@ -1194,7 +1189,7 @@ long /*int*/ webView_resource_willSendRequest_redirectResponse_fromDataSource(lo
/* UIDelegate */
-long /*int*/ webView_createWebViewWithRequest(long /*int*/ sender, long /*int*/ request) {
+long webView_createWebViewWithRequest(long sender, long request) {
WindowEvent newEvent = new WindowEvent(browser);
newEvent.display = browser.getDisplay();
newEvent.widget = browser;
@@ -1219,7 +1214,7 @@ long /*int*/ webView_createWebViewWithRequest(long /*int*/ sender, long /*int*/
return result != null ? result.id : 0;
}
-void webViewShow(long /*int*/ sender) {
+void webViewShow(long sender) {
/*
* Feature on WebKit. WebKit expects the application to
* create a new Window using the Objective C Cocoa API in response
@@ -1259,7 +1254,7 @@ void webViewShow(long /*int*/ sender) {
size = null;
}
-void webView_setFrame(long /*int*/ sender, long /*int*/ frame) {
+void webView_setFrame(long sender, long frame) {
NSRect rect = new NSRect();
OS.memmove(rect, frame, NSRect.sizeof);
/* convert to SWT system coordinates */
@@ -1268,20 +1263,20 @@ void webView_setFrame(long /*int*/ sender, long /*int*/ frame) {
size = new Point((int)rect.width, (int)rect.height);
}
-void webViewFocus(long /*int*/ sender) {
+void webViewFocus(long sender) {
}
-void webViewUnfocus(long /*int*/ sender) {
+void webViewUnfocus(long sender) {
}
-NSNumber callRunBeforeUnloadConfirmPanelWithMessage(long /*int*/ messageID, long /*int*/ arg) {
+NSNumber callRunBeforeUnloadConfirmPanelWithMessage(long messageID, long arg) {
boolean result = webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame (0, messageID, 0);
return NSNumber.numberWithBool (result);
}
-boolean webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(long /*int*/ sender, long /*int*/ messageID, long /*int*/ frame) {
+boolean webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(long sender, long messageID, long frame) {
NSString message = new NSString(messageID);
- StringBuffer text = new StringBuffer(Compatibility.getMessage("SWT_OnBeforeUnload_Message1")); //$NON-NLS-1$
+ StringBuilder text = new StringBuilder(Compatibility.getMessage("SWT_OnBeforeUnload_Message1")); //$NON-NLS-1$
text.append("\n\n"); //$NON-NLS-1$
text.append(message.getString());
text.append("\n\n"); //$NON-NLS-1$
@@ -1291,7 +1286,7 @@ boolean webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(long /*i
return messageBox.open() == SWT.OK;
}
-void webView_runJavaScriptAlertPanelWithMessage(long /*int*/ sender, long /*int*/ messageID) {
+void webView_runJavaScriptAlertPanelWithMessage(long sender, long messageID) {
NSString message = new NSString(messageID);
String text = message.getString();
@@ -1301,7 +1296,7 @@ void webView_runJavaScriptAlertPanelWithMessage(long /*int*/ sender, long /*int*
messageBox.open();
}
-int webView_runJavaScriptConfirmPanelWithMessage(long /*int*/ sender, long /*int*/ messageID) {
+int webView_runJavaScriptConfirmPanelWithMessage(long sender, long messageID) {
NSString message = new NSString(messageID);
String text = message.getString();
@@ -1311,7 +1306,7 @@ int webView_runJavaScriptConfirmPanelWithMessage(long /*int*/ sender, long /*int
return messageBox.open() == SWT.OK ? 1 : 0;
}
-void webView_runOpenPanelForFileButtonWithResultListener(long /*int*/ sender, long /*int*/ resultListenerID) {
+void webView_runOpenPanelForFileButtonWithResultListener(long sender, long resultListenerID) {
FileDialog dialog = new FileDialog(browser.getShell(), SWT.NONE);
String result = dialog.open();
WebOpenPanelResultListener resultListener = new WebOpenPanelResultListener(resultListenerID);
@@ -1322,7 +1317,7 @@ void webView_runOpenPanelForFileButtonWithResultListener(long /*int*/ sender, lo
resultListener.chooseFilename(NSString.stringWith(result));
}
-void webViewClose(long /*int*/ sender) {
+void webViewClose(long sender) {
Shell parent = browser.getShell();
WindowEvent newEvent = new WindowEvent(browser);
newEvent.display = browser.getDisplay();
@@ -1347,7 +1342,7 @@ void webViewClose(long /*int*/ sender) {
parent.setSize(pt.x, pt.y);
}
-long /*int*/ webView_contextMenuItemsForElement_defaultMenuItems(long /*int*/ sender, long /*int*/ element, long /*int*/ defaultMenuItems) {
+long webView_contextMenuItemsForElement_defaultMenuItems(long sender, long element, long defaultMenuItems) {
Point pt = browser.getDisplay().getCursorLocation();
Event event = new Event();
event.x = pt.x;
@@ -1365,14 +1360,14 @@ long /*int*/ webView_contextMenuItemsForElement_defaultMenuItems(long /*int*/ se
return defaultMenuItems;
}
-void webView_setStatusBarVisible(long /*int*/ sender, boolean visible) {
+void webView_setStatusBarVisible(long sender, boolean visible) {
/* Note. Webkit only emits the notification when the status bar should be hidden. */
statusBar = visible;
}
-void webView_setStatusText(long /*int*/ sender, long /*int*/ textID) {
+void webView_setStatusText(long sender, long textID) {
NSString text = new NSString(textID);
- int length = (int)/*64*/text.length();
+ int length = (int)text.length();
if (length == 0) return;
StatusTextEvent statusText = new StatusTextEvent(browser);
@@ -1384,15 +1379,15 @@ void webView_setStatusText(long /*int*/ sender, long /*int*/ textID) {
}
}
-void webView_setResizable(long /*int*/ sender, boolean visible) {
+void webView_setResizable(long sender, boolean visible) {
}
-void webView_setToolbarsVisible(long /*int*/ sender, boolean visible) {
+void webView_setToolbarsVisible(long sender, boolean visible) {
/* Note. Webkit only emits the notification when the tool bar should be hidden. */
toolBar = visible;
}
-void webView_mouseDidMoveOverElement_modifierFlags (long /*int*/ sender, long /*int*/ elementInformationID, long /*int*/ modifierFlags) {
+void webView_mouseDidMoveOverElement_modifierFlags (long sender, long elementInformationID, long modifierFlags) {
if (elementInformationID == 0) return;
NSString key = NSString.stringWith(WebElementLinkURLKey);
@@ -1413,7 +1408,7 @@ void webView_mouseDidMoveOverElement_modifierFlags (long /*int*/ sender, long /*
}
NSString url = new NSURL(value.id).absoluteString();
- int length = (int)/*64*/url.length();
+ int length = (int)url.length();
String urlString;
if (length == 0) {
urlString = ""; //$NON-NLS-1$
@@ -1432,7 +1427,7 @@ void webView_mouseDidMoveOverElement_modifierFlags (long /*int*/ sender, long /*
}
}
-void webView_printFrameView (long /*int*/ sender, long /*int*/ frameViewID) {
+void webView_printFrameView (long sender, long frameViewID) {
WebFrameView view = new WebFrameView(frameViewID);
boolean viewPrint = view.documentViewShouldHandlePrint();
if (viewPrint) {
@@ -1446,7 +1441,7 @@ void webView_printFrameView (long /*int*/ sender, long /*int*/ frameViewID) {
/* PolicyDelegate */
-void webView_decidePolicyForMIMEType_request_frame_decisionListener(long /*int*/ sender, long /*int*/ type, long /*int*/ request, long /*int*/ frame, long /*int*/ listenerID) {
+void webView_decidePolicyForMIMEType_request_frame_decisionListener(long sender, long type, long request, long frame, long listenerID) {
boolean canShow = WebView.canShowMIMEType(new NSString(type));
WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
if (canShow) {
@@ -1456,7 +1451,7 @@ void webView_decidePolicyForMIMEType_request_frame_decisionListener(long /*int*/
}
}
-void webView_decidePolicyForNavigationAction_request_frame_decisionListener(long /*int*/ sender, long /*int*/ actionInformation, long /*int*/ request, long /*int*/ frame, long /*int*/ listenerID) {
+void webView_decidePolicyForNavigationAction_request_frame_decisionListener(long sender, long actionInformation, long request, long frame, long listenerID) {
NSURL url = new NSURLRequest(request).URL();
WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
@@ -1520,17 +1515,17 @@ void webView_decidePolicyForNavigationAction_request_frame_decisionListener(long
}
}
-void webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(long /*int*/ sender, long /*int*/ actionInformation, long /*int*/ request, long /*int*/ frameName, long /*int*/ listenerID) {
+void webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(long sender, long actionInformation, long request, long frameName, long listenerID) {
WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
listener.use();
}
-void webView_unableToImplementPolicyWithError_frame(long /*int*/ sender, long /*int*/ error, long /*int*/ frame) {
+void webView_unableToImplementPolicyWithError_frame(long sender, long error, long frame) {
}
/* WebDownload */
-void download_decideDestinationWithSuggestedFilename(long /*int*/ downloadId, long /*int*/ filename) {
+void download_decideDestinationWithSuggestedFilename(long downloadId, long filename) {
NSString string = new NSString(filename);
String name = string.getString();
FileDialog dialog = new FileDialog(browser.getShell(), SWT.SAVE);
@@ -1548,7 +1543,7 @@ void download_decideDestinationWithSuggestedFilename(long /*int*/ downloadId, lo
/* DOMEventListener */
-void handleEvent(long /*int*/ evtId) {
+void handleEvent(long evtId) {
NSString string = new NSString(OS.objc_msgSend(evtId, OS.sel_type));
String type = string.getString();
@@ -1694,9 +1689,9 @@ void handleEvent(long /*int*/ evtId) {
/* external */
-Object convertToJava (long /*int*/ value) {
+Object convertToJava (long value) {
NSObject object = new NSObject (value);
- long /*int*/ clazz = OS.objc_lookUpClass ("NSString"); //$NON-NLS-1$
+ long clazz = OS.objc_lookUpClass ("NSString"); //$NON-NLS-1$
if (object.isKindOfClass (clazz)) {
NSString string = new NSString (value);
return string.getString ();
@@ -1704,7 +1699,7 @@ Object convertToJava (long /*int*/ value) {
clazz = OS.objc_lookUpClass ("NSNumber"); //$NON-NLS-1$
if (object.isKindOfClass (clazz)) {
NSNumber number = new NSNumber (value);
- long /*int*/ ptr = number.objCType ();
+ long ptr = number.objCType ();
byte[] type = new byte[1];
C.memmove (type, ptr, 1);
if (type[0] == 'c' || type[0] == 'B') {
@@ -1742,7 +1737,7 @@ Object convertToJava (long /*int*/ value) {
NSObject convertToJS (Object value) {
if (value == null) {
- long /*int*/ result = OS.objc_msgSend (OS.class_NSNull, OS.sel_null);
+ long result = OS.objc_msgSend (OS.class_NSNull, OS.sel_null);
return result != 0 ? new NSObject (result) : null;
}
if (value instanceof String) {
@@ -1768,10 +1763,10 @@ NSObject convertToJS (Object value) {
return null;
}
-NSObject callJava (long /*int*/ index, long /*int*/ token, long /*int*/ args, long /*int*/ arg1) {
+NSObject callJava (long index, long token, long args, long arg1) {
Object returnValue = null;
NSObject object = new NSObject (index);
- long /*int*/ clazz = OS.objc_lookUpClass ("NSNumber"); //$NON-NLS-1$
+ long clazz = OS.objc_lookUpClass ("NSNumber"); //$NON-NLS-1$
if (object.isKindOfClass (clazz)) {
NSNumber number = new NSNumber (index);
Object key = number.intValue ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
index da0f52bf1e..b278236729 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2022 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -36,109 +36,13 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(GdkRectangle_1sizeof)
}
#endif
-#ifndef NO_JSClassDefinition_1sizeof
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(JSClassDefinition_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, JSClassDefinition_1sizeof_FUNC);
- rc = (jint)JSClassDefinition_sizeof();
- WebKitGTK_NATIVE_EXIT(env, that, JSClassDefinition_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSClassCreate
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSClassCreate)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSClassCreate_FUNC);
-/*
- rc = (jlong)JSClassCreate(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSClassCreate)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSClassCreate_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSContextGetGlobalObject
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSContextGetGlobalObject)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSContextGetGlobalObject_FUNC);
-/*
- rc = (jlong)JSContextGetGlobalObject(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSContextGetGlobalObject)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSContextGetGlobalObject_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSEvaluateScript
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSEvaluateScript)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jint arg4, jlongArray arg5)
-{
- jlong *lparg5=NULL;
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSEvaluateScript_FUNC);
- if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
-/*
- rc = (jlong)JSEvaluateScript(arg0, arg1, arg2, arg3, arg4, lparg5);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSEvaluateScript)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jlong, jlong, jint, jlong *))fp)(arg0, arg1, arg2, arg3, arg4, lparg5);
- }
- }
-fail:
- if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSEvaluateScript_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSObjectGetPrivate
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectGetPrivate)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectGetPrivate_FUNC);
-/*
- rc = (jlong)JSObjectGetPrivate(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSObjectGetPrivate)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectGetPrivate_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSObjectGetProperty
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectGetProperty)
+#ifndef NO_JSObjectGetProperty
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(JSObjectGetProperty)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlongArray arg3)
{
jlong *lparg3=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectGetProperty_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSObjectGetProperty_FUNC);
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
/*
rc = (jlong)JSObjectGetProperty(arg0, arg1, arg2, lparg3);
@@ -151,18 +55,18 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectGetProperty)
}
fail:
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectGetProperty_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSObjectGetProperty_FUNC);
return rc;
}
#endif
-#ifndef NO__1JSObjectGetPropertyAtIndex
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectGetPropertyAtIndex)
+#ifndef NO_JSObjectGetPropertyAtIndex
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(JSObjectGetPropertyAtIndex)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2, jlongArray arg3)
{
jlong *lparg3=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectGetPropertyAtIndex_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSObjectGetPropertyAtIndex_FUNC);
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
/*
rc = (jlong)JSObjectGetPropertyAtIndex(arg0, arg1, arg2, lparg3);
@@ -175,107 +79,18 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectGetPropertyAtIndex)
}
fail:
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectGetPropertyAtIndex_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSObjectGetPropertyAtIndex_FUNC);
return rc;
}
#endif
-#ifndef NO__1JSObjectMake
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectMake)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectMake_FUNC);
-/*
- rc = (jlong)JSObjectMake(arg0, arg1, arg2);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSObjectMake)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jlong))fp)(arg0, arg1, arg2);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectMake_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSObjectMakeArray
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectMakeArray)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2, jlongArray arg3)
-{
- jlong *lparg2=NULL;
- jlong *lparg3=NULL;
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectMakeArray_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
-/*
- rc = (jlong)JSObjectMakeArray(arg0, arg1, lparg2, lparg3);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSObjectMakeArray)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jlong *, jlong *))fp)(arg0, arg1, lparg2, lparg3);
- }
- }
-fail:
- if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectMakeArray_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSObjectMakeFunctionWithCallback
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSObjectMakeFunctionWithCallback)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectMakeFunctionWithCallback_FUNC);
-/*
- rc = (jlong)JSObjectMakeFunctionWithCallback(arg0, arg1, arg2);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSObjectMakeFunctionWithCallback)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jlong))fp)(arg0, arg1, arg2);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectMakeFunctionWithCallback_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSObjectSetProperty
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1JSObjectSetProperty)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jint arg4, jlongArray arg5)
-{
- jlong *lparg5=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectSetProperty_FUNC);
- if (arg5) if ((lparg5 = (*env)->GetLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
-/*
- JSObjectSetProperty(arg0, arg1, arg2, arg3, arg4, lparg5);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSObjectSetProperty)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong, jlong, jlong, jint, jlong *))fp)(arg0, arg1, arg2, arg3, arg4, lparg5);
- }
- }
-fail:
- if (arg5 && lparg5) (*env)->ReleaseLongArrayElements(env, arg5, lparg5, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectSetProperty_FUNC);
-}
-#endif
-
-#ifndef NO__1JSStringCreateWithUTF8CString
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSStringCreateWithUTF8CString)
+#ifndef NO_JSStringCreateWithUTF8CString
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(JSStringCreateWithUTF8CString)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSStringCreateWithUTF8CString_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSStringCreateWithUTF8CString_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
/*
rc = (jlong)JSStringCreateWithUTF8CString(lparg0);
@@ -288,37 +103,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSStringCreateWithUTF8CString)
}
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSStringCreateWithUTF8CString_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSStringCreateWithUTF8CString_FUNC);
return rc;
}
#endif
-#ifndef NO__1JSStringGetLength
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSStringGetLength)
+#ifndef NO_JSStringGetMaximumUTF8CStringSize
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(JSStringGetMaximumUTF8CStringSize)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSStringGetLength_FUNC);
-/*
- rc = (jlong)JSStringGetLength(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSStringGetLength)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSStringGetLength_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSStringGetMaximumUTF8CStringSize
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSStringGetMaximumUTF8CStringSize)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSStringGetMaximumUTF8CStringSize_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSStringGetMaximumUTF8CStringSize_FUNC);
/*
rc = (jlong)JSStringGetMaximumUTF8CStringSize(arg0);
*/
@@ -328,18 +123,18 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSStringGetMaximumUTF8CStringSize)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1JSStringGetMaximumUTF8CStringSize_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSStringGetMaximumUTF8CStringSize_FUNC);
return rc;
}
#endif
-#ifndef NO__1JSStringGetUTF8CString
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSStringGetUTF8CString)
+#ifndef NO_JSStringGetUTF8CString
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(JSStringGetUTF8CString)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
{
jbyte *lparg1=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSStringGetUTF8CString_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSStringGetUTF8CString_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
rc = (jlong)JSStringGetUTF8CString(arg0, lparg1, arg2);
@@ -352,40 +147,16 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSStringGetUTF8CString)
}
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSStringGetUTF8CString_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSStringGetUTF8CString_FUNC);
return rc;
}
#endif
-#ifndef NO__1JSStringIsEqualToUTF8CString
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSStringIsEqualToUTF8CString)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSStringIsEqualToUTF8CString_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- rc = (jint)JSStringIsEqualToUTF8CString(arg0, lparg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSStringIsEqualToUTF8CString)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSStringIsEqualToUTF8CString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSStringRelease
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1JSStringRelease)
+#ifndef NO_JSStringRelease
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(JSStringRelease)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1JSStringRelease_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSStringRelease_FUNC);
/*
JSStringRelease(arg0);
*/
@@ -395,16 +166,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1JSStringRelease)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1JSStringRelease_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSStringRelease_FUNC);
}
#endif
-#ifndef NO__1JSValueGetType
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSValueGetType)
+#ifndef NO_JSValueGetType
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(JSValueGetType)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueGetType_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSValueGetType_FUNC);
/*
rc = (jint)JSValueGetType(arg0, arg1);
*/
@@ -414,118 +185,18 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSValueGetType)
rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueGetType_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSValueIsObjectOfClass
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSValueIsObjectOfClass)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
-{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueIsObjectOfClass_FUNC);
-/*
- rc = (jint)JSValueIsObjectOfClass(arg0, arg1, arg2);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSValueIsObjectOfClass)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jlong, jlong))fp)(arg0, arg1, arg2);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueIsObjectOfClass_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSValueMakeBoolean
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSValueMakeBoolean)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeBoolean_FUNC);
-/*
- rc = (jlong)JSValueMakeBoolean(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSValueMakeBoolean)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeBoolean_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSValueMakeNumber
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSValueMakeNumber)
- (JNIEnv *env, jclass that, jlong arg0, jdouble arg1)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeNumber_FUNC);
-/*
- rc = (jlong)JSValueMakeNumber(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSValueMakeNumber)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jdouble))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeNumber_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSValueMakeString
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSValueMakeString)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeString_FUNC);
-/*
- rc = (jlong)JSValueMakeString(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSValueMakeString)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeString_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSValueGetType_FUNC);
return rc;
}
#endif
-#ifndef NO__1JSValueMakeUndefined
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSValueMakeUndefined)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeUndefined_FUNC);
-/*
- rc = (jlong)JSValueMakeUndefined(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, JSValueMakeUndefined)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeUndefined_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JSValueToNumber
-JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1JSValueToNumber)
+#ifndef NO_JSValueToNumber
+JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(JSValueToNumber)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
jlong *lparg2=NULL;
jdouble rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueToNumber_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSValueToNumber_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
rc = (jdouble)JSValueToNumber(arg0, arg1, lparg2);
@@ -538,18 +209,18 @@ JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1JSValueToNumber)
}
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueToNumber_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSValueToNumber_FUNC);
return rc;
}
#endif
-#ifndef NO__1JSValueToStringCopy
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSValueToStringCopy)
+#ifndef NO_JSValueToStringCopy
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(JSValueToStringCopy)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
jlong *lparg2=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1JSValueToStringCopy_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, JSValueToStringCopy_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
rc = (jlong)JSValueToStringCopy(arg0, arg1, lparg2);
@@ -562,243 +233,58 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1JSValueToStringCopy)
}
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1JSValueToStringCopy_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1SoupCookie_1expires
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1SoupCookie_1expires)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1SoupCookie_1expires_FUNC);
- rc = (jlong)((SoupCookie *)arg0)->expires;
- WebKitGTK_NATIVE_EXIT(env, that, _1SoupCookie_1expires_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1SoupMessage_1method
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1SoupMessage_1method)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1SoupMessage_1method_FUNC);
- ((SoupMessage *)arg0)->method = ((const char *)arg1);
- WebKitGTK_NATIVE_EXIT(env, that, _1SoupMessage_1method_FUNC);
-}
-#endif
-
-#ifndef NO__1SoupMessage_1request_1body
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1SoupMessage_1request_1body)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1SoupMessage_1request_1body_FUNC);
- rc = (jlong)((SoupMessage *)arg0)->request_body;
- WebKitGTK_NATIVE_EXIT(env, that, _1SoupMessage_1request_1body_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1SoupMessage_1request_1headers
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1SoupMessage_1request_1headers)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1SoupMessage_1request_1headers_FUNC);
- rc = (jlong)((SoupMessage *)arg0)->request_headers;
- WebKitGTK_NATIVE_EXIT(env, that, _1SoupMessage_1request_1headers_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1soup_1auth_1authenticate
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1auth_1authenticate)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
-{
- jbyte *lparg1=NULL;
- jbyte *lparg2=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1auth_1authenticate_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
-/*
- soup_auth_authenticate(arg0, lparg1, lparg2);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_auth_authenticate)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jbyte *, jbyte *))fp)(arg0, lparg1, lparg2);
- }
- }
-fail:
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1auth_1authenticate_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1auth_1get_1host
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1auth_1get_1host)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1auth_1get_1host_FUNC);
-/*
- rc = (jlong)soup_auth_get_host(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_auth_get_host)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1auth_1get_1host_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, JSValueToStringCopy_FUNC);
return rc;
}
#endif
-#ifndef NO__1soup_1auth_1get_1scheme_1name
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1auth_1get_1scheme_1name)
+#ifndef NO_soup_1cookie_1get_1name
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(soup_1cookie_1get_1name)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1auth_1get_1scheme_1name_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, soup_1cookie_1get_1name_FUNC);
/*
- rc = (jlong)soup_auth_get_scheme_name(arg0);
+ rc = (jlong)soup_cookie_get_name(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_auth_get_scheme_name)
+ WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_get_name)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1auth_1get_1scheme_1name_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, soup_1cookie_1get_1name_FUNC);
return rc;
}
#endif
-#ifndef NO__1soup_1cookie_1free
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1free)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1free_FUNC);
-/*
- soup_cookie_free(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_free)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1free_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1cookie_1jar_1add_1cookie
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1add_1cookie)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1add_1cookie_FUNC);
-/*
- soup_cookie_jar_add_cookie(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_jar_add_cookie)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1add_1cookie_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1cookie_1jar_1all_1cookies
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1all_1cookies)
+#ifndef NO_soup_1cookie_1get_1value
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(soup_1cookie_1get_1value)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1all_1cookies_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, soup_1cookie_1get_1value_FUNC);
/*
- rc = (jlong)soup_cookie_jar_all_cookies(arg0);
+ rc = (jlong)soup_cookie_get_value(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_jar_all_cookies)
+ WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_get_value)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1all_1cookies_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, soup_1cookie_1get_1value_FUNC);
return rc;
}
#endif
-#ifndef NO__1soup_1cookie_1jar_1delete_1cookie
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1delete_1cookie)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1delete_1cookie_FUNC);
-/*
- soup_cookie_jar_delete_cookie(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_jar_delete_cookie)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1delete_1cookie_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1cookie_1jar_1get_1cookies
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1get_1cookies)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1get_1cookies_FUNC);
-/*
- rc = (jlong)soup_cookie_jar_get_cookies(arg0, arg1, arg2);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_jar_get_cookies)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jint))fp)(arg0, arg1, arg2);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1get_1cookies_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1soup_1cookie_1jar_1get_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1get_1type)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1get_1type_FUNC);
-/*
- rc = (jlong)soup_cookie_jar_get_type();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_cookie_jar_get_type)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1get_1type_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1soup_1cookie_1parse
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1parse)
+#ifndef NO_soup_1cookie_1parse
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(soup_1cookie_1parse)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1parse_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, soup_1cookie_1parse_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
/*
rc = (jlong)soup_cookie_parse(lparg0, arg1);
@@ -811,74 +297,18 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1parse)
}
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1parse_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1soup_1message_1body_1append
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1message_1body_1append)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2, jlong arg3)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1body_1append_FUNC);
-/*
- soup_message_body_append(arg0, arg1, arg2, arg3);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_message_body_append)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jint, jlong, jlong))fp)(arg0, arg1, arg2, arg3);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1body_1append_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1message_1body_1flatten
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1message_1body_1flatten)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1body_1flatten_FUNC);
-/*
- soup_message_body_flatten(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_message_body_flatten)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1body_1flatten_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1message_1get_1uri
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1message_1get_1uri)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1get_1uri_FUNC);
-/*
- rc = (jlong)soup_message_get_uri(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_message_get_uri)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1get_1uri_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, soup_1cookie_1parse_FUNC);
return rc;
}
#endif
-#ifndef NO__1soup_1message_1headers_1append
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1message_1headers_1append)
+#ifndef NO_soup_1message_1headers_1append
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(soup_1message_1headers_1append)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1headers_1append_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, soup_1message_1headers_1append_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
@@ -893,227 +323,201 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1message_1headers_1append)
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1headers_1append_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, soup_1message_1headers_1append_FUNC);
}
#endif
-#ifndef NO__1soup_1session_1add_1feature_1by_1type
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1session_1add_1feature_1by_1type)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1add_1feature_1by_1type_FUNC);
-/*
- soup_session_add_feature_by_type(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_session_add_feature_by_type)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1add_1feature_1by_1type_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1session_1feature_1attach
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1session_1feature_1attach)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1feature_1attach_FUNC);
-/*
- soup_session_feature_attach(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, soup_session_feature_attach)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1feature_1attach_FUNC);
-}
-#endif
-
-#ifndef NO__1soup_1session_1feature_1detach
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1session_1feature_1detach)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_soup_1uri_1free
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(soup_1uri_1free)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1feature_1detach_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, soup_1uri_1free_FUNC);
/*
- soup_session_feature_detach(arg0, arg1);
+ soup_uri_free(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_session_feature_detach)
+ WebKitGTK_LOAD_FUNCTION(fp, soup_uri_free)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
+ ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1feature_1detach_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, soup_1uri_1free_FUNC);
}
#endif
-#ifndef NO__1soup_1session_1get_1feature
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1session_1get_1feature)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_soup_1uri_1new
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(soup_1uri_1new)
+ (JNIEnv *env, jclass that, jbyteArray arg0)
{
+ jbyte *lparg0=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1get_1feature_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, soup_1uri_1new_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
/*
- rc = (jlong)soup_session_get_feature(arg0, arg1);
+ rc = (jlong)soup_uri_new(lparg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_session_get_feature)
+ WebKitGTK_LOAD_FUNCTION(fp, soup_uri_new)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1get_1feature_FUNC);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+ WebKitGTK_NATIVE_EXIT(env, that, soup_1uri_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1soup_1session_1get_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1session_1get_1type)
- (JNIEnv *env, jclass that)
+#ifndef NO_webkit_1authentication_1request_1authenticate
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1authentication_1request_1authenticate)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1get_1type_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1authentication_1request_1authenticate_FUNC);
/*
- rc = (jlong)soup_session_get_type();
+ webkit_authentication_request_authenticate(arg0, arg1);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_session_get_type)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_authentication_request_authenticate)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
+ ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1get_1type_FUNC);
- return rc;
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1authentication_1request_1authenticate_FUNC);
}
#endif
-#ifndef NO__1soup_1uri_1free
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1uri_1free)
+#ifndef NO_webkit_1authentication_1request_1cancel
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1authentication_1request_1cancel)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1uri_1free_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1authentication_1request_1cancel_FUNC);
/*
- soup_uri_free(arg0);
+ webkit_authentication_request_cancel(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_uri_free)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_authentication_request_cancel)
if (fp) {
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1uri_1free_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1authentication_1request_1cancel_FUNC);
}
#endif
-#ifndef NO__1soup_1uri_1new
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1uri_1new)
- (JNIEnv *env, jclass that, jbyteArray arg0)
+#ifndef NO_webkit_1authentication_1request_1is_1retry
+JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(webkit_1authentication_1request_1is_1retry)
+ (JNIEnv *env, jclass that, jlong arg0)
{
- jbyte *lparg0=NULL;
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1uri_1new_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+ jboolean rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1authentication_1request_1is_1retry_FUNC);
/*
- rc = (jlong)soup_uri_new(lparg0);
+ rc = (jboolean)webkit_authentication_request_is_retry(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_uri_new)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_authentication_request_is_retry)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1uri_1new_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1authentication_1request_1is_1retry_FUNC);
return rc;
}
#endif
-#ifndef NO__1soup_1uri_1to_1string
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1soup_1uri_1to_1string)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+#ifndef NO_webkit_1cookie_1manager_1add_1cookie
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1cookie_1manager_1add_1cookie)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1soup_1uri_1to_1string_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1cookie_1manager_1add_1cookie_FUNC);
/*
- rc = (jlong)soup_uri_to_string(arg0, arg1);
+ webkit_cookie_manager_add_cookie(arg0, arg1, arg2, arg3, arg4);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, soup_uri_to_string)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_cookie_manager_add_cookie)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
+ ((void (CALLING_CONVENTION*)(jlong, jlong, jlong, jlong, jlong))fp)(arg0, arg1, arg2, arg3, arg4);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1soup_1uri_1to_1string_FUNC);
- return rc;
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1cookie_1manager_1add_1cookie_FUNC);
}
#endif
-#ifndef NO__1webkit_1authentication_1request_1authenticate
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1authentication_1request_1authenticate)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+#ifndef NO_webkit_1cookie_1manager_1add_1cookie_1finish
+JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(webkit_1cookie_1manager_1add_1cookie_1finish)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1authentication_1request_1authenticate_FUNC);
+ jlong *lparg2=NULL;
+ jboolean rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1cookie_1manager_1add_1cookie_1finish_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
- webkit_authentication_request_authenticate(arg0, arg1);
+ rc = (jboolean)webkit_cookie_manager_add_cookie_finish(arg0, arg1, lparg2);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_authentication_request_authenticate)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_cookie_manager_add_cookie_finish)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong, jlong, jlong *))fp)(arg0, arg1, lparg2);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1authentication_1request_1authenticate_FUNC);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1cookie_1manager_1add_1cookie_1finish_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1webkit_1authentication_1request_1cancel
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1authentication_1request_1cancel)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_webkit_1cookie_1manager_1get_1cookies
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1cookie_1manager_1get_1cookies)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlong arg3, jlong arg4)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1authentication_1request_1cancel_FUNC);
+ jbyte *lparg1=NULL;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1cookie_1manager_1get_1cookies_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- webkit_authentication_request_cancel(arg0);
+ webkit_cookie_manager_get_cookies(arg0, lparg1, arg2, arg3, arg4);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_authentication_request_cancel)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_cookie_manager_get_cookies)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ ((void (CALLING_CONVENTION*)(jlong, jbyte *, jlong, jlong, jlong))fp)(arg0, lparg1, arg2, arg3, arg4);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1authentication_1request_1cancel_FUNC);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1cookie_1manager_1get_1cookies_FUNC);
}
#endif
-#ifndef NO__1webkit_1authentication_1request_1is_1retry
-JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(_1webkit_1authentication_1request_1is_1retry)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_webkit_1cookie_1manager_1get_1cookies_1finish
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1cookie_1manager_1get_1cookies_1finish)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
- jboolean rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1authentication_1request_1is_1retry_FUNC);
+ jlong *lparg2=NULL;
+ jlong rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1cookie_1manager_1get_1cookies_1finish_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
- rc = (jboolean)webkit_authentication_request_is_retry(arg0);
+ rc = (jlong)webkit_cookie_manager_get_cookies_finish(arg0, arg1, lparg2);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_authentication_request_is_retry)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_cookie_manager_get_cookies_finish)
if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jlong *))fp)(arg0, arg1, lparg2);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1authentication_1request_1is_1retry_FUNC);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1cookie_1manager_1get_1cookies_1finish_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1credential_1free
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1credential_1free)
+#ifndef NO_webkit_1credential_1free
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1credential_1free)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1credential_1free_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1credential_1free_FUNC);
/*
webkit_credential_free(arg0);
*/
@@ -1123,18 +527,18 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1credential_1free)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1credential_1free_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1credential_1free_FUNC);
}
#endif
-#ifndef NO__1webkit_1credential_1new
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1credential_1new)
+#ifndef NO_webkit_1credential_1new
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1credential_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1credential_1new_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1credential_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
@@ -1149,18 +553,18 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1credential_1new)
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1credential_1new_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1credential_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1event_1target_1add_1event_1listener
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1event_1target_1add_1event_1listener)
+#ifndef NO_webkit_1dom_1event_1target_1add_1event_1listener
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1dom_1event_1target_1add_1event_1listener)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jint arg3, jlong arg4)
{
jbyte *lparg1=NULL;
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1event_1target_1add_1event_1listener_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1event_1target_1add_1event_1listener_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
rc = (jint)webkit_dom_event_target_add_event_listener(arg0, lparg1, arg2, arg3, arg4);
@@ -1173,17 +577,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1event_1target_1add_1event
}
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1event_1target_1add_1event_1listener_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1event_1target_1add_1event_1listener_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1mouse_1event_1get_1alt_1key
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1alt_1key)
+#ifndef NO_webkit_1dom_1mouse_1event_1get_1alt_1key
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1dom_1mouse_1event_1get_1alt_1key)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1mouse_1event_1get_1alt_1key_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1mouse_1event_1get_1alt_1key_FUNC);
/*
rc = (jint)webkit_dom_mouse_event_get_alt_key(arg0);
*/
@@ -1193,17 +597,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1alt_1k
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1mouse_1event_1get_1alt_1key_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1mouse_1event_1get_1alt_1key_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1mouse_1event_1get_1button
-JNIEXPORT jshort JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1button)
+#ifndef NO_webkit_1dom_1mouse_1event_1get_1button
+JNIEXPORT jshort JNICALL WebKitGTK_NATIVE(webkit_1dom_1mouse_1event_1get_1button)
(JNIEnv *env, jclass that, jlong arg0)
{
jshort rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1mouse_1event_1get_1button_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1mouse_1event_1get_1button_FUNC);
/*
rc = (jshort)webkit_dom_mouse_event_get_button(arg0);
*/
@@ -1213,17 +617,17 @@ JNIEXPORT jshort JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1butt
rc = (jshort)((jshort (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1mouse_1event_1get_1button_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1mouse_1event_1get_1button_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1mouse_1event_1get_1ctrl_1key
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1ctrl_1key)
+#ifndef NO_webkit_1dom_1mouse_1event_1get_1ctrl_1key
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1dom_1mouse_1event_1get_1ctrl_1key)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1mouse_1event_1get_1ctrl_1key_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1mouse_1event_1get_1ctrl_1key_FUNC);
/*
rc = (jint)webkit_dom_mouse_event_get_ctrl_key(arg0);
*/
@@ -1233,17 +637,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1ctrl_1
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1mouse_1event_1get_1ctrl_1key_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1mouse_1event_1get_1ctrl_1key_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1mouse_1event_1get_1meta_1key
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1meta_1key)
+#ifndef NO_webkit_1dom_1mouse_1event_1get_1meta_1key
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1dom_1mouse_1event_1get_1meta_1key)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1mouse_1event_1get_1meta_1key_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1mouse_1event_1get_1meta_1key_FUNC);
/*
rc = (jint)webkit_dom_mouse_event_get_meta_key(arg0);
*/
@@ -1253,17 +657,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1meta_1
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1mouse_1event_1get_1meta_1key_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1mouse_1event_1get_1meta_1key_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1mouse_1event_1get_1screen_1x
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1screen_1x)
+#ifndef NO_webkit_1dom_1mouse_1event_1get_1screen_1x
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1dom_1mouse_1event_1get_1screen_1x)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1mouse_1event_1get_1screen_1x_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1mouse_1event_1get_1screen_1x_FUNC);
/*
rc = (jlong)webkit_dom_mouse_event_get_screen_x(arg0);
*/
@@ -1273,17 +677,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1scree
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1mouse_1event_1get_1screen_1x_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1mouse_1event_1get_1screen_1x_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1mouse_1event_1get_1screen_1y
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1screen_1y)
+#ifndef NO_webkit_1dom_1mouse_1event_1get_1screen_1y
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1dom_1mouse_1event_1get_1screen_1y)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1mouse_1event_1get_1screen_1y_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1mouse_1event_1get_1screen_1y_FUNC);
/*
rc = (jlong)webkit_dom_mouse_event_get_screen_y(arg0);
*/
@@ -1293,17 +697,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1scree
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1mouse_1event_1get_1screen_1y_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1mouse_1event_1get_1screen_1y_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1mouse_1event_1get_1shift_1key
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1shift_1key)
+#ifndef NO_webkit_1dom_1mouse_1event_1get_1shift_1key
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1dom_1mouse_1event_1get_1shift_1key)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1mouse_1event_1get_1shift_1key_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1mouse_1event_1get_1shift_1key_FUNC);
/*
rc = (jint)webkit_dom_mouse_event_get_shift_key(arg0);
*/
@@ -1313,17 +717,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1mouse_1event_1get_1shift_
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1mouse_1event_1get_1shift_1key_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1mouse_1event_1get_1shift_1key_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1ui_1event_1get_1char_1code
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1ui_1event_1get_1char_1code)
+#ifndef NO_webkit_1dom_1ui_1event_1get_1char_1code
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1dom_1ui_1event_1get_1char_1code)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1ui_1event_1get_1char_1code_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1ui_1event_1get_1char_1code_FUNC);
/*
rc = (jlong)webkit_dom_ui_event_get_char_code(arg0);
*/
@@ -1333,17 +737,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1ui_1event_1get_1char_1co
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1ui_1event_1get_1char_1code_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1ui_1event_1get_1char_1code_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1ui_1event_1get_1detail
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1ui_1event_1get_1detail)
+#ifndef NO_webkit_1dom_1ui_1event_1get_1detail
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1dom_1ui_1event_1get_1detail)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1ui_1event_1get_1detail_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1ui_1event_1get_1detail_FUNC);
/*
rc = (jlong)webkit_dom_ui_event_get_detail(arg0);
*/
@@ -1353,17 +757,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1ui_1event_1get_1detail)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1ui_1event_1get_1detail_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1ui_1event_1get_1detail_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1dom_1ui_1event_1get_1key_1code
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1ui_1event_1get_1key_1code)
+#ifndef NO_webkit_1dom_1ui_1event_1get_1key_1code
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1dom_1ui_1event_1get_1key_1code)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1dom_1ui_1event_1get_1key_1code_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1dom_1ui_1event_1get_1key_1code_FUNC);
/*
rc = (jlong)webkit_dom_ui_event_get_key_code(arg0);
*/
@@ -1373,16 +777,16 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1dom_1ui_1event_1get_1key_1cod
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1dom_1ui_1event_1get_1key_1code_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1dom_1ui_1event_1get_1key_1code_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1download_1cancel
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1cancel)
+#ifndef NO_webkit_1download_1cancel
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1download_1cancel)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1cancel_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1cancel_FUNC);
/*
webkit_download_cancel(arg0);
*/
@@ -1392,56 +796,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1cancel)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1cancel_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1cancel_FUNC);
}
#endif
-#ifndef NO__1webkit_1download_1get_1current_1size
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1current_1size)
+#ifndef NO_webkit_1download_1get_1received_1data_1length
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1download_1get_1received_1data_1length)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1current_1size_FUNC);
-/*
- rc = (jlong)webkit_download_get_current_size(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_get_current_size)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1current_1size_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1download_1get_1network_1request
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1network_1request)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1network_1request_FUNC);
-/*
- rc = (jlong)webkit_download_get_network_request(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_get_network_request)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1network_1request_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1download_1get_1received_1data_1length
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1received_1data_1length)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1received_1data_1length_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1get_1received_1data_1length_FUNC);
/*
rc = (jlong)webkit_download_get_received_data_length(arg0);
*/
@@ -1451,17 +815,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1received_1data
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1received_1data_1length_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1get_1received_1data_1length_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1download_1get_1request
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1request)
+#ifndef NO_webkit_1download_1get_1request
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1download_1get_1request)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1request_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1get_1request_FUNC);
/*
rc = (jlong)webkit_download_get_request(arg0);
*/
@@ -1471,17 +835,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1request)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1request_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1get_1request_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1download_1get_1response
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1response)
+#ifndef NO_webkit_1download_1get_1response
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1download_1get_1response)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1response_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1get_1response_FUNC);
/*
rc = (jlong)webkit_download_get_response(arg0);
*/
@@ -1491,77 +855,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1response)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1response_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1download_1get_1status
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1status)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1status_FUNC);
-/*
- rc = (jint)webkit_download_get_status(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_get_status)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1status_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1download_1get_1suggested_1filename
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1suggested_1filename)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1suggested_1filename_FUNC);
-/*
- rc = (jlong)webkit_download_get_suggested_filename(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_get_suggested_filename)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1suggested_1filename_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1get_1response_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1download_1get_1total_1size
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1total_1size)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1total_1size_FUNC);
-/*
- rc = (jlong)webkit_download_get_total_size(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_get_total_size)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1total_1size_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1download_1get_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1type)
+#ifndef NO_webkit_1download_1get_1type
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1download_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1type_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1get_1type_FUNC);
/*
rc = (jlong)webkit_download_get_type();
*/
@@ -1571,37 +875,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1type)
rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1type_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1download_1get_1uri
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1uri)
+#ifndef NO_webkit_1download_1get_1web_1view
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1download_1get_1web_1view)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1uri_FUNC);
-/*
- rc = (jlong)webkit_download_get_uri(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_get_uri)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1uri_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1download_1get_1web_1view
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1web_1view)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1web_1view_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1get_1web_1view_FUNC);
/*
rc = (jlong)webkit_download_get_web_view(arg0);
*/
@@ -1611,36 +895,16 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1web_1view)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1web_1view_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1get_1web_1view_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1download_1new
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1new)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1new_FUNC);
-/*
- rc = (jlong)webkit_download_new(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_new)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1download_1set_1allow_1overwrite
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1set_1allow_1overwrite)
+#ifndef NO_webkit_1download_1set_1allow_1overwrite
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1download_1set_1allow_1overwrite)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1set_1allow_1overwrite_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1set_1allow_1overwrite_FUNC);
/*
webkit_download_set_allow_overwrite(arg0, arg1);
*/
@@ -1650,16 +914,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1set_1allow_1overwrit
((void (CALLING_CONVENTION*)(jlong, jboolean))fp)(arg0, arg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1set_1allow_1overwrite_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1set_1allow_1overwrite_FUNC);
}
#endif
-#ifndef NO__1webkit_1download_1set_1destination
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1set_1destination)
+#ifndef NO_webkit_1download_1set_1destination
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1download_1set_1destination)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1set_1destination_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1download_1set_1destination_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
webkit_download_set_destination(arg0, lparg1);
@@ -1672,114 +936,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1set_1destination)
}
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1set_1destination_FUNC);
-}
-#endif
-
-#ifndef NO__1webkit_1download_1set_1destination_1uri
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1set_1destination_1uri)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1set_1destination_1uri_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- webkit_download_set_destination_uri(arg0, lparg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_set_destination_uri)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1set_1destination_1uri_FUNC);
-}
-#endif
-
-#ifndef NO__1webkit_1download_1start
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1start)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1start_FUNC);
-/*
- webkit_download_start(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_download_start)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1start_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1download_1set_1destination_FUNC);
}
#endif
-#ifndef NO__1webkit_1favicon_1database_1set_1path
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1favicon_1database_1set_1path)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1favicon_1database_1set_1path_FUNC);
-/*
- webkit_favicon_database_set_path(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_favicon_database_set_path)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1favicon_1database_1set_1path_FUNC);
-}
-#endif
-
-#ifndef NO__1webkit_1get_1default_1session
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1get_1default_1session)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1get_1default_1session_FUNC);
-/*
- rc = (jlong)webkit_get_default_session();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_get_default_session)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1get_1default_1session_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1get_1favicon_1database
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1get_1favicon_1database)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1get_1favicon_1database_FUNC);
-/*
- rc = (jlong)webkit_get_favicon_database();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_get_favicon_database)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1get_1favicon_1database_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1get_1major_1version
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1get_1major_1version)
+#ifndef NO_webkit_1get_1major_1version
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1get_1major_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1get_1major_1version_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1get_1major_1version_FUNC);
/*
rc = (jint)webkit_get_major_version();
*/
@@ -1789,17 +955,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1get_1major_1version)
rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1get_1major_1version_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1get_1major_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1get_1micro_1version
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1get_1micro_1version)
+#ifndef NO_webkit_1get_1micro_1version
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1get_1micro_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1get_1micro_1version_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1get_1micro_1version_FUNC);
/*
rc = (jint)webkit_get_micro_version();
*/
@@ -1809,17 +975,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1get_1micro_1version)
rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1get_1micro_1version_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1get_1micro_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1get_1minor_1version
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1get_1minor_1version)
+#ifndef NO_webkit_1get_1minor_1version
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1get_1minor_1version)
(JNIEnv *env, jclass that)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1get_1minor_1version_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1get_1minor_1version_FUNC);
/*
rc = (jint)webkit_get_minor_version();
*/
@@ -1829,17 +995,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1get_1minor_1version)
rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1get_1minor_1version_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1get_1minor_1version_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1hit_1test_1result_1context_1is_1link
-JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(_1webkit_1hit_1test_1result_1context_1is_1link)
+#ifndef NO_webkit_1hit_1test_1result_1context_1is_1link
+JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(webkit_1hit_1test_1result_1context_1is_1link)
(JNIEnv *env, jclass that, jlong arg0)
{
jboolean rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1hit_1test_1result_1context_1is_1link_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1hit_1test_1result_1context_1is_1link_FUNC);
/*
rc = (jboolean)webkit_hit_test_result_context_is_link(arg0);
*/
@@ -1849,17 +1015,17 @@ JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(_1webkit_1hit_1test_1result_1context
rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1hit_1test_1result_1context_1is_1link_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1hit_1test_1result_1context_1is_1link_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1hit_1test_1result_1get_1link_1title
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1hit_1test_1result_1get_1link_1title)
+#ifndef NO_webkit_1hit_1test_1result_1get_1link_1title
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1hit_1test_1result_1get_1link_1title)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1hit_1test_1result_1get_1link_1title_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1hit_1test_1result_1get_1link_1title_FUNC);
/*
rc = (jlong)webkit_hit_test_result_get_link_title(arg0);
*/
@@ -1869,17 +1035,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1hit_1test_1result_1get_1link_
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1hit_1test_1result_1get_1link_1title_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1hit_1test_1result_1get_1link_1title_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1hit_1test_1result_1get_1link_1uri
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1hit_1test_1result_1get_1link_1uri)
+#ifndef NO_webkit_1hit_1test_1result_1get_1link_1uri
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1hit_1test_1result_1get_1link_1uri)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1hit_1test_1result_1get_1link_1uri_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1hit_1test_1result_1get_1link_1uri_FUNC);
/*
rc = (jlong)webkit_hit_test_result_get_link_uri(arg0);
*/
@@ -1889,17 +1055,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1hit_1test_1result_1get_1link_
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1hit_1test_1result_1get_1link_1uri_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1hit_1test_1result_1get_1link_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1javascript_1result_1get_1global_1context
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1javascript_1result_1get_1global_1context)
+#ifndef NO_webkit_1javascript_1result_1get_1global_1context
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1javascript_1result_1get_1global_1context)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1javascript_1result_1get_1global_1context_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1javascript_1result_1get_1global_1context_FUNC);
/*
rc = (jlong)webkit_javascript_result_get_global_context((gpointer)arg0);
*/
@@ -1909,17 +1075,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1javascript_1result_1get_1glob
rc = (jlong)((jlong (CALLING_CONVENTION*)(gpointer))fp)((gpointer)arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1javascript_1result_1get_1global_1context_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1javascript_1result_1get_1global_1context_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1javascript_1result_1get_1value
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1javascript_1result_1get_1value)
+#ifndef NO_webkit_1javascript_1result_1get_1value
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1javascript_1result_1get_1value)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1javascript_1result_1get_1value_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1javascript_1result_1get_1value_FUNC);
/*
rc = (jlong)webkit_javascript_result_get_value((gpointer)arg0);
*/
@@ -1929,16 +1095,16 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1javascript_1result_1get_1valu
rc = (jlong)((jlong (CALLING_CONVENTION*)(gpointer))fp)((gpointer)arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1javascript_1result_1get_1value_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1javascript_1result_1get_1value_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1javascript_1result_1unref
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1javascript_1result_1unref)
+#ifndef NO_webkit_1javascript_1result_1unref
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1javascript_1result_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1javascript_1result_1unref_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1javascript_1result_1unref_FUNC);
/*
webkit_javascript_result_unref(arg0);
*/
@@ -1948,76 +1114,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1javascript_1result_1unref)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1javascript_1result_1unref_FUNC);
-}
-#endif
-
-#ifndef NO__1webkit_1major_1version
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1major_1version)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1major_1version_FUNC);
-/*
- rc = (jint)webkit_major_version();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_major_version)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1major_1version_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1micro_1version
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1micro_1version)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1micro_1version_FUNC);
-/*
- rc = (jint)webkit_micro_version();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_micro_version)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1micro_1version_FUNC);
- return rc;
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1javascript_1result_1unref_FUNC);
}
#endif
-#ifndef NO__1webkit_1minor_1version
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1minor_1version)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1minor_1version_FUNC);
-/*
- rc = (jint)webkit_minor_version();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_minor_version)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1minor_1version_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1navigation_1policy_1decision_1get_1request
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1navigation_1policy_1decision_1get_1request)
+#ifndef NO_webkit_1navigation_1policy_1decision_1get_1request
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1navigation_1policy_1decision_1get_1request)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1navigation_1policy_1decision_1get_1request_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1navigation_1policy_1decision_1get_1request_FUNC);
/*
rc = (jlong)webkit_navigation_policy_decision_get_request(arg0);
*/
@@ -2027,80 +1133,16 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1navigation_1policy_1decision_
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1navigation_1policy_1decision_1get_1request_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1network_1request_1get_1message
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1network_1request_1get_1message)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1network_1request_1get_1message_FUNC);
-/*
- rc = (jlong)webkit_network_request_get_message(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_network_request_get_message)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1network_1request_1get_1message_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1network_1request_1get_1uri
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1network_1request_1get_1uri)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1network_1request_1get_1uri_FUNC);
-/*
- rc = (jlong)webkit_network_request_get_uri(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_network_request_get_uri)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1network_1request_1get_1uri_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1network_1request_1new
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1network_1request_1new)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1network_1request_1new_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
- rc = (jlong)webkit_network_request_new(lparg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_network_request_new)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
- }
- }
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1network_1request_1new_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1navigation_1policy_1decision_1get_1request_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1policy_1decision_1download
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1policy_1decision_1download)
+#ifndef NO_webkit_1policy_1decision_1download
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1policy_1decision_1download)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1policy_1decision_1download_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1policy_1decision_1download_FUNC);
/*
webkit_policy_decision_download(arg0);
*/
@@ -2110,15 +1152,15 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1policy_1decision_1download)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1policy_1decision_1download_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1policy_1decision_1download_FUNC);
}
#endif
-#ifndef NO__1webkit_1policy_1decision_1ignore
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1policy_1decision_1ignore)
+#ifndef NO_webkit_1policy_1decision_1ignore
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1policy_1decision_1ignore)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1policy_1decision_1ignore_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1policy_1decision_1ignore_FUNC);
/*
webkit_policy_decision_ignore(arg0);
*/
@@ -2128,16 +1170,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1policy_1decision_1ignore)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1policy_1decision_1ignore_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1policy_1decision_1ignore_FUNC);
}
#endif
-#ifndef NO__1webkit_1response_1policy_1decision_1get_1request
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1response_1policy_1decision_1get_1request)
+#ifndef NO_webkit_1response_1policy_1decision_1get_1request
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1response_1policy_1decision_1get_1request)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1response_1policy_1decision_1get_1request_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1response_1policy_1decision_1get_1request_FUNC);
/*
rc = (jlong)webkit_response_policy_decision_get_request(arg0);
*/
@@ -2147,17 +1189,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1response_1policy_1decision_1g
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1response_1policy_1decision_1get_1request_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1response_1policy_1decision_1get_1request_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1response_1policy_1decision_1get_1response
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1response_1policy_1decision_1get_1response)
+#ifndef NO_webkit_1response_1policy_1decision_1get_1response
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1response_1policy_1decision_1get_1response)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1response_1policy_1decision_1get_1response_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1response_1policy_1decision_1get_1response_FUNC);
/*
rc = (jlong)webkit_response_policy_decision_get_response(arg0);
*/
@@ -2167,37 +1209,39 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1response_1policy_1decision_1g
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1response_1policy_1decision_1get_1response_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1response_1policy_1decision_1get_1response_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1soup_1auth_1dialog_1get_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1soup_1auth_1dialog_1get_1type)
- (JNIEnv *env, jclass that)
+#ifndef NO_webkit_1security_1manager_1register_1uri_1scheme_1as_1secure
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1security_1manager_1register_1uri_1scheme_1as_1secure)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1soup_1auth_1dialog_1get_1type_FUNC);
+ jbyte *lparg1=NULL;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1security_1manager_1register_1uri_1scheme_1as_1secure_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- rc = (jlong)webkit_soup_auth_dialog_get_type();
+ webkit_security_manager_register_uri_scheme_as_secure(arg0, lparg1);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_soup_auth_dialog_get_type)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_security_manager_register_uri_scheme_as_secure)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
+ ((void (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1soup_1auth_1dialog_1get_1type_FUNC);
- return rc;
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1security_1manager_1register_1uri_1scheme_1as_1secure_FUNC);
}
#endif
-#ifndef NO__1webkit_1uri_1request_1get_1http_1headers
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1request_1get_1http_1headers)
+#ifndef NO_webkit_1uri_1request_1get_1http_1headers
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1uri_1request_1get_1http_1headers)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1uri_1request_1get_1http_1headers_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1request_1get_1http_1headers_FUNC);
/*
rc = (jlong)webkit_uri_request_get_http_headers(arg0);
*/
@@ -2207,17 +1251,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1request_1get_1http_1head
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1uri_1request_1get_1http_1headers_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1request_1get_1http_1headers_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1uri_1request_1get_1uri
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1request_1get_1uri)
+#ifndef NO_webkit_1uri_1request_1get_1uri
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1uri_1request_1get_1uri)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1uri_1request_1get_1uri_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1request_1get_1uri_FUNC);
/*
rc = (jlong)webkit_uri_request_get_uri(arg0);
*/
@@ -2227,18 +1271,18 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1request_1get_1uri)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1uri_1request_1get_1uri_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1request_1get_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1uri_1request_1new
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1request_1new)
+#ifndef NO_webkit_1uri_1request_1new
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1uri_1request_1new)
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1uri_1request_1new_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1request_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
/*
rc = (jlong)webkit_uri_request_new(lparg0);
@@ -2251,17 +1295,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1request_1new)
}
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1uri_1request_1new_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1request_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1uri_1response_1get_1content_1length
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1response_1get_1content_1length)
+#ifndef NO_webkit_1uri_1response_1get_1content_1length
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1uri_1response_1get_1content_1length)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1uri_1response_1get_1content_1length_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1response_1get_1content_1length_FUNC);
/*
rc = (jlong)webkit_uri_response_get_content_length(arg0);
*/
@@ -2271,17 +1315,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1response_1get_1content_1
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1uri_1response_1get_1content_1length_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1response_1get_1content_1length_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1uri_1response_1get_1mime_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1response_1get_1mime_1type)
+#ifndef NO_webkit_1uri_1response_1get_1mime_1type
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1uri_1response_1get_1mime_1type)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1uri_1response_1get_1mime_1type_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1response_1get_1mime_1type_FUNC);
/*
rc = (jlong)webkit_uri_response_get_mime_type(arg0);
*/
@@ -2291,394 +1335,322 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1uri_1response_1get_1mime_1typ
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1uri_1response_1get_1mime_1type_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1response_1get_1mime_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1context_1allow_1tls_1certificate_1for_1host
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1context_1allow_1tls_1certificate_1for_1host)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2)
+#ifndef NO_webkit_1uri_1scheme_1request_1finish
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1uri_1scheme_1request_1finish)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jbyteArray arg3)
{
- jbyte *lparg2=NULL;
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1context_1allow_1tls_1certificate_1for_1host_FUNC);
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ jbyte *lparg3=NULL;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1scheme_1request_1finish_FUNC);
+ if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
/*
- rc = (jlong)webkit_web_context_allow_tls_certificate_for_host(arg0, arg1, lparg2);
+ webkit_uri_scheme_request_finish(arg0, arg1, arg2, lparg3);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_allow_tls_certificate_for_host)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_uri_scheme_request_finish)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jbyte *))fp)(arg0, arg1, lparg2);
+ ((void (CALLING_CONVENTION*)(jlong, jlong, jlong, jbyte *))fp)(arg0, arg1, arg2, lparg3);
}
}
fail:
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1context_1allow_1tls_1certificate_1for_1host_FUNC);
- return rc;
+ if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, JNI_ABORT);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1scheme_1request_1finish_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1context_1get_1default
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1context_1get_1default)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1context_1get_1default_FUNC);
-/*
- rc = (jlong)webkit_web_context_get_default();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_default)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1context_1get_1default_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1web_1context_1get_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1context_1get_1type)
- (JNIEnv *env, jclass that)
+#ifndef NO_webkit_1uri_1scheme_1request_1get_1uri
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1uri_1scheme_1request_1get_1uri)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1context_1get_1type_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1scheme_1request_1get_1uri_FUNC);
/*
- rc = (jlong)webkit_web_context_get_type();
+ rc = (jlong)webkit_uri_scheme_request_get_uri(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_type)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_uri_scheme_request_get_uri)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1context_1get_1type_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1scheme_1request_1get_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1context_1get_1website_1data_1manager
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1context_1get_1website_1data_1manager)
+#ifndef NO_webkit_1uri_1scheme_1request_1get_1web_1view
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1uri_1scheme_1request_1get_1web_1view)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1context_1get_1website_1data_1manager_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1uri_1scheme_1request_1get_1web_1view_FUNC);
/*
- rc = (jlong)webkit_web_context_get_website_data_manager(arg0);
+ rc = (jlong)webkit_uri_scheme_request_get_web_view(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_website_data_manager)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_uri_scheme_request_get_web_view)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1context_1get_1website_1data_1manager_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1uri_1scheme_1request_1get_1web_1view_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1context_1set_1tls_1errors_1policy
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1context_1set_1tls_1errors_1policy)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1context_1set_1tls_1errors_1policy_FUNC);
-/*
- webkit_web_context_set_tls_errors_policy(arg0, arg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_set_tls_errors_policy)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1context_1set_1tls_1errors_1policy_FUNC);
-}
-#endif
-
-#ifndef NO__1webkit_1web_1context_1set_1web_1extensions_1directory
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1context_1set_1web_1extensions_1directory)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1context_1set_1web_1extensions_1directory_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- webkit_web_context_set_web_extensions_directory(arg0, lparg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_set_web_extensions_directory)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1context_1set_1web_1extensions_1directory_FUNC);
-}
-#endif
-
-#ifndef NO__1webkit_1web_1context_1set_1web_1extensions_1initialization_1user_1data
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1context_1set_1web_1extensions_1initialization_1user_1data)
+#ifndef NO_webkit_1user_1content_1manager_1add_1script
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1user_1content_1manager_1add_1script)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1context_1set_1web_1extensions_1initialization_1user_1data_FUNC);
+ jlong rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1user_1content_1manager_1add_1script_FUNC);
/*
- webkit_web_context_set_web_extensions_initialization_user_data(arg0, arg1);
+ rc = (jlong)webkit_user_content_manager_add_script(arg0, arg1);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_set_web_extensions_initialization_user_data)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_user_content_manager_add_script)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1context_1set_1web_1extensions_1initialization_1user_1data_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1user_1content_1manager_1add_1script_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1webkit_1web_1data_1source_1get_1data
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1data_1source_1get_1data)
+#ifndef NO_webkit_1user_1content_1manager_1remove_1all_1scripts
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1user_1content_1manager_1remove_1all_1scripts)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1data_1source_1get_1data_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1user_1content_1manager_1remove_1all_1scripts_FUNC);
/*
- rc = (jlong)webkit_web_data_source_get_data(arg0);
+ webkit_user_content_manager_remove_all_scripts(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_data_source_get_data)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_user_content_manager_remove_all_scripts)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1data_1source_1get_1data_FUNC);
- return rc;
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1user_1content_1manager_1remove_1all_1scripts_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1data_1source_1get_1encoding
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1data_1source_1get_1encoding)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_webkit_1user_1script_1new
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1user_1script_1new)
+ (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jint arg2, jlong arg3, jlong arg4)
{
+ jbyte *lparg0=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1data_1source_1get_1encoding_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1user_1script_1new_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
/*
- rc = (jlong)webkit_web_data_source_get_encoding(arg0);
+ rc = (jlong)webkit_user_script_new(lparg0, arg1, arg2, arg3, arg4);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_data_source_get_encoding)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_user_script_new)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jbyte *, jint, jint, jlong, jlong))fp)(lparg0, arg1, arg2, arg3, arg4);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1data_1source_1get_1encoding_FUNC);
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1user_1script_1new_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1frame_1get_1data_1source
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1data_1source)
+#ifndef NO_webkit_1user_1script_1unref
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1user_1script_1unref)
(JNIEnv *env, jclass that, jlong arg0)
{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1data_1source_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1user_1script_1unref_FUNC);
/*
- rc = (jlong)webkit_web_frame_get_data_source(arg0);
+ webkit_user_script_unref(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_data_source)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_user_script_unref)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1data_1source_FUNC);
- return rc;
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1user_1script_1unref_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1frame_1get_1global_1context
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1global_1context)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_webkit_1web_1context_1allow_1tls_1certificate_1for_1host
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1allow_1tls_1certificate_1for_1host)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2)
{
+ jbyte *lparg2=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1global_1context_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1allow_1tls_1certificate_1for_1host_FUNC);
+ if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
- rc = (jlong)webkit_web_frame_get_global_context(arg0);
+ rc = (jlong)webkit_web_context_allow_tls_certificate_for_host(arg0, arg1, lparg2);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_global_context)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_allow_tls_certificate_for_host)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, jlong, jbyte *))fp)(arg0, arg1, lparg2);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1global_1context_FUNC);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1allow_1tls_1certificate_1for_1host_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1frame_1get_1load_1status
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1load_1status)
+#ifndef NO_webkit_1web_1context_1get_1cookie_1manager
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1cookie_1manager)
(JNIEnv *env, jclass that, jlong arg0)
{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1load_1status_FUNC);
+ jlong rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1get_1cookie_1manager_FUNC);
/*
- rc = (jint)webkit_web_frame_get_load_status(arg0);
+ rc = (jlong)webkit_web_context_get_cookie_manager(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_load_status)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_cookie_manager)
if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1load_1status_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1get_1cookie_1manager_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1frame_1get_1parent
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1parent)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_webkit_1web_1context_1get_1default
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1default)
+ (JNIEnv *env, jclass that)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1parent_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1get_1default_FUNC);
/*
- rc = (jlong)webkit_web_frame_get_parent(arg0);
+ rc = (jlong)webkit_web_context_get_default();
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_parent)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_default)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1parent_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1get_1default_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1frame_1get_1title
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1title)
+#ifndef NO_webkit_1web_1context_1get_1security_1manager
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1security_1manager)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1title_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1get_1security_1manager_FUNC);
/*
- rc = (jlong)webkit_web_frame_get_title(arg0);
+ rc = (jlong)webkit_web_context_get_security_manager(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_title)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_security_manager)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1title_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1get_1security_1manager_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1frame_1get_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1type)
+#ifndef NO_webkit_1web_1context_1get_1type
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1type)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1type_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1get_1type_FUNC);
/*
- rc = (jlong)webkit_web_frame_get_type();
+ rc = (jlong)webkit_web_context_get_type();
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_type)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_type)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1type_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1web_1frame_1get_1uri
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1uri)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1uri_FUNC);
-/*
- rc = (jlong)webkit_web_frame_get_uri(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_uri)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1uri_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1get_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1frame_1get_1web_1view
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1web_1view)
+#ifndef NO_webkit_1web_1context_1get_1website_1data_1manager
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1get_1website_1data_1manager)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1web_1view_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1get_1website_1data_1manager_FUNC);
/*
- rc = (jlong)webkit_web_frame_get_web_view(arg0);
+ rc = (jlong)webkit_web_context_get_website_data_manager(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_frame_get_web_view)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_get_website_data_manager)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1web_1view_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1get_1website_1data_1manager_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1policy_1decision_1download
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1policy_1decision_1download)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_webkit_1web_1context_1register_1uri_1scheme
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1register_1uri_1scheme)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlong arg3, jlong arg4)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1policy_1decision_1download_FUNC);
+ jbyte *lparg1=NULL;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1register_1uri_1scheme_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
- webkit_web_policy_decision_download(arg0);
+ webkit_web_context_register_uri_scheme(arg0, lparg1, arg2, arg3, arg4);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_policy_decision_download)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_register_uri_scheme)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ ((void (CALLING_CONVENTION*)(jlong, jbyte *, jlong, jlong, jlong))fp)(arg0, lparg1, arg2, arg3, arg4);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1policy_1decision_1download_FUNC);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1register_1uri_1scheme_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1policy_1decision_1ignore
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1policy_1decision_1ignore)
- (JNIEnv *env, jclass that, jlong arg0)
+#ifndef NO_webkit_1web_1context_1set_1tls_1errors_1policy
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1context_1set_1tls_1errors_1policy)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1policy_1decision_1ignore_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1context_1set_1tls_1errors_1policy_FUNC);
/*
- webkit_web_policy_decision_ignore(arg0);
+ webkit_web_context_set_tls_errors_policy(arg0, arg1);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_policy_decision_ignore)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_context_set_tls_errors_policy)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
+ ((void (CALLING_CONVENTION*)(jlong, jint))fp)(arg0, arg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1policy_1decision_1ignore_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1context_1set_1tls_1errors_1policy_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1resource_1get_1data
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1resource_1get_1data)
+#ifndef NO_webkit_1web_1resource_1get_1data
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1resource_1get_1data)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1resource_1get_1data_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1resource_1get_1data_FUNC);
/*
webkit_web_resource_get_data(arg0, arg1, arg2, arg3);
*/
@@ -2688,18 +1660,18 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1resource_1get_1data)
((void (CALLING_CONVENTION*)(jlong, jlong, jlong, jlong))fp)(arg0, arg1, arg2, arg3);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1resource_1get_1data_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1resource_1get_1data_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1resource_1get_1data_1finish
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1resource_1get_1data_1finish)
+#ifndef NO_webkit_1web_1resource_1get_1data_1finish
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1resource_1get_1data_1finish)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2, jlongArray arg3)
{
jlong *lparg2=NULL;
jlong *lparg3=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1resource_1get_1data_1finish_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1resource_1get_1data_1finish_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
/*
@@ -2714,17 +1686,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1resource_1get_1data_1fin
fail:
if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1resource_1get_1data_1finish_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1resource_1get_1data_1finish_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1can_1go_1back
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1go_1back)
+#ifndef NO_webkit_1web_1view_1can_1go_1back
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1can_1go_1back)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1can_1go_1back_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1can_1go_1back_FUNC);
/*
rc = (jint)webkit_web_view_can_go_back(arg0);
*/
@@ -2734,17 +1706,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1go_1back)
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1can_1go_1back_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1can_1go_1back_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1can_1go_1forward
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1go_1forward)
+#ifndef NO_webkit_1web_1view_1can_1go_1forward
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1can_1go_1forward)
(JNIEnv *env, jclass that, jlong arg0)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1can_1go_1forward_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1can_1go_1forward_FUNC);
/*
rc = (jint)webkit_web_view_can_go_forward(arg0);
*/
@@ -2754,17 +1726,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1go_1forward)
rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1can_1go_1forward_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1can_1go_1forward_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1can_1show_1mime_1type
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1show_1mime_1type)
+#ifndef NO_webkit_1web_1view_1can_1show_1mime_1type
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1can_1show_1mime_1type)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1can_1show_1mime_1type_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1can_1show_1mime_1type_FUNC);
/*
rc = (jint)webkit_web_view_can_show_mime_type(arg0, arg1);
*/
@@ -2774,39 +1746,17 @@ JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1show_1mime_1ty
rc = (jint)((jint (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1can_1show_1mime_1type_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1can_1show_1mime_1type_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1execute_1script
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1execute_1script)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1execute_1script_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- webkit_web_view_execute_script(arg0, lparg1);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_execute_script)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1execute_1script_FUNC);
-}
-#endif
-
-#ifndef NO__1webkit_1web_1view_1get_1context
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1context)
+#ifndef NO_webkit_1web_1view_1get_1context
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1context)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1context_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1context_FUNC);
/*
rc = (jlong)webkit_web_view_get_context(arg0);
*/
@@ -2816,37 +1766,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1context)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1context_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1context_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1dom_1document
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1dom_1document)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1dom_1document_FUNC);
-/*
- rc = (jlong)webkit_web_view_get_dom_document(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_dom_document)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1dom_1document_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1web_1view_1get_1estimated_1load_1progress
-JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1estimated_1load_1progress)
+#ifndef NO_webkit_1web_1view_1get_1estimated_1load_1progress
+JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1estimated_1load_1progress)
(JNIEnv *env, jclass that, jlong arg0)
{
jdouble rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1estimated_1load_1progress_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1estimated_1load_1progress_FUNC);
/*
rc = (jdouble)webkit_web_view_get_estimated_load_progress(arg0);
*/
@@ -2856,57 +1786,17 @@ JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1estimated_1
rc = (jdouble)((jdouble (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1estimated_1load_1progress_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1web_1view_1get_1load_1status
-JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1load_1status)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jint rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1load_1status_FUNC);
-/*
- rc = (jint)webkit_web_view_get_load_status(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_load_status)
- if (fp) {
- rc = (jint)((jint (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1load_1status_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1estimated_1load_1progress_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1main_1frame
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1main_1frame)
+#ifndef NO_webkit_1web_1view_1get_1main_1resource
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1main_1resource)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1main_1frame_FUNC);
-/*
- rc = (jlong)webkit_web_view_get_main_frame(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_main_frame)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1main_1frame_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1web_1view_1get_1main_1resource
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1main_1resource)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1main_1resource_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1main_1resource_FUNC);
/*
rc = (jlong)webkit_web_view_get_main_resource(arg0);
*/
@@ -2916,17 +1806,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1main_1resourc
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1main_1resource_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1main_1resource_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1page_1id
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1page_1id)
+#ifndef NO_webkit_1web_1view_1get_1page_1id
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1page_1id)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1page_1id_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1page_1id_FUNC);
/*
rc = (jlong)webkit_web_view_get_page_id(arg0);
*/
@@ -2936,37 +1826,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1page_1id)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1page_1id_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1web_1view_1get_1progress
-JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1progress)
- (JNIEnv *env, jclass that, jlong arg0)
-{
- jdouble rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1progress_FUNC);
-/*
- rc = (jdouble)webkit_web_view_get_progress(arg0);
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_progress)
- if (fp) {
- rc = (jdouble)((jdouble (CALLING_CONVENTION*)(jlong))fp)(arg0);
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1progress_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1page_1id_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1settings
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1settings)
+#ifndef NO_webkit_1web_1view_1get_1settings
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1settings)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1settings_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1settings_FUNC);
/*
rc = (jlong)webkit_web_view_get_settings(arg0);
*/
@@ -2976,17 +1846,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1settings)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1settings_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1settings_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1title
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1title)
+#ifndef NO_webkit_1web_1view_1get_1title
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1title)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1title_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1title_FUNC);
/*
rc = (jlong)webkit_web_view_get_title(arg0);
*/
@@ -2996,37 +1866,17 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1title)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1title_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1title_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1type
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1type)
- (JNIEnv *env, jclass that)
-{
- jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1type_FUNC);
-/*
- rc = (jlong)webkit_web_view_get_type();
-*/
- {
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_type)
- if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
- }
- }
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1type_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1webkit_1web_1view_1get_1uri
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1uri)
+#ifndef NO_webkit_1web_1view_1get_1uri
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1uri)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1uri_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1uri_FUNC);
/*
rc = (jlong)webkit_web_view_get_uri(arg0);
*/
@@ -3036,37 +1886,37 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1uri)
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1uri_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1uri_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1window_1features
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1window_1features)
+#ifndef NO_webkit_1web_1view_1get_1user_1content_1manager
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1user_1content_1manager)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1window_1features_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1user_1content_1manager_FUNC);
/*
- rc = (jlong)webkit_web_view_get_window_features(arg0);
+ rc = (jlong)webkit_web_view_get_user_content_manager(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_window_features)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_user_content_manager)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1window_1features_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1user_1content_1manager_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1get_1window_1properties
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1window_1properties)
+#ifndef NO_webkit_1web_1view_1get_1window_1properties
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1window_1properties)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1window_1properties_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1window_1properties_FUNC);
/*
rc = (jlong)webkit_web_view_get_window_properties(arg0);
*/
@@ -3076,16 +1926,16 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1window_1prope
rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1window_1properties_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1window_1properties_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1go_1back
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1go_1back)
+#ifndef NO_webkit_1web_1view_1go_1back
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1go_1back)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1go_1back_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1go_1back_FUNC);
/*
webkit_web_view_go_back(arg0);
*/
@@ -3095,15 +1945,15 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1go_1back)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1go_1back_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1go_1back_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1go_1forward
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1go_1forward)
+#ifndef NO_webkit_1web_1view_1go_1forward
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1go_1forward)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1go_1forward_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1go_1forward_FUNC);
/*
webkit_web_view_go_forward(arg0);
*/
@@ -3113,18 +1963,18 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1go_1forward)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1go_1forward_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1go_1forward_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1load_1bytes
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1bytes)
+#ifndef NO_webkit_1web_1view_1load_1bytes
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1load_1bytes)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jbyteArray arg2, jbyteArray arg3, jbyteArray arg4)
{
jbyte *lparg2=NULL;
jbyte *lparg3=NULL;
jbyte *lparg4=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1load_1bytes_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1load_1bytes_FUNC);
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
@@ -3141,17 +1991,17 @@ fail:
if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1load_1bytes_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1load_1bytes_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1load_1html
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1html)
+#ifndef NO_webkit_1web_1view_1load_1html
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1load_1html)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2)
{
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1load_1html_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1load_1html_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
@@ -3166,15 +2016,15 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1html)
fail:
if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1load_1html_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1load_1html_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1load_1request
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1request)
+#ifndef NO_webkit_1web_1view_1load_1request
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1load_1request)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1load_1request_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1load_1request_FUNC);
/*
webkit_web_view_load_request(arg0, arg1);
*/
@@ -3184,88 +2034,77 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1request)
((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1load_1request_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1load_1request_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1load_1string
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1string)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jbyteArray arg2, jbyteArray arg3, jbyteArray arg4)
+#ifndef NO_webkit_1web_1view_1load_1uri
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1load_1uri)
+ (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
- jbyte *lparg2=NULL;
- jbyte *lparg3=NULL;
- jbyte *lparg4=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1load_1string_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1load_1uri_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
- if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
/*
- webkit_web_view_load_string(arg0, lparg1, lparg2, lparg3, lparg4);
+ webkit_web_view_load_uri(arg0, lparg1);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_load_string)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_load_uri)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jbyte *, jbyte *, jbyte *, jbyte *))fp)(arg0, lparg1, lparg2, lparg3, lparg4);
+ ((void (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
}
}
fail:
- if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
- if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
- if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1load_1string_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1load_1uri_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1load_1uri
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1uri)
- (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
+#ifndef NO_webkit_1web_1view_1new
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1new)
+ (JNIEnv *env, jclass that)
{
- jbyte *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1load_1uri_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ jlong rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1new_FUNC);
/*
- webkit_web_view_load_uri(arg0, lparg1);
+ rc = (jlong)webkit_web_view_new();
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_load_uri)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_new)
if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jbyte *))fp)(arg0, lparg1);
+ rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
}
}
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1load_1uri_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1new_FUNC);
+ return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1new
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1new)
- (JNIEnv *env, jclass that)
+#ifndef NO_webkit_1web_1view_1new_1with_1related_1view
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1new_1with_1related_1view)
+ (JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1new_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1new_1with_1related_1view_FUNC);
/*
- rc = (jlong)webkit_web_view_new();
+ rc = (jlong)webkit_web_view_new_with_related_view(arg0);
*/
{
- WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_new)
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_new_with_related_view)
if (fp) {
- rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)();
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1new_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1new_1with_1related_1view_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1reload
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1reload)
+#ifndef NO_webkit_1web_1view_1reload
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1reload)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1reload_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1reload_FUNC);
/*
webkit_web_view_reload(arg0);
*/
@@ -3275,16 +2114,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1reload)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1reload_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1reload_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1run_1javascript
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1run_1javascript)
+#ifndef NO_webkit_1web_1view_1run_1javascript
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1run_1javascript)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2, jlong arg3, jlong arg4)
{
jbyte *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1run_1javascript_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1run_1javascript_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
/*
webkit_web_view_run_javascript(arg0, lparg1, arg2, arg3, arg4);
@@ -3297,17 +2136,17 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1run_1javascript)
}
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1run_1javascript_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1run_1javascript_FUNC);
}
#endif
-#ifndef NO__1webkit_1web_1view_1run_1javascript_1finish
-JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1run_1javascript_1finish)
+#ifndef NO_webkit_1web_1view_1run_1javascript_1finish
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1run_1javascript_1finish)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
jlong *lparg2=NULL;
jlong rc = 0;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1run_1javascript_1finish_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1run_1javascript_1finish_FUNC);
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
/*
rc = (jlong)webkit_web_view_run_javascript_finish(arg0, arg1, (GError **)lparg2);
@@ -3320,16 +2159,16 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1run_1javascript_1f
}
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1run_1javascript_1finish_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1run_1javascript_1finish_FUNC);
return rc;
}
#endif
-#ifndef NO__1webkit_1web_1view_1stop_1loading
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1stop_1loading)
+#ifndef NO_webkit_1web_1view_1stop_1loading
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1stop_1loading)
(JNIEnv *env, jclass that, jlong arg0)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1stop_1loading_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1stop_1loading_FUNC);
/*
webkit_web_view_stop_loading(arg0);
*/
@@ -3339,15 +2178,15 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1stop_1loading)
((void (CALLING_CONVENTION*)(jlong))fp)(arg0);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1stop_1loading_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1stop_1loading_FUNC);
}
#endif
-#ifndef NO__1webkit_1website_1data_1manager_1clear
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1website_1data_1manager_1clear)
+#ifndef NO_webkit_1website_1data_1manager_1clear
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1website_1data_1manager_1clear)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jlong arg5)
{
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1website_1data_1manager_1clear_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1website_1data_1manager_1clear_FUNC);
/*
webkit_website_data_manager_clear(arg0, arg1, arg2, arg3, arg4, arg5);
*/
@@ -3357,16 +2196,16 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1website_1data_1manager_1clear)
((void (CALLING_CONVENTION*)(jlong, jlong, jlong, jlong, jlong, jlong))fp)(arg0, arg1, arg2, arg3, arg4, arg5);
}
}
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1website_1data_1manager_1clear_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1website_1data_1manager_1clear_FUNC);
}
#endif
-#ifndef NO__1webkit_1window_1properties_1get_1geometry
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1window_1properties_1get_1geometry)
+#ifndef NO_webkit_1window_1properties_1get_1geometry
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1window_1properties_1get_1geometry)
(JNIEnv *env, jclass that, jlong arg0, jobject arg1)
{
GdkRectangle _arg1, *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1window_1properties_1get_1geometry_FUNC);
+ WebKitGTK_NATIVE_ENTER(env, that, webkit_1window_1properties_1get_1geometry_FUNC);
if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
/*
webkit_window_properties_get_geometry(arg0, (GdkRectangle *)lparg1);
@@ -3379,20 +2218,7 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1window_1properties_1get_1geome
}
fail:
if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
- WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1window_1properties_1get_1geometry_FUNC);
-}
-#endif
-
-#ifndef NO_memmove
-JNIEXPORT void JNICALL WebKitGTK_NATIVE(memmove)
- (JNIEnv *env, jclass that, jlong arg0, jobject arg1, jlong arg2)
-{
- JSClassDefinition _arg1, *lparg1=NULL;
- WebKitGTK_NATIVE_ENTER(env, that, memmove_FUNC);
- if (arg1) if ((lparg1 = getJSClassDefinitionFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- WebKitGTK_NATIVE_EXIT(env, that, memmove_FUNC);
+ WebKitGTK_NATIVE_EXIT(env, that, webkit_1window_1properties_1get_1geometry_FUNC);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h
index 6c0388b6a9..49d6b9d6ac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h
@@ -26,11 +26,11 @@
// For JNI bindings in webkitgtk.c to properly link to custom functions:
#include "webkitgtk_custom.h"
-#include "swt.h" // for jintlong used by custom struct below.
+#include "swt.h"
/**
* Conceptually the macro does:
- * void *fp = dlsym(<libwebkit(3|4).so>, "name"); // Note, name is auto-wrapped into string literal.
+ * void *fp = dlsym(<libwebkit2gtk-4.0.so>, "name"); // Note, name is auto-wrapped into string literal.
*
* I.e, it declares and loads the function pointer from currently loaded webkitlib.
* Preformance note: If webkit lib is already loaded, then it's not re-loaded.
@@ -41,15 +41,7 @@
static void *var = NULL; \
if (!initialized) { \
void* handle = 0; \
- char *webkit2 = getenv("SWT_WEBKIT2"); \
- if (webkit2 != NULL && strcmp(webkit2, "0") == 0) { \
- handle = dlopen("libwebkitgtk-3.0.so.0", LOAD_FLAGS); /* webkitgtk >= 3.x lib */ \
- } else { \
- handle = dlopen("libwebkit2gtk-4.0.so.37", LOAD_FLAGS); /* webkit2 */ \
- if (!handle) { \
- handle = dlopen("libwebkitgtk-3.0.so.0", LOAD_FLAGS); /* webkitgtk 3.x as machine doesn't have webkit2gtk */ \
- } \
- } \
+ handle = dlopen("libwebkit2gtk-4.0.so.37", LOAD_FLAGS); /* webkit2 */ \
if (handle) { \
var = dlsym(handle, #name); \
} \
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.c
index 7a6ad5c1e4..966465ecb5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.c
@@ -17,7 +17,7 @@
//#include <stdbool.h> // for standard true/false
//#include <gio/gio.h> // For things like GAsyncResult
-#include "swt.h" // For types like jintLong etc..
+#include "swt.h"
#include "webkitgtk.h" // For WebKitGTK_LOAD_FUNCTION macro and custom struct definitions.
#include "webkitgtk_custom.h"
@@ -44,7 +44,7 @@ int fps_cached = 0;
/** Dynamic Function pointer declarations */
// Example of a dynamic function declaration.
// dyn_WebKitJavascriptResult (*fp_webkit_web_view_run_javascript_finish) (dyn_WebKitWebView, GAsyncResult*, GError**);
-// // example call of this function would be: fp_webkit_web_view_run_javascript_finish ((jintLong) object, result, &error);
+// // example call of this function would be: fp_webkit_web_view_run_javascript_finish ((jlong) object, result, &error);
#define INIT_WEBKIT_FP(function) \
{ \
@@ -69,7 +69,7 @@ void initFPs() {
// Example of a function that makes dynamic calls.
//JNIEXPORT void Java_org_eclipse_swt_internal_webkit_WebKitGTK__1swtWebkitEvaluateJavascript
-// (JNIEnv *env, jclass that, jintLong webkit_handle, jbyteArray javascriptStringBytes, jobject swtjsreturnvalOBJ)
+// (JNIEnv *env, jclass that, jlong webkit_handle, jbyteArray javascriptStringBytes, jobject swtjsreturnvalOBJ)
//{
// WebKitGTK_NATIVE_ENTER(env, that, _1swtWebkitEvaluateJavascript_FUNC); // For native stats tool.
//// In your custom function, you should first ensure function pointers are initiated:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.h
index 6ffc94b4c1..53511fb9a2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_custom.h
@@ -18,7 +18,7 @@
/* Manually written code */
/** Dynamic type definitions */
-typedef jintLong dyn_WebKitWebView;
+typedef jlong dyn_WebKitWebView;
typedef gpointer dyn_WebKitJavascriptResult;
typedef gpointer dyn_JSContextRef;
typedef gpointer dyn_JSGlobalContextRef;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.c
deleted file mode 100644
index e7d122c17a..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.c
+++ /dev/null
@@ -1,546 +0,0 @@
-#include "webkitgtk_extension.h"
-
-/**
- * Note: g_asserts() are active/working. (i.e not dissabled)
- */
-
-// +-------------+----------------------------------------------------------------
-// | Misc Globals|
-// +-------------+
-gint32 parentUniqueId = 0;
-
-// see: WebKitGTK.java 'TYPE NOTES'
-guchar SWT_DBUS_MAGIC_NUMBER_EMPTY_ARRAY = 101;
-guchar SWT_DBUS_MAGIC_NUMBER_NULL = 48;
-
-// +-------------+----------------------------------------------------------------
-// | Misc Helpers|
-// +-------------+
-
-/* Combine String and int.
- * @return char * should be free()'ed.
- */
-char * combineStrInt(char * in_str, gint32 in_i) {
- int new_str_len = strlen(in_str) + snprintf(NULL, 0, "%d", in_i) + 1; // str + int + \0
- char * out_str = malloc (new_str_len);
- snprintf( out_str, new_str_len, "%s%d", in_str, in_i);
- return out_str;
-}
-
-// +-------------+----------------------------------------------------------------
-// | GDBus logic |
-// +-------------+
-static const gchar base_service_name[] = "org.eclipse.swt"; // Base name. Full name has uniqueID appended.
-static const gchar object_name[] = "/org/eclipse/swt/gdbus";
-static const gchar interface[] = "org.eclipse.swt.gdbusInterface";
-
-typedef struct {
- guint64 page_id;
- gchar *function;
- gchar *url;
-} BrowserFunction;
-
-GSList *function_list = NULL;
-GDBusProxy *proxy = NULL; // The proxy that we work with
-
-void proxy_init () {
- g_assert(parentUniqueId != 0);
-
- if (proxy != NULL) { // Already initialized.
- return;
- }
- const char * full_service_name = combineStrInt((char *) base_service_name, parentUniqueId);
-
- GError *error = NULL; // Some functions return errors through params
-
- // g_type_init(); // Not needed as of glib 2.36
- proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, full_service_name, object_name, interface, NULL, &error);
- if ((proxy == NULL) || (error != NULL)) {
- fprintf(stderr, "SWT Webextension: GDBus setupServer error. Could not connect to %s:%s on %s.\n", full_service_name, object_name, interface);
- if (error != NULL) {
- fprintf(stderr, " %s\n", error->message);
- }
- exit(0);
- }
-}
-
-
-/**
- * Caller should free the returned GVariant *.
- */
-GVariant * callMainProc(char * methodName, GVariant * params) {
- proxy_init();
- GError *error = NULL; // Some functions return errors through params
- GVariant *result; // The value result from a call
-
- // Send a message
- result = g_dbus_proxy_call_sync(proxy, methodName, params, 0, -1, NULL, &error); // You can make multiple calls
-
- // Error checking.
- if (result == NULL) {
- if (error != NULL) {
- g_error("SWT web extension: Call failed because '%s.'\n", error->message);
- }
- else {
- g_error("SWT web extension: Call failed for an unknown reason.\n");
- }
- return NULL;
- }
-
- // Deal with result
- return result;
-}
-
-
-// +--------------------------------------------------+-------------------------------------
-// | JavaScriptCore to/from conversion GVariant logic |
-// +--------------------------------------------------+
-
-/** Return true if the given JSValueRef is one we can push over gdbus. False otherwise.
- * We support basic types, nulls and arrays of basic types.*/
-gboolean is_js_valid(JSContextRef context, JSValueRef value) {
- JSType type = JSValueGetType(context, value);
- if (type == kJSTypeBoolean
- || type == kJSTypeNumber
- || type == kJSTypeString
- || type == kJSTypeNull
- || type == kJSTypeUndefined) {
- return true;
- }
- if (type == kJSTypeObject && JSValueIsArray(context, value)) {
- JSStringRef propertyName = JSStringCreateWithUTF8CString("length");
- JSObjectRef object = JSValueToObject(context, value, NULL);
- JSValueRef valuePtr = JSObjectGetProperty(context, object, propertyName, NULL);
- JSStringRelease(propertyName);
- int length = (int) JSValueToNumber(context, valuePtr, NULL);
- int i;
- for (i = 0; i < length; i++) {
- const JSValueRef child = JSObjectGetPropertyAtIndex(context, object, i, NULL);
- if (!is_js_valid(context, child)) {
- return false;
- }
- }
- return true;
- }
- return false;
-}
-
-/*
- * Developer note:
- * JavaScriptCore defines a "Number" to be a double in general. It doesn't seem to be using "Int".
- */
-static GVariant * convert_js_to_gvariant (JSContextRef context, JSValueRef value){
- g_assert(context != NULL);
- g_assert(value != NULL);
- JSType type = JSValueGetType(context, value);
-
- if (type == kJSTypeBoolean) {
- gboolean result = JSValueToNumber(context, value, NULL) != 0;
- return g_variant_new_boolean(result);
- }
-
- if (type == kJSTypeNumber) {
- double result = JSValueToNumber(context, value, NULL);
- return g_variant_new_double(result);
- }
-
- if (type == kJSTypeString) {
- JSStringRef stringRef = JSValueToStringCopy(context, value, NULL);
- size_t length = JSStringGetMaximumUTF8CStringSize(stringRef);
- char* string = (char*) malloc(length);
- JSStringGetUTF8CString(stringRef, string, length);
- GVariant *variant = g_variant_new_string(string);
- free(string);
- return variant;
- }
-
- if (type == kJSTypeNull || type == kJSTypeUndefined) {
- return g_variant_new_byte(SWT_DBUS_MAGIC_NUMBER_NULL);
- }
-
- if (type == kJSTypeObject) {
- JSStringRef propertyName = JSStringCreateWithUTF8CString("length");
- JSObjectRef object = JSValueToObject(context, value, NULL);
- JSValueRef valuePtr = JSObjectGetProperty(context, object, propertyName, NULL);
- JSStringRelease(propertyName);
-
- if (JSValueGetType(context, valuePtr) == kJSTypeNumber) {
- int length = (int) JSValueToNumber(context, valuePtr, NULL);
-
- if (length == 0) {
- return g_variant_new_byte(SWT_DBUS_MAGIC_NUMBER_EMPTY_ARRAY);
- }
- GVariant **children = g_new(GVariant *, length);
- int i = 0;
- for (i = 0; i < length; i++) {
- const JSValueRef child = JSObjectGetPropertyAtIndex(context, object, i, NULL);
- children[i] = convert_js_to_gvariant(context, child);
- }
- GVariant* variant = g_variant_new_tuple(children, length);
- g_free(children);
- return variant;
- }
- }
-
- // Get type value string
- JSStringRef valueIString = JSValueToStringCopy(context, value, NULL);
- size_t valueUTF8Size = JSStringGetMaximumUTF8CStringSize(valueIString);
- char* valueUTF8 = (char*) malloc(valueUTF8Size);
- JSStringGetUTF8CString(valueIString, valueUTF8, valueUTF8Size);
-
- g_warning("SWT Webextension: Unhandled type %d value: %s \n", type, valueUTF8);
- free(valueUTF8);
- JSStringRelease(valueIString);
-
- return NULL;
-}
-
-
-static JSValueRef convert_gvariant_to_js (JSContextRef context, GVariant * value){
- g_assert(context != NULL);
- g_assert(value != NULL);
-
- if (g_variant_is_of_type(value, G_VARIANT_TYPE_BYTE)) { // see: WebKitGTK.java 'TYPE NOTES'
- guchar magic_number = g_variant_get_byte(value);
- if (magic_number == SWT_DBUS_MAGIC_NUMBER_NULL) {
- // 'JSValueMakeUndefined' is used as oppose to 'JSValueMakeNull' (from what I gather) for legacy reasons.
- // I.e webkit1 used it, so we shall use it in webkit2 also.
- return JSValueMakeUndefined(context);
- } else if (magic_number == SWT_DBUS_MAGIC_NUMBER_EMPTY_ARRAY) {
- return JSObjectMakeArray(context, 0, NULL, NULL); // The empty array with no children.
- } else {
- g_error("Java sent an unknown magic number: '%d' , this should never happen. \n", magic_number);
- }
- }
-
- if (g_variant_is_of_type(value, G_VARIANT_TYPE_BOOLEAN)) {
- return JSValueMakeBoolean(context, g_variant_get_boolean(value));
- }
-
- if (g_variant_is_of_type(value, G_VARIANT_TYPE_DOUBLE)) {
- return JSValueMakeNumber(context, g_variant_get_double(value));
- }
-
- if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING)) {
- JSStringRef stringRef = JSStringCreateWithUTF8CString(g_variant_get_string(value, NULL));
- JSValueRef result = JSValueMakeString(context, stringRef);
- JSStringRelease(stringRef);
- return result;
- }
-
- if (g_variant_is_of_type(value, G_VARIANT_TYPE_TUPLE)) {
- gsize length = (int) g_variant_n_children(value);
- JSValueRef *children = g_new(JSValueRef, length);
-
- int i = 0;
- for (i = 0; i < length; i++) {
- children[i] = convert_gvariant_to_js(context, g_variant_get_child_value(value, i));
- }
- JSValueRef result = JSObjectMakeArray(context, length, children, NULL);
- g_free(children);
- return result;
- }
- g_error("Unhandled type %s \n", g_variant_get_type_string(value));
- return NULL;
-}
-
-// +--------------------+---------------------------------------------------------
-// | WebExtension Logic |
-// +--------------------+
-
-// Reached by calling "webkit2callJava();" in javascript console.
-// Some basic c function to be exposed to the javascript environment
-static JSValueRef webkit2callJava (JSContextRef context,
- JSObjectRef function,
- JSObjectRef thisObject,
- size_t argumentCount,
- const JSValueRef arguments[], // [String webview, double index, String Token, Object[] args]
- JSValueRef *exception) {
- g_assert (argumentCount == 4);
- GVariant *g_var_params; // The parameters to a function call
-
- // Need to ensure user arguments won't break gdbus.
- if (!is_js_valid(context, arguments[3])) {
- g_warning("SWT Webextension: Arguments contain an invalid type (object). Only Number,Boolean,null,String and (mixed) arrays of basic types are supported");
- return 0;
- }
-
- g_var_params = g_variant_new ("(@s@d@s@*)", // pointer to String, pointer to double, pointer to string, pointer to any type.
- convert_js_to_gvariant(context, arguments[0]), // String webView
- convert_js_to_gvariant(context, arguments[1]), // int index
- convert_js_to_gvariant(context, arguments[2]), // String Token
- convert_js_to_gvariant(context, arguments[3]) // js args
- );
-
- GVariant *g_var_result = callMainProc("webkit2callJava", g_var_params);
- if (g_var_result == NULL) {
- g_error("SWT Webextension: Java call returned NULL. This should never happpen\n");
- return 0;
- }
-
- // gdbus dynamic call always returns an array(tuple) with return types.
- // In our case, we return a single type or an array.
- // E.g java:int -> gdbus:(i) (array containing one int)
- // E.g java [int,str] -> gdbus:((is)) (array with array of (int+str).
- // So we always extract the first child, convert and pass to js.
- JSValueRef retVal = 0;
- if (g_variant_is_of_type(g_var_result, G_VARIANT_TYPE_TUPLE)) {
- if (g_variant_n_children(g_var_result) != 1) {
- g_error("Should only receive a single item in the tuple, but length is: %ud\n", (unsigned int) g_variant_n_children(g_var_result));
- }
- retVal = convert_gvariant_to_js(context, g_variant_get_child_value(g_var_result, 0));
- } else {
- g_error("SWT Webextension: Unsupported return type. Should be an array, but received a single type.\n");
- }
-
- g_variant_unref(g_var_result);
- return retVal;
-}
-
-static void web_page_created_callback(WebKitWebExtension *extension, WebKitWebPage *web_page, gpointer user_data) {
- // Observation. This seems to be called only once.
-}
-
-/**
- * Returns the main frame of the WebPage with the given ID
- */
-static WebKitFrame *webkitgtk_extension_get_main_frame (const guint64 id) {
- WebKitWebPage *web_page = webkit_web_extension_get_page (this_extension, id);
- return webkit_web_page_get_main_frame (web_page);
-}
-
-/*
- * Execute the Javascript for the given page and URL.
- */
-static gboolean webkitgtk_extension_execute_script (const guint64 page_id, gchar* script, gchar* url) {
- WebKitFrame *main_frame = webkitgtk_extension_get_main_frame (page_id);
-
- JSStringRef url_string = JSStringCreateWithUTF8CString (url);
- JSStringRef script_string = JSStringCreateWithUTF8CString (script);
-
- JSGlobalContextRef context = webkit_frame_get_javascript_global_context (main_frame);
-
- JSValueRef exception;
- JSValueRef result = JSEvaluateScript(context, script_string, NULL, url_string, 0, &exception);
- if (!result) {
- JSStringRef exceptionIString = JSValueToStringCopy(context, exception, NULL);
- size_t exceptionUTF8Size = JSStringGetMaximumUTF8CStringSize(exceptionIString);
- char* exceptionUTF8 = (char*)malloc(exceptionUTF8Size);
- JSStringGetUTF8CString(exceptionIString, exceptionUTF8, exceptionUTF8Size);
- g_error("SWT web extension: failed to execute script exception: %s\n", exceptionUTF8);
- free(exceptionUTF8);
- JSStringRelease(exceptionIString);
- }
-
- JSStringRelease (url_string);
- JSStringRelease (script_string);
-
- return result != NULL;
-}
-
-void execute_browser_functions(gconstpointer item, gpointer page) {
- BrowserFunction *function = (BrowserFunction *) item;
- if (function != NULL && function->page_id == GPOINTER_TO_UINT(page)) {
- webkitgtk_extension_execute_script(function->page_id, function->function, function->url);
- }
- return;
-}
-
-gint find_browser_function (gconstpointer item, gconstpointer target) {
- BrowserFunction *element = (BrowserFunction *) item;
- BrowserFunction *remove = (BrowserFunction *) target;
- if (element->page_id == remove->page_id && g_strcmp0(element->function, remove->function) == 0 &&
- g_strcmp0(element->url, remove->url) == 0) {
- return 0;
- }
- return 1;
-}
-
-void add_browser_function(guint64 page_id, const gchar *function, const gchar *url) {
- BrowserFunction *func = g_slice_new0(BrowserFunction);
- func->page_id = page_id;
- func->function = g_strdup(function);
- func->url = g_strdup(url);
- function_list = g_slist_append(function_list, func);
-}
-
-void remove_browser_function(guint64 page_id, const gchar *function, const gchar *url) {
- BrowserFunction *func = g_slice_new0(BrowserFunction);
- func->page_id = page_id;
- func->function = g_strdup(function);
- func->url = g_strdup(url);
- GSList *to_remove = g_slist_find_custom(function_list, func, find_browser_function);
- if (to_remove != NULL) {
- BrowserFunction *delete_func = to_remove->data;
- g_free(delete_func->function);
- g_free(delete_func->url);
- function_list = g_slist_delete_link(function_list, to_remove);
- }
- g_free(func->function);
- g_free(func->url);
- g_slice_free(BrowserFunction, func);
-}
-
-void unpack_browser_function_array(GVariant *array) {
- GVariantIter iter;
- GVariant *child;
-
- g_variant_iter_init (&iter, array);
- while ((child = g_variant_iter_next_value (&iter))) {
- gsize length = (int)g_variant_n_children (child);
- if (length > 3) {
- // If the length is longer than three, something went wrong and this tuple should be skipped
- g_warning("SWT web extension: there was an error unpacking the GVariant tuple for a BrowserFunction in the web extension.\n");
- continue;
- }
- guint64 page = g_variant_get_uint64(g_variant_get_child_value(child, 0));
- if (page == -1) {
- // Empty or malformed BrowserFunction, skip this one
- continue;
- } else {
- const gchar *function = g_variant_get_string(g_variant_get_child_value(child, 1), NULL);
- const gchar *url = g_variant_get_string(g_variant_get_child_value(child, 2), NULL);
- if (function != NULL && url != NULL) {
- add_browser_function(page, function, url);
- } else {
- g_warning("SWT web extension: there was an error unpacking the function string or URL.\n");
- }
- }
- g_variant_unref (child);
- }
-}
-
-/*
- * Every time a webpage is loaded, we should re-register the 'webkit2callJava' function.
- * Additionally, we re-register all BrowserFunctions that are stored in the function_list
- * GSList.
- */
-static void window_object_cleared_callback (WebKitScriptWorld *world, WebKitWebPage *web_page,
- WebKitFrame *frame,
- gpointer user_data) {
- // Observation: This is called every time a webpage is loaded.
- JSGlobalContextRef jsContext;
- JSObjectRef globalObject;
- JSValueRef exception = 0;
-
- jsContext = webkit_frame_get_javascript_context_for_script_world (frame, world);
- globalObject = JSContextGetGlobalObject (jsContext);
-
- JSStringRef function_name = JSStringCreateWithUTF8CString("webkit2callJava"); // Func reference by javascript
- JSObjectRef jsFunction = JSObjectMakeFunctionWithCallback(jsContext, function_name, webkit2callJava); // C reference to func
- JSObjectSetProperty(jsContext, globalObject, function_name, jsFunction,
- kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly, &exception);
-
- if (exception) {
- g_print("OJSObjectSetProperty exception occurred");
- }
-
- /*
- * Iterate over the list of BrowserFunctions and execute each one of them for the current page.
- * This ensures that BrowserFunctions are not lost on page reloads. See bug 536141.
- */
- if (function_list != NULL) {
- guint64 page_id = webkit_web_page_get_id (web_page);
- if (page_id != -1) {
- g_slist_foreach(function_list, (GFunc)execute_browser_functions, GUINT_TO_POINTER(page_id));
- } else {
- g_warning("SWT web extension: there was an error fetching the page ID in the object_cleared callback.\n");
- }
- }
-}
-
-static void
-webkitgtk_extension_handle_method_call (GDBusConnection *connection, const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
- GDBusMethodInvocation *invocation,
- gpointer user_data) {
- gboolean result = FALSE;
- const gchar *script;
- const gchar *url;
- guint64 page_id;
- // Check method names
- if (g_strcmp0(method_name, "webkitgtk_extension_register_function") == 0) {
- g_variant_get(parameters, "(t&s&s)", &page_id, &script, &url);
- if (page_id != -1) {
- result = TRUE;
- // Return before processing the linked list, to prevent DBus from hanging
- g_dbus_method_invocation_return_value(invocation, g_variant_new("(b)", result));
- add_browser_function(page_id, script, url);
- return;
- }
- g_dbus_method_invocation_return_value(invocation, g_variant_new("(b)", result));
- return;
- }
- if (g_strcmp0(method_name, "webkitgtk_extension_deregister_function") == 0) {
- g_variant_get(parameters, "(t&s&s)", &page_id, &script, &url);
- if (page_id != -1) {
- result = TRUE;
- // Return before processing the linked list, to prevent DBus from hanging
- g_dbus_method_invocation_return_value(invocation, g_variant_new("(b)", result));
- remove_browser_function(page_id, script, url);
- return;
- }
- g_dbus_method_invocation_return_value(invocation, g_variant_new("(b)", result));
- return;
- }
- g_error ("UNKNOWN method %s\n", method_name);
-}
-
-static const GDBusInterfaceVTable interface_vtable = {webkitgtk_extension_handle_method_call, NULL, NULL};
-
-static void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data) {
- dbus_interface = g_dbus_node_info_lookup_interface(dbus_node, WEBKITGTK_EXTENSION_DBUS_INTERFACE);
- guint registration_id = g_dbus_connection_register_object(connection,
- webkitgtk_extension_dbus_path,
- dbus_interface,
- &interface_vtable, NULL, /* user_data */
- NULL, /* user_data_free_func */
- NULL); /* GError** */
- g_assert(registration_id > 0);
-
- GVariant *g_var_result = callMainProc("webkitWebExtensionIdentifer", g_variant_new ("(ss)",
- webkitgtk_extension_dbus_name, webkitgtk_extension_dbus_path));
- if (g_variant_is_of_type(g_var_result, G_VARIANT_TYPE_TUPLE)) {
- unpack_browser_function_array(g_variant_get_child_value(g_var_result, 0));
- } else {
- g_warning("SWT web extension: on_bus_acquired return value from SWT was an unexpected type (not a tuple).\n");
- }
- return;
-}
-
-G_MODULE_EXPORT void webkit_web_extension_initialize_with_user_data(WebKitWebExtension *extension, GVariant *user_data) {
- // To debug this extension:
- // - ensure this is build with debug flags (look for '-g*' in make_linux, or 'SWT_LIB_DEBUG' macro.
- // - connect to WebKitWebProcess with pid of this extension. Use below to print it:
- // g_print("Webext pid: %d (To debug, attach to WebKitWebProcess with this pid)\n", getpid());
-
- this_extension = extension;
- parentUniqueId = g_variant_get_int32(user_data);
- g_signal_connect(extension, "page-created", G_CALLBACK(web_page_created_callback), NULL);
-
- // To hook into javascript execution:
- g_signal_connect (webkit_script_world_get_default (), "window-object-cleared", G_CALLBACK (window_object_cleared_callback), NULL);
-
- // Create DBus server for this web extension
- webkitgtk_extension_dbus_name = combineStrInt((char *) WEBKITGTK_EXTENSION_DBUS_NAME_PREFIX, (gint32) getpid());
- webkitgtk_extension_dbus_path = combineStrInt((char *) WEBKITGTK_EXTENSION_DBUS_PATH_PREFIX, (gint32) getpid());
-
- dbus_introspection_xml = g_new (gchar, strlen(dbus_introspection_xml_template) + strlen(WEBKITGTK_EXTENSION_DBUS_INTERFACE) + 1);
- g_sprintf (dbus_introspection_xml, dbus_introspection_xml_template, WEBKITGTK_EXTENSION_DBUS_INTERFACE);
- dbus_node = g_dbus_node_info_new_for_xml (dbus_introspection_xml, NULL);
- g_assert (dbus_node != NULL);
-
- guint owner_id;
- owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
- webkitgtk_extension_dbus_name,
- G_BUS_NAME_OWNER_FLAGS_REPLACE | G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT,
- on_bus_acquired,
- NULL, /* on_name_acquired */
- NULL, /* on_name_lost */
- NULL,
- NULL);
- g_assert (owner_id != 0);
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.h
deleted file mode 100644
index 4d2713cd76..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_extension.h
+++ /dev/null
@@ -1,76 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2017 Red Hat and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-#ifndef INC_webkit_extension_H
-#define INC_webkit_extension_H
-
-#include <string.h>
-
-#include <glib.h>
-#include <glib/gprintf.h>
-
-#include <gio/gio.h>
-#include <stdlib.h>
-
-#include <unistd.h>
-#include <stdio.h>
-
-// These 2 are only for getpid();
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <webkit2/webkit-web-extension.h>
-
-#include <JavaScriptCore/JavaScript.h>
-#include <JavaScriptCore/JSContextRef.h>
-#include <JavaScriptCore/JSObjectRef.h>
-#include <JavaScriptCore/JSStringRef.h>
-
-#define WEBKITGTK_EXTENSION_DBUS_NAME_PREFIX "org.eclipse.swt.webkitgtk_extension"
-#define WEBKITGTK_EXTENSION_DBUS_PATH_PREFIX "/org/eclipse/swt/webkitgtk_extension/gdbus/"
-#define WEBKITGTK_EXTENSION_DBUS_INTERFACE "org.eclipse.swt.webkitgtk_extension.gdbusInterface"
-
-#define WEBKIT_MAIN_PROCESS_DBUS_NAME_PREFIX "org.eclipse.swt"
-#define WEBKIT_MAIN_PROCESS_DBUS_PATH_PREFIX "/org/eclipse/swt/gdbus/"
-
-static gchar* webkitgtk_extension_dbus_name;
-static gchar* webkitgtk_extension_dbus_path;
-
-static WebKitWebExtension *this_extension;
-
-static GDBusNodeInfo *dbus_node;
-static GDBusInterfaceInfo *dbus_interface;
-static gchar* dbus_introspection_xml;
-static gchar* dbus_introspection_xml_template =
-"<node>"
- "<interface name='%s'>"
-
- "<method name='webkitgtk_extension_register_function'>"
- "<arg type='t' name='page_id' direction='in'/>"
- "<arg type='s' name='script' direction='in'/>"
- "<arg type='s' name='url' direction='in'/>"
- "<arg type='b' name='result' direction='out'/>"
- "</method>"
-
- "<method name='webkitgtk_extension_deregister_function'>"
- "<arg type='t' name='page_id' direction='in'/>"
- "<arg type='s' name='script' direction='in'/>"
- "<arg type='s' name='url' direction='in'/>"
- "<arg type='b' name='result' direction='out'/>"
- "</method>"
-
- "</interface>"
-"</node>";
-
-#endif /*INC_webkit_extension_H*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
index 84ee7e587d..cc0c92c301 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2018 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2022 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -23,173 +23,112 @@
char * WebKitGTK_nativeFunctionNames[] = {
"GdkRectangle_1sizeof",
- "JSClassDefinition_1sizeof",
- "_1JSClassCreate",
- "_1JSContextGetGlobalObject",
- "_1JSEvaluateScript",
- "_1JSObjectGetPrivate",
- "_1JSObjectGetProperty",
- "_1JSObjectGetPropertyAtIndex",
- "_1JSObjectMake",
- "_1JSObjectMakeArray",
- "_1JSObjectMakeFunctionWithCallback",
- "_1JSObjectSetProperty",
- "_1JSStringCreateWithUTF8CString",
- "_1JSStringGetLength",
- "_1JSStringGetMaximumUTF8CStringSize",
- "_1JSStringGetUTF8CString",
- "_1JSStringIsEqualToUTF8CString",
- "_1JSStringRelease",
- "_1JSValueGetType",
- "_1JSValueIsObjectOfClass",
- "_1JSValueMakeBoolean",
- "_1JSValueMakeNumber",
- "_1JSValueMakeString",
- "_1JSValueMakeUndefined",
- "_1JSValueToNumber",
- "_1JSValueToStringCopy",
- "_1SoupCookie_1expires",
- "_1SoupMessage_1method",
- "_1SoupMessage_1request_1body",
- "_1SoupMessage_1request_1headers",
- "_1soup_1auth_1authenticate",
- "_1soup_1auth_1get_1host",
- "_1soup_1auth_1get_1scheme_1name",
- "_1soup_1cookie_1free",
- "_1soup_1cookie_1jar_1add_1cookie",
- "_1soup_1cookie_1jar_1all_1cookies",
- "_1soup_1cookie_1jar_1delete_1cookie",
- "_1soup_1cookie_1jar_1get_1cookies",
- "_1soup_1cookie_1jar_1get_1type",
- "_1soup_1cookie_1parse",
- "_1soup_1message_1body_1append",
- "_1soup_1message_1body_1flatten",
- "_1soup_1message_1get_1uri",
- "_1soup_1message_1headers_1append",
- "_1soup_1session_1add_1feature_1by_1type",
- "_1soup_1session_1feature_1attach",
- "_1soup_1session_1feature_1detach",
- "_1soup_1session_1get_1feature",
- "_1soup_1session_1get_1type",
- "_1soup_1uri_1free",
- "_1soup_1uri_1new",
- "_1soup_1uri_1to_1string",
- "_1webkit_1authentication_1request_1authenticate",
- "_1webkit_1authentication_1request_1cancel",
- "_1webkit_1authentication_1request_1is_1retry",
- "_1webkit_1credential_1free",
- "_1webkit_1credential_1new",
- "_1webkit_1dom_1event_1target_1add_1event_1listener",
- "_1webkit_1dom_1mouse_1event_1get_1alt_1key",
- "_1webkit_1dom_1mouse_1event_1get_1button",
- "_1webkit_1dom_1mouse_1event_1get_1ctrl_1key",
- "_1webkit_1dom_1mouse_1event_1get_1meta_1key",
- "_1webkit_1dom_1mouse_1event_1get_1screen_1x",
- "_1webkit_1dom_1mouse_1event_1get_1screen_1y",
- "_1webkit_1dom_1mouse_1event_1get_1shift_1key",
- "_1webkit_1dom_1ui_1event_1get_1char_1code",
- "_1webkit_1dom_1ui_1event_1get_1detail",
- "_1webkit_1dom_1ui_1event_1get_1key_1code",
- "_1webkit_1download_1cancel",
- "_1webkit_1download_1get_1current_1size",
- "_1webkit_1download_1get_1network_1request",
- "_1webkit_1download_1get_1received_1data_1length",
- "_1webkit_1download_1get_1request",
- "_1webkit_1download_1get_1response",
- "_1webkit_1download_1get_1status",
- "_1webkit_1download_1get_1suggested_1filename",
- "_1webkit_1download_1get_1total_1size",
- "_1webkit_1download_1get_1type",
- "_1webkit_1download_1get_1uri",
- "_1webkit_1download_1get_1web_1view",
- "_1webkit_1download_1new",
- "_1webkit_1download_1set_1allow_1overwrite",
- "_1webkit_1download_1set_1destination",
- "_1webkit_1download_1set_1destination_1uri",
- "_1webkit_1download_1start",
- "_1webkit_1favicon_1database_1set_1path",
- "_1webkit_1get_1default_1session",
- "_1webkit_1get_1favicon_1database",
- "_1webkit_1get_1major_1version",
- "_1webkit_1get_1micro_1version",
- "_1webkit_1get_1minor_1version",
- "_1webkit_1hit_1test_1result_1context_1is_1link",
- "_1webkit_1hit_1test_1result_1get_1link_1title",
- "_1webkit_1hit_1test_1result_1get_1link_1uri",
- "_1webkit_1javascript_1result_1get_1global_1context",
- "_1webkit_1javascript_1result_1get_1value",
- "_1webkit_1javascript_1result_1unref",
- "_1webkit_1major_1version",
- "_1webkit_1micro_1version",
- "_1webkit_1minor_1version",
- "_1webkit_1navigation_1policy_1decision_1get_1request",
- "_1webkit_1network_1request_1get_1message",
- "_1webkit_1network_1request_1get_1uri",
- "_1webkit_1network_1request_1new",
- "_1webkit_1policy_1decision_1download",
- "_1webkit_1policy_1decision_1ignore",
- "_1webkit_1response_1policy_1decision_1get_1request",
- "_1webkit_1response_1policy_1decision_1get_1response",
- "_1webkit_1soup_1auth_1dialog_1get_1type",
- "_1webkit_1uri_1request_1get_1http_1headers",
- "_1webkit_1uri_1request_1get_1uri",
- "_1webkit_1uri_1request_1new",
- "_1webkit_1uri_1response_1get_1content_1length",
- "_1webkit_1uri_1response_1get_1mime_1type",
- "_1webkit_1web_1context_1allow_1tls_1certificate_1for_1host",
- "_1webkit_1web_1context_1get_1default",
- "_1webkit_1web_1context_1get_1type",
- "_1webkit_1web_1context_1get_1website_1data_1manager",
- "_1webkit_1web_1context_1set_1tls_1errors_1policy",
- "_1webkit_1web_1context_1set_1web_1extensions_1directory",
- "_1webkit_1web_1context_1set_1web_1extensions_1initialization_1user_1data",
- "_1webkit_1web_1data_1source_1get_1data",
- "_1webkit_1web_1data_1source_1get_1encoding",
- "_1webkit_1web_1frame_1get_1data_1source",
- "_1webkit_1web_1frame_1get_1global_1context",
- "_1webkit_1web_1frame_1get_1load_1status",
- "_1webkit_1web_1frame_1get_1parent",
- "_1webkit_1web_1frame_1get_1title",
- "_1webkit_1web_1frame_1get_1type",
- "_1webkit_1web_1frame_1get_1uri",
- "_1webkit_1web_1frame_1get_1web_1view",
- "_1webkit_1web_1policy_1decision_1download",
- "_1webkit_1web_1policy_1decision_1ignore",
- "_1webkit_1web_1resource_1get_1data",
- "_1webkit_1web_1resource_1get_1data_1finish",
- "_1webkit_1web_1view_1can_1go_1back",
- "_1webkit_1web_1view_1can_1go_1forward",
- "_1webkit_1web_1view_1can_1show_1mime_1type",
- "_1webkit_1web_1view_1execute_1script",
- "_1webkit_1web_1view_1get_1context",
- "_1webkit_1web_1view_1get_1dom_1document",
- "_1webkit_1web_1view_1get_1estimated_1load_1progress",
- "_1webkit_1web_1view_1get_1load_1status",
- "_1webkit_1web_1view_1get_1main_1frame",
- "_1webkit_1web_1view_1get_1main_1resource",
- "_1webkit_1web_1view_1get_1page_1id",
- "_1webkit_1web_1view_1get_1progress",
- "_1webkit_1web_1view_1get_1settings",
- "_1webkit_1web_1view_1get_1title",
- "_1webkit_1web_1view_1get_1type",
- "_1webkit_1web_1view_1get_1uri",
- "_1webkit_1web_1view_1get_1window_1features",
- "_1webkit_1web_1view_1get_1window_1properties",
- "_1webkit_1web_1view_1go_1back",
- "_1webkit_1web_1view_1go_1forward",
- "_1webkit_1web_1view_1load_1bytes",
- "_1webkit_1web_1view_1load_1html",
- "_1webkit_1web_1view_1load_1request",
- "_1webkit_1web_1view_1load_1string",
- "_1webkit_1web_1view_1load_1uri",
- "_1webkit_1web_1view_1new",
- "_1webkit_1web_1view_1reload",
- "_1webkit_1web_1view_1run_1javascript",
- "_1webkit_1web_1view_1run_1javascript_1finish",
- "_1webkit_1web_1view_1stop_1loading",
- "_1webkit_1website_1data_1manager_1clear",
- "_1webkit_1window_1properties_1get_1geometry",
- "memmove",
+ "JSObjectGetProperty",
+ "JSObjectGetPropertyAtIndex",
+ "JSStringCreateWithUTF8CString",
+ "JSStringGetMaximumUTF8CStringSize",
+ "JSStringGetUTF8CString",
+ "JSStringRelease",
+ "JSValueGetType",
+ "JSValueToNumber",
+ "JSValueToStringCopy",
+ "soup_1cookie_1get_1name",
+ "soup_1cookie_1get_1value",
+ "soup_1cookie_1parse",
+ "soup_1message_1headers_1append",
+ "soup_1uri_1free",
+ "soup_1uri_1new",
+ "webkit_1authentication_1request_1authenticate",
+ "webkit_1authentication_1request_1cancel",
+ "webkit_1authentication_1request_1is_1retry",
+ "webkit_1cookie_1manager_1add_1cookie",
+ "webkit_1cookie_1manager_1add_1cookie_1finish",
+ "webkit_1cookie_1manager_1get_1cookies",
+ "webkit_1cookie_1manager_1get_1cookies_1finish",
+ "webkit_1credential_1free",
+ "webkit_1credential_1new",
+ "webkit_1dom_1event_1target_1add_1event_1listener",
+ "webkit_1dom_1mouse_1event_1get_1alt_1key",
+ "webkit_1dom_1mouse_1event_1get_1button",
+ "webkit_1dom_1mouse_1event_1get_1ctrl_1key",
+ "webkit_1dom_1mouse_1event_1get_1meta_1key",
+ "webkit_1dom_1mouse_1event_1get_1screen_1x",
+ "webkit_1dom_1mouse_1event_1get_1screen_1y",
+ "webkit_1dom_1mouse_1event_1get_1shift_1key",
+ "webkit_1dom_1ui_1event_1get_1char_1code",
+ "webkit_1dom_1ui_1event_1get_1detail",
+ "webkit_1dom_1ui_1event_1get_1key_1code",
+ "webkit_1download_1cancel",
+ "webkit_1download_1get_1received_1data_1length",
+ "webkit_1download_1get_1request",
+ "webkit_1download_1get_1response",
+ "webkit_1download_1get_1type",
+ "webkit_1download_1get_1web_1view",
+ "webkit_1download_1set_1allow_1overwrite",
+ "webkit_1download_1set_1destination",
+ "webkit_1get_1major_1version",
+ "webkit_1get_1micro_1version",
+ "webkit_1get_1minor_1version",
+ "webkit_1hit_1test_1result_1context_1is_1link",
+ "webkit_1hit_1test_1result_1get_1link_1title",
+ "webkit_1hit_1test_1result_1get_1link_1uri",
+ "webkit_1javascript_1result_1get_1global_1context",
+ "webkit_1javascript_1result_1get_1value",
+ "webkit_1javascript_1result_1unref",
+ "webkit_1navigation_1policy_1decision_1get_1request",
+ "webkit_1policy_1decision_1download",
+ "webkit_1policy_1decision_1ignore",
+ "webkit_1response_1policy_1decision_1get_1request",
+ "webkit_1response_1policy_1decision_1get_1response",
+ "webkit_1security_1manager_1register_1uri_1scheme_1as_1secure",
+ "webkit_1uri_1request_1get_1http_1headers",
+ "webkit_1uri_1request_1get_1uri",
+ "webkit_1uri_1request_1new",
+ "webkit_1uri_1response_1get_1content_1length",
+ "webkit_1uri_1response_1get_1mime_1type",
+ "webkit_1uri_1scheme_1request_1finish",
+ "webkit_1uri_1scheme_1request_1get_1uri",
+ "webkit_1uri_1scheme_1request_1get_1web_1view",
+ "webkit_1user_1content_1manager_1add_1script",
+ "webkit_1user_1content_1manager_1remove_1all_1scripts",
+ "webkit_1user_1script_1new",
+ "webkit_1user_1script_1unref",
+ "webkit_1web_1context_1allow_1tls_1certificate_1for_1host",
+ "webkit_1web_1context_1get_1cookie_1manager",
+ "webkit_1web_1context_1get_1default",
+ "webkit_1web_1context_1get_1security_1manager",
+ "webkit_1web_1context_1get_1type",
+ "webkit_1web_1context_1get_1website_1data_1manager",
+ "webkit_1web_1context_1register_1uri_1scheme",
+ "webkit_1web_1context_1set_1tls_1errors_1policy",
+ "webkit_1web_1resource_1get_1data",
+ "webkit_1web_1resource_1get_1data_1finish",
+ "webkit_1web_1view_1can_1go_1back",
+ "webkit_1web_1view_1can_1go_1forward",
+ "webkit_1web_1view_1can_1show_1mime_1type",
+ "webkit_1web_1view_1get_1context",
+ "webkit_1web_1view_1get_1estimated_1load_1progress",
+ "webkit_1web_1view_1get_1main_1resource",
+ "webkit_1web_1view_1get_1page_1id",
+ "webkit_1web_1view_1get_1settings",
+ "webkit_1web_1view_1get_1title",
+ "webkit_1web_1view_1get_1uri",
+ "webkit_1web_1view_1get_1user_1content_1manager",
+ "webkit_1web_1view_1get_1window_1properties",
+ "webkit_1web_1view_1go_1back",
+ "webkit_1web_1view_1go_1forward",
+ "webkit_1web_1view_1load_1bytes",
+ "webkit_1web_1view_1load_1html",
+ "webkit_1web_1view_1load_1request",
+ "webkit_1web_1view_1load_1uri",
+ "webkit_1web_1view_1new",
+ "webkit_1web_1view_1new_1with_1related_1view",
+ "webkit_1web_1view_1reload",
+ "webkit_1web_1view_1run_1javascript",
+ "webkit_1web_1view_1run_1javascript_1finish",
+ "webkit_1web_1view_1stop_1loading",
+ "webkit_1website_1data_1manager_1clear",
+ "webkit_1window_1properties_1get_1geometry",
};
#define NATIVE_FUNCTION_COUNT sizeof(WebKitGTK_nativeFunctionNames) / sizeof(char*)
int WebKitGTK_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
index 22196ffafa..c189b555b1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2018 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2022 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -33,171 +33,110 @@ extern char* WebKitGTK_nativeFunctionNames[];
typedef enum {
GdkRectangle_1sizeof_FUNC,
- JSClassDefinition_1sizeof_FUNC,
- _1JSClassCreate_FUNC,
- _1JSContextGetGlobalObject_FUNC,
- _1JSEvaluateScript_FUNC,
- _1JSObjectGetPrivate_FUNC,
- _1JSObjectGetProperty_FUNC,
- _1JSObjectGetPropertyAtIndex_FUNC,
- _1JSObjectMake_FUNC,
- _1JSObjectMakeArray_FUNC,
- _1JSObjectMakeFunctionWithCallback_FUNC,
- _1JSObjectSetProperty_FUNC,
- _1JSStringCreateWithUTF8CString_FUNC,
- _1JSStringGetLength_FUNC,
- _1JSStringGetMaximumUTF8CStringSize_FUNC,
- _1JSStringGetUTF8CString_FUNC,
- _1JSStringIsEqualToUTF8CString_FUNC,
- _1JSStringRelease_FUNC,
- _1JSValueGetType_FUNC,
- _1JSValueIsObjectOfClass_FUNC,
- _1JSValueMakeBoolean_FUNC,
- _1JSValueMakeNumber_FUNC,
- _1JSValueMakeString_FUNC,
- _1JSValueMakeUndefined_FUNC,
- _1JSValueToNumber_FUNC,
- _1JSValueToStringCopy_FUNC,
- _1SoupCookie_1expires_FUNC,
- _1SoupMessage_1method_FUNC,
- _1SoupMessage_1request_1body_FUNC,
- _1SoupMessage_1request_1headers_FUNC,
- _1soup_1auth_1authenticate_FUNC,
- _1soup_1auth_1get_1host_FUNC,
- _1soup_1auth_1get_1scheme_1name_FUNC,
- _1soup_1cookie_1free_FUNC,
- _1soup_1cookie_1jar_1add_1cookie_FUNC,
- _1soup_1cookie_1jar_1all_1cookies_FUNC,
- _1soup_1cookie_1jar_1delete_1cookie_FUNC,
- _1soup_1cookie_1jar_1get_1cookies_FUNC,
- _1soup_1cookie_1jar_1get_1type_FUNC,
- _1soup_1cookie_1parse_FUNC,
- _1soup_1message_1body_1append_FUNC,
- _1soup_1message_1body_1flatten_FUNC,
- _1soup_1message_1get_1uri_FUNC,
- _1soup_1message_1headers_1append_FUNC,
- _1soup_1session_1add_1feature_1by_1type_FUNC,
- _1soup_1session_1feature_1attach_FUNC,
- _1soup_1session_1feature_1detach_FUNC,
- _1soup_1session_1get_1feature_FUNC,
- _1soup_1session_1get_1type_FUNC,
- _1soup_1uri_1free_FUNC,
- _1soup_1uri_1new_FUNC,
- _1soup_1uri_1to_1string_FUNC,
- _1webkit_1authentication_1request_1authenticate_FUNC,
- _1webkit_1authentication_1request_1cancel_FUNC,
- _1webkit_1authentication_1request_1is_1retry_FUNC,
- _1webkit_1credential_1free_FUNC,
- _1webkit_1credential_1new_FUNC,
- _1webkit_1dom_1event_1target_1add_1event_1listener_FUNC,
- _1webkit_1dom_1mouse_1event_1get_1alt_1key_FUNC,
- _1webkit_1dom_1mouse_1event_1get_1button_FUNC,
- _1webkit_1dom_1mouse_1event_1get_1ctrl_1key_FUNC,
- _1webkit_1dom_1mouse_1event_1get_1meta_1key_FUNC,
- _1webkit_1dom_1mouse_1event_1get_1screen_1x_FUNC,
- _1webkit_1dom_1mouse_1event_1get_1screen_1y_FUNC,
- _1webkit_1dom_1mouse_1event_1get_1shift_1key_FUNC,
- _1webkit_1dom_1ui_1event_1get_1char_1code_FUNC,
- _1webkit_1dom_1ui_1event_1get_1detail_FUNC,
- _1webkit_1dom_1ui_1event_1get_1key_1code_FUNC,
- _1webkit_1download_1cancel_FUNC,
- _1webkit_1download_1get_1current_1size_FUNC,
- _1webkit_1download_1get_1network_1request_FUNC,
- _1webkit_1download_1get_1received_1data_1length_FUNC,
- _1webkit_1download_1get_1request_FUNC,
- _1webkit_1download_1get_1response_FUNC,
- _1webkit_1download_1get_1status_FUNC,
- _1webkit_1download_1get_1suggested_1filename_FUNC,
- _1webkit_1download_1get_1total_1size_FUNC,
- _1webkit_1download_1get_1type_FUNC,
- _1webkit_1download_1get_1uri_FUNC,
- _1webkit_1download_1get_1web_1view_FUNC,
- _1webkit_1download_1new_FUNC,
- _1webkit_1download_1set_1allow_1overwrite_FUNC,
- _1webkit_1download_1set_1destination_FUNC,
- _1webkit_1download_1set_1destination_1uri_FUNC,
- _1webkit_1download_1start_FUNC,
- _1webkit_1favicon_1database_1set_1path_FUNC,
- _1webkit_1get_1default_1session_FUNC,
- _1webkit_1get_1favicon_1database_FUNC,
- _1webkit_1get_1major_1version_FUNC,
- _1webkit_1get_1micro_1version_FUNC,
- _1webkit_1get_1minor_1version_FUNC,
- _1webkit_1hit_1test_1result_1context_1is_1link_FUNC,
- _1webkit_1hit_1test_1result_1get_1link_1title_FUNC,
- _1webkit_1hit_1test_1result_1get_1link_1uri_FUNC,
- _1webkit_1javascript_1result_1get_1global_1context_FUNC,
- _1webkit_1javascript_1result_1get_1value_FUNC,
- _1webkit_1javascript_1result_1unref_FUNC,
- _1webkit_1major_1version_FUNC,
- _1webkit_1micro_1version_FUNC,
- _1webkit_1minor_1version_FUNC,
- _1webkit_1navigation_1policy_1decision_1get_1request_FUNC,
- _1webkit_1network_1request_1get_1message_FUNC,
- _1webkit_1network_1request_1get_1uri_FUNC,
- _1webkit_1network_1request_1new_FUNC,
- _1webkit_1policy_1decision_1download_FUNC,
- _1webkit_1policy_1decision_1ignore_FUNC,
- _1webkit_1response_1policy_1decision_1get_1request_FUNC,
- _1webkit_1response_1policy_1decision_1get_1response_FUNC,
- _1webkit_1soup_1auth_1dialog_1get_1type_FUNC,
- _1webkit_1uri_1request_1get_1http_1headers_FUNC,
- _1webkit_1uri_1request_1get_1uri_FUNC,
- _1webkit_1uri_1request_1new_FUNC,
- _1webkit_1uri_1response_1get_1content_1length_FUNC,
- _1webkit_1uri_1response_1get_1mime_1type_FUNC,
- _1webkit_1web_1context_1allow_1tls_1certificate_1for_1host_FUNC,
- _1webkit_1web_1context_1get_1default_FUNC,
- _1webkit_1web_1context_1get_1type_FUNC,
- _1webkit_1web_1context_1get_1website_1data_1manager_FUNC,
- _1webkit_1web_1context_1set_1tls_1errors_1policy_FUNC,
- _1webkit_1web_1context_1set_1web_1extensions_1directory_FUNC,
- _1webkit_1web_1context_1set_1web_1extensions_1initialization_1user_1data_FUNC,
- _1webkit_1web_1data_1source_1get_1data_FUNC,
- _1webkit_1web_1data_1source_1get_1encoding_FUNC,
- _1webkit_1web_1frame_1get_1data_1source_FUNC,
- _1webkit_1web_1frame_1get_1global_1context_FUNC,
- _1webkit_1web_1frame_1get_1load_1status_FUNC,
- _1webkit_1web_1frame_1get_1parent_FUNC,
- _1webkit_1web_1frame_1get_1title_FUNC,
- _1webkit_1web_1frame_1get_1type_FUNC,
- _1webkit_1web_1frame_1get_1uri_FUNC,
- _1webkit_1web_1frame_1get_1web_1view_FUNC,
- _1webkit_1web_1policy_1decision_1download_FUNC,
- _1webkit_1web_1policy_1decision_1ignore_FUNC,
- _1webkit_1web_1resource_1get_1data_FUNC,
- _1webkit_1web_1resource_1get_1data_1finish_FUNC,
- _1webkit_1web_1view_1can_1go_1back_FUNC,
- _1webkit_1web_1view_1can_1go_1forward_FUNC,
- _1webkit_1web_1view_1can_1show_1mime_1type_FUNC,
- _1webkit_1web_1view_1execute_1script_FUNC,
- _1webkit_1web_1view_1get_1context_FUNC,
- _1webkit_1web_1view_1get_1dom_1document_FUNC,
- _1webkit_1web_1view_1get_1estimated_1load_1progress_FUNC,
- _1webkit_1web_1view_1get_1load_1status_FUNC,
- _1webkit_1web_1view_1get_1main_1frame_FUNC,
- _1webkit_1web_1view_1get_1main_1resource_FUNC,
- _1webkit_1web_1view_1get_1page_1id_FUNC,
- _1webkit_1web_1view_1get_1progress_FUNC,
- _1webkit_1web_1view_1get_1settings_FUNC,
- _1webkit_1web_1view_1get_1title_FUNC,
- _1webkit_1web_1view_1get_1type_FUNC,
- _1webkit_1web_1view_1get_1uri_FUNC,
- _1webkit_1web_1view_1get_1window_1features_FUNC,
- _1webkit_1web_1view_1get_1window_1properties_FUNC,
- _1webkit_1web_1view_1go_1back_FUNC,
- _1webkit_1web_1view_1go_1forward_FUNC,
- _1webkit_1web_1view_1load_1bytes_FUNC,
- _1webkit_1web_1view_1load_1html_FUNC,
- _1webkit_1web_1view_1load_1request_FUNC,
- _1webkit_1web_1view_1load_1string_FUNC,
- _1webkit_1web_1view_1load_1uri_FUNC,
- _1webkit_1web_1view_1new_FUNC,
- _1webkit_1web_1view_1reload_FUNC,
- _1webkit_1web_1view_1run_1javascript_FUNC,
- _1webkit_1web_1view_1run_1javascript_1finish_FUNC,
- _1webkit_1web_1view_1stop_1loading_FUNC,
- _1webkit_1website_1data_1manager_1clear_FUNC,
- _1webkit_1window_1properties_1get_1geometry_FUNC,
- memmove_FUNC,
+ JSObjectGetProperty_FUNC,
+ JSObjectGetPropertyAtIndex_FUNC,
+ JSStringCreateWithUTF8CString_FUNC,
+ JSStringGetMaximumUTF8CStringSize_FUNC,
+ JSStringGetUTF8CString_FUNC,
+ JSStringRelease_FUNC,
+ JSValueGetType_FUNC,
+ JSValueToNumber_FUNC,
+ JSValueToStringCopy_FUNC,
+ soup_1cookie_1get_1name_FUNC,
+ soup_1cookie_1get_1value_FUNC,
+ soup_1cookie_1parse_FUNC,
+ soup_1message_1headers_1append_FUNC,
+ soup_1uri_1free_FUNC,
+ soup_1uri_1new_FUNC,
+ webkit_1authentication_1request_1authenticate_FUNC,
+ webkit_1authentication_1request_1cancel_FUNC,
+ webkit_1authentication_1request_1is_1retry_FUNC,
+ webkit_1cookie_1manager_1add_1cookie_FUNC,
+ webkit_1cookie_1manager_1add_1cookie_1finish_FUNC,
+ webkit_1cookie_1manager_1get_1cookies_FUNC,
+ webkit_1cookie_1manager_1get_1cookies_1finish_FUNC,
+ webkit_1credential_1free_FUNC,
+ webkit_1credential_1new_FUNC,
+ webkit_1dom_1event_1target_1add_1event_1listener_FUNC,
+ webkit_1dom_1mouse_1event_1get_1alt_1key_FUNC,
+ webkit_1dom_1mouse_1event_1get_1button_FUNC,
+ webkit_1dom_1mouse_1event_1get_1ctrl_1key_FUNC,
+ webkit_1dom_1mouse_1event_1get_1meta_1key_FUNC,
+ webkit_1dom_1mouse_1event_1get_1screen_1x_FUNC,
+ webkit_1dom_1mouse_1event_1get_1screen_1y_FUNC,
+ webkit_1dom_1mouse_1event_1get_1shift_1key_FUNC,
+ webkit_1dom_1ui_1event_1get_1char_1code_FUNC,
+ webkit_1dom_1ui_1event_1get_1detail_FUNC,
+ webkit_1dom_1ui_1event_1get_1key_1code_FUNC,
+ webkit_1download_1cancel_FUNC,
+ webkit_1download_1get_1received_1data_1length_FUNC,
+ webkit_1download_1get_1request_FUNC,
+ webkit_1download_1get_1response_FUNC,
+ webkit_1download_1get_1type_FUNC,
+ webkit_1download_1get_1web_1view_FUNC,
+ webkit_1download_1set_1allow_1overwrite_FUNC,
+ webkit_1download_1set_1destination_FUNC,
+ webkit_1get_1major_1version_FUNC,
+ webkit_1get_1micro_1version_FUNC,
+ webkit_1get_1minor_1version_FUNC,
+ webkit_1hit_1test_1result_1context_1is_1link_FUNC,
+ webkit_1hit_1test_1result_1get_1link_1title_FUNC,
+ webkit_1hit_1test_1result_1get_1link_1uri_FUNC,
+ webkit_1javascript_1result_1get_1global_1context_FUNC,
+ webkit_1javascript_1result_1get_1value_FUNC,
+ webkit_1javascript_1result_1unref_FUNC,
+ webkit_1navigation_1policy_1decision_1get_1request_FUNC,
+ webkit_1policy_1decision_1download_FUNC,
+ webkit_1policy_1decision_1ignore_FUNC,
+ webkit_1response_1policy_1decision_1get_1request_FUNC,
+ webkit_1response_1policy_1decision_1get_1response_FUNC,
+ webkit_1security_1manager_1register_1uri_1scheme_1as_1secure_FUNC,
+ webkit_1uri_1request_1get_1http_1headers_FUNC,
+ webkit_1uri_1request_1get_1uri_FUNC,
+ webkit_1uri_1request_1new_FUNC,
+ webkit_1uri_1response_1get_1content_1length_FUNC,
+ webkit_1uri_1response_1get_1mime_1type_FUNC,
+ webkit_1uri_1scheme_1request_1finish_FUNC,
+ webkit_1uri_1scheme_1request_1get_1uri_FUNC,
+ webkit_1uri_1scheme_1request_1get_1web_1view_FUNC,
+ webkit_1user_1content_1manager_1add_1script_FUNC,
+ webkit_1user_1content_1manager_1remove_1all_1scripts_FUNC,
+ webkit_1user_1script_1new_FUNC,
+ webkit_1user_1script_1unref_FUNC,
+ webkit_1web_1context_1allow_1tls_1certificate_1for_1host_FUNC,
+ webkit_1web_1context_1get_1cookie_1manager_FUNC,
+ webkit_1web_1context_1get_1default_FUNC,
+ webkit_1web_1context_1get_1security_1manager_FUNC,
+ webkit_1web_1context_1get_1type_FUNC,
+ webkit_1web_1context_1get_1website_1data_1manager_FUNC,
+ webkit_1web_1context_1register_1uri_1scheme_FUNC,
+ webkit_1web_1context_1set_1tls_1errors_1policy_FUNC,
+ webkit_1web_1resource_1get_1data_FUNC,
+ webkit_1web_1resource_1get_1data_1finish_FUNC,
+ webkit_1web_1view_1can_1go_1back_FUNC,
+ webkit_1web_1view_1can_1go_1forward_FUNC,
+ webkit_1web_1view_1can_1show_1mime_1type_FUNC,
+ webkit_1web_1view_1get_1context_FUNC,
+ webkit_1web_1view_1get_1estimated_1load_1progress_FUNC,
+ webkit_1web_1view_1get_1main_1resource_FUNC,
+ webkit_1web_1view_1get_1page_1id_FUNC,
+ webkit_1web_1view_1get_1settings_FUNC,
+ webkit_1web_1view_1get_1title_FUNC,
+ webkit_1web_1view_1get_1uri_FUNC,
+ webkit_1web_1view_1get_1user_1content_1manager_FUNC,
+ webkit_1web_1view_1get_1window_1properties_FUNC,
+ webkit_1web_1view_1go_1back_FUNC,
+ webkit_1web_1view_1go_1forward_FUNC,
+ webkit_1web_1view_1load_1bytes_FUNC,
+ webkit_1web_1view_1load_1html_FUNC,
+ webkit_1web_1view_1load_1request_FUNC,
+ webkit_1web_1view_1load_1uri_FUNC,
+ webkit_1web_1view_1new_FUNC,
+ webkit_1web_1view_1new_1with_1related_1view_FUNC,
+ webkit_1web_1view_1reload_FUNC,
+ webkit_1web_1view_1run_1javascript_FUNC,
+ webkit_1web_1view_1run_1javascript_1finish_FUNC,
+ webkit_1web_1view_1stop_1loading_FUNC,
+ webkit_1website_1data_1manager_1clear_FUNC,
+ webkit_1window_1properties_1get_1geometry_FUNC,
} WebKitGTK_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c
index 3c84951e3e..def783962c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c
@@ -59,82 +59,3 @@ void setGdkRectangleFields(JNIEnv *env, jobject lpObject, GdkRectangle *lpStruct
}
#endif
-#ifndef NO_JSClassDefinition
-typedef struct JSClassDefinition_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID version, attributes, className, parentClass, staticValues, staticFunctions, initialize, finalize, hasProperty, getProperty, setProperty, deleteProperty, getPropertyNames, callAsFunction, callAsConstructor, hasInstance, convertToType;
-} JSClassDefinition_FID_CACHE;
-
-JSClassDefinition_FID_CACHE JSClassDefinitionFc;
-
-void cacheJSClassDefinitionFields(JNIEnv *env, jobject lpObject)
-{
- if (JSClassDefinitionFc.cached) return;
- JSClassDefinitionFc.clazz = (*env)->GetObjectClass(env, lpObject);
- JSClassDefinitionFc.version = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "version", "I");
- JSClassDefinitionFc.attributes = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "attributes", "I");
- JSClassDefinitionFc.className = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "className", "J");
- JSClassDefinitionFc.parentClass = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "parentClass", "J");
- JSClassDefinitionFc.staticValues = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "staticValues", "J");
- JSClassDefinitionFc.staticFunctions = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "staticFunctions", "J");
- JSClassDefinitionFc.initialize = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "initialize", "J");
- JSClassDefinitionFc.finalize = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "finalize", "J");
- JSClassDefinitionFc.hasProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "hasProperty", "J");
- JSClassDefinitionFc.getProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "getProperty", "J");
- JSClassDefinitionFc.setProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "setProperty", "J");
- JSClassDefinitionFc.deleteProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "deleteProperty", "J");
- JSClassDefinitionFc.getPropertyNames = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "getPropertyNames", "J");
- JSClassDefinitionFc.callAsFunction = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "callAsFunction", "J");
- JSClassDefinitionFc.callAsConstructor = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "callAsConstructor", "J");
- JSClassDefinitionFc.hasInstance = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "hasInstance", "J");
- JSClassDefinitionFc.convertToType = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "convertToType", "J");
- JSClassDefinitionFc.cached = 1;
-}
-
-JSClassDefinition *getJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct)
-{
- if (!JSClassDefinitionFc.cached) cacheJSClassDefinitionFields(env, lpObject);
- lpStruct->version = (*env)->GetIntField(env, lpObject, JSClassDefinitionFc.version);
- lpStruct->attributes = (*env)->GetIntField(env, lpObject, JSClassDefinitionFc.attributes);
- lpStruct->className = (const char*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.className);
- lpStruct->parentClass = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.parentClass);
- lpStruct->staticValues = (const void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.staticValues);
- lpStruct->staticFunctions = (const void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.staticFunctions);
- lpStruct->initialize = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.initialize);
- lpStruct->finalize = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.finalize);
- lpStruct->hasProperty = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.hasProperty);
- lpStruct->getProperty = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.getProperty);
- lpStruct->setProperty = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.setProperty);
- lpStruct->deleteProperty = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.deleteProperty);
- lpStruct->getPropertyNames = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.getPropertyNames);
- lpStruct->callAsFunction = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.callAsFunction);
- lpStruct->callAsConstructor = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.callAsConstructor);
- lpStruct->hasInstance = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.hasInstance);
- lpStruct->convertToType = (void*)(*env)->GetLongField(env, lpObject, JSClassDefinitionFc.convertToType);
- return lpStruct;
-}
-
-void setJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct)
-{
- if (!JSClassDefinitionFc.cached) cacheJSClassDefinitionFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, JSClassDefinitionFc.version, (jint)lpStruct->version);
- (*env)->SetIntField(env, lpObject, JSClassDefinitionFc.attributes, (jint)lpStruct->attributes);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.className, (jlong)lpStruct->className);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.parentClass, (jlong)lpStruct->parentClass);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.staticValues, (jlong)lpStruct->staticValues);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.staticFunctions, (jlong)lpStruct->staticFunctions);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.initialize, (jlong)lpStruct->initialize);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.finalize, (jlong)lpStruct->finalize);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.hasProperty, (jlong)lpStruct->hasProperty);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.getProperty, (jlong)lpStruct->getProperty);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.setProperty, (jlong)lpStruct->setProperty);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.deleteProperty, (jlong)lpStruct->deleteProperty);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.getPropertyNames, (jlong)lpStruct->getPropertyNames);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.callAsFunction, (jlong)lpStruct->callAsFunction);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.callAsConstructor, (jlong)lpStruct->callAsConstructor);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.hasInstance, (jlong)lpStruct->hasInstance);
- (*env)->SetLongField(env, lpObject, JSClassDefinitionFc.convertToType, (jlong)lpStruct->convertToType);
-}
-#endif
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h
index 6f76f55a3f..a1b0b894b8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2019 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -30,15 +30,3 @@ void setGdkRectangleFields(JNIEnv *env, jobject lpObject, GdkRectangle *lpStruct
#define GdkRectangle_sizeof() 0
#endif
-#ifndef NO_JSClassDefinition
-void cacheJSClassDefinitionFields(JNIEnv *env, jobject lpObject);
-JSClassDefinition *getJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct);
-void setJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct);
-#define JSClassDefinition_sizeof() sizeof(JSClassDefinition)
-#else
-#define cacheJSClassDefinitionFields(a,b)
-#define getJSClassDefinitionFields(a,b,c) NULL
-#define setJSClassDefinitionFields(a,b,c)
-#define JSClassDefinition_sizeof() 0
-#endif
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index 84ffab7f63..e797734421 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2018 IBM Corporation and others.
+ * Copyright (c) 2010, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -15,9 +15,6 @@
package org.eclipse.swt.browser;
-import static org.eclipse.swt.internal.webkit.WebKitGTK.WEBKIT1;
-import static org.eclipse.swt.internal.webkit.WebKitGTK.WEBKIT2;
-
import java.io.*;
import java.lang.reflect.*;
import java.net.*;
@@ -31,79 +28,43 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
import org.eclipse.swt.internal.webkit.*;
import org.eclipse.swt.internal.webkit.GdkRectangle;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
/**
- * Webkit2 port developer architecture notes: (Dec 2017)
- * ##########################################
- * I'm (Leo Ufimtsev) writing this as part of the completion of the webkit1->webkit2 port,
- * so that either swt/webkit2 maintainers or maybe webkit3 port-guy has a better understanding
- * of what's going on.
- * I didn't write the initial webkit1 implementation and only wrote half of the webkit2 port. So I don't
- * know the details/reasons behind webkit1 decisions too well, I can only speculate.
- *
- *
* VERSIONS:
* Versioning for webkit is somewhat confusing because it's trying to incorporate webkit, gtk and (various linux distribution) versions.
* The way they version webkitGTK is different from webkit.
* WebkitGTK:
- * 2.4 is the last webkit1 version. [2.0-2.4) is Gtk3.
* 2.5 is webkit2. [2.4-..) is Gtk3.
- * Further, linux distributions might refer to webkit1/2 bindings linked against gtk2/3 differently.
+ * Further, linux distributions might refer to webkit2 bindings linked against gtk3 differently.
* E.g on Fedora:
- * webkitgtk3 = Webkit1 / Gtk3
* webkitgtk4 = webkit2 / Gtk3
+ * webkit2gtk3 = WebKit2/ Gtk3
*
- * Webkit1 & Webkit2 loading:
- * - This code dynamically uses either webkit1 or webkit2 depending on what's available.
+ * Webkit2 loading:
* - Dynamic bindings are auto generated and linked when the @dynamic keyword is used in WebKitGTK.java
* Unlike in OS.java, you don't have to add any code saying what lib the dynamic method is linked to. It's auto-linked to webkit lib by default.
* - At no point should you have hard-compiled code, because this will cause crashes on older machines without webkit2.
* (the exception is the webextension, because it runs as a separate process and is only loaded dynamically).
* - Try to keep all of your logic in Java and avoid writing custom C-code. (I went down this pit). Because if you
* use native code, then you have to write dynamic native code (get function pointers, cast types etc.. big pain in the ass).
- * (Webextension is again an exception).
* - Don't try to add webkit2 include flags to pkg-config, as this will tie the swt-glue code to specific webkit versions. Thou shall not do this.
- * (webextension is an exception).
- *
- * Webextension:
- * - Webkit1 implemented javascript execution and function callback by calling javascript core directly, but on webkit2 we can't do this anymore since
- * webkit2 runs the network logic in a separate process.
- * - On Webkit2, a webextension is used to provide browserfunction/javascript callback functionality. (See the whole WebkitGDBus.java business).
- * - I've initially implemented javascript execution by running javascript and then waiting in a display-loop until webkit makes a return call.
- * I then added a whole bunch of logic to avoid deadlocks.
- * In retrospec, the better approach would be to send things off via GDBus and let the webextension run the javascript synchronously.
- * But this would take another 1-2 months of implementation time and wouldn't guarantee dead-lock free behaviour as callbacks could potentailly still
- * cause deadlocks. It's an interesting thought however..
- * - Note, most GDBus tutorials talk about compiling GDBus bindings. But using them dynamically I found is much easier. See this guide:
- * http://www.cs.grinnell.edu/~rebelsky/Courses/CSC195/2013S/Outlines/
- *
*
* EVENT_HANDLING_DOC:
- * - On Pre-webkit1.4, event handles (mouseMove/Click/keyoard/Dnd etc..) were implemented as javascript hooks.
- * but if javascript was not enabled, hooks would not work either.
- * - On Post-Webkit1.4 gtk provided DOM hooks that generated signals. There still seems to be some strange logic
- * that either uses javascript or webkitDom events to generate the equivalent SWT.MouseDown/SWT.Key* events etc...
- * I haven't really taken the time to fully understand why there's such a mix and musch between the two. I just left the code as is.
* - On webkit2, signals are implemented via regular gtk mechanism, hook events and pass them along as we receive them.
* I haven't found a need to use the dom events, because webkitgtk seems to adequately meet the requirements via regular gtk
* events, but maybe I missed something? Who knows.
- * - With that said, I haven't done a deep dive/investigation in how things work. It works, so I left it.
*
* setUrl(..) with 'post data' was implemented in a very hacky way, via native Java due to missing webkit2gtk api.
* It's the best that could be done at the time, but it could result in strange behavior like some webpages loading in funky ways if post-data is used.
*
* Some good resources that I found are as following:
- * - Webkit1 reference: https://webkitgtk.org/reference/webkitgtk/unstable/
* - Webkit2 reference: https://webkitgtk.org/reference/webkit2gtk/stable/
*
- * - My github repository has a lot of snippets to prototype individual features (e.g gdbus, barebone webkit extension, GVariants etc..):
- * https://github.com/LeoUfimtsev/LeoGtk3
- * Be also mindful about snippets found in org.eclipse.swt.gtk.linux.x86_64 -> snippets -> widget.browser.
- *
* - To understand GDBus, consider reading this guide:
* http://www.cs.grinnell.edu/~rebelsky/Courses/CSC195/2013S/Outlines/
* And then see the relevant reference I made in WebkitGDBus.java.
@@ -122,32 +83,30 @@ import org.eclipse.swt.widgets.*;
* ~May the force be with you.
*/
class WebKit extends WebBrowser {
- /**
- * WebKitWebView
- * Note, as of time at compleating webkit2, (18th April 2018, we )
- */
long webView;
- long scrolledWindow;
long pageId;
- /** Webkit1 only. Used by the externalObject for javascript callback to java. */
- long webViewData;
-
int failureCount, lastKeyCode, lastCharCode;
- String postData; // Webkit1 only.
- String[] headers; // Webkit1 only.
- byte[] htmlBytes; // Webkit1 only.
- boolean loadingText, untrustedText; // Webkit1 only.
- BrowserFunction eventFunction; //Webkit1 only.
-
- boolean ignoreDispose; // Webkit1 & Webkit2.
+ boolean ignoreDispose;
boolean tlsError;
long tlsErrorCertificate;
String tlsErrorUriString;
URI tlsErrorUri;
String tlsErrorType;
+ boolean firstLoad = true;
+ static boolean FirstCreate = true;
+
+ /**
+ * Stores the browser which is opening a new browser window,
+ * during a WebKit {@code create} signal. This browser
+ * must be passed to a newly created browser as "related".
+ *
+ * See bug 579257.
+ */
+ private static Browser parentBrowser;
+
/**
* Timeout used for javascript execution / deadlock detection.
* Loosely based on the 10s limit commonly found in browsers.
@@ -155,12 +114,13 @@ class WebKit extends WebBrowser {
* https://www.nczonline.net/blog/2009/01/05/what-determines-that-a-script-is-long-running/
* https://stackoverflow.com/questions/3030024/maximum-execution-time-for-javascript
*/
- static final int ASYNC_EXEC_TIMEOUT_MS = 10000; // Webkit2.
+ static final int ASYNC_EXEC_TIMEOUT_MS = 10000;
- static boolean bug522733FirstInstanceCreated = false; //Webkit2 workaround for Bug 522733
+ /** Workaround for bug 522733 */
+ static boolean bug522733FirstInstanceCreated = false;
/** Part of workaround in Bug 527738. Prevent old request overring newer request */
- static AtomicInteger w2_bug527738LastRequestCounter = new AtomicInteger(); // Webkit 2 only (Bug 527738)
+ static AtomicInteger w2_bug527738LastRequestCounter = new AtomicInteger();
/**
* Webkit2: In a few situations, evaluate() should not wait for it's asynchronous callback to finish.
@@ -176,14 +136,7 @@ class WebKit extends WebBrowser {
*/
private static int nonBlockingEvaluate = 0;
- static int DisabledJSCount;
-
- /** Webkit1 only. Used for callJava. See JSObjectHasPropertyProc */
- static long ExternalClass;
-
- static long PostString, WebViewType;
- static Map<LONG, LONG> WindowMappings = new HashMap<> ();
- static Map<LONG, Integer> webKitDownloadStatus = new HashMap<> (); // Webkit2
+ static Map<LONG, Integer> webKitDownloadStatus = new HashMap<> ();
static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
static final String CLASSNAME_EXTERNAL = "External"; //$NON-NLS-1$
@@ -216,257 +169,114 @@ class WebKit extends WebBrowser {
static final String DOMEVENT_MOUSEOVER = "mouseover"; //$NON-NLS-1$
static final String DOMEVENT_MOUSEWHEEL = "mousewheel"; //$NON-NLS-1$
+ static final byte[] SWT_PROTOCOL = Converter.wcsToMbcs("swt", true); // $NON-NLS-1$
+ static final byte[] JSON_MIME_TYPE = Converter.wcsToMbcs("application/json", true); // $NON-NLS-1$
+
/* WebKit signal data */
- static final int HOVERING_OVER_LINK = 1;
- static final int NOTIFY_PROGRESS = 2;
- static final int NAVIGATION_POLICY_DECISION_REQUESTED = 3;
- static final int NOTIFY_TITLE = 4;
- static final int POPULATE_POPUP = 5;
- static final int STATUS_BAR_TEXT_CHANGED = 6; // webkit1 only.
- static final int CREATE_WEB_VIEW = 7;
- static final int WEB_VIEW_READY = 8;
- static final int NOTIFY_LOAD_STATUS = 9;
- static final int RESOURCE_REQUEST_STARTING = 10;
- static final int DOWNLOAD_REQUESTED = 11; // Webkit1
- static final int MIME_TYPE_POLICY_DECISION_REQUESTED = 12;
- static final int CLOSE_WEB_VIEW = 13;
- static final int WINDOW_OBJECT_CLEARED = 14;
- static final int CONSOLE_MESSAGE = 15;
- static final int LOAD_CHANGED = 16;
- static final int DECIDE_POLICY = 17;
- static final int MOUSE_TARGET_CHANGED = 18;
- static final int CONTEXT_MENU = 19;
- static final int AUTHENTICATE = 20;
- static final int DECIDE_DESTINATION = 21; // webkit2 only.
- static final int FAILED = 22; // webkit2 only.
- static final int FINISHED = 23; // webkit2 only.
- static final int DOWNLOAD_STARTED = 24; // Webkit2 (webkit1 equivalent is DOWNLOAD_REQUESTED)
- static final int WIDGET_EVENT = 25; // Webkit2. Used for events like keyboard/mouse input. See Bug 528549 and Bug 533833.
- static final int LOAD_FAILED_TLS = 26; // Webkit2 only
+ static final int NOTIFY_PROGRESS = 1;
+ static final int NOTIFY_TITLE = 2;
+ static final int CREATE_WEB_VIEW = 3;
+ static final int WEB_VIEW_READY = 4;
+ static final int CLOSE_WEB_VIEW = 5;
+ static final int LOAD_CHANGED = 6;
+ static final int DECIDE_POLICY = 7;
+ static final int MOUSE_TARGET_CHANGED = 8;
+ static final int CONTEXT_MENU = 9;
+ static final int AUTHENTICATE = 10;
+ static final int DECIDE_DESTINATION = 11;
+ static final int FAILED = 12;
+ static final int FINISHED = 13;
+ static final int DOWNLOAD_STARTED = 14;
+ static final int WIDGET_EVENT = 15; // Used for events like keyboard/mouse input. See Bug 528549 and Bug 533833.
+ static final int LOAD_FAILED_TLS = 16;
static final String KEY_CHECK_SUBWINDOW = "org.eclipse.swt.internal.control.checksubwindow"; //$NON-NLS-1$
static final String SWT_WEBKITGTK_VERSION = "org.eclipse.swt.internal.webkitgtk.version"; //$NON-NLS-1$
/* the following Callbacks are never freed */
- static Callback Proc2, Proc3, Proc4, Proc5, Proc6;
-
+ static Callback Proc2, Proc3, Proc4, Proc5, JSDOMEventProc, RequestProc;
- /**
- * Webkit1 only: For javascript to call java via it's 'callJava'.
- * For webkit2, see Webkit2JavaCallback.
- *
- * Webkit1: - callJava is implemented via an external object
- * - Creates an object 'external' on javascipt side.
- * -- see create(..) where it's initialized
- * -- see webkit_window_object_cleared where it re-creates it on page-reloads
- * - Javascript will call 'external.callJava' (where callJava is a property of 'external').
- * this triggers JSObjectGetPropertyProc(..) callback, which initializes callJava function.
- * Then the external.callJava reaches JSObjectCallAsFunctionProc(..) and subsequently WebKit.java:callJava(..) is called.
- */
- static Callback JSObjectHasPropertyProc, JSObjectGetPropertyProc, JSObjectCallAsFunctionProc; // webkit1 only.
-
- /** Webkit1 & Webkit2, Process key/mouse events from javascript. */
- static Callback JSDOMEventProc;
-
- /** Flag indicating whether TLS errors (like self-signed certificates) are to be ignored. Webkit2 only.*/
+ /** Flag indicating whether TLS errors (like self-signed certificates) are to be ignored. */
static final boolean ignoreTls;
static {
- WebViewType = WebKitGTK.webkit_web_view_get_type ();
Proc2 = new Callback (WebKit.class, "Proc", 2); //$NON-NLS-1$
- if (Proc2.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
Proc3 = new Callback (WebKit.class, "Proc", 3); //$NON-NLS-1$
- if (Proc3.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
Proc4 = new Callback (WebKit.class, "Proc", 4); //$NON-NLS-1$
- if (Proc4.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
Proc5 = new Callback (WebKit.class, "Proc", 5); //$NON-NLS-1$
- if (Proc5.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- Proc6 = new Callback (WebKit.class, "Proc", 6); //$NON-NLS-1$
- if (Proc6.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- if (WEBKIT2) {
- new Webkit2AsyncToSync();
- }
-
- if (WEBKIT2) {
- Webkit2Extension.init();
- } else {
- JSObjectHasPropertyProc = new Callback (WebKit.class, "JSObjectHasPropertyProc", 3); //$NON-NLS-1$
- if (JSObjectHasPropertyProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- JSObjectGetPropertyProc = new Callback (WebKit.class, "JSObjectGetPropertyProc", 4); //$NON-NLS-1$
- if (JSObjectGetPropertyProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- JSObjectCallAsFunctionProc = new Callback (WebKit.class, "JSObjectCallAsFunctionProc", 6); //$NON-NLS-1$
- if (JSObjectCallAsFunctionProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- }
+ new Webkit2AsyncToSync();
JSDOMEventProc = new Callback (WebKit.class, "JSDOMEventProc", 3); //$NON-NLS-1$
- if (JSDOMEventProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ RequestProc = new Callback (WebKit.class, "RequestProc", 2); //$NON-NLS-1$
NativeClearSessions = () -> {
if (!WebKitGTK.LibraryLoaded) return;
-
- if (WEBKIT2) {
- if (WebKitGTK.webkit_get_minor_version() >= 16) {
- // TODO: webkit_website_data_manager_clear currently does not
- // support more fine grained removals. (I.e, session vs all cookies)
- long context = WebKitGTK.webkit_web_context_get_default();
- long manager = WebKitGTK.webkit_web_context_get_website_data_manager (context);
- WebKitGTK.webkit_website_data_manager_clear(manager, WebKitGTK.WEBKIT_WEBSITE_DATA_COOKIES, 0, 0, 0, 0);
- } else {
- System.err.println("SWT Webkit. Warning, clear cookies only supported on Webkitgtk version 2.16 and above. Your version is:" + internalGetWebKitVersionStr());
- }
+ if (WebKitGTK.webkit_get_minor_version() >= 16) {
+ long context = WebKitGTK.webkit_web_context_get_default();
+ long manager = WebKitGTK.webkit_web_context_get_website_data_manager (context);
+ WebKitGTK.webkit_website_data_manager_clear(manager, WebKitGTK.WEBKIT_WEBSITE_DATA_COOKIES, 0, 0, 0, 0);
} else {
- long session = WebKitGTK.webkit_get_default_session ();
- long type = WebKitGTK.soup_cookie_jar_get_type ();
- long jar = WebKitGTK.soup_session_get_feature (session, type);
- if (jar == 0) return;
- long cookies = WebKitGTK.soup_cookie_jar_all_cookies (jar);
- int length = OS.g_slist_length (cookies);
- long current = cookies;
- for (int i = 0; i < length; i++) {
- long cookie = OS.g_slist_data (current);
- long expires = WebKitGTK.SoupCookie_expires (cookie);
- if (expires == 0) {
- /* indicates a session cookie */
- WebKitGTK.soup_cookie_jar_delete_cookie (jar, cookie);
- }
- WebKitGTK.soup_cookie_free (cookie);
- current = OS.g_slist_next (current);
- }
- OS.g_slist_free (cookies);
+ System.err.println("SWT WebKit: clear sessions only supported on WebKitGtk version 2.16 and above. "
+ + "Your version is: " + internalGetWebKitVersionStr());
}
-
};
NativeGetCookie = () -> {
if (!WebKitGTK.LibraryLoaded) return;
-
- if (WEBKIT2) {
- // TODO - implement equivalent. Bug 522181
- // Currently 'webkit_get_default_session()' is a webkit1-only function.
- // If it's reached by webkit2, the whole JVM crashes. Better skip for now.
- return;
- }
-
- long session = WebKitGTK.webkit_get_default_session ();
- long type = WebKitGTK.soup_cookie_jar_get_type ();
- long jar = WebKitGTK.soup_session_get_feature (session, type);
- if (jar == 0) return;
- byte[] bytes = Converter.wcsToMbcs (CookieUrl, true);
- long uri = WebKitGTK.soup_uri_new (bytes);
- if (uri == 0) return;
- long cookies = WebKitGTK.soup_cookie_jar_get_cookies (jar, uri, 0);
- WebKitGTK.soup_uri_free (uri);
- if (cookies == 0) return;
- int length = C.strlen (cookies);
- bytes = new byte[length];
- C.memmove (bytes, cookies, length);
- OS.g_free (cookies);
- String allCookies = new String (Converter.mbcsToWcs (bytes));
- StringTokenizer tokenizer = new StringTokenizer (allCookies, ";"); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens ()) {
- String cookie = tokenizer.nextToken ();
- int index = cookie.indexOf ('=');
- if (index != -1) {
- String name = cookie.substring (0, index).trim ();
- if (name.equals (CookieName)) {
- CookieValue = cookie.substring (index + 1).trim ();
- return;
- }
- }
+ if (WebKitGTK.webkit_get_minor_version() >= 20) {
+ CookieValue = Webkit2AsyncToSync.getCookie(CookieUrl, CookieName);
+ } else {
+ System.err.println("SWT WebKit: getCookie() only supported on WebKitGTK version 2.20 and above. "
+ + "Your version is: " + internalGetWebKitVersionStr());
}
};
NativeSetCookie = () -> {
if (!WebKitGTK.LibraryLoaded) return;
-
- if (WEBKIT2) {
- // TODO - implement equivalent. Bug 522181
- // Currently 'webkit_get_default_session()' is a webkit1-only function.
- // If it's reached by webkit2, the whole JVM crashes. Better skip for now.
- return;
- }
-
- long session = WebKitGTK.webkit_get_default_session ();
- long type = WebKitGTK.soup_cookie_jar_get_type ();
- long jar = WebKitGTK.soup_session_get_feature (session, type);
- if (jar == 0) {
- /* this happens if a navigation has not occurred yet */
- WebKitGTK.soup_session_add_feature_by_type (session, type);
- jar = WebKitGTK.soup_session_get_feature (session, type);
- }
- if (jar == 0) return;
- byte[] bytes = Converter.wcsToMbcs (CookieUrl, true);
- long uri = WebKitGTK.soup_uri_new (bytes);
- if (uri == 0) return;
- bytes = Converter.wcsToMbcs (CookieValue, true);
- long cookie = WebKitGTK.soup_cookie_parse (bytes, uri);
- if (cookie != 0) {
- WebKitGTK.soup_cookie_jar_add_cookie (jar, cookie);
- // the following line is intentionally commented
- // WebKitGTK.soup_cookie_free (cookie);
- CookieResult = true;
+ if (WebKitGTK.webkit_get_minor_version() >= 20) {
+ CookieResult = Webkit2AsyncToSync.setCookie(CookieUrl, CookieValue);
+ } else {
+ System.err.println("SWT WebKit: setCookie() only supported on WebKitGTK version 2.20 and above. "
+ + "Your version is: " + internalGetWebKitVersionStr());
}
- WebKitGTK.soup_uri_free (uri);
};
if (NativePendingCookies != null) {
SetPendingCookies (NativePendingCookies);
NativePendingCookies = null;
}
- ignoreTls = WEBKIT2 && "true".equals(System.getProperty("org.eclipse.swt.internal.webkitgtk.ignoretlserrors"));
+ ignoreTls = "true".equals(System.getProperty("org.eclipse.swt.internal.webkitgtk.ignoretlserrors"));
}
@Override
public void createFunction(BrowserFunction function) {
- if (WEBKIT2) {
- if (!WebkitGDBus.initialized) {
- System.err.println("SWT webkit: WebkitGDBus and/or Webkit2Extension not loaded, BrowserFunction will not work." +
- "Tried to create "+ function.name);
- return;
- }
- }
super.createFunction(function);
- if (WEBKIT2) {
- String url = this.getUrl().isEmpty() ? "nullURL" : this.getUrl();
- /*
- * If the proxy to the extension has not yet been loaded, store the BrowserFunction page ID,
- * function string, and URL in a HashMap. Once the proxy to the extension is loaded, these
- * functions will be sent to and registered in the extension.
- */
- if (!WebkitGDBus.proxyToExtension) {
- WebkitGDBus.functionsPending = true;
- ArrayList<ArrayList<String>> list = new ArrayList<>();
- ArrayList<String> functionAndUrl = new ArrayList<>();
- functionAndUrl.add(0, function.functionString);
- functionAndUrl.add(1, url);
- list.add(functionAndUrl);
- ArrayList<ArrayList<String>> existing = WebkitGDBus.pendingBrowserFunctions.putIfAbsent(this.pageId, list);
- if (existing != null) {
- existing.add(functionAndUrl);
- }
- } else {
- // If the proxy to the extension is already loaded, register the function in the extension via DBus
- boolean successful = webkit_extension_modify_function(this.pageId, function.functionString, url, "register");
- if (!successful) {
- System.err.println("SWT webkit: failure registering BrowserFunction " + function.name);
- }
- }
- }
+ updateUserScript();
}
@Override
public void destroyFunction (BrowserFunction function) {
- // Only deregister functions if the proxy to the extension has been loaded
- if (WebkitGDBus.proxyToExtension && WEBKIT2) {
- String url = this.getUrl().isEmpty() ? "nullURL" : this.getUrl();
- boolean successful = webkit_extension_modify_function(this.pageId, function.functionString, url, "deregister");
- if (!successful) {
- System.err.println("SWT webkit: failure deregistering BrowserFunction from extension " + function.name);
+ super.destroyFunction(function);
+ updateUserScript();
+ }
+
+ void updateUserScript() {
+ // Maintain a script bundle of BrowserFunctions to be injected on page navigation or reload.
+ long manager = WebKitGTK.webkit_web_view_get_user_content_manager(webView);
+ WebKitGTK.webkit_user_content_manager_remove_all_scripts(manager);
+ if (!functions.isEmpty()) {
+ StringBuilder sb = new StringBuilder();
+ for (BrowserFunction function : functions.values()) {
+ sb.append(function.functionString);
}
+ sb.append('\0');
+ byte[] scriptData = sb.toString().getBytes(StandardCharsets.UTF_8);
+ long script = WebKitGTK.webkit_user_script_new(
+ scriptData, WebKitGTK.WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, WebKitGTK.WEBKIT_USER_CONTENT_INJECT_TOP_FRAME, 0, 0);
+ WebKitGTK.webkit_user_content_manager_add_script(manager, script);
+ WebKitGTK.webkit_user_script_unref(script);
}
- super.destroyFunction(function);
}
private static String getInternalErrorMsg () {
@@ -490,171 +300,16 @@ class WebKit extends WebBrowser {
return sw.toString();
}
- /**
- * This class deals with the Webkit2 extension.
- *
- * Extension is separately loaded and deals Javascript callbacks to Java.
- * Extension is needed so that Javascript can receive a return value from Java
- * (for which currently there is no api in WebkitGtk 2.18)
- */
- static class Webkit2Extension {
- /** Note, if updating this, you need to change it also in webkitgtk_extension.c */
- private static final String javaScriptFunctionName = "webkit2callJava"; // $NON-NLS-1$
- private static final String webkitWebExtensionIdentifier = "webkitWebExtensionIdentifer"; // $NON-NLS-1$
- private static Callback initializeWebExtensions_callback;
- private static int uniqueID = OS.getpid();
-
- /**
- * Don't continue initialization if something failed. This allows Browser to carryout some functionality
- * even if the webextension failed to load.
- */
- private static boolean loadFailed;
-
- static String getJavaScriptFunctionName() {
- return javaScriptFunctionName;
- }
- static String getWebExtensionIdentifer() {
- return webkitWebExtensionIdentifier;
- }
- static String getJavaScriptFunctionDeclaration(long webView) {
- return "if (!window.callJava) {\n"
- + " window.callJava = function callJava(index, token, args) {\n"
- + " return " + javaScriptFunctionName + "('" + String.valueOf(webView) + "', index, token, args);\n"
- + " }\n"
- + "};\n";
- }
-
- static void init() {
- /*
- * Initialize GDBus before the extension, as the extension initialization callback at the C level
- * sends data back to SWT via GDBus. Failure to load GDBus here will result in crashes.
- * See bug 536141.
- */
- gdbus_init();
- initializeWebExtensions_callback = new Callback(Webkit2Extension.class, "initializeWebExtensions_callback", void.class, new Type [] {long.class, long.class});
- if (initializeWebExtensions_callback.getAddress() == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- if (WebKitGTK.webkit_get_minor_version() >= 4) { // Callback exists only since 2.04
- OS.g_signal_connect (WebKitGTK.webkit_web_context_get_default(), WebKitGTK.initialize_web_extensions, initializeWebExtensions_callback.getAddress(), 0);
- }
- }
-
- /**
- * GDbus initialization can cause performance slow downs. So we int GDBus in lazy way.
- * It can be initialized upon first use of BrowserFunction.
- */
- static boolean gdbus_init() {
- if (WebKitGTK.webkit_get_minor_version() < 4) {
- System.err.println("SWT Webkit: Warning, You are using an old version of webkitgtk. (pre 2.4)"
- + " BrowserFunction functionality will not be avaliable");
- return false;
- }
-
-
- if (!loadFailed) {
- WebkitGDBus.init(String.valueOf(uniqueID));
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * This callback is called to initialize webextension.
- * It is the optimum place to set extension directory and set initialization user data.
- *
- * I've experimented with loading webextension later (to see if we can get performance gains),
- * but found breakage. Webkitgtk doc says it should be loaded as early as possible and specifically best
- * to do it in this calllback.
- *
- * See documenation: WebKitWebExtension (Description)
- */
- @SuppressWarnings("unused") // Only called directly from C
- private static void initializeWebExtensions_callback (long WebKitWebContext, long user_data) {
- // 1) GDBus:
- // Normally we'd first initialize gdbus channel. But gdbus makes Browser slower and isn't always needed.
- // So WebkitGDBus is lazy-initialized, although it can be initialized here if gdbus is ever needed
- // for more than BrowserFunction, like:
- // WebkitGDBus.init(String.valueOf(uniqueID));
- // Also consider only loading gdbus if the extension initialized properly.
-
- // 2) Load Webkit Extension:
- // Webkit extensions should be in their own directory.
- String swtVersion = Library.getVersionString();
- File extension;
- try {
- extension = Library.findResource("webkitextensions" + swtVersion ,"swt-webkit2extension", true);
- if (extension == null){
- throw new UnsatisfiedLinkError("SWT Webkit could not find it's webextension");
- }
- } catch (UnsatisfiedLinkError e) {
- System.err.println("SWT Webkit.java Error: Could not find webkit extension. BrowserFunction functionality will not be available. \n"
- + "(swt version: " + swtVersion + ")" + WebKitGTK.swtWebkitGlueCodeVersion + WebKitGTK.swtWebkitGlueCodeVersionInfo);
- int [] vers = internalGetWebkitVersion();
- System.err.println(String.format("WebKit2Gtk version %s.%s.%s", vers[0], vers[1], vers[2]));
- System.err.println(getInternalErrorMsg());
- loadFailed = true;
- return;
- }
-
- String extensionsFolder = extension.getParent();
- /* Dev note:
- * As per
- * - WebkitSrc: WebKitExtensionManager.cpp,
- * - IRC discussion with annulen
- * you cannot load the webextension GModule directly, (webkitgtk 2.18). You can only specify directory and user data.
- * So we need to treat this '.so' in a special way.
- * (as a note, the webprocess would have to load the gmodule).
- */
- WebKitGTK.webkit_web_context_set_web_extensions_directory(WebKitGTK.webkit_web_context_get_default(), Converter.wcsToMbcs (extensionsFolder, true));
- long gvariantUserData = OS.g_variant_new_int32(uniqueID);
- WebKitGTK.webkit_web_context_set_web_extensions_initialization_user_data(WebKitGTK.webkit_web_context_get_default(), gvariantUserData);
- }
-
- /**
- * @param cb_args Raw callback arguments by function.
- */
- static Object webkit2callJavaCallback(Object [] cb_args) {
- assert cb_args.length == 4;
- Object returnValue = null;
- Long webViewLocal = (Double.valueOf((String) cb_args[0])).longValue();
- Browser browser = FindBrowser((long ) webViewLocal.longValue());
- Integer functionIndex = ((Double) cb_args[1]).intValue();
- String token = (String) cb_args[2];
-
- BrowserFunction function = browser.webBrowser.functions.get(functionIndex);
- if (function == null) {
- System.err.println("SWT Webkit Error: Failed to find function with index: " + functionIndex);
- return null;
- }
- if (!function.token.equals(token)) {
- System.err.println("SWT Webkit Error: token mismatch for function with index: " + functionIndex);
- return null;
- }
- try {
- // Call user code. Exceptions can occur.
- nonBlockingEvaluate++;
- Object [] user_args = (Object []) cb_args[3];
- returnValue = function.function(user_args);
- } catch (Exception e ) {
- // - Something went wrong in user code.
- // - Dev note, webkit1 uses a browserFunction and function.isEvaluate for evaluate(),
- // webkit2 doesn't, so we don't have 'if (function.isEvaluate)' logic here.
- System.err.println("SWT Webkit: Exception occured in user code of function: " + function.name);
- returnValue = WebBrowser.CreateErrorString (e.getLocalizedMessage ());
- } finally {
- nonBlockingEvaluate--;
- }
- return returnValue;
- }
- }
-
@Override
String getJavaCallDeclaration() {
- if (WEBKIT2) {
- return Webkit2Extension.getJavaScriptFunctionDeclaration(webView);
- } else {
- return super.getJavaCallDeclaration();
- }
+ // callJava does a synchronous XMLHttpRequest, which is handled by RequestProc.
+ return "if (!window.callJava) { window.callJava = function(index, token, args) {\n"
+ + "var xhr = new XMLHttpRequest();\n"
+ + "var uri = 'swt://browserfunction/' + index + '/' + token + '?' + encodeURIComponent(JSON.stringify(args));\n"
+ + "xhr.open('POST', uri, false);\n"
+ + "xhr.send(null);\n"
+ + "return JSON.parse(xhr.responseText);\n"
+ + "}}\n";
}
/**
@@ -663,15 +318,9 @@ class WebKit extends WebBrowser {
*/
private static int[] internalGetWebkitVersion(){
int [] vers = new int[3];
- if (WEBKIT2){
- vers[0] = WebKitGTK.webkit_get_major_version ();
- vers[1] = WebKitGTK.webkit_get_minor_version ();
- vers[2] = WebKitGTK.webkit_get_micro_version ();
- } else {
- vers[0] = WebKitGTK.webkit_major_version ();
- vers[1] = WebKitGTK.webkit_minor_version ();
- vers[2] = WebKitGTK.webkit_micro_version ();
- }
+ vers[0] = WebKitGTK.webkit_get_major_version ();
+ vers[1] = WebKitGTK.webkit_get_minor_version ();
+ vers[2] = WebKitGTK.webkit_get_micro_version ();
return vers;
}
@@ -691,9 +340,6 @@ static String getString (long strPtr) {
static Browser FindBrowser (long webView) {
if (webView == 0) return null;
long parent = GTK.gtk_widget_get_parent (webView);
- if (WEBKIT1){
- parent = GTK.gtk_widget_get_parent (parent);
- }
return (Browser)Display.getCurrent ().findWidget (parent);
}
@@ -710,154 +356,128 @@ static boolean IsInstalled () {
(major == MIN_VERSION[0] && minor == MIN_VERSION[1] && micro >= MIN_VERSION[2]);
}
-/**
- * Webkit1 callback. Used when external.callJava is called in javascript.
- * Not used by Webkit2.
- */
-static long JSObjectCallAsFunctionProc (long ctx, long function, long thisObject, long argumentCount, long arguments, long exception) {
- if (WEBKIT2) {
- System.err.println("Internal error: SWT JSObjectCallAsFunctionProc. This should never have been called on webkit2.");
- return 0;
- }
-
- if (WebKitGTK.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) {
- return WebKitGTK.JSValueMakeUndefined (ctx);
- }
- long ptr = WebKitGTK.JSObjectGetPrivate (thisObject);
- long [] handle = new long [1];
- C.memmove (handle, ptr, C.PTR_SIZEOF);
- Browser browser = FindBrowser (handle[0]);
- if (browser == null) return 0;
- WebKit webkit = (WebKit)browser.webBrowser;
- return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception);
-}
-
-/**
- * This callback is only being ran by webkit1. Only for 'callJava'.
- * It's used to initialize the 'callJava' function pointer in the 'external' object,
- * such that external.callJava reaches Java land.
- */
-static long JSObjectGetPropertyProc (long ctx, long object, long propertyName, long exception) {
- if (WEBKIT2) {
- System.err.println("Internal error: SWT WebKit.java:JSObjectGetPropertyProc. This should never have been called on webkit2.");
- return 0;
- }
- byte[] bytes = (FUNCTIONNAME_CALLJAVA + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
- long name = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
- long function = WebKitGTK.JSObjectMakeFunctionWithCallback (ctx, name, JSObjectCallAsFunctionProc.getAddress ());
- WebKitGTK.JSStringRelease (name);
- return function;
-}
-
-/**
- * Webkit1: Check if the 'external' object regiseterd earlied has the 'callJava' property.
- */
-static long JSObjectHasPropertyProc (long ctx, long object, long propertyName) {
- if (WEBKIT2) {
- System.err.println("Internal error: SWT JSObjectHasPropertyProc. This should never have been called on webkit2.");
- return 0;
- }
- byte[] bytes = (FUNCTIONNAME_CALLJAVA + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
- return WebKitGTK.JSStringIsEqualToUTF8CString (propertyName, bytes);
-}
-
static long JSDOMEventProc (long arg0, long event, long user_data) {
- if (WEBKIT1 && GTK.GTK_IS_SCROLLED_WINDOW (arg0)) {
- /*
- * Stop the propagation of events that are not consumed by WebKit, before
- * they reach the parent embedder. These events have already been received.
- */
- return user_data;
- }
-
- // G_TYPE_CHECK_INSTANCE_TYPE is a bad way to check type. See OS.G_TYPE_CHECK_INSTANCE_TYPE.
- // But kept for webkit1 legacy reason. Don't use G_TYPE_CHECK_INSTANCE_TYPE in new code.
- if ((WEBKIT1 && OS.G_TYPE_CHECK_INSTANCE_TYPE (arg0, WebViewType))
- || (WEBKIT2 && user_data == WIDGET_EVENT)) {
+ if (user_data == WIDGET_EVENT) {
/*
* Only consider using GDK events to create SWT events to send if JS is disabled
* in one or more WebKit instances (indicates that this instance may not be
* receiving events from the DOM). This check is done up-front for performance.
*/
- if ((WEBKIT1 && DisabledJSCount > 0) || WEBKIT2){
- final Browser browser = FindBrowser (arg0);
- if (browser != null &&
- (WEBKIT1 && !browser.webBrowser.jsEnabled)
- || (WEBKIT2 && user_data == WIDGET_EVENT)){
- /* this instance does need to use the GDK event to create an SWT event to send */
- switch (GDK.GDK_EVENT_TYPE (event)) {
- case GDK.GDK_KEY_PRESS: {
- if (browser.isFocusControl ()) {
- int [] key = new int[1];
+ final Browser browser = FindBrowser (arg0);
+ if (browser != null && user_data == WIDGET_EVENT){
+ /* this instance does need to use the GDK event to create an SWT event to send */
+ switch (GDK.GDK_EVENT_TYPE (event)) {
+ case GDK.GDK_KEY_PRESS: {
+ if (browser.isFocusControl ()) {
+ int [] key = new int [1];
+ int [] state = new int[1];
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
GDK.gdk_event_get_keyval(event, key);
- int [] state = new int[1];
GDK.gdk_event_get_state(event, state);
- switch (key[0]) {
- case GDK.GDK_ISO_Left_Tab:
- case GDK.GDK_Tab: {
- if ((state[0] & (GDK.GDK_CONTROL_MASK | GDK.GDK_MOD1_MASK)) == 0) {
- browser.getDisplay ().asyncExec (() -> {
- if (browser.isDisposed ()) return;
- if (browser.getDisplay ().getFocusControl () == null) {
- int traversal = (state[0] & GDK.GDK_SHIFT_MASK) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
- browser.traverse (traversal);
- }
- });
- }
- break;
+ }
+
+ switch (key[0]) {
+ case GDK.GDK_ISO_Left_Tab:
+ case GDK.GDK_Tab: {
+ if ((state[0] & (GDK.GDK_CONTROL_MASK | GDK.GDK_MOD1_MASK)) == 0) {
+ browser.getDisplay ().asyncExec (() -> {
+ if (browser.isDisposed ()) return;
+ if (browser.getDisplay ().getFocusControl () == null) {
+ int traversal = (state[0] & GDK.GDK_SHIFT_MASK) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+ browser.traverse (traversal);
+ }
+ });
}
- case GDK.GDK_Escape: {
- Event keyEvent = new Event ();
- keyEvent.widget = browser;
- keyEvent.type = SWT.KeyDown;
- keyEvent.keyCode = keyEvent.character = SWT.ESC;
- if ((state[0] & GDK.GDK_MOD1_MASK) != 0) keyEvent.stateMask |= SWT.ALT;
- if ((state[0] & GDK.GDK_SHIFT_MASK) != 0) keyEvent.stateMask |= SWT.SHIFT;
- if ((state[0]& GDK.GDK_CONTROL_MASK) != 0) keyEvent.stateMask |= SWT.CONTROL;
- try { // to avoid deadlocks, evaluate() should not block during listener. See Bug 512001
- // I.e, evaluate() can be called and script will be executed, but no return value will be provided.
- nonBlockingEvaluate++;
- browser.webBrowser.sendKeyEvent (keyEvent);
- } catch (Exception e) {
- throw e;
- } finally {
- nonBlockingEvaluate--;
- }
- return 1;
+ break;
+ }
+ case GDK.GDK_Escape: {
+ Event keyEvent = new Event ();
+ keyEvent.widget = browser;
+ keyEvent.type = SWT.KeyDown;
+ keyEvent.keyCode = keyEvent.character = SWT.ESC;
+ if ((state[0] & GDK.GDK_MOD1_MASK) != 0) keyEvent.stateMask |= SWT.ALT;
+ if ((state[0] & GDK.GDK_SHIFT_MASK) != 0) keyEvent.stateMask |= SWT.SHIFT;
+ if ((state[0]& GDK.GDK_CONTROL_MASK) != 0) keyEvent.stateMask |= SWT.CONTROL;
+ try { // to avoid deadlocks, evaluate() should not block during listener. See Bug 512001
+ // I.e, evaluate() can be called and script will be executed, but no return value will be provided.
+ nonBlockingEvaluate++;
+ browser.webBrowser.sendKeyEvent (keyEvent);
+ } catch (Exception e) {
+ throw e;
+ } finally {
+ nonBlockingEvaluate--;
}
+ return 1;
}
}
- break;
}
+ break;
}
- if (WEBKIT1 || (WEBKIT2 && browser != null)) {
- GTK.gtk_widget_event (browser.handle, event);
- }
+ }
+ if (browser != null) {
+ GTK3.gtk_widget_event (browser.handle, event);
}
}
return 0;
}
+ return 0;
+}
- if (WEBKIT1) {
- LONG webViewHandle = WindowMappings.get (new LONG (arg0));
- if (webViewHandle == null) return 0;
- Browser browser = FindBrowser (webViewHandle.value);
- if (browser == null) return 0;
- WebKit webkit = (WebKit)browser.webBrowser;
- if (user_data == WIDGET_EVENT) {
- user_data = 0; // legacy.
+static long RequestProc (long request, long user_data) {
+ // Custom protocol handler (swt://) for BrowserFunction callbacks.
+ // Note that a response must be sent regardless of any errors, otherwise the caller will hang.
+ String response = "null";
+
+ long webView = WebKitGTK.webkit_uri_scheme_request_get_web_view(request);
+ Browser browser = FindBrowser(webView);
+ if (browser != null) {
+ BrowserFunction function = null;
+ Object[] args = null;
+
+ long uriPtr = WebKitGTK.webkit_uri_scheme_request_get_uri(request);
+ String uriStr = Converter.cCharPtrToJavaString(uriPtr, false);
+ try {
+ URI uri = new URI(uriStr);
+ String[] parts = uri.getPath().split("/");
+ int index = Integer.parseInt(parts[1]);
+ String token = parts[2];
+
+ WebKit webkit = (WebKit)browser.webBrowser;
+ function = webkit.functions.get(index);
+ if (function != null && !function.token.equals(token)) {
+ function = null;
+ }
+
+ args = (Object[]) JSON.parse(uri.getQuery());
+ } catch (URISyntaxException | IllegalArgumentException | IndexOutOfBoundsException | ClassCastException e) {
+ }
+
+ if (function != null) {
+ Object result;
+ try {
+ result = function.function(args);
+ } catch (Exception e) {
+ result = WebBrowser.CreateErrorString(e.getLocalizedMessage());
+ }
+ response = JSON.stringify(result);
}
- return webkit.handleDOMEvent (event, (int)user_data) ? 0 : STOP_PROPOGATE;
}
- // Webkit2
+ long[] outBytes = new long[1];
+ long dataPtr = OS.g_utf16_to_utf8(response.toCharArray(), response.length(), null, outBytes, null);
+ long stream = OS.g_memory_input_stream_new_from_data(dataPtr, outBytes[0], OS.addressof_g_free());
+ WebKitGTK.webkit_uri_scheme_request_finish(request, stream, outBytes[0], JSON_MIME_TYPE);
+ OS.g_object_unref(stream);
return 0;
}
static long Proc (long handle, long user_data) {
long webView = handle;
- if (WEBKIT2 && user_data == FINISHED) {
+ if (user_data == FINISHED) {
// Special case, callback from WebKitDownload instead of webview.
long webKitDownload = handle;
return webkit_download_finished(webKitDownload);
@@ -876,22 +496,8 @@ static long Proc (long handle, long arg0, long user_data) {
// Instead use user_data.
{ // Deal with Special cases where callback comes not from webview. Handle is not a webview.
- if (WEBKIT1 && user_data == NOTIFY_LOAD_STATUS) {
- // Webkit1 vs 2 note:
- // Notion of 'Webkit frame' is webkit1 port specific. In webkit2 port, web frames are a webextension and aren't used.
- // Special case to handle webkit1 webview notify::load-status. Handle is a webframe not a webview.
- // Note, G_TYPE_CHECK_INSTANCE_TYPE is not a good way to test for type. See it's javadoc.
- // only kept for webkit1 legacy reason.
- if (OS.G_TYPE_CHECK_INSTANCE_TYPE (handle, WebKitGTK.webkit_web_frame_get_type ())) {
- long webView = WebKitGTK.webkit_web_frame_get_web_view (handle); // webkit1 only.
- Browser browser = FindBrowser (webView);
- if (browser == null) return 0;
- WebKit webkit = (WebKit)browser.webBrowser;
- return webkit.webframe_notify_load_status(handle, arg0);
- }
- }
- if (WEBKIT2 && user_data == DOWNLOAD_STARTED) {
+ if (user_data == DOWNLOAD_STARTED) {
// This callback comes from WebKitWebContext as oppose to the WebView. So handle is WebContext not Webview.
// user_function (WebKitWebContext *context, WebKitDownload *download, gpointer user_data)
long webKitDownload = arg0;
@@ -899,7 +505,7 @@ static long Proc (long handle, long arg0, long user_data) {
return 0;
}
- if (WEBKIT2 && user_data == DECIDE_DESTINATION) {
+ if (user_data == DECIDE_DESTINATION) {
// This callback comes from WebKitDownload, so handle is WebKitDownload not webview.
// gboolean user_function (WebKitDownload *download, gchar *suggested_filename, gpointer user_data)
long webKitDownload = handle;
@@ -907,11 +513,11 @@ static long Proc (long handle, long arg0, long user_data) {
return webkit_download_decide_destination(webKitDownload,suggested_filename);
}
- if (WEBKIT2 && user_data == FAILED) {
+ if (user_data == FAILED) {
// void user_function (WebKitDownload *download, GError *error, gpointer user_data)
long webKitDownload = handle;
return webkit_download_failed(webKitDownload);
- }
+ }
}
{ // Callbacks connected with a WebView.
@@ -932,73 +538,16 @@ static long Proc (long handle, long arg0, long arg1, long user_data) {
}
static long Proc (long handle, long arg0, long arg1, long arg2, long user_data) {
- long webView;
-
- // Note: G_TYPE_CHECK_INSTANCE_TYPE is not a good way to check for instance type, see it's javadoc.
- // Kept only for webkit1 legacy reasons. Do not use in new code.
- if (WEBKIT1 && OS.G_TYPE_CHECK_INSTANCE_TYPE (handle, WebKitGTK.soup_session_get_type ())) {
- webView = user_data;
- } else {
- webView = handle;
- }
+ long webView = handle;
Browser browser = FindBrowser (webView);
if (browser == null) return 0;
WebKit webkit = (WebKit)browser.webBrowser;
- if (WEBKIT1 && webView == user_data) {
- return webkit.sessionProc (handle, arg0, arg1, arg2, user_data); // Webkit1's way of authentication.
- } else {
- return webkit.webViewProc (handle, arg0, arg1, arg2, user_data);
- }
-}
-
-static long Proc (long handle, long arg0, long arg1, long arg2, long arg3, long user_data) {
- Browser browser = FindBrowser (handle);
- if (browser == null) return 0;
- WebKit webkit = (WebKit)browser.webBrowser;
- return webkit.webViewProc (handle, arg0, arg1, arg2, arg3, user_data);
-}
-
-/** Webkit1 only */
-long sessionProc (long session, long msg, long auth, long retrying, long user_data) {
- /* authentication challenges are currently the only notification received from the session */
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- if (retrying == 0) {
- failureCount = 0;
- } else {
- if (++failureCount >= 3) return 0;
- }
-
- long uri = WebKitGTK.soup_message_get_uri (msg);
- long uriString = WebKitGTK.soup_uri_to_string (uri, 0);
- int length = C.strlen (uriString);
- byte[] bytes = new byte[length];
- C.memmove (bytes, uriString, length);
- OS.g_free (uriString);
- String location = new String (Converter.mbcsToWcs (bytes));
-
- for (int i = 0; i < authenticationListeners.length; i++) {
- AuthenticationEvent event = new AuthenticationEvent (browser);
- event.location = location;
- authenticationListeners[i].authenticate (event);
- if (!event.doit) {
- OS.g_signal_stop_emission_by_name (session, WebKitGTK.authenticate);
- return 0;
- }
- if (event.user != null && event.password != null) {
- byte[] userBytes = Converter.wcsToMbcs (event.user, true);
- byte[] passwordBytes = Converter.wcsToMbcs (event.password, true);
- WebKitGTK.soup_auth_authenticate (auth, userBytes, passwordBytes);
- OS.g_signal_stop_emission_by_name (session, WebKitGTK.authenticate);
- return 0;
- }
- }
- return 0;
+ return webkit.webViewProc (handle, arg0, arg1, arg2, user_data);
}
/**
- * Webkit2 only
- * - gboolean user_function (WebKitWebView *web_view, WebKitAuthenticationRequest *request, gpointer user_data)
+ * gboolean user_function (WebKitWebView *web_view, WebKitAuthenticationRequest *request, gpointer user_data)
* - https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView-authenticate
*/
long webkit_authenticate (long web_view, long request){
@@ -1053,21 +602,16 @@ long webViewProc (long handle, long user_data) {
long webViewProc (long handle, long arg0, long user_data) {
switch ((int)user_data) {
case CREATE_WEB_VIEW: return webkit_create_web_view (handle, arg0);
- case DOWNLOAD_REQUESTED: return webkit_download_requested (handle, arg0); // webkit1
- case NOTIFY_LOAD_STATUS: return webkit_notify_load_status (handle, arg0); // Webkit1
case LOAD_CHANGED: return webkit_load_changed (handle, (int) arg0, user_data);
- case NOTIFY_PROGRESS: return webkit_notify_progress (handle, arg0); // webkit1 & webkit2.
+ case NOTIFY_PROGRESS: return webkit_notify_progress (handle, arg0);
case NOTIFY_TITLE: return webkit_notify_title (handle, arg0);
- case POPULATE_POPUP: return webkit_populate_popup (handle, arg0);
- case STATUS_BAR_TEXT_CHANGED: return webkit_status_bar_text_changed (handle, arg0); // Webkit1 only.
- case AUTHENTICATE: return webkit_authenticate (handle, arg0); // Webkit2 only.
+ case AUTHENTICATE: return webkit_authenticate (handle, arg0);
default: return 0;
}
}
long webViewProc (long handle, long arg0, long arg1, long user_data) {
switch ((int)user_data) {
- case HOVERING_OVER_LINK: return webkit_hovering_over_link (handle, arg0, arg1); // Webkit1 only
case MOUSE_TARGET_CHANGED: return webkit_mouse_target_changed (handle, arg0, arg1); // Webkit2 only.
case DECIDE_POLICY: return webkit_decide_policy(handle, arg0, (int)arg1, user_data);
default: return 0;
@@ -1076,81 +620,60 @@ long webViewProc (long handle, long arg0, long arg1, long user_data) {
long webViewProc (long handle, long arg0, long arg1, long arg2, long user_data) {
switch ((int)user_data) {
- case CONSOLE_MESSAGE: return webkit_console_message (handle, arg0, arg1, arg2);
- case WINDOW_OBJECT_CLEARED: return webkit_window_object_cleared (handle, arg0, arg1, arg2);
case CONTEXT_MENU: return webkit_context_menu(handle, arg0, arg1, arg2);
case LOAD_FAILED_TLS: return webkit_load_failed_tls(handle, arg0, arg1, arg2);
default: return 0;
}
}
-long webViewProc (long handle, long arg0, long arg1, long arg2, long arg3, long user_data) {
- switch ((int)user_data) {
- case MIME_TYPE_POLICY_DECISION_REQUESTED: return webkit_mime_type_policy_decision_requested (handle, arg0, arg1, arg2, arg3); // Webkit1
- case NAVIGATION_POLICY_DECISION_REQUESTED: return webkit_navigation_policy_decision_requested (handle, arg0, arg1, arg2, arg3);
- case RESOURCE_REQUEST_STARTING: return webkit_resource_request_starting (handle, arg0, arg1, arg2, arg3); // Webkit1
- default: return 0;
- }
-}
-
@Override
public void create (Composite parent, int style) {
int [] vers = internalGetWebkitVersion();
- if (ExternalClass == 0) {
- System.setProperty(SWT_WEBKITGTK_VERSION,
- String.format("%s.%s.%s", vers[0], vers[1], vers[2])); // $NON-NLS-1$
- if (Device.DEBUG) {
- System.out.println(String.format("WebKit version %s.%s.%s", vers[0], vers[1], vers[2])); //$NON-NLS-1$
- }
-
- if (WEBKIT1) { // 'external' object only used on webkit1 for javaCall. Webkit2 has a different mechanism.
- JSClassDefinition jsClassDefinition = new JSClassDefinition ();
- byte[] bytes = Converter.wcsToMbcs (CLASSNAME_EXTERNAL, true);
- jsClassDefinition.className = C.malloc (bytes.length);
- C.memmove (jsClassDefinition.className, bytes, bytes.length);
-
- jsClassDefinition.hasProperty = JSObjectHasPropertyProc.getAddress ();
- jsClassDefinition.getProperty = JSObjectGetPropertyProc.getAddress ();
- long classDefinitionPtr = C.malloc (JSClassDefinition.sizeof);
- WebKitGTK.memmove (classDefinitionPtr, jsClassDefinition, JSClassDefinition.sizeof);
-
- ExternalClass = WebKitGTK.JSClassCreate (classDefinitionPtr);
- }
-
- byte [] bytes = Converter.wcsToMbcs ("POST", true); //$NON-NLS-1$
- PostString = C.malloc (bytes.length);
- C.memmove (PostString, bytes, bytes.length);
-
- /*
- * WebKitGTK version 1.8.x and newer can crash sporadically in
- * webkitWebViewRegisterForIconNotification(). The root issue appears
- * to be WebKitGTK accessing its icon database from a background
- * thread. Work around this crash by disabling the use of WebKitGTK's
- * icon database, which should not affect the Browser in any way.
- */
- if (WEBKIT1){
- long database = WebKitGTK.webkit_get_favicon_database ();
- if (database != 0) {
- /* WebKitGTK version is >= 1.8.x */
- WebKitGTK.webkit_favicon_database_set_path (database, 0);
+ System.setProperty(SWT_WEBKITGTK_VERSION,
+ String.format("%s.%s.%s", vers[0], vers[1], vers[2])); // $NON-NLS-1$
+ if (Device.DEBUG) {
+ System.out.println(String.format("WebKit version %s.%s.%s", vers[0], vers[1], vers[2])); //$NON-NLS-1$
+ }
+ /*
+ * Set this Browser instance to Webki2AsyncToSync in order for cookie
+ * functionality to work. See bug 522181.
+ */
+ Webkit2AsyncToSync.setCookieBrowser(browser);
+
+ if (FirstCreate) {
+ FirstCreate = false;
+ // Register the swt:// custom protocol for BrowserFunction calls via XMLHttpRequest
+ long context = WebKitGTK.webkit_web_context_get_default();
+ WebKitGTK.webkit_web_context_register_uri_scheme(context, SWT_PROTOCOL, RequestProc.getAddress(), 0, 0);
+ long security = WebKitGTK.webkit_web_context_get_security_manager(context);
+ WebKitGTK.webkit_security_manager_register_uri_scheme_as_secure(security, SWT_PROTOCOL);
+ }
+
+ Composite parentShell = parent.getParent();
+ Browser parentBrowser = WebKit.parentBrowser;
+ if (parentBrowser == null && parentShell != null) {
+ Control[] children = parentShell.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ if (children[i] instanceof Browser) {
+ parentBrowser = (Browser) children[i];
+ break;
}
}
}
- if (WEBKIT1){
- scrolledWindow = GTK.gtk_scrolled_window_new (0, 0);
- GTK.gtk_scrolled_window_set_policy (scrolledWindow, GTK.GTK_POLICY_AUTOMATIC, GTK.GTK_POLICY_AUTOMATIC);
+ if (parentBrowser == null) {
+ webView = WebKitGTK.webkit_web_view_new();
+ } else {
+ webView = WebKitGTK.webkit_web_view_new_with_related_view(((WebKit)parentBrowser.webBrowser).webView);
}
- webView = WebKitGTK.webkit_web_view_new ();
-
// Bug 522733 Webkit2 workaround for crash
// As of Webkitgtk 2.18, webkitgtk2 crashes if the first instance of webview is not referenced when JVM shuts down.
// There is a exit handler that tries to dereference the first instance [which if not referenced]
// leads to a crash. This workaround would benefit from deeper investigation (find root cause etc...).
// [edit] Bug 530678. Note, it seems that as of Webkit2.18, webkit auto-disposes itself if parent get's disposed.
// While not directly related, see onDispose() for how to deal with disposal of this.
- if (WEBKIT2 && !bug522733FirstInstanceCreated && vers[0] == 2 && vers[1] >= 18) {
+ if (!bug522733FirstInstanceCreated && vers[0] == 2 && vers[1] >= 18) {
bug522733FirstInstanceCreated = true;
OS.g_object_ref(webView);
}
@@ -1161,142 +684,65 @@ public void create (Composite parent, int style) {
System.out.println("***WARNING: Please use for development purposes only!");
}
- if (WEBKIT1) {
- webViewData = C.malloc (C.PTR_SIZEOF);
- C.memmove (webViewData, new long [] {webView}, C.PTR_SIZEOF);
- }
-
- // Documentation for these signals/properties is usually found under signal/property of WebKitWebView.
- // notify_* usually implies a property change. For these, the first arg is typically the webview handle.
- if (WEBKIT1){
- // Webkit1 signal documentation: https://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView--progress
- GTK.gtk_container_add (scrolledWindow, webView);
- GTK.gtk_container_add (browser.handle, scrolledWindow);
- GTK.gtk_widget_show (scrolledWindow);
- OS.g_signal_connect (webView, WebKitGTK.close_web_view, Proc2.getAddress (), CLOSE_WEB_VIEW);
- OS.g_signal_connect (webView, WebKitGTK.web_view_ready, Proc2.getAddress (), WEB_VIEW_READY);
-
- OS.g_signal_connect (webView, WebKitGTK.hovering_over_link, Proc4.getAddress (), HOVERING_OVER_LINK);
-
- OS.g_signal_connect (webView, WebKitGTK.window_object_cleared, Proc5.getAddress (), WINDOW_OBJECT_CLEARED);
- OS.g_signal_connect (webView, WebKitGTK.console_message, Proc5.getAddress (), CONSOLE_MESSAGE);
-
- OS.g_signal_connect (webView, WebKitGTK.navigation_policy_decision_requested, Proc6.getAddress (), NAVIGATION_POLICY_DECISION_REQUESTED);
- OS.g_signal_connect (webView, WebKitGTK.mime_type_policy_decision_requested, Proc6.getAddress (), MIME_TYPE_POLICY_DECISION_REQUESTED);
- OS.g_signal_connect (webView, WebKitGTK.resource_request_starting, Proc6.getAddress (), RESOURCE_REQUEST_STARTING);
-
- } else {
- // Webkit2 Signal Documentation: https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView--title
- GTK.gtk_container_add (browser.handle, webView);
- OS.g_signal_connect (webView, WebKitGTK.close, Proc2.getAddress (), CLOSE_WEB_VIEW);
- OS.g_signal_connect (webView, WebKitGTK.ready_to_show, Proc2.getAddress (), WEB_VIEW_READY);
- OS.g_signal_connect (webView, WebKitGTK.decide_policy, Proc4.getAddress (), DECIDE_POLICY);
-
- OS.g_signal_connect (webView, WebKitGTK.mouse_target_changed, Proc4.getAddress (), MOUSE_TARGET_CHANGED);
- OS.g_signal_connect (webView, WebKitGTK.context_menu, Proc5.getAddress (), CONTEXT_MENU);
- OS.g_signal_connect (webView, WebKitGTK.load_failed_with_tls_errors, Proc5.getAddress (), LOAD_FAILED_TLS);
-
-
- }
-
- // Proc3 is overloaded in that not only Webview connects to it,
- // but also (webkit1) WebFrame and (webkit2) WebKitDownload hook into it as well.
- // Pay extra attention to argument 1 (handle) to prevent wrong type of handle being passed to gtk and causing segfaults. (See 533545)
- if (WEBKIT1) {
- // WebKitWebView* user_function (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer user_data)
- OS.g_signal_connect (webView, WebKitGTK.create_web_view, Proc3.getAddress (), CREATE_WEB_VIEW);
-
- // Property change: load-status (webview is first arg) https://webkitgtk.org/reference/webkitgtk/unstable/WebKitWebFrame.html#WebKitWebFrame--load-status
- OS.g_signal_connect (webView, WebKitGTK.notify_load_status, Proc3.getAddress (), NOTIFY_LOAD_STATUS);
-
- // gboolean user_function (WebKitWebView *web_view, WebKitDownload *download, gpointer user_data)
- OS.g_signal_connect (webView, WebKitGTK.download_requested, Proc3.getAddress (), DOWNLOAD_REQUESTED);
-
- // void user_function (WebKitWebView *web_view, GtkMenu *menu, gpointer user_data)
- OS.g_signal_connect (webView, WebKitGTK.populate_popup, Proc3.getAddress (), POPULATE_POPUP);
-
- // Property change: progress. (first arg is webview)
- OS.g_signal_connect (webView, WebKitGTK.notify_progress, Proc3.getAddress (), NOTIFY_PROGRESS);
-
- // void user_function (WebKitWebView *webkitwebview, gchar *arg1, gpointer user_data)
- OS.g_signal_connect (webView, WebKitGTK.status_bar_text_changed, Proc3.getAddress (), STATUS_BAR_TEXT_CHANGED);
-
- }
- if (WEBKIT2) { // Note: In Webkit2, webkit_download_started(...) also connects return signals to proc3.
- // GtkWidget* user_function (WebKitWebView *web_view, WebKitNavigationAction *navigation_action, gpointer user_data)
- OS.g_signal_connect (webView, WebKitGTK.create, Proc3.getAddress (), CREATE_WEB_VIEW);
-
- //void user_function (WebKitWebView *web_view, WebKitLoadEvent load_event, gpointer user_data)
- OS.g_signal_connect (webView, WebKitGTK.load_changed, Proc3.getAddress (), LOAD_CHANGED);
+ // Webkit2 Signal Documentation: https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView--title
+ GTK3.gtk_container_add (browser.handle, webView);
+ OS.g_signal_connect (webView, WebKitGTK.close, Proc2.getAddress (), CLOSE_WEB_VIEW);
+ OS.g_signal_connect (webView, WebKitGTK.ready_to_show, Proc2.getAddress (), WEB_VIEW_READY);
+ OS.g_signal_connect (webView, WebKitGTK.decide_policy, Proc4.getAddress (), DECIDE_POLICY);
+ OS.g_signal_connect (webView, WebKitGTK.mouse_target_changed, Proc4.getAddress (), MOUSE_TARGET_CHANGED);
+ OS.g_signal_connect (webView, WebKitGTK.context_menu, Proc5.getAddress (), CONTEXT_MENU);
+ OS.g_signal_connect (webView, WebKitGTK.load_failed_with_tls_errors, Proc5.getAddress (), LOAD_FAILED_TLS);
- // Property change: of 'estimated-load-progress' args: webview, pspec
- OS.g_signal_connect (webView, WebKitGTK.notify_estimated_load_progress, Proc3.getAddress (), NOTIFY_PROGRESS);
+ // GtkWidget* user_function (WebKitWebView *web_view, WebKitNavigationAction *navigation_action, gpointer user_data)
+ OS.g_signal_connect (webView, WebKitGTK.create, Proc3.getAddress (), CREATE_WEB_VIEW);
+ //void user_function (WebKitWebView *web_view, WebKitLoadEvent load_event, gpointer user_data)
+ OS.g_signal_connect (webView, WebKitGTK.load_changed, Proc3.getAddress (), LOAD_CHANGED);
+ // Property change: of 'estimated-load-progress' args: webview, pspec
+ OS.g_signal_connect (webView, WebKitGTK.notify_estimated_load_progress, Proc3.getAddress (), NOTIFY_PROGRESS);
- // gboolean user_function (WebKitWebView *web_view, WebKitAuthenticationRequest *request, gpointer user_data)
- OS.g_signal_connect (webView, WebKitGTK.authenticate, Proc3.getAddress (), AUTHENTICATE);
+ // gboolean user_function (WebKitWebView *web_view, WebKitAuthenticationRequest *request, gpointer user_data)
+ OS.g_signal_connect (webView, WebKitGTK.authenticate, Proc3.getAddress (), AUTHENTICATE);
- // (!) Note this one's a 'webContext' signal, not webview. See:
- // https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html#WebKitWebContext-download-started
- OS.g_signal_connect (WebKitGTK.webkit_web_context_get_default(), WebKitGTK.download_started, Proc3.getAddress (), DOWNLOAD_STARTED);
- }
+ // (!) Note this one's a 'webContext' signal, not webview. See:
+ // https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html#WebKitWebContext-download-started
+ OS.g_signal_connect (WebKitGTK.webkit_web_context_get_default(), WebKitGTK.download_started, Proc3.getAddress (), DOWNLOAD_STARTED);
GTK.gtk_widget_show (webView);
GTK.gtk_widget_show (browser.handle);
- // Webview 'title' property. Webkit1 & Webkit2.
+ // Webview 'title' property
OS.g_signal_connect (webView, WebKitGTK.notify_title, Proc3.getAddress (), NOTIFY_TITLE);
- /* Callback to get events before WebKit receives and consumes them */
- if (WEBKIT2) {
- OS.g_signal_connect (webView, OS.button_press_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
- OS.g_signal_connect (webView, OS.button_release_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
- OS.g_signal_connect (webView, OS.focus_in_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
- OS.g_signal_connect (webView, OS.focus_out_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
- // if connecting any other special gtk event to webkit, add SWT.* to w2_passThroughSwtEvents above.
- }
+ OS.g_signal_connect (webView, OS.button_press_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
+ OS.g_signal_connect (webView, OS.button_release_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
+ OS.g_signal_connect (webView, OS.focus_in_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
+ OS.g_signal_connect (webView, OS.focus_out_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
+ // if connecting any other special gtk event to webkit, add SWT.* to w2_passThroughSwtEvents above.
+
this.pageId = WebKitGTK.webkit_web_view_get_page_id (webView);
- if (WEBKIT1) {
- OS.g_signal_connect (webView, OS.button_press_event, JSDOMEventProc.getAddress (), 0);
- OS.g_signal_connect (webView, OS.button_release_event, JSDOMEventProc.getAddress (), 0);
- }
+
OS.g_signal_connect (webView, OS.key_press_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
OS.g_signal_connect (webView, OS.key_release_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
OS.g_signal_connect (webView, OS.scroll_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
OS.g_signal_connect (webView, OS.motion_notify_event, JSDOMEventProc.getAddress (), WIDGET_EVENT);
- /*
- * Callbacks to get the events not consumed by WebKit, and to block
- * them so that they don't get propagated to the parent handle twice.
- * This hook is set after WebKit and is therefore called after WebKit's
- * handler because GTK dispatches events in their order of registration.
- */
- if (WEBKIT1){
- OS.g_signal_connect (scrolledWindow, OS.button_press_event, JSDOMEventProc.getAddress (), STOP_PROPOGATE);
- OS.g_signal_connect (scrolledWindow, OS.button_release_event, JSDOMEventProc.getAddress (), STOP_PROPOGATE);
- OS.g_signal_connect (scrolledWindow, OS.key_press_event, JSDOMEventProc.getAddress (), STOP_PROPOGATE);
- OS.g_signal_connect (scrolledWindow, OS.key_release_event, JSDOMEventProc.getAddress (), STOP_PROPOGATE);
- OS.g_signal_connect (scrolledWindow, OS.scroll_event, JSDOMEventProc.getAddress (), STOP_PROPOGATE);
- OS.g_signal_connect (scrolledWindow, OS.motion_notify_event, JSDOMEventProc.getAddress (), STOP_PROPOGATE);
- }
-
- byte[] bytes = Converter.wcsToMbcs ("UTF-8", true); // $NON-NLS-1$
+ byte[] utfBytes = Converter.wcsToMbcs ("UTF-8", true); // $NON-NLS-1$
long settings = WebKitGTK.webkit_web_view_get_settings (webView);
OS.g_object_set (settings, WebKitGTK.javascript_can_open_windows_automatically, 1, 0);
OS.g_object_set (settings, WebKitGTK.enable_webgl, 1, 0);
+ OS.g_object_set (settings, WebKitGTK.enable_developer_extras, 1, 0);
- if (WEBKIT2){
- OS.g_object_set (settings, WebKitGTK.default_charset, bytes, 0);
- if (WebKitGTK.webkit_get_minor_version() >= 14) {
- OS.g_object_set (settings, WebKitGTK.allow_universal_access_from_file_urls, 1, 0);
- } else {
- System.err.println("SWT WEBKIT: Warning, you are using Webkitgtk below version 2.14. Your version is: "
- + "Your version is: " + internalGetWebKitVersionStr()
- + "\nJavascript execution limited to same origin due to unimplemented feature of this version.");
+ OS.g_object_set (settings, WebKitGTK.default_charset, utfBytes, 0);
+ if (WebKitGTK.webkit_get_minor_version() >= 14) {
+ OS.g_object_set (settings, WebKitGTK.allow_universal_access_from_file_urls, 1, 0);
+ if (WebKitGTK.webkit_get_minor_version() >= 24) {
+ OS.g_object_set (settings, WebKitGTK.enable_back_forward_navigation_gestures, 1, 0);
}
} else {
- OS.g_object_set (settings, WebKitGTK.default_encoding, bytes, 0);
- OS.g_object_set (settings, WebKitGTK.enable_universal_access_from_file_uris, 1, 0);
+ System.err.println("SWT WEBKIT: Warning, you are using Webkitgtk below version 2.14. Your version is: "
+ + "Your version is: " + internalGetWebKitVersionStr()
+ + "\nJavascript execution limited to same origin due to unimplemented feature of this version.");
}
Listener listener = event -> {
@@ -1314,7 +760,7 @@ public void create (Composite parent, int style) {
break;
}
case SWT.FocusIn: {
- if (WEBKIT2 && webView != 0)
+ if (webView != 0)
GTK.gtk_widget_grab_focus (webView);
break;
}
@@ -1329,60 +775,6 @@ public void create (Composite parent, int style) {
browser.addListener (SWT.KeyDown, listener);
browser.addListener (SWT.Resize, listener);
- if (WEBKIT1){
- /*
- * Ensure that our Authenticate listener is at the front of the signal
- * queue by removing the default Authenticate listener, adding ours,
- * and then re-adding the default listener.
- */
- long session = WebKitGTK.webkit_get_default_session ();
- long originalAuth = WebKitGTK.soup_session_get_feature (session, WebKitGTK.webkit_soup_auth_dialog_get_type ());
- if (originalAuth != 0) {
- WebKitGTK.soup_session_feature_detach (originalAuth, session);
- }
- OS.g_signal_connect (session, WebKitGTK.authenticate, Proc5.getAddress (), webView);
- if (originalAuth != 0) {
- WebKitGTK.soup_session_feature_attach (originalAuth, session);
- }
-
- /*
- * Check for proxy values set as documented java properties and update the
- * session to use these values if needed.
- */
- String proxyHost = System.getProperty (PROPERTY_PROXYHOST);
- String proxyPortString = System.getProperty (PROPERTY_PROXYPORT);
- int port = -1;
- if (proxyPortString != null) {
- try {
- int value = Integer.valueOf (proxyPortString).intValue ();
- if (0 <= value && value <= MAX_PORT) port = value;
- } catch (NumberFormatException e) {
- /* do nothing, java property has non-integer value */
- }
- }
- if (proxyHost != null || port != -1) {
- if (!proxyHost.startsWith (PROTOCOL_HTTP)) {
- proxyHost = PROTOCOL_HTTP + proxyHost;
- }
- proxyHost += ":" + port; //$NON-NLS-1$
- bytes = Converter.wcsToMbcs (proxyHost, true);
- long uri = WebKitGTK.soup_uri_new (bytes);
- if (uri != 0) {
- OS.g_object_set (session, WebKitGTK.SOUP_SESSION_PROXY_URI, uri, 0);
- WebKitGTK.soup_uri_free (uri);
- }
- }
- }
-
- if (WEBKIT1) { // HandleWebKitEvent registration. Pre Webkit 1.4 way of handling mouse/keyboard events. Webkit2 uses dom.
- eventFunction = new BrowserFunction (browser, "HandleWebKitEvent") { //$NON-NLS-1$
- @Override
- public Object function(Object[] arguments) {
- return handleEventFromFunction (arguments) ? Boolean.TRUE : Boolean.FALSE;
- }
- };
- }
-
/*
* Bug in WebKitGTK. MouseOver/MouseLeave events are not consistently sent from
* the DOM when the mouse enters and exits the browser control, see
@@ -1410,92 +802,6 @@ public void create (Composite parent, int style) {
}
}
-void addEventHandlers (long web_view, boolean top) {
- /*
- * If JS is disabled (causes DOM events to not be delivered) then do not add event
- * listeners here, DOM events will be inferred from received GDK events instead.
- */
- if (!jsEnabled) return;
-
- if (top) {
- if (WEBKIT2) {
- // TODO implement equivalent?
- // As a note, this entire function only seems to do webkit1-only stuff at the moment...
- } else {
- long domDocument = WebKitGTK.webkit_web_view_get_dom_document (web_view); // Webkit1 only
- if (domDocument != 0) {
- WindowMappings.put (new LONG (domDocument), new LONG (web_view));
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.dragstart, JSDOMEventProc.getAddress (), 0, SWT.DragDetect);
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.keydown, JSDOMEventProc.getAddress (), 0, SWT.KeyDown);
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.keypress, JSDOMEventProc.getAddress (), 0, SENTINEL_KEYPRESS);
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.keyup, JSDOMEventProc.getAddress (), 0, SWT.KeyUp);
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.mousedown, JSDOMEventProc.getAddress (), 0, SWT.MouseDown);
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.mousemove, JSDOMEventProc.getAddress (), 0, SWT.MouseMove);
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.mouseup, JSDOMEventProc.getAddress (), 0, SWT.MouseUp);
- WebKitGTK.webkit_dom_event_target_add_event_listener (domDocument, WebKitGTK.mousewheel, JSDOMEventProc.getAddress (), 0, SWT.MouseWheel);
-
- /*
- * The following two lines are intentionally commented because they cannot be used to
- * consistently send MouseEnter/MouseExit events until https://bugs.webkit.org/show_bug.cgi?id=35246
- * is fixed.
- */
- //WebKitGTK.webkit_dom_event_target_add_event_listener (domWindow, WebKitGTK.mouseover, JSDOMEventProc.getAddress (), 0, SWT.MouseEnter);
- //WebKitGTK.webkit_dom_event_target_add_event_listener (domWindow, WebKitGTK.mouseout, JSDOMEventProc.getAddress (), 0, SWT.MouseExit);
- }
- return;
- }
- }
-
-
- if (WEBKIT1) { // add HandleWebKitEvent key/mouse handlers
- /* install the JS call-out to the registered BrowserFunction */
- StringBuilder buffer = new StringBuilder ("window.SWTkeyhandler = function SWTkeyhandler(e) {"); //$NON-NLS-1$
- buffer.append ("try {e.returnValue = HandleWebKitEvent(e.type, e.keyCode, e.charCode, e.altKey, e.ctrlKey, e.shiftKey, e.metaKey);} catch (e) {}};"); //$NON-NLS-1$
- nonBlockingExecute (buffer.toString ());
- buffer = new StringBuilder ("window.SWTmousehandler = function SWTmousehandler(e) {"); //$NON-NLS-1$
- buffer.append ("try {e.returnValue = HandleWebKitEvent(e.type, e.screenX, e.screenY, e.detail, e.button, e.altKey, e.ctrlKey, e.shiftKey, e.metaKey, e.relatedTarget != null);} catch (e) {}};"); //$NON-NLS-1$
- nonBlockingExecute (buffer.toString ());
-
- if (top) {
- /* DOM API is not available, so add listener to top-level document */
- buffer = new StringBuilder ("document.addEventListener('keydown', SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('keypress', SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('keyup', SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mousedown', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mouseup', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mousemove', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mousewheel', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('dragstart', SWTmousehandler, true);"); //$NON-NLS-1$
-
- /*
- * The following two lines are intentionally commented because they cannot be used to
- * consistently send MouseEnter/MouseExit events until https://bugs.webkit.org/show_bug.cgi?id=35246
- * is fixed.
- */
- //buffer.append ("document.addEventListener('mouseover', SWTmousehandler, true);"); //$NON-NLS-1$
- //buffer.append ("document.addEventListener('mouseout', SWTmousehandler, true);"); //$NON-NLS-1$
-
- nonBlockingExecute (buffer.toString ());
- return;
- }
-
- /* add JS event listener in frames */
- buffer = new StringBuilder ("for (var i = 0; i < frames.length; i++) {"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('keydown', window.SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('keypress', window.SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('keyup', window.SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mousedown', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mouseup', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mousemove', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mouseover', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mouseout', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mousewheel', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('dragstart', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ('}');
- nonBlockingExecute (buffer.toString ());
- }
-}
-
@Override
public boolean back () {
if (WebKitGTK.webkit_web_view_can_go_back (webView) == 0) return false;
@@ -1513,8 +819,10 @@ public boolean close () {
// false = blocks disposal. In Browser.java, user is told widget was not disposed.
// See Snippet326.
boolean close (boolean showPrompters) {
- assert WEBKIT1 || WEBKIT2;
- if (!jsEnabled) return true;
+ // don't execute any JavaScript if it's disabled or requested to get disabled
+ // we need to check jsEnabledOnNextPage here because jsEnabled is updated asynchronously
+ // and may not reflect the proper state (bug 571746 and bug 567881)
+ if (!jsEnabled || !jsEnabledOnNextPage) return true;
String message1 = Compatibility.getMessage("SWT_OnBeforeUnload_Message1"); // $NON-NLS-1$
String message2 = Compatibility.getMessage("SWT_OnBeforeUnload_Message2"); // $NON-NLS-1$
@@ -1540,31 +848,22 @@ boolean close (boolean showPrompters) {
nonBlockingExecute (buffer.toString ());
Boolean result;
- if (WEBKIT1) {
+ /*
+ * Sometimes if a disposal is already underway (ex parent shell disposed), then
+ * Javascript execution can throw. We have to account for that.
+ */
+ try {
result = (Boolean)evaluate ("return " + functionName +"(window);"); // $NON-NLS-1$ // $NON-NLS-2$
- if (result == null) return false; // Default to prevent disposal.
- } else {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
- // Sometimes if a disposal is already underway (ex parent shell disposed), then
- // Webkit1: Silently fails
- // Webkit2: Javascript execution can throw. We have to account for that.
- try {
- result = (Boolean)evaluate ("return " + functionName +"(window);"); // $NON-NLS-1$ // $NON-NLS-2$
- if (result == null) return true; // Default to assume that webkit is disposed and allow disposal of Browser.
- } catch (SWTException e) {
- return true; // Permit browser to be disposed if javascript execution failed.
- }
+ if (result == null) return true; // Default to assume that webkit is disposed and allow disposal of Browser.
+ } catch (SWTException e) {
+ return true; // Permit browser to be disposed if javascript execution failed.
}
return result.booleanValue ();
}
private boolean isJavascriptEnabled() {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
- // If you try to run javascript while javascript is turned off, then:
- // - on Webkit1: nothing happens.
- // - on Webkit2: an exception is thrown.
- // To ensure consistent behavior, do not even try to execute js on webkit2 if it's off.
+ // If you try to run Javascript while Javascript is turned off, then an exception is thrown.
return webkit_settings_get(WebKitGTK.enable_javascript) != 0;
}
@@ -1578,75 +877,19 @@ void nonBlockingExecute(String script) {
}
}
-/**
- * Modifies a BrowserFunction in the web extension. This method can be used to register/deregister BrowserFunctions
- * in the web extension, so that those BrowserFunctions are executed upon triggering of the object_cleared callback (in
- * the extension, not in Java).
- *
- * This function will return true if: the operation succeeds synchronously, or if the synchronous call timed out and an
- * asynchronous call was performed instead. All other cases will return false.
- *
- * Supported actions: "register" and "deregister"
- *
- * @param pageId the page ID of the WebKit instance/web page
- * @param function the function string
- * @param url the URL
- * @param action the action being performed on the function, which will be used to form the DBus method name.
- * @return true if the action succeeded (or was performed asynchronously), false if it failed
- */
-private boolean webkit_extension_modify_function (long pageId, String function, String url, String action){
- long args[] = { OS.g_variant_new_uint64(pageId),
- OS.g_variant_new_string (Converter.javaStringToCString(function)),
- OS.g_variant_new_string (Converter.javaStringToCString(url))};
- final long argsTuple = OS.g_variant_new_tuple(args, args.length);
- if (argsTuple == 0) return false;
- String dbusMethodName = "webkitgtk_extension_" + action + "_function";
- Object returnVal = WebkitGDBus.callExtensionSync(argsTuple, dbusMethodName);
- if (returnVal instanceof Boolean) {
- return (Boolean) returnVal;
- } else if (returnVal instanceof String) {
- String returnString = (String) returnVal;
- /*
- * Call the extension asynchronously if a synchronous call times out.
- * Note: this is a pretty rare case, and usually only happens when running test cases.
- * See bug 536141.
- */
- if ("timeout".equals(returnString)) {
- return WebkitGDBus.callExtensionAsync(argsTuple, dbusMethodName);
- }
- }
- return false;
-}
-
@Override
public boolean execute (String script) {
- if (WEBKIT2){
- if (!isJavascriptEnabled()) {
- System.err.println("SWT Webkit Warning: Attempting to execute javascript when javascript is dissabled."
- + "Execution has no effect. Script:\n" + script);
- return false;
- }
- try {
- Webkit2AsyncToSync.runjavascript(script, this.browser, webView);
- } catch (SWTException e) {
- return false;
- }
- return true;
- } else {
- byte[] scriptBytes = (script + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
- long jsScriptString = WebKitGTK.JSStringCreateWithUTF8CString (scriptBytes);
-
- // Currently loaded website will be used as 'source file' of the javascript to be exucuted.
- byte[] sourceUrlbytes = (getUrl () + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
-
- long jsSourceUrlString = WebKitGTK.JSStringCreateWithUTF8CString (sourceUrlbytes);
- long frame = WebKitGTK.webkit_web_view_get_main_frame (webView);
- long context = WebKitGTK.webkit_web_frame_get_global_context (frame);
- long result = WebKitGTK.JSEvaluateScript (context, jsScriptString, 0, jsSourceUrlString, 0, null);
- WebKitGTK.JSStringRelease (jsSourceUrlString);
- WebKitGTK.JSStringRelease (jsScriptString);
- return result != 0;
+ if (!isJavascriptEnabled()) {
+ System.err.println("SWT Webkit Warning: Attempting to execute javascript when javascript is dissabled."
+ + "Execution has no effect. Script:\n" + script);
+ return false;
+ }
+ try {
+ Webkit2AsyncToSync.runjavascript(script, this.browser, webView);
+ } catch (SWTException e) {
+ return false;
}
+ return true;
}
/**
@@ -1657,15 +900,18 @@ public boolean execute (String script) {
* The mechanism generates an ID for each callback and waits for that callback to complete.
*/
private static class Webkit2AsyncToSync {
-
+ /** We need a way to associate a Browser instance with this class for cookie functionality */
+ private static Browser cookieBrowser;
private static Callback runjavascript_callback;
private static Callback getText_callback;
+ private static Callback setCookie_callback;
+ private static Callback getCookie_callback;
+
static {
runjavascript_callback = new Callback(Webkit2AsyncToSync.class, "runjavascript_callback", void.class, new Type[] {long.class, long.class, long.class});
- if (runjavascript_callback.getAddress() == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
getText_callback = new Callback(Webkit2AsyncToSync.class, "getText_callback", void.class, new Type[] {long.class, long.class, long.class});
- if (getText_callback.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
+ setCookie_callback = new Callback(Webkit2AsyncToSync.class, "setCookie_callback", void.class, new Type[] {long.class, long.class, long.class});
+ getCookie_callback = new Callback(Webkit2AsyncToSync.class, "getCookie_callback", void.class, new Type[] {long.class, long.class, long.class});
}
/** Object used to return data from callback to original call */
@@ -1760,27 +1006,6 @@ private static class Webkit2AsyncToSync {
* SWT implementation.
*
* If in doubt, you should use nonBlockingExecute() where possible :-).
- *
- * TODO_SOMEDAY:
- * - Instead of async js execution and waiting for return value, it might be
- * better to use gdbus, connect to webextension and execute JS synchronously.
- * See: https://blogs.igalia.com/carlosgc/2013/09/10/webkit2gtk-web-process-extensions/
- * 'Extending JavaScript'
- * Pros:
- * - less likely deadlocks would occur due to developer error/not being careful.
- * - js execution can work in synchronous callbacks from webkit.
- * Cons:
- * - High implementation cost/complexity.
- * - Unexpected errors/behaviour due to GDBus timeouts.
- * Proof of concept:
- * https://git.eclipse.org/r/#/c/23416/16/bundles/org.eclipse.swt/Eclipse+SWT+WebKit/gtk/library/webkit_extension.c
- * > 'webkit_extension_execute_script'
- * Tennative structure:
- * - Webextension should create gdbus server, make & communicate UniqueID (pid) to main proc
- * - main proc should make a note of webextension's name+uniqueID
- * - implement mechanism for packaging Java objects into gvariants, (see WebkitGDBus.java),
- * - call webextension over gdbus, parse return value.
- *
*/
static Object runjavascript(String script, Browser browser, long webView) {
if (nonBlockingEvaluate > 0) {
@@ -1790,9 +1015,8 @@ private static class Webkit2AsyncToSync {
} else {
// Callback logic: Initiate an async callback and wait for it to finish.
// The callback comes back in runjavascript_callback(..) below.
- Consumer <Integer> asyncFunc = (callbackId) -> {
+ Consumer <Integer> asyncFunc = (callbackId) ->
WebKitGTK.webkit_web_view_run_javascript(webView, Converter.wcsToMbcs(script, true), 0, runjavascript_callback.getAddress(), callbackId);
- };
Webkit2AsyncReturnObj retObj = execAsyncAndWaitForReturn(browser, asyncFunc, " The following javascript was executed:\n" + script +"\n\n");
@@ -1882,6 +1106,139 @@ private static class Webkit2AsyncToSync {
retObj.callbackFinished = true;
Display.getCurrent().wake();
}
+
+ /**
+ * Associates a Browser instance with this class, mainly so we can get its Display
+ * and check for disposal.
+ * @param toSet the Browser instance to set
+ */
+ static void setCookieBrowser (Browser toSet) {
+ if (toSet != null) cookieBrowser = toSet;
+ }
+
+ static boolean setCookie(String cookieUrl, String cookieValue) {
+ long context = WebKitGTK.webkit_web_context_get_default();
+ long cookieManager = WebKitGTK.webkit_web_context_get_cookie_manager(context);
+ byte[] bytes = Converter.wcsToMbcs (cookieUrl, true);
+ long uri = WebKitGTK.soup_uri_new (bytes);
+ if (uri == 0) {
+ System.err.println("SWT WebKit: SoupURI == 0 when setting cookie");
+ return false;
+ }
+ bytes = Converter.wcsToMbcs (cookieValue, true);
+ long soupCookie = WebKitGTK.soup_cookie_parse (bytes, uri);
+
+ if (nonBlockingEvaluate > 0) {
+ System.err.println("SWT Webkit: setCookie() called inside a synchronous callback, which can lead to a deadlock.\n"
+ + "Return value is false.");
+ return false;
+ }
+
+ Consumer<Integer> asyncFunc = (callbackID) -> WebKitGTK.webkit_cookie_manager_add_cookie(cookieManager, soupCookie, 0,
+ setCookie_callback.getAddress(), callbackID);
+ Webkit2AsyncReturnObj retObj = execAsyncAndWaitForReturn(cookieBrowser, asyncFunc, " setCookie() was called");
+
+ WebKitGTK.soup_uri_free (uri);
+
+ if (retObj.swtAsyncTimeout) {
+ return false;
+ } else {
+ return (Boolean) retObj.returnValue;
+ }
+ }
+
+ @SuppressWarnings("unused") // Callback only called only by C directly
+ private static void setCookie_callback(long cookieManager, long result, long user_data) {
+ int callbackID = (int) user_data;
+ Webkit2AsyncReturnObj retObj = CallBackMap.getObj(callbackID);
+
+ long [] error = new long [1];
+ retObj.returnValue = WebKitGTK.webkit_cookie_manager_add_cookie_finish(cookieManager, result, error);
+
+ if (error[0] != 0) {
+ long errorMessageC = OS.g_error_get_message(error[0]);
+ String errorMessageStr = Converter.cCharPtrToJavaString(errorMessageC, false);
+ System.err.println("SWT WebKit: error setting cookie: " + errorMessageStr);
+ OS.g_error_free(error[0]);
+ }
+
+ retObj.callbackFinished = true;
+ Display.getCurrent().wake();
+
+ }
+
+ static String getCookie(String cookieUrl, String cookieName) {
+ long context = WebKitGTK.webkit_web_context_get_default();
+ long cookieManager = WebKitGTK.webkit_web_context_get_cookie_manager(context);
+ byte[] uri = Converter.wcsToMbcs (cookieUrl, true);
+ if (nonBlockingEvaluate > 0) {
+ System.err.println("SWT Webkit: getCookie() called inside a synchronous callback, which can lead to a deadlock.\n"
+ + "Return value is an empty string '' instead of actual cookie value.");
+ return "";
+ }
+
+ /*
+ * We package the cookie name and callbackID into a GVariant which can be passed to the callback.
+ * The callbackID is necessary so we can find our way back to the correct Browser instance, and
+ * the cookie name is necessary as the field could have been modified by the time the callback
+ * triggers.
+ */
+ Consumer<Integer> asyncFunc = (callbackID) -> WebKitGTK.webkit_cookie_manager_get_cookies(cookieManager, uri, 0,
+ getCookie_callback.getAddress(), GDBus.convertJavaToGVariant(new Object [] {cookieName, callbackID}));
+ Webkit2AsyncReturnObj retObj = execAsyncAndWaitForReturn(cookieBrowser, asyncFunc, " getCookie() was called");
+
+ if (retObj.swtAsyncTimeout) {
+ return "SWT WEBKIT TIMEOUT ERROR";
+ } else {
+ return (String) retObj.returnValue;
+ }
+ }
+
+ @SuppressWarnings("unused") // Callback only called only by C directly
+ private static void getCookie_callback(long cookieManager, long result, long user_data) {
+ Object resultObject = GDBus.convertGVariantToJava(user_data);
+
+ // We are expecting a GVariant tuple, anything else means something went wrong
+ if (resultObject instanceof Object []) {
+ // Unpack callback ID and cookie name
+ Object [] nameAndId = (Object []) resultObject;
+ String cookieName = (String) nameAndId[0];
+ int callbackId = ((Number) nameAndId[1]).intValue();
+ Webkit2AsyncReturnObj retObj = CallBackMap.getObj(callbackId);
+
+ // Get GSList of cookies
+ long [] error = new long [1];
+ long cookieList = WebKitGTK.webkit_cookie_manager_get_cookies_finish(cookieManager, result, error);
+ if (error[0] != 0) {
+ long errorMessageC = OS.g_error_get_message(error[0]);
+ String errorMessageStr = Converter.cCharPtrToJavaString(errorMessageC, false);
+ System.err.println("SWT WebKit: error getting cookie: " + errorMessageStr);
+ OS.g_error_free(error[0]);
+ retObj.returnValue = (String) "";
+ }
+
+ int length = OS.g_slist_length (cookieList);
+ long current = cookieList;
+ for (int i = 0; i < length; i++) {
+ long soupCookie = OS.g_slist_data (current);
+ long soupName = WebKitGTK.soup_cookie_get_name(soupCookie);
+ String soupNameStr = Converter.cCharPtrToJavaString(soupName, false);
+ if (soupNameStr != null && soupNameStr.equals(cookieName)) {
+ long soupValue = WebKitGTK.soup_cookie_get_value(soupCookie);
+ retObj.returnValue = Converter.cCharPtrToJavaString(soupValue, false);
+ break;
+ }
+ current = OS.g_slist_next (current);
+ }
+ OS.g_slist_free (cookieList);
+
+ retObj.callbackFinished = true;
+ Display.getCurrent().wake();
+ } else {
+ System.err.println("SWT WebKit: something went wrong unpacking GVariant tuple for getCookie_callback");
+ }
+ }
+
/**
* You should check 'retObj.swtAsyncTimeout' after making a call to this.
*/
@@ -1889,10 +1246,8 @@ private static class Webkit2AsyncToSync {
Webkit2AsyncReturnObj retObj = new Webkit2AsyncReturnObj();
int callbackId = CallBackMap.putObject(retObj);
asyncFunc.accept(callbackId);
- Display display = browser.getDisplay();
final Instant timeOut = Instant.now().plusMillis(ASYNC_EXEC_TIMEOUT_MS);
while (!browser.isDisposed()) {
- boolean eventsDispatched = OS.g_main_context_iteration (0, false);
if (retObj.callbackFinished)
break;
else if (Instant.now().isAfter(timeOut)) {
@@ -1911,8 +1266,13 @@ private static class Webkit2AsyncToSync {
retObj.swtAsyncTimeout = true;
break;
}
- else if (!eventsDispatched)
- display.sleep();
+ else {
+ if (GTK.GTK4) {
+ OS.g_main_context_iteration (0, true);
+ } else {
+ GTK3.gtk_main_iteration_do (true);
+ }
+ }
}
CallBackMap.removeObject(callbackId);
return retObj;
@@ -1924,19 +1284,15 @@ public Object evaluate (String script) throws SWTException {
if ("".equals(script)) {
return null; // A litte optimization. Sometimes evaluate() is called with a generated script, where the generated script is sometimes empty.
}
- if (WEBKIT2){
- if (!isJavascriptEnabled()) {
- return null;
- }
- return Webkit2AsyncToSync.evaluate(script, this.browser, webView);
- } else {
- return super.evaluate(script);
+ if (!isJavascriptEnabled()) {
+ return null;
}
+ return Webkit2AsyncToSync.evaluate(script, this.browser, webView);
}
@Override
public boolean forward () {
- if (WEBKIT2 && webView == 0) {
+ if (webView == 0) {
assert false;
System.err.println("SWT Webkit: forward() called after widget disposed. Should not have happened.\n" + getInternalErrorMsg());
return false; // Disposed.
@@ -1953,33 +1309,7 @@ public String getBrowserType () {
@Override
public String getText () {
- if (WEBKIT2) {
- return Webkit2AsyncToSync.getText(browser, webView);
- } else {
- // Webkit1 only.
- long frame = WebKitGTK.webkit_web_view_get_main_frame (webView);
- long source = WebKitGTK.webkit_web_frame_get_data_source (frame);
- if (source == 0) return ""; //$NON-NLS-1$
- long data = WebKitGTK.webkit_web_data_source_get_data (source);
- if (data == 0) return ""; //$NON-NLS-1$
-
- long encoding = WebKitGTK.webkit_web_data_source_get_encoding (source);
- int length = C.strlen (encoding);
- byte[] bytes = new byte [length];
- C.memmove (bytes, encoding, length);
- String encodingString = new String (Converter.mbcsToWcs (bytes));
-
- length = OS.GString_len (data);
- bytes = new byte[length];
- long string = OS.GString_str (data);
- C.memmove (bytes, string, length);
-
- try {
- return new String (bytes, encodingString);
- } catch (UnsupportedEncodingException e) {
- }
- return new String (Converter.mbcsToWcs (bytes));
- }
+ return Webkit2AsyncToSync.getText(browser, webView);
}
@Override
@@ -2076,11 +1406,15 @@ boolean handleDOMEvent (long event, int type) {
/* key event */
int keyEventState = 0;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int eventType = GDK.gdk_event_get_event_type(eventPtr);
int [] state = new int[1];
- GDK.gdk_event_get_state(eventPtr, state);
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(eventPtr);
+ } else {
+ GDK.gdk_event_get_state(eventPtr, state);
+ }
switch (eventType) {
case GDK.GDK_KEY_PRESS:
case GDK.GDK_KEY_RELEASE:
@@ -2392,19 +1726,6 @@ long handleLoadCommitted (long uri, boolean top) {
}
}
- // Bug 511797 : On webkit2, this code is only reached once per page load.
- if (WEBKIT1) {
- /*
- * Webkit1:
- * Each invocation of setText() causes webkit_notify_load_status to be invoked
- * twice, once for the initial navigate to about:blank, and once for the auto-navigate
- * to about:blank that WebKit does when webkit_web_view_load_string is invoked. If
- * this is the first webkit_notify_load_status callback received for a setText()
- * invocation then do not send any events or re-install registered BrowserFunctions.
- */
- if (top && url.startsWith(ABOUT_BLANK) && htmlBytes != null) return 0;
- }
-
LocationEvent event = new LocationEvent (browser);
event.display = browser.getDisplay ();
event.widget = browser;
@@ -2416,40 +1737,12 @@ long handleLoadCommitted (long uri, boolean top) {
locationListeners[i].changed (event);
}
};
- if (WEBKIT2) {
- browser.getDisplay().asyncExec(fireLocationChanged);
- } else {
- fireLocationChanged.run();
- }
+ browser.getDisplay().asyncExec(fireLocationChanged);
return 0;
}
-private void fireNewTitleEvent(String title){
- if (WEBKIT1) {
- // titleListener is already handled/fired in webkit_notify_title()
- // [which is triggered by 'notify::title'. No need to fire it twice.
- //
- // This function is called by load_change / notify_load_status, which doesn't necessarily mean the
- // title has actually changed. Further title can also be changed by javascript on the same page,
- // thus page_load is not a proper way to trigger title_change.
- // It's not clear when notify::title was introduced, (sometime in Webkit1 by the looks?)
- // thus keeping code below for webkit1/legacy reasons.
- TitleEvent newEvent = new TitleEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- newEvent.title = title;
- for (int i = 0; i < titleListeners.length; i++) {
- titleListeners[i].changed (newEvent);
- }
- }
-}
-
/**
* This method is reached by:
- * Webkit1: WebkitWebView notify::load-status
- * - simple change in property
- * - https://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView--load-status
- *
* Webkit2: WebKitWebView load-changed signal
* - void user_function (WebKitWebView *web_view, WebKitLoadEvent load_event, gpointer user_data)
* - https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView-load-changed
@@ -2467,86 +1760,12 @@ private void fireProgressCompletedEvent(){
progressListeners[i].completed (progress);
}
};
- if (WEBKIT2)
- browser.getDisplay().asyncExec(fireProgressEvents);
- else
- fireProgressEvents.run();
-}
-
-/** Webkit1 only.
- * (Webkit2 equivalent is webkit_load_changed())
- */
-long handleLoadFinished (long uri, boolean top) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- int length = C.strlen (uri);
- byte[] bytes = new byte[length];
- C.memmove (bytes, uri, length);
- String url = new String (Converter.mbcsToWcs (bytes));
- /*
- * If the URI indicates that the page is being rendered from memory
- * (via setText()) then set it to about:blank to be consistent with IE.
- */
- if (url.equals (URI_FILEROOT)) {
- url = ABOUT_BLANK;
- } else {
- length = URI_FILEROOT.length ();
- if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
- url = ABOUT_BLANK + url.substring (length);
- }
- }
-
- /*
- * If htmlBytes is not null then there is html from a previous setText() call
- * waiting to be set into the about:blank page once it has completed loading.
- */
- if (top && htmlBytes != null) {
- if (url.startsWith(ABOUT_BLANK)) {
- loadingText = true;
- byte[] mimeType = Converter.wcsToMbcs ("text/html", true); //$NON-NLS-1$
- byte[] encoding = Converter.wcsToMbcs (StandardCharsets.UTF_8.displayName(), true); //$NON-NLS-1$
- byte[] uriBytes;
- if (untrustedText) {
- uriBytes = Converter.wcsToMbcs (ABOUT_BLANK, true);
- } else {
- uriBytes = Converter.wcsToMbcs (URI_FILEROOT, true);
- }
- WebKitGTK.webkit_web_view_load_string (webView, htmlBytes, mimeType, encoding, uriBytes);
- htmlBytes = null;
- }
- }
-
- /*
- * The webkit_web_view_load_string() invocation above will trigger a second
- * webkit_web_view_load_string callback when it is completed. Wait for this
- * second callback to come before sending the title or completed events.
- */
- if (!loadingText) {
- /*
- * To be consistent with other platforms a title event should be fired
- * when a top-level page has completed loading. A page with a <title>
- * tag will do this automatically when the notify::title signal is received.
- * However a page without a <title> tag will not do this by default, so fire
- * the event here with the page's url as the title.
- */
- if (top) {
- long frame = WebKitGTK.webkit_web_view_get_main_frame (webView);
- long title = WebKitGTK.webkit_web_frame_get_title (frame);
- if (title == 0) {
- fireNewTitleEvent(url);
- if (browser.isDisposed ()) return 0;
- }
- }
-
- fireProgressCompletedEvent();
- }
- loadingText = false;
-
- return 0;
+ browser.getDisplay().asyncExec(fireProgressEvents);
}
@Override
public boolean isBackEnabled () {
- if (WEBKIT2 && webView == 0)
+ if (webView == 0)
return false; //disposed.
return WebKitGTK.webkit_web_view_can_go_back (webView) != 0;
}
@@ -2570,18 +1789,7 @@ void onDispose (Event e) {
}
functions = null;
- if (WEBKIT1) {
- // event function/external object only used by webkit1. For Webkit2, see Webkit2JavaCallback
- if (eventFunction != null) {
- eventFunction.dispose (false);
- eventFunction = null;
- }
- C.free (webViewData);
- postData = null;
- headers = null;
- htmlBytes = null;
- }
- if (WEBKIT2 && WebKitGTK.webkit_get_minor_version() >= 18) {
+ if (WebKitGTK.webkit_get_minor_version() >= 18) {
// Bug 530678.
// * As of Webkit 2.18, (it seems) webkitGtk auto-disposes itself when the parent is disposed.
// * This can cause a deadlock inside Webkit process if WebkitGTK widget's parent is disposed during a callback.
@@ -2592,29 +1800,18 @@ void onDispose (Event e) {
// If you change dispose logic, to check that you haven't introduced memory leaks, test via:
// org.eclipse.swt.tests.junit.memoryleak.Test_Memory_Leak.test_Browser()
OS.g_object_ref (webView);
- GTK.gtk_container_remove (GTK.gtk_widget_get_parent (webView), webView);
+ GTK3.gtk_container_remove (GTK.gtk_widget_get_parent (webView), webView);
long webViewTempRef = webView;
- browser.getDisplay().asyncExec(() -> {
- OS.g_object_unref (webViewTempRef);
- });
+ Display.getDefault().asyncExec(() -> OS.g_object_unref(webViewTempRef));
webView = 0;
}
}
void onResize (Event e) {
Rectangle rect = DPIUtil.autoScaleUp(browser.getClientArea ());
- if (WEBKIT2){
- if (webView == 0)
- return;
- GTK.gtk_widget_set_size_request (webView, rect.width, rect.height);
- } else {
- GTK.gtk_widget_set_size_request (scrolledWindow, rect.width, rect.height);
- }
-}
-
-void openDownloadWindow (final long webkitDownload) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- openDownloadWindow(webkitDownload, null);
+ if (webView == 0)
+ return;
+ GTK.gtk_widget_set_size_request (webView, rect.width, rect.height);
}
void openDownloadWindow (final long webkitDownload, final String suggested_filename) {
@@ -2627,24 +1824,11 @@ void openDownloadWindow (final long webkitDownload, final String suggested_filen
gridLayout.verticalSpacing = 20;
shell.setLayout (gridLayout);
- String nameString;
- if (WEBKIT1) {
- long name = WebKitGTK.webkit_download_get_suggested_filename (webkitDownload);
- int length = C.strlen (name);
- byte[] bytes = new byte[length];
- C.memmove (bytes, name, length);
- nameString = new String (Converter.mbcsToWcs (bytes));
- } else {
- nameString = suggested_filename;
- }
+ String nameString = suggested_filename;
+
+ long request = WebKitGTK.webkit_download_get_request(webkitDownload);
+ long url = WebKitGTK.webkit_uri_request_get_uri(request);
- long url;
- if (WEBKIT1) {
- url = WebKitGTK.webkit_download_get_uri (webkitDownload);
- } else {
- long request = WebKitGTK.webkit_download_get_request(webkitDownload);
- url = WebKitGTK.webkit_uri_request_get_uri(request);
- }
int length = C.strlen (url);
byte[] bytes = new byte[length];
C.memmove (bytes, url, length);
@@ -2672,9 +1856,7 @@ void openDownloadWindow (final long webkitDownload, final String suggested_filen
data.horizontalAlignment = GridData.CENTER;
cancel.setLayoutData (data);
final Listener cancelListener = event -> {
- if (WEBKIT2) {
- webKitDownloadStatus.put(new LONG(webkitDownload), WebKitGTK.WEBKIT_DOWNLOAD_STATUS_CANCELLED);
- }
+ webKitDownloadStatus.put(new LONG(webkitDownload), WebKitGTK.WEBKIT_DOWNLOAD_STATUS_CANCELLED);
WebKitGTK.webkit_download_cancel (webkitDownload);
};
cancel.addListener (SWT.Selection, cancelListener);
@@ -2685,19 +1867,12 @@ void openDownloadWindow (final long webkitDownload, final String suggested_filen
display.timerExec (INTERVAL, new Runnable () {
@Override
public void run () {
- int status = 0; // 0 allows download window to continue
- if (WEBKIT1) {
- status = WebKitGTK.webkit_download_get_status (webkitDownload);
- } else {
- status = webKitDownloadStatus.containsKey(new LONG(webkitDownload)) ? webKitDownloadStatus.get(new LONG(webkitDownload)) : 0;
- }
+ int status = webKitDownloadStatus.containsKey(new LONG(webkitDownload)) ? webKitDownloadStatus.get(new LONG(webkitDownload)) : 0;
if (shell.isDisposed () || status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_FINISHED || status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_CANCELLED) {
shell.dispose ();
display.timerExec (-1, this);
OS.g_object_unref (webkitDownload);
- if (WEBKIT2) {
- webKitDownloadStatus.remove(new LONG(webkitDownload));
- }
+ webKitDownloadStatus.remove(new LONG(webkitDownload));
return;
}
if (status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_ERROR) {
@@ -2706,22 +1881,13 @@ void openDownloadWindow (final long webkitDownload, final String suggested_filen
OS.g_object_unref (webkitDownload);
cancel.removeListener (SWT.Selection, cancelListener);
cancel.addListener (SWT.Selection, event -> shell.dispose ());
- if (WEBKIT2) {
- webKitDownloadStatus.remove(new LONG(webkitDownload));
- }
+ webKitDownloadStatus.remove(new LONG(webkitDownload));
return;
}
- long current = 0;
- long total = 0;
- if (WEBKIT1) {
- current = WebKitGTK.webkit_download_get_current_size (webkitDownload) / 1024L;
- total = WebKitGTK.webkit_download_get_total_size (webkitDownload) / 1024L;
- } else {
- current = WebKitGTK.webkit_download_get_received_data_length(webkitDownload) / 1024L;
- long response = WebKitGTK.webkit_download_get_response(webkitDownload);
- total = WebKitGTK.webkit_uri_response_get_content_length(response) / 1024L;
- }
+ long current = WebKitGTK.webkit_download_get_received_data_length(webkitDownload) / 1024L;
+ long response = WebKitGTK.webkit_download_get_response(webkitDownload);
+ long total = WebKitGTK.webkit_uri_response_get_content_length(response) / 1024L;
String message = Compatibility.getMessage ("SWT_Download_Status", new Object[] {current, total}); //$NON-NLS-1$
statusLabel.setText (message);
display.timerExec (INTERVAL, this);
@@ -2734,7 +1900,7 @@ void openDownloadWindow (final long webkitDownload, final String suggested_filen
@Override
public void refresh () {
- if (WEBKIT2 && webView == 0)
+ if (webView == 0)
return; //disposed.
WebKitGTK.webkit_web_view_reload (webView);
}
@@ -2744,46 +1910,23 @@ public boolean setText (String html, boolean trusted) {
/* convert the String containing HTML to an array of bytes with UTF-8 data */
byte[] html_bytes = (html + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
- /*
- * If this.htmlBytes is not null then the about:blank page is already being loaded,
- * so no navigate is required. Just set the html that is to be shown.
- */
- boolean blankLoading = htmlBytes != null; // Webkit1 only.
- if (WEBKIT1) {
- this.htmlBytes = html_bytes;
- untrustedText = !trusted;
- }
-
- if (WEBKIT2) {
- w2_bug527738LastRequestCounter.incrementAndGet();
- byte[] uriBytes;
- if (!trusted) {
- uriBytes = Converter.wcsToMbcs (ABOUT_BLANK, true);
- } else {
- uriBytes = Converter.wcsToMbcs (URI_FILEROOT, true);
- }
- WebKitGTK.webkit_web_view_load_html (webView, html_bytes, uriBytes);
+ w2_bug527738LastRequestCounter.incrementAndGet();
+ byte[] uriBytes;
+ if (!trusted) {
+ uriBytes = Converter.wcsToMbcs (ABOUT_BLANK, true);
} else {
- if (blankLoading) return true;
-
- byte[] uriBytes = Converter.wcsToMbcs (ABOUT_BLANK, true);
- WebKitGTK.webkit_web_view_load_uri (webView, uriBytes);
+ uriBytes = Converter.wcsToMbcs (URI_FILEROOT, true);
}
+ WebKitGTK.webkit_web_view_load_html (webView, html_bytes, uriBytes);
return true;
}
@Override
public boolean setUrl (String url, String postData, String[] headers) {
- if (WEBKIT1) {
- this.postData = postData;
- this.headers = headers;
- }
- if (WEBKIT2) {
- w2_bug527738LastRequestCounter.incrementAndGet();
- }
+ w2_bug527738LastRequestCounter.incrementAndGet();
- if (WEBKIT2 && webView == 0)
+ if (webView == 0)
return false; // disposed.
/*
@@ -2838,7 +1981,7 @@ public boolean setUrl (String url, String postData, String[] headers) {
byte[] uriBytes = Converter.wcsToMbcs (url, true);
- if (WEBKIT2 && postData==null && headers != null) {
+ if (postData==null && headers != null) {
long request = WebKitGTK.webkit_uri_request_new (uriBytes);
long requestHeaders = WebKitGTK.webkit_uri_request_get_http_headers (request);
if (requestHeaders != 0) {
@@ -2853,7 +1996,7 @@ public boolean setUrl (String url, String postData, String[] headers) {
// Webkit2 doesn't have api to set url with data. (2.18). While we wait for them to implement,
// this workaround uses java to query a server and then manually populate webkit with content.
// This should be version guarded and replaced with proper functions once webkit2 has implemented api.
- if (WEBKIT2 && postData != null) {
+ if (postData != null) {
final String base_url = url;
// Use Webkit User-Agent
@@ -2955,8 +2098,7 @@ public boolean setUrl (String url, String postData, String[] headers) {
WebKitGTK.webkit_web_view_load_uri (webView, uriBytes);
}
- // Handle when !(WEBKIT2 && postData != null)
- if (WEBKIT1 || (WEBKIT2 && postData == null)) {
+ if (postData == null) {
OS.g_object_set (settings, WebKitGTK.user_agent, 0, 0);
}
return true;
@@ -2967,41 +2109,10 @@ public void stop () {
WebKitGTK.webkit_web_view_stop_loading (webView);
}
-long webframe_notify_load_status (long web_frame, long pspec) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- int status = WebKitGTK.webkit_web_frame_get_load_status (web_frame);
- switch (status) {
- case WebKitGTK.WEBKIT_LOAD_COMMITTED: {
- long uri = WebKitGTK.webkit_web_frame_get_uri (web_frame);
- return handleLoadCommitted (uri, false);
- }
- case WebKitGTK.WEBKIT_LOAD_FINISHED: {
- /*
- * If this frame navigation was isolated to this frame (eg.- a link was
- * clicked in the frame, as opposed to this frame being created in
- * response to navigating to a main document containing frames) then
- * treat this as a completed load.
- */
- long parentFrame = WebKitGTK.webkit_web_frame_get_parent (web_frame);
- if (WebKitGTK.webkit_web_frame_get_load_status (parentFrame) == WebKitGTK.WEBKIT_LOAD_FINISHED) {
- long uri = WebKitGTK.webkit_web_frame_get_uri (web_frame);
- return handleLoadFinished (uri, false);
- }
- }
- }
- return 0;
-}
-
/**
- * Webkit1:
- * - WebkitWebView 'close-web-view' signal.
- * - gboolean user_function (WebKitWebView *web_view, gpointer user_data); // observe return value.
- * - https://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView-close-web-view
- *
- * Webkit2:
- * - WebKitWebView 'close' signal
- * - void user_function (WebKitWebView *web_view, gpointer user_data); // observe *no* return value.
- * - https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView-close
+ * WebKitWebView 'close' signal
+ * void user_function (WebKitWebView *web_view, gpointer user_data); // observe *no* return value.
+ * https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView-close
*/
long webkit_close_web_view (long web_view) {
WindowEvent newEvent = new WindowEvent (browser);
@@ -3014,20 +2125,12 @@ long webkit_close_web_view (long web_view) {
}
browser.dispose ();
};
- if (WEBKIT2) {
- // There is a subtle difference in Webkit1 vs Webkit2, in that on webkit2 this signal doesn't expect a return value.
- // As such, we can safley execute the SWT listeners later to avoid deadlocks. See bug 512001
- browser.getDisplay().asyncExec(fireCloseWindowListeners);
- } else {
- fireCloseWindowListeners.run();
- }
+ // On WebKit2 this signal doesn't expect a return value.
+ // As such, we can safley execute the SWT listeners later to avoid deadlocks. See bug 512001
+ browser.getDisplay().asyncExec(fireCloseWindowListeners);
return 0;
}
-long webkit_console_message (long web_view, long message, long line, long source_id) {
- return 1; /* stop the message from being written to stderr */
-}
-
long webkit_create_web_view (long web_view, long frame) {
WindowEvent newEvent = new WindowEvent (browser);
newEvent.display = browser.getDisplay ();
@@ -3040,17 +2143,15 @@ long webkit_create_web_view (long web_view, long frame) {
}
}
};
- if (WEBKIT2) {
- try {
- nonBlockingEvaluate++; // running evaluate() inside openWindowListener and waiting for return leads to deadlock. Bug 512001
- fireOpenWindowListeners.run();// Permit evaluate()/execute() to execute scripts in listener, but do not provide return value.
- } catch (Exception e) {
- throw e; // rethrow execption if thrown, but decrement counter first.
- } finally {
- nonBlockingEvaluate--;
- }
- } else {
- fireOpenWindowListeners.run();
+ try {
+ nonBlockingEvaluate++; // running evaluate() inside openWindowListener and waiting for return leads to deadlock. Bug 512001
+ parentBrowser = browser;
+ fireOpenWindowListeners.run();// Permit evaluate()/execute() to execute scripts in listener, but do not provide return value.
+ } catch (Exception e) {
+ throw e; // rethrow execption if thrown, but decrement counter first.
+ } finally {
+ parentBrowser = null;
+ nonBlockingEvaluate--;
}
Browser browser = null;
if (newEvent.browser != null && newEvent.browser.webBrowser instanceof WebKit) {
@@ -3062,52 +2163,15 @@ long webkit_create_web_view (long web_view, long frame) {
return 0;
}
-long webkit_download_requested (long web_view, long download) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- long name = WebKitGTK.webkit_download_get_suggested_filename (download);
- int length = C.strlen (name);
- byte[] bytes = new byte[length];
- C.memmove (bytes, name, length);
- final String nameString = new String (Converter.mbcsToWcs (bytes));
- final long request = WebKitGTK.webkit_download_get_network_request (download);
- OS.g_object_ref (request);
- /*
- * As of WebKitGTK 1.8.x attempting to show a FileDialog in this callback causes
- * a hang. The workaround is to open it asynchronously with a new download.
- */
- browser.getDisplay ().asyncExec (() -> {
- if (!browser.isDisposed ()) {
- FileDialog dialog = new FileDialog (browser.getShell (), SWT.SAVE);
- dialog.setFileName (nameString);
- String title = Compatibility.getMessage ("SWT_FileDownload"); //$NON-NLS-1$
- dialog.setText (title);
- String path = dialog.open ();
- if (path != null) {
- path = URI_FILEROOT + path;
- long newDownload = WebKitGTK.webkit_download_new (request);
- byte[] uriBytes = Converter.wcsToMbcs (path, true);
- WebKitGTK.webkit_download_set_destination_uri (newDownload, uriBytes);
- openDownloadWindow (newDownload);
- WebKitGTK.webkit_download_start (newDownload);
- OS.g_object_unref (newDownload);
- }
- }
- OS.g_object_unref (request);
- });
- return 1;
-}
-
static long webkit_download_started(long webKitDownload) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
- OS._g_signal_connect(webKitDownload, WebKitGTK.decide_destination, Proc3.getAddress(), DECIDE_DESTINATION);
- OS._g_signal_connect(webKitDownload, WebKitGTK.failed, Proc3.getAddress(), FAILED);
- OS._g_signal_connect(webKitDownload, WebKitGTK.finished, Proc2.getAddress(), FINISHED);
+ OS.g_signal_connect(webKitDownload, WebKitGTK.decide_destination, Proc3.getAddress(), DECIDE_DESTINATION);
+ OS.g_signal_connect(webKitDownload, WebKitGTK.failed, Proc3.getAddress(), FAILED);
+ OS.g_signal_connect(webKitDownload, WebKitGTK.finished, Proc2.getAddress(), FINISHED);
return 1;
}
static long webkit_download_decide_destination(long webKitDownload, long suggested_filename) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
final String fileName = getString(suggested_filename);
long webView = WebKitGTK.webkit_download_get_web_view(webKitDownload);
if (webView != 0) {
@@ -3134,7 +2198,6 @@ static long webkit_download_decide_destination(long webKitDownload, long suggest
}
static long webkit_download_finished(long download) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
// A failed signal may have been recorded prior. The finish signal is now being called.
if (!webKitDownloadStatus.containsKey(new LONG(download))) {
webKitDownloadStatus.put(new LONG(download), WebKitGTK.WEBKIT_DOWNLOAD_STATUS_FINISHED);
@@ -3143,7 +2206,6 @@ static long webkit_download_finished(long download) {
}
static long webkit_download_failed(long download) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
// A cancel may have been issued resulting in this signal call. Preserve the original cause.
if (!webKitDownloadStatus.containsKey(new LONG(download))) {
webKitDownloadStatus.put(new LONG(download), WebKitGTK.WEBKIT_DOWNLOAD_STATUS_ERROR);
@@ -3152,12 +2214,11 @@ static long webkit_download_failed(long download) {
}
/**
- * Webkit2 only. WebkitWebView mouse-target-changed
+ * WebkitWebView mouse-target-changed
* - void user_function (WebKitWebView *web_view, WebKitHitTestResult *hit_test_result, guint modifiers, gpointer user_data)
* - https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView-mouse-target-changed
* */
long webkit_mouse_target_changed (long web_view, long hit_test_result, long modifiers) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
if (WebKitGTK.webkit_hit_test_result_context_is_link(hit_test_result)){
long uri = WebKitGTK.webkit_hit_test_result_get_link_uri(hit_test_result);
long title = WebKitGTK.webkit_hit_test_result_get_link_title(hit_test_result);
@@ -3168,10 +2229,6 @@ long webkit_mouse_target_changed (long web_view, long hit_test_result, long modi
}
/**
- * Webkit1: WebkitWebView hovering-over-link signal
- * - void user_function (WebKitWebView *web_view, gchar *title, gchar *uri, gpointer user_data)
- * - https://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView-hovering-over-link
- *
* Webkit2: WebkitWebView mouse-target-change
* - Normally this signal is called for many different events, e.g hoveing over an image.
* But in our case, in webkit_mouse_target_changed() we filter out everything except mouse_over_link events.
@@ -3194,203 +2251,94 @@ long webkit_hovering_over_link (long web_view, long title, long uri) {
statusTextListeners[i].changed (event);
}
};
- if (WEBKIT2)
- browser.getDisplay().asyncExec(fireStatusTextListener);
- else
- fireStatusTextListener.run();
- }
- return 0;
-}
-
-long webkit_mime_type_policy_decision_requested (long web_view, long frame, long request, long mimetype, long policy_decision) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- boolean canShow = WebKitGTK.webkit_web_view_can_show_mime_type (webView, mimetype) != 0;
- if (!canShow) {
- WebKitGTK.webkit_web_policy_decision_download (policy_decision);
- return 1;
+ browser.getDisplay().asyncExec(fireStatusTextListener);
}
return 0;
}
-/** Webkit1 only */
-long webkit_navigation_policy_decision_requested (long web_view, long frame, long request, long navigation_action, long policy_decision) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- if (loadingText) {
+long webkit_decide_policy (long web_view, long decision, int decision_type, long user_data) {
+ switch (decision_type) {
+ case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
+ long request = WebKitGTK. webkit_navigation_policy_decision_get_request(decision);
+ if (request == 0){
+ return 0;
+ }
+ long uri = WebKitGTK.webkit_uri_request_get_uri (request);
+ String url = getString(uri);
/*
- * WebKit is auto-navigating to about:blank in response to a
- * webkit_web_view_load_string() invocation. This navigate
- * should always proceed without sending an event since it is
- * preceded by an explicit navigate to about:blank in setText().
- */
- return 0;
- }
-
- long uri = WebKitGTK.webkit_network_request_get_uri (request);
- int length = C.strlen (uri);
- byte[] bytes = new byte[length];
- C.memmove (bytes, uri, length);
-
- String url = new String (Converter.mbcsToWcs (bytes));
- /*
- * If the URI indicates that the page is being rendered from memory
- * (via setText()) then set it to about:blank to be consistent with IE.
- */
- if (url.equals (URI_FILEROOT)) {
- url = ABOUT_BLANK;
- } else {
- length = URI_FILEROOT.length ();
- if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
- url = ABOUT_BLANK + url.substring (length);
+ * If the URI indicates that the page is being rendered from memory
+ * (via setText()) then set it to about:blank to be consistent with IE.
+ */
+ if (url.equals (URI_FILEROOT)) {
+ url = ABOUT_BLANK;
+ } else {
+ int length = URI_FILEROOT.length ();
+ if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
+ url = ABOUT_BLANK + url.substring (length);
+ }
}
- }
- LocationEvent newEvent = new LocationEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- newEvent.location = url;
- newEvent.doit = true;
- if (locationListeners != null) {
- for (int i = 0; i < locationListeners.length; i++) {
- locationListeners[i].changing (newEvent);
- }
- }
- if (newEvent.doit && !browser.isDisposed ()) {
- if (jsEnabled != jsEnabledOnNextPage) {
- jsEnabled = jsEnabledOnNextPage;
- DisabledJSCount += !jsEnabled ? 1 : -1;
- webkit_settings_set(WebKitGTK.enable_scripts, jsEnabled ? 1 : 0);
- }
+ LocationEvent newEvent = new LocationEvent (browser);
+ newEvent.display = browser.getDisplay ();
+ newEvent.widget = browser;
+ newEvent.location = url;
+ newEvent.doit = true;
- /* hook status change signal if frame is a newly-created sub-frame */
- long mainFrame = WebKitGTK.webkit_web_view_get_main_frame (webView);
- if (frame != mainFrame) {
- int id = OS.g_signal_handler_find (frame, OS.G_SIGNAL_MATCH_FUNC | OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, Proc3.getAddress (), NOTIFY_LOAD_STATUS);
- if (id == 0) {
- OS.g_signal_connect (frame, WebKitGTK.notify_load_status, Proc3.getAddress (), NOTIFY_LOAD_STATUS);
+ try {
+ nonBlockingEvaluate++;
+ if (locationListeners != null) {
+ for (int i = 0; i < locationListeners.length; i++) {
+ locationListeners[i].changing (newEvent);
+ }
}
+ } catch (Exception e) {
+ throw e;
+ } finally {
+ nonBlockingEvaluate--;
}
- /*
- * The following line is intentionally commented. For some reason, invoking
- * webkit_web_policy_decision_use(policy_decision) causes the Flash plug-in
- * to crash when navigating to a page with Flash. Since returning from this
- * callback without invoking webkit_web_policy_decision_ignore(policy_decision)
- * implies that the page should be loaded, it's fine to not invoke
- * webkit_web_policy_decision_use(policy_decision) here.
- */
- //WebKitGTK.webkit_web_policy_decision_use (policy_decision);
- } else {
- WebKitGTK.webkit_web_policy_decision_ignore (policy_decision);
- }
- return 0;
-}
-
-/** Webkit2 only */
-long webkit_decide_policy (long web_view, long decision, int decision_type, long user_data) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
- switch (decision_type) {
- case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
- long request = WebKitGTK. webkit_navigation_policy_decision_get_request(decision);
- if (request == 0){
- return 0;
- }
- long uri = WebKitGTK.webkit_uri_request_get_uri (request);
- String url = getString(uri);
- /*
- * If the URI indicates that the page is being rendered from memory
- * (via setText()) then set it to about:blank to be consistent with IE.
- */
- if (url.equals (URI_FILEROOT)) {
- url = ABOUT_BLANK;
- } else {
- int length = URI_FILEROOT.length ();
- if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
- url = ABOUT_BLANK + url.substring (length);
- }
- }
-
- LocationEvent newEvent = new LocationEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- newEvent.location = url;
- newEvent.doit = true;
-
- try {
- nonBlockingEvaluate++;
- if (locationListeners != null) {
- for (int i = 0; i < locationListeners.length; i++) {
- locationListeners[i].changing (newEvent);
- }
- }
- } catch (Exception e) {
- throw e;
- } finally {
- nonBlockingEvaluate--;
- }
-
- if (newEvent.doit && !browser.isDisposed ()) {
- if (jsEnabled != jsEnabledOnNextPage) {
- jsEnabled = jsEnabledOnNextPage;
- webkit_settings_set(WebKitGTK.enable_javascript, jsEnabled ? 1 : 0);
- }
- }
- if(!newEvent.doit){
- WebKitGTK.webkit_policy_decision_ignore (decision);
- }
- break;
- case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
- break;
- case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
- long response = WebKitGTK.webkit_response_policy_decision_get_response(decision);
- long mime_type = WebKitGTK.webkit_uri_response_get_mime_type(response);
- boolean canShow = WebKitGTK.webkit_web_view_can_show_mime_type (webView, mime_type) != 0;
- if (!canShow) {
- WebKitGTK.webkit_policy_decision_download (decision);
- return 1;
- }
- break;
- default:
- /* Making no decision results in webkit_policy_decision_use(). */
- return 0;
- }
- return 0;
-}
-
-long webkit_notify_load_status (long web_view, long pspec) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- int status = WebKitGTK.webkit_web_view_get_load_status (webView);
- switch (status) {
- case WebKitGTK.WEBKIT_LOAD_COMMITTED: {
- long uri = WebKitGTK.webkit_web_view_get_uri (webView);
- return handleLoadCommitted (uri, true);
- }
- case WebKitGTK.WEBKIT_LOAD_FINISHED: {
- long uri = WebKitGTK.webkit_web_view_get_uri (webView);
- return handleLoadFinished (uri, true);
+ if (newEvent.doit && !browser.isDisposed ()) {
+ if (jsEnabled != jsEnabledOnNextPage) {
+ jsEnabled = jsEnabledOnNextPage;
+ webkit_settings_set(WebKitGTK.enable_javascript, jsEnabled ? 1 : 0);
+ }
}
+ if(!newEvent.doit){
+ WebKitGTK.webkit_policy_decision_ignore (decision);
+ }
+ break;
+ case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
+ break;
+ case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
+ long response = WebKitGTK.webkit_response_policy_decision_get_response(decision);
+ long mime_type = WebKitGTK.webkit_uri_response_get_mime_type(response);
+ boolean canShow = WebKitGTK.webkit_web_view_can_show_mime_type (webView, mime_type) != 0;
+ if (!canShow) {
+ WebKitGTK.webkit_policy_decision_download (decision);
+ return 1;
+ }
+ break;
+ default:
+ /* Making no decision results in webkit_policy_decision_use(). */
+ return 0;
}
return 0;
}
-/**
- * This method is only called by Webkit2.
- * The webkit1 equivalent is webkit_window_object_cleared;
- */
long webkit_load_changed (long web_view, int status, long user_data) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
switch (status) {
case WebKitGTK.WEBKIT2_LOAD_COMMITTED: {
long uri = WebKitGTK.webkit_web_view_get_uri (webView);
return handleLoadCommitted (uri, true);
}
case WebKitGTK.WEBKIT2_LOAD_FINISHED: {
- addEventHandlers (web_view, true);
-
- long title = WebKitGTK.webkit_web_view_get_title (webView);
- if (title == 0) {
- long uri = WebKitGTK.webkit_web_view_get_uri (webView);
- fireNewTitleEvent(getString(uri));
+ if (firstLoad) {
+ GtkAllocation allocation = new GtkAllocation ();
+ GTK.gtk_widget_get_allocation(browser.handle, allocation);
+ GTK3.gtk_widget_size_allocate(browser.handle, allocation);
+ firstLoad = false;
}
+
fireProgressCompletedEvent();
/*
@@ -3437,13 +2385,10 @@ long webkit_load_changed (long web_view, int status, long user_data) {
}
/**
- * This method is only called by Webkit2.
- *
* Called in cases where a web page failed to load due to TLS errors
* (self-signed certificates, as an example).
*/
long webkit_load_failed_tls (long web_view, long failing_uri, long certificate, long error) {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
if (!ignoreTls) {
// Set tlsError flag so that the user can be prompted once this "bad" page has finished loading
tlsError = true;
@@ -3511,24 +2456,17 @@ void convertUri (long webkitUri) {
/**
* Triggered by a change in property. (both gdouble[0,1])
- * Webkit1: WebkitWebview notify::progress
- * https://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView--progress
* Webkit2: WebkitWebview notify::estimated-load-progress
* https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView--estimated-load-progress
*
* No return value required. Thus safe to run asynchronously.
*/
long webkit_notify_progress (long web_view, long pspec) {
- assert WEBKIT1 || WEBKIT2;
ProgressEvent event = new ProgressEvent (browser);
event.display = browser.getDisplay ();
event.widget = browser;
double progress = 0;
- if (WEBKIT2){
- progress = WebKitGTK.webkit_web_view_get_estimated_load_progress (webView);
- } else {
- progress = WebKitGTK.webkit_web_view_get_progress (webView);
- }
+ progress = WebKitGTK.webkit_web_view_get_estimated_load_progress (webView);
event.current = (int) (progress * MAX_PROGRESS);
event.total = MAX_PROGRESS;
Runnable fireProgressChangedEvents = () -> {
@@ -3537,10 +2475,7 @@ long webkit_notify_progress (long web_view, long pspec) {
progressListeners[i].changed (event);
}
};
- if (WEBKIT2)
- browser.getDisplay().asyncExec(fireProgressChangedEvents);
- else
- fireProgressChangedEvents.run();
+ browser.getDisplay().asyncExec(fireProgressChangedEvents);
return 0;
}
@@ -3552,7 +2487,6 @@ long webkit_notify_progress (long web_view, long pspec) {
* It doesn't look it would require a return value, so running in asyncExec should be fine.
*/
long webkit_notify_title (long web_view, long pspec) {
- assert WEBKIT1 || WEBKIT2;
long title = WebKitGTK.webkit_web_view_get_title (webView);
String titleString;
if (title == 0) {
@@ -3572,10 +2506,7 @@ long webkit_notify_title (long web_view, long pspec) {
titleListeners[i].changed (event);
}
};
- if (WEBKIT2)
- browser.getDisplay().asyncExec(fireTitleListener);
- else
- fireTitleListener.run();
+ browser.getDisplay().asyncExec(fireTitleListener);
return 0;
}
@@ -3602,44 +2533,6 @@ long webkit_context_menu (long web_view, long context_menu, long eventXXX, long
return 0;
}
-// Seems to be reached only by Webkit1 at the moment.
-long webkit_populate_popup (long web_view, long webkit_menu) {
- Point pt = browser.getDisplay ().getCursorLocation ();
- Event event = new Event ();
- event.x = pt.x;
- event.y = pt.y;
- browser.notifyListeners (SWT.MenuDetect, event);
- if (!event.doit) {
- /* clear the menu */
- long children = GTK.gtk_container_get_children (webkit_menu);
- long current = children;
- while (current != 0) {
- long item = OS.g_list_data (current);
- GTK.gtk_container_remove (webkit_menu, item);
- current = OS.g_list_next (current);
- }
- OS.g_list_free (children);
- return 0;
- }
- Menu menu = browser.getMenu ();
- if (menu != null && !menu.isDisposed ()) {
- if (pt.x != event.x || pt.y != event.y) {
- menu.setLocation (event.x, event.y);
- }
- menu.setVisible (true);
- /* clear the menu */
- long children = GTK.gtk_container_get_children (webkit_menu);
- long current = children;
- while (current != 0) {
- long item = OS.g_list_data (current);
- GTK.gtk_container_remove (webkit_menu, item);
- current = OS.g_list_next (current);
- }
- OS.g_list_free (children);
- }
- return 0;
-}
-
private void addRequestHeaders(long requestHeaders, String[] headers){
for (int i = 0; i < headers.length; i++) {
String current = headers[i];
@@ -3659,82 +2552,8 @@ private void addRequestHeaders(long requestHeaders, String[] headers){
}
-long webkit_resource_request_starting (long web_view, long web_frame, long web_resource, long request, long response) {
- assert WEBKIT1;
- if (postData != null || headers != null) {
- long message = WebKitGTK.webkit_network_request_get_message (request);
- if (message == 0) {
- headers = null;
- postData = null;
- } else {
- if (postData != null) {
- // Set the message method type to POST
- WebKitGTK.SoupMessage_method (message, PostString);
- long body = WebKitGTK.SoupMessage_request_body (message);
- byte[] bytes = Converter.wcsToMbcs (postData, false);
- long data = C.malloc (bytes.length);
- C.memmove (data, bytes, bytes.length);
- WebKitGTK.soup_message_body_append (body, WebKitGTK.SOUP_MEMORY_TAKE, data, bytes.length);
- WebKitGTK.soup_message_body_flatten (body);
-
- if (headers == null) headers = new String[0];
- boolean found = false;
- for (int i = 0; i < headers.length; i++) {
- int index = headers[i].indexOf (':');
- if (index != -1) {
- String name = headers[i].substring (0, index).trim ().toLowerCase ();
- if (name.equals (HEADER_CONTENTTYPE)) {
- found = true;
- break;
- }
- }
- }
- if (!found) {
- String[] temp = new String[headers.length + 1];
- System.arraycopy (headers, 0, temp, 0, headers.length);
- temp[headers.length] = HEADER_CONTENTTYPE + ':' + MIMETYPE_FORMURLENCODED;
- headers = temp;
- }
- postData = null;
- }
-
- /* headers */
- long requestHeaders = WebKitGTK.SoupMessage_request_headers (message);
- addRequestHeaders(requestHeaders, headers);
- headers = null;
- }
- }
-
- return 0;
-}
-
-/**
- * Webkit1 only.
- * Normally triggered by javascript that runs "window.status=txt".
- *
- * On webkit2 this signal doesn't exist anymore.
- * In general, window.status=text is not supported on most newer browsers anymore.
- * status bar now only changes when you hover you mouse over it.
- */
-long webkit_status_bar_text_changed (long web_view, long text) {
- int length = C.strlen (text);
- byte[] bytes = new byte[length];
- C.memmove (bytes, text, length);
- StatusTextEvent statusText = new StatusTextEvent (browser);
- statusText.display = browser.getDisplay ();
- statusText.widget = browser;
- statusText.text = new String (Converter.mbcsToWcs (bytes));
- for (int i = 0; i < statusTextListeners.length; i++) {
- statusTextListeners[i].changed (statusText);
- }
- return 0;
-}
-
/**
* Emitted after "create" on the newly created WebKitWebView when it should be displayed to the user.
- *
- * Webkit1 signal: web-view-ready
- * https://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView-web-view-ready
* Webkit2 signal: ready-to-show
* https://webkitgtk.org/reference/webkitgtk/unstable/webkitgtk-webkitwebview.html#WebKitWebView-web-view-ready
* Note in webkit2, no return value has to be provided in callback.
@@ -3744,45 +2563,27 @@ long webkit_web_view_ready (long web_view) {
newEvent.display = browser.getDisplay ();
newEvent.widget = browser;
- if (WEBKIT1) {
- long webKitWebWindowFeatures = WebKitGTK.webkit_web_view_get_window_features (webView);
- newEvent.addressBar = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.locationbar_visible) != 0;
- newEvent.menuBar = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.menubar_visible) != 0;
- newEvent.statusBar = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.statusbar_visible) != 0;
- newEvent.addressBar = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.toolbar_visible) != 0;
- int x = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.x);
- int y = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.y);
- int width = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.width);
- int height = webkit_settings_get(webKitWebWindowFeatures, WebKitGTK.height);
- if (x != -1 && y != -1)
- newEvent.location = new Point (x,y);
- if (width != -1 && height != -1)
- newEvent.size = new Point (width,height);
- } else {
- assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
- long properties = WebKitGTK.webkit_web_view_get_window_properties(webView);
- newEvent.addressBar = webkit_settings_get(properties, WebKitGTK.locationbar_visible) != 0;
- newEvent.menuBar = webkit_settings_get(properties, WebKitGTK.menubar_visible) != 0;
- newEvent.statusBar = webkit_settings_get(properties, WebKitGTK.statusbar_visible) != 0;
- newEvent.toolBar = webkit_settings_get(properties, WebKitGTK.toolbar_visible) != 0;
-
- GdkRectangle rect = new GdkRectangle();
- WebKitGTK.webkit_window_properties_get_geometry(properties, rect);
- newEvent.location = new Point(Math.max(0, rect.x),Math.max(0, rect.y));
-
- int width = rect.width;
- int height = rect.height;
- if (height == 100 && width == 100) {
- // On Webkit1, if no height/width is specified, reasonable defaults are given.
- // On Webkit2, if no height/width is specified, then minimum (which is 100) is allocated to popus.
- // This makes popups very small.
- // For better cross-platform consistency (Win/Cocoa/Gtk), we give more reasonable defaults (2/3 the size of a screen).
- Rectangle primaryMonitorBounds = browser.getDisplay ().getPrimaryMonitor().getBounds();
- height = (int) (primaryMonitorBounds.height * 0.66);
- width = (int) (primaryMonitorBounds.width * 0.66);
- }
- newEvent.size = new Point(width, height);
+ long properties = WebKitGTK.webkit_web_view_get_window_properties(webView);
+ newEvent.addressBar = webkit_settings_get(properties, WebKitGTK.locationbar_visible) != 0;
+ newEvent.menuBar = webkit_settings_get(properties, WebKitGTK.menubar_visible) != 0;
+ newEvent.statusBar = webkit_settings_get(properties, WebKitGTK.statusbar_visible) != 0;
+ newEvent.toolBar = webkit_settings_get(properties, WebKitGTK.toolbar_visible) != 0;
+
+ GdkRectangle rect = new GdkRectangle();
+ WebKitGTK.webkit_window_properties_get_geometry(properties, rect);
+ newEvent.location = new Point(Math.max(0, rect.x),Math.max(0, rect.y));
+
+ int width = rect.width;
+ int height = rect.height;
+ if (height == 100 && width == 100) {
+ // On Webkit2, if no height/width is specified, then minimum (which is 100) is allocated to popus.
+ // This makes popups very small.
+ // For better cross-platform consistency (Win/Cocoa/Gtk), we give more reasonable defaults (2/3 the size of a screen).
+ Rectangle primaryMonitorBounds = browser.getDisplay ().getPrimaryMonitor().getBounds();
+ height = (int) (primaryMonitorBounds.height * 0.66);
+ width = (int) (primaryMonitorBounds.width * 0.66);
}
+ newEvent.size = new Point(width, height);
Runnable fireVisibilityListeners = () -> {
if (browser.isDisposed()) return;
@@ -3790,151 +2591,40 @@ long webkit_web_view_ready (long web_view) {
visibilityWindowListeners[i].show (newEvent);
}
};
- if (WEBKIT2) {
- // Postpone execution of listener, to avoid deadlocks in case evaluate() is
- // called in the listener while another signal is being handled. See bug 512001.
- // evaluate() can safely be called in this listener with no adverse effects.
- browser.getDisplay().asyncExec(fireVisibilityListeners);
- } else {
- fireVisibilityListeners.run();
- }
+ // Postpone execution of listener, to avoid deadlocks in case evaluate() is
+ // called in the listener while another signal is being handled. See bug 512001.
+ // evaluate() can safely be called in this listener with no adverse effects.
+ browser.getDisplay().asyncExec(fireVisibilityListeners);
return 0;
}
/**
- * This method is only called by Webkit1.
- * The webkit2 equivalent is webkit_load_changed(..):caseWEBKIT2__LOAD_FINISHED
+ * @return An integer value for the property is returned. For boolean settings, 0 indicates false,
+ * 1 indicates true. -1= is error.
*/
-long webkit_window_object_cleared (long web_view, long frame, long context, long window_object) {
- assert WEBKIT1 : WebKitGTK.Webkit1AssertMsg;
- long globalObject = WebKitGTK.JSContextGetGlobalObject (context);
- long externalObject = WebKitGTK.JSObjectMake (context, ExternalClass, webViewData);
- byte[] bytes = (OBJECTNAME_EXTERNAL + '\0').getBytes (StandardCharsets.UTF_8);
- long name = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
- WebKitGTK.JSObjectSetProperty (context, globalObject, name, externalObject, 0, null);
- WebKitGTK.JSStringRelease (name);
-
- registerBrowserFunctions(); // Bug 508217
- long mainFrame = WebKitGTK.webkit_web_view_get_main_frame (webView);
- boolean top = mainFrame == frame;
- addEventHandlers (web_view, top);
- return 0;
-}
-
-/** Webkit1 & Webkit2
- * @return An integer value for the property is returned. For boolean settings, 0 indicates false, 1 indicates true. -1= is error.*/
private int webkit_settings_get(byte [] property) {
- if (WEBKIT2 && webView == 0) { // already disposed.
+ if (webView == 0) { // already disposed.
return -1; // error.
}
long settings = WebKitGTK.webkit_web_view_get_settings (webView);
return webkit_settings_get(settings, property);
}
-/** Webkit1 & Webkit2
- * @return An integer value for the property is returned. For boolean settings, 0 indicates false, 1 indicates true */
+/** @return An integer value for the property is returned. For boolean settings, 0 indicates false, 1 indicates true */
private int webkit_settings_get(long settings, byte[] property) {
int[] result = new int[1];
OS.g_object_get (settings, property, result, 0);
return result[0];
}
-/** Webkit1 & Webkit2 */
private void webkit_settings_set(byte [] property, int value) {
- if (WEBKIT2 && webView == 0) { // already disposed.
+ if (webView == 0) { // already disposed.
return;
}
long settings = WebKitGTK.webkit_web_view_get_settings (webView);
OS.g_object_set(settings, property, value, 0);
}
-private void registerBrowserFunctions() {
- for (BrowserFunction current : functions.values()) {
- nonBlockingExecute(current.functionString);
- }
-}
-
-/**
- * Webkit1 callback for javascript to call java.
- */
-long callJava (long ctx, long func, long thisObject, long argumentCount, long arguments, long exception) {
- Object returnValue = null;
- if (argumentCount == 3) {
- // Javastring array: <int: function index>, <string: token>, <array: javascript args>
- // 1st arg: Function index
- long [] result = new long [1];
- C.memmove (result, arguments, C.PTR_SIZEOF);
- int type = WebKitGTK.JSValueGetType (ctx, result[0]);
- if (type == WebKitGTK.kJSTypeNumber) {
- int index = ((Double)convertToJava (ctx, result[0])).intValue ();
- result[0] = 0;
- // 2nd arg: function token
- C.memmove (result, arguments + C.PTR_SIZEOF, C.PTR_SIZEOF);
- type = WebKitGTK.JSValueGetType (ctx, result[0]);
- if (type == WebKitGTK.kJSTypeString) {
- String token = (String)convertToJava (ctx, result[0]);
- BrowserFunction function = functions.get (index);
- if (function != null && token.equals (function.token)) {
- try {
- // 3rd Arg: paramaters given from Javascript
- C.memmove (result, arguments + 2 * C.PTR_SIZEOF, C.PTR_SIZEOF);
- Object temp = convertToJava (ctx, result[0]);
- if (temp instanceof Object[]) {
- Object[] args = (Object[])temp;
- try {
- returnValue = function.function (args);
- } catch (Exception e) {
- /* exception during function invocation */
- returnValue = WebBrowser.CreateErrorString (e.getLocalizedMessage ());
- }
- }
- } catch (IllegalArgumentException e) {
- /* invalid argument value type */
- if (function.isEvaluate) {
- /* notify the function so that a java exception can be thrown */
- function.function (new String[] {WebBrowser.CreateErrorString (new SWTException (SWT.ERROR_INVALID_RETURN_VALUE).getLocalizedMessage ())});
- }
- returnValue = WebBrowser.CreateErrorString (e.getLocalizedMessage ());
- }
- }
- }
- }
- }
- return convertToJS (ctx, returnValue);
-}
-
-long convertToJS (long ctx, Object value) {
- if (value == null) {
- return WebKitGTK.JSValueMakeUndefined (ctx);
- }
- if (value instanceof String) {
- byte[] bytes = ((String)value + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
- long stringRef = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
- long result = WebKitGTK.JSValueMakeString (ctx, stringRef);
- WebKitGTK.JSStringRelease (stringRef);
- return result;
- }
- if (value instanceof Boolean) {
- return WebKitGTK.JSValueMakeBoolean (ctx, ((Boolean)value).booleanValue () ? 1 : 0);
- }
- if (value instanceof Number) {
- return WebKitGTK.JSValueMakeNumber (ctx, ((Number)value).doubleValue ());
- }
- if (value instanceof Object[]) {
- Object[] arrayValue = (Object[]) value;
- int length = arrayValue.length;
- long [] arguments = new long [length];
- for (int i = 0; i < length; i++) {
- Object javaObject = arrayValue[i];
- long jsObject = convertToJS (ctx, javaObject);
- arguments[i] = jsObject;
- }
- return WebKitGTK.JSObjectMakeArray (ctx, length, arguments, null);
- }
- SWT.error (SWT.ERROR_INVALID_RETURN_VALUE);
- return 0;
-}
-
static Object convertToJava (long ctx, long value) {
int type = WebKitGTK.JSValueGetType (ctx, value);
switch (type) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebkitGDBus.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebkitGDBus.java
deleted file mode 100644
index 64aa8a5bcc..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebkitGDBus.java
+++ /dev/null
@@ -1,615 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 Red Hat and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.swt.browser;
-
-import java.util.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.gtk.*;
-
-/**
- * Logic for Webkit to interact with it's Webkit extension via GDBus.
- *
- * While this class supports quite a bit of GDBus and gvariant support, it is by no means a complete
- * implementation and it's tailored to support Java to Javascript conversion. (E.g all Numbers are converted to Double).
- * If this is ever to be used outside of Webkit, then care must be taken to deal with
- * cases that are not currently implemented/used. See: WebKitGTK.java 'TYPE NOTES'
- *
- * For hygiene purposes, GVariant types should not be leaving this class. Convert on the way in/out.
- *
- * @category gdbus
- */
-class WebkitGDBus {
- private static String DBUS_SERVICE_NAME;
- private static final String DBUS_OBJECT_PATH = "/org/eclipse/swt/gdbus";
- private static final String INTERFACE_NAME = "org.eclipse.swt.gdbusInterface";
- private static final String EXTENSION_INTERFACE_NAME = "org.eclipse.swt.webkitgtk_extension.gdbusInterface";
- private static String EXTENSION_DBUS_NAME;
- private static String EXTENSION_DBUS_PATH;
-
- /** Accepted methods over gdbus */
- private static final String webkit2callJava = WebKit.Webkit2Extension.getJavaScriptFunctionName();
- private static final String webkitWebExtensionIdentifier = WebKit.Webkit2Extension.getWebExtensionIdentifer();
-
- /** Proxy connection to the web extension.*/
- static long proxy;
- /** A field that is set to true if the proxy connection has been established, false otherwise */
- static boolean proxyToExtension;
- /** Set to true if there are <code>BrowserFunction</code> objects waiting to be registered with the web extension.*/
- static boolean functionsPending;
- /**
- * HashMap that stores any BrowserFunctions which have been created but not yet registered with the web extension.
- * These functions will be registered with the web extension as soon as the proxy to the extension is set up.
- *
- * The format of the HashMap is (page ID, list of function string and URL).
- */
- static HashMap<Long, ArrayList<ArrayList<String>>> pendingBrowserFunctions = new HashMap<>();
-
-
- /**
- * Interface is read/parsed at run time. No compilation with gdbus-code-gen necessary.
- *
- * Note,
- * - When calling a method via g_dbus_proxy_call_sync(..g_variant params..),
- * the g_variant that describes parameters should only mirror incoming parameters.
- * Each type is a separate argument.
- * e.g:
- * g_variant xml:
- * "(si)", "string", 42 .. arg type='s'
- * .. arg type='i'
- *
- * - Nested parameters need to have a 2nd bracket around them.
- * e.g:
- * g_variant xml:
- * "((r)i)", *gvariant, 42 .. arg type='r'
- * .. arg type='i'
- *
- * - '@' is a pointer to a gvariant. so '@r' is a pointer to nested type, i.e *gvariant
- *
- * To understand the mappings, it's good to understand DBus and GVariant's syntax:
- * https://dbus.freedesktop.org/doc/dbus-specification.html#idm423
- * https://developer.gnome.org/glib/stable/glib-GVariantType.html
- *
- * Be mindful about only using supported DBUS_TYPE_* , as convert* methods might fail otherwise.
- * Alternatively, modify convert* methods.
- */
- private static final String dbus_introspection_xml =
- "<node>"
- + " <interface name='" + INTERFACE_NAME + "'>"
- + " <method name='" + webkit2callJava + "'>"
- + " <arg type='"+ OS.DBUS_TYPE_STRING + "' name='webViewPtr' direction='in'/>"
- + " <arg type='"+ OS.DBUS_TYPE_DOUBLE + "' name='index' direction='in'/>"
- + " <arg type='"+ OS.DBUS_TYPE_STRING + "' name='token' direction='in'/>"
- + " <arg type='" + OS.DBUS_TYPE_SINGLE_COMPLETE + "' name='arguments' direction='in'/>"
- + " <arg type='" + OS.DBUS_TYPE_SINGLE_COMPLETE + "' name='result' direction='out'/>"
- + " </method>"
- + " <method name='" + webkitWebExtensionIdentifier + "'>"
- + " <arg type='"+ OS.DBUS_TYPE_STRING + "' name='webExtensionDbusName' direction='in'/>"
- + " <arg type='"+ OS.DBUS_TYPE_STRING + "' name='webExtensionDbusPath' direction='in'/>"
- + " <arg type='"+ OS.DBUS_TYPE_STRUCT_ARRAY_BROWSER_FUNCS + "' name='result' direction='out'/>"
- + " </method>"
- + " </interface>"
- + "</node>";
-
- /**
- * GDBus/DBus doesn't have a notion of Null.
- * To get around this, we use magic numbers to represent special cases.
- * Currently this is specific to Webkit to deal with Javascript data type conversions.
- * @category gdbus */
- private static final byte SWT_DBUS_MAGIC_NUMBER_EMPTY_ARRAY = 101;
- /** @category gdbus */
- private static final byte SWT_DBUS_MAGIC_NUMBER_NULL = 48;
-
-
- /** GDBusNodeInfo */
- private static Callback onBusAcquiredCallback;
- private static Callback onNameAcquiredCallback;
- private static Callback onNameLostCallback;
- private static Callback handleMethodCallback;
-
- /** Callback for asynchronous proxy calls to the extension */
- private static Callback callExtensionAsyncCallback;
-
- static {
- onBusAcquiredCallback = new Callback (WebkitGDBus.class, "onBusAcquiredCallback", 3); //$NON-NLS-1$
- if (onBusAcquiredCallback.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- onNameAcquiredCallback = new Callback (WebkitGDBus.class, "onNameAcquiredCallback", 3); //$NON-NLS-1$
- if (onNameAcquiredCallback.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- onNameLostCallback = new Callback (WebkitGDBus.class, "onNameLostCallback", 3); //$NON-NLS-1$
- if (onNameLostCallback.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- handleMethodCallback = new Callback (WebkitGDBus.class, "handleMethodCallback", 8); //$NON-NLS-1$
- if (handleMethodCallback.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- callExtensionAsyncCallback = new Callback (WebkitGDBus.class, "callExtensionAsyncCallback", 3); //$NON-NLS-1$
- if (callExtensionAsyncCallback.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- }
-
- static boolean initialized;
-
- /** This method is not intended to be referenced by clients. Internal class. */
- static void init(String uniqueId) {
- if (initialized)
- return;
- initialized = true;
- DBUS_SERVICE_NAME = "org.eclipse.swt" + uniqueId;
- int owner_id = OS.g_bus_own_name(OS.G_BUS_TYPE_SESSION,
- Converter.javaStringToCString(DBUS_SERVICE_NAME),
- OS.G_BUS_NAME_OWNER_FLAGS_REPLACE | OS.G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT,
- onBusAcquiredCallback.getAddress(),
- onNameAcquiredCallback.getAddress(), // name_acquired_handler
- onNameLostCallback.getAddress(), // name_lost_handler
- 0, // user_data
- 0); // user_data_free_func
-
- if (owner_id == 0) {
- System.err.println("SWT WebkitGDBus: Failed to aquire bus name: " + DBUS_SERVICE_NAME);
- }
- }
-
- @SuppressWarnings("unused")
- private static void teardown_gdbus() {
- // Currently GDBus is persistent across browser instances.
- // If ever needed, gdbus can be disposed via:
- // g_bus_unown_name (owner_id); // owner_id would need to be made global
- // g_dbus_node_info_unref (gdBusNodeInfo); // introspection_data Would need to be made global
- }
-
- /**
- * @param connection GDBusConnection *
- * @param name const gchar *
- * @param user_data gpointer
- * @return void.
- */
- @SuppressWarnings("unused") // Callback Only called directly by JNI.
- private static long onBusAcquiredCallback (long connection, long name, long user_data) {
- long gdBusNodeInfo;
-
- // Parse XML
- {
- long [] error = new long [1];
- gdBusNodeInfo = OS.g_dbus_node_info_new_for_xml(Converter.javaStringToCString(dbus_introspection_xml), error);
- if (gdBusNodeInfo == 0 || error[0] != 0) {
- System.err.println("SWT WebkitGDBus: Failed to get introspection data");
- }
- assert gdBusNodeInfo != 0 : "SWT WebkitGDBus: introspection data should not be 0";
- }
-
- // Register object
- {
- long [] error = new long [1];
- long interface_info = OS.g_dbus_node_info_lookup_interface(gdBusNodeInfo, Converter.javaStringToCString(INTERFACE_NAME));
- long vtable [] = { handleMethodCallback.getAddress(), 0, 0 };
- // SWT Dev Note: SWT Tool's "32/64 bit" checking mechanism sometimes get's confused by this method signature and shows an incorrect warning.
- // Other times it validates it fine. We ignore for now as 32bit will be dropped anyway.
- OS.g_dbus_connection_register_object(
- connection,
- Converter.javaStringToCString(DBUS_OBJECT_PATH),
- interface_info,
- vtable,
- 0, // user_data
- 0, // user_data_free_func
- error);
-
- if (error[0] != 0) {
- System.err.println("SWT WebkitGDBus: Failed to register object: " + DBUS_OBJECT_PATH);
- return 0;
- }
- }
-
- // Developer note:
- // To verify that a gdbus interface is regisetered on the gdbus, you can use the 'gdbus' utility.
- // e.g:
- // gdbus introspect --session --dest org.eclipse <Press TAB KEY> // it should expand to something like: (uniqueID might be appended at the end).
- // gdbus introspect --session --dest org.eclipse.swt // you can then get object info like:
- // gdbus introspect --session --dest org.eclipse.swt --object-path /org/eclipse/swt/gdbus
-
- return 0; // Actual callback is void.
- }
-
-
- @SuppressWarnings("unused") // Callback Only called directly by JNI.
- private static long onNameAcquiredCallback (long connection, long name, long user_data) {
- // Currently not used, but can be used if acquring the gdbus name should trigger something to load.
- return 0;
- }
-
-
- @SuppressWarnings("unused") // Callback Only called directly by JNI.
- private static long onNameLostCallback (long connection, long name, long user_data) {
- assert false : "This code should never have executed";
- System.err.println("SWT WebkitGDBus.java: Lost GDBus name. This should never occur");
- return 0;
- }
-
-
-
- /**
- * This is called when a client call one of the GDBus methods.
- *
- * Developer note:
- * This method can be reached directly from GDBus cmd utility:
- * gdbus call --session --dest org.eclipse.swt<UNIQUE_ID> --object-path /org/eclipse/swt/gdbus --method org.eclipse.swt.gdbusInterface.HelloWorld
- * where as you tab complete, you append the UNIQUE_ID.
- *
- * @param connection GDBusConnection
- * @param sender const gchar
- * @param object_path const gchar
- * @param interface_name const gchar
- * @param method_name const gchar
- * @param gvar_parameters GVariant
- * @param invocation GDBusMethodInvocation
- * @param user_data gpointer
- * @return
- */
- @SuppressWarnings("unused") // Callback only called directly by JNI.
- private static long handleMethodCallback (
- long connection, long sender,
- long object_path, long interface_name,
- long method_name, long gvar_parameters,
- long invocation, long user_data) {
-
- String java_method_name = Converter.cCharPtrToJavaString(method_name, false);
- Object result = null;
- if (java_method_name != null) {
- if (java_method_name.equals(webkit2callJava)) {
- try {
- Object [] java_parameters = (Object []) convertGVariantToJava(gvar_parameters);
- result = WebKit.Webkit2Extension.webkit2callJavaCallback(java_parameters);
- } catch (Exception e) {
- // gdbus should always return to prevent extension from hanging.
- result = (String) WebBrowser.CreateErrorString (e.getLocalizedMessage ());
- System.err.println("SWT Webkit: Exception occured in Webkit2 callback logic. Bug?");
- }
- } else if (java_method_name.equals(webkitWebExtensionIdentifier)) {
- Object [] nameArray = (Object []) convertGVariantToJava(gvar_parameters);
- if (nameArray [0] != null && nameArray[0] instanceof String) EXTENSION_DBUS_NAME = (String) nameArray[0];
- if (nameArray [1] != null && nameArray[1] instanceof String) EXTENSION_DBUS_PATH = (String) nameArray[1];
- proxyToExtension = proxyToExtensionInit();
- if (proxyToExtension) {
- invokeReturnValueExtensionIdentifier(pendingBrowserFunctions, invocation);
- } else {
- invokeReturnValueExtensionIdentifier(null, invocation);
- System.err.println("SWT webkit: proxy to web extension failed to load, BrowserFunction may not work.");
- }
- return 0;
- }
- } else {
- result = (String) "SWT webkit: GDBus called an unknown method?";
- System.err.println("SWT webkit: Received a call from an unknown method: " + java_method_name);
- }
- invokeReturnValue(result, invocation);
- return 0;
- }
-
- @SuppressWarnings("unused")
- private static long callExtensionAsyncCallback (long source_object, long res, long user_data) {
- long [] gerror = new long [1];
- long result = OS.g_dbus_proxy_call_finish (proxy, res, gerror);
- if (gerror[0] != 0){
- long errMsg = OS.g_error_get_message(gerror[0]);
- String msg = Converter.cCharPtrToJavaString(errMsg, false);
- System.err.println("SWT webkit: There was an error executing something asynchronously with the extension (Java callback).");
- System.err.println("SWT webkit: the error message provided is " + msg);
- OS.g_error_free(gerror[0]);
- }
- return 0;
- }
-
- /**
- * Returns a GVariant to the DBus invocation of the extension identifier method. When the extension
- * is initialized it sends a DBus message to the SWT webkit instance. As a return value, the SWT webkit
- * instance sends any BrowserFunctions that have been registered. If no functions have been registered,
- * an "empty" function with a page ID of -1 is sent.
- *
- * @param map the HashMap of BrowserFunctions waiting to be registered in the extension, or null
- * if you'd like to explicitly send an empty function signature
- * @param invocation the GDBus invocation to return the value on
- */
- private static void invokeReturnValueExtensionIdentifier (HashMap<Long, ArrayList<ArrayList<String>>> map,
- long invocation) {
- long resultGVariant;
- long builder;
- long type = OS.g_variant_type_new(OS.G_VARIANT_TYPE_ARRAY_BROWSER_FUNCS);
- builder = OS.g_variant_builder_new(type);
- if (builder == 0) return;
- Object [] tupleArray = new Object[3];
- boolean sendEmptyFunction;
- if (map == null) {
- sendEmptyFunction = true;
- } else {
- sendEmptyFunction = map.isEmpty() && !functionsPending;
- }
- /*
- * No functions to register, send a page ID of -1 and empty strings.
- */
- if (sendEmptyFunction) {
- tupleArray[0] = (long)-1;
- tupleArray[1] = "";
- tupleArray[2] = "";
- long tupleGVariant = convertJavaToGVariant(tupleArray);
- if (tupleGVariant != 0) {
- OS.g_variant_builder_add_value(builder, tupleGVariant);
- } else {
- System.err.println("SWT webkit: error creating empty BrowserFunction GVariant tuple, skipping.");
- }
- } else {
- for (long id : map.keySet()) {
- ArrayList<ArrayList<String>> list = map.get(id);
- if (list != null) {
- for (ArrayList<String> stringList : list) {
- Object [] stringArray = stringList.toArray();
- if (stringArray.length > 2) {
- System.err.println("SWT webkit: String array with BrowserFunction and URL should never have"
- + "more than 2 Strings");
- }
- tupleArray[0] = id;
- System.arraycopy(stringArray, 0, tupleArray, 1, 2);
- long tupleGVariant = convertJavaToGVariant(tupleArray);
- if (tupleGVariant != 0) {
- OS.g_variant_builder_add_value(builder, tupleGVariant);
- } else {
- System.err.println("SWT webkit: error creating BrowserFunction GVariant tuple, skipping.");
- }
- }
- }
- }
- }
- resultGVariant = OS.g_variant_builder_end(builder);
- String typeString = Converter.cCharPtrToJavaString(OS.g_variant_get_type_string(resultGVariant), false);
- if (!OS.DBUS_TYPE_STRUCT_ARRAY_BROWSER_FUNCS.equals(typeString)) {
- System.err.println("An error packaging the GVariant occurred: type mismatch.");
- }
- long [] variants = {resultGVariant};
- long finalGVariant = OS.g_variant_new_tuple(variants, 1);
- OS.g_dbus_method_invocation_return_value(invocation, finalGVariant);
- OS.g_variant_builder_unref(builder);
- OS.g_variant_type_free(type);
- return;
- }
-
- private static void invokeReturnValue (Object result, long invocation) {
- long resultGVariant = 0;
- try {
- resultGVariant = convertJavaToGVariant(new Object [] {result}); // Result has to be a tuple.
- } catch (SWTException e) {
- // gdbus should always return to prevent extension from hanging.
- String errMsg = (String) WebBrowser.CreateErrorString (e.getLocalizedMessage ());
- resultGVariant = convertJavaToGVariant(new Object [] {errMsg});
- }
- OS.g_dbus_method_invocation_return_value(invocation, resultGVariant);
- return; // void return value.
- }
-
- /**
- * Initializes the proxy connection to the web extension.
- *
- * @return true if establishing the proxy connections succeeded,
- * false otherwise
- */
- private static boolean proxyToExtensionInit() {
- if (proxy != 0) {
- return true;
- } else {
- if (EXTENSION_DBUS_NAME != null && EXTENSION_DBUS_PATH != null) {
- long [] error = new long [1];
- byte [] name = Converter.javaStringToCString(EXTENSION_DBUS_NAME);
- byte [] path = Converter.javaStringToCString(EXTENSION_DBUS_PATH);
- byte [] interfaceName = Converter.javaStringToCString(EXTENSION_INTERFACE_NAME);
- proxy = OS.g_dbus_proxy_new_for_bus_sync(OS.G_BUS_TYPE_SESSION, OS.G_DBUS_PROXY_FLAGS_NONE, 0, name, path, interfaceName, 0, error);
- if (error[0] != 0) {
- long errMsg = OS.g_error_get_message(error[0]);
- String msg = Converter.cCharPtrToJavaString(errMsg, false);
- OS.g_error_free(error[0]);
- System.err.println("SWT webkit: there was an error establishing the proxy connection to the extension. " +
- " The error is " + msg);
- return false;
- } else {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Calls the web extension synchronously. Returns true if the operation succeeded, and false
- * otherwise (or if the operation times out).
- *
- * @param params a pointer to the GVariant containing the parameters
- * @param methodName a String representing the DBus method name in the extension
- * @return an Object representing the return value from DBus in boolean form
- */
- static Object callExtensionSync (long params, String methodName) {
- long [] gerror = new long [1]; // GError **
- long gVariant = OS.g_dbus_proxy_call_sync(proxy, Converter.javaStringToCString(methodName),
- params, OS.G_DBUS_CALL_FLAGS_NO_AUTO_START, 1000, 0, gerror);
- if (gerror[0] != 0) {
- long errMsg = OS.g_error_get_message(gerror[0]);
- String msg = Converter.cCharPtrToJavaString(errMsg, false);
- /*
- * Don't print console warnings for timeout errors, as we can handle these ourselves.
- * Note, most timeout errors happen only when running test cases, not during "normal" use.
- */
- if (msg != null && (!msg.contains("Timeout") && !msg.contains("timeout"))) {
- System.err.println("SWT webkit: There was an error executing something synchronously with the extension.");
- System.err.println("SWT webkit: The error message is: " + msg);
- return (Object) false;
- }
- OS.g_error_free(gerror[0]);
- return (Object) "timeout";
- }
- Object resultObject = gVariant != 0 ? convertGVariantToJava(gVariant) : (Object) false;
- // Sometimes we get back tuples from GDBus, which get converted into Object arrays. In this case
- // we only care about the first value, since the extension never returns anything more than that.
- if (resultObject instanceof Object[]) {
- return ((Object []) resultObject)[0];
- }
- return resultObject;
- }
-
- /**
- * Calls the web extension asynchronously. Note, this method returning true does not
- * guarantee the operation's success, it only means no errors occurred.
- *
- * @param params a pointer to the GVariant containing the parameters
- * @param methodName a String representing the DBus method name in the extension
- * @return true if the extension was called without errors, false otherwise
- */
- static boolean callExtensionAsync (long params, String methodName) {
- long [] gerror = new long [1]; // GError **
- OS.g_dbus_proxy_call(proxy, Converter.javaStringToCString(methodName),
- params, OS.G_DBUS_CALL_FLAGS_NO_AUTO_START, 1000, 0, callExtensionAsyncCallback.getAddress(), gerror);
- if (gerror[0] != 0) {
- long errMsg = OS.g_error_get_message(gerror[0]);
- String msg = Converter.cCharPtrToJavaString(errMsg, false);
- System.err.println("SWT webkit: There was an error executing something asynchronously with the extension.");
- System.err.println("SWT webkit: The error message is: " + msg);
- OS.g_error_free(gerror[0]);
- return false;
- }
- return true;
- }
-
- /* TYPE NOTES
- *
- * GDBus doesn't support all the types that we need. I used encoded 'byte' to translate some types.
- *
- * - 'null' is not supported. I thought to potentially use 'maybe' types, but they imply a possible NULL of a certain type, but not null itself.
- * so I use 'byte=48' (meaning '0' in ASCII) to denote null.
- *
- * - Empty arrays/structs are not supported by gdbus.
- * "Container types ... Empty structures are not allowed; there must be at least one type code between the parentheses"
- * src: https://dbus.freedesktop.org/doc/dbus-specification.html
- * I used byte=101 (meaning 'e' in ASCII) to denote empty array.
- *
- * In Javascript all Number types seem to be 'double', (int/float/double/short -> Double). So we convert everything into double accordingly.
- *
- * DBus Type info: https://dbus.freedesktop.org/doc/dbus-specification.html#idm423
- * GDBus Type info: https://developer.gnome.org/glib/stable/glib-GVariantType.html
- */
-
- /**
- * Converts the given GVariant to a Java object.
- * (Only subset of types is currently supported).
- *
- * We assume that the given gvariant does not contain errors. (checked by webextension first).
- *
- * @param gVariant a pointer to the native GVariant
- */
- private static Object convertGVariantToJava(long gVariant){
-
- if (OS.g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_BOOLEAN)){
- return OS.g_variant_get_boolean(gVariant);
- }
-
- // see: WebKitGTK.java 'TYPE NOTES'
- if (OS.g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_BYTE)) {
- byte byteVal = OS.g_variant_get_byte(gVariant);
-
- switch (byteVal) {
- case WebkitGDBus.SWT_DBUS_MAGIC_NUMBER_NULL:
- return null;
- case WebkitGDBus.SWT_DBUS_MAGIC_NUMBER_EMPTY_ARRAY:
- return new Object [0];
- default:
- System.err.println("SWT Error, received unsupported byte type via gdbus: " + byteVal);
- break;
- }
- }
-
- if (OS.g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_DOUBLE)){
- return OS.g_variant_get_double(gVariant);
- }
-
- if (OS.g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_UINT64)){
- return OS.g_variant_get_uint64(gVariant);
- }
-
- if (OS.g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_STRING)){
- return Converter.cCharPtrToJavaString(OS.g_variant_get_string(gVariant, null), false);
- }
-
- if (OS.g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_TUPLE)){
- int length = (int)OS.g_variant_n_children (gVariant);
- Object[] result = new Object[length];
- for (int i = 0; i < length; i++) {
- result[i] = convertGVariantToJava (OS.g_variant_get_child_value(gVariant, i));
- }
- return result;
- }
-
- String typeString = Converter.cCharPtrToJavaString(OS.g_variant_get_type_string(gVariant), false);
- SWT.error (SWT.ERROR_INVALID_ARGUMENT, new Throwable("Unhandled variant type " + typeString ));
- return null;
- }
-
- /**
- * Converts the given Java Object to a GVariant * representation.
- * (Only subset of types is currently supported).
- *
- * We assume that input Object may contain invalid types.
- *
- * @return pointer GVariant *
- */
- private static long convertJavaToGVariant(Object javaObject) throws SWTException {
-
- if (javaObject == null) {
- return OS.g_variant_new_byte(WebkitGDBus.SWT_DBUS_MAGIC_NUMBER_NULL); // see: WebKitGTK.java 'TYPE NOTES'
- }
-
- if (javaObject instanceof Long) {
- return OS.g_variant_new_uint64((Long) javaObject);
- }
-
- if (javaObject instanceof String) {
- return OS.g_variant_new_string (Converter.javaStringToCString((String) javaObject));
- }
-
- if (javaObject instanceof Boolean) {
- return OS.g_variant_new_boolean((Boolean) javaObject);
- }
-
- // We treat Integer, Long, Double, Short as a 'double' because in Javascript these are all 'double'.
- // Note, they all extend 'Number' java type, so they are an instance of it.
- if (javaObject instanceof Number) { // see: WebKitGTK.java 'TYPE NOTES'
- return OS.g_variant_new_double (((Number) javaObject).doubleValue());
- }
-
- if (javaObject instanceof Object[]) {
- Object[] arrayValue = (Object[]) javaObject;
- int length = arrayValue.length;
-
- if (length == 0) {
- return OS.g_variant_new_byte(WebkitGDBus.SWT_DBUS_MAGIC_NUMBER_EMPTY_ARRAY); // see: WebKitGTK.java 'TYPE NOTES'
- }
-
- long variants[] = new long [length];
-
- for (int i = 0; i < length; i++) {
- variants[i] = convertJavaToGVariant(arrayValue[i]);
- }
-
- return OS.g_variant_new_tuple(variants, length);
- }
- System.err.println("SWT Webkit: Invalid object being returned to javascript: " + javaObject.toString() + "\n"
- + "Only the following are supported: null, String, Boolean, Number(Long,Integer,Double...), Object[] of basic types");
- throw new SWTException(SWT.ERROR_INVALID_ARGUMENT, "Given object is not valid: " + javaObject.toString());
- }
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java
deleted file mode 100644
index a138b8eb5b..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-public class JSClassDefinition {
- public int version;
- public int attributes;
- /** @field cast=(const char*) */
- public long className;
- /** @field cast=(void*) */
- public long parentClass;
- /** @field cast=(const void*) */
- public long staticValues;
- /** @field cast=(const void*) */
- public long staticFunctions;
- /** @field cast=(void*) */
- public long initialize;
- /** @field cast=(void*) */
- public long finalize;
- /** @field cast=(void*) */
- public long hasProperty;
- /** @field cast=(void*) */
- public long getProperty;
- /** @field cast=(void*) */
- public long setProperty;
- /** @field cast=(void*) */
- public long deleteProperty;
- /** @field cast=(void*) */
- public long getPropertyNames;
- /** @field cast=(void*) */
- public long callAsFunction;
- /** @field cast=(void*) */
- public long callAsConstructor;
- /** @field cast=(void*) */
- public long hasInstance;
- /** @field cast=(void*) */
- public long convertToType;
-
- public static final int sizeof = WebKitGTK.JSClassDefinition_sizeof();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
index ba0247e395..a49a689a05 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -21,16 +21,14 @@ import org.eclipse.swt.internal.gtk.*;
public class WebKitGTK extends C {
public static boolean LibraryLoaded;
- public static boolean WEBKIT1, WEBKIT2;
- public static final String Webkit1AssertMsg = "Webkit2 code reached by webkit1"; // $NON-NLS-1$
- public static final String Webkit2AssertMsg = "Webkit1 code reached by webkit2"; // $NON-NLS-1$
/**
* Internal version of "Webkit glue code", used mainly during webkit2 port.
* Used to make it easier to support users on bugzilla. Updated by hand.
*/
- public static final String swtWebkitGlueCodeVersion = " SWT Glue code version: 54.0";
- public static final String swtWebkitGlueCodeVersionInfo = " info: +BrowserFunction/GDBus, +WebkitExtension Folder versioning, +WebKitExtension OSGI support, +setUrl(..postData..), -setCookie(), -getCookie +mouseDown/Focus";
+ public static final String swtWebkitGlueCodeVersion = " SWT Glue code version: 56.0";
+ public static final String swtWebkitGlueCodeVersionInfo = " info: +BrowserFunction with private GDBus, +WebKitExtension Folder versioning,"
+ + " +WebKitExtension OSGI support, +setUrl(..postData..), setCookie(), getCookie +mouseDown/Focus +WebKit2 only";
/**
@@ -45,27 +43,12 @@ public class WebKitGTK extends C {
} catch (Throwable e) {
}
- if (LibraryLoaded) {
- String webkit2 = System.getenv("SWT_WEBKIT2"); // $NON-NLS-1$
- int webkit2VersionFunction = webkit_get_major_version();
- if (webkit2VersionFunction != 0) { // SWT_WEBKIT2 env variable is not set but webkit2 was loaded as fallback
- webkit2 = "1";
- }
- WEBKIT2 = webkit2 != null && webkit2.equals("1"); // $NON-NLS-1$
- WEBKIT1 = !WEBKIT2;
- }
-
String swt_lib_versions = OS.getEnvironmentalVariable (OS.SWT_LIB_VERSIONS); // Note, this is read in multiple places.
if (swt_lib_versions != null && swt_lib_versions.equals("1")) {
- if (WEBKIT1) {
- System.out.println("SWT_LIB Webkit1 Webkitgtk:"+ webkit_major_version() +"."+ webkit_minor_version() + "." + webkit_micro_version() + " (webkitgtk < 2.5 is Webkit1)");
- }
- if (WEBKIT2) {
- System.out.println("SWT_LIB Webkit2 Webkitgtk:"+ webkit_get_major_version()+"."+ webkit_get_minor_version() + "."
- + webkit_get_micro_version() + " (webkitgtk >=2.5 is Webkit2) " + swtWebkitGlueCodeVersion + swtWebkitGlueCodeVersionInfo);
- }
+ System.out.println("SWT_LIB WebKit2 WebKitGTK:"+ webkit_get_major_version()+"."+ webkit_get_minor_version() + "."
+ + webkit_get_micro_version() + " (WebKitGTK >=2.5 is WebKit2) " + swtWebkitGlueCodeVersion + swtWebkitGlueCodeVersionInfo);
}
- };
+ }
/** Constants */
public static final int kJSTypeUndefined = 0;
@@ -74,12 +57,9 @@ public class WebKitGTK extends C {
public static final int kJSTypeNumber = 3;
public static final int kJSTypeString = 4;
public static final int kJSTypeObject = 5;
- public static final int SOUP_MEMORY_TAKE = 1;
public static final int WEBKIT_DOWNLOAD_STATUS_ERROR = -1;
public static final int WEBKIT_DOWNLOAD_STATUS_CANCELLED = 2;
public static final int WEBKIT_DOWNLOAD_STATUS_FINISHED = 3;
- public static final int WEBKIT_LOAD_COMMITTED = 1;
- public static final int WEBKIT_LOAD_FINISHED = 2;
public static final int WEBKIT2_LOAD_STARTED = 0;
public static final int WEBKIT2_LOAD_REDIRECTED = 1;
@@ -105,130 +85,81 @@ public class WebKitGTK extends C {
public static final int G_TLS_CERTIFICATE_GENERIC_ERROR = 6;
public static final int G_TLS_CERTIFICATE_VALIDATE_ALL = 7;
- public static final int WEBKIT_WEBSITE_DATA_COOKIES = 1 << 8; // Webkit2
+ public static final int WEBKIT_WEBSITE_DATA_COOKIES = 1 << 8;
+ public static final int WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START = 0;
+ public static final int WEBKIT_USER_CONTENT_INJECT_TOP_FRAME = 1;
/** Signals */
// Authentication.
- public static final byte[] authenticate = ascii ("authenticate"); // $NON-NLS-1$ // Webkit1 & Webkit2
+ public static final byte[] authenticate = ascii ("authenticate"); // $NON-NLS-1$
// TLS load failure signal
- // Webkit2 only
public static final byte[] load_failed_with_tls_errors = ascii ("load-failed-with-tls-errors"); // $NON-NLS-1$
// Close webview
- public static final byte[] close_web_view = ascii ("close-web-view"); // $NON-NLS-1$ // Webkit1
- public static final byte[] close = ascii ("close"); // $NON-NLS-1$ // Webkit2
-
- // Supress javascript execution warnings from bleeding into SWT's console.
- public static final byte[] console_message = ascii ("console-message"); // $NON-NLS-1$ // Webkit1. (On W2 see 'console-message-sent'). Not printed to stderr by the looks.
+ public static final byte[] close = ascii ("close"); // $NON-NLS-1$
// Context menu signals.
- public static final byte[] populate_popup = ascii ("populate-popup"); // $NON-NLS-1$ // Webkit1, deprecated in 1.10.
- public static final byte[] context_menu = ascii ("context-menu"); // $NON-NLS-1$ // Webkit2.
+ public static final byte[] context_menu = ascii ("context-menu"); // $NON-NLS-1$
// Create webView
- public static final byte[] create_web_view = ascii ("create-web-view"); // $NON-NLS-1$ // Webkit1
- public static final byte[] create = ascii ("create"); // $NON-NLS-1$ // Webkit2
+ public static final byte[] create = ascii ("create"); // $NON-NLS-1$
// Policy decision signals.
- public static final byte[] mime_type_policy_decision_requested = ascii ("mime-type-policy-decision-requested"); // $NON-NLS-1$ // Webkit1
- public static final byte[] navigation_policy_decision_requested = ascii ("navigation-policy-decision-requested"); // $NON-NLS-1$ // Webkit1
- public static final byte[] decide_policy = ascii ("decide-policy"); // $NON-NLS-1$ // Webkit2
- public static final byte[] decide_destination = ascii ("decide-destination"); // $NON-NLS-1$ // Webkit2
+ public static final byte[] decide_policy = ascii ("decide-policy"); // $NON-NLS-1$
+ public static final byte[] decide_destination = ascii ("decide-destination"); // $NON-NLS-1$
// Download signal
- public static final byte[] download_requested = ascii ("download-requested"); // $NON-NLS-1$ // Webkit1
- public static final byte[] download_started = ascii ("download-started"); // $NON-NLS-1$ // Webkit2 (has 3 signals for downloading)
- public static final byte[] failed = ascii ("failed"); // $NON-NLS-1$ // Webkit2
- public static final byte[] finished = ascii ("finished"); // $NON-NLS-1$ // Webkit2
-
- // Webkit2 extension
- public static final byte[] initialize_web_extensions = ascii ("initialize-web-extensions"); // Webkit2. Extension exists only on w2. Since 2.4
+ public static final byte[] download_started = ascii ("download-started"); // $NON-NLS-1$
+ public static final byte[] failed = ascii ("failed"); // $NON-NLS-1$
+ public static final byte[] finished = ascii ("finished"); // $NON-NLS-1$
// Status text signals
- public static final byte[] hovering_over_link = ascii ("hovering-over-link"); // $NON-NLS-1$ // Webkit1 -> StatusTextListener.changed()
- public static final byte[] mouse_target_changed = ascii ("mouse-target-changed"); // $NON-NLS-1$ // Webkit2 -> StatusTextListener.changed()
- /* Webkit1 only.
- * On webkit2 & newer browsers 'window.status=txt' has no effect anymore.
- * Status bar only updated when you hover mouse over hyperlink. See signals above.*/
- public static final byte[] status_bar_text_changed = ascii ("status-bar-text-changed"); // $NON-NLS-1$ // Webkit1. Doesn't exist on W2 due to security risk.
+ public static final byte[] mouse_target_changed = ascii ("mouse-target-changed"); // $NON-NLS-1$
// Load changed/page reload.
- public static final byte[] window_object_cleared = ascii ("window-object-cleared"); // $NON-NLS-1$ // Webkit1. On W2 this is found in the webextension. On w2, 'load-changed' is used.
- public static final byte[] load_changed = ascii ("load-changed"); // $NON-NLS-1$ // Webkit2 only, to implement equivalent of webkit1 window_object_cleared
+ public static final byte[] load_changed = ascii ("load-changed"); // $NON-NLS-1$
// Load progress/estimation/notification mechanism.
- public static final byte[] notify_load_status = ascii ("notify::load-status"); // $NON-NLS-1$ // Webkit1
- public static final byte[] notify_progress = ascii ("notify::progress"); // $NON-NLS-1$ // ->Webkit1 Progress.changed()
- public static final byte[] notify_estimated_load_progress = ascii ("notify::estimated-load-progress"); // $NON-NLS-1$ // ->Webkit2 Progress.changed()
+ public static final byte[] notify_estimated_load_progress = ascii ("notify::estimated-load-progress"); // $NON-NLS-1$
// Notify that the webpage title has changed.
- public static final byte[] notify_title = ascii ("notify::title"); // $NON-NLS-1$ // Webkit1, Webkit2.
-
- // Intercept a page load request to inject postData and custom headers.
- public static final byte[] resource_request_starting = ascii ("resource-request-starting"); // $NON-NLS-1$ // Webkit1.
- public static final byte[] resource_load_started = ascii ("resource-load-started"); // $NON-NLS-1$ // Webkit1. (unused, left over?)
- // api for this doesn't exist in Webkitgtk (2.18). Bug 527738.
-
+ public static final byte[] notify_title = ascii ("notify::title"); // $NON-NLS-1$
// Signal to indicate when the view should be shown to user. I.e, page load is complete.
- public static final byte[] web_view_ready = ascii ("web-view-ready"); // $NON-NLS-1$ // Webkit1
- public static final byte[] ready_to_show = ascii ("ready-to-show"); // $NON-NLS-1$ // Webkit2
-
-
+ public static final byte[] ready_to_show = ascii ("ready-to-show"); // $NON-NLS-1$
/** Properties: */
- // Webkit1: https://webkitgtk.org/reference/webkitgtk/unstable/WebKitWebSettings.html#WebKitWebSettings.properties
// Webkit2: https://webkitgtk.org/reference/webkit2gtk/unstable/WebKitSettings.html#WebKitSettings.properties
//
// Developer Note:
- // - Webkit1 documentation suggested to use g_object_(set|get) to modify properties.
// - Webkit2 documentation doesn't explicitly say if g_object_(set|get) is safe to use, but
// I've confirmed with webkitgtk+ developers on IRC (freenode#webkitgtk+ <mcatanzaro>) that it is in fact still
// safe to use g_object_(set|get) for updating properties.
// Note:
- // - Some settings in Webkit2 have changed. It's not safe to use webkit1 settings on webkit2.
// - On webkit2 you can also use the newly introduced functions for getting/setting settings as well as g_object_set().
- public static final byte[] default_encoding = ascii ("default-encoding"); // $NON-NLS-1$ // Webkit1 only
- public static final byte[] default_charset = ascii ("default-charset"); // $NON-NLS-1$ // Webkit2 only
-
- public static final byte[] enable_scripts = ascii ("enable-scripts"); // $NON-NLS-1$ // Webkit1 only.
- public static final byte[] enable_javascript = ascii ("enable-javascript"); // $NON-NLS-1$ // Webkit2 only
-
- public static final byte[] enable_webgl = ascii("enable-webgl"); // $NON-NLS-1$ // Webkit1 & Webkit2
-
- public static final byte[] enable_universal_access_from_file_uris = ascii ("enable-universal-access-from-file-uris"); // $NON-NLS-1$ // Webkit1
- public static final byte[] allow_universal_access_from_file_urls = ascii ("allow-universal-access-from-file-urls"); // $NON-NLS-1$ // Webkit2 Since 2.14
+ public static final byte[] default_charset = ascii ("default-charset"); // $NON-NLS-1$
- public static final byte[] user_agent = ascii ("user-agent"); // $NON-NLS-1$ // Webkit1 & Webkit2
+ public static final byte[] enable_javascript = ascii ("enable-javascript"); // $NON-NLS-1$
+ public static final byte[] enable_developer_extras = ascii ("enable-developer-extras");
- public static final byte[] javascript_can_open_windows_automatically = ascii ("javascript-can-open-windows-automatically"); // $NON-NLS-1$ // Webkit1 & Webit2
+ public static final byte[] enable_webgl = ascii("enable-webgl"); // $NON-NLS-1$
- public static final byte[] locationbar_visible = ascii ("locationbar-visible"); // $NON-NLS-1$ // Webkit1 (Settings) & Webkit2 (Properties)
- public static final byte[] menubar_visible = ascii ("menubar-visible"); // $NON-NLS-1$ // Webkit1 (Settings) & Webkit2 (Properties)
- public static final byte[] statusbar_visible = ascii ("statusbar-visible"); // $NON-NLS-1$ // Webkit1 (Settings) & Webkit2 (Properties)
- public static final byte[] toolbar_visible = ascii ("toolbar-visible"); // $NON-NLS-1$ // Webkit1 (Settings) & Webkit2 (Properties)
+ public static final byte[] enable_back_forward_navigation_gestures = ascii("enable-back-forward-navigation-gestures"); // $NON-NLS-1$
- // Webki1 only (Settings). (In Webkit2 height/width/x/y are stored in "geometry" of 'Properties')
- public static final byte[] height = ascii ("height"); // $NON-NLS-1$ // Webkit1 only
- public static final byte[] width = ascii ("width"); // $NON-NLS-1$ // Wekbit1 only
- public static final byte[] x = ascii ("x"); // $NON-NLS-1$ // Webkit1 only
- public static final byte[] y = ascii ("y"); // $NON-NLS-1$ // Webkit1 only
+ // Since 2.14
+ public static final byte[] allow_universal_access_from_file_urls = ascii ("allow-universal-access-from-file-urls"); // $NON-NLS-1$
- public static final byte[] SOUP_SESSION_PROXY_URI = ascii ("proxy-uri"); // $NON-NLS-1$ // libsoup
+ public static final byte[] user_agent = ascii ("user-agent"); // $NON-NLS-1$
- /** DOM events */
- public static final byte[] dragstart = ascii ("dragstart"); // $NON-NLS-1$ // Webkit1
- public static final byte[] keydown = ascii ("keydown"); // $NON-NLS-1$ // Webkit1
- public static final byte[] keypress = ascii ("keypress"); // $NON-NLS-1$ // Webkit1
- public static final byte[] keyup = ascii ("keyup"); // $NON-NLS-1$ // Webkit1
- public static final byte[] mousedown = ascii ("mousedown"); // $NON-NLS-1$ // Webkit1
- public static final byte[] mousemove = ascii ("mousemove"); // $NON-NLS-1$ // Webkit1
- public static final byte[] mouseup = ascii ("mouseup"); // $NON-NLS-1$ // Webkit1
- public static final byte[] mousewheel = ascii ("mousewheel"); // $NON-NLS-1$ // Webkit1
+ public static final byte[] javascript_can_open_windows_automatically = ascii ("javascript-can-open-windows-automatically");
+ public static final byte[] locationbar_visible = ascii ("locationbar-visible"); // $NON-NLS-1$
+ public static final byte[] menubar_visible = ascii ("menubar-visible"); // $NON-NLS-1$
+ public static final byte[] statusbar_visible = ascii ("statusbar-visible"); // $NON-NLS-1$
+ public static final byte[] toolbar_visible = ascii ("toolbar-visible"); // $NON-NLS-1$
protected static byte [] ascii (String name) {
int length = name.length ();
@@ -241,1985 +172,362 @@ public class WebKitGTK extends C {
return buffer;
}
-
-/** @method flags=dynamic */
-public static final native long _JSClassCreate (long definition);
-public static final long JSClassCreate (long definition) {
- lock.lock();
- try {
- return _JSClassCreate (definition);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSContextGetGlobalObject (long ctx);
-public static final long JSContextGetGlobalObject (long ctx) {
- lock.lock();
- try {
- return _JSContextGetGlobalObject (ctx);
- } finally {
- lock.unlock();
- }
-}
-
/** @method flags=dynamic */
-public static final native long _JSEvaluateScript (long ctx, long script, long thisObject, long sourceURL, int startingLineNumber, long [] exception);
-public static final long JSEvaluateScript (long ctx, long script, long thisObject, long sourceURL, int startingLineNumber, long [] exception) {
- lock.lock();
- try {
- return _JSEvaluateScript (ctx, script, thisObject, sourceURL, startingLineNumber, exception);
- } finally {
- lock.unlock();
- }
-}
+public static final native long JSObjectGetProperty(long ctx, long object, long propertyName, long [] exception);
/** @method flags=dynamic */
-public static final native long _JSObjectGetPrivate (long object);
-public static final long JSObjectGetPrivate (long object) {
- lock.lock();
- try {
- return _JSObjectGetPrivate (object);
- } finally {
- lock.unlock();
- }
-}
+public static final native long JSObjectGetPropertyAtIndex(long ctx, long object, int propertyIndex, long [] exception);
/** @method flags=dynamic */
-public static final native long _JSObjectGetProperty (long ctx, long object, long propertyName, long [] exception);
-public static final long JSObjectGetProperty (long ctx, long object, long propertyName, long [] exception) {
- lock.lock();
- try {
- return _JSObjectGetProperty (ctx, object, propertyName, exception);
- } finally {
- lock.unlock();
- }
-}
+public static final native long JSStringCreateWithUTF8CString(byte[] string);
/** @method flags=dynamic */
-public static final native long _JSObjectGetPropertyAtIndex (long ctx, long object, int propertyIndex, long [] exception);
-public static final long JSObjectGetPropertyAtIndex (long ctx, long object, int propertyIndex, long [] exception) {
- lock.lock();
- try {
- return _JSObjectGetPropertyAtIndex (ctx, object, propertyIndex, exception);
- } finally {
- lock.unlock();
- }
-}
+public static final native long JSStringGetMaximumUTF8CStringSize(long string);
/** @method flags=dynamic */
-public static final native long _JSObjectMake (long ctx, long jsClass, long data);
-public static final long JSObjectMake (long ctx, long jsClass, long data) {
- lock.lock();
- try {
- return _JSObjectMake (ctx, jsClass, data);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSObjectMakeArray (long ctx, long argumentCount, long [] arguments, long [] exception);
-public static final long JSObjectMakeArray (long ctx, long argumentCount, long [] arguments, long [] exception) {
- lock.lock();
- try {
- return _JSObjectMakeArray (ctx, argumentCount, arguments, exception);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSObjectMakeFunctionWithCallback (long ctx, long name, long callAsFunction);
-public static final long JSObjectMakeFunctionWithCallback (long ctx, long name, long callAsFunction) {
- lock.lock();
- try {
- return _JSObjectMakeFunctionWithCallback (ctx, name, callAsFunction);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _JSObjectSetProperty (long ctx, long object, long propertyName, long value, int attributes, long [] exception);
-public static final void JSObjectSetProperty (long ctx, long object, long propertyName, long value, int attributes, long [] exception) {
- lock.lock();
- try {
- _JSObjectSetProperty (ctx, object, propertyName, value, attributes, exception);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSStringCreateWithUTF8CString (byte[] string);
-public static final long JSStringCreateWithUTF8CString (byte[] string) {
- lock.lock();
- try {
- return _JSStringCreateWithUTF8CString (string);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSStringGetLength (long string);
-public static final long JSStringGetLength (long string) {
- lock.lock();
- try {
- return _JSStringGetLength (string);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSStringGetMaximumUTF8CStringSize (long string);
-public static final long JSStringGetMaximumUTF8CStringSize (long string) {
- lock.lock();
- try {
- return _JSStringGetMaximumUTF8CStringSize (string);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSStringGetUTF8CString (long string, byte[] buffer, long bufferSize);
-public static final long JSStringGetUTF8CString (long string, byte[] buffer, long bufferSize) {
- lock.lock();
- try {
- return _JSStringGetUTF8CString (string, buffer, bufferSize);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native int _JSStringIsEqualToUTF8CString (long a, byte[] b);
-public static final int JSStringIsEqualToUTF8CString (long a, byte[] b) {
- lock.lock();
- try {
- return _JSStringIsEqualToUTF8CString (a, b);
- } finally {
- lock.unlock();
- }
-}
+public static final native long JSStringGetUTF8CString(long string, byte[] buffer, long bufferSize);
/** @method flags=dynamic */
-public static final native void _JSStringRelease (long string);
-public static final void JSStringRelease (long string) {
- lock.lock();
- try {
- _JSStringRelease (string);
- } finally {
- lock.unlock();
- }
-}
+public static final native void JSStringRelease(long string);
// Signature: void webkit_javascript_result_unref (WebKitJavascriptResult *js_result);
-// Type Note: WebKitJavascriptResult -> gpointer -> jintLong
-/** @method flags=dynamic */
-public static final native void _webkit_javascript_result_unref(long js_result);
-public static final void webkit_javascript_result_unref(long js_result) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_javascript_result_unref (js_result);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native int _JSValueGetType (long ctx, long value);
-public static final int JSValueGetType (long ctx, long value) {
- lock.lock();
- try {
- return _JSValueGetType (ctx, value);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native int _JSValueIsObjectOfClass (long ctx, long value, long jsClass);
-public static final int JSValueIsObjectOfClass (long ctx, long value, long jsClass) {
- lock.lock();
- try {
- return _JSValueIsObjectOfClass (ctx, value, jsClass);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSValueMakeBoolean (long ctx, int bool);
-public static final long JSValueMakeBoolean (long ctx, int bool) {
- lock.lock();
- try {
- return _JSValueMakeBoolean (ctx, bool);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _JSValueMakeNumber (long ctx, double number);
-public static final long JSValueMakeNumber (long ctx, double number) {
- lock.lock();
- try {
- return _JSValueMakeNumber (ctx, number);
- } finally {
- lock.unlock();
- }
-}
-
+// Type Note: WebKitJavascriptResult -> gpointer -> jlong
/** @method flags=dynamic */
-public static final native long _JSValueMakeString (long ctx, long string);
-public static final long JSValueMakeString (long ctx, long string) {
- lock.lock();
- try {
- return _JSValueMakeString (ctx, string);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_javascript_result_unref(long js_result);
/** @method flags=dynamic */
-public static final native long _JSValueMakeUndefined (long ctx);
-public static final long JSValueMakeUndefined (long ctx) {
- lock.lock();
- try {
- return _JSValueMakeUndefined (ctx);
- } finally {
- lock.unlock();
- }
-}
+public static final native int JSValueGetType(long ctx, long value);
/** @method flags=dynamic */
-public static final native double _JSValueToNumber (long ctx, long value, long [] exception);
-public static final double JSValueToNumber (long ctx, long value, long [] exception) {
- lock.lock();
- try {
- return _JSValueToNumber (ctx, value, exception);
- } finally {
- lock.unlock();
- }
-}
+public static final native double JSValueToNumber(long ctx, long value, long [] exception);
/** @method flags=dynamic */
-public static final native long _JSValueToStringCopy (long ctx, long value, long [] exception);
-public static final long JSValueToStringCopy (long ctx, long value, long [] exception) {
- lock.lock();
- try {
- return _JSValueToStringCopy (ctx, value, exception);
- } finally {
- lock.unlock();
- }
-}
+public static final native long JSValueToStringCopy(long ctx, long value, long [] exception);
/* --------------------- start libsoup natives --------------------- */
/** @method flags=dynamic */
-public static final native void _soup_auth_authenticate (long auth, byte[] username, byte[] password);
-public static final void soup_auth_authenticate (long auth, byte[] username, byte[] password) {
- lock.lock();
- try {
- _soup_auth_authenticate (auth, username, password);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_auth_get_host (long auth);
-public static final long soup_auth_get_host (long auth) {
- lock.lock();
- try {
- return _soup_auth_get_host (auth);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_auth_get_scheme_name (long auth);
-public static final long soup_auth_get_scheme_name (long auth) {
- lock.lock();
- try {
- return _soup_auth_get_scheme_name (auth);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _soup_cookie_free (long cookie);
-public static final void soup_cookie_free (long cookie) {
- lock.lock();
- try {
- _soup_cookie_free (cookie);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _soup_cookie_jar_add_cookie (long jar, long cookie);
-public static final void soup_cookie_jar_add_cookie (long jar, long cookie) {
- lock.lock();
- try {
- _soup_cookie_jar_add_cookie (jar, cookie);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_cookie_jar_all_cookies (long jar);
-public static final long soup_cookie_jar_all_cookies (long jar) {
- lock.lock();
- try {
- return _soup_cookie_jar_all_cookies (jar);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _soup_cookie_jar_delete_cookie (long jar, long cookie);
-public static final void soup_cookie_jar_delete_cookie (long jar, long cookie) {
- lock.lock();
- try {
- _soup_cookie_jar_delete_cookie (jar, cookie);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_cookie_jar_get_cookies (long jar, long uri, int for_http);
-public static final long soup_cookie_jar_get_cookies (long jar, long uri, int for_http) {
- lock.lock();
- try {
- return _soup_cookie_jar_get_cookies (jar, uri, for_http);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_cookie_jar_get_type ();
-public static final long soup_cookie_jar_get_type () {
- lock.lock();
- try {
- return _soup_cookie_jar_get_type ();
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_cookie_parse (byte[] header, long origin);
-public static final long soup_cookie_parse (byte[] header, long origin) {
- lock.lock();
- try {
- return _soup_cookie_parse (header, origin);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _soup_message_body_append (long body, int use, long data, long length);
-public static final void soup_message_body_append (long body, int use, long data, long length) {
- lock.lock();
- try {
- _soup_message_body_append (body, use, data, length);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _soup_message_body_flatten (long body);
-public static final void soup_message_body_flatten (long body) {
- lock.lock();
- try {
- _soup_message_body_flatten (body);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_message_get_uri (long msg);
-public static final long soup_message_get_uri (long msg) {
- lock.lock();
- try {
- return _soup_message_get_uri (msg);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _soup_message_headers_append (long headers, byte[] name, byte[] value);
-public static final void soup_message_headers_append (long headers, byte[] name, byte[] value) {
- lock.lock();
- try {
- _soup_message_headers_append (headers, name, value);
- } finally {
- lock.unlock();
- }
-}
+public static final native long soup_cookie_get_name(long cookie);
/** @method flags=dynamic */
-public static final native void _soup_session_add_feature_by_type (long session, long type);
-public static final void soup_session_add_feature_by_type (long session, long type) {
- lock.lock();
- try {
- _soup_session_add_feature_by_type (session, type);
- } finally {
- lock.unlock();
- }
-}
+public static final native long soup_cookie_get_value(long cookie);
/** @method flags=dynamic */
-public static final native long _soup_session_get_feature (long session, long feature_type);
-public static final long soup_session_get_feature (long session, long feature_type) {
- lock.lock();
- try {
- return _soup_session_get_feature (session, feature_type);
- } finally {
- lock.unlock();
- }
-}
+public static final native long soup_cookie_parse(byte[] header, long origin);
/** @method flags=dynamic */
-public static final native void _soup_session_feature_attach (long feature, long session);
-public static final void soup_session_feature_attach (long feature, long session) {
- lock.lock();
- try {
- _soup_session_feature_attach (feature, session);
- } finally {
- lock.unlock();
- }
-}
+public static final native void soup_message_headers_append(long headers, byte[] name, byte[] value);
/** @method flags=dynamic */
-public static final native long _soup_session_get_type ();
-public static final long soup_session_get_type () {
- lock.lock();
- try {
- return _soup_session_get_type ();
- } finally {
- lock.unlock();
- }
-}
+public static final native void soup_uri_free(long uri);
/** @method flags=dynamic */
-public static final native void _soup_session_feature_detach (long feature, long session);
-public static final void soup_session_feature_detach (long feature, long session) {
- lock.lock();
- try {
- _soup_session_feature_detach (feature, session);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _soup_uri_free (long uri);
-public static final void soup_uri_free (long uri) {
- lock.lock();
- try {
- _soup_uri_free (uri);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_uri_new (byte[] uri_string);
-public static final long soup_uri_new (byte[] uri_string) {
- lock.lock();
- try {
- return _soup_uri_new (uri_string);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _soup_uri_to_string (long uri, int just_path_and_query);
-public static final long soup_uri_to_string (long uri, int just_path_and_query) {
- lock.lock();
- try {
- return _soup_uri_to_string (uri, just_path_and_query);
- } finally {
- lock.unlock();
- }
-}
+public static final native long soup_uri_new(byte[] uri_string);
/* --------------------- start WebKitGTK natives --------------------- */
/** @method flags=dynamic */
-public static final native void _webkit_authentication_request_authenticate (long request, long credential);
-public static final void webkit_authentication_request_authenticate (long request, long credential) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_authentication_request_authenticate (request, credential);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _webkit_authentication_request_cancel (long request);
-public static final void webkit_authentication_request_cancel (long request) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_authentication_request_cancel (request);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native boolean _webkit_authentication_request_is_retry (long request);
-public static final boolean webkit_authentication_request_is_retry (long request) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_authentication_request_is_retry (request);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _webkit_credential_free (long credential);
-public static final void webkit_credential_free (long credential) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_credential_free (credential);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_context_allow_tls_certificate_for_host(long webKitWebContext, long GTlsCertificate, byte[] constGCharHost);
-public static final long webkit_web_context_allow_tls_certificate_for_host(long webKitWebContext, long GTlsCertificate, byte[] constGCharHost) {
- assert WEBKIT2 : Webkit2AssertMsg;
- // since 2.6
- lock.lock();
- try {
- return _webkit_web_context_allow_tls_certificate_for_host(webKitWebContext, GTlsCertificate, constGCharHost);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_context_get_type ();
-public static final long webkit_web_context_get_type () {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_context_get_type ();
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_credential_new (byte[] username, byte[] password, int persistence);
-public static final long webkit_credential_new (byte[] username, byte[] password, int persistence) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_credential_new (username, password, persistence);
- } finally {
- lock.unlock();
- }
-}
-
-
-/** @method flags=dynamic */
-public static final native int _webkit_dom_event_target_add_event_listener (long target, byte[] name, long handler, int bubble, long userData);
-public static final int webkit_dom_event_target_add_event_listener (long target, byte[] name, long handler, int bubble, long userData) {
- lock.lock();
- try {
- return _webkit_dom_event_target_add_event_listener (target, name, handler, bubble, userData);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native int _webkit_dom_mouse_event_get_alt_key (long self);
-public static final int webkit_dom_mouse_event_get_alt_key (long self) {
- lock.lock();
- try {
- return _webkit_dom_mouse_event_get_alt_key (self);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native short _webkit_dom_mouse_event_get_button (long self);
-public static final short webkit_dom_mouse_event_get_button (long self) {
- lock.lock();
- try {
- return _webkit_dom_mouse_event_get_button (self);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native int _webkit_dom_mouse_event_get_ctrl_key (long self);
-public static final int webkit_dom_mouse_event_get_ctrl_key (long self) {
- lock.lock();
- try {
- return _webkit_dom_mouse_event_get_ctrl_key (self);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native int _webkit_dom_mouse_event_get_meta_key (long self);
-public static final int webkit_dom_mouse_event_get_meta_key (long self) {
- lock.lock();
- try {
- return _webkit_dom_mouse_event_get_meta_key (self);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_authentication_request_authenticate(long request, long credential);
/** @method flags=dynamic */
-public static final native long _webkit_dom_mouse_event_get_screen_x (long self);
-public static final long webkit_dom_mouse_event_get_screen_x (long self) {
- lock.lock();
- try {
- return _webkit_dom_mouse_event_get_screen_x (self);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_authentication_request_cancel(long request);
/** @method flags=dynamic */
-public static final native long _webkit_dom_mouse_event_get_screen_y (long self);
-public static final long webkit_dom_mouse_event_get_screen_y (long self) {
- lock.lock();
- try {
- return _webkit_dom_mouse_event_get_screen_y (self);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean webkit_authentication_request_is_retry(long request);
-/** @method flags=dynamic */
-public static final native int _webkit_dom_mouse_event_get_shift_key (long self);
-public static final int webkit_dom_mouse_event_get_shift_key (long self) {
- lock.lock();
- try {
- return _webkit_dom_mouse_event_get_shift_key (self);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_dom_ui_event_get_char_code (long self);
-public static final long webkit_dom_ui_event_get_char_code (long self) {
- lock.lock();
- try {
- return _webkit_dom_ui_event_get_char_code (self);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_dom_ui_event_get_detail (long self);
-public static final long webkit_dom_ui_event_get_detail (long self) {
- lock.lock();
- try {
- return _webkit_dom_ui_event_get_detail (self);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_dom_ui_event_get_key_code (long self);
-public static final long webkit_dom_ui_event_get_key_code (long self) {
- lock.lock();
- try {
- return _webkit_dom_ui_event_get_key_code (self);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _webkit_download_cancel (long download);
-public static final void webkit_download_cancel (long download) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_download_cancel (download);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_download_get_current_size (long download);
-public static final long webkit_download_get_current_size (long download) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_current_size (download);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_download_get_received_data_length (long download);
-public static final long webkit_download_get_received_data_length (long download) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_received_data_length (download);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_download_get_network_request (long download);
-public static final long webkit_download_get_network_request (long download) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_network_request (download);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native int _webkit_download_get_status (long download);
-public static final int webkit_download_get_status (long download) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_status (download);
- } finally {
- lock.unlock();
- }
-}
+/**
+ * @method flags=dynamic
+ */
+public static final native void webkit_cookie_manager_add_cookie(long cookie_manager, long cookie, long cancellable, long cb, long user_data);
/** @method flags=dynamic */
-public static final native long _webkit_download_get_suggested_filename (long download);
-public static final long webkit_download_get_suggested_filename (long download) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_suggested_filename (download);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean webkit_cookie_manager_add_cookie_finish(long cookie_manager, long result, long[] error );
-/** @method flags=dynamic */
-public static final native long _webkit_download_get_request (long download);
-public static final long webkit_download_get_request (long download) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_request (download);
- } finally {
- lock.unlock();
- }
-}
+/**
+ * @method flags=dynamic
+ */
+public static final native void webkit_cookie_manager_get_cookies(long cookie_manager, byte [] uri, long cancellable, long cb, long user_data);
/** @method flags=dynamic */
-public static final native long _webkit_download_get_response (long download);
-public static final long webkit_download_get_response (long download) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_response (download);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_cookie_manager_get_cookies_finish(long cookie_manager, long result, long[] error );
/** @method flags=dynamic */
-public static final native long _webkit_download_get_total_size (long download);
-public static final long webkit_download_get_total_size (long download) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_total_size (download);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_credential_free(long credential);
/** @method flags=dynamic */
-public static final native long _webkit_download_get_type ();
-public static final long webkit_download_get_type () {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_type ();
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_context_allow_tls_certificate_for_host(long webKitWebContext, long GTlsCertificate, byte[] constGCharHost);
/** @method flags=dynamic */
-public static final native long _webkit_uri_response_get_content_length (long response);
-public static final long webkit_uri_response_get_content_length (long response) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_uri_response_get_content_length (response);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_context_get_type();
/** @method flags=dynamic */
-public static final native long _webkit_download_get_uri (long download);
-public static final long webkit_download_get_uri (long download) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_uri (download);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_credential_new(byte[] username, byte[] password, int persistence);
-/** @method flags=dynamic */
-public static final native long _webkit_download_get_web_view (long download);
-public static final long webkit_download_get_web_view (long download) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_download_get_web_view (download);
- } finally {
- lock.unlock();
- }
-}
/** @method flags=dynamic */
-public static final native long _webkit_download_new (long request);
-public static final long webkit_download_new (long request) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_download_new (request);
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_dom_event_target_add_event_listener(long target, byte[] name, long handler, int bubble, long userData);
/** @method flags=dynamic */
-public static final native void _webkit_download_set_allow_overwrite (long download, boolean allowed);
-public static final void webkit_download_set_allow_overwrite (long download, boolean allowed) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_download_set_allow_overwrite (download, allowed);
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_dom_mouse_event_get_alt_key(long self);
/** @method flags=dynamic */
-public static final native void _webkit_download_set_destination_uri (long download, byte[] destination_uri);
-public static final void webkit_download_set_destination_uri (long download, byte[] destination_uri) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- _webkit_download_set_destination_uri (download, destination_uri);
- } finally {
- lock.unlock();
- }
-}
+public static final native short webkit_dom_mouse_event_get_button(long self);
/** @method flags=dynamic */
-public static final native void _webkit_download_set_destination (long download, byte[] destination_uri);
-public static final void webkit_download_set_destination (long download, byte[] destination_uri) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_download_set_destination (download, destination_uri);
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_dom_mouse_event_get_ctrl_key(long self);
/** @method flags=dynamic */
-public static final native void _webkit_download_start (long download);
-public static final void webkit_download_start (long download) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- _webkit_download_start (download);
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_dom_mouse_event_get_meta_key(long self);
/** @method flags=dynamic */
-public static final native void _webkit_favicon_database_set_path (long database, long path);
-public static final void webkit_favicon_database_set_path (long database, long path) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- _webkit_favicon_database_set_path (database, path);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_dom_mouse_event_get_screen_x(long self);
/** @method flags=dynamic */
-public static final native long _webkit_get_default_session ();
-public static final long webkit_get_default_session () {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_get_default_session ();
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_dom_mouse_event_get_screen_y(long self);
/** @method flags=dynamic */
-public static final native long _webkit_get_favicon_database ();
-public static final long webkit_get_favicon_database () {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_get_favicon_database ();
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_dom_mouse_event_get_shift_key(long self);
/** @method flags=dynamic */
-public static final native boolean _webkit_hit_test_result_context_is_link (long hit_test_result);
-public static final boolean webkit_hit_test_result_context_is_link (long hit_test_result) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_hit_test_result_context_is_link (hit_test_result);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_dom_ui_event_get_char_code(long self);
/** @method flags=dynamic */
-public static final native long _webkit_hit_test_result_get_link_uri (long hit_test_result);
-public static final long webkit_hit_test_result_get_link_uri (long hit_test_result) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_hit_test_result_get_link_uri (hit_test_result);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_dom_ui_event_get_detail(long self);
/** @method flags=dynamic */
-public static final native long _webkit_hit_test_result_get_link_title (long hit_test_result);
-public static final long webkit_hit_test_result_get_link_title (long hit_test_result) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_hit_test_result_get_link_title (hit_test_result);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_dom_ui_event_get_key_code(long self);
/** @method flags=dynamic */
-public static final native int _webkit_major_version ();
-public static final int webkit_major_version () {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_major_version ();
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_download_cancel(long download);
/** @method flags=dynamic */
-public static final native int _webkit_get_major_version ();
-public static final int webkit_get_major_version () {
-// assert WEBKIT2; //Corner case, this function is called in order to determine WEBKIT2 flag. Can't use in assert.
- lock.lock();
- try {
- return _webkit_get_major_version ();
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_download_get_received_data_length(long download);
/** @method flags=dynamic */
-public static final native int _webkit_micro_version ();
-public static final int webkit_micro_version () {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_micro_version ();
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_download_get_request(long download);
/** @method flags=dynamic */
-public static final native int _webkit_get_micro_version ();
-public static final int webkit_get_micro_version () {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_get_micro_version ();
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_download_get_response(long download);
/** @method flags=dynamic */
-public static final native int _webkit_minor_version ();
-public static final int webkit_minor_version () {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_minor_version ();
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_download_get_type();
/** @method flags=dynamic */
-public static final native int _webkit_get_minor_version ();
-public static final int webkit_get_minor_version () {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_get_minor_version ();
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_navigation_policy_decision_get_request (long decision);
-public static final long webkit_navigation_policy_decision_get_request (long decision) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_navigation_policy_decision_get_request (decision);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_uri_response_get_content_length(long response);
/** @method flags=dynamic */
-public static final native long _webkit_network_request_get_message (long request);
-public static final long webkit_network_request_get_message (long request) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_network_request_get_message (request);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_download_get_web_view(long download);
/** @method flags=dynamic */
-public static final native long _webkit_network_request_get_uri (long request);
-public static final long webkit_network_request_get_uri (long request) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_network_request_get_uri (request);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_download_set_allow_overwrite(long download, boolean allowed);
/** @method flags=dynamic */
-public static final native long _webkit_network_request_new (byte[] uri);
-public static final long webkit_network_request_new (byte[] uri) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_network_request_new (uri);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_download_set_destination(long download, byte[] destination_uri);
/** @method flags=dynamic */
-public static final native void _webkit_policy_decision_download (long decision);
-public static final void webkit_policy_decision_download (long decision) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_policy_decision_download (decision);
- } finally {
- lock.unlock();
- }
-}
+public static final native boolean webkit_hit_test_result_context_is_link(long hit_test_result);
/** @method flags=dynamic */
-public static final native void _webkit_policy_decision_ignore (long decision);
-public static final void webkit_policy_decision_ignore (long decision) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_policy_decision_ignore (decision);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_hit_test_result_get_link_uri(long hit_test_result);
/** @method flags=dynamic */
-public static final native long _webkit_soup_auth_dialog_get_type ();
-public static final long webkit_soup_auth_dialog_get_type () {
- // Can't find reference for this. Currently used only by webkit1 thou, probably webkit1-only.
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_soup_auth_dialog_get_type ();
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_hit_test_result_get_link_title(long hit_test_result);
/** @method flags=dynamic */
-public static final native long _webkit_web_context_get_default ();
-public static final long webkit_web_context_get_default () {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_context_get_default ();
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_get_major_version();
/** @method flags=dynamic */
-public static final native long _webkit_web_context_get_website_data_manager (long context);
-public static final long webkit_web_context_get_website_data_manager (long context) {
- assert WEBKIT2 : Webkit2AssertMsg; // Since 2.10
-lock.lock();
-try {
- return _webkit_web_context_get_website_data_manager (context);
-} finally {
- lock.unlock();
-}
-}
+public static final native int webkit_get_micro_version();
/** @method flags=dynamic */
-public static final native void _webkit_web_context_set_tls_errors_policy(long context, int policy);
-public static final void webkit_web_context_set_tls_errors_policy (long context, int policy) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_web_context_set_tls_errors_policy (context, policy);
- } finally {
- lock.unlock();
- }
-}
-
+public static final native int webkit_get_minor_version();
/** @method flags=dynamic */
-public static final native long _webkit_web_data_source_get_data (long data_source);
-public static final long webkit_web_data_source_get_data (long data_source) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_data_source_get_data (data_source);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_navigation_policy_decision_get_request(long decision);
/** @method flags=dynamic */
-public static final native long _webkit_web_data_source_get_encoding (long data_source);
-public static final long webkit_web_data_source_get_encoding (long data_source) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_data_source_get_encoding (data_source);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_policy_decision_download(long decision);
/** @method flags=dynamic */
-public static final native long _webkit_web_frame_get_data_source (long frame);
-public static final long webkit_web_frame_get_data_source (long frame) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_data_source (frame);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_policy_decision_ignore(long decision);
/** @method flags=dynamic */
-public static final native long _webkit_web_frame_get_global_context (long frame);
-public static final long webkit_web_frame_get_global_context (long frame) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_global_context (frame);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_context_get_default();
/** @method flags=dynamic */
-public static final native int _webkit_web_frame_get_load_status (long frame);
-public static final int webkit_web_frame_get_load_status (long frame) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_load_status (frame);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_context_get_cookie_manager(long context);
/** @method flags=dynamic */
-public static final native long _webkit_web_frame_get_parent (long frame);
-public static final long webkit_web_frame_get_parent (long frame) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_parent (frame);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_context_get_website_data_manager(long context);
/** @method flags=dynamic */
-public static final native long _webkit_web_frame_get_title (long frame);
-public static final long webkit_web_frame_get_title (long frame) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_title (frame);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_context_get_security_manager(long context);
/** @method flags=dynamic */
-public static final native long _webkit_web_frame_get_type ();
-public static final long webkit_web_frame_get_type () {
- // Can't find reference. Probably a webkit1 macro.
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_type ();
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_context_set_tls_errors_policy(long context, int policy);
/** @method flags=dynamic */
-public static final native long _webkit_web_frame_get_uri (long frame);
-public static final long webkit_web_frame_get_uri (long frame) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_uri (frame);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_context_register_uri_scheme(long context, byte[] scheme, long callback, long user_data, long user_data_destroy_func);
/** @method flags=dynamic */
-public static final native long _webkit_web_frame_get_web_view (long frame);
-public static final long webkit_web_frame_get_web_view (long frame) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_frame_get_web_view (frame);
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_web_view_can_go_back(long web_view);
/** @method flags=dynamic */
-public static final native void _webkit_web_policy_decision_download (long decision);
-public static final void webkit_web_policy_decision_download (long decision) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- _webkit_web_policy_decision_download (decision);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_view_get_main_resource(long web_view);
/** @method flags=dynamic */
-public static final native void _webkit_web_policy_decision_ignore (long decision);
-public static final void webkit_web_policy_decision_ignore (long decision) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- _webkit_web_policy_decision_ignore (decision);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_view_get_context(long web_view);
/** @method flags=dynamic */
-public static final native int _webkit_web_view_can_go_back (long web_view);
-public static final int webkit_web_view_can_go_back (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- return _webkit_web_view_can_go_back (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_web_view_can_go_forward(long web_view);
/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_main_resource (long web_view);
-public static final long webkit_web_view_get_main_resource (long web_view) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_main_resource (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native int webkit_web_view_can_show_mime_type(long web_view, long mime_type);
/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_context (long web_view);
-public static final long webkit_web_view_get_context (long web_view) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_context (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native double webkit_web_view_get_estimated_load_progress(long web_view);
/** @method flags=dynamic */
-public static final native int _webkit_web_view_can_go_forward (long web_view);
-public static final int webkit_web_view_can_go_forward (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- return _webkit_web_view_can_go_forward (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_view_get_page_id(long web_view);
/** @method flags=dynamic */
-public static final native int _webkit_web_view_can_show_mime_type (long web_view, long mime_type);
-public static final int webkit_web_view_can_show_mime_type (long web_view, long mime_type) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- return _webkit_web_view_can_show_mime_type (web_view, mime_type);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_view_get_settings(long web_view);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_execute_script (long web_view, byte[] script);
-public static final void webkit_web_view_execute_script (long web_view, byte[] script) { // never called
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- _webkit_web_view_execute_script (web_view, script);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_view_get_user_content_manager(long web_view);
/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_dom_document (long web_view);
-public static final long webkit_web_view_get_dom_document (long web_view) {
- assert WEBKIT1 : Webkit1AssertMsg;
- //TODO - guard from being called on webkit2 (webkit_web_view_get_dom_document)
- lock.lock();
- try {
- return _webkit_web_view_get_dom_document (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_view_get_title(long web_view);
/** @method flags=dynamic */
-public static final native double _webkit_web_view_get_estimated_load_progress (long web_view);
-public static final double webkit_web_view_get_estimated_load_progress (long web_view) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_estimated_load_progress (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_view_get_uri(long web_view);
/** @method flags=dynamic */
-public static final native int _webkit_web_view_get_load_status (long web_view);
-public static final int webkit_web_view_get_load_status (long web_view) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_load_status (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_main_frame (long web_view);
-public static final long webkit_web_view_get_main_frame (long web_view) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_main_frame (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_page_id (long web_view);
-public static final long webkit_web_view_get_page_id (long web_view) {
- lock.lock();
- try {
- return _webkit_web_view_get_page_id (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native double _webkit_web_view_get_progress (long web_view);
-public static final double webkit_web_view_get_progress (long web_view) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_progress (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_settings (long web_view);
-public static final long webkit_web_view_get_settings (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- return _webkit_web_view_get_settings (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_title (long web_view);
-public static final long webkit_web_view_get_title (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- return _webkit_web_view_get_title (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_type ();
-public static final long webkit_web_view_get_type () {
- // TODO Bug 514859 Investigate if this is a webkit1 only function or if it can be used on webkit2 also.
- // can't find reference for it. Could be a macro.
- lock.lock();
- try {
- return _webkit_web_view_get_type ();
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_uri (long web_view);
-public static final long webkit_web_view_get_uri (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- return _webkit_web_view_get_uri (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_window_features (long web_view);
-public static final long webkit_web_view_get_window_features (long web_view) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_window_features (web_view);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native long _webkit_web_view_get_window_properties (long webView);
-/** WebKitWindowProperties * webkit_web_view_get_window_properties (WebKitWebView *web_view); */
-public static final long webkit_web_view_get_window_properties (long webView) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_get_window_properties (webView);
- } finally {
- lock.unlock();
- }
-}
+/* WebKitWindowProperties * webkit_web_view_get_window_properties (WebKitWebView *web_view); */
+public static final native long webkit_web_view_get_window_properties(long webView);
/**
* @method flags=dynamic
* @param rectangle cast=(GdkRectangle *),flags=no_in
*/
-public static final native void _webkit_window_properties_get_geometry (long webKitWindowProperties, GdkRectangle rectangle);
-public static final void webkit_window_properties_get_geometry (long webKitWindowProperties, GdkRectangle rectangle ) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_window_properties_get_geometry (webKitWindowProperties, rectangle);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_window_properties_get_geometry(long webKitWindowProperties, GdkRectangle rectangle);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_go_back (long web_view);
-public static final void webkit_web_view_go_back (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_go_back (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_go_back(long web_view);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_go_forward (long web_view);
-public static final void webkit_web_view_go_forward (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_go_forward (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_go_forward(long web_view);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_load_html (long web_view, byte[] content, byte[] base_uri);
-public static final void webkit_web_view_load_html (long web_view, byte[] content, byte[] base_uri) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_load_html (web_view, content, base_uri);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_load_html(long web_view, byte[] content, byte[] base_uri);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_load_bytes (long web_view, long bytes, byte [] mime_type, byte [] encoding, byte [] base_uri);
-public static final void webkit_web_view_load_bytes (long web_view, long bytes, byte [] mime_type, byte [] encoding, byte [] base_uri) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_load_bytes (web_view, bytes, mime_type, encoding, base_uri);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_load_bytes(long web_view, long bytes, byte [] mime_type, byte [] encoding, byte [] base_uri);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_load_string (long web_view, byte[] content, byte[] mime_type, byte[] encoding, byte[] base_uri);
-public static final void webkit_web_view_load_string (long web_view, byte[] content, byte[] mime_type, byte[] encoding, byte[] base_uri) {
- assert WEBKIT1 : Webkit1AssertMsg;
- lock.lock();
- try {
- _webkit_web_view_load_string (web_view, content, mime_type, encoding, base_uri);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_load_request(long web_view, long request);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_load_request (long web_view, long request);
-public static final void webkit_web_view_load_request (long web_view, long request) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_load_request (web_view, request);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_load_uri(long web_view, byte[] uri);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_load_uri (long web_view, byte[] uri);
-public static final void webkit_web_view_load_uri (long web_view, byte[] uri) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_load_uri (web_view, uri);
- } finally {
- lock.unlock();
- }
-}
-
+public static final native long webkit_web_view_new();
/** @method flags=dynamic */
-public static final native long _webkit_web_view_new ();
-public static final long webkit_web_view_new () {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- return _webkit_web_view_new ();
- } finally {
- lock.unlock();
- }
-}
-
-
-/** @method flags=dynamic */ // @param context cast=(WebKitWebContext*) @param directory cast=(const gchar *)
-public static final native void _webkit_web_context_set_web_extensions_directory (long context, byte[] directory);
-public static final void webkit_web_context_set_web_extensions_directory (long context, byte[] directory) {
- assert WEBKIT2;
- lock.lock();
- try {
- _webkit_web_context_set_web_extensions_directory (context, directory);
- } finally {
- lock.unlock();
- }
-}
-
-/** @method flags=dynamic */
-public static final native void _webkit_web_context_set_web_extensions_initialization_user_data(long /* int */ context, long /* int */ user_data);
-public static final void webkit_web_context_set_web_extensions_initialization_user_data(long /* int */ context,
- long /* int */ user_data) {
- assert WEBKIT2;
- lock.lock();
- try {
- _webkit_web_context_set_web_extensions_initialization_user_data(context, user_data);
- } finally {
- lock.unlock();
- }
-}
-
+public static final native long webkit_web_view_new_with_related_view(long web_view);
/**
* @method flags=dynamic
* @param js_result cast=(gpointer)
*/
-public static final native long _webkit_javascript_result_get_global_context(long js_result);
-/** JSGlobalContextRef webkit_javascript_result_get_global_context (WebKitJavascriptResult *js_result); */
-public static final long webkit_javascript_result_get_global_context(long js_result) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_javascript_result_get_global_context (js_result);
- } finally {
- lock.unlock();
- }
-}
+/* JSGlobalContextRef webkit_javascript_result_get_global_context (WebKitJavascriptResult *js_result); */
+public static final native long webkit_javascript_result_get_global_context(long js_result);
/**
* @method flags=dynamic
* @param js_result cast=(gpointer)
*/
-public static final native long _webkit_javascript_result_get_value(long js_result);
-/** JSValueRef webkit_javascript_result_get_value (WebKitJavascriptResult *js_result); */
-public static final long webkit_javascript_result_get_value(long js_result) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_javascript_result_get_value (js_result);
- } finally {
- lock.unlock();
- }
-}
+/* JSValueRef webkit_javascript_result_get_value (WebKitJavascriptResult *js_result); */
+public static final native long webkit_javascript_result_get_value(long js_result);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_reload (long web_view);
-public static final void webkit_web_view_reload (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_reload (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_reload(long web_view);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_run_javascript (long web_view, byte [] script, long cancellable, long callback, long user_data);
-/** void webkit_web_view_run_javascript (WebKitWebView *web_view, const gchar *script, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); **/
-public static final void webkit_web_view_run_javascript (long web_view, byte[] script, long cancellable, long callback, long user_data) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- _webkit_web_view_run_javascript (web_view, script, cancellable, callback, user_data);
- } finally {
- lock.unlock();
- }
-}
+/* void webkit_web_view_run_javascript (WebKitWebView *web_view, const gchar *script, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); **/
+public static final native void webkit_web_view_run_javascript(long web_view, byte [] script, long cancellable, long callback, long user_data);
/** @method flags=dynamic */
-public static final native void _webkit_web_resource_get_data (long webKitWebResource, long gCancellable, long GAsyncReadyCallback, long user_data);
-public static final void webkit_web_resource_get_data (long webKitWebResource, long gCancellable, long GAsyncReadyCallback, long user_data) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_resource_get_data (webKitWebResource, gCancellable, GAsyncReadyCallback, user_data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_resource_get_data(long webKitWebResource, long gCancellable, long GAsyncReadyCallback, long user_data);
/** @method flags=dynamic */
-public static final native long _webkit_web_resource_get_data_finish(long WebKitWebResource, long GAsyncResult, long [] gsize, long GError[]);
-public static final long webkit_web_resource_get_data_finish(long WebKitWebResource, long GAsyncResult, long [] gsize, long GError[]) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_resource_get_data_finish(WebKitWebResource, GAsyncResult, gsize, GError);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_web_resource_get_data_finish(long WebKitWebResource, long GAsyncResult, long [] gsize, long[] GError);
/**
* @method flags=dynamic
* @param gerror cast=(GError **)
*/
-public static final native long _webkit_web_view_run_javascript_finish(long web_view, long GAsyncResult, long [] gerror);
-/**WebKitJavascriptResult * webkit_web_view_run_javascript_finish (WebKitWebView *web_view, GAsyncResult *result, GError **error);*/
-public static long webkit_web_view_run_javascript_finish(long web_view, long GAsyncResult, long [] gerror) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_web_view_run_javascript_finish (web_view, GAsyncResult, gerror);
- } finally {
- lock.unlock();
- }
-}
+/*WebKitJavascriptResult * webkit_web_view_run_javascript_finish (WebKitWebView *web_view, GAsyncResult *result, GError **error);*/
+public static final native long webkit_web_view_run_javascript_finish(long web_view, long GAsyncResult, long [] gerror);
/** @method flags=dynamic */
-public static final native void _webkit_web_view_stop_loading (long web_view);
-public static final void webkit_web_view_stop_loading (long web_view) {
- assert WEBKIT1 || WEBKIT2;
- lock.lock();
- try {
- _webkit_web_view_stop_loading (web_view);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_web_view_stop_loading(long web_view);
/** @method flags=dynamic */
-public static final native void _webkit_website_data_manager_clear (long manager, long types, long timespan, long cancellable, long callback, long user_data);
-public static final void webkit_website_data_manager_clear (long manager, long types, long timespan, long cancellable, long callback, long user_data) {
- assert WEBKIT2 : Webkit2AssertMsg; // Since 2.16
- lock.lock();
- try {
- _webkit_website_data_manager_clear (manager, types, timespan, cancellable, callback, user_data);
- } finally {
- lock.unlock();
- }
-}
+public static final native void webkit_website_data_manager_clear(long manager, long types, long timespan, long cancellable, long callback, long user_data);
/** @method flags=dynamic */
-public static final native long _webkit_response_policy_decision_get_request (long decision);
-public static final long webkit_response_policy_decision_get_request (long decision) { // never called
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_response_policy_decision_get_request (decision);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_response_policy_decision_get_request(long decision);
/** @method flags=dynamic */
-public static final native long _webkit_response_policy_decision_get_response (long decision);
-public static final long webkit_response_policy_decision_get_response (long decision) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_response_policy_decision_get_response (decision);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_response_policy_decision_get_response(long decision);
/** @method flags=dynamic */
-public static final native long _webkit_uri_request_new (byte[] uri);
-public static final long webkit_uri_request_new (byte[] uri) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_uri_request_new (uri);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_uri_request_new(byte[] uri);
/** @method flags=dynamic */
-public static final native long _webkit_uri_request_get_http_headers (long request);
-public static final long webkit_uri_request_get_http_headers (long request) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_uri_request_get_http_headers (request);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_uri_request_get_http_headers(long request);
/** @method flags=dynamic */
-public static final native long _webkit_uri_request_get_uri (long request);
-public static final long webkit_uri_request_get_uri (long request) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_uri_request_get_uri (request);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_uri_request_get_uri(long request);
/** @method flags=dynamic */
-public static final native long _webkit_uri_response_get_mime_type (long responce);
-public static final long webkit_uri_response_get_mime_type (long response) {
- assert WEBKIT2 : Webkit2AssertMsg;
- lock.lock();
- try {
- return _webkit_uri_response_get_mime_type (response);
- } finally {
- lock.unlock();
- }
-}
-
-/* --------------------- start SWT natives --------------------- */
-
-public static final native int JSClassDefinition_sizeof ();
-public static final native int GdkRectangle_sizeof();
+public static final native long webkit_uri_response_get_mime_type(long responce);
/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
+ * @method flags=dynamic
+ * @param content_type flags=no_out
*/
-public static final native void memmove (long dest, JSClassDefinition src, long size);
+public static final native void webkit_uri_scheme_request_finish(long request, long stream, long stream_length, byte[] content_type);
-/**
- * @method flags=getter
- * @param cookie cast=(SoupCookie *)
- */
-public static final native long _SoupCookie_expires (long cookie);
-public static final long SoupCookie_expires (long cookie) {
- lock.lock();
- try {
- return _SoupCookie_expires (cookie);
- } finally {
- lock.unlock();
- }
-}
+/** @method flags=dynamic */
+public static final native long webkit_uri_scheme_request_get_uri (long request);
-/**
- * @method flags=setter
- * @param message cast=(SoupMessage *)
- * @param method cast=(const char *)
- */
-public static final native void _SoupMessage_method (long message, long method);
-public static final void SoupMessage_method (long message, long method) {
- lock.lock();
- try {
- _SoupMessage_method (message, method);
- } finally {
- lock.unlock();
- }
-}
+/** @method flags=dynamic */
+public static final native long webkit_uri_scheme_request_get_web_view(long request);
-/**
- * @method flags=getter
- * @param message cast=(SoupMessage *)
- */
-public static final native long _SoupMessage_request_body (long message);
-public static final long SoupMessage_request_body (long message) {
- lock.lock();
- try {
- return _SoupMessage_request_body (message);
- } finally {
- lock.unlock();
- }
-}
+/** @method flags=dynamic */
+public static final native long webkit_user_content_manager_add_script(long manager, long script);
+
+/** @method flags=dynamic */
+public static final native void webkit_user_content_manager_remove_all_scripts(long manager);
+
+/** @method flags=dynamic */
+public static final native void webkit_security_manager_register_uri_scheme_as_secure(long security_manager, byte[] scheme);
/**
- * @method flags=getter
- * @param message cast=(SoupMessage *)
+ * @method flags=dynamic
+ * @param source flags=no_out
*/
-public static final native long _SoupMessage_request_headers (long message);
-public static final long SoupMessage_request_headers (long message) {
- lock.lock();
- try {
- return _SoupMessage_request_headers (message);
- } finally {
- lock.unlock();
- }
-}
+public static final native long webkit_user_script_new (byte[] source, int injected_frames, int injection_time, long allow_list, long block_list);
+
+/** @method flags=dynamic */
+public static final native void webkit_user_script_unref (long user_script);
+
+/* --------------------- start SWT natives --------------------- */
+public static final native int GdkRectangle_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/swt_webkit.rc b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/swt_webkit.rc
deleted file mode 100644
index 1a97590518..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/swt_webkit.rc
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "windows.h"
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION SWT_COMMA_VERSION
- PRODUCTVERSION 0,0,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40000L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "CompanyName", "Eclipse Foundation\0"
- VALUE "FileDescription", "SWT for Windows native library\0"
- VALUE "FileVersion", SWT_FILE_VERSION
- VALUE "InternalName", "SWT\0"
- VALUE "LegalCopyright", "Copyright (c) 2010 IBM Corp. All Rights Reserved.\0"
- VALUE "OriginalFilename", SWT_ORG_FILENAME
- VALUE "ProductName", "Standard Widget Toolkit\0"
- VALUE "ProductVersion", "0,0,0,0\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp
deleted file mode 100644
index 9c7e39ffb1..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp
+++ /dev/null
@@ -1,786 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2016 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
-/* DO NOT EDIT - your changes will be lost. */
-
-#include "swt.h"
-#include "webkit_win32_structs.h"
-#include "webkit_win32_stats.h"
-
-#ifndef WebKit_win32_NATIVE
-#define WebKit_win32_NATIVE(func) Java_org_eclipse_swt_internal_webkit_WebKit_1win32_##func
-#endif
-
-#ifndef NO_CFArrayGetCount
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFArrayGetCount)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFArrayGetCount)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFArrayGetCount_FUNC);
- rc = (jint)CFArrayGetCount((CFArrayRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFArrayGetCount_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFArrayGetValueAtIndex
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFArrayGetValueAtIndex)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFArrayGetValueAtIndex)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFArrayGetValueAtIndex_FUNC);
- rc = (jintLong)CFArrayGetValueAtIndex((CFArrayRef)arg0, (CFIndex)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, CFArrayGetValueAtIndex_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFDataCreate
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFDataCreate)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFDataCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2)
-{
- jbyte *lparg1=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFDataCreate_FUNC);
- if (arg1) if ((lparg1 = env->GetByteArrayElements(arg1, NULL)) == NULL) goto fail;
- rc = (jintLong)CFDataCreate((CFAllocatorRef)arg0, (const UInt8 *)lparg1, (CFIndex)arg2);
-fail:
- if (arg1 && lparg1) env->ReleaseByteArrayElements(arg1, lparg1, 0);
- WebKit_win32_NATIVE_EXIT(env, that, CFDataCreate_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFDataGetBytePtr
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFDataGetBytePtr)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFDataGetBytePtr)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFDataGetBytePtr_FUNC);
- rc = (jintLong)CFDataGetBytePtr((CFDataRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFDataGetBytePtr_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFDataGetLength
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFDataGetLength)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFDataGetLength)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFDataGetLength_FUNC);
- rc = (jint)CFDataGetLength((CFDataRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFDataGetLength_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFDictionaryCreate
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFDictionaryCreate)(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2, jint arg3, jintLong arg4, jintLong arg5);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFDictionaryCreate)
- (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2, jint arg3, jintLong arg4, jintLong arg5)
-{
- jintLong *lparg1=NULL;
- jintLong *lparg2=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFDictionaryCreate_FUNC);
- if (arg1) if ((lparg1 = env->GetIntLongArrayElements(arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = env->GetIntLongArrayElements(arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)CFDictionaryCreate((CFAllocatorRef)arg0, (const void **)lparg1, (const void **)lparg2, (CFIndex)arg3, (const CFDictionaryKeyCallBacks *)arg4, (const CFDictionaryValueCallBacks *)arg5);
-fail:
- if (arg2 && lparg2) env->ReleaseIntLongArrayElements(arg2, lparg2, 0);
- if (arg1 && lparg1) env->ReleaseIntLongArrayElements(arg1, lparg1, 0);
- WebKit_win32_NATIVE_EXIT(env, that, CFDictionaryCreate_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFHTTPCookieCreateWithResponseHeaderFields
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieCreateWithResponseHeaderFields)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieCreateWithResponseHeaderFields)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieCreateWithResponseHeaderFields_FUNC);
- rc = (jintLong)CFHTTPCookieCreateWithResponseHeaderFields((CFAllocatorRef)arg0, (CFDictionaryRef)arg1, (CFURLRef)arg2);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieCreateWithResponseHeaderFields_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFHTTPCookieGetFlags
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFHTTPCookieGetFlags)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFHTTPCookieGetFlags)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieGetFlags_FUNC);
- rc = (jint)CFHTTPCookieGetFlags((CFHTTPCookieRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieGetFlags_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFHTTPCookieGetName
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieGetName)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieGetName)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieGetName_FUNC);
- rc = (jintLong)CFHTTPCookieGetName((CFHTTPCookieRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieGetName_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFHTTPCookieGetValue
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieGetValue)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieGetValue)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieGetValue_FUNC);
- rc = (jintLong)CFHTTPCookieGetValue((CFHTTPCookieRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieGetValue_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFHTTPCookieStorageCopyCookies
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageCopyCookies)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageCopyCookies)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieStorageCopyCookies_FUNC);
- rc = (jintLong)CFHTTPCookieStorageCopyCookies((CFHTTPCookieStorageRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieStorageCopyCookies_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFHTTPCookieStorageCopyCookiesForURL
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageCopyCookiesForURL)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageCopyCookiesForURL)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieStorageCopyCookiesForURL_FUNC);
- rc = (jintLong)CFHTTPCookieStorageCopyCookiesForURL((CFHTTPCookieStorageRef)arg0, (CFURLRef)arg1, (Boolean)arg2);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieStorageCopyCookiesForURL_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFHTTPCookieStorageDeleteCookie
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageDeleteCookie)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageDeleteCookie)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieStorageDeleteCookie_FUNC);
- CFHTTPCookieStorageDeleteCookie((CFHTTPCookieStorageRef)arg0, (CFHTTPCookieRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieStorageDeleteCookie_FUNC);
-}
-#endif
-
-#ifndef NO_CFHTTPCookieStorageSetCookie
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageSetCookie)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFHTTPCookieStorageSetCookie)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- WebKit_win32_NATIVE_ENTER(env, that, CFHTTPCookieStorageSetCookie_FUNC);
- CFHTTPCookieStorageSetCookie((CFHTTPCookieStorageRef)arg0, (CFHTTPCookieRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, CFHTTPCookieStorageSetCookie_FUNC);
-}
-#endif
-
-#ifndef NO_CFRelease
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFRelease)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- WebKit_win32_NATIVE_ENTER(env, that, CFRelease_FUNC);
- CFRelease((CFTypeRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFRelease_FUNC);
-}
-#endif
-
-#ifndef NO_CFStringCreateWithCharacters
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFStringCreateWithCharacters)(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFStringCreateWithCharacters)
- (JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2)
-{
- jchar *lparg1=NULL;
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFStringCreateWithCharacters_FUNC);
- if (arg1) if ((lparg1 = env->GetCharArrayElements(arg1, NULL)) == NULL) goto fail;
- rc = (jint)CFStringCreateWithCharacters((CFAllocatorRef)arg0, (const UniChar *)lparg1, (CFIndex)arg2);
-fail:
- if (arg1 && lparg1) env->ReleaseCharArrayElements(arg1, lparg1, 0);
- WebKit_win32_NATIVE_EXIT(env, that, CFStringCreateWithCharacters_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFStringGetCharacterAtIndex
-extern "C" JNIEXPORT jchar JNICALL WebKit_win32_NATIVE(CFStringGetCharacterAtIndex)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
-JNIEXPORT jchar JNICALL WebKit_win32_NATIVE(CFStringGetCharacterAtIndex)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jchar rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFStringGetCharacterAtIndex_FUNC);
- rc = (jchar)CFStringGetCharacterAtIndex((CFStringRef)arg0, (CFIndex)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, CFStringGetCharacterAtIndex_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFStringGetCharactersPtr
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFStringGetCharactersPtr)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFStringGetCharactersPtr)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFStringGetCharactersPtr_FUNC);
- rc = (jintLong)CFStringGetCharactersPtr((CFStringRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFStringGetCharactersPtr_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFStringGetLength
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFStringGetLength)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(CFStringGetLength)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFStringGetLength_FUNC);
- rc = (jint)CFStringGetLength((CFStringRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFStringGetLength_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFURLCreateWithString
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFURLCreateWithString)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFURLCreateWithString)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFURLCreateWithString_FUNC);
- rc = (jintLong)CFURLCreateWithString((CFAllocatorRef)arg0, (CFStringRef)arg1, (CFURLRef)arg2);
- WebKit_win32_NATIVE_EXIT(env, that, CFURLCreateWithString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFURLRequestCopyHTTPRequestBody
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFURLRequestCopyHTTPRequestBody)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFURLRequestCopyHTTPRequestBody)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFURLRequestCopyHTTPRequestBody_FUNC);
- rc = (jintLong)CFURLRequestCopyHTTPRequestBody((CFURLRequestRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, CFURLRequestCopyHTTPRequestBody_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFURLRequestCreateMutableCopy
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFURLRequestCreateMutableCopy)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(CFURLRequestCreateMutableCopy)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, CFURLRequestCreateMutableCopy_FUNC);
- rc = (jintLong)CFURLRequestCreateMutableCopy((CFAllocatorRef)arg0, (CFURLRequestRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, CFURLRequestCreateMutableCopy_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_CFURLRequestSetHTTPRequestBody
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFURLRequestSetHTTPRequestBody)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFURLRequestSetHTTPRequestBody)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- WebKit_win32_NATIVE_ENTER(env, that, CFURLRequestSetHTTPRequestBody_FUNC);
- CFURLRequestSetHTTPRequestBody((CFMutableURLRequestRef)arg0, (CFDataRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, CFURLRequestSetHTTPRequestBody_FUNC);
-}
-#endif
-
-#ifndef NO_CFURLRequestSetURL
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFURLRequestSetURL)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(CFURLRequestSetURL)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- WebKit_win32_NATIVE_ENTER(env, that, CFURLRequestSetURL_FUNC);
- CFURLRequestSetURL((CFMutableURLRequestRef)arg0, (CFURLRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, CFURLRequestSetURL_FUNC);
-}
-#endif
-
-#ifndef NO_JSClassCreate
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSClassCreate)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSClassCreate)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSClassCreate_FUNC);
- rc = (jintLong)JSClassCreate((const JSClassDefinition*)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSClassCreate_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSClassDefinition_1sizeof
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSClassDefinition_1sizeof)(JNIEnv *env, jclass that);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSClassDefinition_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSClassDefinition_1sizeof_FUNC);
- rc = (jint)JSClassDefinition_sizeof();
- WebKit_win32_NATIVE_EXIT(env, that, JSClassDefinition_1sizeof_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSClassRetain
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSClassRetain)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSClassRetain)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSClassRetain_FUNC);
- rc = (jintLong)JSClassRetain((JSClassRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSClassRetain_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSContextGetGlobalObject
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSContextGetGlobalObject)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSContextGetGlobalObject)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSContextGetGlobalObject_FUNC);
- rc = (jintLong)JSContextGetGlobalObject((JSContextRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSContextGetGlobalObject_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSEvaluateScript
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSEvaluateScript)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSEvaluateScript)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5)
-{
- jintLong *lparg5=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSEvaluateScript_FUNC);
- if (arg5) if ((lparg5 = env->GetIntLongArrayElements(arg5, NULL)) == NULL) goto fail;
- rc = (jintLong)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5);
-fail:
- if (arg5 && lparg5) env->ReleaseIntLongArrayElements(arg5, lparg5, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSEvaluateScript_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSGlobalContextRetain
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSGlobalContextRetain)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSGlobalContextRetain)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSGlobalContextRetain_FUNC);
- rc = (jint)JSGlobalContextRetain((JSGlobalContextRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSGlobalContextRetain_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSObjectGetPrivate
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetPrivate)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetPrivate)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSObjectGetPrivate_FUNC);
- rc = (jintLong)JSObjectGetPrivate((JSObjectRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSObjectGetPrivate_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSObjectGetProperty
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetProperty)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLongArray arg3);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetProperty)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLongArray arg3)
-{
- jintLong *lparg3=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSObjectGetProperty_FUNC);
- if (arg3) if ((lparg3 = env->GetIntLongArrayElements(arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)JSObjectGetProperty((JSContextRef)arg0, (JSObjectRef)arg1, (JSStringRef)arg2, (JSValueRef*)lparg3);
-fail:
- if (arg3 && lparg3) env->ReleaseIntLongArrayElements(arg3, lparg3, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSObjectGetProperty_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSObjectGetPropertyAtIndex
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetPropertyAtIndex)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLongArray arg3);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetPropertyAtIndex)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLongArray arg3)
-{
- jintLong *lparg3=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSObjectGetPropertyAtIndex_FUNC);
- if (arg3) if ((lparg3 = env->GetIntLongArrayElements(arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)JSObjectGetPropertyAtIndex((JSContextRef)arg0, (JSObjectRef)arg1, (unsigned)arg2, (JSValueRef*)lparg3);
-fail:
- if (arg3 && lparg3) env->ReleaseIntLongArrayElements(arg3, lparg3, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSObjectGetPropertyAtIndex_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSObjectMake
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSObjectMake)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSObjectMake)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSObjectMake_FUNC);
- rc = (jint)JSObjectMake((JSContextRef)arg0, (JSClassRef)arg1, (void *)arg2);
- WebKit_win32_NATIVE_EXIT(env, that, JSObjectMake_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSObjectMakeArray
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectMakeArray)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jintLongArray arg3);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectMakeArray)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jintLongArray arg3)
-{
- jintLong *lparg2=NULL;
- jintLong *lparg3=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSObjectMakeArray_FUNC);
- if (arg2) if ((lparg2 = env->GetIntLongArrayElements(arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = env->GetIntLongArrayElements(arg3, NULL)) == NULL) goto fail;
- rc = (jintLong)JSObjectMakeArray((JSContextRef)arg0, (size_t)arg1, (const struct OpaqueJSValue * const*)lparg2, (JSValueRef*)lparg3);
-fail:
- if (arg3 && lparg3) env->ReleaseIntLongArrayElements(arg3, lparg3, 0);
- if (arg2 && lparg2) env->ReleaseIntLongArrayElements(arg2, lparg2, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSObjectMakeArray_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSObjectMakeFunctionWithCallback
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSObjectMakeFunctionWithCallback)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSObjectMakeFunctionWithCallback)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSObjectMakeFunctionWithCallback_FUNC);
- rc = (jint)JSObjectMakeFunctionWithCallback((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectCallAsFunctionCallback)arg2);
- WebKit_win32_NATIVE_EXIT(env, that, JSObjectMakeFunctionWithCallback_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSObjectSetProperty
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(JSObjectSetProperty)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLongArray arg5);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(JSObjectSetProperty)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLongArray arg5)
-{
- jintLong *lparg5=NULL;
- WebKit_win32_NATIVE_ENTER(env, that, JSObjectSetProperty_FUNC);
- if (arg5) if ((lparg5 = env->GetIntLongArrayElements(arg5, NULL)) == NULL) goto fail;
- JSObjectSetProperty((JSContextRef)arg0, (JSObjectRef)arg1, (JSStringRef)arg2, (JSValueRef)arg3, (JSPropertyAttributes)arg4, (JSValueRef *)lparg5);
-fail:
- if (arg5 && lparg5) env->ReleaseIntLongArrayElements(arg5, lparg5, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSObjectSetProperty_FUNC);
-}
-#endif
-
-#ifndef NO_JSStringCreateWithUTF8CString
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSStringCreateWithUTF8CString)(JNIEnv *env, jclass that, jbyteArray arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSStringCreateWithUTF8CString)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSStringCreateWithUTF8CString_FUNC);
- if (arg0) if ((lparg0 = env->GetByteArrayElements(arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)JSStringCreateWithUTF8CString((const char*)lparg0);
-fail:
- if (arg0 && lparg0) env->ReleaseByteArrayElements(arg0, lparg0, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSStringCreateWithUTF8CString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSStringGetLength
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSStringGetLength)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSStringGetLength)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSStringGetLength_FUNC);
- rc = (jint)JSStringGetLength((JSStringRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSStringGetLength_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSStringGetMaximumUTF8CStringSize
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSStringGetMaximumUTF8CStringSize)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSStringGetMaximumUTF8CStringSize)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSStringGetMaximumUTF8CStringSize_FUNC);
- rc = (jintLong)JSStringGetMaximumUTF8CStringSize((JSStringRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSStringGetMaximumUTF8CStringSize_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSStringGetUTF8CString
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSStringGetUTF8CString)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSStringGetUTF8CString)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2)
-{
- jbyte *lparg1=NULL;
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSStringGetUTF8CString_FUNC);
- if (arg1) if ((lparg1 = env->GetByteArrayElements(arg1, NULL)) == NULL) goto fail;
- rc = (jint)JSStringGetUTF8CString((JSStringRef)arg0, (char *)lparg1, (size_t)arg2);
-fail:
- if (arg1 && lparg1) env->ReleaseByteArrayElements(arg1, lparg1, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSStringGetUTF8CString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSStringIsEqualToUTF8CString
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSStringIsEqualToUTF8CString)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSStringIsEqualToUTF8CString)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSStringIsEqualToUTF8CString_FUNC);
- if (arg1) if ((lparg1 = env->GetByteArrayElements(arg1, NULL)) == NULL) goto fail;
- rc = (jint)JSStringIsEqualToUTF8CString((JSStringRef)arg0, (const char *)lparg1);
-fail:
- if (arg1 && lparg1) env->ReleaseByteArrayElements(arg1, lparg1, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSStringIsEqualToUTF8CString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSStringRelease
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(JSStringRelease)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(JSStringRelease)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- WebKit_win32_NATIVE_ENTER(env, that, JSStringRelease_FUNC);
- JSStringRelease((JSStringRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSStringRelease_FUNC);
-}
-#endif
-
-#ifndef NO_JSValueGetType
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSValueGetType)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSValueGetType)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueGetType_FUNC);
- rc = (jint)JSValueGetType((JSContextRef)arg0, (JSValueRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueGetType_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueIsObjectOfClass
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSValueIsObjectOfClass)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSValueIsObjectOfClass)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueIsObjectOfClass_FUNC);
- rc = (jint)JSValueIsObjectOfClass((JSContextRef)arg0, (JSValueRef)arg1, (JSClassRef)arg2);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueIsObjectOfClass_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueMakeBoolean
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeBoolean)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeBoolean)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueMakeBoolean_FUNC);
- rc = (jintLong)JSValueMakeBoolean((JSContextRef)arg0, (bool)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueMakeBoolean_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueMakeNull
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeNull)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeNull)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueMakeNull_FUNC);
- rc = (jintLong)JSValueMakeNull((JSContextRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueMakeNull_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueMakeNumber
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeNumber)(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeNumber)
- (JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueMakeNumber_FUNC);
- rc = (jintLong)JSValueMakeNumber((JSContextRef)arg0, (double)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueMakeNumber_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueMakeString
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeString)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeString)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueMakeString_FUNC);
- rc = (jintLong)JSValueMakeString((JSContextRef)arg0, (JSStringRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueMakeString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueMakeUndefined
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeUndefined)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeUndefined)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueMakeUndefined_FUNC);
- rc = (jintLong)JSValueMakeUndefined((JSContextRef)arg0);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueMakeUndefined_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueToNumber
-extern "C" JNIEXPORT jdouble JNICALL WebKit_win32_NATIVE(JSValueToNumber)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2);
-JNIEXPORT jdouble JNICALL WebKit_win32_NATIVE(JSValueToNumber)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
-{
- jintLong *lparg2=NULL;
- jdouble rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueToNumber_FUNC);
- if (arg2) if ((lparg2 = env->GetIntLongArrayElements(arg2, NULL)) == NULL) goto fail;
- rc = (jdouble)JSValueToNumber((JSContextRef)arg0, (JSValueRef)arg1, (JSValueRef*)lparg2);
-fail:
- if (arg2 && lparg2) env->ReleaseIntLongArrayElements(arg2, lparg2, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueToNumber_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_JSValueToStringCopy
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueToStringCopy)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueToStringCopy)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
-{
- jintLong *lparg2=NULL;
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueToStringCopy_FUNC);
- if (arg2) if ((lparg2 = env->GetIntLongArrayElements(arg2, NULL)) == NULL) goto fail;
- rc = (jintLong)JSValueToStringCopy((JSContextRef)arg0, (JSValueRef)arg1, (JSValueRef*)lparg2);
-fail:
- if (arg2 && lparg2) env->ReleaseIntLongArrayElements(arg2, lparg2, 0);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueToStringCopy_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_kCFCopyStringDictionaryKeyCallBacks
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(kCFCopyStringDictionaryKeyCallBacks)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(kCFCopyStringDictionaryKeyCallBacks)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, kCFCopyStringDictionaryKeyCallBacks_FUNC);
- rc = (jintLong)&kCFCopyStringDictionaryKeyCallBacks;
- WebKit_win32_NATIVE_EXIT(env, that, kCFCopyStringDictionaryKeyCallBacks_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_kCFTypeDictionaryValueCallBacks
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(kCFTypeDictionaryValueCallBacks)(JNIEnv *env, jclass that);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(kCFTypeDictionaryValueCallBacks)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, kCFTypeDictionaryValueCallBacks_FUNC);
- rc = (jintLong)&kCFTypeDictionaryValueCallBacks;
- WebKit_win32_NATIVE_EXIT(env, that, kCFTypeDictionaryValueCallBacks_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_memmove
-extern "C" JNIEXPORT void JNICALL WebKit_win32_NATIVE(memmove)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2);
-JNIEXPORT void JNICALL WebKit_win32_NATIVE(memmove)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-{
- JSClassDefinition _arg1, *lparg1=NULL;
- WebKit_win32_NATIVE_ENTER(env, that, memmove_FUNC);
- if (arg1) if ((lparg1 = getJSClassDefinitionFields(env, arg1, &_arg1)) == NULL) goto fail;
- memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
- WebKit_win32_NATIVE_EXIT(env, that, memmove_FUNC);
-}
-#endif
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.h
deleted file mode 100644
index 23fab0c2d6..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef INC_webkit_win32_H
-#define INC_webkit_win32_H
-
-#include <ole2.h>
-#include <JavaScriptCore/JSContextRef.h>
-#include <JavaScriptCore/JSObjectRef.h>
-#include <JavaScriptCore/JSStringRef.h>
-#include <CFNetwork/CFHTTPCookiesPriv.h>
-#include <CFNetwork/CFURLRequestPriv.h>
-#include <CoreFoundation/CoreFoundation.h>
-#include <WebKitCOMAPI.h>
-#include "webkit_win32_custom.h"
-
-#define WebKit_LOAD_FUNCTION LOAD_FUNCTION
-
-#endif /* INC_webkit_win32_H */
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp
deleted file mode 100644
index 2b9e17324e..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "swt.h"
-#include "webkit_win32.h"
-#include "webkit_win32_stats.h"
-
-#define WebKit_win32_NATIVE(func) Java_org_eclipse_swt_internal_webkit_WebKit_1win32_##func
-
-#ifndef NO_willPerformClientRedirectToURL_1CALLBACK
-static jintLong willPerformClientRedirectToURL_CALLBACK;
-static HRESULT CALLBACK willPerformClientRedirectToURL(void* ppVTable, jintLong webView, BSTR url, double delaySeconds, DATE fireDate, jintLong frame)
-{
- return ((HRESULT (CALLBACK *)(void*, jintLong, BSTR, double*, DATE*, jintLong))willPerformClientRedirectToURL_CALLBACK)(ppVTable, webView, url, &delaySeconds, &fireDate, frame);
-}
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(willPerformClientRedirectToURL_1CALLBACK) (JNIEnv *env, jclass that, jintLong func);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(willPerformClientRedirectToURL_1CALLBACK) (JNIEnv *env, jclass that, jintLong func)
-{
- willPerformClientRedirectToURL_CALLBACK = func;
- return (jintLong)willPerformClientRedirectToURL;
-}
-#endif
-
-#ifndef NO_JSObjectCallAsFunctionProc_1CALLBACK
-static jintLong JSObjectCallAsFunctionProc_CALLBACK;
-static JSValueRef JSObjectCallAsFunctionProc(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- return ((JSValueRef (CALLBACK *)(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*))JSObjectCallAsFunctionProc_CALLBACK)(ctx, function, thisObject, argumentCount, arguments, exception);
-}
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectCallAsFunctionProc_1CALLBACK) (JNIEnv *env, jclass that, jintLong func);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectCallAsFunctionProc_1CALLBACK) (JNIEnv *env, jclass that, jintLong func)
-{
- JSObjectCallAsFunctionProc_CALLBACK = func;
- return (jintLong)JSObjectCallAsFunctionProc;
-}
-#endif
-
-#ifndef NO_JSObjectGetPropertyProc_1CALLBACK
-static jintLong JSObjectGetPropertyProc_CALLBACK;
-static JSValueRef JSObjectGetPropertyProc(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
-{
- return ((JSValueRef (CALLBACK *)(JSContextRef, JSObjectRef, JSStringRef, JSValueRef*))JSObjectGetPropertyProc_CALLBACK)(ctx, object, propertyName, exception);
-}
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetPropertyProc_1CALLBACK) (JNIEnv *env, jclass that, jintLong func);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectGetPropertyProc_1CALLBACK) (JNIEnv *env, jclass that, jintLong func)
-{
- JSObjectGetPropertyProc_CALLBACK = func;
- return (jintLong)JSObjectGetPropertyProc;
-}
-#endif
-
-#ifndef NO_JSObjectHasPropertyProc_1CALLBACK
-static jintLong JSObjectHasPropertyProc_CALLBACK;
-static bool JSObjectHasPropertyProc(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName)
-{
- return ((bool (CALLBACK *)(JSContextRef, JSObjectRef, JSStringRef))JSObjectHasPropertyProc_CALLBACK)(ctx, object, propertyName);
-}
-extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectHasPropertyProc_1CALLBACK) (JNIEnv *env, jclass that, jintLong func);
-JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectHasPropertyProc_1CALLBACK) (JNIEnv *env, jclass that, jintLong func)
-{
- JSObjectHasPropertyProc_CALLBACK = func;
- return (jintLong)JSObjectHasPropertyProc;
-}
-#endif
-
-#ifndef NO_WebKitCreateInstance
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(WebKitCreateInstance)(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jbyteArray arg2, jintLongArray arg3);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(WebKitCreateInstance)
- (JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jbyteArray arg2, jintLongArray arg3)
-{
- jbyte *lparg0=NULL;
- jbyte *lparg2=NULL;
- jintLong *lparg3=NULL;
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, WebKitCreateInstance_FUNC);
- if (arg0) if ((lparg0 = env->GetByteArrayElements(arg0, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = env->GetByteArrayElements(arg2, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = env->GetIntLongArrayElements(arg3, NULL)) == NULL) goto fail;
-/*
- rc = (jint)WebKitCreateInstance(lparg0, arg1, lparg2, lparg3);
-*/
- {
- WebKit_LOAD_FUNCTION(fp, WebKitCreateInstance)
- if (fp) {
- rc = (jint)((jint (*)(jbyte *, jintLong, jbyte *, jintLong *))fp)(lparg0, arg1, lparg2, lparg3);
- }
- }
-fail:
- if (arg3 && lparg3) env->ReleaseIntLongArrayElements(arg3, lparg3, 0);
- if (arg2 && lparg2) env->ReleaseByteArrayElements(arg2, lparg2, 0);
- if (arg0 && lparg0) env->ReleaseByteArrayElements(arg0, lparg0, 0);
- WebKit_win32_NATIVE_EXIT(env, that, WebKitCreateInstance_FUNC);
- return rc;
-}
-#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp
deleted file mode 100644
index df95d5f09a..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2016 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
-/* DO NOT EDIT - your changes will be lost. */
-
-#include "swt.h"
-#include "webkit_win32_stats.h"
-
-#ifdef NATIVE_STATS
-
-char * WebKit_win32_nativeFunctionNames[] = {
- "CFArrayGetCount",
- "CFArrayGetValueAtIndex",
- "CFDataCreate",
- "CFDataGetBytePtr",
- "CFDataGetLength",
- "CFDictionaryCreate",
- "CFHTTPCookieCreateWithResponseHeaderFields",
- "CFHTTPCookieGetFlags",
- "CFHTTPCookieGetName",
- "CFHTTPCookieGetValue",
- "CFHTTPCookieStorageCopyCookies",
- "CFHTTPCookieStorageCopyCookiesForURL",
- "CFHTTPCookieStorageDeleteCookie",
- "CFHTTPCookieStorageSetCookie",
- "CFRelease",
- "CFStringCreateWithCharacters",
- "CFStringGetCharacterAtIndex",
- "CFStringGetCharactersPtr",
- "CFStringGetLength",
- "CFURLCreateWithString",
- "CFURLRequestCopyHTTPRequestBody",
- "CFURLRequestCreateMutableCopy",
- "CFURLRequestSetHTTPRequestBody",
- "CFURLRequestSetURL",
- "JSClassCreate",
- "JSClassDefinition_1sizeof",
- "JSClassRetain",
- "JSContextGetGlobalObject",
- "JSEvaluateScript",
- "JSGlobalContextRetain",
- "JSObjectCallAsFunctionProc_1CALLBACK",
- "JSObjectGetPrivate",
- "JSObjectGetProperty",
- "JSObjectGetPropertyAtIndex",
- "JSObjectGetPropertyProc_1CALLBACK",
- "JSObjectHasPropertyProc_1CALLBACK",
- "JSObjectMake",
- "JSObjectMakeArray",
- "JSObjectMakeFunctionWithCallback",
- "JSObjectSetProperty",
- "JSStringCreateWithUTF8CString",
- "JSStringGetLength",
- "JSStringGetMaximumUTF8CStringSize",
- "JSStringGetUTF8CString",
- "JSStringIsEqualToUTF8CString",
- "JSStringRelease",
- "JSValueGetType",
- "JSValueIsObjectOfClass",
- "JSValueMakeBoolean",
- "JSValueMakeNull",
- "JSValueMakeNumber",
- "JSValueMakeString",
- "JSValueMakeUndefined",
- "JSValueToNumber",
- "JSValueToStringCopy",
- "WebKitCreateInstance",
- "kCFCopyStringDictionaryKeyCallBacks",
- "kCFTypeDictionaryValueCallBacks",
- "memmove",
- "willPerformClientRedirectToURL_1CALLBACK",
-};
-#define NATIVE_FUNCTION_COUNT sizeof(WebKit_win32_nativeFunctionNames) / sizeof(char*)
-int WebKit_win32_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
-int WebKit_win32_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
-
-#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
-
-JNIEXPORT jint JNICALL STATS_NATIVE(WebKit_1win32_1GetFunctionCount)
- (JNIEnv *env, jclass that)
-{
- return WebKit_win32_nativeFunctionCount;
-}
-
-JNIEXPORT jstring JNICALL STATS_NATIVE(WebKit_1win32_1GetFunctionName)
- (JNIEnv *env, jclass that, jint index)
-{
- return env->NewStringUTF(WebKit_win32_nativeFunctionNames[index]);
-}
-
-JNIEXPORT jint JNICALL STATS_NATIVE(WebKit_1win32_1GetFunctionCallCount)
- (JNIEnv *env, jclass that, jint index)
-{
- return WebKit_win32_nativeFunctionCallCount[index];
-}
-
-#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h
deleted file mode 100644
index fedd66652b..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2016 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
-/* DO NOT EDIT - your changes will be lost. */
-
-#ifdef NATIVE_STATS
-extern int WebKit_win32_nativeFunctionCount;
-extern int WebKit_win32_nativeFunctionCallCount[];
-extern char* WebKit_win32_nativeFunctionNames[];
-#define WebKit_win32_NATIVE_ENTER(env, that, func) WebKit_win32_nativeFunctionCallCount[func]++;
-#define WebKit_win32_NATIVE_EXIT(env, that, func)
-#else
-#ifndef WebKit_win32_NATIVE_ENTER
-#define WebKit_win32_NATIVE_ENTER(env, that, func)
-#endif
-#ifndef WebKit_win32_NATIVE_EXIT
-#define WebKit_win32_NATIVE_EXIT(env, that, func)
-#endif
-#endif
-
-typedef enum {
- CFArrayGetCount_FUNC,
- CFArrayGetValueAtIndex_FUNC,
- CFDataCreate_FUNC,
- CFDataGetBytePtr_FUNC,
- CFDataGetLength_FUNC,
- CFDictionaryCreate_FUNC,
- CFHTTPCookieCreateWithResponseHeaderFields_FUNC,
- CFHTTPCookieGetFlags_FUNC,
- CFHTTPCookieGetName_FUNC,
- CFHTTPCookieGetValue_FUNC,
- CFHTTPCookieStorageCopyCookies_FUNC,
- CFHTTPCookieStorageCopyCookiesForURL_FUNC,
- CFHTTPCookieStorageDeleteCookie_FUNC,
- CFHTTPCookieStorageSetCookie_FUNC,
- CFRelease_FUNC,
- CFStringCreateWithCharacters_FUNC,
- CFStringGetCharacterAtIndex_FUNC,
- CFStringGetCharactersPtr_FUNC,
- CFStringGetLength_FUNC,
- CFURLCreateWithString_FUNC,
- CFURLRequestCopyHTTPRequestBody_FUNC,
- CFURLRequestCreateMutableCopy_FUNC,
- CFURLRequestSetHTTPRequestBody_FUNC,
- CFURLRequestSetURL_FUNC,
- JSClassCreate_FUNC,
- JSClassDefinition_1sizeof_FUNC,
- JSClassRetain_FUNC,
- JSContextGetGlobalObject_FUNC,
- JSEvaluateScript_FUNC,
- JSGlobalContextRetain_FUNC,
- JSObjectCallAsFunctionProc_1CALLBACK_FUNC,
- JSObjectGetPrivate_FUNC,
- JSObjectGetProperty_FUNC,
- JSObjectGetPropertyAtIndex_FUNC,
- JSObjectGetPropertyProc_1CALLBACK_FUNC,
- JSObjectHasPropertyProc_1CALLBACK_FUNC,
- JSObjectMake_FUNC,
- JSObjectMakeArray_FUNC,
- JSObjectMakeFunctionWithCallback_FUNC,
- JSObjectSetProperty_FUNC,
- JSStringCreateWithUTF8CString_FUNC,
- JSStringGetLength_FUNC,
- JSStringGetMaximumUTF8CStringSize_FUNC,
- JSStringGetUTF8CString_FUNC,
- JSStringIsEqualToUTF8CString_FUNC,
- JSStringRelease_FUNC,
- JSValueGetType_FUNC,
- JSValueIsObjectOfClass_FUNC,
- JSValueMakeBoolean_FUNC,
- JSValueMakeNull_FUNC,
- JSValueMakeNumber_FUNC,
- JSValueMakeString_FUNC,
- JSValueMakeUndefined_FUNC,
- JSValueToNumber_FUNC,
- JSValueToStringCopy_FUNC,
- WebKitCreateInstance_FUNC,
- kCFCopyStringDictionaryKeyCallBacks_FUNC,
- kCFTypeDictionaryValueCallBacks_FUNC,
- memmove_FUNC,
- willPerformClientRedirectToURL_1CALLBACK_FUNC,
-} WebKit_win32_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.cpp
deleted file mode 100644
index c0a9efea4c..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2016 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
-/* DO NOT EDIT - your changes will be lost. */
-
-#include "swt.h"
-#include "webkit_win32_structs.h"
-
-#ifndef NO_JSClassDefinition
-typedef struct JSClassDefinition_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID version, attributes, className, parentClass, staticValues, staticFunctions, initialize, finalize, hasProperty, getProperty, setProperty, deleteProperty, getPropertyNames, callAsFunction, callAsConstructor, hasInstance, convertToType;
-} JSClassDefinition_FID_CACHE;
-
-JSClassDefinition_FID_CACHE JSClassDefinitionFc;
-
-void cacheJSClassDefinitionFields(JNIEnv *env, jobject lpObject)
-{
- if (JSClassDefinitionFc.cached) return;
- JSClassDefinitionFc.clazz = env->GetObjectClass(lpObject);
- JSClassDefinitionFc.version = env->GetFieldID(JSClassDefinitionFc.clazz, "version", "I");
- JSClassDefinitionFc.attributes = env->GetFieldID(JSClassDefinitionFc.clazz, "attributes", "I");
- JSClassDefinitionFc.className = env->GetFieldID(JSClassDefinitionFc.clazz, "className", I_J);
- JSClassDefinitionFc.parentClass = env->GetFieldID(JSClassDefinitionFc.clazz, "parentClass", I_J);
- JSClassDefinitionFc.staticValues = env->GetFieldID(JSClassDefinitionFc.clazz, "staticValues", I_J);
- JSClassDefinitionFc.staticFunctions = env->GetFieldID(JSClassDefinitionFc.clazz, "staticFunctions", I_J);
- JSClassDefinitionFc.initialize = env->GetFieldID(JSClassDefinitionFc.clazz, "initialize", I_J);
- JSClassDefinitionFc.finalize = env->GetFieldID(JSClassDefinitionFc.clazz, "finalize", I_J);
- JSClassDefinitionFc.hasProperty = env->GetFieldID(JSClassDefinitionFc.clazz, "hasProperty", I_J);
- JSClassDefinitionFc.getProperty = env->GetFieldID(JSClassDefinitionFc.clazz, "getProperty", I_J);
- JSClassDefinitionFc.setProperty = env->GetFieldID(JSClassDefinitionFc.clazz, "setProperty", I_J);
- JSClassDefinitionFc.deleteProperty = env->GetFieldID(JSClassDefinitionFc.clazz, "deleteProperty", I_J);
- JSClassDefinitionFc.getPropertyNames = env->GetFieldID(JSClassDefinitionFc.clazz, "getPropertyNames", I_J);
- JSClassDefinitionFc.callAsFunction = env->GetFieldID(JSClassDefinitionFc.clazz, "callAsFunction", I_J);
- JSClassDefinitionFc.callAsConstructor = env->GetFieldID(JSClassDefinitionFc.clazz, "callAsConstructor", I_J);
- JSClassDefinitionFc.hasInstance = env->GetFieldID(JSClassDefinitionFc.clazz, "hasInstance", I_J);
- JSClassDefinitionFc.convertToType = env->GetFieldID(JSClassDefinitionFc.clazz, "convertToType", I_J);
- JSClassDefinitionFc.cached = 1;
-}
-
-JSClassDefinition *getJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct)
-{
- if (!JSClassDefinitionFc.cached) cacheJSClassDefinitionFields(env, lpObject);
- lpStruct->version = env->GetIntField(lpObject, JSClassDefinitionFc.version);
- lpStruct->attributes = (JSClassAttributes)env->GetIntField(lpObject, JSClassDefinitionFc.attributes);
- lpStruct->className = (const char*)env->GetIntLongField(lpObject, JSClassDefinitionFc.className);
- lpStruct->parentClass = (JSClassRef)env->GetIntLongField(lpObject, JSClassDefinitionFc.parentClass);
- lpStruct->staticValues = (const JSStaticValue*)env->GetIntLongField(lpObject, JSClassDefinitionFc.staticValues);
- lpStruct->staticFunctions = (const JSStaticFunction*)env->GetIntLongField(lpObject, JSClassDefinitionFc.staticFunctions);
- lpStruct->initialize = (JSObjectInitializeCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.initialize);
- lpStruct->finalize = (JSObjectFinalizeCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.finalize);
- lpStruct->hasProperty = (JSObjectHasPropertyCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.hasProperty);
- lpStruct->getProperty = (JSObjectGetPropertyCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.getProperty);
- lpStruct->setProperty = (JSObjectSetPropertyCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.setProperty);
- lpStruct->deleteProperty = (JSObjectDeletePropertyCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.deleteProperty);
- lpStruct->getPropertyNames = (JSObjectGetPropertyNamesCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.getPropertyNames);
- lpStruct->callAsFunction = (JSObjectCallAsFunctionCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.callAsFunction);
- lpStruct->callAsConstructor = (JSObjectCallAsConstructorCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.callAsConstructor);
- lpStruct->hasInstance = (JSObjectHasInstanceCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.hasInstance);
- lpStruct->convertToType = (JSObjectConvertToTypeCallback)env->GetIntLongField(lpObject, JSClassDefinitionFc.convertToType);
- return lpStruct;
-}
-
-void setJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct)
-{
- if (!JSClassDefinitionFc.cached) cacheJSClassDefinitionFields(env, lpObject);
- env->SetIntField(lpObject, JSClassDefinitionFc.version, (jint)lpStruct->version);
- env->SetIntField(lpObject, JSClassDefinitionFc.attributes, (jint)lpStruct->attributes);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.className, (jintLong)lpStruct->className);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.parentClass, (jintLong)lpStruct->parentClass);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.staticValues, (jintLong)lpStruct->staticValues);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.staticFunctions, (jintLong)lpStruct->staticFunctions);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.initialize, (jintLong)lpStruct->initialize);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.finalize, (jintLong)lpStruct->finalize);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.hasProperty, (jintLong)lpStruct->hasProperty);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.getProperty, (jintLong)lpStruct->getProperty);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.setProperty, (jintLong)lpStruct->setProperty);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.deleteProperty, (jintLong)lpStruct->deleteProperty);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.getPropertyNames, (jintLong)lpStruct->getPropertyNames);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.callAsFunction, (jintLong)lpStruct->callAsFunction);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.callAsConstructor, (jintLong)lpStruct->callAsConstructor);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.hasInstance, (jintLong)lpStruct->hasInstance);
- env->SetIntLongField(lpObject, JSClassDefinitionFc.convertToType, (jintLong)lpStruct->convertToType);
-}
-#endif
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.h
deleted file mode 100644
index 0bd04b0f9e..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_structs.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2016 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
-/* DO NOT EDIT - your changes will be lost. */
-
-#include "webkit_win32.h"
-
-#ifndef NO_JSClassDefinition
-void cacheJSClassDefinitionFields(JNIEnv *env, jobject lpObject);
-JSClassDefinition *getJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct);
-void setJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct);
-#define JSClassDefinition_sizeof() sizeof(JSClassDefinition)
-#else
-#define cacheJSClassDefinitionFields(a,b)
-#define getJSClassDefinitionFields(a,b,c) NULL
-#define setJSClassDefinitionFields(a,b,c)
-#define JSClassDefinition_sizeof() 0
-#endif
-
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
deleted file mode 100644
index e7799807bc..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.browser;
-
-
-import java.io.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.webkit.*;
-import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class WebDownloadDelegate {
- COMObject iWebDownloadDelegate;
-
- Browser browser;
- int refCount = 0;
- int status = -1;
- long size, totalSize;
- String url;
-
- static final int DOWNLOAD_FINISHED = 0;
- static final int DOWNLOAD_CANCELLED = 1;
- static final int DOWNLOAD_ERROR = 3;
-
-WebDownloadDelegate (Browser browser) {
- createCOMInterfaces ();
- this.browser = browser;
-}
-
-int AddRef () {
- refCount++;
- return refCount;
-}
-
-void createCOMInterfaces () {
- iWebDownloadDelegate = new COMObject (new int[] {2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 1, 1}) {
- @Override
- public long /*int*/ method0 (long /*int*/[] args) {return QueryInterface (args[0], args[1]);}
- @Override
- public long /*int*/ method1 (long /*int*/[] args) {return AddRef ();}
- @Override
- public long /*int*/ method2 (long /*int*/[] args) {return Release ();}
- @Override
- public long /*int*/ method3 (long /*int*/[] args) {return decideDestinationWithSuggestedFilename (args[0], args[1]);}
- @Override
- public long /*int*/ method4 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method5 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method6 (long /*int*/[] args) {return didFailWithError (args[0], args[1]);}
- @Override
- public long /*int*/ method7 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method8 (long /*int*/[] args) {return didReceiveDataOfLength (args[0], (int)/*64*/args[1]);}
- @Override
- public long /*int*/ method9 (long /*int*/[] args) {return didReceiveResponse (args[0], args[1]);}
- @Override
- public long /*int*/ method10 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method11 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method12 (long /*int*/[] args) {return willSendRequest (args[0], args[1], args[2], args[3]);}
- @Override
- public long /*int*/ method13 (long /*int*/[] args) {return didBegin (args[0]);}
- @Override
- public long /*int*/ method14 (long /*int*/[] args) {return didFinish (args[0]);}
- };
-}
-
-int decideDestinationWithSuggestedFilename (long /*int*/ download, long /*int*/ filename) {
- String name = WebKit.extractBSTR (filename);
- FileDialog dialog = new FileDialog (browser.getShell(), SWT.SAVE);
- dialog.setText (SWT.getMessage ("SWT_FileDownload")); //$NON-NLS-1$
- dialog.setFileName (name);
- dialog.setOverwrite (true);
- String path = dialog.open ();
- IWebDownload iwebdownload = new IWebDownload (download);
- iwebdownload.setDeletesFileUponFailure (0);
- if (path == null) {
- /*
- * Bug in WebKit. Failure to set a non-null destination on the IWebDownload results in
- * a crash, even when the download is being cancelled.
- */
- iwebdownload.setDestination (WebKit.createBSTR (""), 1); //$NON-NLS-1$
- iwebdownload.cancel();
- iwebdownload.Release();
- } else {
- File file = new File (path);
- if (file.exists ()) file.delete ();
- iwebdownload.setDestination (WebKit.createBSTR (path), 1);
- openDownloadWindow (iwebdownload, path);
- }
- return COM.S_OK;
-}
-
-int didBegin (long /*int*/ download) {
- new IWebDownload (download).AddRef ();
- status = -1;
- size = 0;
- totalSize = 0;
- url = null;
- return COM.S_OK;
-}
-
-int didFailWithError (long /*int*/ download, long /*int*/ error) {
- new IWebDownload (download).Release ();
- status = DOWNLOAD_ERROR;
- return COM.S_OK;
-}
-
-int didFinish (long /*int*/ download) {
- new IWebDownload (download).Release ();
- status = DOWNLOAD_FINISHED;
- return COM.S_OK;
-}
-
-int didReceiveDataOfLength (long /*int*/ download, int length) {
- size += length;
- return COM.S_OK;
-}
-
-int didReceiveResponse (long /*int*/ download, long /*int*/ response) {
- if (response != 0) {
- IWebURLResponse urlResponse = new IWebURLResponse (response);
- long[] size = new long[1];
- int hr = urlResponse.expectedContentLength (size);
- if (hr == COM.S_OK) totalSize = size[0];
- long /*int*/[] result = new long /*int*/[1];
- hr = urlResponse.URL (result);
- if (hr == COM.S_OK && result[0] != 0) {
- url = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- }
- }
- return COM.S_OK;
-}
-
-void disposeCOMInterfaces () {
- if (iWebDownloadDelegate != null) {
- iWebDownloadDelegate.dispose ();
- iWebDownloadDelegate = null;
- }
-}
-
-long /*int*/ getAddress () {
- return iWebDownloadDelegate.getAddress ();
-}
-
-void openDownloadWindow (final IWebDownload download, String name) {
- final Shell shell = new Shell ();
- shell.setText (Compatibility.getMessage ("SWT_FileDownload")); //$NON-NLS-1$
- GridLayout gridLayout = new GridLayout ();
- gridLayout.marginHeight = 15;
- gridLayout.marginWidth = 15;
- gridLayout.verticalSpacing = 20;
- shell.setLayout (gridLayout);
-
- Label nameLabel = new Label (shell, SWT.WRAP);
- nameLabel.setText (Compatibility.getMessage ("SWT_Download_Location", new Object[] {name, url})); //$NON-NLS-1$
- GridData data = new GridData ();
- Monitor monitor = browser.getMonitor ();
- int maxWidth = monitor.getBounds ().width / 2;
- int width = nameLabel.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- data.widthHint = Math.min (width, maxWidth);
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- nameLabel.setLayoutData (data);
-
- final Label statusLabel = new Label (shell, SWT.NONE);
- statusLabel.setText (Compatibility.getMessage ("SWT_Download_Started")); //$NON-NLS-1$
- data = new GridData (GridData.FILL_BOTH);
- statusLabel.setLayoutData (data);
-
- final Button cancel = new Button (shell, SWT.PUSH);
- cancel.setText (Compatibility.getMessage ("SWT_Cancel")); //$NON-NLS-1$
- data = new GridData ();
- data.horizontalAlignment = GridData.CENTER;
- cancel.setLayoutData (data);
- final Listener cancelListener = event -> {
- download.cancel ();
- status = DOWNLOAD_CANCELLED;
- download.Release ();
- };
- cancel.addListener (SWT.Selection, cancelListener);
-
- final Display display = browser.getDisplay ();
- final int INTERVAL = 500;
- display.timerExec (INTERVAL, new Runnable () {
- @Override
- public void run () {
- if (shell.isDisposed () || status == DOWNLOAD_FINISHED || status == DOWNLOAD_CANCELLED) {
- shell.dispose ();
- return;
- }
- if (status == DOWNLOAD_ERROR) {
- statusLabel.setText (Compatibility.getMessage ("SWT_Download_Error")); //$NON-NLS-1$
- cancel.removeListener (SWT.Selection, cancelListener);
- cancel.addListener (SWT.Selection, event -> shell.dispose ());
- return;
- }
- long current = size / 1024L;
- long total = totalSize / 1024L;
- String message = Compatibility.getMessage ("SWT_Download_Status", new Object[] {current, total}); //$NON-NLS-1$
- statusLabel.setText (message);
- display.timerExec (INTERVAL, this);
- }
- });
- shell.pack ();
- shell.open ();
-}
-
-int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) {
- if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
- GUID guid = new GUID ();
- COM.MoveMemory (guid, riid, GUID.sizeof);
-
- if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebDownloadDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebDownloadDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebDownloadDelegate)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebDownloadDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebDownloadDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
-
- OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
- return COM.E_NOINTERFACE;
-}
-
-int Release () {
- refCount--;
- if (refCount == 0) {
- disposeCOMInterfaces ();
- }
- return refCount;
-}
-
-int willSendRequest (long /*int*/ download, long /*int*/ request, long /*int*/ redirectResponse, long /*int*/ finalRequest) {
- IWebMutableURLRequest req = new IWebMutableURLRequest (request);
- req.AddRef ();
- OS.MoveMemory (finalRequest, new long /*int*/[] {request}, C.PTR_SIZEOF);
- return COM.S_OK;
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
deleted file mode 100644
index 26ac077c77..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
+++ /dev/null
@@ -1,760 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.browser;
-
-
-import java.net.*;
-import java.nio.charset.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.webkit.*;
-import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class WebFrameLoadDelegate {
- COMObject iWebFrameLoadDelegate;
- int refCount = 0;
-
- Browser browser;
- String html;
- String url;
-
- static final String OBJECTNAME_EXTERNAL = "external"; //$NON-NLS-1$
-
-WebFrameLoadDelegate (Browser browser) {
- createCOMInterfaces ();
- this.browser = browser;
-}
-
-void addEventHandlers (boolean top) {
- if (top) {
- StringBuffer buffer = new StringBuffer ("window.SWTkeyhandler = function SWTkeyhandler(e) {"); //$NON-NLS-1$
- buffer.append ("try {e.returnValue = HandleWebKitEvent(e.type, e.keyCode, e.charCode, e.altKey, e.ctrlKey, e.shiftKey, e.metaKey);} catch (e) {}};"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('keydown', SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('keypress', SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('keyup', SWTkeyhandler, true);"); //$NON-NLS-1$
- browser.execute (buffer.toString ());
-
- buffer = new StringBuffer ("window.SWTmousehandler = function SWTmousehandler(e) {"); //$NON-NLS-1$
- buffer.append ("try {e.returnValue = HandleWebKitEvent(e.type, e.screenX, e.screenY, e.detail, e.button + 1, e.altKey, e.ctrlKey, e.shiftKey, e.metaKey, e.relatedTarget != null);} catch (e) {}};"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mousedown', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mouseup', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mousemove', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mousewheel', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('dragstart', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mouseover', SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("document.addEventListener('mouseout', SWTmousehandler, true);"); //$NON-NLS-1$
-
- browser.execute (buffer.toString ());
- } else {
- StringBuffer buffer = new StringBuffer ("for (var i = 0; i < frames.length; i++) {"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('keydown', window.SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('keypress', window.SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('keyup', window.SWTkeyhandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mousedown', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mouseup', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mousemove', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mouseover', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mouseout', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('mousewheel', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ("frames[i].document.addEventListener('dragstart', window.SWTmousehandler, true);"); //$NON-NLS-1$
- buffer.append ('}');
- browser.execute (buffer.toString ());
- }
-}
-
-int AddRef () {
- refCount++;
- return refCount;
-}
-
-void createCOMInterfaces () {
- iWebFrameLoadDelegate = new COMObject (new int[] {2, 0, 0, 2, 2, 3, 2, 3, 3, 2, 3, 2, 5, 2, 2, 3, 4}) {
- @Override
- public long /*int*/ method0 (long /*int*/[] args) {return QueryInterface (args[0], args[1]);}
- @Override
- public long /*int*/ method1 (long /*int*/[] args) {return AddRef ();}
- @Override
- public long /*int*/ method2 (long /*int*/[] args) {return Release ();}
- @Override
- public long /*int*/ method3 (long /*int*/[] args) {return didStartProvisionalLoadForFrame (args[0], args[1]);}
- @Override
- public long /*int*/ method4 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method5 (long /*int*/[] args) {return didFailProvisionalLoadWithError (args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method6 (long /*int*/[] args) {return didCommitLoadForFrame (args[0], args[1]);}
- @Override
- public long /*int*/ method7 (long /*int*/[] args) {return didReceiveTitle (args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method8 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method9 (long /*int*/[] args) {return didFinishLoadForFrame (args[0], args[1]);}
- @Override
- public long /*int*/ method10 (long /*int*/[] args){return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method11 (long /*int*/[] args){return didChangeLocationWithinPageForFrame (args[0], args[1]);}
- @Override
- public long /*int*/ method12 (long /*int*/[] args){return COM.S_OK;}
- @Override
- public long /*int*/ method13 (long /*int*/[] args){return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method14 (long /*int*/[] args){return COM.S_OK;}
- @Override
- public long /*int*/ method15 (long /*int*/[] args){return COM.S_OK;}
- @Override
- public long /*int*/ method16 (long /*int*/[] args){return didClearWindowObject (args[0], args[1], args[2], args[3]);}
- };
-
- /* Callbacks that take double parameters require custom callbacks that instead pass pointers to the doubles. */
- long /*int*/ ppVtable = iWebFrameLoadDelegate.ppVtable;
- long /*int*/[] pVtable = new long /*int*/[1];
- OS.MoveMemory (pVtable, ppVtable, C.PTR_SIZEOF);
- long /*int*/[] funcs = new long /*int*/[17];
- OS.MoveMemory (funcs, pVtable[0], C.PTR_SIZEOF * funcs.length);
- funcs[12] = WebKit_win32.willPerformClientRedirectToURL_CALLBACK (funcs[12]);
- OS.MoveMemory (pVtable[0], funcs, C.PTR_SIZEOF * funcs.length);
-}
-
-int didChangeLocationWithinPageForFrame (long /*int*/ webView, long /*int*/ frame) {
- IWebFrame iwebframe = new IWebFrame (frame);
- long /*int*/[] result = new long /*int*/[1];
- int hr = iwebframe.dataSource (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebDataSource dataSource = new IWebDataSource (result[0]);
- result[0] = 0;
- hr = dataSource.request (result);
- dataSource.Release ();
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebURLRequest request = new IWebURLRequest (result[0]);
- result[0] = 0;
- hr = request.URL (result);
- request.Release ();
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- String url2 = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- if (url2.length() == 0) return COM.S_OK;
- /*
- * If the URI indicates that the page is being rendered from memory
- * (via setText()) then set it to about:blank to be consistent with IE.
- */
- if (url2.equals (WebKit.URI_FILEROOT)) {
- url2 = WebKit.ABOUT_BLANK;
- } else {
- int length = WebKit.URI_FILEROOT.length ();
- if (url2.startsWith (WebKit.URI_FILEROOT) && url2.charAt (length) == '#') {
- url2 = WebKit.ABOUT_BLANK + url2.substring (length);
- }
- }
- final Display display = browser.getDisplay ();
- result[0] = 0;
- IWebView iWebView = new IWebView (webView);
- hr = iWebView.mainFrame (result);
- boolean top = false;
- if (hr == COM.S_OK && result[0] != 0) {
- top = frame == result[0];
- new IWebFrame (result[0]).Release ();
- }
- if (top) {
- StatusTextEvent statusText = new StatusTextEvent (browser);
- statusText.display = display;
- statusText.widget = browser;
- statusText.text = url2;
- StatusTextListener[] statusTextListeners = browser.webBrowser.statusTextListeners;
- for (int i = 0; i < statusTextListeners.length; i++) {
- statusTextListeners[i].changed (statusText);
- }
- }
-
- LocationEvent location = new LocationEvent (browser);
- location.display = display;
- location.widget = browser;
- location.location = url2;
- location.top = top;
- LocationListener[] locationListeners = browser.webBrowser.locationListeners;
- for (int i = 0; i < locationListeners.length; i++) {
- locationListeners[i].changed (location);
- }
- return COM.S_OK;
-}
-
-int didClearWindowObject (long /*int*/ webView, long /*int*/ context, long /*int*/ windowScriptObject, long /*int*/ frame) {
- WebKit_win32.JSGlobalContextRetain (context);
- long /*int*/ globalObject = WebKit_win32.JSContextGetGlobalObject (context);
- long /*int*/ privateData = ((WebKit)browser.webBrowser).webViewData;
- long /*int*/ externalObject = WebKit_win32.JSObjectMake (context, WebKit.ExternalClass, privateData);
- byte[] bytes = (OBJECTNAME_EXTERNAL + '\0').getBytes (StandardCharsets.UTF_8);
- long /*int*/ name = WebKit_win32.JSStringCreateWithUTF8CString (bytes);
- WebKit_win32.JSObjectSetProperty (context, globalObject, name, externalObject, 0, null);
- WebKit_win32.JSStringRelease (name);
-
- for (BrowserFunction current : browser.webBrowser.functions.values()) {
- browser.execute (current.functionString);
- }
-
- IWebView iwebView = new IWebView (webView);
- long /*int*/[] mainFrame = new long /*int*/[1];
- iwebView.mainFrame (mainFrame);
- boolean top = mainFrame[0] == frame;
- new IWebFrame (mainFrame[0]).Release ();
- addEventHandlers (top);
- return COM.S_OK;
-}
-
-int didCommitLoadForFrame (long /*int*/ webview, long /*int*/ frame) {
- IWebFrame iWebFrame = new IWebFrame (frame);
- long /*int*/[] result = new long /*int*/[1];
- int hr = iWebFrame.dataSource (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebDataSource dataSource = new IWebDataSource (result[0]);
- result[0] = 0;
- hr = dataSource.request (result);
- dataSource.Release ();
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebMutableURLRequest request = new IWebMutableURLRequest (result[0]);
- result[0] = 0;
- hr = request.URL (result);
- request.Release ();
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- String url2 = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- if (url2.length () == 0) return COM.S_OK;
- /*
- * If the URI indicates that the page is being rendered from memory
- * (via setText()) then set it to about:blank to be consistent with IE.
- */
- if (url2.equals (WebKit.URI_FILEROOT)) {
- url2 = WebKit.ABOUT_BLANK;
- } else {
- int length = WebKit.URI_FILEROOT.length ();
- if (url2.startsWith (WebKit.URI_FILEROOT) && url2.charAt (length) == '#') {
- url2 = WebKit.ABOUT_BLANK + url2.substring (length);
- }
- }
- Display display = browser.getDisplay ();
- result[0] = 0;
- IWebView iwebView = new IWebView (webview);
- hr = iwebView.mainFrame (result);
- boolean top = false;
- if (hr == COM.S_OK && result[0] != 0) {
- top = frame == result[0];
- new IWebFrame (result[0]).Release ();
- }
- if (top) {
- /* reset resource status variables */
- this.url = url2;
-
- /*
- * Each invocation of setText() causes webView_didCommitLoadForFrame to be invoked
- * twice, once for the initial navigate to about:blank, and once for the auto-navigate
- * to about:blank that WebKit does when loadHTMLString is invoked. If this is the
- * first webView_didCommitLoadForFrame callback received for a setText() invocation
- * then do not send any events or re-install registered BrowserFunctions.
- */
- if (url2.startsWith (WebKit.ABOUT_BLANK) && html != null) return COM.S_OK;
-
- /* re-install registered functions */
- for (BrowserFunction function : browser.webBrowser.functions.values()) {
- browser.webBrowser.execute (function.functionString);
- }
-
- ProgressEvent progress = new ProgressEvent (browser);
- progress.display = display;
- progress.widget = browser;
- progress.current = 1;
- progress.total = WebKit.MAX_PROGRESS;
- ProgressListener[] progressListeners = browser.webBrowser.progressListeners;
- for (int i = 0; i < progressListeners.length; i++) {
- progressListeners[i].changed (progress);
- }
- if (browser.isDisposed ()) return COM.S_OK;
-
- StatusTextEvent statusText = new StatusTextEvent (browser);
- statusText.display = display;
- statusText.widget = browser;
- statusText.text = url2;
- StatusTextListener[] statusTextListeners = browser.webBrowser.statusTextListeners;
- for (int i = 0; i < statusTextListeners.length; i++) {
- statusTextListeners[i].changed (statusText);
- }
- if (browser.isDisposed ()) return COM.S_OK;
- }
- LocationEvent location = new LocationEvent (browser);
- location.display = display;
- location.widget = browser;
- location.location = url2;
- location.top = top;
- LocationListener[] locationListeners = browser.webBrowser.locationListeners;
- for (int i = 0; i < locationListeners.length; i++) {
- locationListeners[i].changed (location);
- }
- return COM.S_OK;
-}
-
-int didFailProvisionalLoadWithError (long /*int*/ webView, long /*int*/ error, long /*int*/ frame) {
- IWebError iweberror = new IWebError (error);
- int[] errorCode = new int[1];
- int hr = iweberror.code (errorCode);
- if (WebKit_win32.WebURLErrorBadURL < errorCode[0]) return COM.S_OK;
-
- String failingURLString = null;
- long /*int*/[] failingURL = new long /*int*/[1];
- hr = iweberror.failingURL (failingURL);
- if (hr == COM.S_OK && failingURL[0] != 0) {
- failingURLString = WebKit.extractBSTR (failingURL[0]);
- COM.SysFreeString (failingURL[0]);
- }
- if (failingURLString != null && WebKit_win32.WebURLErrorServerCertificateNotYetValid <= errorCode[0] && errorCode[0] <= WebKit_win32.WebURLErrorSecureConnectionFailed) {
- /* handle invalid certificate error */
- long /*int*/[] result = new long /*int*/[1];
- hr = iweberror.localizedDescription (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- String description = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
-
- result[0] = 0;
- hr = iweberror.QueryInterface (WebKit_win32.IID_IWebErrorPrivate, result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
-
- IWebErrorPrivate webErrorPrivate = new IWebErrorPrivate (result[0]);
- result[0] = 0;
- long /*int*/[] certificate = new long /*int*/[1];
- hr = webErrorPrivate.sslPeerCertificate (certificate);
- webErrorPrivate.Release ();
- if (hr != COM.S_OK || certificate[0] == 0) {
- return COM.S_OK;
- }
- if (showCertificateDialog (webView, failingURLString, description, certificate[0])) {
- IWebFrame iWebFrame = new IWebFrame (frame);
- hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebMutableURLRequest, 0, WebKit_win32.IID_IWebMutableURLRequest, result);
- if (hr != COM.S_OK || result[0] == 0) {
- certificate[0] = 0;
- return COM.S_OK;
- }
- IWebMutableURLRequest request = new IWebMutableURLRequest (result[0]);
- request.setURL (failingURL[0]);
- request.setAllowsAnyHTTPSCertificate ();
- iWebFrame.loadRequest (request.getAddress ());
- request.Release ();
- }
- certificate[0] = 0;
- return COM.S_OK;
- }
-
- /* handle other types of errors */
- long /*int*/[] result = new long /*int*/[1];
- hr = iweberror.localizedDescription (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- String description = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- if (!browser.isDisposed ()) {
- String message = failingURLString != null ? failingURLString + "\n\n" : ""; //$NON-NLS-1$ //$NON-NLS-2$
- message += Compatibility.getMessage ("SWT_Page_Load_Failed", new Object[] {description}); //$NON-NLS-1$
- MessageBox messageBox = new MessageBox (browser.getShell (), SWT.OK | SWT.ICON_ERROR);
- messageBox.setMessage (message);
- messageBox.open ();
- }
- return COM.S_OK;
-}
-
-int didFinishLoadForFrame (long /*int*/ webview, long /*int*/ frame) {
- IWebView iWebView = new IWebView (webview);
- long /*int*/[] iWebFrame = new long /*int*/[1];
- int hr = iWebView.mainFrame (iWebFrame);
- if (hr != COM.S_OK || iWebFrame[0] == 0) {
- return COM.S_OK;
- }
- boolean top = frame == iWebFrame[0];
- new IWebFrame (iWebFrame[0]).Release();
- if (!top) return COM.S_OK;
-
- /*
- * If html is not null then there is html from a previous setText() call
- * waiting to be set into the about:blank page once it has completed loading.
- */
- if (html != null) {
- if (getUrl ().startsWith (WebKit.ABOUT_BLANK)) {
- ((WebKit)browser.webBrowser).loadingText = true;
- long /*int*/ string = WebKit.createBSTR (html);
- long /*int*/ URLString;
- if (((WebKit)browser.webBrowser).untrustedText) {
- URLString = WebKit.createBSTR (WebKit.ABOUT_BLANK);
- } else {
- URLString = WebKit.createBSTR (WebKit.URI_FILEROOT);
- }
- IWebFrame mainFrame = new IWebFrame (frame);
- mainFrame.loadHTMLString (string, URLString);
- html = null;
- }
- }
-
- /*
- * The loadHTMLString() invocation above will trigger a second didFinishLoadForFrame
- * callback when it is completed. If text was just set into the browser then wait for this
- * second callback to come before sending the title or completed events.
- */
- if (!((WebKit)browser.webBrowser).loadingText) {
- if (browser.isDisposed ()) return COM.S_OK;
- /*
- * To be consistent with other platforms a title event should be fired when a
- * page has completed loading. A page with a <title> tag will do this
- * automatically when the didReceiveTitle callback is received. However a page
- * without a <title> tag will not do this by default, so fire the event
- * here with the page's url as the title.
- */
- Display display = browser.getDisplay ();
- IWebFrame mainFrame = new IWebFrame (frame);
- long /*int*/[] result = new long /*int*/[1];
- hr = mainFrame.dataSource (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebDataSource dataSource = new IWebDataSource (result[0]);
- result[0] = 0;
- hr = dataSource.pageTitle (result);
- dataSource.Release ();
- if (hr != COM.S_OK) {
- return COM.S_OK;
- }
- String title = null;
- if (result[0] != 0) {
- title = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- }
- if (title == null || title.length () == 0) { /* page has no title */
- TitleEvent newEvent = new TitleEvent (browser);
- newEvent.display = display;
- newEvent.widget = browser;
- newEvent.title = getUrl ();
- TitleListener[] titleListeners = browser.webBrowser.titleListeners;
- for (int i = 0; i < titleListeners.length; i++) {
- titleListeners[i].changed (newEvent);
- }
- if (browser.isDisposed ()) return COM.S_OK;
- }
-
- ProgressEvent progress = new ProgressEvent (browser);
- progress.display = display;
- progress.widget = browser;
- progress.current = WebKit.MAX_PROGRESS;
- progress.total = WebKit.MAX_PROGRESS;
- ProgressListener[] progressListeners = browser.webBrowser.progressListeners;
- for (int i = 0; i < progressListeners.length; i++) {
- progressListeners[i].completed (progress);
- }
- if (browser.isDisposed ()) return COM.S_OK;
- }
- ((WebKit)browser.webBrowser).loadingText = false;
- return COM.S_OK;
-}
-
-int didReceiveTitle (long /*int*/ webView, long /*int*/ title, long /*int*/ frame) {
- long /*int*/[] mainFrame = new long /*int*/[1];
- IWebView iWebView = new IWebView (webView);
- int hr = iWebView.mainFrame (mainFrame);
- if (hr != COM.S_OK || frame == 0) {
- return COM.S_OK;
- }
- if (frame == mainFrame[0]) {
- String newTitle = WebKit.extractBSTR (title);
- TitleEvent newEvent = new TitleEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- newEvent.title = newTitle;
- TitleListener[] titleListeners = browser.webBrowser.titleListeners;
- for (int i = 0; i < titleListeners.length; i++) {
- titleListeners[i].changed (newEvent);
- }
- }
- new IWebFrame (mainFrame[0]).Release ();
- return COM.S_OK;
-}
-
-int didStartProvisionalLoadForFrame (long /*int*/ webView, long /*int*/ frame) {
- return COM.S_OK;
-}
-
-void disposeCOMInterfaces () {
- if (iWebFrameLoadDelegate != null) {
- iWebFrameLoadDelegate.dispose ();
- iWebFrameLoadDelegate = null;
- }
-}
-
-long /*int*/ getAddress () {
- return iWebFrameLoadDelegate.getAddress ();
-}
-
-String getUrl () {
- /* WebKit auto-navigates to about:blank at startup */
- if (url == null || url.length () == 0) return WebKit.ABOUT_BLANK;
- return url;
-}
-
-int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) {
- if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
- GUID guid = new GUID ();
- COM.MoveMemory (guid, riid, GUID.sizeof);
-
- if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebFrameLoadDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebFrameLoadDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebFrameLoadDelegate)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebFrameLoadDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebFrameLoadDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
-
- OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
- return COM.E_NOINTERFACE;
-}
-
-int Release () {
- refCount--;
- if (refCount == 0) {
- disposeCOMInterfaces ();
- }
- return refCount;
-}
-
-boolean showCertificateDialog (long /*int*/ webView, final String failingUrlString, final String description, final long /*int*/ certificate) {
- Shell parent = browser.getShell ();
- final Shell shell = new Shell (parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
- shell.setText (Compatibility.getMessage ("SWT_InvalidCert_Title")); //$NON-NLS-1$
- shell.setLayout (new GridLayout ());
- Label label = new Label (shell, SWT.WRAP);
- String host = null;
- try {
- host = new URL (failingUrlString).getHost ();
- } catch (MalformedURLException e) {
- /* show the url instead */
- host = failingUrlString;
- }
- StringBuffer message = new StringBuffer ("\n"); //$NON-NLS-1$
- message.append (Compatibility.getMessage ("SWT_InvalidCert_Message", new String[] {host})); //$NON-NLS-1$
- message.append ("\n\n"); //$NON-NLS-1$
- message.append (Compatibility.getMessage (description));
- message.append ("\n"); //$NON-NLS-1$
- message.append (Compatibility.getMessage ("SWT_InvalidCert_Connect")); //$NON-NLS-1$
- message.append ("\n"); //$NON-NLS-1$
- label.setText(message.toString ());
-
- GridData data = new GridData ();
- Monitor monitor = browser.getMonitor ();
- int maxWidth = monitor.getBounds ().width * 2 / 3;
- int width = label.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- data.widthHint = Math.min (width, maxWidth);
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- label.setLayoutData (data);
-
- final boolean[] result = new boolean[1];
- final Button[] buttons = new Button[3];
- Listener listener = event -> {
- if (event.widget == buttons[2]) {
- showCertificate (shell, certificate);
- } else {
- result[0] = event.widget == buttons[0];
- shell.close();
- }
- };
-
- Composite composite = new Composite (shell, SWT.NONE);
- data = new GridData ();
- data.horizontalAlignment = GridData.END;
- composite.setLayoutData (data);
- composite.setLayout (new GridLayout (3, true));
- buttons[0] = new Button (composite, SWT.PUSH);
- buttons[0].setText (SWT.getMessage("SWT_Continue")); //$NON-NLS-1$
- buttons[0].setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- buttons[0].addListener (SWT.Selection, listener);
- buttons[1] = new Button (composite, SWT.PUSH);
- buttons[1].setText (SWT.getMessage("SWT_Cancel")); //$NON-NLS-1$
- buttons[1].setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- buttons[1].addListener (SWT.Selection, listener);
- buttons[2] = new Button (composite, SWT.PUSH);
- buttons[2].setText (SWT.getMessage("SWT_ViewCertificate")); //$NON-NLS-1$
- buttons[2].setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- buttons[2].addListener (SWT.Selection, listener);
-
- shell.setDefaultButton (buttons[0]);
- shell.pack ();
-
- Rectangle parentSize = parent.getBounds ();
- Rectangle shellSize = shell.getBounds ();
- int x = parent.getLocation ().x + (parentSize.width - shellSize.width) / 2;
- int y = parent.getLocation ().y + (parentSize.height - shellSize.height) / 2;
- shell.setLocation (x, y);
- shell.open ();
- Display display = browser.getDisplay ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- return result[0];
-}
-
-void showCertificate (Shell parent, long /*int*/ certificate) {
- CERT_CONTEXT context = new CERT_CONTEXT ();
- OS.MoveMemory (context, certificate, CERT_CONTEXT.sizeof);
- CERT_INFO info = new CERT_INFO ();
- OS.MoveMemory (info, context.pCertInfo, CERT_INFO.sizeof);
-
- int length = OS.CertNameToStr (OS.X509_ASN_ENCODING, info.Issuer, OS.CERT_SIMPLE_NAME_STR, null, 0);
- char [] buffer = new char [length];
- OS.CertNameToStr (OS.X509_ASN_ENCODING, info.Issuer, OS.CERT_SIMPLE_NAME_STR, buffer, length);
- String issuer = new String (buffer, 0, length - 1);
-
- length = OS.CertNameToStr (OS.X509_ASN_ENCODING, info.Subject, OS.CERT_SIMPLE_NAME_STR, null, 0);
- buffer = new char [length];
- OS.CertNameToStr (OS.X509_ASN_ENCODING, info.Subject, OS.CERT_SIMPLE_NAME_STR, buffer, length);
- String subject = new String (buffer, 0, length - 1);
-
- final String SEPARATOR_DATE = "/"; //$NON-NLS-1$
- final String SEPARATOR_TIME = ":"; //$NON-NLS-1$
- SYSTEMTIME systemTime = new SYSTEMTIME ();
- OS.FileTimeToSystemTime (info.NotBefore, systemTime);
- String validFrom = systemTime.wDay + SEPARATOR_DATE + systemTime.wMonth + SEPARATOR_DATE + systemTime.wYear;
- String validFromTime = systemTime.wHour + SEPARATOR_TIME + systemTime.wMinute + SEPARATOR_TIME + systemTime.wSecond;
-
- systemTime = new SYSTEMTIME ();
- OS.FileTimeToSystemTime (info.NotAfter, systemTime);
- String validTo = systemTime.wDay + SEPARATOR_DATE + systemTime.wMonth + SEPARATOR_DATE + systemTime.wYear;
- String validToTime = systemTime.wHour + SEPARATOR_TIME + systemTime.wMinute + SEPARATOR_TIME + systemTime.wSecond;
-
- length = info.SerialNumber.cbData;
- byte[] serialNumber = new byte[length];
- OS.MoveMemory (serialNumber, info.SerialNumber.pbData, length);
- String hexSerialNumber = new String ();
- for (int i = length - 1; i >= 0; i--) {
- int number = 0xFF & serialNumber[i];
- String hex = Integer.toHexString (number);
- if (hex.length () == 1) hexSerialNumber += "0"; //$NON-NLS-1$
- hexSerialNumber += hex + " "; //$NON-NLS-1$
- }
-
- final Shell dialog = new Shell (parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
- dialog.setText (SWT.getMessage ("SWT_Certificate")); //$NON-NLS-1$
- dialog.setLayout (new GridLayout (1, false));
-
- TabFolder tabFolder = new TabFolder (dialog, SWT.NONE);
- tabFolder.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true, 1, 1));
- tabFolder.setLayout (new FillLayout ());
-
- TabItem general = new TabItem (tabFolder, SWT.NONE);
- general.setText (SWT.getMessage ("SWT_General")); //$NON-NLS-1$
- Composite composite = new Composite (tabFolder, SWT.BORDER);
- composite.setLayout (new GridLayout (1, false));
- Label issuedTo = new Label (composite, SWT.NONE);
- issuedTo.setLayoutData (new GridData (SWT.BEGINNING, SWT.CENTER, false, false));
- issuedTo.setText (Compatibility.getMessage ("SWT_IssuedTo", new Object[] {subject})); //$NON-NLS-1$
- Label issuedBy = new Label (composite, SWT.NONE);
- issuedBy.setLayoutData (new GridData (SWT.BEGINNING, SWT.CENTER, false, false));
- issuedBy.setText (Compatibility.getMessage ("SWT_IssuedFrom", new Object[] {issuer})); //$NON-NLS-1$
- Label valid = new Label (composite, SWT.NONE);
- valid.setLayoutData (new GridData (SWT.BEGINNING, SWT.CENTER, false, false));
- valid.setText (Compatibility.getMessage ("SWT_ValidFromTo", new Object[] {validFrom, validTo})); //$NON-NLS-1$
- general.setControl (composite);
-
- TabItem details = new TabItem (tabFolder, SWT.NONE);
- details.setText (SWT.getMessage ("SWT_Details")); //$NON-NLS-1$
- Table table = new Table (tabFolder, SWT.SINGLE | SWT.BORDER| SWT.FULL_SELECTION);
- table.setHeaderVisible (true);
- TableColumn tableColumn = new TableColumn (table, SWT.LEAD);
- tableColumn.setText (SWT.getMessage ("SWT_Field")); //$NON-NLS-1$
- tableColumn = new TableColumn (table, SWT.NONE);
- tableColumn.setText (SWT.getMessage ("SWT_Value")); //$NON-NLS-1$
- TableItem tableItem = new TableItem(table, SWT.NONE);
- String version = "V" + String.valueOf (info.dwVersion + 1); //$NON-NLS-1$
- tableItem.setText (new String[]{SWT.getMessage ("SWT_Version"), version}); //$NON-NLS-1$
- tableItem = new TableItem (table, SWT.NONE);
- tableItem.setText (new String[] {SWT.getMessage ("SWT_SerialNumber"), hexSerialNumber}); //$NON-NLS-1$
- tableItem = new TableItem (table, SWT.NONE);
- tableItem.setText (new String[] {SWT.getMessage ("SWT_Issuer"), issuer}); //$NON-NLS-1$
-
- tableItem = new TableItem (table, SWT.NONE);
- StringBuffer stringBuffer2 = new StringBuffer ();
- stringBuffer2.append (validFrom);
- stringBuffer2.append (", "); //$NON-NLS-1$
- stringBuffer2.append (validFromTime);
- stringBuffer2.append (" GMT"); //$NON-NLS-1$
- tableItem.setText (new String[] {SWT.getMessage ("SWT_ValidFrom"), stringBuffer2.toString ()}); //$NON-NLS-1$
-
- tableItem = new TableItem (table, SWT.NONE);
- StringBuffer stringBuffer = new StringBuffer ();
- stringBuffer.append (validTo);
- stringBuffer.append (", "); //$NON-NLS-1$
- stringBuffer.append (validToTime);
- stringBuffer.append (" GMT"); //$NON-NLS-1$
- tableItem.setText (new String[] {SWT.getMessage ("SWT_ValidTo"), stringBuffer.toString ()}); //$NON-NLS-1$
-
- tableItem = new TableItem (table, SWT.NONE);
- tableItem.setText (new String[] {SWT.getMessage ("SWT_Subject"), subject}); //$NON-NLS-1$
- for (int i = 0; i < table.getColumnCount (); i++) {
- table.getColumn (i).pack ();
- }
- details.setControl (table);
-
- Button ok = new Button (dialog, SWT.PUSH);
- GridData layoutData = new GridData (SWT.END, SWT.CENTER, false, false);
- layoutData.widthHint = 75;
- ok.setLayoutData (layoutData);
- ok.setText (SWT.getMessage ("SWT_OK")); //$NON-NLS-1$
- ok.addSelectionListener (new SelectionAdapter() {
- @Override
- public void widgetSelected (SelectionEvent e) {
- dialog.dispose ();
- }
- });
-
- dialog.setDefaultButton (ok);
- dialog.pack ();
- Rectangle parentSize = parent.getBounds ();
- Rectangle dialogSize = dialog.getBounds ();
- int x = parent.getLocation ().x + (parentSize.width - dialogSize.width) / 2;
- int y = parent.getLocation ().y + (parentSize.height - dialogSize.height) / 2;
- dialog.setLocation (x, y);
- dialog.open ();
- Display display = browser.getDisplay ();
- while (!dialog.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
-
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
deleted file mode 100644
index 4220949516..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
+++ /dev/null
@@ -1,1310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.browser;
-
-
-import java.io.*;
-import java.net.*;
-import java.nio.charset.*;
-import java.util.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.webkit.*;
-import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.widgets.*;
-
-class WebKit extends WebBrowser {
- IWebView webView;
- long /*int*/ webViewWindowHandle, webViewData;
- int refCount = 0;
- int lastKeyCode, lastCharCode;
-
- WebDownloadDelegate webDownloadDelegate;
- WebFrameLoadDelegate webFrameLoadDelegate;
- WebPolicyDelegate webPolicyDelegate;
- WebResourceLoadDelegate webResourceLoadDelegate;
- WebUIDelegate webUIDelegate;
-
- boolean ignoreDispose;
- boolean loadingText = false;
- boolean traverseNext = true;
- boolean traverseOut = false;
- boolean untrustedText;
- String lastNavigateURL;
- BrowserFunction eventFunction;
-
- static int prefsIdentifier;
- static long /*int*/ ExternalClass;
- static boolean LibraryLoaded = false;
- static String LibraryLoadError;
- static Callback JSObjectHasPropertyProc;
- static Callback JSObjectGetPropertyProc;
- static Callback JSObjectCallAsFunctionProc;
- static final int MAX_PROGRESS = 100;
- static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
- static final String CLASSNAME_EXTERNAL = "External"; //$NON-NLS-1$
- static final String EMPTY_STRING = ""; //$NON-NLS-1$
- static final String FUNCTIONNAME_CALLJAVA = "callJava"; //$NON-NLS-1$
- static final String HEADER_SETCOOKIE = "Set-Cookie"; //$NON-NLS-1$
- static final String POST = "POST"; //$NON-NLS-1$
- static final String PROPERTY_LENGTH = "length"; //$NON-NLS-1$
- static final String PROTOCOL_HTTPS = "https://"; //$NON-NLS-1$
- static final String PROTOCOL_FILE = "file://"; //$NON-NLS-1$
- static final String PROTOCOL_HTTP = "http://"; //$NON-NLS-1$
- static final String USER_AGENT = "user-agent"; //$NON-NLS-1$
- static final String URI_FILEROOT = "file:///"; //$NON-NLS-1$
-
- /* event strings */
- static final String DOMEVENT_DRAGSTART = "dragstart"; //$NON-NLS-1$
- static final String DOMEVENT_KEYDOWN = "keydown"; //$NON-NLS-1$
- static final String DOMEVENT_KEYPRESS = "keypress"; //$NON-NLS-1$
- static final String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
- static final String DOMEVENT_MOUSEDOWN = "mousedown"; //$NON-NLS-1$
- static final String DOMEVENT_MOUSEUP = "mouseup"; //$NON-NLS-1$
- static final String DOMEVENT_MOUSEMOVE = "mousemove"; //$NON-NLS-1$
- static final String DOMEVENT_MOUSEOUT = "mouseout"; //$NON-NLS-1$
- static final String DOMEVENT_MOUSEOVER = "mouseover"; //$NON-NLS-1$
- static final String DOMEVENT_MOUSEWHEEL = "mousewheel"; //$NON-NLS-1$
-
-static {
- /*
- * Attempt to load the swt-webkit library. This will only succeed if the Apple
- * Application Support package is on the user's Windows Path environment variable.
- */
- try {
- Library.loadLibrary ("swt-webkit"); // $NON-NLS-1$
- LibraryLoaded = true;
- } catch (Throwable e) {
- }
-
- /*
- * If needed, add the Apple Application Support package's directory to the library
- * lookup path and try to load the swt-webkit library again.
- */
- if (!LibraryLoaded) {
- /*
- * Locate the Apple Application Support directory (if installed) and add its path to the library lookup path.
- *
- * As of Safari 5.1.4, the Apple Application Support directory is in the Safari installation directory,
- * which is pointed to by registry entry "HKEY_LOCAL_MACHINE\SOFTWARE\Apple Computer, Inc.\Safari".
- *
- * With earlier versions of Safari the Apple Application Support is installed in a stand-alone location, which
- * is pointed to by registry entry "HKEY_LOCAL_MACHINE\SOFTWARE\Apple Inc.\Apple Application Support\InstallDir".
- */
-
- String AASDirectory = readInstallDir ("SOFTWARE\\Apple Computer, Inc.\\Safari"); //$NON-NLS-1$
- if (AASDirectory != null) {
- AASDirectory += "\\Apple Application Support"; //$NON-NLS-1$
- if (!new File(AASDirectory).exists()) {
- AASDirectory = null;
- }
- }
-
- if (AASDirectory == null) {
- AASDirectory = readInstallDir ("SOFTWARE\\Apple Inc.\\Apple Application Support"); //$NON-NLS-1$
- }
-
- if (AASDirectory != null) {
- TCHAR buffer = new TCHAR (0, AASDirectory, true);
- boolean success = OS.SetDllDirectory (buffer); /* should succeed on XP+SP1 and newer */
- if (success) {
- try {
- Library.loadLibrary ("swt-webkit"); //$NON-NLS-1$
- LibraryLoaded = true;
- } catch (Throwable e) {
- LibraryLoadError = "Failed to load the swt-webkit library"; //$NON-NLS-1$
- if (Device.DEBUG) System.out.println ("Failed to load swt-webkit library. Apple Application Support directory path: " + AASDirectory); //$NON-NLS-1$
- }
- } else {
- LibraryLoadError = "Failed to add the Apple Application Support package to the library lookup path. "; //$NON-NLS-1$
- LibraryLoadError += "To use a SWT.WEBKIT-style Browser prepend " + AASDirectory + " to your Windows 'Path' environment variable and restart."; //$NON-NLS-1$ //$NON-NLS-2$
- }
- } else {
- LibraryLoadError = "Safari must be installed to use a SWT.WEBKIT-style Browser"; //$NON-NLS-1$
- }
- }
-
- if (LibraryLoaded) {
- JSObjectHasPropertyProc = new Callback (WebKit.class, "JSObjectHasPropertyProc", 3); //$NON-NLS-1$
- if (JSObjectHasPropertyProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- JSObjectGetPropertyProc = new Callback (WebKit.class, "JSObjectGetPropertyProc", 4); //$NON-NLS-1$
- if (JSObjectGetPropertyProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- JSObjectCallAsFunctionProc = new Callback (WebKit.class, "JSObjectCallAsFunctionProc", 6); //$NON-NLS-1$
- if (JSObjectCallAsFunctionProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- NativeClearSessions = () -> {
- long /*int*/[] result = new long /*int*/[1];
- int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebCookieManager, 0, WebKit_win32.IID_IWebCookieManager, result);
- if (hr != COM.S_OK || result[0] == 0) {
- return;
- }
- IWebCookieManager cookieManager = new IWebCookieManager (result[0]);
- long /*int*/[] storage = new long /*int*/[1];
- hr = cookieManager.cookieStorage (storage);
- cookieManager.Release ();
- if (hr != COM.S_OK || storage[0] == 0) {
- return;
- }
- long /*int*/ cookies = WebKit_win32.CFHTTPCookieStorageCopyCookies (storage[0]);
- if (cookies != 0) {
- int count = WebKit_win32.CFArrayGetCount (cookies);
- for (int i = 0; i < count; i++) {
- long /*int*/ cookie = WebKit_win32.CFArrayGetValueAtIndex (cookies, i);
- long /*int*/ flags = WebKit_win32.CFHTTPCookieGetFlags (cookie);
- if ((flags & WebKit_win32.CFHTTPCookieSessionOnlyFlag) != 0) {
- WebKit_win32.CFHTTPCookieStorageDeleteCookie (storage[0], cookie);
- }
- }
- WebKit_win32.CFRelease (cookies);
- }
- // WebKit_win32.CFRelease (storage[0]); //intentionally commented, causes crash
- };
-
- NativeGetCookie = () -> {
- long /*int*/[] result = new long /*int*/[1];
- int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebCookieManager, 0, WebKit_win32.IID_IWebCookieManager, result);
- if (hr != COM.S_OK || result[0] == 0) {
- return;
- }
- IWebCookieManager cookieManager = new IWebCookieManager (result[0]);
- long /*int*/[] storage = new long /*int*/[1];
- hr = cookieManager.cookieStorage (storage);
- cookieManager.Release ();
- if (hr != COM.S_OK || storage[0] == 0) {
- return;
- }
- char[] chars = CookieUrl.toCharArray ();
- long /*int*/ string = WebKit_win32.CFStringCreateWithCharacters (0, chars, chars.length);
- if (string != 0) {
- long /*int*/ cfUrl = WebKit_win32.CFURLCreateWithString (0, string, 0);
- if (cfUrl != 0) {
- boolean secure = CookieUrl.startsWith (PROTOCOL_HTTPS);
- long /*int*/ cookiesArray = WebKit_win32.CFHTTPCookieStorageCopyCookiesForURL (storage[0], cfUrl, secure);
- if (cookiesArray != 0) {
- int count = WebKit_win32.CFArrayGetCount (cookiesArray);
- for (int i = 0; i < count; i++) {
- long /*int*/ cookie = WebKit_win32.CFArrayGetValueAtIndex (cookiesArray, i);
- if (cookie != 0) {
- long /*int*/ cookieName = WebKit_win32.CFHTTPCookieGetName (cookie);
- if (cookieName != 0) {
- String name = stringFromCFString (cookieName);
- if (CookieName.equals (name)) {
- long /*int*/ value = WebKit_win32.CFHTTPCookieGetValue (cookie);
- if (value != 0) CookieValue = stringFromCFString (value);
- break;
- }
- }
- }
- }
- WebKit_win32.CFRelease (cookiesArray);
- }
- WebKit_win32.CFRelease (cfUrl);
- }
- WebKit_win32.CFRelease (string);
- }
- // WebKit_win32.CFRelease (storage[0]); //intentionally commented, causes crash
- };
-
- NativeSetCookie = () -> {
- long /*int*/[] result = new long /*int*/[1];
- int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebCookieManager, 0, WebKit_win32.IID_IWebCookieManager, result);
- if (hr != COM.S_OK || result[0] == 0) {
- return;
- }
- IWebCookieManager cookieManager = new IWebCookieManager (result[0]);
- long /*int*/[] storage = new long /*int*/[1];
- hr = cookieManager.cookieStorage (storage);
- cookieManager.Release ();
- if (hr != COM.S_OK || storage[0] == 0) {
- return;
- }
-
- char[] chars = CookieUrl.toCharArray ();
- long /*int*/ string = WebKit_win32.CFStringCreateWithCharacters (0, chars, chars.length);
- if (string != 0) {
- long /*int*/ cfUrl = WebKit_win32.CFURLCreateWithString (0, string, 0);
- if (cfUrl != 0) {
- chars = CookieValue.toCharArray ();
- long /*int*/ value = WebKit_win32.CFStringCreateWithCharacters (0, chars, chars.length);
- if (value != 0) {
- chars = HEADER_SETCOOKIE.toCharArray ();
- long /*int*/ key = WebKit_win32.CFStringCreateWithCharacters (0, chars, chars.length);
- if (key != 0) {
- long /*int*/ headers = WebKit_win32.CFDictionaryCreate (0, new long /*int*/[] {key}, new long /*int*/[] {value}, 1, WebKit_win32.kCFCopyStringDictionaryKeyCallBacks (), WebKit_win32.kCFTypeDictionaryValueCallBacks ());
- if (headers != 0) {
- long /*int*/ cookies = WebKit_win32.CFHTTPCookieCreateWithResponseHeaderFields (0, headers, cfUrl);
- if (cookies != 0) {
- long /*int*/ cookie = WebKit_win32.CFArrayGetValueAtIndex (cookies, 0);
- if (cookie != 0) {
- WebKit_win32.CFHTTPCookieStorageSetCookie (storage[0], cookie);
- CookieResult = true;
- }
- WebKit_win32.CFRelease (cookies);
- }
- WebKit_win32.CFRelease (headers);
- }
- WebKit_win32.CFRelease (key);
- }
- WebKit_win32.CFRelease (value);
- }
- WebKit_win32.CFRelease (cfUrl);
- }
- WebKit_win32.CFRelease (string);
- }
- // WebKit_win32.CFRelease (storage[0]); //intentionally commented, causes crash
- };
-
- if (NativePendingCookies != null) {
- SetPendingCookies (NativePendingCookies);
- }
- NativePendingCookies = null;
- }
-}
-
-static long /*int*/ createBSTR (String string) {
- char[] data = (string + '\0').toCharArray ();
- return COM.SysAllocString (data);
-}
-
-static String error (int code) {
- throw new SWTError ("WebKit error " + code); //$NON-NLS-1$
-}
-
-static String extractBSTR (long /*int*/ bstrString) {
- int size = COM.SysStringByteLen (bstrString);
- if (size == 0) return EMPTY_STRING;
- char[] buffer = new char[(size + 1) / 2]; // add one to avoid rounding errors
- OS.MoveMemory (buffer, bstrString, size);
- return new String (buffer);
-}
-
-static Browser findBrowser (long /*int*/ webView) {
- if (webView == 0) return null;
- IWebView iwebView = new IWebView (webView);
- long /*int*/[] result = new long /*int*/[1];
- int hr = iwebView.hostWindow (result);
- if (hr == COM.S_OK && result[0] != 0) {
- Widget widget = Display.getCurrent ().findWidget (result[0]);
- if (widget != null && widget instanceof Browser) return (Browser)widget;
- }
- return null;
-}
-
-static long /*int*/ JSObjectCallAsFunctionProc (long /*int*/ ctx, long /*int*/ function, long /*int*/ thisObject, long /*int*/ argumentCount, long /*int*/ arguments, long /*int*/ exception) {
- WebKit_win32.JSGlobalContextRetain (ctx);
- if (WebKit_win32.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) {
- return WebKit_win32.JSValueMakeUndefined (ctx);
- }
- long /*int*/ ptr = WebKit_win32.JSObjectGetPrivate (thisObject);
- long /*int*/[] handle = new long /*int*/[1];
- C.memmove (handle, ptr, C.PTR_SIZEOF);
- Browser browser = findBrowser (handle[0]);
- if (browser == null) return WebKit_win32.JSValueMakeUndefined (ctx);
- WebKit webkit = (WebKit)browser.webBrowser;
- return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception);
-}
-
-static long /*int*/ JSObjectGetPropertyProc (long /*int*/ ctx, long /*int*/ object, long /*int*/ propertyName, long /*int*/ exception) {
- byte[] bytes = (FUNCTIONNAME_CALLJAVA + '\0').getBytes (StandardCharsets.UTF_8);
- long /*int*/ name = WebKit_win32.JSStringCreateWithUTF8CString (bytes);
- long /*int*/ addr = WebKit_win32.JSObjectCallAsFunctionProc_CALLBACK (WebKit.JSObjectCallAsFunctionProc.getAddress ());
- long /*int*/ function = WebKit_win32.JSObjectMakeFunctionWithCallback (ctx, name, addr);
- WebKit_win32.JSStringRelease (name);
- return function;
-}
-
-static long /*int*/ JSObjectHasPropertyProc (long /*int*/ ctx, long /*int*/ object, long /*int*/ propertyName) {
- byte[] bytes = (FUNCTIONNAME_CALLJAVA + '\0').getBytes (StandardCharsets.UTF_8);
- return WebKit_win32.JSStringIsEqualToUTF8CString (propertyName, bytes);
-}
-
-static String readInstallDir (String keyString) {
- long /*int*/[] phkResult = new long /*int*/[1];
- TCHAR key = new TCHAR (0, keyString, true);
- if (OS.RegOpenKeyEx (OS.HKEY_LOCAL_MACHINE, key, 0, OS.KEY_READ, phkResult) == 0) {
- int[] lpcbData = new int[1];
- TCHAR buffer = new TCHAR (0, "InstallDir", true); //$NON-NLS-1$
- int result = OS.RegQueryValueEx (phkResult[0], buffer, 0, null, (TCHAR)null, lpcbData);
- if (result == 0) {
- TCHAR lpData = new TCHAR (0, lpcbData[0] / TCHAR.sizeof);
- result = OS.RegQueryValueEx (phkResult[0], buffer, 0, null, lpData, lpcbData);
- if (result == 0) {
- OS.RegCloseKey (phkResult[0]);
- return lpData.toString (0, lpData.strlen ());
- }
- }
- OS.RegCloseKey (phkResult[0]);
- }
- return null;
-}
-
-static String stringFromCFString (long /*int*/ cfString) {
- if (cfString == 0) return null;
- int length = WebKit_win32.CFStringGetLength (cfString);
- long /*int*/ ptr = WebKit_win32.CFStringGetCharactersPtr (cfString);
- char[] chars = new char[length];
- if (ptr != 0) {
- OS.MoveMemory (chars, ptr, length);
- } else {
- for (int j = 0; j < length; j++) {
- chars[j] = WebKit_win32.CFStringGetCharacterAtIndex (cfString, j);
- }
- }
- return new String (chars);
-}
-
-static String stringFromJSString (long /*int*/ jsString) {
- if (jsString == 0) return null;
- int length = WebKit_win32.JSStringGetLength (jsString);
- byte[] bytes = new byte[length + 1];
- WebKit_win32.JSStringGetUTF8CString (jsString, bytes, length + 1);
- return new String (bytes);
-}
-
-@Override
-public boolean back () {
- int[] result = new int[1];
- webView.goBack (result);
- return result[0] != 0;
-}
-
-long /*int*/ callJava (long /*int*/ ctx, long /*int*/ func, long /*int*/ thisObject, long /*int*/ argumentCount, long /*int*/ arguments, long /*int*/ exception) {
- Object returnValue = null;
- if (argumentCount == 3) {
- long /*int*/[] result = new long /*int*/[1];
- C.memmove (result, arguments, C.PTR_SIZEOF);
- int type = WebKit_win32.JSValueGetType (ctx, result[0]);
- if (type == WebKit_win32.kJSTypeNumber) {
- int index = ((Double)convertToJava (ctx, result[0])).intValue ();
- result[0] = 0;
- if (index > 0) {
- C.memmove (result, arguments + C.PTR_SIZEOF, C.PTR_SIZEOF);
- type = WebKit_win32.JSValueGetType (ctx, result[0]);
- if (type == WebKit_win32.kJSTypeString) {
- String token = (String)convertToJava (ctx, result[0]);
- BrowserFunction function = (BrowserFunction)functions.get (index);
- if (function != null && token.equals (function.token)) {
- try {
- C.memmove (result, arguments + 2 * C.PTR_SIZEOF, C.PTR_SIZEOF);
- Object temp = convertToJava (ctx, result[0]);
- if (temp instanceof Object[]) {
- Object[] args = (Object[])temp;
- try {
- returnValue = function.function (args);
- } catch (Exception e) {
- /* exception during function invocation */
- returnValue = WebBrowser.CreateErrorString (e.getLocalizedMessage ());
- }
- }
- } catch (IllegalArgumentException e) {
- /* invalid argument value type */
- if (function.isEvaluate) {
- /* notify the function so that a java exception can be thrown */
- function.function (new String[] {WebBrowser.CreateErrorString (new SWTException (SWT.ERROR_INVALID_RETURN_VALUE).getLocalizedMessage ())});
- }
- returnValue = WebBrowser.CreateErrorString (e.getLocalizedMessage ());
- }
- }
- }
- }
- }
- }
- return convertToJS (ctx, returnValue);
-}
-
-@Override
-public boolean close () {
- return shouldClose ();
-}
-
-Object convertToJava (long /*int*/ ctx, long /*int*/ value) {
- int type = WebKit_win32.JSValueGetType (ctx, value);
- switch (type) {
- case WebKit_win32.kJSTypeBoolean: {
- int result = (int)WebKit_win32.JSValueToNumber (ctx, value, null);
- return result != 0;
- }
- case WebKit_win32.kJSTypeNumber: {
- double result = WebKit_win32.JSValueToNumber (ctx, value, null);
- return result;
- }
- case WebKit_win32.kJSTypeString: {
- long /*int*/ string = WebKit_win32.JSValueToStringCopy (ctx, value, null);
- if (string == 0) return ""; //$NON-NLS-1$
- long /*int*/ length = WebKit_win32.JSStringGetMaximumUTF8CStringSize (string);
- byte[] bytes = new byte[(int)/*64*/length];
- length = WebKit_win32.JSStringGetUTF8CString (string, bytes, length);
- WebKit_win32.JSStringRelease (string);
- /* length-1 is needed below to exclude the terminator character */
- return new String (bytes, 0, (int)/*64*/length - 1, StandardCharsets.UTF_8);
- }
- case WebKit_win32.kJSTypeNull:
- // FALL THROUGH
- case WebKit_win32.kJSTypeUndefined: return null;
- case WebKit_win32.kJSTypeObject: {
- byte[] bytes = (PROPERTY_LENGTH + '\0').getBytes (StandardCharsets.UTF_8);
- long /*int*/ propertyName = WebKit_win32.JSStringCreateWithUTF8CString (bytes);
- long /*int*/ valuePtr = WebKit_win32.JSObjectGetProperty (ctx, value, propertyName, null);
- WebKit_win32.JSStringRelease (propertyName);
- type = WebKit_win32.JSValueGetType (ctx, valuePtr);
- if (type == WebKit_win32.kJSTypeNumber) {
- int length = (int)WebKit_win32.JSValueToNumber (ctx, valuePtr, null);
- Object[] result = new Object[length];
- for (int i = 0; i < length; i++) {
- long /*int*/ current = WebKit_win32.JSObjectGetPropertyAtIndex (ctx, value, i, null);
- if (current != 0) {
- result[i] = convertToJava (ctx, current);
- }
- }
- return result;
- }
- }
- }
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
- return null;
-}
-
-long /*int*/ convertToJS (long /*int*/ ctx, Object value) {
- if (value == null) {
- return WebKit_win32.JSValueMakeNull (ctx);
- }
- if (value instanceof String) {
- byte[] bytes = ((String)value + '\0').getBytes (StandardCharsets.UTF_8);
- long /*int*/ stringRef = WebKit_win32.JSStringCreateWithUTF8CString (bytes);
- long /*int*/ result = WebKit_win32.JSValueMakeString (ctx, stringRef);
- WebKit_win32.JSStringRelease (stringRef);
- return result;
- }
- if (value instanceof Boolean) {
- return WebKit_win32.JSValueMakeBoolean (ctx, ((Boolean)value).booleanValue () ? 1 : 0);
- }
- if (value instanceof Number) {
- return WebKit_win32.JSValueMakeNumber (ctx, ((Number)value).doubleValue ());
- }
- if (value instanceof Object[]) {
- Object[] arrayValue = (Object[]) value;
- int length = arrayValue.length;
- long /*int*/[] arguments = new long /*int*/[length];
- for (int i = 0; i < length; i++) {
- Object javaObject = arrayValue[i];
- long /*int*/ jsObject = convertToJS (ctx, javaObject);
- arguments[i] = jsObject;
- }
- return WebKit_win32.JSObjectMakeArray (ctx, length, arguments, null);
- }
- SWT.error (SWT.ERROR_INVALID_RETURN_VALUE);
- return 0;
-}
-
-@Override
-public void create (Composite parent, int style) {
- if (!LibraryLoaded) {
- browser.dispose ();
- SWT.error (SWT.ERROR_NO_HANDLES, null, LibraryLoadError == null ? null : " [" + LibraryLoadError + ']'); //$NON-NLS-1$
- }
-
- if (ExternalClass == 0) {
- JSClassDefinition jsClassDefinition = new JSClassDefinition ();
- byte[] bytes = (CLASSNAME_EXTERNAL + '\0').getBytes ();
- jsClassDefinition.className = C.malloc (bytes.length);
- C.memmove (jsClassDefinition.className, bytes, bytes.length);
-
- /* custom callbacks for hasProperty, getProperty and callAsFunction */
- long /*int*/ addr = WebKit_win32.JSObjectHasPropertyProc_CALLBACK (JSObjectHasPropertyProc.getAddress ());
- jsClassDefinition.hasProperty = addr;
- addr = WebKit_win32.JSObjectGetPropertyProc_CALLBACK (JSObjectGetPropertyProc.getAddress ());
- jsClassDefinition.getProperty = addr;
-
- long /*int*/ classDefinitionPtr = C.malloc (JSClassDefinition.sizeof);
- WebKit_win32.memmove (classDefinitionPtr, jsClassDefinition, JSClassDefinition.sizeof);
- ExternalClass = WebKit_win32.JSClassCreate (classDefinitionPtr);
- WebKit_win32.JSClassRetain (ExternalClass);
- }
-
- long /*int*/[] result = new long /*int*/[1];
- int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebView, 0, WebKit_win32.IID_IWebView, result);
- if (hr != COM.S_OK || result[0] == 0) {
- browser.dispose ();
- error (hr);
- }
- webView = new IWebView (result[0]);
- webViewData = C.malloc (C.PTR_SIZEOF);
- C.memmove (webViewData, new long /*int*/[] {webView.getAddress ()}, C.PTR_SIZEOF);
- hr = webView.setHostWindow (browser.handle);
- if (hr != COM.S_OK) {
- browser.dispose ();
- error (hr);
- }
- hr = webView.initWithFrame (new RECT (), 0, 0);
- if (hr != COM.S_OK) {
- browser.dispose ();
- error (hr);
- }
- result[0] = 0;
- hr = webView.QueryInterface (WebKit_win32.IID_IWebViewPrivate, result);
- if (hr != COM.S_OK || result[0] == 0) {
- browser.dispose ();
- error (hr);
- }
- IWebViewPrivate webViewPrivate = new IWebViewPrivate (result[0]);
- result[0] = 0;
- hr = webViewPrivate.viewWindow (result);
- if (hr != COM.S_OK || result[0] == 0) {
- browser.dispose ();
- error (hr);
- }
- webViewPrivate.Release ();
- webViewWindowHandle = result[0];
-
- webFrameLoadDelegate = new WebFrameLoadDelegate (browser);
- hr = webView.setFrameLoadDelegate (webFrameLoadDelegate.getAddress ());
- if (hr != COM.S_OK) {
- browser.dispose ();
- error (hr);
- }
- webUIDelegate = new WebUIDelegate (browser);
- hr = webView.setUIDelegate (webUIDelegate.getAddress ());
- if (hr != COM.S_OK) {
- browser.dispose ();
- error (hr);
- }
-
- webResourceLoadDelegate = new WebResourceLoadDelegate (browser);
- hr = webView.setResourceLoadDelegate (webResourceLoadDelegate.getAddress ());
- if (hr != COM.S_OK) {
- browser.dispose ();
- error (hr);
- }
-
- webDownloadDelegate = new WebDownloadDelegate (browser);
- hr = webView.setDownloadDelegate (webDownloadDelegate.getAddress ());
- if (hr != COM.S_OK) {
- browser.dispose ();
- error (hr);
- }
-
- webPolicyDelegate = new WebPolicyDelegate (browser);
- hr = webView.setPolicyDelegate (webPolicyDelegate.getAddress ());
- if (hr != COM.S_OK) {
- browser.dispose ();
- error (hr);
- }
-
- initializeWebViewPreferences ();
-
- Listener listener = e -> {
- switch (e.type) {
- case SWT.Dispose: {
- /* make this handler run after other dispose listeners */
- if (ignoreDispose) {
- ignoreDispose = false;
- break;
- }
- ignoreDispose = true;
- browser.notifyListeners (e.type, e);
- e.type = SWT.NONE;
- onDispose ();
- break;
- }
- case SWT.FocusIn: {
- OS.SetFocus (webViewWindowHandle);
- break;
- }
- case SWT.Resize: {
- Rectangle bounds = DPIUtil.autoScaleUp(browser.getClientArea ()); // To Pixels
- OS.SetWindowPos (webViewWindowHandle, 0, bounds.x, bounds.y, bounds.width, bounds.height, OS.SWP_DRAWFRAME);
- break;
- }
- case SWT.Traverse: {
- if (traverseOut) {
- e.doit = true;
- traverseOut = false;
- } else {
- e.doit = false;
- }
- break;
- }
- }
- };
- browser.addListener (SWT.Dispose, listener);
- browser.addListener (SWT.KeyDown, listener); /* needed for tabbing into the Browser */
- browser.addListener (SWT.FocusIn, listener);
- browser.addListener (SWT.Resize, listener);
- browser.addListener (SWT.Traverse, listener);
-
- eventFunction = new BrowserFunction (browser, "HandleWebKitEvent") { //$NON-NLS-1$
- @Override
- public Object function (Object[] arguments) {
- return handleEvent (arguments) ? Boolean.TRUE : Boolean.FALSE;
- };
- };
-}
-
-@Override
-public boolean execute (String script) {
- long /*int*/[] result = new long /*int*/[1];
- int hr = webView.mainFrame (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return false;
- }
- IWebFrame frame = new IWebFrame (result[0]);
- long /*int*/ context = frame.globalContext ();
- frame.Release ();
- if (context == 0) {
- return false;
- }
- byte[] bytes = (script + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
- long /*int*/ scriptString = WebKit_win32.JSStringCreateWithUTF8CString (bytes);
- if (scriptString == 0) return false;
- bytes = (getUrl () + '\0').getBytes (StandardCharsets.UTF_8); //$NON-NLS-1$
- long /*int*/ urlString = WebKit_win32.JSStringCreateWithUTF8CString (bytes);
- if (urlString == 0) {
- WebKit_win32.JSStringRelease (scriptString);
- return false;
- }
- long /*int*/ evalResult = WebKit_win32.JSEvaluateScript (context, scriptString, 0, urlString, 0, null);
- WebKit_win32.JSStringRelease (urlString);
- WebKit_win32.JSStringRelease (scriptString);
- return evalResult != 0;
-}
-
-@Override
-public boolean forward () {
- int[] result = new int[1];
- webView.goForward (result);
- return result[0] != 0;
-}
-
-@Override
-public String getBrowserType () {
- return "webkit"; //$NON-NLS-1$
-}
-
-@Override
-public String getText () {
- long /*int*/[] result = new long /*int*/[1];
- int hr = webView.mainFrame (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return EMPTY_STRING;
- }
- IWebFrame mainFrame = new IWebFrame (result[0]);
- result[0] = 0;
- hr = mainFrame.dataSource (result);
- mainFrame.Release ();
- if (hr != COM.S_OK || result[0] == 0) {
- return EMPTY_STRING;
- }
- IWebDataSource dataSource = new IWebDataSource (result[0]);
- result[0] = 0;
- hr = dataSource.representation (result);
- dataSource.Release ();
- if (hr != COM.S_OK || result[0] == 0) {
- return EMPTY_STRING;
- }
- IWebDocumentRepresentation representation = new IWebDocumentRepresentation (result[0]);
- result[0] = 0;
- hr = representation.documentSource (result);
- representation.Release ();
- if (hr != COM.S_OK || result[0] == 0) {
- return EMPTY_STRING;
- }
- String source = extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- return source;
-}
-
-@Override
-public String getUrl () {
- return webFrameLoadDelegate.getUrl ();
-}
-
-boolean handleEvent (Object[] arguments) {
-
- /*
- * DOM events are currently received by hooking DOM listeners
- * in javascript that invoke this method via a BrowserFunction.
- * Document.addListener is not implemented on WebKit on windows.
- * The argument lists received here are:
- *
- * For key events:
- * argument 0: type (String)
- * argument 1: keyCode (Double)
- * argument 2: charCode (Double)
- * argument 3: altKey (Boolean)
- * argument 4: ctrlKey (Boolean)
- * argument 5: shiftKey (Boolean)
- * argument 6: metaKey (Boolean)
- * returns doit
- *
- * For mouse events
- * argument 0: type (String)
- * argument 1: screenX (Double)
- * argument 2: screenY (Double)
- * argument 3: detail (Double)
- * argument 4: button (Double)
- * argument 5: altKey (Boolean)
- * argument 6: ctrlKey (Boolean)
- * argument 7: shiftKey (Boolean)
- * argument 8: metaKey (Boolean)
- * argument 9: hasRelatedTarget (Boolean)
- * returns doit
- */
-
- String type = (String)arguments[0];
- if (type.equals (DOMEVENT_KEYDOWN)) {
- int keyCode = translateKey (((Double)arguments[1]).intValue ());
- lastKeyCode = keyCode;
- switch (keyCode) {
- case SWT.SHIFT:
- case SWT.CONTROL:
- case SWT.ALT:
- case SWT.CAPS_LOCK:
- case SWT.NUM_LOCK:
- case SWT.SCROLL_LOCK:
- case SWT.COMMAND:
-// case SWT.ESC:
- case SWT.TAB:
- case SWT.PAUSE:
-// case SWT.BS:
- case SWT.INSERT:
- case SWT.DEL:
- case SWT.HOME:
- case SWT.END:
- case SWT.PAGE_UP:
- case SWT.PAGE_DOWN:
- case SWT.ARROW_DOWN:
- case SWT.ARROW_UP:
- case SWT.ARROW_LEFT:
- case SWT.ARROW_RIGHT:
- case SWT.F1:
- case SWT.F2:
- case SWT.F3:
- case SWT.F4:
- case SWT.F5:
- case SWT.F6:
- case SWT.F7:
- case SWT.F8:
- case SWT.F9:
- case SWT.F10:
- case SWT.F11:
- case SWT.F12: {
- /* keypress events will not be received for these keys, so send KeyDowns for them now */
-
- Event keyEvent = new Event ();
- keyEvent.widget = browser;
- keyEvent.type = type.equals (DOMEVENT_KEYDOWN) ? SWT.KeyDown : SWT.KeyUp;
- keyEvent.keyCode = keyCode;
- switch (keyCode) {
- case SWT.BS: keyEvent.character = SWT.BS; break;
- case SWT.DEL: keyEvent.character = SWT.DEL; break;
- case SWT.ESC: keyEvent.character = SWT.ESC; break;
- case SWT.TAB: keyEvent.character = SWT.TAB; break;
- }
- lastCharCode = keyEvent.character;
- keyEvent.stateMask =
- (((Boolean)arguments[3]).booleanValue () ? SWT.ALT : 0) |
- (((Boolean)arguments[4]).booleanValue () ? SWT.CTRL : 0) |
- (((Boolean)arguments[5]).booleanValue () ? SWT.SHIFT : 0) |
- (((Boolean)arguments[6]).booleanValue () ? SWT.COMMAND : 0);
- keyEvent.stateMask &= ~keyCode; /* remove current keydown if it's a state key */
- if (!sendKeyEvent (keyEvent) || browser.isDisposed ()) return false;
- break;
- }
- }
- return true;
- }
-
- if (type.equals (DOMEVENT_KEYPRESS)) {
- /*
- * if keydown could not determine a keycode for this key then it's a
- * key for which key events are not sent (eg.- the Windows key)
- */
- if (lastKeyCode == 0) return true;
-
- lastCharCode = ((Double)arguments[2]).intValue ();
- if (((Boolean)arguments[4]).booleanValue () && (0 <= lastCharCode && lastCharCode <= 0x7F)) {
- if ('a' <= lastCharCode && lastCharCode <= 'z') lastCharCode -= 'a' - 'A';
- if (64 <= lastCharCode && lastCharCode <= 95) lastCharCode -= 64;
- }
-
- Event keyEvent = new Event ();
- keyEvent.widget = browser;
- keyEvent.type = SWT.KeyDown;
- keyEvent.keyCode = lastKeyCode;
- keyEvent.character = (char)lastCharCode;
- keyEvent.stateMask =
- (((Boolean)arguments[3]).booleanValue () ? SWT.ALT : 0) |
- (((Boolean)arguments[4]).booleanValue () ? SWT.CTRL : 0) |
- (((Boolean)arguments[5]).booleanValue () ? SWT.SHIFT : 0) |
- (((Boolean)arguments[6]).booleanValue () ? SWT.COMMAND : 0);
- return sendKeyEvent (keyEvent) && !browser.isDisposed ();
- }
-
- if (type.equals (DOMEVENT_KEYUP)) {
- int keyCode = translateKey (((Double)arguments[1]).intValue ());
- if (keyCode == 0) {
- /* indicates a key for which key events are not sent */
- return true;
- }
- if (keyCode != lastKeyCode) {
- /* keyup does not correspond to the last keydown */
- lastKeyCode = keyCode;
- lastCharCode = 0;
- }
-
- Event keyEvent = new Event ();
- keyEvent.widget = browser;
- keyEvent.type = SWT.KeyUp;
- keyEvent.keyCode = lastKeyCode;
- keyEvent.character = (char)lastCharCode;
- keyEvent.stateMask =
- (((Boolean)arguments[3]).booleanValue () ? SWT.ALT : 0) |
- (((Boolean)arguments[4]).booleanValue () ? SWT.CTRL : 0) |
- (((Boolean)arguments[5]).booleanValue () ? SWT.SHIFT : 0) |
- (((Boolean)arguments[6]).booleanValue () ? SWT.COMMAND : 0);
- switch (lastKeyCode) {
- case SWT.SHIFT:
- case SWT.CONTROL:
- case SWT.ALT:
- case SWT.COMMAND: {
- keyEvent.stateMask |= lastKeyCode;
- }
- }
- browser.notifyListeners (keyEvent.type, keyEvent);
- lastKeyCode = lastCharCode = 0;
- return keyEvent.doit && !browser.isDisposed ();
- }
-
- /* mouse events */
-
- /*
- * MouseOver and MouseOut events are fired any time the mouse enters or exits
- * any element within the Browser. To ensure that SWT events are only
- * fired for mouse movements into or out of the Browser, do not fire an
- * event if there is a related target element.
- */
- if (type.equals (DOMEVENT_MOUSEOVER) || type.equals (DOMEVENT_MOUSEOUT)) {
- if (((Boolean)arguments[9]).booleanValue ()) return true;
- }
-
- /*
- * The position of mouse events is received in screen-relative coordinates
- * in order to handle pages with frames, since frames express their event
- * coordinates relative to themselves rather than relative to their top-
- * level page. Convert screen-relative coordinates to be browser-relative.
- */
- Point position = new Point (((Double)arguments[1]).intValue (), ((Double)arguments[2]).intValue ());// Points or Pixles ?
- position = browser.getDisplay ().map (null, browser, position);
-
- Event mouseEvent = new Event ();
- mouseEvent.widget = browser;
- mouseEvent.x = position.x;
- mouseEvent.y = position.y;
- int mask =
- (((Boolean)arguments[5]).booleanValue () ? SWT.ALT : 0) |
- (((Boolean)arguments[6]).booleanValue () ? SWT.CTRL : 0) |
- (((Boolean)arguments[7]).booleanValue () ? SWT.SHIFT : 0);
- mouseEvent.stateMask = mask;
-
- if (type.equals (DOMEVENT_MOUSEDOWN)) {
- mouseEvent.type = SWT.MouseDown;
- mouseEvent.count = ((Double)arguments[3]).intValue ();
- mouseEvent.button = ((Double)arguments[4]).intValue ();
- browser.notifyListeners (mouseEvent.type, mouseEvent);
- if (browser.isDisposed ()) return true;
- if (((Double)arguments[3]).intValue () == 2) {
- mouseEvent = new Event ();
- mouseEvent.type = SWT.MouseDoubleClick;
- mouseEvent.widget = browser;
- mouseEvent.x = position.x;
- mouseEvent.y = position.y;
- mouseEvent.stateMask = mask;
- mouseEvent.count = ((Double)arguments[3]).intValue ();
- mouseEvent.button = ((Double)arguments[4]).intValue ();
- browser.notifyListeners (mouseEvent.type, mouseEvent);
- }
- return true;
- }
-
- if (type.equals (DOMEVENT_MOUSEUP)) {
- mouseEvent.type = SWT.MouseUp;
- mouseEvent.count = ((Double)arguments[3]).intValue ();
- mouseEvent.button = ((Double)arguments[4]).intValue ();
- switch (mouseEvent.button) {
- case 1: mouseEvent.stateMask |= SWT.BUTTON1; break;
- case 2: mouseEvent.stateMask |= SWT.BUTTON2; break;
- case 3: mouseEvent.stateMask |= SWT.BUTTON3; break;
- case 4: mouseEvent.stateMask |= SWT.BUTTON4; break;
- case 5: mouseEvent.stateMask |= SWT.BUTTON5; break;
- }
- } else if (type.equals (DOMEVENT_MOUSEMOVE)) {
- mouseEvent.type = SWT.MouseMove;
- } else if (type.equals (DOMEVENT_MOUSEWHEEL)) {
- mouseEvent.type = SWT.MouseWheel;
- mouseEvent.count = ((Double)arguments[3]).intValue ();
- } else if (type.equals (DOMEVENT_MOUSEOVER)) {
- mouseEvent.type = SWT.MouseEnter;
- } else if (type.equals (DOMEVENT_MOUSEOUT)) {
- mouseEvent.type = SWT.MouseExit;
- if (mouseEvent.x < 0) mouseEvent.x = -1;
- if (mouseEvent.y < 0) mouseEvent.y = -1;
- } else if (type.equals (DOMEVENT_DRAGSTART)) {
- mouseEvent.type = SWT.DragDetect;
- mouseEvent.button = ((Double)arguments[4]).intValue () + 1;
- switch (mouseEvent.button) {
- case 1: mouseEvent.stateMask |= SWT.BUTTON1; break;
- case 2: mouseEvent.stateMask |= SWT.BUTTON2; break;
- case 3: mouseEvent.stateMask |= SWT.BUTTON3; break;
- case 4: mouseEvent.stateMask |= SWT.BUTTON4; break;
- case 5: mouseEvent.stateMask |= SWT.BUTTON5; break;
- }
- }
-
- browser.notifyListeners (mouseEvent.type, mouseEvent);
- return true;
-}
-
-@Override
-public boolean isBackEnabled () {
- long /*int*/[] address = new long /*int*/[1];
- int hr = webView.QueryInterface (WebKit_win32.IID_IWebIBActions, address);
- if (hr != COM.S_OK || address[0] == 0) {
- return false;
- }
- IWebIBActions webIBActions = new IWebIBActions (address[0]);
- int[] result = new int[1];
- webIBActions.canGoBack (webView.getAddress (), result);
- webIBActions.Release ();
- return result[0] != 0;
-}
-
-@Override
-public boolean isFocusControl () {
- long /*int*/ hwndFocus = OS.GetFocus ();
- return hwndFocus != 0 && hwndFocus == webViewWindowHandle;
-}
-
-@Override
-public boolean isForwardEnabled () {
- long /*int*/[] address = new long /*int*/[1];
- int hr = webView.QueryInterface (WebKit_win32.IID_IWebIBActions, address);
- if (hr != COM.S_OK || address[0] == 0) {
- return false;
- }
- IWebIBActions webIBActions = new IWebIBActions (address[0]);
- int[] result = new int[1];
- webIBActions.canGoForward (webView.getAddress (), result);
- webIBActions.Release ();
- return result[0] != 0;
-}
-
-void onDispose () {
- /* Browser could have been disposed by one of the Dispose listeners */
- if (!browser.isDisposed ()) {
- /* invoke onbeforeunload handlers but don't prompt with message box */
- if (!browser.isClosing) {
- webUIDelegate.prompt = false;
- shouldClose ();
- webUIDelegate.prompt = true;
- }
- }
-
- Iterator<BrowserFunction> elements = functions.values().iterator ();
- while (elements.hasNext ()) {
- elements.next ().dispose (false);
- }
- functions = null;
-
- eventFunction.dispose();
- eventFunction = null;
- C.free (webViewData);
-
- webView.setPreferences (0);
- webView.setHostWindow (0);
- webView.setFrameLoadDelegate (0);
- webView.setResourceLoadDelegate (0);
- webView.setUIDelegate (0);
- webView.setPolicyDelegate (0);
- webView.setDownloadDelegate (0);
- webView.Release();
- webView = null;
- webDownloadDelegate = null;
- webFrameLoadDelegate = null;
- webPolicyDelegate = null;
- webResourceLoadDelegate = null;
- webUIDelegate = null;
- lastNavigateURL = null;
-}
-
-@Override
-public void refresh () {
- webFrameLoadDelegate.html = null;
- long /*int*/[] result = new long /*int*/[1];
- int hr = webView.QueryInterface (WebKit_win32.IID_IWebIBActions, result);
- if (hr != COM.S_OK || result[0] == 0) {
- return;
- }
- IWebIBActions webIBActions = new IWebIBActions (result[0]);
- webIBActions.reload (webView.getAddress ());
- webIBActions.Release ();
-}
-
-@Override
-boolean sendKeyEvent (Event event) {
- /*
- * browser.traverse() is called through dislay.translateTraversal() for all
- * traversal types except SWT.TRAVERSE_MNEMONIC. So, override
- * WebBrowser.sendKeyEvent() so that when it is called from handleEvent(),
- * browser.traverse() is not called again.
- */
- boolean doit = true;
- switch (event.keyCode) {
- case SWT.ESC:
- case SWT.CR:
- case SWT.ARROW_DOWN:
- case SWT.ARROW_RIGHT:
- case SWT.ARROW_UP:
- case SWT.ARROW_LEFT:
- case SWT.TAB:
- case SWT.PAGE_DOWN:
- case SWT.PAGE_UP:
- break;
- default: {
- if (translateMnemonics ()) {
- if (event.character != 0 && (event.stateMask & (SWT.ALT | SWT.CTRL)) == SWT.ALT) {
- int traversal = SWT.TRAVERSE_MNEMONIC;
- boolean oldEventDoit = event.doit;
- event.doit = true;
- doit = !browser.traverse (traversal, event);
- event.doit = oldEventDoit;
- }
- }
- break;
- }
- }
- if (doit) {
- browser.notifyListeners (event.type, event);
- doit = event.doit;
- }
- return doit;
-}
-
-@Override
-public boolean setText (String html, boolean trusted) {
- /*
- * If this.html is not null then the about:blank page is already being loaded,
- * so no navigate is required. Just set the html that is to be shown.
- */
- boolean blankLoading = webFrameLoadDelegate.html != null;
- webFrameLoadDelegate.html = html;
- untrustedText = !trusted;
- if (blankLoading) return true;
-
- long /*int*/[] result = new long /*int*/[1];
- int hr = webView.mainFrame (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return false;
- }
- IWebFrame frame = new IWebFrame (result[0]);
-
- result[0] = 0;
- hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebMutableURLRequest, 0, WebKit_win32.IID_IWebMutableURLRequest, result);
- if (hr != COM.S_OK || result[0] == 0) {
- frame.Release ();
- return false;
- }
- IWebMutableURLRequest request = new IWebMutableURLRequest (result[0]);
-
- long /*int*/ urlString = createBSTR (ABOUT_BLANK);
- hr = request.setURL (urlString);
- COM.SysFreeString (urlString);
-
- if (hr == COM.S_OK) {
- hr = frame.loadRequest (request.getAddress ());
- }
- frame.Release ();
- request.Release ();
- return hr == COM.S_OK;
-}
-
-@Override
-public boolean setUrl (String url, String postData, String[] headers) {
- if (url.length () == 0) return false;
- /*
- * WebKit attempts to open the exact url string that is passed to it and
- * will not infer a protocol if it's not specified. Detect the case of an
- * invalid URL string and try to fix it by prepending an appropriate protocol.
- */
- try {
- new URL (url);
- } catch (MalformedURLException e) {
- String testUrl = null;
- if (new File (url).isAbsolute ()) {
- /* appears to be a local file */
- testUrl = PROTOCOL_FILE + url;
- } else {
- testUrl = PROTOCOL_HTTP + url;
- }
- try {
- new URL (testUrl);
- url = testUrl; /* adding the protocol made the url valid */
- } catch (MalformedURLException e2) {
- /* adding the protocol did not make the url valid, so do nothing */
- }
- }
- webFrameLoadDelegate.html = null;
- lastNavigateURL = url;
- long /*int*/[] result = new long /*int*/[1];
- int hr = webView.mainFrame (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return false;
- }
- IWebFrame frame = new IWebFrame (result[0]);
-
- result[0] = 0;
- hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebMutableURLRequest, 0, WebKit_win32.IID_IWebMutableURLRequest, result);
- if (hr != COM.S_OK || result[0] == 0) {
- frame.Release ();
- return false;
- }
- IWebMutableURLRequest request = new IWebMutableURLRequest (result[0]);
-
- if (postData != null) { //TODO: POST
-// webResourceLoadDelegate.postData = postData;
-// long /*int*/ postString = createBSTR (POST);
-// hr = request.setHTTPMethod (postString);
-// COM.SysFreeString (postString);
-//
-// result[0] = 0;
-// hr = request.QueryInterface (WebKit_win32.IID_IWebMutableURLRequestPrivate, result);
-// if (hr == COM.S_OK && result[0] != 0) {
-// IWebMutableURLRequestPrivate requestPrivate = new IWebMutableURLRequestPrivate(result[0]);
-// int cfRequest = requestPrivate.cfRequest();
-// byte[] bytes = postData.getBytes();
-// long /*int*/ data = WebKit_win32.CFDataCreate(0, bytes, bytes.length);
-// if (data != 0)WebKit_win32.CFURLRequestSetHTTPRequestBody(cfRequest, data);
-//
-// long /*int*/ dataGet = WebKit_win32.CFURLRequestCopyHTTPRequestBody(cfRequest);
-// int length = WebKit_win32.CFDataGetLength(dataGet);
-// long /*int*/ bytePtr = WebKit_win32.CFDataGetBytePtr(dataGet);
-// }
- }
- hr = COM.S_OK; //TODO: once post code is completed, remove this line if not required
- if (headers != null) {
- for (int i = 0; i < headers.length; i++) {
- String current = headers[i];
- if (current != null) {
- int index = current.indexOf (':');
- if (index != -1) {
- String key = current.substring (0, index).trim ();
- String value = current.substring (index + 1).trim ();
- if (key.length () > 0 && value.length () > 0) {
- long /*int*/ valueString = createBSTR (value);
- if (key.equalsIgnoreCase (USER_AGENT)) {
- /*
- * Feature of WebKit. The user-agent header value cannot be overridden
- * here. The workaround is to temporarily set the value on the WebView
- * and then remove it after the loading of the request has begun.
- */
- hr = webView.setCustomUserAgent (valueString);
- } else {
- long /*int*/ keyString = createBSTR (key);
- hr = request.setValue (valueString, keyString);
- COM.SysFreeString (keyString);
- }
- COM.SysFreeString (valueString);
- }
- }
- }
- }
- }
- if (hr == COM.S_OK) {
- long /*int*/ urlString = createBSTR (url);
- hr = request.setURL (urlString);
- COM.SysFreeString (urlString);
- if (hr == COM.S_OK) {
- hr = frame.loadRequest (request.getAddress ());
- }
- webView.setCustomUserAgent (0);
- }
- frame.Release ();
- request.Release ();
- return hr == COM.S_OK;
-}
-
-boolean shouldClose () {
- if (!jsEnabled) return true;
-
- long /*int*/[] address = new long /*int*/[1];
- int hr = webView.QueryInterface (WebKit_win32.IID_IWebViewPrivate, address);
- if (hr != COM.S_OK || address[0] == 0) {
- return false;
- }
- IWebViewPrivate webViewPrivate = new IWebViewPrivate (address[0]);
- int[] result = new int[1];
- /* This function will fire the before unload handler for a page */
- webViewPrivate.shouldClose (result);
- webViewPrivate.Release ();
- return result[0] != 0;
-}
-
-@Override
-public void stop () {
- webFrameLoadDelegate.html = null;
- long /*int*/[] result = new long /*int*/[1];
- int hr = webView.QueryInterface (WebKit_win32.IID_IWebIBActions, result);
- if (hr != COM.S_OK || result[0] == 0) {
- return;
- }
- IWebIBActions webIBActions = new IWebIBActions (result[0]);
- webIBActions.stopLoading (webView.getAddress ());
- webIBActions.Release ();
-}
-
-void initializeWebViewPreferences () {
- /*
- * Try to create separate preferences for each webview using different identifier for each webview.
- * Otherwise all the webviews use the shared preferences.
- */
- long /*int*/[] result = new long /*int*/[1];
- int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebPreferences, 0, WebKit_win32.IID_IWebPreferences, result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebPreferences preferences = new IWebPreferences (result[0]);
- result[0] = 0;
- hr = preferences.initWithIdentifier (createBSTR (String.valueOf (prefsIdentifier++)), result);
- preferences.Release ();
- if (hr == COM.S_OK && result[0] != 0) {
- preferences = new IWebPreferences (result[0]);
- webView.setPreferences (preferences.getAddress());
- preferences.Release ();
- }
- }
-
- result[0] = 0;
- hr = webView.preferences (result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebPreferences preferences = new IWebPreferences (result[0]);
- preferences.setJavaScriptEnabled (1);
- preferences.setJavaScriptCanOpenWindowsAutomatically (1);
- preferences.setJavaEnabled (0); /* disable applets */
- preferences.setTabsToLinks (1);
- preferences.setFontSmoothing (WebKit_win32.FontSmoothingTypeWindows);
- preferences.Release ();
- }
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java
deleted file mode 100644
index f824bd7ac8..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.browser;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.webkit.*;
-import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.widgets.*;
-
-class WebPolicyDelegate {
- COMObject iWebPolicyDelegate;
- int refCount = 0;
-
- Browser browser;
-
-WebPolicyDelegate (Browser browser) {
- createCOMInterfaces ();
- this.browser = browser;
-}
-
-int AddRef () {
- refCount++;
- return refCount;
-}
-
-void createCOMInterfaces () {
- iWebPolicyDelegate = new COMObject (new int[] {2, 0, 0, 5, 5, 5, 3}) {
- @Override
- public long /*int*/ method0 (long /*int*/[] args) {return QueryInterface (args[0], args[1]);}
- @Override
- public long /*int*/ method1 (long /*int*/[] args) {return AddRef ();}
- @Override
- public long /*int*/ method2 (long /*int*/[] args) {return Release ();}
- @Override
- public long /*int*/ method3 (long /*int*/[] args) {return decidePolicyForNavigationAction (args[0], args[1], args[2], args[3], args[4]);}
- @Override
- public long /*int*/ method4 (long /*int*/[] args) {return decidePolicyForNewWindowAction (args[0], args[1], args[2], args[3], args[4]);}
- @Override
- public long /*int*/ method5 (long /*int*/[] args) {return decidePolicyForMIMEType (args[0], args[1], args[2], args[3], args[4]);}
- @Override
- public long /*int*/ method6 (long /*int*/[] args) {return unableToImplementPolicyWithError (args[0], args[1], args[2]);}
- };
-}
-
-int decidePolicyForMIMEType (long /*int*/ webView, long /*int*/ type, long /*int*/ request, long /*int*/ frame, long /*int*/ listener) {
- IWebView iwebView = new IWebView (webView);
- int[] canShow = new int[1];
- iwebView.canShowMIMEType (type, canShow);
- IWebPolicyDecisionListener pdListener = new IWebPolicyDecisionListener (listener);
- if (canShow[0] != 0) {
- pdListener.use ();
- } else {
- pdListener.download ();
- }
- return COM.S_OK;
-}
-
-int decidePolicyForNavigationAction (long /*int*/ webView, long /*int*/ actionInformation, long /*int*/ request, long /*int*/ frame, long /*int*/ listener) {
- IWebURLRequest iwebUrlRequest = new IWebURLRequest (request);
- long /*int*/[] result = new long /*int*/[1];
- int hr = iwebUrlRequest.URL (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- String url = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- IWebPolicyDecisionListener pdListener = new IWebPolicyDecisionListener (listener);
- WebKit webKit = (WebKit)browser.webBrowser;
- if (webKit.loadingText) {
- /*
- * WebKit is auto-navigating to about:blank in response to a loadHTMLString()
- * invocation. This navigate should always proceed without sending an event
- * since it is preceded by an explicit navigate to about:blank in setText().
- */
- pdListener.use ();
- return COM.S_OK;
- }
- if (url.length () == 0) {
- pdListener.ignore ();
- return COM.S_OK;
- }
- if (url.startsWith (WebKit.PROTOCOL_FILE) && webKit.getUrl ().startsWith (WebKit.ABOUT_BLANK) && webKit.untrustedText) {
- /* indicates an attempt to access the local file system from untrusted content */
- pdListener.ignore ();
- return COM.S_OK;
- }
- /*
- * If the URI indicates that the page is being rendered from memory
- * (via setText()) then set it to about:blank to be consistent with IE.
- */
- if (url.equals (WebKit.URI_FILEROOT)) {
- url = WebKit.ABOUT_BLANK;
- } else {
- int length = WebKit.URI_FILEROOT.length ();
- if (url.startsWith (WebKit.URI_FILEROOT) && url.charAt (length) == '#') {
- url = WebKit.ABOUT_BLANK + url.substring (length);
- }
- }
- LocationEvent newEvent = new LocationEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- newEvent.location = url;
- newEvent.doit = true;
- LocationListener[] locationListeners = webKit.locationListeners;
- if (locationListeners != null) {
- for (int i = 0; i < locationListeners.length; i++) {
- locationListeners[i].changing (newEvent);
- }
- }
- if (newEvent.doit) {
- if (webKit.jsEnabled != webKit.jsEnabledOnNextPage) {
- webKit.jsEnabled = webKit.jsEnabledOnNextPage;
- IWebView view = new IWebView (webView);
- result[0] = 0;
- hr = view.preferences (result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebPreferences preferences = new IWebPreferences (result[0]);
- hr = preferences.setJavaScriptEnabled (webKit.jsEnabled ? 1 : 0);
- view.setPreferences (preferences.getAddress());
- preferences.Release ();
- }
- }
- pdListener.use ();
- webKit.lastNavigateURL = url;
- } else {
- pdListener.ignore ();
- }
- return COM.S_OK;
-}
-
-int decidePolicyForNewWindowAction (long /*int*/ webView, long /*int*/ actionInformation, long /*int*/ request, long /*int*/ frameName, long /*int*/ listener) {
- IWebPolicyDecisionListener pdListener = new IWebPolicyDecisionListener (listener);
- pdListener.use();
- return COM.S_OK;
-}
-
-protected void disposeCOMInterfaces () {
- if (iWebPolicyDelegate != null) {
- iWebPolicyDelegate.dispose ();
- iWebPolicyDelegate = null;
- }
-}
-
-long /*int*/ getAddress () {
- return iWebPolicyDelegate.getAddress ();
-}
-
-int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) {
- if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
- GUID guid = new GUID ();
- COM.MoveMemory (guid, riid, GUID.sizeof);
-
- if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebPolicyDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebPolicyDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebPolicyDelegate)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebPolicyDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebPolicyDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
-
- OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
- return COM.E_NOINTERFACE;
-}
-
-int Release () {
- refCount--;
- if (refCount == 0) {
- disposeCOMInterfaces ();
- }
- return refCount;
-}
-
-int unableToImplementPolicyWithError (long /*int*/ webView, long /*int*/ error, long /*int*/ frame) {
- if (browser.isDisposed ()) return COM.S_OK;
-
- IWebError iweberror = new IWebError (error);
- String failingURL = null;
- long /*int*/[] result = new long /*int*/[1];
- int hr = iweberror.failingURL (result);
- if (hr == COM.S_OK && result[0] != 0) {
- failingURL = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- }
- result[0] = 0;
- hr = iweberror.localizedDescription (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- String description = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
-
- String message = failingURL != null ? failingURL + "\n\n" : ""; //$NON-NLS-1$ //$NON-NLS-2$
- message += Compatibility.getMessage ("SWT_Page_Load_Failed", new Object[] {description}); //$NON-NLS-1$
- MessageBox messageBox = new MessageBox (browser.getShell (), SWT.OK | SWT.ICON_ERROR);
- messageBox.setMessage (message);
- messageBox.open ();
- return COM.S_OK;
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
deleted file mode 100644
index 47a2e4779a..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.browser;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.webkit.*;
-import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class WebResourceLoadDelegate {
- COMObject iWebResourceLoadDelegate;
- int refCount = 0;
-
- Browser browser;
- String postData;
-
-WebResourceLoadDelegate (Browser browser) {
- createCOMInterfaces ();
- this.browser = browser;
-}
-
-int AddRef () {
- refCount++;
- return refCount;
-}
-
-void createCOMInterfaces () {
- iWebResourceLoadDelegate = new COMObject (new int[] {2, 0, 0, 4, 6, 4, 4, 4, 4, 3, 4, 3}) {
- @Override
- public long /*int*/ method0 (long /*int*/[] args) {return QueryInterface (args[0], args[1]);}
- @Override
- public long /*int*/ method1 (long /*int*/[] args) {return AddRef ();}
- @Override
- public long /*int*/ method2 (long /*int*/[] args) {return Release ();}
- @Override
- public long /*int*/ method3 (long /*int*/[] args) {return identifierForInitialRequest (args[0], args[1], args[2], args[3]);}
- @Override
- public long /*int*/ method4 (long /*int*/[] args) {return willSendRequest (args[0], args[1], args[2], args[3], args[4], args[5]);}
- @Override
- public long /*int*/ method5 (long /*int*/[] args) {return didReceiveAuthenticationChallenge (args[0], args[1], args[2], args[3]);}
- @Override
- public long /*int*/ method6 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method7 (long /*int*/[] args) {return COM.S_OK;}
- @Override
- public long /*int*/ method8 (long /*int*/[] args) {return COM.S_OK;}
- @Override
- public long /*int*/ method9 (long /*int*/[] args) {return COM.S_OK;}
- @Override
- public long /*int*/ method10 (long /*int*/[] args) {return COM.S_OK;}
- @Override
- public long /*int*/ method11 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- };
-}
-
-int didReceiveAuthenticationChallenge (long /*int*/ webView, long /*int*/ identifier, long /*int*/ challenge, long /*int*/ dataSource) {
- IWebURLAuthenticationChallenge authenticationChallenge = new IWebURLAuthenticationChallenge (challenge);
- /*
- * Do not invoke the listeners if this challenge has been failed too many
- * times because a listener is likely giving incorrect credentials repeatedly
- * and will do so indefinitely.
- */
- int[] count = new int[1];
- int hr = authenticationChallenge.previousFailureCount (count);
- long /*int*/[] result = new long /*int*/[1];
- if (hr == COM.S_OK && count[0] < 3) {
- AuthenticationListener[] authenticationListeners = browser.webBrowser.authenticationListeners;
- for (int i = 0; i < authenticationListeners.length; i++) {
- AuthenticationEvent event = new AuthenticationEvent (browser);
- event.location = ((WebKit)browser.webBrowser).lastNavigateURL;
- authenticationListeners[i].authenticate (event);
- if (!event.doit) {
- hr = authenticationChallenge.sender (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebURLAuthenticationChallengeSender challengeSender = new IWebURLAuthenticationChallengeSender (result[0]);
- challengeSender.cancelAuthenticationChallenge (challenge);
- challengeSender.Release ();
- return COM.S_OK;
- }
- if (event.user != null && event.password != null) {
- hr = authenticationChallenge.sender (result);
- if (hr != COM.S_OK || result[0] == 0) continue;
-
- IWebURLAuthenticationChallengeSender challengeSender = new IWebURLAuthenticationChallengeSender (result[0]);
- result[0] = 0;
- hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebURLCredential, 0, WebKit_win32.IID_IWebURLCredential, result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebURLCredential credential = new IWebURLCredential (result[0]);
- long /*int*/ user = WebKit.createBSTR (event.user);
- long /*int*/ password = WebKit.createBSTR (event.password);
- credential.initWithUser (user, password, WebKit_win32.WebURLCredentialPersistenceForSession);
- challengeSender.useCredential (credential.getAddress (), challenge);
- credential.Release ();
- }
- challengeSender.Release ();
- return COM.S_OK;
- }
- }
- }
-
- /* show a custom authentication dialog */
-
- String[] userReturn = new String[1], passwordReturn = new String[1];
- result[0] = 0;
- hr = authenticationChallenge.proposedCredential (result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebURLCredential proposedCredential = new IWebURLCredential(result[0]);
- result[0] = 0;
- hr = proposedCredential.user (result);
- if (hr == COM.S_OK && result[0] != 0) {
- userReturn[0] = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- int[] value = new int[1];
- hr = proposedCredential.hasPassword (value);
- if (hr == COM.S_OK && value[0] != 0) {
- result[0] = 0;
- hr = proposedCredential.password (result);
- if (hr == COM.S_OK && result[0] != 0) {
- passwordReturn[0] = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- }
- }
- }
- proposedCredential.Release ();
- }
- result[0] = 0;
- hr = authenticationChallenge.protectionSpace (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebURLProtectionSpace space = new IWebURLProtectionSpace (result[0]);
- String host = null, realm = null;
- result[0] = 0;
- hr = space.host (result);
- if (hr == COM.S_OK && result[0] != 0) {
- host = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- int[] port = new int[1];
- hr = space.port (port);
- if (hr == COM.S_OK) {
- host += ":" + port[0]; //$NON-NLS-1$
- result[0] = 0;
- hr = space.realm (result);
- if (hr == COM.S_OK && result[0] != 0) {
- realm = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- }
- }
- }
- space.Release ();
- boolean response = showAuthenticationDialog (userReturn, passwordReturn, host, realm);
- result[0] = 0;
- hr = authenticationChallenge.sender (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebURLAuthenticationChallengeSender challengeSender = new IWebURLAuthenticationChallengeSender (result[0]);
- if (!response) {
- challengeSender.cancelAuthenticationChallenge (challenge);
- challengeSender.Release ();
- return COM.S_OK;
- }
- result[0] = 0;
- hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebURLCredential, 0, WebKit_win32.IID_IWebURLCredential, result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebURLCredential credential = new IWebURLCredential (result[0]);
- long /*int*/ user = WebKit.createBSTR (userReturn[0]);
- long /*int*/ password = WebKit.createBSTR (passwordReturn[0]);
- credential.initWithUser (user, password, WebKit_win32.WebURLCredentialPersistenceForSession);
- challengeSender.useCredential (credential.getAddress (), challenge);
- credential.Release ();
- }
- challengeSender.Release ();
- return COM.S_OK;
-}
-
-void disposeCOMInterfaces () {
- if (iWebResourceLoadDelegate != null) {
- iWebResourceLoadDelegate.dispose ();
- iWebResourceLoadDelegate = null;
- }
-}
-
-long /*int*/ getAddress () {
- return iWebResourceLoadDelegate.getAddress ();
-}
-
-int identifierForInitialRequest (long /*int*/ webView, long /*int*/ request, long /*int*/ dataSource, long /*int*/ identifier) {
- if (browser.isDisposed ()) return COM.S_OK;
-
- /* send progress event iff request is for top-level frame */
-
- IWebDataSource source = new IWebDataSource (dataSource);
- long /*int*/[] frame = new long /*int*/[1];
- int hr = source.webFrame (frame);
- if (hr != COM.S_OK || frame[0] == 0) {
- return COM.S_OK;
- }
- new IWebFrame (frame[0]).Release ();
- long /*int*/[] mainFrame = new long /*int*/[1];
- IWebView iWebView = new IWebView (webView);
- hr = iWebView.mainFrame (mainFrame);
- if (hr != COM.S_OK || mainFrame[0] == 0) {
- return COM.S_OK;
- }
- new IWebFrame (mainFrame[0]).Release ();
- if (frame[0] == mainFrame[0]) {
- long /*int*/ ptr = C.malloc (8);
- iWebView.estimatedProgress (ptr);
- double[] estimate = new double[1];
- OS.MoveMemory (estimate, ptr, 8);
- C.free (ptr);
- int progress = (int)(estimate[0] * 100);
-
- ProgressEvent progressEvent = new ProgressEvent (browser);
- progressEvent.display = browser.getDisplay ();
- progressEvent.widget = browser;
- progressEvent.current = progress;
- progressEvent.total = Math.max (progress, WebKit.MAX_PROGRESS);
- ProgressListener[] progressListeners = browser.webBrowser.progressListeners;
- for (int i = 0; i < progressListeners.length; i++) {
- progressListeners[i].changed (progressEvent);
- }
- }
- return COM.S_OK;
-}
-
-int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) {
- if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
- GUID guid = new GUID ();
- COM.MoveMemory (guid, riid, GUID.sizeof);
-
- if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebResourceLoadDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebResourceLoadDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebResourceLoadDelegate)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebResourceLoadDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebResourceLoadDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
-
- OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
- return COM.E_NOINTERFACE;
-}
-
-int Release () {
- refCount--;
- if (refCount == 0) {
- disposeCOMInterfaces ();
- }
- return refCount;
-}
-
-boolean showAuthenticationDialog (final String[] user, final String[] password, String host, String realm) {
- Shell parent = browser.getShell ();
- final Shell shell = new Shell (parent);
- shell.setLayout (new GridLayout ());
- String title = SWT.getMessage ("SWT_Authentication_Required"); //$NON-NLS-1$
- shell.setText (title);
- Label label = new Label (shell, SWT.WRAP);
- label.setText (Compatibility.getMessage ("SWT_Enter_Username_and_Password", new String[] {realm, host})); //$NON-NLS-1$
-
- GridData data = new GridData ();
- Monitor monitor = browser.getMonitor ();
- int maxWidth = monitor.getBounds ().width * 2 / 3;
- int width = label.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- data.widthHint = Math.min (width, maxWidth);
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- label.setLayoutData (data);
-
- Label userLabel = new Label (shell, SWT.NONE);
- userLabel.setText (SWT.getMessage ("SWT_Username")); //$NON-NLS-1$
-
- final Text userText = new Text (shell, SWT.BORDER);
- if (user[0] != null) userText.setText (user[0]);
- data = new GridData ();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- userText.setLayoutData (data);
-
- Label passwordLabel = new Label (shell, SWT.NONE);
- passwordLabel.setText (SWT.getMessage ("SWT_Password")); //$NON-NLS-1$
-
- final Text passwordText = new Text (shell, SWT.PASSWORD | SWT.BORDER);
- if (password[0] != null) passwordText.setText (password[0]);
- data = new GridData ();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- passwordText.setLayoutData (data);
-
- final boolean[] result = new boolean[1];
- final Button[] buttons = new Button[2];
- Listener listener = event -> {
- user[0] = userText.getText ();
- password[0] = passwordText.getText ();
- result[0] = event.widget == buttons[1];
- shell.close ();
- };
-
- Composite composite = new Composite (shell, SWT.NONE);
- data = new GridData ();
- data.horizontalAlignment = GridData.END;
- composite.setLayoutData (data);
- composite.setLayout (new GridLayout (2, true));
- buttons[0] = new Button (composite, SWT.PUSH);
- buttons[0].setText (SWT.getMessage ("SWT_Cancel")); //$NON-NLS-1$
- buttons[0].setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- buttons[0].addListener (SWT.Selection, listener);
- buttons[1] = new Button (composite, SWT.PUSH);
- buttons[1].setText (SWT.getMessage ("SWT_OK")); //$NON-NLS-1$
- buttons[1].setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- buttons[1].addListener (SWT.Selection, listener);
-
- shell.setDefaultButton (buttons[1]);
- shell.pack ();
- Rectangle parentSize = parent.getBounds ();
- Rectangle shellSize = shell.getBounds ();
- int x = parent.getLocation().x + (parentSize.width - shellSize.width) / 2;
- int y = parent.getLocation().y + (parentSize.height - shellSize.height) / 2;
- shell.setLocation (x, y);
- shell.open ();
- Display display = browser.getDisplay ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
-
- return result[0];
-}
-
-int willSendRequest (long /*int*/ webView, long /*int*/ identifier, long /*int*/ request, long /*int*/ redirectResponse, long /*int*/ dataSource, long /*int*/ newRequest) {
- IWebURLRequest req = new IWebURLRequest (request);
- long /*int*/[] result = new long /*int*/ [1];
- int hr = req.URL (result);
- if (hr == COM.S_OK && result[0] != 0) {
- String url = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- /*
- * file://c|/ doesn't work on Webkit but works on other browsers.
- * So change file:// to file:/// to be consistent
- */
- if (url.startsWith (WebKit.PROTOCOL_FILE) && !url.startsWith (WebKit.URI_FILEROOT)) {
- int length = WebKit.PROTOCOL_FILE.length ();
- url = WebKit.URI_FILEROOT + url.substring (length);
- result[0] = 0;
-
- hr = req.mutableCopy (result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebMutableURLRequest mReq = new IWebMutableURLRequest (result[0]);
- long /*int*/ urlString = WebKit.createBSTR (url);
- mReq.setURL (urlString);
- OS.MoveMemory (newRequest, new long /*int*/[] {mReq.getAddress ()}, C.PTR_SIZEOF);
- return COM.S_OK;
- }
- }
- }
- req.AddRef ();
- OS.MoveMemory (newRequest, new long /*int*/[] {request}, C.PTR_SIZEOF);
- return COM.S_OK;
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java
deleted file mode 100644
index eb9892cf19..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebUIDelegate.java
+++ /dev/null
@@ -1,735 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.browser;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.webkit.*;
-import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class WebUIDelegate {
- COMObject iWebUIDelegate;
- int refCount = 0;
-
- String lastHoveredLinkURL;
- Browser browser;
- Point size;
- Point location;
- boolean menuBar = true, toolBar = true, statusBar = true;
- boolean prompt = true;
-
-WebUIDelegate (Browser browser) {
- createCOMInterfaces ();
- this.browser = browser;
-}
-
-int AddRef () {
- refCount++;
- return refCount;
-}
-
-int canTakeFocus (long /*int*/ sender, int forward, long /*int*/ result) {
- OS.MoveMemory (result, new int[] {1}, 4); /* BOOL */
- return COM.S_OK;
-}
-
-int contextMenuItemsForElement (long /*int*/ sender, long /*int*/ element, long /*int*/ defaultItemsHMenu, long /*int*/ resultHMenu) {
- Point pt = browser.getDisplay ().getCursorLocation ();
- Event event = new Event ();
- event.x = pt.x;
- event.y = pt.y;
- browser.notifyListeners (SWT.MenuDetect, event);
- if (event.doit) {
- Menu menu = browser.getMenu ();
- if (menu != null && !menu.isDisposed ()) {
- if (event.x != pt.x || event.y != pt.y) {
- menu.setLocation (event.x, event.y);
- }
- menu.setVisible (true);
- } else {
- OS.MoveMemory (resultHMenu, new long /*int*/[] {defaultItemsHMenu}, C.PTR_SIZEOF);
- return COM.S_OK;
- }
- }
- OS.MoveMemory (resultHMenu, new long /*int*/[] {0}, C.PTR_SIZEOF);
- return COM.S_OK;
-}
-
-void createCOMInterfaces () {
- iWebUIDelegate = new COMObject (new int[] {2, 0, 0, 3, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 2, 3, 4, 4, 3, 3, 3, 3, 5, 3, 1, 3, 2, 2, 2, 2, 3, 2, 3, 1, 1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 5, 2, 2, 3, 1, 2, 2, 4, 10, 3}) {
- @Override
- public long /*int*/ method0 (long /*int*/[] args) {return QueryInterface (args[0], args[1]);}
- @Override
- public long /*int*/ method1 (long /*int*/[] args) {return AddRef ();}
- @Override
- public long /*int*/ method2 (long /*int*/[] args) {return Release ();}
- @Override
- public long /*int*/ method3 (long /*int*/[] args) {return createWebViewWithRequest (args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method4 (long /*int*/[] args) {return webViewShow (args[0]);}
- @Override
- public long /*int*/ method5 (long /*int*/[] args) {return webViewClose (args[0]);}
- @Override
- public long /*int*/ method6 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method7 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method8 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method9 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method10 (long /*int*/[] args) {return setStatusText (args[0], args[1]);}
- @Override
- public long /*int*/ method11 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method12 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method13 (long /*int*/[] args) {return setToolbarsVisible (args[0], (int)/*64*/args[1]);}
- @Override
- public long /*int*/ method14 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method15 (long /*int*/[] args) {return setStatusBarVisible (args[0], (int)/*64*/args[1]);}
- @Override
- public long /*int*/ method16 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method17 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method18 (long /*int*/[] args) {return setFrame (args[0], args[1]);}
- @Override
- public long /*int*/ method19 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method20 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method21 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method22 (long /*int*/[] args) {return runJavaScriptAlertPanelWithMessage (args[0], args[1]);}
- @Override
- public long /*int*/ method23 (long /*int*/[] args) {return runJavaScriptConfirmPanelWithMessage (args[0], args[1], args[2]);}
- @Override
- public long /*int*/ method24 (long /*int*/[] args) {return runJavaScriptTextInputPanelWithPrompt (args[0], args[1], args[2], args[3]);}
- @Override
- public long /*int*/ method25 (long /*int*/[] args) {return runBeforeUnloadConfirmPanelWithMessage (args[0], args[1], args[2], args[3]);}
- @Override
- public long /*int*/ method26 (long /*int*/[] args) {return runOpenPanelForFileButtonWithResultListener (args[0], args[1]);}
- @Override
- public long /*int*/ method27 (long /*int*/[] args) {return mouseDidMoveOverElement (args[0], args[1], (int)/*64*/args[2]);}
- @Override
- public long /*int*/ method28 (long /*int*/[] args) {return contextMenuItemsForElement (args[0], args[1], args[2], args[3]);}
- @Override
- public long /*int*/ method29 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method30 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method31 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method32 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method33 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method34 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method35 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method36 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method37 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method38 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method39 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method40 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method41 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method42 (long /*int*/[] args) {return canTakeFocus (args[0], (int)/*64*/args[1], args[2]);}
- @Override
- public long /*int*/ method43 (long /*int*/[] args) {return takeFocus (args[0], (int)/*64*/args[1]);}
- @Override
- public long /*int*/ method44 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method45 (long /*int*/[] args) {return COM.S_OK;}
- @Override
- public long /*int*/ method46 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method47 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method48 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method49 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method50 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method51 (long /*int*/[] args) {return printFrame (args[0], args[1]);}
- @Override
- public long /*int*/ method52 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method53 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method54 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method55 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method56 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method57 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method58 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method59 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method60 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method61 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method62 (long /*int*/[] args) {return setMenuBarVisible (args[0], (int)/*64*/args[1]);}
- @Override
- public long /*int*/ method63 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method64 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- @Override
- public long /*int*/ method65 (long /*int*/[] args) {return COM.E_NOTIMPL;}
- };
-}
-
-int createWebViewWithRequest (long /*int*/ sender, long /*int*/ request, long /*int*/ webView) {
- WindowEvent newEvent = new WindowEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- newEvent.required = true;
- OpenWindowListener[] openWindowListeners = browser.webBrowser.openWindowListeners;
- for (int i = 0; i < openWindowListeners.length; i++) {
- openWindowListeners[i].open (newEvent);
- }
- IWebView iwebview = null;
- Browser browser = null;
- if (newEvent.browser != null && newEvent.browser.webBrowser instanceof WebKit) {
- browser = newEvent.browser;
- }
- if (browser != null && !browser.isDisposed ()) {
- iwebview = ((WebKit)browser.webBrowser).webView;
- OS.MoveMemory (webView, new long /*int*/[] {iwebview.getAddress ()}, C.PTR_SIZEOF);
- if (request != 0) {
- IWebURLRequest req = new IWebURLRequest (request);
- long /*int*/[] result = new long /*int*/[1];
- int hr = req.URL (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- String sUrl = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- if (sUrl.length () != 0) {
- result[0] = 0;
- hr = iwebview.mainFrame (result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebFrame mainFrame = new IWebFrame (result[0]);
- mainFrame.loadRequest (req.getAddress ());
- mainFrame.Release ();
- }
- }
- return COM.S_OK;
- }
- return COM.E_NOTIMPL;
-}
-
-protected void disposeCOMInterfaces () {
- if (iWebUIDelegate != null) {
- iWebUIDelegate.dispose ();
- iWebUIDelegate = null;
- }
-}
-
-long /*int*/ getAddress () {
- return iWebUIDelegate.getAddress ();
-}
-
-int mouseDidMoveOverElement (long /*int*/ sender, long /*int*/ elementInformation, int modifierFlags) {
- if (elementInformation == 0) return COM.S_OK;
-
- IPropertyBag info = new IPropertyBag (elementInformation);
- long /*int*/ key = WebKit.createBSTR ("WebElementLinkURLKey"); //$NON-NLS-N$
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ resultPtr = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, VARIANT.sizeof);
- int hr = info.Read (key, resultPtr, null);
- if (hr != COM.S_OK || resultPtr == 0) {
- return COM.S_OK;
- }
- String value = null;
- VARIANT v = new VARIANT ();
- COM.MoveMemory (v, resultPtr, VARIANT.sizeof);
- if (v.vt == COM.VT_BSTR) value = WebKit.extractBSTR (v.lVal);
- OS.HeapFree (hHeap, 0, resultPtr);
- StatusTextListener[] statusTextListeners = browser.webBrowser.statusTextListeners;
- if (value == null || value.length () == 0) {
- /* not currently over a link */
- if (lastHoveredLinkURL == null) return COM.S_OK;
- lastHoveredLinkURL = null;
- StatusTextEvent statusText = new StatusTextEvent (browser);
- statusText.display = browser.getDisplay ();
- statusText.widget = browser;
- statusText.text = ""; //$NON-NLS-1$
- for (int i = 0; i < statusTextListeners.length; i++) {
- statusTextListeners[i].changed (statusText);
- }
- return COM.S_OK;
- }
- if (value.equals (lastHoveredLinkURL)) return COM.S_OK;
- lastHoveredLinkURL = value;
- StatusTextEvent statusText = new StatusTextEvent (browser);
- statusText.display = browser.getDisplay ();
- statusText.widget = browser;
- statusText.text = value;
- for (int i = 0; i < statusTextListeners.length; i++) {
- statusTextListeners[i].changed (statusText);
- }
- return COM.S_OK;
-}
-
-int printFrame (long /*int*/ webView, long /*int*/ frame) {
- IWebFrame iwebFrame = new IWebFrame (frame);
- PRINTDLG pd = new PRINTDLG ();
- pd.lStructSize = PRINTDLG.sizeof;
- pd.Flags = OS.PD_RETURNDC;
- Display display = browser.getDisplay ();
- display.sendPreExternalEventDispatchEvent ();
- boolean success = OS.PrintDlg (pd);
- display.sendPostExternalEventDispatchEvent ();
- if (!success) return COM.S_OK;
- long /*int*/ printDC = pd.hDC;
-
- long /*int*/[] result = new long /*int*/[1];
- int hr = iwebFrame.QueryInterface (WebKit_win32.IID_IWebFramePrivate, result);
- if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
- IWebFramePrivate privateFrame = new IWebFramePrivate (result[0]);
- privateFrame.setInPrintingMode (1, printDC);
- int[] count = new int[1];
- hr = privateFrame.getPrintedPageCount (printDC, count);
- if (hr != COM.S_OK || count[0] == 0) {
- privateFrame.Release ();
- return COM.S_OK;
- }
- int pageCount = count[0];
- String jobName = null;
- result[0] = 0;
- hr = iwebFrame.dataSource (result);
- if (hr == COM.S_OK && result[0] != 0) {
- IWebDataSource dataSource = new IWebDataSource (result[0]);
- result[0] = 0;
- hr = dataSource.pageTitle (result);
- dataSource.Release ();
- if (hr == COM.S_OK && result[0] != 0) {
- jobName = WebKit.extractBSTR (result[0]);
- COM.SysFreeString (result[0]);
- }
- }
- DOCINFO di = new DOCINFO ();
- di.cbSize = DOCINFO.sizeof;
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ lpszDocName = 0;
- if (jobName != null && jobName.length () != 0) {
- /* Use the character encoding for the default locale */
- TCHAR buffer = new TCHAR (0, jobName, true);
- int byteCount = buffer.length () * TCHAR.sizeof;
- lpszDocName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- OS.MoveMemory (lpszDocName, buffer, byteCount);
- di.lpszDocName = lpszDocName;
- }
- int rc = OS.StartDoc (printDC, di);
- if (lpszDocName != 0) OS.HeapFree (hHeap, 0, lpszDocName);
- if (rc >= 0) {
- for (int i = 0; i < pageCount; i++) {
- OS.StartPage (printDC);
- privateFrame.spoolPages (printDC, i, i, null);
- OS.EndPage (printDC);
- }
- privateFrame.setInPrintingMode (0, printDC);
- OS.EndDoc (printDC);
- }
- privateFrame.Release ();
- return COM.S_OK;
-}
-
-int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) {
- if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
- GUID guid = new GUID ();
- COM.MoveMemory (guid, riid, GUID.sizeof);
-
- if (COM.IsEqualGUID (guid, COM.IIDIUnknown)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebUIDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebUIDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID (guid, WebKit_win32.IID_IWebUIDelegate)) {
- OS.MoveMemory (ppvObject, new long /*int*/[] {iWebUIDelegate.getAddress ()}, C.PTR_SIZEOF);
- new IUnknown (iWebUIDelegate.getAddress ()).AddRef ();
- return COM.S_OK;
- }
-
- OS.MoveMemory (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
- return COM.E_NOINTERFACE;
-}
-
-int Release () {
- refCount--;
- if (refCount == 0) {
- disposeCOMInterfaces ();
- }
- return refCount;
-}
-
-int runBeforeUnloadConfirmPanelWithMessage (long /*int*/ sender, long /*int*/ message, long /*int*/ initiatedByFrame, long /*int*/ result) {
- if (!prompt) return COM.S_OK;
-
- Shell parent = browser.getShell ();
- String string = WebKit.extractBSTR (message);
- StringBuffer text = new StringBuffer (Compatibility.getMessage ("SWT_OnBeforeUnload_Message1")); //$NON-NLS-1$
- text.append ("\n\n"); //$NON-NLS-1$
- text.append (string);
- text.append ("\n\n"); //$NON-NLS-1$
- text.append (Compatibility.getMessage ("SWT_OnBeforeUnload_Message2")); //$NON-NLS-1$
- MessageBox box = new MessageBox (parent, SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
- box.setMessage (text.toString ());
- int[] response = new int[1];
- response[0] = box.open () == SWT.OK ? 1 : 0;
- OS.MoveMemory (result, response, 4); /* BOOL */
- return COM.S_OK;
-}
-
-int runJavaScriptAlertPanelWithMessage (long /*int*/ sender, long /*int*/ message) {
- String messageString = WebKit.extractBSTR (message);
- showAlertMessage ("Javascript", messageString); //$NON-NLS-1$
- return COM.S_OK;
-}
-
-int runJavaScriptConfirmPanelWithMessage (long /*int*/ sender, long /*int*/ message, long /*int*/ result) {
- String messageString = WebKit.extractBSTR (message);
- int[] response = new int[1];
- response[0] = showConfirmPanel ("Javascript", messageString) == SWT.OK ? 1 : 0; //$NON-NLS-1$
- OS.MoveMemory (result, response, 4); /* BOOL */
- return COM.S_OK;
-}
-
-int runJavaScriptTextInputPanelWithPrompt (long /*int*/ sender, long /*int*/ message, long /*int*/ defaultText, long /*int*/ result) {
- String messageString = WebKit.extractBSTR (message);
- String defaultTextString = WebKit.extractBSTR (defaultText);
- String resultString = showTextPrompter ("Javascript", messageString, defaultTextString); //$NON-NLS-1$
- long /*int*/[] response = new long /*int*/[1];
- if (resultString != null) {
- response[0] = WebKit.createBSTR (resultString);
- }
- OS.MoveMemory (result, response, C.PTR_SIZEOF);
- return COM.S_OK;
-}
-
-int runOpenPanelForFileButtonWithResultListener (long /*int*/ sender, long /*int*/ resultListener) {
- Shell parent = browser.getShell ();
- FileDialog dialog = new FileDialog (parent, SWT.NONE);
- String result = dialog.open ();
- IWebOpenPanelResultListener listener = new IWebOpenPanelResultListener (resultListener);
- if (result == null) {
- listener.cancel ();
- } else {
- listener.chooseFilename (WebKit.createBSTR (result));
- }
- return COM.S_OK;
-}
-
-int setFrame (long /*int*/ sender, long /*int*/ frame) {
- RECT rect = new RECT ();
- COM.MoveMemory (rect, frame, RECT.sizeof);
- /* convert to SWT system coordinates */
- location = DPIUtil.autoScaleUp(browser.getDisplay ().map (browser, null, DPIUtil.autoScaleDown(new Point(rect.left, rect.top)))); // To Pixels
- int x = rect.right - rect.left;
- int y = rect.bottom - rect.top;
- if (y < 0 || x < 0 || (x == 0 && y == 0)) return COM.S_OK;
- size = new Point (x, y);
- return COM.S_OK;
-}
-
-int setMenuBarVisible (long /*int*/ sender, int visible) {
- /* Note. Webkit only emits the notification when the status bar should be hidden. */
- menuBar = visible == 1;
- return COM.S_OK;
-}
-
-int setStatusBarVisible (long /*int*/ sender, int visible) {
- /* Note. Webkit only emits the notification when the status bar should be hidden. */
- statusBar = visible == 1;
- return COM.S_OK;
-}
-
-int setStatusText (long /*int*/ sender, long /*int*/ text) {
- String statusText = WebKit.extractBSTR (text);
- if (statusText.length () == 0) return COM.S_OK;
- StatusTextEvent statusTextEvent = new StatusTextEvent (browser);
- statusTextEvent.display = browser.getDisplay ();
- statusTextEvent.widget = browser;
- statusTextEvent.text = statusText;
- StatusTextListener[] statusTextListeners = browser.webBrowser.statusTextListeners;
- for (int i = 0; i < statusTextListeners.length; i++) {
- statusTextListeners[i].changed (statusTextEvent);
- }
- return COM.S_OK;
-}
-
-int setToolbarsVisible (long /*int*/ sender, int visible) {
- /* Note. Webkit only emits the notification when the status bar should be hidden. */
- toolBar = visible == 1;
- return COM.S_OK;
-}
-
-void showAlertMessage (String title, String message) {
- Shell parent = browser.getShell ();
- final Shell dialog = new Shell (parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
- GridLayout layout = new GridLayout (2, false);
- layout.horizontalSpacing = 10;
- layout.verticalSpacing = 20;
- layout.marginWidth = layout.marginHeight = 10;
- dialog.setLayout (layout);
- dialog.setText (title);
-
- Label label = new Label (dialog, SWT.NONE);
- Image image = dialog.getDisplay ().getSystemImage (SWT.ICON_WARNING);
- label.setImage (image);
-
- label = new Label (dialog, SWT.WRAP);
- label.setText (message);
- Monitor monitor = parent.getMonitor ();
- int maxWidth = monitor.getBounds().width * 2 / 3;
- int width = label.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- GridData data = new GridData (SWT.FILL, SWT.CENTER, true, false);
- data.widthHint = Math.min (width, maxWidth);
- label.setLayoutData (data);
-
- Button ok = new Button (dialog, SWT.PUSH);
- ok.setText (SWT.getMessage ("SWT_OK")); //$NON-NLS-1$
- width = ok.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- GridData layoutData = new GridData ();
- layoutData.horizontalAlignment = SWT.CENTER;
- layoutData.verticalAlignment = SWT.CENTER;
- layoutData.horizontalSpan = 2;
- layoutData.widthHint = Math.max (width, 75);
- ok.setLayoutData (layoutData);
-
- ok.addSelectionListener (new SelectionAdapter () {
- @Override
- public void widgetSelected (SelectionEvent e) {
- dialog.dispose ();
- }
- });
-
- dialog.setDefaultButton (ok);
- dialog.pack ();
- Rectangle parentSize = parent.getBounds ();
- Rectangle dialogSize = dialog.getBounds ();
- int x = parent.getLocation ().x + (parentSize.width - dialogSize.width) / 2;
- int y = parent.getLocation ().y + (parentSize.height - dialogSize.height) / 2;
- dialog.setLocation (x, y);
- dialog.open ();
- Display display = browser.getDisplay ();
- while (!dialog.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
-}
-
-int showConfirmPanel (String title, String message) {
- Shell parent = browser.getShell ();
- final Shell dialog = new Shell (parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
- GridLayout layout = new GridLayout (2, false);
- layout.horizontalSpacing = 10;
- layout.verticalSpacing = 20;
- layout.marginWidth = layout.marginHeight = 10;
- dialog.setLayout (layout);
- dialog.setText (title);
-
- Label label = new Label (dialog, SWT.NONE);
- Image image = dialog.getDisplay ().getSystemImage (SWT.ICON_QUESTION);
- label.setImage (image);
- label.setLayoutData (new GridData ());
-
- label = new Label (dialog, SWT.WRAP);
- label.setText (message);
- Monitor monitor = parent.getMonitor ();
- int maxWidth = monitor.getBounds ().width * 2 / 3;
- int width = label.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- GridData data = new GridData (SWT.FILL, SWT.CENTER, true, false);
- data.widthHint = Math.min (width, maxWidth);
- label.setLayoutData (data);
-
- Composite buttons = new Composite (dialog, SWT.NONE);
- data = new GridData (SWT.CENTER, SWT.CENTER, true, true, 2, 1);
- buttons.setLayoutData (data);
- buttons.setLayout (new GridLayout (2, true));
-
- Button ok = new Button (buttons, SWT.PUSH);
- ok.setText (SWT.getMessage ("SWT_OK")); //$NON-NLS-1$
- GridData layoutData = new GridData ();
- layoutData.horizontalAlignment = SWT.CENTER;
- layoutData.verticalAlignment = SWT.CENTER;
- ok.setLayoutData (layoutData);
-
- Button cancel = new Button (buttons, SWT.PUSH);
- cancel.setText (SWT.getMessage ("SWT_Cancel")); //$NON-NLS-1$
- cancel.setLayoutData (layoutData);
- width = cancel.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- layoutData.widthHint = Math.max (width, 75);
-
- final int[] result = new int[1];
- ok.addSelectionListener (new SelectionAdapter () {
- @Override
- public void widgetSelected (SelectionEvent e) {
- result[0] = SWT.OK;
- dialog.dispose ();
- }
- });
- cancel.addSelectionListener (new SelectionAdapter () {
- @Override
- public void widgetSelected (SelectionEvent e) {
- result[0] = SWT.CANCEL;
- dialog.dispose ();
- }
- });
-
- dialog.setDefaultButton (ok);
- dialog.pack ();
- Rectangle parentSize = parent.getBounds ();
- Rectangle dialogSize = dialog.getBounds ();
- int x = parent.getLocation ().x + (parentSize.width - dialogSize.width) / 2;
- int y = parent.getLocation ().y + (parentSize.height - dialogSize.height) / 2;
- dialog.setLocation (x, y);
- dialog.open ();
- Display display = browser.getDisplay ();
- while (!dialog.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- return result[0];
-}
-
-String showTextPrompter (String title, String message, String defaultText) {
- Shell parent = browser.getShell ();
- final Shell dialog = new Shell (parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
- dialog.setLayout (new GridLayout ());
- dialog.setText (title);
-
- Label label = new Label (dialog, SWT.NONE);
- label.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- label.setText (message);
-
- final Text textBox = new Text (dialog, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- textBox.setLayoutData (data);
- textBox.setText (defaultText);
-
- Composite buttons = new Composite (dialog, SWT.NONE);
- buttons.setLayout (new GridLayout (2, true));
- buttons.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_CENTER));
- Button ok = new Button (buttons, SWT.PUSH);
- ok.setText (SWT.getMessage ("SWT_OK")); //$NON-NLS-1$
- ok.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
-
- final String[] result = new String[1];
- ok.addSelectionListener (new SelectionAdapter () {
- @Override
- public void widgetSelected (SelectionEvent e) {
- result[0] = textBox.getText ();
- dialog.dispose ();
- }
- });
- Button cancel = new Button (buttons, SWT.PUSH);
- cancel.setText (SWT.getMessage ("SWT_Cancel")); //$NON-NLS-1$
- cancel.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- cancel.addSelectionListener (new SelectionAdapter () {
- @Override
- public void widgetSelected (SelectionEvent e) {
- dialog.dispose ();
- }
- });
-
- dialog.setDefaultButton (ok);
- dialog.pack ();
- Rectangle parentSize = parent.getBounds ();
- Rectangle dialogSize = dialog.getBounds ();
- int x = parent.getLocation ().x + (parentSize.width - dialogSize.width) / 2;
- int y = parent.getLocation ().y + (parentSize.height - dialogSize.height) / 2;
- dialog.setLocation (x, y);
- dialog.open ();
- Display display = browser.getDisplay ();
- while (!dialog.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- return result[0];
-}
-
-int takeFocus (long /*int*/ sender, int forward) {
- int traveralCode = forward == 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
- ((WebKit)browser.webBrowser).traverseOut = true;
- browser.traverse (traveralCode);
- return COM.S_OK;
-}
-
-int webViewClose (long /*int*/ sender) {
- WindowEvent newEvent = new WindowEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- CloseWindowListener[] closeWindowListeners = browser.webBrowser.closeWindowListeners;
- for (int i = 0; i < closeWindowListeners.length; i++) {
- closeWindowListeners[i].close (newEvent);
- }
- browser.dispose ();
- return COM.S_OK;
-}
-
-int webViewFrame (long /*int*/ sender, long /*int*/ frame) {
- RECT rect = new RECT ();
- OS.MoveMemory (frame, rect, RECT.sizeof);
- return COM.S_OK;
-}
-
-int webViewShow (long /*int*/ sender) {
- WindowEvent newEvent = new WindowEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- if (location != null) newEvent.location = location;
- if (size != null) newEvent.size = size;
- /*
- * Feature in WebKit. WebKit's tool bar contains
- * the address bar. The address bar is displayed
- * if the tool bar is displayed. There is no separate
- * notification for the address bar.
- */
- newEvent.addressBar = toolBar;
- newEvent.menuBar = menuBar;
- newEvent.statusBar = statusBar;
- newEvent.toolBar = toolBar;
- VisibilityWindowListener[] visibilityWindowListeners = browser.webBrowser.visibilityWindowListeners;
- for (int i = 0; i < visibilityWindowListeners.length; i++) {
- visibilityWindowListeners[i].show (newEvent);
- }
- location = null;
- size = null;
- return COM.S_OK;
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java
deleted file mode 100644
index 228b878aa5..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebCookieManager.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebCookieManager extends IUnknown {
-
-public IWebCookieManager (long /*int*/ address) {
- super (address);
-}
-
-public int cookieStorage (long /*int*/[] storage) {
- return OS.VtblCall (3, getAddress (), storage);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java
deleted file mode 100644
index fa1760dd10..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDataSource.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebDataSource extends IUnknown {
-
-public IWebDataSource (long /*int*/ address) {
- super (address);
-}
-
-public int representation (long /*int*/[] rep) {
- return OS.VtblCall (5, getAddress (), rep);
-}
-
-public int webFrame (long /*int*/[] frame) {
- return OS.VtblCall (6, getAddress (), frame);
-}
-
-public int request (long /*int*/[] request) {
- return OS.VtblCall (8, getAddress (), request);
-}
-
-public int pageTitle (long /*int*/[] title) {
- return OS.VtblCall (12, getAddress (), title);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java
deleted file mode 100644
index 973cde9c49..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDocumentRepresentation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebDocumentRepresentation extends IUnknown {
-
-public IWebDocumentRepresentation (long /*int*/ address) {
- super (address);
-}
-
-public int documentSource (long /*int*/[] source) {
- return OS.VtblCall (8, getAddress (), source);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java
deleted file mode 100644
index 759fa19e07..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebDownload.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebDownload extends IUnknown {
-
-public IWebDownload (long /*int*/ address) {
- super (address);
-}
-
-public int cancel () {
- return OS.VtblCall (4, getAddress ());
-}
-
-public int setDeletesFileUponFailure (int deletesFileUponFailure) {
- return OS.VtblCall (12, getAddress (), deletesFileUponFailure);
-}
-
-public int setDestination (long /*int*/ path, int allowOverwrite) {
- return OS.VtblCall (13, getAddress(), path, allowOverwrite);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java
deleted file mode 100644
index c5d2433082..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebError.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebError extends IUnknown {
-
-public IWebError (long /*int*/ address) {
- super (address);
-}
-
-public int code (int[] result) {
- return OS.VtblCall (4, getAddress (), result);
-}
-
-//public int domain (long /*int*/[] result) {
-// return COM.VtblCall (5, getAddress (), result);
-//}
-
-public int localizedDescription (long /*int*/[] result) {
- return OS.VtblCall (6, getAddress (), result);
-}
-
-//public int localizedFailureReason (long /*int*/[] result) {
-// return COM.VtblCall (7, getAddress (), result);
-//}
-
-//public int userInfo (long /*int*/[] result) {
-//return COM.VtblCall (11, getAddress (), result);
-//}
-
-public int failingURL (long /*int*/[] result) {
- return OS.VtblCall (12, getAddress (), result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java
deleted file mode 100644
index e6cd5d2dcd..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebErrorPrivate.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebErrorPrivate extends IUnknown {
-
-public IWebErrorPrivate (long /*int*/ address) {
- super (address);
-}
-
-public int sslPeerCertificate (long /*int*/[] result) {
- return OS.VtblCall (3, getAddress (), result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java
deleted file mode 100644
index 2c7cfc5771..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFrame.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebFrame extends IUnknown {
-
-public IWebFrame (long /*int*/ address) {
- super (address);
-}
-
-public int loadRequest (long /*int*/ request) {
- return OS.VtblCall (8, getAddress (), request);
-}
-
-public int loadHTMLString (long /*int*/ string, long /*int*/ baseURL) {
- return OS.VtblCall (10, getAddress (), string, baseURL);
-}
-
-public int dataSource (long /*int*/[] source) {
- return OS.VtblCall (13, getAddress (), source);
-}
-
-public long /*int*/ globalContext () {
- return OS.VtblCall (23, getAddress ());
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java
deleted file mode 100644
index 944278a0c2..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebFramePrivate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebFramePrivate extends IUnknown {
-
-public IWebFramePrivate (long /*int*/ address) {
- super (address);
-}
-
-public int setInPrintingMode (int value, long /*int*/ printDC) {
- return OS.VtblCall (8, getAddress (), value, printDC);
-}
-
-public int getPrintedPageCount (long /*int*/ printDC, int[] pageCount) {
- return OS.VtblCall (9, getAddress (), printDC, pageCount);
-}
-
-public int spoolPages (long /*int*/ printDC, int startPage, int endPage, long /*int*/[] ctx) {
- return OS.VtblCall (10, getAddress (), printDC, startPage, endPage, ctx);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java
deleted file mode 100644
index b740a2884b..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebIBActions.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebIBActions extends IUnknown {
-
-public IWebIBActions (long /*int*/ address) {
- super (address);
-}
-
-public int stopLoading (long /*int*/ sender) {
- return OS.VtblCall (4, getAddress (), sender);
-}
-
-public int reload (long /*int*/ sender) {
- return OS.VtblCall (5, getAddress (), sender);
-}
-
-public int canGoBack (long /*int*/ sender, int[] result) {
- return OS.VtblCall (6, getAddress (), sender, result);
-}
-
-public int canGoForward (long /*int*/ sender, int[] result) {
- return OS.VtblCall (8, getAddress (), sender, result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java
deleted file mode 100644
index 8d9ec4ecad..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebMutableURLRequest extends IWebURLRequest {
-
-public IWebMutableURLRequest (long /*int*/ address) {
- super (address);
-}
-
-//public int setHTTPBody (long /*int*/ data) {
-// return COM.VtblCall (21, getAddress (), data);
-//}
-
-//public int setHTTPBodyStream (long /*int*/ data) {
-// return COM.VtblCall (22, getAddress (), data);
-//}
-
-public int setHTTPMethod (int post) {
- return OS.VtblCall (23, getAddress (), post);
-}
-
-public int setURL (long /*int*/ theUrl) {
- return OS.VtblCall (27, getAddress (), theUrl);
-}
-
-public int setValue (long /*int*/ value, long /*int*/ field) {
- return OS.VtblCall (28, getAddress (), value, field);
-}
-
-public int setAllowsAnyHTTPSCertificate () {
- return OS.VtblCall (29, getAddress ());
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java
deleted file mode 100644
index 1511ff332d..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebMutableURLRequestPrivate.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebMutableURLRequestPrivate extends IUnknown {
-
-public IWebMutableURLRequestPrivate (long /*int*/ address) {
- super (address);
-}
-
-//public int setClientCertificate (long /*int*/ cert) {
-//return COM.VtblCall (3, getAddress (), cert);
-//}
-
-public int cfRequest () {
- return OS.VtblCall (4, getAddress ());
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java
deleted file mode 100644
index 36ecccbdc1..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebOpenPanelResultListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebOpenPanelResultListener extends IUnknown {
-
-public IWebOpenPanelResultListener (long /*int*/ address) {
- super (address);
-}
-
-public int chooseFilename (long /*int*/ fileName) {
- return OS.VtblCall (3, getAddress (), fileName);
-}
-
-public int cancel () {
- return OS.VtblCall (4, getAddress ());
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java
deleted file mode 100644
index 58aaf99531..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPolicyDecisionListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebPolicyDecisionListener extends IUnknown{
-
-public IWebPolicyDecisionListener (long /*int*/ address) {
- super (address);
-}
-
-public int use () {
- return OS.VtblCall (3, getAddress ());
-}
-
-public int download () {
- return OS.VtblCall (4, getAddress ());
-}
-
-public int ignore () {
- return OS.VtblCall (5, getAddress ());
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java
deleted file mode 100644
index 59129fb8e5..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebPreferences.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebPreferences extends IUnknown {
-
-public IWebPreferences (long /*int*/ address) {
- super (address);
-}
-
-public int initWithIdentifier (long /*int*/ identifier, long /*int*/[] preferences) {
- return COM.VtblCall (4, getAddress (), identifier, preferences);
-}
-
-public int setJavaEnabled (int enabled) {
- return OS.VtblCall (33, getAddress (), enabled);
-}
-
-public int setJavaScriptEnabled (int enabled) {
- return OS.VtblCall (35, getAddress (), enabled);
-}
-
-public int setJavaScriptCanOpenWindowsAutomatically (int enabled) {
- return OS.VtblCall (37, getAddress (), enabled);
-}
-
-public int setTabsToLinks (int enabled) {
- return OS.VtblCall (52, getAddress (), enabled);
-}
-
-public int setFontSmoothing (int smoothingType) {
- return OS.VtblCall (63, getAddress (), smoothingType);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java
deleted file mode 100644
index e3e3585095..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallenge.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebURLAuthenticationChallenge extends IUnknown {
-
-public IWebURLAuthenticationChallenge (long /*int*/ address) {
- super (address);
-}
-
-public int previousFailureCount (int[] result) {
- return OS.VtblCall (7, getAddress (), result);
-}
-
-public int proposedCredential (long /*int*/[] result) {
- return OS.VtblCall (8, getAddress (), result);
-}
-
-public int protectionSpace (long /*int*/[] result) {
- return OS.VtblCall (9, getAddress (), result);
-}
-
-public int sender (long /*int*/[] sender) {
- return OS.VtblCall (10, getAddress (), sender);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java
deleted file mode 100644
index 4204830d37..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLAuthenticationChallengeSender.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebURLAuthenticationChallengeSender extends IUnknown {
-
-public IWebURLAuthenticationChallengeSender (long /*int*/ address) {
- super (address);
-}
-
-public int cancelAuthenticationChallenge (long /*int*/ challenge) {
- return OS.VtblCall (3, getAddress (), challenge);
-}
-
-public int useCredential (long /*int*/ credential, long /*int*/ challenge) {
- return OS.VtblCall (5, getAddress (), credential, challenge);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java
deleted file mode 100644
index 20378ba106..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLCredential.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebURLCredential extends IUnknown {
-
-public IWebURLCredential (long /*int*/ address) {
- super (address);
-}
-
-public int hasPassword (int[] result) {
- return OS.VtblCall (3, getAddress (), result);
-}
-
-public int initWithUser (long /*int*/ user, long /*int*/ password, long /*int*/ persistence) {
- return OS.VtblCall (4, getAddress (), user, password, persistence);
-}
-
-public int password (long /*int*/[] password) {
- return OS.VtblCall (5, getAddress (), password);
-}
-
-public int user (long /*int*/[] result) {
- return OS.VtblCall (7, getAddress (), result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java
deleted file mode 100644
index aceab44449..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLProtectionSpace.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebURLProtectionSpace extends IUnknown {
-
-public IWebURLProtectionSpace(long /*int*/ address) {
- super(address);
-}
-
-public int host (long /*int*/[] result) {
- return OS.VtblCall (4, getAddress (), result);
-}
-
-public int port (int[] result) {
- return OS.VtblCall (8, getAddress (), result);
-}
-
-public int realm (long /*int*/[] result) {
- return OS.VtblCall (11, getAddress (), result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java
deleted file mode 100644
index 8af8b64bba..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLRequest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebURLRequest extends IUnknown {
-
-public IWebURLRequest (long /*int*/ address) {
- super (address);
-}
-
-//public int HTTPBody (long /*int*/[] result) {
-// return COM.VtblCall (6, getAddress (), result);
-//}
-
-public int HTTPMethod (long /*int*/[] result) {
- return OS.VtblCall (8, getAddress (), result);
-}
-
-public int URL (long /*int*/[] result) {
- return OS.VtblCall (13, getAddress (), result);
-}
-
-public int mutableCopy (long /*int*/[] result) {
- return OS.VtblCall (16, getAddress (), result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java
deleted file mode 100644
index bcff19fdfb..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebURLResponse.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebURLResponse extends IUnknown {
-
-public IWebURLResponse (long /*int*/ address) {
- super (address);
-}
-
-public int expectedContentLength (long[] result) {
- return OS.VtblCall (3, getAddress (), result);
-}
-
-public int URL (long /*int*/[] result) {
- return OS.VtblCall (8, getAddress (), result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java
deleted file mode 100644
index 9369d79767..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebView.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebView extends IUnknown {
-
-public IWebView (long /*int*/ address) {
- super (address);
-}
-
-public int canShowMIMEType (long /*int*/ mimeType, int[] canShow) {
- return OS.VtblCall (3, getAddress (), mimeType, canShow);
-}
-
-public int initWithFrame (RECT frame, long /*int*/ frameName, long /*int*/ groupName) {
- return COM.VtblCall (9, getAddress(), frame, frameName, groupName);
-}
-
-public int setUIDelegate (long /*int*/ delegate) {
- return OS.VtblCall (10, getAddress (), delegate);
-}
-
-public int setResourceLoadDelegate (long /*int*/ delegate) {
- return OS.VtblCall (12, getAddress (), delegate);
-}
-
-public int setDownloadDelegate (long /*int*/ delegate) {
- return OS.VtblCall (14, getAddress (), delegate);
-}
-
-public int setFrameLoadDelegate (long /*int*/ delegate) {
- return OS.VtblCall (16, getAddress (), delegate);
-}
-
-public int setPolicyDelegate (long /*int*/ delegate) {
- return OS.VtblCall (18, getAddress (), delegate);
-}
-
-public int mainFrame (long /*int*/[] frame) {
- return OS.VtblCall (20, getAddress (), frame);
-}
-
-public int goBack (int[] succeeded) {
- return OS.VtblCall (24, getAddress(), succeeded);
-}
-
-public int goForward (int[] succeeded) {
- return OS.VtblCall (25, getAddress(), succeeded);
-}
-
-public int setCustomUserAgent (long /*int*/ valueString) {
- return OS.VtblCall (31, getAddress (), valueString);
-}
-
-public int setPreferences (long /*int*/ prefs) {
- return OS.VtblCall (41, getAddress (), prefs);
-}
-
-public int preferences (long /*int*/[] prefs) {
- return OS.VtblCall (42, getAddress (), prefs);
-}
-
-public int setHostWindow (long /*int*/ window) {
- return OS.VtblCall (45, getAddress (), window);
-}
-
-public int hostWindow (long /*int*/[] window) {
- return OS.VtblCall (46, getAddress (), window);
-}
-
-public int estimatedProgress (long /*int*/ estimatedProgress) {
- return OS.VtblCall (51, getAddress (), estimatedProgress);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java
deleted file mode 100644
index 2e650be341..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/IWebViewPrivate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-public class IWebViewPrivate extends IUnknown {
-
-public IWebViewPrivate (long /*int*/ address) {
- super (address);
-}
-
-public int viewWindow (long /*int*/[] window) {
- return OS.VtblCall (5, getAddress (), window);
-}
-
-public int setInitialFocus (int forwardEnabled) {
- return OS.VtblCall (28, getAddress (), forwardEnabled);
-}
-
-public int shouldClose (int[] result) {
- return OS.VtblCall (33, getAddress (), result);
-}
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java
deleted file mode 100644
index 057e9af2f1..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-/** @jniclass flags=cpp */
-public class JSClassDefinition {
- public int version;
- /** @field cast=(JSClassAttributes) */
- public int attributes;
- /** @field cast=(const char*) */
- public long /*int*/ className;
- /** @field cast=(JSClassRef) */
- public long /*int*/ parentClass;
- /** @field cast=(const JSStaticValue*) */
- public long /*int*/ staticValues;
- /** @field cast=(const JSStaticFunction*) */
- public long /*int*/ staticFunctions;
- /** @field cast=(JSObjectInitializeCallback) */
- public long /*int*/ initialize;
- /** @field cast=(JSObjectFinalizeCallback) */
- public long /*int*/ finalize;
- /** @field cast=(JSObjectHasPropertyCallback) */
- public long /*int*/ hasProperty;
- /** @field cast=(JSObjectGetPropertyCallback) */
- public long /*int*/ getProperty;
- /** @field cast=(JSObjectSetPropertyCallback) */
- public long /*int*/ setProperty;
- /** @field cast=(JSObjectDeletePropertyCallback) */
- public long /*int*/ deleteProperty;
- /** @field cast=(JSObjectGetPropertyNamesCallback) */
- public long /*int*/ getPropertyNames;
- /** @field cast=(JSObjectCallAsFunctionCallback) */
- public long /*int*/ callAsFunction;
- /** @field cast=(JSObjectCallAsConstructorCallback) */
- public long /*int*/ callAsConstructor;
- /** @field cast=(JSObjectHasInstanceCallback) */
- public long /*int*/ hasInstance;
- /** @field cast=(JSObjectConvertToTypeCallback) */
- public long /*int*/ convertToType;
-
- public static final int sizeof = WebKit_win32.JSClassDefinition_sizeof();
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java
deleted file mode 100644
index b266bd8c71..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.webkit;
-
-
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-/** @jniclass flags=cpp */
-public class WebKit_win32 extends C {
- //public static final GUID CLSID_DOMEventListener = IIDFromString("{AC3D1BC3-4976-4431-8A19-4812C5EFE39C}"); //$NON-NLS-1$
- public static final GUID CLSID_WebCookieManager = IIDFromString("{3F35F332-BB2B-49b3-AEDD-27B317687E07}"); //$NON-NLS-1$
- public static final GUID CLSID_WebMutableURLRequest = IIDFromString("{a062ecc3-bb1b-4694-a569-f59e0ad6be0c}"); //$NON-NLS-1$
- public static final GUID CLSID_WebPreferences = IIDFromString("{67B89F90-F778-438B-ABBF-34D1ACBF8651}"); //$NON-NLS-1$
- public static final GUID CLSID_WebURLCredential = IIDFromString("{7433F53B-7FE9-484a-9432-72909457A646}"); //$NON-NLS-1$
- public static final GUID CLSID_WebView = IIDFromString("{d6bca079-f61c-4e1e-b453-32a0477d02e3}"); //$NON-NLS-1$
- //public static final GUID IID_IDOMEventListener = IIDFromString("{7f8a0a96-f864-44fb-87fb-c5f03666e8e6}"); //$NON-NLS-1$
- public static final GUID IID_IWebCookieManager = IIDFromString("{7053FE94-3623-444f-A298-209A90879A8C}"); //$NON-NLS-1$
- public static final GUID IID_IWebDownloadDelegate = IIDFromString("{16A32AE6-C862-40cd-9225-2CAF823F40F9}"); //$NON-NLS-1$
- public static final GUID IID_IWebErrorPrivate = IIDFromString("{19FED49C-7016-48a6-B5C6-07ADE116531B}"); //$NON-NLS-1$
- public static final GUID IID_IWebFrameLoadDelegate = IIDFromString("{3354665B-84BA-4fdf-B35E-BF5CF9D96026}"); //$NON-NLS-1$
- public static final GUID IID_IWebFramePrivate = IIDFromString("{A1657D07-4881-4475-9D10-76548731D448}"); //$NON-NLS-1$
- public static final GUID IID_IWebIBActions = IIDFromString("{8F0E3A30-B924-44f8-990A-1AE61ED6C632}"); //$NON-NLS-1$
- public static final GUID IID_IWebMutableURLRequest = IIDFromString("{C4042773-371F-427e-AFA9-9D4B358A0D93}"); //$NON-NLS-1$
- public static final GUID IID_IWebMutableURLRequestPrivate = IIDFromString("{AD675B60-2CE9-478c-B2AA-CAD643FF18AC}"); //$NON-NLS-1$;
- public static final GUID IID_IWebPolicyDelegate = IIDFromString("{9B0BAE6C-A496-4000-9E22-2E89F0747401}"); //$NON-NLS-1$
- public static final GUID IID_IWebPreferences = IIDFromString("{0930D594-A5A3-46e1-858E-AB17A13CD28E}"); //$NON-NLS-1$
- public static final GUID IID_IWebResourceLoadDelegate = IIDFromString("{AF3289AA-90DB-4ca4-A112-A1E5F0517953}"); //$NON-NLS-1$
- public static final GUID IID_IWebUIDelegate = IIDFromString("{042B7EE3-A5A4-4a8f-8C33-775CD9E89C7C}"); //$NON-NLS-1$
- public static final GUID IID_IWebURLCredential = IIDFromString("{A1E9D765-FACE-4189-BBE3-AED7EBF65EBD}"); //$NON-NLS-1$
- public static final GUID IID_IWebView = IIDFromString("{174BBEFD-058E-49C7-91DF-6F110AA4AC28}"); //$NON-NLS-1$
- public static final GUID IID_IWebViewPrivate = IIDFromString("{44914369-DEB5-4fcf-A6A3-30C02E73154F}"); //$NON-NLS-1$
-
- public static final int CFHTTPCookieSessionOnlyFlag = 1 << 1;
- public static final int FontSmoothingTypeWindows = 4;
- public static final int kCFStringEncodingUTF8 = 0x08000100;
-
- public static final int kJSTypeUndefined = 0;
- public static final int kJSTypeNull = 1;
- public static final int kJSTypeBoolean = 2;
- public static final int kJSTypeNumber = 3;
- public static final int kJSTypeString = 4;
- public static final int kJSTypeObject = 5;
-
- public static final int WebURLCredentialPersistenceForSession = 1;
- public static final int WebURLErrorBadURL = -1000;
- public static final int WebURLErrorServerCertificateNotYetValid = -1204;
- public static final int WebURLErrorSecureConnectionFailed = -1200;
-
-static GUID IIDFromString (String lpsz) {
- int length = lpsz.length ();
- char[] buffer = new char[length + 1];
- lpsz.getChars (0, length, buffer, 0);
- GUID lpiid = new GUID ();
- if (COM.IIDFromString (buffer, lpiid) == COM.S_OK) return lpiid;
- return null;
-}
-
-/**
- * @param theArray cast=(CFArrayRef)
- */
-public static final native int CFArrayGetCount (long /*int*/ theArray);
-/**
- * @param theArray cast=(CFArrayRef)
- * @param idx cast=(CFIndex)
- */
-public static final native long /*int*/ CFArrayGetValueAtIndex (long /*int*/ theArray, int idx);
-/**
- * @param allocator cast=(CFAllocatorRef)
- * @param bytes cast=(const UInt8 *)
- * @param length cast=(CFIndex)
- */
-public static final native long /*int*/ CFDataCreate (long /*int*/ allocator, byte [] bytes, int length);
-/**
- * @param theData cast=(CFDataRef)
- */
-public static final native long /*int*/ CFDataGetBytePtr (long /*int*/ theData);
-/**
- * @param theData cast=(CFDataRef)
- */
-public static final native int CFDataGetLength (long /*int*/ theData);
-/**
- * @param allocator cast=(CFAllocatorRef)
- * @param keys cast=(const void **)
- * @param values cast=(const void **)
- * @param numValues cast=(CFIndex)
- * @param keyCallBacks cast=(const CFDictionaryKeyCallBacks *)
- * @param valueCallBacks cast=(const CFDictionaryValueCallBacks *)
- */
-public static final native long /*int*/ CFDictionaryCreate (long /*int*/ allocator, long /*int*/[] keys, long /*int*/[] values, int numValues, long /*int*/ keyCallBacks, long /*int*/ valueCallBacks);
-/**
- * @param inAllocator cast=(CFAllocatorRef)
- * @param headerFields cast=(CFDictionaryRef)
- * @param inURL cast=(CFURLRef)
- */
-public static final native long /*int*/ CFHTTPCookieCreateWithResponseHeaderFields (long /*int*/ inAllocator, long /*int*/ headerFields, long /*int*/ inURL);
-/**
- * @param inCookie cast=(CFHTTPCookieRef)
- */
-public static final native int CFHTTPCookieGetFlags (long /*int*/ inCookie);
-/**
- * @param inCookie cast=(CFHTTPCookieRef)
- */
-public static final native long /*int*/ CFHTTPCookieGetName (long /*int*/ inCookie);
-/**
- * @param inCookie cast=(CFHTTPCookieRef)
- */
-public static final native long /*int*/ CFHTTPCookieGetValue (long /*int*/ inCookie);
-/**
- * @param inCookieStorage cast=(CFHTTPCookieStorageRef)
- */
-public static final native long /*int*/ CFHTTPCookieStorageCopyCookies (long /*int*/ inCookieStorage);
-/**
- * @param inCookieStorage cast=(CFHTTPCookieStorageRef)
- * @param inURL cast=(CFURLRef)
- * @param sendSecureCookies cast=(Boolean)
- */
-public static final native long /*int*/ CFHTTPCookieStorageCopyCookiesForURL (long /*int*/ inCookieStorage, long /*int*/ inURL, boolean sendSecureCookies);
-/**
- * @param inCookieStorage cast=(CFHTTPCookieStorageRef)
- * @param inCookie cast=(CFHTTPCookieRef)
- */
-public static final native void CFHTTPCookieStorageDeleteCookie (long /*int*/ inCookieStorage, long /*int*/ inCookie);
-/**
- * @param inCookieStorage cast=(CFHTTPCookieStorageRef)
- * @param inCookie cast=(CFHTTPCookieRef)
- */
-public static final native void CFHTTPCookieStorageSetCookie (long /*int*/ inCookieStorage, long /*int*/ inCookie);
-/**
- * @param cf cast=(CFTypeRef)
- */
-public static final native void CFRelease (long /*int*/ cf);
-/**
- * @param alloc cast=(CFAllocatorRef)
- * @param chars cast=(const UniChar *)
- * @param numChars cast=(CFIndex)
- */
-public static final native int CFStringCreateWithCharacters (long /*int*/ alloc, char[] chars, int numChars);
-/**
- * @param theString cast=(CFStringRef)
- * @param idx cast=(CFIndex)
- */
-public static final native char CFStringGetCharacterAtIndex (long /*int*/ theString, int idx);
-/**
- * @param theString cast=(CFStringRef)
- */
-public static final native long /*int*/ CFStringGetCharactersPtr (long /*int*/ theString);
-/**
- * @param theString cast=(CFStringRef)
- */
-public static final native int CFStringGetLength (long /*int*/ theString);
-/**
- * @param allocator cast=(CFAllocatorRef)
- * @param URLString cast=(CFStringRef)
- * @param baseURL cast=(CFURLRef)
- */
-public static final native long /*int*/ CFURLCreateWithString (long /*int*/ allocator, long /*int*/ URLString, long /*int*/ baseURL);
-/**
- * @param alloc cast=(CFAllocatorRef)
- * @param origRequest cast=(CFURLRequestRef)
- */
-public static final native long /*int*/ CFURLRequestCreateMutableCopy (long /*int*/ alloc, long /*int*/ origRequest);
-/**
- * @param request cast=(CFURLRequestRef)
- */
-public static final native long /*int*/ CFURLRequestCopyHTTPRequestBody (long /*int*/ request);
-/**
- * @param mutableHTTPRequest cast=(CFMutableURLRequestRef)
- * @param httpBody cast=(CFDataRef)
- */
-public static final native void CFURLRequestSetHTTPRequestBody (long /*int*/ mutableHTTPRequest, long /*int*/ httpBody);
-/**
- * @param mutableRequest cast=(CFMutableURLRequestRef)
- * @param url cast=(CFURLRef)
- */
-public static final native void CFURLRequestSetURL (long /*int*/ mutableRequest, long /*int*/ url);
-
-/**
- * @param definition cast=(const JSClassDefinition*)
- */
-public static final native long /*int*/ JSClassCreate (long /*int*/ definition);
-/**
- * @param jsClass cast=(JSClassRef)
- */
-public static final native long /*int*/ JSClassRetain (long /*int*/ jsClass);
-/**
- * @param ctx cast=(JSContextRef)
- */
-public static final native long /*int*/ JSContextGetGlobalObject (long /*int*/ ctx);
-/**
- * @param ctx cast=(JSContextRef)
- * @param script cast=(JSStringRef)
- * @param thisObject cast=(JSObjectRef)
- * @param sourceURL cast=(JSStringRef)
- * @param exception cast=(JSValueRef *)
- */
-public static final native long /*int*/ JSEvaluateScript (long /*int*/ ctx, long /*int*/ script, long /*int*/ thisObject, long /*int*/ sourceURL, int startingLineNumber, long /*int*/[] exception);
-/**
- * @param ctx cast=(JSGlobalContextRef)
- */
-public static final native int JSGlobalContextRetain (long /*int*/ ctx);
-/**
- * @param object cast=(JSObjectRef)
- */
-public static final native long /*int*/ JSObjectGetPrivate (long /*int*/ object);
-/**
- * @param ctx cast=(JSContextRef)
- * @param object cast=(JSObjectRef)
- * @param propertyName cast=(JSStringRef)
- * @param exception cast=(JSValueRef*)
- */
-public static final native long /*int*/ JSObjectGetProperty (long /*int*/ ctx, long /*int*/ object, long /*int*/ propertyName, long /*int*/[] exception);
-/**
- * @param ctx cast=(JSContextRef)
- * @param object cast=(JSObjectRef)
- * @param propertyIndex cast=(unsigned)
- * @param exception cast=(JSValueRef*)
- */
-public static final native long /*int*/ JSObjectGetPropertyAtIndex (long /*int*/ ctx, long /*int*/ object, int propertyIndex, long /*int*/[] exception);
-/**
- * @param ctx cast=(JSContextRef)
- * @param jsClass cast=(JSClassRef)
- * @param data cast=(void *)
- */
-public static final native int JSObjectMake (long /*int*/ ctx, long /*int*/ jsClass, long /*int*/ data);
-/**
- * @param ctx cast=(JSContextRef)
- * @param argumentCount cast=(size_t)
- * @param arguments cast=(const struct OpaqueJSValue * const*)
- * @param exception cast=(JSValueRef*)
- */
-public static final native long /*int*/ JSObjectMakeArray (long /*int*/ ctx, long /*int*/ argumentCount, long /*int*/[] arguments, long /*int*/[] exception);
-/**
- * @param ctx cast=(JSContextRef)
- * @param name cast=(JSStringRef)
- * @param callAsFunction cast=(JSObjectCallAsFunctionCallback)
- */
-public static final native int JSObjectMakeFunctionWithCallback (long /*int*/ ctx, long /*int*/ name, long /*int*/ callAsFunction);
-/**
- * @param ctx cast=(JSContextRef)
- * @param object cast=(JSObjectRef)
- * @param propertyName cast=(JSStringRef)
- * @param value cast=(JSValueRef)
- * @param attributes cast=(JSPropertyAttributes)
- * @param exception cast=(JSValueRef *)
- */
-public static final native void JSObjectSetProperty (long /*int*/ ctx, long /*int*/ object, long /*int*/ propertyName, long /*int*/ value, long /*int*/ attributes, long /*int*/[] exception);
-/**
- * @param string cast=(const char*)
- */
-public static final native long /*int*/ JSStringCreateWithUTF8CString (byte[] string);
-/**
- * @param string cast=(JSStringRef)
- */
-public static final native int JSStringGetLength (long /*int*/ string);
-/**
- * @param string cast=(JSStringRef)
- */
-public static final native long /*int*/ JSStringGetMaximumUTF8CStringSize (long /*int*/ string);
-/**
- * @param string cast=(JSStringRef)
- * @param buffer cast=(char *)
- * @param bufferSize cast=(size_t)
- */
-public static final native int JSStringGetUTF8CString (long /*int*/ string, byte[] buffer, long /*int*/ bufferSize);
-/**
- * @param a cast=(JSStringRef)
- * @param b cast=(const char *)
- */
-public static final native int JSStringIsEqualToUTF8CString (long /*int*/ a, byte[] b);
-/**
- * @param string cast=(JSStringRef)
- */
-public static final native void JSStringRelease (long /*int*/ string);
-/**
- * @param ctx cast=(JSContextRef)
- * @param value cast=(JSValueRef)
- */
-public static final native int JSValueGetType (long /*int*/ ctx, long /*int*/ value);
-/**
- * @param ctx cast=(JSContextRef)
- * @param value cast=(JSValueRef)
- * @param jsClass cast=(JSClassRef)
- */
-public static final native int JSValueIsObjectOfClass (long /*int*/ ctx, long /*int*/ value, long /*int*/ jsClass);
-/**
- * @param ctx cast=(JSContextRef)
- * @param b cast=(bool)
- */
-public static final native long /*int*/ JSValueMakeBoolean (long /*int*/ ctx, long /*int*/ b);
-/**
- * @param ctx cast=(JSContextRef)
- */
-public static final native long /*int*/ JSValueMakeNull (long /*int*/ ctx);
-/**
- * @param ctx cast=(JSContextRef)
- * @param number cast=(double)
- */
-public static final native long /*int*/ JSValueMakeNumber (long /*int*/ ctx, double number);
-/**
- * @param ctx cast=(JSContextRef)
- * @param string cast=(JSStringRef)
- */
-public static final native long /*int*/ JSValueMakeString (long /*int*/ ctx, long /*int*/ string);
-/**
- * @param ctx cast=(JSContextRef)
- */
-public static final native long /*int*/ JSValueMakeUndefined (long /*int*/ ctx);
-/**
- * @param ctx cast=(JSContextRef)
- * @param value cast=(JSValueRef)
- * @param exception cast=(JSValueRef*)
- */
-public static final native double JSValueToNumber (long /*int*/ ctx, long /*int*/ value, long /*int*/[] exception);
-/**
- * @param ctx cast=(JSContextRef)
- * @param value cast=(JSValueRef)
- * @param exception cast=(JSValueRef*)
- */
-public static final native long /*int*/ JSValueToStringCopy (long /*int*/ ctx, long /*int*/ value, long /*int*/[] exception);
-/** @method flags=const address*/
-public static final native long /*int*/ kCFCopyStringDictionaryKeyCallBacks ();
-/** @method flags=const address*/
-public static final native long /*int*/ kCFTypeDictionaryValueCallBacks ();
-
-public static final native int JSClassDefinition_sizeof ();
-/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
-public static final native void memmove (long /*int*/ dest, JSClassDefinition src, long /*int*/ size);
-/** @method flags=no_gen */
-public static final native int WebKitCreateInstance (byte[] rclsid, long /*int*/ pUnkOuter, byte[] refiid, long /*int*/[] ppvObject);
-public static final int WebKitCreateInstance (GUID clsid, long /*int*/ pUnkOuter, GUID iid, long /*int*/[] ppvObject) {
- byte[] rclsid = new byte[GUID.sizeof];
- OS.IIDFromString ((clsid.toString () + '\0').toCharArray (), rclsid);
- byte[] refiid = new byte[GUID.sizeof];
- OS.IIDFromString ((iid.toString () + '\0').toCharArray (), refiid);
- return WebKitCreateInstance (rclsid, pUnkOuter, refiid, ppvObject);
-}
-
-/** @method flags=no_gen */
-public static final native long /*int*/ JSObjectCallAsFunctionProc_CALLBACK (long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ JSObjectGetPropertyProc_CALLBACK (long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ JSObjectHasPropertyProc_CALLBACK (long /*int*/ func);
-/** @method flags=no_gen */
-public static final native long /*int*/ willPerformClientRedirectToURL_CALLBACK (long /*int*/ func);
-
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java
index 376aeda330..d7ca68d513 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -218,6 +218,7 @@ public Path (Device device, PathData data) {
*/
public void addArc(float x, float y, float width, float height, float startAngle, float arcAngle) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (width == 0 || height == 0 || arcAngle == 0) return;
x = DPIUtil.autoScaleUp(x);
y = DPIUtil.autoScaleUp(y);
width = DPIUtil.autoScaleUp(width);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java
index 57fa683574..886a2a1819 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,14 +17,13 @@ package org.eclipse.swt.graphics;
import org.eclipse.swt.*;
/**
- * Instances of this class manage the operating system resources that
- * implement SWT's RGB color model. To create a color you can either
+ * Instances of this store color information. To create a color you can either
* specify the individual color components as integers in the range
* 0 to 255 or provide an instance of an <code>RGB</code> or <code>RGBA</code>.
* <p>
- * Application code must explicitly invoke the <code>Color.dispose()</code>
- * method to release the operating system resources managed by each instance
- * when those instances are no longer required.
+ * Colors do not need to be disposed, however to maintain compatibility
+ * with older code, disposing a Color is not an error. As Colors do not require
+ * disposal, the constructors which do not require a Device are recommended.
* </p>
*
* @see RGB
@@ -47,7 +46,11 @@ public final class Color extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public double /*float*/ [] handle;
+ public double [] handle;
+
+Color() {
+ super();
+}
Color(Device device) {
super(device);
@@ -56,14 +59,7 @@ Color(Device device) {
/**
* Constructs a new instance of this class given a device and the
* desired red, green and blue values expressed as ints in the range
- * 0 to 255 (where 0 is black and 255 is full brightness). On limited
- * color devices, the color instance created by this call may not have
- * the same RGB values as the ones specified by the arguments. The
- * RGB values on the returned instance will be the color values of
- * the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
+ * 0 to 255 (where 0 is black and 255 is full brightness).
*
* @param device the device on which to allocate the color
* @param red the amount of red in the color
@@ -75,7 +71,7 @@ Color(Device device) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(int, int, int) The equivalent constructor not requiring a Device
*/
public Color(Device device, int red, int green, int blue) {
super(device);
@@ -84,16 +80,28 @@ public Color(Device device, int red, int green, int blue) {
}
/**
+ * Constructs a new instance of this class given the
+ * desired red, green and blue values expressed as ints in the range
+ * 0 to 255 (where 0 is black and 255 is full brightness).
+ *
+ * @param red the amount of red in the color
+ * @param green the amount of green in the color
+ * @param blue the amount of blue in the color
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
+ * </ul>
+ * @since 3.115
+ */
+public Color(int red, int green, int blue) {
+ super();
+ init(red, green, blue, 255);
+}
+
+/**
* Constructs a new instance of this class given a device and the
* desired red, green, blue &amp; alpha values expressed as ints in the range
- * 0 to 255 (where 0 is black and 255 is full brightness). On limited
- * color devices, the color instance created by this call may not have
- * the same RGB values as the ones specified by the arguments. The
- * RGB values on the returned instance will be the color values of
- * the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
+ * 0 to 255 (where 0 is black and 255 is full brightness).
*
* @param device the device on which to allocate the color
* @param red the amount of red in the color
@@ -106,7 +114,8 @@ public Color(Device device, int red, int green, int blue) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(int, int, int, int) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, int red, int green, int blue, int alpha) {
@@ -116,15 +125,29 @@ public Color(Device device, int red, int green, int blue, int alpha) {
}
/**
+ * Constructs a new instance of this class given the
+ * desired red, green, blue &amp; alpha values expressed as ints in the range
+ * 0 to 255 (where 0 is black and 255 is full brightness).
+ *
+ * @param red the amount of red in the color
+ * @param green the amount of green in the color
+ * @param blue the amount of blue in the color
+ * @param alpha the amount of alpha in the color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(int red, int green, int blue, int alpha) {
+ super();
+ init(red, green, blue, alpha);
+}
+
+/**
* Constructs a new instance of this class given a device and an
* <code>RGB</code> describing the desired red, green and blue values.
- * On limited color devices, the color instance created by this call
- * may not have the same RGB values as the ones specified by the
- * argument. The RGB values on the returned instance will be the color
- * values of the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgb the RGB values of the desired color
@@ -135,7 +158,7 @@ public Color(Device device, int red, int green, int blue, int alpha) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green or blue components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGB) The equivalent constructor not requiring a Device
*/
public Color(Device device, RGB rgb) {
super(device);
@@ -145,15 +168,26 @@ public Color(Device device, RGB rgb) {
}
/**
+ * Constructs a new instance of this class given an
+ * <code>RGB</code> describing the desired red, green and blue values.
+ *
+ * @param rgb the RGB values of the desired color
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgb argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green or blue components of the argument are not between 0 and 255</li>
+ * </ul>
+ * @since 3.115
+ */
+public Color(RGB rgb) {
+ super();
+ if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgb.red, rgb.green, rgb.blue, 255);
+}
+
+/**
* Constructs a new instance of this class given a device and an
* <code>RGBA</code> describing the desired red, green, blue &amp; alpha values.
- * On limited color devices, the color instance created by this call
- * may not have the same RGBA values as the ones specified by the
- * argument. The RGBA values on the returned instance will be the color
- * values of the operating system color + alpha.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgba the RGBA values of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
@@ -164,7 +198,8 @@ public Color(Device device, RGB rgb) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGBA) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, RGBA rgba) {
@@ -175,16 +210,28 @@ public Color(Device device, RGBA rgba) {
}
/**
+ * Constructs a new instance of this class given an
+ * <code>RGBA</code> describing the desired red, green, blue &amp; alpha values.
+ *
+ * @param rgba the RGBA values of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgba argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(RGBA rgba) {
+ super();
+ if (rgba == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgba.rgb.red, rgba.rgb.green, rgba.rgb.blue, rgba.alpha);
+}
+
+/**
* Constructs a new instance of this class given a device, an
* <code>RGB</code> describing the desired red, green and blue values,
* alpha specifying the level of transparency.
- * On limited color devices, the color instance created by this call
- * may not have the same RGB values as the ones specified by the
- * argument. The RGB values on the returned instance will be the color
- * values of the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgb the RGB values of the desired color
@@ -196,7 +243,8 @@ public Color(Device device, RGBA rgba) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGB, int) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, RGB rgb, int alpha) {
@@ -206,12 +254,68 @@ public Color(Device device, RGB rgb, int alpha) {
init();
}
+/**
+ * Constructs a new instance of this class given an
+ * <code>RGB</code> describing the desired red, green and blue values,
+ * alpha specifying the level of transparency.
+ *
+ * @param rgb the RGB values of the desired color
+ * @param alpha the alpha value of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgb argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(RGB rgb, int alpha) {
+ super();
+ if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgb.red, rgb.green, rgb.blue, alpha);
+}
+
@Override
void destroy() {
handle = null;
}
/**
+ * Colors do not need to be disposed, however to maintain compatibility
+ * with older code, disposing a Color is not an error.
+ */
+@Override
+public void dispose() {
+ // Does as below to maintain API contract with Resource. Does
+ // not use super.dispose() because that untracks the Color
+ // from the Device tracking, however init() is overridden
+ // to prevent the tracking in the first place.
+ destroy();
+ device = null;
+}
+
+/**
+ * Returns the <code>Device</code> where this resource was
+ * created. In cases where no <code>Device</code> was used
+ * at creation, returns the current or default Device.
+ *
+ * <p>
+ * As Color does not require a Device it is recommended to not
+ * use {@link Color#getDevice()}.
+ * </p>
+ *
+ * @return <code>Device</code> the device of the receiver
+ * @since 3.2
+ */
+@Override
+public Device getDevice() {
+ // Fall back on Device.getDevice only if we haven't been disposed
+ // already.
+ if (this.device == null && this.handle != null) return Device.getDevice();
+ return super.getDevice();
+}
+
+/**
* Compares the argument to the receiver, and returns true
* if they represent the <em>same</em> object using a class
* specific comparison.
@@ -226,9 +330,10 @@ public boolean equals(Object object) {
if (object == this) return true;
if (!(object instanceof Color)) return false;
Color color = (Color)object;
- double /*float*/ [] rgbColor = color.handle;
+ if (isDisposed() || color.isDisposed()) return false;
+ double [] rgbColor = color.handle;
if (handle == rgbColor) return true;
- return device == color.device &&
+ return
(int)(handle[0] * 255) == (int)(rgbColor[0] * 255) &&
(int)(handle[1] * 255) == (int)(rgbColor[1] * 255) &&
(int)(handle[2] * 255) == (int)(rgbColor[2] * 255) &&
@@ -353,8 +458,8 @@ public RGBA getRGBA () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Color cocoa_new(Device device, double /*float*/ [] handle) {
- double /*float*/ [] rgbColor = handle;
+public static Color cocoa_new(Device device, double [] handle) {
+ double [] rgbColor = handle;
Color color = new Color(device);
color.handle = rgbColor;
return color;
@@ -376,8 +481,8 @@ public static Color cocoa_new(Device device, double /*float*/ [] handle) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Color cocoa_new(Device device, double /*float*/ [] handle, int alpha) {
- double /*float*/ [] rgbColor = handle;
+public static Color cocoa_new(Device device, double [] handle, int alpha) {
+ double [] rgbColor = handle;
Color color = new Color(device);
color.handle = rgbColor;
color.handle[3] = alpha / 255f;
@@ -397,8 +502,6 @@ public static Color cocoa_new(Device device, double /*float*/ [] handle, int alp
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
* </ul>
- *
- * @see #dispose
*/
void init(int red, int green, int blue, int alpha) {
if ((red > 255) || (red < 0) ||
@@ -407,7 +510,7 @@ void init(int red, int green, int blue, int alpha) {
(alpha > 255) || (alpha < 0)) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] rgbColor = new double /*float*/ [4];
+ double [] rgbColor = new double [4];
rgbColor[0] = red / 255f;
rgbColor[1] = green / 255f;
rgbColor[2] = blue / 255f;
@@ -415,6 +518,14 @@ void init(int red, int green, int blue, int alpha) {
handle = rgbColor;
}
+@Override
+void init() {
+ // Resource init simply tracks this resource in the Device
+ // if DEBUG is on. Since Colors don't require disposal,
+ // the tracking would be a memory leak and a misreport
+ // on what resources are in use.
+}
+
/**
* Returns <code>true</code> if the color has been disposed,
* and <code>false</code> otherwise.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java
index 1811b92c9d..5541965dc5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java
@@ -112,7 +112,7 @@ public final class Cursor extends Resource {
if (!new NSObject(OS.class_NSCursor).respondsToSelector(OS.sel_busyButClickableCursor)) {
return null;
}
- long /*int*/ result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_busyButClickableCursor);
+ long result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_busyButClickableCursor);
return result != 0 ? new NSCursor(result) : null;
}
@@ -200,7 +200,14 @@ public Cursor(Device device, int style) {
case SWT.CURSOR_SIZESW: handle = NSCursor.crosshairCursor(); break;
case SWT.CURSOR_SIZENW: handle = NSCursor.crosshairCursor(); break;
case SWT.CURSOR_UPARROW: handle = NSCursor.crosshairCursor(); break;
- case SWT.CURSOR_IBEAM: shouldCreateCursor = true; break;
+ case SWT.CURSOR_IBEAM:
+ // Before 10.14, I-Beam cursor is nearly invisible on a dark background
+ if (OS.VERSION < OS.VERSION(10, 14, 0)) {
+ shouldCreateCursor = true;
+ } else {
+ handle = NSCursor.IBeamCursor();
+ }
+ break;
case SWT.CURSOR_NO: handle = NSCursor.operationNotAllowedCursor(); break;
default:
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -479,7 +486,7 @@ public boolean equals (Object object) {
*/
@Override
public int hashCode () {
- return handle != null ? (int)/*64*/handle.id : 0;
+ return handle != null ? (int)handle.id : 0;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
index 0227989dc7..e32f57ca4c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
@@ -14,6 +14,7 @@
package org.eclipse.swt.graphics;
import org.eclipse.swt.*;
+import org.eclipse.swt.internal.ExceptionStash;
import org.eclipse.swt.internal.cocoa.*;
/**
@@ -111,9 +112,7 @@ public Device(DeviceData data) {
tracking = data.tracking;
}
if (tracking) {
- errors = new Error [128];
- objects = new Object [128];
- trackingLock = new Object ();
+ startTracking();
}
if (NSThread.isMainThread()) {
NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
@@ -135,6 +134,52 @@ public Device(DeviceData data) {
}
/**
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * @since 3.115
+ */
+public boolean isTracking() {
+ checkDevice();
+ return tracking;
+}
+
+/**
+ * @exception SWTException <ul>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * @since 3.115
+ */
+public void setTracking(boolean tracking) {
+ checkDevice();
+ if (tracking == this.tracking) {
+ return;
+ }
+ this.tracking = tracking;
+ if (tracking) {
+ startTracking();
+ } else {
+ stopTracking();
+ }
+}
+
+private void startTracking() {
+ errors = new Error [128];
+ objects = new Object [128];
+ trackingLock = new Object ();
+}
+
+private void stopTracking() {
+ synchronized (trackingLock) {
+ objects = null;
+ errors = null;
+ trackingLock = null;
+ }
+}
+
+
+/**
* Throws an <code>SWTException</code> if the receiver can not
* be accessed by the caller. This may include both checks on
* the state of the receiver and more generally on the entire
@@ -187,17 +232,25 @@ protected void create (DeviceData data) {
*/
public void dispose () {
synchronized (Device.class) {
- if (isDisposed()) return;
- checkDevice ();
- release ();
- destroy ();
- disposed = true;
- if (tracking) {
- synchronized (trackingLock) {
- printErrors ();
- objects = null;
- errors = null;
- trackingLock = null;
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ if (isDisposed ()) return;
+ checkDevice ();
+
+ try {
+ release ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+
+ destroy ();
+ disposed = true;
+ if (tracking) {
+ synchronized (trackingLock) {
+ printErrors ();
+ objects = null;
+ errors = null;
+ trackingLock = null;
+ }
}
}
}
@@ -324,7 +377,7 @@ public int getDepth () {
checkDevice ();
NSScreen primaryScreen = getPrimaryScreen();
if (primaryScreen == null) return 0;
- return (int)/*64*/OS.NSBitsPerPixelFromDepth(primaryScreen.depth());
+ return (int)OS.NSBitsPerPixelFromDepth(primaryScreen.depth());
}
/**
@@ -370,19 +423,19 @@ public FontData[] getFontList (String faceName, boolean scalable) {
NSArray families = NSFontManager.sharedFontManager().availableFontFamilies();
FontData[] fds = new FontData[100];
if (families != null) {
- long /*int*/ familyCount = families.count();
+ long familyCount = families.count();
for (int i = 0; i < familyCount; i++) {
NSString nsFamily = new NSString(families.objectAtIndex(i));
String name = nsFamily.getString();
NSArray fonts = NSFontManager.sharedFontManager().availableMembersOfFontFamily(nsFamily);
if (fonts != null) {
- int fontCount = (int)/*64*/fonts.count();
+ int fontCount = (int)fonts.count();
for (int j = 0; j < fontCount; j++) {
NSArray fontDetails = new NSArray(fonts.objectAtIndex(j));
String nsName = new NSString(fontDetails.objectAtIndex(0)).getString();
- long /*int*/ weight = new NSNumber(fontDetails.objectAtIndex(2)).integerValue();
- long /*int*/ traits = new NSNumber(fontDetails.objectAtIndex(3)).integerValue();
+ long weight = new NSNumber(fontDetails.objectAtIndex(2)).integerValue();
+ long traits = new NSNumber(fontDetails.objectAtIndex(3)).integerValue();
int style = SWT.NORMAL;
if ((traits & OS.NSItalicFontMask) != 0) style |= SWT.ITALIC;
if (weight == 9) style |= SWT.BOLD;
@@ -428,10 +481,7 @@ Point getScreenDPI () {
NSDictionary dictionary = screen.deviceDescription();
NSValue value = new NSValue(dictionary.objectForKey(new id(OS.NSDeviceResolution())).id);
NSSize size = value.sizeValue();
- double /*float*/ scaling = 1;
- if (OS.VERSION >= 0x1070) {
- scaling = screen.backingScaleFactor();
- }
+ double scaling = screen.backingScaleFactor();
return new Point((int)(size.width / scaling), (int)(size.height / scaling));
}
@@ -559,7 +609,7 @@ protected void init () {
/* Initialize the system font slot */
boolean smallFonts = System.getProperty("org.eclipse.swt.internal.carbon.smallFonts") != null;
- double /*float*/ systemFontSize = smallFonts ? NSFont.smallSystemFontSize() : NSFont.systemFontSize();
+ double systemFontSize = smallFonts ? NSFont.smallSystemFontSize() : NSFont.systemFontSize();
Point dpi = this.dpi = getDPI(), screenDPI = getScreenDPI();
NSFont font = NSFont.systemFontOfSize(systemFontSize * dpi.y / screenDPI.y);
font.retain();
@@ -582,7 +632,7 @@ protected void init () {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public abstract long /*int*/ internal_new_GC (GCData data);
+public abstract long internal_new_GC (GCData data);
/**
* Invokes platform specific functionality to dispose a GC handle.
@@ -600,7 +650,7 @@ public abstract long /*int*/ internal_new_GC (GCData data);
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public abstract void internal_dispose_GC (long /*int*/ hDC, GCData data);
+public abstract void internal_dispose_GC (long hDC, GCData data);
/**
* Returns <code>true</code> if the device has been disposed,
@@ -637,19 +687,10 @@ public boolean isDisposed () {
public boolean loadFont (String path) {
checkDevice();
if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- boolean result = false;
NSString nsPath = NSString.stringWith(path);
- long /*int*/ fsRepresentation = nsPath.fileSystemRepresentation();
-
- if (fsRepresentation != 0) {
- byte [] fsRef = new byte [80];
- boolean [] isDirectory = new boolean[1];
- if (OS.FSPathMakeRef (fsRepresentation, fsRef, isDirectory) == OS.noErr) {
- result = OS.ATSFontActivateFromFileReference (fsRef, OS.kATSFontContextLocal, OS.kATSFontFormatUnspecified, 0, OS.kATSOptionFlagsDefault, null) == OS.noErr;
- }
- }
-
- return result;
+ NSURL nsUrl = NSURL.fileURLWithPath(nsPath);
+ if (nsUrl == null) return false;
+ return OS.CTFontManagerRegisterFontsForURL(nsUrl.id, OS.kCTFontManagerScopeProcess, 0);
}
void new_Object (Object object) {
@@ -750,22 +791,6 @@ protected void release () {
if (systemFont != null) systemFont.dispose();
systemFont = null;
- if (COLOR_BLACK != null) COLOR_BLACK.dispose();
- if (COLOR_DARK_RED != null) COLOR_DARK_RED.dispose();
- if (COLOR_DARK_GREEN != null) COLOR_DARK_GREEN.dispose();
- if (COLOR_DARK_YELLOW != null) COLOR_DARK_YELLOW.dispose();
- if (COLOR_DARK_BLUE != null) COLOR_DARK_BLUE.dispose();
- if (COLOR_DARK_MAGENTA != null) COLOR_DARK_MAGENTA.dispose();
- if (COLOR_DARK_CYAN != null) COLOR_DARK_CYAN.dispose();
- if (COLOR_GRAY != null) COLOR_GRAY.dispose();
- if (COLOR_DARK_GRAY != null) COLOR_DARK_GRAY.dispose();
- if (COLOR_RED != null) COLOR_RED.dispose();
- if (COLOR_GREEN != null) COLOR_GREEN.dispose();
- if (COLOR_YELLOW != null) COLOR_YELLOW.dispose();
- if (COLOR_BLUE != null) COLOR_BLUE.dispose();
- if (COLOR_MAGENTA != null) COLOR_MAGENTA.dispose();
- if (COLOR_CYAN != null) COLOR_CYAN.dispose();
- if (COLOR_WHITE != null) COLOR_WHITE.dispose();
COLOR_BLACK = COLOR_DARK_RED = COLOR_DARK_GREEN = COLOR_DARK_YELLOW = COLOR_DARK_BLUE =
COLOR_DARK_MAGENTA = COLOR_DARK_CYAN = COLOR_GRAY = COLOR_DARK_GRAY = COLOR_RED =
COLOR_GREEN = COLOR_YELLOW = COLOR_BLUE = COLOR_MAGENTA = COLOR_CYAN = COLOR_WHITE = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java
index f97d727e85..310803d1bb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java
@@ -259,14 +259,14 @@ public FontData[] getFontData() {
NSString str = handle.fontName();
String nsName = str.getString();
NSFontManager manager = NSFontManager.sharedFontManager();
- long /*int*/ traits = manager.traitsOfFont(handle);
+ long traits = manager.traitsOfFont(handle);
int style = SWT.NORMAL;
if ((traits & OS.NSItalicFontMask) != 0) style |= SWT.ITALIC;
if ((traits & OS.NSBoldFontMask) != 0) style |= SWT.BOLD;
if ((extraTraits & OS.NSItalicFontMask) != 0) style |= SWT.ITALIC;
if ((extraTraits & OS.NSBoldFontMask) != 0) style |= SWT.BOLD;
Point dpi = device.dpi, screenDPI = device.getScreenDPI();
- FontData data = new FontData(name, (float)/*64*/handle.pointSize() * screenDPI.y / dpi.y, style);
+ FontData data = new FontData(name, (float)handle.pointSize() * screenDPI.y / dpi.y, style);
data.nsName = nsName;
return new FontData[]{data};
} finally {
@@ -292,6 +292,12 @@ public FontData[] getFontData() {
public static Font cocoa_new(Device device, NSFont handle) {
Font font = new Font(device);
font.handle = handle;
+ /*
+ * When created this way, Font doesn't own its .handle, and
+ * for this reason it can't be disposed. Tell leak detector
+ * to just ignore it.
+ */
+ font.ignoreNonDisposed();
return font;
}
@@ -307,7 +313,7 @@ public static Font cocoa_new(Device device, NSFont handle) {
*/
@Override
public int hashCode() {
- return handle != null ? (int)/*64*/handle.id : 0;
+ return handle != null ? (int)handle.id : 0;
}
void init(String name, float height, int style, String nsName) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java
index 3eb3e19689..a7a5b1f20a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java
@@ -263,7 +263,7 @@ public int getHeight() {
* @since 3.0
*/
public String getLocale () {
- StringBuffer buffer = new StringBuffer ();
+ StringBuilder buffer = new StringBuilder ();
char sep = '_';
if (lang != null) {
buffer.append (lang);
@@ -446,7 +446,7 @@ public void setStyle(int style) {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer(128);
+ StringBuilder buffer = new StringBuilder(128);
buffer.append("1|");
buffer.append(getName());
buffer.append("|");
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
index 612af9ebb6..db83d1ba44 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -81,8 +81,8 @@ public final class GC extends Resource {
CGPathElement element;
int count, typeCount;
byte[] types;
- double /*float*/[] points;
- double /*float*/ [] point;
+ double[] points;
+ double [] point;
static final int TAB_COUNT = 32;
@@ -259,7 +259,7 @@ public GC(Drawable drawable, int style) {
try {
GCData data = new GCData();
data.style = checkStyle(style);
- long /*int*/ contextId = drawable.internal_new_GC(data);
+ long contextId = drawable.internal_new_GC(data);
Device device = data.device;
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -295,13 +295,13 @@ static int checkStyle (int style) {
*/
public static GC cocoa_new(Drawable drawable, GCData data) {
GC gc = new GC();
- long /*int*/ context = drawable.internal_new_GC(data);
+ long context = drawable.internal_new_GC(data);
gc.device = data.device;
gc.init(drawable, data, context);
return gc;
}
-long /*int*/ applierFunc(long /*int*/ info, long /*int*/ elementPtr) {
+long applierFunc(long info, long elementPtr) {
OS.memmove(element, elementPtr, CGPathElement.sizeof);
int type = 0, length = 1;
switch (element.type) {
@@ -377,7 +377,7 @@ NSAutoreleasePool checkGC (int mask) {
if (pattern != null) {
if (pattern.color != null) pattern.color.setStroke();
} else {
- double /*float*/ [] color = data.foreground;
+ double [] color = data.foreground;
if (data.fg != null) data.fg.release();
NSColor fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
fg.retain();
@@ -389,7 +389,7 @@ NSAutoreleasePool checkGC (int mask) {
if (pattern != null) {
if (pattern.color != null) pattern.color.setFill();
} else {
- double /*float*/ [] color = data.foreground;
+ double [] color = data.foreground;
if (data.fg != null) data.fg.release();
NSColor fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
fg.retain();
@@ -402,7 +402,7 @@ NSAutoreleasePool checkGC (int mask) {
if (pattern != null) {
if (pattern.color != null) pattern.color.setFill();
} else {
- double /*float*/ [] color = data.background;
+ double [] color = data.background;
if (data.bg != null) data.bg.release();
NSColor bg = data.bg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
bg.retain();
@@ -433,7 +433,7 @@ NSAutoreleasePool checkGC (int mask) {
case SWT.LINE_CUSTOM: dashes = data.lineDashes; break;
}
if (dashes != null) {
- double /*float*/[] lengths = new double /*float*/[dashes.length];
+ double[] lengths = new double[dashes.length];
for (int i = 0; i < lengths.length; i++) {
lengths[i] = width == 0 || data.lineStyle == SWT.LINE_CUSTOM ? dashes[i] : dashes[i] * width;
}
@@ -470,9 +470,9 @@ NSAutoreleasePool checkGC (int mask) {
if (data.transform != null) {
size = data.transform.transformSize(size);
}
- double /*float*/ scaling = size.width;
+ double scaling = size.width;
if (scaling < 0) scaling = -scaling;
- double /*float*/ strokeWidth = data.lineWidth * scaling;
+ double strokeWidth = data.lineWidth * scaling;
if (strokeWidth == 0 || ((int)strokeWidth % 2) == 1) {
data.drawXOffset = 0.5f / scaling;
}
@@ -510,6 +510,7 @@ public void copyArea(Image image, int x, int y) {
try {
if (data.image != null) {
int srcX = x, srcY = y, destX = 0, destY = 0;
+ int scaleFactor = DPIUtil.getDeviceZoom () / 100;
NSSize srcSize = data.image.handle.size();
int imgHeight = (int)srcSize.height;
int destWidth = (int)srcSize.width - x, destHeight = (int)srcSize.height - y;
@@ -529,10 +530,10 @@ public void copyArea(Image image, int x, int y) {
NSRect destRect = new NSRect();
destRect.x = destX;
destRect.y = destY;
- destRect.width = destWidth;
- destRect.height = destHeight;
+ destRect.width = destWidth * scaleFactor;
+ destRect.height = destHeight * scaleFactor;
data.image.handle.drawInRect(destRect, srcRect, OS.NSCompositeCopy, 1);
- NSGraphicsContext.static_restoreGraphicsState();
+ NSGraphicsContext.static_restoreGraphicsState();
return;
}
if (data.view != null) {
@@ -568,14 +569,14 @@ public void copyArea(Image image, int x, int y) {
rect.size.width = size.width;
rect.size.height = size.height;
int displayCount = 16;
- long /*int*/ displays = C.malloc(4 * displayCount), countPtr = C.malloc(4);
+ long displays = C.malloc(4 * displayCount), countPtr = C.malloc(4);
if (OS.CGGetDisplaysWithRect(rect, displayCount, displays, countPtr) != 0) return;
int[] count = new int[1], display = new int[1];
C.memmove(count, countPtr, C.PTR_SIZEOF);
for (int i = 0; i < count[0]; i++) {
C.memmove(display, displays + (i * 4), 4);
OS.CGDisplayBounds(display[0], rect);
- double /*float*/ scaling = 1;
+ double scaling = 1;
if (screens != null) {
for (int j = 0; j < screens.count(); j++) {
NSScreen screen = new NSScreen(screens.objectAtIndex(j));
@@ -597,7 +598,7 @@ public void copyArea(Image image, int x, int y) {
imageHandle.addRepresentation(rep);
rep.release();
}
- long /*int*/ srcImage = 0;
+ long srcImage = 0;
srcImage = OS.CGDisplayCreateImage(display[0]);
if (srcImage != 0) {
copyArea(image, (int)(x * scaling - rect.origin.x), (int)(y * scaling - rect.origin.y), srcImage);
@@ -612,29 +613,29 @@ public void copyArea(Image image, int x, int y) {
}
}
-void copyArea (Image image, int x, int y, long /*int*/ srcImage) {
+void copyArea (Image image, int x, int y, long srcImage) {
if (srcImage == 0) return;
NSBitmapImageRep rep = image.getRepresentation();
- long /*int*/ bpc = rep.bitsPerSample();
- long /*int*/ width = rep.pixelsWide();
- long /*int*/ height = rep.pixelsHigh();
- long /*int*/ bpr = rep.bytesPerRow();
- long /*int*/ data = rep.bitmapData();
- long /*int*/ format = rep.bitmapFormat();
+ long bpc = rep.bitsPerSample();
+ long width = rep.pixelsWide();
+ long height = rep.pixelsHigh();
+ long bpr = rep.bytesPerRow();
+ long data = rep.bitmapData();
+ long format = rep.bitmapFormat();
int alphaInfo;
if (rep.hasAlpha()) {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaFirst : OS.kCGImageAlphaLast;
} else {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaNoneSkipFirst : OS.kCGImageAlphaNoneSkipLast;
}
- long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- long /*int*/ context = OS.CGBitmapContextCreate(data, width, height, bpc, bpr, colorspace, alphaInfo);
+ long colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long context = OS.CGBitmapContextCreate(data, width, height, bpc, bpr, colorspace, alphaInfo);
OS.CGColorSpaceRelease(colorspace);
if (context != 0) {
- CGRect rect = new CGRect();
- rect.origin.x = -x;
- rect.origin.y = y;
- rect.size.width = OS.CGImageGetWidth(srcImage);
+ CGRect rect = new CGRect();
+ rect.origin.x = -x;
+ rect.origin.y = y;
+ rect.size.width = OS.CGImageGetWidth(srcImage);
rect.size.height = OS.CGImageGetHeight(srcImage);
OS.CGContextTranslateCTM(context, 0, -(rect.size.height - height));
OS.CGContextDrawImage(context, rect, srcImage);
@@ -689,7 +690,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
if (image != null) {
NSImage imageHandle = image.handle;
NSSize size = imageHandle.size();
- int imgHeight = (int)size.height;
+ int imgHeight = (int)size.height;
handle.saveGraphicsState();
NSAffineTransform transform = NSAffineTransform.transform();
transform.scaleXBy(1, -1);
@@ -707,7 +708,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
destRect.height = height;
imageHandle.drawInRect(destRect, srcRect, OS.NSCompositeCopy, 1);
handle.restoreGraphicsState();
- return;
+ return;
}
if (data.view != null) {
NSView view = data.view;
@@ -797,32 +798,32 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
}
}
-static long /*int*/ createCGPathRef(NSBezierPath nsPath) {
- long /*int*/ count = nsPath.elementCount();
+static long createCGPathRef(NSBezierPath nsPath) {
+ long count = nsPath.elementCount();
if (count > 0) {
- long /*int*/ cgPath = OS.CGPathCreateMutable();
+ long cgPath = OS.CGPathCreateMutable();
if (cgPath == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ points = C.malloc(NSPoint.sizeof * 3);
+ long points = C.malloc(NSPoint.sizeof * 3);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- double /*float*/ [] pt = new double /*float*/ [6];
+ double [] pt = new double [6];
for (int i = 0; i < count; i++) {
- int element = (int)/*64*/nsPath.elementAtIndex(i, points);
+ int element = (int)nsPath.elementAtIndex(i, points);
switch (element) {
case OS.NSMoveToBezierPathElement:
C.memmove(pt, points, NSPoint.sizeof);
OS.CGPathMoveToPoint(cgPath, 0, pt[0], pt[1]);
break;
case OS.NSLineToBezierPathElement:
- C.memmove(pt, points, NSPoint.sizeof);
- OS.CGPathAddLineToPoint(cgPath, 0, pt[0], pt[1]);
+ C.memmove(pt, points, NSPoint.sizeof);
+ OS.CGPathAddLineToPoint(cgPath, 0, pt[0], pt[1]);
+ break;
+ case OS.NSCurveToBezierPathElement:
+ C.memmove(pt, points, NSPoint.sizeof * 3);
+ OS.CGPathAddCurveToPoint(cgPath, 0, pt[0], pt[1], pt[2], pt[3], pt[4], pt[5]);
+ break;
+ case OS.NSClosePathBezierPathElement:
+ OS.CGPathCloseSubpath(cgPath);
break;
- case OS.NSCurveToBezierPathElement:
- C.memmove(pt, points, NSPoint.sizeof * 3);
- OS.CGPathAddCurveToPoint(cgPath, 0, pt[0], pt[1], pt[2], pt[3], pt[4], pt[5]);
- break;
- case OS.NSClosePathBezierPathElement:
- OS.CGPathCloseSubpath(cgPath);
- break;
}
}
C.free(points);
@@ -862,7 +863,7 @@ NSAttributedString createString(String string, int flags, boolean draw) {
} else {
NSColor fg = data.fg;
if (fg == null) {
- double /*float*/ [] color = data.foreground;
+ double [] color = data.foreground;
fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
fg.retain();
}
@@ -907,16 +908,15 @@ NSAttributedString createString(String string, int flags, boolean draw) {
return attribStr;
}
-NSBezierPath createNSBezierPath (long /*int*/ cgPath) {
+NSBezierPath createNSBezierPath (long cgPath) {
Callback callback = new Callback(this, "applierFunc", 2);
- long /*int*/ proc = callback.getAddress();
- if (proc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc = callback.getAddress();
count = typeCount = 0;
element = new CGPathElement();
OS.CGPathApply(cgPath, 0, proc);
types = new byte[typeCount];
- points = new double /*float*/ [count];
- point = new double /*float*/ [6];
+ points = new double [count];
+ point = new double [6];
count = typeCount = 0;
OS.CGPathApply(cgPath, 0, proc);
callback.dispose();
@@ -945,18 +945,18 @@ NSBezierPath createNSBezierPath (long /*int*/ cgPath) {
bezierPath.curveToPoint(nsPoint, nsPoint2, nsPoint3);
break;
case SWT.PATH_QUAD_TO:
- double /*float*/ currentX = nsPoint.x;
- double /*float*/ currentY = nsPoint.y;
+ double currentX = nsPoint.x;
+ double currentY = nsPoint.y;
nsPoint2.x = points[j++];
nsPoint2.y = points[j++];
nsPoint.x = points[j++];
nsPoint.y = points[j++];
- double /*float*/ x0 = currentX;
- double /*float*/ y0 = currentY;
- double /*float*/ cx1 = x0 + 2 * (nsPoint2.x - x0) / 3;
- double /*float*/ cy1 = y0 + 2 * (nsPoint2.y - y0) / 3;
- double /*float*/ cx2 = cx1 + (nsPoint.x - x0) / 3;
- double /*float*/ cy2 = cy1 + (nsPoint.y - y0) / 3;
+ double x0 = currentX;
+ double y0 = currentY;
+ double cx1 = x0 + 2 * (nsPoint2.x - x0) / 3;
+ double cy1 = y0 + 2 * (nsPoint2.y - y0) / 3;
+ double cx2 = cx1 + (nsPoint.x - x0) / 3;
+ double cy2 = cy1 + (nsPoint.y - y0) / 3;
nsPoint2.x = cx1;
nsPoint2.y = cy1;
nsPoint3.x = cx2;
@@ -1057,7 +1057,7 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc
try {
handle.saveGraphicsState();
NSAffineTransform transform = NSAffineTransform.transform();
- double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double xOffset = data.drawXOffset, yOffset = data.drawYOffset;
transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
transform.scaleXBy(width / 2f, height / 2f);
NSBezierPath path = data.path;
@@ -1186,19 +1186,19 @@ public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeig
void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple) {
NSImage imageHandle = srcImage.handle;
NSSize size = imageHandle.size();
- int imgWidth = (int)size.width;
- int imgHeight = (int)size.height;
- if (simple) {
- srcWidth = destWidth = imgWidth;
- srcHeight = destHeight = imgHeight;
- } else {
- simple = srcX == 0 && srcY == 0 &&
- srcWidth == destWidth && destWidth == imgWidth &&
- srcHeight == destHeight && destHeight == imgHeight;
+ int imgWidth = (int)size.width;
+ int imgHeight = (int)size.height;
+ if (simple) {
+ srcWidth = destWidth = imgWidth;
+ srcHeight = destHeight = imgHeight;
+ } else {
+ simple = srcX == 0 && srcY == 0 &&
+ srcWidth == destWidth && destWidth == imgWidth &&
+ srcHeight == destHeight && destHeight == imgHeight;
if (srcX + srcWidth > imgWidth || srcY + srcHeight > imgHeight) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- }
+ }
NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM);
try {
if (srcImage.memGC != null) {
@@ -1428,7 +1428,7 @@ public void drawPolygon(int[] pointArray) {
if (pointArray.length < 4) return;
NSAutoreleasePool pool = checkGC(DRAW);
try {
- double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double xOffset = data.drawXOffset, yOffset = data.drawYOffset;
NSBezierPath path = data.path;
NSPoint pt = new NSPoint();
pt.x = pointArray[0] + xOffset;
@@ -1477,7 +1477,7 @@ public void drawPolyline(int[] pointArray) {
if (pointArray.length < 4) return;
NSAutoreleasePool pool = checkGC(DRAW);
try {
- double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double xOffset = data.drawXOffset, yOffset = data.drawYOffset;
NSBezierPath path = data.path;
NSPoint pt = new NSPoint();
pt.x = pointArray[0] + xOffset;
@@ -1596,7 +1596,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (arcWidth == 0 || arcHeight == 0) {
drawRectangle(x, y, width, height);
- return;
+ return;
}
NSAutoreleasePool pool = checkGC(DRAW);
try {
@@ -1626,6 +1626,10 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth
* will be performed. The background of the rectangular area where
* the string is being drawn will be filled with the receiver's
* background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn
@@ -1649,6 +1653,13 @@ public void drawString (String string, int x, int y) {
* then the background of the rectangular area where the string is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different:
+ * <ul>
+ * <li>{@link #drawString} is faster (depends on string size)<br>~7x for 1-char strings<br>~4x for 10-char strings<br>~2x for 100-char strings</li>
+ * <li>{@link #drawString} doesn't try to find a good fallback font when character doesn't have a glyph in currently selected font</li>
+ * </ul>
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn
@@ -1672,6 +1683,10 @@ public void drawString(String string, int x, int y, boolean isTransparent) {
* are performed. The background of the rectangular area where
* the text is being drawn will be filled with the receiver's
* background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -1695,6 +1710,10 @@ public void drawText(String string, int x, int y) {
* then the background of the rectangular area where the text is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -1722,6 +1741,11 @@ public void drawText(String string, int x, int y, boolean isTransparent) {
* then the background of the rectangular area where the text is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
+ *
* <p>
* The parameter <code>flags</code> may be a combination of:
* </p>
@@ -1814,7 +1838,7 @@ private void doDrawText(String string, int x, int y, int flags) {
} else {
NSColor bg = data.bg;
if (bg == null) {
- double /*float*/ [] color = data.background;
+ double [] color = data.background;
bg = data.bg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
bg.retain();
}
@@ -1889,7 +1913,7 @@ public void fillArc(int x, int y, int width, int height, int startAngle, int arc
try {
handle.saveGraphicsState();
NSAffineTransform transform = NSAffineTransform.transform();
- double /*float*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+ double xOffset = data.drawXOffset, yOffset = data.drawYOffset;
transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
transform.scaleXBy(width / 2f, height / 2f);
NSBezierPath path = data.path;
@@ -1967,7 +1991,7 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v
NSGradient gradient = ((NSGradient)new NSGradient().alloc()).initWithStartingColor(startingColor, endingColor);
NSRect rect = new NSRect();
rect.x = x;
- rect.y = y;
+ rect.y = y < 0 ? 0 : y;
rect.width = width;
rect.height = height;
gradient.drawInRect(rect, vertical ? 90 : 0);
@@ -2036,16 +2060,16 @@ void fillPattern(NSBezierPath path, Pattern pattern) {
NSPoint end = new NSPoint();
end.x = pattern.pt2.x;
end.y = pattern.pt2.y;
- double /*float*/ difx = end.x - start.x;
- double /*float*/ dify = end.y - start.y;
+ double difx = end.x - start.x;
+ double dify = end.y - start.y;
if (difx == 0 && dify == 0) {
- double /*float*/ [] color = pattern.color1;
+ double [] color = pattern.color1;
NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f).setFill();
path.fill();
handle.restoreGraphicsState();
return;
}
- double /*float*/ startx, starty, endx, endy;
+ double startx, starty, endx, endy;
if (difx == 0 || dify == 0) {
startx = bounds.x;
starty = bounds.y;
@@ -2058,13 +2082,13 @@ void fillPattern(NSBezierPath path, Pattern pattern) {
endy = bounds.y;
}
} else {
- double /*float*/ m = (end.y-start.y)/(end.x - start.x);
- double /*float*/ b = end.y - (m * end.x);
- double /*float*/ m2 = -1/m; //perpendicular slope
- double /*float*/ b2 = bounds.y - (m2 * bounds.x);
+ double m = (end.y-start.y)/(end.x - start.x);
+ double b = end.y - (m * end.x);
+ double m2 = -1/m; //perpendicular slope
+ double b2 = bounds.y - (m2 * bounds.x);
startx = endx = (b - b2) / (m2 - m);
b2 = (bounds.y + bounds.height) - (m2 * bounds.x);
- double /*float*/ x2 = (b - b2) / (m2 - m);
+ double x2 = (b - b2) / (m2 - m);
startx = difx > 0 ? Math.min(startx, x2) : Math.max(startx, x2);
endx = difx < 0 ? Math.min(endx, x2) : Math.max(endx, x2);
b2 = bounds.y - (m2 * (bounds.x + bounds.width));
@@ -2288,7 +2312,7 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (arcWidth == 0 || arcHeight == 0) {
fillRectangle(x, y, width, height);
- return;
+ return;
}
NSAutoreleasePool pool = checkGC(FILL);
try {
@@ -2314,8 +2338,8 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth
void strokePattern(NSBezierPath path, Pattern pattern) {
handle.saveGraphicsState();
- long /*int*/ cgPath = createCGPathRef(path);
- long /*int*/ cgContext = handle.graphicsPort();
+ long cgPath = createCGPathRef(path);
+ long cgContext = handle.graphicsPort();
OS.CGContextSaveGState(cgContext);
initCGContext(cgContext);
OS.CGContextAddPath(cgContext, cgPath);
@@ -2584,15 +2608,15 @@ public void getClipping(Region region) {
}
if (data.clipPath != null) {
NSBezierPath clip = data.clipPath.bezierPathByFlatteningPath();
- int count = (int)/*64*/clip.elementCount();
+ int count = (int)clip.elementCount();
int pointCount = 0;
Region clipRgn = new Region(device);
int[] pointArray = new int[count * 2];
- long /*int*/ points = C.malloc(NSPoint.sizeof);
+ long points = C.malloc(NSPoint.sizeof);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
NSPoint pt = new NSPoint();
for (int i = 0; i < count; i++) {
- int element = (int)/*64*/clip.elementAtIndex(i, points);
+ int element = (int)clip.elementAtIndex(i, points);
switch (element) {
case OS.NSMoveToBezierPathElement:
if (pointCount != 0) clipRgn.add(pointArray, pointCount);
@@ -2775,7 +2799,7 @@ public GCData getGCData() {
*/
public int getInterpolation() {
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- int interpolation = (int)/*64*/handle.imageInterpolation();
+ int interpolation = (int)handle.imageInterpolation();
switch (interpolation) {
case OS.NSImageInterpolationDefault: return SWT.DEFAULT;
case OS.NSImageInterpolationNone: return SWT.NONE;
@@ -3029,10 +3053,10 @@ public boolean getXORMode() {
*/
@Override
public int hashCode() {
- return handle != null ? (int)/*64*/handle.id : 0;
+ return handle != null ? (int)handle.id : 0;
}
-void init(Drawable drawable, GCData data, long /*int*/ context) {
+void init(Drawable drawable, GCData data, long context) {
if (data.foreground != null) data.state &= ~(FOREGROUND | FOREGROUND_FILL);
if (data.background != null) data.state &= ~BACKGROUND;
if (data.font != null) data.state &= ~FONT;
@@ -3050,7 +3074,7 @@ void init(Drawable drawable, GCData data, long /*int*/ context) {
data.path.retain();
}
-void initCGContext(long /*int*/ cgContext) {
+void initCGContext(long cgContext) {
int state = data.state;
if ((state & LINE_WIDTH) != 0) {
OS.CGContextSetLineWidth(cgContext, data.lineWidth == 0 ? 1 : data.lineWidth);
@@ -3074,7 +3098,7 @@ void initCGContext(long /*int*/ cgContext) {
case SWT.LINE_CUSTOM: dashes = data.lineDashes; break;
}
if (dashes != null) {
- float[] lengths = new float[dashes.length];
+ double[] lengths = new double[dashes.length];
for (int i = 0; i < lengths.length; i++) {
lengths[i] = width == 0 || data.lineStyle == SWT.LINE_CUSTOM ? dashes[i] : dashes[i] * width;
}
@@ -3142,7 +3166,7 @@ public boolean isDisposed() {
boolean isIdentity(float[] transform) {
return transform[0] == 1 && transform[1] == 0 && transform[2] == 0
- && transform[3] == 1 && transform[4] == 0 && transform[5] == 0;
+ && transform[3] == 1 && transform[4] == 0 && transform[5] == 0;
}
/**
@@ -3926,21 +3950,13 @@ void setPatternPhase(Pattern pattern) {
* and the destination, and if the argument is <code>false</code>,
* puts the receiver in a drawing mode where the destination color
* is replaced with the source color value.
- * <p>
- * Note that this mode in fundamentally unsupportable on certain
- * platforms. Clients that want their
- * code to run on all platforms need to avoid this method.
- * </p>
*
* @param xor if <code>true</code>, then <em>xor</em> mode is used, otherwise <em>source copy</em> mode is used
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
- *
- * @deprecated this functionality is not supported on some platforms
*/
-@Deprecated
public void setXORMode(boolean xor) {
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
data.xorMode = xor;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java
index 223dd55154..be16852538 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java
@@ -33,7 +33,7 @@ public final class GCData {
public Device device;
public int style, state = -1;
- public double /*float*/ [] foreground, background;
+ public double [] foreground, background;
public Pattern foregroundPattern;
public Pattern backgroundPattern;
public Font font;
@@ -55,12 +55,12 @@ public final class GCData {
public NSLayoutManager layoutManager;
public NSTextContainer textContainer;
public NSColor fg, bg;
- public double /*float*/ drawXOffset, drawYOffset;
+ public double drawXOffset, drawYOffset;
public NSRect paintRect;
public NSBezierPath path;
public NSAffineTransform transform, inverseTransform;
public NSBezierPath clipPath, visiblePath;
- public long /*int*/ visibleRgn;
+ public long visibleRgn;
public NSView view;
public NSSize size;
public Thread thread;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
index f426f91c28..e9c8d98812 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,6 +19,7 @@ import java.io.*;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cocoa.*;
+import org.eclipse.swt.internal.graphics.*;
/**
* Instances of this class are graphics which have been prepared
@@ -166,8 +167,15 @@ public final class Image extends Resource implements Drawable {
}
void init(NSImageRep nativeRep, NSBitmapImageRep rep) {
- int width = (int)/*64*/nativeRep.pixelsWide();
- int height = (int)/*64*/nativeRep.pixelsHigh();
+ int width = (int)nativeRep.pixelsWide();
+ int height = (int)nativeRep.pixelsHigh();
+ /*
+ * Intialize alphaInfo object. We may need to re intialize alpha info
+ * when a new representation is created
+ */
+ transparentPixel = -1;
+ alpha = -1;
+
boolean hasAlpha = rep.hasAlpha();
int bpr = width * 4;
@@ -176,8 +184,8 @@ public final class Image extends Resource implements Drawable {
rect.height = height;
/* Compute the pixels */
- long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- long /*int*/ ctx = OS.CGBitmapContextCreate(rep.bitmapData(), width, height, 8, bpr, colorspace, OS.kCGImageAlphaNoneSkipFirst);
+ long colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long ctx = OS.CGBitmapContextCreate(rep.bitmapData(), width, height, 8, bpr, colorspace, OS.kCGImageAlphaNoneSkipFirst);
OS.CGColorSpaceRelease(colorspace);
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(NSGraphicsContext.graphicsContextWithGraphicsPort(ctx, false));
@@ -187,15 +195,15 @@ public final class Image extends Resource implements Drawable {
if (hasAlpha) {
/* Compute the alpha values */
- long /*int*/ bitmapBytesPerRow = width;
- long /*int*/ bitmapByteCount = bitmapBytesPerRow * height;
- long /*int*/ alphaBitmapData = C.malloc(bitmapByteCount);
- long /*int*/ alphaBitmapCtx = OS.CGBitmapContextCreate(alphaBitmapData, width, height, 8, bitmapBytesPerRow, 0, OS.kCGImageAlphaOnly);
+ long bitmapBytesPerRow = width;
+ long bitmapByteCount = bitmapBytesPerRow * height;
+ long alphaBitmapData = C.malloc(bitmapByteCount);
+ long alphaBitmapCtx = OS.CGBitmapContextCreate(alphaBitmapData, width, height, 8, bitmapBytesPerRow, 0, OS.kCGImageAlphaOnly);
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(NSGraphicsContext.graphicsContextWithGraphicsPort(alphaBitmapCtx, false));
nativeRep.drawInRect(rect);
NSGraphicsContext.static_restoreGraphicsState();
- byte[] alphaData = new byte[(int)/*64*/bitmapByteCount];
+ byte[] alphaData = new byte[(int)bitmapByteCount];
C.memmove(alphaData, alphaBitmapData, bitmapByteCount);
C.free(alphaBitmapData);
OS.CGContextRelease(alphaBitmapCtx);
@@ -372,14 +380,14 @@ public Image(Device device, Image srcImage, int flag) {
handle.setCacheMode(OS.NSImageCacheNever);
/* Create the 100% representation for the new image from source image & apply flag */
- createRepFromSourceAndApplyFlag(srcImage.getRepresentation_100(), srcWidth, srcHeight, flag);
+ createRepFromSourceAndApplyFlag(srcImage.getRepresentation (100), srcWidth, srcHeight, flag);
imageFileNameProvider = srcImage.imageFileNameProvider;
imageDataProvider = srcImage.imageDataProvider;
this.styleFlag = srcImage.styleFlag | flag;
if (imageFileNameProvider != null || imageDataProvider != null) {
/* If source image has 200% representation then create the 200% representation for the new image & apply flag */
- NSBitmapImageRep rep200 = srcImage.getRepresentation_200();
+ NSBitmapImageRep rep200 = srcImage.getRepresentation (200);
if (rep200 != null) createRepFromSourceAndApplyFlag(rep200, srcWidth * 2, srcHeight * 2, flag);
}
init();
@@ -405,17 +413,17 @@ private void copyAlphaInfo(AlphaInfo src_alphaInfo, AlphaInfo dest_alphaInfo) {
* Applies the flag to the newly created representation. This method is invoked from the Image copy constructor.
*/
private void createRepFromSourceAndApplyFlag(NSBitmapImageRep srcRep, int srcWidth, int srcHeight, int flag) {
- long /*int*/ srcData = srcRep.bitmapData();
- long /*int*/ srcBitmapFormat = srcRep.bitmapFormat();
- long /*int*/ srcBpp = srcRep.bitsPerPixel();
- long /*int*/ srcBpr = srcRep.bytesPerRow();
+ long srcData = srcRep.bitmapData();
+ long srcBitmapFormat = srcRep.bitmapFormat();
+ long srcBpp = srcRep.bitsPerPixel();
+ long srcBpr = srcRep.bytesPerRow();
NSBitmapImageRep rep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
rep = rep.initWithBitmapDataPlanes(0, srcWidth, srcHeight, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.hasAlpha(), srcRep.isPlanar(), OS.NSDeviceRGBColorSpace, srcBitmapFormat, srcRep.bytesPerRow(), srcBpp);
handle.addRepresentation(rep);
rep.release();
- long /*int*/ data = rep.bitmapData();
+ long data = rep.bitmapData();
C.memmove(data, srcData, srcWidth * srcHeight * 4);
if (flag != SWT.IMAGE_COPY) {
final int redOffset, greenOffset, blueOffset;
@@ -441,7 +449,7 @@ private void createRepFromSourceAndApplyFlag(NSBitmapImageRep srcRep, int srcWid
byte oneRed = (byte)oneRGB.red;
byte oneGreen = (byte)oneRGB.green;
byte oneBlue = (byte)oneRGB.blue;
- byte[] line = new byte[(int)/*64*/srcBpr];
+ byte[] line = new byte[(int)srcBpr];
for (int y=0; y<srcHeight; y++) {
C.memmove(line, data + (y * srcBpr), srcBpr);
int offset = 0;
@@ -466,7 +474,7 @@ private void createRepFromSourceAndApplyFlag(NSBitmapImageRep srcRep, int srcWid
break;
}
case SWT.IMAGE_GRAY: {
- byte[] line = new byte[(int)/*64*/srcBpr];
+ byte[] line = new byte[(int)srcBpr];
for (int y=0; y<srcHeight; y++) {
C.memmove(line, data + (y * srcBpr), srcBpr);
int offset = 0;
@@ -847,14 +855,14 @@ private AlphaInfo _getAlphaInfoAtCurrentZoom (NSBitmapImageRep rep) {
}
ImageData _getImageData (NSBitmapImageRep imageRep, AlphaInfo info) {
- long /*int*/ width = imageRep.pixelsWide();
- long /*int*/ height = imageRep.pixelsHigh();
- long /*int*/ bpr = imageRep.bytesPerRow();
- long /*int*/ bpp = imageRep.bitsPerPixel();
- long /*int*/ bitmapData = imageRep.bitmapData();
- long /*int*/ bitmapFormat = imageRep.bitmapFormat();
- long /*int*/ dataSize = height * bpr;
- byte[] srcData = new byte[(int)/*64*/dataSize];
+ long width = imageRep.pixelsWide();
+ long height = imageRep.pixelsHigh();
+ long bpr = imageRep.bytesPerRow();
+ long bpp = imageRep.bitsPerPixel();
+ long bitmapData = imageRep.bitmapData();
+ long bitmapFormat = imageRep.bitmapFormat();
+ long dataSize = height * bpr;
+ byte[] srcData = new byte[(int)dataSize];
C.memmove(srcData, bitmapData, dataSize);
PaletteData palette;
@@ -863,8 +871,8 @@ ImageData _getImageData (NSBitmapImageRep imageRep, AlphaInfo info) {
} else {
palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
}
- ImageData data = new ImageData((int)/*64*/width, (int)/*64*/height, (int)/*64*/bpp, palette, 1, srcData);
- data.bytesPerLine = (int)/*64*/bpr;
+ ImageData data = new ImageData((int)width, (int)height, (int)bpp, palette, 1, srcData);
+ data.bytesPerLine = (int)bpr;
if (imageRep.hasAlpha() && info.transparentPixel == -1 && info.alpha == -1 && info.alphaData == null) {
byte[] alphaD = new byte[(int) (dataSize/4)];
int offset = (bitmapFormat & OS.NSAlphaFirstBitmapFormat) != 0 ? 0 : 3, a = 0;
@@ -877,8 +885,8 @@ ImageData _getImageData (NSBitmapImageRep imageRep, AlphaInfo info) {
if (info.transparentPixel == -1 && type == SWT.ICON) {
/* Get the icon mask data */
int maskPad = 2;
- long /*int*/ maskBpl = (((width + 7) / 8) + (maskPad - 1)) / maskPad * maskPad;
- byte[] maskData = new byte[(int)/*64*/(height * maskBpl)];
+ long maskBpl = (((width + 7) / 8) + (maskPad - 1)) / maskPad * maskPad;
+ byte[] maskData = new byte[(int)(height * maskBpl)];
int offset = 0, maskOffset = 0;
for (int y = 0; y<height; y++) {
for (int x = 0; x<width; x++) {
@@ -940,12 +948,12 @@ void createAlpha () {
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
NSBitmapImageRep imageRep = getRepresentation();
- long /*int*/ height = imageRep.pixelsHigh();
- long /*int*/ bpr = imageRep.bytesPerRow();
- long /*int*/ bitmapData = imageRep.bitmapData();
- long /*int*/ format = imageRep.bitmapFormat();
- long /*int*/ dataSize = height * bpr;
- byte[] srcData = new byte[(int)/*64*/dataSize];
+ long height = imageRep.pixelsHigh();
+ long bpr = imageRep.bytesPerRow();
+ long bitmapData = imageRep.bitmapData();
+ long format = imageRep.bitmapFormat();
+ long dataSize = height * bpr;
+ byte[] srcData = new byte[(int)dataSize];
C.memmove(srcData, bitmapData, dataSize);
if (info.transparentPixel != -1) {
if ((format & OS.NSAlphaFirstBitmapFormat) != 0) {
@@ -965,7 +973,7 @@ void createAlpha () {
srcData[i] = a;
}
} else {
- long /*int*/ width = imageRep.pixelsWide();
+ long width = imageRep.pixelsWide();
int offset = 0, alphaOffset = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? 0 : 3;
for (int y = 0; y<height; y++) {
for (int x = 0; x<width && alphaOffset<info.alphaData.length && offset<srcData.length; x++) {
@@ -1122,47 +1130,32 @@ public boolean equals (Object object) {
}
/**
- * Returns the image representation at 100%. Creates the representation if necessary.
+ * Returns the image representation at scale factor as percentage. Creates the representation if necessary.
*/
-NSBitmapImageRep getRepresentation_100 () {
+NSBitmapImageRep getRepresentation (int scaleFactor) {
NSArray reps = handle.representations();
NSSize size = handle.size();
- long /*int*/ count = reps.count();
+ long count = reps.count();
+ NSSize targetSize = new NSSize();
+ targetSize.width = (int)size.width * scaleFactor / 100;
+ targetSize.height = (int)size.height * scaleFactor / 100;
+ NSBitmapImageRep rep;
for (int i = 0; i < count; i++) {
- NSBitmapImageRep rep = new NSBitmapImageRep(reps.objectAtIndex(i));
- if (((int)size.width == rep.pixelsWide() && (int)size.height == rep.pixelsHigh())) {
+ rep = new NSBitmapImageRep(reps.objectAtIndex(i));
+ if ((targetSize.width == rep.pixelsWide() && targetSize.height == rep.pixelsHigh())) {
if (rep.isKindOfClass(OS.class_NSBitmapImageRep)) {
return rep;
}
}
}
- NSBitmapImageRep newRep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
- newRep = newRep.initWithData(handle.TIFFRepresentation());
- newRep.setSize(size);
+ NSBitmapImageRep newRep = createImageRep(targetSize);
+ for (int i = 0; i < count; i++) {
+ handle.removeRepresentation(new NSImageRep(handle.representations().objectAtIndex(0)));
+ }
handle.addRepresentation(newRep);
- newRep.release();
return newRep;
}
-/**
- * Returns the image representation at 200%, or null if none is available.
- */
-NSBitmapImageRep getRepresentation_200 () {
- NSArray reps = handle.representations();
- NSSize size = handle.size();
- long /*int*/ count = reps.count();
- for (int i = 0; i < count; i++) {
- NSBitmapImageRep rep = new NSBitmapImageRep(reps.objectAtIndex(i));
- int width = (int)size.width * 2;
- int height = (int)size.height * 2;
- if ((width == rep.pixelsWide() && height == rep.pixelsHigh())) {
- if (rep.isKindOfClass(OS.class_NSBitmapImageRep)) {
- return rep;
- }
- }
- }
- return null;
-}
/**
* Returns the color to which to map the transparent pixel, or null if
@@ -1190,7 +1183,7 @@ public Color getBackground() {
int red = (alphaInfo.transparentPixel >> 16) & 0xFF;
int green = (alphaInfo.transparentPixel >> 8) & 0xFF;
int blue = (alphaInfo.transparentPixel >> 0) & 0xFF;
- return Color.cocoa_new(device, new double /*float*/ []{red / 255f, green / 255f, blue / 255f, 1});
+ return Color.cocoa_new(device, new double []{red / 255f, green / 255f, blue / 255f, 1});
}
/**
@@ -1321,59 +1314,20 @@ public ImageData getImageData(int zoom) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- boolean hasImageProvider = imageFileNameProvider != null || imageDataProvider != null;
if (zoom == 100) {
NSBitmapImageRep imageRep;
- if (hasImageProvider) {
- imageRep = getRepresentation_100();
- return _getImageData(imageRep, alphaInfo_100);
- } else {
- imageRep = getRepresentation();
- if (imageRep.pixelsHigh() == this.height) {
- return _getImageData(imageRep, alphaInfo_100);
- } else {
- if (alphaInfo_200 == null) {
- initAlpha_200(imageRep);
- }
-
- NSArray reps = handle.representations();
- long /*int*/ count = reps.count();
- for (int i = 0; i < count; i++) {
- handle.removeRepresentation(new NSImageRep(handle.representations().objectAtIndex(0)));
- }
- handle.addRepresentation(imageRep);
-
- NSSize size = handle.size();
- imageRep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
- imageRep = imageRep.initWithBitmapDataPlanes(0, (int) size.width, (int) size.height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, (int) size.width * 4, 32);
- C.memset(imageRep.bitmapData(), 0xFF, (int) size.width * (int)size.height * 4);
- NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep);
- NSGraphicsContext.static_saveGraphicsState();
- context.setImageInterpolation(OS.NSImageInterpolationDefault);
- NSGraphicsContext.setCurrentContext(context);
- NSRect target = new NSRect();
- target.width = size.width;
- target.height = size.height;
- NSRect sourceRect = new NSRect();
- sourceRect.width = 0;
- sourceRect.height = 0;
- handle.drawInRect(target, sourceRect, OS.NSCompositeCopy, 1);
- NSGraphicsContext.static_restoreGraphicsState();
- return _getImageData(imageRep, alphaInfo_100);
- }
- }
+ imageRep = getRepresentation (100);
+ return _getImageData(imageRep, alphaInfo_100);
}
if (zoom == 200) {
- NSBitmapImageRep imageRep200 = getRepresentation_200();
- if (imageRep200 != null) {
- if (alphaInfo_100.alphaData != null && alphaInfo_200 != null) {
- if (alphaInfo_200.alphaData == null) initAlpha_200(imageRep200);
- }
- if (alphaInfo_200 == null) {
- initAlpha_200(imageRep200);
- }
- return _getImageData(imageRep200, alphaInfo_200);
+ NSBitmapImageRep imageRep200 = getRepresentation (200);
+ if (alphaInfo_100.alphaData != null && alphaInfo_200 != null) {
+ if (alphaInfo_200.alphaData == null) initAlpha_200(imageRep200);
}
+ if (alphaInfo_200 == null) {
+ initAlpha_200(imageRep200);
+ }
+ return _getImageData(imageRep200, alphaInfo_200);
}
} finally {
if (pool != null) pool.release();
@@ -1383,33 +1337,11 @@ public ImageData getImageData(int zoom) {
/** Returns the best available representation. May be 100% or 200% iff there is an image provider. */
NSBitmapImageRep getRepresentation () {
- NSBitmapImageRep rep = new NSBitmapImageRep(handle.bestRepresentationForDevice(null));
- if (rep.isKindOfClass(OS.class_NSBitmapImageRep)) {
- return rep;
- }
- NSArray reps = handle.representations();
- NSSize size = handle.size();
- long /*int*/ count = reps.count();
- NSBitmapImageRep bestRep = null;
- for (int i = 0; i < count; i++) {
- rep = new NSBitmapImageRep(reps.objectAtIndex(i));
- if (rep.isKindOfClass(OS.class_NSBitmapImageRep)) return rep;
- if (bestRep == null || ((int)size.width == rep.pixelsWide() && (int)size.height == rep.pixelsHigh())) {
- bestRep = rep;
- }
- }
- bestRep.retain();
- for (int i = 0; i < count; i++) {
- handle.removeRepresentation(new NSImageRep(handle.representations().objectAtIndex(0)));
- }
- handle.addRepresentation(bestRep);
- NSBitmapImageRep newRep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
- newRep = newRep.initWithData(handle.TIFFRepresentation());
- handle.addRepresentation(newRep);
- handle.removeRepresentation(bestRep);
- bestRep.release();
- newRep.release();
- return newRep;
+ return getRepresentation (DPIUtil.getDeviceZoom ());
+}
+
+NSBitmapImageRep createImageRep(NSSize targetSize) {
+ return ImageUtil.createImageRep(this, targetSize);
}
/**
@@ -1429,7 +1361,7 @@ public int hashCode () {
} else if (imageFileNameProvider != null) {
return imageFileNameProvider.hashCode();
} else {
- return handle != null ? (int)/*64*/handle.id : 0;
+ return handle != null ? (int)handle.id : 0;
}
}
@@ -1478,8 +1410,8 @@ void initAlpha_200(NSBitmapImageRep nativeRep) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int width = (int)/*64*/nativeRep.pixelsWide();
- int height = (int)/*64*/nativeRep.pixelsHigh();
+ int width = (int)nativeRep.pixelsWide();
+ int height = (int)nativeRep.pixelsHigh();
boolean hasAlpha = nativeRep.hasAlpha();
int bpr = width * 4;
@@ -1488,6 +1420,28 @@ void initAlpha_200(NSBitmapImageRep nativeRep) {
if (alphaInfo_200 == null) alphaInfo_200 = new AlphaInfo();
alphaInfo_200.init(nativeRep, rep);
+ rep.release();
+ } finally {
+ if (pool != null) pool.release();
+ }
+
+}
+
+void initAlpha_100(NSBitmapImageRep nativeRep) {
+ NSAutoreleasePool pool = null;
+ if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+ try {
+ int width = (int)nativeRep.pixelsWide();
+ int height = (int)nativeRep.pixelsHigh();
+
+ boolean hasAlpha = nativeRep.hasAlpha();
+ int bpr = width * 4;
+ NSBitmapImageRep rep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
+ rep = rep.initWithBitmapDataPlanes(0, width, height, 8, hasAlpha ? 4 : 3, hasAlpha, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, bpr, 32);
+
+ if (alphaInfo_100 == null) alphaInfo_100 = new AlphaInfo();
+ alphaInfo_100.init(nativeRep, rep);
+ rep.release();
} finally {
if (pool != null) pool.release();
}
@@ -1517,8 +1471,8 @@ void initNative(String filename) {
if (!nativeRep.isKindOfClass(OS.class_NSBitmapImageRep)) {
return;
}
- width = (int)/*64*/nativeRep.pixelsWide();
- height = (int)/*64*/nativeRep.pixelsHigh();
+ width = (int)nativeRep.pixelsWide();
+ height = (int)nativeRep.pixelsHigh();
boolean hasAlpha = nativeRep.hasAlpha();
int bpr = width * 4;
@@ -1565,7 +1519,7 @@ void initNative(String filename) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC (GCData data) {
+public long internal_new_GC (GCData data) {
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (type != SWT.BITMAP || memGC != null) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -1573,12 +1527,14 @@ public long /*int*/ internal_new_GC (GCData data) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
+ int scaleFactor = DPIUtil.getDeviceZoom() / 100;
NSBitmapImageRep imageRep = getRepresentation();
- // Can't perform transforms on image reps with alpha.
- imageRep.setAlpha(false);
-
NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep);
+ if (context == null) {
+ imageRep.setAlpha(false);
+ context = NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep);
+ }
NSGraphicsContext flippedContext = NSGraphicsContext.graphicsContextWithGraphicsPort(context.graphicsPort(), true);
context = flippedContext;
context.retain();
@@ -1587,8 +1543,8 @@ public long /*int*/ internal_new_GC (GCData data) {
NSGraphicsContext.setCurrentContext(context);
NSAffineTransform transform = NSAffineTransform.transform();
NSSize size = handle.size();
- transform.translateXBy(0, size.height);
- transform.scaleXBy(1, -1);
+ transform.translateXBy(0, size.height * scaleFactor);
+ transform.scaleXBy(scaleFactor, -scaleFactor);
transform.set();
NSGraphicsContext.static_restoreGraphicsState();
if (data != null) {
@@ -1624,8 +1580,8 @@ public long /*int*/ internal_new_GC (GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
- long /*int*/ context = hDC;
+public void internal_dispose_GC (long hDC, GCData data) {
+ long context = hDC;
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
@@ -1713,10 +1669,10 @@ public void setBackground(Color color) {
byte newGreen = (byte)((int)(color.handle[1] * 255) & 0xFF);
byte newBlue = (byte)((int)(color.handle[2] * 255) & 0xFF);
long height = imageRep.pixelsHigh();
- long /*int*/ bpr = imageRep.bytesPerRow();
- long /*int*/ data = imageRep.bitmapData();
- long /*int*/ format = imageRep.bitmapFormat();
- long /*int*/ bpp = imageRep.bitsPerPixel();
+ long bpr = imageRep.bytesPerRow();
+ long data = imageRep.bitmapData();
+ long format = imageRep.bitmapFormat();
+ long bpp = imageRep.bitsPerPixel();
final int redOffset, greenOffset, blueOffset;
if (bpp == 32 && (format & OS.NSAlphaFirstBitmapFormat) == 0) {
redOffset = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/ImageLoader.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/ImageLoader.java
index a8914ea4af..bbe5ac8d51 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/ImageLoader.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/ImageLoader.java
@@ -43,9 +43,9 @@ import org.eclipse.swt.internal.image.*;
* </ul>
*
* <p>
- * NOTE: <code>ImageLoader</code> is implemented in Java on some platforms, which has
- * certain performance implications. Performance and memory sensitive applications may
- * benefit from using one of the constructors provided by <code>Image</code>, as these
+ * NOTE: <code>ImageLoader</code> is implemented in Java on some platforms, which has
+ * certain performance implications. Performance and memory sensitive applications may
+ * benefit from using one of the constructors provided by <code>Image</code>, as these
* are implemented natively.</p>
*
* @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ImageAnalyzer</a>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java
index a7daa3b8f1..d46035be09 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -141,7 +141,7 @@ public Path (Device device, Path path, float flatness) {
if (flatness == 0) {
handle = new NSBezierPath(path.handle.copy().id);
} else {
- double /*float*/ defaultFlatness = NSBezierPath.defaultFlatness();
+ double defaultFlatness = NSBezierPath.defaultFlatness();
NSBezierPath.setDefaultFlatness(flatness);
handle = path.handle.bezierPathByFlatteningPath();
handle.retain();
@@ -225,6 +225,7 @@ public Path (Device device, PathData data) {
*/
public void addArc(float x, float y, float width, float height, float startAngle, float arcAngle) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (width == 0 || height == 0 || arcAngle == 0) return;
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
@@ -248,14 +249,14 @@ public void addArc(float x, float y, float width, float height, float startAngle
}
void appendBezierPath (NSBezierPath path) {
- int count = (int)/*64*/path.elementCount();
- long /*int*/ points = C.malloc(3 * NSPoint.sizeof);
+ int count = (int)path.elementCount();
+ long points = C.malloc(3 * NSPoint.sizeof);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
NSPoint pt1 = new NSPoint();
NSPoint pt2 = new NSPoint();
NSPoint pt3 = new NSPoint();
for (int i = 0; i < count; i++) {
- int element = (int)/*64*/path.elementAtIndex(i, points);
+ int element = (int)path.elementAtIndex(i, points);
switch (element) {
case OS.NSMoveToBezierPathElement:
OS.memmove(pt1, points, NSPoint.sizeof);
@@ -396,8 +397,8 @@ public void addString(String string, float x, float y, Font font) {
attrStr.release();
range = layoutManager.glyphRangeForTextContainer(textContainer);
if (range.length != 0) {
- long /*int*/ glyphs = C.malloc((range.length + 1) * 4);
- long /*int*/ count = layoutManager.getGlyphs(glyphs, range);
+ long glyphs = C.malloc((range.length + 1) * 4);
+ long count = layoutManager.getGlyphs(glyphs, range);
NSBezierPath path = NSBezierPath.bezierPath();
for (int i = 0; i < count; i++) {
NSPoint pt = layoutManager.locationForGlyphAtIndex(i);
@@ -475,12 +476,12 @@ public boolean contains(float x, float y, GC gc, boolean outline) {
try {
//TODO - see windows
if (outline) {
- long /*int*/ pixel = C.malloc(4);
+ long pixel = C.malloc(4);
if (pixel == 0) SWT.error(SWT.ERROR_NO_HANDLES);
int[] buffer = new int[]{0xFFFFFFFF};
C.memmove(pixel, buffer, 4);
- long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- long /*int*/ context = OS.CGBitmapContextCreate(pixel, 1, 1, 8, 4, colorspace, OS.kCGImageAlphaNoneSkipFirst);
+ long colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long context = OS.CGBitmapContextCreate(pixel, 1, 1, 8, 4, colorspace, OS.kCGImageAlphaNoneSkipFirst);
OS.CGColorSpaceRelease(colorspace);
if (context == 0) {
C.free(pixel);
@@ -503,7 +504,7 @@ public boolean contains(float x, float y, GC gc, boolean outline) {
OS.CGContextSetLineJoin(context, joinStyle);
OS.CGContextSetLineWidth(context, data.lineWidth);
OS.CGContextTranslateCTM(context, -x + 0.5f, -y + 0.5f);
- long /*int*/ path = GC.createCGPathRef(handle);
+ long path = GC.createCGPathRef(handle);
OS.CGContextAddPath(context, path);
OS.CGPathRelease(path);
OS.CGContextStrokePath(context);
@@ -586,10 +587,10 @@ public void getBounds(float[] bounds) {
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
NSRect rect = handle.controlPointBounds();
- bounds[0] = (float)/*64*/rect.x;
- bounds[1] = (float)/*64*/rect.y;
- bounds[2] = (float)/*64*/rect.width;
- bounds[3] = (float)/*64*/rect.height;
+ bounds[0] = (float)rect.x;
+ bounds[1] = (float)rect.y;
+ bounds[2] = (float)rect.width;
+ bounds[3] = (float)rect.height;
} finally {
if (pool != null) pool.release();
}
@@ -617,8 +618,8 @@ public void getCurrentPoint(float[] point) {
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
NSPoint pt = handle.currentPoint();
- point[0] = (float)/*64*/pt.x;
- point[1] = (float)/*64*/pt.y;
+ point[0] = (float)pt.x;
+ point[1] = (float)pt.y;
} finally {
if (pool != null) pool.release();
}
@@ -640,15 +641,15 @@ public PathData getPathData() {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- int count = (int)/*64*/handle.elementCount();
+ int count = (int)handle.elementCount();
int pointCount = 0, typeCount = 0;
byte[] types = new byte[count];
float[] pointArray = new float[count * 6];
- long /*int*/ points = C.malloc(3 * NSPoint.sizeof);
+ long points = C.malloc(3 * NSPoint.sizeof);
if (points == 0) SWT.error(SWT.ERROR_NO_HANDLES);
NSPoint pt = new NSPoint();
for (int i = 0; i < count; i++) {
- int element = (int)/*64*/handle.elementAtIndex(i, points);
+ int element = (int)handle.elementAtIndex(i, points);
switch (element) {
case OS.NSMoveToBezierPathElement:
types[typeCount++] = SWT.PATH_MOVE_TO;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java
index bbe6599df3..bffd556d1b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java
@@ -40,7 +40,7 @@ public class Pattern extends Resource {
NSGradient gradient;
NSPoint pt1, pt2;
Image image;
- double /*float*/ [] color1, color2;
+ double [] color1, color2;
int alpha1, alpha2;
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java
index e9e2dae796..fb8935c771 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java
@@ -44,7 +44,7 @@ public final class Region extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
/**
* Constructs a new empty region.
@@ -94,9 +94,15 @@ public Region(Device device) {
}
}
-Region(Device device, long /*int*/ handle) {
+Region(Device device, long handle) {
super(device);
this.handle = handle;
+ /*
+ * When created this way, Font doesn't own its .handle, and
+ * for this reason it can't be disposed. Tell leak detector
+ * to just ignore it.
+ */
+ this.ignoreNonDisposed();
}
/**
@@ -115,13 +121,13 @@ Region(Device device, long /*int*/ handle) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Region cocoa_new(Device device, long /*int*/ handle) {
+public static Region cocoa_new(Device device, long handle) {
return new Region(device, handle);
}
-static long /*int*/ polyToRgn(int[] poly, int length) {
+static long polyToRgn(int[] poly, int length) {
short[] r = new short[4];
- long /*int*/ polyRgn = OS.NewRgn(), rectRgn = OS.NewRgn();
+ long polyRgn = OS.NewRgn(), rectRgn = OS.NewRgn();
int minY = poly[1], maxY = poly[1];
for (int y = 3; y < length; y += 2) {
if (poly[y] < minY) minY = poly[y];
@@ -164,11 +170,11 @@ static long /*int*/ polyToRgn(int[] poly, int length) {
return polyRgn;
}
-static long /*int*/ polyRgn(int[] pointArray, int count) {
+static long polyRgn(int[] pointArray, int count) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- long /*int*/ polyRgn;
+ long polyRgn;
if (C.PTR_SIZEOF == 4) {
polyRgn = OS.NewRgn();
OS.OpenRgn();
@@ -221,7 +227,7 @@ void add(int[] pointArray, int count) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- long /*int*/ polyRgn = polyRgn(pointArray, count);
+ long polyRgn = polyRgn(pointArray, count);
OS.UnionRgn(handle, polyRgn, handle);
OS.DisposeRgn(polyRgn);
} finally {
@@ -280,7 +286,7 @@ public void add(int x, int y, int width, int height) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- long /*int*/ rectRgn = OS.NewRgn();
+ long rectRgn = OS.NewRgn();
short[] r = new short[4];
OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height));
OS.RectRgn(rectRgn, r);
@@ -366,19 +372,17 @@ public boolean contains(Point pt) {
NSAffineTransform transform;
void convertRgn(NSAffineTransform transform) {
- long /*int*/ newRgn = OS.NewRgn();
+ long newRgn = OS.NewRgn();
Callback callback = new Callback(this, "convertRgn", 4);
- long /*int*/ proc = callback.getAddress();
- if (proc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
this.transform = transform;
- OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, proc, newRgn);
+ OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, callback.getAddress(), newRgn);
this.transform = null;
callback.dispose();
OS.CopyRgn(newRgn, handle);
OS.DisposeRgn(newRgn);
}
-long /*int*/ convertRgn(long /*int*/ message, long /*int*/ rgn, long /*int*/ r, long /*int*/ newRgn) {
+long convertRgn(long message, long rgn, long r, long newRgn) {
if (message == OS.kQDRegionToRectsMsgParse) {
short[] rect = new short[4];
C.memmove(rect, r, rect.length * 2);
@@ -408,7 +412,7 @@ long /*int*/ convertRgn(long /*int*/ message, long /*int*/ rgn, long /*int*/ r,
points[i++] = (short)Math.round(point.y);
points[i++] = startX;
points[i++] = startY;
- long /*int*/ polyRgn = polyRgn(points, points.length);
+ long polyRgn = polyRgn(points, points.length);
OS.UnionRgn(newRgn, polyRgn, newRgn);
OS.DisposeRgn(polyRgn);
}
@@ -469,7 +473,6 @@ public Rectangle getBounds() {
NSBezierPath getPath() {
Callback callback = new Callback(this, "regionToRects", 4);
- if (callback.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
NSBezierPath path = NSBezierPath.bezierPath();
path.retain();
OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, callback.getAddress(), path.id);
@@ -480,7 +483,7 @@ NSBezierPath getPath() {
NSPoint pt = new NSPoint();
short[] rect = new short[4];
-long /*int*/ regionToRects(long /*int*/ message, long /*int*/ rgn, long /*int*/ r, long /*int*/ path) {
+long regionToRects(long message, long rgn, long r, long path) {
if (message == OS.kQDRegionToRectsMsgParse) {
C.memmove(rect, r, rect.length * 2);
pt.x = rect[1];
@@ -510,7 +513,7 @@ long /*int*/ regionToRects(long /*int*/ message, long /*int*/ rgn, long /*int*/
*/
@Override
public int hashCode() {
- return (int)/*64*/handle;
+ return (int)handle;
}
/**
@@ -559,7 +562,7 @@ public void intersect(int x, int y, int width, int height) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- long /*int*/ rectRgn = OS.NewRgn();
+ long rectRgn = OS.NewRgn();
short[] r = new short[4];
OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height));
OS.RectRgn(rectRgn, r);
@@ -711,7 +714,7 @@ public void subtract (int[] pointArray) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- long /*int*/ polyRgn = polyRgn(pointArray, pointArray.length);
+ long polyRgn = polyRgn(pointArray, pointArray.length);
OS.DiffRgn(handle, polyRgn, handle);
OS.DisposeRgn(polyRgn);
} finally {
@@ -765,7 +768,7 @@ public void subtract(int x, int y, int width, int height) {
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
- long /*int*/ rectRgn = OS.NewRgn();
+ long rectRgn = OS.NewRgn();
short[] r = new short[4];
OS.SetRect(r, (short)x, (short)y, (short)(x + width),(short)(y + height));
OS.RectRgn(rectRgn, r);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
index fd140d8e7e..23c3df501b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
@@ -64,15 +64,16 @@ public final class TextLayout extends Resource {
static final int TAB_COUNT = 32;
static final int UNDERLINE_THICK = 1 << 16;
- static final RGB LINK_FOREGROUND = new RGB (0, 51, 153);
int[] invalidOffsets;
private boolean ignoreSegments;
static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F';
+ static NSColor linkForeground;
+
static class StyleItem {
TextStyle style;
int start;
- long /*int*/ jniRef;
+ long jniRef;
NSCell cell;
@Override
public String toString () {
@@ -222,7 +223,7 @@ void computeRuns() {
}
attrStr.addAttribute(OS.NSParagraphStyleAttributeName, paragraph, range);
paragraph.release();
- long /*int*/ textLength = attrStr.length();
+ long textLength = attrStr.length();
for (int i = 0; i < stylesCount - 1; i++) {
StyleItem run = styles[i];
if (run.style == null) continue;
@@ -235,19 +236,19 @@ void computeRuns() {
font.addTraits(attrStr, range);
}
Color foreground = style.foreground;
- if (foreground != null) {
+ if (foreground != null && !foreground.isDisposed()) {
NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1);
attrStr.addAttribute(OS.NSForegroundColorAttributeName, color, range);
}
Color background = style.background;
- if (background != null) {
+ if (background != null && !background.isDisposed()) {
NSColor color = NSColor.colorWithDeviceRed(background.handle[0], background.handle[1], background.handle[2], 1);
attrStr.addAttribute(OS.NSBackgroundColorAttributeName, color, range);
}
if (style.strikeout) {
attrStr.addAttribute(OS.NSStrikethroughStyleAttributeName, NSNumber.numberWithInt(OS.NSUnderlineStyleSingle), range);
Color strikeColor = style.strikeoutColor;
- if (strikeColor != null) {
+ if (strikeColor != null && !strikeColor.isDisposed()) {
NSColor color = NSColor.colorWithDeviceRed(strikeColor.handle[0], strikeColor.handle[1], strikeColor.handle[2], 1);
attrStr.addAttribute(OS.NSStrikethroughColorAttributeName, color, range);
}
@@ -267,7 +268,7 @@ void computeRuns() {
case SWT.UNDERLINE_LINK: {
underlineStyle = OS.NSUnderlineStyleSingle;
if (foreground == null) {
- NSColor color = NSColor.colorWithDeviceRed(LINK_FOREGROUND.red / 255f, LINK_FOREGROUND.green / 255f, LINK_FOREGROUND.blue / 255f, 1);
+ NSColor color = getLinkForeground();
attrStr.addAttribute(OS.NSForegroundColorAttributeName, color, range);
}
break;
@@ -276,7 +277,7 @@ void computeRuns() {
if (underlineStyle != 0) {
attrStr.addAttribute(OS.NSUnderlineStyleAttributeName, NSNumber.numberWithInt(underlineStyle), range);
Color underlineColor = style.underlineColor;
- if (underlineColor != null) {
+ if (underlineColor != null && !underlineColor.isDisposed()) {
NSColor color = NSColor.colorWithDeviceRed(underlineColor.handle[0], underlineColor.handle[1], underlineColor.handle[2], 1);
attrStr.addAttribute(OS.NSUnderlineColorAttributeName, color, range);
}
@@ -331,13 +332,13 @@ void computeRuns() {
int numberOfLines;
layoutManager.glyphRangeForTextContainer(textContainer);
- long /*int*/ numberOfGlyphs = layoutManager.numberOfGlyphs(), index;
- long /*int*/ rangePtr = C.malloc(NSRange.sizeof);
+ long numberOfGlyphs = layoutManager.numberOfGlyphs(), index;
+ long rangePtr = C.malloc(NSRange.sizeof);
NSRange lineRange = new NSRange();
for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
- layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
- OS.memmove(lineRange, rangePtr, NSRange.sizeof);
- index = lineRange.location + lineRange.length;
+ layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
+ OS.memmove(lineRange, rangePtr, NSRange.sizeof);
+ index = lineRange.location + lineRange.length;
}
if (numberOfLines == 0) numberOfLines++;
int[] offsets = new int[numberOfLines + 1];
@@ -345,9 +346,9 @@ void computeRuns() {
for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
bounds[numberOfLines] = layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
if (numberOfLines < bounds.length - 1) bounds[numberOfLines].height -= spacing;
- OS.memmove(lineRange, rangePtr, NSRange.sizeof);
- offsets[numberOfLines] = (int)/*64*/lineRange.location;
- index = lineRange.location + lineRange.length;
+ OS.memmove(lineRange, rangePtr, NSRange.sizeof);
+ offsets[numberOfLines] = (int)lineRange.location;
+ index = lineRange.location + lineRange.length;
}
if (numberOfLines == 0) {
Font font = this.font != null ? this.font : device.systemFont;
@@ -356,7 +357,7 @@ void computeRuns() {
bounds[0].height = Math.max(layoutManager.defaultLineHeightForFont(nsFont), ascent + descent);
}
C.free(rangePtr);
- offsets[numberOfLines] = (int)/*64*/textStorage.length();
+ offsets[numberOfLines] = (int)textStorage.length();
this.lineOffsets = offsets;
this.lineBounds = bounds;
}
@@ -461,7 +462,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
pt.x = x;
pt.y = y;
NSRange range = new NSRange();
- long /*int*/ numberOfGlyphs = layoutManager.numberOfGlyphs();
+ long numberOfGlyphs = layoutManager.numberOfGlyphs();
if (numberOfGlyphs > 0) {
range.location = 0;
range.length = numberOfGlyphs;
@@ -476,8 +477,8 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
if (hasSelection) {
range.location = translateOffset(selectionStart);
range.length = translateOffset(selectionEnd - selectionStart + 1);
- long /*int*/ [] rectCount = new long /*int*/ [1];
- long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long [] rectCount = new long [1];
+ long pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
for (int k = 0; k < rectCount[0]; k++, pArray += NSRect.sizeof) {
OS.memmove(rect, pArray, NSRect.sizeof);
fixRect(rect);
@@ -502,7 +503,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
if (numberOfGlyphs > 0) {
range.location = 0;
range.length = numberOfGlyphs;
- double /*float*/ [] fg = gc.data.foreground;
+ double [] fg = gc.data.foreground;
boolean defaultFg = fg[0] == 0 && fg[1] == 0 && fg[2] == 0 && fg[3] == 1 && gc.data.alpha == 255;
if (!defaultFg) {
for (int i = 0; i < stylesCount - 1; i++) {
@@ -546,12 +547,12 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
range.location = Math.max(lineStart, start);
range.length = Math.min(lineEnd, end) + 1 - range.location;
if (range.length > 0) {
- long /*int*/ [] rectCount = new long /*int*/ [1];
- long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long [] rectCount = new long [1];
+ long pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
NSRect rect = new NSRect();
gc.handle.saveGraphicsState();
- double /*float*/ baseline = layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, lineStart);
- double /*float*/ [] color = null;
+ double baseline = layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, lineStart);
+ double [] color = null;
if (style.underlineColor != null) color = style.underlineColor.handle;
if (color == null && style.foreground != null) color = style.foreground.handle;
if (color != null) {
@@ -560,15 +561,15 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
for (int k = 0; k < rectCount[0]; k++, pArray += NSRect.sizeof) {
OS.memmove(rect, pArray, NSRect.sizeof);
fixRect(rect);
- double /*float*/ underlineX = pt.x + rect.x;
- double /*float*/ underlineY = pt.y + rect.y + rect.height - baseline + 1;
+ double underlineX = pt.x + rect.x;
+ double underlineY = pt.y + rect.y + rect.height - baseline + 1;
NSBezierPath path = NSBezierPath.bezierPath();
switch (style.underlineStyle) {
case SWT.UNDERLINE_ERROR: {
path.setLineWidth(2f);
path.setLineCapStyle(OS.NSRoundLineCapStyle);
path.setLineJoinStyle(OS.NSRoundLineJoinStyle);
- path.setLineDash(new double /*float*/ []{1, 3f}, 2, 0);
+ path.setLineDash(new double []{1, 3f}, 2, 0);
point.x = underlineX;
point.y = underlineY + 0.5f;
path.moveToPoint(point);
@@ -582,10 +583,10 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
path.setLineWidth(1.0f);
path.setLineCapStyle(OS.NSButtLineCapStyle);
path.setLineJoinStyle(OS.NSMiterLineJoinStyle);
- double /*float*/ lineBottom = pt.y + rect.y + rect.height;
+ double lineBottom = pt.y + rect.y + rect.height;
float squigglyThickness = 1;
float squigglyHeight = 2 * squigglyThickness;
- double /*float*/ squigglyY = Math.min(underlineY - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
+ double squigglyY = Math.min(underlineY - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
float[] points = computePolyline((int)underlineX, (int)squigglyY, (int)(underlineX + rect.width), (int)(squigglyY + squigglyHeight));
point.x = points[0] + 0.5f;
point.y = points[1] + 0.5f;
@@ -614,11 +615,11 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
range.location = Math.max(lineStart, start);
range.length = Math.min(lineEnd, end) + 1 - range.location;
if (range.length > 0) {
- long /*int*/ [] rectCount = new long /*int*/ [1];
- long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long [] rectCount = new long [1];
+ long pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
NSRect rect = new NSRect();
gc.handle.saveGraphicsState();
- double /*float*/ [] color = null;
+ double [] color = null;
if (style.borderColor != null) color = style.borderColor.handle;
if (color == null && style.foreground != null) color = style.foreground.handle;
if (color != null) {
@@ -631,9 +632,9 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
case SWT.BORDER_DASH: dashes = width != 0 ? GC.LINE_DASH : GC.LINE_DASH_ZERO; break;
case SWT.BORDER_DOT: dashes = width != 0 ? GC.LINE_DOT : GC.LINE_DOT_ZERO; break;
}
- double /*float*/ [] lengths = null;
+ double [] lengths = null;
if (dashes != null) {
- lengths = new double /*float*/[dashes.length];
+ lengths = new double[dashes.length];
for (int k = 0; k < lengths.length; k++) {
lengths[k] = width == 0 ? dashes[k] : dashes[k] * width;
}
@@ -664,7 +665,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
}
void fixRect(NSRect rect) {
- double /*float*/ right = -1;
+ double right = -1;
for (int j = 0; j < lineBounds.length; j++) {
NSRect line = lineBounds[j];
if (rect.y <= line.y && line.y <= rect.y + rect.height) {
@@ -790,8 +791,8 @@ public Rectangle getBounds(int start, int end) {
NSRange range = new NSRange();
range.location = start;
range.length = end - start + 1;
- long /*int*/ [] rectCount = new long /*int*/ [1];
- long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
+ long [] rectCount = new long [1];
+ long pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
NSRect rect = new NSRect();
int left = 0x7FFFFFFF, right = 0;
int top = 0x7FFFFFFF, bottom = 0;
@@ -898,7 +899,7 @@ public int getLevel(int offset) {
int length = text.length();
if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE);
offset = translateOffset(offset);
- long /*int*/ glyphOffset = layoutManager.glyphIndexForCharacterAtIndex(offset);
+ long glyphOffset = layoutManager.glyphIndexForCharacterAtIndex(offset);
NSRange range = new NSRange();
range.location = glyphOffset;
range.length = 1;
@@ -1059,6 +1060,20 @@ public FontMetrics getLineMetrics (int lineIndex) {
}
}
+NSColor getLinkForeground() {
+ if (linkForeground == null) {
+ /*
+ * Color used is same as SWT.COLOR_LINK_FOREGROUND computed in Display.getWidgetColorRGB()
+ */
+ NSTextView textView = (NSTextView)new NSTextView().alloc();
+ textView.init ();
+ NSDictionary dict = textView.linkTextAttributes();
+ linkForeground = new NSColor(dict.valueForKey(OS.NSForegroundColorAttributeName));
+ textView.release ();
+ }
+ return linkForeground;
+}
+
/**
* Returns the location for the specified character offset. The
* <code>trailing</code> argument indicates whether the offset
@@ -1089,7 +1104,7 @@ public Point getLocation(int offset, boolean trailing) {
return new Point((int)(rect.x + rect.width), (int)rect.y);
} else {
offset = translateOffset(offset);
- long /*int*/ glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset);
+ long glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset);
NSRect rect = layoutManager.lineFragmentUsedRectForGlyphAtIndex(glyphIndex, 0);
NSPoint point = layoutManager.locationForGlyphAtIndex(glyphIndex);
boolean rtl = false;
@@ -1097,13 +1112,13 @@ public Point getLocation(int offset, boolean trailing) {
range.location = glyphIndex;
range.length = 1;
byte[] bidiLevels = new byte[1];
- long /*int*/ result = layoutManager.getGlyphsInRange(range, 0, 0, 0, 0, bidiLevels);
+ long result = layoutManager.getGlyphsInRange(range, 0, 0, 0, 0, bidiLevels);
if (result > 0) {
rtl = (bidiLevels[0] & 1) != 0;
}
if (trailing != rtl) {
- long /*int*/ [] rectCount = new long /*int*/ [1];
- long /*int*/ pArray = layoutManager.rectArrayForGlyphRange(range, range, textContainer, rectCount);
+ long [] rectCount = new long [1];
+ long pArray = layoutManager.rectArrayForGlyphRange(range, range, textContainer, rectCount);
if (rectCount[0] > 0) {
NSRect bounds = new NSRect();
OS.memmove(bounds, pArray, NSRect.sizeof);
@@ -1174,18 +1189,18 @@ int _getOffset (int offset, int movement, boolean forward) {
break;
case SWT.MOVEMENT_WORD: {
offset = translateOffset(offset);
- offset = (int)/*64*/textStorage.nextWordFromIndex(offset, forward);
+ offset = (int)textStorage.nextWordFromIndex(offset, forward);
return untranslateOffset(offset);
}
case SWT.MOVEMENT_WORD_END: {
offset = translateOffset(offset);
if (forward) {
- offset = (int)/*64*/textStorage.nextWordFromIndex(offset, true);
+ offset = (int)textStorage.nextWordFromIndex(offset, true);
} else {
length = translateOffset(length);
int result = 0;
while (result < length) {
- int wordEnd = (int)/*64*/textStorage.nextWordFromIndex(result, true);
+ int wordEnd = (int)textStorage.nextWordFromIndex(result, true);
if (wordEnd >= offset) {
offset = result;
break;
@@ -1200,7 +1215,7 @@ int _getOffset (int offset, int movement, boolean forward) {
if (forward) {
int result = translateOffset(length);
while (result > 0) {
- int wordStart = (int)/*64*/textStorage.nextWordFromIndex(result, false);
+ int wordStart = (int)textStorage.nextWordFromIndex(result, false);
if (wordStart <= offset) {
offset = result;
break;
@@ -1208,7 +1223,7 @@ int _getOffset (int offset, int movement, boolean forward) {
result = wordStart;
}
} else {
- offset = (int)/*64*/textStorage.nextWordFromIndex(offset, false);
+ offset = (int)textStorage.nextWordFromIndex(offset, false);
}
return untranslateOffset(offset);
}
@@ -1280,14 +1295,14 @@ public int getOffset(int x, int y, int[] trailing) {
NSPoint pt = new NSPoint();
pt.x = x;
pt.y = y - getVerticalIndent();
- double /*float*/[] partialFraction = new double /*float*/[1];
- long /*int*/ glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, partialFraction);
- long /*int*/ charOffset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex);
+ double[] partialFraction = new double[1];
+ long glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, partialFraction);
+ long charOffset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex);
if (textStorage.string().characterAtIndex(charOffset) == '\n') charOffset--;
- int offset = (int)/*64*/charOffset;
+ int offset = (int)charOffset;
offset = Math.min(untranslateOffset(offset), length - 1);
if (trailing != null) {
- trailing[0] = Math.round((float)/*64*/partialFraction[0]);
+ trailing[0] = Math.round((float)partialFraction[0]);
if (partialFraction[0] >= 0.5) {
char ch = text.charAt(offset);
if (0xD800 <= ch && ch <= 0xDBFF) {
@@ -1608,20 +1623,19 @@ void initClasses () {
if (OS.objc_lookUpClass(className) != 0) return;
textLayoutCallback2 = new Callback(getClass(), "textLayoutProc", 2);
- long /*int*/ proc2 = textLayoutCallback2.getAddress();
- if (proc2 == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- long /*int*/ cellBaselineOffsetProc = OS.CALLBACK_cellBaselineOffset(proc2);
- long /*int*/ cellSizeProc = OS.CALLBACK_NSTextAttachmentCell_cellSize(proc2);
+ long proc2 = textLayoutCallback2.getAddress();
+ long cellBaselineOffsetProc = OS.CALLBACK_cellBaselineOffset(proc2);
+ long cellSizeProc = OS.CALLBACK_NSTextAttachmentCell_cellSize(proc2);
byte[] types = {'*','\0'};
int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
- long /*int*/ cls = OS.objc_allocateClassPair(OS.class_NSCell, className, 0);
+ long cls = OS.objc_allocateClassPair(OS.class_NSCell, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addProtocol(cls, OS.protocol_NSTextAttachmentCell);
OS.class_addMethod(cls, OS.sel_cellSize, cellSizeProc, "@:");
OS.class_addMethod(cls, OS.sel_cellBaselineOffset, cellBaselineOffsetProc, "@:");
- if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 11, 0)) {
- long /*int*/ attachmentProc = OS.CALLBACK_NSTextAttachmentCell_attachment(proc2);
+ if (OS.VERSION >= OS.VERSION(10, 11, 0)) {
+ long attachmentProc = OS.CALLBACK_NSTextAttachmentCell_attachment(proc2);
OS.class_addMethod(cls, OS.sel_attachment, attachmentProc, "@:");
}
OS.objc_registerClassPair(cls);
@@ -2265,8 +2279,8 @@ public String toString () {
return "TextLayout {" + text + "}";
}
-static long /*int*/ textLayoutProc(long /*int*/ id, long /*int*/ sel) {
- long /*int*/ [] jniRef = new long /*int*/ [1];
+static long textLayoutProc(long id, long sel) {
+ long [] jniRef = new long [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
StyleItem run = (StyleItem) OS.JNIGetObject(jniRef[0]);
@@ -2280,14 +2294,14 @@ static long /*int*/ textLayoutProc(long /*int*/ id, long /*int*/ sel) {
size.width = metrics.width;
size.height = metrics.ascent + metrics.descent;
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc(NSSize.sizeof);
+ long result = C.malloc(NSSize.sizeof);
OS.memmove(result, size, NSSize.sizeof);
return result;
} else if (sel == OS.sel_cellBaselineOffset) {
NSPoint point = new NSPoint();
point.y = -metrics.descent;
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc(NSPoint.sizeof);
+ long result = C.malloc(NSPoint.sizeof);
OS.memmove(result, point, NSPoint.sizeof);
return result;
} else if (sel == OS.sel_attachment) {
@@ -2361,7 +2375,7 @@ public void setDefaultTabWidth(int tabLength) {
checkLayout();
String oldString = getText();
- StringBuffer tabBuffer = new StringBuffer(tabLength);
+ StringBuilder tabBuffer = new StringBuilder(tabLength);
for (int i = 0; i < tabLength; i++) {
tabBuffer.append(' ');
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java
index a01df3f31d..07e1bae057 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java
@@ -191,12 +191,12 @@ public void getElements(float[] elements) {
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
NSAffineTransformStruct struct = handle.transformStruct();
- elements[0] = (float)/*64*/struct.m11;
- elements[1] = (float)/*64*/struct.m12;
- elements[2] = (float)/*64*/struct.m21;
- elements[3] = (float)/*64*/struct.m22;
- elements[4] = (float)/*64*/struct.tX;
- elements[5] = (float)/*64*/struct.tY;
+ elements[0] = (float)struct.m11;
+ elements[1] = (float)struct.m12;
+ elements[2] = (float)struct.m21;
+ elements[3] = (float)struct.m22;
+ elements[4] = (float)struct.tX;
+ elements[5] = (float)struct.tY;
} finally {
if (pool != null) pool.release();
}
@@ -447,8 +447,8 @@ public void transform(float[] pointArray) {
point.x = pointArray[j];
point.y = pointArray[j + 1];
point = handle.transformPoint(point);
- pointArray[j] = (float)/*64*/point.x;
- pointArray[j + 1] = (float)/*64*/point.y;
+ pointArray[j] = (float)point.x;
+ pointArray[j + 1] = (float)point.y;
}
} finally {
if (pool != null) pool.release();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java
new file mode 100644
index 0000000000..10c422d8a0
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2020 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.graphics;
+
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cocoa.*;
+
+/**
+ * This class holds utility methods for image manipulation on Cocoa platform
+ * Not used on other platforms
+ *
+ * @since 3.110
+ *
+ */
+public class ImageUtil {
+ /**
+ * Creates new image representation based on the source image.
+ *
+ * @param image Source image object
+ * @param targetSize the size at which image representation needs to be created
+ *
+ * @return image representation
+ *
+ * @since 3.110
+ */
+ public static NSBitmapImageRep createImageRep(Image image, NSSize targetSize) {
+ NSBitmapImageRep rep;
+ NSImage imgHandle= image.handle;
+ rep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
+ rep = rep.initWithBitmapDataPlanes(0, (int) targetSize.width, (int) targetSize.height, 8, 4, true, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat, (int) targetSize.width * 4, 32);
+ C.memset(rep.bitmapData(), 0xFF, (int) targetSize.width * (int)targetSize.height * 4);
+ NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
+ NSGraphicsContext.static_saveGraphicsState();
+ context.setImageInterpolation(OS.NSImageInterpolationHigh);
+ NSGraphicsContext.setCurrentContext(context);
+ NSRect target = new NSRect();
+ target.width = targetSize.width;
+ target.height = targetSize.height;
+ NSRect sourceRect = new NSRect();
+ sourceRect.width = 0;
+ sourceRect.height = 0;
+ imgHandle.drawInRect(target, sourceRect, OS.NSCompositeCopy, 1);
+ NSGraphicsContext.static_restoreGraphicsState();
+ rep.autorelease();
+ return rep;
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
index 2e20e38246..370c88d76c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
@@ -57,7 +57,7 @@ public class Button extends Control {
*/
private SWTView radioParent;
- private static final double /*float*/ [] DEFAULT_DISABLED_FOREGROUND = new double /*float*/ [] { 0.6745f, 0.6745f, 0.6745f, 1.0f };
+ private static final double [] DEFAULT_DISABLED_FOREGROUND = new double [] { 0.6745f, 0.6745f, 0.6745f, 1.0f };
static final int EXTRA_HEIGHT = 2;
static final int EXTRA_WIDTH = 6;
@@ -147,7 +147,7 @@ public void addSelectionListener(SelectionListener listener) {
}
@Override
-NSSize cellSizeForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSSize cellSizeForBounds (long id, long sel, NSRect cellFrame) {
NSSize size = super.cellSizeForBounds(id, sel, cellFrame);
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
@@ -173,7 +173,8 @@ NSSize cellSizeForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSAttributedString attribStr = createString(text, null, foreground, style, true, true, true);
NSRect rect = attribStr.boundingRectWithSize(wrapSize, OS.NSStringDrawingUsesLineFragmentOrigin);
attribStr.release();
- double /*float*/ trimHeight = size.height - titleRect.height;
+ // Avoid trim height to be set to a negative value
+ double trimHeight = Math.max(size.height - titleRect.height, 0);
size.height = rect.height;
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
@@ -315,27 +316,6 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
return dragging;
}
-@Override
-void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ image, NSRect rect, long /*int*/ view) {
- /*
- * Feature in Cocoa. Images touch the edge of rounded buttons
- * when set to small size. The fix to subclass the button cell
- * and offset the image drawing.
- * This workaround is not required for OSX 10.9 and later as
- * the problem doesn't happen there.
- */
- if (OS.VERSION_MMB < OS.VERSION_MMB(10, 9, 0)) {
- NSCell cell = ((NSControl)this.view).cell();
- if (cell != null && cell.controlSize() == OS.NSRegularControlSize) {
- if ((style & (SWT.PUSH | SWT.TOGGLE)) != 0 && (style & (SWT.FLAT | SWT.WRAP)) == 0) {
- rect.y += EXTRA_HEIGHT / 2;
- rect.height += EXTRA_HEIGHT;
- }
- }
- }
- super.drawImageWithFrameInView(id, sel, image, rect, view);
-}
-
private static NSRect smallerRect (NSRect cellFrame, double dx, double dy1, double dy2, float lineWidth) {
if (lineWidth == 2) {
dx -= 0.5;
@@ -359,7 +339,7 @@ private static NSRect smallerRect (NSRect cellFrame, double dx, double dy1, doub
}
@Override
-void drawBezelWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ viewid) {
+void drawBezelWithFrame_inView (long id, long sel, NSRect cellFrame, long viewid) {
if (this.background != null) {
NSButton button = (NSButton) view;
@@ -369,7 +349,7 @@ void drawBezelWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFr
final NSButtonCell defaultButtonCell = window == null ? null : window.defaultButtonCell();
final boolean isDefault = defaultButtonCell != null && defaultButtonCell.id == id;
- double /*float*/ [] borderRGB = getLighterOrDarkerColor(this.background, 0.3, luma(background) >= 0.5);
+ double [] borderRGB = getLighterOrDarkerColor(this.background, 0.3, luma(background) >= 0.5);
if (isHighlighted && (style & SWT.FLAT) != 0) {
borderRGB = getLighterOrDarkerColor(borderRGB, 0.2, true);
}
@@ -398,13 +378,13 @@ void drawBezelWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFr
path = NSBezierPath.bezierPathWithRect(rect2);
}
if (!isHighlighted) {
- double /*float*/ [] backgroundRGB = this.background;
+ double [] backgroundRGB = this.background;
NSColor backgroundNSColor = NSColor.colorWithDeviceRed(backgroundRGB[0], backgroundRGB[1], backgroundRGB[2], 1f);
if((style & SWT.FLAT) == 0) {
- double /*float*/ [] topRGB = getLighterOrDarkerColor(this.background, 0.2, false);
+ double [] topRGB = getLighterOrDarkerColor(this.background, 0.2, false);
NSColor topColor = NSColor.colorWithDeviceRed(topRGB[0], topRGB[1], topRGB[2], 1f);
- double /*float*/ [] bottomRGB = getLighterOrDarkerColor(this.background, 0.1, true);
+ double [] bottomRGB = getLighterOrDarkerColor(this.background, 0.1, true);
NSColor bottomColor = NSColor.colorWithDeviceRed(bottomRGB[0], bottomRGB[1], bottomRGB[2], 1f);
NSMutableArray ma = NSMutableArray.arrayWithCapacity(4);
@@ -420,7 +400,7 @@ void drawBezelWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFr
path.fill();
}
} else {
- double /*float*/ [] colorRGB0 = getLighterOrDarkerColor(this.background, 0.1f, true);
+ double [] colorRGB0 = getLighterOrDarkerColor(this.background, 0.1f, true);
NSColor color0 = NSColor.colorWithDeviceRed(colorRGB0[0], colorRGB0[1], colorRGB0[2], 1f);
color0.setFill();
path.fill();
@@ -439,7 +419,7 @@ void drawBezelWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFr
}
@Override
-void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ viewid) {
+void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long viewid) {
if ((style & (SWT.CHECK|SWT.RADIO)) != 0 && backgroundImage != null) {
fillBackground (new NSView(viewid), NSGraphicsContext.currentContext(), cellRect, -1);
}
@@ -447,8 +427,8 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
NSCell nsCell = new NSCell(id);
- double /*float*/ x = 0;
- double /*float*/ y = (imageSize.height - cellRect.height)/2f;
+ double x = 0;
+ double y = (imageSize.height - cellRect.height)/2f;
NSRect imageRect = nsCell.imageRectForBounds(cellRect);
NSSize stringSize = ((NSButton)view).attributedTitle().size();
switch (style & (SWT.LEFT|SWT.RIGHT|SWT.CENTER)) {
@@ -479,7 +459,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
}
@Override
-NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ title, NSRect titleRect, long /*int*/ view) {
+NSRect drawTitleWithFrameInView (long id, long sel, long title, NSRect titleRect, long view) {
boolean wrap = (style & SWT.WRAP) != 0 && text.length() != 0;
boolean isEnabled = isEnabled();
if (wrap) {
@@ -488,7 +468,7 @@ NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/
wrapSize.height = MAX_SIZE;
final double[] foreground2;
if (isEnabled) {
- foreground2 = foreground;
+ foreground2 = foreground == null ? display.getNSColorRGB (NSColor.textColor()) : foreground;
} else if (foreground == null) {
foreground2 = DEFAULT_DISABLED_FOREGROUND;
} else {
@@ -527,7 +507,7 @@ boolean drawsBackground() {
}
@Override
-void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long id, NSGraphicsContext context, NSRect rect) {
if ((style & SWT.ARROW) != 0) {
NSRect frame = view.frame();
int arrowSize = Math.min((int)frame.height, (int)frame.width) / 2;
@@ -569,7 +549,7 @@ void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
}
@Override
-NSRect focusRingMaskBoundsForFrame (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+NSRect focusRingMaskBoundsForFrame (long id, long sel, NSRect cellFrame, long view) {
return cellFrame;
}
@@ -665,7 +645,7 @@ public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;
if ((style & SWT.CHECK) != 0 && grayed) return ((NSButton)view).state() == OS.NSMixedState;
- return ((NSButton)view).state() == OS.NSOnState;
+ return ((NSButton)view).state() == OS.NSOnState;
}
/**
@@ -696,7 +676,7 @@ boolean isDescribedByLabel () {
* to go directly to the desired state if we have a grayed checkbox.
*/
@Override
-long /*int*/ nextState(long /*int*/ id, long /*int*/ sel) {
+long nextState(long id, long sel) {
if ((style & SWT.CHECK) != 0 && grayed) {
return ((NSButton)view).state() == OS.NSMixedState ? OS.NSOffState : OS.NSMixedState;
}
@@ -876,7 +856,7 @@ void setFont (NSFont font) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
((NSButton)view).setAttributedTitle(createString());
}
@@ -1047,7 +1027,7 @@ public void setText (String string) {
}
@Override
-NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long id, long sel, NSRect cellFrame) {
NSRect rect = super.titleRectForBounds(id, sel, cellFrame);
if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
NSSize imageSize = image.handle.size();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
index d0aa9147e6..b94292dd21 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,6 +18,7 @@ import org.eclipse.swt.*;
import org.eclipse.swt.accessibility.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.cocoa.*;
+import org.eclipse.swt.internal.graphics.*;
/**
* Instances of this class provide a surface for drawing
@@ -62,7 +63,7 @@ Canvas () {
}
@Override
-long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
+long attributedSubstringFromRange (long id, long sel, long range) {
if (ime != null) return ime.attributedSubstringFromRange (id, sel, range);
return super.attributedSubstringFromRange(id, sel, range);
}
@@ -111,7 +112,7 @@ public Canvas (Composite parent, int style) {
}
@Override
-long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
+long characterIndexForPoint (long id, long sel, long point) {
if (ime != null) return ime.characterIndexForPoint (id, sel, point);
return super.characterIndexForPoint (id, sel, point);
}
@@ -142,7 +143,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height) {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
super.drawBackground(id, context, rect);
if (glcontext != null) {
if (isObscured()) {
@@ -150,7 +151,7 @@ void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
context.saveGraphicsState();
context.setCompositingOperation(OS.NSCompositeClear);
if (visiblePath == null) {
- long /*int*/ visibleRegion = getVisibleRegion();
+ long visibleRegion = getVisibleRegion();
visiblePath = getPath(visibleRegion);
OS.DisposeRgn(visibleRegion);
}
@@ -164,61 +165,61 @@ void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
}
@Override
-void drawRect (long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawRect (long id, long sel, NSRect rect) {
if (glcontext != null && glcontext.view() == null) glcontext.setView(view);
super.drawRect(id, sel, rect);
}
@Override
-void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
super.drawWidget (id, context, rect);
if (caret == null) return;
if (caret.isShowing) {
- long /*int*/ ctx = context.graphicsPort();
+ long ctx = context.graphicsPort();
OS.CGContextSaveGState (ctx);
OS.CGContextSetBlendMode (ctx, OS.kCGBlendModeDifference);
Image image = caret.image;
if (image != null) {
NSImage imageHandle = image.handle;
- NSImageRep imageRep = imageHandle.bestRepresentationForDevice(null);
+ NSSize size = imageHandle.size();
+ NSImageRep imageRep = ImageUtil.createImageRep(image, size);
if (!imageRep.isKindOfClass(OS.class_NSBitmapImageRep)) return;
NSBitmapImageRep rep = new NSBitmapImageRep(imageRep);
CGRect destRect = new CGRect ();
destRect.origin.x = caret.x;
destRect.origin.y = caret.y;
- NSSize size = imageHandle.size();
destRect.size.width = size.width;
destRect.size.height = size.height;
- long /*int*/ data = rep.bitmapData();
- long /*int*/ format = rep.bitmapFormat();
- long /*int*/ bpr = rep.bytesPerRow();
+ long data = rep.bitmapData();
+ long format = rep.bitmapFormat();
+ long bpr = rep.bytesPerRow();
int alphaInfo;
if (rep.hasAlpha()) {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaFirst : OS.kCGImageAlphaLast;
} else {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaNoneSkipFirst : OS.kCGImageAlphaNoneSkipLast;
}
- long /*int*/ provider = OS.CGDataProviderCreateWithData(0, data, bpr * (int)size.height, 0);
- long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
- long /*int*/ cgImage = OS.CGImageCreate((int)size.width, (int)size.height, rep.bitsPerSample(), rep.bitsPerPixel(), bpr, colorspace, alphaInfo, provider, 0, true, 0);
+ long provider = OS.CGDataProviderCreateWithData(0, data, bpr * (int)size.height, 0);
+ long colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long cgImage = OS.CGImageCreate((int)size.width, (int)size.height, rep.bitsPerSample(), rep.bitsPerPixel(), bpr, colorspace, alphaInfo, provider, 0, true, 0);
OS.CGColorSpaceRelease(colorspace);
OS.CGDataProviderRelease(provider);
- OS.CGContextScaleCTM (ctx, 1, -1);
- OS.CGContextTranslateCTM (ctx, 0, -(size.height + 2 * destRect.origin.y));
+ OS.CGContextScaleCTM (ctx, 1, -1);
+ OS.CGContextTranslateCTM (ctx, 0, -(size.height + 2 * destRect.origin.y));
OS.CGContextSetBlendMode (ctx, OS.kCGBlendModeDifference);
OS.CGContextDrawImage (ctx, destRect, cgImage);
- OS.CGImageRelease(cgImage);
+ OS.CGImageRelease(cgImage);
} else {
CGRect drawRect = new CGRect();
drawRect.origin.x = caret.x;
drawRect.origin.y = caret.y;
drawRect.size.width = caret.width != 0 ? caret.width : Caret.DEFAULT_WIDTH;
drawRect.size.height = caret.height;
- long /*int*/ colorspace = OS.CGColorSpaceCreateDeviceRGB();
+ long colorspace = OS.CGColorSpaceCreateDeviceRGB();
OS.CGContextSetFillColorSpace(ctx, colorspace);
OS.CGColorSpaceRelease(colorspace);
- OS.CGContextSetFillColor(ctx, new double /*float*/ [] {1, 1, 1, 1});
+ OS.CGContextSetFillColor(ctx, new double [] {1, 1, 1, 1});
OS.CGContextFillRect(ctx, drawRect);
}
OS.CGContextRestoreGState(ctx);
@@ -226,7 +227,7 @@ void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
}
@Override
-NSRect firstRectForCharacterRange (long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
+NSRect firstRectForCharacterRange (long id, long sel, long range) {
if (ime != null) return ime.firstRectForCharacterRange (id, sel, range);
return super.firstRectForCharacterRange (id, sel, range);
}
@@ -251,7 +252,7 @@ NSRect firstRectForCharacterRange (long /*int*/ id, long /*int*/ sel, long /*int
*/
public Caret getCaret () {
checkWidget();
- return caret;
+ return caret;
}
/**
@@ -268,11 +269,11 @@ public Caret getCaret () {
*/
public IME getIME () {
checkWidget();
- return ime;
+ return ime;
}
@Override
-boolean hasMarkedText (long /*int*/ id, long /*int*/ sel) {
+boolean hasMarkedText (long id, long sel) {
if (ime != null) return ime.hasMarkedText (id, sel);
return super.hasMarkedText (id, sel);
}
@@ -283,7 +284,7 @@ boolean imeInComposition () {
}
@Override
-boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
+boolean insertText (long id, long sel, long string) {
if (ime != null) {
if (!ime.insertText (id, sel, string)) return false;
}
@@ -291,51 +292,51 @@ boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
}
@Override
-boolean isOpaque (long /*int*/ id, long /*int*/ sel) {
+boolean isOpaque (long id, long sel) {
if (glcontext != null) return true;
return super.isOpaque(id, sel);
}
@Override
-NSRange markedRange (long /*int*/ id, long /*int*/ sel) {
+NSRange markedRange (long id, long sel) {
if (ime != null) return ime.markedRange (id, sel);
return super.markedRange (id, sel);
}
@Override
-boolean readSelectionFromPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboard) {
- boolean result = false;
- NSPasteboard pboard = new NSPasteboard(pasteboard);
- NSArray availableTypes = pboard.types();
- NSString type;
-
- for (long /*int*/ i = 0; i < supportedPboardTypes.count(); i++) {
- if (result) break;
- type = new NSString(supportedPboardTypes.objectAtIndex(i));
- if (availableTypes.containsObject(type)) {
- result = readSelectionFromPasteboard(pboard, type);
- }
- }
- return result;
+boolean readSelectionFromPasteboard(long id, long sel, long pasteboard) {
+ boolean result = false;
+ NSPasteboard pboard = new NSPasteboard(pasteboard);
+ NSArray availableTypes = pboard.types();
+ NSString type;
+
+ for (long i = 0; i < supportedPboardTypes.count(); i++) {
+ if (result) break;
+ type = new NSString(supportedPboardTypes.objectAtIndex(i));
+ if (availableTypes.containsObject(type)) {
+ result = readSelectionFromPasteboard(pboard, type);
+ }
+ }
+ return result;
}
boolean readSelectionFromPasteboard(NSPasteboard pboard, NSString type) {
- boolean result = false;
- NSString newSelection = null;
- if (type.isEqualToString(OS.NSPasteboardTypeString)) {
- NSString string = pboard.stringForType(OS.NSPasteboardTypeString);
- if (string != null && string.length() > 0) {
- newSelection = string;
- }
- }
+ boolean result = false;
+ NSString newSelection = null;
+ if (type.isEqualToString(OS.NSPasteboardTypeString)) {
+ NSString string = pboard.stringForType(OS.NSPasteboardTypeString);
+ if (string != null && string.length() > 0) {
+ newSelection = string;
+ }
+ }
- if (newSelection != null) {
- Accessible acc = getAccessible();
- acc.internal_accessibilitySetValue_forAttribute(newSelection, OS.NSAccessibilitySelectedTextAttribute, ACC.CHILDID_SELF);
- result = true;
- }
+ if (newSelection != null) {
+ Accessible acc = getAccessible();
+ acc.internal_accessibilitySetValue_forAttribute(newSelection, OS.NSAccessibilitySelectedTextAttribute, ACC.CHILDID_SELF);
+ result = true;
+ }
- return result;
+ return result;
}
@Override
@@ -406,14 +407,14 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
if (isFocus) caret.killFocus ();
Rectangle clientRect = getClientArea ();
Rectangle sourceRect = new Rectangle (x, y, width, height);
- if (sourceRect.intersects (clientRect)) {
- getShell().setScrolling();
- update (all);
- }
Control control = findBackgroundControl ();
boolean redraw = control != null && control.backgroundImage != null;
if (!redraw) redraw = hasRegion ();
if (!redraw) redraw = isObscured ();
+ if (!redraw && sourceRect.intersects (clientRect)) {
+ getShell().setScrolling();
+ redraw = !update(all);
+ }
if (redraw) {
redrawWidget (view, x, y, width, height, false);
redrawWidget (view, destX, destY, width, height, false);
@@ -495,7 +496,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
}
}
- if (all) {
+ if (all) {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
@@ -510,7 +511,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
}
@Override
-NSRange selectedRange (long /*int*/ id, long /*int*/ sel) {
+NSRange selectedRange (long id, long sel) {
if (ime != null) return ime.selectedRange (id, sel);
return super.selectedRange (id, sel);
}
@@ -596,7 +597,7 @@ public void setIME (IME ime) {
}
@Override
-boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*int*/ string, long /*int*/ range) {
+boolean setMarkedText_selectedRange (long id, long sel, long string, long range) {
if (ime != null) {
if (!ime.setMarkedText_selectedRange (id, sel, string, range)) return false;
}
@@ -604,13 +605,13 @@ boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*i
}
@Override
-long /*int*/ validAttributesForMarkedText (long /*int*/ id, long /*int*/ sel) {
+long validAttributesForMarkedText (long id, long sel) {
if (ime != null) return ime.validAttributesForMarkedText (id, sel);
return super.validAttributesForMarkedText(id, sel);
}
@Override
-long /*int*/ validRequestorForSendType(long /*int*/ id, long /*int*/ sel, long /*int*/ sendType, long /*int*/ returnType) {
+long validRequestorForSendType(long id, long sel, long sendType, long returnType) {
if (id == view.id) {
Accessible acc = getAccessible();
if (acc != null) {
@@ -637,12 +638,12 @@ long /*int*/ validRequestorForSendType(long /*int*/ id, long /*int*/ sel, long /
}
@Override
-void updateOpenGLContext(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void updateOpenGLContext(long id, long sel, long notification) {
if (glcontext != null) ((NSOpenGLContext)glcontext).update();
}
@Override
-void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void viewWillMoveToWindow(long id, long sel, long arg0) {
super.viewWillMoveToWindow(id, sel, arg0);
if (glcontext != null && id == view.id && arg0 != 0) {
Widget newShell = display.getWidget(new NSWindow(arg0).contentView());
@@ -657,27 +658,27 @@ void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0)
}
@Override
-boolean writeSelectionToPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboardObj, long /*int*/ typesObj) {
- boolean result = false;
- NSPasteboard pboard = new NSPasteboard(pasteboardObj);
- NSArray types = new NSArray(typesObj);
- NSMutableArray typesToDeclare = NSMutableArray.arrayWithCapacity(2);
- NSString type;
-
- for (long /*int*/ i = 0; i < supportedPboardTypes.count(); i++) {
- type = new NSString(supportedPboardTypes.objectAtIndex(i));
- if (types.containsObject(type)) typesToDeclare.addObject(type);
- }
-
- if (typesToDeclare.count() > 0) {
- pboard.declareTypes(typesToDeclare, view);
- for (long /*int*/ i = 0; i < typesToDeclare.count(); i++) {
- type = new NSString(typesToDeclare.objectAtIndex(i));
- if (writeSelectionToPasteboard(pboard, type)) result = true;
- }
- }
-
- return result;
+boolean writeSelectionToPasteboard(long id, long sel, long pasteboardObj, long typesObj) {
+ boolean result = false;
+ NSPasteboard pboard = new NSPasteboard(pasteboardObj);
+ NSArray types = new NSArray(typesObj);
+ NSMutableArray typesToDeclare = NSMutableArray.arrayWithCapacity(2);
+ NSString type;
+
+ for (long i = 0; i < supportedPboardTypes.count(); i++) {
+ type = new NSString(supportedPboardTypes.objectAtIndex(i));
+ if (types.containsObject(type)) typesToDeclare.addObject(type);
+ }
+
+ if (typesToDeclare.count() > 0) {
+ pboard.declareTypes(typesToDeclare, view);
+ for (long i = 0; i < typesToDeclare.count(); i++) {
+ type = new NSString(typesToDeclare.objectAtIndex(i));
+ if (writeSelectionToPasteboard(pboard, type)) result = true;
+ }
+ }
+
+ return result;
}
boolean writeSelectionToPasteboard(NSPasteboard pboard, NSString type) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Caret.java
index 69011e8234..4ce9537975 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Caret.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -286,7 +286,10 @@ void killFocus () {
@Override
void releaseParent () {
super.releaseParent ();
- if (this == parent.getCaret ()) parent.setCaret (null);
+ if (parent != null && this == parent.caret) {
+ if (!parent.isDisposed()) parent.setCaret (null);
+ else parent.caret = null;
+ }
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
index 9baf68d180..0dde704bb0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
@@ -94,7 +94,7 @@ public ColorDialog(Shell parent, int style) {
checkSubclass ();
}
-void changeColor(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void changeColor(long id, long sel, long sender) {
selected = true;
}
@@ -153,7 +153,7 @@ public RGB open() {
}
if (rgbs != null) {
NSArray keys = colorList.allKeys();
- int length = (int)/*64*/keys.count();
+ int length = (int)keys.count();
for (int i=length-1; i>=0; i--) {
colorList.removeColorWithKey(new NSString(keys.objectAtIndex(i)));
}
@@ -170,7 +170,7 @@ public RGB open() {
}
}
SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
- long /*int*/ jniRef = OS.NewGlobalRef(this);
+ long jniRef = OS.NewGlobalRef(this);
if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
panel.setDelegate(delegate);
@@ -186,18 +186,18 @@ public RGB open() {
if (selected) {
NSColor color = panel.color();
if (color != null) {
- double /*float*/ [] handle = display.getNSColorRGB(color);
+ double [] handle = display.getNSColorRGB(color);
if (handle != null) {
rgb = new RGB((int)(handle[0] * 255), (int)(handle[1] * 255), (int)(handle[2] * 255));
}
}
}
NSArray keys = colorList.allKeys();
- int length = (int)/*64*/keys.count();
+ int length = (int)keys.count();
rgbs = new RGB[length];
for (int i=0; i<length; i++) {
NSString key = new NSString(keys.objectAtIndex(i));
- double /*float*/ [] handle = display.getNSColorRGB(colorList.colorWithKey(key));
+ double [] handle = display.getNSColorRGB(colorList.colorWithKey(key));
if (handle != null) {
rgbs[i] = new RGB((int)(handle[0] * 255), (int)(handle[1] * 255), (int)(handle[2] * 255));
}
@@ -235,7 +235,7 @@ public void setRGBs(RGB[] rgbs) {
this.rgbs = rgbs;
}
-void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void windowWillClose(long id, long sel, long sender) {
NSApplication.sharedApplication().stop(null);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
index 3f514284a4..bbc0bfb238 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
@@ -143,7 +143,7 @@ public void add (String string) {
NSAttributedString str = createString(string);
if ((style & SWT.READ_ONLY) != 0) {
NSPopUpButton widget = (NSPopUpButton)view;
- long /*int*/ selection = widget.indexOfSelectedItem();
+ long selection = widget.indexOfSelectedItem();
NSMenu nsMenu = widget.menu();
NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
NSString empty = NSString.string();
@@ -191,7 +191,7 @@ public void add (String string, int index) {
NSAttributedString str = createString(string);
if ((style & SWT.READ_ONLY) != 0) {
NSPopUpButton widget = (NSPopUpButton)view;
- long /*int*/ selection = widget.indexOfSelectedItem();
+ long selection = widget.indexOfSelectedItem();
NSMenu nsMenu = widget.menu();
NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
NSString empty = NSString.string();
@@ -332,7 +332,7 @@ public void addVerifyListener (VerifyListener listener) {
}
@Override
-boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean becomeFirstResponder (long id, long sel) {
receivingFocus = true;
boolean result = super.becomeFirstResponder (id, sel);
receivingFocus = false;
@@ -399,14 +399,14 @@ public void clearSelection () {
}
@Override
-void setObjectValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void setObjectValue(long id, long sel, long arg0) {
super.setObjectValue(id, sel, ignoreSetObject ? arg0 : createString(text).id);
}
@Override
-void comboBoxSelectionDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void comboBoxSelectionDidChange(long id, long sel, long notification) {
NSComboBox widget = (NSComboBox)view;
- long /*int*/ tableSelection = widget.indexOfSelectedItem();
+ long tableSelection = widget.indexOfSelectedItem();
widget.selectItemAtIndex(tableSelection);
NSAttributedString attStr = new NSAttributedString (widget.itemObjectValueAtIndex(tableSelection));
NSString nsString = attStr.string();
@@ -428,7 +428,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
ignoreSetObject = true;
NSComboBoxCell cell = new NSComboBoxCell (viewCell.id);
NSArray array = cell.objectValues ();
- int length = (int)/*64*/array.count ();
+ int length = (int)array.count ();
if (length > 0) {
cell = new NSComboBoxCell (cell.copy ());
for (int i = 0; i < length; i++) {
@@ -520,7 +520,7 @@ void createHandle () {
widget.init();
widget.setDelegate(widget);
NSCell cell = widget.cell();
- if (OS.VERSION >= 0x1060 && cell != null){
+ if (cell != null) {
cell.setUsesSingleLineMode(true);
}
view = widget;
@@ -547,13 +547,13 @@ void createWidget() {
}
@Override
-void comboBoxWillDismiss(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void comboBoxWillDismiss(long id, long sel, long notification) {
display.currentCombo = null;
listVisible = false;
}
@Override
-void comboBoxWillPopUp(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void comboBoxWillPopUp(long id, long sel, long notification) {
display.currentCombo = this;
listVisible = true;
}
@@ -598,7 +598,7 @@ public void cut () {
@Override
Color defaultBackground () {
- return display.getWidgetColor (SWT.COLOR_LIST_BACKGROUND);
+ return display.getWidgetColor (SWT.COLOR_LIST_BACKGROUND);
}
@Override
@@ -609,7 +609,7 @@ NSFont defaultNSFont() {
@Override
Color defaultForeground () {
- return display.getWidgetColor (SWT.COLOR_LIST_FOREGROUND);
+ return display.getWidgetColor (SWT.COLOR_LIST_FOREGROUND);
}
@Override
@@ -664,7 +664,7 @@ public void deselectAll () {
sendEvent (SWT.Modify);
} else {
NSComboBox widget = (NSComboBox)view;
- long /*int*/ index = widget.indexOfSelectedItem();
+ long index = widget.indexOfSelectedItem();
if (index != -1) widget.deselectItemAtIndex(index);
}
}
@@ -680,7 +680,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
NSPoint textViewMouse = new NSPoint();
textViewMouse.x = x;
textViewMouse.y = y;
- long /*int*/ charPosition = feAsTextView.characterIndexForInsertionAtPoint(textViewMouse);
+ long charPosition = feAsTextView.characterIndexForInsertionAtPoint(textViewMouse);
if (charPosition != OS.NSNotFound() && charPosition >= selectedRange.location && charPosition < (selectedRange.location + selectedRange.length)) {
if (super.dragDetect(x, y, filter, consume)) {
if (consume != null) consume[0] = true;
@@ -698,11 +698,14 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
@Override
Cursor findCursor () {
Cursor cursor = super.findCursor ();
- return (cursor != null || (style & SWT.READ_ONLY) != 0) ? cursor : display.getSystemCursor (SWT.CURSOR_IBEAM);
+ if (cursor == null && (style & SWT.READ_ONLY) == 0 && OS.VERSION < OS.VERSION(10, 14, 0)) {
+ cursor = display.getSystemCursor (SWT.CURSOR_IBEAM);
+ }
+ return cursor;
}
@Override
-NSRect focusRingMaskBoundsForFrame (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+NSRect focusRingMaskBoundsForFrame (long id, long sel, NSRect cellFrame, long view) {
return cellFrame;
}
@@ -723,7 +726,7 @@ NSRect focusRingMaskBoundsForFrame (long /*int*/ id, long /*int*/ sel, NSRect ce
*/
public int getCaretPosition() {
checkWidget();
- return selectionRange != null ? (int)/*64*/selectionRange.location : 0;
+ return selectionRange != null ? (int)selectionRange.location : 0;
}
/**
@@ -749,8 +752,8 @@ public Point getCaretLocation() {
NSLayoutManager layoutManager = widget.layoutManager();
NSTextContainer container = widget.textContainer();
NSRange range = widget.selectedRange();
- long /*int*/ [] rectCount = new long /*int*/ [1];
- long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
+ long [] rectCount = new long [1];
+ long pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
NSRect rect = new NSRect();
if (rectCount[0] > 0) OS.memmove(rect, pArray, NSRect.sizeof);
NSPoint pt = new NSPoint();
@@ -768,7 +771,7 @@ int getCharCount() {
str = new NSCell(((NSComboBox)view).cell()).title();
}
if (str == null) return 0;
- return (int)/*64*/str.length();
+ return (int)str.length();
}
/**
@@ -815,9 +818,9 @@ public String getItem (int index) {
public int getItemCount () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) {
- return (int)/*64*/((NSPopUpButton)view).numberOfItems();
+ return (int)((NSPopUpButton)view).numberOfItems();
} else {
- return (int)/*64*/((NSComboBox)view).numberOfItems();
+ return (int)((NSComboBox)view).numberOfItems();
}
}
@@ -888,7 +891,7 @@ public boolean getListVisible () {
@Override
String getNameText () {
- return getText ();
+ return getText ();
}
@Override
@@ -940,9 +943,9 @@ public Point getSelection () {
} else {
if (selectionRange == null) {
NSString str = new NSTextFieldCell (((NSTextField) view).cell ()).title ();
- return new Point((int)/*64*/str.length (), (int)/*64*/str.length ());
+ return new Point((int)str.length (), (int)str.length ());
}
- return new Point((int)/*64*/selectionRange.location, (int)/*64*/(selectionRange.location + selectionRange.length));
+ return new Point((int)selectionRange.location, (int)(selectionRange.location + selectionRange.length));
}
}
@@ -960,9 +963,9 @@ public Point getSelection () {
public int getSelectionIndex () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) {
- return (int)/*64*/((NSPopUpButton)view).indexOfSelectedItem();
+ return (int)((NSPopUpButton)view).indexOfSelectedItem();
} else {
- return (int)/*64*/((NSComboBox)view).indexOfSelectedItem();
+ return (int)((NSComboBox)view).indexOfSelectedItem();
}
}
@@ -994,12 +997,12 @@ char [] getText (int start, int end) {
NSRange range = new NSRange ();
range.location = start;
if (end == -1) {
- long /*int*/ length = str.length();
+ long length = str.length();
range.length = length - start;
} else {
range.length = end - start;
}
- char [] buffer= new char [(int)/*64*/range.length];
+ char [] buffer= new char [(int)range.length];
str.getCharacters(buffer, range);
return buffer;
}
@@ -1042,7 +1045,7 @@ public int getTextHeight () {
*/
public int getTextLimit () {
checkWidget();
- return textLimit;
+ return textLimit;
}
/**
@@ -1067,7 +1070,7 @@ public int getVisibleItemCount () {
if ((style & SWT.READ_ONLY) != 0) {
return getItemCount ();
} else {
- return (int)/*64*/((NSComboBox)view).numberOfVisibleItems();
+ return (int)((NSComboBox)view).numberOfVisibleItems();
}
}
@@ -1125,22 +1128,22 @@ public int indexOf (String string, int start) {
}
@Override
-boolean isEventView (long /*int*/ id) {
+boolean isEventView (long id) {
return true;
}
@Override
-void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuWillOpen(long id, long sel, long menu) {
listVisible = true;
}
@Override
-void menuDidClose(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuDidClose(long id, long sel, long menu) {
listVisible = false;
}
@Override
-void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown(long id, long sel, long theEvent) {
// If this is a combo box with an editor field and the control is disposed
// while the view's cell editor is open we crash while tearing down the
// popup window. Fix is to retain the view before letting Cocoa track
@@ -1455,7 +1458,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
boolean result = super.sendKeyEvent (nsEvent, type);
if (!result) return result;
int stateMask = 0;
- long /*int*/ modifierFlags = nsEvent.modifierFlags();
+ long modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSAlternateKeyMask) != 0) stateMask |= SWT.ALT;
if ((modifierFlags & OS.NSShiftKeyMask) != 0) stateMask |= SWT.SHIFT;
if ((modifierFlags & OS.NSControlKeyMask) != 0) stateMask |= SWT.CONTROL;
@@ -1495,7 +1498,7 @@ boolean sendTrackingKeyEvent (NSEvent nsEvent, int type) {
* to send these events when the event is removed from the
* queue.
*/
- long /*int*/ modifiers = nsEvent.modifierFlags();
+ long modifiers = nsEvent.modifierFlags();
if ((modifiers & OS.NSShiftKeyMask) == 0) {
short keyCode = nsEvent.keyCode ();
switch (keyCode) {
@@ -1561,7 +1564,7 @@ void setFont (NSFont font) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
super.setForeground(color);
updateItems();
if ((style & SWT.READ_ONLY) == 0) {
@@ -1733,7 +1736,7 @@ public void setSelection (Point selection) {
if ((style & SWT.READ_ONLY) == 0) {
NSComboBox widget = (NSComboBox)view;
NSString str = new NSCell(widget.cell()).title();
- int length = (int)/*64*/str.length();
+ int length = (int)str.length();
int start = Math.min (Math.max (Math.min (selection.x, selection.y), 0), length);
int end = Math.min (Math.max (Math.max (selection.x, selection.y), 0), length);
selectionRange = new NSRange();
@@ -1854,16 +1857,16 @@ public void setVisibleItemCount (int count) {
}
@Override
-boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ affectedCharRange, long /*int*/ replacementString) {
+boolean shouldChangeTextInRange_replacementString(long id, long sel, long affectedCharRange, long replacementString) {
NSRange range = new NSRange();
OS.memmove(range, affectedCharRange, NSRange.sizeof);
boolean result = callSuperBoolean(id, sel, range, replacementString);
if (hooks (SWT.Verify)) {
String string = new NSString(replacementString).getString();
NSEvent currentEvent = display.application.currentEvent();
- long /*int*/ type = currentEvent.type();
+ long type = currentEvent.type();
if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
- String newText = verifyText(string, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
+ String newText = verifyText(string, (int)range.location, (int)(range.location+range.length), currentEvent);
if (newText == null) return false;
if (!string.equals(newText)) {
int length = newText.length();
@@ -1896,20 +1899,20 @@ boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/
}
@Override
-void textViewDidChangeSelection(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textViewDidChangeSelection(long id, long sel, long aNotification) {
NSNotification notification = new NSNotification(aNotification);
NSText editor = new NSText(notification.object().id);
selectionRange = editor.selectedRange();
}
@Override
-void textDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textDidChange (long id, long sel, long aNotification) {
super.textDidChange (id, sel, aNotification);
postEvent (SWT.Modify);
}
@Override
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(long id, long sel, long aTextView, long oldSelectedCharRange, long newSelectedCharRange) {
/*
* If the selection is changing as a result of the receiver getting focus
* then return the receiver's last selection range, otherwise the full
@@ -1926,7 +1929,7 @@ NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(long /*i
void updateItems () {
if ((style & SWT.READ_ONLY) != 0) {
NSPopUpButton widget = (NSPopUpButton)view;
- int count = (int)/*64*/ widget.numberOfItems();
+ int count = (int) widget.numberOfItems();
for (int i = 0; i < count; i++) {
NSMenuItem item = new NSMenuItem (widget.itemAtIndex(i));
NSAttributedString attStr = item.attributedTitle();
@@ -1935,7 +1938,7 @@ void updateItems () {
}
} else {
NSComboBox widget = (NSComboBox)view;
- int count = (int)/*64*/ widget.numberOfItems();
+ int count = (int) widget.numberOfItems();
for (int i = 0; i < count; i++) {
NSAttributedString attStr = new NSAttributedString (widget.itemObjectValueAtIndex(i));
String string = attStr.string().getString();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index ef7256a2b0..28ae243b22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,6 +17,7 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.accessibility.*;
import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.ExceptionStash;
import org.eclipse.swt.internal.cocoa.*;
/**
@@ -96,8 +97,10 @@ public Composite (Composite parent, int style) {
}
Control [] _getChildren () {
- NSArray views = contentView().subviews();
- int count = (int)/*64*/views.count();
+ NSView nsClipView = contentView();
+ if (nsClipView == null) return new Control [0];
+ NSArray views = nsClipView.subviews();
+ int count = (int)views.count();
Control [] children = new Control [count];
if (count == 0) return children;
int j = 0;
@@ -132,7 +135,7 @@ Control [] _getTabList () {
}
@Override
-boolean acceptsFirstMouse (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+boolean acceptsFirstMouse (long id, long sel, long theEvent) {
if ((state & CANVAS) != 0) {
return true;
}
@@ -140,7 +143,7 @@ boolean acceptsFirstMouse (long /*int*/ id, long /*int*/ sel, long /*int*/ theEv
}
@Override
-boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean acceptsFirstResponder (long id, long sel) {
if ((state & CANVAS) != 0) {
if ((style & SWT.NO_FOCUS) == 0 && hooksKeys ()) {
if (contentView().subviews().count() == 0) return true;
@@ -151,9 +154,9 @@ boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityAttributeValue (long id, long sel, long arg0) {
NSString nsAttributeName = new NSString(arg0);
- long /*int*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+ long superValue = super.accessibilityAttributeValue(id, sel, arg0);
if ((state & CANVAS) != 0) {
// If this Composite has an Accessible that defined a role, return that, unless the
@@ -185,7 +188,7 @@ long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, lon
@Override
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
if (id == accessibleHandle()) {
// If a Composite or subclass has an Accessible it should not be ignored.
if (accessible != null) return accessible.internal_accessibilityIsIgnored(ACC.CHILDID_SELF);
@@ -347,7 +350,7 @@ public void drawBackground(GC gc, int x, int y, int width, int height, int offse
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
if ((state & CANVAS) != 0) {
if ((style & SWT.NO_BACKGROUND) == 0) {
@@ -565,7 +568,7 @@ public boolean isLayoutDeferred () {
}
@Override
-boolean isOpaque (long /*int*/ id, long /*int*/ sel) {
+boolean isOpaque (long id, long sel) {
if ((state & CANVAS) != 0) {
if (id == view.id) {
return region == null && isOpaque();
@@ -594,7 +597,7 @@ boolean isTabGroup () {
}
@Override
-void keyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyDown (long id, long sel, long theEvent) {
if (hasFocus()) {
if ((state & CANVAS) != 0) {
Shell s = this.getShell();
@@ -925,39 +928,76 @@ Point minimumSize (int wHint, int Hint, boolean changed) {
}
@Override
-boolean mouseEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent, int type) {
+boolean mouseEvent (long id, long sel, long theEvent, int type) {
boolean result = super.mouseEvent (id, sel, theEvent, type);
return (state & CANVAS) == 0 ? result : new NSEvent (theEvent).type () != OS.NSLeftMouseDown;
}
@Override
-void pageDown(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void pageDown(long id, long sel, long sender) {
if ((state & CANVAS) != 0) return;
super.pageDown(id, sel, sender);
}
@Override
-void pageUp(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void pageUp(long id, long sel, long sender) {
if ((state & CANVAS) != 0) return;
super.pageUp(id, sel, sender);
}
@Override
-void reflectScrolledClipView (long /*int*/ id, long /*int*/ sel, long /*int*/ aClipView) {
+void redrawWidget(NSView view, boolean redrawChildren) {
+ super.redrawWidget(view, redrawChildren);
+ if (redrawChildren) {
+ Control[] _getChildren = _getChildren();
+ for (Control child : _getChildren) {
+ if (child != null && !child.isDisposed () && child.isVisible()) {
+ child.redrawWidget(child.view, redrawChildren);
+ }
+ }
+ }
+}
+
+@Override
+public void redraw(int x, int y, int width, int height, boolean all) {
+ super.redraw(x, y, width, height, all);
+ if (all) {
+ Control[] children = _getChildren();
+ for (Control child : children) {
+ if (child != null && !child.isDisposed () && child.isVisible()) {
+ NSRect rect = new NSRect();
+ rect.x = x;
+ rect.y = y;
+ rect.width = width;
+ rect.height = height;
+ rect = view.convertRect_toView_(rect, child.view);
+ child.redraw((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height, all);
+ }
+ }
+ }
+}
+
+@Override
+void reflectScrolledClipView (long id, long sel, long aClipView) {
if ((state & CANVAS) != 0) return;
super.reflectScrolledClipView (id, sel, aClipView);
}
@Override
void releaseChildren (boolean destroy) {
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
- if (child != null && !child.isDisposed ()) {
- child.release (false);
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ for (Control child : _getChildren ()) {
+ if (child == null || child.isDisposed ())
+ continue;
+
+ try {
+ child.release (false);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
}
+ super.releaseChildren (destroy);
}
- super.releaseChildren (destroy);
}
@Override
@@ -992,20 +1032,18 @@ void resized () {
}
@Override
-void scrollWheel (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void scrollWheel (long id, long sel, long theEvent) {
if ((state & CANVAS) != 0) {
NSView view = scrollView != null ? scrollView : this.view;
if (id == view.id) {
getShell().deferFlushing();
NSEvent nsEvent = new NSEvent(theEvent);
boolean handled = false;
- double /*float*/ deltaY = nsEvent.deltaY();
- double /*float*/ deltaX = nsEvent.deltaX ();
+ double deltaY = nsEvent.deltaY();
+ double deltaX = nsEvent.deltaX ();
if ((hooks(SWT.Gesture) || filters (SWT.Gesture))) {
- if (deltaX != 0 || deltaY != 0) {
- if (!gestureEvent(id, theEvent, SWT.GESTURE_PAN)) {
- handled = true;
- }
+ if (!gestureEvent(id, theEvent, SWT.GESTURE_PAN)) {
+ handled = true;
}
}
if (!handled) {
@@ -1166,7 +1204,11 @@ boolean setTabGroupFocus () {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
- if (child.isTabItem () && child.setTabItemFocus ()) return true;
+ /*
+ * It is unlikely but possible that a child is disposed at this point, for more
+ * details refer bug 381668.
+ */
+ if (!child.isDisposed() && child.isTabItem () && child.setTabItemFocus ()) return true;
}
return false;
}
@@ -1274,4 +1316,9 @@ void updateLayout (boolean all) {
}
}
+@Override
+public String toString() {
+ return super.toString() + " [layout=" + layout + "]";
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index cba8bccc1b..65e9859587 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,6 +14,8 @@
*******************************************************************************/
package org.eclipse.swt.widgets;
+import java.util.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.accessibility.*;
import org.eclipse.swt.events.*;
@@ -63,13 +65,13 @@ public abstract class Control extends Widget implements Drawable {
Object layoutData;
int drawCount, backgroundAlpha = 255;
Menu menu;
- double /*float*/ [] foreground, background;
+ double [] foreground, background;
Image backgroundImage;
Font font;
Cursor cursor;
Region region;
NSBezierPath regionPath;
- long /*int*/ visibleRgn;
+ long visibleRgn;
Accessible accessible;
boolean inCacheDisplayInRect;
boolean touchEnabled;
@@ -82,6 +84,8 @@ public abstract class Control extends Widget implements Drawable {
*/
static final int DEFAULT_DRAG_HYSTERESIS = 5;
+ static final boolean FORCE_RUN_UPDATE = Boolean.valueOf(System.getProperty("org.eclipse.swt.internal.control.forceRunUpdate"));
+
Control () {
/* Do nothing */
}
@@ -123,15 +127,15 @@ public Control (Composite parent, int style) {
}
@Override
-boolean acceptsFirstMouse (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+boolean acceptsFirstMouse (long id, long sel, long theEvent) {
Shell shell = getShell ();
if ((shell.style & SWT.ON_TOP) != 0) return true;
return super.acceptsFirstMouse (id, sel, theEvent);
}
@Override
-long /*int*/ accessibleHandle() {
- long /*int*/ returnValue = view.id;
+long accessibleHandle() {
+ long returnValue = view.id;
if (view instanceof NSControl) {
if (((NSControl) view).cell() != null) {
@@ -143,7 +147,7 @@ long /*int*/ accessibleHandle() {
}
@Override
-long /*int*/ accessibilityActionDescription(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityActionDescription(long id, long sel, long arg0) {
if (id == accessibleHandle() && accessible != null) {
NSString actionName = new NSString(arg0);
id returnValue = accessible.internal_accessibilityActionDescription(actionName, ACC.CHILDID_SELF);
@@ -153,8 +157,8 @@ long /*int*/ accessibilityActionDescription(long /*int*/ id, long /*int*/ sel, l
}
@Override
-long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
- long /*int*/ returnValue = super.accessibilityActionNames(id, sel);
+long accessibilityActionNames(long id, long sel) {
+ long returnValue = super.accessibilityActionNames(id, sel);
if (handleIsAccessible(id)) {
if (accessible != null) {
NSArray baseArray = accessible.internal_accessibilityActionNames(ACC.CHILDID_SELF);
@@ -172,9 +176,9 @@ long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityAttributeNames(long id, long sel) {
- long /*int*/ returnValue = 0;
+ long returnValue = 0;
if (handleIsAccessible(id) && accessible != null) {
// See if the accessible is defining the attribute set for the control.
@@ -200,12 +204,12 @@ long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
* or overridden by the SWT Accessible. false if the Cocoa defaults for the control should
* be used.
*/
-boolean handleIsAccessible(long /*int*/ id) {
+boolean handleIsAccessible(long id) {
return id == accessibleHandle();
}
@Override
-long /*int*/ accessibilityParameterizedAttributeNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityParameterizedAttributeNames(long id, long sel) {
if (handleIsAccessible(id) && accessible != null) {
NSArray returnValue = accessible.internal_accessibilityParameterizedAttributeNames(ACC.CHILDID_SELF);
@@ -216,7 +220,7 @@ long /*int*/ accessibilityParameterizedAttributeNames(long /*int*/ id, long /*in
}
@Override
-void accessibilityPerformAction(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void accessibilityPerformAction(long id, long sel, long arg0) {
if (handleIsAccessible(id) && accessible != null) {
NSString action = new NSString(arg0);
if (accessible.internal_accessibilityPerformAction(action, ACC.CHILDID_SELF)) return;
@@ -225,7 +229,7 @@ void accessibilityPerformAction(long /*int*/ id, long /*int*/ sel, long /*int*/
}
@Override
-long /*int*/ accessibilityFocusedUIElement(long /*int*/ id, long /*int*/ sel) {
+long accessibilityFocusedUIElement(long id, long sel) {
id returnValue = null;
if (handleIsAccessible(id) && accessible != null) {
@@ -241,7 +245,7 @@ long /*int*/ accessibilityFocusedUIElement(long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ accessibilityHitTest(long /*int*/ id, long /*int*/ sel, NSPoint point) {
+long accessibilityHitTest(long id, long sel, NSPoint point) {
id returnValue = null;
if (handleIsAccessible(id) && accessible != null) {
@@ -257,9 +261,9 @@ long /*int*/ accessibilityHitTest(long /*int*/ id, long /*int*/ sel, NSPoint poi
}
@Override
-long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityAttributeValue(long id, long sel, long arg0) {
NSString attribute = new NSString(arg0);
- long /*int*/ returnValue = 0;
+ long returnValue = 0;
id returnObject = null;
if (handleIsAccessible(id) && accessible != null) {
@@ -287,7 +291,7 @@ long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long
}
@Override
-long /*int*/ accessibilityAttributeValue_forParameter(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+long accessibilityAttributeValue_forParameter(long id, long sel, long arg0, long arg1) {
NSString attribute = new NSString(arg0);
id returnValue = null;
@@ -306,7 +310,7 @@ long /*int*/ accessibilityAttributeValue_forParameter(long /*int*/ id, long /*in
}
@Override
-boolean accessibilityIsAttributeSettable(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+boolean accessibilityIsAttributeSettable(long id, long sel, long arg0) {
boolean returnValue = false;
if (handleIsAccessible(id) && accessible != null) {
NSString attribute = new NSString (arg0);
@@ -319,7 +323,7 @@ boolean accessibilityIsAttributeSettable(long /*int*/ id, long /*int*/ sel, long
}
@Override
-void accessibilitySetValue_forAttribute(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+void accessibilitySetValue_forAttribute(long id, long sel, long arg0, long arg1) {
if (handleIsAccessible(id) && accessible != null) {
id value = new id(arg0);
NSString attribute = new NSString(arg1);
@@ -758,27 +762,15 @@ public void addTraverseListener (TraverseListener listener) {
}
@Override
-boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean becomeFirstResponder (long id, long sel) {
if ((state & DISABLED) != 0) return false;
return super.becomeFirstResponder (id, sel);
}
-@Override
-void beginGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
- if (!gestureEvent(id, event, SWT.GESTURE_BEGIN)) return;
- super.beginGestureWithEvent(id, sel, event);
-}
-
-@Override
-void endGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
- if (!gestureEvent(id, event, SWT.GESTURE_END)) return;
- super.endGestureWithEvent(id, sel, event);
-}
-
-void calculateVisibleRegion (NSView view, long /*int*/ visibleRgn, boolean clipChildren) {
- long /*int*/ tempRgn = OS.NewRgn ();
+void calculateVisibleRegion (NSView view, long visibleRgn, boolean clipChildren) {
+ long tempRgn = OS.NewRgn ();
if (!view.isHiddenOrHasHiddenAncestor() && isDrawing()) {
- long /*int*/ childRgn = OS.NewRgn ();
+ long childRgn = OS.NewRgn ();
NSWindow window = view.window ();
NSView contentView = window.contentView();
NSView frameView = contentView.superview();
@@ -797,7 +789,7 @@ void calculateVisibleRegion (NSView view, long /*int*/ visibleRgn, boolean clipC
if (OS.EmptyRgn (visibleRgn)) break;
if (clipChildren || tempView.id != view.id) {
NSArray subviews = tempView.subviews();
- long /*int*/ count = subviews.count();
+ long count = subviews.count();
for (int i = 0; i < count; i++) {
NSView child = new NSView (subviews.objectAtIndex(count - i - 1));
if (lastControl != null && child.id == lastControl.id) break;
@@ -821,7 +813,7 @@ void calculateVisibleRegion (NSView view, long /*int*/ visibleRgn, boolean clipC
}
@Override
-void cancelOperation(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void cancelOperation(long id, long sel, long sender) {
// Cmd-. and escape arrive here. Forward the current event as a key event.
if (hasKeyboardFocus(id)) {
NSEvent nsEvent = NSApplication.sharedApplication().currentEvent();
@@ -981,7 +973,7 @@ NSView contentView () {
return view;
}
-NSAttributedString createString (String string, Font font, double /*float*/ [] foreground, int alignment, boolean wrap, boolean enabled, boolean mnemonics) {
+NSAttributedString createString (String string, Font font, double [] foreground, int alignment, boolean wrap, boolean enabled, boolean mnemonics) {
NSMutableDictionary dict = ((NSMutableDictionary)new NSMutableDictionary().alloc()).initWithCapacity(5);
if (font == null) font = this.font != null ? this.font : defaultFont();
dict.setObject (font.handle, OS.NSFontAttributeName);
@@ -1070,7 +1062,7 @@ void destroyWidget () {
}
@Override
-void doCommandBySelector (long /*int*/ id, long /*int*/ sel, long /*int*/ selector) {
+void doCommandBySelector (long id, long sel, long selector) {
if (hasKeyboardFocus(id)) {
if (imeInComposition ()) return;
Shell s = this.getShell();
@@ -1084,7 +1076,7 @@ void doCommandBySelector (long /*int*/ id, long /*int*/ sel, long /*int*/ select
* during this keystroke. This rule does not apply if the command key
* is down, because we likely triggered the current key sequence via flagsChanged.
*/
- long /*int*/ modifiers = nsEvent.modifierFlags();
+ long modifiers = nsEvent.modifierFlags();
if (s.keyInputHappened == false || (modifiers & OS.NSCommandKeyMask) != 0) {
s.keyInputHappened = true;
boolean [] consume = new boolean [1];
@@ -1198,9 +1190,9 @@ boolean dragDetect (int x, int y, boolean filter, boolean [] consume) {
*/
NSApplication application = NSApplication.sharedApplication();
boolean dragging = false;
- long /*int*/ eventType = OS.NSLeftMouseDown;
- double /*float*/ dragX = x;
- double /*float*/ dragY = y;
+ long eventType = OS.NSLeftMouseDown;
+ double dragX = x;
+ double dragY = y;
/**
* To check for an actual drag we need to pull off mouse moved and mouse up events
@@ -1257,11 +1249,11 @@ boolean drawGripper (GC gc, int x, int y, int width, int height, boolean vertica
}
boolean drawsBackground() {
- return true;
+ return true;
}
@Override
-void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long id, NSGraphicsContext context, NSRect rect) {
if (id != paintView().id) return;
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return;
@@ -1287,7 +1279,7 @@ void enableWidget (boolean enabled) {
updateCursorRects (isEnabled ());
}
-boolean equals(double /*float*/ [] color1, double /*float*/ [] color2) {
+boolean equals(double [] color1, double [] color2) {
if (color1 == color2) return true;
if (color1 == null) return color2 == null;
if (color2 == null) return color1 == null;
@@ -1339,8 +1331,8 @@ void fillBackground (NSView view, NSGraphicsContext context, NSRect rect, int im
return;
}
- double /*float*/ [] background = control.background;
- double /*float*/ alpha;
+ double [] background = control.background;
+ double alpha;
if (background == null) {
if (isTransparent()) return;
background = control.defaultBackground ().handle;
@@ -1387,20 +1379,20 @@ void fixFocus (Control focusControl) {
shell.setSavedFocus (focusControl);
NSWindow window = view.window();
if (!window.makeFirstResponder(null)) {
- // Force first responder to resign.
- window.endEditingFor(null);
+ // Force first responder to resign.
+ window.endEditingFor(null);
}
}
@Override
-void flagsChanged (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void flagsChanged (long id, long sel, long theEvent) {
if (hasKeyboardFocus(id)) {
if ((state & WEBKIT_EVENTS_FIX) == 0) {
Shell s = this.getShell();
s.keyInputHappened = false;
int mask = 0;
NSEvent nsEvent = new NSEvent (theEvent);
- long /*int*/ modifiers = nsEvent.modifierFlags ();
+ long modifiers = nsEvent.modifierFlags ();
int keyCode = Display.translateKey (nsEvent.keyCode ());
switch (keyCode) {
case SWT.ALT: mask = OS.NSAlternateKeyMask; break;
@@ -1480,7 +1472,7 @@ boolean forceFocus (NSView focusView) {
return window.makeFirstResponder (focusView);
}
-boolean gestureEvent(long /*int*/ id, long /*int*/ eventPtr, int detail) {
+boolean gestureEvent(long id, long eventPtr, int detail) {
if (!display.sendEvent) return true;
display.sendEvent = false;
// For cross-platform compatibility, touch events and gestures are mutually exclusive.
@@ -1500,15 +1492,18 @@ boolean gestureEvent(long /*int*/ id, long /*int*/ eventPtr, int detail) {
event.x = (int) point.x;
event.y = (int) point.y;
setInputState (event, nsEvent, SWT.Gesture);
- event.detail = detail;
- if (detail == SWT.GESTURE_BEGIN) {
+ long phase = nsEvent.phase();
+ if (phase == OS.NSEventPhaseBegan) {
+ detail = SWT.GESTURE_BEGIN;
display.rotation = 0.0;
display.magnification = 1.0;
display.gestureActive = true;
- } else if (detail == SWT.GESTURE_END) {
+ } else if (phase == OS.NSEventPhaseCancelled || phase == OS.NSEventPhaseEnded) {
+ detail = SWT.GESTURE_END;
display.gestureActive = false;
}
+ event.detail = detail;
switch (detail) {
case SWT.GESTURE_SWIPE:
@@ -1530,8 +1525,8 @@ boolean gestureEvent(long /*int*/ id, long /*int*/ eventPtr, int detail) {
if (display.gestureActive) {
event.xDirection = (int) nsEvent.deltaX();
event.yDirection = (int) nsEvent.deltaY();
- if (event.xDirection == 0 && event.yDirection == 0) return true;
}
+ if (event.xDirection == 0 && event.yDirection == 0) return true;
break;
}
@@ -1627,7 +1622,7 @@ public Image getBackgroundImage () {
*/
public int getBorderWidth () {
checkWidget();
- return 0;
+ return 0;
}
/**
@@ -1906,9 +1901,8 @@ NSBezierPath getPath(Region region) {
return getPath(region.handle);
}
-NSBezierPath getPath(long /*int*/ region) {
+NSBezierPath getPath(long region) {
Callback callback = new Callback(this, "regionToRects", 4);
- if (callback.getAddress() == 0) error(SWT.ERROR_NO_MORE_CALLBACKS);
NSBezierPath path = NSBezierPath.bezierPath();
path.retain();
OS.QDRegionToRects(region, OS.kQDParseRegionFromTopLeft, callback.getAddress(), path.id);
@@ -2060,12 +2054,12 @@ public boolean getVisible () {
return (state & HIDDEN) == 0;
}
-long /*int*/ getVisibleRegion () {
+long getVisibleRegion () {
if (visibleRgn == 0) {
visibleRgn = OS.NewRgn ();
calculateVisibleRegion (view, visibleRgn, true);
}
- long /*int*/ result = OS.NewRgn ();
+ long result = OS.NewRgn ();
OS.CopyRgn (visibleRgn, result);
return result;
}
@@ -2083,7 +2077,7 @@ boolean hasRegion () {
}
@Override
-long /*int*/ hitTest (long /*int*/ id, long /*int*/ sel, NSPoint point) {
+long hitTest (long id, long sel, NSPoint point) {
if ((state & DISABLED) != 0) return 0;
if (!isActive ()) return 0;
if (regionPath != null) {
@@ -2100,7 +2094,7 @@ boolean imeInComposition () {
}
@Override
-boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
+boolean insertText (long id, long sel, long string) {
// sendKeyEvent may do something to run the event loop. That would cause
// 'string' to be released before any superclass could use it, so save it
// until this method finishes.
@@ -2111,13 +2105,13 @@ boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
Shell s = this.getShell();
NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
if (nsEvent != null) {
- long /*int*/ type = nsEvent.type ();
+ long type = nsEvent.type ();
if (type == OS.NSKeyDown || type == OS.NSKeyUp || type == OS.NSSystemDefined) {
NSString str = new NSString (string);
if (str.isKindOfClass (OS.class_NSAttributedString)) {
str = new NSAttributedString (string).string ();
}
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
char[] buffer = new char [length];
str.getCharacters(buffer);
for (int i = 0; i < buffer.length; i++) {
@@ -2154,7 +2148,7 @@ boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC (GCData data) {
+public long internal_new_GC (GCData data) {
checkWidget();
NSView view = paintView();
NSGraphicsContext graphicsContext = null;
@@ -2169,13 +2163,25 @@ public long /*int*/ internal_new_GC (GCData data) {
* to create a GC on a deferred NSWindow.
*/
if (window.windowNumber() <= 0) {
- double /*float*/ alpha = window.alphaValue();
+ double alpha = window.alphaValue();
window.setAlphaValue(0);
window.orderBack(null);
window.orderOut(null);
window.setAlphaValue(alpha);
}
graphicsContext = NSGraphicsContext.graphicsContextWithWindow (window);
+ if (graphicsContext == null) {
+ // create a bitmap based context, which will still work e.g. for text size computations
+ // it is unclear if the bitmap needs to be larger than the text to be measured.
+ // the following values should be big enough in any case.
+ int width = 1920;
+ int height = 256;
+ NSBitmapImageRep rep = (NSBitmapImageRep) new NSBitmapImageRep().alloc();
+ rep = rep.initWithBitmapDataPlanes(0, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace,
+ OS.NSAlphaFirstBitmapFormat, width * 4, 32);
+ graphicsContext = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
+ rep.release();
+ }
NSGraphicsContext flippedContext = NSGraphicsContext.graphicsContextWithGraphicsPort(graphicsContext.graphicsPort(), true);
graphicsContext = flippedContext;
if (data != null) {
@@ -2223,9 +2229,9 @@ public long /*int*/ internal_new_GC (GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
+public void internal_dispose_GC (long hDC, GCData data) {
checkWidget ();
- long /*int*/ context = hDC;
+ long context = hDC;
NSGraphicsContext graphicsContext = new NSGraphicsContext (context);
display.removeContext (data);
if (data != null) {
@@ -2332,7 +2338,7 @@ public boolean isFocusControl () {
}
boolean isObscured () {
- long /*int*/ visibleRgn = getVisibleRegion(), boundsRgn = OS.NewRgn();
+ long visibleRgn = getVisibleRegion(), boundsRgn = OS.NewRgn();
short[] rect = new short[4];
NSRect bounds = view.visibleRect();
OS.SetRect(rect, (short)bounds.x, (short)bounds.y, (short)(bounds.x + bounds.width), (short)(bounds.y + bounds.height));
@@ -2433,7 +2439,7 @@ public boolean isVisible () {
}
@Override
-void keyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyDown (long id, long sel, long theEvent) {
if (hasKeyboardFocus(id)) {
Shell s = this.getShell();
s.keyInputHappened = false;
@@ -2467,12 +2473,12 @@ void keyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
super.keyDown (id, sel, theEvent);
}
-boolean hasKeyboardFocus(long /*int*/ inId) {
+boolean hasKeyboardFocus(long inId) {
return view.window().firstResponder().id == inId;
}
@Override
-void keyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyUp (long id, long sel, long theEvent) {
if (hasKeyboardFocus(id)) {
NSEvent nsEvent = new NSEvent (theEvent);
if (!sendKeyEvent (nsEvent, SWT.KeyUp)) return;
@@ -2481,7 +2487,7 @@ void keyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void magnifyWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void magnifyWithEvent(long id, long sel, long event) {
if (!gestureEvent(id, event, SWT.GESTURE_MAGNIFY)) return;
super.magnifyWithEvent(id, sel, event);
}
@@ -2491,7 +2497,7 @@ void markLayout (boolean changed, boolean all) {
}
@Override
-long /*int*/ menuForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+long menuForEvent (long id, long sel, long theEvent) {
if (display.lastHandledMenuForEventId == theEvent) return 0;
display.lastHandledMenuForEventId = theEvent;
if (!isEnabled ()) return 0;
@@ -2525,15 +2531,13 @@ Decorations menuShell () {
}
@Override
-void scrollWheel (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void scrollWheel (long id, long sel, long theEvent) {
boolean handled = false;
if (id == view.id) {
NSEvent nsEvent = new NSEvent(theEvent);
if ((hooks(SWT.Gesture) || filters(SWT.Gesture))) {
- if (nsEvent.deltaY() != 0 || nsEvent.deltaX() != 0) {
- if (!gestureEvent(id, theEvent, SWT.GESTURE_PAN)) {
- handled = true;
- }
+ if (!gestureEvent(id, theEvent, SWT.GESTURE_PAN)) {
+ handled = true;
}
}
if (!handled) {
@@ -2556,18 +2560,18 @@ void scrollWheel (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (!handled) super.scrollWheel(id, sel, theEvent);
}
-boolean isEventView (long /*int*/ id) {
+boolean isEventView (long id) {
return true;
}
-boolean mouseEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent, int type) {
+boolean mouseEvent (long id, long sel, long theEvent, int type) {
if (!display.sendEvent) return true;
display.sendEvent = false;
if (!isEventView (id)) return true;
boolean dragging = false;
boolean[] consume = null;
NSEvent nsEvent = new NSEvent(theEvent);
- int nsType = (int)/*64*/nsEvent.type();
+ int nsType = (int)nsEvent.type();
NSInputManager manager = NSInputManager.currentInputManager ();
if (manager != null && manager.wantsToHandleMouseEvents ()) {
if (manager.handleMouseEvent (nsEvent)) {
@@ -2613,7 +2617,7 @@ boolean mouseEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent, in
}
@Override
-void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseDown)) return;
boolean tracking = isEventView (id);
Display display = this.display;
@@ -2623,49 +2627,49 @@ void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseUp(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseUp)) return;
super.mouseUp(id, sel, theEvent);
}
@Override
-void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDragged(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseMove)) return;
super.mouseDragged(id, sel, theEvent);
}
@Override
-void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDown(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseDown)) return;
super.rightMouseDown(id, sel, theEvent);
}
@Override
-void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseUp(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseUp)) return;
super.rightMouseUp(id, sel, theEvent);
}
@Override
-void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDragged(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseMove)) return;
super.rightMouseDragged(id, sel, theEvent);
}
@Override
-void otherMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseDown(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseDown)) return;
super.otherMouseDown(id, sel, theEvent);
}
@Override
-void otherMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseUp(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseUp)) return;
super.otherMouseUp(id, sel, theEvent);
}
@Override
-void otherMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseDragged(long id, long sel, long theEvent) {
if (!mouseEvent(id, sel, theEvent, SWT.MouseMove)) return;
super.otherMouseDragged(id, sel, theEvent);
}
@@ -2805,14 +2809,18 @@ public boolean print (GC gc) {
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- NSGraphicsContext.static_saveGraphicsState();
- NSGraphicsContext.setCurrentContext(gc.handle);
- NSAffineTransform transform = NSAffineTransform.transform ();
- transform.translateXBy (0, view.bounds().height);
- transform.scaleXBy (1, -1);
- transform.concat ();
- view.displayRectIgnoringOpacity(view.bounds(), gc.handle);
- NSGraphicsContext.static_restoreGraphicsState();
+ if (OS.VERSION < OS.VERSION(10, 13, 0)) {
+ NSGraphicsContext.static_saveGraphicsState();
+ NSGraphicsContext.setCurrentContext(gc.handle);
+ NSAffineTransform transform = NSAffineTransform.transform ();
+ transform.translateXBy (0, view.bounds().height);
+ transform.scaleXBy (1, -1);
+ transform.concat ();
+ view.displayRectIgnoringOpacity(view.bounds(), gc.handle);
+ NSGraphicsContext.static_restoreGraphicsState();
+ } else {
+ view.displayRectIgnoringOpacity (view.bounds (), gc.handle);
+ }
return true;
}
@@ -2918,7 +2926,7 @@ public void redraw (int x, int y, int width, int height, boolean all) {
view.setNeedsDisplayInRect(rect);
}
-long /*int*/ regionToRects(long /*int*/ message, long /*int*/ rgn, long /*int*/ r, long /*int*/ path) {
+long regionToRects(long message, long rgn, long r, long path) {
NSPoint pt = new NSPoint();
short[] rect = new short[4];
if (message == OS.kQDRegionToRectsMsgParse) {
@@ -3381,7 +3389,7 @@ void resetVisibleRegion () {
}
GCData[] gcs = display.contexts;
if (gcs != null) {
- long /*int*/ visibleRgn = 0;
+ long visibleRgn = 0;
for (int i=0; i<gcs.length; i++) {
GCData data = gcs [i];
if (data != null) {
@@ -3401,7 +3409,7 @@ void resized () {
}
@Override
-void rotateWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void rotateWithEvent(long id, long sel, long event) {
if (!gestureEvent(id, event, SWT.GESTURE_ROTATE)) return;
super.rotateWithEvent(id, sel, event);
}
@@ -3457,7 +3465,7 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
case SWT.MouseUp:
case SWT.MouseDoubleClick:
case SWT.DragDetect:
- int button = (int)/*64*/nsEvent.buttonNumber();
+ int button = (int)nsEvent.buttonNumber();
switch (button) {
case 0: event.button = 1; break;
case 1: event.button = 3; break;
@@ -3468,12 +3476,12 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
break;
case SWT.MouseWheel: {
event.detail = SWT.SCROLL_LINE;
- double /*float*/ delta = nsEvent.deltaY();
+ double delta = nsEvent.deltaY();
event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta);
break;
}
case SWT.MouseHorizontalWheel: {
- double /*float*/ delta = nsEvent.deltaX();
+ double delta = nsEvent.deltaX();
event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta);
break;
}
@@ -3506,7 +3514,7 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
Touch touchStateFromNSTouch(NSTouch touch) {
TouchSource source = display.findTouchSource(touch);
- long /*int*/ osPhase = touch.phase();
+ long osPhase = touch.phase();
long identity = OS.objc_msgSend(touch.id, OS.sel_identity);
int state = 0;
@@ -3526,10 +3534,10 @@ Touch touchStateFromNSTouch(NSTouch touch) {
display.touchCounter++;
boolean primary = false;
NSPoint normalizedPos = touch.normalizedPosition();
- double normalizedX = normalizedPos.x;
- double normalizedY = 1 - normalizedPos.y;
- if (display.currentTouches().count() == 1) display.primaryIdentifier = identity;
- if (display.primaryIdentifier == identity) primary = true;
+ double normalizedX = normalizedPos.x;
+ double normalizedY = 1 - normalizedPos.y;
+ if (display.currentTouches().count() == 1) display.primaryIdentifier = identity;
+ if (display.primaryIdentifier == identity) primary = true;
NSSize deviceSize = touch.deviceSize();
int deviceX = (int) (normalizedX * deviceSize.width);
int deviceY = (int) (normalizedY * deviceSize.height);
@@ -3538,8 +3546,8 @@ Touch touchStateFromNSTouch(NSTouch touch) {
}
NSTouch findTouchWithId(NSArray touches, NSObject identity) {
- long /*int*/ count = touches.count();
- for (long /*int*/ i = 0; i < count; i++) {
+ long count = touches.count();
+ for (long i = 0; i < count; i++) {
NSTouch aTouch = new NSTouch(touches.objectAtIndex(i).id);
NSObject currIdentity = new NSObject(OS.objc_msgSend(aTouch.id, OS.sel_identity));
if (currIdentity.isEqual(identity)) return aTouch;
@@ -3554,7 +3562,7 @@ void setBackground () {
if (control.backgroundImage != null) {
setBackgroundImage (control.backgroundImage.handle);
} else {
- double /*float*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
+ double [] color = control.background != null ? control.background : control.defaultBackground().handle;
NSColor nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]);
setBackgroundColor (nsColor);
}
@@ -3589,7 +3597,7 @@ private void _setBackground (Color color) {
if (color != null) {
if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] background = color != null ? color.handle : null;
+ double [] background = color != null ? color.handle : null;
int alpha = color != null ? color.getAlpha() : 255;
if (equals (background, this.background) && alpha == this.backgroundAlpha) return;
this.background = background;
@@ -3924,18 +3932,18 @@ public void setForeground (Color color) {
if (color != null) {
if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] foreground = color != null ? color.handle : null;
+ double [] foreground = color != null ? color.handle : null;
if (equals (foreground, this.foreground)) return;
this.foreground = foreground;
setForeground (foreground);
redrawWidget (view, false);
}
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
}
@Override
-void setFrameOrigin (long /*int*/ id, long /*int*/ sel, NSPoint point) {
+void setFrameOrigin (long id, long sel, NSPoint point) {
NSView topView = topView ();
if (topView.id != id) {
super.setFrameOrigin(id, sel, point);
@@ -3950,7 +3958,7 @@ void setFrameOrigin (long /*int*/ id, long /*int*/ sel, NSPoint point) {
}
@Override
-void setFrameSize (long /*int*/ id, long /*int*/ sel, NSSize size) {
+void setFrameSize (long id, long sel, NSSize size) {
NSView topView = topView ();
if (topView.id != id) {
super.setFrameSize(id, sel, size);
@@ -4162,7 +4170,9 @@ public void setRedraw (boolean redraw) {
if (redraw) {
if (--drawCount == 0) {
invalidateVisibleRegion ();
- redrawWidget(topView (), true);
+ NSView topView = topView ();
+ redrawWidget(topView, true);
+ if (view.id != topView.id) redrawWidget(view, true);
}
} else {
if (drawCount == 0) {
@@ -4344,8 +4354,10 @@ public void setTextDirection(int textDirection) {
*/
public void setToolTipText (String string) {
checkWidget();
- toolTipText = string;
- checkToolTip (null);
+ if (!Objects.equals(string, toolTipText)) {
+ toolTipText = string;
+ checkToolTip (null);
+ }
}
/**
@@ -4443,7 +4455,7 @@ void setZOrder () {
}
@Override
-boolean shouldDelayWindowOrderingForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+boolean shouldDelayWindowOrderingForEvent (long id, long sel, long theEvent) {
Shell shell = getShell ();
if ((shell.style & SWT.ON_TOP) != 0) return false;
return super.shouldDelayWindowOrderingForEvent (id, sel, theEvent);
@@ -4526,18 +4538,18 @@ void sort (int [] items) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (items [j] <= items [j + gap]) {
+ if (items [j] <= items [j + gap]) {
int swap = items [j];
items [j] = items [j + gap];
items [j + gap] = swap;
- }
- }
- }
+ }
+ }
+ }
}
}
@Override
-void swipeWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void swipeWithEvent(long id, long sel, long event) {
if (!gestureEvent(id, event, SWT.GESTURE_SWIPE)) return;
super.swipeWithEvent(id, sel, event);
}
@@ -4576,7 +4588,7 @@ String tooltipText () {
*/
public Point toControl (int x, int y) {
checkWidget();
- return display.map (null, this, x, y);
+ return display.map (null, this, x, y);
}
/**
@@ -4602,7 +4614,7 @@ public Point toControl (int x, int y) {
public Point toControl (Point point) {
checkWidget();
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
- return toControl (point.x, point.y);
+ return toControl (point.x, point.y);
}
/**
@@ -4660,7 +4672,7 @@ NSView topView () {
return view;
}
-boolean touchEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ eventPtr) {
+boolean touchEvent(long id, long sel, long eventPtr) {
if (!display.sendEvent) return true;
display.sendEvent = false;
if (!(hooks(SWT.Touch) || filters(SWT.Touch))) return true;
@@ -4677,8 +4689,8 @@ boolean touchEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ eventPtr) {
event.y = (int) location.y;
setInputState (event, nsEvent, SWT.Touch);
NSSet allTouchesSet = nsEvent.touchesMatchingPhase(OS.NSTouchPhaseAny, null);
- long /*int*/ touchCount = allTouchesSet.count();
- Touch touches[] = new Touch[(int)/*64*/touchCount];
+ long touchCount = allTouchesSet.count();
+ Touch touches[] = new Touch[(int)touchCount];
int currTouchIndex = 0;
// Process removed/cancelled touches first.
@@ -4711,7 +4723,7 @@ boolean touchEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ eventPtr) {
* if a 4-finger gesture occurs and the application switcher appears. Workaround is to generate a TOUCHSTATE_UP for the
* orphaned touch.
*/
- for (long /*int*/ j = currentTouches.count() - 1; j >= 0 ; j--) {
+ for (long j = currentTouches.count() - 1; j >= 0 ; j--) {
NSTouch touch = new NSTouch(currentTouches.objectAtIndex(j).id);
NSObject identity = new NSObject(OS.objc_msgSend(touch.id, OS.sel_identity));
NSTouch activeTouch = findTouchWithId(activeTouches, identity);
@@ -4737,25 +4749,25 @@ boolean touchEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ eventPtr) {
}
@Override
-void touchesBeganWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesBeganWithEvent (long id, long sel, long event) {
if (!touchEvent(id, sel, event)) return;
super.touchesBeganWithEvent(id, sel, event);
}
@Override
-void touchesCancelledWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesCancelledWithEvent (long id, long sel, long event) {
if (!touchEvent(id, sel, event)) return;
super.touchesCancelledWithEvent(id, sel, event);
}
@Override
-void touchesEndedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesEndedWithEvent (long id, long sel, long event) {
if (!touchEvent(id, sel, event)) return;
super.touchesEndedWithEvent(id, sel, event);
}
@Override
-void touchesMovedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesMovedWithEvent (long id, long sel, long event) {
if (!touchEvent(id, sel, event)) return;
super.touchesMovedWithEvent(id, sel, event);
}
@@ -4777,7 +4789,7 @@ boolean translateTraversal (int key, NSEvent theEvent, boolean [] consume) {
break;
}
case 48: /* Tab */ {
- long /*int*/ modifiers = theEvent.modifierFlags ();
+ long modifiers = theEvent.modifierFlags ();
boolean next = (modifiers & OS.NSShiftKeyMask) == 0;
detail = next ? SWT.TRAVERSE_TAB_NEXT : SWT.TRAVERSE_TAB_PREVIOUS;
break;
@@ -4793,7 +4805,7 @@ boolean translateTraversal (int key, NSEvent theEvent, boolean [] consume) {
case 116: /* Page up */
case 121: /* Page down */ {
all = true;
- long /*int*/ modifiers = theEvent.modifierFlags ();
+ long modifiers = theEvent.modifierFlags ();
if ((modifiers & OS.NSControlKeyMask) == 0) return false;
detail = key == 121 /* Page down */ ? SWT.TRAVERSE_PAGE_NEXT : SWT.TRAVERSE_PAGE_PREVIOUS;
break;
@@ -5116,9 +5128,12 @@ boolean traverseMnemonic (Event event) {
* to be processed before this method returns. If there
* are no outstanding paint request, this method does
* nothing.
- * <p>
- * Note: This method does not cause a redraw.
- * </p>
+ * <p>Note:</p>
+ * <ul>
+ * <li>This method does not cause a redraw.</li>
+ * <li>Some OS versions forcefully perform automatic deferred painting.
+ * This method does nothing in that case.</li>
+ * </ul>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -5135,15 +5150,43 @@ public void update () {
update (false);
}
-void update (boolean all) {
+boolean update (boolean all) {
+ if (!FORCE_RUN_UPDATE) {
+ /*
+ * Bigsur seems to force the use of the Automatic Deferred Painting mechanism.
+ * This behavior was applicable only for applications linked with 10.14, but
+ * with BigSur it seems this is forced on all applications. So, we don't do
+ * anything here on BigSur. Since MAC Launcher is now rebuilt using 10.14 SDK,
+ * we don't do anything for any of the MAC versions(See Bug 574351 for details)
+ */
+ return true;
+ }
+ if (NSGraphicsContext.currentContext() == null) {
+ if (!view.lockFocusIfCanDraw()) {
+ return false;
+ }
+ boolean contextAvailableAfterLockFocus = NSGraphicsContext.currentContext() != null;
+ view.unlockFocus();
+ if (!contextAvailableAfterLockFocus) {
+ /*
+ * If linked against macOS 10.14 SDK, or when native dark mode support is
+ * enabled via Info.plist, views are displayed using Core Animation and drawing
+ * is only possible, when cocoa invokes drawRect of a dirty view (which it does
+ * by a run loop observer invoked during calls of
+ * NSApplication#nextEventMatchingMask, only after more than approx. 10ms have
+ * passed since the last redraw).
+ */
+ return false;
+ }
+ }
// checkWidget();
NSArray isPainting = display.isPainting;
- if (isPainting.containsObject(view)) return;
- for (int i = 0, length = (int)/*64*/isPainting.count(); i < length; i++) {
+ if (isPainting.containsObject(view)) return false;
+ for (int i = 0, length = (int)isPainting.count(); i < length; i++) {
NSView view = new NSView(isPainting.objectAtIndex(i));
- if (view.isDescendantOf(this.view)) return;
+ if (view.isDescendantOf(this.view)) return false;
}
- if (isResizing()) return;
+ if (isResizing()) return false;
Shell shell = getShell();
NSWindow window = shell.deferFlushing && shell.scrolling ? view.window() : null;
try {
@@ -5159,12 +5202,13 @@ void update (boolean all) {
window.release();
}
}
+ return true;
}
void updateBackgroundColor () {
Control control = findBackgroundControl ();
if (control == null) control = this;
- double /*float*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
+ double [] color = control.background != null ? control.background : control.defaultBackground().handle;
NSColor nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]);
setBackgroundColor (nsColor);
}
@@ -5184,12 +5228,12 @@ void updateBackgroundMode () {
}
@Override
-void resetCursorRects (long /*int*/ id, long /*int*/ sel) {
+void resetCursorRects (long id, long sel) {
if (isEnabled ()) callSuper (id, sel);
}
@Override
-void updateTrackingAreas (long /*int*/ id, long /*int*/ sel) {
+void updateTrackingAreas (long id, long sel) {
if (isEnabled ()) callSuper (id, sel);
}
@@ -5214,7 +5258,7 @@ void updateLayout (boolean all) {
/* Do nothing */
}
-static double /*float*/ calcDiff (double /*float*/ component, double /*float*/ factor, boolean wantDarker) {
+static double calcDiff (double component, double factor, boolean wantDarker) {
if (wantDarker) {
return component * -1 * factor;
} else {
@@ -5222,14 +5266,14 @@ static double /*float*/ calcDiff (double /*float*/ component, double /*float*/ f
}
}
-static double /*float*/ [] getLighterOrDarkerColor (double /*float*/ [] pixel, double /*float*/ factor, boolean wantDarker) {
- double /*float*/ red = pixel[0];
- double /*float*/ green = pixel[1];
- double /*float*/ blue = pixel[2];
+static double [] getLighterOrDarkerColor (double [] pixel, double factor, boolean wantDarker) {
+ double red = pixel[0];
+ double green = pixel[1];
+ double blue = pixel[2];
red += calcDiff(red, factor, wantDarker);
green += calcDiff(green, factor, wantDarker);
blue += calcDiff(blue, factor, wantDarker);
- return new double /*float*/ [] { red, green, blue, pixel[3] };
+ return new double [] { red, green, blue, pixel[3] };
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java
index 54fdeaab02..5ab9e43cb4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java
@@ -282,7 +282,7 @@ void disposePopupShell() {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -359,7 +359,7 @@ public Control [] getChildren () {
*/
public int getDay () {
checkWidget ();
- return (int)/*64*/getCalendarDate().dayOfMonth();
+ return (int)getCalendarDate().dayOfMonth();
}
/**
@@ -377,7 +377,7 @@ public int getDay () {
*/
public int getHours () {
checkWidget ();
- return (int)/*64*/getCalendarDate().hourOfDay();
+ return (int)getCalendarDate().hourOfDay();
}
/**
@@ -395,7 +395,7 @@ public int getHours () {
*/
public int getMinutes () {
checkWidget ();
- return (int)/*64*/getCalendarDate().minuteOfHour();
+ return (int)getCalendarDate().minuteOfHour();
}
/**
@@ -413,7 +413,7 @@ public int getMinutes () {
*/
public int getMonth () {
checkWidget ();
- return (int)/*64*/getCalendarDate().monthOfYear() - 1;
+ return (int)getCalendarDate().monthOfYear() - 1;
}
@Override
@@ -437,7 +437,7 @@ String getNameText() {
*/
public int getSeconds () {
checkWidget ();
- return (int)/*64*/getCalendarDate().secondOfMinute();
+ return (int)getCalendarDate().secondOfMinute();
}
/**
@@ -455,7 +455,7 @@ public int getSeconds () {
*/
public int getYear () {
checkWidget ();
- return (int)/*64*/getCalendarDate().yearOfCommonEra();
+ return (int)getCalendarDate().yearOfCommonEra();
}
boolean isDropped () {
@@ -463,18 +463,18 @@ boolean isDropped () {
}
@Override
-boolean isEventView (long /*int*/ id) {
+boolean isEventView (long id) {
return true;
}
@Override
-boolean isFlipped (long /*int*/ id, long /*int*/ sel) {
+boolean isFlipped (long id, long sel) {
if ((style & SWT.CALENDAR) != 0) return super.isFlipped (id, sel);
return true;
}
@Override
-void keyDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyDown(long id, long sel, long theEvent) {
if ((style & SWT.DROP_DOWN) != 0) {
NSEvent nsEvent = new NSEvent (theEvent);
int keyCode = Display.translateKey (nsEvent.keyCode ());
@@ -676,7 +676,7 @@ public void setDay (int day) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
NSColor nsColor;
if (color == null) {
if ((style & SWT.CALENDAR) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
index d889e35811..c4631db92a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
@@ -403,6 +403,9 @@ void releaseChildren (boolean destroy) {
menuBar = null;
}
Display display = this.display;
+ if (display == null || display.isDisposed()) {
+ return;
+ }
super.releaseChildren (destroy);
Menu [] menus = display.getMenus (this);
if (menus != null) {
@@ -634,7 +637,7 @@ public void setMenuBar (Menu menu) {
* always. This should be avoided if possible.
* </p>
*
- * @param minimized the new maximized state
+ * @param minimized the new minimized state
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -688,16 +691,16 @@ void sort (Image [] images) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (compare (datas [j], datas [j + gap]) >= 0) {
+ if (compare (datas [j], datas [j + gap]) >= 0) {
Image swap = images [j];
images [j] = images [j + gap];
images [j + gap] = swap;
ImageData swapData = datas [j];
datas [j] = datas [j + gap];
datas [j + gap] = swapData;
- }
- }
- }
+ }
+ }
+ }
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
index 0c8b748b5f..5098bf8969 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -38,10 +38,13 @@ import org.eclipse.swt.internal.cocoa.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class DirectoryDialog extends Dialog {
+ Callback callback_performKeyEquivalent;
Callback completion_handler_callback;
NSOpenPanel panel;
String directoryPath;
String message = "", filterPath = "";
+ long method_performKeyEquivalent = 0;
+ long methodImpl_performKeyEquivalent = 0;
/**
* Constructs a new instance of this class given only its parent.
@@ -97,6 +100,16 @@ long _completionHandler (long result) {
return result;
}
+long _performKeyEquivalent (long id, long sel, long event) {
+ boolean result = false;
+ NSEvent nsEvent = new NSEvent(event);
+ NSWindow window = nsEvent.window ();
+ if (window != null) {
+ result = parent.display.performKeyEquivalent(window, nsEvent);
+ }
+ return result ? 1 : 0;
+}
+
/**
* Returns the path which the dialog will use to filter
* the directories it shows.
@@ -148,6 +161,16 @@ void handleResponse (long response) {
public String open () {
directoryPath = null;
panel = NSOpenPanel.openPanel();
+ if (panel == null) {
+ return null;
+ }
+
+ callback_performKeyEquivalent = new Callback(this, "_performKeyEquivalent", 3);
+ long proc = callback_performKeyEquivalent.getAddress();
+ method_performKeyEquivalent = OS.class_getInstanceMethod(OS.class_NSSavePanel, OS.sel_performKeyEquivalent_);
+ if (method_performKeyEquivalent != 0) {
+ methodImpl_performKeyEquivalent = OS.method_setImplementation(method_performKeyEquivalent, proc);
+ }
/*
* This line is intentionally commented. Don't show hidden files forcefully,
@@ -171,7 +194,6 @@ public String open () {
if (parent != null && (style & SWT.SHEET) != 0) {
completion_handler_callback = new Callback(this, "_completionHandler", 1);
long handler = completion_handler_callback.getAddress();
- if (handler == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.beginSheetModalForWindow(panel, parent.view.window(), handler);
NSApplication.sharedApplication().runModalForWindow(parent.view.window());
} else {
@@ -184,6 +206,12 @@ public String open () {
}
void releaseHandles () {
+ if (method_performKeyEquivalent != 0) {
+ OS.method_setImplementation(method_performKeyEquivalent, methodImpl_performKeyEquivalent);
+ }
+ if (callback_performKeyEquivalent != null) callback_performKeyEquivalent.dispose();
+ callback_performKeyEquivalent = null;
+
if (completion_handler_callback != null) {
completion_handler_callback.dispose();
completion_handler_callback = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index 84c4a40b40..d2ef22338b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.swt.widgets;
+import java.lang.Runtime.*;
import java.util.*;
import java.util.function.*;
@@ -110,7 +111,9 @@ public class Display extends Device {
enum APPEARANCE {
Dark, Light,
}
- APPEARANCE appAppearance = null;
+ APPEARANCE appAppearance;
+ /* System property to be set for SWT application to use the system's theme */
+ static final String USE_SYSTEM_THEME = "org.eclipse.swt.display.useSystemTheme";
/* Windows and Events */
Event [] eventQueue;
@@ -173,7 +176,7 @@ public class Display extends Device {
boolean escAsAcceleratorPresent = false;
NSApplication application;
- long /*int*/ applicationClass;
+ long applicationClass;
NSImage dockImage;
boolean isEmbedded;
static boolean launched = false;
@@ -191,17 +194,15 @@ public class Display extends Device {
int[] screenID = new int[32];
NSPoint[] screenCascade = new NSPoint[32];
- long /*int*/ runLoopObserver;
+ long runLoopObserver;
Callback observerCallback;
boolean lockCursor = true;
static final String LOCK_CURSOR = "org.eclipse.swt.internal.lockCursor"; //$NON-NLS-1$
- long /*int*/ oldCursorSetProc;
+ long oldCursorSetProc;
Callback cursorSetCallback;
Combo currentCombo;
- boolean mozillaRunning;
- static final String MOZILLA_RUNNING = "org.eclipse.swt.internal.mozillaRunning"; //$NON-NLS-1$
// the following Callbacks are never freed
static Callback windowCallback2, windowCallback3, windowCallback4, windowCallback5, windowCallback6;
@@ -231,9 +232,9 @@ public class Display extends Device {
Cursor [] cursors = new Cursor [SWT.CURSOR_HAND + 1];
/* System Colors */
- double /*float*/ [][] colors;
- double /*float*/ [] alternateSelectedControlTextColor, selectedControlTextColor;
- double /*float*/ [] alternateSelectedControlColor, secondarySelectedControlColor;
+ double [][] colors;
+ double [] alternateSelectedControlTextColor, selectedControlTextColor;
+ private double [] alternateSelectedControlColor, secondarySelectedControlColor;
/* Key Mappings. */
static int [] [] KeyTable = {
@@ -376,6 +377,10 @@ public class Display extends Device {
};
}
+ static {
+ configureSystemOptions ();
+ }
+
/*
* TEMPORARY CODE.
*/
@@ -559,7 +564,7 @@ void addPopup (Menu menu) {
void addSkinnableWidget (Widget widget) {
if (skinCount >= skinList.length) {
- Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+ Widget[] newSkinWidgets = new Widget [(skinList.length + 1) * 3 / 2];
System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
skinList = newSkinWidgets;
}
@@ -568,7 +573,7 @@ void addSkinnableWidget (Widget widget) {
void addWidget (NSObject view, Widget widget) {
if (view == null) return;
- long /*int*/ ivar = OS.object_setInstanceVariable (view.id, SWT_OBJECT, widget.jniRef);
+ long ivar = OS.object_setInstanceVariable (view.id, SWT_OBJECT, widget.jniRef);
if (ivar == 0) {
if (dynamicObjectMap == null) {
@@ -624,18 +629,32 @@ public void beep () {
void cascadeWindow (NSWindow window, NSScreen screen) {
NSDictionary dictionary = screen.deviceDescription();
- int screenNumber = new NSNumber(dictionary.objectForKey(NSString.stringWith("NSScreenNumber")).id).intValue();
- int index = 0;
- while (screenID[index] != 0 && screenID[index] != screenNumber) index++;
- screenID[index] = screenNumber;
- NSPoint cascade = screenCascade[index];
- if (cascade == null) {
- NSRect frame = screen.frame();
- cascade = new NSPoint();
- cascade.x = frame.x;
- cascade.y = frame.y + frame.height;
+ if (dictionary != null) {
+ id screenNumberObject = dictionary.objectForKey(NSString.stringWith("NSScreenNumber"));
+ if (screenNumberObject != null) {
+ int screenNumber = new NSNumber(screenNumberObject.id).intValue();
+ int index = 0;
+ while (screenID[index] != 0 && screenID[index] != screenNumber) index++;
+ screenID[index] = screenNumber;
+ NSPoint cascade = screenCascade[index];
+ if (cascade == null) {
+ NSRect frame = screen.frame();
+ cascade = new NSPoint();
+ cascade.x = frame.x;
+ cascade.y = frame.y + frame.height;
+ }
+ screenCascade[index] = window.cascadeTopLeftFromPoint(cascade);
+ return;
+ }
}
- screenCascade[index] = window.cascadeTopLeftFromPoint(cascade);
+ /*
+ * Handle any unexpected cases when dictionary or screenNumberObject may be null.
+ */
+ NSRect frame = screen.frame();
+ NSPoint cascade = new NSPoint();
+ cascade.x = frame.x;
+ cascade.y = frame.y + frame.height;
+ window.cascadeTopLeftFromPoint(cascade);
}
@Override
@@ -761,7 +780,7 @@ static String convertToLf(String text) {
/* The string is formatted with CR/LF.
* Create a new string with the LF line delimiter. */
i = 0;
- StringBuffer result = new StringBuffer ();
+ StringBuilder result = new StringBuilder ();
while (i < length) {
int j = text.indexOf (Cr, i);
if (j == -1) j = length;
@@ -816,6 +835,78 @@ public void close () {
if (event.doit) dispose ();
}
+static private void configureSystemOption (String option, boolean value) {
+ NSDictionary dictionary = NSDictionary.dictionaryWithObject (NSNumber.numberWithBool (value), NSString.stringWith (option));
+ NSUserDefaults.standardUserDefaults ().registerDefaults (dictionary);
+}
+
+static private void configureSystemOptions () {
+ /*
+ * Most native applications are layer backed. This means that everything
+ * painted by the application is cached for performance reasons, such as
+ * not having to repaint everything when scrolling.
+ *
+ * The condition for default layer backing is being compatible with
+ * responsive scrolling, and SWT is not compatible because it handles
+ * 'scrollWheel:' and 'drawRect:' in 'NSScrollView'. Making SWT compatible
+ * is not trivial.
+ *
+ * Requesting layer directly is possible, but I decided that it's better to
+ * just enable system option for older macOS, because it's what happens when
+ * using newer Java anyway.
+ *
+ * The workaround is to enable root layer backing. macOS 10.14 and 10.15
+ * already enable this option if app was linked with sdk 10.14+ and
+ * macOS 11 always enables it regardless of sdk. The option is force
+ * enabled here in case SWT runs with java/launcher linked with older sdk.
+ */
+ if (!OS.isBigSurOrLater ()) {
+ configureSystemOption ("NSViewAllowsRootLayerBacking", true);
+ }
+
+ /*
+ * Starting with macOS 11, layer backing is always enabled. That's fine.
+ * What is not fine however is that macOS uses "automatic" image format for
+ * it. This means that instead of actual rendering, macOS's GC only remembers
+ * the operations performed. This causes macOS to ignore clip rect and paint
+ * entire visible rect whenever something changes, and that's a lot of
+ * painting. Example: Table will now repaint all visible items when a single
+ * item is selected/deselected. In case of owner drawn Table, this makes
+ * things a lot slower. The workaround is to disable the "automatic" image
+ * format.
+ */
+ if (OS.isBigSurOrLater ()) {
+ configureSystemOption ("NSViewUsesAutomaticLayerBackingStores", false);
+ }
+
+ /*
+ * Bug 578171: There is new code in macOS 12 that remembers which
+ * Shell was active before menu popup was shown and tries to
+ * re-activate after menu popup is closed. Unfortunately there is a
+ * bug in this code: if window list changes, it activates a wrong
+ * Shell.
+ *
+ * This is a bug on its own, but worse yet, this causes a JVM crash
+ * because activating a new Shell causes menu bar to reset its
+ * internal data, which is unexpected to the macOS's menu tracking
+ * loop.
+ *
+ * Both bugs are bugs of macOS itself. The workaround is to disable
+ * the new macOS 12 behavior.
+ *
+ * The condition should be for (macOS >= 12), but it's not possible
+ * to reliably distinguish 11 from 12, see comment for OS.VERSION.
+ * That's fine: older macOS don't know this setting and will not
+ * check for it anyway.
+ */
+ if (OS.isBigSurOrLater ()) {
+ // The name of the option is misleading. What it really means
+ // is whether '-[NSMenuWindowManagerWindow _setVisible:]' shall
+ // save/restore current key window or not.
+ configureSystemOption ("NSMenuWindowManagerWindowShouldSetVisible", true);
+ }
+}
+
/**
* Creates the device in the operating system. If the device
* does not have a handle, this method may do nothing depending
@@ -839,9 +930,8 @@ protected void create (DeviceData data) {
}
void createDisplay (DeviceData data) {
- if (OS.VERSION < 0x1050) {
- System.out.println ("***WARNING: SWT requires MacOS X version " + 10 + "." + 5 + " or greater"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- System.out.println ("***WARNING: Detected: " + Integer.toHexString((OS.VERSION & 0xFF00) >> 8) + "." + Integer.toHexString((OS.VERSION & 0xF0) >> 4) + "." + Integer.toHexString(OS.VERSION & 0xF)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (OS.VERSION < OS.VERSION (10, 10, 0)) {
+ System.out.println ("***WARNING: SWT requires MacOS X version 10.10 or greater"); //$NON-NLS-1$
error(SWT.ERROR_NOT_IMPLEMENTED);
}
@@ -876,14 +966,8 @@ void createDisplay (DeviceData data) {
int [] psn = new int [2];
if (OS.GetCurrentProcess (psn) == OS.noErr) {
int pid = OS.getpid ();
- long /*int*/ ptr = getApplicationName().UTF8String();
+ long ptr = getApplicationName().UTF8String();
if (ptr != 0) OS.CPSSetProcessName (psn, ptr);
- if (!isBundled ()) {
- if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 9, 0)) {
- application.setActivationPolicy (OS.NSApplicationActivationPolicyRegular);
- NSRunningApplication.currentApplication().activateWithOptions (OS.NSApplicationActivateIgnoringOtherApps);
- }
- }
ptr = C.getenv (ascii ("APP_ICON_" + pid));
if (ptr != 0) {
NSString path = NSString.stringWithUTF8String (ptr);
@@ -895,21 +979,16 @@ void createDisplay (DeviceData data) {
}
String className = "SWTApplication";
- long /*int*/ cls;
+ long cls;
if ((cls = OS.objc_lookUpClass (className)) == 0) {
Class clazz = getClass();
applicationCallback2 = new Callback(clazz, "applicationProc", 2);
- long /*int*/ proc2 = applicationCallback2.getAddress();
- if (proc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc2 = applicationCallback2.getAddress();
applicationCallback3 = new Callback(clazz, "applicationProc", 3);
- long /*int*/ proc3 = applicationCallback3.getAddress();
- if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc3 = applicationCallback3.getAddress();
applicationCallback4 = new Callback(clazz, "applicationProc", 4);
- long /*int*/ proc4 = applicationCallback4.getAddress();
- if (proc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
applicationCallback6 = new Callback(clazz, "applicationProc", 6);
- long /*int*/ proc6 = applicationCallback6.getAddress();
- if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc6 = applicationCallback6.getAddress();
long superClassID = OS.object_getClass(application.id);
if (new NSObject(superClassID).className().getString().equals("NSKVONotifying_NSApplication")) {
/*
@@ -935,10 +1014,8 @@ void createDisplay (DeviceData data) {
className = "SWTApplicationDelegate";
if (OS.objc_lookUpClass (className) == 0) {
- long /*int*/ appProc3 = applicationCallback3.getAddress();
- if (appProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- long /*int*/ appProc4 = applicationCallback4.getAddress();
- if (appProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long appProc3 = applicationCallback3.getAddress();
+ long appProc4 = applicationCallback4.getAddress();
cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
OS.class_addMethod(cls, OS.sel_applicationWillFinishLaunching_, appProc3, "@:@");
OS.class_addMethod(cls, OS.sel_terminate_, appProc3, "@:@");
@@ -947,6 +1024,7 @@ void createDisplay (DeviceData data) {
OS.class_addMethod(cls, OS.sel_hide_, appProc3, "@:@");
OS.class_addMethod(cls, OS.sel_unhideAllApplications_, appProc3, "@:@");
OS.class_addMethod(cls, OS.sel_applicationDidBecomeActive_, appProc3, "@:@");
+ OS.class_addMethod(cls, OS.sel_applicationDidFinishLaunching_, appProc3, "@:@");
OS.class_addMethod(cls, OS.sel_applicationDidResignActive_, appProc3, "@:@");
OS.class_addMethod(cls, OS.sel_applicationDockMenu_, appProc3, "@:@");
OS.class_addMethod(cls, OS.sel_application_openFile_, appProc4, "@:@@");
@@ -979,13 +1057,13 @@ void createMainMenu () {
appleMenu.initWithTitle(emptyStr);
OS.objc_msgSend(application.id, OS.sel_registerName("setAppleMenu:"), appleMenu.id);
- title = NSString.stringWith(SWT.getMessage("About") + " " + appName);
+ title = NSString.stringWith(SWT.getMessage("SWT_About") + " " + appName);
menuItem = appleMenu.addItemWithTitle(title, OS.sel_orderFrontStandardAboutPanel_, emptyStr);
menuItem.setTarget(applicationDelegate);
appleMenu.addItem(NSMenuItem.separatorItem());
- title = NSString.stringWith(SWT.getMessage("Preferences..."));
+ title = NSString.stringWith(SWT.getMessage("SWT_Preferences"));
menuItem = appleMenu.addItemWithTitle(title, 0, NSString.stringWith(","));
/*
@@ -996,7 +1074,7 @@ void createMainMenu () {
appleMenu.addItem(NSMenuItem.separatorItem());
- title = NSString.stringWith(SWT.getMessage("Services"));
+ title = NSString.stringWith(SWT.getMessage("SWT_Services"));
menuItem = appleMenu.addItemWithTitle(title, 0, emptyStr);
NSMenu servicesMenu = (NSMenu)new NSMenu().alloc();
servicesMenu.initWithTitle(emptyStr);
@@ -1006,22 +1084,22 @@ void createMainMenu () {
appleMenu.addItem(NSMenuItem.separatorItem());
- title = NSString.stringWith(SWT.getMessage("Hide") + " " + appName);
+ title = NSString.stringWith(SWT.getMessage("SWT_Hide") + " " + appName);
menuItem = appleMenu.addItemWithTitle(title, OS.sel_hide_, NSString.stringWith("h"));
menuItem.setTarget(applicationDelegate);
- title = NSString.stringWith(SWT.getMessage("Hide Others"));
+ title = NSString.stringWith(SWT.getMessage("SWT_HideOthers"));
menuItem = appleMenu.addItemWithTitle(title, OS.sel_hideOtherApplications_, NSString.stringWith("h"));
menuItem.setKeyEquivalentModifierMask(OS.NSCommandKeyMask | OS.NSAlternateKeyMask);
menuItem.setTarget(applicationDelegate);
- title = NSString.stringWith(SWT.getMessage("Show All"));
+ title = NSString.stringWith(SWT.getMessage("SWT_ShowAll"));
menuItem = appleMenu.addItemWithTitle(title, OS.sel_unhideAllApplications_, emptyStr);
menuItem.setTarget(applicationDelegate);
appleMenu.addItem(NSMenuItem.separatorItem());
- title = NSString.stringWith(SWT.getMessage("Quit") + " " + appName);
+ title = NSString.stringWith(SWT.getMessage("SWT_Quit") + " " + appName);
menuItem = appleMenu.addItemWithTitle(title, OS.sel_applicationShouldTerminate_, NSString.stringWith("q"));
menuItem.setTarget(applicationDelegate);
@@ -1041,7 +1119,7 @@ NSMutableArray currentTouches() {
return currentTouches;
}
-long /*int*/ cursorSetProc (long /*int*/ id, long /*int*/ sel) {
+long cursorSetProc (long id, long sel) {
if (lockCursor) {
if (currentControl != null) {
Cursor cursor = currentControl.findCursor ();
@@ -1151,7 +1229,7 @@ boolean filters (int eventType) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public Widget findWidget (long /*int*/ handle) {
+public Widget findWidget (long handle) {
checkDevice ();
return getWidget (handle);
}
@@ -1180,7 +1258,7 @@ public Widget findWidget (long /*int*/ handle) {
*
* @since 3.1
*/
-public Widget findWidget (long /*int*/ handle, long /*int*/ id) {
+public Widget findWidget (long handle, long id) {
checkDevice ();
return getWidget (handle);
}
@@ -1204,7 +1282,7 @@ public Widget findWidget (long /*int*/ handle, long /*int*/ id) {
*
* @since 3.3
*/
-public Widget findWidget (Widget widget, long /*int*/ id) {
+public Widget findWidget (Widget widget, long id) {
checkDevice ();
return null;
}
@@ -1320,14 +1398,14 @@ Rectangle getBounds (NSArray screens) {
NSScreen screen = new NSScreen(screens.objectAtIndex(0));
NSRect primaryFrame = screen.frame();
- double /*float*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
- double /*float*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
- long /*int*/ count = screens.count();
+ double minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
+ double minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
+ long count = screens.count();
for (int i = 0; i < count; i++) {
screen = new NSScreen(screens.objectAtIndex(i));
NSRect frame = screen.frame();
- double /*float*/ x1 = frame.x, x2 = frame.x + frame.width;
- double /*float*/ y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height);
+ double x1 = frame.x, x2 = frame.x + frame.width;
+ double y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height);
if (x1 < minX) minX = x1;
if (x2 < minX) minX = x2;
if (x1 > maxX) maxX = x1;
@@ -1379,7 +1457,7 @@ public Rectangle getClientArea () {
NSScreen screen = new NSScreen(screens.objectAtIndex(0));
NSRect frame = screen.frame();
NSRect visibleFrame = screen.visibleFrame();
- double /*float*/ y = frame.height - (visibleFrame.y + visibleFrame.height);
+ double y = frame.height - (visibleFrame.y + visibleFrame.height);
return new Rectangle((int)visibleFrame.x, (int)y, (int)visibleFrame.width, (int)visibleFrame.height);
}
@@ -1548,7 +1626,7 @@ public int getDismissalAlignment () {
*/
public int getDoubleClickTime () {
checkDevice ();
- return OS.GetDblTime () * 1000 / 60;
+ return (int)(NSEvent.doubleClickInterval() * 1000);
}
/**
@@ -1653,6 +1731,29 @@ public Point [] getIconSizes () {
new Point (64, 64), new Point (128, 128)};
}
+/**
+ * Returns <code>true</code> if the current OS theme has a dark appearance, else
+ * returns <code>false</code>.
+ * <p>
+ * Note: This operation is a hint and is not supported on platforms that do not
+ * have this concept.
+ * </p>
+ * <p>
+ * Note: Windows 10 onwards users can separately configure the theme for OS and
+ * Application level and this can be read from the Windows registry. Since the
+ * application needs to honor the application level theme, this API reads the
+ * Application level theme setting.
+ * </p>
+ *
+ * @return <code>true</code> if the current OS theme has a dark appearance, else
+ * returns <code>false</code>.
+ *
+ * @since 3.112
+ */
+public static boolean isSystemDarkTheme () {
+ return OS.isSystemDarkAppearance();
+}
+
int getLastEventTime () {
NSEvent event = application != null ? application.currentEvent() : null;
if (event == null) return 0;
@@ -1706,7 +1807,7 @@ public Monitor [] getMonitors () {
if (screens == null) return new Monitor[] {};
NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame();
- int count = (int)/*64*/screens.count();
+ int count = (int)screens.count();
Monitor [] monitors = new Monitor [count];
for (int i=0; i<count; i++) {
Monitor monitor = new Monitor ();
@@ -1777,7 +1878,7 @@ public Shell [] getShells () {
checkDevice ();
NSArray windows = application.windows();
int index = 0;
- Shell [] result = new Shell [(int)/*64*/windows.count()];
+ Shell [] result = new Shell [(int)windows.count()];
for (int i = 0; i < result.length; i++) {
NSWindow window = new NSWindow(windows.objectAtIndex(i));
Widget widget = getWidget(window.contentView());
@@ -1868,14 +1969,11 @@ Color getWidgetColor (int id) {
return null;
}
-double /*float*/ [] getWidgetColorRGB (int id) {
+double [] getWidgetColorRGB (int id) {
NSColor color = null;
switch (id) {
case SWT.COLOR_INFO_FOREGROUND: color = NSColor.blackColor (); break;
- case SWT.COLOR_INFO_BACKGROUND: return
- OS.VERSION_MMB >= OS.VERSION_MMB (10, 10, 0)
- ? new double /*float*/ [] {236/255f, 235/255f, 236/255f, 1}
- : new double /*float*/ [] {.984f, .988f, 0.773f, 1};
+ case SWT.COLOR_INFO_BACKGROUND: return new double [] {236/255f, 235/255f, 236/255f, 1};
case SWT.COLOR_TITLE_FOREGROUND: color = NSColor.windowFrameTextColor(); break;
case SWT.COLOR_TITLE_BACKGROUND: color = NSColor.alternateSelectedControlColor(); break;
case SWT.COLOR_TITLE_BACKGROUND_GRADIENT: color = NSColor.selectedControlColor(); break;
@@ -1884,26 +1982,29 @@ double /*float*/ [] getWidgetColorRGB (int id) {
case SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT: color = NSColor.secondarySelectedControlColor(); break;
case SWT.COLOR_WIDGET_DARK_SHADOW: color = NSColor.controlDarkShadowColor(); break;
case SWT.COLOR_WIDGET_NORMAL_SHADOW:
- if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 14, 0)) {
- return new double /*float*/ [] {159/255f, 159/255f, 159/255f, 1};
+ if (OS.VERSION >= OS.VERSION (10, 14, 0)) {
+ return new double [] {159/255f, 159/255f, 159/255f, 1};
}
color = NSColor.controlShadowColor();
break;
case SWT.COLOR_WIDGET_LIGHT_SHADOW:
- if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 14, 0)) {
- return new double /*float*/ [] {232/255f, 232/255f, 232/255f, 1};
+ if (OS.VERSION >= OS.VERSION (10, 14, 0)) {
+ return new double [] {232/255f, 232/255f, 232/255f, 1};
}
color = NSColor.controlHighlightColor();
break;
case SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW: color = NSColor.controlLightHighlightColor(); break;
case SWT.COLOR_WIDGET_BACKGROUND:
- color = OS.VERSION_MMB >= OS.VERSION_MMB (10, 14, 0) ? NSColor.windowBackgroundColor()
+ color = OS.VERSION >= OS.VERSION (10, 14, 0) ? NSColor.windowBackgroundColor()
: NSColor.controlHighlightColor();
break;
case SWT.COLOR_WIDGET_FOREGROUND: color = NSColor.controlTextColor(); break;
case SWT.COLOR_WIDGET_BORDER: color = NSColor.blackColor (); break;
case SWT.COLOR_LIST_FOREGROUND: color = NSColor.textColor(); break;
+
+ case SWT.COLOR_TEXT_DISABLED_BACKGROUND:
case SWT.COLOR_LIST_BACKGROUND: color = NSColor.textBackgroundColor(); break;
+
case SWT.COLOR_LIST_SELECTION_TEXT: color = NSColor.selectedTextColor(); break;
case SWT.COLOR_LIST_SELECTION: color = NSColor.selectedTextBackgroundColor(); break;
case SWT.COLOR_LINK_FOREGROUND:
@@ -1913,21 +2014,27 @@ double /*float*/ [] getWidgetColorRGB (int id) {
color = new NSColor(dict.valueForKey(OS.NSForegroundColorAttributeName));
textView.release ();
break;
-
+ case SWT.COLOR_WIDGET_DISABLED_FOREGROUND:
+ if (OS.VERSION >= OS.VERSION (10, 14, 0)) {
+ color = NSColor.secondarySelectedControlColor();
+ } else {
+ color = NSColor.disabledControlTextColor();
+ }
+ break;
}
return getNSColorRGB (color);
}
-double /*float*/ [] getNSColorRGB (NSColor color) {
+double [] getNSColorRGB (NSColor color) {
if (color == null) return null;
NSColorSpace colorSpace = color.colorSpace();
if (colorSpace == null || colorSpace.colorSpaceModel() != OS.NSRGBColorSpaceModel) {
color = color.colorUsingColorSpaceName(OS.NSDeviceRGBColorSpace);
}
if (color == null) return null;
- double /*float*/[] components = new double /*float*/[(int)/*64*/color.numberOfComponents()];
+ double[] components = new double[(int)color.numberOfComponents()];
color.getComponents(components);
- return new double /*float*/ []{components[0], components[1], components[2], components[3]};
+ return new double []{components[0], components[1], components[2], components[3]};
}
/**
@@ -1981,8 +2088,14 @@ public Cursor getSystemCursor (int id) {
return cursors [id];
}
-NSImage getSystemImageForID(int osType) {
- long /*int*/ iconRef[] = new long /*int*/ [1];
+/**
+ * Gets the system icon using GetIconRefFromTypeInfo() which is deprecated in macOS 10.15.
+ * For BigSur and later, try to get the system image using NSImage.imageNamed().
+ *
+ * @return NSImage, the returned NSImage instance should be released (for example in Image.destroy()).
+ */
+static NSImage getSystemImageForID(int osType) {
+ long iconRef[] = new long [1];
OS.GetIconRefFromTypeInfo(OS.kSystemIconsCreator, osType, 0, 0, 0, iconRef);
NSImage nsImage = (NSImage)new NSImage().alloc();
nsImage = nsImage.initWithIconRef(iconRef[0]);
@@ -2035,12 +2148,32 @@ public Image getSystemImage (int id) {
case SWT.ICON_QUESTION:
case SWT.ICON_WORKING: {
if (infoImage != null) return infoImage;
- NSImage img = getSystemImageForID(OS.kAlertNoteIcon);
+ NSImage img;
+ if (OS.isBigSurOrLater()) {
+ img = NSImage.imageNamed(OS.NSImageNameInfo);
+ /*
+ * retain() is required here, as img is used below to create Image object.
+ * img will be released later in Image.destroy().
+ */
+ img.retain();
+ } else {
+ img = getSystemImageForID(OS.kAlertNoteIcon);
+ }
return infoImage = Image.cocoa_new (this, SWT.ICON, img);
}
case SWT.ICON_WARNING: {
if (warningImage != null) return warningImage;
- NSImage img = getSystemImageForID(OS.kAlertCautionIcon);
+ NSImage img;
+ if (OS.isBigSurOrLater()) {
+ img = NSImage.imageNamed(OS.NSImageNameCaution);
+ /*
+ * retain() is required here, as img is used below to create Image object.
+ * img will be released later in Image.destroy().
+ */
+ img.retain();
+ } else {
+ img = getSystemImageForID(OS.kAlertCautionIcon);
+ }
return warningImage = Image.cocoa_new (this, SWT.ICON, img);
}
}
@@ -2088,7 +2221,7 @@ public Menu getSystemMenu () {
appMenu = new Menu(this, nsAppMenu);
// Create menu items that correspond to the NSMenuItems.
- long /*int*/ nsCount = nsAppMenu.numberOfItems();
+ long nsCount = nsAppMenu.numberOfItems();
for (int j = 0; j < nsCount; j++) {
NSMenuItem currMenuItem = nsAppMenu.itemAtIndex(j);
new MenuItem(appMenu, currMenuItem);
@@ -2135,6 +2268,28 @@ public TaskBar getSystemTaskBar () {
}
/**
+ * Used for selection in Table and Tree when in focus.
+ * @return Returns the system color used for the face of a selected control in a Table or Tree when in focus
+ */
+double [] getAlternateSelectedControlColor() {
+ if (alternateSelectedControlColor == null) {
+ alternateSelectedControlColor = getNSColorRGB(NSColor.alternateSelectedControlColor());
+ }
+ return alternateSelectedControlColor;
+}
+
+/**
+ * Used for selection in Table and Tree when not in focus.
+ * @return Returns the system color used for selected controls in non-key views.
+ */
+double [] getSecondarySelectedControlColor() {
+ if (secondarySelectedControlColor == null) {
+ secondarySelectedControlColor = getNSColorRGB(NSColor.secondarySelectedControlColor());
+ }
+ return secondarySelectedControlColor;
+}
+
+/**
* Returns the user-interface thread for the receiver.
*
* @return the receiver's user-interface thread
@@ -2165,8 +2320,7 @@ public Thread getThread () {
*/
public boolean getTouchEnabled() {
checkDevice();
- // Gestures are available on OS X 10.5.3 and later. Touch events are only available on 10.6 and later.
- return (OS.VERSION > 0x1053);
+ return true;
}
int getToolTipTime () {
@@ -2175,14 +2329,14 @@ int getToolTipTime () {
return 560;
}
-Widget getWidget (long /*int*/ id) {
+Widget getWidget (long id) {
return GetWidget (id);
}
-static Widget GetWidget (long /*int*/ id) {
+static Widget GetWidget (long id) {
if (id == 0) return null;
- long /*int*/ [] jniRef = new long /*int*/ [1];
- long /*int*/ iVar = OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
+ long [] jniRef = new long [1];
+ long iVar = OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (iVar == 0) {
if (dynamicObjectMap != null) {
NSObject key = new NSObject(id);
@@ -2202,7 +2356,7 @@ Widget getWidget (NSView view) {
boolean hasDefaultButton () {
NSArray windows = application.windows();
- long /*int*/ count = windows.count();
+ long count = windows.count();
for (int i = 0; i < count; i++) {
NSWindow window = new NSWindow(windows.objectAtIndex(i));
if (window.defaultButtonCell() != null) {
@@ -2224,6 +2378,13 @@ boolean hasDefaultButton () {
@Override
protected void init () {
super.init ();
+
+ if ("true".equalsIgnoreCase(System.getProperty(USE_SYSTEM_THEME))) {
+ if (OS.isSystemDarkAppearance()) {
+ setAppAppearance(APPEARANCE.Dark);
+ }
+ }
+
initClasses ();
initColors ();
initFonts ();
@@ -2238,7 +2399,7 @@ protected void init () {
if (currAppDelegate == null) {
if (OS.class_JRSAppKitAWT != 0) {
- long /*int*/ currDelegatePtr = OS.objc_msgSend(OS.class_JRSAppKitAWT, OS.sel_awtAppDelegate);
+ long currDelegatePtr = OS.objc_msgSend(OS.class_JRSAppKitAWT, OS.sel_awtAppDelegate);
if (currDelegatePtr != 0) {
currAppDelegate = new NSObject(currDelegatePtr);
currAppDelegate.retain();
@@ -2283,26 +2444,21 @@ protected void init () {
if (prefsItem != null) prefsItem.setTag(SWT.ID_PREFERENCES);
observerCallback = new Callback (this, "observerProc", 3); //$NON-NLS-1$
- long /*int*/ observerProc = observerCallback.getAddress ();
- if (observerProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long observerProc = observerCallback.getAddress ();
int activities = OS.kCFRunLoopBeforeWaiting;
runLoopObserver = OS.CFRunLoopObserverCreate (0, activities, true, 0, observerProc, 0);
if (runLoopObserver == 0) error (SWT.ERROR_NO_HANDLES);
OS.CFRunLoopAddObserver (OS.CFRunLoopGetCurrent (), runLoopObserver, OS.kCFRunLoopCommonModes ());
// Add AWT Runloop mode for SWT/AWT.
- long /*int*/ cls = OS.objc_lookUpClass("JNFRunLoop"); //$NON-NLS-1$
- if (cls != 0) {
- long /*int*/ mode = OS.objc_msgSend(cls, OS.sel_javaRunLoopMode);
- if (mode != 0) {
- OS.CFRunLoopAddObserver (OS.CFRunLoopGetCurrent (), runLoopObserver, mode);
- }
+ NSString javaRunLoopMode = getAwtRunLoopMode();
+ if (javaRunLoopMode != null) {
+ OS.CFRunLoopAddObserver (OS.CFRunLoopGetCurrent (), runLoopObserver, javaRunLoopMode.id);
}
cursorSetCallback = new Callback(this, "cursorSetProc", 2);
- long /*int*/ cursorSetProc = cursorSetCallback.getAddress();
- if (cursorSetProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- long /*int*/ method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
+ long cursorSetProc = cursorSetCallback.getAddress();
+ long method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
if (method != 0) oldCursorSetProc = OS.method_setImplementation(method, cursorSetProc);
timerDelegate = (SWTWindowDelegate)new SWTWindowDelegate().alloc().init();
@@ -2319,7 +2475,7 @@ protected void init () {
textView.release ();
NSUserDefaults defaults = NSUserDefaults.standardUserDefaults();
- defaults.setInteger(0, NSString.stringWith(OS.VERSION >= 0x1080 ? "NSScrollAnimationEnabled" : "AppleScrollAnimationEnabled"));
+ defaults.setInteger(0, NSString.stringWith("NSScrollAnimationEnabled"));
id blink = defaults.objectForKey(NSString.stringWith("NSTextInsertionPointBlinkPeriod"));
if (blink != null) blinkTime = (int)new NSNumber(blink).integerValue();
if (blinkTime == 0) blinkTime = 560;
@@ -2332,7 +2488,53 @@ protected void init () {
isPainting = isPainting.initWithCapacity(12);
}
-void addEventMethods (long /*int*/ cls, long /*int*/ proc2, long /*int*/ proc3, long /*int*/ drawRectProc, long /*int*/ hitTestProc, long /*int*/ needsDisplayInRectProc) {
+private static NSString getAwtRunLoopMode() {
+ // Special run loop mode mode used by AWT enters when it only wants related messages processed.
+ // The name of this mode is a defacto contract established by the JavaNativeFoundation (JNF) libary.
+ // It could be accessed via OS.objc_lookUpClass("JNFRunLoop").
+ //
+ // However, in JDK 11.0.12 / 13.0.8 / 15.0.4 / 17 this broke:
+ // 1) JNF was dropped from JDK:
+ // https://bugs.openjdk.java.net/browse/JDK-8260616
+ // https://bugs.openjdk.java.net/browse/JDK-8261693
+ // 2) The contract was broken, since the name was changed from "AWTRunLoopMode" to "jnfRunLoopMode":
+ // https://www.mail-archive.com/awt-dev@openjdk.java.net/msg17946.html
+ //
+ // JNF is also not available in arm64.
+ //
+ // In JDK 11.0.14 / 13.0.9 / 15.0.5 / 17.0.0.1 the name was changed back to "AWTRunLoopMode":
+ // https://bugs.openjdk.java.net/browse/JDK-8270216
+ // There is no concept yet to update this:
+ // https://bugs.openjdk.java.net/browse/JDK-8270211
+ //
+ // Therefore, for now, we follow this approach:
+
+ // 1) If JNFRunLoop is available, we keep using it
+ long cls = OS.objc_lookUpClass("JNFRunLoop");
+ if (cls != 0) {
+ long mode = OS.objc_msgSend(cls, OS.sel_javaRunLoopMode);
+ if (mode != 0) {
+ return new NSString(mode);
+ }
+ }
+
+ // 2) If the version is new enough to contain the fix https://bugs.openjdk.java.net/browse/JDK-8270216
+ // we are optimistic
+ Version version = Runtime.version();
+ if (version.feature() > 17 //
+ || version.feature() == 17 && Version.parse("17.0.1").compareToIgnoreOptional(version) <= 0 //
+ || version.feature() == 11 && Version.parse("11.0.14").compareToIgnoreOptional(version) <= 0 //
+ || version.feature() == 15 && Version.parse("15.0.5").compareToIgnoreOptional(version) <= 0 //
+ || version.feature() == 13 && Version.parse("13.0.9").compareToIgnoreOptional(version) <= 0) {
+ return NSString.stringWith("AWTRunLoopMode");
+ }
+
+ // 3) Otherwise, for the few broken Java versions inbetween, we are pessimistic to avoid any immediate
+ // deadlocks in calling code (although deadlocks will probably still occurr later down the road).
+ return null;
+}
+
+void addEventMethods (long cls, long proc2, long proc3, long drawRectProc, long hitTestProc, long needsDisplayInRectProc) {
if (proc3 != 0) {
OS.class_addMethod(cls, OS.sel_mouseDown_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_mouseUp_, proc3, "@:@");
@@ -2361,8 +2563,6 @@ void addEventMethods (long /*int*/ cls, long /*int*/ proc2, long /*int*/ proc3,
OS.class_addMethod(cls, OS.sel_touchesMovedWithEvent_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_touchesEndedWithEvent_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_touchesCancelledWithEvent_, proc3, "@:@");
- OS.class_addMethod(cls, OS.sel_beginGestureWithEvent_, proc3, "@:@");
- OS.class_addMethod(cls, OS.sel_endGestureWithEvent_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_swipeWithEvent_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_rotateWithEvent_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_magnifyWithEvent_, proc3, "@:@");
@@ -2387,12 +2587,12 @@ void addEventMethods (long /*int*/ cls, long /*int*/ proc2, long /*int*/ proc3,
}
}
-void addFrameMethods(long /*int*/ cls, long /*int*/ setFrameOriginProc, long /*int*/ setFrameSizeProc) {
+void addFrameMethods(long cls, long setFrameOriginProc, long setFrameSizeProc) {
OS.class_addMethod(cls, OS.sel_setFrameOrigin_, setFrameOriginProc, "@:{NSPoint}");
OS.class_addMethod(cls, OS.sel_setFrameSize_, setFrameSizeProc, "@:{NSSize}");
}
-void addAccessibilityMethods(long /*int*/ cls, long /*int*/ proc2, long /*int*/ proc3, long /*int*/ proc4, long /*int*/ accessibilityHitTestProc) {
+void addAccessibilityMethods(long cls, long proc2, long proc3, long proc4, long accessibilityHitTestProc) {
OS.class_addMethod(cls, OS.sel_accessibilityActionNames, proc2, "@:");
OS.class_addMethod(cls, OS.sel_accessibilityAttributeNames, proc2, "@:");
OS.class_addMethod(cls, OS.sel_accessibilityParameterizedAttributeNames, proc2, "@:");
@@ -2408,24 +2608,24 @@ void addAccessibilityMethods(long /*int*/ cls, long /*int*/ proc2, long /*int*/
OS.class_addMethod(cls, OS.sel_accessibleHandle, proc2, "@:");
}
-long /*int*/ registerCellSubclass(long /*int*/ cellClass, int size, int align, byte[] types) {
+long registerCellSubclass(long cellClass, int size, int align, byte[] types) {
String cellClassName = OS.class_getName(cellClass);
- long /*int*/ cls = OS.objc_allocateClassPair(cellClass, "SWTAccessible" + cellClassName, 0);
+ long cls = OS.objc_allocateClassPair(cellClass, "SWTAccessible" + cellClassName, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.objc_registerClassPair(cls);
return cls;
}
-long /*int*/ createWindowSubclass(long /*int*/ baseClass, String newClass, boolean isDynamic) {
- long /*int*/ cls = OS.objc_lookUpClass(newClass);
+long createWindowSubclass(long baseClass, String newClass, boolean isDynamic) {
+ long cls = OS.objc_lookUpClass(newClass);
if (cls != 0) return cls;
cls = OS.objc_allocateClassPair(baseClass, newClass, 0);
- long /*int*/ proc3 = windowCallback3.getAddress();
- long /*int*/ proc2 = windowCallback2.getAddress();
- long /*int*/ proc4 = windowCallback4.getAddress();
- long /*int*/ proc6 = windowCallback6.getAddress();
- long /*int*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
- long /*int*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
+ long proc3 = windowCallback3.getAddress();
+ long proc2 = windowCallback2.getAddress();
+ long proc4 = windowCallback4.getAddress();
+ long proc6 = windowCallback6.getAddress();
+ long view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
+ long accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
if (!isDynamic) OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@");
@@ -2440,12 +2640,12 @@ long /*int*/ createWindowSubclass(long /*int*/ baseClass, String newClass, boole
return cls;
}
-long /*int*/ createMenuSubclass(long /*int*/ baseClass, String newClass, boolean isDynamic) {
- long /*int*/ cls = OS.objc_lookUpClass(newClass);
+long createMenuSubclass(long baseClass, String newClass, boolean isDynamic) {
+ long cls = OS.objc_lookUpClass(newClass);
if (cls != 0) return cls;
cls = OS.objc_allocateClassPair(baseClass, newClass, 0);
- long /*int*/ proc3 = windowCallback3.getAddress();
- long /*int*/ proc4 = windowCallback4.getAddress();
+ long proc3 = windowCallback3.getAddress();
+ long proc4 = windowCallback4.getAddress();
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addMethod(cls, OS.sel_menuWillOpen_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_menuDidClose_, proc3, "@:@");
@@ -2455,11 +2655,11 @@ long /*int*/ createMenuSubclass(long /*int*/ baseClass, String newClass, boolean
return cls;
}
-long /*int*/ createMenuItemSubclass(long /*int*/ baseClass, String newClass, boolean isDynamic) {
- long /*int*/ cls = OS.objc_lookUpClass(newClass);
+long createMenuItemSubclass(long baseClass, String newClass, boolean isDynamic) {
+ long cls = OS.objc_lookUpClass(newClass);
if (cls != 0) return cls;
cls = OS.objc_allocateClassPair(baseClass, newClass, 0);
- long /*int*/ proc2 = windowCallback2.getAddress();
+ long proc2 = windowCallback2.getAddress();
if (!isDynamic) OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
OS.objc_registerClassPair(cls);
@@ -2471,71 +2671,63 @@ void initClasses () {
Class clazz = getClass ();
dialogCallback3 = new Callback(clazz, "dialogProc", 3);
- long /*int*/ dialogProc3 = dialogCallback3.getAddress();
- if (dialogProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long dialogProc3 = dialogCallback3.getAddress();
dialogCallback4 = new Callback(clazz, "dialogProc", 4);
- long /*int*/ dialogProc4 = dialogCallback4.getAddress();
- if (dialogProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long dialogProc4 = dialogCallback4.getAddress();
dialogCallback5 = new Callback(clazz, "dialogProc", 5);
- long /*int*/ dialogProc5 = dialogCallback5.getAddress();
- if (dialogProc5 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long dialogProc5 = dialogCallback5.getAddress();
windowCallback3 = new Callback(clazz, "windowProc", 3);
- long /*int*/ proc3 = windowCallback3.getAddress();
- if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc3 = windowCallback3.getAddress();
windowCallback2 = new Callback(clazz, "windowProc", 2);
- long /*int*/ proc2 = windowCallback2.getAddress();
- if (proc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc2 = windowCallback2.getAddress();
windowCallback4 = new Callback(clazz, "windowProc", 4);
- long /*int*/ proc4 = windowCallback4.getAddress();
- if (proc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc4 = windowCallback4.getAddress();
windowCallback5 = new Callback(clazz, "windowProc", 5);
- long /*int*/ proc5 = windowCallback5.getAddress();
- if (proc5 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long proc5 = windowCallback5.getAddress();
windowCallback6 = new Callback(clazz, "windowProc", 6);
- long /*int*/ proc6 = windowCallback6.getAddress();
- if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- long /*int*/ isFlippedProc = OS.isFlipped_CALLBACK();
- long /*int*/ drawRectProc = OS.CALLBACK_drawRect_(proc3);
- long /*int*/ drawInteriorWithFrameInViewProc = OS.CALLBACK_drawInteriorWithFrame_inView_ (proc4);
- long /*int*/ drawBezelWithFrameInViewProc = OS.CALLBACK_drawBezelWithFrame_inView_ (proc4);
- long /*int*/ drawWithExpansionFrameProc = OS.CALLBACK_drawWithExpansionFrame_inView_ (proc4);
- long /*int*/ imageRectForBoundsProc = OS.CALLBACK_imageRectForBounds_ (proc3);
- long /*int*/ titleRectForBoundsProc = OS.CALLBACK_titleRectForBounds_ (proc3);
- long /*int*/ cellSizeForBoundsProc = OS.CALLBACK_cellSizeForBounds_ (proc3);
- long /*int*/ hitTestForEvent_inRect_ofViewProc = OS.CALLBACK_hitTestForEvent_inRect_ofView_ (proc5);
- long /*int*/ cellSizeProc = OS.CALLBACK_cellSize (proc2);
- long /*int*/ drawImageWithFrameInViewProc = OS.CALLBACK_drawImage_withFrame_inView_ (proc5);
- long /*int*/ drawTitleWithFrameInViewProc = OS.CALLBACK_drawTitle_withFrame_inView_ (proc5);
- long /*int*/ setFrameOriginProc = OS.CALLBACK_setFrameOrigin_(proc3);
- long /*int*/ setFrameSizeProc = OS.CALLBACK_setFrameSize_(proc3);
- long /*int*/ hitTestProc = OS.CALLBACK_hitTest_(proc3);
- long /*int*/ markedRangeProc = OS.CALLBACK_markedRange (proc2);
- long /*int*/ selectedRangeProc = OS.CALLBACK_selectedRange (proc2);
- long /*int*/ highlightSelectionInClipRectProc = OS.CALLBACK_highlightSelectionInClipRect_ (proc3);
- long /*int*/ setMarkedText_selectedRangeProc = OS.CALLBACK_setMarkedText_selectedRange_(proc4);
- long /*int*/ attributedSubstringFromRangeProc = OS.CALLBACK_attributedSubstringFromRange_(proc3);
- long /*int*/ characterIndexForPointProc = OS.CALLBACK_characterIndexForPoint_(proc3);
- long /*int*/ firstRectForCharacterRangeProc = OS.CALLBACK_firstRectForCharacterRange_(proc3);
- long /*int*/ textWillChangeSelectionProc = OS.CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(proc5);
- long /*int*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
- long /*int*/ shouldChangeTextInRange_replacementString_Proc = OS.CALLBACK_shouldChangeTextInRange_replacementString_(proc4);
- long /*int*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
- long /*int*/ canDragRowsWithIndexes_atPoint_Proc = OS.CALLBACK_canDragRowsWithIndexes_atPoint_(proc4);
- long /*int*/ setNeedsDisplayInRectProc = OS.CALLBACK_setNeedsDisplayInRect_(proc3);
- long /*int*/ expansionFrameWithFrameProc = OS.CALLBACK_expansionFrameWithFrame_inView_ (proc4);
- long /*int*/ focusRingMaskBoundsForFrameProc = OS.CALLBACK_focusRingMaskBoundsForFrame_inView_ (proc4);
- long /*int*/ cacheDisplayInRect_toBitmapImageRepProc = OS.CALLBACK_cacheDisplayInRect_toBitmapImageRep_ (proc4);
- long /*int*/ sizeOfLabelProc = OS.CALLBACK_sizeOfLabel_ (proc3);
- long /*int*/ drawLabelInRectProc = OS.CALLBACK_drawLabel_inRect_ (proc4);
- long /*int*/ drawViewBackgroundInRectProc = OS.CALLBACK_drawViewBackgroundInRect_(proc3);
- long /*int*/ drawBackgroundInClipRectProc = OS.CALLBACK_drawBackgroundInClipRect_(proc3);
- long /*int*/ scrollClipView_ToPointProc = OS.CALLBACK_scrollClipView_toPoint_(proc4);
- long /*int*/ headerRectOfColumnProc = OS.CALLBACK_headerRectOfColumn_(proc3);
- long /*int*/ columnAtPointProc = OS.CALLBACK_columnAtPoint_(proc3);
+ long proc6 = windowCallback6.getAddress();
+
+ long isFlippedProc = OS.isFlipped_CALLBACK();
+ long drawRectProc = OS.CALLBACK_drawRect_(proc3);
+ long drawInteriorWithFrameInViewProc = OS.CALLBACK_drawInteriorWithFrame_inView_ (proc4);
+ long drawBezelWithFrameInViewProc = OS.CALLBACK_drawBezelWithFrame_inView_ (proc4);
+ long drawWithExpansionFrameProc = OS.CALLBACK_drawWithExpansionFrame_inView_ (proc4);
+ long imageRectForBoundsProc = OS.CALLBACK_imageRectForBounds_ (proc3);
+ long titleRectForBoundsProc = OS.CALLBACK_titleRectForBounds_ (proc3);
+ long cellSizeForBoundsProc = OS.CALLBACK_cellSizeForBounds_ (proc3);
+ long hitTestForEvent_inRect_ofViewProc = OS.CALLBACK_hitTestForEvent_inRect_ofView_ (proc5);
+ long cellSizeProc = OS.CALLBACK_cellSize (proc2);
+ long drawImageWithFrameInViewProc = OS.CALLBACK_drawImage_withFrame_inView_ (proc5);
+ long drawTitleWithFrameInViewProc = OS.CALLBACK_drawTitle_withFrame_inView_ (proc5);
+ long setFrameOriginProc = OS.CALLBACK_setFrameOrigin_(proc3);
+ long setFrameSizeProc = OS.CALLBACK_setFrameSize_(proc3);
+ long hitTestProc = OS.CALLBACK_hitTest_(proc3);
+ long markedRangeProc = OS.CALLBACK_markedRange (proc2);
+ long selectedRangeProc = OS.CALLBACK_selectedRange (proc2);
+ long highlightSelectionInClipRectProc = OS.CALLBACK_highlightSelectionInClipRect_ (proc3);
+ long setMarkedText_selectedRangeProc = OS.CALLBACK_setMarkedText_selectedRange_(proc4);
+ long attributedSubstringFromRangeProc = OS.CALLBACK_attributedSubstringFromRange_(proc3);
+ long characterIndexForPointProc = OS.CALLBACK_characterIndexForPoint_(proc3);
+ long firstRectForCharacterRangeProc = OS.CALLBACK_firstRectForCharacterRange_(proc3);
+ long textWillChangeSelectionProc = OS.CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(proc5);
+ long accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
+ long shouldChangeTextInRange_replacementString_Proc = OS.CALLBACK_shouldChangeTextInRange_replacementString_(proc4);
+ long view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
+ long canDragRowsWithIndexes_atPoint_Proc = OS.CALLBACK_canDragRowsWithIndexes_atPoint_(proc4);
+ long setNeedsDisplayInRectProc = OS.CALLBACK_setNeedsDisplayInRect_(proc3);
+ long expansionFrameWithFrameProc = OS.CALLBACK_expansionFrameWithFrame_inView_ (proc4);
+ long focusRingMaskBoundsForFrameProc = OS.CALLBACK_focusRingMaskBoundsForFrame_inView_ (proc4);
+ long cacheDisplayInRect_toBitmapImageRepProc = OS.CALLBACK_cacheDisplayInRect_toBitmapImageRep_ (proc4);
+ long sizeOfLabelProc = OS.CALLBACK_sizeOfLabel_ (proc3);
+ long drawLabelInRectProc = OS.CALLBACK_drawLabel_inRect_ (proc4);
+ long drawViewBackgroundInRectProc = OS.CALLBACK_drawViewBackgroundInRect_(proc3);
+ long drawBackgroundInClipRectProc = OS.CALLBACK_drawBackgroundInClipRect_(proc3);
+ long scrollClipView_ToPointProc = OS.CALLBACK_scrollClipView_toPoint_(proc4);
+ long headerRectOfColumnProc = OS.CALLBACK_headerRectOfColumn_(proc3);
+ long columnAtPointProc = OS.CALLBACK_columnAtPoint_(proc3);
String className;
- long /*int*/ cls;
+ long cls;
className = "SWTBox";
cls = OS.objc_allocateClassPair(OS.class_NSBox, className, 0);
@@ -2569,9 +2761,7 @@ void initClasses () {
OS.class_addMethod(cls, OS.sel_drawBezelWithFrame_inView_, drawBezelWithFrameInViewProc, "@:{NSRect}@");
OS.class_addMethod(cls, OS.sel_titleRectForBounds_, titleRectForBoundsProc, "@:{NSRect}");
OS.class_addMethod(cls, OS.sel_cellSizeForBounds_, cellSizeForBoundsProc, "@:{NSRect}");
- if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 10, 0)) {
- OS.class_addMethod(cls, OS.sel_focusRingMaskBoundsForFrame_inView_, focusRingMaskBoundsForFrameProc, "@:{NSRect}@");
- }
+ OS.class_addMethod(cls, OS.sel_focusRingMaskBoundsForFrame_inView_, focusRingMaskBoundsForFrameProc, "@:{NSRect}@");
OS.objc_registerClassPair (cls);
className = "SWTCanvasView";
@@ -2680,6 +2870,15 @@ void initClasses () {
createMenuSubclass(OS.class_NSMenu, "SWTMenu", false);
createMenuItemSubclass(OS.class_NSMenuItem, "SWTMenuItem", false);
+ className = "SWTOpenSavePanelDelegate";
+ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+ OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
+ OS.class_addMethod(cls, OS.sel_sendSelection_, dialogProc3, "@:@");
+ OS.class_addMethod(cls, OS.sel_panel_shouldEnableURL_, dialogProc4, "@:@@");
+ OS.class_addMethod(cls, OS.sel_panel_userEnteredFilename_confirmed_, dialogProc5, "@:@@");
+
+ OS.objc_registerClassPair(cls);
+
className = "SWTOutlineView";
cls = OS.objc_allocateClassPair(OS.class_NSOutlineView, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -2726,7 +2925,6 @@ void initClasses () {
OS.class_addMethod(cls, OS.sel_changeFont_, dialogProc3, "@:@");
OS.class_addMethod(cls, OS.sel_validModesForFontPanel_, dialogProc3, "@:@");
OS.class_addMethod(cls, OS.sel_sendSelection_, dialogProc3, "@:@");
- OS.class_addMethod(cls, OS.sel_panel_shouldShowFilename_, dialogProc4, "@:@@");
OS.class_addMethod(cls, OS.sel_panelDidEnd_returnCode_contextInfo_, dialogProc5, "@:@i@");
OS.objc_registerClassPair(cls);
@@ -2745,9 +2943,7 @@ void initClasses () {
// NSPopUpButtonCell
cls = registerCellSubclass(NSPopUpButton.cellClass(), size, align, types);
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
- if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 10, 0)) {
- OS.class_addMethod(cls, OS.sel_focusRingMaskBoundsForFrame_inView_, focusRingMaskBoundsForFrameProc, "@:{NSRect}@");
- }
+ OS.class_addMethod(cls, OS.sel_focusRingMaskBoundsForFrame_inView_, focusRingMaskBoundsForFrameProc, "@:{NSRect}@");
className = "SWTProgressIndicator";
cls = OS.objc_allocateClassPair(OS.class_NSProgressIndicator, className, 0);
@@ -2767,11 +2963,9 @@ void initClasses () {
addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
- if (OS.VERSION >= 0x1070) {
- /* Note that isFlippedProc is used for performance and convenience */
- long /*int*/ metaClass = OS.objc_getMetaClass(className);
- OS.class_addMethod(metaClass, OS.sel_isCompatibleWithOverlayScrollers, isFlippedProc, "@:");
- }
+ /* Note that isFlippedProc is used for performance and convenience */
+ long metaClass = OS.objc_getMetaClass(className);
+ OS.class_addMethod(metaClass, OS.sel_isCompatibleWithOverlayScrollers, isFlippedProc, "@:");
className = "SWTScrollView";
cls = OS.objc_allocateClassPair(OS.class_NSScrollView, className, 0);
@@ -2827,7 +3021,7 @@ void initClasses () {
OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
OS.objc_registerClassPair(cls);
- long /*int*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
+ long nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
if (nsSecureTextViewClass != 0) {
className = "SWTSecureEditorView";
cls = OS.objc_allocateClassPair(nsSecureTextViewClass, className, 0);
@@ -3036,9 +3230,9 @@ void initClasses () {
OS.objc_registerClassPair(cls);
}
-NSFont getFont (long /*int*/ cls, long /*int*/ sel) {
- long /*int*/ widget = OS.objc_msgSend (OS.objc_msgSend (cls, OS.sel_alloc), OS.sel_initWithFrame_, new NSRect());
- long /*int*/ font = 0;
+NSFont getFont (long cls, long sel) {
+ long widget = OS.objc_msgSend (OS.objc_msgSend (cls, OS.sel_alloc), OS.sel_initWithFrame_, new NSRect());
+ long font = 0;
if (OS.objc_msgSend_bool (widget, OS.sel_respondsToSelector_, sel)) {
font = OS.objc_msgSend (widget, sel);
}
@@ -3058,9 +3252,9 @@ void initColors (boolean ignoreColorChange) {
/*
* Code to ignore changes to System textColor, textBackgroundColor and controlTextColor
*/
- double /*float*/ [] color_list_foreground = colors[SWT.COLOR_LIST_FOREGROUND];
- double /*float*/ [] color_list_background = colors[SWT.COLOR_LIST_BACKGROUND];
- double /*float*/ [] color_widget_foreground = colors[SWT.COLOR_WIDGET_FOREGROUND];
+ double [] color_list_foreground = colors[SWT.COLOR_LIST_FOREGROUND];
+ double [] color_list_background = colors[SWT.COLOR_LIST_BACKGROUND];
+ double [] color_widget_foreground = colors[SWT.COLOR_WIDGET_FOREGROUND];
initColors ();
colors[SWT.COLOR_LIST_FOREGROUND] = color_list_foreground;
colors[SWT.COLOR_LIST_BACKGROUND] = color_list_background;
@@ -3071,7 +3265,7 @@ void initColors (boolean ignoreColorChange) {
}
void initColors () {
- colors = new double /*float*/ [SWT.COLOR_LINK_FOREGROUND + 1][];
+ colors = new double [SWT.COLOR_WIDGET_DISABLED_FOREGROUND + 1][];
colors[SWT.COLOR_INFO_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_INFO_FOREGROUND);
colors[SWT.COLOR_INFO_BACKGROUND] = getWidgetColorRGB(SWT.COLOR_INFO_BACKGROUND);
colors[SWT.COLOR_TITLE_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_TITLE_FOREGROUND);
@@ -3092,11 +3286,15 @@ void initColors () {
colors[SWT.COLOR_LIST_SELECTION_TEXT] = getWidgetColorRGB(SWT.COLOR_LIST_SELECTION_TEXT);
colors[SWT.COLOR_LIST_SELECTION] = getWidgetColorRGB(SWT.COLOR_LIST_SELECTION);
colors[SWT.COLOR_LINK_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_LINK_FOREGROUND);
+ colors[SWT.COLOR_TEXT_DISABLED_BACKGROUND] = getWidgetColorRGB(SWT.COLOR_TEXT_DISABLED_BACKGROUND);
+ colors[SWT.COLOR_WIDGET_DISABLED_FOREGROUND] = getWidgetColorRGB(SWT.COLOR_WIDGET_DISABLED_FOREGROUND);
- alternateSelectedControlColor = getNSColorRGB(NSColor.alternateSelectedControlColor());
alternateSelectedControlTextColor = getNSColorRGB(NSColor.alternateSelectedControlTextColor());
- secondarySelectedControlColor = getNSColorRGB(NSColor.secondarySelectedControlColor());
selectedControlTextColor = getNSColorRGB(NSColor.selectedControlTextColor());
+
+ /* These are set in the getter */
+ alternateSelectedControlColor = null;
+ secondarySelectedControlColor = null;
}
void initFonts () {
@@ -3141,7 +3339,7 @@ void initFonts () {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC (GCData data) {
+public long internal_new_GC (GCData data) {
if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
if (screenWindow == null) {
NSWindow window = (NSWindow) new NSWindow ().alloc ();
@@ -3151,6 +3349,18 @@ public long /*int*/ internal_new_GC (GCData data) {
screenWindow = window;
}
NSGraphicsContext context = screenWindow.graphicsContext();
+ if (context == null) {
+ // create a bitmap based context, which will still work e.g. for text size computations
+ // it is unclear if the bitmap needs to be larger than the text to be measured.
+ // the following values should be big enough in any case.
+ int width = 1920;
+ int height = 256;
+ NSBitmapImageRep rep = (NSBitmapImageRep) new NSBitmapImageRep().alloc();
+ rep = rep.initWithBitmapDataPlanes(0, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace,
+ OS.NSAlphaFirstBitmapFormat, width * 4, 32);
+ context = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
+ rep.release();
+ }
// NSAffineTransform transform = NSAffineTransform.transform();
// NSSize size = handle.size();
// transform.translateXBy(0, size.height);
@@ -3185,7 +3395,7 @@ public long /*int*/ internal_new_GC (GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
+public void internal_dispose_GC (long hDC, GCData data) {
if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
}
@@ -3277,8 +3487,8 @@ public boolean post(Event event) {
synchronized (Device.class) {
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
- long /*int*/ eventRef = 0;
- long /*int*/ eventSource = OS.CGEventSourceCreate(OS.kCGEventSourceStateHIDSystemState);
+ long eventRef = 0;
+ long eventSource = OS.CGEventSourceCreate(OS.kCGEventSourceStateHIDSystemState);
if (eventSource == 0) return false;
boolean returnValue = false;
int deadKeyState[] = new int[1];
@@ -3288,9 +3498,9 @@ public boolean post(Event event) {
case SWT.KeyUp: {
short vKey = (short)Display.untranslateKey (event.keyCode);
if (vKey == 0) {
- long /*int*/ uchrPtr = 0;
- long /*int*/ currentKbd = OS.TISCopyCurrentKeyboardInputSource();
- long /*int*/ uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
+ long uchrPtr = 0;
+ long currentKbd = OS.TISCopyCurrentKeyboardInputSource();
+ long uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
if (uchrCFData == 0) return false;
uchrPtr = OS.CFDataGetBytePtr(uchrCFData);
@@ -3299,7 +3509,7 @@ public boolean post(Event event) {
int maxStringLength = 256;
vKey = -1;
char [] output = new char [maxStringLength];
- int [] actualStringLength = new int [1];
+ long [] actualStringLength = new long [1];
for (short i = 0 ; i <= 0x7F ; i++) {
deadKeyState[0] = 0;
OS.UCKeyTranslate (uchrPtr, i, (short)(type == SWT.KeyDown ? OS.kUCKeyActionDown : OS.kUCKeyActionUp), 0, OS.LMGetKbdType(), 0, deadKeyState, maxStringLength, actualStringLength, output);
@@ -3330,11 +3540,7 @@ public boolean post(Event event) {
}
if (vKey != -1) {
- if (OS.VERSION < 0x1060) {
- returnValue = OS.CGPostKeyboardEvent((short)0, vKey, type == SWT.KeyDown) == OS.noErr;
- } else {
- eventRef = OS.CGEventCreateKeyboardEvent(eventSource, vKey, type == SWT.KeyDown);
- }
+ eventRef = OS.CGEventCreateKeyboardEvent(eventSource, vKey, type == SWT.KeyDown);
}
break;
}
@@ -3348,35 +3554,35 @@ public boolean post(Event event) {
mouseCursorPosition.y = event.y;
eventRef = OS.CGEventCreateMouseEvent(eventSource, OS.kCGEventMouseMoved, mouseCursorPosition, 0);
} else {
- NSPoint nsCursorPosition = NSEvent.mouseLocation();
- NSRect primaryFrame = getPrimaryFrame();
- mouseCursorPosition.x = nsCursorPosition.x;
- mouseCursorPosition.y = (int) (primaryFrame.height - nsCursorPosition.y);
- int eventType = 0;
- // SWT buttons are 1-based: 1,2,3,4,5; CG buttons are 0 based: 0,2,1,3,4
- int cgButton;
- switch (event.button) {
- case 1:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventLeftMouseDown : OS.kCGEventLeftMouseUp);
- cgButton = 0;
- break;
- case 2:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
- cgButton = 2;
- break;
- case 3:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventRightMouseDown : OS.kCGEventRightMouseUp);
- cgButton = 1;
- break;
- default:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
- cgButton = event.button - 1;
- break;
- }
-
- if (cgButton >= 0) {
- eventRef = OS.CGEventCreateMouseEvent(eventSource, eventType, mouseCursorPosition, cgButton);
- }
+ NSPoint nsCursorPosition = NSEvent.mouseLocation();
+ NSRect primaryFrame = getPrimaryFrame();
+ mouseCursorPosition.x = nsCursorPosition.x;
+ mouseCursorPosition.y = (int) (primaryFrame.height - nsCursorPosition.y);
+ int eventType = 0;
+ // SWT buttons are 1-based: 1,2,3,4,5; CG buttons are 0 based: 0,2,1,3,4
+ int cgButton;
+ switch (event.button) {
+ case 1:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventLeftMouseDown : OS.kCGEventLeftMouseUp);
+ cgButton = 0;
+ break;
+ case 2:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
+ cgButton = 2;
+ break;
+ case 3:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventRightMouseDown : OS.kCGEventRightMouseUp);
+ cgButton = 1;
+ break;
+ default:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
+ cgButton = event.button - 1;
+ break;
+ }
+
+ if (cgButton >= 0) {
+ eventRef = OS.CGEventCreateMouseEvent(eventSource, eventType, mouseCursorPosition, cgButton);
+ }
}
break;
}
@@ -3387,17 +3593,14 @@ public boolean post(Event event) {
}
}
- // returnValue is true if we called CGPostKeyboardEvent (10.5 only).
- if (returnValue == false) {
- if (eventRef != 0) {
- OS.CGEventPost(OS.kCGHIDEventTap, eventRef);
- OS.CFRelease(eventRef);
- try {
- Thread.sleep(1);
- } catch (Exception e) {
- }
- returnValue = true;
+ if (eventRef != 0) {
+ OS.CGEventPost(OS.kCGHIDEventTap, eventRef);
+ OS.CFRelease(eventRef);
+ try {
+ Thread.sleep(1);
+ } catch (Exception e) {
}
+ returnValue = true;
}
if (eventSource != 0) OS.CFRelease(eventSource);
@@ -3675,8 +3878,8 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei
return rectangle;
}
-long /*int*/ observerProc (long /*int*/ observer, long /*int*/ activity, long /*int*/ info) {
- switch ((int)/*64*/activity) {
+long observerProc (long observer, long activity, long info) {
+ switch ((int)activity) {
case OS.kCFRunLoopBeforeWaiting:
if (runAsyncMessages) {
if (runAsyncMessages (false)) wakeThread ();
@@ -3690,8 +3893,8 @@ boolean performKeyEquivalent(NSWindow window, NSEvent nsEvent) {
if (modalDialog == null) return false;
if (nsEvent.type() != OS.NSKeyDown) return false;
int stateMask = 0;
- long /*int*/ selector = 0;
- long /*int*/ modifierFlags = nsEvent.modifierFlags();
+ long selector = 0;
+ long modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSAlternateKeyMask) != 0) stateMask |= SWT.ALT;
if ((modifierFlags & OS.NSShiftKeyMask) != 0) stateMask |= SWT.SHIFT;
if ((modifierFlags & OS.NSControlKeyMask) != 0) stateMask |= SWT.CONTROL;
@@ -3759,7 +3962,7 @@ public boolean readAndDispatch () {
events |= runContexts ();
events |= runPopups ();
NSEvent event = application.nextEventMatchingMask(OS.NSAnyEventMask, null, OS.NSDefaultRunLoopMode, true);
- if (event != null) {
+ if ((event != null) && (application != null)) {
events = true;
application.sendEvent(event);
}
@@ -3817,41 +4020,78 @@ static void register (Display display) {
*/
@Override
protected void release () {
- disposing = true;
- sendEvent (SWT.Dispose, new Event ());
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) {
- Shell shell = shells [i];
- if (!shell.isDisposed ()) shell.dispose ();
- }
- if (tray != null) tray.dispose ();
- tray = null;
- if (taskBar != null) taskBar.dispose ();
- taskBar = null;
- while (readAndDispatch ()) {}
- if (disposeList != null) {
- for (int i=0; i<disposeList.length; i++) {
- Runnable next = disposeList [i];
- if (next != null) {
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ disposing = true;
+
+ try {
+ sendEvent (SWT.Dispose, new Event ());
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+
+ for (Shell shell : getShells ()) {
+ try {
+ if (!shell.isDisposed ()) shell.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+
+ try {
+ if (tray != null) tray.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ tray = null;
+
+ try {
+ if (taskBar != null) taskBar.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ taskBar = null;
+
+ for (;;) {
+ try {
+ if (!readAndDispatch ()) break;
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+
+ if (disposeList != null) {
+ for (Runnable next : disposeList) {
+ if (next == null) continue;
+
try {
next.run ();
- } catch (RuntimeException exception) {
- runtimeExceptionHandler.accept (exception);
- } catch (Error error) {
- errorHandler.accept (error);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
}
}
}
+ disposeList = null;
+
+ synchronizer.releaseSynchronizer ();
+ synchronizer = null;
+
+ try {
+ if (appMenu != null) appMenu.dispose();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ appMenu = null;
+
+ try {
+ if (appMenuBar != null) appMenuBar.dispose();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ appMenuBar = null;
+
+ releaseDisplay ();
+ super.release ();
}
- disposeList = null;
- synchronizer.releaseSynchronizer ();
- synchronizer = null;
- if (appMenu != null) appMenu.dispose();
- appMenu = null;
- if (appMenuBar != null) appMenuBar.dispose();
- appMenuBar = null;
- releaseDisplay ();
- super.release ();
}
void releaseDisplay () {
@@ -3929,7 +4169,7 @@ void releaseDisplay () {
markedAttributes = null;
if (oldCursorSetProc != 0) {
- long /*int*/ method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
+ long method = OS.class_getInstanceMethod(OS.class_NSCursor, OS.sel_set);
OS.method_setImplementation(method, oldCursorSetProc);
}
if (cursorSetCallback != null) cursorSetCallback.dispose();
@@ -3945,7 +4185,7 @@ void releaseDisplay () {
if (!isEmbedded) {
//remove all existing menu items except the application menu
NSMenu menubar = application.mainMenu();
- long /*int*/ count = menubar.numberOfItems();
+ long count = menubar.numberOfItems();
while (count > 1) {
menubar.removeItemAtIndex(count - 1);
count--;
@@ -4051,8 +4291,8 @@ public void removeListener (int eventType, Listener listener) {
Widget removeWidget (NSObject view) {
if (view == null) return null;
- long /*int*/ [] jniRef = new long /*int*/ [1];
- long /*int*/ iVar = OS.object_getInstanceVariable(view.id, SWT_OBJECT, jniRef);
+ long [] jniRef = new long [1];
+ long iVar = OS.object_getInstanceVariable(view.id, SWT_OBJECT, jniRef);
if (iVar == 0) {
if (dynamicObjectMap != null) {
@@ -4098,16 +4338,20 @@ void removePopup (Menu menu) {
}
}
+/**
+ * Resets the cached alternateSelectedControlColor and secondarySelectedControlColor.
+ */
+void resetSelectedControlColors() {
+ alternateSelectedControlColor = secondarySelectedControlColor = null;
+}
+
boolean runAsyncMessages (boolean all) {
return synchronizer.runAsyncMessages (all);
}
boolean runAWTInvokeLater() {
- long /*int*/ cls = OS.objc_lookUpClass("JNFRunLoop");
- if (cls == 0) return false;
- long /*int*/ mode = OS.objc_msgSend(cls, OS.sel_javaRunLoopMode);
- if (mode == 0) return false;
- NSString javaRunLoopMode = new NSString(mode);
+ NSString javaRunLoopMode = getAwtRunLoopMode();
+ if (javaRunLoopMode == null) return false;
allowTimers = runAsyncMessages = false;
NSRunLoop.currentRunLoop().runMode(javaRunLoopMode, NSDate.distantFuture());
allowTimers = runAsyncMessages = true;
@@ -4195,7 +4439,7 @@ NSArray runLoopModes() {
boolean runPaint () {
if (needsDisplay == null && needsDisplayInRect == null) return false;
if (needsDisplay != null) {
- long /*int*/ count = needsDisplay.count();
+ long count = needsDisplay.count();
for (int i = 0; i < count; i++) {
OS.objc_msgSend(needsDisplay.objectAtIndex(i).id, OS.sel_setNeedsDisplay_, true);
}
@@ -4203,7 +4447,7 @@ boolean runPaint () {
needsDisplay = null;
}
if (needsDisplayInRect != null) {
- long /*int*/ count = needsDisplayInRect.count();
+ long count = needsDisplayInRect.count();
for (int i = 0; i < count; i+=2) {
NSValue value = new NSValue(needsDisplayInRect.objectAtIndex(i+1));
OS.objc_msgSend(needsDisplayInRect.objectAtIndex(i).id, OS.sel_setNeedsDisplayInRect_, value.rectValue());
@@ -4236,13 +4480,13 @@ boolean runSettings () {
runSettings = false;
boolean ignoreColorChange = false;
- /**
+ /*
* Feature in Cocoa: When dark mode is enabled on OSX version >= 10.10 and a SWT TrayItem (NSStatusItem) is present in the menubar,
* changing the OSX appearance or changing the configuration of attached displays causes the textColor and textBackground color to change.
* This sets the text foreground of several widgets as white and hence text is invisible. The workaround is to detect this case and prevent
* the update of LIST_FOREGROUND, LIST_BACKGROUND and COLOR_WIDGET_FOREGROUND colors.
*/
- if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 10, 0) && tray != null && tray.itemCount > 0) {
+ if (tray != null && tray.itemCount > 0) {
/*
* osxMode will be "Dark" when in OSX dark mode. Otherwise, it'll be null.
*/
@@ -4271,13 +4515,14 @@ NSAppearance getAppearance (APPEARANCE newMode) {
}
void setAppAppearance (APPEARANCE newMode) {
- if (OS.VERSION_MMB < OS.VERSION_MMB (10, 14, 0)) return;
+ if (OS.VERSION < OS.VERSION (10, 14, 0)) return;
NSAppearance appearance = getAppearance(newMode);
if (appearance != null && application != null) {
OS.objc_msgSend(application.id, OS.sel_setAppearance_, appearance.id);
appAppearance = newMode;
- }
+ resetSelectedControlColors();
+ }
}
void setWindowAppearance (NSWindow window, NSAppearance appearance) {
@@ -4287,7 +4532,7 @@ void setWindowAppearance (NSWindow window, NSAppearance appearance) {
}
void setWindowsAppearance (APPEARANCE newMode) {
- if (OS.VERSION_MMB < OS.VERSION_MMB (10, 14, 0)) return;
+ if (OS.VERSION < OS.VERSION (10, 14, 0)) return;
NSAppearance appearance = getAppearance(newMode);
if (appearance != null) {
@@ -4420,7 +4665,7 @@ public void sendPostExternalEventDispatchEvent () {
static NSString getApplicationName() {
NSString name = null;
int pid = OS.getpid ();
- long /*int*/ ptr = C.getenv (ascii ("APP_NAME_" + pid));
+ long ptr = C.getenv (ascii ("APP_NAME_" + pid));
if (ptr != 0) name = NSString.stringWithUTF8String(ptr);
if (name == null && APP_NAME != null) name = NSString.stringWith(APP_NAME);
if (name == null) {
@@ -4651,10 +4896,6 @@ public void setData (String key, Object value) {
setModalDialog (value != null ? (Dialog) value : null);
}
- if (key.equals (MOZILLA_RUNNING)) {
- mozillaRunning = ((Boolean)value).booleanValue ();
- }
-
if (key.equals (LOCK_CURSOR)) {
lockCursor = ((Boolean)value).booleanValue ();
}
@@ -4729,7 +4970,7 @@ void setMenuBar (Menu menu) {
*/
// menubar.cancelTracking();
OS.CancelMenuTracking (OS.AcquireRootMenu (), true, 0);
- long /*int*/ count = menubar.numberOfItems();
+ long count = menubar.numberOfItems();
while (count > 1) {
menubar.removeItemAtIndex(count - 1);
count--;
@@ -4746,11 +4987,9 @@ void setMenuBar (Menu menu) {
* menu for languages other than english. The fix is to detect
* it ourselves.
*/
- if (OS.VERSION >= 0x1060) {
- NSMenu submenu = nsItem.submenu();
- if (submenu != null && submenu.title().getString().equals(SWT.getMessage("SWT_Help"))) {
- application.setHelpMenu(submenu);
- }
+ NSMenu submenu = nsItem.submenu();
+ if (submenu != null && submenu.title().getString().equals(SWT.getMessage("SWT_Help"))) {
+ application.setHelpMenu(submenu);
}
nsItem.setMenu(null);
@@ -4977,6 +5216,54 @@ public void syncExec (Runnable runnable) {
}
/**
+ * Calls the callable on the user-interface thread at the next reasonable
+ * opportunity, and returns the its result from this method. The thread which
+ * calls this method is suspended until the callable completes.
+ * <p>
+ * Note that at the time the callable is invoked, widgets that have the receiver
+ * as their display may have been disposed. Therefore, it is necessary to check
+ * for this case inside the callable before accessing the widget.
+ * </p>
+ * <p>
+ * Any exception that is thrown from the callable is re-thrown in the calling
+ * thread. Note: The exception retains its original stack trace from the
+ * throwing thread. The call to {@code syncCall} will not be present in the
+ * stack trace.
+ * </p>
+ *
+ * @param callable the code to call on the user-interface thread
+ *
+ * @exception SWTException <code>ERROR_DEVICE_DISPOSED</code> - if the receiver
+ * has been disposed
+ * @exception E An exception that is thrown by the callable on the
+ * user-interface thread, and re-thrown on the calling
+ * thread
+ *
+ * @see #syncExec(Runnable)
+ * @see SwtCallable#call()
+ * @since 3.118
+ */
+public <T, E extends Exception> T syncCall(SwtCallable<T, E> callable) throws E {
+ Objects.nonNull(callable);
+ @SuppressWarnings("unchecked")
+ T[] t = (T[]) new Object[1];
+ Object[] ex = new Object[1];
+ syncExec(() -> {
+ try {
+ t[0] = callable.call();
+ } catch (Exception e) {
+ ex[0] = e;
+ }
+ });
+ if (ex[0] != null) {
+ @SuppressWarnings("unchecked")
+ E e = (E) ex[0];
+ throw e;
+ }
+ return t[0];
+}
+
+/**
* Causes the <code>run()</code> method of the runnable to
* be invoked by the user-interface thread after the specified
* number of milliseconds have elapsed. If milliseconds is less
@@ -5054,7 +5341,7 @@ public void timerExec (int milliseconds, Runnable runnable) {
}
}
-long /*int*/ timerProc (long /*int*/ id, long /*int*/ sel, long /*int*/ timerID) {
+long timerProc (long id, long sel, long timerID) {
NSTimer timer = new NSTimer (timerID);
try {
NSNumber number = new NSNumber(timer.userInfo());
@@ -5130,7 +5417,7 @@ void updateQuitMenu () {
NSMenu sm = appitem.submenu();
// Normally this would be sel_terminate_ but we changed it so terminate: doesn't kill the app.
- long /*int*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_applicationShouldTerminate_);
+ long quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_applicationShouldTerminate_);
if (quitIndex != -1) {
NSMenuItem quitItem = sm.itemAtIndex(quitIndex);
@@ -5172,18 +5459,7 @@ Control findControl (boolean checkTrim) {
Control findControl (boolean checkTrim, NSView[] hitView) {
NSView view = null;
NSPoint screenLocation = NSEvent.mouseLocation();
- long /*int*/ hitWindowNumber = 0;
- if (OS.VERSION >= 0x1060) {
- hitWindowNumber = NSWindow.windowNumberAtPoint(screenLocation, 0);
- } else {
- long /*int*/ outWindow[] = new long /*int*/ [1];
- OS.FindWindow ((long /*int*/)screenLocation.x, (long /*int*/)(getPrimaryFrame().height - screenLocation.y), outWindow);
-
- if (outWindow[0] != 0) {
- hitWindowNumber = OS.HIWindowGetCGWindowID(outWindow[0]);
- }
- }
-
+ long hitWindowNumber = NSWindow.windowNumberAtPoint(screenLocation, 0);
NSWindow window = application.windowWithWindowNumber(hitWindowNumber);
if (window != null) {
NSView contentView = window.contentView();
@@ -5215,7 +5491,7 @@ Control findControl (boolean checkTrim, NSView[] hitView) {
return control;
}
-void finishLaunching (long /*int*/ id, long /*int*/ sel) {
+void finishLaunching (long id, long sel) {
/*
* [NSApplication finishLaunching] cannot run multiple times otherwise
* multiple main menus are added.
@@ -5228,7 +5504,7 @@ void finishLaunching (long /*int*/ id, long /*int*/ sel) {
OS.objc_msgSendSuper(super_struct, sel);
}
-void applicationDidBecomeActive (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void applicationDidBecomeActive (long id, long sel, long notification) {
NSWindow keyWindow = application.keyWindow();
if (keyWindow != null) {
keyWindow.orderFrontRegardless();
@@ -5239,37 +5515,22 @@ void applicationDidBecomeActive (long /*int*/ id, long /*int*/ sel, long /*int*/
checkEnterExit(findControl(true), null, false);
}
-void applicationDidResignActive (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void applicationDidResignActive (long id, long sel, long notification) {
checkFocus();
checkEnterExit(null, null, false);
}
-long /*int*/ applicationNextEventMatchingMask (long /*int*/ id, long /*int*/ sel, long /*int*/ mask, long /*int*/ expiration, long /*int*/ mode, long /*int*/ dequeue) {
+long applicationNextEventMatchingMask (long id, long sel, long mask, long expiration, long mode, long dequeue) {
if (dequeue != 0 && trackingControl != null && !trackingControl.isDisposed()) runDeferredEvents();
sendPreExternalEventDispatchEvent();
try {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
- long /*int*/ result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue != 0);
+ long result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue != 0);
if (result != 0) {
- /*
- * Feature of Cocoa. When an NSComboBox's items list is visible it runs an event
- * loop that will close the list in response to a processed NSApplicationDefined
- * event.
- *
- * Mozilla-style Browsers are a common source of NSApplicationDefined events that
- * will cause this to happen, which is not desirable in the context of SWT. The
- * workaround is to detect this case and to not return the event that would trigger
- * this to happen.
- */
if (dequeue != 0 && currentCombo != null && !currentCombo.isDisposed()) {
NSEvent nsEvent = new NSEvent(result);
- if (mozillaRunning) {
- if (nsEvent.type() == OS.NSApplicationDefined) {
- return 0;
- }
- }
if (nsEvent.type() == OS.NSKeyDown) {
currentCombo.sendTrackingKeyEvent(nsEvent, SWT.KeyDown);
}
@@ -5285,7 +5546,7 @@ long /*int*/ applicationNextEventMatchingMask (long /*int*/ id, long /*int*/ sel
}
void applicationSendTrackingEvent (NSEvent nsEvent, Control trackingControl) {
- int type = (int)/*64*/nsEvent.type();
+ int type = (int)nsEvent.type();
boolean runEnterExit = false;
Control runEnterExitControl = null;
switch (type) {
@@ -5323,13 +5584,13 @@ void applicationSendTrackingEvent (NSEvent nsEvent, Control trackingControl) {
}
}
-void applicationSendEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void applicationSendEvent (long id, long sel, long event) {
NSEvent nsEvent = new NSEvent(event);
NSWindow window = nsEvent.window ();
if (performKeyEquivalent(window, nsEvent)) return;
- int type = (int)/*64*/nsEvent.type ();
+ int type = (int)nsEvent.type ();
boolean activate = false, down = false;
switch (type) {
case OS.NSLeftMouseDown:
@@ -5398,32 +5659,15 @@ void applicationSendEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event
if (type != OS.NSAppKitDefined) sendEvent = false;
}
-void applicationWillFinishLaunching (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
- boolean loaded = false;
-
- /*
- * Bug in AWT: If the AWT starts up first when the VM was started on the first thread it assumes that
- * a Carbon-based SWT will be used, so it calls NSApplicationLoad(). This causes the Carbon menu
- * manager to create an application menu that isn't accessible via NSMenu. It is, however, accessible
- * via the Carbon menu manager, so find and delete the menu items it added.
- *
- * Note that this code will continue to work if Apple does change this. GetIndMenuWithCommandID will
- * return a non-zero value indicating failure, which we ignore.
- */
- if (isEmbedded) {
- long /*int*/ outMenu [] = new long /*int*/ [1];
- short outIndex[] = new short[1];
- int status = OS.GetIndMenuItemWithCommandID(0, OS.kHICommandHide, 1, outMenu, outIndex);
- if (status == 0) OS.DeleteMenuItem(outMenu[0], outIndex[0]);
- status = OS.GetIndMenuItemWithCommandID(0, OS.kHICommandHideOthers, 1, outMenu, outIndex);
- if (status == 0) OS.DeleteMenuItem(outMenu[0], outIndex[0]);
- status = OS.GetIndMenuItemWithCommandID(0, OS.kHICommandShowAll, 1, outMenu, outIndex);
- if (status == 0) OS.DeleteMenuItem(outMenu[0], outIndex[0]);
- status = OS.GetIndMenuItemWithCommandID(0, OS.kHICommandQuit, 1, outMenu, outIndex);
- if (status == 0) OS.DeleteMenuItem(outMenu[0], outIndex[0]);
- status = OS.GetIndMenuItemWithCommandID(0, OS.kHICommandServices, 1, outMenu, outIndex);
- if (status == 0) OS.DeleteMenuItem(outMenu[0], outIndex[0]);
+void applicationDidFinishLaunching (long id, long sel, long notification) {
+ if (!isBundled()) {
+ application.setActivationPolicy (OS.NSApplicationActivationPolicyRegular);
+ application.activateIgnoringOtherApps (true);
}
+}
+
+void applicationWillFinishLaunching (long id, long sel, long notification) {
+ boolean loaded = false;
/*
* Get the default locale's language, and then the display name of the language. Some Mac OS X localizations use the
@@ -5439,28 +5683,24 @@ void applicationWillFinishLaunching (long /*int*/ id, long /*int*/ sel, long /*i
/* To find the nib look for each of these paths, in order, until one is found:
* /System/Library/..../Resources/<display name>.lproj/DefaultApp.nib
* /System/Library/..../Resources/<language>.lproj/DefaultApp.nib
- * /System/Library/..../Resources/<user's default language>.lproj/DefaultApp.nib
- * /System/Library/..../Resources/English.lproj/DefaultApp.nib.
- * /System/Library/..../Resources/en.lproj/DefaultApp.nib.
+ * /System/Library/..../Resources/Base.lproj/DefaultApp.nib
+ *
+ * If nib file is not found, use the fallback method createMainMenu() to create menu with localized strings.
*/
NSString path;
NSDictionary dict = NSDictionary.dictionaryWithObject(applicationDelegate, NSString.stringWith("NSOwner"));
- NSBundle bundle = NSBundle.bundleWithIdentifier(NSString.stringWith("com.apple.JavaVM"));
+ NSBundle bundle = NSBundle.bundleWithPath(NSString.stringWith("/System/Library/Frameworks/JavaVM.framework/"));
if (bundle != null) {
path = bundle.pathForResource(NSString.stringWith("DefaultApp"), NSString.stringWith("nib"), null, languageDisplayName);
if (path == null) path = bundle.pathForResource(NSString.stringWith("DefaultApp"), NSString.stringWith("nib"), null, NSString.stringWith(languageISOValue));
- if (path == null) path = bundle.pathForResource(NSString.stringWith("DefaultApp"), NSString.stringWith("nib"));
- if (!loaded) loaded = path != null && NSBundle.loadNibFile(path, dict, 0);
- if (!loaded) {
- path = bundle.pathForResource(NSString.stringWith("DefaultApp"), NSString.stringWith("nib"), null, NSString.stringWith("English"));
- if (path == null) path = bundle.pathForResource(NSString.stringWith("DefaultApp"), NSString.stringWith("nib"), null, NSString.stringWith("en"));
- loaded = path != null && NSBundle.loadNibFile(path, dict, 0);
+ if (path == null && languageISOValue.equals("en")) {
+ path = bundle.pathForResource(NSString.stringWith("DefaultApp"), NSString.stringWith("nib"));
}
+ if (!loaded) loaded = path != null && NSBundle.loadNibFile(path, dict, 0);
}
- if (!loaded) {
- path = NSString.stringWith(System.getProperty("java.home") + "/../Resources/English.lproj/DefaultApp.nib");
- loaded = path != null && NSBundle.loadNibFile(path, dict, 0);
- }
+ /*
+ * Create the main menu ourselves if Default.nib was not loaded or was not found for the specific language
+ */
if (!loaded) {
createMainMenu();
}
@@ -5478,7 +5718,7 @@ void applicationWillFinishLaunching (long /*int*/ id, long /*int*/ sel, long /*i
NSMenuItem ni = new NSMenuItem(ia.objectAtIndex(i));
NSString title = ni.title().stringByReplacingOccurrencesOfString(match, name);
ni.setTitle(title);
- long /*int*/ newTag = 0;
+ long newTag = 0;
switch(i) {
case 0:
newTag = SWT.ID_ABOUT;
@@ -5502,7 +5742,7 @@ void applicationWillFinishLaunching (long /*int*/ id, long /*int*/ sel, long /*i
if (newTag != 0) ni.setTag(newTag);
}
- long /*int*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_terminate_);
+ long quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_terminate_);
if (quitIndex != -1) {
NSMenuItem quitItem = sm.itemAtIndex(quitIndex);
@@ -5511,7 +5751,7 @@ void applicationWillFinishLaunching (long /*int*/ id, long /*int*/ sel, long /*i
}
}
-static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel) {
+static long applicationProc(long id, long sel) {
//TODO optimize getting the display
Display display = getCurrent ();
if (display == null) {
@@ -5530,7 +5770,7 @@ static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel) {
return 0;
}
-static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+static long applicationProc(long id, long sel, long arg0) {
//TODO optimize getting the display
Display display = getCurrent ();
if (display == null && id != applicationDelegate.id) {
@@ -5556,6 +5796,10 @@ static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*in
display.applicationSendEvent (id, sel, arg0);
return 0;
}
+ case sel_applicationDidFinishLaunching_: {
+ display.applicationDidFinishLaunching(id, sel, arg0);
+ return 0;
+ }
case sel_applicationWillFinishLaunching_: {
display.applicationWillFinishLaunching(id, sel, arg0);
return 0;
@@ -5615,7 +5859,7 @@ static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*in
}
}
-static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+static long applicationProc(long id, long sel, long arg0, long arg1) {
Display display = getCurrent();
if (display == null && id != applicationDelegate.id) {
@@ -5640,7 +5884,7 @@ static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*in
}
case sel_application_openFiles_: {
NSArray files = new NSArray(arg1);
- long /*int*/ count = files.count();
+ long count = files.count();
for (int i=0; i<count; i++) {
String file = new NSString(files.objectAtIndex(i)).getString();
Event event = new Event();
@@ -5652,7 +5896,7 @@ static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*in
}
case sel_application_openUrls_: {
NSArray urls = new NSArray(arg1);
- long /*int*/ count = urls.count();
+ long count = urls.count();
for (int i=0; i<count; i++) {
String url = new NSString(urls.objectAtIndex(i)).getString();
Event event = new Event();
@@ -5673,7 +5917,7 @@ static long /*int*/ applicationProc(long /*int*/ id, long /*int*/ sel, long /*in
}
}
-static long /*int*/ applicationProc(long /*int*/ id, long /*int*/sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
+static long applicationProc(long id, long sel, long arg0, long arg1, long arg2, long arg3) {
//TODO optimize getting the display
Display display = getCurrent ();
if (display == null && id != applicationDelegate.id) {
@@ -5688,8 +5932,8 @@ static long /*int*/ applicationProc(long /*int*/ id, long /*int*/sel, long /*int
return 0;
}
-static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
- long /*int*/ [] jniRef = new long /*int*/ [1];
+static long dialogProc(long id, long sel, long arg0) {
+ long [] jniRef = new long [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
@@ -5732,14 +5976,14 @@ static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
}
}
-static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
- long /*int*/ [] jniRef = new long /*int*/ [1];
+static long dialogProc(long id, long sel, long arg0, long arg1) {
+ long [] jniRef = new long [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
- if (sel == OS.sel_panel_shouldShowFilename_) {
+ if (sel == OS.sel_panel_shouldEnableURL_) {
FileDialog dialog = (FileDialog)OS.JNIGetObject(jniRef[0]);
if (dialog == null) return 0;
- return dialog.panel_shouldShowFilename(id, sel, arg0, arg1);
+ return dialog.panel_shouldEnableURL(id, sel, arg0, arg1);
}
if (sel == OS.sel_setColor_forAttribute_) {
FontDialog dialog = (FontDialog)OS.JNIGetObject(jniRef[0]);
@@ -5750,19 +5994,19 @@ static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
return 0;
}
-static long /*int*/ dialogProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
- long /*int*/ [] jniRef = new long /*int*/ [1];
+static long dialogProc(long id, long sel, long arg0, long arg1, long arg2) {
+ long [] jniRef = new long [1];
OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
if (jniRef[0] == 0) return 0;
- if (sel == OS.sel_panelDidEnd_returnCode_contextInfo_) {
- MessageBox dialog = (MessageBox)OS.JNIGetObject(jniRef[0]);
+ if (sel == OS.sel_panel_userEnteredFilename_confirmed_) {
+ FileDialog dialog = (FileDialog)OS.JNIGetObject(jniRef[0]);
if (dialog == null) return 0;
- dialog.panelDidEnd_returnCode_contextInfo(id, sel, arg0, arg1, arg2);
+ return dialog.panel_userEnteredFilename_confirmed(id, sel, arg0, arg1, arg2);
}
return 0;
}
-static Widget LookupWidget (long /*int*/ id, long /*int*/ sel) {
+static Widget LookupWidget (long id, long sel) {
Widget widget = GetWidget(id);
if (widget == null) {
NSView view = new NSView (id);
@@ -5775,10 +6019,10 @@ static Widget LookupWidget (long /*int*/ id, long /*int*/ sel) {
return widget;
}
-static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel) {
+static long windowProc(long id, long sel) {
if (sel == OS.sel_cellClass) {
- long /*int*/ superCls = OS.objc_msgSend(OS.class_getSuperclass(id), sel);
- long /*int*/ cls = OS.objc_lookUpClass("SWTAccessible" + OS.class_getName(superCls));
+ long superCls = OS.objc_msgSend(OS.class_getSuperclass(id), sel);
+ long cls = OS.objc_lookUpClass("SWTAccessible" + OS.class_getName(superCls));
return cls != 0 ? cls : superCls;
}
/*
@@ -5862,21 +6106,21 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel) {
case sel_markedRange: {
NSRange range = widget.markedRange (id, sel);
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc (NSRange.sizeof);
+ long result = C.malloc (NSRange.sizeof);
OS.memmove (result, range, NSRange.sizeof);
return result;
}
case sel_selectedRange: {
NSRange range = widget.selectedRange (id, sel);
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc (NSRange.sizeof);
+ long result = C.malloc (NSRange.sizeof);
OS.memmove (result, range, NSRange.sizeof);
return result;
}
case sel_cellSize: {
NSSize size = widget.cellSize (id, sel);
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc (NSSize.sizeof);
+ long result = C.malloc (NSSize.sizeof);
OS.memmove (result, size, NSSize.sizeof);
return result;
}
@@ -5941,7 +6185,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel) {
}
}
-static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+static long windowProc(long id, long sel, long arg0) {
/*
* Feature in Cocoa. In Cocoa, the default button animation is done
* in a separate thread that calls drawRect() and isOpaque() from
@@ -6367,14 +6611,6 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
widget.touchesCancelledWithEvent(id, sel, arg0);
return 0;
}
- case sel_beginGestureWithEvent_: {
- widget.beginGestureWithEvent(id, sel, arg0);
- return 0;
- }
- case sel_endGestureWithEvent_: {
- widget.endGestureWithEvent(id, sel, arg0);
- return 0;
- }
case sel_swipeWithEvent_: {
widget.swipeWithEvent(id, sel, arg0);
return 0;
@@ -6432,7 +6668,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
}
}
-static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+static long windowProc(long id, long sel, long arg0, long arg1) {
Widget widget = LookupWidget(id, sel);
if (widget == null) return 0;
@@ -6515,7 +6751,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
OS.memmove(rect, arg0, NSRect.sizeof);
rect = widget.expansionFrameWithFrame_inView(id, sel, rect, arg1);
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc (NSRect.sizeof);
+ long result = C.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
}
@@ -6524,7 +6760,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
OS.memmove(rect, arg0, NSRect.sizeof);
rect = widget.focusRingMaskBoundsForFrame(id, sel, rect, arg1);
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc (NSRect.sizeof);
+ long result = C.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
}
@@ -6563,7 +6799,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
}
}
-static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+static long windowProc(long id, long sel, long arg0, long arg1, long arg2) {
Widget widget = LookupWidget(id, sel);
if (widget == null) return 0;
@@ -6595,7 +6831,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
case sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_: {
NSRange range = widget.textView_willChangeSelectionFromCharacterRange_toCharacterRange(id, sel, arg0, arg1, arg2);
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc (NSRange.sizeof);
+ long result = C.malloc (NSRange.sizeof);
OS.memmove (result, range, NSRange.sizeof);
return result;
}
@@ -6615,7 +6851,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
OS.memmove (rect, arg1, NSRect.sizeof);
rect = widget.drawTitleWithFrameInView (id, sel, arg0, rect, arg2);
/* NOTE that this is freed in C */
- long /*int*/ result = C.malloc (NSRect.sizeof);
+ long result = C.malloc (NSRect.sizeof);
OS.memmove (result, rect, NSRect.sizeof);
return result;
}
@@ -6639,7 +6875,7 @@ static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ a
}
}
-static long /*int*/ windowProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) {
+static long windowProc(long id, long sel, long arg0, long arg1, long arg2, long arg3) {
Widget widget = LookupWidget(id, sel);
if (widget == null) return 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
index b91b7623ad..dae61b8497 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
@@ -43,6 +43,7 @@ import org.eclipse.swt.internal.cocoa.*;
public class FileDialog extends Dialog {
Callback callback_completion_handler;
Callback callback_overwrite_existing_file;
+ Callback callback_performKeyEquivalent;
NSSavePanel panel;
NSPopUpButton popup;
String [] filterNames = new String [0];
@@ -50,13 +51,16 @@ public class FileDialog extends Dialog {
String [] fileNames = new String[0];
String filterPath = "", fileName = "";
String fullPath;
- SWTPanelDelegate delegate = null;
+ SWTOpenSavePanelDelegate delegate = null;
int filterIndex = -1;
- long /*int*/ jniRef = 0;
- long /*int*/ method = 0;
- long /*int*/ methodImpl = 0;
- boolean overwrite = false;
+ long jniRef = 0;
+ long method_overwriteExistingFileCheck = 0;
+ long methodImpl_overwriteExistingFileCheck = 0;
+ long method_performKeyEquivalent = 0;
+ long methodImpl_performKeyEquivalent = 0;
static final char EXTENSION_SEPARATOR = ';';
+ private String selectedExtension;
+ boolean overwrite = (OS.VERSION >= OS.VERSION(10, 15, 0)) ? true : false;
/**
* Constructs a new instance of this class given only its parent.
@@ -116,10 +120,35 @@ long _completionHandler (long result) {
return result;
}
-long /*int*/ _overwriteExistingFileCheck (long /*int*/ id, long /*int*/ sel, long /*int*/ str) {
+long _overwriteExistingFileCheck (long id, long sel, long str) {
return 1;
}
+long _performKeyEquivalent (long id, long sel, long event) {
+ boolean result = false;
+ NSEvent nsEvent = new NSEvent(event);
+ NSWindow window = nsEvent.window ();
+ if (window != null) {
+ result = parent.display.performKeyEquivalent(window, nsEvent);
+ }
+ return result ? 1 : 0;
+}
+
+/**
+ * Appends the extension selected in the filter pop-up to the filename,
+ * only if the filename has no extension already.
+ */
+private NSString appendSelectedExtension (NSString filename) {
+ String extension = getSelectedExtension();
+ if (filename != null && extension != null) {
+ NSString ext = filename.pathExtension();
+ if (ext == null || ext.length() == 0) {
+ filename = filename.stringByAppendingPathExtension(NSString.stringWith(extension));
+ }
+ }
+ return filename;
+}
+
/**
* Returns the path of the first file that was
* selected in the dialog relative to the filter path, or an
@@ -207,6 +236,55 @@ public boolean getOverwrite () {
return overwrite;
}
+/**
+ * Returns the extension selected in the filter pop-up. When the filter has multiple extensions,
+ * the first extension us returned.
+ * Returns null if no extension is selected or if the selected filter is * or *.*
+ */
+private String getSelectedExtension () {
+ return selectedExtension;
+}
+
+private NSMutableArray getSelectedExtensions () {
+ int filterIndex = popup != null ? (int)popup.indexOfSelectedItem() : -1;
+ if (filterExtensions != null && filterExtensions.length != 0) {
+ if (0 <= filterIndex && filterIndex < filterExtensions.length) {
+ String exts = filterExtensions [filterIndex];
+ int index = exts.indexOf (EXTENSION_SEPARATOR);
+ String[] extensions = index != -1 ? exts.split(";") : new String[] {exts};
+
+ int length = extensions.length;
+ NSMutableArray allowedFileTypes = NSMutableArray.arrayWithCapacity(length);
+ for (int j = length - 1; j >= 0; j--) {
+ String ext = extensions[j];
+ String filter = ext.trim ();
+ if (!filter.equals ("*") && !filter.equals ("*.*")) {
+ if (filter.startsWith ("*.")) {
+ filter = filter.substring (2);
+ } else if (filter.startsWith (".")) {
+ filter = filter.substring (1);
+ }
+ selectedExtension = filter;
+ /*
+ * Mac doesn't support multi-part extensions, use only the last part as
+ * extension in this case.
+ */
+ int i = filter.lastIndexOf(".");
+ if (i != -1 && ((i + 1) < filter.length())) {
+ filter = filter.substring(i + 1);
+ }
+ allowedFileTypes.insertObject(NSString.stringWith(filter), 0);
+ } else {
+ selectedExtension = null;
+ return null;
+ }
+ }
+ return allowedFileTypes;
+ }
+ }
+ return null;
+}
+
void handleResponse (long response) {
if (parent != null && (style & SWT.SHEET) != 0) {
NSApplication.sharedApplication().stopModal();
@@ -214,15 +292,16 @@ void handleResponse (long response) {
Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
display.setModalDialog(null);
- if (popup != null) {
- filterIndex = (int)/*64*/popup.indexOfSelectedItem();
- } else {
- filterIndex = -1;
- }
+ filterIndex = popup != null ? (int)popup.indexOfSelectedItem() : -1;
if (response == OS.NSFileHandlingPanelOKButton) {
NSString filename = panel.filename();
if ((style & SWT.SAVE) != 0) {
+ /*
+ * This code is intentionally commented. The extension is now appended in the
+ * delegate method: panel_userEnteredFilename_confirmed
+ */
+ //filename = appendSelectedExtension(filename);
fullPath = filename.getString();
fileNames = new String [1];
fileName = fileNames [0] = filename.lastPathComponent().getString();
@@ -230,7 +309,7 @@ void handleResponse (long response) {
} else {
fullPath = filename.getString();
NSArray filenames = ((NSOpenPanel)panel).filenames();
- int count = (int)/*64*/filenames.count();
+ int count = (int)filenames.count();
fileNames = new String[count];
for (int i = 0; i < count; i++) {
@@ -276,10 +355,11 @@ public String open () {
panel = savePanel;
if (!overwrite) {
callback_overwrite_existing_file = new Callback(this, "_overwriteExistingFileCheck", 3);
- long /*int*/ proc = callback_overwrite_existing_file.getAddress();
- if (proc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- method = OS.class_getInstanceMethod(OS.class_NSSavePanel, OS.sel_overwriteExistingFileCheck);
- if (method != 0) methodImpl = OS.method_setImplementation(method, proc);
+ long proc = callback_overwrite_existing_file.getAddress();
+ method_overwriteExistingFileCheck = OS.class_getInstanceMethod(OS.class_NSSavePanel, OS.sel_overwriteExistingFileCheck);
+ if (method_overwriteExistingFileCheck != 0) {
+ methodImpl_overwriteExistingFileCheck = OS.method_setImplementation(method_overwriteExistingFileCheck, proc);
+ }
}
} else {
NSOpenPanel openPanel = NSOpenPanel.openPanel();
@@ -287,7 +367,22 @@ public String open () {
panel = openPanel;
}
+ callback_performKeyEquivalent = new Callback(this, "_performKeyEquivalent", 3);
+ long proc = callback_performKeyEquivalent.getAddress();
+ method_performKeyEquivalent = OS.class_getInstanceMethod(OS.class_NSSavePanel, OS.sel_performKeyEquivalent_);
+ if (method_performKeyEquivalent != 0) {
+ methodImpl_performKeyEquivalent = OS.method_setImplementation(method_performKeyEquivalent, proc);
+ }
+
panel.setCanCreateDirectories(true);
+ panel.setTitle(NSString.stringWith(title != null ? title : ""));
+ if (filterPath != null && filterPath.length() > 0) {
+ NSString dir = NSString.stringWith(filterPath);
+ panel.setDirectoryURL(NSURL.fileURLWithPath(dir));
+ }
+ if (fileName != null && fileName.length() > 0) {
+ panel.setNameFieldStringValue(NSString.stringWith(fileName));
+ }
/*
* This line is intentionally commented. Don't show hidden files forcefully,
* instead allow File dialog to use the system preference.
@@ -296,7 +391,7 @@ public String open () {
jniRef = 0;
delegate = null;
if (filterExtensions != null && filterExtensions.length != 0) {
- delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
+ delegate = (SWTOpenSavePanelDelegate)new SWTOpenSavePanelDelegate().alloc().init();
jniRef = OS.NewGlobalRef(this);
if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
@@ -322,28 +417,24 @@ public String open () {
widget.sizeToFit();
panel.setAccessoryView(widget);
popup = widget;
-
- setAllowedFileType(filterExtensions[selectionIndex]);
- panel.setAllowsOtherFileTypes(true);
panel.setTreatsFilePackagesAsDirectories(shouldTreatAppAsDirectory(filterExtensions[selectionIndex]));
+ if ((style & SWT.SAVE) != 0) {
+ NSArray extensions = getSelectedExtensions();
+ if (extensions != null) panel.setAllowedFileTypes(extensions);
+ panel.setAllowsOtherFileTypes(true);
+ } else {
+ if (OS.VERSION >= OS.VERSION(10, 11, 0)) {
+ ((NSOpenPanel)panel).setAccessoryViewDisclosed(true);
+ }
+ }
} else {
panel.setTreatsFilePackagesAsDirectories(false);
}
- panel.setTitle(NSString.stringWith(title != null ? title : ""));
- if (filterPath != null && filterPath.length() > 0) {
- NSString dir = NSString.stringWith(filterPath);
- panel.setDirectoryURL(NSURL.fileURLWithPath(dir));
- }
- if (fileName != null && fileName.length() > 0) {
- panel.setNameFieldStringValue(NSString.stringWith(fileName));
- }
-
Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
display.setModalDialog(this, panel);
if (parent != null && (style & SWT.SHEET) != 0) {
callback_completion_handler = new Callback(this, "_completionHandler", 1);
long handler = callback_completion_handler.getAddress();
- if (handler == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.beginSheetModalForWindow(panel, parent.view.window(), handler);
NSApplication.sharedApplication().runModalForWindow(parent.view.window());
} else {
@@ -353,15 +444,16 @@ public String open () {
return fullPath;
}
-long /*int*/ panel_shouldShowFilename (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+long panel_shouldEnableURL (long id, long sel, long arg0, long arg1) {
if ((style & SWT.SAVE) != 0) {
/* All filenames are always disabled in the NSSavePanel, so return from here. */
return 1;
}
- NSString path = new NSString(arg1);
+ NSURL url = new NSURL(arg1);
+ NSString path = url.path();
if (filterExtensions != null && filterExtensions.length != 0) {
NSFileManager manager = NSFileManager.defaultManager();
- long /*int*/ ptr = C.malloc(1);
+ long ptr = C.malloc(1);
boolean found = manager.fileExistsAtPath(path, ptr);
byte[] isDirectory = new byte[1];
C.memmove(isDirectory, ptr, 1);
@@ -371,7 +463,7 @@ long /*int*/ panel_shouldShowFilename (long /*int*/ id, long /*int*/ sel, long /
return 1;
} else if (popup != null) {
String fileName = path.lastPathComponent().getString();
- int filterIndex = (int)/*64*/popup.indexOfSelectedItem();
+ int filterIndex = (int)popup.indexOfSelectedItem();
String extensions = filterExtensions [filterIndex];
int start = 0, length = extensions.length ();
while (start < length) {
@@ -395,12 +487,38 @@ long /*int*/ panel_shouldShowFilename (long /*int*/ id, long /*int*/ sel, long /
return 1;
}
+long panel_userEnteredFilename_confirmed (long id, long sel, long sender, long filename, long okFlag) {
+ /*
+ * From documentation: This delegate method is called when user confirmed
+ * a filename choice by clicking Save in a Save panel. It's called before any
+ * required extension is appended to the filename and before the Save panel asks
+ * the user to replace an existing file, if applicable.
+ *
+ * If the filename in the File Dialog's name field has no extension, then the extension from the filter will be
+ * applied on Save. Add the extension here, so that the NSSavePanel can use this filename with extension
+ * for validation and show the replace existing file dialog, if required.
+ */
+ if (okFlag == 0) return filename;
+ NSString filenameWithExtension = new NSString(filename);
+ filenameWithExtension = appendSelectedExtension(filenameWithExtension);
+ return filenameWithExtension.id;
+}
+
void releaseHandles() {
if (!overwrite) {
- if (method != 0) OS.method_setImplementation(method, methodImpl);
+ if (method_overwriteExistingFileCheck != 0) {
+ OS.method_setImplementation(method_overwriteExistingFileCheck, methodImpl_overwriteExistingFileCheck);
+ }
if (callback_overwrite_existing_file != null) callback_overwrite_existing_file.dispose();
callback_overwrite_existing_file = null;
}
+
+ if (method_performKeyEquivalent != 0) {
+ OS.method_setImplementation(method_performKeyEquivalent, methodImpl_performKeyEquivalent);
+ }
+ if (callback_performKeyEquivalent != null) callback_performKeyEquivalent.dispose();
+ callback_performKeyEquivalent = null;
+
if (callback_completion_handler != null) {
callback_completion_handler.dispose();
callback_completion_handler = null;
@@ -420,56 +538,23 @@ void releaseHandles() {
panel = null;
}
-void sendSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ arg) {
+void sendSelection (long id, long sel, long arg) {
if (filterExtensions != null && filterExtensions.length > 0) {
- String fileTypes = filterExtensions[(int)/*64*/popup.indexOfSelectedItem ()];
+ String fileTypes = filterExtensions[(int)popup.indexOfSelectedItem ()];
panel.setTreatsFilePackagesAsDirectories (shouldTreatAppAsDirectory (fileTypes));
- setAllowedFileType (fileTypes);
- }
- panel.validateVisibleColumns ();
-}
-
-void setAllowedFileType (String fileTypes) {
- if (fileTypes == null) return;
- StringTokenizer fileTypesToken = new StringTokenizer(fileTypes, String.valueOf(EXTENSION_SEPARATOR));
- NSMutableArray allowedFileTypes = NSMutableArray.arrayWithCapacity(1);
-
- while(fileTypesToken.hasMoreTokens()) {
- String fileType = fileTypesToken.nextToken();
-
- if (fileType.equals("*") || fileType.equals("*.*")) {
- panel.setAllowedFileTypes(null);
- return;
- }
- if (fileType.startsWith("*.")) {
- fileType = fileType.substring(2);
- } else if (fileType.startsWith(".")) {
- fileType = fileType.substring(1);
- }
/*
- * In Cocoa, only the part of the file name after the last extension divider (.)
- * is considered as extension. But, SWT FileDialog supports extensions with more than one (.).
- * When files with extensions which have more than 1 separator are filtered, they are not
- * shown as enabled in the File Open Dialog. For example, using tar.gz in the filter
- * extension doesn't show the tar.gz files enabled in the FileDialog.
- *
- * The workaround is for Open FileDialog, add only the extension after the last (.) as the allowed
- * file type. For example, for tar.gz, only gz is added as the allowed file type.
+ * Update the allowed file types in the dialog. If extension is not hidden, this
+ * updates the extension in the name field.
*/
- if ((style & SWT.SAVE) == 0) {
- int index = fileType.lastIndexOf(".");
- if (index != -1 && ((index + 1) < fileType.length())) {
- fileType = fileType.substring(index + 1);
- }
+ if ((style & SWT.SAVE) != 0) {
+ panel.setAllowedFileTypes(getSelectedExtensions());
+ return;
}
- allowedFileTypes.addObject(NSString.stringWith(fileType));
}
-
- panel.setAllowedFileTypes(allowedFileTypes);
+ panel.validateVisibleColumns ();
}
-
/**
* Set the initial filename which the dialog will
* select by default when opened to the argument,
@@ -574,13 +659,22 @@ public void setFilterPath (String string) {
* Sets the flag that the dialog will use to
* determine whether to prompt the user for file
* overwrite if the selected file already exists.
+ * <p>
+ * Note: On some platforms where suppressing the overwrite prompt
+ * is not supported, the prompt is shown even when invoked with
+ * overwrite false.
+ * </p>
*
* @param overwrite true if the dialog will prompt for file overwrite, false otherwise
*
* @since 3.4
*/
public void setOverwrite (boolean overwrite) {
- this.overwrite = overwrite;
+ /**
+ * Since macOS 10.15, overwriteExistingFileCheck private method is not available.
+ * Hence, there is no way to suppress the overwrite prompt and overwrite is always set to true.
+ */
+ this.overwrite = (OS.VERSION >= OS.VERSION(10, 15, 0)) ? true : overwrite;
}
/**
@@ -597,4 +691,5 @@ boolean shouldTreatAppAsDirectory (String extensions) {
}
return true;
}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
index c5e74e74f2..14e9712cc8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
@@ -88,7 +88,7 @@ public FontDialog (Shell parent, int style) {
checkSubclass ();
}
-void changeFont(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void changeFont(long id, long sel, long arg0) {
selected = true;
}
@@ -169,7 +169,7 @@ public FontData open () {
Font font = create ? new Font(display, fontData) : display.getSystemFont();
panel.setPanelFont(font.handle, false);
SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
- long /*int*/ jniRef = OS.NewGlobalRef(this);
+ long jniRef = OS.NewGlobalRef(this);
if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
panel.setDelegate(delegate);
@@ -192,12 +192,12 @@ public FontData open () {
return fontData;
}
-void setColor_forAttribute(long /*int*/ id, long /*int*/ sel, long /*int*/ colorArg, long /*int*/ attribute) {
+void setColor_forAttribute(long id, long sel, long colorArg, long attribute) {
if (attribute != 0 && NSString.stringWith("NSColor").isEqualToString(new NSString(attribute))) { //$NON-NLS-1$
if (colorArg != 0) {
NSColor color = new NSColor(colorArg);
Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
- double /*float*/ [] handle = display.getNSColorRGB(color);
+ double [] handle = display.getNSColorRGB(color);
if (handle != null) {
rgb = new RGB((int)(handle[0] * 255), (int)(handle[1] * 255), (int)(handle[2] * 255));
}
@@ -271,11 +271,11 @@ public void setRGB (RGB rgb) {
this.rgb = rgb;
}
-int validModesForFontPanel(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+int validModesForFontPanel(long id, long sel, long arg0) {
return effectsVisible ? OS.NSFontPanelAllModesMask : OS.NSFontPanelAllModesMask & ~OS.NSFontPanelAllEffectsModeMask;
}
-void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void windowWillClose(long id, long sel, long sender) {
NSApplication.sharedApplication().stop(null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
index 79617f95ae..0ae7385c22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
@@ -161,7 +161,7 @@ void deregister () {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -237,7 +237,7 @@ void setFont(NSFont font) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
NSColor nsColor;
if (color == null) {
nsColor = NSColor.textColor ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
index 18b8bda2bf..64220dc804 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
@@ -90,14 +90,14 @@ public IME (Canvas parent, int style) {
}
@Override
-long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, long /*int*/ rangePtr) {
+long attributedSubstringFromRange (long id, long sel, long rangePtr) {
Event event = new Event ();
event.detail = SWT.COMPOSITION_SELECTION;
sendEvent (SWT.ImeComposition, event);
NSRange range = new NSRange ();
OS.memmove (range, rangePtr, NSRange.sizeof);
- int start = (int)/*64*/range.location;
- int end = (int)/*64*/(range.location + range.length);
+ int start = (int)range.location;
+ int end = (int)(range.location + range.length);
if (event.start <= start && start <= event.end && event.start <= end && end <= event.end) {
NSString str = (NSString) new NSString().alloc();
str = str.initWithString(event.text.substring(start - event.start, end - event.start));
@@ -110,7 +110,7 @@ long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, lo
}
@Override
-long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
+long characterIndexForPoint (long id, long sel, long point) {
if (!isInlineEnabled ()) return OS.NSNotFound();
NSPoint pt = new NSPoint ();
OS.memmove (pt, point, NSPoint.sizeof);
@@ -136,7 +136,7 @@ void createWidget () {
}
@Override
-NSRect firstRectForCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
+NSRect firstRectForCharacterRange(long id, long sel, long range) {
NSRect rect = new NSRect ();
Caret caret = parent.caret;
if (caret != null) {
@@ -156,6 +156,7 @@ NSRect firstRectForCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*
/**
* Returns the offset of the caret from the start of the document.
+ * -1 means that there is currently no active composition.
* The caret is within the current composition.
*
* @return the caret offset
@@ -264,20 +265,20 @@ public TextStyle [] getStyles () {
TextStyle getStyle (NSDictionary attribs) {
NSArray keys = attribs.allKeys ();
- long /*int*/ count = keys.count ();
+ long count = keys.count ();
TextStyle style = new TextStyle ();
for (int j = 0; j < count; j++) {
NSString key = new NSString (keys.objectAtIndex (j));
- if (key.isEqualTo (OS.NSBackgroundColorAttributeName)) {
+ if (key.isEqual (OS.NSBackgroundColorAttributeName)) {
NSColor color = new NSColor (attribs.objectForKey (key));
style.background = Color.cocoa_new (display, display.getNSColorRGB(color));
- } else if (key.isEqualTo (OS.NSForegroundColorAttributeName)) {
+ } else if (key.isEqual (OS.NSForegroundColorAttributeName)) {
NSColor color = new NSColor (attribs.objectForKey (key));
style.foreground = Color.cocoa_new (display, display.getNSColorRGB(color));
- } else if (key.isEqualTo (OS.NSUnderlineColorAttributeName)) {
+ } else if (key.isEqual (OS.NSUnderlineColorAttributeName)) {
NSColor color = new NSColor (attribs.objectForKey (key));
style.underlineColor = Color.cocoa_new (display, display.getNSColorRGB(color));
- } else if (key.isEqualTo (OS.NSUnderlineStyleAttributeName)) {
+ } else if (key.isEqual (OS.NSUnderlineStyleAttributeName)) {
NSNumber value = new NSNumber (attribs.objectForKey (key));
switch (value.intValue ()) {
case OS.NSUnderlineStyleSingle: style.underlineStyle = SWT.UNDERLINE_SINGLE; break;
@@ -285,13 +286,13 @@ TextStyle getStyle (NSDictionary attribs) {
case OS.NSUnderlineStyleThick: style.underlineStyle = UNDERLINE_THICK; break;
}
style.underline = value.intValue () != OS.NSUnderlineStyleNone;
- } else if (key.isEqualTo (OS.NSStrikethroughColorAttributeName)) {
+ } else if (key.isEqual (OS.NSStrikethroughColorAttributeName)) {
NSColor color = new NSColor (attribs.objectForKey (key));
style.strikeoutColor = Color.cocoa_new (display, display.getNSColorRGB(color));
- } else if (key.isEqualTo (OS.NSStrikethroughStyleAttributeName)) {
+ } else if (key.isEqual (OS.NSStrikethroughStyleAttributeName)) {
NSNumber value = new NSNumber (attribs.objectForKey (key));
style.strikeout = value.intValue () != OS.NSUnderlineStyleNone;
- } else if (key.isEqualTo (OS.NSFontAttributeName)) {
+ } else if (key.isEqual (OS.NSFontAttributeName)) {
NSFont font = new NSFont (attribs.objectForKey (key));
font.retain();
style.font = Font.cocoa_new (display, font);
@@ -339,18 +340,18 @@ public boolean getWideCaret() {
}
@Override
-boolean hasMarkedText (long /*int*/ id, long /*int*/ sel) {
+boolean hasMarkedText (long id, long sel) {
return text.length () != 0;
}
@Override
-boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
+boolean insertText (long id, long sel, long string) {
if (startOffset == -1) return true;
NSString str = new NSString (string);
if (str.isKindOfClass (OS.class_NSAttributedString)) {
str = new NSAttributedString (string).string ();
}
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
int end = startOffset + text.length ();
resetStyles ();
caretOffset = commitCount = length;
@@ -371,7 +372,7 @@ boolean isInlineEnabled () {
}
@Override
-NSRange markedRange (long /*int*/ id, long /*int*/ sel) {
+NSRange markedRange (long id, long sel) {
NSRange range = new NSRange ();
if (startOffset != -1) {
range.location = startOffset;
@@ -409,7 +410,7 @@ void releaseWidget () {
}
@Override
-NSRange selectedRange (long /*int*/ id, long /*int*/ sel) {
+NSRange selectedRange (long id, long sel) {
Event event = new Event ();
event.detail = SWT.COMPOSITION_SELECTION;
sendEvent (SWT.ImeComposition, event);
@@ -444,7 +445,7 @@ public void setCompositionOffset (int offset) {
}
@Override
-boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*int*/ string, long /*int*/ selRange) {
+boolean setMarkedText_selectedRange (long id, long sel, long string, long selRange) {
if (!isInlineEnabled ()) return true;
resetStyles ();
caretOffset = commitCount = 0;
@@ -460,19 +461,19 @@ boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*i
if (str.isKindOfClass (OS.class_NSAttributedString)) {
NSAttributedString attribStr = new NSAttributedString (string);
str = attribStr.string ();
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
styles = new TextStyle [length];
ranges = new int [length * 2];
NSRange rangeLimit = new NSRange (), effectiveRange = new NSRange ();
rangeLimit.length = length;
int rangeCount = 0;
- long /*int*/ ptr = C.malloc (NSRange.sizeof);
+ long ptr = C.malloc (NSRange.sizeof);
for (int i = 0; i < length;) {
NSDictionary attribs = attribStr.attributesAtIndex(i, ptr, rangeLimit);
OS.memmove (effectiveRange, ptr, NSRange.sizeof);
- i = (int)/*64*/(effectiveRange.location + effectiveRange.length);
- ranges [rangeCount * 2] = (int)/*64*/effectiveRange.location;
- ranges [rangeCount * 2 + 1] = (int)/*64*/(effectiveRange.location + effectiveRange.length - 1);
+ i = (int)(effectiveRange.location + effectiveRange.length);
+ ranges [rangeCount * 2] = (int)effectiveRange.location;
+ ranges [rangeCount * 2 + 1] = (int)(effectiveRange.location + effectiveRange.length - 1);
styles [rangeCount++] = getStyle (attribs);
}
C.free (ptr);
@@ -485,14 +486,25 @@ boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*i
ranges = newRanges;
}
}
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
if (ranges == null && length > 0) {
styles = new TextStyle []{getStyle (display.markedAttributes)};
ranges = new int[]{0, length - 1};
}
NSRange range = new NSRange ();
OS.memmove (range, selRange, NSRange.sizeof);
- caretOffset = (int)/*64*/range.location;
+
+ /*
+ * Bug 427882: There is a macOS bug where it sends
+ * 'setMarkedText:selectedRange:' with 'markedText' that is incorrectly
+ * too short, which results in 'selectedRange.location' being outside it.
+ * If caret's position is already at the end, this will result in trying
+ * to set caret outside the text. The workaround is to correct 'location'
+ * so that it's always within 'markedText'.
+ */
+ range.location = Math.min(range.location, length);
+
+ caretOffset = (int)range.location;
Event event = new Event ();
event.detail = SWT.COMPOSITION_CHANGED;
event.start = startOffset;
@@ -510,14 +522,14 @@ boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*i
}
@Override
-long /*int*/ validAttributesForMarkedText (long /*int*/ id, long /*int*/ sel) {
+long validAttributesForMarkedText (long id, long sel) {
NSMutableArray attribs = NSMutableArray.arrayWithCapacity (6);
- attribs.addObject (new NSString (OS.NSForegroundColorAttributeName ()));
- attribs.addObject (new NSString (OS.NSBackgroundColorAttributeName ()));
- attribs.addObject (new NSString (OS.NSUnderlineStyleAttributeName ()));
- attribs.addObject (new NSString (OS.NSUnderlineColorAttributeName ()));
- attribs.addObject (new NSString (OS.NSStrikethroughStyleAttributeName ()));
- attribs.addObject (new NSString (OS.NSStrikethroughColorAttributeName ()));
+ attribs.addObject (OS.NSForegroundColorAttributeName);
+ attribs.addObject (OS.NSBackgroundColorAttributeName);
+ attribs.addObject (OS.NSUnderlineStyleAttributeName);
+ attribs.addObject (OS.NSUnderlineColorAttributeName);
+ attribs.addObject (OS.NSStrikethroughStyleAttributeName);
+ attribs.addObject (OS.NSStrikethroughColorAttributeName);
return attribs.id;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
index 02ad646f9c..09952cbf76 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
@@ -99,12 +99,12 @@ public Label (Composite parent, int style) {
}
@Override
-long /*int*/ accessibleHandle() {
+long accessibleHandle() {
return eventView().id;
}
@Override
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
if (id == view.id) return true;
return super.accessibilityIsIgnored(id, sel);
}
@@ -142,7 +142,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int width = DEFAULT_WIDTH;
int height = DEFAULT_HEIGHT;
if ((style & SWT.SEPARATOR) != 0) {
- double /*float*/ lineWidth = ((NSBox)view).borderWidth ();
+ double lineWidth = ((NSBox)view).borderWidth ();
if ((style & SWT.HORIZONTAL) != 0) {
height = (int)Math.ceil (lineWidth * 2);
} else {
@@ -205,7 +205,7 @@ void createHandle () {
widget.setBoxType (OS.NSBoxCustom);
widget.setContentViewMargins (new NSSize());
- double /*float*/ lineWidth = widget.borderWidth ();
+ double lineWidth = widget.borderWidth ();
if ((style & SWT.HORIZONTAL) != 0) {
rect.height = (int)Math.ceil (lineWidth * 2);
rect.y = (DEFAULT_HEIGHT / 2) - (rect.height / 2);
@@ -293,13 +293,13 @@ void deregister () {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground(view, context, rect, -1);
}
@Override
-long /*int*/ imageView() {
+long imageView() {
return imageView.id;
};
@@ -458,7 +458,7 @@ void setFont(NSFont font) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
if ((style & SWT.SEPARATOR) != 0) return;
NSCell cell = new NSCell(textView.cell());
cell.setAttributedStringValue(createString());
@@ -486,28 +486,32 @@ boolean setTabItemFocus () {
public void setImage (Image image) {
checkWidget();
if ((style & SWT.SEPARATOR) != 0) return;
- if (image != null && image.isDisposed ()) {
- error (SWT.ERROR_INVALID_ARGUMENT);
- }
- this.image = image;
- isImage = true;
-
- /*
- * Feature in Cocoa. If the NSImage object being set into the view is
- * the same NSImage object that is already there then the new image is
- * not taken. This results in the view's image not changing even if the
- * NSImage object's content has changed since it was last set into the
- * view. The workaround is to temporarily set the view's image to null
- * so that the new image will then be taken.
- */
if (image != null) {
+ if (image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+
+ this.image = image;
+ isImage = true;
+ /*
+ * Feature in Cocoa. If the NSImage object being set into the view is
+ * the same NSImage object that is already there then the new image is
+ * not taken. This results in the view's image not changing even if the
+ * NSImage object's content has changed since it was last set into the
+ * view. The workaround is to temporarily set the view's image to null
+ * so that the new image will then be taken.
+ */
NSImage current = imageView.image ();
if (current != null && current.id == image.handle.id) {
imageView.setImage (null);
}
+ imageView.setImage(image.handle);
+ ((NSBox)view).setContentView(imageView);
+ } else {
+ if (this.image == null) return; // do nothing if image is already null
+
+ this.image = image;
+ imageView.setImage(null);
+ _setText();
}
- imageView.setImage(image != null ? image.handle : null);
- ((NSBox)view).setContentView(imageView);
}
/**
@@ -545,8 +549,12 @@ public void setText (String string) {
checkWidget();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
- isImage = false;
text = string;
+ _setText();
+}
+
+private void _setText () {
+ isImage = false;
NSCell cell = new NSCell(textView.cell());
cell.setAttributedStringValue(createString());
((NSBox)view).setContentView(textView);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
index f0481692ab..ae364618b7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
@@ -48,10 +48,11 @@ public class Link extends Control {
Point [] offsets;
String [] ids;
int [] mnemonics;
- double /*float*/ [] linkForeground;
+ double [] linkForeground;
NSColor defaultLinkColor;
int focusIndex;
boolean ignoreNextMouseUp;
+ APPEARANCE lastAppAppearance;
/**
* Constructs a new instance of this class given its parent
@@ -173,7 +174,7 @@ void createHandle () {
scrollWidget.setDrawsBackground(false);
scrollWidget.setAutoresizesSubviews (true);
scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder);
- if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 7, 0)) scrollWidget.setVerticalScrollElasticity(OS.NSScrollElasticityNone);
+ scrollWidget.setVerticalScrollElasticity(OS.NSScrollElasticityNone);
NSTextView widget = (NSTextView)new SWTTextView().alloc();
widget.init();
@@ -223,7 +224,7 @@ void deregister () {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rectangle) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rectangle) {
fillBackground (view, context, rectangle, -1);
if (!hasFocus() || focusIndex == -1) return;
int [] outMetric = new int [1];
@@ -247,10 +248,8 @@ void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rectangl
@Override
void drawRect(long id, long sel, NSRect rect) {
+ updateThemeColors();
super.drawRect(id, sel, rect);
- if (display.appAppearance == APPEARANCE.Dark) {
- setDefaultForeground();
- }
}
@Override
@@ -317,13 +316,13 @@ NSRect[] getRectangles(int linkIndex) {
range.length = offsets[linkIndex].y - offsets[linkIndex].x + 1;
NSRange glyphRange = layoutManager.glyphRangeForCharacterRange(range, 0);
- long /*int*/ rangePtr = C.malloc(NSRange.sizeof);
+ long rangePtr = C.malloc(NSRange.sizeof);
NSRange lineRange = new NSRange();
/* compute number of lines in the link */
int numberOfLines = 0;
- long /*int*/ index = glyphRange.location;
- long /*int*/ glyphEndIndex = glyphRange.location + glyphRange.length;
+ long index = glyphRange.location;
+ long glyphEndIndex = glyphRange.location + glyphRange.length;
while (index < glyphEndIndex) {
numberOfLines++;
layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
@@ -380,7 +379,7 @@ NSColor getTextColor (boolean enabled) {
}
@Override
-void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseUp(long id, long sel, long theEvent) {
/*
* Feature in Cocoa: Link click notices are sent on mouseDown, but for some reason, Cocoa
* re-sends the mouseUp that follows the click on a link. Fix is to ignore the next mouseUp
@@ -398,7 +397,7 @@ String parse (String string) {
offsets = new Point [length / 4];
ids = new String [length / 4];
mnemonics = new int [length / 4 + 1];
- StringBuffer result = new StringBuffer ();
+ StringBuilder result = new StringBuilder ();
char [] buffer = new char [length];
string.getChars (0, string.length (), buffer, 0);
int index = 0, state = 0, linkIndex = 0;
@@ -524,7 +523,7 @@ String parse (String string) {
return result.toString ();
}
-int parseMnemonics (char[] buffer, int start, int end, StringBuffer result) {
+int parseMnemonics (char[] buffer, int start, int end, StringBuilder result) {
int mnemonic = -1, index = start;
while (index < end) {
if (buffer [index] == '&') {
@@ -592,7 +591,7 @@ public void removeSelectionListener (SelectionListener listener) {
}
@Override
-void scrollWheel(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void scrollWheel(long id, long sel, long theEvent) {
super.scrollWheel(id, sel, theEvent);
parent.scrollWheel(parent.view.id, sel, theEvent);
}
@@ -670,22 +669,13 @@ void setBackgroundImage(NSImage image) {
((NSTextView) view).setDrawsBackground(image == null);
}
-void setDefaultForeground() {
- if (foreground != null) return;
- if (getEnabled ()) {
- ((NSTextView) view).setTextColor (NSColor.textColor ());
- } else {
- ((NSTextView) view).setTextColor (NSColor.disabledControlTextColor ());
- }
-}
-
@Override
void setFont(NSFont font) {
((NSTextView) view).setFont(font);
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
if (!getEnabled ()) return;
((NSTextView) view).setTextColor (getTextColor (true));
}
@@ -693,7 +683,7 @@ void setForeground (double /*float*/ [] color) {
void setLinkColor (boolean enabled) {
NSTextView widget = (NSTextView) view;
NSDictionary linkTextAttributes = widget.linkTextAttributes ();
- int count = (int)/*64*/linkTextAttributes.count ();
+ int count = (int)linkTextAttributes.count ();
NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (count);
dict.setDictionary (linkTextAttributes);
dict.setValue (enabled ? getLinkForegroundColor () : getTextColor (false), OS.NSForegroundColorAttributeName);
@@ -723,7 +713,7 @@ public void setLinkForeground (Color color) {
if (color != null) {
if (color.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] linkForeground = color != null ? color.handle : null;
+ double [] linkForeground = color != null ? color.handle : null;
if (equals (linkForeground, this.linkForeground)) return;
this.linkForeground = linkForeground;
if (getEnabled ()) {
@@ -804,12 +794,12 @@ void setZOrder () {
}
@Override
-boolean shouldDrawInsertionPoint(long /*int*/ id, long /*int*/ sel) {
+boolean shouldDrawInsertionPoint(long id, long sel) {
return false;
}
@Override
-boolean textView_clickOnLink_atIndex(long /*int*/ id, long /*int*/ sel, long /*int*/ textView, long /*int*/ link, long /*int*/ charIndex) {
+boolean textView_clickOnLink_atIndex(long id, long sel, long textView, long link, long charIndex) {
NSString str = new NSString (link);
Event event = new Event ();
event.text = str.getString();
@@ -837,7 +827,7 @@ int traversalCode (int key, NSEvent theEvent) {
if (offsets.length == 0) return 0;
int bits = super.traversalCode (key, theEvent);
if (key == 48 /* Tab */ && theEvent != null) {
- long /*int*/ modifierFlags = theEvent.modifierFlags();
+ long modifierFlags = theEvent.modifierFlags();
boolean next = (modifierFlags & OS.NSShiftKeyMask) == 0;
if (next && focusIndex < offsets.length - 1) {
return bits & ~ SWT.TRAVERSE_TAB_NEXT;
@@ -859,5 +849,26 @@ void updateCursorRects (boolean enabled) {
contentView.setDocumentCursor (enabled ? NSCursor.arrowCursor () : null);
}
+void updateThemeColors() {
+ /*
+ * On macOS 10.14 and 10.15, when application sets Dark appearance, NSTextView
+ * does not change the text color. In case of the link, this means that text
+ * outside <a></a> will be black-on-dark. Fix this by setting the text color
+ * explicitly. It seems that this is no longer needed on macOS 11.0. Note that
+ * there is 'setUsesAdaptiveColorMappingForDarkAppearance:' which causes
+ * NSTextView to adapt its colors, but it will also remap any colors used in
+ * .setBackground(), which makes it difficult to use. I wasn't able to find an
+ * event that colors changed, 'drawRect' seems to be the best option.
+ */
+
+ // Avoid infinite loop of redraws
+ if (lastAppAppearance == display.appAppearance) return;
+ lastAppAppearance = display.appAppearance;
+ // Only default colors are affected
+ if (foreground != null) return;
+
+ ((NSTextView) view).setTextColor (getTextColor (getEnabled ()));
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
index 1bafa3831d..9370f9788d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
@@ -84,7 +84,7 @@ public List (Composite parent, int style) {
}
@Override
-long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityAttributeValue (long id, long sel, long arg0) {
// if (attributeName.isEqualToString(OS.NSAccessibilityHeaderAttribute)) {
// /*
// * Bug in the Macintosh. Even when the header is not visible,
@@ -100,7 +100,7 @@ long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, lon
}
@Override
-boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean acceptsFirstResponder (long id, long sel) {
return true;
}
@@ -267,6 +267,9 @@ void createHandle () {
spacing.width = spacing.height = CELL_GAP;
widget.setIntercellSpacing(spacing);
widget.setDoubleAction(OS.sel_sendDoubleSelection);
+ if (OS.isBigSurOrLater()) {
+ OS.objc_msgSend(widget.id, OS.sel_setStyle, OS.NSTableViewStylePlain);
+ }
if (!hasBorder()) widget.setFocusRingType(OS.NSFocusRingTypeNone);
column = (NSTableColumn)new NSTableColumn().alloc();
@@ -404,7 +407,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
NSPoint pt = new NSPoint();
pt.x = x;
pt.y = y;
- long /*int*/ row = widget.rowAtPoint(pt);
+ long row = widget.rowAtPoint(pt);
if (row == -1) return false;
boolean dragging = super.dragDetect(x, y, filter, consume);
if (dragging) {
@@ -421,7 +424,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
}
@Override
-void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long id, long sel, NSRect rect) {
super.drawViewBackgroundInRect(id, sel, rect);
if (id != view.id) return;
fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
@@ -460,7 +463,7 @@ void fixSelection (int index, boolean add) {
*/
public int getFocusIndex () {
checkWidget();
- return (int)/*64*/((NSTableView)view).selectedRow();
+ return (int)((NSTableView)view).selectedRow();
}
/**
@@ -533,7 +536,7 @@ public int getItemHeight () {
*/
public String [] getItems () {
checkWidget();
- String [] result = new String [itemCount];
+ String [] result = new String [itemCount];
System.arraycopy (items, 0, result, 0, itemCount);
return result;
}
@@ -561,12 +564,12 @@ public String [] getSelection () {
return new String [0];
}
NSIndexSet selection = widget.selectedRowIndexes();
- int count = (int)/*64*/selection.count();
- long /*int*/ [] indexBuffer = new long /*int*/ [count];
+ int count = (int)selection.count();
+ long [] indexBuffer = new long [count];
selection.getIndexes(indexBuffer, count, 0);
String [] result = new String [count];
for (int i=0; i<count; i++) {
- result [i] = items [(int)/*64*/indexBuffer [i]];
+ result [i] = items [(int)indexBuffer [i]];
}
return result;
}
@@ -583,7 +586,7 @@ public String [] getSelection () {
*/
public int getSelectionCount () {
checkWidget ();
- return (int)/*64*/((NSTableView)view).numberOfSelectedRows();
+ return (int)((NSTableView)view).numberOfSelectedRows();
}
/**
@@ -604,10 +607,10 @@ public int getSelectionIndex () {
return -1;
}
NSIndexSet selection = widget.selectedRowIndexes();
- int count = (int)/*64*/selection.count();
- long /*int*/ [] result = new long /*int*/ [count];
+ int count = (int)selection.count();
+ long [] result = new long [count];
selection.getIndexes(result, count, 0);
- return (int)/*64*/result [0];
+ return (int)result [0];
}
/**
@@ -633,12 +636,12 @@ public int [] getSelectionIndices () {
return new int [0];
}
NSIndexSet selection = widget.selectedRowIndexes();
- int count = (int)/*64*/selection.count();
- long /*int*/ [] indices = new long /*int*/ [count];
+ int count = (int)selection.count();
+ long [] indices = new long [count];
selection.getIndexes(indices, count, 0);
int [] result = new int [count];
for (int i = 0; i < result.length; i++) {
- result [i] = (int)/*64*/indices [i];
+ result [i] = (int)indices [i];
}
return result;
}
@@ -662,9 +665,9 @@ public int getTopIndex () {
NSPoint point = new NSPoint();
point.x = rect.x;
point.y = rect.y;
- int result = (int)/*64*/((NSTableView)view).rowAtPoint(point);
- if (result == -1) result = 0;
- return result;
+ int result = (int)((NSTableView)view).rowAtPoint(point);
+ if (result == -1) result = 0;
+ return result;
}
/**
@@ -748,7 +751,7 @@ public boolean isSelected (int index) {
* clicked-on row ourselves.
*/
@Override
-long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+long menuForEvent(long id, long sel, long theEvent) {
if (display.lastHandledMenuForEventId == theEvent) return 0;
NSEvent event = new NSEvent(theEvent);
NSTableView table = (NSTableView)view;
@@ -758,7 +761,7 @@ long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEve
// select the row that was clicked before showing the menu for the event
NSPoint mousePoint = view.convertPoint_fromView_(event.locationInWindow(), null);
- long /*int*/ row = table.rowAtPoint(mousePoint);
+ long row = table.rowAtPoint(mousePoint);
// figure out if the row that was just clicked on is currently selected
if (selectedRowIndexes.containsIndex(row) == false) {
@@ -773,12 +776,12 @@ long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEve
}
@Override
-void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDownSuper(long id, long sel, long theEvent) {
ignoreSelect = false;
NSTableView widget = (NSTableView)view;
NSEvent nsEvent = new NSEvent(theEvent);
NSPoint pt = view.convertPoint_fromView_(nsEvent.locationInWindow(), null);
- int row = (int)/*64*/widget.rowAtPoint(pt);
+ int row = (int)widget.rowAtPoint(pt);
if (row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0 && nsEvent.clickCount() == 1) {
if (widget.isRowSelected(row) && widget.selectedRowIndexes().count() == 1) {
if (0 <= row && row < itemCount) {
@@ -792,12 +795,12 @@ void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
+boolean needsPanelToBecomeKey (long id, long sel) {
return false;
}
@Override
-long /*int*/ numberOfRowsInTableView(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView) {
+long numberOfRowsInTableView(long id, long sel, long aTableView) {
return itemCount;
}
@@ -933,7 +936,7 @@ public void remove (int [] indices) {
/**
* Removes all of the items from the receiver.
- *
+ *
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
@@ -1142,7 +1145,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
boolean handleMouseDown = true;
if (nsEvent != null) {
- long /*int*/ nsType = nsEvent.type();
+ long nsType = nsEvent.type();
handleMouseDown = nsType == OS.NSLeftMouseDown || nsType == OS.NSLeftMouseUp;
}
if (handleMouseDown) {
@@ -1174,8 +1177,8 @@ void setBackgroundColor(NSColor nsColor) {
@Override
void setFont (NSFont font) {
super.setFont (font);
- double /*float*/ ascent = font.ascender ();
- double /*float*/ descent = -font.descender () + font.leading ();
+ double ascent = font.ascender ();
+ double descent = -font.descender () + font.leading ();
((NSTableView)view).setRowHeight ((int)Math.ceil (ascent + descent) + 1);
setScrollWidth();
}
@@ -1241,7 +1244,7 @@ boolean setScrollWidth (String item) {
cell.setFont (font.handle);
cell.setTitle (NSString.stringWith (item));
NSSize size = cell.cellSize ();
- double /*float*/ oldWidth = column.width ();
+ double oldWidth = column.width ();
if (oldWidth < size.width) {
column.setWidth (size.width);
return true;
@@ -1255,7 +1258,7 @@ boolean setScrollWidth () {
NSCell cell = column.dataCell ();
Font font = this.font != null ? this.font : defaultFont ();
cell.setFont (font.handle);
- double /*float*/ width = 0;
+ double width = 0;
for (int i = 0; i < itemCount; i++) {
cell.setTitle (NSString.stringWith (items[i]));
NSSize size = cell.cellSize ();
@@ -1483,26 +1486,26 @@ public void showSelection () {
}
@Override
-void tableViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewSelectionDidChange (long id, long sel, long aNotification) {
if (didSelect) return;
sendSelection();
}
@Override
-void tableViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewSelectionIsChanging (long id, long sel, long aNotification) {
didSelect = true;
sendSelection();
}
@Override
-long /*int*/ tableView_objectValueForTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
- double /*float*/ [] fg = ((NSTableView)view).isRowSelected(rowIndex) ? null : foreground;
- NSAttributedString attribStr = createString(items[(int)/*64*/rowIndex], null, fg, SWT.LEFT, false, getEnabled(), false);
+long tableView_objectValueForTableColumn_row(long id, long sel, long aTableView, long aTableColumn, long rowIndex) {
+ double [] fg = ((NSTableView)view).isRowSelected(rowIndex) ? null : foreground;
+ NSAttributedString attribStr = createString(items[(int)rowIndex], null, fg, SWT.LEFT, false, getEnabled(), false);
attribStr.autorelease();
return attribStr.id;
}
-long /*int*/ tableView_selectionIndexesForProposedSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ indexSet) {
+long tableView_selectionIndexesForProposedSelection (long id, long sel, long aTableView, long indexSet) {
if ((style & SWT.SINGLE) != 0) {
/*
* Feature in Cocoa. Calling setAllowsEmptySelection will automatically select the first row of the list.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
index 8c7a2538c2..1b13ad200e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
@@ -339,8 +339,8 @@ void createHandle () {
nsMenu = widget;
} else {
nsMenu.retain();
- long /*int*/ cls = OS.object_getClass(nsMenu.id);
- long /*int*/ dynNSMenu_class = display.createMenuSubclass(cls, "SWTSystemMenu", true);
+ long cls = OS.object_getClass(nsMenu.id);
+ long dynNSMenu_class = display.createMenuSubclass(cls, "SWTSystemMenu", true);
if (cls != dynNSMenu_class) {
OS.object_setClass(nsMenu.id, dynNSMenu_class);
}
@@ -365,8 +365,8 @@ void createItem (MenuItem item, int index) {
}
item.nsItem = nsItem;
} else {
- long /*int*/ cls = OS.object_getClass(nsItem.id);
- long /*int*/ dynNSMenuItem_class = display.createMenuItemSubclass(cls, "SWTSystemMenuItem", true);
+ long cls = OS.object_getClass(nsItem.id);
+ long dynNSMenuItem_class = display.createMenuItemSubclass(cls, "SWTSystemMenuItem", true);
if (cls != dynNSMenuItem_class) {
OS.object_setClass(nsItem.id, dynNSMenuItem_class);
}
@@ -388,9 +388,9 @@ void createItem (MenuItem item, int index) {
// Sync native key equivalent to MenuItem's accelerator.
// The system menu on OS X only uses command and option, so it's
// safe to just check for those two key masks.
- long /*int*/ keyMask = nsItem.keyEquivalentModifierMask();
+ long keyMask = nsItem.keyEquivalentModifierMask();
NSString keyEquivString = nsItem.keyEquivalent();
- long /*int*/ keyEquiv = 0;
+ long keyEquiv = 0;
if (keyEquivString != null) {
keyEquiv = keyEquivString.characterAtIndex(0);
if ((keyMask & OS.NSCommandKeyMask) != 0) keyEquiv |= SWT.COMMAND;
@@ -788,7 +788,7 @@ public boolean isVisible () {
}
@Override
-void menu_willHighlightItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menu, long /*int*/ itemID) {
+void menu_willHighlightItem(long id, long sel, long menu, long itemID) {
Widget widget = display.getWidget(itemID);
if (widget instanceof MenuItem) {
MenuItem item = (MenuItem)widget;
@@ -797,24 +797,24 @@ void menu_willHighlightItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menu
}
@Override
-void menuNeedsUpdate(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuNeedsUpdate(long id, long sel, long menu) {
//This code is intentionally commented
//sendEvent (SWT.Show);
}
@Override
-void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuWillOpen(long id, long sel, long menu) {
visible = true;
sendEvent (SWT.Show);
if (isDisposed()) return;
- double /*float*/ width = 0;
+ double width = 0;
NSAttributedString[] strs = new NSAttributedString[itemCount];
for (int i=0; i<itemCount; i++) {
MenuItem item = items [i];
NSMenuItem nsItem = item.nsItem;
strs[i] = nsItem.attributedTitle();
NSImage nsImage = nsItem.image();
- double /*float*/ w = GAP;
+ double w = GAP;
if (strs[i] != null) {
w += strs[i].size().width;
}
@@ -834,7 +834,7 @@ void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
if (length > 1) {
NSMenuItem nsItem = item.nsItem;
NSImage nsImage = nsItem.image();
- double /*float*/ tab = width;
+ double tab = width;
if (nsImage != null) {
tab -= (nsImage.size().width + GAP);
}
@@ -871,7 +871,7 @@ void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
}
@Override
-void menuDidClose(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuDidClose(long id, long sel, long menu) {
sendEvent (SWT.Hide);
if (isDisposed()) return;
visible = false;
@@ -1116,7 +1116,7 @@ public void setLocation (Point location) {
* @since 3.7
*/
public void setOrientation (int orientation) {
- checkWidget ();
+ checkWidget ();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
index 6f4a155a2a..e61f78d165 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
@@ -42,7 +42,7 @@ public class MenuItem extends Item {
NSMenuItem nsItem;
Menu parent, menu;
int accelerator;
- long /*int*/ nsItemAction;
+ long nsItemAction;
id nsItemTarget;
String toolTipText;
@@ -366,7 +366,7 @@ public Menu getParent () {
public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- return nsItem.state() == OS.NSOnState;
+ return nsItem.state() == OS.NSOnState;
}
/**
@@ -688,10 +688,7 @@ public void setID (int id) {
* <p>
* Note: This operation is a <em>HINT</em> and is not supported on
* platforms that do not have this concept (for example, Windows NT).
- * Furthermore, some platforms (such as GTK2), cannot display both
- * a check box and an image at the same time. Instead, they hide
- * the image and display the check box. Some platforms (such as GTK3)
- * support images alongside check boxes.
+ * Some platforms (such as GTK3) support images alongside check boxes.
* </p>
*
* @param image the image to display on the receiver (may be null)
@@ -704,6 +701,7 @@ public void setID (int id) {
@Override
public void setImage (Image image) {
checkWidget ();
+ if (this.image == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
super.setImage (image);
nsItem.setImage(image != null? image.handle : null);
@@ -894,12 +892,12 @@ public void setToolTipText (String toolTip) {
}
if (toolTip == null || toolTip.trim().length() == 0 || toolTip.equals(toolTipText)) return;
- toolTipText = toolTip;
+ toolTipText = toolTip;
- char[] chars = new char [toolTipText.length ()];
- toolTipText.getChars (0, chars.length, chars, 0);
- int length = fixMnemonic (chars);
- nsItem.setToolTip (NSString.stringWithCharacters (chars, length));
+ char[] chars = new char [toolTipText.length ()];
+ toolTipText.getChars (0, chars.length, chars, 0);
+ int length = fixMnemonic (chars);
+ nsItem.setToolTip (NSString.stringWithCharacters (chars, length));
}
void updateText () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
index 021d7e5e14..0cba2bff54 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
@@ -15,6 +15,7 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
+import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cocoa.*;
/**
@@ -41,8 +42,9 @@ import org.eclipse.swt.internal.cocoa.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class MessageBox extends Dialog {
+ Callback callback_completion_handler;
String message = "";
- int returnCode;
+ int userResponse;
/**
* Constructs a new instance of this class given only its parent.
@@ -115,6 +117,12 @@ static int checkStyle (int style) {
return style;
}
+private int getBits () {
+ int mask = (SWT.YES | SWT.NO | SWT.OK | SWT.CANCEL | SWT.ABORT | SWT.RETRY | SWT.IGNORE);
+ int bits = style & mask;
+ return bits;
+}
+
/**
* Returns the dialog's message, or an empty string if it does not have one.
* The message is a description of the purpose for which the dialog was opened.
@@ -141,15 +149,32 @@ public String getMessage () {
public int open () {
NSAlert alert = (NSAlert) new NSAlert().alloc().init();
int alertType = OS.NSInformationalAlertStyle;
- if ((style & SWT.ICON_ERROR) != 0) alertType = OS.NSCriticalAlertStyle;
- if ((style & SWT.ICON_INFORMATION) != 0) alertType = OS.NSInformationalAlertStyle;
- if ((style & SWT.ICON_QUESTION) != 0) alertType = OS.NSInformationalAlertStyle;
- if ((style & SWT.ICON_WARNING) != 0) alertType = OS.NSWarningAlertStyle;
- if ((style & SWT.ICON_WORKING) != 0) alertType = OS.NSInformationalAlertStyle;
+ if ((style & SWT.ICON_ERROR) != 0) {
+ alertType = OS.NSCriticalAlertStyle;
+ }
+ if (((style & SWT.ICON_INFORMATION) != 0) || ((style & SWT.ICON_WORKING) != 0) || ((style & SWT.ICON_QUESTION) != 0)) {
+ alertType = OS.NSInformationalAlertStyle;
+ if (OS.isBigSurOrLater()) {
+ alert.setIcon(NSImage.imageNamed(OS.NSImageNameInfo));
+ } else {
+ NSImage icon = Display.getSystemImageForID(OS.kAlertNoteIcon);
+ alert.setIcon(icon);
+ icon.release();
+ }
+ }
+ if ((style & SWT.ICON_WARNING) != 0) {
+ alertType = OS.NSWarningAlertStyle;
+ if (OS.isBigSurOrLater()) {
+ alert.setIcon(NSImage.imageNamed(OS.NSImageNameCaution));
+ } else {
+ NSImage icon = Display.getSystemImageForID(OS.kAlertCautionIcon);
+ alert.setIcon(icon);
+ icon.release();
+ }
+ }
alert.setAlertStyle(alertType);
- int mask = (SWT.YES | SWT.NO | SWT.OK | SWT.CANCEL | SWT.ABORT | SWT.RETRY | SWT.IGNORE);
- int bits = style & mask;
+ int bits = getBits();
NSString title;
switch (bits) {
case SWT.OK:
@@ -209,8 +234,8 @@ public int open () {
panel.setTitle(title);
NSString message = NSString.stringWith(this.message != null ? this.message : "");
alert.setMessageText(message);
- int response = 0;
- long /*int*/ jniRef = 0;
+
+ long jniRef = 0;
SWTPanelDelegate delegate = null;
Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
if ((style & SWT.SHEET) != 0) {
@@ -218,26 +243,39 @@ public int open () {
jniRef = OS.NewGlobalRef(this);
if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
- alert.beginSheetModalForWindow(parent.view.window (), delegate, OS.sel_panelDidEnd_returnCode_contextInfo_, 0);
display.setModalDialog(this, panel);
+ callback_completion_handler = new Callback(this, "_completionHandler", 1);
+ long handler = callback_completion_handler.getAddress();
+ OS.beginSheetModalForWindow(alert, parent.window, handler);
+
if ((style & SWT.APPLICATION_MODAL) != 0) {
- response = (int)/*64*/alert.runModal();
+ alert.runModal();
} else {
- this.returnCode = 0;
NSWindow window = alert.window();
while (window.isVisible()) {
if (!display.readAndDispatch()) display.sleep();
}
- response = this.returnCode;
}
} else {
display.setModalDialog(this, panel);
- response = (int)/*64*/alert.runModal();
+ int response = (int)alert.runModal();
+ userResponse = handleResponse(bits, response);
}
display.setModalDialog(null);
if (delegate != null) delegate.release();
if (jniRef != 0) OS.DeleteGlobalRef(jniRef);
alert.release();
+ releaseHandler();
+ return userResponse;
+}
+
+long _completionHandler (long result) {
+ NSApplication.sharedApplication().stopModal();
+ userResponse = handleResponse(getBits(), (int)result);
+ return result;
+}
+
+int handleResponse (int bits, int response) {
switch (bits) {
case SWT.OK:
switch (response) {
@@ -311,10 +349,11 @@ public int open () {
return SWT.CANCEL;
}
-void panelDidEnd_returnCode_contextInfo(long /*int*/ id, long /*int*/ sel, long /*int*/ alert, long /*int*/ returnCode, long /*int*/ contextInfo) {
- this.returnCode = (int)/*64*/returnCode;
- NSApplication application = NSApplication.sharedApplication();
- application.endSheet(new NSAlert(alert).window(), returnCode);
+void releaseHandler () {
+ if (callback_completion_handler != null) {
+ callback_completion_handler.dispose();
+ callback_completion_handler = null;
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
index 5b11660327..39b6836c02 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
@@ -117,7 +117,7 @@ NSFont defaultNSFont () {
}
@Override
-void _drawThemeProgressArea (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void _drawThemeProgressArea (long id, long sel, long arg0) {
/*
* Bug in Cocoa. When the threaded animation is turned off by calling
* setUsesThreadedAnimation(), _drawThemeProgressArea() attempts to
@@ -135,7 +135,7 @@ void _drawThemeProgressArea (long /*int*/ id, long /*int*/ sel, long /*int*/ arg
* region of the progress bar before calling super.
*/
if (visiblePath == null) {
- long /*int*/ visibleRegion = getVisibleRegion();
+ long visibleRegion = getVisibleRegion();
visiblePath = getPath(visibleRegion);
OS.DisposeRgn(visibleRegion);
}
@@ -188,7 +188,7 @@ public int getMinimum () {
*/
public int getSelection () {
checkWidget();
- return (int)((NSProgressIndicator)view).doubleValue();
+ return (int)((NSProgressIndicator)view).doubleValue();
}
/**
@@ -329,7 +329,7 @@ void resetVisibleRegion () {
}
@Override
-void viewDidMoveToWindow(long /*int*/ id, long /*int*/ sel) {
+void viewDidMoveToWindow(long id, long sel) {
/*
* Bug in Cocoa. An indeterminate progress indicator doesn't start animating until it is in
* a visible window. Workaround is to catch when the bar has been added to a window and start
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
index add19e25fb..29ad16ad69 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
@@ -85,7 +85,7 @@ public Sash (Composite parent, int style) {
}
@Override
-long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityAttributeNames(long id, long sel) {
if (accessibilityAttributes == null) {
NSMutableArray ourAttributes = NSMutableArray.arrayWithCapacity(10);
ourAttributes.addObject(OS.NSAccessibilityRoleAttribute);
@@ -113,7 +113,7 @@ long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
- for (int i = (int)/*64*/extraAttributes.count() - 1; i >= 0; i--) {
+ for (int i = (int)extraAttributes.count() - 1; i >= 0; i--) {
NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) != null) {
ourAttributes.addObject(extraAttributes.objectAtIndex(i));
@@ -129,8 +129,8 @@ long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
- long /*int*/ returnValue = 0;
+long accessibilityAttributeValue(long id, long sel, long arg0) {
+ long returnValue = 0;
NSString attributeName = new NSString(arg0);
if (accessible != null) {
@@ -160,7 +160,7 @@ long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long
return NSNumber.numberWithInt(value).id;
} else if (attributeName.isEqualToString (OS.NSAccessibilityMaxValueAttribute)) {
NSRect parentFrame = parent.topView().frame();
- double /*float*/ maxValue = (style & SWT.VERTICAL) != 0 ?
+ double maxValue = (style & SWT.VERTICAL) != 0 ?
parentFrame.width :
parentFrame.height;
return NSNumber.numberWithDouble(maxValue).id;
@@ -204,7 +204,7 @@ long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long
}
@Override
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
return false;
}
@@ -250,7 +250,7 @@ static int checkStyle (int style) {
}
@Override
-boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean becomeFirstResponder (long id, long sel) {
boolean result = super.becomeFirstResponder(id, sel);
NSRect frame = view.frame();
lastX = (int)frame.x;
@@ -281,7 +281,7 @@ void createHandle () {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -308,7 +308,7 @@ boolean sendKeyEvent(NSEvent nsEvent, int type) {
case 124: /* Right arrow */ {
int xChange = 0, yChange = 0;
int stepSize = PAGE_INCREMENT;
- long /*int*/ modifiers = nsEvent.modifierFlags();
+ long modifiers = nsEvent.modifierFlags();
if ((modifiers & OS.NSControlKeyMask) != 0) stepSize = INCREMENT;
if ((style & SWT.VERTICAL) != 0) {
if (keyCode == 126 || keyCode == 125) break;
@@ -359,7 +359,7 @@ boolean sendKeyEvent(NSEvent nsEvent, int type) {
}
@Override
-void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown(long id, long sel, long theEvent) {
//TODO use sendMouseEvent
super.mouseDown(id, sel, theEvent);
if (isDisposed()) return;
@@ -386,13 +386,13 @@ void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-boolean mouseEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent, int type) {
+boolean mouseEvent (long id, long sel, long theEvent, int type) {
super.mouseEvent (id, sel, theEvent, type);
return new NSEvent (theEvent).type () != OS.NSLeftMouseDown;
}
@Override
-void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDragged(long id, long sel, long theEvent) {
//TODO use sendMouseEvent
super.mouseDragged(id, sel, theEvent);
if (isDisposed()) return;
@@ -424,7 +424,7 @@ void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseUp(long id, long sel, long theEvent) {
//TODO use sendMouseEvent
super.mouseUp(id, sel, theEvent);
if (isDisposed()) return;
@@ -483,11 +483,11 @@ public void removeSelectionListener(SelectionListener listener) {
}
@Override
-void superKeyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void superKeyDown (long id, long sel, long theEvent) {
}
@Override
-void superKeyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void superKeyUp (long id, long sel, long theEvent) {
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
index f3b3cd1931..7e5d6cef36 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
@@ -117,7 +117,7 @@ static int checkStyle (int style) {
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
NSSlider widget = (NSSlider)view;
- double /*float*/ thickness = widget.knobThickness();
+ double thickness = widget.knobThickness();
int width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT;
if ((style & SWT.HORIZONTAL) != 0) {
height = (int)Math.ceil(thickness);
@@ -216,7 +216,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget();
- return pageIncrement;
+ return pageIncrement;
}
/**
@@ -231,7 +231,7 @@ public int getPageIncrement () {
*/
public int getSelection () {
checkWidget();
- return (int)((NSSlider)view).doubleValue();
+ return (int)((NSSlider)view).doubleValue();
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
index b109579866..e5659be461 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
@@ -93,7 +93,7 @@ public class ScrollBar extends Widget {
int increment = 1;
int pageIncrement = 10;
id target;
- long /*int*/ actionSelector;
+ long actionSelector;
ScrollBar () {
/* Do nothing */
@@ -188,7 +188,7 @@ public boolean getEnabled () {
*/
public int getIncrement () {
checkWidget();
- return increment;
+ return increment;
}
/**
@@ -235,7 +235,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget();
- return pageIncrement;
+ return pageIncrement;
}
/**
@@ -267,7 +267,7 @@ public int getSelection () {
checkWidget();
NSScroller widget = (NSScroller)view;
double value = widget.doubleValue();
- return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
+ return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
}
/**
@@ -482,7 +482,7 @@ void sendSelection () {
} else {
point = window.mouseLocationOutsideOfEventStream();
}
- int hitPart = (int)/*64*/((NSScroller)view).testPart(point);
+ int hitPart = (int)((NSScroller)view).testPart(point);
Event event = new Event();
switch (hitPart) {
case OS.NSScrollerDecrementLine:
@@ -743,12 +743,12 @@ void updateBar (int selection, int minimum, int maximum, int thumb) {
float fraction = range <= 0 ? 1 : (float) (selection - minimum) / range;
float knob = range <= 0 ? 1 : (float) thumb / (maximum - minimum);
double oldFraction = widget.doubleValue();
- double /*float*/ oldKnob = widget.knobProportion();
+ double oldKnob = widget.knobProportion();
widget.setDoubleValue(fraction);
widget.setKnobProportion(knob);
widget.setEnabled (range > 0);
- if (OS.VERSION >= 0x1070 && target == null && (knob != oldKnob || fraction != oldFraction)) {
- OS.objc_msgSend(parent.scrollView.id, OS.sel_flashScrollers);
+ if (target == null && (knob != oldKnob || fraction != oldFraction)) {
+ parent.scrollView.flashScrollers();
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
index 453b1bfd05..c2fac26d1a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
@@ -36,7 +36,7 @@ import org.eclipse.swt.internal.cocoa.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public abstract class Scrollable extends Control {
- NSScrollView scrollView;
+ NSScrollView scrollView;
ScrollBar horizontalBar, verticalBar;
Scrollable () {
@@ -110,17 +110,11 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
size.width = width;
size.height = height;
int border = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder;
- if (OS.VERSION >= 0x1070) {
- // Always include the scroll bar in the trim even when the scroll style is overlay
- OS.objc_msgSend_stret(size, OS.class_NSScrollView,
- OS.sel_frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle_,
- size,
- (style & SWT.H_SCROLL) != 0 ? OS.class_NSScroller : 0,
- (style & SWT.V_SCROLL) != 0 ? OS.class_NSScroller : 0,
- border, OS.NSRegularControlSize, OS.NSScrollerStyleLegacy);
- } else {
- size = NSScrollView.frameSizeForContentSize(size, (style & SWT.H_SCROLL) != 0, (style & SWT.V_SCROLL) != 0, border);
- }
+ // Always include the scroll bar in the trim even when the scroll style is overlay
+ size = NSScrollView.frameSizeForContentSize(size,
+ (style & SWT.H_SCROLL) != 0 ? OS.class_NSScroller : 0,
+ (style & SWT.V_SCROLL) != 0 ? OS.class_NSScroller : 0,
+ border, OS.NSRegularControlSize, OS.NSScrollerStyleLegacy);
width = (int)size.width;
height = (int)size.height;
NSRect frame = scrollView.contentView().frame();
@@ -137,7 +131,7 @@ ScrollBar createScrollBar (int style) {
bar.style = style;
bar.display = display;
NSScroller scroller;
- long /*int*/ actionSelector;
+ long actionSelector;
NSRect rect = new NSRect();
if ((style & SWT.H_SCROLL) != 0) {
rect.width = 1;
@@ -250,8 +244,8 @@ public ScrollBar getHorizontalBar () {
public int getScrollbarsMode () {
checkWidget();
int style = SWT.NONE;
- if (scrollView != null && OS.VERSION >= 0x1070) {
- if (OS.objc_msgSend (scrollView.id, OS.sel_scrollerStyle) == OS.NSScrollerStyleOverlay) {
+ if (scrollView != null) {
+ if (scrollView.scrollerStyle () == OS.NSScrollerStyleOverlay) {
style = SWT.SCROLLBAR_OVERLAY;
}
}
@@ -279,7 +273,7 @@ boolean hooksKeys () {
}
@Override
-boolean isEventView (long /*int*/ id) {
+boolean isEventView (long id) {
return id == eventView ().id;
}
@@ -307,7 +301,7 @@ void redrawBackgroundImage () {
}
@Override
-void reflectScrolledClipView(long /*int*/ id, long /*int*/ sel, long /*int*/ aClipView) {
+void reflectScrolledClipView(long id, long sel, long aClipView) {
super.reflectScrolledClipView(id, sel, aClipView);
redrawBackgroundImage();
}
@@ -346,7 +340,7 @@ void reskinChildren (int flags) {
}
@Override
-void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
+void scrollClipViewToPoint (long id, long sel, long clipView, NSPoint point) {
if ((state & CANVAS) == 0 && scrollView != null) {
NSClipView clip = new NSClipView (clipView);
boolean oldCopies = clip.copiesOnScroll (), copies = oldCopies;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
index 3427209b4c..00ec23d39b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
@@ -124,9 +124,9 @@ import org.eclipse.swt.internal.cocoa.*;
public class Shell extends Decorations {
NSWindow window;
SWTWindowDelegate windowDelegate;
- long /*int*/ hostWindowClass;
+ long hostWindowClass;
NSWindow hostWindow;
- long /*int*/ tooltipOwner, tooltipTag, tooltipUserData;
+ long tooltipOwner, tooltipTag, tooltipUserData;
int glContextCount;
boolean opened, moved, resized, fullScreen, center, deferFlushing, scrolling, isPopup;
Control lastActive;
@@ -271,7 +271,7 @@ public Shell (Display display, int style) {
this (display, null, style, 0, false);
}
-Shell (Display display, Shell parent, int style, long /*int*/handle, boolean embedded) {
+Shell (Display display, Shell parent, int style, long handle, boolean embedded) {
super ();
checkSubclass ();
if (display == null) display = Display.getCurrent ();
@@ -398,7 +398,7 @@ public Shell (Shell parent, int style) {
*
* @since 3.3
*/
-public static Shell internal_new (Display display, long /*int*/ handle) {
+public static Shell internal_new (Display display, long handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, false);
}
@@ -422,7 +422,7 @@ public static Shell internal_new (Display display, long /*int*/ handle) {
*
* @since 3.5
*/
-public static Shell cocoa_new (Display display, long /*int*/ handle) {
+public static Shell cocoa_new (Display display, long handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, true);
}
@@ -453,7 +453,7 @@ static int checkStyle (Shell parent, int style) {
}
@Override
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
// The content view of a shell is always ignored.
if (id == view.id) return true;
return super.accessibilityIsIgnored(id, sel);
@@ -491,12 +491,12 @@ public void addShellListener(ShellListener listener) {
void attachObserversToWindow(NSWindow newWindow) {
if (newWindow == null || newWindow.id == 0) return;
- long /*int*/ newHostWindowClass = OS.object_getClass(newWindow.id);
- long /*int*/ sendEventImpl = OS.class_getMethodImplementation(newHostWindowClass, OS.sel_sendEvent_);
+ long newHostWindowClass = OS.object_getClass(newWindow.id);
+ long sendEventImpl = OS.class_getMethodImplementation(newHostWindowClass, OS.sel_sendEvent_);
if (sendEventImpl == Display.windowCallback3.getAddress()) return;
hostWindow = newWindow;
hostWindow.retain();
- long /*int*/ embeddedSubclass = display.createWindowSubclass(newHostWindowClass, "SWTAWTWindow", true);
+ long embeddedSubclass = display.createWindowSubclass(newHostWindowClass, "SWTAWTWindow", true);
OS.object_setClass(hostWindow.id, embeddedSubclass);
display.addWidget (hostWindow, this);
hostWindowClass = newHostWindowClass;
@@ -522,7 +522,7 @@ void attachObserversToWindow(NSWindow newWindow) {
}
@Override
-void becomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
+void becomeKeyWindow (long id, long sel) {
Shell modal = getModalShell();
if (modal != null && modal.window != null) {
modal.window.makeKeyAndOrderFront(null);
@@ -546,7 +546,7 @@ void bringToTop (boolean force) {
}
@Override
-boolean canBecomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
+boolean canBecomeKeyWindow (long id, long sel) {
if (isPopup) return false;
// Only answer if SWT created the window.
if (window != null) {
@@ -560,7 +560,7 @@ boolean canBecomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
}
}
}
- long /*int*/ styleMask = window.styleMask();
+ long styleMask = window.styleMask();
if (styleMask == OS.NSBorderlessWindowMask || (styleMask & (OS.NSNonactivatingPanelMask | OS.NSDocModalWindowMask | OS.NSResizableWindowMask)) != 0) return true;
}
return super.canBecomeKeyWindow (id, sel);
@@ -592,7 +592,7 @@ void center () {
}
@Override
-void clearDeferFlushing (long /*int*/ id, long /*int*/ sel) {
+void clearDeferFlushing (long id, long sel) {
deferFlushing = false;
scrolling = false;
if (window != null) window.flushWindowIfNeeded();
@@ -648,7 +648,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
rect.height = trim.height;
if (window != null) {
if (!_getFullScreen() && !fixResize()) {
- double /*float*/ h = rect.height;
+ double h = rect.height;
rect = window.frameRectForContentRect(rect);
rect.y += h-rect.height;
}
@@ -668,9 +668,9 @@ void createHandle () {
} else {
styleMask |= OS.NSUtilityWindowMask | OS.NSNonactivatingPanelMask;
}
- } else {
- window = (NSWindow) new SWTWindow().alloc ();
- }
+ } else {
+ window = (NSWindow) new SWTWindow().alloc ();
+ }
if ((style & SWT.NO_TRIM) == 0) {
if ((style & SWT.TITLE) != 0) styleMask |= OS.NSTitledWindowMask;
if ((style & SWT.CLOSE) != 0) styleMask |= OS.NSClosableWindowMask;
@@ -686,7 +686,7 @@ void createHandle () {
if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0 || (style & (SWT.TOOL | SWT.SHEET)) != 0) {
window.setHasShadow (true);
}
- if ((style & SWT.NO_MOVE) != 0 && (OS.VERSION_MMB >= OS.VERSION_MMB(10, 6, 0))) {
+ if ((style & SWT.NO_MOVE) != 0) {
window.setMovable(false);
}
if ((style & SWT.TOOL) != 0) {
@@ -710,7 +710,7 @@ void createHandle () {
OS.objc_msgSend(window.id, OS.sel_setMovable_, 0);
}
}
- if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 12, 0)) {
+ if (OS.VERSION >= OS.VERSION(10, 12, 0)) {
/*
* In macOS 10.12, a new system preference "prefer tabs when opening documents"
* has been added which causes automatic tabbing of windows in Eclipse.
@@ -721,7 +721,7 @@ void createHandle () {
}
display.cascadeWindow(window, screen);
NSRect screenFrame = screen.frame();
- double /*float*/ width = screenFrame.width * 5 / 8, height = screenFrame.height * 5 / 8;;
+ double width = screenFrame.width * 5 / 8, height = screenFrame.height * 5 / 8;;
NSRect frame = window.frame();
NSRect primaryFrame = primaryScreen.frame();
frame.y = primaryFrame.height - ((primaryFrame.height - (frame.y + frame.height)) + height);
@@ -766,28 +766,19 @@ void createHandle () {
NSWindow hostWindow = view.window();
attachObserversToWindow(hostWindow);
} else {
- int behavior = 0;
- if (parent != null) behavior |= OS.NSWindowCollectionBehaviorMoveToActiveSpace;
- if (OS.VERSION >= 0x1070) {
- if (parent == null) {
- if ((style & SWT.TOOL) != 0) {
- behavior = OS.NSWindowCollectionBehaviorFullScreenAuxiliary;
- } else {
- behavior = OS.NSWindowCollectionBehaviorFullScreenPrimary;
- }
- }
+ int behavior;
+ if (parent != null) {
+ behavior = OS.NSWindowCollectionBehaviorMoveToActiveSpace;
+ } else if ((style & SWT.TOOL) != 0) {
+ behavior = OS.NSWindowCollectionBehaviorFullScreenAuxiliary;
+ } else {
+ behavior = OS.NSWindowCollectionBehaviorFullScreenPrimary;
}
- if (behavior != 0) window.setCollectionBehavior(behavior);
+ window.setCollectionBehavior(behavior);
window.setAcceptsMouseMovedEvents(true);
window.setDelegate(windowDelegate);
}
- if (OS.VERSION < 0x1060) {
- // Force a WindowRef to be created for this window so we can use
- // FindWindow() (see Display.findControl())
- if (window != null) window.windowRef();
- }
-
NSWindow fieldEditorWindow = window;
if (fieldEditorWindow == null) fieldEditorWindow = view.window();
id id = fieldEditorWindow.fieldEditor (true, null);
@@ -842,7 +833,7 @@ void destroyWidget () {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
if (regionPath != null && background == null) {
context.saveGraphicsState();
@@ -945,7 +936,7 @@ public Rectangle getBounds () {
checkWidget();
if (window != null) {
NSRect frame = window.frame();
- double /*float*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
+ double y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
return new Rectangle ((int)frame.x, (int)y, (int)frame.width, (int)frame.height);
} else {
NSRect frame = view.frame();
@@ -1041,7 +1032,7 @@ public Point getLocation () {
if (window != null) {
NSRect frame = window.frame();
- double /*float*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
+ double y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
return new Point ((int)frame.x, (int)y);
} else {
// Start from view's origin, (0, 0)
@@ -1118,6 +1109,28 @@ public boolean getMinimized () {
}
/**
+ * Returns a point describing the maximum receiver's size. The
+ * x coordinate of the result is the maximum width of the receiver.
+ * The y coordinate of the result is the maximum height of the
+ * receiver.
+ *
+ * @return the receiver's size
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public Point getMaximumSize () {
+ checkWidget();
+ if (window == null) return new Point(0, 0);
+ NSSize size = window.maxSize();
+ return new Point((int)size.width, (int)size.height);
+}
+
+/**
* Returns a point describing the minimum receiver's size. The
* x coordinate of the result is the minimum width of the receiver.
* The y coordinate of the result is the minimum height of the
@@ -1178,25 +1191,25 @@ public Shell getShell () {
* </ul>
*/
public Shell [] getShells () {
- checkWidget();
+ checkWidget ();
int count = 0;
Shell [] shells = display.getShells ();
- for (int i=0; i<shells.length; i++) {
- Control shell = shells [i];
+ for (Shell activeshell : shells) {
+ Control shell = activeshell;
do {
- shell = shell.parent;
+ shell = shell.getParent ();
} while (shell != null && shell != this);
if (shell == this) count++;
}
int index = 0;
Shell [] result = new Shell [count];
- for (int i=0; i<shells.length; i++) {
- Control shell = shells [i];
+ for (Shell activeshell : shells) {
+ Control shell = activeshell;
do {
- shell = shell.parent;
+ shell = shell.getParent ();
} while (shell != null && shell != this);
if (shell == this) {
- result [index++] = shells [i];
+ result [index++] = activeshell;
}
}
return result;
@@ -1249,7 +1262,7 @@ boolean hasRegion () {
}
@Override
-void helpRequested(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void helpRequested(long id, long sel, long theEvent) {
Control control = display.getFocusControl();
while (control != null) {
if (control.hooks (SWT.Help)) {
@@ -1300,7 +1313,7 @@ public boolean isVisible () {
}
@Override
-boolean makeFirstResponder (long /*int*/ id, long /*int*/ sel, long /*int*/ responder) {
+boolean makeFirstResponder (long id, long sel, long responder) {
Display display = this.display;
boolean result = super.makeFirstResponder(id, sel, responder);
if (!display.isDisposed()) display.checkFocus();
@@ -1325,7 +1338,7 @@ void makeKeyAndOrderFront() {
}
@Override
-void mouseMoved(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseMoved(long id, long sel, long theEvent) {
super.mouseMoved(id, sel, theEvent);
/**
@@ -1341,7 +1354,7 @@ void mouseMoved(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void noResponderFor(long /*int*/ id, long /*int*/ sel, long /*int*/ selector) {
+void noResponderFor(long id, long sel, long selector) {
/**
* Feature in Cocoa. If the selector is keyDown and nothing has handled the event
* a system beep is generated. There's no need to beep, as many keystrokes in the SWT
@@ -1543,7 +1556,7 @@ void sendToolTipEvent (boolean enter) {
if (userInfo != null) {
tooltipUserData = userInfo.id;
} else {
- long /*int*/ [] value = new long /*int*/ [1];
+ long [] value = new long [1];
OS.object_getInstanceVariable(tooltipTag, new byte[]{'_','u', 's', 'e', 'r', 'I', 'n', 'f', 'o'}, value);
tooltipUserData = value[0];
}
@@ -1731,8 +1744,9 @@ public void setEnabled (boolean enabled) {
* to either the maximized or normal states.
* <p>
* Note: The result of intermixing calls to <code>setFullScreen(true)</code>,
- * <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will
- * vary by platform. Typically, the behavior will match the platform user's
+ * <code>setMaximized(true)</code>, <code>setMinimized(true)</code> and
+ * <code>setMaximumSize</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
* expectations, but not always. This should be avoided if possible.
* </p>
*
@@ -1751,7 +1765,7 @@ public void setFullScreen (boolean fullScreen) {
if (_getFullScreen () == fullScreen) return;
if ((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) != 0) {
- OS.objc_msgSend(window.id, OS.sel_toggleFullScreen_, 0);
+ window.toggleFullScreen(Display.applicationDelegate);
return;
}
@@ -1766,7 +1780,7 @@ public void setFullScreen (boolean fullScreen) {
fullScreenFrame = NSScreen.mainScreen().frame();
if (getMonitor().equals(display.getPrimaryMonitor ())) {
if (menuBar != null) {
- double /*float*/ menuBarHt = NSStatusBar.systemStatusBar().thickness();
+ double menuBarHt = NSStatusBar.systemStatusBar().thickness();
fullScreenFrame.height -= menuBarHt;
OS.SetSystemUIMode(OS.kUIModeContentHidden, 0);
}
@@ -1827,6 +1841,69 @@ public void setMaximized (boolean maximized) {
window.zoom (null);
}
+/**
+ * Sets the receiver's maximum size to the size specified by the arguments.
+ * If the new maximum size is smaller than the current size of the receiver,
+ * the receiver is resized to the new maximum size.
+ * <p>
+ * Note: The result of intermixing calls to <code>setMaximumSize</code> and
+ * <code>setFullScreen(true)</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
+ * expectations, but not always. This should be avoided if possible.
+ * </p>
+ * @param width the new maximum width for the receiver
+ * @param height the new maximum height for the receiver
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public void setMaximumSize (int width, int height) {
+ checkWidget();
+ if (window == null) return;
+ NSSize size = new NSSize();
+ size.width = width;
+ size.height = height;
+ window.setMaxSize(size);
+ NSRect frame = window.frame();
+ if (width < frame.width || height < frame.height) {
+ width = (int)(width < frame.width ? width : frame.width);
+ height = (int)(height < frame.height ? height : frame.height);
+ setBounds(0, 0, width, height, false, true);
+ }
+}
+
+/**
+ * Sets the receiver's maximum size to the size specified by the argument.
+ * If the new maximum size is smaller than the current size of the receiver,
+ * the receiver is resized to the new maximum size.
+ * <p>
+ * Note: The result of intermixing calls to <code>setMaximumSize</code> and
+ * <code>setFullScreen(true)</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
+ * expectations, but not always. This should be avoided if possible.
+ * </p>
+ * @param size the new maximum size for the receiver
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the point is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public void setMaximumSize (Point size) {
+ checkWidget();
+ if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
+ setMaximumSize (size.x, size.y);
+}
+
@Override
public void setMinimized (boolean minimized) {
checkWidget();
@@ -2018,9 +2095,6 @@ void setWindowVisible (boolean visible, boolean key) {
if ((style & (SWT.SHEET)) != 0) {
NSApplication application = NSApplication.sharedApplication();
application.beginSheet(window, parentWindow (), null, 0, 0);
- if (OS.VERSION <= 0x1060 && window.respondsToSelector(OS.sel__setNeedsToUseHeartBeatWindow_)) {
- OS.objc_msgSend(window.id, OS.sel__setNeedsToUseHeartBeatWindow_, 0);
- }
} else {
// If the parent window is miniaturized, the window will be shown
// when its parent is shown.
@@ -2151,7 +2225,7 @@ void updateParent (boolean visible) {
*/
if ((style & SWT.ON_TOP) != 0) {
window.setLevel(OS.NSStatusWindowLevel);
- } else if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 11, 0)) {
+ } else if (OS.VERSION >= OS.VERSION(10, 11, 0)) {
/*
* Feature in Cocoa on 10.11: Second-level child windows of
* a full-screen window are sometimes shown behind their
@@ -2204,7 +2278,7 @@ void updateSystemUIMode () {
}
@Override
-long /*int*/ view_stringForToolTip_point_userData (long /*int*/ id, long /*int*/ sel, long /*int*/ view, long /*int*/ tag, long /*int*/ point, long /*int*/ userData) {
+long view_stringForToolTip_point_userData (long id, long sel, long view, long tag, long point, long userData) {
NSPoint pt = new NSPoint();
OS.memmove (pt, point, NSPoint.sizeof);
Control control = display.findControl (false);
@@ -2219,9 +2293,9 @@ long /*int*/ view_stringForToolTip_point_userData (long /*int*/ id, long /*int*/
}
@Override
-void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ newWindow) {
+void viewWillMoveToWindow(long id, long sel, long newWindow) {
if (window == null) {
- long /*int*/ currentWindow = hostWindow != null ? hostWindow.id : 0;
+ long currentWindow = hostWindow != null ? hostWindow.id : 0;
if (currentWindow != 0) {
removeObserversFromWindow();
}
@@ -2232,7 +2306,7 @@ void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ newWin
}
@Override
-void windowDidBecomeKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidBecomeKey(long id, long sel, long notification) {
if (window != null) {
Display display = this.display;
display.setMenuBar (menuBar);
@@ -2258,25 +2332,25 @@ void windowDidBecomeKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notifica
}
@Override
-void windowDidDeminiturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidDeminiturize(long id, long sel, long notification) {
minimized = false;
sendEvent(SWT.Deiconify);
}
@Override
-void windowDidMiniturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidMiniturize(long id, long sel, long notification) {
minimized = true;
sendEvent(SWT.Iconify);
}
@Override
-void windowDidMove(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidMove(long id, long sel, long notification) {
moved = true;
sendEvent(SWT.Move);
}
@Override
-void windowDidResize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidResize(long id, long sel, long notification) {
if (((window.collectionBehavior() & OS.NSWindowCollectionBehaviorFullScreenPrimary) == 0) && fullScreen) {
window.setFrame(fullScreenFrame, true);
NSRect contentViewFrame = new NSRect();
@@ -2299,7 +2373,7 @@ void windowDidResize(long /*int*/ id, long /*int*/ sel, long /*int*/ notificatio
}
@Override
-void windowDidResignKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidResignKey(long id, long sel, long notification) {
if (display.isDisposed()) return;
sendEvent (SWT.Deactivate);
if (isDisposed ()) return;
@@ -2309,9 +2383,9 @@ void windowDidResignKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notifica
}
@Override
-void windowSendEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void windowSendEvent (long id, long sel, long event) {
NSEvent nsEvent = new NSEvent (event);
- int type = (int)/*64*/nsEvent.type ();
+ int type = (int)nsEvent.type ();
switch (type) {
case OS.NSLeftMouseDown:
case OS.NSRightMouseDown:
@@ -2392,7 +2466,7 @@ void windowSendEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
NSString chars = nsEvent.characters();
if (chars != null && chars.length() == 1) {
- int firstChar = (int)/*64*/chars.characterAtIndex(0);
+ int firstChar = (int)chars.characterAtIndex(0);
// Shift-tab appears as control-Y.
switch (firstChar) {
@@ -2440,13 +2514,13 @@ private boolean searchForEscMenuItem(Menu menu) {
}
@Override
-boolean windowShouldClose(long /*int*/ id, long /*int*/ sel, long /*int*/ window) {
+boolean windowShouldClose(long id, long sel, long window) {
if (isEnabled()) closeWidget (false);
return false;
}
@Override
-void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowWillClose(long id, long sel, long notification) {
closeWidget(true);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java
index bdfd79199f..fda67becd0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java
@@ -225,7 +225,7 @@ void enableWidget(boolean enabled) {
*/
public int getIncrement () {
checkWidget();
- return increment;
+ return increment;
}
/**
@@ -255,7 +255,7 @@ public int getMaximum () {
*/
public int getMinimum () {
checkWidget();
- return minimum;
+ return minimum;
}
/**
@@ -272,7 +272,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget();
- return pageIncrement;
+ return pageIncrement;
}
/**
@@ -289,7 +289,7 @@ public int getSelection () {
checkWidget();
NSScroller widget = (NSScroller)view;
double value = widget.doubleValue();
- return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
+ return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
}
/**
@@ -304,7 +304,7 @@ public int getSelection () {
*/
public int getThumb () {
checkWidget();
- return thumb;
+ return thumb;
}
/**
@@ -335,28 +335,28 @@ public void removeSelectionListener(SelectionListener listener) {
@Override
void sendSelection () {
Event event = new Event();
- int hitPart = (int)/*64*/((NSScroller)view).hitPart();
+ int hitPart = (int)((NSScroller)view).hitPart();
int value = getSelection ();
switch (hitPart) {
- case OS.NSScrollerDecrementLine:
- event.detail = SWT.ARROW_UP;
- value -= increment;
- break;
- case OS.NSScrollerDecrementPage:
- value -= pageIncrement;
- event.detail = SWT.PAGE_UP;
- break;
- case OS.NSScrollerIncrementLine:
- value += increment;
- event.detail = SWT.ARROW_DOWN;
- break;
- case OS.NSScrollerIncrementPage:
- value += pageIncrement;
- event.detail = SWT.PAGE_DOWN;
- break;
- case OS.NSScrollerKnob:
+ case OS.NSScrollerDecrementLine:
+ event.detail = SWT.ARROW_UP;
+ value -= increment;
+ break;
+ case OS.NSScrollerDecrementPage:
+ value -= pageIncrement;
+ event.detail = SWT.PAGE_UP;
+ break;
+ case OS.NSScrollerIncrementLine:
+ value += increment;
+ event.detail = SWT.ARROW_DOWN;
+ break;
+ case OS.NSScrollerIncrementPage:
+ value += pageIncrement;
+ event.detail = SWT.PAGE_DOWN;
+ break;
+ case OS.NSScrollerKnob:
event.detail = SWT.DRAG;
- break;
+ break;
}
if (event.detail != SWT.DRAG) {
setSelection(value);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
index da70256d26..ad1dc2262c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
@@ -103,13 +103,13 @@ public Spinner (Composite parent, int style) {
}
@Override
-boolean acceptsFirstResponder(long /*int*/ id, long /*int*/ sel) {
+boolean acceptsFirstResponder(long id, long sel) {
if (id == view.id) return false;
return super.acceptsFirstResponder (id, sel);
}
@Override
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
if (id == view.id) return true;
return super.accessibilityIsIgnored(id, sel);
}
@@ -217,14 +217,14 @@ protected void checkSubclass () {
@Override
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
- double /*float*/ width = 0, height = 0;
+ double width = 0, height = 0;
String string = Double.toString (buttonView.maxValue ());
Font font = Font.cocoa_new(display, textView.font ());
NSAttributedString str = parent.createString(string, font, null, 0, false, true, false);
NSSize size = str.size ();
str.release ();
- width = (float)/*64*/size.width;
- height = (float)/*64*/size.height;
+ width = (float)size.width;
+ height = (float)size.height;
if (wHint != SWT.DEFAULT) width = wHint;
if (hHint != SWT.DEFAULT) height = hHint;
Rectangle trim = computeTrim (0, 0, (int)Math.ceil (width), (int)Math.ceil (height));
@@ -244,7 +244,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
height += frameRect.height - cellRect.height;
width += GAP;
NSSize size = buttonView.cell ().cellSize ();
- width += (int)/*64*/size.width;
+ width += (int)size.width;
return new Rectangle (x, y, width, height);
}
@@ -348,7 +348,7 @@ void deregister () {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (backgroundImage == null) return;
if (new NSView(id).isKindOfClass(OS.class_NSText)) {
NSText text = new NSText(id);
@@ -358,13 +358,13 @@ void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
}
@Override
-void drawInteriorWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ viewid) {
+void drawInteriorWithFrame_inView(long id, long sel, NSRect cellFrame, long viewid) {
Control control = findBackgroundControl();
if (control == null) control = this;
Image image = control.backgroundImage;
if (image != null && !image.isDisposed()) {
NSGraphicsContext context = NSGraphicsContext.currentContext();
- control.fillBackground (view, context, cellFrame, -1);
+ control.fillBackground (view, context, cellFrame, -1);
}
super.drawInteriorWithFrame_inView(id, sel, cellFrame, viewid);
}
@@ -372,7 +372,10 @@ void drawInteriorWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cell
@Override
Cursor findCursor () {
Cursor cursor = super.findCursor ();
- return (cursor != null || (style & SWT.READ_ONLY) != 0) ? cursor : display.getSystemCursor (SWT.CURSOR_IBEAM);
+ if (cursor == null && (style & SWT.READ_ONLY) == 0 && OS.VERSION < OS.VERSION(10, 14, 0)) {
+ cursor = display.getSystemCursor (SWT.CURSOR_IBEAM);
+ }
+ return cursor;
}
@Override
@@ -551,18 +554,18 @@ public String getText () {
*/
public int getTextLimit () {
checkWidget();
- return textLimit;
+ return textLimit;
}
@Override
-boolean handleIsAccessible(long /*int*/ id) {
+boolean handleIsAccessible(long id) {
// All subviews of a Spinner can have their accessible properties overridden.
// The top-level NSView is already ignored, so we don't need to test for that.
return true;
}
@Override
-boolean isEventView (long /*int*/ id) {
+boolean isEventView (long id) {
return true;
}
@@ -725,39 +728,39 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
return true;
}
- case 116: delta = pageIncrement; break; /* Page Up */
- case 121: delta = -pageIncrement; break; /* Page Down */
- case 125: delta = -getIncrement(); break; /* Down arrow */
- case 126: delta = getIncrement(); break; /* Up arrow */
- }
-
- if (delta != 0) {
- boolean [] parseFail = new boolean [1];
- int value = getSelectionText (parseFail);
- if (parseFail [0]) {
- value = (int)buttonView.doubleValue();
- }
- int newValue = value + delta;
- int max = (int)buttonView.maxValue();
- int min = (int)buttonView.minValue();
- if ((style & SWT.WRAP) != 0) {
- if (newValue > max) newValue = min;
- if (newValue < min) newValue = max;
- }
- newValue = Math.min (Math.max (min, newValue), max);
- if (value != newValue) setSelection (newValue, true, true, true);
- // Prevent the arrow or page up/down from being handled by the text field.
- result = false;
- } else {
- boolean [] parseFail = new boolean [1];
- int value = getSelectionText (parseFail);
- if (!parseFail [0]) {
- int pos = (int)buttonView.doubleValue();
- if (pos != value) setSelection (value, true, false, true);
- }
- }
-
- return result;
+ case 116: delta = pageIncrement; break; /* Page Up */
+ case 121: delta = -pageIncrement; break; /* Page Down */
+ case 125: delta = -getIncrement(); break; /* Down arrow */
+ case 126: delta = getIncrement(); break; /* Up arrow */
+ }
+
+ if (delta != 0) {
+ boolean [] parseFail = new boolean [1];
+ int value = getSelectionText (parseFail);
+ if (parseFail [0]) {
+ value = (int)buttonView.doubleValue();
+ }
+ int newValue = value + delta;
+ int max = (int)buttonView.maxValue();
+ int min = (int)buttonView.minValue();
+ if ((style & SWT.WRAP) != 0) {
+ if (newValue > max) newValue = min;
+ if (newValue < min) newValue = max;
+ }
+ newValue = Math.min (Math.max (min, newValue), max);
+ if (value != newValue) setSelection (newValue, true, true, true);
+ // Prevent the arrow or page up/down from being handled by the text field.
+ result = false;
+ } else {
+ boolean [] parseFail = new boolean [1];
+ int value = getSelectionText (parseFail);
+ if (!parseFail [0]) {
+ int pos = (int)buttonView.doubleValue();
+ if (pos != value) setSelection (value, true, false, true);
+ }
+ }
+
+ return result;
}
@Override
@@ -812,7 +815,7 @@ void setFont(NSFont font) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
NSColor nsColor;
if (color == null) {
nsColor = NSColor.textColor ();
@@ -938,7 +941,7 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) {
if (digits > 0) {
String decimalSeparator = textFormatter.decimalSeparator().getString();
int index = string.length () - digits;
- StringBuffer buffer = new StringBuffer ();
+ StringBuilder buffer = new StringBuilder ();
if (index > 0) {
buffer.append (string.substring (0, index));
buffer.append (decimalSeparator);
@@ -953,7 +956,7 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) {
}
NSCell cell = new NSCell(textView.cell());
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
- int length = (int)/*64*/cell.title().length();
+ int length = (int)cell.title().length();
string = verifyText (string, 0, length, null);
if (string == null) return;
}
@@ -1041,16 +1044,16 @@ public void setValues (int selection, int minimum, int maximum, int digits, int
}
@Override
-boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ affectedCharRange, long /*int*/ replacementString) {
+boolean shouldChangeTextInRange_replacementString(long id, long sel, long affectedCharRange, long replacementString) {
NSRange range = new NSRange();
OS.memmove(range, affectedCharRange, NSRange.sizeof);
boolean result = callSuperBoolean(id, sel, range, replacementString);
if (hooks (SWT.Verify)) {
String text = new NSString(replacementString).getString();
NSEvent currentEvent = display.application.currentEvent();
- long /*int*/ type = currentEvent.type();
+ long type = currentEvent.type();
if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
- String newText = verifyText(text, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
+ String newText = verifyText(text, (int)range.location, (int)(range.location+range.length), currentEvent);
if (newText == null) return false;
if (text != newText) {
int length = newText.length();
@@ -1058,9 +1061,9 @@ boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/
if (fieldEditor != null) {
NSRange selectedRange = fieldEditor.selectedRange();
if (textLimit != LIMIT) {
- long /*int*/ charCount = fieldEditor.string().length();
+ long charCount = fieldEditor.string().length();
if (charCount - selectedRange.length + length > textLimit) {
- length = (int)/*64*/(textLimit - charCount + selectedRange.length);
+ length = (int)(textLimit - charCount + selectedRange.length);
}
}
char [] buffer = new char [length];
@@ -1076,7 +1079,7 @@ boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/
}
@Override
-void textDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textDidChange (long id, long sel, long aNotification) {
super.textDidChange (id, sel, aNotification);
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
@@ -1090,7 +1093,7 @@ void textDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotificatio
}
@Override
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (long id, long sel, long aTextView, long oldSelectedCharRange, long newSelectedCharRange) {
/* allow the selection change to proceed */
NSRange result = new NSRange ();
OS.memmove(result, newSelectedCharRange, NSRange.sizeof);
@@ -1098,7 +1101,7 @@ NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (long /*
}
@Override
-void textDidEndEditing(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textDidEndEditing(long id, long sel, long aNotification) {
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
if (parseFail [0]) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
index bae9669c09..c80631d01e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
@@ -221,7 +221,7 @@ void destroyItem (TabItem item) {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
fillBackground (view, context, rect, -1);
}
@@ -522,7 +522,7 @@ void setFont (NSFont font) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
super.setForeground(color);
int index = getSelectionIndex();
for (int i = 0; i < itemCount; i++) {
@@ -655,7 +655,7 @@ boolean traversePage (boolean next) {
}
@Override
-void tabView_willSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
+void tabView_willSelectTabViewItem(long id, long sel, long tabView, long tabViewItem) {
if (tabViewItem == 0) return;
for (int i = 0; i < itemCount; i++) {
TabItem item = items [i];
@@ -664,7 +664,7 @@ void tabView_willSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int
if (currentIndex != -1) {
TabItem selected = items [currentIndex];
if (selected != null) {
- if (OS.VERSION >= 0x1070) selected.updateText(false);
+ selected.updateText(false);
Control control = selected.control;
if (control != null && !control.isDisposed ()) {
control.setVisible (false);
@@ -675,14 +675,14 @@ void tabView_willSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int
if (control != null && !control.isDisposed ()) {
control.setVisible (true);
}
- if (OS.VERSION >= 0x1070) item.updateText(true);
+ item.updateText(true);
break;
}
}
}
@Override
-void tabView_didSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
+void tabView_didSelectTabViewItem(long id, long sel, long tabView, long tabViewItem) {
if (tabViewItem == 0) return;
for (int i = 0; i < itemCount; i++) {
TabItem item = items [i];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
index eec9f4a077..aea46793d9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
@@ -118,7 +118,7 @@ public TabItem (TabFolder parent, int style, int index) {
}
@Override
-long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityAttributeValue (long id, long sel, long arg0) {
if (id == nsItem.id) {
NSString nsAttributeName = new NSString(arg0);
@@ -155,7 +155,7 @@ void destroyWidget () {
}
@Override
-void drawLabelInRect(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel, NSRect rect) {
+void drawLabelInRect(long id, long sel, boolean shouldTruncateLabel, NSRect rect) {
if (image != null && !image.isDisposed()) {
NSSize imageSize = image.handle.size();
NSRect destRect = new NSRect();
@@ -196,8 +196,8 @@ public Rectangle getBounds() {
checkWidget();
Rectangle result = new Rectangle (0, 0, 0, 0);
if (nsItem.respondsToSelector (OS.sel_accessibilityAttributeValue_)) {
- long /*int*/ posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilityPositionAttribute ());
- long /*int*/ sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilitySizeAttribute ());
+ long posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilityPositionAttribute ());
+ long sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilitySizeAttribute ());
NSValue val = new NSValue (posValue);
NSPoint pt = val.pointValue ();
NSWindow window = parent.view.window ();
@@ -436,7 +436,7 @@ public void setToolTipText (String string) {
}
@Override
-NSSize sizeOfLabel(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel) {
+NSSize sizeOfLabel(long id, long sel, boolean shouldTruncateLabel) {
NSSize size = super.sizeOfLabel(id, sel, shouldTruncateLabel);
if (image != null && !image.isDisposed()) {
NSSize imageSize = image.handle.size();
@@ -463,10 +463,10 @@ void updateText (boolean selected) {
if (attriStr != null) {
attriStr.release();
}
- double /*float*/ [] foreground = parent.foreground;
+ double [] foreground = parent.foreground;
if (foreground == null) {
- if (selected && OS.VERSION >= 0x1070) {
- foreground = display.getNSColorRGB(NSColor.alternateSelectedControlTextColor());
+ if (selected) {
+ foreground = OS.isBigSurOrLater() ? display.selectedControlTextColor : display.alternateSelectedControlTextColor;
} else {
foreground = parent.defaultForeground().handle;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
index f46680e0b8..c49f1354fe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -80,10 +80,11 @@ public class Table extends Composite {
int columnCount, itemCount, lastIndexOf, sortDirection, selectedRowIndex = -1;
boolean ignoreSelect, fixScrollWidth, drawExpansion, didSelect, preventSelect, dragDetected;
Rectangle imageBounds;
- double /*float*/ [] headerBackground, headerForeground;
+ double [] headerBackground, headerForeground;
/* Used to control drop feedback when FEEDBACK_SCROLL is set/not set */
boolean shouldScroll = true;
+ boolean keyDown;
static int NEXT_ID;
@@ -131,20 +132,20 @@ public Table (Composite parent, int style) {
}
@Override
-boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean acceptsFirstResponder (long id, long sel) {
return true;
}
@Override
-long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
- long /*int*/ returnValue = 0;
+long accessibilityAttributeValue(long id, long sel, long arg0) {
+ long returnValue = 0;
NSString attributeName = new NSString(arg0);
// If the check column is visible, don't report it back as a column for accessibility purposes.
// The check column is meant to appear as a part of the first column.
if (attributeName.isEqualToString (OS.NSAccessibilityColumnsAttribute) || attributeName.isEqualToString(OS.NSAccessibilityVisibleColumnsAttribute)) {
if ((style & SWT.CHECK) != 0) {
- long /*int*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+ long superValue = super.accessibilityAttributeValue(id, sel, arg0);
if (superValue != 0) {
NSArray columns = new NSArray(superValue);
NSMutableArray columnsWithoutCheck = NSMutableArray.arrayWithCapacity(columns.count() - 1);
@@ -221,18 +222,18 @@ int calculateWidth (TableItem[] items, int index, GC gc) {
}
@Override
-NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
+NSSize cellSize (long id, long sel) {
NSSize size = super.cellSize(id, sel);
NSCell cell = new NSCell(id);
NSImage image = cell.image();
if (image != null) size.width += imageBounds.width + IMAGE_GAP;
if (hooks(SWT.MeasureItem)) {
- long /*int*/ [] outValue = new long /*int*/ [1];
+ long [] outValue = new long [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
- long /*int*/ rowIndex = outValue [0];
- TableItem item = _getItem((int)/*64*/rowIndex);
+ long rowIndex = outValue [0];
+ TableItem item = _getItem((int)rowIndex);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- long /*int*/ tableColumn = outValue[0];
+ long tableColumn = outValue[0];
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -246,13 +247,13 @@ NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
}
@Override
-boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ rowIndexes, NSPoint mouseDownPoint) {
+boolean canDragRowsWithIndexes_atPoint(long id, long sel, long rowIndexes, NSPoint mouseDownPoint) {
if (!super.canDragRowsWithIndexes_atPoint(id, sel, rowIndexes, mouseDownPoint)) return false;
// If the current row is not selected and the user is not attempting to modify the selection, select the row first.
NSTableView widget = (NSTableView)view;
- long /*int*/ row = widget.rowAtPoint(mouseDownPoint);
- long /*int*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
+ long row = widget.rowAtPoint(mouseDownPoint);
+ long modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
boolean drag = (state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect);
if (drag) {
@@ -453,7 +454,7 @@ void clearCachedWidth (TableItem[] items) {
}
@Override
-long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {
+long columnAtPoint(long id, long sel, NSPoint point) {
if ((style & SWT.CHECK) != 0) {
if (point.x <= getCheckColumnWidth() && point.y < headerView.frame().height) return 1;
}
@@ -551,7 +552,20 @@ void createHandle () {
spacing.width = spacing.height = CELL_GAP;
widget.setIntercellSpacing(spacing);
widget.setDoubleAction(OS.sel_sendDoubleSelection);
- if (!hasBorder()) widget.setFocusRingType(OS.NSFocusRingTypeNone);
+
+ if (OS.isBigSurOrLater()) {
+ OS.objc_msgSend(widget.id, OS.sel_setStyle, OS.NSTableViewStylePlain);
+ }
+
+ /*
+ * Table didn't have focus ring in SWT for years, because SWT didn't
+ * have layer backing, and even when it gets it, there were no focus rings
+ * due to macOS compatibility code. However, sometimes macOS misbehaves
+ * (see for example Bug 574618 snippet test 2). On the other hand, most
+ * macOS builtin apps don't have focus rings for Table, see for example
+ * Activity Monitor. So just disable it in SWT as well.
+ */
+ widget.setFocusRingType(OS.NSFocusRingTypeNone);
headerView = (NSTableHeaderView)new SWTTableHeaderView ().alloc ().init ();
widget.setHeaderView (null);
@@ -567,7 +581,7 @@ void createHandle () {
widget.addTableColumn (checkColumn);
checkColumn.setResizingMask(OS.NSTableColumnNoResizing);
checkColumn.setEditable(false);
- long /*int*/ cls = NSButton.cellClass (); /* use our custom cell class */
+ long cls = NSButton.cellClass (); /* use our custom cell class */
buttonCell = new NSButtonCell (OS.class_createInstance (cls, 0));
buttonCell.init ();
checkColumn.setDataCell (buttonCell);
@@ -596,7 +610,7 @@ void createHandle () {
firstColumn.headerCell ().setTitle (str);
widget.addTableColumn (firstColumn);
dataCell = (NSTextFieldCell)new SWTImageTextCell ().alloc ().init ();
- dataCell.setLineBreakMode(OS.NSLineBreakByTruncatingTail);
+ dataCell.setLineBreakMode(OS.NSLineBreakByClipping);
firstColumn.setDataCell (dataCell);
widget.setHighlightedTableColumn(null);
scrollView = scrollWidget;
@@ -632,6 +646,7 @@ void createItem (TableColumn column, int index) {
}
column.createJNIRef ();
NSTableHeaderCell headerCell = (NSTableHeaderCell)new SWTTableHeaderCell ().alloc ().init ();
+ if (font != null) headerCell.setFont(font.handle);
nsColumn.setHeaderCell (headerCell);
display.addWidget (headerCell, column);
column.nsColumn = nsColumn;
@@ -694,7 +709,7 @@ void deregister () {
}
@Override
-void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void deselectAll(long id, long sel, long sender) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() != -1) return;
@@ -703,7 +718,7 @@ void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
}
@Override
-void deselectRow (long /*int*/ id, long /*int*/ sel, long /*int*/ index) {
+void deselectRow (long id, long sel, long index) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() == index) return;
@@ -896,9 +911,9 @@ void destroyItem (TableColumn column) {
}
NSArray array = ((NSTableView)view).tableColumns ();
- int arraySize = (int)/*64*/array.count ();
+ int arraySize = (int)array.count ();
for (int i = oldIndex; i < arraySize; i++) {
- long /*int*/ columnId = array.objectAtIndex (i).id;
+ long columnId = array.objectAtIndex (i).id;
for (int j = 0; j < columnCount; j++) {
if (columns[j].nsColumn.id == columnId) {
columns [j].sendEvent (SWT.Move);
@@ -928,14 +943,14 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
}
@Override
-void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long id, long sel, NSRect rect) {
super.drawViewBackgroundInRect(id, sel, rect);
if (id != view.id) return;
fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
}
@Override
-void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rect, long /*int*/ view) {
+void drawInteriorWithFrame_inView (long id, long sel, NSRect rect, long view) {
boolean hooksErase = hooks (SWT.EraseItem);
boolean hooksPaint = hooks (SWT.PaintItem);
boolean hooksMeasure = hooks (SWT.MeasureItem);
@@ -943,13 +958,13 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
NSTextFieldCell cell = new NSTextFieldCell (id);
NSTableView widget = (NSTableView)this.view;
- long /*int*/ [] outValue = new long /*int*/ [1];
+ long [] outValue = new long [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
- long /*int*/ rowIndex = outValue [0];
- TableItem item = _getItem((int)/*64*/rowIndex);
+ long rowIndex = outValue [0];
+ TableItem item = _getItem((int)rowIndex);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- long /*int*/ tableColumn = outValue[0];
- long /*int*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
+ long tableColumn = outValue[0];
+ long nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -969,7 +984,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
Color selectionBackground = null, selectionForeground = null;
if (isSelected && (hooksErase || hooksPaint)) {
selectionForeground = Color.cocoa_new(display, (hasFocus || Display.APPEARANCE.Dark == display.appAppearance) ? display.alternateSelectedControlTextColor : display.selectedControlTextColor);
- selectionBackground = Color.cocoa_new(display, hasFocus ? display.alternateSelectedControlColor : display.secondarySelectedControlColor);
+ selectionBackground = Color.cocoa_new(display, hasFocus ? display.getAlternateSelectedControlColor() : display.getSecondarySelectedControlColor());
}
NSSize contentSize = super.cellSize(id, OS.sel_cellSize);
@@ -986,7 +1001,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
NSRect rowRect = widget.rectOfRow (rowIndex);
cellRect.width = rowRect.width;
}
- double /*float*/ offsetX = 0, offsetY = 0;
+ double offsetX = 0, offsetY = 0;
if (hooksPaint || hooksErase) {
NSRect frameCell = widget.frameOfCellAtColumn(nsColumnIndex, rowIndex);
offsetX = rect.x - frameCell.x;
@@ -1048,17 +1063,30 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
if (!drawSelection && isSelected) {
userForeground = Color.cocoa_new(display, gc.getForeground().handle);
}
- gc.dispose ();
- context.restoreGraphicsState();
- if (isDisposed ()) return;
- if (item.isDisposed ()) return;
+ if (isDisposed () || item.isDisposed ()) {
+ gc.dispose ();
+ context.restoreGraphicsState();
+ return;
+ }
if (drawSelection) {
cellRect.height -= spacing.height;
- callSuper (widget.id, OS.sel_highlightSelectionInClipRect_, cellRect);
+ /*
+ * On BigSur, calling highlightSelectionInClipRect here draws over the full row
+ * and not just the cellRect. This causes drawing over other cells content.
+ * Workaround is to draw the highlight background ourselves and not call
+ * highlightSelectionInClipRect to draw it.
+ */
+ if (OS.isBigSurOrLater()) {
+ gc.fillRectangle((int)cellRect.x, (int)cellRect.y, (int)cellRect.width, (int)cellRect.height);
+ } else {
+ callSuper (widget.id, OS.sel_highlightSelectionInClipRect_, cellRect);
+ }
cellRect.height += spacing.height;
}
+ gc.dispose ();
+ context.restoreGraphicsState();
} else {
if (isSelected && (style & SWT.HIDE_SELECTION) != 0 && !hasFocus) {
userForeground = item.getForeground (columnIndex);
@@ -1067,7 +1095,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
if (drawBackground && !drawSelection) {
context.saveGraphicsState ();
- double /*float*/ [] colorRGB = background.handle;
+ double [] colorRGB = background.handle;
NSColor color = NSColor.colorWithDeviceRed (colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color.setFill ();
NSBezierPath.fillRect (cellRect);
@@ -1101,7 +1129,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
* foreground color to black when the cell is highlighted. The text
* still draws white. The fix is to draw the text and not call super.
*/
- double /*float*/ [] color = userForeground.handle;
+ double [] color = userForeground.handle;
if (color[0] == 0 && color[1] == 0 && color[2] == 0 && color[3] == 1) {
NSMutableAttributedString newStr = new NSMutableAttributedString(cell.attributedStringValue().mutableCopy());
NSRange range = new NSRange();
@@ -1166,6 +1194,11 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
if (!drawExpansion) {
gc.setClipping ((int)(cellRect.x - offsetX), (int)(cellRect.y - offsetY), (int)cellRect.width, (int)cellRect.height);
}
+ /*
+ * Client code can modify the item text in the paint listener, so reset the cached width.
+ */
+ item.width = -1;
+
Event event = new Event ();
event.item = item;
event.gc = gc;
@@ -1185,14 +1218,14 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
}
@Override
-void drawWithExpansionFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+void drawWithExpansionFrame_inView (long id, long sel, NSRect cellFrame, long view) {
drawExpansion = true;
super.drawWithExpansionFrame_inView(id, sel, cellFrame, view);
drawExpansion = false;
}
@Override
-void drawRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawRect(long id, long sel, NSRect rect) {
fixScrollWidth = false;
super.drawRect(id, sel, rect);
if (isDisposed ()) return;
@@ -1203,7 +1236,7 @@ void drawRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
}
@Override
-NSRect expansionFrameWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
+NSRect expansionFrameWithFrame_inView(long id, long sel, NSRect cellRect, long view) {
if (toolTipText == null) {
NSRect rect = super.expansionFrameWithFrame_inView(id, sel, cellRect, view);
NSCell cell = new NSCell(id);
@@ -1252,7 +1285,7 @@ Widget findTooltip (NSPoint pt) {
NSTableHeaderView headerView = widget.headerView();
if (headerView != null) {
pt = headerView.convertPoint_fromView_ (pt, null);
- long /*int*/ index = headerView.columnAtPoint (pt);
+ long index = headerView.columnAtPoint (pt);
if (index != -1) {
NSArray nsColumns = widget.tableColumns ();
id nsColumn = nsColumns.objectAtIndex (index);
@@ -1303,7 +1336,7 @@ public Rectangle getClientArea () {
* OSX 10.11 - The origin of the table is the header and the header's
* height is already included in the rect. Hence, we return the rect as is.
*/
- if (OS.VERSION_MMB < OS.VERSION_MMB (10, 11, 0)) {
+ if (OS.VERSION < OS.VERSION (10, 11, 0)) {
NSTableHeaderView headerView = ((NSTableView) view).headerView ();
if (headerView != null) {
int height = (int) headerView.bounds ().height;
@@ -1595,7 +1628,7 @@ public TableItem getItem (Point point) {
NSPoint pt = new NSPoint();
pt.x = point.x;
pt.y = point.y;
- int row = (int)/*64*/widget.rowAtPoint(pt);
+ int row = (int)widget.rowAtPoint(pt);
if (row == -1) return null;
return items[row];
}
@@ -1706,12 +1739,12 @@ public TableItem [] getSelection () {
return new TableItem [0];
}
NSIndexSet selection = widget.selectedRowIndexes();
- int count = (int)/*64*/selection.count();
- long /*int*/ [] indexBuffer = new long /*int*/ [count];
+ int count = (int)selection.count();
+ long [] indexBuffer = new long [count];
selection.getIndexes(indexBuffer, count, 0);
TableItem [] result = new TableItem [count];
for (int i=0; i<count; i++) {
- result [i] = _getItem ((int)/*64*/indexBuffer [i]);
+ result [i] = _getItem ((int)indexBuffer [i]);
}
return result;
}
@@ -1728,7 +1761,7 @@ public TableItem [] getSelection () {
*/
public int getSelectionCount () {
checkWidget ();
- return (int)/*64*/((NSTableView)view).numberOfSelectedRows();
+ return (int)((NSTableView)view).numberOfSelectedRows();
}
/**
@@ -1749,10 +1782,10 @@ public int getSelectionIndex () {
return -1;
}
NSIndexSet selection = widget.selectedRowIndexes();
- int count = (int)/*64*/selection.count();
- long /*int*/ [] result = new long /*int*/ [count];
+ int count = (int)selection.count();
+ long [] result = new long [count];
selection.getIndexes(result, count, 0);
- return (int)/*64*/result [0];
+ return (int)result [0];
}
/**
@@ -1778,12 +1811,12 @@ public int [] getSelectionIndices () {
return new int [0];
}
NSIndexSet selection = widget.selectedRowIndexes();
- int count = (int)/*64*/selection.count();
- long /*int*/ [] indices = new long /*int*/ [count];
+ int count = (int)selection.count();
+ long [] indices = new long [count];
selection.getIndexes(indices, count, 0);
int [] result = new int [count];
for (int i = 0; i < indices.length; i++) {
- result [i] = (int)/*64*/indices [i];
+ result [i] = (int)indices [i];
}
return result;
}
@@ -1854,20 +1887,20 @@ public int getTopIndex () {
* In OSX 10.11, the origin of the table is the header, not the top-left of the rows.
* Offset the point's y coordinate accordingly.
*/
- if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 11, 0)) {
+ if (OS.VERSION >= OS.VERSION (10, 11, 0)) {
NSTableHeaderView headerView = ((NSTableView) view).headerView ();
if (headerView != null) {
int height = (int) headerView.bounds ().height;
point.y += height;
}
}
- int /*64*/ rowAtPoint = (int)/*64*/((NSTableView)view).rowAtPoint(point);
+ int rowAtPoint = (int)((NSTableView)view).rowAtPoint(point);
if (rowAtPoint == -1) return 0; /* Empty table */
return rowAtPoint;
}
@Override
-NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ column) {
+NSRect headerRectOfColumn (long id, long sel, long column) {
if ((style & SWT.CHECK) == 0) return callSuperRect(id, sel, column);
if (column == 0) {
@@ -1886,7 +1919,7 @@ NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ colum
}
@Override
-void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*/ rect) {
+void highlightSelectionInClipRect(long id, long sel, long rect) {
if (hooks (SWT.EraseItem)) return;
if ((style & SWT.HIDE_SELECTION) != 0 && !hasFocus()) return;
NSRect clipRect = new NSRect ();
@@ -1895,7 +1928,7 @@ void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*
}
@Override
-long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event, NSRect rect, long /*int*/ controlView) {
+long hitTestForEvent (long id, long sel, long event, NSRect rect, long controlView) {
/*
* For some reason, the cell class needs to implement hitTestForEvent:inRect:ofView:,
* otherwise the double action selector is not called properly.
@@ -1904,14 +1937,14 @@ long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ ev
}
@Override
-long /*int*/ image (long /*int*/ id, long /*int*/ sel) {
- long /*int*/ [] image = new long /*int*/ [1];
+long image (long id, long sel) {
+ long [] image = new long [1];
OS.object_getInstanceVariable(id, Display.SWT_IMAGE, image);
return image[0];
}
@Override
-NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSRect imageRectForBounds (long id, long sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
cellFrame.x += IMAGE_GAP;
@@ -1922,7 +1955,7 @@ NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame)
}
int indexOf (NSTableColumn column) {
- return (int)/*64*/((NSTableView)view).tableColumns().indexOfObjectIdenticalTo(column);
+ return (int)((NSTableView)view).tableColumns().indexOfObjectIdenticalTo(column);
}
/**
@@ -2013,9 +2046,11 @@ boolean isTransparent() {
}
@Override
-void keyDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyDown(long id, long sel, long theEvent) {
ignoreSelect = preventSelect = false;
+ keyDown = true;
super.keyDown(id, sel, theEvent);
+ keyDown = false;
}
@Override
@@ -2025,7 +2060,7 @@ boolean isTrim (NSView view) {
}
@Override
-long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+long menuForEvent(long id, long sel, long theEvent) {
if (display.lastHandledMenuForEventId == theEvent) return 0;
if (id != headerView.id) {
/*
@@ -2041,7 +2076,7 @@ long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEve
// select the row that was clicked before showing the menu for the event
NSPoint mousePoint = view.convertPoint_fromView_(event.locationInWindow(), null);
- long /*int*/ row = table.rowAtPoint(mousePoint);
+ long row = table.rowAtPoint(mousePoint);
// figure out if the row that was just clicked on is currently selected
if (selectedRowIndexes.containsIndex(row) == false) {
@@ -2056,7 +2091,7 @@ long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEve
}
@Override
-void mouseDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown (long id, long sel, long theEvent) {
if (id == view.id) {
// Bug/feature in Cocoa: If the table has a context menu we just set it visible instead of returning
// it from menuForEvent:. This has the side effect, however, of sending control-click to the NSTableView,
@@ -2069,21 +2104,21 @@ void mouseDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDownSuper(long id, long sel, long theEvent) {
ignoreSelect = preventSelect = false;
boolean check = false;
NSEvent nsEvent = new NSEvent(theEvent);
NSTableView widget = (NSTableView)view;
NSPoint pt = view.convertPoint_fromView_(nsEvent.locationInWindow(), null);
- int row = (int)/*64*/widget.rowAtPoint(pt);
+ int row = (int)widget.rowAtPoint(pt);
if (row != -1 && (style & SWT.CHECK) != 0) {
- int column = (int)/*64*/widget.columnAtPoint(pt);
+ int column = (int)widget.columnAtPoint(pt);
NSCell cell = widget.preparedCellAtColumn(column, row);
if (cell != null && cell.isKindOfClass(OS.class_NSButtonCell) && cell.isEnabled()) {
NSRect checkRect = cell.imageRectForBounds(widget.frameOfCellAtColumn(column, row));
if (OS.NSPointInRect(pt, checkRect)) {
check = preventSelect = true;
- }
+ }
}
}
if (!check && row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0 && nsEvent.clickCount() == 1) {
@@ -2099,7 +2134,7 @@ void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
+boolean needsPanelToBecomeKey (long id, long sel) {
return false;
}
@@ -2110,10 +2145,10 @@ boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
* override [NSCell nextState] to go directly to the desired state.
*/
@Override
-long /*int*/ nextState (long /*int*/ id, long /*int*/ sel) {
+long nextState (long id, long sel) {
NSTableView tableView = (NSTableView)view;
- int index = (int)/*64*/tableView.clickedRow();
- if (index == -1) index = (int)/*64*/tableView.selectedRow ();
+ int index = (int)tableView.clickedRow();
+ if (index == -1) index = (int)tableView.selectedRow ();
TableItem item = items[index];
if (item.grayed) {
return item.checked ? OS.NSOffState : OS.NSMixedState;
@@ -2122,7 +2157,7 @@ long /*int*/ nextState (long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ numberOfRowsInTableView(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView) {
+long numberOfRowsInTableView(long id, long sel, long aTableView) {
return itemCount;
}
@@ -2374,7 +2409,7 @@ void reskinChildren (int flags) {
}
@Override
-void scrollClipViewToPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
+void scrollClipViewToPoint(long id, long sel, long clipView, NSPoint point) {
if (shouldScroll) {
super.scrollClipViewToPoint(id, sel, clipView, point);
if ((style & SWT.CHECK) != 0 && columnCount > 0 && ((NSTableView)view).headerView() != null) {
@@ -2615,12 +2650,31 @@ public void setColumnOrder (int [] order) {
@Override
void setFont (NSFont font) {
super.setFont (font);
+ for (int i = 0; i < columnCount; i++) {
+ columns[i].nsColumn.headerCell().setFont(font);
+ }
setItemHeight (null, font, !hooks (SWT.MeasureItem));
view.setNeedsDisplay (true);
clearCachedWidth (items);
setScrollWidth (items, true);
}
+@Override
+void setFrameSize (long id, long sel, NSSize size) {
+ super.setFrameSize(id, sel, size);
+
+ /*
+ * Bug 577767: Since macOS 10.15, NSTableView has 'autoresizingMask'
+ * set to follow resizes of its NSClipView. This sometimes causes
+ * Table/Tree to have wrong scroll range (note that size of NSClipView
+ * is what you see and size of NSTableView is the size of entire
+ * content, this defines scroll range). The workaround is to recalc
+ * layout after resizing.
+ */
+ if ((scrollView != null) && (id == scrollView.id))
+ ((NSTableView)view).tile();
+}
+
/**
* Sets the header background color to the color specified
* by the argument, or to the default system color if the argument is null.
@@ -2645,7 +2699,7 @@ public void setHeaderBackground (Color color) {
if (color != null) {
if (color.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] headerBackground = color != null ? color.handle : null;
+ double [] headerBackground = color != null ? color.handle : null;
if (equals (headerBackground, this.headerBackground)) return;
this.headerBackground = headerBackground;
if (getHeaderVisible()) {
@@ -2677,7 +2731,7 @@ public void setHeaderForeground (Color color) {
if (color != null) {
if (color.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] headerForeground = color != null ? color.handle : null;
+ double [] headerForeground = color != null ? color.handle : null;
if (equals (headerForeground, this.headerForeground)) return;
this.headerForeground = headerForeground;
if (getHeaderVisible()) {
@@ -2708,7 +2762,7 @@ public void setHeaderVisible (boolean show) {
}
@Override
-void setImage (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void setImage (long id, long sel, long arg0) {
OS.object_setInstanceVariable(id, Display.SWT_IMAGE, arg0);
}
@@ -2766,8 +2820,8 @@ public void setItemCount (int count) {
void setItemHeight (Image image, NSFont font, boolean set) {
if (font == null) font = getFont ().handle;
- double /*float*/ ascent = font.ascender ();
- double /*float*/ descent = -font.descender () + font.leading ();
+ double ascent = font.ascender ();
+ double descent = -font.descender () + font.leading ();
int height = (int)Math.ceil (ascent + descent) + 1;
Rectangle bounds = image != null ? image.getBounds () : imageBounds;
if (bounds != null) {
@@ -2777,6 +2831,13 @@ void setItemHeight (Image image, NSFont font, boolean set) {
NSTableView widget = (NSTableView)view;
if (set || widget.rowHeight () < height) {
widget.setRowHeight (height);
+ if (headerView != null) {
+ NSRect frame = headerView.frame();
+ if (frame.height < height) {
+ frame.height = height;
+ headerView.setFrame(frame);
+ }
+ }
}
}
@@ -2785,7 +2846,7 @@ public void setRedraw (boolean redraw) {
checkWidget ();
super.setRedraw (redraw);
if (redraw && drawCount == 0) {
- /* Resize the item array to match the item count */
+ /* Resize the item array to match the item count */
if (items.length > 4 && items.length - itemCount > 3) {
int length = Math.max (4, (itemCount + 3) / 4 * 4);
TableItem [] newItems = new TableItem [length];
@@ -3036,7 +3097,7 @@ public void setSelection (TableItem [] items) {
}
@Override
-void setShouldScrollClipView(long /*int*/ id, long /*int*/ sel, boolean shouldScroll) {
+void setShouldScrollClipView(long id, long sel, boolean shouldScroll) {
this.shouldScroll = shouldScroll;
}
@@ -3131,7 +3192,7 @@ public void setTopIndex (int index) {
* In OSX 10.11, the origin of the table is the header, not the top-left of the rows.
* Offset the point's y coordinate accordingly.
*/
- if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 11, 0)) {
+ if (OS.VERSION >= OS.VERSION(10, 11, 0)) {
if (widget.headerView() != null) {
NSRect headerRect = headerView.frame();
pt.y -= headerRect.y + headerRect.height;
@@ -3171,7 +3232,33 @@ public void showColumn (TableColumn column) {
void showIndex (int index) {
if (0 <= index && index < itemCount) {
- ((NSTableView)view).scrollRowToVisible(index);
+ NSTableView tableView = (NSTableView)view;
+ if (OS.VERSION >= OS.VERSION (10, 15, 0)) {
+ if (tableView.headerView () == null) {
+ /**
+ * On macOS 10.15, scrollRowToVisible doesn't work correctly if
+ * contentView's bounds is not set (i.e, width or height is 0).
+ *
+ * The contentView's bounds is set when the Table's header view is set.
+ * So don't call this code if Table has a header already.
+ */
+ NSClipView contentView = scrollView.contentView ();
+ if (contentView != null) {
+ NSRect contentViewBounds = contentView.bounds ();
+ if (contentViewBounds.height == 0 || contentViewBounds.width == 0) {
+ NSView documentView = scrollView.documentView ();
+ if (documentView != null) {
+ NSRect documentViewBounds = documentView.bounds ();
+ NSSize size = new NSSize ();
+ size.width = contentViewBounds.width == 0 ? documentViewBounds.width : contentViewBounds.width;
+ size.height = contentViewBounds.height == 0 ? documentViewBounds.height : contentViewBounds.height;
+ contentView.setBoundsSize (size);
+ }
+ }
+ }
+ }
+ }
+ tableView.scrollRowToVisible(index);
}
}
@@ -3223,7 +3310,7 @@ public void showSelection () {
}
@Override
-void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ indexes, boolean extend) {
+void selectRowIndexes_byExtendingSelection (long id, long sel, long indexes, boolean extend) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
NSIndexSet set = new NSIndexSet(indexes);
@@ -3235,12 +3322,12 @@ void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, l
@Override
void sendDoubleSelection() {
NSTableView tableView = (NSTableView)view;
- int rowIndex = (int)/*64*/tableView.clickedRow ();
- if (rowIndex == -1) rowIndex = (int)/*64*/tableView.selectedRow();
+ int rowIndex = (int)tableView.clickedRow ();
+ if (rowIndex == -1) rowIndex = (int)tableView.selectedRow();
if (rowIndex != -1) {
if ((style & SWT.CHECK) != 0) {
NSArray columns = tableView.tableColumns ();
- int columnIndex = (int)/*64*/tableView.clickedColumn ();
+ int columnIndex = (int)tableView.clickedColumn ();
if (columnIndex != -1) {
id column = columns.objectAtIndex (columnIndex);
if (column.id == checkColumn.id) return;
@@ -3304,7 +3391,7 @@ void sendMeasureItem (TableItem item, int columnIndex, NSSize size, boolean isSe
}
@Override
-void tableViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewColumnDidMove (long id, long sel, long aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -3333,7 +3420,7 @@ void tableViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNo
}
@Override
-void tableViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewColumnDidResize (long id, long sel, long aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -3351,7 +3438,7 @@ void tableViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ a
if (index == -1) return; /* column was disposed in Resize callback */
NSArray nsColumns = tableView.tableColumns ();
- int columnCount = (int)/*64*/tableView.numberOfColumns ();
+ int columnCount = (int)tableView.numberOfColumns ();
for (int i = index + 1; i < columnCount; i++) {
columnId = nsColumns.objectAtIndex (i);
column = getColumn (columnId);
@@ -3366,7 +3453,7 @@ void tableViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ a
void sendSelection () {
if (ignoreSelect) return;
NSTableView widget = (NSTableView) view;
- int row = (int)/*64*/widget.selectedRow ();
+ int row = (int)widget.selectedRow ();
if(row == -1)
sendSelectionEvent (SWT.Selection);
else {
@@ -3379,27 +3466,27 @@ void sendSelection () {
}
@Override
-void tableViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewSelectionDidChange (long id, long sel, long aNotification) {
if (didSelect) return;
sendSelection();
}
@Override
-void tableViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewSelectionIsChanging (long id, long sel, long aNotification) {
didSelect = true;
sendSelection();
}
@Override
-void tableView_didClickTableColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ tableColumn) {
+void tableView_didClickTableColumn (long id, long sel, long tableView, long tableColumn) {
TableColumn column = getColumn (new id (tableColumn));
if (column == null) return; /* either CHECK column or firstColumn in 0-column Table */
column.sendSelectionEvent (SWT.Selection);
}
@Override
-long /*int*/ tableView_objectValueForTableColumn_row (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
- int index = (int)/*64*/rowIndex;
+long tableView_objectValueForTableColumn_row (long id, long sel, long aTableView, long aTableColumn, long rowIndex) {
+ int index = (int)rowIndex;
TableItem item = _getItem (index);
checkData (item, index);
if (checkColumn != null && aTableColumn == checkColumn.id) {
@@ -3420,7 +3507,7 @@ long /*int*/ tableView_objectValueForTableColumn_row (long /*int*/ id, long /*in
}
@Override
-boolean tableView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ currentColIndex, long /*int*/ newColIndex) {
+boolean tableView_shouldReorderColumn_toColumn(long id, long sel, long aTableView, long currentColIndex, long newColIndex) {
// Check column should never move and no column can be dragged to the left of it, if present.
if ((style & SWT.CHECK) != 0) {
if (currentColIndex == 0) return false;
@@ -3439,7 +3526,7 @@ boolean tableView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel
}
@Override
-boolean tableView_shouldTrackCell_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, /*long*/ long /*int*/ tableColumn, long /*int*/ rowIndex) {
+boolean tableView_shouldTrackCell_forTableColumn_row(long id, long sel, long table, long cell, /*long*/ long tableColumn, long rowIndex) {
if ((style & SWT.CHECK) != 0) {
if (new NSCell(cell).isKindOfClass(OS.class_NSButtonCell)) return true;
}
@@ -3448,23 +3535,40 @@ boolean tableView_shouldTrackCell_forTableColumn_row(long /*int*/ id, long /*int
}
@Override
-void tableView_setObjectValue_forTableColumn_row (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ anObject, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
- if (checkColumn != null && aTableColumn == checkColumn.id) {
- TableItem item = items [(int)/*64*/rowIndex];
- item.checked = !item.checked;
- Event event = new Event ();
- event.detail = SWT.CHECK;
- event.item = item;
- event.index = (int)/*64*/rowIndex;
- sendSelectionEvent (SWT.Selection, event, false);
- item.redraw (-1);
+void tableView_setObjectValue_forTableColumn_row (long id, long sel, long aTableView, long anObject, long aTableColumn, long rowIndex) {
+ if (checkColumn != null && aTableColumn == checkColumn.id) {
+ if (keyDown && (style & SWT.MULTI) != 0) {
+ NSTableView widget = (NSTableView)view;
+ NSIndexSet selection = widget.selectedRowIndexes ();
+ int count = (int)selection.count ();
+ long [] indices = new long [count];
+ selection.getIndexes (indices, count, 0);
+ for (int i = 0; i < indices.length; i++) {
+ int index = (int)indices [i];
+ TableItem item = items [index];
+ toggleCheckedItem (item, index);
+ }
+ } else {
+ TableItem item = items [(int)rowIndex];
+ toggleCheckedItem (item, rowIndex);
+ }
}
}
+private void toggleCheckedItem (TableItem item, long rowIndex) {
+ item.checked = !item.checked;
+ Event event = new Event ();
+ event.detail = SWT.CHECK;
+ event.item = item;
+ event.index = (int)rowIndex;
+ sendSelectionEvent (SWT.Selection, event, false);
+ item.redraw (-1);
+}
+
@Override
-void tableView_willDisplayCell_forTableColumn_row (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ rowIndex) {
+void tableView_willDisplayCell_forTableColumn_row (long id, long sel, long aTableView, long cell, long tableColumn, long rowIndex) {
if (checkColumn != null && tableColumn == checkColumn.id) return;
- TableItem item = items [(int)/*64*/rowIndex];
+ TableItem item = items [(int)rowIndex];
int index = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -3528,39 +3632,70 @@ void tableView_willDisplayCell_forTableColumn_row (long /*int*/ id, long /*int*/
}
@Override
-boolean tableView_writeRowsWithIndexes_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+boolean tableView_writeRowsWithIndexes_toPasteboard(long id, long sel, long arg0, long arg1, long arg2) {
return sendMouseEvent(NSApplication.sharedApplication().currentEvent(), SWT.DragDetect, true);
}
+void handleClickSelected() {
+ /*
+ * When there are multiple selected items and one of them is clicked
+ * without modifiers, macOS supports two cases:
+ * 1) For single click, all other items are deselected
+ * 2) For double-click, selection stays as is, allowing to create
+ * double-click event with multiple items.
+ * In order to distinguish between the two, macOS delays (1) by
+ * [NSEvent doubleClickInterval] in order to see if it's case (2).
+ * This causes SWT.Selection to occur after SWT.MouseUp.
+ *
+ * Bug 289483: For consistent cross-platform behavior, we want
+ * SWT.Selection to occur before SWT.MouseUp. The workaround is to
+ * implement (1) in SWT code and ignore the delayed selection event.
+ */
+
+ int clickedRow = selectedRowIndex;
+ selectedRowIndex = -1;
+
+ if (clickedRow == -1) return;
+ if (dragDetected) return;
+
+ // Deselect all items except the clicked one
+ NSTableView widget = (NSTableView)view;
+ NSIndexSet selectedRows = widget.selectedRowIndexes ();
+ int count = (int)selectedRows.count();
+ long [] indexBuffer = new long [count];
+ selectedRows.getIndexes(indexBuffer, count, 0);
+ for (int i = 0; i < count; i++) {
+ if (indexBuffer[i] == clickedRow) continue;
+ ignoreSelect = true;
+ widget.deselectRow (indexBuffer[i]);
+ ignoreSelect = false;
+ }
+
+ // Bug 456602: It's possible that item is removed between mouse
+ // down (where 'selectedRowIndex' was cached) and mouse up (current
+ // code). In such case, all other items are still deselected, because
+ // 1) without workaround, selection should have happened in mouse down,
+ // where item still existed
+ // 2) clicking empty space deselects all items on macOS
+ // If item is deleted, then pending selection is canceled by macOS, so
+ // there's no need to ignore the next selection event.
+ if (clickedRow >= itemCount) return;
+
+ // Emulate SWT.Selection
+ Event event = new Event ();
+ event.item = _getItem(clickedRow);
+ sendSelectionEvent (SWT.Selection, event, false);
+
+ // Ignore real SWT.Selection that will arrive later
+ ignoreSelect = true;
+}
+
@Override
boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
if (type == SWT.DragDetect) {
dragDetected = true;
} else if (type == SWT.MouseUp) {
- /*
- * This code path handles the case of an unmodified click on an already-selected row.
- * To keep the order of events correct, deselect the other selected items and send the
- * selection event before MouseUp is sent. Ignore the next selection event.
- */
- if (!dragDetected && selectedRowIndex != -1) {
- NSTableView widget = (NSTableView)view;
- NSIndexSet selectedRows = widget.selectedRowIndexes ();
- int count = (int)/*64*/selectedRows.count();
- long /*int*/ [] indexBuffer = new long /*int*/ [count];
- selectedRows.getIndexes(indexBuffer, count, 0);
- for (int i = 0; i < count; i++) {
- if (indexBuffer[i] == selectedRowIndex) continue;
- ignoreSelect = true;
- widget.deselectRow (indexBuffer[i]);
- ignoreSelect = false;
- }
-
- Event event = new Event ();
- event.item = _getItem ((int)/*64*/selectedRowIndex);
- selectedRowIndex = -1;
- sendSelectionEvent (SWT.Selection, event, false);
- ignoreSelect = true;
- }
+ handleClickSelected();
dragDetected = false;
}
@@ -3568,7 +3703,7 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
}
@Override
-NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long id, long sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
int imageWidth = imageBounds.width + IMAGE_GAP;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
index 1cc6fc3e49..e2b84453f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
@@ -207,7 +207,7 @@ void destroyWidget () {
}
@Override
-void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
+void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long view) {
/*
* Feature in Cocoa. When the last column in a table does not reach the
* rightmost edge of the table view, the cell that draws the rightmost-
@@ -261,7 +261,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
if (parent.headerBackground != null) {
// fill header background
context.saveGraphicsState();
- double /*float*/ [] colorRGB = parent.headerBackground;
+ double [] colorRGB = parent.headerBackground;
NSColor color1 = NSColor.colorWithDeviceRed(colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color1.setFill();
/*
@@ -306,7 +306,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
NSRect sortIndicatorRect = headerCell.sortIndicatorRectForBounds(cellRect);
context.saveGraphicsState();
if (parent.headerForeground != null) {
- double /*float*/ [] colorRGB = parent.headerForeground;
+ double [] colorRGB = parent.headerForeground;
NSColor color = NSColor.colorWithDeviceRed(colorRGB[0], colorRGB[1], colorRGB[2], 0.9f);
color.setStroke();
}
@@ -368,9 +368,9 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
if (isFlipped) {
context.saveGraphicsState ();
NSAffineTransform transform = NSAffineTransform.transform ();
- transform.scaleXBy (1, -1);
- transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
- transform.concat ();
+ transform.scaleXBy (1, -1);
+ transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
+ transform.concat ();
}
NSRect sourceRect = new NSRect ();
sourceRect.width = destRect.width;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
index 42be5acb25..9090131cc2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
@@ -67,7 +67,8 @@ public class Text extends Scrollable {
String message;
NSRange selectionRange;
id targetSearch, targetCancel;
- long /*int*/ actionSearch, actionCancel;
+ long actionSearch, actionCancel;
+ APPEARANCE lastAppAppearance;
/**
* The maximum number of characters that can be entered
@@ -346,11 +347,12 @@ public void append (String string) {
}
@Override
-boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
- receivingFocus = true;
- boolean result = super.becomeFirstResponder (id, sel);
- receivingFocus = false;
- return result;
+boolean becomeFirstResponder (long id, long sel) {
+ if ((style & SWT.SINGLE) != 0) {
+ if ((state & DISABLED) != 0) return false;
+ return true;
+ }
+ return super.becomeFirstResponder (id, sel);
}
static int checkStyle (int style) {
@@ -594,9 +596,9 @@ void createWidget () {
super.createWidget ();
if ((style & SWT.PASSWORD) != 0) {
NSText fieldEditor = view.window().fieldEditor(true, view);
- long /*int*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
+ long nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
if (fieldEditor != null && nsSecureTextViewClass != 0 && fieldEditor.isKindOfClass(nsSecureTextViewClass)) {
- long /*int*/ editorClass = OS.objc_getClass("SWTSecureEditorView");
+ long editorClass = OS.objc_getClass("SWTSecureEditorView");
OS.object_setClass(fieldEditor.id, editorClass);
}
}
@@ -681,7 +683,7 @@ void deregister() {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if ((style & SWT.SINGLE) != 0) {
if (backgroundImage == null) return;
if (new NSView(id).isKindOfClass(OS.class_NSText)) {
@@ -690,37 +692,19 @@ void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
}
} else if ((style & SWT.MULTI) != 0) {
if (id != scrollView.id) return;
-
- /*
- * If background image has to be set, call fillBackground(). Else, set background color
- * here directly on the NSTextView and return.
- */
- if (backgroundImage == null) {
- double /*float*/ [] background = this.background;
- double /*float*/ alpha;
- if (background == null) {
- background = defaultBackground ().handle;
- alpha = getThemeAlpha ();
- } else {
- alpha = background[3];
- }
- NSColor nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], alpha);
- ((NSTextView) view).setBackgroundColor(nsColor);
- return;
- }
}
fillBackground (view, context, rect, -1);
}
@Override
-void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ viewid) {
+void drawInteriorWithFrame_inView (long id, long sel, NSRect cellFrame, long viewid) {
Control control = findBackgroundControl();
if (control == null) control = this;
Image image = control.backgroundImage;
if (image != null && !image.isDisposed()) {
NSGraphicsContext context = NSGraphicsContext.currentContext();
- control.fillBackground (view, context, cellFrame, -1);
+ control.fillBackground (view, context, cellFrame, -1);
} else if ((style & SWT.SEARCH) != 0) {
// If no background image is set, call custom paint code for search field
drawInteriorWithFrame_inView_searchfield(id, sel, cellFrame, viewid);
@@ -730,7 +714,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
}
-void drawInteriorWithFrame_inView_searchfield (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ viewid) {
+void drawInteriorWithFrame_inView_searchfield (long id, long sel, NSRect cellFrame, long viewid) {
/*
* Cocoa does not support a background color for the search field. Therefore we
* paint it ourselves, if a background color is set.
@@ -784,17 +768,15 @@ void drawInteriorWithFrame_inView_searchfield (long /*int*/ id, long /*int*/ sel
@Override
void drawRect(long id, long sel, NSRect rect) {
+ updateThemeColors();
super.drawRect(id, sel, rect);
- if (display.appAppearance == APPEARANCE.Dark) {
- setDefaultForeground();
- }
}
@Override
boolean dragDetect (int x, int y, boolean filter, boolean [] consume) {
Point selection = getSelection ();
if (selection.x != selection.y) {
- long /*int*/ position = getPosition (x, y);
+ long position = getPosition (x, y);
if (selection.x <= position && position < selection.y) {
if (super.dragDetect (x, y, filter, consume)) {
if (consume != null) consume [0] = true;
@@ -817,7 +799,19 @@ void enableWidget(boolean enabled) {
@Override
Cursor findCursor () {
Cursor cursor = super.findCursor ();
- return (cursor != null) ? cursor : display.getSystemCursor (SWT.CURSOR_IBEAM);
+ if (cursor == null && OS.VERSION < OS.VERSION(10, 14, 0)) {
+ cursor = display.getSystemCursor (SWT.CURSOR_IBEAM);
+ }
+ return cursor;
+}
+
+@Override
+boolean forceFocus(NSView focusView) {
+ receivingFocus = true;
+ boolean result = super.forceFocus(focusView);
+ if (((style & SWT.SINGLE) != 0)) ((NSTextField) view).selectText(null);
+ receivingFocus = false;
+ return result;
}
/**
@@ -836,11 +830,11 @@ Cursor findCursor () {
public int getCaretLineNumber () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
- return (getTopPixel () + getCaretLocation ().y) / getLineHeight ();
+ return (getTopPixel () + getCaretLocation ().y) / getLineHeight ();
}
@Override
-boolean acceptsFirstResponder(long /*int*/ id, long /*int*/ sel) {
+boolean acceptsFirstResponder(long id, long sel) {
if ((style & SWT.READ_ONLY) != 0) return true;
return super.acceptsFirstResponder(id, sel);
}
@@ -870,8 +864,8 @@ public Point getCaretLocation () {
NSLayoutManager layoutManager = widget.layoutManager();
NSTextContainer container = widget.textContainer();
NSRange range = widget.selectedRange();
- long /*int*/ [] rectCount = new long /*int*/ [1];
- long /*int*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
+ long [] rectCount = new long [1];
+ long pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
NSRect rect = new NSRect();
if (rectCount[0] > 0) OS.memmove(rect, pArray, NSRect.sizeof);
return new Point((int)rect.x, (int)rect.y);
@@ -893,10 +887,10 @@ public Point getCaretLocation () {
public int getCaretPosition () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- return selectionRange != null ? (int)/*64*/selectionRange.location : 0;
+ return selectionRange != null ? (int)selectionRange.location : 0;
} else {
NSRange range = ((NSTextView)view).selectedRange();
- return (int)/*64*/range.location;
+ return (int)range.location;
}
}
@@ -915,7 +909,7 @@ public int getCharCount () {
if ((style & SWT.SINGLE) != 0) {
return (int)((NSControl) view).stringValue().length ();
} else {
- return (int)/*64*/((NSTextView) view).textStorage ().length ();
+ return (int)((NSTextView) view).textStorage ().length ();
}
}
@@ -936,7 +930,7 @@ public int getCharCount () {
*/
public boolean getDoubleClickEnabled () {
checkWidget ();
- return doubleClick;
+ return doubleClick;
}
/**
@@ -989,7 +983,7 @@ char [] getEditText () {
str = ((NSTextView)view).textStorage().string();
}
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
char [] buffer = new char [length];
NSRange range = new NSRange ();
range.length = length;
@@ -1005,16 +999,16 @@ char [] getEditText (int start, int end) {
str = ((NSTextView)view).textStorage().string();
}
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
end = Math.min (end, length - 1);
if (start > end) return new char [0];
start = Math.max (0, start);
NSRange range = new NSRange ();
range.location = start;
range.length = Math.max (0, end - start + 1);
- char [] buffer = new char [(int)/*64*/range.length];
+ char [] buffer = new char [(int)range.length];
if (hiddenText != null) {
- System.arraycopy (hiddenText, (int)/*64*/range.location, buffer, 0, buffer.length);
+ System.arraycopy (hiddenText, (int)range.location, buffer, 0, buffer.length);
} else {
str.getCharacters (buffer, range);
}
@@ -1025,7 +1019,7 @@ NSString getInsertString (String string, NSRange range) {
NSString str;
int charCount = getCharCount ();
int length = string.length ();
- int selectionLength = range != null ? (int)/*64*/(range.length) : 0;
+ int selectionLength = range != null ? (int)(range.length) : 0;
if (charCount - selectionLength + length > textLimit) {
length = textLimit - charCount + selectionLength;
length = Math.max (0, length);
@@ -1050,9 +1044,9 @@ public int getLineCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 1;
NSTextStorage storage = ((NSTextView) view).textStorage ();
- int count = (int)/*64*/storage.paragraphs ().count ();
+ int count = (int)storage.paragraphs ().count ();
NSString string = storage.string();
- long /*int*/ length = string.length(), c;
+ long length = string.length(), c;
if (length == 0 || (c = string.characterAtIndex(length - 1)) == '\n' || c == '\r') {
count++;
}
@@ -1142,7 +1136,7 @@ public String getMessage () {
return message;
}
-long /*int*/ getPosition (long /*int*/ x, long /*int*/ y) {
+long getPosition (long x, long y) {
// checkWidget ();
if ((style & SWT.MULTI) != 0) {
NSTextView widget = (NSTextView) view;
@@ -1179,13 +1173,13 @@ public Point getSelection () {
if ((style & SWT.SINGLE) != 0) {
if (selectionRange == null) {
NSString str = ((NSTextField) view).stringValue();
- return new Point((int)/*64*/str.length (), (int)/*64*/str.length ());
+ return new Point((int)str.length (), (int)str.length ());
}
- return new Point ((int)/*64*/selectionRange.location, (int)/*64*/(selectionRange.location + selectionRange.length));
+ return new Point ((int)selectionRange.location, (int)(selectionRange.location + selectionRange.length));
} else {
NSTextView widget = (NSTextView) view;
NSRange range = widget.selectedRange ();
- return new Point ((int)/*64*/range.location, (int)/*64*/(range.location + range.length));
+ return new Point ((int)range.location, (int)(range.location + range.length));
}
}
@@ -1202,11 +1196,11 @@ public Point getSelection () {
public int getSelectionCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- return selectionRange != null ? (int)/*64*/selectionRange.length : 0;
+ return selectionRange != null ? (int)selectionRange.length : 0;
} else {
NSTextView widget = (NSTextView) view;
NSRange range = widget.selectedRange ();
- return (int)/*64*/range.length;
+ return (int)range.length;
}
}
@@ -1230,7 +1224,7 @@ public String getSelectionText () {
NSTextView widget = (NSTextView) view;
NSRange range = widget.selectedRange ();
NSString str = widget.textStorage ().string ();
- char[] buffer = new char [(int)/*64*/range.length];
+ char[] buffer = new char [(int)range.length];
str.getCharacters (buffer, range);
return new String (buffer);
}
@@ -1306,7 +1300,7 @@ public String getText (int start, int end) {
return new String (getEditText (start, end));
}
NSTextStorage storage = ((NSTextView) view).textStorage ();
- end = Math.min (end, (int)/*64*/storage.length () - 1);
+ end = Math.min (end, (int)storage.length () - 1);
if (start > end) return ""; //$NON-NLS-1$
start = Math.max (0, start);
NSRange range = new NSRange ();
@@ -1348,7 +1342,7 @@ public char[] getTextChars () {
return getEditText ();
} else {
NSString str = ((NSTextView)view).textStorage ().string ();
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
char [] buffer = new char [length];
NSRange range = new NSRange ();
range.length = length;
@@ -1375,7 +1369,7 @@ public char[] getTextChars () {
*/
public int getTextLimit () {
checkWidget ();
- return textLimit;
+ return textLimit;
}
/**
@@ -1395,7 +1389,7 @@ public int getTextLimit () {
public int getTopIndex () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
- return getTopPixel () / getLineHeight ();
+ return getTopPixel () / getLineHeight ();
}
/**
@@ -1465,13 +1459,18 @@ public void insert (String string) {
}
void insertEditText (String string) {
+ _insertEditText (string, false);
+}
+
+void _insertEditText (String string, boolean enableUndo) {
int length = string.length ();
Point selection = getSelection ();
if (hasFocus () && hiddenText == null) {
if (textLimit != LIMIT) {
int charCount = getCharCount();
- if (charCount - (selection.y - selection.x) + length > textLimit) {
- length = textLimit - charCount + (selection.y - selection.x);
+ int selectionLength = selection.y - selection.x;
+ if (charCount - selectionLength + length > textLimit) {
+ length = textLimit - charCount + selectionLength;
length = Math.max(0, length);
}
}
@@ -1479,7 +1478,17 @@ void insertEditText (String string) {
string.getChars (0, buffer.length, buffer, 0);
NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
NSText fieldEditor = ((NSTextField) view).currentEditor ();
- if (fieldEditor != null) fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
+ if (fieldEditor != null) {
+ if (enableUndo) {
+ NSUndoManager undoManager = view.undoManager();
+ if (undoManager == null) undoManager = fieldEditor.undoManager();
+ if (undoManager != null) undoManager.beginUndoGrouping ();
+ OS.objc_msgSend (fieldEditor.id, OS.sel_insertText_replacementRange_, nsstring.id, fieldEditor.selectedRange ());
+ if (undoManager != null) undoManager.endUndoGrouping ();
+ } else {
+ fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
+ }
+ }
selectionRange = null;
} else {
String oldText = getText ();
@@ -1496,7 +1505,7 @@ void insertEditText (String string) {
}
@Override
-boolean isEventView (long /*int*/ id) {
+boolean isEventView (long id) {
if ((style & SWT.MULTI) != 0) return super.isEventView (id);
return true;
}
@@ -1530,6 +1539,10 @@ boolean isNeeded(ScrollBar scrollbar) {
*/
public void paste () {
checkWidget ();
+ _paste (false);
+}
+
+void _paste (boolean enableUndo) {
if ((style & SWT.READ_ONLY) != 0) return;
boolean paste = true;
String oldText = null;
@@ -1541,7 +1554,7 @@ public void paste () {
if (newText == null) return;
if (!newText.equals (oldText)) {
if ((style & SWT.SINGLE) != 0) {
- insertEditText (newText);
+ _insertEditText (newText, enableUndo);
} else {
NSTextView textView = (NSTextView) view;
NSRange range = textView.selectedRange ();
@@ -1561,7 +1574,7 @@ public void paste () {
if ((style & SWT.SINGLE) != 0) {
if (oldText == null) oldText = getClipboardText ();
if (oldText == null) return;
- insertEditText (oldText);
+ _insertEditText (oldText, enableUndo);
} else {
if (textLimit != LIMIT) {
if (oldText == null) oldText = getClipboardText ();
@@ -1717,7 +1730,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
boolean result = super.sendKeyEvent (nsEvent, type);
if (!result) return result;
if (type != SWT.KeyDown) return result;
- long /*int*/ modifierFlags = nsEvent.modifierFlags();
+ long modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSCommandKeyMask) != 0) {
short keyCode = nsEvent.keyCode ();
switch (keyCode) {
@@ -1728,7 +1741,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
if ((style & SWT.PASSWORD) == 0) copy ();
return false;
case 9: /* V */
- paste ();
+ _paste (true);
return false;
case 0: /* A */
NSApplication.sharedApplication().sendAction(OS.sel_selectAll_, null, NSApplication.sharedApplication());
@@ -1803,7 +1816,19 @@ void sendCancelSelection () {
@Override
void setBackgroundColor(NSColor nsColor) {
if ((style & SWT.SINGLE) != 0) {
- ((NSTextField) view).setBackgroundColor (nsColor);
+ NSTextField textField = (NSTextField) view;
+ textField.setBackgroundColor (nsColor);
+ /*
+ * When the Text widget has focus, the background color is not drawn,
+ * as the field editor is drawn on top. Set drawsBackground to true
+ * for the field editor.
+ */
+ if ((style & SWT.SEARCH) == 0 && hasFocus()) {
+ NSText fieldEditor = textField.currentEditor();
+ if (fieldEditor != null) {
+ fieldEditor.setDrawsBackground(true);
+ }
+ }
} else {
((NSTextView) view).setBackgroundColor (nsColor);
}
@@ -1817,16 +1842,10 @@ void setBackgroundImage(NSImage image) {
} else {
((NSTextView) view).setDrawsBackground(image == null);
scrollView.setDrawsBackground(image == null);
- }
-}
-void setDefaultForeground() {
- if ((style & SWT.MULTI) != 0) {
- if (foreground != null) return;
- if (getEnabled ()) {
- ((NSTextView) view).setTextColor (NSColor.textColor ());
- } else {
- ((NSTextView) view).setTextColor (NSColor.disabledControlTextColor ());
+ if (image == null) {
+ // Recalculate theme colors lazily
+ lastAppAppearance = null;
}
}
}
@@ -1943,7 +1962,7 @@ void setEditText (char[] text) {
}
@Override
-void setFrameSize(long /*int*/ id, long /*int*/ sel, NSSize size) {
+void setFrameSize(long id, long sel, NSSize size) {
super.setFrameSize (id, sel, size);
/*
* Bug in Cocoa. When a search field is resized while having
@@ -1973,13 +1992,13 @@ void setFont(NSFont font) {
}
@Override
-void setForeground (double /*float*/ [] color) {
+void setForeground (double [] color) {
NSColor nsColor;
if (color == null) {
nsColor = NSColor.textColor ();
if ((style & SWT.MULTI) != 0 && !isEnabled()) nsColor = NSColor.disabledControlTextColor();
} else {
- double /*float*/ alpha = 1;
+ double alpha = 1;
if ((style & SWT.MULTI) != 0 && !isEnabled()) alpha = 0.5f;
nsColor = NSColor.colorWithDeviceRed (color [0], color [1], color [2], alpha);
}
@@ -2111,7 +2130,7 @@ public void setSelection (int start, int end) {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
NSString str = ((NSTextField) view).stringValue();
- int length = (int)/*64*/str.length ();
+ int length = (int)str.length ();
int selStart = Math.min (Math.max (Math.min (start, end), 0), length);
int selEnd = Math.min (Math.max (Math.max (start, end), 0), length);
selectionRange = new NSRange ();
@@ -2123,7 +2142,7 @@ public void setSelection (int start, int end) {
fieldEditor.scrollRangeToVisible (selectionRange);
}
} else {
- int length = (int)/*64*/((NSTextView) view).textStorage ().length ();
+ int length = (int)((NSTextView) view).textStorage ().length ();
int selStart = Math.min (Math.max (Math.min (start, end), 0), length);
int selEnd = Math.min (Math.max (Math.max (start, end), 0), length);
NSRange range = new NSRange ();
@@ -2190,7 +2209,7 @@ public void setTabs (int tabs) {
if (this.tabs == tabs) return;
this.tabs = tabs;
if ((style & SWT.SINGLE) != 0) return;
- double /*float*/ size = textExtent("s").width * tabs;
+ double size = textExtent("s").width * tabs;
NSTextView widget = (NSTextView)view;
NSParagraphStyle defaultStyle = widget.defaultParagraphStyle();
NSMutableParagraphStyle paragraphStyle = new NSMutableParagraphStyle(defaultStyle.mutableCopy());
@@ -2355,7 +2374,7 @@ public void setTopIndex (int index) {
}
@Override
-boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ affectedCharRange, long /*int*/ replacementString) {
+boolean shouldChangeTextInRange_replacementString(long id, long sel, long affectedCharRange, long replacementString) {
NSRange range = new NSRange();
OS.memmove(range, affectedCharRange, NSRange.sizeof);
boolean result = callSuperBoolean(id, sel, range, replacementString);
@@ -2370,9 +2389,9 @@ boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/
String newText = text;
if (hooks (SWT.Verify)) {
NSEvent currentEvent = display.application.currentEvent();
- long /*int*/ type = currentEvent.type();
+ long type = currentEvent.type();
if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
- newText = verifyText(text, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
+ newText = verifyText(text, (int)range.location, (int)(range.location+range.length), currentEvent);
}
if (newText == null) return false;
if (getCharCount() - range.length + newText.length() > textLimit) {
@@ -2380,7 +2399,7 @@ boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/
}
if ((style & SWT.SINGLE) != 0) {
if (text != newText || echoCharacter != '\0') {
- //handle backspace and delete
+ //handle backspace and delete
if (range.length == 1) {
NSText editor = new NSText(id);
editor.setSelectedRange (range);
@@ -2423,20 +2442,20 @@ public void showSelection () {
}
@Override
-void textViewDidChangeSelection(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textViewDidChangeSelection(long id, long sel, long aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSText editor = new NSText (notification.object ().id);
selectionRange = editor.selectedRange ();
}
@Override
-void textDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textDidChange (long id, long sel, long aNotification) {
if ((style & SWT.SINGLE) != 0) super.textDidChange (id, sel, aNotification);
postEvent (SWT.Modify);
}
@Override
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (long id, long sel, long aTextView, long oldSelectedCharRange, long newSelectedCharRange) {
/*
* If the selection is changing as a result of the receiver getting focus
* then return the receiver's last selection range, otherwise the full
@@ -2457,7 +2476,7 @@ int traversalCode (int key, NSEvent theEvent) {
if ((style & SWT.MULTI) != 0) {
bits &= ~SWT.TRAVERSE_RETURN;
if (key == 48 /* Tab */ && theEvent != null) {
- long /*int*/ modifiers = theEvent.modifierFlags ();
+ long modifiers = theEvent.modifierFlags ();
boolean next = (modifiers & OS.NSShiftKeyMask) == 0;
if (next && (modifiers & OS.NSControlKeyMask) == 0) {
bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS);
@@ -2475,6 +2494,31 @@ void updateCursorRects (boolean enabled) {
contentView.setDocumentCursor (enabled ? NSCursor.IBeamCursor () : null);
}
+void updateThemeColors() {
+ // See code comment in Link.updateThemeColors() for explanation
+
+ // Avoid infinite loop of redraws
+ if (lastAppAppearance == display.appAppearance) return;
+ lastAppAppearance = display.appAppearance;
+ // Only multi-line controls are affected
+ if ((style & SWT.MULTI) == 0) return;
+
+ if (foreground == null) {
+ if (getEnabled ()) {
+ ((NSTextView) view).setTextColor (NSColor.textColor ());
+ } else {
+ ((NSTextView) view).setTextColor (NSColor.disabledControlTextColor ());
+ }
+ }
+
+ if ((backgroundImage == null) && (background == null)) {
+ double [] background = defaultBackground ().handle;
+ double alpha = getThemeAlpha ();
+ NSColor nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], alpha);
+ ((NSTextView) view).setBackgroundColor(nsColor);
+ }
+}
+
String verifyText (String string, int start, int end, NSEvent keyEvent) {
Event event = new Event ();
if (keyEvent != null) setKeyState(event, SWT.MouseDown, keyEvent);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
index 63a3dc438e..3fe7c57979 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
@@ -111,7 +111,7 @@ ToolBar(Composite parent, int style, boolean internal) {
}
@Override
-long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityAttributeValue (long id, long sel, long arg0) {
NSString nsAttributeName = new NSString(arg0);
if (id == accessibleHandle() && accessible != null) {
@@ -125,7 +125,7 @@ long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, lon
if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute))
return role.id;
else {
- long /*int*/ roleDescription = OS.NSAccessibilityRoleDescription(role.id, 0);
+ long roleDescription = OS.NSAccessibilityRoleDescription(role.id, 0);
return roleDescription;
}
} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityChildrenAttribute)) {
@@ -146,7 +146,7 @@ long /*int*/ accessibilityAttributeValue (long /*int*/ id, long /*int*/ sel, lon
}
@Override
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
// Toolbars aren't ignored.
if (id == view.id) return false;
return super.accessibilityIsIgnored(id, sel);
@@ -243,15 +243,27 @@ void createHandle () {
NSWindow window = parent.view.window();
window.setToolbar(nsToolbar);
nsToolbar.setVisible(true);
+
NSArray views = window.contentView().superview().subviews();
- for (int i = 0; i < views.count(); i++) {
+ int i = 0;
+ while (i < views.count()) {
id id = views.objectAtIndex(i);
- if (new NSObject(id).className().getString().equals("NSToolbarView")) {
+ String className = new NSObject(id).className().getString();
+ if (className.equals("NSToolbarView")) {
view = new NSView(id);
OS.object_setClass(view.id, OS.objc_getClass("SWTToolbarView"));
view.retain();
break;
}
+ if (className.equals("NSTitlebarContainerView")) {
+ views = new NSView(id).subviews();
+ i = 0;
+ } else if (className.equals("NSTitlebarView")) {
+ views = new NSView(id).subviews();
+ i = 0;
+ } else {
+ i++;
+ }
}
style &= ~SWT.SMOOTH;
} else {
@@ -278,13 +290,13 @@ void createItem (ToolItem item, int index) {
System.arraycopy (items, 0, newItems, 0, items.length);
items = newItems;
}
- item.createWidget();
+ item.createWidget();
System.arraycopy (items, index, items, index + 1, itemCount++ - index);
items [index] = item;
if (nsToolbar != null) {
- nsToolbar.insertItemWithItemIdentifier(item.getItemID(), index);
+ nsToolbar.insertItemWithItemIdentifier(item.getItemID(), index);
} else {
- view.addSubview(item.view);
+ view.addSubview(item.view);
}
relayout ();
}
@@ -326,7 +338,7 @@ void destroyItem (ToolItem item) {
}
@Override
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (id != view.id) return;
if (background != null) {
fillBackground (view, context, rect, -1);
@@ -495,7 +507,7 @@ public int getRowCount () {
}
@Override
-boolean hasKeyboardFocus(long /*int*/ inId) {
+boolean hasKeyboardFocus(long inId) {
return hasFocus();
}
@@ -574,6 +586,14 @@ int [] layoutUnified (int width, int height, boolean resize) {
for (int i=0; i<itemCount; i++) {
Point size = sizes [i] = items [i].computeSize ();
containerRects [i] = new NSView(itemViewers.objectAtIndex(i)).frame();
+ // workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=539693
+ if (containerRects [i].width < 0 || containerRects [i].width > 100000) {
+ containerRects [i].x = 0;
+ containerRects [i].y = 0;
+ containerRects [i].width = 0;
+ containerRects [i].height = 0;
+ }
+
if (i == 0) x = (int) containerRects[0].x;
itemHeight = Math.max (itemHeight, size.y);
}
@@ -671,11 +691,11 @@ void releaseChildren (boolean destroy) {
@Override
void releaseHandle () {
- super.releaseHandle ();
+ super.releaseHandle ();
- if (nsToolbar != null) {
- nsToolbar.release();
- nsToolbar = null;
+ if (nsToolbar != null) {
+ nsToolbar.release();
+ nsToolbar = null;
}
if (accessibilityAttributes != null) accessibilityAttributes.release();
@@ -768,12 +788,12 @@ public void setRedraw (boolean redraw) {
@Override
public void setVisible(boolean visible) {
- if (nsToolbar != null) nsToolbar.setVisible(visible);
- super.setVisible(visible);
+ if (nsToolbar != null) nsToolbar.setVisible(visible);
+ super.setVisible(visible);
}
@Override
-long /*int*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar, long /*int*/ itemIdentifier, boolean flag) {
+long toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(long id, long sel, long toolbar, long itemIdentifier, boolean flag) {
NSString itemID = new NSString(itemIdentifier);
for (int j = 0; j < itemCount; j++) {
ToolItem item = items[j];
@@ -789,7 +809,7 @@ long /*int*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(long /*int*
* return all of the item IDs.
*/
@Override
-long /*int*/ toolbarAllowedItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
+long toolbarAllowedItemIdentifiers(long id, long sel, long toolbar) {
NSMutableArray array = NSMutableArray.arrayWithCapacity(itemCount);
for (int i = 0; i < itemCount; i++) {
array.addObject(items[i].nsItem.itemIdentifier());
@@ -801,7 +821,7 @@ long /*int*/ toolbarAllowedItemIdentifiers(long /*int*/ id, long /*int*/ sel, lo
* This delegate method isn't really needed because ToolBars aren't customizable, but it's required according to the documentation.
*/
@Override
-long /*int*/ toolbarDefaultItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
+long toolbarDefaultItemIdentifiers(long id, long sel, long toolbar) {
return toolbarAllowedItemIdentifiers(id, sel, toolbar);
}
@@ -810,7 +830,7 @@ long /*int*/ toolbarDefaultItemIdentifiers(long /*int*/ id, long /*int*/ sel, lo
* by setSelectedItemIdentifier.
*/
@Override
-long /*int*/ toolbarSelectableItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
+long toolbarSelectableItemIdentifiers(long id, long sel, long toolbar) {
NSMutableArray array = NSMutableArray.arrayWithCapacity(itemCount);
for (int i = 0; i < itemCount; i++) {
if ((items[i].style & SWT.RADIO) != 0) array.addObject(items[i].nsItem.itemIdentifier());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
index b3313d94d4..d9648ef5ac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
@@ -141,16 +141,16 @@ public ToolItem (ToolBar parent, int style, int index) {
}
@Override
-long /*int*/ accessibleHandle() {
+long accessibleHandle() {
if (button != null && button.cell() != null) return button.cell().id;
if (view != null) return view.id;
return 0;
}
@Override
-long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityActionNames(long id, long sel) {
- long /*int*/ returnValue = super.accessibilityActionNames(id, sel);
+ long returnValue = super.accessibilityActionNames(id, sel);
if (id == accessibleHandle()) {
if ((style & SWT.DROP_DOWN) != 0) {
@@ -167,9 +167,9 @@ long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityAttributeNames(long id, long sel) {
- long /*int*/ returnValue = super.accessibilityAttributeNames(id, sel);
+ long returnValue = super.accessibilityAttributeNames(id, sel);
if (id == accessibleHandle()) {
if ((style & (SWT.CHECK|SWT.RADIO)) !=0) {
@@ -192,7 +192,7 @@ long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityAttributeValue(long id, long sel, long arg0) {
NSString nsAttributeName = new NSString(arg0);
if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
@@ -205,7 +205,7 @@ long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long
if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) {
return roleText.id;
} else { // NSAccessibilityRoleDescriptionAttribute
- long /*int*/ description = OS.NSAccessibilityRoleDescription (roleText.id, 0);
+ long description = OS.NSAccessibilityRoleDescription (roleText.id, 0);
return description;
}
}
@@ -242,7 +242,7 @@ long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long
}
@Override
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
// The interesting part of a ToolItem is its button, if it has one.
if (id == accessibleHandle()) return false;
return super.accessibilityIsIgnored(id, sel);
@@ -425,7 +425,7 @@ void destroyWidget() {
}
@Override
-void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ image, NSRect rect, long /*int*/ view) {
+void drawImageWithFrameInView (long id, long sel, long image, NSRect rect, long view) {
if (text.length () > 0) {
if ((parent.style & SWT.RIGHT) != 0) {
rect.x += 3;
@@ -433,7 +433,7 @@ void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ i
rect.y += 3;
}
}
- long /*int*/ cgContext = NSGraphicsContext.currentContext().graphicsPort();
+ long cgContext = NSGraphicsContext.currentContext().graphicsPort();
NSCell cell = new NSCell(id);
boolean drawSelected = (parent.nsToolbar != null) && getSelection() && ((style & SWT.CHECK) != 0) && !cell.isHighlighted();
@@ -458,12 +458,12 @@ void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ i
}
@Override
-NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ title, NSRect titleRect, long /*int*/ view) {
- boolean hiliteShadow = new NSButtonCell(id).isHighlighted() && text.length() > 0 && image == null;
+NSRect drawTitleWithFrameInView (long id, long sel, long title, NSRect titleRect, long view) {
+ boolean hiliteShadow = new NSButtonCell(id).isHighlighted() && text.length() > 0 && image == null;
- // An unbordered cell doesn't draw any highlighting when pushed or selected, so we have to do it here.
- if (hiliteShadow) {
- NSColor transWhiteColor = NSColor.colorWithDeviceRed(1.0f, 1.0f, 1.0f, .8f);
+ // An unbordered cell doesn't draw any highlighting when pushed or selected, so we have to do it here.
+ if (hiliteShadow) {
+ NSColor transWhiteColor = NSColor.colorWithDeviceRed(1.0f, 1.0f, 1.0f, .8f);
NSAttributedString attribStr = new NSAttributedString(title);
NSMutableAttributedString tmpString = new NSMutableAttributedString(attribStr.mutableCopy());
NSRange range = new NSRange();
@@ -472,19 +472,22 @@ NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/
tmpString.addAttribute(OS.NSForegroundColorAttributeName, transWhiteColor, range);
tmpString.autorelease();
title = tmpString.id;
- }
+ }
return super.drawTitleWithFrameInView(id, sel, title, titleRect, view);
}
@Override
-void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long id, NSGraphicsContext context, NSRect rect) {
if (id == view.id) {
boolean drawSelected = getSelection() && (parent.nsToolbar == null);
if (drawSelected) {
NSRect bounds = view.bounds();
context.saveGraphicsState();
- NSColor.colorWithDeviceRed(0.1f, 0.1f, 0.1f, 0.1f).setFill();
- NSColor.colorWithDeviceRed(0.2f, 0.2f, 0.2f, 0.2f).setStroke();
+ boolean isDark = OS.isAppDarkAppearance();
+ float fillColor = isDark ? 0.9f : 0.1f;
+ float strokeColor = isDark ? 0.8f : 0.2f;
+ NSColor.colorWithDeviceRed(fillColor, fillColor, fillColor, 0.1f).setFill();
+ NSColor.colorWithDeviceRed(strokeColor, strokeColor, strokeColor, 0.2f).setStroke();
NSBezierPath.fillRect(bounds);
bounds.x += 0.5f;
bounds.y += 0.5f;
@@ -637,24 +640,38 @@ public Image getHotImage () {
return hotImage;
}
+/**
+ * Returns the receiver's enabled image if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's enabled image
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+@Override
+public Image getImage () {
+ return super.getImage();
+}
+
NSString getItemID() {
- NSString itemID = id;
+ NSString itemID = id;
- // For separators, return a Cocoa constant for the tool item ID.
- if ((style & SWT.SEPARATOR) != 0) {
- // If we are using a non-default width or control use that instead.
- if (control == null) {
- if (width == DEFAULT_SEPARATOR_WIDTH || width == 0) {
- if (OS.VERSION < 0x1070) itemID = OS.NSToolbarSeparatorItemIdentifier;
- } else if (width == SWT.DEFAULT) {
- itemID = OS.NSToolbarSpaceItemIdentifier;
- } else if (width == SWT.SEPARATOR_FILL) {
- itemID = OS.NSToolbarFlexibleSpaceItemIdentifier;
- }
- }
- }
+ // For separators, return a Cocoa constant for the tool item ID.
+ if ((style & SWT.SEPARATOR) != 0) {
+ // If we are using a non-default width or control use that instead.
+ if (control == null) {
+ if (width == SWT.DEFAULT) {
+ itemID = OS.NSToolbarSpaceItemIdentifier;
+ } else if (width == SWT.SEPARATOR_FILL) {
+ itemID = OS.NSToolbarFlexibleSpaceItemIdentifier;
+ }
+ }
+ }
- return itemID;
+ return itemID;
}
/**
@@ -751,12 +768,12 @@ boolean isDrawing () {
}
@Override
-long /*int*/ menuForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+long menuForEvent (long id, long sel, long theEvent) {
return parent.menuForEvent (id, sel, theEvent);
}
@Override
-void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseDown)) return;
Display display = this.display;
display.trackingControl = parent;
@@ -773,55 +790,55 @@ void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-boolean mouseDownCanMoveWindow(long /*int*/ id, long /*int*/ sel) {
+boolean mouseDownCanMoveWindow(long id, long sel) {
if (id == view.id) return false;
return super.mouseDownCanMoveWindow(id, sel);
}
@Override
-void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseUp(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseUp)) return;
super.mouseUp(id, sel, theEvent);
}
@Override
-void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDragged(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseMove)) return;
super.mouseDragged(id, sel, theEvent);
}
@Override
-void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDown(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseDown)) return;
super.rightMouseDown(id, sel, theEvent);
}
@Override
-void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseUp(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseUp)) return;
super.rightMouseUp(id, sel, theEvent);
}
@Override
-void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDragged(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseMove)) return;
super.rightMouseDragged(id, sel, theEvent);
}
@Override
-void otherMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseDown(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseDown)) return;
super.otherMouseDown(id, sel, theEvent);
}
@Override
-void otherMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseUp(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseUp)) return;
super.otherMouseUp(id, sel, theEvent);
}
@Override
-void otherMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseDragged(long id, long sel, long theEvent) {
if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseMove)) return;
super.otherMouseDragged(id, sel, theEvent);
}
@@ -875,12 +892,12 @@ void releaseHandle () {
if (button != null) button.release ();
view = button = null;
if (nsItem != null) {
- nsItem.release();
- nsItem = null;
+ nsItem.release();
+ nsItem = null;
}
if (id != null) {
- id.release();
- id = null;
+ id.release();
+ id = null;
}
if (nsMenuRep != null) {
nsMenuRep.release();
@@ -978,12 +995,12 @@ public void setControl (Control control) {
if (this.control == control) return;
if (parent.nsToolbar == null) {
- NSBox widget = (NSBox)view;
- if (control == null) {
- widget.setBoxType(OS.NSBoxSeparator);
- } else {
- widget.setBoxType(OS.NSBoxCustom);
- }
+ NSBox widget = (NSBox)view;
+ if (control == null) {
+ widget.setBoxType(OS.NSBoxSeparator);
+ } else {
+ widget.setBoxType(OS.NSBoxCustom);
+ }
} else {
nsItem.setMenuFormRepresentation(control == null ? nsMenuRep : NSMenuItem.separatorItem());
}
@@ -1041,6 +1058,7 @@ public void setEnabled (boolean enabled) {
*/
public void setDisabledImage (Image image) {
checkWidget();
+ if (this.disabledImage == image) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
disabledImage = image;
@@ -1076,6 +1094,7 @@ boolean setFocus () {
*/
public void setHotImage (Image image) {
checkWidget();
+ if (this.hotImage == image) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
hotImage = image;
@@ -1085,6 +1104,7 @@ public void setHotImage (Image image) {
@Override
public void setImage (Image image) {
checkWidget();
+ if (this.image == image) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
super.setImage (image);
@@ -1213,14 +1233,14 @@ public void setToolTipText (String string) {
checkWidget();
if (string == null && toolTipText == null) return;
if (string != null && string.equals (toolTipText)) return;
- toolTipText = string;
+ toolTipText = string;
if (parent.nsToolbar != null) {
- char[] chars = new char [toolTipText.length ()];
- string.getChars (0, chars.length, chars, 0);
- int length = fixMnemonic (chars);
- nsItem.setToolTip(NSString.stringWithCharacters (chars, length));
+ char[] chars = new char [toolTipText.length ()];
+ string.getChars (0, chars.length, chars, 0);
+ int length = fixMnemonic (chars);
+ nsItem.setToolTip(NSString.stringWithCharacters (chars, length));
} else {
- parent.checkToolTip (this);
+ parent.checkToolTip (this);
}
}
@@ -1308,7 +1328,7 @@ void updateImage (boolean layout) {
}
@Override
-boolean validateMenuItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menuItem) {
+boolean validateMenuItem(long id, long sel, long menuItem) {
return isEnabled();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
index e28748b86b..65931fb7b9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
@@ -202,7 +202,7 @@ Point adjustMoveCursor () {
int newY = bounds.y;
/*
* Convert to screen coordinates if needed
- */
+ */
if (parent != null) {
Point pt = parent.toDisplay (newX, newY);
newX = pt.x;
@@ -234,7 +234,7 @@ Point adjustResizeCursor (boolean movePointer) {
/*
* Convert to screen coordinates if needed
- */
+ */
if (parent != null) {
Point pt = parent.toDisplay (newX, newY);
newX = pt.x;
@@ -356,6 +356,15 @@ Rectangle [] computeProportions (Rectangle [] rects) {
void drawRectangles (NSWindow window, Rectangle [] rects, boolean erase) {
NSGraphicsContext context = window.graphicsContext();
+ if (context == null) {
+ long width = (long) window.frame().width;
+ long height = (long) window.frame().height;
+ NSBitmapImageRep rep = (NSBitmapImageRep) new NSBitmapImageRep().alloc();
+ rep = rep.initWithBitmapDataPlanes(0, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace,
+ OS.NSAlphaFirstBitmapFormat, width * 4, 32);
+ context = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
+ rep.release();
+ }
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(context);
context.saveGraphicsState();
@@ -368,7 +377,7 @@ void drawRectangles (NSWindow window, Rectangle [] rects, boolean erase) {
context.setCompositingOperation(erase ? OS.NSCompositeClear : OS.NSCompositeSourceOver);
NSRect rectFrame = new NSRect();
NSPoint globalPoint = new NSPoint();
- double /*float*/ screenHeight = display.getPrimaryFrame().height;
+ double screenHeight = display.getPrimaryFrame().height;
for (int i=0; i<rects.length; i++) {
Rectangle rect = rects [i];
rectFrame.x = rect.x + parentOrigin.x;
@@ -552,7 +561,7 @@ void mouse (NSEvent nsEvent) {
}
oldX = newX; oldY = newY;
}
- switch ((int)/*64*/nsEvent.type()) {
+ switch ((int)nsEvent.type()) {
case OS.NSLeftMouseUp:
case OS.NSRightMouseUp:
case OS.NSOtherMouseUp:
@@ -561,8 +570,8 @@ void mouse (NSEvent nsEvent) {
}
void key (NSEvent nsEvent) {
- int nsType = (int)/*64*/nsEvent.type();
- long /*int*/ modifierFlags = nsEvent.modifierFlags();
+ int nsType = (int)nsEvent.type();
+ long modifierFlags = nsEvent.modifierFlags();
int nsKeyCode = nsEvent.keyCode();
int keyCode = Display.translateKey (nsKeyCode);
@@ -780,7 +789,7 @@ public boolean open () {
* NSWindow. Fix is to use one NSWindow per screen.
*/
NSArray screens = NSScreen.screens();
- int count = (int)/*64*/screens.count();
+ int count = (int)screens.count();
windows = new NSWindow [count];
for (int i = 0; i < count; i++) {
NSScreen screen = new NSScreen(screens.objectAtIndex(i));
@@ -792,6 +801,15 @@ public boolean open () {
window.setContentView(null);
window.setBackgroundColor(NSColor.clearColor());
NSGraphicsContext context = window.graphicsContext();
+ if (context == null) {
+ long width = (long) window.frame().width;
+ long height = (long) window.frame().height;
+ NSBitmapImageRep rep = (NSBitmapImageRep) new NSBitmapImageRep().alloc();
+ rep = rep.initWithBitmapDataPlanes(0, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace,
+ OS.NSAlphaFirstBitmapFormat, width * 4, 32);
+ context = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
+ rep.release();
+ }
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(context);
context.setCompositingOperation(OS.NSCompositeClear);
@@ -824,7 +842,7 @@ public boolean open () {
NSApplication application = NSApplication.sharedApplication();
NSEvent currentEvent = application.currentEvent();
if (currentEvent != null) {
- switch ((int)/*64*/currentEvent.type()) {
+ switch ((int)currentEvent.type()) {
case OS.NSLeftMouseDown:
case OS.NSLeftMouseDragged:
case OS.NSRightMouseDown:
@@ -859,7 +877,7 @@ public boolean open () {
display.runDeferredLayouts ();
NSEvent event = application.nextEventMatchingMask(OS.NSAnyEventMask, NSDate.distantFuture(), OS.NSDefaultRunLoopMode, true);
if (event == null) continue;
- int type = (int)/*64*/event.type();
+ int type = (int)event.type();
switch (type) {
case OS.NSLeftMouseUp:
case OS.NSRightMouseUp:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
index edeab7bfc6..558908bb5e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
@@ -511,7 +511,7 @@ void displayMenu () {
boolean shouldShowMenu (NSEvent event) {
if (!hooks(SWT.MenuDetect)) return false;
- switch ((int)/*64*/event.type()) {
+ switch ((int)event.type()) {
case OS.NSRightMouseDown: return true;
case OS.NSLeftMouseDown:
if (!(hooks(SWT.Selection) || hooks(SWT.DefaultSelection))) {
@@ -529,7 +529,7 @@ boolean shouldShowMenu (NSEvent event) {
}
@Override
-void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown(long id, long sel, long theEvent) {
NSEvent nsEvent = new NSEvent(theEvent);
highlight = true;
updateImage();
@@ -541,7 +541,7 @@ void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDragged(long id, long sel, long theEvent) {
NSEvent nsEvent = new NSEvent(theEvent);
NSRect frame = view.frame();
boolean oldHighlight = highlight;
@@ -557,7 +557,7 @@ void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseUp(long id, long sel, long theEvent) {
if (highlight) {
NSEvent nsEvent = new NSEvent(theEvent);
if (nsEvent.type() == OS.NSLeftMouseUp) {
@@ -570,28 +570,28 @@ void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDown(long id, long sel, long theEvent) {
mouseDown(id, sel, theEvent);
}
@Override
-void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseUp(long id, long sel, long theEvent) {
mouseUp(id, sel, theEvent);
}
@Override
-void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDragged(long id, long sel, long theEvent) {
mouseDragged(id, sel, theEvent);
}
@Override
-void drawRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawRect(long id, long sel, NSRect rect) {
item.drawStatusBarBackgroundInRect(rect, highlight);
super.drawRect(id, sel, rect);
}
void updateImage () {
- double /*float*/ width = 0;
+ double width = 0;
Image image = this.image;
if (highlight && highlightImage != null) image = highlightImage;
if (image == null) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index 6fcb41098f..1c2de57fa6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -62,7 +62,7 @@ import org.eclipse.swt.internal.cocoa.*;
* <dt><b>Styles:</b></dt>
* <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL</dd>
* <dt><b>Events:</b></dt>
- * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem</dd>
+ * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem, EmptinessChanged</dd>
* </dl>
* <p>
* Note: Only one of the styles SINGLE and MULTI may be specified.
@@ -76,6 +76,7 @@ import org.eclipse.swt.internal.cocoa.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class Tree extends Composite {
+ private static final TreeItem[] NO_ITEM = new TreeItem[0];
NSTableColumn firstColumn, checkColumn;
NSTextFieldCell dataCell;
NSButtonCell buttonCell;
@@ -91,15 +92,19 @@ public class Tree extends Composite {
Rectangle imageBounds;
TreeItem insertItem;
boolean insertBefore;
- double /*float*/ [] headerBackground, headerForeground;
+ double [] headerBackground, headerForeground;
/* Used to control drop feedback when DND.FEEDBACK_EXPAND and DND.FEEDBACK_SCROLL is set/not set */
boolean shouldExpand = true, shouldScroll = true;
static int NEXT_ID;
- /* Value has been determined experimentally, see bug 516472. On macOS 10.12, right end of expando triangle is at x=16. */
- static final int FIRST_COLUMN_MINIMUM_WIDTH = 17;
+ /*
+ * Value has been determined experimentally, see bug 516472.
+ * On macOS 10.12, right end of expando triangle is at x=16.
+ * On macOS 11, value less than 19 doesn't work.
+ */
+ static final int FIRST_COLUMN_MINIMUM_WIDTH = 19;
static final int IMAGE_GAP = 3;
static final int TEXT_GAP = 2;
static final int CELL_GAP = 1;
@@ -166,20 +171,20 @@ TreeItem _getItem (TreeItem parentItem, int index, boolean create) {
}
@Override
-boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean acceptsFirstResponder (long id, long sel) {
return true;
}
@Override
-long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
- long /*int*/ returnValue = 0;
+long accessibilityAttributeValue(long id, long sel, long arg0) {
+ long returnValue = 0;
NSString attributeName = new NSString(arg0);
// If the check column is visible, don't report it back as a column for accessibility purposes.
// The check column is meant to appear as a part of the first column.
if (attributeName.isEqualToString (OS.NSAccessibilityColumnsAttribute) || attributeName.isEqualToString(OS.NSAccessibilityVisibleColumnsAttribute)) {
if ((style & SWT.CHECK) != 0) {
- long /*int*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+ long superValue = super.accessibilityAttributeValue(id, sel, arg0);
if (superValue != 0) {
NSArray columns = new NSArray(superValue);
NSMutableArray columnsWithoutCheck = NSMutableArray.arrayWithCapacity(columns.count() - 1);
@@ -276,17 +281,17 @@ int calculateWidth (TreeItem[] items, int index, GC gc, boolean recurse) {
}
@Override
-NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
+NSSize cellSize (long id, long sel) {
NSSize size = super.cellSize(id, sel);
NSCell cell = new NSCell(id);
NSImage image = cell.image();
if (image != null) size.width += imageBounds.width + IMAGE_GAP;
if (hooks(SWT.MeasureItem)) {
- long /*int*/ [] outValue = new long /*int*/ [1];
+ long [] outValue = new long [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
TreeItem item = (TreeItem) display.getWidget (outValue [0]);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- long /*int*/ tableColumn = outValue[0];
+ long tableColumn = outValue[0];
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -300,13 +305,13 @@ NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
}
@Override
-boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ rowIndexes, NSPoint mouseDownPoint) {
+boolean canDragRowsWithIndexes_atPoint(long id, long sel, long rowIndexes, NSPoint mouseDownPoint) {
if (!super.canDragRowsWithIndexes_atPoint(id, sel, rowIndexes, mouseDownPoint)) return false;
// If the current row is not selected and the user is not attempting to modify the selection, select the row first.
NSTableView widget = (NSTableView)view;
- long /*int*/ row = widget.rowAtPoint(mouseDownPoint);
- long /*int*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
+ long row = widget.rowAtPoint(mouseDownPoint);
+ long modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
boolean drag = (state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect);
if (drag) {
@@ -466,7 +471,7 @@ void clearCachedWidth (TreeItem[] items) {
}
@Override
-void collapseItem_collapseChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ itemID, boolean children) {
+void collapseItem_collapseChildren (long id, long sel, long itemID, boolean children) {
TreeItem item = (TreeItem)display.getWidget(itemID);
if (item == null) return;
if (!ignoreExpand) item.sendExpand (false, children);
@@ -478,7 +483,7 @@ void collapseItem_collapseChildren (long /*int*/ id, long /*int*/ sel, long /*in
}
@Override
-long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {
+long columnAtPoint(long id, long sel, NSPoint point) {
if ((style & SWT.CHECK) != 0) {
if (point.x <= getCheckColumnWidth() && point.y < headerView.frame().height) return 1;
}
@@ -505,7 +510,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
width = wHint;
}
if (hHint == SWT.DEFAULT) {
- height = (int)/*64*/((NSOutlineView) view).numberOfRows () * getItemHeight () + getHeaderHeight ();
+ height = (int)((NSOutlineView) view).numberOfRows () * getItemHeight () + getHeaderHeight ();
} else {
height = hHint;
}
@@ -587,7 +592,13 @@ void createHandle () {
spacing.width = spacing.height = CELL_GAP;
widget.setIntercellSpacing(spacing);
widget.setDoubleAction (OS.sel_sendDoubleSelection);
- if (!hasBorder ()) widget.setFocusRingType (OS.NSFocusRingTypeNone);
+
+ if (OS.isBigSurOrLater()) {
+ OS.objc_msgSend(widget.id, OS.sel_setStyle, OS.NSTableViewStylePlain);
+ }
+
+ // This is to mirror Table's behavior, see code comment there
+ widget.setFocusRingType(OS.NSFocusRingTypeNone);
headerView = (NSTableHeaderView)new SWTTableHeaderView ().alloc ().init ();
widget.setHeaderView (null);
@@ -604,7 +615,7 @@ void createHandle () {
widget.setOutlineTableColumn (checkColumn);
checkColumn.setResizingMask (OS.NSTableColumnNoResizing);
checkColumn.setEditable (false);
- long /*int*/ cls = NSButton.cellClass (); /* use our custom cell class */
+ long cls = NSButton.cellClass (); /* use our custom cell class */
buttonCell = new NSButtonCell (OS.class_createInstance (cls, 0));
buttonCell.init ();
checkColumn.setDataCell (buttonCell);
@@ -634,7 +645,7 @@ void createHandle () {
widget.addTableColumn (firstColumn);
widget.setOutlineTableColumn (firstColumn);
dataCell = (NSTextFieldCell)new SWTImageTextCell ().alloc ().init ();
- dataCell.setLineBreakMode(OS.NSLineBreakByTruncatingTail);
+ dataCell.setLineBreakMode(OS.NSLineBreakByClipping);
firstColumn.setDataCell (dataCell);
scrollView = scrollWidget;
@@ -681,6 +692,7 @@ void createItem (TreeColumn column, int index) {
}
column.createJNIRef ();
NSTableHeaderCell headerCell = (NSTableHeaderCell)new SWTTableHeaderCell ().alloc ().init ();
+ if (font != null) headerCell.setFont(font.handle);
nsColumn.setHeaderCell (headerCell);
display.addWidget (headerCell, column);
column.nsColumn = nsColumn;
@@ -697,6 +709,10 @@ void createItem (TreeColumn column, int index) {
}
}
+/**
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(org.eclipse.swt.widgets.Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
+ */
void createItem (TreeItem item, TreeItem parentItem, int index) {
int count;
TreeItem [] items;
@@ -748,6 +764,11 @@ void createItem (TreeItem item, TreeItem parentItem, int index) {
widget.expandItem (parentItem.handle);
}
ignoreExpand = false;
+ if (parentItem == null && this.itemCount == 1) {
+ Event event = new Event ();
+ event.detail = 0;
+ sendEvent (SWT.EmptinessChanged, event);
+ }
}
@Override
@@ -773,7 +794,7 @@ Color defaultForeground () {
}
@Override
-void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void deselectAll(long id, long sel, long sender) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() != -1) return;
@@ -782,7 +803,7 @@ void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
}
@Override
-void deselectRow (long /*int*/ id, long /*int*/ sel, long /*int*/ index) {
+void deselectRow (long id, long sel, long index) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() == index) return;
@@ -836,7 +857,7 @@ public void deselect (TreeItem item) {
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
NSOutlineView widget = (NSOutlineView)view;
- long /*int*/ row = widget.rowForItem(item.handle);
+ long row = widget.rowForItem(item.handle);
ignoreSelect = true;
widget.deselectRow (row);
ignoreSelect = false;
@@ -931,9 +952,9 @@ void destroyItem (TreeColumn column) {
}
NSArray array = ((NSOutlineView)view).tableColumns ();
- int arraySize = (int)/*64*/array.count ();
+ int arraySize = (int)array.count ();
for (int i = oldIndex; i < arraySize; i++) {
- long /*int*/ columnId = array.objectAtIndex (i).id;
+ long columnId = array.objectAtIndex (i).id;
for (int j = 0; j < columnCount; j++) {
if (columns[j].nsColumn.id == columnId) {
columns [j].sendEvent (SWT.Move);
@@ -979,6 +1000,11 @@ void destroyItem (TreeItem item) {
setScrollWidth ();
if (this.itemCount == 0) imageBounds = null;
if (insertItem == item) insertItem = null;
+ if (parentItem == null && this.itemCount == 0) {
+ Event event = new Event ();
+ event.detail = 1;
+ sendEvent (SWT.EmptinessChanged, event);
+ }
}
@Override
@@ -988,14 +1014,14 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
}
@Override
-void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long id, long sel, NSRect rect) {
super.drawViewBackgroundInRect(id, sel, rect);
if (id != view.id) return;
fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
}
@Override
-void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rect, long /*int*/ view) {
+void drawInteriorWithFrame_inView (long id, long sel, NSRect rect, long view) {
boolean hooksErase = hooks (SWT.EraseItem);
boolean hooksPaint = hooks (SWT.PaintItem);
boolean hooksMeasure = hooks (SWT.MeasureItem);
@@ -1003,17 +1029,17 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
NSTextFieldCell cell = new NSTextFieldCell (id);
NSOutlineView widget = (NSOutlineView)this.view;
- long /*int*/ [] outValue = new long /*int*/ [1];
+ long [] outValue = new long [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
- long /*int*/ rowIndex = widget.rowForItem(new id(outValue [0]));
+ long rowIndex = widget.rowForItem(new id(outValue [0]));
if (rowIndex == -1) {
return; // the row item doesn't exist or has been disposed
}
TreeItem item = (TreeItem) display.getWidget (outValue [0]);
if (item == null) return;
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- long /*int*/ tableColumn = outValue[0];
- long /*int*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
+ long tableColumn = outValue[0];
+ long nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -1033,7 +1059,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
Color selectionBackground = null, selectionForeground = null;
if (isSelected && (hooksErase || hooksPaint)) {
selectionForeground = Color.cocoa_new(display, (hasFocus || Display.APPEARANCE.Dark == display.appAppearance) ? display.alternateSelectedControlTextColor : display.selectedControlTextColor);
- selectionBackground = Color.cocoa_new(display, hasFocus ? display.alternateSelectedControlColor : display.secondarySelectedControlColor);
+ selectionBackground = Color.cocoa_new(display, hasFocus ? display.getAlternateSelectedControlColor() : display.getSecondarySelectedControlColor());
}
NSSize contentSize = super.cellSize(id, OS.sel_cellSize);
@@ -1050,7 +1076,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
NSRect rowRect = widget.rectOfRow (rowIndex);
cellRect.width = rowRect.width;
}
- double /*float*/ offsetX = 0, offsetY = 0;
+ double offsetX = 0, offsetY = 0;
if (hooksPaint || hooksErase) {
NSRect frameCell = widget.frameOfCellAtColumn(nsColumnIndex, rowIndex);
offsetX = rect.x - frameCell.x;
@@ -1112,18 +1138,30 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
if (!drawSelection && isSelected) {
userForeground = Color.cocoa_new(display, gc.getForeground().handle);
}
- gc.dispose ();
- context.restoreGraphicsState();
-
- if (isDisposed ()) return;
- if (item.isDisposed ()) return;
+ if (isDisposed () || item.isDisposed ()) {
+ gc.dispose ();
+ context.restoreGraphicsState();
+ return;
+ }
if (drawSelection && ((style & SWT.HIDE_SELECTION) == 0 || hasFocus)) {
cellRect.height -= spacing.height;
- callSuper (widget.id, OS.sel_highlightSelectionInClipRect_, cellRect);
+ /*
+ * On BigSur, calling highlightSelectionInClipRect here draws over the full row
+ * and not just the cellRect. This causes drawing over other cells content.
+ * Workaround is to draw the highlight background ourselves and not call
+ * highlightSelectionInClipRect to draw it.
+ */
+ if (OS.isBigSurOrLater()) {
+ gc.fillRectangle((int)cellRect.x, (int)cellRect.y, (int)cellRect.width, (int)cellRect.height);
+ } else {
+ callSuper (widget.id, OS.sel_highlightSelectionInClipRect_, cellRect);
+ }
cellRect.height += spacing.height;
}
+ gc.dispose ();
+ context.restoreGraphicsState();
} else {
if (isSelected && (style & SWT.HIDE_SELECTION) != 0 && !hasFocus) {
userForeground = item.getForeground (columnIndex);
@@ -1132,7 +1170,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
if (drawBackground && !drawSelection) {
context.saveGraphicsState ();
- double /*float*/ [] colorRGB = background.handle;
+ double [] colorRGB = background.handle;
NSColor color = NSColor.colorWithDeviceRed (colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color.setFill ();
NSBezierPath.fillRect (cellRect);
@@ -1186,7 +1224,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
* foreground color to black when the cell is highlighted. The text
* still draws white. The fix is to draw the text and not call super.
*/
- double /*float*/ [] color = userForeground.handle;
+ double [] color = userForeground.handle;
if (color[0] == 0 && color[1] == 0 && color[2] == 0 && color[3] == 1) {
NSMutableAttributedString newStr = new NSMutableAttributedString(cell.attributedStringValue().mutableCopy());
NSRange range = new NSRange();
@@ -1251,6 +1289,11 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
if (!drawExpansion) {
gc.setClipping ((int)(cellRect.x - offsetX), (int)(cellRect.y - offsetY), (int)cellRect.width, (int)cellRect.height);
}
+ /*
+ * Client code can modify the item text in the paint listener, so reset the cached width.
+ */
+ item.width = -1;
+
Event event = new Event ();
event.item = item;
event.gc = gc;
@@ -1270,14 +1313,14 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
}
@Override
-void drawWithExpansionFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+void drawWithExpansionFrame_inView (long id, long sel, NSRect cellFrame, long view) {
drawExpansion = true;
super.drawWithExpansionFrame_inView(id, sel, cellFrame, view);
drawExpansion = false;
}
@Override
-void expandItem_expandChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ itemID, boolean children) {
+void expandItem_expandChildren (long id, long sel, long itemID, boolean children) {
TreeItem item = (TreeItem)display.getWidget(itemID);
if (item == null) return;
if (!ignoreExpand) item.sendExpand (true, children);
@@ -1297,7 +1340,7 @@ void expandItem_expandChildren (long /*int*/ id, long /*int*/ sel, long /*int*/
}
@Override
-NSRect expansionFrameWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
+NSRect expansionFrameWithFrame_inView(long id, long sel, NSRect cellRect, long view) {
if (toolTipText == null) {
NSRect rect = super.expansionFrameWithFrame_inView(id, sel, cellRect, view);
NSCell cell = new NSCell(id);
@@ -1346,7 +1389,7 @@ Widget findTooltip (NSPoint pt) {
NSTableHeaderView headerView = widget.headerView();
if (headerView != null) {
pt = headerView.convertPoint_fromView_ (pt, null);
- long /*int*/ index = headerView.columnAtPoint (pt);
+ long index = headerView.columnAtPoint (pt);
if (index != -1) {
NSArray nsColumns = widget.tableColumns ();
id nsColumn = nsColumns.objectAtIndex (index);
@@ -1377,7 +1420,7 @@ public Rectangle getClientArea () {
* OSX 10.11 & above - The origin of the tree is the header and the header's
* height is already included in the rect. Hence, we return the rect as is.
*/
- if (OS.VERSION_MMB < OS.VERSION_MMB (10, 11, 0)) {
+ if (OS.VERSION < OS.VERSION (10, 11, 0)) {
NSTableHeaderView headerView = ((NSTableView) view).headerView ();
if (headerView != null) {
int height = (int) headerView.bounds ().height;
@@ -1684,7 +1727,7 @@ public TreeItem getItem (Point point) {
NSPoint pt = new NSPoint();
pt.x = point.x;
pt.y = point.y;
- int row = (int)/*64*/widget.rowAtPoint(pt);
+ int row = (int)widget.rowAtPoint(pt);
if (row == -1) return null;
NSRect rect = widget.frameOfOutlineCellAtRow(row);
if (OS.NSPointInRect(pt, rect)) return null;
@@ -1822,11 +1865,11 @@ public TreeItem [] getSelection () {
checkWidget ();
NSOutlineView widget = (NSOutlineView) view;
if (widget.numberOfSelectedRows () == 0) {
- return new TreeItem [0];
+ return NO_ITEM;
}
NSIndexSet selection = widget.selectedRowIndexes ();
- int count = (int)/*64*/selection.count ();
- long /*int*/ [] indexBuffer = new long /*int*/ [count];
+ int count = (int)selection.count ();
+ long [] indexBuffer = new long [count];
selection.getIndexes (indexBuffer, count, 0);
TreeItem [] result = new TreeItem [count];
for (int i=0; i<count; i++) {
@@ -1851,7 +1894,7 @@ public TreeItem [] getSelection () {
*/
public int getSelectionCount () {
checkWidget ();
- return (int)/*64*/((NSOutlineView) view).numberOfSelectedRows ();
+ return (int)((NSOutlineView) view).numberOfSelectedRows ();
}
/**
@@ -1921,7 +1964,7 @@ public TreeItem getTopItem () {
* In OSX 10.11, the origin of the tree is the header, not the top-left of the rows.
* Offset the point's y coordinate accordingly.
*/
- if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 11, 0)) {
+ if (OS.VERSION >= OS.VERSION (10, 11, 0)) {
NSTableHeaderView headerView = ((NSTableView) view).headerView ();
if (headerView != null) {
int height = (int) headerView.bounds ().height;
@@ -1929,14 +1972,14 @@ public TreeItem getTopItem () {
}
}
NSOutlineView outlineView = (NSOutlineView)view;
- long /*int*/ index = outlineView.rowAtPoint (point);
+ long index = outlineView.rowAtPoint (point);
if (index == -1) return null; /* empty */
id item = outlineView.itemAtRow (index);
return (TreeItem)display.getWidget (item.id);
}
@Override
-NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ column) {
+NSRect headerRectOfColumn (long id, long sel, long column) {
if ((style & SWT.CHECK) == 0) return callSuperRect(id, sel, column);
if (column == 0) {
@@ -1955,7 +1998,7 @@ NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ colum
}
@Override
-void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*/ rect) {
+void highlightSelectionInClipRect(long id, long sel, long rect) {
if (hooks (SWT.EraseItem)) return;
if ((style & SWT.HIDE_SELECTION) != 0 && !hasFocus()) return;
NSRect clipRect = new NSRect ();
@@ -1964,7 +2007,7 @@ void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*
}
@Override
-long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event, NSRect rect, long /*int*/ controlView) {
+long hitTestForEvent (long id, long sel, long event, NSRect rect, long controlView) {
/*
* For some reason, the cell class needs to implement hitTestForEvent:inRect:ofView:,
* otherwise the double action selector is not called properly.
@@ -1973,14 +2016,14 @@ long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ ev
}
@Override
-long /*int*/ image (long /*int*/ id, long /*int*/ sel) {
- long /*int*/ [] image = new long /*int*/ [1];
+long image (long id, long sel) {
+ long [] image = new long [1];
OS.object_getInstanceVariable(id, Display.SWT_IMAGE, image);
return image[0];
}
@Override
-NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSRect imageRectForBounds (long id, long sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
cellFrame.x += IMAGE_GAP;
@@ -1991,7 +2034,7 @@ NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame)
}
int indexOf (NSTableColumn column) {
- return (int)/*64*/((NSTableView)view).tableColumns().indexOfObjectIdenticalTo(column);
+ return (int)((NSTableView)view).tableColumns().indexOfObjectIdenticalTo(column);
}
/**
@@ -2066,13 +2109,13 @@ boolean isTrim (NSView view) {
}
@Override
-void keyDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyDown(long id, long sel, long theEvent) {
ignoreSelect = preventSelect = false;
super.keyDown(id, sel, theEvent);
}
@Override
-long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+long menuForEvent(long id, long sel, long theEvent) {
if (display.lastHandledMenuForEventId == theEvent) return 0;
if (id != headerView.id) {
/*
@@ -2088,7 +2131,7 @@ long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEve
// select the row that was clicked before showing the menu for the event
NSPoint mousePoint = view.convertPoint_fromView_(event.locationInWindow(), null);
- long /*int*/ row = tree.rowAtPoint(mousePoint);
+ long row = tree.rowAtPoint(mousePoint);
// figure out if the row that was just clicked on is currently selected
if (selectedRowIndexes.containsIndex(row) == false) {
@@ -2104,7 +2147,7 @@ long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEve
}
@Override
-void mouseDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown (long id, long sel, long theEvent) {
if (id == view.id) {
// Bug/feature in Cocoa: If the tree has a context menu we just set it visible instead of returning
// it from menuForEvent:. This has the side effect, however, of sending control-click to the NSTableView,
@@ -2116,23 +2159,23 @@ void mouseDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDownSuper(long id, long sel, long theEvent) {
ignoreSelect = preventSelect = false;
boolean check = false;
NSEvent nsEvent = new NSEvent(theEvent);
NSOutlineView widget = (NSOutlineView)view;
NSPoint pt = view.convertPoint_fromView_(nsEvent.locationInWindow(), null);
- int row = (int)/*64*/widget.rowAtPoint(pt);
+ int row = (int)widget.rowAtPoint(pt);
NSObject itemID = null;
if (row != -1) itemID = new NSObject(widget.itemAtRow(row));
if (row != -1 && (style & SWT.CHECK) != 0) {
- int column = (int)/*64*/widget.columnAtPoint(pt);
+ int column = (int)widget.columnAtPoint(pt);
NSCell cell = widget.preparedCellAtColumn(column, row);
if (cell != null && cell.isKindOfClass(OS.class_NSButtonCell) && cell.isEnabled()) {
NSRect checkRect = cell.imageRectForBounds(widget.frameOfCellAtColumn(column, row));
if (OS.NSPointInRect(pt, checkRect)) {
check = preventSelect = true;
- }
+ }
}
}
if (!check && row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0 && nsEvent.clickCount() == 1) {
@@ -2151,7 +2194,7 @@ void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
}
@Override
-boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
+boolean needsPanelToBecomeKey (long id, long sel) {
return false;
}
@@ -2162,10 +2205,10 @@ boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
* override [NSCell nextState] to go directly to the desired state.
*/
@Override
-long /*int*/ nextState (long /*int*/ id, long /*int*/ sel) {
+long nextState (long id, long sel) {
NSOutlineView outlineView = (NSOutlineView)view;
- int index = (int)/*64*/outlineView.clickedRow();
- if (index == -1) index = (int)/*64*/outlineView.selectedRow ();
+ int index = (int)outlineView.clickedRow();
+ if (index == -1) index = (int)outlineView.selectedRow ();
TreeItem item = (TreeItem)display.getWidget (outlineView.itemAtRow (index).id);
if (item.grayed) {
return item.checked ? OS.NSOffState : OS.NSMixedState;
@@ -2174,9 +2217,9 @@ long /*int*/ nextState (long /*int*/ id, long /*int*/ sel) {
}
@Override
-long /*int*/ outlineView_child_ofItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ index, long /*int*/ itemID) {
+long outlineView_child_ofItem (long id, long sel, long outlineView, long index, long itemID) {
TreeItem parent = (TreeItem) display.getWidget (itemID);
- TreeItem item = _getItem (parent, (int)/*64*/index, true);
+ TreeItem item = _getItem (parent, (int)index, true);
if (item != null && item.handle != null) {
return item.handle.id;
}
@@ -2184,14 +2227,14 @@ long /*int*/ outlineView_child_ofItem (long /*int*/ id, long /*int*/ sel, long /
}
@Override
-void outlineView_didClickTableColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn) {
+void outlineView_didClickTableColumn (long id, long sel, long outlineView, long tableColumn) {
TreeColumn column = getColumn (new id (tableColumn));
if (column == null) return; /* either CHECK column or firstColumn in 0-column Tree */
column.sendSelectionEvent (SWT.Selection);
}
@Override
-long /*int*/ outlineView_objectValueForTableColumn_byItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn, long /*int*/ itemID) {
+long outlineView_objectValueForTableColumn_byItem (long id, long sel, long outlineView, long tableColumn, long itemID) {
TreeItem item = (TreeItem) display.getWidget (itemID);
checkData (item);
if (checkColumn != null && tableColumn == checkColumn.id) {
@@ -2212,24 +2255,24 @@ long /*int*/ outlineView_objectValueForTableColumn_byItem (long /*int*/ id, long
}
@Override
-boolean outlineView_isItemExpandable (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
+boolean outlineView_isItemExpandable (long id, long sel, long outlineView, long item) {
if (item == 0) return true;
return ((TreeItem) display.getWidget (item)).itemCount != 0;
}
@Override
-long /*int*/ outlineView_numberOfChildrenOfItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
+long outlineView_numberOfChildrenOfItem (long id, long sel, long outlineView, long item) {
if (item == 0) return itemCount;
return ((TreeItem) display.getWidget (item)).itemCount;
}
@Override
-boolean outlineView_shouldExpandItem_item (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+boolean outlineView_shouldExpandItem_item (long id, long sel, long arg0, long arg1) {
return shouldExpand;
}
@Override
-boolean outlineView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ currentColIndex, long /*int*/ newColIndex) {
+boolean outlineView_shouldReorderColumn_toColumn(long id, long sel, long aTableView, long currentColIndex, long newColIndex) {
// Check column should never move and no column can be dragged to the left of it, if present.
if ((style & SWT.CHECK) != 0) {
if (currentColIndex == 0) return false;
@@ -2248,17 +2291,17 @@ boolean outlineView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ s
}
@Override
-boolean outlineView_shouldTrackCell_forTableColumn_item(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ item) {
+boolean outlineView_shouldTrackCell_forTableColumn_item(long id, long sel, long table, long cell, long tableColumn, long item) {
if ((style & SWT.CHECK) != 0) {
if (new NSCell(cell).isKindOfClass(OS.class_NSButtonCell)) return true;
}
NSOutlineView widget = (NSOutlineView)view;
- long /*int*/ rowIndex = widget.rowForItem(new id(item));
+ long rowIndex = widget.rowForItem(new id(item));
return widget.isRowSelected(rowIndex);
}
@Override
-void outlineView_willDisplayCell_forTableColumn_item (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ itemID) {
+void outlineView_willDisplayCell_forTableColumn_item (long id, long sel, long outlineView, long cell, long tableColumn, long itemID) {
if (checkColumn != null && tableColumn == checkColumn.id) return;
TreeItem item = (TreeItem) display.getWidget(itemID);
int index = 0;
@@ -2324,7 +2367,7 @@ void outlineView_willDisplayCell_forTableColumn_item (long /*int*/ id, long /*in
}
@Override
-void outlineViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void outlineViewColumnDidMove (long id, long sel, long aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -2353,7 +2396,7 @@ void outlineViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ a
}
@Override
-void outlineViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void outlineViewColumnDidResize (long id, long sel, long aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -2371,7 +2414,7 @@ void outlineViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/
if (index == -1) return; /* column was disposed in Resize callback */
NSArray nsColumns = outlineView.tableColumns ();
- int columnCount = (int)/*64*/outlineView.numberOfColumns ();
+ int columnCount = (int)outlineView.numberOfColumns ();
for (int i = index + 1; i < columnCount; i++) {
columnId = nsColumns.objectAtIndex (i);
column = getColumn (columnId);
@@ -2383,7 +2426,7 @@ void outlineViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/
}
@Override
-void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
+void scrollClipViewToPoint (long id, long sel, long clipView, NSPoint point) {
if (shouldScroll) {
super.scrollClipViewToPoint(id, sel, clipView, point);
if ((style & SWT.CHECK) != 0 && columnCount > 0 && ((NSOutlineView) view).headerView () != null) {
@@ -2402,7 +2445,7 @@ void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clip
void sendSelection () {
if (ignoreSelect) return;
NSOutlineView widget = (NSOutlineView) view;
- int row = (int)/*64*/widget.selectedRow ();
+ int row = (int)widget.selectedRow ();
if (row == -1)
sendSelectionEvent (SWT.Selection);
else {
@@ -2416,19 +2459,19 @@ void sendSelection () {
}
@Override
-void outlineViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void outlineViewSelectionDidChange (long id, long sel, long notification) {
if (didSelect) return;
sendSelection ();
}
@Override
-void outlineViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void outlineViewSelectionIsChanging (long id, long sel, long notification) {
didSelect = true;
sendSelection ();
}
@Override
-void outlineView_setObjectValue_forTableColumn_byItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ object, long /*int*/ tableColumn, long /*int*/ itemID) {
+void outlineView_setObjectValue_forTableColumn_byItem (long id, long sel, long outlineView, long object, long tableColumn, long itemID) {
if (checkColumn != null && tableColumn == checkColumn.id) {
TreeItem item = (TreeItem) display.getWidget (itemID);
item.checked = !item.checked;
@@ -2441,7 +2484,7 @@ void outlineView_setObjectValue_forTableColumn_byItem (long /*int*/ id, long /*i
}
@Override
-boolean outlineView_writeItems_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+boolean outlineView_writeItems_toPasteboard(long id, long sel, long arg0, long arg1, long arg2) {
return sendMouseEvent(NSApplication.sharedApplication().currentEvent(), SWT.DragDetect, true);
}
@@ -2586,7 +2629,7 @@ void reskinChildren (int flags) {
}
@Override
-void setImage (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void setImage (long id, long sel, long arg0) {
OS.object_setInstanceVariable(id, Display.SWT_IMAGE, arg0);
}
@@ -2662,7 +2705,7 @@ public void select (TreeItem item) {
checkItems ();
showItem (item);
NSOutlineView outlineView = (NSOutlineView) view;
- long /*int*/ row = outlineView.rowForItem (item.handle);
+ long row = outlineView.rowForItem (item.handle);
NSIndexSet set = (NSIndexSet)new NSIndexSet().alloc();
set = set.initWithIndex(row);
ignoreSelect = true;
@@ -2672,7 +2715,7 @@ public void select (TreeItem item) {
}
@Override
-void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ indexes, boolean extend) {
+void selectRowIndexes_byExtendingSelection (long id, long sel, long indexes, boolean extend) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
NSIndexSet set = new NSIndexSet(indexes);
@@ -2684,21 +2727,24 @@ void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, l
@Override
void sendDoubleSelection() {
NSOutlineView outlineView = (NSOutlineView)view;
- int rowIndex = (int)/*64*/outlineView.clickedRow ();
- if (rowIndex == -1) rowIndex = (int)/*64*/outlineView.selectedRow ();
+ int rowIndex = (int)outlineView.clickedRow ();
+ if (rowIndex == -1) rowIndex = (int)outlineView.selectedRow ();
if (rowIndex != -1) {
if ((style & SWT.CHECK) != 0) {
NSArray columns = outlineView.tableColumns ();
- int columnIndex = (int)/*64*/outlineView.clickedColumn ();
+ int columnIndex = (int)outlineView.clickedColumn ();
if (columnIndex != -1) {
id column = columns.objectAtIndex (columnIndex);
if (column.id == checkColumn.id) return;
}
}
- TreeItem item = (TreeItem) display.getWidget (outlineView.itemAtRow (rowIndex).id);
- Event event = new Event ();
- event.item = item;
- sendSelectionEvent (SWT.DefaultSelection, event, false);
+ id itemAtRow = outlineView.itemAtRow (rowIndex);
+ if (itemAtRow != null) {
+ TreeItem item = (TreeItem) display.getWidget (itemAtRow.id);
+ Event event = new Event ();
+ event.item = item;
+ sendSelectionEvent (SWT.DefaultSelection, event, false);
+ }
}
}
@@ -2759,35 +2805,37 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
if (type == SWT.DragDetect) {
dragDetected = true;
} else if (type == SWT.MouseUp) {
- /*
- * This code path handles the case of an unmodified click on an already-selected row.
- * To keep the order of events correct, deselect the other selected items and send the
- * selection event before MouseUp is sent. Ignore the next selection event.
- */
- if (!dragDetected && selectedRowIndex != -1) {
- NSOutlineView widget = (NSOutlineView)view;
- NSIndexSet selectedRows = widget.selectedRowIndexes ();
- int count = (int)/*64*/selectedRows.count();
- long /*int*/ [] indexBuffer = new long /*int*/ [count];
- selectedRows.getIndexes(indexBuffer, count, 0);
- for (int i = 0; i < count; i++) {
- if (indexBuffer[i] == selectedRowIndex) continue;
- ignoreSelect = true;
- widget.deselectRow (indexBuffer[i]);
- ignoreSelect = false;
- }
+ // See code comment in Table.handleClickSelected()
+ if (selectedRowIndex != -1) {
+ if (dragDetected) {
+ selectedRowIndex = -1;
+ } else {
+ NSOutlineView widget = (NSOutlineView)view;
+ NSIndexSet selectedRows = widget.selectedRowIndexes ();
+ int count = (int)selectedRows.count();
+ long [] indexBuffer = new long [count];
+ selectedRows.getIndexes(indexBuffer, count, 0);
+ for (int i = 0; i < count; i++) {
+ if (indexBuffer[i] == selectedRowIndex) continue;
+ ignoreSelect = true;
+ widget.deselectRow (indexBuffer[i]);
+ ignoreSelect = false;
+ }
- Event event = new Event ();
- id itemID = widget.itemAtRow (selectedRowIndex);
- if (itemID != null) {
- Widget item = display.getWidget (itemID.id);
- if (item != null && item instanceof TreeItem) {
- event.item = display.getWidget (itemID.id);
- sendSelectionEvent (SWT.Selection, event, false);
+ Event event = new Event ();
+ id itemID = widget.itemAtRow (selectedRowIndex);
+ // (itemID = null) means that item was removed after
+ // 'selectedRowIndex' was cached
+ if (itemID != null) {
+ Widget item = display.getWidget (itemID.id);
+ if (item != null && item instanceof TreeItem) {
+ event.item = display.getWidget (itemID.id);
+ sendSelectionEvent (SWT.Selection, event, false);
+ }
}
+ selectedRowIndex = -1;
+ ignoreSelect = true;
}
- selectedRowIndex = -1;
- ignoreSelect = true;
}
dragDetected = false;
}
@@ -2817,7 +2865,7 @@ void selectItems (TreeItem[] items, boolean ignoreDisposed) {
}
@Override
-NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long id, long sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
int imageWidth = imageBounds.width + IMAGE_GAP;
@@ -2908,12 +2956,31 @@ public void setColumnOrder (int [] order) {
@Override
void setFont (NSFont font) {
super.setFont (font);
+ for (int i = 0; i < columnCount; i++) {
+ columns[i].nsColumn.headerCell().setFont(font);
+ }
setItemHeight (null, font, !hooks (SWT.MeasureItem));
view.setNeedsDisplay (true);
clearCachedWidth (items);
setScrollWidth ();
}
+@Override
+void setFrameSize (long id, long sel, NSSize size) {
+ super.setFrameSize(id, sel, size);
+
+ /*
+ * Bug 577767: Since macOS 10.15, NSTableView has 'autoresizingMask'
+ * set to follow resizes of its NSClipView. This sometimes causes
+ * Table/Tree to have wrong scroll range (note that size of NSClipView
+ * is what you see and size of NSTableView is the size of entire
+ * content, this defines scroll range). The workaround is to recalc
+ * layout after resizing.
+ */
+ if ((scrollView != null) && (id == scrollView.id))
+ ((NSTableView)view).tile();
+}
+
/**
* Sets the header background color to the color specified
* by the argument, or to the default system color if the argument is null.
@@ -2938,7 +3005,7 @@ public void setHeaderBackground (Color color) {
if (color != null) {
if (color.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] headerBackground = color != null ? color.handle : null;
+ double [] headerBackground = color != null ? color.handle : null;
if (equals (headerBackground, this.headerBackground)) return;
this.headerBackground = headerBackground;
if (getHeaderVisible()) {
@@ -2970,7 +3037,7 @@ public void setHeaderForeground (Color color) {
if (color != null) {
if (color.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
}
- double /*float*/ [] headerForeground = color != null ? color.handle : null;
+ double [] headerForeground = color != null ? color.handle : null;
if (equals (headerForeground, this.headerForeground)) return;
this.headerForeground = headerForeground;
if (getHeaderVisible()) {
@@ -3004,6 +3071,9 @@ public void setHeaderVisible (boolean show) {
/**
* Sets the number of root-level items contained in the receiver.
+ * <p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param count the number of items
*
@@ -3098,8 +3168,8 @@ void setItemCount (TreeItem parentItem, int count) {
void setItemHeight (Image image, NSFont font, boolean set) {
if (font == null) font = getFont ().handle;
- double /*float*/ ascent = font.ascender ();
- double /*float*/ descent = -font.descender () + font.leading ();
+ double ascent = font.ascender ();
+ double descent = -font.descender () + font.leading ();
int height = (int)Math.ceil (ascent + descent) + 1;
Rectangle bounds = image != null ? image.getBounds () : imageBounds;
if (bounds != null) {
@@ -3109,6 +3179,13 @@ void setItemHeight (Image image, NSFont font, boolean set) {
NSTableView widget = (NSTableView)view;
if (set || widget.rowHeight () < height) {
widget.setRowHeight (height);
+ if (headerView != null) {
+ NSRect frame = headerView.frame();
+ if (frame.height < height) {
+ frame.height = height;
+ headerView.setFrame(frame);
+ }
+ }
}
}
@@ -3185,12 +3262,12 @@ boolean setScrollWidth (TreeItem item) {
}
@Override
-void setShouldExpandItem (long /*int*/ id, long /*int*/ sel, boolean shouldExpand) {
+void setShouldExpandItem (long id, long sel, boolean shouldExpand) {
this.shouldExpand = shouldExpand;
}
@Override
-void setShouldScrollClipView (long /*int*/ id, long /*int*/ sel, boolean shouldScroll) {
+void setShouldScrollClipView (long id, long sel, boolean shouldScroll) {
this.shouldScroll = shouldScroll;
}
@@ -3352,7 +3429,7 @@ public void setTopItem (TreeItem item) {
checkItems ();
showItem (item, false);
NSOutlineView widget = (NSOutlineView) view;
- long /*int*/ row = widget.rowForItem (item.handle);
+ long row = widget.rowForItem (item.handle);
if (row == -1) return;
NSPoint pt = new NSPoint();
pt.x = scrollView.contentView().bounds().x;
@@ -3361,7 +3438,7 @@ public void setTopItem (TreeItem item) {
* In OSX 10.11, the origin of the tree is the header, not the top-left of the rows.
* Offset the point's y coordinate accordingly.
*/
- if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 11, 0)) {
+ if (OS.VERSION >= OS.VERSION(10, 11, 0)) {
if (widget.headerView() != null) {
NSRect headerRect = headerView.frame();
pt.y -= headerRect.y + headerRect.height;
@@ -3438,7 +3515,33 @@ void showItem (TreeItem item, boolean scroll) {
}
if (scroll) {
NSOutlineView outlineView = (NSOutlineView) view;
- outlineView.scrollRowToVisible (outlineView.rowForItem (item.handle));
+ if (OS.VERSION >= OS.VERSION (10, 15, 0)) {
+ if (outlineView.headerView () == null) {
+ /**
+ * On macOS 10.15, scrollRowToVisible doesn't work correctly if
+ * contentView's bounds is not set (i.e, width or height is 0).
+ *
+ * The contentView's bounds is set when the Tree's header view is set.
+ * So don't call this code if Tree has a header already.
+ */
+ NSClipView contentView = scrollView.contentView ();
+ if (contentView != null) {
+ NSRect contentViewBounds = contentView.bounds ();
+ if (contentViewBounds.height == 0 || contentViewBounds.width == 0) {
+ NSView documentView = scrollView.documentView ();
+ if (documentView != null) {
+ NSRect documentViewBounds = documentView.bounds ();
+ NSSize size = new NSSize ();
+ size.width = contentViewBounds.width == 0 ? documentViewBounds.width : contentViewBounds.width;
+ size.height = contentViewBounds.height == 0 ? documentViewBounds.height : contentViewBounds.height;
+ contentView.setBoundsSize (size);
+ }
+ }
+ }
+ }
+ }
+ long rowForItem = outlineView.rowForItem (item.handle);
+ outlineView.scrollRowToVisible (rowForItem);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
index 9996ae638f..b3848ac431 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
@@ -209,7 +209,7 @@ void destroyWidget () {
}
@Override
-void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
+void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long view) {
/*
* Feature in Cocoa. When the last column in a tree does not reach the
* rightmost edge of the tree view, the cell that draws the rightmost-
@@ -224,7 +224,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
if (parent.headerBackground != null) {
NSGraphicsContext context = NSGraphicsContext.currentContext ();
context.saveGraphicsState ();
- double /*float*/ [] colorRGB = parent.headerBackground;
+ double [] colorRGB = parent.headerBackground;
NSColor color = NSColor.colorWithDeviceRed(colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color.setFill();
/*
@@ -263,7 +263,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
if (parent.headerBackground != null) {
// fill header background
context.saveGraphicsState();
- double /*float*/ [] colorRGB = parent.headerBackground;
+ double [] colorRGB = parent.headerBackground;
NSColor color1 = NSColor.colorWithDeviceRed(colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color1.setFill();
/*
@@ -308,7 +308,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
NSRect sortIndicatorRect = headerCell.sortIndicatorRectForBounds(cellRect);
context.saveGraphicsState();
if(parent.headerForeground != null) {
- double /*float*/ [] colorRGB = parent.headerForeground;
+ double [] colorRGB = parent.headerForeground;
NSColor color = NSColor.colorWithDeviceRed(colorRGB[0], colorRGB[1], colorRGB[2], 0.9f);
color.setStroke();
}
@@ -370,9 +370,9 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cel
if (isFlipped) {
context.saveGraphicsState ();
NSAffineTransform transform = NSAffineTransform.transform ();
- transform.scaleXBy (1, -1);
- transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
- transform.concat ();
+ transform.scaleXBy (1, -1);
+ transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
+ transform.concat ();
}
NSRect sourceRect = new NSRect ();
sourceRect.width = destRect.width;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java
index 1e402b4004..529082d051 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -64,22 +64,14 @@ public class TreeItem extends Item {
public SWTTreeItem handle;
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>)
- * and a style value describing its behavior and appearance.
- * The item is added to the end of the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as last direct child of the tree.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parent a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
@@ -98,22 +90,18 @@ public TreeItem (Tree parent, int style) {
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>),
- * a style value describing its behavior and appearance, and the index
- * at which to place it in the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as <code>index</code> direct child of the tree.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is:
+ * <ol>
+ * <li>Use {@link Tree#setRedraw} to disable drawing during bulk insert</li>
+ * <li>Insert every item at index 0 (insert them in reverse to get the same result)</li>
+ * <li>Collapse the parent item before inserting (gives massive improvement on Windows)</li>
+ * </ol>
*
* @param parent a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
* @param index the zero-relative index to store the receiver in its parent
*
* @exception IllegalArgumentException <ul>
@@ -128,28 +116,21 @@ public TreeItem (Tree parent, int style) {
* @see SWT
* @see Widget#checkSubclass
* @see Widget#getStyle
+ * @see Tree#setRedraw
*/
public TreeItem (Tree parent, int style, int index) {
this (checkNull (parent), null, style, checkIndex (index), true);
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>)
- * and a style value describing its behavior and appearance.
- * The item is added to the end of the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as last direct child of the specified <code>TreeItem</code>.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parentItem a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
@@ -168,22 +149,14 @@ public TreeItem (TreeItem parentItem, int style) {
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>),
- * a style value describing its behavior and appearance, and the index
- * at which to place it in the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as <code>index</code> direct child of the specified <code>TreeItem</code>.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parentItem a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
* @param index the zero-relative index to store the receiver in its parent
*
* @exception IllegalArgumentException <ul>
@@ -198,6 +171,7 @@ public TreeItem (TreeItem parentItem, int style) {
* @see SWT
* @see Widget#checkSubclass
* @see Widget#getStyle
+ * @see Tree#setRedraw
*/
public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, parentItem, style, checkIndex (index), true);
@@ -268,6 +242,7 @@ int calculateWidth (int index, GC gc) {
// NSSize size = cell.cellSize ();
int width = (int)Math.ceil (size.width);
+ if (OS.isBigSurOrLater() && !OS.IS_X86_64) width += Tree.TEXT_GAP; // To fix truncation
boolean sendMeasure = true;
if ((parent.style & SWT.VIRTUAL) != 0) {
sendMeasure = cached;
@@ -382,7 +357,7 @@ NSObject createString(int index) {
}
@Override
-void dealloc (long /*int*/ id, long /*int*/ sel) {
+void dealloc (long id, long sel) {
OS.object_setInstanceVariable(id, Display.SWT_OBJECT, 0);
super.destroyJNIRef();
super.dealloc(id, sel);
@@ -464,7 +439,7 @@ public Rectangle getBounds () {
parent.checkItems ();
NSOutlineView widget = (NSOutlineView) parent.view;
- int rowIndex = (int)/*64*/widget.rowForItem (handle);
+ int rowIndex = (int)widget.rowForItem (handle);
if (rowIndex == -1) return new Rectangle (0, 0, 0, 0);
NSTableColumn column = parent.columnCount == 0 ? parent.firstColumn : parent.columns [0].nsColumn;
@@ -1421,6 +1396,12 @@ public void setImage (Image image) {
/**
* Sets the number of child items contained in the receiver.
+ * <p>
+ * The fastest way to insert many items is:
+ * <ol>
+ * <li>Use {@link Tree#setRedraw} to disable drawing during bulk insert</li>
+ * <li>Collapse the parent item before inserting (gives massive improvement on Windows)</li>
+ * </ol>
*
* @param count the number of items
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index c3f33c2d20..d20f9ca7c4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -51,7 +51,7 @@ public abstract class Widget {
EventTable eventTable;
Object data;
- long /*int*/ jniRef;
+ long jniRef;
/* Global state flags */
static final int DISPOSED = 1 << 0;
@@ -105,7 +105,7 @@ public abstract class Widget {
static final int DEFAULT_HEIGHT = 64;
Widget () {
- /* Do nothing */
+ notifyCreationTracker();
}
/**
@@ -143,63 +143,64 @@ public Widget (Widget parent, int style) {
this.style = style;
display = parent.display;
reskinWidget ();
+ notifyCreationTracker();
}
-long /*int*/ accessibleHandle() {
+long accessibleHandle() {
return 0;
}
-long /*int*/ accessibilityActionDescription(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityActionDescription(long id, long sel, long arg0) {
return callSuperObject(id, sel, arg0);
}
-long /*int*/ accessibilityActionNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityActionNames(long id, long sel) {
return callSuperObject(id, sel);
}
-long /*int*/ accessibilityAttributeNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityAttributeNames(long id, long sel) {
return callSuperObject(id, sel);
}
-long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long accessibilityAttributeValue(long id, long sel, long arg0) {
return callSuperObject(id, sel, arg0);
}
-long /*int*/ accessibilityAttributeValue_forParameter(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+long accessibilityAttributeValue_forParameter(long id, long sel, long arg0, long arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-long /*int*/ accessibilityFocusedUIElement(long /*int*/ id, long /*int*/ sel) {
+long accessibilityFocusedUIElement(long id, long sel) {
return callSuperObject(id, sel);
}
-long /*int*/ accessibilityHitTest(long /*int*/ id, long /*int*/ sel, NSPoint point) {
+long accessibilityHitTest(long id, long sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, point);
}
-boolean accessibilityIsAttributeSettable(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+boolean accessibilityIsAttributeSettable(long id, long sel, long arg0) {
return callSuperBoolean(id, sel, arg0);
}
-boolean accessibilityIsIgnored(long /*int*/ id, long /*int*/ sel) {
+boolean accessibilityIsIgnored(long id, long sel) {
return callSuperBoolean(id, sel);
}
-long /*int*/ accessibilityParameterizedAttributeNames(long /*int*/ id, long /*int*/ sel) {
+long accessibilityParameterizedAttributeNames(long id, long sel) {
return callSuperObject(id, sel);
}
-void accessibilityPerformAction(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void accessibilityPerformAction(long id, long sel, long arg0) {
callSuper(id, sel, arg0);
}
-void accessibilitySetValue_forAttribute(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+void accessibilitySetValue_forAttribute(long id, long sel, long arg0, long arg1) {
callSuper(id, sel, arg0, arg1);
}
@@ -213,7 +214,7 @@ String getClipboardText () {
void setClipRegion (NSView view) {
}
-long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
+long attributedSubstringFromRange (long id, long sel, long range) {
return 0;
}
@@ -221,67 +222,67 @@ void cacheDisplayInRect_toBitmapImageRep (long id, long sel, NSRect rect, long i
callSuper(id, sel, rect, imageRep);
}
-void callSuper(long /*int*/ id, long /*int*/ sel) {
+void callSuper(long id, long sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel);
}
-void callSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void callSuper(long id, long sel, long arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-void callSuper(long /*int*/ id, long /*int*/ sel, NSRect arg0) {
+void callSuper(long id, long sel, NSRect arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-void callSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+void callSuper(long id, long sel, long arg0, long arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-void callSuper(long /*int*/ id, long /*int*/ sel, NSRect arg0, long /*int*/ arg1) {
+void callSuper(long id, long sel, NSRect arg0, long arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-long /*int*/ callSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, NSRect arg1, long /*int*/ arg2) {
+long callSuper(long id, long sel, long arg0, NSRect arg1, long arg2) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0, arg1, arg2);
}
-boolean callSuperBoolean(long /*int*/ id, long /*int*/ sel) {
+boolean callSuperBoolean(long id, long sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel) != 0;
}
-boolean canBecomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
+boolean canBecomeKeyWindow (long id, long sel) {
return callSuperBoolean (id, sel);
}
-boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
+boolean needsPanelToBecomeKey (long id, long sel) {
return callSuperBoolean (id, sel);
}
-void cancelOperation(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void cancelOperation(long id, long sel, long arg0) {
}
-NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
+NSSize cellSize (long id, long sel) {
NSSize result = new NSSize();
objc_super super_struct = new objc_super();
super_struct.receiver = id;
@@ -290,7 +291,7 @@ NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
return result;
}
-NSSize cellSizeForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSSize cellSizeForBounds (long id, long sel, NSRect cellFrame) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -299,42 +300,42 @@ NSSize cellSizeForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
return result;
}
-boolean callSuperBoolean(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+boolean callSuperBoolean(long id, long sel, long arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0) != 0;
}
-boolean callSuperBoolean(long /*int*/ id, long /*int*/ sel, NSRange range, long /*int*/ arg1) {
+boolean callSuperBoolean(long id, long sel, NSRange range, long arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper_bool(super_struct, sel, range, arg1);
}
-long /*int*/ callSuperObject(long /*int*/ id, long /*int*/ sel) {
+long callSuperObject(long id, long sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel);
}
-long /*int*/ callSuperObject(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+long callSuperObject(long id, long sel, long arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-long /*int*/ callSuperObject(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+long callSuperObject(long id, long sel, long arg0, long arg1) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
}
-NSRect callSuperRect(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+NSRect callSuperRect(long id, long sel, long arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -343,7 +344,7 @@ NSRect callSuperRect(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
return result;
}
-NSRect callSuperRect(long /*int*/ id, long /*int*/ sel, NSRect rect, long /*int*/ arg0) {
+NSRect callSuperRect(long id, long sel, NSRect rect, long arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -352,40 +353,40 @@ NSRect callSuperRect(long /*int*/ id, long /*int*/ sel, NSRect rect, long /*int*
return result;
}
-boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ rowIndexes, NSPoint mouseDownPoint) {
+boolean canDragRowsWithIndexes_atPoint(long id, long sel, long rowIndexes, NSPoint mouseDownPoint) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper_bool(super_struct, sel, rowIndexes, mouseDownPoint);
}
-long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
+long characterIndexForPoint (long id, long sel, long point) {
return OS.NSNotFound();
}
-long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {
+long columnAtPoint(long id, long sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, point);
}
-boolean acceptsFirstMouse (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+boolean acceptsFirstMouse (long id, long sel, long theEvent) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, theEvent) != 0;
}
-boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean acceptsFirstResponder (long id, long sel) {
return callSuperBoolean(id, sel);
}
-boolean becomeFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean becomeFirstResponder (long id, long sel) {
return callSuperBoolean(id, sel);
}
-void becomeKeyWindow (long /*int*/ id, long /*int*/ sel) {
+void becomeKeyWindow (long id, long sel) {
callSuper(id, sel);
}
@@ -433,7 +434,7 @@ void reskinWidget() {
}
}
-boolean resignFirstResponder (long /*int*/ id, long /*int*/ sel) {
+boolean resignFirstResponder (long id, long sel) {
return callSuperBoolean(id, sel);
}
@@ -498,7 +499,7 @@ public void addDisposeListener (DisposeListener listener) {
addListener (SWT.Dispose, typedListener);
}
-boolean canBecomeKeyView(long /*int*/ id, long /*int*/ sel) {
+boolean canBecomeKeyView(long id, long sel) {
return true;
}
@@ -598,14 +599,14 @@ protected void checkWidget () {
if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED);
}
-void clearDeferFlushing (long /*int*/ id, long /*int*/ sel) {
+void clearDeferFlushing (long id, long sel) {
}
-boolean textView_clickOnLink_atIndex(long /*int*/ id, long /*int*/ sel, long /*int*/ textView, long /*int*/ link, long /*int*/ charIndex) {
+boolean textView_clickOnLink_atIndex(long id, long sel, long textView, long link, long charIndex) {
return true;
}
-void collapseItem_collapseChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ item, boolean children) {
+void collapseItem_collapseChildren (long id, long sel, long item, boolean children) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -635,16 +636,16 @@ void createWidget () {
register ();
}
-void comboBoxSelectionDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void comboBoxSelectionDidChange(long id, long sel, long notification) {
}
-void comboBoxWillDismiss(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void comboBoxWillDismiss(long id, long sel, long notification) {
}
-void comboBoxWillPopUp(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void comboBoxWillPopUp(long id, long sel, long notification) {
}
-void dealloc (long /*int*/id, long /*int*/sel) {
+void dealloc (long id, long sel) {
callSuper (id, sel);
}
@@ -694,35 +695,35 @@ public void dispose () {
release (true);
}
-void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void deselectAll(long id, long sel, long sender) {
callSuper(id, sel, sender);
}
-void deselectRow(long /*int*/ id, long /*int*/ sel, long /*int*/ index) {
+void deselectRow(long id, long sel, long index) {
callSuper(id, sel, index);
}
-void doCommandBySelector (long /*int*/ id, long /*int*/ sel, long /*int*/ aSelector) {
+void doCommandBySelector (long id, long sel, long aSelector) {
callSuper (id, sel, aSelector);
}
-boolean dragSelectionWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+boolean dragSelectionWithEvent(long id, long sel, long arg0, long arg1, long arg2) {
return false;
}
-void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
/* Do nothing */
}
-void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long id, long sel, NSRect rect) {
callSuper(id, sel, rect);
}
-void drawImageWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ image, NSRect rect, long /*int*/ view) {
+void drawImageWithFrameInView (long id, long sel, long image, NSRect rect, long view) {
callSuper(id, sel, image, rect, view);
}
-NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/ title, NSRect rect, long /*int*/ view) {
+NSRect drawTitleWithFrameInView (long id, long sel, long title, NSRect rect, long view) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -731,30 +732,30 @@ NSRect drawTitleWithFrameInView (long /*int*/ id, long /*int*/ sel, long /*int*/
return result;
}
-void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+void drawInteriorWithFrame_inView (long id, long sel, NSRect cellFrame, long view) {
callSuper(id, sel, cellFrame, view);
}
-void drawBezelWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+void drawBezelWithFrame_inView (long id, long sel, NSRect cellFrame, long view) {
callSuper(id, sel, cellFrame, view);
}
-void drawLabelInRect(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel, NSRect rect) {
+void drawLabelInRect(long id, long sel, boolean shouldTruncateLabel, NSRect rect) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, shouldTruncateLabel, rect);
}
-void drawViewBackgroundInRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawViewBackgroundInRect(long id, long sel, NSRect rect) {
callSuper(id, sel, rect);
}
-void drawWithExpansionFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+void drawWithExpansionFrame_inView (long id, long sel, NSRect cellFrame, long view) {
callSuper(id, sel, cellFrame, view);
}
-void drawRect (long /*int*/ id, long /*int*/ sel, NSRect rect) {
+void drawRect (long id, long sel, NSRect rect) {
if (!isDrawing()) return;
Display display = this.display;
NSView view = new NSView(id);
@@ -779,17 +780,17 @@ void drawRect (long /*int*/ id, long /*int*/ sel, NSRect rect) {
display.isPainting.removeObjectIdenticalTo(view);
}
-void _drawThemeProgressArea (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void _drawThemeProgressArea (long id, long sel, long arg0) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, arg0);
}
-void drawWidget (long /*int*/ id, NSGraphicsContext context, NSRect rect) {
+void drawWidget (long id, NSGraphicsContext context, NSRect rect) {
}
-long /*int*/ imageView () {
+long imageView () {
return 0;
}
@@ -797,7 +798,7 @@ void redrawWidget (NSView view, boolean children) {
view.setNeedsDisplay(true);
}
-void redrawWidget (NSView view, long /*int*/ x, long /*int*/ y, long /*int*/ width, long /*int*/ height, boolean children) {
+void redrawWidget (NSView view, long x, long y, long width, long height, boolean children) {
NSRect rect = new NSRect();
rect.x = x;
rect.y = y;
@@ -810,14 +811,14 @@ void error (int code) {
SWT.error(code);
}
-void expandItem_expandChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ item, boolean children) {
+void expandItem_expandChildren (long id, long sel, long item, boolean children) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, item, children);
}
-NSRect expansionFrameWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
+NSRect expansionFrameWithFrame_inView(long id, long sel, NSRect cellRect, long view) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -830,7 +831,7 @@ boolean filters (int eventType) {
return display.filters (eventType);
}
-NSRect firstRectForCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ range) {
+NSRect firstRectForCharacterRange(long id, long sel, long range) {
return new NSRect ();
}
@@ -846,7 +847,7 @@ int fixMnemonic (char [] buffer) {
return j;
}
-NSRect focusRingMaskBoundsForFrame(long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
+NSRect focusRingMaskBoundsForFrame(long id, long sel, NSRect cellFrame, long view) {
return callSuperRect(id, sel, cellFrame, view);
}
@@ -1002,28 +1003,28 @@ public int getStyle () {
return style;
}
-boolean hasMarkedText (long /*int*/ id, long /*int*/ sel) {
+boolean hasMarkedText (long id, long sel) {
return false;
}
-NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ column) {
+NSRect headerRectOfColumn (long id, long sel, long column) {
return callSuperRect(id, sel, column);
}
-void helpRequested(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void helpRequested(long id, long sel, long theEvent) {
}
-void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*/ rect) {
+void highlightSelectionInClipRect(long id, long sel, long rect) {
}
-long /*int*/ hitTest (long /*int*/ id, long /*int*/ sel, NSPoint point) {
+long hitTest (long id, long sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, point);
}
-long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event, NSRect rect, long /*int*/ controlView) {
+long hitTestForEvent (long id, long sel, long event, NSRect rect, long controlView) {
return 0;
}
@@ -1032,15 +1033,15 @@ boolean hooks (int eventType) {
return eventTable.hooks (eventType);
}
-long /*int*/ image (long /*int*/ id, long /*int*/ sel) {
+long image (long id, long sel) {
return 0;
}
-NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSRect imageRectForBounds (long id, long sel, NSRect cellFrame) {
return new NSRect();
}
-boolean insertText (long /*int*/ id, long /*int*/ sel, long /*int*/ string) {
+boolean insertText (long id, long sel, long string) {
callSuper (id, sel, string);
return true;
}
@@ -1082,7 +1083,7 @@ boolean isDrawing () {
return true;
}
-boolean isFlipped(long /*int*/ id, long /*int*/ sel) {
+boolean isFlipped(long id, long sel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -1110,7 +1111,7 @@ public boolean isListening (int eventType) {
return hooks (eventType);
}
-boolean isOpaque(long /*int*/ id, long /*int*/ sel) {
+boolean isOpaque(long id, long sel) {
return false;
}
@@ -1122,178 +1123,178 @@ boolean isValidThread () {
return getDisplay ().isValidThread ();
}
-void flagsChanged (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void flagsChanged (long id, long sel, long theEvent) {
callSuper (id, sel, theEvent);
}
-void keyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyDown (long id, long sel, long theEvent) {
superKeyDown(id, sel, theEvent);
}
-void keyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void keyUp (long id, long sel, long theEvent) {
superKeyUp(id, sel, theEvent);
}
-void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDown(long id, long sel, long theEvent) {
mouseDownSuper(id, sel, theEvent);
}
-boolean mouseDownCanMoveWindow(long /*int*/ id, long /*int*/ sel) {
+boolean mouseDownCanMoveWindow(long id, long sel) {
return callSuperBoolean(id, sel);
}
-void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDownSuper(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseUp(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseMoved(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseMoved(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseDragged(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseEntered(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseEntered(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void mouseExited(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void mouseExited(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void cursorUpdate(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void cursorUpdate(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void rightMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDown(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void rightMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseUp(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void rightMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void rightMouseDragged(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void otherMouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseDown(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void otherMouseUp(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseUp(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-void otherMouseDragged(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void otherMouseDragged(long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-boolean shouldDelayWindowOrderingForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+boolean shouldDelayWindowOrderingForEvent (long id, long sel, long theEvent) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, theEvent) != 0;
}
-boolean menuHasKeyEquivalent_forEvent_target_action(long /*int*/ id, long /*int*/ sel, long /*int*/ menu, long /*int*/ event, long /*int*/ target, long /*int*/ action) {
+boolean menuHasKeyEquivalent_forEvent_target_action(long id, long sel, long menu, long event, long target, long action) {
return true;
}
-long /*int*/ menuForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+long menuForEvent (long id, long sel, long theEvent) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
return OS.objc_msgSendSuper(super_struct, sel, theEvent);
}
-void menuNeedsUpdate(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuNeedsUpdate(long id, long sel, long menu) {
}
-boolean makeFirstResponder(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+boolean makeFirstResponder(long id, long sel, long notification) {
return callSuperBoolean(id, sel, notification);
}
-NSRange markedRange (long /*int*/ id, long /*int*/ sel) {
+NSRange markedRange (long id, long sel) {
return new NSRange ();
}
-void menu_willHighlightItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menu, long /*int*/ item) {
+void menu_willHighlightItem(long id, long sel, long menu, long item) {
}
-void menuDidClose(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuDidClose(long id, long sel, long menu) {
}
-void menuWillOpen(long /*int*/ id, long /*int*/ sel, long /*int*/ menu) {
+void menuWillOpen(long id, long sel, long menu) {
}
-void noResponderFor(long /*int*/ id, long /*int*/ sel, long /*int*/ selector) {
+void noResponderFor(long id, long sel, long selector) {
callSuper(id, sel, selector);
}
-long /*int*/ numberOfRowsInTableView(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView) {
+long numberOfRowsInTableView(long id, long sel, long aTableView) {
return 0;
}
-long /*int*/ outlineView_child_ofItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ index, long /*int*/ item) {
+long outlineView_child_ofItem(long id, long sel, long outlineView, long index, long item) {
return 0;
}
-void outlineView_didClickTableColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn) {
+void outlineView_didClickTableColumn(long id, long sel, long outlineView, long tableColumn) {
}
-long /*int*/ outlineView_objectValueForTableColumn_byItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn, long /*int*/ item) {
+long outlineView_objectValueForTableColumn_byItem(long id, long sel, long outlineView, long tableColumn, long item) {
return 0;
}
-boolean outlineView_isItemExpandable(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
+boolean outlineView_isItemExpandable(long id, long sel, long outlineView, long item) {
return false;
}
-long /*int*/ outlineView_numberOfChildrenOfItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
+long outlineView_numberOfChildrenOfItem(long id, long sel, long outlineView, long item) {
return 0;
}
-boolean outlineView_shouldExpandItem_item(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
+boolean outlineView_shouldExpandItem_item(long id, long sel, long outlineView, long item) {
return true;
}
-boolean outlineView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ columnIndex, long /*int*/ newColumnIndex) {
+boolean outlineView_shouldReorderColumn_toColumn(long id, long sel, long aTableView, long columnIndex, long newColumnIndex) {
return true;
}
-boolean outlineView_shouldEditTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ item) {
+boolean outlineView_shouldEditTableColumn_row(long id, long sel, long aTableView, long aTableColumn, long item) {
return false;
}
-boolean outlineView_shouldTrackCell_forTableColumn_item(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ item) {
+boolean outlineView_shouldTrackCell_forTableColumn_item(long id, long sel, long table, long cell, long tableColumn, long item) {
return true;
}
-void outlineView_willDisplayCell_forTableColumn_item(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ item) {
+void outlineView_willDisplayCell_forTableColumn_item(long id, long sel, long outlineView, long cell, long tableColumn, long item) {
}
-void outlineViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void outlineViewColumnDidMove (long id, long sel, long aNotification) {
}
-void outlineViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void outlineViewColumnDidResize (long id, long sel, long aNotification) {
}
-void outlineViewSelectionDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void outlineViewSelectionDidChange(long id, long sel, long notification) {
}
-void outlineViewSelectionIsChanging(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void outlineViewSelectionIsChanging(long id, long sel, long notification) {
}
-void outlineView_setObjectValue_forTableColumn_byItem(long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ object, long /*int*/ tableColumn, long /*int*/ item) {
+void outlineView_setObjectValue_forTableColumn_byItem(long id, long sel, long outlineView, long object, long tableColumn, long item) {
}
-boolean outlineView_writeItems_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+boolean outlineView_writeItems_toPasteboard(long id, long sel, long arg0, long arg1, long arg2) {
return false;
}
@@ -1324,11 +1325,11 @@ public void notifyListeners (int eventType, Event event) {
sendEvent (eventType, event);
}
-void pageDown (long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void pageDown (long id, long sel, long sender) {
callSuper(id, sel, sender);
}
-void pageUp (long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
+void pageUp (long id, long sel, long sender) {
callSuper(id, sel, sender);
}
@@ -1340,7 +1341,7 @@ void postEvent (int eventType, Event event) {
sendEvent (eventType, event, false);
}
-void reflectScrolledClipView (long /*int*/ id, long /*int*/ sel, long /*int*/ aClipView) {
+void reflectScrolledClipView (long id, long sel, long aClipView) {
callSuper (id, sel, aClipView);
}
@@ -1348,24 +1349,35 @@ void register () {
}
void release (boolean destroy) {
- if ((state & DISPOSE_SENT) == 0) {
- state |= DISPOSE_SENT;
- sendEvent (SWT.Dispose);
- }
- if ((state & DISPOSED) == 0) {
- releaseChildren (destroy);
- }
- if ((state & RELEASED) == 0) {
- state |= RELEASED;
- if (destroy) {
- releaseParent ();
- releaseWidget ();
- destroyWidget ();
- } else {
- releaseWidget ();
- releaseHandle ();
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ if ((state & DISPOSE_SENT) == 0) {
+ state |= DISPOSE_SENT;
+ try {
+ sendEvent (SWT.Dispose);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+ if ((state & DISPOSED) == 0) {
+ try {
+ releaseChildren (destroy);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+ if ((state & RELEASED) == 0) {
+ state |= RELEASED;
+ if (destroy) {
+ releaseParent ();
+ releaseWidget ();
+ destroyWidget ();
+ } else {
+ releaseWidget ();
+ releaseHandle ();
+ }
}
}
+ notifyDisposalTracker();
}
void releaseChildren (boolean destroy) {
@@ -1475,33 +1487,33 @@ public void removeDisposeListener (DisposeListener listener) {
eventTable.unhook (SWT.Dispose, listener);
}
-void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
+void scrollClipViewToPoint (long id, long sel, long clipView, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, clipView, point);
}
-void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ indexes, boolean extend) {
+void selectRowIndexes_byExtendingSelection (long id, long sel, long indexes, boolean extend) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, indexes, extend);
}
-void scrollWheel (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void scrollWheel (long id, long sel, long theEvent) {
callSuper(id, sel, theEvent);
}
-NSRange selectedRange (long /*int*/ id, long /*int*/ sel) {
+NSRange selectedRange (long id, long sel) {
return new NSRange ();
}
-long /*int*/ nextValidKeyView (long /*int*/ id, long /*int*/ sel) {
+long nextValidKeyView (long id, long sel) {
return callSuperObject(id, sel);
}
-long /*int*/ previousValidKeyView (long /*int*/ id, long /*int*/ sel) {
+long previousValidKeyView (long id, long sel) {
return callSuperObject(id, sel);
}
@@ -1710,21 +1722,21 @@ void setOpenGLContext(Object value) {
void setOrientation () {
}
-void setFrameOrigin (long /*int*/ id, long /*int*/ sel, NSPoint point) {
+void setFrameOrigin (long id, long sel, NSPoint point) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, point);
}
-void setFrameSize (long /*int*/ id, long /*int*/ sel, NSSize size) {
+void setFrameSize (long id, long sel, NSSize size) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
OS.objc_msgSendSuper(super_struct, sel, size);
}
-void setImage (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void setImage (long id, long sel, long arg0) {
}
boolean setInputState (Event event, NSEvent nsEvent, int type) {
@@ -1732,13 +1744,13 @@ boolean setInputState (Event event, NSEvent nsEvent, int type) {
nsEvent = NSApplication.sharedApplication().currentEvent();
if (nsEvent == null) return true;
}
- long /*int*/ modifierFlags = nsEvent.modifierFlags();
+ long modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSAlternateKeyMask) != 0) event.stateMask |= SWT.ALT;
if ((modifierFlags & OS.NSShiftKeyMask) != 0) event.stateMask |= SWT.SHIFT;
if ((modifierFlags & OS.NSControlKeyMask) != 0) event.stateMask |= SWT.CONTROL;
if ((modifierFlags & OS.NSCommandKeyMask) != 0) event.stateMask |= SWT.COMMAND;
- int state = OS.GetCurrentEventButtonState ();
+ long state = NSEvent.pressedMouseButtons();
if ((state & 0x1) != 0) event.stateMask |= SWT.BUTTON1;
if ((state & 0x2) != 0) event.stateMask |= SWT.BUTTON3;
if ((state & 0x4) != 0) event.stateMask |= SWT.BUTTON2;
@@ -1805,20 +1817,20 @@ boolean setKeyState (Event event, int type, NSEvent nsEvent) {
if (chars != null && chars.length() > 0) event.character = (char)chars.characterAtIndex (0);
}
if (event.keyCode == 0) {
- long /*int*/ uchrPtr = 0;
- long /*int*/ currentKbd = OS.TISCopyCurrentKeyboardInputSource();
- long /*int*/ uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
+ long uchrPtr = 0;
+ long currentKbd = OS.TISCopyCurrentKeyboardInputSource();
+ long uchrCFData = OS.TISGetInputSourceProperty(currentKbd, OS.kTISPropertyUnicodeKeyLayoutData());
if (uchrCFData != 0) {
uchrPtr = OS.CFDataGetBytePtr(uchrCFData);
if (uchrPtr != 0 && OS.CFDataGetLength(uchrCFData) > 0) {
- long /*int*/ cgEvent = nsEvent.CGEvent();
+ long cgEvent = nsEvent.CGEvent();
long keyboardType = OS.CGEventGetIntegerValueField(cgEvent, OS.kCGKeyboardEventKeyboardType);
int maxStringLength = 256;
char [] output = new char [maxStringLength];
- int [] actualStringLength = new int [1];
+ long [] actualStringLength = new long [1];
int [] deadKeyState = new int[1];
OS.UCKeyTranslate (uchrPtr, (short)keyCode, (short)(event.type == SWT.KeyDown ? OS.kUCKeyActionDown : OS.kUCKeyActionUp), 0, (int)keyboardType, 0, deadKeyState, maxStringLength, actualStringLength, output);
if (actualStringLength[0] < 1) {
@@ -1882,11 +1894,11 @@ void setLocationMask (Event event, NSEvent nsEvent) {
}
}
-boolean setMarkedText_selectedRange (long /*int*/ id, long /*int*/ sel, long /*int*/ string, long /*int*/ range) {
+boolean setMarkedText_selectedRange (long id, long sel, long string, long range) {
return true;
}
-void setNeedsDisplay (long /*int*/ id, long /*int*/ sel, boolean flag) {
+void setNeedsDisplay (long id, long sel, boolean flag) {
if (flag && !isDrawing()) return;
NSView view = new NSView(id);
if (flag && display.isPainting.containsObject(view)) {
@@ -1904,7 +1916,7 @@ void setNeedsDisplay (long /*int*/ id, long /*int*/ sel, boolean flag) {
OS.objc_msgSendSuper(super_struct, sel, flag);
}
-void setNeedsDisplayInRect (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void setNeedsDisplayInRect (long id, long sel, long arg0) {
if (!isDrawing()) return;
NSRect rect = new NSRect();
OS.memmove(rect, arg0, NSRect.sizeof);
@@ -1925,14 +1937,14 @@ void setNeedsDisplayInRect (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0
OS.objc_msgSendSuper(super_struct, sel, rect);
}
-void setObjectValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void setObjectValue(long id, long sel, long arg0) {
callSuper(id, sel, arg0);
}
-void setShouldExpandItem(long /*int*/ id, long /*int*/ sel, boolean shouldExpand) {
+void setShouldExpandItem(long id, long sel, boolean shouldExpand) {
}
-void setShouldScrollClipView(long /*int*/ id, long /*int*/ sel, boolean shouldScroll) {
+void setShouldScrollClipView(long id, long sel, boolean shouldScroll) {
}
boolean setTabGroupFocus () {
@@ -1943,11 +1955,11 @@ boolean setTabItemFocus () {
return false;
}
-boolean shouldChangeTextInRange_replacementString(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
+boolean shouldChangeTextInRange_replacementString(long id, long sel, long arg0, long arg1) {
return true;
}
-NSSize sizeOfLabel(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabel) {
+NSSize sizeOfLabel(long id, long sel, boolean shouldTruncateLabel) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -1956,71 +1968,71 @@ NSSize sizeOfLabel(long /*int*/ id, long /*int*/ sel, boolean shouldTruncateLabe
return result;
}
-void superKeyDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void superKeyDown (long id, long sel, long theEvent) {
callSuper (id, sel, theEvent);
}
-void superKeyUp (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
+void superKeyUp (long id, long sel, long theEvent) {
callSuper (id, sel, theEvent);
}
-void tableViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewColumnDidMove (long id, long sel, long aNotification) {
}
-void tableViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewColumnDidResize (long id, long sel, long aNotification) {
}
-void tableViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewSelectionDidChange (long id, long sel, long aNotification) {
}
-void tableViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void tableViewSelectionIsChanging (long id, long sel, long aNotification) {
}
-void tableView_didClickTableColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ tableColumn) {
+void tableView_didClickTableColumn(long id, long sel, long tableView, long tableColumn) {
}
-long /*int*/ tableView_objectValueForTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
+long tableView_objectValueForTableColumn_row(long id, long sel, long aTableView, long aTableColumn, long rowIndex) {
return 0;
}
-boolean tableView_shouldSelectRow(long /*int*/ id, long /*int*/ sel, long /*int*/ tableView, long /*int*/ index) {
+boolean tableView_shouldSelectRow(long id, long sel, long tableView, long index) {
return true;
}
-void tableView_setObjectValue_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ anObject, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
+void tableView_setObjectValue_forTableColumn_row(long id, long sel, long aTableView, long anObject, long aTableColumn, long rowIndex) {
}
-boolean tableView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ columnIndex, long /*int*/ newColumnIndex) {
+boolean tableView_shouldReorderColumn_toColumn(long id, long sel, long aTableView, long columnIndex, long newColumnIndex) {
return true;
}
-boolean tableView_shouldEditTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
+boolean tableView_shouldEditTableColumn_row(long id, long sel, long aTableView, long aTableColumn, long rowIndex) {
return false;
}
-boolean tableView_shouldTrackCell_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, /*long*/ long /*int*/ tableColumn, long /*int*/ rowIndex) {
+boolean tableView_shouldTrackCell_forTableColumn_row(long id, long sel, long table, long cell, /*long*/ long tableColumn, long rowIndex) {
return true;
}
-void tableView_willDisplayCell_forTableColumn_row(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ aCell, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
+void tableView_willDisplayCell_forTableColumn_row(long id, long sel, long aTableView, long aCell, long aTableColumn, long rowIndex) {
}
-void textViewDidChangeSelection(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textViewDidChangeSelection(long id, long sel, long aNotification) {
}
-void textDidChange(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textDidChange(long id, long sel, long aNotification) {
callSuper (id, sel, aNotification);
}
-void textDidEndEditing(long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
+void textDidEndEditing(long id, long sel, long aNotification) {
callSuper(id, sel, aNotification);
}
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(long /*int*/ id, long /*int*/ sel, long /*int*/ aTextView, long /*int*/ oldSelectedCharRange, long /*int*/ newSelectedCharRange) {
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(long id, long sel, long aTextView, long oldSelectedCharRange, long newSelectedCharRange) {
return new NSRange();
}
-NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long id, long sel, NSRect cellFrame) {
objc_super super_struct = new objc_super();
super_struct.receiver = id;
super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -2029,19 +2041,19 @@ NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame)
return result;
}
-long /*int*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar, long /*int*/ itemID, boolean flag) {
+long toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(long id, long sel, long toolbar, long itemID, boolean flag) {
return 0;
}
-long /*int*/ toolbarAllowedItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
+long toolbarAllowedItemIdentifiers(long id, long sel, long toolbar) {
return 0;
}
-long /*int*/ toolbarDefaultItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
+long toolbarDefaultItemIdentifiers(long id, long sel, long toolbar) {
return 0;
}
-long /*int*/ toolbarSelectableItemIdentifiers(long /*int*/ id, long /*int*/ sel, long /*int*/ toolbar) {
+long toolbarSelectableItemIdentifiers(long id, long sel, long toolbar) {
return 0;
}
String tooltipText () {
@@ -2064,128 +2076,132 @@ public String toString () {
return getName () + " {" + string + "}";
}
-void touchesBeganWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesBeganWithEvent (long id, long sel, long event) {
callSuper(id, sel, event);
}
-void touchesCancelledWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesCancelledWithEvent (long id, long sel, long event) {
callSuper(id, sel, event);
}
-void touchesEndedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesEndedWithEvent (long id, long sel, long event) {
callSuper(id, sel, event);
}
-void touchesMovedWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void touchesMovedWithEvent (long id, long sel, long event) {
callSuper(id, sel, event);
}
-void beginGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void magnifyWithEvent (long id, long sel, long event) {
callSuper(id, sel, event);
}
-void endGestureWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void rotateWithEvent(long id, long sel, long event) {
callSuper(id, sel, event);
}
-void magnifyWithEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void swipeWithEvent(long id, long sel, long event) {
callSuper(id, sel, event);
}
-void rotateWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
- callSuper(id, sel, event);
-}
-
-void swipeWithEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
- callSuper(id, sel, event);
-}
-
-void resetCursorRects (long /*int*/ id, long /*int*/ sel) {
+void resetCursorRects (long id, long sel) {
callSuper (id, sel);
}
-void updateTrackingAreas (long /*int*/ id, long /*int*/ sel) {
+void updateTrackingAreas (long id, long sel) {
callSuper (id, sel);
}
-long /*int*/ validAttributesForMarkedText (long /*int*/ id, long /*int*/ sel) {
+long validAttributesForMarkedText (long id, long sel) {
return 0;
}
-void tabView_didSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
+void tabView_didSelectTabViewItem(long id, long sel, long tabView, long tabViewItem) {
}
-void tabView_willSelectTabViewItem(long /*int*/ id, long /*int*/ sel, long /*int*/ tabView, long /*int*/ tabViewItem) {
+void tabView_willSelectTabViewItem(long id, long sel, long tabView, long tabViewItem) {
}
-boolean tableView_writeRowsWithIndexes_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
+boolean tableView_writeRowsWithIndexes_toPasteboard(long id, long sel, long arg0, long arg1, long arg2) {
return false;
}
-boolean validateMenuItem(long /*int*/ id, long /*int*/ sel, long /*int*/ menuItem) {
+boolean validateMenuItem(long id, long sel, long menuItem) {
return true;
}
-long /*int*/ view_stringForToolTip_point_userData (long /*int*/ id, long /*int*/ sel, long /*int*/ view, long /*int*/ tag, long /*int*/ point, long /*int*/ userData) {
+long view_stringForToolTip_point_userData (long id, long sel, long view, long tag, long point, long userData) {
return 0;
}
-void viewDidMoveToWindow(long /*int*/ id, long /*int*/ sel) {
+void viewDidMoveToWindow(long id, long sel) {
}
-void viewWillMoveToWindow(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+void viewWillMoveToWindow(long id, long sel, long arg0) {
}
-void windowDidMove(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidMove(long id, long sel, long notification) {
}
-void windowDidResize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidResize(long id, long sel, long notification) {
}
-void windowDidResignKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidResignKey(long id, long sel, long notification) {
}
-void windowDidBecomeKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidBecomeKey(long id, long sel, long notification) {
}
-void windowDidMiniturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidMiniturize(long id, long sel, long notification) {
}
-void windowDidDeminiturize(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowDidDeminiturize(long id, long sel, long notification) {
}
-void windowSendEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ event) {
+void windowSendEvent(long id, long sel, long event) {
callSuper(id, sel, event);
}
-boolean windowShouldClose(long /*int*/ id, long /*int*/ sel, long /*int*/ window) {
+boolean windowShouldClose(long id, long sel, long window) {
return false;
}
-void windowWillClose(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void windowWillClose(long id, long sel, long notification) {
}
-long /*int*/ nextState(long /*int*/ id, long /*int*/ sel) {
+long nextState(long id, long sel) {
return callSuperObject(id, sel);
}
-void updateOpenGLContext(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
+void updateOpenGLContext(long id, long sel, long notification) {
}
-boolean shouldDrawInsertionPoint(long /*int*/ id, long /*int*/ sel) {
+boolean shouldDrawInsertionPoint(long id, long sel) {
return callSuperBoolean(id, sel);
}
-boolean readSelectionFromPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboard) {
+boolean readSelectionFromPasteboard(long id, long sel, long pasteboard) {
return false;
}
-long /*int*/ validRequestorForSendType(long /*int*/ id, long /*int*/ sel, long /*int*/ sendType, long /*int*/ returnType) {
+long validRequestorForSendType(long id, long sel, long sendType, long returnType) {
return callSuperObject(id, sel, sendType, returnType);
}
-boolean writeSelectionToPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ pasteboard, long /*int*/ types) {
+boolean writeSelectionToPasteboard(long id, long sel, long pasteboard, long types) {
return false;
}
+void notifyCreationTracker() {
+ if (WidgetSpy.isEnabled) {
+ WidgetSpy.getInstance().widgetCreated(this);
+ }
+}
+
+void notifyDisposalTracker() {
+ if (WidgetSpy.isEnabled) {
+ WidgetSpy.getInstance().widgetDisposed(this);
+ }
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c b/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c
index 87b46e9caf..c88a291cf5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c
@@ -27,15 +27,21 @@
/* --------------- callback globals ----------------- */
-static JavaVM *jvm = NULL;
static CALLBACK_DATA callbackData[MAX_CALLBACKS];
static int callbackEnabled = 1;
static int callbackEntryCount = 0;
static int initialized = 0;
-static jint JNI_VERSION = 0;
+static jmethodID mid_Throwable_addSuppressed = NULL;
#ifdef DEBUG_CALL_PRINTS
-static int counter = 0;
+ static int counter = 0;
+
+ #if defined(COCOA)
+ #include <objc/runtime.h>
+ #elif defined(GTK)
+ #include <dlfcn.h>
+ #include <gdk/gdk.h>
+ #endif
#endif
#ifdef ATOMIC
@@ -47,18 +53,7 @@ static int counter = 0;
#define ATOMIC_DEC(value) value--;
#endif
-jintLong callback(int index, ...);
-
-#ifdef USE_ASSEMBLER
-
-#if !(defined (_WIN32) || defined (_WIN32_WCE))
-#include <sys/mman.h>
-#endif
-
-static unsigned char *callbackCode = NULL;
-#define CALLBACK_THUNK_SIZE 64
-
-#else
+jlong callback(int index, ...);
/* --------------- callback functions --------------- */
@@ -74,43 +69,571 @@ static unsigned char *callbackCode = NULL;
*/
/* Function template with no arguments */
-#define FN_0(index) RETURN_TYPE FN(index, 0)() { return RETURN_CAST callback(index); }
+#define FN_0(index) jlong FN(index, 0)() { return callback(index); }
/* Function template with 1 argument */
-#define FN_1(index) RETURN_TYPE FN(index, 1)(jintLong p1) { return RETURN_CAST callback(index, p1); }
+#define FN_1(index) jlong FN(index, 1)(jlong p1) { return callback(index, p1); }
/* Function template with 2 arguments */
-#define FN_2(index) RETURN_TYPE FN(index, 2)(jintLong p1, jintLong p2) { return RETURN_CAST callback(index, p1, p2); }
+#define FN_2(index) jlong FN(index, 2)(jlong p1, jlong p2) { return callback(index, p1, p2); }
/* Function template with 3 arguments */
-#define FN_3(index) RETURN_TYPE FN(index, 3)(jintLong p1, jintLong p2, jintLong p3) { return RETURN_CAST callback(index, p1, p2, p3); }
+#define FN_3(index) jlong FN(index, 3)(jlong p1, jlong p2, jlong p3) { return callback(index, p1, p2, p3); }
/* Function template with 4 arguments */
-#define FN_4(index) RETURN_TYPE FN(index, 4)(jintLong p1, jintLong p2, jintLong p3, jintLong p4) { return RETURN_CAST callback(index, p1, p2, p3, p4); }
+#define FN_4(index) jlong FN(index, 4)(jlong p1, jlong p2, jlong p3, jlong p4) { return callback(index, p1, p2, p3, p4); }
/* Function template with 5 arguments */
-#define FN_5(index) RETURN_TYPE FN(index, 5)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5); }
+#define FN_5(index) jlong FN(index, 5)(jlong p1, jlong p2, jlong p3, jlong p4, jlong p5) { return callback(index, p1, p2, p3, p4, p5); }
/* Function template with 6 arguments */
-#define FN_6(index) RETURN_TYPE FN(index, 6)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6); }
+#define FN_6(index) jlong FN(index, 6)(jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6) { return callback(index, p1, p2, p3, p4, p5, p6); }
/* Function template with 7 arguments */
-#define FN_7(index) RETURN_TYPE FN(index, 7)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7); }
+#define FN_7(index) jlong FN(index, 7)(jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6, jlong p7) { return callback(index, p1, p2, p3, p4, p5, p6, p7); }
/* Function template with 8 arguments */
-#define FN_8(index) RETURN_TYPE FN(index, 8)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8); }
+#define FN_8(index) jlong FN(index, 8)(jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6, jlong p7, jlong p8) { return callback(index, p1, p2, p3, p4, p5, p6, p7, p8); }
/* Function template with 9 arguments */
-#define FN_9(index) RETURN_TYPE FN(index, 9)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+#define FN_9(index) jlong FN(index, 9)(jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6, jlong p7, jlong p8, jlong p9) { return callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
/* Function template with 10 arguments */
-#define FN_10(index) RETURN_TYPE FN(index, 10) (jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9, jintLong p10) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+#define FN_10(index) jlong FN(index, 10) (jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6, jlong p7, jlong p8, jlong p9, jlong p10) { return callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
/* Function template with 11 arguments */
-#define FN_11(index) RETURN_TYPE FN(index, 11) (jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9, jintLong p10, jintLong p11) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+#define FN_11(index) jlong FN(index, 11) (jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6, jlong p7, jlong p8, jlong p9, jlong p10, jlong p11) { return callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
/* Function template with 12 arguments */
-#define FN_12(index) RETURN_TYPE FN(index, 12) (jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9, jintLong p10, jintLong p11, jintLong p12) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+#define FN_12(index) jlong FN(index, 12) (jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6, jlong p7, jlong p8, jlong p9, jlong p10, jlong p11, jlong p12) { return callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+
+#if defined(GTK)
+#define FND(index, args) fnD##index##_##args
+
+#define NUM_DOUBLE_CALLBACKS 2
+#define FN_D_4(index) jlong FND(index, 4) (jlong p1, jdouble p2, jdouble p3, jlong p4) { return callback(index, p1, p2, p3, p4); }
+#define FN_D_5(index) jlong FND(index, 5) (jlong p1, jint p2, jdouble p3, jdouble p4, jlong p5) { return callback(index, p1, p2, p3, p4, p5); }
+
+#define FN_DOUBLE_BLOCK(args) \
+ FN_D_##args(0) \
+ FN_D_##args(1) \
+ FN_D_##args(2) \
+ FN_D_##args(3) \
+ FN_D_##args(4) \
+ FN_D_##args(5) \
+ FN_D_##args(6) \
+ FN_D_##args(7) \
+ FN_D_##args(8) \
+ FN_D_##args(9) \
+ FN_D_##args(10) \
+ FN_D_##args(11) \
+ FN_D_##args(12) \
+ FN_D_##args(13) \
+ FN_D_##args(14) \
+ FN_D_##args(15) \
+ FN_D_##args(16) \
+ FN_D_##args(17) \
+ FN_D_##args(18) \
+ FN_D_##args(19) \
+ FN_D_##args(20) \
+ FN_D_##args(21) \
+ FN_D_##args(22) \
+ FN_D_##args(23) \
+ FN_D_##args(24) \
+ FN_D_##args(25) \
+ FN_D_##args(26) \
+ FN_D_##args(27) \
+ FN_D_##args(28) \
+ FN_D_##args(29) \
+ FN_D_##args(30) \
+ FN_D_##args(31) \
+ FN_D_##args(32) \
+ FN_D_##args(33) \
+ FN_D_##args(34) \
+ FN_D_##args(35) \
+ FN_D_##args(36) \
+ FN_D_##args(37) \
+ FN_D_##args(38) \
+ FN_D_##args(39) \
+ FN_D_##args(40) \
+ FN_D_##args(41) \
+ FN_D_##args(42) \
+ FN_D_##args(43) \
+ FN_D_##args(44) \
+ FN_D_##args(45) \
+ FN_D_##args(46) \
+ FN_D_##args(47) \
+ FN_D_##args(48) \
+ FN_D_##args(49) \
+ FN_D_##args(50) \
+ FN_D_##args(51) \
+ FN_D_##args(52) \
+ FN_D_##args(53) \
+ FN_D_##args(54) \
+ FN_D_##args(55) \
+ FN_D_##args(56) \
+ FN_D_##args(57) \
+ FN_D_##args(58) \
+ FN_D_##args(59) \
+ FN_D_##args(60) \
+ FN_D_##args(61) \
+ FN_D_##args(62) \
+ FN_D_##args(63) \
+ FN_D_##args(64) \
+ FN_D_##args(65) \
+ FN_D_##args(66) \
+ FN_D_##args(67) \
+ FN_D_##args(68) \
+ FN_D_##args(69) \
+ FN_D_##args(70) \
+ FN_D_##args(71) \
+ FN_D_##args(72) \
+ FN_D_##args(73) \
+ FN_D_##args(74) \
+ FN_D_##args(75) \
+ FN_D_##args(76) \
+ FN_D_##args(77) \
+ FN_D_##args(78) \
+ FN_D_##args(79) \
+ FN_D_##args(80) \
+ FN_D_##args(81) \
+ FN_D_##args(82) \
+ FN_D_##args(83) \
+ FN_D_##args(84) \
+ FN_D_##args(85) \
+ FN_D_##args(86) \
+ FN_D_##args(87) \
+ FN_D_##args(88) \
+ FN_D_##args(89) \
+ FN_D_##args(90) \
+ FN_D_##args(91) \
+ FN_D_##args(92) \
+ FN_D_##args(93) \
+ FN_D_##args(94) \
+ FN_D_##args(95) \
+ FN_D_##args(96) \
+ FN_D_##args(97) \
+ FN_D_##args(98) \
+ FN_D_##args(99) \
+ FN_D_##args(100) \
+ FN_D_##args(101) \
+ FN_D_##args(102) \
+ FN_D_##args(103) \
+ FN_D_##args(104) \
+ FN_D_##args(105) \
+ FN_D_##args(106) \
+ FN_D_##args(107) \
+ FN_D_##args(108) \
+ FN_D_##args(109) \
+ FN_D_##args(110) \
+ FN_D_##args(111) \
+ FN_D_##args(112) \
+ FN_D_##args(113) \
+ FN_D_##args(114) \
+ FN_D_##args(115) \
+ FN_D_##args(116) \
+ FN_D_##args(117) \
+ FN_D_##args(118) \
+ FN_D_##args(119) \
+ FN_D_##args(120) \
+ FN_D_##args(121) \
+ FN_D_##args(122) \
+ FN_D_##args(123) \
+ FN_D_##args(124) \
+ FN_D_##args(125) \
+ FN_D_##args(126) \
+ FN_D_##args(127) \
+ FN_D_##args(128) \
+ FN_D_##args(129) \
+ FN_D_##args(130) \
+ FN_D_##args(131) \
+ FN_D_##args(132) \
+ FN_D_##args(133) \
+ FN_D_##args(134) \
+ FN_D_##args(135) \
+ FN_D_##args(136) \
+ FN_D_##args(137) \
+ FN_D_##args(138) \
+ FN_D_##args(139) \
+ FN_D_##args(140) \
+ FN_D_##args(141) \
+ FN_D_##args(142) \
+ FN_D_##args(143) \
+ FN_D_##args(144) \
+ FN_D_##args(145) \
+ FN_D_##args(146) \
+ FN_D_##args(147) \
+ FN_D_##args(148) \
+ FN_D_##args(149) \
+ FN_D_##args(150) \
+ FN_D_##args(151) \
+ FN_D_##args(152) \
+ FN_D_##args(153) \
+ FN_D_##args(154) \
+ FN_D_##args(155) \
+ FN_D_##args(156) \
+ FN_D_##args(157) \
+ FN_D_##args(158) \
+ FN_D_##args(159) \
+ FN_D_##args(160) \
+ FN_D_##args(161) \
+ FN_D_##args(162) \
+ FN_D_##args(163) \
+ FN_D_##args(164) \
+ FN_D_##args(165) \
+ FN_D_##args(166) \
+ FN_D_##args(167) \
+ FN_D_##args(168) \
+ FN_D_##args(169) \
+ FN_D_##args(170) \
+ FN_D_##args(171) \
+ FN_D_##args(172) \
+ FN_D_##args(173) \
+ FN_D_##args(174) \
+ FN_D_##args(175) \
+ FN_D_##args(176) \
+ FN_D_##args(177) \
+ FN_D_##args(178) \
+ FN_D_##args(179) \
+ FN_D_##args(180) \
+ FN_D_##args(181) \
+ FN_D_##args(182) \
+ FN_D_##args(183) \
+ FN_D_##args(184) \
+ FN_D_##args(185) \
+ FN_D_##args(186) \
+ FN_D_##args(187) \
+ FN_D_##args(188) \
+ FN_D_##args(189) \
+ FN_D_##args(190) \
+ FN_D_##args(191) \
+ FN_D_##args(192) \
+ FN_D_##args(193) \
+ FN_D_##args(194) \
+ FN_D_##args(195) \
+ FN_D_##args(196) \
+ FN_D_##args(197) \
+ FN_D_##args(198) \
+ FN_D_##args(199) \
+ FN_D_##args(200) \
+ FN_D_##args(201) \
+ FN_D_##args(202) \
+ FN_D_##args(203) \
+ FN_D_##args(204) \
+ FN_D_##args(205) \
+ FN_D_##args(206) \
+ FN_D_##args(207) \
+ FN_D_##args(208) \
+ FN_D_##args(209) \
+ FN_D_##args(210) \
+ FN_D_##args(211) \
+ FN_D_##args(212) \
+ FN_D_##args(213) \
+ FN_D_##args(214) \
+ FN_D_##args(215) \
+ FN_D_##args(216) \
+ FN_D_##args(217) \
+ FN_D_##args(218) \
+ FN_D_##args(219) \
+ FN_D_##args(220) \
+ FN_D_##args(221) \
+ FN_D_##args(222) \
+ FN_D_##args(223) \
+ FN_D_##args(224) \
+ FN_D_##args(225) \
+ FN_D_##args(226) \
+ FN_D_##args(227) \
+ FN_D_##args(228) \
+ FN_D_##args(229) \
+ FN_D_##args(230) \
+ FN_D_##args(231) \
+ FN_D_##args(232) \
+ FN_D_##args(233) \
+ FN_D_##args(234) \
+ FN_D_##args(235) \
+ FN_D_##args(236) \
+ FN_D_##args(237) \
+ FN_D_##args(238) \
+ FN_D_##args(239) \
+ FN_D_##args(240) \
+ FN_D_##args(241) \
+ FN_D_##args(242) \
+ FN_D_##args(243) \
+ FN_D_##args(244) \
+ FN_D_##args(245) \
+ FN_D_##args(246) \
+ FN_D_##args(247) \
+ FN_D_##args(248) \
+ FN_D_##args(249) \
+ FN_D_##args(250) \
+ FN_D_##args(251) \
+ FN_D_##args(252) \
+ FN_D_##args(253) \
+ FN_D_##args(254) \
+ FN_D_##args(255)
+
+#define FN_DOUBLE_A_BLOCK(args) { \
+ (jlong)FND(0, args), \
+ (jlong)FND(1, args), \
+ (jlong)FND(2, args), \
+ (jlong)FND(3, args), \
+ (jlong)FND(4, args), \
+ (jlong)FND(5, args), \
+ (jlong)FND(6, args), \
+ (jlong)FND(7, args), \
+ (jlong)FND(8, args), \
+ (jlong)FND(9, args), \
+ (jlong)FND(10, args), \
+ (jlong)FND(11, args), \
+ (jlong)FND(12, args), \
+ (jlong)FND(13, args), \
+ (jlong)FND(14, args), \
+ (jlong)FND(15, args), \
+ (jlong)FND(16, args), \
+ (jlong)FND(17, args), \
+ (jlong)FND(18, args), \
+ (jlong)FND(19, args), \
+ (jlong)FND(20, args), \
+ (jlong)FND(21, args), \
+ (jlong)FND(22, args), \
+ (jlong)FND(23, args), \
+ (jlong)FND(24, args), \
+ (jlong)FND(25, args), \
+ (jlong)FND(26, args), \
+ (jlong)FND(27, args), \
+ (jlong)FND(28, args), \
+ (jlong)FND(29, args), \
+ (jlong)FND(30, args), \
+ (jlong)FND(31, args), \
+ (jlong)FND(32, args), \
+ (jlong)FND(33, args), \
+ (jlong)FND(34, args), \
+ (jlong)FND(35, args), \
+ (jlong)FND(36, args), \
+ (jlong)FND(37, args), \
+ (jlong)FND(38, args), \
+ (jlong)FND(39, args), \
+ (jlong)FND(40, args), \
+ (jlong)FND(41, args), \
+ (jlong)FND(42, args), \
+ (jlong)FND(43, args), \
+ (jlong)FND(44, args), \
+ (jlong)FND(45, args), \
+ (jlong)FND(46, args), \
+ (jlong)FND(47, args), \
+ (jlong)FND(48, args), \
+ (jlong)FND(49, args), \
+ (jlong)FND(50, args), \
+ (jlong)FND(51, args), \
+ (jlong)FND(52, args), \
+ (jlong)FND(53, args), \
+ (jlong)FND(54, args), \
+ (jlong)FND(55, args), \
+ (jlong)FND(56, args), \
+ (jlong)FND(57, args), \
+ (jlong)FND(58, args), \
+ (jlong)FND(59, args), \
+ (jlong)FND(60, args), \
+ (jlong)FND(61, args), \
+ (jlong)FND(62, args), \
+ (jlong)FND(63, args), \
+ (jlong)FND(64, args), \
+ (jlong)FND(65, args), \
+ (jlong)FND(66, args), \
+ (jlong)FND(67, args), \
+ (jlong)FND(68, args), \
+ (jlong)FND(69, args), \
+ (jlong)FND(70, args), \
+ (jlong)FND(71, args), \
+ (jlong)FND(72, args), \
+ (jlong)FND(73, args), \
+ (jlong)FND(74, args), \
+ (jlong)FND(75, args), \
+ (jlong)FND(76, args), \
+ (jlong)FND(77, args), \
+ (jlong)FND(78, args), \
+ (jlong)FND(79, args), \
+ (jlong)FND(80, args), \
+ (jlong)FND(81, args), \
+ (jlong)FND(82, args), \
+ (jlong)FND(83, args), \
+ (jlong)FND(84, args), \
+ (jlong)FND(85, args), \
+ (jlong)FND(86, args), \
+ (jlong)FND(87, args), \
+ (jlong)FND(88, args), \
+ (jlong)FND(89, args), \
+ (jlong)FND(90, args), \
+ (jlong)FND(91, args), \
+ (jlong)FND(92, args), \
+ (jlong)FND(93, args), \
+ (jlong)FND(94, args), \
+ (jlong)FND(95, args), \
+ (jlong)FND(96, args), \
+ (jlong)FND(97, args), \
+ (jlong)FND(98, args), \
+ (jlong)FND(99, args), \
+ (jlong)FND(100, args), \
+ (jlong)FND(101, args), \
+ (jlong)FND(102, args), \
+ (jlong)FND(103, args), \
+ (jlong)FND(104, args), \
+ (jlong)FND(105, args), \
+ (jlong)FND(106, args), \
+ (jlong)FND(107, args), \
+ (jlong)FND(108, args), \
+ (jlong)FND(109, args), \
+ (jlong)FND(110, args), \
+ (jlong)FND(111, args), \
+ (jlong)FND(112, args), \
+ (jlong)FND(113, args), \
+ (jlong)FND(114, args), \
+ (jlong)FND(115, args), \
+ (jlong)FND(116, args), \
+ (jlong)FND(117, args), \
+ (jlong)FND(118, args), \
+ (jlong)FND(119, args), \
+ (jlong)FND(120, args), \
+ (jlong)FND(121, args), \
+ (jlong)FND(122, args), \
+ (jlong)FND(123, args), \
+ (jlong)FND(124, args), \
+ (jlong)FND(125, args), \
+ (jlong)FND(126, args), \
+ (jlong)FND(127, args), \
+ (jlong)FND(128, args), \
+ (jlong)FND(129, args), \
+ (jlong)FND(130, args), \
+ (jlong)FND(131, args), \
+ (jlong)FND(132, args), \
+ (jlong)FND(133, args), \
+ (jlong)FND(134, args), \
+ (jlong)FND(135, args), \
+ (jlong)FND(136, args), \
+ (jlong)FND(137, args), \
+ (jlong)FND(138, args), \
+ (jlong)FND(139, args), \
+ (jlong)FND(140, args), \
+ (jlong)FND(141, args), \
+ (jlong)FND(142, args), \
+ (jlong)FND(143, args), \
+ (jlong)FND(144, args), \
+ (jlong)FND(145, args), \
+ (jlong)FND(146, args), \
+ (jlong)FND(147, args), \
+ (jlong)FND(148, args), \
+ (jlong)FND(149, args), \
+ (jlong)FND(150, args), \
+ (jlong)FND(151, args), \
+ (jlong)FND(152, args), \
+ (jlong)FND(153, args), \
+ (jlong)FND(154, args), \
+ (jlong)FND(155, args), \
+ (jlong)FND(156, args), \
+ (jlong)FND(157, args), \
+ (jlong)FND(158, args), \
+ (jlong)FND(159, args), \
+ (jlong)FND(160, args), \
+ (jlong)FND(161, args), \
+ (jlong)FND(162, args), \
+ (jlong)FND(163, args), \
+ (jlong)FND(164, args), \
+ (jlong)FND(165, args), \
+ (jlong)FND(166, args), \
+ (jlong)FND(167, args), \
+ (jlong)FND(168, args), \
+ (jlong)FND(169, args), \
+ (jlong)FND(170, args), \
+ (jlong)FND(171, args), \
+ (jlong)FND(172, args), \
+ (jlong)FND(173, args), \
+ (jlong)FND(174, args), \
+ (jlong)FND(175, args), \
+ (jlong)FND(176, args), \
+ (jlong)FND(177, args), \
+ (jlong)FND(178, args), \
+ (jlong)FND(179, args), \
+ (jlong)FND(180, args), \
+ (jlong)FND(181, args), \
+ (jlong)FND(182, args), \
+ (jlong)FND(183, args), \
+ (jlong)FND(184, args), \
+ (jlong)FND(185, args), \
+ (jlong)FND(186, args), \
+ (jlong)FND(187, args), \
+ (jlong)FND(188, args), \
+ (jlong)FND(189, args), \
+ (jlong)FND(190, args), \
+ (jlong)FND(191, args), \
+ (jlong)FND(192, args), \
+ (jlong)FND(193, args), \
+ (jlong)FND(194, args), \
+ (jlong)FND(195, args), \
+ (jlong)FND(196, args), \
+ (jlong)FND(197, args), \
+ (jlong)FND(198, args), \
+ (jlong)FND(199, args), \
+ (jlong)FND(200, args), \
+ (jlong)FND(201, args), \
+ (jlong)FND(202, args), \
+ (jlong)FND(203, args), \
+ (jlong)FND(204, args), \
+ (jlong)FND(205, args), \
+ (jlong)FND(206, args), \
+ (jlong)FND(207, args), \
+ (jlong)FND(208, args), \
+ (jlong)FND(209, args), \
+ (jlong)FND(210, args), \
+ (jlong)FND(211, args), \
+ (jlong)FND(212, args), \
+ (jlong)FND(213, args), \
+ (jlong)FND(214, args), \
+ (jlong)FND(215, args), \
+ (jlong)FND(216, args), \
+ (jlong)FND(217, args), \
+ (jlong)FND(218, args), \
+ (jlong)FND(219, args), \
+ (jlong)FND(220, args), \
+ (jlong)FND(221, args), \
+ (jlong)FND(222, args), \
+ (jlong)FND(223, args), \
+ (jlong)FND(224, args), \
+ (jlong)FND(225, args), \
+ (jlong)FND(226, args), \
+ (jlong)FND(227, args), \
+ (jlong)FND(228, args), \
+ (jlong)FND(229, args), \
+ (jlong)FND(230, args), \
+ (jlong)FND(231, args), \
+ (jlong)FND(232, args), \
+ (jlong)FND(233, args), \
+ (jlong)FND(234, args), \
+ (jlong)FND(235, args), \
+ (jlong)FND(236, args), \
+ (jlong)FND(237, args), \
+ (jlong)FND(238, args), \
+ (jlong)FND(239, args), \
+ (jlong)FND(240, args), \
+ (jlong)FND(241, args), \
+ (jlong)FND(242, args), \
+ (jlong)FND(243, args), \
+ (jlong)FND(244, args), \
+ (jlong)FND(245, args), \
+ (jlong)FND(246, args), \
+ (jlong)FND(247, args), \
+ (jlong)FND(248, args), \
+ (jlong)FND(249, args), \
+ (jlong)FND(250, args), \
+ (jlong)FND(251, args), \
+ (jlong)FND(252, args), \
+ (jlong)FND(253, args), \
+ (jlong)FND(254, args), \
+ (jlong)FND(255, args), \
+},
+
+#else
+#define NUM_DOUBLE_CALLBACKS 0
+#endif
/**
* Define all functions with the specified number of arguments.
@@ -547,6 +1070,10 @@ FN_BLOCK(9)
FN_BLOCK(10)
FN_BLOCK(11)
FN_BLOCK(12)
+#if defined(GTK)
+FN_DOUBLE_BLOCK(4) /* JDDJ */
+FN_DOUBLE_BLOCK(5) /* JJDDJ */
+#endif
/**
* Initialize the function pointers for the callback routines.
@@ -555,418 +1082,418 @@ FN_BLOCK(12)
*/
#if MAX_CALLBACKS == 16
#define FN_A_BLOCK(args) { \
- (jintLong)FN(0, args), \
- (jintLong)FN(1, args), \
- (jintLong)FN(2, args), \
- (jintLong)FN(3, args), \
- (jintLong)FN(4, args), \
- (jintLong)FN(5, args), \
- (jintLong)FN(6, args), \
- (jintLong)FN(7, args), \
- (jintLong)FN(8, args), \
- (jintLong)FN(9, args), \
- (jintLong)FN(10, args), \
- (jintLong)FN(11, args), \
- (jintLong)FN(12, args), \
- (jintLong)FN(13, args), \
- (jintLong)FN(14, args), \
- (jintLong)FN(15, args), \
+ (jlong)FN(0, args), \
+ (jlong)FN(1, args), \
+ (jlong)FN(2, args), \
+ (jlong)FN(3, args), \
+ (jlong)FN(4, args), \
+ (jlong)FN(5, args), \
+ (jlong)FN(6, args), \
+ (jlong)FN(7, args), \
+ (jlong)FN(8, args), \
+ (jlong)FN(9, args), \
+ (jlong)FN(10, args), \
+ (jlong)FN(11, args), \
+ (jlong)FN(12, args), \
+ (jlong)FN(13, args), \
+ (jlong)FN(14, args), \
+ (jlong)FN(15, args), \
},
#elif MAX_CALLBACKS == 128
#define FN_A_BLOCK(args) { \
- (jintLong)FN(0, args), \
- (jintLong)FN(1, args), \
- (jintLong)FN(2, args), \
- (jintLong)FN(3, args), \
- (jintLong)FN(4, args), \
- (jintLong)FN(5, args), \
- (jintLong)FN(6, args), \
- (jintLong)FN(7, args), \
- (jintLong)FN(8, args), \
- (jintLong)FN(9, args), \
- (jintLong)FN(10, args), \
- (jintLong)FN(11, args), \
- (jintLong)FN(12, args), \
- (jintLong)FN(13, args), \
- (jintLong)FN(14, args), \
- (jintLong)FN(15, args), \
- (jintLong)FN(16, args), \
- (jintLong)FN(17, args), \
- (jintLong)FN(18, args), \
- (jintLong)FN(19, args), \
- (jintLong)FN(20, args), \
- (jintLong)FN(21, args), \
- (jintLong)FN(22, args), \
- (jintLong)FN(23, args), \
- (jintLong)FN(24, args), \
- (jintLong)FN(25, args), \
- (jintLong)FN(26, args), \
- (jintLong)FN(27, args), \
- (jintLong)FN(28, args), \
- (jintLong)FN(29, args), \
- (jintLong)FN(30, args), \
- (jintLong)FN(31, args), \
- (jintLong)FN(32, args), \
- (jintLong)FN(33, args), \
- (jintLong)FN(34, args), \
- (jintLong)FN(35, args), \
- (jintLong)FN(36, args), \
- (jintLong)FN(37, args), \
- (jintLong)FN(38, args), \
- (jintLong)FN(39, args), \
- (jintLong)FN(40, args), \
- (jintLong)FN(41, args), \
- (jintLong)FN(42, args), \
- (jintLong)FN(43, args), \
- (jintLong)FN(44, args), \
- (jintLong)FN(45, args), \
- (jintLong)FN(46, args), \
- (jintLong)FN(47, args), \
- (jintLong)FN(48, args), \
- (jintLong)FN(49, args), \
- (jintLong)FN(50, args), \
- (jintLong)FN(51, args), \
- (jintLong)FN(52, args), \
- (jintLong)FN(53, args), \
- (jintLong)FN(54, args), \
- (jintLong)FN(55, args), \
- (jintLong)FN(56, args), \
- (jintLong)FN(57, args), \
- (jintLong)FN(58, args), \
- (jintLong)FN(59, args), \
- (jintLong)FN(60, args), \
- (jintLong)FN(61, args), \
- (jintLong)FN(62, args), \
- (jintLong)FN(63, args), \
- (jintLong)FN(64, args), \
- (jintLong)FN(65, args), \
- (jintLong)FN(66, args), \
- (jintLong)FN(67, args), \
- (jintLong)FN(68, args), \
- (jintLong)FN(69, args), \
- (jintLong)FN(70, args), \
- (jintLong)FN(71, args), \
- (jintLong)FN(72, args), \
- (jintLong)FN(73, args), \
- (jintLong)FN(74, args), \
- (jintLong)FN(75, args), \
- (jintLong)FN(76, args), \
- (jintLong)FN(77, args), \
- (jintLong)FN(78, args), \
- (jintLong)FN(79, args), \
- (jintLong)FN(80, args), \
- (jintLong)FN(81, args), \
- (jintLong)FN(82, args), \
- (jintLong)FN(83, args), \
- (jintLong)FN(84, args), \
- (jintLong)FN(85, args), \
- (jintLong)FN(86, args), \
- (jintLong)FN(87, args), \
- (jintLong)FN(88, args), \
- (jintLong)FN(89, args), \
- (jintLong)FN(90, args), \
- (jintLong)FN(91, args), \
- (jintLong)FN(92, args), \
- (jintLong)FN(93, args), \
- (jintLong)FN(94, args), \
- (jintLong)FN(95, args), \
- (jintLong)FN(96, args), \
- (jintLong)FN(97, args), \
- (jintLong)FN(98, args), \
- (jintLong)FN(99, args), \
- (jintLong)FN(100, args), \
- (jintLong)FN(101, args), \
- (jintLong)FN(102, args), \
- (jintLong)FN(103, args), \
- (jintLong)FN(104, args), \
- (jintLong)FN(105, args), \
- (jintLong)FN(106, args), \
- (jintLong)FN(107, args), \
- (jintLong)FN(108, args), \
- (jintLong)FN(109, args), \
- (jintLong)FN(110, args), \
- (jintLong)FN(111, args), \
- (jintLong)FN(112, args), \
- (jintLong)FN(113, args), \
- (jintLong)FN(114, args), \
- (jintLong)FN(115, args), \
- (jintLong)FN(116, args), \
- (jintLong)FN(117, args), \
- (jintLong)FN(118, args), \
- (jintLong)FN(119, args), \
- (jintLong)FN(120, args), \
- (jintLong)FN(121, args), \
- (jintLong)FN(122, args), \
- (jintLong)FN(123, args), \
- (jintLong)FN(124, args), \
- (jintLong)FN(125, args), \
- (jintLong)FN(126, args), \
- (jintLong)FN(127, args), \
+ (jlong)FN(0, args), \
+ (jlong)FN(1, args), \
+ (jlong)FN(2, args), \
+ (jlong)FN(3, args), \
+ (jlong)FN(4, args), \
+ (jlong)FN(5, args), \
+ (jlong)FN(6, args), \
+ (jlong)FN(7, args), \
+ (jlong)FN(8, args), \
+ (jlong)FN(9, args), \
+ (jlong)FN(10, args), \
+ (jlong)FN(11, args), \
+ (jlong)FN(12, args), \
+ (jlong)FN(13, args), \
+ (jlong)FN(14, args), \
+ (jlong)FN(15, args), \
+ (jlong)FN(16, args), \
+ (jlong)FN(17, args), \
+ (jlong)FN(18, args), \
+ (jlong)FN(19, args), \
+ (jlong)FN(20, args), \
+ (jlong)FN(21, args), \
+ (jlong)FN(22, args), \
+ (jlong)FN(23, args), \
+ (jlong)FN(24, args), \
+ (jlong)FN(25, args), \
+ (jlong)FN(26, args), \
+ (jlong)FN(27, args), \
+ (jlong)FN(28, args), \
+ (jlong)FN(29, args), \
+ (jlong)FN(30, args), \
+ (jlong)FN(31, args), \
+ (jlong)FN(32, args), \
+ (jlong)FN(33, args), \
+ (jlong)FN(34, args), \
+ (jlong)FN(35, args), \
+ (jlong)FN(36, args), \
+ (jlong)FN(37, args), \
+ (jlong)FN(38, args), \
+ (jlong)FN(39, args), \
+ (jlong)FN(40, args), \
+ (jlong)FN(41, args), \
+ (jlong)FN(42, args), \
+ (jlong)FN(43, args), \
+ (jlong)FN(44, args), \
+ (jlong)FN(45, args), \
+ (jlong)FN(46, args), \
+ (jlong)FN(47, args), \
+ (jlong)FN(48, args), \
+ (jlong)FN(49, args), \
+ (jlong)FN(50, args), \
+ (jlong)FN(51, args), \
+ (jlong)FN(52, args), \
+ (jlong)FN(53, args), \
+ (jlong)FN(54, args), \
+ (jlong)FN(55, args), \
+ (jlong)FN(56, args), \
+ (jlong)FN(57, args), \
+ (jlong)FN(58, args), \
+ (jlong)FN(59, args), \
+ (jlong)FN(60, args), \
+ (jlong)FN(61, args), \
+ (jlong)FN(62, args), \
+ (jlong)FN(63, args), \
+ (jlong)FN(64, args), \
+ (jlong)FN(65, args), \
+ (jlong)FN(66, args), \
+ (jlong)FN(67, args), \
+ (jlong)FN(68, args), \
+ (jlong)FN(69, args), \
+ (jlong)FN(70, args), \
+ (jlong)FN(71, args), \
+ (jlong)FN(72, args), \
+ (jlong)FN(73, args), \
+ (jlong)FN(74, args), \
+ (jlong)FN(75, args), \
+ (jlong)FN(76, args), \
+ (jlong)FN(77, args), \
+ (jlong)FN(78, args), \
+ (jlong)FN(79, args), \
+ (jlong)FN(80, args), \
+ (jlong)FN(81, args), \
+ (jlong)FN(82, args), \
+ (jlong)FN(83, args), \
+ (jlong)FN(84, args), \
+ (jlong)FN(85, args), \
+ (jlong)FN(86, args), \
+ (jlong)FN(87, args), \
+ (jlong)FN(88, args), \
+ (jlong)FN(89, args), \
+ (jlong)FN(90, args), \
+ (jlong)FN(91, args), \
+ (jlong)FN(92, args), \
+ (jlong)FN(93, args), \
+ (jlong)FN(94, args), \
+ (jlong)FN(95, args), \
+ (jlong)FN(96, args), \
+ (jlong)FN(97, args), \
+ (jlong)FN(98, args), \
+ (jlong)FN(99, args), \
+ (jlong)FN(100, args), \
+ (jlong)FN(101, args), \
+ (jlong)FN(102, args), \
+ (jlong)FN(103, args), \
+ (jlong)FN(104, args), \
+ (jlong)FN(105, args), \
+ (jlong)FN(106, args), \
+ (jlong)FN(107, args), \
+ (jlong)FN(108, args), \
+ (jlong)FN(109, args), \
+ (jlong)FN(110, args), \
+ (jlong)FN(111, args), \
+ (jlong)FN(112, args), \
+ (jlong)FN(113, args), \
+ (jlong)FN(114, args), \
+ (jlong)FN(115, args), \
+ (jlong)FN(116, args), \
+ (jlong)FN(117, args), \
+ (jlong)FN(118, args), \
+ (jlong)FN(119, args), \
+ (jlong)FN(120, args), \
+ (jlong)FN(121, args), \
+ (jlong)FN(122, args), \
+ (jlong)FN(123, args), \
+ (jlong)FN(124, args), \
+ (jlong)FN(125, args), \
+ (jlong)FN(126, args), \
+ (jlong)FN(127, args), \
},
#elif MAX_CALLBACKS == 256
#define FN_A_BLOCK(args) { \
- (jintLong)FN(0, args), \
- (jintLong)FN(1, args), \
- (jintLong)FN(2, args), \
- (jintLong)FN(3, args), \
- (jintLong)FN(4, args), \
- (jintLong)FN(5, args), \
- (jintLong)FN(6, args), \
- (jintLong)FN(7, args), \
- (jintLong)FN(8, args), \
- (jintLong)FN(9, args), \
- (jintLong)FN(10, args), \
- (jintLong)FN(11, args), \
- (jintLong)FN(12, args), \
- (jintLong)FN(13, args), \
- (jintLong)FN(14, args), \
- (jintLong)FN(15, args), \
- (jintLong)FN(16, args), \
- (jintLong)FN(17, args), \
- (jintLong)FN(18, args), \
- (jintLong)FN(19, args), \
- (jintLong)FN(20, args), \
- (jintLong)FN(21, args), \
- (jintLong)FN(22, args), \
- (jintLong)FN(23, args), \
- (jintLong)FN(24, args), \
- (jintLong)FN(25, args), \
- (jintLong)FN(26, args), \
- (jintLong)FN(27, args), \
- (jintLong)FN(28, args), \
- (jintLong)FN(29, args), \
- (jintLong)FN(30, args), \
- (jintLong)FN(31, args), \
- (jintLong)FN(32, args), \
- (jintLong)FN(33, args), \
- (jintLong)FN(34, args), \
- (jintLong)FN(35, args), \
- (jintLong)FN(36, args), \
- (jintLong)FN(37, args), \
- (jintLong)FN(38, args), \
- (jintLong)FN(39, args), \
- (jintLong)FN(40, args), \
- (jintLong)FN(41, args), \
- (jintLong)FN(42, args), \
- (jintLong)FN(43, args), \
- (jintLong)FN(44, args), \
- (jintLong)FN(45, args), \
- (jintLong)FN(46, args), \
- (jintLong)FN(47, args), \
- (jintLong)FN(48, args), \
- (jintLong)FN(49, args), \
- (jintLong)FN(50, args), \
- (jintLong)FN(51, args), \
- (jintLong)FN(52, args), \
- (jintLong)FN(53, args), \
- (jintLong)FN(54, args), \
- (jintLong)FN(55, args), \
- (jintLong)FN(56, args), \
- (jintLong)FN(57, args), \
- (jintLong)FN(58, args), \
- (jintLong)FN(59, args), \
- (jintLong)FN(60, args), \
- (jintLong)FN(61, args), \
- (jintLong)FN(62, args), \
- (jintLong)FN(63, args), \
- (jintLong)FN(64, args), \
- (jintLong)FN(65, args), \
- (jintLong)FN(66, args), \
- (jintLong)FN(67, args), \
- (jintLong)FN(68, args), \
- (jintLong)FN(69, args), \
- (jintLong)FN(70, args), \
- (jintLong)FN(71, args), \
- (jintLong)FN(72, args), \
- (jintLong)FN(73, args), \
- (jintLong)FN(74, args), \
- (jintLong)FN(75, args), \
- (jintLong)FN(76, args), \
- (jintLong)FN(77, args), \
- (jintLong)FN(78, args), \
- (jintLong)FN(79, args), \
- (jintLong)FN(80, args), \
- (jintLong)FN(81, args), \
- (jintLong)FN(82, args), \
- (jintLong)FN(83, args), \
- (jintLong)FN(84, args), \
- (jintLong)FN(85, args), \
- (jintLong)FN(86, args), \
- (jintLong)FN(87, args), \
- (jintLong)FN(88, args), \
- (jintLong)FN(89, args), \
- (jintLong)FN(90, args), \
- (jintLong)FN(91, args), \
- (jintLong)FN(92, args), \
- (jintLong)FN(93, args), \
- (jintLong)FN(94, args), \
- (jintLong)FN(95, args), \
- (jintLong)FN(96, args), \
- (jintLong)FN(97, args), \
- (jintLong)FN(98, args), \
- (jintLong)FN(99, args), \
- (jintLong)FN(100, args), \
- (jintLong)FN(101, args), \
- (jintLong)FN(102, args), \
- (jintLong)FN(103, args), \
- (jintLong)FN(104, args), \
- (jintLong)FN(105, args), \
- (jintLong)FN(106, args), \
- (jintLong)FN(107, args), \
- (jintLong)FN(108, args), \
- (jintLong)FN(109, args), \
- (jintLong)FN(110, args), \
- (jintLong)FN(111, args), \
- (jintLong)FN(112, args), \
- (jintLong)FN(113, args), \
- (jintLong)FN(114, args), \
- (jintLong)FN(115, args), \
- (jintLong)FN(116, args), \
- (jintLong)FN(117, args), \
- (jintLong)FN(118, args), \
- (jintLong)FN(119, args), \
- (jintLong)FN(120, args), \
- (jintLong)FN(121, args), \
- (jintLong)FN(122, args), \
- (jintLong)FN(123, args), \
- (jintLong)FN(124, args), \
- (jintLong)FN(125, args), \
- (jintLong)FN(126, args), \
- (jintLong)FN(127, args), \
- (jintLong)FN(128, args), \
- (jintLong)FN(129, args), \
- (jintLong)FN(130, args), \
- (jintLong)FN(131, args), \
- (jintLong)FN(132, args), \
- (jintLong)FN(133, args), \
- (jintLong)FN(134, args), \
- (jintLong)FN(135, args), \
- (jintLong)FN(136, args), \
- (jintLong)FN(137, args), \
- (jintLong)FN(138, args), \
- (jintLong)FN(139, args), \
- (jintLong)FN(140, args), \
- (jintLong)FN(141, args), \
- (jintLong)FN(142, args), \
- (jintLong)FN(143, args), \
- (jintLong)FN(144, args), \
- (jintLong)FN(145, args), \
- (jintLong)FN(146, args), \
- (jintLong)FN(147, args), \
- (jintLong)FN(148, args), \
- (jintLong)FN(149, args), \
- (jintLong)FN(150, args), \
- (jintLong)FN(151, args), \
- (jintLong)FN(152, args), \
- (jintLong)FN(153, args), \
- (jintLong)FN(154, args), \
- (jintLong)FN(155, args), \
- (jintLong)FN(156, args), \
- (jintLong)FN(157, args), \
- (jintLong)FN(158, args), \
- (jintLong)FN(159, args), \
- (jintLong)FN(160, args), \
- (jintLong)FN(161, args), \
- (jintLong)FN(162, args), \
- (jintLong)FN(163, args), \
- (jintLong)FN(164, args), \
- (jintLong)FN(165, args), \
- (jintLong)FN(166, args), \
- (jintLong)FN(167, args), \
- (jintLong)FN(168, args), \
- (jintLong)FN(169, args), \
- (jintLong)FN(170, args), \
- (jintLong)FN(171, args), \
- (jintLong)FN(172, args), \
- (jintLong)FN(173, args), \
- (jintLong)FN(174, args), \
- (jintLong)FN(175, args), \
- (jintLong)FN(176, args), \
- (jintLong)FN(177, args), \
- (jintLong)FN(178, args), \
- (jintLong)FN(179, args), \
- (jintLong)FN(180, args), \
- (jintLong)FN(181, args), \
- (jintLong)FN(182, args), \
- (jintLong)FN(183, args), \
- (jintLong)FN(184, args), \
- (jintLong)FN(185, args), \
- (jintLong)FN(186, args), \
- (jintLong)FN(187, args), \
- (jintLong)FN(188, args), \
- (jintLong)FN(189, args), \
- (jintLong)FN(190, args), \
- (jintLong)FN(191, args), \
- (jintLong)FN(192, args), \
- (jintLong)FN(193, args), \
- (jintLong)FN(194, args), \
- (jintLong)FN(195, args), \
- (jintLong)FN(196, args), \
- (jintLong)FN(197, args), \
- (jintLong)FN(198, args), \
- (jintLong)FN(199, args), \
- (jintLong)FN(200, args), \
- (jintLong)FN(201, args), \
- (jintLong)FN(202, args), \
- (jintLong)FN(203, args), \
- (jintLong)FN(204, args), \
- (jintLong)FN(205, args), \
- (jintLong)FN(206, args), \
- (jintLong)FN(207, args), \
- (jintLong)FN(208, args), \
- (jintLong)FN(209, args), \
- (jintLong)FN(210, args), \
- (jintLong)FN(211, args), \
- (jintLong)FN(212, args), \
- (jintLong)FN(213, args), \
- (jintLong)FN(214, args), \
- (jintLong)FN(215, args), \
- (jintLong)FN(216, args), \
- (jintLong)FN(217, args), \
- (jintLong)FN(218, args), \
- (jintLong)FN(219, args), \
- (jintLong)FN(220, args), \
- (jintLong)FN(221, args), \
- (jintLong)FN(222, args), \
- (jintLong)FN(223, args), \
- (jintLong)FN(224, args), \
- (jintLong)FN(225, args), \
- (jintLong)FN(226, args), \
- (jintLong)FN(227, args), \
- (jintLong)FN(228, args), \
- (jintLong)FN(229, args), \
- (jintLong)FN(230, args), \
- (jintLong)FN(231, args), \
- (jintLong)FN(232, args), \
- (jintLong)FN(233, args), \
- (jintLong)FN(234, args), \
- (jintLong)FN(235, args), \
- (jintLong)FN(236, args), \
- (jintLong)FN(237, args), \
- (jintLong)FN(238, args), \
- (jintLong)FN(239, args), \
- (jintLong)FN(240, args), \
- (jintLong)FN(241, args), \
- (jintLong)FN(242, args), \
- (jintLong)FN(243, args), \
- (jintLong)FN(244, args), \
- (jintLong)FN(245, args), \
- (jintLong)FN(246, args), \
- (jintLong)FN(247, args), \
- (jintLong)FN(248, args), \
- (jintLong)FN(249, args), \
- (jintLong)FN(250, args), \
- (jintLong)FN(251, args), \
- (jintLong)FN(252, args), \
- (jintLong)FN(253, args), \
- (jintLong)FN(254, args), \
- (jintLong)FN(255, args), \
+ (jlong)FN(0, args), \
+ (jlong)FN(1, args), \
+ (jlong)FN(2, args), \
+ (jlong)FN(3, args), \
+ (jlong)FN(4, args), \
+ (jlong)FN(5, args), \
+ (jlong)FN(6, args), \
+ (jlong)FN(7, args), \
+ (jlong)FN(8, args), \
+ (jlong)FN(9, args), \
+ (jlong)FN(10, args), \
+ (jlong)FN(11, args), \
+ (jlong)FN(12, args), \
+ (jlong)FN(13, args), \
+ (jlong)FN(14, args), \
+ (jlong)FN(15, args), \
+ (jlong)FN(16, args), \
+ (jlong)FN(17, args), \
+ (jlong)FN(18, args), \
+ (jlong)FN(19, args), \
+ (jlong)FN(20, args), \
+ (jlong)FN(21, args), \
+ (jlong)FN(22, args), \
+ (jlong)FN(23, args), \
+ (jlong)FN(24, args), \
+ (jlong)FN(25, args), \
+ (jlong)FN(26, args), \
+ (jlong)FN(27, args), \
+ (jlong)FN(28, args), \
+ (jlong)FN(29, args), \
+ (jlong)FN(30, args), \
+ (jlong)FN(31, args), \
+ (jlong)FN(32, args), \
+ (jlong)FN(33, args), \
+ (jlong)FN(34, args), \
+ (jlong)FN(35, args), \
+ (jlong)FN(36, args), \
+ (jlong)FN(37, args), \
+ (jlong)FN(38, args), \
+ (jlong)FN(39, args), \
+ (jlong)FN(40, args), \
+ (jlong)FN(41, args), \
+ (jlong)FN(42, args), \
+ (jlong)FN(43, args), \
+ (jlong)FN(44, args), \
+ (jlong)FN(45, args), \
+ (jlong)FN(46, args), \
+ (jlong)FN(47, args), \
+ (jlong)FN(48, args), \
+ (jlong)FN(49, args), \
+ (jlong)FN(50, args), \
+ (jlong)FN(51, args), \
+ (jlong)FN(52, args), \
+ (jlong)FN(53, args), \
+ (jlong)FN(54, args), \
+ (jlong)FN(55, args), \
+ (jlong)FN(56, args), \
+ (jlong)FN(57, args), \
+ (jlong)FN(58, args), \
+ (jlong)FN(59, args), \
+ (jlong)FN(60, args), \
+ (jlong)FN(61, args), \
+ (jlong)FN(62, args), \
+ (jlong)FN(63, args), \
+ (jlong)FN(64, args), \
+ (jlong)FN(65, args), \
+ (jlong)FN(66, args), \
+ (jlong)FN(67, args), \
+ (jlong)FN(68, args), \
+ (jlong)FN(69, args), \
+ (jlong)FN(70, args), \
+ (jlong)FN(71, args), \
+ (jlong)FN(72, args), \
+ (jlong)FN(73, args), \
+ (jlong)FN(74, args), \
+ (jlong)FN(75, args), \
+ (jlong)FN(76, args), \
+ (jlong)FN(77, args), \
+ (jlong)FN(78, args), \
+ (jlong)FN(79, args), \
+ (jlong)FN(80, args), \
+ (jlong)FN(81, args), \
+ (jlong)FN(82, args), \
+ (jlong)FN(83, args), \
+ (jlong)FN(84, args), \
+ (jlong)FN(85, args), \
+ (jlong)FN(86, args), \
+ (jlong)FN(87, args), \
+ (jlong)FN(88, args), \
+ (jlong)FN(89, args), \
+ (jlong)FN(90, args), \
+ (jlong)FN(91, args), \
+ (jlong)FN(92, args), \
+ (jlong)FN(93, args), \
+ (jlong)FN(94, args), \
+ (jlong)FN(95, args), \
+ (jlong)FN(96, args), \
+ (jlong)FN(97, args), \
+ (jlong)FN(98, args), \
+ (jlong)FN(99, args), \
+ (jlong)FN(100, args), \
+ (jlong)FN(101, args), \
+ (jlong)FN(102, args), \
+ (jlong)FN(103, args), \
+ (jlong)FN(104, args), \
+ (jlong)FN(105, args), \
+ (jlong)FN(106, args), \
+ (jlong)FN(107, args), \
+ (jlong)FN(108, args), \
+ (jlong)FN(109, args), \
+ (jlong)FN(110, args), \
+ (jlong)FN(111, args), \
+ (jlong)FN(112, args), \
+ (jlong)FN(113, args), \
+ (jlong)FN(114, args), \
+ (jlong)FN(115, args), \
+ (jlong)FN(116, args), \
+ (jlong)FN(117, args), \
+ (jlong)FN(118, args), \
+ (jlong)FN(119, args), \
+ (jlong)FN(120, args), \
+ (jlong)FN(121, args), \
+ (jlong)FN(122, args), \
+ (jlong)FN(123, args), \
+ (jlong)FN(124, args), \
+ (jlong)FN(125, args), \
+ (jlong)FN(126, args), \
+ (jlong)FN(127, args), \
+ (jlong)FN(128, args), \
+ (jlong)FN(129, args), \
+ (jlong)FN(130, args), \
+ (jlong)FN(131, args), \
+ (jlong)FN(132, args), \
+ (jlong)FN(133, args), \
+ (jlong)FN(134, args), \
+ (jlong)FN(135, args), \
+ (jlong)FN(136, args), \
+ (jlong)FN(137, args), \
+ (jlong)FN(138, args), \
+ (jlong)FN(139, args), \
+ (jlong)FN(140, args), \
+ (jlong)FN(141, args), \
+ (jlong)FN(142, args), \
+ (jlong)FN(143, args), \
+ (jlong)FN(144, args), \
+ (jlong)FN(145, args), \
+ (jlong)FN(146, args), \
+ (jlong)FN(147, args), \
+ (jlong)FN(148, args), \
+ (jlong)FN(149, args), \
+ (jlong)FN(150, args), \
+ (jlong)FN(151, args), \
+ (jlong)FN(152, args), \
+ (jlong)FN(153, args), \
+ (jlong)FN(154, args), \
+ (jlong)FN(155, args), \
+ (jlong)FN(156, args), \
+ (jlong)FN(157, args), \
+ (jlong)FN(158, args), \
+ (jlong)FN(159, args), \
+ (jlong)FN(160, args), \
+ (jlong)FN(161, args), \
+ (jlong)FN(162, args), \
+ (jlong)FN(163, args), \
+ (jlong)FN(164, args), \
+ (jlong)FN(165, args), \
+ (jlong)FN(166, args), \
+ (jlong)FN(167, args), \
+ (jlong)FN(168, args), \
+ (jlong)FN(169, args), \
+ (jlong)FN(170, args), \
+ (jlong)FN(171, args), \
+ (jlong)FN(172, args), \
+ (jlong)FN(173, args), \
+ (jlong)FN(174, args), \
+ (jlong)FN(175, args), \
+ (jlong)FN(176, args), \
+ (jlong)FN(177, args), \
+ (jlong)FN(178, args), \
+ (jlong)FN(179, args), \
+ (jlong)FN(180, args), \
+ (jlong)FN(181, args), \
+ (jlong)FN(182, args), \
+ (jlong)FN(183, args), \
+ (jlong)FN(184, args), \
+ (jlong)FN(185, args), \
+ (jlong)FN(186, args), \
+ (jlong)FN(187, args), \
+ (jlong)FN(188, args), \
+ (jlong)FN(189, args), \
+ (jlong)FN(190, args), \
+ (jlong)FN(191, args), \
+ (jlong)FN(192, args), \
+ (jlong)FN(193, args), \
+ (jlong)FN(194, args), \
+ (jlong)FN(195, args), \
+ (jlong)FN(196, args), \
+ (jlong)FN(197, args), \
+ (jlong)FN(198, args), \
+ (jlong)FN(199, args), \
+ (jlong)FN(200, args), \
+ (jlong)FN(201, args), \
+ (jlong)FN(202, args), \
+ (jlong)FN(203, args), \
+ (jlong)FN(204, args), \
+ (jlong)FN(205, args), \
+ (jlong)FN(206, args), \
+ (jlong)FN(207, args), \
+ (jlong)FN(208, args), \
+ (jlong)FN(209, args), \
+ (jlong)FN(210, args), \
+ (jlong)FN(211, args), \
+ (jlong)FN(212, args), \
+ (jlong)FN(213, args), \
+ (jlong)FN(214, args), \
+ (jlong)FN(215, args), \
+ (jlong)FN(216, args), \
+ (jlong)FN(217, args), \
+ (jlong)FN(218, args), \
+ (jlong)FN(219, args), \
+ (jlong)FN(220, args), \
+ (jlong)FN(221, args), \
+ (jlong)FN(222, args), \
+ (jlong)FN(223, args), \
+ (jlong)FN(224, args), \
+ (jlong)FN(225, args), \
+ (jlong)FN(226, args), \
+ (jlong)FN(227, args), \
+ (jlong)FN(228, args), \
+ (jlong)FN(229, args), \
+ (jlong)FN(230, args), \
+ (jlong)FN(231, args), \
+ (jlong)FN(232, args), \
+ (jlong)FN(233, args), \
+ (jlong)FN(234, args), \
+ (jlong)FN(235, args), \
+ (jlong)FN(236, args), \
+ (jlong)FN(237, args), \
+ (jlong)FN(238, args), \
+ (jlong)FN(239, args), \
+ (jlong)FN(240, args), \
+ (jlong)FN(241, args), \
+ (jlong)FN(242, args), \
+ (jlong)FN(243, args), \
+ (jlong)FN(244, args), \
+ (jlong)FN(245, args), \
+ (jlong)FN(246, args), \
+ (jlong)FN(247, args), \
+ (jlong)FN(248, args), \
+ (jlong)FN(249, args), \
+ (jlong)FN(250, args), \
+ (jlong)FN(251, args), \
+ (jlong)FN(252, args), \
+ (jlong)FN(253, args), \
+ (jlong)FN(254, args), \
+ (jlong)FN(255, args), \
},
#else
#error Invalid MAX_CALLBACKS
#endif /* MAX_CALLBACKS == 16 */
-jintLong fnx_array[MAX_ARGS+1][MAX_CALLBACKS] = {
+jlong fnx_array[MAX_ARGS+1+NUM_DOUBLE_CALLBACKS][MAX_CALLBACKS] = {
FN_A_BLOCK(0)
FN_A_BLOCK(1)
FN_A_BLOCK(2)
@@ -979,26 +1506,60 @@ jintLong fnx_array[MAX_ARGS+1][MAX_CALLBACKS] = {
FN_A_BLOCK(9)
FN_A_BLOCK(10)
FN_A_BLOCK(11)
- FN_A_BLOCK(12)
+ FN_A_BLOCK(12)
+ #if defined(GTK)
+ FN_DOUBLE_A_BLOCK(4)
+ FN_DOUBLE_A_BLOCK(5)
+ #endif
};
-#endif /* USE_ASSEMBLER */
+void initialize_mid_Throwable_addSuppressed(JNIEnv* env)
+{
+ jclass classThrowable = NULL;
+
+ classThrowable = (*env)->FindClass(env, "java/lang/Throwable");
+ if (!classThrowable || (*env)->ExceptionCheck(env)) {
+ /* Shall never happen, but let's still try to handle it */
+ fprintf(stderr, "SWT-JNI: ERROR(%d): Failed to resolve 'java/lang/Throwable'\n", __LINE__);
+ fflush(stderr);
+ (*env)->ExceptionClear(env);
+ return;
+ }
+
+ mid_Throwable_addSuppressed = (*env)->GetMethodID(env, classThrowable, "addSuppressed", "(Ljava/lang/Throwable;)V");
+ if (!mid_Throwable_addSuppressed || (*env)->ExceptionCheck(env))
+ {
+ /* Shall never happen, but let's still try to handle it */
+ fprintf(stderr, "SWT-JNI: ERROR(%d): Failed to resolve 'addSuppressed' in 'java/lang/Throwable'\n", __LINE__);
+ fflush(stderr);
+ (*env)->ExceptionClear(env);
+ return;
+ }
+}
+
+void initialize(JNIEnv* env)
+{
+ if (initialized) return;
+
+ memset(&callbackData, 0, sizeof(callbackData));
+ initialize_mid_Throwable_addSuppressed(env);
+
+ initialized = 1;
+}
/* --------------- callback class calls --------------- */
-JNIEXPORT jintLong JNICALL CALLBACK_NATIVE(bind)
- (JNIEnv *env, jclass that, jobject callbackObject, jobject object, jstring method, jstring signature, jint argCount, jboolean isStatic, jboolean isArrayBased, jintLong errorResult)
+JNIEXPORT jlong JNICALL CALLBACK_NATIVE(bind)
+ (JNIEnv *env, jclass that, jobject callbackObject, jobject object, jstring method, jstring signature, jint argCount, jboolean isStatic, jboolean isArrayBased, jlong errorResult)
{
int i;
jmethodID mid = NULL;
jclass javaClass = that;
const char *methodString = NULL, *sigString = NULL;
- if (jvm == NULL) (*env)->GetJavaVM(env, &jvm);
- if (JNI_VERSION == 0) JNI_VERSION = (*env)->GetVersion(env);
- if (!initialized) {
- memset(&callbackData, 0, sizeof(callbackData));
- initialized = 1;
- }
+ jlong result = 0;
+
+ initialize(env);
+
if (method) methodString = (const char *) (*env)->GetStringUTFChars(env, method, NULL);
if (signature) sigString = (const char *) (*env)->GetStringUTFChars(env, signature, NULL);
if (object && methodString && sigString) {
@@ -1009,8 +1570,6 @@ JNIEXPORT jintLong JNICALL CALLBACK_NATIVE(bind)
mid = (*env)->GetMethodID(env, javaClass, methodString, sigString);
}
}
- if (method && methodString) (*env)->ReleaseStringUTFChars(env, method, methodString);
- if (signature && sigString) (*env)->ReleaseStringUTFChars(env, signature, sigString);
if (mid == 0) goto fail;
for (i=0; i<MAX_CALLBACKS; i++) {
if (!callbackData[i].callback) {
@@ -1021,122 +1580,69 @@ JNIEXPORT jintLong JNICALL CALLBACK_NATIVE(bind)
callbackData[i].argCount = argCount;
callbackData[i].errorResult = errorResult;
callbackData[i].methodID = mid;
-#ifndef USE_ASSEMBLER
- return (jintLong) fnx_array[argCount][i];
-#else
- {
- int j = 0, k;
- unsigned char* code;
-#ifdef __APPLE__
- int pad = 0;
-#endif
- if (callbackCode == NULL) {
-#if defined (_WIN32) || defined (_WIN32_WCE)
- callbackCode = VirtualAlloc(NULL, CALLBACK_THUNK_SIZE * MAX_CALLBACKS, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
- if (callbackCode == NULL) return 0;
-#else
- callbackCode = mmap(NULL, CALLBACK_THUNK_SIZE * MAX_CALLBACKS, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
- if (callbackCode == MAP_FAILED) return 0;
-#endif
- }
- code = (unsigned char *)(callbackCode + (i * CALLBACK_THUNK_SIZE));
-
- //PUSH EBP - 1 byte
- code[j++] = 0x55;
-
- //MOV EBP,ESP - 2 bytes
- code[j++] = 0x8b;
- code[j++] = 0xec;
-
-#ifdef __APPLE__
- /* darwin calling conventions require that the stack be aligned on a 16-byte boundary. */
- k = (argCount+3)*sizeof(jintLong);
- pad = ((k + 15) & ~15) - k;
- if (pad > 0) {
- //SUB ESP,pad - 3 bytes
- code[j++] = 0x83;
- code[j++] = 0xec;
- code[j++] = pad;
- }
-#endif
-
- // 3*argCount bytes
- for (k=(argCount + 1) * sizeof(jintLong); k >= sizeof(jintLong)*2; k -= sizeof(jintLong)) {
- //PUSH SS:[EBP+k]
- code[j++] = 0xff;
- code[j++] = 0x75;
- code[j++] = k;
- }
-
- if (i > 127) {
- //PUSH i - 5 bytes
- code[j++] = 0x68;
- code[j++] = ((i >> 0) & 0xFF);
- code[j++] = ((i >> 8) & 0xFF);
- code[j++] = ((i >> 16) & 0xFF);
- code[j++] = ((i >> 24) & 0xFF);
- } else {
- //PUSH i - 2 bytes
- code[j++] = 0x6a;
- code[j++] = i;
- }
-
- //MOV EAX callback - 1 + sizeof(jintLong) bytes
- code[j++] = 0xb8;
- ((jintLong *)&code[j])[0] = (jintLong)&callback;
- j += sizeof(jintLong);
-
- //CALL EAX - 2 bytes
- code[j++] = 0xff;
- code[j++] = 0xd0;
-
- //ADD ESP,(argCount + 1) * sizeof(jintLong) - 3 bytes
- code[j++] = 0x83;
- code[j++] = 0xc4;
-#ifdef __APPLE__
- code[j++] = (unsigned char)(pad + ((argCount + 1) * sizeof(jintLong)));
-#else
- code[j++] = (unsigned char)((argCount + 1) * sizeof(jintLong));
-#endif
-
- //POP EBP - 1 byte
- code[j++] = 0x5d;
-#if defined (_WIN32) || defined (_WIN32_WCE)
- //RETN argCount * sizeof(jintLong) - 3 bytes
- code[j++] = 0xc2;
- code[j++] = (unsigned char)(argCount * sizeof(jintLong));
- code[j++] = 0x00;
-#else
- //RETN - 1 byte
- code[j++] = 0xc3;
-#endif
-
- if (j > CALLBACK_THUNK_SIZE) {
- jclass errorClass = (*env)->FindClass(env, "java/lang/Error");
- (*env)->ThrowNew(env, errorClass, "Callback thunk overflow");
- }
-
- return (jintLong)code;
- }
-#endif /* USE_ASSEMBLER */
+ #ifdef DEBUG_CALL_PRINTS
+ #if defined(COCOA)
+ callbackData[i].arg_Selector = -1;
+
+ if (!strcmp(methodString, "applicationProc") ||
+ !strcmp(methodString, "dragSourceProc") ||
+ !strcmp(methodString, "windowProc") ||
+ !strcmp(methodString, "dialogProc"))
+ {
+ callbackData[i].arg_Selector = 1;
+ }
+ #elif defined(GTK)
+ callbackData[i].arg_GObject = -1;
+ callbackData[i].arg_GdkEvent = -1;
+ callbackData[i].arg_SwtSignalID = -1;
+
+ if (!strcmp(methodString, "windowProc")) {
+ callbackData[i].arg_GObject = 0;
+ callbackData[i].arg_SwtSignalID = argCount - 1;
+ }
+
+ if (!strcmp(methodString, "eventProc")) {
+ callbackData[i].arg_GdkEvent = 0;
+ }
+ #endif
+
+ fprintf(stderr, "SWT-JNI: Registered callback[%02d] = %s%s\n", i, methodString, sigString);
+ fflush(stderr);
+ #endif
+
+ #if defined(GTK)
+ if (strcmp(strtok((char *)sigString, ")"), "(JDDJ") == 0) {
+ result = (jlong) fnx_array[MAX_ARGS + 1][i];
+ } else if (strcmp(strtok((char *)sigString, ")"), "(JIDDJ") == 0) {
+ result = (jlong) fnx_array[MAX_ARGS + 2][i];
+ } else {
+ result = (jlong) fnx_array[argCount][i];
+ }
+ #else
+ result = (jlong) fnx_array[argCount][i];
+ #endif
+ break;
}
}
+
fail:
- return 0;
+ if (method && methodString) (*env)->ReleaseStringUTFChars(env, method, methodString);
+ if (signature && sigString) (*env)->ReleaseStringUTFChars(env, signature, sigString);
+ return result;
}
JNIEXPORT void JNICALL CALLBACK_NATIVE(unbind)
(JNIEnv *env, jclass that, jobject callback)
{
int i;
- for (i=0; i<MAX_CALLBACKS; i++) {
- if (callbackData[i].callback != NULL && (*env)->IsSameObject(env, callback, callbackData[i].callback)) {
- if (callbackData[i].callback != NULL) (*env)->DeleteGlobalRef(env, callbackData[i].callback);
- if (callbackData[i].object != NULL) (*env)->DeleteGlobalRef(env, callbackData[i].object);
- memset(&callbackData[i], 0, sizeof(CALLBACK_DATA));
- }
- }
+ for (i=0; i<MAX_CALLBACKS; i++) {
+ if (callbackData[i].callback != NULL && (*env)->IsSameObject(env, callback, callbackData[i].callback)) {
+ if (callbackData[i].callback != NULL) (*env)->DeleteGlobalRef(env, callbackData[i].callback);
+ if (callbackData[i].object != NULL) (*env)->DeleteGlobalRef(env, callbackData[i].object);
+ memset(&callbackData[i], 0, sizeof(CALLBACK_DATA));
+ }
+ }
}
JNIEXPORT jboolean JNICALL CALLBACK_NATIVE(getEnabled)
@@ -1160,79 +1666,281 @@ JNIEXPORT void JNICALL CALLBACK_NATIVE(setEnabled)
JNIEXPORT void JNICALL CALLBACK_NATIVE(reset)
(JNIEnv *env, jclass that)
{
- memset((void *)&callbackData, 0, sizeof(callbackData));
+ memset((void *)&callbackData, 0, sizeof(callbackData));
+}
+
+#if (defined(DEBUG_CALL_PRINTS) && defined(GTK))
+const char* glibTypeNameFromInstance(void* object) {
+ static int isInitialized = 0;
+ static const char* (*g_type_name_from_instance)(void*) = 0;
+
+ if (!isInitialized) {
+ /* Do not dlclose(gobjectHandle); we're going to continue using the library */
+ void* gobjectHandle = dlopen("libgobject-2.0.so.0", RTLD_LAZY);
+
+ if (gobjectHandle)
+ g_type_name_from_instance = dlsym(gobjectHandle, "g_type_name_from_instance");
+
+ isInitialized = 1;
+ }
+
+ if (!g_type_name_from_instance)
+ return "<No glib>";
+
+ return g_type_name_from_instance(object);
}
-jintLong callback(int index, ...)
+const char* swtSignalNameFromId(int id) {
+ /* Adapted from constants in org.eclipse.swt.widgets.Widget */
+ switch (id) {
+ case 1: return "ACTIVATE";
+ case 2: return "BUTTON_PRESS_EVENT";
+ case 3: return "BUTTON_PRESS_EVENT_INVERSE";
+ case 4: return "BUTTON_RELEASE_EVENT";
+ case 5: return "BUTTON_RELEASE_EVENT_INVERSE";
+ case 6: return "CHANGED";
+ case 7: return "CHANGE_VALUE";
+ case 8: return "CLICKED";
+ case 9: return "COMMIT";
+ case 10: return "CONFIGURE_EVENT";
+ case 11: return "DELETE_EVENT";
+ case 12: return "DELETE_RANGE";
+ case 13: return "DELETE_TEXT";
+ case 14: return "ENTER_NOTIFY_EVENT";
+ case 15: return "EVENT";
+ case 16: return "EVENT_AFTER";
+ case 17: return "EXPAND_COLLAPSE_CURSOR_ROW";
+ case 18: return "EXPOSE_EVENT";
+ case 19: return "EXPOSE_EVENT_INVERSE";
+ case 20: return "FOCUS";
+ case 21: return "FOCUS_IN_EVENT";
+ case 22: return "FOCUS_OUT_EVENT";
+ case 23: return "GRAB_FOCUS";
+ case 24: return "HIDE";
+ case 25: return "INPUT";
+ case 26: return "INSERT_TEXT";
+ case 27: return "KEY_PRESS_EVENT";
+ case 28: return "KEY_RELEASE_EVENT";
+ case 29: return "LEAVE_NOTIFY_EVENT";
+ case 30: return "MAP";
+ case 31: return "MAP_EVENT";
+ case 32: return "MNEMONIC_ACTIVATE";
+ case 33: return "MOTION_NOTIFY_EVENT";
+ case 34: return "MOTION_NOTIFY_EVENT_INVERSE";
+ case 35: return "MOVE_FOCUS";
+ case 36: return "OUTPUT";
+ case 37: return "POPULATE_POPUP";
+ case 38: return "POPUP_MENU";
+ case 39: return "PREEDIT_CHANGED";
+ case 40: return "REALIZE";
+ case 41: return "ROW_ACTIVATED";
+ case 42: return "SCROLL_CHILD";
+ case 43: return "SCROLL_EVENT";
+ case 44: return "SELECT";
+ case 45: return "SHOW";
+ case 46: return "SHOW_HELP";
+ case 47: return "SIZE_ALLOCATE";
+ case 48: return "STYLE_UPDATED";
+ case 49: return "SWITCH_PAGE";
+ case 50: return "TEST_COLLAPSE_ROW";
+ case 51: return "TEST_EXPAND_ROW";
+ case 52: return "TEXT_BUFFER_INSERT_TEXT";
+ case 53: return "TOGGLED";
+ case 54: return "UNMAP";
+ case 55: return "UNMAP_EVENT";
+ case 56: return "UNREALIZE";
+ case 57: return "VALUE_CHANGED";
+ case 59: return "WINDOW_STATE_EVENT";
+ case 60: return "ACTIVATE_INVERSE";
+ case 61: return "DAY_SELECTED";
+ case 62: return "MONTH_CHANGED";
+ case 63: return "STATUS_ICON_POPUP_MENU";
+ case 64: return "ROW_INSERTED";
+ case 65: return "ROW_DELETED";
+ case 66: return "DAY_SELECTED_DOUBLE_CLICK";
+ case 67: return "ICON_RELEASE";
+ case 68: return "SELECTION_DONE";
+ case 69: return "START_INTERACTIVE_SEARCH";
+ case 70: return "BACKSPACE";
+ case 71: return "BACKSPACE_INVERSE";
+ case 72: return "COPY_CLIPBOARD";
+ case 73: return "COPY_CLIPBOARD_INVERSE";
+ case 74: return "CUT_CLIPBOARD";
+ case 75: return "CUT_CLIPBOARD_INVERSE";
+ case 76: return "PASTE_CLIPBOARD";
+ case 77: return "PASTE_CLIPBOARD_INVERSE";
+ case 78: return "DELETE_FROM_CURSOR";
+ case 79: return "DELETE_FROM_CURSOR_INVERSE";
+ case 80: return "MOVE_CURSOR";
+ case 81: return "MOVE_CURSOR_INVERSE";
+ case 82: return "DIRECTION_CHANGED";
+ case 83: return "CREATE_MENU_PROXY";
+ case 84: return "ROW_HAS_CHILD_TOGGLED";
+ case 85: return "POPPED_UP";
+ case 86: return "FOCUS_IN";
+ case 87: return "FOCUS_OUT";
+ case 88: return "IM_UPDATE";
+ case 89: return "KEY_PRESSED";
+ case 90: return "KEY_RELEASED";
+ case 91: return "DECELERATE";
+ case 92: return "SCROLL";
+ case 93: return "SCROLL_BEGIN";
+ case 94: return "SCROLL_END";
+ case 95: return "ENTER";
+ case 96: return "LEAVE";
+ case 97: return "MOTION";
+ case 98: return "MOTION_INVERSE";
+ case 99: return "CLOSE_REQUEST";
+ case 100: return "GESTURE_PRESSED";
+ case 101: return "GESTURE_RELEASED";
+ case 102: return "NOTIFY_STATE";
+ case 103: return "SIZE_ALLOCATE_GTK4";
+ case 104: return "DPI_CHANGED";
+ }
+
+ return 0;
+}
+#endif
+
+jlong callback(int index, ...)
{
if (!callbackEnabled) return 0;
- {
JNIEnv *env = NULL;
jmethodID mid = callbackData[index].methodID;
jobject object = callbackData[index].object;
jboolean isStatic = callbackData[index].isStatic;
jboolean isArrayBased = callbackData[index].isArrayBased;
jint argCount = callbackData[index].argCount;
- jintLong result = callbackData[index].errorResult;
- jthrowable ex;
+ jlong result = callbackData[index].errorResult;
+ jthrowable oldException = NULL;
+ jthrowable curException = NULL;
int detach = 0;
va_list vl;
+ va_start(vl, index);
+
#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "* callback starting %d\n", counter++);
-#endif
+ {
+ int i;
+ va_list vaCopy;
+ va_copy(vaCopy, vl);
+
+ counter++;
+ fprintf(stderr, "SWT-JNI:%*scallback[%d](", counter, "", index);
+ for (i=0; i<argCount; i++) {
+ void* arg = va_arg(vaCopy, void*);
+ int isPrinted = 0;
+
+ #ifdef COCOA
+ if (!isPrinted && (i == callbackData[index].arg_Selector)) {
+ fprintf(stderr, "%s ", sel_getName(arg));
+ isPrinted = 1;
+ }
+ #elif defined(GTK)
+ if (!isPrinted && (i == callbackData[index].arg_GObject)) {
+ fprintf(stderr, "%p [%s] ", arg, glibTypeNameFromInstance(arg));
+ isPrinted = 1;
+ }
-#ifdef JNI_VERSION_1_2
- if (IS_JNI_1_2) {
- (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2);
- }
-#endif
-
-#ifdef JNI_VERSION_1_4
- if (env == NULL) {
- if (JNI_VERSION >= JNI_VERSION_1_4) {
- (*jvm)->AttachCurrentThreadAsDaemon(jvm, (void **)&env, NULL);
+ if (!isPrinted && (i == callbackData[index].arg_GdkEvent)) {
+ const GdkEventAny* event = (const GdkEventAny*)arg;
+ fprintf(stderr,
+ "%p [GdkEvent type=%d window=%p [%s]] ",
+ event,
+ event->type,
+ event->window,
+ glibTypeNameFromInstance(event->window)
+ );
+
+ isPrinted = 1;
+ }
+
+ if (!isPrinted && (i == callbackData[index].arg_SwtSignalID)) {
+ int signalID = (int)(long long)arg;
+ const char* signalName = swtSignalNameFromId(signalID);
+ if (signalName)
+ fprintf(stderr, "%s ", signalName);
+ else
+ fprintf(stderr, "%d ", signalID);
+ isPrinted = 1;
+ }
+ #endif
+
+ if (!isPrinted)
+ fprintf(stderr, "%p ", arg);
}
+ fprintf(stderr, ") {\n");
+
+ fflush(stderr);
+ va_end(vaCopy);
}
#endif
-
+
+ (*JVM)->GetEnv(JVM, (void **)&env, JNI_VERSION_1_4);
+
if (env == NULL) {
- (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL);
- if (IS_JNI_1_2) detach = 1;
+ (*JVM)->AttachCurrentThreadAsDaemon(JVM, (void **)&env, NULL);
+#ifdef DEBUG_CALL_PRINTS
+ fprintf(stderr, "SWT-JNI: AttachCurrentThreadAsDaemon\n");
+#endif
+ detach = 1;
}
/* If the current thread is not attached to the VM, it is not possible to call into the VM */
if (env == NULL) {
#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "* could not get env\n");
+ fprintf(stderr, "SWT-JNI:%*s ERROR(%d): (env == NULL)\n", counter, "", __LINE__);
+ fflush(stderr);
#endif
goto noEnv;
}
- /* If an exception has occurred in previous callbacks do not call into the VM. */
- if ((ex = (*env)->ExceptionOccurred(env))) {
- (*env)->DeleteLocalRef(env, ex);
- goto done;
+ /*
+ * Bug 562408: Sometimes a single native API can call multiple callbacks.
+ * Java side of the callback might throw an exception for one of such
+ * callbacks. The exception will stay until it can be delivered, that is,
+ * until execution returns from native API back to Java. This leaves us
+ * with the following options for concurrent callbacks:
+ * 1) Do nothing
+ * Since the exception is still pending on JVM's thread, attempts to
+ * call another Java callback will just immediately terminate on the
+ * same exception. Hence the callback will not be executed. But caller's
+ * contract does not always allow callback to be silently skipped. This
+ * sometimes causes caller to crash JVM and/or do something weird.
+ * 2) Early-return from this function
+ * This is basically the same as (1).
+ * 3) Temporarily put the exception aside
+ * This allows the new callback to execute independently. Note that it
+ * can throw as well.
+ * Here, option (3) is implemented.
+ */
+ oldException = (*env)->ExceptionOccurred(env);
+ if (oldException) {
+#ifdef DEBUG_CALL_PRINTS
+ fprintf(stderr, "SWT-JNI:%*s ERROR(%d): (*env)->ExceptionOccurred()\n", counter, "", __LINE__);
+ fflush(stderr);
+#endif
+ (*env)->ExceptionClear(env);
}
/* Call into the VM. */
ATOMIC_INC(callbackEntryCount);
- va_start(vl, index);
+
if (isArrayBased) {
int i;
- jintLongArray argsArray = (*env)->NewIntLongArray(env, argCount);
+ jlongArray argsArray = (*env)->NewLongArray(env, argCount);
if (argsArray != NULL) {
- jintLong *elements = (*env)->GetIntLongArrayElements(env, argsArray, NULL);
+ jlong *elements = (*env)->GetLongArrayElements(env, argsArray, NULL);
if (elements != NULL) {
for (i=0; i<argCount; i++) {
- elements[i] = va_arg(vl, jintLong);
+ elements[i] = va_arg(vl, jlong);
}
- (*env)->ReleaseIntLongArrayElements(env, argsArray, elements, 0);
+ (*env)->ReleaseLongArrayElements(env, argsArray, elements, 0);
if (isStatic) {
- result = (*env)->CallStaticIntLongMethod(env, object, mid, argsArray);
+ result = (*env)->CallStaticLongMethod(env, object, mid, argsArray);
} else {
- result = (*env)->CallIntLongMethod(env, object, mid, argsArray);
+ result = (*env)->CallLongMethod(env, object, mid, argsArray);
}
}
/*
@@ -1243,38 +1951,90 @@ jintLong callback(int index, ...)
}
} else {
if (isStatic) {
- result = (*env)->CallStaticIntLongMethodV(env, object, mid, vl);
+ result = (*env)->CallStaticLongMethodV(env, object, mid, vl);
} else {
- result = (*env)->CallIntLongMethodV(env, object, mid, vl);
+ result = (*env)->CallLongMethodV(env, object, mid, vl);
}
}
- va_end(vl);
ATOMIC_DEC(callbackEntryCount);
-done:
- /* If an exception has occurred in Java, return the error result. */
- if ((ex = (*env)->ExceptionOccurred(env))) {
- (*env)->DeleteLocalRef(env, ex);
+ va_end(vl);
+
+ /* Handle exceptions in Java side of the callback */
+ curException = (*env)->ExceptionOccurred(env);
+ if (curException) {
+ if (oldException && mid_Throwable_addSuppressed) {
+ /*
+ * Current exception needs to be cleared to be able to use
+ * CallVoidMethod() below. That's fine because old exception will
+ * be re-thrown soon and the current one is no longer needed.
+ */
+ (*env)->ExceptionClear(env);
+
+ /*
+ * If there's an old exception already, attach the new exception as
+ * 'Throwable.addSuppressed()' in old exception. Java has suppressed
+ * exceptions exactly for such cases where additional exceptions
+ * occur while delivering the first one.
+ */
+ (*env)->CallVoidMethod(env, oldException, mid_Throwable_addSuppressed, curException);
+ }
+
+ /* See comment for DeleteLocalRef() below */
+ (*env)->DeleteLocalRef(env, curException);
+
#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "* java exception occurred\n");
- (*env)->ExceptionDescribe(env);
+ fprintf(stderr, "SWT-JNI:%*s ERROR(%d): (*env)->ExceptionOccurred()\n", counter, "", __LINE__);
+ fflush(stderr);
+
+ /*
+ * WARNING: ExceptionDescribe() also clears exception as if it never happened.
+ * Don't do this because it changes the behavior of debugged program significantly.
+
+ (*env)->ExceptionDescribe(env);
+ */
#endif
+
+ /*
+ * We don't have a return value because Java side terminated with an
+ * exception. Use a predetermined per-callback value and hope that
+ * caller won't die on it.
+ */
result = callbackData[index].errorResult;
}
+ /* Rethrow the old exception, if any */
+ if (oldException) {
+ (*env)->Throw(env, oldException);
+
+ /*
+ * Every ExceptionOccurred() creates a new local reference, and JVM asks to
+ * avoid having many of these at once. If there's a bunch of callbacks called
+ * by a single native API and one of them throws exception, then every
+ * subsequent callback will add another reference. The problem can be seen
+ * with '-Xcheck:jni', for example with snippet for 'SWT.Arm' from Bug 562408.
+ * The solution is to properly clean up these references.
+ */
+ (*env)->DeleteLocalRef(env, oldException);
+ }
+
if (detach) {
- (*jvm)->DetachCurrentThread(jvm);
+ (*JVM)->DetachCurrentThread(JVM);
+#ifdef DEBUG_CALL_PRINTS
+ fprintf(stderr, "SWT-JNI: DetachCurrentThread\n");
+#endif
env = NULL;
}
noEnv:
#ifdef DEBUG_CALL_PRINTS
- fprintf(stderr, "* callback exiting %d\n", --counter);
+ fprintf(stderr, "SWT-JNI:%*s} ret=%p\n", counter, "", (void*)result);
+ fflush(stderr);
+ counter--;
#endif
return result;
- }
}
/* ------------- callback class calls end --------------- */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.h b/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.h
index a9bc844c73..8a5b1bb84c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.h
@@ -20,31 +20,6 @@
#include "swt.h"
-#if defined (_WIN32) || defined (_WIN32_WCE)
-#include "windows.h"
-#define RETURN_TYPE LRESULT CALLBACK
-#define RETURN_CAST (LRESULT)
-#endif
-
-#if defined COCOA
-#import <Foundation/Foundation.h>
-#endif
-
-#ifndef RETURN_TYPE
-#define RETURN_TYPE jintLong
-#endif
-
-#ifndef RETURN_CAST
-#define RETURN_CAST
-#endif
-
-/*
-* Note that only x86 assembler is supported
-*/
-#if !(defined(__i386__) || defined(_M_IX86) || defined(_X86_))
-#undef USE_ASSEMBLER
-#endif
-
#ifdef REDUCED_CALLBACKS
#define MAX_CALLBACKS 16
#else
@@ -58,13 +33,21 @@
#define MAX_ARGS 12
typedef struct CALLBACK_DATA {
- jobject callback;
- jmethodID methodID;
- jobject object;
+ jobject callback;
+ jmethodID methodID;
+ jobject object;
jboolean isStatic;
jboolean isArrayBased;
jint argCount;
- jintLong errorResult;
+ jlong errorResult;
+
+#if defined(COCOA)
+ int arg_Selector;
+#elif defined(GTK)
+ int arg_GObject;
+ int arg_GdkEvent;
+ int arg_SwtSignalID;
+#endif
} CALLBACK_DATA;
#endif /* ifndef INC_callback_H */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
index 8658e05c91..429f0e5b6b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
@@ -1,5 +1,5 @@
#*******************************************************************************
-# Copyright (c) 2000, 2018 IBM Corporation and others.
+# Copyright (c) 2000, 2022 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -13,6 +13,7 @@
#*******************************************************************************
maj_ver=4
-min_ver=926
-rev=16
-comma_ver=4,926,16,0
+min_ver=952
+rev=6
+comma_ver=4,952,6,0
+cef_ver=3071 \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.c b/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.c
index 3e7d47c0ab..483aae2d47 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.c
@@ -14,14 +14,12 @@
#include "swt.h"
-int IS_JNI_1_2 = 0;
+JavaVM *JVM = NULL;
-#ifdef JNI_VERSION_1_2
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
- IS_JNI_1_2 = 1;
- return JNI_VERSION_1_2;
+ JVM = vm;
+ return JNI_VERSION_1_4;
}
-#endif
void throwOutOfMemory(JNIEnv *env) {
jclass clazz = (*env)->FindClass(env, "java/lang/OutOfMemoryError");
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h b/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h
index 61122b8e36..c9800a3620 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h
@@ -29,7 +29,7 @@
extern "C" {
#endif
-extern int IS_JNI_1_2;
+extern JavaVM *JVM;
/* #define DEBUG */
@@ -44,75 +44,6 @@ extern int IS_JNI_1_2;
#define CHECK_DLERROR
#endif
-#ifndef JNI64
-#if __x86_64__
-#define JNI64
-#endif
-#endif
-
-/* 64 bit support */
-#ifndef JNI64
-
-/* int/long defines */
-#define GetIntLongField GetIntField
-#define SetIntLongField SetIntField
-#define GetIntLongArrayElements GetIntArrayElements
-#define ReleaseIntLongArrayElements ReleaseIntArrayElements
-#define GetIntLongArrayRegion GetIntArrayRegion
-#define SetIntLongArrayRegion SetIntArrayRegion
-#define NewIntLongArray NewIntArray
-#define CallStaticIntLongMethod CallStaticIntMethod
-#define CallIntLongMethod CallIntMethod
-#define CallStaticIntLongMethodV CallStaticIntMethodV
-#define CallIntLongMethodV CallIntMethodV
-#define jintLongArray jintArray
-#define jintLong jint
-#define I_J "I"
-#define I_JArray "[I"
-
-/* float/double defines */
-#define GetFloatDoubleField GetFloatField
-#define SetFloatDoubleField SetFloatField
-#define GetFloatDoubleArrayElements GetFloatArrayElements
-#define ReleaseFloatDoubleArrayElements ReleaseFloatArrayElements
-#define GetFloatDoubleArrayRegion GetFloatArrayRegion
-#define jfloatDoubleArray jfloatArray
-#define jfloatDouble jfloat
-#define F_D "F"
-#define F_DArray "[F"
-
-#else
-
-/* int/long defines */
-#define GetIntLongField GetLongField
-#define SetIntLongField SetLongField
-#define GetIntLongArrayElements GetLongArrayElements
-#define ReleaseIntLongArrayElements ReleaseLongArrayElements
-#define GetIntLongArrayRegion GetLongArrayRegion
-#define SetIntLongArrayRegion SetLongArrayRegion
-#define NewIntLongArray NewLongArray
-#define CallStaticIntLongMethod CallStaticLongMethod
-#define CallIntLongMethod CallLongMethod
-#define CallStaticIntLongMethodV CallStaticLongMethodV
-#define CallIntLongMethodV CallLongMethodV
-#define jintLongArray jlongArray
-#define jintLong jlong
-#define I_J "J"
-#define I_JArray "[J"
-
-/* float/double defines */
-#define GetFloatDoubleField GetDoubleField
-#define SetFloatDoubleField SetDoubleField
-#define GetFloatDoubleArrayElements GetDoubleArrayElements
-#define ReleaseFloatDoubleArrayElements ReleaseDoubleArrayElements
-#define GetFloatDoubleArrayRegion GetDoubleArrayRegion
-#define jfloatDoubleArray jdoubleArray
-#define jfloatDouble jdouble
-#define F_D "D"
-#define F_DArray "[D"
-
-#endif
-
#ifdef __APPLE__
#define CALLING_CONVENTION
#define LOAD_FUNCTION(var, name) \
@@ -133,6 +64,14 @@ extern int IS_JNI_1_2;
if (hm) var = GetProcAddress(hm, #name); \
initialized = 1; \
}
+/*
+ * Java's boolean[] may not be used to interface to C on Windows, because:
+ * WINAPI 'BOOL' is 4 bytes
+ * Java's 'jboolean' is 1 byte
+ * Trying to pass Java's boolean[] will pass wrong data on read and corrupt memory on write.
+ * Use java's 'int[]' as a correct interface to 'BOOL'.
+ */
+#define jbooleanArray DONT_USE_jbooleanArray_USE_intArray_INSTEAD
#else
#define CALLING_CONVENTION
#define LOAD_FLAGS RTLD_LAZY
@@ -145,6 +84,14 @@ extern int IS_JNI_1_2;
initialized = 1; \
CHECK_DLERROR \
}
+/*
+ * Java's boolean[] may not be used to interface to C on Linux, because:
+ * GLib's 'gboolean' is 4 bytes
+ * Java's 'jboolean' is 1 byte
+ * Trying to pass Java's boolean[] will pass wrong data on read and corrupt memory on write.
+ * Use java's 'int[]' as a correct interface to 'gboolean'.
+ */
+#define jbooleanArray DONT_USE_jbooleanArray_USE_intArray_INSTEAD
#endif
void throwOutOfMemory(JNIEnv *env);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
index 9e0ee05530..97837153a1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -62,6 +62,21 @@ public class SWT {
/**
* The key down event type (value is 1).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.keyCode: the constant of the pressed key, even if it is just a
+ * modifier (Shift, Ctrl, ...)</li>
+ * <li>Event.character: the character that the key press created (or 0 if
+ * none)</li>
+ * <li>Event.keyLocation: either SWT.NONE, SWT.LEFT/.RIGHT (e.g. for Shift key)
+ * or SWT.KEYPAD</li>
+ * <li>Event.stateMask: an or-combined bit mask of the modifiers
+ * (SWT.BUTTON_MASK, SWT.SHIFT, SWT.CTRL, SWT.CMD, SWT.ALT, SWT.MOD1, SWT.MOD2,
+ * SWT.MOD3)</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -90,6 +105,17 @@ public class SWT {
/**
* The mouse down event type (value is 3).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.button: either 1, 2 or 3 for the mouse button that was pressed</li>
+ * <li>Event.x, Event.y: the cursor position relative to the control
+ * (event.widget)</li>
+ * <li>Event.stateMask: an or-combined bit mask of the modifiers
+ * (SWT.BUTTON_MASK)</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -129,6 +155,11 @@ public class SWT {
/**
* The mouse enter event type (value is 6).
*
+ * <p>
+ * Note: This event is received when the user enters a control's bounds with the
+ * mouse cursor.
+ * </p>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -142,6 +173,13 @@ public class SWT {
/**
* The mouse exit event type (value is 7).
*
+ * <p>
+ * Note: This event is received when the user exits a control's bounds with the
+ * mouse cursor. This is not 100% reliable and if you want to have it 100%
+ * reliable, use control.setCapture(true).
+ * </p>
+ *
+ * @see org.eclipse.swt.widgets.Control#setCapture
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -168,6 +206,15 @@ public class SWT {
/**
* The paint event type (value is 9).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.gc: the graphic context used for drawing.</li>
+ * <li>Event.x, Event.y, Event.width, Event.height: the area that needs to be
+ * painted</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -211,11 +258,17 @@ public class SWT {
public static final int Resize = 11;
/**
- * The dispose event type (value is 12).
+ * The dispose event type (value is 12).<br>
+ * <br>
+ * Note: {@link Display} still runs {@link Display#readAndDispatch}
+ * after sending this event. If you want to dispose any resources,
+ * this might cause problems. Use {@link Display#disposeExec}
+ * instead.
*
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
+ * @see org.eclipse.swt.widgets.Display#disposeExec
* @see org.eclipse.swt.widgets.Event
*
* @see org.eclipse.swt.widgets.Widget#addDisposeListener
@@ -301,6 +354,13 @@ public class SWT {
/**
* The expand event type (value is 17).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.item: the TreeItem which gets expanded</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -314,6 +374,13 @@ public class SWT {
/**
* The collapse event type (value is 18).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.item: the TreeItem which gets collapsed</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -408,6 +475,20 @@ public class SWT {
/**
* The verify event type (value is 25).
*
+ * <p>
+ * Note:This event is sent before the actual change happens and the listener is
+ * able to prevent the change by setting event.doit to false.
+ * </p>
+ *
+ * <ul>
+ * <li>Event.text: the new text</li>
+ * <li>Event.start: the start position where the new text is
+ * inserted/replaced</li>
+ * <li>Event.end: the end position where the new text is inserted/replaced</li>
+ * <li>Event.character/.keyCode/.stateMask: if the change is caused by a key
+ * event, these fields are taken from the key event</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -492,6 +573,15 @@ public class SWT {
/**
* The traverse event type (value is 31).
*
+ * <p>
+ * Note: Event.detail: one of the SWT.TRAVERSE_* constants
+ * </p>
+ * <ul>
+ * <li>Event.stateMask: the or-combined bit masks of pressed modifiers, e.g.
+ * SWT.MOD1</li>
+ * <li>Event.doit: set to false if no default behavior should happen</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -505,6 +595,11 @@ public class SWT {
/**
* The mouse hover event type (value is 32).
*
+ * <p>
+ * Note: This event is sent if the cursor stays over the same position for a
+ * short time, e.g. to show a tool-tip
+ * </p>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -536,6 +631,14 @@ public class SWT {
/**
* The menu detect event type (value is 35).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.detail: either SWT.MENU_MOUSE or SWT.MENU_KEYBOARD</li>
+ * <li>Event.x, Event.y: cursor position in display coordinates</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -623,6 +726,18 @@ public class SWT {
/**
* The erase item event type (value is 40).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.detail: an or-combined bit mask of the current state, e.g.
+ * SWT.SELECTED, SWT.HOT</li>
+ * <li>Event.gc: the graphics context to draw or modify colors</li>
+ * <li>Event.x, Event.y, Event.width, Event.height: the cell's bounds</li>
+ * <li>Event.item: the TreeItem or TableItem</li>
+ * <li>Event.index: the column of the cell</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -634,6 +749,19 @@ public class SWT {
/**
* The measure item event type (value is 41).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.detail: an or-combined bit mask of the current state, e.g.
+ * SWT.SELECTED, SWT.HOT</li>
+ * <li>Event.gc: the graphics context to draw or modify colors</li>
+ * <li>Event.x, Event.y, Event.width, Event.height: the cell's bounds, used as
+ * input and output</li>
+ * <li>Event.item: the TreeItem or TableItem</li>
+ * <li>Event.index: the column of the cell</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -645,6 +773,18 @@ public class SWT {
/**
* The paint item event type (value is 42).
*
+ * <p>
+ * Note:
+ * </p>
+ * <ul>
+ * <li>Event.detail: an or-combined bit mask of the current state, e.g.
+ * SWT.SELECTED, SWT.HOT</li>
+ * <li>Event.gc: the graphics context to draw or modify colors</li>
+ * <li>Event.x, Event.y, Event.width, Event.height: the cell's bounds</li>
+ * <li>Event.item: the TreeItem or TableItem</li>
+ * <li>Event.index: the column of the cell</li>
+ * </ul>
+ *
* @see org.eclipse.swt.widgets.Widget#addListener
* @see org.eclipse.swt.widgets.Display#addFilter
* @see org.eclipse.swt.widgets.Event
@@ -718,10 +858,10 @@ public class SWT {
* should be opened.
* </p>
*
- * @see org.eclipse.swt.widgets.Display#addListener
- * @see org.eclipse.swt.widgets.Event
- *
- * @since 3.6
+ * @see org.eclipse.swt.widgets.Display#addListener
+ * @see org.eclipse.swt.widgets.Event
+ *
+ * @since 3.6
*/
public static final int OpenDocument = 46;
@@ -733,10 +873,10 @@ public class SWT {
* on a touch-based input source.
* </p>
*
- * @see org.eclipse.swt.widgets.Display#addListener
- * @see org.eclipse.swt.widgets.Event
- *
- * @since 3.7
+ * @see org.eclipse.swt.widgets.Display#addListener
+ * @see org.eclipse.swt.widgets.Event
+ *
+ * @since 3.7
*/
public static final int Touch = 47;
@@ -747,14 +887,14 @@ public class SWT {
* This event is sent when a gesture has been performed.
* </p>
*
- * @see org.eclipse.swt.widgets.Display#addListener
- * @see org.eclipse.swt.widgets.Event
- * @see SWT#GESTURE_MAGNIFY
- * @see SWT#GESTURE_PAN
- * @see SWT#GESTURE_ROTATE
- * @see SWT#GESTURE_SWIPE
- *
- * @since 3.7
+ * @see org.eclipse.swt.widgets.Display#addListener
+ * @see org.eclipse.swt.widgets.Event
+ * @see SWT#GESTURE_MAGNIFY
+ * @see SWT#GESTURE_PAN
+ * @see SWT#GESTURE_ROTATE
+ * @see SWT#GESTURE_SWIPE
+ *
+ * @since 3.7
*/
public static final int Gesture = 48;
@@ -771,8 +911,8 @@ public class SWT {
*
* @see org.eclipse.swt.widgets.Text#addSegmentListener
* @see org.eclipse.swt.events.SegmentEvent
- *
- * @since 3.8
+ *
+ * @since 3.8
*/
public static final int Segments = 49;
@@ -868,7 +1008,8 @@ public class SWT {
* </p>
* <p>
* Note that this is a <em>HINT</em> and is not sent on platforms that do not
- * support dynamic DPI changes. This event is currently sent on Windows 10 only.
+ * support dynamic DPI changes. This event is currently sent on Windows 10 and GTK
+ * only.
* </p>
*
* @see org.eclipse.swt.widgets.Widget#addListener
@@ -879,6 +1020,20 @@ public class SWT {
*/
public static final int ZoomChanged = 55;
+ /**
+ * The SWT emptiness change event type (value is 56).
+ *
+ * <p>
+ * This event is sent on <code>Tree</code> when the first <code>TreeItem</code> was
+ * added to it (with the <code>detail</code> field set to 0) or the last
+ * <code>TreeItem</code> was removed from it (with the <code>detail</code> field
+ * set to 1).
+ * </p>
+ *
+ * @since 3.118
+ */
+ public static final int EmptinessChanged = 56;
+
/* Event Details */
/**
@@ -1271,16 +1426,16 @@ public class SWT {
*/
public static final int SEPARATOR = 1 << 1;
- /**
- * Constant representing a flexible space separator in a ToolBar.
+ /**
+ * Constant representing a flexible space separator in a ToolBar.
* <p><b>Used By:</b></p>
* <ul>
* <li><code>ToolItem.setWidth()</code></li>
* </ul>
*
* @since 3.7
- */
- public static final int SEPARATOR_FILL = -2;
+ */
+ public static final int SEPARATOR_FILL = -2;
/**
* Style constant for toggle button behavior (value is 1&lt;&lt;1).
@@ -2120,6 +2275,7 @@ public class SWT {
* <p><b>Used By:</b></p>
* <ul>
* <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
+ * <li><code>BoderData</code> in a <code>BoderLayout</code></li>
* </ul>
*/
public static final int TOP = UP;
@@ -2144,6 +2300,7 @@ public class SWT {
* <ul>
* <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
* <li><code>TabFolder</code></li>
+ * <li><code>BoderData</code> in a <code>BoderLayout</code></li>
* </ul>
*/
public static final int BOTTOM = DOWN;
@@ -2174,6 +2331,10 @@ public class SWT {
* This constant can also be used to representing the left keyboard
* location during a key event.
* </p>
+ * <p><b>Used By:</b></p>
+ * <ul>
+ * <li><code>BoderData</code> in a <code>BoderLayout</code></li>
+ * </ul>
*/
public static final int LEFT = LEAD;
@@ -2203,6 +2364,10 @@ public class SWT {
* This constant can also be used to representing the right keyboard
* location during a key event.
* </p>
+ * <p><b>Used By:</b></p>
+ * <ul>
+ * <li><code>BoderData</code> in a <code>BoderLayout</code></li>
+ * </ul>
*/
public static final int RIGHT = TRAIL;
@@ -2214,6 +2379,7 @@ public class SWT {
* <li><code>Label</code></li>
* <li><code>TableColumn</code></li>
* <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
+ * <li><code>BoderData</code> in a <code>BoderLayout</code></li>
* </ul>
*/
public static final int CENTER = 1 << 24;
@@ -2376,6 +2542,36 @@ public class SWT {
public static final int WEBKIT = 1 << 16;
/**
+ * Style constant specifying that a Browser should use Chromium Embedded Framework
+ * for rendering its content (value is 1&lt;&lt;17).
+ * <p><b>Note:</b> No longer supported and ignored.</p>
+ * <p><b>Used By:</b></p>
+ * <ul>
+ * <li><code>Browser</code></li>
+ * </ul>
+ *
+ * @since 3.115
+ * @deprecated Support for Chromium was limited to ancient and full of CVEs version of Chromium.
+ * See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=572010">bug report</a> for details
+ */
+ @Deprecated
+ public static final int CHROMIUM = 1 << 17;
+
+ /**
+ * Style constant specifying that a Browser should use Edge (WebView2)
+ * for rendering its content (value is 1&lt;&lt;18).
+ * <p>NOTE: Edge integration is experimental, it isn't a drop-in replacement
+ * for Internet Explorer.</p>
+ * <p><b>Used By:</b></p>
+ * <ul>
+ * <li><code>Browser</code></li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+ public static final int EDGE = 1 << 18;
+
+ /**
* Style constant for balloon behavior (value is 1&lt;&lt;12).
* <p><b>Used By:</b></p>
* <ul>
@@ -2387,7 +2583,7 @@ public class SWT {
public static final int BALLOON = 1 << 12;
/**
- * Style constant for vertical alignment or orientation behavior (value is 1).
+ * Style constant for alignment or orientation behavior (value is 1).
* <p><b>Used By:</b></p>
* <ul>
* <li><code>GridLayout</code> type</li>
@@ -2396,7 +2592,7 @@ public class SWT {
public static final int BEGINNING = 1;
/**
- * Style constant for vertical alignment or orientation behavior (value is 4).
+ * Style constant for alignment or orientation behavior (value is 4).
* <p><b>Used By:</b></p>
* <ul>
* <li><code>GridLayout</code> type</li>
@@ -2536,7 +2732,7 @@ public class SWT {
* any modifier is pressed and will continue to work as new modifier
* masks are added.
*
- * <code>(stateMask &amp; SWT.MODIFIER_MASK) != 0</code>.
+ * <code>(stateMask &amp; SWT.MODIFIER_MASK) != 0</code>.
*
* @since 2.1
*/
@@ -2586,7 +2782,7 @@ public class SWT {
* any button is pressed and will continue to work as new button
* masks are added.
*
- * <code>(stateMask &amp; SWT.BUTTON_MASK) != 0</code>.
+ * <code>(stateMask &amp; SWT.BUTTON_MASK) != 0</code>.
*
* @since 2.1
*/
@@ -2742,6 +2938,9 @@ public class SWT {
/**
* Keyboard event constant representing the END key
* (value is (1&lt;&lt;24)+8).
+ * <p>
+ * Additional this constant is used by GridLayout for alignments.
+ * </p>
*/
public static final int END = KEYCODE_BIT + 8;
@@ -3131,7 +3330,6 @@ public class SWT {
* The style constant for "search" icon. This style constant is
* used with <code>Text</code> in combination with <code>SWT.SEARCH
* </code> (value is 1&lt;&lt;9).
- * <br>Note that this is a <em>HINT</em>.
*
* <p><b>Used By:</b></p>
* <ul>
@@ -3149,7 +3347,6 @@ public class SWT {
* The style constant for "cancel" icon. This style constant is
* used with <code>Text</code> in combination with <code>SWT.SEARCH
* </code> (value is 1&lt;&lt;8).
- * <br>Note that this is a <em>HINT</em>.
*
* <p><b>Used By:</b></p>
* <ul>
@@ -3480,6 +3677,20 @@ public class SWT {
public static final int COLOR_TRANSPARENT = 37;
/**
+ * System color used to paint disabled text background areas (value is 38).
+ *
+ * @since 3.112
+ */
+ public static final int COLOR_TEXT_DISABLED_BACKGROUND = 38;
+
+ /**
+ * System color used to paint disabled foreground areas (value is 39).
+ *
+ * @since 3.112
+ */
+ public static final int COLOR_WIDGET_DISABLED_FOREGROUND = 39;
+
+ /**
* Draw constant indicating whether the drawing operation
* should fill the background (value is 1&lt;&lt;0).
*/
@@ -4225,6 +4436,14 @@ public class SWT {
public static final int IMAGE_OS2_BMP = 7;
/**
+ * Image format constant indicating a SVG format image (value is 8).
+ * <br>Note that this is a <em>HINT</em> and is currently only supported on GTK.
+ *
+ * @since 3.113
+ */
+ public static final int IMAGE_SVG = 8;
+
+ /**
* GIF image disposal method constants indicating that the
* disposal method is unspecified (value is 0).
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java
index 2bd0f59eb8..03fc353428 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java
@@ -41,9 +41,9 @@ package org.eclipse.swt;
*/
public class SWTError extends Error {
- /**
- * The SWT error code, one of SWT.ERROR_*.
- */
+ /**
+ * The SWT error code, one of SWT.ERROR_*.
+ */
public int code;
/**
@@ -52,7 +52,7 @@ public class SWTError extends Error {
*/
public Throwable throwable;
- static final long serialVersionUID = 3833467327105808433L;
+ static final long serialVersionUID = 3833467327105808433L;
/**
* Constructs a new instance of this class with its
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SwtCallable.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SwtCallable.java
new file mode 100644
index 0000000000..0b82c5a0f5
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SwtCallable.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Joerg Kubitz and others
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Joerg Kubitz - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt;
+
+/**
+ * A method that returns a result and may throw a checked exception of the given
+ * type.
+ *
+ * @see org.eclipse.swt.widgets.Display#syncCall(SwtCallable)
+ * @since 3.118
+ * @author Joerg Kubitz
+ */
+@FunctionalInterface
+public interface SwtCallable<V, E extends Exception> {
+ /**
+ * Computes a value, or throws an exception.
+ *
+ * @return the result
+ * @throws E the Exception of given type
+ */
+ V call() throws E;
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/DragDetectListener.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/DragDetectListener.java
index bfdf19d410..1f5f54b4b6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/DragDetectListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/DragDetectListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,15 +18,14 @@ package org.eclipse.swt.events;
import org.eclipse.swt.internal.*;
/**
- * Classes which implement this interface provide methods
- * that deal with the events that are generated when a drag
- * gesture is detected.
+ * Classes which implement this interface provide methods that deal with the
+ * events that are generated when a drag gesture is detected.
* <p>
- * After creating an instance of a class that implements
- * this interface it can be added to a control using the
- * <code>addDragDetectListener</code> method and removed using
- * the <code>removeDragDetectListener</code> method. When the
- * drag is detected, the drageDetected method will be invoked.
+ * After creating an instance of a class that implements this interface it can
+ * be added to a control using the <code>addDragDetectListener</code> method and
+ * removed using the <code>removeDragDetectListener</code> method. When the drag
+ * is detected, the {@link #dragDetected(DragDetectEvent) dragDetected} method
+ * will be invoked.
* </p>
*
* @see DragDetectEvent
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java
index 4b8a378dc0..10700e53b3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java
@@ -39,14 +39,14 @@ import org.eclipse.swt.widgets.Event;
public class KeyEvent extends TypedEvent {
- /**
- * the character represented by the key that was typed.
+ /**
+ * the character represented by the key that was typed.
* This is the final character that results after all modifiers have been
- * applied. For example, when the user types Ctrl+A, the character value
- * is 0x01. It is important that applications do not attempt to modify the
- * character value based on a stateMask (such as SWT.CTRL) or the resulting
- * character will not be correct.
- */
+ * applied. For example, when the user types Ctrl+A, the character value
+ * is 0x01. It is important that applications do not attempt to modify the
+ * character value based on a stateMask (such as SWT.CTRL) or the resulting
+ * character will not be correct.
+ */
public char character;
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java
index af08b195eb..ca80848811 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java
@@ -61,7 +61,7 @@ public final class PaintEvent extends TypedEvent {
/**
* the number of following paint events which
- * are pending which may always be zero on
+ * are pending which may always be zero on
* some platforms
*/
public int count;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/TouchEvent.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/TouchEvent.java
index 08d91493ac..b610271c9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/TouchEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/TouchEvent.java
@@ -86,8 +86,8 @@ public String toString() {
+ " x=" + x
+ " y=" + y;
if (touches != null) {
- for (int i = 0; i < touches.length; i++) {
- string += "\n " + touches[i].toString();
+ for (Touch touch : touches) {
+ string += "\n " + touch.toString();
}
string += "\n";
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java
index d13ecb1105..2811d54805 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java
@@ -333,7 +333,6 @@ public ImageData(int width, int height, int depth, PaletteData palette, int scan
*/
public ImageData(InputStream stream) {
ImageData[] data = ImageDataLoader.load(stream);
- if (data == null || data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);
if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);
ImageData i = data[0];
setAllFields(
@@ -380,7 +379,6 @@ public ImageData(InputStream stream) {
*/
public ImageData(String filename) {
ImageData[] data = ImageDataLoader.load(filename);
- if (data == null || data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);
if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);
ImageData i = data[0];
setAllFields(
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/LineAttributes.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/LineAttributes.java
index 43586cb8bc..9ec4c19402 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/LineAttributes.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/LineAttributes.java
@@ -174,8 +174,8 @@ public int hashCode () {
hashCode = 31 * hashCode + Float.floatToIntBits(dashOffset);
hashCode = 31 * hashCode + Float.floatToIntBits(miterLimit);
if (dash != null) {
- for (int i = 0; i < dash.length; i++) {
- hashCode = 31 * hashCode + Float.floatToIntBits(dash[i]);
+ for (float element : dash) {
+ hashCode = 31 * hashCode + Float.floatToIntBits(element);
}
}
return hashCode;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java
index 625b416555..cb47f9ddb3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java
@@ -13,6 +13,8 @@
*******************************************************************************/
package org.eclipse.swt.graphics;
+import java.util.function.*;
+
import org.eclipse.swt.*;
/**
@@ -41,17 +43,81 @@ import org.eclipse.swt.*;
public abstract class Resource {
/**
+ * Used to track not disposed SWT resource. A separate class allows
+ * not to have the {@link #finalize} when tracking is disabled, avoiding
+ * possible performance issues in GC.
+ */
+ private static class ResourceTracker {
+ /**
+ * Resource that is tracked here
+ */
+ private Resource resource;
+
+ /**
+ * Recorded at Resource creation if {@link #setNonDisposeHandler} was
+ * enabled, used to track resource disposal
+ */
+ private Error allocationStack;
+
+ /**
+ * Allows to ignore specific Resources even if they are not disposed
+ * properly, used for example for Fonts that SWT doesn't own.
+ */
+ boolean ignoreMe;
+
+ ResourceTracker(Resource resource, Error allocationStack) {
+ this.resource = resource;
+ this.allocationStack = allocationStack;
+ }
+
+ @Override
+ protected void finalize() {
+ if (ignoreMe) return;
+ if (nonDisposedReporter == null) return;
+
+ // If the Resource is GC'ed before it was disposed, this is a leak.
+ if (!resource.isDisposed())
+ nonDisposedReporter.accept(allocationStack);
+ }
+ }
+
+ /**
* the device where this resource was created
*/
Device device;
+ /**
+ * Used to report not disposed SWT resources, null by default
+ */
+ private static Consumer<Error> nonDisposedReporter;
+
+ /**
+ * Used to track not disposed SWT resource
+ */
+ private ResourceTracker tracker;
+
+ static {
+ boolean trackingEnabled = Boolean.getBoolean("org.eclipse.swt.graphics.Resource.reportNonDisposed"); //$NON-NLS-1$
+ if (trackingEnabled) {
+ setNonDisposeHandler(exception -> {
+ if (exception != null) {
+ exception.printStackTrace();
+ } else {
+ System.err.println("SWT Resource was not properly disposed"); //$NON-NLS-1$
+ }
+ });
+ }
+ }
+
public Resource() {
+ initNonDisposeTracking();
}
Resource(Device device) {
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
this.device = device;
+ initNonDisposeTracking();
}
void destroy() {
@@ -85,10 +151,33 @@ public Device getDevice() {
return device;
}
+void ignoreNonDisposed() {
+ if (tracker != null) {
+ tracker.ignoreMe = true;
+ }
+}
+
void init() {
if (device.tracking) device.new_Object(this);
}
+void initNonDisposeTracking() {
+ // Color doesn't really have any resource to be leaked, ignore.
+ if (this instanceof Color) return;
+
+ // Avoid performance costs of having '.finalize()' when not tracking.
+ if (nonDisposedReporter == null) return;
+
+ // Capture a stack trace to help investigating the leak
+ Error error = new Error("SWT Resource was not properly disposed"); //$NON-NLS-1$
+
+ // Allocate a helper class with '.finalize()' in it, it will do the actual
+ // work of detecting and reporting errors. This works because Resource
+ // holds the only reference to 'ResourceTracker' and therefore the tracker
+ // is only GC'ed when Resource itself is ready to be GC'ed.
+ tracker = new ResourceTracker(this, error);
+}
+
/**
* Returns <code>true</code> if the resource has been disposed,
* and <code>false</code> otherwise.
@@ -101,4 +190,22 @@ void init() {
*/
public abstract boolean isDisposed();
+/**
+ * Enables detection of Resource objects for which {@link #dispose()} wasn't
+ * called, which means a leak of native memory and/or OS resources.
+ *
+ * WARNING: the reporter will be called from a different thread. Do not block
+ * it and do not throw any exceptions. It's best to queue the errors for some
+ * other worker to process.
+ *
+ * @param reporter object used to report detected errors. Use
+ * null to disable tracking. Setting a new
+ * reporter has an immediate effect.
+ *
+ * @since 3.116
+ */
+public static void setNonDisposeHandler(Consumer<Error> reporter) {
+ nonDisposedReporter = reporter;
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java
index 2248861bae..90d9f2920c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Callback.java
@@ -135,6 +135,7 @@ public Callback (Object object, String method, int argCount, boolean isArrayBase
/* Bind the address */
address = bind (this, object, method, signature, argCount, isStatic, isArrayBased, errorResult);
+ if (address == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
}
@@ -215,11 +216,13 @@ public Callback (Object object, String method, Type returnType, Type [] argument
};
StringBuilder signature = new StringBuilder("(");
- for (Type t : arguments) {
- if (t.equals(void.class)) {
- SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "void is not a valid argument");
+ if (this.argCount > 0) {
+ for (Type t : arguments) {
+ if (t.equals(void.class)) {
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "void is not a valid argument");
+ }
+ signature.append(getTypeLetter.apply(t));
}
- signature.append(getTypeLetter.apply(t));
}
signature.append(")");
signature.append(getTypeLetter.apply(returnType));
@@ -230,10 +233,9 @@ public Callback (Object object, String method, Type returnType, Type [] argument
/* Bind the address */
address = bind (this, this.object, this.method, this.signature, this.argCount, this.isStatic, this.isArrayBased, this.errorResult);
+ if (address == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
}
-
-
/**
* Allocates the native level resources associated with the
* callback. This method is only invoked from within the
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Compatibility.java
index 4ee7c00a46..4ee7c00a46 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/Compatibility.java
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
index 354a2f8668..f7558984e0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
@@ -116,7 +116,7 @@ public static int[] autoScaleDown(Drawable drawable, int[] pointArray) {
}
/**
- * Auto-scale up float array dimensions.
+ * Auto-scale down float array dimensions.
*/
public static float[] autoScaleDown (float size[]) {
if (deviceZoom == 100 || size == null) return size;
@@ -129,7 +129,7 @@ public static float[] autoScaleDown (float size[]) {
}
/**
- * Auto-scale up float array dimensions if enabled for Drawable class.
+ * Auto-scale down float array dimensions if enabled for Drawable class.
*/
public static float[] autoScaleDown (Drawable drawable, float size[]) {
if (drawable != null && !drawable.isAutoScalable ()) return size;
@@ -453,7 +453,7 @@ public static boolean useCairoAutoScale() {
public static int getZoomForAutoscaleProperty (int nativeDeviceZoom) {
int zoom = 0;
- if (autoScaleValue != null) {
+ if (autoScaleValue != null) {
if ("false".equalsIgnoreCase (autoScaleValue)) {
zoom = 100;
} else if ("quarter".equalsIgnoreCase (autoScaleValue)) {
@@ -469,7 +469,7 @@ public static int getZoomForAutoscaleProperty (int nativeDeviceZoom) {
}
}
}
- if (zoom == 0) { // || "integer".equalsIgnoreCase (value) || "integer200".equalsIgnoreCase (value)
+ if (zoom == 0) { // || "integer".equalsIgnoreCase (value) || "integer200".equalsIgnoreCase (value)
zoom = Math.max ((nativeDeviceZoom + 25) / 100 * 100, 100);
if (!"integer".equalsIgnoreCase(autoScaleValue)) {
// integer200, or default
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/ExceptionStash.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/ExceptionStash.java
new file mode 100644
index 0000000000..f950d1f847
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/ExceptionStash.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Syntevo and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Syntevo - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.swt.internal;
+
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The intent of this class is to insulate SWT from exceptions occurring in
+ * user's listeners, so that SWT remains stable and does not accidentally
+ * crash JVM or enter some very broken state. The supposed use is:
+ * <br>
+ * <pre>void someSwtInternalFunction() {
+ * // Make a stash to collect all exceptions from user listeners
+ * try (ExceptionStash exceptions = new ExceptionStash ()) {
+ * // Perform some action that may call a throwing user's listener
+ * try {
+ * sendEvent(SWT.SomeEvent);
+ * } catch (Error | RuntimeException ex) {
+ * exceptions.stash (ex);
+ * }
+ *
+ * // Do some important SWT stuff that you would normally do in
+ * // 'finally' clause. With 'ExceptionStash' you can interleave
+ * // important things with listeners without making code ugly.
+ * MakeSureThingsDontBreak();
+ *
+ * // Perform another action that may call a throwing user's listener.
+ * // Done in an independent 'try' block to make sure that all events
+ * // are sent regardless of exceptions in some of the listeners.
+ * try {
+ * askWidgetToSendMoreEvents();
+ * } catch (Error | RuntimeException ex) {
+ * exceptions.stash (ex);
+ * }
+ *
+ * // Exiting from 'try' statement will close ExceptionStash and
+ * // re-throw collected exception. If there are multiple exceptions,
+ * // all subsequent ones will be added as 'Throwable.addSuppressed()'.
+ * }
+ * } </pre>
+ */
+public class ExceptionStash implements AutoCloseable {
+ Throwable storedThrowable;
+
+public void stash(Throwable throwable) {
+ /* First, try to pass it to the global handler */
+ try {
+ Display display = Display.getCurrent ();
+ if (display != null) {
+ if (throwable instanceof RuntimeException) {
+ display.getRuntimeExceptionHandler().accept((RuntimeException)throwable);
+ /* If handler doesn't throw then the exception is fully handled */
+ return;
+ } else if (throwable instanceof Error) {
+ display.getErrorHandler().accept((Error)throwable);
+ /* If handler doesn't throw then the exception is fully handled */
+ return;
+ }
+ }
+ } catch (Throwable ex) {
+ /* Handler may have thrown something new */
+ throwable = ex;
+ }
+
+ /* No handler or it also thrown */
+ if (storedThrowable != null) {
+ storedThrowable.addSuppressed(throwable);
+ } else {
+ storedThrowable = throwable;
+ }
+};
+
+public void close() {
+ if (storedThrowable == null) return;
+
+ Throwable throwable = storedThrowable;
+ storedThrowable = null;
+
+ if (throwable instanceof RuntimeException) {
+ throw (RuntimeException)throwable;
+ } else if (throwable instanceof Error) {
+ throw (Error)throwable;
+ }
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTEventListener.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTEventListener.java
index 2622ded437..2622ded437 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTEventListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTEventListener.java
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages.properties
index c53d9af7b4..1c9a2c67aa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages.properties
@@ -58,7 +58,6 @@ SWT_Charset_Japanese=japanese
SWT_Charset_Korean=korean
SWT_Charset_Unicode=unicode
SWT_Charset_ASCII=ASCII
-SWT_InputMethods=Input Methods
SWT_Password=Password:
SWT_Username=User Name:
SWT_Switch=Switch
@@ -127,3 +126,10 @@ SWT_ValidTo=Valid To
SWT_ValidFromTo=Valid from: {0} to: {1}
SWT_Subject=Subject
SWT_SerialNumber=Serial Number
+SWT_About=About
+SWT_Preferences=Preferences...
+SWT_Services=Services
+SWT_Hide=Hide
+SWT_HideOthers=Hide Others
+SWT_ShowAll=Show All
+SWT_Quit=Quit
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ar._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ar._properties
index 86de0aedb6..86de0aedb6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ar._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ar._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_bg._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_bg._properties
index 104a0e5615..104a0e5615 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_bg._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_bg._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_cs._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_cs._properties
index 671a1fc412..671a1fc412 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_cs._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_cs._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_da._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_da._properties
index 6448a3694d..6448a3694d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_da._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_da._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_de._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_de._properties
index b9273334e8..b9273334e8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_de._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_de._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_el._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_el._properties
index 5a7c1ff37e..5a7c1ff37e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_el._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_el._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_en_CA._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_en_CA._properties
index e65fb6d3e6..e65fb6d3e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_en_CA._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_en_CA._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_es._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_es._properties
index aab8a1eb82..aab8a1eb82 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_es._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_es._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_et._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_et._properties
index c8f9c69c39..c8f9c69c39 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_et._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_et._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_eu._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_eu._properties
index 5721855f83..5721855f83 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_eu._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_eu._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fa._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fa._properties
index 04bec59b8f..04bec59b8f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fa._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fa._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fi._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fi._properties
index 6f3e127e6b..6f3e127e6b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fi._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fi._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fr._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fr._properties
index 2e3314327b..2e3314327b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fr._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_fr._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_hi._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_hi._properties
index 9d56ef9868..9d56ef9868 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_hi._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_hi._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_hu._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_hu._properties
index 701b79b18d..701b79b18d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_hu._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_hu._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_id._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_id._properties
index 61cb62c0f2..61cb62c0f2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_id._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_id._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_it._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_it._properties
index 560c3710a0..560c3710a0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_it._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_it._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_iw._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_iw._properties
index fce1787934..fce1787934 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_iw._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_iw._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ja._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ja._properties
index af58f46da3..af58f46da3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ja._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ja._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ko._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ko._properties
index 126afade5c..126afade5c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ko._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ko._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ku._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ku._properties
index 4f124c0ac4..4f124c0ac4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ku._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ku._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_lt._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_lt._properties
index 74c9a86d14..74c9a86d14 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_lt._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_lt._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_lv._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_lv._properties
index dc0c8b2d5f..ffb577c97f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_lv._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_lv._properties
@@ -1,125 +1,125 @@
-###############################################################################
-# Copyright (c) 2000, 2013 IBM Corporation and others.
+###############################################################################
+# Copyright (c) 2000, 2013 IBM Corporation and others.
#
-# This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License 2.0
-# which accompanies this distribution, and is available at
+# This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# NLS_ENCODING=UNICODE
-# NLS_MARKUP=IBMNJDK2
-# NLS_MESSAGEFORMAT_VAR
-
-SWT_Yes=J\u0101
-SWT_No=N\u0113
-SWT_OK=Labi
-SWT_Cancel=Atcelt
-SWT_Help=Pal\u012bdz\u012bba
-SWT_Abort=Priek\u0161laikus p\u0101rtraukt
-SWT_Retry=M\u0113\u0123in\u0101t v\u0113lreiz
-SWT_Ignore=Ignor\u0113t
-SWT_Sample=Paraugs
-SWT_A_Sample_Text=Parauga teksts
-SWT_Selection=Atlase
-SWT_Current_Selection=Pa\u0161reiz\u0113j\u0101 atlase
-SWT_Font=Fonts
-SWT_Color=Kr\u0101sa
-SWT_Extended_style=Papla\u0161in\u0101ts stils
-SWT_Size=Izm\u0113rs
-SWT_Style=Stils
-SWT_Save=Saglab\u0101t
-SWT_Character_set=Rakstz\u012bmju kopa
-SWT_ColorDialog_Title=Kr\u0101sas
-SWT_FontDialog_Title=Fonti
-SWT_FontSet=Fontu kopa
-SWT_NewFont=Jauns fonts
-SWT_Remove=No\u0146emt
-SWT_Up=Uz aug\u0161u
-SWT_Down=Uz leju
-SWT_Charset_Western=rietumu
-SWT_Charset_EastEuropean=austrumu
-SWT_Charset_SouthEuropean=dienvidu
-SWT_Charset_NorthEuropean=zieme\u013cu
-SWT_Charset_Cyrillic=kirilica
-SWT_Charset_Arabic=ar\u0101bu
-SWT_Charset_Greek=grie\u0137u
-SWT_Charset_Hebrew=ebreju
-SWT_Charset_Turkish=turku
-SWT_Charset_Nordic=nordic
-SWT_Charset_Thai=taju
-SWT_Charset_BalticRim=baltic rim
-SWT_Charset_Celtic=\u0137eltu
-SWT_Charset_Euro=euro
-SWT_Charset_Romanian=rum\u0101\u0146u
-SWT_Charset_SimplifiedChinese=vienk.\u0137\u012bnie\u0161u
-SWT_Charset_TraditionalChinese=trad. \u0137\u012bnie\u0161u
-SWT_Charset_Japanese=jap\u0101\u0146u
-SWT_Charset_Korean=korejie\u0161u
-SWT_Charset_Unicode=unikods
-SWT_Charset_ASCII=ASCII
-SWT_InputMethods=Ievades metodes
-SWT_Password=Parole:
-SWT_Username=Lietot\u0101jv\u0101rds:
-SWT_Switch=P\u0101rsl\u0113gt
-SWT_Press=Nospiest
-SWT_Open=Atv\u0113rt
-SWT_Close=Aizv\u0113rt
-SWT_Minimize=Minimiz\u0113t
-SWT_Maximize=Maksimiz\u0113t
-SWT_Restore=Atjaunot
-SWT_ShowList=R\u0101d\u012bt sarakstu
-SWT_Page_Mnemonic=Alt+{0}
-SWT_SwitchPage_Shortcut=Ctrl+PageDown
-SWT_FileDownload=Faila lejupiel\u0101de
-SWT_Download_Error=Rad\u0101s k\u013c\u016bda, lejupiel\u0101de netika pabeigta
-SWT_Download_File=Lejupiel\u0101de: {0}
-SWT_Download_Location=Saglab\u0101 {0} no {1}
-SWT_Download_Started=Lejupiel\u0101d\u0113...
-SWT_Download_Status=Lejupiel\u0101de: {0,number,integer} KB no {1,number,integer} KB
-SWT_Authentication_Required=Nepiecie\u0161ama autentific\u0113\u0161ana
-SWT_Enter_Username_and_Password=Ievadiet lietot\u0101jv\u0101rdu un paroli {0} lauk\u0101 {1}
-SWT_Page_Load_Failed=Lapas iel\u0101de neizdev\u0101s, jo rad\u0101s k\u013c\u016bda: {0}
-SWT_InvalidCert_Title=Neder\u012bgs sertifik\u0101ts
-SWT_InvalidCert_Message=Dro\u0161\u012bbas sertifik\u0101tam, ko iesniedza "{0}", ir probl\u0113ma(s).
-SWT_InvalidCert_InvalidName=Sertifik\u0101ta nosaukums ir neder\u012bgs vai neatbilst vietnes nosaukumam. Sertifik\u0101ts izsniegts: "{0}".
-SWT_InvalidCert_NotValid=Sertifik\u0101ts pa\u0161laik nav der\u012bgs. Der\u012bgo datumu diapazons: "{0}".
-SWT_InvalidCert_NotTrusted=Sertifik\u0101tu nav izsniegusi uzticama iest\u0101de. Sertifik\u0101ta izsniedz\u0113js: "{0}".
-SWT_InvalidCert_Connect=Vai vienalga v\u0113laties turpin\u0101t?
-SWT_OnBeforeUnload_Message1=Vai tie\u0161\u0101m v\u0113laties atst\u0101t \u0161o lapu?
-SWT_OnBeforeUnload_Message2=Noklik\u0161\u0137iniet uz Labi, lai turpin\u0101tu, vai uz Atcelt, lai paliktu \u0161aj\u0101 lap\u0101.
-SWT_ViewCertificate=Skat\u012bt sertifik\u0101tu
-SWT_Certificate=Sertifik\u0101ts
-SWT_Controlled_By=kontrol\u0113:
-SWT_Controller_For=kontrolleris paredz\u0113ts:
-SWT_Described_By=aprakst\u012bjis:
-SWT_Description_For=apraksts paredz\u0113ts:
-SWT_Embedded_By=iegul\u0161anu veica:
-SWT_Embeds=iegul\u0161ana
-SWT_Flows_From=pl\u016bsmas no
-SWT_Flows_To=pl\u016bsmas uz
-SWT_Label_For=eti\u0137ete paredz\u0113ta:
-SWT_Labelled_By=eti\u0137eti piestiprin\u0101ja:
-SWT_Member_Of=dal\u012bbnieks
-SWT_Node_Child_Of=mezgla atvase
-SWT_Parent_Window_Of=galvenais logs
-SWT_Popup_For=uznirsto\u0161ais logs
-SWT_Subwindow_Of=apak\u0161logs
-SWT_Continue=Turpin\u0101t
-SWT_IssuedTo=Izsniegts:\t{0}
-SWT_IssuedFrom=Izsniedzis: \t{0}
-SWT_Issuer=Izsniedz\u0113js
-SWT_General=Visp\u0101r\u012bgi
-SWT_Details=Dati
-SWT_Field=Lauks
-SWT_Value=V\u0113rt\u012bba
-SWT_Version=Versija
-SWT_ValidFrom=Sp\u0113k\u0101 no
-SWT_ValidTo=Sp\u0113k\u0101 l\u012bdz
-SWT_ValidFromTo=Sp\u0113k\u0101 no: {0} l\u012bdz: {1}
-SWT_Subject=Temats
-SWT_SerialNumber=S\u0113rijas numurs
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+# NLS_ENCODING=UNICODE
+# NLS_MARKUP=IBMNJDK2
+# NLS_MESSAGEFORMAT_VAR
+
+SWT_Yes=J\u0101
+SWT_No=N\u0113
+SWT_OK=Labi
+SWT_Cancel=Atcelt
+SWT_Help=Pal\u012bdz\u012bba
+SWT_Abort=Priek\u0161laikus p\u0101rtraukt
+SWT_Retry=M\u0113\u0123in\u0101t v\u0113lreiz
+SWT_Ignore=Ignor\u0113t
+SWT_Sample=Paraugs
+SWT_A_Sample_Text=Parauga teksts
+SWT_Selection=Atlase
+SWT_Current_Selection=Pa\u0161reiz\u0113j\u0101 atlase
+SWT_Font=Fonts
+SWT_Color=Kr\u0101sa
+SWT_Extended_style=Papla\u0161in\u0101ts stils
+SWT_Size=Izm\u0113rs
+SWT_Style=Stils
+SWT_Save=Saglab\u0101t
+SWT_Character_set=Rakstz\u012bmju kopa
+SWT_ColorDialog_Title=Kr\u0101sas
+SWT_FontDialog_Title=Fonti
+SWT_FontSet=Fontu kopa
+SWT_NewFont=Jauns fonts
+SWT_Remove=No\u0146emt
+SWT_Up=Uz aug\u0161u
+SWT_Down=Uz leju
+SWT_Charset_Western=rietumu
+SWT_Charset_EastEuropean=austrumu
+SWT_Charset_SouthEuropean=dienvidu
+SWT_Charset_NorthEuropean=zieme\u013cu
+SWT_Charset_Cyrillic=kirilica
+SWT_Charset_Arabic=ar\u0101bu
+SWT_Charset_Greek=grie\u0137u
+SWT_Charset_Hebrew=ebreju
+SWT_Charset_Turkish=turku
+SWT_Charset_Nordic=nordic
+SWT_Charset_Thai=taju
+SWT_Charset_BalticRim=baltic rim
+SWT_Charset_Celtic=\u0137eltu
+SWT_Charset_Euro=euro
+SWT_Charset_Romanian=rum\u0101\u0146u
+SWT_Charset_SimplifiedChinese=vienk.\u0137\u012bnie\u0161u
+SWT_Charset_TraditionalChinese=trad. \u0137\u012bnie\u0161u
+SWT_Charset_Japanese=jap\u0101\u0146u
+SWT_Charset_Korean=korejie\u0161u
+SWT_Charset_Unicode=unikods
+SWT_Charset_ASCII=ASCII
+SWT_InputMethods=Ievades metodes
+SWT_Password=Parole:
+SWT_Username=Lietot\u0101jv\u0101rds:
+SWT_Switch=P\u0101rsl\u0113gt
+SWT_Press=Nospiest
+SWT_Open=Atv\u0113rt
+SWT_Close=Aizv\u0113rt
+SWT_Minimize=Minimiz\u0113t
+SWT_Maximize=Maksimiz\u0113t
+SWT_Restore=Atjaunot
+SWT_ShowList=R\u0101d\u012bt sarakstu
+SWT_Page_Mnemonic=Alt+{0}
+SWT_SwitchPage_Shortcut=Ctrl+PageDown
+SWT_FileDownload=Faila lejupiel\u0101de
+SWT_Download_Error=Rad\u0101s k\u013c\u016bda, lejupiel\u0101de netika pabeigta
+SWT_Download_File=Lejupiel\u0101de: {0}
+SWT_Download_Location=Saglab\u0101 {0} no {1}
+SWT_Download_Started=Lejupiel\u0101d\u0113...
+SWT_Download_Status=Lejupiel\u0101de: {0,number,integer} KB no {1,number,integer} KB
+SWT_Authentication_Required=Nepiecie\u0161ama autentific\u0113\u0161ana
+SWT_Enter_Username_and_Password=Ievadiet lietot\u0101jv\u0101rdu un paroli {0} lauk\u0101 {1}
+SWT_Page_Load_Failed=Lapas iel\u0101de neizdev\u0101s, jo rad\u0101s k\u013c\u016bda: {0}
+SWT_InvalidCert_Title=Neder\u012bgs sertifik\u0101ts
+SWT_InvalidCert_Message=Dro\u0161\u012bbas sertifik\u0101tam, ko iesniedza "{0}", ir probl\u0113ma(s).
+SWT_InvalidCert_InvalidName=Sertifik\u0101ta nosaukums ir neder\u012bgs vai neatbilst vietnes nosaukumam. Sertifik\u0101ts izsniegts: "{0}".
+SWT_InvalidCert_NotValid=Sertifik\u0101ts pa\u0161laik nav der\u012bgs. Der\u012bgo datumu diapazons: "{0}".
+SWT_InvalidCert_NotTrusted=Sertifik\u0101tu nav izsniegusi uzticama iest\u0101de. Sertifik\u0101ta izsniedz\u0113js: "{0}".
+SWT_InvalidCert_Connect=Vai vienalga v\u0113laties turpin\u0101t?
+SWT_OnBeforeUnload_Message1=Vai tie\u0161\u0101m v\u0113laties atst\u0101t \u0161o lapu?
+SWT_OnBeforeUnload_Message2=Noklik\u0161\u0137iniet uz Labi, lai turpin\u0101tu, vai uz Atcelt, lai paliktu \u0161aj\u0101 lap\u0101.
+SWT_ViewCertificate=Skat\u012bt sertifik\u0101tu
+SWT_Certificate=Sertifik\u0101ts
+SWT_Controlled_By=kontrol\u0113:
+SWT_Controller_For=kontrolleris paredz\u0113ts:
+SWT_Described_By=aprakst\u012bjis:
+SWT_Description_For=apraksts paredz\u0113ts:
+SWT_Embedded_By=iegul\u0161anu veica:
+SWT_Embeds=iegul\u0161ana
+SWT_Flows_From=pl\u016bsmas no
+SWT_Flows_To=pl\u016bsmas uz
+SWT_Label_For=eti\u0137ete paredz\u0113ta:
+SWT_Labelled_By=eti\u0137eti piestiprin\u0101ja:
+SWT_Member_Of=dal\u012bbnieks
+SWT_Node_Child_Of=mezgla atvase
+SWT_Parent_Window_Of=galvenais logs
+SWT_Popup_For=uznirsto\u0161ais logs
+SWT_Subwindow_Of=apak\u0161logs
+SWT_Continue=Turpin\u0101t
+SWT_IssuedTo=Izsniegts:\t{0}
+SWT_IssuedFrom=Izsniedzis: \t{0}
+SWT_Issuer=Izsniedz\u0113js
+SWT_General=Visp\u0101r\u012bgi
+SWT_Details=Dati
+SWT_Field=Lauks
+SWT_Value=V\u0113rt\u012bba
+SWT_Version=Versija
+SWT_ValidFrom=Sp\u0113k\u0101 no
+SWT_ValidTo=Sp\u0113k\u0101 l\u012bdz
+SWT_ValidFromTo=Sp\u0113k\u0101 no: {0} l\u012bdz: {1}
+SWT_Subject=Temats
+SWT_SerialNumber=S\u0113rijas numurs
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ml._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ml._properties
index 1d6eec9677..1d6eec9677 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ml._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ml._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_mn._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_mn._properties
index 9987edddf5..9987edddf5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_mn._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_mn._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_nl._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_nl._properties
index 17af5dea90..17af5dea90 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_nl._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_nl._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_no._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_no._properties
index 0d4d2f9b73..0d4d2f9b73 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_no._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_no._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pl._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pl._properties
index cab2af24f8..cab2af24f8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pl._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pl._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pt._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pt._properties
index e0a8bdae83..e0a8bdae83 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pt._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pt._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pt_BR._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pt_BR._properties
index 52f0ced10f..52f0ced10f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_pt_BR._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_pt_BR._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ro._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ro._properties
index ef822afe3a..ef822afe3a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ro._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ro._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ru._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ru._properties
index 25934bf130..25934bf130 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ru._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_ru._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sk._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sk._properties
index 2e75ccaa69..2e75ccaa69 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sk._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sk._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sl._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sl._properties
index be866231f6..be866231f6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sl._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sl._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sr._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sr._properties
index adb2d178fb..adb2d178fb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sr._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sr._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sv._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sv._properties
index 5688c1a028..5688c1a028 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_sv._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_sv._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_th._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_th._properties
index 2e5129623a..2e5129623a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_th._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_th._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_tr._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_tr._properties
index ef86786c84..ef86786c84 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_tr._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_tr._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_uk._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_uk._properties
index f61ad812b6..f61ad812b6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_uk._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_uk._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_zh._properties
index cc9c3cd2e6..cc9c3cd2e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_zh._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh_TW._properties b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_zh_TW._properties
index b70a0ff05a..b70a0ff05a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh_TW._properties
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTMessages_zh_TW._properties
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/WidgetSpy.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/WidgetSpy.java
new file mode 100644
index 0000000000..0acb6c3479
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/WidgetSpy.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2022 Simeon Andreev and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Simeon Andreev - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal;
+
+import java.util.*;
+import java.util.List;
+
+import org.eclipse.swt.widgets.*;
+
+/**
+ * Helper class to allow widget creation and disposal monitoring
+ */
+public class WidgetSpy {
+
+ /**
+ * Flag to prevent {@link Widget} from entering this class during debugging,
+ * if tracking of creation and disposal is not enabled.
+ */
+ public static boolean isEnabled;
+
+ private static final WidgetSpy instance = new WidgetSpy();
+
+ private WidgetTracker widgetTracker;
+
+ private WidgetSpy() {
+ // singleton
+ }
+
+ public static WidgetSpy getInstance() {
+ return instance;
+ }
+
+ /**
+ * Enables tracking of {@link Widget} object creation and disposal.
+ *
+ * WARNING: the tracker will be called from the UI thread. Do not block
+ * it and do not throw any exceptions.
+ *
+ * @param tracker notified when a widget is created or disposed. Use
+ * {@code null} to disable tracking. The tracker will be
+ * notified of widgets created and disposed after setting the tracker.
+ */
+ public void setWidgetTracker(WidgetTracker tracker) {
+ isEnabled = tracker != null;
+ widgetTracker = tracker;
+ }
+
+ public void widgetCreated(Widget widget) {
+ if (widgetTracker != null) {
+ widgetTracker.widgetCreated(widget);
+ }
+ }
+
+ public void widgetDisposed(Widget widget) {
+ if (widgetTracker != null) {
+ widgetTracker.widgetDisposed(widget);
+ }
+ }
+
+ /**
+ * Custom callback to register widget creation / disposal
+ */
+ public static interface WidgetTracker {
+ default void widgetCreated(Widget widget) {}
+
+ default void widgetDisposed(Widget widget) {}
+ }
+
+ /**
+ * Default implementation simply collects all created and not disposed widgets
+ */
+ public static class NonDisposedWidgetTracker implements WidgetTracker {
+
+ private final Map<Widget, Error> nonDisposedWidgets = new LinkedHashMap<>();
+ private final Set<Class<? extends Widget> > trackedTypes = new HashSet<>();
+
+ @Override
+ public void widgetCreated(Widget widget) {
+ boolean isTracked = isTracked(widget);
+ if (isTracked) {
+ Error creationException = new Error("Created widget of type: " + widget.getClass().getSimpleName());
+ nonDisposedWidgets.put(widget, creationException);
+ }
+ }
+
+ @Override
+ public void widgetDisposed(Widget widget) {
+ boolean isTracked = isTracked(widget);
+ if (isTracked) {
+ nonDisposedWidgets.remove(widget);
+ }
+ }
+
+ public Map<Widget, Error> getNonDisposedWidgets() {
+ return Collections.unmodifiableMap(nonDisposedWidgets);
+ }
+
+ public void startTracking() {
+ clearNonDisposedWidgets();
+ WidgetSpy.getInstance().setWidgetTracker(this);
+ }
+
+ private void clearNonDisposedWidgets() {
+ nonDisposedWidgets.clear();
+ }
+
+ public void stopTracking() {
+ WidgetSpy.getInstance().setWidgetTracker(null);
+ }
+
+ public void setTrackingEnabled(boolean enabled) {
+ if (enabled) {
+ startTracking();
+ } else {
+ stopTracking();
+ }
+ }
+
+ public void setTrackedTypes(List<Class<? extends Widget>> types) {
+ trackedTypes.clear();
+ trackedTypes.addAll(types);
+ }
+
+ private boolean isTracked(Widget widget) {
+ boolean isTrackingAllTypes = trackedTypes.isEmpty();
+ if (isTrackingAllTypes) {
+ return true;
+ }
+ if (widget != null) {
+ Class<? extends Widget> widgetType = widget.getClass();
+ if (trackedTypes.contains(widgetType)) {
+ return true;
+ }
+ for (Class<? extends Widget> filteredType : trackedTypes) {
+ if (filteredType.isAssignableFrom(widgetType)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java
index 6aaa403a8c..10f086e299 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java
@@ -412,7 +412,7 @@ public final class GIFFileFormat extends FileFormat {
@Override
void unloadIntoByteStream(ImageLoader loader) {
- /* Step 1: Acquire GIF parameters. */
+ /* Step 1: Acquire GIF parameters. */
ImageData[] data = loader.data;
int frameCount = data.length;
boolean multi = frameCount > 1;
@@ -445,8 +445,10 @@ public final class GIFFileFormat extends FileFormat {
for (int j=0; j<colors.length; j++) {
if (!(rgbs[j].red == colors[j].red &&
rgbs[j].green == colors[j].green &&
- rgbs[j].blue == colors[j].blue))
- globalTable = 0;
+ rgbs[j].blue == colors[j].blue)) {
+ globalTable = 0;
+ break;
+ }
}
}
}
@@ -454,7 +456,7 @@ public final class GIFFileFormat extends FileFormat {
}
try {
- /* Step 3: Write the GIF89a Header and Logical Screen Descriptor. */
+ /* Step 3: Write the GIF89a Header and Logical Screen Descriptor. */
outputStream.write(GIF89a);
int bitField = globalTable*128 + (depth-1)*16 + depth-1;
outputStream.writeShort((short)logicalScreenWidth);
@@ -577,8 +579,7 @@ public final class GIFFileFormat extends FileFormat {
void writePalette(PaletteData palette, int depth) {
byte[] bytes = new byte[(1 << depth) * 3];
int offset = 0;
- for (int i = 0; i < palette.colors.length; i++) {
- RGB color = palette.colors[i];
+ for (RGB color : palette.colors) {
bytes[offset] = (byte)color.red;
bytes[offset + 1] = (byte)color.green;
bytes[offset + 2] = (byte)color.blue;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java
index ef0d9004a1..40d5c98721 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java
@@ -137,7 +137,7 @@ public class JPEGDecoder {
static final int M_APP13 = 0xed;
static final int M_APP14 = 0xee;
static final int M_APP15 = 0xef;
- static final int M_JPG0 = 0xf0;
+ static final int M_JPG0 = 0xf0;
static final int M_JPG13 = 0xfd;
static final int M_COM = 0xfe;
static final int M_TEM = 0x01;
@@ -832,7 +832,7 @@ public class JPEGDecoder {
{
if (bits_left < (1)) {
if (!jpeg_fill_bit_buffer(br_state,get_buffer,bits_left,1)) {
- return false;
+ return false;
}
get_buffer = (br_state).get_buffer; bits_left = (br_state).bits_left;
}
@@ -1716,7 +1716,7 @@ public class JPEGDecoder {
// JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
int process_data;
- /* Pointer to allocated workspace (M or M+2 row groups). */
+ /* Pointer to allocated workspace (M or M+2 row groups). */
byte[][][] buffer = new byte[MAX_COMPONENTS][][];
int[] buffer_offset = new int[MAX_COMPONENTS];
@@ -2325,8 +2325,8 @@ static void jinit_d_coef_controller (jpeg_decompress_struct cinfo, boolean need_
coef.whole_image[ci] =
new short
[(int)jround_up( compptr.height_in_blocks, compptr.v_samp_factor)]
- [(int)jround_up( compptr.width_in_blocks, compptr.h_samp_factor)]
- [DCTSIZE2];
+ [(int)jround_up( compptr.width_in_blocks, compptr.h_samp_factor)]
+ [DCTSIZE2];
}
// coef.consume_data = consume_data;
coef.decompress_data = DECOMPRESS_DATA;
@@ -3400,18 +3400,18 @@ jcopy_sample_rows (byte[][] input_array, int source_row,
* The source and destination arrays must be at least as wide as num_cols.
*/
{
- byte[] inptr, outptr;
- int count = num_cols;
- int row;
-
- int input_array_offset = source_row;
- int output_array_offset = dest_row;
-
- for (row = num_rows; row > 0; row--) {
- inptr = input_array[input_array_offset++];
- outptr = output_array[output_array_offset++];
- System.arraycopy(inptr, 0, outptr, 0, count);
- }
+ byte[] inptr, outptr;
+ int count = num_cols;
+ int row;
+
+ int input_array_offset = source_row;
+ int output_array_offset = dest_row;
+
+ for (row = num_rows; row > 0; row--) {
+ inptr = input_array[input_array_offset++];
+ outptr = output_array[output_array_offset++];
+ System.arraycopy(inptr, 0, outptr, 0, count);
+ }
}
static boolean jpeg_start_decompress (jpeg_decompress_struct cinfo) {
@@ -4418,8 +4418,8 @@ static boolean get_dht (jpeg_decompress_struct cinfo)
// ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
for (i = 0; i < count; i++) {
- if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
- huffval[i] = cinfo.buffer[cinfo.bytes_offset++];
+ if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
+ huffval[i] = cinfo.buffer[cinfo.bytes_offset++];
}
length -= count;
@@ -5012,8 +5012,8 @@ static void grayscale_convert (jpeg_decompress_struct cinfo,
byte[][][] input_buf, int[] input_buf_offset, int input_row,
byte[][] output_buf, int output_buf_offset, int num_rows)
{
- jcopy_sample_rows(input_buf[0], input_row+input_buf_offset[0], output_buf, output_buf_offset,
- num_rows, cinfo.output_width);
+ jcopy_sample_rows(input_buf[0], input_row+input_buf_offset[0], output_buf, output_buf_offset,
+ num_rows, cinfo.output_width);
}
static void gray_rgb_convert (jpeg_decompress_struct cinfo,
@@ -5535,12 +5535,12 @@ static int consume_data (jpeg_decompress_struct cinfo) {
static int consume_input (jpeg_decompress_struct cinfo) {
switch (cinfo.inputctl.consume_input) {
case COEF_CONSUME_INPUT:
- switch (cinfo.coef.consume_data) {
+ switch (cinfo.coef.consume_data) {
case CONSUME_DATA: return consume_data(cinfo);
case DUMMY_CONSUME_DATA: return dummy_consume_data(cinfo);
default: error();
- }
- break;
+ }
+ break;
case INPUT_CONSUME_INPUT:
return consume_markers(cinfo);
default:
@@ -5617,7 +5617,7 @@ static boolean next_marker (jpeg_decompress_struct cinfo) {
* data source's input buffer.
*/
do {
- if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
+ if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF;
} while (c == 0xFF);
if (c != 0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java
index db721d53ba..fcd51e7016 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java
@@ -1025,7 +1025,7 @@ void forwardDCT(int[] dataUnit) {
dataUnit[rIndex + 2] = n >> 11;
if ((n < 0) && ((n & 0x07FF) != 0)) dataUnit[rIndex + 2]--;
n = z1 + (tmp12 * (0 - FIX_1_847759065)) + 1024;
- dataUnit[rIndex + 6] = n >> 11;
+ dataUnit[rIndex + 6] = n >> 11;
if ((n < 0) && ((n & 0x07FF) != 0)) dataUnit[rIndex + 6]--;
/**
@@ -1172,9 +1172,7 @@ void getDHT() {
if (dcHuffmanTables == null) {
dcHuffmanTables = new JPEGHuffmanTable[4];
}
- JPEGHuffmanTable[] dhtTables = dht.getAllTables();
- for (int i = 0; i < dhtTables.length; i++) {
- JPEGHuffmanTable dhtTable = dhtTables[i];
+ for (JPEGHuffmanTable dhtTable : dht.getAllTables()) {
if (dhtTable.getTableClass() == 0) {
dcHuffmanTables[dhtTable.getTableIdentifier()] = dhtTable;
} else {
@@ -1277,7 +1275,7 @@ void inverseDCT(int[] dataUnit) {
dataUnit[rIndex + 5] = (tmp12 - tmp1 + 1024) >> 11;
dataUnit[rIndex + 3] = (tmp13 + tmp0 + 1024) >> 11;
dataUnit[rIndex + 4] = (tmp13 - tmp0 + 1024) >> 11;
- }
+ }
}
/**
* Pass 2: process columns.
@@ -1855,14 +1853,11 @@ void unloadIntoByteStream(ImageLoader loader) {
JPEGHuffmanTable.getDefaultACLuminanceTable(),
JPEGHuffmanTable.getDefaultACChrominanceTable()
};
- for (int i = 0; i < dhtTables.length; i++) {
- JPEGHuffmanTable dhtTable = dhtTables[i];
+ for (JPEGHuffmanTable dhtTable : dhtTables) {
if (!dhtTable.writeToStream(outputStream)) {
SWT.error(SWT.ERROR_IO);
}
- JPEGHuffmanTable[] allTables = dhtTable.getAllTables();
- for (int j = 0; j < allTables.length; j++) {
- JPEGHuffmanTable huffmanTable = allTables[j];
+ for (JPEGHuffmanTable huffmanTable : dhtTable.getAllTables()) {
if (huffmanTable.getTableClass() == 0) {
dcHuffmanTables[huffmanTable.getTableIdentifier()] = huffmanTable;
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java
index 75e53a6f61..54e5bbdfe8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java
@@ -103,13 +103,13 @@ final class LEDataInputStream extends InputStream {
}
/**
- * Reads at most <code>length</code> bytes from this LEDataInputStream and
- * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- * <p>
- * Answer the number of bytes actually read or -1 if no bytes were read and
- * end of stream was encountered. This implementation reads bytes from
- * the pushback buffer first, then the target stream if more bytes are required
- * to satisfy <code>count</code>.
+ * Reads at most <code>length</code> bytes from this LEDataInputStream and
+ * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
+ * <p>
+ * Answer the number of bytes actually read or -1 if no bytes were read and
+ * end of stream was encountered. This implementation reads bytes from
+ * the pushback buffer first, then the target stream if more bytes are required
+ * to satisfy <code>count</code>.
* </p>
* @param buffer the byte array in which to store the read bytes.
* @param offset the offset in <code>buffer</code> to store the read bytes.
@@ -122,9 +122,9 @@ final class LEDataInputStream extends InputStream {
private int readData(byte[] buffer, int offset, int length) throws IOException {
if (buf == null) throw new IOException();
if (offset < 0 || offset > buffer.length ||
- length < 0 || (length > buffer.length - offset)) {
- throw new ArrayIndexOutOfBoundsException();
- }
+ length < 0 || (length > buffer.length - offset)) {
+ throw new ArrayIndexOutOfBoundsException();
+ }
int cacheCopied = 0;
int newOffset = offset;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LZWCodec.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LZWCodec.java
index 025ce9dd59..1470f0cf6f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LZWCodec.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LZWCodec.java
@@ -209,8 +209,9 @@ int encodeLoop() {
}
} else {
nextPutCode(clearCode);
- for (int i = 0; i < nodeStack.length; i++)
- nodeStack[i].children = null;
+ for (LZWNode lzwnode : nodeStack) {
+ lzwnode.children = null;
+ }
codeSize = bitsPerPixel + 1;
codeMask = MASK_TABLE[codeSize - 1];
currentSlot = newCodes;
@@ -394,8 +395,7 @@ void nextPutPixels(byte[] buf) {
if (image.depth == 8) {
// Slight optimization for depth = 8.
int start = line * image.bytesPerLine;
- for (int i = 0; i < imageWidth; i++)
- image.data[start + i] = buf[i];
+ System.arraycopy(buf, 0, image.data, start, imageWidth);
} else {
image.setPixels(0, line, imageWidth, buf, 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java
index fbf2720521..2170f0cb51 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java
@@ -283,6 +283,9 @@ void setPixelData(byte[] data, ImageData imageData) {
*/
if (headerChunk.getBitDepth() > 8) srcBytesPerLine /= 2;
if (destBytesPerLine != srcBytesPerLine) {
+ // Resize 'ImageData.data' to avoid bugs related to using 'ImageData.data.length'
+ imageData.data = new byte[destBytesPerLine*height];
+
for (int y = 0; y < height; y++) {
System.arraycopy(data, y * srcBytesPerLine, imageData.data, y * destBytesPerLine, srcBytesPerLine);
}
@@ -421,11 +424,11 @@ void readInterlaceFrame(
valueMask |= 1;
}
int maxShift = 8 - bitsPerPixel;
- for (int byteOffset = 0; byteOffset < currentRow.length; byteOffset++) {
+ for (byte element : currentRow) {
for (int bitOffset = maxShift; bitOffset >= 0; bitOffset -= bitsPerPixel) {
if (column < width) {
int dataOffset = rowBase + (column * bitsPerPixel / 8);
- int value = (currentRow[byteOffset] >> bitOffset) & valueMask;
+ int value = (element >> bitOffset) & valueMask;
int dataShift = maxShift - (bitsPerPixel * (column % pixelsPerByte));
data[dataOffset] |= value << dataShift;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngChunk.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngChunk.java
index 200cb308ba..b9cc0f081b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngChunk.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngChunk.java
@@ -370,9 +370,8 @@ public String toString() {
buffer.append("\n\tLength: ");
buffer.append(getLength());
buffer.append("\n\tType: ");
- byte[] type = getTypeBytes();
- for(int i = 0; i < type.length; i++) {
- buffer.append((char) type[i]);
+ for (byte element : getTypeBytes()) {
+ buffer.append((char) element);
}
contributeToString(buffer);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java
index 2683d0801c..695c68367c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java
@@ -67,38 +67,38 @@ static class Match {
static final short mirrorBytes[] = {
- 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
- 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
- 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
- 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
- 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
- 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
- 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
- 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
- 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
- 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
- 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
- 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
- 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
- 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
- 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
- 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
- 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
- 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
- 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
- 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
- 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
- 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
- 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
- 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
- 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
- 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
- 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
- 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
- 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
- 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
- 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
- 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
+ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+ 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+ 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+ 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+ 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+ 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+ 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+ 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+ 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+ 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+ 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+ 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+ 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+ 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+ 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+ 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+ 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+ 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+ 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+ 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+ 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+ 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+ 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+ 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+ 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+ 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+ 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+ 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
};
@@ -113,7 +113,7 @@ static class Code {
this.min = min;
this.max = max;
- }
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java
index b00aa657ac..d87e1da2b0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java
@@ -142,11 +142,11 @@ void writePalette() {
ByteArrayOutputStream baos = new ByteArrayOutputStream(RGBs.length);
- for (int i = 0; i < RGBs.length; i++) {
+ for (RGB rgb : RGBs) {
- baos.write((byte) RGBs[i].red);
- baos.write((byte) RGBs[i].green);
- baos.write((byte) RGBs[i].blue);
+ baos.write((byte) rgb.red);
+ baos.write((byte) rgb.green);
+ baos.write((byte) rgb.blue);
}
@@ -327,14 +327,7 @@ void writeImageData() throws IOException {
os.flush();
os.close();
- byte[] compressed = baos.toByteArray();
- if (os == baos) {
- /* Use PngDeflater for J2ME. */
- PngDeflater deflater = new PngDeflater();
- compressed = deflater.deflate(compressed);
- }
-
- writeChunk(TAG_IDAT, compressed);
+ writeChunk(TAG_IDAT, baos.toByteArray());
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java
index c25cf0157f..ca7aef4890 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java
@@ -102,7 +102,7 @@ int getNextValue(PngDecodingDataStream stream) throws IOException {
// a prefix to the longer codeValues.
while (codelength < MAX_CODE_LENGTH && code > codeLengthInfo[codelength].max) {
code = ((code << 1) | stream.getNextIdatBit());
- codelength++;
+ codelength++;
}
if (codelength >= MAX_CODE_LENGTH) stream.error();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java
index cb78f2581f..9f60c6c12b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java
@@ -24,18 +24,18 @@ public class PngHuffmanTables {
static final int LiteralTableSize = 288;
static final int[] FixedLiteralLengths = {
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8,
};
static final int DistanceTableSize = 32;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngIhdrChunk.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngIhdrChunk.java
index b71bc8f75a..ae221130e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngIhdrChunk.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngIhdrChunk.java
@@ -239,8 +239,8 @@ void validate(PngFileReadState readState, PngIhdrChunk headerChunk) {
}
boolean colorTypeIsValid = false;
- for (int i = 0; i < ValidColorTypes.length; i++) {
- if (ValidColorTypes[i] == colorType) {
+ for (byte validColorType : ValidColorTypes) {
+ if (validColorType == colorType) {
colorTypeIsValid = true;
break;
}
@@ -248,8 +248,8 @@ void validate(PngFileReadState readState, PngIhdrChunk headerChunk) {
if (!colorTypeIsValid) SWT.error(SWT.ERROR_INVALID_IMAGE);
boolean bitDepthIsValid = false;
- for (int i = 0; i < ValidBitDepths.length; i++) {
- if (ValidBitDepths[i] == bitDepth) {
+ for (byte validBitDepth : ValidBitDepths) {
+ if (validBitDepth == bitDepth) {
bitDepthIsValid = true;
break;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java
index 0be7e94999..41301e8bc0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java
@@ -611,7 +611,9 @@ void write(int photometricInterpretation) throws IOException {
out.writeInt(1);
}
/* ColorMap */
- if (isColorMap) for (int i = 0; i < colorMap.length; i++) out.writeShort(colorMap[i]);
+ if (isColorMap)
+ for (int element : colorMap)
+ out.writeShort(element);
/* Image Data */
out.write(data);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFModifiedHuffmanCodec.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFModifiedHuffmanCodec.java
index 03e887e54d..55c41e999b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFModifiedHuffmanCodec.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFModifiedHuffmanCodec.java
@@ -150,11 +150,11 @@ int decodeRunLength() {
boolean found = false;
nbrBits = isWhite ? WHITE_MIN_BITS : BLACK_MIN_BITS;
code = getNextBits(nbrBits);
- for (int i = 0; i < huffmanCode.length; i++) {
- for (int j = 0; j < huffmanCode[i].length; j++) {
- if (huffmanCode[i][j][0] == code) {
+ for (short[][] batch : huffmanCode) {
+ for (short[] element : batch) {
+ if (element[0] == code) {
found = true;
- partialRun = huffmanCode[i][j][1];
+ partialRun = element[1];
if (partialRun == -1) {
/* Stop when reaching final EOL on last byte */
if (byteOffsetSrc == src.length - 1) return -1;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java
index 120722dbdc..3032c54844 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java
@@ -21,6 +21,12 @@ import java.io.*;
public final class WinBMPFileFormat extends FileFormat {
static final int BMPFileHeaderSize = 14;
static final int BMPHeaderFixedSize = 40;
+
+ static final int BI_RGB = 0;
+ static final int BI_RLE8 = 1;
+ static final int BI_RLE4 = 2;
+ static final int BI_BITFIELDS = 3;
+
int importantColors;
Point pelsPerMeter = new Point(0, 0);
@@ -31,10 +37,10 @@ public final class WinBMPFileFormat extends FileFormat {
* Answer the size of the compressed data.
*/
int compress(int comp, byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last) {
- if (comp == 1) { // BMP_RLE8_COMPRESSION
+ if (comp == BI_RLE8) {
return compressRLE8Data(src, srcOffset, numBytes, dest, last);
}
- if (comp == 2) { // BMP_RLE4_COMPRESSION
+ if (comp == BI_RLE4) {
return compressRLE4Data(src, srcOffset, numBytes, dest, last);
}
SWT.error(SWT.ERROR_INVALID_IMAGE);
@@ -271,12 +277,12 @@ void convertPixelsToBGR(ImageData image, byte[] dest) {
}
}
void decompressData(byte[] src, byte[] dest, int stride, int cmp) {
- if (cmp == 1) { // BMP_RLE8_COMPRESSION
+ if (cmp == BI_RLE8) {
if (decompressRLE8Data(src, src.length, stride, dest, dest.length) <= 0)
SWT.error(SWT.ERROR_INVALID_IMAGE);
return;
}
- if (cmp == 2) { // BMP_RLE4_COMPRESSION
+ if (cmp == BI_RLE4) {
if (decompressRLE4Data(src, src.length, stride, dest, dest.length) <= 0)
SWT.error(SWT.ERROR_INVALID_IMAGE);
return;
@@ -424,14 +430,14 @@ boolean isFileFormat(LEDataInputStream stream) {
boolean isPaletteBMP(PaletteData pal, int depth) {
switch(depth) {
case 32:
- if ((pal.redMask == 0xFF00) && (pal.greenMask == 0xFF0000) && (pal.blueMask == 0xFF000000)) return true;
- return false;
+ if ((pal.redMask == 0xFF00) && (pal.greenMask == 0xFF0000) && (pal.blueMask == 0xFF000000)) return true;
+ return false;
case 24:
if ((pal.redMask == 0xFF) && (pal.greenMask == 0xFF00) && (pal.blueMask == 0xFF0000)) return true;
return false;
case 16:
- if ((pal.redMask == 0x7C00) && (pal.greenMask == 0x3E0) && (pal.blueMask == 0x1F)) return true;
- return false;
+ if ((pal.redMask == 0x7C00) && (pal.greenMask == 0x3E0) && (pal.blueMask == 0x1F)) return true;
+ return false;
default:
return true;
}
@@ -452,7 +458,7 @@ byte[] loadData(byte[] infoHeader, int stride) {
int dataSize = height * stride;
byte[] data = new byte[dataSize];
int cmp = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
- if (cmp == 0 || cmp == 3) { // BMP_NO_COMPRESSION
+ if (cmp == BI_RGB || cmp == BI_BITFIELDS) {
try {
if (inputStream.read(data) != dataSize)
SWT.error(SWT.ERROR_INVALID_IMAGE);
@@ -556,7 +562,7 @@ PaletteData loadPalette(byte[] infoHeader) {
return paletteFromBytes(buf, numColors);
}
if (depth == 16) {
- if (this.compression == 3) {
+ if (this.compression == BI_BITFIELDS) {
try {
return new PaletteData(inputStream.readInt(), inputStream.readInt(), inputStream.readInt());
} catch (IOException e) {
@@ -566,9 +572,18 @@ PaletteData loadPalette(byte[] infoHeader) {
return new PaletteData(0x7C00, 0x3E0, 0x1F);
}
if (depth == 24) return new PaletteData(0xFF, 0xFF00, 0xFF0000);
- if (this.compression == 3) {
+ if (this.compression == BI_BITFIELDS) {
try {
- return new PaletteData(inputStream.readInt(), inputStream.readInt(), inputStream.readInt());
+ /*
+ * ImageData is expected to be in big-endian format when
+ * (bpp != 16); see 'ImageData.getByteOrder()'. At the same
+ * time, 'inputStream' is a 'LEDataInputStream', that is,
+ * low-endian. Therefore, masks need to be converted.
+ */
+ final int maskR = Integer.reverseBytes(inputStream.readInt());
+ final int maskG = Integer.reverseBytes(inputStream.readInt());
+ final int maskB = Integer.reverseBytes(inputStream.readInt());
+ return new PaletteData(maskR, maskG, maskB);
} catch (IOException e) {
SWT.error(SWT.ERROR_IO, e);
}
@@ -735,7 +750,7 @@ void unloadIntoByteStream(ImageLoader loader) {
// If the pixels are not in the expected BMP format, convert them.
if (pal.isDirect && !isPaletteBMP(pal, image.depth)) {
// array to store the converted pixels
- iData = new byte[image.data.length];
+ iData = new byte[image.data.length];
convertPixelsToBGR(image, iData);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderData.java
new file mode 100644
index 0000000000..bd4dfcb663
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderData.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2022 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.layout;
+
+import static org.eclipse.swt.SWT.*;
+
+import java.util.*;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * Controls the several aspects of a {@link BorderLayout}.
+ *
+ * @since 3.119
+ */
+public final class BorderData {
+
+ private final Map<Control, Point> cachedSize = new IdentityHashMap<>(1);
+
+ public int hHint = SWT.DEFAULT;
+ public int wHint = SWT.DEFAULT;
+ public int region = SWT.CENTER;
+
+ /**
+ * creates a {@link BorderData} with default options
+ */
+ public BorderData() {
+ }
+
+ /**
+ * creates a {@link BorderData} initialized with the given region, valid values
+ * are {@link SWT#TOP}, {@link SWT#CENTER}, {@link SWT#LEFT}, {@link SWT#RIGHT},
+ * {@link SWT#BOTTOM}
+ *
+ * @param region the region valid values are {@link SWT#TOP},
+ * {@link SWT#CENTER}, {@link SWT#LEFT}, {@link SWT#RIGHT},
+ * {@link SWT#BOTTOM}
+ */
+ public BorderData(int region) {
+ this.region = region;
+ }
+
+ /**
+ * creates a {@link BorderData} initialized with the given region and width and
+ * height hints
+ *
+ * @param region the region valid values are {@link SWT#TOP},
+ * {@link SWT#CENTER}, {@link SWT#LEFT}, {@link SWT#RIGHT},
+ * {@link SWT#BOTTOM}
+ * @param widthHint the default hint for the width
+ * @param heightHint he default hint for the height
+ */
+ public BorderData(int region, int widthHint, int heightHint) {
+ this.region = region;
+ this.wHint = widthHint;
+ this.hHint = heightHint;
+ }
+
+ Point getSize(Control control) {
+ return cachedSize.computeIfAbsent(control, c -> c.computeSize(wHint, hHint, true));
+ }
+
+ void flushCache(Control control) {
+ cachedSize.remove(control);
+ }
+
+ @Override
+ public String toString() {
+ return "BorderData [region=" + getRegionString(region) + ", hHint=" + hHint + ", wHint=" + wHint + "]";
+ }
+
+ static String getRegionString(int region) {
+ switch (region) {
+ case SWT.TOP:
+ return "SWT.TOP";
+ case SWT.RIGHT:
+ return "SWT.RIGHT";
+ case SWT.BOTTOM:
+ return "SWT.BOTTOM";
+ case SWT.LEFT:
+ return "SWT.LEFT";
+ case SWT.CENTER:
+ return "SWT.CENTER";
+ default:
+ return "SWT.NONE";
+ }
+ }
+
+ /**
+ *
+ * @return the region of this BorderData or {@link SWT#NONE} if it is out of
+ * range
+ */
+ int getRegion() {
+ switch (region) {
+ case TOP:
+ case BOTTOM:
+ case CENTER:
+ case RIGHT:
+ case LEFT:
+ return region;
+ case SWT.NONE:
+ default:
+ return SWT.NONE;
+ }
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderLayout.java
new file mode 100644
index 0000000000..4f6b176971
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/BorderLayout.java
@@ -0,0 +1,420 @@
+/*******************************************************************************
+ * Copyright (c) 2022 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.layout;
+
+import static org.eclipse.swt.SWT.*;
+
+import java.util.*;
+import java.util.AbstractMap.*;
+import java.util.List;
+import java.util.Map.*;
+import java.util.function.*;
+import java.util.stream.*;
+import java.util.stream.IntStream.*;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * {@link BorderLayout} places controls in five regions
+ *
+ * <pre>
+ * +--------------------------------+
+ * | NORTH / TOP |
+ * +---+------------------------+---+
+ * | | | |
+ * | W | | E |
+ * | E | | A |
+ * | S | | S |
+ * | T | | T |
+ * | / | | / |
+ * | L | CENTER | R |
+ * | E | | I |
+ * | F | | G |
+ * | T | | H |
+ * | | | T |
+ * | | | |
+ * +---+------------------------+---+
+ * | SOUTH / BOTTOM |
+ * +--------------------------------+
+ * </pre>
+ *
+ * The controls at the NORTH/SOUTH borders get their preferred heights, the
+ * controls at the EAST/WEST get their preferred widths and the center region
+ * grow/shrink according to the remaining space. If more than one control is
+ * placed inside a region the controls are equally distributed across their axis
+ * where the grow (CENTER controlled by the {@link BorderLayout#type} value)
+ *
+ * @since 3.119
+ */
+public class BorderLayout extends Layout {
+
+ private static final ToIntFunction<Point> WIDTH = p -> p.x;
+ private static final ToIntFunction<Point> HEIGHT = p -> p.y;
+
+ /**
+ * type specifies how controls will be positioned within the center region.
+ *
+ * The default value is {@link SWT#HORIZONTAL}.
+ *
+ * Possible values are:
+ * <ul>
+ * <li>{@link SWT#HORIZONTAL}: Position the controls horizontally from left to
+ * right</li>
+ * <li>{@link SWT#VERTICAL}: Position the controls vertically from top to
+ * bottom</li>
+ * </ul>
+ */
+ public int type = SWT.HORIZONTAL;
+ /**
+ * marginWidth specifies the number of points of horizontal margin that will be
+ * placed along the left and right edges of the layout.
+ *
+ * The default value is 0.
+ *
+ */
+ public int marginWidth = 0;
+ /**
+ * marginHeight specifies the number of points of vertical margin that will be
+ * placed along the top and bottom edges of the layout.
+ *
+ * The default value is 0.
+ *
+ */
+ public int marginHeight = 0;
+ /**
+ * spacing specifies the number of points between the edge of one region and its
+ * neighboring regions.
+ *
+ * The default value is 0.
+ *
+ */
+ public int spacing = 0;
+ /**
+ * controlSpacing specifies the number of points between the edge of one control
+ * and its neighboring control inside a region.
+ *
+ * The default value is 0.
+ *
+ */
+ public int controlSpacing = 0;
+ /**
+ * If the width of the {@link SWT#LEFT} and {@link SWT#RIGHT} region exceeds the
+ * available space this factor is used to distribute the size to the controls,
+ * valid values range between [0 ... 1]
+ *
+ * The default value is 0.5 (equal distribution of available space)
+ */
+ public double widthDistributionFactor = 0.5;
+ /**
+ * If the height of the {@link SWT#TOP} and {@link SWT#BOTTOM} region exceeds the
+ * available space this factor is used to distribute the size to the controls,
+ * valid values range between [0 ... 1]
+ *
+ * The default value is 0.5 (equal distribution of available space)
+ *
+ */
+ public double heightDistributionFactor = 0.5;
+
+ @Override
+ protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
+ if (hHint > SWT.DEFAULT && wHint > SWT.DEFAULT) {
+ return new Point(wHint, hHint);
+ }
+ Stream<Entry<Control, BorderData>> children = Arrays.stream(composite.getChildren())//
+ .map(control-> borderDataControl(control, flushCache));
+ Map<Integer, List<Entry<Control, BorderData>>> regionMap = children
+ .collect(Collectors.groupingBy(BorderLayout::region));
+ int width;
+ if (wHint <= SWT.DEFAULT) {
+ Builder widthBuilder = IntStream.builder();
+ int northWidth = getTotal(WIDTH, TOP, regionMap);
+ int southWidth = getTotal(WIDTH, BOTTOM, regionMap);
+ int centerWidth;
+ if (type == SWT.HORIZONTAL) {
+ centerWidth = getTotal(WIDTH, CENTER, regionMap);
+ } else {
+ centerWidth = getMax(WIDTH, CENTER, regionMap);
+ }
+ int westWidth = getMax(WIDTH, LEFT, regionMap);
+ int eastWidth = getMax(WIDTH, RIGHT, regionMap);
+ int middleWidth = westWidth + centerWidth + eastWidth;
+ if (centerWidth > 0) {
+ if (westWidth > 0) {
+ middleWidth += spacing;
+ }
+ if (eastWidth > 0) {
+ middleWidth += spacing;
+ }
+ } else if (westWidth > 0 && eastWidth > 0) {
+ middleWidth += spacing;
+ }
+ widthBuilder.add(middleWidth);
+ widthBuilder.add(northWidth);
+ widthBuilder.add(southWidth);
+ width = widthBuilder.build().max().orElse(0) + 2 * marginWidth;
+ } else {
+ width = wHint;
+ }
+ int height;
+ if (hHint <= SWT.DEFAULT) {
+ Builder heightBuilder = IntStream.builder();
+ int northHeight = getMax(HEIGHT, TOP, regionMap);
+ int southHeight = getMax(HEIGHT, BOTTOM, regionMap);
+ int westHeight = getTotal(HEIGHT, LEFT, regionMap);
+ int eastHeight = getTotal(HEIGHT, RIGHT, regionMap);
+ int centerHeight;
+ if (type == SWT.HORIZONTAL) {
+ centerHeight = getMax(HEIGHT, CENTER, regionMap);
+ } else {
+ centerHeight = getTotal(HEIGHT, CENTER, regionMap);
+ }
+ if (centerHeight > 0) {
+ if (northHeight > 0) {
+ centerHeight += spacing;
+ }
+ if (southHeight > 0) {
+ centerHeight += spacing;
+ }
+ }
+ if (westHeight > 0) {
+ if (northHeight > 0) {
+ westHeight += spacing;
+ }
+ if (southHeight > 0) {
+ westHeight += spacing;
+ }
+ }
+ if (eastHeight > 0) {
+ if (northHeight > 0) {
+ eastHeight += spacing;
+ }
+ if (southHeight > 0) {
+ eastHeight += spacing;
+ }
+ }
+ int sum = northHeight + southHeight;
+ heightBuilder.add(westHeight + sum);
+ heightBuilder.add(centerHeight + sum);
+ heightBuilder.add(eastHeight + sum);
+ height = heightBuilder.build().max().orElse(0) + 2 * marginHeight;
+ } else {
+ height = hHint;
+ }
+ return new Point(width, height);
+ }
+
+ /**
+ * Calculates the total W/H according to the extractor
+ *
+ * @param extractor either {@link #WIDTH} or {@link #HEIGHT}
+ * @param region the region to compute
+ * @param regionMap the map of regions
+ * @return the total W/H including the {@link #controlSpacing}
+ */
+ private int getTotal(ToIntFunction<Point> extractor, int region,
+ Map<Integer, List<Entry<Control, BorderData>>> regionMap) {
+ List<Entry<Control, BorderData>> list = regionMap.getOrDefault(region, Collections.emptyList());
+ if (list.isEmpty()) {
+ return 0;
+ }
+ return list.stream().mapToInt(entry -> extractor.applyAsInt(entry.getValue().getSize(entry.getKey()))).sum()
+ + ((list.size() - 1) * controlSpacing);
+ }
+
+ private static int getMax(ToIntFunction<Point> extractor, int region,
+ Map<Integer, List<Entry<Control, BorderData>>> regionMap) {
+ List<Entry<Control, BorderData>> list = regionMap.getOrDefault(region, Collections.emptyList());
+ return getMax(extractor, list);
+ }
+
+ private static int getMax(ToIntFunction<Point> extractor, List<Entry<Control, BorderData>> list) {
+ return list.stream().mapToInt(entry -> extractor.applyAsInt(entry.getValue().getSize(entry.getKey()))).max()
+ .orElse(0);
+ }
+
+ @Override
+ protected void layout(Composite composite, boolean flushCache) {
+ Rectangle clientArea = composite.getClientArea();
+ int clientX = clientArea.x + marginWidth;
+ int clientY = clientArea.y + marginHeight;
+ int clientWidth = clientArea.width - 2 * marginWidth;
+ int clientHeight = clientArea.height - 2 * marginHeight;
+ Stream<Entry<Control, BorderData>> children = Arrays.stream(composite.getChildren())//
+ .map(control-> borderDataControl(control, flushCache));
+ Map<Integer, List<Entry<Control, BorderData>>> regionMap = children
+ .collect(Collectors.groupingBy(BorderLayout::region));
+ regionMap.getOrDefault(SWT.NONE, Collections.emptyList())
+ .forEach(entry -> entry.getKey().setBounds(clientX, clientY, 0, 0));
+ List<Entry<Control, BorderData>> northList = regionMap.getOrDefault(TOP, Collections.emptyList());
+ List<Entry<Control, BorderData>> southList = regionMap.getOrDefault(BOTTOM, Collections.emptyList());
+ List<Entry<Control, BorderData>> westList = regionMap.getOrDefault(LEFT, Collections.emptyList());
+ List<Entry<Control, BorderData>> eastList = regionMap.getOrDefault(RIGHT, Collections.emptyList());
+ List<Entry<Control, BorderData>> centerList = regionMap.getOrDefault(CENTER, Collections.emptyList());
+ int northControlCount = northList.size();
+ int northControlHeight = getMax(HEIGHT, northList);
+ int southControlCount = southList.size();
+ int southControlHeight = getMax(HEIGHT, southList);
+ if (northControlHeight + southControlHeight > clientHeight) {
+ int distributionSize = (int) (clientHeight * heightDistributionFactor);
+ if (northControlHeight > distributionSize) {
+ northControlHeight = distributionSize;
+ }
+ southControlHeight = clientHeight - northControlHeight;
+ }
+ int centerControlHeight = clientHeight - northControlHeight - southControlHeight;
+ int westControlCount = westList.size();
+ int westControlWidth = getMax(WIDTH, westList);
+ int eastControlCount = eastList.size();
+ int eastControlWidth = getMax(WIDTH, eastList);
+ if (westControlWidth + eastControlWidth > clientWidth) {
+ int distributionSize = (int) (clientWidth * widthDistributionFactor);
+ if (westControlWidth > distributionSize) {
+ westControlWidth = distributionSize;
+ }
+ eastControlWidth = clientWidth - westControlWidth;
+ }
+ int centerControlWidth = clientWidth - westControlWidth - eastControlWidth;
+ int centerControlCount = centerList.size();
+ // Full width and preferred height for NORTH and SOUTH if possible
+ if (northControlCount > 0) {
+ int controlWidth = (clientWidth - (northControlCount - 1) * controlSpacing) / northControlCount;
+ int x = clientX;
+ int y = clientY;
+ for (Entry<Control, BorderData> entry : northList) {
+ entry.getKey().setBounds(x, y, controlWidth, northControlHeight);
+ x += controlWidth + controlSpacing;
+ }
+ }
+ if (southControlCount > 0) {
+ int controlWidth = (clientWidth - (southControlCount - 1) * controlSpacing) / southControlCount;
+ int x = clientX;
+ int y = clientY + centerControlHeight + northControlHeight;
+ for (Entry<Control, BorderData> entry : southList) {
+ entry.getKey().setBounds(x, y, controlWidth, southControlHeight);
+ x += controlWidth + controlSpacing;
+ }
+ }
+ // remaining height for WEST and EAST, preferred width for WEST and EAST if
+ // possible ...
+ if (westControlCount > 0) {
+ int x = clientX;
+ int y = clientY + northControlHeight;
+ int h = clientHeight - northControlHeight - southControlHeight;
+ if (northControlCount > 0) {
+ y += spacing;
+ h -= spacing;
+ }
+ if (southControlCount > 0) {
+ h -= spacing;
+ }
+ int controlHeight = (h - (westControlCount - 1) * controlSpacing) / westControlCount;
+ for (Entry<Control, BorderData> entry : westList) {
+ entry.getKey().setBounds(x, y, westControlWidth, controlHeight);
+ y += controlHeight + controlSpacing;
+ }
+ }
+ if (eastControlCount > 0) {
+ int x = clientX + centerControlWidth + westControlWidth;
+ int y = clientY + northControlHeight;
+ int h = clientHeight - northControlHeight - southControlHeight;
+ if (northControlCount > 0) {
+ y += spacing;
+ h -= spacing;
+ }
+ if (southControlCount > 0) {
+ h -= spacing;
+ }
+ int controlHeight = (h - (eastControlCount - 1) * controlSpacing) / eastControlCount;
+ for (Entry<Control, BorderData> entry : eastList) {
+ entry.getKey().setBounds(x, y, eastControlWidth, controlHeight);
+ y += controlHeight + controlSpacing;
+ }
+ }
+ // remaining height and width for CENTER
+ if (centerControlCount > 0) {
+ int x = clientX + westControlWidth;
+ int y = clientY + northControlHeight;
+ int h = centerControlHeight;
+ int w = centerControlWidth;
+ if (westControlCount > 0) {
+ x += spacing;
+ w -= spacing;
+ }
+ if (eastControlCount > 0) {
+ w -= spacing;
+ }
+ if (northControlCount > 0) {
+ y += spacing;
+ h -= spacing;
+ }
+ if (southControlCount > 0) {
+ h -= spacing;
+ }
+ int controlHeight;
+ int controlWidth;
+ if (type == SWT.HORIZONTAL) {
+ controlHeight = h;
+ controlWidth = (w - (centerControlCount - 1) * controlSpacing) / centerControlCount;
+ } else {
+ controlWidth = w;
+ controlHeight = (h - (centerControlCount - 1) * controlSpacing) / centerControlCount;
+ }
+ for (Entry<Control, BorderData> entry : centerList) {
+ entry.getKey().setBounds(x, y, controlWidth, controlHeight);
+ if (type == SWT.HORIZONTAL) {
+ x += controlWidth + controlSpacing;
+ } else {
+ y += controlHeight + controlSpacing;
+ }
+ }
+ }
+ }
+
+ private static <C extends Control> Entry<C, BorderData> borderDataControl(C control, boolean flushCache) {
+ Object layoutData = control.getLayoutData();
+ if (layoutData instanceof BorderData) {
+ BorderData borderData = (BorderData) layoutData;
+ if (flushCache) {
+ borderData.flushCache(control);
+ }
+ return new SimpleEntry<>(control, borderData);
+ } else {
+ return new SimpleEntry<>(control, null);
+ }
+ }
+
+ private static int region(Entry<Control, BorderData> entry) {
+ BorderData borderData = entry.getValue();
+ if (borderData == null) {
+ //we assume all controls without explicit data to be placed in the center area
+ return SWT.CENTER;
+ }
+ return borderData.getRegion();
+ }
+
+ @Override
+ public String toString() {
+ return "BorderLayout [" //
+ + "type=" + ((type == SWT.HORIZONTAL) ? "SWT.HORIZONTAL" : "SWT.VERTICAL") //
+ + ", marginWidth=" + marginWidth //
+ + ", marginHeight=" + marginHeight //
+ + ", spacing=" + spacing //
+ + ", controlSpacing=" + controlSpacing //
+ + ", widthDistributionFactor=" + widthDistributionFactor//
+ + ", heightDistributionFactor=" + heightDistributionFactor //
+ + "]";
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java
index 0bc3d8c3ca..9fc9f6963e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christoph Läubrich - Bug 513185
*******************************************************************************/
package org.eclipse.swt.layout;
@@ -68,7 +69,7 @@ public final class FillLayout extends Layout {
*
* @since 3.0
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
@@ -78,9 +79,9 @@ public final class FillLayout extends Layout {
*
* @since 3.0
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
- /**
+ /**
* spacing specifies the number of points between the edge of one cell
* and the edge of its neighbouring cell.
*
@@ -145,14 +146,19 @@ protected Point computeSize (Composite composite, int wHint, int hHint, boolean
}
Point computeChildSize (Control control, int wHint, int hHint, boolean flushCache) {
- FillData data = (FillData)control.getLayoutData ();
- if (data == null) {
- data = new FillData ();
- control.setLayoutData (data);
+ Object data = control.getLayoutData ();
+ FillData fillData;
+ if (data instanceof FillData) {
+ fillData = (FillData) data;
+ } else {
+ fillData = new FillData ();
+ if (data == null) {
+ control.setLayoutData(fillData);
+ }
}
Point size = null;
if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) {
- size = data.computeSize (control, wHint, hHint, flushCache);
+ size = fillData.computeSize (control, wHint, hHint, flushCache);
} else {
// TEMPORARY CODE
int trimX, trimY;
@@ -165,7 +171,7 @@ Point computeChildSize (Control control, int wHint, int hHint, boolean flushCach
}
int w = wHint == SWT.DEFAULT ? wHint : Math.max (0, wHint - trimX);
int h = hHint == SWT.DEFAULT ? hHint : Math.max (0, hHint - trimY);
- size = data.computeSize (control, w, h, flushCache);
+ size = fillData.computeSize (control, w, h, flushCache);
}
return size;
}
@@ -173,8 +179,11 @@ Point computeChildSize (Control control, int wHint, int hHint, boolean flushCach
@Override
protected boolean flushCache (Control control) {
Object data = control.getLayoutData();
- if (data != null) ((FillData)data).flushCache();
- return true;
+ if (data instanceof FillData) {
+ ((FillData)data).flushCache();
+ return true;
+ }
+ return false;
}
String getName () {
@@ -233,13 +242,13 @@ protected void layout (Composite composite, boolean flushCache) {
*/
@Override
public String toString () {
- String string = getName ()+" {";
- string += "type="+((type == SWT.VERTICAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (spacing != 0) string += "spacing="+spacing+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ string += "type="+((type == SWT.VERTICAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (spacing != 0) string += "spacing="+spacing+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
index 0afc130fb9..c7bc0ef918 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
@@ -313,7 +313,7 @@ int solveY (int value) {
*/
@Override
public String toString () {
- String string = control != null ? control.toString () : numerator + "/" + denominator;
+ String string = control != null ? control.toString () : numerator + "/" + denominator;
return "{y = (" + string + (offset >= 0 ? ")x + " + offset: ")x - " + (-offset))+"}";
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java
index 3159c799a0..56100f88c2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java
@@ -333,15 +333,15 @@ FormAttachment getTopAttachment (Control control, int spacing, boolean flushCach
*/
@Override
public String toString () {
- String string = getName()+" {";
- if (width != SWT.DEFAULT) string += "width="+width+" ";
+ String string = getName()+" {";
+ if (width != SWT.DEFAULT) string += "width="+width+" ";
if (height != SWT.DEFAULT) string += "height="+height+" ";
- if (left != null) string += "left="+left+" ";
- if (right != null) string += "right="+right+" ";
- if (top != null) string += "top="+top+" ";
- if (bottom != null) string += "bottom="+bottom+" ";
- string = string.trim();
- string += "}";
+ if (left != null) string += "left="+left+" ";
+ if (right != null) string += "right="+right+" ";
+ if (top != null) string += "top="+top+" ";
+ if (bottom != null) string += "bottom="+bottom+" ";
+ string = string.trim();
+ string += "}";
return string;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java
index 52096c84c2..a375ca82c5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java
@@ -97,7 +97,7 @@ public final class FormLayout extends Layout {
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
@@ -105,10 +105,10 @@ public final class FormLayout extends Layout {
*
* The default value is 0.
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
- /**
+ /**
* marginLeft specifies the number of points of horizontal margin
* that will be placed along the left edge of the layout.
*
@@ -294,8 +294,7 @@ protected void layout (Composite composite, boolean flushCache) {
Point layout (Composite composite, boolean move, int x, int y, int width, int height, boolean flushCache) {
Control [] children = composite.getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : children) {
FormData data = (FormData) child.getLayoutData ();
if (data == null) child.setLayoutData (data = new FormData ());
if (flushCache) data.flushCache ();
@@ -377,16 +376,16 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
*/
@Override
public String toString () {
- String string = getName ()+" {";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
- if (marginRight != 0) string += "marginRight="+marginRight+" ";
- if (marginTop != 0) string += "marginTop="+marginTop+" ";
- if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
- if (spacing != 0) string += "spacing="+spacing+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
+ if (marginRight != 0) string += "marginRight="+marginRight+" ";
+ if (marginTop != 0) string += "marginTop="+marginTop+" ";
+ if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
+ if (spacing != 0) string += "spacing="+spacing+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
index dcfed49551..15ff936e21 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
@@ -238,7 +238,7 @@ public final class GridData {
* exclude informs the layout to ignore this control when sizing
* and positioning controls. If this value is <code>true</code>,
* the size and position of the control will not be managed by the
- * layout. If this value is <code>false</code>, the size and
+ * layout. If this value is <code>false</code>, the size and
* position of the control will be computed and assigned.
*
* The default value is <code>false</code>.
@@ -556,22 +556,22 @@ public String toString () {
case CENTER: vAlign = "GridData.CENTER"; break;
default: vAlign = "Undefined "+verticalAlignment; break;
}
- String string = getName()+" {";
- string += "horizontalAlignment="+hAlign+" ";
- if (horizontalIndent != 0) string += "horizontalIndent="+horizontalIndent+" ";
- if (horizontalSpan != 1) string += "horizontalSpan="+horizontalSpan+" ";
- if (grabExcessHorizontalSpace) string += "grabExcessHorizontalSpace="+grabExcessHorizontalSpace+" ";
- if (widthHint != SWT.DEFAULT) string += "widthHint="+widthHint+" ";
- if (minimumWidth != 0) string += "minimumWidth="+minimumWidth+" ";
- string += "verticalAlignment="+vAlign+" ";
- if (verticalIndent != 0) string += "verticalIndent="+verticalIndent+" ";
+ String string = getName()+" {";
+ string += "horizontalAlignment="+hAlign+" ";
+ if (horizontalIndent != 0) string += "horizontalIndent="+horizontalIndent+" ";
+ if (horizontalSpan != 1) string += "horizontalSpan="+horizontalSpan+" ";
+ if (grabExcessHorizontalSpace) string += "grabExcessHorizontalSpace="+grabExcessHorizontalSpace+" ";
+ if (widthHint != SWT.DEFAULT) string += "widthHint="+widthHint+" ";
+ if (minimumWidth != 0) string += "minimumWidth="+minimumWidth+" ";
+ string += "verticalAlignment="+vAlign+" ";
+ if (verticalIndent != 0) string += "verticalIndent="+verticalIndent+" ";
if (verticalSpan != 1) string += "verticalSpan="+verticalSpan+" ";
- if (grabExcessVerticalSpace) string += "grabExcessVerticalSpace="+grabExcessVerticalSpace+" ";
- if (heightHint != SWT.DEFAULT) string += "heightHint="+heightHint+" ";
- if (minimumHeight != 0) string += "minimumHeight="+minimumHeight+" ";
- if (exclude) string += "exclude="+exclude+" ";
- string = string.trim();
- string += "}";
+ if (grabExcessVerticalSpace) string += "grabExcessVerticalSpace="+grabExcessVerticalSpace+" ";
+ if (heightHint != SWT.DEFAULT) string += "heightHint="+heightHint+" ";
+ if (minimumHeight != 0) string += "minimumHeight="+minimumHeight+" ";
+ if (exclude) string += "exclude="+exclude+" ";
+ string = string.trim();
+ string += "}";
return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java
index d82e9ce63b..d0bb2c6f42 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java
@@ -50,13 +50,13 @@ import org.eclipse.swt.widgets.*;
*/
public final class GridLayout extends Layout {
- /**
- * numColumns specifies the number of cell columns in the layout.
- * If numColumns has a value less than 1, the layout will not
- * set the size and position of any controls.
- *
- * The default value is 1.
- */
+ /**
+ * numColumns specifies the number of cell columns in the layout.
+ * If numColumns has a value less than 1, the layout will not
+ * set the size and position of any controls.
+ *
+ * The default value is 1.
+ */
public int numColumns = 1;
/**
@@ -73,7 +73,7 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int marginWidth = 5;
+ public int marginWidth = 5;
/**
* marginHeight specifies the number of points of vertical margin
@@ -81,9 +81,9 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int marginHeight = 5;
+ public int marginHeight = 5;
- /**
+ /**
* marginLeft specifies the number of points of horizontal margin
* that will be placed along the left edge of the layout.
*
@@ -130,7 +130,7 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int horizontalSpacing = 5;
+ public int horizontalSpacing = 5;
/**
* verticalSpacing specifies the number of points between the bottom
@@ -138,7 +138,7 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int verticalSpacing = 5;
+ public int verticalSpacing = 5;
/**
* Constructs a new instance of this class
@@ -736,19 +736,19 @@ String getName () {
*/
@Override
public String toString () {
- String string = getName ()+" {";
- if (numColumns != 1) string += "numColumns="+numColumns+" ";
- if (makeColumnsEqualWidth) string += "makeColumnsEqualWidth="+makeColumnsEqualWidth+" ";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
- if (marginRight != 0) string += "marginRight="+marginRight+" ";
- if (marginTop != 0) string += "marginTop="+marginTop+" ";
- if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
- if (horizontalSpacing != 0) string += "horizontalSpacing="+horizontalSpacing+" ";
- if (verticalSpacing != 0) string += "verticalSpacing="+verticalSpacing+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ if (numColumns != 1) string += "numColumns="+numColumns+" ";
+ if (makeColumnsEqualWidth) string += "makeColumnsEqualWidth="+makeColumnsEqualWidth+" ";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
+ if (marginRight != 0) string += "marginRight="+marginRight+" ";
+ if (marginTop != 0) string += "marginTop="+marginTop+" ";
+ if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
+ if (horizontalSpacing != 0) string += "horizontalSpacing="+horizontalSpacing+" ";
+ if (verticalSpacing != 0) string += "verticalSpacing="+verticalSpacing+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java
index ceb4a8edeb..cb21fcd139 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java
@@ -82,7 +82,7 @@ public final class RowLayout extends Layout {
*
* @since 3.0
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
@@ -92,7 +92,7 @@ public final class RowLayout extends Layout {
*
* @since 3.0
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
/**
* spacing specifies the number of points between the edge of one cell
@@ -502,21 +502,21 @@ Point layoutVertical (Composite composite, boolean move, boolean wrap, int heigh
*/
@Override
public String toString () {
- String string = getName ()+" {";
- string += "type="+((type != SWT.HORIZONTAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
- if (marginTop != 0) string += "marginTop="+marginTop+" ";
- if (marginRight != 0) string += "marginRight="+marginRight+" ";
- if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
- if (spacing != 0) string += "spacing="+spacing+" ";
- string += "wrap="+wrap+" ";
+ String string = getName ()+" {";
+ string += "type="+((type != SWT.HORIZONTAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
+ if (marginTop != 0) string += "marginTop="+marginTop+" ";
+ if (marginRight != 0) string += "marginRight="+marginRight+" ";
+ if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
+ if (spacing != 0) string += "spacing="+spacing+" ";
+ string += "wrap="+wrap+" ";
string += "pack="+pack+" ";
string += "fill="+fill+" ";
string += "justify="+justify+" ";
string = string.trim();
string += "}";
- return string;
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/EventTable.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/EventTable.java
index 00534617b1..d6c79b6649 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/EventTable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/EventTable.java
@@ -33,8 +33,8 @@ class EventTable {
public Listener [] getListeners (int eventType) {
if (types == null) return new Listener [0];
int count = 0;
- for (int i=0; i<types.length; i++) {
- if (types [i] == eventType) count++;
+ for (int type : types) {
+ if (type == eventType) count++;
}
if (count == 0) return new Listener [0];
Listener [] result = new Listener [count];
@@ -70,8 +70,8 @@ public void hook (int eventType, Listener listener) {
public boolean hooks (int eventType) {
if (types == null) return false;
- for (int i=0; i<types.length; i++) {
- if (types [i] == eventType) return true;
+ for (int type : types) {
+ if (type == eventType) return true;
}
return false;
}
@@ -79,7 +79,7 @@ public boolean hooks (int eventType) {
public void sendEvent (Event event) {
if (types == null) return;
level += level >= 0 ? 1 : -1;
- try {
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
for (int i=0; i<types.length; i++) {
if (event.type == SWT.None) return;
if (types [i] == event.type) {
@@ -87,22 +87,8 @@ public void sendEvent (Event event) {
if (listener != null) {
try {
listener.handleEvent (event);
- } catch (RuntimeException runtimeException) {
- Display display = Display.getCurrent ();
-
- if (display == null) {
- throw runtimeException;
- }
-
- display.getRuntimeExceptionHandler ().accept (runtimeException);
- } catch (Error error) {
- Display display = Display.getCurrent ();
-
- if (display == null) {
- throw error;
- }
-
- display.getErrorHandler ().accept (error);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
}
}
}
@@ -130,8 +116,8 @@ public void sendEvent (Event event) {
public int size () {
if (types == null) return 0;
int count = 0;
- for (int i=0; i<types.length; i++) {
- if (types [i] != 0) count++;
+ for (int type : types) {
+ if (type != 0) count++;
}
return count;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Item.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Item.java
index 304424156c..386a51a44f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Item.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Item.java
@@ -176,6 +176,7 @@ void releaseWidget () {
*/
public void setImage (Image image) {
checkWidget ();
+ if (this.image == image) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
this.image = image;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java
index 7948528a71..aabba1f204 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Monitor.java
@@ -113,7 +113,7 @@ void setClientArea (Rectangle rect) {
*/
@Override
public int hashCode () {
- return (int)/*64*/handle;
+ return (int)handle;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java
index a0f34b4525..f1ceb44ace 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java
@@ -130,8 +130,7 @@ public TrayItem [] getItems () {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TrayItem item = items [i];
+ for (TrayItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -150,8 +149,7 @@ void releaseParent () {
@Override
void reskinChildren (int flags) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TrayItem item = items [i];
+ for (TrayItem item : items) {
if (item != null) item.reskin (flags);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
index ea7eb3ba32..ccc5290de9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
@@ -1 +1 @@
-version 4.924 \ No newline at end of file
+version 4.952 \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java
index 09d34d3028..f37128e3b8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java
@@ -156,8 +156,7 @@ public TaskItem [] getItems () {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TaskItem item = items [i];
+ for (TaskItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -170,8 +169,7 @@ void releaseChildren (boolean destroy) {
@Override
void reskinChildren (int flags) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TaskItem item = items [i];
+ for (TaskItem item : items) {
if (item != null) item.reskin (flags);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java
index 43e2b52007..f6260f9427 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,14 +18,13 @@ import org.eclipse.swt.*;
import org.eclipse.swt.internal.gtk.*;
/**
- * Instances of this class manage the operating system resources that
- * implement SWT's RGB color model. To create a color you can either
+ * Instances of this store color information. To create a color you can either
* specify the individual color components as integers in the range
* 0 to 255 or provide an instance of an <code>RGB</code> or <code>RGBA</code>.
* <p>
- * Application code must explicitly invoke the <code>Color.dispose()</code>
- * method to release the operating system resources managed by each instance
- * when those instances are no longer required.
+ * Colors do not need to be disposed, however to maintain compatibility
+ * with older code, disposing a Color is not an error. As Colors do not require
+ * disposal, the constructors which do not require a Device are recommended.
* </p>
*
* @see RGB
@@ -51,6 +50,10 @@ public final class Color extends Resource {
public GdkRGBA handle;
int alpha = 0;
+Color() {
+ super();
+}
+
Color(Device device) {
super(device);
}
@@ -58,14 +61,7 @@ Color(Device device) {
/**
* Constructs a new instance of this class given a device and the
* desired red, green and blue values expressed as ints in the range
- * 0 to 255 (where 0 is black and 255 is full brightness). On limited
- * color devices, the color instance created by this call may not have
- * the same RGB values as the ones specified by the arguments. The
- * RGB values on the returned instance will be the color values of
- * the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
+ * 0 to 255 (where 0 is black and 255 is full brightness).
*
* @param device the device on which to allocate the color
* @param red the amount of red in the color
@@ -77,7 +73,7 @@ Color(Device device) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(int, int, int) The equivalent constructor not requiring a Device
*/
public Color(Device device, int red, int green, int blue) {
super(device);
@@ -86,16 +82,28 @@ public Color(Device device, int red, int green, int blue) {
}
/**
+ * Constructs a new instance of this class given the
+ * desired red, green and blue values expressed as ints in the range
+ * 0 to 255 (where 0 is black and 255 is full brightness).
+ *
+ * @param red the amount of red in the color
+ * @param green the amount of green in the color
+ * @param blue the amount of blue in the color
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
+ * </ul>
+ * @since 3.115
+ */
+public Color(int red, int green, int blue) {
+ super();
+ init(red, green, blue, 255);
+}
+
+/**
* Constructs a new instance of this class given a device and the
* desired red, green, blue &amp; alpha values expressed as ints in the range
- * 0 to 255 (where 0 is black and 255 is full brightness). On limited
- * color devices, the color instance created by this call may not have
- * the same RGB values as the ones specified by the arguments. The
- * RGB values on the returned instance will be the color values of
- * the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
+ * 0 to 255 (where 0 is black and 255 is full brightness).
*
* @param device the device on which to allocate the color
* @param red the amount of red in the color
@@ -108,7 +116,8 @@ public Color(Device device, int red, int green, int blue) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(int, int, int, int) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, int red, int green, int blue, int alpha) {
@@ -118,15 +127,29 @@ public Color(Device device, int red, int green, int blue, int alpha) {
}
/**
+ * Constructs a new instance of this class given the
+ * desired red, green, blue &amp; alpha values expressed as ints in the range
+ * 0 to 255 (where 0 is black and 255 is full brightness).
+ *
+ * @param red the amount of red in the color
+ * @param green the amount of green in the color
+ * @param blue the amount of blue in the color
+ * @param alpha the amount of alpha in the color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(int red, int green, int blue, int alpha) {
+ super();
+ init(red, green, blue, alpha);
+}
+
+/**
* Constructs a new instance of this class given a device and an
* <code>RGB</code> describing the desired red, green and blue values.
- * On limited color devices, the color instance created by this call
- * may not have the same RGB values as the ones specified by the
- * argument. The RGB values on the returned instance will be the color
- * values of the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgb the RGB values of the desired color
@@ -137,7 +160,7 @@ public Color(Device device, int red, int green, int blue, int alpha) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green or blue components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGB) The equivalent constructor not requiring a Device
*/
public Color(Device device, RGB rgb) {
super(device);
@@ -147,15 +170,26 @@ public Color(Device device, RGB rgb) {
}
/**
+ * Constructs a new instance of this class given an
+ * <code>RGB</code> describing the desired red, green and blue values.
+ *
+ * @param rgb the RGB values of the desired color
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgb argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green or blue components of the argument are not between 0 and 255</li>
+ * </ul>
+ * @since 3.115
+ */
+public Color(RGB rgb) {
+ super();
+ if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgb.red, rgb.green, rgb.blue, 255);
+}
+
+/**
* Constructs a new instance of this class given a device and an
* <code>RGBA</code> describing the desired red, green, blue &amp; alpha values.
- * On limited color devices, the color instance created by this call
- * may not have the same RGBA values as the ones specified by the
- * argument. The RGBA values on the returned instance will be the color
- * values of the operating system color + alpha.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgba the RGBA values of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
@@ -166,7 +200,8 @@ public Color(Device device, RGB rgb) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGBA) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, RGBA rgba) {
@@ -177,16 +212,28 @@ public Color(Device device, RGBA rgba) {
}
/**
+ * Constructs a new instance of this class given an
+ * <code>RGBA</code> describing the desired red, green, blue &amp; alpha values.
+ *
+ * @param rgba the RGBA values of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgba argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(RGBA rgba) {
+ super();
+ if (rgba == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgba.rgb.red, rgba.rgb.green, rgba.rgb.blue, rgba.alpha);
+}
+
+/**
* Constructs a new instance of this class given a device, an
* <code>RGB</code> describing the desired red, green and blue values,
* alpha specifying the level of transparency.
- * On limited color devices, the color instance created by this call
- * may not have the same RGB values as the ones specified by the
- * argument. The RGB values on the returned instance will be the color
- * values of the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgb the RGB values of the desired color
@@ -198,7 +245,8 @@ public Color(Device device, RGBA rgba) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGB, int) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, RGB rgb, int alpha) {
@@ -208,12 +256,68 @@ public Color(Device device, RGB rgb, int alpha) {
init();
}
+/**
+ * Constructs a new instance of this class given an
+ * <code>RGB</code> describing the desired red, green and blue values,
+ * alpha specifying the level of transparency.
+ *
+ * @param rgb the RGB values of the desired color
+ * @param alpha the alpha value of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgb argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(RGB rgb, int alpha) {
+ super();
+ if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgb.red, rgb.green, rgb.blue, alpha);
+}
+
@Override
void destroy() {
handle = null;
}
/**
+ * Colors do not need to be disposed, however to maintain compatibility
+ * with older code, disposing a Color is not an error.
+ */
+@Override
+public void dispose() {
+ // Does as below to maintain API contract with Resource. Does
+ // not use super.dispose() because that untracks the Color
+ // from the Device tracking, however init() is overridden
+ // to prevent the tracking in the first place.
+ destroy();
+ device = null;
+}
+
+/**
+ * Returns the <code>Device</code> where this resource was
+ * created. In cases where no <code>Device</code> was used
+ * at creation, returns the current or default Device.
+ *
+ * <p>
+ * As Color does not require a Device it is recommended to not
+ * use {@link Color#getDevice()}.
+ * </p>
+ *
+ * @return <code>Device</code> the device of the receiver
+ * @since 3.2
+ */
+@Override
+public Device getDevice() {
+ // Fall back on Device.getDevice only if we haven't been disposed
+ // already.
+ if (this.device == null && this.handle != null) return Device.getDevice();
+ return super.getDevice();
+}
+
+/**
* Compares the argument to the receiver, and returns true
* if they represent the <em>same</em> object using a class
* specific comparison.
@@ -228,11 +332,14 @@ public boolean equals(Object object) {
if (object == this) return true;
if (!(object instanceof Color)) return false;
Color color = (Color)object;
+ if (isDisposed() || color.isDisposed()) return false;
GdkRGBA gdkRGBA = color.handle;
if (handle == gdkRGBA) return true;
- return device == color.device && Double.compare(handle.red, gdkRGBA.red) == 0 &&
- Double.compare(handle.green, gdkRGBA.green) == 0 && Double.compare(handle.blue, gdkRGBA.blue) == 0 &&
- Double.compare(handle.alpha, gdkRGBA.alpha) == 0;
+ if (this.getRed() != color.getRed()) return false;
+ if (this.getGreen() != color.getGreen()) return false;
+ if (this.getBlue() != color.getBlue()) return false;
+ if (this.getAlpha() != color.getAlpha()) return false;
+ return true;
}
/**
@@ -261,7 +368,12 @@ public int getAlpha() {
*/
public int getBlue() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- return (int) (handle.blue * 255) & 0xFF;
+ /*
+ * Conversion formula comes from Cairo's _cairo_color_double_to_short()
+ * and color_to_pixel() functions. See bug 549181 and 549101 for more info.
+ */
+ int b = (((int)(handle.blue * 65535.0 + 0.5)) >> 8);
+ return Math.min(b, 255);
}
/**
@@ -275,7 +387,12 @@ public int getBlue() {
*/
public int getGreen() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- return (int) (handle.green * 255) & 0xFF;
+ /*
+ * Conversion formula comes from Cairo's _cairo_color_double_to_short()
+ * and color_to_pixel() functions. See bug 549181 and 549101 for more info.
+ */
+ int g = (((int)(handle.green * 65535.0 + 0.5)) >> 8);
+ return Math.min(g, 255);
}
/**
@@ -289,7 +406,12 @@ public int getGreen() {
*/
public int getRed() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- return (int) (handle.red * 255) & 0xFF;
+ /*
+ * Conversion formula comes from Cairo's _cairo_color_double_to_short()
+ * and color_to_pixel() functions. See bug 549181 and 549101 for more info.
+ */
+ int r = (((int)(handle.red * 65535.0 + 0.5)) >> 8);
+ return Math.min(r, 255);
}
/**
@@ -305,8 +427,7 @@ public int getRed() {
@Override
public int hashCode() {
if (isDisposed()) return 0;
- return Double.hashCode(handle.red) ^ Double.hashCode(handle.green) ^ Double.hashCode(handle.blue)
- ^ Double.hashCode(handle.alpha);
+ return (((this.getAlpha() * 31) + this.getGreen()) * 31 + this.getBlue()) * 31 + this.getRed();
}
/**
@@ -396,8 +517,6 @@ public static Color gtk_new(Device device, GdkRGBA gdkRGBA, int alpha) {
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
* </ul>
- *
- * @see #dispose
*/
void init(int red, int green, int blue, int alpha) {
if ((red > 255) || (red < 0) ||
@@ -415,6 +534,14 @@ void init(int red, int green, int blue, int alpha) {
handle = rgba;
}
+@Override
+void init() {
+ // Resource init simply tracks this resource in the Device
+ // if DEBUG is on. Since Colors don't require disposal,
+ // the tracking would be a memory leak and a misreport
+ // on what resources are in use.
+}
+
/**
* Returns <code>true</code> if the color has been disposed,
* and <code>false</code> otherwise.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java
index 2d938e40f9..d4894042a5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java
@@ -60,32 +60,6 @@ public final class Cursor extends Resource {
*/
public long handle;
- static final byte[] APPSTARTING_SRC = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
- 0x7c, 0x00, 0x00, 0x00, (byte)0xfc, 0x00, 0x00, 0x00, (byte)0xfc, 0x01, 0x00, 0x00,
- (byte)0xfc, 0x3b, 0x00, 0x00, 0x7c, 0x38, 0x00, 0x00, 0x6c, 0x54, 0x00, 0x00,
- (byte)0xc4, (byte)0xdc, 0x00, 0x00, (byte)0xc0, 0x44, 0x00, 0x00, (byte)0x80, 0x39, 0x00, 0x00,
- (byte)0x80, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
- static final byte[] APPSTARTING_MASK = {
- 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
- 0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
- (byte)0xfe, 0x00, 0x00, 0x00, (byte)0xfe, 0x01, 0x00, 0x00, (byte)0xfe, 0x3b, 0x00, 0x00,
- (byte)0xfe, 0x7f, 0x00, 0x00, (byte)0xfe, 0x7f, 0x00, 0x00, (byte)0xfe, (byte)0xfe, 0x00, 0x00,
- (byte)0xee, (byte)0xff, 0x01, 0x00, (byte)0xe4, (byte)0xff, 0x00, 0x00, (byte)0xc0, 0x7f, 0x00, 0x00,
- (byte)0xc0, 0x7f, 0x00, 0x00, (byte)0x80, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
Cursor (Device device) {
super(device);
}
@@ -138,81 +112,41 @@ Cursor (Device device) {
*/
public Cursor(Device device, int style) {
super(device);
- int shape = 0;
- byte[] name = null;
- if (GTK.GTK4) {
- switch (style) {
- case SWT.CURSOR_APPSTARTING: name = Converter.wcsToMbcs("progress", true) ; break;
- case SWT.CURSOR_ARROW: name = Converter.wcsToMbcs("default", true) ; break;
- case SWT.CURSOR_WAIT: name = Converter.wcsToMbcs("wait", true) ; break;
- case SWT.CURSOR_CROSS: name = Converter.wcsToMbcs("cell", true) ; break;
- case SWT.CURSOR_HAND: name = Converter.wcsToMbcs("pointer", true) ; break;
- case SWT.CURSOR_HELP: name = Converter.wcsToMbcs("help", true) ; break;
- case SWT.CURSOR_SIZEALL: name = Converter.wcsToMbcs("all-scroll", true) ; break;
- case SWT.CURSOR_SIZENESW: name = Converter.wcsToMbcs("nesw-resize", true); break;
- case SWT.CURSOR_SIZENS: name = Converter.wcsToMbcs("row-resize", true) ; break;
- case SWT.CURSOR_SIZENWSE: name = Converter.wcsToMbcs("nwse-resize", true); break;
- case SWT.CURSOR_SIZEWE: name = Converter.wcsToMbcs("col-resize", true); break;
- case SWT.CURSOR_SIZEN: name = Converter.wcsToMbcs("n-resize", true); break;
- case SWT.CURSOR_SIZES: name = Converter.wcsToMbcs("s-resize", true); break;
- case SWT.CURSOR_SIZEE: name = Converter.wcsToMbcs("e-resize", true); break;
- case SWT.CURSOR_SIZEW: name = Converter.wcsToMbcs("w-resize", true); break;
- case SWT.CURSOR_SIZENE: name = Converter.wcsToMbcs("ne-resize", true); break;
- case SWT.CURSOR_SIZESE: name = Converter.wcsToMbcs("se-resize", true); break;
- case SWT.CURSOR_SIZESW: name = Converter.wcsToMbcs("sw-resize", true); break;
- case SWT.CURSOR_SIZENW: name = Converter.wcsToMbcs("nw-resize", true); break;
- case SWT.CURSOR_UPARROW: name = Converter.wcsToMbcs("ns-resize", true); break;
- case SWT.CURSOR_IBEAM: name = Converter.wcsToMbcs("text", true); break;
- case SWT.CURSOR_NO: name = Converter.wcsToMbcs("not-allowed", true) ; break;
- default:
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- }
- } else {
- switch (style) {
- case SWT.CURSOR_APPSTARTING: name = Converter.wcsToMbcs("progress", true) ; break;
- case SWT.CURSOR_ARROW: shape = GDK.GDK_LEFT_PTR; break;
- case SWT.CURSOR_WAIT: shape = GDK.GDK_WATCH; break;
- case SWT.CURSOR_CROSS: shape = GDK.GDK_CROSS; break;
- case SWT.CURSOR_HAND: shape = GDK.GDK_HAND2; break;
- case SWT.CURSOR_HELP: shape = GDK.GDK_QUESTION_ARROW; break;
- case SWT.CURSOR_SIZEALL: shape = GDK.GDK_FLEUR; break;
- case SWT.CURSOR_SIZENESW: shape = GDK.GDK_SIZING; name=Converter.wcsToMbcs("nesw-resize", true); break;
- case SWT.CURSOR_SIZENS: shape = GDK.GDK_DOUBLE_ARROW; break;
- case SWT.CURSOR_SIZENWSE: shape = GDK.GDK_SIZING; name=Converter.wcsToMbcs("nwse-resize", true); break;
- case SWT.CURSOR_SIZEWE: shape = GDK.GDK_SB_H_DOUBLE_ARROW; break;
- case SWT.CURSOR_SIZEN: shape = GDK.GDK_TOP_SIDE; break;
- case SWT.CURSOR_SIZES: shape = GDK.GDK_BOTTOM_SIDE; break;
- case SWT.CURSOR_SIZEE: shape = GDK.GDK_RIGHT_SIDE; break;
- case SWT.CURSOR_SIZEW: shape = GDK.GDK_LEFT_SIDE; break;
- case SWT.CURSOR_SIZENE: shape = GDK.GDK_TOP_RIGHT_CORNER; break;
- case SWT.CURSOR_SIZESE: shape = GDK.GDK_BOTTOM_RIGHT_CORNER; break;
- case SWT.CURSOR_SIZESW: shape = GDK.GDK_BOTTOM_LEFT_CORNER; break;
- case SWT.CURSOR_SIZENW: shape = GDK.GDK_TOP_LEFT_CORNER; break;
- case SWT.CURSOR_UPARROW: shape = GDK.GDK_SB_UP_ARROW; break;
- case SWT.CURSOR_IBEAM: shape = GDK.GDK_XTERM; break;
- case SWT.CURSOR_NO: shape = GDK.GDK_X_CURSOR; name=Converter.wcsToMbcs("not-allowed", true) ; break;
- default:
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- }
+ String name1 = null, name2 = null;
+ switch (style) {
+ case SWT.CURSOR_APPSTARTING: name1 = "left_ptr_watch"; break;
+ case SWT.CURSOR_ARROW: name1 = "left_ptr"; break;
+ case SWT.CURSOR_WAIT: name1 = "watch"; break;
+ case SWT.CURSOR_CROSS: name1 = "crosshair"; break;
+ case SWT.CURSOR_HAND: name1 = "hand2"; break;
+ case SWT.CURSOR_HELP: name1 = "question_arrow"; break;
+ case SWT.CURSOR_SIZEALL: name1 = "fleur"; break;
+ case SWT.CURSOR_SIZENESW: name1 = "size_bdiag"; break;
+ case SWT.CURSOR_SIZENS: name1 = "sb_v_double_arrow"; break;
+ case SWT.CURSOR_SIZENWSE: name1 = "size_fdiag"; break;
+ case SWT.CURSOR_SIZEWE: name1 = "sb_h_double_arrow"; break;
+ case SWT.CURSOR_SIZEN: name1 = "top_side"; break;
+ case SWT.CURSOR_SIZES: name1 = "bottom_side"; break;
+ case SWT.CURSOR_SIZEE: name1 = "right_side"; break;
+ case SWT.CURSOR_SIZEW: name1 = "left_side"; break;
+ case SWT.CURSOR_SIZENE: name1 = "top_right_corner"; break;
+ case SWT.CURSOR_SIZESE: name1 = "bottom_right_corner"; break;
+ case SWT.CURSOR_SIZESW: name1 = "bottom_left_corner"; break;
+ case SWT.CURSOR_SIZENW: name1 = "top_left_corner"; break;
+ case SWT.CURSOR_UPARROW: name1 = "sb_up_arrow"; name2 = "up-arrow"; break;
+ case SWT.CURSOR_IBEAM: name1 = "xterm"; break;
+ case SWT.CURSOR_NO: name1 = "crossed_circle"; name2 = "not-allowed"; break;
+ default:
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- if (name != null) {
+ for (String name : new String[] { name1, name2, "left_ptr", "default" }) {
+ if (name == null) continue;
if (GTK.GTK4) {
- handle = GDK.gdk_cursor_new_from_name(name, 0);
+ handle = GDK.gdk_cursor_new_from_name (name, 0);
} else {
handle = GDK.gdk_cursor_new_from_name (GDK.gdk_display_get_default(), name);
}
- }
- if (handle == 0) {
- if (shape == 0 && style == SWT.CURSOR_APPSTARTING) {
- byte[] src = new byte[APPSTARTING_SRC.length];
- System.arraycopy(APPSTARTING_SRC, 0, src, 0, src.length);
- byte[] mask = new byte[APPSTARTING_MASK.length];
- System.arraycopy(APPSTARTING_MASK, 0, mask, 0, mask.length);
- handle = createCursor(src, mask, 32, 32, 2, 2, true);
- } else {
- if (!GTK.GTK4) handle = GDK.gdk_cursor_new_for_display(GDK.gdk_display_get_default(), shape);
- }
-
+ if (handle != 0) break;
}
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
init();
@@ -302,7 +236,7 @@ public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int
maskData[i] = (byte) ~maskData[i];
}
maskData = ImageData.convertPad(maskData, mask.width, mask.height, mask.depth, mask.scanlinePad, 1);
- handle = createCursor(maskData, sourceData, source.width, source.height, hotspotX, hotspotY, true);
+ handle = createCursor(sourceData, maskData, source.width, source.height, hotspotX, hotspotY, true);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
init();
}
@@ -343,8 +277,10 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
hotspotY >= source.height || hotspotY < 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- long display = 0;
- if (GDK.gdk_display_supports_cursor_color(display = GDK.gdk_display_get_default ())) {
+
+ long display = GDK.gdk_display_get_default();
+ boolean supportsColorCursor = GTK.GTK4 || GDK.gdk_display_supports_cursor_color(display);
+ if (supportsColorCursor) {
int width = source.width;
int height = source.height;
PaletteData palette = source.palette;
@@ -409,7 +345,14 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
}
}
C.memmove(data, buffer, stride * height);
- handle = GDK.gdk_cursor_new_from_pixbuf(display, pixbuf, hotspotX, hotspotY);
+
+ if (GTK.GTK4) {
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ handle = GDK.gdk_cursor_new_from_texture(texture, hotspotX, hotspotY, 0);
+ OS.g_object_unref(texture);
+ } else {
+ handle = GDK.gdk_cursor_new_from_pixbuf(display, pixbuf, hotspotX, hotspotY);
+ }
OS.g_object_unref(pixbuf);
} else {
@@ -543,14 +486,17 @@ long createCursor(byte[] sourceData, byte[] maskData, int width, int height, int
int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf);
long pixels = GDK.gdk_pixbuf_get_pixels(pixbuf);
C.memmove(pixels, data, stride * height);
+
long cursor;
if (GTK.GTK4) {
- long texture = GDK.gdk_texture_new_for_pixbuf (pixbuf);
- cursor = GDK.gdk_cursor_new_from_texture (texture, hotspotX, hotspotY, 0);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ cursor = GDK.gdk_cursor_new_from_texture(texture, hotspotX, hotspotY, 0);
+ OS.g_object_unref(texture);
} else {
cursor = GDK.gdk_cursor_new_from_pixbuf(GDK.gdk_display_get_default(), pixbuf, hotspotX, hotspotY);
}
OS.g_object_unref(pixbuf);
+
return cursor;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
index 66f7982e39..d20d5ff2cf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
@@ -22,6 +22,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* This class is the abstract superclass of all device objects,
@@ -97,13 +99,6 @@ public abstract class Device implements Drawable {
/* Device dpi */
Point dpi;
- /*Device Scale Factor in percentage*/
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @since 3.105
- */
- protected int scaleFactor;
-
long emptyTab;
/*
@@ -168,9 +163,7 @@ public Device(DeviceData data) {
tracking = data.tracking;
}
if (tracking) {
- errors = new Error [128];
- objects = new Object [128];
- trackingLock = new Object ();
+ startTracking();
}
create (data);
init ();
@@ -179,6 +172,51 @@ public Device(DeviceData data) {
}
/**
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * @since 3.115
+ */
+public boolean isTracking() {
+ checkDevice();
+ return tracking;
+}
+
+/**
+ * @exception SWTException <ul>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * @since 3.115
+ */
+public void setTracking(boolean tracking) {
+ checkDevice();
+ if (tracking == this.tracking) {
+ return;
+ }
+ this.tracking = tracking;
+ if (tracking) {
+ startTracking();
+ } else {
+ stopTracking();
+ }
+}
+
+private void startTracking() {
+ errors = new Error [128];
+ objects = new Object [128];
+ trackingLock = new Object ();
+}
+
+private void stopTracking() {
+ synchronized (trackingLock) {
+ objects = null;
+ errors = null;
+ trackingLock = null;
+ }
+}
+
+/**
* Throws an <code>SWTException</code> if the receiver can not
* be accessed by the caller. This may include both checks on
* the state of the receiver and more generally on the entire
@@ -231,18 +269,23 @@ protected void create (DeviceData data) {
*/
public void dispose () {
synchronized (Device.class) {
- if (isDisposed()) return;
- checkDevice ();
- release ();
- destroy ();
- deregister (this);
- xDisplay = 0;
- disposed = true;
- if (tracking) {
- synchronized (trackingLock) {
- objects = null;
- errors = null;
- trackingLock = null;
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ if (isDisposed ()) return;
+ checkDevice ();
+
+ try {
+ release ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+
+ destroy ();
+ deregister (this);
+ xDisplay = 0;
+ disposed = true;
+ if (tracking) {
+ tracking = false;
+ stopTracking ();
}
}
}
@@ -446,12 +489,12 @@ public FontData[] getFontList (String faceName, boolean scalable) {
match = faceName.equalsIgnoreCase(name);
}
if (match) {
- OS.pango_font_family_list_faces(family[0], faces, n_faces);
- for (int j=0; j<n_faces[0]; j++) {
- C.memmove(face, faces[0] + j * C.PTR_SIZEOF, C.PTR_SIZEOF);
- long fontDesc = OS.pango_font_face_describe(face[0]);
- Font font = Font.gtk_new(this, fontDesc);
- FontData data = font.getFontData()[0];
+ OS.pango_font_family_list_faces(family[0], faces, n_faces);
+ for (int j=0; j<n_faces[0]; j++) {
+ C.memmove(face, faces[0] + j * C.PTR_SIZEOF, C.PTR_SIZEOF);
+ long fontDesc = OS.pango_font_face_describe(face[0]);
+ Font font = Font.gtk_new(this, fontDesc);
+ FontData data = font.getFontData()[0];
if (nFds == fds.length) {
FontData[] newFds = new FontData[fds.length + n_families[0]];
System.arraycopy(fds, 0, newFds, 0, nFds);
@@ -459,9 +502,9 @@ public FontData[] getFontList (String faceName, boolean scalable) {
}
fds[nFds++] = data;
OS.pango_font_description_free(fontDesc);
- }
- OS.g_free(faces[0]);
- if (faceName != null) break;
+ }
+ OS.g_free(faces[0]);
+ if (faceName != null) break;
}
}
OS.g_free(families[0]);
@@ -473,21 +516,17 @@ public FontData[] getFontList (String faceName, boolean scalable) {
}
Point getScreenDPI () {
- int dpi = 96; //default value
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- long display = GDK.gdk_display_get_default();
- long pMonitor = GDK.gdk_display_get_primary_monitor(display);
- if (pMonitor == 0) {
- pMonitor = GDK.gdk_display_get_monitor(display, 0);
- }
- int widthMM = GDK.gdk_monitor_get_width_mm(pMonitor);
- if (widthMM == 0) return new Point (dpi, dpi);
- int scaleFactor = GDK.gdk_monitor_get_scale_factor(pMonitor);
- GdkRectangle monitorGeometry = new GdkRectangle ();
- GDK.gdk_monitor_get_geometry(pMonitor, monitorGeometry);
- dpi = Compatibility.round (254 * monitorGeometry.width * scaleFactor, widthMM * 10);
+ Point ptDPI;
+
+ if (GTK.GTK4) {
+ ptDPI = new Point (96, 96);
+ } else {
+ long screen = GDK.gdk_screen_get_default();
+ int dpi = (int) GDK.gdk_screen_get_resolution(screen);
+ ptDPI = dpi == -1 ? new Point (96, 96) : new Point (dpi, dpi);
}
- return new Point (dpi, dpi);
+
+ return ptDPI;
}
/**
@@ -586,10 +625,6 @@ public boolean getWarnings () {
* @see #create
*/
protected void init () {
- this.dpi = getDPI();
- this.scaleFactor = getDeviceZoom ();
- DPIUtil.setDeviceZoom (scaleFactor);
-
if (debug) {
if (xDisplay != 0) {
/* Create the warning and error callbacks */
@@ -603,10 +638,8 @@ protected void init () {
if (index == Devices.length) {
XErrorCallback = new Callback (clazz, "XErrorProc", 2);
XNullErrorProc = XErrorCallback.getAddress ();
- if (XNullErrorProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
XIOErrorCallback = new Callback (clazz, "XIOErrorProc", 1);
XNullIOErrorProc = XIOErrorCallback.getAddress ();
- if (XNullIOErrorProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
XErrorProc = OS.XSetErrorHandler (XNullErrorProc);
XIOErrorProc = OS.XSetIOErrorHandler (XNullIOErrorProc);
}
@@ -619,7 +652,6 @@ protected void init () {
if (xDisplay != 0) {
logCallback = new Callback (this, "logProc", 4);
logProc = logCallback.getAddress ();
- if (logProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Set GTK warning and error handlers */
if (debug) {
@@ -632,32 +664,39 @@ protected void init () {
}
/* Create the standard colors */
- COLOR_TRANSPARENT = new Color (this, 0xFF,0xFF,0xFF,0);
- COLOR_BLACK = new Color (this, 0,0,0);
- COLOR_DARK_RED = new Color (this, 0x80,0,0);
- COLOR_DARK_GREEN = new Color (this, 0,0x80,0);
- COLOR_DARK_YELLOW = new Color (this, 0x80,0x80,0);
- COLOR_DARK_BLUE = new Color (this, 0,0,0x80);
- COLOR_DARK_MAGENTA = new Color (this, 0x80,0,0x80);
- COLOR_DARK_CYAN = new Color (this, 0,0x80,0x80);
- COLOR_GRAY = new Color (this, 0xC0,0xC0,0xC0);
- COLOR_DARK_GRAY = new Color (this, 0x80,0x80,0x80);
- COLOR_RED = new Color (this, 0xFF,0,0);
- COLOR_GREEN = new Color (this, 0,0xFF,0);
- COLOR_YELLOW = new Color (this, 0xFF,0xFF,0);
- COLOR_BLUE = new Color (this, 0,0,0xFF);
- COLOR_MAGENTA = new Color (this, 0xFF,0,0xFF);
- COLOR_CYAN = new Color (this, 0,0xFF,0xFF);
- COLOR_WHITE = new Color (this, 0xFF,0xFF,0xFF);
+ COLOR_TRANSPARENT = new Color (0xFF, 0xFF,0xFF,0);
+ COLOR_BLACK = new Color (0, 0,0);
+ COLOR_DARK_RED = new Color (0x80, 0,0);
+ COLOR_DARK_GREEN = new Color (0, 0x80,0);
+ COLOR_DARK_YELLOW = new Color (0x80, 0x80,0);
+ COLOR_DARK_BLUE = new Color (0, 0,0x80);
+ COLOR_DARK_MAGENTA = new Color (0x80, 0,0x80);
+ COLOR_DARK_CYAN = new Color (0, 0x80,0x80);
+ COLOR_GRAY = new Color (0xC0, 0xC0,0xC0);
+ COLOR_DARK_GRAY = new Color (0x80, 0x80,0x80);
+ COLOR_RED = new Color (0xFF, 0,0);
+ COLOR_GREEN = new Color (0, 0xFF,0);
+ COLOR_YELLOW = new Color (0xFF, 0xFF,0);
+ COLOR_BLUE = new Color (0, 0,0xFF);
+ COLOR_MAGENTA = new Color (0xFF, 0,0xFF);
+ COLOR_CYAN = new Color (0, 0xFF,0xFF);
+ COLOR_WHITE = new Color (0xFF, 0xFF,0xFF);
emptyTab = OS.pango_tab_array_new(1, false);
if (emptyTab == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.pango_tab_array_set_tab(emptyTab, 0, OS.PANGO_TAB_LEFT, 1);
- shellHandle = GTK.gtk_window_new(GTK.GTK_WINDOW_TOPLEVEL);
+ if (GTK.GTK4) {
+ shellHandle = GTK4.gtk_window_new();
+ } else {
+ shellHandle = GTK3.gtk_window_new (GTK.GTK_WINDOW_TOPLEVEL);
+ }
if (shellHandle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
GTK.gtk_widget_realize(shellHandle);
+ this.dpi = getDPI();
+ DPIUtil.setDeviceZoom (getDeviceZoom ());
+
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
double sx[] = new double[1];
double sy[] = new double[1];
@@ -670,28 +709,36 @@ protected void init () {
surface = GDK.gdk_window_create_similar_surface(gdkResource, Cairo.CAIRO_CONTENT_COLOR, 10, 10);
}
Cairo.cairo_surface_get_device_scale(surface, sx, sy);
- DPIUtil.setUseCairoAutoScale((sx[0]*100) == scaleFactor);
+ DPIUtil.setUseCairoAutoScale((sx[0]*100) == DPIUtil.getDeviceZoom() || OS.isGNOME);
}
/* Initialize the system font slot */
long [] defaultFontArray = new long [1];
- long defaultFont;
+ long defaultFont = 0;
long context = GTK.gtk_widget_get_style_context (shellHandle);
if ("ppc64le".equals(System.getProperty("os.arch"))) {
- defaultFont = GTK.gtk_style_context_get_font (context, GTK.GTK_STATE_FLAG_NORMAL);
- } else if (GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
- GTK.gtk_style_context_save(context);
- GTK.gtk_style_context_set_state(context, GTK.GTK_STATE_FLAG_NORMAL);
+ defaultFont = GTK3.gtk_style_context_get_font (context, GTK.GTK_STATE_FLAG_NORMAL);
+ } else {
if (GTK.GTK4) {
- GTK.gtk_style_context_get(context, GTK.gtk_style_property_font, defaultFontArray, 0);
+ long[] fontPtr = new long[1];
+ long settings = GTK.gtk_settings_get_default ();
+ OS.g_object_get (settings, GTK.gtk_style_property_font, fontPtr, 0);
+ if (fontPtr[0] != 0) {
+ int length = C.strlen(fontPtr[0]);
+ if (length != 0) {
+ byte[] fontString = new byte [length + 1];
+ C.memmove(fontString, fontPtr[0], length);
+ OS.g_free(fontPtr[0]);
+ defaultFont = OS.pango_font_description_from_string(fontString);
+ }
+ }
} else {
- GTK.gtk_style_context_get(context, GTK.GTK_STATE_FLAG_NORMAL, GTK.gtk_style_property_font, defaultFontArray, 0);
+ GTK.gtk_style_context_save(context);
+ GTK.gtk_style_context_set_state(context, GTK.GTK_STATE_FLAG_NORMAL);
+ GTK3.gtk_style_context_get(context, GTK.GTK_STATE_FLAG_NORMAL, GTK.gtk_style_property_font, defaultFontArray, 0);
+ GTK.gtk_style_context_restore(context);
+ defaultFont = defaultFontArray [0];
}
- GTK.gtk_style_context_restore(context);
- defaultFont = defaultFontArray [0];
- } else {
- GTK.gtk_style_context_get(context, GTK.GTK_STATE_FLAG_NORMAL, GTK.gtk_style_property_font, defaultFontArray, 0);
- defaultFont = defaultFontArray [0];
}
defaultFont = OS.pango_font_description_copy (defaultFont);
Point dpi = getDPI(), screenDPI = getScreenDPI();
@@ -740,12 +787,10 @@ private void overrideThemeValues () {
StringBuilder combinedCSS = new StringBuilder();
- // Load functional CSS fixes. Such as keyboard functionality for some widgets.
- combinedCSS.append(load.apply(
- GTK.GTK_VERSION < OS.VERSION(3, 20, 0) ?
- "/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css" :
- "/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css"
- , true));
+ if (!GTK.GTK4) {
+ // Load functional CSS fixes. Such as keyboard functionality for some widgets.
+ combinedCSS.append(load.apply("/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css", true));
+ }
// By default, load CSS theme fixes to overcome things such as excessive padding that breaks SWT otherwise.
// Initially designed for Adwaita light/dark theme, but after investigation other themes (like Ubuntu's Ambiance + dark) seem to benefit from this also.
@@ -756,16 +801,15 @@ private void overrideThemeValues () {
// - These fixes should not contain any color information, otherwise it might break a light/dark variant of the theme.
// Color fixes should be put either into the theme itself or via swt user api.
if (System.getProperty("org.eclipse.swt.internal.gtk.noThemingFixes") == null) {
- combinedCSS.append(load.apply(
- GTK.GTK_VERSION < OS.VERSION(3, 20, 0) ?
- "/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css" :
- "/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css"
- , true));
+ combinedCSS.append(load.apply("/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css", true));
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 24, 5)) {
+ combinedCSS.append(load.apply("/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css", true));
+ }
}
// Load CSS from user-defined CSS file.
String additionalCSSPath = System.getProperty("org.eclipse.swt.internal.gtk.cssFile");
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && additionalCSSPath != null){
+ if (additionalCSSPath != null){
// Warning:
// - gtk css syntax changed in 3.20. If you load custom css, it could break things depending on gtk version on system.
// - Also, a lot of custom css/themes are buggy and may result in additional console warnings.
@@ -778,19 +822,19 @@ private void overrideThemeValues () {
System.err.println("SWT Warning: Override of theme values failed. Reason: could not acquire display or provider.");
return;
}
- GTK.gtk_style_context_add_provider_for_display (display, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ GTK4.gtk_style_context_add_provider_for_display (display, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
} else {
long screen = GDK.gdk_screen_get_default();
if (screen == 0 || provider == 0) {
System.err.println("SWT Warning: Override of theme values failed. Reason: could not acquire screen or provider.");
return;
}
- GTK.gtk_style_context_add_provider_for_screen (screen, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ GTK3.gtk_style_context_add_provider_for_screen (screen, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (combinedCSS.toString(), true), -1);
+ GTK4.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (combinedCSS.toString(), true), -1);
} else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (combinedCSS.toString(), true), -1, null);
+ GTK3.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (combinedCSS.toString(), true), -1, null);
}
}
@@ -939,29 +983,19 @@ static synchronized void register (Device device) {
* @see #destroy
*/
protected void release () {
- if (shellHandle != 0) GTK.gtk_widget_destroy(shellHandle);
+ if (shellHandle != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(shellHandle);
+ } else {
+ GTK3.gtk_widget_destroy(shellHandle);
+ }
+ }
shellHandle = 0;
/* Dispose the default font */
if (systemFont != null) systemFont.dispose ();
systemFont = null;
- if (COLOR_BLACK != null) COLOR_BLACK.dispose();
- if (COLOR_DARK_RED != null) COLOR_DARK_RED.dispose();
- if (COLOR_DARK_GREEN != null) COLOR_DARK_GREEN.dispose();
- if (COLOR_DARK_YELLOW != null) COLOR_DARK_YELLOW.dispose();
- if (COLOR_DARK_BLUE != null) COLOR_DARK_BLUE.dispose();
- if (COLOR_DARK_MAGENTA != null) COLOR_DARK_MAGENTA.dispose();
- if (COLOR_DARK_CYAN != null) COLOR_DARK_CYAN.dispose();
- if (COLOR_GRAY != null) COLOR_GRAY.dispose();
- if (COLOR_DARK_GRAY != null) COLOR_DARK_GRAY.dispose();
- if (COLOR_RED != null) COLOR_RED.dispose();
- if (COLOR_GREEN != null) COLOR_GREEN.dispose();
- if (COLOR_YELLOW != null) COLOR_YELLOW.dispose();
- if (COLOR_BLUE != null) COLOR_BLUE.dispose();
- if (COLOR_MAGENTA != null) COLOR_MAGENTA.dispose();
- if (COLOR_CYAN != null) COLOR_CYAN.dispose();
- if (COLOR_WHITE != null) COLOR_WHITE.dispose();
COLOR_BLACK = COLOR_DARK_RED = COLOR_DARK_GREEN = COLOR_DARK_YELLOW = COLOR_DARK_BLUE =
COLOR_DARK_MAGENTA = COLOR_DARK_CYAN = COLOR_GRAY = COLOR_DARK_GRAY = COLOR_RED =
COLOR_GREEN = COLOR_YELLOW = COLOR_BLUE = COLOR_MAGENTA = COLOR_CYAN = COLOR_WHITE = null;
@@ -1063,15 +1097,6 @@ static long XIOErrorProc (long xDisplay) {
}
/**
- * Returns DPI in x direction. In the modern monitors DPI for
- * X and Y directions is same.
- *
- * @return the horizontal DPI
- */
-int _getDPIx () {
- return scaleFactor * 96/100;
-}
-/**
* Gets the scaling factor from the device and calculates the zoom level.
* @return zoom in percentage
*
@@ -1087,7 +1112,15 @@ protected int getDeviceZoom() {
int dpi = 96;
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
long display = GDK.gdk_display_get_default();
- long monitor = GDK.gdk_display_get_monitor_at_point(display, 0, 0);
+ long monitor;
+
+ if (GTK.GTK4) {
+ long surface = GTK4.gtk_native_get_surface(GTK4.gtk_widget_get_native(shellHandle));
+ monitor = GDK.gdk_display_get_monitor_at_surface(display, surface);
+ } else {
+ monitor = GDK.gdk_display_get_monitor_at_point(display, 0, 0);
+ }
+
int scale = GDK.gdk_monitor_get_scale_factor(monitor);
dpi = dpi * scale;
} else {
@@ -1098,20 +1131,8 @@ protected int getDeviceZoom() {
int scale = GDK.gdk_screen_get_monitor_scale_factor (screen, monitor_num);
dpi = dpi * scale;
}
+
return DPIUtil.mapDPIToZoom (dpi);
}
-/**
- * @noreference This method is not intended to be referenced by clients.
- * @nooverride This method is not intended to be re-implemented or extended by clients.
- * @since 3.105
- */
-protected long gsettingsProc (long gobject, long arg1, long user_data) {
- switch((int)user_data) {
- case CHANGE_SCALEFACTOR:
- this.scaleFactor = getDeviceZoom ();
- DPIUtil.setDeviceZoom (scaleFactor);
- }
- return 0;
-}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java
index 21e63f974e..30b80fa930 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java
@@ -233,6 +233,12 @@ public FontData[] getFontData() {
public static Font gtk_new(Device device, long handle) {
Font font = new Font(device);
font.handle = handle;
+ /*
+ * When created this way, Font doesn't own its .handle, and
+ * for this reason it can't be disposed. Tell leak detector
+ * to just ignore it.
+ */
+ font.ignoreNonDisposed();
return font;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java
index cbf707d4a6..3b762e9429 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -122,26 +122,6 @@ public int getLeading() {
}
/**
- * Invokes platform specific functionality to allocate a new font metrics.
- * <p>
- * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- * API for <code>FontMetrics</code>. It is marked public only so that
- * it can be shared within the packages provided by SWT. It is not
- * available on all platforms, and should never be called from
- * application code.
- * </p>
- *
- * @noreference This method is not intended to be referenced by clients.
- */
-public static FontMetrics gtk_new(int ascentInPoints, int descentInPoints, int averageCharWidthInPoints) {
- FontMetrics fontMetrics = new FontMetrics();
- fontMetrics.ascentInPoints = ascentInPoints;
- fontMetrics.descentInPoints = descentInPoints;
- fontMetrics.averageCharWidthInPoints = averageCharWidthInPoints;
- return fontMetrics;
-}
-
-/**
* Returns an integer hash code for the receiver. Any two
* objects that return <code>true</code> when passed to
* <code>equals</code> must return the same value for this
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index 61386eda38..7c31f411c0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -13,6 +13,8 @@
*******************************************************************************/
package org.eclipse.swt.graphics;
+import java.util.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
@@ -178,15 +180,27 @@ public GC(Drawable drawable, int style) {
if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
GCData data = new GCData();
data.style = checkStyle(style);
- long gdkGC = drawable.internal_new_GC(data);
Device device = data.device;
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
this.device = data.device = device;
+
+ long gdkGC = drawable.internal_new_GC(data);
init(drawable, data, gdkGC);
init();
}
+/**
+ * Ensure that the style specified is either LEFT_TO_RIGHT <b>or</b> RIGHT_TO_LEFT.
+ *
+ * @param style the SWT style bit string
+ * @return If only one style is specified, it is return unmodified. If both styles are specified, returns LEFT_TO_RIGHT
+ */
+int checkStyle(int style) {
+ if ((style & SWT.LEFT_TO_RIGHT) != 0) style &= ~SWT.RIGHT_TO_LEFT;
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
static void addCairoString(long cairo, String string, float x, float y, Font font) {
byte[] buffer = Converter.wcsToMbcs(string, true);
long layout = OS.pango_cairo_create_layout(cairo);
@@ -202,11 +216,6 @@ static void addCairoString(long cairo, String string, float x, float y, Font fon
OS.g_object_unref(layout);
}
-static int checkStyle (int style) {
- if ((style & SWT.LEFT_TO_RIGHT) != 0) style &= ~SWT.RIGHT_TO_LEFT;
- return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
-}
-
/**
* Convenience method that applies a region to the Control using cairo_clip.
*
@@ -557,7 +566,8 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
srcRect.height = height;
long invalidateRegion = Cairo.cairo_region_create_rectangle (srcRect);
if (GTK.GTK4) {
- GDK.gdk_surface_invalidate_region(drawable, invalidateRegion);
+ /* TODO: GTK4 no ability to invalidate surfaces, may need to keep track of
+ * invalid regions ourselves and do gdk_surface_queue_expose */
} else {
long visibleRegion = GDK.gdk_window_get_visible_region (drawable);
long copyRegion = Cairo.cairo_region_create_rectangle (srcRect);
@@ -571,7 +581,7 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
Cairo.cairo_region_destroy (invalidateRegion);
}
}
- if (data.image == null & paint) {
+ if (data.image == null && paint) {
boolean disjoint = (destX + width < srcX) || (srcX + width < destX) || (destY + height < srcY) || (srcY + height < destY);
GdkRectangle rect = new GdkRectangle ();
if (disjoint) {
@@ -580,7 +590,8 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
rect.width = Math.max (0, width);
rect.height = Math.max (0, height);
if (GTK.GTK4) {
- GDK.gdk_surface_invalidate_rect (drawable, rect);
+ /* TODO: GTK4 no ability to invalidate surfaces, may need to keep track of
+ * invalid regions ourselves and do gdk_surface_queue_expose */
} else {
GDK.gdk_window_invalidate_rect (drawable, rect, false);
}
@@ -593,7 +604,8 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
rect.width = Math.abs(deltaX);
rect.height = Math.max (0, height);
if (GTK.GTK4) {
- GDK.gdk_surface_invalidate_rect (drawable, rect);
+ /* TODO: GTK4 no ability to invalidate surfaces, may need to keep track of
+ * invalid regions ourselves and do gdk_surface_queue_expose */
} else {
GDK.gdk_window_invalidate_rect (drawable, rect, false);
}
@@ -606,7 +618,8 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
rect.width = Math.max (0, width);
rect.height = Math.abs(deltaY);
if (GTK.GTK4) {
- GDK.gdk_surface_invalidate_rect (drawable, rect);
+ /* TODO: GTK4 no ability to invalidate surfaces, may need to keep track of
+ * invalid regions ourselves and do gdk_surface_queue_expose */
} else {
GDK.gdk_window_invalidate_rect (drawable, rect, false);
}
@@ -719,20 +732,20 @@ void drawArcInPixels(int x, int y, int width, int height, int startAngle, int ar
long cairo = data.cairo;
double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset;
if (width == height) {
- if (arcAngle >= 0) {
- Cairo.cairo_arc_negative(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- } else {
- Cairo.cairo_arc(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- }
+ if (arcAngle >= 0) {
+ Cairo.cairo_arc_negative(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ } else {
+ Cairo.cairo_arc(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ }
} else {
Cairo.cairo_save(cairo);
Cairo.cairo_translate(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f);
Cairo.cairo_scale(cairo, width / 2f, height / 2f);
- if (arcAngle >= 0) {
- Cairo.cairo_arc_negative(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- } else {
- Cairo.cairo_arc(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- }
+ if (arcAngle >= 0) {
+ Cairo.cairo_arc_negative(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ } else {
+ Cairo.cairo_arc(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ }
Cairo.cairo_restore(cairo);
}
Cairo.cairo_stroke(cairo);
@@ -837,9 +850,8 @@ public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeig
}
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- Rectangle srcRect = DPIUtil.autoScaleUp(drawable, new Rectangle(srcX, srcY, srcWidth, srcHeight));
Rectangle destRect = DPIUtil.autoScaleUp(drawable, new Rectangle(destX, destY, destWidth, destHeight));
- drawImage(image, srcRect.x, srcRect.y, srcRect.width, srcRect.height, destRect.x, destRect.y, destRect.width, destRect.height, false);
+ drawImage(image, srcX, srcY, srcWidth, srcHeight, destRect.x, destRect.y, destRect.width, destRect.height, false);
}
void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple) {
/* Refresh Image as per zoom level, if required. */
@@ -847,17 +859,17 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
int imgWidth = srcImage.width;
int imgHeight = srcImage.height;
- if (simple) {
- srcWidth = destWidth = imgWidth;
- srcHeight = destHeight = imgHeight;
- } else {
- simple = srcX == 0 && srcY == 0 &&
- srcWidth == destWidth && destWidth == imgWidth &&
- srcHeight == destHeight && destHeight == imgHeight;
+ if (simple) {
+ srcWidth = destWidth = imgWidth;
+ srcHeight = destHeight = imgHeight;
+ } else {
+ simple = srcX == 0 && srcY == 0 &&
+ srcWidth == destWidth && destWidth == imgWidth &&
+ srcHeight == destHeight && destHeight == imgHeight;
if (srcX + srcWidth > imgWidth + 1 || srcY + srcHeight > imgHeight + 1) { //rounding error correction for hidpi
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- }
+ }
long cairo = data.cairo;
if (data.alpha != 0) {
srcImage.createSurface();
@@ -1238,10 +1250,10 @@ void drawRoundRectangleInPixels(int x, int y, int width, int height, int arcWidt
Cairo.cairo_translate(cairo, nx + xOffset, ny + yOffset);
Cairo.cairo_scale(cairo, naw2, nah2);
Cairo.cairo_move_to(cairo, fw - 1, 0);
- Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
- Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
- Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
- Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
+ Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
+ Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
+ Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
+ Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
Cairo.cairo_close_path(cairo);
Cairo.cairo_restore(cairo);
}
@@ -1254,6 +1266,10 @@ void drawRoundRectangleInPixels(int x, int y, int width, int height, int arcWidt
* will be performed. The background of the rectangular area where
* the string is being drawn will be filled with the receiver's
* background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn
@@ -1282,6 +1298,13 @@ void drawStringInPixels (String string, int x, int y) {
* then the background of the rectangular area where the string is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different:
+ * <ul>
+ * <li>{@link #drawString} is faster (depends on string size)<br>~7x for 1-char strings<br>~4x for 10-char strings<br>~2x for 100-char strings</li>
+ * <li>{@link #drawString} doesn't try to find a good fallback font when character doesn't have a glyph in currently selected font</li>
+ * </ul>
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn
@@ -1312,6 +1335,10 @@ void drawStringInPixels(String string, int x, int y, boolean isTransparent) {
* are performed. The background of the rectangular area where
* the text is being drawn will be filled with the receiver's
* background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -1338,6 +1365,10 @@ void drawTextInPixels(String string, int x, int y) {
* then the background of the rectangular area where the text is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -1369,6 +1400,11 @@ void drawTextInPixels(String string, int x, int y, boolean isTransparent) {
* then the background of the rectangular area where the text is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
+ *
* <p>
* The parameter <code>flags</code> may be a combination of:
* </p>
@@ -1498,11 +1534,11 @@ void fillArcInPixels(int x, int y, int width, int height, int startAngle, int ar
if (width == 0 || height == 0 || arcAngle == 0) return;
long cairo = data.cairo;
if (width == height) {
- if (arcAngle >= 0) {
- Cairo.cairo_arc_negative(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- } else {
- Cairo.cairo_arc(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- }
+ if (arcAngle >= 0) {
+ Cairo.cairo_arc_negative(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ } else {
+ Cairo.cairo_arc(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ }
Cairo.cairo_line_to(cairo, x + width / 2f, y + height / 2f);
} else {
Cairo.cairo_save(cairo);
@@ -1837,10 +1873,10 @@ void fillRoundRectangleInPixels(int x, int y, int width, int height, int arcWidt
Cairo.cairo_translate(cairo, nx, ny);
Cairo.cairo_scale(cairo, naw2, nah2);
Cairo.cairo_move_to(cairo, fw - 1, 0);
- Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
- Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
- Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
- Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
+ Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
+ Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
+ Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
+ Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
Cairo.cairo_close_path(cairo);
Cairo.cairo_restore(cairo);
}
@@ -1948,8 +1984,8 @@ public int getAlpha() {
*/
public int getAntialias() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- if (data.cairo == 0) return SWT.DEFAULT;
- int antialias = Cairo.cairo_get_antialias(data.cairo);
+ if (data.cairo == 0) return SWT.DEFAULT;
+ int antialias = Cairo.cairo_get_antialias(data.cairo);
switch (antialias) {
case Cairo.CAIRO_ANTIALIAS_DEFAULT: return SWT.DEFAULT;
case Cairo.CAIRO_ANTIALIAS_NONE: return SWT.OFF;
@@ -2053,23 +2089,56 @@ Rectangle getClippingInPixels() {
/* Intersect visible bounds with clipping */
if (clipRgn != 0) {
/* Convert clipping to device space if needed */
- if (data.clippingTransform != null && GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) {
- clipRgn = convertRgn(clipRgn, data.clippingTransform);
+ if (!Arrays.equals(data.clippingTransform, currentTransform)) {
+ double[] clippingTransform;
+ if (currentTransform != null && data.clippingTransform == null) {
+ /*
+ * User actions in this case are:
+ * 1. Set clipping.
+ * 2. Set a transformation B.
+ *
+ * The clipping was specified before transformation B was set.
+ * So to convert it to the new space, we just invert the transformation B.
+ */
+ clippingTransform = currentTransform.clone();
+ Cairo.cairo_matrix_invert(clippingTransform);
+ } else if (currentTransform != null && data.clippingTransform != null) {
+ /*
+ * User actions in this case are:
+ * 1. Set a transformation A.
+ * 2. Set clipping.
+ * 3. Set a different transformation B. This is global and wipes out transformation A.
+ *
+ * Since step 3. wipes out transformation A, we must apply A on the clipping rectangle to have
+ * the correct clipping rectangle after transformation A is wiped.
+ * Then, we apply the inverted transformation B on the resulting clipping,
+ * to convert it to the new space (which results after applying B).
+ */
+ clippingTransform = new double[6];
+ double[] invertedCurrentTransform = currentTransform.clone();
+ Cairo.cairo_matrix_invert(invertedCurrentTransform);
+ Cairo.cairo_matrix_multiply(clippingTransform, data.clippingTransform, invertedCurrentTransform);
+ } else {
+ /*
+ * User actions in this case are:
+ * 1. Set a transformation A.
+ * 2. Set clipping.
+ * 3. Wipe the transformation A (i.e. call GC.setTransformation(A)).
+ *
+ * We must apply transformation A on the clipping, to convert it to the new space.
+ */
+ clippingTransform = data.clippingTransform.clone();
+ }
+ long oldRgn = rgn;
+ rgn = convertRgn(rgn, clippingTransform);
+ Cairo.cairo_region_destroy(oldRgn);
+ clipRgn = convertRgn(clipRgn, clippingTransform);
Cairo.cairo_region_intersect(rgn, clipRgn);
Cairo.cairo_region_destroy(clipRgn);
} else {
Cairo.cairo_region_intersect(rgn, clipRgn);
}
}
- /* Convert to user space */
- if (cairo != 0 && GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) {
- double[] matrix = new double[6];
- Cairo.cairo_get_matrix(cairo, matrix);
- Cairo.cairo_matrix_invert(matrix);
- clipRgn = convertRgn(rgn, matrix);
- Cairo.cairo_region_destroy(rgn);
- rgn = clipRgn;
- }
Cairo.cairo_region_get_extents(rgn, rect);
Cairo.cairo_region_destroy(rgn);
x = rect.x;
@@ -2100,7 +2169,6 @@ public void getClipping(Region region) {
if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
long clipping = region.handle;
Cairo.cairo_region_subtract(clipping, clipping);
- long cairo = data.cairo;
long clipRgn = data.clipRgn;
if (clipRgn == 0) {
cairo_rectangle_int_t rect = new cairo_rectangle_int_t();
@@ -2110,28 +2178,11 @@ public void getClipping(Region region) {
rect.height = height[0];
Cairo.cairo_region_union_rectangle(clipping, rect);
} else {
- /* Convert clipping to device space if needed */
- if (data.clippingTransform != null && GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) {
- long rgn = convertRgn(clipRgn, data.clippingTransform);
- Cairo.cairo_region_union(clipping, rgn);
- Cairo.cairo_region_destroy(rgn);
- } else {
- Cairo.cairo_region_union(clipping, clipRgn);
- }
+ Cairo.cairo_region_union(clipping, clipRgn);
}
if (data.damageRgn != 0) {
Cairo.cairo_region_intersect(clipping, data.damageRgn);
}
- /* Convert to user space */
- if (cairo != 0 && GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) {
- double[] matrix = new double[6];
- Cairo.cairo_get_matrix(cairo, matrix);
- Cairo.cairo_matrix_invert(matrix);
- long rgn = convertRgn(clipping, matrix);
- Cairo.cairo_region_subtract(clipping, clipping);
- Cairo.cairo_region_union(clipping, rgn);
- Cairo.cairo_region_destroy(rgn);
- }
}
/**
@@ -2467,9 +2518,9 @@ void getSize(int[] width, int[] height) {
* @since 3.1
*/
public int getTextAntialias() {
- if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- if (data.cairo == 0) return SWT.DEFAULT;
- int antialias = Cairo.CAIRO_ANTIALIAS_DEFAULT;
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (data.cairo == 0) return SWT.DEFAULT;
+ int antialias = Cairo.CAIRO_ANTIALIAS_DEFAULT;
if (data.context != 0) {
long options = OS.pango_cairo_context_get_font_options(data.context);
if (options != 0) antialias = Cairo.cairo_font_options_get_antialias(options);
@@ -2512,17 +2563,10 @@ public void getTransform(Transform transform) {
* They do not want to know about the global coordinates of their widget, which is contained in Cairo.cairo_get_matrix().
* So we return whatever the client specified with setTransform.
*/
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- if (currentTransform != null) {
- transform.handle = currentTransform.clone();
- } else {
- transform.handle = new double[] { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
- }
+ if (currentTransform != null) {
+ transform.handle = currentTransform.clone();
} else {
- Cairo.cairo_get_matrix(cairo, transform.handle);
- double[] identity = identity();
- Cairo.cairo_matrix_invert(identity);
- Cairo.cairo_matrix_multiply(transform.handle, transform.handle, identity);
+ transform.handle = new double[] { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
}
} else {
transform.setElements(1, 0, 0, 1, 0, 0);
@@ -2606,14 +2650,10 @@ void init(Drawable drawable, GCData data, long gdkGC) {
initCairo();
if ((data.style & SWT.MIRRORED) != 0) {
// Don't overwrite the Cairo transformation matrix in GTK 3.14 and above; it contains a translation relative to the parent widget.
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- int[] w = new int[1], h = new int[1];
- getSize(w, h);
- Cairo.cairo_translate(cairo, w[0], 0);
- Cairo.cairo_scale(cairo, -1.0, 1.0);
- } else {
- Cairo.cairo_set_matrix(data.cairo, identity());
- }
+ int[] w = new int[1], h = new int[1];
+ getSize(w, h);
+ Cairo.cairo_translate(cairo, w[0], 0);
+ Cairo.cairo_scale(cairo, -1.0, 1.0);
}
if (cairoTransformationMatrix == null) cairoTransformationMatrix = new double[6];
Cairo.cairo_get_matrix(data.cairo, cairoTransformationMatrix);
@@ -2623,16 +2663,11 @@ void init(Drawable drawable, GCData data, long gdkGC) {
void initCairo() {
long cairo = data.cairo;
if (cairo != 0) return;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- long surface;
- if (GTK.GTK4) {
- surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_A8, data.width, data.height);
- } else {
- surface = GDK.gdk_window_create_similar_surface(data.drawable, Cairo.CAIRO_CONTENT_COLOR_ALPHA, data.width, data.height);
- }
+ if (GTK.GTK4) {
+ long surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_A8, data.width, data.height);
data.cairo = cairo = Cairo.cairo_create(surface);
} else {
- data.cairo = cairo = GDK.gdk_cairo_create(data.drawable);
+ data.cairo = cairo = Cairo.cairo_create(data.drawable);
}
if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
data.disposeCairo = true;
@@ -2807,13 +2842,13 @@ public void setAntialias(int antialias) {
case SWT.DEFAULT: mode = Cairo.CAIRO_ANTIALIAS_DEFAULT; break;
case SWT.OFF: mode = Cairo.CAIRO_ANTIALIAS_NONE; break;
case SWT.ON: mode = Cairo.CAIRO_ANTIALIAS_GRAY;
- break;
+ break;
default:
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- initCairo();
- long cairo = data.cairo;
- Cairo.cairo_set_antialias(cairo, mode);
+ initCairo();
+ long cairo = data.cairo;
+ Cairo.cairo_set_antialias(cairo, mode);
}
/**
@@ -2929,9 +2964,7 @@ void setCairoClip(long damageRgn, long clipRgn) {
* The Cairo handle is shared by all widgets, but GC.setClipping allows global clipping changes.
* So we intersect whatever the client sets with the initial GC clipping.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- limitClipping(clipRgnCopy);
- }
+ limitClipping(clipRgnCopy);
setCairoRegion(cairo, clipRgnCopy);
Cairo.cairo_clip(cairo);
@@ -3032,7 +3065,6 @@ private static Rectangle getTransformedClippingRectangle(int[] pointsArray) {
}
void setClipping(long clipRgn) {
- long cairo = data.cairo;
if (clipRgn == 0) {
if (data.clipRgn != 0) {
Cairo.cairo_region_destroy(data.clipRgn);
@@ -3044,9 +3076,11 @@ void setClipping(long clipRgn) {
if (data.clipRgn == 0) data.clipRgn = Cairo.cairo_region_create();
Cairo.cairo_region_subtract(data.clipRgn, data.clipRgn);
Cairo.cairo_region_union(data.clipRgn, clipRgn);
- if (GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) {
- if (data.clippingTransform == null) data.clippingTransform = new double[6];
- Cairo.cairo_get_matrix(cairo, data.clippingTransform);
+ if (currentTransform != null) {
+ // store the current transformation, to use it when the user requests clipping bounds
+ data.clippingTransform = currentTransform.clone();
+ } else {
+ data.clippingTransform = null;
}
setCairoClip(data.damageRgn, clipRgn);
}
@@ -3157,17 +3191,13 @@ void setClippingInPixels(Rectangle rect) {
}
private void resetClipping() {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- /*
- * Bug 531667: widgets paint over other widgets
- *
- * The Cairo handle is shared by all widgets, and GC.setClipping(0) allows painting outside the current GC area.
- * So if we reset any custom clipping we still want to restrict GC operations with the initial GC clipping.
- */
- setClipping(clipping);
- } else {
- setClipping(0);
- }
+ /*
+ * Bug 531667: widgets paint over other widgets
+ *
+ * The Cairo handle is shared by all widgets, and GC.setClipping(0) allows painting outside the current GC area.
+ * So if we reset any custom clipping we still want to restrict GC operations with the initial GC clipping.
+ */
+ setClipping(clipping);
}
/**
@@ -3708,23 +3738,23 @@ void setString(String string, int flags) {
* @since 3.1
*/
public void setTextAntialias(int antialias) {
- if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.cairo == 0 && antialias == SWT.DEFAULT) return;
int mode = 0;
switch (antialias) {
case SWT.DEFAULT: mode = Cairo.CAIRO_ANTIALIAS_DEFAULT; break;
case SWT.OFF: mode = Cairo.CAIRO_ANTIALIAS_NONE; break;
case SWT.ON: mode = Cairo.CAIRO_ANTIALIAS_GRAY;
- break;
+ break;
default:
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- initCairo();
- long options = Cairo.cairo_font_options_create();
- Cairo.cairo_font_options_set_antialias(options, mode);
+ initCairo();
+ long options = Cairo.cairo_font_options_create();
+ Cairo.cairo_font_options_set_antialias(options, mode);
if (data.context == 0) createLayout();
OS.pango_cairo_context_set_font_options(data.context, options);
- Cairo.cairo_font_options_destroy(options);
+ Cairo.cairo_font_options_destroy(options);
}
/**
@@ -3759,25 +3789,17 @@ public void setTransform(Transform transform) {
if (data.cairo == 0 && transform == null) return;
initCairo();
long cairo = data.cairo;
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- // Re-set the original Cairo transformation matrix: it contains a translation relative to the parent widget.
- if (currentTransform != null) {
- Cairo.cairo_set_matrix(cairo, cairoTransformationMatrix);
- currentTransform = null;
- }
- // Apply user transform on top of the current transformation matrix (and remember it)
- if (transform != null) {
- currentTransform = transform.handle.clone();
- double[] transformMatrix = identity();
- Cairo.cairo_matrix_multiply(transformMatrix, transform.handle, transformMatrix);
- Cairo.cairo_transform(cairo, transformMatrix);
- }
- } else {
- double[] identity = identity();
- if (transform != null) {
- Cairo.cairo_matrix_multiply(identity, transform.handle, identity);
- }
- Cairo.cairo_set_matrix(cairo, identity);
+ // Re-set the original Cairo transformation matrix: it contains a translation relative to the parent widget.
+ if (currentTransform != null) {
+ Cairo.cairo_set_matrix(cairo, cairoTransformationMatrix);
+ currentTransform = null;
+ }
+ // Apply user transform on top of the current transformation matrix (and remember it)
+ if (transform != null) {
+ currentTransform = transform.handle.clone();
+ double[] transformMatrix = identity();
+ Cairo.cairo_matrix_multiply(transformMatrix, transform.handle, transformMatrix);
+ Cairo.cairo_transform(cairo, transformMatrix);
}
data.state &= ~DRAW_OFFSET;
}
@@ -3789,21 +3811,13 @@ public void setTransform(Transform transform) {
* and the destination, and if the argument is <code>false</code>,
* puts the receiver in a drawing mode where the destination color
* is replaced with the source color value.
- * <p>
- * Note that this mode in fundamentally unsupportable on certain
- * platforms. Clients that want their
- * code to run on all platforms need to avoid this method.
- * </p>
*
* @param xor if <code>true</code>, then <em>xor</em> mode is used, otherwise <em>source copy</em> mode is used
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
- *
- * @deprecated this functionality is not supported on some platforms
*/
-@Deprecated
public void setXORMode(boolean xor) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
Cairo.cairo_set_operator(handle, xor ? Cairo.CAIRO_OPERATOR_DIFFERENCE : Cairo.CAIRO_OPERATOR_OVER);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
index f1e3372130..5504562dc0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
@@ -126,16 +126,6 @@ public final class Image extends Resource implements Drawable {
GC memGC;
/**
- * The alpha data of the image.
- */
- byte[] alphaData;
-
- /**
- * The global alpha value to be used for every pixel.
- */
- int alpha = -1;
-
- /**
* The width of the image.
*/
int width = -1;
@@ -276,11 +266,6 @@ public Image(Device device, Image srcImage, int flag) {
this.currentDeviceZoom = srcImage.currentDeviceZoom;
if (flag != SWT.IMAGE_DISABLE) transparentPixel = srcImage.transparentPixel;
- alpha = srcImage.alpha;
- if (srcImage.alphaData != null) {
- alphaData = new byte[srcImage.alphaData.length];
- System.arraycopy(srcImage.alphaData, 0, alphaData, 0, alphaData.length);
- }
long imageSurface = srcImage.surface;
int width = this.width = srcImage.width;
@@ -310,16 +295,6 @@ public Image(Device device, Image srcImage, int flag) {
}
switch (flag) {
case SWT.IMAGE_DISABLE: {
- Color zeroColor = device.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
- RGB zeroRGB = zeroColor.getRGB();
- int zeroRed = zeroRGB.red;
- int zeroGreen = zeroRGB.green;
- int zeroBlue = zeroRGB.blue;
- Color oneColor = device.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
- RGB oneRGB = oneColor.getRGB();
- int oneRed = oneRGB.red;
- int oneGreen = oneRGB.green;
- int oneBlue = oneRGB.blue;
byte[] line = new byte[stride];
for (int y=0; y<height; y++) {
C.memmove(line, data + (y * stride), stride);
@@ -328,33 +303,10 @@ public Image(Device device, Image srcImage, int flag) {
int r = line[offset + or] & 0xFF;
int g = line[offset + og] & 0xFF;
int b = line[offset + ob] & 0xFF;
- if (hasAlpha && a != 0) {
- r = ((r * 0xFF) + a / 2) / a;
- g = ((g * 0xFF) + a / 2) / a;
- b = ((b * 0xFF) + a / 2) / a;
- }
- int intensity = r * r + g * g + b * b;
- if (intensity < 98304) {
- r = zeroRed;
- g = zeroGreen;
- b = zeroBlue;
- } else {
- r = oneRed;
- g = oneGreen;
- b = oneBlue;
- }
- if (hasAlpha) {
- /* pre-multiplied alpha */
- r = (r * a) + 128;
- r = (r + (r >> 8)) >> 8;
- g = (g * a) + 128;
- g = (g + (g >> 8)) >> 8;
- b = (b * a) + 128;
- b = (b + (b >> 8)) >> 8;
- }
- line[offset + or] = (byte)r;
- line[offset + og] = (byte)g;
- line[offset + ob] = (byte)b;
+ line[offset + oa] = (byte) Math.round((double) a * 0.5);
+ line[offset + or] = (byte) Math.round((double) r * 0.5);
+ line[offset + og] = (byte) Math.round((double) g * 0.5);
+ line[offset + ob] = (byte) Math.round((double) b * 0.5);
}
C.memmove(data + (y * stride), line, stride);
}
@@ -656,7 +608,8 @@ public Image(Device device, ImageFileNameProvider imageFileNameProvider) {
boolean[] found = new boolean[1];
String filename = DPIUtil.validateAndGetImagePathAtZoom (imageFileNameProvider, currentDeviceZoom, found);
if (found[0]) {
- initNative (filename);
+ initNative(filename);
+
if (this.surface == 0) {
ImageData data = new ImageData(filename);
init(data);
@@ -714,6 +667,21 @@ public Image(Device device, ImageDataProvider imageDataProvider) {
}
/**
+ * Refreshes the image for the current device scale factor.
+ * <p>
+ * <b>IMPORTANT:</b> This function is <em>not</em> part of the SWT
+ * public API. It is marked public only so that it can be shared
+ * within the packages provided by SWT. It is not available on all
+ * platforms and should never be used from application code.
+ * </p>
+ *
+ * @noreference This function is not intended to be referenced by clients.
+ */
+public boolean internal_gtk_refreshImageForZoom() {
+ return refreshImageForZoom();
+}
+
+/**
* Refresh the Image based on the zoom level, if required.
*
* @return true if image is refreshed
@@ -773,15 +741,17 @@ boolean refreshImageForZoom () {
currentDeviceZoom = deviceZoomLevel;
}
} else {
- int deviceZoomLevel = deviceZoom;
- if (deviceZoomLevel != currentDeviceZoom) {
- ImageData data = getImageDataAtCurrentZoom();
- destroy ();
- ImageData resizedData = DPIUtil.autoScaleImageData(device, data, deviceZoomLevel, currentDeviceZoom);
- init(resizedData);
- init();
- refreshed = true;
- currentDeviceZoom = deviceZoomLevel;
+ if (!DPIUtil.useCairoAutoScale()) {
+ int deviceZoomLevel = deviceZoom;
+ if (deviceZoomLevel != currentDeviceZoom) {
+ ImageData data = getImageDataAtCurrentZoom();
+ destroy ();
+ ImageData resizedData = DPIUtil.autoScaleImageData(device, data, deviceZoomLevel, currentDeviceZoom);
+ init(resizedData);
+ init();
+ refreshed = true;
+ currentDeviceZoom = deviceZoomLevel;
+ }
}
}
return refreshed;
@@ -789,16 +759,13 @@ boolean refreshImageForZoom () {
void initNative(String filename) {
try {
- int length = filename.length ();
- char [] chars = new char [length];
- filename.getChars (0, length, chars, 0);
- byte [] buffer = Converter.wcsToMbcs(chars, true);
- long pixbuf = GDK.gdk_pixbuf_new_from_file(buffer, null);
+ byte[] fileNameBuffer = Converter.javaStringToCString(filename);
+ long pixbuf = GDK.gdk_pixbuf_new_from_file(fileNameBuffer, null);
if (pixbuf != 0) {
try {
- createFromPixbuf (SWT.BITMAP, pixbuf);
+ createFromPixbuf(SWT.BITMAP, pixbuf);
} finally {
- if (pixbuf != 0) OS.g_object_unref (pixbuf);
+ if (pixbuf != 0) OS.g_object_unref(pixbuf);
}
}
} catch (SWTException e) {}
@@ -806,18 +773,25 @@ void initNative(String filename) {
void createFromPixbuf(int type, long pixbuf) {
this.type = type;
- boolean hasAlpha = GDK.gdk_pixbuf_get_has_alpha(pixbuf);
- int width = this.width = GDK.gdk_pixbuf_get_width(pixbuf);
- int height = this.height = GDK.gdk_pixbuf_get_height(pixbuf);
+
+ int pixbufWidth = GDK.gdk_pixbuf_get_width(pixbuf);
+ int pixbufHeight = GDK.gdk_pixbuf_get_height(pixbuf);
+
+ // Scale dimensions of Image object to 100% scale factor
+ double scaleFactor = DPIUtil.getDeviceZoom() / 100f;
+ this.width = pixbufWidth / (int) scaleFactor;
+ this.height = pixbufHeight / (int) scaleFactor;
+
int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf);
long pixels = GDK.gdk_pixbuf_get_pixels(pixbuf);
+ boolean hasAlpha = GDK.gdk_pixbuf_get_has_alpha(pixbuf);
int format = hasAlpha ? Cairo.CAIRO_FORMAT_ARGB32 : Cairo.CAIRO_FORMAT_RGB24;
- surface = Cairo.cairo_image_surface_create(format, width, height);
+
+ // Initialize surface with dimensions received from the pixbuf and set device_scale appropriately
+ surface = Cairo.cairo_image_surface_create(format, pixbufWidth, pixbufHeight);
if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- if (DPIUtil.useCairoAutoScale()) {
- double scaleFactor = DPIUtil.getDeviceZoom() / 100f;
- Cairo.cairo_surface_set_device_scale(surface, scaleFactor, scaleFactor);
- }
+ if (DPIUtil.useCairoAutoScale()) Cairo.cairo_surface_set_device_scale(surface, scaleFactor, scaleFactor);
+
long data = Cairo.cairo_image_surface_get_data(surface);
int cairoStride = Cairo.cairo_image_surface_get_stride(surface);
int oa = 0, or = 0, og = 0, ob = 0;
@@ -828,10 +802,9 @@ void createFromPixbuf(int type, long pixbuf) {
}
byte[] line = new byte[stride];
if (hasAlpha) {
- alphaData = new byte[width * height];
- for (int y = 0, alphaOffset = 0; y < height; y++) {
+ for (int y = 0; y < pixbufHeight; y++) {
C.memmove(line, pixels + (y * stride), stride);
- for (int x = 0, offset = 0; x < width; x++, offset += 4) {
+ for (int x = 0, offset = 0; x < pixbufWidth; x++, offset += 4) {
int a = line[offset + 3] & 0xFF;
int r = ((line[offset + 0] & 0xFF) * a) + 128;
r = (r + (r >> 8)) >> 8;
@@ -843,15 +816,14 @@ void createFromPixbuf(int type, long pixbuf) {
line[offset + or] = (byte)r;
line[offset + og] = (byte)g;
line[offset + ob] = (byte)b;
- alphaData[alphaOffset++] = (byte)a;
}
C.memmove(data + (y * stride), line, stride);
}
} else {
byte[] cairoLine = new byte[cairoStride];
- for (int y = 0; y < height; y++) {
+ for (int y = 0; y < pixbufHeight; y++) {
C.memmove(line, pixels + (y * stride), stride);
- for (int x = 0, offset = 0, cairoOffset = 0; x < width; x++, offset += 3, cairoOffset += 4) {
+ for (int x = 0, offset = 0, cairoOffset = 0; x < pixbufWidth; x++, offset += 3, cairoOffset += 4) {
int r = line[offset + 0] & 0xFF;
int g = line[offset + 1] & 0xFF;
int b = line[offset + 2] & 0xFF;
@@ -993,7 +965,7 @@ public Color getBackground() {
*/
public Rectangle getBounds() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- return DPIUtil.autoScaleBounds(getBoundsInPixels(), 100, currentDeviceZoom);
+ return DPIUtil.autoScaleDown(getBoundsInPixels());
}
/**
@@ -1236,7 +1208,7 @@ public int hashCode () {
if (imageDataProvider != null) {
return imageDataProvider.hashCode();
} else if (imageFileNameProvider != null) {
- return imageFileNameProvider.hashCode();
+ return imageFileNameProvider.hashCode();
} else {
return (int)surface;
}
@@ -1275,20 +1247,29 @@ void init(int width, int height) {
void init(ImageData image) {
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- int width = this.width = image.width;
- int height = this.height = image.height;
+
PaletteData palette = image.palette;
if (!(((image.depth == 1 || image.depth == 2 || image.depth == 4 || image.depth == 8) && !palette.isDirect) ||
- ((image.depth == 8) || (image.depth == 16 || image.depth == 24 || image.depth == 32) && palette.isDirect)))
- SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
+ ((image.depth == 8) || (image.depth == 16 || image.depth == 24 || image.depth == 32) && palette.isDirect))) {
+ SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
+ }
+
+ int imageDataWidth = image.width;
+ int imageDataHeight = image.height;
+
+ // Scale dimensions of Image object to 100% scale factor
+ double scaleFactor = DPIUtil.getDeviceZoom() / 100f;
+ this.width = imageDataWidth / (int) scaleFactor;
+ this.height = imageDataHeight / (int) scaleFactor;
+
boolean hasAlpha = image.transparentPixel != -1 || image.alpha != -1 || image.maskData != null || image.alphaData != null;
int format = hasAlpha ? Cairo.CAIRO_FORMAT_ARGB32 : Cairo.CAIRO_FORMAT_RGB24;
- surface = Cairo.cairo_image_surface_create(format, width, height);
+
+ // Initialize surface with dimensions received from the ImageData and set device_scale appropriately
+ surface = Cairo.cairo_image_surface_create(format, imageDataWidth, imageDataHeight);
if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- if (DPIUtil.useCairoAutoScale()) {
- double scaleFactor = DPIUtil.getDeviceZoom() / 100f;
- Cairo.cairo_surface_set_device_scale(surface, scaleFactor, scaleFactor);
- }
+ if (DPIUtil.useCairoAutoScale()) Cairo.cairo_surface_set_device_scale(surface, scaleFactor, scaleFactor);
+
int stride = Cairo.cairo_image_surface_get_stride(surface);
long data = Cairo.cairo_image_surface_get_data(surface);
int oa = 0, or = 0, og = 0, ob = 0;
@@ -1308,12 +1289,12 @@ void init(ImageData image) {
}
byte[] buffer = image.data;
if (!palette.isDirect || image.depth != destDepth || stride != image.bytesPerLine || palette.redMask != redMask || palette.greenMask != greenMask || palette.blueMask != blueMask || destOrder != image.getByteOrder()) {
- buffer = new byte[stride * height];
+ buffer = new byte[stride * imageDataHeight];
if (palette.isDirect) {
ImageData.blit(ImageData.BLIT_SRC,
- image.data, image.depth, image.bytesPerLine, image.getByteOrder(), 0, 0, width, height, palette.redMask, palette.greenMask, palette.blueMask,
+ image.data, image.depth, image.bytesPerLine, image.getByteOrder(), 0, 0, imageDataWidth, imageDataHeight, palette.redMask, palette.greenMask, palette.blueMask,
ImageData.ALPHA_OPAQUE, null, 0, 0, 0,
- buffer, destDepth, stride, destOrder, 0, 0, width, height, redMask, greenMask, blueMask,
+ buffer, destDepth, stride, destOrder, 0, 0, imageDataWidth, imageDataHeight, redMask, greenMask, blueMask,
false, false);
} else {
RGB[] rgbs = palette.getRGBs();
@@ -1329,9 +1310,9 @@ void init(ImageData image) {
srcBlues[i] = (byte)rgb.blue;
}
ImageData.blit(ImageData.BLIT_SRC,
- image.data, image.depth, image.bytesPerLine, image.getByteOrder(), 0, 0, width, height, srcReds, srcGreens, srcBlues,
+ image.data, image.depth, image.bytesPerLine, image.getByteOrder(), 0, 0, imageDataWidth, imageDataHeight, srcReds, srcGreens, srcBlues,
ImageData.ALPHA_OPAQUE, null, 0, 0, 0,
- buffer, destDepth, stride, destOrder, 0, 0, width, height, redMask, greenMask, blueMask,
+ buffer, destDepth, stride, destOrder, 0, 0, imageDataWidth, imageDataHeight, redMask, greenMask, blueMask,
false, false);
}
}
@@ -1352,8 +1333,8 @@ void init(ImageData image) {
}
}
ImageData mask = image.getTransparencyMask();
- for (int y = 0, offset = 0; y < height; y++) {
- for (int x=0; x<width; x++, offset += 4) {
+ for (int y = 0, offset = 0; y < imageDataHeight; y++) {
+ for (int x=0; x<imageDataWidth; x++, offset += 4) {
int alpha = mask.getPixel(x, y) == 0 ? 0 : 0xff;
/* pre-multiplied alpha */
int r = ((buffer[offset + or] & 0xFF) * alpha) + 128;
@@ -1369,15 +1350,10 @@ void init(ImageData image) {
}
}
} else {
- this.alpha = image.alpha;
- if (image.alpha == -1 && image.alphaData != null) {
- this.alphaData = new byte[image.alphaData.length];
- System.arraycopy(image.alphaData, 0, this.alphaData, 0, alphaData.length);
- }
- if (this.alpha != -1) {
- for (int y = 0, offset = 0; y < height; y++) {
- for (int x=0; x<width; x++, offset += 4) {
- int alpha = this.alpha;
+ if (image.alpha != -1) {
+ int alpha = image.alpha;
+ for (int y = 0, offset = 0; y < imageDataHeight; y++) {
+ for (int x=0; x<imageDataWidth; x++, offset += 4) {
/* pre-multiplied alpha */
int r = ((buffer[offset + or] & 0xFF) * alpha) + 128;
r = (r + (r >> 8)) >> 8;
@@ -1391,10 +1367,11 @@ void init(ImageData image) {
buffer[offset + ob] = (byte)b;
}
}
- } else if (this.alphaData != null) {
- for (int y = 0, offset = 0; y < height; y++) {
- for (int x=0; x<width; x++, offset += 4) {
- int alpha = alphaData [y*width+x] & 0xFF;
+ } else if (image.alphaData != null) {
+ byte[] alphaData = image.alphaData;
+ for (int y = 0, offset = 0; y < imageDataHeight; y++) {
+ for (int x=0; x<imageDataWidth; x++, offset += 4) {
+ int alpha = alphaData [y*imageDataWidth+x] & 0xFF;
/* pre-multiplied alpha */
int r = ((buffer[offset + or] & 0xFF) * alpha) + 128;
r = (r + (r >> 8)) >> 8;
@@ -1410,7 +1387,7 @@ void init(ImageData image) {
}
}
}
- C.memmove(data, buffer, stride * height);
+ C.memmove(data, buffer, stride * imageDataHeight);
Cairo.cairo_surface_mark_dirty(surface);
}
@@ -1540,6 +1517,11 @@ public void setBackground(Color color) {
@Override
public String toString () {
if (isDisposed()) return "Image {*DISPOSED*}";
+
+ if (imageFileNameProvider != null) {
+ return "Image {" + imageFileNameProvider.getImagePath(100) + "}";
+ }
+
return "Image {" + surface + "}";
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/ImageLoader.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/ImageLoader.java
index a7542f5fd7..7a0f7aee60 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/ImageLoader.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/ImageLoader.java
@@ -17,10 +17,13 @@ package org.eclipse.swt.graphics;
import java.io.*;
import java.util.*;
+import java.util.List;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.image.*;
+import org.eclipse.swt.widgets.*;
/**
* Instances of this class are used to load images from,
@@ -175,16 +178,12 @@ boolean isInterlacedPNG(byte [] imageAsByteArray) {
}
ImageData [] getImageDataArrayFromStream(InputStream stream) {
- byte[] buffer = new byte[2048];
long loader = GDK.gdk_pixbuf_loader_new();
- int length;
List<ImageData> imgDataList = new ArrayList<>();
try {
// 1) Load InputStream into byte array
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- while ((length = stream.read(buffer)) > -1) {
- baos.write(buffer, 0, length);
- }
+ stream.transferTo(baos);
baos.flush();
byte[] data_buffer = baos.toByteArray();
if (data_buffer.length == 0) SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT); // empty stream
@@ -192,7 +191,20 @@ ImageData [] getImageDataArrayFromStream(InputStream stream) {
// 2) Copy byte array to C memory, write to GdkPixbufLoader
long buffer_ptr = OS.g_malloc(data_buffer.length);
C.memmove(buffer_ptr, data_buffer, data_buffer.length);
- GDK.gdk_pixbuf_loader_write(loader, buffer_ptr, data_buffer.length, null);
+ long [] error = new long [1];
+ GDK.gdk_pixbuf_loader_write(loader, buffer_ptr, data_buffer.length, error);
+ if(error[0] != 0) {
+ /* Bug 576484
+ * It is safe just to assume if this fails it is most likely an IO error
+ * since unsupported format is checked before, and invalid image right after.
+ * Still, check if it belongs to the G_FILE_ERROR domain and IO error code
+ */
+ if(OS.g_error_matches(error[0], OS.g_file_error_quark(), OS.G_FILE_ERROR_IO)){
+ SWT.error(SWT.ERROR_IO, null, Display.extractFreeGError(error[0]));
+ } else {
+ OS.g_error_free(error[0]);
+ }
+ }
GDK.gdk_pixbuf_loader_close(loader, null);
// 3) Get GdkPixbufAnimation from loader
@@ -337,12 +349,14 @@ int getImageFormat(long loader) {
long format = GDK.gdk_pixbuf_loader_get_format(loader);
long name = GDK.gdk_pixbuf_format_get_name(format);
String nameStr = Converter.cCharPtrToJavaString(name, false);
+ OS.g_free(name);
switch (nameStr) {
case "bmp": return SWT.IMAGE_BMP;
case "gif": return SWT.IMAGE_GIF;
case "ico": return SWT.IMAGE_ICO;
case "jpeg": return SWT.IMAGE_JPEG;
case "png": return SWT.IMAGE_PNG;
+ case "svg": return SWT.IMAGE_SVG;
default: return SWT.IMAGE_UNDEFINED;
}
}
@@ -439,8 +453,6 @@ static long gdk_pixbuf_new_from_file(String filename) {
* <dd>JPEG file format</dd>
* <dt><code>IMAGE_PNG</code></dt>
* <dd>PNG file format</dd>
- * <dt><code>IMAGE_TIFF</code></dt>
- * <dd>TIFF file format</dd>
* </dl>
*
* @param stream the output stream to write the images to
@@ -461,48 +473,84 @@ public void save(OutputStream stream, int format) {
if (this.data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
ImageData imgData = this.data [0];
int colorspace = GDK.GDK_COLORSPACE_RGB;
- boolean has_alpha = imgData.alphaData != null;
+ boolean alpha_supported = format == SWT.IMAGE_TIFF || format == SWT.IMAGE_PNG || format == SWT.IMAGE_ICO;
+ boolean has_alpha = imgData.alphaData != null && alpha_supported;
int width = imgData.width;
int height = imgData.height;
- int n_channels = imgData.bytesPerLine / width; // original n_channels 3 or 4
- int bytes_per_pixel = imgData.bytesPerLine / width; // n_channels for original ImageData (width * height * bytes_per_pixel) = imgData.length
-
- if (has_alpha && bytes_per_pixel == 3) {
- // Original is RGB -> we want RGBA
- bytes_per_pixel += 1;
+ // original n_channels. Native implementation will only be used in case of 3 or 4
+ int n_channels = imgData.bytesPerLine / width;
+
+ // Native implementation only supports a subset of possible image configurations.
+ // Redirect the not supported variants to the Java implementation.
+ // See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=558043
+ if (!imgData.palette.isDirect || n_channels < 3 || n_channels > 4) {
+ FileFormat.save(stream, format, this);
+ return;
}
- int oa, or, og, ob;
- if (OS.BIG_ENDIAN) {
- oa = 0; or = 1; og = 2; ob = 3;
- } else {
- oa = 3; or = 2; og = 1; ob = 0;
+
+ /*
+ * Destination offsets, GdkPixbuf data is stored in RGBA format.
+ */
+ int da = 3; int dr = 0; int dg = 1; int db = 2;
+
+ /*
+ * ImageData offsets. These can vary depending on how the ImageData.data
+ * field was populated. In most cases it will be RGB format, so this case
+ * is assumed (blue shift is 0).
+ *
+ * If blue is negatively shifted, then we are dealing with BGR byte ordering, so
+ * adjust the offsets accordingly.
+ */
+ int or = 0; int og = 1; int ob = 2;
+ PaletteData palette = imgData.palette;
+ if (palette.isDirect && palette.blueShift < 0) {
+ or = 2;
+ og = 1;
+ ob = 0;
}
+
+ // We use alpha by default now so all images saved are 32 bit, if there is no alpha we set it to 255
+ int bytes_per_pixel = 4;
byte[] srcData = new byte[(width * height * bytes_per_pixel)];
+ int alpha_offset = n_channels == 4 ? 1 : 0;
if (has_alpha) {
- for (int y = 0, offset = 0, new_offset = 0, alphaOffset = 0; y < height; y++) {
+ for (int y = 0, offset = 0, new_offset = 0, alphaIndex = 0; y < height; y++) {
for (int x = 0; x < width; x++, offset += n_channels, new_offset += bytes_per_pixel) {
- byte a = imgData.alphaData[alphaOffset++];
- int offset_alpha = n_channels == 4 ? 1 : 0;
- byte r = imgData.data[offset + offset_alpha + 0];
- byte g = imgData.data[offset + offset_alpha + 1];
- byte b = imgData.data[offset + offset_alpha + 2];
-
- srcData[new_offset + ob] = b;
- srcData[new_offset + og] = g;
- srcData[new_offset + or] = r;
- srcData[new_offset + oa] = a;
+ byte a = imgData.alphaData[alphaIndex++];
+ byte r = imgData.data[offset + alpha_offset + or];
+ byte g = imgData.data[offset + alpha_offset + og];
+ byte b = imgData.data[offset + alpha_offset + ob];
+
+ // GdkPixbuf expects RGBA format
+ srcData[new_offset + db] = b;
+ srcData[new_offset + dg] = g;
+ srcData[new_offset + dr] = r;
+ srcData[new_offset + da] = a;
}
}
} else {
- srcData = imgData.data;
+ for (int y = 0, offset = 0, new_offset = 0; y < height; y++) {
+ for (int x = 0; x < width; x++, offset += n_channels, new_offset += bytes_per_pixel) {
+ byte r = imgData.data[offset + alpha_offset + or];
+ byte g = imgData.data[offset + alpha_offset + og];
+ byte b = imgData.data[offset + alpha_offset + ob];
+ byte a = (byte) 255;
+
+ srcData[new_offset + db] = b;
+ srcData[new_offset + dg] = g;
+ srcData[new_offset + dr] = r;
+ srcData[new_offset + da] = a;
+ }
+ }
}
// Get GdkPixbuf from pixel data buffer
long buffer_ptr = OS.g_malloc(srcData.length);
C.memmove(buffer_ptr, srcData, srcData.length);
int rowstride = srcData.length / height;
- long pixbuf = GDK.gdk_pixbuf_new_from_data (buffer_ptr, colorspace, has_alpha, 8, width, height, rowstride, 0, 0);
+ // We use alpha in all cases, if no alpha is provided then it's just 255
+ long pixbuf = GDK.gdk_pixbuf_new_from_data (buffer_ptr, colorspace, true, 8, width, height, rowstride, 0, 0);
if (pixbuf == 0) {
OS.g_free(buffer_ptr);
SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -518,8 +566,8 @@ public void save(OutputStream stream, int format) {
case SWT.IMAGE_JPEG: typeStr = "jpeg"; break;
case SWT.IMAGE_PNG: typeStr = "png"; break;
case SWT.IMAGE_TIFF: typeStr = "tiff"; break;
+ case SWT.IMAGE_SVG: typeStr = "svg"; break;
}
-
byte [] type = Converter.wcsToMbcs(typeStr, true);
long [] buffer = new long [1];
@@ -557,8 +605,6 @@ public void save(OutputStream stream, int format) {
* <dd>JPEG file format</dd>
* <dt><code>IMAGE_PNG</code></dt>
* <dd>PNG file format</dd>
- * <dt><code>IMAGE_TIFF</code></dt>
- * <dd>TIFF file format</dd>
* </dl>
*
* @param filename the name of the file to write the images to
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
index a1c0692119..cd846d6b38 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -539,7 +539,7 @@ void drawInPixels(GC gc, int x, int y, int selectionStart, int selectionEnd, Col
OS.pango_cairo_show_layout(cairo, layout);
drawBorder(gc, x, y, null);
if ((data.style & SWT.MIRRORED) != 0) {
- Cairo.cairo_restore(cairo);
+ Cairo.cairo_restore(cairo);
}
} else {
selectionStart = Math.min(Math.max(0, selectionStart), length - 1);
@@ -584,8 +584,6 @@ void drawInPixels(GC gc, int x, int y, int selectionStart, int selectionEnd, Col
Cairo.cairo_new_path(cairo);
}
-// Bug 477950: In order to support GTK2 and GTK3 colors simultaneously, this method's parameters
-// were modified to accept SWT Color objects instead of GdkColor structs.
void drawWithCairo(GC gc, int x, int y, int start, int end, boolean fullSelection, GdkRGBA fg, GdkRGBA bg) {
GCData data = gc.data;
long cairo = data.cairo;
@@ -743,17 +741,11 @@ public int getAscent () {
* @see #getLineBounds(int)
*/
public Rectangle getBounds() {
- checkLayout();
- Rectangle bounds = DPIUtil.autoScaleDown(getDevice(), getBoundsInPixels());
- int lineCount = OS.pango_layout_get_line_count(layout);
- int totalLineheight = getScaledVerticalIndent();
- for (int i = 0; i < lineCount; i++) {
- totalLineheight += this.getLineBounds(i).height + OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout));
- }
- bounds.height = totalLineheight;
- return bounds;
+ int spacingInPixels = getSpacingInPixels();
+ return DPIUtil.autoScaleDown(getDevice(), getBoundsInPixels(spacingInPixels));
}
-Rectangle getBoundsInPixels() {
+
+Rectangle getBoundsInPixels(int spacingInPixels) {
checkLayout();
computeRuns();
int[] w = new int[1], h = new int[1];
@@ -765,7 +757,7 @@ Rectangle getBoundsInPixels() {
if (ascentInPoints != -1 && descentInPoints != -1) {
height = Math.max (height, DPIUtil.autoScaleUp(getDevice(), ascentInPoints + descentInPoints));
}
- height += OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout));
+ height += spacingInPixels;
return new Rectangle(0, 0, width, height + getScaledVerticalIndent());
}
@@ -981,11 +973,18 @@ Rectangle getLineBoundsInPixels(int lineIndex) {
int lineCount = OS.pango_layout_get_line_count(layout);
if (!(0 <= lineIndex && lineIndex < lineCount)) SWT.error(SWT.ERROR_INVALID_RANGE);
long iter = OS.pango_layout_get_iter(layout);
+ for (int i = 0; i < lineIndex; i++) {
+ OS.pango_layout_iter_next_line(iter);
+ }
+ Rectangle lineBoundsInPixels = getLineBoundsInPixels(lineIndex, iter);
+ OS.pango_layout_iter_free(iter);
+ return lineBoundsInPixels;
+}
+
+private Rectangle getLineBoundsInPixels(int lineIndex, long iter) {
if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- for (int i = 0; i < lineIndex; i++) OS.pango_layout_iter_next_line(iter);
PangoRectangle rect = new PangoRectangle();
OS.pango_layout_iter_get_line_extents(iter, null, rect);
- OS.pango_layout_iter_free(iter);
int x = OS.PANGO_PIXELS(rect.x);
int y = OS.PANGO_PIXELS(rect.y);
int width = OS.PANGO_PIXELS(rect.width);
@@ -1088,7 +1087,11 @@ public FontMetrics getLineMetrics (int lineIndex) {
heightInPoints = Math.max(this.ascentInPoints + this.descentInPoints, heightInPoints);
ascentInPoints = Math.max(this.ascentInPoints, ascentInPoints);
int descentInPoints = heightInPoints - ascentInPoints;
- return FontMetrics.gtk_new(ascentInPoints, descentInPoints, 0);
+ FontMetrics fm = new FontMetrics();
+ fm.ascentInPoints = ascentInPoints;
+ fm.descentInPoints = descentInPoints;
+ fm.averageCharWidthInPoints = 0;
+ return fm;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
index 6c118f8d35..78def99d4a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
@@ -67,7 +67,7 @@ public class GDBus {
* // From command line, it can be called like this:
* // gdbus call --session --dest org.eclipse.swt --object-path /org/eclipse/swt --method org.eclipse.swt.typeTest true "world" 1234
* // The call will return a tuple (struct) like: (true, 'world', 5678)
- * GDBusMethod typeTest = new GDBusMethod(
+ * GDBusMethod typeTest = new GDBusMethod(
* "typeTest",
* new String [][] {{OS.DBUS_TYPE_BOOLEAN, "boolean Test Val"}, {OS.DBUS_TYPE_STRING, "string Test Val"}, {OS.DBUS_TYPE_INT32, "int Test Val"}},
* new String [][] {{OS.DBUS_TYPE_BOOLEAN, "boolean Response"}, {OS.DBUS_TYPE_STRING, "string Test Response"}, {OS.DBUS_TYPE_INT32, "int Test Response"}},
@@ -129,12 +129,19 @@ public class GDBus {
/**
* Instantiate GDBus for use by SWT.
- * Note, a new SWT instance that runs this "Steals" org.eclipse.swt session bus,
+ * Note, a new SWT instance that runs this "Steals" the session bus,
* but upon termination it returns the session back to the previous owner.
*
+ * To make this more flexible we append appName (derived from the
+ * application executable but can be set with the command-line argument
+ * -name) to the session name.
+ *
* @param methods GDBus methods that we should handle.
+ * @param appName appName to append to GDBus object name if not null
*/
- public static void init (GDBusMethod[] methods) {
+ public static void init (GDBusMethod[] methods, String appName) {
+ String serviceName = DBUS_SERVICE_NAME;
+
if (!initialized)
initialized = true;
else
@@ -145,10 +152,18 @@ public class GDBus {
return;
}
+ if (appName != null) {
+ // GDBus allows alphanumeric characters, underscores and hyphens.
+ // https://gitlab.gnome.org/GNOME/glib/blob/master/gio/gdbusutils.c
+ // Replace invalid GDBus characters with hyphens.
+ appName = appName.replaceAll("[^0-9A-Za-z_.\\-]", "-");
+ serviceName += "." + appName;
+ }
+
gdbusMethods = Arrays.asList(methods);
int owner_id = OS.g_bus_own_name(OS.G_BUS_TYPE_SESSION,
- Converter.javaStringToCString(DBUS_SERVICE_NAME),
+ Converter.javaStringToCString(serviceName),
OS.G_BUS_NAME_OWNER_FLAGS_REPLACE | OS.G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, // Allow name to be used by other eclipse instances.
onBusAcquired.getAddress(),
onNameAcquired.getAddress(), // name_acquired_handler
@@ -157,7 +172,7 @@ public class GDBus {
0); // user_data_free_func
if (owner_id == 0) {
- System.err.println("SWT GDBus: Failed to aquire bus name: " + DBUS_SERVICE_NAME);
+ System.err.println("SWT GDBus: Failed to aquire bus name: " + serviceName);
}
}
@@ -175,16 +190,9 @@ public class GDBus {
static {
onBusAcquired = new Callback (GDBus.class, "onBusAcquired", 3); //$NON-NLS-1$
- if (onBusAcquired.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
onNameAcquired = new Callback (GDBus.class, "onNameAcquired", 3); //$NON-NLS-1$
- if (onNameAcquired.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
onNameLost = new Callback (GDBus.class, "onNameLost", 3); //$NON-NLS-1$
- if (onNameLost.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
handleMethod = new Callback (GDBus.class, "handleMethod", 8); //$NON-NLS-1$
- if (handleMethod.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
String swt_lib_versions = OS.getEnvironmentalVariable (OS.SWT_LIB_VERSIONS); // Note, this is read in multiple places.
if (swt_lib_versions != null && swt_lib_versions.equals("1")) {
@@ -327,7 +335,7 @@ public class GDBus {
*
* @param gVariant a pointer to the native GVariant
*/
- private static Object[] convertGVariantToJava(long gVariant) {
+ public static Object[] convertGVariantToJava(long gVariant) {
Object retVal = convertGVariantToJavaHelper(gVariant);
if (retVal instanceof Object[]) {
return (Object[]) retVal;
@@ -355,7 +363,7 @@ public class GDBus {
return Boolean.valueOf(OS.g_variant_get_boolean(gVariant));
}
- if (OS._g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_IN32)) {
+ if (OS.g_variant_is_of_type(gVariant, OS.G_VARIANT_TYPE_IN32)) {
return Integer.valueOf(OS.g_variant_get_int32(gVariant));
}
@@ -397,7 +405,7 @@ public class GDBus {
*
* @return pointer GVariant *
*/
- private static long convertJavaToGVariant(Object javaObject) throws SWTException {
+ public static long convertJavaToGVariant(Object javaObject) throws SWTException {
if (javaObject == null) {
return 0;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java
index e2eefc55c9..d562120fb4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -20,13 +20,13 @@ import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
public class ImageList {
- long [] pixbufs;
+ long [] surfaces;
int width = -1, height = -1;
Image [] images;
public ImageList() {
images = new Image [4];
- pixbufs = new long [4];
+ surfaces = new long [4];
}
public static long convertSurface(Image image) {
@@ -64,6 +64,75 @@ public static long convertSurface(Image image) {
return newSurface;
}
+public static long createPixbuf(long surface) {
+ int format = Cairo.cairo_image_surface_get_format(surface);
+ int width = Cairo.cairo_image_surface_get_width(surface);
+ int height = Cairo.cairo_image_surface_get_height(surface);
+ boolean hasAlpha = format == Cairo.CAIRO_FORMAT_ARGB32;
+ long pixbuf = GDK.gdk_pixbuf_new (GDK.GDK_COLORSPACE_RGB, hasAlpha, 8, width, height);
+ if (pixbuf == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ int stride = GDK.gdk_pixbuf_get_rowstride (pixbuf);
+ long pixels = GDK.gdk_pixbuf_get_pixels (pixbuf);
+ int oa, or, og, ob;
+ if (OS.BIG_ENDIAN) {
+ oa = 0; or = 1; og = 2; ob = 3;
+ } else {
+ oa = 3; or = 2; og = 1; ob = 0;
+ }
+ byte[] line = new byte[stride];
+ long surfaceData = Cairo.cairo_image_surface_get_data(surface);
+ if (hasAlpha) {
+ for (int y = 0; y < height; y++) {
+ C.memmove (line, surfaceData + (y * stride), stride);
+ for (int x = 0, offset = 0; x < width; x++, offset += 4) {
+ int a = line[offset + oa] & 0xFF;
+ int r = line[offset + or] & 0xFF;
+ int g = line[offset + og] & 0xFF;
+ int b = line[offset + ob] & 0xFF;
+ line[offset + 3] = (byte)a;
+ if (a != 0) {
+ line[offset + 0] = (byte)(((r * 0xFF) + a / 2) / a);
+ line[offset + 1] = (byte)(((g * 0xFF) + a / 2) / a);
+ line[offset + 2] = (byte)(((b * 0xFF) + a / 2) / a);
+ }
+ }
+ C.memmove (pixels + (y * stride), line, stride);
+ }
+ } else {
+ int cairoStride = Cairo.cairo_image_surface_get_stride(surface);
+ byte[] cairoLine = new byte[cairoStride];
+ for (int y = 0; y < height; y++) {
+ C.memmove (cairoLine, surfaceData + (y * cairoStride), cairoStride);
+ for (int x = 0, offset = 0, cairoOffset = 0; x < width; x++, offset += 3, cairoOffset += 4) {
+ byte r = cairoLine[cairoOffset + or];
+ byte g = cairoLine[cairoOffset + og];
+ byte b = cairoLine[cairoOffset + ob];
+ line[offset + 0] = r;
+ line[offset + 1] = g;
+ line[offset + 2] = b;
+ }
+ C.memmove (pixels + (y * stride), line, stride);
+ }
+ }
+ /*
+ * At this point the new pixbuf is created with the same size as surface.
+ * if the surface has higher device scale we need to down size pixbuf accordingly
+ *
+ * We have to do this as surface has inherent auto scaling capability but pixbuf doesnot
+ */
+ if (DPIUtil.useCairoAutoScale()) {
+ double sx[] = new double[1];
+ double sy[] = new double[1];
+ Cairo.cairo_surface_get_device_scale(surface, sx, sy);
+ if (sx[0] > 1 && sy[0] > 1){
+ long oldPixbuf = pixbuf;
+ pixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, width/(int)sx[0], height/(int)sy[0], GDK.GDK_INTERP_BILINEAR);
+ OS.g_object_unref(oldPixbuf);
+ }
+ }
+ return pixbuf;
+}
+
public static long createPixbuf(Image image) {
long surface = convertSurface(image);
int format = Cairo.cairo_image_surface_get_format(surface);
@@ -124,9 +193,9 @@ public int add (Image image) {
while (index < images.length) {
if (images [index] != null) {
if (images [index].isDisposed ()) {
- OS.g_object_unref (pixbufs [index]);
+ Cairo.cairo_surface_destroy (surfaces [index]);
images [index] = null;
- pixbufs [index] = 0;
+ surfaces [index] = 0;
}
}
if (images [index] == null) break;
@@ -136,29 +205,31 @@ public int add (Image image) {
Image [] newImages = new Image [images.length + 4];
System.arraycopy (images, 0, newImages, 0, images.length);
images = newImages;
- long [] newPixbufs = new long [pixbufs.length + 4];
- System.arraycopy (pixbufs, 0, newPixbufs, 0, pixbufs.length);
- pixbufs = newPixbufs;
+ long [] newPixbufs = new long [surfaces.length + 4];
+ System.arraycopy (surfaces, 0, newPixbufs, 0, surfaces.length);
+ surfaces = newPixbufs;
}
set (index, image);
return index;
}
public void dispose () {
- if (pixbufs == null) return;
- for (int index=0; index<pixbufs.length; index++) {
- if (pixbufs [index] != 0) OS.g_object_unref (pixbufs [index]);
+ if (surfaces == null) return;
+ for (int index = 0; index < surfaces.length; index++) {
+ long surface = surfaces[index];
+ if (surface != 0) Cairo.cairo_surface_destroy(surface);
}
+
images = null;
- pixbufs = null;
+ surfaces = null;
}
-public Image get (int index) {
- return images [index];
+public Image get(int index) {
+ return images[index];
}
-public long getPixbuf (int index) {
- return pixbufs [index];
+public long getSurface(int index) {
+ return surfaces[index];
}
public int indexOf (Image image) {
@@ -172,7 +243,7 @@ public int indexOf (Image image) {
public int indexOf (long pixbuf) {
if (pixbuf == 0) return -1;
for (int index=0; index<images.length; index++) {
- if (pixbuf == pixbufs [index]) return index;
+ if (pixbuf == surfaces [index]) return index;
}
return -1;
}
@@ -184,66 +255,100 @@ public boolean isDisposed () {
public void put (int index, Image image) {
int count = images.length;
if (!(0 <= index && index < count)) return;
+ if (images [index] == image) return;
if (image != null) {
set (index, image);
} else {
images [index] = null;
- if (pixbufs [index] != 0) OS.g_object_unref (pixbufs [index]);
- pixbufs [index] = 0;
+ if (surfaces [index] != 0) Cairo.cairo_surface_destroy (surfaces [index]);
+ surfaces [index] = 0;
}
}
-public void remove (Image image) {
+public void remove(Image image) {
if (image == null) return;
- for (int index=0; index<images.length; index++) {
- if (image == images [index]){
- OS.g_object_unref (pixbufs [index]);
+ for (int index = 0; index < images.length; index++) {
+ if (image == images[index]) {
images [index] = null;
- pixbufs [index] = 0;
+
+ Cairo.cairo_surface_destroy (surfaces[index]);
+ surfaces[index] = 0;
}
}
}
void set (int index, Image image) {
- long pixbuf = createPixbuf (image);
- int w = GDK.gdk_pixbuf_get_width(pixbuf);
- int h = GDK.gdk_pixbuf_get_height(pixbuf);
+ long surface = convertSurface(image);
+ int w = Cairo.cairo_image_surface_get_width(surface);
+ int h = Cairo.cairo_image_surface_get_height(surface);
+ Rectangle bounds;
+ if (DPIUtil.useCairoAutoScale()) {
+ bounds = image.getBounds();
+ } else {
+ bounds = image.getBoundsInPixels();
+ }
+ if (w == 0) {
+ w = bounds.width;
+ }
+ if (h == 0) {
+ h = bounds.height;
+ }
if (width == -1 || height == -1) {
width = w;
height = h;
}
+
if (w != width || h != height) {
- long scaledPixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, width, height, GDK.GDK_INTERP_BILINEAR);
- OS.g_object_unref (pixbuf);
- pixbuf = scaledPixbuf;
- }
- long oldPixbuf = pixbufs [index];
- if (oldPixbuf != 0) {
- if (images [index] == image) {
- GDK.gdk_pixbuf_copy_area (pixbuf, 0, 0, width, height, oldPixbuf, 0, 0);
- OS.g_object_unref (pixbuf);
- pixbuf = oldPixbuf;
- } else {
- OS.g_object_unref (oldPixbuf);
- }
+ Cairo.cairo_surface_destroy(surface);
+ surface = scaleSurface(image, width, height);
+ }
+
+ long oldSurface = surfaces[index];
+ if (oldSurface != 0) {
+ Cairo.cairo_surface_destroy(oldSurface);
}
- pixbufs [index] = pixbuf;
+
+ surfaces [index] = surface;
images [index] = image;
}
-public int size () {
- int result = 0;
- for (int index=0; index<images.length; index++) {
- if (images [index] != null) {
- if (images [index].isDisposed ()) {
- OS.g_object_unref (pixbufs [index]);
- images [index] = null;
- pixbufs [index] = 0;
- }
- if (images [index] != null) result++;
+long scaleSurface(Image image, int width, int height) {
+ int format = Cairo.cairo_surface_get_content(image.surface) == Cairo.CAIRO_CONTENT_COLOR ? Cairo.CAIRO_FORMAT_RGB24 : Cairo.CAIRO_FORMAT_ARGB32;
+ long scaledSurface = Cairo.cairo_image_surface_create(format, width, height);
+ if (scaledSurface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+
+ long cairo = Cairo.cairo_create(scaledSurface);
+ if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+
+ Rectangle bounds;
+ if (DPIUtil.useCairoAutoScale()) {
+ int w = Cairo.cairo_image_surface_get_width(image.surface);
+ int h = Cairo.cairo_image_surface_get_height(image.surface);
+ if ((w == 0) && (h == 0)) {
+ bounds = image.getBounds();
+ } else {
+ bounds = new Rectangle(0, 0, w, h);
+ }
+
+ double sx[] = new double[1];
+ double sy[] = new double[1];
+ Cairo.cairo_surface_get_device_scale(image.surface, sx, sy);
+ if (sx[0] == 0 || sy[0] == 0){
+ sx[0] = sy[0] = DPIUtil.getDeviceZoom() / 100f;
}
+ Cairo.cairo_surface_set_device_scale(scaledSurface, sx[0], sy[0]);
+ } else {
+ bounds = image.getBoundsInPixels();
}
- return result;
+ double scaleX = (double) width / (double) bounds.width;
+ double scaleY = (double) height / (double) bounds.height;
+ Cairo.cairo_scale(cairo, scaleX, scaleY);
+ Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE);
+ Cairo.cairo_set_source_surface(cairo, image.surface, 0, 0);
+ Cairo.cairo_paint(cairo);
+ Cairo.cairo_destroy(cairo);
+
+ return scaledSurface;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SWTGeometry.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SWTGeometry.java
new file mode 100644
index 0000000000..94434449e8
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SWTGeometry.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal;
+
+import org.eclipse.swt.internal.gtk.*;
+
+public class SWTGeometry implements GeometryInterface {
+ public int min_width;
+ public int min_height;
+ public int max_width;
+ public int max_height;
+ public boolean resizeToplevel;
+ public boolean minSizeRequested;
+ public int requestedWidth;
+ public int requestedHeight;
+
+ @Override
+ public int getMinWidth() {
+ return min_width;
+ }
+ @Override
+ public int getMinHeight() {
+ return min_height;
+ }
+ @Override
+ public int getMaxWidth() {
+ return max_width;
+ }
+ @Override
+ public int getMaxHeight() {
+ return max_height;
+ }
+ @Override
+ public boolean getResize() {
+ return resizeToplevel;
+ }
+ @Override
+ public int getRequestedWidth() {
+ return requestedWidth;
+ }
+ @Override
+ public int getRequestedHeight() {
+ return requestedHeight;
+ }
+ @Override
+ public void setMinWidth(int value) {
+ min_width = value;
+ }
+ @Override
+ public void setMinHeight(int value) {
+ min_height = value;
+ }
+ @Override
+ public void setMaxWidth(int value) {
+ max_width = value;
+ }
+ @Override
+ public void setMaxHeight(int value) {
+ max_height = value;
+ }
+ @Override
+ public void setResize(boolean value) {
+ resizeToplevel = value;
+ }
+ @Override
+ public void setRequestedWidth(int value) {
+ requestedWidth = value;
+ }
+ @Override
+ public void setRequestedHeight(int value) {
+ requestedHeight = value;
+ }
+ @Override
+ public boolean getMinSizeRequested() {
+ return minSizeRequested;
+ }
+ @Override
+ public void setMinSizeRequested(boolean value) {
+ minSizeRequested = value;
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SessionManagerDBus.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SessionManagerDBus.java
index cecfac30ac..8a09c75721 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SessionManagerDBus.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SessionManagerDBus.java
@@ -52,8 +52,44 @@ public class SessionManagerDBus {
void stop();
}
+ private static class ShutdownHook extends Thread {
+ private SessionManagerDBus parent;
+
+ public ShutdownHook(SessionManagerDBus parent) {
+ this.parent = parent;
+ }
+
+ public void run() {
+ parent.stop();
+ }
+
+ public void install() {
+ try {
+ Runtime.getRuntime().addShutdownHook(this);
+ } catch (IllegalArgumentException | IllegalStateException ex) {
+ // Shouldn't happen
+ ex.printStackTrace();
+ } catch (SecurityException ex) {
+ // That's pity, but not too much of a problem.
+ }
+ }
+
+ public void remove() {
+ try {
+ Runtime.getRuntime().removeShutdownHook(this);
+ } catch (IllegalStateException ex) {
+ // JVM is already in the process of shutting down.
+ // That's expected when called from shutdown hook.
+ } catch (SecurityException ex) {
+ // Shouldn't happen if 'addShutdownHook' worked.
+ ex.printStackTrace();
+ }
+ }
+ }
+
private ArrayList<IListener> listeners = new ArrayList<IListener>();
private Callback g_signal_callback;
+ private ShutdownHook shutdownHook = new ShutdownHook(this);
private long sessionManagerProxy;
private long clientProxy;
private String clientObjectPath;
@@ -61,6 +97,15 @@ public class SessionManagerDBus {
private static int dbusTimeoutMsec = 10000;
+ /**
+ * 1) Prevents old answers to new signals. For example, if
+ * signal's handler asks user, it can stay for a while and when
+ * it's closed it could be the other signal already.
+ * 2) Makes sure answer is given on System.exit()
+ */
+ private long endSessionResponseCounter = 1;
+ private long endSessionResponseWanted = 0;
+
public SessionManagerDBus() {
// Allow to disable session manager, for example in case it conflicts with
// session manager connection implemented in application itself.
@@ -98,6 +143,11 @@ public class SessionManagerDBus {
return false;
}
+ // If application uses System.exit() while processing 'EndSession' signal
+ // then GNOME session can get stuck, see Bug 547093. The workaround
+ // is to install java shutdown hook that will still call .stop().
+ shutdownHook.install();
+
return true;
}
@@ -108,8 +158,18 @@ public class SessionManagerDBus {
* when client's process ends, so it's not a big deal if this is not
* called at all. See comments for this class to find 'dbus-send'
* commands to verify that.
+ *
+ * 'synchronized' guards against the rare possible case where some
+ * thread calls System.exit() while main thread is in Display.dispose()
+ * and both main thread and my 'ShutdownHook' try to run .stop().
*/
- private void stop() {
+ private synchronized void stop() {
+ if (endSessionResponseWanted != 0) {
+ // Happens when application exits with System.exit()
+ // while still in 'QueryEndSession' or 'EndSession'
+ sendEndSessionResponse(true, "", endSessionResponseWanted);
+ }
+
if ((sessionManagerProxy != 0) && (clientObjectPath != null)) {
long args = OS.g_variant_new(
Converter.javaStringToCString("(o)"), //$NON-NLS-1$
@@ -148,9 +208,27 @@ public class SessionManagerDBus {
g_signal_callback.dispose();
g_signal_callback = null;
}
+
+ shutdownHook.remove();
}
- private void sendEndSessionResponse(boolean is_ok, String reason) {
+ private long wantEndSessionResponse() {
+ long responseID = endSessionResponseCounter;
+ endSessionResponseCounter++;
+ endSessionResponseWanted = responseID;
+ return responseID;
+ }
+
+ private void sendEndSessionResponse(boolean is_ok, String reason, long responseID) {
+ if (responseID != endSessionResponseWanted) {
+ // A new signal has arrived while response was being prepared.
+ // Old response is no longer expected.
+ return;
+ }
+
+ // Mark as replied
+ endSessionResponseWanted = 0;
+
long args = OS.g_variant_new(
Converter.javaStringToCString("(bs)"), //$NON-NLS-1$
is_ok,
@@ -174,7 +252,7 @@ public class SessionManagerDBus {
}
}
- private boolean isReadyToExit() {
+ private boolean queryReadyToExit() {
boolean isReady = true;
// Inform everyone even if someone is not ready.
@@ -186,6 +264,28 @@ public class SessionManagerDBus {
return isReady;
}
+ private void handleQueryEndSession() {
+ // Save current ID before potential recursion
+ long responseID = wantEndSessionResponse();
+
+ // This can block/recurse if handler asks user
+ boolean isReady = queryReadyToExit();
+
+ sendEndSessionResponse(isReady, "", responseID);
+ }
+
+ private void handleEndSession() {
+ // Save current ID before potential recursion
+ long responseID = wantEndSessionResponse();
+
+ // This can block/recurse if handler asks user
+ handleStop();
+
+ // Only respond after we've done, or session can end while we're still working.
+ // Even if we don't want the session to end, I don't think sending 'false' here can be of any help.
+ sendEndSessionResponse(true, "", responseID);
+ }
+
private void handleStop() {
for (int i = 0; i < listeners.size(); i++) {
IListener listener = listeners.get(i);
@@ -207,13 +307,10 @@ public class SessionManagerDBus {
switch (signalName) {
case "QueryEndSession": //$NON-NLS-1$
- sendEndSessionResponse(isReadyToExit(), "");
+ handleQueryEndSession();
break;
case "EndSession": //$NON-NLS-1$
- handleStop();
- // Only respond after we've done, or session can end while we're still working.
- // Even if we don't want the session to end, I don't think sending 'false' here can be of any help.
- sendEndSessionResponse(true, "");
+ handleEndSession();
break;
case "Stop":
handleStop();
@@ -244,10 +341,9 @@ public class SessionManagerDBus {
/**
* Creates a connection to the session manager.
*
- * Saves result to member variable when successful.
- * @return Error string in case of error, null if successful.
+ * @return Pointer to dbus proxy, 0 if failed.
*/
- private String connectSessionManager(String dbusName, String objectPath, String interfaceName) {
+ private long connectSessionManager(String dbusName, String objectPath, String interfaceName) {
int sessionManagerFlags =
OS.G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START |
OS.G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
@@ -265,47 +361,55 @@ public class SessionManagerDBus {
error);
// Proxy is usually created even for non-existent service names.
- if (proxy == 0) return extractFreeGError(error[0]);
+ // Errors are not really expected here.
+ if (proxy == 0) {
+ String errorText = extractFreeGError(error[0]);
+ System.err.format(
+ "SWT SessionManagerDBus: Failed to connect to %s: %s%n",
+ dbusName,
+ errorText);
- // Is the service actually present?
+ return 0;
+ }
+
+ // Proxy was created, but is the service actually present?
+ // This is what fails if service is not supported.
long owner = OS.g_dbus_proxy_get_name_owner(proxy);
if (owner == 0) {
+ // It's expected that not every Linux will support it.
+ // Do not print errors, because there's nothing wrong.
OS.g_object_unref(proxy);
- return "Service not present";
+ return 0;
}
OS.g_free(owner);
// Success
- sessionManagerProxy = proxy;
- return null;
+ return proxy;
}
private boolean connectSessionManager() {
- String errorGnome = connectSessionManager(
+ long proxyGnome = connectSessionManager(
"org.gnome.SessionManager", //$NON-NLS-1$
"/org/gnome/SessionManager", //$NON-NLS-1$
"org.gnome.SessionManager"); //$NON-NLS-1$
- if (errorGnome == null) {
+ if (proxyGnome != 0) {
+ sessionManagerProxy = proxyGnome;
isGnome = true;
return true;
}
- String errorXCFE = connectSessionManager(
+ long proxyXFCE = connectSessionManager(
"org.xfce.SessionManager", //$NON-NLS-1$
"/org/xfce/SessionManager", //$NON-NLS-1$
"org.xfce.Session.Manager"); //$NON-NLS-1$
- if (errorXCFE == null) {
+ if (proxyXFCE != 0) {
+ sessionManagerProxy = proxyXFCE;
isGnome = false;
return true;
}
- System.err.format(
- "SWT SessionManagerDBus: Failed to connect to SessionManager (gnome: %s, xcfe: %s)%n",
- errorGnome,
- errorXCFE);
-
return false;
}
@@ -366,6 +470,18 @@ public class SessionManagerDBus {
if (clientInfo == 0) return extractFreeGError(error[0]);
+ /*
+ * Bug 548806: LXDE's emulation of Gnome session manager is
+ * partial and broken. Its handler for 'RegisterClient' is
+ * empty, so it returns empty result (and doesn't raise an
+ * error) where '(o)' format variant is expected. Trying to
+ * extract the empty variant will crash VM. Also, LXDE doesn't
+ * implement wanted signals anyway, so let's just give up.
+ */
+ if (0 == OS.g_variant_n_children(clientInfo)) {
+ return "Session manager's response to 'RegisterClient' is invalid";
+ }
+
// Success
clientObjectPath = extractVariantTupleS(clientInfo);
OS.g_variant_unref(clientInfo);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SyncDialogUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SyncDialogUtil.java
new file mode 100644
index 0000000000..e7596afcf3
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/SyncDialogUtil.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Red Hat Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal;
+
+import java.lang.reflect.*;
+
+import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * This class is an internal use utilities class introduced during the port
+ * from GTK3 to GTK4. This class transforms a non-blocking show dialog call
+ * to a blocking call. See bug 567371 for more information and where this
+ * is applied.
+ */
+
+public class SyncDialogUtil {
+ static int responseID;
+ static Callback dialogResponseCallback;
+
+ /**
+ * A blocking call that waits for the handling of the signal before returning
+ *
+ * @return the response_id from the dialog presented to the user
+ */
+ static public int run(Display display, long handle, boolean isNativeDialog) {
+ initializeResponseCallback();
+ OS.g_signal_connect(handle, OS.response, dialogResponseCallback.getAddress(), 0);
+ if (isNativeDialog) {
+ GTK.gtk_native_dialog_show(handle);
+ } else {
+ GTK.gtk_widget_show(handle);
+ }
+
+ while (!display.isDisposed()) {
+ boolean eventsDispatched = OS.g_main_context_iteration(0, false);
+ if (responseID != -1) {
+ break;
+ } else if (!eventsDispatched) {
+ display.sleep();
+ }
+ }
+
+ disposeResponseCallback();
+ return responseID;
+ }
+
+ /**
+ * Initializes the response callback and resets the responseID of the dialog to the default value.
+ * This function should be called before connect the dialog to the "response" signal, as this sets up the callback.
+ */
+ static void initializeResponseCallback() {
+ dialogResponseCallback = new Callback(SyncDialogUtil.class, "dialogResponseProc", void.class, new Type[] {long.class, int.class, long.class});
+ responseID = -1;
+ }
+
+ static void disposeResponseCallback() {
+ dialogResponseCallback.dispose();
+ dialogResponseCallback = null;
+ }
+
+ /**
+ * Callback function for the "response" signal in GtkDialog widgets.
+ * Responsibility of destroying the dialog is the owner of the dialog
+ * handle.
+ *
+ * Note: Native dialogs are platform dialogs that don't use GtkDialog or GtkWindow.
+ */
+ static void dialogResponseProc(long dialog, int response_id, long user_data) {
+ responseID = response_id;
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index b842510a02..10a2f92441 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a selectable user interface object that
@@ -50,11 +52,15 @@ import org.eclipse.swt.internal.gtk.*;
public class Button extends Control {
long boxHandle, labelHandle, imageHandle, arrowHandle, groupHandle;
boolean selected, grayed;
- ImageList imageList;
+ /** True iff this toggle button requires special theme handling. See bug 546552.*/
+ boolean toggleButtonTheming;
Image image;
String text;
GdkRGBA background;
+ Image defaultDisableImage;
+ boolean enabled = true;
+
static final int INNER_BORDER = 1;
static final int DEFAULT_BORDER = 1;
@@ -116,26 +122,26 @@ static int checkStyle (int style) {
}
GtkBorder getBorder (byte[] border, long handle, int defaultBorder) {
- GtkBorder gtkBorder = new GtkBorder();
- long [] borderPtr = new long [1];
- if (GTK.GTK4) {
+ GtkBorder gtkBorder = new GtkBorder();
+ long [] borderPtr = new long [1];
+ if (GTK.GTK4) {
long context = GTK.gtk_widget_get_style_context (handle);
int stateFlag = GTK.gtk_widget_get_state_flags(handle);
gtk_style_context_get_border(context, stateFlag, gtkBorder);
return gtkBorder;
- } else {
- GTK.gtk_widget_style_get (handle, border, borderPtr,0);
- if (borderPtr[0] != 0) {
- OS.memmove (gtkBorder, borderPtr[0], GtkBorder.sizeof);
- GTK.gtk_border_free(borderPtr[0]);
- return gtkBorder;
- }
- }
- gtkBorder.left = defaultBorder;
- gtkBorder.top = defaultBorder;
- gtkBorder.right = defaultBorder;
- gtkBorder.bottom = defaultBorder;
- return gtkBorder;
+ } else {
+ GTK3.gtk_widget_style_get (handle, border, borderPtr,0);
+ if (borderPtr[0] != 0) {
+ OS.memmove (gtkBorder, borderPtr[0], GtkBorder.sizeof);
+ GTK.gtk_border_free(borderPtr[0]);
+ return gtkBorder;
+ }
+ }
+ gtkBorder.left = defaultBorder;
+ gtkBorder.top = defaultBorder;
+ gtkBorder.right = defaultBorder;
+ gtkBorder.bottom = defaultBorder;
+ return gtkBorder;
}
@Override
@@ -210,9 +216,9 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
int trimWidth, trimHeight;
if (!GTK.GTK4) {
int[] focusWidth = new int[1];
- GTK.gtk_widget_style_get (handle, OS.focus_line_width, focusWidth, 0);
+ GTK3.gtk_widget_style_get (handle, OS.focus_line_width, focusWidth, 0);
int[] focusPadding = new int[1];
- GTK.gtk_widget_style_get (handle, OS.focus_padding, focusPadding, 0);
+ GTK3.gtk_widget_style_get (handle, OS.focus_padding, focusPadding, 0);
trimWidth = 2 * (borderWidth + focusWidth [0] + focusPadding [0]);
} else {
trimWidth = 2 * borderWidth;
@@ -221,18 +227,18 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
int indicatorHeight = 0;
if ((style & (SWT.CHECK | SWT.RADIO)) != 0) {
if (GTK.GTK4) {
- long icon = GTK.gtk_widget_get_first_child(handle);
+ long icon = GTK4.gtk_widget_get_first_child(handle);
GtkRequisition minimum = new GtkRequisition ();
GTK.gtk_widget_get_preferred_size(icon, minimum, null);
long context = GTK.gtk_widget_get_style_context(icon);
GtkBorder margin = new GtkBorder ();
- GTK.gtk_style_context_get_margin(context, margin);
+ GTK4.gtk_style_context_get_margin(context, margin);
trimWidth += minimum.width + margin.right;
} else {
int[] indicatorSize = new int[1];
int[] indicatorSpacing = new int[1];
- GTK.gtk_widget_style_get (handle, OS.indicator_size, indicatorSize, 0);
- GTK.gtk_widget_style_get (handle, OS.indicator_spacing, indicatorSpacing, 0);
+ GTK3.gtk_widget_style_get (handle, OS.indicator_size, indicatorSize, 0);
+ GTK3.gtk_widget_style_get (handle, OS.indicator_spacing, indicatorSpacing, 0);
indicatorHeight = indicatorSize [0] + 2 * indicatorSpacing [0];
trimWidth += indicatorHeight + indicatorSpacing [0];
}
@@ -243,8 +249,9 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
GtkBorder innerBorder = getBorder (OS.inner_border, handle, INNER_BORDER);
trimWidth += innerBorder.left + innerBorder.right;
trimHeight += innerBorder.top + innerBorder.bottom;
- if (GTK.gtk_widget_get_can_default (handle)) {
- GtkBorder defaultBorder = getBorder (OS.default_border, handle, DEFAULT_BORDER);
+ boolean canDefault = GTK.GTK4 ? GTK4.gtk_widget_get_receives_default(handle) : GTK3.gtk_widget_get_can_default(handle);
+ if (canDefault) {
+ GtkBorder defaultBorder = getBorder(OS.default_border, handle, DEFAULT_BORDER);
trimWidth += defaultBorder.left + defaultBorder.right;
trimHeight += defaultBorder.top + defaultBorder.bottom;
}
@@ -279,8 +286,9 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
GTK.gtk_widget_set_size_request (boxHandle, reqWidth [0], reqHeight [0]);
}
if (wHint != SWT.DEFAULT || hHint != SWT.DEFAULT) {
- if (GTK.gtk_widget_get_can_default (handle)) {
- GtkBorder border = getBorder (OS.default_border, handle, DEFAULT_BORDER);
+ boolean canDefault = GTK.GTK4 ? GTK4.gtk_widget_get_receives_default(handle) : GTK3.gtk_widget_get_can_default(handle);
+ if (canDefault) {
+ GtkBorder border = getBorder(OS.default_border, handle, DEFAULT_BORDER);
if (wHint != SWT.DEFAULT) size.x += border.left + border.right;
if (hHint != SWT.DEFAULT) size.y += border.top + border.bottom;
}
@@ -293,29 +301,46 @@ void createHandle (int index) {
state |= HANDLE;
if ((style & (SWT.PUSH | SWT.TOGGLE)) == 0) state |= THEME_BACKGROUND;
int bits = SWT.ARROW | SWT.TOGGLE | SWT.CHECK | SWT.RADIO | SWT.PUSH;
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
+
switch (style & bits) {
case SWT.ARROW:
- byte arrowType [] = GTK.GTK_NAMED_ICON_GO_UP;
+ byte[] arrowType = GTK.GTK_NAMED_ICON_GO_UP;
if ((style & SWT.UP) != 0) arrowType = GTK.GTK_NAMED_ICON_GO_UP;
if ((style & SWT.DOWN) != 0) arrowType = GTK.GTK_NAMED_ICON_GO_DOWN;
if ((style & SWT.LEFT) != 0) arrowType = GTK.GTK_NAMED_ICON_GO_PREVIOUS;
if ((style & SWT.RIGHT) != 0) arrowType = GTK.GTK_NAMED_ICON_GO_NEXT;
- arrowHandle = GTK.gtk_image_new_from_icon_name (arrowType, GTK.GTK_ICON_SIZE_MENU);
- if (arrowHandle == 0) error (SWT.ERROR_NO_HANDLES);
- handle = GTK.gtk_button_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ handle = GTK4.gtk_button_new_from_icon_name(arrowType);
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ arrowHandle = GTK4.gtk_widget_get_first_child(handle);
+ if (arrowHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ } else {
+ arrowHandle = GTK3.gtk_image_new_from_icon_name(arrowType, GTK.GTK_ICON_SIZE_MENU);
+ if (arrowHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ handle = GTK.gtk_button_new();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ // Use gtk_button_set_image() on GTK3 to prevent icons from being
+ // trimmed with smaller sized buttons; see bug 528284.
+ GTK3.gtk_button_set_image(handle, arrowHandle);
+ }
break;
case SWT.TOGGLE:
handle = GTK.gtk_toggle_button_new ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (Display.themeName != null) {
+ toggleButtonTheming = (GTK.GTK_VERSION >= OS.VERSION(3, 24, 11) && Display.themeName.contains("Adwaita"))
+ || Display.themeName.contains("Yaru");
+ }
break;
case SWT.CHECK:
handle = GTK.gtk_check_button_new ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (Display.themeName != null) {
+ toggleButtonTheming = (GTK.GTK_VERSION >= OS.VERSION(3, 24, 11) && Display.themeName.contains("Adwaita"))
+ || Display.themeName.contains("Yaru");
+ }
break;
case SWT.RADIO:
/*
@@ -329,40 +354,77 @@ void createHandle (int index) {
* to the same group. This allows the visible button to be
* unselected.
*/
- groupHandle = GTK.gtk_radio_button_new (0);
- if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
- OS.g_object_ref (groupHandle);
- OS.g_object_ref_sink (groupHandle);
- handle = GTK.gtk_radio_button_new (GTK.gtk_radio_button_get_group (groupHandle));
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ if (GTK.GTK4) {
+ groupHandle = GTK.gtk_check_button_new();
+ if (groupHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ OS.g_object_ref_sink(groupHandle);
+ handle = GTK.gtk_check_button_new();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ GTK4.gtk_check_button_set_group(handle, groupHandle);
+ } else {
+ groupHandle = GTK3.gtk_radio_button_new (0);
+ if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ OS.g_object_ref_sink (groupHandle);
+ handle = GTK3.gtk_radio_button_new (GTK3.gtk_radio_button_get_group (groupHandle));
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+
+ if (Display.themeName != null) {
+ toggleButtonTheming = (GTK.GTK_VERSION >= OS.VERSION(3, 24, 11) && Display.themeName.contains("Adwaita"))
+ || Display.themeName.contains("Yaru");
+ }
break;
case SWT.PUSH:
default:
handle = GTK.gtk_button_new ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_widget_set_can_default (handle, true);
+ if (!GTK.GTK4) GTK3.gtk_widget_set_can_default (handle, true);
break;
}
- if ((style & SWT.ARROW) != 0) {
- // Use gtk_button_set_image() on GTK3 to prevent icons from being
- // trimmed with smaller sized buttons; see bug 528284.
- GTK.gtk_button_set_image(handle, arrowHandle);
- } else {
- boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 4);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- labelHandle = GTK.gtk_label_new_with_mnemonic (null);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (handle, boxHandle);
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_container_add (boxHandle, labelHandle);
+
+ if ((style & SWT.ARROW) == 0) {
+ boxHandle = gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, false, 4);
+ if (boxHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ labelHandle = GTK.gtk_label_new_with_mnemonic(null);
+ if (labelHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+
+ if (GTK.GTK4) {
+ imageHandle = GTK4.gtk_picture_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK.gtk_widget_set_parent(boxHandle, handle);
+ GTK4.gtk_box_append(boxHandle, imageHandle);
+ GTK4.gtk_box_append(boxHandle, labelHandle);
+ } else {
+ imageHandle = GTK.gtk_image_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK3.gtk_container_add(handle, boxHandle);
+ GTK3.gtk_container_add(boxHandle, imageHandle);
+ GTK3.gtk_container_add(boxHandle, labelHandle);
+ }
+
if ((style & SWT.WRAP) != 0) {
- GTK.gtk_label_set_line_wrap (labelHandle, true);
- GTK.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ if (GTK.GTK4) {
+ GTK4.gtk_label_set_wrap(labelHandle, true);
+ GTK4.gtk_label_set_wrap_mode(labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ } else {
+ GTK3.gtk_label_set_line_wrap (labelHandle, true);
+ GTK3.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ }
}
}
- GTK.gtk_container_add (fixedHandle, handle);
+
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ GTK3.gtk_container_add(fixedHandle, handle);
+ }
if ((style & SWT.ARROW) != 0) return;
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
@@ -378,6 +440,26 @@ void createWidget (int index) {
}
@Override
+void checkBackground() {
+ /*
+ * Feature in GTK: some toggle style (check, radio, and toggle) buttons
+ * have inverted colors, meaning the background color when checked is
+ * a dark color (like blue or green), and the checkmark/indicator is
+ * white. To complicate matters, this background area is an image, and
+ * overriding this with a color causes the checkmark to be invisible.
+ * The new (GTK3 >= 3.24.11) Adwaita theme is affected, as well as the
+ * default Yaru theme on Ubuntu.
+ *
+ * Part of the fix is to not inherit the parents background. See bug 553657.
+ */
+ if (toggleButtonTheming && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
+ state &= ~PARENT_BACKGROUND;
+ } else {
+ super.checkBackground();
+ }
+}
+
+@Override
void deregister () {
super.deregister ();
if (boxHandle != 0) display.removeWidget (boxHandle);
@@ -483,7 +565,12 @@ String getNameText () {
public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;
- return GTK.gtk_toggle_button_get_active (handle);
+
+ if (GTK.GTK4 && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
+ return GTK4.gtk_check_button_get_active(handle);
+ } else {
+ return GTK.gtk_toggle_button_get_active(handle);
+ }
}
/**
@@ -523,12 +610,12 @@ long gtk_clicked (long widget) {
}
} else {
if ((style & SWT.CHECK) != 0) {
- if (grayed) {
- if (GTK.gtk_toggle_button_get_active (handle)) {
- GTK.gtk_toggle_button_set_inconsistent (handle, true);
- } else {
- GTK.gtk_toggle_button_set_inconsistent (handle, false);
- }
+ if (GTK.GTK4) {
+ boolean inconsistent = grayed && GTK4.gtk_check_button_get_active(handle);
+ GTK4.gtk_check_button_set_inconsistent(handle, inconsistent);
+ } else {
+ boolean inconsistent = grayed && GTK.gtk_toggle_button_get_active(handle);
+ GTK3.gtk_toggle_button_set_inconsistent(handle, inconsistent);
}
}
}
@@ -544,7 +631,7 @@ long gtk_draw (long widget, long cairo) {
* The fix is to make the widget invisible to the user. Resizing widget later on to a larger size
* makes the widget visible again in setBounds. See Bug 533469, Bug 531120.
*/
- if (GTK.GTK_VERSION >= OS.VERSION (3, 20, 0) && (state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) {
+ if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) {
if (GTK.gtk_widget_get_visible(widget)) GTK.gtk_widget_set_visible(widget, false);
// Button and display should not be disposed after hiding widget
if (isDisposed() || display == null || display.isDisposed()) error (SWT.ERROR_DEVICE_DISPOSED);
@@ -585,17 +672,35 @@ long gtk_focus_out_event (long widget, long event) {
}
@Override
+boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) {
+ boolean handled = super.gtk4_key_press_event(controller, keyval, keycode, state, event);
+ if (!handled) {
+ if ((style & SWT.RADIO) != 0) selected = getSelection();
+ }
+
+ return handled;
+}
+
+@Override
long gtk_key_press_event (long widget, long event) {
long result = super.gtk_key_press_event (widget, event);
if (result != 0) return result;
- if ((style & SWT.RADIO) != 0) selected = getSelection ();
+ if ((style & SWT.RADIO) != 0) {
+ selected = getSelection ();
+ }
return result;
}
@Override
void hookEvents () {
super.hookEvents();
- OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false);
+
+ if (GTK.GTK4 && ((style & (SWT.RADIO | SWT.CHECK)) != 0)) {
+ OS.g_signal_connect_closure (handle, OS.toggled, display.getClosure (CLICKED), false);
+ } else {
+ OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false);
+ }
+
if (labelHandle != 0) {
OS.g_signal_connect_closure_by_id (labelHandle, display.signalIds [MNEMONIC_ACTIVATE], 0, display.getClosure (MNEMONIC_ACTIVATE), false);
}
@@ -636,14 +741,21 @@ void releaseHandle () {
}
@Override
-void releaseWidget () {
- super.releaseWidget ();
- if (groupHandle != 0) OS.g_object_unref (groupHandle);
+void releaseWidget() {
+ super.releaseWidget();
+
+ if (GTK.GTK4) {
+ if (boxHandle != 0) GTK.gtk_widget_unparent(boxHandle);
+ }
+
+ // Release reference to hidden GtkCheckButton that allows for SWT.RADIO behavior
+ if (groupHandle != 0) OS.g_object_unref(groupHandle);
groupHandle = 0;
- if (imageList != null) imageList.dispose ();
- imageList = null;
+
image = null;
text = null;
+
+ disposeDefaultDisabledImage();
}
/**
@@ -732,14 +844,14 @@ void _setAlignment (int alignment) {
style &= ~(SWT.UP | SWT.DOWN | SWT.LEFT | SWT.RIGHT);
style |= alignment & (SWT.UP | SWT.DOWN | SWT.LEFT | SWT.RIGHT);
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
- byte arrowType [] = GTK.GTK_NAMED_ICON_GO_UP;
+ byte[] arrowType = GTK.GTK_NAMED_ICON_GO_UP;
switch (alignment) {
case SWT.UP: arrowType = GTK.GTK_NAMED_ICON_GO_UP; break;
case SWT.DOWN: arrowType = GTK.GTK_NAMED_ICON_GO_DOWN; break;
case SWT.LEFT: arrowType = isRTL ? GTK.GTK_NAMED_ICON_GO_NEXT : GTK.GTK_NAMED_ICON_GO_PREVIOUS; break;
case SWT.RIGHT: arrowType = isRTL ? GTK.GTK_NAMED_ICON_GO_PREVIOUS : GTK.GTK_NAMED_ICON_GO_NEXT; break;
}
- GTK.gtk_image_set_from_icon_name (arrowHandle, arrowType, GTK.GTK_ICON_SIZE_MENU);
+ GTK3.gtk_image_set_from_icon_name (arrowHandle, arrowType, GTK.GTK_ICON_SIZE_MENU);
return;
}
if ((alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER)) == 0) return;
@@ -760,13 +872,8 @@ void _setAlignment (int alignment) {
gtk_box_set_child_packing (boxHandle, imageHandle, true, true, 0, GTK.GTK_PACK_START);
}
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- gtk_label_set_align(labelHandle,0.0f,0.5f);
- gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_START, GTK.GTK_ALIGN_CENTER);
- } else {
- GTK.gtk_misc_set_alignment (labelHandle, 0.0f, 0.5f);
- GTK.gtk_misc_set_alignment (imageHandle, 0.0f, 0.5f);
- }
+ gtk_label_set_align(labelHandle,0.0f,0.5f);
+ gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_START, GTK.GTK_ALIGN_CENTER);
GTK.gtk_label_set_justify (labelHandle, GTK.GTK_JUSTIFY_LEFT);
return;
@@ -776,25 +883,15 @@ void _setAlignment (int alignment) {
gtk_box_set_child_packing (boxHandle, labelHandle, true, true, 0, GTK.GTK_PACK_END);
gtk_box_set_child_packing (boxHandle, imageHandle, true, true, 0, GTK.GTK_PACK_START);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- gtk_label_set_align(labelHandle,0.0f,0.5f);
- gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_CENTER);
- } else {
- GTK.gtk_misc_set_alignment (labelHandle, 0f, 0.5f);
- GTK.gtk_misc_set_alignment (imageHandle, 1f, 0.5f);
- }
+ gtk_label_set_align(labelHandle,0.0f,0.5f);
+ gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_CENTER);
} else {
gtk_box_set_child_packing (boxHandle, labelHandle, true, true, 0, GTK.GTK_PACK_END);
gtk_box_set_child_packing (boxHandle, imageHandle, true, true, 0, GTK.GTK_PACK_START);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- gtk_label_set_align(labelHandle,0.5f,0.5f);
- gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_CENTER, GTK.GTK_ALIGN_CENTER);
- } else {
- GTK.gtk_misc_set_alignment (labelHandle, 0.5f, 0.5f);
- GTK.gtk_misc_set_alignment (imageHandle, 0.5f, 0.5f);
- }
+ gtk_label_set_align(labelHandle,0.5f,0.5f);
+ gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_CENTER, GTK.GTK_ALIGN_CENTER);
GTK.gtk_label_set_justify (labelHandle, GTK.GTK_JUSTIFY_CENTER);
}
return;
@@ -808,13 +905,8 @@ void _setAlignment (int alignment) {
gtk_box_set_child_packing (boxHandle, imageHandle, true, true, 0, GTK.GTK_PACK_START);
}
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- gtk_label_set_align(labelHandle,1.0f,0.5f);
- gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_CENTER);
- } else {
- GTK.gtk_misc_set_alignment (labelHandle, 1.0f, 0.5f);
- GTK.gtk_misc_set_alignment (imageHandle, 1.0f, 0.5f);
- }
+ gtk_label_set_align(labelHandle,1.0f,0.5f);
+ gtk_widget_set_align(imageHandle,GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_CENTER);
GTK.gtk_label_set_justify (labelHandle, GTK.GTK_JUSTIFY_RIGHT);
return;
}
@@ -828,6 +920,23 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
String color = display.gtk_rgba_to_css_string (rgba);
css += color + ";}";
+ /*
+ * Feature in GTK: some toggle style (check, radio, and toggle) buttons
+ * have inverted colors, meaning the background color when checked is
+ * a dark color (like blue or green), and the checkmark/indicator is
+ * white. To complicate matters, this background area is an image, and
+ * overriding this with a color causes the checkmark to be invisible.
+ * The new (GTK3 >= 3.24.11) Adwaita theme is affected, as well as the
+ * default Yaru theme on Ubuntu.
+ *
+ * The fix is to set the default CSS for the default background case, as
+ * this doesn't use the universal (*) selector. See bug 546552.
+ */
+ if (rgba == null && toggleButtonTheming) {
+ super.setBackgroundGdkRGBA(context, handle, rgba);
+ return;
+ }
+
// Cache background color
cssBackground = css;
@@ -896,7 +1005,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
Point sizes = resizeCalculationsGTK3(boxHandle, boxWidth, boxHeight);
allocation.width = sizes.x;
allocation.height = sizes.y;
- GTK.gtk_widget_size_allocate (boxHandle, allocation);
+ gtk_widget_size_allocate(boxHandle, allocation, -1);
}
return result;
}
@@ -908,8 +1017,20 @@ void setFontDescription (long fontDesc) {
return;
} else {
super.setFontDescription (fontDesc);
- if (labelHandle != 0) setFontDescription (labelHandle, fontDesc);
- if (imageHandle != 0) setFontDescription (imageHandle, fontDesc);
+
+ if (GTK.GTK4) {
+ if (labelHandle != 0) setFontDescription(labelHandle, fontDesc);
+ } else {
+ /*
+ * GTK3 Workaround for bug which causes incorrect size
+ * calculation when the button (radio/check) is set active
+ * before setting font description.
+ */
+ boolean selected = getSelection();
+ if (selected) setSelection(!selected);
+ if (labelHandle != 0) setFontDescription(labelHandle, fontDesc);
+ setSelection(selected);
+ }
}
}
@@ -929,31 +1050,42 @@ void setForegroundGdkRGBA (GdkRGBA rgba) {
setForegroundGdkRGBA (fixedHandle, rgba);
if (labelHandle != 0) setForegroundGdkRGBA (labelHandle, rgba);
if (imageHandle != 0) setForegroundGdkRGBA (imageHandle, rgba);
-
- /*
- * Feature in GTK3: GtkCheckButton & its descendant GtkRadioButton are often invisible or
- * very hard to see with certain themes that don't define an icon for Check/Radio buttons.
- * Giving them a border color that matches the text color ensures consistent visibility
- * across most themes. See bug 463733.
- */
- if (GTK.GTK_VERSION < OS.VERSION (3, 16, 0) && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
- gtk_swt_set_border_color (rgba);
- }
}
@Override
void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION < OS.VERSION(3, 14, 0)) {
- super.setForegroundGdkRGBA(handle, rgba);
- return;
- }
- GdkRGBA toSet = rgba == null ? display.COLOR_WIDGET_FOREGROUND_RGBA : rgba;
long context = GTK.gtk_widget_get_style_context (handle);
- // Form foreground string
+ GdkRGBA toSet = rgba == null ? display.COLOR_WIDGET_FOREGROUND_RGBA : rgba;
+ String css;
String color = display.gtk_rgba_to_css_string(toSet);
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "button" : "GtkButton";
- String css = name + " {color: " + color + ";}";
+ int bits = SWT.CHECK | SWT.RADIO;
+ switch (style & bits) {
+ case SWT.CHECK:
+ css = "checkbutton {color: " + color + ";}";
+ String checkColor;
+ if (toggleButtonTheming) {
+ GdkRGBA checkRGBA = rgba == null ? display.COLOR_TOGGLE_BUTTON_FOREGROUND_RGBA : rgba;
+ checkColor = display.gtk_rgba_to_css_string(checkRGBA);
+ } else {
+ checkColor = display.gtk_rgba_to_css_string(toSet);
+ }
+ css += " check {color: " + checkColor + ";}";
+ break;
+ case SWT.RADIO:
+ css = "radiobutton {color: " + color + ";}";
+ String radioColor;
+ if (toggleButtonTheming) {
+ GdkRGBA radioRGBA = rgba == null ? display.COLOR_TOGGLE_BUTTON_FOREGROUND_RGBA : rgba;
+ radioColor = display.gtk_rgba_to_css_string(radioRGBA);
+ } else {
+ radioColor = display.gtk_rgba_to_css_string(toSet);
+ }
+ css += " radio {color: " + radioColor + ";}";
+ break;
+ default:
+ css = "button {color: " + color + ";}";
+ }
// Cache foreground color
cssForeground = css;
@@ -963,28 +1095,6 @@ void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
gtk_css_provider_load_from_css(context, finalCss);
}
-private void gtk_swt_set_border_color (GdkRGBA rgba) {
- String css_string = "* {\n";
- if (rgba != null) {
- String css_color = display.gtk_rgba_to_css_string (rgba);
- css_string += "border-color: " + css_color + ";\n";
- }
- css_string += "}\n";
-
- String finalCss;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Cache foreground color
- cssForeground += "\n" + css_string;
- finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.FOREGROUND);
- } else {
- finalCss = css_string;
- }
-
- // Apply the CSS
- long context = GTK.gtk_widget_get_style_context (handle);
- gtk_css_provider_load_from_css (context, finalCss);
-}
-
/**
* Sets the grayed state of the receiver. This state change
* only applies if the control was created with the SWT.CHECK
@@ -1003,10 +1113,13 @@ public void setGrayed (boolean grayed) {
checkWidget();
if ((style & SWT.CHECK) == 0) return;
this.grayed = grayed;
- if (grayed && GTK.gtk_toggle_button_get_active (handle)) {
- GTK.gtk_toggle_button_set_inconsistent (handle, true);
+
+ if (GTK.GTK4) {
+ boolean inconsistent = grayed && GTK4.gtk_check_button_get_active(handle);
+ GTK4.gtk_check_button_set_inconsistent(handle, inconsistent);
} else {
- GTK.gtk_toggle_button_set_inconsistent (handle, false);
+ boolean inconsistent = grayed && GTK.gtk_toggle_button_get_active(handle);
+ GTK3.gtk_toggle_button_set_inconsistent(handle, inconsistent);
}
}
@@ -1029,21 +1142,38 @@ public void setGrayed (boolean grayed) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setImage (Image image) {
- checkWidget ();
+public void setImage(Image image) {
+ checkWidget();
+ if ((style & SWT.ARROW) != 0) return;
+ disposeDefaultDisabledImage();
+ if (!enabled && defaultDisableImage != image && defaultDisableImage != null) {
+ return;
+ }
+ this.image = image;
+ _setImage(image);
+}
+
+private void _setImage (Image image) {
+ checkWidget();
if ((style & SWT.ARROW) != 0) return;
- if (imageList != null) imageList.dispose ();
- imageList = null;
+
if (image != null) {
- if (image.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
- imageList = new ImageList ();
- int imageIndex = imageList.add (image);
- long pixbuf = imageList.getPixbuf (imageIndex);
- gtk_image_set_from_gicon(imageHandle, pixbuf);
+ if (image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_picture_set_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, image.surface);
+ }
} else {
- gtk_image_set_from_gicon (imageHandle, 0);
+ if (GTK.GTK4) {
+ GTK4.gtk_picture_set_paintable(imageHandle, 0);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, 0);
+ }
}
- this.image = image;
updateWidgetsVisibility();
_setAlignment (style);
}
@@ -1057,10 +1187,10 @@ void setOrientation (boolean create) {
if (labelHandle != 0) GTK.gtk_widget_set_direction (labelHandle, dir);
if (imageHandle != 0) GTK.gtk_widget_set_direction (imageHandle, dir);
if (arrowHandle != 0) {
- byte arrowType [] = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_NAMED_ICON_GO_NEXT : GTK.GTK_NAMED_ICON_GO_PREVIOUS;
+ byte[] arrowType = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_NAMED_ICON_GO_NEXT : GTK.GTK_NAMED_ICON_GO_PREVIOUS;
switch (style & (SWT.LEFT | SWT.RIGHT)) {
- case SWT.LEFT: GTK.gtk_image_set_from_icon_name (arrowHandle, arrowType, GTK.GTK_ICON_SIZE_MENU); break;
- case SWT.RIGHT: GTK.gtk_image_set_from_icon_name (arrowHandle, arrowType, GTK.GTK_ICON_SIZE_MENU); break;
+ case SWT.LEFT: GTK3.gtk_image_set_from_icon_name (arrowHandle, arrowType, GTK.GTK_ICON_SIZE_MENU); break;
+ case SWT.RIGHT: GTK3.gtk_image_set_from_icon_name (arrowHandle, arrowType, GTK.GTK_ICON_SIZE_MENU); break;
}
}
}
@@ -1086,15 +1216,30 @@ public void setSelection (boolean selected) {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return;
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CLICKED);
- GTK.gtk_toggle_button_set_active (handle, selected);
+
+ if (GTK.GTK4 && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
+ GTK4.gtk_check_button_set_active(handle, selected);
+ } else {
+ GTK.gtk_toggle_button_set_active(handle, selected);
+ }
+
if ((style & SWT.CHECK) != 0) {
- if (selected && grayed) {
- GTK.gtk_toggle_button_set_inconsistent (handle, true);
+ boolean inconsistent = selected && grayed;
+
+ if (GTK.GTK4) {
+ GTK4.gtk_check_button_set_inconsistent(handle, inconsistent);
} else {
- GTK.gtk_toggle_button_set_inconsistent (handle, false);
+ GTK3.gtk_toggle_button_set_inconsistent(handle, inconsistent);
}
}
- if ((style & SWT.RADIO) != 0) GTK.gtk_toggle_button_set_active (groupHandle, !selected);
+ if ((style & SWT.RADIO) != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_check_button_set_active(groupHandle, !selected);
+ } else {
+ GTK.gtk_toggle_button_set_active (groupHandle, !selected);
+ }
+ }
+
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CLICKED);
}
@@ -1201,4 +1346,55 @@ long windowProc (long handle, long arg0, long user_data) {
return super.windowProc(handle, arg0, user_data);
}
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ return 0;
+}
+
+/**
+* Enables the receiver if the argument is <code>true</code>,
+* and disables it otherwise.
+* <p>
+* A disabled control is typically
+* not selectable from the user interface and draws with an
+* inactive or "grayed" look.
+* </p>
+*
+* @param enabled the new enabled state
+*
+* @exception SWTException <ul>
+* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+* </ul>
+*/
+@Override
+public void setEnabled (boolean enabled) {
+ checkWidget();
+ if (this.enabled == enabled) return;
+ this.enabled = enabled;
+
+ super.setEnabled(enabled);
+
+ if (!enabled) {
+ if (defaultDisableImage == null && image != null) {
+ defaultDisableImage = new Image(getDisplay(), image, SWT.IMAGE_DISABLE);
+ }
+ _setImage(defaultDisableImage);
+ }
+ if (enabled && image != null) _setImage(image);
+}
+
+private void disposeDefaultDisabledImage() {
+ if (defaultDisableImage != null) {
+ defaultDisableImage.dispose();
+ defaultDisableImage = null;
+ }
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
index 81e68c30d5..24fb37f6db 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
@@ -175,7 +175,7 @@ long gtk_draw (long widget, long cairo) {
if ( GTK.GTK_VERSION < OS.VERSION(3, 22, 0)) {
boolean isFocus = caret != null && caret.isFocusCaret ();
if (isFocus) caret.killFocus ();
- result = super.gtk_draw (widget, cairo);
+ result = super.gtk_draw (widget, cairo);
if (isFocus) caret.setFocus ();
} else {
result = super.gtk_draw (widget, cairo);
@@ -194,11 +194,13 @@ long gtk_draw (long widget, long cairo) {
return result;
}
-private void drawCaret (long widget, long cairo) {
+private void drawCaret(long widget, long cairo) {
if(this.isDisposed()) return;
if (cairo == 0) error(SWT.ERROR_NO_HANDLES);
+
if (drawFlag) {
Cairo.cairo_save(cairo);
+
if (caret.image != null && !caret.image.isDisposed() && caret.image.mask == 0) {
Cairo.cairo_set_source_rgb(cairo, 1, 1, 1);
Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_DIFFERENCE);
@@ -225,14 +227,14 @@ private void drawCaret (long widget, long cairo) {
int nX = caret.x;
if ((style & SWT.MIRRORED) != 0) nX = getClientWidth () - nWidth - nX;
Cairo.cairo_rectangle(cairo, nX, caret.y, nWidth, nHeight);
- }
+ }
+
Cairo.cairo_fill(cairo);
Cairo.cairo_restore(cairo);
drawFlag = false;
} else {
drawFlag = true;
- }
- return;
+ }
}
@Override
@@ -345,25 +347,23 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height,
* location the scrollbars are re-painted when scrolling, causing the
* hopping effect. See bug 480458.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- long hBarHandle = 0;
- long vBarHandle = 0;
- if (GTK.GTK_IS_SCROLLED_WINDOW(scrolledHandle)) {
- hBarHandle = GTK.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
- vBarHandle = GTK.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
- }
- GtkRequisition requisition = new GtkRequisition();
- if (hBarHandle != 0) {
- gtk_widget_get_preferred_size (hBarHandle, requisition);
- if (requisition.height > 0) {
- srcRect.y = y - requisition.height;
- }
+ long hBarHandle = 0;
+ long vBarHandle = 0;
+ if (GTK.GTK_IS_SCROLLED_WINDOW(scrolledHandle)) {
+ hBarHandle = GTK.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
+ vBarHandle = GTK.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
+ }
+ GtkRequisition requisition = new GtkRequisition();
+ if (hBarHandle != 0) {
+ gtk_widget_get_preferred_size (hBarHandle, requisition);
+ if (requisition.height > 0) {
+ srcRect.y = y - requisition.height;
}
- if (vBarHandle != 0) {
- gtk_widget_get_preferred_size (vBarHandle, requisition);
- if (requisition.width > 0) {
- srcRect.x = x - requisition.width;
- }
+ }
+ if (vBarHandle != 0) {
+ gtk_widget_get_preferred_size (vBarHandle, requisition);
+ if (requisition.width > 0) {
+ srcRect.x = x - requisition.width;
}
}
srcRect.width = width;
@@ -384,15 +384,7 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height,
redrawWidget (x, y, width, height, false, false, false);
redrawWidget (destX, destY, width, height, false, false, false);
} else {
- long cairo = 0;
- long context = 0;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- long cairo_region = GDK.gdk_window_get_visible_region(window);
- context = GDK.gdk_window_begin_draw_frame(window, cairo_region);
- cairo = GDK.gdk_drawing_context_get_cairo_context(context);
- } else {
- cairo = GDK.gdk_cairo_create(window);
- }
+ long cairo = GDK.gdk_cairo_create(window);
if (Cairo.cairo_version() < Cairo.CAIRO_VERSION_ENCODE(1, 12, 0)) {
GDK.gdk_cairo_set_source_window(cairo, window, 0, 0);
} else {
@@ -406,11 +398,7 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height,
Cairo.cairo_rectangle(cairo, copyRect.x + deltaX, copyRect.y + deltaY, copyRect.width, copyRect.height);
Cairo.cairo_clip(cairo);
Cairo.cairo_paint(cairo);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- if (context != 0) GDK.gdk_window_end_draw_frame(window, context);
- } else {
- Cairo.cairo_destroy(cairo);
- }
+ Cairo.cairo_destroy(cairo);
boolean disjoint = (destX + width < x) || (x + width < destX) || (destY + height < y) || (y + height < destY);
if (disjoint) {
cairo_rectangle_int_t rect = new cairo_rectangle_int_t();
@@ -461,9 +449,7 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height,
* Due to overlay drawing of scrollbars current method of scrolling leaves scrollbar and notifiers for them inside the canvas
* after scroll. Fix is to redraw once done.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- redraw(false);
- }
+ redraw(false);
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
index b71f625078..53773e7da7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -324,7 +324,10 @@ void killFocus () {
@Override
void releaseParent () {
super.releaseParent ();
- if (this == parent.getCaret ()) parent.setCaret (null);
+ if (parent != null && this == parent.caret) {
+ if (!parent.isDisposed()) parent.setCaret (null);
+ else parent.caret = null;
+ }
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
index cea49d7de2..cd0a73e412 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class allow the user to select a color
@@ -128,11 +130,11 @@ public RGB[] getRGBs() {
* </ul>
*/
public RGB open () {
- byte [] buffer = Converter.wcsToMbcs (title, true);
- long handle = GTK.gtk_color_chooser_dialog_new (buffer, parent.topHandle ());
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- GdkRGBA rgba;
- rgba = new GdkRGBA ();
+ byte[] buffer = Converter.javaStringToCString(title);
+ long handle = GTK.gtk_color_chooser_dialog_new(buffer, parent.topHandle());
+ Display display = parent != null ? parent.getDisplay(): Display.getCurrent();
+
+ GdkRGBA rgba = new GdkRGBA();
if (rgb != null) {
rgba.red = (double) rgb.red / 255;
rgba.green = (double) rgb.green / 255;
@@ -164,11 +166,11 @@ public RGB open () {
OS.g_free (gdkRGBAS);
}
- display.addIdleProc ();
+ display.addIdleProc();
Dialog oldModal = null;
- if (GTK.gtk_window_get_modal (handle)) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
+ if (GTK.gtk_window_get_modal(handle)) {
+ oldModal = display.getModalDialog();
+ display.setModalDialog(this);
}
int signalId = 0;
long hookId = 0;
@@ -176,38 +178,45 @@ public RGB open () {
signalId = OS.g_signal_lookup (OS.map, GTK.GTK_TYPE_WIDGET());
hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
}
- display.sendPreExternalEventDispatchEvent ();
- int response = GTK.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- display.sendPostExternalEventDispatchEvent ();
+
+ int response;
+ if (GTK.GTK4) {
+ response = SyncDialogUtil.run(display, handle, false);
+ } else {
+ display.externalEventLoop = true;
+ display.sendPreExternalEventDispatchEvent();
+ response = GTK3.gtk_dialog_run(handle);
+ display.externalEventLoop = false;
+ display.sendPostExternalEventDispatchEvent();
+ }
+
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- OS.g_signal_remove_emission_hook (signalId, hookId);
+ OS.g_signal_remove_emission_hook(signalId, hookId);
}
if (GTK.gtk_window_get_modal (handle)) {
- display.setModalDialog (oldModal);
+ display.setModalDialog(oldModal);
}
boolean success = response == GTK.GTK_RESPONSE_OK;
if (success) {
int red = 0;
int green = 0;
int blue = 0;
- rgba = new GdkRGBA ();
- GTK.gtk_color_chooser_get_rgba (handle, rgba);
+ rgba = new GdkRGBA();
+ GTK.gtk_color_chooser_get_rgba(handle, rgba);
red = (int) (rgba.red * 255);
green = (int) (rgba.green * 255);
blue = (int) (rgba.blue * 255);
- rgb = new RGB (red, green, blue);
+ rgb = new RGB(red, green, blue);
+ } else {
+ rgb = null;
}
- display.removeIdleProc ();
- GTK.gtk_widget_destroy (handle);
- if (!success) return null;
+ display.removeIdleProc();
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(handle);
+ } else {
+ GTK3.gtk_widget_destroy(handle);
+ }
return rgb;
}
@@ -239,21 +248,21 @@ public void setRGBs(RGB[] rgbs) {
this.rgbs = rgbs;
}
static String[] splitString(String text, char ch) {
- String[] substrings = new String[1];
- int start = 0, pos = 0;
- while (pos != -1) {
- pos = text.indexOf(ch, start);
- if (pos == -1) {
- substrings[substrings.length - 1] = text.substring(start);
- } else {
- substrings[substrings.length - 1] = text.substring(start, pos);
- start = pos + 1;
- String[] newSubstrings = new String[substrings.length+1];
- System.arraycopy(substrings, 0, newSubstrings, 0, substrings.length);
- substrings = newSubstrings;
- }
- }
- return substrings;
+ String[] substrings = new String[1];
+ int start = 0, pos = 0;
+ while (pos != -1) {
+ pos = text.indexOf(ch, start);
+ if (pos == -1) {
+ substrings[substrings.length - 1] = text.substring(start);
+ } else {
+ substrings[substrings.length - 1] = text.substring(start, pos);
+ start = pos + 1;
+ String[] newSubstrings = new String[substrings.length+1];
+ System.arraycopy(substrings, 0, newSubstrings, 0, substrings.length);
+ substrings = newSubstrings;
+ }
+ }
+ return substrings;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index 48e7fa637f..5f97a0847d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,12 +14,13 @@
*******************************************************************************/
package org.eclipse.swt.widgets;
-
import org.eclipse.swt.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are controls that allow the user
@@ -69,9 +70,8 @@ public class Combo extends Composite {
int fixStart = -1, fixEnd = -1;
String [] items = new String [0];
int indexSelected;
- GdkRGBA background, buttonBackground;
- String cssButtonBackground, cssButtonForeground = " ";
- long buttonProvider;
+ GdkRGBA background, foreground;
+ long cssProvider;
boolean firstDraw = true;
boolean unselected = true, fitModelToggled = false;
/**
@@ -175,25 +175,27 @@ public void add (String string) {
*
* @see #add(String)
*/
-public void add (String string, int index) {
+public void add(String string, int index) {
checkWidget();
- if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
+ if (string == null) error(SWT.ERROR_NULL_ARGUMENT);
if (!(0 <= index && index <= items.length)) {
- error (SWT.ERROR_INVALID_RANGE);
+ error(SWT.ERROR_INVALID_RANGE);
}
+
String [] newItems = new String [items.length + 1];
System.arraycopy (items, 0, newItems, 0, index);
newItems [index] = string;
System.arraycopy (items, index, newItems, index + 1, items.length - index);
items = newItems;
+
gtk_combo_box_insert(string, index);
if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) {
- GTK.gtk_container_forall (popupHandle, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
+ GTK3.gtk_container_forall (popupHandle, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
}
}
private void gtk_combo_box_insert(String string, int index) {
- byte [] buffer = Converter.wcsToMbcs (string, true);
+ byte[] buffer = Converter.wcsToMbcs(string, true);
if (handle != 0) {
gtk_combo_box_toggle_wrap(false);
GTK.gtk_combo_box_text_insert (handle, index, null, buffer);
@@ -228,10 +230,10 @@ private void gtk_combo_box_insert(String string, int index) {
* It's a poorly working hack. If list has more than +-1000 entries, then we get visual cheese and jvm crashes. </p>
*/
private void gtk_combo_box_toggle_wrap (boolean wrap) {
- if (handle == 0) return;
+ if (handle == 0 || GTK.GTK4) return;
if (!wrap) {
- if (GTK.gtk_combo_box_get_wrap_width(handle) == 1) {
- GTK.gtk_combo_box_set_wrap_width(handle, 0);
+ if (GTK3.gtk_combo_box_get_wrap_width(handle) == 1) {
+ GTK3.gtk_combo_box_set_wrap_width(handle, 0);
}
} else {
if (delayedEnableWrap) {
@@ -240,7 +242,7 @@ private void gtk_combo_box_toggle_wrap (boolean wrap) {
delayedEnableWrap = true;
display.asyncExec(() -> {
if (!isDisposed() && handle != 0) {
- GTK.gtk_combo_box_set_wrap_width(handle, 1);
+ GTK3.gtk_combo_box_set_wrap_width(handle, 1);
delayedEnableWrap = false;
}
});
@@ -447,7 +449,12 @@ void clearText () {
OS.g_free (ptr [0]);
}
} else {
- GTK.gtk_entry_set_text (entryHandle, new byte[1]);
+ if (GTK.GTK4) {
+ long bufferHandle = GTK4.gtk_entry_get_buffer(entryHandle);
+ GTK.gtk_entry_buffer_delete_text(bufferHandle, 0, -1);
+ } else {
+ GTK3.gtk_entry_set_text(entryHandle, new byte[1]);
+ }
}
GTK.gtk_combo_box_set_active (handle, -1);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
@@ -510,58 +517,67 @@ Point computeNativeSize (long h, int wHint, int hHint, boolean changed) {
*/
public void copy () {
checkWidget ();
- if (entryHandle != 0) GTK.gtk_editable_copy_clipboard (entryHandle);
+ if (entryHandle != 0) {
+ if (GTK.GTK4) {
+ long textHandle = GTK4.gtk_widget_get_first_child(entryHandle);
+ GTK4.gtk_widget_activate_action(textHandle, OS.action_copy_clipboard, null);
+ } else {
+ GTK3.gtk_editable_copy_clipboard(entryHandle);
+ }
+ }
}
@Override
void createHandle (int index) {
state |= HANDLE | MENU;
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
- long oldList = GTK.gtk_window_list_toplevels ();
+
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ if (!GTK.GTK4) GTK3.gtk_widget_set_has_window(fixedHandle, true);
+
+ long oldList = GTK.gtk_window_list_toplevels();
if ((style & SWT.READ_ONLY) != 0) {
- handle = GTK.gtk_combo_box_text_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- cellHandle = GTK.gtk_bin_get_child (handle);
- if (cellHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ handle = GTK.gtk_combo_box_text_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ cellHandle = GTK.GTK4 ? GTK4.gtk_combo_box_get_child(handle) : GTK3.gtk_bin_get_child (handle);
+ if (cellHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
gtk_combo_box_toggle_wrap(true);
} else {
handle = GTK.gtk_combo_box_text_new_with_entry();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- entryHandle = GTK.gtk_bin_get_child (handle);
- if (entryHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ entryHandle = GTK.GTK4 ? GTK4.gtk_combo_box_get_child(handle) : GTK3.gtk_bin_get_child(handle);
+ if (entryHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ if (DISABLE_EMOJI && GTK.GTK_VERSION >= OS.VERSION(3, 22, 20)) {
+ GTK.gtk_entry_set_input_hints(entryHandle, GTK.GTK_INPUT_HINT_NO_EMOJI);
+ }
+
imContext = OS.imContextLast();
}
- popupHandle = findPopupHandle (oldList);
- GTK.gtk_container_add (fixedHandle, handle);
- textRenderer = GTK.gtk_cell_renderer_text_new ();
- if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES);
- /*
- * Feature in GTK. In order to make a read only combo box the same
- * height as an editable combo box the ypad must be set to 0. In
- * versions 2.4.x of GTK, a pad of 0 will clip some letters. The
- * fix is to set the pad to 1.
- */
- int pad = 0;
- OS.g_object_set (textRenderer, OS.ypad, pad, 0);
- /*
- * Feature in GTK. In version 2.4.9 of GTK, a warning is issued
- * when a call to gtk_cell_layout_clear() is made. The fix is to hide
- * the warning.
- */
- boolean warnings = display.getWarnings ();
- display.setWarnings (false);
+
+ //TODO: popupHandle is currently not mapped in GTK4, need to see if that is an issue.
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ popupHandle = findPopupHandle(oldList);
+ GTK3.gtk_container_add (fixedHandle, handle);
+ }
+
+ textRenderer = GTK.gtk_cell_renderer_text_new();
+ if (textRenderer == 0) error(SWT.ERROR_NO_HANDLES);
+
GTK.gtk_cell_layout_clear (handle);
- display.setWarnings (warnings);
GTK.gtk_cell_layout_pack_start (handle, textRenderer, true);
GTK.gtk_cell_layout_set_attributes (handle, textRenderer, OS.text, 0, 0);
+
/*
* Feature in GTK. Toggle button creation differs between GTK versions. The
* fix is to call size_request() to force the creation of the button
* for those versions of GTK that defer the creation.
*/
- menuHandle = findMenuHandle ();
+ menuHandle = findMenuHandle();
if (menuHandle != 0) OS.g_object_ref (menuHandle);
buttonHandle = findButtonHandle ();
if (buttonHandle != 0) OS.g_object_ref (buttonHandle);
@@ -581,7 +597,7 @@ void createHandle (int index) {
* Find the arrowHandle, which is the handle belonging to the GtkIcon
* drop down arrow. See bug 539367.
*/
- if ((style & SWT.READ_ONLY) != 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if ((style & SWT.READ_ONLY) != 0) {
if (cellBoxHandle != 0) arrowHandle = findArrowHandle();
}
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
@@ -605,7 +621,14 @@ void createHandle (int index) {
*/
public void cut () {
checkWidget ();
- if (entryHandle != 0) GTK.gtk_editable_cut_clipboard (entryHandle);
+ if (entryHandle != 0) {
+ if (GTK.GTK4) {
+ long textHandle = GTK4.gtk_widget_get_first_child(entryHandle);
+ GTK4.gtk_widget_activate_action(textHandle, OS.action_cut_clipboard, null);
+ } else {
+ GTK3.gtk_editable_cut_clipboard(entryHandle);
+ }
+ }
}
@Override
@@ -613,10 +636,6 @@ GdkRGBA defaultBackground () {
return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).handle;
}
-GdkRGBA defaultButtonBackground () {
- return display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).handle;
-}
-
@Override
void deregister () {
super.deregister ();
@@ -629,13 +648,16 @@ void deregister () {
}
@Override
-boolean filterKey (int keyval, long event) {
+boolean filterKey (long event) {
int time = GDK.gdk_event_get_time (event);
if (time != lastEventTime) {
lastEventTime = time;
long imContext = imContext ();
if (imContext != 0) {
- return GTK.gtk_im_context_filter_keypress (imContext, event);
+ if (GTK.GTK4)
+ return GTK4.gtk_im_context_filter_keypress (imContext, event);
+ else
+ return GTK3.gtk_im_context_filter_keypress (imContext, event);
}
}
gdkEventKey = event;
@@ -691,16 +713,30 @@ long findButtonHandle() {
* an instance of button.
*/
long result = 0;
- long childHandle = handle;
- /*
- * The only direct child of GtkComboBox since 3.20 is GtkBox and
- * gtk_container_forall iterates over direct children only so handle for the
- * GtkBox has to be retrieved first.
- * As it's internal child one can't get it in other way.
- */
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_container_forall(handle, display.allChildrenProc, 0);
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(handle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ if (GTK.GTK_IS_BOX(child)) {
+ buttonBoxHandle = child;
+ break;
+ }
+ }
+
+ for (long child = GTK4.gtk_widget_get_first_child(buttonBoxHandle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ if (GTK.GTK_IS_BUTTON(child)) {
+ result = child;
+ break;
+ }
+ }
+ } else {
+ long childHandle = handle;
+ /*
+ * The only direct child of GtkComboBox since 3.20 is GtkBox and
+ * gtk_container_forall iterates over direct children only so handle for the
+ * GtkBox has to be retrieved first.
+ * As it's internal child one can't get it in other way.
+ */
+ GTK3.gtk_container_forall(handle, display.allChildrenProc, 0);
if (display.allChildren != 0) {
long list = display.allChildren;
while (list != 0) {
@@ -715,40 +751,15 @@ long findButtonHandle() {
display.allChildren = 0;
}
buttonBoxHandle = childHandle;
- }
- GTK.gtk_container_forall (childHandle, display.allChildrenProc, 0);
- if (display.allChildren != 0) {
- long list = display.allChildren;
- while (list != 0) {
- long widget = OS.g_list_data (list);
- if (GTK.GTK_IS_BUTTON (widget)) {
- result = widget;
- break;
- }
- list = OS.g_list_next (list);
- }
- OS.g_list_free (display.allChildren);
- display.allChildren = 0;
- }
- return result;
-}
-
-long findArrowHandle() {
- long result = 0;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) && cellBoxHandle != 0) {
- GTK.gtk_container_forall (cellBoxHandle, display.allChildrenProc, 0);
+ GTK3.gtk_container_forall (childHandle, display.allChildrenProc, 0);
if (display.allChildren != 0) {
long list = display.allChildren;
while (list != 0) {
long widget = OS.g_list_data (list);
- /*
- * Feature in GTK: GtkIcon isn't public, so we have to do
- * type lookups using gtk_widget_get_name(). See bug 539367.
- */
- String name = display.gtk_widget_get_name(widget);
- if (name != null && name.contains("GtkIcon")) {
+ if (GTK.GTK_IS_BUTTON (widget)) {
result = widget;
+ break;
}
list = OS.g_list_next (list);
}
@@ -756,26 +767,81 @@ long findArrowHandle() {
display.allChildren = 0;
}
}
+
+ return result;
+}
+
+long findArrowHandle() {
+ long result = 0;
+
+ if (cellBoxHandle != 0) {
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(cellBoxHandle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ String name = display.gtk_widget_get_name(child);
+ if (name != null && name.equals("GtkBuiltinIcon")) {
+ result = child;
+ break;
+ }
+ }
+ } else {
+ GTK3.gtk_container_forall (cellBoxHandle, display.allChildrenProc, 0);
+ if (display.allChildren != 0) {
+ long list = display.allChildren;
+ while (list != 0) {
+ long widget = OS.g_list_data (list);
+ /*
+ * Feature in GTK: GtkIcon isn't public, so we have to do
+ * type lookups using gtk_widget_get_name(). See bug 539367.
+ */
+ String name = display.gtk_widget_get_name(widget);
+ if (name != null && name.contains("GtkIcon")) {
+ result = widget;
+ }
+ list = OS.g_list_next (list);
+ }
+ OS.g_list_free (display.allChildren);
+ display.allChildren = 0;
+ }
+ }
+ }
+
return result;
}
long findMenuHandle() {
- if (popupHandle == 0) return 0;
+ /*
+ * Feature in GTK. There is no API to query the menu
+ * handle from a combo box. So we walk the popupHandle to
+ * find the handle for the menu.
+ */
long result = 0;
- GTK.gtk_container_forall (popupHandle, display.allChildrenProc, 0);
- if (display.allChildren != 0) {
- long list = display.allChildren;
- while (list != 0) {
- long widget = OS.g_list_data (list);
- if (OS.G_OBJECT_TYPE (widget) == GTK.GTK_TYPE_MENU ()) {
- result = widget;
+
+ if(GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(handle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ String name = display.gtk_widget_get_name(child);
+ if (name != null && name.equals("GtkTreePopover")) {
+ result = GTK4.gtk_widget_get_first_child(child);
break;
}
- list = OS.g_list_next (list);
}
- OS.g_list_free (display.allChildren);
- display.allChildren = 0;
+ } else if(popupHandle != 0) {
+ GTK3.gtk_container_forall(popupHandle, display.allChildrenProc, 0);
+ if (display.allChildren != 0) {
+ long list = display.allChildren;
+ while (list != 0) {
+ long widget = OS.g_list_data(list);
+ String name = display.gtk_widget_get_name(widget);
+ if (name != null && name.contains("gtk-combobox-popup-menu")) {
+ result = widget;
+ break;
+ }
+ list = OS.g_list_next(list);
+ }
+ OS.g_list_free(display.allChildren);
+ display.allChildren = 0;
+ }
}
+
return result;
}
@@ -804,7 +870,11 @@ void fixIM () {
if (gdkEventKey != 0 && gdkEventKey != -1) {
long imContext = imContext ();
if (imContext != 0) {
- GTK.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+ if (GTK.GTK4)
+ GTK4.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+ else
+ GTK3.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+
gdkEventKey = -1;
return;
}
@@ -841,7 +911,7 @@ void hookEvents () {
OS.g_signal_connect_closure (entryHandle, OS.insert_text, display.getClosure (INSERT_TEXT), false);
OS.g_signal_connect_closure (entryHandle, OS.delete_text, display.getClosure (DELETE_TEXT), false);
OS.g_signal_connect_closure (entryHandle, OS.activate, display.getClosure (ACTIVATE), false);
- OS.g_signal_connect_closure (entryHandle, OS.populate_popup, display.getClosure (POPULATE_POPUP), false);
+ if (!GTK.GTK4) OS.g_signal_connect_closure (entryHandle, OS.populate_popup, display.getClosure (POPULATE_POPUP), false);
}
hookEvents(new long [] {buttonHandle, entryHandle, menuHandle});
@@ -856,50 +926,48 @@ void hookEvents () {
}
void hookEvents(long [] handles) {
- int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK;
- for (int i=0; i<handles.length; i++) {
- long eventHandle = handles [i];
+ for (int i = 0; i < handles.length; i++) {
+ long eventHandle = handles[i];
if (eventHandle != 0) {
- /* Connect the mouse signals */
if (GTK.GTK4) {
- long motionController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(eventHandle, motionController);
- long motionAddress = display.enterMotionScrollCallback.getAddress();
- OS.g_signal_connect (motionController, OS.motion, motionAddress, MOTION);
- OS.g_signal_connect (motionController, OS.motion, motionAddress, MOTION_INVERSE);
+ long motionController = GTK4.gtk_event_controller_motion_new();
+ GTK4.gtk_widget_add_controller(eventHandle, motionController);
+ OS.g_signal_connect (motionController, OS.motion, display.enterMotionProc, MOTION);
+ OS.g_signal_connect (motionController, OS.motion, display.enterMotionProc, MOTION_INVERSE);
+
+ long gestureController = GTK4.gtk_gesture_click_new();
+ GTK4.gtk_widget_add_controller(eventHandle, gestureController);
+ OS.g_signal_connect(gestureController, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
+ OS.g_signal_connect(gestureController, OS.released, display.gesturePressReleaseProc, GESTURE_RELEASED);
+
+ //TODO: GTK4 event-after
} else {
- GTK.gtk_widget_add_events (eventHandle, eventMask);
+ int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK;
+ GTK3.gtk_widget_add_events (eventHandle, eventMask);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.getClosure (MOTION_NOTIFY_EVENT), false);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.getClosure (MOTION_NOTIFY_EVENT_INVERSE), true);
- }
- if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- } else {
+
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT), false);
- }
- /*
- * Feature in GTK3. Events such as mouse move are propagated up
- * the widget hierarchy and are seen by the parent. This is the
- * correct GTK behavior but not correct for SWT. The fix is to
- * hook a signal after and stop the propagation using a negative
- * event number to distinguish this case.
- */
- if (!GTK.GTK4) {
+
+ /*
+ * Feature in GTK3. Events such as mouse move are propagated up
+ * the widget hierarchy and are seen by the parent. This is the
+ * correct GTK behavior but not correct for SWT. The fix is to
+ * hook a signal after and stop the propagation using a negative
+ * event number to distinguish this case.
+ */
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT_INVERSE), true);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT_INVERSE), true);
- }
- /* Connect the event_after signal for both key and mouse */
- if (eventHandle != focusHandle ()) {
- if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false);
- } else {
+ /* Connect the event_after signal for both key and mouse */
+ if (eventHandle != focusHandle ()) {
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false);
}
- }
- if (OS.G_OBJECT_TYPE (eventHandle) == GTK.GTK_TYPE_MENU ()) {
- OS.g_signal_connect_closure(eventHandle, OS.selection_done, display.getClosure (SELECTION_DONE), true);
+
+ if (OS.G_OBJECT_TYPE (eventHandle) == GTK3.GTK_TYPE_MENU ()) {
+ OS.g_signal_connect_closure(eventHandle, OS.selection_done, display.getClosure (SELECTION_DONE), true);
+ }
}
}
}
@@ -925,9 +993,10 @@ long imContext () {
public void deselect (int index) {
checkWidget();
if (index < 0 || index >= items.length) return;
- if (GTK.gtk_combo_box_get_active (handle) == index) {
- clearText ();
- }
+
+ if (GTK.gtk_combo_box_get_active (handle) == index) {
+ clearText ();
+ }
}
/**
@@ -946,7 +1015,7 @@ public void deselect (int index) {
*/
public void deselectAll () {
checkWidget();
- clearText ();
+ clearText();
}
@Override
@@ -954,7 +1023,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean dragOnTimeout, boolean[
if (filter && entryHandle != 0) {
int [] index = new int [1];
int [] trailing = new int [1];
- long layout = GTK.gtk_entry_get_layout (entryHandle);
+ long layout = GTK3.gtk_entry_get_layout (entryHandle);
OS.pango_layout_xy_to_index (layout, x * OS.PANGO_SCALE, y * OS.PANGO_SCALE, index, trailing);
long ptr = OS.pango_layout_get_text (layout);
int position = (int)OS.g_utf8_pointer_to_offset (ptr, ptr + index[0]) + trailing[0];
@@ -979,7 +1048,30 @@ long enterExitHandle () {
@Override
long eventWindow () {
- return paintWindow ();
+ if ((style & SWT.READ_ONLY) != 0) {
+ GTK.gtk_widget_realize (handle);
+ return gtk_widget_get_window (handle);
+ }
+
+ /*
+ * Single-line Text (GtkEntry in GTK) uses a GDK_INPUT_ONLY
+ * internal window. This window can't be used for any kind
+ * of painting, but this is the window to which functions
+ * like Control.setCursor() should apply.
+ */
+ GTK.gtk_widget_realize (entryHandle);
+ long window = gtk_widget_get_window (entryHandle);
+ // Find the internal GDK_INPUT_ONLY window
+ long children = GDK.gdk_window_get_children (window);
+ if (children != 0) {
+ long childrenIterator = children;
+ do {
+ window = OS.g_list_data (childrenIterator);
+ } while ((childrenIterator = OS.g_list_next (childrenIterator)) != 0);
+ }
+ OS.g_list_free (children);
+
+ return window;
}
@Override
@@ -1012,10 +1104,10 @@ Point getCaretLocationInPixels () {
return new Point (0, 0);
}
int index = GTK.gtk_editable_get_position (entryHandle);
- index = GTK.gtk_entry_text_index_to_layout_index (entryHandle, index);
+ index = GTK3.gtk_entry_text_index_to_layout_index (entryHandle, index);
int [] offset_x = new int [1], offset_y = new int [1];
- GTK.gtk_entry_get_layout_offsets (entryHandle, offset_x, offset_y);
- long layout = GTK.gtk_entry_get_layout (entryHandle);
+ GTK3.gtk_entry_get_layout_offsets (entryHandle, offset_x, offset_y);
+ long layout = GTK3.gtk_entry_get_layout (entryHandle);
PangoRectangle pos = new PangoRectangle ();
OS.pango_layout_index_to_pos (layout, index, pos);
Point thickness = getThickness (entryHandle);
@@ -1044,7 +1136,7 @@ public int getCaretPosition () {
if ((style & SWT.READ_ONLY) != 0) {
return 0;
}
- long ptr = GTK.gtk_entry_get_text (entryHandle);
+ long ptr = GTK3.gtk_entry_get_text (entryHandle);
return (int)OS.g_utf8_offset_to_utf16_offset (ptr, GTK.gtk_editable_get_position (entryHandle));
}
@@ -1056,6 +1148,14 @@ GdkRGBA getContextBackgroundGdkRGBA () {
return defaultBackground();
}
+@Override
+GdkRGBA getContextColorGdkRGBA () {
+ if (foreground != null) {
+ return foreground;
+ }
+ return display.COLOR_WIDGET_FOREGROUND_RGBA;
+}
+
/**
* Returns the item at the given, zero-relative index in the
* receiver's list. Throws an exception if the index is out
@@ -1108,7 +1208,12 @@ public int getItemCount () {
*/
public int getItemHeight () {
checkWidget();
- return fontHeight (getFontDescription (), handle);
+
+ long fontDesc = getFontDescription ();
+ int result = fontHeight (fontDesc, handle);
+ OS.pango_font_description_free(fontDesc);
+
+ return result;
}
/**
@@ -1127,7 +1232,7 @@ public int getItemHeight () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public String [] getItems () {
+public String[] getItems() {
checkWidget();
String [] result = new String [items.length];
System.arraycopy (items, 0, result, 0, items.length);
@@ -1211,7 +1316,7 @@ public Point getSelection () {
int [] end = new int [1];
if (entryHandle != 0) {
GTK.gtk_editable_get_selection_bounds (entryHandle, start, end);
- long ptr = GTK.gtk_entry_get_text (entryHandle);
+ long ptr = GTK3.gtk_entry_get_text (entryHandle);
start[0] = (int)OS.g_utf8_offset_to_utf16_offset (ptr, start[0]);
end[0] = (int)OS.g_utf8_offset_to_utf16_offset (ptr, end[0]);
}
@@ -1248,13 +1353,24 @@ public int getSelectionIndex () {
*/
public String getText () {
checkWidget();
+
if (entryHandle != 0) {
- long str = GTK.gtk_entry_get_text (entryHandle);
- if (str == 0) return "";
- int length = C.strlen (str);
- byte [] buffer = new byte [length];
- C.memmove (buffer, str, length);
- return new String (Converter.mbcsToWcs (buffer));
+ long str = 0;
+ if (GTK.GTK4) {
+ long bufferHandle = GTK4.gtk_entry_get_buffer(entryHandle);
+ str = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ str = GTK3.gtk_entry_get_text(entryHandle);
+ }
+
+ if (str == 0) {
+ return "";
+ } else {
+ int length = C.strlen (str);
+ byte[] buffer = new byte[length];
+ C.memmove(buffer, str, length);
+ return new String (Converter.mbcsToWcs(buffer));
+ }
} else {
int index = GTK.gtk_combo_box_get_active (handle);
return index != -1 ? getItem (index) : "";
@@ -1350,9 +1466,13 @@ long gtk_button_press_event (long widget, long event) {
* send the mouse event from the event_after handler.
*/
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(event);
+ } else {
+ GDK.gdk_event_get_button(event, eventButton);
+ }
+
int eventType = GDK.gdk_event_get_event_type(event);
- eventType = fixGdkEventTypeValues(eventType);
if (eventType == GDK.GDK_BUTTON_PRESS && eventButton[0] == 1) {
return gtk_button_press_event(widget, event, false);
}
@@ -1391,7 +1511,7 @@ long gtk_changed (long widget) {
* is to post the modify event when the user is typing.
*/
boolean keyPress = false;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK.GTK4 ? 0 : GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int eventType = GDK.gdk_event_get_event_type(eventPtr);
eventType = fixGdkEventTypeValues(eventType);
@@ -1452,7 +1572,14 @@ long gtk_commit (long imContext, long text) {
@Override
long gtk_delete_text (long widget, long start_pos, long end_pos) {
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
- long ptr = GTK.gtk_entry_get_text (entryHandle);
+ long ptr;
+ if(GTK.GTK4) {
+ long bufferPtr = GTK4.gtk_entry_get_buffer(entryHandle);
+ ptr = GTK.gtk_entry_buffer_get_text(bufferPtr);
+ }
+ else {
+ ptr = GTK3.gtk_entry_get_text(entryHandle);
+ }
if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1);
int start = (int)OS.g_utf8_offset_to_utf16_offset (ptr, start_pos);
int end = (int)OS.g_utf8_offset_to_utf16_offset (ptr, end_pos);
@@ -1485,7 +1612,18 @@ void adjustChildClipping (long widget) {
* This ensures the text never draws longer than the Combo itself.
* See bug 539367.
*/
- if (widget == cellHandle && (style & SWT.READ_ONLY) != 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) && !unselected) {
+ if (widget == cellHandle && (style & SWT.READ_ONLY) != 0 && !unselected) {
+ /*
+ * Currently in GTK4, when a new combo is created it does not follow setBounds.
+ * This could be the reason gtk_cell_view_set_fit_model does not work like in GTK3.
+ * This bug will need to be revisited once setBounds is working again.
+ * See bug 567215
+ */
+ if(GTK.GTK4) {
+ super.adjustChildClipping(widget);
+ return;
+ }
+
/*
* Set "fit-model" mode for READ_ONLY Combos on GTK3.20+ to false.
* This means the GtkCellView rendering the text can be set to
@@ -1501,7 +1639,7 @@ void adjustChildClipping (long widget) {
GTK.gtk_widget_get_allocation(cellHandle, cellViewAllocation);
cellViewAllocation.width = (iconAllocation.x - iconAllocation.width);
- GTK.gtk_widget_set_clip(widget, cellViewAllocation);
+ GTK3.gtk_widget_set_clip(widget, cellViewAllocation);
return;
} else {
super.adjustChildClipping(widget);
@@ -1524,21 +1662,19 @@ long gtk_draw (long widget, long cairo) {
* An additional fix was implemented to support non-READ_ONLY Combos, as well
* as the case when one Composite has multiple Combos within it -- see bug 535323.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- long parentHandle = GTK.gtk_widget_get_parent(fixedHandle);
- if (parentHandle != 0) {
- if (parent.fixClipHandle == 0) parent.fixClipHandle = parentHandle;
- if (firstDraw) {
- if ((style & SWT.READ_ONLY) != 0) {
- long [] array = {fixedHandle, handle, buttonBoxHandle, buttonHandle, cellBoxHandle, cellHandle};
- parent.fixClipMap.put(this, array);
- } else {
- long [] array = {fixedHandle, handle, entryHandle, buttonBoxHandle, buttonHandle};
- parent.fixClipMap.put(this, array);
- }
- firstDraw = false;
- GTK.gtk_widget_queue_draw(parentHandle);
+ long parentHandle = GTK.gtk_widget_get_parent(fixedHandle);
+ if (parentHandle != 0) {
+ if (parent.fixClipHandle == 0) parent.fixClipHandle = parentHandle;
+ if (firstDraw) {
+ if ((style & SWT.READ_ONLY) != 0) {
+ long [] array = {fixedHandle, handle, buttonBoxHandle, buttonHandle, cellBoxHandle, cellHandle};
+ parent.fixClipMap.put(this, array);
+ } else {
+ long [] array = {fixedHandle, handle, entryHandle, buttonBoxHandle, buttonHandle};
+ parent.fixClipMap.put(this, array);
}
+ firstDraw = false;
+ GTK.gtk_widget_queue_draw(parentHandle);
}
}
return super.gtk_draw(widget, cairo);
@@ -1564,13 +1700,21 @@ long gtk_event_after (long widget, long gdkEvent) {
switch (eventType) {
case GDK.GDK_BUTTON_PRESS: {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(gdkEvent, eventButton);
+ int [] eventState = new int [1];
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(gdkEvent);
+ eventState[0] = GDK.gdk_event_get_modifier_state(gdkEvent);
+ } else {
+ GDK.gdk_event_get_button(gdkEvent, eventButton);
+ GDK.gdk_event_get_state(gdkEvent, eventState);
+ }
+
int eventTime = GDK.gdk_event_get_time(gdkEvent);
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(gdkEvent, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(gdkEvent, eventState);
+
if (eventButton[0] == 1) {
if (!sendMouseEvent (SWT.MouseDown, eventButton[0], display.clickCount, 0, false, eventTime, eventRX[0], eventRY[0], false, eventState[0])) {
return 1;
@@ -1585,24 +1729,16 @@ long gtk_event_after (long widget, long gdkEvent) {
if ((style & SWT.READ_ONLY) == 0) {
boolean [] focusIn = new boolean [1];
if (GTK.GTK4) {
- GDK.gdk_event_get_focus_in(gdkEvent, focusIn);
+ focusIn[0] = GDK.gdk_focus_event_get_in(gdkEvent);
} else {
GdkEventFocus gdkEventFocus = new GdkEventFocus ();
- OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
+ GTK3.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
focusIn[0] = gdkEventFocus.in != 0;
}
if (focusIn[0]) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_widget_set_focus_on_click(handle, false);
- } else {
- GTK.gtk_combo_box_set_focus_on_click (handle, false);
- }
+ GTK.gtk_widget_set_focus_on_click(handle, false);
} else {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_widget_set_focus_on_click(handle, true);
- } else {
- GTK.gtk_combo_box_set_focus_on_click (handle, true);
- }
+ GTK.gtk_widget_set_focus_on_click(handle, true);
}
}
break;
@@ -1626,7 +1762,15 @@ long gtk_insert_text (long widget, long new_text, long new_text_length, long pos
String oldText = new String (Converter.mbcsToWcs (buffer));
int [] pos = new int [1];
C.memmove (pos, position, 4);
- long ptr = GTK.gtk_entry_get_text (entryHandle);
+ long ptr;
+ if(GTK.GTK4) {
+ long bufferPtr = GTK4.gtk_entry_get_buffer(entryHandle);
+ ptr = GTK.gtk_entry_buffer_get_text(bufferPtr);
+ }
+ else {
+ ptr = GTK3.gtk_entry_get_text (entryHandle);
+ }
+
if (pos [0] == -1) pos [0] = (int)OS.g_utf8_strlen (ptr, -1);
int start = (int)OS.g_utf8_offset_to_utf16_offset (ptr, pos [0]);
String newText = verifyText (oldText, start, start);
@@ -1662,9 +1806,9 @@ long gtk_insert_text (long widget, long new_text, long new_text_length, long pos
long gtk_key_press_event (long widget, long event) {
long result = super.gtk_key_press_event (widget, event);
if (result != 0) {
- gdkEventKey = 0;
- fixIM ();
- return result;
+ gdkEventKey = 0;
+ fixIM ();
+ return result;
}
if (gdkEventKey == -1) result = 1;
gdkEventKey = 0;
@@ -1672,14 +1816,19 @@ long gtk_key_press_event (long widget, long event) {
int oldIndex = GTK.gtk_combo_box_get_active (handle);
int newIndex = oldIndex;
int [] eventKeyval = new int [1];
- GDK.gdk_event_get_keyval(event, eventKeyval);
+ if (GTK.GTK4) {
+ eventKeyval[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, eventKeyval);
+ }
+
switch (eventKeyval[0]) {
case GDK.GDK_Down:
case GDK.GDK_KP_Down:
- if (oldIndex != (items.length - 1)) {
+ if (oldIndex != (items.length - 1)) {
newIndex = oldIndex + 1;
- }
- break;
+ }
+ break;
case GDK.GDK_Up:
case GDK.GDK_KP_Up:
if (oldIndex != -1 && oldIndex != 0) {
@@ -1693,13 +1842,13 @@ long gtk_key_press_event (long widget, long event) {
* gtk_combo_box_entry.
*/
case GDK.GDK_Page_Up:
- case GDK.GDK_KP_Page_Up:
- newIndex = 0;
- break;
- case GDK.GDK_Page_Down:
- case GDK.GDK_KP_Page_Down:
- newIndex = items.length - 1;
- break;
+ case GDK.GDK_KP_Page_Up:
+ newIndex = 0;
+ break;
+ case GDK.GDK_Page_Down:
+ case GDK.GDK_KP_Page_Down:
+ newIndex = items.length - 1;
+ break;
}
if (newIndex != oldIndex) {
GTK.gtk_combo_box_set_active (handle, newIndex);
@@ -1713,7 +1862,7 @@ long gtk_key_press_event (long widget, long event) {
long gtk_populate_popup (long widget, long menu) {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
GTK.gtk_widget_set_direction (menu, GTK.GTK_TEXT_DIR_RTL);
- GTK.gtk_container_forall (menu, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
+ GTK3.gtk_container_forall (menu, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
}
return 0;
}
@@ -1733,6 +1882,15 @@ long gtk_selection_done(long menushell) {
@Override
long gtk_style_updated (long widget) {
+ /*
+ * Legacy code from GTK2, probably it can already be removed.
+ * It seems to deal with the case when Combo has 'appears-as-list' style,
+ * which causes it to re-create (once) child controls in GTK's
+ * 'gtk_combo_box_check_appearance()'. However, 'appears-as-list' style is
+ * very broken, causing various crashes etc. To my understanding, no GTK3
+ * themes currently use it (search for '-GtkComboBox-appears-as-list:').
+ * Also, it was completely removed in GTK4 in commit fdc0c642 (2016-11-11).
+ */
setButtonHandle (findButtonHandle ());
setMenuHandle (findMenuHandle ());
return super.gtk_style_updated (widget);
@@ -1757,7 +1915,7 @@ long gtk_style_updated (long widget) {
*/
public int indexOf (String string) {
checkWidget();
- return indexOf (string, 0);
+ return indexOf(string, 0);
}
/**
@@ -1797,51 +1955,16 @@ boolean isFocusHandle(long widget) {
}
@Override
-long paintWindow () {
- long childHandle = entryHandle != 0 ? entryHandle : handle;
- GTK.gtk_widget_realize (childHandle);
- long window = gtk_widget_get_window (childHandle);
- if ((style & SWT.READ_ONLY) != 0) return window;
- long children = GDK.gdk_window_get_children (window);
- if (children != 0) {
- /*
- * The only direct child of GtkComboBox since 3.20 is GtkBox thus the children
- * have to be traversed to get to the entry one.
- */
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- do {
- window = OS.g_list_data (children);
- } while ((children = OS.g_list_next (children)) != 0);
- } else {
- window = OS.g_list_data (children);
- }
- }
- OS.g_list_free (children);
-
- return window;
-}
-
-@Override
long paintSurface () {
long childHandle = entryHandle != 0 ? entryHandle : handle;
GTK.gtk_widget_realize (childHandle);
long surface = gtk_widget_get_surface (childHandle);
if ((style & SWT.READ_ONLY) != 0) return surface;
- long children = GDK.gdk_surface_get_children (surface);
- if (children != 0) {
- /*
- * The only direct child of GtkComboBox since 3.20 is GtkBox thus the children
- * have to be traversed to get to the entry one.
- */
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- do {
- surface = OS.g_list_data (children);
- } while ((children = OS.g_list_next (children)) != 0);
- } else {
- surface = OS.g_list_data (children);
- }
- }
- OS.g_list_free (children);
+ /*
+ * TODO: GTK4 no access to children of the surface
+ * for combobox may need to use gtk_combo_box_get_child ().
+ * See also Bug 570331, maybe entire function just needs to be removed
+ */
return surface;
}
@@ -1862,7 +1985,7 @@ long paintSurface () {
*/
public void paste () {
checkWidget ();
- if (entryHandle != 0) GTK.gtk_editable_paste_clipboard (entryHandle);
+ if (entryHandle != 0) GTK3.gtk_editable_paste_clipboard (entryHandle);
}
@Override
@@ -1886,17 +2009,26 @@ void releaseHandle () {
super.releaseHandle ();
if (menuHandle != 0) {
OS.g_object_unref (menuHandle);
+ menuHandle = 0;
}
if (buttonHandle != 0) {
OS.g_object_unref (buttonHandle);
+ buttonHandle = 0;
}
if (buttonBoxHandle != 0) {
OS.g_object_unref (buttonBoxHandle);
+ buttonBoxHandle = 0;
}
if (cellBoxHandle != 0) {
OS.g_object_unref (cellBoxHandle);
+ cellBoxHandle = 0;
+ }
+ entryHandle = 0;
+
+ if (cssProvider != 0) {
+ OS.g_object_unref(cssProvider);
+ cssProvider = 0;
}
- cellBoxHandle = buttonBoxHandle = menuHandle = buttonHandle = entryHandle = 0;
}
@Override
@@ -2005,8 +2137,9 @@ public void remove (String string) {
*/
public void removeAll () {
checkWidget();
+
items = new String[0];
- clearText ();
+ clearText();
gtk_combo_box_text_remove_all();
}
@@ -2141,109 +2274,10 @@ public void select (int index) {
unselected = false;
}
-void setButtonBackgroundGdkRGBA (GdkRGBA rgba) {
- if (rgba == null) {
- buttonBackground = defaultButtonBackground();
- } else {
- buttonBackground = rgba;
- }
- String color = display.gtk_rgba_to_css_string (buttonBackground);
- String css = "* {background: " + color + ";}\n";
- cssButtonBackground = css;
- String finalCss = display.gtk_css_create_css_color_string (cssButtonBackground, cssButtonForeground, SWT.BACKGROUND);
- long buttonContext = GTK.gtk_widget_get_style_context(buttonHandle);
- if (buttonProvider == 0) {
- buttonProvider = GTK.gtk_css_provider_new();
- GTK.gtk_style_context_add_provider(buttonContext, buttonProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref(buttonProvider);
- }
- if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1);
- } else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1, null);
- }
-}
-
-void setButtonForegroundGdkRGBA (GdkRGBA rgba) {
- GdkRGBA toSet;
- if (rgba != null) {
- toSet = rgba;
- } else {
- toSet = display.COLOR_WIDGET_FOREGROUND_RGBA;
- }
- String color = display.gtk_rgba_to_css_string(toSet);
- String css = "* {color: " + color + ";}\n";
- cssButtonForeground = css;
- String finalCss = display.gtk_css_create_css_color_string(cssButtonBackground, cssButtonForeground, SWT.FOREGROUND);
- long buttonContext = GTK.gtk_widget_get_style_context(buttonHandle);
- if (buttonProvider == 0) {
- buttonProvider = GTK.gtk_css_provider_new();
- GTK.gtk_style_context_add_provider(buttonContext, buttonProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref(buttonProvider);
- }
- if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1);
- } else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1, null);
- }
-}
-
@Override
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
- if (rgba == null) {
- background = defaultBackground();
- } else {
- background = rgba;
- }
- // CSS to be parsed for various widgets within Combo
- String css = "* {";
- String color;
- if (rgba != null) {
- color = display.gtk_rgba_to_css_string (rgba);
- } else {
- if ((style & SWT.READ_ONLY) != 0) {
- color = display.gtk_rgba_to_css_string (display.COLOR_WIDGET_BACKGROUND_RGBA);
- } else {
- color = display.gtk_rgba_to_css_string (display.COLOR_LIST_BACKGROUND_RGBA);
- }
- }
- css += "background: " + color + ";}\n";
-
- // Set the selected background color
- GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
- GdkRGBA selectedForeground = display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT).handle;
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "entry" : "GtkEntry";
- String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? " selection" : ":selected";
- css += name + selection + " {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n";
- css += name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
-
- // Cache background color
- cssBackground = css;
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- if (entryHandle == 0 || (style & SWT.READ_ONLY) != 0) {
- // For read only Combos, we can just apply the background CSS to the GtkToggleButton.
- gtk_css_provider_load_from_css (GTK.gtk_widget_get_style_context(buttonHandle), finalCss);
- } else {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // GtkEntry and GtkToggleButton needs to be themed separately with different
- // providers for coherent background. Similar to Tree/Table headers.
- gtk_css_provider_load_from_css (GTK._gtk_widget_get_style_context(entryHandle), finalCss);
- setButtonBackgroundGdkRGBA (rgba);
- } else {
- // Maintain GTK3.12- functionality
- setBackgroundGradientGdkRGBA (GTK.gtk_widget_get_style_context (entryHandle), handle, rgba);
- super.setBackgroundGdkRGBA (GTK.gtk_widget_get_style_context (entryHandle), entryHandle, rgba);
- }
- }
- // Set the background color of the text of the drop down menu.
- OS.g_object_set (textRenderer, OS.background_rgba, rgba, 0);
-}
-
-@Override
-void setBackgroundGdkRGBA (GdkRGBA rgba) {
- super.setBackgroundGdkRGBA(rgba);
- if (entryHandle != 0) setBackgroundGdkRGBA (entryHandle, rgba);
- setBackgroundGdkRGBA (fixedHandle, rgba);
+ background = rgba;
+ updateCss();
}
@Override
@@ -2301,15 +2335,11 @@ void setFontDescription (long font) {
}
@Override
-void setForegroundGdkRGBA (GdkRGBA rgba) {
- if (entryHandle != 0) {
- setForegroundGdkRGBA (entryHandle, rgba);
- }
- if ((style & SWT.READ_ONLY) == 0 && buttonHandle != 0) {
- setButtonForegroundGdkRGBA (rgba);
- }
- OS.g_object_set (textRenderer, OS.foreground_rgba, rgba, 0);
- super.setForegroundGdkRGBA(rgba);
+void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
+ OS.g_object_set(textRenderer, OS.foreground_rgba, rgba, 0);
+
+ foreground = rgba;
+ updateCss();
}
@Override
@@ -2331,13 +2361,11 @@ void setInitialBounds () {
allocation.y = 0;
GTK.gtk_widget_set_visible(topHandle, true);
if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (topHandle, allocation, -1);
+ GTK4.gtk_widget_size_allocate (topHandle, allocation, -1);
} else {
// Prevent GTK+ allocation warnings, preferred size should be retrieved before setting allocation size.
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_widget_get_preferred_size(topHandle, null, null);
- }
- GTK.gtk_widget_set_allocation(topHandle, allocation);
+ GTK.gtk_widget_get_preferred_size(topHandle, null, null);
+ GTK3.gtk_widget_set_allocation(topHandle, allocation);
}
} else {
super.setInitialBounds();
@@ -2373,7 +2401,7 @@ public void setItem (int index, String string) {
gtk_combo_box_insert(string, index);
if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) {
- GTK.gtk_container_forall (popupHandle, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
+ GTK3.gtk_container_forall (popupHandle, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
}
}
@@ -2400,12 +2428,13 @@ public void setItems (String... items) {
this.items = new String [items.length];
System.arraycopy (items, 0, this.items, 0, items.length);
clearText ();
+
gtk_combo_box_text_remove_all();
for (int i = 0; i < items.length; i++) {
String string = items [i];
gtk_combo_box_insert(string, i);
if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) {
- GTK.gtk_container_forall (popupHandle, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
+ GTK3.gtk_container_forall (popupHandle, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
}
}
}
@@ -2451,7 +2480,7 @@ void setOrientation (boolean create) {
if (entryHandle != 0) GTK.gtk_widget_set_direction (entryHandle, dir);
if (cellHandle != 0) GTK.gtk_widget_set_direction (cellHandle, dir);
if (!create) {
- if (popupHandle != 0) GTK.gtk_container_forall (popupHandle, display.setDirectionProc, dir);
+ if (popupHandle != 0) GTK3.gtk_container_forall (popupHandle, display.setDirectionProc, dir);
}
}
}
@@ -2495,12 +2524,20 @@ public void setSelection (Point selection) {
checkWidget();
if (selection == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.READ_ONLY) != 0) return;
+
if (entryHandle != 0) {
- long ptr = GTK.gtk_entry_get_text (entryHandle);
- int start = (int)OS.g_utf16_offset_to_utf8_offset (ptr, selection.x);
- int end = (int)OS.g_utf16_offset_to_utf8_offset (ptr, selection.y);
- GTK.gtk_editable_set_position (entryHandle, start);
- GTK.gtk_editable_select_region (entryHandle, start, end);
+ long textPtr = 0;
+ if (GTK.GTK4) {
+ long bufferHandle = GTK4.gtk_entry_get_buffer(entryHandle);
+ textPtr = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ textPtr = GTK3.gtk_entry_get_text(entryHandle);
+ }
+
+ int start = (int)OS.g_utf16_offset_to_utf8_offset(textPtr, selection.x);
+ int end = (int)OS.g_utf16_offset_to_utf8_offset(textPtr, selection.y);
+ GTK.gtk_editable_set_position(entryHandle, start);
+ GTK.gtk_editable_select_region(entryHandle, start, end);
}
}
@@ -2547,7 +2584,7 @@ public void setText (String string) {
* fix is to block the firing of these events and fire them ourselves in a consistent manner.
*/
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
- long ptr = GTK.gtk_entry_get_text (entryHandle);
+ long ptr = GTK3.gtk_entry_get_text (entryHandle);
string = verifyText (string, 0, (int)OS.g_utf16_strlen (ptr, -1));
if (string == null) return;
}
@@ -2556,7 +2593,12 @@ public void setText (String string) {
OS.g_signal_handlers_block_matched (entryHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.g_signal_handlers_block_matched (entryHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT);
OS.g_signal_handlers_block_matched (entryHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
- GTK.gtk_entry_set_text (entryHandle, buffer);
+ if (GTK.GTK4) {
+ long bufferHandle = GTK4.gtk_entry_get_buffer(entryHandle);
+ GTK.gtk_entry_buffer_set_text(bufferHandle, buffer, string.length());
+ } else {
+ GTK3.gtk_entry_set_text (entryHandle, buffer);
+ }
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.g_signal_handlers_unblock_matched (entryHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
OS.g_signal_handlers_unblock_matched (entryHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT);
@@ -2591,9 +2633,9 @@ public void setTextLimit (int limit) {
}
@Override
-void setToolTipText (Shell shell, String newString) {
- if (entryHandle != 0) shell.setToolTipText (entryHandle, newString);
- if (buttonHandle != 0) shell.setToolTipText (buttonHandle, newString);
+void setToolTipText(Shell shell, String newString) {
+ if (entryHandle != 0) setToolTipText(entryHandle, newString);
+ if (buttonHandle != 0) setToolTipText(buttonHandle, newString);
}
/**
@@ -2626,8 +2668,13 @@ boolean checkSubwindow () {
@Override
boolean translateTraversal (long event) {
- int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
+ int [] key = new int [1];
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ }
+
switch (key[0]) {
case GDK.GDK_KP_Enter:
case GDK.GDK_Return: {
@@ -2646,13 +2693,75 @@ boolean translateTraversal (long event) {
return super.translateTraversal (event);
}
+void updateCss() {
+ if (cssProvider == 0) {
+ cssProvider = GTK.gtk_css_provider_new();
+
+ if (menuHandle != 0) {
+ long context = GTK.gtk_widget_get_style_context(menuHandle);
+ GTK.gtk_style_context_add_provider(context, cssProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+
+ if (buttonHandle != 0) {
+ long context = GTK.gtk_widget_get_style_context(buttonHandle);
+ GTK.gtk_style_context_add_provider(context, cssProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+
+ if (entryHandle != 0) {
+ long context = GTK.gtk_widget_get_style_context(entryHandle);
+ GTK.gtk_style_context_add_provider(context, cssProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+ }
+
+ StringBuilder css = new StringBuilder();
+
+ // Deal with background
+ if (background != null) {
+ final String colorString = display.gtk_rgba_to_css_string(background);
+
+ /*
+ * Use 'background:' instead of 'background-color:' to also override
+ * any 'background-image:'. For example, Ubuntu's Yaru theme has
+ * 'background-image:' for 'GtkToggleButton' used in READ_ONLY combo.
+ */
+ css.append("* {background: " + colorString + ";}\n");
+ css.append("menu {background: " + colorString + ";}\n");
+
+ /*
+ * Setting background color for '*' also affects selection background,
+ * making it hard to see selected text. Fix this by forcing selection
+ * colors to reasonable ones. A better fix would be to list affected
+ * classes explicitly instead of using '*'. If you're doing this,
+ * please also compare screenshots of snippet from Bug 570502.
+ */
+ final String clrSelectionBack = display.gtk_rgba_to_css_string(display.COLOR_LIST_SELECTION_RGBA);
+ final String clrSelectionFore = display.gtk_rgba_to_css_string(display.COLOR_LIST_SELECTION_TEXT_RGBA);
+ css.append("entry selection {background-color: " + clrSelectionBack + ";}\n");
+ css.append("entry selection {color: " + clrSelectionFore + ";}\n");
+ }
+
+ // Deal with foreground
+ if (foreground != null) {
+ final String colorString = display.gtk_rgba_to_css_string(foreground);
+
+ css.append("* {color: " + colorString + ";}\n");
+ }
+
+ // Update CSS provider
+ if (GTK.GTK4) {
+ GTK4.gtk_css_provider_load_from_data (cssProvider, Converter.wcsToMbcs (css.toString(), true), -1);
+ } else {
+ GTK3.gtk_css_provider_load_from_data (cssProvider, Converter.wcsToMbcs (css.toString(), true), -1, null);
+ }
+}
+
String verifyText (String string, int start, int end) {
if (string.length () == 0 && start == end) return null;
Event event = new Event ();
event.text = string;
event.start = start;
event.end = end;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK.GTK4 ? 0 : GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int type = GDK.gdk_event_get_event_type(eventPtr);
type = fixGdkEventTypeValues(type);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 36c42bcdd0..76ac898e89 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,6 +21,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are controls which are capable
@@ -90,13 +92,13 @@ public class Composite extends Scrollable {
static final String NO_INPUT_METHOD = "org.eclipse.swt.internal.gtk.noInputMethod"; //$NON-NLS-1$
Shell popupChild;
/**
- * A Rectangle which, if specified, denotes an area where child widgets
- * should not be drawn. Only relevant if such child widgets are being
+ * If set to {@code true}, child widgets with negative y coordinate GTK allocation
+ * will not be drawn. Only relevant if such child widgets are being
* drawn via propagateDraw(), such as Tree/Table editing widgets.
*
- * See bug 535978.
+ * See bug 535978 and bug 547986.
*/
- Rectangle noChildDrawing = null;
+ boolean noChildDrawing = false;
/**
* A HashMap of child widgets that keeps track of which child has had their
* GdkWindow lowered/raised. Only relevant if such child widgets are being
@@ -159,31 +161,44 @@ static int checkStyle (int style) {
return style;
}
-Control [] _getChildren () {
- long parentHandle = parentingHandle ();
- long list = GTK.gtk_container_get_children (parentHandle);
- if (list == 0) return new Control [0];
- int count = OS.g_list_length (list);
- Control [] children = new Control [count];
- int i = 0;
- long temp = list;
- while (temp != 0) {
- long handle = OS.g_list_data (temp);
- if (handle != 0) {
- Widget widget = display.getWidget (handle);
- if (widget != null && widget != this) {
- if (widget instanceof Control) {
- children [i++] = (Control) widget;
+Control[] _getChildren () {
+ long parentHandle = parentingHandle();
+
+ if (GTK.GTK4) {
+ ArrayList<Control> childrenList = new ArrayList<>();
+ for (long child = GTK4.gtk_widget_get_first_child(parentHandle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ Widget childWidget = display.getWidget(child);
+ if (childWidget != null && childWidget instanceof Control && childWidget != this) {
+ childrenList.add((Control)childWidget);
+ }
+ }
+
+ return childrenList.toArray(new Control[childrenList.size()]);
+ } else {
+ long list = GTK3.gtk_container_get_children (parentHandle);
+ if (list == 0) return new Control [0];
+ int count = OS.g_list_length (list);
+ Control [] children = new Control [count];
+ int i = 0;
+ long temp = list;
+ while (temp != 0) {
+ long handle = OS.g_list_data (temp);
+ if (handle != 0) {
+ Widget widget = display.getWidget (handle);
+ if (widget != null && widget != this) {
+ if (widget instanceof Control) {
+ children [i++] = (Control) widget;
+ }
}
}
+ temp = OS.g_list_next (temp);
}
- temp = OS.g_list_next (temp);
+ OS.g_list_free (list);
+ if (i == count) return children;
+ Control [] newChildren = new Control [i];
+ System.arraycopy (children, 0, newChildren, 0, i);
+ return newChildren;
}
- OS.g_list_free (list);
- if (i == count) return children;
- Control [] newChildren = new Control [i];
- System.arraycopy (children, 0, newChildren, 0, i);
- return newChildren;
}
Control [] _getTabList () {
@@ -303,19 +318,36 @@ void createHandle (int index, boolean fixed, boolean scrolled) {
if (fixed) {
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
+ if (!GTK.GTK4) GTK3.gtk_widget_set_has_window(fixedHandle, true);
}
+
long vadj = GTK.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
if (vadj == 0) error (SWT.ERROR_NO_HANDLES);
long hadj = GTK.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
if (hadj == 0) error (SWT.ERROR_NO_HANDLES);
- scrolledHandle = GTK.gtk_scrolled_window_new (hadj, vadj);
+
+ if (GTK.GTK4) {
+ scrolledHandle = GTK4.gtk_scrolled_window_new();
+ GTK.gtk_scrolled_window_set_hadjustment(scrolledHandle, hadj);
+ GTK.gtk_scrolled_window_set_vadjustment(scrolledHandle, vadj);
+ GTK.gtk_widget_set_hexpand(scrolledHandle, true);
+ GTK.gtk_widget_set_vexpand(scrolledHandle, true);
+ } else {
+ scrolledHandle = GTK3.gtk_scrolled_window_new (hadj, vadj);
+ }
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
}
- handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (handle, true);
- GTK.gtk_widget_set_can_focus (handle, true);
+
+ handle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_widget_set_focusable(handle, true);
+ } else {
+ GTK3.gtk_widget_set_has_window(handle, true);
+ }
+ GTK.gtk_widget_set_can_focus(handle, true);
+
if ((style & SWT.EMBEDDED) == 0) {
if ((state & CANVAS) != 0) {
/* Prevent an input method context from being created for the Browser widget */
@@ -326,22 +358,36 @@ void createHandle (int index, boolean fixed, boolean scrolled) {
}
}
if (scrolled) {
- if (fixed) GTK.gtk_container_add (fixedHandle, scrolledHandle);
- /*
- * Force the scrolledWindow to have a single child that is
- * not scrolled automatically. Calling gtk_container_add()
- * seems to add the child correctly but cause a warning.
- */
- boolean warnings = display.getWarnings ();
- display.setWarnings (false);
- GTK.gtk_container_add (scrolledHandle, handle);
- display.setWarnings (warnings);
+ if (fixed) {
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, scrolledHandle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, scrolledHandle);
+ }
+ }
+ if (GTK.GTK4) {
+ GTK4.gtk_scrolled_window_set_child(scrolledHandle, handle);
+ } else {
+ /*
+ * Force the scrolledWindow to have a single child that is
+ * not scrolled automatically. Calling gtk_container_add()
+ * seems to add the child correctly but cause a warning.
+ */
+ boolean warnings = display.getWarnings ();
+ display.setWarnings (false);
+ GTK3.gtk_container_add (scrolledHandle, handle);
+ display.setWarnings (warnings);
+ }
int hsp = (style & SWT.H_SCROLL) != 0 ? GTK.GTK_POLICY_ALWAYS : GTK.GTK_POLICY_NEVER;
int vsp = (style & SWT.V_SCROLL) != 0 ? GTK.GTK_POLICY_ALWAYS : GTK.GTK_POLICY_NEVER;
GTK.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
if (hasBorder ()) {
- GTK.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ if (GTK.GTK4) {
+ GTK4.gtk_scrolled_window_set_has_frame(scrolledHandle, true);
+ } else {
+ GTK3.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ }
}
}
if ((style & SWT.EMBEDDED) != 0) {
@@ -353,23 +399,26 @@ void createHandle (int index, boolean fixed, boolean scrolled) {
} else {
socketHandle = GTK.gtk_socket_new ();
if (socketHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (handle, socketHandle);
+ GTK3.gtk_container_add (handle, socketHandle);
}
}
- if ((style & SWT.NO_REDRAW_RESIZE) != 0 && (style & SWT.RIGHT_TO_LEFT) == 0) {
- GTK.gtk_widget_set_redraw_on_allocate (handle, false);
- }
- /*
- * Bug in GTK. When a widget is double buffered and the back
- * pixmap is null, the double buffer pixmap is filled with the
- * background of the widget rather than the current contents of
- * the screen. If nothing is drawn during an expose event,
- * the pixels are altered. The fix is to clear double buffering
- * when NO_BACKGROUND is set and DOUBLE_BUFFERED
- * is not explicitly set.
- */
- if ((style & SWT.DOUBLE_BUFFERED) == 0 && (style & SWT.NO_BACKGROUND) != 0) {
- GTK.gtk_widget_set_double_buffered (handle, false);
+
+ if (!GTK.GTK4) {
+ if ((style & SWT.NO_REDRAW_RESIZE) != 0 && (style & SWT.RIGHT_TO_LEFT) == 0) {
+ GTK3.gtk_widget_set_redraw_on_allocate (handle, false);
+ }
+ /*
+ * Bug in GTK. When a widget is double buffered and the back
+ * pixmap is null, the double buffer pixmap is filled with the
+ * background of the widget rather than the current contents of
+ * the screen. If nothing is drawn during an expose event,
+ * the pixels are altered. The fix is to clear double buffering
+ * when NO_BACKGROUND is set and DOUBLE_BUFFERED
+ * is not explicitly set.
+ */
+ if ((style & SWT.DOUBLE_BUFFERED) == 0 && (style & SWT.NO_BACKGROUND) != 0) {
+ GTK3.gtk_widget_set_double_buffered (handle, false);
+ }
}
}
@@ -405,7 +454,7 @@ void adjustChildClipping (long widget) {
GtkAllocation clip = new GtkAllocation ();
GtkAllocation allocation = new GtkAllocation ();
GTK.gtk_widget_get_allocation(widget, allocation);
- GTK.gtk_widget_get_clip(widget, clip);
+ GTK3.gtk_widget_get_clip(widget, clip);
/*
* If the clip is negative, add the x coordinate to the width
* and set the x coordinate to 0.
@@ -423,35 +472,27 @@ void adjustChildClipping (long widget) {
// Call gtk_widget_get_preferred_size() to prevent warnings
GTK.gtk_widget_get_preferred_size(widget, minimumSize, naturalSize);
// Allocate and queue a resize event
- if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate(widget, allocation, -1);
- } else {
- GTK.gtk_widget_size_allocate(widget, allocation);
- }
+ gtk_widget_size_allocate(widget, allocation, -1);
GTK.gtk_widget_queue_resize(widget);
}
}
// Adjust the clip
- GTK.gtk_widget_set_clip(widget, allocation);
+ GTK3.gtk_widget_set_clip(widget, allocation);
}
@Override
long gtk_draw (long widget, long cairo) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- long context = GTK.gtk_widget_get_style_context(widget);
- GtkAllocation allocation = new GtkAllocation();
- GTK.gtk_widget_get_allocation (widget, allocation);
- int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
- int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
- // We specify a 0 value for x & y as we want the whole widget to be
- // colored, not some portion of it.
- GTK.gtk_render_background(context, cairo, 0, 0, width, height);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- // If fixClipHandle is set: iterate through the children of widget
- // and set their clips to be that of their allocation
- if (widget == fixClipHandle) fixClippings();
- }
- }
+ long context = GTK.gtk_widget_get_style_context(widget);
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation (widget, allocation);
+ int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+ int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
+ // We specify a 0 value for x & y as we want the whole widget to be
+ // colored, not some portion of it.
+ GTK.gtk_render_background(context, cairo, 0, 0, width, height);
+ // If fixClipHandle is set: iterate through the children of widget
+ // and set their clips to be that of their allocation
+ if (widget == fixClipHandle) fixClippings();
return super.gtk_draw(widget, cairo);
}
@@ -634,24 +675,10 @@ void fixZOrder () {
if ((state & CANVAS) != 0) return;
long parentHandle = parentingHandle ();
if (GTK.GTK4) {
- long parentSurface = gtk_widget_get_surface (parentHandle);
- if (parentSurface == 0) return;
- long [] userData = new long [1];
- long surfaceList = GDK.gdk_surface_get_children (parentSurface);
- if (surfaceList != 0) {
- long surfaces = surfaceList;
- while (surfaces != 0) {
- long surface = OS.g_list_data (surfaces);
- if (surface != redrawSurface) {
- GDK.gdk_surface_get_user_data (surface, userData);
- if (userData [0] == 0 || OS.G_OBJECT_TYPE (userData [0]) != display.gtk_fixed_get_type ()) {
- GDK.gdk_surface_lower (surface);
- }
- }
- surfaces = OS.g_list_next (surfaces);
- }
- OS.g_list_free (surfaceList);
- }
+ /* TODO: GTK4 parent does not hold the list of children it has created (parent-children relationship can only be done
+ * with GdkPopup) Will need to consider if we can get children some other way or not have to do fixZOrder at all
+ * and use GdkPopup autohide feature.
+ */
} else {
long parentWindow = gtk_widget_get_window (parentHandle);
if (parentWindow == 0) return;
@@ -738,14 +765,24 @@ public Control [] getChildren () {
}
int getChildrenCount () {
- /*
- * NOTE: The current implementation will count
- * non-registered children.
- */
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return 0;
- int count = OS.g_list_length (list);
- OS.g_list_free (list);
+ int count = 0;
+
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(handle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ count++;
+ }
+ } else {
+ /*
+ * NOTE: The current implementation will count
+ * non-registered children.
+ */
+ long list = GTK3.gtk_container_get_children(handle);
+ if (list != 0) {
+ count = OS.g_list_length(list);
+ OS.g_list_free(list);
+ }
+ }
+
return count;
}
@@ -756,7 +793,9 @@ Rectangle getClientAreaInPixels () {
if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) {
return new Rectangle (0, 0, 0, 0);
}
- forceResize ();
+ if(RESIZE_ON_GETCLIENTAREA) {
+ forceResize ();
+ }
long clientHandle = clientHandle ();
GtkAllocation allocation = new GtkAllocation();
GTK.gtk_widget_get_allocation (clientHandle, allocation);
@@ -844,6 +883,7 @@ long gtk_button_press_event (long widget, long event) {
if ((style & SWT.NO_FOCUS) == 0 && hooksKeys ()) {
int [] eventButton = new int [1];
GDK.gdk_event_get_button(event, eventButton);
+
if (eventButton[0] == 1) {
if (getChildrenCount () == 0) setFocus ();
}
@@ -852,6 +892,30 @@ long gtk_button_press_event (long widget, long event) {
return result;
}
+
+
+@Override
+boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) {
+ boolean handled = super.gtk4_key_press_event(controller, keyval, keycode, state, event);
+ if (!handled) {
+ /*
+ * Feature in GTK. The default behavior when the return key
+ * is pressed is to select the default button. This is not the
+ * expected behavior for Composite and its subclasses. The
+ * fix is to avoid calling the default handler.
+ */
+ if ((state & CANVAS) != 0) {
+ switch (keyval) {
+ case GDK.GDK_Return:
+ case GDK.GDK_KP_Enter:
+ return true;
+ }
+ }
+ }
+
+ return handled;
+}
+
@Override
long gtk_key_press_event (long widget, long event) {
long result = super.gtk_key_press_event (widget, event);
@@ -865,6 +929,7 @@ long gtk_key_press_event (long widget, long event) {
if ((state & CANVAS) != 0 && socketHandle == 0) {
int [] eventKeyval = new int [1];
GDK.gdk_event_get_keyval(event, eventKeyval);
+
switch (eventKeyval[0]) {
case GDK.GDK_Return:
case GDK.GDK_KP_Enter: return 1;
@@ -944,7 +1009,7 @@ boolean hasBorder () {
void hookEvents () {
super.hookEvents ();
if ((state & CANVAS) != 0) {
- if (!GTK.GTK4) GTK.gtk_widget_add_events (handle, GDK.GDK_POINTER_MOTION_HINT_MASK);
+ if (!GTK.GTK4) GTK3.gtk_widget_add_events (handle, GDK.GDK_POINTER_MOTION_HINT_MASK);
if (scrolledHandle != 0) {
OS.g_signal_connect_closure (scrolledHandle, OS.scroll_child, display.getClosure (SCROLL_CHILD), false);
}
@@ -1252,7 +1317,7 @@ public void layout (Control [] changed, int flags) {
composite = child.parent;
}
}
- if ((flags & SWT.DEFER) != 0) {
+ if (!display.externalEventLoop && (flags & SWT.DEFER) != 0) {
setLayoutDeferred (true);
display.addLayoutDeferred (this);
}
@@ -1262,7 +1327,7 @@ public void layout (Control [] changed, int flags) {
} else {
if (layout == null && (flags & SWT.ALL) == 0) return;
markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
- if ((flags & SWT.DEFER) != 0) {
+ if (!display.externalEventLoop && (flags & SWT.DEFER) != 0) {
setLayoutDeferred (true);
display.addLayoutDeferred (this);
}
@@ -1316,11 +1381,7 @@ void moveChildren(int oldWidth) {
if (oldWidth > 0) x = oldWidth - controlWidth - x;
int clientWidth = getClientWidth ();
x = clientWidth - controlWidth - x;
- if (GTK.GTK4) {
- if (child.enableSurface != 0) {
- GDK.gdk_surface_move (child.enableSurface, x, y);
- }
- } else {
+ if (!GTK.GTK4) {
if (child.enableWindow != 0) {
GDK.gdk_window_move (child.enableWindow, x, y);
}
@@ -1335,11 +1396,7 @@ void moveChildren(int oldWidth) {
gtk_widget_get_preferred_size (topHandle, requisition);
allocation.x = x;
allocation.y = y;
- if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (topHandle, allocation, -1);
- } else {
- GTK.gtk_widget_size_allocate (topHandle, allocation);
- }
+ gtk_widget_size_allocate(topHandle, allocation, -1);
Control control = child.findBackgroundControl ();
if (control != null && control.backgroundImage != null) {
if (child.isVisible ()) child.redrawWidget (0, 0, 0, 0, true, true, true);
@@ -1405,7 +1462,7 @@ void printWidget (GC gc, long drawable, int depth, int x, int y) {
void connectFixedHandleDraw () {
long paintHandle = fixedHandle;
int paintMask = GDK.GDK_EXPOSURE_MASK;
- GTK.gtk_widget_add_events (paintHandle, paintMask);
+ GTK3.gtk_widget_add_events (paintHandle, paintMask);
OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [DRAW], 0, display.getClosure (DRAW), true);
}
@@ -1426,53 +1483,49 @@ void connectFixedHandleDraw () {
*/
void propagateDraw (long container, long cairo) {
if (container == fixedHandle) {
- long list = GTK.gtk_container_get_children (container);
- long temp = list;
- while (temp != 0) {
- long child = OS.g_list_data (temp);
- if (child != 0) {
- Widget widget = display.getWidget (child);
- if (widget != this) {
- if (noChildDrawing != null) {
- Boolean childLowered = childrenLowered.get(widget);
- if (childLowered == null) {
- childrenLowered.put(widget, false);
- childLowered = false;
- }
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation(child, allocation);
- if ((allocation.y + allocation.height) < noChildDrawing.height) {
- if (!childLowered) {
- if (GTK.GTK4) {
- long surface = gtk_widget_get_surface(child);
- GDK.gdk_surface_lower(surface);
- } else {
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(container); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ //TODO: GTK4 no gtk_container_propagate_draw. Possibly not required at all.
+ }
+ } else {
+ long list = GTK3.gtk_container_get_children (container);
+ long temp = list;
+ while (temp != 0) {
+ long child = OS.g_list_data (temp);
+ if (child != 0) {
+ Widget widget = display.getWidget (child);
+ if (widget != this) {
+ if (noChildDrawing) {
+ Boolean childLowered = childrenLowered.get(widget);
+ if (childLowered == null) {
+ childrenLowered.put(widget, false);
+ childLowered = false;
+ }
+ GtkAllocation allocation = new GtkAllocation ();
+ GTK.gtk_widget_get_allocation(child, allocation);
+ if (allocation.y < 0) {
+ if (!childLowered) {
long window = gtk_widget_get_window(child);
GDK.gdk_window_lower(window);
+ childrenLowered.put(widget, true);
}
- childrenLowered.put(widget, true);
- }
- } else {
- if (childLowered) {
- if (GTK.GTK4) {
- long surface = gtk_widget_get_surface(child);
- GDK.gdk_surface_raise(surface);
- } else {
+ } else {
+ if (childLowered) {
long window = gtk_widget_get_window(child);
GDK.gdk_window_raise(window);
+ childrenLowered.put(widget, false);
}
- childrenLowered.put(widget, false);
+ GTK3.gtk_container_propagate_draw(container, child, cairo);
}
- GTK.gtk_container_propagate_draw(container, child, cairo);
+ } else {
+ GTK3.gtk_container_propagate_draw(container, child, cairo);
}
- } else {
- GTK.gtk_container_propagate_draw(container, child, cairo);
}
}
+ temp = OS.g_list_next (temp);
}
- temp = OS.g_list_next (temp);
+ OS.g_list_free (list);
}
- OS.g_list_free (list);
}
}
@@ -1497,14 +1550,19 @@ void register () {
@Override
void releaseChildren (boolean destroy) {
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
- if (child != null && !child.isDisposed ()) {
- child.release (false);
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ for (Control child : _getChildren ()) {
+ if (child == null || child.isDisposed ())
+ continue;
+
+ try {
+ child.release (false);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
}
+ super.releaseChildren (destroy);
}
- super.releaseChildren (destroy);
}
@Override
@@ -1702,7 +1760,11 @@ boolean setTabGroupFocus (boolean next) {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
- if (child.isTabItem () && child.setTabItemFocus (next)) return true;
+ /*
+ * It is unlikely but possible that a child is disposed at this point, for more
+ * details refer bug 381668.
+ */
+ if (!child.isDisposed() && child.isTabItem () && child.setTabItemFocus (next)) return true;
}
return false;
}
@@ -1821,4 +1883,10 @@ void updateLayout (boolean all) {
}
}
}
+
+@Override
+public String toString() {
+ return super.toString() + " [layout=" + layout + "]";
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 9e4d812c77..d3bb60ab59 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -25,6 +25,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Control is the abstract superclass of all windowed user interface classes.
@@ -50,11 +52,15 @@ import org.eclipse.swt.internal.gtk.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public abstract class Control extends Widget implements Drawable {
+
+ // allows to disable context menu entry for "insert emoji"
+ static final boolean DISABLE_EMOJI = Boolean.getBoolean("SWT_GTK_INPUT_HINT_NO_EMOJI");
+
long fixedHandle;
+ long firstFixedHandle = 0;
+ long keyController;
long redrawWindow, enableWindow, provider;
- long redrawSurface, enableSurface;
int drawCount, backgroundAlpha = 255;
- long enterNotifyEventId;
long dragGesture, zoomGesture, rotateGesture, panGesture;
Composite parent;
Cursor cursor;
@@ -89,29 +95,18 @@ public abstract class Control extends Widget implements Drawable {
LinkedList <Event> dragDetectionQueue;
- /* these class variables are for the workaround for bug #427776 */
- static Callback enterNotifyEventFunc;
- static int enterNotifyEventSignalId;
- static int GTK_POINTER_WINDOW;
- static int SWT_GRAB_WIDGET;
-
static Callback gestureZoom, gestureRotation, gestureSwipe, gestureBegin, gestureEnd;
static {
gestureZoom = new Callback (Control.class, "magnifyProc", void.class, new Type[] {
long.class, double.class, long.class}); //$NON-NLS-1$
- if (gestureZoom.getAddress() == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
gestureRotation = new Callback (Control.class, "rotateProc", void.class, new Type[] {
long.class, double.class, double.class, long.class}); //$NON-NLS-1$
- if (gestureRotation.getAddress() == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
gestureSwipe = new Callback (Control.class, "swipeProc", void.class, new Type[] {
long.class, double.class, double.class, long.class}); //$NON-NLS-1$
- if (gestureSwipe.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
gestureBegin = new Callback (Control.class, "gestureBeginProc", void.class, new Type[] {
long.class, long.class, long.class}); //$NON-NLS-1$
- if (gestureBegin.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
gestureEnd = new Callback (Control.class, "gestureEndProc", void.class, new Type[] {
long.class, long.class, long.class}); //$NON-NLS-1$
- if (gestureEnd.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
/**
* Bug 541635, 515396: GTK Wayland only flag to keep track whether mouse
@@ -120,6 +115,21 @@ public abstract class Control extends Widget implements Drawable {
static boolean mouseDown;
boolean dragBegun;
+ /**
+ * Flag to check the scale factor upon the first drawing of this Control.
+ * This is done by checking the scale factor of the Cairo surface in gtk_draw().
+ *
+ * Doing so provides an accurate scale factor, and will determine if this Control
+ * needs to be scaled manually by SWT. See bug 507020.
+ */
+ boolean checkScaleFactor = true;
+
+ /**
+ * True if GTK has autoscaled this Control, meaning SWT does not need to do any
+ * manual scaling. See bug 507020.
+ */
+ boolean autoScale = true;
+
Control () {
}
@@ -159,22 +169,6 @@ public Control (Composite parent, int style) {
createWidget (0);
}
-void connectPaint () {
- long paintHandle = paintHandle ();
- if (GTK.GTK4 && hooksPaint()) {
- long widgetClass = GTK.GTK_WIDGET_GET_CLASS(paintHandle);
- GtkWidgetClass widgetClassStruct = new GtkWidgetClass ();
- OS.memmove(widgetClassStruct, widgetClass);
- widgetClassStruct.snapshot = display.snapshotDrawProc;
- OS.memmove(widgetClass, widgetClassStruct);
- } else if (!GTK.GTK4) {
- int paintMask = GDK.GDK_EXPOSURE_MASK;
- GTK.gtk_widget_add_events (paintHandle, paintMask);
- OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [DRAW], 0, display.getClosure (EXPOSE_EVENT_INVERSE), false);
- OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [DRAW], 0, display.getClosure (DRAW), true);
- }
-}
-
Font defaultFont () {
return display.getSystemFont ();
}
@@ -191,22 +185,29 @@ void deregister () {
if (imHandle != 0) display.removeWidget (imHandle);
}
-void drawBackground (Control control, long gdkResource, long cr, long region, int x, int y, int width, int height) {
- long cairo = cr;
- if (region == 0 && gdkResource != 0) {
- cairo_rectangle_int_t regionRect = new cairo_rectangle_int_t ();
- int [] fetchedHeight = new int [1];
- int [] fetchedWidth = new int [1];
- if (GTK.GTK4) {
- gdk_surface_get_size(gdkResource, fetchedWidth, fetchedHeight);
- } else {
- gdk_window_get_size(gdkResource, fetchedWidth, fetchedHeight);
+void drawBackground (Control control, long gdkResource, long cr, int x, int y, int width, int height) {
+ long cairo = 0;
+ long region = 0;
+ if (GTK.GTK4) {
+ // TODO: once Eclipse runs on GTK4, check for bug 547466.
+ cairo = cr;
+ if (gdkResource != 0) {
+ cairo_rectangle_int_t regionRect = new cairo_rectangle_int_t ();
+ int [] fetchedHeight = new int [1];
+ int [] fetchedWidth = new int [1];
+ if (GTK.GTK4) {
+ gdk_surface_get_size(gdkResource, fetchedWidth, fetchedHeight);
+ } else {
+ gdk_window_get_size(gdkResource, fetchedWidth, fetchedHeight);
+ }
+ regionRect.x = 0;
+ regionRect.y = 0;
+ regionRect.width = fetchedWidth[0];
+ regionRect.height = fetchedHeight[0];
+ region = Cairo.cairo_region_create_rectangle(regionRect);
}
- regionRect.x = 0;
- regionRect.y = 0;
- regionRect.width = fetchedWidth[0];
- regionRect.height = fetchedHeight[0];
- region = Cairo.cairo_region_create_rectangle(regionRect);
+ } else {
+ cairo = cr != 0 ? cr : GDK.gdk_cairo_create(gdkResource);
}
/*
* It's possible that a client is using an SWT.NO_BACKGROUND Composite with custom painting
@@ -244,6 +245,9 @@ void drawBackground (Control control, long gdkResource, long cr, long region, in
}
Cairo.cairo_rectangle (cairo, x, y, width, height);
Cairo.cairo_fill (cairo);
+ if (!GTK.GTK4 ) {
+ if (cairo != cr) Cairo.cairo_destroy(cairo);
+ }
}
boolean drawGripper (GC gc, int x, int y, int width, int height, boolean vertical) {
@@ -402,155 +406,147 @@ boolean hasFocus () {
@Override
void hookEvents () {
- /* Connect the keyboard signals */
- long focusHandle = focusHandle ();
- int focusMask = GDK.GDK_KEY_PRESS_MASK | GDK.GDK_KEY_RELEASE_MASK | GDK.GDK_FOCUS_CHANGE_MASK;
- if (GTK.GTK4) {
- long keyController = GTK.gtk_event_controller_key_new();
- GTK.gtk_widget_add_controller(focusHandle, keyController);
- GTK.gtk_event_controller_set_propagation_phase(keyController, GTK.GTK_PHASE_TARGET);
-
- long keyPressReleaseAddress = display.keyPressReleaseCallback.getAddress();
- long focusAddress = display.focusCallback.getAddress();
- OS.g_signal_connect (keyController, OS.key_pressed, keyPressReleaseAddress, KEY_PRESSED);
- OS.g_signal_connect (keyController, OS.key_released, keyPressReleaseAddress, KEY_RELEASED);
- OS.g_signal_connect (keyController, OS.focus_in, focusAddress, FOCUS_IN);
- OS.g_signal_connect (keyController, OS.focus_out, focusAddress, FOCUS_OUT);
-
- long gesturePressReleaseAddress = display.gesturePressReleaseCallback.getAddress();
- long gestureMultiPress = GTK.gtk_gesture_multi_press_new();
- GTK.gtk_widget_add_controller(focusHandle, gestureMultiPress);
- OS.g_signal_connect(gestureMultiPress, OS.pressed, gesturePressReleaseAddress, GESTURE_PRESSED);
- OS.g_signal_connect(gestureMultiPress, OS.released, gesturePressReleaseAddress, GESTURE_RELEASED);
+ super.hookEvents();
+ long focusHandle = focusHandle();
+ hookKeyboardAndFocusSignals(focusHandle);
+ hookMouseSignals(eventHandle());
+ hookWidgetSignals(focusHandle);
+ hookPaintSignals();
+ connectIMSignals();
- } else {
- GTK.gtk_widget_add_events (focusHandle, focusMask);
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [KEY_PRESS_EVENT], 0, display.getClosure (KEY_PRESS_EVENT), false);
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [KEY_RELEASE_EVENT], 0, display.getClosure (KEY_RELEASE_EVENT), false);
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [FOCUS_IN_EVENT], 0, display.getClosure (FOCUS_IN_EVENT), false);
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [FOCUS_OUT_EVENT], 0, display.getClosure (FOCUS_OUT_EVENT), false);
- }
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [POPUP_MENU], 0, display.getClosure (POPUP_MENU), false);
- if (!GTK.GTK4) OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [SHOW_HELP], 0, display.getClosure (SHOW_HELP), false);
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [FOCUS], 0, display.getClosure (FOCUS), false);
+ /*Connect gesture signals */
+ setZoomGesture();
+ setDragGesture();
+ setRotateGesture();
- /* Connect the mouse signals */
long eventHandle = eventHandle ();
- long blockHandle = fixedHandle != 0 ? fixedHandle : eventHandle;
- long enterExitHandle = enterExitHandle ();
+
+ /* Connect the event_after signal for both key and mouse */
if (GTK.GTK4) {
- long motionController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(eventHandle, motionController);
- GTK.gtk_event_controller_set_propagation_phase(motionController, GTK.GTK_PHASE_BUBBLE);
-
- long enterMotionScrollAddress = display.enterMotionScrollCallback.getAddress();
- OS.g_signal_connect (motionController, OS.motion, enterMotionScrollAddress, MOTION);
-
- long enterLeaveController;
- enterLeaveController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(enterExitHandle, enterLeaveController);
- GTK.gtk_event_controller_set_propagation_phase(enterLeaveController, GTK.GTK_PHASE_TARGET);
-
- long leaveAddress = display.leaveCallback.getAddress();
- OS.g_signal_connect (enterLeaveController, OS.leave, leaveAddress, LEAVE);
- OS.g_signal_connect (enterLeaveController, OS.enter, enterMotionScrollAddress, ENTER);
-
- long motionInverseController;
- if (blockHandle != eventHandle) {
- motionInverseController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(blockHandle, motionInverseController);
- GTK.gtk_event_controller_set_propagation_phase(motionInverseController, GTK.GTK_PHASE_TARGET);
- } else {
- motionInverseController = motionController;
+ //TODO: GTK4 event-after
+ } else {
+ OS.g_signal_connect_closure_by_id(eventHandle, display.signalIds[EVENT_AFTER], 0, display.getClosure(EVENT_AFTER), false);
+ if (focusHandle != eventHandle) {
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[EVENT_AFTER], 0, display.getClosure(EVENT_AFTER), false);
}
- OS.g_signal_connect (motionInverseController, OS.motion, enterMotionScrollAddress, MOTION_INVERSE);
+ }
+}
- long scrollController = GTK.gtk_event_controller_scroll_new(GTK.GTK_EVENT_CONTROLLER_SCROLL_NONE);
- GTK.gtk_widget_add_controller(eventHandle, scrollController);
+private void hookKeyboardAndFocusSignals(long focusHandle) {
+ if (GTK.GTK4) {
+ keyController = GTK4.gtk_event_controller_key_new();
+ GTK4.gtk_widget_add_controller(focusHandle, keyController);
+ GTK.gtk_event_controller_set_propagation_phase(keyController, GTK.GTK_PHASE_CAPTURE);
+ OS.g_signal_connect(keyController, OS.key_pressed, display.keyPressReleaseProc, KEY_PRESSED);
+ OS.g_signal_connect(keyController, OS.key_released, display.keyPressReleaseProc, KEY_RELEASED);
+
+ long focusController = GTK4.gtk_event_controller_focus_new();
+ GTK4.gtk_widget_add_controller(focusHandle, focusController);
+ OS.g_signal_connect(focusController, OS.enter, display.focusProc, FOCUS_IN);
+ OS.g_signal_connect(focusController, OS.leave, display.focusProc, FOCUS_OUT);
+ } else {
+ int focusMask = GDK.GDK_KEY_PRESS_MASK | GDK.GDK_KEY_RELEASE_MASK | GDK.GDK_FOCUS_CHANGE_MASK;
+ GTK3.gtk_widget_add_events (focusHandle, focusMask);
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[KEY_PRESS_EVENT], 0, display.getClosure(KEY_PRESS_EVENT), false);
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[KEY_RELEASE_EVENT], 0, display.getClosure(KEY_RELEASE_EVENT), false);
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[FOCUS_IN_EVENT], 0, display.getClosure(FOCUS_IN_EVENT), false);
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[FOCUS_OUT_EVENT], 0, display.getClosure(FOCUS_OUT_EVENT), false);
+ }
+}
+
+private void hookMouseSignals(long eventHandle) {
+ long enterExitHandle = enterExitHandle();
+
+ if (GTK.GTK4) {
+ // Click & motion events are limited only to the target widget
+ long clickGesture = GTK4.gtk_gesture_click_new();
+ GTK.gtk_event_controller_set_propagation_phase(clickGesture, GTK.GTK_PHASE_TARGET);
+ GTK.gtk_gesture_single_set_button(clickGesture, 0);
+ GTK4.gtk_widget_add_controller(eventHandle, clickGesture);
+ OS.g_signal_connect(clickGesture, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
+ OS.g_signal_connect(clickGesture, OS.released, display.gesturePressReleaseProc, GESTURE_RELEASED);
+
+ long motionController = GTK4.gtk_event_controller_motion_new();
+ GTK.gtk_event_controller_set_propagation_phase(motionController, GTK.GTK_PHASE_TARGET);
+ GTK4.gtk_widget_add_controller(eventHandle, motionController);
+ OS.g_signal_connect(motionController, OS.motion, display.enterMotionProc, MOTION);
+
+ long scrollController = GTK4.gtk_event_controller_scroll_new(GTK.GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES);
GTK.gtk_event_controller_set_propagation_phase(scrollController, GTK.GTK_PHASE_TARGET);
- OS.g_signal_connect (scrollController, OS.scroll, enterMotionScrollAddress, SCROLL);
+ GTK4.gtk_widget_add_controller(eventHandle, scrollController);
+ OS.g_signal_connect(scrollController, OS.scroll, display.scrollProc, SCROLL);
+
+ long enterExitController = GTK4.gtk_event_controller_motion_new();
+ GTK4.gtk_widget_add_controller(enterExitHandle, enterExitController);
+ OS.g_signal_connect(enterExitController, OS.enter, display.enterMotionProc, ENTER);
+ OS.g_signal_connect(enterExitController, OS.leave, display.leaveProc, LEAVE);
} else {
int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK | GDK.GDK_SCROLL_MASK | GDK.GDK_SMOOTH_SCROLL_MASK;
- GTK.gtk_widget_add_events (eventHandle, eventMask);
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.getClosure (MOTION_NOTIFY_EVENT), false);
+ GTK3.gtk_widget_add_events (eventHandle, eventMask);
+ OS.g_signal_connect_closure_by_id(eventHandle, display.signalIds[MOTION_NOTIFY_EVENT], 0, display.getClosure(MOTION_NOTIFY_EVENT), false);
+ OS.g_signal_connect_closure_by_id(eventHandle, display.signalIds[BUTTON_PRESS_EVENT], 0, display.getClosure(BUTTON_PRESS_EVENT), false);
+ OS.g_signal_connect_closure_by_id(eventHandle, display.signalIds[BUTTON_RELEASE_EVENT], 0, display.getClosure(BUTTON_RELEASE_EVENT), false);
+ OS.g_signal_connect_closure_by_id(eventHandle, display.signalIds[SCROLL_EVENT], 0, display.getClosure(SCROLL_EVENT), false);
int enterExitMask = GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK;
- GTK.gtk_widget_add_events (enterExitHandle, enterExitMask);
- OS.g_signal_connect_closure_by_id (enterExitHandle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.getClosure (ENTER_NOTIFY_EVENT), false);
- OS.g_signal_connect_closure_by_id (enterExitHandle, display.signalIds [LEAVE_NOTIFY_EVENT], 0, display.getClosure (LEAVE_NOTIFY_EVENT), false);
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [SCROLL_EVENT], 0, display.getClosure (SCROLL_EVENT), false);
- }
- if (GTK.GTK4) {
- // GTK4: replace button-press/release-event, event-after dropped with generic event
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- } else {
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false);
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT), false);
+ GTK3.gtk_widget_add_events (enterExitHandle, enterExitMask);
+ OS.g_signal_connect_closure_by_id(enterExitHandle, display.signalIds[ENTER_NOTIFY_EVENT], 0, display.getClosure(ENTER_NOTIFY_EVENT), false);
+ OS.g_signal_connect_closure_by_id(enterExitHandle, display.signalIds[LEAVE_NOTIFY_EVENT], 0, display.getClosure(LEAVE_NOTIFY_EVENT), false);
+
+ /*
+ * Feature in GTK3. Events such as mouse move are propagate up
+ * the widget hierarchy and are seen by the parent. This is the
+ * correct GTK behavior but not correct for SWT. The fix is to
+ * hook a signal after and stop the propagation using a negative
+ * event number to distinguish this case.
+ *
+ * The signal is hooked to the fixedHandle to catch events sent to
+ * lightweight widgets.
+ */
+ long blockHandle = fixedHandle != 0 ? fixedHandle : eventHandle;
+ OS.g_signal_connect_closure_by_id(blockHandle, display.signalIds[BUTTON_PRESS_EVENT], 0, display.getClosure(BUTTON_PRESS_EVENT_INVERSE), true);
+ OS.g_signal_connect_closure_by_id(blockHandle, display.signalIds[BUTTON_RELEASE_EVENT], 0, display.getClosure(BUTTON_RELEASE_EVENT_INVERSE), true);
+ OS.g_signal_connect_closure_by_id(blockHandle, display.signalIds[MOTION_NOTIFY_EVENT], 0, display.getClosure(MOTION_NOTIFY_EVENT_INVERSE), true);
}
+}
- /*Connect gesture signals */
- setZoomGesture();
- setDragGesture();
- setRotateGesture();
+private void hookWidgetSignals(long focusHandle) {
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[REALIZE], 0, display.getClosure(REALIZE), true);
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[UNREALIZE], 0, display.getClosure(UNREALIZE), false);
+
+ OS.g_signal_connect_closure_by_id(topHandle(), display.signalIds[MAP], 0, display.getClosure(MAP), true);
- /*
- * Feature in GTK3. Events such as mouse move are propagate up
- * the widget hierarchy and are seen by the parent. This is the
- * correct GTK behavior but not correct for SWT. The fix is to
- * hook a signal after and stop the propagation using a negative
- * event number to distinguish this case.
- *
- * The signal is hooked to the fixedHandle to catch events sent to
- * lightweight widgets.
- *
- * Events are not propagated up on GTK4
- */
if (!GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (blockHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT_INVERSE), true);
- OS.g_signal_connect_closure_by_id (blockHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT_INVERSE), true);
- OS.g_signal_connect_closure_by_id (blockHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.getClosure (MOTION_NOTIFY_EVENT_INVERSE), true);
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[POPUP_MENU], 0, display.getClosure(POPUP_MENU), false);
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[SHOW_HELP], 0, display.getClosure(SHOW_HELP), false);
+ OS.g_signal_connect_closure_by_id(focusHandle, display.signalIds[FOCUS], 0, display.getClosure(FOCUS), false);
}
+}
+
+private void hookPaintSignals() {
+ long paintHandle = paintHandle();
- /* Connect the event_after signal for both key and mouse */
if (GTK.GTK4) {
- // GTK4: event-after replaced with generic event
- if (focusHandle != eventHandle) {
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- }
+ long widgetClass = GTK.GTK_WIDGET_GET_CLASS(paintHandle());
+ GtkWidgetClass widgetClassStruct = new GtkWidgetClass();
+
+ OS.memmove(widgetClassStruct, widgetClass);
+ widgetClassStruct.snapshot = display.snapshotDrawProc;
+ OS.memmove(widgetClass, widgetClassStruct);
} else {
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false);
- if (focusHandle != eventHandle) {
- OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false);
- }
+ int paintMask = GDK.GDK_EXPOSURE_MASK;
+ GTK3.gtk_widget_add_events (paintHandle, paintMask);
+ OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [DRAW], 0, display.getClosure (EXPOSE_EVENT_INVERSE), false);
+ OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [DRAW], 0, display.getClosure (DRAW), true);
+ OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [STYLE_UPDATED], 0, display.getClosure (STYLE_UPDATED), false);
}
+}
- /* Connect the paint signal */
- connectPaint ();
-
- /* Connect the Input Method signals */
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [REALIZE], 0, display.getClosure (REALIZE), true);
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [UNREALIZE], 0, display.getClosure (UNREALIZE), false);
- long imHandle = imHandle ();
+private void connectIMSignals() {
+ long imHandle = imHandle();
if (imHandle != 0) {
- OS.g_signal_connect_closure (imHandle, OS.commit, display.getClosure (COMMIT), false);
- OS.g_signal_connect_closure (imHandle, OS.preedit_changed, display.getClosure (PREEDIT_CHANGED), false);
- }
-
- OS.g_signal_connect_closure_by_id (paintHandle (), display.signalIds [STYLE_UPDATED], 0, display.getClosure (STYLE_UPDATED), false);
-
- long topHandle = topHandle ();
- OS.g_signal_connect_closure_by_id (topHandle, display.signalIds [MAP], 0, display.getClosure (MAP), true);
-
- if (enterNotifyEventFunc == null && GTK.GTK_VERSION < OS.VERSION (3, 11, 9)) {
- enterNotifyEventFunc = new Callback (Control.class, "enterNotifyEventProc", 4);
- if (enterNotifyEventFunc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- enterNotifyEventSignalId = OS.g_signal_lookup (OS.enter_notify_event, GTK.GTK_TYPE_WIDGET ());
-
- byte [] buffer = Converter.wcsToMbcs ("gtk-pointer-window", true);
- GTK_POINTER_WINDOW = OS.g_quark_from_string (buffer);
- buffer = Converter.wcsToMbcs ("swt-grab-widget", true);
- SWT_GRAB_WIDGET = OS.g_quark_from_string (buffer);
+ OS.g_signal_connect_closure(imHandle, OS.commit, display.getClosure(COMMIT), false);
+ OS.g_signal_connect_closure(imHandle, OS.preedit_changed, display.getClosure(PREEDIT_CHANGED), false);
}
}
@@ -560,18 +556,20 @@ boolean hooksPaint () {
@Override
long hoverProc (long widget) {
- int [] x = new int [1], y = new int [1], mask = new int [1];
+ int[] x = new int[1], y = new int[1], mask = new int[1];
if (GTK.GTK4) {
- /*
- * TODO: calling gdk_window_get_device_position() with a 0
- * for the GdkWindow uses gdk_get_default_root_window(),
- * which doesn't exist on GTK4.
- */
+ double[] xDouble = new double[1], yDouble = new double[1];
+ display.getPointerPosition(xDouble, yDouble);
+
+ x[0] = (int)xDouble[0];
+ y[0] = (int)yDouble[0];
} else {
- display.gdk_window_get_device_position (0, x, y, mask);
+ display.getWindowPointerPosition(0, x, y, mask);
}
+
if (containedInRegion(x[0], y[0])) return 0;
- sendMouseEvent (SWT.MouseHover, 0, /*time*/0, x [0], y [0], false, mask [0]);
+ sendMouseEvent(SWT.MouseHover, 0, 0, x[0], y[0], false, mask[0]);
+
/* Always return zero in order to cancel the hover timer */
return 0;
}
@@ -587,7 +585,7 @@ long paintHandle () {
if (GTK.GTK4) return topHandle;
long paintHandle = handle;
while (paintHandle != topHandle) {
- if (gtk_widget_get_has_surface_or_window (paintHandle)) break;
+ if (GTK3.gtk_widget_get_has_window(paintHandle)) break;
paintHandle = GTK.gtk_widget_get_parent (paintHandle);
}
return paintHandle;
@@ -643,11 +641,9 @@ public boolean print (GC gc) {
GtkAllocation allocation = new GtkAllocation ();
GTK.gtk_widget_get_allocation(topHandle, allocation);
// Prevent allocation warnings
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_widget_get_preferred_size(topHandle, null, null);
- }
- GTK.gtk_widget_size_allocate(topHandle, allocation);
- GTK.gtk_widget_draw(topHandle, gc.handle);
+ GTK.gtk_widget_get_preferred_size(topHandle, null, null);
+ GTK3.gtk_widget_size_allocate(topHandle, allocation);
+ GTK3.gtk_widget_draw(topHandle, gc.handle);
return true;
}
@@ -761,19 +757,6 @@ void checkBackground () {
} while (true);
}
-void checkForeground () {
- /*
- * Feature in GTK 3. The widget foreground is inherited from the immediate
- * parent. This is not the expected behavior for SWT. The fix is to avoid
- * the inheritance by explicitly setting the default foreground on the widget.
- *
- * This can be removed on GTK3.16+.
- */
- if (GTK.GTK_VERSION < OS.VERSION(3, 14, 0)) {
- setForegroundGdkRGBA (topHandle (), display.COLOR_WIDGET_FOREGROUND_RGBA);
- }
-}
-
void checkBorder () {
if (getBorderWidthInPixels () == 0) style &= ~SWT.BORDER;
}
@@ -798,20 +781,19 @@ boolean containedInRegion (int x, int y) {
}
@Override
-void createWidget (int index) {
+void createWidget(int index) {
state |= DRAG_DETECT;
- checkOrientation (parent);
- super.createWidget (index);
- checkBackground ();
- checkForeground ();
- if ((state & PARENT_BACKGROUND) != 0) setParentBackground ();
- checkBuffered ();
- showWidget ();
- setInitialBounds ();
- setZOrder (null, false, false);
- setRelations ();
- checkMirrored ();
- checkBorder ();
+ checkOrientation(parent);
+ super.createWidget(index);
+ checkBackground();
+ if ((state & PARENT_BACKGROUND) != 0) setParentBackground();
+ checkBuffered();
+ showWidget();
+ setInitialBounds();
+ setZOrder(null, false, false);
+ if (!GTK.GTK4) setRelations();
+ checkMirrored();
+ checkBorder();
}
/**
@@ -875,16 +857,16 @@ Point computeNativeSize (long h, int wHint, int hHint, boolean changed) {
int [] natural_size = new int [1];
if (wHint == SWT.DEFAULT) {
if (GTK.GTK4) {
- GTK.gtk_widget_measure(h, GTK.GTK_ORIENTATION_HORIZONTAL, height, null, natural_size, null, null);
+ GTK4.gtk_widget_measure(h, GTK.GTK_ORIENTATION_HORIZONTAL, height, null, natural_size, null, null);
} else {
- GTK.gtk_widget_get_preferred_width_for_height (h, height, null, natural_size);
+ GTK3.gtk_widget_get_preferred_width_for_height (h, height, null, natural_size);
}
width = natural_size [0];
} else {
if (GTK.GTK4) {
- GTK.gtk_widget_measure(h, GTK.GTK_ORIENTATION_VERTICAL, width, null, natural_size, null, null);
+ GTK4.gtk_widget_measure(h, GTK.GTK_ORIENTATION_VERTICAL, width, null, natural_size, null, null);
} else {
- GTK.gtk_widget_get_preferred_height_for_width (h, width, null, natural_size);
+ GTK3.gtk_widget_get_preferred_height_for_width (h, width, null, natural_size);
}
height = natural_size [0];
}
@@ -903,11 +885,7 @@ void forceResize () {
gtk_widget_get_preferred_size (topHandle, requisition);
GtkAllocation allocation = new GtkAllocation ();
GTK.gtk_widget_get_allocation(topHandle, allocation);
- if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (topHandle, allocation, -1);
- } else {
- GTK.gtk_widget_size_allocate (topHandle, allocation);
- }
+ gtk_widget_size_allocate(topHandle, allocation, -1);
}
/**
@@ -1076,24 +1054,22 @@ Point resizeCalculationsGTK3 (long widget, int width, int height) {
* elements which we cannot access. If the to-be-allocated size minus
* these elements is < 0, allocate the preferred size instead. See bug 486068.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GtkRequisition minimumSize = new GtkRequisition();
- GtkRequisition naturalSize = new GtkRequisition();
- GTK.gtk_widget_get_preferred_size(widget, minimumSize, naturalSize);
- /*
- * Use the smallest of the minimum/natural sizes to prevent oversized
- * widgets.
- */
- int smallestWidth = Math.min(minimumSize.width, naturalSize.width);
- int smallestHeight = Math.min(minimumSize.height, naturalSize.height);
- sizes.x = (width - (smallestWidth - width)) < 0 ? smallestWidth : width;
- sizes.y = (height - (smallestHeight - height)) < 0 ? smallestHeight : height;
- }
+ GtkRequisition minimumSize = new GtkRequisition();
+ GtkRequisition naturalSize = new GtkRequisition();
+ GTK.gtk_widget_get_preferred_size(widget, minimumSize, naturalSize);
+ /*
+ * Use the smallest of the minimum/natural sizes to prevent oversized
+ * widgets.
+ */
+ int smallestWidth = Math.min(minimumSize.width, naturalSize.width);
+ int smallestHeight = Math.min(minimumSize.height, naturalSize.height);
+ sizes.x = (width - (smallestWidth - width)) < 0 ? smallestWidth : width;
+ sizes.y = (height - (smallestHeight - height)) < 0 ? smallestHeight : height;
return sizes;
}
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
- // bug in GTK2 crashes JVM, in GTK3 the new shell only. See bug 472743
+ // bug in GTK3 the crashes new shell only. See bug 472743
width = Math.min(width, (2 << 14) - 1);
height = Math.min(height, (2 << 14) - 1);
@@ -1120,11 +1096,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
int oldY = allocation.y;
sameOrigin = x == oldX && y == oldY;
if (!sameOrigin) {
- if (GTK.GTK4) {
- if (enableSurface != 0) {
- GDK.gdk_surface_move (enableSurface, x, y);
- }
- } else {
+ if (!GTK.GTK4) {
if (enableWindow != 0) {
GDK.gdk_window_move (enableWindow, x, y);
}
@@ -1141,14 +1113,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
if (!sameExtent && !(width == 0 && height == 0)) {
int newWidth = Math.max (1, width);
int newHeight = Math.max (1, height);
- if (GTK.GTK4) {
- if (redrawSurface != 0) {
- GDK.gdk_surface_resize (redrawSurface, newWidth, newHeight);
- }
- if (enableSurface != 0) {
- GDK.gdk_surface_resize (enableSurface, newWidth, newHeight);
- }
- } else {
+ if (!GTK.GTK4) {
if (redrawWindow != 0) {
GDK.gdk_window_resize (redrawWindow, newWidth, newHeight);
}
@@ -1187,11 +1152,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
Control focusControl = display.getFocusControl();
GTK.gtk_widget_show(topHandle);
gtk_widget_get_preferred_size (topHandle, requisition);
- if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (topHandle, allocation, -1);
- } else {
- GTK.gtk_widget_size_allocate (topHandle, allocation);
- }
+ gtk_widget_size_allocate(topHandle, allocation, -1);
GTK.gtk_widget_hide(topHandle);
/* Bug 540002: Showing and hiding widget causes original focused control to loose focus,
* Reset focus to original focused control after dealing with allocation.
@@ -1201,13 +1162,11 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
}
} else {
if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (topHandle, allocation, -1);
+ GTK4.gtk_widget_size_allocate (topHandle, allocation, -1);
} else {
// Prevent GTK+ allocation warnings, preferred size should be retrieved before setting allocation size.
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_widget_get_preferred_size(topHandle, null, null);
- }
- GTK.gtk_widget_size_allocate (topHandle, allocation);
+ GTK.gtk_widget_get_preferred_size(topHandle, null, null);
+ GTK3.gtk_widget_size_allocate (topHandle, allocation);
}
}
}
@@ -1219,35 +1178,26 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
if (!sameExtent) {
state = (width == 0) ? state | ZERO_WIDTH : state & ~ZERO_WIDTH;
state = (height == 0) ? state | ZERO_HEIGHT : state & ~ZERO_HEIGHT;
- if (GTK.GTK4) {
- if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) != 0) {
- if (enableSurface != 0) {
- GDK.gdk_surface_hide (enableSurface);
- }
- GTK.gtk_widget_hide (topHandle);
- } else {
- if ((state & HIDDEN) == 0) {
- if (enableSurface != 0) {
- GDK.gdk_surface_show_unraised (enableSurface);
- }
- GTK.gtk_widget_show (topHandle);
+ if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) != 0) {
+ if (!GTK.GTK4) {
+ if (enableWindow != 0) {
+ GDK.gdk_window_hide(enableWindow);
}
}
+
+ GTK.gtk_widget_hide(topHandle);
} else {
- if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) != 0) {
- if (enableWindow != 0) {
- GDK.gdk_window_hide (enableWindow);
- }
- GTK.gtk_widget_hide (topHandle);
- } else {
- if ((state & HIDDEN) == 0) {
+ if ((state & HIDDEN) == 0) {
+ if (!GTK.GTK4) {
if (enableWindow != 0) {
- GDK.gdk_window_show_unraised (enableWindow);
+ GDK.gdk_window_show_unraised(enableWindow);
}
- GTK.gtk_widget_show (topHandle);
}
+
+ GTK.gtk_widget_show(topHandle);
}
}
+
if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
}
int result = 0;
@@ -1440,7 +1390,7 @@ public void setRegion (Region region) {
long topHandle = topHandle ();
if (OS.G_OBJECT_TYPE(topHandle) == GTK.GTK_TYPE_WINDOW()) {
- GTK.gtk_widget_shape_combine_region(topHandle, shape_region);
+ GTK3.gtk_widget_shape_combine_region(topHandle, shape_region);
/*
* Bug in GTK: on Wayland, pixels in window outside shape_region
* is black instead of transparent when the widget is fully opaque (i.e. opacity == 1.0)
@@ -1464,27 +1414,41 @@ public void setRegion (Region region) {
}
void setRelations () {
- long parentHandle = parent.parentingHandle ();
- long list = GTK.gtk_container_get_children (parentHandle);
- if (list == 0) return;
- int count = OS.g_list_length (list);
- if (count > 1) {
- /*
- * the receiver is the last item in the list, so its predecessor will
- * be the second-last item in the list
- */
- long handle = OS.g_list_nth_data (list, count - 2);
- if (handle != 0) {
- Widget widget = display.getWidget (handle);
- if (widget != null && widget != this) {
- if (widget instanceof Control) {
- Control sibling = (Control)widget;
- sibling.addRelation (this);
- }
+ long parentHandle = parent.parentingHandle();
+ long handle = 0;
+
+ if (GTK.GTK4) {
+ int count = 0;
+ for (long child = GTK4.gtk_widget_get_first_child(parentHandle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ count++;
+ }
+
+ if (count > 1) {
+ handle = GTK4.gtk_widget_get_prev_sibling(GTK4.gtk_widget_get_last_child(parentHandle));
+ }
+ } else {
+ long list = GTK3.gtk_container_get_children (parentHandle);
+ if (list == 0) return;
+ int count = OS.g_list_length (list);
+ if (count > 1) {
+ /*
+ * the receiver is the last item in the list, so its predecessor will
+ * be the second-last item in the list
+ */
+ handle = OS.g_list_nth_data (list, count - 2);
+ }
+ OS.g_list_free (list);
+ }
+
+ if (handle != 0) {
+ Widget widget = display.getWidget (handle);
+ if (widget != null && widget != this) {
+ if (widget instanceof Control) {
+ Control sibling = (Control)widget;
+ sibling.addRelation (this);
}
}
}
- OS.g_list_free (list);
}
/**
@@ -1525,6 +1489,12 @@ boolean isActive () {
return getShell ().getModalShell () == null && display.getModalDialog () == null;
}
+@Override
+public boolean isAutoScalable () {
+ return autoScale;
+}
+
+
/*
* Answers a boolean indicating whether a Label that precedes the receiver in
* a layout should be read by screen readers as the recevier's label.
@@ -1676,20 +1646,23 @@ public void setLayoutData (Object layoutData) {
*
* @since 2.1
*/
-public Point toControl (int x, int y) {
- checkWidget ();
- int [] origin_x = new int [1], origin_y = new int [1];
+public Point toControl(int x, int y) {
+ checkWidget();
+ int[] origin_x = new int[1], origin_y = new int[1];
if (GTK.GTK4) {
- long surface = eventSurface ();
- GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
+ Point origin = getControlOrigin();
+ origin_x[0] = origin.x;
+ origin_y[0] = origin.y;
} else {
- long window = eventWindow ();
- GDK.gdk_window_get_origin (window, origin_x, origin_y);
+ long window = eventWindow();
+ GDK.gdk_window_get_origin(window, origin_x, origin_y);
}
- x -= DPIUtil.autoScaleDown (origin_x [0]);
- y -= DPIUtil.autoScaleDown (origin_y [0]);
- if ((style & SWT.MIRRORED) != 0) x = DPIUtil.autoScaleDown (getClientWidth ()) - x;
- return new Point (x, y);
+
+ x -= DPIUtil.autoScaleDown(origin_x[0]);
+ y -= DPIUtil.autoScaleDown(origin_y[0]);
+ if ((style & SWT.MIRRORED) != 0) x = DPIUtil.autoScaleDown(getClientWidth()) - x;
+
+ return new Point(x, y);
}
/**
@@ -1738,36 +1711,43 @@ public Point toControl (Point point) {
*
* @since 2.1
*/
-public Point toDisplay (int x, int y) {
+public Point toDisplay(int x, int y) {
checkWidget();
- int [] origin_x = new int [1], origin_y = new int [1];
+ int[] origin_x = new int[1], origin_y = new int[1];
if (GTK.GTK4) {
- long surface = eventSurface ();
- GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
+ Point origin = getControlOrigin();
+ origin_x[0] = origin.x;
+ origin_y[0] = origin.y;
} else {
- long window = eventWindow ();
- GDK.gdk_window_get_origin (window, origin_x, origin_y);
+ long window = eventWindow();
+ GDK.gdk_window_get_origin(window, origin_x, origin_y);
}
- if ((style & SWT.MIRRORED) != 0) x = DPIUtil.autoScaleDown (getClientWidth ()) - x;
- x += DPIUtil.autoScaleDown (origin_x [0]);
- y += DPIUtil.autoScaleDown (origin_y [0]);
- return new Point (x, y);
+
+ if ((style & SWT.MIRRORED) != 0) x = DPIUtil.autoScaleDown(getClientWidth()) - x;
+ x += DPIUtil.autoScaleDown(origin_x[0]);
+ y += DPIUtil.autoScaleDown(origin_y[0]);
+
+ return new Point(x, y);
}
-Point toDisplayInPixels (int x, int y) {
+Point toDisplayInPixels(int x, int y) {
checkWidget();
- int [] origin_x = new int [1], origin_y = new int [1];
+
+ int[] origin_x = new int[1], origin_y = new int[1];
if (GTK.GTK4) {
- long surface = eventSurface ();
- GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
+ Point origin = getControlOrigin();
+ origin_x[0] = origin.x;
+ origin_y[0] = origin.y;
} else {
- long window = eventWindow ();
- GDK.gdk_window_get_origin (window, origin_x, origin_y);
+ long window = eventWindow();
+ GDK.gdk_window_get_origin(window, origin_x, origin_y);
}
- if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x;
- x += origin_x [0];
- y += origin_y [0];
- return new Point (x, y);
+
+ if ((style & SWT.MIRRORED) != 0) x = getClientWidth() - x;
+ x += origin_x[0];
+ y += origin_y[0];
+
+ return new Point(x, y);
}
/**
@@ -1801,6 +1781,18 @@ Point toDisplayInPixels (Point point) {
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
return toDisplayInPixels (point.x, point.y);
}
+
+/**
+ * GTK4 only function to replace gdk_surface_get_origin
+ * @return the origin of the Control's SWTFixed container relative to the Shell
+ */
+Point getControlOrigin() {
+ double[] originX = new double[1], originY = new double[1];
+ boolean success = GTK4.gtk_widget_translate_coordinates(fixedHandle, getShell().shellHandle, 0, 0, originX, originY);
+
+ return success ? new Point((int)originX[0], (int)originY[0]) : new Point(0, 0);
+}
+
/**
* Adds the listener to the collection of listeners who will
* be notified when the control is moved or resized, by sending
@@ -2145,10 +2137,10 @@ public void addMouseWheelListener (MouseWheelListener listener) {
*/
public void addPaintListener(PaintListener listener) {
checkWidget();
- if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
- TypedListener typedListener = new TypedListener (listener);
- addListener(SWT.Paint,typedListener);
- if (GTK.GTK4) connectPaint();
+ if (listener == null) error(SWT.ERROR_NULL_ARGUMENT);
+
+ TypedListener typedListener = new TypedListener(listener);
+ addListener(SWT.Paint, typedListener);
}
/**
@@ -2686,13 +2678,13 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
* See Bug 503431.
*/
if (!OS.isX11()) { // Wayland
- double [] offsetX = new double[1];
+ double [] offsetX = new double[1];
double [] offsetY = new double [1];
double [] startX = new double[1];
double [] startY = new double [1];
if (GTK.gtk_gesture_drag_get_start_point(dragGesture, startX, startY)) {
GTK.gtk_gesture_drag_get_offset(dragGesture, offsetX, offsetY);
- if (GTK.gtk_drag_check_threshold(handle, (int)startX[0], (int) startY[0], (int) startX[0]
+ if (GTK3.gtk_drag_check_threshold(handle, (int)startX[0], (int) startY[0], (int) startX[0]
+ (int) offsetX[0], (int) startY[0] + (int) offsetY[0])) {
dragging = true;
}
@@ -2729,12 +2721,12 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
long timeout = System.currentTimeMillis() + 500;
display.sendPreExternalEventDispatchEvent();
while (System.currentTimeMillis() < timeout) {
- eventPtr = GTK.GTK4 ? GTK.gtk_get_current_event() : GDK.gdk_event_get ();
+ eventPtr = GTK.GTK4 ? GTK3.gtk_get_current_event() : GDK.gdk_event_get ();
if (eventPtr != 0) {
break;
} else {
currPos = display.getCursorLocationInPixels();
- dragging = GTK.gtk_drag_check_threshold (handle,
+ dragging = GTK3.gtk_drag_check_threshold (handle,
startPos.x, startPos.y, currPos.x, currPos.y);
if (dragging) break;
}
@@ -2746,14 +2738,21 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
eventType = fixGdkEventTypeValues(eventType);
switch (eventType) {
case GDK.GDK_MOTION_NOTIFY: {
- int [] state = new int[1];
- GDK.gdk_event_get_state(eventPtr, state);
long gdkResource = gdk_event_get_surface_or_window(eventPtr);
+
+ int [] state = new int[1];
double [] eventX = new double[1];
double [] eventY = new double[1];
- GDK.gdk_event_get_coords(eventPtr, eventX, eventY);
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(eventPtr);
+ GDK.gdk_event_get_position(eventPtr, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_state(eventPtr, state);
+ GDK.gdk_event_get_coords(eventPtr, eventX, eventY);
+ }
+
if ((state[0] & GDK.GDK_BUTTON1_MASK) != 0) {
- if (GTK.gtk_drag_check_threshold (handle, x, y, (int) eventX[0], (int) eventY[0])) {
+ if (GTK3.gtk_drag_check_threshold (handle, x, y, (int) eventX[0], (int) eventY[0])) {
dragging = true;
quit = true;
}
@@ -2762,16 +2761,25 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
}
int [] newX = new int [1], newY = new int [1];
if (GTK.GTK4) {
- display.gdk_surface_get_device_position (gdkResource, newX, newY, null);
+ double[] newXDouble = new double[1], newYDouble = new double[1];
+ display.getPointerPosition(newXDouble, newYDouble);
+
+ newX[0] = (int)newXDouble[0];
+ newY[0] = (int)newYDouble[0];
} else {
- display.gdk_window_get_device_position (gdkResource, newX, newY, null);
+ display.getWindowPointerPosition(gdkResource, newX, newY, null);
}
break;
}
case GDK.GDK_KEY_PRESS:
case GDK.GDK_KEY_RELEASE: {
int [] eventKeyval = new int [1];
- GDK.gdk_event_get_keyval(eventPtr, eventKeyval);
+ if (GTK.GTK4) {
+ eventKeyval[0] = GDK.gdk_key_event_get_keyval(eventPtr);
+ } else {
+ GDK.gdk_event_get_keyval(eventPtr, eventKeyval);
+ }
+
if (eventKeyval[0] == GDK.GDK_Escape) quit = true;
break;
}
@@ -2789,7 +2797,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
break;
}
default:
- GTK.gtk_main_do_event (eventPtr);
+ GTK3.gtk_main_do_event (eventPtr);
}
gdk_event_free (eventPtr);
}
@@ -2797,10 +2805,13 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
return dragging;
}
-boolean filterKey (int keyval, long event) {
+boolean filterKey (long event) {
long imHandle = imHandle ();
if (imHandle != 0) {
- return GTK.gtk_im_context_filter_keypress (imHandle, event);
+ if (GTK.GTK4)
+ return GTK4.gtk_im_context_filter_keypress (imHandle, event);
+ else
+ return GTK3.gtk_im_context_filter_keypress (imHandle, event);
}
return false;
}
@@ -2853,25 +2864,32 @@ static void gtk_widget_reparent (Control control, long newParentHandle) {
assert parentContainer != 0 : "Improper use of Control.gtk_widget_reparent. Widget currently has no parent.";
if (parentContainer != 0) {
- // gtk_widget_reparent (..) is deprecated as of Gtk 3.14 and removed in Gtk4.
- // However, the current alternative of removing/adding widget from/to a container causes errors. (see note below).
- // TODO - research a better way to reparent. See 534089.
- GTK.gtk_widget_reparent(widget, newParentHandle);
+ if (GTK.GTK4) {
+ OS.g_object_ref(widget);
+ OS.swt_fixed_remove(parentContainer, widget);
+ OS.swt_fixed_add(newParentHandle, widget);
+ OS.g_object_unref(widget);
+ } else {
+ // gtk_widget_reparent (..) is deprecated as of Gtk 3.14 and removed in Gtk4.
+ // However, the current alternative of removing/adding widget from/to a container causes errors. (see note below).
+ // TODO - research a better way to reparent. See 534089.
+ GTK3.gtk_widget_reparent(widget, newParentHandle);
- // Removing/Adding containers doesn't seem to reparent sub-gdkWindows properly and throws errors.
- // Steps to reproduce:
- // - From bug 534089, download the first attachment plugin: "Plug-in to reproduce the problem with"
- // - Import it into your eclipse. Launch a child eclipse with this plugin. Ensure child workspace is cleaned upon launch so that you see welcome screen.
- // - Upon closing the welcome screen, you will see an eclipse error message: "org.eclipse.swt.SWTError: No more handles"
- // - The following is printed into the console: 'gdk_window_new(): parent is destroyed'
- // After some research, I found that gtk_widget_repartent(..) also reparents sub-windows, but moving widget between containers doesn't do this,
- // This seems to leave some gdkWindows with incorrect parents.
-// OS.g_object_ref (widget);
-// GTK.gtk_container_remove (parentContainer, widget);
-// GTK.gtk_container_add (newParentHandle, widget);
-// OS.g_object_unref (widget);
+ // Removing/Adding containers doesn't seem to reparent sub-gdkWindows properly and throws errors.
+ // Steps to reproduce:
+ // - From bug 534089, download the first attachment plugin: "Plug-in to reproduce the problem with"
+ // - Import it into your eclipse. Launch a child eclipse with this plugin. Ensure child workspace is cleaned upon launch so that you see welcome screen.
+ // - Upon closing the welcome screen, you will see an eclipse error message: "org.eclipse.swt.SWTError: No more handles"
+ // - The following is printed into the console: 'gdk_window_new(): parent is destroyed'
+ // After some research, I found that gtk_widget_repartent(..) also reparents sub-windows, but moving widget between containers doesn't do this,
+ // This seems to leave some gdkWindows with incorrect parents.
+// OS.g_object_ref (widget);
+// GTK.gtk_container_remove (parentContainer, widget);
+// GTK.gtk_container_add (newParentHandle, widget);
+// OS.g_object_unref (widget);
- control.fixParentGdkResource();
+ control.fixParentGdkResource();
+ }
}
}
@@ -2977,33 +2995,18 @@ public Image getBackgroundImage () {
}
GdkRGBA getContextBackgroundGdkRGBA () {
- long fontHandle = fontHandle ();
if ((state & BACKGROUND) == 0) {
return defaultBackground();
}
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- if (provider != 0) {
- return display.gtk_css_parse_background (display.gtk_css_provider_to_string(provider), null);
- } else {
- return defaultBackground();
- }
+ if (provider != 0) {
+ return display.gtk_css_parse_background (display.gtk_css_provider_to_string(provider), null);
} else {
- long context = GTK.gtk_widget_get_style_context (fontHandle);
- GdkRGBA rgba = new GdkRGBA ();
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- return rgba;
+ return defaultBackground();
}
}
GdkRGBA getContextColorGdkRGBA () {
- long fontHandle = fontHandle ();
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- return display.gtk_css_parse_foreground(display.gtk_css_provider_to_string(provider), null);
- } else {
- long context = GTK.gtk_widget_get_style_context (fontHandle);
- GdkRGBA rgba = display.styleContextGetColor (context, GTK.GTK_STATE_FLAG_NORMAL);
- return rgba;
- }
+ return display.gtk_css_parse_foreground(display.gtk_css_provider_to_string(provider), null);
}
GdkRGBA getBgGdkRGBA () {
@@ -3114,24 +3117,42 @@ public Font getFont () {
return font != null ? font : defaultFont ();
}
+/**
+ * @return A newly allocated <code>PangoFontDescription*</code>, caller
+ * must free it with {@link OS#pango_font_description_free}.
+ */
long getFontDescription () {
long fontHandle = fontHandle ();
long [] fontDesc = new long [1];
long context = GTK.gtk_widget_get_style_context (fontHandle);
if ("ppc64le".equals(System.getProperty("os.arch"))) {
- return GTK.gtk_style_context_get_font(context, GTK.GTK_STATE_FLAG_NORMAL);
- } else if (GTK.GTK4) {
- GTK.gtk_style_context_get(context, GTK.gtk_style_property_font, fontDesc, 0);
- return fontDesc [0];
- } else if (GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
- GTK.gtk_style_context_save(context);
- GTK.gtk_style_context_set_state(context, GTK.GTK_STATE_FLAG_NORMAL);
- GTK.gtk_style_context_get(context, GTK.GTK_STATE_FLAG_NORMAL, GTK.gtk_style_property_font, fontDesc, 0);
- GTK.gtk_style_context_restore(context);
- return fontDesc [0];
+ // Unlike 'gtk_style_context_get()', 'gtk_style_context_get_font()'
+ // returns pointer owned by GTK. The workaround is to make a copy of the data.
+ long gtkOwnedPointer = GTK3.gtk_style_context_get_font(context, GTK.GTK_STATE_FLAG_NORMAL);
+ return OS.pango_font_description_copy(gtkOwnedPointer);
} else {
- GTK.gtk_style_context_get(context, GTK.GTK_STATE_FLAG_NORMAL, GTK.gtk_style_property_font, fontDesc, 0);
- return fontDesc [0];
+ if (GTK.GTK4) {
+ long[] fontPtr = new long[1];
+ long settings = GTK.gtk_settings_get_default();
+ OS.g_object_get(settings, GTK.gtk_style_property_font, fontPtr, 0);
+ if (fontPtr[0] != 0) {
+ int length = C.strlen(fontPtr[0]);
+ if (length != 0) {
+ byte[] fontString = new byte[length + 1];
+ C.memmove(fontString, fontPtr[0], length);
+ OS.g_free(fontPtr[0]);
+ return OS.pango_font_description_from_string(fontString);
+ }
+ }
+
+ return 0;
+ } else {
+ GTK.gtk_style_context_save(context);
+ GTK.gtk_style_context_set_state(context, GTK.GTK_STATE_FLAG_NORMAL);
+ GTK3.gtk_style_context_get(context, GTK.GTK_STATE_FLAG_NORMAL, GTK.gtk_style_property_font, fontDesc, 0);
+ GTK.gtk_style_context_restore(context);
+ return fontDesc [0];
+ }
}
}
@@ -3382,13 +3403,13 @@ Point getThickness (long widget) {
int xthickness = 0, ythickness = 0;
GtkBorder tmp = new GtkBorder();
long context = GTK.gtk_widget_get_style_context (widget);
- int state_flag = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(widget);
+ int state_flag = GTK.gtk_widget_get_state_flags(widget);
gtk_style_context_get_padding(context, state_flag, tmp);
GTK.gtk_style_context_save (context);
GTK.gtk_style_context_add_class (context, GTK.GTK_STYLE_CLASS_FRAME);
xthickness += tmp.left;
ythickness += tmp.top;
- int state = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(widget);
+ int state = GTK.gtk_widget_get_state_flags(widget);
gtk_style_context_get_border (context, state, tmp);
xthickness += tmp.left;
ythickness += tmp.top;
@@ -3398,119 +3419,61 @@ Point getThickness (long widget) {
void gtk_style_context_get_padding(long context, int state, GtkBorder padding) {
if (GTK.GTK4) {
- GTK.gtk_style_context_get_padding(context, padding);
+ GTK4.gtk_style_context_get_padding(context, padding);
} else {
- GTK.gtk_style_context_get_padding(context, state, padding);
+ GTK3.gtk_style_context_get_padding(context, state, padding);
}
}
void gtk_style_context_get_border (long context, int state, GtkBorder padding) {
if (GTK.GTK4) {
- GTK.gtk_style_context_get_border(context, padding);
+ GTK4.gtk_style_context_get_border(context, padding);
} else {
- GTK.gtk_style_context_get_border(context, state, padding);
+ GTK3.gtk_style_context_get_border(context, state, padding);
}
}
-/**
- * Generic "event" handler for signals that are dropped in GTK4
- * This method routes the following signals:
- * - button-press-event
- * - button-release-event
- */
-@Override
-long gtk_event (long widget, long event) {
- if (!GTK.GTK4) return 0;
- int eventType = GDK.gdk_event_get_event_type(event);
- switch (eventType) {
- case GDK.GDK4_BUTTON_PRESS: {
- return gtk_button_press_event(widget, event);
- }
- case GDK.GDK4_BUTTON_RELEASE: {
- return gtk_button_release_event(widget, event);
- }
- case GDK.GDK4_CONFIGURE: {
- return gtk_configure_event(widget, event);
- }
- case GDK.GDK4_MAP: {
- return gtk_map_event(widget, event);
- }
- case GDK.GDK4_UNMAP: {
- // not used in SWT at all, could be removed
- return gtk_unmap_event(widget, event);
- }
- }
- return gtk_event_after(widget, event);
-}
/**
* Handling multi-press event on GTK4
*/
@Override
-long gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
- if (n_press == 1) return 0;
+void gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
mouseDown = true;
dragBegun = false;
- // Event fields
- double [] eventX = new double [1];
- double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
- int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
- double [] eventRX = new double [1];
- double [] eventRY = new double [1];
- GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
+ int eventButton = GDK.gdk_button_event_get_button(event);
int eventTime = GDK.gdk_event_get_time(event);
- int [] eventState = new int[1];
- GDK.gdk_event_get_state(event, eventState);
-
- lastInput.x = (int) eventX[0];
- lastInput.y = (int) eventY[0];
- if (containedInRegion(lastInput.x, lastInput.y)) return 0;
-
- /*
- * When a shell is created with SWT.ON_TOP and SWT.NO_FOCUS,
- * do not activate the shell when the user clicks on the
- * the client area or on the border or a control within the
- * shell that does not take focus.
- */
- Shell shell = _getShell ();
- if (((shell.style & SWT.ON_TOP) != 0) && (((shell.style & SWT.NO_FOCUS) == 0) || ((style & SWT.NO_FOCUS) == 0))) {
- shell.forceActive();
- }
-
- long result = 0;
- // Only send DoubleClick event as regular click is handled by generic gtk_event
- if (n_press == 2) {
- display.clickCount = 2;
- result = sendMouseEvent (SWT.MouseDoubleClick, eventButton[0], display.clickCount, 0, false, eventTime, eventRX[0], eventRY[0], false, eventState[0]) ? 0 : 1;
+ int eventState = GDK.gdk_event_get_modifier_state(event);
+
+ display.clickCount = n_press;
+ if (n_press == 1) {
+ sendMouseEvent(SWT.MouseDown, eventButton, n_press, 0, false, eventTime, x, y, false, eventState);
+ if ((state & MENU) == 0) {
+ if (eventButton == 3) {
+ showMenu ((int)x, (int)y);
+ }
+ }
+ } else if (n_press == 2) {
+ sendMouseEvent(SWT.MouseDoubleClick, eventButton, n_press, 0, false, eventTime, x, y, false, eventState);
}
- if (!shell.isDisposed ()) shell.setActiveControl (this, SWT.MouseDown);
- return result;
}
@Override
-long gtk_gesture_release_event (long gesture, int n_press, double x, double y, long event) {
- if (n_press == 1) return 0;
+void gtk_gesture_release_event (long gesture, int n_press, double x, double y, long event) {
mouseDown = false;
- // Event fields
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
- int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_position(event, eventX, eventY);
+
+ int eventButton = GDK.gdk_button_event_get_button(event);
int eventTime = GDK.gdk_event_get_time(event);
- double [] eventRX = new double [1];
- double [] eventRY = new double [1];
- GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
+ int eventState = GDK.gdk_event_get_modifier_state(event);
lastInput.x = (int) eventX[0];
lastInput.y = (int) eventY[0];
- if (containedInRegion(lastInput.x, lastInput.y)) return 0;
- return sendMouseEvent (SWT.MouseUp, eventButton[0], display.clickCount, 0, false, eventTime, eventRX[0], eventRY[0], false, eventState[0]) ? 0 : 1;
+ if (containedInRegion(lastInput.x, lastInput.y)) return;
+ sendMouseEvent(SWT.MouseUp, eventButton, display.clickCount, 0, false, eventTime, 0, 0, false, eventState);
}
@Override
@@ -3522,20 +3485,22 @@ long gtk_button_press_event (long widget, long event, boolean sendMouseDown) {
mouseDown = true;
dragBegun = false;
- // Event fields
double [] eventX = new double [1];
double [] eventY = new double [1];
GDK.gdk_event_get_coords(event, eventX, eventY);
+
int eventType = GDK.gdk_event_get_event_type(event);
- eventType = fixGdkEventTypeValues(eventType);
+
int [] eventButton = new int [1];
+ int [] eventState = new int[1];
GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+
int eventTime = GDK.gdk_event_get_time(event);
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
lastInput.x = (int) eventX[0];
lastInput.y = (int) eventY[0];
@@ -3556,7 +3521,7 @@ long gtk_button_press_event (long widget, long event, boolean sendMouseDown) {
if (eventType == GDK.GDK_BUTTON_PRESS) {
boolean dragging = false;
display.clickCount = 1;
- long nextEvent = gdk_event_peek ();
+ long nextEvent = GDK.gdk_event_peek();
if (nextEvent != 0) {
int peekedEventType = GDK.GDK_EVENT_TYPE (nextEvent);
if (peekedEventType == GDK.GDK_2BUTTON_PRESS) display.clickCount = 2;
@@ -3580,13 +3545,11 @@ long gtk_button_press_event (long widget, long event, boolean sendMouseDown) {
}
}
if (sendMouseDown) {
- boolean mouseEventSent;
- if (GTK.GTK4) {
- mouseEventSent = !sendMouseEvent (SWT.MouseDown, eventButton[0], display.clickCount, 0, false, eventTime, eventX[0], eventY[0], true, eventState[0]);
- } else {
- mouseEventSent = !sendMouseEvent (SWT.MouseDown, eventButton[0], display.clickCount, 0, false, eventTime, eventRX[0], eventRY[0], false, eventState[0]);
+ boolean mouseEventSent = !sendMouseEvent(SWT.MouseDown, eventButton[0], display.clickCount, 0, false, eventTime, eventRX[0], eventRY[0], false, eventState[0]);
+
+ if (mouseEventSent) {
+ result = 1;
}
- result = mouseEventSent ? 1 : 0;
}
if (isDisposed ()) return 1;
/*
@@ -3624,23 +3587,26 @@ long gtk_button_press_event (long widget, long event, boolean sendMouseDown) {
@Override
long gtk_button_release_event (long widget, long event) {
mouseDown = false;
- // Event fields
- double [] eventX = new double [1];
- double [] eventY = new double [1];
+
+ double[] eventX = new double[1];
+ double[] eventY = new double[1];
GDK.gdk_event_get_coords(event, eventX, eventY);
- int [] eventButton = new int [1];
+
+ int[] eventButton = new int[1];
+ int[] eventState = new int[1];
GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+
int eventTime = GDK.gdk_event_get_time(event);
- double [] eventRX = new double [1];
- double [] eventRY = new double [1];
+
+ double[] eventRX = new double[1];
+ double[] eventRY = new double[1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
lastInput.x = (int) eventX[0];
lastInput.y = (int) eventY[0];
if (containedInRegion(lastInput.x, lastInput.y)) return 0;
- return sendMouseEvent (SWT.MouseUp, eventButton[0], display.clickCount, 0, false, eventTime, eventRX[0], eventRY[0], false, eventState[0]) ? 0 : 1;
+ return sendMouseEvent(SWT.MouseUp, eventButton[0], display.clickCount, 0, false, eventTime, eventRX[0], eventRY[0], false, eventState[0]) ? 0 : 1;
}
@Override
@@ -3655,6 +3621,25 @@ long gtk_commit (long imcontext, long text) {
return 0;
}
+
+
+@Override
+void gtk4_enter_event(long controller, double x, double y, long event) {
+ if (display.currentControl == this) return;
+
+ // Disconnect previous current Control and send MouseExit event to it
+ if (display.currentControl != null && !display.currentControl.isDisposed()) {
+ display.removeMouseHoverTimeout(display.currentControl.handle);
+ display.currentControl.sendMouseEvent(SWT.MouseExit, 0, 0, x, y, false, 0);
+ }
+
+ // Set display's current control and send MouseEnter event
+ if (!isDisposed()) {
+ display.currentControl = this;
+ sendMouseEvent(SWT.MouseEnter, 0, 0, x, y, false, 0);
+ }
+}
+
@Override
long gtk_enter_notify_event (long widget, long event) {
/*
@@ -3672,30 +3657,28 @@ long gtk_enter_notify_event (long widget, long event) {
GTK.gtk_widget_set_tooltip_text (toolHandle, buffer);
if (display.currentControl == this) return 0;
- GdkEventCrossing gdkEvent = new GdkEventCrossing ();
- long childGdkResource = 0;
- int [] crossingMode = new int[1];
int [] state = new int [1];
+ double [] eventX = new double [1];
+ double [] eventY = new double [1];
GDK.gdk_event_get_state(event, state);
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+
int time = GDK.gdk_event_get_time(event);
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- double [] eventX = new double [1];
- double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+
lastInput.x = (int) eventX[0];
lastInput.y = (int) eventY[0];
if (containedInRegion(lastInput.x, lastInput.y)) return 0;
- if (GTK.GTK4) {
- GDK.gdk_event_get_crossing_mode(event, crossingMode);
- // TODO_GTK4: GTK devs are still deciding whether or not
- // to provide API for GdkEventCrossing->child_surface.
- } else {
- OS.memmove(gdkEvent, event, GdkEventCrossing.sizeof);
- crossingMode[0] = gdkEvent.mode;
- childGdkResource = gdkEvent.subwindow;
- }
+
+ GdkEventCrossing gdkEvent = new GdkEventCrossing ();
+ long childGdkResource = 0;
+ int [] crossingMode = new int[1];
+ GTK3.memmove(gdkEvent, event, GdkEventCrossing.sizeof);
+ crossingMode[0] = gdkEvent.mode;
+ childGdkResource = gdkEvent.subwindow;
/*
* It is possible to send out too many enter/exit events if entering a
@@ -3737,8 +3720,10 @@ long gtk_event_after (long widget, long gdkEvent) {
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(gdkEvent, eventRX, eventRY);
+
int [] eventButton = new int [1];
GDK.gdk_event_get_button(gdkEvent, eventButton);
+
if (eventButton[0] == 3) {
showMenu ((int) eventRX[0], (int) eventRY[0]);
}
@@ -3748,13 +3733,9 @@ long gtk_event_after (long widget, long gdkEvent) {
case GDK.GDK_FOCUS_CHANGE: {
if (!isFocusHandle (widget)) break;
boolean [] focusIn = new boolean [1];
- if (GTK.GTK4) {
- GDK.gdk_event_get_focus_in(gdkEvent, focusIn);
- } else {
- GdkEventFocus gdkEventFocus = new GdkEventFocus ();
- OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
- focusIn[0] = gdkEventFocus.in != 0;
- }
+ GdkEventFocus gdkEventFocus = new GdkEventFocus ();
+ GTK3.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
+ focusIn[0] = gdkEventFocus.in != 0;
/*
* Feature in GTK. The GTK combo box popup under some window managers
@@ -3773,15 +3754,14 @@ long gtk_event_after (long widget, long gdkEvent) {
}
} else {
display.ignoreFocus = false;
- long grabHandle = GTK.gtk_grab_get_current ();
+ long grabHandle = GTK3.gtk_grab_get_current ();
if (grabHandle != 0) {
- if (OS.G_OBJECT_TYPE (grabHandle) == GTK.GTK_TYPE_MENU ()) {
+ if (OS.G_OBJECT_TYPE (grabHandle) == GTK3.GTK_TYPE_MENU ()) {
display.ignoreFocus = true;
break;
}
}
}
-
sendFocusEvent (focusIn[0] ? SWT.FocusIn : SWT.FocusOut);
break;
}
@@ -3844,8 +3824,42 @@ void cairoClipRegion (long cairo) {
eventRegion = actualRegion;
}
+
+
+@Override
+void gtk4_draw(long widget, long cairo, Rectangle bounds) {
+ if (!hooksPaint()) return;
+
+ GCData data = new GCData();
+ data.cairo = cairo;
+ GC gc = GC.gtk_new(this, data);
+
+ Event event = new Event();
+ event.count = 1;
+ event.gc = gc;
+ event.setBounds(bounds);
+
+ drawWidget(gc);
+ sendEvent(SWT.Paint, event);
+ gc.dispose();
+ event.gc = null;
+}
+
@Override
long gtk_draw (long widget, long cairo) {
+ if (checkScaleFactor) {
+ long surface = Cairo.cairo_get_target(cairo);
+ if (surface != 0) {
+ double [] sx = new double [1];
+ double [] sy = new double [1];
+ Cairo.cairo_surface_get_device_scale(surface, sx, sy);
+ long display = GDK.gdk_display_get_default();
+ long monitor = GDK.gdk_display_get_monitor_at_point(display, 0, 0);
+ int scale = GDK.gdk_monitor_get_scale_factor(monitor);
+ autoScale = !(scale == Math.round(sx[0]));
+ checkScaleFactor = false;
+ }
+ }
if ((state & OBSCURED) != 0) return 0;
GdkRectangle rect = new GdkRectangle ();
GDK.gdk_cairo_get_clip_rectangle (cairo, rect);
@@ -3870,9 +3884,7 @@ long gtk_draw (long widget, long cairo) {
*/
if (drawRegion) data.regionSet = eventRegion;
// data.damageRgn = gdkEvent.region;
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- data.cairo = cairo;
- }
+ data.cairo = cairo;
GC gc = event.gc = GC.gtk_new (this, data);
// Note: use GC#setClipping(x,y,width,height) because GC#setClipping(Rectangle) got broken by bug 446075
gc.setClipping (eventBounds.x, eventBounds.y, eventBounds.width, eventBounds.height);
@@ -3909,6 +3921,32 @@ long gtk_focus_in_event (long widget, long event) {
}
@Override
+void gtk4_focus_enter_event(long controller, long event) {
+ super.gtk4_focus_enter_event(controller, event);
+
+ sendFocusEvent(SWT.FocusIn);
+}
+
+@Override
+void gtk4_focus_window_event(long handle, long event) {
+ super.gtk4_focus_window_event(handle, event);
+
+ if(firstFixedHandle == 0) {
+ long child = handle;
+ //3rd child of shell will be SWTFixed
+ for(int i = 0; i<3; i++) {
+ child = GTK4.gtk_widget_get_first_child(child);
+ }
+ firstFixedHandle = child != 0 ? child:0;
+ }
+
+ if(firstFixedHandle !=0 && GTK.gtk_widget_has_focus(firstFixedHandle)) {
+ if(event == SWT.FocusIn)sendFocusEvent(SWT.FocusIn);
+ else sendFocusEvent(SWT.FocusOut);
+ }
+}
+
+@Override
long gtk_focus_out_event (long widget, long event) {
// widget could be disposed at this point
if (handle != 0) {
@@ -3923,9 +3961,33 @@ long gtk_focus_out_event (long widget, long event) {
}
@Override
+void gtk4_focus_leave_event(long controller, long event) {
+ super.gtk4_focus_leave_event(controller, event);
+
+ sendFocusEvent(SWT.FocusOut);
+}
+
+@Override
+boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) {
+ if (!hasFocus()) return false;
+
+ if (translateMnemonic(keyval, event)) return true;
+ if (isDisposed()) return false;
+
+ if (filterKey(event)) return true;
+ if (isDisposed()) return false;
+
+ if (translateTraversal(event)) return true;
+ if (isDisposed()) return false;
+
+ return super.gtk4_key_press_event(controller, keyval, keycode, state, event);
+}
+
+@Override
long gtk_key_press_event (long widget, long event) {
int [] eventKeyval = new int [1];
GDK.gdk_event_get_keyval(event, eventKeyval);
+
if (!hasFocus ()) {
/*
* Feature in GTK. On AIX, the IME window deactivates the current shell and even
@@ -3934,7 +3996,7 @@ long gtk_key_press_event (long widget, long event) {
* and call filterKey() only.
*/
if (display.getActiveShell () == null) {
- if (filterKey (eventKeyval[0], event)) return 1;
+ if (filterKey (event)) return 1;
}
return 0;
}
@@ -3942,7 +4004,7 @@ long gtk_key_press_event (long widget, long event) {
// widget could be disposed at this point
if (isDisposed ()) return 0;
- if (filterKey (eventKeyval[0], event)) return 1;
+ if (filterKey (event)) return 1;
// widget could be disposed at this point
if (isDisposed ()) return 0;
@@ -3953,41 +4015,66 @@ long gtk_key_press_event (long widget, long event) {
}
@Override
+void gtk4_key_release_event(long controller, int keyval, int keycode, int state, long event) {
+ if (!hasFocus()) return;
+
+ long imContext = imHandle();
+ if (imContext != 0) {
+ GTK4.gtk_im_context_filter_keypress(imContext, event);
+ }
+
+ super.gtk4_key_release_event(controller, keyval, keycode, state, event);
+}
+
+@Override
long gtk_key_release_event (long widget, long event) {
if (!hasFocus ()) return 0;
long imHandle = imHandle ();
if (imHandle != 0) {
- if (GTK.gtk_im_context_filter_keypress (imHandle, event)) return 1;
+ if (GTK3.gtk_im_context_filter_keypress(imHandle, event)) return 1;
}
return super.gtk_key_release_event (widget, event);
}
@Override
+void gtk4_leave_event(long controller, long event) {
+ if (display.currentControl != this) return;
+
+ display.removeMouseHoverTimeout(handle);
+
+ if (sendLeaveNotify() || display.getCursorControl() == null) {
+ sendMouseEvent(SWT.MouseExit, 0, 0, 0, 0, false, 0);
+ }
+}
+
+@Override
long gtk_leave_notify_event (long widget, long event) {
if (display.currentControl != this) return 0;
- GdkEventCrossing gdkEvent = new GdkEventCrossing ();
- int [] crossingMode = new int[1];
int [] state = new int [1];
GDK.gdk_event_get_state(event, state);
+
+ double [] eventX = new double [1];
+ double [] eventY = new double [1];
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+
int time = GDK.gdk_event_get_time(event);
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- double [] eventX = new double [1];
- double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+
lastInput.x = (int) eventX[0];
lastInput.y = (int) eventY[0];
if (containedInRegion(lastInput.x, lastInput.y)) return 0;
- if (GTK.GTK4) {
- GDK.gdk_event_get_crossing_mode(event, crossingMode);
- } else {
- OS.memmove(gdkEvent, event, GdkEventCrossing.sizeof);
- crossingMode[0] = gdkEvent.mode;
- }
+
+ GdkEventCrossing gdkEvent = new GdkEventCrossing ();
+ int [] crossingMode = new int[1];
+ GTK3.memmove(gdkEvent, event, GdkEventCrossing.sizeof);
+ crossingMode[0] = gdkEvent.mode;
+
display.removeMouseHoverTimeout (handle);
int result = 0;
- if (sendLeaveNotify () || display.getCursorControl () == null) {
+ if (sendLeaveNotify() || display.getCursorControl () == null) {
if (crossingMode[0] != GDK.GDK_CROSSING_NORMAL && crossingMode[0] != GDK.GDK_CROSSING_UNGRAB) return 0;
if ((state[0] & (GDK.GDK_BUTTON1_MASK | GDK.GDK_BUTTON2_MASK | GDK.GDK_BUTTON3_MASK)) != 0) return 0;
result = sendMouseEvent (SWT.MouseExit, 0, time, eventRX[0], eventRY[0], false, state[0]) ? 0 : 1;
@@ -3999,7 +4086,7 @@ long gtk_leave_notify_event (long widget, long event) {
@Override
long gtk_mnemonic_activate (long widget, long arg1) {
int result = 0;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int type = GDK.gdk_event_get_event_type(eventPtr);
type = fixGdkEventTypeValues(type);
@@ -4008,7 +4095,7 @@ long gtk_mnemonic_activate (long widget, long arg1) {
long focusHandle = focusControl != null ? focusControl.focusHandle () : 0;
if (focusHandle != 0) {
display.mnemonicControl = this;
- GTK.gtk_widget_event (focusHandle, eventPtr);
+ GTK3.gtk_widget_event (focusHandle, eventPtr);
display.mnemonicControl = null;
}
result = 1;
@@ -4019,20 +4106,53 @@ long gtk_mnemonic_activate (long widget, long arg1) {
}
@Override
-long gtk_motion_notify_event (long widget, long event) {
+void gtk4_motion_event(long controller, double x, double y, long event) {
if (mouseDown) {
dragBegun = true;
}
+
+ if (this == display.currentControl && (hooks(SWT.MouseHover) || filters(SWT.MouseHover))) {
+ display.addMouseHoverTimeout(handle);
+ }
+
+ int time = GDK.gdk_event_get_time(event);
+ int state = GDK.gdk_event_get_modifier_state(event);
+ boolean isHint = false;
+
+ if (this != display.currentControl) {
+ if (display.currentControl != null && !display.currentControl.isDisposed()) {
+ display.removeMouseHoverTimeout(display.currentControl.handle);
+ /*
+ * Note: for GTK4, the call to display.mapInPixels function was removed due to the
+ * inability to get the origin of surfaces. Testing needs to be done to see if
+ * the x, y, coordinates suffice.
+ */
+ display.currentControl.sendMouseEvent(SWT.MouseExit, 0, time, x, y, isHint, state);
+ }
+ if (!isDisposed()) {
+ display.currentControl = this;
+ sendMouseEvent(SWT.MouseEnter, 0, time, x, y, isHint, state);
+ }
+ }
+
+ sendMouseEvent(SWT.MouseMove, 0, time, x, y, isHint, state);
+}
+
+@Override
+long gtk_motion_notify_event (long widget, long event) {
int result;
- double [] eventX = new double[1];
- double [] eventY = new double[1];
+ if (mouseDown) {
+ dragBegun = true;
+ }
+
+ double[] eventX = new double[1];
+ double[] eventY = new double[1];
GDK.gdk_event_get_coords(event, eventX, eventY);
- double [] eventRX = new double[1];
- double [] eventRY = new double[1];
- GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- lastInput.x = (int) eventX[0];
- lastInput.y = (int) eventY[0];
+
+ lastInput.x = (int)eventX[0];
+ lastInput.y = (int)eventY[0];
if (containedInRegion(lastInput.x, lastInput.y)) return 0;
+
/*
* Feature in GTK: DND detection for X.11 & Wayland support is done through motion notify event
* instead of mouse click event. See Bug 503431.
@@ -4049,52 +4169,76 @@ long gtk_motion_notify_event (long widget, long event) {
}
}
if (dragging) {
- GTK.gtk_event_controller_handle_event(dragGesture,event);
+ GTK3.gtk_event_controller_handle_event(dragGesture,event);
int eventType = GDK.gdk_event_get_event_type(event);
if (eventType == GDK.GDK_3BUTTON_PRESS) return 0;
+
Point scaledEvent = DPIUtil.autoScaleDown(new Point((int)eventX[0], (int) eventY[0]));
+
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(event);
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+ }
+
if (sendDragEvent (eventButton[0], eventState[0], scaledEvent.x, scaledEvent.y, false)){
return 1;
}
}
}
- if (this == display.currentControl && (hooks (SWT.MouseHover) || filters (SWT.MouseHover))) {
- display.addMouseHoverTimeout (handle);
+
+ if (this == display.currentControl && (hooks(SWT.MouseHover) || filters(SWT.MouseHover))) {
+ display.addMouseHoverTimeout(handle);
}
- double x = eventRX[0], y = eventRY[0];
+
+ int time = GDK.gdk_event_get_time(event);
+ double x, y;
int [] state = new int [1];
- GdkEventMotion gdkEvent = new GdkEventMotion();
- if (!GTK.GTK4) {
- OS.memmove(gdkEvent, event, GdkEventMotion.sizeof);
+ boolean isHint = false;
+
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ x = eventX[0];
+ y = eventY[0];
+ } else {
+ double [] eventRX = new double[1];
+ double [] eventRY = new double[1];
+ GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
+ x = eventRX[0];
+ y = eventRY[0];
+
+ GdkEventMotion gdkEvent = new GdkEventMotion();
+ GTK3.memmove(gdkEvent, event, GdkEventMotion.sizeof);
state[0] = gdkEvent.state;
- if (gdkEvent.is_hint != 0) {
+ isHint = gdkEvent.is_hint != 0;
+
+ if (isHint) {
int [] pointer_x = new int [1], pointer_y = new int [1], mask = new int [1];
long window = eventWindow ();
- display.gdk_window_get_device_position (window, pointer_x, pointer_y, mask);
+ display.getWindowPointerPosition (window, pointer_x, pointer_y, mask);
x = pointer_x [0];
y = pointer_y [0];
state[0] = mask [0];
}
- } else {
- GDK.gdk_event_get_state(event, state);
}
- int time = GDK.gdk_event_get_time(event);
+
if (this != display.currentControl) {
if (display.currentControl != null && !display.currentControl.isDisposed ()) {
- display.removeMouseHoverTimeout (display.currentControl.handle);
- Point pt = display.mapInPixels (this, display.currentControl, (int) x, (int) y);
- display.currentControl.sendMouseEvent (SWT.MouseExit, 0, time, pt.x, pt.y, GTK.GTK4 ? false : gdkEvent.is_hint != 0, state[0]);
+ display.removeMouseHoverTimeout(display.currentControl.handle);
+ Point pt = display.mapInPixels(this, display.currentControl, (int)x, (int)y);
+ display.currentControl.sendMouseEvent(SWT.MouseExit, 0, time, pt.x, pt.y, isHint, state[0]);
}
if (!isDisposed ()) {
display.currentControl = this;
- sendMouseEvent (SWT.MouseEnter, 0, time, x, y, GTK.GTK4 ? false : gdkEvent.is_hint != 0, state[0]);
+ sendMouseEvent(SWT.MouseEnter, 0, time, x, y, isHint, state[0]);
}
}
- result = sendMouseEvent (SWT.MouseMove, 0, time, x, y, GTK.GTK4 ? false : gdkEvent.is_hint != 0, state[0]) ? 0 : 1;
+
+ result = sendMouseEvent(SWT.MouseMove, 0, time, x, y, isHint, state[0]) ? 0 : 1;
return result;
}
@@ -4109,7 +4253,7 @@ long gtk_popup_menu (long widget) {
* which doesn't exist on GTK4.
*/
} else {
- display.gdk_window_get_device_position (0, x, y, null);
+ display.getWindowPointerPosition (0, x, y, null);
}
return showMenu (x [0], y [0], SWT.MENU_KEYBOARD) ? 1 : 0;
}
@@ -4136,22 +4280,69 @@ long gtk_realize (long widget) {
}
@Override
+boolean gtk4_scroll_event(long controller, double dx, double dy, long event) {
+ boolean handled = false;
+
+ int time = GDK.gdk_event_get_time(event);
+ int state = GDK.gdk_event_get_modifier_state(event);
+
+ int direction = GDK.gdk_scroll_event_get_direction(event);
+ boolean discreteScrolling = direction != GDK.GDK_SCROLL_SMOOTH;
+
+ // Note about GTK4: Scroll events do not provide coordinates of the event (gdk_event_get_position returns Nan)
+ if (discreteScrolling) {
+ switch (direction) {
+ case GDK.GDK_SCROLL_UP:
+ return !sendMouseEvent(SWT.MouseWheel, 0, 3, SWT.SCROLL_LINE, true, time, 0, 0, false, state);
+ case GDK.GDK_SCROLL_DOWN:
+ return !sendMouseEvent(SWT.MouseWheel, 0, -3, SWT.SCROLL_LINE, true, time, 0, 0, false, state);
+ case GDK.GDK_SCROLL_LEFT:
+ return !sendMouseEvent(SWT.MouseHorizontalWheel, 0, 3, 0, true, time, 0, 0, false, state);
+ case GDK.GDK_SCROLL_RIGHT:
+ return !sendMouseEvent(SWT.MouseHorizontalWheel, 0, -3, 0, true, time, 0, 0, false, state);
+ }
+ } else {
+ double[] delta_x = new double[1], delta_y = new double [1];
+ GDK.gdk_scroll_event_get_deltas(event, delta_x, delta_y);
+
+ if (delta_x[0] != 0) {
+ handled = !sendMouseEvent(SWT.MouseHorizontalWheel, 0, (int)(-3 * delta_x[0]), 0, true, time, 0, 0, false, state);
+ }
+ if (delta_y[0] != 0) {
+ handled = !sendMouseEvent(SWT.MouseWheel, 0, (int)(-3 * delta_y[0]), SWT.SCROLL_LINE, true, time, 0, 0, false, state);
+ }
+
+ return handled;
+ }
+
+ return false;
+}
+
+@Override
long gtk_scroll_event (long widget, long eventPtr) {
long result = 0;
- double [] eventX = new double[1];
- double [] eventY = new double[1];
+
+ double [] eventX = new double [1];
+ double [] eventY = new double [1];
GDK.gdk_event_get_coords(eventPtr, eventX, eventY);
+
+ int [] state = new int [1];
+ GDK.gdk_event_get_state(eventPtr, state);
+
double [] eventRX = new double[1];
double [] eventRY = new double[1];
GDK.gdk_event_get_root_coords(eventPtr, eventRX, eventRY);
+
int time = GDK.gdk_event_get_time(eventPtr);
- int [] state = new int[1];
- GDK.gdk_event_get_state(eventPtr, state);
- lastInput.x = (int) eventX[0];
- lastInput.y = (int) eventY[0];
+
int [] direction = new int[1];
boolean fetched = GDK.gdk_event_get_scroll_direction(eventPtr, direction);
+
+ lastInput.x = (int) eventX[0];
+ lastInput.y = (int) eventY[0];
+
if (containedInRegion(lastInput.x, lastInput.y)) return 0;
+
if (fetched) {
switch (direction[0]) {
case GDK.GDK_SCROLL_UP:
@@ -4165,7 +4356,9 @@ long gtk_scroll_event (long widget, long eventPtr) {
}
} else {
double[] delta_x = new double[1], delta_y = new double [1];
- if (GDK.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) {
+ boolean deltasAvailable = GDK.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y);
+
+ if (deltasAvailable) {
if (delta_x [0] != 0) {
result = (sendMouseEvent (SWT.MouseHorizontalWheel, 0, (int)(-3 * delta_x [0]), 0, true, time, eventRX[0], eventRY[0], false, state[0]) ? 0 : 1);
}
@@ -4178,7 +4371,7 @@ long gtk_scroll_event (long widget, long eventPtr) {
}
@Override
-long gtk_show_help (long widget, long helpType) {
+long gtk3_show_help (long widget, long helpType) {
if (!hasFocus ()) return 0;
return sendHelpEvent (helpType) ? 1 : 0;
}
@@ -4224,13 +4417,8 @@ public long internal_new_GC (GCData data) {
if (gc != 0) {
Cairo.cairo_reference (gc);
} else {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- long surface;
- if (GTK.GTK4) {
- surface = GDK.gdk_surface_create_similar_surface(gdkResource, Cairo.CAIRO_CONTENT_COLOR_ALPHA, data.width, data.height);
- } else {
- surface = GDK.gdk_window_create_similar_surface(gdkResource, Cairo.CAIRO_CONTENT_COLOR_ALPHA, data.width, data.height);
- }
+ if (GTK.GTK4) {
+ long surface = GDK.gdk_surface_create_similar_surface(gdkResource, Cairo.CAIRO_CONTENT_COLOR_ALPHA, data.width, data.height);
gc = Cairo.cairo_create(surface);
} else {
gc = GDK.gdk_cairo_create (gdkResource);
@@ -4548,7 +4736,9 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole
rect.width = Math.max (0, width);
rect.height = Math.max (0, height);
}
- GDK.gdk_surface_invalidate_rect(surface, rect);
+ /* TODO: GTK4 no ability to invalidate surfaces, may need to keep track of
+ * invalid regions ourselves and do gdk_surface_queue_expose. Will need a different way to force redraws
+ * New "render" signal? */
} else {
long window = paintWindow ();
if (redrawAll) {
@@ -4611,14 +4801,7 @@ void releaseWidget () {
if (hadFocus) fixFocus (this);
if (display.currentControl == this) display.currentControl = null;
display.removeMouseHoverTimeout (handle);
- if (GTK.GTK4) {
- if (enableSurface != 0) {
- GDK.gdk_surface_set_user_data (enableSurface, 0);
- GDK.gdk_surface_destroy (enableSurface);
- enableSurface = 0;
- }
- redrawSurface = 0;
- } else {
+ if (!GTK.GTK4) {
long imHandle = imHandle ();
if (imHandle != 0 && GTK.GTK_IS_IM_CONTEXT(imHandle)) {
GTK.gtk_im_context_reset (imHandle);
@@ -4643,6 +4826,31 @@ void releaseWidget () {
}
accessible = null;
region = null;
+ if (dragGesture != 0) {
+ OS.g_object_unref(dragGesture);
+ dragGesture = 0;
+ }
+ if (rotateGesture != 0) {
+ OS.g_object_unref(rotateGesture);
+ rotateGesture = 0;
+ }
+ if (zoomGesture != 0) {
+ OS.g_object_unref(zoomGesture);
+ zoomGesture = 0;
+ }
+}
+
+@Override
+void destroyWidget() {
+ if (GTK.GTK4) {
+ // Remove widget from hierarchy by removing it from parent container
+ if (parent != null) {
+ OS.swt_fixed_remove(parent.parentingHandle(), fixedHandle);
+ }
+ releaseHandle();
+ } else {
+ super.destroyWidget();
+ }
}
/**
@@ -4653,18 +4861,7 @@ void releaseWidget () {
* should be raised or lowered
*/
void restackWindow (long window, long sibling, boolean above) {
- GDK.gdk_window_restack (window, sibling, above);
-}
-
-/**
- * GTK4 only, do not call on GTK3.
- * @param window a GdkSurface
- * @param sibling the sibling thereof, or 0
- * @param above a boolean setting for whether the surface
- * should be raised or lowered
- */
-void restackSurface (long surface, long sibling, boolean above) {
- GDK.gdk_surface_restack (surface, sibling, above);
+ GDK.gdk_window_restack (window, sibling, above);
}
boolean sendDragEvent (int button, int stateMask, int x, int y, boolean isStateMask) {
@@ -4712,7 +4909,7 @@ void sendFocusEvent (int type) {
}
boolean sendGestureEvent (int stateMask, int detail, int x, int y, double delta) {
- if (containedInRegion(x, y)) return false;
+ if (containedInRegion(x, y)) return false;
switch (detail) {
case SWT.GESTURE_ROTATE: {
return sendGestureEvent(stateMask, detail, x, y, delta, 0, 0, 0);
@@ -4824,7 +5021,13 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
sendOrPost(SWT.MouseDown, mouseDownEvent);
}
}
- return true;
+ /* This checks for Wayland, a previous MouseDown || MouseMove in the
+ * dragDetectionQueue and it checks if the current event is MouseMove
+ * This will prevent them from not being queued, which caused
+ * Bug 576215 - [Wayland] Mouse events not received as on other platforms.
+ * In x11 this will always return true as before.
+ */
+ if( (OS.isX11() || (dragDetectionQueue == null) || (type != SWT.MouseMove)) ) return true;
}
Event event = new Event ();
event.time = time;
@@ -4839,9 +5042,10 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
int [] origin_x = new int [1], origin_y = new int [1];
Rectangle eventRect;
if (GTK.GTK4) {
- long surface = eventSurface ();
- GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
- eventRect = new Rectangle ((int)x - origin_x [0], (int)y - origin_y [0], 0, 0);
+// long surface = eventSurface ();
+// GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
+// eventRect = new Rectangle ((int)x - origin_x [0], (int)y - origin_y [0], 0, 0);
+ eventRect = new Rectangle ((int)x, (int)y, 0, 0);
event.setBounds (DPIUtil.autoScaleDown (eventRect));
} else {
long window = eventWindow ();
@@ -4855,7 +5059,6 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
/**
* Bug 510446:
- * In the original gtk2 DnD architecture, Drag detection was done in mouseDown.
* For Wayland support, Drag detection is now done in mouseMove (as does gtk internally).
*
* However, traditionally external widgets (e.g StyledText or non-SWT widgets) expect to
@@ -4868,7 +5071,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
* - To ensure we follow 'send/post' contract as per parameter, we
* temporarily utilize event.data to hold send/post flag.
* There's also logic in place such that mouseDown/mouseMotion is always sent before mouseUp.
- * - On Gtk2, mouseMove is sent during DnD. On Gtk3x11 it's not due to hacky implementation of DnD.
+ * - On Gtk3x11 it's not due to hacky implementation of DnD.
* On Wayland mouseMove is once again sent during DnD as per improved architecture.
*/
event.data = Boolean.valueOf(send);
@@ -5006,38 +5209,15 @@ private void _setBackground (Color color) {
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + ";}\n"
- + name + ":selected" + " {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
-
- // Cache background
- cssBackground = css;
-
- // Apply background color and any cached foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css (context, finalCss);
- } else {
- GTK.gtk_widget_override_background_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- GTK.gtk_widget_override_background_color(handle, GTK.GTK_STATE_FLAG_SELECTED, selectedBackground);
- }
-}
-
-void setBackgroundGradientGdkRGBA (long context, long handle, GdkRGBA rgba) {
- String css ="* {\n";
- if (rgba != null) {
- String color = display.gtk_rgba_to_css_string (rgba);
- //Note, use 'background-image' CSS class with caution. Not all themes/widgets support it. (e.g button doesn't).
- //Use 'background' CSS class where possible instead unless 'background-image' is explicidly supported.
- css += "background-image: -gtk-gradient (linear, 0 0, 0 1, color-stop(0, " + color + "), color-stop(1, " + color + "));\n";
- }
- css += "}\n";
- //Cache background color
- cssBackground = css;
+ // Form background string
+ String name = display.gtk_widget_class_get_css_name(handle);
+ String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + ";}\n"
+ + name + ":selected" + " {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
+
+ // Cache background
+ cssBackground = css;
- // Apply background color and any cached foreground color
+ // Apply background color and any cached foreground color
String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
gtk_css_provider_load_from_css (context, finalCss);
}
@@ -5052,9 +5232,9 @@ void gtk_css_provider_load_from_css (long context, String css) {
OS.g_object_unref (provider);
}
if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
+ GTK4.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
} else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
+ GTK3.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
}
}
@@ -5071,17 +5251,16 @@ void setBackgroundGdkRGBA (long handle, GdkRGBA rgba) {
if (control == null) control = this;
rgba = control.getBackgroundGdkRGBA();
}
- }
- else {
+ } else {
alpha = backgroundAlpha;
}
if (rgba != null) {
rgba.alpha = alpha / (float)255;
}
- long context = GTK.gtk_widget_get_style_context (handle);
- setBackgroundGdkRGBA (context, handle, rgba);
- GTK.gtk_style_context_invalidate (context);
- return;
+
+ long context = GTK.gtk_widget_get_style_context(handle);
+ setBackgroundGdkRGBA(context, handle, rgba);
+ if (!GTK.GTK4) GTK3.gtk_style_context_invalidate(context);
}
/**
* Sets the receiver's background image to the image specified
@@ -5121,11 +5300,12 @@ public void setBackgroundImage (Image image) {
}
void setBackgroundSurface (Image image) {
- long window = GTK.gtk_widget_get_window (paintHandle ());
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
// gdk_window_set_background_pattern() deprecated in GTK3.22+
return;
}
+
+ long window = GTK3.gtk_widget_get_window (paintHandle ());
if (window != 0) {
if (image.surface != 0) {
long pattern = Cairo.cairo_pattern_create_for_surface(image.surface);
@@ -5190,11 +5370,12 @@ public void setCursor (Cursor cursor) {
void setCursor (long cursor) {
if (GTK.GTK4) {
long eventHandle = eventHandle ();
- GTK.gtk_widget_set_cursor (eventHandle, cursor);
+ GTK4.gtk_widget_set_cursor (eventHandle, cursor);
} else {
long window = eventWindow ();
if (window != 0) {
GDK.gdk_window_set_cursor (window, cursor);
+ update(false, true);
}
}
}
@@ -5222,29 +5403,6 @@ public void setDragDetect (boolean dragDetect) {
}
}
-static long enterNotifyEventProc (long ihint, long n_param_values, long param_values, long data) {
- /* 427776: this workaround listens to the enter-notify-event signal on all
- * GtkWidgets. If enableWindow (the data parameter) has been added to the
- * internal hash table of the widget, a record is kept as the lifetime of
- * enableWindow is controlled here, so we'll need to remove that reference
- * when we destroy enableWindow. this internal hash table was removed in
- * GTK 3.11.9 so once only newer GTK is targeted, this workaround can be
- * removed. */
- long instance = OS.g_value_peek_pointer (param_values);
- long hashTable = OS.g_object_get_qdata (instance, GTK_POINTER_WINDOW);
-
- // there will only ever be one item in the hash table
- if (hashTable != 0) {
- long firstItem = OS.g_hash_table_get_values (hashTable);
- long gdkWindow = OS.g_list_data (firstItem);
- // data is actually enableWindow
- if (gdkWindow == data)
- OS.g_object_set_qdata(gdkWindow, SWT_GRAB_WIDGET, instance);
- }
-
- return 1; // keep the signal connected
-}
-
/**
* Enables the receiver if the argument is <code>true</code>,
* and disables it otherwise. A disabled control is typically
@@ -5276,31 +5434,8 @@ public void setEnabled (boolean enabled) {
}
enableWidget (enabled);
if (isDisposed ()) return;
- if (GTK.GTK4) {
- if (enabled) {
- if (enableSurface != 0) {
- cleanupEnableSurface();
- }
- } else {
- GTK.gtk_widget_realize (handle);
- long parentHandle = parent.eventHandle ();
- long surface = parent.eventSurface ();
- long topHandle = topHandle ();
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (topHandle, allocation);
- GdkRectangle rect = new GdkRectangle ();
- rect.x = allocation.x;
- rect.y = allocation.y;
- rect.width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
- rect.height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
- enableSurface = GDK.gdk_surface_new_child (surface, rect);
- if (enableSurface != 0) {
- GDK.gdk_surface_set_user_data (enableSurface, parentHandle);
- restackSurface (enableSurface, gtk_widget_get_surface (topHandle), true);
- if (GTK.gtk_widget_get_visible (topHandle)) GDK.gdk_surface_show_unraised (enableSurface);
- }
- }
- } else {
+
+ if (!GTK.GTK4) {
if (enabled) {
if (enableWindow != 0) {
cleanupEnableWindow();
@@ -5320,54 +5455,24 @@ public void setEnabled (boolean enabled) {
attributes.event_mask = (0xFFFFFFFF & ~OS.ExposureMask);
attributes.wclass = GDK.GDK_INPUT_ONLY;
attributes.window_type = GDK.GDK_WINDOW_CHILD;
- enableWindow = GDK.gdk_window_new (window, attributes, GDK.GDK_WA_X | GDK.GDK_WA_Y);
+ enableWindow = GTK3.gdk_window_new (window, attributes, GDK.GDK_WA_X | GDK.GDK_WA_Y);
if (enableWindow != 0) {
- /* 427776: we need to listen to all enter-notify-event signals to
- * see if this new GdkWindow has been added to a widget's internal
- * hash table, so when the GdkWindow is destroyed we can also remove
- * that reference. */
- if (enterNotifyEventFunc != null)
- enterNotifyEventId = OS.g_signal_add_emission_hook (enterNotifyEventSignalId, 0, enterNotifyEventFunc.getAddress (), enableWindow, 0);
-
GDK.gdk_window_set_user_data (enableWindow, parentHandle);
restackWindow (enableWindow, gtk_widget_get_window (topHandle), true);
if (GTK.gtk_widget_get_visible (topHandle)) GDK.gdk_window_show_unraised (enableWindow);
}
}
}
+
if (fixFocus) fixFocus (control);
}
void cleanupEnableWindow() {
- if (enterNotifyEventFunc != null) {
- if (enterNotifyEventId > 0)
- OS.g_signal_remove_emission_hook(enterNotifyEventSignalId, enterNotifyEventId);
- enterNotifyEventId = 0;
-
- /*
- * 427776: now we can remove any reference to the GdkWindow
- * in a widget's internal hash table. this internal hash
- * table was removed in GTK 3.11.9 so once only newer GTK is
- * targeted, this workaround can be removed.
- */
- long grabWidget = OS.g_object_get_qdata(enableWindow, SWT_GRAB_WIDGET);
- if (grabWidget != 0) {
- OS.g_object_set_qdata(grabWidget, GTK_POINTER_WINDOW, 0);
- OS.g_object_set_qdata(enableWindow, SWT_GRAB_WIDGET, 0);
- }
- }
-
GDK.gdk_window_set_user_data (enableWindow, 0);
GDK.gdk_window_destroy (enableWindow);
enableWindow = 0;
}
-void cleanupEnableSurface() {
- GDK.gdk_surface_set_user_data (enableSurface, 0);
- GDK.gdk_surface_destroy (enableSurface);
- enableSurface = 0;
-}
-
/**
* Causes the receiver to have the <em>keyboard focus</em>,
* such that all keyboard events will be delivered to it. Focus
@@ -5467,67 +5572,54 @@ void setForegroundGdkRGBA (GdkRGBA rgba) {
}
void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- GdkRGBA toSet;
- if (rgba != null) {
- toSet = rgba;
- } else {
- toSet = display.COLOR_WIDGET_FOREGROUND_RGBA;
- }
- long context = GTK.gtk_widget_get_style_context (handle);
- // Form foreground string
- String color = display.gtk_rgba_to_css_string(toSet);
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
- GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
- String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) &&
- !name.contains("treeview") ? " selection" : ":selected";
- String css = "* {color: " + color + ";}\n"
- + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
+ GdkRGBA toSet;
+ if (rgba != null) {
+ toSet = rgba;
+ } else {
+ toSet = display.COLOR_WIDGET_FOREGROUND_RGBA;
+ }
+ long context = GTK.gtk_widget_get_style_context (handle);
+ // Form foreground string
+ String color = display.gtk_rgba_to_css_string(toSet);
+ String name = display.gtk_widget_class_get_css_name(handle);
+ GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
+ String selection = !name.contains("treeview") ? " selection" : ":selected";
+ String css = "* {color: " + color + ";}\n"
+ + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
// Cache foreground color
cssForeground = css;
// Apply foreground color and any cached background color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.FOREGROUND);
- gtk_css_provider_load_from_css(context, finalCss);
- } else {
- GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
- GTK.gtk_widget_override_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- GTK.gtk_widget_override_color (handle, GTK.GTK_STATE_FLAG_SELECTED, selectedForeground);
- long context = GTK.gtk_widget_get_style_context (handle);
- GTK.gtk_style_context_invalidate (context);
- return;
- }
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.FOREGROUND);
+ gtk_css_provider_load_from_css(context, finalCss);
}
void setInitialBounds () {
if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) {
- /*
- * Feature in GTK. On creation, each widget's allocation is
- * initialized to a position of (-1, -1) until the widget is
- * first sized. The fix is to set the value to (0, 0) as
- * expected by SWT.
- */
- long topHandle = topHandle ();
- GtkAllocation allocation = new GtkAllocation();
- if ((parent.style & SWT.MIRRORED) != 0) {
- allocation.x = parent.getClientWidth ();
- } else {
- allocation.x = 0;
- }
- allocation.y = 0;
- if (mustBeVisibleOnInitBounds ()) {
- GTK.gtk_widget_set_visible(topHandle, true);
- }
- if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (topHandle, allocation, -1);
- } else {
- // Prevent GTK+ allocation warnings, preferred size should be retrieved before setting allocation size.
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_widget_get_preferred_size(topHandle, null, null);
+ if (!GTK.GTK4) {
+ /*
+ * Feature in GTK. On creation, each widget's allocation is
+ * initialized to a position of (-1, -1) until the widget is
+ * first sized. The fix is to set the value to (0, 0) as
+ * expected by SWT.
+ */
+ long topHandle = topHandle();
+
+ GtkAllocation allocation = new GtkAllocation();
+ if ((parent.style & SWT.MIRRORED) != 0) {
+ allocation.x = parent.getClientWidth();
+ } else {
+ allocation.x = 0;
}
- GTK.gtk_widget_size_allocate (topHandle, allocation);
+ allocation.y = 0;
+
+ if (mustBeVisibleOnInitBounds ()) {
+ GTK.gtk_widget_set_visible(topHandle, true);
+ }
+ // Prevent GTK+ allocation warnings, preferred size should be retrieved before setting allocation size.
+ GTK.gtk_widget_get_preferred_size(topHandle, null, null);
+ GTK3.gtk_widget_size_allocate (topHandle, allocation);
}
} else {
resizeHandle (1, 1);
@@ -5543,7 +5635,7 @@ void setInitialBounds () {
* @return {@code false} by default on modern GTK 3 versions (3.20+).
*/
boolean mustBeVisibleOnInitBounds() {
- return GTK.GTK_VERSION < OS.VERSION(3, 20, 0);
+ return false;
}
/*
@@ -5552,15 +5644,13 @@ boolean mustBeVisibleOnInitBounds() {
* TODO currently phase is set to BUBBLE = 2. Look into using groups perhaps.
*/
private void setDragGesture () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- dragGesture = GTK.gtk_gesture_drag_new (handle);
- GTK.gtk_event_controller_set_propagation_phase (dragGesture,
- 2);
- GTK.gtk_gesture_single_set_button (dragGesture, 0);
- OS.g_signal_connect(dragGesture, OS.begin, gestureBegin.getAddress(), this.handle);
- OS.g_signal_connect(dragGesture, OS.end, gestureEnd.getAddress(), this.handle);
- return;
- }
+ dragGesture = GTK.gtk_gesture_drag_new (handle);
+ GTK.gtk_event_controller_set_propagation_phase (dragGesture,
+ 2);
+ GTK.gtk_gesture_single_set_button (dragGesture, 0);
+ OS.g_signal_connect(dragGesture, OS.begin, gestureBegin.getAddress(), this.handle);
+ OS.g_signal_connect(dragGesture, OS.end, gestureEnd.getAddress(), this.handle);
+ return;
}
//private void setPanGesture () {
@@ -5568,27 +5658,23 @@ private void setDragGesture () {
//}
private void setRotateGesture () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- rotateGesture = GTK.gtk_gesture_rotate_new(handle);
- GTK.gtk_event_controller_set_propagation_phase (rotateGesture,
- 2);
- OS.g_signal_connect (rotateGesture, OS.angle_changed, gestureRotation.getAddress(), this.handle);
- OS.g_signal_connect(rotateGesture, OS.begin, gestureBegin.getAddress(), this.handle);
- OS.g_signal_connect(rotateGesture, OS.end, gestureEnd.getAddress(), this.handle);
- return;
- }
+ rotateGesture = GTK.gtk_gesture_rotate_new(handle);
+ GTK.gtk_event_controller_set_propagation_phase (rotateGesture,
+ 2);
+ OS.g_signal_connect (rotateGesture, OS.angle_changed, gestureRotation.getAddress(), this.handle);
+ OS.g_signal_connect(rotateGesture, OS.begin, gestureBegin.getAddress(), this.handle);
+ OS.g_signal_connect(rotateGesture, OS.end, gestureEnd.getAddress(), this.handle);
+ return;
}
private void setZoomGesture () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- zoomGesture = GTK.gtk_gesture_zoom_new(handle);
- GTK.gtk_event_controller_set_propagation_phase (zoomGesture,
- 2);
- OS.g_signal_connect(zoomGesture, OS.scale_changed, gestureZoom.getAddress(), this.handle);
- OS.g_signal_connect(zoomGesture, OS.begin, gestureBegin.getAddress(), this.handle);
- OS.g_signal_connect(zoomGesture, OS.end, gestureEnd.getAddress(), this.handle);
- return;
- }
+ zoomGesture = GTK.gtk_gesture_zoom_new(handle);
+ GTK.gtk_event_controller_set_propagation_phase (zoomGesture,
+ 2);
+ OS.g_signal_connect(zoomGesture, OS.scale_changed, gestureZoom.getAddress(), this.handle);
+ OS.g_signal_connect(zoomGesture, OS.begin, gestureBegin.getAddress(), this.handle);
+ OS.g_signal_connect(zoomGesture, OS.end, gestureEnd.getAddress(), this.handle);
+ return;
}
static Control getControl(long handle) {
@@ -5604,7 +5690,7 @@ static void rotateProc(long gesture, double angle, double angle_delta, long user
int [] state = new int[1];
double [] x = new double[1];
double [] y = new double[1];
- GTK.gtk_get_current_event_state(state);
+ GTK3.gtk_get_current_event_state(state);
GTK.gtk_gesture_get_point(gesture, GTK.gtk_gesture_get_last_updated_sequence(gesture), x, y);
/*
* Returning delta is off by two decimal points and is returning negative numbers on
@@ -5623,7 +5709,7 @@ static void magnifyProc(long gesture, double zoom, long user_data) {
int [] state = new int[1];
double [] x = new double[1];
double [] y = new double[1];
- GTK.gtk_get_current_event_state(state);
+ GTK3.gtk_get_current_event_state(state);
GTK.gtk_gesture_get_point(gesture, GTK.gtk_gesture_get_last_updated_sequence(gesture), x, y);
double delta = GTK.gtk_gesture_zoom_get_scale_delta(gesture);
Control control = getControl(user_data);
@@ -5639,7 +5725,7 @@ static void swipeProc(long gesture, double velocity_x, double velocity_y, long u
int [] state = new int[1];
double [] x = new double[1];
double [] y = new double[1];
- GTK.gtk_get_current_event_state(state);
+ GTK3.gtk_get_current_event_state(state);
GTK.gtk_gesture_get_point(gesture, GTK.gtk_gesture_get_last_updated_sequence(gesture), x, y);
Control control = getControl(user_data);
control.sendGestureEvent(state[0], SWT.GESTURE_SWIPE, (int) x[0], (int) y[0], xVelocity[0], yVelocity[0]);
@@ -5652,7 +5738,7 @@ static void gestureBeginProc(long gesture, long sequence, long user_data) {
int [] state = new int[1];
double [] x = new double[1];
double [] y = new double[1];
- GTK.gtk_get_current_event_state(state);
+ GTK3.gtk_get_current_event_state(state);
GTK.gtk_gesture_get_point(gesture, sequence, x, y);
Control control = getControl(user_data);
control.sendGestureEvent(state[0], SWT.GESTURE_BEGIN, (int) x[0], (int) y[0], 0);
@@ -5664,7 +5750,7 @@ static void gestureEndProc(long gesture, long sequence, long user_data) {
int [] state = new int[1];
double [] x = new double[1];
double [] y = new double[1];
- GTK.gtk_get_current_event_state(state);
+ GTK3.gtk_get_current_event_state(state);
GTK.gtk_gesture_get_point(gesture, GTK.gtk_gesture_get_last_updated_sequence(gesture), x, y);
Control control = getControl(user_data);
control.sendGestureEvent(state[0], SWT.GESTURE_END, (int) x[0], (int) y[0], 0);
@@ -5784,8 +5870,11 @@ public boolean setParent (Composite parent) {
Menu [] menus = oldShell.findMenus (this);
if (oldShell != newShell || oldDecorations != newDecorations) {
fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
- newDecorations.fixAccelGroup ();
- oldDecorations.fixAccelGroup ();
+
+ if (!GTK.GTK4) {
+ newDecorations.fixAccelGroup ();
+ oldDecorations.fixAccelGroup ();
+ }
}
long newParent = parent.parentingHandle();
gtk_widget_reparent(this, newParent);
@@ -5805,11 +5894,7 @@ public boolean setParent (Composite parent) {
allocation.y = y;
allocation.width = width;
allocation.height = height;
- if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (topHandle, allocation, -1);
- } else {
- GTK.gtk_widget_size_allocate (topHandle, allocation);
- }
+ gtk_widget_size_allocate(topHandle, allocation, -1);
this.parent = parent;
setZOrder (null, false, true);
reskin (SWT.ALL);
@@ -5855,19 +5940,13 @@ public void setRedraw (boolean redraw) {
checkWidget();
if (redraw) {
if (--drawCount == 0) {
- if (GTK.GTK4) {
- if (redrawSurface != 0) {
- GDK.gdk_surface_hide (redrawSurface);
- GDK.gdk_surface_destroy (redrawSurface);
- redrawSurface = 0;
- }
- } else {
+ if (!GTK.GTK4) {
if (redrawWindow != 0) {
long window = paintWindow ();
/* Explicitly hiding the window avoids flicker on GTK+ >= 2.6 */
GDK.gdk_window_hide (redrawWindow);
GDK.gdk_window_destroy (redrawWindow);
- GDK.gdk_window_set_events (window, GTK.gtk_widget_get_events (paintHandle ()));
+ GDK.gdk_window_set_events (window, GTK3.gtk_widget_get_events (paintHandle ()));
redrawWindow = 0;
}
}
@@ -5875,22 +5954,15 @@ public void setRedraw (boolean redraw) {
} else {
if (drawCount++ == 0) {
if (GTK.gtk_widget_get_realized (handle)) {
- Rectangle rect = getBoundsInPixels ();
- if (GTK.GTK4) {
- long surface = paintSurface();
- GdkRectangle gdkRectangle = new GdkRectangle ();
- gdkRectangle.width = rect.width;
- gdkRectangle.height = rect.height;
- redrawSurface = GDK.gdk_surface_new_child(surface, gdkRectangle);
- GDK.gdk_surface_show(redrawSurface);
- } else {
+ Rectangle bounds = getBoundsInPixels ();
+ if (!GTK.GTK4) {
long window = paintWindow ();
GdkWindowAttr attributes = new GdkWindowAttr ();
- attributes.width = rect.width;
- attributes.height = rect.height;
+ attributes.width = bounds.width;
+ attributes.height = bounds.height;
attributes.event_mask = GDK.GDK_EXPOSURE_MASK;
attributes.window_type = GDK.GDK_WINDOW_CHILD;
- redrawWindow = GDK.gdk_window_new (window, attributes, 0);
+ redrawWindow = GTK3.gdk_window_new (window, attributes, 0);
if (redrawWindow != 0) {
int mouseMask = GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK |
GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK |
@@ -5972,13 +6044,16 @@ public void setTextDirection(int textDirection) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setToolTipText (String string) {
+public void setToolTipText(String string) {
checkWidget();
- setToolTipText (_getShell (), string);
- toolTipText = string;
+
+ if (!Objects.equals(string, toolTipText)) {
+ toolTipText = string;
+ setToolTipText(_getShell(), string);
+ }
}
-void setToolTipText (Shell shell, String newString) {
+void setToolTipText(Shell shell, String newString) {
/*
* Feature in GTK. In order to prevent children widgets
* from inheriting their parent's tooltip, the tooltip is
@@ -5992,7 +6067,7 @@ void setToolTipText (Shell shell, String newString) {
* under the pointer).
*/
if (display.currentControl == this) {
- shell.setToolTipText (shell.handle, eventHandle (), newString);
+ setToolTipText(shell.handle, newString);
}
}
@@ -6047,10 +6122,8 @@ public void setVisible (boolean visible) {
if (isDisposed ()) return;
state &= ~HIDDEN;
if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) == 0) {
- if (GTK.GTK4) {
- if (enableSurface != 0) GDK.gdk_surface_show_unraised (enableSurface);
- } else {
- if (enableWindow != 0) GDK.gdk_window_show_unraised (enableWindow);
+ if (!GTK.GTK4) {
+ if (enableWindow != 0) GDK.gdk_window_show_unraised(enableWindow);
}
GTK.gtk_widget_show (topHandle);
}
@@ -6079,17 +6152,16 @@ public void setVisible (boolean visible) {
}
GTK.gtk_widget_hide (topHandle);
if (isDisposed ()) return;
- if (GTK.GTK4) {
- if (enableSurface != 0) GDK.gdk_surface_hide (enableSurface);
- } else {
- if (enableWindow != 0) GDK.gdk_window_hide (enableWindow);
+ if (!GTK.GTK4) {
+ if (enableWindow != 0) GDK.gdk_window_hide(enableWindow);
}
+
sendEvent (SWT.Hide);
}
}
void setZOrder (Control sibling, boolean above, boolean fixRelations) {
- setZOrder (sibling, above, fixRelations, true);
+ setZOrder (sibling, above, fixRelations, true);
}
void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fixChildren) {
@@ -6128,36 +6200,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi
long topHandle = topHandle ();
long siblingHandle = sibling != null ? sibling.topHandle () : 0;
if (GTK.GTK4) {
- long surface = gtk_widget_get_surface (topHandle);
- if (surface != 0) {
- long siblingSurface = 0;
- if (sibling != null) {
- if (above && sibling.enableSurface != 0) {
- siblingSurface = enableSurface;
- } else {
- siblingSurface = GTK.gtk_widget_get_surface (siblingHandle);
- }
- }
- long redrawSurface = fixChildren ? parent.redrawSurface : 0;
- if (!OS.isX11 () || (siblingSurface == 0 && (!above || redrawSurface == 0))) {
- if (above) {
- GDK.gdk_surface_raise (surface);
- if (redrawSurface != 0) GDK.gdk_surface_raise (redrawSurface);
- if (enableSurface != 0) GDK.gdk_surface_raise (enableSurface);
- } else {
- if (enableSurface != 0) GDK.gdk_surface_lower (enableSurface);
- GDK.gdk_surface_lower (surface);
- }
- } else {
- long siblingS = siblingSurface != 0 ? siblingSurface : redrawSurface;
- boolean stack_mode = above;
- if (redrawSurface != 0 && siblingSurface == 0) stack_mode = false;
- restackSurface (surface, siblingS, stack_mode);
- if (enableSurface != 0) {
- restackSurface (enableSurface, surface, true);
- }
- }
- }
+ //TODO: Test GTK3 behavior then implement, probably using gdk_toplevel_lower
} else {
long window = gtk_widget_get_window (topHandle);
if (window != 0) {
@@ -6166,7 +6209,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi
if (above && sibling.enableWindow != 0) {
siblingWindow = enableWindow;
} else {
- siblingWindow = GTK.gtk_widget_get_window (siblingHandle);
+ siblingWindow = GTK3.gtk_widget_get_window (siblingHandle);
}
}
long redrawWindow = fixChildren ? parent.redrawWindow : 0;
@@ -6185,7 +6228,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi
if (redrawWindow != 0 && siblingWindow == 0) stack_mode = false;
restackWindow (window, siblingW, stack_mode);
if (enableWindow != 0) {
- restackWindow (enableWindow, window, true);
+ restackWindow (enableWindow, window, true);
}
}
}
@@ -6254,14 +6297,30 @@ boolean showMenu (int x, int y, int detail) {
if (isDisposed ()) return false;
if (event.doit) {
if (menu != null && !menu.isDisposed ()) {
- boolean hooksKeys = hooks (SWT.KeyDown) || hooks (SWT.KeyUp);
- menu.createIMMenu (hooksKeys ? imHandle() : 0);
- Rectangle rect = DPIUtil.autoScaleUp (event.getBounds ());
- if (rect.x != x || rect.y != y) {
- menu.setLocationInPixels (rect.x, rect.y);
+ if (GTK.GTK4) {
+
+ long temp = 0;
+ if (GTK.gtk_widget_get_parent(menu.handle) != 0) {
+ temp = OS.g_object_ref(menu.handle);
+ GTK.gtk_widget_unparent(menu.handle);
+ }
+ GTK.gtk_widget_set_parent(menu.handle, this.handle);
+ if (temp != 0) OS.g_object_unref(temp);
+
+
+ menu.setLocationInPixels(x, y);
+ menu.setVisible(true);
+
+ return true;
+ } else {
+ Rectangle rect = DPIUtil.autoScaleUp (event.getBounds ());
+ if (rect.x != x || rect.y != y) {
+ menu.setLocationInPixels (rect.x, rect.y);
+ }
+ menu.setVisible (true);
+ return true;
}
- menu.setVisible (true);
- return true;
+
}
}
return false;
@@ -6273,7 +6332,11 @@ void showWidget () {
long topHandle = topHandle ();
long parentHandle = parent.parentingHandle ();
parent.setParentGdkResource (this);
- GTK.gtk_container_add (parentHandle, topHandle);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(parentHandle, topHandle);
+ } else {
+ GTK3.gtk_container_add(parentHandle, topHandle);
+ }
if (handle != 0 && handle != topHandle) GTK.gtk_widget_show (handle);
if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) == 0) {
if (fixedHandle != 0) GTK.gtk_widget_show (fixedHandle);
@@ -6287,13 +6350,13 @@ void sort (int [] items) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (items [j] <= items [j + gap]) {
+ if (items [j] <= items [j + gap]) {
int swap = items [j];
items [j] = items [j + gap];
items [j + gap] = swap;
- }
- }
- }
+ }
+ }
+ }
}
}
@@ -6505,7 +6568,12 @@ boolean translateMnemonic (Event event, Control control) {
boolean translateMnemonic (int keyval, long event) {
long key = GDK.gdk_keyval_to_unicode (keyval);
int [] state = new int[1];
- GDK.gdk_event_get_state(event, state);
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_state(event, state);
+ }
+
if (key < 0x20) return false;
if (state[0] == 0) {
int code = traversalCode (keyval, event);
@@ -6513,7 +6581,11 @@ boolean translateMnemonic (int keyval, long event) {
} else {
Shell shell = _getShell ();
int mask = GDK.GDK_CONTROL_MASK | GDK.GDK_SHIFT_MASK | GDK.GDK_MOD1_MASK;
- if ((state[0] & mask) != GTK.gtk_window_get_mnemonic_modifier (shell.shellHandle)) return false;
+ if (GTK.GTK4) {
+ if (state[0] != GDK.GDK_MOD1_MASK) return false;
+ } else {
+ if ((state[0] & mask) != GTK3.gtk_window_get_mnemonic_modifier (shell.shellHandle)) return false;
+ }
}
Decorations shell = menuShell ();
if (shell.isVisible () && shell.isEnabled ()) {
@@ -6529,9 +6601,15 @@ boolean translateMnemonic (int keyval, long event) {
boolean translateTraversal (long event) {
int detail = SWT.TRAVERSE_NONE;
int [] eventKeyval = new int [1];
- GDK.gdk_event_get_keyval(event, eventKeyval);
int [] eventState = new int[1];
- GDK.gdk_event_get_state(event, eventState);
+ if (GTK.GTK4) {
+ eventKeyval[0] = GDK.gdk_key_event_get_keyval(event);
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, eventKeyval);
+ GDK.gdk_event_get_state(event, eventState);
+ }
+
int key = eventKeyval[0];
int code = traversalCode (key, event);
boolean all = false;
@@ -6696,9 +6774,12 @@ boolean traverseMnemonic (char key) {
* to be processed before this method returns. If there
* are no outstanding paint request, this method does
* nothing.
- * <p>
- * Note: This method does not cause a redraw.
- * </p>
+ * <p>Note:</p>
+ * <ul>
+ * <li>This method does not cause a redraw.</li>
+ * <li>Some OS versions forcefully perform automatic deferred painting.
+ * This method does nothing in that case.</li>
+ * </ul>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -6721,13 +6802,6 @@ void update (boolean all, boolean flush) {
if (!GTK.gtk_widget_get_realized (handle)) return;
long window = paintWindow ();
if (flush) display.flushExposes (window, all);
- /*
- * Do not send expose events on GTK 3.16.0+
- * It's worth checking whether can be removed on all GTK 3 versions.
- */
- if (GTK.GTK_VERSION < OS.VERSION(3, 16, 0)) {
- GDK.gdk_window_process_updates (window, all);
- }
}
void updateBackgroundMode () {
@@ -6750,23 +6824,25 @@ long windowProc (long handle, long arg0, long user_data) {
Control control = findBackgroundControl ();
boolean draw = control != null && control.backgroundImage != null;
if (!draw && (state & CANVAS) != 0) {
- if (GTK.GTK_VERSION < OS.VERSION(3, 14, 0)) {
- GdkRGBA rgba = new GdkRGBA();
- long context = GTK.gtk_widget_get_style_context (handle);
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- draw = rgba.alpha == 0;
- } else {
- draw = (state & BACKGROUND) == 0;
- }
+ draw = (state & BACKGROUND) == 0;
}
if (draw) {
long cairo = arg0;
GdkRectangle rect = new GdkRectangle ();
GDK.gdk_cairo_get_clip_rectangle (cairo, rect);
if (control == null) control = this;
- long gdkResource = GTK.GTK4 ? GTK.gtk_widget_get_surface(handle) :
- GTK.gtk_widget_get_window(handle);
- drawBackground (control, gdkResource, cairo, 0, rect.x, rect.y, rect.width, rect.height);
+ long gdkResource;
+ if (GTK.GTK4) {
+ gdkResource = GTK4.gtk_native_get_surface(GTK4.gtk_widget_get_native (handle));
+ drawBackground (control, gdkResource, cairo, rect.x, rect.y, rect.width, rect.height);
+ } else {
+ gdkResource = GTK3.gtk_widget_get_window(handle);
+ if (gdkResource != 0) {
+ drawBackground (control, gdkResource, 0, rect.x, rect.y, rect.width, rect.height);
+ } else {
+ drawBackground (control, 0, cairo, rect.x, rect.y, rect.width, rect.height);
+ }
+ }
}
break;
}
@@ -6802,12 +6878,9 @@ Point getWindowOrigin () {
* @return the origin
*/
Point getSurfaceOrigin () {
- int [] x = new int [1];
- int [] y = new int [1];
+ double[] originX = new double[1], originY = new double[1];
+ boolean success = GTK4.gtk_widget_translate_coordinates(fixedHandle, getShell().shellHandle, 0, 0, originX, originY);
- long surface = eventSurface ();
- GDK.gdk_surface_get_origin (surface, x, y);
-
- return new Point (x [0], y [0]);
+ return success ? new Point((int)originX[0], (int)originY[0]) : new Point(0, 0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
index ba938b20c1..1906552587 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
@@ -26,6 +26,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/*
* Developer note: Unit tests for this class can be found under:
@@ -72,6 +74,12 @@ public class DateTime extends Composite {
containerHandle,
calendarHandle;
+ /**
+ * GTK4 field used to hold the main GtkEditable widget.
+ * Primarily used for styles SWT.DROP_DOWN & SWT.TIME
+ */
+ long editableHandle;
+
/* Emulated DATE and TIME fields */
Calendar calendar;
Button down;
@@ -295,7 +303,7 @@ Point computeMaxTextSize (int wHint, int hHint, boolean changed) {
// Fixed length for DEFAULT_SHORT_DATE_FORMAT, no need to adjust text length.
}
- Point textSize = computeNativeSize (GTK.GTK4? spinButtonHandle : textEntryHandle, wHint, hHint, changed);
+ Point textSize = computeNativeSize (GTK.GTK4 ? handle : textEntryHandle, wHint, hHint, changed);
// Change the text back to match the current calendar
updateControl();
return textSize;
@@ -361,15 +369,15 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
Rectangle trim = super.computeTrimInPixels (x, y, width, height);
int xborder = 0, yborder = 0;
GtkBorder tmp = new GtkBorder ();
- long context = GTK.gtk_widget_get_style_context (GTK.GTK4 ? spinButtonHandle :textEntryHandle);
- int state_flag = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(textEntryHandle);
+ long context = GTK.gtk_widget_get_style_context (GTK.GTK4 ? editableHandle : textEntryHandle);
+ int state_flag = GTK.gtk_widget_get_state_flags(GTK.GTK4 ? editableHandle : textEntryHandle);
gtk_style_context_get_padding(context, state_flag, tmp);
trim.x -= tmp.left;
trim.y -= tmp.top;
trim.width += tmp.left + tmp.right;
trim.height += tmp.top + tmp.bottom;
if ((style & SWT.BORDER) != 0) {
- int state = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(textEntryHandle);
+ int state = GTK.gtk_widget_get_state_flags(GTK.GTK4 ? editableHandle : textEntryHandle);
gtk_style_context_get_border(context, state, tmp);
trim.x -= tmp.left;
trim.y -= tmp.top;
@@ -386,101 +394,108 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
@Override
-void createHandle (int index) {
- createHandle ();
-}
-
-/**
- * Here we carefully define the three internal handles:
- * textEntryHandle
- * containerHandle
- * calendarHandle
- */
-void createHandle () {
- if (isCalendar ()) {
+void createHandle(int index) {
+ if (isCalendar()) {
state |= HANDLE;
- createHandleForFixed ();
- createHandleForCalendar ();
+ createSWTFixedHandle();
+ createHandleForCalendar ();
} else {
- createHandleForFixed ();
- if (isDateWithDropDownButton ()) {
- createHandleForDateWithDropDown ();
+ createSWTFixedHandle();
+ if (isDateWithDropDownButton()) {
+ createHandleForDateWithDropDown();
} else {
- createHandleForDateTime ();
- }
- GTK.gtk_editable_set_editable (textEntryHandle, (style & SWT.READ_ONLY) == 0);
- if (GTK.GTK_VERSION <= OS.VERSION(3, 20, 0)) {
- GTK.gtk_entry_set_has_frame (textEntryHandle, (style & SWT.BORDER) != 0);
+ createHandleForDateTime();
}
+
+ GTK.gtk_editable_set_editable(textEntryHandle, (style & SWT.READ_ONLY) == 0);
}
}
-private void createHandleForFixed () {
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
+private void createSWTFixedHandle() {
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (!GTK.GTK4) GTK3.gtk_widget_set_has_window(fixedHandle, true);
}
-private void createHandleForCalendar () {
- calendarHandle = GTK.gtk_calendar_new ();
- if (calendarHandle == 0) error (SWT.ERROR_NO_HANDLES);
+private void createHandleForCalendar() {
+ handle = GTK.gtk_calendar_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
- //Calenadar becomes container in this case.
- handle = calendarHandle;
+ //Calendar becomes container in this case.
+ calendarHandle = handle;
containerHandle = calendarHandle;
- GTK.gtk_container_add (fixedHandle, calendarHandle);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
- int flags = GTK.GTK_CALENDAR_SHOW_HEADING | GTK.GTK_CALENDAR_SHOW_DAY_NAMES;
- if (showWeekNumbers()) {
- flags |= GTK.GTK_CALENDAR_SHOW_WEEK_NUMBERS;
+ GTK4.gtk_calendar_set_show_heading(handle, true);
+ GTK4.gtk_calendar_set_show_day_names(handle, true);
+ GTK4.gtk_calendar_set_show_week_numbers(handle, showWeekNumbers());
+ } else {
+ GTK3.gtk_container_add(fixedHandle, handle);
+
+ int flags = GTK.GTK_CALENDAR_SHOW_HEADING | GTK.GTK_CALENDAR_SHOW_DAY_NAMES;
+ if (showWeekNumbers()) {
+ flags |= GTK.GTK_CALENDAR_SHOW_WEEK_NUMBERS;
+ }
+ GTK3.gtk_calendar_set_display_options(handle, flags);
+ GTK.gtk_widget_show(handle);
}
- GTK.gtk_calendar_set_display_options (calendarHandle, flags);
- GTK.gtk_widget_show (calendarHandle);
}
private void createHandleForDateWithDropDown () {
- //Create box to put entry and button into box.
- containerHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 0);
- if (containerHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, containerHandle);
+ handle = gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, false, 0);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ containerHandle = handle;
- //Create entry
- textEntryHandle = GTK.gtk_entry_new ();
- if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (containerHandle, textEntryHandle);
+ if (GTK.GTK4) {
+ editableHandle = GTK.gtk_entry_new();
+ if (editableHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ textEntryHandle = GTK4.gtk_editable_get_delegate(editableHandle);
- GTK.gtk_widget_show (containerHandle);
- GTK.gtk_widget_show (textEntryHandle);
+ OS.swt_fixed_add(fixedHandle, handle);
+ GTK4.gtk_box_append(handle, editableHandle);
+ } else {
+ textEntryHandle = GTK.gtk_entry_new();
+ if (textEntryHandle == 0) error(SWT.ERROR_NO_HANDLES);
- handle = containerHandle;
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ GTK3.gtk_container_add(fixedHandle, handle);
+ GTK3.gtk_container_add(handle, textEntryHandle);
+ GTK.gtk_widget_show(containerHandle);
+ GTK.gtk_widget_show(textEntryHandle);
- // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
- // reset to default font to get the usual behavior
- setFontDescription (defaultFont ().handle);
+
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ setFontDescription(defaultFont().handle);
+ }
}
-private void createHandleForDateTime () {
- long adjusment = GTK.gtk_adjustment_new (0, -9999, 9999, 1, 0, 0);
+private void createHandleForDateTime() {
+ long adjustment = GTK.gtk_adjustment_new(0, -9999, 9999, 1, 0, 0);
if (GTK.GTK4) {
- spinButtonHandle = GTK.gtk_spin_button_new (adjusment, 1, 0);
- long boxHandle = GTK.gtk_widget_get_first_child(spinButtonHandle);
- long textHandle = GTK.gtk_widget_get_first_child(boxHandle);
- textEntryHandle = textHandle;
- handle = spinButtonHandle;
- containerHandle = spinButtonHandle;
+ handle = GTK.gtk_spin_button_new(adjustment, 1, 0);
+ editableHandle = handle;
+ textEntryHandle = GTK4.gtk_editable_get_delegate(editableHandle);
+ containerHandle = textEntryHandle;
} else {
- textEntryHandle = GTK.gtk_spin_button_new (adjusment, 1, 0);
- handle = textEntryHandle;
+ handle = GTK.gtk_spin_button_new(adjustment, 1, 0);
+ textEntryHandle = handle;
containerHandle = textEntryHandle;
}
- if (textEntryHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (textEntryHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_container_add(fixedHandle, handle);
+ }
- GTK.gtk_spin_button_set_numeric (GTK.GTK4? spinButtonHandle : textEntryHandle, false);
- GTK.gtk_container_add (fixedHandle, GTK.GTK4? spinButtonHandle : textEntryHandle);
- GTK.gtk_spin_button_set_wrap (GTK.GTK4? spinButtonHandle : textEntryHandle, (style & SWT.WRAP) != 0);
+ GTK.gtk_spin_button_set_numeric(handle, false);
+ GTK.gtk_spin_button_set_wrap(handle, (style & SWT.WRAP) != 0);
}
void createDropDownButton () {
@@ -710,14 +725,23 @@ String getFormattedString() {
return dateFormat.format(calendar.getTime());
}
-void getDate () {
- int [] y = new int [1];
- int [] m = new int [1];
- int [] d = new int [1];
- GTK.gtk_calendar_get_date (calendarHandle, y, m, d);
- year = y[0];
- month = m[0];
- day = d[0];
+void getDate() {
+ int[] y = new int[1], m = new int[1], d = new int[1];
+
+ if (GTK.GTK4) {
+ long dateTime = GTK4.gtk_calendar_get_date(calendarHandle);
+ OS.g_date_time_get_ymd(dateTime, y, m, d);
+
+ year = y[0];
+ month = m[0] - 1;
+ day = d[0];
+ } else {
+ GTK3.gtk_calendar_get_date(calendarHandle, y, m, d);
+
+ year = y[0];
+ month = m[0];
+ day = d[0];
+ }
}
/**
@@ -919,13 +943,9 @@ long fontHandle () {
private long dateTimeHandle () {
if (isCalendar () && calendarHandle != 0) {
- return calendarHandle;
+ return calendarHandle;
} else if ((isDate () || isTime ())) {
- if (GTK.GTK4) {
- if (spinButtonHandle != 0) return spinButtonHandle;
- } else {
- if (textEntryHandle != 0) return textEntryHandle;
- }
+ if (textEntryHandle != 0) return textEntryHandle;
return super.focusHandle ();
} else {
return super.focusHandle ();
@@ -938,35 +958,40 @@ void hookEvents () {
if (isCalendar ()) {
hookEventsForCalendar ();
} else {
- int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK;
- GTK.gtk_widget_add_events (textEntryHandle, eventMask);
-
-
if ((style & SWT.DROP_DOWN) == 0 ) {
hookEventsForDateTimeSpinner ();
}
- if (OS.G_OBJECT_TYPE (textEntryHandle) == GTK.GTK_TYPE_MENU ()) {
- hookEventsForMenu ();
+
+ if (!GTK.GTK4) {
+ int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK;
+ GTK3.gtk_widget_add_events(textEntryHandle, eventMask);
+
+ if (OS.G_OBJECT_TYPE (textEntryHandle) == GTK3.GTK_TYPE_MENU ()) {
+ hookEventsForMenu ();
+ }
}
}
}
final private void hookEventsForCalendar () {
- OS.g_signal_connect_closure (calendarHandle, OS.day_selected, display.getClosure (DAY_SELECTED), false);
- OS.g_signal_connect_closure (calendarHandle, OS.day_selected_double_click, display.getClosure (DAY_SELECTED_DOUBLE_CLICK), false);
- OS.g_signal_connect_closure (calendarHandle, OS.month_changed, display.getClosure (MONTH_CHANGED), false);
+ OS.g_signal_connect_closure(calendarHandle, OS.day_selected, display.getClosure(DAY_SELECTED), false);
+
+ if (GTK.GTK4) {
+ OS.g_signal_connect_closure(calendarHandle, OS.next_month, display.getClosure(MONTH_CHANGED), false);
+ OS.g_signal_connect_closure(calendarHandle, OS.next_year, display.getClosure(MONTH_CHANGED), false);
+ OS.g_signal_connect_closure(calendarHandle, OS.prev_month, display.getClosure(MONTH_CHANGED), false);
+ OS.g_signal_connect_closure(calendarHandle, OS.prev_year, display.getClosure(MONTH_CHANGED), false);
+ } else {
+ OS.g_signal_connect_closure(calendarHandle, OS.day_selected_double_click, display.getClosure(DAY_SELECTED_DOUBLE_CLICK), false);
+ OS.g_signal_connect_closure(calendarHandle, OS.month_changed, display.getClosure(MONTH_CHANGED), false);
+ }
}
final private void hookEventsForDateTimeSpinner () {
- OS.g_signal_connect_closure (textEntryHandle, OS.output, display.getClosure (OUTPUT), true);
+ OS.g_signal_connect_closure (handle, OS.output, display.getClosure (OUTPUT), true);
if (GTK.GTK4) {
- long keyController = GTK.gtk_event_controller_key_new();
- GTK.gtk_widget_add_controller(textEntryHandle, keyController);
- GTK.gtk_event_controller_set_propagation_phase(keyController, GTK.GTK_PHASE_TARGET);
-
- long focusAddress = display.focusCallback.getAddress();
- OS.g_signal_connect (keyController, OS.focus_in, focusAddress, FOCUS_IN);
+ //TODO: GTK4 focus-in (focus event)?
} else {
OS.g_signal_connect_closure (textEntryHandle, OS.focus_in_event, display.getClosure (FOCUS_IN_EVENT), true);
}
@@ -1238,7 +1263,6 @@ void handleFocus (int type) {
shell.addListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, popupFilter);
- display.addFilter (SWT.FocusIn, popupFilter);
Event e = new Event ();
notifyListeners (SWT.FocusIn, e);
break;
@@ -1251,7 +1275,6 @@ void handleFocus (int type) {
Shell shell = getShell ();
shell.removeListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
- display.removeFilter (SWT.FocusIn, popupFilter);
display.removeFilter (SWT.MouseDown, mouseEventListener);
Event e = new Event ();
notifyListeners (SWT.FocusOut, e);
@@ -1333,7 +1356,7 @@ void selectField(FieldPosition fieldPosition) {
commitData();
fieldPosition = updateField(fieldPosition);
}
- Point pt = getSelection();
+ Point pt = getTextSelection();
int start = fieldPosition.getBeginIndex();
int end = fieldPosition.getEndIndex();
if (sameField && start == pt.x && end == pt.y) {
@@ -1345,17 +1368,24 @@ void selectField(FieldPosition fieldPosition) {
String value = getText(getText(), start, end - 1);
int s = value.lastIndexOf(' ');
s = (s == -1) ? start : start + s + 1;
- setSelection(s, end);
+ setTextSelection(s, end);
}
});
+ sendSelectionEvent(SWT.Selection);
}
void sendSelectionEvent () {
int [] y = new int [1];
int [] m = new int [1];
int [] d = new int [1];
- GTK.gtk_calendar_get_date (calendarHandle, y, m, d);
- //TODO: hours, minutes, seconds?
+
+ if (GTK.GTK4) {
+ long dateTime = GTK4.gtk_calendar_get_date(calendarHandle);
+ OS.g_date_time_get_ymd(dateTime, y, m, d);
+ } else {
+ GTK3.gtk_calendar_get_date (calendarHandle, y, m, d);
+ }
+
if (d[0] != day ||
m[0] != month ||
y[0] != year) {
@@ -1393,22 +1423,18 @@ void setBackgroundGdkRGBA (GdkRGBA rgba) {
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
// We need to override here because DateTime widgets use "background" instead of
// "background-color" as their CSS property.
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
- String css = name + " {background: " + display.gtk_rgba_to_css_string (rgba) + ";}\n" +
- name + ":selected" + " {background: " + display.gtk_rgba_to_css_string(display.COLOR_LIST_SELECTION_RGBA) + ";}";
- // Cache background
- cssBackground = css;
+ // Form background string
+ String name = display.gtk_widget_class_get_css_name(handle);
+ String css = name + " {background: " + display.gtk_rgba_to_css_string (rgba) + ";}\n" +
+ name + ":selected" + " {background: " + display.gtk_rgba_to_css_string(display.COLOR_LIST_SELECTION_RGBA) + ";}";
- // Apply background color and any cached foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css (context, finalCss);
- } else {
- super.setBackgroundGdkRGBA(context, handle, rgba);
- }
+ // Cache background
+ cssBackground = css;
+
+ // Apply background color and any cached foreground color
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css (context, finalCss);
}
@Override
@@ -1483,8 +1509,15 @@ public void setDate (int year, int month, int day) {
this.year = year;
this.month = month;
this.day = day;
- GTK.gtk_calendar_select_month (calendarHandle, month, year);
- GTK.gtk_calendar_select_day (calendarHandle, day);
+
+ if (GTK.GTK4) {
+ long dateTime = OS.g_date_time_new_local(year, month + 1, day, 0, 0, 0);
+ GTK4.gtk_calendar_select_day(calendarHandle, dateTime);
+ OS.g_date_time_unref(dateTime);
+ } else {
+ GTK3.gtk_calendar_select_month (calendarHandle, month, year);
+ GTK3.gtk_calendar_select_day (calendarHandle, day);
+ }
} else {
calendar.set (year, month, day);
updateControl ();
@@ -1512,7 +1545,13 @@ public void setDay (int day) {
if (!isValidDate (getYear (), getMonth (), day)) return;
if (isCalendar ()) {
this.day = day;
- GTK.gtk_calendar_select_day (calendarHandle, day);
+
+ if (GTK.GTK4) {
+ long dateTime = OS.g_date_time_new_local(this.year, this.month + 1, day, 0, 0, 0);
+ GTK4.gtk_calendar_select_day(calendarHandle, dateTime);
+ } else {
+ GTK3.gtk_calendar_select_day (calendarHandle, day);
+ }
} else {
calendar.set (Calendar.DAY_OF_MONTH, day);
updateControl ();
@@ -1594,7 +1633,14 @@ public void setMonth (int month) {
if (!isValidDate (getYear (), month, getDay ())) return;
if (isCalendar ()) {
this.month = month;
- GTK.gtk_calendar_select_month (calendarHandle, month, year);
+
+ if (GTK.GTK4) {
+ long dateTime = OS.g_date_time_new_local(year, month + 1, day, 0, 0, 0);
+ GTK4.gtk_calendar_select_day(calendarHandle, dateTime);
+ OS.g_date_time_unref(dateTime);
+ } else {
+ GTK3.gtk_calendar_select_month(calendarHandle, month, year);
+ }
} else {
calendar.set (Calendar.MONTH, month);
updateControl ();
@@ -1677,7 +1723,14 @@ public void setYear (int year) {
if (!isValidDate (year, getMonth (), getDay ())) return;
if (isCalendar ()) {
this.year = year;
- GTK.gtk_calendar_select_month (calendarHandle, month, year);
+
+ if (GTK.GTK4) {
+ long dateTime = OS.g_date_time_new_local(year, month + 1, day, 0, 0, 0);
+ GTK4.gtk_calendar_select_day(calendarHandle, dateTime);
+ OS.g_date_time_unref(dateTime);
+ } else {
+ GTK3.gtk_calendar_select_month(calendarHandle, month, year);
+ }
} else {
calendar.set (Calendar.YEAR, year);
updateControl ();
@@ -1689,7 +1742,7 @@ void setBoundsInPixels (int x, int y, int width, int height) {
//Date with Drop down is in container. Needs extra handling.
if (isDateWithDropDownButton ()) {
- long sizingHandle = GTK.GTK4 ? spinButtonHandle : textEntryHandle;
+ long sizingHandle = GTK.GTK4 ? editableHandle : textEntryHandle;
GtkRequisition requisition = new GtkRequisition ();
GTK.gtk_widget_get_preferred_size (sizingHandle, null, requisition);
int oldHeight = requisition.height; //Entry should not expand vertically. It is single liner.
@@ -1698,62 +1751,38 @@ void setBoundsInPixels (int x, int y, int width, int height) {
GTK.gtk_widget_set_size_request (sizingHandle, (newWidth >= 0) ? newWidth : 0, oldHeight);
}
- /*
- * TAG_GTK_CALENDAR_VERTICAL_FILL_WORKAROUND_394534
- * Work around a GtkCalendar bug in GTK3:
- * https://bugzilla.gnome.org/show_bug.cgi?id=737670
- *
- * In GTK3.0 - 3.14.2 (but not Gtk2) if the calendar is expanded beyond a certain size,
- * (e.g in the case of 'Vertical fill' in ControlExample, then the days shift down
- * and they become un-selectable. e.g, see screen shot:
- * https://bug737670.bugzilla-attachments.gnome.org/attachment.cgi?id=287470
- *
- * To work around this, if gtk 3.0 - 3.14.2 is used, do not allow the calendar to expand beyond it's preffered
- * native height.
- */
- int fixedGtkVersion = OS.VERSION (3, 14, 2);
- if (isCalendar () && (GTK.GTK_VERSION < fixedGtkVersion)) {
- int calendarPrefferedVerticalSize = computeSizeInPixels (SWT.DEFAULT, SWT.DEFAULT, true).y;
- if (height > calendarPrefferedVerticalSize) {
- height = calendarPrefferedVerticalSize;
- }
- }
super.setBoundsInPixels (x, y, width, height);
-
}
/**
* Usually called when control is resized or first initialized.
*/
-private void setDropDownButtonSize () {
- Rectangle rect = getClientAreaInPixels ();
+private void setDropDownButtonSize() {
+ Rectangle rect = getClientAreaInPixels();
int parentWidth = rect.width;
int parentHeight = rect.height;
- Point buttonSize = down.computeSizeInPixels (SWT.DEFAULT, parentHeight);
+ Point buttonSize = down.computeSizeInPixels(SWT.DEFAULT, parentHeight);
- //TAG_GTK3__NO_VERTICAL_FILL_ADJUSTMENT
- int dateEntryHeight = computeNativeSize (GTK.GTK4 ? spinButtonHandle : textEntryHandle, SWT.DEFAULT, SWT.DEFAULT, false).y;
- int newHeight = dateEntryHeight;
+ int dateEntryHeight = computeNativeSize(GTK.GTK4 ? editableHandle : textEntryHandle, SWT.DEFAULT, SWT.DEFAULT, false).y;
//Move button a little closer to entry field, by amount of padding.
int newXpos = parentWidth - buttonSize.x - getGtkBorderPadding().left - getGtkBorderPadding().right;
int newYPos = parentHeight/2 - dateEntryHeight/2;
- down.setBoundsInPixels (newXpos, newYPos, buttonSize.x, newHeight);
+ down.setBoundsInPixels (newXpos, newYPos, buttonSize.x, dateEntryHeight);
}
/**
* Gets the border padding structure, which can be used to determine the inner padding of the text field.
* Note, this function returns the correct padding only under GTK3.
- * Under Gtk2, it returns a constant.
* @return GtkBorder object that holds the padding values.
*/
GtkBorder getGtkBorderPadding () {
//In Gtk3, acquire border.
GtkBorder gtkBorderPadding = new GtkBorder ();
- long contextHandle = GTK.GTK4 ? spinButtonHandle : textEntryHandle;
+ long contextHandle = GTK.GTK4 ? editableHandle : textEntryHandle;
long context = GTK.gtk_widget_get_style_context (contextHandle);
- int state_flag = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(contextHandle);
+ int state_flag = GTK.gtk_widget_get_state_flags(contextHandle);
gtk_style_context_get_padding(context, state_flag, gtkBorderPadding);
return gtkBorderPadding;
}
@@ -1763,9 +1792,9 @@ boolean onNumberKeyInput(int key) {
return false;
}
int fieldName = getCalendarField(currentField);
- StringBuffer prefix = new StringBuffer();
- StringBuffer current = new StringBuffer();
- StringBuffer suffix = new StringBuffer();
+ StringBuilder prefix = new StringBuilder();
+ StringBuilder current = new StringBuilder();
+ StringBuilder suffix = new StringBuilder();
AttributedCharacterIterator iterator = dateFormat.formatToCharacterIterator(calendar.getTime());
char c = iterator.first();
@@ -1795,6 +1824,10 @@ boolean onNumberKeyInput(int key) {
}
} else {
char newText = keyToString(key);
+ // Don't allow non-digit character inputs for SWT.TIME, unless modifying the AM/PM field
+ if ((style & SWT.TIME) != 0 && fieldName != Calendar.AM_PM && !Character.isDigit(newText)) {
+ return false;
+ }
if (!Character.isAlphabetic(newText) && !Character.isDigit(newText)) {
return false;
}
@@ -1817,13 +1850,21 @@ boolean onNumberKeyInput(int key) {
}
typeBufferPos++;
}
- StringBuffer newText = new StringBuffer(prefix);
+ StringBuilder newText = new StringBuilder(prefix);
newText.append(typeBuffer);
newText.append(suffix);
setText(newText.toString());
- setSelection(prefix.length() + typeBufferPos, prefix.length() + typeBuffer.length());
+ setTextSelection(prefix.length() + typeBufferPos, prefix.length() + typeBuffer.length());
currentField.setBeginIndex(prefix.length());
currentField.setEndIndex(prefix.length() + typeBuffer.length());
+ if (!isCalendar()) {
+ try {
+ Date date = dateFormat.parse(getText());
+ calendar.setTime(date);
+ } catch (ParseException e) {
+ // invalid value, input will reset...
+ }
+ }
return false;
}
@@ -1833,7 +1874,7 @@ private char keyToString(int key) {
// convert numberpad button to regular key;
key -= 65408;
}
- return (char) key;
+ return (char) GDK.gdk_keyval_to_unicode(key);
}
void updateControl() {
@@ -1844,8 +1885,8 @@ void updateControl() {
}
@Override
-void register () {
- super.register ();
+void register() {
+ super.register();
if (handle != 0 && display.getWidget(handle) == null) display.addWidget(handle, this);
if (containerHandle != 0 && containerHandle != handle) display.addWidget (containerHandle, this);
if (textEntryHandle != 0 && textEntryHandle != containerHandle) display.addWidget (textEntryHandle, this);
@@ -1911,12 +1952,18 @@ int getArrow(long widget) {
* Calculates appropriate width of GtkEntry and
* adds Date/Time string to the Date/Time Spinner
*/
-void setText (String dateTimeText) {
- if (dateTimeText != null){
- byte [] dateTimeConverted = Converter.wcsToMbcs (dateTimeText, true);
- //note, this is ignored if the control is in a fill-layout.
- GTK.gtk_entry_set_width_chars (textEntryHandle, dateTimeText.length ());
- GTK.gtk_entry_set_text (textEntryHandle, dateTimeConverted);
+void setText(String dateTimeText) {
+ if (dateTimeText != null) {
+ byte[] dateTimeConverted = Converter.javaStringToCString(dateTimeText);
+
+ if (GTK.GTK4) {
+ GTK.gtk_entry_buffer_set_text(GTK4.gtk_text_get_buffer(textEntryHandle), dateTimeConverted, dateTimeText.length());
+ } else {
+ //note, this is ignored if the control is in a fill-layout.
+ GTK3.gtk_entry_set_width_chars(textEntryHandle, dateTimeText.length());
+ GTK3.gtk_entry_set_text(textEntryHandle, dateTimeConverted);
+ }
+
if (popupCalendar != null && calendar != null) {
Date parse;
try {
@@ -1941,10 +1988,56 @@ void setText (String dateTimeText) {
}
@Override
+boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) {
+ if (!isReadOnly() && (isTime() || isDate())) {
+ switch (keyval) {
+ case GDK.GDK_Up:
+ case GDK.GDK_KP_Up:
+ incrementField(+1);
+ break;
+ case GDK.GDK_Down:
+ case GDK.GDK_KP_Down:
+ incrementField(-1);
+ break;
+ case GDK.GDK_Tab:
+ case GDK.GDK_Right:
+ case GDK.GDK_KP_Right:
+ selectField(getNextField(currentField));
+ sendEvent(SWT.Traverse);
+ break;
+ case GDK.GDK_Left:
+ case GDK.GDK_KP_Left:
+ selectField(getPreviousField(currentField));
+ sendEvent(SWT.Traverse);
+ break;
+ case GDK.GDK_Home:
+ case GDK.GDK_KP_Home:
+ /* Set the value of the current field to its minimum */
+ if (currentField != null) {
+ setTextField(currentField, calendar.getActualMinimum(getCalendarField(currentField)));
+ }
+ break;
+ case GDK.GDK_End:
+ case GDK.GDK_KP_End:
+ /* Set the value of the current field to its maximum */
+ if (currentField != null) {
+ setTextField(currentField, calendar.getActualMaximum(getCalendarField(currentField)));
+ }
+ break;
+ default:
+ onNumberKeyInput(keyval);
+ }
+ }
+
+ return true;
+}
+
+@Override
long gtk_key_press_event (long widget, long event) {
if (!isReadOnly () && (isTime () || isDate ())) {
int [] key = new int[1];
GDK.gdk_event_get_keyval(event, key);
+
switch (key[0]) {
case GDK.GDK_Up:
case GDK.GDK_KP_Up:
@@ -1998,21 +2091,6 @@ void commitData() {
updateControl();
}
-/** returns selected text **/
-Point getSelection () {
- checkWidget ();
- Point selection;
- int [] start = new int [1];
- int [] end = new int [1];
- GTK.gtk_editable_get_selection_bounds (textEntryHandle, start, end);
- long ptr = GTK.gtk_entry_get_text (textEntryHandle);
- start[0] = (int)OS.g_utf8_offset_to_utf16_offset (ptr, start[0]);
- end[0] = (int)OS.g_utf8_offset_to_utf16_offset (ptr, end[0]);
- selection = new Point (start [0], end [0]);
- return selection;
-
-}
-
/**
* Returns a string containing a copy of the contents of the
* receiver's text field, or an empty string if there are no
@@ -2025,45 +2103,94 @@ Point getSelection () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-String getText () {
- checkWidget ();
+String getText() {
+ checkWidget();
if (textEntryHandle != 0) {
- long str = GTK.gtk_entry_get_text (textEntryHandle);
- if (str == 0) return "";
- int length = C.strlen (str);
- byte [] buffer = new byte [length];
- C.memmove (buffer, str, length);
- return new String (Converter.mbcsToWcs (buffer));
- }
+ long stringPtr;
+
+ if (GTK.GTK4) {
+ stringPtr = GTK.gtk_entry_buffer_get_text(GTK4.gtk_text_get_buffer(textEntryHandle));
+ } else {
+ stringPtr = GTK3.gtk_entry_get_text(textEntryHandle);
+ }
+ if (stringPtr == 0) return "";
+
+ int length = C.strlen(stringPtr);
+ byte[] buffer = new byte[length];
+ C.memmove(buffer, stringPtr, length);
+
+ return new String(Converter.mbcsToWcs(buffer));
+ } else {
return "";
+ }
}
/**
- * returns GtkEntry starting from index and ending with index
- * provided by the user
+ * Gets the substring between start and end indices of the
+ * caller provided string. Checks are done to ensure that start
+ * and end indices are well formed.
+ *
+ * @return substring of str between start & end. If start & end
+ * indices are malformed, an empty string is returned.
*/
-String getText (String str,int start, int end) {
+String getText(String str, int start, int end) {
checkWidget ();
if (!(start <= end && 0 <= end)) return "";
- int length = str.length ();
- end = Math.min (end, length - 1);
+
+ int length = str.length();
+ end = Math.min(end, length - 1);
if (start > end) return "";
- start = Math.max (0, start);
+ start = Math.max(0, start);
+
/*
* NOTE: The current implementation uses substring ()
* which can reference a potentially large character
* array.
*/
- return str.substring (start, end + 1);
+ return str.substring(start, end + 1);
}
-void setSelection (int start, int end) {
- checkWidget ();
- long ptr = GTK.gtk_entry_get_text (textEntryHandle);
- start = (int)OS.g_utf16_offset_to_utf8_offset (ptr, start);
- end = (int)OS.g_utf16_offset_to_utf8_offset (ptr, end);
- GTK.gtk_editable_set_position (textEntryHandle, start);
- GTK.gtk_editable_select_region (textEntryHandle, start, end);
+/**
+ * Returns the selected text. If selected text is less than
+ * one character the returned Point has equal start and end values.
+ *
+ * @return the highlighted (selected) text or position of cursor
+ **/
+Point getTextSelection() {
+ checkWidget();
+ int[] start = new int[1];
+ int[] end = new int[1];
+ GTK.gtk_editable_get_selection_bounds(textEntryHandle, start, end);
+
+ long stringPtr;
+ if (GTK.GTK4) {
+ stringPtr = GTK.gtk_entry_buffer_get_text(GTK4.gtk_text_get_buffer(textEntryHandle));
+ } else {
+ stringPtr = GTK3.gtk_entry_get_text (textEntryHandle);
+ }
+
+ start[0] = (int)OS.g_utf8_offset_to_utf16_offset(stringPtr, start[0]);
+ end[0] = (int)OS.g_utf8_offset_to_utf16_offset(stringPtr, end[0]);
+
+ return new Point(start[0], end[0]);
+}
+
+/** Highlight (select) the text between the start and end. **/
+void setTextSelection(int start, int end) {
+ checkWidget();
+
+ long stringPtr;
+ if (GTK.GTK4) {
+ stringPtr = GTK.gtk_entry_buffer_get_text(GTK4.gtk_text_get_buffer(textEntryHandle));
+ } else {
+ stringPtr = GTK3.gtk_entry_get_text(textEntryHandle);
+ }
+
+ start = (int) OS.g_utf16_offset_to_utf8_offset(stringPtr, start);
+ end = (int) OS.g_utf16_offset_to_utf8_offset(stringPtr, end);
+
+ GTK.gtk_editable_set_position(textEntryHandle, start);
+ GTK.gtk_editable_select_region(textEntryHandle, start, end);
}
void setTextField(FieldPosition field, int value) {
@@ -2096,18 +2223,33 @@ private int validateValueBounds(FieldPosition field, int value) {
@Override
long gtk_button_release_event (long widget, long event) {
- if (isDate () || isTime ()) {
+ if (isDate() || isTime()) {
int [] eventButton = new int [1];
GDK.gdk_event_get_button(event, eventButton);
+
if (eventButton[0] == 1) { // left mouse button.
- onTextMouseClick ();
+ onTextMouseClick();
}
}
- return super.gtk_button_release_event (widget, event);
+ return super.gtk_button_release_event(widget, event);
}
+
+@Override
+void gtk_gesture_release_event(long gesture, int n_press, double x, double y, long event) {
+ if (isDate() || isTime()) {
+ int button = GTK.gtk_gesture_single_get_current_button(gesture);
+
+ if (button == 1) {
+ onTextMouseClick();
+ }
+ }
+
+ super.gtk_gesture_release_event(gesture, n_press, x, y, event);
+}
+
/**
* Output signal is called when Spinner's arrow buttons are triggered,
- * usually by clicking the mouse on the [gtk2: up/down] [gtk3: +/-] buttons.
+ * usually by clicking the mouse on the [gtk3: +/-] buttons.
* On every click output is called twice presenting current and previous value.
* This method compares two values and determines if Up or down arrow was called.
*/
@@ -2145,7 +2287,7 @@ void onTextMouseClick() {
if (calendar == null) {
return; // Guard: Object not fully initialized yet.
}
- int clickPosition = getSelection().x;
+ int clickPosition = getTextSelection().x;
AttributedCharacterIterator iterator = dateFormat.formatToCharacterIterator(calendar.getTime());
iterator.first();
int pos = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
index 619035829b..fa0107916b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
@@ -17,6 +17,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class provide the appearance and
@@ -179,23 +181,40 @@ void _setImages (Image [] images) {
sort (bestImages);
images = bestImages;
}
- long pixbufs = 0;
+
+ // Allocate GList of icons
+ long icon_list = 0;
if (images != null) {
- for (int i = 0; i < images.length; i++) {
- Image image = images [i];
- long pixbuf = ImageList.createPixbuf (image);
- pixbufs = OS.g_list_append (pixbufs, pixbuf);
+ for (Image image : images) {
+ long pixbuf = ImageList.createPixbuf(image);
+ if (GTK.GTK4) {
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ icon_list = OS.g_list_append(icon_list, texture);
+ } else {
+ icon_list = OS.g_list_append(icon_list, pixbuf);
+ }
}
}
- GTK.gtk_window_set_icon_list (topHandle (), pixbufs);
- long [] data = new long [1];
- long temp = pixbufs;
+
+ if (GTK.GTK4) {
+ /*
+ * Set texture list to window's surface. Can no longer
+ * use GtkWindow functions as they require a themed icon.
+ */
+ long surface = GTK4.gtk_native_get_surface(topHandle());
+ GTK4.gdk_toplevel_set_icon_list(surface, icon_list);
+ } else {
+ GTK3.gtk_window_set_icon_list(topHandle(), icon_list);
+ }
+
+ // Release GList
+ long temp = icon_list;
while (temp != 0) {
- C.memmove (data, temp, C.PTR_SIZEOF);
- OS.g_object_unref (data [0]);
- temp = OS.g_list_next (temp);
+ OS.g_object_unref(OS.g_list_data(temp));
+ temp = OS.g_list_next(temp);
}
- if (pixbufs != 0) OS.g_list_free (pixbufs);
+ if (icon_list != 0) OS.g_list_free(icon_list);
}
void addMenu (Menu menu) {
@@ -243,7 +262,7 @@ void createAccelGroup () {
if (accelGroup == 0) error (SWT.ERROR_NO_HANDLES);
//FIXME - what should we do for Decorations
long shellHandle = topHandle ();
- GTK.gtk_window_add_accel_group (shellHandle, accelGroup);
+ GTK3.gtk_window_add_accel_group (shellHandle, accelGroup);
}
@Override
@@ -254,10 +273,10 @@ void createWidget (int index) {
void destroyAccelGroup () {
if (accelGroup == 0) return;
+ if (menuBar != null) menuBar.removeAccelerators(accelGroup);
long shellHandle = topHandle ();
- GTK.gtk_window_remove_accel_group (shellHandle, accelGroup);
- //TEMPORARY CODE
-// OS.g_object_unref (accelGroup);
+ GTK3.gtk_window_remove_accel_group (shellHandle, accelGroup);
+ OS.g_object_unref (accelGroup);
accelGroup = 0;
}
@@ -574,7 +593,12 @@ public void setDefaultButton (Button button) {
long context = GTK.gtk_widget_get_style_context (buttonHandle);
GTK.gtk_style_context_add_class(context, GTK.GTK_STYLE_CLASS_SUGGESTED_ACTION);
}
- GTK.gtk_window_set_default (topHandle (), buttonHandle);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_window_set_default_widget (topHandle(), buttonHandle);
+ } else {
+ GTK3.gtk_window_set_default (topHandle (), buttonHandle);
+ }
}
/**
@@ -704,7 +728,7 @@ public void setMenuBar (Menu menu) {
* always. This should be avoided if possible.
* </p>
*
- * @param minimized the new maximized state
+ * @param minimized the new minimized state
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -720,10 +744,10 @@ public void setMinimized (boolean minimized) {
@Override
void setOrientation (boolean create) {
- super.setOrientation (create);
- if (!create) {
- if (menuBar != null) menuBar._setOrientation (style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
- }
+ super.setOrientation (create);
+ if (!create) {
+ if (menuBar != null) menuBar._setOrientation (style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
+ }
}
void setSavedFocus (Control control) {
@@ -767,16 +791,16 @@ void sort (Image [] images) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (compare (datas [j], datas [j + gap]) >= 0) {
+ if (compare (datas [j], datas [j + gap]) >= 0) {
Image swap = images [j];
images [j] = images [j + gap];
images [j + gap] = swap;
ImageData swapData = datas [j];
datas [j] = datas [j + gap];
datas [j + gap] = swapData;
- }
- }
- }
+ }
+ }
+ }
}
}
@@ -797,7 +821,13 @@ boolean traverseReturn () {
*/
if (!button.isVisible () || !button.isEnabled ()) return true;
long shellHandle = _getShell ().topHandle ();
- return GTK.gtk_window_activate_default (shellHandle);
+
+ if (GTK.GTK4) {
+ long defaultWidget = GTK.gtk_window_get_default_widget(shellHandle);
+ return GTK.gtk_widget_activate(defaultWidget);
+ } else {
+ return GTK3.gtk_window_activate_default (shellHandle);
+ }
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
index 8cb692eafc..3e1a39565b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -19,6 +19,8 @@ import java.io.*;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class allow the user to navigate
@@ -120,11 +122,7 @@ public String getMessage () {
* </ul>
*/
public String open () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
return openNativeChooserDialog();
- } else {
- return openChooserDialog ();
- }
}
/**
* Open the file chooser dialog using the GtkFileChooserNative API (GTK3.20+) for running applications
@@ -157,23 +155,19 @@ String openNativeChooserDialog () {
*/
long ptr = OS.realpath (buffer, null);
if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
+ if (GTK.GTK4) {
+ long file = OS.g_file_new_for_path(buffer);
+ GTK4.gtk_file_chooser_set_current_folder (handle, file, 0);
+ OS.g_object_unref(file);
+ } else {
+ GTK3.gtk_file_chooser_set_current_folder (handle, ptr);
+ }
OS.g_free (ptr);
}
}
- if (message.length () > 0) {
- byte [] buffer = Converter.wcsToMbcs (message, true);
- long box = GTK.gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, 0);
- GTK.gtk_box_set_homogeneous (box, false);
- if (box == 0) error (SWT.ERROR_NO_HANDLES);
- long label = GTK.gtk_label_new (buffer);
- if (label == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (box, label);
- GTK.gtk_widget_show (label);
- GTK.gtk_label_set_line_wrap (label, true);
- GTK.gtk_label_set_justify (label, GTK.GTK_JUSTIFY_CENTER);
- GTK.gtk_file_chooser_set_extra_widget (handle, box);
- }
+
+ GTK3setNativeDialogMessage(handle, message);
+
String answer = null;
display.addIdleProc ();
int signalId = 0;
@@ -182,21 +176,30 @@ String openNativeChooserDialog () {
signalId = OS.g_signal_lookup (OS.map, GTK.GTK_TYPE_WIDGET());
hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
}
- display.sendPreExternalEventDispatchEvent ();
- int response = GTK.gtk_native_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- display.sendPostExternalEventDispatchEvent ();
+
+ int response;
+ if (GTK.GTK4) {
+ response = SyncDialogUtil.run(display, handle, true);
+ } else {
+ display.externalEventLoop = true;
+ display.sendPreExternalEventDispatchEvent ();
+ response = GTK3.gtk_native_dialog_run (handle);
+ display.externalEventLoop = false;
+ display.sendPostExternalEventDispatchEvent ();
+ }
+
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
OS.g_signal_remove_emission_hook (signalId, hookId);
}
if (response == GTK.GTK_RESPONSE_ACCEPT) {
- long path = GTK.gtk_file_chooser_get_filename (handle);
+ long path;
+ if (GTK.GTK4) {
+ long file = GTK4.gtk_file_chooser_get_file (handle);
+ path = OS.g_file_get_path(file);
+ } else {
+ path = GTK3.gtk_file_chooser_get_filename (handle);
+ }
+
if (path != 0) {
long utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null);
if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (path);
@@ -219,111 +222,34 @@ String openNativeChooserDialog () {
display.removeIdleProc ();
return answer;
}
-String openChooserDialog () {
- byte [] titleBytes = Converter.wcsToMbcs (title, true);
- long shellHandle = parent.topHandle ();
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- long handle = 0;
- if (display.getDismissalAlignment() == SWT.RIGHT) {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, 0);
- } else {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, 0);
- }
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- long group = GTK.gtk_window_get_group(0);
- GTK.gtk_window_group_add_window (group, handle);
- GTK.gtk_window_set_modal (handle, true);
- long pixbufs = GTK.gtk_window_get_icon_list (shellHandle);
- if (pixbufs != 0) {
- GTK.gtk_window_set_icon_list (handle, pixbufs);
- OS.g_list_free (pixbufs);
- }
- if (filterPath != null && filterPath.length () > 0) {
- StringBuilder stringBuilder = new StringBuilder ();
- /* filename must be a full path */
- if (!filterPath.startsWith (SEPARATOR)) {
- stringBuilder.append (SEPARATOR);
- }
- stringBuilder.append (filterPath);
- byte [] buffer = Converter.wcsToMbcs (stringBuilder.toString (), true);
- /*
- * in GTK version 2.10, gtk_file_chooser_set_current_folder requires path
- * to be true canonical path. So using realpath to convert the path to
- * true canonical path.
- */
- long ptr = OS.realpath (buffer, null);
- if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- OS.g_free (ptr);
- }
- }
+
+
+/**
+ * GTK3 only function. As of GTK4, gtk_file_chooser_set_extra_widget
+ * is no longer available, and the alternatives do not allow for such
+ * flexibility to display just the message. Therefore in GTK4, there will
+ * be no message displayed in the file chooser dialog.
+ */
+void GTK3setNativeDialogMessage(long handle, String message) {
+ if (GTK.GTK4) return;
+
if (message.length () > 0) {
- byte [] buffer = Converter.wcsToMbcs (message, true);
- long box = GTK.gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, 0);
- GTK.gtk_box_set_homogeneous (box, false);
- if (box == 0) error (SWT.ERROR_NO_HANDLES);
+ byte[] buffer = Converter.wcsToMbcs(message, true);
+ long box = GTK.gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, 0);
+ if (box == 0) error(SWT.ERROR_NO_HANDLES);
long label = GTK.gtk_label_new (buffer);
- if (label == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (box, label);
- GTK.gtk_widget_show (label);
- GTK.gtk_label_set_line_wrap (label, true);
- GTK.gtk_label_set_justify (label, GTK.GTK_JUSTIFY_CENTER);
- GTK.gtk_file_chooser_set_extra_widget (handle, box);
- }
- String answer = null;
- display.addIdleProc ();
- Dialog oldModal = null;
- if (GTK.gtk_window_get_modal (handle)) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
- }
- int signalId = 0;
- long hookId = 0;
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- signalId = OS.g_signal_lookup (OS.map, GTK.GTK_TYPE_WIDGET());
- hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
- }
- display.sendPreExternalEventDispatchEvent ();
- int response = GTK.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- display.sendPostExternalEventDispatchEvent ();
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- OS.g_signal_remove_emission_hook (signalId, hookId);
- }
- if (GTK.gtk_window_get_modal (handle)) {
- display.setModalDialog (oldModal);
- }
- if (response == GTK.GTK_RESPONSE_OK) {
- long path = GTK.gtk_file_chooser_get_filename (handle);
- if (path != 0) {
- long utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null);
- if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (path);
- if (path != utf8Ptr) OS.g_free (path);
- if (utf8Ptr != 0) {
- long [] items_written = new long [1];
- long utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null);
- OS.g_free (utf8Ptr);
- if (utf16Ptr != 0) {
- int clength = (int)items_written [0];
- char [] chars = new char [clength];
- C.memmove (chars, utf16Ptr, clength * 2);
- OS.g_free (utf16Ptr);
- answer = new String (chars);
- filterPath = answer;
- }
- }
- }
+ if (label == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK3.gtk_container_add(box, label);
+ GTK.gtk_widget_show(label);
+ GTK3.gtk_label_set_line_wrap(label, true);
+
+ GTK.gtk_box_set_homogeneous(box, false);
+ GTK.gtk_label_set_justify(label, GTK.GTK_JUSTIFY_CENTER);
+ GTK3.gtk_file_chooser_set_extra_widget(handle, box);
}
- display.removeIdleProc ();
- GTK.gtk_widget_destroy (handle);
- return answer;
}
+
/**
* Sets the path that the dialog will use to filter
* the directories it shows to the argument, which may
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index d7d8a36c3d..4eaa9e6cff 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -29,6 +29,8 @@ import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.GDBus.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are responsible for managing the
@@ -125,27 +127,31 @@ public class Display extends Device {
long fds;
int allocated_nfds;
boolean wake;
+ boolean windowSizeSet;
int [] max_priority = new int [1], timeout = new int [1];
Callback eventCallback;
long eventProc, windowProc2, windowProc3, windowProc4, windowProc5, windowProc6;
- long snapshotDrawProc;
- long keyPressReleaseProc, focusProc, enterMotionScrollProc, leaveProc;
- long gesturePressReleaseProc;
- long notifyStateProc;
+ long changeValueProc;
+ long snapshotDrawProc, keyPressReleaseProc, focusProc, windowActiveProc, enterMotionProc, leaveProc,
+ scrollProc, resizeProc, activateProc, gesturePressReleaseProc;
+ long notifyProc;
+ long computeSizeProc;
Callback windowCallback2, windowCallback3, windowCallback4, windowCallback5, windowCallback6;
- Callback snapshotDraw;
- Callback keyPressReleaseCallback, focusCallback, enterMotionScrollCallback, leaveCallback;
- Callback gesturePressReleaseCallback;
- Callback notifyStateCallback;
+ Callback changeValue;
+ Callback snapshotDraw, keyPressReleaseCallback, focusCallback, windowActiveCallback, enterMotionCallback, computeSizeCallback,
+ scrollCallback, leaveCallback, resizeCallback, activateCallback, gesturePressReleaseCallback;
+ Callback notifyCallback;
EventTable eventTable, filterTable;
static String APP_NAME = "SWT"; //$NON-NLS-1$
static String APP_VERSION = ""; //$NON-NLS-1$
static final String DISPATCH_EVENT_KEY = "org.eclipse.swt.internal.gtk.dispatchEvent"; //$NON-NLS-1$
static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
+ static final String EXTERNAL_EVENT_LOOP_KEY = "org.eclipse.swt.internal.gtk.externalEventLoop"; //$NON-NLS-1$
long [] closures, closuresProc;
int [] closuresCount;
int [] signalIds;
long shellMapProcClosure;
+ boolean externalEventLoop; // events are dispatched outside SWT, e.g. when system dialog is open
/* Widget Table */
int [] indexTable;
@@ -199,12 +205,14 @@ public class Display extends Device {
this.parent = parent;
}
+ @Override
public boolean isReadyToExit() {
Event event = new Event ();
parent.sendEvent(SWT.Close, event);
return event.doit;
}
+ @Override
public void stop() {
parent.dispose();
}
@@ -288,7 +296,6 @@ public class Display extends Device {
long shellHandle;
boolean settingsChanged, runSettings;
static final int STYLE_UPDATED = 1;
- static final int PROPERTY_NOTIFY = 2;
/* Entry focus behaviour */
boolean entrySelectOnFocus;
@@ -319,6 +326,8 @@ public class Display extends Device {
GdkRGBA COLOR_INFO_BACKGROUND_RGBA, COLOR_INFO_FOREGROUND_RGBA, COLOR_LINK_FOREGROUND_RGBA;
GdkRGBA COLOR_TITLE_FOREGROUND_RGBA, COLOR_TITLE_BACKGROUND_RGBA, COLOR_TITLE_BACKGROUND_GRADIENT_RGBA;
GdkRGBA COLOR_TITLE_INACTIVE_FOREGROUND_RGBA, COLOR_TITLE_INACTIVE_BACKGROUND_RGBA, COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT_RGBA;
+ GdkRGBA COLOR_WIDGET_DISABLED_FOREGROUND_RGBA, COLOR_TEXT_DISABLED_BACKGROUND_RGBA;
+ GdkRGBA COLOR_TOGGLE_BUTTON_FOREGROUND_RGBA;
/* Initialize color list */
ArrayList<String> colorList;
@@ -327,6 +336,14 @@ public class Display extends Device {
final int SWT_COLOR_LIST_SELECTION_TEXT_INACTIVE = 38;
final int SWT_COLOR_LIST_SELECTION_INACTIVE = 39;
+ /* Theme related */
+ /** The name of the current theme, including the theme named by GTK_THEME. */
+ static String themeName;
+ /** True if the current theme is dark. This includes the theme set in GTK_THEME. */
+ static boolean themeDark;
+
+ private final static Pattern colorPattern = Pattern.compile("[^-]color: (rgba?\\((?:\\d+(?:,\\s?)?){3,4}\\))");
+
/* Popup Menus */
Menu [] popups;
@@ -496,11 +513,16 @@ public class Display extends Device {
// PACKAGE_NAME = name.substring (0, index + 1);
// }
- /* GTK Version */
+ /* Minimum GTK version requirement */
static final int GTK3_MAJOR = 3;
- static final int GTK3_MINOR = 10;
+ static final int GTK3_MINOR = 20;
static final int GTK3_MICRO = 0;
+ /* Latest GTK version support */
+ static final int GTK4_MAJOR = 4;
+ static final int GTK4_MINOR = 0;
+ static final int GTK4_MICRO = 0;
+
/* Display Data */
Object data;
String [] keys;
@@ -678,7 +700,7 @@ void addGdkEvent (long event) {
gdkEventWidgets = newWidgets;
}
Widget widget = null;
- long handle = GTK.gtk_get_event_widget (event);
+ long handle = GTK3.gtk_get_event_widget (event);
if (handle != 0) {
do {
widget = getWidget (handle);
@@ -693,7 +715,11 @@ void addIdleProc() {
synchronized (idleLock){
this.idleNeeded = true;
if (idleHandle == 0) {
- idleHandle = OS.g_idle_add (idleProc, 0);
+ if (GTK.GTK4) {
+ idleHandle = OS.g_idle_add (idleProc, 0);
+ } else {
+ idleHandle = GDK.gdk_threads_add_idle (idleProc, 0);
+ }
}
}
}
@@ -736,8 +762,10 @@ public void addListener (int eventType, Listener listener) {
* Handle gdbus on 'org.eclipse.swt' DBus session.
* E.g equinox launcher passes files/urls to SWT via gdbus. "./eclipse myFile" or "./eclipse http://www.google.com"
*
- * Only one SWT instance can hold the unique and well-known name at one time, so we have to be mindful
- * of the case where an SWT app could steal the well-known name and make the equinox launcher confused.
+ * Only one SWT instance can hold the unique and well-known name at one time.
+ * We construct the name as org.eclipse.swt.NAME (e.g. org.eclipse.swt.Eclipse),
+ * where NAME is derived from the application executable but may be changed
+ * using the command-line argument -name.
*
* For equinox launcher, See eclipseGtk.c:gtkPlatformJavaSystemProperties
*/
@@ -745,7 +773,7 @@ private void gdbus_init_methods() {
GDBusMethod[] methods = {
new GDBusMethod(
// FileOpen call can be reached via:
- // gdbus call --session --dest org.eclipse.swt --object-path /org/eclipse/swt --method org.eclipse.swt.FileOpen "['/tmp/hi','http://www.eclipse.org']"
+ // gdbus call --session --dest org.eclipse.swt.Eclipse --object-path /org/eclipse/swt --method org.eclipse.swt.FileOpen "['/tmp/hi','http://www.eclipse.org']"
// See Bug525305_Browser_OpenUrl.java test snippet for testing/verification.
// In a child eclipse, this will open the files in a new editor.
// This is reached by equinox launcher from eclipseGtk.c. Look for "g_dbus_proxy_call_sync"
@@ -772,20 +800,24 @@ private void gdbus_init_methods() {
return null;
})
};
- GDBus.init(methods);
+ GDBus.init(methods, getAppName());
}
long allChildrenProc (long widget, long recurse) {
allChildren = OS.g_list_append (allChildren, widget);
if (recurse != 0 && GTK.GTK_IS_CONTAINER (widget)) {
- GTK.gtk_container_forall (widget, allChildrenProc, recurse);
+ GTK3.gtk_container_forall (widget, allChildrenProc, recurse);
}
return 0;
}
void addMouseHoverTimeout (long handle) {
if (mouseHoverId != 0) OS.g_source_remove (mouseHoverId);
- mouseHoverId = OS.g_timeout_add (400, mouseHoverProc, handle);
+ if (GTK.GTK4) {
+ mouseHoverId = OS.g_timeout_add (400, mouseHoverProc, handle);
+ } else {
+ mouseHoverId = GDK.gdk_threads_add_timeout (400, mouseHoverProc, handle);
+ }
mouseHoverHandle = handle;
}
@@ -816,7 +848,7 @@ void addPopup (Menu menu) {
void addSkinnableWidget (Widget widget) {
if (skinCount >= skinList.length) {
- Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+ Widget[] newSkinWidgets = new Widget [(skinList.length + 1) * 3 / 2];
System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
skinList = newSkinWidgets;
}
@@ -885,8 +917,12 @@ public void asyncExec (Runnable runnable) {
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
synchronized (idleLock) {
if (idleNeeded && idleHandle == 0) {
- //NOTE: calling unlocked function in OS
- idleHandle = OS._g_idle_add (idleProc, 0);
+ if (GTK.GTK4) {
+ idleHandle = OS.g_idle_add (idleProc, 0);
+ } else {
+ idleHandle = GDK.gdk_threads_add_idle (idleProc, 0);
+ }
+
}
}
synchronizer.asyncExec (runnable);
@@ -1047,27 +1083,79 @@ protected void create (DeviceData data) {
/**
* Check if the XIM module is present and generates a warning for potential graphical issues
* if GTK_IM_MODULE=xim is detected. See Bug 517671.
+ *
+ * Additionally, this method enforces IBus as the input method for SWT-GTK on GNOME.
+ * This is because GNOME forces IBus by default, so any discrepancy can cause crashes on newer
+ * versions of GTK3.
*/
-void checkXimModule () {
+void checkIMModule () {
Map<String, String> env = System.getenv();
String module = env.get("GTK_IM_MODULE");
if (module != null && module.equals("xim")) {
System.err.println("***WARNING: Detected: GTK_IM_MODULE=xim. This input method is unsupported and can cause graphical issues.");
System.err.println("***WARNING: Unset GTK_IM_MODULE or set GTK_IM_MODULE=ibus if flicking is experienced. ");
}
+ // Enforce ibus as the input module on GNOME
+ if (OS.isGNOME) {
+ long settings = GTK.gtk_settings_get_default ();
+ byte[] ibus = Converter.wcsToMbcs ("ibus", true);
+ if (settings != 0) OS.g_object_set (settings, GTK.gtk_im_module, ibus, 0);
+ }
}
-void createDisplay (DeviceData data) {
- boolean init = GTK.GTK4 ? GTK.gtk_init_check () : GTK.gtk_init_check (new long [] {0}, null);
- if (!init) SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); //$NON-NLS-1$
- checkXimModule();
- //set GTK+ Theme name as property for introspection purposes
- if (OS.GTK_THEME_SET) {
- String themeName = OS.GTK_THEME_NAME + (OS.GTK_THEME_DARK ? ":dark" : "");
+/**
+ * Sets the org.eclipse.swt.internal.gtk.theme value with the current
+ * GTK theme name. Checks if the current theme SWT is running with
+ * is dark or not. This includes checking the GTK_THEME environment
+ * variable, the theme name, and GSettings.
+ *
+ * @param themeName the full name of the current theme SWT is running with
+ * @return true if the current theme is dark
+ */
+boolean checkAndSetThemeDetails (String themeName) {
+ if (themeName.endsWith("-dark") || themeName.endsWith(":dark")) {
System.setProperty("org.eclipse.swt.internal.gtk.theme", themeName);
+ return true;
+ }
+ long settings = GTK.gtk_settings_get_default ();
+ int [] darkThemePreferred = new int [1];
+ OS.g_object_get(settings, GTK.gtk_application_prefer_dark_theme, darkThemePreferred, 0);
+ if (darkThemePreferred[0] != 0) {
+ /*
+ * When 'gtk-application-prefer-dark-theme' is set to true, GTK uses the 'dark'
+ * variant of the theme specified in the system settings -- see 'get_theme_name'
+ * in the GtkSettings source code for more context.
+ */
+ System.setProperty("org.eclipse.swt.internal.gtk.theme", themeName.concat(":dark"));
+ } else {
+ System.setProperty("org.eclipse.swt.internal.gtk.theme", themeName);
+ }
+ return darkThemePreferred[0] != 0;
+}
+
+void createDisplay (DeviceData data) {
+ if (!GTK.GTK4) {
+ /*
+ * AWT/Swing components always use GDK lock when calling GTK functions.
+ * To allow them to be created on the main thread, GDK lock has to be reentrant.
+ * This call replaces the standard GDK lock (GMutex) with GRecMutex.
+ */
+ OS.swt_set_lock_functions ();
+ GDK.gdk_threads_init ();
+ GDK.gdk_threads_enter ();
+ }
+ boolean init;
+ windowSizeSet = false;
+ if (GTK.GTK4) {
+ init = GTK4.gtk_init_check();
} else {
- System.setProperty("org.eclipse.swt.internal.gtk.theme", OS.getThemeName());
+ init = GTK3.gtk_init_check(new long[]{0}, null);
}
+ if (!init) SWT.error(SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); //$NON-NLS-1$
+ checkIMModule();
+ //set GTK+ Theme name as property for introspection purposes
+ themeName = OS.GTK_THEME_SET ? OS.GTK_THEME_SET_NAME : OS.getThemeName();
+ themeDark = checkAndSetThemeDetails(themeName);
if (OS.isX11()) {
xDisplay = GTK.GTK4 ? 0 : GDK.gdk_x11_get_default_xdisplay();
}
@@ -1086,25 +1174,21 @@ void createDisplay (DeviceData data) {
if (rendererClassInitProc == 0) {
rendererClassInitCallback = new Callback (getClass (), "rendererClassInitProc", 2); //$NON-NLS-1$
rendererClassInitProc = rendererClassInitCallback.getAddress ();
- if (rendererClassInitProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
if (GTK.GTK4) {
if (rendererSnapshotProc == 0) {
rendererSnapshotCallback = new Callback (getClass (), "rendererSnapshotProc", 6); //$NON-NLS-1$
rendererSnapshotProc = rendererSnapshotCallback.getAddress ();
- if (rendererSnapshotProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
} else {
if (rendererRenderProc == 0) {
rendererRenderCallback = new Callback (getClass (), "rendererRenderProc", 6); //$NON-NLS-1$
rendererRenderProc = rendererRenderCallback.getAddress ();
- if (rendererRenderProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
}
if (rendererGetPreferredWidthProc == 0) {
rendererGetPreferredWidthCallback = new Callback (getClass (), "rendererGetPreferredWidthProc", 4); //$NON-NLS-1$
rendererGetPreferredWidthProc = rendererGetPreferredWidthCallback.getAddress ();
- if (rendererGetPreferredWidthProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
if (text_renderer_type == 0) {
GTypeInfo renderer_info = new GTypeInfo ();
@@ -1116,25 +1200,32 @@ void createDisplay (DeviceData data) {
byte [] type_name = Converter.wcsToMbcs ("SwtTextRenderer", true); //$NON-NLS-1$
text_renderer_type = OS.g_type_register_static (GTK.GTK_TYPE_CELL_RENDERER_TEXT (), type_name, text_renderer_info_ptr, 0);
}
- if (pixbuf_renderer_type == 0) {
- GTypeInfo renderer_info = new GTypeInfo ();
- renderer_info.class_size = (short) GTK.GtkCellRendererPixbufClass_sizeof ();
- renderer_info.class_init = rendererClassInitProc;
- renderer_info.instance_size = (short) GTK.GtkCellRendererPixbuf_sizeof ();
- pixbuf_renderer_info_ptr = OS.g_malloc (GTypeInfo.sizeof);
- OS.memmove (pixbuf_renderer_info_ptr, renderer_info, GTypeInfo.sizeof);
- byte [] type_name = Converter.wcsToMbcs ("SwtPixbufRenderer", true); //$NON-NLS-1$
- pixbuf_renderer_type = OS.g_type_register_static (GTK.GTK_TYPE_CELL_RENDERER_PIXBUF (), type_name, pixbuf_renderer_info_ptr, 0);
- }
- if (toggle_renderer_type == 0) {
- GTypeInfo renderer_info = new GTypeInfo ();
- renderer_info.class_size = (short) GTK.GtkCellRendererToggleClass_sizeof ();
- renderer_info.class_init = rendererClassInitProc;
- renderer_info.instance_size = (short) GTK.GtkCellRendererToggle_sizeof ();
- toggle_renderer_info_ptr = OS.g_malloc (GTypeInfo.sizeof);
- OS.memmove (toggle_renderer_info_ptr, renderer_info, GTypeInfo.sizeof);
- byte [] type_name = Converter.wcsToMbcs ("SwtToggleRenderer", true); //$NON-NLS-1$
- toggle_renderer_type = OS.g_type_register_static (GTK.GTK_TYPE_CELL_RENDERER_TOGGLE (), type_name, toggle_renderer_info_ptr, 0);
+
+ /*
+ * In GTK4, GtkCellRendererPixbuf & GtkCellRendererToggle are final structs, and
+ * we no longer have access to them in order to register our own type.
+ */
+ if (!GTK.GTK4) {
+ if (pixbuf_renderer_type == 0) {
+ GTypeInfo renderer_info = new GTypeInfo();
+ renderer_info.class_size = (short) GTK.GtkCellRendererPixbufClass_sizeof();
+ renderer_info.class_init = rendererClassInitProc;
+ renderer_info.instance_size = (short) GTK.GtkCellRendererPixbuf_sizeof();
+ pixbuf_renderer_info_ptr = OS.g_malloc(GTypeInfo.sizeof);
+ OS.memmove(pixbuf_renderer_info_ptr, renderer_info, GTypeInfo.sizeof);
+ byte[] type_name = Converter.wcsToMbcs("SwtPixbufRenderer", true); //$NON-NLS-1$
+ pixbuf_renderer_type = OS.g_type_register_static(GTK.GTK_TYPE_CELL_RENDERER_PIXBUF(), type_name, pixbuf_renderer_info_ptr, 0);
+ }
+ if (toggle_renderer_type == 0) {
+ GTypeInfo renderer_info = new GTypeInfo();
+ renderer_info.class_size = (short) GTK.GtkCellRendererToggleClass_sizeof();
+ renderer_info.class_init = rendererClassInitProc;
+ renderer_info.instance_size = (short) GTK.GtkCellRendererToggle_sizeof();
+ toggle_renderer_info_ptr = OS.g_malloc(GTypeInfo.sizeof);
+ OS.memmove(toggle_renderer_info_ptr, renderer_info, GTypeInfo.sizeof);
+ byte[] type_name = Converter.wcsToMbcs("SwtToggleRenderer", true); //$NON-NLS-1$
+ toggle_renderer_type = OS.g_type_register_static(GTK.GTK_TYPE_CELL_RENDERER_TOGGLE (), type_name, toggle_renderer_info_ptr, 0);
+ }
}
GTK.gtk_widget_set_default_direction (GTK.GTK_TEXT_DIR_LTR);
@@ -1145,43 +1236,41 @@ void createDisplay (DeviceData data) {
}
/* Initialize the hidden shell */
- shellHandle = GTK.gtk_window_new (GTK.GTK_WINDOW_TOPLEVEL);
+ if (GTK.GTK4) {
+ shellHandle = GTK4.gtk_window_new();
+ } else {
+ shellHandle = GTK3.gtk_window_new (GTK.GTK_WINDOW_TOPLEVEL);
+ }
if (shellHandle == 0) error (SWT.ERROR_NO_HANDLES);
GTK.gtk_widget_realize (shellHandle);
/* Initialize the filter and event callback */
eventCallback = new Callback (this, "eventProc", 2); //$NON-NLS-1$
eventProc = eventCallback.getAddress ();
- if (eventProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
GDK.gdk_event_handler_set (eventProc, 0, 0);
signalCallback = new Callback (this, "signalProc", 3); //$NON-NLS-1$
signalProc = signalCallback.getAddress ();
- if (signalProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
if (!GTK.GTK4) {
byte[] atomName = Converter.wcsToMbcs ("SWT_Window_" + APP_NAME, true); //$NON-NLS-1$
long atom = GDK.gdk_atom_intern(atomName, false);
- GDK.gdk_selection_owner_set(GTK.gtk_widget_get_window(shellHandle), atom, OS.CurrentTime, false);
+ GDK.gdk_selection_owner_set(GTK3.gtk_widget_get_window(shellHandle), atom, OS.CurrentTime, false);
GDK.gdk_selection_owner_get(atom);
-
- // No GdkWindow on GTK4
- GTK.gtk_widget_add_events (shellHandle, GDK.GDK_PROPERTY_CHANGE_MASK);
- OS.g_signal_connect (shellHandle, OS.property_notify_event, signalProc, PROPERTY_NOTIFY);
}
latinKeyGroup = findLatinKeyGroup ();
keysChangedCallback = new Callback (this, "keysChangedProc", 2); //$NON-NLS-1$
keysChangedProc = keysChangedCallback.getAddress ();
- if (keysChangedProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
long keymap;
long display = GDK.gdk_display_get_default();
if (GTK.GTK4) {
- keymap = GDK.gdk_display_get_keymap(display);
+ long keyboardDevice = GDK.gdk_seat_get_keyboard(GDK.gdk_display_get_default_seat(display));
+ OS.g_signal_connect (keyboardDevice, OS.changed, keysChangedProc, 0);
} else {
keymap = GDK.gdk_keymap_get_for_display(display);
+ OS.g_signal_connect (keymap, OS.keys_changed, keysChangedProc, 0);
}
- OS.g_signal_connect (keymap, OS.keys_changed, keysChangedProc, 0);
}
/**
@@ -1193,20 +1282,22 @@ void createDisplay (DeviceData data) {
private int findLatinKeyGroup () {
int result = 0;
groupKeysCount = new HashMap<> ();
- long keymap;
long display = GDK.gdk_display_get_default();
- if (GTK.GTK4) {
- keymap = GDK.gdk_display_get_keymap(display);
- } else {
- keymap = GDK.gdk_keymap_get_for_display(display);
- }
// count all key groups for Latin alphabet
for (int keyval = GDK.GDK_KEY_a; keyval <= GDK.GDK_KEY_z; keyval++) {
long [] keys = new long [1];
int [] n_keys = new int [1];
- if (GDK.gdk_keymap_get_entries_for_keyval (keymap, keyval, keys, n_keys)) {
+ boolean foundKeys;
+ if (GTK.GTK4) {
+ foundKeys = GDK.gdk_display_map_keyval(display, keyval, keys, n_keys);
+ } else {
+ long keymap = GDK.gdk_keymap_get_for_display(display);
+ foundKeys = GDK.gdk_keymap_get_entries_for_keyval (keymap, keyval, keys, n_keys);
+ }
+
+ if (foundKeys) {
GdkKeymapKey key_entry = new GdkKeymapKey ();
for (int key = 0; key < n_keys [0]; key++) {
OS.memmove (key_entry, keys [0] + key * GdkKeymapKey.sizeof, GdkKeymapKey.sizeof);
@@ -1260,8 +1351,24 @@ long keysChangedProc (long keymap, long user_data) {
}
Image createImage (String name) {
- byte[] buffer = Converter.wcsToMbcs (name, true);
- long pixbuf = GTK.gtk_icon_theme_load_icon(GTK.gtk_icon_theme_get_default(), buffer, 48, GTK.GTK_ICON_LOOKUP_FORCE_SIZE, 0);
+ byte[] buffer = Converter.wcsToMbcs(name, true);
+
+ long pixbuf;
+ if (GTK.GTK4) {
+ long iconTheme = GTK4.gtk_icon_theme_get_for_display(GDK.gdk_display_get_default());
+ long paintable = GTK4.gtk_icon_theme_lookup_icon(iconTheme, buffer, 0, 48, 1, GTK.GTK_TEXT_DIR_LTR, GTK.GTK_ICON_LOOKUP_FORCE_REGULAR);
+ long file = GTK4.gtk_icon_paintable_get_file(paintable);
+ long texture = GDK.gdk_texture_new_from_file(file, 0);
+ pixbuf = GDK.gdk_pixbuf_get_from_texture(texture);
+
+ OS.g_object_unref(texture);
+ OS.g_object_unref(file);
+ OS.g_object_unref(paintable);
+ } else {
+ long iconTheme = GTK3.gtk_icon_theme_get_default();
+ pixbuf = GTK3.gtk_icon_theme_load_icon(iconTheme, buffer, 48, GTK.GTK_ICON_LOOKUP_FORCE_SIZE, 0);
+ }
+
if (pixbuf == 0) return null;
int width = GDK.gdk_pixbuf_get_width (pixbuf);
int height = GDK.gdk_pixbuf_get_height (pixbuf);
@@ -1318,12 +1425,21 @@ protected void destroy () {
}
void destroyDisplay () {
+ if (!GTK.GTK4) GDK.gdk_threads_leave ();
}
long emissionProc (long ihint, long n_param_values, long param_values, long data) {
- if (GTK.gtk_widget_get_toplevel (OS.g_value_peek_pointer(param_values)) == data) {
+ long topLevel;
+ if (GTK.GTK4) {
+ topLevel = GTK4.gtk_widget_get_native (OS.g_value_peek_pointer(param_values));
+ } else {
+ topLevel = GTK3.gtk_widget_get_toplevel (OS.g_value_peek_pointer(param_values));
+ }
+
+ if (topLevel == data) {
GTK.gtk_widget_set_direction (OS.g_value_peek_pointer(param_values), GTK.GTK_TEXT_DIR_RTL);
}
+
return 1;
}
@@ -1419,14 +1535,21 @@ long eventProc (long event, long data) {
}
}
if (!dispatch) {
- addGdkEvent (GDK.gdk_event_copy (event));
+ long copiedEvent;
+ if (GTK.GTK4) {
+ copiedEvent = GDK.gdk_event_ref (event);
+ } else {
+ copiedEvent = GDK.gdk_event_copy (event);
+ }
+
+ addGdkEvent (copiedEvent);
return 0;
}
dispatch = true;
if (tracker != null) {
dispatch = tracker.processEvent (event);
}
- if (dispatch) GTK.gtk_main_do_event (event);
+ if (dispatch) GTK3.gtk_main_do_event (event);
if (dispatchEvents == null) putGdkEvents ();
return 0;
}
@@ -1522,17 +1645,16 @@ static long rendererClassInitProc (long g_class, long class_data) {
return 0;
}
-static long snapshotDrawProc (long handle, long snapshot) {
+void snapshotDrawProc(long handle, long snapshot) {
Display display = getCurrent ();
Widget widget = display.getWidget (handle);
if (widget != null) widget.snapshotToDraw(handle, snapshot);
- long child = GTK.gtk_widget_get_first_child(handle);
+ long child = GTK4.gtk_widget_get_first_child(handle);
// Propagate the snapshot down the widget tree
while (child != 0) {
- GTK.gtk_widget_snapshot_child(handle, child, snapshot);
- child = GTK.gtk_widget_get_next_sibling(child);
+ GTK4.gtk_widget_snapshot_child(handle, child, snapshot);
+ child = GTK4.gtk_widget_get_next_sibling(child);
}
- return 0;
}
static long rendererGetPreferredWidthProc (long cell, long handle, long minimun_size, long natural_size) {
@@ -1631,44 +1753,49 @@ public Rectangle getClientArea () {
Rectangle getBoundsInPixels () {
checkDevice ();
- int monitorCount;
Rectangle bounds = new Rectangle(0, 0, 0, 0);
+ int maxWidth = 0, maxHeight = 0;
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- long display = GDK.gdk_display_get_default ();
- monitorCount = GDK.gdk_display_get_n_monitors (display);
+ long display = GDK.gdk_display_get_default();
+ int monitorCount = 0;
+ long monitorList = 0;
+ if (GTK.GTK4) {
+ monitorList = GDK.gdk_display_get_monitors(display);
+ monitorCount = OS.g_list_model_get_n_items(monitorList);
+ } else {
+ monitorCount = GDK.gdk_display_get_n_monitors(display);
+ }
+
if (monitorCount > 0) {
- GdkRectangle dest = new GdkRectangle ();
for (int i = 0; i < monitorCount; i++) {
- long monitor = GDK.gdk_display_get_monitor(display, i);
- GDK.gdk_monitor_get_geometry (monitor, dest);
- if (i == 0) {
- bounds.width = dest.width;
- bounds.height = dest.height;
- } else {
- bounds.width += dest.x;
- bounds.height += dest.y;
- }
+ long monitor = GTK.GTK4 ? OS.g_list_model_get_item(monitorList, i) : GDK.gdk_display_get_monitor(display, i);
+ GdkRectangle geometry = new GdkRectangle();
+ GDK.gdk_monitor_get_geometry(monitor, geometry);
+
+ if ((geometry.x + geometry.width) > maxWidth) maxWidth = geometry.x + geometry.width;
+ if ((geometry.y + geometry.height) > maxHeight) maxHeight = geometry.y + geometry.height;
}
+
+ bounds.width = maxWidth;
+ bounds.height = maxHeight;
return bounds;
}
} else {
long screen = GDK.gdk_screen_get_default();
- monitorCount = GDK.gdk_screen_get_n_monitors(screen);
+ int monitorCount = GDK.gdk_screen_get_n_monitors(screen);
if (monitorCount > 0) {
- GdkRectangle dest = new GdkRectangle ();
for (int i = 0; i < monitorCount; i++) {
+ GdkRectangle dest = new GdkRectangle ();
GDK.gdk_screen_get_monitor_geometry (screen, i, dest);
- if (i == 0) {
- bounds.width = dest.width;
- bounds.height = dest.height;
- } else {
- bounds.width += dest.x;
- bounds.height += dest.y;
- }
+ if ((dest.x + dest.width) > maxWidth) maxWidth = dest.x + dest.width;
+ if ((dest.y + dest.height) > maxHeight) maxHeight = dest.y + dest.height;
}
+ bounds.width = maxWidth;
+ bounds.height = maxHeight;
return bounds;
}
}
+
if (GTK.GTK4) {
return new Rectangle (0, 0, 0, 0);
} else {
@@ -1705,13 +1832,11 @@ int getCaretBlinkTime () {
}
long getClosure (int id) {
- if (OS.GLIB_VERSION >= OS.VERSION(2, 36, 0) && ++closuresCount [id] >= 255) {
- if (closures [id] != 0) OS.g_closure_unref (closures [id]);
- closures [id] = OS.g_cclosure_new (closuresProc [id], id, 0);
- OS.g_closure_ref (closures [id]);
- OS.g_closure_sink (closures [id]);
- closuresCount [id] = 0;
- }
+ if (closures [id] != 0) OS.g_closure_unref (closures [id]);
+ closures [id] = OS.g_cclosure_new (closuresProc [id], id, 0);
+ OS.g_closure_ref (closures [id]);
+ OS.g_closure_sink (closures [id]);
+ closuresCount [id] = 0;
return closures [id];
}
@@ -1734,13 +1859,16 @@ public Control getCursorControl () {
long [] user_data = new long [1];
long gdkResource;
if (GTK.GTK4) {
- gdkResource = gdk_device_get_surface_at_position (x,y);
+ double[] xDouble = new double [1], yDouble = new double [1];
+ gdkResource = gdk_device_get_surface_at_position (xDouble, yDouble);
+ x[0] = (int) xDouble[0];
+ y[0] = (int) yDouble[0];
} else {
gdkResource = gdk_device_get_window_at_position (x,y);
}
if (gdkResource != 0) {
if (GTK.GTK4) {
- GDK.gdk_surface_get_user_data (gdkResource, user_data);
+ // TODO: GTK4 need to retrieve handle
} else {
GDK.gdk_window_get_user_data (gdkResource, user_data);
}
@@ -1817,43 +1945,46 @@ boolean filters (int eventType) {
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*/
-public Point getCursorLocation () {
+public Point getCursorLocation() {
return DPIUtil.autoScaleDown(getCursorLocationInPixels());
}
-Point getCursorLocationInPixels () {
- checkDevice ();
- int [] x = new int [1], y = new int [1];
+Point getCursorLocationInPixels() {
+ checkDevice();
+
+ int[] x = new int[1], y = new int[1];
if (GTK.GTK4) {
+ double[] xDouble = new double[1], yDouble = new double[1];
+
+ getPointerPosition(xDouble, yDouble);
+ x[0] = (int)xDouble[0];
+ y[0] = (int)yDouble[0];
+ } else {
+ getWindowPointerPosition(0, x, y, null);
+
/*
- * TODO: calling gdk_window_get_device_position() with a 0
- * for the GdkWindow uses gdk_get_default_root_window(),
- * which doesn't exist on GTK4.
+ * Wayland feature: There is no global x/y coordinates in Wayland for security measures, so they
+ * all return relative coordinates dependant to the root window. If there is a popup window (type SWT.ON_TOP),
+ * the return position is relative to the new popup window and not relative to the parent if its
+ * active. Using that as an offset and adding all parent shell relative coordinates will give the
+ * user the correct mouse position in Wayland. This only supports popups that are type
+ * SWT.ON_TOP as any other type of window is not tied to the parent window through
+ * a subsurface. There is currently no support for global coordinates
+ * in Wayland. See Bug 514483.
*/
- } else {
- gdk_window_get_device_position (0, x, y, null);
- }
- /*
- * Wayland feature: There is no global x/y coordinates in Wayland for security measures, so they
- * all return relative coordinates dependant to the root window. If there is a popup window (type SWT.ON_TOP),
- * the return position is relative to the new popup window and not relative to the parent if its
- * active. Using that as an offset and adding all parent shell relative coordinates will give the
- * user the correct mouse position in Wayland. This only supports popups that are type
- * SWT.ON_TOP as any other type of window is not tied to the parent window through
- * a subsurface. There is currently no support for global coordinates
- * in Wayland. See Bug 514483.
- */
- if (!OS.isX11() && activeShell != null) {
- Shell tempShell = activeShell;
- int [] offsetX = new int [1], offsetY = new int [1];
- while (tempShell.getParent() != null) {
- GTK.gtk_window_get_position(tempShell.shellHandle, offsetX, offsetY);
- x[0]+= offsetX[0];
- y[0]+= offsetY[0];
- tempShell = tempShell.getParent().getShell();
+ if (!OS.isX11() && activeShell != null) {
+ Shell tempShell = activeShell;
+ int [] offsetX = new int [1], offsetY = new int [1];
+ while (tempShell.getParent() != null) {
+ GTK3.gtk_window_get_position(tempShell.shellHandle, offsetX, offsetY);
+ x[0]+= offsetX[0];
+ y[0]+= offsetY[0];
+ tempShell = tempShell.getParent().getShell();
+ }
}
}
- return new Point (x [0], y [0]);
+
+ return new Point(x[0], y[0]);
}
/**
@@ -1988,214 +2119,6 @@ String gtk_css_create_css_color_string (String background, String foreground, in
}
/**
- * This method fetches GTK theme values/properties. This is accomplished
- * by determining the name of the current system theme loaded, giving that
- * name to GTK, and then parsing values from the returned theme contents.
- *
- * The idea here is that SWT variables that have corresponding GTK theme
- * elements can be fetched easily by supplying the SWT variable as an
- * parameter to this method.
- *
- * @param swt an Integer corresponding to the SWT color
- * @param cssOutput the gtk theme represented as css string.
- *
- * @return a String representation of the color parsed or "parsed" if the color was assigned
- * directly
- */
-String gtk_css_default_theme_values (int swt, String cssOutput) {
-
- // Parse the theme values based on the corresponding SWT value
- // i.e. theme_selected_bg_color in GTK is SWT.COLOR_LIST_SELECTION in SWT
- int tSelected;
- int selected;
- /*
- * These strings are the GTK named colors we are looking for. Once they are
- * found they are sent to a parser which finds the actual values.
- */
- String color = "";
- switch (swt) {
- case SWT.COLOR_LINK_FOREGROUND:
- return gtk_css_default_theme_values_irregular(swt, cssOutput);
- case SWT.COLOR_LIST_BACKGROUND:
- tSelected = cssOutput.indexOf ("@define-color theme_base_color");
- selected = cssOutput.indexOf ("@define-color base_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_base_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- } else if (selected != -1) {
- color = simple_color_parser(cssOutput, "@define-color base_color", selected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT.COLOR_LIST_FOREGROUND:
- tSelected = cssOutput.indexOf ("@define-color theme_text_color");
- selected = cssOutput.indexOf ("@define-color text_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_text_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- } else if (selected != -1) {
- color = simple_color_parser(cssOutput, "@define-color text_color", selected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT.COLOR_LIST_SELECTION:
- tSelected = cssOutput.indexOf ("@define-color theme_selected_bg_color");
- selected = cssOutput.indexOf ("@define-color selected_bg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_selected_bg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- } else if (selected != -1) {
- color = simple_color_parser(cssOutput, "@define-color selected_bg_color", selected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT_COLOR_LIST_SELECTION_INACTIVE:
- tSelected = cssOutput.indexOf ("@define-color theme_unfocused_selected_bg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_unfocused_selected_bg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT.COLOR_LIST_SELECTION_TEXT:
- tSelected = cssOutput.indexOf ("@define-color theme_selected_fg_color");
- selected = cssOutput.indexOf ("@define-color selected_fg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_selected_fg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- } else if (selected != -1) {
- color = simple_color_parser(cssOutput, "@define-color selected_fg_color", selected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT_COLOR_LIST_SELECTION_TEXT_INACTIVE:
- tSelected = cssOutput.indexOf ("@define-color theme_unfocused_selected_fg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_unfocused_selected_fg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT.COLOR_TITLE_INACTIVE_FOREGROUND:
- tSelected = cssOutput.indexOf ("@define-color insensitive_fg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color insensitive_fg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT.COLOR_TITLE_INACTIVE_BACKGROUND:
- tSelected = cssOutput.indexOf ("@define-color insensitive_bg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color insensitive_bg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT.COLOR_WIDGET_BACKGROUND:
- tSelected = cssOutput.indexOf ("@define-color theme_bg_color");
- selected = cssOutput.indexOf ("@define-color bg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_bg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- } else if (selected != -1) {
- color = simple_color_parser(cssOutput, "@define-color bg_color", selected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- case SWT.COLOR_WIDGET_FOREGROUND:
- tSelected = cssOutput.indexOf ("@define-color theme_fg_color");
- selected = cssOutput.indexOf ("@define-color fg_color");
- if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_fg_color", tSelected);
- if (!color.isEmpty()) {
- break;
- }
- } else if (selected != -1) {
- color = simple_color_parser(cssOutput, "@define-color fg_color", selected);
- if (!color.isEmpty()) {
- break;
- }
- }
- break;
- default:
- return "";
- }
- return color;
-}
-
-/**
- * Certain colors don't match up nicely to a "@define-color" tag in certain GTK themes.
- * For example Adwaita is one of the few themes that does not use a "@define-color"
- * tag for tooltip colors. It is therefore necessary to parse a tooltip CSS class.
- *
- * Since this varies from theme to theme, we first check if a "@define-color" tag
- * exists, if it is: parse it. If not, check for the tooltip class definition.
- *
- * @param swt an Integer corresponding to the SWT color
- * @param cssOutput a String representation of the currently loaded CSS theme
- * currently loaded CSS theme
- *
- * @return a String representation of the color parsed or "parsed" if the color was assigned
- * directly
- */
-String gtk_css_default_theme_values_irregular(int swt, String cssOutput) {
- int tSelected, selected, classDef;
- String color = "";
- switch (swt) {
- case SWT.COLOR_LINK_FOREGROUND:
- selected = cssOutput.indexOf("@define-color link_color");
- tSelected = cssOutput.indexOf("@define-color theme_link_color");
- classDef = cssOutput.indexOf ("*:link {");
- // On Ubuntu and somenon-Adwaita themes, the link color is sometimes set to the
- // same as COLOR_LIST_SELECTION.
- int selectedBg = cssOutput.indexOf("@define-color link_color @selected_bg_color");
- if (selected != -1 || tSelected != -1) {
- if (selected != -1) {
- color = simple_color_parser(cssOutput, "@define-color link_color", selected);
- } else if (tSelected != -1) {
- color = simple_color_parser(cssOutput, "@define-color theme_link_color", tSelected);
- }
- if (!color.isEmpty()) {
- break;
- }
- } else if (selectedBg != -1) {
- COLOR_LINK_FOREGROUND_RGBA = COLOR_LIST_SELECTION_RGBA;
- return "parsed";
- } else if (classDef != -1) {
- COLOR_LINK_FOREGROUND_RGBA = gtk_css_parse_foreground(cssOutput, "*:link {");
- return "parsed";
- }
- break;
- }
- return color;
-}
-
-/**
* This method allows for parsing of background colors from a GTK CSS string.
* It allows for specific search input, such as a selector or tag, or for parsing
* the first (and usually only) background color in a given GtkCssProvider.
@@ -2284,8 +2207,6 @@ String gtk_css_provider_to_string (long provider) {
*/
GdkRGBA gtk_css_parse_foreground (String css, String precise) {
if (css.isEmpty()) return COLOR_WIDGET_FOREGROUND_RGBA;
- String shortOutput;
- int startIndex;
GdkRGBA rgba = new GdkRGBA ();
String searched = "";
/*
@@ -2314,16 +2235,10 @@ GdkRGBA gtk_css_parse_foreground (String css, String precise) {
* properties and filter out things like background-color, border-color,
* etc.
*/
- String pattern = "[^-]color: rgba?\\((\\d+(,\\s?)?){3,4}\\)";
- Pattern r = Pattern.compile(pattern);
- Matcher m = r.matcher(searched);
+ Matcher m = colorPattern.matcher(searched);
if (m.find()) {
- String match = m.group(0);
- if (match.contains("color:")) {
- startIndex = match.indexOf("color:");
- shortOutput = match.substring(startIndex + 7);
- rgba = gtk_css_property_to_rgba(shortOutput);
- }
+ String shortOutput = m.group(1);
+ rgba = gtk_css_property_to_rgba(shortOutput);
} else {
return COLOR_WIDGET_FOREGROUND_RGBA;
}
@@ -2622,6 +2537,29 @@ public Point [] getIconSizes () {
return new Point [] {new Point (16, 16), new Point (32, 32)};
}
+/**
+ * Returns <code>true</code> if the current OS theme has a dark appearance, else
+ * returns <code>false</code>.
+ * <p>
+ * Note: This operation is a hint and is not supported on platforms that do not
+ * have this concept.
+ * </p>
+ * <p>
+ * Note: Windows 10 onwards users can separately configure the theme for OS and
+ * Application level and this can be read from the Windows registry. Since the
+ * application needs to honor the application level theme, this API reads the
+ * Application level theme setting.
+ * </p>
+ *
+ * @return <code>true</code> if the current OS theme has a dark appearance, else
+ * returns <code>false</code>.
+ *
+ * @since 3.112
+ */
+public static boolean isSystemDarkTheme () {
+ return themeDark;
+}
+
int getLastEventTime () {
return lastEventTime;
}
@@ -2656,11 +2594,11 @@ Rectangle getWorkArea() {
Rectangle result = null;
if (data [0] != 0) {
if (actualLength [0] == 16) {
- int values [] = new int [4];
+ int[] values = new int [4];
C.memmove (values, data[0], 16);
result = new Rectangle (values [0],values [1],values [2],values [3]);
} else if (actualLength [0] == 32) {
- long values [] = new long [4];
+ long[] values = new long [4];
C.memmove (values, data[0], 32);
result = new Rectangle ((int)values [0],(int)values [1],(int)values [2],(int)values [3]);
}
@@ -2676,42 +2614,52 @@ Rectangle getWorkArea() {
*
* @since 3.0
*/
-public Monitor [] getMonitors () {
- checkDevice ();
- Monitor [] monitors = null;
- Rectangle workArea = DPIUtil.autoScaleDown (getWorkArea ());
+public Monitor[] getMonitors() {
+ checkDevice();
+ Monitor[] monitors = null;
+ Rectangle workArea = DPIUtil.autoScaleDown(getWorkArea ());
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- long display = GDK.gdk_display_get_default ();
+ long display = GDK.gdk_display_get_default();
if (display != 0) {
- int monitorCount = GDK.gdk_display_get_n_monitors (display);
+ int monitorCount;
+ long monitorList = 0;
+ if (GTK.GTK4) {
+ monitorList = GDK.gdk_display_get_monitors(display);
+ monitorCount = OS.g_list_model_get_n_items(monitorList);
+ } else {
+ monitorCount = GDK.gdk_display_get_n_monitors(display);
+ }
+
if (monitorCount > 0) {
- monitors = new Monitor [monitorCount];
- GdkRectangle dest = new GdkRectangle ();
+ monitors = new Monitor[monitorCount];
+ GdkRectangle geometry = new GdkRectangle();
for (int i = 0; i < monitorCount; i++) {
- long gdkMonitor = GDK.gdk_display_get_monitor(display, i);
- GDK.gdk_monitor_get_geometry (gdkMonitor, dest);
- Monitor monitor = new Monitor ();
- monitor.handle = i;
- monitor.x = DPIUtil.autoScaleDown (dest.x);
- monitor.y = DPIUtil.autoScaleDown (dest.y);
- monitor.width = DPIUtil.autoScaleDown (dest.width);
- monitor.height = DPIUtil.autoScaleDown (dest.height);
+ long gdkMonitor = GTK.GTK4 ? OS.g_list_model_get_item(monitorList, i) : GDK.gdk_display_get_monitor(display, i);
+ GDK.gdk_monitor_get_geometry(gdkMonitor, geometry);
+
+ Monitor monitor = new Monitor();
+ monitor.handle = gdkMonitor;
+ monitor.x = DPIUtil.autoScaleDown(geometry.x);
+ monitor.y = DPIUtil.autoScaleDown(geometry.y);
+ monitor.width = DPIUtil.autoScaleDown(geometry.width);
+ monitor.height = DPIUtil.autoScaleDown(geometry.height);
if (!OS.isX11()) {
- int scale_factor = (int) GDK.gdk_monitor_get_scale_factor (
- GDK.gdk_display_get_monitor (GDK.gdk_display_get_default (), (int) monitor.handle));
- monitor.zoom = scale_factor * 100;
+ int scaleFactor = (int) GDK.gdk_monitor_get_scale_factor(gdkMonitor);
+ monitor.zoom = scaleFactor * 100;
} else {
monitor.zoom = Display._getDeviceZoom(monitor.handle);
}
- // workarea was defined in GTK 3.4. If present, it will return the best results
- // since it takes into account per-monitor trim
- GDK.gdk_monitor_get_workarea (gdkMonitor, dest);
- monitor.clientX = DPIUtil.autoScaleDown (dest.x);
- monitor.clientY = DPIUtil.autoScaleDown (dest.y);
- monitor.clientWidth = DPIUtil.autoScaleDown (dest.width);
- monitor.clientHeight = DPIUtil.autoScaleDown (dest.height);
- monitors [i] = monitor;
+ /* workarea was defined in GTK 3.4. If present, it will return the best results
+ * since it takes into account per-monitor trim. Not available in GTK4.
+ */
+ if (!GTK.GTK4) GDK.gdk_monitor_get_workarea(gdkMonitor, geometry);
+ monitor.clientX = DPIUtil.autoScaleDown(geometry.x);
+ monitor.clientY = DPIUtil.autoScaleDown(geometry.y);
+ monitor.clientWidth = DPIUtil.autoScaleDown(geometry.width);
+ monitor.clientHeight = DPIUtil.autoScaleDown(geometry.height);
+
+ monitors[i] = monitor;
}
}
}
@@ -2747,8 +2695,8 @@ public Monitor [] getMonitors () {
if (monitors == null) {
/* No multimonitor support detected, default to one monitor */
- Monitor monitor = new Monitor ();
- Rectangle bounds = getBounds ();
+ Monitor monitor = new Monitor();
+ Rectangle bounds = getBounds();
monitor.x = bounds.x;
monitor.y = bounds.y;
monitor.width = bounds.width;
@@ -2764,8 +2712,9 @@ public Monitor [] getMonitors () {
monitor.clientWidth = monitor.width;
monitor.clientHeight = monitor.height;
}
- monitors = new Monitor [] { monitor };
+ monitors = new Monitor[] { monitor };
}
+
return monitors;
}
@@ -2776,33 +2725,36 @@ public Monitor [] getMonitors () {
*
* @since 3.0
*/
-public Monitor getPrimaryMonitor () {
+public Monitor getPrimaryMonitor() {
//Developer note, for testing see:
//org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_getPrimaryMonitor()
- checkDevice ();
- Monitor [] monitors = getMonitors ();
+ checkDevice();
+ Monitor[] monitors = getMonitors();
int primaryMonitorIndex = 0;
- //attempt to find actual primary monitor if one is configured:
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
+ if (GTK.GTK4) {
+ primaryMonitorIndex = 0;
+ } else if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
+ //attempt to find actual primary monitor if one is configured:
long display = GDK.gdk_display_get_default();
long monitor = GDK.gdk_display_get_primary_monitor(display);
- long toCompare;
for (int i = 0; i < monitors.length; i++) {
- toCompare = GDK.gdk_display_get_monitor(display, i);
+ long toCompare = GDK.gdk_display_get_monitor(display, i);
if (toCompare == monitor) {
- return monitors[i];
+ primaryMonitorIndex = i;
+ break;
}
}
} else {
- long screen = GDK.gdk_screen_get_default ();
+ long screen = GDK.gdk_screen_get_default();
if (screen != 0) {
//if no primary monitor is configured by the user, this returns 0.
- primaryMonitorIndex = GDK.gdk_screen_get_primary_monitor (screen);
+ primaryMonitorIndex = GDK.gdk_screen_get_primary_monitor(screen);
}
}
- return monitors [primaryMonitorIndex];
+
+ return monitors[primaryMonitorIndex];
}
@@ -2947,6 +2899,8 @@ public Color getSystemColor (int id) {
case SWT.COLOR_LIST_BACKGROUND: gdkRGBA = copyRGBA(COLOR_LIST_BACKGROUND_RGBA); break;
case SWT.COLOR_LIST_SELECTION: gdkRGBA = copyRGBA(COLOR_LIST_SELECTION_RGBA); break;
case SWT.COLOR_LIST_SELECTION_TEXT: gdkRGBA = copyRGBA(COLOR_LIST_SELECTION_TEXT_RGBA); break;
+ case SWT.COLOR_WIDGET_DISABLED_FOREGROUND: gdkRGBA = copyRGBA(COLOR_WIDGET_DISABLED_FOREGROUND_RGBA); break;
+ case SWT.COLOR_TEXT_DISABLED_BACKGROUND: gdkRGBA = copyRGBA(COLOR_TEXT_DISABLED_BACKGROUND_RGBA); break;
default:
return super.getSystemColor (id);
}
@@ -3107,11 +3061,7 @@ public Menu getSystemMenu () {
* @return GdkRGBA object with calculated RGB values
*/
GdkRGBA toGdkRGBA (GdkRGBA rgba, double brightness) {
- // Copy RGB values into a new object
- GdkRGBA newRGBA = new GdkRGBA ();
- newRGBA.red = rgba.red;
- newRGBA.green = rgba.green;
- newRGBA.blue = rgba.blue;
+ GdkRGBA newRGBA = new GdkRGBA();
newRGBA.alpha = rgba.alpha;
// Instantiate hue, saturation, and value doubles for HSV.
@@ -3119,7 +3069,18 @@ GdkRGBA toGdkRGBA (GdkRGBA rgba, double brightness) {
double[] hue = new double[1];
double[] saturationHSV = new double[1];
double[] value = new double[1];
- GTK.gtk_rgb_to_hsv(newRGBA.red, newRGBA.green, newRGBA.blue, hue, saturationHSV, value);
+
+ if (GTK.GTK4) {
+ float[] h = new float[1];
+ float[] s = new float[1];
+ float[] v = new float[1];
+ GTK4.gtk_rgb_to_hsv((float)rgba.red, (float)rgba.green, (float)rgba.blue, h, s, v);
+ hue[0] = (double)h[0];
+ saturationHSV[0] = (double)s[0];
+ value[0] = (double)v[0];
+ } else {
+ GTK3.gtk_rgb_to_hsv(rgba.red, rgba.green, rgba.blue, hue, saturationHSV, value);
+ }
// Calculate luminosity
double luminosity = ((2 - saturationHSV[0]) * value[0]) / 2;
@@ -3139,10 +3100,21 @@ GdkRGBA toGdkRGBA (GdkRGBA rgba, double brightness) {
saturationHSV[0] = (2 * saturationHSL) / (luminosity + saturationHSL);
// Convert from HSV back to RGB and return the GdkRGBA object
- GTK.gtk_hsv_to_rgb(hue[0], saturationHSV[0], value[0], hue, saturationHSV, value);
- newRGBA.red = hue[0];
- newRGBA.green = saturationHSV[0];
- newRGBA.blue = value[0];
+ if (GTK.GTK4) {
+ float[] r = new float[1];
+ float[] g = new float[1];
+ float[] b = new float[1];
+ GTK4.gtk_hsv_to_rgb((float)hue[0], (float)saturationHSV[0], (float)value[0], r, g, b);
+ newRGBA.red = r[0];
+ newRGBA.green = g[0];
+ newRGBA.blue = b[0];
+ } else {
+ GTK3.gtk_hsv_to_rgb(hue[0], saturationHSV[0], value[0], hue, saturationHSV, value);
+ newRGBA.red = hue[0];
+ newRGBA.green = saturationHSV[0];
+ newRGBA.blue = value[0];
+ }
+
return newRGBA;
}
@@ -3163,8 +3135,11 @@ static int inversePremultipliedColor(int color, int alpha) {
* This is only important when top layer is semi-transparent.
*/
private static void renderAllBackgrounds(long styleContext, long cairo) {
- long parentStyleContext = GTK.gtk_style_context_get_parent (styleContext);
- if (parentStyleContext != 0) renderAllBackgrounds (parentStyleContext, cairo);
+ if (!GTK.GTK4) {
+ // GTK4 GtkStyleContext has no concept of parents
+ long parentStyleContext = GTK3.gtk_style_context_get_parent (styleContext);
+ if (parentStyleContext != 0) renderAllBackgrounds (parentStyleContext, cairo);
+ }
GTK.gtk_render_background (styleContext, cairo, -50, -50, 100, 100);
}
@@ -3225,49 +3200,19 @@ void initializeSystemColors () {
COLOR_WIDGET_DARK_SHADOW_RGBA.alpha = 1.0;
// Initialize and create a list of X11 named colors
- initializeColorList();
-
- /*
- * Feature in GTK: previously SWT fetched system colors using
- * GtkStyleContext machinery. This machinery is largely deprecated
- * and will all together stop functioning eventually. Instead, we
- * can parse the GTK system theme and use the values stored there to
- * generate SWT's system colors.
- *
- * The functionality works for GTK3.14 and above as follows:
- *
- * 1) load and parse the system theme
- * 2) check to see if the value needed exists in the theme
- * 3a) if the value exists, parse it and convert it to a GdkColor object
- * 3b) if the value doesn't exist, use the old GtkStyleContext machinery
- * to fetch and return it as a GdkColor object
- *
- * Some colors have multiple different theme values that correspond to
- * them, while some colors only have one potential match. Therefore
- * some colors will have better theme coverage than others.
- */
- /*
- * Find current GTK theme: either use the system theme,
- * or one provided using the GTK_THEME environment variable.
- * See bug 534007.
- */
- byte [] buffer = OS.GTK_THEME_SET ? Converter.wcsToMbcs (OS.GTK_THEME_NAME, true) : OS.getThemeNameBytes();
- // Load the dark variant if specified
- byte [] darkBuffer = OS.GTK_THEME_DARK ? darkBuffer = Converter.wcsToMbcs ("dark", true) : null;
-
- // Fetch the actual theme in char/string format
- long themeProvider = GTK.gtk_css_provider_get_named(buffer, darkBuffer);
-
- String cssOutput = gtk_css_provider_to_string(themeProvider);
+ initializeNamedColorList();
// Load Widget colors first, because 'COLOR_WIDGET_BACKGROUND_RGBA'
// can be used as substitute for other missing colors.
- initializeSystemColorsWidget(cssOutput);
+ long shellContext = GTK.gtk_widget_get_style_context(shellHandle);
+ initializeSystemColorsWidget(shellContext);
- initializeSystemColorsList(cssOutput);
- initializeSystemColorsTitle(cssOutput);
- initializeSystemColorsLink(cssOutput);
+ initializeSystemColorsList(shellContext);
+ initializeSystemColorsTitle(shellContext);
+ initializeSystemColorsLink();
initializeSystemColorsTooltip();
+ initializeSystemColorsToggleButton();
+ initializeSystemColorsDisabled();
COLOR_TITLE_FOREGROUND_RGBA = COLOR_LIST_SELECTION_TEXT_RGBA;
COLOR_TITLE_BACKGROUND_RGBA = COLOR_LIST_SELECTION_RGBA;
@@ -3275,168 +3220,87 @@ void initializeSystemColors () {
COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT_RGBA = toGdkRGBA (COLOR_TITLE_INACTIVE_BACKGROUND_RGBA, 1.3);
}
-void initializeSystemColorsWidget(String cssOutput) {
- long context = GTK.gtk_widget_get_style_context (shellHandle);
- GdkRGBA rgba = new GdkRGBA();
+void initializeSystemColorsWidget(long shellContext) {
+ COLOR_WIDGET_FOREGROUND_RGBA = styleContextGetColor (shellContext, GTK.GTK_STATE_FLAG_NORMAL);
+ COLOR_WIDGET_BACKGROUND_RGBA = styleContextEstimateBackgroundColor(shellContext, GTK.GTK_STATE_FLAG_NORMAL);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorWidgetForeground = gtk_css_default_theme_values(SWT.COLOR_WIDGET_FOREGROUND, cssOutput);
- if (!colorWidgetForeground.isEmpty()) {
- COLOR_WIDGET_FOREGROUND_RGBA = gtk_css_property_to_rgba (colorWidgetForeground);
- } else {
- COLOR_WIDGET_FOREGROUND_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_NORMAL);
- }
- } else {
- COLOR_WIDGET_FOREGROUND_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_NORMAL);
- }
-
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorWidgetBackground = gtk_css_default_theme_values(SWT.COLOR_WIDGET_BACKGROUND, cssOutput);
- if (!colorWidgetBackground.isEmpty()) {
- COLOR_WIDGET_BACKGROUND_RGBA = gtk_css_property_to_rgba (colorWidgetBackground);
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- COLOR_WIDGET_BACKGROUND_RGBA = copyRGBA (rgba);
- }
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- COLOR_WIDGET_BACKGROUND_RGBA = copyRGBA (rgba);
- }
COLOR_WIDGET_LIGHT_SHADOW_RGBA = COLOR_WIDGET_BACKGROUND_RGBA;
COLOR_WIDGET_NORMAL_SHADOW_RGBA = toGdkRGBA (COLOR_WIDGET_BACKGROUND_RGBA, 0.7);
COLOR_WIDGET_HIGHLIGHT_SHADOW_RGBA = toGdkRGBA (COLOR_WIDGET_BACKGROUND_RGBA, 1.3);
}
-void initializeSystemColorsList(String cssOutput) {
- long context = GTK.gtk_widget_get_style_context (shellHandle);
- GdkRGBA rgba = new GdkRGBA();
-
+void initializeSystemColorsList(long shellContext) {
// Apply temporary styles
- GTK.gtk_style_context_save (context);
- GTK.gtk_style_context_add_class(context, GTK.GTK_STYLE_CLASS_VIEW);
- GTK.gtk_style_context_add_class(context, GTK.GTK_STYLE_CLASS_CELL);
- GTK.gtk_style_context_invalidate(context);
-
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorListForeground = gtk_css_default_theme_values(SWT.COLOR_LIST_FOREGROUND, cssOutput);
- if (!colorListForeground.isEmpty()) {
- COLOR_LIST_FOREGROUND_RGBA = gtk_css_property_to_rgba (colorListForeground);
- } else {
- COLOR_LIST_FOREGROUND_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_NORMAL);
- }
- } else {
- COLOR_LIST_FOREGROUND_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_NORMAL);
- }
+ GTK.gtk_style_context_save (shellContext);
+ GTK.gtk_style_context_add_class(shellContext, GTK.GTK_STYLE_CLASS_VIEW);
+ GTK.gtk_style_context_add_class(shellContext, GTK.GTK_STYLE_CLASS_CELL);
+ if (!GTK.GTK4) GTK3.gtk_style_context_invalidate(shellContext);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorListBackground = gtk_css_default_theme_values(SWT.COLOR_LIST_BACKGROUND, cssOutput);
- if (!colorListBackground.isEmpty()) {
- COLOR_LIST_BACKGROUND_RGBA = gtk_css_property_to_rgba (colorListBackground);
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- COLOR_LIST_BACKGROUND_RGBA = copyRGBA(rgba);
- }
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- COLOR_LIST_BACKGROUND_RGBA = copyRGBA(rgba);
- }
+ COLOR_LIST_FOREGROUND_RGBA = styleContextGetColor (shellContext, GTK.GTK_STATE_FLAG_NORMAL);
+ COLOR_LIST_BACKGROUND_RGBA = styleContextEstimateBackgroundColor(shellContext, GTK.GTK_STATE_FLAG_NORMAL);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorListSelectionText = gtk_css_default_theme_values(SWT.COLOR_LIST_SELECTION_TEXT, cssOutput);
- if (!colorListSelectionText.isEmpty()) {
- COLOR_LIST_SELECTION_TEXT_RGBA = gtk_css_property_to_rgba (colorListSelectionText);
- } else {
- COLOR_LIST_SELECTION_TEXT_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_SELECTED);
- }
- } else {
- COLOR_LIST_SELECTION_TEXT_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_SELECTED);
- }
+ /*
+ * Some themes define different selection colors based on whether or not the window is focused,
+ * or in the background. For this reason we use the SELECTED and FOCUSED flag for default selection
+ * colors, and the SELECTED and BACKDROP flags for inactive/unfocused selection colors.
+ *
+ * These colors will be the same for themes that do not define different selection colors based on focus.
+ */
+ COLOR_LIST_SELECTION_TEXT_RGBA = styleContextGetColor (shellContext, GTK.GTK_STATE_FLAG_SELECTED | GTK.GTK_STATE_FLAG_FOCUSED);
+ COLOR_LIST_SELECTION_RGBA = styleContextEstimateBackgroundColor(shellContext, GTK.GTK_STATE_FLAG_SELECTED | GTK.GTK_STATE_FLAG_FOCUSED);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorListSelection = gtk_css_default_theme_values(SWT.COLOR_LIST_SELECTION, cssOutput);
- if (!colorListSelection.isEmpty()) {
- COLOR_LIST_SELECTION_RGBA = gtk_css_property_to_rgba (colorListSelection);
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_SELECTED, rgba);
- COLOR_LIST_SELECTION_RGBA = copyRGBA (rgba);
- }
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_SELECTED, rgba);
- COLOR_LIST_SELECTION_RGBA = copyRGBA (rgba);
- }
+ COLOR_LIST_SELECTION_TEXT_INACTIVE_RGBA = styleContextGetColor (shellContext, GTK.GTK_STATE_FLAG_SELECTED | GTK.GTK_STATE_FLAG_BACKDROP);
+ COLOR_LIST_SELECTION_INACTIVE_RGBA = styleContextEstimateBackgroundColor(shellContext, GTK.GTK_STATE_FLAG_SELECTED | GTK.GTK_STATE_FLAG_BACKDROP);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorListSelectionTextInactive = gtk_css_default_theme_values(SWT_COLOR_LIST_SELECTION_TEXT_INACTIVE, cssOutput);
- if (!colorListSelectionTextInactive.isEmpty()) {
- COLOR_LIST_SELECTION_TEXT_INACTIVE_RGBA = gtk_css_property_to_rgba (colorListSelectionTextInactive);
- } else {
- COLOR_LIST_SELECTION_TEXT_INACTIVE_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_ACTIVE);
- }
- } else {
- COLOR_LIST_SELECTION_TEXT_INACTIVE_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_ACTIVE);
- }
+ // Revert temporary styles
+ GTK.gtk_style_context_restore (shellContext);
+}
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorListSelectionInactive = gtk_css_default_theme_values(SWT_COLOR_LIST_SELECTION_INACTIVE, cssOutput);
- if (!colorListSelectionInactive.isEmpty()) {
- COLOR_LIST_SELECTION_INACTIVE_RGBA = gtk_css_property_to_rgba (colorListSelectionInactive);
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_ACTIVE, rgba);
- COLOR_LIST_SELECTION_INACTIVE_RGBA = copyRGBA (rgba);
- }
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_ACTIVE, rgba);
- COLOR_LIST_SELECTION_INACTIVE_RGBA = copyRGBA (rgba);
- }
+void initializeSystemColorsTitle(long shellContext) {
+ long customLabel = OS.g_object_new(GTK.gtk_label_get_type(), 0);
+ OS.g_object_ref_sink(customLabel);
- // Revert temporary styles
- GTK.gtk_style_context_restore (context);
+ // Just use temporary label; this is easier then finding the original label
+ long styleContextLabel = GTK.gtk_widget_get_style_context(customLabel);
+ COLOR_TITLE_INACTIVE_FOREGROUND_RGBA = styleContextGetColor (styleContextLabel, GTK.GTK_STATE_FLAG_INSENSITIVE);
+ // Most Labels inherit background colors of their parent, so use the shell's BG color here
+ COLOR_TITLE_INACTIVE_BACKGROUND_RGBA = styleContextEstimateBackgroundColor(shellContext, GTK.GTK_STATE_FLAG_INSENSITIVE);
+
+ OS.g_object_unref(customLabel);
}
-void initializeSystemColorsTitle(String cssOutput) {
- long context = GTK.gtk_widget_get_style_context (shellHandle);
- GdkRGBA rgba = new GdkRGBA();
+private void initializeSystemColorsLink() {
+ /*
+ * Note: GTK has two types of link at least:
+ *
+ * 1) GtkLabel with HTML-like markup
+ * 2) GtkLinkButton
+ *
+ * The 'HighContrast' theme has different colors for these.
+ * GtkLabel is easier to work with, and obtained color matches color in previous SWT versions.
+ */
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorTitleInactiveForeground = gtk_css_default_theme_values(SWT.COLOR_TITLE_INACTIVE_FOREGROUND, cssOutput);
- if (!colorTitleInactiveForeground.isEmpty()) {
- COLOR_TITLE_INACTIVE_FOREGROUND_RGBA = gtk_css_property_to_rgba (colorTitleInactiveForeground);
- } else {
- COLOR_TITLE_INACTIVE_FOREGROUND_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_INSENSITIVE);
- }
+ // The 'Clearlooks-Phenix' theme sets 'color:' for 'window {' css node, so a stand-alone label is not enough
+ long window;
+ if (GTK.GTK4) {
+ window = GTK4.gtk_window_new();
} else {
- COLOR_TITLE_INACTIVE_FOREGROUND_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_INSENSITIVE);
+ window = GTK3.gtk_window_new (GTK.GTK_WINDOW_TOPLEVEL);
}
-
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorTitleInactiveBackground = gtk_css_default_theme_values(SWT.COLOR_TITLE_INACTIVE_BACKGROUND, cssOutput);
- if (!colorTitleInactiveBackground.isEmpty()) {
- COLOR_TITLE_INACTIVE_BACKGROUND_RGBA = gtk_css_property_to_rgba (colorTitleInactiveBackground);
- } else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_INSENSITIVE, rgba);
- COLOR_TITLE_INACTIVE_BACKGROUND_RGBA = copyRGBA (rgba);
- }
+ long label = GTK.gtk_label_new(null);
+ if (GTK.GTK4) {
+ GTK4.gtk_window_set_child(window, label);
} else {
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_INSENSITIVE, rgba);
- COLOR_TITLE_INACTIVE_BACKGROUND_RGBA = copyRGBA (rgba);
+ GTK3.gtk_container_add(window, label);
}
-}
-private void initializeSystemColorsLink(String cssOutput) {
- // NOTE: If COLOR_LINK_FOREGROUND cannot be found from the GTK CSS theme then there is no reliable
- // way to find it on GTK3 using GtkStyleContext machinery. Use COLOR_LIST_SELECTION instead
- // as they are often the same.
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String colorLinkForeground = gtk_css_default_theme_values(SWT.COLOR_LINK_FOREGROUND, cssOutput);
- if (!colorLinkForeground.isEmpty()) {
- if (colorLinkForeground != "parsed") {
- COLOR_LINK_FOREGROUND_RGBA = gtk_css_property_to_rgba (colorLinkForeground);
- }
- } else {
- COLOR_LINK_FOREGROUND_RGBA = COLOR_LIST_SELECTION_RGBA;
- }
+ long styleContextLink = GTK.gtk_widget_get_style_context (label);
+ COLOR_LINK_FOREGROUND_RGBA = styleContextGetColor (styleContextLink, GTK.GTK_STATE_FLAG_LINK);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(window);
} else {
- COLOR_LINK_FOREGROUND_RGBA = COLOR_LIST_SELECTION_RGBA;
+ GTK3.gtk_widget_destroy(window);
}
}
@@ -3458,6 +3322,50 @@ void initializeSystemColorsTooltip() {
OS.g_object_unref(tooltip);
}
+void initializeSystemColorsToggleButton() {
+ // GtkCheckButton and GtkRadioButton use the same colors
+ long button = GTK.gtk_check_button_new();
+ OS.g_object_ref_sink(button);
+
+ long styleContextButton = GTK.gtk_widget_get_style_context(button);
+ COLOR_TOGGLE_BUTTON_FOREGROUND_RGBA = styleContextGetColor(styleContextButton, GTK.GTK_STATE_FLAG_NORMAL);
+
+ OS.g_object_unref(button);
+}
+
+void initializeSystemColorsDisabled() {
+ /*
+ * 'Yaru' theme on Ubuntu 18.10 defines background color for
+ * 'entry:backdrop:disabled' as 'transparent', so parent window's color
+ * will be used. However, SWT doesn't quite expect transparent colors.
+ * The workaround is to use a temporary window as parent. GTK will blend
+ * colors and return non-transparent result.
+ */
+ long window;
+ if (GTK.GTK4) {
+ window = GTK4.gtk_window_new();
+ } else {
+ window = GTK3.gtk_window_new (GTK.GTK_WINDOW_TOPLEVEL);
+ }
+ long entry = GTK.gtk_entry_new ();
+ if (GTK.GTK4) {
+ GTK4.gtk_window_set_child(window, entry);
+ } else {
+ GTK3.gtk_container_add(window, entry);
+ }
+
+ long context = GTK.gtk_widget_get_style_context (entry);
+
+ COLOR_WIDGET_DISABLED_FOREGROUND_RGBA = styleContextGetColor (context, GTK.GTK_STATE_FLAG_INSENSITIVE);
+ COLOR_TEXT_DISABLED_BACKGROUND_RGBA = styleContextEstimateBackgroundColor (context, GTK.GTK_STATE_FLAG_INSENSITIVE);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(window);
+ } else {
+ GTK3.gtk_widget_destroy(window);
+ }
+}
+
GdkRGBA styleContextGetColor(long context, int flag) {
/*
* Feature in GTK: we need to handle calls to gtk_style_context_get_color()
@@ -3467,14 +3375,12 @@ GdkRGBA styleContextGetColor(long context, int flag) {
*/
GdkRGBA rgba = new GdkRGBA ();
if (GTK.GTK4) {
- GTK.gtk_style_context_get_color(context, rgba);
- } else if (GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
+ GTK4.gtk_style_context_get_color(context, rgba);
+ } else {
GTK.gtk_style_context_save(context);
GTK.gtk_style_context_set_state(context, flag);
- GTK.gtk_style_context_get_color (context, flag, rgba);
+ GTK3.gtk_style_context_get_color (context, flag, rgba);
GTK.gtk_style_context_restore(context);
- } else {
- GTK.gtk_style_context_get_color (context, flag, rgba);
}
return rgba;
}
@@ -3586,7 +3492,6 @@ protected void init () {
initializeSystemColors ();
initializeSystemSettings ();
initializeWidgetTable ();
- initializeWindowManager ();
initializeSessionManager ();
}
@@ -3602,7 +3507,6 @@ void initializeCallbacks () {
signalIds [Widget.CONFIGURE_EVENT] = OS.g_signal_lookup (OS.configure_event, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.DELETE_EVENT] = OS.g_signal_lookup (OS.delete_event, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.ENTER_NOTIFY_EVENT] = OS.g_signal_lookup (OS.enter_notify_event, GTK.GTK_TYPE_WIDGET ());
- signalIds [Widget.EVENT] = OS.g_signal_lookup (OS.event, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.EVENT_AFTER] = OS.g_signal_lookup (OS.event_after, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.EXPOSE_EVENT] = OS.g_signal_lookup (OS.draw, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.EXPOSE_EVENT_INVERSE] = OS.g_signal_lookup (OS.draw, GTK.GTK_TYPE_WIDGET ());
@@ -3618,12 +3522,13 @@ void initializeCallbacks () {
signalIds [Widget.MAP_EVENT] = OS.g_signal_lookup (OS.map_event, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.MNEMONIC_ACTIVATE] = OS.g_signal_lookup (OS.mnemonic_activate, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.MOTION_NOTIFY_EVENT] = OS.g_signal_lookup (OS.motion_notify_event, GTK.GTK_TYPE_WIDGET ());
+ signalIds [Widget.COMPUTE_SIZE] = OS.g_signal_lookup(OS.compute_size, GTK.GTK_TYPE_WIDGET() );
/*
* Connect to the "popped-up" signal on GTK3.22+ if the user has specified the
* SWT_MENU_LOCATION_DEBUGGING environment variable.
*/
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0) && OS.SWT_MENU_LOCATION_DEBUGGING) {
- long menuType = GTK.GTK_TYPE_MENU ();
+ long menuType = GTK3.GTK_TYPE_MENU ();
OS.g_type_class_ref (menuType);
signalIds [Widget.POPPED_UP] = OS.g_signal_lookup (OS.popped_up, menuType);
} else {
@@ -3633,78 +3538,63 @@ void initializeCallbacks () {
signalIds [Widget.REALIZE] = OS.g_signal_lookup (OS.realize, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.SCROLL_EVENT] = OS.g_signal_lookup (OS.scroll_event, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.SHOW] = OS.g_signal_lookup (OS.show, GTK.GTK_TYPE_WIDGET ());
- signalIds [Widget.SHOW_HELP] = OS.g_signal_lookup (OS.show_help, GTK.GTK_TYPE_WIDGET ());
- signalIds [Widget.SIZE_ALLOCATE] = OS.g_signal_lookup (OS.size_allocate, GTK.GTK_TYPE_WIDGET ());
+ if (!GTK.GTK4) signalIds[Widget.SHOW_HELP] = OS.g_signal_lookup(OS.show_help, GTK.GTK_TYPE_WIDGET());
+ if (!GTK.GTK4) signalIds[Widget.SIZE_ALLOCATE] = OS.g_signal_lookup(OS.size_allocate, GTK.GTK_TYPE_WIDGET());
signalIds [Widget.STYLE_UPDATED] = OS.g_signal_lookup (OS.style_updated, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.UNMAP] = OS.g_signal_lookup (OS.unmap, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.UNMAP_EVENT] = OS.g_signal_lookup (OS.unmap_event, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.UNREALIZE] = OS.g_signal_lookup (OS.realize, GTK.GTK_TYPE_WIDGET ());
signalIds [Widget.WINDOW_STATE_EVENT] = OS.g_signal_lookup (OS.window_state_event, GTK.GTK_TYPE_WIDGET ());
- if (GTK.GTK4) {
- snapshotDraw = new Callback (getClass (), "snapshotDrawProc", 2); //$NON-NLS-1$
- snapshotDrawProc = snapshotDraw.getAddress ();
- if (snapshotDrawProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- }
-
windowCallback2 = new Callback (this, "windowProc", 2); //$NON-NLS-1$
windowProc2 = windowCallback2.getAddress ();
- if (windowProc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
if (GTK.GTK4) {
- keyPressReleaseCallback = new Callback (this, "keyPressReleaseProc", long.class, new Type[] {
- long.class, int.class, int.class, int.class, long.class}); //$NON-NLS-1$
- keyPressReleaseProc = keyPressReleaseCallback.getAddress ();
- if (keyPressReleaseProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ snapshotDraw = new Callback(this, "snapshotDrawProc", void.class, new Type[] {long.class, long.class}); //$NON-NLS-1$
+ snapshotDrawProc = snapshotDraw.getAddress();
- /*
- * Usually GTK4 signals will be connected via g_signal_connect(),
- * i.e. without closures, but we will assign the closures anyways
- * just to be safe.
- */
- closuresProc [Widget.KEY_PRESSED] = keyPressReleaseProc;
- closuresProc [Widget.KEY_RELEASED] = keyPressReleaseProc;
+ keyPressReleaseCallback = new Callback(this, "keyPressReleaseProc", boolean.class, new Type[] {
+ long.class, int.class, int.class, int.class, long.class}); //$NON-NLS-1$
+ keyPressReleaseProc = keyPressReleaseCallback.getAddress();
- focusCallback = new Callback (this, "focusProc", long.class, new Type[] {
- long.class, long.class}); //$NON-NLS-1$
- focusProc = focusCallback.getAddress ();
- if (focusProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ focusCallback = new Callback(this, "focusProc", void.class, new Type[] {long.class, long.class}); //$NON-NLS-1$
+ focusProc = focusCallback.getAddress();
- closuresProc [Widget.FOCUS_IN] = focusProc;
- closuresProc [Widget.FOCUS_OUT] = focusProc;
+ windowActiveCallback = new Callback(this, "windowActiveProc", void.class, new Type[] {long.class, long.class}); //$NON-NLS-1$
+ windowActiveProc = windowActiveCallback.getAddress();
- enterMotionScrollCallback = new Callback (this, "enterMotionScrollProc", long.class, new Type[] {
+ enterMotionCallback = new Callback(this, "enterMotionProc", void.class, new Type[] {
long.class, double.class, double.class, long.class}); //$NON-NLS-1$
- enterMotionScrollProc = enterMotionScrollCallback.getAddress ();
- if (enterMotionScrollProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ enterMotionProc = enterMotionCallback.getAddress ();
- closuresProc [Widget.ENTER] = enterMotionScrollProc;
- closuresProc [Widget.MOTION] = enterMotionScrollProc;
- closuresProc [Widget.SCROLL] = enterMotionScrollProc;
+ scrollCallback = new Callback(this, "scrollProc", boolean.class, new Type[] {
+ long.class, double.class, double.class, long.class}); //$NON-NLS-1$
+ scrollProc = scrollCallback.getAddress();
- gesturePressReleaseCallback = new Callback (this, "gesturePressReleaseProc", long.class, new Type[] {
+ gesturePressReleaseCallback = new Callback(this, "gesturePressReleaseProc", void.class, new Type[] {
long.class, int.class, double.class, double.class, long.class}); //$NON-NLS-1$
gesturePressReleaseProc = gesturePressReleaseCallback.getAddress();
- if (gesturePressReleaseProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- closuresProc [Widget.GESTURE_PRESSED] = gesturePressReleaseProc;
- closuresProc [Widget.GESTURE_RELEASED] = gesturePressReleaseProc;
+ leaveCallback = new Callback(this, "leaveProc", void.class, new Type[] {long.class, long.class}); //$NON-NLS-1$
+ leaveProc = leaveCallback.getAddress();
- leaveCallback = new Callback (this, "leaveProc", long.class, new Type[] {
- long.class, long.class}); //$NON-NLS-1$
- leaveProc = leaveCallback.getAddress ();
- if (leaveProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ resizeCallback = new Callback(this, "resizeProc", void.class, new Type[] {long.class, int.class, int.class}); //$NON-NLS-1$
+ resizeProc = resizeCallback.getAddress();
- closuresProc [Widget.LEAVE] = leaveProc;
+ activateCallback = new Callback(this, "activateProc", void.class, new Type[] {long.class, long.class, long.class}); //$NON-NLS-1$
+ activateProc = activateCallback.getAddress();
- notifyStateCallback = new Callback(this, "notifyStateProc", long.class, new Type[] {
- long.class, long.class, long.class}); //$NON-NLS-1$
- notifyStateProc = notifyStateCallback.getAddress();
- if (notifyStateProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- closuresProc [Widget.NOTIFY_STATE] = notifyStateProc;
+ computeSizeCallback = new Callback(this, "computeSizeProc", void.class, new Type[] {long.class, long.class, long.class}); //$NON-NLS-1$
+ computeSizeProc = computeSizeCallback.getAddress();
}
+ notifyCallback = new Callback(this, "notifyProc", long.class, new Type[] {
+ long.class, long.class, long.class}); //$NON-NLS-1$
+ notifyProc = notifyCallback.getAddress();
+
+ closuresProc [Widget.NOTIFY_STATE] = notifyProc;
+ closuresProc [Widget.DPI_CHANGED] = notifyProc;
+
closuresProc [Widget.ACTIVATE] = windowProc2;
closuresProc [Widget.ACTIVATE_INVERSE] = windowProc2;
closuresProc [Widget.CHANGED] = windowProc2;
@@ -3740,7 +3630,6 @@ void initializeCallbacks () {
windowCallback3 = new Callback (this, "windowProc", 3); //$NON-NLS-1$
windowProc3 = windowCallback3.getAddress ();
- if (windowProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
closuresProc [Widget.BUTTON_PRESS_EVENT] = windowProc3;
closuresProc [Widget.BUTTON_PRESS_EVENT_INVERSE] = windowProc3;
@@ -3750,7 +3639,6 @@ void initializeCallbacks () {
closuresProc [Widget.CONFIGURE_EVENT] = windowProc3;
closuresProc [Widget.DELETE_EVENT] = windowProc3;
closuresProc [Widget.ENTER_NOTIFY_EVENT] = windowProc3;
- closuresProc [Widget.EVENT] = windowProc3;
closuresProc [Widget.EVENT_AFTER] = windowProc3;
closuresProc [Widget.EXPOSE_EVENT] = windowProc3;
closuresProc [Widget.EXPOSE_EVENT_INVERSE] = windowProc3;
@@ -3773,12 +3661,10 @@ void initializeCallbacks () {
closuresProc [Widget.TOGGLED] = windowProc3;
closuresProc [Widget.UNMAP_EVENT] = windowProc3;
closuresProc [Widget.WINDOW_STATE_EVENT] = windowProc3;
- closuresProc [Widget.ROW_DELETED] = windowProc3;
closuresProc [Widget.DIRECTION_CHANGED] = windowProc3;
windowCallback4 = new Callback (this, "windowProc", 4); //$NON-NLS-1$
windowProc4 = windowCallback4.getAddress ();
- if (windowProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
closuresProc [Widget.DELETE_RANGE] = windowProc4;
closuresProc [Widget.DELETE_TEXT] = windowProc4;
@@ -3789,16 +3675,22 @@ void initializeCallbacks () {
closuresProc [Widget.SWITCH_PAGE] = windowProc4;
closuresProc [Widget.TEST_COLLAPSE_ROW] = windowProc4;
closuresProc [Widget.TEST_EXPAND_ROW] = windowProc4;
- closuresProc [Widget.ROW_INSERTED] = windowProc4;
closuresProc [Widget.ROW_HAS_CHILD_TOGGLED] = windowProc4;
closuresProc [Widget.DELETE_FROM_CURSOR] = windowProc4;
closuresProc [Widget.DELETE_FROM_CURSOR_INVERSE] = windowProc4;
+ closuresProc [Widget.SIZE_ALLOCATE_GTK4] = windowProc4;
windowCallback5 = new Callback (this, "windowProc", 5); //$NON-NLS-1$
windowProc5 = windowCallback5.getAddress ();
- if (windowProc5 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- closuresProc [Widget.CHANGE_VALUE] = windowProc5;
+ /*
+ * The "change-value" signal has a double parameter, so this
+ * needs to be handled separately. See bug
+ */
+ changeValue = new Callback (this, "changeValue", boolean.class, new Type [] {long.class, int.class, double.class, long.class}); //$NON-NLS-1$
+ changeValueProc = changeValue.getAddress ();
+ closuresProc [Widget.CHANGE_VALUE] = changeValueProc;
+
closuresProc [Widget.EXPAND_COLLAPSE_CURSOR_ROW] = windowProc5;
closuresProc [Widget.INSERT_TEXT] = windowProc5;
closuresProc [Widget.TEXT_BUFFER_INSERT_TEXT] = windowProc5;
@@ -3808,7 +3700,6 @@ void initializeCallbacks () {
if (signalIds [Widget.POPPED_UP] != 0) {
windowCallback6 = new Callback (this, "windowProc", 6); //$NON-NLS-1$
windowProc6 = windowCallback6.getAddress ();
- if (windowProc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
closuresProc [Widget.POPPED_UP] = windowProc6;
}
@@ -3824,61 +3715,48 @@ void initializeCallbacks () {
timerCallback = new Callback (this, "timerProc", 1); //$NON-NLS-1$
timerProc = timerCallback.getAddress ();
- if (timerProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
windowTimerCallback = new Callback (this, "windowTimerProc", 1); //$NON-NLS-1$
windowTimerProc = windowTimerCallback.getAddress ();
- if (windowTimerProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
mouseHoverCallback = new Callback (this, "mouseHoverProc", 1); //$NON-NLS-1$
mouseHoverProc = mouseHoverCallback.getAddress ();
- if (mouseHoverProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
caretCallback = new Callback(this, "caretProc", 1); //$NON-NLS-1$
caretProc = caretCallback.getAddress();
- if (caretProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
sizeAllocateCallback = new Callback(this, "sizeAllocateProc", 3); //$NON-NLS-1$
sizeAllocateProc = sizeAllocateCallback.getAddress();
- if (sizeAllocateProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
sizeRequestCallback = new Callback(this, "sizeRequestProc", 3); //$NON-NLS-1$
sizeRequestProc = sizeRequestCallback.getAddress();
- if (sizeRequestProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
shellMapCallback = new Callback(this, "shellMapProc", 3); //$NON-NLS-1$
shellMapProc = shellMapCallback.getAddress();
- if (shellMapProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
shellMapProcClosure = OS.g_cclosure_new (shellMapProc, 0, 0);
OS.g_closure_ref (shellMapProcClosure);
cellDataCallback = new Callback (this, "cellDataProc", 5); //$NON-NLS-1$
cellDataProc = cellDataCallback.getAddress ();
- if (cellDataProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
setDirectionCallback = new Callback (this, "setDirectionProc", 2); //$NON-NLS-1$
setDirectionProc = setDirectionCallback.getAddress ();
- if (setDirectionProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
emissionProcCallback = new Callback (this, "emissionProc", 4); //$NON-NLS-1$
emissionProc = emissionProcCallback.getAddress ();
- if (emissionProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
allChildrenCallback = new Callback (this, "allChildrenProc", 2); //$NON-NLS-1$
allChildrenProc = allChildrenCallback.getAddress ();
- if (allChildrenProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
checkIfEventCallback = new Callback (this, "checkIfEventProc", 3); //$NON-NLS-1$
checkIfEventProc = checkIfEventCallback.getAddress ();
- if (checkIfEventProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
idleCallback = new Callback (this, "idleProc", 1); //$NON-NLS-1$
idleProc = idleCallback.getAddress ();
- if (idleProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
-void initializeColorList() {
+void initializeNamedColorList() {
colorList = new ArrayList<>();
colorList.add("black");
colorList.add("darkred");
@@ -3936,23 +3814,16 @@ void initializeSubclasses () {
}
void initializeSystemSettings () {
- OS.g_signal_connect (shellHandle, OS.style_updated, signalProc, STYLE_UPDATED);
+ if (!GTK.GTK4) {
+ OS.g_signal_connect (shellHandle, OS.style_updated, signalProc, STYLE_UPDATED);
+ OS.g_signal_connect(GTK.gtk_settings_get_default (), OS.notify_theme_change, signalProc, STYLE_UPDATED);
+ }
- /*
- * Feature in GTK. Despite the fact that the
- * gtk-entry-select-on-focus property is a global
- * setting, it is initialized when the GtkEntry
- * is initialized. This means that it cannot be
- * accessed before a GtkEntry is created. The
- * fix is to for the initializaion by creating
- * a temporary GtkEntry.
- */
- long entry = GTK.gtk_entry_new ();
- GTK.gtk_widget_destroy (entry);
- int [] buffer2 = new int [1];
- long settings = GTK.gtk_settings_get_default ();
- OS.g_object_get (settings, GTK.gtk_entry_select_on_focus, buffer2, 0);
- entrySelectOnFocus = buffer2 [0] != 0;
+ int[] flag = new int[1];
+ long settings = GTK.gtk_settings_get_default();
+ OS.g_object_get(settings, GTK.gtk_entry_select_on_focus, flag, 0);
+
+ entrySelectOnFocus = (flag[0] != 0);
}
void initializeWidgetTable () {
@@ -3962,31 +3833,27 @@ void initializeWidgetTable () {
indexTable [GROW_SIZE - 1] = -1;
}
-void initializeWindowManager () {
- /* Get the window manager name */
- windowManager = ""; //$NON-NLS-1$
- if (OS.isX11()) {
- long screen = GDK.gdk_screen_get_default ();
- if (screen != 0) {
- long ptr2 = GDK.gdk_x11_screen_get_window_manager_name (screen);
- if (ptr2 != 0) {
- int length = C.strlen (ptr2);
- if (length > 0) {
- byte [] buffer2 = new byte [length];
- C.memmove (buffer2, ptr2, length);
- windowManager = new String (Converter.mbcsToWcs (buffer2));
- }
- }
- }
- }
-}
-
void initializeSessionManager() {
sessionManagerDBus = new SessionManagerDBus();
sessionManagerListener = new SessionManagerListener(this);
sessionManagerDBus.addListener(sessionManagerListener);
}
+/**
+ * Helper method to extract GError messages. Only call if the pointer is valid (i.e. non-zero).
+ *
+ * @param errorPtr pointer to the GError
+ * @return a String representing the error message that was set
+ *
+ * @noreference This method is not intended to be referenced by clients.
+ */
+public static String extractFreeGError(long errorPtr) {
+ long errorMessageC = OS.g_error_get_message(errorPtr);
+ String errorMessageStr = Converter.cCharPtrToJavaString(errorMessageC, false);
+ OS.g_error_free(errorPtr);
+ return errorMessageStr;
+}
+
void releaseSessionManager() {
if (sessionManagerDBus != null) {
sessionManagerDBus.dispose();
@@ -4048,12 +3915,7 @@ public long internal_new_GC (GCData data) {
gc = Cairo.cairo_create(surface);
} else {
root = GDK.gdk_get_default_root_window();
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
- long surface = GDK.gdk_window_create_similar_surface(root, Cairo.CAIRO_CONTENT_COLOR_ALPHA, data.width, data.height);
- gc = Cairo.cairo_create(surface);
- } else {
- gc = GDK.gdk_cairo_create(root);
- }
+ gc = GDK.gdk_cairo_create(root);
}
if (gc == 0) error (SWT.ERROR_NO_HANDLES);
//TODO how gdk_gc_set_subwindow is done in cairo?
@@ -4309,17 +4171,21 @@ Rectangle mapInPixels (Control from, Control to, int x, int y, int width, int he
checkDevice();
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
+
+ // TODO: GTK4 no longer able to retrieve surface/window origin
+ if (GTK.GTK4) return new Rectangle(x, y, 0, 0);
+
Rectangle rect = new Rectangle (x, y, width, height);
if (from == to) return rect;
boolean fromRTL = false, toRTL = false;
if (from != null) {
- Point origin = GTK.GTK4 ? from.getSurfaceOrigin() : from.getWindowOrigin ();
+ Point origin = from.getWindowOrigin ();
if (fromRTL = (from.style & SWT.MIRRORED) != 0) rect.x = from.getClientWidth () - rect.x;
rect.x += origin.x;
rect.y += origin.y;
}
if (to != null) {
- Point origin = GTK.GTK4 ? to.getSurfaceOrigin() : to.getWindowOrigin ();
+ Point origin = to.getWindowOrigin ();
rect.x -= origin.x;
rect.y -= origin.y;
if (toRTL = (to.style & SWT.MIRRORED) != 0) rect.x = to.getClientWidth () - rect.x;
@@ -4340,6 +4206,27 @@ long mouseHoverProc (long handle) {
return widget.hoverProc (handle);
}
+long findFocusedWindow() {
+ long gdkWindow = 0;
+ long window_list = GDK.gdk_window_get_children(GDK.gdk_get_default_root_window());
+ if (window_list != 0) {
+ long windows = window_list;
+ while (windows != 0) {
+ long curr_window = OS.g_list_data(windows);
+ int state = GDK.gdk_window_get_state(curr_window);
+ if ((state & GDK.GDK_WINDOW_STATE_FOCUSED) != 0 && (state & GDK.GDK_WINDOW_STATE_WITHDRAWN) == 0) {
+ gdkWindow = curr_window;
+ OS.g_object_ref(gdkWindow);
+ break;
+ }
+ windows = OS.g_list_next(windows);
+ }
+ OS.g_list_free(window_list);
+ }
+
+ return gdkWindow;
+}
+
/**
* Generate a low level system event.
*
@@ -4405,166 +4292,155 @@ long mouseHoverProc (long handle) {
*/
public boolean post (Event event) {
/*
- * Get the operating system lock before synchronizing on the device
- * lock so that the device lock will not be held should another
- * thread already be in the operating system. This avoids deadlock
- * should the other thread need the device lock.
- */
- Lock lock = Platform.lock;
- lock.lock();
- try {
- synchronized (Device.class) {
- if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
- if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+ * GdkEvents are now strictly read-only
+ * https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gdkevent-api-changes
+ */
+ if (GTK.GTK4) return false;
- int type = event.type;
+ synchronized (Device.class) {
+ if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
+ if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
- if (type == SWT.MouseMove) {
- Rectangle loc = DPIUtil.autoScaleUp(event.getBounds());
- setCursorLocationInPixels(new Point(loc.x, loc.y));
- return true;
- }
+ int type = event.type;
- long gdkDisplay = GDK.gdk_display_get_default();
- long gdkSeat = GDK.gdk_display_get_default_seat(gdkDisplay);
- long gdkKeyboardDevice = GDK.gdk_seat_get_keyboard(gdkSeat);
- long gdkPointerDevice = GDK.gdk_seat_get_pointer(gdkSeat);
- long gdkWindow = GDK.gdk_get_default_root_window();
- long window_list = GDK.gdk_window_get_children(gdkWindow);
- if (window_list != 0) {
- long windows = window_list;
- while (windows != 0) {
- long curr_window = OS.g_list_data(windows);
- int state = GDK.gdk_window_get_state(curr_window);
- if ((state & GDK.GDK_WINDOW_STATE_FOCUSED) != 0) {
- gdkWindow = curr_window;
- OS.g_object_ref(gdkWindow);
- break;
- }
- windows = OS.g_list_next(windows);
+ if (type == SWT.MouseMove) {
+ Rectangle loc = DPIUtil.autoScaleUp(event.getBounds());
+ setCursorLocationInPixels(new Point(loc.x, loc.y));
+ return true;
+ }
+
+ long gdkDisplay = GDK.gdk_display_get_default();
+ long gdkSeat = GDK.gdk_display_get_default_seat(gdkDisplay);
+
+ switch (type) {
+ case SWT.KeyDown:
+ case SWT.KeyUp: {
+ long gdkWindow = findFocusedWindow();
+ if (gdkWindow == 0) return false;
+
+ /* Translate the SWT Event fields to GDK fields
+ * We need hardware_keycode, GdkModifierType, group to get keyval
+ * 1) event.character -> hardware_keycode
+ * 2) event.stateMask -> GdkModifierType(state)
+ * 3) event.keyCode -> hardware_keycode, GdkModifierType(state) (i.e. SWT.SHIFT)
+ */
+ int state = type == SWT.KeyDown ? GDK.GDK_KEY_PRESS_MASK : GDK.GDK_KEY_RELEASE_MASK;
+ if (cachedModifierState != 0) {
+ state |= cachedModifierState;
+ }
+ int is_modifier = 1;
+ int modifier = event.stateMask != 0 ? event.stateMask : event.keyCode;
+ switch (modifier) {
+ case SWT.SHIFT: state |= GDK.GDK_SHIFT_MASK; break;
+ case SWT.ALT: state |= GDK.GDK_MOD1_MASK; break;
+ case SWT.CONTROL: state |= GDK.GDK_CONTROL_MASK; break;
+ case SWT.ALT_GR: state |= GDK.GDK_MOD5_MASK; break;
+ default:
+ is_modifier = cachedModifierState == 0 ? 0 : 1;
}
- OS.g_list_free(window_list);
- }
- if (gdkWindow == 0) return false;
- long eventPtr = 0;
-
- switch (type) {
- case SWT.KeyDown:
- case SWT.KeyUp:
- /* Translate the SWT Event fields to GDK fields
- * We need hardware_keycode, GdkModifierType, group to get keyval
- * 1) event.character -> hardware_keycode
- * 2) event.stateMask -> GdkModifierType(state)
- * 3) event.keyCode -> hardware_keycode, GdkModifierType(state) (i.e. SWT.SHIFT)
- */
- int state = type == SWT.KeyDown ? GDK.GDK_KEY_PRESS_MASK : GDK.GDK_KEY_RELEASE_MASK;
- if (cachedModifierState != 0) {
- state |= cachedModifierState;
- }
- int is_modifier = 1;
- int modifier = event.stateMask != 0 ? event.stateMask : event.keyCode;
- switch (modifier) {
- case SWT.SHIFT: state |= GDK.GDK_SHIFT_MASK; break;
- case SWT.ALT: state |= GDK.GDK_MOD1_MASK; break;
- case SWT.CONTROL: state |= GDK.GDK_CONTROL_MASK; break;
- case SWT.ALT_GR: state |= GDK.GDK_MOD5_MASK; break;
- default:
- is_modifier = cachedModifierState == 0 ? 0 : 1;
- }
- // Save the modifier state pressed until it is released
- if (is_modifier == 1 && type == SWT.KeyDown) {
- cachedModifierState = state & (~GDK.GDK_KEY_PRESS_MASK | ~GDK.GDK_KEY_RELEASE_MASK);
- } else {
- cachedModifierState = 0;
- }
+ // Save the modifier state pressed until it is released
+ if (is_modifier == 1 && type == SWT.KeyDown) {
+ cachedModifierState = state & (~GDK.GDK_KEY_PRESS_MASK | ~GDK.GDK_KEY_RELEASE_MASK);
+ } else {
+ cachedModifierState = 0;
+ }
- long gdkKeymap = GDK.gdk_keymap_get_for_display(gdkDisplay);
- int hardware_keycode = 0;
- int raw_keyval = untranslateKey(event.keyCode);
- if (raw_keyval == 0) raw_keyval = event.character;
-
- long [] keys_list = new long [1];
- int [] n_keys = new int [1];
- int [] keyval = new int [1], effective_group = new int [1], level = new int [1], consumed_modifiers = new int[1];
- int final_keyval = raw_keyval;
-
- if (GDK.gdk_keymap_get_entries_for_keyval(gdkKeymap, raw_keyval, keys_list, n_keys)) {
- GdkKeymapKey key_entry = new GdkKeymapKey ();
- if (n_keys[0] > 0) {
- OS.memmove(key_entry, keys_list[0], GdkKeymapKey.sizeof);
- hardware_keycode = key_entry.keycode;
- }
- OS.g_free(keys_list[0]);
+ int hardware_keycode = 0;
+ int raw_keyval = untranslateKey(event.keyCode);
+ if (raw_keyval == 0) raw_keyval = event.character;
- GDK.gdk_keymap_translate_keyboard_state(gdkKeymap, hardware_keycode, state, 0, keyval, effective_group, level, consumed_modifiers);
- if (is_modifier == 1) final_keyval = keyval[0];
- }
+ long [] keys_list = new long [1];
+ int [] n_keys = new int [1];
+ int [] keyval = new int [1], effective_group = new int [1], level = new int [1], consumed_modifiers = new int[1];
+ int final_keyval = raw_keyval;
- /* Construct GdkEventKey */
- eventPtr = GDK.gdk_event_new(type == SWT.KeyDown ? GDK.GDK_KEY_PRESS : GDK.GDK_KEY_RELEASE);
- GdkEventKey newKeyEvent = new GdkEventKey ();
- newKeyEvent.type = type == SWT.KeyDown ? GDK.GDK_KEY_PRESS : GDK.GDK_KEY_RELEASE;
- newKeyEvent.window = gdkWindow;
- newKeyEvent.send_event = 1;
- newKeyEvent.time = GDK.GDK_CURRENT_TIME;
- newKeyEvent.keyval = final_keyval;
- newKeyEvent.state = state;
- newKeyEvent.hardware_keycode = (short) hardware_keycode;
- newKeyEvent.group = (byte) effective_group[0];
- newKeyEvent.is_modifier = is_modifier;
-
- OS.memmove(eventPtr, newKeyEvent, GdkEventKey.sizeof);
- GDK.gdk_event_set_device (eventPtr, gdkKeyboardDevice);
- if (GTK.GTK4) {
- long display = GDK.gdk_display_get_default();
- GDK.gdk_display_put_event(display, eventPtr);
- } else {
- GDK.gdk_event_put (eventPtr);
- }
- if (GTK.GTK4) {
- OS.g_object_unref(eventPtr);
- } else {
- GDK.gdk_event_free (eventPtr);
- }
- return true;
- case SWT.MouseDown:
- case SWT.MouseUp:
- int[] x = new int[1], y = new int[1], mask = new int[1];
- gdkWindow = GDK.gdk_device_get_window_at_position(gdkPointerDevice, x, y);
- // Under Wayland or some window managers, gdkWindow is not known to GDK and null is returned,
- // cannot post mouse events as it will lead to crash
- if (gdkWindow == 0) return false;
- OS.g_object_ref(gdkWindow);
-
- /* Construct GdkEventButton */
- eventPtr = GDK.gdk_event_new(type == SWT.MouseDown ? GDK.GDK_BUTTON_PRESS : GDK.GDK_BUTTON_RELEASE);
- GdkEventButton newButtonEvent = new GdkEventButton ();
- newButtonEvent.type = type == SWT.MouseDown ? GDK.GDK_BUTTON_PRESS : GDK.GDK_BUTTON_RELEASE;
- newButtonEvent.window = gdkWindow;
- newButtonEvent.send_event = 1;
- newButtonEvent.time = GDK.GDK_CURRENT_TIME;
- newButtonEvent.x = x[0];
- newButtonEvent.y = y[0];
- newButtonEvent.state = mask[0];
- newButtonEvent.button = event.button;
- newButtonEvent.device = gdkPointerDevice;
-
- OS.memmove(eventPtr, newButtonEvent, GdkEventButton.sizeof);
- GDK.gdk_event_set_device(eventPtr, gdkPointerDevice);
-
- GDK.gdk_event_put(eventPtr);
- if (GTK.GTK4) {
- OS.g_object_unref(eventPtr);
- } else {
- GDK.gdk_event_free (eventPtr);
+ boolean foundKeys;
+ long keymap = 0;
+ if (GTK.GTK4) {
+ // TODO: Find alternative for gdk_keymap_translate_keyboard_state (no longer exist, and keymap can not be retrieved)
+ foundKeys = GDK.gdk_display_map_keyval(gdkDisplay, raw_keyval, keys_list, n_keys);
+ } else {
+ keymap = GDK.gdk_keymap_get_for_display(gdkDisplay);
+ foundKeys = GDK.gdk_keymap_get_entries_for_keyval (keymap, raw_keyval, keys_list, n_keys);
+ }
+
+ if (foundKeys) {
+ GdkKeymapKey key_entry = new GdkKeymapKey ();
+ if (n_keys[0] > 0) {
+ OS.memmove(key_entry, keys_list[0], GdkKeymapKey.sizeof);
+ hardware_keycode = key_entry.keycode;
}
- return true;
+ OS.g_free(keys_list[0]);
+
+ GDK.gdk_keymap_translate_keyboard_state(keymap, hardware_keycode, state, 0, keyval, effective_group, level, consumed_modifiers);
+ if (is_modifier == 1) final_keyval = keyval[0];
+ }
+
+ /* Construct GdkEventKey */
+ final long eventPtr = GDK.gdk_event_new(type == SWT.KeyDown ? GDK.GDK_KEY_PRESS : GDK.GDK_KEY_RELEASE);
+ GdkEventKey newKeyEvent = new GdkEventKey ();
+ newKeyEvent.type = type == SWT.KeyDown ? GDK.GDK_KEY_PRESS : GDK.GDK_KEY_RELEASE;
+ newKeyEvent.window = gdkWindow;
+ newKeyEvent.send_event = 1;
+ newKeyEvent.time = GDK.GDK_CURRENT_TIME;
+ newKeyEvent.keyval = final_keyval;
+ newKeyEvent.state = state;
+ newKeyEvent.hardware_keycode = (short) hardware_keycode;
+ newKeyEvent.group = (byte) effective_group[0];
+ newKeyEvent.is_modifier = is_modifier;
+
+ GTK3.memmove(eventPtr, newKeyEvent, GdkEventKey.sizeof);
+ GDK.gdk_event_set_device (eventPtr, GDK.gdk_seat_get_keyboard(gdkSeat));
+ if (GTK.GTK4) {
+ GDK.gdk_display_put_event(gdkDisplay, eventPtr);
+ } else {
+ GDK.gdk_event_put (eventPtr);
+ }
+
+ if (GTK.GTK4) {
+ GDK.gdk_event_unref(eventPtr);
+ } else {
+ GDK.gdk_event_free(eventPtr);
+ }
+ return true;
+ }
+ case SWT.MouseDown:
+ case SWT.MouseUp: {
+ int[] x = new int[1], y = new int[1], mask = new int[1];
+ final long gdkPointerDevice = GDK.gdk_seat_get_pointer(gdkSeat);
+ final long gdkWindow = GDK.gdk_device_get_window_at_position(gdkPointerDevice, x, y);
+ // Under Wayland or some window managers, gdkWindow is not known to GDK and null is returned,
+ // cannot post mouse events as it will lead to crash
+ if (gdkWindow == 0) return false;
+ OS.g_object_ref(gdkWindow);
+
+ /* Construct GdkEventButton */
+ final long eventPtr = GDK.gdk_event_new(type == SWT.MouseDown ? GDK.GDK_BUTTON_PRESS : GDK.GDK_BUTTON_RELEASE);
+ GdkEventButton newButtonEvent = new GdkEventButton ();
+ newButtonEvent.type = type == SWT.MouseDown ? GDK.GDK_BUTTON_PRESS : GDK.GDK_BUTTON_RELEASE;
+ newButtonEvent.window = gdkWindow;
+ newButtonEvent.send_event = 1;
+ newButtonEvent.time = GDK.GDK_CURRENT_TIME;
+ newButtonEvent.x = x[0];
+ newButtonEvent.y = y[0];
+ newButtonEvent.state = mask[0];
+ newButtonEvent.button = event.button;
+ newButtonEvent.device = gdkPointerDevice;
+
+ GTK3.memmove(eventPtr, newButtonEvent, GdkEventButton.sizeof);
+ GDK.gdk_event_set_device(eventPtr, gdkPointerDevice);
+
+ GDK.gdk_event_put(eventPtr);
+ if (GTK.GTK4) {
+ GDK.gdk_event_unref(eventPtr);
+ } else {
+ GDK.gdk_event_free (eventPtr);
+ }
+ return true;
}
- return false;
}
- } finally {
- lock.unlock();
+ return false;
}
}
@@ -4604,7 +4480,7 @@ void putGdkEvents () {
}
}
if (GTK.GTK4) {
- OS.g_object_unref (event);
+ GDK.gdk_event_unref(event);
} else {
GDK.gdk_event_free (event);
}
@@ -4646,14 +4522,13 @@ public boolean readAndDispatch () {
boolean events = false;
events |= runSettings ();
events |= runPopups ();
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock before calling the function below.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- events |= OS.g_main_context_iteration (0, false);
+
+ if (GTK.GTK4) {
+ events |= OS.g_main_context_iteration (0, false);
+ } else {
+ events |= GTK3.gtk_events_pending ();
+ GTK3.gtk_main_iteration_do (false);
+ }
if (events) {
runDeferredEvents ();
return true;
@@ -4702,35 +4577,55 @@ static void register (Display display) {
*/
@Override
protected void release () {
- sendEvent (SWT.Dispose, new Event ());
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) {
- Shell shell = shells [i];
- if (!shell.isDisposed ()) shell.dispose ();
- }
- if (tray != null) tray.dispose ();
- tray = null;
- while (readAndDispatch ()) {}
- if (disposeList != null) {
- for (int i=0; i<disposeList.length; i++) {
- Runnable next = disposeList [i];
- if (next != null) {
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ try {
+ sendEvent (SWT.Dispose, new Event ());
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+
+ for (Shell shell : getShells ()) {
+ try {
+ if (!shell.isDisposed ()) shell.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+
+ try {
+ if (tray != null) tray.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ tray = null;
+
+ for (;;) {
+ try {
+ if (!readAndDispatch ()) break;
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+
+ if (disposeList != null) {
+ for (Runnable next : disposeList) {
+ if (next == null) continue;
+
try {
next.run ();
- } catch (RuntimeException exception) {
- runtimeExceptionHandler.accept (exception);
- } catch (Error error) {
- errorHandler.accept (error);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
}
}
}
+ disposeList = null;
+
+ synchronizer.releaseSynchronizer ();
+ synchronizer = null;
+ releaseSessionManager ();
+ releaseDisplay ();
+ super.release ();
}
- disposeList = null;
- synchronizer.releaseSynchronizer ();
- synchronizer = null;
- releaseSessionManager ();
- releaseDisplay ();
- super.release ();
}
void releaseDisplay () {
@@ -4743,27 +4638,70 @@ void releaseDisplay () {
}
windowProc2 = windowProc3 = windowProc4 = windowProc5 = windowProc6 = 0;
+ if (changeValue != null) {
+ changeValue.dispose(); changeValue = null;
+ }
+ changeValueProc = 0;
+
if (GTK.GTK4) {
keyPressReleaseCallback.dispose();
+ keyPressReleaseCallback = null;
keyPressReleaseProc = 0;
+
focusCallback.dispose();
+ focusCallback = null;
focusProc = 0;
- enterMotionScrollCallback.dispose();
- enterMotionScrollProc = 0;
+
+ windowActiveCallback.dispose();
+ windowActiveCallback = null;
+ windowActiveProc = 0;
+
+ enterMotionCallback.dispose();
+ enterMotionCallback = null;
+ enterMotionProc = 0;
+
+ scrollCallback.dispose();
+ scrollCallback = null;
+ scrollProc = 0;
+
leaveCallback.dispose();
+ leaveCallback = null;
leaveProc = 0;
+
+ resizeCallback.dispose();
+ resizeCallback = null;
+ resizeProc = 0;
+
+ activateCallback.dispose();
+ activateCallback = null;
+ activateProc = 0;
+
gesturePressReleaseCallback.dispose();
+ gesturePressReleaseCallback = null;
gesturePressReleaseProc = 0;
- notifyStateCallback.dispose();
- notifyStateProc = 0;
+
+ snapshotDraw.dispose();
+ snapshotDraw = null;
+ snapshotDrawProc = 0;
}
+ notifyCallback.dispose();
+ notifyCallback = null;
+ notifyProc = 0;
+
/* Dispose checkIfEvent callback */
checkIfEventCallback.dispose(); checkIfEventCallback = null;
checkIfEventProc = 0;
/* Dispose preedit window */
- if (preeditWindow != 0) GTK.gtk_widget_destroy (preeditWindow);
+ if (preeditWindow != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(preeditWindow);
+ } else {
+ GTK3.gtk_widget_destroy(preeditWindow);
+ }
+ }
+ preeditWindow = 0;
imControl = null;
/* Dispose the tooltip map callback */
@@ -4861,14 +4799,22 @@ void releaseDisplay () {
COLOR_LIST_SELECTION_INACTIVE_RGBA = COLOR_LIST_SELECTION_TEXT_INACTIVE_RGBA =
COLOR_WIDGET_FOREGROUND_RGBA = COLOR_TITLE_FOREGROUND_RGBA = COLOR_TITLE_BACKGROUND_RGBA = COLOR_TITLE_BACKGROUND_GRADIENT_RGBA =
COLOR_TITLE_INACTIVE_FOREGROUND_RGBA = COLOR_TITLE_INACTIVE_BACKGROUND_RGBA = COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT_RGBA =
- COLOR_INFO_BACKGROUND_RGBA = COLOR_INFO_FOREGROUND_RGBA = COLOR_LINK_FOREGROUND_RGBA = null;
+ COLOR_INFO_BACKGROUND_RGBA = COLOR_INFO_FOREGROUND_RGBA = COLOR_LINK_FOREGROUND_RGBA = COLOR_WIDGET_DISABLED_FOREGROUND_RGBA =
+ COLOR_TEXT_DISABLED_BACKGROUND_RGBA = null;
+ COLOR_TOGGLE_BUTTON_FOREGROUND_RGBA = null;
/* Dispose the event callback */
GDK.gdk_event_handler_set (0, 0, 0);
eventCallback.dispose (); eventCallback = null;
/* Dispose the hidden shell */
- if (shellHandle != 0) GTK.gtk_widget_destroy (shellHandle);
+ if (shellHandle != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(shellHandle);
+ } else {
+ GTK3.gtk_widget_destroy(shellHandle);
+ }
+ }
shellHandle = 0;
/* Dispose the settings callback */
@@ -4915,7 +4861,6 @@ void releaseDisplay () {
widgetTable = modalShells = null;
data = null;
values = keys = null;
- windowManager = null;
eventTable = filterTable = null;
modalDialog = null;
flushRect = null;
@@ -5079,6 +5024,14 @@ String debugInfoForIndex(long index) {
return s;
}
+void dpiChanged(int newScaleFactor) {
+ DPIUtil.setDeviceZoom (DPIUtil.mapDPIToZoom(getDPI().x * newScaleFactor));
+ Shell[] shells = getShells();
+ for (int i = 0; i < shells.length; i++) {
+ shells[i].layout(true, true);
+ }
+}
+
String dumpWidgetTableInfo() {
StringBuilder sb = new StringBuilder(", table size: ");
sb.append(widgetTable.length);
@@ -5086,12 +5039,7 @@ String dumpWidgetTableInfo() {
for (int i = 0; i < widgetTable.length; i++) {
Widget w = widgetTable[i];
if (w != null && w.isDisposed()) {
- Collection<Integer> list = disposed.get(w);
- if (list == null) {
- list = new ArrayList<>();
- disposed.put(w, list);
- }
- list.add(Integer.valueOf(i));
+ disposed.computeIfAbsent(w, k -> new ArrayList<>()).add(Integer.valueOf(i));
}
}
if (!disposed.isEmpty()) {
@@ -5294,6 +5242,17 @@ public static void setAppVersion (String version) {
* @since 2.1
*/
public void setCursorLocation (int x, int y) {
+ /*
+ * Wayland does not support mouse warping, thus setCursorLocation
+ * is not supported due to gdk_device_warp not being implemented
+ * in Wayland. There currently is no good solution that could be
+ * implemented, so a log entry was determined to be sufficient.
+ *
+ * See Bug 577099
+ */
+ if(!OS.isX11()) {
+ System.err.println("SWT Display.java Error: setCursorLocation only supported on X11. \n");
+ }
setCursorLocation(new Point (x, y));
}
@@ -5301,7 +5260,7 @@ void setCursorLocationInPixels (Point location) {
long gdkDisplay = GDK.gdk_display_get_default();
long gdkPointer = GDK.gdk_get_pointer(gdkDisplay);
if (GTK.GTK4) {
- GDK.gdk_device_warp(gdkPointer, location.x, location.y);
+ //TODO: GTK4 no gdk_device_warp
} else {
long gdkScreen = GDK.gdk_screen_get_default();
GDK.gdk_device_warp(gdkPointer, gdkScreen, location.x, location.y);
@@ -5388,6 +5347,11 @@ public void setData (String key, Object value) {
removeIdleProc ();
return;
}
+ if (key.equals (EXTERNAL_EVENT_LOOP_KEY)) {
+ Boolean data = (Boolean) value;
+ externalEventLoop = data != null && data.booleanValue ();
+ return;
+ }
/* Remove the key/value pair */
if (value == null) {
@@ -5463,15 +5427,15 @@ public void setData (Object data) {
long setDirectionProc (long widget, long direction) {
GTK.gtk_widget_set_direction (widget, (int)direction);
- if (GTK.GTK_IS_MENU_ITEM (widget)) {
- long submenu = GTK.gtk_menu_item_get_submenu (widget);
+ if (!GTK.GTK4 && GTK3.GTK_IS_MENU_ITEM (widget)) {
+ long submenu = GTK3.gtk_menu_item_get_submenu (widget);
if (submenu != 0) {
GTK.gtk_widget_set_direction (submenu, (int)direction);
- GTK.gtk_container_forall (submenu, setDirectionProc, direction);
+ GTK3.gtk_container_forall (submenu, setDirectionProc, direction);
}
}
if (GTK.GTK_IS_CONTAINER (widget)) {
- GTK.gtk_container_forall (widget, setDirectionProc, direction);
+ GTK3.gtk_container_forall (widget, setDirectionProc, direction);
}
return 0;
}
@@ -5590,12 +5554,17 @@ public final Consumer<Error> getErrorHandler () {
void showIMWindow (Control control) {
imControl = control;
if (preeditWindow == 0) {
- preeditWindow = GTK.gtk_window_new (GTK.GTK_WINDOW_POPUP);
+ preeditWindow = GTK3.gtk_window_new (GTK.GTK_WINDOW_POPUP);
if (preeditWindow == 0) error (SWT.ERROR_NO_HANDLES);
preeditLabel = GTK.gtk_label_new (null);
if (preeditLabel == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (preeditWindow, preeditLabel);
- GTK.gtk_widget_show (preeditLabel);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_window_set_child(preeditWindow, preeditLabel);
+ } else {
+ GTK3.gtk_container_add (preeditWindow, preeditLabel);
+ GTK.gtk_widget_show (preeditLabel);
+ }
}
long [] preeditString = new long [1];
long [] pangoAttrs = new long [1];
@@ -5606,14 +5575,16 @@ void showIMWindow (Control control) {
if (widget == null) widget = control;
widget.setBackgroundGdkRGBA (preeditWindow, control.getBackgroundGdkRGBA());
widget.setForegroundGdkRGBA (preeditLabel, control.getForegroundGdkRGBA());
- widget.setFontDescription (preeditLabel, control.getFontDescription ());
+ long fontDesc = control.getFontDescription ();
+ widget.setFontDescription (preeditLabel, fontDesc);
+ OS.pango_font_description_free (fontDesc);
if (pangoAttrs [0] != 0) GTK.gtk_label_set_attributes (preeditLabel, pangoAttrs[0]);
GTK.gtk_label_set_text (preeditLabel, preeditString [0]);
Point point = control.toDisplayInPixels (control.getIMCaretPos ());
- GTK.gtk_window_move (preeditWindow, point.x, point.y);
+ GTK3.gtk_window_move (preeditWindow, point.x, point.y);
GtkRequisition requisition = new GtkRequisition ();
GTK.gtk_widget_get_preferred_size (preeditLabel, requisition, null);
- GTK.gtk_window_resize (preeditWindow, requisition.width, requisition.height);
+ GTK3.gtk_window_resize (preeditWindow, requisition.width, requisition.height);
GTK.gtk_widget_show (preeditWindow);
} else {
GTK.gtk_widget_hide (preeditWindow);
@@ -5649,6 +5620,11 @@ public boolean sleep () {
}
if (getMessageCount () != 0) return true;
sendPreExternalEventDispatchEvent ();
+ if (!GTK.GTK4) GDK.gdk_threads_leave ();
+ /*
+ * The code below replicates event waiting behavior of g_main_context_iteration
+ * but leaves out event dispatch.
+ */
if (fds == 0) {
allocated_nfds = 2;
fds = OS.g_malloc (OS.GPollFD_sizeof () * allocated_nfds);
@@ -5675,17 +5651,8 @@ public boolean sleep () {
*/
if (timeout [0] < 0) timeout [0] = 50;
- /* Exit the OS lock to allow other threads to enter GTK */
- Lock lock = Platform.lock;
- int count = lock.lock ();
- for (int i = 0; i < count; i++) lock.unlock ();
- try {
- wake = false;
- OS.Call (poll, fds, nfds, timeout [0]);
- } finally {
- for (int i = 0; i < count; i++) lock.lock ();
- lock.unlock ();
- }
+ wake = false;
+ OS.Call (poll, fds, nfds, timeout [0]);
}
}
OS.g_main_context_check (context, max_priority [0], fds, nfds);
@@ -5693,6 +5660,7 @@ public boolean sleep () {
}
} while (!result && getMessageCount () == 0 && !wake);
wake = false;
+ if (!GTK.GTK4) GDK.gdk_threads_enter ();
sendPostExternalEventDispatchEvent ();
return true;
}
@@ -5753,7 +5721,12 @@ public void timerExec (int milliseconds, Runnable runnable) {
timerIds = newTimerIds;
}
}
- int timerId = OS.g_timeout_add (milliseconds, timerProc, index);
+ int timerId;
+ if (GTK.GTK4) {
+ timerId = OS.g_timeout_add (milliseconds, timerProc, index);
+ } else {
+ timerId = GDK.gdk_threads_add_timeout (milliseconds, timerProc, index);
+ }
if (timerId != 0) {
timerIds [index] = timerId;
timerList [index] = runnable;
@@ -5793,7 +5766,11 @@ long caretProc (long clientData) {
* state to draw/redraw the caret. See Bug 517487.
*/
currentCaret.getParent().blink = true;
- caretId = OS.g_timeout_add (blinkRate, caretProc, 0);
+ if (GTK.GTK4) {
+ caretId = OS.g_timeout_add (blinkRate, caretProc, 0);
+ } else {
+ caretId = GDK.gdk_threads_add_timeout (blinkRate, caretProc, 0);
+ }
} else {
currentCaret = null;
}
@@ -5807,7 +5784,11 @@ long caretProc (long clientData) {
void resetCaretTiming() {
if (caretId != 0) {
OS.g_source_remove(caretId);
- caretId = OS.g_timeout_add(currentCaret.blinkRate, caretProc, 0);
+ if (GTK.GTK4) {
+ caretId = OS.g_timeout_add (currentCaret.blinkRate, caretProc, 0);
+ } else {
+ caretId = GDK.gdk_threads_add_timeout (currentCaret.blinkRate, caretProc, 0);
+ }
}
}
@@ -5924,7 +5905,11 @@ void setCurrentCaret (Caret caret) {
currentCaret = caret;
if (caret == null) return;
int blinkRate = currentCaret.blinkRate;
- caretId = OS.g_timeout_add (blinkRate, caretProc, 0);
+ if (GTK.GTK4) {
+ caretId = OS.g_timeout_add (blinkRate, caretProc, 0);
+ } else {
+ caretId = GDK.gdk_threads_add_timeout (blinkRate, caretProc, 0);
+ }
}
long shellMapProc (long handle, long arg0, long user_data) {
@@ -5933,40 +5918,6 @@ long shellMapProc (long handle, long arg0, long user_data) {
return widget.shellMapProc (handle, arg0, user_data);
}
-String simple_color_parser (String output, String value, int index) {
- /*
- * This method takes a color value (rgb(...), #rgb, an X11 color, etc.)
- * and makes sure it's input we can handle. We can handle rgb/rgba values,
- * X11 colors, or colors in the format #rgb or #rrggbb.
- *
- * We cannot handle shade/gradient functions or references to other colors.
- * Because of this we strip out values that start with "@" and check
- * non rgb values against X11 named colors.
- *
- * I.e.: the following would be invalid input:
- *
- * shade(@bg_color, 0,7)
- * or
- * define-color error_bg_color @bg_color
- */
- if (output != null && value != null) {
- int position;
- position = index + value.length() + 1;
- String color = output.substring(position);
- // Check for rgb color case
- if (color.startsWith("#") || color.startsWith("rgb")) {
- return color;
- } else if (!color.startsWith("@")) {
- // Check for an X11 color
- String [] cut = color.split(";");
- if (colorList.contains(cut[0])) {
- return color;
- }
- }
- }
- return "";
-}
-
long signalProc (long gobject, long arg1, long user_data) {
switch((int)user_data) {
case STYLE_UPDATED:
@@ -6005,14 +5956,65 @@ public void syncExec (Runnable runnable) {
synchronizer = this.synchronizer;
synchronized (idleLock) {
if (idleNeeded && idleHandle == 0) {
- //NOTE: calling unlocked function in OS
- idleHandle = OS._g_idle_add (idleProc, 0);
+ if (GTK.GTK4) {
+ idleHandle = OS.g_idle_add (idleProc, 0);
+ } else {
+ idleHandle = GDK.gdk_threads_add_idle (idleProc, 0);
+ }
}
}
}
synchronizer.syncExec (runnable);
}
+/**
+ * Calls the callable on the user-interface thread at the next reasonable
+ * opportunity, and returns the its result from this method. The thread which
+ * calls this method is suspended until the callable completes.
+ * <p>
+ * Note that at the time the callable is invoked, widgets that have the receiver
+ * as their display may have been disposed. Therefore, it is necessary to check
+ * for this case inside the callable before accessing the widget.
+ * </p>
+ * <p>
+ * Any exception that is thrown from the callable is re-thrown in the calling
+ * thread. Note: The exception retains its original stack trace from the
+ * throwing thread. The call to {@code syncCall} will not be present in the
+ * stack trace.
+ * </p>
+ *
+ * @param callable the code to call on the user-interface thread
+ *
+ * @exception SWTException <code>ERROR_DEVICE_DISPOSED</code> - if the receiver
+ * has been disposed
+ * @exception E An exception that is thrown by the callable on the
+ * user-interface thread, and re-thrown on the calling
+ * thread
+ *
+ * @see #syncExec(Runnable)
+ * @see SwtCallable#call()
+ * @since 3.118
+ */
+public <T, E extends Exception> T syncCall(SwtCallable<T, E> callable) throws E {
+ Objects.nonNull(callable);
+ @SuppressWarnings("unchecked")
+ T[] t = (T[]) new Object[1];
+ Object[] ex = new Object[1];
+ syncExec(() -> {
+ try {
+ t[0] = callable.call();
+ } catch (Exception e) {
+ ex[0] = e;
+ }
+ });
+ if (ex[0] != null) {
+ @SuppressWarnings("unchecked")
+ E e = (E) ex[0];
+ throw e;
+ }
+ return t[0];
+}
+
static int translateKey (int key) {
for (int i=0; i<KeyTable.length; i++) {
if (KeyTable [i] [0] == key) return KeyTable [i] [1];
@@ -6041,13 +6043,6 @@ static int untranslateKey (int key) {
public void update () {
checkDevice ();
flushExposes (0, true);
- /*
- * Do not send expose events on GTK 3.16.0+
- * It's worth checking whether can be removed on all GTK 3 versions.
- */
- if (GTK.GTK_VERSION < OS.VERSION(3, 16, 0)) {
- GDK.gdk_window_process_all_updates ();
- }
}
/**
@@ -6074,45 +6069,93 @@ void wakeThread () {
wake = true;
}
-long enterMotionScrollProc (long controller, double x, double y, long user_data) {
+void enterMotionProc(long controller, double x, double y, long user_data) {
long handle = GTK.gtk_event_controller_get_widget(controller);
- Widget widget = getWidget (handle);
- if (widget == null) return 0;
- return widget.enterMotionScrollProc(handle, x, y, user_data);
+ Widget widget = getWidget(handle);
+
+ if (widget != null) widget.enterMotionProc(controller, x, y, user_data);
}
-long focusProc (long controller, long user_data) {
+boolean scrollProc(long controller, double dx, double dy, long user_data) {
long handle = GTK.gtk_event_controller_get_widget(controller);
- Widget widget = getWidget (handle);
- if (widget == null) return 0;
- return widget.focusProc(handle, user_data);
+ Widget widget = getWidget(handle);
+
+ if (widget != null) return widget.scrollProc(controller, dx, dy, user_data);
+
+ return false;
}
-long keyPressReleaseProc (long controller, int keyval, int keycode, int state, long user_data) {
+void focusProc(long controller, long user_data) {;
long handle = GTK.gtk_event_controller_get_widget(controller);
- Widget widget = getWidget (handle);
- if (widget == null) return 0;
- return widget.keyPressReleaseProc(handle, keyval, keycode, state, user_data);
+ Widget widget = getWidget(handle);
+
+ if (widget != null) widget.focusProc(controller, user_data);
}
-long gesturePressReleaseProc (long gesture, int n_press, double x, double y, long user_data) {
+void windowActiveProc(long handle, long user_data) {;
+ Widget widget = getWidget(handle);
+ if (widget != null) widget.windowActiveProc(handle, user_data);
+}
+
+boolean keyPressReleaseProc(long controller, int keyval, int keycode, int state, long user_data) {
+ long handle = GTK.gtk_event_controller_get_widget(controller);
+ Widget widget = getWidget(handle);
+ if (widget == null) return false;
+
+ return widget.keyPressReleaseProc(controller, keyval, keycode, state, user_data);
+}
+
+void gesturePressReleaseProc(long gesture, int n_press, double x, double y, long user_data) {
long handle = GTK.gtk_event_controller_get_widget(gesture);
- Widget widget = getWidget (handle);
- if (widget == null) return 0;
- return widget.getsurePressReleaseProc (gesture, n_press, x, y, user_data);
+ Widget widget = getWidget(handle);
+
+ if (widget != null) widget.gesturePressReleaseProc(gesture, n_press, x, y, user_data);
}
-long leaveProc (long controller, long user_data) {
+void leaveProc(long controller, long user_data) {
long handle = GTK.gtk_event_controller_get_widget(controller);
- Widget widget = getWidget (handle);
- if (widget == null) return 0;
- return widget.leaveProc(handle, user_data);
+ Widget widget = getWidget(handle);
+
+ if (widget != null) widget.leaveProc(controller, handle, user_data);
}
-long notifyStateProc (long gdk_handle, long param_spec, long user_data) {
- Widget widget = getWidget (user_data);
- if (widget == null) return 0;
- return widget.notifyStateProc(gdk_handle, user_data);
+void computeSizeProc(long toplevel, long size, long user_data) {
+ //TODO: GTK4 - Could be needed for minimum Size, signal remains connected
+}
+
+void activateProc(long action, long parameter, long user_data) {
+ Widget widget = getWidget(user_data);
+ if(widget == null) return;
+
+ widget.gtk_activate(user_data);
+}
+
+void resizeProc(long handle, int width, int height) {
+ Widget widget = getWidget(handle);
+ if (widget != null) widget.gtk_size_allocate(handle, 0);
+}
+
+long notifyProc (long object, long param_spec, long user_data) {
+ Widget widget = getWidget (object);
+ if (widget == null) {
+ widget = getWidget (user_data);
+ if (widget == null) {
+ return 0;
+ } else {
+ /*
+ * There is a corner case where the connected handle is actually
+ * a GdkSurface.
+ */
+ return widget.notifyProc(object, param_spec, Widget.NOTIFY_STATE);
+ }
+ }
+ return widget.notifyProc(object, param_spec, user_data);
+}
+
+boolean changeValue (long handle, int scroll, double value, long user_data) {
+ Widget widget = getWidget (handle);
+ if (widget == null) return false;
+ return widget.gtk_change_value(handle, scroll, value, user_data);
}
long windowProc (long handle, long user_data) {
@@ -6151,25 +6194,36 @@ long windowTimerProc (long handle) {
return widget.timerProc (handle);
}
-long gdk_window_get_device_position (long window, int[] x, int[] y, int[] mask) {
+/**
+ * Gets the current cursor position relative to the upper left corner of the window.
+ * Available to GTK3 implementations only.
+ *
+ * @return the cursor position to <b>x</b> & <b>y</b>. Return value of the function is the window pointer underneath the cursor, can be NULL.
+ */
+long getWindowPointerPosition(long window, int[] x, int[] y, int[] mask) {
long display = 0;
- if( window != 0) {
- display = GDK.gdk_window_get_display (window);
+
+ if (window != 0) {
+ display = GDK.gdk_window_get_display(window);
} else {
- window = GDK.gdk_get_default_root_window ();
- display = GDK.gdk_window_get_display (window);
+ window = GDK.gdk_get_default_root_window();
+ display = GDK.gdk_window_get_display(window);
}
- long pointer = GDK.gdk_get_pointer (display);
+
+ long pointer = GDK.gdk_get_pointer(display);
return GDK.gdk_window_get_device_position(window, pointer, x, y, mask);
}
-long gdk_surface_get_device_position (long surface, int[] x, int[] y, int[] mask) {
- long display = 0;
- if (surface != 0) {
- display = GDK.gdk_surface_get_display (surface);
- }
- long pointer = GDK.gdk_get_pointer(display);
- return GDK.gdk_surface_get_device_position(surface, pointer, x, y, mask);
+/**
+ * Gets the current cursor position relative to the upper left corner of the surface.
+ * Available to GTK4 implementations only.
+ */
+void getPointerPosition(double[] x, double[] y) {
+ long display = GDK.gdk_display_get_default();
+ long seat = GDK.gdk_display_get_default_seat(display);
+ long pointer = GDK.gdk_seat_get_pointer(seat);
+
+ GDK.gdk_device_get_surface_at_position(pointer, x, y);
}
long gdk_device_get_window_at_position (int[] win_x, int[] win_y) {
@@ -6178,30 +6232,12 @@ long gdk_device_get_window_at_position (int[] win_x, int[] win_y) {
return GDK.gdk_device_get_window_at_position (device, win_x, win_y);
}
-long gdk_device_get_surface_at_position (int[] win_x, int[] win_y) {
+long gdk_device_get_surface_at_position (double[] win_x, double[] win_y) {
long display = GDK.gdk_display_get_default ();
long device = GDK.gdk_get_pointer(display);
return GDK.gdk_device_get_surface_at_position (device, win_x, win_y);
}
-/**
- * @noreference This method is not intended to be referenced by clients.
- * @nooverride This method is not intended to be re-implemented or extended by clients.
- */
-@Override
-protected long gsettingsProc (long gobject, long arg1, long user_data) {
- switch((int)user_data) {
- case CHANGE_SCALEFACTOR:
- this.scaleFactor = getDeviceZoom ();
- DPIUtil.setDeviceZoom (scaleFactor);
- Shell[] shells = getShells();
- for (int i = 0; i < shells.length; i++) {
- shells[i].layout(true, true);
- }
- }
- return 0;
-}
-
static int _getDeviceZoom (long monitor_num) {
/*
* We can hard-code 96 as gdk_screen_get_resolution will always return -1
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
index ce777b75db..1589865091 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class support the layout of selectable
@@ -52,7 +54,6 @@ public class ExpandBar extends Composite {
ExpandItem lastFocus;
int itemCount;
int spacing;
- int yCurrentScroll;
/**
* Constructs a new instance of this class given its parent
@@ -134,21 +135,41 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
@Override
void createHandle (int index) {
state |= HANDLE;
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
+
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ if (!GTK.GTK4) GTK3.gtk_widget_set_has_window(fixedHandle, true);
+
handle = gtk_box_new (GTK.GTK_ORIENTATION_VERTICAL, false, 0);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+
if ((style & SWT.V_SCROLL) != 0) {
- scrolledHandle = GTK.gtk_scrolled_window_new (0, 0);
+ if (GTK.GTK4) {
+ scrolledHandle = GTK4.gtk_scrolled_window_new();
+ } else {
+ scrolledHandle = GTK3.gtk_scrolled_window_new (0, 0);
+ }
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
GTK.gtk_scrolled_window_set_policy (scrolledHandle, GTK.GTK_POLICY_NEVER, GTK.GTK_POLICY_AUTOMATIC);
- GTK.gtk_container_add (fixedHandle, scrolledHandle);
- GTK.gtk_container_add(scrolledHandle, handle);
- long viewport = GTK.gtk_bin_get_child (scrolledHandle);
- GTK.gtk_viewport_set_shadow_type (viewport, GTK.GTK_SHADOW_NONE);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, scrolledHandle);
+ GTK4.gtk_scrolled_window_set_child(scrolledHandle, handle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, scrolledHandle);
+ GTK3.gtk_container_add(scrolledHandle, handle);
+ }
+
+ if (!GTK.GTK4) {
+ long viewport = GTK3.gtk_bin_get_child (scrolledHandle);
+ GTK3.gtk_viewport_set_shadow_type (viewport, GTK.GTK_SHADOW_NONE);
+ }
} else {
- GTK.gtk_container_add (fixedHandle, handle);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, handle);
+ }
}
gtk_container_set_border_width (handle, 0);
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
@@ -167,7 +188,7 @@ void createItem (ExpandItem item, int style, int index) {
items [index] = item;
itemCount++;
item.width = Math.max (0, getClientAreaInPixels ().width - spacing * 2);
- layoutItems (index, true);
+ layoutItems();
}
@Override
@@ -185,8 +206,7 @@ void destroyItem (ExpandItem item) {
if (index == itemCount) return;
System.arraycopy (items, index + 1, items, index, --itemCount - index);
items [itemCount] = null;
- item.redraw ();
- layoutItems (index, true);
+ layoutItems();
}
@Override
@@ -214,19 +234,12 @@ boolean hasFocus () {
}
@Override
-void hookEvents () {
- super.hookEvents ();
- if (scrolledHandle != 0) {
- OS.g_signal_connect_closure (scrolledHandle, OS.size_allocate, display.getClosure (SIZE_ALLOCATE), true);
- }
-}
+void hookEvents() {
+ super.hookEvents();
-int getBandHeight () {
- if (font == null) return ExpandItem.CHEVRON_SIZE;
- GC gc = new GC (this);
- FontMetrics metrics = gc.getFontMetrics ();
- gc.dispose ();
- return Math.max (ExpandItem.CHEVRON_SIZE, metrics.getHeight ());
+ if (!GTK.GTK4) {
+ if (scrolledHandle != 0) OS.g_signal_connect_closure(scrolledHandle, OS.size_allocate, display.getClosure(SIZE_ALLOCATE), true);
+ }
}
/**
@@ -303,11 +316,6 @@ public int getSpacing () {
return DPIUtil.autoScaleDown(spacing);
}
-int getSpacingInPixels () {
- checkWidget ();
- return spacing;
-}
-
@Override
long gtk_key_press_event (long widget, long event) {
if (!hasFocus ()) return 0;
@@ -318,8 +326,14 @@ long gtk_key_press_event (long widget, long event) {
if (items [index].hasFocus ()) break;
index++;
}
- int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
+
+ int [] key = new int [1];
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ }
+
boolean next = false;
switch (key[0]) {
case GDK.GDK_Up:
@@ -363,17 +377,17 @@ public int indexOf (ExpandItem item) {
return -1;
}
-void layoutItems (int index, boolean setScrollbar) {
+void layoutItems() {
for (int i = 0; i < itemCount; i++) {
ExpandItem item = items [i];
- if (item != null) item.resizeControl (yCurrentScroll);
+ if (item != null) item.resizeControl();
}
}
@Override
long gtk_size_allocate (long widget, long allocation) {
long result = super.gtk_size_allocate (widget, allocation);
- layoutItems (0, false);
+ layoutItems();
return result;
}
@@ -431,12 +445,8 @@ void reskinChildren (int flags) {
@Override
void setWidgetBackground () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- GdkRGBA rgba = (state & BACKGROUND) != 0 ? getBackgroundGdkRGBA () : null;
- super.setBackgroundGdkRGBA (handle, rgba);
- } else {
- super.setWidgetBackground();
- }
+ GdkRGBA rgba = (state & BACKGROUND) != 0 ? getBackgroundGdkRGBA () : null;
+ super.setBackgroundGdkRGBA (handle, rgba);
}
@Override
@@ -445,7 +455,7 @@ void setFontDescription (long font) {
for (int i = 0; i < itemCount; i++) {
items[i].setFontDescription (font);
}
- layoutItems (0, true);
+ layoutItems();
}
@Override
@@ -466,48 +476,6 @@ void setOrientation (boolean create) {
}
}
-void setScrollbar () {
- if (itemCount == 0) return;
- if ((style & SWT.V_SCROLL) == 0) return;
- int height = getClientAreaInPixels ().height;
- ExpandItem item = items [itemCount - 1];
- int maxHeight = item.y + getBandHeight () + spacing;
- if (item.expanded) maxHeight += item.height;
- long adjustmentHandle = GTK.gtk_scrolled_window_get_vadjustment (scrolledHandle);
- GtkAdjustment adjustment = new GtkAdjustment ();
- gtk_adjustment_get (adjustmentHandle, adjustment);
- yCurrentScroll = (int)adjustment.value;
-
- //claim bottom free space
- if (yCurrentScroll > 0 && height > maxHeight) {
- yCurrentScroll = Math.max (0, yCurrentScroll + maxHeight - height);
- layoutItems (0, false);
- }
- maxHeight += yCurrentScroll;
- adjustment.value = Math.min (yCurrentScroll, maxHeight);
- adjustment.upper = maxHeight;
- adjustment.page_size = height;
- GTK.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
- adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
- int policy = maxHeight > height ? GTK.GTK_POLICY_ALWAYS : GTK.GTK_POLICY_NEVER;
- GTK.gtk_scrolled_window_set_policy (scrolledHandle, GTK.GTK_POLICY_NEVER, policy);
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (fixedHandle, allocation);
- int width = allocation.width - spacing * 2;
- if (policy == GTK.GTK_POLICY_ALWAYS) {
- long vHandle = 0;
- vHandle = GTK.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
- GtkRequisition requisition = new GtkRequisition ();
- gtk_widget_get_preferred_size (vHandle, requisition);
- width -= requisition.width;
- }
- width = Math.max (0, width);
- for (int i = 0; i < itemCount; i++) {
- ExpandItem item2 = items[i];
- item2.setBounds (0, 0, width, item2.height, false, true);
- }
-}
-
/**
* Sets the receiver's spacing. Spacing specifies the number of points allocated around
* each item.
@@ -533,19 +501,8 @@ void setSpacingInPixels (int spacing) {
gtk_container_set_border_width (handle, spacing);
}
-void showItem (ExpandItem item) {
- Control control = item.control;
- if (control != null && !control.isDisposed ()) {
- control.setVisible (item.expanded);
- }
- item.redraw ();
- int index = indexOf (item);
- layoutItems (index + 1, true);
-}
-
@Override
void updateScrollBarValue (ScrollBar bar) {
- yCurrentScroll = bar.getSelection();
- layoutItems (0, false);
+ layoutItems();
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java
index 00613e3ea5..08e611ebee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java
@@ -17,6 +17,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a selectable user interface object
@@ -40,14 +42,8 @@ import org.eclipse.swt.internal.gtk.*;
public class ExpandItem extends Item {
ExpandBar parent;
Control control;
- ImageList imageList;
long clientHandle, boxHandle, labelHandle, imageHandle;
- boolean expanded;
- int x, y, width, height;
- int imageHeight, imageWidth;
- static final int TEXT_INSET = 6;
- static final int BORDER = 1;
- static final int CHEVRON_SIZE = 24;
+ int width, height;
/**
* Constructs a new instance of this class given its parent
@@ -130,15 +126,31 @@ void createHandle (int index) {
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (handle, clientHandle);
+ if (GTK.GTK4) {
+ GTK4.gtk_expander_set_child(handle, clientHandle);
+ } else {
+ GTK3.gtk_container_add (handle, clientHandle);
+ }
boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 4);
if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
labelHandle = GTK.gtk_label_new (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_container_add (boxHandle, labelHandle);
+
+ if (GTK.GTK4) {
+ imageHandle = GTK4.gtk_picture_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ GTK4.gtk_picture_set_can_shrink(imageHandle, false);
+
+ GTK4.gtk_box_append(boxHandle, imageHandle);
+ GTK4.gtk_box_append(boxHandle, labelHandle);
+ } else {
+ imageHandle = GTK.gtk_image_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK3.gtk_container_add(boxHandle, imageHandle);
+ GTK3.gtk_container_add(boxHandle, labelHandle);
+ }
+
GTK.gtk_expander_set_label_widget (handle, boxHandle);
GTK.gtk_widget_set_can_focus (handle, true);
}
@@ -176,69 +188,6 @@ void destroyWidget () {
super.destroyWidget ();
}
-void drawChevron (GC gc, int x, int y) {
- int [] polyline1, polyline2;
- if (expanded) {
- int px = x + 4 + 5;
- int py = y + 4 + 7;
- polyline1 = new int [] {
- px,py, px+1,py, px+1,py-1, px+2,py-1, px+2,py-2, px+3,py-2, px+3,py-3,
- px+3,py-2, px+4,py-2, px+4,py-1, px+5,py-1, px+5,py, px+6,py};
- py += 4;
- polyline2 = new int [] {
- px,py, px+1,py, px+1,py-1, px+2,py-1, px+2,py-2, px+3,py-2, px+3,py-3,
- px+3,py-2, px+4,py-2, px+4,py-1, px+5,py-1, px+5,py, px+6,py};
- } else {
- int px = x + 4 + 5;
- int py = y + 4 + 4;
- polyline1 = new int[] {
- px,py, px+1,py, px+1,py+1, px+2,py+1, px+2,py+2, px+3,py+2, px+3,py+3,
- px+3,py+2, px+4,py+2, px+4,py+1, px+5,py+1, px+5,py, px+6,py};
- py += 4;
- polyline2 = new int [] {
- px,py, px+1,py, px+1,py+1, px+2,py+1, px+2,py+2, px+3,py+2, px+3,py+3,
- px+3,py+2, px+4,py+2, px+4,py+1, px+5,py+1, px+5,py, px+6,py};
- }
- gc.setForeground (display.getSystemColor (SWT.COLOR_TITLE_FOREGROUND));
- gc.drawPolyline (DPIUtil.autoScaleDown(polyline1));
- gc.drawPolyline (DPIUtil.autoScaleDown(polyline2));
-}
-
-void drawItem (GC gc, boolean drawFocus) {
- int headerHeight = parent.getBandHeight ();
- Display display = getDisplay ();
- gc.setForeground (display.getSystemColor (SWT.COLOR_TITLE_BACKGROUND));
- gc.setBackground (display.getSystemColor (SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
- gc.fillGradientRectangle (x, y, width, headerHeight, true);
- if (expanded) {
- gc.setForeground (display.getSystemColor (SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
- gc.drawLine (x, y + headerHeight, x, y + headerHeight + height - 1);
- gc.drawLine (x, y + headerHeight + height - 1, x + width - 1, y + headerHeight + height - 1);
- gc.drawLine (x + width - 1, y + headerHeight + height - 1, x + width - 1, y + headerHeight);
- }
- int drawX = x;
- if (image != null) {
- drawX += ExpandItem.TEXT_INSET;
- if (imageHeight > headerHeight) {
- gc.drawImage (image, drawX, y + headerHeight - imageHeight);
- } else {
- gc.drawImage (image, drawX, y + (headerHeight - imageHeight) / 2);
- }
- drawX += imageWidth;
- }
- if (text.length() > 0) {
- drawX += ExpandItem.TEXT_INSET;
- Point size = gc.stringExtent (text);
- gc.setForeground (parent.getForeground ());
- gc.drawString (text, drawX, y + (headerHeight - size.y) / 2, true);
- }
- int chevronSize = ExpandItem.CHEVRON_SIZE;
- drawChevron (gc, x + width - chevronSize, y + (headerHeight - chevronSize) / 2);
- if (drawFocus) {
- gc.drawFocus (x + 1, y + 1, width - 2, headerHeight - 2);
- }
-}
-
/**
* Returns the control that is shown when the item is expanded.
* If no control has been set, return <code>null</code>.
@@ -266,9 +215,9 @@ public Control getControl () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public boolean getExpanded () {
- checkWidget ();
- return expanded;
+public boolean getExpanded() {
+ checkWidget();
+ return GTK.gtk_expander_get_expanded(handle);
}
/**
@@ -286,19 +235,15 @@ public int getHeaderHeight () {
return DPIUtil.autoScaleDown (getHeaderHeightInPixels ());
}
-int getHeaderHeightInPixels () {
- checkWidget ();
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
- // allocation.height normally returns the header height instead of the whole
- // widget itself. This is to prevent situations where allocation.height actually
- // returns the correct header height.
- int headerHeight = allocation.height - (expanded ? height : 0);
- if (expanded && headerHeight < 0) {
- return allocation.height;
- }
- return headerHeight;
+int getHeaderHeightInPixels() {
+ checkWidget();
+
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(GTK.gtk_expander_get_label_widget(handle), allocation);
+
+ return allocation.height;
}
+
/**
* Gets the height of the receiver.
*
@@ -309,14 +254,9 @@ int getHeaderHeightInPixels () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getHeight () {
- checkWidget ();
- return DPIUtil.autoScaleDown(getHeightInPixels());
-}
-
-int getHeightInPixels () {
- checkWidget ();
- return height;
+public int getHeight() {
+ checkWidget();
+ return DPIUtil.autoScaleDown(height);
}
/**
@@ -334,17 +274,6 @@ public ExpandBar getParent () {
return parent;
}
-int getPreferredWidth (GC gc) {
- int width = ExpandItem.TEXT_INSET * 2 + ExpandItem.CHEVRON_SIZE;
- if (image != null) {
- width += ExpandItem.TEXT_INSET + imageWidth;
- }
- if (text.length() > 0) {
- width += gc.stringExtent (text).x;
- }
- return width;
-}
-
@Override
long gtk_activate (long widget) {
Event event = new Event ();
@@ -355,21 +284,6 @@ long gtk_activate (long widget) {
}
@Override
-long gtk_event (long widget, long event) {
- if (!GTK.GTK4) return 0;
- int eventType = GDK.gdk_event_get_event_type(event);
- switch (eventType) {
- case GDK.GDK4_BUTTON_PRESS: {
- return gtk_button_press_event(widget, event);
- }
- case GDK.GDK4_BUTTON_RELEASE: {
- return gtk_button_release_event(widget, event);
- }
- }
- return 0;
-}
-
-@Override
long gtk_button_press_event (long widget, long event) {
setFocus ();
return 0;
@@ -384,7 +298,7 @@ long gtk_focus_out_event (long widget, long event) {
@Override
long gtk_size_allocate (long widget, long allocation) {
- parent.layoutItems (0, false);
+ parent.layoutItems();
return 0;
}
@@ -404,27 +318,27 @@ void hookEvents () {
OS.g_signal_connect_closure (handle, OS.activate, display.getClosure (ACTIVATE), false);
OS.g_signal_connect_closure (handle, OS.activate, display.getClosure (ACTIVATE_INVERSE), true);
if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- } else {
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false);
- }
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [FOCUS_OUT_EVENT], 0, display.getClosure (FOCUS_OUT_EVENT), false);
- OS.g_signal_connect_closure (clientHandle, OS.size_allocate, display.getClosure (SIZE_ALLOCATE), true);
- if (GTK.GTK4) {
- long motionController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(handle, motionController);
+ long clickController = GTK4.gtk_gesture_click_new();
+ GTK4.gtk_widget_add_controller(handle, clickController);
+ OS.g_signal_connect(clickController, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
+
+ long motionController = GTK4.gtk_event_controller_motion_new();
+ GTK4.gtk_widget_add_controller(handle, motionController);
GTK.gtk_event_controller_set_propagation_phase(motionController, GTK.GTK_PHASE_TARGET);
- long enterAddress = display.enterMotionScrollCallback.getAddress();
+ long enterAddress = display.enterMotionCallback.getAddress();
OS.g_signal_connect (motionController, OS.enter, enterAddress, ENTER);
+
+ OS.g_signal_connect(clientHandle, OS.resize, display.resizeProc, 0);
} else {
+ OS.g_signal_connect_closure(clientHandle, OS.size_allocate, display.getClosure(SIZE_ALLOCATE), true);
+
OS.g_signal_connect_closure_by_id (handle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.getClosure (ENTER_NOTIFY_EVENT), false);
+ OS.g_signal_connect_closure_by_id (handle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false);
+ OS.g_signal_connect_closure_by_id (handle, display.signalIds [FOCUS_OUT_EVENT], 0, display.getClosure (FOCUS_OUT_EVENT), false);
}
}
-void redraw () {
-}
-
@Override
void register () {
super.register ();
@@ -444,13 +358,11 @@ void releaseHandle () {
@Override
void releaseWidget () {
super.releaseWidget ();
- if (imageList != null) imageList.dispose ();
if (parent.lastFocus == this) parent.lastFocus = null;
- imageList = null;
control = null;
}
-void resizeControl (int yScroll) {
+void resizeControl () {
if (control != null && !control.isDisposed ()) {
boolean visible = GTK.gtk_expander_get_expanded (handle);
GtkAllocation allocation = new GtkAllocation ();
@@ -465,71 +377,47 @@ void resizeControl (int yScroll) {
* As of GTK3, the hierarchy is changed, this affected child-size allocation and a fix
* is now neccessary.
* See also other 454940 notes and similar fix in: 453827 */
- int x = 0 ;
+ int x = 0;
int y = 0;
+ int width = allocation.width;
+ int height = allocation.height;
+ /*
+ * Focus line width is done via CSS in GTK4, and does not contribute
+ * to the size of the widget.
+ */
+ if (!GTK.GTK4) {
+ int [] property = new int [1];
+ GTK3.gtk_widget_style_get (handle, OS.focus_line_width, property, 0);
+ y += property [0] * 2;
+ height -= property [0] * 2;
+ }
- if (x != -1 && y != -1) {
- int width = allocation.width;
- int height = allocation.height;
- /*
- * Focus line width is done via CSS in GTK4, and does not contribute
- * to the size of the widget.
- */
- if (!GTK.GTK4) {
- int [] property = new int [1];
- GTK.gtk_widget_style_get (handle, OS.focus_line_width, property, 0);
- y += property [0] * 2;
- height -= property [0] * 2;
- }
-
- /*
- * Feature in GTK. When the ExpandBar is resize too small the control
- * shows up on top of the vertical scrollbar. This happen because the
- * GtkExpander does not set the size of child smaller than the request
- * size of its parent and because the control is not parented in the
- * hierarchy of the GtkScrolledWindow.
- * The fix is calculate the width ourselves when the scrollbar is visible.
- */
- ScrollBar vBar = parent.verticalBar;
- if (vBar != null) {
- if (GTK.gtk_widget_get_visible (vBar.handle)) {
- GTK.gtk_widget_get_allocation (parent.scrolledHandle, allocation);
- width = allocation.width - parent.vScrollBarWidth () - 2 * parent.spacing;
- }
+ /*
+ * Feature in GTK. When the ExpandBar is resize too small the control
+ * shows up on top of the vertical scrollbar. This happen because the
+ * GtkExpander does not set the size of child smaller than the request
+ * size of its parent and because the control is not parented in the
+ * hierarchy of the GtkScrolledWindow.
+ * The fix is calculate the width ourselves when the scrollbar is visible.
+ */
+ ScrollBar vBar = parent.verticalBar;
+ if (vBar != null) {
+ if (GTK.gtk_widget_get_visible (vBar.handle)) {
+ GTK.gtk_widget_get_allocation (parent.scrolledHandle, allocation);
+ width = allocation.width - parent.vScrollBarWidth () - 2 * parent.spacing;
}
- // Bug 479242: Bound calculation is correct without needing to use yScroll in GTK3
- /*
- * Bug 538114: ExpandBar has no content until resized or collapsed/expanded.
- * When widget is first created inside ExpandItem's control, the size is allocated
- * to be zero, and the widget is never shown during a layout operation, similar to
- * Bug 487757. The fix is to show the control before setting any bounds.
- */
- if (visible) GTK.gtk_widget_show(control.topHandle ());
- control.setBounds (x, y, width, Math.max (0, height), true, true);
}
- control.setVisible (visible);
- }
-}
+ // Bug 479242: Bound calculation is correct without needing to use yScroll in GTK3
+ /*
+ * Bug 538114: ExpandBar has no content until resized or collapsed/expanded.
+ * When widget is first created inside ExpandItem's control, the size is allocated
+ * to be zero, and the widget is never shown during a layout operation, similar to
+ * Bug 487757. The fix is to show the control before setting any bounds.
+ */
+ if (visible) GTK.gtk_widget_show(control.topHandle ());
+ control.setBounds (x, y, width, Math.max (0, height), true, true);
-void setBounds (int x, int y, int width, int height, boolean move, boolean size) {
- redraw ();
- int headerHeight = parent.getBandHeight ();
- if (move) {
- if (imageHeight > headerHeight) {
- y += (imageHeight - headerHeight);
- }
- this.x = x;
- this.y = y;
- redraw ();
- }
- if (size) {
- this.width = width;
- this.height = height;
- redraw ();
- }
- if (control != null && !control.isDisposed ()) {
- if (move) control.setLocationInPixels (x + BORDER, y + headerHeight);
- if (size) control.setSizeInPixels (Math.max (0, width - 2 * BORDER), Math.max (0, height - BORDER));
+ control.setVisible (visible);
}
}
@@ -555,26 +443,19 @@ public void setControl (Control control) {
}
if (this.control == control) return;
-
this.control = control;
if (control != null) {
- control.setVisible (expanded);
//454940 ExpandBar DND fix.
//Reparenting on the GTK side.
//Proper hierachy on gtk side is required for DND to function properly.
//As ExpandItem's child can be created before the ExpandItem, our only
//option is to reparent the child upon the setControl(..) call.
//This is simmilar to TabFolder.
- Control.gtk_widget_reparent (control, clientHandle ());
+ Control.gtk_widget_reparent (control, clientHandle);
}
- parent.layoutItems (0, true);
+ parent.layoutItems();
}
-long clientHandle () {
- return clientHandle;
-}
-
-
/**
* Sets the expanded state of the receiver.
*
@@ -585,11 +466,10 @@ long clientHandle () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setExpanded (boolean expanded) {
- checkWidget ();
- this.expanded = expanded;
- GTK.gtk_expander_set_expanded (handle, expanded);
- parent.layoutItems (0, true);
+public void setExpanded(boolean expanded) {
+ checkWidget();
+ GTK.gtk_expander_set_expanded(handle, expanded);
+ parent.layoutItems();
}
boolean setFocus () {
@@ -606,7 +486,6 @@ boolean setFocus () {
void setFontDescription (long font) {
setFontDescription (handle, font);
if (labelHandle != 0) setFontDescription (labelHandle, font);
- if (imageHandle != 0) setFontDescription (imageHandle, font);
}
void setForegroundRGBA (GdkRGBA rgba) {
@@ -636,26 +515,33 @@ void setHeightInPixels (int height) {
if (height < 0) return;
this.height = height;
GTK.gtk_widget_set_size_request (clientHandle, -1, height);
- parent.layoutItems (0, false);
+ parent.layoutItems();
}
@Override
public void setImage (Image image) {
super.setImage (image);
- if (imageList != null) imageList.dispose ();
- imageList = null;
+
if (image != null) {
- if (image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- imageList = new ImageList ();
- int imageIndex = imageList.add (image);
- long pixbuf = imageList.getPixbuf (imageIndex);
- gtk_image_set_from_gicon (imageHandle, pixbuf);
+ if (image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_picture_set_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, image.surface);
+ }
if (text.length () == 0) GTK.gtk_widget_hide (labelHandle);
- GTK.gtk_widget_show (imageHandle);
+ GTK.gtk_widget_show(imageHandle);
} else {
- gtk_image_set_from_gicon (imageHandle, 0);
- GTK.gtk_widget_show (labelHandle);
- GTK.gtk_widget_hide (imageHandle);
+ if (GTK.GTK4) {
+ GTK4.gtk_picture_set_paintable(imageHandle, 0);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, 0);
+ }
+ GTK.gtk_widget_show(labelHandle);
+ GTK.gtk_widget_hide(imageHandle);
}
}
@@ -665,7 +551,7 @@ void setOrientation (boolean create) {
if ((parent.style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
int dir = (parent.style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
GTK.gtk_widget_set_direction (handle, dir);
- GTK.gtk_container_forall (handle, display.setDirectionProc, dir);
+ GTK3.gtk_container_forall (handle, display.setDirectionProc, dir);
}
}
@@ -677,25 +563,41 @@ public void setText (String string) {
}
void showWidget (int index) {
+ if (GTK.GTK4) {
+ GTK4.gtk_box_append(parent.handle, handle);
+ gtk_box_set_child_packing (parent.handle, handle, false, false, 0, GTK.GTK_PACK_START);
+ } else {
GTK.gtk_widget_show (handle);
GTK.gtk_widget_show (clientHandle);
if (labelHandle != 0)
GTK.gtk_widget_show (labelHandle);
if (boxHandle != 0)
GTK.gtk_widget_show (boxHandle);
- GTK.gtk_container_add (parent.handle, handle);
+ GTK3.gtk_container_add (parent.handle, handle);
gtk_box_set_child_packing (parent.handle, handle, false, false, 0, GTK.GTK_PACK_START);
+ }
}
@Override
long windowProc (long handle, long user_data) {
switch ((int)user_data) {
case ACTIVATE_INVERSE: {
- expanded = GTK.gtk_expander_get_expanded (handle);
- parent.layoutItems (0, false);
+ parent.layoutItems();
return 0;
}
}
return super.windowProc (handle, user_data);
}
+
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ return 0;
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
index c5ba74de89..ff397b64ef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
@@ -19,6 +19,8 @@ import java.io.*;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class allow the user to navigate
@@ -108,11 +110,16 @@ String computeResultChooserDialog () {
fullPath = null;
if ((style & SWT.MULTI) != 0) {
long list = 0;
- if (uriMode) {
- list = GTK.gtk_file_chooser_get_uris (handle);
+ if (GTK.GTK4) {
+ list = GTK4.gtk_file_chooser_get_files(handle);
} else {
- list = GTK.gtk_file_chooser_get_filenames (handle);
+ if (uriMode) {
+ list = GTK3.gtk_file_chooser_get_uris (handle);
+ } else {
+ list = GTK3.gtk_file_chooser_get_filenames (handle);
+ }
}
+
int listLength = OS.g_slist_length (list);
fileNames = new String [listLength];
long current = list;
@@ -121,8 +128,16 @@ String computeResultChooserDialog () {
long name = OS.g_slist_data (current);
long utf8Ptr = 0;
if (uriMode) {
- utf8Ptr = name;
+ if (GTK.GTK4) {
+ utf8Ptr = OS.g_file_get_uri(name);
+ } else {
+ utf8Ptr = name;
+ }
} else {
+ if (GTK.GTK4) {
+ name = OS.g_file_get_path(name);
+ }
+
utf8Ptr = OS.g_filename_to_utf8 (name, -1, null, null, null);
if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (name);
}
@@ -151,9 +166,21 @@ String computeResultChooserDialog () {
} else {
long utf8Ptr = 0;
if (uriMode) {
- utf8Ptr = GTK.gtk_file_chooser_get_uri (handle);
+ if (GTK.GTK4) {
+ long file = GTK4.gtk_file_chooser_get_file(handle);
+ utf8Ptr = OS.g_file_get_uri(file);
+ } else {
+ utf8Ptr = GTK3.gtk_file_chooser_get_uri (handle);
+ }
} else {
- long path = GTK.gtk_file_chooser_get_filename (handle);
+ long path;
+ if (GTK.GTK4) {
+ long file = GTK4.gtk_file_chooser_get_file(handle);
+ path = OS.g_file_get_path(file);
+ } else {
+ path = GTK3.gtk_file_chooser_get_filename (handle);
+ }
+
if (path != 0) {
utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null);
if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (path);
@@ -301,11 +328,7 @@ public boolean getOverwrite () {
* </ul>
*/
public String open () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- return openNativeChooserDialog();
- } else {
- return openChooserDialog();
- }
+ return openNativeChooserDialog();
}
/**
* Open the file chooser dialog using the GtkFileChooserNative API (GTK3.20+) for running applications
@@ -316,16 +339,16 @@ public String open () {
* @return a string describing the absolute path of the first selected file, or null
*/
String openNativeChooserDialog () {
- assert GTK.GTK_VERSION >= OS.VERSION(3, 20, 0);
byte [] titleBytes = Converter.wcsToMbcs (title, true);
int action = (style & SWT.SAVE) != 0 ? GTK.GTK_FILE_CHOOSER_ACTION_SAVE : GTK.GTK_FILE_CHOOSER_ACTION_OPEN;
- long shellHandle = parent.topHandle ();
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
+ long shellHandle = parent.topHandle();
+ Display display = parent != null ? parent.getDisplay (): Display.getCurrent();
handle = GTK.gtk_file_chooser_native_new(titleBytes, shellHandle, action, null, null);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- if (uriMode) {
- GTK.gtk_file_chooser_set_local_only (handle, false);
+ if (uriMode && !GTK.GTK4) {
+ // GTK4 file chooser works on GFiles and does not need to worry about this
+ GTK3.gtk_file_chooser_set_local_only (handle, false);
}
presetChooserDialog ();
display.addIdleProc ();
@@ -336,87 +359,28 @@ String openNativeChooserDialog () {
signalId = OS.g_signal_lookup (OS.map, GTK.GTK_TYPE_WIDGET());
hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
}
- display.sendPreExternalEventDispatchEvent ();
- int response = 0;
- response = GTK.gtk_native_dialog_run(handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- display.sendPostExternalEventDispatchEvent ();
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- OS.g_signal_remove_emission_hook (signalId, hookId);
- }
- if (response == GTK.GTK_RESPONSE_ACCEPT) {
- answer = computeResultChooserDialog ();
- }
- display.removeIdleProc ();
- return answer;
-}
-String openChooserDialog () {
- byte [] titleBytes = Converter.wcsToMbcs (title, true);
- int action = (style & SWT.SAVE) != 0 ?
- GTK.GTK_FILE_CHOOSER_ACTION_SAVE :
- GTK.GTK_FILE_CHOOSER_ACTION_OPEN;
- long shellHandle = parent.topHandle ();
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- if (display.getDismissalAlignment() == SWT.RIGHT) {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, 0);
+
+ int response;
+ if (GTK.GTK4) {
+ response = SyncDialogUtil.run(display, handle, true);
} else {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, 0);
- }
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_window_set_modal (handle, true);
- long group = GTK.gtk_window_get_group(0);
- GTK.gtk_window_group_add_window (group, handle);
- long pixbufs = GTK.gtk_window_get_icon_list (shellHandle);
- if (pixbufs != 0) {
- GTK.gtk_window_set_icon_list (handle, pixbufs);
- OS.g_list_free (pixbufs);
- }
- if (uriMode) {
- GTK.gtk_file_chooser_set_local_only (handle, false);
- }
- presetChooserDialog ();
- display.addIdleProc ();
- String answer = null;
- Dialog oldModal = null;
- if (GTK.gtk_window_get_modal (handle)) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
- }
- int signalId = 0;
- long hookId = 0;
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- signalId = OS.g_signal_lookup (OS.map, GTK.GTK_TYPE_WIDGET());
- hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
+ display.externalEventLoop = true;
+ display.sendPreExternalEventDispatchEvent ();
+ response = GTK3.gtk_native_dialog_run(handle);
+ display.externalEventLoop = false;
+ display.sendPostExternalEventDispatchEvent ();
}
- display.sendPreExternalEventDispatchEvent ();
- int response = GTK.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- display.sendPostExternalEventDispatchEvent ();
+
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
OS.g_signal_remove_emission_hook (signalId, hookId);
}
- if (GTK.gtk_window_get_modal (handle)) {
- display.setModalDialog (oldModal);
- }
- if (response == GTK.GTK_RESPONSE_OK) {
+ if (response == GTK.GTK_RESPONSE_ACCEPT) {
answer = computeResultChooserDialog ();
}
display.removeIdleProc ();
- GTK.gtk_widget_destroy (handle);
return answer;
}
+
void presetChooserDialog () {
/* MULTI is only valid if the native dialog's action is Open */
if ((style & (SWT.SAVE | SWT.MULTI)) == SWT.MULTI) {
@@ -431,7 +395,15 @@ void presetChooserDialog () {
if (filterPath.length () > 0) {
if (uriMode) {
byte [] buffer = Converter.wcsToMbcs (filterPath, true);
- GTK.gtk_file_chooser_set_current_folder_uri (handle, buffer);
+
+ if (GTK.GTK4) {
+ long file = OS.g_file_new_for_uri(buffer);
+ GTK4.gtk_file_chooser_set_current_folder (handle, file, 0);
+ OS.g_object_unref(file);
+ } else {
+ GTK3.gtk_file_chooser_set_current_folder_uri (handle, buffer);
+ }
+
} else {
/* filename must be a full path */
byte [] buffer = Converter.wcsToMbcs (SEPARATOR + filterPath, true);
@@ -442,7 +414,13 @@ void presetChooserDialog () {
*/
long ptr = OS.realpath (buffer, null);
if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
+ if (GTK.GTK4) {
+ long file = OS.g_file_new_for_path(buffer);
+ GTK4.gtk_file_chooser_set_current_folder (handle, file, 0);
+ OS.g_object_unref(file);
+ } else {
+ GTK3.gtk_file_chooser_set_current_folder (handle, ptr);
+ }
OS.g_free (ptr);
}
}
@@ -490,29 +468,52 @@ void presetChooserDialog () {
stringBuilder.append(fileName);
}
byte [] buffer = Converter.wcsToMbcs (stringBuilder.toString(), true);
- if (uriMode) {
- GTK.gtk_file_chooser_set_uri (handle, buffer);
- } else {
- /*
- * in GTK version 2.10, gtk_file_chooser_set_current_folder requires path
- * to be true canonical path. So using realpath to convert the path to
- * true canonical path.
- */
- long ptr = OS.realpath (buffer, null);
- if (ptr != 0) {
+
+ if (GTK.GTK4) {
+ long file;
+ if (uriMode) {
+ file = OS.g_file_new_for_uri(buffer);
+ GTK4.gtk_file_chooser_set_file (handle, file, 0);
+ } else {
+ file = OS.g_file_new_for_path(buffer);
+
if (fileName.length() > 0) {
- GTK.gtk_file_chooser_set_filename (handle, ptr);
+ GTK4.gtk_file_chooser_set_file (handle, file, 0);
} else {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
+ GTK4.gtk_file_chooser_set_current_folder (handle, file, 0);
+ }
+ }
+
+ OS.g_object_unref(file);
+ } else {
+ if (uriMode) {
+ GTK3.gtk_file_chooser_set_uri (handle, buffer);
+ } else {
+ /*
+ * in GTK version 2.10, gtk_file_chooser_set_current_folder requires path
+ * to be true canonical path. So using realpath to convert the path to
+ * true canonical path.
+ */
+ long ptr = OS.realpath (buffer, null);
+ if (ptr != 0) {
+ if (fileName.length() > 0) {
+ GTK3.gtk_file_chooser_set_filename (handle, ptr);
+ } else {
+ GTK3.gtk_file_chooser_set_current_folder (handle, ptr);
+ }
+ OS.g_free (ptr);
}
- OS.g_free (ptr);
}
}
}
/* Set overwrite mode */
if ((style & SWT.SAVE) != 0) {
- GTK.gtk_file_chooser_set_do_overwrite_confirmation (handle, overwrite);
+ if (GTK.GTK4) {
+ // TODO: GTK4 does not this property for the file chooser, not sure what the default behavior is. Must test before trying an alternative.
+ } else {
+ GTK3.gtk_file_chooser_set_do_overwrite_confirmation (handle, overwrite);
+ }
}
/* Set the extension filters */
@@ -672,6 +673,11 @@ public void setFilterPath (String string) {
* Sets the flag that the dialog will use to
* determine whether to prompt the user for file
* overwrite if the selected file already exists.
+ * <p>
+ * Note: On some platforms where suppressing the overwrite prompt
+ * is not supported, the prompt is shown even when invoked with
+ * overwrite false.
+ * </p>
*
* @param overwrite true if the dialog will prompt for file overwrite, false otherwise
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java
index f2e5665708..1a26b29ab0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class allow the user to select a font
@@ -155,56 +157,61 @@ public RGB getRGB () {
* </ul>
*/
public FontData open () {
- long handle;
- byte [] titleBytes;
- titleBytes = Converter.wcsToMbcs (title, true);
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- handle = GTK.gtk_font_chooser_dialog_new (titleBytes, 0);
- if (parent!=null) {
- long shellHandle = parent.topHandle ();
+ byte[] titleBytes = Converter.javaStringToCString(title);
+ Display display = parent != null ? parent.getDisplay(): Display.getCurrent();
+ long handle = GTK.gtk_font_chooser_dialog_new (titleBytes, 0);
+
+ if (parent != null) {
+ long shellHandle = parent.topHandle();
GTK.gtk_window_set_transient_for(handle, shellHandle);
}
- long group = GTK.gtk_window_get_group(0);
- GTK.gtk_window_group_add_window (group, handle);
- GTK.gtk_window_set_modal (handle, true);
+
+ long defaultWindowGroup = GTK.gtk_window_get_group(0);
+ GTK.gtk_window_group_add_window(defaultWindowGroup, handle);
+ GTK.gtk_window_set_modal(handle, true);
+
+ display.addIdleProc();
+ Dialog oldModal = display.getModalDialog();
+ display.setModalDialog(this);
+
+ // Set font chooser dialog to current font
if (fontData != null) {
- Font font = new Font (display, fontData);
- long fontName = OS.pango_font_description_to_string (font.handle);
- int length = C.strlen (fontName);
- byte [] buffer = new byte [length + 1];
- C.memmove (buffer, fontName, length);
+ Font font = new Font(display, fontData);
+
+ long fontName = OS.pango_font_description_to_string(font.handle);
+ int length = C.strlen(fontName);
+ byte[] buffer = new byte[length + 1];
+ C.memmove(buffer, fontName, length);
font.dispose();
- OS.g_free (fontName);
- GTK.gtk_font_chooser_set_font (handle, buffer);
- }
- display.addIdleProc ();
- Dialog oldModal = null;
- if (GTK.gtk_window_get_modal (handle)) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
+ OS.g_free(fontName);
+
+ GTK.gtk_font_chooser_set_font(handle, buffer);
}
+
int signalId = 0;
long hookId = 0;
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- signalId = OS.g_signal_lookup (OS.map, GTK.GTK_TYPE_WIDGET());
- hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
+ signalId = OS.g_signal_lookup(OS.map, GTK.GTK_TYPE_WIDGET());
+ hookId = OS.g_signal_add_emission_hook(signalId, 0, display.emissionProc, handle, 0);
}
- display.sendPreExternalEventDispatchEvent ();
- int response = GTK.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- display.sendPostExternalEventDispatchEvent ();
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- OS.g_signal_remove_emission_hook (signalId, hookId);
+
+ int response;
+ if (GTK.GTK4) {
+ response = SyncDialogUtil.run(display, handle, false);
+ } else {
+ display.externalEventLoop = true;
+ display.sendPreExternalEventDispatchEvent();
+ response = GTK3.gtk_dialog_run(handle);
+ display.externalEventLoop = false;
+ display.sendPostExternalEventDispatchEvent();
}
- if (GTK.gtk_window_get_modal (handle)) {
- display.setModalDialog (oldModal);
+
+ if ((style & SWT.RIGHT_TO_LEFT) != 0) {
+ OS.g_signal_remove_emission_hook(signalId, hookId);
}
+
+ display.setModalDialog(oldModal);
+
boolean success = response == GTK.GTK_RESPONSE_OK;
if (success) {
long fontName = GTK.gtk_font_chooser_get_font (handle);
@@ -216,10 +223,18 @@ public FontData open () {
Font font = Font.gtk_new (display, fontDesc);
fontData = font.getFontData () [0];
OS.pango_font_description_free (fontDesc);
+ } else {
+ fontData = null;
}
+
display.removeIdleProc ();
- GTK.gtk_widget_destroy(handle);
- if (!success) return null;
+
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(handle);
+ } else {
+ GTK3.gtk_widget_destroy(handle);
+ }
+
return fontData;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
index 4b984feb7e..7e20a4986a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class provide an etched border
@@ -152,30 +154,16 @@ Rectangle getClientAreaInPixels () {
@Override
GdkRGBA getContextColorGdkRGBA () {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- if (foreground != null) {
- return foreground;
- } else {
- return display.COLOR_WIDGET_FOREGROUND_RGBA;
- }
+ if (foreground != null) {
+ return foreground;
} else {
- return super.getContextColorGdkRGBA();
+ return display.COLOR_WIDGET_FOREGROUND_RGBA;
}
}
@Override
GdkRGBA getContextBackgroundGdkRGBA () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- return super.getContextBackgroundGdkRGBA();
- } else {
- long context = GTK.gtk_widget_get_style_context (fixedHandle);
- GdkRGBA rgba = new GdkRGBA ();
- GTK.gtk_style_context_get_background_color (context, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- if ((state & BACKGROUND) == 0) {
- return defaultBackground();
- }
- return rgba;
- }
+ return super.getContextBackgroundGdkRGBA();
}
@Override
@@ -184,14 +172,13 @@ void createHandle(int index) {
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
+ if (!GTK.GTK4) GTK3.gtk_widget_set_has_window(fixedHandle, true);
handle = GTK.gtk_frame_new (null);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
labelHandle = GTK.gtk_label_new (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- OS.g_object_ref (labelHandle);
OS.g_object_ref_sink (labelHandle);
clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
@@ -201,22 +188,29 @@ void createHandle(int index) {
* it can listen to events (clicking/tooltip etc.) and so that
* background can be drawn on it.
*/
- gtk_widget_set_has_surface_or_window (clientHandle, true);
+ if (!GTK.GTK4) GTK3.gtk_widget_set_has_window(clientHandle, true);
- GTK.gtk_container_add (fixedHandle, handle);
- GTK.gtk_container_add (handle, clientHandle);
- if ((style & SWT.SHADOW_IN) != 0) {
- GTK.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_IN);
- }
- if ((style & SWT.SHADOW_OUT) != 0) {
- GTK.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_OUT);
- }
- if ((style & SWT.SHADOW_ETCHED_IN) != 0) {
- GTK.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_ETCHED_IN);
- }
- if ((style & SWT.SHADOW_ETCHED_OUT) != 0) {
- GTK.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_ETCHED_OUT);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ GTK4.gtk_frame_set_child(handle, clientHandle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, handle);
+ GTK3.gtk_container_add (handle, clientHandle);
+
+ if ((style & SWT.SHADOW_IN) != 0) {
+ GTK3.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_IN);
+ }
+ if ((style & SWT.SHADOW_OUT) != 0) {
+ GTK3.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_OUT);
+ }
+ if ((style & SWT.SHADOW_ETCHED_IN) != 0) {
+ GTK3.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_ETCHED_IN);
+ }
+ if ((style & SWT.SHADOW_ETCHED_OUT) != 0) {
+ GTK3.gtk_frame_set_shadow_type (handle, GTK.GTK_SHADOW_ETCHED_OUT);
+ }
}
+
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
// reset to default font to get the usual behavior
setFontDescription (defaultFont ().handle);
@@ -323,15 +317,6 @@ void releaseWidget () {
}
@Override
-void setBackgroundGdkRGBA(long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
- super.setBackgroundGdkRGBA(handle, rgba);
- } else {
- super.setBackgroundGdkRGBA(fixedHandle, rgba);
- }
-}
-
-@Override
void setFontDescription (long font) {
super.setFontDescription (font);
setFontDescription (labelHandle, font);
@@ -339,10 +324,6 @@ void setFontDescription (long font) {
@Override
void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION < OS.VERSION(3, 14, 0)) {
- super.setForegroundGdkRGBA(handle, rgba);
- return;
- }
/*
* When using CSS, setting the foreground color on an empty label
* widget prevents the background from being set. If a user wants
@@ -412,7 +393,7 @@ public void setText (String string) {
GTK.gtk_frame_set_label_widget (handle, 0);
}
// Set the foreground now that the text has been set
- if (GTK.GTK_VERSION >= OS.VERSION (3, 16, 0) && foreground != null) {
+ if (foreground != null) {
setForegroundGdkRGBA (labelHandle, foreground);
}
}
@@ -438,30 +419,22 @@ int setBounds(int x, int y, int width, int height, boolean move, boolean resize)
* elements which we cannot access. If the to-be-allocated size minus
* these elements is < 0, allocate the preferred size instead.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- width = (width - (requisition.width - width)) < 0 ? requisition.width : width;
- height = (height - (requisition.height - height)) < 0 ? requisition.height : height;
- } else {
- width = Math.max(requisition.width, width);
- }
+ width = (width - (requisition.width - width)) < 0 ? requisition.width : width;
+ height = (height - (requisition.height - height)) < 0 ? requisition.height : height;
return super.setBounds(x, y, width, height, move, resize);
}
@Override
long paintHandle() {
- if (GTK.GTK_VERSION < OS.VERSION(3, 14, 0)) {
- return super.paintHandle();
- } else {
- if (GTK.GTK4) return clientHandle;
- long topHandle = topHandle ();
- /* we draw all our children on the clientHandle*/
- long paintHandle = clientHandle;
- while (paintHandle != topHandle) {
- if (gtk_widget_get_has_surface_or_window (paintHandle)) break;
- paintHandle = GTK.gtk_widget_get_parent (paintHandle);
- }
- return paintHandle;
+ if (GTK.GTK4) return clientHandle;
+ long topHandle = topHandle ();
+ /* we draw all our children on the clientHandle*/
+ long paintHandle = clientHandle;
+ while (paintHandle != topHandle) {
+ if (GTK3.gtk_widget_get_has_window(paintHandle)) break;
+ paintHandle = GTK.gtk_widget_get_parent (paintHandle);
}
+ return paintHandle;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java
index e7ff12acdf..1a6facaa40 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java
@@ -100,6 +100,7 @@ void createWidget () {
/**
* Returns the offset of the caret from the start of the document.
+ * -1 means that there is currently no active composition.
* The caret is within the current composition.
*
* @return the caret offset
@@ -301,6 +302,19 @@ long gtk_preedit_changed (long imcontext) {
byte [] buffer = new byte [length];
C.memmove (buffer, preeditString [0], length);
chars = Converter.mbcsToWcs (buffer);
+
+ /*
+ * Bug 571740: GTK has a bug in 'gtk-im-context-simple' IM context
+ * which is default. It incorrectly reports 'cursorPos' in bytes
+ * instead of characters. Somewhere around GTK 3.24.26 this IM
+ * was reworked and it started sending 'gtk_preedit_changed' where
+ * it previously did not, causing SWT to step on that old bug.
+ * If caret's position is already at the end, this will result in
+ * trying to set caret outside the text. The workaround is to limit
+ * caret's position.
+ */
+ caretOffset = Math.min(caretOffset, chars.length);
+
if (pangoAttrs [0] != 0) {
int count = 0;
long iterator = OS.pango_attr_list_get_iterator (pangoAttrs [0]);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
index 148a145f39..ed2eb59080 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.accessibility.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a non-selectable
@@ -54,7 +56,6 @@ import org.eclipse.swt.internal.gtk.*;
*/
public class Label extends Control {
long frameHandle, labelHandle, imageHandle, boxHandle;
- ImageList imageList;
Image image;
String text;
@@ -207,6 +208,7 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
long lang = OS.pango_context_get_language (context);
long font = getFontDescription ();
long metrics = OS.pango_context_get_metrics (context, font, lang);
+ OS.pango_font_description_free (font);
int ascent = OS.PANGO_PIXELS (OS.pango_font_metrics_get_ascent (metrics));
int descent = OS.PANGO_PIXELS (OS.pango_font_metrics_get_descent (metrics));
OS.pango_font_metrics_unref (metrics);
@@ -228,44 +230,55 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
@Override
void createHandle (int index) {
state |= HANDLE | THEME_BACKGROUND;
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
+
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ if (!GTK.GTK4) GTK3.gtk_widget_set_has_window(fixedHandle, true);
+
if ((style & SWT.SEPARATOR) != 0) {
if ((style & SWT.HORIZONTAL)!= 0) {
handle = GTK.gtk_separator_new (GTK.GTK_ORIENTATION_HORIZONTAL);
- if (handle != 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if (handle != 0) {
GTK.gtk_widget_set_valign(handle, GTK.GTK_ALIGN_CENTER);
}
} else {
handle = GTK.gtk_separator_new (GTK.GTK_ORIENTATION_VERTICAL);
- if (handle != 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if (handle != 0) {
GTK.gtk_widget_set_halign(handle, GTK.GTK_ALIGN_CENTER);
}
}
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
} else {
if (GTK.GTK4) {
- handle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 0);
- } else {
- handle = GTK.gtk_event_box_new();
- boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 0);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- }
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- labelHandle = GTK.gtk_label_new_with_mnemonic (null);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- if (GTK.GTK4) {
- GTK.gtk_container_add (handle, labelHandle);
- GTK.gtk_container_add (handle, imageHandle);
+ handle = gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, false, 0);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ labelHandle = GTK.gtk_label_new_with_mnemonic(null);
+ if (labelHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ imageHandle = GTK4.gtk_picture_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK4.gtk_box_append(handle, labelHandle);
+ GTK4.gtk_box_append(handle, imageHandle);
gtk_box_set_child_packing(handle, labelHandle, true, true, 0, GTK.GTK_PACK_START);
gtk_box_set_child_packing(handle, imageHandle, true, true, 0, GTK.GTK_PACK_START);
} else {
- GTK.gtk_container_add (handle, boxHandle);
- GTK.gtk_container_add (boxHandle, labelHandle);
- GTK.gtk_container_add (boxHandle, imageHandle);
+ handle = GTK3.gtk_event_box_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ boxHandle = gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, false, 0);
+ if (boxHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ labelHandle = GTK.gtk_label_new_with_mnemonic(null);
+ if (labelHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ imageHandle = GTK.gtk_image_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK3.gtk_container_add(handle, boxHandle);
+ GTK3.gtk_container_add(boxHandle, labelHandle);
+ GTK3.gtk_container_add(boxHandle, imageHandle);
gtk_box_set_child_packing(boxHandle, labelHandle, true, true, 0, GTK.GTK_PACK_START);
gtk_box_set_child_packing(boxHandle, imageHandle, true, true, 0, GTK.GTK_PACK_START);
}
@@ -273,16 +286,30 @@ void createHandle (int index) {
if ((style & SWT.BORDER) != 0) {
frameHandle = GTK.gtk_frame_new (null);
if (frameHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, frameHandle);
- GTK.gtk_container_add (frameHandle, handle);
- GTK.gtk_frame_set_shadow_type (frameHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, frameHandle);
+ GTK4.gtk_frame_set_child(frameHandle, handle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, frameHandle);
+ GTK3.gtk_container_add (frameHandle, handle);
+ GTK3.gtk_frame_set_shadow_type (frameHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ }
} else {
- GTK.gtk_container_add (fixedHandle, handle);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, handle);
+ }
}
if ((style & SWT.SEPARATOR) != 0) return;
if ((style & SWT.WRAP) != 0) {
- GTK.gtk_label_set_line_wrap (labelHandle, true);
- GTK.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ if (GTK.GTK4) {
+ GTK4.gtk_label_set_wrap(labelHandle, true);
+ GTK4.gtk_label_set_wrap_mode(labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ } else {
+ GTK3.gtk_label_set_line_wrap (labelHandle, true);
+ GTK3.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ }
}
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
// reset to default font to get the usual behavior
@@ -449,8 +476,6 @@ void releaseHandle () {
@Override
void releaseWidget () {
super.releaseWidget ();
- if (imageList != null) imageList.dispose ();
- imageList = null;
image = null;
text = null;
}
@@ -489,39 +514,24 @@ public void setAlignment (int alignment) {
void setAlignment () {
if ((style & SWT.LEFT) != 0) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- gtk_widget_set_align(labelHandle,GTK.GTK_ALIGN_START, GTK.GTK_ALIGN_START); //Aligns widget
- gtk_label_set_align (0.0f, 0.0f); //Aligns text inside the widget.
- gtk_widget_set_align(imageHandle, GTK.GTK_ALIGN_START, GTK.GTK_ALIGN_CENTER);
- } else {
- GTK.gtk_misc_set_alignment (labelHandle, 0.0f, 0.0f);
- GTK.gtk_misc_set_alignment (imageHandle, 0.0f, 0.5f);
- }
+ gtk_widget_set_align(labelHandle,GTK.GTK_ALIGN_START, GTK.GTK_ALIGN_START); //Aligns widget
+ gtk_label_set_align (0.0f, 0.0f); //Aligns text inside the widget.
+ gtk_widget_set_align(imageHandle, GTK.GTK_ALIGN_START, GTK.GTK_ALIGN_CENTER);
GTK.gtk_label_set_justify (labelHandle, GTK.GTK_JUSTIFY_LEFT);
return;
}
if ((style & SWT.CENTER) != 0) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- gtk_widget_set_align(labelHandle,GTK.GTK_ALIGN_CENTER, GTK.GTK_ALIGN_START); //Aligns widget
- gtk_label_set_align (0.5f, 0.0f); //Aligns text inside the widget.
- gtk_widget_set_align(imageHandle, GTK.GTK_ALIGN_CENTER, GTK.GTK_ALIGN_CENTER);
- } else {
- GTK.gtk_misc_set_alignment (labelHandle, 0.5f, 0.0f);
- GTK.gtk_misc_set_alignment (imageHandle, 0.5f, 0.5f);
- }
+ gtk_widget_set_align(labelHandle,GTK.GTK_ALIGN_CENTER, GTK.GTK_ALIGN_START); //Aligns widget
+ gtk_label_set_align (0.5f, 0.0f); //Aligns text inside the widget.
+ gtk_widget_set_align(imageHandle, GTK.GTK_ALIGN_CENTER, GTK.GTK_ALIGN_CENTER);
GTK.gtk_label_set_justify (labelHandle, GTK.GTK_JUSTIFY_CENTER);
return;
}
if ((style & SWT.RIGHT) != 0) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
- gtk_widget_set_align(labelHandle,GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_START); //Aligns widget.
- gtk_label_set_align (1.0f, 0.0f); //Aligns text inside the widget.
- gtk_widget_set_align(imageHandle, GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_CENTER);
- } else {
- GTK.gtk_misc_set_alignment (labelHandle, 1.0f, 0.0f);
- GTK.gtk_misc_set_alignment (imageHandle, 1.0f, 0.5f);
- }
+ gtk_widget_set_align(labelHandle,GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_START); //Aligns widget.
+ gtk_label_set_align (1.0f, 0.0f); //Aligns text inside the widget.
+ gtk_widget_set_align(imageHandle, GTK.GTK_ALIGN_END, GTK.GTK_ALIGN_CENTER);
GTK.gtk_label_set_justify (labelHandle, GTK.GTK_JUSTIFY_RIGHT);
return;
}
@@ -575,7 +585,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
GTK.gtk_widget_get_allocation(labelHandle, allocation);
allocation.width = labelWidth;
allocation.height = labelHeight;
- GTK.gtk_widget_size_allocate (labelHandle, allocation);
+ gtk_widget_size_allocate(labelHandle, allocation, -1);
}
return result;
}
@@ -584,15 +594,16 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
void setFontDescription (long font) {
super.setFontDescription (font);
if (labelHandle != 0) setFontDescription (labelHandle, font);
- if (imageHandle != 0) setFontDescription (imageHandle, font);
- // Bug 445801: Work around for computeSize not returning a different value after
- // changing font, see https://bugzilla.gnome.org/show_bug.cgi?id=753116
- // This updates the pango context and also clears the size request cache on the GTK side.
- int originalDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
- int tempDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_LTR : GTK.GTK_TEXT_DIR_RTL;
- GTK.gtk_widget_set_direction (labelHandle, tempDirection);
- GTK.gtk_widget_set_direction (labelHandle, originalDirection);
+ if (labelHandle != 0) {
+ // Bug 445801: Work around for computeSize not returning a different value after
+ // changing font, see https://bugzilla.gnome.org/show_bug.cgi?id=753116
+ // This updates the pango context and also clears the size request cache on the GTK side.
+ int originalDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
+ int tempDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_LTR : GTK.GTK_TEXT_DIR_RTL;
+ GTK.gtk_widget_set_direction (labelHandle, tempDirection);
+ GTK.gtk_widget_set_direction (labelHandle, originalDirection);
+ }
}
@Override
@@ -634,17 +645,23 @@ public void setImage (Image image) {
}
if ((style & SWT.SEPARATOR) != 0) return;
this.image = image;
- if (imageList != null) imageList.dispose ();
- imageList = null;
if (image != null) {
- imageList = new ImageList ();
- int imageIndex = imageList.add (image);
- long pixbuf = imageList.getPixbuf (imageIndex);
- gtk_image_set_from_gicon (imageHandle, pixbuf);
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_picture_set_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, image.surface);
+ }
GTK.gtk_widget_hide (labelHandle);
GTK.gtk_widget_show (imageHandle);
} else {
- gtk_image_set_from_gicon (imageHandle, 0);
+ if (GTK.GTK4) {
+ GTK4.gtk_picture_set_paintable(imageHandle, 0);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, 0);
+ }
GTK.gtk_widget_show (labelHandle);
GTK.gtk_widget_hide (imageHandle);
}
@@ -695,12 +712,8 @@ public void setText (String string) {
@Override
void setWidgetBackground () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- GdkRGBA rgba = (state & BACKGROUND) != 0 ? getBackgroundGdkRGBA () : null;
- super.setBackgroundGdkRGBA (handle, rgba);
- } else {
- super.setWidgetBackground();
- }
+ GdkRGBA rgba = (state & BACKGROUND) != 0 ? getBackgroundGdkRGBA () : null;
+ super.setBackgroundGdkRGBA (handle, rgba);
}
@Override
@@ -728,4 +741,16 @@ long windowProc (long handle, long arg0, long user_data) {
}
return super.windowProc(handle, arg0, user_data);
}
+
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ return 0;
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
index 3147f53bd8..026138e2fb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
@@ -20,6 +20,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a selectable
@@ -50,6 +52,11 @@ public class Link extends Control {
Point selection;
String [] ids;
int [] mnemonics;
+
+ /**
+ * Index of the currently focused link in the text.
+ * Equals -1, if the text has not been set through setText
+ */
int focusIndex;
static final RGB LINK_DISABLED_FOREGROUND = new RGB (172, 168, 153);
@@ -148,12 +155,18 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
@Override
void createHandle(int index) {
state |= HANDLE | THEME_BACKGROUND;
- handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (handle, true);
- GTK.gtk_widget_set_can_focus (handle, true);
+
+ handle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ GTK4.gtk_widget_set_focusable(handle, true);
+ } else {
+ GTK3.gtk_widget_set_has_window(handle, true);
+ }
+ GTK.gtk_widget_set_can_focus(handle, true);
+
layout = new TextLayout (display);
- disabledColor = new Color (display, LINK_DISABLED_FOREGROUND);
+ disabledColor = new Color (LINK_DISABLED_FOREGROUND);
offsets = new Point [0];
ids = new String [0];
mnemonics = new int [0];
@@ -204,6 +217,8 @@ void fixStyle () {
}
void initAccessible () {
+ if (GTK.GTK4) return;
+
Accessible accessible = getAccessible ();
accessible.addAccessibleListener (new AccessibleAdapter () {
@Override
@@ -330,13 +345,25 @@ public String getText () {
long gtk_button_press_event (long widget, long event) {
long result = super.gtk_button_press_event (widget, event);
if (result != 0) return result;
+
int eventType = GDK.gdk_event_get_event_type(event);
eventType = fixGdkEventTypeValues(eventType);
+
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(event);
+ } else {
+ GDK.gdk_event_get_button(event, eventButton);
+ }
+
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+ if (GTK.GTK4) {
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ }
+
if (eventButton[0] == 1 && eventType == GDK.GDK_BUTTON_PRESS) {
if (focusIndex != -1) setFocus ();
int x = (int) eventX[0];
@@ -376,11 +403,22 @@ long gtk_button_release_event (long widget, long event) {
long result = super.gtk_button_release_event (widget, event);
if (result != 0) return result;
if (focusIndex == -1) return result;
+
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(event);
+ } else {
+ GDK.gdk_event_get_button(event, eventButton);
+ }
+
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+ if (GTK.GTK4) {
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ }
+
if (eventButton[0] == 1) {
int x = (int) eventX[0];
int y = (int) eventY[0];
@@ -401,16 +439,14 @@ long gtk_button_release_event (long widget, long event) {
@Override
long gtk_draw (long widget, long cairo) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- long context = GTK.gtk_widget_get_style_context(widget);
- GtkAllocation allocation = new GtkAllocation();
- GTK.gtk_widget_get_allocation (widget, allocation);
- int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
- int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
- // We specify a 0 value for x & y as we want the whole widget to be
- // colored, not some portion of it.
- GTK.gtk_render_background(context, cairo, 0, 0, width, height);
- }
+ long context = GTK.gtk_widget_get_style_context(widget);
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation (widget, allocation);
+ int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+ int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
+ // We specify a 0 value for x & y as we want the whole widget to be
+ // colored, not some portion of it.
+ GTK.gtk_render_background(context, cairo, 0, 0, width, height);
return super.gtk_draw(widget, cairo);
}
@@ -427,12 +463,44 @@ long gtk_event_after (long widget, long gdkEvent) {
}
@Override
+boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) {
+ boolean handled = super.gtk4_key_press_event(controller, keyval, keycode, state, event);
+ if (!handled && focusIndex != -1) {
+ switch (keyval) {
+ case GDK.GDK_Return:
+ case GDK.GDK_KP_Enter:
+ case GDK.GDK_space:
+ Event jEvent = new Event();
+ jEvent.text = ids[focusIndex];
+ sendSelectionEvent(SWT.Selection, jEvent, true);
+ break;
+ case GDK.GDK_Tab:
+ if (focusIndex < offsets.length - 1) {
+ focusIndex++;
+ redraw();
+ }
+ break;
+ case GDK.GDK_ISO_Left_Tab:
+ if (focusIndex > 0) {
+ focusIndex--;
+ redraw();
+ }
+ break;
+ }
+ }
+
+ return handled;
+}
+
+@Override
long gtk_key_press_event (long widget, long eventPtr) {
long result = super.gtk_key_press_event (widget, eventPtr);
if (result != 0) return result;
if (focusIndex == -1) return result;
- int [] key = new int[1];
+
+ int [] key = new int [1];
GDK.gdk_event_get_keyval(eventPtr, key);
+
switch (key[0]) {
case GDK.GDK_Return:
case GDK.GDK_KP_Enter:
@@ -461,13 +529,22 @@ long gtk_key_press_event (long widget, long eventPtr) {
long gtk_motion_notify_event (long widget, long event) {
long result = super.gtk_motion_notify_event (widget, event);
if (result != 0) return result;
+
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+
+ int [] state = new int [1];
+ if (GTK.GTK4) {
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ GDK.gdk_event_get_state(event, state);
+ }
+
int x = (int) eventX[0];
int y = (int) eventY[0];
- int [] state = new int [1];
- GDK.gdk_event_get_state(event, state);
+
if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x;
if ((state[0] & GDK.GDK_BUTTON1_MASK) != 0) {
int oldSelection = selection.y;
@@ -543,7 +620,6 @@ void releaseWidget () {
if (layout != null) layout.dispose ();
layout = null;
linkColor = null;
- if (disabledColor != null) disabledColor.dispose ();
disabledColor = null;
offsets = null;
ids = null;
@@ -783,9 +859,9 @@ public void setLinkForeground (Color color) {
@Override
void setOrientation (boolean create) {
- super.setOrientation (create);
- layout.setOrientation (style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT));
- if (!create) redraw (true);
+ super.setOrientation (create);
+ layout.setOrientation (style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT));
+ if (!create) redraw (true);
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
index 11a1c48f47..a20c461366 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a selectable user interface
@@ -202,8 +204,13 @@ void createHandle (int index) {
state |= HANDLE;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
- scrolledHandle = GTK.gtk_scrolled_window_new (0, 0);
+
+ if (GTK.GTK4) {
+ scrolledHandle = GTK4.gtk_scrolled_window_new();
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ scrolledHandle = GTK3.gtk_scrolled_window_new (0, 0);
+ }
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
/*
* Columns:
@@ -222,8 +229,14 @@ void createHandle (int index) {
GTK.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.text, TEXT_COLUMN);
GTK.gtk_tree_view_column_set_min_width (columnHandle, 0);
GTK.gtk_tree_view_insert_column (handle, columnHandle, index);
- GTK.gtk_container_add (fixedHandle, scrolledHandle);
- GTK.gtk_container_add (scrolledHandle, handle);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, scrolledHandle);
+ GTK4.gtk_scrolled_window_set_child(scrolledHandle, handle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, scrolledHandle);
+ GTK3.gtk_container_add (scrolledHandle, handle);
+ }
int mode = (style & SWT.MULTI) != 0 ? GTK.GTK_SELECTION_MULTIPLE : GTK.GTK_SELECTION_BROWSE;
long selectionHandle = GTK.gtk_tree_view_get_selection (handle);
@@ -232,7 +245,13 @@ void createHandle (int index) {
int hsp = (style & SWT.H_SCROLL) != 0 ? GTK.GTK_POLICY_AUTOMATIC : GTK.GTK_POLICY_NEVER;
int vsp = (style & SWT.V_SCROLL) != 0 ? GTK.GTK_POLICY_AUTOMATIC : GTK.GTK_POLICY_NEVER;
GTK.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
- if ((style & SWT.BORDER) != 0) GTK.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ if ((style & SWT.BORDER) != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_scrolled_window_set_has_frame(scrolledHandle, true);
+ } else {
+ GTK3.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ }
+ }
/*
* Bug in GTK. When a treeview is the child of an override shell,
* and if the user has ever invokes the interactive search field,
@@ -266,11 +285,11 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
* So if the height is returned as zero calculate the table height
* based on the number of items in the table
*/
- if (size.y == 0 && hHint == SWT.DEFAULT) {
- size.y = getItemCount() * getItemHeightInPixels();
- }
+ if (size.y == 0 && hHint == SWT.DEFAULT) {
+ size.y = getItemCount() * getItemHeightInPixels();
+ }
- /*
+ /*
* In case the table doesn't contain any elements,
* getItemCount returns 0 and size.y will be 0
* so need to assign default height
@@ -531,32 +550,31 @@ public int getItemHeight () {
return DPIUtil.autoScaleDown(getItemHeightInPixels());
}
-int getItemHeightInPixels () {
+int getItemHeightInPixels() {
checkWidget();
- int itemCount = GTK.gtk_tree_model_iter_n_children (modelHandle, 0);
- long column = GTK.gtk_tree_view_get_column (handle, 0);
- if (itemCount == 0) {
- int [] w = new int [1], h = new int [1];
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
- int height = h [0];
- long textRenderer = getTextRenderer (column);
- if (textRenderer != 0) GTK.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null);
- height += h [0];
- return height;
- } else {
- int height = 0;
- long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- GTK.gtk_tree_model_get_iter_first (modelHandle, iter);
- GTK.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false);
- int [] w = new int [1], h = new int [1];
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
- long textRenderer = getTextRenderer (column);
- int [] ypad = new int[1];
- if (textRenderer != 0) GTK.gtk_cell_renderer_get_padding(textRenderer, null, ypad);
- height = h [0] + ypad [0];
- OS.g_free (iter);
- return height;
+
+ final int BASE_ITEM_PADDING = 1;
+
+ int[] h = new int [1];
+ long layout = GTK.gtk_widget_create_pango_layout(handle, Converter.wcsToMbcs(" ", true));
+ OS.pango_layout_get_pixel_size(layout, null, h);
+
+ // By default, the item has a base vertical padding around the text
+ int height = h[0] + BASE_ITEM_PADDING * 2;
+
+ OS.g_object_unref(layout);
+
+ long column = GTK.gtk_tree_view_get_column(handle, 0);
+ long textRenderer = getTextRenderer(column);
+ int [] ypad = new int[1];
+ if (textRenderer != 0) {
+ GTK.gtk_cell_renderer_get_padding(textRenderer, null, ypad);
}
+
+ // Add additional top & bottom padding set by the cell renderer
+ height += ypad [0] * 2;
+
+ return height;
}
/**
@@ -795,19 +813,26 @@ long gtk_button_press_event (long widget, long event) {
* in GTK in the case that additional items aren't being added (CTRL_MASK or SHIFT_MASK) and the item being dragged is already
* selected, we can give the DnD handling to MOTION-NOTIFY. See Bug 503431
*/
+ int eventType = GDK.gdk_event_get_event_type(event);
+
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
- int eventType = GDK.gdk_event_get_event_type(event);
- eventType = fixGdkEventTypeValues(eventType);
int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(event);
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ }
+
if ((state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect) &&
!OS.isX11() && eventType == GDK.GDK_BUTTON_PRESS) { // Wayland
// check to see if there is another event coming in that is not a double/triple click, this is to prevent Bug 514531
- long nextEvent = gdk_event_peek ();
+ long nextEvent = GDK.gdk_event_peek();
if (nextEvent == 0) {
long [] path = new long [1];
long selection = GTK.gtk_tree_view_get_selection (handle);
@@ -891,17 +916,14 @@ long gtk_button_press_event (long widget, long event) {
}
@Override
-long gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
- if (n_press == 1) return 0;
- long widget = GTK.gtk_event_controller_get_widget(gesture);
- long result = gtk_button_press_event (widget, event);
+void gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
+ if (n_press == 1) return;
+ super.gtk_gesture_press_event(gesture, n_press, x, y, event);
if (n_press == 2 && rowActivated) {
sendTreeDefaultSelection ();
rowActivated = false;
}
-
- return result;
}
@Override
@@ -913,8 +935,13 @@ long gtk_row_activated (long tree, long path, long column) {
@Override
long gtk_key_press_event (long widget, long event) {
- int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
+ int [] key = new int [1];
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ }
+
keyPressDefaultSelectionHandler (event, key[0]);
return super.gtk_key_press_event (widget, event);
}
@@ -922,15 +949,21 @@ long gtk_key_press_event (long widget, long event) {
@Override
long gtk_button_release_event (long widget, long event) {
int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+ if (GTK.GTK4) {
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_state(event, eventState);
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ }
+
long eventGdkResource = gdk_event_get_surface_or_window(event);
if (GTK.GTK4) {
if (eventGdkResource != gtk_widget_get_surface (handle)) return 0;
} else {
- if (eventGdkResource != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
+ if (eventGdkResource != GTK3.gtk_tree_view_get_bin_window (handle)) return 0;
}
/*
* Feature in GTK. In multi-select tree view there is a problem with using DnD operations while also selecting multiple items.
@@ -950,8 +983,8 @@ long gtk_button_release_event (long widget, long event) {
if ((eventState[0] & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) {
GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false);
}
- // Check to see if there has been a new tree item selected when holding Control in Path.
- // If not, deselect the item.
+ // Check to see if there has been a new tree item selected when holding Control in Path.
+ // If not, deselect the item.
if ((eventState[0] & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) {
GTK.gtk_tree_selection_unselect_path (selection,path[0]);
}
@@ -1084,7 +1117,7 @@ public boolean isSelected (int index) {
long paintWindow () {
GTK.gtk_widget_realize (handle);
// TODO: this function has been removed on GTK4
- return GTK.gtk_tree_view_get_bin_window (handle);
+ return GTK3.gtk_tree_view_get_bin_window (handle);
}
@Override
@@ -1509,12 +1542,8 @@ public void setItems (String... items) {
@Override
void setForegroundGdkRGBA (GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- GdkRGBA toSet = rgba == null ? display.COLOR_LIST_FOREGROUND_RGBA : rgba;
- setForegroundGdkRGBA (handle, toSet);
- } else {
- super.setForegroundGdkRGBA(rgba);
- }
+ GdkRGBA toSet = rgba == null ? display.COLOR_LIST_FOREGROUND_RGBA : rgba;
+ setForegroundGdkRGBA (handle, toSet);
}
/**
@@ -1682,9 +1711,6 @@ public void setTopIndex (int index) {
/*
* Feature in GTK: cache the GtkAdjustment value for future use in
* getTopIndex(). Set topIndex to index.
- *
- * Use gtk_tree_view_get_view_get_vadjustment for GTK2, GtkScrollable
- * doesn't exist on GTK2.
*/
long vAdjustment = GTK.gtk_scrollable_get_vadjustment (handle);
cachedAdjustment = GTK.gtk_adjustment_get_value (vAdjustment);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
index 190e45bb5e..dd896dfafb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
@@ -13,11 +13,15 @@
*******************************************************************************/
package org.eclipse.swt.widgets;
+import java.util.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are user interface objects that contain
@@ -46,9 +50,52 @@ public class Menu extends Widget {
boolean hasLocation;
MenuItem cascade, selectedItem;
Decorations parent;
- long imItem, imSeparator, imHandle;
ImageList imageList;
int poppedUpCount;
+ long menuHandle;
+
+ /** GTK4 only fields */
+ long modelHandle, actionGroup, shortcutController;
+
+ class Section {
+ LinkedList<MenuItem> sectionItems;
+ private MenuItem separator;
+ private long sectionHandle;
+
+ public Section() {
+ this.sectionItems = new LinkedList<>();
+ }
+
+ public Section(MenuItem separator) {
+ this();
+ this.separator = separator;
+ }
+
+ public Section(long sectionHandle) {
+ this();
+
+ this.sectionHandle = sectionHandle;
+ }
+
+ public long getSectionHandle() {
+ return sectionHandle != 0 ? sectionHandle : separator.modelHandle;
+ }
+
+ public int getItemPosition(MenuItem item) {
+ return sectionItems.indexOf(item);
+ }
+
+ public int getSectionSize() {
+ return sectionItems.size();
+ }
+
+ public int getSectionPosition() {
+ return items.indexOf(separator);
+ }
+ }
+
+ LinkedList<Section> sections;
+ LinkedList<MenuItem> items;
/**
* Constructs a new instance of this class given its parent,
@@ -217,6 +264,29 @@ boolean ableToSetLocation() {
void _setVisible (boolean visible) {
if (visible == GTK.gtk_widget_get_mapped (handle)) return;
if (visible) {
+ /*
+ * Feature in GTK. When a menu with no items is shown, GTK shows a
+ * weird small rectangle. For comparison, Windows API prevents showing
+ * empty menus on its own. At the same time, Eclipse creates menu items
+ * lazily in `SWT.Show`, so we can't know if menu is empty before
+ * `SWT.Show` is sent.
+ * Known solutions all have drawbacks:
+ * 1) Send `SWT.Show` here, instead of sending it when GtkMenu
+ * receives 'show' event (see gtk_show()). This allows us to test if
+ * menu has items before asking GTK to show it. The drawback is that
+ * when GTK fails to show menu (see Bug 564595), application still
+ * receives fake `SWT.Show` without a matching `SWT.Hide`.
+ * 2) Send SWT.Show` from gtk_show(). This solves drawback of (1).
+ * The new drawback is that empty menu will now show, because it's
+ * hard to stop menu from showing at this point.
+ * 3) Rework Eclipse (and possibly other SWT users) to stop depending
+ * on `SWT.Show` and use some other event for lazy init. This will
+ * allow to know if menu is empty in advance. This sounds like the
+ * best solution, because it solves core problem: empty menus
+ * shouldn't try to show. The drawback is that it will be a breaking
+ * change.
+ * Solution (1) has been there since 2002-05-29.
+ */
sendEvent (SWT.Show);
if (getItemCount () != 0) {
/*
@@ -226,7 +296,13 @@ void _setVisible (boolean visible) {
* when it is being shown in an ON_TOP shell.
*/
if ((parent._getShell ().style & SWT.ON_TOP) != 0) {
- GTK.gtk_menu_shell_set_take_focus (handle, false);
+ if (GTK.GTK4) {
+ /* TODO: Behavior of menu is unknown at the moment. After compilation
+ * testing will be done to see if this type of fix is required.
+ */
+ } else {
+ GTK3.gtk_menu_shell_set_take_focus (handle, false);
+ }
}
if (GTK.GTK_VERSION < OS.VERSION(3, 22, 0)) {
long address = 0;
@@ -241,8 +317,8 @@ void _setVisible (boolean visible) {
*/
TrayItem item = display.currentTrayItem;
if (item != null && !item.isDisposed()) {
- data = item.handle;
- address = GTK.gtk_status_icon_position_menu_func ();
+ data = item.handle;
+ address = GTK.gtk_status_icon_position_menu_func ();
}
/*
* Bug in GTK. The timestamp passed into gtk_menu_popup is used
@@ -250,80 +326,86 @@ void _setVisible (boolean visible) {
* will fail. The fix is to ensure that the timestamp of the last
* event processed is used.
*/
- GTK.gtk_menu_popup (handle, 0, 0, address, data, 0, display.getLastEventTime ());
+ GTK3.gtk_menu_popup (handle, 0, 0, address, data, 0, display.getLastEventTime ());
} else {
long eventPtr = 0;
if (ableToSetLocation()) {
- // Create the GdkEvent manually as we need to control
- // certain fields like the event window
- eventPtr = GDK.gdk_event_new(GTK.GTK4 ? GDK.GDK4_BUTTON_PRESS : GDK.GDK_BUTTON_PRESS);
- GdkEventButton event = new GdkEventButton ();
- event.type = GTK.GTK4 ? GDK.GDK4_BUTTON_PRESS : GDK.GDK_BUTTON_PRESS;
- event.device = GDK.gdk_get_pointer(GDK.gdk_display_get_default());
- event.time = display.getLastEventTime();
-
- // Create the rectangle relative to the parent (in this case, global) GdkWindow
- GdkRectangle rect = new GdkRectangle();
- if (OS.isX11()) {
- // Get and (add reference to) the global GdkWindow/GdkSurface
- event.window = GDK.gdk_display_get_default_group(GDK.gdk_display_get_default());
- OS.g_object_ref(event.window);
- OS.memmove (eventPtr, event, GdkEventButton.sizeof);
- /*
- * Get the origin of the global GdkWindow/GdkSurface to calculate the size of any offsets
- * such as client side decorations, or the system tray.
- */
- int [] globalWindowOriginY = new int [1];
- int [] globalWindowOriginX = new int [1];
- if (GTK.GTK4) {
- GDK.gdk_surface_get_origin (event.window, globalWindowOriginX, globalWindowOriginY);
- } else {
- GDK.gdk_window_get_origin (event.window, globalWindowOriginX, globalWindowOriginY);
- }
- rect.x = this.x - globalWindowOriginX[0];
- rect.y = this.y - globalWindowOriginY[0];
+ if (GTK.GTK4) {
+ GdkRectangle popoverPosition = new GdkRectangle();
+ popoverPosition.x = x;
+ popoverPosition.y = y;
+ popoverPosition.width = popoverPosition.height = 1;
+ GTK.gtk_popover_set_pointing_to(handle, popoverPosition);
+
+ GTK.gtk_popover_popup(handle);
} else {
- // On Wayland, get the relative GdkWindow from the parent shell.
- long gdkResource;
- if (GTK.GTK4) {
- gdkResource = GTK.gtk_widget_get_surface (getShell().topHandle());
+ // Create the GdkEvent manually as we need to control
+ // certain fields like the event window
+ eventPtr = GDK.gdk_event_new(GDK.GDK_BUTTON_PRESS);
+ GdkEventButton event = new GdkEventButton();
+ event.type = GDK.GDK_BUTTON_PRESS;
+ event.device = GDK.gdk_get_pointer(GDK.gdk_display_get_default());
+ event.time = display.getLastEventTime();
+
+ // Create the rectangle relative to the parent (in this case, global) GdkWindow
+ GdkRectangle rect = new GdkRectangle();
+ if (OS.isX11()) {
+ // Get and (add reference to) the global GdkWindow/GdkSurface
+ event.window = GDK.gdk_display_get_default_group(GDK.gdk_display_get_default());
+ OS.g_object_ref(event.window);
+ GTK3.memmove (eventPtr, event, GdkEventButton.sizeof);
+
+ /*
+ * Get the origin of the global GdkWindow/GdkSurface to calculate the size of any offsets
+ * such as client side decorations, or the system tray.
+ */
+ int [] globalWindowOriginY = new int [1];
+ int [] globalWindowOriginX = new int [1];
+ GDK.gdk_window_get_origin (event.window, globalWindowOriginX, globalWindowOriginY);
+ rect.x = this.x - globalWindowOriginX[0];
+ rect.y = this.y - globalWindowOriginY[0];
} else {
- gdkResource = GTK.gtk_widget_get_window (getShell().topHandle());
+ // On Wayland, get the relative GdkWindow from the parent shell.
+ long gdkResource = GTK3.gtk_widget_get_window (getShell().topHandle());
+ event.window = OS.g_object_ref(gdkResource);
+ GTK3.memmove (eventPtr, event, GdkEventButton.sizeof);
+ // Bug in GTK?: testing with SWT_MENU_LOCATION_DEBUGGING=1 shows final_rect.x and
+ // final_rect.y popup menu position is off by 1 compared to this.x and this.y
+ rect.x = this.x + 1;
+ rect.y = this.y + 1;
}
- event.window = OS.g_object_ref(gdkResource);
- OS.memmove (eventPtr, event, GdkEventButton.sizeof);
- // Bug in GTK?: testing with SWT_MENU_LOCATION_DEBUGGING=1 shows final_rect.x and
- // final_rect.y popup menu position is off by 1 compared to this.x and this.y
- rect.x = this.x + 1;
- rect.y = this.y + 1;
+ // Popup the menu and pin it at the top left corner of the GdkRectangle relative to the GdkWindow
+ GTK3.gtk_menu_popup_at_rect(handle, event.window, rect, GDK.GDK_GRAVITY_NORTH_WEST,
+ GDK.GDK_GRAVITY_NORTH_WEST, eventPtr);
+ gdk_event_free (eventPtr);
}
- // Popup the menu and pin it at the top left corner of the GdkRectangle relative to the GdkWindow
- GTK.gtk_menu_popup_at_rect(handle, event.window, rect, GDK.GDK_GRAVITY_NORTH_WEST,
- GDK.GDK_GRAVITY_NORTH_WEST, eventPtr);
- gdk_event_free (eventPtr);
} else {
/*
* GTK Feature: gtk_menu_popup is deprecated as of GTK3.22 and the new method gtk_menu_popup_at_pointer
* requires an event to hook on to. This requires the popup & events related to the menu be handled
* immediately and not as a post event in display, requiring the current event.
*/
- eventPtr = GTK.gtk_get_current_event();
+ eventPtr = GTK3.gtk_get_current_event();
if (eventPtr == 0) {
eventPtr = GDK.gdk_event_new(GTK.GTK4 ? GDK.GDK4_BUTTON_PRESS : GDK.GDK_BUTTON_PRESS);
GdkEventButton event = new GdkEventButton ();
event.type = GTK.GTK4 ? GDK.GDK4_BUTTON_PRESS : GDK.GDK_BUTTON_PRESS;
// Only assign a window on X11, as on Wayland the window is that of the mouse pointer
if (OS.isX11()) {
- event.window = OS.g_object_ref(GTK.gtk_widget_get_window (getShell().handle));
+ event.window = OS.g_object_ref(GTK3.gtk_widget_get_window (getShell().handle));
}
event.device = GDK.gdk_get_pointer(GDK.gdk_display_get_default ());
event.time = display.getLastEventTime ();
- OS.memmove (eventPtr, event, GdkEventButton.sizeof);
+ GTK3.memmove (eventPtr, event, GdkEventButton.sizeof);
}
adjustParentWindowWayland(eventPtr);
verifyMenuPosition(getItemCount());
- GTK.gtk_menu_popup_at_pointer(handle, eventPtr);
- GDK.gdk_event_free (eventPtr);
+ GTK3.gtk_menu_popup_at_pointer(handle, eventPtr);
+ if (GTK.GTK4) {
+ GDK.gdk_event_unref(eventPtr);
+ } else {
+ GDK.gdk_event_free(eventPtr);
+ }
}
}
poppedUpCount = getItemCount();
@@ -331,15 +413,19 @@ void _setVisible (boolean visible) {
sendEvent (SWT.Hide);
}
} else {
- GTK.gtk_menu_popdown (handle);
+ if (GTK.GTK4) {
+ GTK.gtk_popover_popdown(handle);
+ } else {
+ GTK3.gtk_menu_popdown (handle);
+ }
}
}
void addAccelerators (long accelGroup) {
- MenuItem [] items = getItems ();
+ MenuItem[] items = getItems();
for (int i = 0; i < items.length; i++) {
MenuItem item = items[i];
- item.addAccelerators (accelGroup);
+ item.addAccelerators(accelGroup);
}
}
@@ -399,77 +485,64 @@ public void addHelpListener (HelpListener listener) {
@Override
void createHandle (int index) {
state |= HANDLE;
- if ((style & SWT.BAR) != 0) {
- handle = GTK.gtk_menu_bar_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- long vboxHandle = parent.vboxHandle;
- GTK.gtk_container_add (vboxHandle, handle);
- gtk_box_set_child_packing (vboxHandle, handle, false, true, 0, GTK.GTK_PACK_START);
- } else {
- handle = GTK.gtk_menu_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- }
-}
-void createIMMenu (long imHandle) {
- if (imHandle == 0) {
- this.imHandle = 0;
- if (imItem != 0) {
- GTK.gtk_widget_destroy (imItem);
- imItem = 0;
- }
- if (imSeparator != 0) {
- GTK.gtk_widget_destroy (imSeparator);
- imSeparator = 0;
+ if (GTK.GTK4) {
+ int bits = SWT.BAR | SWT.DROP_DOWN | SWT.POP_UP;
+ modelHandle = OS.g_menu_new();
+ if (modelHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ items = new LinkedList<>();
+ sections = new LinkedList<>();
+
+ switch (style & bits) {
+ case SWT.BAR:
+ handle = GTK4.gtk_popover_menu_bar_new_from_model(modelHandle);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK4.gtk_box_prepend(parent.vboxHandle, handle);
+ break;
+ case SWT.DROP_DOWN:
+ handle = modelHandle;
+ break;
+ case SWT.POP_UP:
+ default:
+ handle = GTK4.gtk_popover_menu_new_from_model_full(modelHandle, GTK4.GTK_POPOVER_MENU_NESTED);
+ GTK.gtk_widget_set_parent(handle, parent.handle);
+ GTK.gtk_popover_set_position(handle, GTK.GTK_POS_BOTTOM);
+ GTK4.gtk_popover_set_has_arrow(handle, false);
+ GTK.gtk_widget_set_halign(handle, GTK.GTK_ALIGN_START);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
}
- return;
- }
- if (this.imHandle == imHandle) return;
- this.imHandle = imHandle;
- if (imSeparator == 0) {
- imSeparator = GTK.gtk_separator_menu_item_new ();
- GTK.gtk_widget_show (imSeparator);
- GTK.gtk_menu_shell_insert (handle, imSeparator, -1);
- }
- if (imItem == 0) {
- byte[] buffer = Converter.wcsToMbcs (SWT.getMessage("SWT_InputMethods"), true);
- imItem = GTK.gtk_menu_item_new ();
- if (imItem == 0) error (SWT.ERROR_NO_HANDLES);
- long imageHandle = 0;
- long labelHandle = GTK.gtk_accel_label_new (buffer);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- if (GTK.GTK_VERSION >= OS.VERSION (3, 16, 0)) {
- GTK.gtk_label_set_xalign (labelHandle, 0);
- GTK.gtk_widget_set_halign (labelHandle, GTK.GTK_ALIGN_FILL);
+ // Create first section
+ long firstSection = OS.g_menu_new();
+ if (firstSection == 0) error(SWT.ERROR_NO_HANDLES);
+ sections.add(new Section(firstSection));
+
+ long defaultSection = OS.g_menu_item_new_section(null, firstSection);
+ OS.g_menu_insert_item(modelHandle, 0, defaultSection);
+ OS.g_object_unref(defaultSection);
+
+ actionGroup = OS.g_simple_action_group_new();
+ if (actionGroup == 0) error(SWT.ERROR_NO_HANDLES);
+
+ long shellHandle = parent.getShell().topHandle();
+ GTK.gtk_widget_insert_action_group(shellHandle, Converter.javaStringToCString(String.valueOf(this.hashCode())), actionGroup);
+ } else {
+ if ((style & SWT.BAR) != 0) {
+ handle = GTK3.gtk_menu_bar_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ long vboxHandle = parent.vboxHandle;
+ GTK3.gtk_container_add(vboxHandle, handle);
+ gtk_box_set_child_packing(vboxHandle, handle, false, true, 0, GTK.GTK_PACK_START);
} else {
- GTK.gtk_misc_set_alignment(labelHandle, 0, 0);
- }
- long boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 0);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- if (OS.SWT_PADDED_MENU_ITEMS) {
- imageHandle = GTK.gtk_image_new();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_image_set_pixel_size (imageHandle, 16);
- if (boxHandle != 0) {
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_widget_show (imageHandle);
- }
+ handle = GTK3.gtk_menu_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ menuHandle = handle;
+ OS.g_object_ref_sink(menuHandle);
}
- if (labelHandle != 0 && boxHandle != 0) {
- gtk_box_pack_end (boxHandle, labelHandle, true, true, 0);
- GTK.gtk_widget_show (labelHandle);
- }
- if (boxHandle != 0) {
- GTK.gtk_container_add (imItem, boxHandle);
- GTK.gtk_widget_show (boxHandle);
- }
- GTK.gtk_widget_show (imItem);
- GTK.gtk_menu_shell_insert (handle, imItem, -1);
}
- long imSubmenu = GTK.gtk_menu_new ();
- GTK.gtk_im_multicontext_append_menuitems (imHandle, imSubmenu);
- GTK.gtk_menu_item_set_submenu (imItem, imSubmenu);
}
@Override
@@ -492,28 +565,6 @@ void fixMenus (Decorations newParent) {
this.parent = newParent;
}
-/*public*/ Rectangle getBounds () {
- checkWidget();
- if (!GTK.gtk_widget_get_mapped (handle)) {
- return new Rectangle (0, 0, 0, 0);
- }
- int [] origin_x = new int [1], origin_y = new int [1];
- if (GTK.GTK4) {
- long surface = gtk_widget_get_surface (handle);
- GDK.gdk_surface_get_origin(surface, origin_x, origin_y);
- } else {
- long window = gtk_widget_get_window (handle);
- GDK.gdk_window_get_origin (window, origin_x, origin_y);
- }
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
- int x = origin_x [0] + allocation.x;
- int y = origin_y [0] + allocation.y;
- int width = allocation.width;
- int height = allocation.height;
- return new Rectangle (x, y, width, height);
-}
-
/**
* Returns the default menu item or null if none has
* been previously set.
@@ -545,9 +596,26 @@ public MenuItem getDefaultItem () {
*
* @see #isEnabled
*/
-public boolean getEnabled () {
+public boolean getEnabled() {
checkWidget();
- return GTK.gtk_widget_get_sensitive (handle);
+
+ if (GTK.GTK4) {
+ if ((style & SWT.DROP_DOWN) != 0) {
+ /*
+ * In GTK4, SWT.DROP_DOWN represents an wrapper of
+ * GMenu menu model. With this style the Menu object
+ * is just a structure to hold MenuItems. We return true
+ * in all cases as this is just a model. If the dropdown menu
+ * is to be disabled, the corresponding SWT.CASCADE
+ * menu item should be disabled.
+ */
+ return true;
+ } else {
+ return GTK.gtk_widget_get_sensitive(handle);
+ }
+ } else {
+ return GTK.gtk_widget_get_sensitive(handle);
+ }
}
/**
@@ -565,18 +633,23 @@ public boolean getEnabled () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public MenuItem getItem (int index) {
+public MenuItem getItem(int index) {
checkWidget();
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
- int count = OS.g_list_length (list);
- if (imSeparator != 0) count--;
- if (imItem != 0) count--;
- if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
- long data = OS.g_list_nth_data (list, index);
- OS.g_list_free (list);
- if (data == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
- return (MenuItem) display.getWidget (data);
+
+ if (GTK.GTK4) {
+ if (index < 0 || index >= items.size()) error(SWT.ERROR_INVALID_RANGE);
+
+ return items.get(index);
+ } else {
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
+ int count = OS.g_list_length (list);
+ if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
+ long data = OS.g_list_nth_data (list, index);
+ OS.g_list_free (list);
+ if (data == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
+ return (MenuItem) display.getWidget(data);
+ }
}
/**
@@ -591,13 +664,17 @@ public MenuItem getItem (int index) {
*/
public int getItemCount () {
checkWidget();
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return 0;
- int count = OS.g_list_length (list);
- OS.g_list_free (list);
- if (imSeparator != 0) count--;
- if (imItem != 0) count--;
- return Math.max (0, count);
+
+ if (GTK.GTK4) {
+ return items.size();
+ } else {
+ int count = 0;
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list == 0) return 0;
+ count = OS.g_list_length (list);
+ OS.g_list_free (list);
+ return Math.max(0, count);
+ }
}
/**
@@ -618,27 +695,30 @@ public int getItemCount () {
*/
public MenuItem [] getItems () {
checkWidget();
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return new MenuItem [0];
- long originalList = list;
- int count = OS.g_list_length (list);
- if (imSeparator != 0) count--;
- if (imItem != 0) count--;
- MenuItem [] items = new MenuItem [count];
- int index = 0;
- for (int i=0; i<count; i++) {
- long data = OS.g_list_data (list);
- MenuItem item = (MenuItem) display.getWidget (data);
- if (item != null) items [index++] = item;
- list = OS.g_list_next (list);
- }
- OS.g_list_free (originalList);
- if (index != items.length) {
- MenuItem [] newItems = new MenuItem [index];
- System.arraycopy (items, 0, newItems, 0, index);
- items = newItems;
+
+ if (GTK.GTK4) {
+ return items.toArray(new MenuItem[items.size()]);
+ } else {
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list == 0) return new MenuItem [0];
+ long originalList = list;
+ int count = OS.g_list_length (list);
+ MenuItem [] items = new MenuItem [count];
+ int index = 0;
+ for (int i=0; i<count; i++) {
+ long data = OS.g_list_data (list);
+ MenuItem item = (MenuItem) display.getWidget (data);
+ if (item != null) items [index++] = item;
+ list = OS.g_list_next (list);
+ }
+ OS.g_list_free (originalList);
+ if (index != items.length) {
+ MenuItem [] newItems = new MenuItem [index];
+ System.arraycopy (items, 0, newItems, 0, index);
+ items = newItems;
+ }
+ return items;
}
- return items;
}
@Override
@@ -816,9 +896,9 @@ long gtk_show (long widget) {
@Override
-long gtk_show_help (long widget, long helpType) {
+long gtk3_show_help (long widget, long helpType) {
if (sendHelpEvent (helpType)) {
- GTK.gtk_menu_shell_deactivate (handle);
+ GTK3.gtk_menu_shell_deactivate (handle);
return 1;
}
return 0;
@@ -851,15 +931,31 @@ long gtk_menu_popped_up (long widget, long flipped_rect, long final_rect, long f
@Override
-void hookEvents () {
- super.hookEvents ();
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [SHOW], 0, display.getClosure (SHOW), false);
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [HIDE], 0, display.getClosure (HIDE), false);
- // Hook into the "popped-up" signal on GTK3.22+ if SWT_MENU_LOCATION_DEBUGGING has been set
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0) && OS.SWT_MENU_LOCATION_DEBUGGING) {
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [POPPED_UP], 0, display.getClosure (POPPED_UP), false);
+void hookEvents() {
+ super.hookEvents();
+
+ if (GTK.GTK4) {
+ shortcutController = GTK4.gtk_shortcut_controller_new();
+ if (shortcutController == 0) error(SWT.ERROR_NO_HANDLES);
+ GTK4.gtk_shortcut_controller_set_scope(shortcutController, GTK.GTK_SHORTCUT_SCOPE_GLOBAL);
+ GTK4.gtk_widget_add_controller(parent.handle, shortcutController);
+
+ if ((style & SWT.DROP_DOWN) == 0) {
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[SHOW], 0, display.getClosure(SHOW), false);
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[HIDE], 0, display.getClosure(HIDE), false);
+ }
+
+ } else {
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[SHOW_HELP], 0, display.getClosure(SHOW_HELP), false);
+
+ // Hook into the "popped-up" signal on GTK3.22+ if SWT_MENU_LOCATION_DEBUGGING has been set
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0) && OS.SWT_MENU_LOCATION_DEBUGGING) {
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[POPPED_UP], 0, display.getClosure(POPPED_UP), false);
+ }
+
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[SHOW], 0, display.getClosure(SHOW), false);
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[HIDE], 0, display.getClosure(HIDE), false);
}
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [SHOW_HELP], 0, display.getClosure (SHOW_HELP), false);
}
/**
@@ -963,12 +1059,24 @@ void releaseWidget () {
if (parent != null) parent.removeMenu (this);
parent = null;
cascade = null;
- imItem = imSeparator = imHandle = 0;
if (imageList != null) imageList.dispose ();
imageList = null;
}
/**
+ * Overridden to fix memory leak on GTK3, see bug 573983
+ * {@inheritDoc}
+ */
+@Override
+void destroyWidget () {
+ super.destroyWidget();
+ if (menuHandle != 0) {
+ OS.g_object_unref(menuHandle);
+ menuHandle = 0;
+ }
+}
+
+/**
* Removes the listener from the collection of listeners who will
* be notified when the menu events are generated for the control.
*
@@ -1080,9 +1188,22 @@ public void setDefaultItem (MenuItem item) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setEnabled (boolean enabled) {
+public void setEnabled(boolean enabled) {
checkWidget();
- GTK.gtk_widget_set_sensitive (handle, enabled);
+
+ if (GTK.GTK4) {
+ if ((style & SWT.DROP_DOWN) != 0) {
+ /*
+ * In GTK4, SWT.DROP_DOWN acts solely as a wrapper
+ * of the GMenu menu model. See getEnabled for more info.
+ */
+ return;
+ } else {
+ GTK.gtk_widget_set_sensitive(handle, enabled);
+ }
+ } else {
+ GTK.gtk_widget_set_sensitive(handle, enabled);
+ }
}
/**
@@ -1170,29 +1291,29 @@ void setLocationInPixels (Point location) {
* @since 3.7
*/
public void setOrientation (int orientation) {
- checkWidget ();
- if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- _setOrientation (orientation);
+ checkWidget ();
+ if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
+ _setOrientation (orientation);
}
void _setOrientation (int orientation) {
- int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
- if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
- style &= ~flags;
- style |= orientation & flags;
- setOrientation (false);
+ int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
+ if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
+ style &= ~flags;
+ style |= orientation & flags;
+ setOrientation (false);
}
@Override
void setOrientation (boolean create) {
- if ((style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
- int dir = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
- if (handle != 0) GTK.gtk_widget_set_direction (handle, dir);
- MenuItem [] items = getItems ();
- for (int i = 0; i < items.length; i++) {
- items [i].setOrientation (create);
- }
- }
+ if ((style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
+ int dir = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
+ if (handle != 0) GTK.gtk_widget_set_direction (handle, dir);
+ MenuItem [] items = getItems ();
+ for (int i = 0; i < items.length; i++) {
+ items [i].setOrientation (create);
+ }
+ }
}
/**
@@ -1218,15 +1339,15 @@ void adjustParentWindowWayland (long eventPtr) {
switch (eventType) {
case GDK.GDK_BUTTON_PRESS:
GdkEventButton eventButton = new GdkEventButton();
- OS.memmove (eventButton, eventPtr, GdkEventButton.sizeof);
+ GTK3.memmove (eventButton, eventPtr, GdkEventButton.sizeof);
eventButton.window = deviceResource;
- OS.memmove(eventPtr, eventButton, GdkEventButton.sizeof);
+ GTK3.memmove(eventPtr, eventButton, GdkEventButton.sizeof);
break;
case GDK.GDK_KEY_PRESS:
GdkEventKey eventKey = new GdkEventKey();
- OS.memmove (eventKey, eventPtr, GdkEventKey.sizeof);
+ GTK3.memmove (eventKey, eventPtr, GdkEventKey.sizeof);
eventKey.window = deviceResource;
- OS.memmove(eventPtr, eventKey, GdkEventKey.sizeof);
+ GTK3.memmove(eventPtr, eventKey, GdkEventKey.sizeof);
break;
}
}
@@ -1264,23 +1385,21 @@ void verifyMenuPosition (int itemCount) {
* Menus are height-for-width only: use gtk_widget_get_preferred_height()
* instead of gtk_widget_get_preferred_size().
*/
- GTK.gtk_widget_get_preferred_height(handle, null, naturalHeight);
+ GTK3.gtk_widget_get_preferred_height(handle, null, naturalHeight);
if (naturalHeight[0] > 0) {
- long topLevelWidget = GTK.gtk_widget_get_toplevel(handle);
- int width;
if (GTK.GTK4) {
- long topLevelSurface = GTK.gtk_widget_get_surface(topLevelWidget);
- width = GDK.gdk_surface_get_width(topLevelSurface);
- GDK.gdk_surface_resize(topLevelSurface, width, naturalHeight[0]);
+ /* TODO: GTK4 gdk_surface_resize/move no longer exist & have been replaced with
+ * gdk_toplevel_begin_resize & gdk_toplevel_begin_move. These functions might change the
+ * design of resizing and moving in GTK4 */
} else {
- long topLevelWindow = GTK.gtk_widget_get_window(topLevelWidget);
- width = GDK.gdk_window_get_width(topLevelWindow);
+ long topLevelWidget = GTK3.gtk_widget_get_toplevel(handle);
+ long topLevelWindow = GTK3.gtk_widget_get_window(topLevelWidget);
+ int width = GDK.gdk_window_get_width(topLevelWindow);
GDK.gdk_window_resize(topLevelWindow, width, naturalHeight[0]);
}
}
}
}
- return;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index 1d8dea5d57..fc582f8a42 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,6 +19,9 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
+import org.eclipse.swt.widgets.Menu.*;
/**
* Instances of this class represent a selectable user interface object
@@ -59,6 +62,14 @@ public class MenuItem extends Item {
int accelerator, userId;
String toolTipText;
+ Image defaultDisableImage;
+ boolean enabled = true;
+
+ /** GTK4 only fields */
+ long modelHandle, actionHandle, shortcutHandle;
+ Section section;
+ String actionName;
+
/**
* Constructs a new instance of this class given its parent
* (which must be a <code>Menu</code>) and a style value
@@ -150,8 +161,8 @@ void addAccelerator (long accelGroup) {
}
void addAccelerators (long accelGroup) {
- addAccelerator (accelGroup);
- if (menu != null) menu.addAccelerators (accelGroup);
+ addAccelerator(accelGroup);
+ if (menu != null) menu.addAccelerators(accelGroup);
}
/**
@@ -254,131 +265,213 @@ protected void checkSubclass () {
}
@Override
-void createHandle (int index) {
+void createHandle(int index) {
state |= HANDLE;
- byte [] buffer = new byte [1];
int bits = SWT.CHECK | SWT.RADIO | SWT.PUSH | SWT.SEPARATOR | SWT.CASCADE;
- switch (style & bits) {
- case SWT.SEPARATOR:
- handle = GTK.gtk_separator_menu_item_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- break;
- case SWT.RADIO:
- /*
- * Feature in GTK. In GTK, radio button must always be part of
- * a radio button group. In a GTK radio group, one button is always
- * selected. This means that it is not possible to have a single
- * radio button that is unselected. This is necessary to allow
- * applications to implement their own radio behavior or use radio
- * buttons outside of radio groups. The fix is to create a hidden
- * radio button for each radio button we create and add them
- * to the same group. This allows the visible button to be
- * unselected.
- */
- groupHandle = GTK.gtk_radio_menu_item_new (0);
- if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
- OS.g_object_ref (groupHandle);
- OS.g_object_ref_sink (groupHandle);
- long group = GTK.gtk_radio_menu_item_get_group (groupHandle);
- handle = GTK.gtk_radio_menu_item_new (group);
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- labelHandle = GTK.gtk_accel_label_new (buffer);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ switch (style & bits) {
+ case SWT.SEPARATOR:
+ modelHandle = OS.g_menu_new();
+ handle = OS.g_menu_item_new_section(null, modelHandle);
+ break;
+ case SWT.RADIO:
+ long stringVariantType = OS.g_variant_type_new(OS.G_VARIANT_TYPE_STRING);
+ actionHandle = OS.g_simple_action_new_stateful(
+ Converter.javaStringToCString(String.valueOf(this.hashCode())),
+ stringVariantType,
+ OS.g_variant_new_string(Converter.javaStringToCString("untoggled")));
+ OS.g_action_map_add_action(parent.actionGroup, actionHandle);
+ actionName = String.valueOf(parent.hashCode()) + "." + String.valueOf(this.hashCode()) + "::toggled";
+ handle = OS.g_menu_item_new(null, Converter.javaStringToCString(actionName));
+ OS.g_variant_type_free(stringVariantType);
+ break;
+ case SWT.CHECK:
+ long boolVariantType = OS.g_variant_type_new(OS.G_VARIANT_TYPE_BOOLEAN);
+ actionHandle = OS.g_simple_action_new_stateful(
+ Converter.javaStringToCString(String.valueOf(this.hashCode())),
+ 0,
+ OS.g_variant_new_boolean(false));
+ OS.g_action_map_add_action(parent.actionGroup, actionHandle);
+ actionName = String.valueOf(parent.hashCode()) + "." + String.valueOf(this.hashCode());
+ handle = OS.g_menu_item_new(null, Converter.javaStringToCString(actionName));
+ OS.g_variant_type_free(boolVariantType);
+ break;
+ case SWT.CASCADE:
+ modelHandle = OS.g_menu_new();
+ handle = OS.g_menu_item_new_submenu(Converter.javaStringToCString(""), modelHandle);
+ break;
+ case SWT.PUSH:
+ default:
+ actionHandle = OS.g_simple_action_new(Converter.javaStringToCString(String.valueOf(this.hashCode())), 0);
+ OS.g_action_map_add_action(parent.actionGroup, actionHandle);
+ actionName = String.valueOf(parent.hashCode()) + "." + String.valueOf(this.hashCode());
+ handle = OS.g_menu_item_new(null, Converter.javaStringToCString(actionName));
+ break;
+ }
- boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- if (OS.SWT_PADDED_MENU_ITEMS) {
- imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ Section selectedSection = parent.sections.getLast();
+ for (Section section : parent.sections) {
+ int sectionPosition = section.getSectionPosition();
+ int sectionLength = section.getSectionSize();
+
+ if (index > sectionPosition && index <= sectionPosition + sectionLength + 1) {
+ selectedSection = section;
+ break;
}
- break;
- case SWT.CHECK:
- handle = GTK.gtk_check_menu_item_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ }
- labelHandle = GTK.gtk_accel_label_new (buffer);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ int sectionRelativeIndex = index - (selectedSection.getSectionPosition() + 1);
+ if ((style & SWT.SEPARATOR) != 0) {
+ section = parent.new Section(this);
- boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ int itemsToMove = selectedSection.sectionItems.size() - sectionRelativeIndex;
+ for (int i = 0; i < itemsToMove; i++) {
+ MenuItem removedItem = selectedSection.sectionItems.remove(sectionRelativeIndex);
+ section.sectionItems.add(removedItem);
- if (OS.SWT_PADDED_MENU_ITEMS) {
- imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ OS.g_menu_remove(selectedSection.getSectionHandle(), sectionRelativeIndex);
+ OS.g_menu_insert_item(modelHandle, section.sectionItems.indexOf(removedItem), removedItem.handle);
+ removedItem.section = section;
}
- break;
- // This case now needs to be handled due to double padding. When double padded
- // menus are used, the "head" menu item (such as File, Edit, Help, etc.) should
- // not be padded. We only care about this in Gtk3.
- case SWT.CASCADE:
- handle = GTK.gtk_menu_item_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-
- labelHandle = GTK.gtk_accel_label_new (buffer);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
-
- boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- if ((parent.style & bits) == SWT.BAR) {
+
+ int sectionInsertIndex = parent.sections.indexOf(selectedSection) + 1;
+ parent.sections.add(sectionInsertIndex, section);
+ OS.g_menu_insert_item(parent.modelHandle, sectionInsertIndex, handle);
+ } else {
+ section = selectedSection;
+ selectedSection.sectionItems.add(sectionRelativeIndex, this);
+ OS.g_menu_insert_item(selectedSection.getSectionHandle(), sectionRelativeIndex, handle);
+ }
+
+ parent.items.add(index, this);
+ } else {
+ byte[] buffer = new byte[1];
+
+ switch (style & bits) {
+ case SWT.SEPARATOR:
+ handle = GTK3.gtk_separator_menu_item_new ();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
break;
- }
- if (OS.SWT_PADDED_MENU_ITEMS) {
- imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- }
- break;
- case SWT.PUSH:
- default:
- handle = GTK.gtk_menu_item_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ case SWT.RADIO:
+ /*
+ * Feature in GTK. In GTK, radio button must always be part of
+ * a radio button group. In a GTK radio group, one button is always
+ * selected. This means that it is not possible to have a single
+ * radio button that is unselected. This is necessary to allow
+ * applications to implement their own radio behavior or use radio
+ * buttons outside of radio groups. The fix is to create a hidden
+ * radio button for each radio button we create and add them
+ * to the same group. This allows the visible button to be
+ * unselected.
+ */
+ groupHandle = GTK3.gtk_radio_menu_item_new (0);
+ if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ OS.g_object_ref_sink (groupHandle);
+ long group = GTK3.gtk_radio_menu_item_get_group (groupHandle);
+ handle = GTK3.gtk_radio_menu_item_new (group);
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ labelHandle = GTK3.gtk_accel_label_new (buffer);
+ if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
+ if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ if (OS.SWT_PADDED_MENU_ITEMS) {
+ imageHandle = GTK.gtk_image_new ();
+ if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+ break;
+ case SWT.CHECK:
+ handle = GTK3.gtk_check_menu_item_new ();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ labelHandle = GTK3.gtk_accel_label_new (buffer);
+ if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
+ if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ if (OS.SWT_PADDED_MENU_ITEMS) {
+ imageHandle = GTK.gtk_image_new ();
+ if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+ break;
+ // This case now needs to be handled due to double padding. When double padded
+ // menus are used, the "head" menu item (such as File, Edit, Help, etc.) should
+ // not be padded. We only care about this in Gtk3.
+ case SWT.CASCADE:
+ handle = GTK3.gtk_menu_item_new ();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ labelHandle = GTK3.gtk_accel_label_new (buffer);
+ if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
+ if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ if ((parent.style & bits) == SWT.BAR) {
+ break;
+ }
+ if (OS.SWT_PADDED_MENU_ITEMS) {
+ imageHandle = GTK.gtk_image_new ();
+ if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+ break;
+ case SWT.PUSH:
+ default:
+ handle = GTK3.gtk_menu_item_new ();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+
+ labelHandle = GTK3.gtk_accel_label_new (buffer);
+ if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- labelHandle = GTK.gtk_accel_label_new (buffer);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
+ if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (OS.SWT_PADDED_MENU_ITEMS) {
+ imageHandle = GTK.gtk_image_new ();
+ if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+ break;
+ }
+ if (imageHandle != 0) {
if (OS.SWT_PADDED_MENU_ITEMS) {
- imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ GTK.gtk_image_set_pixel_size (imageHandle, 16);
}
- break;
- }
- if (imageHandle != 0) {
- if (OS.SWT_PADDED_MENU_ITEMS) {
- GTK.gtk_image_set_pixel_size (imageHandle, 16);
+
+ GTK3.gtk_container_add (boxHandle, imageHandle);
+ GTK.gtk_widget_show (imageHandle);
}
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_widget_show (imageHandle);
- }
- if (labelHandle != 0) {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 16, 0)) {
+
+ if (labelHandle != 0) {
GTK.gtk_label_set_xalign (labelHandle, 0);
GTK.gtk_widget_set_halign (labelHandle, GTK.GTK_ALIGN_FILL);
- } else {
- GTK.gtk_misc_set_alignment(labelHandle, 0, 0);
+ gtk_box_pack_end (boxHandle, labelHandle, true, true, 0);
+ GTK.gtk_widget_show (labelHandle);
}
- gtk_box_pack_end (boxHandle, labelHandle, true, true, 0);
- GTK.gtk_widget_show (labelHandle);
- }
- if (boxHandle != 0) {
- GTK.gtk_container_add (handle, boxHandle);
- GTK.gtk_widget_show (boxHandle);
- }
- if ((style & SWT.SEPARATOR) == 0) {
- if (boxHandle == 0) {
- labelHandle = GTK.gtk_bin_get_child (handle);
+
+ if (boxHandle != 0) {
+ GTK3.gtk_container_add (handle, boxHandle);
+ GTK.gtk_widget_show (boxHandle);
+ }
+
+ if ((style & SWT.SEPARATOR) == 0) {
+ if (boxHandle == 0) {
+ labelHandle = GTK3.gtk_bin_get_child (handle);
+ }
+ GTK3.gtk_accel_label_set_accel_widget (labelHandle, 0);
}
- GTK.gtk_accel_label_set_accel_widget (labelHandle, 0);
+
+ long parentHandle = parent.handle;
+ boolean enabled = GTK.gtk_widget_get_sensitive (parentHandle);
+ if (!enabled) GTK.gtk_widget_set_sensitive (parentHandle, true);
+ GTK3.gtk_menu_shell_insert (parentHandle, handle, index);
+ if (!enabled) GTK.gtk_widget_set_sensitive (parentHandle, false);
+ GTK.gtk_widget_show (handle);
}
- long parentHandle = parent.handle;
- boolean enabled = GTK.gtk_widget_get_sensitive (parentHandle);
- if (!enabled) GTK.gtk_widget_set_sensitive (parentHandle, true);
- GTK.gtk_menu_shell_insert (parentHandle, handle, index);
- if (!enabled) GTK.gtk_widget_set_sensitive (parentHandle, false);
- GTK.gtk_widget_show (handle);
}
void fixMenus (Decorations newParent) {
@@ -415,20 +508,6 @@ long getAccelGroup () {
return shell.menuBar == menu ? shell.accelGroup : 0;
}
-/*public*/ Rectangle getBounds () {
- checkWidget();
- if (!GTK.gtk_widget_get_mapped (handle)) {
- return new Rectangle (0, 0, 0, 0);
- }
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
- int x = allocation.x;
- int y = allocation.y;
- int width = allocation.width;
- int height = allocation.height;
- return new Rectangle (x, y, width, height);
-}
-
/**
* Returns <code>true</code> if the receiver is enabled, and
* <code>false</code> otherwise. A disabled menu item is typically
@@ -446,7 +525,16 @@ long getAccelGroup () {
*/
public boolean getEnabled () {
checkWidget();
- return GTK.gtk_widget_get_sensitive (handle);
+
+ if (GTK.GTK4) {
+ if ((style & SWT.CASCADE) != 0) {
+ return true;
+ }
+
+ return OS.g_action_get_enabled(actionHandle);
+ } else {
+ return GTK.gtk_widget_get_sensitive(handle);
+ }
}
/**
@@ -523,7 +611,18 @@ public Menu getParent () {
public boolean getSelection () {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- return GTK.gtk_check_menu_item_get_active(handle);
+
+ if (GTK.GTK4) {
+ long gVariantState = OS.g_action_get_state(actionHandle);
+ if ((style & SWT.CHECK) != 0) {
+ return OS.g_variant_get_boolean(gVariantState);
+ } else {
+ String stateString = Converter.cCharPtrToJavaString(OS.g_variant_get_string(gVariantState, null), false);
+ return stateString.equals("toggled");
+ }
+ } else {
+ return GTK3.gtk_check_menu_item_get_active(handle);
+ }
}
/**
@@ -546,19 +645,24 @@ public String getToolTipText () {
@Override
long gtk_activate (long widget) {
if ((style & SWT.CASCADE) != 0 && menu != null) return 0;
- /*
- * Bug in GTK. When an ancestor menu is disabled and
- * the user types an accelerator key, GTK delivers the
- * the activate signal even though the menu item cannot
- * be invoked using the mouse. The fix is to ignore
- * activate signals when an ancestor menu is disabled.
- */
- if (!isEnabled ()) return 0;
+
+ if (!GTK.GTK4) {
+ /*
+ * Bug in GTK. When an ancestor menu is disabled and
+ * the user types an accelerator key, GTK delivers the
+ * the activate signal even though the menu item cannot
+ * be invoked using the mouse. The fix is to ignore
+ * activate signals when an ancestor menu is disabled.
+ */
+ if (!isEnabled()) return 0;
+ }
+
if ((style & SWT.RADIO) != 0) {
if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) {
selectRadio ();
}
}
+
sendSelectionEvent (SWT.Selection);
return 0;
}
@@ -571,7 +675,7 @@ long gtk_select (long item) {
}
@Override
-long gtk_show_help (long widget, long helpType) {
+long gtk3_show_help (long widget, long helpType) {
boolean handled = hooks (SWT.Help);
if (handled) {
postEvent (SWT.Help);
@@ -579,18 +683,25 @@ long gtk_show_help (long widget, long helpType) {
handled = parent.sendHelpEvent (helpType);
}
if (handled) {
- GTK.gtk_menu_shell_deactivate (parent.handle);
+ GTK3.gtk_menu_shell_deactivate (parent.handle);
return 1;
}
return 0;
}
@Override
-void hookEvents () {
- super.hookEvents ();
- OS.g_signal_connect_closure (handle, OS.activate, display.getClosure (ACTIVATE), false);
- OS.g_signal_connect_closure (handle, OS.select, display.getClosure (SELECT), false);
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [SHOW_HELP], 0, display.getClosure (SHOW_HELP), false);
+void hookEvents() {
+ super.hookEvents();
+
+ if (GTK.GTK4) {
+ if ((style & SWT.PUSH) != 0 || (style & SWT.RADIO) != 0) {
+ OS.g_signal_connect(actionHandle, OS.activate, display.activateProc, handle);
+ }
+ } else {
+ OS.g_signal_connect_closure(handle, OS.activate, display.getClosure (ACTIVATE), false);
+ OS.g_signal_connect_closure(handle, OS.select, display.getClosure (SELECT), false);
+ OS.g_signal_connect_closure_by_id(handle, display.signalIds[SHOW_HELP], 0, display.getClosure(SHOW_HELP), false);
+ }
}
/**
@@ -622,24 +733,66 @@ void releaseChildren (boolean destroy) {
}
@Override
-void releaseParent () {
- super.releaseParent ();
+void releaseParent() {
+ super.releaseParent();
+
if (menu != null) {
if (menu.selectedItem == this) menu.selectedItem = null;
- menu.dispose ();
+ menu.dispose();
+
+ menu = null;
}
- menu = null;
}
@Override
-void releaseWidget () {
- super.releaseWidget ();
- long accelGroup = getAccelGroup ();
- if (accelGroup != 0) removeAccelerator (accelGroup);
- if (groupHandle != 0) OS.g_object_unref (groupHandle);
- groupHandle = 0;
+void releaseWidget() {
+ super.releaseWidget();
+
+ if (GTK.GTK4) {
+ if (parent.actionGroup != 0 && actionName != null) OS.g_action_map_remove_action(parent.actionGroup, Converter.javaStringToCString(actionName));
+ } else {
+ long accelGroup = getAccelGroup();
+ if (accelGroup != 0) removeAccelerator(accelGroup);
+
+ if (groupHandle != 0) OS.g_object_unref(groupHandle);
+ groupHandle = 0;
+ parent = null;
+ }
+
accelerator = 0;
- parent = null;
+
+ disposeDefaultDisabledImage();
+}
+
+@Override
+void destroyWidget() {
+ if (GTK.GTK4) {
+ if ((style & SWT.SEPARATOR) != 0) {
+ Section aboveSection = parent.sections.get(parent.sections.indexOf(section) - 1);
+ aboveSection.sectionItems.addAll(section.sectionItems);
+
+ for (MenuItem item : section.sectionItems) {
+ OS.g_menu_insert_item(aboveSection.getSectionHandle(), aboveSection.sectionItems.indexOf(item), item.handle);
+ }
+
+ OS.g_menu_remove(parent.modelHandle, parent.sections.indexOf(section));
+
+ parent.sections.remove(section);
+ } else {
+ OS.g_menu_remove(section.getSectionHandle(), section.sectionItems.indexOf(this));
+ section.sectionItems.remove(this);
+ }
+
+ parent.items.remove(this);
+ parent = null;
+
+ if (modelHandle != 0) OS.g_object_unref(modelHandle);
+ OS.g_object_unref(handle);
+
+ releaseHandle();
+ } else {
+ super.destroyWidget();
+ }
}
void removeAccelerator (long accelGroup) {
@@ -758,10 +911,50 @@ void selectRadio () {
public void setAccelerator (int accelerator) {
checkWidget();
if (this.accelerator == accelerator) return;
- long accelGroup = getAccelGroup ();
- if (accelGroup != 0) removeAccelerator (accelGroup);
- this.accelerator = accelerator;
- if (accelGroup != 0) addAccelerator (accelGroup);
+
+ if (GTK.GTK4) {
+ if (shortcutHandle != 0) {
+ GTK4.gtk_shortcut_controller_remove_shortcut(parent.shortcutController, shortcutHandle);
+ }
+
+ this.accelerator = accelerator;
+ addShortcut(accelerator);
+ } else {
+ long accelGroup = getAccelGroup();
+ if (accelGroup != 0) removeAccelerator(accelGroup);
+ this.accelerator = accelerator;
+ if (accelGroup != 0) addAccelerator(accelGroup);
+ }
+}
+
+void addShortcut(int accelerator) {
+ if (accelerator == 0 || !getEnabled()) return;
+ if ((accelerator & SWT.COMMAND) != 0) return;
+
+ int mask = 0;
+ if ((accelerator & SWT.ALT) != 0) mask |= GDK.GDK_MOD1_MASK;
+ if ((accelerator & SWT.SHIFT) != 0) mask |= GDK.GDK_SHIFT_MASK;
+ if ((accelerator & SWT.CONTROL) != 0) mask |= GDK.GDK_CONTROL_MASK;
+
+ int keyval = accelerator & SWT.KEY_MASK;
+ int newKey = Display.untranslateKey (keyval);
+ if (newKey != 0) {
+ keyval = newKey;
+ } else {
+ switch (keyval) {
+ case '\r': keyval = GDK.GDK_Return; break;
+ default: keyval = Converter.wcsToMbcs ((char) keyval);
+ }
+ }
+
+ if (keyval != 0) {
+ shortcutHandle = GTK4.gtk_shortcut_new(
+ GTK4.gtk_keyval_trigger_new(keyval, mask),
+ GTK4.gtk_named_action_new(Converter.javaStringToCString(actionName))
+ );
+ if (shortcutHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ GTK4.gtk_shortcut_controller_add_shortcut(parent.shortcutController, shortcutHandle);
+ }
}
/**
@@ -779,11 +972,31 @@ public void setAccelerator (int accelerator) {
*/
public void setEnabled (boolean enabled) {
checkWidget();
- if (GTK.gtk_widget_get_sensitive (handle) == enabled) return;
- long accelGroup = getAccelGroup ();
- if (accelGroup != 0) removeAccelerator (accelGroup);
- GTK.gtk_widget_set_sensitive (handle, enabled);
- if (accelGroup != 0) addAccelerator (accelGroup);
+
+ if (GTK.GTK4) {
+ if (actionHandle != 0) OS.g_simple_action_set_enabled(actionHandle, enabled);
+ } else {
+ if (GTK.gtk_widget_get_sensitive(handle) == enabled) return;
+ long accelGroup = getAccelGroup();
+ if (accelGroup != 0) removeAccelerator(accelGroup);
+ GTK.gtk_widget_set_sensitive(handle, enabled);
+ if (accelGroup != 0) addAccelerator(accelGroup);
+ }
+
+ if (this.enabled == enabled) return;
+ this.enabled = enabled;
+
+ _setEnabledOrDisabledImage();
+}
+
+private void _setEnabledOrDisabledImage() {
+ if (!enabled) {
+ if (defaultDisableImage == null && image != null) {
+ defaultDisableImage = new Image(getDisplay(), image, SWT.IMAGE_DISABLE);
+ }
+ _setImage(defaultDisableImage);
+ }
+ if (enabled && image != null) _setImage(image);
}
/**
@@ -811,10 +1024,7 @@ public void setID (int id) {
* <p>
* Note: This operation is a <em>HINT</em> and is not supported on
* platforms that do not have this concept (for example, Windows NT).
- * Furthermore, some platforms (such as GTK2), cannot display both
- * a check box and an image at the same time. Instead, they hide
- * the image and display the check box. Some platforms (such as GTK3)
- * support images alongside check boxes.
+ * Some platforms (such as GTK3) support images alongside check boxes.
* </p>
*
* @param image the image to display on the receiver (may be null)
@@ -826,53 +1036,58 @@ public void setID (int id) {
*/
@Override
public void setImage (Image image) {
+ //TODO: GTK4 Menu images with text are no longer supported
+ if (GTK.GTK4) return;
+
checkWidget();
+ if (this.image == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
+ disposeDefaultDisabledImage();
super.setImage (image);
+
+ _setEnabledOrDisabledImage();
+}
+
+private void _setImage (Image image) {
if (image != null) {
ImageList imageList = parent.imageList;
if (imageList == null) imageList = parent.imageList = new ImageList ();
int imageIndex = imageList.indexOf (image);
+ long surface = 0;
if (imageIndex == -1) {
imageIndex = imageList.add (image);
+ surface = imageList.getSurface (imageIndex);
} else {
imageList.put (imageIndex, image);
- }
- long pixbuf = imageList.getPixbuf (imageIndex);
- if (DPIUtil.useCairoAutoScale()) {
- Rectangle imgSize = image.getBounds();
- long scaledPixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, imgSize.width, imgSize.height, GDK.GDK_INTERP_BILINEAR);
- if (scaledPixbuf !=0) {
- pixbuf = scaledPixbuf;
- }
+ surface = imageList.getSurface (imageIndex);
}
- if (!GTK.GTK_IS_MENU_ITEM (handle)) return;
+ if (!GTK3.GTK_IS_MENU_ITEM (handle)) return;
if (OS.SWT_PADDED_MENU_ITEMS && imageHandle != 0) {
- GTK.gtk_image_set_from_pixbuf(imageHandle, pixbuf);
+ GTK3.gtk_image_set_from_surface(imageHandle, surface);
} else {
- if (imageHandle == 0 && boxHandle != 0) {
- imageHandle = GTK.gtk_image_new_from_pixbuf (pixbuf);
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_box_reorder_child (boxHandle, imageHandle, 0);
+ if (imageHandle == 0) {
+ imageHandle = GTK3.gtk_image_new_from_surface(surface);
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK3.gtk_container_add(boxHandle, imageHandle);
+ GTK3.gtk_box_reorder_child(boxHandle, imageHandle, 0);
} else {
- GTK.gtk_image_set_from_pixbuf(imageHandle, pixbuf);
+ GTK3.gtk_image_set_from_surface(imageHandle, surface);
}
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
}
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_widget_show (imageHandle);
+ GTK.gtk_widget_show(imageHandle);
} else {
- if (imageHandle != 0 && boxHandle != 0) {
+ if (imageHandle != 0) {
if (OS.SWT_PADDED_MENU_ITEMS) {
- GTK.gtk_container_remove(boxHandle, imageHandle);
+ GTK3.gtk_container_remove(boxHandle, imageHandle);
imageHandle = GTK.gtk_image_new ();
if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
GTK.gtk_image_set_pixel_size (imageHandle, 16);
- GTK.gtk_container_add (boxHandle, imageHandle);
+ GTK3.gtk_container_add (boxHandle, imageHandle);
GTK.gtk_widget_show (imageHandle);
} else {
- GTK.gtk_container_remove(boxHandle, imageHandle);
+ GTK3.gtk_container_remove(boxHandle, imageHandle);
imageHandle = 0;
}
}
@@ -923,33 +1138,48 @@ public void setMenu (Menu menu) {
/* Assign the new menu */
Menu oldMenu = this.menu;
if (oldMenu == menu) return;
- long accelGroup = getAccelGroup ();
- if (accelGroup != 0) removeAccelerators (accelGroup);
- if (oldMenu != null) {
- oldMenu.cascade = null;
- /*
- * Add a reference to the menu we are about
- * to replace or GTK will destroy it.
- */
- OS.g_object_ref (oldMenu.handle);
- GTK.gtk_menu_item_set_submenu (handle, 0);
- }
- if ((this.menu = menu) != null) {
- menu.cascade = this;
- GTK.gtk_menu_item_set_submenu (handle, menu.handle);
+
+ if (GTK.GTK4) {
+ this.menu = menu;
+ if (menu != null) {
+ menu.cascade = this;
+ OS.g_menu_item_set_submenu(handle, menu.modelHandle);
+ } else {
+ oldMenu.cascade = null;
+ OS.g_menu_item_set_submenu(handle, 0);
+ }
+
+ OS.g_menu_remove(section.getSectionHandle(), section.getItemPosition(this));
+ OS.g_menu_insert_item(section.getSectionHandle(), section.getItemPosition(this), handle);
+ } else {
+ long accelGroup = getAccelGroup ();
+ if (accelGroup != 0) removeAccelerators (accelGroup);
+ if (oldMenu != null) {
+ oldMenu.cascade = null;
+ /*
+ * Add a reference to the menu we are about
+ * to replace or GTK will destroy it.
+ */
+ OS.g_object_ref (oldMenu.handle);
+ GTK3.gtk_menu_item_set_submenu (handle, 0);
+ }
+ if ((this.menu = menu) != null) {
+ menu.cascade = this;
+ GTK3.gtk_menu_item_set_submenu (handle, menu.handle);
+ }
+ if (accelGroup != 0) addAccelerators (accelGroup);
}
- if (accelGroup != 0) addAccelerators (accelGroup);
}
@Override
void setOrientation (boolean create) {
- super.setOrientation (create);
- if ((parent.style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
- int dir = (parent.style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
- GTK.gtk_widget_set_direction (handle, dir);
- GTK.gtk_container_forall (handle, display.setDirectionProc, dir);
- if (menu != null) menu._setOrientation (parent.style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
- }
+ super.setOrientation (create);
+ if ((parent.style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
+ int dir = (parent.style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
+ GTK.gtk_widget_set_direction (handle, dir);
+ GTK3.gtk_container_forall (handle, display.setDirectionProc, dir);
+ if (menu != null) menu._setOrientation (parent.style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
+ }
}
boolean setRadioSelection (boolean value) {
@@ -977,10 +1207,19 @@ boolean setRadioSelection (boolean value) {
public void setSelection (boolean selected) {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
- OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ACTIVATE);
- GTK.gtk_check_menu_item_set_active (handle, selected);
- if ((style & SWT.RADIO) != 0) GTK.gtk_check_menu_item_set_active (groupHandle, !selected);
- OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ACTIVATE);
+
+ if (GTK.GTK4) {
+ if ((style & SWT.CHECK) != 0) {
+ OS.g_simple_action_set_state(actionHandle, OS.g_variant_new_boolean(selected));
+ } else {
+ OS.g_simple_action_set_state(actionHandle, OS.g_variant_new_string(Converter.javaStringToCString(selected ? "toggled" : "untoggled")));
+ }
+ } else {
+ OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ACTIVATE);
+ GTK3.gtk_check_menu_item_set_active (handle, selected);
+ if ((style & SWT.RADIO) != 0) GTK3.gtk_check_menu_item_set_active (groupHandle, !selected);
+ OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ACTIVATE);
+ }
}
/**
@@ -1023,27 +1262,43 @@ public void setSelection (boolean selected) {
@Override
public void setText (String string) {
checkWidget();
- if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
+ if (string == null) error(SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
- if (text.equals (string)) return;
- super.setText (string);
- int index = string.indexOf ('\t');
+ if (text.equals(string)) return;
+ super.setText(string);
+
+ int index = string.indexOf('\t');
if (index != -1) {
- string = string.substring (0, index);
+ string = string.substring(0, index);
}
- char [] chars = fixMnemonic (string);
- byte [] buffer = Converter.wcsToMbcs (chars, true);
- if (labelHandle != 0 && GTK.GTK_IS_LABEL (labelHandle)) {
- GTK.gtk_label_set_text_with_mnemonic (labelHandle, buffer);
- if (GTK.GTK_IS_ACCEL_LABEL (labelHandle)) {
- MaskKeysym maskKeysym = getMaskKeysym();
- if (maskKeysym != null) {
- GTK.gtk_accel_label_set_accel_widget (labelHandle, handle);
- GTK.gtk_accel_label_set_accel (labelHandle,
- maskKeysym.keysym, maskKeysym.mask);
+ char[] chars = fixMnemonic(string);
+ byte[] buffer = Converter.wcsToMbcs(chars, true);
+
+ if (GTK.GTK4) {
+ OS.g_menu_item_set_label(handle, buffer);
+ MaskKeysym maskKeysym = getMaskKeysym();
+ if (maskKeysym != null) {
+ OS.g_menu_item_set_attribute(handle,
+ Converter.javaStringToCString("accel"),
+ Converter.javaStringToCString("s"),
+ GTK.gtk_accelerator_name(maskKeysym.keysym, maskKeysym.mask)
+ );
+ }
+ OS.g_menu_remove(section.getSectionHandle(), section.getItemPosition(this));
+ OS.g_menu_insert_item(section.getSectionHandle(), section.getItemPosition(this), handle);
+ } else {
+ if (labelHandle != 0 && GTK.GTK_IS_LABEL (labelHandle)) {
+ GTK.gtk_label_set_text_with_mnemonic (labelHandle, buffer);
+ if (GTK.GTK_IS_ACCEL_LABEL (labelHandle)) {
+ MaskKeysym maskKeysym = getMaskKeysym();
+ if (maskKeysym != null) {
+ GTK3.gtk_accel_label_set_accel_widget (labelHandle, handle);
+ GTK3.gtk_accel_label_set_accel (labelHandle,
+ maskKeysym.keysym, maskKeysym.mask);
+ }
+ // A workaround for Ubuntu Unity global menu
+ OS.g_signal_emit_by_name(handle, OS.accel_closures_changed);
}
- // A workaround for Ubuntu Unity global menu
- OS.g_signal_emit_by_name(handle, OS.accel_closures_changed);
}
}
}
@@ -1078,11 +1333,14 @@ public void setText (String string) {
*
* @since 3.104
*/
-public void setToolTipText (String toolTip) {
+public void setToolTipText(String toolTip) {
checkWidget();
- if (toolTip != null && (toolTip.trim().length() == 0 || toolTip.equals (toolTipText))) return;
+ if (GTK.GTK4) return; // GTK4 does not support tooltips within menus
- this.parent.getShell().setToolTipText (handle, (toolTipText = toolTip));
+ if (toolTip != null && (toolTip.trim().length() == 0 || toolTip.equals(toolTipText))) return;
+
+ toolTipText = toolTip;
+ setToolTipText(handle, toolTip);
}
void updateAccelerator (long accelGroup, boolean add) {
@@ -1105,14 +1363,14 @@ void updateAccelerator (long accelGroup, boolean add) {
/* When accel_key is zero, it causes GTK warnings */
if (keysym != 0) {
if (add) {
- GTK.gtk_widget_add_accelerator (handle, OS.activate, accelGroup, keysym, mask, GTK.GTK_ACCEL_VISIBLE);
+ GTK3.gtk_widget_add_accelerator(handle, OS.activate, accelGroup, keysym, mask, GTK.GTK_ACCEL_VISIBLE);
} else {
- GTK.gtk_widget_remove_accelerator (handle, accelGroup, keysym, mask);
+ GTK3.gtk_widget_remove_accelerator(handle, accelGroup, keysym, mask);
}
}
}
-private class MaskKeysym {
+private static class MaskKeysym {
int mask = 0;
int keysym = 0;
}
@@ -1180,12 +1438,30 @@ boolean updateAcceleratorText (boolean show) {
if (maskKeysym.keysym != 0) {
long accelGroup = getAccelGroup ();
if (show) {
- GTK.gtk_widget_add_accelerator (handle, OS.activate, accelGroup, maskKeysym.keysym, maskKeysym.mask, GTK.GTK_ACCEL_VISIBLE);
+ GTK3.gtk_widget_add_accelerator (handle, OS.activate, accelGroup, maskKeysym.keysym, maskKeysym.mask, GTK.GTK_ACCEL_VISIBLE);
} else {
- GTK.gtk_widget_remove_accelerator (handle, accelGroup, maskKeysym.keysym, maskKeysym.mask);
+ GTK3.gtk_widget_remove_accelerator (handle, accelGroup, maskKeysym.keysym, maskKeysym.mask);
}
}
return maskKeysym.keysym != 0;
}
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ return 0;
+}
+
+private void disposeDefaultDisabledImage() {
+ if (defaultDisableImage != null) {
+ defaultDisableImage.dispose();
+ defaultDisableImage = null;
+ }
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java
index 5b2746e9d1..e7c36b38ee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java
@@ -17,6 +17,8 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are used to inform or warn the user.
@@ -45,6 +47,7 @@ public class MessageBox extends Dialog {
String message = "";
long handle;
+
/**
* Constructs a new instance of this class given only its parent.
*
@@ -142,7 +145,7 @@ public void setMessage (String string) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the dialog</li>
* </ul>
*/
-public int open () {
+public int open() {
long parentHandle = (parent != null) ? parent.topHandle() : 0;
int dialogFlags = GTK.GTK_DIALOG_DESTROY_WITH_PARENT;
if ((style & (SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
@@ -153,76 +156,98 @@ public int open () {
if ((style & (SWT.ICON_QUESTION)) != 0) messageType = GTK.GTK_MESSAGE_QUESTION;
if ((style & (SWT.ICON_ERROR)) != 0) messageType = GTK.GTK_MESSAGE_ERROR;
- byte [] format = Converter.wcsToMbcs ("%s", true);
- byte [] buffer = Converter.wcsToMbcs (message, true);
+ byte[] format = Converter.wcsToMbcs("%s", true);
+ byte[] buffer = Converter.wcsToMbcs(title, true);
handle = GTK.gtk_message_dialog_new(parentHandle, dialogFlags, messageType, 0, format, buffer);
if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ // Copy parent's icon
if (parentHandle != 0) {
- long pixbufs = GTK.gtk_window_get_icon_list (parentHandle);
- if (pixbufs != 0) {
- GTK.gtk_window_set_icon_list (handle, pixbufs);
- OS.g_list_free (pixbufs);
+ if (GTK.GTK4) {
+ /*
+ * TODO: This may not work as we are setting the icon list of the GtkWindow through
+ * GdkToplevel (which has no way of retrieving the icon list set. See bug 572200.
+ */
+ long iconName = GTK4.gtk_window_get_icon_name(parentHandle);
+ if (iconName != 0) {
+ GTK4.gtk_window_set_icon_name(handle, iconName);
+ }
+ } else {
+ long pixbufs = GTK3.gtk_window_get_icon_list(parentHandle);
+ if (pixbufs != 0) {
+ GTK3.gtk_window_set_icon_list(handle, pixbufs);
+ OS.g_list_free (pixbufs);
+ }
}
}
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- createButtons (display.getDismissalAlignment ());
- buffer = Converter.wcsToMbcs(title, true);
- GTK.gtk_window_set_title(handle,buffer);
- display.addIdleProc ();
+
+ Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+ createButtons(display.getDismissalAlignment());
+ GTK.gtk_message_dialog_format_secondary_text(handle, format, Converter.javaStringToCString(message));
+
+ display.addIdleProc();
Dialog oldModal = null;
+ if (GTK.gtk_window_get_modal(handle)) {
+ oldModal = display.getModalDialog();
+ display.setModalDialog(this);
+ }
/*
* In order to allow the dialog to be modal of it's
* parent shells, it is required to assign the
* dialog to the same window group as of the shells.
*/
- long group = GTK.gtk_window_get_group(0);
- GTK.gtk_window_group_add_window (group, handle);
+ long defaultWindowGroup = GTK.gtk_window_get_group(0);
+ GTK.gtk_window_group_add_window(defaultWindowGroup, handle);
- if (GTK.gtk_window_get_modal (handle)) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
- }
int signalId = 0;
long hookId = 0;
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- signalId = OS.g_signal_lookup (OS.map, GTK.GTK_TYPE_WIDGET());
- hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
+ signalId = OS.g_signal_lookup(OS.map, GTK.GTK_TYPE_WIDGET());
+ hookId = OS.g_signal_add_emission_hook(signalId, 0, display.emissionProc, handle, 0);
}
- display.sendPreExternalEventDispatchEvent ();
- int response = GTK.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- display.sendPostExternalEventDispatchEvent ();
+
+ int response;
+ if (GTK.GTK4) {
+ response = SyncDialogUtil.run(display, handle, false);
+ } else {
+ display.externalEventLoop = true;
+ display.sendPreExternalEventDispatchEvent();
+ response = GTK3.gtk_dialog_run(handle);
+ display.externalEventLoop = false;
+ display.sendPostExternalEventDispatchEvent();
+ }
+
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- OS.g_signal_remove_emission_hook (signalId, hookId);
+ OS.g_signal_remove_emission_hook(signalId, hookId);
+ }
+ if (GTK.gtk_window_get_modal(handle)) {
+ display.setModalDialog(oldModal);
}
- if (GTK.gtk_window_get_modal (handle)) {
- display.setModalDialog (oldModal);
+ display.removeIdleProc();
+
+ if (GTK.GTK4) {
+ GTK4.gtk_window_destroy(handle);
+ } else {
+ GTK3.gtk_widget_destroy(handle);
}
- display.removeIdleProc ();
- GTK.gtk_widget_destroy (handle);
+
return response;
}
private void createButtons (int alignment) {
if (alignment == SWT.LEFT) {
- if ((style & SWT.OK) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-ok", true), SWT.OK);
+ if ((style & SWT.OK) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_OK"), true), SWT.OK);
if ((style & SWT.ABORT) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Abort"), true), SWT.ABORT);
if ((style & SWT.RETRY) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Retry"), true), SWT.RETRY);
- if ((style & SWT.YES) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-yes", true), SWT.YES);
- if ((style & SWT.NO) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-no", true), SWT.NO);
+ if ((style & SWT.YES) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Yes"), true), SWT.YES);
+ if ((style & SWT.NO) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_No"), true), SWT.NO);
if ((style & SWT.IGNORE) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Ignore"), true), SWT.IGNORE);
- if ((style & SWT.CANCEL) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-cancel", true), SWT.CANCEL);
+ if ((style & SWT.CANCEL) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Cancel"), true), SWT.CANCEL);
} else {
- if ((style & SWT.CANCEL) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-cancel", true), SWT.CANCEL);
- if ((style & SWT.OK) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-ok", true), SWT.OK);
- if ((style & SWT.NO) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-no", true), SWT.NO);
- if ((style & SWT.YES) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs ("gtk-yes", true), SWT.YES);
+ if ((style & SWT.CANCEL) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Cancel"), true), SWT.CANCEL);
+ if ((style & SWT.OK) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_OK"), true), SWT.OK);
+ if ((style & SWT.NO) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_No"), true), SWT.NO);
+ if ((style & SWT.YES) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Yes"), true), SWT.YES);
if ((style & SWT.IGNORE) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Ignore"), true), SWT.IGNORE);
if ((style & SWT.RETRY) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Retry"), true), SWT.RETRY);
if ((style & SWT.ABORT) != 0) GTK.gtk_dialog_add_button(handle, Converter.wcsToMbcs (SWT.getMessage("SWT_Abort"), true), SWT.ABORT);
@@ -238,5 +263,4 @@ private static int checkStyle (int style) {
style = (style & ~mask) | SWT.OK;
return style;
}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java
index 90f681cec8..90883931bb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java
@@ -17,6 +17,7 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
/**
* Instances of the receiver represent an unselectable
@@ -74,33 +75,52 @@ public class ProgressBar extends Control {
* @see Widget#checkSubclass
* @see Widget#getStyle
*/
-public ProgressBar (Composite parent, int style) {
- super (parent, checkStyle(style));
+public ProgressBar(Composite parent, int style) {
+ super(parent, checkStyle(style));
}
-static int checkStyle (int style) {
+static int checkStyle(int style) {
style |= SWT.NO_FOCUS;
- return checkBits (style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0);
+ return checkBits(style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0);
}
@Override
-void createHandle (int index) {
+void createHandle(int index) {
state |= HANDLE;
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
- handle = GTK.gtk_progress_bar_new ();
+
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ handle = GTK.gtk_progress_bar_new();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, handle);
- int orientation = (style & SWT.VERTICAL) != 0 ? GTK.GTK_PROGRESS_BOTTOM_TO_TOP : GTK.GTK_PROGRESS_LEFT_TO_RIGHT;
- gtk_orientable_set_orientation (handle, orientation);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ GTK3.gtk_container_add(fixedHandle, handle);
+ }
+
+ boolean vertical = (style & SWT.VERTICAL) != 0;
+ if (vertical) {
+ GTK.gtk_orientable_set_orientation(handle, GTK.GTK_ORIENTATION_VERTICAL);
+ GTK.gtk_progress_bar_set_inverted(handle, true);
+ } else {
+ GTK.gtk_orientable_set_orientation(handle, GTK.GTK_ORIENTATION_HORIZONTAL);
+ GTK.gtk_progress_bar_set_inverted(handle, false);
+ }
+
if ((style & SWT.INDETERMINATE) != 0) {
- timerId = OS.g_timeout_add (DELAY, display.windowTimerProc, handle);
+ if (GTK.GTK4) {
+ timerId = OS.g_timeout_add(DELAY, display.windowTimerProc, handle);
+ } else {
+ timerId = GDK.gdk_threads_add_timeout(DELAY, display.windowTimerProc, handle);
+ }
}
}
@Override
-long eventHandle () {
+long eventHandle() {
return fixedHandle;
}
@@ -114,8 +134,8 @@ long eventHandle () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getMaximum () {
- checkWidget ();
+public int getMaximum() {
+ checkWidget();
return maximum;
}
@@ -129,8 +149,8 @@ public int getMaximum () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getMinimum () {
- checkWidget ();
+public int getMinimum() {
+ checkWidget();
return minimum;
}
@@ -144,8 +164,8 @@ public int getMinimum () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getSelection () {
- checkWidget ();
+public int getSelection() {
+ checkWidget();
return selection;
}
@@ -166,14 +186,14 @@ public int getSelection () {
*
* @since 3.4
*/
-public int getState () {
- checkWidget ();
+public int getState() {
+ checkWidget();
return SWT.NORMAL;
}
@Override
-long gtk_realize (long widget) {
- long result = super.gtk_realize (widget);
+long gtk_realize(long widget) {
+ long result = super.gtk_realize(widget);
if (result != 0) return result;
/*
* Bug in GTK. When a progress bar has been unrealized after being
@@ -181,7 +201,7 @@ long gtk_realize (long widget) {
* fix is to update the progress bar state only when realized and restore
* the state when the progress bar becomes realized.
*/
- updateBar (selection, minimum, maximum);
+ updateBar();
return 0;
}
@@ -191,23 +211,21 @@ long gtk_realize (long widget) {
* 2 warnings. For this reason, do not perform GtkCSSNode calculations.
*/
@Override
-Point resizeCalculationsGTK3 (long widget, int width, int height) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- // avoid warnings in GTK caused by too narrow progress bars
- width = Math.max(2, width);
- }
- return new Point (width, height);
+Point resizeCalculationsGTK3(long widget, int width, int height) {
+ // Avoid warnings in GTK caused by too narrow progress bars
+ width = Math.max(2, width);
+ return new Point(width, height);
}
@Override
-void releaseWidget () {
- super.releaseWidget ();
- if (timerId != 0) OS.g_source_remove (timerId);
+void releaseWidget() {
+ super.releaseWidget();
+ if (timerId != 0) OS.g_source_remove(timerId);
timerId = 0;
}
@Override
-void setParentBackground () {
+void setParentBackground() {
/*
* Bug in GTK. For some reason, some theme managers will crash
* when the progress bar is inheriting the background from a parent.
@@ -229,12 +247,13 @@ void setParentBackground () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setMaximum (int value) {
- checkWidget ();
+public void setMaximum(int value) {
+ checkWidget();
if (value <= minimum) return;
+
maximum = value;
- selection = Math.min (selection, maximum);
- updateBar (selection, minimum, maximum);
+ selection = Math.min(selection, maximum);
+ updateBar();
}
/**
@@ -250,12 +269,13 @@ public void setMaximum (int value) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setMinimum (int value) {
- checkWidget ();
+public void setMinimum(int value) {
+ checkWidget();
if (value < 0 || value >= maximum) return;
+
minimum = value;
- selection = Math.max (selection, minimum);
- updateBar (selection, minimum, maximum);
+ selection = Math.max(selection, minimum);
+ updateBar();
}
/**
@@ -270,10 +290,11 @@ public void setMinimum (int value) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setSelection (int value) {
- checkWidget ();
- selection = Math.max (minimum, Math.min (maximum, value));
- updateBar (selection, minimum, maximum);
+public void setSelection(int value) {
+ checkWidget();
+
+ selection = Math.max(minimum, Math.min(maximum, value));
+ updateBar();
}
/**
@@ -297,40 +318,27 @@ public void setSelection (int value) {
*
* @since 3.4
*/
-public void setState (int state) {
- checkWidget ();
- //NOT IMPLEMENTED
+public void setState(int state) {
+ checkWidget();
+ //NOT SUPPORTED BY GTK
}
@Override
-long timerProc (long widget) {
- if (isVisible ()) GTK.gtk_progress_bar_pulse (handle);
+long timerProc(long widget) {
+ if (isVisible()) GTK.gtk_progress_bar_pulse(handle);
return 1;
}
-void updateBar (int selection, int minimum, int maximum) {
+void updateBar() {
/*
* Bug in GTK. When a progress bar has been unrealized after being
* realized at least once, gtk_progress_bar_set_fraction() GP's. The
* fix is to update the progress bar state only when realized and restore
* the state when the progress bar becomes realized.
*/
- if (!GTK.gtk_widget_get_realized (handle)) return;
+ if (!GTK.gtk_widget_get_realized(handle)) return;
double fraction = minimum == maximum ? 1 : (double)(selection - minimum) / (maximum - minimum);
- GTK.gtk_progress_bar_set_fraction (handle, fraction);
-}
-
-void gtk_orientable_set_orientation (long pbar, int orientation) {
- switch (orientation) {
- case GTK.GTK_PROGRESS_BOTTOM_TO_TOP:
- GTK.gtk_orientable_set_orientation(pbar, GTK.GTK_ORIENTATION_VERTICAL);
- GTK.gtk_progress_bar_set_inverted(pbar, true);
- break;
- case GTK.GTK_PROGRESS_LEFT_TO_RIGHT:
- GTK.gtk_orientable_set_orientation(pbar, GTK.GTK_ORIENTATION_HORIZONTAL);
- GTK.gtk_progress_bar_set_inverted(pbar, false);
- break;
- }
+ GTK.gtk_progress_bar_set_fraction(handle, fraction);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
index 469219c049..33cc1c8365 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of the receiver represent a selectable user interface object
@@ -49,6 +51,8 @@ public class Sash extends Control {
private final static int INCREMENT = 1;
private final static int PAGE_INCREMENT = 9;
+ private final static int DEFAULT_CROSS_AXIS_SIZE = 3;
+
/**
* Constructs a new instance of this class given its parent
* and a style value describing its behavior and appearance.
@@ -79,8 +83,8 @@ public class Sash extends Control {
* @see Widget#checkSubclass
* @see Widget#getStyle
*/
-public Sash (Composite parent, int style) {
- super (parent, checkStyle (style));
+public Sash(Composite parent, int style) {
+ super(parent, checkStyle(style));
}
/**
@@ -108,87 +112,248 @@ public Sash (Composite parent, int style) {
* @see #removeSelectionListener
* @see SelectionEvent
*/
-public void addSelectionListener (SelectionListener listener) {
- checkWidget ();
- if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
- TypedListener typedListener = new TypedListener (listener);
- addListener (SWT.Selection,typedListener);
- addListener (SWT.DefaultSelection,typedListener);
+public void addSelectionListener(SelectionListener listener) {
+ checkWidget();
+ if (listener == null) error(SWT.ERROR_NULL_ARGUMENT);
+
+ TypedListener typedListener = new TypedListener(listener);
+ addListener(SWT.Selection, typedListener);
+ addListener(SWT.DefaultSelection, typedListener);
}
-static int checkStyle (int style) {
+static int checkStyle(int style) {
style |= SWT.SMOOTH;
- return checkBits (style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0);
+ return checkBits(style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0);
}
@Override
-Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
- checkWidget ();
+Point computeSizeInPixels(int wHint, int hHint, boolean changed) {
+ checkWidget();
+
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
- int border = getBorderWidthInPixels ();
+
+ int border = getBorderWidthInPixels();
int width = border * 2, height = border * 2;
if ((style & SWT.HORIZONTAL) != 0) {
- width += DEFAULT_WIDTH; height += 3;
+ width += DEFAULT_WIDTH;
+ height += DEFAULT_CROSS_AXIS_SIZE;
} else {
- width += 3; height += DEFAULT_HEIGHT;
+ width += DEFAULT_CROSS_AXIS_SIZE;
+ height += DEFAULT_HEIGHT;
}
if (wHint != SWT.DEFAULT) width = wHint + (border * 2);
if (hHint != SWT.DEFAULT) height = hHint + (border * 2);
- return new Point (width, height);
+
+ return new Point(width, height);
}
@Override
-void createHandle (int index) {
+void createHandle(int index) {
state |= HANDLE | THEME_BACKGROUND;
- handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (handle, true);
- GTK.gtk_widget_set_can_focus (handle, true);
- if ((style & SWT.VERTICAL) != 0) {
- if (GTK.GTK4) {
- byte [] name = Converter.wcsToMbcs("w-resize", true);
- defaultCursor = GDK.gdk_cursor_new_from_name(name, 0);
+
+ handle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_widget_set_focusable(handle, true);
+ if ((style & SWT.VERTICAL) != 0) {
+ defaultCursor = GDK.gdk_cursor_new_from_name("sb_h_double_arrow", 0);
} else {
- defaultCursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), GDK.GDK_SB_H_DOUBLE_ARROW);
+ defaultCursor = GDK.gdk_cursor_new_from_name("sb_v_double_arrow", 0);
}
} else {
- if (GTK.GTK4) {
- byte [] name = Converter.wcsToMbcs("ns-resize", true);
- defaultCursor = GDK.gdk_cursor_new_from_name(name, 0);
+ GTK3.gtk_widget_set_has_window(handle, true);
+ if ((style & SWT.VERTICAL) != 0) {
+ defaultCursor = GDK.gdk_cursor_new_from_name(GDK.gdk_display_get_default(), "sb_h_double_arrow");
} else {
- defaultCursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), GDK.GDK_SB_V_DOUBLE_ARROW);
+ defaultCursor = GDK.gdk_cursor_new_from_name(GDK.gdk_display_get_default(), "sb_v_double_arrow");
}
}
+
+ GTK.gtk_widget_set_can_focus(handle, true);
}
-void drawBand (int x, int y, int width, int height) {
- if ((style & SWT.SMOOTH) != 0) return;
+@Override
+void gtk_gesture_press_event(long gesture, int n_press, double x, double y, long event) {
+ super.gtk_gesture_press_event(gesture, n_press, x, y, event);
+
+ int eventButton = GDK.gdk_button_event_get_button(event);
+ if (eventButton != 1 || n_press != 1) return;
+
+ startX = (int)x;
+ startY = (int)y;
+
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(handle, allocation);
+ int allocationX = allocation.x;
+ int allocationY = allocation.y;
+ int width = allocation.width;
+ int height = allocation.height;
+ lastX = allocationX;
+ lastY = allocationY;
+
+ Event jEvent = new Event();
+ jEvent.time = GDK.gdk_event_get_time(event);
+ Rectangle eventRect = new Rectangle(lastX, lastY, width, height);
+ jEvent.setBounds(DPIUtil.autoScaleDown(eventRect));
+ if ((style & SWT.SMOOTH) == 0) {
+ jEvent.detail = SWT.DRAG;
+ }
+ if ((parent.style & SWT.MIRRORED) != 0) jEvent.x = DPIUtil.autoScaleDown(parent.getClientWidth() - width) - jEvent.x;
+ sendSelectionEvent(SWT.Selection, jEvent, true);
+ if (isDisposed()) return;
+
+ if (jEvent.doit) {
+ dragging = true;
+ }
+}
+
+@Override
+void gtk_gesture_release_event(long gesture, int n_press, double x, double y, long event) {
+ super.gtk_gesture_release_event(gesture, n_press, x, y, event);
+
+ int eventButton = GDK.gdk_button_event_get_button(event);
+ if (eventButton != 1 || !dragging) return;
+ dragging = false;
+}
+
+@Override
+void gtk4_motion_event(long controller, double x, double y, long event) {
+ super.gtk4_motion_event(controller, x, y, event);
+
+ if (!dragging) return;
+
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(handle, allocation);
+ int allocationX = allocation.x;
+ int allocationY = allocation.y;
+ int width = allocation.width;
+ int height = allocation.height;
+
+ GTK.gtk_widget_get_allocation(parent.handle, allocation);
+ int parentWidth = allocation.width;
+ int parentHeight = allocation.height;
+
+ int newX = lastX, newY = lastY;
+ if ((style & SWT.VERTICAL) != 0) {
+ newX = Math.min(Math.max(0, (int)x + allocationX - startX), parentWidth - width);
+ } else {
+ newY = Math.min(Math.max(0, (int)y + allocationY - startY), parentHeight - height);
+ }
+ if (newX == lastX && newY == lastY) return;
+
+ Event jEvent = new Event();
+ jEvent.time = GDK.gdk_event_get_time(event);
+ Rectangle eventRect = new Rectangle(newX, newY, width, height);
+ jEvent.setBounds(DPIUtil.autoScaleDown(eventRect));
+ if ((style & SWT.SMOOTH) == 0) {
+ jEvent.detail = SWT.DRAG;
+ }
+ if ((parent.style & SWT.MIRRORED) != 0) jEvent.x = DPIUtil.autoScaleDown(parent.getClientWidth() - width) - jEvent.x;
+ sendSelectionEvent(SWT.Selection, jEvent, true);
+ if (isDisposed()) return;
+
+ Rectangle rect = DPIUtil.autoScaleUp(jEvent.getBounds());
+ if (jEvent.doit) {
+ lastX = rect.x;
+ lastY = rect.y;
+ if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth() - width - lastX;
+ }
+ parent.update(true, (style & SWT.SMOOTH) == 0);
+ if ((style & SWT.SMOOTH) != 0) {
+ /*
+ * Use lastX instead of rect.x, as lastX takes into account
+ * the event.doit flag. See bug 522140.
+ */
+ setBoundsInPixels(lastX, lastY, width, height);
+ }
+}
+
+@Override
+boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) {
+ boolean handled = super.gtk4_key_press_event(controller, keyval, keycode, state, event);
+ if (!handled) return handled;
+
+ switch (keyval) {
+ case GDK.GDK_Left:
+ case GDK.GDK_Right:
+ case GDK.GDK_Up:
+ case GDK.GDK_Down:
+ int xChange = 0, yChange = 0;
+ int stepSize = PAGE_INCREMENT;
+ if ((state & GDK.GDK_CONTROL_MASK) != 0) stepSize = INCREMENT;
+ if ((style & SWT.VERTICAL) != 0) {
+ if (keyval == GDK.GDK_Up || keyval == GDK.GDK_Down) break;
+ xChange = keyval == GDK.GDK_Left ? -stepSize : stepSize;
+ } else {
+ if (keyval == GDK.GDK_Left || keyval == GDK.GDK_Right) break;
+ yChange = keyval == GDK.GDK_Up ? -stepSize : stepSize;
+ }
+
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(handle, allocation);
+ int width = allocation.width;
+ int height = allocation.height;
+
+ GTK.gtk_widget_get_allocation(parent.handle, allocation);
+ int parentWidth = allocation.width;
+ int parentHeight = allocation.height;
+
+ int newX = lastX, newY = lastY;
+ if ((style & SWT.VERTICAL) != 0) {
+ newX = Math.min(Math.max(0, lastX + xChange - startX), parentWidth - width);
+ } else {
+ newY = Math.min(Math.max(0, lastY + yChange - startY), parentHeight - height);
+ }
+ if (newX == lastX && newY == lastY) return handled;
+
+ /* The event must be sent because its doit flag is used. */
+ Event jEvent = new Event();
+ jEvent.time = GDK.gdk_event_get_time(event);
+ Rectangle eventRect = new Rectangle(newX, newY, width, height);
+ jEvent.setBounds(DPIUtil.autoScaleDown(eventRect));
+ if ((parent.style & SWT.MIRRORED) != 0) jEvent.x = DPIUtil.autoScaleDown(parent.getClientWidth() - width) - jEvent.x;
+ sendSelectionEvent(SWT.Selection, jEvent, true);
+ if (isDisposed()) break;
+
+ if (jEvent.doit) {
+ Rectangle rect = DPIUtil.autoScaleUp(jEvent.getBounds());
+ lastX = rect.x;
+ lastY = rect.y;
+ if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth() - width - lastX;
+ if ((style & SWT.SMOOTH) != 0) {
+ setBoundsInPixels(rect.x, rect.y, width, height);
+ if (isDisposed()) break;
+ }
+ }
+ }
+
+ return handled;
}
@Override
-long gtk_button_press_event (long widget, long event) {
- long result = super.gtk_button_press_event (widget, event);
+long gtk_button_press_event(long widget, long event) {
+ long result = super.gtk_button_press_event(widget, event);
if (result != 0) return result;
- // Event fields
- int [] eventButton = new int [1];
+
+ int[] eventButton = new int[1];
GDK.gdk_event_get_button(event, eventButton);
- int eventType = GDK.gdk_event_get_event_type(event);
- double [] eventRX = new double [1];
- double [] eventRY = new double [1];
- GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int eventTime = GDK.gdk_event_get_time(event);
+ if (eventButton[0] != 1) return 0;
- int button = eventButton[0];
- if (button != 1) return 0;
+ int eventType = GDK.gdk_event_get_event_type(event);
if (eventType == GDK.GDK_2BUTTON_PRESS) return 0;
if (eventType == GDK.GDK_3BUTTON_PRESS) return 0;
- long window = gtk_widget_get_window (widget);
- int [] origin_x = new int [1], origin_y = new int [1];
- GDK.gdk_window_get_origin (window, origin_x, origin_y);
- startX = (int) (eventRX[0] - origin_x [0]);
- startY = (int) (eventRY[0] - origin_y [0]);
- GtkAllocation allocation = new GtkAllocation ();
+
+ double[] eventRX = new double[1], eventRY = new double[1];
+ GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
+ long window = gtk_widget_get_window(widget);
+ int[] origin_x = new int[1], origin_y = new int[1];
+ GDK.gdk_window_get_origin(window, origin_x, origin_y);
+ startX = (int)(eventRX[0] - origin_x[0]);
+ startY = (int)(eventRY[0] - origin_y[0]);
+
+ GtkAllocation allocation = new GtkAllocation();
GTK.gtk_widget_get_allocation(handle, allocation);
int x = allocation.x;
int y = allocation.y;
@@ -196,88 +361,89 @@ long gtk_button_press_event (long widget, long event) {
int height = allocation.height;
lastX = x;
lastY = y;
- Event jEvent = new Event ();
- jEvent.time = eventTime;
- Rectangle eventRect = new Rectangle (lastX, lastY, width, height);
- jEvent.setBounds (DPIUtil.autoScaleDown (eventRect));
+
+ Event jEvent = new Event();
+ jEvent.time = GDK.gdk_event_get_time(event);
+ Rectangle eventRect = new Rectangle(lastX, lastY, width, height);
+ jEvent.setBounds(DPIUtil.autoScaleDown(eventRect));
if ((style & SWT.SMOOTH) == 0) {
jEvent.detail = SWT.DRAG;
}
- if ((parent.style & SWT.MIRRORED) != 0) jEvent.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - jEvent.x;
- sendSelectionEvent (SWT.Selection, jEvent, true);
- if (isDisposed ()) return 0;
+ if ((parent.style & SWT.MIRRORED) != 0) jEvent.x = DPIUtil.autoScaleDown(parent.getClientWidth() - width) - jEvent.x;
+ sendSelectionEvent(SWT.Selection, jEvent, true);
+ if (isDisposed()) return 0;
if (jEvent.doit) {
dragging = true;
- Rectangle rect = DPIUtil.autoScaleUp (jEvent.getBounds ());
+ Rectangle rect = DPIUtil.autoScaleUp(jEvent.getBounds());
lastX = rect.x;
lastY = rect.y;
- if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX;
- parent.update (true, (style & SWT.SMOOTH) == 0);
- drawBand (lastX, rect.y, width, height);
+ if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth() - width - lastX;
+ parent.update(true, (style & SWT.SMOOTH) == 0);
if ((style & SWT.SMOOTH) != 0) {
- setBoundsInPixels (rect.x, rect.y, width, height);
+ setBoundsInPixels(rect.x, rect.y, width, height);
// widget could be disposed at this point
}
}
+
return result;
}
@Override
-long gtk_button_release_event (long widget, long event) {
- long result = super.gtk_button_release_event (widget, event);
+long gtk_button_release_event(long widget, long event) {
+ long result = super.gtk_button_release_event(widget, event);
if (result != 0) return result;
- int [] eventButton = new int [1];
+
+ int[] eventButton = new int[1];
GDK.gdk_event_get_button(event, eventButton);
- int eventTime = GDK.gdk_event_get_time(event);
- int button = eventButton[0];
- if (button != 1) return 0;
- if (!dragging) return 0;
+ if (eventButton[0] != 1 || !dragging) return 0;
+
dragging = false;
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
+
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(handle, allocation);
int width = allocation.width;
int height = allocation.height;
- Event jEvent = new Event ();
- jEvent.time = eventTime;
- Rectangle eventRect = new Rectangle (lastX, lastY, width, height);
- jEvent.setBounds (DPIUtil.autoScaleDown (eventRect));
- drawBand (lastX, lastY, width, height);
- if ((parent.style & SWT.MIRRORED) != 0) jEvent.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - jEvent.x;
- sendSelectionEvent (SWT.Selection, jEvent, true);
- if (isDisposed ()) return result;
+
+ Event jEvent = new Event();
+ jEvent.time = GDK.gdk_event_get_time(event);
+ Rectangle eventRect = new Rectangle(lastX, lastY, width, height);
+ jEvent.setBounds(DPIUtil.autoScaleDown(eventRect));
+ if ((parent.style & SWT.MIRRORED) != 0) jEvent.x = DPIUtil.autoScaleDown(parent.getClientWidth() - width) - jEvent.x;
+ sendSelectionEvent(SWT.Selection, jEvent, true);
+ if (isDisposed()) return result;
if (jEvent.doit) {
if ((style & SWT.SMOOTH) != 0) {
- Rectangle rect = DPIUtil.autoScaleUp (jEvent.getBounds ());
- setBoundsInPixels (rect.x, rect.y, width, height);
+ Rectangle rect = DPIUtil.autoScaleUp(jEvent.getBounds());
+ setBoundsInPixels(rect.x, rect.y, width, height);
// widget could be disposed at this point
}
}
+
return result;
}
@Override
-long gtk_draw (long widget, long cairo) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- long context = GTK.gtk_widget_get_style_context(widget);
- GtkAllocation allocation = new GtkAllocation();
- GTK.gtk_widget_get_allocation (widget, allocation);
- int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
- int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
- // We specify a 0 value for x & y as we want the whole widget to be
- // colored, not some portion of it.
- GTK.gtk_render_background(context, cairo, 0, 0, width, height);
- }
+long gtk_draw(long widget, long cairo) {
+ long context = GTK.gtk_widget_get_style_context(widget);
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(widget, allocation);
+ int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+ int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
+
+ // We specify a 0 value for x & y as we want the whole widget to be
+ // colored, not some portion of it.
+ GTK.gtk_render_background(context, cairo, 0, 0, width, height);
return super.gtk_draw(widget, cairo);
}
@Override
-long gtk_focus_in_event (long widget, long event) {
- long result = super.gtk_focus_in_event (widget, event);
+long gtk_focus_in_event(long widget, long event) {
+ long result = super.gtk_focus_in_event(widget, event);
if (result != 0) return result;
// widget could be disposed at this point
if (handle != 0) {
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(handle, allocation);
lastX = allocation.x;
lastY = allocation.y;
}
@@ -285,13 +451,14 @@ long gtk_focus_in_event (long widget, long event) {
}
@Override
-long gtk_key_press_event (long widget, long eventPtr) {
- long result = super.gtk_key_press_event (widget, eventPtr);
+long gtk_key_press_event(long widget, long eventPtr) {
+ long result = super.gtk_key_press_event(widget, eventPtr);
if (result != 0) return result;
- int [] key = new int[1];
+
+ int[] key = new int[1], state = new int[1];
GDK.gdk_event_get_keyval(eventPtr, key);
- int [] state = new int[1];
GDK.gdk_event_get_state(eventPtr, state);
+
switch (key[0]) {
case GDK.GDK_Left:
case GDK.GDK_Right:
@@ -304,57 +471,60 @@ long gtk_key_press_event (long widget, long eventPtr) {
if (key[0] == GDK.GDK_Up || key[0] == GDK.GDK_Down) break;
xChange = key[0] == GDK.GDK_Left ? -stepSize : stepSize;
} else {
- if (key[0] == GDK.GDK_Left ||key[0] == GDK.GDK_Right) break;
+ if (key[0] == GDK.GDK_Left || key[0] == GDK.GDK_Right) break;
yChange = key[0] == GDK.GDK_Up ? -stepSize : stepSize;
}
- int parentBorder = 0;
- GtkAllocation allocation = new GtkAllocation ();
+
+ GtkAllocation allocation = new GtkAllocation();
GTK.gtk_widget_get_allocation (handle, allocation);
int width = allocation.width;
int height = allocation.height;
+
GTK.gtk_widget_get_allocation (parent.handle, allocation);
int parentWidth = allocation.width;
int parentHeight = allocation.height;
+
int newX = lastX, newY = lastY;
if ((style & SWT.VERTICAL) != 0) {
- newX = Math.min (Math.max (0, lastX + xChange - parentBorder - startX), parentWidth - width);
+ newX = Math.min(Math.max(0, lastX + xChange - startX), parentWidth - width);
} else {
- newY = Math.min (Math.max (0, lastY + yChange - parentBorder - startY), parentHeight - height);
+ newY = Math.min(Math.max(0, lastY + yChange - startY), parentHeight - height);
}
if (newX == lastX && newY == lastY) return result;
/* Ensure that the pointer image does not change */
- long gdkResource = GTK.GTK4? gtk_widget_get_surface (handle) : gtk_widget_get_window (handle);
+ long gdkResource = gtk_widget_get_window(handle);
int grabMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_RELEASE_MASK;
long gdkCursor = cursor != null ? cursor.handle : defaultCursor;
- int ptrGrabResult = gdk_pointer_grab (gdkResource, GDK.GDK_OWNERSHIP_NONE, false, grabMask, gdkResource, gdkCursor, GDK.GDK_CURRENT_TIME);
+ int ptrGrabResult = gdk_pointer_grab(gdkResource, GDK.GDK_OWNERSHIP_NONE, false, grabMask, gdkResource, gdkCursor, GDK.GDK_CURRENT_TIME);
/* The event must be sent because its doit flag is used. */
- Event event = new Event ();
+ Event event = new Event();
event.time = GDK.gdk_event_get_time(eventPtr);
- Rectangle eventRect = new Rectangle (newX, newY, width, height);
- event.setBounds (DPIUtil.autoScaleDown (eventRect));
- if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x;
- sendSelectionEvent (SWT.Selection, event, true);
- if (ptrGrabResult == GDK.GDK_GRAB_SUCCESS) gdk_pointer_ungrab (gdkResource, GDK.GDK_CURRENT_TIME);
- if (isDisposed ()) break;
+ Rectangle eventRect = new Rectangle(newX, newY, width, height);
+ event.setBounds(DPIUtil.autoScaleDown(eventRect));
+ if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown(parent.getClientWidth() - width) - event.x;
+ sendSelectionEvent(SWT.Selection, event, true);
+ if (ptrGrabResult == GDK.GDK_GRAB_SUCCESS) gdk_pointer_ungrab(gdkResource, GDK.GDK_CURRENT_TIME);
+ if (isDisposed()) break;
if (event.doit) {
- Rectangle rect = DPIUtil.autoScaleUp (event.getBounds ());
+ Rectangle rect = DPIUtil.autoScaleUp(event.getBounds());
lastX = rect.x;
lastY = rect.y;
- if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX;
+ if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth() - width - lastX;
if ((style & SWT.SMOOTH) != 0) {
- setBoundsInPixels (rect.x, rect.y, width, height);
- if (isDisposed ()) break;
+ setBoundsInPixels(rect.x, rect.y, width, height);
+ if (isDisposed()) break;
}
+
int cursorX = rect.x, cursorY = rect.y;
if ((style & SWT.VERTICAL) != 0) {
cursorY += height / 2;
} else {
cursorX += width / 2;
}
- display.setCursorLocation (parent.toDisplayInPixels (cursorX, cursorY));
+ display.setCursorLocation(parent.toDisplayInPixels(cursorX, cursorY));
}
break;
}
@@ -363,107 +533,108 @@ long gtk_key_press_event (long widget, long eventPtr) {
}
@Override
-long gtk_motion_notify_event (long widget, long eventPtr) {
- long result = super.gtk_motion_notify_event (widget, eventPtr);
+long gtk_motion_notify_event(long widget, long eventPtr) {
+ long result = super.gtk_motion_notify_event(widget, eventPtr);
if (result != 0) return result;
+
if (!dragging) return 0;
+
int eventX, eventY, eventState;
- double [] fetchedX = new double [1];
- double [] fetchedY = new double [1];
+ double[] fetchedX = new double[1], fetchedY = new double[1];
GDK.gdk_event_get_root_coords(eventPtr, fetchedX, fetchedY);
- int [] state = new int [1];
+
+ int[] state = new int[1];
GDK.gdk_event_get_state(eventPtr, state);
+
long gdkResource = gdk_event_get_surface_or_window(eventPtr);
boolean isHint;
- if (GTK.GTK4) {
- isHint = false;
- } else {
- GdkEventMotion gdkEvent = new GdkEventMotion ();
- OS.memmove(gdkEvent, eventPtr, GdkEventMotion.sizeof);
- isHint = gdkEvent.is_hint != 0;
- }
+ GdkEventMotion gdkEvent = new GdkEventMotion();
+ GTK3.memmove(gdkEvent, eventPtr, GdkEventMotion.sizeof);
+ isHint = gdkEvent.is_hint != 0;
+
if (isHint) {
- int [] pointer_x = new int [1], pointer_y = new int [1], mask = new int [1];
- display.gdk_window_get_device_position (gdkResource, pointer_x, pointer_y, mask);
- eventX = pointer_x [0];
- eventY = pointer_y [0];
- eventState = mask [0];
+ int[] pointer_x = new int[1], pointer_y = new int[1], mask = new int[1];
+ display.getWindowPointerPosition(gdkResource, pointer_x, pointer_y, mask);
+ eventX = pointer_x[0];
+ eventY = pointer_y[0];
+ eventState = mask[0];
} else {
- int [] origin_x = new int [1], origin_y = new int [1];
- if (GTK.GTK4) {
- GDK.gdk_surface_get_origin(gdkResource, origin_x, origin_y);
- } else {
- GDK.gdk_window_get_origin (gdkResource, origin_x, origin_y);
- }
- eventX = (int) (fetchedX[0] - origin_x [0]);
- eventY = (int) (fetchedY[0] - origin_y [0]);
+ int[] origin_x = new int[1], origin_y = new int[1];
+ GDK.gdk_window_get_origin(gdkResource, origin_x, origin_y);
+
+ eventX = (int)(fetchedX[0] - origin_x [0]);
+ eventY = (int)(fetchedY[0] - origin_y [0]);
eventState = state[0];
}
+
if ((eventState & GDK.GDK_BUTTON1_MASK) == 0) return 0;
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
+
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(handle, allocation);
int x = allocation.x;
int y = allocation.y;
int width = allocation.width;
int height = allocation.height;
- int parentBorder = 0;
- GTK.gtk_widget_get_allocation (parent.handle, allocation);
+
+ GTK.gtk_widget_get_allocation(parent.handle, allocation);
int parentWidth = allocation.width;
int parentHeight = allocation.height;
+
int newX = lastX, newY = lastY;
if ((style & SWT.VERTICAL) != 0) {
- newX = Math.min (Math.max (0, eventX + x - startX - parentBorder), parentWidth - width);
+ newX = Math.min(Math.max(0, eventX + x - startX), parentWidth - width);
} else {
- newY = Math.min (Math.max (0, eventY + y - startY - parentBorder), parentHeight - height);
+ newY = Math.min(Math.max(0, eventY + y - startY), parentHeight - height);
}
if (newX == lastX && newY == lastY) return 0;
- drawBand (lastX, lastY, width, height);
- Event event = new Event ();
+ Event event = new Event();
event.time = GDK.gdk_event_get_time(eventPtr);
- Rectangle eventRect = new Rectangle (newX, newY, width, height);
- event.setBounds (DPIUtil.autoScaleDown (eventRect));
+ Rectangle eventRect = new Rectangle(newX, newY, width, height);
+ event.setBounds(DPIUtil.autoScaleDown(eventRect));
if ((style & SWT.SMOOTH) == 0) {
event.detail = SWT.DRAG;
}
- if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x;
- sendSelectionEvent (SWT.Selection, event, true);
- if (isDisposed ()) return 0;
- Rectangle rect = DPIUtil.autoScaleUp (event.getBounds ());
+ if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown(parent.getClientWidth() - width) - event.x;
+ sendSelectionEvent(SWT.Selection, event, true);
+ if (isDisposed()) return 0;
+
+ Rectangle rect = DPIUtil.autoScaleUp(event.getBounds());
if (event.doit) {
lastX = rect.x;
lastY = rect.y;
- if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX;
+ if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth() - width - lastX;
}
- parent.update (true, (style & SWT.SMOOTH) == 0);
- drawBand (lastX, lastY, width, height);
+ parent.update(true, (style & SWT.SMOOTH) == 0);
if ((style & SWT.SMOOTH) != 0) {
/*
* Use lastX instead of rect.x, as lastX takes into account
* the event.doit flag. See bug 522140.
*/
- setBoundsInPixels (lastX, lastY, width, height);
- // widget could be disposed at this point
+ setBoundsInPixels(lastX, lastY, width, height);
}
+
return result;
}
@Override
-long gtk_realize (long widget) {
- setCursor (cursor != null ? cursor.handle : 0);
+long gtk_realize(long widget) {
+ setCursor(cursor != null ? cursor.handle : 0);
return super.gtk_realize (widget);
}
@Override
-void hookEvents () {
- super.hookEvents ();
- GTK.gtk_widget_add_events (handle, GDK.GDK_POINTER_MOTION_HINT_MASK);
+void hookEvents() {
+ super.hookEvents();
+
+ if (!GTK.GTK4) GTK3.gtk_widget_add_events(handle, GDK.GDK_POINTER_MOTION_HINT_MASK);
}
@Override
-void releaseWidget () {
- super.releaseWidget ();
- if (defaultCursor != 0) OS.g_object_unref (defaultCursor);
+void releaseWidget() {
+ super.releaseWidget();
+
+ if (defaultCursor != 0) OS.g_object_unref(defaultCursor);
defaultCursor = 0;
}
@@ -486,20 +657,20 @@ void releaseWidget () {
*/
public void removeSelectionListener(SelectionListener listener) {
checkWidget();
- if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
+ if (listener == null) error(SWT.ERROR_NULL_ARGUMENT);
+
if (eventTable == null) return;
- eventTable.unhook (SWT.Selection, listener);
- eventTable.unhook (SWT.DefaultSelection,listener);
+ eventTable.unhook(SWT.Selection, listener);
+ eventTable.unhook(SWT.DefaultSelection, listener);
}
@Override
-void setCursor (long cursor) {
- super.setCursor (cursor != 0 ? cursor : defaultCursor);
+void setCursor(long cursor) {
+ super.setCursor(cursor != 0 ? cursor : defaultCursor);
}
@Override
-int traversalCode (int key, long event) {
+int traversalCode(int key, long event) {
return 0;
}
-
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java
index 60ec9c039a..bc6af88beb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java
@@ -18,6 +18,7 @@ import org.eclipse.swt.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
/**
* Instances of the receiver represent a selectable user
@@ -130,7 +131,6 @@ void createHandle (int index) {
state |= HANDLE | THEME_BACKGROUND;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
long hAdjustment = GTK.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
if ((style & SWT.HORIZONTAL) != 0) {
@@ -139,7 +139,14 @@ void createHandle (int index) {
handle = GTK.gtk_scale_new (GTK.GTK_ORIENTATION_VERTICAL, hAdjustment);
}
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, handle);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ GTK3.gtk_container_add (fixedHandle, handle);
+ }
+
GTK.gtk_scale_set_digits (handle, 0);
GTK.gtk_scale_set_draw_value (handle, false);
}
@@ -235,8 +242,8 @@ public int getSelection () {
}
@Override
-long gtk_value_changed (long adjustment) {
- sendSelectionEvent (SWT.Selection);
+long gtk_value_changed(long range) {
+ sendSelectionEvent(SWT.Selection);
return 0;
}
@@ -381,7 +388,7 @@ Point resizeCalculationsGTK3(long widget, int width, int height) {
* Due to the parent SwtFixed, the scale widget can still be resized below this minimum size.
* Instead of shrinking to comply with the too-small size, parts of it are hidden.
*/
- if (widget == handle && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if (widget == handle) {
GtkRequisition naturalSize = new GtkRequisition();
GtkRequisition minimumSize = new GtkRequisition();
GTK.gtk_widget_get_preferred_size(handle, minimumSize, naturalSize);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java
index 6c58e7978d..187e2bfa61 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are selectable user interface
@@ -155,15 +157,10 @@ void deregister () {
if (adjustmentHandle != 0) display.removeWidget (adjustmentHandle);
}
-void destroyHandle () {
- super.destroyWidget ();
-}
-
@Override
void destroyWidget () {
parent.destroyScrollBar (this);
releaseHandle ();
- //parent.sendEvent (SWT.Resize);
}
/**
@@ -338,50 +335,58 @@ public int getThumb () {
*
* @since 3.6
*/
-public Rectangle getThumbBounds () {
- checkWidget ();
+public Rectangle getThumbBounds() {
+ checkWidget();
return DPIUtil.autoScaleDown(getThumbBoundsInPixels());
}
-Rectangle getThumbBoundsInPixels () {
+Rectangle getThumbBoundsInPixels() {
checkWidget();
- int [] slider_start = new int [1], slider_end = new int [1];
- gtk_range_get_slider_range (handle, slider_start, slider_end);
+
+ int[] slider_start = new int[1], slider_end = new int[1];
+ long rangeHandle = GTK.GTK4 ? GTK4.gtk_widget_get_first_child(handle) : handle;
+ GTK.gtk_range_get_slider_range(rangeHandle, slider_start, slider_end);
+
int x, y, width, height;
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(rangeHandle, allocation);
if ((style & SWT.VERTICAL) != 0) {
x = allocation.x;
- y = slider_start [0];
+ y = slider_start[0];
width = allocation.width;
- height = slider_end [0] - slider_start [0];
+ height = slider_end[0] - slider_start[0];
} else {
- x = slider_start [0];
+ x = slider_start[0];
y = allocation.y;
- width = slider_end [0] - slider_start [0];
+ width = slider_end[0] - slider_start[0];
height = allocation.height;
}
+
Rectangle rect = new Rectangle(x, y, width, height);
- int [] origin_x = new int [1], origin_y = new int [1];
if (GTK.GTK4) {
- long surface = gtk_widget_get_surface (parent.scrolledHandle);
- if (surface != 0) GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
- rect.x += origin_x [0];
- rect.y += origin_y [0];
- surface = gtk_widget_get_surface (parent.handle);
- if (surface != 0) GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
- rect.x -= origin_x [0];
- rect.y -= origin_y [0];
+ double[] origin_x = new double[1], origin_y = new double[1];
+ boolean success = GTK4.gtk_widget_translate_coordinates(parent.scrolledHandle, parent.getShell().shellHandle, 0, 0, origin_x, origin_y);
+ if (success) {
+ rect.x += origin_x[0];
+ rect.y += origin_y[0];
+ }
+ success = GTK4.gtk_widget_translate_coordinates(parent.handle, parent.getShell().shellHandle, 0, 0, origin_x, origin_y);
+ if (success) {
+ rect.x -= origin_x[0];
+ rect.y -= origin_y[0];
+ }
} else {
- long window = gtk_widget_get_window (parent.scrolledHandle);
- if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y);
- rect.x += origin_x [0];
- rect.y += origin_y [0];
- window = gtk_widget_get_window (parent.handle);
- if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y);
- rect.x -= origin_x [0];
- rect.y -= origin_y [0];
+ int[] origin_x = new int[1], origin_y = new int[1];
+ long window = gtk_widget_get_window(parent.scrolledHandle);
+ if (window != 0) GDK.gdk_window_get_origin(window, origin_x, origin_y);
+ rect.x += origin_x[0];
+ rect.y += origin_y[0];
+ window = gtk_widget_get_window(parent.handle);
+ if (window != 0) GDK.gdk_window_get_origin(window, origin_x, origin_y);
+ rect.x -= origin_x[0];
+ rect.y -= origin_y[0];
}
+
return rect;
}
@@ -407,24 +412,26 @@ public Rectangle getThumbTrackBounds () {
Rectangle getThumbTrackBoundsInPixels () {
checkWidget();
int x = 0, y = 0, width, height;
- int[] has_stepper = new int[1];
- boolean hasB = false, hasB2 = false, hasF = false, hasF2 = false;
+
/*
* Only GTK3 scrollbars have steppers, even non-overlay scrollbars in
* GTK4 do not have steppers.
*/
+ boolean hasB = false, hasB2 = false, hasF = false, hasF2 = false;
if (!GTK.GTK4) {
- GTK.gtk_widget_style_get (handle, OS.has_backward_stepper, has_stepper, 0);
+ int[] has_stepper = new int[1];
+ GTK3.gtk_widget_style_get(handle, OS.has_backward_stepper, has_stepper, 0);
hasB = has_stepper[0] != 0;
- GTK.gtk_widget_style_get (handle, OS.has_secondary_backward_stepper, has_stepper, 0);
+ GTK3.gtk_widget_style_get(handle, OS.has_secondary_backward_stepper, has_stepper, 0);
hasB2 = has_stepper[0] != 0;
- GTK.gtk_widget_style_get (handle, OS.has_forward_stepper, has_stepper, 0);
+ GTK3.gtk_widget_style_get(handle, OS.has_forward_stepper, has_stepper, 0);
hasF = has_stepper[0] != 0;
- GTK.gtk_widget_style_get (handle, OS.has_secondary_forward_stepper, has_stepper, 0);
+ GTK3.gtk_widget_style_get(handle, OS.has_secondary_forward_stepper, has_stepper, 0);
hasF2 = has_stepper[0] != 0;
}
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (handle, allocation);
+
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(handle, allocation);
if ((style & SWT.VERTICAL) != 0) {
int stepperSize = allocation.width;
x = allocation.x;
@@ -435,9 +442,10 @@ Rectangle getThumbTrackBoundsInPixels () {
if (hasB2) height -= stepperSize;
if (hasF) height -= stepperSize;
if (height < 0) {
- int [] slider_start = new int [1], slider_end = new int [1];
- gtk_range_get_slider_range (handle, slider_start, slider_end);
- y = slider_start [0];
+ int[] slider_start = new int[1], slider_end = new int[1];
+ long rangeHandle = GTK.GTK4 ? GTK4.gtk_widget_get_first_child(handle) : handle;
+ GTK.gtk_range_get_slider_range(rangeHandle, slider_start, slider_end);
+ y = slider_start[0];
height = 0;
}
} else {
@@ -450,33 +458,39 @@ Rectangle getThumbTrackBoundsInPixels () {
if (hasF) width -= stepperSize;
height = allocation.height;
if (width < 0) {
- int [] slider_start = new int [1], slider_end = new int [1];
- gtk_range_get_slider_range (handle, slider_start, slider_end);
- x = slider_start [0];
+ int[] slider_start = new int[1], slider_end = new int[1];
+ long rangeHandle = GTK.GTK4 ? GTK4.gtk_widget_get_first_child(handle) : handle;
+ GTK.gtk_range_get_slider_range(rangeHandle, slider_start, slider_end);
+ x = slider_start[0];
width = 0;
}
}
+
Rectangle rect = new Rectangle(x, y, width, height);
- int [] origin_x = new int [1], origin_y = new int [1];
if (GTK.GTK4) {
- long surface = gtk_widget_get_surface (parent.scrolledHandle);
- if (surface != 0) GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
- rect.x += origin_x [0];
- rect.y += origin_y [0];
- surface = gtk_widget_get_surface (parent.handle);
- if (surface != 0) GDK.gdk_surface_get_origin (surface, origin_x, origin_y);
- rect.x -= origin_x [0];
- rect.y -= origin_y [0];
+ double[] origin_x = new double[1], origin_y = new double[1];
+ boolean success = GTK4.gtk_widget_translate_coordinates(parent.scrolledHandle, parent.getShell().shellHandle, 0, 0, origin_x, origin_y);
+ if (success) {
+ rect.x += origin_x[0];
+ rect.y += origin_y[0];
+ }
+ success = GTK4.gtk_widget_translate_coordinates(parent.handle, parent.getShell().shellHandle, 0, 0, origin_x, origin_y);
+ if (success) {
+ rect.x -= origin_x[0];
+ rect.y -= origin_y[0];
+ }
} else {
- long window = gtk_widget_get_window (parent.scrolledHandle);
- if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y);
- rect.x += origin_x [0];
- rect.y += origin_y [0];
- window = gtk_widget_get_window (parent.handle);
- if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y);
- rect.x -= origin_x [0];
- rect.y -= origin_y [0];
+ int[] origin_x = new int[1], origin_y = new int[1];
+ long window = gtk_widget_get_window(parent.scrolledHandle);
+ if (window != 0) GDK.gdk_window_get_origin(window, origin_x, origin_y);
+ rect.x += origin_x[0];
+ rect.y += origin_y[0];
+ window = gtk_widget_get_window(parent.handle);
+ if (window != 0) GDK.gdk_window_get_origin(window, origin_x, origin_y);
+ rect.x -= origin_x[0];
+ rect.y -= origin_y[0];
}
+
return rect;
}
@@ -510,21 +524,6 @@ public boolean getVisible () {
}
@Override
-long gtk_event (long widget, long event) {
- if (!GTK.GTK4) return 0;
- int eventType = GDK.gdk_event_get_event_type(event);
- switch (eventType) {
- case GDK.GDK4_BUTTON_PRESS: {
- return gtk_button_press_event(widget, event);
- }
- case GDK.GDK4_BUTTON_RELEASE: {
- return gtk_button_release_event(widget, event);
- }
- }
- return 0;
-}
-
-@Override
long gtk_button_press_event (long widget, long eventPtr) {
long result = super.gtk_button_press_event (widget, eventPtr);
if (result != 0) return result;
@@ -534,17 +533,13 @@ long gtk_button_press_event (long widget, long eventPtr) {
}
@Override
-long gtk_change_value (long widget, long scroll, long value1, long value2) {
- detail = (int)scroll;
- return 0;
-}
-
-void gtk_range_get_slider_range (long widget, int [] slider_start, int [] slider_end) {
- GTK.gtk_range_get_slider_range (widget, slider_start, slider_end);
+boolean gtk_change_value (long widget, int scroll, double value, long user_data) {
+ detail = scroll;
+ return false;
}
@Override
-long gtk_value_changed (long adjustment) {
+long gtk_value_changed (long range) {
Event event = new Event ();
dragSent = detail == GTK.GTK_SCROLL_JUMP;
switch (detail) {
@@ -579,7 +574,12 @@ long gtk_event_after (long widget, long gdkEvent) {
switch (eventType) {
case GDK.GDK_BUTTON_RELEASE: {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(gdkEvent, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(gdkEvent);
+ } else {
+ GDK.gdk_event_get_button(gdkEvent, eventButton);
+ }
+
if (eventButton[0] == 1 && detail == GTK.GTK_SCROLL_JUMP) {
if (!dragSent) {
Event event = new Event ();
@@ -601,9 +601,11 @@ void hookEvents () {
super.hookEvents ();
OS.g_signal_connect_closure (adjustmentHandle, OS.value_changed, display.getClosure (VALUE_CHANGED), false);
if (GTK.GTK4) {
- // GTK4: event-after replaced with generic event
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- // GTK4: change-value moved to gtk_scroll_child in Composite
+ //TODO: GTK4 change-value moved to gtk_scroll_child in Composite, event-after
+
+ long clickGesture = GTK4.gtk_gesture_click_new();
+ GTK4.gtk_widget_add_controller(handle, clickGesture);
+ OS.g_signal_connect(clickGesture, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
} else {
OS.g_signal_connect_closure (handle, OS.change_value, display.getClosure (CHANGE_VALUE), false);
OS.g_signal_connect_closure_by_id (handle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false);
@@ -913,13 +915,6 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i
OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
GTK.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
- /*
- * gtk_adujustment_value_changed is deprecated on GTK3.18+.
- * GTK+ will emit "value-changed" itself whenever the value changes.
- * See bug 495413.
- */
- if (GTK.GTK_VERSION < OS.VERSION(3, 18, 0))
- GTK.gtk_adjustment_value_changed (adjustmentHandle);
OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
index d4a8252ace..a09c550302 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* This class is the abstract superclass of all classes which
@@ -40,6 +42,9 @@ public abstract class Scrollable extends Control {
long scrolledHandle;
ScrollBar horizontalBar, verticalBar;
+ /** See bug 484682 */
+ static final boolean RESIZE_ON_GETCLIENTAREA = !OS.isX11() || Boolean.getBoolean("org.eclipse.swt.resizeOnGetClientArea");
+
/**
* Prevents uninitialized instances from being created outside the package.
*/
@@ -125,7 +130,14 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
trimHeight += hScrollBarWidth ();
trimWidth += vScrollBarWidth ();
if (scrolledHandle != 0) {
- if (GTK.gtk_scrolled_window_get_shadow_type (scrolledHandle) != GTK.GTK_SHADOW_NONE) {
+ boolean hasFrame;
+ if (GTK.GTK4) {
+ hasFrame = GTK4.gtk_scrolled_window_get_has_frame(scrolledHandle);
+ } else {
+ hasFrame = GTK3.gtk_scrolled_window_get_shadow_type (scrolledHandle) != GTK.GTK_SHADOW_NONE;
+ }
+
+ if (hasFrame) {
Point thickness = getThickness (scrolledHandle);
int xthickness = thickness.x;
int ythickness = thickness.y;
@@ -205,7 +217,14 @@ int getBorderWidthInPixels () {
if (fixedHandle != 0) border += gtk_container_get_border_width_or_margin (fixedHandle);
if (scrolledHandle != 0) {
border += gtk_container_get_border_width_or_margin (scrolledHandle);
- if (GTK.gtk_scrolled_window_get_shadow_type (scrolledHandle) != GTK.GTK_SHADOW_NONE) {
+
+ boolean hasFrame;
+ if (GTK.GTK4) {
+ hasFrame = GTK4.gtk_scrolled_window_get_has_frame(scrolledHandle);
+ } else {
+ hasFrame = GTK3.gtk_scrolled_window_get_shadow_type (scrolledHandle) != GTK.GTK_SHADOW_NONE;
+ }
+ if (hasFrame) {
border += getThickness (scrolledHandle).x;
}
}
@@ -232,7 +251,9 @@ public Rectangle getClientArea () {
Rectangle getClientAreaInPixels () {
checkWidget ();
- forceResize ();
+ if(RESIZE_ON_GETCLIENTAREA) {
+ forceResize ();
+ }
long clientHandle = clientHandle ();
GtkAllocation allocation = new GtkAllocation ();
GTK.gtk_widget_get_allocation (clientHandle, allocation);
@@ -282,7 +303,7 @@ public ScrollBar getHorizontalBar () {
*/
public int getScrollbarsMode () {
checkWidget();
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0) && GTK.gtk_scrolled_window_get_overlay_scrolling(scrolledHandle)) {
+ if (GTK.gtk_scrolled_window_get_overlay_scrolling(scrolledHandle)) {
return SWT.SCROLLBAR_OVERLAY;
}
return SWT.NONE;
@@ -304,6 +325,47 @@ public ScrollBar getVerticalBar () {
}
@Override
+long gtk_draw (long widget, long cairo) {
+ if (!GTK.GTK4) {
+ /*
+ * Draw events destined for an SwtFixed instance will sometimes
+ * only be redrawing the scrollbars attached to it. GTK will send many
+ * draw events to an SwtFixed instance if:
+ * 1) that instance has overlay scrollbars attached to it, and
+ * 2) the mouse has just left (leave-notify) that SwtFixed widget.
+ *
+ * Such extra draw events cause extra SWT.Paint events to be sent and
+ * reduce performance. The fix is to check if the dirty region in need
+ * of a redraw is the same region that the scroll bars occupy, and ignore
+ * draw events that target such cases. See bug 546248.
+ */
+ boolean overlayScrolling = !OS.GTK_OVERLAY_SCROLLING_DISABLED;
+ if (overlayScrolling && OS.G_OBJECT_TYPE(widget) == OS.swt_fixed_get_type()) {
+ if ((style & SWT.V_SCROLL) != 0 && verticalBar != null) {
+ GtkAllocation verticalBarAlloc = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(verticalBar.handle, verticalBarAlloc);
+ GdkRectangle rect = new GdkRectangle();
+ GDK.gdk_cairo_get_clip_rectangle(cairo, rect);
+ if (rect.width == verticalBarAlloc.width && rect.height == verticalBarAlloc.height) {
+ return 0;
+ }
+ }
+ if ((style & SWT.H_SCROLL) != 0 && horizontalBar != null) {
+ GtkAllocation horizontalBarAlloc = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(horizontalBar.handle, horizontalBarAlloc);
+ GdkRectangle rect = new GdkRectangle();
+ GDK.gdk_cairo_get_clip_rectangle(cairo, rect);
+ if (rect.width == horizontalBarAlloc.width && rect.height == horizontalBarAlloc.height) {
+ return 0;
+ }
+ }
+ }
+ }
+
+ return super.gtk_draw(widget, cairo);
+}
+
+@Override
long gtk_scroll_event (long widget, long eventPtr) {
long result = super.gtk_scroll_event (widget, eventPtr);
@@ -316,9 +378,12 @@ long gtk_scroll_event (long widget, long eventPtr) {
ScrollBar scrollBar;
int [] direction = new int[1];
boolean fetched = GDK.gdk_event_get_scroll_direction(eventPtr, direction);
+
if (!fetched) {
double[] delta_x = new double[1], delta_y = new double [1];
- if (GDK.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) {
+ boolean deltasAvailable = GDK.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y);
+
+ if (deltasAvailable) {
if (delta_x [0] != 0) {
scrollBar = horizontalBar;
if (scrollBar != null && !GTK.gtk_widget_get_visible (scrollBar.handle) && scrollBar.getEnabled()) {
@@ -402,7 +467,7 @@ boolean setScrollBarVisible (ScrollBar bar, boolean visible) {
int [] hsp = new int [1], vsp = new int [1];
GTK.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp);
int policy = visible ? GTK.GTK_POLICY_ALWAYS : GTK.GTK_POLICY_NEVER;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 16, 0) && !visible) {
+ if (!visible) {
policy = GTK.GTK_POLICY_EXTERNAL;
}
if ((bar.style & SWT.HORIZONTAL) != 0) {
@@ -433,16 +498,25 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole
rect.width = allocation.width;
rect.height = allocation.height;
} else {
- int [] destX = new int [1], destY = new int [1];
- GTK.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
- rect.x = destX [0];
- rect.y = destY [0];
- rect.width = Math.max (0, width);
- rect.height = Math.max (0, height);
+ if (GTK.GTK4) {
+ double[] destX = new double[1], destY = new double[1];
+ GTK4.gtk_widget_translate_coordinates(paintHandle, topHandle, x, y, destX, destY);
+ rect.x = (int)destX[0];
+ rect.y = (int)destY[0];
+ } else {
+ int[] destX = new int[1], destY = new int[1];
+ GTK3.gtk_widget_translate_coordinates(paintHandle, topHandle, x, y, destX, destY);
+ rect.x = destX[0];
+ rect.y = destY[0];
+ }
+
+ rect.width = Math.max(0, width);
+ rect.height = Math.max(0, height);
}
if (GTK.GTK4) {
- long surface = gtk_widget_get_surface (topHandle);
- GDK.gdk_surface_invalidate_rect (surface, rect);
+ /* TODO: GTK4 no ability to invalidate surfaces, may need to keep track of
+ * invalid regions ourselves and do gdk_surface_queue_expose. Will need a different way to force redraws.
+ * New "render" signal? */
} else {
long window = gtk_widget_get_window (topHandle);
GDK.gdk_window_invalidate_rect (window, rect, all);
@@ -528,13 +602,11 @@ private Point scrollBarSize(long scrollBarHandle) {
* Calling gtk_widget_queue_resize() before querying the size
* fixes this issue.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_widget_queue_resize (scrollBarHandle);
- }
+ GTK.gtk_widget_queue_resize (scrollBarHandle);
gtk_widget_get_preferred_size (scrollBarHandle, requisition);
int [] padding = new int [1];
// Only GTK3 needs this, GTK4 has the size built-in via gtk_widget_get_preferred_size()
- if (!GTK.GTK4) GTK.gtk_widget_style_get(scrolledHandle, OS.scrollbar_spacing, padding, 0);
+ if (!GTK.GTK4) GTK3.gtk_widget_style_get(scrolledHandle, OS.scrollbar_spacing, padding, 0);
int spacing = padding[0];
return new Point(requisition.width + spacing, requisition.height + spacing);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 3d19416e8a..224734ad0e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -20,6 +20,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent the "windows"
@@ -125,7 +127,7 @@ public class Shell extends Decorations {
long shellHandle, tooltipsHandle, tooltipWindow, group, modalGroup;
boolean mapped, moved, resized, opened, fullScreen, showWithParent, modified, center;
int oldX, oldY, oldWidth, oldHeight;
- int minWidth, minHeight;
+ GeometryInterface geometry;
Control lastActive;
ToolTip [] toolTips;
boolean ignoreFocusOut, ignoreFocusIn;
@@ -135,6 +137,8 @@ public class Shell extends Decorations {
static final int MAXIMUM_TRIM = 128;
static final int BORDER = 3;
+ static final double SHELL_TO_MONITOR_RATIO = 0.625; // Fractional: 5 / 8
+
/**
* Constructs a new instance of this class. This is equivalent
* to calling <code>Shell((Display) null)</code>.
@@ -286,6 +290,12 @@ Shell (Display display, Shell parent, int style, long handle, boolean embedded)
state |= FOREIGN_HANDLE;
}
}
+ if(!GTK.GTK4) {
+ geometry = new GdkGeometry();
+ }
+ else {
+ geometry = new SWTGeometry();
+ }
reskinWidget();
createWidget (0);
}
@@ -483,10 +493,8 @@ void adjustTrim () {
int width = allocation.width;
int height = allocation.height;
GdkRectangle rect = new GdkRectangle ();
- if (GTK.GTK4) {
- long surface = gtk_widget_get_surface(shellHandle);
- GDK.gdk_surface_get_frame_extents (surface, rect);
- } else {
+
+ if (!GTK.GTK4) {
long window = gtk_widget_get_window (shellHandle);
GDK.gdk_window_get_frame_extents (window, rect);
}
@@ -526,11 +534,6 @@ void adjustTrim () {
} else {
trimStyle = Display.TRIM_NONE;
}
- /*
- * The workaround for bug 445900 seems to cause problems for some
- * users on GTK2, see bug 492695. The fix is to only adjust the
- * shell size on GTK3.
- */
Rectangle bounds = getBoundsInPixels();
int widthAdjustment = display.trimWidths[trimStyle] - trimWidth;
int heightAdjustment = display.trimHeights[trimStyle] - trimHeight;
@@ -590,42 +593,46 @@ void bringToTop (boolean force) {
if (OS.isX11()) {
long gdkDisplay = GDK.gdk_window_get_display(gdkResource);
long xDisplay = GDK.gdk_x11_display_get_xdisplay(gdkDisplay);
- long xWindow = GDK.gdk_x11_window_get_xid (gdkResource);
+ long xWindow;
+ if (GTK.GTK4) {
+ xWindow = GDK.gdk_x11_surface_get_xid(gdkResource);
+ } else {
+ xWindow = GDK.gdk_x11_window_get_xid (gdkResource);
+ }
+
GDK.gdk_x11_display_error_trap_push(gdkDisplay);
/* Use CurrentTime instead of the last event time to ensure that the shell becomes active */
OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.CurrentTime);
GDK.gdk_x11_display_error_trap_pop_ignored(gdkDisplay);
} else {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GTK.gtk_grab_add(shellHandle);
- long gdkDisplay;
- if (GTK.GTK4) {
- gdkDisplay = GDK.gdk_surface_get_display(gdkResource);
- } else {
- gdkDisplay = GDK.gdk_window_get_display(gdkResource);
- }
- long seat = GDK.gdk_display_get_default_seat(gdkDisplay);
- if (GTK.GTK4) {
- GDK.gdk_surface_show(gdkResource);
- } else {
- GDK.gdk_window_show(gdkResource);
- }
- GDK.gdk_seat_grab(seat, gdkResource, GDK.GDK_SEAT_CAPABILITY_ALL, true, 0, 0, 0, 0);
- /*
- * Bug 541185: Hover over to open Javadoc popup will make the popup
- * close instead of gaining focus due to an extra focus out signal sent
- * after grabbing focus. This triggers SWT.Deactivate handler which closes the shell.
- * Workaround is to ignore this focus out.
- */
- grabbedFocus = true;
- ignoreFocusOutAfterGrab = true;
+ long gdkDisplay;
+ if (GTK.GTK4) {
+ gdkDisplay = GDK.gdk_surface_get_display(gdkResource);
+ } else {
+ GTK3.gtk_grab_add(shellHandle);
+ gdkDisplay = GDK.gdk_window_get_display(gdkResource);
+ }
+ long seat = GDK.gdk_display_get_default_seat(gdkDisplay);
+ if (GTK.GTK4) {
+ /* TODO: GTK does not provide a gdk_surface_show, probably will require use of the present api */
+ } else {
+ GDK.gdk_window_show(gdkResource);
}
+ GDK.gdk_seat_grab(seat, gdkResource, GDK.GDK_SEAT_CAPABILITY_ALL, true, 0, 0, 0, 0);
+ /*
+ * Bug 541185: Hover over to open Javadoc popup will make the popup
+ * close instead of gaining focus due to an extra focus out signal sent
+ * after grabbing focus. This triggers SWT.Deactivate handler which closes the shell.
+ * Workaround is to ignore this focus out.
+ */
+ grabbedFocus = true;
+ ignoreFocusOutAfterGrab = true;
}
} else {
if (GTK.GTK4) {
- GDK.gdk_surface_focus (gdkResource, GDK.GDK_CURRENT_TIME);
+ GTK4.gdk_toplevel_focus (gdkResource, display.lastUserEventTime);
} else {
- GDK.gdk_window_focus (gdkResource, GDK.GDK_CURRENT_TIME);
+ GDK.gdk_window_focus (gdkResource, display.lastUserEventTime);
}
}
display.activeShell = this;
@@ -715,87 +722,83 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
void createHandle (int index) {
state |= HANDLE | CANVAS;
if (shellHandle == 0) {
+ boolean isChildShell = parent != null;
+
if (handle == 0) {
int type = GTK.GTK_WINDOW_TOPLEVEL;
- if (parent != null && (style & SWT.ON_TOP) != 0) type = GTK.GTK_WINDOW_POPUP;
- shellHandle = GTK.gtk_window_new (type);
+ if (isChildShell && (style & SWT.ON_TOP) != 0) type = GTK.GTK_WINDOW_POPUP;
+ if (GTK.GTK4) {
+ // TODO: GTK4 need to handle for GTK_WINDOW_POPUP type
+ shellHandle = GTK4.gtk_window_new();
+ } else {
+ shellHandle = GTK3.gtk_window_new(type);
+ }
} else {
- shellHandle = GTK.gtk_plug_new (handle);
+ shellHandle = GTK.gtk_plug_new(handle);
}
- if (shellHandle == 0) error (SWT.ERROR_NO_HANDLES);
- if (parent != null) {
- /*
- * Problems with GTK_WINDOW_POPUP attached to another GTK_WINDOW_POPUP parent
- * 1) Bug 530138: GTK_WINDOW_POPUP attached to a GTK_WINDOW_POPUP parent
- * gets positioned relatively to the GTK_WINDOW_POPUP. We want to position it
- * relatively to the GTK_WINDOW_TOPLEVEL surface. Fix is to set the child popup's transient
- * parent to the top level window.
- *
- * 2) Bug 540166: When a parent popup is destroyed, the child popup sometimes does not
- * get destroyed and is stuck until its transient top level parent gets destroyed.
- * Fix is to implement a similar gtk_window_set_destroy_with_parent with its *logical*
- * parent by connecting a "destroy" signal.
- */
- if (!OS.isX11()) {
- Composite topLevelParent = parent;
- while (topLevelParent != null && (topLevelParent.style & SWT.ON_TOP) != 0) {
- topLevelParent = parent.getParent();
- }
- // transient parent must be the a toplevel window to position correctly
- if (topLevelParent != null) {
- GTK.gtk_window_set_transient_for(shellHandle, topLevelParent.topHandle());
+ if (shellHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (isChildShell) {
+ if (GTK.GTK4) {
+ GTK.gtk_window_set_transient_for(shellHandle, parent.topHandle());
+ GTK.gtk_window_set_destroy_with_parent(shellHandle, true);
+
+ // TODO: GTK4 need case for SWT.MIN
+ } else {
+ /*
+ * Problems with GTK_WINDOW_POPUP attached to another GTK_WINDOW_POPUP parent
+ * 1) Bug 530138: GTK_WINDOW_POPUP attached to a GTK_WINDOW_POPUP parent
+ * gets positioned relatively to the GTK_WINDOW_POPUP. We want to position it
+ * relatively to the GTK_WINDOW_TOPLEVEL surface. Fix is to set the child popup's transient
+ * parent to the top level window.
+ *
+ * 2) Bug 540166: When a parent popup is destroyed, the child popup sometimes does not
+ * get destroyed and is stuck until its transient top level parent gets destroyed.
+ * Fix is to implement a similar gtk_window_set_destroy_with_parent with its *logical*
+ * parent by connecting a "destroy" signal.
+ */
+ if (!OS.isX11()) {
+ Composite topLevelParent = parent;
+ while (topLevelParent != null && (topLevelParent.style & SWT.ON_TOP) != 0) {
+ topLevelParent = parent.getParent();
+ }
+ // transient parent must be the a toplevel window to position correctly
+ if (topLevelParent != null) {
+ GTK.gtk_window_set_transient_for(shellHandle, topLevelParent.topHandle());
+ } else {
+ GTK.gtk_window_set_transient_for(shellHandle, parent.topHandle());
+ }
+ // this marks the logical parent
+ GTK3.gtk_window_set_attached_to(shellHandle, parent.topHandle());
+ // implements the gtk_window_set_destroy_with_parent for the *logical* parent
+ if (parent != topLevelParent && isMappedToPopup()) {
+ parent.popupChild = this;
+ }
} else {
- GTK.gtk_window_set_transient_for(shellHandle, parent.topHandle());
+ GTK.gtk_window_set_transient_for(shellHandle, parent.topHandle ());
}
- // this marks the logical parent
- GTK.gtk_window_set_attached_to (shellHandle, parent.topHandle());
- // implements the gtk_window_set_destroy_with_parent for the *logical* parent
- if (parent != topLevelParent && isMappedToPopup()) {
- parent.popupChild = this;
+ GTK.gtk_window_set_destroy_with_parent(shellHandle, true);
+ // if child shells are minimizable, we want them to have a
+ // taskbar icon, so they can be unminimized
+ if ((style & SWT.MIN) == 0) {
+ GTK3.gtk_window_set_skip_taskbar_hint(shellHandle, true);
}
- } else {
- GTK.gtk_window_set_transient_for (shellHandle, parent.topHandle ());
}
- GTK.gtk_window_set_destroy_with_parent (shellHandle, true);
- // if child shells are minimizable, we want them to have a
- // taskbar icon, so they can be unminimized
- if ((style & SWT.MIN) == 0) {
- GTK.gtk_window_set_skip_taskbar_hint(shellHandle, true);
- }
-
- /*
- * For systems running Metacity, by applying the dialog type hint
- * to a window only the close button can be placed on the title bar.
- * The style hints for the minimize and maximize buttons are ignored.
- * See bug 445456.
- *
- */
-// if (!isUndecorated ()) {
-// OS.gtk_window_set_type_hint (shellHandle, OS.GDK_WINDOW_TYPE_HINT_DIALOG);
-// }
- } else {
- if ((style & SWT.ON_TOP) != 0) GTK.gtk_window_set_keep_above(shellHandle, true);
+ } else if ((style & SWT.ON_TOP) != 0) {
+ GTK3.gtk_window_set_keep_above(shellHandle, true);
}
- /*
- * Feature in GTK. The window size must be set when the window
- * is created or it will not be allowed to be resized smaller that the
- * initial size by the user. The fix is to set the size to zero.
- */
+
+ GTK.gtk_window_set_title(shellHandle, new byte[1]);
if ((style & SWT.RESIZE) != 0) {
- GTK.gtk_widget_set_size_request (shellHandle, 0, 0);
- GTK.gtk_window_set_resizable (shellHandle, true);
+ GTK.gtk_window_set_resizable(shellHandle, true);
} else {
- GTK.gtk_window_set_resizable (shellHandle, false);
+ GTK.gtk_window_set_resizable(shellHandle, false);
}
- GTK.gtk_window_set_title (shellHandle, new byte [1]);
if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
- gtk_container_set_border_width (shellHandle, 1);
- if (GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) {
- GTK.gtk_widget_override_background_color (shellHandle, GTK.GTK_STATE_FLAG_NORMAL, new GdkRGBA());
- }
+ gtk_container_set_border_width(shellHandle, 1);
}
if ((style & SWT.TOOL) != 0) {
- GTK.gtk_window_set_type_hint(shellHandle, GDK.GDK_WINDOW_TYPE_HINT_UTILITY);
+ GTK3.gtk_window_set_type_hint(shellHandle, GDK.GDK_WINDOW_TYPE_HINT_UTILITY);
}
if ((style & SWT.NO_TRIM) != 0) {
GTK.gtk_window_set_decorated(shellHandle, false);
@@ -808,24 +811,31 @@ void createHandle (int index) {
if (!OS.isX11() && (style & SWT.SHELL_TRIM) == 0) {
GTK.gtk_window_set_decorated(shellHandle, false);
}
- if (isCustomResize ()) {
- gtk_container_set_border_width (shellHandle, BORDER);
+ if (isCustomResize()) {
+ gtk_container_set_border_width(shellHandle, BORDER);
}
}
- vboxHandle = gtk_box_new (GTK.GTK_ORIENTATION_VERTICAL, false, 0);
- if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES);
+
createHandle (index, false, true);
- GTK.gtk_container_add (vboxHandle, scrolledHandle);
- gtk_box_set_child_packing (vboxHandle, scrolledHandle, true, true, 0, GTK.GTK_PACK_END);
- group = GTK.gtk_window_group_new ();
- if (group == 0) error (SWT.ERROR_NO_HANDLES);
+ vboxHandle = gtk_box_new(GTK.GTK_ORIENTATION_VERTICAL, false, 0);
+ if (vboxHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ GTK4.gtk_box_append(vboxHandle, scrolledHandle);
+ } else {
+ GTK3.gtk_container_add(vboxHandle, scrolledHandle);
+ gtk_box_set_child_packing(vboxHandle, scrolledHandle, true, true, 0, GTK.GTK_PACK_END);
+ }
+
+ group = GTK.gtk_window_group_new();
+ if (group == 0) error(SWT.ERROR_NO_HANDLES);
+
/*
* Feature in GTK. Realizing the shell triggers a size allocate event,
* which may be confused for a resize event from the window manager if
* received too late. The fix is to realize the window during creation
* to avoid confusion.
*/
- GTK.gtk_widget_realize (shellHandle);
+ GTK.gtk_widget_realize(shellHandle);
}
@Override
@@ -917,42 +927,45 @@ boolean hasBorder () {
@Override
void hookEvents () {
super.hookEvents ();
+ OS.g_signal_connect (shellHandle, OS.dpi_changed, display.notifyProc, Widget.DPI_CHANGED);
+
if (GTK.GTK4) {
- // Replace configure-event, map-event with generic event handler
- if (eventHandle() == 0) {
- OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- }
+ // TODO: GTK4 see if same signals are required in GTK4 as in GTK3, if so, will require the legacy event controller
// Replaced "window-state-event" with GdkSurface "notify::state", pass shellHandle as user_data
- long notifyStateAddress = display.notifyStateCallback.getAddress();
GTK.gtk_widget_realize(shellHandle);
long gdkSurface = gtk_widget_get_surface (shellHandle);
- OS.g_signal_connect (gdkSurface, OS.notify_state, notifyStateAddress, shellHandle);
+ OS.g_signal_connect (gdkSurface, OS.notify_state, display.notifyProc, shellHandle);
+ OS.g_signal_connect (gdkSurface, OS.compute_size, display.computeSizeProc, shellHandle);
+ OS.g_signal_connect(shellHandle, OS.notify_default_height, display.notifyProc, Widget.NOTIFY_DEFAULT_HEIGHT);
+ OS.g_signal_connect(shellHandle, OS.notify_default_width, display.notifyProc, Widget.NOTIFY_DEFAULT_WIDTH);
+ OS.g_signal_connect(shellHandle, OS.notify_maximized, display.notifyProc, Widget.NOTIFY_MAXIMIZED);
} else {
OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [WINDOW_STATE_EVENT], 0, display.getClosure (WINDOW_STATE_EVENT), false);
OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [CONFIGURE_EVENT], 0, display.getClosure (CONFIGURE_EVENT), false);
OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [MAP_EVENT], 0, display.shellMapProcClosure, false);
+ OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [SIZE_ALLOCATE], 0, display.getClosure (SIZE_ALLOCATE), false);
}
- OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [SIZE_ALLOCATE], 0, display.getClosure (SIZE_ALLOCATE), false);
if (GTK.GTK4) {
OS.g_signal_connect_closure (shellHandle, OS.close_request, display.getClosure (CLOSE_REQUEST), false);
- long keyController = GTK.gtk_event_controller_key_new();
- GTK.gtk_widget_add_controller(shellHandle, keyController);
+ OS.g_signal_connect(shellHandle, OS.notify_is_active, display.windowActiveProc, FOCUS_IN);
+ long keyController = GTK4.gtk_event_controller_key_new();
+ GTK4.gtk_widget_add_controller(shellHandle, keyController);
GTK.gtk_event_controller_set_propagation_phase(keyController, GTK.GTK_PHASE_TARGET);
+ OS.g_signal_connect (keyController, OS.key_pressed, display.keyPressReleaseProc, KEY_PRESSED);
- long keyPressReleaseAddress = display.keyPressReleaseCallback.getAddress();
- long focusAddress = display.focusCallback.getAddress();
- OS.g_signal_connect (keyController, OS.key_pressed, keyPressReleaseAddress, KEY_PRESSED);
- OS.g_signal_connect (keyController, OS.focus_in, focusAddress, FOCUS_IN);
- OS.g_signal_connect (keyController, OS.focus_out, focusAddress, FOCUS_OUT);
+ long focusController = GTK4.gtk_event_controller_focus_new();
+ GTK4.gtk_widget_add_controller(shellHandle, focusController);
+ OS.g_signal_connect(focusController, OS.enter, display.focusProc, FOCUS_IN);
+ OS.g_signal_connect(focusController, OS.leave, display.focusProc, FOCUS_OUT);
- long enterLeaveController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(shellHandle, enterLeaveController);
+ long enterLeaveController = GTK4.gtk_event_controller_motion_new();
+ GTK4.gtk_widget_add_controller(shellHandle, enterLeaveController);
- long enterMotionAddress = display.enterMotionScrollCallback.getAddress();
+ long enterMotionAddress = display.enterMotionCallback.getAddress();
OS.g_signal_connect (enterLeaveController, OS.enter, enterMotionAddress, ENTER);
if (isCustomResize()) {
- long motionController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(shellHandle, motionController);
+ long motionController = GTK4.gtk_event_controller_motion_new();
+ GTK4.gtk_widget_add_controller(shellHandle, motionController);
GTK.gtk_event_controller_set_propagation_phase(motionController, GTK.GTK_PHASE_TARGET);
OS.g_signal_connect (motionController, OS.motion, enterMotionAddress, MOTION);
@@ -970,7 +983,7 @@ void hookEvents () {
if (isCustomResize ()) {
if (!GTK.GTK4) {
int mask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_RELEASE_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK;
- GTK.gtk_widget_add_events (shellHandle, mask);
+ GTK3.gtk_widget_add_events (shellHandle, mask);
OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.getClosure (MOTION_NOTIFY_EVENT), false);
OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [LEAVE_NOTIFY_EVENT], 0, display.getClosure (LEAVE_NOTIFY_EVENT), false);
@@ -1048,7 +1061,8 @@ long paintHandle () {
}
void fixActiveShell () {
- if (display.activeShell == this) {
+ // Only fix shell for SWT.ON_TOP set, see bug 568550
+ if (display.activeShell == this && (style & SWT.ON_TOP) != 0) {
Shell shell = null;
if (parent != null && parent.isVisible ()) shell = parent.getShell ();
if (shell == null && isUndecorated ()) {
@@ -1110,30 +1124,38 @@ void forceResize (int width, int height) {
allocation.height = height;
// Call gtk_widget_get_preferred_size() on GTK 3.20+ to prevent warnings.
// See bug 486068.
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- GtkRequisition minimumSize = new GtkRequisition ();
- GtkRequisition naturalSize = new GtkRequisition ();
- GTK.gtk_widget_get_preferred_size (vboxHandle, minimumSize, naturalSize);
- }
+ GtkRequisition minimumSize = new GtkRequisition ();
+ GtkRequisition naturalSize = new GtkRequisition ();
+ GTK.gtk_widget_get_preferred_size (vboxHandle, minimumSize, naturalSize);
+
/*
* Bug 535075, 536153: On Wayland, we need to set the position of the GtkBox container
* relative to the shellHandle to prevent window contents rendered with offset.
*/
if (!OS.isX11()) {
- int [] dest_x = new int[1];
- int [] dest_y = new int[1];
- GTK.gtk_widget_translate_coordinates(vboxHandle, shellHandle, 0, 0, dest_x, dest_y);
- if (dest_x[0] != -1 && dest_y[0] != -1 && !isMappedToPopup()) {
- allocation.x += dest_x[0];
- allocation.y += dest_y[0];
+ if (GTK.GTK4) {
+ double[] window_offset_x = new double[1], window_offset_y = new double[1];
+ boolean validTranslation = GTK4.gtk_widget_translate_coordinates(vboxHandle, shellHandle, 0, 0, window_offset_x, window_offset_y);
+
+ if (validTranslation && !isMappedToPopup()) {
+ allocation.x += window_offset_x[0];
+ allocation.y += window_offset_y[0];
+ allocation.height -= window_offset_y[0];
+ }
+ } else {
+ int [] dest_x = new int[1];
+ int [] dest_y = new int[1];
+ GTK3.gtk_widget_translate_coordinates(vboxHandle, shellHandle, 0, 0, dest_x, dest_y);
+ if (dest_x[0] != -1 && dest_y[0] != -1 && !isMappedToPopup()) {
+ allocation.x += dest_x[0];
+ allocation.y += dest_y[0];
+ }
}
}
- if (GTK.GTK4) {
- GTK.gtk_widget_size_allocate (vboxHandle, allocation, -1);
- } else {
- GTK.gtk_widget_size_allocate (vboxHandle, allocation);
- }
- if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
+
+ gtk_widget_size_allocate(vboxHandle, allocation, -1);
+
+ if ((style & SWT.MIRRORED) != 0) moveChildren(clientWidth);
}
/**
@@ -1156,7 +1178,7 @@ public int getAlpha () {
long display = GDK.gdk_display_get_default();
composited = GDK.gdk_display_is_composited(display);
} else {
- long screen = GTK.gtk_widget_get_screen(shellHandle);
+ long screen = GTK3.gtk_widget_get_screen(shellHandle);
composited = GDK.gdk_screen_is_composited(screen);
}
if (composited) {
@@ -1173,21 +1195,21 @@ int getResizeMode (double x, double y) {
int border = gtk_container_get_border_width_or_margin (shellHandle);
int mode = 0;
if (y >= height - border) {
- mode = GDK.GDK_BOTTOM_SIDE ;
- if (x >= width - border - 16) mode = GDK.GDK_BOTTOM_RIGHT_CORNER;
- else if (x <= border + 16) mode = GDK.GDK_BOTTOM_LEFT_CORNER;
+ mode = SWT.CURSOR_SIZES;
+ if (x >= width - border - 16) mode = SWT.CURSOR_SIZESE;
+ else if (x <= border + 16) mode = SWT.CURSOR_SIZESW;
} else if (x >= width - border) {
- mode = GDK.GDK_RIGHT_SIDE;
- if (y >= height - border - 16) mode = GDK.GDK_BOTTOM_RIGHT_CORNER;
- else if (y <= border + 16) mode = GDK.GDK_TOP_RIGHT_CORNER;
+ mode = SWT.CURSOR_SIZEE;
+ if (y >= height - border - 16) mode = SWT.CURSOR_SIZESE;
+ else if (y <= border + 16) mode = SWT.CURSOR_SIZENE;
} else if (y <= border) {
- mode = GDK.GDK_TOP_SIDE;
- if (x <= border + 16) mode = GDK.GDK_TOP_LEFT_CORNER;
- else if (x >= width - border - 16) mode = GDK.GDK_TOP_RIGHT_CORNER;
+ mode = SWT.CURSOR_SIZEN;
+ if (x <= border + 16) mode = SWT.CURSOR_SIZENW;
+ else if (x >= width - border - 16) mode = SWT.CURSOR_SIZENE;
} else if (x <= border) {
- mode = GDK.GDK_LEFT_SIDE;
- if (y <= border + 16) mode = GDK.GDK_TOP_LEFT_CORNER;
- else if (y >= height - border - 16) mode = GDK.GDK_BOTTOM_LEFT_CORNER;
+ mode = SWT.CURSOR_SIZEW;
+ if (y <= border + 16) mode = SWT.CURSOR_SIZENW;
+ else if (y >= height - border - 16) mode = SWT.CURSOR_SIZESW;
}
return mode;
}
@@ -1220,7 +1242,11 @@ Point getLocationInPixels () {
setLocationInPixels(oldX, oldY);
}
int [] x = new int [1], y = new int [1];
- GTK.gtk_window_get_position (shellHandle, x,y);
+ if (GTK.GTK4) {
+ // TODO: GTK4 GtkWindow no longer has the ability to get position
+ } else {
+ GTK3.gtk_window_get_position (shellHandle, x, y);
+ }
return new Point (x [0], y [0]);
}
@@ -1252,8 +1278,36 @@ public Point getMinimumSize () {
Point getMinimumSizeInPixels () {
checkWidget ();
- int width = Math.max (1, minWidth + trimWidth ());
- int height = Math.max (1, minHeight + trimHeight ());
+ int width = Math.max (1, geometry.getMinWidth() + trimWidth ());
+ int height = Math.max (1, geometry.getMinHeight() + trimHeight ());
+ return new Point (width, height);
+}
+
+/**
+ * Returns a point describing the maximum receiver's size. The
+ * x coordinate of the result is the maximum width of the receiver.
+ * The y coordinate of the result is the maximum height of the
+ * receiver.
+ *
+ * @return the receiver's size
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public Point getMaximumSize () {
+ checkWidget ();
+ return DPIUtil.autoScaleDown (getMaximumSizeInPixels ());
+}
+
+Point getMaximumSizeInPixels () {
+ checkWidget ();
+
+ int width = Math.min (Integer.MAX_VALUE, geometry.getMaxWidth() + trimWidth ());
+ int height = Math.min (Integer.MAX_VALUE, geometry.getMaxHeight() + trimHeight ());
return new Point (width, height);
}
@@ -1370,6 +1424,7 @@ public int getImeInputMode () {
Shell _getShell () {
return this;
}
+
/**
* Returns an array containing all shells which are
* descendants of the receiver.
@@ -1382,11 +1437,11 @@ Shell _getShell () {
* </ul>
*/
public Shell [] getShells () {
- checkWidget();
+ checkWidget ();
int count = 0;
Shell [] shells = display.getShells ();
- for (int i=0; i<shells.length; i++) {
- Control shell = shells [i];
+ for (Shell activeshell : shells) {
+ Control shell = activeshell;
do {
shell = shell.getParent ();
} while (shell != null && shell != this);
@@ -1394,37 +1449,19 @@ public Shell [] getShells () {
}
int index = 0;
Shell [] result = new Shell [count];
- for (int i=0; i<shells.length; i++) {
- Control shell = shells [i];
+ for (Shell activeshell : shells) {
+ Control shell = activeshell;
do {
shell = shell.getParent ();
} while (shell != null && shell != this);
if (shell == this) {
- result [index++] = shells [i];
+ result [index++] = activeshell;
}
}
return result;
}
@Override
-long gtk_event (long widget, long event) {
- if (!GTK.GTK4) return 0;
- int eventType = GDK.gdk_event_get_event_type(event);
- switch (eventType) {
- case GDK.GDK4_BUTTON_PRESS: {
- return gtk_button_press_event(widget, event);
- }
- case GDK.GDK4_BUTTON_RELEASE: {
- return gtk_button_release_event(widget, event);
- }
- case GDK.GDK4_CONFIGURE: {
- return gtk_configure_event(widget, event);
- }
- }
- return 0;
-}
-
-@Override
long gtk_button_press_event (long widget, long event) {
if (widget == shellHandle) {
if (isCustomResize ()) {
@@ -1434,13 +1471,15 @@ long gtk_button_press_event (long widget, long event) {
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
+
int [] eventButton = new int [1];
GDK.gdk_event_get_button(event, eventButton);
+
if (eventButton[0] == 1) {
display.resizeLocationX = eventRX[0];
display.resizeLocationY = eventRY[0];
int [] x = new int [1], y = new int [1];
- GTK.gtk_window_get_position (shellHandle, x, y);
+ GTK3.gtk_window_get_position (shellHandle, x, y);
display.resizeBoundsX = x [0];
display.resizeBoundsY = y [0];
GtkAllocation allocation = new GtkAllocation ();
@@ -1456,7 +1495,7 @@ long gtk_button_press_event (long widget, long event) {
if (requiresUngrab()) {
long seat = GDK.gdk_event_get_seat(event);
GDK.gdk_seat_ungrab(seat);
- GTK.gtk_grab_remove(shellHandle);
+ GTK3.gtk_grab_remove(shellHandle);
}
return 0;
}
@@ -1466,7 +1505,7 @@ long gtk_button_press_event (long widget, long event) {
@Override
long gtk_configure_event (long widget, long event) {
int [] x = new int [1], y = new int [1];
- GTK.gtk_window_get_position (shellHandle, x, y);
+ GTK3.gtk_window_get_position (shellHandle, x, y);
if (!isVisible ()) {
return 0; //We shouldn't handle move/resize events if shell is hidden.
@@ -1586,10 +1625,15 @@ long gtk_leave_notify_event (long widget, long event) {
if (widget == shellHandle) {
if (isCustomResize ()) {
int [] state = new int [1];
- GDK.gdk_event_get_state(event, state);
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_state(event, state);
+ }
+
if ((state[0] & GDK.GDK_BUTTON1_MASK) == 0) {
if (GTK.GTK4) {
- GTK.gtk_widget_set_cursor (shellHandle, 0);
+ GTK4.gtk_widget_set_cursor (shellHandle, 0);
} else {
long window = gtk_widget_get_window (shellHandle);
GDK.gdk_window_set_cursor (window, 0);
@@ -1627,7 +1671,12 @@ long gtk_motion_notify_event (long widget, long event) {
if (widget == shellHandle) {
if (isCustomResize ()) {
int [] state = new int [1];
- GDK.gdk_event_get_state(event, state);
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_state(event, state);
+ }
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
@@ -1639,81 +1688,73 @@ long gtk_motion_notify_event (long widget, long event) {
int y = display.resizeBoundsY;
int width = display.resizeBoundsWidth;
int height = display.resizeBoundsHeight;
- int newWidth = Math.max(width - dx, Math.max(minWidth, border + border));
- int newHeight = Math.max(height - dy, Math.max(minHeight, border + border));
+ int newWidth = Math.max(width - dx, Math.max(geometry.getMinWidth(), border + border));
+ int newHeight = Math.max(height - dy, Math.max(geometry.getMinHeight(), border + border));
switch (display.resizeMode) {
- case GDK.GDK_LEFT_SIDE:
+ case SWT.CURSOR_SIZEW:
x += width - newWidth;
width = newWidth;
break;
- case GDK.GDK_TOP_LEFT_CORNER:
+ case SWT.CURSOR_SIZENW:
x += width - newWidth;
width = newWidth;
y += height - newHeight;
height = newHeight;
break;
- case GDK.GDK_TOP_SIDE:
+ case SWT.CURSOR_SIZEN:
y += height - newHeight;
height = newHeight;
break;
- case GDK.GDK_TOP_RIGHT_CORNER:
- width = Math.max(width + dx, Math.max(minWidth, border + border));
+ case SWT.CURSOR_SIZENE:
+ width = Math.max(width + dx, Math.max(geometry.getMinWidth(), border + border));
y += height - newHeight;
height = newHeight;
break;
- case GDK.GDK_RIGHT_SIDE:
- width = Math.max(width + dx, Math.max(minWidth, border + border));
+ case SWT.CURSOR_SIZEE:
+ width = Math.max(width + dx, Math.max(geometry.getMinWidth(), border + border));
break;
- case GDK.GDK_BOTTOM_RIGHT_CORNER:
- width = Math.max(width + dx, Math.max(minWidth, border + border));
- height = Math.max(height + dy, Math.max(minHeight, border + border));
+ case SWT.CURSOR_SIZESE:
+ width = Math.max(width + dx, Math.max(geometry.getMinWidth(), border + border));
+ height = Math.max(height + dy, Math.max(geometry.getMinHeight(), border + border));
break;
- case GDK.GDK_BOTTOM_SIDE:
- height = Math.max(height + dy, Math.max(minHeight, border + border));
+ case SWT.CURSOR_SIZES:
+ height = Math.max(height + dy, Math.max(geometry.getMinHeight(), border + border));
break;
- case GDK.GDK_BOTTOM_LEFT_CORNER:
+ case SWT.CURSOR_SIZESW:
x += width - newWidth;
width = newWidth;
- height = Math.max(height + dy, Math.max(minHeight, border + border));
+ height = Math.max(height + dy, Math.max(geometry.getMinHeight(), border + border));
break;
}
if (x != display.resizeBoundsX || y != display.resizeBoundsY) {
if (GTK.GTK4) {
- GDK.gdk_surface_move_resize (gtk_widget_get_surface (shellHandle), x, y, width, height);
+ /* TODO: GTK4 no longer exist, will probably need to us gdk_toplevel_begin_move &
+ * gdk_toplevel_begin_resize to provide this functionality
+ */
} else {
GDK.gdk_window_move_resize (gtk_widget_get_window (shellHandle), x, y, width, height);
}
} else {
- GTK.gtk_window_resize (shellHandle, width, height);
+ GTK3.gtk_window_resize (shellHandle, width, height);
}
} else {
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+ if (GTK.GTK4) {
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ }
+
int mode = getResizeMode (eventX[0], eventY[0]);
if (mode != display.resizeMode) {
- long cursor;
+ long cursor = display.getSystemCursor(mode).handle;
if (GTK.GTK4) {
- byte [] name;
- switch (mode) {
- case GDK.GDK_BOTTOM_RIGHT_CORNER: name = Converter.wcsToMbcs("se-resize", true); break;
- case GDK.GDK_BOTTOM_LEFT_CORNER: name = Converter.wcsToMbcs("sw-resize", true); break;
- case GDK.GDK_TOP_LEFT_CORNER: name = Converter.wcsToMbcs("nw-resize", true); break;
- case GDK.GDK_TOP_RIGHT_CORNER: name = Converter.wcsToMbcs("ne-resize", true); break;
- case GDK.GDK_BOTTOM_SIDE: name = Converter.wcsToMbcs("s-resize", true); break;
- case GDK.GDK_TOP_SIDE: name = Converter.wcsToMbcs("n-resize", true); break;
- case GDK.GDK_LEFT_SIDE: name = Converter.wcsToMbcs("w-resize", true); break;
- case GDK.GDK_RIGHT_SIDE: name = Converter.wcsToMbcs("e-resize", true); break;
- default: name = Converter.wcsToMbcs("none", true); break;
- }
- cursor = GDK.gdk_cursor_new_from_name(name, 0);
- GTK.gtk_widget_set_cursor (shellHandle, cursor);
+ GTK4.gtk_widget_set_cursor (shellHandle, cursor);
} else {
long window = gtk_widget_get_window (shellHandle);
- cursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), mode);
GDK.gdk_window_set_cursor (window, cursor);
}
- OS.g_object_unref (cursor);
display.resizeMode = mode;
}
}
@@ -1741,10 +1782,16 @@ long gtk_key_press_event (long widget, long event) {
GTK.gtk_accelerator_parse (accel [0], keyval, mods);
OS.g_free (accel [0]);
if (keyval [0] != 0) {
- int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
- int [] state = new int [1];
- GDK.gdk_event_get_state(event, state);
+ int [] key = new int [1];
+ int [] state = new int[1];
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ GDK.gdk_event_get_state(event, state);
+ }
+
int mask = GTK.gtk_accelerator_get_default_mod_mask ();
if (key[0] == keyval [0] && (state[0] & mask) == (mods [0] & mask)) {
return focusControl.gtk_key_press_event (focusControl.focusHandle (), event);
@@ -1761,9 +1808,44 @@ long gtk_key_press_event (long widget, long event) {
@Override
long gtk_size_allocate (long widget, long allocation) {
int width, height;
+ GdkRectangle monitorSize = new GdkRectangle();
int[] widthA = new int [1];
int[] heightA = new int [1];
- GTK.gtk_window_get_size(shellHandle, widthA, heightA);
+
+ /*Bug 577431:
+ * In GTK4 using gtk_window_get_default_size returns the previously set size even
+ * if the window is maximized. Due to this it cannot be used when the shell has
+ * been maximized. To fix this, get the monitor geometry ONLY when the window is
+ * maximized and use this as the dimensions. Furthermore, the headerBar size needs
+ * to be taken into account,otherwise some content will be off screen.
+ *
+ * While this fix allows the usage of the entire horizontal space, the vertical
+ * space is more tricky. Under Wayland, getting the work area of the display is
+ * not possible and not supported. A "hacky" way has been used in GTK4 thus far
+ * to get the header bar height, which is then subtracted from the display height.
+ * This gets the height *mostly* correct, but there is about 10 pixels that
+ * are not used.
+ *
+ * This should be revisited at a later time, when the GTK4 port is more mature.
+ * TODO: Make use of the entire vertical height
+ */
+ if (GTK.GTK4) {
+ if(!GTK4.gtk_window_is_maximized(shellHandle)) {
+ GTK.gtk_window_get_default_size(shellHandle, widthA, heightA);
+ }
+ else {
+ long display = GDK.gdk_display_get_default();
+ long monitor = GDK.gdk_display_get_monitor_at_surface(display, paintSurface());
+ GDK.gdk_monitor_get_geometry(monitor, monitorSize);
+ long header = GTK4.gtk_widget_get_next_sibling(GTK4.gtk_widget_get_first_child(shellHandle));
+ int[] headerNaturalHeight = new int[1];
+ GTK4.gtk_widget_measure(header, GTK.GTK_ORIENTATION_VERTICAL, 0, null, headerNaturalHeight, null, null);
+ widthA[0] = monitorSize.width;
+ heightA[0] = monitorSize.height - headerNaturalHeight[0];
+ }
+ } else {
+ GTK3.gtk_window_get_size(shellHandle, widthA, heightA);
+ }
width = widthA[0];
height = heightA[0];
@@ -1837,8 +1919,11 @@ private void updateDecorations(long gdkResource) {
if ((style & SWT.NO_MOVE) == 0) functions |= GDK.GDK_FUNC_MOVE;
}
if (GTK.GTK4) {
- GDK.gdk_surface_set_decorations (gdkResource, decorations);
- GDK.gdk_surface_set_functions(gdkResource, functions);
+ /*TODO: GTK4 no longer supports specifying hints for window management functions to be available on the window frame
+ * Usually window managers don't do anything with the hint anyways. */
+ /*TODO: GTK4 no longer supports specifying hints for window management decorations. There is no direct way to specify the
+ * decorations we want/don't want. May have to implement client-side decorations. Use gdk_toplevel_set_decorated to indicate.
+ * A replacement for SWT.CLOSE in GTK4 is gdk_toplevel_set_deletable */
} else {
GDK.gdk_window_set_decorations (gdkResource, decorations);
/*
@@ -1863,23 +1948,26 @@ long gtk_realize (long widget) {
if ((style & SWT.SHELL_TRIM) != SWT.SHELL_TRIM) {
updateDecorations(gdkResource);
} else if ((style & SWT.NO_MOVE) != 0) {
- // if the GDK_FUNC_ALL bit is present, all the other style
- // bits specified as a parameter will be removed from the window
if (GTK.GTK4) {
- GDK.gdk_surface_set_functions (gdkResource, GDK.GDK_FUNC_ALL | GDK.GDK_FUNC_MOVE);
+ /*TODO: GTK4 no longer supports specifying hints for window management functions to be available on the window frame
+ * Usually window managers don't do anything with the hint anyways. */
} else {
+ // if the GDK_FUNC_ALL bit is present, all the other style
+ // bits specified as a parameter will be removed from the window
GDK.gdk_window_set_functions (gdkResource, GDK.GDK_FUNC_ALL | GDK.GDK_FUNC_MOVE);
}
}
- if ((style & SWT.ON_TOP) != 0) GTK.gtk_window_set_keep_above(shellHandle, true);
+ if ((style & SWT.ON_TOP) != 0) {
+ if (!GTK.GTK4) GTK3.gtk_window_set_keep_above(shellHandle, true);
+ }
return result;
}
@Override
long gtk_window_state_event (long widget, long event) {
GdkEventWindowState gdkEvent = new GdkEventWindowState ();
- OS.memmove (gdkEvent, event, GdkEventWindowState.sizeof);
+ GTK3.memmove (gdkEvent, event, GdkEventWindowState.sizeof);
minimized = (gdkEvent.new_window_state & GDK.GDK_WINDOW_STATE_ICONIFIED) != 0;
maximized = (gdkEvent.new_window_state & GDK.GDK_WINDOW_STATE_MAXIMIZED) != 0;
fullScreen = (gdkEvent.new_window_state & GDK.GDK_WINDOW_STATE_FULLSCREEN) != 0;
@@ -1895,14 +1983,14 @@ long gtk_window_state_event (long widget, long event) {
}
@Override
-long notifyStateProc (long gdk_handle, long handle) {
+long notifyState (long object, long arg0) {
// GTK4 equivalent of gtk_window_state_event
assert GTK.GTK4;
- int gdkSurfaceState = GDK.gdk_surface_get_state (gdk_handle);
- minimized = (gdkSurfaceState & GDK.GDK_SURFACE_STATE_ICONIFIED) != 0;
+ int gdkSurfaceState = GTK4.gdk_toplevel_get_state (object);
+ minimized = (gdkSurfaceState & GDK.GDK_SURFACE_STATE_MINIMIZED) != 0;
maximized = (gdkSurfaceState & GDK.GDK_SURFACE_STATE_MAXIMIZED) != 0;
fullScreen = (gdkSurfaceState & GDK.GDK_SURFACE_STATE_FULLSCREEN) != 0;
- if ((gdkSurfaceState & GDK.GDK_SURFACE_STATE_ICONIFIED) != 0) {
+ if ((gdkSurfaceState & GDK.GDK_SURFACE_STATE_MINIMIZED) != 0) {
if (minimized) {
sendEvent (SWT.Iconify);
} else {
@@ -1937,9 +2025,6 @@ long notifyStateProc (long gdk_handle, long handle) {
public void open () {
checkWidget ();
bringToTop (false);
- if (Shell.class.isInstance(getParent()) && !getParent().isVisible()) {
- Shell.class.cast(getParent()).open();
- }
setVisible (true);
if (isDisposed ()) return;
/*
@@ -1977,6 +2062,27 @@ public boolean print (GC gc) {
checkWidget ();
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+ // Needs to be implemented on GTK4/Wayland
+ if (!GTK.GTK4 && OS.isX11()) {
+ Rectangle clipping = gc.getClipping();
+ long shellWindow = gtk_widget_get_window(shellHandle);
+ GdkRectangle rect = new GdkRectangle ();
+ GDK.gdk_window_get_frame_extents (shellWindow, rect);
+ if (clipping.height < rect.height || clipping.width < rect.width) {
+ System.err.println("Warning: the GC provided to Shell.print() has a smaller"
+ + " clipping than what is needed to print the Shell trimmings"
+ + " and content. Only the client area will be printed.");
+ return super.print(gc);
+ }
+ long rootWindow = GDK.gdk_get_default_root_window();
+ long pixbuf = GDK.gdk_pixbuf_get_from_window(rootWindow, rect.x, rect.y, rect.width, rect.height);
+ if (pixbuf != 0) {
+ GDK.gdk_cairo_set_source_pixbuf(gc.handle, pixbuf, 0, 0);
+ Cairo.cairo_paint(gc.handle);
+ OS.g_object_unref(pixbuf);
+ return true;
+ }
+ }
return false;
}
@@ -2127,7 +2233,7 @@ public void setAlpha (int alpha) {
long display = GDK.gdk_display_get_default();
composited = GDK.gdk_display_is_composited(display);
} else {
- long screen = GTK.gtk_widget_get_screen(shellHandle);
+ long screen = GTK3.gtk_widget_get_screen(shellHandle);
composited = GDK.gdk_screen_is_composited(screen);
}
if (composited) {
@@ -2138,16 +2244,12 @@ public void setAlpha (int alpha) {
void resizeBounds (int width, int height, boolean notify) {
int border = gtk_container_get_border_width_or_margin (shellHandle);
if (GTK.GTK4) {
- if (redrawSurface != 0) {
- GDK.gdk_surface_resize (redrawSurface, width, height);
- }
- if (redrawSurface != 0) {
- GDK.gdk_surface_resize (redrawSurface, width, height);
+ if (parent != null) {
+ GtkAllocation allocation = new GtkAllocation();
+ allocation.width = width;
+ allocation.height = height;
+ GTK4.gtk_widget_size_allocate(shellHandle, allocation, -1);
}
- GtkAllocation allocation = new GtkAllocation();
- allocation.width = width;
- allocation.height = height;
- GTK.gtk_widget_size_allocate(shellHandle, allocation, -1);
} else {
if (redrawWindow != 0) {
GDK.gdk_window_resize (redrawWindow, width, height);
@@ -2169,13 +2271,16 @@ void resizeBounds (int width, int height, boolean notify) {
if (layout != null) {
markLayout (false, false);
updateLayout (false);
+ if (isCustomResize()) {
+ // bug 546961: trigger an extra resize to prevent scrollbar sliders paint problems after custom resize
+ forceResize(boxWidth, boxHeight);
+ }
}
}
}
@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
- // bug in GTK2 crashes JVM, in GTK3 the new shell only. See bug 472743
width = Math.min(width, (2 << 14) - 1);
height = Math.min(height, (2 << 14) - 1);
@@ -2196,41 +2301,62 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
}
int result = 0;
if (move) {
- int [] x_pos = new int [1], y_pos = new int [1];
- GTK.gtk_window_get_position (shellHandle, x_pos, y_pos);
- GTK.gtk_window_move (shellHandle, x, y);
- /*
- * Bug in GTK: gtk_window_get_position () is not always up-to-date right after
- * gtk_window_move (). The random delays cause problems like bug 445900.
- *
- * The workaround is to wait for the position change to be processed.
- * The limit 1000 is an experimental value. I've seen cases where about 200
- * iterations were necessary.
- */
- for (int i = 0; i < 1000; i++) {
- int [] x2_pos = new int [1], y2_pos = new int [1];
- GTK.gtk_window_get_position (shellHandle, x2_pos, y2_pos);
- if (x2_pos[0] == x && y2_pos[0] == y) {
- break;
+ if (!GTK.GTK4) {
+ int [] x_pos = new int [1], y_pos = new int [1];
+ GTK3.gtk_window_get_position(shellHandle, x_pos, y_pos);
+ GTK3.gtk_window_move(shellHandle, x, y);
+ /*
+ * Bug in GTK: gtk_window_get_position () is not always up-to-date right after
+ * gtk_window_move (). The random delays cause problems like bug 445900.
+ *
+ * The workaround is to wait for the position change to be processed.
+ * The limit 1000 is an experimental value. I've seen cases where about 200
+ * iterations were necessary.
+ */
+ for (int i = 0; i < 1000; i++) {
+ int [] x2_pos = new int [1], y2_pos = new int [1];
+ GTK3.gtk_window_get_position(shellHandle, x2_pos, y2_pos);
+ if (x2_pos[0] == x && y2_pos[0] == y) {
+ break;
+ }
+ }
+ if (x_pos [0] != x || y_pos [0] != y) {
+ moved = true;
+ oldX = x;
+ oldY = y;
+ sendEvent(SWT.Move);
+ if (isDisposed ()) return 0;
+ result |= MOVED;
}
- }
- if (x_pos [0] != x || y_pos [0] != y) {
- moved = true;
- oldX = x;
- oldY = y;
- sendEvent (SWT.Move);
- if (isDisposed ()) return 0;
- result |= MOVED;
}
}
if (resize) {
- width = Math.max (1, Math.max (minWidth, width - trimWidth ()));
- height = Math.max (1, Math.max (minHeight, height - trimHeight ()));
+ width = Math.max (1, Math.max (geometry.getMinWidth(), width - trimWidth ()));
+ if (geometry.getMaxWidth() > 0) {
+ width = Math.min( width, geometry.getMaxWidth());
+ }
+ height = Math.max (1, Math.max (geometry.getMinHeight(), height - trimHeight ()));
+ if (geometry.getMaxHeight() > 0) {
+ height = Math.min(height, geometry.getMaxHeight());
+ }
/*
* If the shell is created without a RESIZE style bit, and the
- * minWidth/minHeight has been set, allow the resize.
+ * minWidth/minHeight/maxWidth/maxHeight have been set, allow the resize.
*/
- if ((style & SWT.RESIZE) != 0 || (minHeight != 0 || minWidth != 0)) GTK.gtk_window_resize (shellHandle, width, height);
+ if ((style & SWT.RESIZE) != 0 || (geometry.getMinHeight() != 0 || geometry.getMinWidth() != 0 || geometry.getMaxHeight() != 0 || geometry.getMaxWidth() != 0)) {
+ if (GTK.GTK4) {
+ /*
+ * On GTK4, GtkWindow size includes the header bar. In order to keep window size allocation of the client area
+ * consistent with previous versions of SWT, we need to include the header bar height in addition to the given height value.
+ */
+ long header = GTK4.gtk_widget_get_next_sibling(GTK4.gtk_widget_get_first_child(shellHandle));
+ int[] headerNaturalHeight = new int[1];
+ GTK4.gtk_widget_measure(header, GTK.GTK_ORIENTATION_VERTICAL, 0, null, headerNaturalHeight, null, null);
+ GTK.gtk_window_set_default_size(shellHandle, width, height + headerNaturalHeight[0]);
+ } else {
+ GTK3.gtk_window_resize (shellHandle, width, height);
+ }
+ }
boolean changed = width != oldWidth || height != oldHeight;
if (changed) {
oldWidth = width;
@@ -2244,15 +2370,12 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
@Override
void setCursor (long cursor) {
- if (GTK.GTK4) {
- if (enableSurface != 0) {
- GDK.gdk_surface_set_cursor (enableSurface, cursor);
- }
- } else {
+ if (!GTK.GTK4) {
if (enableWindow != 0) {
- GDK.gdk_window_set_cursor (enableWindow, cursor);
+ GDK.gdk_window_set_cursor(enableWindow, cursor);
}
}
+
super.setCursor (cursor);
}
@@ -2276,29 +2399,7 @@ public void setEnabled (boolean enabled) {
}
enableWidget (enabled);
if (isDisposed ()) return;
- if (GTK.GTK4) {
- if (enabled) {
- if (enableSurface != 0) {
- cleanupEnableSurface();
- }
- } else {
- long parentHandle = shellHandle;
- GTK.gtk_widget_realize (parentHandle);
- long surface = gtk_widget_get_surface (parentHandle);
- Rectangle rect = getBoundsInPixels ();
- GdkRectangle gdkRectangle = new GdkRectangle ();
- gdkRectangle.width = rect.width;
- gdkRectangle.height = rect.height;
- enableSurface = GDK.gdk_surface_new_child (surface, gdkRectangle);
- if (enableSurface != 0) {
- if (cursor != null) {
- GDK.gdk_surface_set_cursor (enableSurface, cursor.handle);
- }
- GDK.gdk_surface_set_user_data (enableSurface, parentHandle);
- GDK.gdk_surface_show (enableSurface);
- }
- }
- } else {
+ if (!GTK.GTK4) {
if (enabled) {
if (enableWindow != 0) {
cleanupEnableWindow();
@@ -2314,23 +2415,17 @@ public void setEnabled (boolean enabled) {
attributes.event_mask = (0xFFFFFFFF & ~OS.ExposureMask);
attributes.wclass = GDK.GDK_INPUT_ONLY;
attributes.window_type = GDK.GDK_WINDOW_CHILD;
- enableWindow = GDK.gdk_window_new (window, attributes, 0);
+ enableWindow = GTK3.gdk_window_new (window, attributes, 0);
if (enableWindow != 0) {
if (cursor != null) {
GDK.gdk_window_set_cursor (enableWindow, cursor.handle);
}
- /* 427776: we need to listen to all enter-notify-event signals to
- * see if this new GdkWindow has been added to a widget's internal
- * hash table, so when the GdkWindow is destroyed we can also remove
- * that reference. */
- if (enterNotifyEventFunc != null)
- enterNotifyEventId = OS.g_signal_add_emission_hook (enterNotifyEventSignalId, 0, enterNotifyEventFunc.getAddress (), enableWindow, 0);
-
GDK.gdk_window_set_user_data (enableWindow, parentHandle);
GDK.gdk_window_show (enableWindow);
}
}
}
+
if (fixFocus) fixFocus (control);
if (enabled && display.activeShell == this) {
if (!restoreFocus ()) traverseGroup (false);
@@ -2346,8 +2441,9 @@ public void setEnabled (boolean enabled) {
* to either the maximized or normal states.
* <p>
* Note: The result of intermixing calls to <code>setFullScreen(true)</code>,
- * <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will
- * vary by platform. Typically, the behavior will match the platform user's
+ * <code>setMaximized(true)</code>, <code>setMinimized(true)</code> and
+ * <code>setMaximumSize</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
* expectations, but not always. This should be avoided if possible.
* </p>
*
@@ -2394,49 +2490,71 @@ public void setImeInputMode (int mode) {
}
@Override
-void setInitialBounds () {
+void setInitialBounds() {
int width = 0, height = 0;
+
if ((state & FOREIGN_HANDLE) != 0) {
GtkAllocation allocation = new GtkAllocation ();
GTK.gtk_widget_get_allocation (shellHandle, allocation);
width = allocation.width;
height = allocation.height;
} else {
- GdkRectangle dest = new GdkRectangle ();
- if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
+ GdkRectangle dest = new GdkRectangle();
+
+ if (GTK.GTK4) {
long display = GDK.gdk_display_get_default();
if (display != 0) {
- long monitor;
- if (GTK.GTK4) {
- monitor = GDK.gdk_display_get_monitor_at_surface(display, paintSurface());
- } else {
- monitor = GDK.gdk_display_get_monitor_at_window(display, paintWindow());
- }
+ long monitor = GDK.gdk_display_get_monitor_at_surface(display, paintSurface());
GDK.gdk_monitor_get_geometry(monitor, dest);
- width = dest.width * 5 / 8;
- height = dest.height * 5 / 8;
+ width = (int) (dest.width * SHELL_TO_MONITOR_RATIO);
+ height = (int) (dest.height * SHELL_TO_MONITOR_RATIO);
+ }
+
+ if ((style & SWT.RESIZE) != 0) {
+ /*
+ * On GTK4, GtkWindow size includes the header bar. In order to keep window size allocation of the client area
+ * consistent with previous versions of SWT, we need to include the header bar height in addition to the given height value.
+ */
+ long header = GTK4.gtk_widget_get_next_sibling(GTK4.gtk_widget_get_first_child(shellHandle));
+ int[] headerNaturalHeight = new int[1];
+ GTK4.gtk_widget_measure(header, GTK.GTK_ORIENTATION_VERTICAL, 0, null, headerNaturalHeight, null, null);
+
+ GTK.gtk_window_set_default_size(shellHandle, width, height + headerNaturalHeight[0]);
}
} else {
- long screen = GDK.gdk_screen_get_default ();
- if (screen != 0) {
- if (GDK.gdk_screen_get_n_monitors (screen) > 1) {
- int monitorNumber = GDK.gdk_screen_get_monitor_at_window (screen, paintWindow ());
- GDK.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest);
- width = dest.width * 5 / 8;
- height = dest.height * 5 / 8;
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
+ long display = GDK.gdk_display_get_default();
+ if (display != 0) {
+ long monitor = GDK.gdk_display_get_monitor_at_window(display, paintWindow());
+ GDK.gdk_monitor_get_geometry(monitor, dest);
+ width = (int) (dest.width * SHELL_TO_MONITOR_RATIO);
+ height = (int) (dest.height * SHELL_TO_MONITOR_RATIO);
+ }
+ } else {
+ long screen = GDK.gdk_screen_get_default();
+ if (screen != 0) {
+ if (GDK.gdk_screen_get_n_monitors(screen) > 1) {
+ int monitorNumber = GDK.gdk_screen_get_monitor_at_window(screen, paintWindow());
+ GDK.gdk_screen_get_monitor_geometry(screen, monitorNumber, dest);
+ width = (int) (dest.width * SHELL_TO_MONITOR_RATIO);
+ height = (int) (dest.height * SHELL_TO_MONITOR_RATIO);
+ }
}
}
- }
- if (width == 0 && height == 0 && !GTK.GTK4) {
- // if the above failed, use gdk_screen_height/width as a fallback
- width = GDK.gdk_screen_width () * 5 / 8;
- height = GDK.gdk_screen_height () * 5 / 8;
- }
- if ((style & SWT.RESIZE) != 0) {
- GTK.gtk_window_resize (shellHandle, width, height);
+
+ if (width == 0 && height == 0) {
+ // if the above failed, use gdk_screen_height/width as a fallback
+ width = (int) (GDK.gdk_screen_width() * SHELL_TO_MONITOR_RATIO);
+ height = (int) (GDK.gdk_screen_height() * SHELL_TO_MONITOR_RATIO);
+ }
+
+ if ((style & SWT.RESIZE) != 0) {
+ GTK3.gtk_window_resize(shellHandle, width, height);
+ }
}
}
- resizeBounds (width, height, false);
+
+ resizeBounds(width, height, false);
}
@Override
@@ -2455,22 +2573,31 @@ public void setMenuBar (Menu menu) {
checkWidget();
if (menuBar == menu) return;
boolean both = menu != null && menuBar != null;
+
if (menu != null) {
- if ((menu.style & SWT.BAR) == 0) error (SWT.ERROR_MENU_NOT_BAR);
- if (menu.parent != this) error (SWT.ERROR_INVALID_PARENT);
+ if ((menu.style & SWT.BAR) == 0) error(SWT.ERROR_MENU_NOT_BAR);
+ if (menu.parent != this) error(SWT.ERROR_INVALID_PARENT);
}
+
if (menuBar != null) {
long menuHandle = menuBar.handle;
GTK.gtk_widget_hide (menuHandle);
- destroyAccelGroup ();
+
+ if (!GTK.GTK4) {
+ destroyAccelGroup();
+ }
}
menuBar = menu;
if (menuBar != null) {
long menuHandle = menu.handle;
GTK.gtk_widget_show (menuHandle);
- createAccelGroup ();
- menuBar.addAccelerators (accelGroup);
+
+ if (!GTK.GTK4) {
+ createAccelGroup();
+ menuBar.addAccelerators(accelGroup);
+ }
}
+
GtkAllocation allocation = new GtkAllocation ();
GTK.gtk_widget_get_allocation (vboxHandle, allocation);
int width = allocation.width;
@@ -2487,9 +2614,17 @@ public void setMinimized (boolean minimized) {
GTK.gtk_widget_show(shellHandle);
}
if (minimized) {
- GTK.gtk_window_iconify (shellHandle);
+ if (GTK.GTK4) {
+ GTK4.gtk_window_minimize(shellHandle);
+ } else {
+ GTK3.gtk_window_iconify (shellHandle);
+ }
} else {
- GTK.gtk_window_deiconify (shellHandle);
+ if (GTK.GTK4) {
+ GTK4.gtk_window_unminimize(shellHandle);
+ } else {
+ GTK3.gtk_window_deiconify (shellHandle);
+ }
bringToTop (false);
}
}
@@ -2516,10 +2651,19 @@ public void setMinimumSize (int width, int height) {
void setMinimumSizeInPixels (int width, int height) {
checkWidget ();
- GdkGeometry geometry = new GdkGeometry ();
- minWidth = geometry.min_width = Math.max (width, trimWidth ()) - trimWidth ();
- minHeight = geometry.min_height = Math.max (height, trimHeight ()) - trimHeight ();
- GTK.gtk_window_set_geometry_hints (shellHandle, 0, geometry, GDK.GDK_HINT_MIN_SIZE);
+ geometry.setMinWidth(Math.max (width, trimWidth ()) - trimWidth ());
+ geometry.setMinHeight(Math.max (height, trimHeight ()) - trimHeight ());
+
+ if(GTK.GTK4) {
+ geometry.setMinSizeRequested(true);
+ return;
+ }
+
+ int hint = GDK.GDK_HINT_MIN_SIZE;
+ if (geometry.getMaxHeight() > 0 || geometry.getMaxWidth() > 0) {
+ hint = hint | GDK.GDK_HINT_MAX_SIZE;
+ }
+ GTK3.gtk_window_set_geometry_hints (shellHandle, 0, (GdkGeometry) geometry, hint);
}
/**
@@ -2551,6 +2695,75 @@ void setMinimumSizeInPixels (Point size) {
}
/**
+ * Sets the receiver's maximum size to the size specified by the arguments.
+ * If the new maximum size is smaller than the current size of the receiver,
+ * the receiver is resized to the new maximum size.
+ * <p>
+ * Note: The result of intermixing calls to <code>setMaximumSize</code> and
+ * <code>setFullScreen(true)</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
+ * expectations, but not always. This should be avoided if possible.
+ * </p>
+ * @param width the new maximum width for the receiver
+ * @param height the new maximum height for the receiver
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public void setMaximumSize (int width, int height) {
+ checkWidget ();
+ setMaximumSize (new Point (width, height));
+}
+
+/**
+ * Sets the receiver's maximum size to the size specified by the argument.
+ * If the new maximum size is smaller than the current size of the receiver,
+ * the receiver is resized to the new maximum size.
+ * <p>
+ * Note: The result of intermixing calls to <code>setMaximumSize</code> and
+ * <code>setFullScreen(true)</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
+ * expectations, but not always. This should be avoided if possible.
+ * </p>
+ * @param size the new maximum size for the receiver
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the point is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public void setMaximumSize (Point size) {
+ checkWidget ();
+ setMaximumSizeInPixels (DPIUtil.autoScaleUp (size));
+}
+
+void setMaximumSizeInPixels (Point size) {
+ checkWidget ();
+ if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
+ setMaximumSizeInPixels (size.x, size.y);
+}
+
+void setMaximumSizeInPixels (int width, int height) {
+ checkWidget ();
+ geometry.setMaxWidth(Math.max (width, trimWidth ()) - trimWidth ());
+ geometry.setMaxHeight(Math.max (height, trimHeight ()) - trimHeight ());
+ int hint = GDK.GDK_HINT_MAX_SIZE;
+ if (geometry.getMinWidth() > 0 || geometry.getMinHeight() > 0) {
+ hint = hint | GDK.GDK_HINT_MIN_SIZE;
+ }
+ GTK3.gtk_window_set_geometry_hints (shellHandle, 0, (GdkGeometry) geometry, hint);
+}
+
+/**
* Sets the receiver's modified state as specified by the argument.
*
* @param modified the new modified state for the receiver
@@ -2690,7 +2903,7 @@ public void setVisible (boolean visible) {
* up in front of the full-screen window.
*/
if (parent!=null && parent.getShell().getFullScreen()) {
- GTK.gtk_window_set_type_hint(shellHandle, GDK.GDK_WINDOW_TYPE_HINT_DIALOG);
+ GTK3.gtk_window_set_type_hint(shellHandle, GDK.GDK_WINDOW_TYPE_HINT_DIALOG);
}
} else {
updateModal ();
@@ -2729,10 +2942,10 @@ public void setVisible (boolean visible) {
*/
if (oldWidth == 0 && oldHeight == 0) {
int [] init_width = new int[1], init_height = new int[1];
- GTK.gtk_window_get_size(shellHandle, init_width, init_height);
- GTK.gtk_window_resize(shellHandle, 1, 1);
+ GTK3.gtk_window_get_size(shellHandle, init_width, init_height);
+ GTK3.gtk_window_resize(shellHandle, 1, 1);
GTK.gtk_widget_show (shellHandle);
- GTK.gtk_window_resize(shellHandle, init_width[0], init_height[0]);
+ GTK3.gtk_window_resize(shellHandle, init_width[0], init_height[0]);
resizeBounds (init_width[0], init_height[0], false);
} else {
GTK.gtk_widget_show (shellHandle);
@@ -2741,45 +2954,30 @@ public void setVisible (boolean visible) {
* Feature in GTK: This handles grabbing the keyboard focus from a SWT.ON_TOP window
* if it has editable fields and is running Wayland. Refer to bug 515773.
*/
- if (GTK.GTK4) {
- if (enableSurface != 0) GDK.gdk_surface_raise (enableSurface);
- } else {
- if (enableWindow != 0) GDK.gdk_window_raise (enableWindow);
+ if (!GTK.GTK4) {
+ if (enableWindow != 0) GDK.gdk_window_raise(enableWindow);
}
if (isDisposed ()) return;
- if (!(OS.isX11() && GTK.GTK_IS_PLUG (shellHandle))) {
- if (GTK.GTK4) {
- display.dispatchEvents = new int [] {
- GDK.GDK4_EXPOSE,
- GDK.GDK4_FOCUS_CHANGE,
- GDK.GDK4_CONFIGURE,
- GDK.GDK4_MAP,
- GDK.GDK4_UNMAP,
- };
- } else {
- display.dispatchEvents = new int [] {
- GDK.GDK_EXPOSE,
- GDK.GDK_FOCUS_CHANGE,
- GDK.GDK_CONFIGURE,
- GDK.GDK_MAP,
- GDK.GDK_UNMAP,
- GDK.GDK_NO_EXPOSE,
- GDK.GDK_WINDOW_STATE
- };
- }
+ if (!( !GTK.GTK4 && OS.isX11() && GTK.GTK_IS_PLUG (shellHandle))) {
+ display.dispatchEvents = new int [] {
+ GDK.GDK_EXPOSE,
+ GDK.GDK_FOCUS_CHANGE,
+ GDK.GDK_CONFIGURE,
+ GDK.GDK_MAP,
+ GDK.GDK_UNMAP,
+ GDK.GDK_NO_EXPOSE,
+ GDK.GDK_WINDOW_STATE
+ };
Display display = this.display;
display.putGdkEvents();
boolean iconic = false;
Shell shell = parent != null ? parent.getShell() : null;
do {
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock before calling the function below.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- OS.g_main_context_iteration (0, false);
+ if (GTK.GTK4) {
+ OS.g_main_context_iteration (0, false);
+ } else {
+ GTK3.gtk_main_iteration_do (false);
+ }
if (isDisposed ()) break;
iconic = minimized || (shell != null && shell.minimized);
} while (!mapped && !iconic);
@@ -2794,7 +2992,7 @@ public void setVisible (boolean visible) {
mapped = true;
if ((style & mask) != 0) {
- gdk_pointer_ungrab (GTK.gtk_widget_get_window (shellHandle), GDK.GDK_CURRENT_TIME);
+ if (!GTK.GTK4) gdk_pointer_ungrab (GTK3.gtk_widget_get_window (shellHandle), GDK.GDK_CURRENT_TIME);
}
opened = true;
if (!moved) {
@@ -2819,7 +3017,7 @@ public void setVisible (boolean visible) {
}
} else {
fixActiveShell ();
- checkAndUnrabFocus();
+ checkAndUngrabFocus();
GTK.gtk_widget_hide (shellHandle);
sendEvent (SWT.Hide);
}
@@ -2857,14 +3055,28 @@ void showWidget () {
display.activeShell = this;
display.activePending = true;
}
- long children = GTK.gtk_container_get_children (shellHandle), list = children;
- while (list != 0) {
- GTK.gtk_container_remove (shellHandle, OS.g_list_data (list));
- list = OS.g_list_next(list);
+
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(shellHandle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ GTK.gtk_widget_unparent(child);
+ }
+ } else {
+ long list = GTK3.gtk_container_get_children (shellHandle);
+ long listIterator = list;
+ while (listIterator != 0) {
+ GTK3.gtk_container_remove (shellHandle, OS.g_list_data (listIterator));
+ listIterator = OS.g_list_next(listIterator);
+ }
+ OS.g_list_free (list);
}
- OS.g_list_free (list);
}
- GTK.gtk_container_add (shellHandle, vboxHandle);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_window_set_child (shellHandle, vboxHandle);
+ } else {
+ GTK3.gtk_container_add (shellHandle, vboxHandle);
+ }
+
if (scrolledHandle != 0) GTK.gtk_widget_show (scrolledHandle);
if (handle != 0) GTK.gtk_widget_show (handle);
if (vboxHandle != 0) GTK.gtk_widget_show (vboxHandle);
@@ -2873,17 +3085,18 @@ void showWidget () {
@Override
long sizeAllocateProc (long handle, long arg0, long user_data) {
int offset = 16;
- int [] x = new int [1], y = new int [1];
+ int[] x = new int[1], y = new int[1];
if (GTK.GTK4) {
- /*
- * TODO: calling gdk_window_get_device_position() with a 0
- * for the GdkWindow uses gdk_get_default_root_window(),
- * which doesn't exist on GTK4.
- */
+ double[] xDouble = new double[1], yDouble = new double[1];
+ display.getPointerPosition(xDouble, yDouble);
+
+ x[0] = (int)xDouble[0];
+ y[0] = (int)yDouble[0];
} else {
- display.gdk_window_get_device_position (0, x, y, null);
+ display.getWindowPointerPosition(0, x, y, null);
}
- y [0] += offset;
+
+ y[0] += offset;
GdkRectangle dest = new GdkRectangle ();
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
long display = GDK.gdk_display_get_default();
@@ -2906,7 +3119,7 @@ long sizeAllocateProc (long handle, long arg0, long user_data) {
if (y[0] + height > dest.y + dest.height) {
y[0] = (dest.y + dest.height) - height;
}
- GTK.gtk_window_move (handle, x [0], y [0]);
+ GTK3.gtk_window_move (handle, x [0], y [0]);
return 0;
}
@@ -2964,7 +3177,7 @@ int trimWidth () {
}
void updateModal () {
- if (OS.isX11() && GTK.GTK_IS_PLUG (shellHandle)) return;
+ if (!GTK.GTK4 && OS.isX11() && GTK.GTK_IS_PLUG (shellHandle)) return;
long group = 0;
boolean isModalShell = false;
if (display.getModalDialog () == null) {
@@ -3070,14 +3283,14 @@ void deregister () {
}
boolean requiresUngrab () {
- return !OS.isX11() && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) && (style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0;
+ return !OS.isX11() && (style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0;
}
/**
* SWT.ON_TOP shells on Wayland requires gdk_seat_grab to grab keyboard/input focus,
* the grabbed focus need to be removed when Shell is disposed/hidden.
*/
-void checkAndUnrabFocus () {
+void checkAndUngrabFocus () {
/*
* Bug 515773, 542104: Wayland POPUP window limitations
* In bringToTop(), we grabbed keyboard/pointer focus to popup shell, which needs to
@@ -3103,10 +3316,10 @@ void checkAndUnrabFocus () {
} else {
gdkResource = gtk_widget_get_window (shellHandle);
display = GDK.gdk_window_get_display(gdkResource);
+ GTK3.gtk_grab_remove(shellHandle);
}
long seat = GDK.gdk_display_get_default_seat(display);
GDK.gdk_seat_ungrab(seat);
- GTK.gtk_grab_remove(shellHandle);
grabbedFocus = false;
}
}
@@ -3119,7 +3332,7 @@ public void dispose () {
*/
if (isDisposed()) return;
fixActiveShell ();
- checkAndUnrabFocus();
+ checkAndUngrabFocus();
/*
* Bug 540166: Dispose the popup child if any when the parent is disposed so that
* it does not remain open forever.
@@ -3162,12 +3375,18 @@ Rectangle getBoundsInPixels () {
checkWidget ();
int [] x = new int [1], y = new int [1];
if ((state & Widget.DISPOSE_SENT) == 0) {
- GTK.gtk_window_get_position (shellHandle, x, y);
+ if (GTK.GTK4) {
+ // TODO: GTK4 GtkWindow no longer has the ability to get position
+ } else {
+ GTK3.gtk_window_get_position (shellHandle, x, y);
+ }
} else {
if (GTK.GTK4) {
- GDK.gdk_surface_get_root_origin(GTK.gtk_widget_get_surface(shellHandle), x, y);
+ /* TODO: GTK4 Coordinate system is now surface relative, therefore can no longer obtain
+ * root coordinates. Ideas include using the popup GdkSurface which allows you to get
+ * parent relative x and y coords. */
} else {
- GDK.gdk_window_get_root_origin(GTK.gtk_widget_get_window(shellHandle), x, y);
+ GDK.gdk_window_get_root_origin(GTK3.gtk_widget_get_window(shellHandle), x, y);
}
}
GtkAllocation allocation = new GtkAllocation ();
@@ -3226,28 +3445,6 @@ void releaseWidget () {
}
}
-void setToolTipText (long tipWidget, String string) {
- setToolTipText (tipWidget, tipWidget, string);
-}
-
-void setToolTipText (long rootWidget, long tipWidget, String string) {
- byte [] buffer = null;
- if (string != null && string.length () > 0) {
- char [] chars = fixMnemonic (string, false, true);
- buffer = Converter.wcsToMbcs (chars, true);
- }
- long oldTooltip = GTK.gtk_widget_get_tooltip_text (rootWidget);
- boolean same = false;
- if (buffer == null && oldTooltip == 0) {
- same = true;
- } else if (buffer != null && oldTooltip != 0) {
- same = OS.strcmp (oldTooltip, buffer) == 0;
- }
- if (oldTooltip != 0) OS.g_free(oldTooltip);
- if (same) return;
-
- GTK.gtk_widget_set_tooltip_text (rootWidget, buffer);
-}
@Override
Point getWindowOrigin () {
if (!mapped) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java
index 8f4f9d300d..1897b74493 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are selectable user interface
@@ -74,7 +76,13 @@ import org.eclipse.swt.internal.gtk.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class Slider extends Control {
- int detail;
+
+ /**
+ * Stores the GtkRange handle of the GtkScrollbar.
+ * Used to hook events and access the GtkAdjustment.
+ */
+ long rangeHandle;
+ int scrollType;
boolean dragSent;
/**
* Constructs a new instance of this class given its parent
@@ -156,51 +164,53 @@ static int checkStyle (int style) {
@Override
void createHandle (int index) {
state |= HANDLE;
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
- long hAdjustment = GTK.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
- if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type(), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ // Initialize GtkScrollbar with default GtkAdjustment values
+ long adjustmentHandle = GTK.gtk_adjustment_new(0, 0, 100, 1, 10, 10);
+ if (adjustmentHandle == 0) error(SWT.ERROR_NO_HANDLES);
if ((style & SWT.HORIZONTAL) != 0) {
- handle = GTK.gtk_scrollbar_new (GTK.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
+ handle = GTK.gtk_scrollbar_new(GTK.GTK_ORIENTATION_HORIZONTAL, adjustmentHandle);
} else {
- handle = GTK.gtk_scrollbar_new (GTK.GTK_ORIENTATION_VERTICAL, hAdjustment);
+ handle = GTK.gtk_scrollbar_new(GTK.GTK_ORIENTATION_VERTICAL, adjustmentHandle);
}
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
/*
- * Bug in GTK. In GTK 2.10, the buttons on either end of
- * a horizontal slider are created taller then the slider bar
- * when the GTK_CAN_FOCUS flag is set. The fix is not to set
- * the flag for horizontal bars in all versions of 2.10. Note
- * that a bug has been logged with GTK about this issue.
- * (http://bugzilla.gnome.org/show_bug.cgi?id=475909)
- */
- if ((style & SWT.VERTICAL) != 0) {
- GTK.gtk_widget_set_can_focus (handle, true);
+ * On GTK4, the GtkRange widget is a child of the GtkScrollbar
+ * On GTK3, GtkRange is the base class for GtkScrollbar
+ */
+ rangeHandle = GTK.GTK4 ? GTK4.gtk_widget_get_first_child(handle) : handle;
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ GTK3.gtk_container_add(fixedHandle, handle);
}
- GTK.gtk_container_add (fixedHandle, handle);
}
@Override
-long gtk_button_press_event (long widget, long eventPtr) {
+long gtk_button_press_event(long widget, long eventPtr) {
long result = super.gtk_button_press_event (widget, eventPtr);
if (result != 0) return result;
- detail = GTK.GTK_SCROLL_NONE;
+ scrollType = GTK.GTK_SCROLL_NONE;
dragSent = false;
return result;
}
@Override
-long gtk_change_value (long widget, long scroll, long value1, long value2) {
- detail = (int)scroll;
- return 0;
+boolean gtk_change_value(long widget, int scroll, double value, long user_data) {
+ scrollType = scroll;
+ return false;
}
@Override
-long gtk_value_changed (long adjustment) {
+long gtk_value_changed(long range) {
Event event = new Event ();
- dragSent = detail == GTK.GTK_SCROLL_JUMP;
- switch (detail) {
+ dragSent = scrollType == GTK.GTK_SCROLL_JUMP;
+ switch (scrollType) {
case GTK.GTK_SCROLL_NONE: event.detail = SWT.NONE; break;
case GTK.GTK_SCROLL_JUMP: event.detail = SWT.DRAG; break;
case GTK.GTK_SCROLL_START: event.detail = SWT.HOME; break;
@@ -218,7 +228,7 @@ long gtk_value_changed (long adjustment) {
case GTK.GTK_SCROLL_STEP_LEFT:
case GTK.GTK_SCROLL_STEP_BACKWARD: event.detail = SWT.ARROW_UP; break;
}
- if (!dragSent) detail = GTK.GTK_SCROLL_NONE;
+ if (!dragSent) scrollType = GTK.GTK_SCROLL_NONE;
sendSelectionEvent (SWT.Selection, event, false);
return 0;
}
@@ -230,8 +240,13 @@ long gtk_event_after (long widget, long gdkEvent) {
switch (eventType) {
case GDK.GDK_BUTTON_RELEASE: {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(gdkEvent, eventButton);
- if (eventButton[0] == 1 && detail == SWT.DRAG) {
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(gdkEvent);
+ } else {
+ GDK.gdk_event_get_button(gdkEvent, eventButton);
+ }
+
+ if (eventButton[0] == 1 && scrollType == SWT.DRAG) {
if (!dragSent) {
Event event = new Event ();
event.detail = SWT.DRAG;
@@ -239,7 +254,7 @@ long gtk_event_after (long widget, long gdkEvent) {
}
sendSelectionEvent (SWT.Selection);
}
- detail = GTK.GTK_SCROLL_NONE;
+ scrollType = GTK.GTK_SCROLL_NONE;
dragSent = false;
break;
}
@@ -248,24 +263,35 @@ long gtk_event_after (long widget, long gdkEvent) {
}
@Override
-void hookEvents () {
- super.hookEvents ();
- OS.g_signal_connect_closure (handle, OS.change_value, display.getClosure (CHANGE_VALUE), false);
- OS.g_signal_connect_closure (handle, OS.value_changed, display.getClosure (VALUE_CHANGED), false);
+void hookEvents() {
+ super.hookEvents();
+
+ OS.g_signal_connect_closure(rangeHandle, OS.change_value, display.getClosure(CHANGE_VALUE), false);
+ OS.g_signal_connect_closure(rangeHandle, OS.value_changed, display.getClosure(VALUE_CHANGED), false);
}
@Override
-void register () {
- super.register ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- display.addWidget (hAdjustment, this);
+void register() {
+ super.register();
+
+ if (GTK.GTK4) {
+ display.addWidget(rangeHandle, this);
+ } else {
+ long hAdjustment = GTK.gtk_range_get_adjustment(handle);
+ display.addWidget(hAdjustment, this);
+ }
}
@Override
-void deregister () {
- super.deregister ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- display.removeWidget (hAdjustment);
+void deregister() {
+ super.deregister();
+
+ if (GTK.GTK4) {
+ display.removeWidget(rangeHandle);
+ } else {
+ long hAdjustment = GTK.gtk_range_get_adjustment(handle);
+ display.removeWidget(hAdjustment);
+ }
}
@Override
@@ -295,10 +321,10 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getIncrement () {
- checkWidget ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- return (int) GTK.gtk_adjustment_get_step_increment (hAdjustment);
+public int getIncrement() {
+ checkWidget();
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ return (int) GTK.gtk_adjustment_get_step_increment(adjustmentHandle);
}
/**
@@ -311,10 +337,10 @@ public int getIncrement () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getMaximum () {
- checkWidget ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- return (int) GTK.gtk_adjustment_get_upper (hAdjustment);
+public int getMaximum() {
+ checkWidget();
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ return (int) GTK.gtk_adjustment_get_upper(adjustmentHandle);
}
/**
@@ -327,10 +353,10 @@ public int getMaximum () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getMinimum () {
- checkWidget ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- return (int) GTK.gtk_adjustment_get_lower (hAdjustment);
+public int getMinimum() {
+ checkWidget();
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ return (int) GTK.gtk_adjustment_get_lower(adjustmentHandle);
}
/**
@@ -345,10 +371,10 @@ public int getMinimum () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getPageIncrement () {
- checkWidget ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- return (int) GTK.gtk_adjustment_get_page_increment (hAdjustment);
+public int getPageIncrement() {
+ checkWidget();
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ return (int) GTK.gtk_adjustment_get_page_increment(adjustmentHandle);
}
/**
@@ -361,10 +387,9 @@ public int getPageIncrement () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getSelection () {
- checkWidget ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- return (int) GTK.gtk_adjustment_get_value (hAdjustment);
+public int getSelection() {
+ checkWidget();
+ return (int) GTK.gtk_range_get_value(rangeHandle);
}
/**
@@ -377,10 +402,10 @@ public int getSelection () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public int getThumb () {
- checkWidget ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- return (int) GTK.gtk_adjustment_get_page_size (hAdjustment);
+public int getThumb() {
+ checkWidget();
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ return (int) GTK.gtk_adjustment_get_page_size(adjustmentHandle);
}
/**
@@ -421,12 +446,13 @@ public void removeSelectionListener (SelectionListener listener) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setIncrement (int value) {
- checkWidget ();
+public void setIncrement(int value) {
+ checkWidget();
if (value < 1) return;
- OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
- GTK.gtk_range_set_increments (handle, value, getPageIncrement ());
- OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
+
+ OS.g_signal_handlers_block_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
+ GTK.gtk_range_set_increments(rangeHandle, value, getPageIncrement());
+ OS.g_signal_handlers_unblock_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
/**
@@ -442,20 +468,22 @@ public void setIncrement (int value) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setMaximum (int value) {
- checkWidget ();
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- GtkAdjustment adjustment = new GtkAdjustment ();
- gtk_adjustment_get (hAdjustment, adjustment);
+public void setMaximum(int value) {
+ checkWidget();
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ GtkAdjustment adjustment = new GtkAdjustment();
+ gtk_adjustment_get(adjustmentHandle, adjustment);
+
int minimum = (int) adjustment.lower;
if (value <= minimum) return;
adjustment.upper = value;
- adjustment.page_size = Math.min ((int)adjustment.page_size, value - minimum);
- adjustment.value = Math.min ((int)adjustment.value, (int)(value - adjustment.page_size));
- OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
- GTK.gtk_adjustment_configure(hAdjustment, adjustment.value, adjustment.lower, adjustment.upper,
+ adjustment.page_size = Math.min((int)adjustment.page_size, value - minimum);
+ adjustment.value = Math.min((int)adjustment.value, (int)(value - adjustment.page_size));
+
+ OS.g_signal_handlers_block_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
+ GTK.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
- OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
+ OS.g_signal_handlers_unblock_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
/**
@@ -471,29 +499,32 @@ public void setMaximum (int value) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setMinimum (int value) {
- checkWidget ();
+public void setMinimum(int value) {
+ checkWidget();
if (value < 0) return;
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- GtkAdjustment adjustment = new GtkAdjustment ();
- gtk_adjustment_get (hAdjustment, adjustment);
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ GtkAdjustment adjustment = new GtkAdjustment();
+ gtk_adjustment_get(adjustmentHandle, adjustment);
+
int maximum = (int) adjustment.upper;
if (value >= maximum) return;
adjustment.lower = value;
adjustment.page_size = Math.min ((int)adjustment.page_size, maximum - value);
adjustment.value = Math.max ((int)adjustment.value, value);
+
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
- GTK.gtk_adjustment_configure(hAdjustment, adjustment.value, adjustment.lower, adjustment.upper,
+ GTK.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
@Override
-void setOrientation (boolean create) {
- super.setOrientation (create);
+void setOrientation(boolean create) {
+ super.setOrientation(create);
+
if ((style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
if ((style & SWT.HORIZONTAL) != 0) {
- GTK.gtk_range_set_inverted (handle, (style & SWT.RIGHT_TO_LEFT) != 0);
+ GTK.gtk_range_set_inverted(rangeHandle, (style & SWT.RIGHT_TO_LEFT) != 0);
}
}
}
@@ -511,11 +542,12 @@ void setOrientation (boolean create) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setPageIncrement (int value) {
- checkWidget ();
+public void setPageIncrement(int value) {
+ checkWidget();
if (value < 1) return;
+
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
- GTK.gtk_range_set_increments (handle, getIncrement (), value);
+ GTK.gtk_range_set_increments(rangeHandle, getIncrement(), value);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
@@ -531,10 +563,11 @@ public void setPageIncrement (int value) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setSelection (int value) {
- checkWidget ();
+public void setSelection(int value) {
+ checkWidget();
+
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
- GTK.gtk_range_set_value (handle, value);
+ GTK.gtk_range_set_value(rangeHandle, value);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
@@ -555,19 +588,21 @@ public void setSelection (int value) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setThumb (int value) {
- checkWidget ();
+public void setThumb(int value) {
+ checkWidget();
if (value < 1) return;
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- GtkAdjustment adjustment = new GtkAdjustment ();
- gtk_adjustment_get (hAdjustment, adjustment);
- value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower));
+
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ GtkAdjustment adjustment = new GtkAdjustment();
+ gtk_adjustment_get(adjustmentHandle, adjustment);
+
+ value = (int) Math.min(value, (int) (adjustment.upper - adjustment.lower));
adjustment.page_size = (double) value;
adjustment.value = Math.min ((int)adjustment.value, (int)(adjustment.upper - value));
- OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
- GTK.gtk_adjustment_configure(hAdjustment, adjustment.value, adjustment.lower, adjustment.upper,
+ OS.g_signal_handlers_block_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
+ GTK.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
- OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
+ OS.g_signal_handlers_unblock_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
/**
@@ -592,32 +627,23 @@ public void setThumb (int value) {
* </ul>
*/
public void setValues (int selection, int minimum, int maximum, int thumb, int increment, int pageIncrement) {
- checkWidget ();
- if (minimum < 0) return;
- if (maximum < 0) return;
- if (thumb < 1) return;
- if (increment < 1) return;
- if (pageIncrement < 1) return;
- thumb = Math.min (thumb, maximum - minimum);
- long hAdjustment = GTK.gtk_range_get_adjustment (handle);
- GtkAdjustment adjustment = new GtkAdjustment ();
- adjustment.value = Math.min (Math.max (selection, minimum), maximum - thumb);
+ checkWidget();
+ if (minimum < 0 || maximum < 0 || thumb < 1 || increment < 1 || pageIncrement < 1) return;
+ thumb = Math.min(thumb, maximum - minimum);
+
+ long adjustmentHandle = GTK.gtk_range_get_adjustment(rangeHandle);
+ GtkAdjustment adjustment = new GtkAdjustment();
+ adjustment.value = Math.min(Math.max(selection, minimum), maximum - thumb);
adjustment.lower = (double) minimum;
adjustment.upper = (double) maximum;
adjustment.page_size = (double) thumb;
adjustment.step_increment = (double) increment;
adjustment.page_increment = (double) pageIncrement;
+
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
- GTK.gtk_adjustment_configure(hAdjustment, adjustment.value, adjustment.lower, adjustment.upper,
+ GTK.gtk_adjustment_configure(adjustmentHandle, adjustment.value, adjustment.lower, adjustment.upper,
adjustment.step_increment, adjustment.page_increment, adjustment.page_size);
- /*
- * gtk_adujustment_value_changed is deprecated on GTK3.18+.
- * GTK+ will emit "value-changed" itself whenever the value changes.
- * See bug 495413.
- */
- if (GTK.GTK_VERSION < OS.VERSION(3, 18, 0))
- GTK.gtk_adjustment_value_changed (hAdjustment);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
}
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
index 9638dc8773..dd4031d372 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are selectable user interface
@@ -212,40 +214,52 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
- GTK.gtk_widget_realize (handle);
- long layout = GTK.gtk_entry_get_layout (GTK.GTK4 ? entryHandle : handle);
- long hAdjustment = GTK.gtk_spin_button_get_adjustment (handle);
- double upper = GTK.gtk_adjustment_get_upper (hAdjustment);
- int digits = GTK.gtk_spin_button_get_digits (handle);
- for (int i = 0; i < digits; i++) upper *= 10;
- String string = String.valueOf ((int) upper);
- if (digits > 0) {
- StringBuilder buffer = new StringBuilder ();
- buffer.append (string);
- buffer.append (getDecimalSeparator ());
- int count = digits - string.length ();
- while (count >= 0) {
- buffer.append ("0");
- count--;
+
+ if (GTK.GTK4) {
+ GTK.gtk_widget_set_size_request(handle, wHint, hHint);
+ GtkRequisition requisition = new GtkRequisition();
+ GTK.gtk_widget_get_preferred_size(handle, requisition, null);
+ int width = wHint == SWT.DEFAULT ? requisition.width : Math.max(wHint, requisition.width);
+ int height = hHint == SWT.DEFAULT ? requisition.height : hHint;
+ Rectangle trim = computeTrimInPixels(0, 0, width, height);
+ return new Point(trim.width, trim.height);
+ } else {
+ GTK.gtk_widget_realize (handle);
+ long layout = GTK3.gtk_entry_get_layout (handle);
+ long hAdjustment = GTK.gtk_spin_button_get_adjustment (handle);
+ double upper = GTK.gtk_adjustment_get_upper (hAdjustment);
+ int digits = GTK.gtk_spin_button_get_digits (handle);
+ for (int i = 0; i < digits; i++) upper *= 10;
+ String string = String.valueOf ((int) upper);
+ if (digits > 0) {
+ StringBuilder buffer = new StringBuilder ();
+ buffer.append (string);
+ buffer.append (getDecimalSeparator ());
+ int count = digits - string.length ();
+ while (count >= 0) {
+ buffer.append ("0");
+ count--;
+ }
+ string = buffer.toString ();
}
- string = buffer.toString ();
+ byte [] buffer1 = Converter.wcsToMbcs (string, false);
+ long ptr = OS.pango_layout_get_text (layout);
+ int length = C.strlen (ptr);
+ byte [] buffer2 = new byte [length];
+ C.memmove (buffer2, ptr, length);
+ OS.pango_layout_set_text (layout, buffer1, buffer1.length);
+
+ int width, height = 0 ;
+ GTK.gtk_widget_realize (handle);
+ GTK.gtk_widget_set_size_request (handle, wHint, hHint);
+ GtkRequisition requisition = new GtkRequisition ();
+ GTK.gtk_widget_get_preferred_size (handle, requisition, null);
+ width = wHint == SWT.DEFAULT ? requisition.width : Math.max(wHint, requisition.width);
+ height = hHint == SWT.DEFAULT ? requisition.height : hHint;
+ OS.pango_layout_set_text (layout, buffer2, buffer2.length);
+ Rectangle trim = computeTrimInPixels (0, 0, width, height);
+ return new Point (trim.width, trim.height);
}
- byte [] buffer1 = Converter.wcsToMbcs (string, false);
- long ptr = OS.pango_layout_get_text (layout);
- int length = C.strlen (ptr);
- byte [] buffer2 = new byte [length];
- C.memmove (buffer2, ptr, length);
- OS.pango_layout_set_text (layout, buffer1, buffer1.length);
- int width, height = 0 ;
- GTK.gtk_widget_realize (handle);
- GTK.gtk_widget_set_size_request (handle, wHint, hHint);
- GtkRequisition requisition = new GtkRequisition ();
- GTK.gtk_widget_get_preferred_size (handle, requisition, null);
- width = wHint == SWT.DEFAULT ? requisition.width : Math.max(wHint, requisition.width);
- height = hHint == SWT.DEFAULT ? requisition.height : hHint;
- OS.pango_layout_set_text (layout, buffer2, buffer2.length);
- Rectangle trim = computeTrimInPixels (0, 0, width, height);
- return new Point (trim.width, trim.height);
}
@Override
@@ -255,10 +269,10 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
Rectangle trim = super.computeTrimInPixels (x, y, width, height);
GtkBorder tmp = new GtkBorder();
long context = GTK.gtk_widget_get_style_context (handle);
- int state_flag = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(handle);
+ int state_flag = GTK.gtk_widget_get_state_flags(handle);
gtk_style_context_get_padding(context, state_flag, tmp);
if ((style & SWT.BORDER) != 0) {
- int state = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(handle);
+ int state = GTK.gtk_widget_get_state_flags(handle);
gtk_style_context_get_border(context, state, tmp);
trim.x -= tmp.left;
trim.y -= tmp.top;
@@ -271,9 +285,9 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
*/
if (!GTK.GTK4) {
int [] property = new int [1];
- GTK.gtk_widget_style_get (handle, OS.interior_focus, property, 0);
+ GTK3.gtk_widget_style_get (handle, OS.interior_focus, property, 0);
if (property [0] == 0) {
- GTK.gtk_widget_style_get (handle, OS.focus_line_width, property, 0);
+ GTK3.gtk_widget_style_get (handle, OS.focus_line_width, property, 0);
xborder += property [0];
yborder += property [0];
}
@@ -298,7 +312,12 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
*/
public void copy () {
checkWidget ();
- GTK.gtk_editable_copy_clipboard (GTK.GTK4? entryHandle : handle);
+ if (GTK.GTK4) {
+ long textHandle = GTK4.gtk_widget_get_first_child(entryHandle);
+ GTK4.gtk_widget_activate_action(textHandle, OS.action_copy_clipboard, null);
+ } else {
+ GTK3.gtk_editable_copy_clipboard(handle);
+ }
}
@Override
@@ -306,21 +325,22 @@ void createHandle (int index) {
state |= HANDLE | MENU;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
long adjustment = GTK.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
if (adjustment == 0) error (SWT.ERROR_NO_HANDLES);
handle = GTK.gtk_spin_button_new (adjustment, climbRate, 0);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, handle);
+ if (DISABLE_EMOJI && GTK.GTK_VERSION >= OS.VERSION(3, 22, 20)) {
+ GTK.gtk_entry_set_input_hints(handle, GTK.GTK_INPUT_HINT_NO_EMOJI);
+ }
+
if (GTK.GTK4) {
- long boxHandle = GTK.gtk_widget_get_first_child(handle);
- long textHandle = GTK.gtk_widget_get_first_child(boxHandle);
- entryHandle = textHandle;
+ OS.swt_fixed_add(fixedHandle, handle);
+ entryHandle = GTK4.gtk_widget_get_first_child(handle);
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ GTK3.gtk_container_add (fixedHandle, handle);
}
GTK.gtk_editable_set_editable (GTK.GTK4 ? entryHandle : handle, (style & SWT.READ_ONLY) == 0);
- if (GTK.GTK_VERSION <= OS.VERSION(3, 20, 0)) {
- GTK.gtk_entry_set_has_frame (GTK.GTK4 ? entryHandle : handle, (style & SWT.BORDER) != 0);
- }
GTK.gtk_spin_button_set_wrap (handle, (style & SWT.WRAP) != 0);
imContext = OS.imContextLast();
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
@@ -342,7 +362,12 @@ void createHandle (int index) {
*/
public void cut () {
checkWidget ();
- GTK.gtk_editable_cut_clipboard (GTK.GTK4? entryHandle : handle);
+ if (GTK.GTK4) {
+ long textHandle = GTK4.gtk_widget_get_first_child(entryHandle);
+ GTK4.gtk_widget_activate_action(textHandle, OS.action_cut_clipboard, null);
+ } else {
+ GTK3.gtk_editable_cut_clipboard(handle);
+ }
}
@Override
@@ -373,13 +398,16 @@ long enterExitHandle () {
}
@Override
-boolean filterKey (int keyval, long event) {
+boolean filterKey (long event) {
int time = GDK.gdk_event_get_time (event);
if (time != lastEventTime) {
lastEventTime = time;
long imContext = imContext ();
if (imContext != 0) {
- return GTK.gtk_im_context_filter_keypress (imContext, event);
+ if (GTK.GTK4)
+ return GTK4.gtk_im_context_filter_keypress (imContext, event);
+ else
+ return GTK3.gtk_im_context_filter_keypress (imContext, event);
}
}
gdkEventKey = event;
@@ -398,7 +426,11 @@ void fixIM () {
if (gdkEventKey != 0 && gdkEventKey != -1) {
long imContext = imContext ();
if (imContext != 0) {
- GTK.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+ if (GTK.GTK4)
+ GTK4.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+ else
+ GTK3.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+
gdkEventKey = -1;
return;
}
@@ -526,14 +558,23 @@ public int getSelection () {
*
* @since 3.4
*/
-public String getText () {
- checkWidget ();
- long str = GTK.gtk_entry_get_text (GTK.GTK4 ? entryHandle : handle);
- if (str == 0) return "";
- int length = C.strlen (str);
- byte [] buffer = new byte [length];
- C.memmove (buffer, str, length);
- return new String (Converter.mbcsToWcs (buffer));
+public String getText() {
+ checkWidget();
+
+ long stringPtr;
+ if (GTK.GTK4) {
+ long bufferHandle = GTK4.gtk_text_get_buffer(entryHandle);
+ stringPtr = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ stringPtr = GTK3.gtk_entry_get_text(handle);
+ }
+ if (stringPtr == 0) return "";
+
+ int length = C.strlen(stringPtr);
+ byte[] buffer = new byte[length];
+ C.memmove(buffer, stringPtr, length);
+
+ return new String(Converter.mbcsToWcs(buffer));
}
/**
@@ -590,13 +631,20 @@ long gtk_activate (long widget) {
@Override
long gtk_changed (long widget) {
- long str = GTK.gtk_entry_get_text (GTK.GTK4 ? entryHandle : handle);
- int length = C.strlen (str);
+ long stringPtr;
+ if (GTK.GTK4) {
+ long bufferHandle = GTK4.gtk_text_get_buffer(entryHandle);
+ stringPtr = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ stringPtr = GTK3.gtk_entry_get_text(handle);
+ }
+
+ int length = C.strlen(stringPtr);
if (length > 0) {
long [] endptr = new long [1];
- double value = OS.g_strtod (str, endptr);
+ double value = OS.g_strtod (stringPtr, endptr);
int valueLength = (getDigits() == 0) ? String.valueOf((int)value).length() : String.valueOf(value).length();
- if ((endptr [0] == str + length) && valueLength == length) {
+ if ((endptr [0] == stringPtr + length) && valueLength == length) {
long hAdjustment = GTK.gtk_spin_button_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
gtk_adjustment_get (hAdjustment, adjustment);
@@ -614,7 +662,7 @@ long gtk_changed (long widget) {
* is to post the modify event when the user is typing.
*/
boolean keyPress = false;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK.GTK4 ? 0 : GTK3.gtk_get_current_event();
if (eventPtr != 0) {
int eventType = GDK.gdk_event_get_event_type(eventPtr);
eventType = fixGdkEventTypeValues(eventType);
@@ -675,7 +723,7 @@ long gtk_commit (long imContext, long text) {
@Override
long gtk_delete_text (long widget, long start_pos, long end_pos) {
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
- long ptr = GTK.gtk_entry_get_text (GTK.GTK4 ? entryHandle : handle);
+ long ptr = GTK3.gtk_entry_get_text (GTK.GTK4 ? entryHandle : handle);
if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1);
int start = (int)OS.g_utf8_offset_to_utf16_offset (ptr, start_pos);
int end = (int)OS.g_utf8_offset_to_utf16_offset (ptr, end_pos);
@@ -719,7 +767,7 @@ long gtk_insert_text (long widget, long new_text, long new_text_length, long pos
String oldText = new String (Converter.mbcsToWcs (buffer));
int [] pos = new int [1];
C.memmove (pos, position, 4);
- long ptr = GTK.gtk_entry_get_text (GTK.GTK4 ? entryHandle : handle);
+ long ptr = GTK3.gtk_entry_get_text (GTK.GTK4 ? entryHandle : handle);
if (pos [0] == -1) pos [0] = (int)OS.g_utf8_strlen (ptr, -1);
int start = (int)OS.g_utf16_pointer_to_offset (ptr, pos [0]);
String newText = verifyText (oldText, start, start);
@@ -764,26 +812,39 @@ long gtk_key_press_event (long widget, long event) {
long gtk_populate_popup (long widget, long menu) {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
GTK.gtk_widget_set_direction (menu, GTK.GTK_TEXT_DIR_RTL);
- GTK.gtk_container_forall (menu, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
+ GTK3.gtk_container_forall (menu, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
}
return 0;
}
@Override
-long gtk_value_changed (long widget) {
- sendSelectionEvent (SWT.Selection);
+long gtk_value_changed(long range) {
+ sendSelectionEvent(SWT.Selection);
return 0;
}
@Override
-void hookEvents () {
+void hookEvents() {
super.hookEvents();
- OS.g_signal_connect_closure (handle, OS.changed, display.getClosure (CHANGED), true);
- OS.g_signal_connect_closure (handle, OS.insert_text, display.getClosure (INSERT_TEXT), false);
- OS.g_signal_connect_closure (handle, OS.delete_text, display.getClosure (DELETE_TEXT), false);
- OS.g_signal_connect_closure (handle, OS.value_changed, display.getClosure (VALUE_CHANGED), false);
- OS.g_signal_connect_closure (handle, OS.activate, display.getClosure (ACTIVATE), false);
- OS.g_signal_connect_closure (handle, OS.populate_popup, display.getClosure (POPULATE_POPUP), false);
+
+ /* GtkEditable signals */
+ OS.g_signal_connect_closure(handle, OS.changed, display.getClosure(CHANGED), true);
+ OS.g_signal_connect_closure(handle, OS.insert_text, display.getClosure(INSERT_TEXT), false);
+ OS.g_signal_connect_closure(handle, OS.delete_text, display.getClosure(DELETE_TEXT), false);
+
+ /* GtkSpinButton signals */
+ OS.g_signal_connect_closure(handle, OS.value_changed, display.getClosure(VALUE_CHANGED), false);
+
+ if (GTK.GTK4) {
+ /* GtkText signals */
+ long textHandle = GTK4.gtk_widget_get_first_child(handle);
+ OS.g_signal_connect_closure(textHandle, OS.activate, display.getClosure(ACTIVATE), false);
+ } else {
+ /* GtkEntry signals */
+ OS.g_signal_connect_closure(handle, OS.activate, display.getClosure(ACTIVATE), false);
+ OS.g_signal_connect_closure(handle, OS.populate_popup, display.getClosure(POPULATE_POPUP), false);
+ }
+
long imContext = imContext ();
if (imContext != 0) {
OS.g_signal_connect_closure (imContext, OS.commit, display.getClosure (COMMIT), false);
@@ -810,9 +871,7 @@ long paintWindow () {
@Override
long paintSurface () {
long surface = super.paintSurface ();
- long children = GDK.gdk_surface_get_children (surface);
- if (children != 0) surface = OS.g_list_data (children);
- OS.g_list_free (children);
+ /* TODO: GTK4 no access to children of the surface. Need to find alternative, note that class hierarchy can change from GTK3 */
return surface;
}
@@ -830,7 +889,7 @@ long paintSurface () {
*/
public void paste () {
checkWidget ();
- GTK.gtk_editable_paste_clipboard (GTK.GTK4? entryHandle : handle);
+ GTK3.gtk_editable_paste_clipboard (GTK.GTK4? entryHandle : handle);
}
@Override
@@ -938,9 +997,7 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
super.setBackgroundGdkRGBA(context, handle, rgba);
} else {
String color = display.gtk_rgba_to_css_string (background);
- String properties = " {background-image: -gtk-gradient (linear, 0 0, 0 1, color-stop(0, " + color + "), color-stop(1, " + color + "));}";
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "spinbutton" : "GtkSpinButton";
- String css = name + properties;
+ String css = "spinbutton {background-image: -gtk-gradient (linear, 0 0, 0 1, color-stop(0, " + color + "), color-stop(1, " + color + "));}";
cssBackground = css;
@@ -954,10 +1011,9 @@ void setCursor (long cursor) {
long defaultCursor = 0;
if (cursor == 0) {
if (GTK.GTK4) {
- byte [] name = Converter.wcsToMbcs("text", true);
- defaultCursor = GDK.gdk_cursor_new_from_name(name, 0);
+ defaultCursor = GDK.gdk_cursor_new_from_name ("xterm", 0);
} else {
- defaultCursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), GDK.GDK_XTERM);
+ defaultCursor = GDK.gdk_cursor_new_from_name (GDK.gdk_display_get_default(), "xterm");
}
}
super.setCursor (cursor != 0 ? cursor : defaultCursor);
@@ -1226,8 +1282,13 @@ boolean checkSubwindow () {
@Override
boolean translateTraversal (long event) {
- int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
+ int [] key = new int [1];
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ }
+
switch (key[0]) {
case GDK.GDK_KP_Enter:
case GDK.GDK_Return: {
@@ -1252,7 +1313,7 @@ String verifyText (String string, int start, int end) {
event.text = string;
event.start = start;
event.end = end;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int type = GDK.gdk_event_get_event_type(eventPtr);
type = fixGdkEventTypeValues(type);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
index fc20a5d2e0..a5d5e2e8fd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class implement the notebook user interface
@@ -59,15 +61,6 @@ public class TabFolder extends Composite {
* rather than tabfolder's parent swtFixed container.
* Note, this reparenting is only on the GTK side, not on the SWT side.
*
- * GTK2 and GTK3 child nesting behaviour differs now.
- * GTK2:
- * swtFixed
- * |-- GtkNoteBook
- * | |-- tabLabel1
- * | |-- tabLabel2
- * |-- swtFixed (child1) //child is sibling of Notebook
- * |-- swtFixed (child2)
- *
* GTK3+:
* swtFixed
* |-- GtkNoteBook
@@ -80,8 +73,6 @@ public class TabFolder extends Composite {
*
* This changes the hierarchy so that children are beneath gtkNotebook (as oppose to
* being siblings) and thus fixes DND and background color issues.
- * In gtk2, reparenting doesn't function properly (tab content appear blank),
- * so this is a gtk3-specific behavior.
*
* Note about the reason for reparenting:
* Reparenting (as opposed to adding widget to a tab in the first place) is necessary
@@ -253,12 +244,21 @@ void createHandle (int index) {
state |= HANDLE;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
handle = GTK.gtk_notebook_new ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, handle);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ GTK3.gtk_container_add (fixedHandle, handle);
+ }
+
GTK.gtk_notebook_set_show_tabs (handle, true);
GTK.gtk_notebook_set_scrollable (handle, true);
+
+ if(GTK.GTK4) setInitialBackgroundGTK4(handle, null);
+
if ((style & SWT.BOTTOM) != 0) {
GTK.gtk_notebook_set_tab_pos (handle, GTK.GTK_POS_BOTTOM);
}
@@ -271,12 +271,17 @@ void createWidget (int index) {
}
void createItem (TabItem item, int index) {
- long list = GTK.gtk_container_get_children (handle);
int itemCount = 0;
- if (list != 0) {
- itemCount = OS.g_list_length (list);
- OS.g_list_free (list);
+ if (GTK.GTK4) {
+ itemCount = GTK.gtk_notebook_get_n_pages(handle);
+ } else {
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list != 0) {
+ itemCount = OS.g_list_length (list);
+ OS.g_list_free (list);
+ }
}
+
if (!(0 <= index && index <= itemCount)) error (SWT.ERROR_INVALID_RANGE);
if (itemCount == items.length) {
TabItem [] newItems = new TabItem [items.length + 4];
@@ -289,16 +294,29 @@ void createItem (TabItem item, int index) {
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
long imageHandle = GTK.gtk_image_new ();
if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_container_add (boxHandle, labelHandle);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_box_append(boxHandle, imageHandle);
+ GTK4.gtk_box_append(boxHandle, labelHandle);
+ } else {
+ GTK3.gtk_container_add(boxHandle, imageHandle);
+ GTK3.gtk_container_add(boxHandle, labelHandle);
+ }
+
long pageHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (pageHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, SWITCH_PAGE);
GTK.gtk_notebook_insert_page (handle, pageHandle, boxHandle, index);
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, SWITCH_PAGE);
- GTK.gtk_widget_show (boxHandle);
- GTK.gtk_widget_show (labelHandle);
- GTK.gtk_widget_show (pageHandle);
+
+ if (GTK.GTK4) {
+ GTK.gtk_widget_hide(imageHandle);
+ } else {
+ GTK.gtk_widget_show(boxHandle);
+ GTK.gtk_widget_show(labelHandle);
+ GTK.gtk_widget_show(pageHandle);
+ }
+
item.state |= HANDLE;
item.handle = boxHandle;
item.labelHandle = labelHandle;
@@ -310,7 +328,9 @@ void createItem (TabItem item, int index) {
item.setForegroundGdkRGBA (item.handle, getForegroundGdkRGBA());
}
if ((state & FONT) != 0) {
- item.setFontDescription (getFontDescription());
+ long fontDesc = getFontDescription ();
+ item.setFontDescription (fontDesc);
+ OS.pango_font_description_free (fontDesc);
}
if (itemCount == 1) {
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, SWITCH_PAGE);
@@ -360,40 +380,56 @@ long eventHandle () {
@Override
Control[] _getChildren() {
- Control [] directChildren = super._getChildren ();
+ Control[] directChildren = super._getChildren();
int directCount = directChildren.length;
- int count = items == null ? 0 : items.length;
- Control [] children = new Control [count + directCount];
- int i = 0;
- for (int j = 0; j < count; j++) {
- TabItem tabItem = items[j];
+ int itemCount = items == null ? 0 : items.length;
+ Control[] children = new Control[itemCount + directCount];
+
+ int childrenCount = 0;
+ for (int itemIndex = 0; itemIndex < itemCount; itemIndex++) {
+ TabItem tabItem = items[itemIndex];
if (tabItem != null && !tabItem.isDisposed()) {
long parentHandle = tabItem.pageHandle;
- long list = GTK.gtk_container_get_children (parentHandle);
- if (list != 0) {
- long handle = OS.g_list_data (list);
- if (handle != 0) {
- Widget widget = display.getWidget (handle);
- if (widget != null && widget != this) {
- if (widget instanceof Control) {
- children [i++] = (Control) widget;
+
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(parentHandle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ Widget childWidget = display.getWidget(child);
+ if (childWidget != null && childWidget instanceof Control && childWidget != this) {
+ children[childrenCount] = (Control)childWidget;
+ childrenCount++;
+ }
+ }
+ } else {
+ long list = GTK3.gtk_container_get_children (parentHandle);
+ if (list != 0) {
+ long handle = OS.g_list_data (list);
+ if (handle != 0) {
+ Widget widget = display.getWidget (handle);
+ if (widget != null && widget != this) {
+ if (widget instanceof Control) {
+ children [childrenCount++] = (Control) widget;
+ }
}
}
+ OS.g_list_free (list);
}
- OS.g_list_free (list);
}
}
}
- if (i == count + directCount) return children;
- Control [] newChildren;
- if (i == count) {
- newChildren = children;
+
+ if (childrenCount == itemCount + directCount) {
+ return children;
} else {
- newChildren = new Control [i + directCount];
- System.arraycopy (children, 0, newChildren, 0, i);
+ Control[] newChildren;
+ if (childrenCount == itemCount) {
+ newChildren = children;
+ } else {
+ newChildren = new Control [childrenCount + directCount];
+ System.arraycopy (children, 0, newChildren, 0, childrenCount);
+ }
+ System.arraycopy (directChildren, 0, newChildren, childrenCount, directCount);
+ return newChildren;
}
- System.arraycopy (directChildren, 0, newChildren, i, directCount);
- return newChildren;
}
/**
@@ -414,11 +450,18 @@ Control[] _getChildren() {
public TabItem getItem (int index) {
checkWidget();
if (!(0 <= index && index < getItemCount())) error (SWT.ERROR_INVALID_RANGE);
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
- int itemCount = OS.g_list_length (list);
- OS.g_list_free (list);
- if (!(0 <= index && index < itemCount)) error (SWT.ERROR_CANNOT_GET_ITEM);
+
+ if (GTK.GTK4) {
+ long child = GTK4.gtk_widget_get_first_child(handle);
+ if (child == 0) error(SWT.ERROR_CANNOT_GET_ITEM);
+ } else {
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
+ int itemCount = OS.g_list_length (list);
+ OS.g_list_free (list);
+ if (!(0 <= index && index < itemCount)) error (SWT.ERROR_CANNOT_GET_ITEM);
+ }
+
return items [index];
}
@@ -443,10 +486,7 @@ public TabItem getItem (int index) {
public TabItem getItem(Point point) {
checkWidget();
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return null;
- int itemCount = OS.g_list_length (list);
- OS.g_list_free (list);
+ int itemCount = getItemCount();
for (int i = 0; i < itemCount; i++) {
TabItem item = items[i];
Rectangle rect = item.getBounds();
@@ -467,10 +507,17 @@ public TabItem getItem(Point point) {
*/
public int getItemCount () {
checkWidget();
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return 0;
- int itemCount = OS.g_list_length (list);
- OS.g_list_free (list);
+
+ int itemCount = 0;
+ if (GTK.GTK4) {
+ itemCount = GTK.gtk_notebook_get_n_pages(handle);
+ } else {
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list == 0) return 0;
+ itemCount = OS.g_list_length (list);
+ OS.g_list_free (list);
+ }
+
return itemCount;
}
@@ -543,25 +590,34 @@ long gtk_focus (long widget, long directionType) {
}
@Override
-long gtk_switch_page (long widget, long page, long page_num) {
- int index = GTK.gtk_notebook_get_current_page (handle);
- if (index != -1) {
- Control control = items [index].getControl ();
- if (control != null && !control.isDisposed ()) {
- control.setVisible (false);
- }
- } else {
- return 0;
- }
- TabItem item = items [(int)page_num];
- Control control = item.getControl ();
- if (control != null && !control.isDisposed ()) {
+long gtk_switch_page(long notebook, long page, int page_num) {
+ TabItem item = items[page_num];
+
+ if (GTK.GTK4) {
+ Control control = item.getControl();
control.setBoundsInPixels(getClientAreaInPixels());
- control.setVisible (true);
+ } else {
+ int index = GTK.gtk_notebook_get_current_page(handle);
+ if (index != -1) {
+ Control control = items [index].getControl();
+ if (control != null && !control.isDisposed()) {
+ control.setVisible(false);
+ }
+ } else {
+ return 0;
+ }
+
+ Control control = item.getControl();
+ if (control != null && !control.isDisposed()) {
+ control.setBoundsInPixels(getClientAreaInPixels());
+ control.setVisible(true);
+ }
}
+
Event event = new Event();
event.item = item;
- sendSelectionEvent (SWT.Selection, event, false);
+ sendSelectionEvent(SWT.Selection, event, false);
+
return 0;
}
@@ -591,14 +647,16 @@ void hookEvents () {
public int indexOf (TabItem item) {
checkWidget();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return -1;
- int count = OS.g_list_length (list);
- OS.g_list_free (list);
- for (int i=0; i<count; i++) {
- if (items [i] == item) return i;
+
+ int index = -1;
+ int count = getItemCount();
+ for (int i = 0; i < count; i++) {
+ if (items [i] == item) {
+ index = i;
+ break;
+ }
}
- return -1;
+ return index;
}
@Override
@@ -608,12 +666,7 @@ Point minimumSize (int wHint, int hHint, boolean flushCache) {
for (int i=0; i<children.length; i++) {
Control child = children [i];
int index = 0;
- int count = 0;
- long list = GTK.gtk_container_get_children (handle);
- if (list != 0) {
- count = OS.g_list_length (list);
- OS.g_list_free (list);
- }
+ int count = getItemCount();
while (index < count) {
if (items [index].control == child) break;
index++;
@@ -714,14 +767,11 @@ public void removeSelectionListener (SelectionListener listener) {
@Override
void reskinChildren (int flags) {
if (items != null) {
- long list = GTK.gtk_container_get_children (handle);
- if (list != 0){
- int count = OS.g_list_length (list);
- OS.g_list_free (list);
- for (int i=0; i<count; i++) {
- TabItem item = items [i];
- if (item != null) item.reskin (flags);
- }
+ int count = getItemCount();
+
+ for (int i = 0; i < count; i++) {
+ TabItem item = items [i];
+ if (item != null) item.reskin(flags);
}
}
super.reskinChildren (flags);
@@ -729,20 +779,30 @@ void reskinChildren (int flags) {
@Override
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "notebook header" : "GtkNotebook.header";
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string (rgba) + ";}";
-
- // Cache background
- cssBackground = css;
-
- // Apply background color and any cached foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css (context, finalCss);
- } else {
- GTK.gtk_widget_override_background_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- }
+ // Form background string
+ String css = "notebook header {background-color: " + display.gtk_rgba_to_css_string (rgba) + ";}";
+
+ // Cache background
+ cssBackground = css;
+
+ // Apply background color and any cached foreground color
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css (context, finalCss);
+}
+
+void setInitialBackgroundGTK4 (long handle, GdkRGBA rgba) {
+
+ //Get the "stack" widget as child and gets its context
+ long child = GTK4.gtk_widget_get_first_child(handle);
+ child = GTK4.gtk_widget_get_next_sibling(child);
+ long context = GTK.gtk_widget_get_style_context(child);
+
+ // Form background string
+ String css = "stack {background-color: " + display.gtk_rgba_to_css_string (rgba) + ";}";
+
+ // Apply background color
+ String finalCss = display.gtk_css_create_css_color_string (css, null, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css (context, finalCss);
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
index 1adc30a713..04f42024df 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a selectable user interface object
@@ -37,7 +39,8 @@ import org.eclipse.swt.internal.gtk.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class TabItem extends Item {
- long labelHandle, imageHandle, pageHandle, provider;
+ long labelHandle, imageHandle, pageHandle;
+ long cssProvider;
Control control;
TabFolder parent;
String toolTipText;
@@ -236,11 +239,11 @@ void hookEvents () {
super.hookEvents ();
if (labelHandle != 0) OS.g_signal_connect_closure_by_id (labelHandle, display.signalIds [MNEMONIC_ACTIVATE], 0, display.getClosure (MNEMONIC_ACTIVATE), false);
if (GTK.GTK4) {
- long motionController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(handle, motionController);
+ long motionController = GTK4.gtk_event_controller_motion_new();
+ GTK4.gtk_widget_add_controller(handle, motionController);
GTK.gtk_event_controller_set_propagation_phase(motionController, GTK.GTK_PHASE_TARGET);
- long enterMotionAddress = display.enterMotionScrollCallback.getAddress();
+ long enterMotionAddress = display.enterMotionCallback.getAddress();
OS.g_signal_connect (motionController, OS.enter, enterMotionAddress, ENTER);
} else {
OS.g_signal_connect_closure_by_id (handle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.getClosure (ENTER_NOTIFY_EVENT), false);
@@ -265,9 +268,10 @@ void release (boolean destroy) {
}
@Override
-void releaseHandle () {
- super.releaseHandle ();
+void releaseHandle() {
+ super.releaseHandle();
pageHandle = labelHandle = imageHandle = 0;
+ cssProvider = 0;
parent = null;
}
@@ -295,59 +299,61 @@ void releaseParent () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setControl (Control control) {
- checkWidget ();
+public void setControl(Control control) {
+ checkWidget();
if (control != null) {
- if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- if (control.parent != parent) error (SWT.ERROR_INVALID_PARENT);
+ if (control.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (control.parent != parent) error(SWT.ERROR_INVALID_PARENT);
}
- if (control != null) {
- // To understand why we reparent, see implementation note about bug 454936 at the start of TabFolder.
- if (GTK.GTK4) {
+ if (GTK.GTK4) {
+ this.control = control;
+
+ if (control != null) {
long widget = control.topHandle();
- long parentContainer = GTK.gtk_widget_get_parent (widget);
- if (parentContainer != 0) {
- OS.g_object_ref (widget); //so that it won't get destroyed due to lack of references.
- GTK.gtk_container_remove (parentContainer, widget);
- GTK.gtk_container_add (pageHandle, widget);
- OS.g_object_unref (widget);
- GTK.gtk_widget_show(widget);
+ long widgetParentContainer = GTK.gtk_widget_get_parent(widget);
+ if (widgetParentContainer != 0) {
+ OS.g_object_ref(widget);
+ OS.swt_fixed_remove(widgetParentContainer, widget);
+ OS.swt_fixed_add(pageHandle, widget);
+ OS.g_object_unref(widget);
}
- } else {
+ }
+ } else {
+ if (control != null) {
+ // To understand why we reparent, see implementation note about bug 454936 at the start of TabFolder.
Control.gtk_widget_reparent (control, pageHandle);
}
- }
- Control oldControl = this.control, newControl = control;
- this.control = control;
- int index = parent.indexOf (this), selectionIndex = parent.getSelectionIndex();
- if (index != selectionIndex) {
- if (newControl != null) {
- if (selectionIndex != -1) {
- Control selectedControl = parent.getItem(selectionIndex).getControl();
- if (selectedControl == newControl) return;
+ Control oldControl = this.control, newControl = control;
+ this.control = control;
+ int index = parent.indexOf (this), selectionIndex = parent.getSelectionIndex();
+ if (index != selectionIndex) {
+ if (newControl != null) {
+ if (selectionIndex != -1) {
+ Control selectedControl = parent.getItem(selectionIndex).getControl();
+ if (selectedControl == newControl) return;
+ }
+ newControl.setVisible(false);
+ return;
}
- newControl.setVisible(false);
- return;
}
- }
- if (newControl != null) {
- newControl.setBoundsInPixels (parent.getClientAreaInPixels ());
- newControl.setVisible (true);
- }
-
- if ((oldControl != null) && (oldControl != newControl)) {
- Control.gtk_widget_reparent (oldControl, parent.parentingHandle());
if (newControl != null) {
- oldControl.setVisible (false);
+ newControl.setBoundsInPixels (parent.getClientAreaInPixels ());
+ newControl.setVisible (true);
+ }
+
+ if ((oldControl != null) && (oldControl != newControl)) {
+ Control.gtk_widget_reparent (oldControl, parent.parentingHandle());
+ if (newControl != null) {
+ oldControl.setVisible (false);
+ }
}
}
}
void setFontDescription (long font) {
setFontDescription (labelHandle, font);
- setFontDescription (imageHandle, font);
}
void setForegroundRGBA (GdkRGBA rgba) {
@@ -372,18 +378,21 @@ void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
gtk_css_provider_load_from_css(context, css);
}
-void gtk_css_provider_load_from_css (long context, String css) {
- /* Utility function. */
- //@param css : a 'css java' string like "{\nbackground: red;\n}".
- if (provider == 0) {
- provider = GTK.gtk_css_provider_new ();
- GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref (provider);
+/**
+ * @param context the GtkStyleContext belonging to the widget which the CSS is to be applied to
+ * @param css Java string representing the CSS
+ */
+void gtk_css_provider_load_from_css(long styleContext, String css) {
+ if (cssProvider == 0) {
+ cssProvider = GTK.gtk_css_provider_new();
+ GTK.gtk_style_context_add_provider(styleContext, cssProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ OS.g_object_unref(cssProvider);
}
+
if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
+ GTK4.gtk_css_provider_load_from_data(cssProvider, Converter.javaStringToCString(css), -1);
} else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
+ GTK3.gtk_css_provider_load_from_data(cssProvider, Converter.javaStringToCString(css), -1, null);
}
}
@@ -400,12 +409,23 @@ public void setImage (Image image) {
} else {
imageList.put (imageIndex, image);
}
- long pixbuf = imageList.getPixbuf (imageIndex);
- gtk_image_set_from_gicon (imageHandle, pixbuf);
- GTK.gtk_widget_show (imageHandle);
+
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_image_set_from_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, image.surface);
+ }
+ GTK.gtk_widget_show(imageHandle);
} else {
- gtk_image_set_from_gicon (imageHandle, 0);
- GTK.gtk_widget_hide (imageHandle);
+ if (GTK.GTK4) {
+ GTK4.gtk_image_clear(imageHandle);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, 0);
+ }
+ GTK.gtk_widget_hide(imageHandle);
}
}
@@ -485,11 +505,22 @@ public void setText (String string) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setToolTipText (String string) {
- checkWidget ();
- Shell shell = parent._getShell ();
- shell.setToolTipText (handle, string);
+public void setToolTipText(String string) {
+ checkWidget();
+
toolTipText = string;
+ setToolTipText(handle, string);
}
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ return 0;
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 778f9eb401..cc67a0eef6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,6 +21,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class implement a selectable user interface
@@ -83,11 +85,12 @@ public class Table extends Composite {
TableColumn sortColumn;
ImageList imageList, headerImageList;
boolean firstCustomDraw;
+ /** True iff computeSize has never been called on this Table */
+ boolean firstCompute = true;
int drawState, drawFlags;
GdkRGBA background, foreground, drawForegroundRGBA;
Color headerBackground, headerForeground;
- String headerCSSBackground, headerCSSForeground;
- boolean ownerDraw, ignoreSize, ignoreAccessibility, pixbufSizeSet, hasChildren;
+ boolean ownerDraw, ignoreSize, pixbufSizeSet, hasChildren;
int maxWidth = 0;
int topIndex;
double cachedAdjustment, currentAdjustment;
@@ -96,6 +99,8 @@ public class Table extends Composite {
boolean boundsChangedSinceLastDraw, headerVisible, wasScrolled;
boolean rowActivated;
+ private long headerCSSProvider;
+
static final int CHECKED_COLUMN = 0;
static final int GRAYED_COLUMN = 1;
static final int FOREGROUND_COLUMN = 2;
@@ -107,7 +112,8 @@ public class Table extends Composite {
static final int CELL_FOREGROUND = 2;
static final int CELL_BACKGROUND = 3;
static final int CELL_FONT = 4;
- static final int CELL_TYPES = CELL_FONT + 1;
+ static final int CELL_SURFACE = 5;
+ static final int CELL_TYPES = CELL_SURFACE + 1;
/**
* Constructs a new instance of this class given its parent
@@ -288,15 +294,6 @@ boolean checkData (TableItem item) {
OS.g_signal_handlers_unblock_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
if (item.isDisposed ()) return false;
}
- /*
- * A commit in GTK3.18 caused bug 531048 due to internal changes in GtkStyleContext
- * invalidation. The fix is to invalidate the GtkStyleContext manually when changing
- * SWT.VIRTUAL Table content. Without it, the internal caching mechanism causes
- * the wrong cells to be rendered.
- */
- if (!GTK.GTK4 && GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
- GTK.gtk_style_context_invalidate(GTK.gtk_widget_get_style_context(handle));
- }
return true;
}
@@ -341,7 +338,7 @@ public void addSelectionListener (SelectionListener listener) {
}
int calculateWidth (long column, long iter) {
- GTK.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false);
+ GTK.gtk_tree_view_column_cell_set_cell_data(column, modelHandle, iter, false, false);
/*
* Bug in GTK. The width calculated by gtk_tree_view_column_cell_get_size()
@@ -350,12 +347,18 @@ int calculateWidth (long column, long iter) {
*/
//This workaround is causing the problem Bug 459834 in GTK3. So reverting the workaround for GTK3
- int [] width = new int [1];
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, width, null);
- long textRenderer = getTextRenderer (column);
- int [] xpad = new int[1];
+ int[] width = new int[1];
+ if (GTK.GTK4) {
+ GTK4.gtk_tree_view_column_cell_get_size(column, null, null, width, null);
+ } else {
+ GTK3.gtk_tree_view_column_cell_get_size(column, null, null, null, width, null);
+ }
+
+ long textRenderer = getTextRenderer(column);
+ int[] xpad = new int[1];
if (textRenderer != 0) GTK.gtk_cell_renderer_get_padding(textRenderer, xpad, null);
- return width [0] + xpad [0]*2;
+
+ return width[0] + xpad[0] * 2;
}
/**
@@ -493,6 +496,18 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
+ /*
+ * Set all the TableColumn buttons visible otherwise
+ * gtk_widget_get_preferred_size() will not take their size
+ * into account.
+ */
+ if (firstCompute) {
+ for (int x = 0; x < columns.length; x++) {
+ TableColumn column = columns[x];
+ if (column != null) GTK.gtk_widget_set_visible(column.buttonHandle, true);
+ }
+ firstCompute = false;
+ }
Point size = computeNativeSize (handle, wHint, hHint, changed);
/*
* In GTK 3, computeNativeSize(..) sometimes just returns the header
@@ -510,20 +525,70 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
if (wHint == SWT.DEFAULT && size.x == 0 && columnCount == 0) {
size.x = maxWidth;
}
- /*
- * In case the table doesn't contain any elements,
- * getItemCount returns 0 and size.y will be 0
- * so need to assign default height. The same applies
- * for size.x.
- */
- if (size.y == 0 && hHint == SWT.DEFAULT) size.y = DEFAULT_HEIGHT;
- if (size.x == 0 && wHint == SWT.DEFAULT) size.x = DEFAULT_WIDTH;
Rectangle trim = computeTrimInPixels (0, 0, size.x, size.y);
size.x = trim.width;
+ /*
+ * Feature in GTK: sometimes GtkScrolledWindow's with no scrollbars
+ * won't automatically adjust their size. This happens when a Table
+ * has a header, and the initial computed height was the height of
+ * the of the header.
+ *
+ * The fix is to increment the height by 1 in order to force a size
+ * update for the parent GtkScrollWindow, otherwise the headers
+ * will not be shown. This only happens once, see bug 546490.
+ */
+ if (size.y == this.headerHeight && this.headerVisible && (style & SWT.NO_SCROLL) != 0) {
+ trim.height = trim.height + 1;
+ }
size.y = trim.height;
return size;
}
+void copyModel(long oldModel, int oldStart, long newModel, int newStart, int modelLength) {
+ long value = OS.g_malloc (OS.GValue_sizeof ());
+ // GValue needs to be initialized with G_VALUE_INIT, which is zeroes
+ OS.memset (value, 0, OS.GValue_sizeof ());
+
+ for (int i=0; i<itemCount; i++) {
+ long newIterator = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
+ if (newIterator == 0) error (SWT.ERROR_NO_HANDLES);
+ GTK.gtk_list_store_append (newModel, newIterator);
+
+ TableItem item = items [i];
+ if (item == null) {
+ /*
+ * In `SWT.VIRTUAL` mode, `items[]` is not populated, and
+ * iterators are not remembered. Instead, SWT will use
+ * `gtk_tree_model_iter_nth_child()`.
+ */
+ OS.g_free (newIterator);
+ continue;
+ }
+
+ long oldIterator = item.handle;
+
+ // Copy header fields
+ for (int iColumn = 0; iColumn < FIRST_COLUMN; iColumn++) {
+ GTK.gtk_tree_model_get_value (oldModel, oldIterator, iColumn, value);
+ GTK.gtk_list_store_set_value (newModel, newIterator, iColumn, value);
+ OS.g_value_unset (value);
+ }
+
+ // Copy requested columns
+ for (int iOffset = 0; iOffset < modelLength - FIRST_COLUMN; iOffset++) {
+ GTK.gtk_tree_model_get_value (oldModel, oldIterator, oldStart + iOffset, value);
+ GTK.gtk_list_store_set_value (newModel, newIterator, newStart + iOffset, value);
+ OS.g_value_unset (value);
+ }
+
+ GTK.gtk_list_store_remove (oldModel, oldIterator);
+ OS.g_free (oldIterator);
+ item.handle = newIterator;
+ }
+
+ OS.g_free (value);
+}
+
void createColumn (TableColumn column, int index) {
int modelIndex = FIRST_COLUMN;
if (columnCount != 0) {
@@ -544,43 +609,16 @@ void createColumn (TableColumn column, int index) {
long [] types = getColumnTypes (columnCount + 4); // grow by 4 rows at a time
long newModel = GTK.gtk_list_store_newv (types.length, types);
if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
- long [] ptr = new long [1];
- int [] ptr1 = new int [1];
- for (int i=0; i<itemCount; i++) {
- long newItem = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- if (newItem == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_list_store_append (newModel, newItem);
- TableItem item = items [i];
- if (item != null) {
- long oldItem = item.handle;
- /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
- for (int j=0; j<FOREGROUND_COLUMN; j++) {
- GTK.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
- GTK.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
- }
- for (int j=FOREGROUND_COLUMN; j<modelLength; j++) {
- GTK.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
- GTK.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
- if (ptr [0] != 0) {
- if (types[j] == GDK.GDK_TYPE_RGBA()) {
- GDK.gdk_rgba_free(ptr[0]);
- }
- if (types [j] == OS.G_TYPE_STRING ()) {
- OS.g_free ((ptr [0]));
- } else if (types [j] == GDK.GDK_TYPE_PIXBUF()) {
- OS.g_object_unref (ptr [0]);
- } else if (types [j] == OS.PANGO_TYPE_FONT_DESCRIPTION()) {
- OS.pango_font_description_free (ptr [0]);
- }
- }
- }
- GTK.gtk_list_store_remove (oldModel, oldItem);
- OS.g_free (oldItem);
- item.handle = newItem;
- } else {
- OS.g_free (newItem);
- }
- }
+ /*
+ * In VIRTUAL Table, GTK may react to `gtk_list_store_remove()` by
+ * calling `cellDataProc()`, and SWT will be confused because
+ * `items[]` no longer match the GTK model, which has some rows
+ * deleted by `gtk_list_store_remove()`. The fix is to disconnect
+ * model during rebuilding. The new model will replace the old one
+ * anyway, so it doesn't matter if old is removed a bit earlier.
+ */
+ GTK.gtk_tree_view_set_model (handle, 0);
+ copyModel (oldModel, FIRST_COLUMN, newModel, FIRST_COLUMN, modelLength);
GTK.gtk_tree_view_set_model (handle, newModel);
setModel (newModel);
}
@@ -625,8 +663,12 @@ void createHandle (int index) {
state |= HANDLE;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
- scrolledHandle = GTK.gtk_scrolled_window_new (0, 0);
+ if (GTK.GTK4) {
+ scrolledHandle = GTK4.gtk_scrolled_window_new();
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ scrolledHandle = GTK3.gtk_scrolled_window_new (0, 0);
+ }
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
long [] types = getColumnTypes (1);
modelHandle = GTK.gtk_list_store_newv (types.length, types);
@@ -639,8 +681,13 @@ void createHandle (int index) {
OS.g_object_ref (checkRenderer);
}
createColumn (null, 0);
- GTK.gtk_container_add (fixedHandle, scrolledHandle);
- GTK.gtk_container_add (scrolledHandle, handle);
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, scrolledHandle);
+ GTK4.gtk_scrolled_window_set_child(scrolledHandle, handle);
+ } else {
+ GTK3.gtk_container_add(fixedHandle, scrolledHandle);
+ GTK3.gtk_container_add(scrolledHandle, handle);
+ }
int mode = (style & SWT.MULTI) != 0 ? GTK.GTK_SELECTION_MULTIPLE : GTK.GTK_SELECTION_BROWSE;
long selectionHandle = GTK.gtk_tree_view_get_selection (handle);
@@ -649,7 +696,13 @@ void createHandle (int index) {
int hsp = (style & SWT.H_SCROLL) != 0 ? GTK.GTK_POLICY_AUTOMATIC : GTK.GTK_POLICY_NEVER;
int vsp = (style & SWT.V_SCROLL) != 0 ? GTK.GTK_POLICY_AUTOMATIC : GTK.GTK_POLICY_NEVER;
GTK.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
- if ((style & SWT.BORDER) != 0) GTK.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ if ((style & SWT.BORDER) != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_scrolled_window_set_has_frame(scrolledHandle, true);
+ } else {
+ GTK3.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ }
+ }
/*
* We enable fixed-height-mode for performance reasons (see bug 490203).
*/
@@ -674,21 +727,34 @@ void createItem (TableColumn column, int index) {
} else {
createColumn (column, index);
}
- long boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 3);
- if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- long labelHandle = GTK.gtk_label_new_with_mnemonic (null);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- long imageHandle = GTK.gtk_image_new ();
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_container_add (boxHandle, labelHandle);
- GTK.gtk_widget_show (boxHandle);
- GTK.gtk_widget_show (labelHandle);
+
+ long boxHandle = gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, false, 3);
+ if (boxHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ GTK.gtk_tree_view_column_set_widget (column.handle, boxHandle);
+
+ long labelHandle = GTK.gtk_label_new_with_mnemonic(null);
+ if (labelHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ long imageHandle = GTK.gtk_image_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_box_append(boxHandle, imageHandle);
+ GTK4.gtk_box_append(boxHandle, labelHandle);
+
+ GTK.gtk_widget_hide(imageHandle);
+ } else {
+ GTK3.gtk_container_add (boxHandle, imageHandle);
+ GTK3.gtk_container_add (boxHandle, labelHandle);
+
+ GTK.gtk_widget_show (boxHandle);
+ GTK.gtk_widget_show (labelHandle);
+ }
+
column.labelHandle = labelHandle;
column.imageHandle = imageHandle;
- GTK.gtk_tree_view_column_set_widget (column.handle, boxHandle);
column.buttonHandle = GTK.gtk_tree_view_column_get_button(column.handle);
GTK.gtk_widget_set_focus_on_click(column.buttonHandle, false);
+
if (columnCount == columns.length) {
TableColumn [] newColumns = new TableColumn [columns.length + 4];
System.arraycopy (columns, 0, newColumns, 0, columns.length);
@@ -697,7 +763,9 @@ void createItem (TableColumn column, int index) {
System.arraycopy (columns, index, columns, index + 1, columnCount++ - index);
columns [index] = column;
if ((state & FONT) != 0) {
- column.setFontDescription (getFontDescription ());
+ long fontDesc = getFontDescription ();
+ column.setFontDescription (fontDesc);
+ OS.pango_font_description_free (fontDesc);
}
if (columnCount >= 1) {
for (int i=0; i<itemCount; i++) {
@@ -725,11 +793,14 @@ void createItem (TableColumn column, int index) {
}
}
}
+
+ updateHeaderCSS();
+
/*
* Feature in GTK. The tree view does not resize immediately if a table
* column is created when the table is not visible. If the width of the
- * new column is queried, GTK returns an incorrect value. The fix is to
- * ensure that the columns are resized before any queries.
+ * new column is queried, GTK returns an incorrect value. The fix is to
+ * ensure that the columns are resized before any queries.
*/
if(!isVisible ()) {
forceResize();
@@ -997,57 +1068,16 @@ void destroyItem (TableColumn column) {
long [] types = getColumnTypes (1);
long newModel = GTK.gtk_list_store_newv (types.length, types);
if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
- long [] ptr = new long [1];
- int [] ptr1 = new int [1];
- for (int i=0; i<itemCount; i++) {
- long newItem = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- if (newItem == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_list_store_append (newModel, newItem);
- TableItem item = items [i];
- if (item != null) {
- long oldItem = item.handle;
- /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
- for (int j=0; j<FOREGROUND_COLUMN; j++) {
- GTK.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
- GTK.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
- }
- for (int j=FOREGROUND_COLUMN; j<FIRST_COLUMN; j++) {
- GTK.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
- GTK.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
- if (ptr [0] != 0) {
- if (j == FOREGROUND_COLUMN || j == BACKGROUND_COLUMN) {
- GDK.gdk_rgba_free (ptr [0]);
- } else if (j == FONT_COLUMN) {
- OS.pango_font_description_free (ptr [0]);
- }
- }
- }
- GTK.gtk_tree_model_get (oldModel, oldItem, column.modelIndex + CELL_PIXBUF, ptr, -1);
- GTK.gtk_list_store_set (newModel, newItem, FIRST_COLUMN + CELL_PIXBUF, ptr [0], -1);
- if (ptr [0] != 0) OS.g_object_unref (ptr [0]);
- GTK.gtk_tree_model_get (oldModel, oldItem, column.modelIndex + CELL_TEXT, ptr, -1);
- GTK.gtk_list_store_set (newModel, newItem, FIRST_COLUMN + CELL_TEXT, ptr [0], -1);
- OS.g_free (ptr [0]);
- GTK.gtk_tree_model_get (oldModel, oldItem, column.modelIndex + CELL_FOREGROUND, ptr, -1);
- GTK.gtk_list_store_set (newModel, newItem, FIRST_COLUMN + CELL_FOREGROUND, ptr [0], -1);
- if (ptr [0] != 0) {
- GDK.gdk_rgba_free (ptr [0]);
- }
- GTK.gtk_tree_model_get (oldModel, oldItem, column.modelIndex + CELL_BACKGROUND, ptr, -1);
- GTK.gtk_list_store_set (newModel, newItem, FIRST_COLUMN + CELL_BACKGROUND, ptr [0], -1);
- if (ptr [0] != 0) {
- GDK.gdk_rgba_free (ptr [0]);
- }
- GTK.gtk_tree_model_get (oldModel, oldItem, column.modelIndex + CELL_FONT, ptr, -1);
- GTK.gtk_list_store_set (newModel, newItem, FIRST_COLUMN + CELL_FONT, ptr [0], -1);
- if (ptr [0] != 0) OS.pango_font_description_free (ptr [0]);
- GTK.gtk_list_store_remove (oldModel, oldItem);
- OS.g_free (oldItem);
- item.handle = newItem;
- } else {
- OS.g_free (newItem);
- }
- }
+ /*
+ * In VIRTUAL Table, GTK may react to `gtk_list_store_remove()` by
+ * calling `cellDataProc()`, and SWT will be confused because
+ * `items[]` no longer match the GTK model, which has some rows
+ * deleted by `gtk_list_store_remove()`. The fix is to disconnect
+ * model during rebuilding. The new model will replace the old one
+ * anyway, so it doesn't matter if old is removed a bit earlier.
+ */
+ GTK.gtk_tree_view_set_model (handle, 0);
+ copyModel (oldModel, column.modelIndex, newModel, FIRST_COLUMN, FIRST_COLUMN + CELL_TYPES);
GTK.gtk_tree_view_set_model (handle, newModel);
setModel (newModel);
createColumn (null, 0);
@@ -1158,61 +1188,35 @@ long eventSurface () {
return paintSurface ();
}
-boolean fixAccessibility () {
- /*
- * Bug in GTK. With GTK 2.12, when assistive technologies is on, the time
- * it takes to add or remove several rows to the model is very long. This
- * happens because the accessible object asks each row for its data, including
- * the rows that are not visible. The the fix is to block the accessible object
- * from receiving row_added and row_removed signals and, at the end, send only
- * a notify signal with the "model" detail.
- *
- * Note: The test bellow has to be updated when the real problem is fixed in
- * the accessible object.
- */
- return true;
-}
-
@Override
-void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) {
- super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
- for (int i=0; i<columnCount; i++) {
- TableColumn column = columns [i];
- if (column.toolTipText != null) {
- column.setToolTipText(oldShell, null);
- column.setToolTipText(newShell, column.toolTipText);
- }
+Rectangle getClientAreaInPixels() {
+ checkWidget();
+ if(RESIZE_ON_GETCLIENTAREA) {
+ forceResize();
}
-}
-@Override
-Rectangle getClientAreaInPixels () {
- checkWidget ();
- forceResize ();
- long clientHandle = clientHandle ();
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (clientHandle, allocation);
+ long clientHandle = clientHandle();
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(clientHandle, allocation);
int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
+
Rectangle rect;
if (GTK.GTK4) {
- long fixedSurface = gtk_widget_get_surface (fixedHandle);
- long surface = gtk_widget_get_surface (clientHandle);
- int [] surfaceX = new int [1], surfaceY = new int [1];
- GDK.gdk_surface_get_origin (surface, surfaceX, surfaceY);
- int [] fixedX = new int [1], fixedY = new int [1];
- GDK.gdk_surface_get_origin (fixedSurface, fixedX, fixedY);
- rect = new Rectangle (fixedX [0] - surfaceX [0], fixedY [0] - surfaceY [0], width, height);
+ int[] headerHeight = new int[1], headerWidth = new int[1];
+ GTK.gtk_tree_view_convert_bin_window_to_widget_coords(handle, 0, 0, headerWidth, headerHeight);
+ rect = new Rectangle(headerWidth[0], headerHeight[0], width, height);
} else {
- GTK.gtk_widget_realize (handle);
- long fixedWindow = gtk_widget_get_window (fixedHandle);
- long binWindow = GTK.gtk_tree_view_get_bin_window (handle);
- int [] binX = new int [1], binY = new int [1];
- GDK.gdk_window_get_origin (binWindow, binX, binY);
- int [] fixedX = new int [1], fixedY = new int [1];
- GDK.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
- rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
+ GTK.gtk_widget_realize(handle);
+ long fixedWindow = gtk_widget_get_window(fixedHandle);
+ long binWindow = GTK3.gtk_tree_view_get_bin_window(handle);
+ int[] binX = new int[1], binY = new int[1];
+ GDK.gdk_window_get_origin(binWindow, binX, binY);
+ int[] fixedX = new int[1], fixedY = new int[1];
+ GDK.gdk_window_get_origin(fixedWindow, fixedX, fixedY);
+ rect = new Rectangle(fixedX[0] - binX[0], fixedY[0] - binY[0], width, height);
}
+
return rect;
}
@@ -1224,7 +1228,7 @@ int getClientWidth () {
gdk_surface_get_size(surface, w, h);
} else {
GTK.gtk_widget_realize (handle);
- gdk_window_get_size(GTK.gtk_tree_view_get_bin_window(handle), w, h);
+ gdk_window_get_size(GTK3.gtk_tree_view_get_bin_window(handle), w, h);
}
return w[0];
}
@@ -1292,6 +1296,7 @@ long [] getColumnTypes (int columnCount) {
// per cell data
for (int i=FIRST_COLUMN; i<types.length; i+=CELL_TYPES) {
types [i + CELL_PIXBUF] = GDK.GDK_TYPE_PIXBUF ();
+ types [i + CELL_SURFACE] = OS.G_TYPE_LONG();
types [i + CELL_TEXT] = OS.G_TYPE_STRING ();
types [i + CELL_FOREGROUND] = GDK.GDK_TYPE_RGBA();
types [i + CELL_BACKGROUND] = GDK.GDK_TYPE_RGBA();
@@ -1399,14 +1404,10 @@ GdkRGBA getContextBackgroundGdkRGBA () {
@Override
GdkRGBA getContextColorGdkRGBA () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- if (foreground != null) {
- return foreground;
- } else {
- return display.COLOR_LIST_FOREGROUND_RGBA;
- }
+ if (foreground != null) {
+ return foreground;
} else {
- return super.getContextColorGdkRGBA ();
+ return display.COLOR_LIST_FOREGROUND_RGBA;
}
}
@@ -1495,44 +1496,43 @@ public int getHeaderHeight () {
}
int getHeaderHeightInPixels () {
- checkWidget ();
- if (!GTK.gtk_tree_view_get_headers_visible (handle)) return 0;
+ checkWidget();
+ if (!GTK.gtk_tree_view_get_headers_visible(handle)) return 0;
+
+ int height = 0;
if (columnCount > 0) {
GtkRequisition requisition = new GtkRequisition ();
- int height = 0;
- for (int i=0; i<columnCount; i++) {
- long buttonHandle = columns [i].buttonHandle;
+ for (int i = 0; i < columnCount; i++) {
+ long buttonHandle = columns[i].buttonHandle;
if (buttonHandle != 0) {
if (!GTK.gtk_widget_get_visible(buttonHandle)) {
GTK.gtk_widget_show(buttonHandle);
- gtk_widget_get_preferred_size (buttonHandle, requisition);
+ gtk_widget_get_preferred_size(buttonHandle, requisition);
GTK.gtk_widget_hide(buttonHandle);
} else {
- gtk_widget_get_preferred_size (buttonHandle, requisition);
+ gtk_widget_get_preferred_size(buttonHandle, requisition);
}
- height = Math.max (height, requisition.height);
+ height = Math.max(height, requisition.height);
}
}
- return height;
- }
- if (GTK.GTK4) {
- long fixedSurface = gtk_widget_get_surface (fixedHandle);
- long surface = gtk_widget_get_surface (handle);
- int [] surfaceY = new int [1];
- GDK.gdk_surface_get_origin (surface, null, surfaceY);
- int [] fixedY = new int [1];
- GDK.gdk_surface_get_origin (fixedSurface, null, fixedY);
- return surfaceY [0] - fixedY [0];
} else {
- GTK.gtk_widget_realize (handle);
- long fixedWindow = gtk_widget_get_window (fixedHandle);
- long binWindow = GTK.gtk_tree_view_get_bin_window (handle);
- int [] binY = new int [1];
- GDK.gdk_window_get_origin (binWindow, null, binY);
- int [] fixedY = new int [1];
- GDK.gdk_window_get_origin (fixedWindow, null, fixedY);
- return binY [0] - fixedY [0];
+ if (GTK.GTK4) {
+ int[] headerHeight = new int[1];
+ GTK.gtk_tree_view_convert_bin_window_to_widget_coords(handle, 0, 0, null, headerHeight);
+ height = headerHeight[0];
+ } else {
+ GTK.gtk_widget_realize (handle);
+ long fixedWindow = gtk_widget_get_window (fixedHandle);
+ long binWindow = GTK3.gtk_tree_view_get_bin_window (handle);
+ int [] binY = new int [1];
+ GDK.gdk_window_get_origin (binWindow, null, binY);
+ int [] fixedY = new int [1];
+ GDK.gdk_window_get_origin (fixedWindow, null, fixedY);
+ height = binY [0] - fixedY [0];
+ }
}
+
+ return height;
}
/**
@@ -1666,35 +1666,48 @@ public int getItemHeight () {
int getItemHeightInPixels () {
checkWidget();
+ int height = 0;
+
if (itemCount == 0) {
- long column = GTK.gtk_tree_view_get_column (handle, 0);
- int [] w = new int [1], h = new int [1];
+ long column = GTK.gtk_tree_view_get_column(handle, 0);
+ int[] h = new int[1];
ignoreSize = true;
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
- int height = h [0];
- long textRenderer = getTextRenderer (column);
- if (textRenderer != 0) GTK.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null);
- height += h [0];
+ if (GTK.GTK4) {
+ GTK4.gtk_tree_view_column_cell_get_size(column, null, null, null, h);
+ } else {
+ GTK3.gtk_tree_view_column_cell_get_size(column, null, null, null, null, h);
+ }
+
+ height = h[0];
+ long textRenderer = getTextRenderer(column);
+ if (textRenderer != 0) GTK.gtk_cell_renderer_get_preferred_height_for_width(textRenderer, handle, 0, h, null);
+ height += h[0];
ignoreSize = false;
- return height;
} else {
- int height = 0;
- long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- GTK.gtk_tree_model_get_iter_first (modelHandle, iter);
- int columnCount = Math.max (1, this.columnCount);
- for (int i=0; i<columnCount; i++) {
- long column = GTK.gtk_tree_view_get_column (handle, i);
- GTK.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false);
- int [] w = new int [1], h = new int [1];
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
- long textRenderer = getTextRenderer (column);
- int [] ypad = new int[1];
+ long iter = OS.g_malloc(GTK.GtkTreeIter_sizeof());
+ GTK.gtk_tree_model_get_iter_first(modelHandle, iter);
+
+ int columnCount = Math.max(1, this.columnCount);
+ for (int i = 0; i < columnCount; i++) {
+ long column = GTK.gtk_tree_view_get_column(handle, i);
+ GTK.gtk_tree_view_column_cell_set_cell_data(column, modelHandle, iter, false, false);
+ int[] h = new int[1];
+ if (GTK.GTK4) {
+ GTK4.gtk_tree_view_column_cell_get_size(column, null, null, null, h);
+ } else {
+ GTK3.gtk_tree_view_column_cell_get_size (column, null, null, null, null, h);
+ }
+
+ long textRenderer = getTextRenderer(column);
+ int[] ypad = new int[1];
if (textRenderer != 0) GTK.gtk_cell_renderer_get_padding(textRenderer, null, ypad);
- height = Math.max(height, h [0] + ypad [0]);
+ height = Math.max(height, h[0] + ypad[0]);
}
+
OS.g_free (iter);
- return height;
}
+
+ return height;
}
/**
@@ -1848,7 +1861,7 @@ public int getSelectionIndex () {
boolean foundIndex = false;
while (list != 0) {
long data = OS.g_list_data (list);
- if (foundIndex == false) {
+ if (!foundIndex) {
long indices = GTK.gtk_tree_path_get_indices (data);
if (indices != 0) {
C.memmove (index, indices, 4);
@@ -1958,7 +1971,7 @@ long getTextRenderer (long column) {
long textRenderer = 0;
while (list != 0) {
long renderer = OS.g_list_data (list);
- if (GTK.GTK_IS_CELL_RENDERER_TEXT (renderer)) {
+ if (GTK.GTK_IS_CELL_RENDERER_TEXT (renderer)) {
textRenderer = renderer;
break;
}
@@ -2010,21 +2023,22 @@ long gtk_button_press_event (long widget, long event) {
double [] eventX = new double [1];
double [] eventY = new double [1];
GDK.gdk_event_get_coords(event, eventX, eventY);
+
int eventType = GDK.gdk_event_get_event_type(event);
- eventType = fixGdkEventTypeValues(eventType);
+
int [] eventButton = new int [1];
+ int [] eventState = new int [1];
GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
+
+
long eventGdkResource = gdk_event_get_surface_or_window(event);
- if (GTK.GTK4) {
- if (eventGdkResource != gtk_widget_get_surface (handle)) return 0;
- } else {
- if (eventGdkResource != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
- }
+ if (eventGdkResource != GTK3.gtk_tree_view_get_bin_window (handle)) return 0;
+
long result = super.gtk_button_press_event (widget, event);
if (result != 0) return result;
/*
@@ -2036,7 +2050,7 @@ long gtk_button_press_event (long widget, long event) {
if ((state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect) &&
!OS.isX11() && eventType == GDK.GDK_BUTTON_PRESS) { // Wayland
// check to see if there is another event coming in that is not a double/triple click, this is to prevent Bug 514531
- long nextEvent = gdk_event_peek ();
+ long nextEvent = GDK.gdk_event_peek();
if (nextEvent == 0) {
long [] path = new long [1];
long selection = GTK.gtk_tree_view_get_selection (handle);
@@ -2119,16 +2133,16 @@ long gtk_button_press_event (long widget, long event) {
}
@Override
-long gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
- if (n_press == 1) return 0;
- long widget = GTK.gtk_event_controller_get_widget(gesture);
- long result = gtk_button_press_event (widget, event);
+void gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
+ if (n_press == 1) return;
+ super.gtk_gesture_press_event(gesture, n_press, x, y, event);
+
+ // TODO: GTK4 replicate gtk_button_press_event functions
if (n_press == 2 && rowActivated) {
sendTreeDefaultSelection ();
rowActivated = false;
}
- return result;
}
@Override
@@ -2141,28 +2155,46 @@ long gtk_row_activated (long tree, long path, long column) {
@Override
long gtk_key_press_event (long widget, long event) {
int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
- keyPressDefaultSelectionHandler (event, key[0]);
- return super.gtk_key_press_event (widget, event);
-}
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ }
-/**
- * Used to emulate DefaultSelection event. See Bug 312568.
- * @param event the gtk key press event that was fired.
- */
-void keyPressDefaultSelectionHandler (long event, int key) {
- int keymask = gdk_event_get_state (event);
- switch (key) {
+ switch (key[0]) {
case GDK.GDK_Return:
// Send DefaultSelectionEvent when:
// when : Enter, Shift+Enter, Ctrl+Enter are pressed.
// Not when: Alt+Enter, (Meta|Super|Hyper)+Enter, reason is stateMask is not provided on Gtk.
// Note: alt+Enter creates a selection on GTK, but we filter it out to be a bit more consitent Win32 (521387)
+ int keymask = gdk_event_get_state (event);
if ((keymask & (GDK.GDK_SUPER_MASK | GDK.GDK_META_MASK | GDK.GDK_HYPER_MASK | GDK.GDK_MOD1_MASK)) == 0) {
sendTreeDefaultSelection ();
}
break;
+ case GDK.GDK_space:
+ if ((style & SWT.CHECK) != 0) {
+ TableItem[] selected = getSelection();
+ for (int i = 0; i < selected.length; i++) {
+ toggleItemAndSendEvent(selected[i]);
+ }
+
+ // Maintain current selection by stopping additional handling to GDK_space event
+ return 1;
+ }
+ break;
}
+
+ return super.gtk_key_press_event (widget, event);
+}
+
+private void toggleItemAndSendEvent(TableItem item) {
+ item.setChecked (!item.getChecked ());
+
+ Event event = new Event ();
+ event.detail = SWT.CHECK;
+ event.item = item;
+ sendSelectionEvent (SWT.Selection, event, false);
}
/**
@@ -2190,19 +2222,31 @@ void sendTreeDefaultSelection() {
long gtk_button_release_event (long widget, long event) {
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+ if (GTK.GTK4) {
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ }
+
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
+ int [] eventState = new int [1];
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(event);
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+ }
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
+
long eventGdkResource = gdk_event_get_surface_or_window(event);
if (GTK.GTK4) {
if (eventGdkResource != gtk_widget_get_surface (handle)) return 0;
} else {
- if (eventGdkResource != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
+ if (eventGdkResource != GTK3.gtk_tree_view_get_bin_window (handle)) return 0;
}
// Check region since super.gtk_button_release_event() isn't called
lastInput.x = (int) eventX[0];
@@ -2226,8 +2270,8 @@ long gtk_button_release_event (long widget, long event) {
if ((eventState[0] & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) {
GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false);
}
- // Check to see if there has been a new tree item selected when holding Control in Path.
- // If not, deselect the item.
+ // Check to see if there has been a new tree item selected when holding Control in Path.
+ // If not, deselect the item.
if ((eventState[0] & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) {
GTK.gtk_tree_selection_unselect_path (selection,path[0]);
}
@@ -2257,7 +2301,7 @@ void drawInheritedBackground (long cairo) {
gdkResource = gtk_widget_get_surface(handle);
gdk_surface_get_size (gdkResource, width, height);
} else {
- gdkResource = GTK.gtk_tree_view_get_bin_window (handle);
+ gdkResource = GTK3.gtk_tree_view_get_bin_window (handle);
gdk_window_get_size (gdkResource, width, height);
}
int bottom = 0;
@@ -2272,7 +2316,7 @@ void drawInheritedBackground (long cairo) {
OS.g_free (iter);
}
if (height [0] > bottom) {
- drawBackground (control, gdkResource, cairo, 0, 0, bottom, width [0], height [0] - bottom);
+ drawBackground (control, gdkResource, cairo, 0, bottom, width [0], height [0] - bottom);
}
}
}
@@ -2292,7 +2336,7 @@ long gtk_draw (long widget, long cairo) {
* If the table was resized since the last paint, we ignore this draw request
* and queue another draw request so that the pixel cache is properly invalidated.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && ownerDraw && haveBoundsChanged) {
+ if (ownerDraw && haveBoundsChanged) {
GTK.gtk_widget_queue_draw(handle);
return 0;
}
@@ -2307,28 +2351,12 @@ long gtk_motion_notify_event (long widget, long event) {
if (surface != gtk_widget_get_surface(handle)) return 0;
} else {
long window = GDK.GDK_EVENT_WINDOW (event);
- if (window != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
+ if (window != GTK3.gtk_tree_view_get_bin_window (handle)) return 0;
}
return super.gtk_motion_notify_event (widget, event);
}
@Override
-long gtk_row_deleted (long model, long path) {
- if (ignoreAccessibility) {
- OS.g_signal_stop_emission_by_name (model, OS.row_deleted);
- }
- return 0;
-}
-
-@Override
-long gtk_row_inserted (long model, long path, long iter) {
- if (ignoreAccessibility) {
- OS.g_signal_stop_emission_by_name (model, OS.row_inserted);
- }
- return 0;
-}
-
-@Override
long gtk_scroll_event (long widget, long eventPtr) {
long result = super.gtk_scroll_event(widget, eventPtr);
if (!wasScrolled) wasScrolled = true;
@@ -2352,11 +2380,7 @@ long gtk_toggled (long renderer, long pathStr) {
int [] index = new int [1];
C.memmove (index, indices, 4);
TableItem item = _getItem (index [0]);
- item.setChecked (!item.getChecked ());
- Event event = new Event ();
- event.detail = SWT.CHECK;
- event.item = item;
- sendSelectionEvent (SWT.Selection, event, false);
+ toggleItemAndSendEvent(item);
}
GTK.gtk_tree_path_free (path);
return 0;
@@ -2411,10 +2435,6 @@ void hookEvents () {
OS.g_signal_connect_closure (checkRenderer, OS.toggled, display.getClosure (TOGGLED), false);
}
OS.g_signal_connect_closure (handle, OS.start_interactive_search, display.getClosure (START_INTERACTIVE_SEARCH), false);
- if (fixAccessibility ()) {
- OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.getClosure (ROW_INSERTED), true);
- OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.getClosure (ROW_DELETED), true);
- }
}
/**
@@ -2525,7 +2545,7 @@ boolean mnemonicMatch (char key) {
long paintWindow () {
GTK.gtk_widget_realize (handle);
// TODO: this function has been removed on GTK4
- return GTK.gtk_tree_view_get_bin_window (handle);
+ return GTK3.gtk_tree_view_get_bin_window (handle);
}
@Override
@@ -2535,7 +2555,7 @@ void propagateDraw (long container, long cairo) {
* "noChildDrawing" widgets might still be partially drawn.
*/
super.propagateDraw(container, cairo);
- if (headerVisible && noChildDrawing != null && wasScrolled) {
+ if (headerVisible && noChildDrawing && wasScrolled) {
for (TableColumn column : columns) {
if (column != null) {
GTK.gtk_widget_queue_draw(column.buttonHandle);
@@ -2687,9 +2707,6 @@ public void remove (int start, int end) {
long selection = GTK.gtk_tree_view_get_selection (handle);
long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
if (iter == 0) error (SWT.ERROR_NO_HANDLES);
- if (fixAccessibility ()) {
- ignoreAccessibility = true;
- }
int index = -1;
for (index = start; index <= end; index++) {
if (index == start) GTK.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index);
@@ -2699,10 +2716,6 @@ public void remove (int start, int end) {
GTK.gtk_list_store_remove (modelHandle, iter);
OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
}
- if (fixAccessibility ()) {
- ignoreAccessibility = false;
- OS.g_object_notify (handle, OS.model);
- }
OS.g_free (iter);
index = end + 1;
System.arraycopy (items, index, items, start, itemCount - index);
@@ -2740,9 +2753,6 @@ public void remove (int [] indices) {
int last = -1;
long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
if (iter == 0) error (SWT.ERROR_NO_HANDLES);
- if (fixAccessibility ()) {
- ignoreAccessibility = true;
- }
for (int i=0; i<newIndices.length; i++) {
int index = newIndices [i];
if (index != last) {
@@ -2767,10 +2777,6 @@ public void remove (int [] indices) {
last = index;
}
}
- if (fixAccessibility ()) {
- ignoreAccessibility = false;
- OS.g_object_notify (handle, OS.model);
- }
OS.g_free (iter);
}
@@ -2795,9 +2801,6 @@ public void removeAll () {
itemCount = 0;
long selection = GTK.gtk_tree_view_get_selection (handle);
OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
- if (fixAccessibility ()) {
- ignoreAccessibility = true;
- }
/*
* Bug 499850: On GTK3, calling gtk_list_store_clear with GtkSelectionMode GTK_SELECTION_MULTIPLE
* takes exponential time. Temporarily change the mode GTK_SELECTION_BROWSE before
@@ -2809,10 +2812,6 @@ public void removeAll () {
GTK.gtk_list_store_clear (modelHandle);
if (changeMode) GTK.gtk_tree_selection_set_mode(selectionHandle, GTK.GTK_SELECTION_MULTIPLE);
- if (fixAccessibility ()) {
- ignoreAccessibility = false;
- OS.g_object_notify (handle, OS.model);
- }
OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
resetCustomDraw ();
@@ -2929,7 +2928,7 @@ long rendererSnapshotProc (long cell, long snapshot, long widget, long backgroun
GdkRectangle gdkRectangle = new GdkRectangle ();
OS.memmove(gdkRectangle, background_area, GdkRectangle.sizeof);
Graphene.graphene_rect_init(rect, gdkRectangle.x, gdkRectangle.y, gdkRectangle.width, gdkRectangle.height);
- long cairo = GTK.gtk_snapshot_append_cairo(snapshot, rect);
+ long cairo = GTK4.gtk_snapshot_append_cairo(snapshot, rect);
rendererRender (cell, cairo, snapshot, widget, background_area, cell_area, 0, flags);
return 0;
}
@@ -2962,9 +2961,34 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
}
}
}
+
+ GdkRectangle rendererRect = new GdkRectangle ();
+ GdkRectangle columnRect = new GdkRectangle ();
+ int y_offset;
+ {
+ /*
+ * SWT creates multiple renderers (kind of sub-columns) per column.
+ * For example: one for checkbox, one for image, one for text.
+ * 'background_area' argument in this function is area of currently
+ * painted renderer. However, for SWT.EraseItem and SWT.PaintItem,
+ * SWT wants entire column's area along with the event. There's api
+ * 'gtk_tree_view_get_background_area()' but it calculates item's
+ * rect in control, which will have wrong Y if item is rendered
+ * separately (for example, for drag image).
+ * The workaround is to take X range from api and Y range from argument.
+ */
+ OS.memmove (rendererRect, background_area, GdkRectangle.sizeof);
+
+ long path = GTK.gtk_tree_model_get_path (modelHandle, iter);
+ GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, columnRect);
+ GTK.gtk_tree_path_free (path);
+
+ y_offset = columnRect.y - rendererRect.y;
+ columnRect.y -= y_offset;
+ }
+
if (item != null) {
- if (GTK.GTK_IS_CELL_RENDERER_TOGGLE (cell) ||
- ( (GTK.GTK_IS_CELL_RENDERER_PIXBUF (cell) || GTK.GTK_VERSION > OS.VERSION(3, 13, 0)) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) {
+ if (GTK.GTK_IS_CELL_RENDERER_TOGGLE (cell) || (columnIndex != 0 || (style & SWT.CHECK) == 0)) {
drawFlags = (int)flags;
drawState = SWT.FOREGROUND;
long [] ptr = new long [1];
@@ -2982,17 +3006,7 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if ((flags & GTK.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED;
}
- GdkRectangle rect = new GdkRectangle ();
- long path = GTK.gtk_tree_model_get_path (modelHandle, iter);
- GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
- GTK.gtk_tree_path_free (path);
- // A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117
- if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
- GdkRectangle r2 = new GdkRectangle ();
- GDK.gdk_cairo_get_clip_rectangle (cr, r2);
- rect.x = r2.x;
- rect.width = r2.width;
- }
+ Rectangle rect = columnRect.toRectangle ();
if ((drawState & SWT.SELECTED) == 0) {
if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
Control control = findBackgroundControl ();
@@ -3000,7 +3014,7 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if (cr != 0) {
Cairo.cairo_save (cr);
}
- drawBackground (control, 0, cr, 0, rect.x, rect.y, rect.width, rect.height);
+ drawBackground (control, 0, cr, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
}
@@ -3038,27 +3052,36 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if (cr != 0) {
GdkRectangle r = new GdkRectangle();
GDK.gdk_cairo_get_clip_rectangle(cr, r);
- Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, r.y, r.width, r.height));
+ Rectangle rect2 = DPIUtil.autoScaleDown(rect);
// Caveat: rect2 is necessary because GC#setClipping(Rectangle) got broken by bug 446075
gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height);
-
- if (GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
- rect.width = r.width;
- }
} else {
- Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, rect.y, rect.width, rect.height));
+ Rectangle rect2 = DPIUtil.autoScaleDown(rect);
// Caveat: rect2 is necessary because GC#setClipping(Rectangle) got broken by bug 446075
gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height);
}
+
+ // SWT.PaintItem/SWT.EraseItem often expect that event.y matches
+ // what 'event.item.getBounds()' returns. The workaround is to
+ // adjust coordinate system temporarily.
Event event = new Event ();
- event.item = item;
- event.index = columnIndex;
- event.gc = gc;
- event.detail = drawState;
- Rectangle eventRect = new Rectangle (rect.x, rect.y, rect.width, rect.height);
- event.setBounds (DPIUtil.autoScaleDown (eventRect));
- sendEvent (SWT.EraseItem, event);
+ try {
+ Rectangle eventRect = new Rectangle (rect.x, rect.y, rect.width, rect.height);
+
+ eventRect.y += y_offset;
+ Cairo.cairo_translate (cr, 0, -y_offset);
+
+ event.item = item;
+ event.index = columnIndex;
+ event.gc = gc;
+ event.detail = drawState;
+ event.setBounds (DPIUtil.autoScaleDown (eventRect));
+ sendEvent (SWT.EraseItem, event);
+ } finally {
+ Cairo.cairo_translate (cr, 0, y_offset);
+ }
+
drawForegroundRGBA = null;
drawState = event.doit ? event.detail : 0;
drawFlags &= ~(GTK.GTK_CELL_RENDERER_FOCUSED | GTK.GTK_CELL_RENDERER_SELECTED);
@@ -3087,9 +3110,7 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if ((drawState & SWT.BACKGROUND) != 0 && (drawState & SWT.SELECTED) == 0) {
GC gc = getGC(cr);
gc.setBackground (item.getBackground (columnIndex));
- GdkRectangle rect = new GdkRectangle ();
- OS.memmove (rect, background_area, GdkRectangle.sizeof);
- gc.fillRectangle(DPIUtil.autoScaleDown(new Rectangle(rect.x, rect.y, rect.width, rect.height)));
+ gc.fillRectangle (DPIUtil.autoScaleDown (rendererRect.toRectangle ()));
gc.dispose ();
}
if ((drawState & SWT.FOREGROUND) != 0 || GTK.GTK_IS_CELL_RENDERER_TOGGLE (cell)) {
@@ -3115,17 +3136,7 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if (GTK.GTK_IS_CELL_RENDERER_TEXT (cell)) {
if (hooks (SWT.PaintItem)) {
if (wasSelected) drawState |= SWT.SELECTED;
- GdkRectangle rect = new GdkRectangle ();
- long path = GTK.gtk_tree_model_get_path (modelHandle, iter);
- GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
- GTK.gtk_tree_path_free (path);
- // A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117
- if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
- GdkRectangle r2 = new GdkRectangle ();
- GDK.gdk_cairo_get_clip_rectangle (cr, r2);
- rect.x = r2.x;
- rect.width = r2.width;
- }
+ Rectangle rect = columnRect.toRectangle ();
ignoreSize = true;
int [] contentX = new int [1], contentWidth = new int [1];
gtk_cell_renderer_get_preferred_size (cell, handle, contentWidth, null);
@@ -3142,12 +3153,6 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
}
imageWidth = bounds.width;
}
- // On gtk < 3.14.8 the clip rectangle does not have image area into clip rectangle
- // need to adjust clip rectangle with image width
- if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
- rect.x -= imageWidth;
- rect.width +=imageWidth;
- }
contentX [0] -= imageWidth;
contentWidth [0] += imageWidth;
GC gc = getGC(cr);
@@ -3175,18 +3180,30 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
gc.setFont (item.getFont (columnIndex));
if ((style & SWT.MIRRORED) != 0) rect.x = getClientWidth () - rect.width - rect.x;
- Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, rect.y, rect.width, rect.height));
+ Rectangle rect2 = DPIUtil.autoScaleDown(rect);
// Caveat: rect2 is necessary because GC#setClipping(Rectangle) got broken by bug 446075
gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height);
+ // SWT.PaintItem/SWT.EraseItem often expect that event.y matches
+ // what 'event.item.getBounds()' returns. The workaround is to
+ // adjust coordinate system temporarily.
Event event = new Event ();
- event.item = item;
- event.index = columnIndex;
- event.gc = gc;
- Rectangle eventRect = new Rectangle (rect.x + contentX [0], rect.y, contentWidth [0], rect.height);
- event.setBounds (DPIUtil.autoScaleDown (eventRect));
- event.detail = drawState;
- sendEvent (SWT.PaintItem, event);
+ try {
+ Rectangle eventRect = new Rectangle (rect.x + contentX [0], rect.y, contentWidth [0], rect.height);
+
+ eventRect.y += y_offset;
+ Cairo.cairo_translate (cr, 0, -y_offset);
+
+ event.item = item;
+ event.index = columnIndex;
+ event.gc = gc;
+ event.detail = drawState;
+ event.setBounds (DPIUtil.autoScaleDown (eventRect));
+ sendEvent (SWT.PaintItem, event);
+ } finally {
+ Cairo.cairo_translate (cr, 0, y_offset);
+ }
+
gc.dispose();
}
}
@@ -3395,21 +3412,15 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
background = rgba;
}
GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "treeview" : "GtkTreeView";
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
+ String css = "treeview {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"+
+ "treeview:selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
- // Cache background color
- cssBackground = css;
+ // Cache background color
+ cssBackground = css;
- // Apply background color and any foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css(context, finalCss);
- } else {
- super.setBackgroundGdkRGBA(context, handle, rgba);
- GTK.gtk_widget_override_background_color(handle, GTK.GTK_STATE_FLAG_SELECTED, selectedBackground);
- }
+ // Apply background color and any foreground color
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css(context, finalCss);
}
@Override
@@ -3495,13 +3506,9 @@ void setFontDescription (long font) {
@Override
void setForegroundGdkRGBA (GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- foreground = rgba;
- GdkRGBA toSet = rgba == null ? display.COLOR_LIST_FOREGROUND_RGBA : rgba;
- setForegroundGdkRGBA (handle, toSet);
- } else {
- super.setForegroundGdkRGBA(rgba);
- }
+ foreground = rgba;
+ GdkRGBA toSet = rgba == null ? display.COLOR_LIST_FOREGROUND_RGBA : rgba;
+ setForegroundGdkRGBA (handle, toSet);
}
/**
@@ -3526,39 +3533,49 @@ void setForegroundGdkRGBA (GdkRGBA rgba) {
public void setHeaderBackground(Color color) {
checkWidget();
if (color != null) {
- if (color.isDisposed())
- error(SWT.ERROR_INVALID_ARGUMENT);
- if (color.equals(headerBackground))
- return;
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.equals(headerBackground)) return;
}
headerBackground = color;
- GdkRGBA background;
+
+ updateHeaderCSS();
+}
+
+void updateHeaderCSS() {
+ StringBuilder css = new StringBuilder("button {");
if (headerBackground != null) {
- background = headerBackground.handle;
- } else {
- background = defaultBackground();
+ /*
+ * Bug 571466: On some platforms & themes, the 'background-image'
+ * css tag also needs to be set in order to change the
+ * background color. Using 'background' tag as it overrides both
+ * 'background-image' and 'background-color'.
+ */
+ css.append("background: " + display.gtk_rgba_to_css_string(headerBackground.handle) + "; ");
}
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "button" : "GtkButton";
- // background works for 3.18 and later, background-color only as of 3.20
- String css = name + " {background: " + display.gtk_rgba_to_css_string(background) + ";}\n";
- headerCSSBackground = css;
- String finalCss = display.gtk_css_create_css_color_string (headerCSSBackground, headerCSSForeground, SWT.BACKGROUND);
- for (TableColumn column : columns) {
- if (column != null) {
- long context = GTK.gtk_widget_get_style_context(column.buttonHandle);
- // Create provider as we need it attached to the proper context which is not the widget one
- long provider = GTK.gtk_css_provider_new ();
- GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref (provider);
- if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1);
- } else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1, null);
+ if (headerForeground != null) {
+ css.append("color: " + display.gtk_rgba_to_css_string(headerForeground.handle) + "; ");
+ }
+ css.append("}\n");
+
+ if (columnCount == 0) {
+ long buttonHandle = GTK.gtk_tree_view_column_get_button(GTK.gtk_tree_view_get_column(handle, 0));
+ if (headerCSSProvider == 0) {
+ headerCSSProvider = GTK.gtk_css_provider_new();
+ GTK.gtk_style_context_add_provider(GTK.gtk_widget_get_style_context(buttonHandle), headerCSSProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+
+ if (GTK.GTK4) {
+ GTK4.gtk_css_provider_load_from_data(headerCSSProvider, Converter.javaStringToCString(css.toString()), -1);
+ } else {
+ GTK3.gtk_css_provider_load_from_data(headerCSSProvider, Converter.javaStringToCString(css.toString()), -1, null);
+ }
+ } else {
+ for (TableColumn column : columns) {
+ if (column != null) {
+ column.setHeaderCSS(css.toString());
}
- GTK.gtk_style_context_invalidate(context);
}
}
- // Redraw not necessary, GTK handles the CSS update.
}
/**
@@ -3580,41 +3597,15 @@ public void setHeaderBackground(Color color) {
* </ul>
* @since 3.106
*/
-public void setHeaderForeground (Color color) {
+public void setHeaderForeground(Color color) {
checkWidget();
if (color != null) {
- if (color.isDisposed())
- error(SWT.ERROR_INVALID_ARGUMENT);
- if (color.equals(headerForeground))
- return;
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.equals(headerForeground)) return;
}
headerForeground = color;
- GdkRGBA foreground;
- if (headerForeground != null) {
- foreground = headerForeground.handle;
- } else {
- foreground = display.COLOR_LIST_FOREGROUND_RGBA;
- }
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "button" : "GtkButton";
- String css = name + " {color: " + display.gtk_rgba_to_css_string(foreground) + ";}";
- headerCSSForeground = css;
- String finalCss = display.gtk_css_create_css_color_string (headerCSSBackground, headerCSSForeground, SWT.FOREGROUND);
- for (TableColumn column : columns) {
- if (column != null) {
- long context = GTK.gtk_widget_get_style_context(column.buttonHandle);
- // Create provider as we need it attached to the proper context which is not the widget one
- long provider = GTK.gtk_css_provider_new ();
- GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref (provider);
- if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1);
- } else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1, null);
- }
- GTK.gtk_style_context_invalidate(context);
- }
- }
- // Redraw not necessary, GTK handles the CSS update.
+
+ updateHeaderCSS();
}
/**
@@ -3666,16 +3657,9 @@ public void setItemCount (int count) {
if (isVirtual) {
long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
if (iter == 0) error (SWT.ERROR_NO_HANDLES);
- if (fixAccessibility ()) {
- ignoreAccessibility = true;
- }
for (int i=itemCount; i<count; i++) {
GTK.gtk_list_store_append (modelHandle, iter);
}
- if (fixAccessibility ()) {
- ignoreAccessibility = false;
- OS.g_object_notify (handle, OS.model);
- }
OS.g_free (iter);
itemCount = count;
} else {
@@ -3714,10 +3698,6 @@ void setModel (long newModel) {
OS.g_object_unref (modelHandle);
modelHandle = newModel;
display.addWidget (modelHandle, this);
- if (fixAccessibility ()) {
- OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.getClosure (ROW_INSERTED), true);
- OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.getClosure (ROW_DELETED), true);
- }
}
@Override
@@ -3750,16 +3730,15 @@ void setParentGdkResource (Control child) {
* signal using gtk_container_propagate_draw(). See bug 531928.
*/
if (GTK.GTK4) {
- long parentGdkSurface = eventSurface ();
- GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
+ // long parentGdkSurface = eventSurface ();
+ // TODO: GTK4 no gtk_widget_set_parent_surface
+ // GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
// TODO: implement connectFixedHandleDraw with the "snapshot" signal
} else {
long parentGdkWindow = eventWindow ();
- GTK.gtk_widget_set_parent_window (child.topHandle(), parentGdkWindow);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0)) {
- hasChildren = true;
- connectFixedHandleDraw();
- }
+ GTK3.gtk_widget_set_parent_window (child.topHandle(), parentGdkWindow);
+ hasChildren = true;
+ connectFixedHandleDraw();
}
}
@@ -4146,23 +4125,26 @@ public void showSelection () {
@Override
void updateScrollBarValue (ScrollBar bar) {
super.updateScrollBarValue (bar);
- /*
- * Bug in GTK. Scrolling changes the XWindow position
- * and makes the child widgets appear to scroll even
- * though when queried their position is unchanged.
- * The fix is to queue a resize event for each child to
- * force the position to be corrected.
- */
- long parentHandle = parentingHandle ();
- long list = GTK.gtk_container_get_children (parentHandle);
- if (list == 0) return;
- long temp = list;
- while (temp != 0) {
- long widget = OS.g_list_data (temp);
- if (widget != 0) GTK.gtk_widget_queue_resize (widget);
- temp = OS.g_list_next (temp);
+
+ if (!GTK.GTK4) {
+ /*
+ * Bug in GTK. Scrolling changes the XWindow position
+ * and makes the child widgets appear to scroll even
+ * though when queried their position is unchanged.
+ * The fix is to queue a resize event for each child to
+ * force the position to be corrected.
+ */
+ long parentHandle = parentingHandle ();
+ long list = GTK3.gtk_container_get_children (parentHandle);
+ if (list == 0) return;
+ long temp = list;
+ while (temp != 0) {
+ long widget = OS.g_list_data (temp);
+ if (widget != 0) GTK.gtk_widget_queue_resize (widget);
+ temp = OS.g_list_next (temp);
+ }
+ OS.g_list_free (list);
}
- OS.g_list_free (list);
}
@Override
@@ -4175,15 +4157,12 @@ long windowProc (long handle, long arg0, long user_data) {
*/
if (hasChildren) {
/*
- * If headers are visible, set noChildDrawing to their
- * dimensions -- this will prevent any child widgets from drawing
+ * If headers are visible, set noChildDrawing to true
+ * this will prevent any child widgets from drawing
* over the header buttons. See bug 535978.
*/
if (headerVisible) {
- GdkRectangle rect = new GdkRectangle ();
- GDK.gdk_cairo_get_clip_rectangle (arg0, rect);
- // -1's is for the 1px of padding between the fixedHandle and handle
- noChildDrawing = new Rectangle(0, 0, rect.width - 1, this.headerHeight - 1);
+ noChildDrawing = true;
}
propagateDraw(handle, arg0);
}
@@ -4199,11 +4178,11 @@ long windowProc (long handle, long arg0, long user_data) {
if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
Control control = findBackgroundControl ();
if (control != null) {
- long window = GTK.gtk_tree_view_get_bin_window (handle);
- if (window == GTK.gtk_widget_get_window(handle)) {
+ long window = GTK3.gtk_tree_view_get_bin_window (handle);
+ if (window == GTK3.gtk_widget_get_window(handle)) {
GdkRectangle rect = new GdkRectangle ();
GDK.gdk_cairo_get_clip_rectangle (arg0, rect);
- drawBackground (control, window, arg0, 0, rect.x, rect.y, rect.width, rect.height);
+ drawBackground (control, window, arg0, rect.x, rect.y, rect.width, rect.height);
}
}
}
@@ -4228,7 +4207,7 @@ Point resizeCalculationsGTK3 (long widget, int width, int height) {
* In the error case, the SWT fixed which contains the table still resizes as expected,
* and the horizontal scrollbar is only partially visible so that it doesn't overlap with table headers.
*/
- if (widget == scrolledHandle && GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && getHeaderVisible()) {
+ if (widget == scrolledHandle && getHeaderVisible()) {
int hScrollBarHeight = hScrollBarWidth(); // this actually returns height
if (hScrollBarHeight > 0) {
sizes.y = Math.max(sizes.y, getHeaderHeight() + hScrollBarHeight + (getBorderWidth() * 2));
@@ -4264,4 +4243,14 @@ void checkSetDataInProcessBeforeRemoval(int start, int end) {
}
}
}
+
+@Override
+public void dispose() {
+ super.dispose();
+
+ if (headerCSSProvider != 0) {
+ OS.g_object_unref(headerCSSProvider);
+ headerCSSProvider = 0;
+ }
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java
index 47cf8f6ff9..5af05f7948 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a column in a table widget.
@@ -39,6 +41,7 @@ import org.eclipse.swt.internal.gtk.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class TableColumn extends Item {
+ long headerButtonCSSProvider = 0;
long labelHandle, imageHandle, buttonHandle;
Table parent;
int modelIndex, lastButton, lastTime, lastX, lastWidth;
@@ -338,6 +341,11 @@ int getWidthInPixels () {
@Override
long gtk_clicked (long widget) {
+ if (GTK.GTK4) {
+ sendSelectionEvent(SWT.Selection);
+ return 0;
+ }
+
/*
* There is no API to get a double click on a table column. Normally, when
* the mouse is double clicked, this is indicated by GDK_2BUTTON_PRESS
@@ -347,10 +355,15 @@ long gtk_clicked (long widget) {
*/
boolean doubleClick = false;
boolean postEvent = true;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(eventPtr, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(eventPtr);
+ } else {
+ GDK.gdk_event_get_button(eventPtr, eventButton);
+ }
+
int eventType = GDK.gdk_event_get_event_type(eventPtr);
eventType = Control.fixGdkEventTypeValues(eventType);
int eventTime = GDK.gdk_event_get_time(eventPtr);
@@ -378,7 +391,12 @@ long gtk_event_after (long widget, long gdkEvent) {
switch (eventType) {
case GDK.GDK_BUTTON_PRESS: {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(gdkEvent, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(gdkEvent);
+ } else {
+ GDK.gdk_event_get_button(gdkEvent, eventButton);
+ }
+
if (eventButton[0] == 3) {
double [] eventRX = new double [1];
double [] eventRY = new double [1];
@@ -432,10 +450,10 @@ void hookEvents () {
super.hookEvents ();
OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false);
if (buttonHandle != 0) {
- OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [SIZE_ALLOCATE], 0, display.getClosure (SIZE_ALLOCATE), false);
if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
+ //TODO: GTK4 event-after
} else {
+ OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [SIZE_ALLOCATE], 0, display.getClosure (SIZE_ALLOCATE), false);
OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false);
}
}
@@ -602,7 +620,6 @@ public void setAlignment (int alignment) {
void setFontDescription (long font) {
setFontDescription (labelHandle, font);
- setFontDescription (imageHandle, font);
}
@Override
@@ -616,12 +633,22 @@ public void setImage (Image image) {
}
int imageIndex = headerImageList.indexOf (image);
if (imageIndex == -1) imageIndex = headerImageList.add (image);
- long pixbuf = headerImageList.getPixbuf (imageIndex);
- gtk_image_set_from_gicon (imageHandle, pixbuf);
- GTK.gtk_widget_show (imageHandle);
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_image_set_from_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, headerImageList.getSurface(imageIndex));
+ }
+ GTK.gtk_widget_show(imageHandle);
} else {
- gtk_image_set_from_gicon (imageHandle, 0);
- GTK.gtk_widget_hide (imageHandle);
+ if (GTK.GTK4) {
+ GTK4.gtk_image_clear(imageHandle);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, 0);
+ }
+ GTK.gtk_widget_hide(imageHandle);
}
}
@@ -676,7 +703,7 @@ void setOrientation (boolean create) {
if (buttonHandle != 0) {
int dir = (parent.style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
GTK.gtk_widget_set_direction (buttonHandle, dir);
- GTK.gtk_container_forall (buttonHandle, display.setDirectionProc, dir);
+ GTK3.gtk_container_forall (buttonHandle, display.setDirectionProc, dir);
}
}
}
@@ -723,15 +750,11 @@ public void setText (String string) {
*
* @since 3.2
*/
-public void setToolTipText (String string) {
+public void setToolTipText(String string) {
checkWidget();
- Shell shell = parent._getShell ();
- setToolTipText (shell, string);
- toolTipText = string;
-}
-void setToolTipText (Shell shell, String newString) {
- shell.setToolTipText (buttonHandle, newString);
+ toolTipText = string;
+ setToolTipText(buttonHandle, string);
}
/**
@@ -775,24 +798,8 @@ void setWidthInPixels (int width) {
if (width != 0) {
if (buttonHandle != 0) {
if (GTK.GTK4) {
- long surface = GTK.gtk_widget_get_parent_surface (buttonHandle);
- if (surface != 0) {
- long surfaceList = GDK.gdk_surface_get_children (surface);
- if (surfaceList != 0) {
- long surfaces = surfaceList;
- long [] userData = new long [1];
- while (surfaces != 0) {
- long child = OS.g_list_data (surfaces);
- GDK.gdk_surface_get_user_data (child, userData);
- if (userData[0] == buttonHandle) {
- GDK.gdk_surface_lower (child);
- break;
- }
- surfaces = OS.g_list_next (surfaces);
- }
- OS.g_list_free (surfaceList);
- }
- }
+ /* TODO: GTK4 Removed this for time being, as not confirm if this bug still exists. Has to be
+ * removed since the fix requires functions that no longer exist in GTK4. */
} else {
long window = GTK.gtk_widget_get_parent_window (buttonHandle);
if (window != 0) {
@@ -818,4 +825,38 @@ void setWidthInPixels (int width) {
sendEvent (SWT.Resize);
}
+void setHeaderCSS(String css) {
+ if (headerButtonCSSProvider == 0) {
+ headerButtonCSSProvider = GTK.gtk_css_provider_new();
+ GTK.gtk_style_context_add_provider(GTK.gtk_widget_get_style_context(buttonHandle), headerButtonCSSProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+
+ if (GTK.GTK4) {
+ GTK4.gtk_css_provider_load_from_data(headerButtonCSSProvider, Converter.javaStringToCString(css), -1);
+ } else {
+ GTK3.gtk_css_provider_load_from_data(headerButtonCSSProvider, Converter.javaStringToCString(css), -1, null);
+ }
+}
+
+@Override
+public void dispose() {
+ super.dispose();
+
+ if (headerButtonCSSProvider != 0) {
+ OS.g_object_unref(headerButtonCSSProvider);
+ headerButtonCSSProvider = 0;
+ }
+}
+
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ return 0;
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index e3f8da966c..92af154acf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,7 +17,10 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a selectable user interface object
@@ -182,18 +185,21 @@ Color _getForeground (int index) {
return Color.gtk_new(display, gdkRGBA);
}
-Image _getImage (int index) {
- int count = Math.max (1, parent.getColumnCount ());
+Image _getImage(int index) {
+ int count = Math.max(1, parent.getColumnCount());
if (0 > index || index > count - 1) return null;
- long [] ptr = new long [1];
+
+ long[] surfaceHandle = new long[1];
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
- GTK.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_PIXBUF, ptr, -1);
- if (ptr [0] == 0) return null;
- ImageList imageList = parent.imageList;
- int imageIndex = imageList.indexOf (ptr [0]);
- OS.g_object_unref (ptr [0]);
- if (imageIndex == -1) return null;
- return imageList.get (imageIndex);
+ GTK.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_SURFACE, surfaceHandle, -1);
+ if (surfaceHandle[0] == 0) return null;
+
+ int imageIndex = parent.imageList.indexOf(surfaceHandle[0]);
+ if (imageIndex == -1) {
+ return null;
+ } else {
+ return parent.imageList.get(imageIndex);
+ }
}
String _getText (int index) {
@@ -328,18 +334,7 @@ Rectangle getBoundsinPixels () {
gtk_cell_renderer_get_preferred_size (textRenderer, parentHandle, w, null);
parent.ignoreSize = false;
rect.width = w [0];
- int [] buffer = new int [1];
- if (GTK.gtk_tree_view_get_expander_column (parentHandle) == column) {
- if (GTK.GTK4) {
- long image = GTK.gtk_image_new_from_icon_name(GTK.GTK_NAMED_ICON_PAN_DOWN, GTK.GTK_ICON_SIZE_MENU);
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation(image, allocation);
- rect.x += allocation.width + TreeItem.EXPANDER_EXTRA_PADDING;
- } else {
- GTK.gtk_widget_style_get (parentHandle, OS.expander_size, buffer, 0);
- rect.x += buffer [0] + TreeItem.EXPANDER_EXTRA_PADDING;
- }
- }
+
int horizontalSeparator;
if (GTK.GTK4) {
long separator = GTK.gtk_separator_new(GTK.GTK_ORIENTATION_HORIZONTAL);
@@ -347,7 +342,8 @@ Rectangle getBoundsinPixels () {
GTK.gtk_widget_get_allocation(separator, allocation);
horizontalSeparator = allocation.height;
} else {
- GTK.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
+ int[] buffer = new int[1];
+ GTK3.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
horizontalSeparator = buffer[0];
}
rect.x += horizontalSeparator;
@@ -418,9 +414,15 @@ Rectangle getBoundsInPixels (int index) {
GdkRectangle rect = new GdkRectangle ();
GTK.gtk_tree_view_get_cell_area (parentHandle, path, column, rect);
GTK.gtk_tree_path_free (path);
- int [] cw = new int [1], ch = new int [1];
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, cw, ch);
- rect.height = ch [0];
+ int [] columnWidth = new int [1], columnHeight = new int [1];
+ parent.ignoreSize = true;
+ if (GTK.GTK4) {
+ GTK4.gtk_tree_view_column_cell_get_size(column, null, null, columnWidth, columnHeight);
+ } else {
+ GTK3.gtk_tree_view_column_cell_get_size(column, null, null, null, columnWidth, columnHeight);
+ }
+ parent.ignoreSize = false;
+ rect.height = columnHeight [0];
if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x;
if (index == 0 && (parent.style & SWT.CHECK) != 0) {
@@ -780,18 +782,7 @@ Rectangle getTextBoundsInPixels (int index) {
parent.ignoreSize = true;
gtk_cell_renderer_get_preferred_size (textRenderer, parentHandle, w, null);
parent.ignoreSize = false;
- int [] buffer = new int [1];
- if (GTK.gtk_tree_view_get_expander_column (parentHandle) == column) {
- if (GTK.GTK4) {
- long image = GTK.gtk_image_new_from_icon_name(GTK.GTK_NAMED_ICON_PAN_DOWN, GTK.GTK_ICON_SIZE_MENU);
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation(image, allocation);
- rect.x += allocation.width + TreeItem.EXPANDER_EXTRA_PADDING;
- } else {
- GTK.gtk_widget_style_get (parentHandle, OS.expander_size, buffer, 0);
- rect.x += buffer [0] + TreeItem.EXPANDER_EXTRA_PADDING;
- }
- }
+
int horizontalSeparator;
if (GTK.GTK4) {
long separator = GTK.gtk_separator_new(GTK.GTK_ORIENTATION_HORIZONTAL);
@@ -799,7 +790,8 @@ Rectangle getTextBoundsInPixels (int index) {
GTK.gtk_widget_get_allocation(separator, allocation);
horizontalSeparator = allocation.height;
} else {
- GTK.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
+ int[] buffer = new int[1];
+ GTK3.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
horizontalSeparator = buffer[0];
}
rect.x += horizontalSeparator;
@@ -1184,47 +1176,33 @@ public void setGrayed (boolean grayed) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setImage (int index, Image image) {
- checkWidget ();
- if (image != null && image.isDisposed ()) {
+public void setImage(int index, Image image) {
+ checkWidget();
+ if (image != null && image.isDisposed()) {
error(SWT.ERROR_INVALID_ARGUMENT);
}
if (image != null && image.type == SWT.ICON) {
- if (image.equals (_getImage (index))) return;
+ if (image.equals(_getImage(index))) return;
}
- int count = Math.max (1, parent.getColumnCount ());
+ int count = Math.max(1, parent.getColumnCount());
if (0 > index || index > count - 1) return;
- long pixbuf = 0;
+
+ long pixbuf = 0, surface = 0;
if (image != null) {
ImageList imageList = parent.imageList;
- if (imageList == null) imageList = parent.imageList = new ImageList ();
- int imageIndex = imageList.indexOf (image);
- if (imageIndex == -1) imageIndex = imageList.add (image);
- pixbuf = imageList.getPixbuf (imageIndex);
- }
- /*
- * Reset size of pixbufRenderer if we have an image being set that is larger
- * than the current size of the pixbufRenderer. Fix for bug 457196.
- * We only do this if the size of the pixbufRenderer has not yet been set.
- * Otherwise, the pixbufRenderer retains the same size as the first image added.
- * See comment #4, Bug 478560. Note that all columns need to have their
- * pixbufRenderer set to this size after the initial image is set. NOTE: this
- * change has been ported to Tables since Tables/Trees both use the same
- * underlying GTK structure.
- */
- if (DPIUtil.useCairoAutoScale()) {
- /*
- * Bug in GTK the default renderer does scale again on pixbuf.
- * Need to scaledown here and no need to scaledown id device scale is 1
- */
- if ((!parent.ownerDraw) && (image != null) && (DPIUtil.getDeviceZoom() != 100)) {
- Rectangle imgSize = image.getBounds();
- long scaledPixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, imgSize.width, imgSize.height, GDK.GDK_INTERP_BILINEAR);
- if (scaledPixbuf !=0) {
- pixbuf = scaledPixbuf;
- }
+ if (imageList == null) imageList = parent.imageList = new ImageList();
+ int imageIndex = imageList.indexOf(image);
+ // When we create a blank image surface gets created with dimensions 0, 0.
+ // This call recreates the surface with correct dimensions
+ long tempSurface = ImageList.convertSurface(image);
+ Cairo.cairo_surface_destroy(tempSurface);
+ if (imageIndex == -1) {
+ imageIndex = imageList.add(image);
}
+ surface = imageList.getSurface(imageIndex);
+ pixbuf = ImageList.createPixbuf(surface);
}
+
long parentHandle = parent.handle;
long column = GTK.gtk_tree_view_get_column (parentHandle, index);
long pixbufRenderer = parent.getPixbufRenderer (column);
@@ -1261,6 +1239,14 @@ public void setImage (int index, Image image) {
}
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
GTK.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_PIXBUF, pixbuf, -1);
+ /*
+ * Bug 573633: gtk_list_store_set() will reference the handle. So we unref the pixbuf here,
+ * and leave the destruction of the handle to be done later on by the GTK+ tree.
+ */
+ if (pixbuf != 0) {
+ OS.g_object_unref(pixbuf);
+ }
+ GTK.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_SURFACE, surface, -1);
cached = true;
/*
* Bug 465056: single column Tables have a very small initial width.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index 1b52111e33..5ae6df273d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,6 +21,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class are selectable user interface
@@ -71,6 +73,9 @@ public class Text extends Scrollable {
boolean doubleClick;
String message = "";
+ /** GTK4 only field, holds the address to the underlying GtkText widget. */
+ long textHandle;
+
static final char LTR_MARK = '\u200e';
static final char RTL_MARK = '\u200f';
int[] segments;
@@ -154,7 +159,7 @@ public Text (Composite parent, int style) {
* Ensure that SWT.ICON_CANCEL and ICON_SEARCH are set.
* NOTE: ICON_CANCEL has the same value as H_SCROLL and CON_SEARCH has the same value as V_SCROLL
* so it is necessary to first clear these bits to avoid a scroll bar and then reset the
- * bit using the original style upplied by the programmer.
+ * bit using the original style supplied by the programmer.
*
* NOTE2: Default GtkSearchEntry shows both "find" icon and "clear" icon.
* "find" icon can be manually removed here while "clear" icon must be removed depending on text.
@@ -162,18 +167,20 @@ public Text (Composite parent, int style) {
*/
this.style |= SWT.ICON_SEARCH | SWT.ICON_CANCEL;
- if ((style & SWT.ICON_SEARCH) == 0) {
- this.style &= ~SWT.ICON_SEARCH;
- GTK.gtk_entry_set_icon_from_icon_name(handle, GTK.GTK_ENTRY_ICON_PRIMARY, null);
- } else {
- // Default GtkSearchEntry always shows inactive "find" icon
- // make it active and sensitive to be consistent with other platforms
- GTK.gtk_entry_set_icon_activatable(handle, GTK.GTK_ENTRY_ICON_PRIMARY, true);
- GTK.gtk_entry_set_icon_sensitive(handle, GTK.GTK_ENTRY_ICON_PRIMARY, true);
- }
+ if (!GTK.GTK4) {
+ if ((style & SWT.ICON_SEARCH) == 0) {
+ this.style &= ~SWT.ICON_SEARCH;
+ GTK.gtk_entry_set_icon_from_icon_name(handle, GTK.GTK_ENTRY_ICON_PRIMARY, null);
+ } else {
+ // Default GtkSearchEntry always shows inactive "find" icon
+ // make it active and sensitive to be consistent with other platforms
+ GTK.gtk_entry_set_icon_activatable(handle, GTK.GTK_ENTRY_ICON_PRIMARY, true);
+ GTK.gtk_entry_set_icon_sensitive(handle, GTK.GTK_ENTRY_ICON_PRIMARY, true);
+ }
- if ((style & SWT.ICON_CANCEL) == 0) {
- this.style &= ~SWT.ICON_CANCEL;
+ if ((style & SWT.ICON_CANCEL) == 0) {
+ this.style &= ~SWT.ICON_CANCEL;
+ }
}
}
}
@@ -207,70 +214,108 @@ static int checkStyle (int style) {
void createHandle (int index) {
state |= HANDLE | MENU;
if ((style & SWT.READ_ONLY) != 0) {
- if (applyThemeBackground () == 1) {
+ if (applyThemeBackground() == 1) {
state |= THEME_BACKGROUND;
}
}
- fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
+
+ fixedHandle = OS.g_object_new(display.gtk_fixed_get_type (), 0);
+ if (fixedHandle == 0) error(SWT.ERROR_NO_HANDLES);
if ((style & SWT.SINGLE) != 0) {
if ((style & SWT.SEARCH) != 0) {
handle = GTK.gtk_search_entry_new();
} else {
- handle = GTK.gtk_entry_new ();
+ handle = GTK.gtk_entry_new();
+ }
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ textHandle = GTK4.gtk_editable_get_delegate(handle);
+ if ((style & SWT.SEARCH) == 0) {
+ bufferHandle = GTK4.gtk_entry_get_buffer(handle);
+ } else {
+ bufferHandle = GTK4.gtk_text_get_buffer(textHandle);
+ }
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ GTK3.gtk_container_add(fixedHandle, handle);
+
+ GTK3.gtk_entry_set_width_chars(handle, 1);
+ }
+
+ GTK.gtk_editable_set_editable(handle, (style & SWT.READ_ONLY) == 0);
+ if (GTK.GTK4) {
+ GTK4.gtk_text_set_visibility(textHandle, (style & SWT.PASSWORD) == 0);
+ } else {
+ GTK.gtk_entry_set_visibility(handle, (style & SWT.PASSWORD) == 0);
}
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, handle);
- GTK.gtk_editable_set_editable (handle, (style & SWT.READ_ONLY) == 0);
/*
* We need to handle borders differently in GTK3.20+. GtkEntry without frame will have a blank background color.
* So let's set border via css and override the background in this case to be COLOR_LIST_BACKGROUND.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- if ((style & SWT.BORDER) == 0) {
- GTK.gtk_entry_set_has_frame(handle, false);
- long context = GTK.gtk_widget_get_style_context(handle);
- String background = display.gtk_rgba_to_css_string(display.COLOR_LIST_BACKGROUND_RGBA);
- gtk_css_provider_load_from_css(context, "entry {border: solid; background: " + background + ";}");
- GTK.gtk_style_context_invalidate(context);
- }
- } else {
- GTK.gtk_entry_set_has_frame (handle, (style & SWT.BORDER) != 0);
+ if ((style & SWT.BORDER) == 0) {
+ GTK.gtk_entry_set_has_frame(handle, false);
+ long context = GTK.gtk_widget_get_style_context(handle);
+ String background = display.gtk_rgba_to_css_string(display.COLOR_LIST_BACKGROUND_RGBA);
+ gtk_css_provider_load_from_css(context, "entry {border: solid; background: " + background + ";}");
+ if (!GTK.GTK4) GTK3.gtk_style_context_invalidate(context);
}
- GTK.gtk_entry_set_visibility (handle, (style & SWT.PASSWORD) == 0);
+
float alignment = 0.0f;
if ((style & SWT.CENTER) != 0) alignment = 0.5f;
if ((style & SWT.RIGHT) != 0) alignment = 1.0f;
if (alignment > 0.0f) {
- GTK.gtk_entry_set_alignment (handle, alignment);
+ GTK.gtk_entry_set_alignment(handle, alignment);
+ }
+
+ if (DISABLE_EMOJI && GTK.GTK_VERSION >= OS.VERSION(3, 22, 20)) {
+ GTK.gtk_entry_set_input_hints(handle, GTK.GTK_INPUT_HINT_NO_EMOJI);
}
} else {
- scrolledHandle = GTK.gtk_scrolled_window_new (0, 0);
- if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
- handle = GTK.gtk_text_view_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- bufferHandle = GTK.gtk_text_view_get_buffer (handle);
- if (bufferHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, scrolledHandle);
- GTK.gtk_container_add (scrolledHandle, handle);
- GTK.gtk_text_view_set_editable (handle, (style & SWT.READ_ONLY) == 0);
- if ((style & SWT.WRAP) != 0) GTK.gtk_text_view_set_wrap_mode (handle, GTK.GTK_WRAP_WORD_CHAR);
+ if (GTK.GTK4) {
+ scrolledHandle = GTK4.gtk_scrolled_window_new();
+ } else {
+ scrolledHandle = GTK3.gtk_scrolled_window_new(0, 0);
+ }
+ if (scrolledHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ handle = GTK.gtk_text_view_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ bufferHandle = GTK.gtk_text_view_get_buffer(handle);
+ if (bufferHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, scrolledHandle);
+ GTK4.gtk_scrolled_window_set_child(scrolledHandle, handle);
+ } else {
+ GTK3.gtk_container_add(fixedHandle, scrolledHandle);
+ GTK3.gtk_container_add(scrolledHandle, handle);
+ }
+
+ GTK.gtk_text_view_set_editable(handle, (style & SWT.READ_ONLY) == 0);
+ if ((style & SWT.WRAP) != 0) GTK.gtk_text_view_set_wrap_mode(handle, GTK.GTK_WRAP_WORD_CHAR);
+
int hsp = (style & SWT.H_SCROLL) != 0 ? GTK.GTK_POLICY_ALWAYS : GTK.GTK_POLICY_NEVER;
int vsp = (style & SWT.V_SCROLL) != 0 ? GTK.GTK_POLICY_ALWAYS : GTK.GTK_POLICY_NEVER;
- GTK.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
+ GTK.gtk_scrolled_window_set_policy(scrolledHandle, hsp, vsp);
+
if ((style & SWT.BORDER) != 0) {
- GTK.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ if (GTK.GTK4) {
+ GTK4.gtk_scrolled_window_set_has_frame(scrolledHandle, true);
+ } else {
+ GTK3.gtk_scrolled_window_set_shadow_type(scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ }
}
- int just = GTK.GTK_JUSTIFY_LEFT;
- if ((style & SWT.CENTER) != 0) just = GTK.GTK_JUSTIFY_CENTER;
- if ((style & SWT.RIGHT) != 0) just = GTK.GTK_JUSTIFY_RIGHT;
- GTK.gtk_text_view_set_justification (handle, just);
+
+ int justification = GTK.GTK_JUSTIFY_LEFT;
+ if ((style & SWT.CENTER) != 0) justification = GTK.GTK_JUSTIFY_CENTER;
+ if ((style & SWT.RIGHT) != 0) justification = GTK.GTK_JUSTIFY_RIGHT;
+ GTK.gtk_text_view_set_justification(handle, justification);
}
+
imContext = OS.imContextLast();
- if ((style & SWT.SINGLE) != 0) {
- GTK.gtk_entry_set_width_chars(handle, 1);
- }
+
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
// reset to default font to get the usual behavior
setFontDescription(defaultFont().handle);
@@ -489,7 +534,12 @@ void applySegments () {
separator [0] = segmentsChars [i];
}
byte [] buffer = Converter.wcsToMbcs (separator, false);
- long ptr = GTK.gtk_entry_get_text (handle);
+ long ptr;
+ if (GTK.GTK4) {
+ ptr = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ ptr = GTK3.gtk_entry_get_text(handle);
+ }
pos [0] = (int)OS.g_utf16_offset_to_utf8_offset (ptr, pos [0]);
GTK.gtk_editable_insert_text (handle, buffer, buffer.length, pos);
}
@@ -526,7 +576,12 @@ void clearSegments (boolean applyText) {
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
if (applyText) {
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT);
- long ptr = GTK.gtk_entry_get_text (handle);
+ long ptr;
+ if (GTK.GTK4) {
+ ptr = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ ptr = GTK3.gtk_entry_get_text(handle);
+ }
int start, end;
for (int i = 0; i < nSegments; i++) {
start = (int)OS.g_utf16_offset_to_utf8_offset (ptr, segments[i]);
@@ -583,11 +638,17 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
- int[] w = new int [1], h = new int [1];
+ int[] w = new int[1], h = new int[1];
if ((style & SWT.SINGLE) != 0) {
- GTK.gtk_widget_realize (handle);
- long layout = GTK.gtk_entry_get_layout (handle);
- OS.pango_layout_get_pixel_size (layout, w, h);
+ long layout;
+ if (GTK.GTK4) {
+ long context = GTK.gtk_widget_get_pango_context(handle);
+ layout = OS.pango_layout_new(context);
+ } else {
+ GTK.gtk_widget_realize(handle);
+ layout = GTK3.gtk_entry_get_layout(handle);
+ }
+ OS.pango_layout_get_pixel_size(layout, w, h);
} else {
byte [] start = new byte [ITER_SIZEOF], end = new byte [ITER_SIZEOF];
GTK.gtk_text_buffer_get_bounds (bufferHandle, start, end);
@@ -612,7 +673,7 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
// GtkSearchEntry have more padding than GtkEntry
GtkBorder tmp = new GtkBorder();
long context = GTK.gtk_widget_get_style_context (handle);
- int state_flag = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(handle);
+ int state_flag = GTK.gtk_widget_get_state_flags(handle);
gtk_style_context_get_padding(context, state_flag, tmp);
width += tmp.left + tmp.right;
}
@@ -632,7 +693,7 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
if ((style & SWT.SINGLE) != 0) {
GtkBorder tmp = new GtkBorder();
long context = GTK.gtk_widget_get_style_context (handle);
- int state_flag = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(handle);
+ int state_flag = GTK.gtk_widget_get_state_flags(handle);
gtk_style_context_get_padding(context, state_flag, tmp);
trim.x -= tmp.left;
trim.y -= tmp.top;
@@ -644,19 +705,21 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
trim.height += tmp.top + tmp.bottom;
}
if ((style & SWT.BORDER) != 0) {
- int state = GTK.GTK_VERSION < OS.VERSION(3, 18, 0) ? GTK.GTK_STATE_FLAG_NORMAL : GTK.gtk_widget_get_state_flags(handle);
+ int state = GTK.gtk_widget_get_state_flags(handle);
gtk_style_context_get_border(context, state, tmp);
trim.x -= tmp.left;
trim.y -= tmp.top;
trim.width += tmp.left + tmp.right;
trim.height += tmp.top + tmp.bottom;
}
- GdkRectangle icon_area = new GdkRectangle();
- GTK.gtk_entry_get_icon_area(handle, GTK.GTK_ENTRY_ICON_PRIMARY, icon_area);
- trim.x -= icon_area.width;
- trim.width += icon_area.width;
- GTK.gtk_entry_get_icon_area(handle, GTK.GTK_ENTRY_ICON_SECONDARY, icon_area);
- trim.width += icon_area.width;
+ if (!GTK.GTK4 || ((style & SWT.SEARCH) == 0) ) {
+ GdkRectangle icon_area = new GdkRectangle();
+ GTK.gtk_entry_get_icon_area(handle, GTK.GTK_ENTRY_ICON_PRIMARY, icon_area);
+ trim.x -= icon_area.width;
+ trim.width += icon_area.width;
+ GTK.gtk_entry_get_icon_area(handle, GTK.GTK_ENTRY_ICON_SECONDARY, icon_area);
+ trim.width += icon_area.width;
+ }
} else {
int borderWidth = gtk_container_get_border_width_or_margin (handle);
xborder += borderWidth;
@@ -668,9 +731,9 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
*/
if (!GTK.GTK4) {
int [] property = new int [1];
- GTK.gtk_widget_style_get (handle, OS.interior_focus, property, 0);
+ GTK3.gtk_widget_style_get (handle, OS.interior_focus, property, 0);
if (property [0] == 0) {
- GTK.gtk_widget_style_get (handle, OS.focus_line_width, property, 0);
+ GTK3.gtk_widget_style_get (handle, OS.focus_line_width, property, 0);
xborder += property [0];
yborder += property [0];
}
@@ -697,9 +760,13 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
public void copy () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- GTK.gtk_editable_copy_clipboard (handle);
+ if (GTK.GTK4) {
+ GTK4.gtk_widget_activate_action(textHandle, OS.action_copy_clipboard, null);
+ } else {
+ GTK3.gtk_editable_copy_clipboard(handle);
+ }
} else {
- long clipboard = GTK.GTK4 ? GDK.gdk_display_get_clipboard(GDK.gdk_display_get_default()) : GTK.gtk_clipboard_get (GDK.GDK_NONE);;
+ long clipboard = GTK.GTK4 ? GTK4.gtk_widget_get_clipboard(handle) : GTK3.gtk_clipboard_get(GDK.GDK_NONE);
clearSegments (true);
GTK.gtk_text_buffer_copy_clipboard (bufferHandle, clipboard);
applySegments ();
@@ -721,9 +788,13 @@ public void copy () {
public void cut () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- GTK.gtk_editable_cut_clipboard (handle);
+ if (GTK.GTK4) {
+ GTK4.gtk_widget_activate_action(textHandle, OS.action_cut_clipboard, null);
+ } else {
+ GTK3.gtk_editable_cut_clipboard(handle);
+ }
} else {
- long clipboard = GTK.GTK4 ? GDK.gdk_display_get_clipboard(GDK.gdk_display_get_default()) : GTK.gtk_clipboard_get (GDK.GDK_NONE);;
+ long clipboard = GTK.GTK4 ? GTK4.gtk_widget_get_clipboard(handle) : GTK3.gtk_clipboard_get(GDK.GDK_NONE);
clearSegments (true);
GTK.gtk_text_buffer_cut_clipboard (bufferHandle, clipboard, GTK.gtk_text_view_get_editable (handle));
applySegments ();
@@ -768,41 +839,54 @@ GdkRGBA defaultBackground () {
void deregister () {
super.deregister ();
if (bufferHandle != 0) display.removeWidget (bufferHandle);
- long imContext = imContext ();
if (imContext != 0) display.removeWidget (imContext);
}
@Override
boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean [] consume) {
- /**
- * Drag detection on GTKText will not be done in SWT, but fully handled by GTK side.
- * Let GTK handle the DnD logic as it is inherent to that widget as of GTK3.14 and cannot
- * be removed without overriding it. It is better to take the signal from GTK and send it
- * back to SWT instead.
- */
- boolean isDraggable = (GTK.GTK_VERSION < OS.VERSION(3, 14, 0)) ? insideBlockSelection(x, y) : false;
- if (filter) {
- if (isDraggable && super.dragDetect (x, y, filter, dragOnTimeout, consume)) {
- if (consume != null) consume [0] = true;
- return true;
- }
- }
return false;
}
@Override
long eventWindow () {
- return paintWindow ();
+ if ((style & SWT.SINGLE) != 0) {
+ /*
+ * Single-line Text (GtkEntry in GTK) uses a GDK_INPUT_ONLY
+ * internal window. This window can't be used for any kind
+ * of painting, but this is the window to which functions
+ * like Control.setCursor() should apply.
+ */
+ long window = super.paintWindow ();
+ long children = GDK.gdk_window_get_children (window);
+ if (children != 0) {
+ long childrenIterator = children;
+ /*
+ * When search or cancel icons are added to Text, those
+ * icon window(s) are added to the beginning of the list.
+ * In order to always return the correct window for Text,
+ * browse to the end of the list.
+ */
+ do {
+ window = OS.g_list_data (childrenIterator);
+ } while ((childrenIterator = OS.g_list_next (childrenIterator)) != 0);
+ }
+ OS.g_list_free (children);
+ return window;
+ } else {
+ return paintWindow ();
+ }
}
@Override
-boolean filterKey (int keyval, long event) {
+boolean filterKey (long event) {
int time = GDK.gdk_event_get_time (event);
if (time != lastEventTime) {
lastEventTime = time;
- long imContext = imContext ();
if (imContext != 0) {
- return GTK.gtk_im_context_filter_keypress (imContext, event);
+ if (GTK.GTK4)
+ return GTK4.gtk_im_context_filter_keypress (imContext, event);
+ else
+ return GTK3.gtk_im_context_filter_keypress (imContext, event);
}
}
gdkEventKey = event;
@@ -819,9 +903,12 @@ void fixIM () {
* filter has to be called by SWT.
*/
if (gdkEventKey != 0 && gdkEventKey != -1) {
- long imContext = imContext ();
if (imContext != 0) {
- GTK.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+ if (GTK.GTK4)
+ GTK4.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+ else
+ GTK3.gtk_im_context_filter_keypress (imContext, gdkEventKey);
+
gdkEventKey = -1;
return;
}
@@ -834,7 +921,7 @@ int getBorderWidthInPixels () {
checkWidget();
if ((style & SWT.MULTI) != 0) return super.getBorderWidthInPixels ();
if ((this.style & SWT.BORDER) != 0) {
- return getThickness (handle).x;
+ return getThickness (handle).x;
}
return 0;
}
@@ -881,25 +968,26 @@ Point getCaretLocationInPixels () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
int index = GTK.gtk_editable_get_position (handle);
- index = GTK.gtk_entry_text_index_to_layout_index (handle, index);
+ index = GTK3.gtk_entry_text_index_to_layout_index (handle, index);
int [] offset_x = new int [1], offset_y = new int [1];
- GTK.gtk_entry_get_layout_offsets (handle, offset_x, offset_y);
- long layout = GTK.gtk_entry_get_layout (handle);
+ GTK3.gtk_entry_get_layout_offsets (handle, offset_x, offset_y);
+ long layout = GTK3.gtk_entry_get_layout (handle);
PangoRectangle pos = new PangoRectangle ();
OS.pango_layout_index_to_pos (layout, index, pos);
int x = offset_x [0] + OS.PANGO_PIXELS (pos.x) - getBorderWidthInPixels ();
int y = offset_y [0] + OS.PANGO_PIXELS (pos.y);
return new Point (x, y);
+ } else {
+ byte[] position = new byte[ITER_SIZEOF];
+ long mark = GTK.gtk_text_buffer_get_insert(bufferHandle);
+ GTK.gtk_text_buffer_get_iter_at_mark(bufferHandle, position, mark);
+ GdkRectangle rect = new GdkRectangle();
+ GTK.gtk_text_view_get_iter_location(handle, position, rect);
+ int[] x = new int[1];
+ int[] y = new int[1];
+ GTK.gtk_text_view_buffer_to_window_coords(handle, GTK.GTK_TEXT_WINDOW_TEXT, rect.x, rect.y, x, y);
+ return new Point (x[0], y[0]);
}
- byte [] position = new byte [ITER_SIZEOF];
- long mark = GTK.gtk_text_buffer_get_insert (bufferHandle);
- GTK.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, mark);
- GdkRectangle rect = new GdkRectangle ();
- GTK.gtk_text_view_get_iter_location (handle, position, rect);
- int [] x = new int [1];
- int [] y = new int [1];
- GTK.gtk_text_view_buffer_to_window_coords (handle, GTK.GTK_TEXT_WINDOW_TEXT, rect.x, rect.y, x, y);
- return new Point (x [0], y [0]);
}
/**
@@ -919,7 +1007,7 @@ public int getCaretPosition () {
checkWidget ();
int result;
if ((style & SWT.SINGLE) != 0) {
- long ptr = GTK.gtk_entry_get_text (handle);
+ long ptr = GTK3.gtk_entry_get_text (handle);
result = (int)OS.g_utf8_offset_to_utf16_offset (ptr, GTK.gtk_editable_get_position (handle));
} else {
byte [] position = new byte [ITER_SIZEOF];
@@ -948,8 +1036,12 @@ public int getCharCount () {
checkWidget ();
int result;
if ((style & SWT.SINGLE) != 0) {
- long ptr = GTK.gtk_entry_get_text (handle);
- result = (int)OS.g_utf16_strlen (ptr, -1);
+ if (GTK.GTK4) {
+ result = GTK4.gtk_entry_get_text_length(handle);
+ } else {
+ long str = GTK3.gtk_entry_get_text(handle);
+ result = (int)OS.g_utf16_strlen(str, -1);
+ }
} else {
byte [] startIter = new byte [ITER_SIZEOF];
byte [] endIter = new byte [ITER_SIZEOF];
@@ -1071,7 +1163,10 @@ public String getLineDelimiter () {
*/
public int getLineHeight () {
checkWidget ();
- return fontHeight (getFontDescription (), handle);
+ long fontDesc = getFontDescription ();
+ int result = fontHeight (fontDesc, handle);
+ OS.pango_font_description_free (fontDesc);
+ return result;
}
/**
@@ -1120,7 +1215,7 @@ public int getOrientation () {
if ((style & SWT.SINGLE) != 0) {
int [] index = new int [1];
int [] trailing = new int [1];
- long layout = GTK.gtk_entry_get_layout (handle);
+ long layout = GTK3.gtk_entry_get_layout (handle);
OS.pango_layout_xy_to_index (layout, point.x * OS.PANGO_SCALE, point.y * OS.PANGO_SCALE, index, trailing);
long ptr = OS.pango_layout_get_text (layout);
position = (int)OS.g_utf16_pointer_to_offset (ptr, ptr + index[0]) + trailing[0];
@@ -1154,17 +1249,23 @@ public int getOrientation () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public Point getSelection () {
- checkWidget ();
+public Point getSelection() {
+ checkWidget();
+
Point selection;
if ((style & SWT.SINGLE) != 0) {
- int [] start = new int [1];
- int [] end = new int [1];
- GTK.gtk_editable_get_selection_bounds (handle, start, end);
- long ptr = GTK.gtk_entry_get_text (handle);
- start[0] = (int)OS.g_utf8_offset_to_utf16_offset (ptr, start[0]);
- end[0] = (int)OS.g_utf8_offset_to_utf16_offset (ptr, end[0]);
- selection = new Point (start [0], end [0]);
+ int[] start = new int[1];
+ int[] end = new int[1];
+ GTK.gtk_editable_get_selection_bounds(handle, start, end);
+ long str;
+ if (GTK.GTK4) {
+ str = GTK.gtk_entry_buffer_get_text(GTK4.gtk_entry_get_buffer(handle));
+ } else {
+ str = GTK3.gtk_entry_get_text(handle);
+ }
+ start[0] = (int)OS.g_utf8_offset_to_utf16_offset(str, start[0]);
+ end[0] = (int)OS.g_utf8_offset_to_utf16_offset(str, end[0]);
+ selection = new Point(start[0], end[0]);
} else {
byte [] startIter = new byte [ITER_SIZEOF];
byte [] endIter = new byte [ITER_SIZEOF];
@@ -1177,8 +1278,9 @@ public Point getSelection () {
OS.g_free (ptr);
selection = new Point (start, end);
}
- selection.x = untranslateOffset (selection.x);
- selection.y = untranslateOffset (selection.y);
+
+ selection.x = untranslateOffset(selection.x);
+ selection.y = untranslateOffset(selection.y);
return selection;
}
@@ -1208,10 +1310,11 @@ public int getSelectionCount () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public String getSelectionText () {
- checkWidget ();
- Point selection = getSelection ();
- return getText ().substring(selection.x, selection.y);
+public String getSelectionText() {
+ checkWidget();
+
+ Point selection = getSelection();
+ return getText().substring(selection.x, selection.y);
}
/**
@@ -1324,8 +1427,13 @@ public String getText (int start, int end) {
public char [] getTextChars () {
checkWidget ();
long address;
+
if ((style & SWT.SINGLE) != 0) {
- address = GTK.gtk_entry_get_text (handle);
+ if (GTK.GTK4) {
+ address = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ address = GTK3.gtk_entry_get_text(handle);
+ }
} else {
byte [] start = new byte [ITER_SIZEOF];
byte [] end = new byte [ITER_SIZEOF];
@@ -1483,7 +1591,7 @@ long gtk_changed (long widget) {
* is to post the modify event when the user is typing.
*/
boolean keyPress = false;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK.GTK4 ? 0 : GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int eventType = GDK.gdk_event_get_event_type(eventPtr);
eventType = fixGdkEventTypeValues(eventType);
@@ -1499,7 +1607,7 @@ long gtk_changed (long widget) {
} else {
sendEvent (SWT.Modify);
}
- if ((style & SWT.SEARCH) != 0) {
+ if ((style & SWT.SEARCH) != 0 && !GTK.GTK4) {
if ((style & SWT.ICON_CANCEL) == 0) {
// Default GtkSearchEntry shows "clear" icon when there is text, manually revert this
// when "cancel" icon style is not set
@@ -1601,7 +1709,7 @@ long gtk_delete_range (long widget, long iter1, long iter2) {
@Override
long gtk_delete_text (long widget, long start_pos, long end_pos) {
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
- long ptr = GTK.gtk_entry_get_text (handle);
+ long ptr = GTK3.gtk_entry_get_text (handle);
if (end_pos == -1) end_pos = OS.g_utf8_strlen (ptr, -1);
int start = (int)OS.g_utf8_offset_to_utf16_offset (ptr, start_pos);
int end = (int)OS.g_utf8_offset_to_utf16_offset (ptr, end_pos);
@@ -1648,10 +1756,10 @@ long gtk_event_after (long widget, long gdkEvent) {
case GDK.GDK_FOCUS_CHANGE:
boolean [] focusIn = new boolean [1];
if (GTK.GTK4) {
- GDK.gdk_event_get_focus_in(gdkEvent, focusIn);
+ focusIn[0] = GDK.gdk_focus_event_get_in(gdkEvent);
} else {
GdkEventFocus gdkEventFocus = new GdkEventFocus ();
- OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
+ GTK3.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
focusIn[0] = gdkEventFocus.in != 0;
}
if (focusIn[0]) {
@@ -1721,7 +1829,7 @@ long gtk_insert_text (long widget, long new_text, long new_text_length, long pos
String oldText = new String (Converter.mbcsToWcs (buffer));
int [] pos = new int [1];
C.memmove (pos, position, 4);
- long ptr = GTK.gtk_entry_get_text (handle);
+ long ptr = GTK3.gtk_entry_get_text (handle);
if (pos [0] == -1) pos [0] = (int)OS.g_utf8_strlen (ptr, -1);
/* Use the selection when the text was deleted */
int start = pos [0], end = pos [0];
@@ -1765,18 +1873,20 @@ long gtk_insert_text (long widget, long new_text, long new_text_length, long pos
long gtk_key_press_event (long widget, long event) {
boolean handleSegments = false, segmentsCleared = false;
if (hooks (SWT.Segments) || filters (SWT.Segments)) {
- int length;
+ int length = 0;
int [] state = new int[1];
- GDK.gdk_event_get_state(event, state);
+
if (GTK.GTK4) {
- long [] eventString = new long [1];
- GDK.gdk_event_get_string(event, eventString);
- length = (int)OS.g_utf16_strlen (eventString[0], -1);
+ /* TODO: GTK4 no access to key event string */
+ state[0] = GDK.gdk_event_get_modifier_state(event);
} else {
+ GDK.gdk_event_get_state(event, state);
+
GdkEventKey gdkEvent = new GdkEventKey ();
- OS.memmove(gdkEvent, event, GdkEventKey.sizeof);
+ GTK3.memmove(gdkEvent, event, GdkEventKey.sizeof);
length = gdkEvent.length;
}
+
if (length > 0 && (state[0] & (GDK.GDK_MOD1_MASK | GDK.GDK_CONTROL_MASK)) == 0) {
handleSegments = true;
if (segments != null) {
@@ -1799,7 +1909,7 @@ long gtk_key_press_event (long widget, long event) {
long gtk_populate_popup (long widget, long menu) {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
GTK.gtk_widget_set_direction (menu, GTK.GTK_TEXT_DIR_RTL);
- GTK.gtk_container_forall (menu, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
+ GTK3.gtk_container_forall (menu, display.setDirectionProc, GTK.GTK_TEXT_DIR_RTL);
}
return 0;
}
@@ -1841,92 +1951,60 @@ long gtk_text_buffer_insert_text (long widget, long iter, long text, long length
}
@Override
-void hookEvents () {
+void hookEvents() {
super.hookEvents();
if ((style & SWT.SINGLE) != 0) {
- OS.g_signal_connect_closure (handle, OS.changed, display.getClosure (CHANGED), true);
- OS.g_signal_connect_closure (handle, OS.insert_text, display.getClosure (INSERT_TEXT), false);
- OS.g_signal_connect_closure (handle, OS.delete_text, display.getClosure (DELETE_TEXT), false);
- OS.g_signal_connect_closure (handle, OS.activate, display.getClosure (ACTIVATE), false);
- OS.g_signal_connect_closure (handle, OS.grab_focus, display.getClosure (GRAB_FOCUS), false);
- OS.g_signal_connect_closure (handle, OS.populate_popup, display.getClosure (POPULATE_POPUP), false);
- if ((style & SWT.SEARCH) != 0) {
- OS.g_signal_connect_closure (handle, OS.icon_release, display.getClosure (ICON_RELEASE), false);
+ OS.g_signal_connect_closure(handle, OS.changed, display.getClosure (CHANGED), true);
+ OS.g_signal_connect_closure(handle, OS.insert_text, display.getClosure (INSERT_TEXT), false);
+ OS.g_signal_connect_closure(handle, OS.delete_text, display.getClosure (DELETE_TEXT), false);
+ OS.g_signal_connect_closure(handle, OS.activate, display.getClosure (ACTIVATE), false);
+
+ if (!GTK.GTK4) {
+ OS.g_signal_connect_closure(handle, OS.grab_focus, display.getClosure (GRAB_FOCUS), false);
+ }
+ if ((style & SWT.SEARCH) != 0 && !GTK.GTK4) {
+ OS.g_signal_connect_closure(handle, OS.icon_release, display.getClosure (ICON_RELEASE), false);
}
} else {
- OS.g_signal_connect_closure (bufferHandle, OS.changed, display.getClosure (CHANGED), false);
- OS.g_signal_connect_closure (bufferHandle, OS.insert_text, display.getClosure (TEXT_BUFFER_INSERT_TEXT), false);
- OS.g_signal_connect_closure (bufferHandle, OS.delete_range, display.getClosure (DELETE_RANGE), false);
- OS.g_signal_connect_closure (handle, OS.populate_popup, display.getClosure (POPULATE_POPUP), false);
+ OS.g_signal_connect_closure(bufferHandle, OS.changed, display.getClosure (CHANGED), false);
+ OS.g_signal_connect_closure(bufferHandle, OS.insert_text, display.getClosure (TEXT_BUFFER_INSERT_TEXT), false);
+ OS.g_signal_connect_closure(bufferHandle, OS.delete_range, display.getClosure (DELETE_RANGE), false);
}
- long imContext = imContext ();
+
if (imContext != 0) {
- OS.g_signal_connect_closure (imContext, OS.commit, display.getClosure (COMMIT), false);
- int id = OS.g_signal_lookup (OS.commit, GTK.gtk_im_context_get_type ());
+ OS.g_signal_connect_closure(imContext, OS.commit, display.getClosure (COMMIT), false);
+ int id = OS.g_signal_lookup(OS.commit, GTK.gtk_im_context_get_type ());
int mask = OS.G_SIGNAL_MATCH_DATA | OS.G_SIGNAL_MATCH_ID;
- OS.g_signal_handlers_block_matched (imContext, mask, id, 0, 0, 0, handle);
- }
- OS.g_signal_connect_closure (handle, OS.backspace, display.getClosure (BACKSPACE), false);
- OS.g_signal_connect_closure (handle, OS.backspace, display.getClosure (BACKSPACE_INVERSE), true);
- OS.g_signal_connect_closure (handle, OS.copy_clipboard, display.getClosure (COPY_CLIPBOARD), false);
- OS.g_signal_connect_closure (handle, OS.copy_clipboard, display.getClosure (COPY_CLIPBOARD_INVERSE), true);
- OS.g_signal_connect_closure (handle, OS.cut_clipboard, display.getClosure (CUT_CLIPBOARD), false);
- OS.g_signal_connect_closure (handle, OS.cut_clipboard, display.getClosure (CUT_CLIPBOARD_INVERSE), true);
- OS.g_signal_connect_closure (handle, OS.paste_clipboard, display.getClosure (PASTE_CLIPBOARD), false);
- OS.g_signal_connect_closure (handle, OS.paste_clipboard, display.getClosure (PASTE_CLIPBOARD_INVERSE), true);
- OS.g_signal_connect_closure (handle, OS.delete_from_cursor, display.getClosure (DELETE_FROM_CURSOR), false);
- OS.g_signal_connect_closure (handle, OS.delete_from_cursor, display.getClosure (DELETE_FROM_CURSOR_INVERSE), true);
- OS.g_signal_connect_closure (handle, OS.move_cursor, display.getClosure (MOVE_CURSOR), false);
- OS.g_signal_connect_closure (handle, OS.move_cursor, display.getClosure (MOVE_CURSOR_INVERSE), true);
- OS.g_signal_connect_closure (handle, OS.direction_changed, display.getClosure (DIRECTION_CHANGED), true);
-}
-
-long imContext () {
- if (imContext != 0) return imContext;
- return 0;
-}
+ OS.g_signal_handlers_block_matched(imContext, mask, id, 0, 0, 0, handle);
+ }
+
+ if (!GTK.GTK4) {
+ OS.g_signal_connect_closure(handle, OS.populate_popup, display.getClosure (POPULATE_POPUP), false);
+ }
+ // In GTK4, these event signals belong to GtkText which is the only child of GtkEntry
+ long eventHandle = 0;
-private boolean insideBlockSelection (int x, int y) {
- int start = 0, end = 0;
- if ((style & SWT.SINGLE) != 0) {
- int [] s = new int [1], e = new int [1];
- GTK.gtk_editable_get_selection_bounds (handle, s, e);
- start = s [0];
- end = e [0];
+ if (GTK.GTK4) {
+ eventHandle = ((style & SWT.SINGLE) != 0) ? textHandle : handle;
} else {
- byte [] s = new byte [ITER_SIZEOF], e = new byte [ITER_SIZEOF];
- GTK.gtk_text_buffer_get_selection_bounds (bufferHandle, s, e);
- start = GTK.gtk_text_iter_get_offset (s);
- end = GTK.gtk_text_iter_get_offset (e);
- }
- if (start != end) {
- if (end < start) {
- int temp = end;
- end = start;
- start = temp;
- }
- int position = -1;
- if ((style & SWT.SINGLE) != 0) {
- int [] index = new int [1];
- int [] trailing = new int [1];
- long layout = GTK.gtk_entry_get_layout (handle);
- OS.pango_layout_xy_to_index (layout, x * OS.PANGO_SCALE, y * OS.PANGO_SCALE, index, trailing);
- long ptr = OS.pango_layout_get_text (layout);
- position = (int)OS.g_utf8_pointer_to_offset (ptr, ptr + index[0]) + trailing[0];
- } else {
- byte [] p = new byte [ITER_SIZEOF];
- GTK.gtk_text_view_get_iter_at_location (handle, p, x, y);
- position = GTK.gtk_text_iter_get_offset (p);
- }
- if (start <= position && position < end) {
- return true;
- }
+ eventHandle = handle;
}
- return false;
-}
-
+ OS.g_signal_connect_closure(eventHandle, OS.backspace, display.getClosure (BACKSPACE), false);
+ OS.g_signal_connect_closure(eventHandle, OS.backspace, display.getClosure (BACKSPACE_INVERSE), true);
+ OS.g_signal_connect_closure(eventHandle, OS.copy_clipboard, display.getClosure (COPY_CLIPBOARD), false);
+ OS.g_signal_connect_closure(eventHandle, OS.copy_clipboard, display.getClosure (COPY_CLIPBOARD_INVERSE), true);
+ OS.g_signal_connect_closure(eventHandle, OS.cut_clipboard, display.getClosure (CUT_CLIPBOARD), false);
+ OS.g_signal_connect_closure(eventHandle, OS.cut_clipboard, display.getClosure (CUT_CLIPBOARD_INVERSE), true);
+ OS.g_signal_connect_closure(eventHandle, OS.paste_clipboard, display.getClosure (PASTE_CLIPBOARD), false);
+ OS.g_signal_connect_closure(eventHandle, OS.paste_clipboard, display.getClosure (PASTE_CLIPBOARD_INVERSE), true);
+ OS.g_signal_connect_closure(eventHandle, OS.delete_from_cursor, display.getClosure (DELETE_FROM_CURSOR), false);
+ OS.g_signal_connect_closure(eventHandle, OS.delete_from_cursor, display.getClosure (DELETE_FROM_CURSOR_INVERSE), true);
+ OS.g_signal_connect_closure(eventHandle, OS.move_cursor, display.getClosure (MOVE_CURSOR), false);
+ OS.g_signal_connect_closure(eventHandle, OS.move_cursor, display.getClosure (MOVE_CURSOR_INVERSE), true);
+ OS.g_signal_connect_closure(eventHandle, OS.direction_changed, display.getClosure (DIRECTION_CHANGED), true);
+}
/**
* Inserts a string.
@@ -2032,47 +2110,16 @@ private void scrollIfNotVisible(byte [] iter, byte [] scrollTo, boolean insert)
@Override
long paintWindow () {
if ((style & SWT.SINGLE) != 0) {
- long window = super.paintWindow ();
- long children = GDK.gdk_window_get_children (window);
- if (children != 0) {
- /*
- * When search or cancel icons are added to Text, those
- * icon window(s) are added to the beginning of the list.
- * In order to always return the correct window for Text,
- * browse to the end of the list.
- */
- do {
- window = OS.g_list_data (children);
- } while ((children = OS.g_list_next (children)) != 0);
- }
- OS.g_list_free (children);
- return window;
- }
- GTK.gtk_widget_realize (handle);
- // TODO: this function has been removed on GTK4
- return GTK.gtk_text_view_get_window (handle, GTK.GTK_TEXT_WINDOW_TEXT);
-}
-
-@Override
-long paintSurface () {
- if ((style & SWT.SINGLE) != 0) {
- long surface = super.paintSurface ();
- long children = GDK.gdk_surface_get_children (surface);
- if (children != 0) {
- /*
- * When search or cancel icons are added to Text, those
- * icon window(s) are added to the beginning of the list.
- * In order to always return the correct window for Text,
- * browse to the end of the list.
- */
- do {
- surface = OS.g_list_data (children);
- } while ((children = OS.g_list_next (children)) != 0);
+ return super.paintWindow ();
+ } else {
+ if (GTK.GTK4) {
+ // TODO: this function has been removed on GTK4, check bug 561444
+ return 0;
+ } else {
+ GTK.gtk_widget_realize (handle);
+ return GTK3.gtk_text_view_get_window (handle, GTK.GTK_TEXT_WINDOW_TEXT);
}
- OS.g_list_free (children);
- return surface;
}
- return 0;
}
/**
@@ -2090,9 +2137,13 @@ long paintSurface () {
public void paste () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- GTK.gtk_editable_paste_clipboard (handle);
+ if (GTK.GTK4) {
+ GTK4.gtk_widget_activate_action(textHandle, OS.action_paste_clipboard, null);
+ } else {
+ GTK3.gtk_editable_paste_clipboard (handle);
+ }
} else {
- long clipboard = GTK.GTK4 ? GDK.gdk_display_get_clipboard(GDK.gdk_display_get_default()) : GTK.gtk_clipboard_get (GDK.GDK_NONE);;
+ long clipboard = GTK.GTK4 ? GTK4.gtk_widget_get_clipboard(handle) : GTK3.gtk_clipboard_get(GDK.GDK_NONE);
clearSegments (true);
GTK.gtk_text_buffer_paste_clipboard (bufferHandle, clipboard, null, GTK.gtk_text_view_get_editable (handle));
applySegments ();
@@ -2103,7 +2154,6 @@ public void paste () {
void register () {
super.register ();
if (bufferHandle != 0) display.addWidget (bufferHandle, this);
- long imContext = imContext ();
if (imContext != 0) display.addWidget (imContext, this);
}
@@ -2225,6 +2275,7 @@ public void removeVerifyListener (VerifyListener listener) {
*/
public void selectAll () {
checkWidget ();
+
if ((style & SWT.SINGLE) != 0) {
GTK.gtk_editable_select_region (handle, 0, -1);
} else {
@@ -2246,14 +2297,10 @@ GdkRGBA getContextBackgroundGdkRGBA () {
@Override
GdkRGBA getContextColorGdkRGBA () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- if (foreground != null) {
- return foreground;
- } else {
- return display.COLOR_WIDGET_FOREGROUND_RGBA;
- }
+ if (foreground != null) {
+ return foreground;
} else {
- return super.getContextColorGdkRGBA ();
+ return display.COLOR_WIDGET_FOREGROUND_RGBA;
}
}
@@ -2273,22 +2320,18 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
GdkRGBA selectedForeground = display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT).handle;
String css;
String properties;
- String name;
- String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? " selection" : ":selected";
- if ((style & SWT.SINGLE) != 0) {
- name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "entry" : "GtkEntry";
- properties = " {background: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
- + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
- } else {
- name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "textview text" : "GtkTextView";
- properties = " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
- + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
- }
- css = name + properties;
-
- // Cache background color
+ if ((style & SWT.SINGLE) != 0) {
+ properties = "entry {background: " + display.gtk_rgba_to_css_string(background) + ";}\n"
+ + "entry:selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
+ + "entry selection {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
+ } else {
+ properties = "textview text {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
+ + "textview text:selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
+ + "textview text selection {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
+ }
+ css = properties;
+
+ // Cache background color
cssBackground = css;
// Apply background color and any foreground color
@@ -2298,13 +2341,9 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
@Override
void setForegroundGdkRGBA (GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- foreground = rgba;
- GdkRGBA toSet = rgba == null ? display.COLOR_WIDGET_FOREGROUND_RGBA : rgba;
- setForegroundGdkRGBA (handle, toSet);
- } else {
- super.setForegroundGdkRGBA(rgba);
- }
+ foreground = rgba;
+ GdkRGBA toSet = rgba == null ? display.COLOR_WIDGET_FOREGROUND_RGBA : rgba;
+ setForegroundGdkRGBA (handle, toSet);
}
@Override
@@ -2312,10 +2351,9 @@ void setCursor (long cursor) {
long defaultCursor = 0;
if (cursor == 0) {
if (GTK.GTK4) {
- byte [] name = Converter.wcsToMbcs("text", true);
- defaultCursor = GDK.gdk_cursor_new_from_name(name, 0);
+ defaultCursor = GDK.gdk_cursor_new_from_name("xterm", 0);
} else {
- defaultCursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), GDK.GDK_XTERM);
+ defaultCursor = GDK.gdk_cursor_new_from_name (GDK.gdk_display_get_default(), "xterm");
}
}
super.setCursor (cursor != 0 ? cursor : defaultCursor);
@@ -2366,11 +2404,11 @@ public void setDoubleClickEnabled (boolean doubleClick) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setEchoChar (char echo) {
- checkWidget ();
+public void setEchoChar(char echo) {
+ checkWidget();
if ((style & SWT.SINGLE) != 0) {
- GTK.gtk_entry_set_visibility (handle, echo == '\0');
- GTK.gtk_entry_set_invisible_char (handle, echo);
+ GTK.gtk_entry_set_visibility(handle, echo == '\0');
+ GTK.gtk_entry_set_invisible_char(handle, echo);
}
}
@@ -2426,7 +2464,11 @@ public void setMessage (String message) {
this.message = message;
if ((style & SWT.SINGLE) != 0) {
byte [] buffer = Converter.wcsToMbcs (message, true);
- GTK.gtk_entry_set_placeholder_text (handle, buffer);
+ if (GTK.GTK4) {
+ GTK4.gtk_text_set_placeholder_text (textHandle, buffer);
+ } else {
+ GTK.gtk_entry_set_placeholder_text (handle, buffer);
+ }
return;
}
redraw (false);
@@ -2477,13 +2519,19 @@ public void setOrientation (int orientation) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setSelection (int start) {
- checkWidget ();
- start = translateOffset (start);
+public void setSelection(int start) {
+ checkWidget();
+
+ start = translateOffset(start);
if ((style & SWT.SINGLE) != 0) {
- long ptr = GTK.gtk_entry_get_text (handle);
- start = (int)OS.g_utf16_offset_to_utf8_offset (ptr, start);
- GTK.gtk_editable_set_position (handle, start);
+ long str;
+ if (GTK.GTK4) {
+ str = GTK.gtk_entry_buffer_get_text(GTK4.gtk_entry_get_buffer(handle));
+ } else {
+ str = GTK3.gtk_entry_get_text(handle);
+ }
+ start = (int)OS.g_utf16_offset_to_utf8_offset(str, start);
+ GTK.gtk_editable_set_position(handle, start);
} else {
byte [] startIter = new byte [ITER_SIZEOF];
byte [] endIter = new byte [ITER_SIZEOF];
@@ -2527,7 +2575,12 @@ public void setSelection (int start, int end) {
start = translateOffset (start);
end = translateOffset (end);
if ((style & SWT.SINGLE) != 0) {
- long ptr = GTK.gtk_entry_get_text (handle);
+ long ptr;
+ if (GTK.GTK4) {
+ ptr = GTK.gtk_entry_buffer_get_text(bufferHandle);
+ } else {
+ ptr = GTK3.gtk_entry_get_text (handle);
+ }
start = (int)OS.g_utf16_offset_to_utf8_offset (ptr, start);
end = (int)OS.g_utf16_offset_to_utf8_offset (ptr, end);
GTK.gtk_editable_set_position (handle, start);
@@ -2608,7 +2661,11 @@ void setTabStops (int tabs) {
long tabArray = OS.pango_tab_array_new (1, false);
OS.pango_tab_array_set_tab (tabArray, 0, OS.PANGO_TAB_LEFT, tabWidth);
if ((style & SWT.SINGLE) != 0) {
- GTK.gtk_entry_set_tabs (handle, tabArray);
+ if (GTK.GTK4) {
+ GTK4.gtk_text_set_tabs (textHandle, tabArray);
+ } else {
+ GTK.gtk_entry_set_tabs (handle, tabArray);
+ }
} else {
GTK.gtk_text_view_set_tabs (handle, tabArray);
}
@@ -2696,15 +2753,19 @@ public void setTextChars (char [] text) {
void setText (char [] text) {
clearSegments (false);
if ((style & SWT.SINGLE) != 0) {
- byte [] buffer = Converter.wcsToMbcs (text, true);
- OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
- OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT);
- OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
- GTK.gtk_entry_set_text (handle, buffer);
- OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
- OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT);
- OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
- Arrays.fill (buffer, (byte) 0);
+ byte[] buffer = Converter.wcsToMbcs(text, true);
+ OS.g_signal_handlers_block_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
+ OS.g_signal_handlers_block_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT);
+ OS.g_signal_handlers_block_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
+ if (GTK.GTK4) {
+ GTK.gtk_entry_buffer_set_text(bufferHandle, buffer, -1);
+ } else {
+ GTK3.gtk_entry_set_text(handle, buffer);
+ }
+ OS.g_signal_handlers_unblock_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
+ OS.g_signal_handlers_unblock_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT);
+ OS.g_signal_handlers_unblock_matched(handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT);
+ Arrays.fill(buffer, (byte) 0);
} else {
byte [] buffer = Converter.wcsToMbcs (text, false);
byte [] position = new byte [ITER_SIZEOF];
@@ -2722,7 +2783,7 @@ void setText (char [] text) {
Arrays.fill (buffer, (byte) 0);
}
sendEvent (SWT.Modify);
- if ((style & SWT.SEARCH) != 0) {
+ if ((style & SWT.SEARCH) != 0 && !GTK.GTK4) {
if ((style & SWT.ICON_CANCEL) == 0) {
GTK.gtk_entry_set_icon_from_icon_name(handle, GTK.GTK_ENTRY_ICON_SECONDARY, null);
}
@@ -2825,11 +2886,15 @@ int translateOffset (int offset) {
@Override
boolean translateTraversal (long event) {
int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ }
+
switch (key[0]) {
case GDK.GDK_KP_Enter:
case GDK.GDK_Return: {
- long imContext = imContext ();
if (imContext != 0) {
long [] preeditString = new long [1];
GTK.gtk_im_context_get_preedit_string (imContext, preeditString, null, null);
@@ -2852,7 +2917,12 @@ int traversalCode (int key, long event) {
bits &= ~SWT.TRAVERSE_RETURN;
if (key == GDK.GDK_Tab && event != 0) {
int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
+ if (GTK.GTK4) {
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_state(event, eventState);
+ }
+
boolean next = (eventState[0] & GDK.GDK_SHIFT_MASK) == 0;
if (next && (eventState[0] & GDK.GDK_CONTROL_MASK) == 0) {
bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS);
@@ -2876,7 +2946,7 @@ String verifyText (String string, int start, int end) {
event.text = string;
event.start = start;
event.end = end;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK.GTK4 ? 0 : GTK3.gtk_get_current_event();
if (eventPtr != 0) {
int type = GDK.gdk_event_get_event_type(eventPtr);
type = fixGdkEventTypeValues(type);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 7376a23cc5..22c121c511 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
@@ -14,10 +14,14 @@
package org.eclipse.swt.widgets;
+import java.util.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class support the layout of selectable
@@ -52,11 +56,7 @@ public class ToolBar extends Composite {
ToolItem [] tabItemList;
ImageList imageList;
boolean hasChildFocus;
- static Callback menuItemSelectedFunc;
- static {
- menuItemSelectedFunc = new Callback(ToolBar.class, "MenuItemSelectedProc", 2);
- if (menuItemSelectedFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- }
+ static Callback menuItemSelectedFunc = new Callback(ToolBar.class, "MenuItemSelectedProc", 2);
String cssBackground, cssForeground = " ";
/**
@@ -132,10 +132,22 @@ void createHandle (int index) {
state |= HANDLE | THEME_BACKGROUND;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
- handle = GTK.gtk_toolbar_new ();
+
+ if (GTK.GTK4) {
+ handle = GTK.gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, 0);
+ GTK.gtk_widget_add_css_class(handle, Converter.javaStringToCString("toolbar"));
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ handle = GTK3.gtk_toolbar_new ();
+ }
+
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (fixedHandle, handle);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, handle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, handle);
+ }
/*
* Bug in GTK. GTK will segment fault if gtk_widget_reparent() is called
@@ -147,7 +159,7 @@ void createHandle (int index) {
* tool bar preferred size is too big with GTK_ICON_SIZE_LARGE_TOOLBAR
* when the tool bar item has no image or text.
*/
- GTK.gtk_toolbar_set_icon_size (handle, GTK.GTK_ICON_SIZE_SMALL_TOOLBAR);
+ if (!GTK.GTK4) GTK3.gtk_toolbar_set_icon_size (handle, GTK.GTK_ICON_SIZE_SMALL_TOOLBAR);
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
// reset to default font to get the usual behavior
@@ -164,15 +176,23 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
- /*
- * Feature in GTK. Size of toolbar is calculated incorrectly
- * and appears as just the overflow arrow, if the arrow is enabled
- * to display. The fix is to disable it before the computation of
- * size and enable it if WRAP style is set.
- */
- GTK.gtk_toolbar_set_show_arrow (handle, false);
- Point size = computeNativeSize (handle, wHint, hHint, changed);
- if ((style & SWT.WRAP) != 0) GTK.gtk_toolbar_set_show_arrow (handle, true);
+
+ Point size = null;
+
+ if (GTK.GTK4) {
+ size = computeNativeSize (handle, wHint, hHint, changed);
+ } else {
+ /*
+ * Feature in GTK. Size of toolbar is calculated incorrectly
+ * and appears as just the overflow arrow, if the arrow is enabled
+ * to display. The fix is to disable it before the computation of
+ * size and enable it if WRAP style is set.
+ */
+ GTK3.gtk_toolbar_set_show_arrow (handle, false);
+ size = computeNativeSize (handle, wHint, hHint, changed);
+ if ((style & SWT.WRAP) != 0) GTK3.gtk_toolbar_set_show_arrow (handle, true);
+ }
+
return size;
}
@@ -230,21 +250,6 @@ long enterExitHandle() {
}
@Override
-void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) {
- super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
- ToolItem [] items = getItems ();
- if (toolTipText == null) {
- for (int i = 0; i < items.length; i++) {
- ToolItem item = items [i];
- if (item.toolTipText != null) {
- item.setToolTipText(oldShell, null);
- item.setToolTipText(newShell, item.toolTipText);
- }
- }
- }
-}
-
-@Override
boolean forceFocus (long focusHandle) {
int dir = GTK.GTK_DIR_TAB_FORWARD;
if ((style & SWT.MIRRORED) != 0) dir = GTK.GTK_DIR_TAB_BACKWARD;
@@ -322,10 +327,19 @@ ToolItem getItemInPixels (Point point) {
*/
public int getItemCount () {
checkWidget();
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return 0;
- int itemCount = OS.g_list_length (list);
- OS.g_list_free (list);
+
+ int itemCount = 0;
+ if (GTK.GTK4) {
+ for (long child = GTK4.gtk_widget_get_first_child(handle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ itemCount++;
+ }
+ } else {
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list == 0) return 0;
+ itemCount = OS.g_list_length (list);
+ OS.g_list_free (list);
+ }
+
return itemCount;
}
@@ -350,26 +364,38 @@ public ToolItem [] getItems () {
return _getItems ();
}
-ToolItem [] _getItems () {
- long list = GTK.gtk_container_get_children (handle);
- if (list == 0) return new ToolItem [0];
- int count = OS.g_list_length (list);
- ToolItem [] items = new ToolItem [count];
- long originalList = list;
- int index = 0;
- for (int i=0; i<count; i++) {
- long data = OS.g_list_data (list);
- Widget widget = display.getWidget (data);
- if (widget != null) items [index++] = (ToolItem) widget;
- list = OS.g_list_next (list);
- }
- OS.g_list_free (originalList);
- if (index != items.length) {
- ToolItem [] newItems = new ToolItem [index];
- System.arraycopy (items, 0, newItems, 0, index);
- items = newItems;
+ToolItem[] _getItems () {
+ if (GTK.GTK4) {
+ ArrayList<ToolItem> childrenList = new ArrayList<>();
+ for (long child = GTK4.gtk_widget_get_first_child(handle); child != 0; child = GTK4.gtk_widget_get_next_sibling(child)) {
+ Widget childWidget = display.getWidget(child);
+ if (childWidget != null) {
+ childrenList.add((ToolItem)childWidget);
+ }
+ }
+
+ return childrenList.toArray(new ToolItem[childrenList.size()]);
+ } else {
+ long list = GTK3.gtk_container_get_children (handle);
+ if (list == 0) return new ToolItem [0];
+ int count = OS.g_list_length (list);
+ ToolItem [] items = new ToolItem [count];
+ long originalList = list;
+ int index = 0;
+ for (int i=0; i<count; i++) {
+ long data = OS.g_list_data (list);
+ Widget widget = display.getWidget (data);
+ if (widget != null) items [index++] = (ToolItem) widget;
+ list = OS.g_list_next (list);
+ }
+ OS.g_list_free (originalList);
+ if (index != items.length) {
+ ToolItem [] newItems = new ToolItem [index];
+ System.arraycopy (items, 0, newItems, 0, index);
+ items = newItems;
+ }
+ return items;
}
- return items;
}
/**
@@ -387,7 +413,7 @@ ToolItem [] _getItems () {
*/
public int getRowCount () {
checkWidget();
- /* On GTK, toolbars cannot wrap */
+ /* On GTK, toolbars cannot wrap */
return 1;
}
@@ -524,19 +550,25 @@ void relayout () {
hasImage |= item.image != null;
}
}
- int type = GTK.GTK_TOOLBAR_ICONS;
- if (hasText && hasImage) {
- if ((style & SWT.RIGHT) != 0) {
- type = GTK.GTK_TOOLBAR_BOTH_HORIZ;
- } else {
- type = GTK.GTK_TOOLBAR_BOTH;
+
+ if (GTK.GTK4) {
+ /* TODO: GTK4 no more GtkToolbar, we have to use a generic GtkBox
+ * therefore we will need to implement these style ourselves. */
+ } else {
+ int type = GTK.GTK_TOOLBAR_ICONS;
+ if (hasText && hasImage) {
+ if ((style & SWT.RIGHT) != 0) {
+ type = GTK.GTK_TOOLBAR_BOTH_HORIZ;
+ } else {
+ type = GTK.GTK_TOOLBAR_BOTH;
+ }
+ } else if (hasText) {
+ type = GTK.GTK_TOOLBAR_TEXT;
+ } else if (hasImage) {
+ type = GTK.GTK_TOOLBAR_ICONS;
}
- } else if (hasText) {
- type = GTK.GTK_TOOLBAR_TEXT;
- } else if (hasImage) {
- type = GTK.GTK_TOOLBAR_ICONS;
+ GTK3.gtk_toolbar_set_style (handle, type);
}
- GTK.gtk_toolbar_set_style (handle, type);
}
@Override
@@ -582,29 +614,33 @@ void reskinChildren (int flags) {
@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
- GTK.gtk_toolbar_set_show_arrow (handle, false);
+ if (!GTK.GTK4) GTK3.gtk_toolbar_set_show_arrow (handle, false);
int result = super.setBounds (x, y, width, height, move, resize);
if ((result & RESIZED) != 0) relayout ();
- if ((style & SWT.WRAP) != 0) GTK.gtk_toolbar_set_show_arrow (handle, true);
+ if ((style & SWT.WRAP) != 0) {
+ if (GTK.GTK4) {
+ /* TODO: GTK4 will require us to implement our own
+ * overflow menu. May require the use of the "toolbar" style class
+ * applied to the widget. */
+ } else {
+ GTK3.gtk_toolbar_set_show_arrow (handle, true);
+ }
+ }
+
return result;
}
@Override
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "toolbar" : "GtkToolbar";
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
+ // Form background string
+ String css = "toolbar {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
- // Cache background color
- this.cssBackground = css;
+ // Cache background color
+ this.cssBackground = css;
- // Apply background color and any foreground color
- String finalCss = display.gtk_css_create_css_color_string (this.cssBackground, this.cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css(context, finalCss);
- } else {
- super.setBackgroundGdkRGBA(context, handle, rgba);
- }
+ // Apply background color and any foreground color
+ String finalCss = display.gtk_css_create_css_color_string (this.cssBackground, this.cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css(context, finalCss);
}
@Override
@@ -615,32 +651,26 @@ void setParentBackground () {
@Override
void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- GdkRGBA toSet = new GdkRGBA();
- if (rgba != null) {
- toSet = rgba;
- } else {
- toSet = display.COLOR_WIDGET_FOREGROUND_RGBA;
- }
- long context = GTK.gtk_widget_get_style_context (handle);
- // Form foreground string
- String color = display.gtk_rgba_to_css_string(toSet);
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
- GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
- String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? " selection" : ":selected";
- String css = "* {color: " + color + ";}\n"
- + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
-
- // Cache foreground color
- this.cssForeground = css;
-
- // Apply foreground color and any cached background color
- String finalCss = display.gtk_css_create_css_color_string (this.cssBackground, this.cssForeground, SWT.FOREGROUND);
- gtk_css_provider_load_from_css(context, finalCss);
+ GdkRGBA toSet = new GdkRGBA();
+ if (rgba != null) {
+ toSet = rgba;
} else {
- super.setForegroundGdkRGBA(handle, rgba);
+ toSet = display.COLOR_WIDGET_FOREGROUND_RGBA;
}
+ long context = GTK.gtk_widget_get_style_context (handle);
+ // Form foreground string
+ String color = display.gtk_rgba_to_css_string(toSet);
+ String name = display.gtk_widget_class_get_css_name(handle);
+ GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
+ String css = "* {color: " + color + ";}\n"
+ + name + " selection {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
+
+ // Cache foreground color
+ this.cssForeground = css;
+
+ // Apply foreground color and any cached background color
+ String finalCss = display.gtk_css_create_css_color_string (this.cssBackground, this.cssForeground, SWT.FOREGROUND);
+ gtk_css_provider_load_from_css(context, finalCss);
}
@Override
@@ -699,15 +729,13 @@ void setOrientation (boolean create) {
}
@Override
-public void setToolTipText (String string) {
+public void setToolTipText(String string) {
checkWidget();
- super.setToolTipText (string);
- Shell shell = _getShell ();
- ToolItem [] items = getItems ();
+ super.setToolTipText(string);
+ ToolItem[] items = getItems();
for (int i = 0; i < items.length; i++) {
- String newString = string != null ? null : items [i].toolTipText;
- shell.setToolTipText (items [i].handle, newString);
+ String newString = string != null ? null : items[i].toolTipText;
+ setToolTipText(items[i].handle, newString);
}
}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
index 4223d39f02..bdf0b5fa2a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christoph Läubrich - Bug 569750 - Terminate button doesn't change state for process that is terminated at breakpoint
*******************************************************************************/
package org.eclipse.swt.widgets;
@@ -19,6 +20,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a selectable user interface object
@@ -43,11 +46,27 @@ import org.eclipse.swt.internal.gtk.*;
public class ToolItem extends Item {
long arrowHandle, labelHandle, imageHandle;
long eventHandle, proxyMenuItem, provider;
+
+ /** GTK4 only field, used to keep track of the containing box of the image & label */
+ long boxHandle, groupHandle;
+
ToolBar parent;
Control control;
- Image hotImage, disabledImage;
+ Image hotImage, disabledImage, defaultDisableImage;
String toolTipText;
boolean drawHotImage;
+ /** True iff map has been hooked for this ToolItem. See bug 546914. */
+ boolean mapHooked;
+ boolean enabled = true;
+
+ /**
+ * The image that is currently used by the tool item.
+ * Either the image set by client code via {@link #setImage(Image)}
+ * or {@link #setDisabledImage(Image)}, depending on button state.
+ * Or if the button is disabled but no disabled image is specified,
+ * a grayed out version of the "normal" image.
+ */
+ Image currentImage;
/**
* Constructs a new instance of this class given its parent
@@ -187,32 +206,54 @@ protected void checkSubclass () {
void createHandle (int index) {
state |= HANDLE;
int bits = SWT.SEPARATOR | SWT.RADIO | SWT.CHECK | SWT.PUSH | SWT.DROP_DOWN;
- if ((style & SWT.SEPARATOR) == 0) {
- labelHandle = GTK.gtk_label_new_with_mnemonic (null);
- if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
- imageHandle = GTK.gtk_image_new_from_pixbuf (0);
- if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- }
+
switch (style & bits) {
case SWT.SEPARATOR:
- handle = GTK.gtk_separator_tool_item_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_separator_tool_item_set_draw (handle, true);
+ if (GTK.GTK4) {
+ handle = GTK.gtk_separator_new(GTK.GTK_ORIENTATION_VERTICAL);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ } else {
+ handle = GTK3.gtk_separator_tool_item_new ();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ GTK3.gtk_separator_tool_item_set_draw(handle, true);
+ }
break;
case SWT.DROP_DOWN:
- handle = GTK.gtk_menu_tool_button_new (0, null);
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ handle = GTK.gtk_box_new(GTK.GTK_ORIENTATION_HORIZONTAL, 0);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ boxHandle = GTK.gtk_box_new(GTK.GTK_ORIENTATION_VERTICAL, 0);
+ if (boxHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ long button = GTK.gtk_button_new();
+ if (button == 0) error(SWT.ERROR_NO_HANDLES);
+ GTK4.gtk_button_set_child(button, boxHandle);
+
+ long menuButton = GTK.gtk_menu_button_new();
+ if (menuButton == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK4.gtk_box_append(handle, button);
+ GTK4.gtk_box_append(handle, menuButton);
+
+ arrowHandle = GTK4.gtk_widget_get_first_child(menuButton);
+ GTK4.gtk_menu_button_set_use_underline(menuButton, true);
+ } else {
+ handle = GTK3.gtk_menu_tool_button_new(0, null);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ long child = GTK3.gtk_bin_get_child(handle);
+ long list = GTK3.gtk_container_get_children(child);
+ arrowHandle = OS.g_list_nth_data(list, 1);
+ OS.g_list_free(list);
+ }
+
/*
* Feature in GTK. The arrow button of DropDown tool-item is
* disabled when it does not contain menu. The fix is to
* find the arrow button handle and enable it.
*/
- long child = GTK.gtk_bin_get_child (handle);
- long list = GTK.gtk_container_get_children (child);
- arrowHandle = OS.g_list_nth_data (list, 1);
- if (arrowHandle != 0) {
- GTK.gtk_widget_set_sensitive (arrowHandle, true);
- }
+ if (arrowHandle != 0) GTK.gtk_widget_set_sensitive (arrowHandle, true);
break;
case SWT.RADIO:
/*
@@ -222,31 +263,80 @@ void createHandle (int index) {
* The fix is to use toggle buttons instead.
*/
case SWT.CHECK:
- handle = GTK.gtk_toggle_tool_button_new ();
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ handle = GTK.gtk_toggle_button_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ boxHandle = GTK.gtk_box_new(GTK.GTK_ORIENTATION_VERTICAL, 0);
+ if (boxHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK4.gtk_button_set_child(handle, boxHandle);
+ GTK.gtk_button_set_use_underline(handle, true);
+ } else {
+ handle = GTK3.gtk_toggle_tool_button_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ }
break;
case SWT.PUSH:
default:
- handle = GTK.gtk_tool_button_new (0, null);
- if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ if (GTK.GTK4) {
+ handle = GTK.gtk_button_new();
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
+ boxHandle = GTK.gtk_box_new(GTK.GTK_ORIENTATION_VERTICAL, 0);
+ if (boxHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK4.gtk_button_set_child(handle, boxHandle);
+
+ GTK.gtk_button_set_use_underline(handle, true);
+ } else {
+ handle = GTK3.gtk_tool_button_new (0, null);
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+
break;
}
- if (labelHandle != 0) {
- GTK.gtk_tool_button_set_label_widget(handle, labelHandle);
- }
- if (imageHandle != 0) {
- GTK.gtk_tool_button_set_icon_widget(handle, imageHandle);
+
+ if ((style & SWT.SEPARATOR) == 0) {
+ if (GTK.GTK4) {
+ labelHandle = GTK.gtk_label_new_with_mnemonic(null);
+ if (labelHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ imageHandle = GTK.gtk_image_new();
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK.gtk_widget_set_valign(boxHandle, GTK.GTK_ALIGN_CENTER);
+
+ GTK4.gtk_box_append(boxHandle, imageHandle);
+ GTK4.gtk_box_append(boxHandle, labelHandle);
+
+ GTK.gtk_widget_hide(imageHandle);
+ GTK.gtk_widget_hide(labelHandle);
+ } else {
+ labelHandle = GTK.gtk_label_new_with_mnemonic(null);
+ if (labelHandle == 0) error(SWT.ERROR_NO_HANDLES);
+ imageHandle = GTK3.gtk_image_new_from_surface(0);
+ if (imageHandle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ GTK3.gtk_tool_button_set_icon_widget(handle, imageHandle);
+ GTK3.gtk_tool_button_set_label_widget(handle, labelHandle);
+
+ GTK3.gtk_tool_button_set_use_underline (handle, true);
+ }
}
+
if ((parent.state & FONT) != 0) {
- setFontDescription (parent.getFontDescription());
+ long fontDesc = parent.getFontDescription ();
+ setFontDescription (fontDesc);
+ OS.pango_font_description_free (fontDesc);
}
+
/*
- * Feature in GTK. GtkToolButton class uses this property to
- * determine whether to show or hide its label when the toolbar
- * style is GTK_TOOLBAR_BOTH_HORIZ (or SWT.RIGHT).
+ * Set the "homogeneous" property to false, otherwise all ToolItems will be as large as
+ * the largest one in the ToolBar. See bug 548331, 395296 for more information.
*/
- if ((parent.style & SWT.RIGHT) != 0) GTK.gtk_tool_item_set_is_important (handle, true);
- if ((style & SWT.SEPARATOR) == 0) GTK.gtk_tool_button_set_use_underline (handle, true);
+ if (GTK.GTK4) {
+ GTK.gtk_box_set_homogeneous(parent.handle, false);
+ } else {
+ GTK3.gtk_tool_item_set_homogeneous(handle, false);
+ }
}
@Override
@@ -391,6 +481,22 @@ public Image getHotImage () {
}
/**
+ * Returns the receiver's enabled image if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's enabled image
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+@Override
+public Image getImage () {
+ return this.image;
+}
+
+/**
* Returns the receiver's parent, which must be a <code>ToolBar</code>.
*
* @return the receiver's parent
@@ -426,7 +532,15 @@ public ToolBar getParent () {
public boolean getSelection () {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- return GTK.gtk_toggle_tool_button_get_active (handle);
+
+ boolean selection;
+ if (GTK.GTK4) {
+ selection = GTK.gtk_toggle_button_get_active(handle);
+ } else {
+ selection = GTK3.gtk_toggle_tool_button_get_active(handle);
+ }
+
+ return selection;
}
/**
@@ -469,21 +583,6 @@ int getWidthInPixels () {
}
@Override
-long gtk_event (long widget, long event) {
- if (!GTK.GTK4) return 0;
- int eventType = GDK.gdk_event_get_event_type(event);
- switch (eventType) {
- case GDK.GDK4_BUTTON_PRESS: {
- return gtk_button_press_event(widget, event);
- }
- case GDK.GDK4_BUTTON_RELEASE: {
- return gtk_button_release_event(widget, event);
- }
- }
- return 0;
-}
-
-@Override
long gtk_button_press_event (long widget, long event) {
return parent.gtk_button_press_event (widget, event);
}
@@ -497,7 +596,7 @@ long gtk_button_release_event (long widget, long event) {
long gtk_clicked (long widget) {
Event event = new Event ();
if ((style & SWT.DROP_DOWN) != 0) {
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
int eventType = GDK.gdk_event_get_event_type(eventPtr);
eventType = Control.fixGdkEventTypeValues(eventType);
@@ -544,6 +643,11 @@ long gtk_clicked (long widget) {
@Override
long gtk_create_menu_proxy (long widget) {
+ if (GTK.GTK4) {
+ /* TODO: GTK4 have to implement our own overflow menu */
+ return 0;
+ }
+
/*
* Feature in GTK. If the item is a radio/check button
* with only image, then that image does not appear in
@@ -558,16 +662,17 @@ long gtk_create_menu_proxy (long widget) {
* for the tool-item. If the text/image of the item changes,
* then the proxyMenu is reset.
*/
- GTK.gtk_tool_item_set_proxy_menu_item (widget, buffer, proxyMenuItem);
+ GTK3.gtk_tool_item_set_proxy_menu_item (widget, buffer, proxyMenuItem);
return 1;
}
+ Image image = currentImage;
if (image != null) {
ImageList imageList = parent.imageList;
if (imageList != null) {
int index = imageList.indexOf (image);
if (index != -1) {
- long pixbuf = imageList.getPixbuf (index);
+ long surface = imageList.getSurface (index);
byte[] label = null;
int [] showImages = new int []{1};
/*
@@ -588,35 +693,31 @@ long gtk_create_menu_proxy (long widget) {
else {
label = Converter.wcsToMbcs(text, true);
}
- long menuItem = GTK.gtk_menu_item_new ();
+ long menuItem = GTK3.gtk_menu_item_new ();
if (menuItem == 0) error (SWT.ERROR_NO_HANDLES);
long boxHandle = gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, false, 6);
if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
- long menuLabel = GTK.gtk_accel_label_new (label);
+ long menuLabel = GTK3.gtk_accel_label_new (label);
if (menuLabel == 0) error (SWT.ERROR_NO_HANDLES);
- if (GTK.GTK_VERSION >= OS.VERSION (3, 16, 0)) {
- GTK.gtk_label_set_xalign (labelHandle, 0);
- GTK.gtk_widget_set_halign (labelHandle, GTK.GTK_ALIGN_FILL);
- } else {
- GTK.gtk_misc_set_alignment(labelHandle, 0, 0);
- }
+ GTK.gtk_label_set_xalign (labelHandle, 0);
+ GTK.gtk_widget_set_halign (labelHandle, GTK.GTK_ALIGN_FILL);
- long menuImage = GTK.gtk_image_new_from_pixbuf (pixbuf);
+ long menuImage = GTK3.gtk_image_new_from_surface(surface);
if (menuImage == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (boxHandle, menuImage);
+ GTK3.gtk_container_add (boxHandle, menuImage);
gtk_box_pack_end (boxHandle, menuLabel, true, true, 0);
- GTK.gtk_container_add (menuItem, boxHandle);
- GTK.gtk_tool_item_set_proxy_menu_item (widget, buffer, menuItem);
+ GTK3.gtk_container_add (menuItem, boxHandle);
+ GTK3.gtk_tool_item_set_proxy_menu_item (widget, buffer, menuItem);
/*
* Since the arrow button does not appear in the drop_down
* item, we request the menu-item and then, hook the
* activate signal to send the Arrow selection signal.
*/
- proxyMenuItem = GTK.gtk_tool_item_get_proxy_menu_item (widget, buffer);
+ proxyMenuItem = GTK3.gtk_tool_item_get_proxy_menu_item (widget, buffer);
OS.g_signal_connect(menuItem, OS.activate, ToolBar.menuItemSelectedFunc.getAddress(), handle);
return 1;
}
@@ -634,9 +735,9 @@ void gtk_css_provider_load_from_css (long context, String css) {
OS.g_object_unref (provider);
}
if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
+ GTK4.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
} else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
+ GTK3.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
}
}
@@ -647,10 +748,16 @@ long gtk_enter_notify_event (long widget, long event) {
if (drawHotImage) {
ImageList imageList = parent.imageList;
if (imageList != null) {
- int index = imageList.indexOf (hotImage);
+ int index = imageList.indexOf(hotImage);
if (index != -1 && imageHandle != 0) {
- long pixbuf = imageList.getPixbuf (index);
- gtk_image_set_from_gicon(imageHandle, pixbuf);
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(hotImage);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_image_set_from_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, imageList.getSurface(index));
+ }
}
}
}
@@ -664,7 +771,12 @@ long gtk_event_after (long widget, long gdkEvent) {
switch (eventType) {
case GDK.GDK_BUTTON_PRESS: {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(gdkEvent, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(gdkEvent);
+ } else {
+ GDK.gdk_event_get_button(gdkEvent, eventButton);
+ }
+
if (eventButton[0] == 3) {
double [] eventRX = new double [1];
double [] eventRY = new double [1];
@@ -681,12 +793,14 @@ long gtk_event_after (long widget, long gdkEvent) {
long gtk_focus_in_event (long widget, long event) {
parent.hasChildFocus = true;
parent.currentFocusItem = this;
+ parent.sendFocusEvent(SWT.FocusIn);
return 0;
}
@Override
long gtk_focus_out_event (long widget, long event) {
parent.hasChildFocus = false;
+ parent.sendFocusEvent(SWT.FocusOut);
return 0;
}
@@ -698,10 +812,16 @@ long gtk_leave_notify_event (long widget, long event) {
if (image != null) {
ImageList imageList = parent.imageList;
if (imageList != null) {
- int index = imageList.indexOf (image);
+ int index = imageList.indexOf(image);
if (index != -1 && imageHandle != 0) {
- long pixbuf = imageList.getPixbuf (index);
- gtk_image_set_from_gicon(imageHandle, pixbuf);
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_image_set_from_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, imageList.getSurface(index));
+ }
}
}
}
@@ -724,72 +844,91 @@ long gtk_mnemonic_activate (long widget, long arg1) {
void hookEvents () {
super.hookEvents ();
if ((style & SWT.SEPARATOR) != 0) return;
- OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false);
- /*
- * Feature in GTK. GtkToolItem does not respond to basic listeners
- * such as button-press, enter-notify to it. The fix is to assign
- * the listener to child (GtkButton) of the tool-item.
- */
- eventHandle = GTK.gtk_bin_get_child(handle);
- if ((style & SWT.DROP_DOWN) != 0) {
- long list = GTK.gtk_container_get_children(eventHandle);
- eventHandle = OS.g_list_nth_data(list, 0);
- if (arrowHandle != 0) OS.g_signal_connect_closure (arrowHandle, OS.clicked, display.getClosure (CLICKED), false);
- }
- OS.g_signal_connect_closure (handle, OS.create_menu_proxy, display.getClosure (CREATE_MENU_PROXY), false);
+
if (GTK.GTK4) {
- long keyController = GTK.gtk_event_controller_key_new();
- GTK.gtk_widget_add_controller(eventHandle, keyController);
- GTK.gtk_event_controller_set_propagation_phase(keyController, GTK.GTK_PHASE_TARGET);
+ if ((style & SWT.DROP_DOWN) != 0) {
+ if (arrowHandle != 0) {
+ long clickGesture = GTK4.gtk_gesture_click_new();
+ OS.g_signal_connect(clickGesture, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
+ GTK4.gtk_widget_add_controller(arrowHandle, clickGesture);
+ }
+
+ /*
+ * SWT.DROP_DOWN's handle is of the top level GtkBox which holds the main GtkButton & arrow GtkMenuButton.
+ * Therefore, we connect to the first child of the GtkBox, which is the main GtkButton
+ */
+ OS.g_signal_connect_closure(GTK4.gtk_widget_get_first_child(handle), OS.clicked, display.getClosure(CLICKED), false);
+ } else {
+ OS.g_signal_connect_closure(handle, OS.clicked, display.getClosure (CLICKED), false);
+ }
+
+ long focusController = GTK4.gtk_event_controller_focus_new();
+ GTK4.gtk_widget_add_controller(handle, focusController);
+ GTK.gtk_event_controller_set_propagation_phase(focusController, GTK.GTK_PHASE_TARGET);
- long focusAddress = display.focusCallback.getAddress();
- OS.g_signal_connect (keyController, OS.focus_in, focusAddress, FOCUS_IN);
- OS.g_signal_connect (keyController, OS.focus_out, focusAddress, FOCUS_OUT);
+ OS.g_signal_connect(focusController, OS.enter, display.focusProc, FOCUS_IN);
+ OS.g_signal_connect(focusController, OS.leave, display.focusProc, FOCUS_OUT);
- long motionController = GTK.gtk_event_controller_motion_new();
- GTK.gtk_widget_add_controller(eventHandle, motionController);
+ long motionController = GTK4.gtk_event_controller_motion_new();
+ GTK4.gtk_widget_add_controller(handle, motionController);
GTK.gtk_event_controller_set_propagation_phase(motionController, GTK.GTK_PHASE_TARGET);
- long enterAddress = display.enterMotionScrollCallback.getAddress();
- long leaveAddress = display.leaveCallback.getAddress();
- OS.g_signal_connect (motionController, OS.enter, enterAddress, ENTER);
- OS.g_signal_connect (motionController, OS.leave, leaveAddress, LEAVE);
+ OS.g_signal_connect(motionController, OS.enter, display.enterMotionProc, ENTER);
+ OS.g_signal_connect(motionController, OS.leave, display.leaveProc, LEAVE);
+
+ //TODO: event-after
+ long clickController = GTK4.gtk_gesture_click_new();
+ GTK4.gtk_widget_add_controller(handle, clickController);
+ OS.g_signal_connect(clickController, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
} else {
+ /*
+ * Feature in GTK. GtkToolItem does not respond to basic listeners
+ * such as button-press, enter-notify to it. The fix is to assign
+ * the listener to child (GtkButton) of the tool-item.
+ */
+ eventHandle = GTK3.gtk_bin_get_child(handle);
+ if ((style & SWT.DROP_DOWN) != 0) {
+ long list = GTK3.gtk_container_get_children(eventHandle);
+ eventHandle = OS.g_list_nth_data(list, 0);
+ OS.g_list_free(list);
+ if (arrowHandle != 0) OS.g_signal_connect_closure (arrowHandle, OS.clicked, display.getClosure (CLICKED), false);
+ }
+
+ OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false);
+ OS.g_signal_connect_closure (handle, OS.create_menu_proxy, display.getClosure (CREATE_MENU_PROXY), false);
+
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [FOCUS_IN_EVENT], 0, display.getClosure (FOCUS_IN_EVENT), false);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [FOCUS_OUT_EVENT], 0, display.getClosure (FOCUS_OUT_EVENT), false);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.getClosure (ENTER_NOTIFY_EVENT), false);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [LEAVE_NOTIFY_EVENT], 0, display.getClosure (LEAVE_NOTIFY_EVENT), false);
- }
- /*
- * Feature in GTK. Usually, GTK widgets propagate all events to their
- * parent when they are done their own processing. However, in contrast
- * to other widgets, the buttons that make up the tool items, do not propagate
- * the mouse up/down events. It is interesting to note that they DO propagate
- * mouse motion events. The fix is to explicitly forward mouse up/down events
- * to the parent.
- */
- int mask =
- GDK.GDK_EXPOSURE_MASK | GDK.GDK_POINTER_MOTION_MASK |
- GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK |
- GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK |
- GDK.GDK_KEY_PRESS_MASK | GDK.GDK_KEY_RELEASE_MASK |
- GDK.GDK_FOCUS_CHANGE_MASK;
- GTK.gtk_widget_add_events (eventHandle, mask);
- if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- } else {
+
+ /*
+ * Feature in GTK. Usually, GTK widgets propagate all events to their
+ * parent when they are done their own processing. However, in contrast
+ * to other widgets, the buttons that make up the tool items, do not propagate
+ * the mouse up/down events. It is interesting to note that they DO propagate
+ * mouse motion events. The fix is to explicitly forward mouse up/down events
+ * to the parent.
+ */
+ int mask =
+ GDK.GDK_EXPOSURE_MASK | GDK.GDK_POINTER_MOTION_MASK |
+ GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK |
+ GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK |
+ GDK.GDK_KEY_PRESS_MASK | GDK.GDK_KEY_RELEASE_MASK |
+ GDK.GDK_FOCUS_CHANGE_MASK;
+ GTK3.gtk_widget_add_events (eventHandle, mask);
+
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT), false);
- }
- if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
- } else {
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false);
}
- long topHandle = topHandle ();
- OS.g_signal_connect_closure_by_id (topHandle, display.signalIds [MAP], 0, display.getClosure (MAP), true);
+ if (!mapHooked) {
+ long topHandle = topHandle ();
+ OS.g_signal_connect_closure_by_id (topHandle, display.signalIds [MAP], 0, display.getClosure (MAP), true);
+ mapHooked = true;
+ }
}
/**
@@ -847,6 +986,8 @@ void releaseWidget () {
control = null;
hotImage = disabledImage = null;
toolTipText = null;
+
+ disposeDefault();
}
/**
@@ -907,7 +1048,7 @@ void resizeHandle(int width, int height) {
GTK.gtk_widget_get_allocation (handle, allocation);
allocation.width = width;
allocation.height = height;
- GTK.gtk_widget_size_allocate (handle, allocation);
+ gtk_widget_size_allocate(handle, allocation, -1);
}
void selectRadio () {
@@ -946,6 +1087,14 @@ public void setControl (Control control) {
if (this.control == control) return;
this.control = control;
parent.relayout ();
+ // Fix the Z-order in order to ensure proper event traversal. See bug 546914.
+ if (control != null) {
+ parent.fixZOrder();
+ if (!mapHooked) {
+ OS.g_signal_connect_closure_by_id (topHandle(), display.signalIds [MAP], 0, display.getClosure (MAP), true);
+ mapHooked = true;
+ }
+ }
}
/**
@@ -967,8 +1116,15 @@ public void setControl (Control control) {
*/
public void setDisabledImage (Image image) {
checkWidget();
+ if (this.disabledImage == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
disabledImage = image;
+ if (image != null) {
+ if (!enabled) {
+ _setImage(image);
+ }
+ disposeDefault();
+ }
}
/**
@@ -989,9 +1145,27 @@ public void setDisabledImage (Image image) {
*/
public void setEnabled (boolean enabled) {
checkWidget();
- long topHandle = topHandle ();
- if (GTK.gtk_widget_get_sensitive (topHandle) == enabled) return;
- GTK.gtk_widget_set_sensitive (topHandle, enabled);
+ long topHandle = topHandle();
+ if (this.enabled == enabled) return;
+ this.enabled = enabled;
+
+ GTK.gtk_widget_set_sensitive(topHandle, enabled);
+ _setEnabledOrDisabledImage();
+
+}
+
+private void _setEnabledOrDisabledImage() {
+ if (!enabled) {
+ if (disabledImage == null) {
+ if (defaultDisableImage == null && image != null) {
+ defaultDisableImage = new Image(getDisplay(), image, SWT.IMAGE_DISABLE);
+ }
+ _setImage(defaultDisableImage);
+ } else {
+ _setImage(disabledImage);
+ }
+ }
+ if (enabled && image != null) _setImage(image);
}
boolean setFocus () {
@@ -1011,28 +1185,16 @@ void setBackgroundRGBA (GdkRGBA rgba) {
}
void setBackgroundRGBA (long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- long context = GTK.gtk_widget_get_style_context(handle);
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
+ // Form background string
+ long context = GTK.gtk_widget_get_style_context(handle);
+ String name = display.gtk_widget_class_get_css_name(handle);
+ String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
-
- // Apply background color and any foreground color
- gtk_css_provider_load_from_css(context, css);
- }
+ // Apply background color and any foreground color
+ gtk_css_provider_load_from_css(context, css);
}
void setForegroundRGBA (long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION < OS.VERSION(3, 14, 0)) {
- GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
- GTK.gtk_widget_override_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- GTK.gtk_widget_override_color (handle, GTK.GTK_STATE_FLAG_SELECTED, selectedForeground);
- long context = GTK.gtk_widget_get_style_context (handle);
- GTK.gtk_style_context_invalidate (context);
- return;
- }
GdkRGBA toSet = new GdkRGBA();
if (rgba != null) {
toSet = rgba;
@@ -1072,6 +1234,7 @@ void setForegroundRGBA (long handle, GdkRGBA rgba) {
*/
public void setHotImage (Image image) {
checkWidget();
+ if (this.hotImage == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
hotImage = image;
if (image != null) {
@@ -1089,8 +1252,26 @@ public void setHotImage (Image image) {
@Override
public void setImage (Image image) {
checkWidget();
+ if (this.image == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
super.setImage (image);
+ disposeDefault();
+ if (!enabled && disabledImage != image && disabledImage != null) {
+ return;
+ }
+ _setEnabledOrDisabledImage();
+}
+
+private void disposeDefault() {
+ if (defaultDisableImage != null) {
+ defaultDisableImage.dispose();
+ defaultDisableImage = null;
+ }
+}
+
+void _setImage (Image image) {
+ if ((style & SWT.SEPARATOR) != 0) return;
+ currentImage = image;
if (image != null) {
ImageList imageList = parent.imageList;
if (imageList == null) imageList = parent.imageList = new ImageList ();
@@ -1100,21 +1281,30 @@ public void setImage (Image image) {
} else {
imageList.put (imageIndex, image);
}
- long pixbuf = imageList.getPixbuf (imageIndex);
- gtk_image_set_from_gicon(imageHandle, pixbuf);
+
+ if (GTK.GTK4) {
+ GTK.gtk_widget_show(imageHandle);
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_image_set_from_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, imageList.getSurface(imageIndex));
+ }
} else {
- gtk_image_set_from_gicon(imageHandle, 0);
+ if(GTK.GTK4) {
+ GTK4.gtk_image_clear(imageHandle);
+ GTK.gtk_widget_hide(imageHandle);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, 0);
+ }
}
/*
* If Text/Image of a tool-item changes, then it is
* required to reset the proxy menu. Otherwise, the
* old menuItem appears in the overflow menu.
*/
- if ((style & SWT.DROP_DOWN) != 0) {
- proxyMenuItem = 0;
- proxyMenuItem = GTK.gtk_tool_item_retrieve_proxy_menu_item (handle);
- OS.g_signal_connect(proxyMenuItem, OS.activate, ToolBar.menuItemSelectedFunc.getAddress(), handle);
- }
+ recreateMenuProxy();
parent.relayout ();
}
@@ -1154,7 +1344,11 @@ public void setSelection (boolean selected) {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CLICKED);
- GTK.gtk_toggle_tool_button_set_active (handle, selected);
+ if (GTK.GTK4) {
+ GTK.gtk_toggle_button_set_active (handle, selected);
+ } else {
+ GTK3.gtk_toggle_tool_button_set_active (handle, selected);
+ }
OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CLICKED);
}
@@ -1200,17 +1394,27 @@ public void setText (String string) {
if (labelHandle == 0) return;
char [] chars = fixMnemonic (string);
byte [] buffer = Converter.wcsToMbcs (chars, true);
- GTK.gtk_label_set_text_with_mnemonic (labelHandle, buffer);
+
+ if (GTK.GTK4) {
+ GTK.gtk_widget_show(labelHandle);
+ GTK.gtk_label_set_text_with_mnemonic(labelHandle, buffer);
+ } else {
+ GTK.gtk_label_set_text_with_mnemonic(labelHandle, buffer);
+ }
+
+ /*
+ * Only set important if this ToolItem actually has text.
+ * See bug 543895.
+ */
+ if ((parent.style & SWT.RIGHT) != 0) {
+ if (!GTK.GTK4) GTK3.gtk_tool_item_set_is_important (handle, !string.isEmpty());
+ }
/*
* If Text/Image of a tool-item changes, then it is
* required to reset the proxy menu. Otherwise, the
* old menuItem appears in the overflow menu.
*/
- if ((style & SWT.DROP_DOWN) != 0) {
- proxyMenuItem = 0;
- proxyMenuItem = GTK.gtk_tool_item_retrieve_proxy_menu_item (handle);
- OS.g_signal_connect(proxyMenuItem, OS.activate, ToolBar.menuItemSelectedFunc.getAddress(), handle);
- }
+ recreateMenuProxy();
parent.relayout ();
}
@@ -1239,12 +1443,23 @@ public void setText (String string) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setToolTipText (String string) {
+public void setToolTipText(String string) {
checkWidget();
if (toolTipText == string || (toolTipText != null && toolTipText.equals(string))) return;
+
if (parent.toolTipText == null) {
- Shell shell = parent._getShell ();
- setToolTipText (shell, string);
+ if (GTK.GTK4) {
+ setToolTipText(handle, string);
+ } else {
+ long child = GTK3.gtk_bin_get_child(handle);
+ if ((style & SWT.DROP_DOWN) != 0) {
+ long list = GTK3.gtk_container_get_children(child);
+ child = OS.g_list_nth_data(list, 0);
+ OS.g_list_free(list);
+ if (arrowHandle != 0) setToolTipText(arrowHandle, string);
+ }
+ setToolTipText(child != 0 ? child : handle, string);
+ }
}
toolTipText = string;
/*
@@ -1254,21 +1469,7 @@ public void setToolTipText (String string) {
* Otherwise, the old menuItem appears in the overflow
* menu as a blank item.
*/
- if ((style & SWT.DROP_DOWN) != 0) {
- proxyMenuItem = 0;
- proxyMenuItem = GTK.gtk_tool_item_retrieve_proxy_menu_item (handle);
- OS.g_signal_connect(proxyMenuItem, OS.activate, ToolBar.menuItemSelectedFunc.getAddress(), handle);
- }
-}
-
-void setToolTipText (Shell shell, String newString) {
- long child = GTK.gtk_bin_get_child (handle);
- if ((style & SWT.DROP_DOWN) != 0) {
- long list = GTK.gtk_container_get_children (child);
- child = OS.g_list_nth_data (list, 0);
- if (arrowHandle != 0) shell.setToolTipText (arrowHandle, newString);
- }
- shell.setToolTipText (child != 0 ? child : handle, newString);
+ recreateMenuProxy();
}
/**
@@ -1302,9 +1503,69 @@ void setWidthInPixels (int width) {
}
void showWidget (int index) {
- if (handle != 0) GTK.gtk_widget_show (handle);
- if (labelHandle != 0) GTK.gtk_widget_show (labelHandle);
- if (imageHandle != 0) GTK.gtk_widget_show (imageHandle);
- GTK.gtk_toolbar_insert(parent.handle, handle, index);
+ if (GTK.GTK4) {
+ if (index == 0) {
+ GTK4.gtk_box_prepend(parent.handle, handle);
+ } else if (index < 0) {
+ GTK4.gtk_box_append(parent.handle, handle);
+ } else {
+ for (long sibling = GTK4.gtk_widget_get_first_child(parent.handle); sibling != 0; sibling = GTK4.gtk_widget_get_next_sibling(sibling)) {
+ if (index == 1) {
+ GTK4.gtk_box_insert_child_after(parent.handle, handle, sibling);
+ break;
+ }
+
+ index--;
+ }
+ }
+ } else {
+ if (handle != 0) GTK.gtk_widget_show (handle);
+ if (labelHandle != 0) GTK.gtk_widget_show (labelHandle);
+ if (imageHandle != 0) GTK.gtk_widget_show (imageHandle);
+ GTK3.gtk_toolbar_insert(parent.handle, handle, index);
+ }
+}
+
+@Override
+String getNameText() {
+ String nameText = super.getNameText();
+ Object data = getData();
+ if(data != null) {
+ return "text: '" + nameText + "', data: " + data;
+ }
+ return nameText;
+}
+
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ if (hotImage != null) {
+ hotImage.internal_gtk_refreshImageForZoom();
+ setHotImage(hotImage);
+ }
+
+ if (disabledImage != null) {
+ disabledImage.internal_gtk_refreshImageForZoom();
+ setDisabledImage(disabledImage);
+ }
+
+ return 0;
}
+
+private void recreateMenuProxy() {
+ if ((style & SWT.DROP_DOWN) != 0 || proxyMenuItem != 0) {
+ if (GTK.GTK4) {
+ /* TODO: GTK4 have to implement our own overflow menu */
+ } else {
+ proxyMenuItem = 0;
+ proxyMenuItem = GTK3.gtk_tool_item_retrieve_proxy_menu_item (handle);
+ }
+ }
}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index 9aae4dcd43..c4f8d0dad7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
@@ -20,6 +20,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent popup windows that are used
@@ -138,6 +140,22 @@ public void addSelectionListener (SelectionListener listener) {
}
void configure () {
+ /*
+ * Bug in GTK4: A lot of the functions that SWT uses to configure tooltips
+ * in this function were removed from GTK4. Due to this, whenever configure()
+ * gets called it causes a crash. The replacement functions for
+ * gtk_widget_shape_combine_region has not been found. So for now, allow this
+ * function to be called without causing the program to crash.
+ *
+ * TODO: Find the replacement for all GTK3 functions called here
+ *
+ * See Bug 577600
+ */
+ if(GTK.GTK4) {
+ System.err.println("SWT Error: ToolTip.java: ToolTip with style SWT.BALLOON not supported on GTK 4.");
+ return;
+ }
+
GTK.gtk_widget_realize (handle);
/*
* Feature in GTK: using gdk_screen_get_monitor_at_window() does not accurately get the correct monitor on the machine.
@@ -146,17 +164,24 @@ void configure () {
*/
Point point = getLocation();
boolean multipleMonitors;
- int monitorNumber;
GdkRectangle dest = new GdkRectangle ();
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
long display = GDK.gdk_display_get_default();
- multipleMonitors = GDK.gdk_display_get_n_monitors(display) > 1;
+
+ if (GTK.GTK4) {
+ long monitorList = GDK.gdk_display_get_monitors(display);
+ multipleMonitors = OS.g_list_model_get_n_items(monitorList) > 1;
+ } else {
+ multipleMonitors = GDK.gdk_display_get_n_monitors(display) > 1;
+ }
+
+
long monitor = GDK.gdk_display_get_monitor_at_point(display, point.x, point.y);
GDK.gdk_monitor_get_geometry (monitor, dest);
} else {
long screen = GDK.gdk_screen_get_default ();
multipleMonitors = GDK.gdk_screen_get_n_monitors(screen) > 1;
- monitorNumber = GDK.gdk_screen_get_monitor_at_point(screen, point.x, point.y);
+ int monitorNumber = GDK.gdk_screen_get_monitor_at_point(screen, point.x, point.y);
GDK.gdk_screen_get_monitor_geometry(screen, monitorNumber, dest);
}
point = getSize (dest.width / 4);
@@ -165,7 +190,7 @@ void configure () {
point = getLocation ();
int x = point.x;
int y = point.y;
- GTK.gtk_window_resize (handle, w, h + TIP_HEIGHT);
+ GTK3.gtk_window_resize (handle, w, h + TIP_HEIGHT);
int[] polyline;
Rectangle bounds = display.getBounds();
int width = bounds != null && GTK.GTK4 ? bounds.width : GDK.gdk_screen_width();
@@ -195,7 +220,7 @@ void configure () {
borderPolygon[12] = w-35;
borderPolygon[14] = borderPolygon[16] = w-16;
}
- GTK.gtk_window_move (handle, Math.max(0, x - 17), y);
+ GTK3.gtk_window_move (handle, Math.max(0, x - 17), y);
} else {
polyline = new int[] {
0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0,
@@ -218,7 +243,7 @@ void configure () {
borderPolygon[36] = borderPolygon[38] = w-17;
borderPolygon [40] = w-35;
}
- GTK.gtk_window_move (handle, Math.max(0, x - 17), y - h - TIP_HEIGHT);
+ GTK3.gtk_window_move (handle, Math.max(0, x - 17), y - h - TIP_HEIGHT);
}
} else {
if (dest.height >= y + h + TIP_HEIGHT) {
@@ -244,7 +269,7 @@ void configure () {
borderPolygon[12] = borderPolygon[14] = 16;
borderPolygon [16] = 35;
}
- GTK.gtk_window_move (handle, Math.max(dest.width- w, x - w + 17), y);
+ GTK3.gtk_window_move (handle, Math.max(dest.width- w, x - w + 17), y);
} else {
polyline = new int[] {
0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0,
@@ -267,13 +292,13 @@ void configure () {
borderPolygon[36] = 35;
borderPolygon[38] = borderPolygon [40] = 17;
}
- GTK.gtk_window_move (handle, Math.max(dest.width - w, x - w + 17), y - h - TIP_HEIGHT);
+ GTK3.gtk_window_move (handle, Math.max(dest.width - w, x - w + 17), y - h - TIP_HEIGHT);
}
}
GTK.gtk_widget_realize(handle);
Region region = new Region (display);
region.add(DPIUtil.autoScaleDown(polyline));
- GTK.gtk_widget_shape_combine_region (handle, region.handle);
+ GTK3.gtk_widget_shape_combine_region (handle, region.handle);
region.dispose ();
}
@@ -281,15 +306,18 @@ void configure () {
void createHandle (int index) {
if ((style & SWT.BALLOON) != 0) {
state |= HANDLE;
- handle = GTK.gtk_window_new (GTK.GTK_WINDOW_POPUP);
- Color background = display.getSystemColor (SWT.COLOR_INFO_BACKGROUND);
- long context = GTK.gtk_widget_get_style_context (handle);
- GdkRGBA bgRGBA = background.handle;
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "window" : "GtkWindow";
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string(bgRGBA) + ";}";
- gtk_css_provider_load_from_css (context, css);
- GTK.gtk_style_context_invalidate (context);
- GTK.gtk_window_set_type_hint (handle, GDK.GDK_WINDOW_TYPE_HINT_TOOLTIP);
+ if (GTK.GTK4) {
+ //TODO: GTK4 implementation of ToolTips
+ } else {
+ handle = GTK3.gtk_window_new (GTK.GTK_WINDOW_POPUP);
+ Color background = display.getSystemColor (SWT.COLOR_INFO_BACKGROUND);
+ long context = GTK.gtk_widget_get_style_context (handle);
+ GdkRGBA bgRGBA = background.handle;
+ String css = "window {background-color: " + display.gtk_rgba_to_css_string(bgRGBA) + ";}";
+ gtk_css_provider_load_from_css (context, css);
+ GTK3.gtk_style_context_invalidate (context);
+ GTK3.gtk_window_set_type_hint (handle, GDK.GDK_WINDOW_TYPE_HINT_TOOLTIP);
+ }
}
}
@@ -302,9 +330,9 @@ void gtk_css_provider_load_from_css (long context, String css) {
OS.g_object_unref (provider);
}
if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
+ GTK4.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
} else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
+ GTK3.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
}
}
@@ -324,9 +352,13 @@ void destroyWidget () {
releaseHandle ();
if (topHandle != 0 && (state & HANDLE) != 0) {
if ((style & SWT.BALLOON) != 0) {
- GTK.gtk_widget_destroy (topHandle);
+ if (GTK.GTK4) {
+ OS.g_object_unref(topHandle);
+ } else {
+ GTK3.gtk_widget_destroy(topHandle);
+ }
} else {
- OS.g_object_unref (topHandle);
+ OS.g_object_unref(topHandle);
}
}
}
@@ -351,27 +383,31 @@ public boolean getAutoHide () {
Point getLocation () {
int x = this.x;
int y = this.y;
+
if (item != null) {
long itemHandle = item.handle;
GdkRectangle area = new GdkRectangle ();
- GTK.gtk_status_icon_get_geometry (itemHandle, 0, area, 0);
+ GTK3.gtk_status_icon_get_geometry (itemHandle, 0, area, 0);
x = area.x + area.width / 2;
y = area.y + area.height / 2;
}
+
if (x == -1 || y == -1) {
- int [] px = new int [1], py = new int [1];
if (GTK.GTK4) {
- /*
- * TODO: calling gdk_window_get_device_position() with a 0
- * for the GdkWindow uses gdk_get_default_root_window(),
- * which doesn't exist on GTK4.
- */
+ double[] px = new double[1], py = new double[1];
+ display.getPointerPosition(px, py);
+
+ x = (int)px[0];
+ y = (int)py[0];
} else {
- display.gdk_window_get_device_position (0, px, py, null);
+ int[] px = new int[1], py = new int[1];
+
+ display.getWindowPointerPosition (0, px, py, null);
+ x = px[0];
+ y = py[0];
}
- x = px [0];
- y = py [0];
}
+
return new Point(x, y);
}
@@ -484,21 +520,6 @@ public boolean getVisible () {
}
@Override
-long gtk_event (long widget, long event) {
- if (!GTK.GTK4) return 0;
- int eventType = GDK.gdk_event_get_event_type(event);
- switch (eventType) {
- case GDK.GDK4_BUTTON_PRESS: {
- return gtk_button_press_event(widget, event);
- }
- case GDK.GDK4_BUTTON_RELEASE: {
- return gtk_button_release_event(widget, event);
- }
- }
- return 0;
-}
-
-@Override
long gtk_button_press_event (long widget, long event) {
sendSelectionEvent (SWT.Selection, null, true);
setVisible (false);
@@ -529,7 +550,14 @@ void drawTooltip (long cairo) {
case SWT.ICON_WARNING: buffer = Converter.wcsToMbcs ("dialog-warning", true); break;
}
if (buffer != null) {
- long pixbuf = GTK.gtk_icon_theme_load_icon(GTK.gtk_icon_theme_get_default(), buffer, GTK.GTK_ICON_SIZE_MENU, 0, 0);
+ long iconTheme;
+ if (GTK.GTK4) {
+ iconTheme = GTK4.gtk_icon_theme_get_for_display(GDK.gdk_display_get_default());
+ } else {
+ iconTheme = GTK3.gtk_icon_theme_get_default();
+ }
+
+ long pixbuf = GTK3.gtk_icon_theme_load_icon(iconTheme, buffer, GTK.GTK_ICON_SIZE_MENU, 0, 0);
GDK.gdk_cairo_set_source_pixbuf(cairo, pixbuf, x, y);
Cairo.cairo_paint (cairo);
OS.g_object_unref (pixbuf);
@@ -582,7 +610,7 @@ long gtk_size_allocate (long widget, long allocation) {
int h = widgetAllocation.height;
if (dest.height < y + h) y -= h;
if (dest.width < x + w) x -= w;
- GTK.gtk_window_move (widget, x, y);
+ GTK3.gtk_window_move (widget, x, y);
return 0;
}
@@ -591,11 +619,14 @@ void hookEvents () {
if ((style & SWT.BALLOON) != 0) {
OS.g_signal_connect_closure_by_id (handle, display.signalIds [EXPOSE_EVENT], 0, display.getClosure (EXPOSE_EVENT), true);
OS.g_signal_connect_closure_by_id (handle, display.signalIds [EXPOSE_EVENT_INVERSE], 0, display.getClosure (EXPOSE_EVENT_INVERSE), true);
- GTK.gtk_widget_add_events (handle, GDK.GDK_BUTTON_PRESS_MASK);
+
if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
+ long clickController = GTK4.gtk_gesture_click_new();
+ GTK4.gtk_widget_add_controller(handle, clickController);
+ OS.g_signal_connect(clickController, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
} else {
- OS.g_signal_connect_closure (handle, OS.button_press_event, display.getClosure (BUTTON_PRESS_EVENT), false);
+ GTK3.gtk_widget_add_events(handle, GDK.GDK_BUTTON_PRESS_MASK);
+ OS.g_signal_connect_closure(handle, OS.button_press_event, display.getClosure (BUTTON_PRESS_EVENT), false);
}
}
}
@@ -842,7 +873,13 @@ public void setVisible (boolean visible) {
byte [] buffer = Converter.wcsToMbcs (string.toString(), true);
GTK.gtk_widget_set_tooltip_text(vboxHandle, buffer);
}
- if (autohide) timerId = OS.g_timeout_add (DELAY, display.windowTimerProc, handle);
+ if (autohide) {
+ if (GTK.GTK4) {
+ timerId = OS.g_timeout_add (DELAY, display.windowTimerProc, handle);
+ } else {
+ timerId = GDK.gdk_threads_add_timeout (DELAY, display.windowTimerProc, handle);
+ }
+ }
} else {
if ((style & SWT.BALLOON) != 0) {
GTK.gtk_widget_hide (handle);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java
index 1a6f659f8c..d1b5d9eb81 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java
@@ -20,6 +20,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class implement rubber banding rectangles that are
@@ -54,7 +56,7 @@ public class Tracker extends Widget {
Rectangle bounds;
int cursorOrientation = SWT.NONE;
int oldX, oldY;
- long provider; // Gtk3.14
+ long provider;
// Re-use/cache some items for performance reasons as draw-events must be efficient to prevent jitter.
Rectangle cachedCombinedDisplayResolution = Display.getDefault().getBounds(); // Cached for performance reasons.
@@ -206,16 +208,21 @@ Point adjustMoveCursor () {
int newX = bounds.x + bounds.width / 2;
int newY = bounds.y;
- Point point = display.mapInPixels (parent, null, newX, newY);
- display.setCursorLocation (point);
+ Point point = display.mapInPixels(parent, null, newX, newY);
+ display.setCursorLocation(point);
- int [] actualX = new int [1], actualY = new int [1], state = new int [1];
+ int[] actualX = new int[1], actualY = new int[1], state = new int[1];
if (GTK.GTK4) {
- display.gdk_surface_get_device_position (surface, actualX, actualY, state);
+ double[] actualXDouble = new double[1], actualYDouble = new double[1];
+ display.getPointerPosition(actualXDouble, actualYDouble);
+
+ actualX[0] = (int)actualXDouble[0];
+ actualY[0] = (int)actualYDouble[0];
} else {
- display.gdk_window_get_device_position (window, actualX, actualY, state);
+ display.getWindowPointerPosition(window, actualX, actualY, state);
}
- return new Point (actualX [0], actualY [0]);
+
+ return new Point(actualX[0], actualY[0]);
}
Point adjustResizeCursor () {
@@ -248,11 +255,16 @@ Point adjustResizeCursor () {
*/
int [] actualX = new int [1], actualY = new int [1], state = new int [1];
if (GTK.GTK4) {
- display.gdk_surface_get_device_position (surface, actualX, actualY, state);
+ double[] actualXDouble = new double[1], actualYDouble = new double[1];
+ display.getPointerPosition(actualXDouble, actualYDouble);
+
+ actualX[0] = (int)actualXDouble[0];
+ actualY[0] = (int)actualYDouble[0];
} else {
- display.gdk_window_get_device_position (window, actualX, actualY, state);
+ display.getWindowPointerPosition(window, actualX, actualY, state);
}
- return new Point (actualX [0], actualY [0]);
+
+ return new Point(actualX[0], actualY[0]);
}
@@ -342,7 +354,7 @@ void drawRectangles (Rectangle [] rects) {
if (gdkResource == 0) return;
if (overlay == 0) return;
- GTK.gtk_widget_shape_combine_region (overlay, 0);
+ GTK3.gtk_widget_shape_combine_region (overlay, 0);
// Bug 498217.
// As of Gtk 3.9.1, Commit a60ccd3672467efb454b121993febc36f33cbc79, off-screen GDK windows are not processed.
@@ -408,14 +420,14 @@ void drawRectangles (Rectangle [] rects) {
setTrackerBackground(false);
}
- GTK.gtk_widget_shape_combine_region (overlay, region);
+ GTK3.gtk_widget_shape_combine_region (overlay, region);
Cairo.cairo_region_destroy (region);
if (GTK.GTK4) {
- long overlaySurface = GTK.gtk_widget_get_surface (overlay);
+ long overlaySurface = GTK4.gtk_native_get_surface(GTK4.gtk_widget_get_native (overlay));
GDK.gdk_surface_hide (overlaySurface);
- GDK.gdk_surface_show (overlaySurface);
+ /* TODO: GTK does not provide a gdk_surface_show, probably will require use of the present api */
} else {
- long overlayWindow = GTK.gtk_widget_get_window (overlay);
+ long overlayWindow = GTK3.gtk_widget_get_window (overlay);
GDK.gdk_window_hide (overlayWindow);
GDK.gdk_window_show (overlayWindow);
}
@@ -485,10 +497,17 @@ long gtk_button_release_event (long widget, long event) {
long gtk_key_press_event (long widget, long eventPtr) {
long result = super.gtk_key_press_event (widget, eventPtr);
if (result != 0) return result;
- int [] state = new int[1];
- GDK.gdk_event_get_state(eventPtr, state);
- int [] keyval = new int[1];
- GDK.gdk_event_get_keyval(eventPtr, keyval);
+
+ int [] state = new int [1];
+ int [] keyval = new int [1];
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(eventPtr);
+ keyval[0] = GDK.gdk_key_event_get_keyval(eventPtr);
+ } else {
+ GDK.gdk_event_get_state(eventPtr, state);
+ GDK.gdk_event_get_keyval(eventPtr, keyval);
+ }
+
int stepSize = ((state[0] & GDK.GDK_CONTROL_MASK) != 0) ? STEPSIZE_SMALL : STEPSIZE_LARGE;
int xChange = 0, yChange = 0;
switch (keyval[0]) {
@@ -631,10 +650,15 @@ long gtk_motion_notify_event (long widget, long eventPtr) {
long gtk_mouse (int eventType, long widget, long eventPtr) {
int [] newX = new int [1], newY = new int [1];
if (GTK.GTK4) {
- display.gdk_surface_get_device_position (surface, newX, newY, null);
+ double[] newXDouble = new double[1], newYDouble = new double[1];
+ display.getPointerPosition(newXDouble, newYDouble);
+
+ newX[0] = (int)newXDouble[0];
+ newY[0] = (int)newYDouble[0];
} else {
- display.gdk_window_get_device_position (window, newX, newY, null);
+ display.getWindowPointerPosition(window, newX, newY, null);
}
+
if (oldX != newX [0] || oldY != newY [0]) {
Rectangle [] oldRectangles = rectangles;
Rectangle [] rectsToErase = new Rectangle [rectangles.length];
@@ -779,9 +803,13 @@ public boolean open () {
tracking = true;
int [] oldX = new int [1], oldY = new int [1], state = new int [1];
if (GTK.GTK4) {
- display.gdk_surface_get_device_position (surface, oldX, oldY, state);
+ double [] oldXDouble = new double [1], oldYDouble = new double [1];
+ display.getPointerPosition(oldXDouble, oldYDouble);
+
+ oldX[0] = (int) oldXDouble[0];
+ oldY[0] = (int) oldYDouble[0];
} else {
- display.gdk_window_get_device_position (window, oldX, oldY, state);
+ display.getWindowPointerPosition (window, oldX, oldY, state);
}
/*
@@ -818,19 +846,19 @@ public boolean open () {
lastCursor = this.cursor != null ? this.cursor.handle : 0;
cachedCombinedDisplayResolution = Display.getDefault().getBounds(); // In case resolution was changed during run time.
- overlay = GTK.gtk_window_new (GTK.GTK_WINDOW_POPUP);
- GTK.gtk_window_set_skip_taskbar_hint (overlay, true);
+ overlay = GTK3.gtk_window_new (GTK.GTK_WINDOW_POPUP);
+ GTK3.gtk_window_set_skip_taskbar_hint (overlay, true);
GTK.gtk_window_set_title (overlay, new byte [1]);
if (parent != null) GTK.gtk_window_set_transient_for(overlay, parent.topHandle());
GTK.gtk_widget_realize (overlay);
if (!GTK.GTK4) {
- long overlayWindow = GTK.gtk_widget_get_window (overlay);
+ long overlayWindow = GTK3.gtk_widget_get_window (overlay);
GDK.gdk_window_set_override_redirect (overlayWindow, true);
}
setTrackerBackground(true);
Rectangle bounds = display.getBoundsInPixels();
- GTK.gtk_window_move (overlay, bounds.x, bounds.y);
- GTK.gtk_window_resize (overlay, bounds.width, bounds.height);
+ GTK3.gtk_window_move (overlay, bounds.x, bounds.y);
+ GTK3.gtk_window_resize (overlay, bounds.width, bounds.height);
GTK.gtk_widget_show (overlay);
/* Tracker behaves like a Dialog with its own OS event loop. */
@@ -843,14 +871,11 @@ public boolean open () {
display.runSkin ();
display.runDeferredLayouts ();
display.sendPreExternalEventDispatchEvent ();
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock before calling the function below.
- */
- if (!GTK.GTK4) GDK.gdk_threads_leave();
- OS.g_main_context_iteration (0, true);
+ if (GTK.GTK4) {
+ OS.g_main_context_iteration (0, true);
+ } else {
+ GTK3.gtk_main_iteration_do (true);
+ }
display.sendPostExternalEventDispatchEvent ();
display.runAsyncMessages (false);
}
@@ -859,7 +884,7 @@ public boolean open () {
}
ungrab ();
if (overlay != 0) {
- GTK.gtk_widget_destroy (overlay);
+ GTK3.gtk_widget_destroy (overlay);
overlay = 0;
}
window = 0;
@@ -872,45 +897,49 @@ private void setTrackerBackground(boolean opaque) {
} else if (opaque == cachedBackgroundIsOpaque.booleanValue()) {
return;
}
- if (GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) {
- GTK.gtk_widget_override_background_color (overlay, GTK.GTK_STATE_FLAG_NORMAL, new GdkRGBA());
+ String css;
+ if (opaque) {
+ GTK.gtk_widget_set_opacity (overlay, 1.0);
+ css = "window {background-color: rgb(0,0,0);}";
} else {
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "window" : "GtkWindow";
- String css;
- if (opaque) {
- GTK.gtk_widget_set_opacity (overlay, 1.0);
- css = name + " {background-color: rgb(0,0,0);}";
- } else {
- GTK.gtk_widget_set_opacity (overlay, 0.0);
- css = name + " { "
- + "border-top-color: transparent;"
- + "border-left-color: transparent;"
- + "border-right-color: transparent;"
- + "border-bottom-color: transparent;}";
- }
- long context = GTK.gtk_widget_get_style_context (overlay);
- if (provider == 0) {
- provider = GTK.gtk_css_provider_new ();
- GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref (provider);
- }
- if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
- } else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
- }
- GTK.gtk_style_context_invalidate (context);
+ GTK.gtk_widget_set_opacity (overlay, 0.0);
+ css = "window { "
+ + "border-top-color: transparent;"
+ + "border-left-color: transparent;"
+ + "border-right-color: transparent;"
+ + "border-bottom-color: transparent;}";
}
+ long context = GTK.gtk_widget_get_style_context (overlay);
+ if (provider == 0) {
+ provider = GTK.gtk_css_provider_new ();
+ GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ OS.g_object_unref (provider);
+ }
+ if (GTK.GTK4) {
+ GTK4.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1);
+ } else {
+ GTK3.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null);
+ GTK3.gtk_style_context_invalidate (context);
+ }
+
long region = Cairo.cairo_region_create ();
- GTK.gtk_widget_shape_combine_region (overlay, region);
- GTK.gtk_widget_input_shape_combine_region (overlay, region);
+
+ if (GTK.GTK4) {
+ //TODO: GTK4
+ //GDK.gdk_surface_set_opaque_region(context, region);
+ //GDK.gdk_surface_set_input_region(context, region);
+ } else {
+ GTK3.gtk_widget_shape_combine_region (overlay, region);
+ GTK3.gtk_widget_input_shape_combine_region (overlay, region);
+ }
+
Cairo.cairo_region_destroy (region);
}
boolean processEvent (long eventPtr) {
int eventType = GDK.gdk_event_get_event_type(eventPtr);
eventType = Control.fixGdkEventTypeValues(eventType);
- long widget = GTK.gtk_get_event_widget (eventPtr);
+ long widget = GTK3.gtk_get_event_widget (eventPtr);
switch (eventType) {
case GDK.GDK_MOTION_NOTIFY: gtk_motion_notify_event (widget, eventPtr); break;
case GDK.GDK_BUTTON_RELEASE: gtk_button_release_event (widget, eventPtr); break;
@@ -925,7 +954,7 @@ boolean processEvent (long eventPtr) {
break;
case GDK.GDK_EXPOSE:
update ();
- GTK.gtk_main_do_event (eventPtr);
+ GTK3.gtk_main_do_event (eventPtr);
break;
default:
return true;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
index 90557f847b..a2fd985e19 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
@@ -18,6 +18,7 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
/**
* Instances of this class represent icons that can be placed on the
@@ -157,10 +158,10 @@ void createWidget (int index) {
@Override
void createHandle (int index) {
state |= HANDLE;
- handle = GTK.gtk_status_icon_new ();
+ handle = GTK3.gtk_status_icon_new ();
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
imageHandle = GTK.gtk_image_new ();
- GTK.gtk_status_icon_set_visible (handle,true);
+ GTK3.gtk_status_icon_set_visible (handle,true);
}
@Override
@@ -253,10 +254,10 @@ long gtk_activate (long widget) {
* the single-click as the current event and for the double-click in the
* event queue.
*/
- long nextEvent = gdk_event_peek ();
+ long nextEvent = GDK.gdk_event_peek();
if (nextEvent != 0) {
int nextEventType = GDK.GDK_EVENT_TYPE (nextEvent);
- long currEvent = GTK.gtk_get_current_event ();
+ long currEvent = GTK3.gtk_get_current_event ();
int currEventType = 0;
if (currEvent != 0) {
currEventType = GDK.GDK_EVENT_TYPE (currEvent);
@@ -275,9 +276,11 @@ long gtk_activate (long widget) {
@Override
long gtk_button_press_event (long widget, long event) {
int eventType = GDK.gdk_event_get_event_type(event);
- eventType = Control.fixGdkEventTypeValues(eventType);
+
int [] eventButton = new int [1];
GDK.gdk_event_get_button(event, eventButton);
+
+
if (eventType == GDK.GDK_3BUTTON_PRESS) return 0;
if (eventButton[0] == 3 && eventType == GDK.GDK_BUTTON_PRESS) {
sendEvent (SWT.MenuDetect);
@@ -292,16 +295,24 @@ long gtk_button_press_event (long widget, long event) {
}
@Override
-long gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
- if (n_press == 1) return 0;
- long widget = GTK.gtk_event_controller_get_widget(gesture);
- long result = gtk_button_press_event (widget, event);
-
- if (n_press == 2) {
- sendSelectionEvent (SWT.DefaultSelection);
+void gtk_gesture_press_event(long gesture, int n_press, double x, double y, long event) {
+ switch (n_press) {
+ case 1: {
+ int eventButton = GDK.gdk_button_event_get_button(event);
+ if (eventButton == 3) {
+ sendEvent(SWT.MenuDetect);
+ } else {
+ sendEvent(SWT.Selection);
+ }
+ break;
+ }
+ case 2: {
+ sendSelectionEvent(SWT.DefaultSelection);
+ break;
+ }
+ default:
+ break;
}
-
- return result;
}
@Override
@@ -342,7 +353,7 @@ void hookEvents () {
*/
public boolean getVisible () {
checkWidget ();
- return GTK.gtk_status_icon_get_visible (handle);
+ return GTK3.gtk_status_icon_get_visible (handle);
}
@Override
@@ -460,9 +471,8 @@ public void setHighlightImage (Image image) {
*/
@Override
public void setImage (Image image) {
- checkWidget ();
- if (image != null && image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- this.image = image;
+ super.setImage(image);
+
if (image != null) {
if (imageList == null) imageList = new ImageList ();
int imageIndex = imageList.indexOf (image);
@@ -471,13 +481,13 @@ public void setImage (Image image) {
} else {
imageList.put (imageIndex, image);
}
- long pixbuf = imageList.getPixbuf (imageIndex);
- GTK.gtk_status_icon_set_from_pixbuf (handle, pixbuf);
- GTK.gtk_status_icon_set_visible (handle, true);
+ long pixbuf = ImageList.createPixbuf(image);
+ GTK3.gtk_status_icon_set_from_pixbuf (handle, pixbuf);
+ GTK3.gtk_status_icon_set_visible (handle, true);
} else {
GTK.gtk_widget_set_size_request (handle, 1, 1);
- GTK.gtk_status_icon_set_from_pixbuf (handle, 0);
- GTK.gtk_status_icon_set_visible (handle, false);
+ GTK3.gtk_status_icon_set_from_pixbuf (handle, 0);
+ GTK3.gtk_status_icon_set_visible (handle, false);
}
}
@@ -534,7 +544,7 @@ public void setToolTipText (String string) {
if (string != null && string.length () > 0) {
buffer = Converter.wcsToMbcs (string, true);
}
- GTK.gtk_status_icon_set_tooltip_text (handle, buffer);
+ GTK3.gtk_status_icon_set_tooltip_text (handle, buffer);
}
/**
@@ -550,7 +560,7 @@ public void setToolTipText (String string) {
*/
public void setVisible (boolean visible) {
checkWidget ();
- if(GTK.gtk_status_icon_get_visible (handle) == visible) return;
+ if(GTK3.gtk_status_icon_get_visible (handle) == visible) return;
if (visible) {
/*
* It is possible (but unlikely), that application
@@ -559,9 +569,9 @@ public void setVisible (boolean visible) {
*/
sendEvent (SWT.Show);
if (isDisposed ()) return;
- GTK.gtk_status_icon_set_visible (handle, visible);
+ GTK3.gtk_status_icon_set_visible (handle, visible);
} else {
- GTK.gtk_status_icon_set_visible (handle, visible);
+ GTK3.gtk_status_icon_set_visible (handle, visible);
sendEvent (SWT.Hide);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 080570b8a4..cab5bf8567 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -20,6 +20,8 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class provide a selectable user interface object
@@ -65,7 +67,7 @@ import org.eclipse.swt.internal.gtk.*;
* <dt><b>Styles:</b></dt>
* <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL</dd>
* <dt><b>Events:</b></dt>
- * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem</dd>
+ * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem, EmptinessChanged</dd>
* </dl>
* <p>
* Note: Only one of the styles SINGLE and MULTI may be specified.
@@ -84,25 +86,31 @@ public class Tree extends Composite {
int selectionCountOnPress,selectionCountOnRelease;
long ignoreCell;
TreeItem[] items;
+ int nextId;
TreeColumn [] columns;
TreeColumn sortColumn;
TreeItem currentItem;
ImageList imageList, headerImageList;
boolean firstCustomDraw;
+ /** True iff computeSize has never been called on this Tree */
+ boolean firstCompute = true;
boolean modelChanged;
boolean expandAll;
int drawState, drawFlags;
GdkRGBA background, foreground, drawForegroundRGBA;
- boolean ownerDraw, ignoreSize, ignoreAccessibility, pixbufSizeSet, hasChildren;
+ /** The owner of the widget is responsible for drawing */
+ boolean isOwnerDrawn;
+ boolean ignoreSize, pixbufSizeSet, hasChildren;
int pixbufHeight, pixbufWidth, headerHeight;
boolean headerVisible;
TreeItem topItem;
double cachedAdjustment, currentAdjustment;
Color headerBackground, headerForeground;
- String headerCSSBackground, headerCSSForeground;
boolean boundsChangedSinceLastDraw, wasScrolled;
boolean rowActivated;
+ private long headerCSSProvider;
+
static final int ID_COLUMN = 0;
static final int CHECKED_COLUMN = 1;
static final int GRAYED_COLUMN = 2;
@@ -115,7 +123,8 @@ public class Tree extends Composite {
static final int CELL_FOREGROUND = 2;
static final int CELL_BACKGROUND = 3;
static final int CELL_FONT = 4;
- static final int CELL_TYPES = CELL_FONT + 1;
+ static final int CELL_SURFACE = 5;
+ static final int CELL_TYPES = CELL_SURFACE + 1;
/**
* Constructs a new instance of this class given its parent
@@ -157,12 +166,12 @@ public Tree (Composite parent, int style) {
@Override
void _addListener (int eventType, Listener listener) {
super._addListener (eventType, listener);
- if (!ownerDraw) {
+ if (!isOwnerDrawn) {
switch (eventType) {
case SWT.MeasureItem:
case SWT.EraseItem:
case SWT.PaintItem:
- ownerDraw = true;
+ isOwnerDrawn = true;
recreateRenderers ();
break;
}
@@ -197,20 +206,51 @@ TreeItem _getItem (long parentIter, int index) {
return items [id] = new TreeItem (this, parentIter, SWT.NONE, index, false);
}
+void reallocateIds(int newSize) {
+ TreeItem [] newItems = new TreeItem [newSize];
+ System.arraycopy (items, 0, newItems, 0, items.length);
+ items = newItems;
+}
+
+int findAvailableId() {
+ // Adapt to cases where items[] array was resized since last search
+ // This also fixes cases where +1 below went too far
+ if (nextId >= items.length)
+ nextId = 0;
+
+ // Search from 'nextId' to end
+ for (int id = nextId; id < items.length; id++) {
+ if (items [id] == null) return id;
+ }
+
+ // Search from begin to nextId
+ for (int id = 0; id < nextId; id++) {
+ if (items [id] == null) return id;
+ }
+
+ // Still not found; no empty spots remaining
+ int newId = items.length;
+ if (drawCount <= 0) {
+ reallocateIds (items.length + 4);
+ } else {
+ // '.setRedraw(false)' is typically used during bulk operations.
+ // Reallocate to 1.5x the old size to avoid frequent reallocations.
+ reallocateIds ((items.length + 1) * 3 / 2);
+ }
+
+ return newId;
+}
+
int getId (long iter, boolean queryModel) {
if (queryModel) {
int[] value = new int[1];
GTK.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, value, -1);
if (value [0] != -1) return value [0];
}
- // find next available id
- int id = 0;
- while (id < items.length && items [id] != null) id++;
- if (id == items.length) {
- TreeItem [] newItems = new TreeItem [items.length + 4];
- System.arraycopy (items, 0, newItems, 0, items.length);
- items = newItems;
- }
+
+ int id = findAvailableId();
+ nextId = id + 1;
+
GTK.gtk_tree_store_set (modelHandle, iter, ID_COLUMN, id, -1);
return id;
}
@@ -286,7 +326,7 @@ long cellDataProc (long tree_column, long cell, long tree_model, long iter, long
}
}
if (customDraw) {
- if (!ownerDraw) {
+ if (!isOwnerDrawn) {
ptr [0] = 0;
GTK.gtk_tree_model_get (tree_model, iter, modelIndex + CELL_BACKGROUND, ptr, -1);
if (ptr [0] != 0) {
@@ -338,15 +378,6 @@ boolean checkData (TreeItem item) {
OS.g_signal_handlers_unblock_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
if (item.isDisposed ()) return false;
}
- /*
- * A commit in GTK3.18 caused bug 531048 due to internal changes in GtkStyleContext
- * invalidation. The fix is to invalidate the GtkStyleContext manually when changing
- * SWT.VIRTUAL Table content. Without it, the internal caching mechanism causes
- * the wrong cells to be rendered.
- */
- if (!GTK.GTK4 && GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
- GTK.gtk_style_context_invalidate(GTK.gtk_widget_get_style_context(handle));
- }
return true;
}
@@ -455,12 +486,12 @@ int calculateWidth (long column, long iter, boolean recurse) {
/* expander */
if (!GTK.gtk_tree_view_column_get_visible(column)) {
if (GTK.GTK4) {
- long image = GTK.gtk_image_new_from_icon_name(GTK.GTK_NAMED_ICON_PAN_DOWN, GTK.GTK_ICON_SIZE_MENU);
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation(image, allocation);
- width += allocation.width + TreeItem.EXPANDER_EXTRA_PADDING;
+ long image = GTK4.gtk_image_new_from_icon_name(GTK.GTK_NAMED_ICON_PAN_DOWN);
+ GtkRequisition requisition = new GtkRequisition ();
+ GTK.gtk_widget_get_preferred_size(image, requisition, null);
+ width += requisition.width + TreeItem.EXPANDER_EXTRA_PADDING;
} else {
- GTK.gtk_widget_style_get (handle, OS.expander_size, w, 0);
+ GTK3.gtk_widget_style_get (handle, OS.expander_size, w, 0);
width += w [0] + TreeItem.EXPANDER_EXTRA_PADDING;
}
}
@@ -470,7 +501,7 @@ int calculateWidth (long column, long iter, boolean recurse) {
* to the size of the widget.
*/
if (!GTK.GTK4) {
- GTK.gtk_widget_style_get(handle, OS.focus_line_width, w, 0);
+ GTK3.gtk_widget_style_get(handle, OS.focus_line_width, w, 0);
width += 2 * w [0];
}
long list = GTK.gtk_cell_layout_get_cells(column);
@@ -506,7 +537,7 @@ int calculateWidth (long column, long iter, boolean recurse) {
* Grid line width is handled via CSS in GTK4.
*/
if (!GTK.GTK4) {
- GTK.gtk_widget_style_get (handle, OS.grid_line_width, w, 0) ;
+ GTK3.gtk_widget_style_get (handle, OS.grid_line_width, w, 0) ;
width += 2 * w [0];
}
}
@@ -600,102 +631,107 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
+ /*
+ * Bug 546490: Set all the TreeColumn buttons visible otherwise
+ * gtk_widget_get_preferred_size() will not take their size
+ * into account.
+ */
+ if (!GTK.GTK4) {
+ if (firstCompute) {
+ for (TreeColumn column : columns) {
+ if (column != null) GTK.gtk_widget_set_visible(column.buttonHandle, true);
+ }
+ firstCompute = false;
+ }
+ }
+
GTK.gtk_widget_realize(handle);
Point size = computeNativeSize (handle, wHint, hHint, changed);
- if (size.x == 0 && wHint == SWT.DEFAULT) size.x = DEFAULT_WIDTH;
/*
* In GTK 3, computeNativeSize(..) sometimes just returns the header
* height as height. In that case, calculate the tree height based on
* the number of items at the root of the tree.
- * FIXME: This calculation neglects children of expanded tree items.
- * When fixing that, be careful not to use getItems (), since that
- * would realize too many VIRTUAL TreeItems (similar to bug 490203).
*/
if (hHint == SWT.DEFAULT && size.y == getHeaderHeight()) {
- size.y = getItemCount() * getItemHeightInPixels() + getHeaderHeight();
+ int itemHeight = getItemHeightInPixels();
+
+ // Initialize to height of root items & header
+ size.y = getItemCount() * itemHeight + getHeaderHeight();
+
+ for (TreeItem item : items) {
+ if (item != null && item.isExpanded) {
+ size.y += GTK.gtk_tree_model_iter_n_children (modelHandle, item.handle) * itemHeight;
+ }
+ }
}
- /*
- * In case the table doesn't contain any elements,
- * getItemCount returns 0 and size.y will be 0
- * so need to assign default height
- */
- if (size.y == 0 && hHint == SWT.DEFAULT) size.y = DEFAULT_HEIGHT;
Rectangle trim = computeTrimInPixels (0, 0, size.x, size.y);
size.x = trim.width;
+ /*
+ * Feature in GTK: sometimes GtkScrolledWindow's with no scrollbars
+ * won't automatically adjust their size. This happens when a Tree
+ * has a header, and the initial computed height was the height of
+ * the of the header.
+ *
+ * The fix is to increment the height by 1 in order to force a size
+ * update for the parent GtkScrollWindow, otherwise the headers
+ * will not be shown. This only happens once, see bug 546490.
+ */
+ if (size.y == this.headerHeight && this.headerVisible && (style & SWT.NO_SCROLL) != 0) {
+ trim.height = trim.height + 1;
+ }
size.y = trim.height;
return size;
}
-void copyModel (long oldModel, int oldStart, long newModel, int newStart, long [] types, long oldParent, long newParent, int modelLength) {
+void copyModel (long oldModel, int oldStart, long newModel, int newStart, long oldParent, long newParent, int modelLength) {
long iter = OS.g_malloc(GTK.GtkTreeIter_sizeof ());
+ long value = OS.g_malloc (OS.GValue_sizeof ());
+ // GValue needs to be initialized with G_VALUE_INIT, which is zeroes
+ OS.memset (value, 0, OS.GValue_sizeof ());
+
if (GTK.gtk_tree_model_iter_children (oldModel, iter, oldParent)) {
long [] oldItems = new long [GTK.gtk_tree_model_iter_n_children (oldModel, oldParent)];
int oldIndex = 0;
- long [] ptr = new long [1];
- int [] ptr1 = new int [1];
+ int [] intBuffer = new int [1];
do {
- long newItem = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- if (newItem == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_tree_store_append (newModel, newItem, newParent);
- GTK.gtk_tree_model_get (oldModel, iter, ID_COLUMN, ptr1, -1);
- int index = ptr1[0];
+ long newIterator = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
+ if (newIterator == 0) error (SWT.ERROR_NO_HANDLES);
+ GTK.gtk_tree_store_append (newModel, newIterator, newParent);
+ GTK.gtk_tree_model_get (oldModel, iter, ID_COLUMN, intBuffer, -1);
+ int index = intBuffer[0];
TreeItem item = null;
if (index != -1) {
item = items [index];
if (item != null) {
- long oldItem = item.handle;
- oldItems[oldIndex++] = oldItem;
- /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
- for (int j = 0; j < FOREGROUND_COLUMN; j++) {
- GTK.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
- GTK.gtk_tree_store_set (newModel, newItem, j, ptr1 [0], -1);
+ long oldIterator = item.handle;
+ oldItems[oldIndex++] = oldIterator;
+
+ // Copy header fields
+ for (int iColumn = 0; iColumn < FIRST_COLUMN; iColumn++) {
+ GTK.gtk_tree_model_get_value (oldModel, oldIterator, iColumn, value);
+ GTK.gtk_tree_store_set_value (newModel, newIterator, iColumn, value);
+ OS.g_value_unset (value);
}
- for (int j = FOREGROUND_COLUMN; j < FIRST_COLUMN; j++) {
- GTK.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
- GTK.gtk_tree_store_set (newModel, newItem, j, ptr [0], -1);
- if (ptr [0] != 0) {
- if (types[j] == GDK.GDK_TYPE_RGBA()) {
- GDK.gdk_rgba_free(ptr[0]);
- }
- if (types [j] == OS.G_TYPE_STRING ()) {
- OS.g_free ((ptr [0]));
- } else if (types[j] == GDK.GDK_TYPE_PIXBUF()) {
- OS.g_object_unref(ptr[0]);
- } else if (types[j] == OS.PANGO_TYPE_FONT_DESCRIPTION()) {
- OS.pango_font_description_free(ptr[0]);
- }
- }
- }
- for (int j= 0; j<modelLength - FIRST_COLUMN; j++) {
- int newIndex = newStart + j;
- GTK.gtk_tree_model_get (oldModel, oldItem, oldStart + j, ptr, -1);
- GTK.gtk_tree_store_set (newModel, newItem, newIndex, ptr [0], -1);
- if (ptr[0] != 0) {
- if (types[newIndex] == GDK.GDK_TYPE_RGBA()) {
- GDK.gdk_rgba_free(ptr[0]);
- }
- if (types [newIndex] == OS.G_TYPE_STRING ()) {
- OS.g_free ((ptr [0]));
- } else if (types[newIndex] == GDK.GDK_TYPE_PIXBUF()) {
- OS.g_object_unref(ptr[0]);
- } else if (types[newIndex] == OS.PANGO_TYPE_FONT_DESCRIPTION()) {
- OS.pango_font_description_free(ptr[0]);
- }
- }
+
+ // Copy requested columns
+ for (int iOffset = 0; iOffset < modelLength - FIRST_COLUMN; iOffset++) {
+ GTK.gtk_tree_model_get_value (oldModel, oldIterator, oldStart + iOffset, value);
+ GTK.gtk_tree_store_set_value (newModel, newIterator, newStart + iOffset, value);
+ OS.g_value_unset (value);
}
}
} else {
- GTK.gtk_tree_store_set (newModel, newItem, ID_COLUMN, -1, -1);
+ GTK.gtk_tree_store_set (newModel, newIterator, ID_COLUMN, -1, -1);
}
// recurse through children
- copyModel(oldModel, oldStart, newModel, newStart, types, iter, newItem, modelLength);
+ copyModel(oldModel, oldStart, newModel, newStart, iter, newIterator, modelLength);
if (item!= null) {
- item.handle = newItem;
+ item.handle = newIterator;
} else {
- OS.g_free (newItem);
+ OS.g_free (newIterator);
}
} while (GTK.gtk_tree_model_iter_next(oldModel, iter));
for (int i = 0; i < oldItems.length; i++) {
@@ -706,6 +742,8 @@ void copyModel (long oldModel, int oldStart, long newModel, int newStart, long [
}
}
}
+
+ OS.g_free (value);
OS.g_free (iter);
}
@@ -736,7 +774,7 @@ void createColumn (TreeColumn column, int index) {
long [] types = getColumnTypes (columnCount + 4); // grow by 4 rows at a time
long newModel = GTK.gtk_tree_store_newv (types.length, types);
if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
- copyModel (oldModel, FIRST_COLUMN, newModel, FIRST_COLUMN, types, (long )0, (long )0, modelLength);
+ copyModel (oldModel, FIRST_COLUMN, newModel, FIRST_COLUMN, (long )0, (long )0, modelLength);
GTK.gtk_tree_view_set_model (handle, newModel);
setModel (newModel);
}
@@ -781,8 +819,12 @@ void createHandle (int index) {
state |= HANDLE;
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
- gtk_widget_set_has_surface_or_window (fixedHandle, true);
- scrolledHandle = GTK.gtk_scrolled_window_new (0, 0);
+ if (GTK.GTK4) {
+ scrolledHandle = GTK4.gtk_scrolled_window_new();
+ } else {
+ GTK3.gtk_widget_set_has_window(fixedHandle, true);
+ scrolledHandle = GTK3.gtk_scrolled_window_new (0, 0);
+ }
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
long [] types = getColumnTypes (1);
modelHandle = GTK.gtk_tree_store_newv (types.length, types);
@@ -795,8 +837,14 @@ void createHandle (int index) {
OS.g_object_ref (checkRenderer);
}
createColumn (null, 0);
- GTK.gtk_container_add (fixedHandle, scrolledHandle);
- GTK.gtk_container_add (scrolledHandle, handle);
+
+ if (GTK.GTK4) {
+ OS.swt_fixed_add(fixedHandle, scrolledHandle);
+ GTK4.gtk_scrolled_window_set_child(scrolledHandle, handle);
+ } else {
+ GTK3.gtk_container_add (fixedHandle, scrolledHandle);
+ GTK3.gtk_container_add (scrolledHandle, handle);
+ }
int mode = (style & SWT.MULTI) != 0 ? GTK.GTK_SELECTION_MULTIPLE : GTK.GTK_SELECTION_BROWSE;
long selectionHandle = GTK.gtk_tree_view_get_selection (handle);
@@ -805,7 +853,13 @@ void createHandle (int index) {
int hsp = (style & SWT.H_SCROLL) != 0 ? GTK.GTK_POLICY_AUTOMATIC : GTK.GTK_POLICY_NEVER;
int vsp = (style & SWT.V_SCROLL) != 0 ? GTK.GTK_POLICY_AUTOMATIC : GTK.GTK_POLICY_NEVER;
GTK.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
- if ((style & SWT.BORDER) != 0) GTK.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ if ((style & SWT.BORDER) != 0) {
+ if (GTK.GTK4) {
+ GTK4.gtk_scrolled_window_set_has_frame(scrolledHandle, true);
+ } else {
+ GTK3.gtk_scrolled_window_set_shadow_type (scrolledHandle, GTK.GTK_SHADOW_ETCHED_IN);
+ }
+ }
/*
* We enable fixed-height-mode for performance reasons (see bug 490203).
*/
@@ -815,6 +869,36 @@ void createHandle (int index) {
if (!searchEnabled ()) {
GTK.gtk_tree_view_set_search_column (handle, -1);
}
+
+ if (GTK.GTK4) bindArrowKeyBindings();
+}
+
+/**
+ * Binds the left and right arrow keys to
+ * allow for expanding and collapsing of the
+ * tree nodes.
+ *
+ * Note: This function is to only be called in GTK4.
+ * Binding of the arrow keys are also done in GTK3,
+ * however it is done through GtkBindingSets in CSS.
+ * See Device.init() for more information, specifically,
+ * swt_functional_gtk_3_20.css
+ */
+void bindArrowKeyBindings() {
+ if (!GTK.GTK4) return;
+
+ int[] keyval = new int[1];
+ GTK.gtk_accelerator_parse(Converter.javaStringToCString("Left"), keyval, null);
+ GTK4.gtk_widget_class_add_binding_signal(GTK.GTK_WIDGET_GET_CLASS(handle), keyval[0], 0,
+ Converter.javaStringToCString("expand-collapse-cursor-row"),
+ Converter.javaStringToCString("(bbb)"),
+ false, false, false);
+
+ GTK.gtk_accelerator_parse(Converter.javaStringToCString("Right"), keyval, null);
+ GTK4.gtk_widget_class_add_binding_signal(GTK.GTK_WIDGET_GET_CLASS(handle), keyval[0], 0,
+ Converter.javaStringToCString("expand-collapse-cursor-row"),
+ Converter.javaStringToCString("(bbb)"),
+ false, true, false);
}
@Override
@@ -846,10 +930,20 @@ void createItem (TreeColumn column, int index) {
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
long imageHandle = GTK.gtk_image_new ();
if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_container_add (boxHandle, imageHandle);
- GTK.gtk_container_add (boxHandle, labelHandle);
- GTK.gtk_widget_show (boxHandle);
- GTK.gtk_widget_show (labelHandle);
+
+ if (GTK.GTK4) {
+ GTK4.gtk_box_append(boxHandle, imageHandle);
+ GTK4.gtk_box_append(boxHandle, labelHandle);
+
+ GTK.gtk_widget_hide(imageHandle);
+ } else {
+ GTK3.gtk_container_add (boxHandle, imageHandle);
+ GTK3.gtk_container_add (boxHandle, labelHandle);
+
+ GTK.gtk_widget_show (boxHandle);
+ GTK.gtk_widget_show (labelHandle);
+ }
+
column.labelHandle = labelHandle;
column.imageHandle = imageHandle;
GTK.gtk_tree_view_column_set_widget (column.handle, boxHandle);
@@ -863,7 +957,9 @@ void createItem (TreeColumn column, int index) {
System.arraycopy (columns, index, columns, index + 1, columnCount++ - index);
columns [index] = column;
if ((state & FONT) != 0) {
- column.setFontDescription (getFontDescription ());
+ long fontDesc = getFontDescription ();
+ column.setFontDescription (fontDesc);
+ OS.pango_font_description_free (fontDesc);
}
if (columnCount >= 1) {
for (int i=0; i<items.length; i++) {
@@ -888,26 +984,61 @@ void createItem (TreeColumn column, int index) {
}
}
}
+
+ updateHeaderCSS();
}
+/**
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(org.eclipse.swt.widgets.Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
+ */
void createItem (TreeItem item, long parentIter, int index) {
- int count = GTK.gtk_tree_model_iter_n_children (modelHandle, parentIter);
- if (index == -1) index = count;
- if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
- item.handle = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- if (item.handle == 0) error(SWT.ERROR_NO_HANDLES);
/*
- * Feature in GTK. It is much faster to append to a tree store
- * than to insert at the end using gtk_tree_store_insert().
- */
- if (index == count) {
+ * Try to achieve maximum possible performance in bulk insert scenarios.
+ * Even a single call to 'gtk_tree_model_iter_n_children' already
+ * reduces performance 3x, so try to avoid any unneeded API calls.
+ */
+ if (index == 0) {
+ item.handle = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
+ if (item.handle == 0) error(SWT.ERROR_NO_HANDLES);
+ GTK.gtk_tree_store_prepend (modelHandle, item.handle, parentIter);
+ } else if (index == -1) {
+ item.handle = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
+ if (item.handle == 0) error(SWT.ERROR_NO_HANDLES);
GTK.gtk_tree_store_append (modelHandle, item.handle, parentIter);
} else {
- GTK.gtk_tree_store_insert (modelHandle, item.handle, parentIter, index);
+ int count = GTK.gtk_tree_model_iter_n_children (modelHandle, parentIter);
+ if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
+
+ item.handle = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
+ if (item.handle == 0) error(SWT.ERROR_NO_HANDLES);
+
+ /*
+ * Feature in GTK. It is much faster to append to a tree store
+ * than to insert at the end using gtk_tree_store_insert().
+ */
+ if (index == count) {
+ GTK.gtk_tree_store_append (modelHandle, item.handle, parentIter);
+ } else {
+ GTK.gtk_tree_store_insert (modelHandle, item.handle, parentIter, index);
+ }
}
+
int id = getId (item.handle, false);
items [id] = item;
modelChanged = true;
+
+ if (parentIter == 0 ) {
+ /*
+ If this was the first root item fire an EmptinessChanged event.
+ */
+ int roots = GTK.gtk_tree_model_iter_n_children (modelHandle, 0);
+ if (roots == 1) {
+ Event event = new Event ();
+ event.detail = 0;
+ sendEvent (SWT.EmptinessChanged, event);
+ }
+ }
}
void createRenderers (long columnHandle, int modelIndex, boolean check, int columnStyle) {
@@ -916,18 +1047,25 @@ void createRenderers (long columnHandle, int modelIndex, boolean check, int colu
GTK.gtk_tree_view_column_pack_start (columnHandle, checkRenderer, false);
GTK.gtk_tree_view_column_add_attribute (columnHandle, checkRenderer, OS.active, CHECKED_COLUMN);
GTK.gtk_tree_view_column_add_attribute (columnHandle, checkRenderer, OS.inconsistent, GRAYED_COLUMN);
- if (!ownerDraw) GTK.gtk_tree_view_column_add_attribute (columnHandle, checkRenderer, OS.cell_background_rgba, BACKGROUND_COLUMN);
- if (ownerDraw) {
+ if (!isOwnerDrawn) GTK.gtk_tree_view_column_add_attribute (columnHandle, checkRenderer, OS.cell_background_rgba, BACKGROUND_COLUMN);
+ if (isOwnerDrawn) {
GTK.gtk_tree_view_column_set_cell_data_func (columnHandle, checkRenderer, display.cellDataProc, handle, 0);
OS.g_object_set_qdata (checkRenderer, Display.SWT_OBJECT_INDEX1, columnHandle);
}
}
- long pixbufRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_pixbuf_get_type (), 0) : GTK.gtk_cell_renderer_pixbuf_new ();
+
+ long pixbufRenderer;
+ if (GTK.GTK4) {
+ pixbufRenderer = GTK.gtk_cell_renderer_pixbuf_new();
+ } else {
+ pixbufRenderer = isOwnerDrawn ? OS.g_object_new (display.gtk_cell_renderer_pixbuf_get_type (), 0) : GTK.gtk_cell_renderer_pixbuf_new ();
+ }
+
if (pixbufRenderer == 0) {
error (SWT.ERROR_NO_HANDLES);
} else {
// set default size this size is used for calculating the icon and text positions in a tree
- if ((!ownerDraw)) {
+ if ((!isOwnerDrawn)) {
/*
* When SWT.VIRTUAL is specified, size the pixbuf renderer
* according to the size of the first image set. If no image
@@ -945,10 +1083,10 @@ void createRenderers (long columnHandle, int modelIndex, boolean check, int colu
}
}
}
- long textRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_text_get_type (), 0) : GTK.gtk_cell_renderer_text_new ();
+ long textRenderer = isOwnerDrawn ? OS.g_object_new (display.gtk_cell_renderer_text_get_type (), 0) : GTK.gtk_cell_renderer_text_new ();
if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES);
- if (ownerDraw) {
+ if (isOwnerDrawn) {
OS.g_object_set_qdata (pixbufRenderer, Display.SWT_OBJECT_INDEX1, columnHandle);
OS.g_object_set_qdata (textRenderer, Display.SWT_OBJECT_INDEX1, columnHandle);
}
@@ -988,7 +1126,7 @@ void createRenderers (long columnHandle, int modelIndex, boolean check, int colu
* use the same underlying GTK structure.
*/
GTK.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.pixbuf, modelIndex + CELL_PIXBUF);
- if (!ownerDraw) {
+ if (!isOwnerDrawn) {
GTK.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.cell_background_rgba, BACKGROUND_COLUMN);
GTK.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.cell_background_rgba, BACKGROUND_COLUMN);
}
@@ -1005,7 +1143,7 @@ void createRenderers (long columnHandle, int modelIndex, boolean check, int colu
}
}
}
- if ((style & SWT.VIRTUAL) != 0 || customDraw || ownerDraw) {
+ if ((style & SWT.VIRTUAL) != 0 || customDraw || isOwnerDrawn) {
GTK.gtk_tree_view_column_set_cell_data_func (columnHandle, textRenderer, display.cellDataProc, handle, 0);
GTK.gtk_tree_view_column_set_cell_data_func (columnHandle, pixbufRenderer, display.cellDataProc, handle, 0);
}
@@ -1101,7 +1239,7 @@ void destroyItem (TreeColumn column) {
long [] types = getColumnTypes (1);
long newModel = GTK.gtk_tree_store_newv (types.length, types);
if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
- copyModel(oldModel, column.modelIndex, newModel, FIRST_COLUMN, types, (long )0, (long )0, FIRST_COLUMN + CELL_TYPES);
+ copyModel(oldModel, column.modelIndex, newModel, FIRST_COLUMN, (long )0, (long )0, FIRST_COLUMN + CELL_TYPES);
GTK.gtk_tree_view_set_model (handle, newModel);
setModel (newModel);
createColumn (null, 0);
@@ -1154,6 +1292,16 @@ void destroyItem (TreeItem item) {
GTK.gtk_tree_store_remove (modelHandle, item.handle);
OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
modelChanged = true;
+
+ /*
+ If this was the last root item fire an EmptinessChanged event.
+ */
+ int roots = GTK.gtk_tree_model_iter_n_children (modelHandle, 0);
+ if (roots == 0) {
+ Event event = new Event ();
+ event.detail = 1;
+ sendEvent (SWT.EmptinessChanged, event);
+ }
}
@Override
@@ -1203,61 +1351,35 @@ long eventWindow () {
return paintWindow ();
}
-boolean fixAccessibility () {
- /*
- * Bug in GTK. With GTK 2.12, when assistive technologies is on, the time
- * it takes to add or remove several rows to the model is very long. This
- * happens because the accessible object asks each row for its data, including
- * the rows that are not visible. The the fix is to block the accessible object
- * from receiving row_added and row_removed signals and, at the end, send only
- * a notify signal with the "model" detail.
- *
- * Note: The test bellow has to be updated when the real problem is fixed in
- * the accessible object.
- */
- return true;
-}
-
@Override
-void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) {
- super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
- for (int i=0; i<columnCount; i++) {
- TreeColumn column = columns [i];
- if (column.toolTipText != null) {
- column.setToolTipText(oldShell, null);
- column.setToolTipText(newShell, column.toolTipText);
- }
+Rectangle getClientAreaInPixels () {
+ checkWidget();
+ if(RESIZE_ON_GETCLIENTAREA) {
+ forceResize();
}
-}
-@Override
-Rectangle getClientAreaInPixels () {
- checkWidget ();
- forceResize ();
- long clientHandle = clientHandle ();
- GtkAllocation allocation = new GtkAllocation ();
- GTK.gtk_widget_get_allocation (clientHandle, allocation);
+ long clientHandle = clientHandle();
+ GtkAllocation allocation = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(clientHandle, allocation);
int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
+
Rectangle rect;
if (GTK.GTK4) {
- long fixedSurface = gtk_widget_get_surface (fixedHandle);
- long surface = gtk_widget_get_surface (clientHandle);
- int [] surfaceX = new int [1], surfaceY = new int [1];
- GDK.gdk_surface_get_origin (surface, surfaceX, surfaceY);
- int [] fixedX = new int [1], fixedY = new int [1];
- GDK.gdk_surface_get_origin (fixedSurface, fixedX, fixedY);
- rect = new Rectangle (fixedX [0] - surfaceX [0], fixedY [0] - surfaceY [0], width, height);
+ int[] headerHeight = new int[1], headerWidth = new int[1];
+ GTK.gtk_tree_view_convert_bin_window_to_widget_coords(handle, 0, 0, headerWidth, headerHeight);
+ rect = new Rectangle(headerWidth[0], headerHeight[0], width, height);
} else {
- GTK.gtk_widget_realize (handle);
- long fixedWindow = gtk_widget_get_window (fixedHandle);
- long binWindow = GTK.gtk_tree_view_get_bin_window (handle);
- int [] binX = new int [1], binY = new int [1];
- GDK.gdk_window_get_origin (binWindow, binX, binY);
- int [] fixedX = new int [1], fixedY = new int [1];
- GDK.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
- rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
+ GTK.gtk_widget_realize(handle);
+ long fixedWindow = gtk_widget_get_window(fixedHandle);
+ long binWindow = GTK3.gtk_tree_view_get_bin_window(handle);
+ int[] binX = new int[1], binY = new int[1];
+ GDK.gdk_window_get_origin(binWindow, binX, binY);
+ int[] fixedX = new int[1], fixedY = new int[1];
+ GDK.gdk_window_get_origin(fixedWindow, fixedX, fixedY);
+ rect = new Rectangle(fixedX[0] - binX[0], fixedY[0] - binY[0], width, height);
}
+
return rect;
}
@@ -1269,7 +1391,7 @@ int getClientWidth () {
gdk_surface_get_size(surface, w, h);
} else {
GTK.gtk_widget_realize (handle);
- gdk_window_get_size(GTK.gtk_tree_view_get_bin_window(handle), w, h);
+ gdk_window_get_size(GTK3.gtk_tree_view_get_bin_window(handle), w, h);
}
return w[0];
}
@@ -1398,6 +1520,7 @@ long [] getColumnTypes (int columnCount) {
types [i + CELL_FOREGROUND] = GDK.GDK_TYPE_RGBA();
types [i + CELL_BACKGROUND] = GDK.GDK_TYPE_RGBA();
types [i + CELL_FONT] = OS.PANGO_TYPE_FONT_DESCRIPTION ();
+ types [i + CELL_SURFACE] = OS.G_TYPE_LONG();
}
return types;
}
@@ -1451,14 +1574,10 @@ GdkRGBA getContextBackgroundGdkRGBA () {
@Override
GdkRGBA getContextColorGdkRGBA () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- if (foreground != null) {
- return foreground;
- } else {
- return display.COLOR_LIST_FOREGROUND_RGBA;
- }
+ if (foreground != null) {
+ return foreground;
} else {
- return super.getContextColorGdkRGBA ();
+ return display.COLOR_LIST_FOREGROUND_RGBA;
}
}
@@ -1550,11 +1669,12 @@ public int getHeaderHeight () {
}
int getHeaderHeightInPixels () {
- checkWidget ();
- if (!GTK.gtk_tree_view_get_headers_visible (handle)) return 0;
+ checkWidget();
+ if (!GTK.gtk_tree_view_get_headers_visible(handle)) return 0;
+
+ int height = 0;
if (columnCount > 0) {
GtkRequisition requisition = new GtkRequisition ();
- int height = 0;
for (int i=0; i<columnCount; i++) {
long buttonHandle = columns [i].buttonHandle;
if (buttonHandle != 0) {
@@ -1562,26 +1682,24 @@ int getHeaderHeightInPixels () {
height = Math.max (height, requisition.height);
}
}
- return height;
- }
- if (GTK.GTK4) {
- long fixedSurface = gtk_widget_get_surface (fixedHandle);
- long surface = gtk_widget_get_surface (handle);
- int [] surfaceY = new int [1];
- GDK.gdk_surface_get_origin (surface, null, surfaceY);
- int [] fixedY = new int [1];
- GDK.gdk_surface_get_origin (fixedSurface, null, fixedY);
- return surfaceY [0] - fixedY [0];
} else {
- GTK.gtk_widget_realize (handle);
- long fixedWindow = gtk_widget_get_window (fixedHandle);
- long binWindow = GTK.gtk_tree_view_get_bin_window (handle);
- int [] binY = new int [1];
- GDK.gdk_window_get_origin (binWindow, null, binY);
- int [] fixedY = new int [1];
- GDK.gdk_window_get_origin (fixedWindow, null, fixedY);
- return binY [0] - fixedY [0];
+ if (GTK.GTK4) {
+ int[] headerHeight = new int[1];
+ GTK.gtk_tree_view_convert_bin_window_to_widget_coords(handle, 0, 0, null, headerHeight);
+ height = headerHeight[0];
+ } else {
+ GTK.gtk_widget_realize (handle);
+ long fixedWindow = gtk_widget_get_window (fixedHandle);
+ long binWindow = GTK3.gtk_tree_view_get_bin_window (handle);
+ int [] binY = new int [1];
+ GDK.gdk_window_get_origin (binWindow, null, binY);
+ int [] fixedY = new int [1];
+ GDK.gdk_window_get_origin (fixedWindow, null, fixedY);
+ height = binY [0] - fixedY [0];
+ }
}
+
+ return height;
}
/**
@@ -1737,37 +1855,50 @@ public int getItemHeight () {
}
int getItemHeightInPixels () {
- checkWidget ();
- int itemCount = GTK.gtk_tree_model_iter_n_children (modelHandle, 0);
+ checkWidget();
+ int height = 0;
+ int itemCount = GTK.gtk_tree_model_iter_n_children(modelHandle, 0);
+
if (itemCount == 0) {
- long column = GTK.gtk_tree_view_get_column (handle, 0);
- int [] w = new int [1], h = new int [1];
+ long column = GTK.gtk_tree_view_get_column(handle, 0);
+ int[] h = new int[1];
ignoreSize = true;
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
- int height = h [0];
- long textRenderer = getTextRenderer (column);
- if (textRenderer != 0) GTK.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null);
- height += h [0];
+ if (GTK.GTK4) {
+ GTK4.gtk_tree_view_column_cell_get_size(column, null, null, null, h);
+ } else {
+ GTK3.gtk_tree_view_column_cell_get_size(column, null, null, null, null, h);
+ }
+
+ height = h[0];
+ long textRenderer = getTextRenderer(column);
+ if (textRenderer != 0) GTK.gtk_cell_renderer_get_preferred_height_for_width(textRenderer, handle, 0, h, null);
+ height += h[0];
ignoreSize = false;
- return height;
} else {
- int height = 0;
- long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- GTK.gtk_tree_model_get_iter_first (modelHandle, iter);
- int columnCount = Math.max (1, this.columnCount);
- for (int i=0; i<columnCount; i++) {
- long column = GTK.gtk_tree_view_get_column (handle, i);
- GTK.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false);
- int [] w = new int [1], h = new int [1];
- GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
+ long iter = OS.g_malloc(GTK.GtkTreeIter_sizeof());
+ GTK.gtk_tree_model_get_iter_first(modelHandle, iter);
+
+ int columnCount = Math.max(1, this.columnCount);
+ for (int i = 0; i < columnCount; i++) {
+ long column = GTK.gtk_tree_view_get_column(handle, i);
+ GTK.gtk_tree_view_column_cell_set_cell_data(column, modelHandle, iter, false, false);
+ int[] h = new int[1];
+ if (GTK.GTK4) {
+ GTK4.gtk_tree_view_column_cell_get_size(column, null, null, null, h);
+ } else {
+ GTK3.gtk_tree_view_column_cell_get_size (column, null, null, null, null, h);
+ }
+
long textRenderer = getTextRenderer(column);
- int [] ypad = new int[1];
+ int[] ypad = new int[1];
if (textRenderer != 0) GTK.gtk_cell_renderer_get_padding(textRenderer, null, ypad);
- height = Math.max(height, h [0] + ypad [0]);
+ height = Math.max(height, h[0] + ypad[0]);
}
+
OS.g_free (iter);
- return height;
}
+
+ return height;
}
/**
@@ -2019,7 +2150,7 @@ public TreeItem getTopItem () {
*/
long vAdjustment;
vAdjustment = GTK.gtk_scrollable_get_vadjustment(handle);
- currentAdjustment = GTK._gtk_adjustment_get_value(vAdjustment);
+ currentAdjustment = GTK.gtk_adjustment_get_value(vAdjustment);
TreeItem item = null;
if (cachedAdjustment == currentAdjustment) {
item = _getCachedTopItem();
@@ -2060,7 +2191,7 @@ TreeItem _getCachedTopItem() {
long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
long data = OS.g_list_data (list);
if (GTK.gtk_tree_model_get_iter (modelHandle, iter, data)) {
- treeSelection = _getItem (iter);
+ treeSelection = _getItem (iter);
}
OS.g_free (iter);
GTK.gtk_tree_path_free (data);
@@ -2091,21 +2222,21 @@ long gtk_button_press_event (long widget, long event) {
double [] eventX = new double [1];
double [] eventY = new double [1];
GDK.gdk_event_get_coords(event, eventX, eventY);
+
int eventType = GDK.gdk_event_get_event_type(event);
- eventType = fixGdkEventTypeValues(eventType);
+
int [] eventButton = new int [1];
+ int [] eventState = new int [1];
GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
+
long eventGdkResource = gdk_event_get_surface_or_window(event);
- if (GTK.GTK4) {
- if (eventGdkResource != gtk_widget_get_surface (handle)) return 0;
- } else {
- if (eventGdkResource != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
- }
+ if (eventGdkResource != GTK3.gtk_tree_view_get_bin_window (handle)) return 0;
+
long result = super.gtk_button_press_event (widget, event);
if (result != 0) return result;
/*
@@ -2117,7 +2248,7 @@ long gtk_button_press_event (long widget, long event) {
if ((state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect) &&
!OS.isX11() && eventType == GDK.GDK_BUTTON_PRESS) { // Wayland
// check to see if there is another event coming in that is not a double/triple click, this is to prevent Bug 514531
- long nextEvent = gdk_event_peek ();
+ long nextEvent = GDK.gdk_event_peek();
if (nextEvent == 0) {
long [] path = new long [1];
long selection = GTK.gtk_tree_view_get_selection (handle);
@@ -2200,19 +2331,15 @@ long gtk_button_press_event (long widget, long event) {
}
@Override
-long gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
- if (n_press == 1) return 0;
- long widget = GTK.gtk_event_controller_get_widget(gesture);
- long result = gtk_button_press_event (widget, event);
+void gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
+ super.gtk_gesture_press_event(gesture, n_press, x, y, event);
if (n_press == 2 && rowActivated) {
sendTreeDefaultSelection ();
rowActivated = false;
}
- return result;
}
-
@Override
long gtk_row_activated (long tree, long path, long column) {
rowActivated = true;
@@ -2222,28 +2349,27 @@ long gtk_row_activated (long tree, long path, long column) {
@Override
long gtk_key_press_event (long widget, long event) {
int [] key = new int[1];
- GDK.gdk_event_get_keyval(event, key);
- keyPressDefaultSelectionHandler (event, key[0]);
- return super.gtk_key_press_event (widget, event);
-}
-/**
- * Used to emulate DefaultSelection event. See Bug 312568.
- * @param event the gtk key press event that was fired.
- */
-void keyPressDefaultSelectionHandler (long event, int key) {
- int keymask = gdk_event_get_state (event);
- switch (key) {
+ if (GTK.GTK4) {
+ key[0] = GDK.gdk_key_event_get_keyval(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, key);
+ }
+
+ switch (key[0]) {
case GDK.GDK_Return:
// Send DefaultSelectionEvent when:
- // when : Enter, Shift+Enter, Ctrl+Enter are pressed.
+ // When : Enter, Shift+Enter, Ctrl+Enter are pressed.
// Not when: Alt+Enter, (Meta|Super|Hyper)+Enter, reason is stateMask is not provided on Gtk.
- // Note: alt+Enter creates a selection on GTK, but we filter it out to be a bit more consitent Win32 (521387)
+ // Note: alt+Enter creates a selection on GTK, but we filter it out to be a bit more consistent Win32 (521387)
+ int keymask = gdk_event_get_state (event);
if ((keymask & (GDK.GDK_SUPER_MASK | GDK.GDK_META_MASK | GDK.GDK_HYPER_MASK | GDK.GDK_MOD1_MASK)) == 0) {
sendTreeDefaultSelection ();
}
break;
}
+
+ return super.gtk_key_press_event (widget, event);
}
/**
@@ -2270,19 +2396,30 @@ void sendTreeDefaultSelection() {
long gtk_button_release_event (long widget, long event) {
double [] eventX = new double [1];
double [] eventY = new double [1];
- GDK.gdk_event_get_coords(event, eventX, eventY);
+ if (GTK.GTK4) {
+ GDK.gdk_event_get_position(event, eventX, eventY);
+ } else {
+ GDK.gdk_event_get_coords(event, eventX, eventY);
+ }
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(event, eventButton);
+ int [] eventState = new int [1];
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(event);
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_button(event, eventButton);
+ GDK.gdk_event_get_state(event, eventState);
+ }
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(event, eventRX, eventRY);
- int [] eventState = new int [1];
- GDK.gdk_event_get_state(event, eventState);
+
long eventGdkResource = gdk_event_get_surface_or_window(event);
if (GTK.GTK4) {
if (eventGdkResource != gtk_widget_get_surface (handle)) return 0;
} else {
- if (eventGdkResource != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
+ if (eventGdkResource != GTK3.gtk_tree_view_get_bin_window (handle)) return 0;
}
// Check region since super.gtk_button_release_event() isn't called
lastInput.x = (int) eventX[0];
@@ -2306,8 +2443,8 @@ long gtk_button_release_event (long widget, long event) {
if ((eventState[0] & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) {
GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false);
}
- // Check to see if there has been a new tree item selected when holding Control in Path.
- // If not, deselect the item.
+ // Check to see if there has been a new tree item selected when holding Control in Path.
+ // If not, deselect the item.
if ((eventState[0] & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) {
GTK.gtk_tree_selection_unselect_path (selection,path[0]);
}
@@ -2344,7 +2481,7 @@ void drawInheritedBackground (long cairo) {
gdkResource = gtk_widget_get_surface(handle);
gdk_surface_get_size (gdkResource, width, height);
} else {
- gdkResource = GTK.gtk_tree_view_get_bin_window (handle);
+ gdkResource = GTK3.gtk_tree_view_get_bin_window (handle);
gdk_window_get_size (gdkResource, width, height);
}
long parent = 0;
@@ -2364,7 +2501,7 @@ void drawInheritedBackground (long cairo) {
}
if (parent != 0) OS.g_free (parent);
if (height [0] > (rect.y + rect.height)) {
- drawBackground (control, gdkResource, cairo, 0, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
+ drawBackground (control, gdkResource, cairo, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
}
}
}
@@ -2384,7 +2521,7 @@ long gtk_draw (long widget, long cairo) {
* If the tree was resized since the last paint, we ignore this draw request
* and queue another draw request so that the pixel cache is properly invalidated.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && ownerDraw && haveBoundsChanged) {
+ if (isOwnerDrawn && haveBoundsChanged) {
GTK.gtk_widget_queue_draw(handle);
return 0;
}
@@ -2399,20 +2536,12 @@ long gtk_motion_notify_event (long widget, long event) {
if (surface != gtk_widget_get_surface(handle)) return 0;
} else {
long window = GDK.GDK_EVENT_WINDOW (event);
- if (window != GTK.gtk_tree_view_get_bin_window (handle)) return 0;
+ if (window != GTK3.gtk_tree_view_get_bin_window (handle)) return 0;
}
return super.gtk_motion_notify_event (widget, event);
}
@Override
-long gtk_row_deleted (long model, long path) {
- if (ignoreAccessibility) {
- OS.g_signal_stop_emission_by_name (model, OS.row_deleted);
- }
- return 0;
-}
-
-@Override
long gtk_row_has_child_toggled (long model, long path, long iter) {
/*
* Feature in GTK. The expanded state of a row that lost
@@ -2437,14 +2566,6 @@ long gtk_row_has_child_toggled (long model, long path, long iter) {
}
@Override
-long gtk_row_inserted (long model, long path, long iter) {
- if (ignoreAccessibility) {
- OS.g_signal_stop_emission_by_name (model, OS.row_inserted);
- }
- return 0;
-}
-
-@Override
long gtk_scroll_event (long widget, long eventPtr) {
long result = super.gtk_scroll_event(widget, eventPtr);
if (!wasScrolled) wasScrolled = true;
@@ -2618,10 +2739,6 @@ void hookEvents () {
OS.g_signal_connect_closure (checkRenderer, OS.toggled, display.getClosure (TOGGLED), false);
}
OS.g_signal_connect_closure (handle, OS.start_interactive_search, display.getClosure (START_INTERACTIVE_SEARCH), false);
- if (fixAccessibility ()) {
- OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.getClosure (ROW_INSERTED), true);
- OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.getClosure (ROW_DELETED), true);
- }
}
/**
@@ -2713,7 +2830,7 @@ boolean mnemonicMatch (char key) {
long paintWindow () {
GTK.gtk_widget_realize (handle);
// TODO: this function has been removed on GTK4
- return GTK.gtk_tree_view_get_bin_window (handle);
+ return GTK3.gtk_tree_view_get_bin_window (handle);
}
@Override
@@ -2723,7 +2840,7 @@ void propagateDraw (long container, long cairo) {
* "noChildDrawing" widgets might still be partially drawn.
*/
super.propagateDraw(container, cairo);
- if (headerVisible && noChildDrawing != null && wasScrolled) {
+ if (headerVisible && noChildDrawing && wasScrolled) {
for (TreeColumn column : columns) {
if (column != null) {
GTK.gtk_widget_queue_draw(column.buttonHandle);
@@ -2737,7 +2854,7 @@ void recreateRenderers () {
if (checkRenderer != 0) {
display.removeWidget (checkRenderer);
OS.g_object_unref (checkRenderer);
- checkRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_toggle_get_type(), 0) : GTK.gtk_cell_renderer_toggle_new ();
+ checkRenderer = isOwnerDrawn ? OS.g_object_new (display.gtk_cell_renderer_toggle_get_type(), 0) : GTK.gtk_cell_renderer_toggle_new ();
if (checkRenderer == 0) error (SWT.ERROR_NO_HANDLES);
OS.g_object_ref (checkRenderer);
display.addWidget (checkRenderer, this);
@@ -2840,9 +2957,6 @@ void remove (long parentIter, int start, int end) {
long selection = GTK.gtk_tree_view_get_selection (handle);
long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
if (iter == 0) error (SWT.ERROR_NO_HANDLES);
- if (fixAccessibility ()) {
- ignoreAccessibility = true;
- }
try {
for (int i = start; i <= end; i++) {
GTK.gtk_tree_model_iter_nth_child (modelHandle, iter, parentIter, start);
@@ -2866,10 +2980,6 @@ void remove (long parentIter, int start, int end) {
}
}
} finally {
- if (fixAccessibility ()) {
- ignoreAccessibility = false;
- OS.g_object_notify (handle, OS.model);
- }
OS.g_free (iter);
}
}
@@ -2885,29 +2995,19 @@ void remove (long parentIter, int start, int end) {
public void removeAll () {
checkWidget ();
checkSetDataInProcessBeforeRemoval();
+
+ long selection = GTK.gtk_tree_view_get_selection (handle);
+ OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
+
+ GTK.gtk_tree_store_clear (modelHandle);
+
+ OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
+
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null && !item.isDisposed ()) item.release (false);
}
items = new TreeItem[4];
- long selection = GTK.gtk_tree_view_get_selection (handle);
- OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
- if (fixAccessibility ()) {
- ignoreAccessibility = true;
- }
- /**
- * Hack for GTK3 in order to not get cellDataFunc while clearing as it calls it for each row-deleted
- * and this causes AAIOB in getId as items are already cleared but the model is not yet.
- * By disconnecting the model from the handle while clearing no intermediate signals are emitted.
- */
- GTK.gtk_tree_view_set_model(handle, 0);
- GTK.gtk_tree_store_clear (modelHandle);
- GTK.gtk_tree_view_set_model(handle, modelHandle);
- if (fixAccessibility ()) {
- ignoreAccessibility = false;
- OS.g_object_notify (handle, OS.model);
- }
- OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
if (!searchEnabled ()) {
GTK.gtk_tree_view_set_search_column (handle, -1);
@@ -3042,7 +3142,7 @@ long rendererSnapshotProc (long cell, long snapshot, long widget, long backgroun
GdkRectangle gdkRectangle = new GdkRectangle ();
OS.memmove(gdkRectangle, background_area, GdkRectangle.sizeof);
Graphene.graphene_rect_init(rect, gdkRectangle.x, gdkRectangle.y, gdkRectangle.width, gdkRectangle.height);
- long cairo = GTK.gtk_snapshot_append_cairo(snapshot, rect);
+ long cairo = GTK4.gtk_snapshot_append_cairo(snapshot, rect);
rendererRender (cell, cairo, snapshot, widget, background_area, cell_area, 0, flags);
return 0;
}
@@ -3068,9 +3168,34 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
}
}
}
+
+ GdkRectangle rendererRect = new GdkRectangle ();
+ GdkRectangle columnRect = new GdkRectangle ();
+ int y_offset;
+ {
+ /*
+ * SWT creates multiple renderers (kind of sub-columns) per column.
+ * For example: one for checkbox, one for image, one for text.
+ * 'background_area' argument in this function is area of currently
+ * painted renderer. However, for SWT.EraseItem and SWT.PaintItem,
+ * SWT wants entire column's area along with the event. There's api
+ * 'gtk_tree_view_get_background_area()' but it calculates item's
+ * rect in control, which will have wrong Y if item is rendered
+ * separately (for example, for drag image).
+ * The workaround is to take X range from api and Y range from argument.
+ */
+ OS.memmove (rendererRect, background_area, GdkRectangle.sizeof);
+
+ long path = GTK.gtk_tree_model_get_path (modelHandle, iter);
+ GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, columnRect);
+ GTK.gtk_tree_path_free (path);
+
+ y_offset = columnRect.y - rendererRect.y;
+ columnRect.y -= y_offset;
+ }
+
if (item != null) {
- if (GTK.GTK_IS_CELL_RENDERER_TOGGLE (cell) ||
- ( (GTK.GTK_IS_CELL_RENDERER_PIXBUF (cell) || GTK.GTK_VERSION > OS.VERSION(3, 13, 0)) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) {
+ if (GTK.GTK_IS_CELL_RENDERER_TOGGLE (cell) || ( columnIndex != 0 || (style & SWT.CHECK) == 0)) {
drawFlags = (int)flags;
drawState = SWT.FOREGROUND;
long [] ptr = new long [1];
@@ -3088,10 +3213,7 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if ((flags & GTK.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED;
}
- GdkRectangle rect = new GdkRectangle ();
- long path = GTK.gtk_tree_model_get_path (modelHandle, iter);
- GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
- GTK.gtk_tree_path_free (path);
+ Rectangle rect = columnRect.toRectangle ();
// Use the x and width information from the Cairo context. See bug 535124.
if (cr != 0) {
GdkRectangle r2 = new GdkRectangle ();
@@ -3106,7 +3228,7 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if (cr != 0) {
Cairo.cairo_save (cr);
}
- drawBackground (control, 0, cr, 0, rect.x, rect.y, rect.width, rect.height);
+ drawBackground (control, 0, cr, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
}
@@ -3144,21 +3266,34 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if (cr != 0) {
// Use the original rectangle, not the Cairo clipping for the y, width, and height values.
// See bug 535124.
- Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, rect.y, rect.width, rect.height));
+ Rectangle rect2 = DPIUtil.autoScaleDown(rect);
gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height);
} else {
- Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, rect.y, rect.width, rect.height));
+ Rectangle rect2 = DPIUtil.autoScaleDown(rect);
// Caveat: rect2 is necessary because GC#setClipping(Rectangle) got broken by bug 446075
gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height);
}
+
+ // SWT.PaintItem/SWT.EraseItem often expect that event.y matches
+ // what 'event.item.getBounds()' returns. The workaround is to
+ // adjust coordinate system temporarily.
Event event = new Event ();
- event.item = item;
- event.index = columnIndex;
- event.gc = gc;
- Rectangle eventRect = new Rectangle (rect.x, rect.y, rect.width, rect.height);
- event.setBounds (DPIUtil.autoScaleDown (eventRect));
- event.detail = drawState;
- sendEvent (SWT.EraseItem, event);
+ try {
+ Rectangle eventRect = new Rectangle (rect.x, rect.y, rect.width, rect.height);
+
+ eventRect.y += y_offset;
+ Cairo.cairo_translate (cr, 0, -y_offset);
+
+ event.item = item;
+ event.index = columnIndex;
+ event.gc = gc;
+ event.detail = drawState;
+ event.setBounds (DPIUtil.autoScaleDown (eventRect));
+ sendEvent (SWT.EraseItem, event);
+ } finally {
+ Cairo.cairo_translate (cr, 0, y_offset);
+ }
+
drawForegroundRGBA = null;
drawState = event.doit ? event.detail : 0;
drawFlags &= ~(GTK.GTK_CELL_RENDERER_FOCUSED | GTK.GTK_CELL_RENDERER_SELECTED);
@@ -3176,12 +3311,9 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
}
}
if ((drawState & SWT.BACKGROUND) != 0 && (drawState & SWT.SELECTED) == 0) {
-
GC gc = getGC(cr);
gc.setBackground (item.getBackground (columnIndex));
- GdkRectangle rect = new GdkRectangle ();
- OS.memmove (rect, background_area, GdkRectangle.sizeof);
- gc.fillRectangle(DPIUtil.autoScaleDown(new Rectangle(rect.x, rect.y, rect.width, rect.height)));
+ gc.fillRectangle (DPIUtil.autoScaleDown (rendererRect.toRectangle ()));
gc.dispose ();
}
if ((drawState & SWT.FOREGROUND) != 0 || GTK.GTK_IS_CELL_RENDERER_TOGGLE (cell)) {
@@ -3207,17 +3339,7 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
if (GTK.GTK_IS_CELL_RENDERER_TEXT (cell)) {
if (hooks (SWT.PaintItem)) {
if (wasSelected) drawState |= SWT.SELECTED;
- GdkRectangle rect = new GdkRectangle ();
- long path = GTK.gtk_tree_model_get_path (modelHandle, iter);
- GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
- GTK.gtk_tree_path_free (path);
- // Use the x and width information from the Cairo context. See bug 535124 and 465309.
- if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
- GdkRectangle r2 = new GdkRectangle ();
- GDK.gdk_cairo_get_clip_rectangle (cr, r2);
- rect.x = r2.x;
- rect.width = r2.width;
- }
+ Rectangle rect = columnRect.toRectangle ();
ignoreSize = true;
int [] contentX = new int [1], contentWidth = new int [1];
gtk_cell_renderer_get_preferred_size (cell, handle, contentWidth, null);
@@ -3247,8 +3369,9 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
/* indent */
GdkRectangle rect3 = new GdkRectangle ();
GTK.gtk_widget_realize (handle);
- path = GTK.gtk_tree_model_get_path (modelHandle, iter);
+ long path = GTK.gtk_tree_model_get_path (modelHandle, iter);
GTK.gtk_tree_view_get_cell_area (handle, path, columnHandle, rect3);
+ GTK.gtk_tree_path_free (path);
contentX[0] += rect3.x;
}
GC gc = getGC(cr);
@@ -3269,18 +3392,30 @@ void rendererRender (long cell, long cr, long snapshot, long widget, long backgr
rect.x = getClientWidth () - rect.width - rect.x;
}
- Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, rect.y, rect.width, rect.height));
+ Rectangle rect2 = DPIUtil.autoScaleDown(rect);
// Caveat: rect2 is necessary because GC#setClipping(Rectangle) got broken by bug 446075
gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height);
+ // SWT.PaintItem/SWT.EraseItem often expect that event.y matches
+ // what 'event.item.getBounds()' returns. The workaround is to
+ // adjust coordinate system temporarily.
Event event = new Event ();
- event.item = item;
- event.index = columnIndex;
- event.gc = gc;
- Rectangle eventRect = new Rectangle (rect.x + contentX [0], rect.y, contentWidth [0], rect.height);
- event.setBounds (DPIUtil.autoScaleDown (eventRect));
- event.detail = drawState;
- sendEvent(SWT.PaintItem, event);
+ try {
+ Rectangle eventRect = new Rectangle (rect.x + contentX [0], rect.y, contentWidth [0], rect.height);
+
+ eventRect.y += y_offset;
+ Cairo.cairo_translate (cr, 0, -y_offset);
+
+ event.item = item;
+ event.index = columnIndex;
+ event.gc = gc;
+ event.detail = drawState;
+ event.setBounds (DPIUtil.autoScaleDown (eventRect));
+ sendEvent (SWT.PaintItem, event);
+ } finally {
+ Cairo.cairo_translate (cr, 0, y_offset);
+ }
+
gc.dispose();
}
}
@@ -3296,7 +3431,7 @@ private GC getGC(long cr) {
}
void resetCustomDraw () {
- if ((style & SWT.VIRTUAL) != 0 || ownerDraw) return;
+ if ((style & SWT.VIRTUAL) != 0 || isOwnerDrawn) return;
int end = Math.max (1, columnCount);
for (int i=0; i<end; i++) {
boolean customDraw = columnCount != 0 ? columns [i].customDraw : firstCustomDraw;
@@ -3377,23 +3512,27 @@ void setItemCount (long parentIter, int count) {
remove (parentIter, count, itemCount - 1);
}
if (isVirtual) {
- if (fixAccessibility ()) {
- ignoreAccessibility = true;
+ long iters = OS.g_malloc (2 * GTK.GtkTreeIter_sizeof ());
+ if (iters == 0) error (SWT.ERROR_NO_HANDLES);
+
+ long iterResult = iters;
+ long iterInsertAfter;
+ if (itemCount != 0) {
+ iterInsertAfter = iters + GTK.GtkTreeIter_sizeof ();
+ GTK.gtk_tree_model_iter_nth_child(modelHandle, iterInsertAfter, parentIter, itemCount - 1);
+ } else {
+ iterInsertAfter = 0;
}
+
for (int i=itemCount; i<count; i++) {
- long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
- if (iter == 0) error (SWT.ERROR_NO_HANDLES);
- GTK.gtk_tree_store_append (modelHandle, iter, parentIter);
- GTK.gtk_tree_store_set (modelHandle, iter, ID_COLUMN, -1, -1);
- OS.g_free (iter);
- }
- if (fixAccessibility ()) {
- ignoreAccessibility = false;
- OS.g_object_notify (handle, OS.model);
+ GTK.gtk_tree_store_insert_after (modelHandle, iterResult, parentIter, iterInsertAfter);
+ GTK.gtk_tree_store_set (modelHandle, iterResult, ID_COLUMN, -1, -1);
}
+
+ OS.g_free (iters);
} else {
for (int i=itemCount; i<count; i++) {
- new TreeItem (this, parentIter, SWT.NONE, i, true);
+ new TreeItem (this, parentIter, SWT.NONE, itemCount, true);
}
}
if (!isVirtual) setRedraw (true);
@@ -3402,6 +3541,9 @@ void setItemCount (long parentIter, int count) {
/**
* Sets the number of root-level items contained in the receiver.
+ * <p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param count the number of items
*
@@ -3482,26 +3624,20 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
background = rgba;
}
GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "treeview" : "GtkTreeView";
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
+ String css = "treeview {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
+ + "treeview:selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
- // Cache background color
- cssBackground = css;
+ // Cache background color
+ cssBackground = css;
- // Apply background color and any foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css(context, finalCss);
- } else {
- super.setBackgroundGdkRGBA(context, handle, rgba);
- GTK.gtk_widget_override_background_color(handle, GTK.GTK_STATE_FLAG_SELECTED, selectedBackground);
- }
+ // Apply background color and any foreground color
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css(context, finalCss);
}
@Override
void setBackgroundSurface (Image image) {
- ownerDraw = true;
+ isOwnerDrawn = true;
recreateRenderers ();
}
@@ -3583,13 +3719,9 @@ void setFontDescription (long font) {
@Override
void setForegroundGdkRGBA (GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
- foreground = rgba;
- GdkRGBA toSet = rgba == null ? display.COLOR_LIST_FOREGROUND_RGBA : rgba;
- setForegroundGdkRGBA (handle, toSet);
- } else {
- super.setForegroundGdkRGBA(rgba);
- }
+ foreground = rgba;
+ GdkRGBA toSet = rgba == null ? display.COLOR_LIST_FOREGROUND_RGBA : rgba;
+ setForegroundGdkRGBA (handle, toSet);
}
/**
@@ -3611,42 +3743,52 @@ void setForegroundGdkRGBA (GdkRGBA rgba) {
* </ul>
* @since 3.106
*/
-public void setHeaderBackground (Color color) {
+public void setHeaderBackground(Color color) {
checkWidget();
if (color != null) {
- if (color.isDisposed ())
- error(SWT.ERROR_INVALID_ARGUMENT);
- if (color.equals(headerBackground))
- return;
- } else if (headerBackground == null) return;
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.equals(headerBackground)) return;
+ }
headerBackground = color;
- GdkRGBA background;
+
+ updateHeaderCSS();
+}
+
+void updateHeaderCSS() {
+ StringBuilder css = new StringBuilder("button {");
if (headerBackground != null) {
- background = headerBackground.handle;
- } else {
- background = defaultBackground();
+ /*
+ * Bug 571466: On some platforms & themes, the 'background-image'
+ * css tag also needs to be set in order to change the
+ * background color. Using 'background' tag as it overrides both
+ * 'background-image' and 'background-color'.
+ */
+ css.append("background: " + display.gtk_rgba_to_css_string(headerBackground.handle) + "; ");
}
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "button" : "GtkButton";
- // background works for 3.18 and later, background-color only as of 3.20
- String css = name + " {background: " + display.gtk_rgba_to_css_string(background) + ";}\n";
- headerCSSBackground = css;
- String finalCss = display.gtk_css_create_css_color_string (headerCSSBackground, headerCSSForeground, SWT.BACKGROUND);
- for (TreeColumn column : columns) {
- if (column != null) {
- long context = GTK.gtk_widget_get_style_context(column.buttonHandle);
- // Create provider as we need it attached to the proper context which is not the widget one
- long provider = GTK.gtk_css_provider_new ();
- GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref (provider);
- if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1);
- } else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1, null);
+ if (headerForeground != null) {
+ css.append("color: " + display.gtk_rgba_to_css_string(headerForeground.handle) + "; ");
+ }
+ css.append("}\n");
+
+ if (columnCount == 0) {
+ long buttonHandle = GTK.gtk_tree_view_column_get_button(GTK.gtk_tree_view_get_column(handle, 0));
+ if (headerCSSProvider == 0) {
+ headerCSSProvider = GTK.gtk_css_provider_new();
+ GTK.gtk_style_context_add_provider(GTK.gtk_widget_get_style_context(buttonHandle), headerCSSProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+
+ if (GTK.GTK4) {
+ GTK4.gtk_css_provider_load_from_data(headerCSSProvider, Converter.javaStringToCString(css.toString()), -1);
+ } else {
+ GTK3.gtk_css_provider_load_from_data(headerCSSProvider, Converter.javaStringToCString(css.toString()), -1, null);
+ }
+ } else {
+ for (TreeColumn column : columns) {
+ if (column != null) {
+ column.setHeaderCSS(css.toString());
}
- GTK.gtk_style_context_invalidate(context);
}
}
- // Redraw not necessary, GTK handles the CSS update.
}
/**
@@ -3668,41 +3810,15 @@ public void setHeaderBackground (Color color) {
* </ul>
* @since 3.106
*/
-public void setHeaderForeground (Color color) {
+public void setHeaderForeground(Color color) {
checkWidget();
if (color != null) {
- if (color.isDisposed ())
- error(SWT.ERROR_INVALID_ARGUMENT);
- if (color.equals(headerForeground))
- return;
- } else if (headerForeground == null) return;
- headerForeground = color;
- GdkRGBA foreground;
- if (headerForeground != null) {
- foreground = headerForeground.handle;
- } else {
- foreground = display.COLOR_LIST_FOREGROUND_RGBA;
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.equals(headerForeground)) return;
}
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "button" : "GtkButton";
- String css = name + " {color: " + display.gtk_rgba_to_css_string(foreground) + ";}";
- headerCSSForeground = css;
- String finalCss = display.gtk_css_create_css_color_string (headerCSSBackground, headerCSSForeground, SWT.FOREGROUND);
- for (TreeColumn column : columns) {
- if (column != null) {
- long context = GTK.gtk_widget_get_style_context(column.buttonHandle);
- // Create provider as we need it attached to the proper context which is not the widget one
- long provider = GTK.gtk_css_provider_new ();
- GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- OS.g_object_unref (provider);
- if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1);
- } else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (finalCss, true), -1, null);
- }
- GTK.gtk_style_context_invalidate(context);
- }
- }
- // Redraw not necessary, GTK handles the CSS update.
+ headerForeground = color;
+
+ updateHeaderCSS();
}
/**
@@ -3760,10 +3876,6 @@ void setModel (long newModel) {
OS.g_object_unref (modelHandle);
modelHandle = newModel;
display.addWidget (modelHandle, this);
- if (fixAccessibility ()) {
- OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.getClosure (ROW_INSERTED), true);
- OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.getClosure (ROW_DELETED), true);
- }
}
@Override
@@ -3783,7 +3895,7 @@ void setOrientation (boolean create) {
@Override
void setParentBackground () {
- ownerDraw = true;
+ isOwnerDrawn = true;
recreateRenderers ();
}
@@ -3800,16 +3912,15 @@ void setParentGdkResource (Control child) {
* signal using gtk_container_propagate_draw(). See bug 531928.
*/
if (GTK.GTK4) {
- long parentGdkSurface = eventSurface ();
- GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
+ // long parentGdkSurface = eventSurface ();
+ // TODO: GTK4 no gtk_widget_set_parent_surface
+ // GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
// TODO: implement connectFixedHandleDraw with the "snapshot" signal
} else {
long parentGdkWindow = eventWindow ();
- GTK.gtk_widget_set_parent_window (child.topHandle(), parentGdkWindow);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0)) {
- hasChildren = true;
- connectFixedHandleDraw();
- }
+ GTK3.gtk_widget_set_parent_window (child.topHandle(), parentGdkWindow);
+ hasChildren = true;
+ connectFixedHandleDraw();
}
}
@@ -4070,22 +4181,7 @@ void showItem (long path, boolean scroll) {
GTK.gtk_tree_path_free (tempPath);
}
if (scroll) {
- GdkRectangle cellRect = new GdkRectangle ();
- GTK.gtk_widget_realize (handle);
- GTK.gtk_tree_view_get_cell_area (handle, path, 0, cellRect);
- boolean isHidden = cellRect.y == 0 && cellRect.height == 0;
- int [] tx = new int [1], ty = new int [1];
- GTK.gtk_tree_view_convert_bin_window_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty);
- if (!isHidden) {
- GdkRectangle visibleRect = new GdkRectangle ();
- GTK.gtk_tree_view_get_visible_rect (handle, visibleRect);
- if (ty [0] < visibleRect.y || ty [0] + cellRect.height > visibleRect.y + visibleRect.height) {
- isHidden = true;
- }
- }
- if (isHidden) {
- GTK.gtk_tree_view_scroll_to_cell (handle, path, 0, depth != 1, 0.5f, 0.0f);
- }
+ GTK.gtk_tree_view_scroll_to_cell (handle, path, 0, false, 0.5f, 0.0f);
}
}
@@ -4120,23 +4216,26 @@ public void showItem (TreeItem item) {
@Override
void updateScrollBarValue (ScrollBar bar) {
super.updateScrollBarValue (bar);
- /*
- * Bug in GTK. Scrolling changes the XWindow position
- * and makes the child widgets appear to scroll even
- * though when queried their position is unchanged.
- * The fix is to queue a resize event for each child to
- * force the position to be corrected.
- */
- long parentHandle = parentingHandle ();
- long list = GTK.gtk_container_get_children (parentHandle);
- if (list == 0) return;
- long temp = list;
- while (temp != 0) {
- long widget = OS.g_list_data (temp);
- if (widget != 0) GTK.gtk_widget_queue_resize (widget);
- temp = OS.g_list_next (temp);
+
+ if (!GTK.GTK4) {
+ /*
+ * Bug in GTK. Scrolling changes the XWindow position
+ * and makes the child widgets appear to scroll even
+ * though when queried their position is unchanged.
+ * The fix is to queue a resize event for each child to
+ * force the position to be corrected.
+ */
+ long parentHandle = parentingHandle ();
+ long list = GTK3.gtk_container_get_children (parentHandle);
+ if (list == 0) return;
+ long temp = list;
+ while (temp != 0) {
+ long widget = OS.g_list_data (temp);
+ if (widget != 0) GTK.gtk_widget_queue_resize (widget);
+ temp = OS.g_list_next (temp);
+ }
+ OS.g_list_free (list);
}
- OS.g_list_free (list);
}
@Override
@@ -4149,15 +4248,12 @@ long windowProc (long handle, long arg0, long user_data) {
*/
if (hasChildren) {
/*
- * If headers are visible, set noChildDrawing to their
- * dimensions -- this will prevent any child widgets from drawing
+ * If headers are visible, set noChildDrawing to true
+ * this will prevent any child widgets from drawing
* over the header buttons. See bug 535978.
*/
if (headerVisible) {
- GdkRectangle rect = new GdkRectangle ();
- GDK.gdk_cairo_get_clip_rectangle (arg0, rect);
- // -1's is for the 1px of padding between the fixedHandle and handle
- noChildDrawing = new Rectangle(0, 0, rect.width - 1, this.headerHeight - 1);
+ noChildDrawing = true;
}
propagateDraw(handle, arg0);
}
@@ -4174,11 +4270,11 @@ long windowProc (long handle, long arg0, long user_data) {
if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
Control control = findBackgroundControl ();
if (control != null) {
- long window = GTK.gtk_tree_view_get_bin_window (handle);
- if (window == GTK.gtk_widget_get_window(handle)) {
+ long window = GTK3.gtk_tree_view_get_bin_window (handle);
+ if (window == GTK3.gtk_widget_get_window(handle)) {
GdkRectangle rect = new GdkRectangle ();
GDK.gdk_cairo_get_clip_rectangle (arg0, rect);
- drawBackground (control, window, arg0, 0, rect.x, rect.y, rect.width, rect.height);
+ drawBackground (control, window, arg0, rect.x, rect.y, rect.width, rect.height);
}
}
}
@@ -4203,7 +4299,7 @@ Point resizeCalculationsGTK3 (long widget, int width, int height) {
* In the error case, the SWT fixed which contains the tree still resizes as expected,
* and the horizontal scrollbar is only partially visible so that it doesn't overlap with tree headers.
*/
- if (widget == scrolledHandle && GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && getHeaderVisible()) {
+ if (widget == scrolledHandle && getHeaderVisible()) {
int hScrollBarHeight = hScrollBarWidth(); // this actually returns height
if (hScrollBarHeight > 0) {
sizes.y = Math.max(sizes.y, getHeaderHeight() + hScrollBarHeight + (getBorderWidth() * 2));
@@ -4240,4 +4336,14 @@ private void throwCannotRemoveItem(int i) {
String message = "Cannot remove item with index " + i + ".";
throw new SWTException(message);
}
+
+@Override
+public void dispose() {
+ super.dispose();
+
+ if (headerCSSProvider != 0) {
+ OS.g_object_unref(headerCSSProvider);
+ headerCSSProvider = 0;
+ }
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
index 42b7185fc5..0dd7ac6f47 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
@@ -19,6 +19,8 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* Instances of this class represent a column in a tree widget.
@@ -41,10 +43,11 @@ import org.eclipse.swt.internal.gtk.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class TreeColumn extends Item {
+ long headerButtonCSSProvider = 0;
long labelHandle, imageHandle, buttonHandle;
Tree parent;
- int modelIndex, lastButton, lastTime, lastX, lastWidth;
- boolean customDraw, useFixedWidth;
+ int modelIndex, lastTime, lastX, lastWidth;
+ boolean customDraw;
String toolTipText;
/**
@@ -334,8 +337,8 @@ int getWidthInPixels () {
if (!GTK.gtk_tree_view_column_get_visible (handle)) {
return 0;
}
- if (useFixedWidth) return GTK.gtk_tree_view_column_get_fixed_width (handle);
- return GTK.gtk_tree_view_column_get_width (handle);
+
+ return GTK.gtk_tree_view_column_get_fixed_width(handle);
}
@Override
@@ -348,42 +351,51 @@ long gtk_clicked (long widget) {
* and testing for the double click interval.
*/
boolean doubleClick = false;
- boolean postEvent = true;
- long eventPtr = GTK.gtk_get_current_event ();
+ long eventPtr = GTK3.gtk_get_current_event ();
if (eventPtr != 0) {
- int [] eventButton = new int [1];
- GDK.gdk_event_get_button(eventPtr, eventButton);
int eventType = GDK.gdk_event_get_event_type(eventPtr);
- eventType = Control.fixGdkEventTypeValues(eventType);
int eventTime = GDK.gdk_event_get_time(eventPtr);
- switch (eventType) {
- case GDK.GDK_BUTTON_RELEASE: {
- int clickTime = display.getDoubleClickTime ();
- if (lastButton == eventButton[0] && lastTime != 0 && Math.abs (lastTime - eventTime) <= clickTime) {
- doubleClick = true;
- }
- lastTime = eventTime == 0 ? 1: eventTime;
- lastButton = eventButton[0];
- break;
+
+ if (eventType == GDK.GDK_BUTTON_RELEASE) {
+ int clickTime = display.getDoubleClickTime();
+ if (lastTime != 0 && Math.abs(lastTime - eventTime) <= clickTime) {
+ doubleClick = true;
}
+ lastTime = eventTime == 0 ? 1: eventTime;
}
- gdk_event_free (eventPtr);
+
+ gdk_event_free(eventPtr);
}
- if (postEvent) sendSelectionEvent (doubleClick ? SWT.DefaultSelection : SWT.Selection);
+
+ sendSelectionEvent(doubleClick ? SWT.DefaultSelection : SWT.Selection);
+
return 0;
}
@Override
+void gtk_gesture_press_event(long gesture, int n_press, double x, double y, long event) {
+ boolean doubleClick = n_press >= 2 ? true : false;
+
+ sendSelectionEvent(doubleClick ? SWT.DefaultSelection : SWT.Selection);
+}
+
+@Override
long gtk_event_after (long widget, long gdkEvent) {
int eventType = GDK.gdk_event_get_event_type(gdkEvent);
eventType = Control.fixGdkEventTypeValues(eventType);
switch (eventType) {
case GDK.GDK_BUTTON_PRESS: {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(gdkEvent, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(gdkEvent);
+ } else {
+ GDK.gdk_event_get_button(gdkEvent, eventButton);
+ }
+
double [] eventRX = new double [1];
double [] eventRY = new double [1];
GDK.gdk_event_get_root_coords(gdkEvent, eventRX, eventRY);
+
if (eventButton[0] == 3) {
parent.showMenu ((int) eventRX[0], (int) eventRY[0]);
}
@@ -400,7 +412,6 @@ long gtk_mnemonic_activate (long widget, long arg1) {
@Override
long gtk_size_allocate (long widget, long allocation) {
- useFixedWidth = false;
GtkAllocation widgetAllocation = new GtkAllocation();
GTK.gtk_widget_get_allocation (widget, widgetAllocation);
int x = widgetAllocation.x;
@@ -418,14 +429,24 @@ long gtk_size_allocate (long widget, long allocation) {
@Override
void hookEvents () {
- super.hookEvents ();
- OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false);
+ super.hookEvents();
+
+ if (GTK.GTK4) {
+ long clickController = GTK4.gtk_gesture_click_new();
+ GTK4.gtk_widget_add_controller(buttonHandle, clickController);
+ GTK.gtk_event_controller_set_propagation_phase(clickController, GTK.GTK_PHASE_CAPTURE);
+ OS.g_signal_connect(clickController, OS.pressed, display.gesturePressReleaseProc, GESTURE_PRESSED);
+ } else {
+ OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false);
+ }
+
+
if (buttonHandle != 0) {
- OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [SIZE_ALLOCATE], 0, display.getClosure (SIZE_ALLOCATE), false);
if (GTK.GTK4) {
- OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [EVENT], 0, display.getClosure (EVENT), false);
+ //TODO: GTK4 event-after, size-allocate signals (if necessary)
} else {
OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false);
+ OS.g_signal_connect_closure_by_id (buttonHandle, display.signalIds [SIZE_ALLOCATE], 0, display.getClosure (SIZE_ALLOCATE), false);
}
}
if (labelHandle != 0) OS.g_signal_connect_closure_by_id (labelHandle, display.signalIds [MNEMONIC_ACTIVATE], 0, display.getClosure (MNEMONIC_ACTIVATE), false);
@@ -446,6 +467,13 @@ public void pack () {
checkWidget();
int width = 0;
if (buttonHandle != 0) {
+ /*
+ * Bug 546490: Ensure the header button is set to
+ * true before getting preferred size of GtkTreeView
+ */
+ boolean visible = GTK.gtk_widget_get_visible(buttonHandle);
+ if (!visible) GTK.gtk_widget_set_visible(buttonHandle, true);
+
GtkRequisition requisition = new GtkRequisition ();
gtk_widget_get_preferred_size (buttonHandle, requisition);
width = requisition.width;
@@ -570,7 +598,6 @@ public void setAlignment (int alignment) {
void setFontDescription (long font) {
setFontDescription (labelHandle, font);
- setFontDescription (imageHandle, font);
}
@Override
@@ -584,12 +611,22 @@ public void setImage (Image image) {
}
int imageIndex = headerImageList.indexOf (image);
if (imageIndex == -1) imageIndex = headerImageList.add (image);
- long pixbuf = headerImageList.getPixbuf (imageIndex);
- gtk_image_set_from_gicon (imageHandle, pixbuf);
- GTK.gtk_widget_show (imageHandle);
+ if (GTK.GTK4) {
+ long pixbuf = ImageList.createPixbuf(image);
+ long texture = GDK.gdk_texture_new_for_pixbuf(pixbuf);
+ OS.g_object_unref(pixbuf);
+ GTK4.gtk_image_set_from_paintable(imageHandle, texture);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, headerImageList.getSurface(imageIndex));
+ }
+ GTK.gtk_widget_show(imageHandle);
} else {
- gtk_image_set_from_gicon (imageHandle, 0);
- GTK.gtk_widget_hide (imageHandle);
+ if (GTK.GTK4) {
+ GTK4.gtk_image_clear(imageHandle);
+ } else {
+ GTK3.gtk_image_set_from_surface(imageHandle, 0);
+ }
+ GTK.gtk_widget_hide(imageHandle);
}
}
@@ -625,7 +662,7 @@ void setOrientation (boolean create) {
if (buttonHandle != 0) {
int dir = (parent.style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
GTK.gtk_widget_set_direction (buttonHandle, dir);
- GTK.gtk_container_forall (buttonHandle, display.setDirectionProc, dir);
+ GTK3.gtk_container_forall (buttonHandle, display.setDirectionProc, dir);
}
}
}
@@ -689,15 +726,10 @@ public void setText (String string) {
*
* @since 3.2
*/
-public void setToolTipText (String string) {
+public void setToolTipText(String string) {
checkWidget();
- Shell shell = parent._getShell ();
- setToolTipText (shell, string);
toolTipText = string;
-}
-
-void setToolTipText (Shell shell, String newString) {
- shell.setToolTipText (buttonHandle, newString);
+ setToolTipText(buttonHandle, string);
}
/**
@@ -710,18 +742,17 @@ void setToolTipText (Shell shell, String newString) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
-public void setWidth (int width) {
- checkWidget ();
- setWidthInPixels (DPIUtil.autoScaleUp (width));
+public void setWidth(int width) {
+ checkWidget();
+ setWidthInPixels(DPIUtil.autoScaleUp(width));
}
-void setWidthInPixels (int width) {
+void setWidthInPixels(int width) {
checkWidget();
if (width < 0) return;
if (width == lastWidth) return;
if (width > 0) {
- useFixedWidth = true;
- GTK.gtk_tree_view_column_set_fixed_width (handle, width);
+ GTK.gtk_tree_view_column_set_fixed_width(handle, width);
}
/*
* Bug in GTK. For some reason, calling gtk_tree_view_column_set_visible()
@@ -741,24 +772,8 @@ void setWidthInPixels (int width) {
if (width != 0) {
if (buttonHandle != 0) {
if (GTK.GTK4) {
- long surface = GTK.gtk_widget_get_parent_surface (buttonHandle);
- if (surface != 0) {
- long surfaceList = GDK.gdk_surface_get_children (surface);
- if (surfaceList != 0) {
- long surfaces = surfaceList;
- long [] userData = new long [1];
- while (surfaces != 0) {
- long child = OS.g_list_data (surfaces);
- GDK.gdk_surface_get_user_data (child, userData);
- if (userData[0] == buttonHandle) {
- GDK.gdk_surface_lower (child);
- break;
- }
- surfaces = OS.g_list_next (surfaces);
- }
- OS.g_list_free (surfaceList);
- }
- }
+ /* TODO: GTK4 Removed this for time being, as not confirm if this bug still exists. Has to be
+ * removed since the fix requires functions that no longer exist in GTK4. */
} else {
long window = GTK.gtk_widget_get_parent_window (buttonHandle);
if (window != 0) {
@@ -784,4 +799,38 @@ void setWidthInPixels (int width) {
sendEvent (SWT.Resize);
}
+void setHeaderCSS(String css) {
+ if (headerButtonCSSProvider == 0) {
+ headerButtonCSSProvider = GTK.gtk_css_provider_new();
+ GTK.gtk_style_context_add_provider(GTK.gtk_widget_get_style_context(buttonHandle), headerButtonCSSProvider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+
+ if (GTK.GTK4) {
+ GTK4.gtk_css_provider_load_from_data(headerButtonCSSProvider, Converter.javaStringToCString(css), -1);
+ } else {
+ GTK3.gtk_css_provider_load_from_data(headerButtonCSSProvider, Converter.javaStringToCString(css), -1, null);
+ }
+}
+
+@Override
+public void dispose() {
+ super.dispose();
+
+ if (headerButtonCSSProvider != 0) {
+ OS.g_object_unref(headerButtonCSSProvider);
+ headerButtonCSSProvider = 0;
+ }
+}
+
+@Override
+long dpiChanged(long object, long arg0) {
+ super.dpiChanged(object, arg0);
+
+ if (image != null) {
+ image.internal_gtk_refreshImageForZoom();
+ setImage(image);
+ }
+
+ return 0;
+}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index e54631f4b8..d4f94ac010 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,7 +17,9 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
/**
* Instances of this class represent a selectable user interface object
@@ -46,22 +48,14 @@ public class TreeItem extends Item {
static final int EXPANDER_EXTRA_PADDING = 4;
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>)
- * and a style value describing its behavior and appearance.
- * The item is added to the end of the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as last direct child of the tree.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parent a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
@@ -80,22 +74,18 @@ public TreeItem (Tree parent, int style) {
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>),
- * a style value describing its behavior and appearance, and the index
- * at which to place it in the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as <code>index</code> direct child of the tree.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is:
+ * <ol>
+ * <li>Use {@link Tree#setRedraw} to disable drawing during bulk insert</li>
+ * <li>Insert every item at index 0 (insert them in reverse to get the same result)</li>
+ * <li>Collapse the parent item before inserting (gives massive improvement on Windows)</li>
+ * </ol>
*
* @param parent a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
* @param index the zero-relative index to store the receiver in its parent
*
* @exception IllegalArgumentException <ul>
@@ -110,28 +100,21 @@ public TreeItem (Tree parent, int style) {
* @see SWT
* @see Widget#checkSubclass
* @see Widget#getStyle
+ * @see Tree#setRedraw
*/
public TreeItem (Tree parent, int style, int index) {
this (checkNull (parent), 0, style, checkIndex (index), true);
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>)
- * and a style value describing its behavior and appearance.
- * The item is added to the end of the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as last direct child of the specified <code>TreeItem</code>.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parentItem a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
@@ -150,22 +133,14 @@ public TreeItem (TreeItem parentItem, int style) {
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>),
- * a style value describing its behavior and appearance, and the index
- * at which to place it in the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as <code>index</code> direct child of the specified <code>TreeItem</code>.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parentItem a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
* @param index the zero-relative index to store the receiver in its parent
*
* @exception IllegalArgumentException <ul>
@@ -180,6 +155,7 @@ public TreeItem (TreeItem parentItem, int style) {
* @see SWT
* @see Widget#checkSubclass
* @see Widget#getStyle
+ * @see Tree#setRedraw
*/
public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, parentItem.handle, style, checkIndex (index), true);
@@ -268,18 +244,21 @@ Color _getForeground (int index) {
return Color.gtk_new(display, gdkRGBA);
}
-Image _getImage (int index) {
- int count = Math.max (1, parent.getColumnCount ());
+Image _getImage(int index) {
+ int count = Math.max(1, parent.getColumnCount());
if (0 > index || index > count - 1) return null;
- long [] ptr = new long [1];
- int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
- GTK.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_PIXBUF, ptr, -1);
- if (ptr [0] == 0) return null;
- ImageList imageList = parent.imageList;
- int imageIndex = imageList.indexOf (ptr [0]);
- OS.g_object_unref (ptr [0]);
- if (imageIndex == -1) return null;
- return imageList.get (imageIndex);
+
+ long[] surfaceHandle = new long[1];
+ int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns[index].modelIndex;
+ GTK.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_SURFACE, surfaceHandle, -1);
+ if (surfaceHandle[0] == 0) return null;
+
+ int imageIndex = parent.imageList.indexOf(surfaceHandle[0]);
+ if (imageIndex == -1) {
+ return null;
+ } else {
+ return parent.imageList.get(imageIndex);
+ }
}
String _getText (int index) {
@@ -516,7 +495,7 @@ Rectangle getBoundsInPixels () {
GTK.gtk_widget_get_allocation(separator, allocation);
horizontalSeparator = allocation.height;
} else {
- GTK.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
+ GTK3.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
horizontalSeparator = buffer[0];
}
rect.x += horizontalSeparator;
@@ -993,7 +972,7 @@ Rectangle getTextBoundsInPixels (int index) {
GTK.gtk_widget_get_allocation(separator, allocation);
horizontalSeparator = allocation.height;
} else {
- GTK.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
+ GTK3.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0);
horizontalSeparator = buffer[0];
}
rect.x += horizontalSeparator;
@@ -1128,9 +1107,6 @@ public void removeAll () {
if (length == 0) return;
long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
if (iter == 0) error (SWT.ERROR_NO_HANDLES);
- if (parent.fixAccessibility ()) {
- parent.ignoreAccessibility = true;
- }
long selection = GTK.gtk_tree_view_get_selection (parent.handle);
int [] value = new int [1];
while (GTK.gtk_tree_model_iter_children (modelHandle, iter, handle)) {
@@ -1144,10 +1120,6 @@ public void removeAll () {
OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
}
}
- if (parent.fixAccessibility ()) {
- parent.ignoreAccessibility = false;
- OS.g_object_notify (parent.handle, OS.model);
- }
OS.g_free (iter);
}
@@ -1522,48 +1494,34 @@ public void setGrayed (boolean grayed) {
*
* @since 3.1
*/
-public void setImage (int index, Image image) {
+public void setImage(int index, Image image) {
checkWidget ();
if (image != null && image.isDisposed()) {
error(SWT.ERROR_INVALID_ARGUMENT);
}
if (image != null && image.type == SWT.ICON) {
- if (image.equals (_getImage (index))) return;
+ if (image.equals(_getImage(index))) return;
}
- int count = Math.max (1, parent.getColumnCount ());
+ int count = Math.max(1, parent.getColumnCount());
if (0 > index || index > count - 1) return;
- long pixbuf = 0;
+
+ long pixbuf = 0, surface = 0;
if (image != null) {
ImageList imageList = parent.imageList;
- if (imageList == null) imageList = parent.imageList = new ImageList ();
- int imageIndex = imageList.indexOf (image);
- if (imageIndex == -1) imageIndex = imageList.add (image);
- pixbuf = imageList.getPixbuf (imageIndex);
- }
- int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
- /*
- * Reset size of pixbufRenderer if we have an image being set that is larger
- * than the current size of the pixbufRenderer. Fix for Bug 469277 & 476419.
- * We only do this if the size of the pixbufRenderer has not yet been set.
- * Otherwise, the pixbufRenderer retains the same size as the first image added.
- * See comment #4, Bug 478560. Note that all columns need to have their
- * pixbufRenderer set to this size after the initial image is set. NOTE: this
- * change has been ported to Tables since Tables/Trees both use the same
- * underlying GTK structure.
- */
- if (DPIUtil.useCairoAutoScale()) {
- /*
- * Bug in GTK the default renderer does scale again on pixbuf.
- * Need to scaledown here and no need to scaledown id device scale is 1
- */
- if ((!parent.ownerDraw) && (image != null) && (DPIUtil.getDeviceZoom() != 100)) {
- Rectangle imgSize = image.getBounds();
- long scaledPixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, imgSize.width, imgSize.height, GDK.GDK_INTERP_BILINEAR);
- if (scaledPixbuf !=0) {
- pixbuf = scaledPixbuf;
- }
+ if (imageList == null) imageList = parent.imageList = new ImageList();
+ int imageIndex = imageList.indexOf(image);
+ // When we create a blank image surface gets created with dimensions 0, 0.
+ // This call recreates the surface with correct dimensions
+ long tempSurface = ImageList.convertSurface(image);
+ Cairo.cairo_surface_destroy(tempSurface);
+ if (imageIndex == -1) {
+ imageIndex = imageList.add(image);
}
+ surface = imageList.getSurface(imageIndex);
+ pixbuf = ImageList.createPixbuf(surface);
}
+
+ int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
long parentHandle = parent.handle;
long column = GTK.gtk_tree_view_get_column (parentHandle, index);
long pixbufRenderer = parent.getPixbufRenderer (column);
@@ -1615,7 +1573,16 @@ public void setImage (int index, Image image) {
GTK.gtk_cell_renderer_set_fixed_size (pixbufRenderer, parent.pixbufWidth, parent.pixbufHeight);
}
}
- GTK.gtk_tree_store_set (parent.modelHandle, handle, modelIndex + Tree.CELL_PIXBUF, pixbuf, -1);
+
+ GTK.gtk_tree_store_set(parent.modelHandle, handle, modelIndex + Tree.CELL_PIXBUF, pixbuf, -1);
+ /*
+ * Bug 573633: gtk_tree_store_set() will reference the handle. So we unref the pixbuf here,
+ * and leave the destruction of the handle to be done later on by the GTK+ tree.
+ */
+ if (pixbuf != 0) {
+ OS.g_object_unref(pixbuf);
+ }
+ GTK.gtk_tree_store_set(parent.modelHandle, handle, modelIndex + Tree.CELL_SURFACE, surface, -1);
cached = true;
updated = true;
}
@@ -1652,6 +1619,12 @@ public void setImage (Image [] images) {
/**
* Sets the number of child items contained in the receiver.
+ * <p>
+ * The fastest way to insert many items is:
+ * <ol>
+ * <li>Use {@link Tree#setRedraw} to disable drawing during bulk insert</li>
+ * <li>Collapse the parent item before inserting (gives massive improvement on Windows)</li>
+ * </ol>
*
* @param count the number of items
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index 5ac365a557..3aa2083ff4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -18,8 +18,11 @@ import java.util.*;
import org.eclipse.swt.*;
import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.internal.gtk3.*;
+import org.eclipse.swt.internal.gtk4.*;
/**
* This class is the abstract superclass of all user interface objects.
@@ -235,7 +238,13 @@ public abstract class Widget {
static final int GESTURE_PRESSED = 100;
static final int GESTURE_RELEASED = 101;
static final int NOTIFY_STATE = 102;
- static final int LAST_SIGNAL = 103;
+ static final int SIZE_ALLOCATE_GTK4 = 103;
+ static final int DPI_CHANGED = 104;
+ static final int NOTIFY_DEFAULT_HEIGHT = 105;
+ static final int NOTIFY_DEFAULT_WIDTH = 106;
+ static final int NOTIFY_MAXIMIZED = 107;
+ static final int COMPUTE_SIZE = 108;
+ static final int LAST_SIGNAL = 109;
static final String IS_ACTIVE = "org.eclipse.swt.internal.control.isactive"; //$NON-NLS-1$
static final String KEY_CHECK_SUBWINDOW = "org.eclipse.swt.internal.control.checksubwindow"; //$NON-NLS-1$
@@ -246,7 +255,9 @@ public abstract class Widget {
/**
* Prevents uninitialized instances from being created outside the package.
*/
-Widget () {}
+Widget () {
+ notifyCreationTracker();
+}
/**
* Constructs a new instance of this class given its parent
@@ -283,6 +294,7 @@ public Widget (Widget parent, int style) {
this.style = style;
display = parent.display;
reskinWidget ();
+ notifyCreationTracker();
}
void _addListener (int eventType, Listener listener) {
@@ -489,7 +501,11 @@ void destroyWidget () {
long topHandle = topHandle ();
releaseHandle ();
if (topHandle != 0 && (state & HANDLE) != 0) {
- GTK.gtk_widget_destroy (topHandle);
+ if (GTK.GTK4) {
+ GTK.gtk_widget_unparent(topHandle);
+ } else {
+ GTK3.gtk_widget_destroy(topHandle);
+ }
}
}
@@ -527,6 +543,24 @@ public void dispose () {
release (true);
}
+long dpiChanged (long object, long arg0) {
+ int oldScaleFactor = DPIUtil.getDeviceZoom() / 100;
+ int newScaleFactor = GTK.gtk_widget_get_scale_factor(object);
+
+ if (oldScaleFactor != newScaleFactor) {
+ display.dpiChanged(newScaleFactor);
+
+ Event event = new Event();
+ event.type = SWT.ZoomChanged;
+ event.widget = this;
+ event.detail = newScaleFactor;
+ event.doit = true;
+ notifyListeners(SWT.ZoomChanged, event);
+ }
+
+ return 0;
+}
+
void error (int code) {
SWT.error (code);
}
@@ -689,13 +723,13 @@ long gtk_activate (long widget) {
return 0;
}
-void gtk_adjustment_get (long hAdjustment, GtkAdjustment adjustment) {
- adjustment.lower = GTK.gtk_adjustment_get_lower (hAdjustment);
- adjustment.upper = GTK.gtk_adjustment_get_upper (hAdjustment);
- adjustment.page_increment = GTK.gtk_adjustment_get_page_increment (hAdjustment);
- adjustment.step_increment = GTK.gtk_adjustment_get_step_increment (hAdjustment);
- adjustment.page_size = GTK.gtk_adjustment_get_page_size (hAdjustment);
- adjustment.value = GTK.gtk_adjustment_get_value (hAdjustment);
+void gtk_adjustment_get(long adjustmentHandle, GtkAdjustment adjustment) {
+ adjustment.lower = GTK.gtk_adjustment_get_lower(adjustmentHandle);
+ adjustment.upper = GTK.gtk_adjustment_get_upper(adjustmentHandle);
+ adjustment.page_increment = GTK.gtk_adjustment_get_page_increment(adjustmentHandle);
+ adjustment.step_increment = GTK.gtk_adjustment_get_step_increment(adjustmentHandle);
+ adjustment.page_size = GTK.gtk_adjustment_get_page_size(adjustmentHandle);
+ adjustment.value = GTK.gtk_adjustment_get_value(adjustmentHandle);
}
long gtk_button_press_event (long widget, long event) {
@@ -706,20 +740,106 @@ long gtk_button_release_event (long widget, long event) {
return 0;
}
-long gtk_gesture_press_event (long gesture, int n_press, double x, double y, long event) {
- return 0;
+/**
+ * @param gesture the corresponding controller responsible for capturing the event
+ * @param n_press how many touch/button presses happened with this one
+ * @param x the x coordinate, in widget allocation coordinates
+ * @param y the y coordinate, in widget allocation coordinates
+ * @param event the GdkEvent captured
+ */
+void gtk_gesture_press_event(long gesture, int n_press, double x, double y, long event) {}
+
+/**
+ * @param gesture the corresponding controller responsible for capturing the event
+ * @param n_press how many touch/button presses happened with this one
+ * @param x the x coordinate, in widget allocation coordinates
+ * @param y the y coordinate, in widget allocation coordinates
+ * @param event the GdkEvent captured
+ */
+void gtk_gesture_release_event(long gesture, int n_press, double x, double y, long event) {}
+
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @param event the GdkEvent captured
+ */
+void gtk4_motion_event(long controller, double x, double y, long event) {}
+
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param keyval the pressed key
+ * @param keycode raw code of the pressed key
+ * @param state the bitmask, representing the state of the modifier keys and pointer buttons
+ * @param event the GdkEvent captured
+ * @return TRUE if the event has been fully/properly handled, otherwise FALSE
+ */
+boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) {
+ return !sendKeyEvent(SWT.KeyDown, event);
}
-long gtk_gesture_release_event (long gesture, int n_press, double x, double y, long event) {
- return 0;
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param keyval the released key
+ * @param keycode raw code of the released key
+ * @param state the bitmask, representing the state of the modifier keys and pointer buttons
+ * @param event the GdkEvent captured
+ */
+void gtk4_key_release_event(long controller, int keyval, int keycode, int state, long event) {
+ sendKeyEvent(SWT.KeyUp, event);
+}
+
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param event the GdkEvent captured
+ */
+void gtk4_focus_enter_event(long controller, long event) {}
+
+/**
+ * @param handle the handle of the window that caused the event
+ * @param event the type of event, should be FocusIn or FocusOut
+ */
+void gtk4_focus_window_event(long handle, long event) {
+ gtk_focus_in_event (handle, event);
+}
+
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param event the GdkEvent captured
+ */
+void gtk4_focus_leave_event(long controller, long event) {}
+
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param x x coordinate of pointer location
+ * @param y y coordinate of pointer location
+ * @param event the GdkEvent captured
+ */
+void gtk4_enter_event(long controller, double x, double y, long event) {}
+
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param event the GdkEvent captured
+ */
+void gtk4_leave_event(long controller, long event) {}
+
+/**
+ * @param controller the corresponding controller responsible for capturing the event
+ * @param dx x delta
+ * @param dy y delta
+ * @param event the GdkEvent captured
+ * @return TRUE if the scroll event was handled, FALSE otherwise
+ */
+boolean gtk4_scroll_event(long controller, double dx, double dy, long event) {
+ return false;
}
long gtk_changed (long widget) {
return 0;
}
-long gtk_change_value (long widget, long scroll, long value1, long value2) {
- return 0;
+boolean gtk_change_value (long widget, int scroll, double value, long user_data) {
+ return false;
}
long gtk_clicked (long widget) {
@@ -766,10 +886,6 @@ long gtk_enter_notify_event (long widget, long event) {
return 0;
}
-long gtk_event (long widget, long event) {
- return 0;
-}
-
long gtk_event_after (long widget, long event) {
return 0;
}
@@ -782,6 +898,8 @@ long gtk_draw (long widget, long cairo) {
return 0;
}
+void gtk4_draw(long widget, long cairo, Rectangle bounds) {}
+
long gtk_focus (long widget, long event) {
return 0;
}
@@ -898,14 +1016,6 @@ long gtk_row_activated (long tree, long path, long column) {
// 'row-activated' is triggered. See Bug 312568, 518414.
}
-long gtk_row_deleted (long model, long path) {
- return 0;
-}
-
-long gtk_row_inserted (long model, long path, long iter) {
- return 0;
-}
-
long gtk_row_has_child_toggled (long model, long path, long iter) {
return 0;
}
@@ -930,7 +1040,7 @@ long gtk_show (long widget) {
return 0;
}
-long gtk_show_help (long widget, long helpType) {
+long gtk3_show_help (long widget, long helpType) {
return 0;
}
@@ -950,7 +1060,7 @@ long gtk_style_updated (long widget) {
return 0;
}
-long gtk_switch_page (long widget, long page, long page_num) {
+long gtk_switch_page (long notebook, long page, int page_num) {
return 0;
}
@@ -998,7 +1108,7 @@ long gtk_unrealize (long widget) {
return 0;
}
-long gtk_value_changed (long adjustment) {
+long gtk_value_changed(long range) {
return 0;
}
@@ -1058,7 +1168,12 @@ char [] fixMnemonic (String string, boolean replace, boolean removeAppended) {
if (removeAppended && i + 4 == string.length () && text [i + 1] == '&' && text [i + 3] == ')') {
if (replace) result [j++] = ' ';
i += 4;
- break; // break switch case only if we are removing the mnemonic otherwise fall through
+ break; // break switch case only if we are removing the mnemonic
+ }
+ else {
+ // otherwise fall through (default case applies)
+ result [j++] = text [i++];
+ break;
}
case '_':
if (replace) result [j++] = '_';
@@ -1133,6 +1248,9 @@ boolean isValidSubclass() {
}
void hookEvents () {
+ if (handle != 0) {
+ OS.g_signal_connect (handle, OS.dpi_changed, display.notifyProc, Widget.DPI_CHANGED);
+ }
}
/*
@@ -1211,23 +1329,34 @@ void register () {
}
void release (boolean destroy) {
- if ((state & DISPOSE_SENT) == 0) {
- state |= DISPOSE_SENT;
- sendEvent (SWT.Dispose);
- }
- if ((state & DISPOSED) == 0) {
- releaseChildren (destroy);
- }
- if ((state & RELEASED) == 0) {
- state |= RELEASED;
- if (destroy) {
- releaseParent ();
- releaseWidget ();
- destroyWidget ();
- } else {
- releaseWidget ();
- releaseHandle ();
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ if ((state & DISPOSE_SENT) == 0) {
+ state |= DISPOSE_SENT;
+ try {
+ sendEvent (SWT.Dispose);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+ if ((state & DISPOSED) == 0) {
+ try {
+ releaseChildren (destroy);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+ if ((state & RELEASED) == 0) {
+ state |= RELEASED;
+ if (destroy) {
+ releaseParent ();
+ releaseWidget ();
+ destroyWidget ();
+ } else {
+ releaseWidget ();
+ releaseHandle ();
+ }
}
+ notifyDisposalTracker();
}
}
@@ -1429,19 +1558,17 @@ void sendEvent (int eventType, Event event, boolean send) {
}
boolean sendKeyEvent (int type, long event) {
- int length;
- long string;
+ int length = 0;
+ long string = 0;
if (GTK.GTK4) {
- long [] eventString = new long [1];
- GDK.gdk_event_get_string(event, eventString);
- string = eventString[0];
- length = (int)OS.g_utf16_strlen (string, -1);
+ /* TODO: GTK4 no access to key event string */
} else {
GdkEventKey gdkEvent = new GdkEventKey ();
- OS.memmove(gdkEvent, event, GdkEventKey.sizeof);
+ GTK3.memmove(gdkEvent, event, GdkEventKey.sizeof);
length = gdkEvent.length;
string = gdkEvent.string;
}
+
if (string == 0 || OS.g_utf16_strlen (string, length) <= 1) {
Event javaEvent = new Event ();
javaEvent.time = GDK.gdk_event_get_time(event);
@@ -1468,7 +1595,8 @@ char [] sendIMKeyEvent (int type, long event, char [] chars) {
int index = 0, count = 0, state = 0;
long ptr = 0;
if (event == 0) {
- ptr = GTK.gtk_get_current_event ();
+ long controller = Control.getControl(this.handle).keyController;
+ ptr = GTK.GTK4 ? GTK4.gtk_event_controller_get_current_event(controller):GTK3.gtk_get_current_event ();
if (ptr != 0) {
int eventType = GDK.gdk_event_get_event_type(ptr);
eventType = Control.fixGdkEventTypeValues(eventType);
@@ -1476,7 +1604,11 @@ char [] sendIMKeyEvent (int type, long event, char [] chars) {
case GDK.GDK_KEY_PRESS:
case GDK.GDK_KEY_RELEASE:
int [] eventState = new int[1];
- GDK.gdk_event_get_state(ptr, eventState);
+ if (GTK.GTK4) {
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_state(event, eventState);
+ }
state = eventState[0];
break;
default:
@@ -1484,9 +1616,13 @@ char [] sendIMKeyEvent (int type, long event, char [] chars) {
break;
}
} else {
- int [] buffer = new int [1];
- GTK.gtk_get_current_event_state (buffer);
- state = buffer [0];
+ if(GTK.GTK4) {
+ state = GTK4.gtk_event_controller_get_current_event_state(controller);
+ } else {
+ int [] buffer = new int [1];
+ GTK3.gtk_get_current_event_state (buffer);
+ state = buffer [0];
+ }
}
} else {
ptr = event;
@@ -1508,13 +1644,13 @@ char [] sendIMKeyEvent (int type, long event, char [] chars) {
* the key by returning null.
*/
if (isDisposed ()) {
- if (ptr != 0 && ptr != event) gdk_event_free (ptr);
+ if (ptr != 0 && ptr != event && !GTK.GTK4) gdk_event_free (ptr);
return null;
}
if (javaEvent.doit) chars [count++] = chars [index];
index++;
}
- if (ptr != 0 && ptr != event) gdk_event_free (ptr);
+ if (ptr != 0 && ptr != event && !GTK.GTK4) gdk_event_free (ptr);
if (count == 0) return null;
if (index != count) {
char [] result = new char [count];
@@ -1533,7 +1669,7 @@ void sendSelectionEvent (int eventType, Event event, boolean send) {
return;
}
if (event == null) event = new Event ();
- long ptr = GTK.gtk_get_current_event ();
+ long ptr = GTK.GTK4 ? 0 : GTK3.gtk_get_current_event ();
if (ptr != 0) {
int currentEventType = GDK.gdk_event_get_event_type(ptr);
currentEventType = Control.fixGdkEventTypeValues(currentEventType);
@@ -1542,14 +1678,23 @@ void sendSelectionEvent (int eventType, Event event, boolean send) {
case GDK.GDK_2BUTTON_PRESS:
case GDK.GDK_BUTTON_RELEASE: {
int [] eventButton = new int [1];
- GDK.gdk_event_get_button(ptr, eventButton);
+ if (GTK.GTK4) {
+ eventButton[0] = GDK.gdk_button_event_get_button(ptr);
+ } else {
+ GDK.gdk_event_get_button(ptr, eventButton);
+ }
+
setButtonState(event, eventButton [0]);
}
//$FALL-THROUGH$
case GDK.GDK_KEY_PRESS:
case GDK.GDK_KEY_RELEASE: {
- int [] state = new int [1];
- GDK.gdk_event_get_state (ptr, state);
+ int [] state = new int[1];
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(ptr);
+ } else {
+ GDK.gdk_event_get_state(ptr, state);
+ }
setInputState (event, state [0]);
break;
}
@@ -1670,25 +1815,89 @@ public void setData (String key, Object value) {
}
}
if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) && key.equals(KEY_GTK_CSS) && value instanceof String) {
+ if (key.equals(KEY_GTK_CSS) && value instanceof String) {
long context = GTK.gtk_widget_get_style_context (cssHandle());
long provider = GTK.gtk_css_provider_new();
if (context != 0 && provider != 0) {
GTK.gtk_style_context_add_provider (context, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_USER);
if (GTK.GTK4) {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs ((String) value, true), -1);
+ GTK4.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs ((String) value, true), -1);
} else {
- GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs ((String) value, true), -1, null);
+ GTK3.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs ((String) value, true), -1, null);
}
OS.g_object_unref (provider);
}
}
}
-void setFontDescription (long widget, long font) {
- GTK.gtk_widget_override_font (widget, font);
- long context = GTK.gtk_widget_get_style_context (widget);
- GTK.gtk_style_context_invalidate (context);
+/**
+ * @param fontDescription Font description in the form of
+ * <code>PangoFontDescription*</code>. This pointer
+ * will never be used by GTK after calling this
+ * function, so it's safe to free it as soon as the
+ * function completes.
+ */
+void setFontDescription(long widget, long fontDescription) {
+ if (GTK.GTK4) {
+ long styleContext = GTK.gtk_widget_get_style_context(widget);
+ long provider = GTK.gtk_css_provider_new();
+ GTK.gtk_style_context_add_provider(styleContext, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ OS.g_object_unref(provider);
+
+ String css = convertPangoFontDescriptionToCss(fontDescription);
+ GTK4.gtk_css_provider_load_from_data(provider, Converter.javaStringToCString(css), -1);
+ } else {
+ // gtk_widget_override_font() copies the fields from 'fontDescription'
+ // and does not remember the pointer passed to it.
+ GTK3.gtk_widget_override_font(widget, fontDescription);
+ long context = GTK.gtk_widget_get_style_context(widget);
+ GTK3.gtk_style_context_invalidate(context);
+ }
+}
+
+String convertPangoFontDescriptionToCss(long fontDescription) {
+ String css = "* { ";
+ int fontMask = OS.pango_font_description_get_set_fields(fontDescription);
+
+ if ((fontMask & OS.PANGO_FONT_MASK_FAMILY) != 0) {
+ long fontFamily = OS.pango_font_description_get_family(fontDescription);
+ css += "font-family: \"" + Converter.cCharPtrToJavaString(fontFamily, false) + "\";";
+ }
+
+ if ((fontMask & OS.PANGO_FONT_MASK_WEIGHT) != 0) {
+ int fontWeight = OS.pango_font_description_get_weight(fontDescription);
+
+ String weightString = fontWeight < OS.PANGO_WEIGHT_BOLD ? "normal" : "bold";
+ css += "font-weight: " + weightString + ";";
+ }
+
+ if ((fontMask & OS.PANGO_FONT_MASK_STYLE) != 0) {
+ int fontStyle = OS.pango_font_description_get_style(fontDescription);
+
+ String styleString;
+ switch (fontStyle) {
+ case OS.PANGO_STYLE_NORMAL:
+ styleString = "normal";
+ break;
+ case OS.PANGO_STYLE_ITALIC:
+ styleString = "italic";
+ break;
+ default:
+ styleString = "";
+ break;
+ }
+
+ css += "font-style: " + styleString + ";";
+ }
+
+ if ((fontMask & OS.PANGO_FONT_MASK_SIZE) != 0) {
+ int fontSize = OS.pango_font_description_get_size(fontDescription);
+ css += "font-size: " + fontSize / OS.PANGO_SCALE + "pt;";
+ }
+
+ css += " } ";
+
+ return css;
}
void setButtonState (Event event, int eventButton) {
@@ -1713,28 +1922,30 @@ boolean setInputState (Event event, int state) {
}
boolean setKeyState (Event javaEvent, long event) {
- long string;
- int length;
- int [] eventKeyval = new int[1];
+ long string = 0;
+ int length = 0;
int group;
- GDK.gdk_event_get_keyval(event, eventKeyval);
- int [] eventState = new int[1];
- GDK.gdk_event_get_state(event, eventState);
+
+ int [] eventKeyval = new int [1];
+ int [] eventState = new int [1];
+ if (GTK.GTK4) {
+ eventKeyval[0] = GDK.gdk_key_event_get_keyval(event);
+ eventState[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_keyval(event, eventKeyval);
+ GDK.gdk_event_get_state(event, eventState);
+ }
+
if (GTK.GTK4) {
- long [] eventString = new long [1];
- GDK.gdk_event_get_string(event, eventString);
- string = eventString[0];
- length = (int)OS.g_utf16_strlen (string, -1);
- int [] eventGroup = new int [1];
- GDK.gdk_event_get_key_group(event, eventGroup);
- group = eventGroup[0];
+ group = GDK.gdk_key_event_get_layout(event);
} else {
GdkEventKey gdkEvent = new GdkEventKey ();
- OS.memmove(gdkEvent, event, GdkEventKey.sizeof);
+ GTK3.memmove(gdkEvent, event, GdkEventKey.sizeof);
length = gdkEvent.length;
string = gdkEvent.string;
group = gdkEvent.group;
}
+
if (string != 0 && OS.g_utf16_strlen (string, length) > 1) return false;
boolean isNull = false;
javaEvent.keyCode = Display.translateKey (eventKeyval[0]);
@@ -1757,18 +1968,25 @@ boolean setKeyState (Event javaEvent, long event) {
if (!groupLatinKeysCount.containsKey(group)) {
group = display.getLatinKeyGroup();
}
+
long keymap = 0;
long display = GDK.gdk_display_get_default();
if (GTK.GTK4) {
- keymap = GDK.gdk_display_get_keymap(display);
+ //TODO: GTK4 Get keymap or find alternative for gdk_keymap_translate_keyboard_state (no longer exist in GTK4)
} else {
keymap = GDK.gdk_keymap_get_for_display(display);
}
+
short [] keyCode = new short [1];
- GDK.gdk_event_get_keycode(event, keyCode);
- if (GDK.gdk_keymap_translate_keyboard_state (keymap, keyCode[0],
- 0, group, keyval, effective_group, level, consumed_modifiers)) {
- javaEvent.keyCode = (int) GDK.gdk_keyval_to_unicode (keyval [0]);
+ if (GTK.GTK4) {
+ keyCode[0] = (short) GDK.gdk_key_event_get_keycode(event);
+ javaEvent.keyCode = keyCode[0];
+ } else {
+ GDK.gdk_event_get_keycode(event, keyCode);
+ if (GDK.gdk_keymap_translate_keyboard_state (keymap, keyCode[0],
+ 0, group, keyval, effective_group, level, consumed_modifiers)) {
+ javaEvent.keyCode = (int) GDK.gdk_keyval_to_unicode (keyval [0]);
+ }
}
}
int key = eventKeyval[0];
@@ -1791,7 +2009,12 @@ boolean setKeyState (Event javaEvent, long event) {
void setLocationState (Event event, long eventPtr) {
int [] eventKeyval = new int[1];
- GDK.gdk_event_get_keyval(eventPtr, eventKeyval);
+ if (GTK.GTK4) {
+ eventKeyval[0] = GDK.gdk_key_event_get_keyval(eventPtr);
+ } else {
+ GDK.gdk_event_get_keyval(eventPtr, eventKeyval);
+ }
+
switch (eventKeyval[0]) {
case GDK.GDK_Alt_L:
case GDK.GDK_Shift_L:
@@ -1867,47 +2090,28 @@ long sizeRequestProc (long handle, long arg0, long user_data) {
* @param snapshot the actual GtkSnapshot
*/
void snapshotToDraw (long handle, long snapshot) {
- GtkAllocation allocation = new GtkAllocation ();
+ GtkAllocation allocation = new GtkAllocation();
GTK.gtk_widget_get_allocation(handle, allocation);
long rect = Graphene.graphene_rect_alloc();
Graphene.graphene_rect_init(rect, 0, 0, allocation.width, allocation.height);
- long cairo = GTK.gtk_snapshot_append_cairo(snapshot, rect);
- if (cairo != 0) gtk_draw(handle, cairo);
+
+ long cairo = GTK4.gtk_snapshot_append_cairo(snapshot, rect);
+ if (cairo != 0) {
+ Rectangle bounds = new Rectangle(0, 0, allocation.width, allocation.height);
+ gtk4_draw(handle, cairo, bounds);
+ }
+
Graphene.graphene_rect_free(rect);
- return;
}
long gtk_widget_get_window (long widget){
GTK.gtk_widget_realize(widget);
- return GTK.gtk_widget_get_window (widget);
+ return GTK3.gtk_widget_get_window (widget);
}
long gtk_widget_get_surface (long widget){
GTK.gtk_widget_realize(widget);
- return GTK.gtk_widget_get_surface (widget);
-}
-
-void gtk_widget_set_has_surface_or_window (long widget, boolean has) {
- if (GTK.GTK4) {
- if (has && OS.G_OBJECT_TYPE(widget) == OS.swt_fixed_get_type()) {
- return;
- }
- GTK.gtk_widget_set_has_surface(widget, has);
- } else {
- GTK.gtk_widget_set_has_window(widget, has);
- }
-}
-
-boolean gtk_widget_get_has_surface_or_window (long widget) {
- if (GTK.GTK4) {
- return GTK.gtk_widget_get_has_surface(widget);
- } else {
- return GTK.gtk_widget_get_has_window(widget);
- }
-}
-
-void gtk_widget_set_visible (long widget, boolean visible) {
- GTK.gtk_widget_set_visible (widget, visible);
+ return GTK4.gtk_native_get_surface(GTK4.gtk_widget_get_native (widget));
}
void gdk_window_get_size (long drawable, int[] width, int[] height) {
@@ -1929,7 +2133,7 @@ void gdk_surface_get_size (long surface, int[] width, int[] height) {
void gdk_event_free (long event) {
if (event == 0) return;
if (GTK.GTK4) {
- OS.g_object_unref(event);
+ GDK.gdk_event_unref(event);
} else {
GDK.gdk_event_free(event);
}
@@ -1952,29 +2156,19 @@ long gdk_event_get_surface_or_window(long event) {
}
/**
- * Wrapper function for gdk_display_peek_event() on GTK4,
- * and gdk_event_peek() on GTK3.
- *
- * @return the GdkEvent fetched
- */
-long gdk_event_peek() {
- if (GTK.GTK4) {
- long display = GDK.gdk_display_get_default();
- return GDK.gdk_display_peek_event(display);
- } else {
- return GDK.gdk_event_peek();
- }
-}
-
-/**
* Wrapper function for gdk_event_get_state()
* @param event pointer to the GdkEvent.
* @return the keymask to be used with constants like
* OS.GDK_SHIFT_MASK / OS.GDK_CONTROL_MASK / OS.GDK_MOD1_MASK etc..
*/
int gdk_event_get_state (long event) {
- int [] state = new int [1];
- GDK.gdk_event_get_state (event, state);
+ int [] state = new int[1];
+ if (GTK.GTK4) {
+ state[0] = GDK.gdk_event_get_modifier_state(event);
+ } else {
+ GDK.gdk_event_get_state(event, state);
+ }
+
return state[0];
}
@@ -1993,10 +2187,8 @@ void gtk_box_set_child_packing (long box, long child, boolean expand, boolean fi
GTK.gtk_widget_set_halign(child, GTK.GTK_ALIGN_FILL);
GTK.gtk_widget_set_valign(child, GTK.GTK_ALIGN_FILL);
}
- GTK.gtk_box_set_child_packing(box, child, pack_type);
- OS.g_object_set(box, OS.margin, padding, 0);
} else {
- GTK.gtk_box_set_child_packing(box, child, expand, fill, padding, pack_type);
+ GTK3.gtk_box_set_child_packing(box, child, expand, fill, padding, pack_type);
}
}
@@ -2008,10 +2200,9 @@ void gtk_box_pack_end (long box, long child, boolean expand, boolean fill, int p
GTK.gtk_widget_set_halign(child, GTK.GTK_ALIGN_FILL);
GTK.gtk_widget_set_valign(child, GTK.GTK_ALIGN_FILL);
}
- OS.g_object_set(box, OS.margin, padding, 0);
- GTK.gtk_box_pack_end(box, child);
+ GTK4.gtk_box_append(box, child);
} else {
- GTK.gtk_box_pack_end(box, child, expand, fill, padding);
+ GTK3.gtk_box_pack_end(box, child, expand, fill, padding);
}
}
@@ -2029,35 +2220,23 @@ int gdk_pointer_grab (long gdkResource, int grab_ownership, boolean owner_events
display = GDK.gdk_window_get_display (gdkResource);
}
}
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- long seat = GDK.gdk_display_get_default_seat(display);
- if (gdkSeatGrabPrepareFunc == null) {
- gdkSeatGrabPrepareFunc = new Callback(Widget.class, "GdkSeatGrabPrepareFunc", 3); //$NON-NLS-1$
- }
- long gdkSeatGrabPrepareFuncAddress = gdkSeatGrabPrepareFunc.getAddress();
- if (gdkSeatGrabPrepareFuncAddress == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- return GDK.gdk_seat_grab(seat, gdkResource, GDK.GDK_SEAT_CAPABILITY_ALL_POINTING, owner_events, cursor, 0, gdkSeatGrabPrepareFuncAddress, gdkResource);
- } else {
- long pointer = GDK.gdk_get_pointer(display);
- return GDK.gdk_device_grab (pointer, gdkResource, grab_ownership, owner_events, event_mask, cursor, time_);
+ long seat = GDK.gdk_display_get_default_seat(display);
+ if (gdkSeatGrabPrepareFunc == null) {
+ gdkSeatGrabPrepareFunc = new Callback(Widget.class, "GdkSeatGrabPrepareFunc", 3); //$NON-NLS-1$
}
+ return GDK.gdk_seat_grab(seat, gdkResource, GDK.GDK_SEAT_CAPABILITY_ALL_POINTING, owner_events, cursor, 0, gdkSeatGrabPrepareFunc.getAddress(), gdkResource);
}
void gdk_pointer_ungrab (long gdkResource, int time_) {
long display = GTK.GTK4? GDK.gdk_surface_get_display(gdkResource) : GDK.gdk_window_get_display (gdkResource);
- if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
- long seat = GDK.gdk_display_get_default_seat(display);
- GDK.gdk_seat_ungrab(seat);
- } else {
- long pointer = GDK.gdk_get_pointer(display);
- GDK.gdk_device_ungrab (pointer, time_);
- }
+ long seat = GDK.gdk_display_get_default_seat(display);
+ GDK.gdk_seat_ungrab(seat);
}
static long GdkSeatGrabPrepareFunc (long gdkSeat, long gdkResource, long userData_gdkResource) {
if (userData_gdkResource != 0) {
if (GTK.GTK4) {
- GDK.gdk_surface_show(userData_gdkResource);
+ /* TODO: GTK does not provide a gdk_surface_show, probably will require use of the present api */
} else {
GDK.gdk_window_show(userData_gdkResource);
}
@@ -2093,85 +2272,103 @@ boolean translateTraversal (int event) {
return false;
}
-long enterMotionScrollProc (long handle, double x, double y, long user_data) {
- long event = GTK.gtk_get_current_event();
- long result = 0;
+void enterMotionProc(long controller, double x, double y, long user_data) {
+ long event = GTK4.gtk_event_controller_get_current_event(controller);
+
switch ((int)user_data) {
case ENTER:
- result = gtk_enter_notify_event(handle, event);
+ // Possible bug in GTK4, event = 0, therefore unable to access event information
+ gtk4_enter_event(controller, x, y, event);
break;
case MOTION:
- result = gtk_motion_notify_event(handle, event);
+ gtk4_motion_event(controller, x, y, event);
break;
case MOTION_INVERSE:
- result = 1;
break;
+ }
+}
+
+boolean scrollProc(long controller, double dx, double dy, long user_data) {
+ long event = GTK4.gtk_event_controller_get_current_event(controller);
+
+ switch ((int)user_data) {
case SCROLL:
- result = gtk_scroll_event(handle, event);
- break;
+ return gtk4_scroll_event(controller, dx, dy, event);
}
- gdk_event_free(event);
- return result;
+
+ return false;
}
-long focusProc (long handle, long user_data) {
- long event = GTK.gtk_get_current_event();
- long result = 0;
+void focusProc(long controller, long user_data) {
+ long event = GTK4.gtk_event_controller_get_current_event(controller);
+
switch ((int)user_data) {
case FOCUS_IN:
- result = gtk_focus_in_event(handle, event);
+ gtk4_focus_enter_event(controller, event);
break;
case FOCUS_OUT:
- result = gtk_focus_out_event(handle, event);
+ gtk4_focus_leave_event(controller, event);
break;
}
- gdk_event_free(event);
- return result;
}
-long keyPressReleaseProc (long handle, int keyval, int keycode, int state, long user_data) {
- long event = GTK.gtk_get_current_event();
- long result = 0;
+void windowActiveProc(long handle, long user_data) {
+ long eventType = GTK.gtk_window_is_active(handle) ? SWT.FocusIn:SWT.FocusOut;
+
+ gtk4_focus_window_event(handle, eventType);
+}
+
+boolean keyPressReleaseProc(long controller, int keyval, int keycode, int state, long user_data) {
+ long event = GTK4.gtk_event_controller_get_current_event(controller);
+
switch ((int)user_data) {
case KEY_PRESSED:
- result = gtk_key_press_event(handle, event);
- break;
+ return gtk4_key_press_event(controller, keyval, keycode, state, event);
case KEY_RELEASED:
- result = gtk_key_release_event(handle, event);
+ gtk4_key_release_event(controller, keyval, keycode, state, event);
break;
}
- gdk_event_free(event);
- return result;
+
+ return false;
}
-long getsurePressReleaseProc (long gesture, int n_press, double x, double y, long user_data) {
- long event = GTK.gtk_get_current_event();
- long result = 0;
+void gesturePressReleaseProc(long gesture, int n_press, double x, double y, long user_data) {
+ long event = GTK4.gtk_event_controller_get_current_event(gesture);
+
switch ((int)user_data) {
case GESTURE_PRESSED:
- result = gtk_gesture_press_event(gesture, n_press, x, y, event);
+ gtk_gesture_press_event(gesture, n_press, x, y, event);
break;
case GESTURE_RELEASED:
- result = gtk_gesture_release_event(gesture, n_press, x, y, event);
+ gtk_gesture_release_event(gesture, n_press, x, y, event);
break;
}
- gdk_event_free(event);
- return result;
}
-long leaveProc (long handle, long user_data) {
- long event = GTK.gtk_get_current_event();
- long result = 0;
+void leaveProc(long controller, long handle, long user_data) {
+ long event = GTK4.gtk_event_controller_get_current_event(controller);
+
switch ((int)user_data) {
case LEAVE:
- result = gtk_leave_notify_event(handle, event);
+ // Possible bug in GTK4, event = 0, therefore unable to access event information
+ gtk4_leave_event(controller, event);
break;
}
- gdk_event_free(event);
- return result;
}
-long notifyStateProc (long gdk_handle, long handle) {
+long notifyProc (long object, long arg0, long user_data) {
+ switch ((int)user_data) {
+ case DPI_CHANGED: return dpiChanged(object, arg0);
+ case NOTIFY_STATE: return notifyState(object, arg0);
+ case NOTIFY_DEFAULT_HEIGHT:
+ case NOTIFY_DEFAULT_WIDTH:
+ case NOTIFY_MAXIMIZED:
+ return gtk_size_allocate(object, 0);
+ }
+ return 0;
+}
+
+long notifyState (long object, long argo0) {
return 0;
}
@@ -2197,7 +2394,7 @@ long windowProc (long handle, long user_data) {
case SELECT: return gtk_select (handle);
case SELECTION_DONE: return gtk_selection_done (handle);
case SHOW: return gtk_show (handle);
- case VALUE_CHANGED: return gtk_value_changed (handle);
+ case VALUE_CHANGED: return gtk_value_changed(handle);
case UNMAP: return gtk_unmap (handle);
case UNREALIZE: return gtk_unrealize (handle);
default: return 0;
@@ -2223,7 +2420,6 @@ long windowProc (long handle, long arg0, long user_data) {
case CONFIGURE_EVENT: return gtk_configure_event (handle, arg0);
case DELETE_EVENT: return gtk_delete_event (handle, arg0);
case ENTER_NOTIFY_EVENT: return gtk_enter_notify_event (handle, arg0);
- case EVENT: return gtk_event (handle, arg0);
case EVENT_AFTER: return gtk_event_after (handle, arg0);
case EXPOSE_EVENT: {
if (!GTK.GTK_IS_CONTAINER (handle)) {
@@ -2244,12 +2440,11 @@ long windowProc (long handle, long arg0, long user_data) {
case MOVE_FOCUS: return gtk_move_focus (handle, arg0);
case POPULATE_POPUP: return gtk_populate_popup (handle, arg0);
case SCROLL_EVENT: return gtk_scroll_event (handle, arg0);
- case SHOW_HELP: return gtk_show_help (handle, arg0);
+ case SHOW_HELP: return gtk3_show_help(handle, arg0);
case SIZE_ALLOCATE: return gtk_size_allocate (handle, arg0);
case TOGGLED: return gtk_toggled (handle, arg0);
case UNMAP_EVENT: return gtk_unmap_event (handle, arg0);
case WINDOW_STATE_EVENT: return gtk_window_state_event (handle, arg0);
- case ROW_DELETED: return gtk_row_deleted (handle, arg0);
default: return 0;
}
}
@@ -2262,10 +2457,9 @@ long windowProc (long handle, long arg0, long arg1, long user_data) {
case ROW_ACTIVATED: return gtk_row_activated (handle, arg0, arg1);
case SCROLL_CHILD: return gtk_scroll_child (handle, arg0, arg1);
case STATUS_ICON_POPUP_MENU: return gtk_status_icon_popup_menu (handle, arg0, arg1);
- case SWITCH_PAGE: return gtk_switch_page (handle, arg0, arg1);
+ case SWITCH_PAGE: return gtk_switch_page(handle, arg0, (int)arg1);
case TEST_COLLAPSE_ROW: return gtk_test_collapse_row (handle, arg0, arg1);
case TEST_EXPAND_ROW: return gtk_test_expand_row(handle, arg0, arg1);
- case ROW_INSERTED: return gtk_row_inserted (handle, arg0, arg1);
case ROW_HAS_CHILD_TOGGLED: return gtk_row_has_child_toggled(handle, arg0, arg1);
default: return 0;
}
@@ -2273,7 +2467,6 @@ long windowProc (long handle, long arg0, long arg1, long user_data) {
long windowProc (long handle, long arg0, long arg1, long arg2, long user_data) {
switch ((int)user_data) {
- case CHANGE_VALUE: return gtk_change_value (handle, arg0, arg1, arg2);
case EXPAND_COLLAPSE_CURSOR_ROW: return gtk_expand_collapse_cursor_row (handle, arg0, arg1, arg2);
case INSERT_TEXT: return gtk_insert_text (handle, arg0, arg1, arg2);
case TEXT_BUFFER_INSERT_TEXT: return gtk_text_buffer_insert_text (handle, arg0, arg1, arg2);
@@ -2299,9 +2492,6 @@ void gtk_widget_get_preferred_size (long widget, GtkRequisition requisition){
GTK.gtk_widget_get_preferred_size (widget, requisition, null);
}
-void gtk_image_set_from_gicon (long imageHandle, long pixbuf){
- GTK.gtk_image_set_from_gicon(imageHandle, pixbuf, GTK.GTK_ICON_SIZE_SMALL_TOOLBAR);
-}
/**
* Retrieves the amount of space around the outside of the container.
* On GTK3: this is done using gtk_container_get_border_width.
@@ -2317,7 +2507,7 @@ int gtk_container_get_border_width_or_margin (long handle) {
int marginEnd = GTK.gtk_widget_get_margin_end(handle);
return Math.max(Math.max(marginTop, marginBottom), Math.max(marginStart, marginEnd));
} else {
- return GTK.gtk_container_get_border_width(handle);
+ return GTK3.gtk_container_get_border_width(handle);
}
}
/**
@@ -2332,7 +2522,37 @@ void gtk_container_set_border_width (long handle, int border_width) {
GTK.gtk_widget_set_margin_start(handle, border_width);
GTK.gtk_widget_set_margin_end(handle, border_width);
} else {
- GTK.gtk_container_set_border_width (handle, border_width);
+ GTK3.gtk_container_set_border_width (handle, border_width);
+ }
+}
+
+void setToolTipText(long tipWidget, String string) {
+ byte[] buffer = null;
+ if (string != null && !string.isEmpty()) {
+ char[] chars = fixMnemonic(string, false, true);
+ buffer = Converter.wcsToMbcs(chars, true);
+ }
+
+ GTK.gtk_widget_set_tooltip_text(tipWidget, buffer);
+}
+
+void gtk_widget_size_allocate (long widget, GtkAllocation allocation, int baseline) {
+ if (GTK.GTK4) {
+ GTK4.gtk_widget_size_allocate(widget, allocation, baseline);
+ } else {
+ GTK3.gtk_widget_size_allocate(widget, allocation);
+ }
+}
+
+void notifyCreationTracker() {
+ if (WidgetSpy.isEnabled) {
+ WidgetSpy.getInstance().widgetCreated(this);
+ }
+}
+
+void notifyDisposalTracker() {
+ if (WidgetSpy.isEnabled) {
+ WidgetSpy.getInstance().widgetDisposed(this);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
index a84b95c2e8..f9547d512b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -15,17 +15,15 @@ package org.eclipse.swt.graphics;
import org.eclipse.swt.*;
-import org.eclipse.swt.internal.win32.*;
/**
- * Instances of this class manage the operating system resources that
- * implement SWT's RGB color model. To create a color you can either
+ * Instances of this store color information. To create a color you can either
* specify the individual color components as integers in the range
* 0 to 255 or provide an instance of an <code>RGB</code> or <code>RGBA</code>.
* <p>
- * Application code must explicitly invoke the <code>Color.dispose()</code>
- * method to release the operating system resources managed by each instance
- * when those instances are no longer required.
+ * Colors do not need to be disposed, however to maintain compatibility
+ * with older code, disposing a Color is not an error. As Colors do not require
+ * disposal, the constructors which do not require a Device are recommended.
* </p>
*
* @see RGB
@@ -55,6 +53,13 @@ public final class Color extends Resource {
/**
* Prevents uninitialized instances from being created outside the package.
*/
+Color() {
+ super();
+}
+
+/**
+ * Prevents uninitialized instances from being created outside the package.
+ */
Color(Device device) {
super(device);
}
@@ -62,14 +67,7 @@ Color(Device device) {
/**
* Constructs a new instance of this class given a device and the
* desired red, green and blue values expressed as ints in the range
- * 0 to 255 (where 0 is black and 255 is full brightness). On limited
- * color devices, the color instance created by this call may not have
- * the same RGB values as the ones specified by the arguments. The
- * RGB values on the returned instance will be the color values of
- * the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
+ * 0 to 255 (where 0 is black and 255 is full brightness).
*
* @param device the device on which to allocate the color
* @param red the amount of red in the color
@@ -81,7 +79,7 @@ Color(Device device) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(int, int, int) The equivalent constructor not requiring a Device
*/
public Color (Device device, int red, int green, int blue) {
super(device);
@@ -90,16 +88,28 @@ public Color (Device device, int red, int green, int blue) {
}
/**
+ * Constructs a new instance of this class given the
+ * desired red, green and blue values expressed as ints in the range
+ * 0 to 255 (where 0 is black and 255 is full brightness).
+ *
+ * @param red the amount of red in the color
+ * @param green the amount of green in the color
+ * @param blue the amount of blue in the color
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
+ * </ul>
+ * @since 3.115
+ */
+public Color(int red, int green, int blue) {
+ super();
+ init(red, green, blue, 255);
+}
+
+/**
* Constructs a new instance of this class given a device and the
* desired red, green, blue &amp; alpha values expressed as ints in the range
- * 0 to 255 (where 0 is black and 255 is full brightness). On limited
- * color devices, the color instance created by this call may not have
- * the same RGB values as the ones specified by the arguments. The
- * RGB values on the returned instance will be the color values of
- * the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
+ * 0 to 255 (where 0 is black and 255 is full brightness).
*
* @param device the device on which to allocate the color
* @param red the amount of red in the color
@@ -112,7 +122,8 @@ public Color (Device device, int red, int green, int blue) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(int, int, int, int) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color (Device device, int red, int green, int blue, int alpha) {
@@ -122,15 +133,29 @@ public Color (Device device, int red, int green, int blue, int alpha) {
}
/**
+ * Constructs a new instance of this class given the
+ * desired red, green, blue &amp; alpha values expressed as ints in the range
+ * 0 to 255 (where 0 is black and 255 is full brightness).
+ *
+ * @param red the amount of red in the color
+ * @param green the amount of green in the color
+ * @param blue the amount of blue in the color
+ * @param alpha the amount of alpha in the color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha argument is not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(int red, int green, int blue, int alpha) {
+ super();
+ init(red, green, blue, alpha);
+}
+
+/**
* Constructs a new instance of this class given a device and an
* <code>RGB</code> describing the desired red, green and blue values.
- * On limited color devices, the color instance created by this call
- * may not have the same RGB values as the ones specified by the
- * argument. The RGB values on the returned instance will be the color
- * values of the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgb the RGB values of the desired color
@@ -141,7 +166,7 @@ public Color (Device device, int red, int green, int blue, int alpha) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green or blue components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGB) The equivalent constructor not requiring a Device
*/
public Color (Device device, RGB rgb) {
super(device);
@@ -151,15 +176,26 @@ public Color (Device device, RGB rgb) {
}
/**
+ * Constructs a new instance of this class given an
+ * <code>RGB</code> describing the desired red, green and blue values.
+ *
+ * @param rgb the RGB values of the desired color
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgb argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green or blue components of the argument are not between 0 and 255</li>
+ * </ul>
+ * @since 3.115
+ */
+public Color(RGB rgb) {
+ super();
+ if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgb.red, rgb.green, rgb.blue, 255);
+}
+
+/**
* Constructs a new instance of this class given a device and an
* <code>RGBA</code> describing the desired red, green, blue &amp; alpha values.
- * On limited color devices, the color instance created by this call
- * may not have the same RGBA values as the ones specified by the
- * argument. The RGBA values on the returned instance will be the color
- * values of the operating system color + alpha.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgba the RGBA values of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
@@ -170,7 +206,8 @@ public Color (Device device, RGB rgb) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGBA) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, RGBA rgba) {
@@ -181,16 +218,28 @@ public Color(Device device, RGBA rgba) {
}
/**
+ * Constructs a new instance of this class given an
+ * <code>RGBA</code> describing the desired red, green, blue &amp; alpha values.
+ *
+ * @param rgba the RGBA values of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgba argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(RGBA rgba) {
+ super();
+ if (rgba == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgba.rgb.red, rgba.rgb.green, rgba.rgb.blue, rgba.alpha);
+}
+
+/**
* Constructs a new instance of this class given a device, an
* <code>RGB</code> describing the desired red, green and blue values,
* alpha specifying the level of transparency.
- * On limited color devices, the color instance created by this call
- * may not have the same RGB values as the ones specified by the
- * argument. The RGB values on the returned instance will be the color
- * values of the operating system color.
- * <p>
- * You must dispose the color when it is no longer required.
- * </p>
*
* @param device the device on which to allocate the color
* @param rgb the RGB values of the desired color
@@ -202,7 +251,8 @@ public Color(Device device, RGBA rgba) {
* <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
* </ul>
*
- * @see #dispose
+ * @see #Color(RGB, int) The equivalent constructor not requiring a Device
+ *
* @since 3.104
*/
public Color(Device device, RGB rgb, int alpha) {
@@ -212,26 +262,68 @@ public Color(Device device, RGB rgb, int alpha) {
init();
}
+/**
+ * Constructs a new instance of this class given an
+ * <code>RGB</code> describing the desired red, green and blue values,
+ * alpha specifying the level of transparency.
+ *
+ * @param rgb the RGB values of the desired color
+ * @param alpha the alpha value of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the rgb argument is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li>
+ * </ul>
+ *
+ * @since 3.115
+ */
+public Color(RGB rgb, int alpha) {
+ super();
+ if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ init(rgb.red, rgb.green, rgb.blue, alpha);
+}
+
@Override
void destroy() {
- /*
- * If this is a palette-based device,
- * Decrease the reference count for this color.
- * If the reference count reaches 0, the slot may
- * be reused when another color is allocated.
- */
- long /*int*/ hPal = device.hPalette;
- if (hPal != 0) {
- int index = OS.GetNearestPaletteIndex(hPal, handle);
- int[] colorRefCount = device.colorRefCount;
- if (colorRefCount[index] > 0) {
- colorRefCount[index]--;
- }
- }
handle = -1;
}
/**
+ * Colors do not need to be disposed, however to maintain compatibility
+ * with older code, disposing a Color is not an error.
+ */
+@Override
+public void dispose() {
+ // Does as below to maintain API contract with Resource. Does
+ // not use super.dispose() because that untracks the Color
+ // from the Device tracking, however init() is overridden
+ // to prevent the tracking in the first place.
+ destroy();
+ device = null;
+}
+
+/**
+ * Returns the <code>Device</code> where this resource was
+ * created. In cases where no <code>Device</code> was used
+ * at creation, returns the current or default Device.
+ *
+ * <p>
+ * As Color does not require a Device it is recommended to not
+ * use {@link Color#getDevice()}.
+ * </p>
+ *
+ * @return <code>Device</code> the device of the receiver
+ * @since 3.2
+ */
+@Override
+public Device getDevice() {
+ // Fall back on Device.getDevice only if we haven't been disposed
+ // already.
+ if (this.device == null && this.handle != -1) return Device.getDevice();
+ return super.getDevice();
+}
+
+/**
* Compares the argument to the receiver, and returns true
* if they represent the <em>same</em> object using a class
* specific comparison.
@@ -246,7 +338,10 @@ public boolean equals (Object object) {
if (object == this) return true;
if (!(object instanceof Color)) return false;
Color color = (Color) object;
- return device == color.device && (handle & 0xFFFFFF) == (color.handle & 0xFFFFFF) && (alpha == color.alpha);
+ if (isDisposed() || color.isDisposed()) {
+ return false;
+ }
+ return (handle & 0xFFFFFF) == (color.handle & 0xFFFFFF) && (alpha == color.alpha);
}
/**
@@ -346,6 +441,7 @@ public RGBA getRGBA () {
*/
@Override
public int hashCode () {
+ if (this.isDisposed()) return 0;
return handle ^ alpha;
}
@@ -371,44 +467,14 @@ void init(int red, int green, int blue, int alpha) {
}
handle = (red & 0xFF) | ((green & 0xFF) << 8) | ((blue & 0xFF) << 16);
this.alpha = alpha;
+}
- /* If this is not a palette-based device, return */
- long /*int*/ hPal = device.hPalette;
- if (hPal == 0) return;
-
- int[] colorRefCount = device.colorRefCount;
- /* Add this color to the default palette now */
- /* First find out if the color already exists */
- int index = OS.GetNearestPaletteIndex(hPal, handle);
- /* See if the nearest color actually is the color */
- byte[] entry = new byte[4];
- OS.GetPaletteEntries(hPal, index, 1, entry);
- if ((entry[0] == (byte)red) && (entry[1] == (byte)green) &&
- (entry[2] == (byte)blue)) {
- /* Found the color. Increment the ref count and return */
- colorRefCount[index]++;
- return;
- }
- /* Didn't find the color, allocate it now. Find the first free entry */
- int i = 0;
- while (i < colorRefCount.length) {
- if (colorRefCount[i] == 0) {
- index = i;
- break;
- }
- i++;
- }
- if (i == colorRefCount.length) {
- /* No free entries, use the closest one */
- /* Remake the handle from the actual rgbs */
- handle = (entry[0] & 0xFF) | ((entry[1] & 0xFF) << 8) |
- ((entry[2] & 0xFF) << 16);
- } else {
- /* Found a free entry */
- entry = new byte[] { (byte)(red & 0xFF), (byte)(green & 0xFF), (byte)(blue & 0xFF), 0 };
- OS.SetPaletteEntries(hPal, index, 1, entry);
- }
- colorRefCount[index]++;
+@Override
+void init() {
+ // Resource init simply tracks this resource in the Device
+ // if DEBUG is on. Since Colors don't require disposal,
+ // the tracking would be a memory leak and a misreport
+ // on what resources are in use.
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
index 6e2946c31f..a677a4b790 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
@@ -58,7 +58,7 @@ public final class Cursor extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
boolean isIcon;
@@ -117,7 +117,7 @@ Cursor(Device device) {
*/
public Cursor(Device device, int style) {
super(device);
- long /*int*/ lpCursorName = 0;
+ long lpCursorName = 0;
switch (style) {
case SWT.CURSOR_HAND: lpCursorName = OS.IDC_HAND; break;
case SWT.CURSOR_ARROW: lpCursorName = OS.IDC_ARROW; break;
@@ -209,7 +209,7 @@ public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int
byte[] maskData = ImageData.convertPad(mask.data, mask.width, mask.height, mask.depth, mask.scanlinePad, 2);
/* Create the cursor */
- long /*int*/ hInst = OS.GetModuleHandle(null);
+ long hInst = OS.GetModuleHandle(null);
handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, sourceData, maskData);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
init();
@@ -252,8 +252,8 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
hotspotY >= source.height || hotspotY < 0) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- long /*int*/ hBitmap = 0;
- long /*int*/ hMask = 0;
+ long hBitmap = 0;
+ long hMask = 0;
if (source.maskData == null && source.transparentPixel == -1 && (source.alpha != -1 || source.alphaData != null)) {
PaletteData palette = source.palette;
PaletteData newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
@@ -302,7 +302,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
} else {
ImageData mask = source.getTransparencyMask();
- long /*int*/ [] result = Image.init(this.device, null, source, mask);
+ long [] result = Image.init(this.device, null, source, mask);
hBitmap = result[0];
hMask = result[1];
}
@@ -340,12 +340,12 @@ void destroy () {
OS.DestroyIcon(handle);
} else {
/*
- * The MSDN states that one should not destroy a shared
- * cursor, that is, one obtained from LoadCursor.
- * However, it does not appear to do any harm, so rather
- * than keep track of how a cursor was created, we just
- * destroy them all. If this causes problems in the future,
- * put the flag back in.
+ * The MSDN states that one should not destroy a shared
+ * cursor, that is, one obtained from LoadCursor.
+ * However, it does not appear to do any harm, so rather
+ * than keep track of how a cursor was created, we just
+ * destroy them all. If this causes problems in the future,
+ * put the flag back in.
*/
OS.DestroyCursor(handle);
}
@@ -382,7 +382,7 @@ public boolean equals (Object object) {
*/
@Override
public int hashCode () {
- return (int)/*64*/handle;
+ return (int)handle;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
index c20659002d..6562f91249 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
@@ -37,21 +37,6 @@ public abstract class Device implements Drawable {
Object [] objects;
Object trackingLock;
- /**
- * Palette
- * (Warning: This field is platform dependent)
- * <p>
- * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
- * public API. It is marked public only so that it can be shared
- * within the packages provided by SWT. It is not available on all
- * platforms and should never be accessed from application code.
- * </p>
- *
- * @noreference This field is not intended to be referenced by clients.
- */
- public long /*int*/ hPalette = 0;
- int [] colorRefCount;
-
/* System Font */
Font systemFont;
@@ -62,11 +47,11 @@ public abstract class Device implements Drawable {
int[] pixels;
/* Scripts */
- long /*int*/ [] scripts;
+ long [] scripts;
/* Advanced Graphics */
- long /*int*/ [] gdipToken;
- long /*int*/ fontCollection;
+ long [] gdipToken;
+ long fontCollection;
String[] loadedFonts;
boolean disposed;
@@ -136,15 +121,60 @@ public Device(DeviceData data) {
tracking = data.tracking;
}
if (tracking) {
- errors = new Error [128];
- objects = new Object [128];
- trackingLock = new Object ();
+ startTracking();
}
create (data);
init ();
}
}
+/**
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * @since 3.115
+ */
+public boolean isTracking() {
+ checkDevice();
+ return tracking;
+}
+
+/**
+ * @exception SWTException <ul>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * @since 3.115
+ */
+public void setTracking(boolean tracking) {
+ checkDevice();
+ if (tracking == this.tracking) {
+ return;
+ }
+ this.tracking = tracking;
+ if (tracking) {
+ startTracking();
+ } else {
+ stopTracking();
+ }
+}
+
+private void startTracking() {
+ errors = new Error [128];
+ objects = new Object [128];
+ trackingLock = new Object ();
+}
+
+private void stopTracking() {
+ synchronized (trackingLock) {
+ objects = null;
+ errors = null;
+ trackingLock = null;
+ }
+}
+
+
+
void addFont (String font) {
if (loadedFonts == null) loadedFonts = new String [4];
int length = loadedFonts.length;
@@ -189,7 +219,7 @@ protected void checkDevice () {
void checkGDIP() {
if (gdipToken != null) return;
- long /*int*/ [] token = new long /*int*/ [1];
+ long [] token = new long [1];
GdiplusStartupInput input = new GdiplusStartupInput ();
input.GdiplusVersion = 1;
if (Gdip.GdiplusStartup (token, input, 0) != 0) SWT.error (SWT.ERROR_NO_HANDLES);
@@ -197,8 +227,7 @@ void checkGDIP() {
if (loadedFonts != null) {
fontCollection = Gdip.PrivateFontCollection_new();
if (fontCollection == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- for (int i = 0; i < loadedFonts.length; i++) {
- String path = loadedFonts[i];
+ for (String path : loadedFonts) {
if (path == null) break;
int length = path.length();
char [] buffer = new char [length + 1];
@@ -228,14 +257,14 @@ protected void create (DeviceData data) {
}
int computePixels(float height) {
- long /*int*/ hDC = internal_new_GC (null);
+ long hDC = internal_new_GC (null);
int pixels = -(int)(0.5f + (height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY) / 72f));
internal_dispose_GC (hDC, null);
return pixels;
}
-float computePoints(LOGFONT logFont, long /*int*/ hFont) {
- long /*int*/ hDC = internal_new_GC (null);
+float computePoints(LOGFONT logFont, long hFont) {
+ long hDC = internal_new_GC (null);
int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);
int pixels = 0;
if (logFont.lfHeight > 0) {
@@ -246,7 +275,7 @@ float computePoints(LOGFONT logFont, long /*int*/ hFont) {
* height of a font in points does not include the internal leading,
* we must subtract the internal leading, which requires a TEXTMETRIC.
*/
- long /*int*/ oldFont = OS.SelectObject(hDC, hFont);
+ long oldFont = OS.SelectObject(hDC, hFont);
TEXTMETRIC lptm = new TEXTMETRIC ();
OS.GetTextMetrics(hDC, lptm);
OS.SelectObject(hDC, oldFont);
@@ -287,17 +316,25 @@ protected void destroy () {
*/
public void dispose () {
synchronized (Device.class) {
- if (isDisposed()) return;
- checkDevice ();
- release ();
- destroy ();
- disposed = true;
- if (tracking) {
- synchronized (trackingLock) {
- printErrors ();
- objects = null;
- errors = null;
- trackingLock = null;
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ if (isDisposed ()) return;
+ checkDevice ();
+
+ try {
+ release ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+
+ destroy ();
+ disposed = true;
+ if (tracking) {
+ synchronized (trackingLock) {
+ printErrors ();
+ objects = null;
+ errors = null;
+ trackingLock = null;
+ }
}
}
}
@@ -315,8 +352,8 @@ void dispose_Object (Object object) {
}
}
-long /*int*/ EnumFontFamProc (long /*int*/ lpelfe, long /*int*/ lpntme, long /*int*/ FontType, long /*int*/ lParam) {
- boolean isScalable = ((int)/*64*/FontType & OS.RASTER_FONTTYPE) == 0;
+long EnumFontFamProc (long lpelfe, long lpntme, long FontType, long lParam) {
+ boolean isScalable = ((int)FontType & OS.RASTER_FONTTYPE) == 0;
boolean scalable = lParam == 1;
if (isScalable == scalable) {
/* Add the log font to the list of log fonts */
@@ -366,7 +403,7 @@ public Rectangle getBounds() {
}
private Rectangle getBoundsInPixels () {
- long /*int*/ hDC = internal_new_GC (null);
+ long hDC = internal_new_GC (null);
int width = OS.GetDeviceCaps (hDC, OS.HORZRES);
int height = OS.GetDeviceCaps (hDC, OS.VERTRES);
internal_dispose_GC (hDC, null);
@@ -445,7 +482,7 @@ public Rectangle getClientArea () {
*/
public int getDepth () {
checkDevice ();
- long /*int*/ hDC = internal_new_GC (null);
+ long hDC = internal_new_GC (null);
int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
internal_dispose_GC (hDC, null);
@@ -465,7 +502,7 @@ public int getDepth () {
*/
public Point getDPI () {
checkDevice ();
- long /*int*/ hDC = internal_new_GC (null);
+ long hDC = internal_new_GC (null);
int dpiX = OS.GetDeviceCaps (hDC, OS.LOGPIXELSX);
int dpiY = OS.GetDeviceCaps (hDC, OS.LOGPIXELSY);
internal_dispose_GC (hDC, null);
@@ -479,7 +516,7 @@ public Point getDPI () {
* @return the horizontal DPI
*/
int _getDPIx () {
- long /*int*/ hDC = internal_new_GC (null);
+ long hDC = internal_new_GC (null);
int dpi = OS.GetDeviceCaps (hDC, OS.LOGPIXELSX);
internal_dispose_GC (hDC, null);
return dpi;
@@ -502,8 +539,7 @@ public FontData [] getFontList (String faceName, boolean scalable) {
/* Create the callback */
Callback callback = new Callback (this, "EnumFontFamProc", 4); //$NON-NLS-1$
- long /*int*/ lpEnumFontFamProc = callback.getAddress ();
- if (lpEnumFontFamProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long lpEnumFontFamProc = callback.getAddress ();
/* Initialize the instance variables */
metrics = new TEXTMETRIC ();
@@ -516,7 +552,7 @@ public FontData [] getFontList (String faceName, boolean scalable) {
/* Enumerate */
int offset = 0;
- long /*int*/ hDC = internal_new_GC (null);
+ long hDC = internal_new_GC (null);
if (faceName == null) {
/* The user did not specify a face name, so they want all versions of all available face names */
OS.EnumFontFamilies (hDC, null, lpEnumFontFamProc, scalable ? 1 : 0);
@@ -532,7 +568,6 @@ public FontData [] getFontList (String faceName, boolean scalable) {
OS.EnumFontFamilies (hDC, lf.lfFaceName, lpEnumFontFamProc, scalable ? 1 : 0);
}
} else {
- /* Use the character encoding for the default locale */
TCHAR lpFaceName = new TCHAR (0, faceName, true);
OS.EnumFontFamilies (hDC, lpFaceName.chars, lpEnumFontFamProc, scalable ? 1 : 0);
}
@@ -570,19 +605,6 @@ String getLastError () {
return " [GetLastError=0x" + Integer.toHexString(error) + "]"; //$NON-NLS-1$ //$NON-NLS-2$
}
-String getLastErrorText () {
- int error = OS.GetLastError();
- if (error == 0) return ""; //$NON-NLS-1$
- long /*int*/ [] buffer = new long /*int*/ [1];
- int dwFlags = OS.FORMAT_MESSAGE_ALLOCATE_BUFFER | OS.FORMAT_MESSAGE_FROM_SYSTEM | OS.FORMAT_MESSAGE_IGNORE_INSERTS;
- int length = OS.FormatMessage(dwFlags, 0, error, OS.LANG_USER_DEFAULT, buffer, 0, 0);
- if (length == 0) return " [GetLastError=0x" + Integer.toHexString(error) + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- char [] buffer1 = new char [length];
- OS.MoveMemory(buffer1, buffer[0], length * TCHAR.sizeof);
- if (buffer[0] != 0) OS.LocalFree(buffer[0]);
- return new String(buffer1);
-}
-
/**
* Returns the matching standard color for the given
* constant, which should be one of the color constants
@@ -649,7 +671,7 @@ public Color getSystemColor (int id) {
*/
public Font getSystemFont () {
checkDevice ();
- long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long hFont = OS.GetStockObject (OS.SYSTEM_FONT);
return Font.win32_new (this, hFont);
}
@@ -690,63 +712,12 @@ protected void init () {
systemFont = getSystemFont();
/* Initialize scripts list */
- long /*int*/ [] ppSp = new long /*int*/ [1];
+ long [] ppSp = new long [1];
int [] piNumScripts = new int [1];
OS.ScriptGetProperties (ppSp, piNumScripts);
- scripts = new long /*int*/ [piNumScripts [0]];
+ scripts = new long [piNumScripts [0]];
+ // TODO do all the movememories here
OS.MoveMemory (scripts, ppSp [0], scripts.length * C.PTR_SIZEOF);
-
- /*
- * If we're not on a device which supports palettes,
- * don't create one.
- */
- long /*int*/ hDC = internal_new_GC (null);
- int rc = OS.GetDeviceCaps (hDC, OS.RASTERCAPS);
- int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
- int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
-
- bits *= planes;
- if ((rc & OS.RC_PALETTE) == 0 || bits != 8) {
- internal_dispose_GC (hDC, null);
- return;
- }
-
- int numReserved = OS.GetDeviceCaps (hDC, OS.NUMRESERVED);
- int numEntries = OS.GetDeviceCaps (hDC, OS.SIZEPALETTE);
-
- /* Create the palette and reference counter */
- colorRefCount = new int [numEntries];
-
- /* 4 bytes header + 4 bytes per entry * numEntries entries */
- byte [] logPalette = new byte [4 + 4 * numEntries];
-
- /* 2 bytes = special header */
- logPalette [0] = 0x00;
- logPalette [1] = 0x03;
-
- /* 2 bytes = number of colors, LSB first */
- logPalette [2] = 0;
- logPalette [3] = 1;
-
- /*
- * Create a palette which contains the system entries
- * as they are located in the system palette. The
- * MSDN article 'Memory Device Contexts' describes
- * where system entries are located. On an 8 bit
- * display with 20 reserved colors, the system colors
- * will be the first 10 entries and the last 10 ones.
- */
- byte[] lppe = new byte [4 * numEntries];
- OS.GetSystemPaletteEntries (hDC, 0, numEntries, lppe);
- /* Copy all entries from the system palette */
- System.arraycopy (lppe, 0, logPalette, 4, 4 * numEntries);
- /* Lock the indices corresponding to the system entries */
- for (int i = 0; i < numReserved / 2; i++) {
- colorRefCount [i] = 1;
- colorRefCount [numEntries - 1 - i] = 1;
- }
- internal_dispose_GC (hDC, null);
- hPalette = OS.CreatePalette (logPalette);
}
/**
* Invokes platform specific functionality to allocate a new GC handle.
@@ -764,7 +735,7 @@ protected void init () {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public abstract long /*int*/ internal_new_GC (GCData data);
+public abstract long internal_new_GC (GCData data);
/**
* Invokes platform specific functionality to dispose a GC handle.
@@ -782,7 +753,7 @@ public abstract long /*int*/ internal_new_GC (GCData data);
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public abstract void /*long*/ internal_dispose_GC (long /*int*/ hDC, GCData data);
+public abstract void /*long*/ internal_dispose_GC (long hDC, GCData data);
/**
* Returns <code>true</code> if the device has been disposed,
@@ -866,8 +837,7 @@ void printErrors () {
int objectCount = 0;
int colors = 0, cursors = 0, fonts = 0, gcs = 0, images = 0;
int paths = 0, patterns = 0, regions = 0, textLayouts = 0, transforms = 0;
- for (int i=0; i<objects.length; i++) {
- Object object = objects [i];
+ for (Object object : objects) {
if (object != null) {
objectCount++;
if (object instanceof Color) colors++;
@@ -898,8 +868,8 @@ void printErrors () {
string = string.substring (0, string.length () - 2);
System.err.println (string);
}
- for (int i=0; i<errors.length; i++) {
- if (errors [i] != null) errors [i].printStackTrace (System.err);
+ for (Error error : errors) {
+ if (error != null) error.printStackTrace (System.err);
}
}
}
@@ -939,9 +909,6 @@ protected void release () {
}
gdipToken = null;
scripts = null;
- if (hPalette != 0) OS.DeleteObject (hPalette);
- hPalette = 0;
- colorRefCount = null;
logFonts = null;
nFonts = 0;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
index dce8d59ac7..63492501df 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
@@ -47,7 +47,7 @@ public final class Font extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
/**
* Prevents uninitialized instances from being created outside the package.
@@ -111,8 +111,8 @@ public Font(Device device, FontData[] fds) {
super(device);
if (fds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (fds.length == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- for (int i=0; i<fds.length; i++) {
- if (fds[i] == null) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ for (FontData fd : fds) {
+ if (fd == null) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
init(fds[0]);
init();
@@ -210,7 +210,7 @@ public FontData[] getFontData() {
*/
@Override
public int hashCode () {
- return (int)/*64*/handle;
+ return (int)handle;
}
void init (FontData fd) {
@@ -266,9 +266,15 @@ public String toString () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Font win32_new(Device device, long /*int*/ handle) {
+public static Font win32_new(Device device, long handle) {
Font font = new Font(device);
font.handle = handle;
+ /*
+ * When created this way, Font doesn't own its .handle, and
+ * for this reason it can't be disposed. Tell leak detector
+ * to just ignore it.
+ */
+ font.ignoreNonDisposed();
return font;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
index 7c814b7ec9..247842e13d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
@@ -14,9 +14,9 @@
package org.eclipse.swt.graphics;
+import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.*;
/**
* Instances of this class describe operating system fonts.
@@ -317,7 +317,7 @@ public boolean equals (Object object) {
getName().equals(fd.getName());
}
-long /*int*/ EnumLocalesProc(long /*int*/ lpLocaleString) {
+long EnumLocalesProc(long lpLocaleString) {
/* Get the locale ID */
int length = 8;
@@ -380,7 +380,7 @@ public int getHeight() {
* @since 3.0
*/
public String getLocale () {
- StringBuffer buffer = new StringBuffer ();
+ StringBuilder buffer = new StringBuilder ();
char sep = '_';
if (lang != null) {
buffer.append (lang);
@@ -521,9 +521,7 @@ public void setLocale(String locale) {
data.lfCharSet = (byte)OS.DEFAULT_CHARSET;
} else {
Callback callback = new Callback (this, "EnumLocalesProc", 1); //$NON-NLS-1$
- long /*int*/ lpEnumLocalesProc = callback.getAddress ();
- if (lpEnumLocalesProc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- OS.EnumSystemLocales(lpEnumLocalesProc, OS.LCID_SUPPORTED);
+ OS.EnumSystemLocales(callback.getAddress (), OS.LCID_SUPPORTED);
callback.dispose ();
}
}
@@ -598,7 +596,7 @@ public void setStyle(int style) {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer(128);
+ StringBuilder buffer = new StringBuilder(128);
buffer.append("1|"); //$NON-NLS-1$
String name = getName();
buffer.append(name);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java
index 5bca68c128..debee63294 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java
@@ -116,6 +116,7 @@ public double getAverageCharacterWidth() {
* @return the average character width of the font
* @deprecated Use getAverageCharacterWidth() instead
*/
+@Deprecated
public int getAverageCharWidth() {
return DPIUtil.autoScaleDown(handle.tmAveCharWidth);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index 240a90995c..b79fe461f5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
@@ -73,7 +73,7 @@ public final class GC extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
Drawable drawable;
GCData data;
@@ -168,7 +168,7 @@ public GC(Drawable drawable, int style) {
if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
GCData data = new GCData ();
data.style = checkStyle(style);
- long /*int*/ hDC = drawable.internal_new_GC(data);
+ long hDC = drawable.internal_new_GC(data);
Device device = data.device;
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -187,17 +187,22 @@ void checkGC(int mask) {
if ((state & mask) == mask) return;
state = (state ^ mask) & mask;
data.state |= mask;
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- long /*int*/ pen = data.gdipPen;
+ long pen = data.gdipPen;
float width = data.lineWidth;
if ((state & FOREGROUND) != 0 || (pen == 0 && (state & (LINE_WIDTH | LINE_STYLE | LINE_MITERLIMIT | LINE_JOIN | LINE_CAP)) != 0)) {
if (data.gdipFgBrush != 0) Gdip.SolidBrush_delete(data.gdipFgBrush);
data.gdipFgBrush = 0;
- long /*int*/ brush;
+ long brush;
Pattern pattern = data.foregroundPattern;
if (pattern != null) {
- brush = pattern.handle;
+ if(data.alpha == 0xFF) {
+ brush = pattern.handle;
+ } else {
+ brush = data.gdipFgPatternBrushAlpha != 0 ? Gdip.Brush_Clone(data.gdipFgPatternBrushAlpha) : createAlphaTextureBrush(pattern.handle, data.alpha);
+ data.gdipFgPatternBrushAlpha = brush;
+ }
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(brush)) {
case Gdip.BrushTypeTextureFill:
@@ -283,11 +288,16 @@ void checkGC(int mask) {
data.gdipBgBrush = 0;
Pattern pattern = data.backgroundPattern;
if (pattern != null) {
- data.gdipBrush = pattern.handle;
+ if(data.alpha == 0xFF) {
+ data.gdipBrush = pattern.handle;
+ } else {
+ long brush = data.gdipBgPatternBrushAlpha != 0 ? Gdip.Brush_Clone(data.gdipBgPatternBrushAlpha) : createAlphaTextureBrush(pattern.handle, data.alpha);
+ data.gdipBrush = data.gdipBgBrush /*= data.gdipBgPatternBrushAlpha */ = brush;
+ }
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(data.gdipBrush)) {
case Gdip.BrushTypeTextureFill:
- long /*int*/ brush = Gdip.Brush_Clone(data.gdipBrush);
+ long brush = Gdip.Brush_Clone(data.gdipBrush);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.TextureBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
data.gdipBrush = data.gdipBgBrush = brush;
@@ -296,7 +306,7 @@ void checkGC(int mask) {
} else {
int background = data.background;
int color = (data.alpha << 24) | ((background >> 16) & 0xFF) | (background & 0xFF00) | ((background & 0xFF) << 16);
- long /*int*/ brush = Gdip.SolidBrush_new(color);
+ long brush = Gdip.SolidBrush_new(color);
if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
data.gdipBrush = data.gdipBgBrush = brush;
}
@@ -304,8 +314,8 @@ void checkGC(int mask) {
if ((state & FONT) != 0) {
Font font = data.font;
OS.SelectObject(handle, font.handle);
- long /*int*/[] hFont = new long /*int*/[1];
- long /*int*/ gdipFont = createGdipFont(handle, font.handle, gdipGraphics, device.fontCollection, null, hFont);
+ long[] hFont = new long[1];
+ long gdipFont = createGdipFont(handle, font.handle, gdipGraphics, device.fontCollection, null, hFont);
if (hFont[0] != 0) OS.SelectObject(handle, hFont[0]);
if (data.hGDIFont != 0) OS.DeleteObject(data.hGDIFont);
data.hGDIFont = hFont[0];
@@ -314,7 +324,7 @@ void checkGC(int mask) {
}
if ((state & DRAW_OFFSET) != 0) {
data.gdipXOffset = data.gdipYOffset = 0;
- long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
PointF point = new PointF();
point.X = point.Y = 1;
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
@@ -323,13 +333,13 @@ void checkGC(int mask) {
float scaling = point.X;
if (scaling < 0) scaling = -scaling;
float penWidth = data.lineWidth * scaling;
- if (penWidth == 0 || ((int)penWidth % 2) == 1) {
+ if (penWidth == 0 || (((int)penWidth) & 1) == 1) {
data.gdipXOffset = 0.5f / scaling;
}
scaling = point.Y;
if (scaling < 0) scaling = -scaling;
penWidth = data.lineWidth * scaling;
- if (penWidth == 0 || ((int)penWidth % 2) == 1) {
+ if (penWidth == 0 || (((int)penWidth) & 1) == 1) {
data.gdipYOffset = 0.5f / scaling;
}
}
@@ -378,7 +388,7 @@ void checkGC(int mask) {
* PS_SOLID for pens wider than 1 pixel created with CreatePen(). The fix
* is to use ExtCreatePen() instead.
*/
- long /*int*/ newPen;
+ long newPen;
if ((width == 0 && lineStyle != OS.PS_USERSTYLE) || style == 0) {
newPen = OS.CreatePen(style & OS.PS_STYLE_MASK, width, color);
} else {
@@ -401,7 +411,7 @@ void checkGC(int mask) {
data.state &= ~PEN;
}
if ((state & BACKGROUND) != 0) {
- long /*int*/ newBrush = OS.CreateSolidBrush(data.background);
+ long newBrush = OS.CreateSolidBrush(data.background);
OS.SelectObject(handle, newBrush);
data.state |= BRUSH;
data.state &= ~NULL_BRUSH;
@@ -452,10 +462,10 @@ void copyAreaInPixels(Image image, int x, int y) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (image.type != SWT.BITMAP || image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- /* Copy the bitmap area */
+ /* Copy the bitmap area */
Rectangle rect = image.getBoundsInPixels();
- long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ hOldBitmap = OS.SelectObject(memHdc, image.handle);
+ long memHdc = OS.CreateCompatibleDC(handle);
+ long hOldBitmap = OS.SelectObject(memHdc, image.handle);
OS.BitBlt(memHdc, 0, 0, rect.width, rect.height, handle, x, y, OS.SRCCOPY);
OS.SelectObject(memHdc, hOldBitmap);
OS.DeleteDC(memHdc);
@@ -510,12 +520,12 @@ public void copyArea (int srcX, int srcY, int width, int height, int destX, int
void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- long /*int*/ hwnd = data.hwnd;
+ long hwnd = data.hwnd;
if (hwnd == 0) {
OS.BitBlt(handle, destX, destY, width, height, handle, srcX, srcY, OS.SRCCOPY);
} else {
RECT lprcClip = null;
- long /*int*/ hrgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long hrgn = OS.CreateRectRgn(0, 0, 0, 0);
if (OS.GetClipRgn(handle, hrgn) == 1) {
lprcClip = new RECT();
OS.GetRgnBox(hrgn, lprcClip);
@@ -527,10 +537,10 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int
OS.ScrollWindowEx(hwnd, destX - srcX, destY - srcY, lprcScroll, lprcClip, 0, null, flags);
}
}
-static long /*int*/ createGdipFont(long /*int*/ hDC, long /*int*/ hFont, long /*int*/ graphics, long /*int*/ fontCollection, long /*int*/ [] outFamily, long /*int*/[] outFont) {
- long /*int*/ font = Gdip.Font_new(hDC, hFont);
+static long createGdipFont(long hDC, long hFont, long graphics, long fontCollection, long [] outFamily, long[] outFont) {
+ long font = Gdip.Font_new(hDC, hFont);
if (font == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ family = 0;
+ long family = 0;
if (!Gdip.Font_IsAvailable(font)) {
Gdip.Font_delete(font);
LOGFONT logFont = new LOGFONT ();
@@ -568,8 +578,8 @@ static long /*int*/ createGdipFont(long /*int*/ hDC, long /*int*/ hFont, long /*
font = Gdip.Font_new(buffer, size, style, Gdip.UnitPixel, 0);
}
if (outFont != null && font != 0) {
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ pLogFont = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
+ long hHeap = OS.GetProcessHeap();
+ long pLogFont = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
Gdip.Font_GetLogFontW(font, graphics, pLogFont);
outFont[0] = OS.CreateFontIndirect(pLogFont);
OS.HeapFree(hHeap, 0, pLogFont);
@@ -588,7 +598,50 @@ static long /*int*/ createGdipFont(long /*int*/ hDC, long /*int*/ hFont, long /*
return font;
}
-static void destroyGdipBrush(long /*int*/ brush) {
+/**
+ * Create a new brush with transparency from the image in {@link brush}.
+ *
+ * The returned brush has to be disposed by the caller.
+ *
+ * @param brush Brush with pattern
+ * @param alpha
+ * @return new brush with transparency
+ * @exception SWTError <ul>
+ * <li>ERROR_CANNOT_BE_ZERO - if the image in the brush is null</li>
+ * <li>ERROR_NO_HANDLES - if no handles are available to perform the operation</li>
+ * </ul>
+ */
+static long createAlphaTextureBrush(long brush, int alpha) {
+ if (Gdip.Brush_GetType(brush) != Gdip.BrushTypeTextureFill) {
+ return Gdip.Brush_Clone(brush);
+ }
+ long hatchImage = Gdip.TextureBrush_GetImage(brush);
+ if (hatchImage == 0) SWT.error(SWT.ERROR_CANNOT_BE_ZERO);
+ long transparentHatchImage = Gdip.Image_Clone(hatchImage);
+ if (transparentHatchImage == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ long attrib = Gdip.ImageAttributes_new();
+ Gdip.ImageAttributes_SetWrapMode(attrib, Gdip.WrapModeTile);
+ float[] matrix = new float[]{
+ 1,0,0,0,0,
+ 0,1,0,0,0,
+ 0,0,1,0,0,
+ 0,0,0,alpha / (float)0xFF,0,
+ 0,0,0,0,1,
+ };
+ Gdip.ImageAttributes_SetColorMatrix(attrib, matrix, Gdip.ColorMatrixFlagsDefault, Gdip.ColorAdjustTypeBitmap);
+ Rect rect = new Rect();
+ rect.X = 0;
+ rect.Y = 0;
+ rect.Width = Gdip.Image_GetWidth(transparentHatchImage);
+ rect.Height = Gdip.Image_GetHeight(transparentHatchImage);
+ long transparentBrush = Gdip.TextureBrush_new(transparentHatchImage, rect, attrib);
+ if (brush == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ Gdip.ImageAttributes_delete(attrib);
+ Gdip.Image_delete(transparentHatchImage);
+ return transparentBrush;
+}
+
+static void destroyGdipBrush(long brush) {
int type = Gdip.Brush_GetType(brush);
switch (type) {
case Gdip.BrushTypeSolidColor:
@@ -640,7 +693,7 @@ void destroy() {
* This will ensure that we have not left a bitmap
* selected in it when we delete the HDC.
*/
- long /*int*/ hNullBitmap = data.hNullBitmap;
+ long hNullBitmap = data.hNullBitmap;
if (hNullBitmap != 0) {
OS.SelectObject(handle, hNullBitmap);
data.hNullBitmap = 0;
@@ -666,8 +719,11 @@ void disposeGdip() {
if (data.gdipFont != 0) Gdip.Font_delete(data.gdipFont);
if (data.hGDIFont != 0) OS.DeleteObject(data.hGDIFont);
if (data.gdipGraphics != 0) Gdip.Graphics_delete(data.gdipGraphics);
+ if (data.gdipBgPatternBrushAlpha != 0) destroyGdipBrush(data.gdipBgPatternBrushAlpha);
+ if (data.gdipFgPatternBrushAlpha != 0) destroyGdipBrush(data.gdipFgPatternBrushAlpha);
data.gdipGraphics = data.gdipBrush = data.gdipBgBrush = data.gdipFgBrush =
- data.gdipFont = data.gdipPen = data.hGDIFont = 0;
+ data.gdipFont = data.gdipPen = data.hGDIFont = data.gdipBgPatternBrushAlpha =
+ data.gdipFgPatternBrushAlpha = 0;
}
/**
@@ -719,15 +775,15 @@ void drawArcInPixels (int x, int y, int width, int height, int startAngle, int a
height = -height;
}
if (width == 0 || height == 0 || arcAngle == 0) return;
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
if (width == height) {
Gdip.Graphics_DrawArc(gdipGraphics, data.gdipPen, x, y, width, height, -startAngle, -arcAngle);
} else {
- long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
+ long matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.GraphicsPath_AddArc(path, 0, 0, 1, 1, -startAngle, -arcAngle);
Gdip.GraphicsPath_Transform(path, matrix);
@@ -794,13 +850,13 @@ void drawFocusInPixels (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if ((data.uiState & OS.UISF_HIDEFOCUS) != 0) return;
data.focusDrawn = true;
- long /*int*/ hdc = handle;
+ long hdc = handle;
int state = 0;
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- long /*int*/ clipRgn = 0;
+ long clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
- long /*int*/ rgn = Gdip.Region_new();
+ long rgn = Gdip.Region_new();
if (rgn == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(gdipGraphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
@@ -809,7 +865,7 @@ void drawFocusInPixels (int x, int y, int width, int height) {
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -943,8 +999,8 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
if (data.gdipGraphics != 0) {
//TODO - cache bitmap
- long /*int*/ [] gdipImage = srcImage.createGdipImage();
- long /*int*/ img = gdipImage[0];
+ long [] gdipImage = srcImage.createGdipImage();
+ long img = gdipImage[0];
int imgWidth = Gdip.Image_GetWidth(img);
int imgHeight = Gdip.Image_GetHeight(img);
if (simple) {
@@ -967,7 +1023,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
* Note that if the wrap mode is not WrapModeTileFlipXY, the scaled image
* is translucent around the borders.
*/
- long /*int*/ attrib = Gdip.ImageAttributes_new();
+ long attrib = Gdip.ImageAttributes_new();
Gdip.ImageAttributes_SetWrapMode(attrib, Gdip.WrapModeTileFlipXY);
if (data.alpha != 0xFF) {
float[] matrix = new float[]{
@@ -992,7 +1048,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
Gdip.ImageAttributes_delete(attrib);
Gdip.Bitmap_delete(img);
if (gdipImage[1] != 0) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
OS.HeapFree(hHeap, 0, gdipImage[1]);
}
return;
@@ -1041,7 +1097,7 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
OS.GetIconInfo(srcImage.handle, srcIconInfo);
/* Get the icon width and height */
- long /*int*/ hBitmap = srcIconInfo.hbmColor;
+ long hBitmap = srcIconInfo.hbmColor;
if (hBitmap == 0) hBitmap = srcIconInfo.hbmMask;
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1067,23 +1123,23 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
OS.DrawIconEx(handle, destX - offsetX, destY - offsetY, srcImage.handle, 0, 0, 0, 0, flags);
if (offsetX != 0 || offsetY != 0) OS.SetWindowOrgEx(handle, offsetX, offsetY, null);
} else {
- /* Create the icon info and HDC's */
+ /* Create the icon info and HDC's */
ICONINFO newIconInfo = new ICONINFO();
newIconInfo.fIcon = true;
- long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ dstHdc = OS.CreateCompatibleDC(handle);
+ long srcHdc = OS.CreateCompatibleDC(handle);
+ long dstHdc = OS.CreateCompatibleDC(handle);
/* Blt the color bitmap */
int srcColorY = srcY;
- long /*int*/ srcColor = srcIconInfo.hbmColor;
+ long srcColor = srcIconInfo.hbmColor;
if (srcColor == 0) {
srcColor = srcIconInfo.hbmMask;
srcColorY += iconHeight;
}
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
newIconInfo.hbmColor = OS.CreateCompatibleBitmap(srcHdc, destWidth, destHeight);
if (newIconInfo.hbmColor == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ oldDestBitmap = OS.SelectObject(dstHdc, newIconInfo.hbmColor);
+ long oldDestBitmap = OS.SelectObject(dstHdc, newIconInfo.hbmColor);
boolean stretch = !simple && (srcWidth != destWidth || srcHeight != destHeight);
if (stretch) {
OS.SetStretchBltMode(dstHdc, OS.COLORONCOLOR);
@@ -1112,7 +1168,7 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
} else {
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.SelectObject(dstHdc, oldDestBitmap);
- long /*int*/ hIcon = OS.CreateIconIndirect(newIconInfo);
+ long hIcon = OS.CreateIconIndirect(newIconInfo);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (offsetX != 0 || offsetY != 0) OS.SetWindowOrgEx(handle, 0, 0, null);
OS.DrawIconEx(handle, destX - offsetX, destY - offsetY, hIcon, destWidth, destHeight, 0, 0, flags);
@@ -1164,85 +1220,74 @@ void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
data.hNullBitmap = 0;
}
}
- if (srcImage.alpha != -1 || srcImage.alphaData != null) {
- drawBitmapAlpha(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, bm, imgWidth, imgHeight);
+ boolean isDib = bm.bmBits != 0;
+ int depth = bm.bmPlanes * bm.bmBitsPixel;
+ if (isDib && depth == 32) {
+ drawBitmapAlpha(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple);
} else if (srcImage.transparentPixel != -1) {
drawBitmapTransparent(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, bm, imgWidth, imgHeight);
} else {
- drawBitmap(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, bm, imgWidth, imgHeight);
+ drawBitmapColor(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple);
}
if (mustRestore) {
- long /*int*/ hOldBitmap = OS.SelectObject(memGC.handle, srcImage.handle);
+ long hOldBitmap = OS.SelectObject(memGC.handle, srcImage.handle);
memGC.data.hNullBitmap = hOldBitmap;
}
}
-void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, BITMAP bm, int imgWidth, int imgHeight) {
- /* Simple cases */
- if (srcImage.alpha == 0) return;
- if (srcImage.alpha == 255) {
- drawBitmap(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, bm, imgWidth, imgHeight);
- return;
- }
-
+void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple) {
boolean alphaBlendSupport = true;
boolean isPrinter = OS.GetDeviceCaps(handle, OS.TECHNOLOGY) == OS.DT_RASPRINTER;
+ int sourceAlpha = -1;
if (isPrinter) {
int caps = OS.GetDeviceCaps(handle, OS.SHADEBLENDCAPS);
if (caps != 0) {
- if (srcImage.alpha != -1) {
- alphaBlendSupport = (caps & OS.SB_CONST_ALPHA) != 0;
- } else {
- alphaBlendSupport = (caps & OS.SB_PIXEL_ALPHA) != 0;
- }
- }
- }
- if (alphaBlendSupport) {
- BLENDFUNCTION blend = new BLENDFUNCTION();
- blend.BlendOp = OS.AC_SRC_OVER;
- long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
- if (srcImage.alpha != -1) {
- blend.SourceConstantAlpha = (byte)srcImage.alpha;
- OS.AlphaBlend(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, blend);
- } else {
- long /*int*/ memDib = Image.createDIB(srcWidth, srcHeight, 32);
+ long srcHdc = OS.CreateCompatibleDC(handle);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long memDib = Image.createDIB(srcWidth, srcHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long memHdc = OS.CreateCompatibleDC(handle);
+ long oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
OS.BitBlt(memHdc, 0, 0, srcWidth, srcHeight, srcHdc, srcX, srcY, OS.SRCCOPY);
byte[] srcData = new byte[dibBM.bmWidthBytes * dibBM.bmHeight];
OS.MoveMemory(srcData, dibBM.bmBits, srcData.length);
- final int apinc = imgWidth - srcWidth;
- int ap = srcY * imgWidth + srcX, sp = 0;
- byte[] alphaData = srcImage.alphaData;
- for (int y = 0; y < srcHeight; ++y) {
- for (int x = 0; x < srcWidth; ++x) {
- int alpha = alphaData[ap++] & 0xff;
- int r = ((srcData[sp + 0] & 0xFF) * alpha) + 128;
- r = (r + (r >> 8)) >> 8;
- int g = ((srcData[sp + 1] & 0xFF) * alpha) + 128;
- g = (g + (g >> 8)) >> 8;
- int b = ((srcData[sp + 2] & 0xFF) * alpha) + 128;
- b = (b + (b >> 8)) >> 8;
- srcData[sp+0] = (byte)r;
- srcData[sp+1] = (byte)g;
- srcData[sp+2] = (byte)b;
- srcData[sp+3] = (byte)alpha;
- sp += 4;
+ int size = srcData.length;
+ sourceAlpha = srcData[3] & 0xFF;
+ for (int sp = 7; sp < size; sp += 4) {
+ int currentAlpha = srcData[sp] & 0xFF;
+ if (sourceAlpha != currentAlpha) {
+ sourceAlpha = -1;
+ break;
}
- ap += apinc;
}
- OS.MoveMemory(dibBM.bmBits, srcData, srcData.length);
- blend.SourceConstantAlpha = (byte)0xff;
- blend.AlphaFormat = OS.AC_SRC_ALPHA;
- OS.AlphaBlend(handle, destX, destY, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, blend);
OS.SelectObject(memHdc, oldMemBitmap);
OS.DeleteDC(memHdc);
OS.DeleteObject(memDib);
+ OS.SelectObject(srcHdc, oldSrcBitmap);
+ OS.DeleteDC(srcHdc);
+ if (sourceAlpha != -1) {
+ if (sourceAlpha == 0) return;
+ if (sourceAlpha == 255) {
+ drawBitmapColor(srcImage, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple);
+ return;
+ }
+ alphaBlendSupport = (caps & OS.SB_CONST_ALPHA) != 0;
+ }
+ else {
+ alphaBlendSupport = (caps & OS.SB_PIXEL_ALPHA) != 0;
+ }
}
+ }
+ if (alphaBlendSupport) {
+ BLENDFUNCTION blend = new BLENDFUNCTION();
+ blend.BlendOp = OS.AC_SRC_OVER;
+ long srcHdc = OS.CreateCompatibleDC(handle);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ blend.SourceConstantAlpha = (byte)sourceAlpha;
+ blend.AlphaFormat = OS.AC_SRC_ALPHA;
+ OS.AlphaBlend(handle, destX, destY, destWidth, destHeight, srcHdc, 0, 0, srcWidth, srcHeight, blend);
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.DeleteDC(srcHdc);
return;
@@ -1271,12 +1316,12 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
srcHeight = Math.max(1, sy2 - sy1);
/* Create resources */
- long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
- long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ memDib = Image.createDIB(Math.max(srcWidth, destWidth), Math.max(srcHeight, destHeight), 32);
+ long srcHdc = OS.CreateCompatibleDC(handle);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+ long memHdc = OS.CreateCompatibleDC(handle);
+ long memDib = Image.createDIB(Math.max(srcWidth, destWidth), Math.max(srcHeight, destHeight), 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
@@ -1287,41 +1332,21 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
byte[] destData = new byte[sizeInBytes];
OS.MoveMemory(destData, dibBM.bmBits, sizeInBytes);
- /* Get the foreground pixels */
- OS.BitBlt(memHdc, 0, 0, srcWidth, srcHeight, srcHdc, srcX, srcY, OS.SRCCOPY);
- byte[] srcData = new byte[sizeInBytes];
+ /* Get the foreground pixels */
+ OS.BitBlt(memHdc, 0, 0, srcWidth, srcHeight, srcHdc, srcX, srcY, OS.SRCCOPY);
+ byte[] srcData = new byte[sizeInBytes];
OS.MoveMemory(srcData, dibBM.bmBits, sizeInBytes);
- /* Merge the alpha channel in place */
- int alpha = srcImage.alpha;
- final boolean hasAlphaChannel = (srcImage.alpha == -1);
- if (hasAlphaChannel) {
- final int apinc = imgWidth - srcWidth;
- final int spinc = dibBM.bmWidthBytes - srcWidth * 4;
- int ap = srcY * imgWidth + srcX, sp = 3;
- byte[] alphaData = srcImage.alphaData;
- for (int y = 0; y < srcHeight; ++y) {
- for (int x = 0; x < srcWidth; ++x) {
- srcData[sp] = alphaData[ap++];
- sp += 4;
- }
- ap += apinc;
- sp += spinc;
- }
- }
-
- /* Scale the foreground pixels with alpha */
- OS.MoveMemory(dibBM.bmBits, srcData, sizeInBytes);
/*
* When drawing to a printer, StretchBlt does not correctly stretch if
* the source and destination HDCs are the same. The workaround is to
* stretch to a temporary HDC and blit back into the original HDC.
*/
if (isPrinter) {
- long /*int*/ tempHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ tempDib = Image.createDIB(destWidth, destHeight, 32);
+ long tempHdc = OS.CreateCompatibleDC(handle);
+ long tempDib = Image.createDIB(destWidth, destHeight, 32);
if (tempDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ oldTempBitmap = OS.SelectObject(tempHdc, tempDib);
+ long oldTempBitmap = OS.SelectObject(tempHdc, tempDib);
if (!simple && (srcWidth != destWidth || srcHeight != destHeight)) {
OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR);
OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -1347,10 +1372,10 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
int dp = 0;
for (int y = 0; y < destHeight; ++y) {
for (int x = 0; x < destWidth; ++x) {
- if (hasAlphaChannel) alpha = srcData[dp + 3] & 0xff;
- destData[dp] += ((srcData[dp] & 0xff) - (destData[dp] & 0xff)) * alpha / 255;
- destData[dp + 1] += ((srcData[dp + 1] & 0xff) - (destData[dp + 1] & 0xff)) * alpha / 255;
- destData[dp + 2] += ((srcData[dp + 2] & 0xff) - (destData[dp + 2] & 0xff)) * alpha / 255;
+ int alpha = srcData[dp + 3] & 0xFF;
+ destData[dp ] += (srcData[dp ] & 0xFF) - (destData[dp ] & 0xFF) * alpha / 255;
+ destData[dp + 1] += (srcData[dp + 1] & 0xFF) - (destData[dp + 1] & 0xFF) * alpha / 255;
+ destData[dp + 2] += (srcData[dp + 2] & 0xFF) - (destData[dp + 2] & 0xFF) * alpha / 255;
dp += 4;
}
dp += dpinc;
@@ -1368,13 +1393,13 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
OS.DeleteDC(srcHdc);
}
-void drawBitmapTransparentByClipping(long /*int*/ srcHdc, long /*int*/ maskHdc, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight) {
+void drawBitmapTransparentByClipping(long srcHdc, long maskHdc, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight) {
/* Create a clipping region from the mask */
- long /*int*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long rgn = OS.CreateRectRgn(0, 0, 0, 0);
for (int y=0; y<imgHeight; y++) {
for (int x=0; x<imgWidth; x++) {
if (OS.GetPixel(maskHdc, x, y) == 0) {
- long /*int*/ tempRgn = OS.CreateRectRgn(x, y, x+1, y+1);
+ long tempRgn = OS.CreateRectRgn(x, y, x+1, y+1);
OS.CombineRgn(rgn, rgn, tempRgn, OS.RGN_OR);
OS.DeleteObject(tempRgn);
}
@@ -1386,12 +1411,12 @@ void drawBitmapTransparentByClipping(long /*int*/ srcHdc, long /*int*/ maskHdc,
int[] lpRgnData = new int[nBytes / 4];
OS.GetRegionData (rgn, nBytes, lpRgnData);
float[] lpXform = new float[] {(float)destWidth/srcWidth, 0, 0, (float)destHeight/srcHeight, 0, 0};
- long /*int*/ tmpRgn = OS.ExtCreateRegion(lpXform, nBytes, lpRgnData);
+ long tmpRgn = OS.ExtCreateRegion(lpXform, nBytes, lpRgnData);
OS.DeleteObject(rgn);
rgn = tmpRgn;
}
OS.OffsetRgn(rgn, destX, destY);
- long /*int*/ clip = OS.CreateRectRgn(0, 0, 0, 0);
+ long clip = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, clip);
if (result == 1) OS.CombineRgn(rgn, rgn, clip, OS.RGN_AND);
OS.SelectClipRgn(handle, rgn);
@@ -1408,17 +1433,17 @@ void drawBitmapTransparentByClipping(long /*int*/ srcHdc, long /*int*/ maskHdc,
OS.DeleteObject(rgn);
}
-void drawBitmapMask(Image srcImage, long /*int*/ srcColor, long /*int*/ srcMask, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, boolean offscreen) {
+void drawBitmapMask(Image srcImage, long srcColor, long srcMask, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, int imgWidth, int imgHeight, boolean offscreen) {
int srcColorY = srcY;
if (srcColor == 0) {
srcColor = srcMask;
srcColorY += imgHeight;
}
- long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
- long /*int*/ destHdc = handle;
+ long srcHdc = OS.CreateCompatibleDC(handle);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, srcColor);
+ long destHdc = handle;
int x = destX, y = destY;
- long /*int*/ tempHdc = 0, tempBitmap = 0, oldTempBitmap = 0;
+ long tempHdc = 0, tempBitmap = 0, oldTempBitmap = 0;
int oldBkColor = 0, oldTextColor = 0;
if (offscreen) {
tempHdc = OS.CreateCompatibleDC(handle);
@@ -1464,9 +1489,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
/* Find the RGB values for the transparent pixel. */
boolean isDib = bm.bmBits != 0;
- long /*int*/ hBitmap = srcImage.handle;
- long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
+ long hBitmap = srcImage.handle;
+ long srcHdc = OS.CreateCompatibleDC(handle);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
byte[] originalColors = null;
int transparentColor = srcImage.transparentColor;
if (transparentColor == -1) {
@@ -1546,9 +1571,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
OS.SetStretchBltMode(handle, mode);
} else {
/* Create the mask for the source image */
- long /*int*/ maskHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ maskBitmap = OS.CreateBitmap(imgWidth, imgHeight, 1, 1, null);
- long /*int*/ oldMaskBitmap = OS.SelectObject(maskHdc, maskBitmap);
+ long maskHdc = OS.CreateCompatibleDC(handle);
+ long maskBitmap = OS.CreateBitmap(imgWidth, imgHeight, 1, 1, null);
+ long oldMaskBitmap = OS.SelectObject(maskHdc, maskBitmap);
OS.SetBkColor(srcHdc, transparentColor);
OS.BitBlt(maskHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
if (originalColors != null) OS.SetDIBColorTable(srcHdc, 0, 1 << bm.bmBitsPixel, originalColors);
@@ -1558,9 +1583,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
drawBitmapTransparentByClipping(srcHdc, maskHdc, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight, simple, imgWidth, imgHeight);
} else {
/* Draw the source bitmap transparently using invert/and mask/invert */
- long /*int*/ tempHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ tempBitmap = OS.CreateCompatibleBitmap(handle, destWidth, destHeight);
- long /*int*/ oldTempBitmap = OS.SelectObject(tempHdc, tempBitmap);
+ long tempHdc = OS.CreateCompatibleDC(handle);
+ long tempBitmap = OS.CreateCompatibleBitmap(handle, destWidth, destHeight);
+ long oldTempBitmap = OS.SelectObject(tempHdc, tempBitmap);
OS.BitBlt(tempHdc, 0, 0, destWidth, destHeight, handle, destX, destY, OS.SRCCOPY);
if (!simple && (srcWidth != destWidth || srcHeight != destHeight)) {
OS.SetStretchBltMode(tempHdc, OS.COLORONCOLOR);
@@ -1586,9 +1611,9 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
OS.DeleteDC(srcHdc);
}
-void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple, BITMAP bm, int imgWidth, int imgHeight) {
- long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
+void drawBitmapColor(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple) {
+ long srcHdc = OS.CreateCompatibleDC(handle);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle);
int dwRop = OS.GetROP2(handle) == OS.R2_XORPEN ? OS.SRCINVERT : OS.SRCCOPY;
if (!simple && (srcWidth != destWidth || srcHeight != destHeight)) {
int mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR);
@@ -1625,7 +1650,7 @@ public void drawLine (int x1, int y1, int x2, int y2) {
void drawLineInPixels (int x1, int y1, int x2, int y2) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawLine(gdipGraphics, data.gdipPen, x1, y1, x2, y2);
@@ -1677,7 +1702,7 @@ public void drawOval (int x, int y, int width, int height) {
void drawOvalInPixels (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawEllipse(gdipGraphics, data.gdipPen, x, y, width, height);
@@ -1719,7 +1744,7 @@ public void drawPath (Path path) {
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
initGdip();
checkGC(DRAW);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawPath(gdipGraphics, data.gdipPen, path.handle);
Gdip.Graphics_TranslateTransform(gdipGraphics, -data.gdipXOffset, -data.gdipYOffset, Gdip.MatrixOrderPrepend);
@@ -1783,7 +1808,7 @@ public void drawPolygon (int[] pointArray) {
void drawPolygonInPixels(int[] pointArray) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawPolygon(gdipGraphics, data.gdipPen, pointArray, pointArray.length / 2);
@@ -1832,7 +1857,7 @@ void drawPolylineInPixels(int[] pointArray) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
checkGC(DRAW);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_TranslateTransform(gdipGraphics, data.gdipXOffset, data.gdipYOffset, Gdip.MatrixOrderPrepend);
Gdip.Graphics_DrawLines(gdipGraphics, data.gdipPen, pointArray, pointArray.length / 2);
@@ -1888,7 +1913,7 @@ public void drawRectangle (int x, int y, int width, int height) {
void drawRectangleInPixels (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(DRAW);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (width < 0) {
x = x + width;
@@ -1911,7 +1936,7 @@ void drawRectangleInPixels (int x, int y, int width, int height) {
if (data.lineWidth > 1) {
if ((data.lineWidth % 2) == 1) x++;
} else {
- if (data.hPen != 0 && OS.GetObject(data.hPen, 0, 0) != LOGPEN.sizeof) {
+ if (data.hPen != 0 && OS.GetObject(data.hPen, 0, 0) != OS.LOGPEN_sizeof()) {
x++;
}
}
@@ -1985,7 +2010,7 @@ void drawRoundRectangleInPixels (int x, int y, int width, int height, int arcWid
OS.RoundRect(handle, x,y,x+width+1,y+height+1, arcWidth, arcHeight);
}
-void drawRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ pen, int x, int y, int width, int height, int arcWidth, int arcHeight) {
+void drawRoundRectangleGdip (long gdipGraphics, long pen, int x, int y, int width, int height, int arcWidth, int arcHeight) {
int nx = x;
int ny = y;
int nw = width;
@@ -2010,7 +2035,7 @@ void drawRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ pen, int x,
if (naw == 0 || nah == 0) {
Gdip.Graphics_DrawRectangle(gdipGraphics, data.gdipPen, x, y, width, height);
} else {
- long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (nw > naw) {
if (nh > nah) {
@@ -2043,6 +2068,10 @@ void drawRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ pen, int x,
* will be performed. The background of the rectangular area where
* the string is being drawn will be filled with the receiver's
* background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn
@@ -2068,6 +2097,13 @@ public void drawString (String string, int x, int y) {
* then the background of the rectangular area where the string is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different:
+ * <ul>
+ * <li>{@link #drawString} is faster (depends on string size)<br>~7x for 1-char strings<br>~4x for 10-char strings<br>~2x for 100-char strings</li>
+ * <li>{@link #drawString} doesn't try to find a good fallback font when character doesn't have a glyph in currently selected font</li>
+ * </ul>
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn
@@ -2092,7 +2128,7 @@ void drawStringInPixels (String string, int x, int y, boolean isTransparent) {
if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (string.isEmpty()) return;
char[] buffer = string.toCharArray();
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
checkGC(FONT | FOREGROUND | (isTransparent ? 0 : BACKGROUND));
drawText(gdipGraphics, string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0, null);
@@ -2117,6 +2153,7 @@ void drawStringInPixels (String string, int x, int y, boolean isTransparent) {
x--;
}
if (OS.GetROP2(handle) != OS.R2_XORPEN) {
+ /* Note: The use of ExtTextOut() causes documented differences from GC.drawText() */
OS.ExtTextOut(handle, x, y, flags, rect, buffer, buffer.length, null);
} else {
int foreground = OS.GetTextColor(handle);
@@ -2126,10 +2163,10 @@ void drawStringInPixels (String string, int x, int y, boolean isTransparent) {
OS.GetTextExtentPoint32(handle, buffer, buffer.length, size);
}
int width = size.cx, height = size.cy;
- long /*int*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
+ long hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ memDC = OS.CreateCompatibleDC(handle);
- long /*int*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
+ long memDC = OS.CreateCompatibleDC(handle);
+ long hOldBitmap = OS.SelectObject(memDC, hBitmap);
OS.PatBlt(memDC, 0, 0, width, height, OS.BLACKNESS);
OS.SetBkMode(memDC, OS.TRANSPARENT);
OS.SetTextColor(memDC, foreground);
@@ -2155,6 +2192,10 @@ void drawStringInPixels (String string, int x, int y, boolean isTransparent) {
* are performed. The background of the rectangular area where
* the text is being drawn will be filled with the receiver's
* background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -2184,6 +2225,10 @@ void drawTextInPixels (String string, int x, int y) {
* then the background of the rectangular area where the text is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
*
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -2217,6 +2262,11 @@ void drawTextInPixels (String string, int x, int y, boolean isTransparent) {
* then the background of the rectangular area where the text is being
* drawn will not be modified, otherwise it will be filled with the
* receiver's background color.
+ * <br><br>
+ * On Windows, {@link #drawString} and {@link #drawText} are slightly
+ * different, see {@link #drawString(String, int, int, boolean)} for
+ * explanation.
+ *
* <p>
* The parameter <code>flags</code> may be a combination of:
* </p>
@@ -2253,7 +2303,7 @@ void drawTextInPixels (String string, int x, int y, int flags) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (string.isEmpty()) return;
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
checkGC(FONT | FOREGROUND | ((flags & SWT.DRAW_TRANSPARENT) != 0 ? 0 : BACKGROUND));
drawText(gdipGraphics, string, x, y, flags, null);
@@ -2272,6 +2322,7 @@ void drawTextInPixels (String string, int x, int y, int flags) {
checkGC(FONT | FOREGROUND_TEXT | BACKGROUND_TEXT);
int oldBkMode = OS.SetBkMode(handle, (flags & SWT.DRAW_TRANSPARENT) != 0 ? OS.TRANSPARENT : OS.OPAQUE);
if (OS.GetROP2(handle) != OS.R2_XORPEN) {
+ /* Note: The use of DrawText() causes documented differences from GC.drawString() */
OS.DrawText(handle, buffer, buffer.length, rect, uFormat);
} else {
int foreground = OS.GetTextColor(handle);
@@ -2279,10 +2330,10 @@ void drawTextInPixels (String string, int x, int y, int flags) {
OS.DrawText(handle, buffer, buffer.length, rect, uFormat | OS.DT_CALCRECT);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
- long /*int*/ hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
+ long hBitmap = OS.CreateCompatibleBitmap(handle, width, height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ memDC = OS.CreateCompatibleDC(handle);
- long /*int*/ hOldBitmap = OS.SelectObject(memDC, hBitmap);
+ long memDC = OS.CreateCompatibleDC(handle);
+ long hOldBitmap = OS.SelectObject(memDC, hBitmap);
OS.PatBlt(memDC, 0, 0, width, height, OS.BLACKNESS);
OS.SetBkMode(memDC, OS.TRANSPARENT);
OS.SetTextColor(memDC, foreground);
@@ -2303,7 +2354,7 @@ void drawTextInPixels (String string, int x, int y, int flags) {
OS.SetBkMode(handle, oldBkMode);
}
-boolean useGDIP (long /*int*/ hdc, char[] buffer) {
+boolean useGDIP (long hdc, char[] buffer) {
short[] glyphs = new short[buffer.length];
OS.GetGlyphIndices(hdc, buffer, buffer.length, glyphs, OS.GGI_MARK_NONEXISTING_GLYPHS);
for (int i = 0; i < glyphs.length; i++) {
@@ -2321,13 +2372,13 @@ boolean useGDIP (long /*int*/ hdc, char[] buffer) {
return false;
}
-void drawText(long /*int*/ gdipGraphics, String string, int x, int y, int flags, Point size) {
+void drawText(long gdipGraphics, String string, int x, int y, int flags, Point size) {
int length = string.length();
char[] chars = string.toCharArray();
- long /*int*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
- long /*int*/ hFont = data.hGDIFont;
+ long hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+ long hFont = data.hGDIFont;
if (hFont == 0 && data.font != null) hFont = data.font.handle;
- long /*int*/ oldFont = 0;
+ long oldFont = 0;
if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
TEXTMETRIC lptm = new TEXTMETRIC();
OS.GetTextMetrics(hdc, lptm);
@@ -2391,7 +2442,7 @@ void drawText(long /*int*/ gdipGraphics, String string, int x, int y, int flags,
}
}
-RectF drawText(long /*int*/ gdipGraphics, char[] buffer, int start, int length, int x, int y, int flags, int mnemonicIndex, TEXTMETRIC lptm, boolean draw) {
+RectF drawText(long gdipGraphics, char[] buffer, int start, int length, int x, int y, int flags, int mnemonicIndex, TEXTMETRIC lptm, boolean draw) {
boolean drawMnemonic = draw && mnemonicIndex != -1 && (data.uiState & OS.UISF_HIDEACCEL) == 0;
boolean needsBounds = !draw || drawMnemonic || (flags & SWT.DRAW_TRANSPARENT) == 0 || (data.style & SWT.MIRRORED) != 0 || (flags & SWT.DRAW_DELIMITER) != 0;
if (length <= 0) {
@@ -2406,18 +2457,18 @@ RectF drawText(long /*int*/ gdipGraphics, char[] buffer, int start, int length,
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = nGlyphs;
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
- long /*int*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
- long /*int*/ lpOrder = 0;
+ long hHeap = OS.GetProcessHeap();
+ long lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
+ long lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
+ long lpOrder = 0;
int dwFlags = OS.GCP_GLYPHSHAPE | OS.GCP_REORDER | OS.GCP_LIGATE;
if (drawMnemonic) {
lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
}
- long /*int*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
- long /*int*/ hFont = data.hGDIFont;
+ long hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+ long hFont = data.hGDIFont;
if (hFont == 0 && data.font != null) hFont = data.font.handle;
- long /*int*/ oldFont = 0;
+ long oldFont = 0;
if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
if (start != 0) {
char[] temp = new char[length];
@@ -2449,7 +2500,7 @@ RectF drawText(long /*int*/ gdipGraphics, char[] buffer, int start, int length,
Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
}
int gstate = 0;
- long /*int*/ brush = getFgBrush();
+ long brush = getFgBrush();
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(brush)) {
case Gdip.BrushTypeLinearGradient:
@@ -2478,7 +2529,7 @@ RectF drawText(long /*int*/ gdipGraphics, char[] buffer, int start, int length,
Gdip.Graphics_Restore(gdipGraphics, gstate);
}
if (drawMnemonic) {
- long /*int*/ pen = Gdip.Pen_new(brush, 1);
+ long pen = Gdip.Pen_new(brush, 1);
if (pen != 0) {
int[] order = new int[1];
OS.MoveMemory(order, result.lpOrder + mnemonicIndex * 4, 4);
@@ -2505,7 +2556,7 @@ RectF drawText(long /*int*/ gdipGraphics, char[] buffer, int start, int length,
return bounds;
}
-void drawTextGDIP(long /*int*/ gdipGraphics, String string, int x, int y, int flags, boolean draw, Point size) {
+void drawTextGDIP(long gdipGraphics, String string, int x, int y, int flags, boolean draw, Point size) {
boolean needsBounds = !draw || (flags & SWT.DRAW_TRANSPARENT) == 0;
char[] buffer;
int length = string.length();
@@ -2516,7 +2567,7 @@ void drawTextGDIP(long /*int*/ gdipGraphics, String string, int x, int y, int fl
buffer = new char[]{' '};
}
PointF pt = new PointF();
- long /*int*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
+ long format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
int formatFlags = Gdip.StringFormat_GetFormatFlags(format) | Gdip.StringFormatFlagsMeasureTrailingSpaces;
if ((data.style & SWT.MIRRORED) != 0) formatFlags |= Gdip.StringFormatFlagsDirectionRightToLeft;
Gdip.StringFormat_SetFormatFlags(format, formatFlags);
@@ -2535,7 +2586,7 @@ void drawTextGDIP(long /*int*/ gdipGraphics, String string, int x, int y, int fl
Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
}
int gstate = 0;
- long /*int*/ brush = getFgBrush();
+ long brush = getFgBrush();
if ((data.style & SWT.MIRRORED) != 0) {
switch (Gdip.Brush_GetType(brush)) {
case Gdip.BrushTypeLinearGradient:
@@ -2641,7 +2692,7 @@ void fillArcInPixels (int x, int y, int width, int height, int startAngle, int a
height = -height;
}
if (width == 0 || height == 0 || arcAngle == 0) return;
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (width == height) {
Gdip.Graphics_FillPie(gdipGraphics, data.gdipBrush, x, y, width, height, -startAngle, -arcAngle);
@@ -2751,7 +2802,7 @@ void fillGradientRectangleInPixels(int x, int y, int width, int height, boolean
}
int fromGpColor = (data.alpha << 24) | ((fromRGB.red & 0xFF) << 16) | ((fromRGB.green & 0xFF) << 8) | (fromRGB.blue & 0xFF);
int toGpColor = (data.alpha << 24) | ((toRGB.red & 0xFF) << 16) | ((toRGB.green & 0xFF) << 8) | (toRGB.blue & 0xFF);
- long /*int*/ brush = Gdip.LinearGradientBrush_new(p1, p2, fromGpColor, toGpColor);
+ long brush = Gdip.LinearGradientBrush_new(p1, p2, fromGpColor, toGpColor);
Gdip.Graphics_FillRectangle(data.gdipGraphics, brush, x, y, width, height);
Gdip.LinearGradientBrush_delete(brush);
return;
@@ -2763,10 +2814,10 @@ void fillGradientRectangleInPixels(int x, int y, int width, int height, boolean
* GradientFill for printer devices.
*/
if (OS.GetROP2(handle) != OS.R2_XORPEN && OS.GetDeviceCaps(handle, OS.TECHNOLOGY) != OS.DT_RASPRINTER) {
- final long /*int*/ hHeap = OS.GetProcessHeap();
- final long /*int*/ pMesh = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, GRADIENT_RECT.sizeof + TRIVERTEX.sizeof * 2);
+ final long hHeap = OS.GetProcessHeap();
+ final long pMesh = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, GRADIENT_RECT.sizeof + TRIVERTEX.sizeof * 2);
if (pMesh == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- final long /*int*/ pVertex = pMesh + GRADIENT_RECT.sizeof;
+ final long pVertex = pMesh + GRADIENT_RECT.sizeof;
GRADIENT_RECT gradientRect = new GRADIENT_RECT();
gradientRect.UpperLeft = 0;
@@ -3026,7 +3077,7 @@ void fillRoundRectangleInPixels (int x, int y, int width, int height, int arcWid
OS.RoundRect(handle, x,y,x+width+1,y+height+1,arcWidth, arcHeight);
}
-void fillRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ brush, int x, int y, int width, int height, int arcWidth, int arcHeight) {
+void fillRoundRectangleGdip (long gdipGraphics, long brush, int x, int y, int width, int height, int arcWidth, int arcHeight) {
int nx = x;
int ny = y;
int nw = width;
@@ -3050,7 +3101,7 @@ void fillRoundRectangleGdip (long /*int*/ gdipGraphics, long /*int*/ brush, int
if (naw == 0 || nah == 0) {
Gdip.Graphics_FillRectangle(data.gdipGraphics, data.gdipBrush, x, y, width, height);
} else {
- long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (nw > naw) {
if (nh > nah) {
@@ -3084,7 +3135,7 @@ void flush () {
* underline HDC. This is done by calling GetHDC()
* followed by ReleaseHDC().
*/
- long /*int*/ hdc = Gdip.Graphics_GetHDC(data.gdipGraphics);
+ long hdc = Gdip.Graphics_GetHDC(data.gdipGraphics);
Gdip.Graphics_ReleaseHDC(data.gdipGraphics, hdc);
}
}
@@ -3275,7 +3326,7 @@ public Rectangle getClipping () {
Rectangle getClippingInPixels() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Rect rect = new Rect();
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
@@ -3306,9 +3357,9 @@ public void getClipping (Region region) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (region == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (region.isDisposed()) SWT.error (SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- long /*int*/ rgn = Gdip.Region_new();
+ long rgn = Gdip.Region_new();
Gdip.Graphics_GetClip(data.gdipGraphics, rgn);
if (Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
Rect rect = new Rect();
@@ -3317,11 +3368,11 @@ public void getClipping (Region region) {
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
OS.SetRectRgn(region.handle, rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height);
} else {
- long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
- long /*int*/ identity = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long identity = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
Gdip.Graphics_SetTransform(gdipGraphics, identity);
- long /*int*/ hRgn = Gdip.Region_GetHRGN(rgn, data.gdipGraphics);
+ long hRgn = Gdip.Region_GetHRGN(rgn, data.gdipGraphics);
Gdip.Graphics_SetTransform(gdipGraphics, matrix);
Gdip.Matrix_delete(identity);
Gdip.Matrix_delete(matrix);
@@ -3344,21 +3395,21 @@ public void getClipping (Region region) {
} else {
OS.OffsetRgn (region.handle, pt.x, pt.y);
}
- long /*int*/ metaRgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long metaRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetMetaRgn (handle, metaRgn) != 0) {
OS.OffsetRgn (metaRgn, pt.x, pt.y);
OS.CombineRgn (region.handle, metaRgn, region.handle, OS.RGN_AND);
}
OS.DeleteObject(metaRgn);
- long /*int*/ hwnd = data.hwnd;
+ long hwnd = data.hwnd;
if (hwnd != 0 && data.ps != null) {
- long /*int*/ sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetRandomRgn (handle, sysRgn, OS.SYSRGN) == 1) {
if ((OS.GetLayout(handle) & OS.LAYOUT_RTL) != 0) {
int nBytes = OS.GetRegionData (sysRgn, 0, null);
int [] lpRgnData = new int [nBytes / 4];
OS.GetRegionData (sysRgn, nBytes, lpRgnData);
- long /*int*/ newSysRgn = OS.ExtCreateRegion(new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
+ long newSysRgn = OS.ExtCreateRegion(new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
OS.DeleteObject(sysRgn);
sysRgn = newSysRgn;
}
@@ -3370,7 +3421,7 @@ public void getClipping (Region region) {
}
}
-long /*int*/ getFgBrush() {
+long getFgBrush() {
return data.foregroundPattern != null ? data.foregroundPattern.handle : data.gdipFgBrush;
}
@@ -3714,10 +3765,10 @@ public void getTransform(Transform transform) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (transform == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Gdip.Graphics_GetTransform(gdipGraphics, transform.handle);
- long /*int*/ identity = identity();
+ long identity = identity();
Gdip.Matrix_Invert(identity);
Gdip.Matrix_Multiply(transform.handle, identity, Gdip.MatrixOrderAppend);
Gdip.Matrix_delete(identity);
@@ -3747,7 +3798,7 @@ public boolean getXORMode() {
void initGdip() {
data.device.checkGDIP();
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) return;
/*
* Feature in GDI+. The GDI+ clipping set with Graphics->SetClip()
@@ -3756,7 +3807,7 @@ void initGdip() {
* cannot be reset. The fix is to clear the clipping before
* the GDI+ graphics is created and reset it afterwards.
*/
- long /*int*/ hRgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long hRgn = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, hRgn);
POINT pt = new POINT ();
OS.GetWindowOrgEx (handle, pt);
@@ -3779,7 +3830,7 @@ void initGdip() {
Gdip.Graphics_SetPageUnit(gdipGraphics, Gdip.UnitPixel);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
if ((data.style & SWT.MIRRORED) != 0) {
- long /*int*/ matrix = identity();
+ long matrix = identity();
Gdip.Graphics_SetTransform(gdipGraphics, matrix);
Gdip.Matrix_delete(matrix);
}
@@ -3798,7 +3849,7 @@ void initGdip() {
}
}
-long /*int*/ identity() {
+long identity() {
if ((data.style & SWT.MIRRORED) != 0) {
int width = 0;
int technology = OS.GetDeviceCaps(handle, OS.TECHNOLOGY);
@@ -3811,13 +3862,13 @@ long /*int*/ identity() {
OS.GetObject(image.handle, BITMAP.sizeof, bm);
width = bm.bmWidth;
} else {
- long /*int*/ hwnd = OS.WindowFromDC(handle);
+ long hwnd = OS.WindowFromDC(handle);
if (hwnd != 0) {
RECT rect = new RECT();
OS.GetClientRect(hwnd, rect);
width = rect.right - rect.left;
} else {
- long /*int*/ hBitmap = OS.GetCurrentObject(handle, OS.OBJ_BITMAP);
+ long hBitmap = OS.GetCurrentObject(handle, OS.OBJ_BITMAP);
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
width = bm.bmWidth;
@@ -3831,7 +3882,7 @@ long /*int*/ identity() {
return Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
}
-void init(Drawable drawable, GCData data, long /*int*/ hDC) {
+void init(Drawable drawable, GCData data, long hDC) {
int foreground = data.foreground;
if (foreground != -1) {
data.state &= ~(FOREGROUND | FOREGROUND_TEXT | PEN);
@@ -3851,11 +3902,6 @@ void init(Drawable drawable, GCData data, long /*int*/ hDC) {
} else {
data.font = Font.win32_new(device, OS.GetCurrentObject(hDC, OS.OBJ_FONT));
}
- long /*int*/ hPalette = data.device.hPalette;
- if (hPalette != 0) {
- OS.SelectPalette(hDC, hPalette, true);
- OS.RealizePalette(hDC);
- }
Image image = data.image;
if (image != null) {
data.hNullBitmap = OS.SelectObject(hDC, image.handle);
@@ -3891,7 +3937,7 @@ void init(Drawable drawable, GCData data, long /*int*/ hDC) {
*/
@Override
public int hashCode () {
- return (int)/*64*/handle;
+ return (int)handle;
}
/**
@@ -3910,15 +3956,15 @@ public int hashCode () {
*/
public boolean isClipped() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
- long /*int*/ rgn = Gdip.Region_new();
+ long rgn = Gdip.Region_new();
Gdip.Graphics_GetClip(data.gdipGraphics, rgn);
boolean isInfinite = Gdip.Region_IsInfinite(rgn, gdipGraphics);
Gdip.Region_delete(rgn);
return !isInfinite;
}
- long /*int*/ region = OS.CreateRectRgn(0, 0, 0, 0);
+ long region = OS.CreateRectRgn(0, 0, 0, 0);
int result = OS.GetClipRgn(handle, region);
OS.DeleteObject(region);
return result > 0;
@@ -3939,7 +3985,7 @@ public boolean isDisposed() {
return handle == 0;
}
-float measureSpace(long /*int*/ font, long /*int*/ format) {
+float measureSpace(long font, long format) {
PointF pt = new PointF();
RectF bounds = new RectF();
Gdip.Graphics_MeasureString(data.gdipGraphics, new char[]{' '}, 1, font, pt, format, bounds);
@@ -4080,6 +4126,14 @@ public void setAlpha(int alpha) {
initGdip();
data.alpha = alpha & 0xFF;
data.state &= ~(BACKGROUND | FOREGROUND);
+ if(data.gdipFgPatternBrushAlpha != 0) {
+ Gdip.TextureBrush_delete(data.gdipFgPatternBrushAlpha);
+ data.gdipFgPatternBrushAlpha = 0;
+ }
+ if(data.gdipBgPatternBrushAlpha != 0) {
+ Gdip.TextureBrush_delete(data.gdipBgPatternBrushAlpha);
+ data.gdipBgPatternBrushAlpha = 0;
+ }
}
/**
@@ -4139,14 +4193,18 @@ public void setBackgroundPattern (Pattern pattern) {
if (data.backgroundPattern == pattern) return;
data.backgroundPattern = pattern;
data.state &= ~BACKGROUND;
+ if(data.gdipBgPatternBrushAlpha != 0) {
+ Gdip.TextureBrush_delete(data.gdipBgPatternBrushAlpha);
+ data.gdipBgPatternBrushAlpha = 0;
+ }
}
-void setClipping(long /*int*/ clipRgn) {
- long /*int*/ hRgn = clipRgn;
- long /*int*/ gdipGraphics = data.gdipGraphics;
+void setClipping(long clipRgn) {
+ long hRgn = clipRgn;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
if (hRgn != 0) {
- long /*int*/ region = Gdip.Region_new(hRgn);
+ long region = Gdip.Region_new(hRgn);
Gdip.Graphics_SetClip(gdipGraphics, region, Gdip.CombineModeReplace);
Gdip.Region_delete(region);
} else {
@@ -4190,7 +4248,7 @@ public void setClipping (int x, int y, int width, int height) {
void setClippingInPixels (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- long /*int*/ hRgn = OS.CreateRectRgn(x, y, x + width, y + height);
+ long hRgn = OS.CreateRectRgn(x, y, x + width, y + height);
setClipping(hRgn);
OS.DeleteObject(hRgn);
}
@@ -4384,6 +4442,10 @@ public void setForegroundPattern (Pattern pattern) {
if (data.foregroundPattern == pattern) return;
data.foregroundPattern = pattern;
data.state &= ~FOREGROUND;
+ if(data.gdipFgPatternBrushAlpha != 0) {
+ Gdip.TextureBrush_delete(data.gdipFgPatternBrushAlpha);
+ data.gdipFgPatternBrushAlpha = 0;
+ }
}
/**
@@ -4727,21 +4789,13 @@ void setLineWidthInPixels(int lineWidth) {
* and the destination, and if the argument is <code>false</code>,
* puts the receiver in a drawing mode where the destination color
* is replaced with the source color value.
- * <p>
- * Note that this mode in fundamentally unsupportable on certain
- * platforms. Clients that want their
- * code to run on all platforms need to avoid this method.
- * </p>
*
* @param xor if <code>true</code>, then <em>xor</em> mode is used, otherwise <em>source copy</em> mode is used
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
- *
- * @deprecated this functionality is not supported on some platforms
*/
-@Deprecated
public void setXORMode(boolean xor) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
OS.SetROP2(handle, xor ? OS.R2_XORPEN : OS.R2_COPYPEN);
@@ -4833,9 +4887,9 @@ public void setTransform(Transform transform) {
if (transform != null && transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (data.gdipGraphics == 0 && transform == null) return;
initGdip();
- long /*int*/ identity = identity();
+ long identity = identity();
if (transform != null) {
- Gdip.Matrix_Multiply(identity, transform.handle, Gdip.MatrixOrderPrepend);
+ Gdip.Matrix_Multiply(identity, transform.handle, Gdip.MatrixOrderPrepend);
}
Gdip.Graphics_SetTransform(data.gdipGraphics, identity);
Gdip.Matrix_delete(identity);
@@ -4870,7 +4924,7 @@ Point stringExtentInPixels (String string) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(FONT);
int length = string.length();
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Point size = new Point(0, 0);
drawText(gdipGraphics, string, 0, 0, 0, size);
@@ -4950,7 +5004,7 @@ Point textExtentInPixels(String string, int flags) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
checkGC(FONT);
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
if (gdipGraphics != 0) {
Point size = new Point(0, 0);
drawText(gdipGraphics, string, 0, 0, flags, size);
@@ -5002,7 +5056,7 @@ public String toString () {
*/
public static GC win32_new(Drawable drawable, GCData data) {
GC gc = new GC();
- long /*int*/ hDC = drawable.internal_new_GC(data);
+ long hDC = drawable.internal_new_GC(data);
gc.device = data.device;
gc.init(drawable, data, hDC);
return gc;
@@ -5025,7 +5079,7 @@ public static GC win32_new(Drawable drawable, GCData data) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static GC win32_new(long /*int*/ hDC, GCData data) {
+public static GC win32_new(long hDC, GCData data) {
GC gc = new GC();
gc.device = data.device;
data.style |= SWT.LEFT_TO_RIGHT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
index 0c7e3c8fa7..fa177db2c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java
@@ -36,7 +36,9 @@ public final class GCData {
public int background = -1;
public Font font;
public Pattern foregroundPattern;
+ public long gdipFgPatternBrushAlpha;
public Pattern backgroundPattern;
+ public long gdipBgPatternBrushAlpha;
public int lineStyle = SWT.LINE_SOLID;
public float lineWidth;
public int lineCap = SWT.CAP_FLAT;
@@ -49,7 +51,7 @@ public final class GCData {
public Image image;
public PAINTSTRUCT ps;
public int layout = -1;
- public long /*int*/ hPen, hOldPen, hBrush, hOldBrush, hNullBitmap,
+ public long hPen, hOldPen, hBrush, hOldBrush, hNullBitmap,
hwnd, gdipGraphics, gdipPen, gdipBrush, gdipFgBrush, gdipBgBrush,
gdipFont, hGDIFont;
public float gdipXOffset, gdipYOffset;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index f4bac26440..1b38c70d27 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -99,7 +99,7 @@ public final class Image extends Resource implements Drawable {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
/**
* specifies the transparent pixel
@@ -112,16 +112,6 @@ public final class Image extends Resource implements Drawable {
GC memGC;
/**
- * the alpha data for the image
- */
- byte[] alphaData;
-
- /**
- * the global alpha value to be used for every pixel
- */
- int alpha = -1;
-
- /**
* ImageFileNameProvider to provide file names at various Zoom levels
*/
private ImageFileNameProvider imageFileNameProvider;
@@ -262,17 +252,17 @@ public Image(Device device, Image srcImage, int flag) {
switch (type) {
case SWT.BITMAP:
/* Get the HDC for the device */
- long /*int*/ hDC = device.internal_new_GC(null);
+ long hDC = device.internal_new_GC(null);
/* Copy the bitmap */
- long /*int*/ hdcSource = OS.CreateCompatibleDC(hDC);
- long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
- long /*int*/ hOldSrc = OS.SelectObject(hdcSource, srcImage.handle);
+ long hdcSource = OS.CreateCompatibleDC(hDC);
+ long hdcDest = OS.CreateCompatibleDC(hDC);
+ long hOldSrc = OS.SelectObject(hdcSource, srcImage.handle);
BITMAP bm = new BITMAP();
OS.GetObject(srcImage.handle, BITMAP.sizeof, bm);
handle = OS.CreateCompatibleBitmap(hdcSource, rect.width, bm.bmBits != 0 ? -rect.height : rect.height);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ hOldDest = OS.SelectObject(hdcDest, handle);
+ long hOldDest = OS.SelectObject(hdcDest, handle);
OS.BitBlt(hdcDest, 0, 0, rect.width, rect.height, hdcSource, 0, 0, OS.SRCCOPY);
OS.SelectObject(hdcSource, hOldSrc);
OS.SelectObject(hdcDest, hOldDest);
@@ -283,11 +273,6 @@ public Image(Device device, Image srcImage, int flag) {
device.internal_dispose_GC(hDC, null);
transparentPixel = srcImage.transparentPixel;
- alpha = srcImage.alpha;
- if (srcImage.alphaData != null) {
- alphaData = new byte[srcImage.alphaData.length];
- System.arraycopy(srcImage.alphaData, 0, alphaData, 0, alphaData.length);
- }
break;
case SWT.ICON:
handle = OS.CopyImage(srcImage.handle, OS.IMAGE_ICON, rect.width, rect.height, 0);
@@ -825,14 +810,14 @@ void initNative(String filename) {
int length = filename.length();
char[] chars = new char[length+1];
filename.getChars(0, length, chars, 0);
- long /*int*/ bitmap = Gdip.Bitmap_new(chars, false);
+ long bitmap = Gdip.Bitmap_new(chars, false);
if (bitmap != 0) {
int error = SWT.ERROR_NO_HANDLES;
int status = Gdip.Image_GetLastStatus(bitmap);
if (status == 0) {
if (filename.toLowerCase().endsWith(".ico")) {
this.type = SWT.ICON;
- long /*int*/[] hicon = new long /*int*/[1];
+ long[] hicon = new long[1];
status = Gdip.Bitmap_GetHICON(bitmap, hicon);
this.handle = hicon[0];
} else {
@@ -864,10 +849,10 @@ void initNative(String filename) {
* This performs better than getting the bits with Bitmap.LockBits(),
* but it cannot be used when there is transparency.
*/
- long /*int*/ hDC = device.internal_new_GC(null);
- long /*int*/ srcHDC = OS.CreateCompatibleDC(hDC);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHDC, this.handle);
- long /*int*/ graphics = Gdip.Graphics_new(srcHDC);
+ long hDC = device.internal_new_GC(null);
+ long srcHDC = OS.CreateCompatibleDC(hDC);
+ long oldSrcBitmap = OS.SelectObject(srcHDC, this.handle);
+ long graphics = Gdip.Graphics_new(srcHDC);
if (graphics != 0) {
Rect rect = new Rect();
rect.Width = width;
@@ -884,14 +869,14 @@ void initNative(String filename) {
OS.DeleteDC(srcHDC);
device.internal_dispose_GC(hDC, null);
} else {
- long /*int*/ lockedBitmapData = Gdip.BitmapData_new();
+ long lockedBitmapData = Gdip.BitmapData_new();
if (lockedBitmapData != 0) {
status = Gdip.Bitmap_LockBits(bitmap, 0, 0, pixelFormat, lockedBitmapData);
if (status == 0) {
BitmapData bitmapData = new BitmapData();
Gdip.MoveMemory(bitmapData, lockedBitmapData);
int stride = bitmapData.Stride;
- long /*int*/ pixels = bitmapData.Scan0;
+ long pixels = bitmapData.Scan0;
int depth = 0, scanlinePad = 4, transparentPixel = -1;
switch (bitmapData.PixelFormat) {
case Gdip.PixelFormat1bppIndexed: depth = 1; break;
@@ -911,8 +896,8 @@ void initNative(String filename) {
case Gdip.PixelFormat4bppIndexed:
case Gdip.PixelFormat8bppIndexed:
int paletteSize = Gdip.Image_GetPaletteSize(bitmap);
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ palette = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, paletteSize);
+ long hHeap = OS.GetProcessHeap();
+ long palette = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, paletteSize);
if (palette == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Image_GetPalette(bitmap, palette, paletteSize);
ColorPalette colorPalette = new ColorPalette();
@@ -940,16 +925,16 @@ void initNative(String filename) {
OS.MoveMemory(data, pixels, data.length);
switch (bitmapData.PixelFormat) {
case Gdip.PixelFormat16bppARGB1555:
- alphaData = new byte[width * height];
- for (int i = 1, j = 0; i < data.length; i += 2, j++) {
- alphaData[j] = (byte)((data[i] & 0x80) != 0 ? 255 : 0);
- }
+ alphaData = new byte[width * height];
+ for (int i = 1, j = 0; i < data.length; i += 2, j++) {
+ alphaData[j] = (byte)((data[i] & 0x80) != 0 ? 255 : 0);
+ }
break;
case Gdip.PixelFormat32bppARGB:
- alphaData = new byte[width * height];
- for (int i = 3, j = 0; i < data.length; i += 4, j++) {
- alphaData[j] = data[i];
- }
+ alphaData = new byte[width * height];
+ for (int i = 3, j = 0; i < data.length; i += 4, j++) {
+ alphaData[j] = data[i];
+ }
break;
}
ImageData img = new ImageData(width, height, depth, paletteData, scanlinePad, data);
@@ -957,7 +942,7 @@ void initNative(String filename) {
img.alphaData = alphaData;
init(img);
}
- Gdip.Bitmap_UnlockBits(bitmap, lockedBitmapData);
+ Gdip.Bitmap_UnlockBits(bitmap, lockedBitmapData);
} else {
error = SWT.ERROR_INVALID_IMAGE;
}
@@ -974,27 +959,36 @@ void initNative(String filename) {
}
}
-long /*int*/ [] createGdipImage() {
+long [] createGdipImage() {
switch (type) {
case SWT.BITMAP: {
- if (alpha != -1 || alphaData != null || transparentPixel != -1) {
- BITMAP bm = new BITMAP();
- OS.GetObject(handle, BITMAP.sizeof, bm);
+ BITMAP bm = new BITMAP();
+ OS.GetObject(handle, BITMAP.sizeof, bm);
+ int depth = bm.bmPlanes * bm.bmBitsPixel;
+ boolean isDib = bm.bmBits != 0;
+ boolean hasAlpha = isDib && depth == 32;
+ if (hasAlpha || transparentPixel != -1) {
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- long /*int*/ hDC = device.internal_new_GC(null);
- long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, handle);
- long /*int*/ memHdc = OS.CreateCompatibleDC(hDC);
- long /*int*/ memDib = createDIB(imgWidth, imgHeight, 32);
+ long hDC = device.internal_new_GC(null);
+ long srcHdc = OS.CreateCompatibleDC(hDC);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, handle);
+ long memHdc = OS.CreateCompatibleDC(hDC);
+ long memDib = createDIB(imgWidth, imgHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte red = 0, green = 0, blue = 0;
- if (transparentPixel != -1) {
+ OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ long hHeap = OS.GetProcessHeap();
+ long pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, sizeInBytes);
+ if (pixels == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ byte red = 0, green = 0, blue = 0;
+ if (hasAlpha) {
+ OS.MoveMemory(pixels, bm.bmBits, sizeInBytes);
+ }
+ else {
if (bm.bmBitsPixel <= 8) {
byte[] color = new byte[4];
OS.GetDIBColorTable(srcHdc, transparentPixel, 1, color);
@@ -1029,30 +1023,8 @@ long /*int*/ [] createGdipImage() {
break;
}
}
- }
- OS.SelectObject(srcHdc, oldSrcBitmap);
- OS.SelectObject(memHdc, oldMemBitmap);
- OS.DeleteObject(srcHdc);
- OS.DeleteObject(memHdc);
- byte[] srcData = new byte[sizeInBytes];
- OS.MoveMemory(srcData, dibBM.bmBits, sizeInBytes);
- OS.DeleteObject(memDib);
- device.internal_dispose_GC(hDC, null);
- if (alpha != -1) {
- for (int y = 0, dp = 0; y < imgHeight; ++y) {
- for (int x = 0; x < imgWidth; ++x) {
- srcData[dp + 3] = (byte)alpha;
- dp += 4;
- }
- }
- } else if (alphaData != null) {
- for (int y = 0, dp = 0, ap = 0; y < imgHeight; ++y) {
- for (int x = 0; x < imgWidth; ++x) {
- srcData[dp + 3] = alphaData[ap++];
- dp += 4;
- }
- }
- } else if (transparentPixel != -1) {
+ byte[] srcData = new byte[sizeInBytes];
+ OS.MoveMemory(srcData, dibBM.bmBits, sizeInBytes);
for (int y = 0, dp = 0; y < imgHeight; ++y) {
for (int x = 0; x < imgWidth; ++x) {
if (srcData[dp] == blue && srcData[dp + 1] == green && srcData[dp + 2] == red) {
@@ -1063,14 +1035,17 @@ long /*int*/ [] createGdipImage() {
dp += 4;
}
}
+ OS.MoveMemory(pixels, srcData, sizeInBytes);
}
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
- if (pixels == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- OS.MoveMemory(pixels, srcData, sizeInBytes);
- return new long /*int*/ []{Gdip.Bitmap_new(imgWidth, imgHeight, dibBM.bmWidthBytes, Gdip.PixelFormat32bppARGB, pixels), pixels};
+ OS.SelectObject(srcHdc, oldSrcBitmap);
+ OS.SelectObject(memHdc, oldMemBitmap);
+ OS.DeleteObject(srcHdc);
+ OS.DeleteObject(memHdc);
+ OS.DeleteObject(memDib);
+ int pixelFormat = hasAlpha ? Gdip.PixelFormat32bppPARGB : Gdip.PixelFormat32bppARGB;
+ return new long []{Gdip.Bitmap_new(imgWidth, imgHeight, dibBM.bmWidthBytes, pixelFormat, pixels), pixels};
}
- return new long /*int*/ []{Gdip.Bitmap_new(handle, 0), 0};
+ return new long []{Gdip.Bitmap_new(handle, 0), 0};
}
case SWT.ICON: {
/*
@@ -1080,13 +1055,13 @@ long /*int*/ [] createGdipImage() {
*/
ICONINFO iconInfo = new ICONINFO();
OS.GetIconInfo(handle, iconInfo);
- long /*int*/ hBitmap = iconInfo.hbmColor;
+ long hBitmap = iconInfo.hbmColor;
if (hBitmap == 0) hBitmap = iconInfo.hbmMask;
BITMAP bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = hBitmap == iconInfo.hbmMask ? bm.bmHeight / 2 : bm.bmHeight;
- long /*int*/ img = 0, pixels = 0;
+ long img = 0, pixels = 0;
/*
* Bug in GDI+. Bitmap_new() segments fault if the image width
* is greater than the image height.
@@ -1095,19 +1070,19 @@ long /*int*/ [] createGdipImage() {
* channel when the icon depth is 32.
*/
if (imgWidth > imgHeight || bm.bmBitsPixel == 32) {
- long /*int*/ hDC = device.internal_new_GC(null);
- long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
- long /*int*/ oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
- long /*int*/ memHdc = OS.CreateCompatibleDC(hDC);
- long /*int*/ memDib = createDIB(imgWidth, imgHeight, 32);
+ long hDC = device.internal_new_GC(null);
+ long srcHdc = OS.CreateCompatibleDC(hDC);
+ long oldSrcBitmap = OS.SelectObject(srcHdc, hBitmap);
+ long memHdc = OS.CreateCompatibleDC(hDC);
+ long memDib = createDIB(imgWidth, imgHeight, 32);
if (memDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
- OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, hBitmap == iconInfo.hbmMask ? imgHeight : 0, OS.SRCCOPY);
+ OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, hBitmap == iconInfo.hbmMask ? imgHeight : 0, OS.SRCCOPY);
OS.SelectObject(memHdc, oldMemBitmap);
OS.DeleteObject(memHdc);
- byte[] srcData = new byte[dibBM.bmWidthBytes * dibBM.bmHeight];
+ byte[] srcData = new byte[dibBM.bmWidthBytes * dibBM.bmHeight];
OS.MoveMemory(srcData, dibBM.bmBits, srcData.length);
OS.DeleteObject(memDib);
OS.SelectObject(srcHdc, iconInfo.hbmMask);
@@ -1126,7 +1101,7 @@ long /*int*/ [] createGdipImage() {
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.DeleteObject(srcHdc);
device.internal_dispose_GC(hDC, null);
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
pixels = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, srcData.length);
if (pixels == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.MoveMemory(pixels, srcData, srcData.length);
@@ -1136,7 +1111,7 @@ long /*int*/ [] createGdipImage() {
}
if (iconInfo.hbmColor != 0) OS.DeleteObject(iconInfo.hbmColor);
if (iconInfo.hbmMask != 0) OS.DeleteObject(iconInfo.hbmMask);
- return new long /*int*/ []{img, pixels};
+ return new long []{img, pixels};
}
default: SWT.error(SWT.ERROR_INVALID_IMAGE);
}
@@ -1203,13 +1178,13 @@ public Color getBackground() {
if (transparentPixel == -1) return null;
/* Get the HDC for the device */
- long /*int*/ hDC = device.internal_new_GC(null);
+ long hDC = device.internal_new_GC(null);
/* Compute the background color */
BITMAP bm = new BITMAP();
OS.GetObject(handle, BITMAP.sizeof, bm);
- long /*int*/ hdcMem = OS.CreateCompatibleDC(hDC);
- long /*int*/ hOldObject = OS.SelectObject(hdcMem, handle);
+ long hdcMem = OS.CreateCompatibleDC(hDC);
+ long hOldObject = OS.SelectObject(hdcMem, handle);
int red = 0, green = 0, blue = 0;
if (bm.bmBitsPixel <= 8) {
byte[] color = new byte[4];
@@ -1300,7 +1275,7 @@ public Rectangle getBoundsInPixels() {
case SWT.ICON:
ICONINFO info = new ICONINFO();
OS.GetIconInfo(handle, info);
- long /*int*/ hBitmap = info.hbmColor;
+ long hBitmap = info.hbmColor;
if (hBitmap == 0) hBitmap = info.hbmMask;
bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1420,7 +1395,7 @@ public ImageData getImageDataAtCurrentZoom() {
ICONINFO info = new ICONINFO();
OS.GetIconInfo(handle, info);
/* Get the basic BITMAP information */
- long /*int*/ hBitmap = info.hbmColor;
+ long hBitmap = info.hbmColor;
if (hBitmap == 0) hBitmap = info.hbmMask;
bm = new BITMAP();
OS.GetObject(hBitmap, BITMAP.sizeof, bm);
@@ -1442,20 +1417,11 @@ public ImageData getImageDataAtCurrentZoom() {
OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
/* Get the HDC for the device */
- long /*int*/ hDC = device.internal_new_GC(null);
+ long hDC = device.internal_new_GC(null);
/* Create the DC and select the bitmap */
- long /*int*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
- long /*int*/ hOldBitmap = OS.SelectObject(hBitmapDC, hBitmap);
- /* Select the palette if necessary */
- long /*int*/ oldPalette = 0;
- if (depth <= 8) {
- long /*int*/ hPalette = device.hPalette;
- if (hPalette != 0) {
- oldPalette = OS.SelectPalette(hBitmapDC, hPalette, false);
- OS.RealizePalette(hBitmapDC);
- }
- }
+ long hBitmapDC = OS.CreateCompatibleDC(hDC);
+ long hOldBitmap = OS.SelectObject(hBitmapDC, hBitmap);
/* Find the size of the image and allocate data */
int imageSize;
/* Call with null lpBits to get the image size */
@@ -1530,10 +1496,6 @@ public ImageData getImageDataAtCurrentZoom() {
}
/* Clean up */
OS.SelectObject(hBitmapDC, hOldBitmap);
- if (oldPalette != 0) {
- OS.SelectPalette(hBitmapDC, oldPalette, false);
- OS.RealizePalette(hBitmapDC);
- }
OS.DeleteDC(hBitmapDC);
/* Release the HDC for the device */
@@ -1557,7 +1519,7 @@ public ImageData getImageDataAtCurrentZoom() {
/* Find out whether this is a DIB or a DDB. */
boolean isDib = (bm.bmBits != 0);
/* Get the HDC for the device */
- long /*int*/ hDC = device.internal_new_GC(null);
+ long hDC = device.internal_new_GC(null);
DIBSECTION dib = null;
if (isDib) {
dib = new DIBSECTION();
@@ -1588,17 +1550,8 @@ public ImageData getImageDataAtCurrentZoom() {
}
/* Create the DC and select the bitmap */
- long /*int*/ hBitmapDC = OS.CreateCompatibleDC(hDC);
- long /*int*/ hOldBitmap = OS.SelectObject(hBitmapDC, handle);
- /* Select the palette if necessary */
- long /*int*/ oldPalette = 0;
- if (!isDib && depth <= 8) {
- long /*int*/ hPalette = device.hPalette;
- if (hPalette != 0) {
- oldPalette = OS.SelectPalette(hBitmapDC, hPalette, false);
- OS.RealizePalette(hBitmapDC);
- }
- }
+ long hBitmapDC = OS.CreateCompatibleDC(hDC);
+ long hOldBitmap = OS.SelectObject(hBitmapDC, handle);
/* Find the size of the image and allocate data */
int imageSize;
if (isDib) {
@@ -1647,10 +1600,6 @@ public ImageData getImageDataAtCurrentZoom() {
}
/* Clean up */
OS.SelectObject(hBitmapDC, hOldBitmap);
- if (oldPalette != 0) {
- OS.SelectPalette(hBitmapDC, oldPalette, false);
- OS.RealizePalette(hBitmapDC);
- }
OS.DeleteDC(hBitmapDC);
/* Release the HDC for the device */
@@ -1659,10 +1608,32 @@ public ImageData getImageDataAtCurrentZoom() {
/* Construct and return the ImageData */
ImageData imageData = new ImageData(width, height, depth, palette, 4, data);
imageData.transparentPixel = this.transparentPixel;
- imageData.alpha = alpha;
- if (alpha == -1 && alphaData != null) {
- imageData.alphaData = new byte[alphaData.length];
- System.arraycopy(alphaData, 0, imageData.alphaData, 0, alphaData.length);
+ if (isDib && depth == 32) {
+ byte straightData[] = new byte[imageSize];
+ byte alphaData[] = new byte[width * height];
+ boolean validAlpha = true;
+ for (int ap = 0, dp = 0; validAlpha && ap < alphaData.length; ap++, dp += 4) {
+ int b = data[dp ] & 0xFF;
+ int g = data[dp + 1] & 0xFF;
+ int r = data[dp + 2] & 0xFF;
+ int a = data[dp + 3] & 0xFF;
+ alphaData[ap] = (byte) a;
+ validAlpha = validAlpha && b <= a && g <= a && r <= a;
+ if (a != 0) {
+ straightData[dp ] = (byte) (((b * 0xFF) + a / 2) / a);
+ straightData[dp + 1] = (byte) (((g * 0xFF) + a / 2) / a);
+ straightData[dp + 2] = (byte) (((r * 0xFF) + a / 2) / a);
+ }
+ }
+ if (validAlpha) {
+ imageData.data = straightData;
+ imageData.alphaData = alphaData;
+ }
+ else {
+ for (int dp = 3; dp < imageSize; dp += 4) {
+ data[dp] = (byte) 0xFF;
+ }
+ }
}
return imageData;
}
@@ -1689,7 +1660,7 @@ public int hashCode () {
} else if (imageFileNameProvider != null) {
return imageFileNameProvider.hashCode();
} else {
- return (int)/*64*/handle;
+ return (int)handle;
}
}
@@ -1698,7 +1669,7 @@ void init(int width, int height) {
SWT.error (SWT.ERROR_INVALID_ARGUMENT);
}
type = SWT.BITMAP;
- long /*int*/ hDC = device.internal_new_GC(null);
+ long hDC = device.internal_new_GC(null);
handle = OS.CreateCompatibleBitmap(hDC, width, height);
/*
* Feature in Windows. CreateCompatibleBitmap() may fail
@@ -1710,11 +1681,12 @@ void init(int width, int height) {
int planes = OS.GetDeviceCaps(hDC, OS.PLANES);
int depth = bits * planes;
if (depth < 16) depth = 16;
+ if (depth > 24) depth = 24;
handle = createDIB(width, height, depth);
}
if (handle != 0) {
- long /*int*/ memDC = OS.CreateCompatibleDC(hDC);
- long /*int*/ hOldBitmap = OS.SelectObject(memDC, handle);
+ long memDC = OS.CreateCompatibleDC(hDC);
+ long hOldBitmap = OS.SelectObject(memDC, handle);
OS.PatBlt(memDC, 0, 0, width, height, OS.PATCOPY);
OS.SelectObject(memDC, hOldBitmap);
OS.DeleteDC(memDC);
@@ -1725,7 +1697,7 @@ void init(int width, int height) {
}
}
-static long /*int*/ createDIB(int width, int height, int depth) {
+static long createDIB(int width, int height, int depth) {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = width;
@@ -1735,11 +1707,11 @@ static long /*int*/ createDIB(int width, int height, int depth) {
bmiHeader.biCompression = OS.BI_RGB;
byte[] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/[] pBits = new long /*int*/[1];
+ long[] pBits = new long[1];
return OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
}
-static long /*int*/ [] init(Device device, Image image, ImageData i) {
+static long [] init(Device device, Image image, ImageData i) {
/* Windows does not support 2-bit images. Convert to 4-bit image. */
if (i.depth == 2) {
ImageData img = new ImageData(i.width, i.height, 4, i.palette);
@@ -1755,6 +1727,9 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
img.alphaData = i.alphaData;
i = img;
}
+
+ boolean hasAlpha = i.alpha != -1 || i.alphaData != null;
+
/*
* Windows supports 16-bit mask of (0x7C00, 0x3E0, 0x1F),
* 24-bit mask of (0xFF0000, 0xFF00, 0xFF) and 32-bit mask
@@ -1771,30 +1746,56 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
int newOrder = ImageData.MSB_FIRST;
PaletteData newPalette = null;
- switch (i.depth) {
- case 8:
- newDepth = 16;
- newOrder = ImageData.LSB_FIRST;
- newPalette = new PaletteData(0x7C00, 0x3E0, 0x1F);
- break;
- case 16:
- newOrder = ImageData.LSB_FIRST;
- if (!(redMask == 0x7C00 && greenMask == 0x3E0 && blueMask == 0x1F)) {
- newPalette = new PaletteData(0x7C00, 0x3E0, 0x1F);
- }
- break;
- case 24:
- if (!(redMask == 0xFF && greenMask == 0xFF00 && blueMask == 0xFF0000)) {
+ if (hasAlpha) {
+ newDepth = 32;
+ newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
+ }
+ else {
+ switch (i.depth) {
+ case 8:
+ /*
+ * Bug 566545. Usually each color mask selects a different part of the pixel
+ * value to encode the according color. In this common case it is rather trivial
+ * to convert an 8-bit direct color image to the Windows supported 16-bit image.
+ * However there is no enforcement for the color masks to be disjunct. For
+ * example an 8-bit image where all color masks select the same 8-bit of pixel
+ * value (mask = 0xFF and shift = 0 for all colors) results in a very efficient
+ * 8-bit gray-scale image without the need of defining a color table.
+ *
+ * That's why we need to calculate the actual required depth if all colors are
+ * stored non-overlapping which might require 24-bit instead of the usual
+ * expected 16-bit.
+ */
+ int minDepth = ImageData.getChannelWidth(redMask, palette.redShift)
+ + ImageData.getChannelWidth(greenMask, palette.greenShift)
+ + ImageData.getChannelWidth(blueMask, palette.blueShift);
+ if (minDepth <= 16) {
+ newDepth = 16;
+ newOrder = ImageData.LSB_FIRST;
+ newPalette = new PaletteData(0x7C00, 0x3E0, 0x1F);
+ } else {
+ newDepth = 24;
+ newPalette = new PaletteData(0xFF, 0xFF00, 0xFF0000);
+ }
+ break;
+ case 16:
+ newOrder = ImageData.LSB_FIRST;
+ if (!(redMask == 0x7C00 && greenMask == 0x3E0 && blueMask == 0x1F)) {
+ newPalette = new PaletteData(0x7C00, 0x3E0, 0x1F);
+ }
+ break;
+ case 24:
+ if (!(redMask == 0xFF && greenMask == 0xFF00 && blueMask == 0xFF0000)) {
+ newPalette = new PaletteData(0xFF, 0xFF00, 0xFF0000);
+ }
+ break;
+ case 32:
+ newDepth = 24;
newPalette = new PaletteData(0xFF, 0xFF00, 0xFF0000);
- }
- break;
- case 32:
- if (!(redMask == 0xFF00 && greenMask == 0xFF0000 && blueMask == 0xFF000000)) {
- newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
- }
- break;
- default:
- SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
+ break;
+ default:
+ SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
+ }
}
if (newPalette != null) {
ImageData img = new ImageData(i.width, i.height, newDepth, newPalette);
@@ -1813,6 +1814,73 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
i = img;
}
}
+ else if (hasAlpha) {
+ int newDepth = 32;
+ PaletteData newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
+ int newOrder = ImageData.MSB_FIRST;
+ RGB[] rgbs = i.palette.getRGBs();
+ int length = rgbs.length;
+ byte[] srcReds = new byte[length];
+ byte[] srcGreens = new byte[length];
+ byte[] srcBlues = new byte[length];
+ for (int j = 0; j < rgbs.length; j++) {
+ RGB rgb = rgbs[j];
+ if (rgb == null) continue;
+ srcReds[j] = (byte)rgb.red;
+ srcGreens[j] = (byte)rgb.green;
+ srcBlues[j] = (byte)rgb.blue;
+ }
+ ImageData img = new ImageData(i.width, i.height, newDepth, newPalette);
+ ImageData.blit(ImageData.BLIT_SRC,
+ i.data, i.depth, i.bytesPerLine, i.getByteOrder(), 0, 0, i.width, i.height, srcReds, srcGreens, srcBlues,
+ ImageData.ALPHA_OPAQUE, null, 0, 0, 0,
+ img.data, img.depth, img.bytesPerLine, newOrder, 0, 0, img.width, img.height, newPalette.redMask, newPalette.greenMask, newPalette.blueMask,
+ false, false);
+
+ if (i.transparentPixel != -1) {
+ img.transparentPixel = newPalette.getPixel(i.palette.getRGB(i.transparentPixel));
+ }
+ img.maskPad = i.maskPad;
+ img.maskData = i.maskData;
+ img.alpha = i.alpha;
+ img.alphaData = i.alphaData;
+ i = img;
+ }
+ if (i.alpha != -1) {
+ int alpha = i.alpha & 0xFF;
+ byte[] data = i.data;
+ for (int dp = 0; dp < i.data.length; dp += 4) {
+ /* pre-multiplied alpha */
+ int r = ((data[dp ] & 0xFF) * alpha) + 128;
+ r = (r + (r >> 8)) >> 8;
+ int g = ((data[dp + 1] & 0xFF) * alpha) + 128;
+ g = (g + (g >> 8)) >> 8;
+ int b = ((data[dp + 2] & 0xFF) * alpha) + 128;
+ b = (b + (b >> 8)) >> 8;
+ data[dp ] = (byte) b;
+ data[dp + 1] = (byte) g;
+ data[dp + 2] = (byte) r;
+ data[dp + 3] = (byte) alpha;
+ }
+ }
+ else if (i.alphaData != null) {
+ byte[] data = i.data;
+ for (int ap = 0, dp = 0; dp < i.data.length; ap++, dp += 4) {
+ /* pre-multiplied alpha */
+ int a = i.alphaData[ap] & 0xFF;
+ int r = ((data[dp ] & 0xFF) * a) + 128;
+ r = (r + (r >> 8)) >> 8;
+ int g = ((data[dp + 1] & 0xFF) * a) + 128;
+ g = (g + (g >> 8)) >> 8;
+ int b = ((data[dp + 2] & 0xFF) * a) + 128;
+ b = (b + (b >> 8)) >> 8;
+ data[dp ] = (byte) r;
+ data[dp + 1] = (byte) g;
+ data[dp + 2] = (byte) b;
+ data[dp + 3] = (byte) a;
+ }
+ }
+
/* Construct bitmap info header by hand */
RGB[] rgbs = i.palette.getRGBs();
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
@@ -1832,16 +1900,16 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
/* Set the rgb colors into the bitmap info */
int offset = BITMAPINFOHEADER.sizeof;
if (!i.palette.isDirect) {
- for (int j = 0; j < rgbs.length; j++) {
- bmi[offset] = (byte)rgbs[j].blue;
- bmi[offset + 1] = (byte)rgbs[j].green;
- bmi[offset + 2] = (byte)rgbs[j].red;
+ for (RGB rgb : rgbs) {
+ bmi[offset] = (byte)rgb.blue;
+ bmi[offset + 1] = (byte)rgb.green;
+ bmi[offset + 2] = (byte)rgb.red;
bmi[offset + 3] = 0;
offset += 4;
}
}
- long /*int*/[] pBits = new long /*int*/[1];
- long /*int*/ hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long[] pBits = new long[1];
+ long hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);
/* In case of a scanline pad other than 4, do the work to convert it */
byte[] data = i.data;
@@ -1850,17 +1918,17 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
}
OS.MoveMemory(pBits[0], data, data.length);
- long /*int*/ [] result = null;
+ long [] result = null;
if (i.getTransparencyType() == SWT.TRANSPARENCY_MASK) {
/* Get the HDC for the device */
- long /*int*/ hDC = device.internal_new_GC(null);
+ long hDC = device.internal_new_GC(null);
/* Create the color bitmap */
- long /*int*/ hdcSrc = OS.CreateCompatibleDC(hDC);
+ long hdcSrc = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcSrc, hDib);
- long /*int*/ hBitmap = OS.CreateCompatibleBitmap(hDC, i.width, i.height);
+ long hBitmap = OS.CreateCompatibleBitmap(hDC, i.width, i.height);
if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ hdcDest = OS.CreateCompatibleDC(hDC);
+ long hdcDest = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcDest, hBitmap);
OS.BitBlt(hdcDest, 0, 0, i.width, i.height, hdcSrc, 0, 0, OS.SRCCOPY);
@@ -1869,7 +1937,7 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
/* Create the mask. Windows requires icon masks to have a scanline pad of 2. */
byte[] maskData = ImageData.convertPad(i.maskData, i.width, i.height, 1, i.maskPad, 2);
- long /*int*/ hMask = OS.CreateBitmap(i.width, i.height, 1, 1, maskData);
+ long hMask = OS.CreateBitmap(i.width, i.height, 1, 1, maskData);
if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.SelectObject(hdcSrc, hMask);
OS.PatBlt(hdcSrc, 0, 0, i.width, i.height, OS.DSTINVERT);
@@ -1878,14 +1946,14 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
OS.DeleteObject(hDib);
if (image == null) {
- result = new long /*int*/ []{hBitmap, hMask};
+ result = new long []{hBitmap, hMask};
} else {
/* Create the icon */
ICONINFO info = new ICONINFO();
info.fIcon = true;
info.hbmColor = hBitmap;
info.hbmMask = hMask;
- long /*int*/ hIcon = OS.CreateIconIndirect(info);
+ long hIcon = OS.CreateIconIndirect(info);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.DeleteObject(hBitmap);
OS.DeleteObject(hMask);
@@ -1894,25 +1962,17 @@ static long /*int*/ [] init(Device device, Image image, ImageData i) {
}
} else {
if (image == null) {
- result = new long /*int*/ []{hDib};
+ result = new long []{hDib};
} else {
image.handle = hDib;
image.type = SWT.BITMAP;
image.transparentPixel = i.transparentPixel;
- if (image.transparentPixel == -1) {
- image.alpha = i.alpha;
- if (i.alpha == -1 && i.alphaData != null) {
- int length = i.alphaData.length;
- image.alphaData = new byte[length];
- System.arraycopy(i.alphaData, 0, image.alphaData, 0, length);
- }
- }
}
}
return result;
}
-static long /*int*/ [] init(Device device, Image image, ImageData source, ImageData mask) {
+static long [] init(Device device, Image image, ImageData source, ImageData mask) {
/* Create a temporary image and locate the black pixel */
ImageData imageData;
int blackIndex = 0;
@@ -2006,7 +2066,7 @@ void init(ImageData i) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC (GCData data) {
+public long internal_new_GC (GCData data) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
* Create a new GC that can draw into the image.
@@ -2017,8 +2077,8 @@ public long /*int*/ internal_new_GC (GCData data) {
}
/* Create a compatible HDC for the device */
- long /*int*/ hDC = device.internal_new_GC(null);
- long /*int*/ imageDC = OS.CreateCompatibleDC(hDC);
+ long hDC = device.internal_new_GC(null);
+ long imageDC = OS.CreateCompatibleDC(hDC);
device.internal_dispose_GC(hDC, null);
if (imageDC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -2053,7 +2113,7 @@ public long /*int*/ internal_new_GC (GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
+public void internal_dispose_GC (long hDC, GCData data) {
OS.DeleteDC(hDC);
}
@@ -2114,12 +2174,12 @@ public void setBackground(Color color) {
transparentColor = -1;
/* Get the HDC for the device */
- long /*int*/ hDC = device.internal_new_GC(null);
+ long hDC = device.internal_new_GC(null);
/* Change the background color in the image */
BITMAP bm = new BITMAP();
OS.GetObject(handle, BITMAP.sizeof, bm);
- long /*int*/ hdcMem = OS.CreateCompatibleDC(hDC);
+ long hdcMem = OS.CreateCompatibleDC(hDC);
OS.SelectObject(hdcMem, handle);
int maxColors = 1 << bm.bmBitsPixel;
byte[] colors = new byte[maxColors * 4];
@@ -2164,7 +2224,7 @@ public String toString () {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Image win32_new(Device device, int type, long /*int*/ handle) {
+public static Image win32_new(Device device, int type, long handle) {
Image image = new Image(device);
image.type = type;
image.handle = handle;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/ImageLoader.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/ImageLoader.java
index a8914ea4af..bbe5ac8d51 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/ImageLoader.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/ImageLoader.java
@@ -43,9 +43,9 @@ import org.eclipse.swt.internal.image.*;
* </ul>
*
* <p>
- * NOTE: <code>ImageLoader</code> is implemented in Java on some platforms, which has
- * certain performance implications. Performance and memory sensitive applications may
- * benefit from using one of the constructors provided by <code>Image</code>, as these
+ * NOTE: <code>ImageLoader</code> is implemented in Java on some platforms, which has
+ * certain performance implications. Performance and memory sensitive applications may
+ * benefit from using one of the constructors provided by <code>Image</code>, as these
* are implemented natively.</p>
*
* @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ImageAnalyzer</a>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
index cd8d2bc3e7..09d50d0766 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -53,7 +53,7 @@ public class Path extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
PointF currentPoint = new PointF(), startPoint = new PointF();
@@ -199,10 +199,12 @@ public Path (Device device, PathData data) {
* </ul>
*/
public void addArc (float x, float y, float width, float height, float startAngle, float arcAngle) {
- x = DPIUtil.autoScaleUp(x);
- y = DPIUtil.autoScaleUp(y);
- width = DPIUtil.autoScaleUp(width);
- height = DPIUtil.autoScaleUp(height);
+ if (width == 0 || height == 0 || arcAngle == 0) return;
+ Drawable drawable = getDevice();
+ x = DPIUtil.autoScaleUp(drawable, x);
+ y = DPIUtil.autoScaleUp(drawable, y);
+ width = DPIUtil.autoScaleUp(drawable, width);
+ height = DPIUtil.autoScaleUp(drawable, height);
addArcInPixels(x, y, width, height, startAngle, arcAngle);
}
@@ -216,13 +218,12 @@ void addArcInPixels(float x, float y, float width, float height, float startAngl
y = y + height;
height = -height;
}
- if (width == 0 || height == 0 || arcAngle == 0) return;
if (width == height) {
Gdip.GraphicsPath_AddArc(handle, x, y, width, height, -startAngle, -arcAngle);
} else {
- long /*int*/ path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
+ long path = Gdip.GraphicsPath_new(Gdip.FillModeAlternate);
if (path == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- long /*int*/ matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
+ long matrix = Gdip.Matrix_new(width, 0, 0, height, x, y);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.GraphicsPath_AddArc(path, 0, 0, 1, 1, -startAngle, -arcAngle);
Gdip.GraphicsPath_Transform(path, matrix);
@@ -269,10 +270,11 @@ public void addPath(Path path) {
* </ul>
*/
public void addRectangle (float x, float y, float width, float height) {
- x = DPIUtil.autoScaleUp(x);
- y = DPIUtil.autoScaleUp(y);
- width = DPIUtil.autoScaleUp(width);
- height = DPIUtil.autoScaleUp(height);
+ Drawable drawable = getDevice();
+ x = DPIUtil.autoScaleUp(drawable, x);
+ y = DPIUtil.autoScaleUp(drawable, y);
+ width = DPIUtil.autoScaleUp(drawable, width);
+ height = DPIUtil.autoScaleUp(drawable, height);
addRectangleInPixels(x, y, width, height);
}
@@ -306,8 +308,9 @@ void addRectangleInPixels(float x, float y, float width, float height) {
* </ul>
*/
public void addString (String string, float x, float y, Font font) {
- x = DPIUtil.autoScaleUp(x);
- y = DPIUtil.autoScaleUp(y);
+ Drawable drawable = getDevice();
+ x = DPIUtil.autoScaleUp(drawable, x);
+ y = DPIUtil.autoScaleUp(drawable, y);
addStringInPixels(string, x, y, font);
}
@@ -316,9 +319,9 @@ void addStringInPixels(String string, float x, float y, Font font) {
if (font == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
char[] buffer = string.toCharArray();
- long /*int*/ hDC = device.internal_new_GC(null);
- long /*int*/ [] family = new long /*int*/ [1];
- long /*int*/ gdipFont = GC.createGdipFont(hDC, font.handle, 0, device.fontCollection, family, null);
+ long hDC = device.internal_new_GC(null);
+ long [] family = new long [1];
+ long gdipFont = GC.createGdipFont(hDC, font.handle, 0, device.fontCollection, family, null);
PointF point = new PointF();
point.X = x - (Gdip.Font_GetSize(gdipFont) / 6);
point.Y = y;
@@ -378,8 +381,9 @@ public void close() {
* </ul>
*/
public boolean contains (float x, float y, GC gc, boolean outline) {
- x = DPIUtil.autoScaleUp(x);
- y = DPIUtil.autoScaleUp(y);
+ Drawable drawable = getDevice();
+ x = DPIUtil.autoScaleUp(drawable, x);
+ y = DPIUtil.autoScaleUp(drawable, y);
return containsInPixels(x, y, gc, outline);
}
@@ -414,12 +418,13 @@ boolean containsInPixels(float x, float y, GC gc, boolean outline) {
* </ul>
*/
public void cubicTo (float cx1, float cy1, float cx2, float cy2, float x, float y) {
- cx1 = DPIUtil.autoScaleUp(cx1);
- cy1 = DPIUtil.autoScaleUp(cy1);
- cx2 = DPIUtil.autoScaleUp(cx2);
- cy2 = DPIUtil.autoScaleUp(cy2);
- x = DPIUtil.autoScaleUp(x);
- y = DPIUtil.autoScaleUp(y);
+ Drawable drawable = getDevice();
+ cx1 = DPIUtil.autoScaleUp(drawable, cx1);
+ cy1 = DPIUtil.autoScaleUp(drawable, cy1);
+ cx2 = DPIUtil.autoScaleUp(drawable, cx2);
+ cy2 = DPIUtil.autoScaleUp(drawable, cy2);
+ x = DPIUtil.autoScaleUp(drawable, x);
+ y = DPIUtil.autoScaleUp(drawable, y);
cubicToInPixels(cx1, cy1, cx2, cy2, x, y);
}
@@ -453,7 +458,8 @@ void destroy() {
public void getBounds (float[] bounds) {
if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
getBoundsInPixels(bounds);
- bounds = DPIUtil.autoScaleDown(bounds);
+ float[] scaledbounds= DPIUtil.autoScaleDown(getDevice(), bounds);
+ System.arraycopy(scaledbounds, 0, bounds, 0, 4);
}
void getBoundsInPixels(float[] bounds) {
@@ -484,7 +490,8 @@ void getBoundsInPixels(float[] bounds) {
public void getCurrentPoint (float[] point) {
if (point == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
getCurrentPointInPixels(point);
- point = DPIUtil.autoScaleDown(point);
+ float[] scaledpoint= DPIUtil.autoScaleDown(getDevice(), point);
+ System.arraycopy(scaledpoint, 0, point, 0, 2);
}
void getCurrentPointInPixels(float[] point) {
@@ -508,7 +515,7 @@ void getCurrentPointInPixels(float[] point) {
public PathData getPathData() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
PathData result = getPathDataInPixels();
- result.points = DPIUtil.autoScaleDown(result.points);
+ result.points = DPIUtil.autoScaleDown(getDevice(), result.points);
return result;
}
@@ -569,7 +576,8 @@ PathData getPathDataInPixels() {
* </ul>
*/
public void lineTo (float x, float y) {
- lineToInPixels(DPIUtil.autoScaleUp(x), DPIUtil.autoScaleUp(y));
+ Drawable drawable = getDevice();
+ lineToInPixels(DPIUtil.autoScaleUp(drawable, x), DPIUtil.autoScaleUp(drawable, y));
}
void lineToInPixels(float x, float y) {
@@ -633,7 +641,8 @@ public boolean isDisposed() {
* </ul>
*/
public void moveTo (float x, float y) {
- moveToInPixels(DPIUtil.autoScaleUp(x), DPIUtil.autoScaleUp(y));
+ Drawable drawable = getDevice();
+ moveToInPixels(DPIUtil.autoScaleUp(drawable, x), DPIUtil.autoScaleUp(drawable, y));
}
void moveToInPixels(float x, float y) {
@@ -656,10 +665,11 @@ void moveToInPixels(float x, float y) {
* </ul>
*/
public void quadTo (float cx, float cy, float x, float y) {
- cx = DPIUtil.autoScaleUp(cx);
- cy = DPIUtil.autoScaleUp(cy);
- x = DPIUtil.autoScaleUp(x);
- y = DPIUtil.autoScaleUp(y);
+ Drawable drawable = getDevice();
+ cx = DPIUtil.autoScaleUp(drawable, cx);
+ cy = DPIUtil.autoScaleUp(drawable, cy);
+ x = DPIUtil.autoScaleUp(drawable, x);
+ y = DPIUtil.autoScaleUp(drawable, y);
quadToInPixels(cx, cy, x, y);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
index 3918f5c4ec..5ff9e06a41 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
@@ -51,7 +51,7 @@ public class Pattern extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
/**
* Constructs a new Pattern given an image. Drawing with the resulting
@@ -86,14 +86,14 @@ public Pattern(Device device, Image image) {
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
this.device.checkGDIP();
- long /*int*/[] gdipImage = image.createGdipImage();
- long /*int*/ img = gdipImage[0];
+ long[] gdipImage = image.createGdipImage();
+ long img = gdipImage[0];
int width = Gdip.Image_GetWidth(img);
int height = Gdip.Image_GetHeight(img);
handle = Gdip.TextureBrush_new(img, Gdip.WrapModeTile, 0, 0, width, height);
Gdip.Bitmap_delete(img);
if (gdipImage[1] != 0) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
OS.HeapFree(hHeap, 0, gdipImage[1]);
}
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
index da4c4a804f..e2409b4772 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
@@ -45,7 +45,7 @@ public final class Region extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
/**
* Constructs a new empty region.
@@ -123,7 +123,7 @@ public void add (int[] pointArray) {
}
void addInPixels (int[] pointArray) {
- long /*int*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
+ long polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_OR);
OS.DeleteObject (polyRgn);
}
@@ -174,7 +174,7 @@ public void add (int x, int y, int width, int height) {
void addInPixels (int x, int y, int width, int height) {
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
}
@@ -305,7 +305,7 @@ Rectangle getBoundsInPixels() {
*/
@Override
public int hashCode () {
- return (int)/*64*/handle;
+ return (int)handle;
}
/**
@@ -356,7 +356,7 @@ public void intersect (int x, int y, int width, int height) {
void intersectInPixels (int x, int y, int width, int height) {
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_AND);
OS.DeleteObject (rectRgn);
}
@@ -493,7 +493,7 @@ public void subtract (int[] pointArray) {
}
void subtractInPixels (int[] pointArray) {
- long /*int*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
+ long polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_DIFF);
OS.DeleteObject (polyRgn);
}
@@ -546,7 +546,7 @@ public void subtract (int x, int y, int width, int height) {
void subtractInPixels (int x, int y, int width, int height) {
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
+ long rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_DIFF);
OS.DeleteObject (rectRgn);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
index 663d970214..1c71538df3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,6 +18,7 @@ import java.util.*;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gdip.*;
+import org.eclipse.swt.internal.ole.win32.*;
import org.eclipse.swt.internal.win32.*;
/**
@@ -60,21 +61,40 @@ public final class TextLayout extends Resource {
StyleItem[] allRuns;
StyleItem[][] runs;
int[] lineOffset, lineY, lineWidth;
- long /*int*/ mLangFontLink2;
+ IMLangFontLink2 mLangFontLink2;
int verticalIndentInPoints;
static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F';
static final int SCRIPT_VISATTR_SIZEOF = 2;
static final int GOFFSET_SIZEOF = 8;
- static final byte[] CLSID_CMultiLanguage = new byte[16];
- static final byte[] IID_IMLangFontLink2 = new byte[16];
- static {
- OS.IIDFromString("{275c23e2-3747-11d0-9fea-00aa003f8646}\0".toCharArray(), CLSID_CMultiLanguage);
- OS.IIDFromString("{DCCFC162-2B38-11d2-B7EC-00C04F8F5D9A}\0".toCharArray(), IID_IMLangFontLink2);
- }
-
static final int MERGE_MAX = 512;
static final int TOO_MANY_RUNS = 1024;
+ /**
+ * Runs over a certain length (32000 characters / 65536 Glyphs / 32768 pixels -
+ * these numbers come from WinAPI docs + analysis done in Bug 23406 Comment 31)
+ * will fail to render in ScriptTextOut, ScriptShape, ScriptPlace so such
+ * long runs need to be split into shorter runs. Because it is expensive to
+ * keep testing (with Script*) to maximize the length we use this heuristic
+ * to minimize the length. However splitting the runs into too short pieces
+ * affects performance, so this is a balance.
+ */
+ static final int MAX_RUN_LENGTH = 32000;
+ /**
+ * When splitting a run (see {@link #MAX_RUN_LENGTH}) the run needs to split
+ * in a way that does not affect the display of the glyphs, so it is important
+ * to not split the run in the middle of a glyph. We use the same info to find
+ * where we can wrap text to find where we can break the runs (ScriptBreak's info).
+ * This setting limits how far back from {@link #MAX_RUN_LENGTH} the code
+ * will search for a break before forcing a break at {@link #MAX_RUN_LENGTH}.
+ */
+ static final int MAX_SEARCH_RUN_BREAK = 1000;
+ {
+ // While developing the splitting long runs it can be useful to
+ // make these constants smaller, but these invariants must
+ // preserved even in such cases.
+ assert MAX_RUN_LENGTH > 1;
+ assert MAX_SEARCH_RUN_BREAK < MAX_RUN_LENGTH;
+ }
/* IME has a copy of these constants */
static final int UNDERLINE_IME_DOT = 1 << 16;
@@ -88,17 +108,17 @@ public final class TextLayout extends Resource {
/*Script cache and analysis */
SCRIPT_ANALYSIS analysis;
- long /*int*/ psc = 0;
+ long psc = 0;
/*Shape info (malloc when the run is shaped) */
- long /*int*/ glyphs;
+ long glyphs;
int glyphCount;
- long /*int*/ clusters;
- long /*int*/ visAttrs;
+ long clusters;
+ long visAttrs;
/*Place info (malloc when the run is placed) */
- long /*int*/ advances;
- long /*int*/ goffsets;
+ long advances;
+ long goffsets;
int width;
int ascentInPoints;
int descentInPoints;
@@ -108,15 +128,16 @@ public final class TextLayout extends Resource {
int strikeoutPos, strikeoutThickness;
/* Justify info (malloc during computeRuns) */
- long /*int*/ justify;
+ long justify;
/* ScriptBreak */
- long /*int*/ psla;
+ int pslaAllocSize;
+ long psla;
- long /*int*/ fallbackFont;
+ long fallbackFont;
void free() {
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
if (psc != 0) {
OS.ScriptFreeCache (psc);
OS.HeapFree(hHeap, 0, psc);
@@ -190,10 +211,10 @@ public TextLayout (Device device) {
styles[1] = new StyleItem();
stylesCount = 2;
text = ""; //$NON-NLS-1$
- long /*int*/[] ppv = new long /*int*/[1];
+ long[] ppv = new long[1];
OS.OleInitialize(0);
- if (OS.CoCreateInstance(CLSID_CMultiLanguage, 0, OS.CLSCTX_INPROC_SERVER, IID_IMLangFontLink2, ppv) == OS.S_OK) {
- mLangFontLink2 = ppv[0];
+ if (COM.CoCreateInstance(COM.CLSID_CMultiLanguage, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_IMLangFontLink2, ppv) == OS.S_OK) {
+ mLangFontLink2 = new IMLangFontLink2(ppv[0]);
}
init();
}
@@ -227,7 +248,8 @@ void breakRun(StyleItem run) {
if (run.psla != 0) return;
char[] chars = new char[run.length];
segmentsText.getChars(run.start, run.start + run.length, chars, 0);
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
+ run.pslaAllocSize = SCRIPT_LOGATTR.sizeof * chars.length;
run.psla = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, SCRIPT_LOGATTR.sizeof * chars.length);
if (run.psla == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.ScriptBreak(chars, chars.length, run.analysis, run.psla);
@@ -243,8 +265,8 @@ void checkLayout () {
*/
void computeRuns (GC gc) {
if (runs != null) return;
- long /*int*/ hDC = gc != null ? gc.handle : device.internal_new_GC(null);
- long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long hDC = gc != null ? gc.handle : device.internal_new_GC(null);
+ long srcHdc = OS.CreateCompatibleDC(hDC);
allRuns = itemize();
for (int i=0; i<allRuns.length - 1; i++) {
StyleItem run = allRuns[i];
@@ -272,6 +294,11 @@ void computeRuns (GC gc) {
run.width = tabX - lineWidth;
}
}
+
+ /*
+ * This block adjusts the indentation after merged tabs stops.
+ * The extra tabs are removed in merge.
+ */
int length = run.length;
if (length > 1) {
int stop = j + length - 1;
@@ -434,10 +461,9 @@ void computeRuns (GC gc) {
}
}
lineWidth += lineIndent;
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
int newLineWidth = 0;
- for (int j = 0; j < runs[line].length; j++) {
- StyleItem item = runs[line][j];
+ for (StyleItem item : runs[line]) {
int iDx = item.width * wrapWidth / lineWidth;
if (iDx != item.width) {
item.justify = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, item.glyphCount * 4);
@@ -461,9 +487,9 @@ void computeRuns (GC gc) {
}
lineWidth = getLineIndent(line);
- for (int j = 0; j < runs[line].length; j++) {
- runs[line][j].x = lineWidth;
- lineWidth += runs[line][j].width;
+ for (StyleItem run1 : runs[line]) {
+ run1.x = lineWidth;
+ lineWidth += run1.width;
}
line++;
lineY[line] = lineY[line - 1] + ascentInPoints + descentInPoints + lineSpacingInPoints;
@@ -491,10 +517,9 @@ void destroy () {
lineWidth = null;
segments = null;
segmentsChars = null;
- if (mLangFontLink2 != 0) {
- /* Release() */
- OS.VtblCall(2, mLangFontLink2);
- mLangFontLink2 = 0;
+ if (mLangFontLink2 != null) {
+ mLangFontLink2.Release();
+ mLangFontLink2 = null;
}
OS.OleUninitialize();
}
@@ -546,12 +571,12 @@ int[] computePolyline(int left, int top, int right, int bottom) {
return coordinates;
}
-long /*int*/ createGdipBrush(int pixel, int alpha) {
+long createGdipBrush(int pixel, int alpha) {
int argb = ((alpha & 0xFF) << 24) | ((pixel >> 16) & 0xFF) | (pixel & 0xFF00) | ((pixel & 0xFF) << 16);
return Gdip.SolidBrush_new(argb);
}
-long /*int*/ createGdipBrush(Color color, int alpha) {
+long createGdipBrush(Color color, int alpha) {
return createGdipBrush(color.handle, alpha);
}
@@ -648,16 +673,16 @@ void drawInPixels (GC gc, int x, int y, int selectionStart, int selectionEnd, Co
int length = text.length();
if (length == 0 && flags == 0) return;
y += getScaledVerticalIndent();
- long /*int*/ hdc = gc.handle;
+ long hdc = gc.handle;
Rectangle clip = gc.getClippingInPixels();
GCData data = gc.data;
- long /*int*/ gdipGraphics = data.gdipGraphics;
+ long gdipGraphics = data.gdipGraphics;
int foreground = data.foreground;
int linkColor = OS.GetSysColor (OS.COLOR_HOTLIGHT);
int alpha = data.alpha;
boolean gdip = gdipGraphics != 0;
- long /*int*/ gdipForeground = 0;
- long /*int*/ gdipLinkColor = 0;
+ long gdipForeground = 0;
+ long gdipLinkColor = 0;
int state = 0;
if (gdip) {
gc.checkGC(GC.FOREGROUND);
@@ -669,8 +694,8 @@ void drawInPixels (GC gc, int x, int y, int selectionStart, int selectionEnd, Co
}
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
- long /*int*/ gdipSelBackground = 0, gdipSelForeground = 0, gdipFont = 0, lastHFont = 0;
- long /*int*/ selBackground = 0;
+ long gdipSelBackground = 0, gdipSelForeground = 0, gdipFont = 0, lastHFont = 0;
+ long selBackground = 0;
int selForeground = 0;
if (hasSelection || ((flags & SWT.LAST_LINE_SELECTION) != 0 && (flags & (SWT.FULL_SELECTION | SWT.DELIMITER_SELECTION)) != 0)) {
int fgSel = selectionForeground != null ? selectionForeground.handle : OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT);
@@ -731,8 +756,7 @@ void drawInPixels (GC gc, int x, int y, int selectionStart, int selectionEnd, Co
//Draw the background of the runs in the line
int alignmentX = drawX;
- for (int i = 0; i < lineRuns.length; i++) {
- StyleItem run = lineRuns[i];
+ for (StyleItem run : lineRuns) {
if (run.length == 0) continue;
if (drawX > clip.x + clip.width) break;
if (drawX + run.width >= clip.x) {
@@ -751,9 +775,9 @@ void drawInPixels (GC gc, int x, int y, int selectionStart, int selectionEnd, Co
//Draw the text, underline, strikeout, and border of the runs in the line
int baselineInPixels = Math.max(0, this.ascentInPixels);
int lineUnderlinePos = 0;
- for (int i = 0; i < lineRuns.length; i++) {
- baselineInPixels = Math.max(baselineInPixels, DPIUtil.autoScaleUp(getDevice(), lineRuns[i].ascentInPoints));
- lineUnderlinePos = Math.min(lineUnderlinePos, lineRuns[i].underlinePos);
+ for (StyleItem run : lineRuns) {
+ baselineInPixels = Math.max(baselineInPixels, DPIUtil.autoScaleUp(getDevice(), run.ascentInPoints));
+ lineUnderlinePos = Math.min(lineUnderlinePos, run.underlinePos);
}
RECT borderClip = null, underlineClip = null, strikeoutClip = null, pRect = null;
drawX = alignmentX;
@@ -768,11 +792,11 @@ void drawInPixels (GC gc, int x, int y, int selectionStart, int selectionEnd, Co
if (!skipTab && (!run.lineBreak || run.softBreak) && !(style != null && style.metrics != null)) {
OS.SetRect(rect, drawX, drawY, drawX + run.width, drawY + lineHeight);
if (gdip) {
- long /*int*/ hFont = getItemFont(run);
+ long hFont = getItemFont(run);
if (hFont != lastHFont) {
lastHFont = hFont;
if (gdipFont != 0) Gdip.Font_delete(gdipFont);
- long /*int*/ oldFont = OS.SelectObject(hdc, hFont);
+ long oldFont = OS.SelectObject(hdc, hFont);
gdipFont = Gdip.Font_new(hdc, hFont);
OS.SelectObject(hdc, oldFont);
if (gdipFont == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -781,7 +805,7 @@ void drawInPixels (GC gc, int x, int y, int selectionStart, int selectionEnd, Co
gdipFont = 0;
}
}
- long /*int*/ gdipFg = gdipForeground;
+ long gdipFg = gdipForeground;
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
if (gdipLinkColor == 0) gdipLinkColor = createGdipBrush(linkColor, alpha);
gdipFg = gdipLinkColor;
@@ -815,14 +839,14 @@ void drawInPixels (GC gc, int x, int y, int selectionStart, int selectionEnd, Co
if (selBackground != 0) OS.DeleteObject (selBackground);
}
-RECT drawBorder(long /*int*/ hdc, int x, int y, int lineHeight, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawBorder(long hdc, int x, int y, int lineHeight, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
if (style.borderStyle == SWT.NONE) return null;
clipRect = addClipRect(run, clipRect, pRect, selectionStart, selectionEnd);
boolean lastRunVisible = drawClip != null && (x + run.x + run.width) > (drawClip.x + drawClip.width);
- if (index + 1 >= line.length || lastRunVisible || !style.isAdherentBorder(line[index + 1].style)) {
+ if (index + 1 >= line.length || lastRunVisible || line[index + 1].lineBreak || !style.isAdherentBorder(line[index + 1].style)) {
int left = run.x;
int start = run.start;
int end = run.start + run.length - 1;
@@ -862,12 +886,12 @@ RECT drawBorder(long /*int*/ hdc, int x, int y, int lineHeight, StyleItem[] line
break;
}
}
- long /*int*/ oldBrush = OS.SelectObject(hdc, OS.GetStockObject(OS.NULL_BRUSH));
+ long oldBrush = OS.SelectObject(hdc, OS.GetStockObject(OS.NULL_BRUSH));
LOGBRUSH logBrush = new LOGBRUSH();
logBrush.lbStyle = OS.BS_SOLID;
- logBrush.lbColor = /*64*/(int)color;
- long /*int*/ newPen = OS.ExtCreatePen(lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
- long /*int*/ oldPen = OS.SelectObject(hdc, newPen);
+ logBrush.lbColor = color;
+ long newPen = OS.ExtCreatePen(lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
+ long oldPen = OS.SelectObject(hdc, newPen);
RECT drawRect = new RECT();
OS.SetRect(drawRect, x + left, y, x + run.x + run.width, y + lineHeight);
if (drawClip != null) {
@@ -888,8 +912,8 @@ RECT drawBorder(long /*int*/ hdc, int x, int y, int lineHeight, StyleItem[] line
if (clipRect.left == -1) clipRect.left = 0;
if (clipRect.right == -1) clipRect.right = 0x7ffff;
OS.IntersectClipRect(hdc, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
- logBrush.lbColor = /*64*/(int)selectionColor;
- long /*int*/ selPen = OS.ExtCreatePen (lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
+ logBrush.lbColor = selectionColor;
+ long selPen = OS.ExtCreatePen (lineStyle | OS.PS_GEOMETRIC, lineWidth, logBrush, 0, null);
oldPen = OS.SelectObject(hdc, selPen);
OS.Rectangle(hdc, drawRect.left, drawRect.top, drawRect.right, drawRect.bottom);
OS.RestoreDC(hdc, state);
@@ -902,14 +926,14 @@ RECT drawBorder(long /*int*/ hdc, int x, int y, int lineHeight, StyleItem[] line
return clipRect;
}
-RECT drawBorderGDIP(long /*int*/ graphics, int x, int y, int lineHeight, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawBorderGDIP(long graphics, int x, int y, int lineHeight, StyleItem[] line, int index, long color, long selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
if (style.borderStyle == SWT.NONE) return null;
clipRect = addClipRect(run, clipRect, pRect, selectionStart, selectionEnd);
boolean lastRunVisible = drawClip != null && (x + run.x + run.width) > (drawClip.x + drawClip.width);
- if (index + 1 >= line.length || lastRunVisible || !style.isAdherentBorder(line[index + 1].style)) {
+ if (index + 1 >= line.length || lastRunVisible || line[index + 1].lineBreak || !style.isAdherentBorder(line[index + 1].style)) {
int left = run.x;
int start = run.start;
int end = run.start + run.length - 1;
@@ -920,7 +944,7 @@ RECT drawBorderGDIP(long /*int*/ graphics, int x, int y, int lineHeight, StyleIt
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- long /*int*/ brush = color;
+ long brush = color;
if (style.borderColor != null) {
brush = createGdipBrush(style.borderColor, alpha);
clipRect = null;
@@ -941,7 +965,7 @@ RECT drawBorderGDIP(long /*int*/ graphics, int x, int y, int lineHeight, StyleIt
case SWT.BORDER_DASH: lineStyle = Gdip.DashStyleDash; break;
case SWT.BORDER_DOT: lineStyle = Gdip.DashStyleDot; break;
}
- long /*int*/ pen = Gdip.Pen_new(brush, lineWidth);
+ long pen = Gdip.Pen_new(brush, lineWidth);
Gdip.Pen_SetDashStyle(pen, lineStyle);
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
int smoothingMode = Gdip.Graphics_GetSmoothingMode(graphics);
@@ -960,7 +984,7 @@ RECT drawBorderGDIP(long /*int*/ graphics, int x, int y, int lineHeight, StyleIt
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
- long /*int*/ selPen = Gdip.Pen_new(selectionColor, lineWidth);
+ long selPen = Gdip.Pen_new(selectionColor, lineWidth);
Gdip.Pen_SetDashStyle(selPen, lineStyle);
Gdip.Graphics_DrawRectangle(graphics, selPen, x + left, y, run.x + run.width - left - 1, lineHeight - 1);
Gdip.Pen_delete(selPen);
@@ -977,7 +1001,7 @@ RECT drawBorderGDIP(long /*int*/ graphics, int x, int y, int lineHeight, StyleIt
return clipRect;
}
-void drawRunBackground(StyleItem run, long /*int*/ hdc, RECT rect, int selectionStart, int selectionEnd, long /*int*/ selBrush, boolean hasSelection) {
+void drawRunBackground(StyleItem run, long hdc, RECT rect, int selectionStart, int selectionEnd, long selBrush, boolean hasSelection) {
int end = run.start + run.length - 1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
if (fullSelection) {
@@ -986,8 +1010,8 @@ void drawRunBackground(StyleItem run, long /*int*/ hdc, RECT rect, int selection
} else {
if (run.style != null && run.style.background != null) {
int bg = run.style.background.handle;
- long /*int*/ hBrush = OS.CreateSolidBrush (bg);
- long /*int*/ oldBrush = OS.SelectObject(hdc, hBrush);
+ long hBrush = OS.CreateSolidBrush (bg);
+ long oldBrush = OS.SelectObject(hdc, hBrush);
OS.PatBlt(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject(hdc, oldBrush);
OS.DeleteObject(hBrush);
@@ -1001,14 +1025,14 @@ void drawRunBackground(StyleItem run, long /*int*/ hdc, RECT rect, int selection
}
}
-void drawRunBackgroundGDIP(StyleItem run, long /*int*/ graphics, RECT rect, int selectionStart, int selectionEnd, int alpha, long /*int*/ selBrush, boolean hasSelection) {
+void drawRunBackgroundGDIP(StyleItem run, long graphics, RECT rect, int selectionStart, int selectionEnd, int alpha, long selBrush, boolean hasSelection) {
int end = run.start + run.length - 1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
if (fullSelection) {
Gdip.Graphics_FillRectangle(graphics, selBrush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
} else {
if (run.style != null && run.style.background != null) {
- long /*int*/ brush = createGdipBrush(run.style.background, alpha);
+ long brush = createGdipBrush(run.style.background, alpha);
Gdip.Graphics_FillRectangle(graphics, brush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
Gdip.SolidBrush_delete(brush);
}
@@ -1025,7 +1049,7 @@ void drawRunBackgroundGDIP(StyleItem run, long /*int*/ graphics, RECT rect, int
}
}
-RECT drawRunText(long /*int*/ hdc, StyleItem run, RECT rect, int baselineInPixels, int color, int selectionColor, int selectionStart, int selectionEnd) {
+RECT drawRunText(long hdc, StyleItem run, RECT rect, int baselineInPixels, int color, int selectionColor, int selectionStart, int selectionEnd) {
int end = run.start + run.length - 1;
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
@@ -1033,7 +1057,7 @@ RECT drawRunText(long /*int*/ hdc, StyleItem run, RECT rect, int baselineInPixel
int offset = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? -1 : 0;
int x = rect.left + offset;
int y = rect.top + (baselineInPixels - DPIUtil.autoScaleUp(getDevice(), run.ascentInPoints));
- long /*int*/ hFont = getItemFont(run);
+ long hFont = getItemFont(run);
OS.SelectObject(hdc, hFont);
if (fullSelection) {
color = selectionColor;
@@ -1052,7 +1076,7 @@ RECT drawRunText(long /*int*/ hdc, StyleItem run, RECT rect, int baselineInPixel
return fullSelection || partialSelection ? rect : null;
}
-RECT drawRunTextGDIP(long /*int*/ graphics, StyleItem run, RECT rect, long /*int*/ gdipFont, int baselineInPixels, long /*int*/ color, long /*int*/ selectionColor, int selectionStart, int selectionEnd, int alpha) {
+RECT drawRunTextGDIP(long graphics, StyleItem run, RECT rect, long gdipFont, int baselineInPixels, long color, long selectionColor, int selectionStart, int selectionEnd, int alpha) {
int end = run.start + run.length - 1;
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= run.start && selectionEnd >= end;
@@ -1060,7 +1084,7 @@ RECT drawRunTextGDIP(long /*int*/ graphics, StyleItem run, RECT rect, long /*int
int drawY = rect.top + baselineInPixels;
if (run.style != null && run.style.rise != 0) drawY -= DPIUtil.autoScaleUp(getDevice(), run.style.rise);
int drawX = rect.left;
- long /*int*/ brush = color;
+ long brush = color;
if (fullSelection) {
brush = selectionColor;
} else {
@@ -1137,10 +1161,10 @@ RECT drawRunTextGDIP(long /*int*/ graphics, StyleItem run, RECT rect, long /*int
return fullSelection || partialSelection ? rect : null;
}
-RECT drawRunTextGDIPRaster(long /*int*/ graphics, StyleItem run, RECT rect, int baselineInPixels, int color, int selectionColor, int selectionStart, int selectionEnd) {
- long /*int*/ clipRgn = 0;
+RECT drawRunTextGDIPRaster(long graphics, StyleItem run, RECT rect, int baselineInPixels, int color, int selectionColor, int selectionStart, int selectionEnd) {
+ long clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
- long /*int*/ rgn = Gdip.Region_new();
+ long rgn = Gdip.Region_new();
if (rgn == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(graphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, graphics)) {
@@ -1149,7 +1173,7 @@ RECT drawRunTextGDIPRaster(long /*int*/ graphics, StyleItem run, RECT rect, int
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(graphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -1157,7 +1181,7 @@ RECT drawRunTextGDIPRaster(long /*int*/ graphics, StyleItem run, RECT rect, int
Gdip.Matrix_GetElements(matrix, lpXform);
}
Gdip.Matrix_delete(matrix);
- long /*int*/ hdc = Gdip.Graphics_GetHDC(graphics);
+ long hdc = Gdip.Graphics_GetHDC(graphics);
int state = OS.SaveDC(hdc);
if (lpXform != null) {
OS.SetGraphicsMode(hdc, OS.GM_ADVANCED);
@@ -1177,14 +1201,14 @@ RECT drawRunTextGDIPRaster(long /*int*/ graphics, StyleItem run, RECT rect, int
return pRect;
}
-RECT drawStrikeout(long /*int*/ hdc, int x, int baselineInPixels, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawStrikeout(long hdc, int x, int baselineInPixels, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
if (!style.strikeout) return null;
clipRect = addClipRect(run, clipRect, pRect, selectionStart, selectionEnd);
boolean lastRunVisible = drawClip != null && (x + run.x + run.width) > (drawClip.x + drawClip.width);
- if (index + 1 >= line.length || lastRunVisible || !style.isAdherentStrikeout(line[index + 1].style)) {
+ if (index + 1 >= line.length || lastRunVisible || line[index + 1].lineBreak || !style.isAdherentStrikeout(line[index + 1].style)) {
int left = run.x;
int start = run.start;
int end = run.start + run.length - 1;
@@ -1211,11 +1235,11 @@ RECT drawStrikeout(long /*int*/ hdc, int x, int baselineInPixels, StyleItem[] li
RECT rect = new RECT();
int riseInPixels = DPIUtil.autoScaleUp(getDevice(), style.rise);
OS.SetRect(rect, x + left, baselineInPixels - run.strikeoutPos - riseInPixels, x + run.x + run.width, baselineInPixels - run.strikeoutPos + run.strikeoutThickness - riseInPixels);
- long /*int*/ brush = OS.CreateSolidBrush(color);
+ long brush = OS.CreateSolidBrush(color);
OS.FillRect(hdc, rect, brush);
OS.DeleteObject(brush);
if (clipRect != null) {
- long /*int*/ selBrush = OS.CreateSolidBrush(selectionColor);
+ long selBrush = OS.CreateSolidBrush(selectionColor);
if (clipRect.left == -1) clipRect.left = 0;
if (clipRect.right == -1) clipRect.right = 0x7ffff;
OS.SetRect(clipRect, Math.max(rect.left, clipRect.left), rect.top, Math.min(rect.right, clipRect.right), rect.bottom);
@@ -1227,14 +1251,14 @@ RECT drawStrikeout(long /*int*/ hdc, int x, int baselineInPixels, StyleItem[] li
return clipRect;
}
-RECT drawStrikeoutGDIP(long /*int*/ graphics, int x, int baselineInPixels, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawStrikeoutGDIP(long graphics, int x, int baselineInPixels, StyleItem[] line, int index, long color, long selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
if (!style.strikeout) return null;
clipRect = addClipRect(run, clipRect, pRect, selectionStart, selectionEnd);
boolean lastRunVisible = drawClip != null && (x + run.x + run.width) > (drawClip.x + drawClip.width);
- if (index + 1 >= line.length || lastRunVisible || !style.isAdherentStrikeout(line[index + 1].style)) {
+ if (index + 1 >= line.length || lastRunVisible || line[index + 1].lineBreak || !style.isAdherentStrikeout(line[index + 1].style)) {
int left = run.x;
int start = run.start;
int end = run.start + run.length - 1;
@@ -1245,7 +1269,7 @@ RECT drawStrikeoutGDIP(long /*int*/ graphics, int x, int baselineInPixels, Style
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- long /*int*/ brush = color;
+ long brush = color;
if (style.strikeoutColor != null) {
brush = createGdipBrush(style.strikeoutColor, alpha);
clipRect = null;
@@ -1285,14 +1309,14 @@ RECT drawStrikeoutGDIP(long /*int*/ graphics, int x, int baselineInPixels, Style
return clipRect;
}
-RECT drawUnderline(long /*int*/ hdc, int x, int baselineInPixels, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
+RECT drawUnderline(long hdc, int x, int baselineInPixels, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, int color, int selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
if (!style.underline) return null;
clipRect = addClipRect(run, clipRect, pRect, selectionStart, selectionEnd);
boolean lastRunVisible = drawClip != null && (x + run.x + run.width) > (drawClip.x + drawClip.width);
- if (index + 1 >= line.length || lastRunVisible || !style.isAdherentUnderline(line[index + 1].style)) {
+ if (index + 1 >= line.length || lastRunVisible || line[index + 1].lineBreak || !style.isAdherentUnderline(line[index + 1].style)) {
int left = run.x;
int start = run.start;
int end = run.start + run.length - 1;
@@ -1331,8 +1355,8 @@ RECT drawUnderline(long /*int*/ hdc, int x, int baselineInPixels, int lineUnderl
int squigglyHeight = 2 * squigglyThickness;
int squigglyY = Math.min(rect.top - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
int[] points = computePolyline(rect.left, squigglyY, rect.right, squigglyY + squigglyHeight);
- long /*int*/ pen = OS.CreatePen(OS.PS_SOLID, squigglyThickness, color);
- long /*int*/ oldPen = OS.SelectObject(hdc, pen);
+ long pen = OS.CreatePen(OS.PS_SOLID, squigglyThickness, color);
+ long oldPen = OS.SelectObject(hdc, pen);
int state = OS.SaveDC(hdc);
OS.IntersectClipRect(hdc, rect.left, squigglyY, rect.right + 1, squigglyY + squigglyHeight + 1);
OS.Polyline(hdc, points, points.length / 2);
@@ -1371,7 +1395,7 @@ RECT drawUnderline(long /*int*/ hdc, int x, int baselineInPixels, int lineUnderl
OS.OffsetRect(rect, 0, lineBottom - bottom);
if (clipRect != null) OS.OffsetRect(clipRect, 0, lineBottom - bottom);
}
- long /*int*/ brush = OS.CreateSolidBrush(color);
+ long brush = OS.CreateSolidBrush(color);
OS.FillRect(hdc, rect, brush);
if (style.underlineStyle == SWT.UNDERLINE_DOUBLE) {
OS.SetRect(rect, rect.left, rect.top + run.underlineThickness * 2, rect.right, rect.bottom + run.underlineThickness * 2);
@@ -1379,7 +1403,7 @@ RECT drawUnderline(long /*int*/ hdc, int x, int baselineInPixels, int lineUnderl
}
OS.DeleteObject(brush);
if (clipRect != null) {
- long /*int*/ selBrush = OS.CreateSolidBrush(selectionColor);
+ long selBrush = OS.CreateSolidBrush(selectionColor);
OS.FillRect(hdc, clipRect, selBrush);
if (style.underlineStyle == SWT.UNDERLINE_DOUBLE) {
OS.SetRect(clipRect, clipRect.left, rect.top, clipRect.right, rect.bottom);
@@ -1391,8 +1415,8 @@ RECT drawUnderline(long /*int*/ hdc, int x, int baselineInPixels, int lineUnderl
case UNDERLINE_IME_DASH:
case UNDERLINE_IME_DOT: {
int penStyle = style.underlineStyle == UNDERLINE_IME_DASH ? OS.PS_DASH : OS.PS_DOT;
- long /*int*/ pen = OS.CreatePen(penStyle, 1, color);
- long /*int*/ oldPen = OS.SelectObject(hdc, pen);
+ long pen = OS.CreatePen(penStyle, 1, color);
+ long oldPen = OS.SelectObject(hdc, pen);
int descentInPixels = DPIUtil.autoScaleUp(getDevice(), run.descentInPoints);
OS.SetRect(rect, rect.left, baselineInPixels + descentInPixels, rect.right, baselineInPixels + descentInPixels + run.underlineThickness);
OS.MoveToEx(hdc, rect.left, rect.top, 0);
@@ -1416,14 +1440,14 @@ RECT drawUnderline(long /*int*/ hdc, int x, int baselineInPixels, int lineUnderl
return clipRect;
}
-RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baselineInPixels, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, long /*int*/ color, long /*int*/ selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
+RECT drawUnderlineGDIP (long graphics, int x, int baselineInPixels, int lineUnderlinePos, int lineBottom, StyleItem[] line, int index, long color, long selectionColor, RECT clipRect, RECT pRect, int selectionStart, int selectionEnd, int alpha, Rectangle drawClip) {
StyleItem run = line[index];
TextStyle style = run.style;
if (style == null) return null;
if (!style.underline) return null;
clipRect = addClipRect(run, clipRect, pRect, selectionStart, selectionEnd);
boolean lastRunVisible = drawClip != null && (x + run.x + run.width) > (drawClip.x + drawClip.width);
- if (index + 1 >= line.length || lastRunVisible || !style.isAdherentUnderline(line[index + 1].style)) {
+ if (index + 1 >= line.length || lastRunVisible || line[index + 1].lineBreak || !style.isAdherentUnderline(line[index + 1].style)) {
int left = run.x;
int start = run.start;
int end = run.start + run.length - 1;
@@ -1434,7 +1458,7 @@ RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baselineInPixels, int
}
boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
boolean fullSelection = hasSelection && selectionStart <= start && end <= selectionEnd;
- long /*int*/ brush = color;
+ long brush = color;
if (style.underlineColor != null) {
brush = createGdipBrush(style.underlineColor, alpha);
clipRect = null;
@@ -1473,7 +1497,7 @@ RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baselineInPixels, int
int squigglyHeight = 2 * squigglyThickness;
int squigglyY = Math.min(rect.top - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
int[] points = computePolyline(rect.left, squigglyY, rect.right, squigglyY + squigglyHeight);
- long /*int*/ pen = Gdip.Pen_new(brush, squigglyThickness);
+ long pen = Gdip.Pen_new(brush, squigglyThickness);
gstate = Gdip.Graphics_Save(graphics);
if (gdipRect != null) {
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeExclude);
@@ -1487,7 +1511,7 @@ RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baselineInPixels, int
}
Gdip.Graphics_DrawLines(graphics, pen, points, points.length / 2);
if (gdipRect != null) {
- long /*int*/ selPen = Gdip.Pen_new(selectionColor, squigglyThickness);
+ long selPen = Gdip.Pen_new(selectionColor, squigglyThickness);
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
@@ -1538,7 +1562,7 @@ RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baselineInPixels, int
break;
case UNDERLINE_IME_DOT:
case UNDERLINE_IME_DASH: {
- long /*int*/ pen = Gdip.Pen_new(brush, 1);
+ long pen = Gdip.Pen_new(brush, 1);
int dashStyle = style.underlineStyle == UNDERLINE_IME_DOT ? Gdip.DashStyleDot : Gdip.DashStyleDash;
Gdip.Pen_SetDashStyle(pen, dashStyle);
if (gdipRect != null) {
@@ -1551,7 +1575,7 @@ RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baselineInPixels, int
Gdip.Graphics_Restore(graphics, gstate);
gstate = Gdip.Graphics_Save(graphics);
Gdip.Graphics_SetClip(graphics, gdipRect, Gdip.CombineModeIntersect);
- long /*int*/ selPen = Gdip.Pen_new(brush, 1);
+ long selPen = Gdip.Pen_new(brush, 1);
Gdip.Pen_SetDashStyle(selPen, dashStyle);
Gdip.Graphics_DrawLine(graphics, selPen, rect.left, baselineInPixels + descentInPixels, run.width - run.length, baselineInPixels + descentInPixels);
Gdip.Graphics_Restore(graphics, gstate);
@@ -1571,8 +1595,7 @@ RECT drawUnderlineGDIP (long /*int*/ graphics, int x, int baselineInPixels, int
void freeRuns () {
if (allRuns == null) return;
- for (int i=0; i<allRuns.length; i++) {
- StyleItem run = allRuns[i];
+ for (StyleItem run : allRuns) {
run.free();
}
allRuns = null;
@@ -1707,10 +1730,8 @@ Rectangle getBoundsInPixels (int start, int end) {
GlyphMetrics metrics = run.style.metrics;
cx = metrics.getWidthInPixels() * (start - run.start);
} else if (!run.tab) {
- int[] piX = new int[1];
- long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
- OS.ScriptCPtoX(start - run.start, false, run.length, run.glyphCount, run.clusters, run.visAttrs, advances, run.analysis, piX);
- cx = isRTL ? run.width - piX[0] : piX[0];
+ int iX = ScriptCPtoX(start - run.start, false, run);
+ cx = isRTL ? run.width - iX : iX;
}
if (run.analysis.fRTL ^ isRTL) {
runTrail = run.x + cx;
@@ -1724,10 +1745,8 @@ Rectangle getBoundsInPixels (int start, int end) {
GlyphMetrics metrics = run.style.metrics;
cx = metrics.getWidthInPixels() * (end - run.start + 1);
} else if (!run.tab) {
- int[] piX = new int[1];
- long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
- OS.ScriptCPtoX(end - run.start, true, run.length, run.glyphCount, run.clusters, run.visAttrs, advances, run.analysis, piX);
- cx = isRTL ? run.width - piX[0] : piX[0];
+ int iX = ScriptCPtoX(end - run.start, true, run);
+ cx = isRTL ? run.width - iX : iX;
}
if (run.analysis.fRTL ^ isRTL) {
runLead = run.x + cx;
@@ -1817,7 +1836,7 @@ public boolean getJustify () {
return justify;
}
-long /*int*/ getItemFont (StyleItem item) {
+long getItemFont (StyleItem item) {
if (item.fallbackFont != 0) return item.fallbackFont;
if (item.style != null && item.style.font != null) {
return item.style.font.handle;
@@ -1975,8 +1994,8 @@ public FontMetrics getLineMetrics (int lineIndex) {
checkLayout();
computeRuns(null);
if (!(0 <= lineIndex && lineIndex < runs.length)) SWT.error(SWT.ERROR_INVALID_RANGE);
- long /*int*/ hDC = device.internal_new_GC(null);
- long /*int*/ srcHdc = OS.CreateCompatibleDC(hDC);
+ long hDC = device.internal_new_GC(null);
+ long srcHdc = OS.CreateCompatibleDC(hDC);
TEXTMETRIC lptm = new TEXTMETRIC();
OS.SelectObject(srcHdc, font != null ? font.handle : device.systemFont.handle);
OS.GetTextMetrics(srcHdc, lptm);
@@ -1987,9 +2006,7 @@ public FontMetrics getLineMetrics (int lineIndex) {
int descentInPoints = DPIUtil.autoScaleDown(getDevice(), Math.max(lptm.tmDescent, this.descentInPixels));
int leadingInPoints = DPIUtil.autoScaleDown(getDevice(), lptm.tmInternalLeading);
if (text.length() != 0) {
- StyleItem[] lineRuns = runs[lineIndex];
- for (int i = 0; i<lineRuns.length; i++) {
- StyleItem run = lineRuns[i];
+ for (StyleItem run : runs[lineIndex]) {
if (run.ascentInPoints > ascentInPoints) {
ascentInPoints = run.ascentInPoints;
leadingInPoints = run.leadingInPoints;
@@ -2100,12 +2117,8 @@ Point getLocationInPixels (int offset, boolean trailing) {
width = (trailing || (offset == length)) ? run.width : 0;
} else {
int runOffset = offset - run.start;
- int cChars = run.length;
- int gGlyphs = run.glyphCount;
- int[] piX = new int[1];
- long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
- OS.ScriptCPtoX(runOffset, trailing, cChars, gGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piX);
- width = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - piX[0] : piX[0];
+ final int iX = ScriptCPtoX(runOffset, trailing, run);
+ width = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - iX : iX;
}
return new Point(run.x + width, DPIUtil.autoScaleUp(getDevice(), lineY[line]) + getScaledVerticalIndent());
}
@@ -2114,6 +2127,24 @@ Point getLocationInPixels (int offset, boolean trailing) {
}
/**
+ * Wrapper around
+ * {@link OS#ScriptCPtoX(int, boolean, int, int, long, long, long, SCRIPT_ANALYSIS, int[])}
+ * to handle common arguments consistently.
+ *
+ * @param characterPosition the first argument of OS.ScriptCPtoX
+ * @param trailing the first argument of OS.ScriptCPtoX
+ * @param run used to define remaining arguments of OS.ScriptCPtoX
+ * @return x position of the caret.
+ */
+private int ScriptCPtoX(int characterPosition, boolean trailing, StyleItem run) {
+ int[] piX = new int[1];
+ long advances = run.justify != 0 ? run.justify : run.advances;
+ OS.ScriptCPtoX(characterPosition, trailing, run.length, run.glyphCount, run.clusters, run.visAttrs, advances,
+ run.analysis, piX);
+ return piX[0];
+}
+
+/**
* Returns the next offset for the specified offset and movement
* type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>,
* <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>,
@@ -2320,7 +2351,7 @@ int getOffsetInPixels (int x, int y, int[] trailing) {
if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {
xRun = run.width - xRun;
}
- long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
+ long advances = run.justify != 0 ? run.justify : run.advances;
OS.ScriptXtoCP(xRun, cChars, cGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piCP, piTrailing);
int offset = run.start + piCP[0];
int length = segmentsText.length();
@@ -2372,16 +2403,12 @@ void getPartialSelection(StyleItem run, int selectionStart, int selectionEnd, RE
int end = run.start + run.length - 1;
int selStart = Math.max(selectionStart, run.start) - run.start;
int selEnd = Math.min(selectionEnd, end) - run.start;
- int cChars = run.length;
- int gGlyphs = run.glyphCount;
- int[] piX = new int[1];
int x = rect.left;
- long /*int*/ advances = run.justify != 0 ? run.justify : run.advances;
- OS.ScriptCPtoX(selStart, false, cChars, gGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piX);
- int runX = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - piX[0] : piX[0];
+ int iX = ScriptCPtoX(selStart, false, run);
+ int runX = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - iX : iX;
rect.left = x + runX;
- OS.ScriptCPtoX(selEnd, true, cChars, gGlyphs, run.clusters, run.visAttrs, advances, run.analysis, piX);
- runX = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - piX[0] : piX[0];
+ iX = ScriptCPtoX(selEnd, true, run);
+ runX = (orientation & SWT.RIGHT_TO_LEFT) != 0 ? run.width - iX : iX;
rect.right = x + runX;
}
@@ -2718,27 +2745,45 @@ StyleItem[] itemize () {
scriptState.fArabicNumContext = true;
}
- /*
- * In the version of Usp10.h that SWT is compiled the fReserved field is declared
- * as a bitfield size 8. In newer versions of the Uniscribe, the first bit of fReserved
- * was used to implement the fMergeNeutralItems feature which can be used to increase
- * performance by reducing the number of SCRIPT_ITEM returned by ScriptItemize.
- *
- * Note: This code is wrong on a big endian machine.
- *
- * Note: This code is intentionally commented because it causes bug#377472.
- */
-// scriptControl.fReserved = 0x1;
-
- OS.ScriptApplyDigitSubstitution(null, scriptControl, scriptState);
+ OS.ScriptApplyDigitSubstitution(0, scriptControl, scriptState);
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, MAX_ITEM * SCRIPT_ITEM.sizeof);
+ long hHeap = OS.GetProcessHeap();
+ // This buffer needs to be one entry bigger than the cMaxItems param to ScriptItemize
+ // see https://docs.microsoft.com/en-us/windows/win32/api/usp10/nf-usp10-scriptitemize
+ // and https://bugzilla.mozilla.org/show_bug.cgi?id=366643 which was a similar bug
+ // in Mozilla. The MSDN docs have been updated since the Mozilla bug to make this clear
+ long pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, (1 + MAX_ITEM) * SCRIPT_ITEM.sizeof);
if (pItems == 0) SWT.error(SWT.ERROR_NO_HANDLES);
int[] pcItems = new int[1];
char[] chars = new char[length];
segmentsText.getChars(0, length, chars, 0);
+ // enable font ligatures
+ scriptControl.fMergeNeutralItems = true;
+ /*
+ * With font ligatures enabled: CJK characters are not rendered properly when
+ * used in Java comments, workaround is to avoid ligatures between ascii and
+ * non-ascii chars. For more details refer bug 565526
+ */
+ for (int i = 0, latestNeutralIndex = -2, latestUnicodeIndex = -2; i < length; i++) {
+ char c = chars[i];
+
+ if (c >= ' ' && c <= '~' && !Character.isAlphabetic(c)) {
+ latestNeutralIndex = i;
+ } else if (c > 255) {
+ latestUnicodeIndex = i;
+ } else {
+ continue;
+ }
+
+ // If the latest neutral and unicode characters are adjacent
+ if (Math.abs(latestNeutralIndex - latestUnicodeIndex) == 1) {
+ // Change the neutral into a non-neutral alphabet character
+ chars[latestNeutralIndex] = 'A';
+ }
+ }
+
OS.ScriptItemize(chars, length, MAX_ITEM, scriptControl, scriptState, pItems, pcItems);
+
// if (hr == E_OUTOFMEMORY) //TODO handle it
StyleItem[] runs = merge(pItems, pcItems[0]);
@@ -2749,14 +2794,19 @@ StyleItem[] itemize () {
/*
* Merge styles ranges and script items
*/
-StyleItem[] merge (long /*int*/ items, int itemCount) {
+StyleItem[] merge (long items, int itemCount) {
if (styles.length > stylesCount) {
StyleItem[] newStyles = new StyleItem[stylesCount];
System.arraycopy(styles, 0, newStyles, 0, stylesCount);
styles = newStyles;
}
- int count = 0, start = 0, end = segmentsText.length(), itemIndex = 0, styleIndex = 0;
- StyleItem[] runs = new StyleItem[itemCount + stylesCount];
+ final int end = segmentsText.length();
+ int start = 0, itemIndex = 0, styleIndex = 0;
+ /*
+ * Maximum size of runs is each itemized item + each style needing its own run +
+ * enough space for splitting runs that are too long.
+ */
+ List<StyleItem> runs = new ArrayList<>(itemCount + stylesCount + (end + MAX_RUN_LENGTH - 1) / MAX_RUN_LENGTH);
SCRIPT_ITEM scriptItem = new SCRIPT_ITEM();
int itemLimit = -1;
int nextItemIndex = 0;
@@ -2767,7 +2817,7 @@ StyleItem[] merge (long /*int*/ items, int itemCount) {
StyleItem item = new StyleItem();
item.start = start;
item.style = styles[styleIndex].style;
- runs[count++] = item;
+ runs.add(item);
OS.MoveMemory(scriptItem, items + itemIndex * SCRIPT_ITEM.sizeof, SCRIPT_ITEM.sizeof);
item.analysis = scriptItem.a;
scriptItem.a = new SCRIPT_ANALYSIS();
@@ -2794,6 +2844,13 @@ StyleItem[] merge (long /*int*/ items, int itemCount) {
OS.MoveMemory(scriptItem, items + nextItemIndex * SCRIPT_ITEM.sizeof, SCRIPT_ITEM.sizeof);
itemLimit = scriptItem.iCharPos;
}
+
+ /*
+ * This block merges a bunch of tabs or non-complex scripts into a single item
+ * run. This is done so that less item runs are needed and is used when there
+ * could be a performance penalty because of too many runs.
+ * The tabs need to be "restored", see computeRuns
+ */
if (nextItemIndex < itemCount && merge) {
if (!item.lineBreak) {
OS.MoveMemory(sp, device.scripts[item.analysis.eScript], SCRIPT_PROPERTIES.sizeof);
@@ -2814,20 +2871,28 @@ StyleItem[] merge (long /*int*/ items, int itemCount) {
}
}
+ boolean mayNeedSplit = true;
int styleLimit = translateOffset(styles[styleIndex + 1].start);
if (styleLimit <= itemLimit) {
- styleIndex++;
- start = styleLimit;
- if (start < itemLimit && 0 < start && start < end) {
- char pChar = segmentsText.charAt(start - 1);
- char tChar = segmentsText.charAt(start);
- if (Character.isLetter(pChar) && Character.isLetter(tChar)) {
- item.analysis.fLinkAfter = true;
- linkBefore = true;
+ int runLen = styleLimit - start;
+ if (runLen < MAX_RUN_LENGTH) {
+ mayNeedSplit = false;
+ styleIndex++;
+ start = styleLimit;
+ if (start < itemLimit && 0 < start && start < end) {
+ char pChar = segmentsText.charAt(start - 1);
+ char tChar = segmentsText.charAt(start);
+ if (Character.isLetter(pChar) && Character.isLetter(tChar)) {
+ item.analysis.fLinkAfter = true;
+ linkBefore = true;
+ }
}
}
}
- if (itemLimit <= styleLimit) {
+ int runLen = itemLimit - start;
+ if (mayNeedSplit && runLen > MAX_RUN_LENGTH) {
+ start += splitLongRun(item);
+ } else if (itemLimit <= styleLimit) {
itemIndex = nextItemIndex;
start = itemLimit;
itemLimit = -1;
@@ -2838,13 +2903,43 @@ StyleItem[] merge (long /*int*/ items, int itemCount) {
item.start = end;
OS.MoveMemory(scriptItem, items + itemCount * SCRIPT_ITEM.sizeof, SCRIPT_ITEM.sizeof);
item.analysis = scriptItem.a;
- runs[count++] = item;
- if (runs.length != count) {
- StyleItem[] result = new StyleItem[count];
- System.arraycopy(runs, 0, result, 0, count);
- return result;
+ runs.add(item);
+ return runs.toArray(StyleItem[]::new);
+}
+
+/**
+ * Use OS.ScriptBreak to identify where in the run it is safe to split a character.
+ * @param run the run to split
+ * @return how many characters into the run is the best place to split
+ */
+int splitLongRun(StyleItem run) {
+ run.length = MAX_RUN_LENGTH;
+ breakRun(run);
+ SCRIPT_LOGATTR logAttr = new SCRIPT_LOGATTR();
+ int best = MAX_RUN_LENGTH;
+ for (int i = MAX_RUN_LENGTH - 1; i >= MAX_RUN_LENGTH - MAX_SEARCH_RUN_BREAK; i--) {
+ int memoryIndex = i * SCRIPT_LOGATTR.sizeof;
+ if (memoryIndex + SCRIPT_LOGATTR.sizeof > run.pslaAllocSize) {
+ throw new IndexOutOfBoundsException();
+ }
+ OS.MoveMemory(logAttr, run.psla + memoryIndex, SCRIPT_LOGATTR.sizeof);
+ if (logAttr.fSoftBreak || logAttr.fWhiteSpace || logAttr.fWordStop) {
+ best = i;
+ break;
+ }
}
- return runs;
+
+ /*
+ * In the improbable case that the entire run has nowhere to split we need to
+ * make sure that at least we don't split a surrogate pair. This can happen
+ * if ScriptBreak above identifies nowhere that can be split, and the last
+ * character is the first part of a surrogate pair.
+ */
+ if (Character.isHighSurrogate(segmentsText.charAt(run.start + best - 1))) {
+ best--;
+ }
+
+ return best;
}
/*
@@ -3414,7 +3509,7 @@ void setWrapIndentInPixels (int wrapIndent) {
this.wrapIndent = wrapIndent;
}
-boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount, int maxGlyphs, SCRIPT_PROPERTIES sp) {
+boolean shape (long hdc, StyleItem run, char[] chars, int[] glyphCount, int maxGlyphs, SCRIPT_PROPERTIES sp) {
boolean useCMAPcheck = !sp.fComplex && !run.analysis.fNoGlyphIndex;
if (useCMAPcheck) {
short[] glyphs = new short[chars.length];
@@ -3422,16 +3517,23 @@ boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new long /*int*/ [1], C.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long [1], C.PTR_SIZEOF);
}
return false;
}
}
- int hr = OS.ScriptShape(hdc, run.psc, chars, chars.length, maxGlyphs, run.analysis, run.glyphs, run.clusters, run.visAttrs, glyphCount);
- run.glyphCount = glyphCount[0];
- if (useCMAPcheck) return true;
+ int scriptShaprHr = OS.ScriptShape(hdc, run.psc, chars, chars.length, maxGlyphs, run.analysis, run.glyphs,
+ run.clusters, run.visAttrs, glyphCount);
+ if (scriptShaprHr == OS.S_OK) {
+ run.glyphCount = glyphCount[0];
+ if (useCMAPcheck) return true;
- if (hr != OS.USP_E_SCRIPT_NOT_IN_FONT) {
+ /*
+ * scriptShapeHr could have been OS.USP_E_SCRIPT_NOT_IN_FONT which indicates
+ * the whole run doesn't work with the font. The rest of this method verifies that
+ * none of the individual glyphs are missing an entry in the font.
+ * The fallback is to try other fonts (See caller)
+ */
if (run.analysis.fNoGlyphIndex) return true;
SCRIPT_FONTPROPERTIES fp = new SCRIPT_FONTPROPERTIES ();
fp.cBytes = SCRIPT_FONTPROPERTIES.sizeof;
@@ -3447,14 +3549,14 @@ boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new long /*int*/ [1], C.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long [1], C.PTR_SIZEOF);
}
run.glyphCount = 0;
return false;
}
-long /*int*/ createMetafileWithChars(long /*int*/ hdc, long /*int*/ hFont, char[] chars, int charCount) {
- long /*int*/ hHeap = OS.GetProcessHeap();
+long createMetafileWithChars(long hdc, long hFont, char[] chars, int charCount) {
+ long hHeap = OS.GetProcessHeap();
/*
* The native string must remain unchanged between ScriptStringAnalyse and ScriptStringOut.
@@ -3466,12 +3568,12 @@ long /*int*/ createMetafileWithChars(long /*int*/ hdc, long /*int*/ hFont, char[
* temporary native string which will be deallocated upon return from ScriptStringAnalyse.
*/
int nativeStringSize = charCount * Character.BYTES;
- long /*int*/ nativeString = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, nativeStringSize);
+ long nativeString = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, nativeStringSize);
OS.MoveMemory (nativeString, chars, nativeStringSize);
- long /*int*/ ssa = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.SCRIPT_STRING_ANALYSIS_sizeof());
- long /*int*/ metaFileDc = OS.CreateEnhMetaFile(hdc, null, null, null);
- long /*int*/ oldMetaFont = OS.SelectObject(metaFileDc, hFont);
+ long ssa = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.SCRIPT_STRING_ANALYSIS_sizeof());
+ long metaFileDc = OS.CreateEnhMetaFile(hdc, null, null, null);
+ long oldMetaFont = OS.SelectObject(metaFileDc, hFont);
int flags = OS.SSA_METAFILE | OS.SSA_FALLBACK | OS.SSA_GLYPHS | OS.SSA_LINK;
if (OS.ScriptStringAnalyse(metaFileDc, nativeString, charCount, 0, -1, flags, 0, null, null, 0, 0, 0, ssa) == OS.S_OK) {
OS.ScriptStringOut(ssa, 0, 0, 0, null, 0, 0, false);
@@ -3486,7 +3588,7 @@ long /*int*/ createMetafileWithChars(long /*int*/ hdc, long /*int*/ hFont, char[
/*
* Generate glyphs for one Run.
*/
-void shape (final long /*int*/ hdc, final StyleItem run) {
+void shape (final long hdc, final StyleItem run) {
if (run.lineBreak) return;
if (run.glyphs != 0) return;
final int[] buffer = new int[1];
@@ -3494,7 +3596,7 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
segmentsText.getChars(run.start, run.start + run.length, chars, 0);
final int maxGlyphs = (chars.length * 3 / 2) + 16;
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
run.glyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * 2);
if (run.glyphs == 0) SWT.error(SWT.ERROR_NO_HANDLES);
run.clusters = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * 2);
@@ -3514,8 +3616,8 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
}
}
if (!shapeSucceed) {
- long /*int*/ hFont = OS.GetCurrentObject(hdc, OS.OBJ_FONT);
- long /*int*/ newFont = 0;
+ long hFont = OS.GetCurrentObject(hdc, OS.OBJ_FONT);
+ long newFont = 0;
/*
* Bug in Uniscribe. In some version of Uniscribe, ScriptStringAnalyse crashes
* when the character array is too long. The fix is to limit the size of character
@@ -3534,10 +3636,10 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
}
}
if (count > 0) {
- long /*int*/ metaFile = createMetafileWithChars(hdc, hFont, sampleChars, count);
+ long metaFile = createMetafileWithChars(hdc, hFont, sampleChars, count);
final EMREXTCREATEFONTINDIRECTW emr = new EMREXTCREATEFONTINDIRECTW();
class MetaFileEnumProc {
- long /*int*/ metaFileEnumProc (long /*int*/ hDC, long /*int*/ table, long /*int*/ record, long /*int*/ nObj, long /*int*/ lpData) {
+ long metaFileEnumProc (long hDC, long table, long record, long nObj, long lpData) {
OS.MoveMemory(emr.emr, record, EMR.sizeof);
switch (emr.emr.iType) {
case OS.EMR_EXTCREATEFONTINDIRECTW:
@@ -3554,9 +3656,7 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
boolean compilerWarningWorkaround = false;
if (compilerWarningWorkaround) object.metaFileEnumProc(0, 0, 0, 0, 0);
Callback callback = new Callback(object, "metaFileEnumProc", 5);
- long /*int*/ address = callback.getAddress();
- if (address == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- OS.EnumEnhMetaFile(0, metaFile, address, 0, null);
+ OS.EnumEnhMetaFile(0, metaFile, callback.getAddress(), 0, null);
OS.DeleteEnhMetaFile(metaFile);
callback.dispose();
newFont = OS.CreateFontIndirect(emr.elfw.elfLogFont);
@@ -3573,7 +3673,7 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
if (index > 0) {
StyleItem pRun = allRuns[index - 1];
if (pRun.analysis.eScript == run.analysis.eScript) {
- long /*int*/ pFont = getItemFont(pRun);
+ long pFont = getItemFont(pRun);
LOGFONT logFont = new LOGFONT ();
OS.GetObject(pFont, LOGFONT.sizeof, logFont);
newFont = OS.CreateFontIndirect(logFont);
@@ -3585,7 +3685,7 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
if (nRun.analysis.eScript == run.analysis.eScript) {
OS.SelectObject(hdc, getItemFont(nRun));
shape(hdc, nRun);
- long /*int*/ nFont = getItemFont(nRun);
+ long nFont = getItemFont(nRun);
LOGFONT logFont = new LOGFONT ();
OS.GetObject(nFont, LOGFONT.sizeof, logFont);
newFont = OS.CreateFontIndirect(logFont);
@@ -3614,19 +3714,16 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
}
}
if (!shapeSucceed) {
- if (mLangFontLink2 != 0) {
- long /*int*/[] hNewFont = new long /*int*/[1];
+ if (mLangFontLink2 != null) {
+ long [] hNewFont = new long [1];
int[] dwCodePages = new int[1], cchCodePages = new int[1];
- /* GetStrCodePages() */
- OS.VtblCall(4, mLangFontLink2, chars, chars.length, 0, dwCodePages, cchCodePages);
- /* MapFont() */
- if (OS.VtblCall(10, mLangFontLink2, hdc, dwCodePages[0], chars[0], hNewFont) == OS.S_OK) {
+ mLangFontLink2.GetStrCodePages(chars, chars.length, 0, dwCodePages, cchCodePages);
+ if (mLangFontLink2.MapFont(hdc, dwCodePages[0], chars[0], hNewFont) == OS.S_OK) {
LOGFONT logFont = new LOGFONT ();
OS.GetObject(hNewFont[0], LOGFONT.sizeof, logFont);
- /* ReleaseFont() */
- OS.VtblCall(8, mLangFontLink2, hNewFont[0]);
- long /*int*/ mLangFont = OS.CreateFontIndirect(logFont);
- long /*int*/ oldFont = OS.SelectObject(hdc, mLangFont);
+ mLangFontLink2.ReleaseFont(hNewFont[0]);
+ long mLangFont = OS.CreateFontIndirect(logFont);
+ long oldFont = OS.SelectObject(hdc, mLangFont);
if (shapeSucceed = shape(hdc, run, chars, buffer, maxGlyphs, sp)) {
run.fallbackFont = mLangFont;
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
index 29de64d3f2..f1294d59f2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
@@ -49,7 +49,7 @@ public class Transform extends Resource {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
/**
* Constructs a new identity Transform.
@@ -147,7 +147,8 @@ public Transform(Device device, float[] elements) {
public Transform (Device device, float m11, float m12, float m21, float m22, float dx, float dy) {
super(device);
this.device.checkGDIP();
- handle = Gdip.Matrix_new(m11, m12, m21, m22, DPIUtil.autoScaleUp(dx), DPIUtil.autoScaleUp(dy));
+ handle = Gdip.Matrix_new(m11, m12, m21, m22,
+ DPIUtil.autoScaleUp(this.device, dx), DPIUtil.autoScaleUp(this.device, dy));
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
init();
}
@@ -183,8 +184,9 @@ public void getElements(float[] elements) {
if (elements == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (elements.length < 6) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
Gdip.Matrix_GetElements(handle, elements);
- elements[4] = DPIUtil.autoScaleDown(elements[4]);
- elements[5] = DPIUtil.autoScaleDown(elements[5]);
+ Drawable drawable = getDevice();
+ elements[4] = DPIUtil.autoScaleDown(drawable, elements[4]);
+ elements[5] = DPIUtil.autoScaleDown(drawable, elements[5]);
}
/**
@@ -315,7 +317,9 @@ public void scale(float scaleX, float scaleY) {
*/
public void setElements(float m11, float m12, float m21, float m22, float dx, float dy) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- Gdip.Matrix_SetElements(handle, m11, m12, m21, m22, DPIUtil.autoScaleUp(dx), DPIUtil.autoScaleUp(dy));
+ Drawable drawable = getDevice();
+ Gdip.Matrix_SetElements(handle, m11, m12, m21, m22,
+ DPIUtil.autoScaleUp(drawable, dx), DPIUtil.autoScaleUp(drawable, dy));
}
/**
@@ -354,12 +358,13 @@ public void transform(float[] pointArray) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
int length = pointArray.length;
+ Drawable drawable = getDevice();
for (int i = 0; i < length; i++) {
- pointArray[i] = DPIUtil.autoScaleUp(pointArray[i]);
+ pointArray[i] = DPIUtil.autoScaleUp(drawable, pointArray[i]);
}
Gdip.Matrix_TransformPoints(handle, pointArray, length / 2);
for (int i = 0; i < length; i++) {
- pointArray[i] = DPIUtil.autoScaleDown(pointArray[i]);
+ pointArray[i] = DPIUtil.autoScaleDown(drawable, pointArray[i]);
}
}
@@ -376,7 +381,8 @@ public void transform(float[] pointArray) {
*/
public void translate(float offsetX, float offsetY) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- Gdip.Matrix_Translate(handle, DPIUtil.autoScaleUp(offsetX), DPIUtil.autoScaleUp(offsetY), Gdip.MatrixOrderPrepend);
+ Drawable drawable = getDevice();
+ Gdip.Matrix_Translate(handle, DPIUtil.autoScaleUp(drawable, offsetX), DPIUtil.autoScaleUp(drawable, offsetY), Gdip.MatrixOrderPrepend);
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
index 992b0b4df4..04edec1b55 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java
@@ -43,21 +43,7 @@ public class BidiUtil {
// switching
static Map<LONG, Runnable> languageMap = new HashMap<> ();
static Map<LONG, LONG> oldProcMap = new HashMap<> ();
- /*
- * This code is intentionally commented. In order
- * to support CLDC, .class cannot be used because
- * it does not compile on some Java compilers when
- * they are targeted for CLDC.
- */
- // static Callback callback = new Callback (BidiUtil.class, "windowProc", 4);
- static final String CLASS_NAME = "org.eclipse.swt.internal.BidiUtil"; //$NON-NLS-1$
- static Callback callback;
- static {
- try {
- callback = new Callback (Class.forName (CLASS_NAME), "windowProc", 4); //$NON-NLS-1$
- if (callback.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- } catch (ClassNotFoundException e) {}
- }
+ static Callback callback = new Callback (BidiUtil.class, "windowProc", 4); //$NON-NLS-1$
// GetCharacterPlacement constants
static final int GCP_REORDER = 0x0002;
@@ -77,9 +63,6 @@ public class BidiUtil {
static final int LANG_ARABIC = 0x01;
static final int LANG_HEBREW = 0x0d;
static final int LANG_FARSI = 0x29;
- // code page identifiers
- static final String CD_PG_HEBREW = "1255"; //$NON-NLS-1$
- static final String CD_PG_ARABIC = "1256"; //$NON-NLS-1$
// ActivateKeyboard constants
static final int HKL_NEXT = 1;
static final int HKL_PREV = 0;
@@ -110,7 +93,7 @@ public class BidiUtil {
* @param runnable the code that should be executed when a keyboard language change
* occurs
*/
-public static void addLanguageListener (long /*int*/ hwnd, Runnable runnable) {
+public static void addLanguageListener (long hwnd, Runnable runnable) {
languageMap.put(new LONG(hwnd), runnable);
subclass(hwnd);
}
@@ -120,12 +103,12 @@ public static void addLanguageListener (Control control, Runnable runnable) {
/**
* Proc used for OS.EnumSystemLanguageGroups call during isBidiPlatform test.
*/
-static long /*int*/ EnumSystemLanguageGroupsProc(long /*int*/ lpLangGrpId, long /*int*/ lpLangGrpIdString, long /*int*/ lpLangGrpName, long /*int*/ options, long /*int*/ lParam) {
- if ((int)/*64*/lpLangGrpId == OS.LGRPID_HEBREW) {
+static long EnumSystemLanguageGroupsProc(long lpLangGrpId, long lpLangGrpIdString, long lpLangGrpName, long options, long lParam) {
+ if ((int)lpLangGrpId == OS.LGRPID_HEBREW) {
isBidiPlatform = 1;
return 0;
}
- if ((int)/*64*/lpLangGrpId == OS.LGRPID_ARABIC) {
+ if ((int)lpLangGrpId == OS.LGRPID_ARABIC) {
isBidiPlatform = 1;
return 0;
}
@@ -173,7 +156,7 @@ public static void drawGlyphs(GC gc, char[] renderBuffer, int[] renderDx, int x,
*/
public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] classBuffer, int[] dx, int flags, int [] offsets) {
int fontLanguageInfo = OS.GetFontLanguageInfo(gc.handle);
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
boolean isRightOriented = OS.GetLayout(gc.handle) != 0;
char [] textBuffer = text.toCharArray();
int byteCount = textBuffer.length;
@@ -183,10 +166,10 @@ public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] class
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = byteCount;
- long /*int*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- long /*int*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- long /*int*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- long /*int*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 2);
+ long lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 2);
// set required dwFlags
int dwFlags = 0;
@@ -300,7 +283,7 @@ public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] class
*/
public static void getOrderInfo(GC gc, String text, int[] order, byte[] classBuffer, int flags, int [] offsets) {
int fontLanguageInfo = OS.GetFontLanguageInfo(gc.handle);
- long /*int*/ hHeap = OS.GetProcessHeap();
+ long hHeap = OS.GetProcessHeap();
char [] textBuffer = text.toCharArray();
int byteCount = textBuffer.length;
boolean isRightOriented = OS.GetLayout(gc.handle) != 0;
@@ -308,8 +291,8 @@ public static void getOrderInfo(GC gc, String text, int[] order, byte[] classBuf
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
result.nGlyphs = byteCount;
- long /*int*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
- long /*int*/ lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount * 4);
+ long lpClass = result.lpClass = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
// set required dwFlags, these values will affect how the text gets rendered and
// ordered
@@ -396,7 +379,7 @@ public static int getFontBidiAttributes(GC gc) {
* KEYBOARD_NON_BIDI)
*/
public static int getKeyboardLanguage() {
- long /*int*/ layout = OS.GetKeyboardLayout(0);
+ long layout = OS.GetKeyboardLayout(0);
return isBidiLang(layout) ? KEYBOARD_BIDI : KEYBOARD_NON_BIDI;
}
/**
@@ -405,15 +388,15 @@ public static int getKeyboardLanguage() {
*
* @return integer array with an entry for each installed language
*/
-static long /*int*/[] getKeyboardLanguageList() {
+static long[] getKeyboardLanguageList() {
int maxSize = 10;
- long /*int*/[] tempList = new long /*int*/[maxSize];
+ long[] tempList = new long[maxSize];
int size = OS.GetKeyboardLayoutList(maxSize, tempList);
- long /*int*/[] list = new long /*int*/[size];
+ long[] list = new long[size];
System.arraycopy(tempList, 0, list, 0, size);
return list;
}
-static boolean isBidiLang(long /*int*/ lang) {
+static boolean isBidiLang(long lang) {
int id = OS.PRIMARYLANGID(OS.LOWORD(lang));
return id == LANG_ARABIC || id == LANG_HEBREW || id == LANG_FARSI;
}
@@ -440,23 +423,9 @@ public static boolean isBidiPlatform() {
// languages, but only install the Thai keyboard).
if (!isKeyboardBidi()) return false;
- Callback callback = null;
- try {
- callback = new Callback (Class.forName (CLASS_NAME), "EnumSystemLanguageGroupsProc", 5); //$NON-NLS-1$
- long /*int*/ lpEnumSystemLanguageGroupsProc = callback.getAddress ();
- if (lpEnumSystemLanguageGroupsProc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
- OS.EnumSystemLanguageGroups(lpEnumSystemLanguageGroupsProc, OS.LGRPID_INSTALLED, 0);
- callback.dispose ();
- } catch (ClassNotFoundException e) {
- //callback can only be null at this point
- }
- if (isBidiPlatform == 1) return true;
- // need to look at system code page for NT & 98 platforms since EnumSystemLanguageGroups is
- // not supported for these platforms
- String codePage = String.valueOf(OS.GetACP());
- if (CD_PG_ARABIC.equals(codePage) || CD_PG_HEBREW.equals(codePage)) {
- isBidiPlatform = 1;
- }
+ Callback callback = new Callback (BidiUtil.class, "EnumSystemLanguageGroupsProc", 5); //$NON-NLS-1$
+ OS.EnumSystemLanguageGroups(callback.getAddress (), OS.LGRPID_INSTALLED, 0);
+ callback.dispose ();
return isBidiPlatform == 1;
}
/**
@@ -467,9 +436,8 @@ public static boolean isBidiPlatform() {
* @return true if bidi is supported, false otherwise.
*/
public static boolean isKeyboardBidi() {
- long /*int*/[] list = getKeyboardLanguageList();
- for (int i=0; i<list.length; i++) {
- if (isBidiLang(list[i])) {
+ for (long language : getKeyboardLanguageList()) {
+ if (isBidiLang(language)) {
return true;
}
}
@@ -481,7 +449,7 @@ public static boolean isKeyboardBidi() {
*
* @param hwnd the handle of the Control that is listening for keyboard language changes
*/
-public static void removeLanguageListener (long /*int*/ hwnd) {
+public static void removeLanguageListener (long hwnd) {
languageMap.remove(new LONG(hwnd));
unsubclass(hwnd);
}
@@ -507,18 +475,14 @@ public static int resolveTextDirection (String text) {
int length = text.length();
if (length == 0) return SWT.NONE;
char[] rtlProbe = {' ', ' ', '1'};
- /*
- * "Wide" version of win32 API can also run even on non-Unicode Windows,
- * hence need for OS.IsUnicode check here.
- */
char[] ltrProbe = {'\u202b', 'a', ' '};
char[] numberProbe = {'\u05d0', ' ', ' '};
GCP_RESULTS result = new GCP_RESULTS();
result.lStructSize = GCP_RESULTS.sizeof;
int nGlyphs = result.nGlyphs = ltrProbe.length;
- long /*int*/ hHeap = OS.GetProcessHeap();
- long /*int*/ lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
- long /*int*/ hdc = OS.GetDC(0);
+ long hHeap = OS.GetProcessHeap();
+ long lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
+ long hdc = OS.GetDC(0);
int[] order = new int[1];
int textDirection = SWT.NONE;
for (int i = 0; i < length; i++) {
@@ -560,10 +524,9 @@ public static int resolveTextDirection (String text) {
public static void setKeyboardLanguage(int language) {
if (language == getKeyboardLanguage()) return;
boolean bidi = language == KEYBOARD_BIDI;
- long /*int*/[] list = getKeyboardLanguageList();
- for (int i=0; i<list.length; i++) {
- if (bidi == isBidiLang(list[i])) {
- OS.ActivateKeyboardLayout(list[i], 0);
+ for (long element : getKeyboardLanguageList()) {
+ if (bidi == isBidiLang(element)) {
+ OS.ActivateKeyboardLayout(element, 0);
return;
}
}
@@ -578,7 +541,7 @@ public static void setKeyboardLanguage(int language) {
* @return true if the orientation was changed, false if the orientation
* could not be changed
*/
-public static boolean setOrientation (long /*int*/ hwnd, int orientation) {
+public static boolean setOrientation (long hwnd, int orientation) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {
bits |= OS.WS_EX_LAYOUTRTL;
@@ -596,10 +559,10 @@ public static boolean setOrientation (Control control, int orientation) {
*
* @param hwnd control to override the window proc of
*/
-static void subclass(long /*int*/ hwnd) {
+static void subclass(long hwnd) {
LONG key = new LONG(hwnd);
if (oldProcMap.get(key) == null) {
- long /*int*/ oldProc = OS.GetWindowLongPtr(hwnd, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr(hwnd, OS.GWLP_WNDPROC);
oldProcMap.put(key, new LONG(oldProc));
OS.SetWindowLongPtr(hwnd, OS.GWLP_WNDPROC, callback.getAddress());
}
@@ -656,7 +619,7 @@ static void translateOrder(int[] orderArray, int glyphCount, boolean isRightOrie
*
* @param hwnd control to remove the window proc override for
*/
-static void unsubclass(long /*int*/ hwnd) {
+static void unsubclass(long hwnd) {
LONG key = new LONG(hwnd);
if (languageMap.get(key) == null) {
LONG proc = oldProcMap.remove(key);
@@ -673,16 +636,16 @@ static void unsubclass(long /*int*/ hwnd) {
* change event
* @param msg window message
*/
-static long /*int*/ windowProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
+static long windowProc (long hwnd, long msg, long wParam, long lParam) {
LONG key = new LONG (hwnd);
- switch ((int)/*64*/msg) {
+ switch ((int)msg) {
case OS.WM_INPUTLANGCHANGE:
Runnable runnable = languageMap.get (key);
if (runnable != null) runnable.run ();
break;
}
LONG oldProc = oldProcMap.get(key);
- return OS.CallWindowProc (oldProc.value, hwnd, (int)/*64*/msg, wParam, lParam);
+ return OS.CallWindowProc (oldProc.value, hwnd, (int)msg, wParam, lParam);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
index 14ee7c26bc..34ccb923d2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
@@ -19,7 +19,7 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.win32.*;
public class ImageList {
- long /*int*/ handle;
+ long handle;
int style, refCount;
Image [] images;
@@ -63,13 +63,13 @@ public int addRef() {
return ++refCount;
}
-long /*int*/ copyBitmap (long /*int*/ hImage, int width, int height) {
+long copyBitmap (long hImage, int width, int height) {
BITMAP bm = new BITMAP ();
OS.GetObject (hImage, BITMAP.sizeof, bm);
- long /*int*/ hDC = OS.GetDC (0);
- long /*int*/ hdc1 = OS.CreateCompatibleDC (hDC);
+ long hDC = OS.GetDC (0);
+ long hdc1 = OS.CreateCompatibleDC (hDC);
OS.SelectObject (hdc1, hImage);
- long /*int*/ hdc2 = OS.CreateCompatibleDC (hDC);
+ long hdc2 = OS.CreateCompatibleDC (hDC);
/*
* Feature in Windows. If a bitmap has a 32-bit depth and any
* pixel has an alpha value different than zero, common controls
@@ -80,7 +80,7 @@ long /*int*/ copyBitmap (long /*int*/ hImage, int width, int height) {
* remove the alpha channel of opaque images by down sampling
* it to 24-bit depth.
*/
- long /*int*/ hBitmap;
+ long hBitmap;
if (bm.bmBitsPixel == 32) {
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
@@ -91,7 +91,7 @@ long /*int*/ copyBitmap (long /*int*/ hImage, int width, int height) {
bmiHeader.biCompression = OS.BI_RGB;
byte[] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/[] pBits = new long /*int*/[1];
+ long[] pBits = new long[1];
hBitmap = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
} else {
hBitmap = OS.CreateCompatibleBitmap (hDC, width, height);
@@ -109,22 +109,22 @@ long /*int*/ copyBitmap (long /*int*/ hImage, int width, int height) {
return hBitmap;
}
-long /*int*/ copyIcon (long /*int*/ hImage, int width, int height) {
- long /*int*/ hIcon = OS.CopyImage (hImage, OS.IMAGE_ICON, width, height, 0);
+long copyIcon (long hImage, int width, int height) {
+ long hIcon = OS.CopyImage (hImage, OS.IMAGE_ICON, width, height, 0);
return hIcon != 0 ? hIcon : hImage;
}
-long /*int*/ copyWithAlpha (long /*int*/ hBitmap, int background, byte[] alphaData, int destWidth, int destHeight) {
+long copyWithAlpha (long hBitmap, int background, byte[] alphaData, int destWidth, int destHeight) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int srcWidth = bm.bmWidth;
int srcHeight = bm.bmHeight;
/* Create resources */
- long /*int*/ hdc = OS.GetDC (0);
- long /*int*/ srcHdc = OS.CreateCompatibleDC (hdc);
- long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long hdc = OS.GetDC (0);
+ long srcHdc = OS.CreateCompatibleDC (hdc);
+ long oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = srcWidth;
@@ -134,27 +134,33 @@ long /*int*/ copyWithAlpha (long /*int*/ hBitmap, int background, byte[] alphaDa
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- /* Get the foreground pixels */
- OS.BitBlt (memHdc, 0, 0, srcWidth, srcHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte[] srcData = new byte [sizeInBytes];
+ /* Get the foreground pixels */
+ OS.BitBlt (memHdc, 0, 0, srcWidth, srcHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ byte[] srcData = new byte [sizeInBytes];
OS.MoveMemory (srcData, dibBM.bmBits, sizeInBytes);
/* Merge the alpha channel in place */
if (alphaData != null) {
int spinc = dibBM.bmWidthBytes - srcWidth * 4;
- int ap = 0, sp = 3;
+ int ap = 0, sp = 0;
for (int y = 0; y < srcHeight; ++y) {
for (int x = 0; x < srcWidth; ++x) {
- srcData [sp] = alphaData [ap++];
+ int a = alphaData [ap++] & 0xFF;
+ if (a != 0) {
+ srcData [sp ] = (byte)((((srcData [sp ] & 0xFF) * 0xFF) + a / 2) / a);
+ srcData [sp + 1] = (byte)((((srcData [sp + 1] & 0xFF) * 0xFF) + a / 2) / a);
+ srcData [sp + 2] = (byte)((((srcData [sp + 2] & 0xFF) * 0xFF) + a / 2) / a);
+ }
+ srcData [sp + 3] = (byte)a;
sp += 4;
}
sp += spinc;
@@ -186,10 +192,10 @@ long /*int*/ copyWithAlpha (long /*int*/ hBitmap, int background, byte[] alphaDa
bmiHeader2.biCompression = OS.BI_RGB;
byte [] bmi2 = new byte[BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi2, bmiHeader2, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits2 = new long /*int*/ [1];
- long /*int*/ memDib2 = OS.CreateDIBSection (0, bmi2, OS.DIB_RGB_COLORS, pBits2, 0, 0);
- long /*int*/ memHdc2 = OS.CreateCompatibleDC (hdc);
- long /*int*/ oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2);
+ long [] pBits2 = new long [1];
+ long memDib2 = OS.CreateDIBSection (0, bmi2, OS.DIB_RGB_COLORS, pBits2, 0, 0);
+ long memHdc2 = OS.CreateCompatibleDC (hdc);
+ long oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2);
OS.SetStretchBltMode(memHdc2, OS.COLORONCOLOR);
OS.StretchBlt (memHdc2, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
OS.SelectObject (memHdc2, oldMemBitmap2);
@@ -208,7 +214,7 @@ long /*int*/ copyWithAlpha (long /*int*/ hBitmap, int background, byte[] alphaDa
return memDib;
}
-long /*int*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
+long createMaskFromAlpha (ImageData data, int destWidth, int destHeight) {
int srcWidth = data.width;
int srcHeight = data.height;
ImageData mask = ImageData.internal_new (srcWidth, srcHeight, 1,
@@ -220,13 +226,13 @@ long /*int*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight)
mask.setPixel (x, y, (data.alphaData [ap++] & 0xff) <= 127 ? 1 : 0);
}
}
- long /*int*/ hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
+ long hMask = OS.CreateBitmap (srcWidth, srcHeight, 1, 1, mask.data);
if (srcWidth != destWidth || srcHeight != destHeight) {
- long /*int*/ hdc = OS.GetDC (0);
- long /*int*/ hdc1 = OS.CreateCompatibleDC (hdc);
+ long hdc = OS.GetDC (0);
+ long hdc1 = OS.CreateCompatibleDC (hdc);
OS.SelectObject (hdc1, hMask);
- long /*int*/ hdc2 = OS.CreateCompatibleDC (hdc);
- long /*int*/ hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long hdc2 = OS.CreateCompatibleDC (hdc);
+ long hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
OS.SelectObject (hdc2, hMask2);
OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR);
OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
@@ -239,14 +245,14 @@ long /*int*/ createMaskFromAlpha (ImageData data, int destWidth, int destHeight)
return hMask;
}
-long /*int*/ createMask (long /*int*/ hBitmap, int destWidth, int destHeight, int background, int transparentPixel) {
+long createMask (long hBitmap, int destWidth, int destHeight, int background, int transparentPixel) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int srcWidth = bm.bmWidth;
int srcHeight = bm.bmHeight;
- long /*int*/ hMask = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
- long /*int*/ hDC = OS.GetDC (0);
- long /*int*/ hdc1 = OS.CreateCompatibleDC (hDC);
+ long hMask = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
+ long hDC = OS.GetDC (0);
+ long hdc1 = OS.CreateCompatibleDC (hDC);
if (background != -1) {
OS.SelectObject (hdc1, hBitmap);
@@ -276,7 +282,7 @@ long /*int*/ createMask (long /*int*/ hBitmap, int destWidth, int destHeight, in
OS.SetBkColor (hdc1, background);
}
- long /*int*/ hdc2 = OS.CreateCompatibleDC (hDC);
+ long hdc2 = OS.CreateCompatibleDC (hDC);
OS.SelectObject (hdc2, hMask);
if (destWidth != srcWidth || destHeight != srcHeight) {
OS.SetStretchBltMode (hdc2, OS.COLORONCOLOR);
@@ -289,7 +295,7 @@ long /*int*/ createMask (long /*int*/ hBitmap, int destWidth, int destHeight, in
/* Put back the original palette */
if (originalColors != null) OS.SetDIBColorTable(hdc1, 0, 1 << bm.bmBitsPixel, originalColors);
} else {
- long /*int*/ hOldBitmap = OS.SelectObject (hdc1, hMask);
+ long hOldBitmap = OS.SelectObject (hdc1, hMask);
OS.PatBlt (hdc1, 0, 0, destWidth, destHeight, OS.BLACKNESS);
OS.SelectObject (hdc1, hOldBitmap);
}
@@ -312,7 +318,7 @@ public int getStyle () {
return style;
}
-public long /*int*/ getHandle () {
+public long getHandle () {
return handle;
}
@@ -334,6 +340,7 @@ public int indexOf (Image image) {
}
public void put (int index, Image image) {
+ if ((0 <= index && index < images.length) && (images [index] == image)) return;
int count = OS.ImageList_GetImageCount (handle);
if (!(0 <= index && index < count)) return;
if (image != null) set(index, image, count);
@@ -353,7 +360,7 @@ public int removeRef() {
}
void set (int index, Image image, int count) {
- long /*int*/ hImage = image.handle;
+ long hImage = image.handle;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (handle, cx, cy);
switch (image.type) {
@@ -361,7 +368,7 @@ void set (int index, Image image, int count) {
/*
* Note that the image size has to match the image list icon size.
*/
- long /*int*/ hBitmap = 0, hMask = 0;
+ long hBitmap = 0, hMask = 0;
ImageData data = image.getImageData (DPIUtil.getDeviceZoom ());
switch (data.getTransparencyType ()) {
case SWT.TRANSPARENCY_ALPHA:
@@ -416,7 +423,7 @@ void set (int index, Image image, int count) {
break;
}
case SWT.ICON: {
- long /*int*/ hIcon = copyIcon (hImage, cx [0], cy [0]);
+ long hIcon = copyIcon (hImage, cx [0], cy [0]);
OS.ImageList_ReplaceIcon (handle, index == count ? -1 : index, hIcon);
OS.DestroyIcon (hIcon);
break;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
index 20fcc839ba..592eaedc40 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
@@ -50,20 +50,18 @@ import org.eclipse.swt.internal.win32.*;
*/
public class Button extends Control {
String text = "", message = "";
- Image image, image2, disabledImage;
+ Image image, disabledImage;
ImageList imageList;
- boolean ignoreMouse, grayed;
- int buttonBackground = -1;
- // we need our own field, because setting Control.background causes two colored pixels around the button.
- int buttonBackgroundAlpha = 255;
+ boolean ignoreMouse, grayed, useDarkModeExplorerTheme;
static final int MARGIN = 4;
static final int CHECK_WIDTH, CHECK_HEIGHT;
static final int ICON_WIDTH = 128, ICON_HEIGHT = 128;
static /*final*/ boolean COMMAND_LINK = false;
- static final long /*int*/ ButtonProc;
+ static final char[] STRING_WITH_ZERO_CHAR = new char[] {'0'};
+ static final long ButtonProc;
static final TCHAR ButtonClass = new TCHAR (0, "BUTTON", true);
static {
- long /*int*/ hBitmap = OS.LoadBitmap (0, OS.OBM_CHECKBOXES);
+ long hBitmap = OS.LoadBitmap (0, OS.OBM_CHECKBOXES);
if (hBitmap == 0) {
CHECK_WIDTH = OS.GetSystemMetrics (OS.SM_CXVSCROLL);
CHECK_HEIGHT = OS.GetSystemMetrics (OS.SM_CYVSCROLL);
@@ -250,7 +248,7 @@ public void addSelectionListener (SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ButtonProc, hwnd, msg, wParam, lParam);
}
@@ -289,9 +287,9 @@ int computeLeftMargin () {
if (image != null && text.length () != 0) {
Rectangle bounds = image.getBoundsInPixels ();
margin += bounds.width + MARGIN * 2;
- long /*int*/ oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long oldFont = 0;
+ long hDC = OS.GetDC (handle);
+ long newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
char [] buffer = text.toCharArray ();
RECT rect = new RECT ();
@@ -351,9 +349,9 @@ int computeLeftMargin () {
}
}
if (hasText) {
- long /*int*/ oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long oldFont = 0;
+ long hDC = OS.GetDC (handle);
+ long newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC lptm = new TEXTMETRIC ();
OS.GetTextMetrics (hDC, lptm);
@@ -445,11 +443,14 @@ void createHandle () {
if ((style & SWT.RADIO) != 0) {
state |= DRAW_BACKGROUND;
}
+
+ useDarkModeExplorerTheme = display.useDarkModeExplorerTheme;
+ maybeEnableDarkSystemTheme();
}
}
private boolean customBackgroundDrawing() {
- return buttonBackground != -1 && !isRadioOrCheck();
+ return background != -1 && !isRadioOrCheck();
}
private boolean customDrawing() {
@@ -536,18 +537,6 @@ public int getAlignment () {
return SWT.LEFT;
}
-@Override
-public Color getBackground () {
- if (isRadioOrCheck()) {
- return super.getBackground();
- }
- checkWidget ();
- if (buttonBackground != -1) {
- return Color.win32_new (display, buttonBackground, buttonBackgroundAlpha);
- }
- return Color.win32_new (display, defaultBackground());
-}
-
boolean getDefault () {
if ((style & SWT.PUSH) == 0) return false;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -655,7 +644,7 @@ public String getText () {
}
private boolean isChecked() {
- long /*int*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
+ long flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
return flags != OS.BST_UNCHECKED;
}
@@ -696,8 +685,6 @@ void releaseWidget () {
imageList = null;
if (disabledImage != null) disabledImage.dispose ();
disabledImage = null;
- if (image2 != null) image2.dispose ();
- image2 = null;
text = null;
image = null;
}
@@ -733,25 +720,7 @@ int resolveTextDirection() {
}
void selectRadio () {
- /*
- * This code is intentionally commented. When two groups
- * of radio buttons with the same parent are separated by
- * another control, the correct behavior should be that
- * the two groups act independently. This is consistent
- * with radio tool and menu items. The commented code
- * implements this behavior.
- */
-// int index = 0;
-// Control [] children = parent._getChildren ();
-// while (index < children.length && children [index] != this) index++;
-// int i = index - 1;
-// while (i >= 0 && children [i].setRadioSelection (false)) --i;
-// int j = index + 1;
-// while (j < children.length && children [j].setRadioSelection (false)) j++;
-// setSelection (true);
- Control [] children = parent._getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : parent._getChildren ()) {
if (this != child) child.setRadioSelection (false);
}
setSelection (true);
@@ -834,31 +803,13 @@ public void setAlignment (int alignment) {
*/
@Override
public void setBackground (Color color) {
- checkWidget ();
- if (isRadioOrCheck()) {
- super.setBackground(color);
- } else {
- setButtonBackground (color);
- }
-}
-
-private void setButtonBackground (Color color) {
- int pixel = -1;
- int alpha = 255;
- if (color != null) {
- if (color.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- pixel = color.handle;
- alpha = color.getAlpha();
- }
- if (pixel == buttonBackground && alpha == buttonBackgroundAlpha) return;
- buttonBackground = pixel;
- buttonBackgroundAlpha = alpha;
- updateBackgroundColor ();
+ // This method only exists in order to provide custom documentation
+ super.setBackground(color);
}
void setDefault (boolean value) {
if ((style & SWT.PUSH) == 0) return;
- long /*int*/ hwndShell = menuShell ().handle;
+ long hwndShell = menuShell ().handle;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if (value) {
bits |= OS.BS_DEFPUSHBUTTON;
@@ -878,7 +829,7 @@ public boolean setFocus () {
* it selects the button in WM_SETFOCUS. The fix is to
* not assign focus to an unselected radio button.
*/
- if ((style & SWT.RADIO) != 0 && !isChecked () && display.fixFocus) return false;
+ if ((style & SWT.RADIO) != 0 && !isChecked ()) return false;
return super.setFocus ();
}
@@ -906,13 +857,6 @@ public void setImage (Image image) {
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((style & SWT.ARROW) != 0) return;
this.image = image;
- /* This code is intentionally commented */
-// if (OS.COMCTL32_MAJOR < 6) {
-// if (image == null || text.length () != 0) {
-// _setText (text);
-// return;
-// }
-// }
_setImage (image);
}
@@ -934,7 +878,7 @@ public void setGrayed (boolean grayed) {
checkWidget ();
if ((style & SWT.CHECK) == 0) return;
this.grayed = grayed;
- long /*int*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
+ long flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0);
if (grayed) {
if (flags == OS.BST_CHECKED) updateSelection (OS.BST_INDETERMINATE);
} else {
@@ -1052,13 +996,6 @@ public void setText (String string) {
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.ARROW) != 0) return;
text = string;
- /* This code is intentionally commented */
-// if (OS.COMCTL32_MAJOR < 6) {
-// if (text.length () == 0 && image != null) {
-// _setImage (image);
-// return;
-// }
-// }
_setText (string);
}
@@ -1159,12 +1096,27 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return ButtonProc;
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmColorChild (long wParam, long lParam) {
+ if (isRadioOrCheck()) {
+ // In order to match old SWT behavior and SWT behavior on other
+ // platforms, Radio and Check have their own background instead
+ // of showing parent's background.
+ return super.wmColorChild(wParam, lParam);
+ } else {
+ // Button has "transparent" portions which need to be filled with
+ // parent's (and not Button's) background. For example, SWT.PUSH
+ // button ~2px transparent area around the button.
+ return parent.wmColorChild(wParam, lParam);
+ }
+}
+
+@Override
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((style & SWT.ARROW) != 0) {
@@ -1174,7 +1126,7 @@ LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETOBJECT (long wParam, long lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for radio button position in group
@@ -1187,7 +1139,7 @@ LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if ((style & SWT.PUSH) != 0 && getDefault ()) {
menuShell ().setDefaultButton (null, false);
@@ -1196,19 +1148,19 @@ LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
@Override
-LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONUP (long wParam, long lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
/*
* Feature in Windows. When Windows sets focus to
* a radio button, it sets the WS_TABSTOP style.
@@ -1230,7 +1182,7 @@ LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
if ((style & (SWT.PUSH | SWT.TOGGLE)) != 0) {
@@ -1247,15 +1199,14 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long wParam, long lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
- if (image2 != null) _setImage (image);
return result;
}
@Override
-LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long wParam, long lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1281,7 +1232,7 @@ LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
}
@@ -1301,7 +1252,7 @@ LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.BN_CLICKED:
@@ -1322,8 +1273,27 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
return super.wmCommandChild (wParam, lParam);
}
+private int getCheckboxTextOffset(long hdc) {
+ int result = 0;
+
+ SIZE size = new SIZE();
+
+ if (OS.IsAppThemed ()) {
+ OS.GetThemePartSize(display.hButtonTheme(), hdc, OS.BP_CHECKBOX, OS.CBS_UNCHECKEDNORMAL, null, OS.TS_TRUE, size);
+ result += size.cx;
+ } else {
+ result += DPIUtil.autoScaleUpUsingNativeDPI(13);
+ }
+
+ // Windows uses half width of '0' as checkbox-to-text distance.
+ OS.GetTextExtentPoint32(hdc, STRING_WITH_ZERO_CHAR, 1, size);
+ result += size.cx / 2;
+
+ return result;
+}
+
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.NM_CUSTOMDRAW:
// this message will not appear for owner-draw buttons (currently the ARROW button).
@@ -1335,30 +1305,51 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
case OS.CDDS_PREPAINT: {
// buttons are ignoring SetBkColor, SetBkMode and SetTextColor
if (customBackgroundDrawing()) {
- int pixel = buttonBackground;
+ int pixel = background;
if ((nmcd.uItemState & OS.CDIS_SELECTED) != 0) {
- pixel = getDifferentColor(buttonBackground);
+ pixel = getDifferentColor(background);
} else if ((nmcd.uItemState & OS.CDIS_HOT) != 0) {
- pixel = getSlightlyDifferentColor(buttonBackground);
+ pixel = getSlightlyDifferentColor(background);
}
if ((style & SWT.TOGGLE) != 0 && isChecked()) {
- pixel = getDifferentColor(buttonBackground);
+ pixel = getDifferentColor(background);
+ }
+
+ long brush = OS.CreateSolidBrush(pixel);
+
+ int inset = 2;
+ int radius = 3;
+ if (useDarkModeExplorerTheme && (OS.WIN32_BUILD >= OS.WIN32_BUILD_WIN11_21H2)) {
+ // On Win11, Light theme and Dark theme images have different sizes
+ inset = 1;
+ radius = 4;
}
- RECT rect = new RECT ();
- OS.SetRect (rect, nmcd.left+2, nmcd.top+2, nmcd.right-2, nmcd.bottom-2);
- long /*int*/ brush = OS.CreateSolidBrush(pixel);
- OS.FillRect(nmcd.hdc, rect, brush);
+
+ int l = nmcd.left + inset;
+ int t = nmcd.top + inset;
+ int r = nmcd.right - inset;
+ int b = nmcd.bottom - inset;
+
+ if (OS.WIN32_BUILD >= OS.WIN32_BUILD_WIN11_21H2) {
+ // 'RoundRect' has left/top pixel reserved for border
+ l += 1;
+ t += 1;
+
+ // Win11 has buttons with rounded corners
+ OS.SaveDC(nmcd.hdc);
+ OS.SelectObject(nmcd.hdc, brush);
+ OS.SelectObject(nmcd.hdc, OS.GetStockObject(OS.NULL_PEN));
+ OS.RoundRect(nmcd.hdc, l, t, r, b, radius, radius);
+ OS.RestoreDC(nmcd.hdc, -1);
+ } else {
+ RECT rect = new RECT (l, t, r, b);
+ OS.FillRect(nmcd.hdc, rect, brush);
+ }
+
OS.DeleteObject(brush);
}
if (customForegroundDrawing()) {
- /*
- * Check-box/Radio buttons are native widget which honors
- * the Win OS zoom level for both 'Square' and 'Text' part
- * [Note: By-design SWT doesn't control native auto-scaling]
- * Hence, custom fore-ground draw logic should auto-scale
- * text-padding as per OS Native DPI level to fix bug 506371
- */
- int radioOrCheckTextPadding = DPIUtil.autoScaleUpUsingNativeDPI(16);
+ int radioOrCheckTextPadding = getCheckboxTextOffset(nmcd.hdc);
int border = isRadioOrCheck() ? 0 : 3;
int left = nmcd.left + border;
int right = nmcd.right - border;
@@ -1428,7 +1419,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
OS.SetRect (focusRect, nmcd.left+1+radioOrCheckTextPadding, nmcd.top, nmcd.right-2, nmcd.bottom-1);
}
} else {
- OS.SetRect (focusRect, nmcd.left+2, nmcd.top+3, nmcd.right-2, nmcd.bottom-3);
+ OS.SetRect (focusRect, nmcd.left+4, nmcd.top+4, nmcd.right-4, nmcd.bottom-4);
}
OS.DrawFocusRect(nmcd.hdc, focusRect);
}
@@ -1442,37 +1433,82 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
+static int getThemeStateId(int style, boolean pressed, boolean enabled) {
+ int direction = style & (SWT.UP | SWT.DOWN | SWT.LEFT | SWT.RIGHT);
+
+ /*
+ * Feature in Windows. DrawThemeBackground() does not mirror the drawing.
+ * The fix is switch left to right and right to left.
+ */
+ if ((style & SWT.MIRRORED) != 0) {
+ if (direction == SWT.LEFT) {
+ direction = SWT.RIGHT;
+ } else if (direction == SWT.RIGHT) {
+ direction = SWT.LEFT;
+ }
+ }
+
+ /*
+ * On Win11, scrollbars no longer show arrows by default.
+ * Arrows only show up when hot/disabled/pushed.
+ * The workaround is to use hot image in place of default.
+ */
+ boolean hot = false;
+ if (OS.WIN32_BUILD >= OS.WIN32_BUILD_WIN11_21H2) {
+ if (!pressed && enabled) {
+ hot = true;
+ }
+ }
+
+ if (hot) {
+ switch (direction) {
+ case SWT.UP: return OS.ABS_UPHOT;
+ case SWT.DOWN: return OS.ABS_DOWNHOT;
+ case SWT.LEFT: return OS.ABS_LEFTHOT;
+ case SWT.RIGHT: return OS.ABS_RIGHTHOT;
+ }
+ }
+
+ if (pressed) {
+ switch (direction) {
+ case SWT.UP: return OS.ABS_UPPRESSED;
+ case SWT.DOWN: return OS.ABS_DOWNPRESSED;
+ case SWT.LEFT: return OS.ABS_LEFTPRESSED;
+ case SWT.RIGHT: return OS.ABS_RIGHTPRESSED;
+ }
+ }
+
+ if (!enabled) {
+ switch (direction) {
+ case SWT.UP: return OS.ABS_UPDISABLED;
+ case SWT.DOWN: return OS.ABS_DOWNDISABLED;
+ case SWT.LEFT: return OS.ABS_LEFTDISABLED;
+ case SWT.RIGHT: return OS.ABS_RIGHTDISABLED;
+ }
+ }
+
+ switch (direction) {
+ case SWT.UP: return OS.ABS_UPNORMAL;
+ case SWT.DOWN: return OS.ABS_DOWNNORMAL;
+ case SWT.LEFT: return OS.ABS_LEFTNORMAL;
+ case SWT.RIGHT: return OS.ABS_RIGHTNORMAL;
+ }
+
+ // Have some sane value if all else fails
+ return OS.ABS_LEFTNORMAL;
+}
+
@Override
-LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmDrawChild (long wParam, long lParam) {
if ((style & SWT.ARROW) == 0) return super.wmDrawChild (wParam, lParam);
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
RECT rect = new RECT ();
OS.SetRect (rect, struct.left, struct.top, struct.right, struct.bottom);
if (OS.IsAppThemed ()) {
- int iStateId = OS.ABS_LEFTNORMAL;
- switch (style & (SWT.UP | SWT.DOWN | SWT.LEFT | SWT.RIGHT)) {
- case SWT.UP: iStateId = OS.ABS_UPNORMAL; break;
- case SWT.DOWN: iStateId = OS.ABS_DOWNNORMAL; break;
- case SWT.LEFT: iStateId = OS.ABS_LEFTNORMAL; break;
- case SWT.RIGHT: iStateId = OS.ABS_RIGHTNORMAL; break;
- }
- /*
- * Feature in Windows. DrawThemeBackground() does not mirror the drawing.
- * The fix is switch left to right and right to left.
- */
- if ((style & SWT.MIRRORED) != 0) {
- if ((style & (SWT.LEFT | SWT.RIGHT)) != 0) {
- iStateId = iStateId == OS.ABS_RIGHTNORMAL ? OS.ABS_LEFTNORMAL : OS.ABS_RIGHTNORMAL;
- }
- }
- /*
- * NOTE: The normal, hot, pressed and disabled state is
- * computed relying on the fact that the increment between
- * the direction states is invariant (always separated by 4).
- */
- if (!getEnabled ()) iStateId += OS.ABS_UPDISABLED - OS.ABS_UPNORMAL;
- if ((struct.itemState & OS.ODS_SELECTED) != 0) iStateId += OS.ABS_UPPRESSED - OS.ABS_UPNORMAL;
+ boolean pressed = ((struct.itemState & OS.ODS_SELECTED) != 0);
+ boolean enabled = getEnabled ();
+ int iStateId = getThemeStateId(style, pressed, enabled);
OS.DrawThemeBackground (display.hScrollBarTheme (), struct.hDC, OS.SBP_ARROWBTN, iStateId, rect, null);
} else {
int uState = OS.DFCS_SCROLLLEFT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
index b88d7ad5ed..699ac814c1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
@@ -81,17 +81,6 @@ public Canvas (Composite parent, int style) {
super (parent, style);
}
-void clearArea (int x, int y, int width, int height) {
- checkWidget ();
- if (OS.IsWindowVisible (handle)) {
- RECT rect = new RECT ();
- OS.SetRect (rect, x, y, x + width, y + height);
- long /*int*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
- drawBackground (hDC, rect);
- OS.ReleaseDC (handle, hDC);
- }
-}
-
/**
* Fills the interior of the rectangle specified by the arguments,
* with the receiver's background.
@@ -162,6 +151,11 @@ public IME getIME () {
}
@Override
+boolean isUseWsBorder () {
+ return super.isUseWsBorder () || ((display != null) && display.useWsBorderCanvas);
+}
+
+@Override
void releaseChildren (boolean destroy) {
if (caret != null) {
caret.release (false);
@@ -253,9 +247,7 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height,
OS.ScrollWindowEx (handle, deltaX, deltaY, sourceRect, null, 0, null, flags);
}
if (all) {
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : _getChildren ()) {
Rectangle rect = child.getBoundsInPixels ();
if (Math.min (x + width, rect.x + rect.width) >= Math.max (x, rect.x) &&
Math.min (y + height, rect.y + rect.height) >= Math.max (y, rect.y)) {
@@ -335,7 +327,7 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
if (msg == Display.SWT_RESTORECARET) {
if ((state & CANVAS) != 0) {
if (caret != null) {
@@ -349,11 +341,11 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
if (caret != null) {
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case SWT.DEL:
case SWT.BS:
case SWT.ESC:
@@ -372,7 +364,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long wParam, long lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_COMPOSITION (wParam, lParam);
if (result != null) return result;
@@ -381,7 +373,7 @@ LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long wParam, long lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_COMPOSITION_START (wParam, lParam);
if (result != null) return result;
@@ -390,7 +382,7 @@ LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long wParam, long lParam) {
if (ime != null) {
LRESULT result = ime.WM_IME_ENDCOMPOSITION (wParam, lParam);
if (result != null) return result;
@@ -399,7 +391,7 @@ LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_INPUTLANGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_INPUTLANGCHANGE (long wParam, long lParam) {
LRESULT result = super.WM_INPUTLANGCHANGE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) {
caret.setIMEFont ();
@@ -410,7 +402,7 @@ LRESULT WM_INPUTLANGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (ime != null) {
@@ -420,7 +412,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
if (ime != null) {
LRESULT result = ime.WM_KILLFOCUS (wParam, lParam);
if (result != null) return result;
@@ -432,7 +424,7 @@ LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
if (ime != null) {
LRESULT result = ime.WM_LBUTTONDOWN (wParam, lParam);
if (result != null) return result;
@@ -441,21 +433,21 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) caret.setFocus ();
return result;
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (caret != null && caret.isFocusCaret ()) caret.resizeIME ();
return result;
}
@Override
-LRESULT WM_WINDOWPOSCHANGED (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGED (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGED (wParam, lParam);
//if (result != null) return result;
/*
@@ -471,7 +463,7 @@ LRESULT WM_WINDOWPOSCHANGED (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
index 2e2be436dd..5b5342b940 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,6 +38,9 @@ import org.eclipse.swt.internal.win32.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class Caret extends Widget {
+ /** The Caret last updated on the OS-level */
+ private static Caret currentCaret;
+
Canvas parent;
int x, y, width, height;
boolean moved, resized;
@@ -87,10 +90,10 @@ void createWidget () {
}
}
-long /*int*/ defaultFont () {
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
- long /*int*/ hFont = 0;
+long defaultFont () {
+ long hwnd = parent.handle;
+ long hwndIME = OS.ImmGetDefaultIMEWnd (hwnd);
+ long hFont = 0;
if (hwndIME != 0) {
hFont = OS.SendMessage (hwndIME, OS.WM_GETFONT, 0, 0);
}
@@ -144,7 +147,7 @@ Rectangle getBoundsInPixels () {
public Font getFont () {
checkWidget();
if (font == null) {
- long /*int*/ hFont = defaultFont ();
+ long hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
return font;
@@ -285,6 +288,7 @@ void killFocus () {
void move () {
moved = false;
+ setCurrentCaret(this);
if (!OS.SetCaretPos (x, y)) return;
resizeIME ();
}
@@ -293,8 +297,8 @@ void resizeIME () {
if (!OS.IsDBLocale) return;
POINT ptCurrentPos = new POINT ();
if (!OS.GetCaretPos (ptCurrentPos)) return;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hIMC = OS.ImmGetContext (hwnd);
+ long hwnd = parent.handle;
+ long hIMC = OS.ImmGetContext (hwnd);
IME ime = parent.getIME ();
if (ime != null && ime.isInlineEnabled ()) {
Point size = getSizeInPixels ();
@@ -323,12 +327,18 @@ void resizeIME () {
@Override
void releaseParent () {
super.releaseParent ();
- if (this == parent.getCaret ()) parent.setCaret (null);
+ if (parent != null && this == parent.caret) {
+ if (!parent.isDisposed()) parent.setCaret (null);
+ else parent.caret = null;
+ }
}
@Override
void releaseWidget () {
super.releaseWidget ();
+ if (isCurrentCaret()) {
+ setCurrentCaret(null);
+ }
parent = null;
image = null;
font = null;
@@ -337,9 +347,9 @@ void releaseWidget () {
void resize () {
resized = false;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
OS.DestroyCaret ();
- long /*int*/ hBitmap = image != null ? image.handle : 0;
+ long hBitmap = image != null ? image.handle : 0;
int width = this.width;
if (image == null && width == 0) {
int [] buffer = new int [1];
@@ -356,8 +366,8 @@ void resize () {
void restoreIMEFont () {
if (!OS.IsDBLocale) return;
if (oldFont == null) return;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hIMC = OS.ImmGetContext (hwnd);
+ long hwnd = parent.handle;
+ long hIMC = OS.ImmGetContext (hwnd);
OS.ImmSetCompositionFont (hIMC, oldFont);
OS.ImmReleaseContext (hwnd, hIMC);
oldFont = null;
@@ -387,7 +397,7 @@ public void setBounds (int x, int y, int width, int height) {
void setBoundsInPixels (int x, int y, int width, int height) {
boolean samePosition = this.x == x && this.y == y;
boolean sameExtent = this.width == width && this.height == height;
- if (samePosition && sameExtent) return;
+ if (samePosition && sameExtent && isCurrentCaret()) return;
this.x = x;
this.y = y;
this.width = width;
@@ -424,8 +434,8 @@ void setBoundsInPixels (Rectangle rect) {
}
void setFocus () {
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hBitmap = 0;
+ long hwnd = parent.handle;
+ long hBitmap = 0;
if (image != null) hBitmap = image.handle;
int width = this.width;
if (image == null && width == 0) {
@@ -490,11 +500,11 @@ public void setImage (Image image) {
void setIMEFont () {
if (!OS.IsDBLocale) return;
- long /*int*/ hFont = 0;
+ long hFont = 0;
if (font != null) hFont = font.handle;
if (hFont == 0) hFont = defaultFont ();
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hIMC = OS.ImmGetContext (hwnd);
+ long hwnd = parent.handle;
+ long hIMC = OS.ImmGetContext (hwnd);
/* Save the current IME font */
if (oldFont == null) {
oldFont = new LOGFONT ();
@@ -527,12 +537,20 @@ public void setLocation (int x, int y) {
}
void setLocationInPixels (int x, int y) {
- if (this.x == x && this.y == y) return;
+ if (this.x == x && this.y == y && isCurrentCaret()) return;
this.x = x; this.y = y;
moved = true;
if (isVisible && hasFocus ()) move ();
}
+private boolean isCurrentCaret() {
+ return Caret.currentCaret == this;
+}
+
+private void setCurrentCaret(Caret caret) {
+ Caret.currentCaret = caret;
+}
+
/**
* Sets the receiver's location to the point specified by
* the argument which is relative to the receiver's
@@ -569,7 +587,7 @@ public void setSize (int width, int height) {
}
void setSizeInPixels (int width, int height) {
- if (this.width == width && this.height == height) return;
+ if (this.width == width && this.height == height && isCurrentCaret()) return;
this.width = width; this.height = height;
resized = true;
if (isVisible && hasFocus ()) resize ();
@@ -615,7 +633,7 @@ public void setVisible (boolean visible) {
checkWidget();
if (visible == isVisible) return;
isVisible = visible;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if (OS.GetFocus () != hwnd) return;
if (!isVisible) {
OS.HideCaret (hwnd);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
index 6c951d4a9b..77f7422904 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
@@ -14,10 +14,10 @@
package org.eclipse.swt.widgets;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.win32.*;
/**
* Instances of this class allow the user to select a color
@@ -38,8 +38,6 @@ import org.eclipse.swt.graphics.*;
*/
public class ColorDialog extends Dialog {
static final int CUSTOM_COLOR_COUNT = 16; // from the MS spec for CHOOSECOLOR.lpCustColors
- Display display;
- int width, height;
RGB rgb;
RGB [] rgbs;
int [] colors = new int [CUSTOM_COLOR_COUNT];
@@ -98,34 +96,15 @@ public ColorDialog (Shell parent, int style) {
checkSubclass ();
}
-long /*int*/ CCHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ lParam, long /*int*/ lpData) {
- switch ((int)/*64*/uiMsg) {
+long CCHookProc (long hdlg, long uiMsg, long lParam, long lpData) {
+ switch ((int)uiMsg) {
case OS.WM_INITDIALOG: {
- RECT rect = new RECT ();
- OS.GetWindowRect (hdlg, rect);
- width = rect.right - rect.left;
- height = rect.bottom - rect.top;
if (title != null && title.length () != 0) {
- /* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, title, true);
OS.SetWindowText (hdlg, buffer);
}
break;
}
- case OS.WM_DESTROY: {
- RECT rect = new RECT ();
- OS.GetWindowRect (hdlg, rect);
- int newWidth = rect.right - rect.left;
- int newHeight = rect.bottom - rect.top;
- if (newWidth < width || newHeight < height) {
- //display.fullOpen = false;
- } else {
- if (newWidth > width || newHeight > height) {
- //display.fullOpen = true;
- }
- }
- break;
- }
}
return 0;
}
@@ -170,8 +149,8 @@ public RGB[] getRGBs() {
public RGB open () {
/* Get the owner HWND for the dialog */
- long /*int*/ hwndOwner = parent.handle;
- long /*int*/ hwndParent = parent.handle;
+ long hwndOwner = parent.handle;
+ long hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -201,13 +180,12 @@ public RGB open () {
/* Create the CCHookProc */
Callback callback = new Callback (this, "CCHookProc", 4); //$NON-NLS-1$
- long /*int*/ lpfnHook = callback.getAddress ();
- if (lpfnHook == 0) error(SWT.ERROR_NO_MORE_CALLBACKS);
+ long lpfnHook = callback.getAddress ();
/* Allocate the Custom Colors and initialize to white */
- display = parent.display;
+ Display display = parent.display;
if (display.lpCustColors == 0) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
display.lpCustColors = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, CUSTOM_COLOR_COUNT * 4);
for (int i=0; i < CUSTOM_COLOR_COUNT; i++) {
colors[i] = 0x00FFFFFF;
@@ -235,7 +213,6 @@ public RGB open () {
CHOOSECOLOR lpcc = new CHOOSECOLOR ();
lpcc.lStructSize = CHOOSECOLOR.sizeof;
lpcc.Flags = OS.CC_ANYCOLOR | OS.CC_ENABLEHOOK;
- //if (display.fullOpen) lpcc.Flags |= OS.CC_FULLOPEN;
lpcc.lpfnHook = lpfnHook;
lpcc.hwndOwner = hwndOwner;
lpcc.lpCustColors = display.lpCustColors;
@@ -254,9 +231,11 @@ public RGB open () {
display.setModalDialog (this);
}
+ display.externalEventLoop = true;
display.sendPreExternalEventDispatchEvent ();
/* Open the dialog */
boolean success = OS.ChooseColor (lpcc);
+ display.externalEventLoop = false;
display.sendPostExternalEventDispatchEvent ();
/* Clear the temporary dialog modal parent */
@@ -267,8 +246,8 @@ public RGB open () {
/* Get the Custom Colors (if the user defined any) from the dialog */
boolean customColor = false;
OS.MoveMemory (colors, display.lpCustColors, colors.length * 4);
- for (int i=0; i<colors.length; i++) {
- if (colors[i] != 0x00FFFFFF) {
+ for (int color : colors) {
+ if (color != 0x00FFFFFF) {
customColor = true;
break;
}
@@ -294,15 +273,6 @@ public RGB open () {
/* Free the CCHookProc */
callback.dispose ();
- /* Free the Custom Colors */
- /*
- * This code is intentionally commented. Currently,
- * there is exactly one set of custom colors per display.
- * The memory associated with these colors is released
- * when the display is disposed.
- */
-// if (lpCustColors != 0) OS.HeapFree (hHeap, 0, lpCustColors);
-
/* Destroy the BIDI orientation window */
if (hwndParent != hwndOwner) {
if (enabled) OS.EnableWindow (hwndParent, true);
@@ -310,15 +280,6 @@ public RGB open () {
OS.DestroyWindow (hwndOwner);
}
- /*
- * This code is intentionally commented. On some
- * platforms, the owner window is repainted right
- * away when a dialog window exits. This behavior
- * is currently unspecified.
- */
-// if (hwndOwner != 0) OS.UpdateWindow (hwndOwner);
-
- display = null;
if (!success) return null;
return rgb;
}
@@ -350,8 +311,8 @@ public void setRGB (RGB rgb) {
*/
public void setRGBs(RGB[] rgbs) {
if (rgbs != null) {
- for (int i=0; i<rgbs.length; i++) {
- if (rgbs [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
+ for (RGB rgb : rgbs) {
+ if (rgb == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
}
this.rgbs = rgbs;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 66623517f1..4d5cb5c78d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -63,7 +63,7 @@ import org.eclipse.swt.internal.win32.*;
public class Combo extends Composite {
boolean noSelection, ignoreDefaultSelection, ignoreCharacter, ignoreModify, ignoreResize, lockText;
int scrollWidth, visibleCount;
- long /*int*/ cbtHook;
+ long cbtHook;
String [] items = new String [0];
int[] segments;
int clearSegmentsCount = 0;
@@ -96,9 +96,9 @@ public class Combo extends Composite {
*/
static final int CBID_LIST = 1000;
static final int CBID_EDIT = 1001;
- static /*final*/ long /*int*/ EditProc, ListProc;
+ static /*final*/ long EditProc, ListProc;
- static final long /*int*/ ComboProc;
+ static final long ComboProc;
static final TCHAR ComboClass = new TCHAR (0, "COMBOBOX", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -142,8 +142,6 @@ public class Combo extends Composite {
*/
public Combo (Composite parent, int style) {
super (parent, checkStyle (style));
- /* This code is intentionally commented */
- //if ((style & SWT.H_SCROLL) != 0) this.style |= SWT.H_SCROLL;
this.style |= SWT.H_SCROLL;
}
@@ -169,7 +167,7 @@ public void add (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
+ int result = (int)OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
if (result == OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);
if (result == OS.CB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer.chars, true);
@@ -204,12 +202,12 @@ public void add (String string) {
public void add (String string, int index) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (!(0 <= index && index <= count)) {
error (SWT.ERROR_INVALID_RANGE);
}
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_INSERTSTRING, index, buffer);
+ int result = (int)OS.SendMessage (handle, OS.CB_INSERTSTRING, index, buffer);
if (result == OS.CB_ERRSPACE || result == OS.CB_ERR) {
error (SWT.ERROR_ITEM_NOT_ADDED);
}
@@ -282,7 +280,7 @@ public void addSegmentListener (SegmentListener listener) {
addListener (SWT.Segments, new TypedListener (listener));
int selection = OS.CB_ERR;
if (!noSelection) {
- selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ selection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
}
clearSegments (true);
applyEditSegments ();
@@ -355,7 +353,7 @@ public void addVerifyListener (VerifyListener listener) {
void applyEditSegments () {
if (--clearSegmentsCount != 0) return;
if (!hooks (SWT.Segments) && !filters (SWT.Segments) && (state & HAS_AUTO_DIRECTION) == 0) return;
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
int length = OS.GetWindowTextLength (hwndText);
char [] buffer = new char [length + 1];
if (length > 0) OS.GetWindowText (hwndText, buffer, length + 1);
@@ -368,7 +366,7 @@ void applyEditSegments () {
int nSegments = segments.length;
if (nSegments == 0) return;
char [] segmentsChars = event.segmentsChars;
- int/*64*/ limit = (int/*64*/)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
+ int limit = (int)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
OS.SendMessage (hwndText, OS.EM_SETLIMITTEXT, limit + Math.min (nSegments, LIMIT - limit), 0);
length += nSegments;
char [] newChars = new char [length + 1];
@@ -400,7 +398,7 @@ void applyEditSegments () {
*/
newChars [length] = 0;
OS.SendMessage (hwndText, OS.EM_SETSEL, 0, -1);
- long /*int*/ undo = OS.SendMessage (hwndText, OS.EM_CANUNDO, 0, 0);
+ long undo = OS.SendMessage (hwndText, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (hwndText, OS.EM_REPLACESEL, undo, newChars);
/* Restore selection */
start [0] = translateOffset (start [0]);
@@ -426,7 +424,7 @@ void applyEditSegments () {
}
void applyListSegments () {
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (count == OS.CB_ERR) return;
boolean add = items.length != count;
if (add) items = new String [count];
@@ -436,19 +434,19 @@ void applyListSegments () {
String string;
TCHAR buffer;
if (!noSelection) {
- selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ selection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
}
while (index-- > 0) {
buffer = null;
- if (add) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
+ if (add) {
+ int length = (int)OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
if (length == OS.CB_ERR) error (SWT.ERROR);
buffer = new TCHAR (cp, length + 1);
if (OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer) == OS.CB_ERR) return;
items [index] = string = buffer.toString (0, length);
- } else {
- string = items [index];
- }
+ } else {
+ string = items [index];
+ }
if (OS.SendMessage (handle, OS.CB_DELETESTRING, index, 0) == OS.CB_ERR) return;
if (buffer == null) buffer = new TCHAR (cp, string, true);
if (OS.SendMessage (handle, OS.CB_INSERTSTRING, index, buffer) == OS.CB_ERR) return;
@@ -459,7 +457,7 @@ void applyListSegments () {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
if (hwnd == handle) {
switch (msg) {
@@ -467,7 +465,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
ignoreResize = true;
boolean oldLockText = lockText;
if ((style & SWT.READ_ONLY) == 0) lockText = true;
- long /*int*/ result = OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
+ long result = OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
if ((style & SWT.READ_ONLY) == 0) lockText = oldLockText;
ignoreResize = false;
return result;
@@ -475,31 +473,31 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
}
return OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
}
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwnd == hwndText) {
if (lockText && msg == OS.WM_SETTEXT) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int length = OS.GetWindowTextLength (handle);
char [] buffer = new char [length + 1];
OS.GetWindowText (handle, buffer, length + 1);
int byteCount = buffer.length * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return code;
}
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
}
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwnd == hwndList) {
return OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
}
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
-long /*int*/ CBTProc (long /*int*/ nCode, long /*int*/ wParam, long /*int*/ lParam) {
- if ((int)/*64*/nCode == OS.HCBT_CREATEWND) {
+long CBTProc (long nCode, long wParam, long lParam) {
+ if ((int)nCode == OS.HCBT_CREATEWND) {
char [] buffer = new char [128];
int length = OS.GetClassName (wParam, buffer, buffer.length);
String className = new String (buffer, 0, length);
@@ -508,12 +506,7 @@ long /*int*/ CBTProc (long /*int*/ nCode, long /*int*/ wParam, long /*int*/ lPar
OS.SetWindowLong (wParam, OS.GWL_STYLE, bits & ~OS.ES_NOHIDESEL);
}
}
- return OS.CallNextHookEx (cbtHook, (int)/*64*/nCode, wParam, lParam);
-}
-
-@Override
-boolean checkHandle (long /*int*/ hwnd) {
- return hwnd == handle || hwnd == OS.GetDlgItem (handle, CBID_EDIT) || hwnd == OS.GetDlgItem (handle, CBID_LIST);
+ return OS.CallNextHookEx (cbtHook, (int)nCode, wParam, lParam);
}
@Override
@@ -554,9 +547,9 @@ void clearSegments (boolean applyText) {
if (segments == null) return;
int nSegments = segments.length;
if (nSegments == 0) return;
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- int/*64*/ limit = (int/*64*/)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
- if (limit < LIMIT) {
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ int limit = (int)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
+ if (limit < LIMIT) {
OS.SendMessage (hwndText, OS.EM_SETLIMITTEXT, Math.max (1, limit - nSegments), 0);
}
if (!applyText) {
@@ -582,7 +575,7 @@ void clearSegments (boolean applyText) {
* menu. Sending OS.EM_REPLACESEL message instead.
*/
OS.SendMessage (hwndText, OS.EM_SETSEL, 0, -1);
- long /*int*/ undo = OS.SendMessage (hwndText, OS.EM_CANUNDO, 0, 0);
+ long undo = OS.SendMessage (hwndText, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (hwndText, OS.EM_REPLACESEL, undo, buffer);
OS.SendMessage (hwndText, OS.EM_SETSEL, start [0], end [0]);
ignoreCharacter = oldIgnoreCharacter;
@@ -615,11 +608,11 @@ public void clearSelection () {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
RECT rect = new RECT ();
int flags = OS.DT_CALCRECT | OS.DT_NOPREFIX;
if ((style & SWT.READ_ONLY) == 0) flags |= OS.DT_EDITCONTROL;
@@ -632,10 +625,10 @@ public void clearSelection () {
width = Math.max (width, scrollWidth);
} else {
for (int i=0; i<count; i++) {
- length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
+ length = (int)OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
if (length != OS.CB_ERR) {
if (length + 1 > buffer.length) buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
+ int result = (int)OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
if (result != OS.CB_ERR) {
OS.DrawText (hDC, buffer, length, rect, flags);
width = Math.max (width, rect.right - rect.left);
@@ -648,8 +641,8 @@ public void clearSelection () {
}
if (hHint == SWT.DEFAULT) {
if ((style & SWT.SIMPLE) != 0) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
- int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int itemHeight = (int)OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
height = count * itemHeight;
}
}
@@ -660,9 +653,9 @@ public void clearSelection () {
if ((style & SWT.READ_ONLY) != 0) {
width += 8;
} else {
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
- long /*int*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ long margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
int marginWidth = OS.LOWORD (margins) + OS.HIWORD (margins);
width += marginWidth + 3;
}
@@ -675,7 +668,7 @@ public void clearSelection () {
} else {
int border = OS.GetSystemMetrics (OS.SM_CXEDGE);
width += OS.GetSystemMetrics (OS.SM_CXVSCROLL) + border * 2;
- int textHeight = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
+ int textHeight = (int)OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
if ((style & SWT.DROP_DOWN) != 0) {
height = textHeight + 6;
} else {
@@ -723,9 +716,7 @@ void createHandle () {
} else {
int threadId = OS.GetCurrentThreadId ();
Callback cbtCallback = new Callback (this, "CBTProc", 3); //$NON-NLS-1$
- long /*int*/ cbtProc = cbtCallback.getAddress ();
- if (cbtProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- cbtHook = OS.SetWindowsHookEx (OS.WH_CBT, cbtProc, 0, threadId);
+ cbtHook = OS.SetWindowsHookEx (OS.WH_CBT, cbtCallback.getAddress (), 0, threadId);
super.createHandle ();
if (cbtHook != 0) OS.UnhookWindowsHookEx (cbtHook);
cbtHook = 0;
@@ -733,14 +724,19 @@ void createHandle () {
}
state &= ~(CANVAS | THEME_BACKGROUND);
+ if (display.comboUseDarkTheme) {
+ OS.AllowDarkModeForWindow(handle, true);
+ OS.SetWindowTheme(handle, "CFD\0".toCharArray(), null);
+ }
+
stateFlagsUsable = stateFlagsTest();
/* Get the text and list window procs */
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc == 0) {
EditProc = OS.GetWindowLongPtr (hwndText, OS.GWLP_WNDPROC);
}
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc == 0) {
ListProc = OS.GetWindowLongPtr (hwndList, OS.GWLP_WNDPROC);
}
@@ -763,10 +759,10 @@ void createWidget() {
super.createWidget();
visibleCount = VISIBLE_COUNT;
if ((style & SWT.SIMPLE) == 0) {
- int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
+ int itemHeight = (int)OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
if (itemHeight != OS.CB_ERR && itemHeight != 0) {
int maxHeight = 0;
- long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -836,9 +832,9 @@ TCHAR deprocessText (TCHAR text, int start, int end, boolean terminate) {
@Override
void deregister () {
super.deregister ();
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.removeControl (hwndText);
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.removeControl (hwndList);
}
@@ -856,7 +852,7 @@ void deregister () {
*/
public void deselect (int index) {
checkWidget ();
- int selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int selection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (index != selection) return;
OS.SendMessage (handle, OS.CB_SETCURSEL, -1, 0);
sendEvent (SWT.Modify);
@@ -889,14 +885,14 @@ public void deselectAll () {
}
@Override
-boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (filter && (style & SWT.READ_ONLY) == 0) {
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
int [] start = new int [1], end = new int [1];
OS.SendMessage (handle, OS.CB_GETEDITSEL, start, end);
if (start [0] != end [0]) {
- long /*int*/ lParam = OS.MAKELPARAM (x, y);
+ long lParam = OS.MAKELPARAM (x, y);
int position = OS.LOWORD (OS.SendMessage (hwndText, OS.EM_CHARFROMPOS, 0, lParam));
if (start [0] <= position && position < end [0]) {
if (super.dragDetect (hwnd, x, y, filter, detect, consume)) {
@@ -942,8 +938,8 @@ Point getCaretLocationInPixels () {
* pixel coordinates (0,0).
*/
int position = translateOffset (getCaretPosition ());
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- long /*int*/ caretPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, position, 0);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long caretPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, position, 0);
if (caretPos == -1) {
caretPos = 0;
if (position >= OS.GetWindowTextLength (hwndText)) {
@@ -996,7 +992,7 @@ Point getCaretLocationInPixels () {
public int getCaretPosition () {
checkWidget ();
int [] start = new int [1], end = new int [1];
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
OS.SendMessage (hwndText, OS.EM_GETSEL, start, end);
/*
* In Windows, there is no API to get the position of the caret
@@ -1017,9 +1013,9 @@ public int getCaretPosition () {
if (lpgui.hwndCaret == hwndText || lpgui.hwndCaret == 0) {
POINT ptCurrentPos = new POINT ();
if (OS.GetCaretPos (ptCurrentPos)) {
- long /*int*/ endPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, end [0], 0);
+ long endPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, end [0], 0);
if (endPos == -1) {
- long /*int*/ startPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, start [0], 0);
+ long startPos = OS.SendMessage (hwndText, OS.EM_POSFROMCHAR, start [0], 0);
int startX = OS.GET_X_LPARAM (startPos);
if (ptCurrentPos.x > startX) caret = end [0];
} else {
@@ -1051,14 +1047,14 @@ public int getCaretPosition () {
*/
public String getItem (int index) {
checkWidget ();
- int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
+ int length = (int)OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
if (length != OS.CB_ERR) {
if (hooks (SWT.Segments) || filters (SWT.Segments) || (state & HAS_AUTO_DIRECTION) != 0) return items [index];
char [] buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
+ int result = (int)OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
if (result != OS.CB_ERR) return new String (buffer, 0, length);
}
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_CANNOT_GET_ITEM);
error (SWT.ERROR_INVALID_RANGE);
return "";
@@ -1076,7 +1072,7 @@ public String getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (count == OS.CB_ERR) error (SWT.ERROR_CANNOT_GET_COUNT);
return count;
}
@@ -1098,7 +1094,7 @@ public int getItemHeight () {
}
int getItemHeightInPixels () {
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
if (result == OS.CB_ERR) error (SWT.ERROR_CANNOT_GET_ITEM_HEIGHT);
return result;
}
@@ -1319,7 +1315,7 @@ public Point getSelection () {
public int getSelectionIndex () {
checkWidget ();
if (noSelection) return -1;
- return (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ return (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
}
/**
@@ -1369,7 +1365,7 @@ int getTextHeightInPixels () {
if (((style & SWT.SIMPLE) == 0) && OS.GetComboBoxInfo (handle, pcbi)) {
return (pcbi.buttonBottom - pcbi.buttonTop) + pcbi.buttonTop * 2;
}
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
+ int result = (int)OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, -1, 0);
if (result == OS.CB_ERR) error (SWT.ERROR_CANNOT_GET_ITEM_HEIGHT);
return (style & SWT.DROP_DOWN) != 0 ? result + 6 : result + 10;
}
@@ -1391,9 +1387,9 @@ int getTextHeightInPixels () {
*/
public int getTextLimit () {
checkWidget ();
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return LIMIT;
- int/*64*/ limit = (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ int limit = (int)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
if (segments != null && limit < LIMIT) limit = Math.max (1, limit - segments.length);
return limit;
}
@@ -1422,12 +1418,12 @@ public int getVisibleItemCount () {
@Override
boolean hasFocus () {
- long /*int*/ hwndFocus = OS.GetFocus ();
+ long hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == 0) return false;
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndFocus == hwndText) return true;
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndFocus == hwndList) return true;
return false;
}
@@ -1491,12 +1487,12 @@ public int indexOf (String string, int start) {
}
/* Use CB_FINDSTRINGEXACT to search for the item */
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (!(0 <= start && start < count)) return -1;
int index = start - 1, last = 0;
TCHAR buffer = new TCHAR (getCodePage (), string, true);
do {
- index = (int)/*64*/OS.SendMessage (handle, OS.CB_FINDSTRINGEXACT, last = index, buffer);
+ index = (int)OS.SendMessage (handle, OS.CB_FINDSTRINGEXACT, last = index, buffer);
if (index == OS.CB_ERR || index <= last) return -1;
} while (!string.equals (getItem (index)));
return index;
@@ -1523,8 +1519,14 @@ public void paste () {
}
void stateFlagsAdd(int flags) {
- final long /*int*/ tagCBoxPtr = OS.GetWindowLongPtr(handle, 0);
- final long /*int*/ stateFlagsPtr = tagCBoxPtr + stateFlagsOffset;
+ final long tagCBoxPtr = OS.GetWindowLongPtr(handle, 0);
+ /*
+ * Bug 550423: When non-XP-theme COMMCTL32.DLL gets loaded, undocumented
+ * internal data is not there. We do not support that and in such case
+ * GetWindowLongPtr function fails and return zero.
+ */
+ if (tagCBoxPtr == 0) return;
+ final long stateFlagsPtr = tagCBoxPtr + stateFlagsOffset;
int stateFlags[] = new int[1];
OS.MoveMemory(stateFlags, stateFlagsPtr, 4);
@@ -1538,8 +1540,14 @@ void stateFlagsAdd(int flags) {
* For simplicity, only SWT.READ_ONLY combos are handled.
*/
boolean stateFlagsTest() {
- final long /*int*/ tagCBoxPtr = OS.GetWindowLongPtr(handle, 0);
- final long /*int*/ stateFlagsPtr = tagCBoxPtr + stateFlagsOffset;
+ final long tagCBoxPtr = OS.GetWindowLongPtr(handle, 0);
+ /*
+ * Bug 550423: When non-XP-theme COMMCTL32.DLL gets loaded, undocumented
+ * internal data is not there. We do not support that and in such case
+ * GetWindowLongPtr function fails and return zero.
+ */
+ if (tagCBoxPtr == 0) return false;
+ final long stateFlagsPtr = tagCBoxPtr + stateFlagsOffset;
int stateFlags[] = new int[1];
OS.MoveMemory(stateFlags, stateFlagsPtr, 4);
@@ -1556,9 +1564,9 @@ boolean stateFlagsTest() {
@Override
void register () {
super.register ();
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) display.addControl (hwndText, this);
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) display.addControl (hwndList, this);
}
@@ -1584,24 +1592,24 @@ public void remove (int index) {
void remove (int index, boolean notify) {
char [] buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
+ int length = (int)OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
if (length == OS.CB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
+ int result = (int)OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer);
if (result == OS.CB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
}
int length = OS.GetWindowTextLength (handle);
- int code = (int)/*64*/OS.SendMessage (handle, OS.CB_DELETESTRING, index, 0);
+ int code = (int)OS.SendMessage (handle, OS.CB_DELETESTRING, index, 0);
if (code == OS.CB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
@@ -1639,13 +1647,13 @@ void remove (int index, boolean notify) {
public void remove (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
int textLength = OS.GetWindowTextLength (handle);
RECT rect = null;
- long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
+ long hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1657,13 +1665,13 @@ public void remove (int start, int end) {
for (int i=start; i<=end; i++) {
char [] buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, start, 0);
+ int length = (int)OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, start, 0);
if (length == OS.CB_ERR) break;
buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, start, buffer);
+ int result = (int)OS.SendMessage (handle, OS.CB_GETLBTEXT, start, buffer);
if (result == OS.CB_ERR) break;
}
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_DELETESTRING, start, 0);
+ int result = (int)OS.SendMessage (handle, OS.CB_DELETESTRING, start, 0);
if (result == OS.CB_ERR) {
error (SWT.ERROR_ITEM_NOT_REMOVED);
}
@@ -1781,7 +1789,7 @@ public void removeSegmentListener (SegmentListener listener) {
eventTable.unhook (SWT.Segments, listener);
int selection = OS.CB_ERR;
if (!noSelection) {
- selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ selection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
}
clearSegments (true);
applyEditSegments ();
@@ -1842,7 +1850,7 @@ public void removeVerifyListener (VerifyListener listener) {
}
@Override
-boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long wParam, long lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1883,7 +1891,7 @@ boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lPara
/* Verify the character */
String oldText = "";
int [] start = new int [1], end = new int [1];
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText == 0) return true;
OS.SendMessage (hwndText, OS.EM_GETSEL, start, end);
switch (key) {
@@ -1932,16 +1940,16 @@ boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lPara
*/
public void select (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (0 <= index && index < count) {
- int selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int selection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
//corner case for single elements combo boxes for Bug 222752
if (OS.WIN32_VERSION < OS.VERSION (6, 2) && getListVisible() && (style & SWT.READ_ONLY) != 0 && count==1 && selection == OS.CB_ERR) {
OS.SendMessage (handle, OS.WM_KEYDOWN, OS.VK_DOWN, 0);
sendEvent (SWT.Modify);
return;
}
- int code = (int)/*64*/OS.SendMessage (handle, OS.CB_SETCURSEL, index, 0);
+ int code = (int)OS.SendMessage (handle, OS.CB_SETCURSEL, index, 0);
if (code != OS.CB_ERR && code != selection) {
//Workaround for Bug 222752
if (OS.WIN32_VERSION < OS.VERSION (6, 2) && getListVisible() && (style & SWT.READ_ONLY) != 0) {
@@ -1961,20 +1969,20 @@ public void select (int index) {
}
@Override
-void setBackgroundImage (long /*int*/ hBitmap) {
+void setBackgroundImage (long hBitmap) {
super.setBackgroundImage (hBitmap);
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@Override
void setBackgroundPixel (int pixel) {
super.setBackgroundPixel (pixel);
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -2050,9 +2058,9 @@ public void setFont (Font font) {
@Override
void setForegroundPixel (int pixel) {
super.setForegroundPixel (pixel);
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) OS.InvalidateRect (hwndText, null, true);
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) OS.InvalidateRect (hwndList, null, true);
}
@@ -2099,11 +2107,11 @@ public void setItem (int index, String string) {
public void setItems (String... items) {
checkWidget ();
if (items == null) error (SWT.ERROR_NULL_ARGUMENT);
- for (int i=0; i<items.length; i++) {
- if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
+ for (String item : items) {
+ if (item == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
RECT rect = null;
- long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
+ long hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -2114,10 +2122,9 @@ public void setItems (String... items) {
}
OS.SendMessage (handle, OS.CB_RESETCONTENT, 0, 0);
int codePage = getCodePage ();
- for (int i=0; i<items.length; i++) {
- String string = items [i];
- TCHAR buffer = new TCHAR (codePage, string, true);
- int code = (int)/*64*/OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
+ for (String item : items) {
+ TCHAR buffer = new TCHAR (codePage, item, true);
+ int code = (int)OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
if (code == OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);
if (code == OS.CB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if ((style & SWT.H_SCROLL) != 0) {
@@ -2157,17 +2164,17 @@ public void setOrientation (int orientation) {
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
for (int i=0; i<count; i++) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
+ int length = (int)OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, i, 0);
if (length != OS.CB_ERR) {
char [] buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
+ int result = (int)OS.SendMessage (handle, OS.CB_GETLBTEXT, i, buffer);
if (result != OS.CB_ERR) {
OS.DrawText (hDC, buffer, -1, rect, flags);
newWidth = Math.max (newWidth, rect.right - rect.left);
@@ -2186,9 +2193,9 @@ void setScrollWidth (int scrollWidth) {
return;
}
boolean scroll = false;
- int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
if (count > 3) {
- long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -2219,8 +2226,8 @@ void setScrollWidth (int scrollWidth) {
void setScrollWidth (char[] buffer, boolean grow) {
RECT rect = new RECT ();
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -2260,7 +2267,7 @@ public void setSelection (Point selection) {
checkWidget ();
if (selection == null) error (SWT.ERROR_NULL_ARGUMENT);
int start = translateOffset (selection.x), end = translateOffset (selection.y);
- long /*int*/ bits = OS.MAKELPARAM (start, end);
+ long bits = OS.MAKELPARAM (start, end);
OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, bits);
}
@@ -2302,9 +2309,9 @@ public void setText (String string) {
}
clearSegments (false);
int limit = LIMIT;
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
- limit = (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ limit = (int)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
}
if (string.length () > limit) string = string.substring (0, limit);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
@@ -2347,8 +2354,8 @@ public void setTextLimit (int limit) {
@Override
void setToolTipText (Shell shell, String string) {
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndText != 0) shell.setToolTipText (hwndText, string);
if (hwndList != 0) shell.setToolTipText (hwndList, string);
shell.setToolTipText (handle, string);
@@ -2381,12 +2388,12 @@ public void setVisibleItemCount (int count) {
@Override
void subclass () {
super.subclass ();
- long /*int*/ newProc = display.windowProc;
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long newProc = display.windowProc;
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0) {
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
}
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0) {
OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, newProc);
}
@@ -2407,7 +2414,7 @@ boolean translateTraversal (MSG msg) {
* to select an item in the list and escape to close
* the combo box.
*/
- switch ((int)/*64*/(msg.wParam)) {
+ switch ((int)(msg.wParam)) {
case OS.VK_RETURN:
case OS.VK_ESCAPE:
if ((style & SWT.DROP_DOWN) != 0) {
@@ -2444,11 +2451,11 @@ boolean traverseReturn () {
@Override
void unsubclass () {
super.unsubclass ();
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
if (hwndText != 0 && EditProc != 0) {
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, EditProc);
}
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if (hwndList != 0 && ListProc != 0) {
OS.SetWindowLongPtr (hwndList, OS.GWLP_WNDPROC, ListProc);
}
@@ -2483,6 +2490,18 @@ void updateDropDownHeight () {
}
}
+void updateDropDownTheme () {
+ COMBOBOXINFO pcbi = new COMBOBOXINFO ();
+ pcbi.cbSize = COMBOBOXINFO.sizeof;
+ if (!OS.GetComboBoxInfo(handle, pcbi))
+ return;
+
+ if (pcbi.hwndList == 0)
+ return;
+
+ maybeEnableDarkSystemTheme(pcbi.hwndList);
+}
+
@Override
boolean updateTextDirection(int textDirection) {
if (super.updateTextDirection(textDirection)) {
@@ -2504,7 +2523,7 @@ void updateOrientation () {
}
bits &= ~OS.WS_EX_RTLREADING;
OS.SetWindowLong (handle, OS.GWL_EXSTYLE, bits);
- long /*int*/ hwndText = 0, hwndList = 0;
+ long hwndText = 0, hwndList = 0;
COMBOBOXINFO pcbi = new COMBOBOXINFO ();
pcbi.cbSize = COMBOBOXINFO.sizeof;
if (OS.GetComboBoxInfo (handle, pcbi)) {
@@ -2595,16 +2614,16 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return ComboProc;
}
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
- long /*int*/ hwndList = OS.GetDlgItem (handle, CBID_LIST);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndList = OS.GetDlgItem (handle, CBID_LIST);
if ((hwndText != 0 && hwnd == hwndText) || (hwndList != 0 && hwnd == hwndList)) {
LRESULT result = null;
boolean processSegments = false, redraw = false;
@@ -2675,11 +2694,18 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
OS.DefWindowProc (hwndText, OS.WM_SETREDRAW, 0, 0);
}
clearSegments (true);
- long /*int*/ code = callWindowProc (hwnd, msg, wParam, lParam);
+ long code = callWindowProc (hwnd, msg, wParam, lParam);
applyEditSegments ();
if (redraw) {
OS.DefWindowProc (hwndText, OS.WM_SETREDRAW, 1, 0);
OS.InvalidateRect (hwndText, null, true);
+ /*
+ * When setting longer text on AUTO_TEXT_DIRECTION styled Combo orientation:
+ * Combo should automatically scrolls selection's end into view. We need to
+ * force it to do such scrolling, to make sure Caret no longer goes out of view.
+ * For more details refer bug 575171.
+ */
+ forceScrollingToCaret();
}
return code;
}
@@ -2688,8 +2714,8 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
switch (msg) {
case OS.CB_SETCURSEL: {
- long /*int*/ code = OS.CB_ERR;
- int index = (int)/*64*/ wParam;
+ long code = OS.CB_ERR;
+ int index = (int) wParam;
if ((style & SWT.READ_ONLY) != 0) {
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
String oldText = getText (), newText = null;
@@ -2697,7 +2723,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
newText = "";
} else {
if (0 <= wParam && wParam < getItemCount ()) {
- newText = getItem ((int)/*64*/wParam);
+ newText = getItem ((int)wParam);
}
}
if (newText != null && !newText.equals (oldText)) {
@@ -2719,7 +2745,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
if (!(code == OS.CB_ERR || code == OS.CB_ERRSPACE)) {
Event event = getSegments (items [index]);
segments = event != null ? event.segments : null;
- if (event.segmentsChars != null) {
+ if (event != null && event.segmentsChars != null) {
int auto = state & HAS_AUTO_DIRECTION;
if (event.segmentsChars[0] == RLE) {
super.updateTextDirection(SWT.RIGHT_TO_LEFT);
@@ -2737,7 +2763,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
case OS.CB_INSERTSTRING:
case OS.CB_FINDSTRINGEXACT:
if (lParam != 0 && (hooks (SWT.Segments) || filters (SWT.Segments) || ((state & HAS_AUTO_DIRECTION) != 0))) {
- long /*int*/ code = OS.CB_ERR;
+ long code = OS.CB_ERR;
int length = OS.wcslen (lParam);
TCHAR buffer = new TCHAR (getCodePage (), length);
OS.MoveMemory (buffer, lParam, buffer.length () * TCHAR.sizeof);
@@ -2745,15 +2771,15 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
Event event = getSegments (string);
if (event != null && event.segments != null) {
buffer = new TCHAR (getCodePage (), getSegmentsText (string, event), true);
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
length = buffer.length() * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, length);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, length);
OS.MoveMemory (pszText, buffer, length);
code = super.windowProc (hwnd, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
}
if (msg == OS.CB_ADDSTRING || msg == OS.CB_INSERTSTRING) {
- int index = msg == OS.CB_ADDSTRING ? items.length : (int)/*64*/ wParam;
+ int index = msg == OS.CB_ADDSTRING ? items.length : (int) wParam;
String [] newItems = new String [items.length + 1];
System.arraycopy (items, 0, newItems, 0, index);
newItems [index] = string;
@@ -2765,9 +2791,9 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
break;
case OS.CB_DELETESTRING: {
if (hooks (SWT.Segments) || filters (SWT.Segments) || ((state & HAS_AUTO_DIRECTION) != 0)) {
- long /*int*/ code = super.windowProc (hwnd, msg, wParam, lParam);
+ long code = super.windowProc (hwnd, msg, wParam, lParam);
if (code != OS.CB_ERR && code != OS.CB_ERRSPACE) {
- int index = (int)/*64*/ wParam;
+ int index = (int) wParam;
if (items.length == 1) {
items = new String[0];
} else if (items.length > 1) {
@@ -2777,7 +2803,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
items = newItems;
}
if (!noSelection) {
- index = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ index = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (index == wParam) {
clearSegments (false);
applyEditSegments ();
@@ -2801,7 +2827,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmColorChild (long wParam, long lParam) {
LRESULT result = super.wmColorChild(wParam, lParam);
/*
@@ -2831,30 +2857,18 @@ LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_CTLCOLOR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CTLCOLOR (long wParam, long lParam) {
return wmColorChild (wParam, lParam);
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
+ long code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
return new LRESULT (code | OS.DLGC_WANTARROWS);
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
- /*
- * Bug in Windows. When a combo box that is read only
- * is disposed in CBN_KILLFOCUS, Windows segment faults.
- * The fix is to send focus from WM_KILLFOCUS instead
- * of CBN_KILLFOCUS.
- *
- * NOTE: In version 6 of COMCTL32.DLL, the bug is fixed.
- */
- if ((style & SWT.READ_ONLY) != 0) {
- return super.WM_KILLFOCUS (wParam, lParam);
- }
-
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
/*
* Return NULL - Focus notification is
* done in WM_COMMAND by CBN_KILLFOCUS.
@@ -2863,7 +2877,7 @@ LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down and the text in the entry field partially matches an
@@ -2871,11 +2885,11 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* WM_COMMAND with CBN_SELCHANGE. The fix is to detect that
* the selection has changed and issue the notification.
*/
- int oldSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int oldSelection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if ((style & SWT.READ_ONLY) == 0) {
- int newSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int newSelection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (oldSelection != newSelection) {
sendEvent (SWT.Modify);
if (isDisposed ()) return LRESULT.ZERO;
@@ -2887,7 +2901,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
/*
* Return NULL - Focus notification is
* done by WM_COMMAND with CBN_SETFOCUS.
@@ -2896,7 +2910,7 @@ LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
/*
* Feature in Windows. When a combo box is resized,
* the size of the drop down rectangle is specified
@@ -2955,6 +2969,12 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
* This is just another form of problem 1.
* 3) Caret no longer goes out of view when shrinking control.
*/
+ forceScrollingToCaret();
+
+ return result;
+}
+
+void forceScrollingToCaret() {
if ((style & SWT.READ_ONLY) == 0) {
Point oldSelection = this.getSelection();
Point tmpSelection = new Point(0, 0);
@@ -2963,12 +2983,10 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
this.setSelection(oldSelection);
}
}
-
- return result;
}
@Override
-LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long wParam, long lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
OS.InvalidateRect (handle, null, true);
@@ -2976,7 +2994,7 @@ LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
@@ -3004,15 +3022,15 @@ LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- long /*int*/ hwndParent = parent.handle;
- long /*int*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
+ long hwndParent = parent.handle;
+ long hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
OS.MapWindowPoints (0, hwndParent, rect, 2);
- long /*int*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
while (hwndChild != 0) {
if (hwndChild != handle) {
OS.GetWindowRect (hwndChild, rect);
OS.MapWindowPoints (0, hwndParent, rect, 2);
- long /*int*/ rgn2 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long rgn2 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
OS.CombineRgn (rgn1, rgn1, rgn2, OS.RGN_DIFF);
OS.DeleteObject (rgn2);
}
@@ -3028,11 +3046,11 @@ LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmChar (long hwnd, long wParam, long lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
/*
* Feature in Windows. For some reason, when the
* widget is a single line text widget, when the
@@ -3074,7 +3092,7 @@ LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
if ((style & SWT.READ_ONLY) != 0) return LRESULT.ZERO;
Point selection = getSelection ();
- long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
+ long hwndText = OS.GetDlgItem (handle, CBID_EDIT);
int x = selection.x;
int y = selection.y;
if (x == y) {
@@ -3099,7 +3117,7 @@ LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return result;
}
-LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmClipboard (long hwndText, int msg, long wParam, long lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -3158,11 +3176,11 @@ LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -3175,7 +3193,7 @@ LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.CBN_EDITCHANGE:
@@ -3204,7 +3222,7 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
* match the list selection. The fix is to force the text field
* to match the list selection by re-selecting the list item.
*/
- int index = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (index != OS.CB_ERR) {
OS.SendMessage (handle, OS.CB_SETCURSEL, index, 0);
}
@@ -3226,17 +3244,9 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
case OS.CBN_DROPDOWN:
setCursor ();
updateDropDownHeight ();
+ updateDropDownTheme ();
break;
case OS.CBN_KILLFOCUS:
- /*
- * Bug in Windows. When a combo box that is read only
- * is disposed in CBN_KILLFOCUS, Windows segment faults.
- * The fix is to send focus from WM_KILLFOCUS instead
- * of CBN_KILLFOCUS.
- *
- * NOTE: In version 6 of COMCTL32.DLL, the bug is fixed.
- */
- if ((style & SWT.READ_ONLY) != 0) break;
sendFocusEvent (SWT.FocusOut);
if (isDisposed ()) return LRESULT.ZERO;
break;
@@ -3246,7 +3256,7 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
event.doit = true;
sendEvent (SWT.OrientationChange, event);
if (!event.doit) {
- long /*int*/ hwnd = lParam;
+ long hwnd = lParam;
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if (code == OS.EN_ALIGN_LTR_EC) {
@@ -3274,12 +3284,12 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmIMEChar (long hwnd, long wParam, long lParam) {
/* Process a DBCS character */
Display display = this.display;
display.lastKey = 0;
- display.lastAscii = (int)/*64*/wParam;
+ display.lastAscii = (int)wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ZERO;
@@ -3293,7 +3303,7 @@ LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* them to the application.
*/
ignoreCharacter = true;
- long /*int*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+ long result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, hwnd, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -3309,18 +3319,18 @@ LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
}
@Override
-LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmKeyDown (long hwnd, long wParam, long lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
ignoreDefaultSelection = false;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_LEFT:
case OS.VK_UP:
case OS.VK_RIGHT:
case OS.VK_DOWN:
if (segments != null) {
- long /*int*/ code = 0;
+ long code = 0;
int [] start = new int [1], end = new int [1], newStart = new int [1], newEnd = new int [1];
OS.SendMessage (handle, OS.CB_GETEDITSEL, start, end);
while (true) {
@@ -3351,7 +3361,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
}
@Override
-LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmSysKeyDown (long hwnd, long wParam, long lParam) {
/*
* Feature in Windows. When an editable combo box is dropped
* down using Alt+Down and the text in the entry field partially
@@ -3359,13 +3369,13 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
* send WM_COMMAND with CBN_SELCHANGE. The fix is to detect that
* the selection has changed and issue the notification.
*/
- int oldSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ int oldSelection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
LRESULT result = super.wmSysKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
if ((style & SWT.READ_ONLY) == 0) {
if (wParam == OS.VK_DOWN) {
- long /*int*/ code = callWindowProc (hwnd, OS.WM_SYSKEYDOWN, wParam, lParam);
- int newSelection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
+ long code = callWindowProc (hwnd, OS.WM_SYSKEYDOWN, wParam, lParam);
+ int newSelection = (int)OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (oldSelection != newSelection) {
sendEvent (SWT.Modify);
if (isDisposed ()) return LRESULT.ZERO;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index f5751e7861..63dab140ae 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -101,7 +101,7 @@ public Composite (Composite parent, int style) {
Control [] _getChildren () {
int count = 0;
- long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild == 0) return new Control [0];
while (hwndChild != 0) {
count++;
@@ -126,15 +126,15 @@ Control [] _getChildren () {
Control [] _getTabList () {
if (tabList == null) return tabList;
int count = 0;
- for (int i=0; i<tabList.length; i++) {
- if (!tabList [i].isDisposed ()) count++;
+ for (Control element : tabList) {
+ if (!element.isDisposed ()) count++;
}
if (count == tabList.length) return tabList;
Control [] newList = new Control [count];
int index = 0;
- for (int i=0; i<tabList.length; i++) {
- if (!tabList [i].isDisposed ()) {
- newList [index++] = tabList [i];
+ for (Control element : tabList) {
+ if (!element.isDisposed ()) {
+ newList [index++] = element;
}
}
tabList = newList;
@@ -176,7 +176,7 @@ void checkBuffered () {
void checkComposited () {
if ((state & CANVAS) != 0) {
if ((style & SWT.TRANSPARENT) != 0) {
- long /*int*/ hwndParent = parent.handle;
+ long hwndParent = parent.handle;
int bits = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
bits |= OS.WS_EX_COMPOSITED;
OS.SetWindowLong (hwndParent, OS.GWL_EXSTYLE, bits);
@@ -194,8 +194,7 @@ Widget [] computeTabList () {
Widget result [] = super.computeTabList ();
if (result.length == 0) return result;
Control [] list = tabList != null ? _getTabList () : _getChildren ();
- for (int i=0; i<list.length; i++) {
- Control child = list [i];
+ for (Control child : list) {
Widget [] childList = child.computeTabList ();
if (childList.length != 0) {
Widget [] newResult = new Widget [result.length + childList.length];
@@ -262,13 +261,13 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
//#define PW_CLIENTONLY 0x00000001
//DCOrg() wrong
//topHandle wrong for Tree?
- long /*int*/ hDC = gc.handle;
+ long hDC = gc.handle;
int nSavedDC = OS.SaveDC (hDC);
OS.IntersectClipRect (hDC, 0, 0, width, height);
//WRONG PARENT
POINT lpPoint = new POINT ();
- long /*int*/ hwndParent = OS.GetParent (handle);
+ long hwndParent = OS.GetParent (handle);
OS.MapWindowPoints (handle, hwndParent, lpPoint, 1);
RECT rect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -364,7 +363,7 @@ void drawBackgroundInPixels(GC gc, int x, int y, int width, int height, int offs
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- long /*int*/ hDC = gc.handle;
+ long hDC = gc.handle;
int pixel = background == -1 ? gc.getBackground ().handle : -1;
drawBackground (hDC, rect, pixel, offsetX, offsetY);
}
@@ -377,9 +376,7 @@ Composite findDeferredControl () {
Menu [] findMenus (Control control) {
if (control == this) return new Menu [0];
Menu result [] = super.findMenus (control);
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : _getChildren ()) {
Menu [] menuList = child.findMenus (control);
if (menuList.length != 0) {
Menu [] newResult = new Menu [result.length + menuList.length];
@@ -394,17 +391,16 @@ Menu [] findMenus (Control control) {
@Override
void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) {
super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- children [i].fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
+ for (Control child : _getChildren ()) {
+ child.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
}
}
void fixTabList (Control control) {
if (tabList == null) return;
int count = 0;
- for (int i=0; i<tabList.length; i++) {
- if (tabList [i] == control) count++;
+ for (Control element : tabList) {
+ if (element == control) count++;
}
if (count == 0) return;
Control [] newList = null;
@@ -412,9 +408,9 @@ void fixTabList (Control control) {
if (length != 0) {
newList = new Control [length];
int index = 0;
- for (int i=0; i<tabList.length; i++) {
- if (tabList [i] != control) {
- newList [index++] = tabList [i];
+ for (Control element : tabList) {
+ if (element != control) {
+ newList [index++] = element;
}
}
}
@@ -476,7 +472,7 @@ int getChildrenCount () {
* non-registered children.
*/
int count = 0;
- long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
count++;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -518,14 +514,14 @@ public Control [] getTabList () {
if (tabList == null) {
int count = 0;
Control [] list =_getChildren ();
- for (int i=0; i<list.length; i++) {
- if (list [i].isTabGroup ()) count++;
+ for (Control element : list) {
+ if (element.isTabGroup ()) count++;
}
tabList = new Control [count];
int index = 0;
- for (int i=0; i<list.length; i++) {
- if (list [i].isTabGroup ()) {
- tabList [index++] = list [i];
+ for (Control element : list) {
+ if (element.isTabGroup ()) {
+ tabList [index++] = element;
}
}
}
@@ -806,8 +802,7 @@ public void layout (Control [] changed) {
public void layout (Control [] changed, int flags) {
checkWidget ();
if (changed != null) {
- for (int i=0; i<changed.length; i++) {
- Control control = changed [i];
+ for (Control control : changed) {
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
boolean ancestor = false;
@@ -821,8 +816,8 @@ public void layout (Control [] changed, int flags) {
}
int updateCount = 0;
Composite [] update = new Composite [16];
- for (int i=0; i<changed.length; i++) {
- Control child = changed [i];
+ for (Control element : changed) {
+ Control child = element;
Composite composite = child.parent;
// Update layout when the list of children has changed.
// See bug 497812.
@@ -843,7 +838,7 @@ public void layout (Control [] changed, int flags) {
composite = child.parent;
}
}
- if ((flags & SWT.DEFER) != 0) {
+ if (!display.externalEventLoop && (flags & SWT.DEFER) != 0) {
setLayoutDeferred (true);
display.addLayoutDeferred (this);
}
@@ -853,7 +848,7 @@ public void layout (Control [] changed, int flags) {
} else {
if (layout == null && (flags & SWT.ALL) == 0) return;
markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
- if ((flags & SWT.DEFER) != 0) {
+ if (!display.externalEventLoop && (flags & SWT.DEFER) != 0) {
setLayoutDeferred (true);
display.addLayoutDeferred (this);
}
@@ -868,23 +863,21 @@ void markLayout (boolean changed, boolean all) {
if (changed) state |= LAYOUT_CHANGED;
}
if (all) {
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- children [i].markLayout (changed, all);
+ for (Control element : _getChildren ()) {
+ element.markLayout (changed, all);
}
}
}
Point minimumSize (int wHint, int hHint, boolean changed) {
- Control [] children = _getChildren ();
/*
* Since getClientArea can be overridden by subclasses, we cannot
* call getClientAreaInPixels directly.
*/
Rectangle clientArea = DPIUtil.autoScaleUp(getClientArea ());
int width = 0, height = 0;
- for (int i=0; i<children.length; i++) {
- Rectangle rect = DPIUtil.autoScaleUp(children [i].getBounds ());
+ for (Control element : _getChildren ()) {
+ Rectangle rect = DPIUtil.autoScaleUp(element.getBounds ());
width = Math.max (width, rect.x - clientArea.x + rect.width);
height = Math.max (height, rect.y - clientArea.y + rect.height);
}
@@ -894,9 +887,8 @@ Point minimumSize (int wHint, int hHint, boolean changed) {
@Override
boolean redrawChildren () {
if (!super.redrawChildren ()) return false;
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- children [i].redrawChildren ();
+ for (Control element : _getChildren ()) {
+ element.redrawChildren ();
}
return true;
}
@@ -906,8 +898,8 @@ void releaseParent () {
super.releaseParent ();
if ((state & CANVAS) != 0) {
if ((style & SWT.TRANSPARENT) != 0) {
- long /*int*/ hwndParent = parent.handle;
- long /*int*/ hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
+ long hwndParent = parent.handle;
+ long hwndChild = OS.GetWindow (hwndParent, OS.GW_CHILD);
while (hwndChild != 0) {
if (hwndChild != handle) {
int bits = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
@@ -924,21 +916,26 @@ void releaseParent () {
@Override
void releaseChildren (boolean destroy) {
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
- if (child != null && !child.isDisposed ()) {
- child.release (false);
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ for (Control child : _getChildren ()) {
+ if (child == null || child.isDisposed ())
+ continue;
+
+ try {
+ child.release (false);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
}
+ super.releaseChildren (destroy);
}
- super.releaseChildren (destroy);
}
@Override
void releaseWidget () {
super.releaseWidget ();
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
- long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
if (hwndChild != 0) {
int threadId = OS.GetWindowThreadProcessId (hwndChild, null);
if (threadId != OS.GetCurrentThreadId ()) {
@@ -960,9 +957,7 @@ void removeControl (Control control) {
@Override
void reskinChildren (int flags) {
super.reskinChildren (flags);
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : _getChildren ()) {
if (child != null) child.reskin (flags);
}
}
@@ -980,24 +975,13 @@ void resizeChildren () {
boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
if (pwp == null) return true;
- long /*int*/ hdwp = 0;
+ long hdwp = 0;
if (defer) {
hdwp = OS.BeginDeferWindowPos (pwp.length);
if (hdwp == 0) return false;
}
- for (int i=0; i<pwp.length; i++) {
- WINDOWPOS wp = pwp [i];
+ for (WINDOWPOS wp : pwp) {
if (wp != null) {
- /*
- * This code is intentionally commented. All widgets that
- * are created by SWT have WS_CLIPSIBLINGS to ensure that
- * application code does not draw outside of the control.
- */
-// int count = parent.getChildrenCount ();
-// if (count > 1) {
-// int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
-// if ((bits & OS.WS_CLIPSIBLINGS) == 0) wp.flags |= OS.SWP_NOCOPYBITS;
-// }
if (defer) {
hdwp = OS.DeferWindowPos (hdwp, wp.hwnd, 0, wp.x, wp.y, wp.cx, wp.cy, wp.flags);
if (hdwp == 0) return false;
@@ -1010,7 +994,7 @@ boolean resizeChildren (boolean defer, WINDOWPOS [] pwp) {
return true;
}
-void resizeEmbeddedHandle(long /*int*/ embeddedHandle, int width, int height) {
+void resizeEmbeddedHandle(long embeddedHandle, int width, int height) {
if (embeddedHandle == 0) return;
int [] processID = new int [1];
int threadId = OS.GetWindowThreadProcessId (embeddedHandle, processID);
@@ -1019,7 +1003,6 @@ void resizeEmbeddedHandle(long /*int*/ embeddedHandle, int width, int height) {
if (display.msgHook == 0) {
display.getMsgCallback = new Callback (display, "getMsgProc", 3);
display.getMsgProc = display.getMsgCallback.getAddress ();
- if (display.getMsgProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
display.msgHook = OS.SetWindowsHookEx (OS.WH_GETMESSAGE, display.getMsgProc, OS.GetLibraryHandle(), threadId);
OS.PostThreadMessage (threadId, OS.WM_NULL, 0, 0);
}
@@ -1061,9 +1044,8 @@ void sendResize () {
public void setBackgroundMode (int mode) {
checkWidget ();
backgroundMode = mode;
- Control [] children = _getChildren ();
- for (int i = 0; i < children.length; i++) {
- children [i].updateBackgroundMode ();
+ for (Control element : _getChildren ()) {
+ element.updateBackgroundMode ();
}
}
@@ -1090,12 +1072,10 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean
public boolean setFocus () {
checkWidget ();
Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : children) {
if (child.setRadioFocus (false)) return true;
}
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : children) {
if (child.setFocus ()) return true;
}
return super.setFocus ();
@@ -1169,8 +1149,7 @@ public void setLayoutDeferred (boolean defer) {
public void setTabList (Control [] tabList) {
checkWidget ();
if (tabList != null) {
- for (int i=0; i<tabList.length; i++) {
- Control control = tabList [i];
+ for (Control control : tabList) {
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.parent != this) error (SWT.ERROR_INVALID_PARENT);
@@ -1206,13 +1185,15 @@ boolean setTabGroupFocus () {
}
if (takeFocus && setTabItemFocus ()) return true;
Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
- if (child.isTabItem () && child.setRadioFocus (true)) return true;
+ for (Control child : children) {
+ /*
+ * It is unlikely but possible that a child is disposed at this point, for more
+ * details refer bug 381668.
+ */
+ if (!child.isDisposed() && child.isTabItem() && child.setRadioFocus (true)) return true;
}
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
- if (child.isTabItem () && !child.isTabGroup () && child.setTabItemFocus ()) {
+ for (Control child : children) {
+ if (!child.isDisposed() && child.isTabItem () && !child.isTabGroup () && child.setTabItemFocus ()) {
return true;
}
}
@@ -1245,7 +1226,7 @@ String toolTipText (NMTTDISPINFO hdr) {
Shell shell = getShell ();
if ((hdr.uFlags & OS.TTF_IDISHWND) == 0) {
String string = null;
- ToolTip toolTip = shell.findToolTip ((int)/*64*/hdr.idFrom);
+ ToolTip toolTip = shell.findToolTip ((int)hdr.idFrom);
if (toolTip != null) {
string = toolTip.message;
if (string == null || string.length () == 0) string = " ";
@@ -1269,9 +1250,7 @@ String toolTipText (NMTTDISPINFO hdr) {
boolean translateMnemonic (Event event, Control control) {
if (super.translateMnemonic (event, control)) return true;
if (control != null) {
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : _getChildren ()) {
if (child.translateMnemonic (event, control)) return true;
}
}
@@ -1282,14 +1261,14 @@ boolean translateMnemonic (Event event, Control control) {
boolean translateTraversal (MSG msg) {
if ((state & CANVAS) != 0 ) {
if ((style & SWT.EMBEDDED) != 0) return false;
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_UP:
case OS.VK_LEFT:
case OS.VK_DOWN:
case OS.VK_RIGHT:
case OS.VK_PRIOR:
case OS.VK_NEXT:
- int uiState = (int)/*64*/OS.SendMessage (msg.hwnd, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (msg.hwnd, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) != 0) {
OS.SendMessage (msg.hwnd, OS.WM_UPDATEUISTATE, OS.MAKEWPARAM (OS.UIS_CLEAR, OS.UISF_HIDEFOCUS), 0);
}
@@ -1302,10 +1281,9 @@ boolean translateTraversal (MSG msg) {
@Override
void updateBackgroundColor () {
super.updateBackgroundColor ();
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- if ((children [i].state & PARENT_BACKGROUND) != 0) {
- children [i].updateBackgroundColor ();
+ for (Control element : _getChildren ()) {
+ if ((element.state & PARENT_BACKGROUND) != 0) {
+ element.updateBackgroundColor ();
}
}
}
@@ -1313,10 +1291,9 @@ void updateBackgroundColor () {
@Override
void updateBackgroundImage () {
super.updateBackgroundImage ();
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- if ((children [i].state & PARENT_BACKGROUND) != 0) {
- children [i].updateBackgroundImage ();
+ for (Control element : _getChildren ()) {
+ if ((element.state & PARENT_BACKGROUND) != 0) {
+ element.updateBackgroundImage ();
}
}
}
@@ -1324,18 +1301,15 @@ void updateBackgroundImage () {
@Override
void updateBackgroundMode () {
super.updateBackgroundMode ();
- Control [] children = _getChildren ();
- for (int i = 0; i < children.length; i++) {
- children [i].updateBackgroundMode ();
+ for (Control element : _getChildren ()) {
+ element.updateBackgroundMode ();
}
}
@Override
void updateFont (Font oldFont, Font newFont) {
super.updateFont (oldFont, newFont);
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- Control control = children [i];
+ for (Control control : _getChildren ()) {
if (!control.isDisposed ()) {
control.updateFont (oldFont, newFont);
}
@@ -1363,9 +1337,8 @@ void updateLayout (boolean resize, boolean all) {
}
if (all) {
state &= ~LAYOUT_CHILD;
- Control [] children = _getChildren ();
- for (int i=0; i<children.length; i++) {
- children [i].updateLayout (resize, all);
+ for (Control element : _getChildren ()) {
+ element.updateLayout (resize, all);
}
}
}
@@ -1393,8 +1366,8 @@ void updateOrientation () {
}
void updateUIState () {
- long /*int*/ hwndShell = getShell ().handle;
- int uiState = /*64*/(int)OS.SendMessage (hwndShell, OS.WM_QUERYUISTATE, 0, 0);
+ long hwndShell = getShell ().handle;
+ int uiState = (int)OS.SendMessage (hwndShell, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) != 0) {
OS.SendMessage (hwndShell, OS.WM_CHANGEUISTATE, OS.MAKEWPARAM (OS.UIS_CLEAR, OS.UISF_HIDEFOCUS), 0);
}
@@ -1407,7 +1380,7 @@ int widgetStyle () {
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1420,7 +1393,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1436,16 +1409,16 @@ LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETFONT (long wParam, long lParam) {
LRESULT result = super.WM_GETFONT (wParam, lParam);
if (result != null) return result;
- long /*int*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
if (code != 0) return new LRESULT (code);
return new LRESULT (font != null ? font.handle : defaultFont ());
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -1459,7 +1432,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCHITTEST (long wParam, long lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -1476,7 +1449,7 @@ LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
*/
if (OS.IsAppThemed ()) {
if ((state & CANVAS)!= 0) {
- long /*int*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (code == OS.HTCLIENT) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -1496,7 +1469,7 @@ LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long wParam, long lParam) {
if ((state & CANVAS) != 0 && (style & SWT.EMBEDDED) != 0) {
if (OS.LOWORD (wParam) == OS.WM_CREATE) {
RECT rect = new RECT ();
@@ -1508,7 +1481,7 @@ LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PAINT (long wParam, long lParam) {
if ((state & DISPOSE_SENT) != 0) return LRESULT.ZERO;
if ((state & CANVAS) == 0 || (state & FOREIGN_HANDLE) != 0) {
return super.WM_PAINT (wParam, lParam);
@@ -1531,15 +1504,15 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
}
}
if (bufferedPaint) {
- long /*int*/ hDC = OS.BeginPaint (handle, ps);
+ long hDC = OS.BeginPaint (handle, ps);
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- long /*int*/ [] phdc = new long /*int*/ [1];
+ long [] phdc = new long [1];
int flags = OS.BPBF_COMPATIBLEBITMAP;
RECT prcTarget = new RECT ();
OS.SetRect (prcTarget, ps.left, ps.top, ps.right, ps.bottom);
- long /*int*/ hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
+ long hBufferedPaint = OS.BeginBufferedPaint (hDC, prcTarget, flags, null, phdc);
GCData data = new GCData ();
data.device = display;
data.foreground = getForegroundPixel ();
@@ -1547,7 +1520,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if (control == null) control = this;
data.background = control.getBackgroundPixel ();
data.font = Font.win32_new(display, OS.SendMessage (handle, OS.WM_GETFONT, 0, 0));
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((style & SWT.NO_BACKGROUND) != 0) {
/* This code is intentionally commented because it may be slow to copy bits from the screen */
//paintGC.copyArea (image, ps.left, ps.top);
@@ -1575,7 +1548,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
GC gc = GC.win32_new (this, data);
/* Get the system region for the paint HDC */
- long /*int*/ sysRgn = 0;
+ long sysRgn = 0;
if ((style & (SWT.DOUBLE_BUFFERED | SWT.TRANSPARENT)) != 0 || (style & SWT.NO_MERGE_PAINTS) != 0) {
sysRgn = OS.CreateRectRgn (0, 0, 0, 0);
if (OS.GetRandomRgn (gc.handle, sysRgn, OS.SYSRGN) == 1) {
@@ -1583,7 +1556,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
int nBytes = OS.GetRegionData (sysRgn, 0, null);
int [] lpRgnData = new int [nBytes / 4];
OS.GetRegionData (sysRgn, nBytes, lpRgnData);
- long /*int*/ newSysRgn = OS.ExtCreateRegion (new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
+ long newSysRgn = OS.ExtCreateRegion (new float [] {-1, 0, 0, 1, 0, 0}, nBytes, lpRgnData);
OS.DeleteObject (sysRgn);
sysRgn = newSysRgn;
}
@@ -1673,7 +1646,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
gc.dispose ();
}
} else {
- long /*int*/ hDC = OS.BeginPaint (handle, ps);
+ long hDC = OS.BeginPaint (handle, ps);
if ((style & (SWT.NO_BACKGROUND | SWT.TRANSPARENT)) == 0) {
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
@@ -1700,7 +1673,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PRINTCLIENT (long wParam, long lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0) {
@@ -1719,7 +1692,7 @@ LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
if (control == null) control = this;
data.background = control.getBackgroundPixel ();
data.font = Font.win32_new(display, OS.SendMessage (handle, OS.WM_GETFONT, 0, 0));
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (wParam, data);
Event event = new Event ();
event.gc = gc;
@@ -1734,13 +1707,13 @@ LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFONT (long wParam, long lParam) {
if (lParam != 0) OS.InvalidateRect (handle, null, true);
return super.WM_SETFONT (wParam, lParam);
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = null;
if ((state & RESIZE_DEFERRED) != 0) {
result = super.WM_SIZE (wParam, lParam);
@@ -1789,10 +1762,10 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long wParam, long lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
- long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
OS.SendMessage (hwndChild, OS.WM_SYSCOLORCHANGE, 0, 0);
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -1801,7 +1774,7 @@ LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOMMAND (long wParam, long lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
@@ -1820,13 +1793,13 @@ LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
* does not redraw properly. The fix is to detect this case and
* redraw the non-client area.
*/
- int cmd = (int)/*64*/wParam & 0xFFF0;
+ int cmd = (int)wParam & 0xFFF0;
switch (cmd) {
case OS.SC_HSCROLL:
case OS.SC_VSCROLL:
boolean showHBar = horizontalBar != null && horizontalBar.getVisible ();
boolean showVBar = verticalBar != null && verticalBar.getVisible ();
- long /*int*/ code = callWindowProc (handle, OS.WM_SYSCOMMAND, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_SYSCOMMAND, wParam, lParam);
if ((showHBar != (horizontalBar != null && horizontalBar.getVisible ())) ||
(showVBar != (verticalBar != null && verticalBar.getVisible ()))) {
int flags = OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_UPDATENOW;
@@ -1841,7 +1814,7 @@ LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long wParam, long lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
if ((state & CANVAS) != 0 && hooks (SWT.Paint)) {
@@ -1851,20 +1824,20 @@ LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNCPaint (long hwnd, long wParam, long lParam) {
LRESULT result = super.wmNCPaint (hwnd, wParam, lParam);
if (result != null) return result;
- long /*int*/ borderHandle = borderHandle ();
+ long borderHandle = borderHandle ();
if ((state & CANVAS) != 0 || (hwnd == borderHandle && handle != borderHandle)) {
if (OS.IsAppThemed ()) {
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_CLIENTEDGE) != 0) {
- long /*int*/ code = 0;
+ long code = 0;
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if ((bits2 & (OS.WS_HSCROLL | OS.WS_VSCROLL)) != 0) {
code = callWindowProc (hwnd, OS.WM_NCPAINT, wParam, lParam);
}
- long /*int*/ hDC = OS.GetWindowDC (hwnd);
+ long hDC = OS.GetWindowDC (hwnd);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -1882,7 +1855,7 @@ LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
}
@Override
-LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
/*
* Feature in Windows. When the tool tip control is
@@ -1907,7 +1880,7 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
* check if the parent is already on top and neither set or clear
* the topmost status of the tool tip.
*/
- long /*int*/ hwndParent = hdr.hwndFrom;
+ long hwndParent = hdr.hwndFrom;
do {
hwndParent = OS.GetParent (hwndParent);
if (hwndParent == 0) break;
@@ -1929,7 +1902,7 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
display.lockActiveWindow = true;
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOSIZE;
- long /*int*/ hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;
+ long hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;
OS.SetWindowPos (hdr.hwndFrom, hwndInsertAfter, 0, 0, 0, 0, flags);
display.lockActiveWindow = false;
break;
@@ -1961,12 +1934,12 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
* the orientation of the control.
*/
Widget widget = null;
- long /*int*/ hwnd = hdr.idFrom;
+ long hwnd = hdr.idFrom;
if ((lpnmtdi.uFlags & OS.TTF_IDISHWND) != 0) {
widget = display.getControl (hwnd);
} else {
if (hdr.hwndFrom == shell.toolTipHandle || hdr.hwndFrom == shell.balloonTipHandle) {
- widget = shell.findToolTip ((int)/*64*/hdr.idFrom);
+ widget = shell.findToolTip ((int)hdr.idFrom);
}
}
if (widget != null) {
@@ -1988,4 +1961,9 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return super.wmNotify (hdr, wParam, lParam);
}
+@Override
+public String toString() {
+ return super.toString() + " [layout=" + layout + "]";
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index c0ef868153..7bddfb010f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -15,6 +15,8 @@
package org.eclipse.swt.widgets;
+import java.util.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.accessibility.*;
import org.eclipse.swt.events.*;
@@ -60,7 +62,7 @@ public abstract class Control extends Widget implements Drawable {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
Composite parent;
Cursor cursor;
Menu menu, activeMenu;
@@ -541,7 +543,7 @@ int binarySearch (int [] indices, int start, int end, int index) {
return -low - 1;
}
-long /*int*/ borderHandle () {
+long borderHandle () {
return handle;
}
@@ -582,10 +584,6 @@ void checkComposited () {
/* Do nothing */
}
-boolean checkHandle (long /*int*/ hwnd) {
- return hwnd == handle;
-}
-
void checkMirrored () {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
@@ -706,7 +704,7 @@ Widget [] computeTabList () {
}
void createHandle () {
- long /*int*/ hwndParent = widgetParent ();
+ long hwndParent = widgetParent ();
handle = OS.CreateWindowEx (
widgetExtStyle (),
windowClass (),
@@ -722,12 +720,6 @@ void createHandle () {
if ((bits & OS.WS_CHILD) != 0) {
OS.SetWindowLongPtr (handle, OS.GWLP_ID, handle);
}
- if (OS.IsDBLocale && hwndParent != 0) {
- long /*int*/ hIMC = OS.ImmGetContext (hwndParent);
- OS.ImmAssociateContext (handle, hIMC);
- OS.ImmReleaseContext (hwndParent, hIMC);
- }
-
}
void checkGesture () {
@@ -738,17 +730,11 @@ void checkGesture () {
* Feature in Windows 7: All gestures are enabled by default except GID_ROTATE.
* Enable it explicitly by calling SetGestureConfig.
*/
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pConfigs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, GESTURECONFIG.sizeof);
- if (pConfigs != 0) {
- GESTURECONFIG config = new GESTURECONFIG();
- config.dwID = OS.GID_ROTATE;
- config.dwWant = 1;
- config.dwBlock = 0;
- OS.MoveMemory (pConfigs, config, GESTURECONFIG.sizeof);
- OS.SetGestureConfig (handle, 0, 1, pConfigs, GESTURECONFIG.sizeof);
- OS.HeapFree (hHeap, 0, pConfigs);
- }
+ GESTURECONFIG config = new GESTURECONFIG();
+ config.dwID = OS.GID_ROTATE;
+ config.dwWant = 1;
+ config.dwBlock = 0;
+ OS.SetGestureConfig (handle, 0, 1, config, GESTURECONFIG.sizeof);
}
}
}
@@ -776,7 +762,7 @@ int defaultBackground () {
return OS.GetSysColor (OS.COLOR_BTNFACE);
}
-long /*int*/ defaultFont () {
+long defaultFont () {
return display.getSystemFont ().handle;
}
@@ -790,7 +776,7 @@ void deregister () {
@Override
void destroyWidget () {
- long /*int*/ hwnd = topHandle ();
+ long hwnd = topHandle ();
releaseHandle ();
if (hwnd != 0) {
OS.DestroyWindow (hwnd);
@@ -919,7 +905,7 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) {
if ((stateMask & SWT.BUTTON3) != 0) wParam |= OS.MK_RBUTTON;
if ((stateMask & SWT.BUTTON4) != 0) wParam |= OS.MK_XBUTTON1;
if ((stateMask & SWT.BUTTON5) != 0) wParam |= OS.MK_XBUTTON2;
- long /*int*/ lParam = OS.MAKELPARAM (x, y);
+ long lParam = OS.MAKELPARAM (x, y);
OS.SendMessage (handle, OS.WM_LBUTTONUP, wParam, lParam);
}
return false;
@@ -927,17 +913,17 @@ boolean dragDetect (int button, int count, int stateMask, int x, int y) {
return sendDragEvent (button, stateMask, x, y);
}
-void drawBackground (long /*int*/ hDC) {
+void drawBackground (long hDC) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
drawBackground (hDC, rect);
}
-void drawBackground (long /*int*/ hDC, RECT rect) {
+void drawBackground (long hDC, RECT rect) {
drawBackground (hDC, rect, -1, 0, 0);
}
-void drawBackground (long /*int*/ hDC, RECT rect, int pixel, int tx, int ty) {
+void drawBackground (long hDC, RECT rect, int pixel, int tx, int ty) {
Control control = findBackgroundControl ();
if (control != null) {
if (control.backgroundImage != null) {
@@ -961,21 +947,21 @@ void drawBackground (long /*int*/ hDC, RECT rect, int pixel, int tx, int ty) {
fillBackground (hDC, pixel, rect);
}
-void drawImageBackground (long /*int*/ hDC, long /*int*/ hwnd, long /*int*/ hBitmap, RECT rect, int tx, int ty) {
+void drawImageBackground (long hDC, long hwnd, long hBitmap, RECT rect, int tx, int ty) {
RECT rect2 = new RECT ();
OS.GetClientRect (hwnd, rect2);
OS.MapWindowPoints (hwnd, handle, rect2, 2);
- long /*int*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ long hBrush = findBrush (hBitmap, OS.BS_PATTERN);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (hDC, lpPoint);
OS.SetBrushOrgEx (hDC, -rect2.left - lpPoint.x - tx, -rect2.top - lpPoint.y - ty, lpPoint);
- long /*int*/ hOldBrush = OS.SelectObject (hDC, hBrush);
+ long hOldBrush = OS.SelectObject (hDC, hBrush);
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SetBrushOrgEx (hDC, lpPoint.x, lpPoint.y, null);
OS.SelectObject (hDC, hOldBrush);
}
-void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
+void drawThemeBackground (long hDC, long hwnd, RECT rect) {
/* Do nothing */
}
@@ -983,21 +969,20 @@ void enableDrag (boolean enabled) {
/* Do nothing */
}
+void maybeEnableDarkSystemTheme() {
+ maybeEnableDarkSystemTheme(handle);
+}
+
void enableWidget (boolean enabled) {
OS.EnableWindow (handle, enabled);
}
-void fillBackground (long /*int*/ hDC, int pixel, RECT rect) {
+void fillBackground (long hDC, int pixel, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
- long /*int*/ hPalette = display.hPalette;
- if (hPalette != 0) {
- OS.SelectPalette (hDC, hPalette, false);
- OS.RealizePalette (hDC);
- }
OS.FillRect (hDC, rect, findBrush (pixel, OS.BS_SOLID));
}
-void fillImageBackground (long /*int*/ hDC, Control control, RECT rect, int tx, int ty) {
+void fillImageBackground (long hDC, Control control, RECT rect, int tx, int ty) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
Image image = control.backgroundImage;
@@ -1007,7 +992,7 @@ void fillImageBackground (long /*int*/ hDC, Control control, RECT rect, int tx,
}
}
-void fillThemeBackground (long /*int*/ hDC, Control control, RECT rect) {
+void fillThemeBackground (long hDC, Control control, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
if (control != null) {
control.drawThemeBackground (hDC, handle, rect);
@@ -1019,7 +1004,7 @@ Control findBackgroundControl () {
return (parent != null && (state & PARENT_BACKGROUND) != 0) ? parent.findBackgroundControl () : null;
}
-long /*int*/ findBrush (long /*int*/ value, int lbStyle) {
+long findBrush (long value, int lbStyle) {
return parent.findBrush (value, lbStyle);
}
@@ -1051,7 +1036,7 @@ char findMnemonic (String string) {
if (string.charAt (index) != '&') return string.charAt (index);
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) {
@@ -1062,15 +1047,8 @@ void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, De
void fixFocus (Control focusControl) {
Shell shell = getShell ();
Control control = this;
- Display display = this.display;
- boolean oldFixFocus = display.fixFocus;
- display.fixFocus = true;
- try {
- while (control != shell && (control = control.parent) != null) {
- if (control.setFocus ()) return;
- }
- } finally {
- display.fixFocus = oldFixFocus;
+ while (control != shell && (control = control.parent) != null) {
+ if (control.setFocus ()) return;
}
shell.setSavedFocus (focusControl);
OS.SetFocus (0);
@@ -1125,16 +1103,6 @@ void forceResize () {
for (int i=0; i<lpwp.length; i++) {
WINDOWPOS wp = lpwp [i];
if (wp != null && wp.hwnd == handle) {
- /*
- * This code is intentionally commented. All widgets that
- * are created by SWT have WS_CLIPSIBLINGS to ensure that
- * application code does not draw outside of the control.
- */
-// int count = parent.getChildrenCount ();
-// if (count > 1) {
-// int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
-// if ((bits & OS.WS_CLIPSIBLINGS) == 0) wp.flags |= OS.SWP_NOCOPYBITS;
-// }
OS.SetWindowPos (wp.hwnd, 0, wp.x, wp.y, wp.cx, wp.cy, wp.flags);
lpwp [i] = null;
return;
@@ -1234,12 +1202,24 @@ public int getBorderWidth () {
}
int getBorderWidthInPixels () {
- long /*int*/ borderHandle = borderHandle ();
+ long borderHandle = borderHandle ();
int bits1 = OS.GetWindowLong (borderHandle, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_CLIENTEDGE) != 0) return OS.GetSystemMetrics (OS.SM_CXEDGE);
if ((bits1 & OS.WS_EX_STATICEDGE) != 0) return OS.GetSystemMetrics (OS.SM_CXBORDER);
int bits2 = OS.GetWindowLong (borderHandle, OS.GWL_STYLE);
- if ((bits2 & OS.WS_BORDER) != 0) return OS.GetSystemMetrics (OS.SM_CXBORDER);
+
+ if ((bits2 & OS.WS_BORDER) != 0) {
+ /*
+ * For compatibility reasons, isUseWsBorder() shall not change layout size
+ * compared to previously used WS_EX_CLIENTEDGE. Removing this workaround
+ * saves screen space, but could break some layouts.
+ */
+ if (isUseWsBorder ())
+ return OS.GetSystemMetrics (OS.SM_CXEDGE);
+
+ return OS.GetSystemMetrics (OS.SM_CXBORDER);
+ }
+
return 0;
}
@@ -1265,7 +1245,7 @@ Rectangle getBoundsInPixels () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
+ long hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
@@ -1279,13 +1259,12 @@ int getCodePage () {
String getClipboardText () {
String string = "";
if (OS.OpenClipboard (0)) {
- long /*int*/ hMem = OS.GetClipboardData (OS.CF_UNICODETEXT);
+ long hMem = OS.GetClipboardData (OS.CF_UNICODETEXT);
if (hMem != 0) {
/* Ensure byteCount is a multiple of 2 bytes on UNICODE platforms */
int byteCount = OS.GlobalSize (hMem) / TCHAR.sizeof * TCHAR.sizeof;
- long /*int*/ ptr = OS.GlobalLock (hMem);
+ long ptr = OS.GlobalLock (hMem);
if (ptr != 0) {
- /* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, byteCount / TCHAR.sizeof);
OS.MoveMemory (buffer, ptr, byteCount);
string = buffer.toString (0, buffer.strlen ());
@@ -1373,7 +1352,7 @@ public boolean getEnabled () {
public Font getFont () {
checkWidget ();
if (font != null) return font;
- long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont == 0) hFont = defaultFont ();
return Font.win32_new (display, hFont);
}
@@ -1434,7 +1413,7 @@ Point getLocationInPixels () {
forceResize ();
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
+ long hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
return new Point (rect.left, rect.top);
}
@@ -1474,7 +1453,7 @@ public Menu getMenu () {
*/
public Monitor getMonitor () {
checkWidget ();
- long /*int*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+ long hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
return display.getMonitor (hmonitor);
}
@@ -1756,7 +1735,7 @@ boolean hasFocus () {
* then this control is considered to have focus
* even though it does not have focus in Windows.
*/
- long /*int*/ hwndFocus = OS.GetFocus ();
+ long hwndFocus = OS.GetFocus ();
while (hwndFocus != 0) {
if (hwndFocus == handle) return true;
if (display.getControl (hwndFocus) != null) {
@@ -1783,12 +1762,12 @@ boolean hasFocus () {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC (GCData data) {
+public long internal_new_GC (GCData data) {
checkWidget();
- long /*int*/ hwnd = handle;
+ long hwnd = handle;
if (data != null && data.hwnd != 0) hwnd = data.hwnd;
if (data != null) data.hwnd = hwnd;
- long /*int*/ hDC = 0;
+ long hDC = 0;
if (data == null || data.ps == null) {
hDC = OS.GetDC (hwnd);
} else {
@@ -1815,7 +1794,7 @@ public long /*int*/ internal_new_GC (GCData data) {
int background = control.getBackgroundPixel ();
if (background != OS.GetBkColor (hDC)) data.background = background;
data.font = font != null ? font : Font.win32_new (display, OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0));
- data.uiState = (int)/*64*/OS.SendMessage (hwnd, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (hwnd, OS.WM_QUERYUISTATE, 0, 0);
}
return hDC;
}
@@ -1836,9 +1815,9 @@ public long /*int*/ internal_new_GC (GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
+public void internal_dispose_GC (long hDC, GCData data) {
checkWidget ();
- long /*int*/ hwnd = handle;
+ long hwnd = handle;
if (data != null && data.hwnd != 0) {
hwnd = data.hwnd;
}
@@ -1969,7 +1948,7 @@ boolean isShowing () {
*/
// if (!OS.IsWindowVisible (handle)) return false;
// int flags = OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS;
-// long /*int*/ hDC = OS.GetDCEx (handle, 0, flags);
+// long hDC = OS.GetDCEx (handle, 0, flags);
// int result = OS.GetClipBox (hDC, new RECT ());
// OS.ReleaseDC (handle, hDC);
// return result != OS.NULLREGION;
@@ -1978,8 +1957,8 @@ boolean isShowing () {
boolean isTabGroup () {
Control [] tabList = parent._getTabList ();
if (tabList != null) {
- for (int i=0; i<tabList.length; i++) {
- if (tabList [i] == this) return true;
+ for (Control element : tabList) {
+ if (element == this) return true;
}
}
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -1989,13 +1968,13 @@ boolean isTabGroup () {
boolean isTabItem () {
Control [] tabList = parent._getTabList ();
if (tabList != null) {
- for (int i=0; i<tabList.length; i++) {
- if (tabList [i] == this) return false;
+ for (Control element : tabList) {
+ if (element == this) return false;
}
}
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.WS_TABSTOP) != 0) return false;
- long /*int*/ code = OS.SendMessage (handle, OS.WM_GETDLGCODE, 0, 0);
+ long code = OS.SendMessage (handle, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_STATIC) != 0) return false;
if ((code & OS.DLGC_WANTALLKEYS) != 0) return false;
if ((code & OS.DLGC_WANTARROWS) != 0) return false;
@@ -2023,8 +2002,16 @@ public boolean isVisible () {
return getVisible () && parent.isVisible ();
}
+/**
+ * Custom theming: whether to use WS_BORDER instead of WS_EX_CLIENTEDGE for SWT.BORDER
+ * Intended for override.
+ */
+boolean isUseWsBorder () {
+ return (display != null) && display.useWsBorderAll;
+}
+
@Override
-void mapEvent (long /*int*/ hwnd, Event event) {
+void mapEvent (long hwnd, Event event) {
if (hwnd != handle) {
POINT point = new POINT ();
Point loc = event.getLocationInPixels();
@@ -2073,11 +2060,11 @@ boolean mnemonicMatch (char key) {
*/
public void moveAbove (Control control) {
checkWidget ();
- long /*int*/ topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
+ long topHandle = topHandle (), hwndAbove = OS.HWND_TOP;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
- long /*int*/ hwnd = control.topHandle ();
+ long hwnd = control.topHandle ();
if (hwnd == 0 || hwnd == topHandle) return;
hwndAbove = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
/*
@@ -2117,7 +2104,7 @@ public void moveAbove (Control control) {
*/
public void moveBelow (Control control) {
checkWidget ();
- long /*int*/ topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
+ long topHandle = topHandle (), hwndAbove = OS.HWND_BOTTOM;
if (control != null) {
if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (parent != control.parent) return;
@@ -2141,7 +2128,7 @@ public void moveBelow (Control control) {
* this case and do nothing because the control is already
* at the bottom.
*/
- long /*int*/ hwndParent = parent.handle, hwnd = hwndParent;
+ long hwndParent = parent.handle, hwnd = hwndParent;
hwndAbove = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
while (hwndAbove != 0 && hwndAbove != hwnd) {
if (OS.GetWindow (hwndAbove, OS.GW_OWNER) == hwndParent) break;
@@ -2232,14 +2219,14 @@ public boolean print (GC gc) {
checkWidget ();
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ topHandle = topHandle ();
- long /*int*/ hdc = gc.handle;
+ long topHandle = topHandle ();
+ long hdc = gc.handle;
int state = 0;
- long /*int*/ gdipGraphics = gc.getGCData().gdipGraphics;
+ long gdipGraphics = gc.getGCData().gdipGraphics;
if (gdipGraphics != 0) {
- long /*int*/ clipRgn = 0;
+ long clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
- long /*int*/ rgn = Gdip.Region_new();
+ long rgn = Gdip.Region_new();
if (rgn == 0) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(gdipGraphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
@@ -2248,7 +2235,7 @@ public boolean print (GC gc) {
Gdip.Region_delete(rgn);
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
- long /*int*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
+ long matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
if (matrix == 0) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
@@ -2277,7 +2264,7 @@ public boolean print (GC gc) {
return true;
}
-void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
+void printWidget (long hwnd, long hdc, GC gc) {
/*
* Bug in Windows. For some reason, PrintWindow()
* returns success but does nothing when it is called
@@ -2292,8 +2279,8 @@ void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
* The fix is temporarily reparent the window to the desktop,
* call PrintWindow() then reparent the window back.
*/
- long /*int*/ hwndParent = OS.GetParent (hwnd);
- long /*int*/ hwndShell = hwndParent;
+ long hwndParent = OS.GetParent (hwnd);
+ long hwndShell = hwndParent;
while (OS.GetParent (hwndShell) != 0) {
if (OS.GetWindow (hwndShell, OS.GW_OWNER) != 0) break;
hwndShell = OS.GetParent (hwndShell);
@@ -2315,8 +2302,8 @@ void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
* back.
*/
if (!fixPrintWindow) {
- long /*int*/ rgn = OS.CreateRectRgn(0, 0, 0, 0);
- long /*int*/ parent = OS.GetParent(hwnd);
+ long rgn = OS.CreateRectRgn(0, 0, 0, 0);
+ long parent = OS.GetParent(hwnd);
while (parent != hwndShell && !fixPrintWindow) {
if (OS.GetWindowRgn(parent, rgn) != 0) {
fixPrintWindow = true;
@@ -2327,7 +2314,7 @@ void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
}
int bits1 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
int bits2 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
- long /*int*/ hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
+ long hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
/*
* Bug in Windows. For some reason, when GetWindow ()
* with GW_HWNDPREV is used to query the previous window
@@ -2441,16 +2428,9 @@ public void requestLayout () {
*/
public void redraw () {
checkWidget ();
- redraw (false);
+ redrawInPixels (null,false);
}
-void redraw (boolean all) {
-// checkWidget ();
- if (!OS.IsWindowVisible (handle)) return;
- int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE;
- if (all) flags |= OS.RDW_ALLCHILDREN;
- OS.RedrawWindow (handle, null, 0, flags);
-}
/**
* Causes the rectangular area of the receiver specified by
* the arguments to be marked as needing to be redrawn.
@@ -2494,15 +2474,23 @@ public void redraw (int x, int y, int width, int height, boolean all) {
y = DPIUtil.autoScaleUp(y);
width = DPIUtil.autoScaleUp(width);
height = DPIUtil.autoScaleUp(height);
- redrawInPixels(x, y, width, height, all);
-}
-
-void redrawInPixels (int x, int y, int width, int height, boolean all) {
if (width <= 0 || height <= 0) return;
- if (!OS.IsWindowVisible (handle)) return;
+
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE;
+
+ redrawInPixels(rect, all);
+}
+
+void redrawInPixels (RECT rect, boolean all) {
+ if (!OS.IsWindowVisible (handle)) return;
+ /*
+ * For many years, it also used RDW_FRAME here for no apparent reason.
+ * This caused Bug 565613, and also is a performance issue. Should the
+ * need for RDW_FRAME arise again, add a function parameter and only
+ * use it where it is indeed necessary.
+ */
+ int flags = OS.RDW_ERASE | OS.RDW_INVALIDATE;
if (all) flags |= OS.RDW_ALLCHILDREN;
OS.RedrawWindow (handle, rect, 0, flags);
}
@@ -2545,9 +2533,6 @@ void releaseParent () {
@Override
void releaseWidget () {
super.releaseWidget ();
- if (OS.IsDBLocale) {
- OS.ImmAssociateContext (handle, 0);
- }
if (toolTipText != null) {
setToolTipText (getShell (), null);
}
@@ -2932,7 +2917,7 @@ int resolveTextDirection() {
}
void showWidget (boolean visible) {
- long /*int*/ topHandle = topHandle ();
+ long topHandle = topHandle ();
OS.ShowWindow (topHandle, visible ? OS.SW_SHOW : OS.SW_HIDE);
if (handle != topHandle) OS.ShowWindow (handle, visible ? OS.SW_SHOW : OS.SW_HIDE);
}
@@ -2995,7 +2980,7 @@ boolean sendGestureEvent (GESTUREINFO gi) {
case OS.GID_ZOOM:
type = SWT.Gesture;
event.detail = SWT.GESTURE_MAGNIFY;
- int fingerDistance = OS.LODWORD (gi.ullArguments);
+ int fingerDistance = (int)gi.ullArguments;
if ((gi.dwFlags & OS.GF_BEGIN) != 0) {
event.detail = SWT.GESTURE_BEGIN;
display.magStartDistance = display.lastDistance = fingerDistance;
@@ -3030,7 +3015,7 @@ boolean sendGestureEvent (GESTUREINFO gi) {
case OS.GID_ROTATE:
type = SWT.Gesture;
event.detail = SWT.GESTURE_ROTATE;
- double rotationInRadians = OS.GID_ROTATE_ANGLE_FROM_ARGUMENT (OS.LODWORD (gi.ullArguments));
+ double rotationInRadians = OS.GID_ROTATE_ANGLE_FROM_ARGUMENT (gi.ullArguments);
if ((gi.dwFlags & OS.GF_BEGIN) != 0) {
event.detail = SWT.GESTURE_BEGIN;
display.rotationAngle = rotationInRadians;
@@ -3051,7 +3036,7 @@ boolean sendGestureEvent (GESTUREINFO gi) {
break;
}
- if (type == 0) return true;
+ if (type == 0) return true;
setInputState (event, type);
sendEvent (type, event);
return event.doit;
@@ -3081,8 +3066,8 @@ void sendTouchEvent (TOUCHINPUT touchInput []) {
if ((ti.dwFlags & OS.TOUCHEVENTF_UP) != 0) state = SWT.TOUCHSTATE_UP;
if ((ti.dwFlags & OS.TOUCHEVENTF_MOVE) != 0) state = SWT.TOUCHSTATE_MOVE;
boolean primary = (ti.dwFlags & OS.TOUCHEVENTF_PRIMARY) != 0;
- int x = (int)OS.TOUCH_COORD_TO_PIXEL (ti.x);
- int y = (int)OS.TOUCH_COORD_TO_PIXEL (ti.y);
+ int x = OS.TOUCH_COORD_TO_PIXEL (ti.x);
+ int y = OS.TOUCH_COORD_TO_PIXEL (ti.y);
touches [i] = new Touch (ti.dwID, inputSource, state, primary, x, y);
}
event.touches = touches;
@@ -3178,7 +3163,7 @@ public void setBackgroundImage (Image image) {
updateBackgroundImage ();
}
-void setBackgroundImage (long /*int*/ hBitmap) {
+void setBackgroundImage (long hBitmap) {
int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE;
OS.RedrawWindow (handle, null, 0, flags);
}
@@ -3244,7 +3229,7 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean
}
}
}
- long /*int*/ topHandle = topHandle ();
+ long topHandle = topHandle ();
if (defer && parent != null) {
forceResize ();
if (parent.lpwp != null) {
@@ -3331,7 +3316,7 @@ public void setCapture (boolean capture) {
}
void setCursor () {
- long /*int*/ lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
+ long lParam = OS.MAKELPARAM (OS.HTCLIENT, OS.WM_MOUSEMOVE);
OS.SendMessage (handle, OS.WM_SETCURSOR, handle, lParam);
}
@@ -3358,11 +3343,11 @@ public void setCursor (Cursor cursor) {
checkWidget ();
if (cursor != null && cursor.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
this.cursor = cursor;
- long /*int*/ hwndCursor = OS.GetCapture ();
+ long hwndCursor = OS.GetCapture ();
if (hwndCursor == 0) {
POINT pt = new POINT ();
if (!OS.GetCursorPos (pt)) return;
- long /*int*/ hwnd = hwndCursor = OS.WindowFromPoint (pt);
+ long hwnd = hwndCursor = OS.WindowFromPoint (pt);
while (hwnd != 0 && hwnd != handle) {
hwnd = OS.GetParent (hwnd);
}
@@ -3374,7 +3359,7 @@ public void setCursor (Cursor cursor) {
}
void setDefaultFont () {
- long /*int*/ hFont = display.getSystemFont ().handle;
+ long hFont = display.getSystemFont ().handle;
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
@@ -3473,7 +3458,7 @@ public boolean setFocus () {
*/
public void setFont (Font font) {
checkWidget ();
- long /*int*/ hFont = 0;
+ long hFont = 0;
if (font != null) {
if (font.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hFont = font.handle;
@@ -3692,7 +3677,7 @@ public void setRedraw (boolean redraw) {
}
if (redraw) {
if (--drawCount == 0) {
- long /*int*/ topHandle = topHandle ();
+ long topHandle = topHandle ();
OS.SendMessage (topHandle, OS.WM_SETREDRAW, 1, 0);
if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0);
if ((state & HIDDEN) != 0) {
@@ -3706,7 +3691,7 @@ public void setRedraw (boolean redraw) {
}
} else {
if (drawCount++ == 0) {
- long /*int*/ topHandle = topHandle ();
+ long topHandle = topHandle ();
OS.SendMessage (topHandle, OS.WM_SETREDRAW, 0, 0);
if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
@@ -3733,7 +3718,7 @@ public void setRedraw (boolean redraw) {
public void setRegion (Region region) {
checkWidget ();
if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ hRegion = 0;
+ long hRegion = 0;
if (region != null) {
hRegion = OS.CreateRectRgn (0, 0, 0, 0);
OS.CombineRgn (hRegion, region.handle, hRegion, OS.RGN_OR);
@@ -3876,8 +3861,10 @@ public void setTextDirection(int textDirection) {
*/
public void setToolTipText (String string) {
checkWidget ();
- toolTipText = string;
- setToolTipText (getShell (), string);
+ if (!Objects.equals(string, toolTipText)) {
+ toolTipText = string;
+ setToolTipText (getShell (), string);
+ }
}
void setToolTipText (Shell shell, String string) {
@@ -3973,19 +3960,19 @@ void sort (int [] items) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (items [j] <= items [j + gap]) {
+ if (items [j] <= items [j + gap]) {
int swap = items [j];
items [j] = items [j + gap];
items [j + gap] = swap;
- }
- }
- }
+ }
+ }
+ }
}
}
void subclass () {
- long /*int*/ oldProc = windowProc ();
- long /*int*/ newProc = display.windowProc;
+ long oldProc = windowProc ();
+ long newProc = display.windowProc;
if (oldProc == newProc) return;
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
@@ -4108,7 +4095,7 @@ public Point toDisplay (Point point) {
return DPIUtil.autoScaleDown(toDisplayInPixels(point.x, point.y));
}
-long /*int*/ topHandle () {
+long topHandle () {
return handle;
}
@@ -4125,15 +4112,15 @@ boolean translateMnemonic (Event event, Control control) {
boolean translateMnemonic (MSG msg) {
if (msg.wParam < 0x20) return false;
- long /*int*/ hwnd = msg.hwnd;
+ long hwnd = msg.hwnd;
if (OS.GetKeyState (OS.VK_MENU) >= 0) {
- long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) return false;
if ((code & OS.DLGC_BUTTON) == 0) return false;
}
Decorations shell = menuShell ();
if (shell.isVisible () && shell.isEnabled ()) {
- display.lastAscii = (int)/*64*/msg.wParam;
+ display.lastAscii = (int)msg.wParam;
display.lastNull = display.lastDead = false;
Event event = new Event ();
event.detail = SWT.TRAVERSE_MNEMONIC;
@@ -4145,8 +4132,8 @@ boolean translateMnemonic (MSG msg) {
}
boolean translateTraversal (MSG msg) {
- long /*int*/ hwnd = msg.hwnd;
- int key = (int)/*64*/msg.wParam;
+ long hwnd = msg.hwnd;
+ int key = (int)msg.wParam;
if (key == OS.VK_MENU) {
if ((msg.lParam & 0x40000000) == 0) {
OS.SendMessage (hwnd, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
@@ -4161,7 +4148,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_ESCAPE: {
all = true;
lastAscii = 27;
- long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control
@@ -4178,7 +4165,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_RETURN: {
all = true;
lastAscii = '\r';
- long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) doit = false;
detail = SWT.TRAVERSE_RETURN;
break;
@@ -4186,7 +4173,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_TAB: {
lastAscii = '\t';
boolean next = OS.GetKeyState (OS.VK_SHIFT) >= 0;
- long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & (OS.DLGC_WANTTAB | OS.DLGC_WANTALLKEYS)) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control is a
@@ -4212,7 +4199,7 @@ boolean translateTraversal (MSG msg) {
case OS.VK_DOWN:
case OS.VK_RIGHT: {
lastVirtual = true;
- long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & (OS.DLGC_WANTARROWS /*| OS.DLGC_WANTALLKEYS*/)) != 0) doit = false;
boolean next = key == OS.VK_DOWN || key == OS.VK_RIGHT;
if (parent != null && (parent.style & SWT.MIRRORED) != 0) {
@@ -4226,7 +4213,7 @@ boolean translateTraversal (MSG msg) {
all = true;
lastVirtual = true;
if (OS.GetKeyState (OS.VK_CONTROL) >= 0) return false;
- long /*int*/ code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
+ long code = OS.SendMessage (hwnd, OS.WM_GETDLGCODE, 0, 0);
if ((code & OS.DLGC_WANTALLKEYS) != 0) {
/*
* Use DLGC_HASSETSEL to determine that the control is a
@@ -4563,8 +4550,8 @@ boolean traverseReturn () {
}
void unsubclass () {
- long /*int*/ newProc = windowProc ();
- long /*int*/ oldProc = display.windowProc;
+ long newProc = windowProc ();
+ long oldProc = display.windowProc;
if (oldProc == newProc) return;
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, newProc);
}
@@ -4574,9 +4561,12 @@ void unsubclass () {
* to be processed before this method returns. If there
* are no outstanding paint request, this method does
* nothing.
- * <p>
- * Note: This method does not cause a redraw.
- * </p>
+ * <p>Note:</p>
+ * <ul>
+ * <li>This method does not cause a redraw.</li>
+ * <li>Some OS versions forcefully perform automatic deferred painting.
+ * This method does nothing in that case.</li>
+ * </ul>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -4678,38 +4668,30 @@ CREATESTRUCT widgetCreateStruct () {
int widgetExtStyle () {
int bits = 0;
- if ((style & SWT.BORDER) != 0) bits |= OS.WS_EX_CLIENTEDGE;
-// if ((style & SWT.BORDER) != 0) {
-// if ((style & SWT.FLAT) == 0) bits |= OS.WS_EX_CLIENTEDGE;
-// }
+
+ if (!isUseWsBorder ()) {
+ if ((style & SWT.BORDER) != 0) bits |= OS.WS_EX_CLIENTEDGE;
+ }
+
bits |= OS.WS_EX_NOINHERITLAYOUT;
if ((style & SWT.RIGHT_TO_LEFT) != 0) bits |= OS.WS_EX_LAYOUTRTL;
if ((style & SWT.FLIP_TEXT_DIRECTION) != 0) bits |= OS.WS_EX_RTLREADING;
return bits;
}
-long /*int*/ widgetParent () {
+long widgetParent () {
return parent.handle;
}
int widgetStyle () {
/* Force clipping of siblings by setting WS_CLIPSIBLINGS */
int bits = OS.WS_CHILD | OS.WS_VISIBLE | OS.WS_CLIPSIBLINGS;
-// if ((style & SWT.BORDER) != 0) {
-// if ((style & SWT.FLAT) != 0) bits |= OS.WS_BORDER;
-// }
- return bits;
- /*
- * This code is intentionally commented. When clipping
- * of both siblings and children is not enforced, it is
- * possible for application code to draw outside of the
- * control.
- */
-// int bits = OS.WS_CHILD | OS.WS_VISIBLE;
-// if ((style & SWT.CLIP_SIBLINGS) != 0) bits |= OS.WS_CLIPSIBLINGS;
-// if ((style & SWT.CLIP_CHILDREN) != 0) bits |= OS.WS_CLIPCHILDREN;
-// return bits;
+ if (isUseWsBorder ()) {
+ if ((style & SWT.BORDER) != 0) bits |= OS.WS_BORDER;
+ }
+
+ return bits;
}
/**
@@ -4741,7 +4723,7 @@ public boolean setParent (Composite parent) {
Menu [] menus = oldShell.findMenus (this);
fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
}
- long /*int*/ topHandle = topHandle ();
+ long topHandle = topHandle ();
if (OS.SetParent (topHandle, parent.handle) == 0) return false;
this.parent = parent;
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
@@ -4752,9 +4734,9 @@ public boolean setParent (Composite parent) {
abstract TCHAR windowClass ();
-abstract long /*int*/ windowProc ();
+abstract long windowProc ();
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
Display display = this.display;
LRESULT result = null;
switch (msg) {
@@ -4819,13 +4801,15 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
case OS.WM_NCPAINT: result = WM_NCPAINT (wParam, lParam); break;
case OS.WM_NOTIFY: result = WM_NOTIFY (wParam, lParam); break;
case OS.WM_PAINT: result = WM_PAINT (wParam, lParam); break;
- case OS.WM_PALETTECHANGED: result = WM_PALETTECHANGED (wParam, lParam); break;
+ case OS.WM_ENTERMENULOOP: result = WM_ENTERMENULOOP (wParam, lParam); break;
+ case OS.WM_EXITMENULOOP: result = WM_EXITMENULOOP (wParam, lParam); break;
+ case OS.WM_ENTERSIZEMOVE: result = WM_ENTERSIZEMOVE (wParam, lParam); break;
+ case OS.WM_EXITSIZEMOVE: result = WM_EXITSIZEMOVE (wParam, lParam); break;
case OS.WM_PARENTNOTIFY: result = WM_PARENTNOTIFY (wParam, lParam); break;
case OS.WM_PASTE: result = WM_PASTE (wParam, lParam); break;
case OS.WM_PRINT: result = WM_PRINT (wParam, lParam); break;
case OS.WM_PRINTCLIENT: result = WM_PRINTCLIENT (wParam, lParam); break;
case OS.WM_QUERYENDSESSION: result = WM_QUERYENDSESSION (wParam, lParam); break;
- case OS.WM_QUERYNEWPALETTE: result = WM_QUERYNEWPALETTE (wParam, lParam); break;
case OS.WM_QUERYOPEN: result = WM_QUERYOPEN (wParam, lParam); break;
case OS.WM_RBUTTONDBLCLK: result = WM_RBUTTONDBLCLK (wParam, lParam); break;
case OS.WM_RBUTTONDOWN: result = WM_RBUTTONDOWN (wParam, lParam); break;
@@ -4867,32 +4851,32 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
}
-LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ACTIVATE (long wParam, long lParam) {
return null;
}
-LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CAPTURECHANGED (long wParam, long lParam) {
return wmCaptureChanged (handle, wParam, lParam);
}
-LRESULT WM_CHANGEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHANGEUISTATE (long wParam, long lParam) {
if ((state & IGNORE_WM_CHANGEUISTATE) != 0) return LRESULT.ZERO;
return null;
}
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
return wmChar (handle, wParam, lParam);
}
-LRESULT WM_CLEAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CLEAR (long wParam, long lParam) {
return null;
}
-LRESULT WM_CLOSE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CLOSE (long wParam, long lParam) {
return null;
}
-LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_COMMAND (long wParam, long lParam) {
/*
* When the WM_COMMAND message is sent from a
* menu, the HWND parameter in LPARAM is zero.
@@ -4913,31 +4897,26 @@ LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
return control.wmCommandChild (wParam, lParam);
}
-LRESULT WM_CONTEXTMENU (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CONTEXTMENU (long wParam, long lParam) {
return wmContextMenu (handle, wParam, lParam);
}
-LRESULT WM_CTLCOLOR (long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ hPalette = display.hPalette;
- if (hPalette != 0) {
- OS.SelectPalette (wParam, hPalette, false);
- OS.RealizePalette (wParam);
- }
+LRESULT WM_CTLCOLOR (long wParam, long lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmColorChild (wParam, lParam);
}
-LRESULT WM_CUT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CUT (long wParam, long lParam) {
return null;
}
-LRESULT WM_DESTROY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_DESTROY (long wParam, long lParam) {
OS.KillTimer (this.handle, Menu.ID_TOOLTIP_TIMER);
return null;
}
-LRESULT WM_DPICHANGED (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_DPICHANGED (long wParam, long lParam) {
// Map DPI to Zoom and compare
int nativeZoom = DPIUtil.mapDPIToZoom (OS.HIWORD (wParam));
int newSWTZoom = DPIUtil.getZoomForAutoscaleProperty (nativeZoom);
@@ -4956,7 +4935,7 @@ LRESULT WM_DPICHANGED (long /*int*/ wParam, long /*int*/ lParam) {
return LRESULT.ONE;
}
-LRESULT WM_DRAWITEM (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_DRAWITEM (long wParam, long lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -4969,15 +4948,25 @@ LRESULT WM_DRAWITEM (long /*int*/ wParam, long /*int*/ lParam) {
return control.wmDrawChild (wParam, lParam);
}
-LRESULT WM_ENDSESSION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ENDSESSION (long wParam, long lParam) {
return null;
}
-LRESULT WM_ENTERIDLE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ENTERIDLE (long wParam, long lParam) {
return null;
}
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ENTERMENULOOP (long wParam, long lParam) {
+ display.externalEventLoop = true;
+ return null;
+}
+
+LRESULT WM_ENTERSIZEMOVE (long wParam, long lParam) {
+ display.externalEventLoop = true;
+ return null;
+}
+
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
if ((state & DRAW_BACKGROUND) != 0) {
if (findImageControl () != null) return LRESULT.ONE;
}
@@ -4989,7 +4978,17 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_GESTURE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_EXITMENULOOP (long wParam, long lParam) {
+ display.externalEventLoop = false;
+ return null;
+}
+
+LRESULT WM_EXITSIZEMOVE (long wParam, long lParam) {
+ display.externalEventLoop = false;
+ return null;
+}
+
+LRESULT WM_GESTURE (long wParam, long lParam) {
if (hooks (SWT.Gesture) || filters (SWT.Gesture)) {
GESTUREINFO gi = new GESTUREINFO ();
gi.cbSize = GESTUREINFO.sizeof;
@@ -5003,31 +5002,31 @@ LRESULT WM_GESTURE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
return null;
}
-LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETFONT (long wParam, long lParam) {
return null;
}
-LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETOBJECT (long wParam, long lParam) {
if (accessible != null) {
- long /*int*/ result = accessible.internal_WM_GETOBJECT (wParam, lParam);
+ long result = accessible.internal_WM_GETOBJECT (wParam, lParam);
if (result != 0) return new LRESULT (result);
}
return null;
}
-LRESULT WM_GETMINMAXINFO (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETMINMAXINFO (long wParam, long lParam) {
return null;
}
-LRESULT WM_HOTKEY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_HOTKEY (long wParam, long lParam) {
return null;
}
-LRESULT WM_HELP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_HELP (long wParam, long lParam) {
HELPINFO lphi = new HELPINFO ();
OS.MoveMemory (lphi, lParam, HELPINFO.sizeof);
Decorations shell = menuShell ();
@@ -5043,7 +5042,7 @@ LRESULT WM_HELP (long /*int*/ wParam, long /*int*/ lParam) {
if (menu.hooks (SWT.Help)) widget = menu;
}
if (widget != null) {
- long /*int*/ hwndShell = shell.handle;
+ long hwndShell = shell.handle;
OS.SendMessage (hwndShell, OS.WM_CANCELMODE, 0, 0);
widget.postEvent (SWT.Help);
return LRESULT.ONE;
@@ -5058,29 +5057,29 @@ LRESULT WM_HELP (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_HSCROLL (long wParam, long lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_CHAR (long wParam, long lParam) {
return wmIMEChar (handle, wParam, lParam);
}
-LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long wParam, long lParam) {
return null;
}
-LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long wParam, long lParam) {
return null;
}
-LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long wParam, long lParam) {
return null;
}
-LRESULT WM_UNINITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UNINITMENUPOPUP (long wParam, long lParam) {
Menu hiddenMenu = menuShell ().findMenu (wParam);
if (hiddenMenu != null) {
Shell shell = getShell ();
@@ -5090,7 +5089,7 @@ LRESULT WM_UNINITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_INITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_INITMENUPOPUP (long wParam, long lParam) {
/* Ignore WM_INITMENUPOPUP for an accelerator */
if (display.accelKeyHit) return null;
@@ -5147,48 +5146,54 @@ LRESULT WM_INITMENUPOPUP (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_INPUTLANGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_INPUTLANGCHANGE (long wParam, long lParam) {
menuShell().destroyAccelerators();
return null;
}
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
return wmKeyDown (handle, wParam, lParam);
}
-LRESULT WM_KEYUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYUP (long wParam, long lParam) {
return wmKeyUp (handle, wParam, lParam);
}
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
+ /*
+ * Feature in Windows. File and directory dialogs might reset focus
+ * to NULL before they open. As a result, Shell is unable to save
+ * focus control in WM_ACTIVATE. The fix is to save focus here.
+ */
+ if (wParam == 0) menuShell().setSavedFocus(this);
return wmKillFocus (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long wParam, long lParam) {
return wmLButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
return wmLButtonDown (handle, wParam, lParam);
}
-LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONUP (long wParam, long lParam) {
return wmLButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MBUTTONDBLCLK (long wParam, long lParam) {
return wmMButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MBUTTONDOWN (long wParam, long lParam) {
return wmMButtonDown (handle, wParam, lParam);
}
-LRESULT WM_MBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MBUTTONUP (long wParam, long lParam) {
return wmMButtonUp (handle, wParam, lParam);
}
-LRESULT WM_MEASUREITEM (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MEASUREITEM (long wParam, long lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (struct.CtlType == OS.ODT_MENU) {
@@ -5196,13 +5201,13 @@ LRESULT WM_MEASUREITEM (long /*int*/ wParam, long /*int*/ lParam) {
if (item == null) return null;
return item.wmMeasureChild (wParam, lParam);
}
- long /*int*/ hwnd = OS.GetDlgItem (handle, struct.CtlID);
+ long hwnd = OS.GetDlgItem (handle, struct.CtlID);
Control control = display.getControl (hwnd);
if (control == null) return null;
return control.wmMeasureChild (wParam, lParam);
}
-LRESULT WM_MENUCHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MENUCHAR (long wParam, long lParam) {
/*
* Feature in Windows. When the user types Alt+<key>
* and <key> does not match a mnemonic in the System
@@ -5219,7 +5224,7 @@ LRESULT WM_MENUCHAR (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_MENUSELECT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MENUSELECT (long wParam, long lParam) {
int code = OS.HIWORD (wParam);
Shell shell = getShell ();
OS.KillTimer (this.handle, Menu.ID_TOOLTIP_TIMER);
@@ -5292,32 +5297,32 @@ LRESULT WM_MENUSELECT (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEACTIVATE (long wParam, long lParam) {
return null;
}
-LRESULT WM_MOUSEHOVER (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEHOVER (long wParam, long lParam) {
return wmMouseHover (handle, wParam, lParam);
}
-LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSELEAVE (long wParam, long lParam) {
getShell ().fixToolTip ();
return wmMouseLeave (handle, wParam, lParam);
}
-LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEMOVE (long wParam, long lParam) {
return wmMouseMove (handle, wParam, lParam);
}
-LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long wParam, long lParam) {
return wmMouseWheel (handle, wParam, lParam);
}
-LRESULT WM_MOUSEHWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEHWHEEL (long wParam, long lParam) {
return wmMouseHWheel (handle, wParam, lParam);
}
-LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOVE (long wParam, long lParam) {
state |= MOVE_OCCURRED;
if (findImageControl () != null) {
if (this != getShell ()) redrawChildren ();
@@ -5335,86 +5340,78 @@ LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_NCACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCACTIVATE (long wParam, long lParam) {
return null;
}
-LRESULT WM_NCCALCSIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCCALCSIZE (long wParam, long lParam) {
return null;
}
-LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCHITTEST (long wParam, long lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isActive ()) return new LRESULT (OS.HTTRANSPARENT);
return null;
}
-LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCLBUTTONDOWN (long wParam, long lParam) {
return null;
}
-LRESULT WM_NCPAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCPAINT (long wParam, long lParam) {
return wmNCPaint (handle, wParam, lParam);
}
-LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NOTIFY (long wParam, long lParam) {
NMHDR hdr = new NMHDR ();
OS.MoveMemory (hdr, lParam, NMHDR.sizeof);
return wmNotify (hdr, wParam, lParam);
}
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PAINT (long wParam, long lParam) {
if ((state & DISPOSE_SENT) != 0) return LRESULT.ZERO;
return wmPaint (handle, wParam, lParam);
}
-LRESULT WM_PALETTECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long wParam, long lParam) {
return null;
}
-LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PASTE (long wParam, long lParam) {
return null;
}
-LRESULT WM_PASTE (long /*int*/ wParam, long /*int*/ lParam) {
- return null;
-}
-
-LRESULT WM_PRINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PRINT (long wParam, long lParam) {
return wmPrint (handle, wParam, lParam);
}
-LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
- return null;
-}
-
-LRESULT WM_QUERYENDSESSION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PRINTCLIENT (long wParam, long lParam) {
return null;
}
-LRESULT WM_QUERYNEWPALETTE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_QUERYENDSESSION (long wParam, long lParam) {
return null;
}
-LRESULT WM_QUERYOPEN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_QUERYOPEN (long wParam, long lParam) {
return null;
}
-LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_RBUTTONDBLCLK (long wParam, long lParam) {
return wmRButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long wParam, long lParam) {
return wmRButtonDown (handle, wParam, lParam);
}
-LRESULT WM_RBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_RBUTTONUP (long wParam, long lParam) {
return wmRButtonUp (handle, wParam, lParam);
}
-LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETCURSOR (long wParam, long lParam) {
int hitTest = (short) OS.LOWORD (lParam);
- if (hitTest == OS.HTCLIENT) {
+ if (hitTest == OS.HTCLIENT) {
Control control = display.getControl (wParam);
if (control == null) return null;
Cursor cursor = control.findCursor ();
@@ -5426,42 +5423,42 @@ LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
return wmSetFocus (handle, wParam, lParam);
}
-LRESULT WM_SETTINGCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETTINGCHANGE (long wParam, long lParam) {
return null;
}
-LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFONT (long wParam, long lParam) {
return null;
}
-LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETREDRAW (long wParam, long lParam) {
return null;
}
-LRESULT WM_SHOWWINDOW (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SHOWWINDOW (long wParam, long lParam) {
return null;
}
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
state |= RESIZE_OCCURRED;
if ((state & RESIZE_DEFERRED) == 0) sendEvent (SWT.Resize);
// widget could be disposed at this point
return null;
}
-LRESULT WM_SYSCHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCHAR (long wParam, long lParam) {
return wmSysChar (handle, wParam, lParam);
}
-LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long wParam, long lParam) {
return null;
}
-LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOMMAND (long wParam, long lParam) {
/*
* Check to see if the command is a system command or
* a user menu item that was added to the System menu.
@@ -5480,7 +5477,7 @@ LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
}
/* Process the System Command */
- int cmd = (int)/*64*/wParam & 0xFFF0;
+ int cmd = (int)wParam & 0xFFF0;
switch (cmd) {
case OS.SC_KEYMENU:
/*
@@ -5531,9 +5528,7 @@ LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
char key = (char) lParam;
if (key != 0) {
key = Character.toUpperCase (key);
- MenuItem [] items = menu.getItems ();
- for (int i=0; i<items.length; i++) {
- MenuItem item = items [i];
+ for (MenuItem item : menu.getItems ()) {
String text = item.getText ();
char mnemonic = findMnemonic (text);
if (text.length () > 0 && mnemonic == 0) {
@@ -5571,19 +5566,19 @@ LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_SYSKEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSKEYDOWN (long wParam, long lParam) {
return wmSysKeyDown (handle, wParam, lParam);
}
-LRESULT WM_SYSKEYUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSKEYUP (long wParam, long lParam) {
return wmSysKeyUp (handle, wParam, lParam);
}
-LRESULT WM_TABLET_FLICK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_TABLET_FLICK (long wParam, long lParam) {
if (!hooks (SWT.Gesture) && !filters (SWT.Gesture)) return null;
Event event = new Event ();
FLICK_DATA fData = new FLICK_DATA ();
- long /*int*/ [] source = new long /*int*/ [1];
+ long [] source = new long [1];
source[0] = wParam;
OS.MoveMemory (fData, source, OS.FLICK_DATA_sizeof ());
FLICK_POINT fPoint = new FLICK_POINT ();
@@ -5632,12 +5627,12 @@ LRESULT WM_TABLET_FLICK (long /*int*/ wParam, long /*int*/ lParam) {
return event.doit ? null : LRESULT.ONE;
}
-LRESULT WM_TOUCH (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_TOUCH (long wParam, long lParam) {
LRESULT result = null;
if (hooks (SWT.Touch) || filters (SWT.Touch)) {
int cInputs = OS.LOWORD (wParam);
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, cInputs * TOUCHINPUT.sizeof);
+ long hHeap = OS.GetProcessHeap ();
+ long pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, cInputs * TOUCHINPUT.sizeof);
if (pInputs != 0) {
if (OS.GetTouchInputInfo (lParam, cInputs, pInputs, TOUCHINPUT.sizeof)) {
TOUCHINPUT ti [] = new TOUCHINPUT [cInputs];
@@ -5655,7 +5650,7 @@ LRESULT WM_TOUCH (long /*int*/ wParam, long /*int*/ lParam) {
return result;
}
-LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_TIMER (long wParam, long lParam) {
if (wParam == Menu.ID_TOOLTIP_TIMER && activeMenu != null) {
OS.KillTimer (this.handle, Menu.ID_TOOLTIP_TIMER);
activeMenu.wmTimer (wParam, lParam);
@@ -5663,31 +5658,31 @@ LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_UNDO (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UNDO (long wParam, long lParam) {
return null;
}
-LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long wParam, long lParam) {
return null;
}
-LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_VSCROLL (long wParam, long lParam) {
Control control = display.getControl (lParam);
if (control == null) return null;
return control.wmScrollChild (wParam, lParam);
}
-LRESULT WM_WINDOWPOSCHANGED (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGED (long wParam, long lParam) {
try {
display.resizeCount++;
- long /*int*/ code = callWindowProc (handle, OS.WM_WINDOWPOSCHANGED, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_WINDOWPOSCHANGED, wParam, lParam);
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
} finally {
--display.resizeCount;
}
}
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
/*
* Bug in Windows. When WM_SETREDRAW is used to turn off drawing
* for a control and the control is moved or resized, Windows does
@@ -5705,10 +5700,10 @@ LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- long /*int*/ hwndParent = parent == null ? 0 : parent.handle;
+ long hwndParent = parent == null ? 0 : parent.handle;
OS.MapWindowPoints (0, hwndParent, rect, 2);
- long /*int*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
- long /*int*/ rgn2 = OS.CreateRectRgn (lpwp.x, lpwp.y, lpwp.x + lpwp.cx, lpwp.y + lpwp.cy);
+ long rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long rgn2 = OS.CreateRectRgn (lpwp.x, lpwp.y, lpwp.x + lpwp.cx, lpwp.y + lpwp.cy);
OS.CombineRgn (rgn1, rgn1, rgn2, OS.RGN_DIFF);
int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN;
OS.RedrawWindow (hwndParent, null, rgn1, flags);
@@ -5721,19 +5716,19 @@ LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_XBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_XBUTTONDBLCLK (long wParam, long lParam) {
return wmXButtonDblClk (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_XBUTTONDOWN (long wParam, long lParam) {
return wmXButtonDown (handle, wParam, lParam);
}
-LRESULT WM_XBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_XBUTTONUP (long wParam, long lParam) {
return wmXButtonUp (handle, wParam, lParam);
}
-LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmColorChild (long wParam, long lParam) {
Control control = findBackgroundControl ();
if (control == null) {
if ((state & THEME_BACKGROUND) != 0) {
@@ -5760,15 +5755,15 @@ LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
if (control.backgroundImage != null) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- long /*int*/ hwnd = control.handle;
- long /*int*/ hBitmap = control.backgroundImage.handle;
+ long hwnd = control.handle;
+ long hBitmap = control.backgroundImage.handle;
OS.MapWindowPoints (handle, hwnd, rect, 2);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (wParam, lpPoint);
OS.SetBrushOrgEx (wParam, -rect.left - lpPoint.x, -rect.top - lpPoint.y, lpPoint);
- long /*int*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
+ long hBrush = findBrush (hBitmap, OS.BS_PATTERN);
if ((state & DRAW_BACKGROUND) != 0) {
- long /*int*/ hOldBrush = OS.SelectObject (wParam, hBrush);
+ long hOldBrush = OS.SelectObject (wParam, hBrush);
OS.MapWindowPoints (hwnd, handle, rect, 2);
OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (wParam, hOldBrush);
@@ -5776,40 +5771,40 @@ LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
OS.SetBkMode (wParam, OS.TRANSPARENT);
return new LRESULT (hBrush);
}
- long /*int*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
+ long hBrush = findBrush (backPixel, OS.BS_SOLID);
if ((state & DRAW_BACKGROUND) != 0) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- long /*int*/ hOldBrush = OS.SelectObject (wParam, hBrush);
+ long hOldBrush = OS.SelectObject (wParam, hBrush);
OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (wParam, hOldBrush);
}
return new LRESULT (hBrush);
}
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
return null;
}
-LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmDrawChild (long wParam, long lParam) {
return null;
}
-LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMeasureChild (long wParam, long lParam) {
return null;
}
-LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotify (NMHDR hdr, long wParam, long lParam) {
Control control = display.getControl (hdr.hwndFrom);
if (control == null) return null;
return control.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
return null;
}
-LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScrollChild (long wParam, long lParam) {
return null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
index 296641ef03..ec12e6c504 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
@@ -52,13 +52,9 @@ public class CoolBar extends Composite {
CoolItem [] originalItems;
boolean locked;
boolean ignoreResize;
- static final long /*int*/ ReBarProc;
+ static final long ReBarProc;
static final TCHAR ReBarClass = new TCHAR (0, OS.REBARCLASSNAME, true);
static {
- INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
- icex.dwSize = INITCOMMONCONTROLSEX.sizeof;
- icex.dwICC = OS.ICC_COOL_CLASSES;
- OS.InitCommonControlsEx (icex);
WNDCLASS lpWndClass = new WNDCLASS ();
OS.GetClassInfo (0, ReBarClass, lpWndClass);
ReBarProc = lpWndClass.lpfnWndProc;
@@ -122,7 +118,7 @@ public CoolBar (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ReBarProc, hwnd, msg, wParam, lParam);
}
@@ -149,7 +145,7 @@ protected void checkSubclass () {
int border = getBorderWidthInPixels ();
int newWidth = wHint == SWT.DEFAULT ? 0x3FFF : wHint + (border * 2);
int newHeight = hHint == SWT.DEFAULT ? 0x3FFF : hHint + (border * 2);
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (count != 0) {
ignoreResize = true;
boolean redraw = false;
@@ -217,12 +213,12 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
}
void createItem (CoolItem item, int index) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
int id = 0;
while (id < items.length && items [id] != null) id++;
@@ -231,8 +227,8 @@ void createItem (CoolItem item, int index) {
System.arraycopy (items, 0, newItems, 0, items.length);
items = newItems;
}
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ lpText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long hHeap = OS.GetProcessHeap ();
+ long lpText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_TEXT | OS.RBBIM_STYLE | OS.RBBIM_ID;
@@ -297,8 +293,8 @@ void createWidget () {
}
void destroyItem (CoolItem item) {
- int index = (int)/*64*/OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (count != 0) {
int lastIndex = getLastIndexOfRow (index);
if (index == lastIndex) {
@@ -363,7 +359,7 @@ void destroyItem (CoolItem item) {
}
@Override
-void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
+void drawThemeBackground (long hDC, long hwnd, RECT rect) {
if (OS.IsAppThemed ()) {
if (background == -1 && (style & SWT.FLAT) != 0) {
Control control = findBackgroundControl ();
@@ -439,7 +435,7 @@ int getMargin (int index) {
*/
public CoolItem getItem (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -460,7 +456,7 @@ public CoolItem getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
}
/**
@@ -486,7 +482,7 @@ public int getItemCount () {
*/
public int [] getItemOrder () {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
int [] indices = new int [count];
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -523,7 +519,7 @@ public int [] getItemOrder () {
*/
public CoolItem [] getItems () {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
CoolItem [] result = new CoolItem [count];
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -559,7 +555,7 @@ public Point [] getItemSizes () {
}
Point [] getItemSizesInPixels () {
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
Point [] sizes = new Point [count];
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -584,7 +580,7 @@ Point [] getItemSizesInPixels () {
}
int getLastIndexOfRow (int index) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (count == 0) return -1;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -599,7 +595,7 @@ int getLastIndexOfRow (int index) {
}
boolean isLastItemOfRow (int index) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (index + 1 == count) return true;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -674,7 +670,7 @@ public int indexOf (CoolItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
- return (int)/*64*/OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
+ return (int)OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0);
}
void resizeToPreferredWidth (int index) {
@@ -683,7 +679,7 @@ void resizeToPreferredWidth (int index) {
* with an index out of range, Windows GP's. The
* fix is to ensure the index is in range.
*/
- int count = (int)/*64*/OS.SendMessage(handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage(handle, OS.RB_GETBANDCOUNT, 0, 0);
if (0 <= index && index < count) {
REBARBANDINFO rbBand = new REBARBANDINFO();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -709,8 +705,7 @@ void resizeToMaximumWidth (int index) {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- CoolItem item = items [i];
+ for (CoolItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -723,8 +718,7 @@ void releaseChildren (boolean destroy) {
@Override
void removeControl (Control control) {
super.removeControl (control);
- for (int i=0; i<items.length; i++) {
- CoolItem item = items [i];
+ for (CoolItem item : items) {
if (item != null && item.control == control) {
item.setControl (null);
}
@@ -734,8 +728,7 @@ void removeControl (Control control) {
@Override
void reskinChildren (int flags) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- CoolItem item = items [i];
+ for (CoolItem item : items) {
if (item != null) item.reskin (flags);
}
}
@@ -746,7 +739,7 @@ void reskinChildren (int flags) {
void setBackgroundPixel (int pixel) {
if (pixel == -1) pixel = defaultBackground ();
OS.SendMessage (handle, OS.RB_SETBKCOLOR, 0, pixel);
- setItemColors ((int)/*64*/OS.SendMessage (handle, OS.RB_GETTEXTCOLOR, 0, 0), pixel);
+ setItemColors ((int)OS.SendMessage (handle, OS.RB_GETTEXTCOLOR, 0, 0), pixel);
/*
* Feature in Windows. For some reason, Windows
* does not fully erase the coolbar area and coolbar
@@ -762,11 +755,11 @@ void setBackgroundPixel (int pixel) {
void setForegroundPixel (int pixel) {
if (pixel == -1) pixel = defaultForeground ();
OS.SendMessage (handle, OS.RB_SETTEXTCOLOR, 0, pixel);
- setItemColors (pixel, (int)/*64*/OS.SendMessage (handle, OS.RB_GETBKCOLOR, 0, 0));
+ setItemColors (pixel, (int)OS.SendMessage (handle, OS.RB_GETBKCOLOR, 0, 0));
}
void setItemColors (int foreColor, int backColor) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_COLORS;
@@ -847,13 +840,12 @@ void setItemLayoutInPixels (int [] itemOrder, int [] wrapIndices, Point [] sizes
*/
void setItemOrder (int [] itemOrder) {
if (itemOrder == null) error (SWT.ERROR_NULL_ARGUMENT);
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (itemOrder.length != itemCount) error (SWT.ERROR_INVALID_ARGUMENT);
/* Ensure that itemOrder does not contain any duplicates. */
boolean [] set = new boolean [itemCount];
- for (int i=0; i<itemOrder.length; i++) {
- int index = itemOrder [i];
+ for (int index : itemOrder) {
if (index < 0 || index >= itemCount) error (SWT.ERROR_INVALID_RANGE);
if (set [index]) error (SWT.ERROR_INVALID_ARGUMENT);
set [index] = true;
@@ -863,7 +855,7 @@ void setItemOrder (int [] itemOrder) {
rbBand.cbSize = REBARBANDINFO.sizeof;
for (int i=0; i<itemOrder.length; i++) {
int id = originalItems [itemOrder [i]].id;
- int index = (int)/*64*/OS.SendMessage (handle, OS.RB_IDTOINDEX, id, 0);
+ int index = (int)OS.SendMessage (handle, OS.RB_IDTOINDEX, id, 0);
if (index != i) {
int lastItemSrcRow = getLastIndexOfRow (index);
int lastItemDstRow = getLastIndexOfRow (i);
@@ -906,7 +898,7 @@ void setItemOrder (int [] itemOrder) {
*/
void setItemSizes (Point [] sizes) {
if (sizes == null) error (SWT.ERROR_NULL_ARGUMENT);
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (sizes.length != count) error (SWT.ERROR_INVALID_ARGUMENT);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
@@ -933,7 +925,7 @@ void setItemSizes (Point [] sizes) {
public void setLocked (boolean locked) {
checkWidget ();
this.locked = locked;
- int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
@@ -967,8 +959,8 @@ public void setWrapIndices (int [] indices) {
checkWidget ();
if (indices == null) indices = new int [0];
int count = getItemCount ();
- for (int i=0; i<indices.length; i++) {
- if (indices [i] < 0 || indices [i] >= count) {
+ for (int index : indices) {
+ if (index < 0 || index >= count) {
error (SWT.ERROR_INVALID_RANGE);
}
}
@@ -982,8 +974,7 @@ public void setWrapIndices (int [] indices) {
}
}
resizeToMaximumWidth (count - 1);
- for (int i=0; i<indices.length; i++) {
- int index = indices [i];
+ for (int index : indices) {
if (0 <= index && index < items.length) {
CoolItem item = items [index];
item.setWrap (true);
@@ -1007,12 +998,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return ReBarProc;
}
@Override
-LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_COMMAND (long wParam, long lParam) {
/*
* Feature in Windows. When the coolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1037,7 +1028,7 @@ LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
/*
* Feature in Windows. For some reason, Windows
@@ -1060,7 +1051,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NOTIFY (long wParam, long lParam) {
/*
* Feature in Windows. When the cool bar window
* proc processes WM_NOTIFY, it forwards this
@@ -1085,7 +1076,7 @@ LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETREDRAW (long wParam, long lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -1111,9 +1102,9 @@ LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
if (ignoreResize) {
- long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1127,7 +1118,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.RBN_BEGINDRAG: {
int pos = OS.GetMessagePos ();
@@ -1165,7 +1156,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (!ignoreResize) {
Point size = getSizeInPixels ();
int border = getBorderWidthInPixels ();
- int barHeight = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBARHEIGHT, 0, 0);
+ int barHeight = (int)OS.SendMessage (handle, OS.RB_GETBARHEIGHT, 0, 0);
if ((style & SWT.VERTICAL) != 0) {
setSizeInPixels (barHeight + 2 * border, size.y);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
index 05bbc0aa80..52e6a2cc7a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java
@@ -232,7 +232,7 @@ public Rectangle getBounds () {
Rectangle getBoundsInPixels () {
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
MARGINS margins = new MARGINS ();
@@ -254,7 +254,7 @@ Rectangle getClientArea () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
RECT insetRect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETBANDBORDERS, index, insetRect);
RECT rect = new RECT ();
@@ -343,8 +343,8 @@ public void setControl (Control control) {
this.control = null;
}
Control oldControl = this.control, newControl = control;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hwndChild = newControl != null ? control.topHandle () : 0;
+ long hwnd = parent.handle;
+ long hwndChild = newControl != null ? control.topHandle () : 0;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILD;
@@ -357,7 +357,7 @@ public void setControl (Control control) {
* moves the new child to the top of the Z-order. The fix is
* to save and restore the visibility and Z-order.
*/
- long /*int*/ hwndAbove = 0;
+ long hwndAbove = 0;
if (newControl != null) {
hwndAbove = OS.GetWindow (hwndChild, OS.GW_HWNDPREV);
}
@@ -392,7 +392,7 @@ public Point getPreferredSize () {
Point getPreferredSizeInPixels () {
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;
@@ -426,7 +426,7 @@ void setPreferredSizeInPixels (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
ideal = true;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
int cxIdeal, cyMaxChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxIdeal = Math.max (0, height - parent.getMargin (index));
@@ -490,8 +490,8 @@ public Point getSize () {
Point getSizeInPixels() {
int index = parent.indexOf (this);
- if (index == -1) new Point (0, 0);
- long /*int*/ hwnd = parent.handle;
+ if (index == -1) return new Point (0, 0);
+ long hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
MARGINS margins = new MARGINS ();
@@ -535,7 +535,7 @@ void setSizeInPixels (int width, int height) {
if (index == -1) return;
width = Math.max (0, width);
height = Math.max (0, height);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
int cx, cyChild, cxIdeal;
if ((parent.style & SWT.VERTICAL) != 0) {
cx = height;
@@ -618,7 +618,7 @@ public Point getMinimumSize () {
Point getMinimumSizeInPixels () {
int index = parent.indexOf (this);
if (index == -1) return new Point (0, 0);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_CHILDSIZE;
@@ -654,7 +654,7 @@ void setMinimumSizeInPixels (int width, int height) {
width = Math.max (0, width);
height = Math.max (0, height);
minimum = true;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
int cxMinChild, cyMinChild;
if ((parent.style & SWT.VERTICAL) != 0) {
cxMinChild = height;
@@ -701,7 +701,7 @@ public void setMinimumSize (Point size) {
boolean getWrap() {
int index = parent.indexOf (this);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
@@ -711,7 +711,7 @@ boolean getWrap() {
void setWrap(boolean wrap) {
int index = parent.indexOf (this);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_STYLE;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
index ffadd410a2..1b45d44cf0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
@@ -53,17 +53,11 @@ public class DateTime extends Composite {
boolean doubleClick, ignoreSelection;
SYSTEMTIME lastSystemTime;
SYSTEMTIME time = new SYSTEMTIME (); // only used in calendar mode
- static final long /*int*/ DateTimeProc;
+ static final long DateTimeProc;
static final TCHAR DateTimeClass = new TCHAR (0, OS.DATETIMEPICK_CLASS, true);
- static final long /*int*/ CalendarProc;
+ static final long CalendarProc;
static final TCHAR CalendarClass = new TCHAR (0, OS.MONTHCAL_CLASS, true);
static {
- INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX ();
- icex.dwSize = INITCOMMONCONTROLSEX.sizeof;
- icex.dwICC = OS.ICC_DATE_CLASSES;
- OS.InitCommonControlsEx (icex);
- }
- static {
WNDCLASS lpWndClass = new WNDCLASS ();
OS.GetClassInfo (0, DateTimeClass, lpWndClass);
DateTimeProc = lpWndClass.lpfnWndProc;
@@ -202,7 +196,7 @@ public void addSelectionListener (SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (windowProc (), hwnd, msg, wParam, lParam);
}
@@ -286,7 +280,7 @@ String getCustomShortDateFormat () {
}
String getCustomShortTimeFormat () {
- StringBuffer buffer = new StringBuffer (getTimeFormat ());
+ StringBuilder buffer = new StringBuilder (getTimeFormat ());
int length = buffer.length ();
boolean inQuotes = false;
int start = 0, end = 0;
@@ -735,12 +729,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return (style & SWT.CALENDAR) != 0 ? CalendarProc : DateTimeProc;
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.DTN_CLOSEUP: {
/*
@@ -776,7 +770,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -785,7 +779,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to look for these keys and not call
* the window proc.
*/
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case SWT.CR:
sendSelectionEvent (SWT.DefaultSelection);
// FALL THROUGH
@@ -796,7 +790,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONDBLCLK (wParam, lParam);
if (isDisposed ()) return LRESULT.ZERO;
if ((style & SWT.CALENDAR) != 0) {
@@ -806,14 +800,14 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
pt.x = OS.GET_X_LPARAM (lParam);
pt.y = OS.GET_Y_LPARAM (lParam);
pMCHitTest.pt = pt;
- long /*int*/ code = OS.SendMessage (handle, OS.MCM_HITTEST, 0, pMCHitTest);
+ long code = OS.SendMessage (handle, OS.MCM_HITTEST, 0, pMCHitTest);
if ((code & OS.MCHT_CALENDARDATE) == OS.MCHT_CALENDARDATE) doubleClick = true;
}
return result;
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
doubleClick = false;
@@ -829,7 +823,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONUP (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (isDisposed ()) return LRESULT.ZERO;
if (doubleClick) sendSelectionEvent (SWT.DefaultSelection);
@@ -838,7 +832,7 @@ LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_TIMER (long wParam, long lParam) {
LRESULT result = super.WM_TIMER (wParam, lParam);
if (result != null) return result;
/*
@@ -847,7 +841,7 @@ LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
* to ignore MCN_SELCHANGE during WM_TIMER.
*/
ignoreSelection = true;
- long /*int*/ code = callWindowProc(handle, OS.WM_TIMER, wParam, lParam);
+ long code = callWindowProc(handle, OS.WM_TIMER, wParam, lParam);
ignoreSelection = false;
return code == 0 ? LRESULT.ZERO : new LRESULT(code);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 97e04a6c81..4d8ad21228 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -106,7 +106,7 @@ public class Decorations extends Canvas {
Control savedFocus;
Button defaultButton, saveDefault;
int swFlags, nAccel;
- long /*int*/ hAccel;
+ long hAccel;
boolean moved, resized, opened;
int oldX = OS.CW_USEDEFAULT, oldY = OS.CW_USEDEFAULT;
int oldWidth = OS.CW_USEDEFAULT, oldHeight = OS.CW_USEDEFAULT;
@@ -236,21 +236,6 @@ static int checkStyle (int style) {
*/
if ((style & SWT.CLOSE) != 0) style |= SWT.TITLE;
- /*
- * Bug in Windows. The WS_CAPTION style must be
- * set when the window is resizable or it does not
- * draw properly.
- */
- /*
- * This code is intentionally commented. It seems
- * that this problem originally in Windows 3.11,
- * has been fixed in later versions. Because the
- * exact nature of the drawing problem is unknown,
- * keep the commented code around in case it comes
- * back.
- */
-// if ((style & SWT.RESIZE) != 0) style |= SWT.TITLE;
-
return style;
}
@@ -274,7 +259,7 @@ protected void checkSubclass () {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.DefMDIChildProc (hwnd, msg, wParam, lParam);
}
@@ -354,8 +339,7 @@ void createAccelerators () {
ACCEL accel = new ACCEL ();
byte [] buffer1 = new byte [ACCEL.sizeof];
byte [] buffer2 = new byte [items.length * ACCEL.sizeof];
- for (int i=0; i<items.length; i++) {
- MenuItem item = items [i];
+ for (MenuItem item : items) {
if (item != null && item.accelerator != 0) {
Menu menu = item.parent;
if (menu.parent == this) {
@@ -408,10 +392,9 @@ public void dispose () {
super.dispose ();
}
-Menu findMenu (long /*int*/ hMenu) {
+Menu findMenu (long hMenu) {
if (menus == null) return null;
- for (int i=0; i<menus.length; i++) {
- Menu menu = menus [i];
+ for (Menu menu : menus) {
if (menu != null && hMenu == menu.handle) return menu;
}
return null;
@@ -729,8 +712,7 @@ void releaseChildren (boolean destroy) {
}
super.releaseChildren (destroy);
if (menus != null) {
- for (int i=0; i<menus.length; i++) {
- Menu menu = menus [i];
+ for (Menu menu : menus) {
if (menu != null && !menu.isDisposed ()) {
menu.dispose ();
}
@@ -766,8 +748,7 @@ void removeMenu (Menu menu) {
void reskinChildren (int flags) {
if (menuBar != null) menuBar.reskin (flags);
if (menus != null) {
- for (int i=0; i<menus.length; i++) {
- Menu menu = menus [i];
+ for (Menu menu : menus) {
if (menu != null) menu.reskin (flags);
}
}
@@ -903,7 +884,7 @@ void setImages (Image image, Image [] images) {
if (smallImage != null) smallImage.dispose ();
if (largeImage != null) largeImage.dispose ();
smallImage = largeImage = null;
- long /*int*/ hSmallIcon = 0, hLargeIcon = 0;
+ long hSmallIcon = 0, hLargeIcon = 0;
Image smallIcon = null, largeIcon = null;
if (image != null) {
smallIcon = largeIcon = image;
@@ -993,8 +974,8 @@ void setImages (Image image, Image [] images) {
public void setImages (Image [] images) {
checkWidget ();
if (images == null) error (SWT.ERROR_INVALID_ARGUMENT);
- for (int i = 0; i < images.length; i++) {
- if (images [i] == null || images [i].isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+ for (Image image : images) {
+ if (image == null || image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
}
this.images = images;
setImages (null, images);
@@ -1054,7 +1035,7 @@ public void setMenuBar (Menu menu) {
}
if (menu != null) display.removeBar (menu);
menuBar = menu;
- long /*int*/ hMenu = menuBar != null ? menuBar.handle: 0;
+ long hMenu = menuBar != null ? menuBar.handle: 0;
OS.SetMenu (handle, hMenu);
destroyAccelerators ();
}
@@ -1073,7 +1054,7 @@ public void setMenuBar (Menu menu) {
* always. This should be avoided if possible.
* </p>
*
- * @param minimized the new maximized state
+ * @param minimized the new minimized state
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1090,15 +1071,14 @@ public void setMinimized (boolean minimized) {
@Override
public void setOrientation (int orientation) {
- super.setOrientation (orientation);
- if (menus != null) {
- for (int i=0; i<menus.length; i++) {
- Menu menu = menus [i];
- if (menu != null && !menu.isDisposed () && (menu.getStyle () & SWT.POP_UP) != 0) {
- menu._setOrientation (menu.getOrientation ());
- }
- }
- }
+ super.setOrientation (orientation);
+ if (menus != null) {
+ for (Menu menu : menus) {
+ if (menu != null && !menu.isDisposed () && (menu.getStyle () & SWT.POP_UP) != 0) {
+ menu._setOrientation (menu.getOrientation ());
+ }
+ }
+ }
}
void setParent () {
@@ -1110,7 +1090,7 @@ void setParent () {
* undocumented and possibly dangerous Windows
* feature.
*/
- long /*int*/ hwndParent = parent.handle;
+ long hwndParent = parent.handle;
display.lockActiveWindow = true;
OS.SetParent (handle, hwndParent);
if (!OS.IsWindowVisible (hwndParent)) {
@@ -1181,7 +1161,7 @@ void setSavedFocus (Control control) {
}
void setSystemMenu () {
- long /*int*/ hMenu = OS.GetSystemMenu (handle, false);
+ long hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int oldCount = OS.GetMenuItemCount (hMenu);
if ((style & SWT.RESIZE) == 0) {
@@ -1240,13 +1220,12 @@ void setSystemMenu () {
public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
- /* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, string, true);
/* Ensure that the title appears in the task bar.*/
if ((state & FOREIGN_HANDLE) != 0) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
OS.DefWindowProc (handle, OS.WM_SETTEXT, 0, pszText);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
@@ -1339,16 +1318,16 @@ void sort (Image [] images, ImageData [] datas, int width, int height, int depth
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (compare (datas [j], datas [j + gap], width, height, depth) >= 0) {
+ if (compare (datas [j], datas [j + gap], width, height, depth) >= 0) {
Image swap = images [j];
images [j] = images [j + gap];
images [j + gap] = swap;
ImageData swapData = datas [j];
datas [j] = datas [j + gap];
datas [j + gap] = swapData;
- }
- }
- }
+ }
+ }
+ }
}
}
@@ -1369,13 +1348,13 @@ boolean translateMenuAccelerator (MSG msg) {
boolean translateMDIAccelerator (MSG msg) {
if (!(this instanceof Shell)) {
Shell shell = getShell ();
- long /*int*/ hwndMDIClient = shell.hwndMDIClient;
+ long hwndMDIClient = shell.hwndMDIClient;
if (hwndMDIClient != 0 && OS.TranslateMDISysAccel (hwndMDIClient, msg)) {
return true;
}
if (msg.message == OS.WM_KEYDOWN) {
if (OS.GetKeyState (OS.VK_CONTROL) >= 0) return false;
- switch ((int)/*64*/(msg.wParam)) {
+ switch ((int)(msg.wParam)) {
case OS.VK_F4:
OS.PostMessage (handle, OS.WM_CLOSE, 0, 0);
return true;
@@ -1385,7 +1364,7 @@ boolean translateMDIAccelerator (MSG msg) {
return false;
}
if (msg.message == OS.WM_SYSKEYDOWN) {
- switch ((int)/*64*/(msg.wParam)) {
+ switch ((int)(msg.wParam)) {
case OS.VK_F4:
OS.PostMessage (shell.handle, OS.WM_CLOSE, 0, 0);
return true;
@@ -1449,7 +1428,7 @@ int widgetExtStyle () {
}
@Override
-long /*int*/ widgetParent () {
+long widgetParent () {
Shell shell = getShell ();
return shell.hwndMDIClient ();
}
@@ -1491,7 +1470,7 @@ int widgetStyle () {
}
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
switch (msg) {
case Display.SWT_GETACCEL:
case Display.SWT_GETACCELCOUNT:
@@ -1502,7 +1481,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ACTIVATE (long wParam, long lParam) {
LRESULT result = super.WM_ACTIVATE (wParam, lParam);
if (result != null) return result;
/*
@@ -1567,7 +1546,7 @@ LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_CLOSE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CLOSE (long wParam, long lParam) {
LRESULT result = super.WM_CLOSE (wParam, lParam);
if (result != null) return result;
if (isEnabled () && isActive ()) closeWidget ();
@@ -1575,14 +1554,14 @@ LRESULT WM_CLOSE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
saveFocus ();
return result;
}
@Override
-LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOVE (long wParam, long lParam) {
if (moved) {
Point location = getLocationInPixels ();
if (location.x == oldX && location.y == oldY) {
@@ -1595,7 +1574,7 @@ LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_NCACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCACTIVATE (long wParam, long lParam) {
LRESULT result = super.WM_NCACTIVATE (wParam, lParam);
if (result != null) return result;
if (wParam == 0) {
@@ -1615,14 +1594,14 @@ LRESULT WM_NCACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
}
}
if (!(this instanceof Shell)) {
- long /*int*/ hwndShell = getShell().handle;
+ long hwndShell = getShell().handle;
OS.SendMessage (hwndShell, OS.WM_NCACTIVATE, wParam, lParam);
}
return result;
}
@Override
-LRESULT WM_QUERYOPEN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_QUERYOPEN (long wParam, long lParam) {
LRESULT result = super.WM_QUERYOPEN (wParam, lParam);
if (result != null) return result;
sendEvent (SWT.Deiconify);
@@ -1631,7 +1610,7 @@ LRESULT WM_QUERYOPEN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (isDisposed ()) return result;
if (savedFocus != this) restoreFocus ();
@@ -1639,12 +1618,12 @@ LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = null;
boolean changed = true;
if (resized) {
int newWidth = 0, newHeight = 0;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.SIZE_MAXIMIZED:
OS.GetWindowRect (handle, maxRect);
case OS.SIZE_RESTORED:
@@ -1675,11 +1654,11 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOMMAND (long wParam, long lParam) {
LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
if (result != null) return result;
if (!(this instanceof Shell)) {
- int cmd = (int)/*64*/wParam & 0xFFF0;
+ int cmd = (int)wParam & 0xFFF0;
switch (cmd) {
case OS.SC_CLOSE: {
OS.PostMessage (handle, OS.WM_CLOSE, 0, 0);
@@ -1695,7 +1674,7 @@ LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (display.lockActiveWindow) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
index 4cf84ac2cb..c6fe9f7e32 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -16,8 +16,7 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.com.win32.*;
+import org.eclipse.swt.internal.ole.win32.*;
import org.eclipse.swt.internal.win32.*;
/**
@@ -39,15 +38,6 @@ import org.eclipse.swt.internal.win32.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class DirectoryDialog extends Dialog {
- static final byte[] CLSID_FileOpenDialog = new byte[16];
- static final byte[] IID_IFileOpenDialog = new byte[16];
- static final byte[] IID_IShellItem = new byte[16];
- static {
- OS.IIDFromString("{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}\0".toCharArray(), CLSID_FileOpenDialog); //$NON-NLS-1$
- OS.IIDFromString("{d57c7288-d4ad-4768-be02-9d969532d960}\0".toCharArray(), IID_IFileOpenDialog); //$NON-NLS-1$
- OS.IIDFromString("{43826d1e-e718-42ee-bc55-a1e261c37bfe}\0".toCharArray(), IID_IShellItem); //$NON-NLS-1$
- }
-
String message = "", filterPath = ""; //$NON-NLS-1$//$NON-NLS-2$
String directoryPath;
@@ -97,32 +87,6 @@ public DirectoryDialog (Shell parent, int style) {
checkSubclass ();
}
-long /*int*/ BrowseCallbackProc (long /*int*/ hwnd, long /*int*/ uMsg, long /*int*/ lParam, long /*int*/ lpData) {
- switch ((int)/*64*/uMsg) {
- case OS.BFFM_INITIALIZED:
- if (filterPath != null && filterPath.length () != 0) {
- /* Use the character encoding for the default locale */
- TCHAR buffer = new TCHAR (0, filterPath.replace ('/', '\\'), true);
- OS.SendMessage (hwnd, OS.BFFM_SETSELECTION, 1, buffer);
- }
- if (title != null && title.length () != 0) {
- /* Use the character encoding for the default locale */
- TCHAR buffer = new TCHAR (0, title, true);
- OS.SetWindowText (hwnd, buffer);
- }
- break;
- case OS.BFFM_VALIDATEFAILED:
- /* Use the character encoding for the default locale */
- int length = OS.wcslen (lParam);
- TCHAR buffer = new TCHAR (0, length);
- int byteCount = buffer.length () * TCHAR.sizeof;
- OS.MoveMemory (buffer, lParam, byteCount);
- directoryPath = buffer.toString (0, length);
- break;
- }
- return 0;
-}
-
/**
* Returns the path which the dialog will use to filter
* the directories it shows.
@@ -159,169 +123,50 @@ public String getMessage () {
* </ul>
*/
public String open() {
- if (OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
- return openCommonItemDialog();
- }
- return openCommonFileDialog();
-}
-
-private String openCommonFileDialog () {
- long /*int*/ hHeap = OS.GetProcessHeap ();
-
- /* Get the owner HWND for the dialog */
- long /*int*/ hwndOwner = 0;
- if (parent != null) hwndOwner = parent.handle;
-
- /* Copy the message to OS memory */
- long /*int*/ lpszTitle = 0;
- if (message.length () != 0) {
- String string = message;
- if (string.indexOf ('&') != -1) {
- int length = string.length ();
- char [] buffer = new char [length * 2];
- int index = 0;
- for (int i=0; i<length; i++) {
- char ch = string.charAt (i);
- if (ch == '&') buffer [index++] = '&';
- buffer [index++] = ch;
- }
- string = new String (buffer, 0, index);
- }
- /* Use the character encoding for the default locale */
- TCHAR buffer = new TCHAR (0, string, true);
- int byteCount = buffer.length () * TCHAR.sizeof;
- lpszTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- OS.MoveMemory (lpszTitle, buffer, byteCount);
- }
-
- /* Create the BrowseCallbackProc */
- Callback callback = new Callback (this, "BrowseCallbackProc", 4); //$NON-NLS-1$
- long /*int*/ lpfn = callback.getAddress ();
- if (lpfn == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-
- /* Make the parent shell be temporary modal */
- Dialog oldModal = null;
- Display display = parent.getDisplay ();
- if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
- }
-
- directoryPath = null;
- BROWSEINFO lpbi = new BROWSEINFO ();
- lpbi.hwndOwner = hwndOwner;
- lpbi.lpszTitle = lpszTitle;
- lpbi.ulFlags = OS.BIF_NEWDIALOGSTYLE | OS.BIF_RETURNONLYFSDIRS | OS.BIF_EDITBOX | OS.BIF_VALIDATE;
- lpbi.lpfn = lpfn;
- /*
- * Bug in Windows. On some hardware configurations, SHBrowseForFolder()
- * causes warning dialogs with the message "There is no disk in the drive
- * Please insert a disk into \Device\Harddisk0\DR0". This is possibly
- * caused by SHBrowseForFolder() calling internally GetVolumeInformation().
- * MSDN for GetVolumeInformation() says:
- *
- * "If you are attempting to obtain information about a floppy drive
- * that does not have a floppy disk or a CD-ROM drive that does not
- * have a compact disc, the system displays a message box asking the
- * user to insert a floppy disk or a compact disc, respectively.
- * To prevent the system from displaying this message box, call the
- * SetErrorMode function with SEM_FAILCRITICALERRORS."
- *
- * The fix is to save and restore the error mode using SetErrorMode()
- * with the SEM_FAILCRITICALERRORS flag around SHBrowseForFolder().
- */
- int oldErrorMode = OS.SetErrorMode (OS.SEM_FAILCRITICALERRORS);
-
- display.sendPreExternalEventDispatchEvent ();
- long /*int*/ lpItemIdList = OS.SHBrowseForFolder (lpbi);
- display.sendPostExternalEventDispatchEvent ();
- OS.SetErrorMode (oldErrorMode);
-
- /* Clear the temporary dialog modal parent */
- if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
- display.setModalDialog (oldModal);
- }
-
- boolean success = lpItemIdList != 0;
- if (success) {
- /* Use the character encoding for the default locale */
- TCHAR buffer = new TCHAR (0, OS.MAX_PATH);
- if (OS.SHGetPathFromIDList (lpItemIdList, buffer)) {
- directoryPath = buffer.toString (0, buffer.strlen ());
- filterPath = directoryPath;
- }
- }
-
- /* Free the BrowseCallbackProc */
- callback.dispose ();
-
- /* Free the OS memory */
- if (lpszTitle != 0) OS.HeapFree (hHeap, 0, lpszTitle);
-
- /* Free the pointer to the ITEMIDLIST */
- long /*int*/ [] ppMalloc = new long /*int*/ [1];
- if (OS.SHGetMalloc (ppMalloc) == OS.S_OK) {
- /* void Free (struct IMalloc *this, void *pv); */
- OS.VtblCall (5, ppMalloc [0], lpItemIdList);
- }
-
- /*
- * This code is intentionally commented. On some
- * platforms, the owner window is repainted right
- * away when a dialog window exits. This behavior
- * is currently unspecified.
- */
-// if (hwndOwner != 0) OS.UpdateWindow (hwndOwner);
-
- /* Return the directory path */
- if (!success) return null;
- return directoryPath;
-}
-
-private String openCommonItemDialog() {
this.directoryPath = null;
- long /*int*/ [] ppv = new long /*int*/ [1];
- if (OS.CoCreateInstance(CLSID_FileOpenDialog, 0, OS.CLSCTX_INPROC_SERVER, IID_IFileOpenDialog, ppv) == OS.S_OK) {
- long /*int*/ fileDialog = ppv[0];
+ long [] ppv = new long [1];
+ if (COM.CoCreateInstance(COM.CLSID_FileOpenDialog, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_IFileOpenDialog, ppv) == OS.S_OK) {
+ IFileDialog fileDialog = new IFileDialog(ppv[0]);
int[] options = new int[1];
- if ((OS.VtblCall(FileDialogVtbl.GET_OPTIONS, fileDialog, options)) == OS.S_OK) {
+ if (fileDialog.GetOptions(options) == OS.S_OK) {
options[0] |= OS.FOS_PICKFOLDERS | OS.FOS_FORCEFILESYSTEM | OS.FOS_NOCHANGEDIR;
-
- OS.VtblCall(FileDialogVtbl.SET_OPTIONS, fileDialog, options[0]);
+ fileDialog.SetOptions(options[0]);
}
if (title == null) title = "";
if (title.length() > 0) {
char[] buffer = new char[title.length() + 1];
title.getChars(0, title.length(), buffer, 0);
- OS.VtblCall(FileDialogVtbl.SET_TITLE, fileDialog, buffer);
+ fileDialog.SetTitle(buffer);
}
if (filterPath != null && filterPath.length() > 0) {
String path = filterPath.replace('/', '\\');
char[] buffer = new char[path.length() + 1];
path.getChars(0, path.length(), buffer, 0);
- if (OS.SHCreateItemFromParsingName(buffer, 0, IID_IShellItem, ppv) == OS.S_OK) {
- long /*int*/ psi = ppv[0];
+ if (COM.SHCreateItemFromParsingName(buffer, 0, COM.IID_IShellItem, ppv) == OS.S_OK) {
+ IShellItem psi = new IShellItem(ppv[0]);
/*
* SetDefaultDirectory does not work if the dialog has
* persisted recently used folder. The fix is to clear the
* persisted data.
*/
- OS.VtblCall(FileDialogVtbl.CLEAR_CLIENT_DATA, fileDialog);
- OS.VtblCall(FileDialogVtbl.SET_DEFAULT_FOLDER, fileDialog, psi);
- OS.VtblCall(FileDialogVtbl.RELEASE, psi);
+ fileDialog.ClearClientData();
+ fileDialog.SetDefaultFolder(psi);
+ psi.Release();
}
}
- long /*int*/ hwndOwner = parent.handle;
- if (OS.VtblCall(FileDialogVtbl.SHOW, fileDialog, hwndOwner) == OS.S_OK) {
- if (OS.VtblCall(FileDialogVtbl.GET_RESULT, fileDialog, ppv) == OS.S_OK) {
- long /*int*/ psi = ppv[0];
- if (OS.VtblCall(ShellItemVtbl.GET_DISPLAY_NAME, psi, OS.SIGDN_FILESYSPATH, ppv) == OS.S_OK) {
- long /*int*/ wstr = ppv[0];
+ Display display = parent.getDisplay();
+ long hwndOwner = parent.handle;
+ display.externalEventLoop = true;
+ if (fileDialog.Show(hwndOwner) == OS.S_OK) {
+ if (fileDialog.GetResult(ppv) == OS.S_OK) {
+ IShellItem psi = new IShellItem(ppv[0]);
+ if (psi.GetDisplayName(OS.SIGDN_FILESYSPATH, ppv) == OS.S_OK) {
+ long wstr = ppv[0];
int length = OS.wcslen(wstr);
char[] buffer = new char[length];
OS.MoveMemory(buffer, wstr, length * 2);
@@ -329,11 +174,12 @@ private String openCommonItemDialog() {
directoryPath = new String(buffer);
}
- OS.VtblCall(FileDialogVtbl.RELEASE, psi);
+ psi.Release();
}
}
+ display.externalEventLoop = false;
- OS.VtblCall(FileDialogVtbl.RELEASE, fileDialog);
+ fileDialog.Release();
}
return directoryPath;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index c19d155ddf..2e71ec17df 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -20,6 +20,7 @@ import java.util.function.*;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.ole.win32.*;
import org.eclipse.swt.internal.win32.*;
/**
@@ -119,11 +120,12 @@ public class Display extends Device {
static String APP_NAME = "SWT"; //$NON-NLS-1$
static String APP_VERSION = ""; //$NON-NLS-1$
+ String appLocalDir;
/* Windows and Events */
Event [] eventQueue;
Callback windowCallback;
- long /*int*/ windowProc;
+ long windowProc;
int threadId;
TCHAR windowClass, windowShadowClass, windowOwnDCClass;
static int WindowClassCount;
@@ -132,12 +134,13 @@ public class Display extends Device {
static final String WindowOwnDCName = "SWT_WindowOwnDC"; //$NON-NLS-1$
EventTable eventTable, filterTable;
boolean useOwnDC;
+ boolean externalEventLoop; // events are dispatched outside SWT, e.g. TrackPopupMenu or DoDragDrop
/* Widget Table */
int freeSlot;
int [] indexTable;
Control lastControl, lastGetControl;
- long /*int*/ lastHwnd, lastGetHwnd;
+ long lastHwnd, lastGetHwnd;
Control [] controlTable;
static final int GROW_SIZE = 1024;
static final int SWT_OBJECT_INDEX = OS.GlobalAddAtom (new TCHAR (0, "SWT_OBJECT_INDEX", true)); //$NON-NLS-1$
@@ -151,7 +154,7 @@ public class Display extends Device {
}
/* XP Themes */
- long /*int*/ hButtonTheme, hEditTheme, hExplorerBarTheme, hScrollBarTheme, hTabTheme;
+ long hButtonTheme, hEditTheme, hExplorerBarTheme, hScrollBarTheme, hTabTheme;
static final char [] BUTTON = new char [] {'B', 'U', 'T', 'T', 'O', 'N', 0};
static final char [] EDIT = new char [] {'E', 'D', 'I', 'T', 0};
static final char [] EXPLORER = new char [] {'E', 'X', 'P', 'L', 'O', 'R', 'E', 'R', 0};
@@ -160,11 +163,118 @@ public class Display extends Device {
static final char [] LISTVIEW = new char [] {'L', 'I', 'S', 'T', 'V', 'I', 'E', 'W', 0};
static final char [] TAB = new char [] {'T', 'A', 'B', 0};
static final char [] TREEVIEW = new char [] {'T', 'R', 'E', 'E', 'V', 'I', 'E', 'W', 0};
+ /* Emergency switch to be used in case of regressions. Not supposed to be changed when app is running. */
+ static final boolean disableCustomThemeTweaks = Boolean.valueOf(System.getProperty("org.eclipse.swt.internal.win32.disableCustomThemeTweaks")); //$NON-NLS-1$
+ /**
+ * Changes Windows theme to 'DarkMode_Explorer' for Controls that can benefit from it.
+ * Effects as of Windows 10 version 1909:<br>
+ * <ul>
+ * <li>Button - default background/foreground colors</li>
+ * <li>Scrollbars in controls tha have them - this is the most important change for many applications.</li>
+ * <li>Tree - dark theme compatible expander icon.</li>
+ * <li>Tree - dark theme compatible colors for selected and hovered items.</li>
+ * <li>The list is not exhaustive. Also, effects can change, because Windows dark theme is not yet official.</li>
+ * </ul>
+ * Limitations:<br>
+ * <ul>
+ * <li>Only available since Win10 version 1903.</li>
+ * <li>Does not affect already created controls.</li>
+ * </ul>
+ * All Scrollable-based Controls are affected.
+ */
+ static final String USE_DARKMODE_EXPLORER_THEME_KEY = "org.eclipse.swt.internal.win32.useDarkModeExplorerTheme";
+ boolean useDarkModeExplorerTheme;
+ /**
+ * Sets Shell titles to match theme selected in Windows. That is, dark is system is dark.
+ * Limitations:<br>
+ * <ul>
+ * <li>Only available since Win10.</li>
+ * <li>Does not affect already created Shells.</li>
+ * </ul>
+ */
+ static final String USE_SHELL_TITLE_COLORING = "org.eclipse.swt.internal.win32.useShellTitleColoring";
+ boolean useShellTitleColoring;
+ /**
+ * Configures background/foreground colors of Menu(SWT.BAR).<br>
+ * Side effects:
+ * <ul>
+ * <li>Menu items are no longer highlighted when mouse hovers over</li>
+ * </ul>
+ * Expects a <code>Color</code> value.
+ */
+ static final String MENUBAR_FOREGROUND_COLOR_KEY = "org.eclipse.swt.internal.win32.menuBarForegroundColor"; //$NON-NLS-1$
+ int menuBarForegroundPixel = -1;
+ static final String MENUBAR_BACKGROUND_COLOR_KEY = "org.eclipse.swt.internal.win32.menuBarBackgroundColor"; //$NON-NLS-1$
+ int menuBarBackgroundPixel = -1;
+ /**
+ * Color of the 1px separator between Menu(SWT.BAR) and Shell's client area.<br>
+ * Expects a <code>Color</code> value.
+ */
+ static final String MENUBAR_BORDER_COLOR_KEY = "org.eclipse.swt.internal.win32.menuBarBorderColor"; //$NON-NLS-1$
+ long menuBarBorderPen;
+ /**
+ * Use a different border for Controls.
+ * This often gives better results for dark themes.
+ * The effect is slightly different for different controls.
+ */
+ static final String USE_WS_BORDER_ALL_KEY = "org.eclipse.swt.internal.win32.all.use_WS_BORDER"; //$NON-NLS-1$
+ boolean useWsBorderAll = false;
+ static final String USE_WS_BORDER_CANVAS_KEY = "org.eclipse.swt.internal.win32.Canvas.use_WS_BORDER"; //$NON-NLS-1$
+ boolean useWsBorderCanvas = false;
+ static final String USE_WS_BORDER_LABEL_KEY = "org.eclipse.swt.internal.win32.Label.use_WS_BORDER"; //$NON-NLS-1$
+ boolean useWsBorderLabel = false;
+ static final String USE_WS_BORDER_LIST_KEY = "org.eclipse.swt.internal.win32.List.use_WS_BORDER"; //$NON-NLS-1$
+ boolean useWsBorderList = false;
+ static final String USE_WS_BORDER_TABLE_KEY = "org.eclipse.swt.internal.win32.Table.use_WS_BORDER"; //$NON-NLS-1$
+ boolean useWsBorderTable = false;
+ static final String USE_WS_BORDER_TEXT_KEY = "org.eclipse.swt.internal.win32.Text.use_WS_BORDER"; //$NON-NLS-1$
+ boolean useWsBorderText = false;
+ /**
+ * Changes the color of Table header's column delimiters.
+ * Only affects custom-drawn header, that is when background/foreground header color is set.
+ * Expects a <code>Color</code> value.
+ */
+ static final String TABLE_HEADER_LINE_COLOR_KEY = "org.eclipse.swt.internal.win32.Table.headerLineColor"; //$NON-NLS-1$
+ int tableHeaderLinePixel = -1;
+ /**
+ * Disabled Label is drawn with specified foreground color.
+ * Expects a <code>Color</code> value.
+ */
+ static final String LABEL_DISABLED_FOREGROUND_COLOR_KEY = "org.eclipse.swt.internal.win32.Label.disabledForegroundColor"; //$NON-NLS-1$
+ int disabledLabelForegroundPixel = -1;
+ /**
+ * Use dark theme for Combo.
+ * Limitations:<br>
+ * <ul>
+ * <li>Only available since Win10 version 1903.</li>
+ * <li>Does not affect already created controls.</li>
+ * </ul>
+ * Expects a <code>boolean</code> value.
+ */
+ static final String COMBO_USE_DARK_THEME = "org.eclipse.swt.internal.win32.Combo.useDarkTheme"; //$NON-NLS-1$
+ boolean comboUseDarkTheme = false;
+ /**
+ * Use .setForeground() .setBackground() theme for ProgressBar.
+ * Limitations:<br>
+ * <ul>
+ * <li>Does not affect already created controls.</li>
+ * </ul>
+ * Side effects:
+ * <ul>
+ * <li>ProgressBar's shine animation is lost.</li>
+ * </ul>
+ * Expects a <code>boolean</code> value.
+ */
+ static final String PROGRESSBAR_USE_COLORS = "org.eclipse.swt.internal.win32.ProgressBar.useColors"; //$NON-NLS-1$
+ boolean progressbarUseColors = false;
+
+ /* Custom icons */
+ long hIconSearch;
+ long hIconCancel;
/* Focus */
int focusEvent;
Control focusControl;
- boolean fixFocus;
/* Menus */
Menu [] bars, popups;
@@ -181,18 +291,18 @@ public class Display extends Device {
/* Filter Hook */
Callback msgFilterCallback;
- long /*int*/ msgFilterProc, filterHook;
+ long msgFilterProc, filterHook;
MSG hookMsg = new MSG ();
boolean runDragDrop = true, dragCancelled = false;
/* Idle Hook */
Callback foregroundIdleCallback;
- long /*int*/ foregroundIdleProc, idleHook;
+ long foregroundIdleProc, idleHook;
/* Message Hook and Embedding */
boolean ignoreNextKey;
Callback getMsgCallback, embeddedCallback;
- long /*int*/ getMsgProc, msgHook, embeddedHwnd, embeddedProc;
+ long getMsgProc, msgHook, embeddedHwnd, embeddedProc;
static final String AWT_WINDOW_CLASS = "SunAwtWindow"; //$NON-NLS-1$
static final short [] ACCENTS = new short [] {'~', '`', '\'', '^', '"'};
@@ -205,6 +315,8 @@ public class Display extends Device {
static final String RUN_MESSAGES_IN_MESSAGE_PROC_KEY = "org.eclipse.swt.internal.win32.runMessagesInMessageProc"; //$NON-NLS-1$
static final String USE_OWNDC_KEY = "org.eclipse.swt.internal.win32.useOwnDC"; //$NON-NLS-1$
static final String ACCEL_KEY_HIT = "org.eclipse.swt.internal.win32.accelKeyHit"; //$NON-NLS-1$
+ static final String EXTERNAL_EVENT_LOOP_KEY = "org.eclipse.swt.internal.win32.externalEventLoop"; //$NON-NLS-1$
+ static final String APPLOCAL_DIR_KEY = "org.eclipse.swt.internal.win32.appLocalDir"; //$NON-NLS-1$
Thread thread;
/* Display Shutdown */
@@ -224,19 +336,20 @@ public class Display extends Device {
static final String LAUNCHER_PREFIX = "--launcher.openFile "; //$NON-NLS-1$
/* Timers */
- long /*int*/ [] timerIds;
+ long [] timerIds;
Runnable [] timerList;
- long /*int*/ nextTimerId = SETTINGS_ID + 1;
+ long nextTimerId = SETTINGS_ID + 1;
/* Settings */
- static final long /*int*/ SETTINGS_ID = 100;
+ static final long SETTINGS_ID = 100;
static final int SETTINGS_DELAY = 2000;
/* Keyboard and Mouse */
RECT clickRect;
int clickCount, lastTime, lastButton;
- long /*int*/ lastClickHwnd;
- int scrollRemainder, scrollHRemainder;
+ long lastClickHwnd;
+ Point scrollRemainderEvt = new Point(0, 0);
+ Point scrollRemainderBar = new Point(0, 0);
int lastKey, lastMouse, lastAscii;
boolean lastVirtual, lastNull, lastDead;
byte [] keyboard = new byte [256];
@@ -261,7 +374,7 @@ public class Display extends Device {
/* Message Only Window */
Callback messageCallback;
- long /*int*/ hwndMessage, messageProc;
+ long hwndMessage, messageProc;
/* System Resources */
LOGFONT lfSystemFont;
@@ -275,7 +388,7 @@ public class Display extends Device {
ImageList[] imageList, toolImageList, toolHotImageList, toolDisabledImageList;
/* Custom Colors for ChooseColor */
- long /*int*/ lpCustColors;
+ long lpCustColors;
/* Table */
char [] tableBuffer;
@@ -407,17 +520,6 @@ public class Display extends Device {
/* Package Name */
static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets."; //$NON-NLS-1$
- /*
- * This code is intentionally commented. In order
- * to support CLDC, .class cannot be used because
- * it does not compile on some Java compilers when
- * they are targeted for CLDC.
- */
-// static {
-// String name = Display.class.getName ();
-// int index = name.lastIndexOf ('.');
-// PACKAGE_PREFIX = name.substring (0, index + 1);
-// }
/*
* TEMPORARY CODE. Install the runnable that
@@ -496,7 +598,7 @@ void addBar (Menu menu) {
bars [index] = menu;
}
-void addControl (long /*int*/ handle, Control control) {
+void addControl (long handle, Control control) {
if (handle == 0) return;
if (freeSlot == -1) {
int length = (freeSlot = indexTable.length) + GROW_SIZE;
@@ -518,7 +620,7 @@ void addControl (long /*int*/ handle, Control control) {
void addSkinnableWidget (Widget widget) {
if (skinCount >= skinList.length) {
- Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+ Widget[] newSkinWidgets = new Widget [(skinList.length + 1) * 3 / 2];
System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
skinList = newSkinWidgets;
}
@@ -650,9 +752,14 @@ int asciiKey (int key) {
if (!OS.GetKeyboardState (keyboard)) return 0;
/* Translate the key to ASCII or UNICODE using the virtual keyboard */
- char [] result = new char [1];
- if (OS.ToUnicode (key, key, keyboard, result, 1, 0) == 1) return result [0];
- return 0;
+ char [] buffer = new char [1];
+ int len = OS.ToUnicode (key, key, keyboard, buffer, 1, 0);
+
+ /* If the key is a dead key, flush dead key state. */
+ while (len == -1) {
+ len = OS.ToUnicode (key, key, keyboard, buffer, 1, 0);
+ }
+ return (len != 0) ? buffer [0] : 0;
}
/**
@@ -717,36 +824,16 @@ protected void checkSubclass () {
@Override
protected void checkDevice () {
if (thread == null) error (SWT.ERROR_WIDGET_DISPOSED);
- if (thread != Thread.currentThread ()) {
- /*
- * Bug in IBM JVM 1.6. For some reason, under
- * conditions that are yet to be full understood,
- * Thread.currentThread() is either returning null
- * or a different instance from the one that was
- * saved when the Display was created. This is
- * possibly a JIT problem because modifying this
- * method to print logging information when the
- * error happens seems to fix the problem. The
- * fix is to use operating system calls to verify
- * that the current thread is not the Display thread.
- *
- * NOTE: Despite the fact that Thread.currentThread()
- * is used in other places, the failure has not been
- * observed in all places where it is called.
- */
- if (threadId != OS.GetCurrentThreadId ()) {
- error (SWT.ERROR_THREAD_INVALID_ACCESS);
- }
- }
+ if (thread != Thread.currentThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
}
static void checkDisplay (Thread thread, boolean multiple) {
synchronized (Device.class) {
- for (int i=0; i<Displays.length; i++) {
- if (Displays [i] != null) {
+ for (Display display : Displays) {
+ if (display != null) {
if (!multiple) SWT.error (SWT.ERROR_NOT_IMPLEMENTED, null, " [multiple displays]"); //$NON-NLS-1$
- if (Displays [i].thread == thread) SWT.error (SWT.ERROR_THREAD_INVALID_ACCESS);
+ if (display.thread == thread) SWT.error (SWT.ERROR_THREAD_INVALID_ACCESS);
}
}
}
@@ -764,12 +851,12 @@ void clearModal (Shell shell) {
System.arraycopy (modalShells, index + 1, modalShells, index, --length - index);
modalShells [length] = null;
if (index == 0 && modalShells [0] == null) modalShells = null;
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) shells [i].updateModal ();
+ for (Shell activeShell : getShells ())
+ activeShell.updateModal ();
}
int controlKey (int key) {
- int upper = (int)/*64*/OS.CharUpper ((short) key);
+ int upper = (int)OS.CharUpper ((short) key);
if (64 <= upper && upper <= 95) return upper & 0xBF;
return key;
}
@@ -818,9 +905,9 @@ protected void create (DeviceData data) {
void createDisplay (DeviceData data) {
}
-static long /*int*/ create32bitDIB (Image image) {
+static long create32bitDIB (Image image) {
int transparentPixel = -1, alpha = -1;
- long /*int*/ hMask = 0, hBitmap = 0;
+ long hMask = 0, hBitmap = 0;
byte[] alphaData = null;
switch (image.type) {
case SWT.ICON:
@@ -841,10 +928,10 @@ static long /*int*/ create32bitDIB (Image image) {
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- long /*int*/ hDC = OS.GetDC (0);
- long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
- long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- long /*int*/ memHdc = OS.CreateCompatibleDC (hDC);
+ long hDC = OS.GetDC (0);
+ long srcHdc = OS.CreateCompatibleDC (hDC);
+ long oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long memHdc = OS.CreateCompatibleDC (hDC);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -854,16 +941,16 @@ static long /*int*/ create32bitDIB (Image image) {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte red = 0, green = 0, blue = 0;
- if (transparentPixel != -1) {
+ OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ byte red = 0, green = 0, blue = 0;
+ if (transparentPixel != -1) {
if (bm.bmBitsPixel <= 8) {
byte [] color = new byte [4];
OS.GetDIBColorTable (srcHdc, transparentPixel, 1, color);
@@ -889,8 +976,8 @@ static long /*int*/ create32bitDIB (Image image) {
break;
}
}
- }
- byte [] srcData = new byte [sizeInBytes];
+ }
+ byte [] srcData = new byte [sizeInBytes];
OS.MoveMemory (srcData, pBits [0], sizeInBytes);
if (hMask != 0) {
OS.SelectObject(srcHdc, hMask);
@@ -904,39 +991,6 @@ static long /*int*/ create32bitDIB (Image image) {
dp += 4;
}
}
- } else if (alpha != -1) {
- for (int y = 0, dp = 0; y < imgHeight; ++y) {
- for (int x = 0; x < imgWidth; ++x) {
- int r = ((srcData[dp + 0] & 0xFF) * alpha) + 128;
- r = (r + (r >> 8)) >> 8;
- int g = ((srcData[dp + 1] & 0xFF) * alpha) + 128;
- g = (g + (g >> 8)) >> 8;
- int b = ((srcData[dp + 2] & 0xFF) * alpha) + 128;
- b = (b + (b >> 8)) >> 8;
- srcData[dp+0] = (byte)r;
- srcData[dp+1] = (byte)g;
- srcData[dp+2] = (byte)b;
- srcData[dp+3] = (byte)alpha;
- dp += 4;
- }
- }
- } else if (alphaData != null) {
- for (int y = 0, dp = 0, ap = 0; y < imgHeight; ++y) {
- for (int x = 0; x < imgWidth; ++x) {
- int a = alphaData[ap++] & 0xFF;
- int r = ((srcData[dp + 0] & 0xFF) * a) + 128;
- r = (r + (r >> 8)) >> 8;
- int g = ((srcData[dp + 1] & 0xFF) * a) + 128;
- g = (g + (g >> 8)) >> 8;
- int b = ((srcData[dp + 2] & 0xFF) * a) + 128;
- b = (b + (b >> 8)) >> 8;
- srcData[dp+0] = (byte)r;
- srcData[dp+1] = (byte)g;
- srcData[dp+2] = (byte)b;
- srcData[dp+3] = (byte)a;
- dp += 4;
- }
- }
} else if (transparentPixel != -1) {
for (int y = 0, dp = 0; y < imgHeight; ++y) {
for (int x = 0; x < imgWidth; ++x) {
@@ -948,7 +1002,7 @@ static long /*int*/ create32bitDIB (Image image) {
dp += 4;
}
}
- } else {
+ } else if (alpha == -1 && alphaData == null) {
for (int y = 0, dp = 0; y < imgHeight; ++y) {
for (int x = 0; x < imgWidth; ++x) {
srcData [dp + 3] = (byte)0xFF;
@@ -966,15 +1020,15 @@ static long /*int*/ create32bitDIB (Image image) {
if (hMask != 0) OS.DeleteObject (hMask);
return memDib;
}
-static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alphaData, int transparentPixel) {
+static long create32bitDIB (long hBitmap, int alpha, byte [] alphaData, int transparentPixel) {
BITMAP bm = new BITMAP ();
OS.GetObject (hBitmap, BITMAP.sizeof, bm);
int imgWidth = bm.bmWidth;
int imgHeight = bm.bmHeight;
- long /*int*/ hDC = OS.GetDC (0);
- long /*int*/ srcHdc = OS.CreateCompatibleDC (hDC);
- long /*int*/ oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
- long /*int*/ memHdc = OS.CreateCompatibleDC (hDC);
+ long hDC = OS.GetDC (0);
+ long srcHdc = OS.CreateCompatibleDC (hDC);
+ long oldSrcBitmap = OS.SelectObject (srcHdc, hBitmap);
+ long memHdc = OS.CreateCompatibleDC (hDC);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
@@ -984,16 +1038,16 @@ static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alp
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject (memHdc, memDib);
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte red = 0, green = 0, blue = 0;
- if (transparentPixel != -1) {
+ OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ byte red = 0, green = 0, blue = 0;
+ if (transparentPixel != -1) {
if (bm.bmBitsPixel <= 8) {
byte [] color = new byte [4];
OS.GetDIBColorTable (srcHdc, transparentPixel, 1, color);
@@ -1019,17 +1073,22 @@ static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alp
break;
}
}
- }
+ }
OS.SelectObject (srcHdc, oldSrcBitmap);
OS.SelectObject (memHdc, oldMemBitmap);
OS.DeleteObject (srcHdc);
OS.DeleteObject (memHdc);
OS.ReleaseDC (0, hDC);
- byte [] srcData = new byte [sizeInBytes];
+ byte [] srcData = new byte [sizeInBytes];
OS.MoveMemory (srcData, pBits [0], sizeInBytes);
if (alpha != -1) {
for (int y = 0, dp = 0; y < imgHeight; ++y) {
for (int x = 0; x < imgWidth; ++x) {
+ if (alpha != 0) {
+ srcData [dp ] = (byte)((((srcData[dp ] & 0xFF) * 0xFF) + alpha / 2) / alpha);
+ srcData [dp + 1] = (byte)((((srcData[dp + 1] & 0xFF) * 0xFF) + alpha / 2) / alpha);
+ srcData [dp + 2] = (byte)((((srcData[dp + 2] & 0xFF) * 0xFF) + alpha / 2) / alpha);
+ }
srcData [dp + 3] = (byte)alpha;
dp += 4;
}
@@ -1037,7 +1096,13 @@ static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alp
} else if (alphaData != null) {
for (int y = 0, dp = 0, ap = 0; y < imgHeight; ++y) {
for (int x = 0; x < imgWidth; ++x) {
- srcData [dp + 3] = alphaData [ap++];
+ int a = alphaData [ap++] & 0xFF;
+ if (a != 0) {
+ srcData [dp ] = (byte)((((srcData[dp ] & 0xFF) * 0xFF) + a / 2) / a);
+ srcData [dp + 1] = (byte)((((srcData[dp + 1] & 0xFF) * 0xFF) + a / 2) / a);
+ srcData [dp + 2] = (byte)((((srcData[dp + 2] & 0xFF) * 0xFF) + a / 2) / a);
+ }
+ srcData [dp + 3] = (byte)a;
dp += 4;
}
}
@@ -1065,9 +1130,9 @@ static Image createIcon (Image image) {
return new Image (device, data, mask);
}
int width = data.width, height = data.height;
- long /*int*/ hMask, hBitmap;
- long /*int*/ hDC = device.internal_new_GC (null);
- long /*int*/ dstHdc = OS.CreateCompatibleDC (hDC), oldDstBitmap;
+ long hMask, hBitmap;
+ long hDC = device.internal_new_GC (null);
+ long dstHdc = OS.CreateCompatibleDC (hDC), oldDstBitmap;
hBitmap = Display.create32bitDIB (image.handle, data.alpha, data.alphaData, data.transparentPixel);
hMask = OS.CreateBitmap (width, height, 1, 1, null);
oldDstBitmap = OS.SelectObject (dstHdc, hMask);
@@ -1079,7 +1144,7 @@ static Image createIcon (Image image) {
info.fIcon = true;
info.hbmColor = hBitmap;
info.hbmMask = hMask;
- long /*int*/ hIcon = OS.CreateIconIndirect (info);
+ long hIcon = OS.CreateIconIndirect (info);
if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);
OS.DeleteObject (hBitmap);
OS.DeleteObject (hMask);
@@ -1144,21 +1209,20 @@ public void disposeExec (Runnable runnable) {
void drawMenuBars () {
if (bars == null) return;
- for (int i=0; i<bars.length; i++) {
- Menu menu = bars [i];
+ for (Menu menu : bars) {
if (menu != null && !menu.isDisposed ()) menu.update ();
}
bars = null;
}
-long /*int*/ embeddedProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
- switch ((int)/*64*/msg) {
+long embeddedProc (long hwnd, long msg, long wParam, long lParam) {
+ switch ((int)msg) {
case SWT_KEYMSG: {
MSG keyMsg = new MSG ();
OS.MoveMemory (keyMsg, lParam, MSG.sizeof);
OS.TranslateMessage (keyMsg);
OS.DispatchMessage (keyMsg);
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
break;
}
@@ -1171,7 +1235,7 @@ long /*int*/ embeddedProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPa
break;
}
}
- return OS.DefWindowProc (hwnd, (int)/*64*/msg, wParam, lParam);
+ return OS.DefWindowProc (hwnd, (int)msg, wParam, lParam);
}
/**
@@ -1219,9 +1283,9 @@ boolean filterMessage (MSG msg) {
return false;
}
-Control findControl (long /*int*/ handle) {
+Control findControl (long handle) {
if (handle == 0) return null;
- long /*int*/ hwndOwner = 0;
+ long hwndOwner = 0;
do {
Control control = getControl (handle);
if (control != null) return control;
@@ -1251,7 +1315,7 @@ Control findControl (long /*int*/ handle) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public Widget findWidget (long /*int*/ handle) {
+public Widget findWidget (long handle) {
checkDevice ();
return getControl (handle);
}
@@ -1280,7 +1344,7 @@ public Widget findWidget (long /*int*/ handle) {
*
* @since 3.1
*/
-public Widget findWidget (long /*int*/ handle, long /*int*/ id) {
+public Widget findWidget (long handle, long id) {
checkDevice ();
Control control = getControl (handle);
return control != null ? control.findItem (id) : null;
@@ -1305,7 +1369,7 @@ public Widget findWidget (long /*int*/ handle, long /*int*/ id) {
*
* @since 3.3
*/
-public Widget findWidget (Widget widget, long /*int*/ id) {
+public Widget findWidget (Widget widget, long id) {
checkDevice ();
if (widget instanceof Control) {
return findWidget (((Control) widget).handle, id);
@@ -1313,7 +1377,7 @@ public Widget findWidget (Widget widget, long /*int*/ id) {
return null;
}
-long /*int*/ foregroundIdleProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
+long foregroundIdleProc (long code, long wParam, long lParam) {
if (code >= 0) {
if (getMessageCount () != 0) {
sendPostExternalEventDispatchEvent ();
@@ -1343,7 +1407,7 @@ long /*int*/ foregroundIdleProc (long /*int*/ code, long /*int*/ wParam, long /*
sendPreExternalEventDispatchEvent ();
}
}
- return OS.CallNextHookEx (idleHook, (int)/*64*/code, wParam, lParam);
+ return OS.CallNextHookEx (idleHook, (int)code, wParam, lParam);
}
/**
@@ -1358,8 +1422,7 @@ long /*int*/ foregroundIdleProc (long /*int*/ code, long /*int*/ wParam, long /*
*/
public static Display findDisplay (Thread thread) {
synchronized (Device.class) {
- for (int i=0; i<Displays.length; i++) {
- Display display = Displays [i];
+ for (Display display : Displays) {
if (display != null && display.thread == thread) {
return display;
}
@@ -1368,7 +1431,7 @@ public static Display findDisplay (Thread thread) {
}
}
-TouchSource findTouchSource (long /*int*/ touchDevice, Monitor monitor) {
+TouchSource findTouchSource (long touchDevice, Monitor monitor) {
if (touchSources == null) touchSources = new TouchSource [4];
int length = touchSources.length;
for (int i=0; i<length; i++) {
@@ -1466,7 +1529,7 @@ public static Display getCurrent () {
return findDisplay (Thread.currentThread ());
}
-int getClickCount (int type, int button, long /*int*/ hwnd, long /*int*/ lParam) {
+int getClickCount (int type, int button, long hwnd, long lParam) {
switch (type) {
case SWT.MouseDown:
int doubleClick = OS.GetDoubleClickTime ();
@@ -1530,7 +1593,7 @@ Rectangle getClientAreaInPixels () {
return new Rectangle (x, y, width, height);
}
-Control getControl (long /*int*/ handle) {
+Control getControl (long handle) {
if (handle == 0) return null;
if (lastControl != null && lastHwnd == handle) {
return lastControl;
@@ -1538,22 +1601,10 @@ Control getControl (long /*int*/ handle) {
if (lastGetControl != null && lastGetHwnd == handle) {
return lastGetControl;
}
- int index = (int)/*64*/OS.GetProp (handle, SWT_OBJECT_INDEX) - 1;
+ int index = (int)OS.GetProp (handle, SWT_OBJECT_INDEX) - 1;
if (0 <= index && index < controlTable.length) {
- Control control = controlTable [index];
- /*
- * Because GWL_USERDATA can be used by native widgets that
- * do not belong to SWT, it is possible that GWL_USERDATA
- * could return an index that is in the range of the table,
- * but was not put there by SWT. Therefore, it is necessary
- * to check the handle of the control that is in the table
- * against the handle that provided the GWL_USERDATA.
- */
- if (control != null && control.checkHandle (handle)) {
- lastGetHwnd = handle;
- lastGetControl = control;
- return control;
- }
+ lastGetHwnd = handle;
+ return lastGetControl = controlTable [index];
}
return null;
}
@@ -1693,6 +1744,9 @@ public Object getData (String key) {
if (key.equals (ACCEL_KEY_HIT)) {
return accelKeyHit;
}
+ if (key.equals (APPLOCAL_DIR_KEY)) {
+ return appLocalDir;
+ }
if (keys == null) return null;
for (int i=0; i<keys.length; i++) {
if (keys [i].equals (key)) return values [i];
@@ -1841,16 +1895,13 @@ public int getIconDepth () {
checkDevice ();
if (getDepth () >= 24) return 32;
- /* Use the character encoding for the default locale */
TCHAR buffer1 = new TCHAR (0, "Control Panel\\Desktop\\WindowMetrics", true); //$NON-NLS-1$
-
- long /*int*/ [] phkResult = new long /*int*/ [1];
+ long [] phkResult = new long [1];
int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, buffer1, 0, OS.KEY_READ, phkResult);
if (result != 0) return 4;
int depth = 4;
int [] lpcbData = new int [1];
- /* Use the character encoding for the default locale */
TCHAR buffer2 = new TCHAR (0, "Shell Icon BPP", true); //$NON-NLS-1$
result = OS.RegQueryValueEx (phkResult [0], buffer2, 0, null, (TCHAR) null, lpcbData);
if (result == 0) {
@@ -2008,6 +2059,40 @@ ImageList getImageListToolBarHot (int style, int width, int height) {
return list;
}
+/**
+ * Returns <code>true</code> if the current OS theme has a dark appearance, else
+ * returns <code>false</code>.
+ * <p>
+ * Note: This operation is a hint and is not supported on platforms that do not
+ * have this concept.
+ * </p>
+ * <p>
+ * Note: Windows 10 onwards users can separately configure the theme for OS and
+ * Application level and this can be read from the Windows registry. Since the
+ * application needs to honor the application level theme, this API reads the
+ * Application level theme setting.
+ * </p>
+ *
+ * @return <code>true</code> if the current OS theme has a dark appearance, else
+ * returns <code>false</code>.
+ *
+ * @since 3.112
+ */
+public static boolean isSystemDarkTheme () {
+ boolean isDarkTheme = false;
+ /*
+ * The registry settings, and Dark Theme itself, is present since Win10 1809
+ */
+ if (OS.WIN32_BUILD >= OS.WIN32_BUILD_WIN10_1809) {
+ int[] result = OS.readRegistryDwords(OS.HKEY_CURRENT_USER,
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "AppsUseLightTheme");
+ if (result!=null) {
+ isDarkTheme = (result[0] == 0);
+ }
+ }
+ return isDarkTheme;
+}
+
int getLastEventTime () {
return OS.GetMessageTime ();
}
@@ -2044,7 +2129,7 @@ Dialog getModalDialog () {
return modalDialog;
}
-Monitor getMonitor (long /*int*/ hmonitor) {
+Monitor getMonitor (long hmonitor) {
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -2081,9 +2166,7 @@ public Monitor [] getMonitors () {
checkDevice ();
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
- long /*int*/ lpfnEnum = callback.getAddress ();
- if (lpfnEnum == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
+ OS.EnumDisplayMonitors (0, null, callback.getAddress (), 0);
callback.dispose ();
Monitor [] result = new Monitor [monitorCount];
System.arraycopy (monitors, 0, result, 0, monitorCount);
@@ -2092,9 +2175,9 @@ public Monitor [] getMonitors () {
return result;
}
-long /*int*/ getMsgProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
+long getMsgProc (long code, long wParam, long lParam) {
if (embeddedHwnd == 0) {
- long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long hInstance = OS.GetModuleHandle (null);
embeddedHwnd = OS.CreateWindowEx (0,
windowClass,
null,
@@ -2106,7 +2189,6 @@ long /*int*/ getMsgProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lP
null);
embeddedCallback = new Callback (this, "embeddedProc", 4); //$NON-NLS-1$
embeddedProc = embeddedCallback.getAddress ();
- if (embeddedProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.SetWindowLongPtr (embeddedHwnd, OS.GWLP_WNDPROC, embeddedProc);
}
if (code >= 0 && (wParam & OS.PM_REMOVE) != 0) {
@@ -2119,11 +2201,11 @@ long /*int*/ getMsgProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lP
case OS.WM_SYSKEYUP: {
Control control = findControl (msg.hwnd);
if (control != null) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
+ long hHeap = OS.GetProcessHeap ();
+ long keyMsg = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, MSG.sizeof);
OS.MoveMemory (keyMsg, msg, MSG.sizeof);
OS.PostMessage (hwndMessage, SWT_KEYMSG, wParam, keyMsg);
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -2139,7 +2221,7 @@ long /*int*/ getMsgProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lP
}
}
}
- return OS.CallNextHookEx (msgHook, (int)/*64*/code, wParam, lParam);
+ return OS.CallNextHookEx (msgHook, (int)code, wParam, lParam);
}
/**
@@ -2151,7 +2233,7 @@ long /*int*/ getMsgProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lP
*/
public Monitor getPrimaryMonitor () {
checkDevice ();
- long /*int*/ hmonitor = OS.MonitorFromWindow (0, OS.MONITOR_DEFAULTTOPRIMARY);
+ long hmonitor = OS.MonitorFromWindow (0, OS.MONITOR_DEFAULTTOPRIMARY);
return getMonitor (hmonitor);
}
@@ -2170,9 +2252,8 @@ public Shell [] getShells () {
checkDevice ();
int index = 0;
Shell [] result = new Shell [16];
- for (int i = 0; i < controlTable.length; i++) {
- Control control = controlTable [i];
- if (control != null && control instanceof Shell) {
+ for (Control control : controlTable) {
+ if (control instanceof Shell) {
int j = 0;
while (j < index) {
if (result [j] == control) break;
@@ -2258,9 +2339,11 @@ public Color getSystemColor (int id) {
int pixel = 0x00000000;
switch (id) {
case SWT.COLOR_WIDGET_DARK_SHADOW: pixel = OS.GetSysColor (OS.COLOR_3DDKSHADOW); break;
+ case SWT.COLOR_WIDGET_DISABLED_FOREGROUND: pixel = OS.GetSysColor(OS.COLOR_GRAYTEXT); break;
case SWT.COLOR_WIDGET_NORMAL_SHADOW: pixel = OS.GetSysColor (OS.COLOR_3DSHADOW); break;
case SWT.COLOR_WIDGET_LIGHT_SHADOW: pixel = OS.GetSysColor (OS.COLOR_3DLIGHT); break;
case SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW: pixel = OS.GetSysColor (OS.COLOR_3DHIGHLIGHT); break;
+ case SWT.COLOR_TEXT_DISABLED_BACKGROUND:
case SWT.COLOR_WIDGET_BACKGROUND: pixel = OS.GetSysColor (OS.COLOR_3DFACE); break;
case SWT.COLOR_WIDGET_BORDER: pixel = OS.GetSysColor (OS.COLOR_WINDOWFRAME); break;
case SWT.COLOR_WIDGET_FOREGROUND:
@@ -2365,7 +2448,7 @@ public Cursor getSystemCursor (int id) {
public Font getSystemFont () {
checkDevice ();
if (systemFont != null) return systemFont;
- long /*int*/ hFont = 0;
+ long hFont = 0;
NONCLIENTMETRICS info = new NONCLIENTMETRICS ();
info.cbSize = NONCLIENTMETRICS.sizeof;
if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, info, 0)) {
@@ -2409,23 +2492,23 @@ public Image getSystemImage (int id) {
switch (id) {
case SWT.ICON_ERROR: {
if (errorImage != null) return errorImage;
- long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_HAND, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long hIcon = OS.LoadImage (0, OS.OIC_HAND, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return errorImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_WORKING:
case SWT.ICON_INFORMATION: {
if (infoImage != null) return infoImage;
- long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_INFORMATION, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long hIcon = OS.LoadImage (0, OS.OIC_INFORMATION, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return infoImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_QUESTION: {
if (questionImage != null) return questionImage;
- long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_QUES, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long hIcon = OS.LoadImage (0, OS.OIC_QUES, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return questionImage = Image.win32_new (this, SWT.ICON, hIcon);
}
case SWT.ICON_WARNING: {
if (warningIcon != null) return warningIcon;
- long /*int*/ hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
+ long hIcon = OS.LoadImage (0, OS.OIC_BANG, OS.IMAGE_ICON, 0, 0, OS.LR_SHARED);
return warningIcon = Image.win32_new (this, SWT.ICON, hIcon);
}
}
@@ -2466,7 +2549,15 @@ public TaskBar getSystemTaskBar () {
checkDevice ();
if (taskBar != null) return taskBar;
if (OS.WIN32_VERSION >= OS.VERSION (6, 1)) {
- taskBar = new TaskBar (this, SWT.NONE);
+ try {
+ taskBar = new TaskBar (this, SWT.NONE);
+ } catch (SWTError e) {
+ if (e.code == SWT.ERROR_NOT_IMPLEMENTED) {
+ // Windows Server Core doesn't have a Taskbar
+ return null;
+ }
+ throw e;
+ }
}
return taskBar;
}
@@ -2524,27 +2615,27 @@ public boolean getTouchEnabled () {
return (value & (OS.NID_READY | OS.NID_MULTI_INPUT)) == (OS.NID_READY | OS.NID_MULTI_INPUT);
}
-long /*int*/ hButtonTheme () {
+long hButtonTheme () {
if (hButtonTheme != 0) return hButtonTheme;
return hButtonTheme = OS.OpenThemeData (hwndMessage, BUTTON);
}
-long /*int*/ hEditTheme () {
+long hEditTheme () {
if (hEditTheme != 0) return hEditTheme;
return hEditTheme = OS.OpenThemeData (hwndMessage, EDIT);
}
-long /*int*/ hExplorerBarTheme () {
+long hExplorerBarTheme () {
if (hExplorerBarTheme != 0) return hExplorerBarTheme;
return hExplorerBarTheme = OS.OpenThemeData (hwndMessage, EXPLORERBAR);
}
-long /*int*/ hScrollBarTheme () {
+long hScrollBarTheme () {
if (hScrollBarTheme != 0) return hScrollBarTheme;
return hScrollBarTheme = OS.OpenThemeData (hwndMessage, SCROLLBAR);
}
-long /*int*/ hTabTheme () {
+long hTabTheme () {
if (hTabTheme != 0) return hTabTheme;
return hTabTheme = OS.OpenThemeData (hwndMessage, TAB);
}
@@ -2572,9 +2663,9 @@ long /*int*/ hTabTheme () {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public long /*int*/ internal_new_GC (GCData data) {
+public long internal_new_GC (GCData data) {
if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
- long /*int*/ hDC = OS.GetDC (0);
+ long hDC = OS.GetDC (0);
if (hDC == 0) error (SWT.ERROR_NO_HANDLES);
if (data != null) {
int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
@@ -2610,7 +2701,7 @@ protected void init () {
int length = APP_NAME.length ();
appName = new char [length + 1];
APP_NAME.getChars (0, length, appName, 0);
- long /*int*/ [] appID = new long /*int*/ [1];
+ long [] appID = new long [1];
if (OS.GetCurrentProcessExplicitAppUserModelID(appID) != 0) {
OS.SetCurrentProcessExplicitAppUserModelID (appName);
}
@@ -2621,19 +2712,17 @@ protected void init () {
/* Create the callbacks */
windowCallback = new Callback (this, "windowProc", 4); //$NON-NLS-1$
windowProc = windowCallback.getAddress ();
- if (windowProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Remember the current thread id */
threadId = OS.GetCurrentThreadId ();
- /* Use the character encoding for the default locale */
windowClass = new TCHAR (0, WindowName + WindowClassCount, true);
windowShadowClass = new TCHAR (0, WindowShadowName + WindowClassCount, true);
windowOwnDCClass = new TCHAR (0, WindowOwnDCName + WindowClassCount, true);
WindowClassCount++;
/* Register the SWT window class */
- long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long hInstance = OS.GetModuleHandle (null);
WNDCLASS lpWndClass = new WNDCLASS ();
lpWndClass.hInstance = hInstance;
lpWndClass.lpfnWndProc = windowProc;
@@ -2664,19 +2753,16 @@ protected void init () {
OS.SetWindowText(hwndMessage, new TCHAR(0, title, true));
messageCallback = new Callback (this, "messageProc", 4); //$NON-NLS-1$
messageProc = messageCallback.getAddress ();
- if (messageProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.SetWindowLongPtr (hwndMessage, OS.GWLP_WNDPROC, messageProc);
/* Create the filter hook */
msgFilterCallback = new Callback (this, "msgFilterProc", 3); //$NON-NLS-1$
msgFilterProc = msgFilterCallback.getAddress ();
- if (msgFilterProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
filterHook = OS.SetWindowsHookEx (OS.WH_MSGFILTER, msgFilterProc, 0, threadId);
/* Create the idle hook */
foregroundIdleCallback = new Callback (this, "foregroundIdleProc", 3); //$NON-NLS-1$
foregroundIdleProc = foregroundIdleCallback.getAddress ();
- if (foregroundIdleProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
idleHook = OS.SetWindowsHookEx (OS.WH_FOREGROUNDIDLE, foregroundIdleProc, 0, threadId);
/* Register window messages */
@@ -2691,16 +2777,18 @@ protected void init () {
if (appName != null) {
/* Delete any old jump list set for the ID */
- long /*int*/ [] ppv = new long /*int*/ [1];
- int hr = OS.CoCreateInstance (TaskBar.CLSID_DestinationList, 0, OS.CLSCTX_INPROC_SERVER, TaskBar.IID_ICustomDestinationList, ppv);
+ long [] ppv = new long [1];
+ int hr = COM.CoCreateInstance (COM.CLSID_DestinationList, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_ICustomDestinationList, ppv);
if (hr == OS.S_OK) {
- /*ICustomDestinationList::DeleteList*/
- OS.VtblCall (10, ppv [0], appName);
- /*IUnknown::Release*/
- OS.VtblCall (2, ppv [0]);
+ ICustomDestinationList pList = new ICustomDestinationList (ppv [0]);
+ pList.DeleteList (appName);
+ pList.Release ();
}
}
+ /* Application-specific data directory. */
+ appLocalDir = System.getenv("LOCALAPPDATA") + "\\" + Display.APP_NAME.replaceAll("[\\\\/:*?\"<>|]", "_");
+
/* Initialize buffered painting */
OS.BufferedPaintInit ();
@@ -2727,24 +2815,18 @@ protected void init () {
* @noreference This method is not intended to be referenced by clients.
*/
@Override
-public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
+public void internal_dispose_GC (long hDC, GCData data) {
OS.ReleaseDC (0, hDC);
}
boolean isXMouseActive () {
/*
* NOTE: X-Mouse is active when bit 1 of the UserPreferencesMask is set.
- */
+ */
boolean xMouseActive = false;
- TCHAR key = new TCHAR (0, "Control Panel\\Desktop", true); //$NON-NLS-1$
- long /*int*/ [] phKey = new long /*int*/ [1];
- int result = OS.RegOpenKeyEx (OS.HKEY_CURRENT_USER, key, 0, OS.KEY_READ, phKey);
- if (result == 0) {
- TCHAR lpValueName = new TCHAR (0, "UserPreferencesMask", true); //$NON-NLS-1$
- int [] lpcbData = new int [] {4}, lpData = new int [1];
- result = OS.RegQueryValueEx (phKey [0], lpValueName, 0, null, lpData, lpcbData);
- if (result == 0) xMouseActive = (lpData [0] & 0x01) != 0;
- OS.RegCloseKey (phKey [0]);
+ int[] result = OS.readRegistryDwords(OS.HKEY_CURRENT_USER, "Control Panel\\Desktop", "UserPreferencesMask");
+ if (result!=null) {
+ xMouseActive = (result[0] & 0x01) != 0;
}
return xMouseActive;
}
@@ -2847,8 +2929,8 @@ Point mapInPixels (Control from, Control to, int x, int y) {
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (from == to) return new Point (x, y);
- long /*int*/ hwndFrom = from != null ? from.handle : 0;
- long /*int*/ hwndTo = to != null ? to.handle : 0;
+ long hwndFrom = from != null ? from.handle : 0;
+ long hwndTo = to != null ? to.handle : 0;
POINT point = new POINT ();
point.x = x;
point.y = y;
@@ -2954,8 +3036,8 @@ Rectangle mapInPixels (Control from, Control to, int x, int y, int width, int he
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (from == to) return new Rectangle (x, y, width, height);
- long /*int*/ hwndFrom = from != null ? from.handle : 0;
- long /*int*/ hwndTo = to != null ? to.handle : 0;
+ long hwndFrom = from != null ? from.handle : 0;
+ long hwndTo = to != null ? to.handle : 0;
RECT rect = new RECT ();
rect.left = x;
rect.top = y;
@@ -2965,8 +3047,8 @@ Rectangle mapInPixels (Control from, Control to, int x, int y, int width, int he
return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
}
-long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
- switch ((int)/*64*/msg) {
+long messageProc (long hwnd, long msg, long wParam, long lParam) {
+ switch ((int)msg) {
case SWT_RUNASYNC: {
if (runMessagesInIdle) runAsyncMessages (false);
break;
@@ -2990,7 +3072,7 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
switch (keyMsg.message) {
case OS.WM_KEYDOWN:
case OS.WM_SYSKEYDOWN: {
- switch ((int)/*64*/keyMsg.wParam) {
+ switch ((int)keyMsg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -2999,12 +3081,12 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
case OS.VK_SCROLL:
break;
default: {
- int mapKey = OS.MapVirtualKey ((int)/*64*/keyMsg.wParam, 2);
+ int mapKey = OS.MapVirtualKey ((int)keyMsg.wParam, 2);
if (mapKey != 0) {
accentKey = (mapKey & 0x80000000) != 0;
if (!accentKey) {
- for (int i=0; i<ACCENTS.length; i++) {
- int value = OS.VkKeyScan (ACCENTS [i]);
+ for (short accent : ACCENTS) {
+ int value = OS.VkKeyScan (accent);
if (value != -1 && (value & 0xFF) == keyMsg.wParam) {
int state = value >> 8;
if ((OS.GetKeyState (OS.VK_SHIFT) < 0) == ((state & 0x1) != 0) &&
@@ -3036,7 +3118,7 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
switch (keyMsg.message) {
case OS.WM_KEYDOWN:
case OS.WM_SYSKEYDOWN: {
- switch ((int)/*64*/keyMsg.wParam) {
+ switch ((int)keyMsg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -3052,7 +3134,7 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
}
}
}
- switch ((int)/*64*/keyMsg.wParam) {
+ switch ((int)keyMsg.wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -3062,7 +3144,7 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
consumed = true;
}
if (consumed) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lParam);
} else {
OS.PostMessage (embeddedHwnd, SWT_KEYMSG, wParam, lParam);
@@ -3071,11 +3153,9 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
}
case SWT_TRAYICONMSG: {
if (tray != null) {
- TrayItem [] items = tray.items;
- for (int i=0; i<items.length; i++) {
- TrayItem item = items [i];
+ for (TrayItem item : tray.items) {
if (item != null && item.id == wParam) {
- return item.messageProc (hwnd, (int)/*64*/msg, wParam, lParam);
+ return item.messageProc (hwnd, (int)msg, wParam, lParam);
}
}
}
@@ -3103,16 +3183,16 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
*/
if (wParam != 0) {
if (!isXMouseActive ()) {
- long /*int*/ hwndActive = OS.GetActiveWindow ();
+ long hwndActive = OS.GetActiveWindow ();
if (hwndActive != 0 && OS.IsWindowEnabled (hwndActive)) break;
Shell modal = modalDialog != null ? modalDialog.parent : getModalShell ();
if (modal != null && !modal.isDisposed ()) {
- long /*int*/ hwndModal = modal.handle;
+ long hwndModal = modal.handle;
if (OS.IsWindowEnabled (hwndModal)) {
modal.bringToTop ();
if (modal.isDisposed ()) break;
}
- long /*int*/ hwndPopup = OS.GetLastActivePopup (hwndModal);
+ long hwndPopup = OS.GetLastActivePopup (hwndModal);
if (hwndPopup != 0 && hwndPopup != modal.handle) {
if (getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -3128,13 +3208,6 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
case OS.WM_ENDSESSION: {
if (wParam != 0) {
dispose ();
- /*
- * When the session is ending, no SWT program can continue
- * to run. In order to avoid running code after the display
- * has been disposed, exit from Java.
- */
- /* This code is intentionally commented */
-// System.exit (0);
}
break;
}
@@ -3169,17 +3242,15 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
break;
}
default: {
- if ((int)/*64*/msg == TASKBARCREATED) {
+ if ((int)msg == TASKBARCREATED) {
if (tray != null) {
- TrayItem [] items = tray.items;
- for (int i=0; i<items.length; i++) {
- TrayItem item = items [i];
+ for (TrayItem item : tray.items) {
if (item != null) item.recreate ();
}
}
}
- if ((int)/*64*/msg == SWT_OPENDOC) {
- String filename = getSharedData((int)/*64*/wParam, (int)/*64*/lParam);
+ if ((int)msg == SWT_OPENDOC) {
+ String filename = getSharedData((int)wParam, (int)lParam);
if (filename != null) {
if (filename.startsWith (TASKBAR_EVENT)) {
String text = filename.substring (TASKBAR_EVENT.length ());
@@ -3203,21 +3274,21 @@ long /*int*/ messageProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wPar
}
}
}
- return OS.DefWindowProc (hwnd, (int)/*64*/msg, wParam, lParam);
+ return OS.DefWindowProc (hwnd, (int)msg, wParam, lParam);
}
String getSharedData(int pid, int handle) {
- long /*int*/ [] mapHandle = new long /*int*/ [1];
+ long [] mapHandle = new long [1];
if (pid == OS.GetCurrentProcessId()) {
mapHandle[0] = handle;
} else {
- long /*int*/ processHandle = OS.OpenProcess(OS.PROCESS_VM_READ|OS.PROCESS_DUP_HANDLE, false, pid);
+ long processHandle = OS.OpenProcess(OS.PROCESS_VM_READ|OS.PROCESS_DUP_HANDLE, false, pid);
if (processHandle == 0) return null;
OS.DuplicateHandle(processHandle, handle, OS.GetCurrentProcess(), mapHandle, OS.DUPLICATE_SAME_ACCESS, false, OS.DUPLICATE_SAME_ACCESS);
OS.CloseHandle(processHandle);
}
- long /*int*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
+ long sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
if (sharedData == 0) return null;
int length = OS.wcslen (sharedData);
TCHAR buffer = new TCHAR (0, length);
@@ -3231,7 +3302,7 @@ String getSharedData(int pid, int handle) {
return result;
}
-long /*int*/ monitorEnumProc (long /*int*/ hmonitor, long /*int*/ hdc, long /*int*/ lprcMonitor, long /*int*/ dwData) {
+long monitorEnumProc (long hmonitor, long hdc, long lprcMonitor, long dwData) {
if (monitorCount >= monitors.length) {
Monitor[] newMonitors = new Monitor [monitors.length + 4];
System.arraycopy (monitors, 0, newMonitors, 0, monitors.length);
@@ -3241,8 +3312,8 @@ long /*int*/ monitorEnumProc (long /*int*/ hmonitor, long /*int*/ hdc, long /*in
return 1;
}
-long /*int*/ msgFilterProc (long /*int*/ code, long /*int*/ wParam, long /*int*/ lParam) {
- switch ((int)/*64*/code) {
+long msgFilterProc (long code, long wParam, long lParam) {
+ switch ((int)code) {
case OS.MSGF_COMMCTRL_BEGINDRAG: {
if (!runDragDrop && !dragCancelled) {
OS.MoveMemory (hookMsg, lParam, MSG.sizeof);
@@ -3279,7 +3350,7 @@ long /*int*/ msgFilterProc (long /*int*/ code, long /*int*/ wParam, long /*int*/
break;
}
}
- return OS.CallNextHookEx (filterHook, (int)/*64*/code, wParam, lParam);
+ return OS.CallNextHookEx (filterHook, (int)code, wParam, lParam);
}
int numpadKey (int key) {
@@ -3416,14 +3487,10 @@ public boolean post (Event event) {
case OS.VK_DIVIDE:
inputs.dwFlags |= OS.KEYEVENTF_EXTENDEDKEY;
}
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
- OS.MoveMemory(pInputs, new int[] {OS.INPUT_KEYBOARD}, 4);
- //TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
- OS.MoveMemory (pInputs + C.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof);
- boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
- OS.HeapFree (hHeap, 0, pInputs);
- return result;
+ INPUT pInputs = new INPUT ();
+ pInputs.type = OS.INPUT_KEYBOARD;
+ pInputs.ki = inputs;
+ return OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
}
case SWT.MouseDown:
case SWT.MouseMove:
@@ -3472,14 +3539,10 @@ public boolean post (Event event) {
}
}
}
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
- OS.MoveMemory(pInputs, new int[] {OS.INPUT_MOUSE}, 4);
- //TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
- OS.MoveMemory (pInputs + C.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof);
- boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
- OS.HeapFree (hHeap, 0, pInputs);
- return result;
+ INPUT pInputs = new INPUT ();
+ pInputs.type = OS.INPUT_MOUSE;
+ pInputs.mi = inputs;
+ return OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
}
}
return false;
@@ -3591,36 +3654,61 @@ static void register (Display display) {
*/
@Override
protected void release () {
- sendEvent (SWT.Dispose, new Event ());
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) {
- Shell shell = shells [i];
- if (!shell.isDisposed ()) shell.dispose ();
- }
- if (tray != null) tray.dispose ();
- tray = null;
- if (taskBar != null) taskBar.dispose ();
- taskBar = null;
- while (readAndDispatch ()) {}
- if (disposeList != null) {
- for (int i=0; i<disposeList.length; i++) {
- Runnable next = disposeList [i];
- if (next != null) {
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ try {
+ sendEvent (SWT.Dispose, new Event ());
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+
+ for (Shell shell : getShells ()) {
+ try {
+ if (!shell.isDisposed ()) shell.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+
+ try {
+ if (tray != null) tray.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ tray = null;
+
+ try {
+ if (taskBar != null) taskBar.dispose ();
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ taskBar = null;
+
+ for (;;) {
+ try {
+ if (!readAndDispatch ()) break;
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+
+ if (disposeList != null) {
+ for (Runnable next : disposeList) {
+ if (next == null) continue;
+
try {
next.run ();
- } catch (RuntimeException exception) {
- runtimeExceptionHandler.accept (exception);
- } catch (Error error) {
- errorHandler.accept (error);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
}
}
}
+ disposeList = null;
+
+ synchronizer.releaseSynchronizer ();
+ synchronizer = null;
+ releaseDisplay ();
+ super.release ();
}
- disposeList = null;
- synchronizer.releaseSynchronizer ();
- synchronizer = null;
- releaseDisplay ();
- super.release ();
}
void releaseDisplay () {
@@ -3628,6 +3716,10 @@ void releaseDisplay () {
OS.PostMessage (embeddedHwnd, SWT_DESTROY, 0, 0);
}
+ /* Free custom icons */
+ if (hIconSearch != 0) OS.DestroyIcon (hIconSearch);
+ if (hIconCancel != 0) OS.DestroyIcon (hIconCancel);
+
/* Release XP Themes */
if (hButtonTheme != 0) OS.CloseThemeData (hButtonTheme);
if (hEditTheme != 0) OS.CloseThemeData (hEditTheme);
@@ -3635,6 +3727,8 @@ void releaseDisplay () {
if (hScrollBarTheme != 0) OS.CloseThemeData (hScrollBarTheme);
if (hTabTheme != 0) OS.CloseThemeData (hTabTheme);
hButtonTheme = hEditTheme = hExplorerBarTheme = hScrollBarTheme = hTabTheme = 0;
+ if (menuBarBorderPen != 0) OS.DeleteObject (menuBarBorderPen);
+ menuBarBorderPen = 0;
/* Unhook the message hook */
if (msgHook != 0) OS.UnhookWindowsHookEx (msgHook);
@@ -3665,8 +3759,8 @@ void releaseDisplay () {
messageProc = 0;
/* Unregister the SWT window class */
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long hHeap = OS.GetProcessHeap ();
+ long hInstance = OS.GetModuleHandle (null);
OS.UnregisterClass (windowClass, hInstance);
/* Unregister the SWT drop shadow and CS_OWNDC window class */
@@ -3690,15 +3784,15 @@ void releaseDisplay () {
errorImage = infoImage = questionImage = warningIcon = null;
/* Release the System Cursors */
- for (int i = 0; i < cursors.length; i++) {
- if (cursors [i] != null) cursors [i].dispose ();
+ for (Cursor cursor : cursors) {
+ if (cursor != null) cursor.dispose ();
}
cursors = null;
/* Release Acquired Resources */
if (resources != null) {
- for (int i=0; i<resources.length; i++) {
- if (resources [i] != null) resources [i].dispose ();
+ for (Resource resource : resources) {
+ if (resource != null) resource.dispose ();
}
resources = null;
}
@@ -3886,11 +3980,11 @@ void removeBar (Menu menu) {
}
}
-Control removeControl (long /*int*/ handle) {
+Control removeControl (long handle) {
if (handle == 0) return null;
lastControl = lastGetControl = null;
Control control = null;
- int index = (int)/*64*/OS.RemoveProp (handle, SWT_OBJECT_INDEX) - 1;
+ int index = (int)OS.RemoveProp (handle, SWT_OBJECT_INDEX) - 1;
if (0 <= index && index < controlTable.length) {
control = controlTable [index];
controlTable [index] = null;
@@ -3995,15 +4089,11 @@ void runSettings () {
sendEvent (SWT.Settings, null);
Font newFont = getSystemFont ();
boolean sameFont = oldFont.equals (newFont);
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) {
- Shell shell = shells [i];
+ for (Shell shell : getShells ()) {
if (!shell.isDisposed ()) {
if (!sameFont) {
shell.updateFont (oldFont, newFont);
}
- /* This code is intentionally commented */
- //shell.redraw (true);
shell.layout (true, true);
}
}
@@ -4032,7 +4122,7 @@ boolean runSkin () {
return false;
}
-boolean runTimer (long /*int*/ id) {
+boolean runTimer (long id) {
if (timerList != null && timerIds != null) {
int index = 0;
while (index <timerIds.length) {
@@ -4225,6 +4315,15 @@ public void setCursorLocation (Point point) {
setCursorLocation (point.x, point.y);
}
+boolean _toBoolean (Object value) {
+ return value != null && ((Boolean)value).booleanValue ();
+}
+
+int _toColorPixel (Object value) {
+ if (value == null) return -1;
+ return ((Color)value).handle;
+}
+
/**
* Sets the application defined property of the receiver
* with the specified name to the given argument.
@@ -4254,26 +4353,102 @@ public void setData (String key, Object value) {
checkDevice ();
if (key == null) error (SWT.ERROR_NULL_ARGUMENT);
- if (key.equals (RUN_MESSAGES_IN_IDLE_KEY)) {
- Boolean data = (Boolean) value;
- runMessagesInIdle = data != null && data.booleanValue ();
- return;
- }
- if (key.equals (RUN_MESSAGES_IN_MESSAGE_PROC_KEY)) {
- Boolean data = (Boolean) value;
- runMessagesInMessageProc = data != null && data.booleanValue ();
- return;
- }
- if (key.equals (USE_OWNDC_KEY)) {
- Boolean data = (Boolean) value;
- useOwnDC = data != null && data.booleanValue ();
- return;
- }
- if (key.equals (ACCEL_KEY_HIT)) {
- Boolean data = (Boolean) value;
- accelKeyHit = data != null && data.booleanValue ();
- return;
+ switch (key) {
+ case RUN_MESSAGES_IN_IDLE_KEY:
+ runMessagesInIdle = _toBoolean (value);
+ return;
+ case RUN_MESSAGES_IN_MESSAGE_PROC_KEY:
+ runMessagesInMessageProc = _toBoolean (value);
+ return;
+ case USE_OWNDC_KEY:
+ useOwnDC = _toBoolean (value);
+ return;
+ case ACCEL_KEY_HIT:
+ accelKeyHit = _toBoolean (value);
+ return;
+ case EXTERNAL_EVENT_LOOP_KEY:
+ externalEventLoop = _toBoolean (value);
+ return;
+ case USE_DARKMODE_EXPLORER_THEME_KEY:
+ useDarkModeExplorerTheme = _toBoolean (value) &&
+ !disableCustomThemeTweaks &&
+ OS.IsDarkModeAvailable ();
+
+ /* Modify the per-application flag. Note that as of Windows 2004,
+ * APIs are still undocumented, and two more steps are needed to
+ * make window dark, see Control.enableDarkSystemTheme()
+ *
+ * Undocumented argument is:
+ * enum class PreferredAppMode
+ * {
+ * Default = 0,
+ * AllowDark = 1,
+ * ForceDark = 2,
+ * ForceLight = 3,
+ * Max = 4,
+ * };
+ */
+ final int PreferredAppMode_Default = 0;
+ final int PreferredAppMode_ForceDark = 2;
+ if (useDarkModeExplorerTheme) {
+ OS.SetPreferredAppMode(PreferredAppMode_ForceDark);
+ } else {
+ OS.SetPreferredAppMode(PreferredAppMode_Default);
+ }
+ return;
+ case USE_SHELL_TITLE_COLORING:
+ useShellTitleColoring = !disableCustomThemeTweaks && _toBoolean(value);
+ return;
+ case MENUBAR_FOREGROUND_COLOR_KEY:
+ menuBarForegroundPixel = disableCustomThemeTweaks ? -1 : _toColorPixel(value);
+ return;
+ case MENUBAR_BACKGROUND_COLOR_KEY:
+ menuBarBackgroundPixel = disableCustomThemeTweaks ? -1 : _toColorPixel(value);
+ return;
+ case MENUBAR_BORDER_COLOR_KEY:
+ if (menuBarBorderPen != 0)
+ OS.DeleteObject(menuBarBorderPen);
+
+ int pixel = _toColorPixel(value);
+ if (disableCustomThemeTweaks || (pixel == -1))
+ menuBarBorderPen = 0;
+ else
+ menuBarBorderPen = OS.CreatePen (OS.PS_SOLID, 1, pixel);
+ return;
+ case USE_WS_BORDER_ALL_KEY:
+ useWsBorderAll = !disableCustomThemeTweaks && _toBoolean(value);
+ return;
+ case USE_WS_BORDER_CANVAS_KEY:
+ useWsBorderCanvas = !disableCustomThemeTweaks && _toBoolean(value);
+ return;
+ case USE_WS_BORDER_LABEL_KEY:
+ useWsBorderLabel = !disableCustomThemeTweaks && _toBoolean(value);
+ return;
+ case USE_WS_BORDER_LIST_KEY:
+ useWsBorderList = !disableCustomThemeTweaks && _toBoolean(value);
+ return;
+ case USE_WS_BORDER_TABLE_KEY:
+ useWsBorderTable = !disableCustomThemeTweaks && _toBoolean(value);
+ return;
+ case USE_WS_BORDER_TEXT_KEY:
+ useWsBorderText = !disableCustomThemeTweaks && _toBoolean(value);
+ return;
+ case TABLE_HEADER_LINE_COLOR_KEY:
+ tableHeaderLinePixel = disableCustomThemeTweaks ? -1 : _toColorPixel(value);
+ return;
+ case LABEL_DISABLED_FOREGROUND_COLOR_KEY:
+ disabledLabelForegroundPixel = disableCustomThemeTweaks ? -1 : _toColorPixel(value);
+ break;
+ case COMBO_USE_DARK_THEME:
+ comboUseDarkTheme = _toBoolean(value) &&
+ !disableCustomThemeTweaks &&
+ OS.IsDarkModeAvailable();
+ break;
+ case PROGRESSBAR_USE_COLORS:
+ progressbarUseColors = !disableCustomThemeTweaks && _toBoolean(value);
+ break;
}
+
/* Remove the key/value pair */
if (value == null) {
if (keys == null) return;
@@ -4404,10 +4579,11 @@ public static void setAppVersion (String version) {
APP_VERSION = version;
}
-void setModalDialog (Dialog modalDailog) {
+void setModalDialog(Dialog modalDailog) {
this.modalDialog = modalDailog;
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) shells [i].updateModal ();
+ for (Shell shell : getShells()) {
+ shell.updateModal();
+ }
}
void setModalShell (Shell shell) {
@@ -4424,8 +4600,9 @@ void setModalShell (Shell shell) {
modalShells = newModalShells;
}
modalShells [index] = shell;
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) shells [i].updateModal ();
+ for (Shell activeShell : getShells ()) {
+ activeShell.updateModal ();
+ }
}
/**
@@ -4581,6 +4758,54 @@ public void syncExec (Runnable runnable) {
}
/**
+ * Calls the callable on the user-interface thread at the next reasonable
+ * opportunity, and returns the its result from this method. The thread which
+ * calls this method is suspended until the callable completes.
+ * <p>
+ * Note that at the time the callable is invoked, widgets that have the receiver
+ * as their display may have been disposed. Therefore, it is necessary to check
+ * for this case inside the callable before accessing the widget.
+ * </p>
+ * <p>
+ * Any exception that is thrown from the callable is re-thrown in the calling
+ * thread. Note: The exception retains its original stack trace from the
+ * throwing thread. The call to {@code syncCall} will not be present in the
+ * stack trace.
+ * </p>
+ *
+ * @param callable the code to call on the user-interface thread
+ *
+ * @exception SWTException <code>ERROR_DEVICE_DISPOSED</code> - if the receiver
+ * has been disposed
+ * @exception E An exception that is thrown by the callable on the
+ * user-interface thread, and re-thrown on the calling
+ * thread
+ *
+ * @see #syncExec(Runnable)
+ * @see SwtCallable#call()
+ * @since 3.118
+ */
+public <T, E extends Exception> T syncCall(SwtCallable<T, E> callable) throws E {
+ Objects.nonNull(callable);
+ @SuppressWarnings("unchecked")
+ T[] t = (T[]) new Object[1];
+ Object[] ex = new Object[1];
+ syncExec(() -> {
+ try {
+ t[0] = callable.call();
+ } catch (Exception e) {
+ ex[0] = e;
+ }
+ });
+ if (ex[0] != null) {
+ @SuppressWarnings("unchecked")
+ E e = (E) ex[0];
+ throw e;
+ }
+ return t[0];
+}
+
+/**
* Causes the <code>run()</code> method of the runnable to
* be invoked by the user-interface thread after the specified
* number of milliseconds have elapsed. If milliseconds is less
@@ -4609,13 +4834,13 @@ public void timerExec (int milliseconds, Runnable runnable) {
checkDevice ();
if (runnable == null) error (SWT.ERROR_NULL_ARGUMENT);
if (timerList == null) timerList = new Runnable [4];
- if (timerIds == null) timerIds = new long /*int*/ [4];
+ if (timerIds == null) timerIds = new long [4];
int index = 0;
while (index < timerList.length) {
if (timerList [index] == runnable) break;
index++;
}
- long /*int*/ timerId = 0;
+ long timerId = 0;
if (index != timerList.length) {
timerId = timerIds [index];
if (milliseconds < 0) {
@@ -4636,12 +4861,12 @@ public void timerExec (int milliseconds, Runnable runnable) {
Runnable [] newTimerList = new Runnable [timerList.length + 4];
System.arraycopy (timerList, 0, newTimerList, 0, timerList.length);
timerList = newTimerList;
- long /*int*/ [] newTimerIds = new long /*int*/ [timerIds.length + 4];
+ long [] newTimerIds = new long [timerIds.length + 4];
System.arraycopy (timerIds, 0, newTimerIds, 0, timerIds.length);
timerIds = newTimerIds;
}
}
- long /*int*/ newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
+ long newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0);
if (newTimerID != 0) {
timerList [index] = runnable;
timerIds [index] = newTimerID;
@@ -4656,8 +4881,8 @@ boolean translateAccelerator (MSG msg, Control control) {
}
static int translateKey (int key) {
- for (int i=0; i<KeyTable.length; i++) {
- if (KeyTable [i] [0] == key) return KeyTable [i] [1];
+ for (int[] element : KeyTable) {
+ if (element [0] == key) return element [1];
}
return 0;
}
@@ -4674,7 +4899,7 @@ boolean translateMnemonic (MSG msg, Control control) {
boolean translateTraversal (MSG msg, Control control) {
switch (msg.message) {
case OS.WM_KEYDOWN:
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_RETURN:
case OS.VK_ESCAPE:
case OS.VK_TAB:
@@ -4688,7 +4913,7 @@ boolean translateTraversal (MSG msg, Control control) {
}
break;
case OS.WM_SYSKEYDOWN:
- switch ((int)/*64*/msg.wParam) {
+ switch ((int)msg.wParam) {
case OS.VK_MENU:
return control.translateTraversal (msg);
}
@@ -4698,8 +4923,8 @@ boolean translateTraversal (MSG msg, Control control) {
}
static int untranslateKey (int key) {
- for (int i=0; i<KeyTable.length; i++) {
- if (KeyTable [i] [1] == key) return KeyTable [i] [0];
+ for (int[] element : KeyTable) {
+ if (element [1] == key) return element [0];
}
return 0;
}
@@ -4735,9 +4960,7 @@ public void update() {
int flags = OS.PM_REMOVE | OS.PM_NOYIELD;
OS.PeekMessage (msg, hwndMessage, SWT_NULL, SWT_NULL, flags);
}
- Shell[] shells = getShells ();
- for (int i=0; i<shells.length; i++) {
- Shell shell = shells [i];
+ for (Shell shell : getShells ()) {
if (!shell.isDisposed ()) shell.update (true);
}
}
@@ -4765,27 +4988,27 @@ void wakeThread () {
OS.PostThreadMessage (threadId, OS.WM_NULL, 0, 0);
}
-long /*int*/ windowProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, long msg, long wParam, long lParam) {
if (lastControl != null && lastHwnd == hwnd) {
- return lastControl.windowProc (hwnd, (int)/*64*/msg, wParam, lParam);
+ return lastControl.windowProc (hwnd, (int)msg, wParam, lParam);
}
- int index = (int)/*64*/OS.GetProp (hwnd, SWT_OBJECT_INDEX) - 1;
+ int index = (int)OS.GetProp (hwnd, SWT_OBJECT_INDEX) - 1;
if (0 <= index && index < controlTable.length) {
Control control = controlTable [index];
if (control != null) {
lastHwnd = hwnd;
lastControl = control;
- return control.windowProc (hwnd, (int)/*64*/msg, wParam, lParam);
+ return control.windowProc (hwnd, (int)msg, wParam, lParam);
}
}
- return OS.DefWindowProc (hwnd, (int)/*64*/msg, wParam, lParam);
+ return OS.DefWindowProc (hwnd, (int)msg, wParam, lParam);
}
-int textWidth (String text, long /*int*/ handle) {
- long /*int*/ oldFont = 0;
+int textWidth (String text, long handle) {
+ long oldFont = 0;
RECT rect = new RECT ();
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (handle);
+ long newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
char [] buffer = text.toCharArray ();
@@ -4795,12 +5018,12 @@ int textWidth (String text, long /*int*/ handle) {
return (rect.right - rect.left);
}
-String wrapText (String text, long /*int*/ handle, int width) {
+String wrapText (String text, long handle, int width) {
String Lf = "\r\n"; //$NON-NLS-1$
text = withCrLf (text);
int length = text.length ();
if (width <= 0 || length == 0 || length == 1) return text;
- StringBuffer result = new StringBuffer ();
+ StringBuilder result = new StringBuilder ();
int lineStart = 0, lineEnd = 0;
while (lineStart < length) {
lineEnd = text.indexOf (Lf, lineStart);
@@ -4883,7 +5106,7 @@ static String withCrLf (String string) {
/* Create a new string with the CR/LF line terminator. */
i = 0;
- StringBuffer result = new StringBuffer (count);
+ StringBuilder result = new StringBuilder (count);
while (i < length) {
int j = string.indexOf ('\n', i);
if (j == -1) j = length;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index 053a20d1ab..d32e364b81 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
@@ -53,7 +53,7 @@ public class ExpandBar extends Composite {
ExpandItem focusItem;
int spacing = 4;
int yCurrentScroll;
- long /*int*/ hFont;
+ long hFont;
/**
@@ -116,7 +116,7 @@ public void addExpandListener (ExpandListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -135,12 +135,12 @@ static int checkStyle (int style) {
int height = 0, width = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
if (itemCount > 0) {
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ hTheme = 0;
+ long hDC = OS.GetDC (handle);
+ long hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
- long /*int*/ hCurrentFont = 0, oldFont = 0;
+ long hCurrentFont = 0, oldFont = 0;
if (hTheme == 0) {
if (hFont != 0) {
hCurrentFont = hFont;
@@ -244,7 +244,7 @@ void destroyItem (ExpandItem item) {
}
@Override
-void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
+void drawThemeBackground (long hDC, long hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -252,7 +252,7 @@ void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
}
void drawWidget (GC gc, RECT clipRect) {
- long /*int*/ hTheme = 0;
+ long hTheme = 0;
if (isAppThemed ()) {
hTheme = display.hExplorerBarTheme ();
}
@@ -265,10 +265,10 @@ void drawWidget (GC gc, RECT clipRect) {
}
boolean drawFocus = false;
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
drawFocus = (uiState & OS.UISF_HIDEFOCUS) == 0;
}
- long /*int*/ hCurrentFont = 0, oldFont = 0;
+ long hCurrentFont = 0, oldFont = 0;
if (hTheme == 0) {
if (hFont != 0) {
hCurrentFont = hFont;
@@ -312,8 +312,8 @@ Control findThemeControl () {
}
int getBandHeight () {
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ oldHFont = OS.SelectObject (hDC, hFont == 0 ? defaultFont () : hFont);
+ long hDC = OS.GetDC (handle);
+ long oldHFont = OS.SelectObject (hDC, hFont == 0 ? defaultFont () : hFont);
TEXTMETRIC lptm = new TEXTMETRIC ();
OS.GetTextMetrics (hDC, lptm);
OS.SelectObject (hDC, oldHFont);
@@ -454,8 +454,7 @@ void layoutItems (int index, boolean setScrollbar) {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- ExpandItem item = items [i];
+ for (ExpandItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -494,8 +493,7 @@ public void removeExpandListener (ExpandListener listener) {
@Override
void reskinChildren (int flags) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- ExpandItem item = items [i];
+ for (ExpandItem item : items) {
if (item != null ) item.reskin (flags);
}
}
@@ -585,9 +583,9 @@ void setSpacingInPixels (int spacing) {
@Override
boolean updateTextDirection(int textDirection) {
if (super.updateTextDirection(textDirection)) {
- for (int i = 0, n = items.length; i < n; i++) {
- if (items[i] != null) {
- items[i].updateTextDirection(textDirection == AUTO_TEXT_DIRECTION ? AUTO_TEXT_DIRECTION : style & SWT.FLIP_TEXT_DIRECTION);
+ for (ExpandItem item : items) {
+ if (item != null) {
+ item.updateTextDirection(textDirection == AUTO_TEXT_DIRECTION ? AUTO_TEXT_DIRECTION : style & SWT.FLIP_TEXT_DIRECTION);
}
}
return true;
@@ -647,16 +645,16 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return display.windowProc;
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
if (focusItem == null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_SPACE:
case OS.VK_RETURN:
Event event = new Event ();
@@ -692,14 +690,14 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -719,7 +717,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONUP (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
if (focusItem == null) return result;
@@ -737,7 +735,7 @@ LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSELEAVE (long wParam, long lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
for (int i = 0; i < itemCount; i++) {
@@ -752,7 +750,7 @@ LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEMOVE (long wParam, long lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result == LRESULT.ZERO) return result;
int x = OS.GET_X_LPARAM (lParam);
@@ -769,12 +767,12 @@ LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
- return wmScrollWheel (true, wParam, lParam);
+LRESULT WM_MOUSEWHEEL (long wParam, long lParam) {
+ return wmScrollWheel (true, wParam, lParam, false);
}
@Override
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PAINT (long wParam, long lParam) {
if ((state & DISPOSE_SENT) != 0) return LRESULT.ZERO;
PAINTSTRUCT ps = new PAINTSTRUCT ();
@@ -803,7 +801,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PRINTCLIENT (long wParam, long lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -817,15 +815,15 @@ LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETCURSOR (long wParam, long lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
- if (hitTest == OS.HTCLIENT) {
+ if (hitTest == OS.HTCLIENT) {
for (int i = 0; i < itemCount; i++) {
ExpandItem item = items [i];
if (item.hover) {
- long /*int*/ hCursor = OS.LoadCursor (0, OS.IDC_HAND);
+ long hCursor = OS.LoadCursor (0, OS.IDC_HAND);
OS.SetCursor (hCursor);
return LRESULT.ONE;
}
@@ -835,14 +833,14 @@ LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (focusItem != null) focusItem.redraw (true);
return result;
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
@@ -857,7 +855,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmScroll (ScrollBar bar, boolean update, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, long hwnd, int msg, long wParam, long lParam) {
LRESULT result = super.wmScroll (bar, true, hwnd, msg, wParam, lParam);
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
index 086c471e92..a092e41093 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
@@ -119,16 +119,16 @@ static ExpandBar checkNull (ExpandBar control) {
return control;
}
-private void drawChevron (long /*int*/ hDC, RECT rect) {
- long /*int*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+private void drawChevron (long hDC, RECT rect) {
+ long oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
rect.left += 4;
rect.top += 4;
rect.right -= 4;
rect.bottom -= 4;
- long /*int*/ hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.getForegroundPixel ());
- long /*int*/ oldPen = OS.SelectObject (hDC, hPen);
+ long hPen = OS.CreatePen (OS.PS_SOLID, 1, parent.getForegroundPixel ());
+ long oldPen = OS.SelectObject (hDC, hPen);
int [] polyline1, polyline2;
if (expanded) {
int px = rect.left + 5;
@@ -154,8 +154,8 @@ private void drawChevron (long /*int*/ hDC, RECT rect) {
OS.Polyline (hDC, polyline1, polyline1.length / 2);
OS.Polyline (hDC, polyline2, polyline2.length / 2);
if (hover) {
- long /*int*/ whitePen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DHILIGHT));
- long /*int*/ darkGrayPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DSHADOW));
+ long whitePen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DHILIGHT));
+ long darkGrayPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DSHADOW));
OS.SelectObject (hDC, whitePen);
int [] points1 = {
rect.left, rect.bottom,
@@ -177,15 +177,15 @@ private void drawChevron (long /*int*/ hDC, RECT rect) {
OS.DeleteObject (hPen);
}
-void drawItem (GC gc, long /*int*/ hTheme, RECT clipRect, boolean drawFocus) {
- long /*int*/ hDC = gc.handle;
+void drawItem (GC gc, long hTheme, RECT clipRect, boolean drawFocus) {
+ long hDC = gc.handle;
int headerHeight = parent.getBandHeight ();
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + headerHeight);
if (hTheme != 0) {
OS.DrawThemeBackground (hTheme, hDC, OS.EBP_NORMALGROUPHEAD, 0, rect, clipRect);
} else {
- long /*int*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
+ long oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
}
@@ -237,8 +237,8 @@ void drawItem (GC gc, long /*int*/ hTheme, RECT clipRect, boolean drawFocus) {
}
if (expanded) {
if (!parent.isAppThemed ()) {
- long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
- long /*int*/ oldPen = OS.SelectObject (hDC, pen);
+ long pen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_BTNFACE));
+ long oldPen = OS.SelectObject (hDC, pen);
int [] points = {
x, y + headerHeight,
x, y + headerHeight + height,
@@ -342,7 +342,7 @@ public ExpandBar getParent () {
return parent;
}
-int getPreferredWidth (long /*int*/ hTheme, long /*int*/ hDC) {
+int getPreferredWidth (long hTheme, long hDC) {
int width = ExpandItem.TEXT_INSET * 2 + ExpandItem.CHEVRON_SIZE;
if (image != null) {
width += ExpandItem.TEXT_INSET + imageWidth;
@@ -366,7 +366,7 @@ boolean isHover (int x, int y) {
}
void redraw (boolean all) {
- long /*int*/ parentHandle = parent.handle;
+ long parentHandle = parent.handle;
int headerHeight = parent.getBandHeight ();
RECT rect = new RECT ();
int left = all ? x : x + width - headerHeight;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
index 9c7e8fd3d8..18b44e4cf8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,9 +13,10 @@
*******************************************************************************/
package org.eclipse.swt.widgets;
+import java.nio.file.*;
import org.eclipse.swt.*;
-import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.ole.win32.*;
import org.eclipse.swt.internal.win32.*;
/**
@@ -45,20 +46,8 @@ public class FileDialog extends Dialog {
String filterPath = "", fileName = "";
int filterIndex = 0;
boolean overwrite = false;
- static final String FILTER = "*.*";
- static int BUFFER_SIZE = 1024 * 32;
- static boolean USE_HOOK = true;
- static {
- /*
- * Feature in Vista. When OFN_ENABLEHOOK is set in the
- * save or open file dialog, Vista uses the old XP look
- * and feel. OFN_ENABLEHOOK is used to grow the file
- * name buffer in a multi-select file dialog. The fix
- * is to only use OFN_ENABLEHOOK when the buffer has
- * overrun.
- */
- USE_HOOK = false;
- }
+ static final String DEFAULT_FILTER = "*.*";
+ static final String LONG_PATH_PREFIX = "\\\\?\\";
/**
* Constructs a new instance of this class given only its parent.
@@ -197,32 +186,21 @@ public boolean getOverwrite () {
return overwrite;
}
-long /*int*/ OFNHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ wParam, long /*int*/ lParam) {
- switch ((int)/*64*/uiMsg) {
- case OS.WM_NOTIFY:
- OFNOTIFY ofn = new OFNOTIFY ();
- OS.MoveMemory (ofn, lParam, OFNOTIFY.sizeof);
- if (ofn.code == OS.CDN_SELCHANGE) {
- int lResult = (int)/*64*/OS.SendMessage (ofn.hwndFrom, OS.CDM_GETSPEC, 0, 0);
- if (lResult > 0) {
- lResult += OS.MAX_PATH;
- OPENFILENAME lpofn = new OPENFILENAME ();
- OS.MoveMemory (lpofn, ofn.lpOFN, OPENFILENAME.sizeof);
- if (lpofn.nMaxFile < lResult) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, lResult * TCHAR.sizeof);
- if (lpstrFile != 0) {
- if (lpofn.lpstrFile != 0) OS.HeapFree (hHeap, 0, lpofn.lpstrFile);
- lpofn.lpstrFile = lpstrFile;
- lpofn.nMaxFile = lResult;
- OS.MoveMemory (ofn.lpOFN, lpofn, OPENFILENAME.sizeof);
- }
- }
- }
- }
- break;
+static Path getItemPath (IShellItem psi) {
+ long [] ppsz = new long [1];
+ if (psi.GetDisplayName(OS.SIGDN_FILESYSPATH, ppsz) == COM.S_OK) {
+ int length = OS.wcslen(ppsz[0]);
+ char[] buffer = new char[length];
+ OS.MoveMemory(buffer, ppsz[0], length * Character.BYTES);
+ OS.CoTaskMemFree(ppsz[0]);
+ String path = String.valueOf(buffer);
+ /* Feature in Windows. Paths longer than MAX_PATH are returned with a \\?\ prefix */
+ if (path.startsWith(LONG_PATH_PREFIX)) {
+ path = path.substring(LONG_PATH_PREFIX.length());
+ }
+ return Paths.get(path);
}
- return 0;
+ return null;
}
/**
@@ -238,242 +216,169 @@ long /*int*/ OFNHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ wP
* </ul>
*/
public String open () {
- long /*int*/ hHeap = OS.GetProcessHeap ();
-
- /* Get the owner HWND for the dialog */
- long /*int*/ hwndOwner = parent.handle;
- long /*int*/ hwndParent = parent.handle;
-
- /*
- * Feature in Windows. There is no API to set the orientation of a
- * file dialog. It is always inherited from the parent. The fix is
- * to create a hidden parent and set the orientation in the hidden
- * parent for the dialog to inherit.
- */
- boolean enabled = false;
- int dialogOrientation = style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
- int parentOrientation = parent.style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
- if (dialogOrientation != parentOrientation) {
- int exStyle = OS.WS_EX_NOINHERITLAYOUT;
- if (dialogOrientation == SWT.RIGHT_TO_LEFT) exStyle |= OS.WS_EX_LAYOUTRTL;
- hwndOwner = OS.CreateWindowEx (
- exStyle,
- Shell.DialogClass,
- null,
- 0,
- OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0,
- hwndParent,
- 0,
- OS.GetModuleHandle (null),
- null);
- enabled = OS.IsWindowEnabled (hwndParent);
- if (enabled) OS.EnableWindow (hwndParent, false);
+ /* Create Common Item Dialog */
+ long[] ppv = new long[1];
+ int hr;
+ if ((style & SWT.SAVE) != 0) {
+ hr = COM.CoCreateInstance(COM.CLSID_FileSaveDialog, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_IFileSaveDialog, ppv);
+ } else {
+ hr = COM.CoCreateInstance(COM.CLSID_FileOpenDialog, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_IFileOpenDialog, ppv);
}
+ if (hr != COM.S_OK) SWT.error(SWT.ERROR_NO_HANDLES);
+ IFileDialog fileDialog = new IFileDialog(ppv[0]);
+
+ /* Update dialog options */
+ int[] options = new int[1];
+ fileDialog.GetOptions(options);
+ options[0] |= OS.FOS_FORCEFILESYSTEM | OS.FOS_NOCHANGEDIR;
+ if ((style & SWT.SAVE) != 0) {
+ if (!overwrite) options[0] &= ~OS.FOS_OVERWRITEPROMPT;
+ } else {
+ if ((style & SWT.MULTI) != 0) options[0] |= OS.FOS_ALLOWMULTISELECT;
+ }
+ fileDialog.SetOptions(options[0]);
- /* Convert the title and copy it into lpstrTitle */
- if (title == null) title = "";
- /* Use the character encoding for the default locale */
- TCHAR buffer3 = new TCHAR (0, title, true);
- int byteCount3 = buffer3.length () * TCHAR.sizeof;
- long /*int*/ lpstrTitle = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount3);
- OS.MoveMemory (lpstrTitle, buffer3, byteCount3);
-
- /* Compute filters and copy into lpstrFilter */
- String strFilter = "";
- if (filterNames == null) filterNames = new String [0];
- if (filterExtensions == null) filterExtensions = new String [0];
- for (int i=0; i<filterExtensions.length; i++) {
- String filterName = filterExtensions [i];
- if (i < filterNames.length) filterName = filterNames [i];
- strFilter = strFilter + filterName + '\0' + filterExtensions [i] + '\0';
+ /* Set dialog title */
+ if (!title.isEmpty()) {
+ fileDialog.SetTitle((title + "\0").toCharArray());
}
- if (filterExtensions.length == 0) {
- strFilter = strFilter + FILTER + '\0' + FILTER + '\0';
+
+ /* Apply extension filters */
+ String[] filterExtensions = this.filterExtensions;
+ String[] filterNames = this.filterNames;
+ if (filterExtensions == null || filterExtensions.length == 0) {
+ filterExtensions = filterNames = new String[] { DEFAULT_FILTER };
}
- /* Use the character encoding for the default locale */
- TCHAR buffer4 = new TCHAR (0, strFilter, true);
- int byteCount4 = buffer4.length () * TCHAR.sizeof;
- long /*int*/ lpstrFilter = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount4);
- OS.MoveMemory (lpstrFilter, buffer4, byteCount4);
-
- /* Convert the fileName and filterName to C strings */
- if (fileName == null) fileName = "";
- /* Use the character encoding for the default locale */
- TCHAR name = new TCHAR (0, fileName, true);
-
- /*
- * Copy the name into lpstrFile and ensure that the
- * last byte is NULL and the buffer does not overrun.
- */
- int nMaxFile = OS.MAX_PATH;
- if ((style & SWT.MULTI) != 0) nMaxFile = Math.max (nMaxFile, BUFFER_SIZE);
- int byteCount = nMaxFile * TCHAR.sizeof;
- long /*int*/ lpstrFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- int byteCountFile = Math.min (name.length () * TCHAR.sizeof, byteCount - TCHAR.sizeof);
- OS.MoveMemory (lpstrFile, name, byteCountFile);
-
- /*
- * Copy the path into lpstrInitialDir and ensure that
- * the last byte is NULL and the buffer does not overrun.
- */
- if (filterPath == null) filterPath = "";
- /* Use the character encoding for the default locale */
- TCHAR path = new TCHAR (0, filterPath.replace ('/', '\\'), true);
- int byteCount5 = OS.MAX_PATH * TCHAR.sizeof;
- long /*int*/ lpstrInitialDir = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount5);
- int byteCountDir = Math.min (path.length () * TCHAR.sizeof, byteCount5 - TCHAR.sizeof);
- OS.MoveMemory (lpstrInitialDir, path, byteCountDir);
-
- /* Create the file dialog struct */
- OPENFILENAME struct = new OPENFILENAME ();
- struct.lStructSize = OPENFILENAME.sizeof;
- struct.Flags = OS.OFN_HIDEREADONLY | OS.OFN_NOCHANGEDIR;
- boolean save = (style & SWT.SAVE) != 0;
- if (save && overwrite) struct.Flags |= OS.OFN_OVERWRITEPROMPT;
- Callback callback = null;
- if ((style & SWT.MULTI) != 0) {
- struct.Flags |= OS.OFN_ALLOWMULTISELECT | OS.OFN_EXPLORER | OS.OFN_ENABLESIZING;
- if (USE_HOOK) {
- callback = new Callback (this, "OFNHookProc", 4); //$NON-NLS-1$
- long /*int*/ lpfnHook = callback.getAddress ();
- if (lpfnHook == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
- struct.lpfnHook = lpfnHook;
- struct.Flags |= OS.OFN_ENABLEHOOK;
+ long hHeap = OS.GetProcessHeap();
+ long[] filterSpec = new long[filterExtensions.length * 2];
+ for (int i = 0; i < filterExtensions.length; i++) {
+ String extension = filterExtensions[i];
+ String name = (filterNames != null && i < filterNames.length) ? filterNames[i] : extension;
+ /*
+ * Feature in Windows. If a filter name doesn't contain "*.", FileDialog appends
+ * the filter pattern to the name. This might cause filters like (*) to appear
+ * twice. The fix is to strip the pattern and let FileDialog re-append it.
+ *
+ * Note: Registry entry for "Hide extensions for known file types" needs to be
+ * checked before we apply above work-around.
+ */
+ if (!name.contains("*.")) {
+ /* By default value is on, in case of missing registry entry assumed to be on */
+ int[] result = OS.readRegistryDwords(OS.HKEY_CURRENT_USER,
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "HideFileExt");
+ if (result != null && result[0] == 0) {
+ name = name.replace(" (" + extension + ")", "");
+ }
+ }
+ long lpstrName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, (name.length() + 1) * Character.BYTES);
+ long lpstrExt = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, (extension.length() + 1) * Character.BYTES);
+ OS.MoveMemory(lpstrName, name.toCharArray(), name.length() * Character.BYTES);
+ OS.MoveMemory(lpstrExt, extension.toCharArray(), extension.length() * Character.BYTES);
+ filterSpec[i*2] = lpstrName;
+ filterSpec[i*2 + 1] = lpstrExt;
+ }
+ fileDialog.SetFileTypes(filterExtensions.length, filterSpec);
+ for (int i = 0; i < filterSpec.length; i++) {
+ OS.HeapFree(hHeap, 0, filterSpec[i]);
+ }
+
+ /* Enable automatic appending of extensions to saved file names */
+ fileDialog.SetDefaultExtension(new char[1]);
+
+ /* Set initial filter */
+ fileDialog.SetFileTypeIndex(filterIndex + 1);
+
+ /* Set initial folder */
+ if (filterPath != null) {
+ char[] path = (filterPath.replace('/', '\\') + "\0").toCharArray();
+ if (COM.SHCreateItemFromParsingName(path, 0, COM.IID_IShellItem, ppv) == COM.S_OK) {
+ IShellItem psi = new IShellItem(ppv[0]);
+ // Bug 577190: Hard override the filter path using SetFolder.
+ fileDialog.SetFolder(psi);
+ psi.Release();
}
}
- struct.hwndOwner = hwndOwner;
- struct.lpstrTitle = lpstrTitle;
- struct.lpstrFile = lpstrFile;
- struct.nMaxFile = nMaxFile;
- struct.lpstrInitialDir = lpstrInitialDir;
- struct.lpstrFilter = lpstrFilter;
- struct.nFilterIndex = filterIndex == 0 ? filterIndex : filterIndex + 1;
-
- /*
- * Set the default extension to an empty string. If the
- * user fails to type an extension and this extension is
- * empty, Windows uses the current value of the filter
- * extension at the time that the dialog is closed.
- */
- long /*int*/ lpstrDefExt = 0;
- if (save) {
- lpstrDefExt = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
- struct.lpstrDefExt = lpstrDefExt;
+
+ /* Set initial filename */
+ if (fileName != null) {
+ char[] name = (fileName.replace('/', '\\') + "\0").toCharArray();
+ fileDialog.SetFileName(name);
}
/* Make the parent shell be temporary modal */
Dialog oldModal = null;
- Display display = parent.getDisplay ();
+ Display display = parent.getDisplay();
if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
+ oldModal = display.getModalDialog();
+ display.setModalDialog(this);
}
- /*
- * Feature in Windows. For some reason, the WH_MSGFILTER filter
- * does not run for GetSaveFileName() or GetOpenFileName(). The
- * fix is to allow async messages to run in the WH_FOREGROUNDIDLE
- * hook instead.
- */
- boolean oldRunMessagesInIdle = display.runMessagesInIdle;
- display.runMessagesInIdle = true;
- display.sendPreExternalEventDispatchEvent ();
- /*
- * Open the dialog. If the open fails due to an invalid
- * file name, use an empty file name and open it again.
- */
- boolean success = (save) ? OS.GetSaveFileName (struct) : OS.GetOpenFileName (struct);
- display.sendPostExternalEventDispatchEvent ();
- switch (OS.CommDlgExtendedError ()) {
- case OS.FNERR_INVALIDFILENAME:
- OS.MoveMemory (lpstrFile, new char [1], TCHAR.sizeof);
- display.sendPreExternalEventDispatchEvent ();
- success = (save) ? OS.GetSaveFileName (struct) : OS.GetOpenFileName (struct);
- display.sendPostExternalEventDispatchEvent ();
- break;
- case OS.FNERR_BUFFERTOOSMALL:
- USE_HOOK = true;
- break;
- }
- display.runMessagesInIdle = oldRunMessagesInIdle;
+ /* Open the dialog */
+ display.externalEventLoop = true;
+ display.sendPreExternalEventDispatchEvent();
+ hr = fileDialog.Show(parent.handle);
+ display.externalEventLoop = false;
+ display.sendPostExternalEventDispatchEvent();
/* Clear the temporary dialog modal parent */
if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
- display.setModalDialog (oldModal);
+ display.setModalDialog(oldModal);
}
- /* Dispose the callback and reassign the buffer */
- if (callback != null) callback.dispose ();
- lpstrFile = struct.lpstrFile;
-
- /* Set the new path, file name and filter */
- fileNames = new String [0];
+ /* Extract result paths */
String fullPath = null;
- if (success) {
- char [] buffer = new char [struct.nMaxFile];
- OS.MoveMemory (buffer, lpstrFile, buffer.length * TCHAR.sizeof);
- int nFileOffset = struct.nFileOffset;
- if (nFileOffset > 0) {
- filterPath = new String (buffer, 0, nFileOffset - 1);
-
- /*
- * Get each file from the buffer. Files are delimited
- * by a NULL character with 2 NULL characters at the end.
- */
- int count = 0;
- fileNames = new String [(style & SWT.MULTI) != 0 ? 4 : 1];
- int start = nFileOffset;
- do {
- int end = start;
- while (end < buffer.length && buffer [end] != 0) end++;
- String string = new String (buffer, start, end - start);
- start = end + 1;
- if (count == fileNames.length) {
- String [] newFileNames = new String [fileNames.length + 4];
- System.arraycopy (fileNames, 0, newFileNames, 0, fileNames.length);
- fileNames = newFileNames;
- }
- fileNames [count++] = string;
- if ((style & SWT.MULTI) == 0) break;
- } while (start < buffer.length && buffer[start] != 0);
-
- if (fileNames.length > 0) fileName = fileNames [0];
- String separator = "";
- int length = filterPath.length ();
- if (length > 0 && filterPath.charAt (length - 1) != '\\') {
- separator = "\\";
+ fileNames = new String[0];
+ if (hr == COM.S_OK) {
+ if ((style & SWT.SAVE) != 0) {
+ if (fileDialog.GetResult(ppv) == COM.S_OK) {
+ IShellItem psi = new IShellItem(ppv[0]);
+ Path itemPath = getItemPath(psi);
+ psi.Release();
+ fileName = itemPath.getFileName().toString();
+ filterPath = itemPath.getParent().toString();
+ fileNames = new String[] { fileName };
+ fullPath = itemPath.toString();
}
- fullPath = filterPath + separator + fileName;
- if (count < fileNames.length) {
- String [] newFileNames = new String [count];
- System.arraycopy (fileNames, 0, newFileNames, 0, count);
- fileNames = newFileNames;
+ } else {
+ if (fileDialog.GetResults(ppv) == COM.S_OK) {
+ IShellItemArray psia = new IShellItemArray(ppv[0]);
+ int[] piCount = new int[1];
+ psia.GetCount(piCount);
+ fileNames = new String[piCount[0]];
+ Path parentPath = null;
+ for (int i = 0; i < piCount[0]; i++) {
+ psia.GetItemAt(i, ppv);
+ IShellItem psi = new IShellItem(ppv[0]);
+ Path itemPath = getItemPath(psi);
+ psi.Release();
+ if (parentPath == null) {
+ parentPath = itemPath.getParent();
+ filterPath = parentPath.toString();
+ fullPath = itemPath.toString();
+ }
+ /*
+ * Feature in Windows. Returned items might have different parent folders.
+ * (E.g. when selecting from a virtual folder like Recent Files).
+ * Return full paths names in this case.
+ */
+ if (itemPath.getParent().equals(parentPath)) {
+ fileNames[i] = itemPath.getFileName().toString();
+ } else {
+ fileNames[i] = itemPath.toString();
+ }
+ }
+ fileName = fileNames[0];
+ psia.Release();
}
}
- filterIndex = struct.nFilterIndex - 1;
- }
- /* Free the memory that was allocated. */
- OS.HeapFree (hHeap, 0, lpstrFile);
- OS.HeapFree (hHeap, 0, lpstrFilter);
- OS.HeapFree (hHeap, 0, lpstrInitialDir);
- OS.HeapFree (hHeap, 0, lpstrTitle);
- if (lpstrDefExt != 0) OS.HeapFree (hHeap, 0, lpstrDefExt);
-
- /* Destroy the BIDI orientation window */
- if (hwndParent != hwndOwner) {
- if (enabled) OS.EnableWindow (hwndParent, true);
- OS.SetActiveWindow (hwndParent);
- OS.DestroyWindow (hwndOwner);
+ int[] piIndex = new int[1];
+ if (fileDialog.GetFileTypeIndex(piIndex) == COM.S_OK) {
+ filterIndex = piIndex[0] - 1;
+ }
}
- /*
- * This code is intentionally commented. On some
- * platforms, the owner window is repainted right
- * away when a dialog window exits. This behavior
- * is currently unspecified.
- */
-// if (hwndOwner != 0) OS.UpdateWindow (hwndOwner);
+ fileDialog.Release();
/* Answer the full path or null */
return fullPath;
@@ -583,6 +488,11 @@ public void setFilterPath (String string) {
* Sets the flag that the dialog will use to
* determine whether to prompt the user for file
* overwrite if the selected file already exists.
+ * <p>
+ * Note: On some platforms where suppressing the overwrite prompt
+ * is not supported, the prompt is shown even when invoked with
+ * overwrite false.
+ * </p>
*
* @param overwrite true if the dialog will prompt for file overwrite, false otherwise
*
@@ -591,4 +501,5 @@ public void setFilterPath (String string) {
public void setOverwrite (boolean overwrite) {
this.overwrite = overwrite;
}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
index 2728b9f2dd..10598c0a1b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
@@ -157,8 +157,8 @@ public RGB getRGB () {
*/
public FontData open () {
/* Get the owner HWND for the dialog */
- long /*int*/ hwndOwner = parent.handle;
- long /*int*/ hwndParent = parent.handle;
+ long hwndOwner = parent.handle;
+ long hwndParent = parent.handle;
/*
* Feature in Windows. There is no API to set the orientation of a
@@ -187,7 +187,7 @@ public FontData open () {
}
/* Open the dialog */
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
CHOOSEFONT lpcf = new CHOOSEFONT ();
lpcf.lStructSize = CHOOSEFONT.sizeof;
lpcf.hwndOwner = hwndOwner;
@@ -196,11 +196,11 @@ public FontData open () {
lpcf.Flags |= OS.CF_EFFECTS;
}
- long /*int*/ lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
+ long lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);
if (fontData != null && fontData.data != null) {
LOGFONT logFont = fontData.data;
int lfHeight = logFont.lfHeight;
- long /*int*/ hDC = OS.GetDC (0);
+ long hDC = OS.GetDC (0);
int pixels = -(int)(0.5f + (fontData.height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY) / 72));
OS.ReleaseDC (0, hDC);
logFont.lfHeight = pixels;
@@ -224,9 +224,11 @@ public FontData open () {
display.setModalDialog (this);
}
+ display.externalEventLoop = true;
display.sendPreExternalEventDispatchEvent ();
/* Open the dialog */
boolean success = OS.ChooseFont (lpcf);
+ display.externalEventLoop = false;
display.sendPostExternalEventDispatchEvent ();
/* Clear the temporary dialog modal parent */
@@ -243,7 +245,7 @@ public FontData open () {
* This will not work on multiple screens or
* for printing. Should use DC for the proper device.
*/
- long /*int*/ hDC = OS.GetDC(0);
+ long hDC = OS.GetDC(0);
int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);
int pixels = 0;
if (logFont.lfHeight > 0) {
@@ -255,8 +257,8 @@ public FontData open () {
* we must subtract the internal leading, which requires a TEXTMETRIC,
* which in turn requires font creation.
*/
- long /*int*/ hFont = OS.CreateFontIndirect(logFont);
- long /*int*/ oldFont = OS.SelectObject(hDC, hFont);
+ long hFont = OS.CreateFontIndirect(logFont);
+ long oldFont = OS.SelectObject(hDC, hFont);
TEXTMETRIC lptm = new TEXTMETRIC ();
OS.GetTextMetrics(hDC, lptm);
OS.SelectObject(hDC, oldFont);
@@ -287,14 +289,6 @@ public FontData open () {
OS.DestroyWindow (hwndOwner);
}
- /*
- * This code is intentionally commented. On some
- * platforms, the owner window is repainted right
- * away when a dialog window exits. This behavior
- * is currently unspecified.
- */
-// if (hwndOwner != 0) OS.UpdateWindow (hwndOwner);
-
if (!success) return null;
return fontData;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
index 9cfb4ba2a0..0277d353de 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
@@ -46,7 +46,7 @@ import org.eclipse.swt.internal.win32.*;
public class Group extends Composite {
String text = "";
static final int CLIENT_INSET = 3;
- static final long /*int*/ GroupProc;
+ static final long GroupProc;
static final TCHAR GroupClass = new TCHAR (0, "SWT_GROUP", true);
static {
/*
@@ -61,7 +61,7 @@ public class Group extends Composite {
TCHAR WC_BUTTON = new TCHAR (0, "BUTTON", true);
OS.GetClassInfo (0, WC_BUTTON, lpWndClass);
GroupProc = lpWndClass.lpfnWndProc;
- long /*int*/ hInstance = OS.GetModuleHandle (null);
+ long hInstance = OS.GetModuleHandle (null);
if (!OS.GetClassInfo (hInstance, GroupClass, lpWndClass)) {
lpWndClass.hInstance = hInstance;
lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW);
@@ -106,7 +106,7 @@ public Group (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. When the user clicks on the group
@@ -150,8 +150,8 @@ protected void checkSubclass () {
* client area, pad the width so the text is not clipped.
*/
char [] buffer = (string == null ? text : string).toCharArray ();
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
@@ -168,8 +168,8 @@ protected void checkSubclass () {
@Override Rectangle computeTrimInPixels (int x, int y, int width, int height) {
checkWidget ();
Rectangle trim = super.computeTrimInPixels (x, y, width, height);
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = new TEXTMETRIC ();
@@ -244,8 +244,8 @@ String fixText (boolean enabled) {
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = new TEXTMETRIC ();
@@ -294,7 +294,7 @@ boolean mnemonicMatch (char key) {
}
@Override
-void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
+void printWidget (long hwnd, long hdc, GC gc) {
/*
* Bug in Windows. For some reason, PrintWindow()
* returns success but does nothing when it is called
@@ -343,7 +343,7 @@ void printWidget (long /*int*/ hwnd, long /*int*/ hdc, GC gc) {
} else {
OS.SetWindowOrgEx (hdc, -location.x, -location.y, null);
}
- long /*int*/ topHandle = children [i].topHandle();
+ long topHandle = children [i].topHandle();
int bits = OS.GetWindowLong (topHandle, OS.GWL_STYLE);
if ((bits & OS.WS_VISIBLE) != 0) {
children [i].printWidget (topHandle, hdc, gc);
@@ -448,12 +448,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return GroupProc;
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -466,7 +466,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCHITTEST (long wParam, long lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -478,13 +478,13 @@ LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
* allow children, answer HTCLIENT to allow mouse messages
* to be delivered to the children.
*/
- long /*int*/ code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (code == OS.HTTRANSPARENT) code = OS.HTCLIENT;
return new LRESULT (code);
}
@Override
-LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEMOVE (long wParam, long lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
/*
@@ -497,7 +497,7 @@ LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PAINT (long wParam, long lParam) {
LRESULT result = super.WM_PAINT(wParam, lParam);
if (hasCustomForeground() && text.length () != 0) {
@@ -505,12 +505,12 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
char [] buffer = (string == null ? text : string).toCharArray ();
// We cannot use BeginPaint and EndPaint, because that removes the group border
- long /*int*/ hDC = OS.GetDC(handle);
+ long hDC = OS.GetDC(handle);
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
rect.left += 3*CLIENT_INSET;
- long /*int*/ newFont, oldFont = 0;
+ long newFont, oldFont = 0;
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
@@ -531,7 +531,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PRINTCLIENT (long wParam, long lParam) {
LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
if (result != null) return result;
/*
@@ -546,7 +546,7 @@ LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
*/
if (OS.IsAppThemed ()) {
int nSavedDC = OS.SaveDC (wParam);
- long /*int*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam);
OS.RestoreDC (wParam, nSavedDC);
return new LRESULT (code);
}
@@ -554,7 +554,7 @@ LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long wParam, long lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -576,14 +576,14 @@ LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
@Override
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
index 9e3e860ae6..8468050917 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
@@ -16,6 +16,7 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.ole.win32.*;
import org.eclipse.swt.internal.win32.*;
/**
@@ -50,17 +51,6 @@ public class IME extends Widget {
static final int WM_MSIME_MOUSE = OS.RegisterWindowMessage (new TCHAR (0, "MSIMEMouseOperation", true)); //$NON-NLS-1$
- static final byte [] IID_ITfInputProcessorProfiles = new byte [16];
- static final byte [] IID_ITfDisplayAttributeProvider = new byte [16];
- static final byte [] CLSID_TF_InputProcessorProfiles = new byte [16];
- static final byte [] GUID_TFCAT_TIP_KEYBOARD = new byte [16];
- static {
- OS.IIDFromString ("{1F02B6C5-7842-4EE6-8A0B-9A24183A95CA}\0".toCharArray (), IID_ITfInputProcessorProfiles); //$NON-NLS-1$
- OS.IIDFromString ("{fee47777-163c-4769-996a-6e9c50ad8f54}\0".toCharArray (), IID_ITfDisplayAttributeProvider); //$NON-NLS-1$
- OS.IIDFromString ("{33C53A50-F456-4884-B049-85FD643ECFED}\0".toCharArray (), CLSID_TF_InputProcessorProfiles); //$NON-NLS-1$
- OS.IIDFromString ("{34745C63-B2F0-4784-8B67-5E12C8701A31}\0".toCharArray (), GUID_TFCAT_TIP_KEYBOARD); //$NON-NLS-1$
- }
-
/* TextLayout has a copy of these constants */
static final int UNDERLINE_IME_DOT = 1 << 16;
static final int UNDERLINE_IME_DASH = 2 << 16;
@@ -169,44 +159,37 @@ public int getCompositionOffset () {
}
TF_DISPLAYATTRIBUTE getDisplayAttribute (short langid, int attInfo) {
- long /*int*/ [] pProfiles = new long /*int*/ [1];
- int hr = OS.CoCreateInstance (CLSID_TF_InputProcessorProfiles, 0, OS.CLSCTX_INPROC_SERVER, IID_ITfInputProcessorProfiles, pProfiles);
+ long [] ppv = new long [1];
+ int hr = COM.CoCreateInstance (COM.CLSID_TF_InputProcessorProfiles, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_ITfInputProcessorProfiles, ppv);
TF_DISPLAYATTRIBUTE pda = null;
if (hr == OS.S_OK) {
- byte [] pclsid = new byte [16];
- byte [] pguidProfile = new byte [16];
- /* pProfiles.GetDefaultLanguageProfile () */
- hr = OS.VtblCall (8, pProfiles [0], langid, GUID_TFCAT_TIP_KEYBOARD, pclsid, pguidProfile);
+ ITfInputProcessorProfiles pProfiles = new ITfInputProcessorProfiles (ppv [0]);
+ GUID pclsid = new GUID ();
+ GUID pguidProfile = new GUID ();
+ hr = pProfiles.GetDefaultLanguageProfile (langid, COM.GUID_TFCAT_TIP_KEYBOARD, pclsid, pguidProfile);
if (hr == OS.S_OK) {
- long /*int*/ [] pProvider = new long /*int*/ [1];
- hr = OS.CoCreateInstance (pclsid, 0, OS.CLSCTX_INPROC_SERVER, IID_ITfDisplayAttributeProvider, pProvider);
+ hr = COM.CoCreateInstance (pclsid, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_ITfDisplayAttributeProvider, ppv);
if (hr == OS.S_OK) {
- long /*int*/ [] pEnum = new long /*int*/ [1];
- /* pProvider.EnumDisplayAttributeInfo () */
- hr = OS.VtblCall (3, pProvider [0], pEnum);
+ ITfDisplayAttributeProvider pProvider = new ITfDisplayAttributeProvider (ppv [0]);
+ hr = pProvider.EnumDisplayAttributeInfo (ppv);
if (hr == OS.S_OK) {
- long /*int*/ [] pDispInfo = new long /*int*/ [1];
+ IEnumTfDisplayAttributeInfo pEnum = new IEnumTfDisplayAttributeInfo (ppv [0]);
TF_DISPLAYATTRIBUTE tempPda = new TF_DISPLAYATTRIBUTE ();
- /* pEnum.Next () */
- while ((hr = OS.VtblCall (4, pEnum [0], 1, pDispInfo, (int[])null)) == OS.S_OK) {
- /* pDispInfo.GetAttributeInfo(); */
- OS.VtblCall (5, pDispInfo [0], tempPda);
- /* pDispInfo.Release () */
- OS.VtblCall (2, pDispInfo [0]);
+ while ((hr = pEnum.Next (1, ppv, null)) == OS.S_OK) {
+ ITfDisplayAttributeInfo pDispInfo = new ITfDisplayAttributeInfo (ppv [0]);
+ pDispInfo.GetAttributeInfo (tempPda);
+ pDispInfo.Release ();
if (tempPda.bAttr == attInfo) {
pda = tempPda;
break;
}
}
- /* pEnum.Release () */
- hr = OS.VtblCall (2, pEnum [0]);
+ pEnum.Release ();
}
- /* pProvider.Release () */
- hr = OS.VtblCall (2, pProvider [0]);
+ pProvider.Release ();
}
}
- /* pProfiles.Release () */
- hr = OS.VtblCall (2, pProfiles [0]);
+ pProfiles.Release ();
}
if (pda == null) {
pda = new TF_DISPLAYATTRIBUTE ();
@@ -314,7 +297,7 @@ public String getText () {
*/
public boolean getWideCaret() {
checkWidget ();
- long /*int*/ layout = OS.GetKeyboardLayout (0);
+ long layout = OS.GetKeyboardLayout (0);
short langID = (short)OS.LOWORD (layout);
return OS.PRIMARYLANGID (langID) == OS.LANG_KOREAN;
}
@@ -362,13 +345,13 @@ public void setCompositionOffset (int offset) {
}
}
-LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_COMPOSITION (long wParam, long lParam) {
if (!isInlineEnabled ()) return null;
ranges = null;
styles = null;
caretOffset = commitCount = 0;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hIMC = OS.ImmGetContext (hwnd);
+ long hwnd = parent.handle;
+ long hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
char [] buffer = null;
if ((lParam & OS.GCS_RESULTSTR) != 0) {
@@ -434,7 +417,7 @@ LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
length = clauses.length - 1;
ranges = new int [length * 2];
styles = new TextStyle [length];
- long /*int*/ layout = OS.GetKeyboardLayout (0);
+ long layout = OS.GetKeyboardLayout (0);
short langID = (short)OS.LOWORD (layout);
TF_DISPLAYATTRIBUTE attr = null;
TextStyle style = null;
@@ -519,20 +502,20 @@ LRESULT WM_IME_COMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
return LRESULT.ONE;
}
-LRESULT WM_IME_COMPOSITION_START (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_COMPOSITION_START (long wParam, long lParam) {
return isInlineEnabled () ? LRESULT.ONE : null;
}
-LRESULT WM_IME_ENDCOMPOSITION (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_ENDCOMPOSITION (long wParam, long lParam) {
// Reset defaults. Otherwise the next composition overwrites the previous one.
startOffset = -1;
caretOffset = 0;
return isInlineEnabled () ? LRESULT.ONE : null;
}
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
if (wParam == OS.VK_HANJA) {
- long /*int*/ hKL = OS.GetKeyboardLayout (0);
+ long hKL = OS.GetKeyboardLayout (0);
short langID = (short)OS.LOWORD (hKL);
if (OS.PRIMARYLANGID (langID) == OS.LANG_KOREAN) {
Event event = new Event ();
@@ -545,13 +528,13 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
if (event.text != null && event.text.length() > 0) {
int length = event.text.length();
- if (length > 1) {
- event.end = event.start + 1;
- }
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hIMC = OS.ImmGetContext (hwnd);
+ if (length > 1) {
+ event.end = event.start + 1;
+ }
+ long hwnd = parent.handle;
+ long hIMC = OS.ImmGetContext (hwnd);
TCHAR buffer = new TCHAR (0, event.text, true);
- long /*int*/ rc = OS.ImmEscape(hKL, hIMC, OS.IME_ESC_HANJA_MODE, buffer);
+ long rc = OS.ImmEscape(hKL, hIMC, OS.IME_ESC_HANJA_MODE, buffer);
if (rc != 0) {
sendEvent (SWT.ImeComposition, event);
}
@@ -561,10 +544,10 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
if (!isInlineEnabled ()) return null;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hIMC = OS.ImmGetContext (hwnd);
+ long hwnd = parent.handle;
+ long hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE, 0);
@@ -574,10 +557,10 @@ LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
if (!isInlineEnabled ()) return null;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hIMC = OS.ImmGetContext (hwnd);
+ long hwnd = parent.handle;
+ long hIMC = OS.ImmGetContext (hwnd);
if (hIMC != 0) {
if (OS.ImmGetOpenStatus (hIMC)) {
if (OS.ImmGetCompositionString (hIMC, OS.GCS_COMPSTR, (char [])null, 0) > 0) {
@@ -588,10 +571,10 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
int offset = event.index;
int length = text.length();
if (offset != -1 && startOffset != -1 && startOffset <= offset && offset < startOffset + length) {
- long /*int*/ imeWnd = OS.ImmGetDefaultIMEWnd (hwnd);
+ long imeWnd = OS.ImmGetDefaultIMEWnd (hwnd);
offset = event.index + event.count - startOffset;
int trailing = event.count > 0 ? 1 : 2;
- long /*int*/ param = OS.MAKEWPARAM (OS.MAKEWORD (OS.IMEMOUSE_LDOWN, trailing), offset);
+ long param = OS.MAKEWPARAM (OS.MAKEWORD (OS.IMEMOUSE_LDOWN, trailing), offset);
OS.SendMessage (imeWnd, WM_MSIME_MOUSE, param, hIMC);
} else {
OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index 4c8ddfeaec..4ae061cb21 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Paul Pazderski - Bug 205199: setImage(null) on Label overrides text
*******************************************************************************/
package org.eclipse.swt.widgets;
@@ -54,9 +55,9 @@ import org.eclipse.swt.internal.win32.*;
public class Label extends Control {
String text = "";
Image image;
+ boolean isImageMode; // Resolves ambiguity when both image and text are set
static final int MARGIN = 4;
- static /*final*/ boolean IMAGE_AND_TEXT = false;
- static final long /*int*/ LabelProc;
+ static final long LabelProc;
static final TCHAR LabelClass = new TCHAR (0, "STATIC", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -106,7 +107,7 @@ public Label (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows 7. When the user double clicks
@@ -146,25 +147,14 @@ static int checkStyle (int style) {
width += border * 2; height += border * 2;
return new Point (width, height);
}
- int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- boolean drawText = true;
- boolean drawImage = (bits & OS.SS_OWNERDRAW) == OS.SS_OWNERDRAW;
- if (drawImage) {
- if (image != null) {
- Rectangle rect = image.getBoundsInPixels();
- width += rect.width;
- height += rect.height;
- if (IMAGE_AND_TEXT) {
- if (text.length () != 0) width += MARGIN;
- } else {
- drawText = false;
- }
- }
- }
- if (drawText) {
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- long /*int*/ oldFont = OS.SelectObject (hDC, newFont);
+ if (isImageMode) {
+ Rectangle rect = image.getBoundsInPixels();
+ width += rect.width;
+ height += rect.height;
+ } else {
+ long hDC = OS.GetDC (handle);
+ long newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long oldFont = OS.SelectObject (hDC, newFont);
int length = OS.GetWindowTextLength (handle);
if (length == 0) {
TEXTMETRIC tm = new TEXTMETRIC ();
@@ -262,6 +252,11 @@ public String getText () {
}
@Override
+boolean isUseWsBorder () {
+ return super.isUseWsBorder () || ((display != null) && display.useWsBorderLabel);
+}
+
+@Override
boolean mnemonicHit (char key) {
Control control = this;
while (control.parent != null) {
@@ -318,23 +313,25 @@ public void setAlignment (int alignment) {
if ((alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER)) == 0) return;
style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
- int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- if ((bits & OS.SS_OWNERDRAW) != OS.SS_OWNERDRAW) {
- bits &= ~(OS.SS_LEFTNOWORDWRAP | OS.SS_CENTER | OS.SS_RIGHT);
- if ((style & SWT.LEFT) != 0) {
- if ((style & SWT.WRAP) != 0) {
- bits |= OS.SS_LEFT;
- } else {
- bits |= OS.SS_LEFTNOWORDWRAP;
- }
- }
- if ((style & SWT.CENTER) != 0) bits |= OS.SS_CENTER;
- if ((style & SWT.RIGHT) != 0) bits |= OS.SS_RIGHT;
- OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
- }
+ updateStyleBits(getEnabled());
OS.InvalidateRect (handle, null, true);
}
+@Override
+public void setEnabled (boolean enabled) {
+ if ((style & SWT.SEPARATOR) != 0) return;
+ /*
+ * Style may need to be changed if Display#disabledLabelForegroundPixel
+ * is active. At the same time, #setEnabled() will cause a repaint with
+ * current style. Therefore, style needs to be changed before #setEnabled().
+ * Note that adding redraw() after #setEnabled() is a worse solution
+ * because it still causes brief old style painting in #setEnabled().
+ */
+ updateStyleBits(enabled);
+
+ super.setEnabled(enabled);
+}
+
/**
* Sets the receiver's image to the argument, which may be
* null indicating that no image should be displayed.
@@ -354,12 +351,8 @@ public void setImage (Image image) {
if ((style & SWT.SEPARATOR) != 0) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
this.image = image;
- int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- if ((bits & OS.SS_OWNERDRAW) != OS.SS_OWNERDRAW) {
- bits &= ~(OS.SS_LEFTNOWORDWRAP | OS.SS_CENTER | OS.SS_RIGHT);
- bits |= OS.SS_OWNERDRAW;
- OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
- }
+ isImageMode = (image != null);
+ updateStyleBits(getEnabled());
OS.InvalidateRect (handle, null, true);
}
@@ -398,6 +391,8 @@ public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
+ isImageMode = false;
+ updateStyleBits(getEnabled());
/*
* Feature in Windows. For some reason, SetWindowText() for
* static controls redraws the control, even when the text has
@@ -406,9 +401,29 @@ public void setText (String string) {
*/
if (string.equals (text)) return;
text = string;
- if (image == null || !IMAGE_AND_TEXT) {
- int oldBits = OS.GetWindowLong (handle, OS.GWL_STYLE), newBits = oldBits;
- newBits &= ~OS.SS_OWNERDRAW;
+ string = Display.withCrLf (string);
+ TCHAR buffer = new TCHAR (getCodePage (), string, true);
+ OS.SetWindowText (handle, buffer);
+ if ((state & HAS_AUTO_DIRECTION) != 0) {
+ updateTextDirection (AUTO_TEXT_DIRECTION);
+ }
+}
+
+void updateStyleBits(boolean isEnabled) {
+ boolean useOwnerDraw = isImageMode;
+
+ if (!useOwnerDraw && (display.disabledLabelForegroundPixel != -1) && !isEnabled)
+ useOwnerDraw = true;
+
+ int oldBits = OS.GetWindowLong(handle, OS.GWL_STYLE);
+
+ int newBits = oldBits;
+ newBits &= ~OS.SS_OWNERDRAW;
+ newBits &= ~(OS.SS_LEFTNOWORDWRAP | OS.SS_CENTER | OS.SS_RIGHT);
+
+ if (useOwnerDraw) {
+ newBits |= OS.SS_OWNERDRAW;
+ } else {
if ((style & SWT.LEFT) != 0) {
if ((style & SWT.WRAP) != 0) {
newBits |= OS.SS_LEFT;
@@ -418,14 +433,9 @@ public void setText (String string) {
}
if ((style & SWT.CENTER) != 0) newBits |= OS.SS_CENTER;
if ((style & SWT.RIGHT) != 0) newBits |= OS.SS_RIGHT;
- if (oldBits != newBits) OS.SetWindowLong (handle, OS.GWL_STYLE, newBits);
- }
- string = Display.withCrLf (string);
- TCHAR buffer = new TCHAR (getCodePage (), string, true);
- OS.SetWindowText (handle, buffer);
- if ((state & HAS_AUTO_DIRECTION) != 0) {
- updateTextDirection (AUTO_TEXT_DIRECTION);
}
+
+ if (oldBits != newBits) OS.SetWindowLong (handle, OS.GWL_STYLE, newBits);
}
@Override
@@ -452,12 +462,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return LabelProc;
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -468,7 +478,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
if ((style & SWT.SEPARATOR) != 0) {
@@ -495,7 +505,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_UPDATEUISTATE (long wParam, long lParam) {
LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
if (result != null) return result;
/*
@@ -516,90 +526,98 @@ LRESULT WM_UPDATEUISTATE (long /*int*/ wParam, long /*int*/ lParam) {
}
if (redraw) {
OS.InvalidateRect (handle, null, false);
- long /*int*/ code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ long code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
return new LRESULT (code);
}
return result;
}
+void wmDrawChildSeparator(DRAWITEMSTRUCT struct) {
+ if ((style & SWT.SHADOW_NONE) != 0) return;
+
+ RECT rect = new RECT ();
+ int lineWidth = OS.GetSystemMetrics (OS.SM_CXBORDER);
+ int flags = (style & SWT.SHADOW_IN) != 0 ? OS.EDGE_SUNKEN : OS.EDGE_ETCHED;
+ if ((style & SWT.HORIZONTAL) != 0) {
+ int bottom = struct.top + Math.max (lineWidth * 2, (struct.bottom - struct.top) / 2);
+ OS.SetRect (rect, struct.left, struct.top, struct.right, bottom);
+ OS.DrawEdge (struct.hDC, rect, flags, OS.BF_BOTTOM);
+ } else {
+ int right = struct.left + Math.max (lineWidth * 2, (struct.right - struct.left) / 2);
+ OS.SetRect (rect, struct.left, struct.top, right, struct.bottom);
+ OS.DrawEdge (struct.hDC, rect, flags, OS.BF_RIGHT);
+ }
+}
+
+void wmDrawChildImage(DRAWITEMSTRUCT struct) {
+ int width = struct.right - struct.left;
+ int height = struct.bottom - struct.top;
+ if (width == 0 || height == 0) return;
+
+ Rectangle imageRect = image.getBoundsInPixels ();
+
+ int x = 0;
+ if ((style & SWT.CENTER) != 0) {
+ x = Math.max (0, (width - imageRect.width) / 2);
+ } else if ((style & SWT.RIGHT) != 0) {
+ x = width - imageRect.width;
+ }
+
+ GCData data = new GCData();
+ data.device = display;
+ GC gc = GC.win32_new (struct.hDC, data);
+ Image image = getEnabled () ? this.image : new Image (display, this.image, SWT.IMAGE_DISABLE);
+ gc.drawImage (image, DPIUtil.autoScaleDown(x), DPIUtil.autoScaleDown(Math.max (0, (height - imageRect.height) / 2)));
+ if (image != this.image) image.dispose ();
+ gc.dispose ();
+}
+
+void wmDrawChildText(DRAWITEMSTRUCT struct) {
+ int width = struct.right - struct.left;
+ int height = struct.bottom - struct.top;
+ if (width == 0 || height == 0) return;
+
+ RECT rect = new RECT ();
+ rect.left = struct.left;
+ rect.top = struct.top;
+ rect.right = struct.right;
+ rect.bottom = struct.bottom;
+
+ int flags = OS.DT_EDITCONTROL | OS.DT_EXPANDTABS;
+ if ((style & SWT.LEFT) != 0) flags |= OS.DT_LEFT;
+ if ((style & SWT.CENTER) != 0) flags |= OS.DT_CENTER;
+ if ((style & SWT.RIGHT) != 0) flags |= OS.DT_RIGHT;
+ if ((style & SWT.WRAP) != 0) flags |= OS.DT_WORDBREAK;
+
+ // Mnemonics are usually not shown on Labels until Alt is pressed.
+ long uiState = OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ if ((uiState & OS.UISF_HIDEACCEL) != 0)
+ flags |= OS.DT_HIDEPREFIX;
+
+ if (!getEnabled()) {
+ int foregroundPixel = OS.GetSysColor(OS.COLOR_GRAYTEXT);
+ if (display.disabledLabelForegroundPixel != -1)
+ foregroundPixel = display.disabledLabelForegroundPixel;
+
+ OS.SetTextColor(struct.hDC, foregroundPixel);
+ }
+
+ char [] buffer = text.toCharArray ();
+ OS.DrawText (struct.hDC, buffer, buffer.length, rect, flags);
+}
+
@Override
-LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmDrawChild (long wParam, long lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
drawBackground (struct.hDC);
- if ((style & SWT.SEPARATOR) != 0) {
- if ((style & SWT.SHADOW_NONE) != 0) return null;
- RECT rect = new RECT ();
- int lineWidth = OS.GetSystemMetrics (OS.SM_CXBORDER);
- int flags = (style & SWT.SHADOW_IN) != 0 ? OS.EDGE_SUNKEN : OS.EDGE_ETCHED;
- if ((style & SWT.HORIZONTAL) != 0) {
- int bottom = struct.top + Math.max (lineWidth * 2, (struct.bottom - struct.top) / 2);
- OS.SetRect (rect, struct.left, struct.top, struct.right, bottom);
- OS.DrawEdge (struct.hDC, rect, flags, OS.BF_BOTTOM);
- } else {
- int right = struct.left + Math.max (lineWidth * 2, (struct.right - struct.left) / 2);
- OS.SetRect (rect, struct.left, struct.top, right, struct.bottom);
- OS.DrawEdge (struct.hDC, rect, flags, OS.BF_RIGHT);
- }
- } else {
- int width = struct.right - struct.left;
- int height = struct.bottom - struct.top;
- if (width != 0 && height != 0) {
- boolean drawImage = image != null;
- boolean drawText = IMAGE_AND_TEXT && text.length () != 0;
- int margin = drawText && drawImage ? MARGIN : 0;
- int imageWidth = 0, imageHeight = 0;
- if (drawImage) {
- Rectangle rect = image.getBoundsInPixels ();
- imageWidth = rect.width;
- imageHeight = rect.height;
- }
- RECT rect = null;
- char [] buffer = null;
- int textWidth = 0, textHeight = 0, flags = 0;
- if (drawText) {
- rect = new RECT ();
- flags = OS.DT_CALCRECT | OS.DT_EDITCONTROL | OS.DT_EXPANDTABS;
- if ((style & SWT.LEFT) != 0) flags |= OS.DT_LEFT;
- if ((style & SWT.CENTER) != 0) flags |= OS.DT_CENTER;
- if ((style & SWT.RIGHT) != 0) flags |= OS.DT_RIGHT;
- if ((style & SWT.WRAP) != 0) {
- flags |= OS.DT_WORDBREAK;
- rect.right = Math.max (0, width - imageWidth - margin);
- }
- buffer = text.toCharArray ();
- OS.DrawText (struct.hDC, buffer, buffer.length, rect, flags);
- textWidth = rect.right - rect.left;
- textHeight = rect.bottom - rect.top;
- }
- int x = 0;
- if ((style & SWT.CENTER) != 0) {
- x = Math.max (0, (width - imageWidth - textWidth - margin) / 2);
- } else {
- if ((style & SWT.RIGHT) != 0) {
- x = width - imageWidth - textWidth - margin;
- }
- }
- if (drawImage) {
- GCData data = new GCData();
- data.device = display;
- GC gc = GC.win32_new (struct.hDC, data);
- Image image = getEnabled () ? this.image : new Image (display, this.image, SWT.IMAGE_DISABLE);
- gc.drawImage (image, DPIUtil.autoScaleDown(x), DPIUtil.autoScaleDown(Math.max (0, (height - imageHeight) / 2)));
- if (image != this.image) image.dispose ();
- gc.dispose ();
- x += imageWidth + margin;
- }
- if (drawText) {
- flags &= ~OS.DT_CALCRECT;
- rect.left = x;
- rect.right += rect.left;
- rect.top = Math.max (0, (height - textHeight) / 2);
- rect.bottom += rect.top;
- OS.DrawText (struct.hDC, buffer, buffer.length, rect, flags);
- }
- }
- }
+ if ((style & SWT.SEPARATOR) != 0)
+ wmDrawChildSeparator(struct);
+ else if (isImageMode)
+ wmDrawChildImage(struct);
+ else
+ wmDrawChildText(struct);
+
return null;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
index 11ffbedc50..36f9b5695c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
@@ -14,8 +14,9 @@
*******************************************************************************/
package org.eclipse.swt.widgets;
+import java.util.*;
+
import org.eclipse.swt.*;
-import org.eclipse.swt.accessibility.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
@@ -44,17 +45,11 @@ import org.eclipse.swt.internal.win32.*;
*/
public class Link extends Control {
String text;
- TextLayout layout; // always track the current layout, even if we don't need it.
- Color disabledColor;
int linkForeground = -1;
- Point [] offsets;
- Point selection;
String [] ids;
- int [] mnemonics;
- int focusIndex, mouseDownIndex;
- long /*int*/ font;
- static final RGB LAST_FALLBACK_LINK_FOREGROUND = new RGB (0, 51, 153);
- static final long /*int*/ LinkProc;
+ char [] mnemonics;
+ int nextFocusItem = -1;
+ static final long LinkProc;
static final TCHAR LinkClass = new TCHAR (0, OS.WC_LINK, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -147,7 +142,7 @@ public void addSelectionListener (SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. By convention, native Windows controls
@@ -166,49 +161,30 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
return OS.CallWindowProc (LinkProc, hwnd, msg, wParam, lParam);
}
-@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
+@Override
+Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
checkWidget ();
- if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
- if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
int width, height;
- if (useCommonControl()) {
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- long /*int*/ oldFont = OS.SelectObject (hDC, newFont);
- if (text.length () > 0) {
- char [] buffer = parse (text).toCharArray ();
- RECT rect = new RECT ();
- int flags = OS.DT_CALCRECT | OS.DT_NOPREFIX;
- if (wHint != SWT.DEFAULT) {
- flags |= OS.DT_WORDBREAK;
- rect.right = wHint;
- }
- OS.DrawText (hDC, buffer, buffer.length, rect, flags);
- width = rect.right - rect.left;
- height = rect.bottom;
- } else {
- TEXTMETRIC lptm = new TEXTMETRIC ();
- OS.GetTextMetrics (hDC, lptm);
- width = 0;
- height = lptm.tmHeight;
- }
+ /*
+ * When the text is empty, LM_GETIDEALSIZE returns zero width and height,
+ * but SWT convention is to return zero width and line height.
+ */
+ if (text.isEmpty()) {
+ long hDC = OS.GetDC (handle);
+ long newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long oldFont = OS.SelectObject (hDC, newFont);
+ TEXTMETRIC lptm = new TEXTMETRIC ();
+ OS.GetTextMetrics (hDC, lptm);
+ width = 0;
+ height = lptm.tmHeight;
if (newFont != 0) OS.SelectObject (hDC, oldFont);
OS.ReleaseDC (handle, hDC);
} else {
- int layoutWidth = layout.getWidth ();
- //TEMPORARY CODE
- if (wHint == 0) {
- layout.setWidth (1);
- Rectangle rect = DPIUtil.autoScaleUp(layout.getBounds ());
- width = 0;
- height = rect.height;
- } else {
- layout.setWidth (DPIUtil.autoScaleDown(wHint));
- Rectangle rect = DPIUtil.autoScaleUp(layout.getBounds ());
- width = rect.width;
- height = rect.height;
- }
- layout.setWidth (layoutWidth);
+ SIZE size = new SIZE ();
+ int maxWidth = (wHint == SWT.DEFAULT) ? 0x7fffffff : wHint;
+ OS.SendMessage (handle, OS.LM_GETIDEALSIZE, maxWidth, size);
+ width = size.cx;
+ height = size.cy;
}
if (wHint != SWT.DEFAULT) width = wHint;
if (hHint != SWT.DEFAULT) height = hHint;
@@ -222,131 +198,37 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
void createHandle () {
super.createHandle ();
state |= THEME_BACKGROUND;
- layout = new TextLayout (display);
- disabledColor = Color.win32_new (display, OS.GetSysColor (OS.COLOR_GRAYTEXT));
- offsets = new Point [0];
- ids = new String [0];
- mnemonics = new int [0];
- selection = new Point (-1, -1);
- focusIndex = mouseDownIndex = -1;
}
@Override
void createWidget () {
super.createWidget ();
text = "";
- if ((style & SWT.MIRRORED) != 0) {
- layout.setOrientation (SWT.RIGHT_TO_LEFT);
- }
- initAccessible ();
-}
-
-void drawWidget (GC gc, RECT rect) {
- drawBackground (gc.handle, rect);
- int selStart = selection.x;
- int selEnd = selection.y;
- if (selStart > selEnd) {
- selStart = selection.y;
- selEnd = selection.x;
- }
- // temporary code to disable text selection
- selStart = selEnd = -1;
- if (!OS.IsWindowEnabled (handle)) gc.setForeground (disabledColor);
- layout.draw (gc, 0, 0, selStart, selEnd, null, null);
- if (hasFocus () && focusIndex != -1) {
- Rectangle [] rects = getRectanglesInPixels (focusIndex);
- for (int i = 0; i < rects.length; i++) {
- Rectangle rectangle = DPIUtil.autoScaleDown(rects [i]);
- gc.drawFocus (rectangle.x, rectangle.y, rectangle.width, rectangle.height);
- }
- }
- if (hooks (SWT.Paint) || filters (SWT.Paint)) {
- Event event = new Event ();
- event.gc = gc;
- event.setBoundsInPixels(new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top));
- sendEvent (SWT.Paint, event);
- event.gc = null;
- }
+ ids = new String[0];
+ mnemonics = new char[0];
}
@Override
void enableWidget (boolean enabled) {
- if (useCommonControl(enabled)) {
- LITEM item = new LITEM ();
- item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
- item.stateMask = OS.LIS_ENABLED;
- item.state = enabled ? OS.LIS_ENABLED : 0;
- while (OS.SendMessage (handle, OS.LM_SETITEM, 0, item) != 0) {
- item.iLink++;
- }
- }
- styleLinkParts(enabled);
- redraw ();
- /*
- * Feature in Windows. For some reason, setting
- * LIS_ENABLED state using LM_SETITEM causes the
- * SysLink to become enabled. To be specific,
- * calling IsWindowEnabled() returns true. The
- * fix is disable the SysLink after LM_SETITEM.
- */
super.enableWidget (enabled);
+ /*
+ * Feature in Windows. SysLink32 control doesn't natively
+ * provide disabled state. Emulate it with custom draw.
+ */
+ OS.InvalidateRect (handle, null, true);
}
-void initAccessible () {
- Accessible accessible = getAccessible ();
- accessible.addAccessibleListener (new AccessibleAdapter () {
- @Override
- public void getName (AccessibleEvent e) {
- e.result = parse (text);
- }
- });
-
- accessible.addAccessibleControlListener (new AccessibleControlAdapter () {
- @Override
- public void getChildAtPoint (AccessibleControlEvent e) {
- e.childID = ACC.CHILDID_SELF;
- }
-
- @Override
- public void getLocation (AccessibleControlEvent e) {
- Rectangle rect = display.mapInPixels (getParent (), null, getBoundsInPixels ());
- e.x = rect.x;
- e.y = rect.y;
- e.width = rect.width;
- e.height = rect.height;
+int getFocusItem () {
+ LITEM item = new LITEM ();
+ item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
+ item.stateMask = OS.LIS_FOCUSED;
+ while (OS.SendMessage (handle, OS.LM_GETITEM, 0, item) != 0) {
+ if ((item.state & OS.LIS_FOCUSED) != 0) {
+ return item.iLink;
}
-
- @Override
- public void getChildCount (AccessibleControlEvent e) {
- e.detail = 0;
- }
-
- @Override
- public void getRole (AccessibleControlEvent e) {
- e.detail = ACC.ROLE_LINK;
- }
-
- @Override
- public void getState (AccessibleControlEvent e) {
- e.detail = ACC.STATE_FOCUSABLE;
- if (hasFocus ()) e.detail |= ACC.STATE_FOCUSED;
- }
-
- @Override
- public void getDefaultAction (AccessibleControlEvent e) {
- e.result = SWT.getMessage ("SWT_Press"); //$NON-NLS-1$
- }
-
- @Override
- public void getSelection (AccessibleControlEvent e) {
- if (hasFocus ()) e.childID = ACC.CHILDID_SELF;
- }
-
- @Override
- public void getFocus (AccessibleControlEvent e) {
- if (hasFocus ()) e.childID = ACC.CHILDID_SELF;
- }
- });
+ item.iLink++;
+ }
+ return -1;
}
/**
@@ -362,10 +244,6 @@ void initAccessible () {
*/
public Color getLinkForeground () {
checkWidget ();
- return internalGetLinkForeground();
-}
-
-Color internalGetLinkForeground() {
if (linkForeground != -1) {
return Color.win32_new (display, linkForeground);
}
@@ -377,35 +255,6 @@ String getNameText () {
return getText ();
}
-Rectangle [] getRectanglesInPixels (int linkIndex) {
- int lineCount = layout.getLineCount ();
- Rectangle [] rects = new Rectangle [lineCount];
- int [] lineOffsets = layout.getLineOffsets ();
- Point point = offsets [linkIndex];
- int lineStart = 1;
- while (point.x > lineOffsets [lineStart]) lineStart++;
- int lineEnd = 1;
- while (point.y > lineOffsets [lineEnd]) lineEnd++;
- int index = 0;
- if (lineStart == lineEnd) {
- rects [index++] = DPIUtil.autoScaleUp(layout.getBounds (point.x, point.y));
- } else {
- rects [index++] = DPIUtil.autoScaleUp(layout.getBounds (point.x, lineOffsets [lineStart]-1));
- rects [index++] = DPIUtil.autoScaleUp(layout.getBounds (lineOffsets [lineEnd-1], point.y));
- if (lineEnd - lineStart > 1) {
- for (int i = lineStart; i < lineEnd - 1; i++) {
- rects [index++] = DPIUtil.autoScaleUp(layout.getLineBounds (i));
- }
- }
- }
- if (rects.length != index) {
- Rectangle [] tmp = new Rectangle [index];
- System.arraycopy (rects, 0, tmp, 0, index);
- rects = tmp;
- }
- return rects;
-}
-
/**
* Returns the receiver's text, which will be an empty
* string if it has never been set.
@@ -424,39 +273,11 @@ public String getText () {
@Override
boolean mnemonicHit (char key) {
- if (mnemonics != null) {
- char uckey = Character.toUpperCase (key);
- String parsedText = parse(text);
- for (int i = 0; i < mnemonics.length - 1; i++) {
- if (mnemonics[i] != -1) {
- char mnemonic = parsedText.charAt(mnemonics[i]);
- if (uckey == Character.toUpperCase (mnemonic)) {
- if (!setFocus ()) return false;
- if (useCommonControl()) {
- int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- LITEM item = new LITEM ();
- item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
- item.stateMask = OS.LIS_FOCUSED;
- while (item.iLink < mnemonics.length) {
- if (item.iLink != i) OS.SendMessage (handle, OS.LM_SETITEM, 0, item);
- item.iLink++;
- }
- item.iLink = i;
- item.state = OS.LIS_FOCUSED;
- OS.SendMessage (handle, OS.LM_SETITEM, 0, item);
-
- /* Feature in Windows. For some reason, setting the focus to
- * any item but first causes the control to clear the WS_TABSTOP
- * bit. The fix is always to reset the bit.
- */
- OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
- } else {
- focusIndex = i;
- redraw ();
- }
- return true;
- }
- }
+ char uckey = Character.toUpperCase (key);
+ for (int i = 0; i < mnemonics.length; i++) {
+ if (uckey == mnemonics[i]) {
+ nextFocusItem = i;
+ return setFocus () && setFocusItem (i);
}
}
return false;
@@ -464,38 +285,31 @@ boolean mnemonicHit (char key) {
@Override
boolean mnemonicMatch (char key) {
- if (mnemonics != null) {
- char uckey = Character.toUpperCase (key);
- String parsedText = parse(text);
- for (int i = 0; i < mnemonics.length - 1; i++) {
- if (mnemonics[i] != -1) {
- char mnemonic = parsedText.charAt(mnemonics[i]);
- if (uckey == Character.toUpperCase (mnemonic)) {
- return true;
- }
- }
+ char uckey = Character.toUpperCase (key);
+ for (char mnemonic : mnemonics) {
+ if (uckey == mnemonic) {
+ return true;
}
}
return false;
}
-String parse (String string) {
+void parse (String string) {
int length = string.length ();
- offsets = new Point [length / 4];
- ids = new String [length / 4];
- mnemonics = new int [length / 4 + 1];
- StringBuffer result = new StringBuffer ();
- char [] buffer = new char [length];
- string.getChars (0, string.length (), buffer, 0);
+ // The shortest link length is 7 characters (<a></a>).
+ ids = new String [length / 7];
+ mnemonics = new char [length / 7];
int index = 0, state = 0, linkIndex = 0;
- int start = 0, tagStart = 0, linkStart = 0, endtagStart = 0, refStart = 0;
+ int linkStart = 0, linkEnd = 0, refStart = 0, refEnd = 0;
+ char mnemonic = 0;
while (index < length) {
- char c = Character.toLowerCase (buffer [index]);
+ char c = Character.toLowerCase (string.charAt (index));
switch (state) {
case 0:
if (c == '<') {
- tagStart = index;
state++;
+ } else if (c == '&') {
+ state = 16;
}
break;
case 1:
@@ -517,7 +331,7 @@ String parse (String string) {
break;
case 3:
if (c == '<') {
- endtagStart = index;
+ linkEnd = index;
state++;
}
break;
@@ -529,15 +343,16 @@ String parse (String string) {
break;
case 6:
if (c == '>') {
- mnemonics [linkIndex] = parseMnemonics (buffer, start, tagStart, result);
- int offset = result.length ();
- parseMnemonics (buffer, linkStart, endtagStart, result);
- offsets [linkIndex] = new Point (offset, result.length () - 1);
- if (ids [linkIndex] == null) {
- ids [linkIndex] = new String (buffer, linkStart, endtagStart - linkStart);
+ if (refStart == 0) {
+ refStart = linkStart;
+ refEnd = linkEnd;
+ }
+ ids [linkIndex] = string.substring(refStart, refEnd);
+ if (mnemonic != 0) {
+ mnemonics [linkIndex] = mnemonic;
}
linkIndex++;
- start = tagStart = linkStart = endtagStart = refStart = index + 1;
+ linkStart = linkEnd = refStart = refEnd = mnemonic = 0;
state = 0;
} else {
state = 3;
@@ -565,7 +380,7 @@ String parse (String string) {
break;
case 12:
if (c == '"') {
- ids[linkIndex] = new String (buffer, refStart, index - refStart);
+ refEnd = index;
state = 2;
}
break;
@@ -582,59 +397,27 @@ String parse (String string) {
case 15:
if (c == '"') state = 2;
break;
+ case 16:
+ if (c == '<') {
+ state = 1;
+ } else {
+ state = 0;
+ if (c != '&') mnemonic = Character.toUpperCase (c);
+ }
+ break;
default:
state = 0;
break;
}
index++;
}
- if (start < length) {
- int tmp = parseMnemonics (buffer, start, tagStart, result);
- int mnemonic = parseMnemonics (buffer, Math.max (tagStart, linkStart), length, result);
- if (mnemonic == -1) mnemonic = tmp;
- mnemonics [linkIndex] = mnemonic;
- } else {
- mnemonics [linkIndex] = -1;
- }
- if (offsets.length != linkIndex) {
- Point [] newOffsets = new Point [linkIndex];
- System.arraycopy (offsets, 0, newOffsets, 0, linkIndex);
- offsets = newOffsets;
- String [] newIDs = new String [linkIndex];
- System.arraycopy (ids, 0, newIDs, 0, linkIndex);
- ids = newIDs;
- int [] newMnemonics = new int [linkIndex + 1];
- System.arraycopy (mnemonics, 0, newMnemonics, 0, linkIndex + 1);
- mnemonics = newMnemonics;
- }
- return result.toString ();
-}
-
-int parseMnemonics (char[] buffer, int start, int end, StringBuffer result) {
- int mnemonic = -1, index = start;
- while (index < end) {
- if (buffer [index] == '&') {
- if (index + 1 < end && buffer [index + 1] == '&') {
- result.append (buffer [index]);
- index++;
- } else {
- mnemonic = result.length();
- }
- } else {
- result.append (buffer [index]);
- }
- index++;
- }
- return mnemonic;
+ ids = Arrays.copyOf(ids, linkIndex);
+ mnemonics = Arrays.copyOf(mnemonics, linkIndex);
}
@Override
void releaseWidget () {
super.releaseWidget ();
- if (layout != null) layout.dispose ();
- layout = null;
- disabledColor = null;
- offsets = null;
ids = null;
mnemonics = null;
text = null;
@@ -665,6 +448,40 @@ public void removeSelectionListener (SelectionListener listener) {
eventTable.unhook (SWT.DefaultSelection, listener);
}
+boolean setFocusItem (int index) {
+ int bits = 0;
+ if (index > 0) {
+ bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
+ }
+ LITEM item = new LITEM ();
+ item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
+ item.stateMask = OS.LIS_FOCUSED;
+ int activeIndex = getFocusItem ();
+ if (activeIndex == index) return true;
+ if (activeIndex >= 0) {
+ /* Feature in Windows. Unfocus any element unfocus all elements.
+ * For example if item 2 is focused and we set unfocus (state = 0)
+ * for item 0 Windows will remove the focus state for item 2
+ * (getFocusItem() == -1) but fail to remove the focus border around
+ * the link. The fix is to only unfocus the element which has focus.
+ */
+ item.iLink = activeIndex;
+ OS.SendMessage (handle, OS.LM_SETITEM, 0, item);
+ }
+ item.iLink = index;
+ item.state = OS.LIS_FOCUSED;
+ long result = OS.SendMessage (handle, OS.LM_SETITEM, 0, item);
+
+ if (index > 0) {
+ /* Feature in Windows. For some reason, setting the focus to
+ * any item but first causes the control to clear the WS_TABSTOP
+ * bit. The fix is always to reset the bit.
+ */
+ OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
+ }
+ return result != 0;
+}
+
/**
* Sets the link foreground color to the color specified
* by the argument, or to the default system color for the link
@@ -692,9 +509,6 @@ public void setLinkForeground (Color color) {
}
if (pixel == linkForeground) return;
linkForeground = pixel;
- if (OS.IsWindowEnabled (handle)) {
- styleLinkParts(true);
- }
OS.InvalidateRect (handle, null, true);
}
@@ -744,44 +558,9 @@ public void setText (String string) {
if ((state & HAS_AUTO_DIRECTION) != 0) {
updateTextDirection (AUTO_TEXT_DIRECTION);
}
-
- boolean enabled = OS.IsWindowEnabled (handle);
- String parsedText = parse (text);
- /*
- * Bug in Windows. For some reason, when SetWindowText()
- * is used to set the text of a link control to the empty
- * string, the old text remains. The fix is to set the
- * text to a space instead.
- */
- if (string.length () == 0) string = " "; //$NON-NLS-1$
TCHAR buffer = new TCHAR (getCodePage (), string, true);
OS.SetWindowText (handle, buffer);
-
- layout.setText (parsedText);
- focusIndex = offsets.length > 0 ? 0 : -1;
- selection.x = selection.y = -1;
- int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- if (offsets.length > 0) {
- bits |= OS.WS_TABSTOP;
- } else {
- bits &= ~OS.WS_TABSTOP;
- }
- OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
- styleLinkParts(enabled);
- TextStyle mnemonicStyle = new TextStyle (null, null, null);
- mnemonicStyle.underline = true;
- for (int i = 0; i < mnemonics.length; i++) {
- int mnemonic = mnemonics [i];
- if (mnemonic != -1) {
- layout.setStyle (mnemonicStyle, mnemonic, mnemonic);
- }
- }
-
- if (useCommonControl()) {
- enableWidget (enabled);
- } else {
- redraw ();
- }
+ parse(string);
}
@Override
@@ -789,15 +568,6 @@ int resolveTextDirection() {
return BidiUtil.resolveTextDirection(text);
}
-void styleLinkParts(boolean enabled) {
- TextStyle linkStyle = new TextStyle (null, enabled ? internalGetLinkForeground() : disabledColor, null);
- linkStyle.underline = true;
- for (int i = 0; i < offsets.length; i++) {
- Point point = offsets [i];
- layout.setStyle (linkStyle, point.x, point.y);
- }
-}
-
@Override
boolean updateTextDirection(int textDirection) {
if (super.updateTextDirection(textDirection)) {
@@ -812,14 +582,6 @@ boolean updateTextDirection(int textDirection) {
return false;
}
-boolean useCommonControl() {
- return useCommonControl(OS.IsWindowEnabled(handle));
-}
-
-boolean useCommonControl(boolean enabled) {
- return linkForeground == -1 && !enabled;
-}
-
@Override
int widgetStyle () {
int bits = super.widgetStyle ();
@@ -832,195 +594,72 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return LinkProc;
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
- if (!useCommonControl()) {
- if (focusIndex == -1) return result;
- switch ((int)/*64*/wParam) {
- case ' ':
- case SWT.CR:
- Event event = new Event ();
- event.text = ids [focusIndex];
- sendSelectionEvent (SWT.Selection, event, true);
- break;
- case SWT.TAB:
- boolean next = OS.GetKeyState (OS.VK_SHIFT) >= 0;
- if (next) {
- if (focusIndex < offsets.length - 1) {
- focusIndex++;
- redraw ();
- }
- } else {
- if (focusIndex > 0) {
- focusIndex--;
- redraw ();
- }
- }
- break;
- }
- } else {
- switch ((int)/*64*/wParam) {
- case ' ':
- case SWT.CR:
- case SWT.TAB:
- /*
- * NOTE: Call the window proc with WM_KEYDOWN rather than WM_CHAR
- * so that the key that was ignored during WM_KEYDOWN is processed.
- * This allows the application to cancel an operation that is normally
- * performed in WM_KEYDOWN from WM_CHAR.
- */
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
- return new LRESULT (code);
- }
-
+ switch ((int)wParam) {
+ case SWT.SPACE:
+ case SWT.CR:
+ case SWT.TAB:
+ /*
+ * NOTE: Call the window proc with WM_KEYDOWN rather than WM_CHAR
+ * so that the key that was ignored during WM_KEYDOWN is processed.
+ * This allows the application to cancel an operation that is normally
+ * performed in WM_KEYDOWN from WM_CHAR.
+ */
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ return new LRESULT (code);
}
return result;
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
- if (result != null) return result;
- int index, count;
- long /*int*/ code = 0;
- if (useCommonControl()) {
- LITEM item = new LITEM ();
- item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
- item.stateMask = OS.LIS_FOCUSED;
- index = 0;
- while (OS.SendMessage (handle, OS.LM_GETITEM, 0, item) != 0) {
- if ((item.state & OS.LIS_FOCUSED) != 0) {
- index = item.iLink;
- }
- item.iLink++;
- }
- count = item.iLink;
- code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
- } else {
- index = focusIndex;
- count = offsets.length;
- }
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
+ long code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+ int count = ids.length;
if (count == 0) {
- return new LRESULT (code | OS.DLGC_STATIC);
- }
- boolean next = OS.GetKeyState (OS.VK_SHIFT) >= 0;
- if (next && index < count - 1) {
- return new LRESULT (code | OS.DLGC_WANTTAB);
- }
- if (!next && index > 0) {
- return new LRESULT (code | OS.DLGC_WANTTAB);
+ code |= OS.DLGC_STATIC;
+ } else if (count > 1) {
+ int limit = (OS.GetKeyState (OS.VK_SHIFT) < 0) ? 0 : count - 1;
+ if (getFocusItem() != limit) {
+ code |= OS.DLGC_WANTTAB;
+ }
}
- return result;
+ return new LRESULT (code);
}
@Override
-LRESULT WM_GETFONT (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_GETFONT (wParam, lParam);
- if (result != null) return result;
- long /*int*/ code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam);
- if (code != 0) return new LRESULT (code);
- if (font == 0) font = defaultFont ();
- return new LRESULT (font);
-}
-
-@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- if (useCommonControl()) {
- switch ((int)/*64*/wParam) {
- case OS.VK_SPACE:
- case OS.VK_RETURN:
- case OS.VK_TAB:
- /*
- * Ensure that the window proc does not process VK_SPACE,
- * VK_RETURN or VK_TAB so that it can be handled in WM_CHAR.
- * This allows the application to cancel an operation that
- * is normally performed in WM_KEYDOWN from WM_CHAR.
- */
- return LRESULT.ZERO;
- }
- }
- return result;
-}
-
-@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
- if (!useCommonControl()) redraw ();
- return result;
-}
-
-@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
- if (result == LRESULT.ZERO) return result;
- if (!useCommonControl()) {
- if (focusIndex != -1) setFocus ();
- int x = OS.GET_X_LPARAM (lParam);
- int y = OS.GET_Y_LPARAM (lParam);
- int offset = layout.getOffset (DPIUtil.autoScaleDown(x), DPIUtil.autoScaleDown(y), null);
- int oldSelectionX = selection.x;
- int oldSelectionY = selection.y;
- selection.x = offset;
- selection.y = -1;
- if (oldSelectionX != -1 && oldSelectionY != -1) {
- if (oldSelectionX > oldSelectionY) {
- int temp = oldSelectionX;
- oldSelectionX = oldSelectionY;
- oldSelectionY = temp;
- }
- Rectangle rect = DPIUtil.autoScaleUp(layout.getBounds (oldSelectionX, oldSelectionY)); // To Pixels
- redrawInPixels (rect.x, rect.y, rect.width, rect.height, false);
- }
- for (int j = 0; j < offsets.length; j++) {
- Rectangle [] rects = getRectanglesInPixels (j);
- for (int i = 0; i < rects.length; i++) {
- Rectangle rect = rects [i];
- if (rect.contains (x, y)) {
- if (j != focusIndex) {
- redraw ();
- }
- focusIndex = mouseDownIndex = j;
- return result;
- }
- }
- }
+ switch ((int)wParam) {
+ case OS.VK_SPACE:
+ case OS.VK_RETURN:
+ case OS.VK_TAB:
+ /*
+ * Ensure that the window proc does not process VK_SPACE,
+ * VK_RETURN or VK_TAB so that it can be handled in WM_CHAR.
+ * This allows the application to cancel an operation that
+ * is normally performed in WM_KEYDOWN from WM_CHAR.
+ */
+ return LRESULT.ZERO;
}
return result;
}
@Override
-LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
- if (result == LRESULT.ZERO) return result;
- if (!useCommonControl()) {
- if (mouseDownIndex == -1) return result;
- int x = OS.GET_X_LPARAM (lParam);
- int y = OS.GET_Y_LPARAM (lParam);
- Rectangle [] rects = getRectanglesInPixels (mouseDownIndex);
- for (int i = 0; i < rects.length; i++) {
- Rectangle rect = rects [i];
- if (rect.contains (x, y)) {
- Event event = new Event ();
- event.text = ids [mouseDownIndex];
- sendSelectionEvent (SWT.Selection, event, true);
- break;
- }
- }
- }
- mouseDownIndex = -1;
- return result;
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
+ nextFocusItem = getFocusItem();
+ return super.WM_KILLFOCUS(wParam, lParam);
}
@Override
-LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCHITTEST (long wParam, long lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
@@ -1033,153 +672,69 @@ LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
- if (!useCommonControl()) {
- int x = OS.GET_X_LPARAM (lParam);
- int y = OS.GET_Y_LPARAM (lParam);
- if (OS.GetKeyState (OS.VK_LBUTTON) < 0) {
- int oldSelection = selection.y;
- selection.y = layout.getOffset (DPIUtil.autoScaleDown(x), DPIUtil.autoScaleDown(y), null);
- if (selection.y != oldSelection) {
- int newSelection = selection.y;
- if (oldSelection > newSelection) {
- int temp = oldSelection;
- oldSelection = newSelection;
- newSelection = temp;
- }
- Rectangle rect = DPIUtil.autoScaleUp(layout.getBounds (oldSelection, newSelection));// To Pixels
- redrawInPixels (rect.x, rect.y, rect.width, rect.height, false);
- }
- } else {
- for (int j = 0; j < offsets.length; j++) {
- Rectangle [] rects = getRectanglesInPixels (j);
- for (int i = 0; i < rects.length; i++) {
- Rectangle rect = rects [i];
- if (rect.contains (x, y)) {
- setCursor (display.getSystemCursor (SWT.CURSOR_HAND));
- return result;
- }
- }
- }
- setCursor (null);
- }
- }
- return result;
-}
-
-@Override
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
- if ((state & DISPOSE_SENT) != 0) return LRESULT.ZERO;
- if (useCommonControl()) {
- return super.WM_PAINT (wParam, lParam);
- }
-
- PAINTSTRUCT ps = new PAINTSTRUCT ();
- GCData data = new GCData ();
- data.ps = ps;
- data.hwnd = handle;
- GC gc = new_GC (data);
- if (gc != null) {
- int width = ps.right - ps.left;
- int height = ps.bottom - ps.top;
- if (width != 0 && height != 0) {
- RECT rect = new RECT ();
- OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
- drawWidget (gc, rect);
- }
- gc.dispose ();
- }
- return LRESULT.ZERO;
-}
-
-@Override
-LRESULT WM_PRINTCLIENT (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);
- if (!useCommonControl()) {
- RECT rect = new RECT ();
- OS.GetClientRect (handle, rect);
- GCData data = new GCData ();
- data.device = display;
- data.foreground = getForegroundPixel ();
- GC gc = GC.win32_new (wParam, data);
- drawWidget (gc, rect);
- gc.dispose ();
- }
- return result;
-}
-
-@Override
-LRESULT WM_SETCURSOR(long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETCURSOR(long wParam, long lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
- long /*int*/ fDone = callWindowProc (handle, OS.WM_SETCURSOR, wParam, lParam);
+ long fDone = callWindowProc (handle, OS.WM_SETCURSOR, wParam, lParam);
/* Take responsibility for cursor over plain text after overriding WM_NCHITTEST. */
if (fDone == 0) OS.DefWindowProc (handle, OS.WM_SETCURSOR, wParam, lParam);
return LRESULT.ONE;
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_SETFOCUS (wParam, lParam);
- if (!useCommonControl()) redraw ();
- return result;
-}
-
-@Override
-LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
- layout.setFont (Font.win32_new (display, wParam));
- if (lParam != 0) OS.InvalidateRect (handle, null, true);
- return super.WM_SETFONT (font = wParam, lParam);
-}
-
-@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_SIZE (wParam, lParam);
- RECT rect = new RECT ();
- OS.GetClientRect (handle, rect);
- layout.setWidth (DPIUtil.autoScaleDown(rect.right > 0 ? rect.right : -1));
- if (!useCommonControl()) {
- redraw ();
- }
- return result;
-}
-
-@Override
-LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.wmColorChild (wParam, lParam);
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
/*
- * Feature in Windows. When a SysLink is disabled, it does
- * not gray out the non-link portion of the text. The fix
- * is to set the text color to the system gray color.
+ * Feature in Windows. Upon receiving focus, SysLink control
+ * always activates the first link. This leads to surprising
+ * behavior in multi-link controls.
*/
- if (useCommonControl()) {
- if (!OS.IsWindowEnabled (handle)) {
- OS.SetTextColor (wParam, OS.GetSysColor (OS.COLOR_GRAYTEXT));
- if (result == null) {
- int backPixel = getBackgroundPixel ();
- OS.SetBkColor (wParam, backPixel);
- long /*int*/ hBrush = findBrush (backPixel, OS.BS_SOLID);
- return new LRESULT (hBrush);
+ if (ids.length > 1) {
+ if (OS.GetKeyState (OS.VK_TAB) < 0) {
+ if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
+ // reverse tab; focus on last item
+ setFocusItem(ids.length - 1);
}
+ } else if (nextFocusItem > 0) {
+ setFocusItem(nextFocusItem);
}
}
- return result;
+ return super.WM_SETFOCUS (wParam, lParam);
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
- if (useCommonControl()) {
- switch (hdr.code) {
- case OS.NM_RETURN:
- case OS.NM_CLICK:
- NMLINK item = new NMLINK ();
- OS.MoveMemory (item, lParam, NMLINK.sizeof);
- Event event = new Event ();
- event.text = ids [item.iLink];
- sendSelectionEvent (SWT.Selection, event, true);
- break;
- }
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
+ switch (hdr.code) {
+ case OS.NM_RETURN:
+ case OS.NM_CLICK:
+ NMLINK item = new NMLINK ();
+ OS.MoveMemory (item, lParam, NMLINK.sizeof);
+ Event event = new Event ();
+ event.text = ids [item.iLink];
+ sendSelectionEvent (SWT.Selection, event, true);
+ break;
+ case OS.NM_CUSTOMDRAW:
+ NMCUSTOMDRAW nmcd = new NMCUSTOMDRAW ();
+ OS.MoveMemory (nmcd, lParam, NMCUSTOMDRAW.sizeof);
+ switch (nmcd.dwDrawStage) {
+ case OS.CDDS_PREPAINT:
+ if (!OS.IsWindowEnabled (handle) || linkForeground != -1) {
+ return new LRESULT(OS.CDRF_NOTIFYITEMDRAW);
+ }
+ break;
+ case OS.CDDS_ITEMPREPAINT:
+ /*
+ * Feature in Windows. SysLink32 control doesn't natively
+ * provide disabled state. Emulate it with custom draw.
+ */
+ if (!OS.IsWindowEnabled (handle)) {
+ OS.SetTextColor (nmcd.hdc, OS.GetSysColor (OS.COLOR_GRAYTEXT));
+ }
+ else if (linkForeground != -1 && nmcd.dwItemSpec != -1) {
+ OS.SetTextColor(nmcd.hdc, linkForeground);
+ }
+ break;
+ }
+ break;
}
return super.wmNotifyChild (hdr, wParam, lParam);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index 0aa83f7cb3..5de5feaeb3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -43,7 +43,7 @@ import org.eclipse.swt.internal.win32.*;
*/
public class List extends Scrollable {
static final int INSET = 3;
- static final long /*int*/ ListProc;
+ static final long ListProc;
static final TCHAR ListClass = new TCHAR (0, "LISTBOX", true);
boolean addedUCC = false; // indicates whether Bidi UCC were added; 'state & HAS_AUTO_DIRECTION' isn't a sufficient indicator
static {
@@ -106,7 +106,7 @@ public void add (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
if (result == OS.LB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);
if (result == OS.LB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer.chars, true);
@@ -142,10 +142,10 @@ public void add (String string, int index) {
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if (index == -1) error (SWT.ERROR_INVALID_RANGE);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_INSERTSTRING, index, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_INSERTSTRING, index, buffer);
if (result == OS.LB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
if (result == OS.LB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index <= count) {
error (SWT.ERROR_ITEM_NOT_ADDED);
} else {
@@ -188,7 +188,7 @@ public void addSelectionListener(SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
boolean redraw = false;
switch (msg) {
@@ -199,7 +199,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
break;
}
}
- long /*int*/ code = OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
+ long code = OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam);
switch (msg) {
case OS.WM_HSCROLL:
case OS.WM_VSCROLL: {
@@ -222,24 +222,24 @@ static int checkStyle (int style) {
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
if ((style & SWT.H_SCROLL) != 0) {
- width = (int)/*64*/OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
+ width = (int)OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
width -= INSET;
} else {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
char [] buffer = new char [64 + 1];
for (int i=0; i<count; i++) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
+ int length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
if (length != OS.LB_ERR) {
if (length + 1 > buffer.length) {
buffer = new char [length + 1];
}
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
if (result != OS.LB_ERR) {
OS.DrawText (hDC, buffer, length, rect, flags);
width = Math.max (width, rect.right - rect.left);
@@ -251,9 +251,9 @@ static int checkStyle (int style) {
}
}
if (hHint == SWT.DEFAULT) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
- int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
- height = count * itemHeight;
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int itemHeight = (int)OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ height = count * itemHeight;
}
if (width == 0) width = DEFAULT_WIDTH;
if (height == 0) height = DEFAULT_HEIGHT;
@@ -298,18 +298,17 @@ public void deselect (int [] indices) {
if (indices == null) error (SWT.ERROR_NULL_ARGUMENT);
if (indices.length == 0) return;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex == OS.LB_ERR) return;
- for (int i=0; i<indices.length; i++) {
- if (oldIndex == indices [i]) {
+ for (int index : indices) {
+ if (oldIndex == index) {
OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);
return;
}
}
return;
}
- for (int i=0; i<indices.length; i++) {
- int index = indices [i];
+ for (int index : indices) {
if (index != -1) {
OS.SendMessage (handle, OS.LB_SETSEL, 0, index);
}
@@ -332,7 +331,7 @@ public void deselect (int index) {
checkWidget ();
if (index == -1) return;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex == OS.LB_ERR) return;
if (oldIndex == index) OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);
return;
@@ -359,7 +358,7 @@ public void deselect (int start, int end) {
checkWidget ();
if (start > end) return;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex == OS.LB_ERR) return;
if (start <= oldIndex && oldIndex <= end) {
OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);
@@ -372,7 +371,7 @@ public void deselect (int start, int end) {
* start = end, LB_SELITEMRANGEEX deselects the
* item.
*/
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (start < 0 && end < 0) return;
if (start >= count && end >= count) return;
start = Math.min (count - 1, Math.max (0, start));
@@ -410,9 +409,9 @@ public void deselectAll () {
*/
public int getFocusIndex () {
checkWidget ();
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
if (result == 0) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0) return -1;
}
return result;
@@ -435,13 +434,13 @@ public int getFocusIndex () {
*/
public String getItem (int index) {
checkWidget ();
- int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
+ int length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
if (length != OS.LB_ERR) {
char [] buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
if (result != OS.LB_ERR) return ((state & HAS_AUTO_DIRECTION) != 0) ? new String (buffer, 1, length - 1) : new String (buffer, 0, length);
}
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_CANNOT_GET_ITEM);
error (SWT.ERROR_INVALID_RANGE);
return "";
@@ -459,7 +458,7 @@ public String getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_COUNT);
return result;
}
@@ -481,7 +480,7 @@ public int getItemHeight () {
}
int getItemHeightInPixels () {
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_ITEM_HEIGHT);
return result;
}
@@ -549,11 +548,11 @@ public String [] getSelection () {
public int getSelectionCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (result == OS.LB_ERR) return 0;
return 1;
}
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_COUNT);
return result;
}
@@ -572,17 +571,17 @@ public int getSelectionCount () {
public int getSelectionIndex () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- return (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ return (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
}
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
if (count == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_SELECTION);
if (count == 0) return -1;
- int index = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
+ int index = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
if (result == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_SELECTION);
if (result != 0) return index;
int [] buffer = new int[1];
- result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, buffer);
+ result = (int)OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, buffer);
if (result != 1) error (SWT.ERROR_CANNOT_GET_SELECTION);
return buffer [0];
}
@@ -606,14 +605,14 @@ public int getSelectionIndex () {
public int [] getSelectionIndices () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (result == OS.LB_ERR) return new int [0];
return new int [] {result};
}
- int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
+ int length = (int)OS.SendMessage (handle, OS.LB_GETSELCOUNT, 0, 0);
if (length == OS.LB_ERR) error (SWT.ERROR_CANNOT_GET_SELECTION);
int [] indices = new int [length];
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELITEMS, length, indices);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETSELITEMS, length, indices);
if (result != length) error (SWT.ERROR_CANNOT_GET_SELECTION);
return indices;
}
@@ -632,7 +631,7 @@ public int [] getSelectionIndices () {
*/
public int getTopIndex () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ return (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
}
/**
@@ -696,12 +695,12 @@ public int indexOf (String string, int start) {
}
/* Use LB_FINDSTRINGEXACT to search for the item */
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= start && start < count)) return -1;
int index = start - 1, last;
TCHAR buffer = new TCHAR (getCodePage (), string, true);
do {
- index = (int)/*64*/OS.SendMessage (handle, OS.LB_FINDSTRINGEXACT, last = index, buffer);
+ index = (int)OS.SendMessage (handle, OS.LB_FINDSTRINGEXACT, last = index, buffer);
if (index == OS.LB_ERR || index <= last) return -1;
} while (!string.equals (getItem (index)));
return index;
@@ -722,10 +721,15 @@ public int indexOf (String string, int start) {
*/
public boolean isSelected (int index) {
checkWidget ();
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
return (result != 0) && (result != OS.LB_ERR);
}
+@Override
+boolean isUseWsBorder () {
+ return super.isUseWsBorder () || ((display != null) && display.useWsBorderList);
+}
+
/**
* Removes the items from the receiver at the given
* zero-relative indices.
@@ -749,13 +753,13 @@ public void remove (int [] indices) {
System.arraycopy (indices, 0, newIndices, 0, indices.length);
sort (newIndices);
int start = newIndices [newIndices.length - 1], end = newIndices [0];
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
+ long hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -770,13 +774,13 @@ public void remove (int [] indices) {
char [] buffer = null;
int length = 0;
if ((style & SWT.H_SCROLL) != 0) {
- length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
+ length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
if (length == OS.LB_ERR) break;
buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
if (result == OS.LB_ERR) break;
}
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
if (result == OS.LB_ERR) break;
if ((style & SWT.H_SCROLL) != 0) {
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -818,24 +822,24 @@ public void remove (int index) {
checkWidget ();
char [] buffer = null;
if ((style & SWT.H_SCROLL) != 0) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
+ int length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, index, 0);
if (length == OS.LB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETTEXT, index, buffer);
if (result == OS.LB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
}
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_DELETESTRING, index, 0);
if (result == OS.LB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (0 <= index && index < count) error (SWT.ERROR_ITEM_NOT_REMOVED);
error (SWT.ERROR_INVALID_RANGE);
}
@@ -865,7 +869,7 @@ public void remove (int index) {
public void remove (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
@@ -873,9 +877,9 @@ public void remove (int start, int end) {
removeAll ();
return;
}
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT rect = null;
- long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
+ long hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -889,13 +893,13 @@ public void remove (int start, int end) {
char [] buffer = null;
int length = 0;
if ((style & SWT.H_SCROLL) != 0) {
- length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, start, 0);
+ length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, start, 0);
if (length == OS.LB_ERR) break;
buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, start, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETTEXT, start, buffer);
if (result == OS.LB_ERR) break;
}
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_DELETESTRING, start, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_DELETESTRING, start, 0);
if (result == OS.LB_ERR) break;
if ((style & SWT.H_SCROLL) != 0) {
OS.DrawText (hDC, buffer, length, rect, flags);
@@ -941,7 +945,7 @@ public void remove (String string) {
/**
* Removes all of the items from the receiver.
- *
+ *
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
@@ -1041,7 +1045,7 @@ public void select (int index) {
void select (int index, boolean scroll) {
if (index < 0) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (index >= count) return;
if (scroll) {
if ((style & SWT.SINGLE) != 0) {
@@ -1051,7 +1055,7 @@ void select (int index, boolean scroll) {
}
return;
}
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
RECT itemRect = new RECT (), selectedRect = null;
OS.SendMessage (handle, OS.LB_GETITEMRECT, index, itemRect);
boolean redraw = getDrawing () && OS.IsWindowVisible (handle);
@@ -1061,14 +1065,14 @@ void select (int index, boolean scroll) {
}
int focusIndex = -1;
if ((style & SWT.SINGLE) != 0) {
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
if (oldIndex != -1) {
selectedRect = new RECT ();
OS.SendMessage (handle, OS.LB_GETITEMRECT, oldIndex, selectedRect);
}
OS.SendMessage (handle, OS.LB_SETCURSEL, index, 0);
} else {
- focusIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ focusIndex = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
OS.SendMessage (handle, OS.LB_SETSEL, 1, index);
}
if ((style & SWT.MULTI) != 0) {
@@ -1112,7 +1116,7 @@ void select (int index, boolean scroll) {
public void select (int start, int end) {
checkWidget ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -1154,7 +1158,7 @@ public void selectAll () {
void setFocusIndex (int index) {
// checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (!(0 <= index && index < count)) return;
OS.SendMessage (handle, OS.LB_SETCARETINDEX, index, 0);
}
@@ -1210,17 +1214,17 @@ public void setItem (int index, String string) {
public void setItems (String... items) {
checkWidget ();
if (items == null) error (SWT.ERROR_NULL_ARGUMENT);
- for (int i=0; i<items.length; i++) {
- if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
+ for (String item : items) {
+ if (item == null) error (SWT.ERROR_INVALID_ARGUMENT);
}
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, ListProc);
boolean redraw = getDrawing () && OS.IsWindowVisible (handle);
if (redraw) {
OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
}
RECT rect = null;
- long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
+ long hDC = 0, oldFont = 0, newFont = 0;
int newWidth = 0;
if ((style & SWT.H_SCROLL) != 0) {
rect = new RECT ();
@@ -1237,7 +1241,7 @@ public void setItems (String... items) {
while (index < length) {
String string = items [index];
TCHAR buffer = new TCHAR (cp, string, true);
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);
if (result == OS.LB_ERR || result == OS.LB_ERRSPACE) break;
if ((style & SWT.H_SCROLL) != 0) {
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1271,17 +1275,17 @@ public void setItems (String... items) {
void setScrollWidth () {
int newWidth = 0;
RECT rect = new RECT ();
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
for (int i=0; i<count; i++) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
+ int length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);
if (length != OS.LB_ERR) {
char [] buffer = new char [length + 1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);
if (result != OS.LB_ERR) {
OS.DrawText (hDC, buffer, length, rect, flags);
newWidth = Math.max (newWidth, rect.right - rect.left);
@@ -1295,8 +1299,8 @@ void setScrollWidth () {
void setScrollWidth (char[] buffer, boolean grow) {
RECT rect = new RECT ();
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
@@ -1308,7 +1312,7 @@ void setScrollWidth (char[] buffer, boolean grow) {
void setScrollWidth (int newWidth, boolean grow) {
newWidth += INSET;
- int width = (int)/*64*/OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
+ int width = (int)OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);
if (grow) {
if (newWidth <= width) return;
OS.SendMessage (handle, OS.LB_SETHORIZONTALEXTENT, newWidth, 0);
@@ -1456,7 +1460,7 @@ public void setSelection (int start, int end) {
checkWidget ();
deselectAll ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -1482,9 +1486,9 @@ public void setSelection (int start, int end) {
*/
public void setTopIndex (int index) {
checkWidget ();
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0);
+ int result = (int)OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0);
if (result == OS.LB_ERR) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
index = Math.min (count - 1, Math.max (0, index));
OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0);
}
@@ -1504,21 +1508,21 @@ public void showSelection () {
checkWidget ();
int index;
if ((style & SWT.SINGLE) != 0) {
- index = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ index = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
} else {
int [] indices = new int [1];
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, indices);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, indices);
index = indices [0];
if (result != 1) index = -1;
}
if (index == -1) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == 0) return;
- int height = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ int height = (int)OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
int visibleCount = Math.max (rect.bottom / height, 1);
int bottomIndex = Math.min (topIndex + visibleCount, count) - 1;
if (topIndex <= index && index <= bottomIndex) return;
@@ -1533,18 +1537,18 @@ void updateMenuLocation (Event event) {
int focusIndex = getFocusIndex();
if (focusIndex != -1) {
RECT rect = new RECT ();
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
char [] buffer = new char [64 + 1];
- int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, focusIndex, 0);
+ int length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, focusIndex, 0);
if (length != OS.LB_ERR) {
if (length + 1 > buffer.length) {
buffer = new char [length + 1];
}
- int result = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXT, focusIndex, buffer);
+ int result = (int)OS.SendMessage (handle, OS.LB_GETTEXT, focusIndex, buffer);
if (result != OS.LB_ERR) {
OS.DrawText (hDC, buffer, length, rect, flags);
}
@@ -1574,12 +1578,12 @@ boolean updateTextDirection (int textDirection) {
return super.updateTextDirection (textDirection);
}
}
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == OS.LB_ERR) return false;
- int selection = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
+ int selection = (int)OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
addedUCC = false;
while (count-- > 0) {
- int length = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTEXTLEN, count, 0);
+ int length = (int)OS.SendMessage (handle, OS.LB_GETTEXTLEN, count, 0);
if (length == OS.LB_ERR) break;
if (length == 0) continue;
char [] buffer = new char [length + 1];
@@ -1615,12 +1619,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return ListProc;
}
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
/* Below code is to support auto text direction. */
if (handle != 0 && lParam != 0 && (state & HAS_AUTO_DIRECTION) != 0) {
switch (msg) {
@@ -1643,11 +1647,11 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
string = (direction == SWT.RIGHT_TO_LEFT ? RLE : LRE) + string;
buffer = new TCHAR (cp, string, true);
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
length = buffer.length() * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, length);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, length);
OS.MoveMemory (pszText, buffer, length);
- long /*int*/ code = super.windowProc (hwnd, msg, wParam, pszText);
+ long code = super.windowProc (hwnd, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
addedUCC = true;
return code;
@@ -1657,7 +1661,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -1669,10 +1673,10 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.GetKeyState (OS.VK_CONTROL) < 0 && OS.GetKeyState (OS.VK_SHIFT) >= 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.LBS_EXTENDEDSEL) != 0) {
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_SPACE: {
- int index = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
- int code = (int)/*64*/OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
+ int index = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int code = (int)OS.SendMessage (handle, OS.LB_GETSEL, index, 0);
if (code == OS.LB_ERR) break;
OS.SendMessage (handle, OS.LB_SETSEL, code != 0 ? 0 : 1, index);
OS.SendMessage (handle, OS.LB_SETANCHORINDEX, index, 0);
@@ -1686,7 +1690,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
/*
@@ -1699,7 +1703,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.LBS_EXTENDEDSEL) != 0) {
int newIndex = -1;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_SPACE: {
/*
* Ensure that the window proc does not process VK_SPACE
@@ -1711,32 +1715,32 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
case OS.VK_UP:
case OS.VK_DOWN: {
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
- newIndex = Math.max (0, oldIndex + (((int)/*64*/wParam) == OS.VK_UP ? -1 : 1));
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ newIndex = Math.max (0, oldIndex + (((int)wParam) == OS.VK_UP ? -1 : 1));
break;
}
case OS.VK_PRIOR: {
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
if (oldIndex != topIndex) {
newIndex = topIndex;
} else {
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ int itemHeight = (int)OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
int pageSize = Math.max (2, (rect.bottom / itemHeight));
newIndex = Math.max (0, topIndex - (pageSize - 1));
}
break;
}
case OS.VK_NEXT: {
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
- int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
+ int itemHeight = (int)OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
int pageSize = Math.max (2, (rect.bottom / itemHeight));
int bottomIndex = topIndex + pageSize - 1;
if (oldIndex != bottomIndex) {
@@ -1744,7 +1748,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
} else {
newIndex = bottomIndex + pageSize - 1;
}
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count != OS.LB_ERR) newIndex = Math.min (count - 1, newIndex);
break;
}
@@ -1753,7 +1757,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
break;
}
case OS.VK_END: {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
if (count == OS.LB_ERR) break;
newIndex = count - 1;
break;
@@ -1767,7 +1771,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* the focus indicator changes as a result of something
* the user types.
*/
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) != 0) {
OS.SendMessage (handle, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
/*
@@ -1778,7 +1782,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* control.
*/
RECT itemRect = new RECT ();
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
OS.SendMessage (handle, OS.LB_GETITEMRECT, oldIndex, itemRect);
OS.InvalidateRect (handle, itemRect, true);
}
@@ -1791,7 +1795,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETREDRAW (long wParam, long lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -1805,7 +1809,7 @@ LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
/*
* Bug in Windows. If the top index is changed while the
* list is being resized, Windows does not redraw properly
@@ -1818,7 +1822,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
* is to redraw the control when the horizontal scroll bar is
* not at the beginning.
*/
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
LRESULT result = super.WM_SIZE (wParam, lParam);
if (!isDisposed ()) {
SCROLLINFO info = new SCROLLINFO ();
@@ -1827,14 +1831,14 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.GetScrollInfo (handle, OS.SB_HORZ, info)) {
if (info.nPos != 0) OS.InvalidateRect (handle, null, true);
}
- int newIndex = (int)/*64*/OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
+ int newIndex = (int)OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0);
if (oldIndex != newIndex) OS.InvalidateRect (handle, null, true);
}
return result;
}
@Override
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.LBN_SELCHANGE:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index 3a7bb7164b..a4d73580b1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
@@ -55,11 +55,10 @@ public class Menu extends Widget {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
int x, y;
- long /*int*/ hBrush;
- int id0, id1;
+ long hBrush;
int foreground = -1, background = -1;
Image backgroundImage;
boolean hasLocation;
@@ -195,31 +194,16 @@ public Menu (MenuItem parentItem) {
this (checkNull (parentItem).parent);
}
-Menu (Decorations parent, int style, long /*int*/ handle) {
+Menu (Decorations parent, int style, long handle) {
super (parent, checkStyle (style));
this.parent = parent;
this.handle = handle;
- /*
- * Bug in IBM JVM 1.3.1. For some reason, when the checkOrientation() is
- * called from createWidget(), the JVM issues this error:
- *
- * JVM Exception 0x2 (subcode 0x0) occurred in thread "main" (TID:0x9F19D8)
- *
- * In addition, on Windows XP, a dialog appears with following error message,
- * indicating that the problem may be in the JIT:
- *
- * AppName: java.exe AppVer: 0.0.0.0 ModName: jitc.dll
- * ModVer: 0.0.0.0 Offset: 000b6912
- *
- * The fix is to call checkOrientation() from here.
- */
- checkOrientation (parent);
createWidget ();
}
void _setVisible (boolean visible) {
if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- long /*int*/ hwndParent = parent.handle;
+ long hwndParent = parent.handle;
if (visible) {
int flags = OS.TPM_LEFTBUTTON;
if (OS.GetKeyState (OS.VK_LBUTTON) >= 0) flags |= OS.TPM_RIGHTBUTTON;
@@ -264,7 +248,7 @@ void _setVisible (boolean visible) {
* is not returned to the focus control. This causes confusion for AT users.
* The fix is to explicitly set the accessibility focus back to the focus control.
*/
- long /*int*/ hFocus = OS.GetFocus();
+ long hFocus = OS.GetFocus();
if (hFocus != 0) {
OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, hFocus, OS.OBJID_CLIENT, 0);
}
@@ -350,6 +334,7 @@ void createHandle () {
handle = OS.CreatePopupMenu ();
}
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+ updateBackground ();
}
void createItem (MenuItem item, int index) {
@@ -368,8 +353,8 @@ void createItem (MenuItem item, int index) {
* becomes unexpectedly disabled. The fix is to insert a
* space.
*/
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, 4);
+ long hHeap = OS.GetProcessHeap ();
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, 4);
OS.MoveMemory (pszText, new char [] {' ', '\0'}, 4);
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
@@ -384,25 +369,25 @@ void createItem (MenuItem item, int index) {
display.removeMenuItem (item);
error (SWT.ERROR_ITEM_NOT_ADDED);
}
+
+ if (needsMenuCallback()) {
+ /*
+ * Bug in Windows: when MIIM_BITMAP is used together with MFT_STRING,
+ * InsertMenuItem() fails. The workaround is to set MIIM_BITMAP with
+ * a separate SetMenuItemInfo().
+ */
+
+ info.fMask = OS.MIIM_BITMAP;
+ info.hbmpItem = OS.HBMMENU_CALLBACK;
+ OS.SetMenuItemInfo (handle, index, true, info);
+ }
+
redraw ();
}
void createWidget () {
- /*
- * Bug in IBM JVM 1.3.1. For some reason, when the following code is called
- * from this method, the JVM issues this error:
- *
- * JVM Exception 0x2 (subcode 0x0) occurred in thread "main" (TID:0x9F19D8)
- *
- * In addition, on Windows XP, a dialog appears with following error message,
- * indicating that the problem may be in the JIT:
- *
- * AppName: java.exe AppVer: 0.0.0.0 ModName: jitc.dll
- * ModVer: 0.0.0.0 Offset: 000b6912
- *
- * The fix is to move the code to the caller of this method.
- */
-// checkOrientation (parent);
+ checkOrientation (parent);
+ initThemeColors ();
createHandle ();
parent.addMenu (this);
}
@@ -429,7 +414,7 @@ void destroyItem (MenuItem item) {
@Override
void destroyWidget () {
MenuItem cascade = this.cascade;
- long /*int*/ hMenu = handle;
+ long hMenu = handle;
releaseHandle ();
if (cascade != null) {
cascade.setMenu (null, true);
@@ -442,9 +427,8 @@ void fixMenus (Decorations newParent) {
if (isDisposed()) {
return;
}
- MenuItem [] items = getItems ();
- for (int i=0; i<items.length; i++) {
- items [i].fixMenus (newParent);
+ for (MenuItem item : getItems ()) {
+ item.fixMenus (newParent);
}
parent.removeMenu (this);
newParent.addMenu (this);
@@ -511,7 +495,7 @@ void fixMenus (Decorations newParent) {
if (parent.menuBar != this) {
return new Rectangle (0, 0, 0, 0);
}
- long /*int*/ hwndShell = parent.handle;
+ long hwndShell = parent.handle;
MENUBARINFO info = new MENUBARINFO ();
info.cbSize = MENUBARINFO.sizeof;
if (OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 0, info)) {
@@ -620,7 +604,7 @@ public MenuItem getItem (int index) {
if (!OS.GetMenuItemInfo (handle, index, true, info)) {
error (SWT.ERROR_INVALID_RANGE);
}
- id = (int)/*64*/info.dwItemData;
+ id = (int)info.dwItemData;
return display.getMenuItem (id);
}
@@ -673,7 +657,7 @@ public MenuItem [] getItems () {
System.arraycopy (items, 0, newItems, 0, count);
items = newItems;
}
- MenuItem item = display.getMenuItem ((int)/*64*/info.dwItemData);
+ MenuItem item = display.getMenuItem ((int)info.dwItemData);
if (item != null) items [count++] = item;
index++;
}
@@ -811,8 +795,8 @@ public boolean getVisible () {
if ((style & SWT.POP_UP) != 0) {
Menu [] popups = display.popups;
if (popups == null) return false;
- for (int i=0; i<popups.length; i++) {
- if (popups [i] == this) return true;
+ for (Menu popup : popups) {
+ if (popup == this) return true;
}
}
Shell shell = getShell ();
@@ -862,6 +846,13 @@ public int indexOf (MenuItem item) {
return -1;
}
+void initThemeColors () {
+ if ((style & SWT.BAR) != 0) {
+ foreground = display.menuBarForegroundPixel;
+ background = display.menuBarBackgroundPixel;
+ }
+}
+
/**
* Returns <code>true</code> if the receiver is enabled and all
* of the receiver's ancestors are enabled, and <code>false</code>
@@ -905,6 +896,34 @@ public boolean isVisible () {
return getVisible ();
}
+
+boolean needsMenuCallback() {
+ /*
+ * Note: using `HBMMENU_CALLBACK` disables XP theme for entire menu
+ * containing the menu item. This has at least the following side
+ * effects:
+ * 1) Menu bar: items are no longer highlighted when mouse hovers
+ * 2) Menu bar: text is now left-aligned without any margin
+ * 3) Popup menu: Images and checkboxes are no longer merged into a single column
+ */
+
+ if ((background != -1) || (backgroundImage != null)) {
+ /*
+ * Since XP theming, `MENUINFO.hbrBack` has two issues:
+ * 1) Menu bar completely ignores it
+ * 2) Popup menus ignore it for image/checkbox area
+ * The workaround is to disable XP theme via `HBMMENU_CALLBACK`.
+ */
+ return true;
+ }
+
+ /*
+ * Otherwise, if menu has foreground color configured, use
+ * `HBMMENU_CALLBACK` to set color in `MenuItem.wmDrawChild` callback.
+ */
+ return (foreground != -1);
+}
+
void redraw () {
if (!isVisible ()) return;
if ((style & SWT.BAR) != 0) {
@@ -923,9 +942,7 @@ void releaseHandle () {
@Override
void releaseChildren (boolean destroy) {
- MenuItem [] items = getItems ();
- for (int i=0; i<items.length; i++) {
- MenuItem item = items [i];
+ for (MenuItem item : getItems ()) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -1009,9 +1026,7 @@ public void removeMenuListener (MenuListener listener) {
@Override
void reskinChildren (int flags) {
- MenuItem [] items = getItems ();
- for (int i=0; i<items.length; i++) {
- MenuItem item = items [i];
+ for (MenuItem item : getItems ()) {
item.reskin (flags);
}
super.reskinChildren (flags);
@@ -1232,21 +1247,20 @@ public void setLocation (Point location) {
* @since 3.7
*/
public void setOrientation (int orientation) {
- checkWidget ();
- if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- _setOrientation (orientation);
+ checkWidget ();
+ if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
+ _setOrientation (orientation);
}
void _setOrientation (int orientation) {
- int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
- if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
- style &= ~flags;
- style |= orientation & flags;
- style &= ~SWT.FLIP_TEXT_DIRECTION;
- MenuItem [] itms = getItems ();
- for (int i=0; i<itms.length; i++) {
- itms [i].setOrientation (orientation);
- }
+ int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
+ if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
+ style &= ~flags;
+ style |= orientation & flags;
+ style &= ~SWT.FLIP_TEXT_DIRECTION;
+ for (MenuItem itm : getItems ()) {
+ itm.setOrientation (orientation);
+ }
}
/**
@@ -1282,9 +1296,7 @@ void update () {
return;
}
boolean hasCheck = false, hasImage = false;
- MenuItem [] items = getItems ();
- for (int i=0; i<items.length; i++) {
- MenuItem item = items [i];
+ for (MenuItem item : getItems ()) {
if (item.image != null) {
if ((hasImage = true) && hasCheck) break;
}
@@ -1309,11 +1321,12 @@ void update () {
void updateBackground () {
if (hBrush != 0) OS.DeleteObject (hBrush);
hBrush = 0;
- if (backgroundImage != null) {
+
+ if (backgroundImage != null)
hBrush = OS.CreatePatternBrush (backgroundImage.handle);
- } else {
- if (background != -1) hBrush = OS.CreateSolidBrush (background);
- }
+ else if (background != -1)
+ hBrush = OS.CreateSolidBrush (background);
+
MENUINFO lpcmi = new MENUINFO ();
lpcmi.cbSize = MENUINFO.sizeof;
lpcmi.fMask = OS.MIM_BACKGROUND;
@@ -1334,7 +1347,7 @@ void updateForeground () {
redraw ();
}
-LRESULT wmTimer (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmTimer (long wParam, long lParam) {
if (wParam == ID_TOOLTIP_TIMER) {
POINT pt = new POINT ();
OS.GetCursorPos (pt);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
index 97138d6755..eb61d275a8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -41,7 +41,7 @@ import org.eclipse.swt.internal.win32.*;
*/
public class MenuItem extends Item {
Menu parent, menu;
- long /*int*/ hBitmap;
+ long hBitmap;
int id, accelerator, userId, index;
ToolTip itemToolTip;
/* Image margin. */
@@ -267,7 +267,7 @@ boolean fillAccel (ACCEL accel) {
if (key == 0) return false;
vKey = OS.VkKeyScan ((short) key);
if (vKey == -1) {
- if (key != (int)/*64*/OS.CharUpper ((short) key)) {
+ if (key != (int)OS.CharUpper ((short) key)) {
fVirt = 0;
}
} else {
@@ -330,7 +330,7 @@ public int getAccelerator () {
if (shell.menuBar != parent) {
return new Rectangle (0, 0, 0, 0);
}
- long /*int*/ hwndShell = shell.handle;
+ long hwndShell = shell.handle;
MENUBARINFO info1 = new MENUBARINFO ();
info1.cbSize = MENUBARINFO.sizeof;
if (!OS.GetMenuBarInfo (hwndShell, OS.OBJID_MENU, 1, info1)) {
@@ -347,7 +347,7 @@ public int getAccelerator () {
int height = info2.bottom - info2.top;
return new Rectangle (x, y, width, height);
} else {
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
RECT rect1 = new RECT ();
if (!OS.GetMenuItemRect (0, hMenu, 0, rect1)) {
return new Rectangle (0, 0, 0, 0);
@@ -390,7 +390,7 @@ public boolean getEnabled () {
if ((style & SWT.SEPARATOR) != 0) {
return (state & DISABLED) == 0;
}
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -474,7 +474,7 @@ public Menu getParent () {
public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -497,11 +497,11 @@ public boolean getSelection () {
*/
public String getToolTipText () {
checkWidget();
- return (itemToolTip == null) ? null : itemToolTip.getMessage();
+ return (itemToolTip == null || itemToolTip.isDisposed()) ? null : itemToolTip.getMessage();
}
void hideToolTip () {
- if (itemToolTip == null) return;
+ if (itemToolTip == null || itemToolTip.isDisposed()) return;
itemToolTip.setVisible (false);
}
@@ -556,6 +556,11 @@ void releaseWidget () {
parent.destroyAccelerators ();
}
accelerator = 0;
+ if (itemToolTip!= null && !itemToolTip.isDisposed()) {
+ itemToolTip.setVisible (false);
+ itemToolTip.dispose();
+ itemToolTip = null;
+ }
display.removeMenuItem (this);
}
@@ -700,7 +705,7 @@ public void setEnabled (boolean enabled) {
state |= DISABLED;
}
}
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -762,10 +767,7 @@ public void setID (int id) {
* <p>
* Note: This operation is a <em>HINT</em> and is not supported on
* platforms that do not have this concept (for example, Windows NT).
- * Furthermore, some platforms (such as GTK2), cannot display both
- * a check box and an image at the same time. Instead, they hide
- * the image and display the check box. Some platforms (such as GTK3)
- * support images alongside check boxes.
+ * Some platforms (such as GTK3) support images alongside check boxes.
* </p>
*
* @param image the image to display on the receiver (may be null)
@@ -778,12 +780,13 @@ public void setID (int id) {
@Override
public void setImage (Image image) {
checkWidget ();
+ if (this.image == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
super.setImage (image);
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_BITMAP;
- if (parent.foreground != -1) {
+ if (parent.needsMenuCallback()) {
info.hbmpItem = OS.HBMMENU_CALLBACK;
} else {
if (OS.IsAppThemed ()) {
@@ -793,7 +796,7 @@ public void setImage (Image image) {
info.hbmpItem = image != null ? OS.HBMMENU_CALLBACK : 0;
}
}
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
OS.SetMenuItemInfo (hMenu, id, false, info);
parent.redraw ();
}
@@ -850,7 +853,7 @@ void setMenu (Menu menu, boolean dispose) {
if (oldMenu != null) oldMenu.cascade = null;
this.menu = menu;
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_DATA;
@@ -861,9 +864,9 @@ void setMenu (Menu menu, boolean dispose) {
}
if (info.dwItemData != id) return;
int cch = 128;
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int byteCount = cch * 2;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
info.fMask = OS.MIIM_STATE | OS.MIIM_ID | OS.MIIM_DATA;
/*
* Bug in Windows. When GetMenuItemInfo() is used to get the text,
@@ -913,13 +916,13 @@ boolean setRadioSelection (boolean value) {
}
void setOrientation (int orientation) {
- long /*int*/ hMenu = parent.handle;
- MENUITEMINFO info = new MENUITEMINFO ();
- info.cbSize = MENUITEMINFO.sizeof;
- info.fMask = OS.MIIM_FTYPE;
- info.fType = widgetStyle ();
- OS.SetMenuItemInfo (hMenu, id, false, info);
- if (menu != null) menu._setOrientation (orientation);
+ long hMenu = parent.handle;
+ MENUITEMINFO info = new MENUITEMINFO ();
+ info.cbSize = MENUITEMINFO.sizeof;
+ info.fMask = OS.MIIM_FTYPE;
+ info.fType = widgetStyle ();
+ OS.SetMenuItemInfo (hMenu, id, false, info);
+ if (menu != null) menu._setOrientation (orientation);
}
/**
@@ -938,7 +941,7 @@ void setOrientation (int orientation) {
public void setSelection (boolean selected) {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_STATE;
@@ -1008,13 +1011,12 @@ public void setText (String string) {
if ((style & SWT.SEPARATOR) != 0) return;
if (text.equals (string)) return;
super.setText (string);
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pszText = 0;
+ long hHeap = OS.GetProcessHeap ();
+ long pszText = 0;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
- /* Use the character encoding for the default locale */
TCHAR buffer = new TCHAR (0, string, true);
int byteCount = buffer.length () * TCHAR.sizeof;
pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -1069,20 +1071,24 @@ public void setToolTipText (String toolTip) {
checkWidget ();
if (toolTip == null && itemToolTip != null) {
- itemToolTip.setVisible (false);
+ if(!itemToolTip.isDisposed()) {
+ itemToolTip.setVisible (false);
+ itemToolTip.dispose();
+ }
itemToolTip = null;
}
if (toolTip == null || toolTip.trim().length() == 0
|| (itemToolTip != null && toolTip.equals(itemToolTip.getMessage()))) return;
+ if (itemToolTip != null) itemToolTip.dispose();
itemToolTip = new MenuItemToolTip (this.getParent().getShell());
itemToolTip.setMessage (toolTip);
itemToolTip.setVisible (false);
}
void showTooltip (int x, int y) {
- if (itemToolTip == null) return;
+ if (itemToolTip == null || itemToolTip.isDisposed()) return;
itemToolTip.setLocationInPixels (x, y);
itemToolTip.setVisible (true);
}
@@ -1104,7 +1110,7 @@ int widgetStyle () {
return bits | OS.MFT_STRING;
}
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
if ((style & SWT.CHECK) != 0) {
setSelection (!getSelection ());
} else {
@@ -1120,7 +1126,7 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmDrawChild (long wParam, long lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
if (image != null) {
@@ -1143,9 +1149,28 @@ LRESULT wmDrawChild (long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMeasureChild (long wParam, long lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
+
+ if ((parent.style & SWT.BAR) != 0) {
+ if (parent.needsMenuCallback()) {
+ /*
+ * Weirdness in Windows. Setting `HBMMENU_CALLBACK` causes
+ * item sizes to mean something else. It seems that it is
+ * the size of left margin before the text. At the same time,
+ * if menu item has a mnemonic, it's always drawn at a fixed
+ * position. I have tested on Win7, Win8.1, Win10 and found
+ * that value of 5 works well in matching text to mnemonic.
+ * NOTE: autoScaleUpUsingNativeDPI() is used to avoid problems
+ * with applications that disable automatic scaling.
+ */
+ struct.itemWidth = DPIUtil.autoScaleUpUsingNativeDPI(5);
+ OS.MoveMemory (lParam, struct, MEASUREITEMSTRUCT.sizeof);
+ return null;
+ }
+ }
+
int width = 0, height = 0;
if (image != null) {
Rectangle rect = image.getBoundsInPixels ();
@@ -1165,12 +1190,10 @@ LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
MENUINFO lpcmi = new MENUINFO ();
lpcmi.cbSize = MENUINFO.sizeof;
lpcmi.fMask = OS.MIM_STYLE;
- long /*int*/ hMenu = parent.handle;
+ long hMenu = parent.handle;
OS.GetMenuInfo (hMenu, lpcmi);
if ((lpcmi.dwStyle & OS.MNS_CHECKORBMP) == 0) {
- MenuItem [] items = parent.getItems ();
- for (int i=0; i<items.length; i++) {
- MenuItem item = items [i];
+ for (MenuItem item : parent.getItems ()) {
if (item.image != null) {
Rectangle rect = item.image.getBoundsInPixels ();
width = Math.max (width, rect.width);
@@ -1190,10 +1213,11 @@ private static final class MenuItemToolTip extends ToolTip {
public MenuItemToolTip(Shell parent) {
super(parent, 0);
+ maybeEnableDarkSystemTheme(hwndToolTip ());
}
@Override
- long /*int*/ hwndToolTip() {
+ long hwndToolTip() {
return parent.menuItemToolTipHandle();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
index 4c045bd894..cae28106ed 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java
@@ -14,8 +14,8 @@
package org.eclipse.swt.widgets;
-import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.*;
+import org.eclipse.swt.internal.win32.*;
/**
* Instances of this class are used to inform or warn the user.
@@ -186,7 +186,7 @@ public int open () {
* anyway and not rely on MB_MODAL to work by making the
* parent be temporarily modal.
*/
- long /*int*/ hwndOwner = parent != null ? parent.handle : 0;
+ long hwndOwner = parent != null ? parent.handle : 0;
Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
Dialog oldModal = null;
if ((bits & OS.MB_TASKMODAL) != 0) {
@@ -196,10 +196,11 @@ public int open () {
/* Open the message box */
display.sendPreExternalEventDispatchEvent ();
- /* Use the character encoding for the default locale */
TCHAR buffer1 = new TCHAR (0, message, true);
TCHAR buffer2 = new TCHAR (0, title, true);
+ display.externalEventLoop = true;
int code = OS.MessageBox (hwndOwner, buffer1, buffer2, bits);
+ display.externalEventLoop = false;
display.sendPostExternalEventDispatchEvent ();
/* Clear the temporarily dialog modal parent */
@@ -207,14 +208,6 @@ public int open () {
display.setModalDialog (oldModal);
}
- /*
- * This code is intentionally commented. On some
- * platforms, the owner window is repainted right
- * away when a dialog window exits. This behavior
- * is currently unspecified.
- */
-// if (hwndOwner != 0) OS.UpdateWindow (hwndOwner);
-
/* Compute and return the result */
if (code != 0) {
int type = bits & 0x0F;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
index 739c790e01..88124e9178 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
@@ -43,7 +43,7 @@ public class ProgressBar extends Control {
static final int DELAY = 100;
static final int TIMER_ID = 100;
static final int MINIMUM_WIDTH = 100;
- static final long /*int*/ ProgressBarProc;
+ static final long ProgressBarProc;
static final TCHAR ProgressBarClass = new TCHAR (0, OS.PROGRESS_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -108,7 +108,7 @@ public ProgressBar (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (ProgressBarProc, hwnd, msg, wParam, lParam);
}
@@ -137,6 +137,12 @@ static int checkStyle (int style) {
@Override
void createHandle () {
super.createHandle ();
+
+ if (display.progressbarUseColors) {
+ char[] noTheme = new char[]{0};
+ OS.SetWindowTheme(handle, noTheme, noTheme);
+ }
+
startTimer ();
}
@@ -157,7 +163,7 @@ int defaultForeground () {
*/
public int getMaximum () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
+ return (int)OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
}
/**
@@ -172,7 +178,7 @@ public int getMaximum () {
*/
public int getMinimum () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
+ return (int)OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
}
/**
@@ -187,7 +193,7 @@ public int getMinimum () {
*/
public int getSelection () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.PBM_GETPOS, 0, 0);
+ return (int)OS.SendMessage (handle, OS.PBM_GETPOS, 0, 0);
}
/**
@@ -209,7 +215,7 @@ public int getSelection () {
*/
public int getState () {
checkWidget ();
- int state = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
+ int state = (int)OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
switch (state) {
case OS.PBST_NORMAL: return SWT.NORMAL;
case OS.PBST_ERROR: return SWT.ERROR;
@@ -273,7 +279,7 @@ void setForegroundPixel (int pixel) {
*/
public void setMaximum (int value) {
checkWidget ();
- int minimum = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
+ int minimum = (int)OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
if (0 <= minimum && minimum < value) {
OS.SendMessage (handle, OS.PBM_SETRANGE32, minimum, value);
}
@@ -294,7 +300,7 @@ public void setMaximum (int value) {
*/
public void setMinimum (int value) {
checkWidget ();
- int maximum = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
+ int maximum = (int)OS.SendMessage (handle, OS.PBM_GETRANGE, 0, 0);
if (0 <= value && value < maximum) {
OS.SendMessage (handle, OS.PBM_SETRANGE32, value, maximum);
}
@@ -322,7 +328,7 @@ public void setSelection (int value) {
* PBM_SETPOS. This is undocumented. The fix is to call PBM_SETPOS
* a second time.
*/
- long /*int*/ state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
+ long state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
if (state != OS.PBST_NORMAL) {
OS.SendMessage (handle, OS.PBM_SETPOS, value, 0);
}
@@ -379,12 +385,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return ProgressBarProc;
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
/*
@@ -400,7 +406,7 @@ LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (result != null) return result;
/*
@@ -437,7 +443,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_TIMER (long wParam, long lParam) {
LRESULT result = super.WM_TIMER (wParam, lParam);
if (result != null) return result;
if ((style & SWT.INDETERMINATE) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
index 959fc05a01..59eb302b26 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
@@ -114,7 +114,7 @@ public void addSelectionListener (SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -145,12 +145,12 @@ static int checkStyle (int style) {
void drawBand (int x, int y, int width, int height) {
if ((style & SWT.SMOOTH) != 0) return;
- long /*int*/ hwndTrack = parent.handle;
+ long hwndTrack = parent.handle;
byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};
- long /*int*/ stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);
- long /*int*/ stippleBrush = OS.CreatePatternBrush (stippleBitmap);
- long /*int*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- long /*int*/ oldBrush = OS.SelectObject (hDC, stippleBrush);
+ long stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);
+ long stippleBrush = OS.CreatePatternBrush (stippleBitmap);
+ long hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
+ long oldBrush = OS.SelectObject (hDC, stippleBrush);
OS.PatBlt (hDC, x, y, width, height, OS.PATINVERT);
OS.SelectObject (hDC, oldBrush);
OS.ReleaseDC (hwndTrack, hDC);
@@ -189,22 +189,22 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return display.windowProc;
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT:
case OS.VK_UP:
@@ -225,7 +225,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
OS.GetWindowRect (handle, rect);
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
- long /*int*/ hwndTrack = parent.handle;
+ long hwndTrack = parent.handle;
RECT clientRect = new RECT ();
OS.GetClientRect (hwndTrack, clientRect);
int clientWidth = clientRect.right - clientRect.left;
@@ -261,17 +261,17 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
return new LRESULT (OS.DLGC_STATIC);
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);
if (result == LRESULT.ZERO) return result;
/* Compute the banding rectangle */
- long /*int*/ hwndTrack = parent.handle;
+ long hwndTrack = parent.handle;
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
RECT rect = new RECT ();
@@ -314,7 +314,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONUP (long wParam, long lParam) {
LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
if (result == LRESULT.ZERO) return result;
@@ -343,7 +343,7 @@ LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEMOVE (long wParam, long lParam) {
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
if (!dragging || (wParam & OS.MK_LBUTTON) == 0) return result;
@@ -351,7 +351,7 @@ LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
/* Compute the banding rectangle */
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
- long /*int*/ hwndTrack = parent.handle;
+ long hwndTrack = parent.handle;
OS.MapWindowPoints (handle, hwndTrack, pt, 1);
RECT rect = new RECT (), clientRect = new RECT ();
OS.GetWindowRect (handle, rect);
@@ -393,17 +393,17 @@ LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETCURSOR (long wParam, long lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
- if (hitTest == OS.HTCLIENT) {
- long /*int*/ hCursor = 0;
- if ((style & SWT.HORIZONTAL) != 0) {
+ if (hitTest == OS.HTCLIENT) {
+ long hCursor = 0;
+ if ((style & SWT.HORIZONTAL) != 0) {
hCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
- } else {
+ } else {
hCursor = OS.LoadCursor (0, OS.IDC_SIZEWE);
- }
+ }
OS.SetCursor (hCursor);
return LRESULT.ONE;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
index 2b78ffd3e4..65d41a87af 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
@@ -43,7 +43,7 @@ import org.eclipse.swt.internal.win32.*;
*/
public class Scale extends Control {
boolean ignoreResize, ignoreSelection;
- static final long /*int*/ TrackBarProc;
+ static final long TrackBarProc;
static final TCHAR TrackBarClass = new TCHAR (0, OS.TRACKBAR_CLASS, true);
boolean createdAsRTL;
static {
@@ -138,7 +138,7 @@ public void addSelectionListener(SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TrackBarProc, hwnd, msg, wParam, lParam);
}
@@ -196,7 +196,7 @@ int defaultForeground () {
*/
public int getIncrement () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETLINESIZE, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TBM_GETLINESIZE, 0, 0);
}
/**
@@ -211,7 +211,7 @@ public int getIncrement () {
*/
public int getMaximum () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
}
/**
@@ -243,7 +243,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPAGESIZE, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TBM_GETPAGESIZE, 0, 0);
}
/**
@@ -258,7 +258,7 @@ public int getPageIncrement () {
*/
public int getSelection () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
}
/**
@@ -287,7 +287,7 @@ public void removeSelectionListener(SelectionListener listener) {
}
@Override
-void setBackgroundImage (long /*int*/ hImage) {
+void setBackgroundImage (long hImage) {
super.setBackgroundImage (hImage);
/*
* Bug in Windows. Changing the background color of the Scale
@@ -358,8 +358,8 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean
public void setIncrement (int increment) {
checkWidget ();
if (increment < 1) return;
- int minimum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
- int maximum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ int minimum = (int)OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
+ int maximum = (int)OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
if (increment > maximum - minimum) return;
OS.SendMessage (handle, OS.TBM_SETLINESIZE, 0, increment);
}
@@ -379,7 +379,7 @@ public void setIncrement (int increment) {
*/
public void setMaximum (int value) {
checkWidget ();
- int minimum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
+ int minimum = (int)OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
if (0 <= minimum && minimum < value) {
OS.SendMessage (handle, OS.TBM_SETRANGEMAX, 1, value);
}
@@ -400,7 +400,7 @@ public void setMaximum (int value) {
*/
public void setMinimum (int value) {
checkWidget ();
- int maximum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ int maximum = (int)OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
if (0 <= value && value < maximum) {
OS.SendMessage (handle, OS.TBM_SETRANGEMIN, 1, value);
}
@@ -422,8 +422,8 @@ public void setMinimum (int value) {
public void setPageIncrement (int pageIncrement) {
checkWidget ();
if (pageIncrement < 1) return;
- int minimum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
- int maximum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
+ int minimum = (int)OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
+ int maximum = (int)OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
if (pageIncrement > maximum - minimum) return;
OS.SendMessage (handle, OS.TBM_SETPAGESIZE, 0, pageIncrement);
OS.SendMessage (handle, OS.TBM_SETTICFREQ, pageIncrement, 0);
@@ -458,15 +458,15 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return TrackBarProc;
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT:
/*
@@ -475,10 +475,10 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to replace VK_LEFT by VK_RIGHT and VK_RIGHT by VK_LEFT
* when the current orientation differs from the orientation used to
* create the control.
- */
+ */
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -487,7 +487,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long wParam, long lParam) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (result != null) return result;
/*
@@ -498,11 +498,11 @@ LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
* has changed and that notification has not been issued
* and send the selection event.
*/
- int oldPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
+ int oldPosition = (int)OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
ignoreSelection = true;
- long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
ignoreSelection = false;
- int newPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
+ int newPosition = (int)OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
if (oldPosition != newPosition) {
/*
* Send the event because WM_HSCROLL and WM_VSCROLL
@@ -516,7 +516,7 @@ LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PAINT (long wParam, long lParam) {
if ((state & DISPOSE_SENT) != 0) return LRESULT.ZERO;
/*
@@ -551,13 +551,13 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
if (ignoreResize) return null;
return super.WM_SIZE (wParam, lParam);
}
@Override
-LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScrollChild (long wParam, long lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
index 058f25a9fb..347214f2c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
@@ -187,13 +187,11 @@ void createWidget () {
@Override
void destroyWidget () {
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.ShowScrollBar (hwnd, type, false);
parent.destroyScrollBar (style);
releaseHandle ();
- //This code is intentionally commented
- //parent.sendEvent (SWT.Resize);
}
Rectangle getBounds () {
@@ -266,7 +264,7 @@ public int getMaximum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMax;
@@ -287,7 +285,7 @@ public int getMinimum () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nMin;
@@ -340,7 +338,7 @@ public int getSelection () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_POS;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
return info.nPos;
@@ -396,7 +394,7 @@ public int getThumb () {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_PAGE;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
OS.GetScrollInfo (hwnd, type, info);
if (info.nPage != 0) --info.nPage;
@@ -534,7 +532,7 @@ public boolean getVisible () {
return (psbi.rgstate [0] & OS.STATE_SYSTEM_INVISIBLE) == 0;
}
-long /*int*/ hwndScrollBar () {
+long hwndScrollBar () {
return parent.scrolledHandle ();
}
@@ -634,7 +632,7 @@ int scrollBarType () {
*/
public void setEnabled (boolean enabled) {
checkWidget();
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
int flags = enabled ? OS.ESB_ENABLE_BOTH : OS.ESB_DISABLE_BOTH;
OS.EnableScrollBar (hwnd, type, flags);
@@ -682,7 +680,7 @@ public void setMaximum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -709,7 +707,7 @@ public void setMinimum (int value) {
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -737,7 +735,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (long hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
/*
* Bug in Windows. For some reason, when SetScrollInfo()
* is used with SIF_POS and the scroll bar is hidden,
@@ -820,7 +818,7 @@ public void setSelection (int selection) {
checkWidget();
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_POS;
info.nPos = selection;
@@ -849,7 +847,7 @@ public void setThumb (int value) {
if (value < 1) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_PAGE | OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
@@ -896,7 +894,7 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i
info.nMax = maximum;
info.nPage = thumb;
if (info.nPage != 0) info.nPage++;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
SetScrollInfo (hwnd, type, info, true);
}
@@ -929,7 +927,7 @@ public void setVisible (boolean visible) {
* of the scroll bar will get the correct value.
*/
state = visible ? state & ~HIDDEN : state | HIDDEN;
- long /*int*/ hwnd = hwndScrollBar ();
+ long hwnd = hwndScrollBar ();
int type = scrollBarType ();
/*
* Bug in Windows 7. Windows will cause pixel corruption
@@ -977,7 +975,7 @@ public void setVisible (boolean visible) {
}
}
-LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScrollChild (long wParam, long lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
index aa3ccf42e5..6570d9df97 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
@@ -43,7 +43,7 @@ public abstract class Scrollable extends Control {
* The regular expression used to determine the string which should be deleted
* when Ctrl+Bs is hit.
*/
- static final java.util.regex.Pattern CTRL_BS_PATTERN =
+ static final java.util.regex.Pattern CTRL_BS_PATTERN =
java.util.regex.Pattern.compile ("\\r?\\n\\z|[\\p{Punct}]+[\\t ]*\\z|[^\\p{Punct}\\s\\n\\r]*[\\t ]*\\z");
/**
@@ -86,7 +86,7 @@ public Scrollable (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
}
@@ -128,7 +128,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
}
Rectangle computeTrimInPixels (int x, int y, int width, int height) {
- long /*int*/ scrolledHandle = scrolledHandle ();
+ long scrolledHandle = scrolledHandle ();
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
int bits1 = OS.GetWindowLong (scrolledHandle, OS.GWL_STYLE);
@@ -140,6 +140,12 @@ Rectangle computeTrimInPixels (int x, int y, int width, int height) {
return new Rectangle (rect.left, rect.top, nWidth, nHeight);
}
+@Override
+void createHandle () {
+ super.createHandle();
+ maybeEnableDarkSystemTheme();
+}
+
ScrollBar createScrollBar (int type) {
ScrollBar bar = new ScrollBar (this, type);
if ((state & CANVAS) != 0) {
@@ -177,7 +183,7 @@ int applyThemeBackground () {
}
void destroyScrollBar (int type) {
- long /*int*/ hwnd = scrolledHandle ();
+ long hwnd = scrolledHandle ();
int bits = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
if ((type & SWT.HORIZONTAL) != 0) {
style &= ~SWT.H_SCROLL;
@@ -212,7 +218,7 @@ public Rectangle getClientArea () {
Rectangle getClientAreaInPixels () {
forceResize ();
RECT rect = new RECT ();
- long /*int*/ scrolledHandle = scrolledHandle ();
+ long scrolledHandle = scrolledHandle ();
OS.GetClientRect (scrolledHandle, rect);
int x = rect.left, y = rect.top;
int width = rect.right - rect.left;
@@ -306,26 +312,11 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-long /*int*/ scrolledHandle () {
+long scrolledHandle () {
return handle;
}
@Override
-int widgetExtStyle () {
- return super.widgetExtStyle ();
- /*
- * This code is intentionally commented. In future,
- * we may wish to support different standard Windows
- * edge styles. The issue here is that not all of
- * these styles are available on the other platforms
- * this would need to be a hint.
- */
-// if ((style & SWT.BORDER) != 0) return OS.WS_EX_CLIENTEDGE;
-// if ((style & SWT.SHADOW_IN) != 0) return OS.WS_EX_STATICEDGE;
-// return super.widgetExtStyle ();
-}
-
-@Override
int widgetStyle () {
int bits = super.widgetStyle () | OS.WS_TABSTOP;
if ((style & SWT.H_SCROLL) != 0) bits |= OS.WS_HSCROLL;
@@ -339,12 +330,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return display.windowProc;
}
@Override
-LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_HSCROLL (long wParam, long lParam) {
LRESULT result = super.WM_HSCROLL (wParam, lParam);
if (result != null) return result;
if (horizontalBar != null && lParam == 0) {
@@ -354,13 +345,18 @@ LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
- return wmScrollWheel ((state & CANVAS) != 0, wParam, lParam);
+LRESULT WM_MOUSEWHEEL (long wParam, long lParam) {
+ return wmScrollWheel ((state & CANVAS) != 0, wParam, lParam, false);
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+LRESULT WM_MOUSEHWHEEL (long wParam, long lParam) {
+ return wmScrollWheel ((state & CANVAS) != 0, -1 * wParam, lParam, true);
+}
+
+@Override
+LRESULT WM_SIZE (long wParam, long lParam) {
+ long code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
super.WM_SIZE (wParam, lParam);
// widget may be disposed at this point
if (code == 0) return LRESULT.ZERO;
@@ -368,7 +364,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_VSCROLL (long wParam, long lParam) {
LRESULT result = super.WM_VSCROLL (wParam, lParam);
if (result != null) return result;
if (verticalBar != null && lParam == 0) {
@@ -377,31 +373,42 @@ LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
return result;
}
-LRESULT wmScrollWheel (boolean update, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScrollWheel (boolean update, long wParam, long lParam, boolean horzWheel) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (result != null) return result;
/*
- * Translate WM_MOUSEWHEEL to WM_VSCROLL or WM_HSCROLL.
+ * Translate WM_MOUSEWHEEL and WM_MOUSEHWHEEL to WM_VSCROLL or WM_HSCROLL.
*/
if (update) {
- if ((wParam & (OS.MK_SHIFT | OS.MK_CONTROL)) != 0) return result;
- boolean vertical = verticalBar != null && verticalBar.getEnabled ();
- boolean horizontal = horizontalBar != null && horizontalBar.getEnabled ();
- int msg = vertical ? OS.WM_VSCROLL : horizontal ? OS.WM_HSCROLL : 0;
- if (msg == 0) return result;
- int [] linesToScroll = new int [1];
- OS.SystemParametersInfo (OS.SPI_GETWHEELSCROLLLINES, 0, linesToScroll, 0);
- int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
- boolean pageScroll = linesToScroll [0] == OS.WHEEL_PAGESCROLL;
+ if ((wParam & OS.MK_CONTROL) != 0) {
+ return null;
+ }
+ if ((wParam & OS.MK_SHIFT) != 0) {
+ horzWheel = !horzWheel;
+ }
+
+ boolean vertical;
+ if (verticalBar != null && verticalBar.getEnabled () && !horzWheel) {
+ vertical = true;
+ } else if (horizontalBar != null && horizontalBar.getEnabled () && horzWheel) {
+ vertical = false;
+ } else {
+ return null;
+ }
+
ScrollBar bar = vertical ? verticalBar : horizontalBar;
+ MouseWheelData wheelData = new MouseWheelData(vertical, bar, wParam, display.scrollRemainderBar);
+
+ if (wheelData.count == 0) return null;
+
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_POS;
OS.GetScrollInfo (handle, bar.scrollBarType (), info);
- if (vertical && !pageScroll) delta *= linesToScroll [0];
- int increment = pageScroll ? bar.getPageIncrement () : bar.getIncrement ();
- info.nPos -= increment * delta / OS.WHEEL_DELTA;
+ info.nPos -= wheelData.count;
OS.SetScrollInfo (handle, bar.scrollBarType (), info, true);
+
+ int msg = vertical ? OS.WM_VSCROLL : OS.WM_HSCROLL;
OS.SendMessage (handle, msg, OS.SB_THUMBPOSITION, 0);
return LRESULT.ZERO;
}
@@ -419,7 +426,7 @@ LRESULT wmScrollWheel (boolean update, long /*int*/ wParam, long /*int*/ lParam)
*/
int vPosition = verticalBar == null ? 0 : verticalBar.getSelection ();
int hPosition = horizontalBar == null ? 0 : horizontalBar.getSelection ();
- long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
if (verticalBar != null) {
int position = verticalBar.getSelection ();
if (position != vPosition) {
@@ -439,7 +446,7 @@ LRESULT wmScrollWheel (boolean update, long /*int*/ wParam, long /*int*/ lParam)
return new LRESULT (code);
}
-LRESULT wmScroll (ScrollBar bar, boolean update, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScroll (ScrollBar bar, boolean update, long hwnd, int msg, long wParam, long lParam) {
LRESULT result = null;
if (update) {
int type = msg == OS.WM_HSCROLL ? OS.SB_HORZ : OS.SB_VERT;
@@ -478,7 +485,7 @@ LRESULT wmScroll (ScrollBar bar, boolean update, long /*int*/ hwnd, int msg, lon
}
OS.SetScrollInfo (hwnd, type, info, true);
} else {
- long /*int*/ code = callWindowProc (hwnd, msg, wParam, lParam);
+ long code = callWindowProc (hwnd, msg, wParam, lParam);
result = code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
bar.wmScrollChild (wParam, lParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
index 4d5c2d3294..8be1e4314e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -123,16 +123,16 @@ import org.eclipse.swt.internal.win32.*;
public class Shell extends Decorations {
Menu activeMenu;
ToolTip [] toolTips;
- long /*int*/ hIMC, hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle, menuItemToolTipHandle;
- int minWidth = SWT.DEFAULT, minHeight = SWT.DEFAULT;
- long /*int*/ [] brushes;
+ long hwndMDIClient, lpstrTip, toolTipHandle, balloonTipHandle, menuItemToolTipHandle;
+ int minWidth = SWT.DEFAULT, minHeight = SWT.DEFAULT, maxWidth = SWT.DEFAULT, maxHeight = SWT.DEFAULT;
+ long [] brushes;
boolean showWithParent, fullScreen, wasMaximized, modified, center;
String toolTitle, balloonTitle;
- long /*int*/ toolIcon, balloonIcon;
- long /*int*/ windowProc;
+ long toolIcon, balloonIcon;
+ long windowProc;
Control lastActive;
- static /*final*/ long /*int*/ ToolTipProc;
- static final long /*int*/ DialogProc;
+ static /*final*/ long ToolTipProc;
+ static final long DialogProc;
static final TCHAR DialogClass = new TCHAR (0, "#32770", true);
final static int [] SYSTEM_COLORS = {
OS.COLOR_BTNFACE,
@@ -279,7 +279,7 @@ public Shell (Display display, int style) {
this (display, null, style, 0, false);
}
-Shell (Display display, Shell parent, int style, long /*int*/ handle, boolean embedded) {
+Shell (Display display, Shell parent, int style, long handle, boolean embedded) {
super ();
checkSubclass ();
if (display == null) display = Display.getCurrent ();
@@ -398,7 +398,7 @@ public Shell (Shell parent, int style) {
*
* @noreference This method is not intended to be referenced by clients.
*/
-public static Shell win32_new (Display display, long /*int*/ handle) {
+public static Shell win32_new (Display display, long handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, true);
}
@@ -421,7 +421,7 @@ public static Shell win32_new (Display display, long /*int*/ handle) {
*
* @since 3.3
*/
-public static Shell internal_new (Display display, long /*int*/ handle) {
+public static Shell internal_new (Display display, long handle) {
return new Shell (display, null, SWT.NO_TRIM, handle, false);
}
@@ -473,13 +473,13 @@ public void addShellListener (ShellListener listener) {
addListener (SWT.Deactivate, typedListener);
}
-long /*int*/ balloonTipHandle () {
+long balloonTipHandle () {
if (balloonTipHandle == 0) createBalloonTipHandle ();
return balloonTipHandle;
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle || hwnd == menuItemToolTipHandle) {
return OS.CallWindowProc (ToolTipProc, hwnd, msg, wParam, lParam);
@@ -575,6 +575,24 @@ void createBalloonTipHandle () {
OS.SetWindowLongPtr (balloonTipHandle, OS.GWLP_WNDPROC, display.windowProc);
}
+void setTitleColoring() {
+ int attributeID = 0;
+ if (OS.WIN32_BUILD >= OS.WIN32_BUILD_WIN10_2004) {
+ // Documented since build 20348, but was already present since build 19041
+ final int DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
+ attributeID = DWMWA_USE_IMMERSIVE_DARK_MODE;
+ } else if (OS.WIN32_BUILD >= OS.WIN32_BUILD_WIN10_1809) {
+ // Undocumented value
+ attributeID = 19;
+ } else {
+ // Not supported
+ return;
+ }
+
+ int[] value = new int[] {1};
+ OS.DwmSetWindowAttribute (handle, attributeID, value, 4);
+}
+
@Override
void createHandle () {
boolean embedded = handle != 0 && (state & FOREIGN_HANDLE) == 0;
@@ -607,6 +625,10 @@ void createHandle () {
// if ((style & SWT.ON_TOP) != 0) display.lockActiveWindow = false;
if (!embedded) {
+ if (display.useShellTitleColoring) {
+ setTitleColoring();
+ }
+
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
bits &= ~(OS.WS_OVERLAPPED | OS.WS_CAPTION);
bits |= OS.WS_POPUP;
@@ -625,10 +647,6 @@ void createHandle () {
int flags = OS.SWP_DRAWFRAME | OS.SWP_NOMOVE | OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_NOACTIVATE;
OS.SetWindowPos (handle, 0, 0, 0, 0, 0, flags);
}
- if (OS.IsDBLocale) {
- hIMC = OS.ImmCreateContext ();
- if (hIMC != 0) OS.ImmAssociateContext (handle, hIMC);
- }
}
void createMenuItemToolTipHandle() {
@@ -659,8 +677,8 @@ void createToolTipHandle () {
toolTipHandle = createToolTipHandle (handle);
}
-long /*int*/ createToolTipHandle (long /*int*/ parent) {
- long /*int*/ toolTipHandle = OS.CreateWindowEx (
+long createToolTipHandle (long parent) {
+ long toolTipHandle = OS.CreateWindowEx (
0,
new TCHAR (0, OS.TOOLTIPS_CLASS, true),
null,
@@ -712,36 +730,6 @@ void destroyToolTip (ToolTip toolTip) {
void destroyWidget () {
fixActiveShell ();
super.destroyWidget ();
-
- /*
- * Destroy context only after the controls that used it were destroyed.
- * Technically, that shouldn't be necessary, because 'Control.releaseWidget'
- * clears up association by calling 'OS.ImmAssociateContext (handle, 0)'.
- * However, there's a bug in Windows 10 (see bug 526758), and this is the workaround.
- */
- if (OS.IsDBLocale) {
- if (hIMC != 0) OS.ImmDestroyContext (hIMC);
- }
-}
-
-@Override
-public void dispose () {
- /*
- * This code is intentionally commented. On some
- * platforms, the owner window is repainted right
- * away when a dialog window exits. This behavior
- * is currently unspecified.
- */
-// /*
-// * Note: It is valid to attempt to dispose a widget
-// * more than once. If this happens, fail silently.
-// */
-// if (!isValidWidget ()) return;
-// if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
-// Display oldDisplay = display;
- super.dispose ();
- // widget is disposed at this point
-// if (oldDisplay != null) oldDisplay.update ();
}
@Override
@@ -759,18 +747,17 @@ void enableWidget (boolean enabled) {
}
@Override
-long /*int*/ findBrush (long /*int*/ value, int lbStyle) {
+long findBrush (long value, int lbStyle) {
if (lbStyle == OS.BS_SOLID) {
- for (int i=0; i<SYSTEM_COLORS.length; i++) {
- if (value == OS.GetSysColor (SYSTEM_COLORS [i])) {
- return OS.GetSysColorBrush (SYSTEM_COLORS [i]);
+ for (int element : SYSTEM_COLORS) {
+ if (value == OS.GetSysColor (element)) {
+ return OS.GetSysColorBrush (element);
}
}
}
- if (brushes == null) brushes = new long /*int*/ [BRUSHES_SIZE];
+ if (brushes == null) brushes = new long [BRUSHES_SIZE];
LOGBRUSH logBrush = new LOGBRUSH ();
- for (int i=0; i<brushes.length; i++) {
- long /*int*/ hBrush = brushes [i];
+ for (long hBrush : brushes) {
if (hBrush == 0) break;
OS.GetObject (hBrush, LOGBRUSH.sizeof, logBrush);
switch (logBrush.lbStyle) {
@@ -787,12 +774,12 @@ long /*int*/ findBrush (long /*int*/ value, int lbStyle) {
}
}
int length = brushes.length;
- long /*int*/ hBrush = brushes [--length];
+ long hBrush = brushes [--length];
if (hBrush != 0) OS.DeleteObject (hBrush);
System.arraycopy (brushes, 0, brushes, 1, length);
switch (lbStyle) {
case OS.BS_SOLID:
- hBrush = OS.CreateSolidBrush ((int)/*64*/value);
+ hBrush = OS.CreateSolidBrush ((int)value);
break;
case OS.BS_PATTERN:
hBrush = OS.CreatePatternBrush (value);
@@ -832,7 +819,7 @@ void fixActiveShell () {
* application). The fix is to activate the disabled parent
* shell before disposing or hiding the active shell.
*/
- long /*int*/ hwndParent = OS.GetParent (handle);
+ long hwndParent = OS.GetParent (handle);
if (hwndParent != 0 && handle == OS.GetActiveWindow ()) {
if (!OS.IsWindowEnabled (hwndParent) && OS.IsWindowVisible (hwndParent)) {
OS.SetActiveWindow (hwndParent);
@@ -960,13 +947,13 @@ ToolTip getCurrentToolTip () {
return null;
}
-ToolTip getCurrentToolTip (long /*int*/ hwndToolTip) {
+ToolTip getCurrentToolTip (long hwndToolTip) {
if (hwndToolTip == 0) return null;
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
- if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) return findToolTip ((int)/*64*/lpti.uId);
+ if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) return findToolTip ((int)lpti.uId);
}
}
return null;
@@ -1017,7 +1004,7 @@ public boolean getFullScreen () {
public int getImeInputMode () {
checkWidget ();
if (!OS.IsDBLocale) return 0;
- long /*int*/ hIMC = OS.ImmGetContext (handle);
+ long hIMC = OS.ImmGetContext (handle);
int [] lpfdwConversion = new int [1], lpfdwSentence = new int [1];
boolean open = OS.ImmGetOpenStatus (hIMC);
if (open) open = OS.ImmGetConversionStatus (hIMC, lpfdwConversion, lpfdwSentence);
@@ -1045,6 +1032,47 @@ public boolean getMaximized () {
}
/**
+ * Returns a point describing the maximum receiver's size. The
+ * x coordinate of the result is the maximum width of the receiver.
+ * The y coordinate of the result is the maximum height of the
+ * receiver.
+ *
+ * @return the receiver's size
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public Point getMaximumSize () {
+ checkWidget ();
+ return DPIUtil.autoScaleDown(getMaximumSizeInPixels());
+}
+
+Point getMaximumSizeInPixels () {
+ int width = Math.min (Integer.MAX_VALUE, maxWidth);
+ int trim = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.MAX;
+ if ((style & SWT.NO_TRIM) == 0 && (style & trim) != 0) {
+ width = Math.min (width, OS.GetSystemMetrics (OS.SM_CXMAXTRACK));
+ }
+ int height = Math.min (Integer.MAX_VALUE, maxHeight);
+ if ((style & SWT.NO_TRIM) == 0 && (style & trim) != 0) {
+ if ((style & SWT.RESIZE) != 0) {
+ height = Math.min (height, OS.GetSystemMetrics (OS.SM_CYMAXTRACK));
+ } else {
+ RECT rect = new RECT ();
+ int bits1 = OS.GetWindowLong (handle, OS.GWL_STYLE);
+ int bits2 = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
+ OS.AdjustWindowRectEx (rect, bits1, false, bits2);
+ height = Math.min (height, rect.bottom - rect.top);
+ }
+ }
+ return new Point (width, height);
+}
+
+/**
* Returns a point describing the minimum receiver's size. The
* x coordinate of the result is the minimum width of the receiver.
* The y coordinate of the result is the minimum height of the
@@ -1153,22 +1181,22 @@ public Shell [] getShells () {
checkWidget ();
int count = 0;
Shell [] shells = display.getShells ();
- for (int i=0; i<shells.length; i++) {
- Control shell = shells [i];
+ for (Shell activeshell : shells) {
+ Control shell = activeshell;
do {
- shell = shell.parent;
+ shell = shell.getParent ();
} while (shell != null && shell != this);
if (shell == this) count++;
}
int index = 0;
Shell [] result = new Shell [count];
- for (int i=0; i<shells.length; i++) {
- Control shell = shells [i];
+ for (Shell activeshell : shells) {
+ Control shell = activeshell;
do {
- shell = shell.parent;
+ shell = shell.getParent ();
} while (shell != null && shell != this);
if (shell == this) {
- result [index++] = shells [i];
+ result [index++] = activeshell;
}
}
return result;
@@ -1212,7 +1240,7 @@ public boolean isVisible () {
return getVisible ();
}
-long /*int*/ hwndMDIClient () {
+long hwndMDIClient () {
if (hwndMDIClient == 0) {
int widgetStyle = OS.MDIS_ALLCHILDSTYLES | OS.WS_CHILD | OS.WS_CLIPCHILDREN | OS.WS_CLIPSIBLINGS;
hwndMDIClient = OS.CreateWindowEx (
@@ -1230,7 +1258,7 @@ long /*int*/ hwndMDIClient () {
return hwndMDIClient;
}
-long /*int*/ menuItemToolTipHandle () {
+long menuItemToolTipHandle () {
if (menuItemToolTipHandle == 0) createMenuItemToolTipHandle ();
return menuItemToolTipHandle;
}
@@ -1325,8 +1353,8 @@ void register () {
void releaseBrushes () {
if (brushes != null) {
- for (int i=0; i<brushes.length; i++) {
- if (brushes [i] != 0) OS.DeleteObject (brushes [i]);
+ for (long brush : brushes) {
+ if (brush != 0) OS.DeleteObject (brush);
}
}
brushes = null;
@@ -1334,16 +1362,13 @@ void releaseBrushes () {
@Override
void releaseChildren (boolean destroy) {
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) {
- Shell shell = shells [i];
+ for (Shell shell : getShells ()) {
if (shell != null && !shell.isDisposed ()) {
shell.release (false);
}
}
if (toolTips != null) {
- for (int i=0; i<toolTips.length; i++) {
- ToolTip toolTip = toolTips [i];
+ for (ToolTip toolTip : toolTips) {
if (toolTip != null && !toolTip.isDisposed ()) {
toolTip.release (false);
}
@@ -1371,7 +1396,7 @@ void releaseWidget () {
activeMenu = null;
display.clearModal (this);
if (lpstrTip != 0) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
OS.HeapFree (hHeap, 0, lpstrTip);
}
lpstrTip = 0;
@@ -1421,36 +1446,19 @@ public void requestLayout () {
@Override
void reskinChildren (int flags) {
- Shell [] shells = getShells ();
- for (int i=0; i<shells.length; i++) {
- Shell shell = shells [i];
+ for (Shell shell : getShells ()) {
if (shell != null) shell.reskin (flags);
}
if (toolTips != null) {
- for (int i=0; i<toolTips.length; i++) {
- ToolTip toolTip = toolTips [i];
+ for (ToolTip toolTip : toolTips) {
if (toolTip != null) toolTip.reskin (flags);
}
}
super.reskinChildren (flags);
}
-LRESULT selectPalette (long /*int*/ hPalette) {
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ hOld = OS.SelectPalette (hDC, hPalette, false);
- int result = OS.RealizePalette (hDC);
- if (result > 0) {
- OS.InvalidateRect (handle, null, true);
- } else {
- OS.SelectPalette (hDC, hOld, true);
- OS.RealizePalette (hDC);
- }
- OS.ReleaseDC (handle, hDC);
- return (result > 0) ? LRESULT.ONE : LRESULT.ZERO;
-}
-
@Override
-boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long wParam, long lParam, Event event) {
if (!isEnabled () || !isActive ()) return false;
return super.sendKeyEvent (type, msg, wParam, lParam, event);
}
@@ -1594,8 +1602,9 @@ public void setEnabled (boolean enabled) {
* to either the maximized or normal states.
* <p>
* Note: The result of intermixing calls to <code>setFullScreen(true)</code>,
- * <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will
- * vary by platform. Typically, the behavior will match the platform user's
+ * <code>setMaximized(true)</code>, <code>setMinimized(true)</code> and
+ * <code>setMaximumSize</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
* expectations, but not always. This should be avoided if possible.
* </p>
*
@@ -1626,6 +1635,9 @@ public void setFullScreen (boolean fullScreen) {
}
if (fullScreen) wasMaximized = getMaximized ();
boolean visible = isVisible ();
+ if (!visible && !wasMaximized) {
+ swFlags = stateFlags;
+ }
OS.SetWindowLong (handle, OS.GWL_STYLE, styleFlags);
if (wasMaximized) {
OS.ShowWindow (handle, OS.SW_HIDE);
@@ -1656,7 +1668,7 @@ public void setImeInputMode (int mode) {
checkWidget ();
if (!OS.IsDBLocale) return;
boolean imeOn = mode != SWT.NONE;
- long /*int*/ hIMC = OS.ImmGetContext (handle);
+ long hIMC = OS.ImmGetContext (handle);
OS.ImmSetOpenStatus (hIMC, imeOn);
if (imeOn) {
int [] lpfdwConversion = new int [1], lpfdwSentence = new int [1];
@@ -1674,7 +1686,7 @@ public void setImeInputMode (int mode) {
}
boolean fullShape = (mode & SWT.DBCS) != 0;
if ((mode & SWT.NATIVE) != 0) {
- long /*int*/ hkl = OS.GetKeyboardLayout (0);
+ long hkl = OS.GetKeyboardLayout (0);
int langid = OS.PRIMARYLANGID (OS.LOWORD (hkl));
if (langid == OS.LANG_JAPANESE) {
fullShape = true;
@@ -1699,6 +1711,85 @@ public void setImeInputMode (int mode) {
}
/**
+ * Sets the receiver's maximum size to the size specified by the arguments.
+ * If the new maximum size is smaller than the current size of the receiver,
+ * the receiver is resized to the new maximum size.
+ * <p>
+ * Note: The result of intermixing calls to <code>setMaximumSize</code> and
+ * <code>setFullScreen(true)</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
+ * expectations, but not always. This should be avoided if possible.
+ * </p>
+ * @param width the new maximum width for the receiver
+ * @param height the new maximum height for the receiver
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public void setMaximumSize (int width, int height) {
+ checkWidget ();
+ setMaximumSizeInPixels(DPIUtil.autoScaleUp(width), DPIUtil.autoScaleUp(height));
+}
+
+/**
+ * Sets the receiver's maximum size to the size specified by the argument.
+ * If the new maximum size is smaller than the current size of the receiver,
+ * the receiver is resized to the new maximum size.
+ * <p>
+ * Note: The result of intermixing calls to <code>setMaximumSize</code> and
+ * <code>setFullScreen(true)</code> will vary by platform.
+ * Typically, the behavior will match the platform user's
+ * expectations, but not always. This should be avoided if possible.
+ * </p>
+ * @param size the new maximum size for the receiver
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the point is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.116
+ */
+public void setMaximumSize (Point size) {
+ checkWidget ();
+ if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
+ size = DPIUtil.autoScaleUp(size);
+ setMaximumSizeInPixels(size.x, size.y);
+}
+
+void setMaximumSizeInPixels (int width, int height) {
+ int widthLimit = 0, heightLimit = 0;
+ int trim = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.MAX;
+ if ((style & SWT.NO_TRIM) == 0 && (style & trim) != 0) {
+ widthLimit = OS.GetSystemMetrics (OS.SM_CXMAXTRACK);
+ if ((style & SWT.RESIZE) != 0) {
+ heightLimit = OS.GetSystemMetrics (OS.SM_CYMAXTRACK);
+ } else {
+ RECT rect = new RECT ();
+ int bits1 = OS.GetWindowLong (handle, OS.GWL_STYLE);
+ int bits2 = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
+ OS.AdjustWindowRectEx (rect, bits1, false, bits2);
+ heightLimit = rect.bottom - rect.top;
+ }
+ }
+ maxWidth = Math.min (widthLimit, width);
+ maxHeight = Math.min (heightLimit, height);
+ Point size = getSizeInPixels ();
+ int newWidth = Math.min (size.x, maxWidth);
+ int newHeight = Math.min (size.y, maxHeight);
+ if (maxWidth >= widthLimit) maxWidth = SWT.DEFAULT;
+ if (maxHeight >= heightLimit) maxHeight = SWT.DEFAULT;
+ if (newWidth != size.x || newHeight != size.y) setSizeInPixels (newWidth, newHeight);
+}
+
+/**
* Sets the receiver's minimum size to the size specified by the arguments.
* If the new minimum size is larger than the current size of the receiver,
* the receiver is resized to the new minimum size.
@@ -1785,7 +1876,7 @@ public void setModified (boolean modified) {
}
void setItemEnabled (int cmd, boolean enabled) {
- long /*int*/ hMenu = OS.GetSystemMenu (handle, false);
+ long hMenu = OS.GetSystemMenu (handle, false);
if (hMenu == 0) return;
int flags = OS.MF_ENABLED;
if (!enabled) flags = OS.MF_DISABLED | OS.MF_GRAYED;
@@ -1832,21 +1923,22 @@ public void setRegion (Region region) {
super.setRegion (region);
}
-void setToolTipText (long /*int*/ hwnd, String text) {
+void setToolTipText (long hwnd, String text) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.hwnd = handle;
lpti.uId = hwnd;
- long /*int*/ hwndToolTip = toolTipHandle ();
+ long hwndToolTip = toolTipHandle ();
+ maybeEnableDarkSystemTheme(hwndToolTip);
if (text == null) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
- } else {
- if (OS.SendMessage (hwndToolTip, OS.TTM_GETTOOLINFO, 0, lpti) != 0) {
+ } else if (OS.SendMessage (hwndToolTip, OS.TTM_GETTOOLINFO, 0, lpti) == 0) {
+ lpti.uFlags = OS.TTF_IDISHWND | OS.TTF_SUBCLASS;
+ lpti.lpszText = OS.LPSTR_TEXTCALLBACK;
+ OS.SendMessage (hwndToolTip, OS.TTM_ADDTOOL, 0, lpti);
+ } else if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
+ if (lpti.uId == hwnd) {
OS.SendMessage (hwndToolTip, OS.TTM_UPDATE, 0, 0);
- } else {
- lpti.uFlags = OS.TTF_IDISHWND | OS.TTF_SUBCLASS;
- lpti.lpszText = OS.LPSTR_TEXTCALLBACK;
- OS.SendMessage (hwndToolTip, OS.TTM_ADDTOOL, 0, lpti);
}
}
}
@@ -1859,7 +1951,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
* shell trimmings.
*/
if (!hasCursor ()) return;
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
if (lpstrTip != 0) OS.HeapFree (hHeap, 0, lpstrTip);
int byteCount = buffer.length * 2;
lpstrTip = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -1867,7 +1959,7 @@ void setToolTipText (NMTTDISPINFO lpnmtdi, char [] buffer) {
lpnmtdi.lpszText = lpstrTip;
}
-void setToolTipTitle (long /*int*/ hwndToolTip, String text, int icon) {
+void setToolTipTitle (long hwndToolTip, String text, int icon) {
/*
* Bug in Windows. For some reason, when TTM_SETTITLE
* is used to set the title of a tool tip, Windows leaks
@@ -1940,7 +2032,7 @@ public void setVisible (boolean visible) {
bringToTop ();
if (isDisposed ()) return;
}
- long /*int*/ hwndShell = OS.GetActiveWindow ();
+ long hwndShell = OS.GetActiveWindow ();
if (hwndShell == 0) {
if (parent != null) hwndShell = parent.handle;
}
@@ -1981,7 +2073,7 @@ public void setVisible (boolean visible) {
/* Make the foreign window parent appear in the task bar */
if (visible) {
if (parent != null && (parent.state & FOREIGN_HANDLE) != 0) {
- long /*int*/ hwndParent = parent.handle;
+ long hwndParent = parent.handle;
int style = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
if ((style & OS.WS_EX_TOOLWINDOW) != 0) {
OS.SetWindowLong (hwndParent, OS.GWL_EXSTYLE, style & ~OS.WS_EX_TOOLWINDOW);
@@ -2001,7 +2093,7 @@ public void setVisible (boolean visible) {
void subclass () {
super.subclass ();
if (ToolTipProc != 0) {
- long /*int*/ newProc = display.windowProc;
+ long newProc = display.windowProc;
if (toolTipHandle != 0) {
OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, newProc);
}
@@ -2014,7 +2106,7 @@ void subclass () {
}
}
-long /*int*/ toolTipHandle () {
+long toolTipHandle () {
if (toolTipHandle == 0) createToolTipHandle ();
return toolTipHandle;
}
@@ -2064,7 +2156,7 @@ CREATESTRUCT widgetCreateStruct () {
}
@Override
-long /*int*/ widgetParent () {
+long widgetParent () {
if (handle != 0) return handle;
return parent != null ? parent.handle : 0;
}
@@ -2103,7 +2195,7 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
if (windowProc != 0) return windowProc;
if ((style & SWT.TOOL) != 0) {
int trim = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.MAX | SWT.BORDER | SWT.RESIZE;
@@ -2112,8 +2204,39 @@ long /*int*/ windowProc () {
return parent != null ? DialogProc : super.windowProc ();
}
+Rectangle getClientRectInWindow () {
+ RECT windowRect = new RECT ();
+ OS.GetWindowRect (handle, windowRect);
+
+ POINT clientWindowLT = new POINT ();
+ OS.ClientToScreen (handle, clientWindowLT);
+ clientWindowLT.x -= windowRect.left;
+ clientWindowLT.y -= windowRect.top;
+
+ RECT clientRect = new RECT ();
+ OS.GetClientRect (handle, clientRect);
+
+ return new Rectangle(
+ clientWindowLT.x + clientRect.left,
+ clientWindowLT.y + clientRect.top,
+ clientRect.right - clientRect.left,
+ clientRect.bottom - clientRect.top);
+}
+
+void overpaintMenuBorder () {
+ if ((menuBar == null) || (display.menuBarBorderPen == 0)) return;
+
+ Rectangle clientArea = getClientRectInWindow();
+ long dc = OS.GetWindowDC (handle);
+ long oldPen = OS.SelectObject (dc, display.menuBarBorderPen);
+ OS.MoveToEx (dc, clientArea.x, clientArea.y - 1, 0);
+ OS.LineTo (dc, clientArea.x + clientArea.width, clientArea.y - 1);
+ OS.SelectObject (dc, oldPen);
+ OS.ReleaseDC (handle, dc);
+}
+
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
if((style & SWT.NO_MOVE) != 0 && msg == OS.WM_NCLBUTTONDOWN && wParam == OS.HTCAPTION) return 0;
if (hwnd == toolTipHandle || hwnd == balloonTipHandle || hwnd == menuItemToolTipHandle) {
@@ -2138,7 +2261,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
return callWindowProc (hwnd, msg, wParam, lParam);
}
if (hwnd == handle) {
- if ((int)/*64*/msg == Display.TASKBARBUTTONCREATED) {
+ if (msg == Display.TASKBARBUTTONCREATED) {
if (display.taskBar != null) {
for (TaskItem item : display.taskBar.items) {
if (item != null && item.shell == this) {
@@ -2149,6 +2272,17 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
}
}
+
+ switch (msg) {
+ case OS.WM_NCACTIVATE:
+ case OS.WM_NCPAINT:
+ {
+ long ret = super.windowProc (hwnd, msg, wParam, lParam);
+ overpaintMenuBorder();
+ return ret;
+ }
+ }
+
return super.windowProc (hwnd, msg, wParam, lParam);
}
@@ -2175,19 +2309,7 @@ int widgetStyle () {
}
@Override
-LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
- /*
- * Bug in Windows XP. When a Shell is deactivated, the
- * IME composition window does not go away. This causes
- * repaint issues. The fix is to commit the composition
- * string.
- */
- if (OS.LOWORD (wParam) == 0 && OS.IsDBLocale && hIMC != 0) {
- if (OS.ImmGetOpenStatus (hIMC)) {
- OS.ImmNotifyIME (hIMC, OS.NI_COMPOSITIONSTR, OS.CPS_COMPLETE, 0);
- }
- }
-
+LRESULT WM_ACTIVATE (long wParam, long lParam) {
/* Process WM_ACTIVATE */
LRESULT result = super.WM_ACTIVATE (wParam, lParam);
if (OS.LOWORD (wParam) == 0) {
@@ -2201,7 +2323,7 @@ LRESULT WM_ACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_DESTROY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_DESTROY (long wParam, long lParam) {
LRESULT result = super.WM_DESTROY (wParam, lParam);
/*
* When the shell is a WS_CHILD window of a non-SWT
@@ -2218,7 +2340,7 @@ LRESULT WM_DESTROY (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (result != null) return result;
/*
@@ -2237,7 +2359,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_ENTERIDLE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ENTERIDLE (long wParam, long lParam) {
LRESULT result = super.WM_ENTERIDLE (wParam, lParam);
if (result != null) return result;
Display display = this.display;
@@ -2246,14 +2368,17 @@ LRESULT WM_ENTERIDLE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETMINMAXINFO (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETMINMAXINFO (long wParam, long lParam) {
LRESULT result = super.WM_GETMINMAXINFO (wParam, lParam);
if (result != null) return result;
- if (minWidth != SWT.DEFAULT || minHeight != SWT.DEFAULT) {
+ if (minWidth != SWT.DEFAULT || minHeight != SWT.DEFAULT
+ || maxWidth != SWT.DEFAULT || maxHeight != SWT.DEFAULT) {
MINMAXINFO info = new MINMAXINFO ();
OS.MoveMemory (info, lParam, MINMAXINFO.sizeof);
if (minWidth != SWT.DEFAULT) info.ptMinTrackSize_x = minWidth;
if (minHeight != SWT.DEFAULT) info.ptMinTrackSize_y = minHeight;
+ if (maxWidth != SWT.DEFAULT) info.ptMaxTrackSize_x = maxWidth;
+ if (maxHeight != SWT.DEFAULT) info.ptMaxTrackSize_y = maxHeight;
OS.MoveMemory (lParam, info, MINMAXINFO.sizeof);
return LRESULT.ZERO;
}
@@ -2261,7 +2386,7 @@ LRESULT WM_GETMINMAXINFO (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEACTIVATE (long wParam, long lParam) {
LRESULT result = super.WM_MOUSEACTIVATE (wParam, lParam);
if (result != null) return result;
@@ -2312,7 +2437,7 @@ LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
int pos = OS.GetMessagePos ();
OS.POINTSTOPOINT (pt, pos);
}
- long /*int*/ hwnd = OS.WindowFromPoint (pt);
+ long hwnd = OS.WindowFromPoint (pt);
if (hwnd == 0) return null;
Control control = display.findControl (hwnd);
@@ -2333,13 +2458,13 @@ LRESULT WM_MOUSEACTIVATE (long /*int*/ wParam, long /*int*/ lParam) {
}
}
- long /*int*/ code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_MOUSEACTIVATE, wParam, lParam);
setActiveControl (control, SWT.MouseDown);
return new LRESULT (code);
}
@Override
-LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOVE (long wParam, long lParam) {
LRESULT result = super.WM_MOVE (wParam, lParam);
if (result != null) return result;
ToolTip tip = getCurrentToolTip ();
@@ -2348,16 +2473,16 @@ LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCHITTEST (long wParam, long lParam) {
if (!OS.IsWindowEnabled (handle)) return null;
if (!isEnabled () || !isActive ()) {
if (!Display.TrimEnabled) return new LRESULT (OS.HTNOWHERE);
- long /*int*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (hittest == OS.HTCLIENT || hittest == OS.HTMENU) hittest = OS.HTBORDER;
return new LRESULT (hittest);
}
if (menuBar != null && !menuBar.getEnabled ()) {
- long /*int*/ hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long hittest = callWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
if (hittest == OS.HTMENU) hittest = OS.HTBORDER;
return new LRESULT (hittest);
}
@@ -2365,7 +2490,7 @@ LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCLBUTTONDOWN (long wParam, long lParam) {
LRESULT result = super.WM_NCLBUTTONDOWN (wParam, lParam);
if (result != null) return result;
/*
@@ -2378,7 +2503,7 @@ LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (!display.ignoreRestoreFocus) return result;
Display display = this.display;
display.lockActiveWindow = true;
- long /*int*/ code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_NCLBUTTONDOWN, wParam, lParam);
display.lockActiveWindow = false;
Control focusControl = display.lastHittestControl;
if (focusControl != null && !focusControl.isDisposed ()) {
@@ -2390,23 +2515,7 @@ LRESULT WM_NCLBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PALETTECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
- if (wParam != handle) {
- long /*int*/ hPalette = display.hPalette;
- if (hPalette != 0) return selectPalette (hPalette);
- }
- return super.WM_PALETTECHANGED (wParam, lParam);
-}
-
-@Override
-LRESULT WM_QUERYNEWPALETTE (long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ hPalette = display.hPalette;
- if (hPalette != 0) return selectPalette (hPalette);
- return super.WM_QUERYNEWPALETTE (wParam, lParam);
-}
-
-@Override
-LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETCURSOR (long wParam, long lParam) {
/*
* Feature in Windows. When the shell is disabled
* by a Windows standard dialog (like a MessageBox
@@ -2420,14 +2529,14 @@ LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
if (!Display.TrimEnabled) {
Shell modalShell = display.getModalShell ();
if (modalShell != null && !isActive ()) {
- long /*int*/ hwndModal = modalShell.handle;
+ long hwndModal = modalShell.handle;
if (OS.IsWindowEnabled (hwndModal)) {
OS.SetActiveWindow (hwndModal);
}
}
}
if (!OS.IsWindowEnabled (handle)) {
- long /*int*/ hwndPopup = OS.GetLastActivePopup (handle);
+ long hwndPopup = OS.GetLastActivePopup (handle);
if (hwndPopup != 0 && hwndPopup != handle) {
if (display.getControl (hwndPopup) == null) {
if (OS.IsWindowEnabled (hwndPopup)) {
@@ -2477,7 +2586,7 @@ LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SHOWWINDOW (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SHOWWINDOW (long wParam, long lParam) {
LRESULT result = super.WM_SHOWWINDOW (wParam, lParam);
if (result != null) return result;
/*
@@ -2500,7 +2609,7 @@ LRESULT WM_SHOWWINDOW (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam,lParam);
if (result != null) return result;
WINDOWPOS lpwp = new WINDOWPOS ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
index a3e9d04da7..66d6f7a6d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
@@ -14,10 +14,10 @@
package org.eclipse.swt.widgets;
-import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.win32.*;
/**
* Instances of this class are selectable user interface
@@ -76,7 +76,7 @@ import org.eclipse.swt.events.*;
public class Slider extends Control {
int increment, pageIncrement;
boolean ignoreFocus;
- static final long /*int*/ ScrollBarProc;
+ static final long ScrollBarProc;
static final TCHAR ScrollBarClass = new TCHAR (0, "SCROLLBAR", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -158,7 +158,7 @@ public void addSelectionListener (SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
/*
* Feature in Windows. Windows runs a modal message
@@ -197,6 +197,12 @@ static int checkStyle (int style) {
}
@Override
+void createHandle () {
+ super.createHandle();
+ maybeEnableDarkSystemTheme();
+}
+
+@Override
void createWidget () {
super.createWidget ();
increment = 1;
@@ -483,7 +489,7 @@ public void setPageIncrement (int value) {
pageIncrement = value;
}
-boolean SetScrollInfo (long /*int*/ hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
+boolean SetScrollInfo (long hwnd, int flags, SCROLLINFO info, boolean fRedraw) {
/*
* Feature in Windows. Using SIF_DISABLENOSCROLL,
* SetScrollInfo () can change enabled and disabled
@@ -637,39 +643,39 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return ScrollBarProc;
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_KEYDOWN (wParam, lParam);
- if (result != null) return result;
- if ((style & SWT.VERTICAL) != 0) return result;
- /*
- * Bug in Windows. When a horizontal scroll bar is mirrored,
- * the native control does not correctly swap the arrow keys.
- * The fix is to swap them before calling the scroll bar window
- * proc.
- *
- * NOTE: This fix is not ideal. It breaks when the bug is fixed
- * in the operating system.
- */
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
+ LRESULT result = super.WM_KEYDOWN (wParam, lParam);
+ if (result != null) return result;
+ if ((style & SWT.VERTICAL) != 0) return result;
+ /*
+ * Bug in Windows. When a horizontal scroll bar is mirrored,
+ * the native control does not correctly swap the arrow keys.
+ * The fix is to swap them before calling the scroll bar window
+ * proc.
+ *
+ * NOTE: This fix is not ideal. It breaks when the bug is fixed
+ * in the operating system.
+ */
if ((style & SWT.MIRRORED) != 0) {
- switch ((int)/*64*/wParam) {
- case OS.VK_LEFT:
+ switch ((int)wParam) {
+ case OS.VK_LEFT:
case OS.VK_RIGHT: {
int key = wParam == OS.VK_LEFT ? OS.VK_RIGHT : OS.VK_LEFT;
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
- return new LRESULT (code);
- }
- }
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
+ return new LRESULT (code);
+ }
+ }
}
- return result;
+ return result;
}
@Override
-LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long wParam, long lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -694,14 +700,14 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
* release the automatic capture.
*/
if (OS.GetCapture () == handle) OS.ReleaseCapture ();
- if (!sendMouseEvent (SWT.MouseUp, 1, handle, OS.WM_LBUTTONUP, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseUp, 1, handle, lParam)) {
return LRESULT.ZERO;
}
return result;
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
/*
* Feature in Windows. Windows uses the WS_TABSTOP
* style for the scroll bar to decide that focus
@@ -726,20 +732,20 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* release the automatic capture.
*/
if (OS.GetCapture () == handle) OS.ReleaseCapture ();
- if (!sendMouseEvent (SWT.MouseUp, 1, handle, OS.WM_LBUTTONUP, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseUp, 1, handle, lParam)) {
return LRESULT.ONE;
}
return result;
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
if (ignoreFocus) return null;
return super.WM_SETFOCUS (wParam, lParam);
}
@Override
-LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScrollChild (long wParam, long lParam) {
/* Do nothing when scrolling is ending */
int code = OS.LOWORD (wParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
index 1c5c4cb0b0..da0746e1d6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
@@ -45,12 +45,12 @@ import org.eclipse.swt.internal.win32.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class Spinner extends Composite {
- long /*int*/ hwndText, hwndUpDown;
+ long hwndText, hwndUpDown;
boolean ignoreModify, ignoreCharacter;
int pageIncrement, digits;
- static final long /*int*/ EditProc;
+ static final long EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
- static final long /*int*/ UpDownProc;
+ static final long UpDownProc;
static final TCHAR UpDownClass = new TCHAR (0, OS.UPDOWN_CLASS, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -111,7 +111,7 @@ public Spinner (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
if (hwnd == hwndText) {
return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
@@ -134,11 +134,6 @@ static int checkStyle (int style) {
}
@Override
-boolean checkHandle (long /*int*/ hwnd) {
- return hwnd == handle || hwnd == hwndText || hwnd == hwndUpDown;
-}
-
-@Override
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
@@ -147,52 +142,39 @@ protected void checkSubclass () {
void createHandle () {
super.createHandle ();
state &= ~(CANVAS | THEME_BACKGROUND);
- long /*int*/ hInstance = OS.GetModuleHandle (null);
- int textExStyle = (style & SWT.BORDER) != 0 ? OS.WS_EX_CLIENTEDGE : 0;
+ long hInstance = OS.GetModuleHandle (null);
+ int textExStyle = 0;
int textStyle = OS.WS_CHILD | OS.WS_VISIBLE | OS.ES_AUTOHSCROLL | OS.WS_CLIPSIBLINGS;
if ((style & SWT.READ_ONLY) != 0) textStyle |= OS.ES_READONLY;
if ((style & SWT.RIGHT_TO_LEFT) != 0) textExStyle |= OS.WS_EX_LAYOUTRTL;
hwndText = OS.CreateWindowEx (
- textExStyle,
- EditClass,
- null,
- textStyle,
- 0, 0, 0, 0,
- handle,
- 0,
- hInstance,
- null);
+ textExStyle,
+ EditClass,
+ null,
+ textStyle,
+ 0, 0, 0, 0,
+ handle,
+ 0,
+ hInstance,
+ null);
if (hwndText == 0) error (SWT.ERROR_NO_HANDLES);
OS.SetWindowLongPtr (hwndText, OS.GWLP_ID, hwndText);
int upDownStyle = OS.WS_CHILD | OS.WS_VISIBLE | OS.UDS_AUTOBUDDY;
if ((style & SWT.WRAP) != 0) upDownStyle |= OS.UDS_WRAP;
- if ((style & SWT.BORDER) != 0) {
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- upDownStyle |= OS.UDS_ALIGNLEFT;
- } else {
- upDownStyle |= OS.UDS_ALIGNRIGHT;
- }
- }
hwndUpDown = OS.CreateWindowEx (
- 0,
- UpDownClass,
- null,
- upDownStyle,
- 0, 0, 0, 0,
- handle,
- 0,
- hInstance,
- null);
+ 0,
+ UpDownClass,
+ null,
+ upDownStyle,
+ 0, 0, 0, 0,
+ handle,
+ 0,
+ hInstance,
+ null);
if (hwndUpDown == 0) error (SWT.ERROR_NO_HANDLES);
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
OS.SetWindowPos (hwndText, hwndUpDown, 0, 0, 0, 0, flags);
OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_ID, hwndUpDown);
- if (OS.IsDBLocale) {
- long /*int*/ hIMC = OS.ImmGetContext (handle);
- OS.ImmAssociateContext (hwndText, hIMC);
- OS.ImmAssociateContext (hwndUpDown, hIMC);
- OS.ImmReleaseContext (handle, hIMC);
- }
OS.SendMessage (hwndUpDown, OS.UDM_SETRANGE32, 0, 100);
OS.SendMessage (hwndUpDown, OS.UDM_SETPOS32, 0, 0);
pageIncrement = 10;
@@ -284,17 +266,12 @@ void addVerifyListener (VerifyListener listener) {
addListener (SWT.Verify, typedListener);
}
-@Override
-long /*int*/ borderHandle () {
- return hwndText;
-}
-
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (hwndText);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (hwndText);
newFont = OS.SendMessage (hwndText, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = new TEXTMETRIC ();
@@ -305,7 +282,7 @@ long /*int*/ borderHandle () {
OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, null, max);
String string = String.valueOf (max [0]);
if (digits > 0) {
- StringBuffer buffer = new StringBuffer ();
+ StringBuilder buffer = new StringBuilder ();
buffer.append (string);
buffer.append (getDecimalSeparator ());
int count = digits - string.length ();
@@ -325,13 +302,15 @@ long /*int*/ borderHandle () {
if (width == 0) width = DEFAULT_WIDTH;
if (height == 0) height = DEFAULT_HEIGHT;
if (wHint != SWT.DEFAULT) width = wHint;
- if (hHint != SWT.DEFAULT) height = hHint;
- Rectangle trim = computeTrimInPixels (0, 0, width, height);
- if (hHint == SWT.DEFAULT) {
- int upDownHeight = OS.GetSystemMetrics (OS.SM_CYVSCROLL) + 2 * getBorderWidthInPixels ();
- upDownHeight += (style & SWT.BORDER) != 0 ? 1 : 3;
- trim.height = Math.max (trim.height, upDownHeight);
+ if (hHint != SWT.DEFAULT)
+ height = hHint;
+ else {
+ int borderAdjustment = (style & SWT.BORDER) != 0 ? -1 : 3;
+ int upDownHeight = OS.GetSystemMetrics (OS.SM_CYVSCROLL);
+ height = Math.max(height, upDownHeight + borderAdjustment);
}
+
+ Rectangle trim = computeTrimInPixels (0, 0, width, height);
return new Point (trim.width, trim.height);
}
@@ -341,8 +320,16 @@ long /*int*/ borderHandle () {
/* Get the trim of the text control */
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
- int bits0 = OS.GetWindowLong (hwndText, OS.GWL_STYLE);
- int bits1 = OS.GetWindowLong (hwndText, OS.GWL_EXSTYLE);
+ int bits0 = OS.GetWindowLong (handle, OS.GWL_STYLE);
+ int bits1 = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
+ /*
+ * For a very long time, border was WS_EX_CLIENTEDGE. Now that is was
+ * changed to WS_BORDER, preserve old size for compatibility reasons.
+ */
+ if ((bits0 & OS.WS_BORDER) != 0) {
+ bits0 &= ~OS.WS_BORDER;
+ bits1 |= OS.WS_EX_CLIENTEDGE;
+ }
OS.AdjustWindowRectEx (rect, bits0, false, bits1);
width = rect.right - rect.left;
height = rect.bottom - rect.top;
@@ -353,7 +340,7 @@ long /*int*/ borderHandle () {
* the single-line text widget in an editable combo
* box.
*/
- long /*int*/ margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
+ long margins = OS.SendMessage (hwndText, OS.EM_GETMARGINS, 0, 0);
x -= OS.LOWORD (margins);
width += OS.LOWORD (margins) + OS.HIWORD (margins);
if ((style & SWT.BORDER) != 0) {
@@ -421,7 +408,7 @@ void deregister () {
@Override
boolean hasFocus () {
- long /*int*/ hwndFocus = OS.GetFocus ();
+ long hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) return true;
if (hwndFocus == hwndText) return true;
if (hwndFocus == hwndUpDown) return true;
@@ -529,7 +516,7 @@ public int getPageIncrement () {
*/
public int getSelection () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ return (int)OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
int getSelectionText (boolean [] parseFail) {
@@ -617,7 +604,12 @@ public String getText () {
*/
public int getTextLimit () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ return (int)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+}
+
+@Override
+boolean isUseWsBorder () {
+ return true;
}
/**
@@ -725,7 +717,7 @@ void removeVerifyListener (VerifyListener listener) {
}
@Override
-boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long wParam, long lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -797,7 +789,7 @@ boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lPara
}
@Override
-void setBackgroundImage (long /*int*/ hBitmap) {
+void setBackgroundImage (long hBitmap) {
super.setBackgroundImage (hBitmap);
OS.InvalidateRect (hwndText, null, true);
}
@@ -833,7 +825,7 @@ public void setDigits (int value) {
if (value < 0) error (SWT.ERROR_INVALID_ARGUMENT);
if (value == this.digits) return;
this.digits = value;
- int pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ int pos = (int)OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
setSelection (pos, false, true, false);
}
@@ -858,14 +850,14 @@ void setForegroundPixel (int pixel) {
public void setIncrement (int value) {
checkWidget ();
if (value < 1) return;
- long /*int*/ hHeap = OS.GetProcessHeap ();
- int count = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 0, (UDACCEL)null);
- long /*int*/ udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count);
+ long hHeap = OS.GetProcessHeap ();
+ int count = (int)OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 0, (UDACCEL)null);
+ long udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count);
OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, count, udaccels);
int first = -1;
UDACCEL udaccel = new UDACCEL ();
for (int i = 0; i < count; i++) {
- long /*int*/ offset = udaccels + (i * UDACCEL.sizeof);
+ long offset = udaccels + (i * UDACCEL.sizeof);
OS.MoveMemory (udaccel, offset, UDACCEL.sizeof);
if (first == -1) first = udaccel.nInc;
udaccel.nInc = udaccel.nInc / first * value;
@@ -893,7 +885,7 @@ public void setMaximum (int value) {
int [] min = new int [1];
OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, min, null);
if (value < min [0]) return;
- int pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ int pos = (int)OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
OS.SendMessage (hwndUpDown , OS.UDM_SETRANGE32, min [0], value);
if (pos > value) setSelection (value, true, true, false);
}
@@ -916,7 +908,7 @@ public void setMinimum (int value) {
int [] max = new int [1];
OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, null, max);
if (value > max [0]) return;
- int pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ int pos = (int)OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
OS.SendMessage (hwndUpDown , OS.UDM_SETRANGE32, value, max [0]);
if (pos < value) setSelection (value, true, true, false);
}
@@ -972,7 +964,7 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) {
string = String.valueOf (Math.abs (value));
String decimalSeparator = getDecimalSeparator ();
int index = string.length () - digits;
- StringBuffer buffer = new StringBuffer ();
+ StringBuilder buffer = new StringBuilder ();
if (value < 0) buffer.append ("-");
if (index > 0) {
buffer.append (string.substring (0, index));
@@ -1073,7 +1065,7 @@ public void setValues (int selection, int minimum, int maximum, int digits, int
@Override
void subclass () {
super.subclass ();
- long /*int*/ newProc = display.windowProc;
+ long newProc = display.windowProc;
OS.SetWindowLongPtr (hwndText, OS.GWLP_WNDPROC, newProc);
OS.SetWindowLongPtr (hwndUpDown, OS.GWLP_WNDPROC, newProc);
}
@@ -1142,12 +1134,7 @@ String verifyText (String string, int start, int end, Event keyEvent) {
}
@Override
-int widgetExtStyle () {
- return super.widgetExtStyle () & ~OS.WS_EX_CLIENTEDGE;
-}
-
-@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
if (hwnd == hwndText || hwnd == hwndUpDown) {
LRESULT result = null;
switch (msg) {
@@ -1208,26 +1195,26 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
super.WM_ERASEBKGND (wParam, lParam);
drawBackground (wParam);
return LRESULT.ONE;
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
return null;
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
OS.SetFocus (hwndText);
OS.SendMessage (hwndText, OS.EM_SETSEL, 0, -1);
return null;
}
@Override
-LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFONT (long wParam, long lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
OS.SendMessage (hwndText, OS.WM_SETFONT, wParam, lParam);
@@ -1235,26 +1222,38 @@ LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
if (isDisposed ()) return result;
int width = OS.LOWORD (lParam), height = OS.HIWORD (lParam);
- int upDownWidth = OS.GetSystemMetrics (OS.SM_CXVSCROLL);
+ int upDownWidth = OS.GetSystemMetrics (OS.SM_CXVSCROLL) - 1;
int textWidth = width - upDownWidth;
- int border = OS.GetSystemMetrics (OS.SM_CXEDGE);
+
+ /*
+ * For consistency, make text's vertical position the same as in
+ * Text control. The difference only occurs when Spinner uses
+ * WS_BORDER while Text uses WS_EX_CLIENTEDGE.
+ */
+ int borderAdjustment = 0;
+ if (((style & SWT.BORDER) != 0) && !display.useWsBorderText) {
+ borderAdjustment = OS.GetSystemMetrics (OS.SM_CYEDGE) - OS.GetSystemMetrics (OS.SM_CYBORDER);
+ /* There is an unexplained 1px additional offset in Windows */
+ borderAdjustment++;
+ }
+
int flags = OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE;
- OS.SetWindowPos (hwndText, 0, 0, 0, textWidth + border, height, flags);
+ OS.SetWindowPos (hwndText, 0, 0, borderAdjustment, textWidth, height - borderAdjustment, flags);
OS.SetWindowPos (hwndUpDown, 0, textWidth, 0, upDownWidth, height, flags);
return result;
}
@Override
-LRESULT wmIMEChar(long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmIMEChar(long hwnd, long wParam, long lParam) {
/* Process a DBCS character */
Display display = this.display;
display.lastKey = 0;
- display.lastAscii = (int)/*64*/wParam;
+ display.lastAscii = (int)wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ZERO;
@@ -1268,7 +1267,7 @@ LRESULT wmIMEChar(long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
* them to the application.
*/
ignoreCharacter = true;
- long /*int*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+ long result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, hwnd, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -1284,7 +1283,7 @@ LRESULT wmIMEChar(long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmChar (long hwnd, long wParam, long lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmChar (hwnd, wParam, lParam);
if (result != null) return result;
@@ -1295,7 +1294,7 @@ LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to look for these keys and not call
* the window proc.
*/
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case SWT.CR:
sendSelectionEvent (SWT.DefaultSelection);
// FALL THROUGH
@@ -1305,7 +1304,7 @@ LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return result;
}
-LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmClipboard (long hwndText, int msg, long wParam, long lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
// if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -1355,11 +1354,11 @@ LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /
}
TCHAR buffer = new TCHAR (getCodePage (), newText, true);
if (msg == OS.WM_SETTEXT) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int byteCount = buffer.length () * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- long /*int*/ code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
+ long code = OS.CallWindowProc (EditProc, hwndText, msg, wParam, pszText);
OS.HeapFree (hHeap, 0, pszText);
return new LRESULT (code);
} else {
@@ -1372,7 +1371,7 @@ LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
@@ -1380,7 +1379,7 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
if (!parseFail [0]) {
- int pos = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ int pos = (int)OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
if (pos != value) setSelection (value, true, false, true);
}
sendEvent (SWT.Modify);
@@ -1391,7 +1390,7 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmKeyDown (long hwnd, long wParam, long lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
@@ -1400,7 +1399,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
UDACCEL udaccel = new UDACCEL ();
OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 1, udaccel);
int delta = 0;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_UP: delta = udaccel.nInc; break;
case OS.VK_DOWN: delta = -udaccel.nInc; break;
case OS.VK_PRIOR: delta = pageIncrement; break;
@@ -1410,7 +1409,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
if (parseFail [0]) {
- value = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ value = (int)OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
}
int newValue = value + delta;
int [] max = new int [1], min = new int [1];
@@ -1424,7 +1423,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
}
/* Stop the edit control from moving the caret */
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_UP:
case OS.VK_DOWN:
return LRESULT.ZERO;
@@ -1433,18 +1432,18 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
}
@Override
-LRESULT wmKillFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmKillFocus (long hwnd, long wParam, long lParam) {
boolean [] parseFail = new boolean [1];
int value = getSelectionText (parseFail);
if (parseFail [0]) {
- value = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
+ value = (int)OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0);
setSelection (value, false, true, false);
}
return super.wmKillFocus (hwnd, wParam, lParam);
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.UDN_DELTAPOS:
NMUPDOWN lpnmud = new NMUPDOWN ();
@@ -1474,7 +1473,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmScrollChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmScrollChild (long wParam, long lParam) {
int code = OS.LOWORD (wParam);
switch (code) {
case OS.SB_THUMBPOSITION:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
index ea336bef0c..ddd8df6bc8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
@@ -53,7 +53,7 @@ import org.eclipse.swt.internal.win32.*;
public class TabFolder extends Composite {
TabItem [] items;
ImageList imageList;
- static final long /*int*/ TabFolderProc;
+ static final long TabFolderProc;
static final TCHAR TabFolderClass = new TCHAR (0, OS.WC_TABCONTROL, true);
boolean createdAsRTL;
@@ -159,7 +159,7 @@ public void addSelectionListener(SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
return OS.CallWindowProc (TabFolderProc, hwnd, msg, wParam, lParam);
}
@@ -188,7 +188,7 @@ protected void checkSubclass () {
RECT insetRect = new RECT (), itemRect = new RECT ();
OS.SendMessage (handle, OS.TCM_ADJUSTRECT, 0, insetRect);
int width = insetRect.left - insetRect.right;
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (count != 0) {
OS.SendMessage (handle, OS.TCM_GETITEMRECT, count - 1, itemRect);
width = Math.max (width, itemRect.right - insetRect.right);
@@ -217,7 +217,7 @@ protected void checkSubclass () {
}
void createItem (TabItem item, int index) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
if (count == items.length) {
TabItem [] newItems = new TabItem [items.length + 4];
@@ -256,7 +256,7 @@ void createHandle () {
* is set. The fix is to set TTM_SETMAXTIPWIDTH to
* a large value.
*/
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
createdAsRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
@@ -269,14 +269,14 @@ void createWidget () {
}
void destroyItem (TabItem item) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
int index = 0;
while (index < count) {
if (items [index] == item) break;
index++;
}
if (index == count) return;
- int selectionIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int selectionIndex = (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (OS.SendMessage (handle, OS.TCM_DELETEITEM, index, 0) == 0) {
error (SWT.ERROR_ITEM_NOT_REMOVED);
}
@@ -296,7 +296,7 @@ void destroyItem (TabItem item) {
}
@Override
-void drawThemeBackground (long /*int*/ hDC, long /*int*/ hwnd, RECT rect) {
+void drawThemeBackground (long hDC, long hwnd, RECT rect) {
RECT rect2 = new RECT ();
OS.GetClientRect (handle, rect2);
OS.MapWindowPoints (handle, hwnd, rect2, 2);
@@ -339,7 +339,7 @@ Control findThemeControl () {
*/
public TabItem getItem (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
return items [index];
}
@@ -368,7 +368,7 @@ public TabItem getItem (Point point) {
TCHITTESTINFO pinfo = new TCHITTESTINFO ();
pinfo.x = point.x;
pinfo.y = point.y;
- int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_HITTEST, 0, pinfo);
+ int index = (int)OS.SendMessage (handle, OS.TCM_HITTEST, 0, pinfo);
if (index == -1) return null;
return items [index];
}
@@ -385,7 +385,7 @@ public TabItem getItem (Point point) {
*/
public int getItemCount () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
}
/**
@@ -406,7 +406,7 @@ public int getItemCount () {
*/
public TabItem [] getItems () {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
TabItem [] result = new TabItem [count];
System.arraycopy (items, 0, result, 0, count);
return result;
@@ -430,7 +430,7 @@ public TabItem [] getItems () {
*/
public TabItem [] getSelection () {
checkWidget ();
- int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index == -1) return new TabItem [0];
return new TabItem [] {items [index]};
}
@@ -448,7 +448,7 @@ public TabItem [] getSelection () {
*/
public int getSelectionIndex () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
}
int imageIndex (Image image) {
@@ -461,7 +461,7 @@ int imageIndex (Image image) {
Rectangle bounds = image.getBoundsInPixels ();
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.add (image);
- long /*int*/ hImageList = imageList.getHandle ();
+ long hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -494,7 +494,7 @@ int imageIndex (Image image) {
public int indexOf (TabItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
if (items [i] == item) return i;
}
@@ -503,12 +503,10 @@ public int indexOf (TabItem item) {
@Override
Point minimumSize (int wHint, int hHint, boolean flushCache) {
- Control [] children = _getChildren ();
int width = 0, height = 0;
- for (int i=0; i<children.length; i++) {
- Control child = children [i];
+ for (Control child : _getChildren ()) {
int index = 0;
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
while (index < count) {
if (items [index].control == child) break;
index++;
@@ -549,8 +547,7 @@ boolean mnemonicHit (char key) {
@Override
boolean mnemonicMatch (char key) {
- for (int i=0; i<items.length; i++) {
- TabItem item = items [i];
+ for (TabItem item : items) {
if (item != null) {
char ch = findMnemonic (item.getText ());
if (Character.toUpperCase (key) == Character.toUpperCase (ch)) {
@@ -564,7 +561,7 @@ boolean mnemonicMatch (char key) {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TabItem item = items [i];
if (item != null && !item.isDisposed ()) {
@@ -589,7 +586,7 @@ void releaseWidget () {
@Override
void removeControl (Control control) {
super.removeControl (control);
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TabItem item = items [i];
if (item.control == control) item.setControl (null);
@@ -625,7 +622,7 @@ public void removeSelectionListener (SelectionListener listener) {
@Override
void reskinChildren (int flags) {
if (items != null) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TabItem item = items [i];
if (item != null) item.reskin (flags);
@@ -693,7 +690,7 @@ public void setFont (Font font) {
Rectangle newRect = getClientAreaInPixels ();
if (!oldRect.equals (newRect)) {
sendResize ();
- int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index != -1) {
TabItem item = items [index];
Control control = item.control;
@@ -719,13 +716,13 @@ public void setFont (Font font) {
*/
public void setSelection (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) return;
setSelection (index, false);
}
void setSelection (int index, boolean notify) {
- int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int oldIndex = (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (oldIndex == index) return;
if (oldIndex != -1) {
TabItem item = items [oldIndex];
@@ -735,7 +732,7 @@ void setSelection (int index, boolean notify) {
}
}
OS.SendMessage (handle, OS.TCM_SETCURSEL, index, 0);
- int newIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int newIndex = (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (newIndex != -1) {
TabItem item = items [newIndex];
Control control = item.control;
@@ -770,8 +767,8 @@ String toolTipText (NMTTDISPINFO hdr) {
if ((hdr.uFlags & OS.TTF_IDISHWND) != 0) {
return null;
}
- int index = (int)/*64*/hdr.idFrom;
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ int index = (int)hdr.idFrom;
+ long hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
/*
* Bug in Windows. For some reason the reading order
@@ -817,7 +814,7 @@ boolean traversePage (boolean next) {
@Override
void updateOrientation () {
super.updateOrientation ();
- long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
char [] buffer = new char [128];
int length = OS.GetClassName (hwndChild, buffer, buffer.length);
@@ -845,7 +842,7 @@ void updateOrientation () {
Point size = imageList.getImageSize ();
display.releaseImageList (imageList);
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, size.x, size.y);
- long /*int*/ hImageList = imageList.getHandle ();
+ long hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_IMAGE;
@@ -882,12 +879,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return TabFolderProc;
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -899,7 +896,7 @@ LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETOBJECT (long wParam, long lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for publishing the keyboard shortcut
@@ -910,10 +907,10 @@ LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT:
/*
@@ -922,10 +919,10 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to replace VK_LEFT by VK_RIGHT and VK_RIGHT by VK_LEFT
* when the current orientation differs from the orientation used to
* create the control.
- */
+ */
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
return new LRESULT (code);
}
break;
@@ -934,7 +931,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSELEAVE (long wParam, long lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -950,7 +947,7 @@ LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
*/
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
@@ -961,7 +958,7 @@ LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NCHITTEST (long wParam, long lParam) {
LRESULT result = super.WM_NCHITTEST (wParam, lParam);
if (result != null) return result;
/*
@@ -976,12 +973,12 @@ LRESULT WM_NCHITTEST (long /*int*/ wParam, long /*int*/ lParam) {
* default window proc that returns HTCLIENT when
* the mouse is in the client area.
*/
- long /*int*/ hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
+ long hittest = OS.DefWindowProc (handle, OS.WM_NCHITTEST, wParam, lParam);
return new LRESULT (hittest);
}
@Override
-LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NOTIFY (long wParam, long lParam) {
/*
* Feature in Windows. When the tab folder window
* proc processes WM_NOTIFY, it forwards this
@@ -1006,7 +1003,7 @@ LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PARENTNOTIFY (long wParam, long lParam) {
LRESULT result = super.WM_PARENTNOTIFY (wParam, lParam);
if (result != null) return result;
/*
@@ -1022,7 +1019,7 @@ LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
switch (code) {
case OS.WM_CREATE: {
int id = OS.HIWORD (wParam);
- long /*int*/ hwnd = lParam;
+ long hwnd = lParam;
if (id == ID_UPDOWN) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwnd, OS.GWL_EXSTYLE, bits | OS.WS_EX_LAYOUTRTL);
@@ -1035,7 +1032,7 @@ LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
LRESULT result = super.WM_SIZE (wParam, lParam);
/*
* It is possible (but unlikely), that application
@@ -1045,7 +1042,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
* WM_SIZE message.
*/
if (isDisposed ()) return result;
- int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index != -1) {
TabItem item = items [index];
Control control = item.control;
@@ -1057,7 +1054,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (!OS.IsWindowVisible (handle)) return result;
@@ -1107,13 +1104,13 @@ LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
int code = hdr.code;
switch (code) {
case OS.TCN_SELCHANGE:
case OS.TCN_SELCHANGING:
TabItem item = null;
- int index = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
if (index != -1) item = items [index];
if (item != null) {
Control control = item.control;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
index adec2a5955..ac4a3f89b6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java
@@ -135,11 +135,11 @@ void _setText (int index, String string) {
if (j < i) string = new String (text, 0, j);
}
}
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hwnd = parent.handle;
+ long hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);
int byteCount = buffer.length () * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_TEXT;
@@ -314,7 +314,7 @@ public void setImage (Image image) {
* whenever the image or text is changed.
*/
if (text.indexOf ('&') != -1) _setText (index, text);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TCITEM tcItem = new TCITEM ();
tcItem.mask = OS.TCIF_IMAGE;
tcItem.iImage = parent.imageIndex (image);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index 90f908fd0b..73e0392dd2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -84,7 +84,7 @@ public class Table extends Composite {
TableColumn sortColumn;
RECT focusRect;
boolean [] columnVisible;
- long /*int*/ headerToolTipHandle, hwndHeader;
+ long headerToolTipHandle, hwndHeader, itemToolTipHandle;
boolean ignoreCustomDraw, ignoreDrawForeground, ignoreDrawBackground, ignoreDrawFocus, ignoreDrawSelection, ignoreDrawHot;
boolean customDraw, dragStarted, explorerTheme, firstColumnImage, fixScrollWidth, tipRequested, wasSelected, wasResized, painted;
boolean ignoreActivate, ignoreSelect, ignoreShrink, ignoreResize, ignoreColumnMove, ignoreColumnResize, fullRowSelect, settingItemHeight;
@@ -92,7 +92,7 @@ public class Table extends Composite {
int itemHeight, lastIndexOf, lastWidth, sortDirection, resizeCount, selectionForeground, hotIndex;
int headerBackground = -1;
int headerForeground = -1;
- static /*final*/ long /*int*/ HeaderProc;
+ static /*final*/ long HeaderProc;
static final int INSET = 4;
static final int GRID_WIDTH = 1;
static final int SORT_WIDTH = 10;
@@ -104,7 +104,7 @@ public class Table extends Composite {
static final int V_SCROLL_LIMIT = 16;
static final int DRAG_IMAGE_SIZE = 301;
static boolean COMPRESS_ITEMS = true;
- static final long /*int*/ TableProc;
+ static final long TableProc;
static final TCHAR TableClass = new TCHAR (0, OS.WC_LISTVIEW, true);
static final TCHAR HeaderClass = new TCHAR (0, OS.WC_HEADER, true);
static {
@@ -221,7 +221,7 @@ void _checkShrink () {
if (keys == null) {
if (!ignoreShrink) {
/* Resize the item array to match the item count */
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
/*
* Bug in Windows. Call to OS.LVM_GETITEMCOUNT unexpectedly returns zero,
@@ -288,26 +288,26 @@ TableItem _getItem (int index, boolean create, int count) {
if ((style & SWT.VIRTUAL) == 0 || !create) {
return keyIndex < 0 ? null : items [keyIndex];
}
- if (keyIndex < 0) {
- if (count == -1) {
- count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
- }
- //TODO - _checkGrow() doesn't return a value, check keys == null instead
- if (_checkGrow (count)) {
- if (items [index] != null) return items [index];
- return items [index] = new TableItem (this, SWT.NONE, -1, false);
- }
- keyIndex = -keyIndex - 1;
- if (keyIndex < keyCount) {
- System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
- System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
- }
- keyCount++;
- keys [keyIndex] = index;
- } else {
- if (items [keyIndex] != null) return items [keyIndex];
- }
- return items [keyIndex] = new TableItem (this, SWT.NONE, -1, false);
+ if (keyIndex < 0) {
+ if (count == -1) {
+ count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ }
+ //TODO - _checkGrow() doesn't return a value, check keys == null instead
+ if (_checkGrow (count)) {
+ if (items [index] != null) return items [index];
+ return items [index] = new TableItem (this, SWT.NONE, -1, false);
+ }
+ keyIndex = -keyIndex - 1;
+ if (keyIndex < keyCount) {
+ System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
+ System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
+ }
+ keyCount++;
+ keys [keyIndex] = index;
+ } else {
+ if (items [keyIndex] != null) return items [keyIndex];
+ }
+ return items [keyIndex] = new TableItem (this, SWT.NONE, -1, false);
}
}
@@ -344,13 +344,13 @@ void _insertItem (int index, TableItem item, int count) {
items [index] = item;
} else {
int keyIndex = binarySearch (keys, 0, keyCount, index);
- if (keyIndex < 0) keyIndex = -keyIndex - 1;
- System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
- keys [keyIndex] = index;
- System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
- items [keyIndex] = item;
- keyCount++;
- for (int i=keyIndex + 1; i<keyCount; i++) keys[i]++;
+ if (keyIndex < 0) keyIndex = -keyIndex - 1;
+ System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
+ keys [keyIndex] = index;
+ System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
+ items [keyIndex] = item;
+ keyCount++;
+ for (int i=keyIndex + 1; i<keyCount; i++) keys[i]++;
}
}
@@ -360,16 +360,16 @@ void _removeItem (int index, int count) {
items [count] = null;
} else {
int keyIndex = binarySearch (keys, 0, keyCount, index);
- if (keyIndex < 0) {
- keyIndex = -keyIndex - 1;
- } else {
- --keyCount;
- System.arraycopy (keys, keyIndex + 1, keys, keyIndex, keyCount - keyIndex);
- keys [keyCount] = 0;
- System.arraycopy (items, keyIndex + 1, items, keyIndex, keyCount - keyIndex);
- items [keyCount] = null;
- }
- for (int i=keyIndex; i<keyCount; i++) --keys[i];
+ if (keyIndex < 0) {
+ keyIndex = -keyIndex - 1;
+ } else {
+ --keyCount;
+ System.arraycopy (keys, keyIndex + 1, keys, keyIndex, keyCount - keyIndex);
+ keys [keyCount] = 0;
+ System.arraycopy (items, keyIndex + 1, items, keyIndex, keyCount - keyIndex);
+ items [keyCount] = null;
+ }
+ for (int i=keyIndex; i<keyCount; i++) --keys[i];
}
}
@@ -403,9 +403,9 @@ void _setItemCount (int count, int itemCount) {
} else {
int index = Math.min (count, itemCount);
keyCount = binarySearch (keys, 0, keyCount, index);
- if (keyCount < 0) keyCount = -keyCount - 1;
- int length = Math.max (4, (keyCount + 3) / 4 * 4);
- int [] newKeys = new int [length];
+ if (keyCount < 0) keyCount = -keyCount - 1;
+ int length = Math.max (4, (keyCount + 3) / 4 * 4);
+ int [] newKeys = new int [length];
System.arraycopy (keys, 0, newKeys, 0, keyCount);
keys = newKeys;
TableItem [] newItems = new TableItem [length];
@@ -450,11 +450,11 @@ public void addSelectionListener (SelectionListener listener) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
return callWindowProc (hwnd, msg, wParam, lParam, false);
}
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam, boolean forceSelect) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam, boolean forceSelect) {
if (handle == 0) return 0;
if (hwndHeader != 0 && hwnd == hwndHeader) {
return OS.CallWindowProc (HeaderProc, hwnd, msg, wParam, lParam);
@@ -525,7 +525,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
case OS.WM_SETFONT:
case OS.WM_TIMER: {
if (findImageControl () != null) {
- topIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
+ topIndex = (int)OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
}
}
}
@@ -544,7 +544,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
if (msg == OS.WM_PAINT) {
int bits0 = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits0 & OS.LVS_NOCOLUMNHEADER) == 0) {
- long /*int*/ hwndParent = OS.GetParent (handle), hwndOwner = 0;
+ long hwndParent = OS.GetParent (handle), hwndOwner = 0;
while (hwndParent != 0) {
int bits1 = OS.GetWindowLong (hwndParent, OS.GWL_EXSTYLE);
if ((bits1 & OS.WS_EX_COMPOSITED) != 0) {
@@ -578,10 +578,10 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
}
}
}
- long /*int*/ code = 0;
+ long code = 0;
if (fixPaint) {
PAINTSTRUCT ps = new PAINTSTRUCT ();
- long /*int*/ hDC = OS.BeginPaint (hwnd, ps);
+ long hDC = OS.BeginPaint (hwnd, ps);
code = OS.CallWindowProc (TableProc, hwnd, OS.WM_PAINT, hDC, lParam);
OS.EndPaint (hwnd, ps);
} else {
@@ -596,7 +596,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
if (checkSelection) {
if (wasSelected || forceSelect) {
Event event = new Event ();
- int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int index = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index != -1) event.item = _getItem (index);
sendSelectionEvent (SWT.Selection, event, false);
}
@@ -624,7 +624,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
OS.InvalidateRect (handle, null, true);
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) OS.InvalidateRect (hwndHeader, null, true);
}
//FALL THROUGH
@@ -682,8 +682,8 @@ static int checkStyle (int style) {
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
-LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ hDC = nmcd.hdc;
+LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long wParam, long lParam) {
+ long hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw) {
hotIndex = -1;
if (hooks (SWT.EraseItem) && nmcd.left != nmcd.right) {
@@ -705,21 +705,21 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
if (!ignoreCustomDraw && !ignoreDrawFocus && nmcd.left != nmcd.right) {
if (OS.IsWindowVisible (handle) && OS.IsWindowEnabled (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
+ int dwExStyle = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) == 0) {
// if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
if (OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED) == nmcd.dwItemSpec) {
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
RECT rect = new RECT ();
rect.left = OS.LVIR_BOUNDS;
boolean oldIgnore = ignoreCustomDraw;
ignoreCustomDraw = true;
OS.SendMessage (handle, OS. LVM_GETITEMRECT, nmcd.dwItemSpec, rect);
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
RECT itemRect = new RECT ();
if (index == 0) {
itemRect.left = OS.LVIR_LABEL;
@@ -743,7 +743,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
return null;
}
-LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long wParam, long lParam) {
/*
* Bug in Windows. When the table has the extended style
* LVS_EX_FULLROWSELECT and LVM_SETBKCOLOR is used with
@@ -759,8 +759,8 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
if (!ignoreCustomDraw) {
if (OS.IsWindowVisible (handle) && OS.IsWindowEnabled (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
+ int dwExStyle = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) == 0) {
if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
nmcd.uItemState &= ~OS.CDIS_FOCUS;
@@ -772,10 +772,10 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
}
}
if (explorerTheme && !ignoreCustomDraw) {
- hotIndex = (nmcd.uItemState & OS.CDIS_HOT) != 0 ? (int)/*64*/nmcd.dwItemSpec : -1;
+ hotIndex = (nmcd.uItemState & OS.CDIS_HOT) != 0 ? (int)nmcd.dwItemSpec : -1;
if (hooks (SWT.EraseItem) && nmcd.left != nmcd.right) {
OS.SaveDC (nmcd.hdc);
- long /*int*/ hrgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long hrgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.SelectClipRgn (nmcd.hdc, hrgn);
OS.DeleteObject (hrgn);
}
@@ -783,7 +783,7 @@ LRESULT CDDS_ITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
return new LRESULT (OS.CDRF_NOTIFYSUBITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, long wParam, long lParam) {
if (ignoreCustomDraw) return null;
/*
* Bug in Windows. When the table has the extended style
@@ -795,8 +795,8 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
*/
if (--customCount == 0 && OS.IsWindowVisible (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
+ int dwExStyle = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) == 0) {
int bits = OS.LVS_EX_FULLROWSELECT;
/*
@@ -805,8 +805,8 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
* has a tooltip, the tooltip is hidden. The fix is to clear
* the tooltip before setting the bits and then reset it.
*/
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
- long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
+ long rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, bits);
OS.ValidateRect (handle, null);
@@ -825,7 +825,7 @@ LRESULT CDDS_POSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
return null;
}
-LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long wParam, long lParam) {
if (ignoreCustomDraw) {
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
@@ -839,8 +839,8 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lP
*/
if (customCount++ == 0 && OS.IsWindowVisible (handle)) {
if (!explorerTheme && (style & SWT.FULL_SELECTION) != 0) {
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
- int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
+ int dwExStyle = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) != 0) {
int bits = OS.LVS_EX_FULLROWSELECT;
/*
@@ -849,8 +849,8 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lP
* has a tooltip, the tooltip is hidden. The fix is to clear
* the tooltip before setting the bits and then reset it.
*/
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
- long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.LVM_SETTOOLTIPS, 0, 0);
+ long rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, 0);
OS.ValidateRect (handle, null);
@@ -876,8 +876,8 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lP
RECT rect = new RECT ();
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
if (explorerTheme && columnCount == 0) {
- long /*int*/ hDC = nmcd.hdc;
- if (OS.IsWindowEnabled (handle) || findImageControl () != null) {
+ long hDC = nmcd.hdc;
+ if (OS.IsWindowEnabled (handle) || findImageControl () != null || hasCustomBackground()) {
drawBackground (hDC, rect);
} else {
fillBackground (hDC, OS.GetSysColor (OS.COLOR_3DFACE), rect);
@@ -888,7 +888,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lP
fillImageBackground (nmcd.hdc, control, rect, 0, 0);
} else {
final boolean enabled = OS.IsWindowEnabled (handle);
- if (enabled && (int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE || !enabled && hasCustomBackground()) {
+ if (enabled && (int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE || !enabled && hasCustomBackground()) {
if (control == null) control = this;
fillBackground (nmcd.hdc, control.getBackgroundPixel (), rect);
if (OS.IsAppThemed ()) {
@@ -899,7 +899,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lP
int clrSortBk = getSortColumnPixel ();
RECT columnRect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (handle, columnRect);
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect) != 0) {
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
columnRect.left = headerRect.left;
@@ -918,10 +918,10 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lP
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
-LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long wParam, long lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- long /*int*/ hDC = nmcd.hdc;
+ long hDC = nmcd.hdc;
if (ignoreDrawForeground) OS.RestoreDC (hDC, -1);
if (OS.IsWindowVisible (handle)) {
/*
@@ -933,13 +933,13 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*
* Update region is saved and restored around LVM_SETSELECTEDCOLUMN
* to prevent infinite WM_PAINT on Vista.
*/
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
if ((sortDirection & (SWT.UP | SWT.DOWN)) != 0) {
if (sortColumn != null && !sortColumn.isDisposed ()) {
- int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn == -1) {
int newColumn = indexOf (sortColumn);
- long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, newColumn, 0);
OS.ValidateRect (handle, null);
@@ -950,7 +950,7 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*
}
}
if (hooks (SWT.PaintItem)) {
- TableItem item = _getItem ((int)/*64*/nmcd.dwItemSpec);
+ TableItem item = _getItem ((int)nmcd.dwItemSpec);
sendPaintItemEvent (item, nmcd);
//widget could be disposed at this point
}
@@ -964,8 +964,8 @@ LRESULT CDDS_SUBITEMPOSTPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*
return null;
}
-LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ hDC = nmcd.hdc;
+LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long wParam, long lParam) {
+ long hDC = nmcd.hdc;
if (explorerTheme && !ignoreCustomDraw && hooks (SWT.EraseItem) && (nmcd.left != nmcd.right)) {
OS.RestoreDC (hDC, -1);
}
@@ -979,9 +979,9 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
*
* NOTE: Force the item to be created if it does not exist.
*/
- TableItem item = _getItem ((int)/*64*/nmcd.dwItemSpec);
+ TableItem item = _getItem ((int)nmcd.dwItemSpec);
if (item == null || item.isDisposed ()) return null;
- long /*int*/ hFont = item.fontHandle (nmcd.iSubItem);
+ long hFont = item.fontHandle (nmcd.iSubItem);
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || (nmcd.left == nmcd.right)) {
return new LRESULT (hFont == -1 ? OS.CDRF_DODEFAULT : OS.CDRF_NEWFONT);
@@ -992,7 +992,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
if (OS.IsWindowVisible (handle)) {
Event measureEvent = null;
if (hooks (SWT.MeasureItem)) {
- measureEvent = sendMeasureItemEvent (item, (int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, nmcd.hdc);
+ measureEvent = sendMeasureItemEvent (item, (int)nmcd.dwItemSpec, nmcd.iSubItem, nmcd.hdc);
if (isDisposed () || item.isDisposed ()) return null;
}
if (hooks (SWT.EraseItem)) {
@@ -1018,7 +1018,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
final boolean enabled = OS.IsWindowEnabled (handle);
if (OS.IsWindowVisible (handle) && enabled) {
if (!explorerTheme && !ignoreDrawSelection && (style & SWT.FULL_SELECTION) != 0) {
- int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_FULLROWSELECT) == 0) {
/*
* Bug in Windows. For some reason, CDIS_SELECTED always set,
@@ -1028,8 +1028,8 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
- lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ lvItem.iItem = (int)nmcd.dwItemSpec;
+ long result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
if ((result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0)) {
int clrSelection = -1;
if (nmcd.iSubItem == 0) {
@@ -1051,7 +1051,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
}
}
if (clrSelection != -1) {
- RECT rect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, nmcd.iSubItem != 0, true, false, hDC);
+ RECT rect = item.getBounds ((int)nmcd.dwItemSpec, nmcd.iSubItem, true, nmcd.iSubItem != 0, true, false, hDC);
fillBackground (hDC, clrSelection, rect);
}
}
@@ -1069,7 +1069,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
boolean hasAttributes = true;
if (hFont == -1 && clrText == -1 && clrTextBk == -1) {
if (item.cellForeground == null && item.cellBackground == null && item.cellFont == null) {
- int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count == 1) hasAttributes = false;
}
}
@@ -1084,7 +1084,7 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
Control control = findBackgroundControl ();
if (control == null) control = this;
if (control.backgroundImage == null) {
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
nmcd.clrTextBk = control.getBackgroundPixel ();
}
}
@@ -1107,9 +1107,9 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*i
* to prevent infinite WM_PAINT on Vista.
*/
if ((enabled && clrTextBk != -1) || (!enabled && hasCustomBackground())) {
- int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn != -1 && oldColumn == nmcd.iSubItem) {
- long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, -1, 0);
OS.ValidateRect (handle, null);
@@ -1168,12 +1168,6 @@ boolean checkData (TableItem item, int index, boolean redraw) {
}
@Override
-boolean checkHandle (long /*int*/ hwnd) {
- if (hwnd == handle) return true;
- return hwnd == OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
-}
-
-@Override
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
@@ -1201,7 +1195,7 @@ protected void checkSubclass () {
*/
public void clear (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
TableItem item = _getItem (index, false);
if (item != null) {
@@ -1258,7 +1252,7 @@ public void clear (int index) {
public void clear (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
@@ -1333,7 +1327,7 @@ public void clear (int [] indices) {
checkWidget ();
if (indices == null) error (SWT.ERROR_NULL_ARGUMENT);
if (indices.length == 0) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<indices.length; i++) {
if (!(0 <= indices [i] && indices [i] < count)) {
error (SWT.ERROR_INVALID_RANGE);
@@ -1398,7 +1392,7 @@ public void clearAll () {
checkWidget ();
LVITEM lvItem = null;
boolean cleared = false;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TableItem item = _getItem (i, false);
if (item != null) {
@@ -1469,18 +1463,18 @@ public void clearAll () {
bits |= wHint & 0xFFFF;
} else {
int width = 0;
- int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
width += OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, i, 0);
}
bits |= width & 0xFFFF;
}
- long /*int*/ result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
+ long result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, OS.MAKELPARAM (bits, 0xFFFF));
int width = OS.LOWORD (result);
- long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
- height += (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0) * itemHeight;
+ height += (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0) * itemHeight;
if (width == 0) width = DEFAULT_WIDTH;
if (height == 0) height = DEFAULT_HEIGHT;
if (wHint != SWT.DEFAULT) width = wHint;
@@ -1509,19 +1503,12 @@ void createHandle () {
/* Get the header window handle */
hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
-
- /*
- * This code is intentionally commented. According to
- * the documentation, setting the default item size is
- * supposed to improve performance. By experimentation,
- * this does not seem to have much of an effect.
- */
-// OS.SendMessage (handle, OS.LVM_SETITEMCOUNT, 1024 * 2, 0);
+ maybeEnableDarkSystemTheme(hwndHeader);
/* Set the checkbox image list */
if ((style & SWT.CHECK) != 0) {
- long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int width = OS.HIWORD (oneItem) - OS.HIWORD (empty), height = width;
setCheckboxImageList (width, height, false);
OS.SendMessage (handle, OS. LVM_SETCALLBACKMASK, OS.LVIS_STATEIMAGEMASK, 0);
@@ -1539,7 +1526,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/*
@@ -1551,8 +1538,8 @@ void createHandle () {
*/
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_WIDTH;
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long hHeap = OS.GetProcessHeap ();
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
lvColumn.pszText = pszText;
OS.SendMessage (handle, OS.LVM_INSERTCOLUMN, 0, lvColumn);
OS.HeapFree (hHeap, 0, pszText);
@@ -1573,9 +1560,9 @@ void createHandle () {
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
int bits2 = OS.GetWindowLong (hwndHeader, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwndHeader, OS.GWL_EXSTYLE, bits2 | OS.WS_EX_LAYOUTRTL);
- long /*int*/ hwndTooltop = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
- int bits3 = OS.GetWindowLong (hwndTooltop, OS.GWL_EXSTYLE);
- OS.SetWindowLong (hwndTooltop, OS.GWL_EXSTYLE, bits3 | OS.WS_EX_LAYOUTRTL);
+ long hwndTooltip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ int bits3 = OS.GetWindowLong (hwndTooltip, OS.GWL_EXSTYLE);
+ OS.SetWindowLong (hwndTooltip, OS.GWL_EXSTYLE, bits3 | OS.WS_EX_LAYOUTRTL);
}
}
@@ -1603,6 +1590,7 @@ void createHeaderToolTips () {
OS.GetModuleHandle (null),
null);
if (headerToolTipHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ maybeEnableDarkSystemTheme(headerToolTipHandle);
/*
* Feature in Windows. Despite the fact that the
* tool tip text contains \r\n, the tooltip will
@@ -1615,7 +1603,7 @@ void createHeaderToolTips () {
void createItem (TableColumn column, int index) {
if (!(0 <= index && index <= columnCount)) error (SWT.ERROR_INVALID_RANGE);
- int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn >= index) {
OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, oldColumn + 1, 0);
}
@@ -1624,7 +1612,7 @@ void createItem (TableColumn column, int index) {
System.arraycopy (columns, 0, newColumns, 0, columns.length);
columns = newColumns;
}
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
TableItem item = _getItem (i, false);
if (item != null) {
@@ -1705,9 +1693,9 @@ void createItem (TableColumn column, int index) {
OS.SendMessage (handle, OS.LVM_GETCOLUMN, 1, lvColumn);
int width = lvColumn.cx;
int cchTextMax = 1024;
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
lvColumn.cchTextMax = cchTextMax;
@@ -1777,7 +1765,7 @@ void createItem (TableColumn column, int index) {
}
void createItem (TableItem item, int index) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
_checkGrow (count);
LVITEM lvItem = new LVITEM ();
@@ -1799,7 +1787,7 @@ void createItem (TableItem item, int index) {
/* Insert the item */
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- int result = (int)/*64*/OS.SendMessage (handle, OS.LVM_INSERTITEM, 0, lvItem);
+ int result = (int)OS.SendMessage (handle, OS.LVM_INSERTITEM, 0, lvItem);
ignoreSelect = ignoreShrink = false;
if (result == -1) error (SWT.ERROR_ITEM_NOT_ADDED);
_insertItem (index, item, count);
@@ -1855,14 +1843,14 @@ public void deselect (int [] indices) {
if (indices.length == 0) return;
LVITEM lvItem = new LVITEM ();
lvItem.stateMask = OS.LVIS_SELECTED;
- for (int i=0; i<indices.length; i++) {
+ for (int index : indices) {
/*
* An index of -1 will apply the change to all
* items. Ensure that indices are greater than -1.
*/
- if (indices [i] >= 0) {
+ if (index >= 0) {
ignoreSelect = true;
- OS.SendMessage (handle, OS.LVM_SETITEMSTATE, indices [i], lvItem);
+ OS.SendMessage (handle, OS.LVM_SETITEMSTATE, index, lvItem);
ignoreSelect = false;
}
}
@@ -1911,7 +1899,7 @@ public void deselect (int index) {
*/
public void deselect (int start, int end) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (start == 0 && end == count - 1) {
deselectAll ();
} else {
@@ -1954,7 +1942,7 @@ void destroyItem (TableColumn column) {
if (columns [index] == column) break;
index++;
}
- int oldColumn = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ int oldColumn = (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
if (oldColumn == index) {
OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, -1, 0);
} else {
@@ -1984,9 +1972,9 @@ void destroyItem (TableColumn column) {
if (columnCount > 1) {
index = 1;
int cchTextMax = 1024;
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
int byteCount = cchTextMax * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
@@ -1997,8 +1985,8 @@ void destroyItem (TableColumn column) {
OS.SendMessage (handle, OS.LVM_SETCOLUMN, 0, lvColumn);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
} else {
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long hHeap = OS.GetProcessHeap ();
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_TEXT | OS.LVCF_IMAGE | OS.LVCF_WIDTH | OS.LVCF_FMT;
lvColumn.pszText = pszText;
@@ -2009,7 +1997,7 @@ void destroyItem (TableColumn column) {
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT;
hdItem.fmt = OS.HDF_LEFT;
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
}
setRedraw (true);
@@ -2029,7 +2017,7 @@ void destroyItem (TableColumn column) {
lvItem.mask = OS.LVIF_TEXT | OS.LVIF_IMAGE;
lvItem.pszText = OS.LPSTR_TEXTCALLBACK;
lvItem.iImage = OS.I_IMAGECALLBACK;
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
lvItem.iItem = i;
OS.SendMessage (handle, OS.LVM_SETITEM, 0, lvItem);
@@ -2044,7 +2032,7 @@ void destroyItem (TableColumn column) {
if (first) index = 0;
System.arraycopy (columns, index + 1, columns, index, --columnCount - index);
columns [columnCount] = null;
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
TableItem item = _getItem (i, false);
if (item != null) {
@@ -2119,9 +2107,9 @@ void destroyItem (TableColumn column) {
int count = 0;
int oldIndex = oldOrder [orderIndex];
int [] newOrder = new int [columnCount];
- for (int i=0; i<oldOrder.length; i++) {
- if (oldOrder [i] != oldIndex) {
- int newIndex = oldOrder [i] <= oldIndex ? oldOrder [i] : oldOrder [i] - 1;
+ for (int element : oldOrder) {
+ if (element != oldIndex) {
+ int newIndex = element <= oldIndex ? element : element - 1;
newOrder [count++] = newIndex;
}
}
@@ -2145,9 +2133,9 @@ void destroyItem (TableColumn column) {
newColumns [i - orderIndex] = columns [newOrder [i]];
newColumns [i - orderIndex].updateToolTip (newOrder [i]);
}
- for (int i=0; i<newColumns.length; i++) {
- if (!newColumns [i].isDisposed ()) {
- newColumns [i].sendEvent (SWT.Move);
+ for (TableColumn newColumn : newColumns) {
+ if (!newColumn.isDisposed ()) {
+ newColumn.sendEvent (SWT.Move);
}
}
}
@@ -2163,7 +2151,7 @@ void destroyItem (TableColumn column) {
}
void destroyItem (TableItem item) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
int index = 0;
while (index < count) {
if (_getItem (index, false) == item) break;
@@ -2172,7 +2160,7 @@ void destroyItem (TableItem item) {
if (index == count) return;
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem (index, count);
@@ -2189,11 +2177,11 @@ void fixCheckboxImageList (boolean fixScroll) {
* the state image list to be the same size as the image list.
*/
if ((style & SWT.CHECK) == 0) return;
- long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList == 0) return;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
- long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList == 0) return;
int [] stateCx = new int [1], stateCy = new int [1];
OS.ImageList_GetIconSize (hStateList, stateCx, stateCy);
@@ -2203,7 +2191,7 @@ void fixCheckboxImageList (boolean fixScroll) {
void fixCheckboxImageListColor (boolean fixScroll) {
if ((style & SWT.CHECK) == 0) return;
- long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList == 0) return;
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
@@ -2334,7 +2322,7 @@ public TableColumn [] getColumns () {
int getFocusIndex () {
// checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ return (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
}
/**
@@ -2460,7 +2448,7 @@ public boolean getHeaderVisible () {
*/
public TableItem getItem (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
return _getItem (index);
}
@@ -2495,7 +2483,7 @@ public TableItem getItem (Point point) {
}
TableItem getItemInPixels (Point point) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0) return null;
LVHITTESTINFO pinfo = new LVHITTESTINFO ();
pinfo.x = point.x;
@@ -2512,7 +2500,7 @@ TableItem getItemInPixels (Point point) {
RECT rect = new RECT ();
rect.left = OS.LVIR_ICON;
ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
+ long code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
ignoreCustomDraw = false;
if (code != 0) {
pinfo.x = rect.left;
@@ -2575,7 +2563,7 @@ TableItem getItemInPixels (Point point) {
*/
public int getItemCount () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
}
/**
@@ -2596,8 +2584,8 @@ public int getItemHeight () {
int getItemHeightInPixels () {
if (!painted && hooks (SWT.MeasureItem)) hitTestSelection (0, 0, 0);
- long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
return OS.HIWORD (oneItem) - OS.HIWORD (empty);
}
@@ -2619,7 +2607,7 @@ int getItemHeightInPixels () {
*/
public TableItem [] getItems () {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
TableItem [] result = new TableItem [count];
if ((style & SWT.VIRTUAL) != 0) {
for (int i=0; i<count; i++) {
@@ -2655,7 +2643,7 @@ public boolean getLinesVisible () {
}
private boolean _getLinesVisible() {
- int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
return (bits & OS.LVS_EX_GRIDLINES) != 0;
}
@@ -2677,9 +2665,9 @@ private boolean _getLinesVisible() {
*/
public TableItem [] getSelection () {
checkWidget ();
- int i = -1, j = 0, count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ int i = -1, j = 0, count = (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
TableItem [] result = new TableItem [count];
- while ((i = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
+ while ((i = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
result [j++] = _getItem (i);
}
return result;
@@ -2697,7 +2685,7 @@ public TableItem [] getSelection () {
*/
public int getSelectionCount () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
}
/**
@@ -2713,11 +2701,11 @@ public int getSelectionCount () {
*/
public int getSelectionIndex () {
checkWidget ();
- int focusIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
- int selectedIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
+ int focusIndex = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int selectedIndex = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
if (focusIndex == selectedIndex) return selectedIndex;
int i = -1;
- while ((i = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
+ while ((i = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
if (i == focusIndex) return i;
}
return selectedIndex;
@@ -2741,10 +2729,16 @@ public int getSelectionIndex () {
*/
public int [] getSelectionIndices () {
checkWidget ();
- int i = -1, j = 0, count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
int [] result = new int [count];
- while ((i = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, i, OS.LVNI_SELECTED)) != -1) {
- result [j++] = i;
+ int lastIndex = -1;
+ for (int i = 0; i < count; i++) {
+ lastIndex = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, lastIndex, OS.LVNI_SELECTED);
+ if (lastIndex == -1) {
+ break;
+ }
+
+ result[i] = lastIndex;
}
return result;
}
@@ -2816,11 +2810,11 @@ public int getTopIndex () {
* is displaying blank lines at the top of the controls. The
* fix is to check for a negative number and return zero instead.
*/
- return Math.max (0, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
+ return Math.max (0, (int)OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0));
}
boolean hasChildren () {
- long /*int*/ hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
+ long hwndChild = OS.GetWindow (handle, OS.GW_CHILD);
while (hwndChild != 0) {
if (hwndChild != hwndHeader) return true;
hwndChild = OS.GetWindow (hwndChild, OS.GW_HWNDNEXT);
@@ -2829,16 +2823,16 @@ boolean hasChildren () {
}
boolean hitTestSelection (int index, int x, int y) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0) return false;
if (!hooks (SWT.MeasureItem)) return false;
boolean result = false;
if (0 <= index && index < count) {
TableItem item = _getItem (index);
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (handle);
+ long oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- long /*int*/ hFont = item.fontHandle (0);
+ long hFont = item.fontHandle (0);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = sendMeasureItemEvent (item, index, 0, hDC);
if (event.getBoundsInPixels ().contains (x, y)) result = true;
@@ -2862,7 +2856,7 @@ int imageIndex (Image image, int column) {
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = imageList.indexOf (image);
if (index == -1) index = imageList.add (image);
- long /*int*/ hImageList = imageList.getHandle ();
+ long hImageList = imageList.getHandle ();
/*
* Bug in Windows. Making any change to an item that
* changes the item height of a table while the table
@@ -2879,7 +2873,7 @@ int imageIndex (Image image, int column) {
}
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
if (headerImageList != null) {
- long /*int*/ hHeaderImageList = headerImageList.getHandle ();
+ long hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
fixCheckboxImageList (false);
@@ -2902,7 +2896,7 @@ int imageIndexHeader (Image image) {
headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = headerImageList.indexOf (image);
if (index == -1) index = headerImageList.add (image);
- long /*int*/ hImageList = headerImageList.getHandle ();
+ long hImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
return index;
}
@@ -2959,7 +2953,7 @@ public int indexOf (TableItem item) {
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
//TODO - find other loops that can be optimized
if (keys == null) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (1 <= lastIndexOf && lastIndexOf < count - 1) {
if (_getItem (lastIndexOf, false) == item) return lastIndexOf;
if (_getItem (lastIndexOf + 1, false) == item) return ++lastIndexOf;
@@ -3010,11 +3004,16 @@ public boolean isSelected (int index) {
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
lvItem.iItem = index;
- long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ long result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
return (result != 0) && ((lvItem.state & OS.LVIS_SELECTED) != 0);
}
@Override
+boolean isUseWsBorder () {
+ return super.isUseWsBorder () || ((display != null) && display.useWsBorderTable);
+}
+
+@Override
void register () {
super.register ();
if (hwndHeader != 0) display.addControl (hwndHeader, this);
@@ -3023,7 +3022,7 @@ void register () {
@Override
void releaseChildren (boolean destroy) {
if (_hasItems ()) {
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (keys == null) {
for (int i=0; i<itemCount; i++) {
TableItem item = _getItem (i, false);
@@ -3061,7 +3060,7 @@ void releaseWidget () {
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) OS.ImageList_Destroy (hStateList);
if (headerToolTipHandle != 0) OS.DestroyWindow (headerToolTipHandle);
@@ -3091,19 +3090,18 @@ public void remove (int [] indices) {
System.arraycopy (indices, 0, newIndices, 0, indices.length);
sort (newIndices);
int start = newIndices [newIndices.length - 1], end = newIndices [0];
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
setDeferResize (true);
int last = -1;
- for (int i=0; i<newIndices.length; i++) {
- int index = newIndices [i];
+ for (int index : newIndices) {
if (index != last) {
TableItem item = _getItem (index, false);
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem(index, count);
@@ -3131,13 +3129,13 @@ public void remove (int [] indices) {
*/
public void remove (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
TableItem item = _getItem (index, false);
if (item != null && !item.isDisposed ()) item.release (false);
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
+ long code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
_removeItem (index, count);
@@ -3165,7 +3163,7 @@ public void remove (int index) {
public void remove (int start, int end) {
checkWidget ();
if (start > end) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (!(0 <= start && start <= end && end < count)) {
error (SWT.ERROR_INVALID_RANGE);
}
@@ -3178,7 +3176,7 @@ public void remove (int start, int end) {
TableItem item = _getItem (index, false);
if (item != null && !item.isDisposed ()) item.release (false);
ignoreSelect = ignoreShrink = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
+ long code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
index++;
@@ -3205,14 +3203,14 @@ public void remove (int start, int end) {
*/
public void removeAll () {
checkWidget ();
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
TableItem item = _getItem (i, false);
if (item != null && !item.isDisposed ()) item.release (false);
}
setDeferResize (true);
ignoreSelect = ignoreShrink = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
+ long code = OS.SendMessage (handle, OS.LVM_DELETEALLITEMS, 0, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
setTableEmpty ();
@@ -3278,8 +3276,8 @@ public void select (int [] indices) {
for (int i=length-1; i>=0; --i) {
/*
* An index of -1 will apply the change to all
- * items. Ensure that indices are greater than -1.
- */
+ * items. Ensure that indices are greater than -1.
+ */
if (indices [i] >= 0) {
ignoreSelect = true;
OS.SendMessage (handle, OS.LVM_SETITEMSTATE, indices [i], lvItem);
@@ -3291,7 +3289,7 @@ public void select (int [] indices) {
@Override
void reskinChildren (int flags) {
if (_hasItems ()) {
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<itemCount; i++) {
TableItem item = _getItem (i, false);
if (item != null) item.reskin (flags);
@@ -3359,7 +3357,7 @@ public void select (int index) {
public void select (int start, int end) {
checkWidget ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -3404,21 +3402,11 @@ public void selectAll () {
ignoreSelect = false;
}
-void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lParam, Event measureEvent) {
- long /*int*/ hDC = nmcd.hdc;
+void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long lParam, Event measureEvent) {
+ long hDC = nmcd.hdc;
int clrText = item.cellForeground != null ? item.cellForeground [nmcd.iSubItem] : -1;
if (clrText == -1) clrText = item.foreground;
- int clrTextBk = -1;
- if (OS.IsAppThemed ()) {
- if (sortColumn != null && sortDirection != SWT.NONE) {
- if (findImageControl () == null) {
- if (indexOf (sortColumn) == nmcd.iSubItem) {
- clrTextBk = getSortColumnPixel ();
- }
- }
- }
- }
- clrTextBk = item.cellBackground != null ? item.cellBackground [nmcd.iSubItem] : -1;
+ int clrTextBk = item.cellBackground != null ? item.cellBackground [nmcd.iSubItem] : -1;
if (clrTextBk == -1) clrTextBk = item.background;
/*
* Bug in Windows. For some reason, CDIS_SELECTED always set,
@@ -3428,8 +3416,8 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lPara
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
- lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ lvItem.iItem = (int)nmcd.dwItemSpec;
+ long result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = (result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0);
GCData data = new GCData ();
data.device = display;
@@ -3477,10 +3465,10 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lPara
if (selected) clrSelectionBk = data.background;
}
data.font = item.getFont (nmcd.iSubItem);
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
int nSavedDC = OS.SaveDC (hDC);
GC gc = GC.win32_new (hDC, data);
- RECT cellRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
+ RECT cellRect = item.getBounds ((int)nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
Event event = new Event ();
event.item = item;
event.gc = gc;
@@ -3490,7 +3478,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lPara
if (OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED) == nmcd.dwItemSpec) {
if (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0) {
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -3535,14 +3523,14 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lPara
boolean firstColumn = nmcd.iSubItem == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
if (ignoreDrawForeground && ignoreDrawHot && !drawDrophilited) {
if (!ignoreDrawBackground && drawBackground) {
- RECT backgroundRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, false, true, false, hDC);
+ RECT backgroundRect = item.getBounds ((int)nmcd.dwItemSpec, nmcd.iSubItem, true, false, true, false, hDC);
fillBackground (hDC, clrTextBk, backgroundRect);
}
}
focusRect = null;
if (!ignoreDrawHot || !ignoreDrawSelection || !ignoreDrawFocus || drawDrophilited) {
boolean fullText = (style & SWT.FULL_SELECTION) != 0 || !firstColumn;
- RECT textRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, false, fullText, false, hDC);
+ RECT textRect = item.getBounds ((int)nmcd.dwItemSpec, nmcd.iSubItem, true, false, fullText, false, hDC);
if ((style & SWT.FULL_SELECTION) == 0) {
if (measureEvent != null) {
Rectangle boundInPixels = measureEvent.getBoundsInPixels();
@@ -3554,20 +3542,24 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lPara
focusRect = textRect;
}
}
+
+ // Draw selection background
if (explorerTheme) {
- if (!ignoreDrawHot || drawDrophilited || (!ignoreDrawSelection && clrSelectionBk != -1)) {
+ boolean backgroundWanted = !ignoreDrawHot || drawDrophilited || (!ignoreDrawSelection && clrSelectionBk != -1);
+
+ if (backgroundWanted) {
RECT pClipRect = new RECT ();
OS.SetRect (pClipRect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
RECT rect = new RECT ();
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
if ((style & SWT.FULL_SELECTION) != 0) {
- int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
- int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
+ int count = (int)OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ int index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
rect.right = headerRect.right;
- index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
rect.left = headerRect.left;
@@ -3577,7 +3569,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lPara
rect.right += EXPLORER_EXTRA;
pClipRect.right += EXPLORER_EXTRA;
}
- long /*int*/ hTheme = OS.OpenThemeData (handle, Display.LISTVIEW);
+ long hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.LISS_SELECTED : OS.LISS_HOT;
if (OS.GetFocus () != handle && selected && !drawHot) iStateId = OS.LISS_SELECTEDNOTFOCUS;
if (drawDrophilited) iStateId = OS.LISS_SELECTED;
@@ -3593,7 +3585,7 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, long /*int*/ lPara
OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
}
if (ignoreDrawForeground) {
- RECT clipRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, false, hDC);
+ RECT clipRect = item.getBounds ((int)nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, false, hDC);
OS.SaveDC (hDC);
OS.SelectClipRgn (hDC, 0);
OS.ExcludeClipRect (hDC, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
@@ -3609,7 +3601,7 @@ Event sendEraseItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
data.foreground = OS.GetTextColor (nmcd.hdc);
data.background = OS.GetBkColor (nmcd.hdc);
data.font = item.getFont (column);
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (nmcd.hdc, data);
Event event = new Event ();
event.item = item;
@@ -3626,7 +3618,7 @@ Event sendEraseItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
return event;
}
-Event sendMeasureItemEvent (TableItem item, int row, int column, long /*int*/ hDC) {
+Event sendMeasureItemEvent (TableItem item, int row, int column, long hDC) {
GCData data = new GCData ();
data.device = display;
data.font = item.getFont (column);
@@ -3643,8 +3635,8 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, long /*int*/ hD
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
- lvItem.iItem = (int)/*64*/row;
- long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ lvItem.iItem = row;
+ long result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = (result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0);
if (selected && (column == 0 || (style & SWT.FULL_SELECTION) != 0)) {
if (OS.GetFocus () == handle || display.getHighContrast ()) {
@@ -3662,11 +3654,11 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, long /*int*/ hD
if (!isDisposed () && !item.isDisposed ()) {
Rectangle boundsInPixels = event.getBoundsInPixels();
if (columnCount == 0) {
- int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int width = (int)OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (boundsInPixels.x + boundsInPixels.width > width) setScrollWidth (boundsInPixels.x + boundsInPixels.width);
}
- long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
/*
* Possible recursion: when setItemHeight() is called during
@@ -3682,10 +3674,10 @@ Event sendMeasureItemEvent (TableItem item, int row, int column, long /*int*/ hD
return event;
}
-LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT sendMouseDownEvent (int type, int button, int msg, long wParam, long lParam) {
Display display = this.display;
display.captureChanged = false;
- if (!sendMouseEvent (type, button, handle, msg, wParam, lParam)) {
+ if (!sendMouseEvent (type, button, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
@@ -3717,12 +3709,12 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam,
* The fix is to consider any value that is negative a failure.
*/
if (OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo) < 0) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count != 0) {
RECT rect = new RECT ();
rect.left = OS.LVIR_ICON;
ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
+ long code = OS.SendMessage (handle, OS.LVM_GETITEMRECT, 0, rect);
ignoreCustomDraw = false;
if (code != 0) {
pinfo.x = rect.left;
@@ -3744,16 +3736,6 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam,
}
/*
- * Force the table to have focus so that when the user
- * reselects the focus item, the LVIS_FOCUSED state bits
- * for the item will be set. If the user did not click on
- * an item, then set focus to the table so that it will
- * come to the front and take focus in the work around
- * below.
- */
- OS.SetFocus (handle);
-
- /*
* Feature in Windows. When the user selects outside of
* a table item, Windows deselects all the items, even
* when the table is multi-select. While not strictly
@@ -3765,6 +3747,8 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam,
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
+ /* We're skipping default processing, but at least set focus to control */
+ OS.SetFocus (handle);
return LRESULT.ZERO;
}
}
@@ -3779,7 +3763,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam,
* it as selected.
*/
boolean forceSelect = false;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETSELECTEDCOUNT, 0, 0);
if (count == 1 && pinfo.iItem != -1) {
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
@@ -3833,7 +3817,7 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam,
dragStarted = false;
display.dragCancelled = false;
if (!dragDetect) display.runDragDrop = false;
- long /*int*/ code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
+ long code = callWindowProc (handle, msg, wParam, lParam, forceSelect);
if (!dragDetect) display.runDragDrop = true;
if (fullRowSelect) {
fullRowSelect = false;
@@ -3852,14 +3836,14 @@ LRESULT sendMouseDownEvent (int type, int button, int msg, long /*int*/ wParam,
fakeMouseUp = (pinfo.flags & OS.LVHT_ONITEMSTATEICON) == 0;
}
if (fakeMouseUp) {
- sendMouseEvent (SWT.MouseUp, button, handle, msg, wParam, lParam);
+ sendMouseEvent (SWT.MouseUp, button, handle, lParam);
}
}
return new LRESULT (code);
}
void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
- long /*int*/ hDC = nmcd.hdc;
+ long hDC = nmcd.hdc;
GCData data = new GCData ();
data.device = display;
data.font = item.getFont (nmcd.iSubItem);
@@ -3871,8 +3855,8 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_STATE;
lvItem.stateMask = OS.LVIS_SELECTED;
- lvItem.iItem = (int)/*64*/nmcd.dwItemSpec;
- long /*int*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
+ lvItem.iItem = (int)nmcd.dwItemSpec;
+ long result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem);
boolean selected = result != 0 && (lvItem.state & OS.LVIS_SELECTED) != 0;
boolean drawSelected = false, drawBackground = false, drawHot = false;
if (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0) {
@@ -3924,10 +3908,10 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
data.foreground = OS.GetSysColor (OS.COLOR_GRAYTEXT);
data.background = OS.GetSysColor (OS.COLOR_3DFACE);
}
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
int nSavedDC = OS.SaveDC (hDC);
GC gc = GC.win32_new (hDC, data);
- RECT itemRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, false, false, hDC);
+ RECT itemRect = item.getBounds ((int)nmcd.dwItemSpec, nmcd.iSubItem, true, true, false, false, hDC);
Event event = new Event ();
event.item = item;
event.gc = gc;
@@ -3937,7 +3921,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
if (OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED) == nmcd.dwItemSpec) {
if (nmcd.iSubItem == 0 || (style & SWT.FULL_SELECTION) != 0) {
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -3946,7 +3930,7 @@ void sendPaintItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd) {
if (drawSelected) event.detail |= SWT.SELECTED;
if (drawBackground) event.detail |= SWT.BACKGROUND;
event.setBoundsInPixels(new Rectangle(itemRect.left, itemRect.top, itemRect.right - itemRect.left, itemRect.bottom - itemRect.top));
- RECT cellRect = item.getBounds ((int)/*64*/nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
+ RECT cellRect = item.getBounds ((int)nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, true, hDC);
int cellWidth = cellRect.right - cellRect.left;
int cellHeight = cellRect.bottom - cellRect.top;
gc.setClipping (DPIUtil.autoScaleDown(new Rectangle (cellRect.left, cellRect.top, cellWidth, cellHeight)));
@@ -3966,7 +3950,7 @@ Event sendPaintItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
data.font = item.getFont (column);
data.foreground = OS.GetTextColor (nmcd.hdc);
data.background = OS.GetBkColor (nmcd.hdc);
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (nmcd.hdc, data);
Event event = new Event ();
event.item = item;
@@ -3983,7 +3967,7 @@ Event sendPaintItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT
}
@Override
-void setBackgroundImage (long /*int*/ hBitmap) {
+void setBackgroundImage (long hBitmap) {
super.setBackgroundImage (hBitmap);
if (hBitmap != 0) {
setBackgroundTransparent (true);
@@ -3996,7 +3980,7 @@ void setBackgroundImage (long /*int*/ hBitmap) {
@Override
void setBackgroundPixel (int newPixel) {
- int oldPixel = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
+ int oldPixel = (int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
if (oldPixel != OS.CLR_NONE) {
if (findImageControl () != null) return;
if (newPixel == -1) newPixel = defaultBackground ();
@@ -4029,7 +4013,7 @@ void setBackgroundTransparent (boolean transparent) {
* other custom drawing. The fix is to clear the selected
* column.
*/
- int oldPixel = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
+ int oldPixel = (int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
if (transparent) {
if (oldPixel != OS.CLR_NONE) {
/*
@@ -4248,11 +4232,11 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
int count = 8, flags = OS.ILC_COLOR32;
if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR;
if (!OS.IsAppThemed ()) flags |= OS.ILC_MASK;
- long /*int*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ memDC = OS.CreateCompatibleDC (hDC);
- long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- long /*int*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ long hStateList = OS.ImageList_Create (width, height, flags, count, count);
+ long hDC = OS.GetDC (handle);
+ long memDC = OS.CreateCompatibleDC (hDC);
+ long hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
+ long hOldBitmap = OS.SelectObject (memDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
int clrBackground;
@@ -4266,10 +4250,10 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
clrBackground = 0x0200FF00;
}
}
- long /*int*/ hBrush = OS.CreateSolidBrush (clrBackground);
+ long hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- long /*int*/ oldFont = OS.SelectObject (hDC, defaultFont ());
+ long oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = new TEXTMETRIC ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -4289,7 +4273,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
int left = (width - itemWidth) / 2, top = (height - itemHeight) / 2;
OS.SetRect (rect, left, top, left + itemWidth, top + itemHeight);
if (OS.IsAppThemed ()) {
- long /*int*/ hTheme = display.hButtonTheme ();
+ long hTheme = display.hButtonTheme ();
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_UNCHECKEDNORMAL, rect, null);
rect.left += width; rect.right += width;
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_CHECKEDNORMAL, rect, null);
@@ -4345,7 +4329,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
setRedraw (false);
setTopIndex (0);
}
- long /*int*/ hOldStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long hOldStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_STATE, hStateList);
if (hOldStateList != 0) OS.ImageList_Destroy (hOldStateList);
/*
@@ -4354,7 +4338,7 @@ void setCheckboxImageList (int width, int height, boolean fixScroll) {
* pixel corruption of the images. The fix is to reset the
* LVSIL_SMALL image list.
*/
- long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
if (fixScroll && topIndex != 0) {
setTopIndex (topIndex);
@@ -4569,7 +4553,7 @@ public void setHeaderVisible (boolean show) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == itemCount) return;
setDeferResize (true);
boolean isVirtual = (style & SWT.VIRTUAL) != 0;
@@ -4580,7 +4564,7 @@ public void setItemCount (int count) {
if (item != null && !item.isDisposed ()) item.release (false);
if (!isVirtual) {
ignoreSelect = ignoreShrink = true;
- long /*int*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
+ long code = OS.SendMessage (handle, OS.LVM_DELETEITEM, count, 0);
ignoreSelect = ignoreShrink = false;
if (code == 0) break;
}
@@ -4634,7 +4618,7 @@ void setItemHeight (boolean fixScroll) {
* WM_SETFONT which recomputes and assigns the default item
* height.
*/
- long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
} else {
/*
@@ -4786,7 +4770,7 @@ public void setRedraw (boolean redraw) {
}
void setScrollWidth (int width) {
- if (width != (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0)) {
+ if (width != (int)OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0)) {
/*
* Feature in Windows. When LVM_SETCOLUMNWIDTH is sent,
* Windows draws right away instead of queuing a WM_PAINT.
@@ -4827,10 +4811,10 @@ boolean setScrollWidth (TableItem item, boolean force) {
*/
if (columnCount == 0) {
int newWidth = 0, imageIndent = 0, index = 0;
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
while (index < itemCount) {
String string = null;
- long /*int*/ hFont = -1;
+ long hFont = -1;
if (item != null) {
string = item.text;
imageIndent = Math.max (imageIndent, item.imageIndent);
@@ -4845,8 +4829,8 @@ boolean setScrollWidth (TableItem item, boolean force) {
}
if (string != null && string.length () != 0) {
if (hFont != -1) {
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
+ long hDC = OS.GetDC (handle);
+ long oldFont = OS.SelectObject (hDC, hFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
char [] buffer = string.toCharArray ();
RECT rect = new RECT ();
@@ -4856,7 +4840,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
newWidth = Math.max (newWidth, rect.right - rect.left);
} else {
TCHAR buffer = new TCHAR (getCodePage (), string, true);
- newWidth = Math.max (newWidth, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
+ newWidth = Math.max (newWidth, (int)OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
}
}
if (item != null) break;
@@ -4874,15 +4858,15 @@ boolean setScrollWidth (TableItem item, boolean force) {
*/
if (newWidth == 0) {
char [] buffer = {' ', '\0'};
- newWidth = Math.max (newWidth, (int)/*64*/OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
+ newWidth = Math.max (newWidth, (int)OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));
}
- long /*int*/ hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
newWidth += cx [0] + INSET;
}
- long /*int*/ hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
+ long hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hImageList, cx, cy);
@@ -4901,7 +4885,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
newWidth++;
}
newWidth += INSET * 2 + VISTA_EXTRA;
- int oldWidth = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int oldWidth = (int)OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (newWidth > oldWidth) {
setScrollWidth (newWidth);
return true;
@@ -5064,7 +5048,7 @@ public void setSelection (int start, int end) {
checkWidget ();
deselectAll ();
if (end < 0 || start > end || ((style & SWT.SINGLE) != 0 && start != end)) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0 || start >= count) return;
start = Math.max (0, start);
end = Math.min (end, count - 1);
@@ -5125,7 +5109,7 @@ public void setSortDirection (int direction) {
}
void setSubImagesVisible (boolean visible) {
- int dwExStyle = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int dwExStyle = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((dwExStyle & OS.LVS_EX_SUBITEMIMAGES) != 0 == visible) return;
int bits = visible ? OS.LVS_EX_SUBITEMIMAGES : 0;
OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, OS.LVS_EX_SUBITEMIMAGES, bits);
@@ -5142,12 +5126,12 @@ void setTableEmpty () {
* Windows to reserve the smallest possible space when an image
* list is removed.
*/
- long /*int*/ hImageList = OS.ImageList_Create (1, 1, 0, 0, 0);
+ long hImageList = OS.ImageList_Create (1, 1, 0, 0, 0);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, 0);
if (headerImageList != null) {
- long /*int*/ hHeaderImageList = headerImageList.getHandle ();
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long hHeaderImageList = headerImageList.getHandle ();
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
OS.ImageList_Destroy (hImageList);
@@ -5184,7 +5168,7 @@ void setTableEmpty () {
*/
public void setTopIndex (int index) {
checkWidget ();
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
if (index == topIndex) return;
if (!painted && hooks (SWT.MeasureItem)) hitTestSelection (index, 0, 0);
@@ -5279,7 +5263,7 @@ public void showColumn (TableColumn column) {
OS.SendMessage (handle, OS.LVM_GETSUBITEMRECT, -1, itemRect);
ignoreCustomDraw = false;
itemRect.right = itemRect.left;
- int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int width = (int)OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
itemRect.left = itemRect.right - width;
} else {
itemRect.top = index;
@@ -5345,7 +5329,7 @@ void showItem (int index) {
* of visible items is zero and use LVM_ENSUREVISIBLE with the
* fPartialOK flag set to true to scroll the table.
*/
- long /*int*/ counterPage = OS.SendMessage (handle, OS.LVM_GETCOUNTPERPAGE, 0, 0);
+ long counterPage = OS.SendMessage (handle, OS.LVM_GETCOUNTPERPAGE, 0, 0);
if (counterPage <= 0) {
/*
* Bug in Windows. For some reason, LVM_ENSUREVISIBLE can
@@ -5366,7 +5350,7 @@ void showItem (int index) {
* LVM_ENSUREVISIBLE command scrolls the table to the leftmost
* column even if the item is already visible, refer Bug 334234
*/
- long /*int*/ topIndex = OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
+ long topIndex = OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
if (topIndex > index || index >= topIndex + counterPage ) {
OS.SendMessage (handle, OS.LVM_ENSUREVISIBLE, index, 0);
}
@@ -5413,7 +5397,7 @@ public void showItem (TableItem item) {
*/
public void showSelection () {
checkWidget ();
- int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
+ int index = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
if (index != -1) {
/*
* Bug in Windows. For some reason, when a table had vertically
@@ -5475,7 +5459,7 @@ RECT toolTipRect (RECT rect) {
@Override
String toolTipText (NMTTDISPINFO hdr) {
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTipText != null) return ""; //$NON-NLS-1$
if (headerToolTipHandle == hdr.hwndFrom) {
for (int i=0; i<columnCount; i++) {
@@ -5508,7 +5492,7 @@ void update (boolean all) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
+ long oldHeaderProc = 0, oldTableProc = 0;
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -5523,7 +5507,7 @@ void update (boolean all) {
void updateHeaderToolTips () {
if (headerToolTipHandle == 0) return;
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -5576,7 +5560,7 @@ void updateMoveable () {
@Override
void updateOrientation () {
super.updateOrientation ();
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hwndHeader != 0) {
int bits = OS.GetWindowLong (hwndHeader, OS.GWL_EXSTYLE);
if ((style & SWT.RIGHT_TO_LEFT) != 0) {
@@ -5598,9 +5582,9 @@ void updateOrientation () {
Point size = imageList.getImageSize ();
display.releaseImageList (imageList);
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, size.x, size.y);
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
- TableItem item = _getItem (i, false);
+ TableItem item = _getItem (i, false);
if (item != null) {
Image image = item.image;
if (image != null) {
@@ -5609,7 +5593,7 @@ void updateOrientation () {
}
}
}
- long /*int*/ hImageList = imageList.getHandle ();
+ long hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList);
}
if (hwndHeader != 0) {
@@ -5637,7 +5621,7 @@ void updateOrientation () {
}
}
}
- long /*int*/ hHeaderImageList = headerImageList.getHandle ();
+ long hHeaderImageList = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
}
}
@@ -5647,9 +5631,9 @@ void updateOrientation () {
boolean updateTextDirection(int textDirection) {
if (super.updateTextDirection(textDirection)) {
if (textDirection == AUTO_TEXT_DIRECTION || (state & HAS_AUTO_DIRECTION) != 0) {
- for (int i = 0, n = items.length; i < n; i++) {
- if (items[i] != null) {
- items[i].updateTextDirection(textDirection == AUTO_TEXT_DIRECTION ? AUTO_TEXT_DIRECTION : style & SWT.FLIP_TEXT_DIRECTION);
+ for (TableItem item : items) {
+ if (item != null) {
+ item.updateTextDirection(textDirection == AUTO_TEXT_DIRECTION ? AUTO_TEXT_DIRECTION : style & SWT.FLIP_TEXT_DIRECTION);
}
}
}
@@ -5681,12 +5665,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return TableProc;
}
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
if (hwnd != handle) {
switch (msg) {
@@ -5729,8 +5713,8 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
OS.ScreenToClient (hwnd, pt);
pinfo.x = pt.x;
pinfo.y = pt.y;
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int index = (int)OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
if (0 <= index && index < columnCount && !columns [index].resizable) {
if ((pinfo.flags & (OS.HHT_ONDIVIDER | OS.HHT_ONDIVOPEN)) != 0) {
OS.SetCursor (OS.LoadCursor (0, OS.IDC_ARROW));
@@ -5754,8 +5738,8 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
*
* The fix for both cases is to create the image using PrintWindow().
*/
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
- int selection = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, topIndex - 1, OS.LVNI_SELECTED);
+ int topIndex = (int)OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0);
+ int selection = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, topIndex - 1, OS.LVNI_SELECTED);
if (selection == -1) return 0;
POINT mousePos = new POINT ();
OS.POINTSTOPOINT (mousePos, OS.GetMessagePos ());
@@ -5774,12 +5758,12 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
rect.left = Math.max (clientRect.left, rect.right - width);
}
}
- long /*int*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
- while ((selection = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, selection, OS.LVNI_SELECTED)) != -1) {
+ long hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ while ((selection = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, selection, OS.LVNI_SELECTED)) != -1) {
if (rect.bottom - rect.top > DRAG_IMAGE_SIZE) break;
if (rect.bottom > clientRect.bottom) break;
RECT itemRect = item.getBounds (selection, 0, true, true, true);
- long /*int*/ rectRgn = OS.CreateRectRgn (rect.left, itemRect.top, rect.right, itemRect.bottom);
+ long rectRgn = OS.CreateRectRgn (rect.left, itemRect.top, rect.right, itemRect.bottom);
OS.CombineRgn (hRgn, hRgn, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
rect.bottom = itemRect.bottom;
@@ -5787,8 +5771,8 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
OS.GetRgnBox (hRgn, rect);
/* Create resources */
- long /*int*/ hdc = OS.GetDC (handle);
- long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long hdc = OS.GetDC (handle);
+ long memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = rect.right - rect.left;
@@ -5798,10 +5782,10 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT();
OS.SetWindowOrgEx (memHdc, rect.left, rect.top, pt);
@@ -5832,14 +5816,14 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case ' ':
if ((style & SWT.CHECK) != 0) {
- int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
- if (index != -1) {
+ int index = -1;
+ while ((index = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, index, OS.LVNI_SELECTED)) != -1) {
TableItem item = _getItem (index);
item.setChecked (!item.getChecked (), true);
OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, index + 1);
@@ -5851,7 +5835,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* This allows the application to cancel an operation that is normally
* performed in WM_KEYDOWN from WM_CHAR.
*/
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
return new LRESULT (code);
case SWT.CR:
/*
@@ -5861,7 +5845,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* event will fail. The fix is to ignore LVN_ITEMACTIVATE when it is
* caused by WM_KEYDOWN and send SWT.DefaultSelection from WM_CHAR.
*/
- int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int index = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index != -1) {
Event event = new Event ();
event.item = _getItem (index);
@@ -5873,7 +5857,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_CONTEXTMENU (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CONTEXTMENU (long wParam, long lParam) {
/*
* Feature in Windows. For some reason, when the right
* mouse button is pressed over an item, Windows sends
@@ -5891,14 +5875,14 @@ LRESULT WM_CONTEXTMENU (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if (findImageControl () != null) return LRESULT.ONE;
return result;
}
@Override
-LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETOBJECT (long wParam, long lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item accessibility is
@@ -5911,10 +5895,10 @@ LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_SPACE:
/*
* Ensure that the window proc does not process VK_SPACE
@@ -5933,8 +5917,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (index != columnCount || hooks (SWT.MeasureItem)) {
TableColumn [] newColumns = new TableColumn [columnCount];
System.arraycopy (columns, 0, newColumns, 0, columnCount);
- for (int i=0; i<newColumns.length; i++) {
- TableColumn column = newColumns [i];
+ for (TableColumn column : newColumns) {
if (!column.isDisposed () && column.getResizable ()) {
column.pack ();
}
@@ -5957,14 +5940,14 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long oldHeaderProc = 0, oldTableProc = 0;
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
oldHeaderProc = OS.SetWindowLongPtr (hwndHeader, OS.GWLP_WNDPROC, HeaderProc);
}
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
result = code == 0 ? LRESULT.ZERO : new LRESULT (code);
if (fixSubclass) {
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldTableProc);
@@ -5980,7 +5963,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is lost, Windows does not
@@ -5995,7 +5978,7 @@ LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long wParam, long lParam) {
/*
* Feature in Windows. When the user selects outside of
@@ -6007,11 +5990,11 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
LVHITTESTINFO pinfo = new LVHITTESTINFO ();
pinfo.x = OS.GET_X_LPARAM (lParam);
pinfo.y = OS.GET_Y_LPARAM (lParam);
- int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
+ int index = (int)OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
Display display = this.display;
display.captureChanged = false;
- sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam);
- if (!sendMouseEvent (SWT.MouseDoubleClick, 1, handle, OS.WM_LBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, 1, handle, lParam);
+ if (!sendMouseEvent (SWT.MouseDoubleClick, 1, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
@@ -6044,7 +6027,7 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -6068,7 +6051,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* the correct way to determine that the user has selected
* the check box, equality is needed.
*/
- int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
+ int index = (int)OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
if (index != -1 && pinfo.flags == OS.LVHT_ONITEMSTATEICON) {
TableItem item = _getItem (index);
if (item != null && !item.isDisposed ()) {
@@ -6081,7 +6064,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEHOVER (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEHOVER (long wParam, long lParam) {
/*
* Feature in Windows. Despite the fact that hot
* tracking is not enabled, the hot tracking code
@@ -6090,14 +6073,14 @@ LRESULT WM_MOUSEHOVER (long /*int*/ wParam, long /*int*/ lParam) {
* avoid calling the window proc.
*/
LRESULT result = super.WM_MOUSEHOVER (wParam, lParam);
- int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
int mask = OS.LVS_EX_ONECLICKACTIVATE | OS.LVS_EX_TRACKSELECT | OS.LVS_EX_TWOCLICKACTIVATE;
if ((bits & mask) != 0) return result;
return LRESULT.ZERO;
}
@Override
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PAINT (long wParam, long lParam) {
if ((state & DISPOSE_SENT) != 0) return LRESULT.ZERO;
_checkShrink();
@@ -6106,7 +6089,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_RBUTTONDBLCLK (long wParam, long lParam) {
/*
* Feature in Windows. When the user selects outside of
* a table item, Windows deselects all the items, even
@@ -6120,8 +6103,8 @@ LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
OS.SendMessage (handle, OS.LVM_HITTEST, 0, pinfo);
Display display = this.display;
display.captureChanged = false;
- sendMouseEvent (SWT.MouseDown, 3, handle, OS.WM_RBUTTONDOWN, wParam, lParam);
- if (sendMouseEvent (SWT.MouseDoubleClick, 3, handle, OS.WM_RBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, 3, handle, lParam);
+ if (sendMouseEvent (SWT.MouseDoubleClick, 3, handle, lParam)) {
if (pinfo.iItem != -1) callWindowProc (handle, OS.WM_RBUTTONDBLCLK, wParam, lParam);
}
if (!display.captureChanged && !isDisposed ()) {
@@ -6131,7 +6114,7 @@ LRESULT WM_RBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long wParam, long lParam) {
/*
* Feature in Windows. For some reason, capturing
* the mouse after processing the mouse event for the
@@ -6143,7 +6126,7 @@ LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
/*
* Bug in Windows. When focus is gained after the
@@ -6164,9 +6147,9 @@ LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
* no selected item. The fix to make the first item
* be the focus item.
*/
- int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
if (count == 0) return result;
- int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
+ int index = (int)OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index == -1) {
LVITEM lvItem = new LVITEM ();
lvItem.state = OS.LVIS_FOCUSED;
@@ -6179,7 +6162,7 @@ LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFONT (long wParam, long lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
@@ -6203,7 +6186,7 @@ LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETREDRAW (long wParam, long lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
/*
@@ -6213,7 +6196,7 @@ LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
* turned off.
*/
if (wParam == 1) {
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
if (hooks (SWT.MeasureItem) || hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
}
@@ -6226,9 +6209,9 @@ LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
* which stops all graphics output to the control.
*/
OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
- long /*int*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
if (wParam == 0) {
- if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
+ if ((int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, 0xFFFFFF);
}
}
@@ -6236,7 +6219,7 @@ LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
if (ignoreResize) return null;
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
OS.InvalidateRect (handle, null, true);
@@ -6249,13 +6232,13 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long wParam, long lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
if (findBackgroundControl () == null) {
setBackgroundPixel (defaultBackground ());
} else {
- int oldPixel = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
+ int oldPixel = (int)OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);
if (oldPixel != OS.CLR_NONE) {
if (findImageControl () == null) {
if ((style & SWT.CHECK) != 0) fixCheckboxImageListColor (true);
@@ -6266,7 +6249,7 @@ LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_HSCROLL (long wParam, long lParam) {
/*
* Bug in Windows. When a table that is drawing grid lines
* is slowly scrolled horizontally to the left, the table does
@@ -6294,8 +6277,8 @@ LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long oldHeaderProc = 0, oldTableProc = 0;
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -6314,7 +6297,7 @@ LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
boolean fixScroll = false;
if (OS.LOWORD (wParam) != OS.SB_ENDSCROLL) {
if (columnCount > H_SCROLL_LIMIT) {
- int rowCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOUNTPERPAGE, 0, 0);
+ int rowCount = (int)OS.SendMessage (handle, OS.LVM_GETCOUNTPERPAGE, 0, 0);
if (rowCount > V_SCROLL_LIMIT) fixScroll = getDrawing () && OS.IsWindowVisible (handle);
}
}
@@ -6382,7 +6365,7 @@ LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_VSCROLL (long wParam, long lParam) {
/*
* When there are many columns in a table, scrolling performance
* can be improved by temporarily unsubclassing the window proc
@@ -6394,8 +6377,8 @@ LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
* NOTE: The header tooltip can subclass the header proc so the
* current proc must be restored or header tooltips stop working.
*/
- long /*int*/ oldHeaderProc = 0, oldTableProc = 0;
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long oldHeaderProc = 0, oldTableProc = 0;
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
boolean fixSubclass = isOptimizedRedraw ();
if (fixSubclass) {
oldTableProc = OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TableProc);
@@ -6414,7 +6397,7 @@ LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
boolean fixScroll = false;
if (OS.LOWORD (wParam) != OS.SB_ENDSCROLL) {
if (columnCount > H_SCROLL_LIMIT) {
- int rowCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOUNTPERPAGE, 0, 0);
+ int rowCount = (int)OS.SendMessage (handle, OS.LVM_GETCOUNTPERPAGE, 0, 0);
if (rowCount > V_SCROLL_LIMIT) fixScroll = getDrawing () && OS.IsWindowVisible (handle);
}
}
@@ -6481,8 +6464,8 @@ LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
RECT clientRect = new RECT ();
OS.GetClientRect (handle, clientRect);
clientRect.top += headerHeight;
- long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
if (code == OS.SB_LINEDOWN) {
clientRect.top = clientRect.bottom - itemHeight - GRID_WIDTH;
@@ -6501,12 +6484,12 @@ LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMeasureChild (long wParam, long lParam) {
MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();
OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);
if (itemHeight == -1) {
- long /*int*/ empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
- long /*int*/ oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
+ long empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);
+ long oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
struct.itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
} else {
struct.itemHeight = itemHeight;
@@ -6516,9 +6499,13 @@ LRESULT wmMeasureChild (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+LRESULT wmNotify (NMHDR hdr, long wParam, long lParam) {
+ long hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hdr.hwndFrom == hwndToolTip) {
+ if (hdr.hwndFrom != itemToolTipHandle) {
+ maybeEnableDarkSystemTheme(hdr.hwndFrom);
+ itemToolTipHandle = hdr.hwndFrom;
+ }
LRESULT result = wmNotifyToolTip (hdr, wParam, lParam);
if (result != null) return result;
}
@@ -6530,7 +6517,7 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.LVN_ODFINDITEM: {
if ((style & SWT.VIRTUAL) != 0) return new LRESULT (-1);
@@ -6594,7 +6581,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
RECT rect = new RECT ();
rect.left = OS.LVIR_BOUNDS;
ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (handle, OS. LVM_GETITEMRECT, plvfi.iItem, rect);
+ long code = OS.SendMessage (handle, OS. LVM_GETITEMRECT, plvfi.iItem, rect);
ignoreCustomDraw = false;
if (code != 0) OS.InvalidateRect (handle, rect, true);
break;
@@ -6727,7 +6714,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
break;
}
case OS.NM_CUSTOMDRAW: {
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
if (hdr.hwndFrom == hwndHeader) break;
if (!customDraw && findImageControl () == null) {
/*
@@ -6820,8 +6807,8 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
}
if (hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
- int count = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
+ long hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
+ int count = (int)OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
if (count != 0) {
forceResize ();
RECT rect = new RECT ();
@@ -6835,7 +6822,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
OS.SendMessage (handle, OS. LVM_GETITEMRECT, pnmlv.iItem, itemRect);
ignoreCustomDraw = false;
RECT headerRect = new RECT ();
- int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
+ int index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, count - 1, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
rect.left = headerRect.right;
@@ -6851,7 +6838,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyHeader (NMHDR hdr, long wParam, long lParam) {
/*
* Feature in Windows. On NT, the automatically created
* header control is created as a UNICODE window, not an
@@ -6901,10 +6888,16 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
int pixel = getHeaderBackgroundPixel();
if ((nmcd.uItemState & OS.CDIS_SELECTED) != 0) {
pixel = getDifferentColor(pixel);
- } else if (columns[(int) nmcd.dwItemSpec] == sortColumn && sortDirection != SWT.NONE) {
- pixel = getSlightlyDifferentColor(pixel);
}
- long /*int*/ brush = OS.CreateSolidBrush(pixel);
+ /*
+ * Don't change the header background color for set selected column, similar to
+ * Windows 10 which itself does not use any different color for sort header. For
+ * more details refer bug 536020
+ */
+// else if (columns[(int) nmcd.dwItemSpec] == sortColumn && sortDirection != SWT.NONE) {
+// pixel = getSlightlyDifferentColor(pixel);
+// }
+ long brush = OS.CreateSolidBrush(pixel);
OS.FillRect(nmcd.hdc, rect, brush);
OS.DeleteObject(brush);
@@ -6929,8 +6922,8 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (columns[i] == sortColumn && sortDirection != SWT.NONE) {
// the display.getSortImage looks terrible after scaling up.
- long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, 1, getHeaderForegroundPixel());
- long /*int*/ oldPen = OS.SelectObject (nmcd.hdc, pen);
+ long pen = OS.CreatePen (OS.PS_SOLID, 1, getHeaderForegroundPixel());
+ long oldPen = OS.SelectObject (nmcd.hdc, pen);
int center = rects[i].left + (rects[i].right - rects[i].left) / 2;
/*
* Sort indicator size needs to scale as per the Native Windows OS DPI level
@@ -6948,18 +6941,24 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
OS.DeleteObject (pen);
}
+ int alignmentCorrection = _getLinesVisible () ? 0 : 1;
+
/* Windows 7 and 10 always draw a nearly invisible vertical line between the columns, even if lines are disabled.
This line uses no fixed color constant, but calculates it from the background color.
- The method getSlightlyDifferentColor gives us a color, that is near enough to the windows algorithm. */
- long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, getGridLineWidthInPixels(), getSlightlyDifferentColor(getHeaderBackgroundPixel()));
- long /*int*/ oldPen = OS.SelectObject (nmcd.hdc, pen);
- int alignmentCorrection = _getLinesVisible () ? 0 : 1;
+ The method getSlightlyDifferentColor gives us a color, that is near enough to the windows algorithm.
+
+ NOTE: This code has no effect since Bug 517003, because next OS.Polyline() draws over the same coords.
+
+ long pen = OS.CreatePen (OS.PS_SOLID, getGridLineWidthInPixels(), getSlightlyDifferentColor(getHeaderBackgroundPixel()));
+ long oldPen = OS.SelectObject (nmcd.hdc, pen);
OS.Polyline(nmcd.hdc, new int[] {rects[i].right-alignmentCorrection, rects[i].top, rects[i].right-alignmentCorrection, rects[i].bottom}, 2);
OS.SelectObject (nmcd.hdc, oldPen);
OS.DeleteObject (pen);
+ */
- pen = OS.CreatePen (OS.PS_SOLID, getGridLineWidthInPixels(), OS.GetSysColor(OS.COLOR_3DFACE));
- oldPen = OS.SelectObject (nmcd.hdc, pen);
+ int lineColor = (display.tableHeaderLinePixel != -1) ? display.tableHeaderLinePixel : OS.GetSysColor(OS.COLOR_3DFACE);
+ long pen = OS.CreatePen (OS.PS_SOLID, getGridLineWidthInPixels(), lineColor);
+ long oldPen = OS.SelectObject (nmcd.hdc, pen);
/* To differentiate headers, always draw header column separator. */
OS.Polyline(nmcd.hdc, new int[] {rects[i].right - alignmentCorrection, rects[i].top, rects[i].right - alignmentCorrection, rects[i].bottom}, 2);
/* To differentiate header & content area, always draw the line separator between header & first row. */
@@ -7008,15 +7007,15 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
RECT rect = new RECT();
lastColumnRight += _getLinesVisible() ? 1 : 0;
OS.SetRect(rect, lastColumnRight, nmcd.top, nmcd.right, nmcd.bottom-1);
- long /*int*/ brush = OS.CreateSolidBrush(getHeaderBackgroundPixel());
+ long brush = OS.CreateSolidBrush(getHeaderBackgroundPixel());
OS.FillRect(nmcd.hdc, rect, brush);
OS.DeleteObject(brush);
}
// always draw the highlighted border at the end, to avoid overdrawing by other borders.
if (highlightedHeaderDividerX != -1) {
- long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, 4, OS.GetSysColor(OS.COLOR_HIGHLIGHT));
- long /*int*/ oldPen = OS.SelectObject (nmcd.hdc, pen);
+ long pen = OS.CreatePen (OS.PS_SOLID, 4, OS.GetSysColor(OS.COLOR_HIGHLIGHT));
+ long oldPen = OS.SelectObject (nmcd.hdc, pen);
OS.Polyline(nmcd.hdc, new int[] {highlightedHeaderDividerX, nmcd.top, highlightedHeaderDividerX, nmcd.bottom}, 2);
OS.SelectObject (nmcd.hdc, oldPen);
OS.DeleteObject (pen);
@@ -7039,7 +7038,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
case OS.HDN_BEGINDRAG: {
if (ignoreColumnMove) return LRESULT.ONE;
- int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_HEADERDRAGDROP) != 0) {
if (columnCount == 0) return LRESULT.ONE;
NMHEADER phdn = new NMHEADER ();
@@ -7057,7 +7056,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
case OS.HDN_ENDDRAG: {
headerItemDragging = false;
- int bits = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ int bits = (int)OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if ((bits & OS.LVS_EX_HEADERDRAGDROP) == 0) break;
NMHEADER phdn = new NMHEADER ();
OS.MoveMemory (phdn, lParam, NMHEADER.sizeof);
@@ -7070,7 +7069,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
OS.SendMessage (handle, OS.LVM_GETCOLUMNORDERARRAY, columnCount, order);
int index = 0;
while (index < order.length) {
- if (order [index] == phdn.iItem) break;
+ if (order [index] == phdn.iItem) break;
index++;
}
if (index == order.length) index = 0;
@@ -7097,7 +7096,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
* lines are not redrawn. The fix is to detect the case and force
* a redraw of the first column.
*/
- int width = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
+ int width = (int)OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (lastWidth == 0 && width > 0) {
if (_getLinesVisible()) {
RECT rect = new RECT ();
@@ -7157,7 +7156,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyToolTip (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.NM_CUSTOMDRAW: {
if (toolTipText != null) break;
@@ -7173,7 +7172,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.wmNotify (hdr, wParam, lParam);
if (result != null) return result;
if (hdr.code != OS.TTN_SHOW) tipRequested = true;
- long /*int*/ code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_NOTIFY, wParam, lParam);
if (hdr.code != OS.TTN_SHOW) tipRequested = false;
if (toolTipText != null) break;
if (isCustomToolTip ()) {
@@ -7192,10 +7191,10 @@ LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
*/
if (OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo) >= 0) {
TableItem item = _getItem (pinfo.iItem);
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (handle);
+ long oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- long /*int*/ hFont = item.fontHandle (pinfo.iSubItem);
+ long hFont = item.fontHandle (pinfo.iSubItem);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = sendMeasureItemEvent (item, pinfo.iItem, pinfo.iSubItem, hDC);
if (!isDisposed () && !item.isDisposed ()) {
@@ -7205,7 +7204,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (hdr.code == OS.TTN_SHOW) {
RECT toolRect = toolTipRect (itemRect);
OS.MapWindowPoints (handle, 0, toolRect, 2);
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOZORDER;
int width = toolRect.right - toolRect.left, height = toolRect.bottom - toolRect.top;
OS.SetWindowPos (hwndToolTip, 0, toolRect.left , toolRect.top, width, height, flags);
@@ -7250,7 +7249,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
+LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long lParam) {
switch (nmcd.dwDrawStage) {
case OS.CDDS_PREPAINT: {
if (isCustomToolTip ()) {
@@ -7277,10 +7276,10 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
*/
if (OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo) >= 0) {
TableItem item = _getItem (pinfo.iItem);
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ hFont = item.fontHandle (pinfo.iSubItem);
+ long hDC = OS.GetDC (handle);
+ long hFont = item.fontHandle (pinfo.iSubItem);
if (hFont == -1) hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
+ long oldFont = OS.SelectObject (hDC, hFont);
boolean drawForeground = true;
RECT cellRect = item.getBounds (pinfo.iItem, pinfo.iSubItem, true, true, false, false, hDC);
if (hooks (SWT.EraseItem)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
index b6bc0cb37e..097ab46efa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
@@ -319,8 +319,77 @@ public int getWidth () {
int getWidthInPixels () {
int index = parent.indexOf (this);
if (index == -1) return 0;
- long /*int*/ hwnd = parent.handle;
- return (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ long hwnd = parent.handle;
+ return (int)OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+}
+
+/**
+ * WINAPI doesn't provide any means to request column's optimal size.
+ * There is only an API to resize to optimal size. The workaround is to
+ * 1) disable redraw
+ * 2) resize to optimal
+ * 3) query new column size
+ * 4) set old column size
+ * 5) enable redraw
+ * This preserves old column size. As a consequence, no painting is
+ * needed after enabling redraw.
+ */
+private int calcAutoWidth(int index, boolean withHeader) {
+ long hwnd = parent.handle;
+
+ // WM_SETREDRAW has a side effect of forcing Control to be visible.
+ // On the other hand, if control is invisible, 'WM_SETREDRAW' is not needed.
+ int style = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
+ boolean isTableVisible = ((style & OS.WS_VISIBLE) != 0);
+ boolean isTableDrawing = parent.getDrawing ();
+ boolean needsDisableRedraw = isTableVisible && isTableDrawing;
+
+ try {
+ if (needsDisableRedraw) {
+ // WM_SETREDRAW is used directly, because 'Control.setRedraw()'
+ // also repaints, which is to be avoided in this function.
+ OS.SendMessage (hwnd, OS.WM_SETREDRAW, 0, 0);
+ }
+
+ int oldWidth = (int)OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+
+ /*
+ * Feature in Windows. When LVSCW_AUTOSIZE_USEHEADER is used
+ * with LVM_SETCOLUMNWIDTH to resize the last column, the last
+ * column is expanded to fill the client area. The fix is to
+ * resize the table to be small, set the column width and then
+ * restore the table to its original size.
+ *
+ * Note: temporarily setting LVS_EX_COLUMNSNAPPOINTS may be a
+ * less intrusive workaround.
+ */
+ RECT rect = null;
+ boolean fixWidth = index == parent.getColumnCount () - 1;
+ if (fixWidth) {
+ rect = new RECT ();
+ OS.GetWindowRect (hwnd, rect);
+ OS.UpdateWindow (hwnd);
+ int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOREDRAW | OS.SWP_NOZORDER;
+ OS.SetWindowPos (hwnd, 0, 0, 0, 0, rect.bottom - rect.top, flags);
+ }
+
+ int resizeType = withHeader ? OS.LVSCW_AUTOSIZE_USEHEADER : OS.LVSCW_AUTOSIZE;
+ OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, resizeType);
+
+ if (fixWidth) {
+ int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOZORDER;
+ OS.SetWindowPos (hwnd, 0, 0, 0, rect.right - rect.left, rect.bottom - rect.top, flags);
+ }
+
+ int newWidth = (int)OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, oldWidth);
+
+ return newWidth;
+ } finally {
+ if (needsDisableRedraw) {
+ OS.SendMessage (hwnd, OS.WM_SETREDRAW, 1, 0);
+ }
+ }
}
/**
@@ -338,10 +407,10 @@ public void pack () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return;
- long /*int*/ hwnd = parent.handle;
- int oldWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ long hwnd = parent.handle;
+ int oldWidth = (int)OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
TCHAR buffer = new TCHAR (parent.getCodePage (), text, true);
- int headerWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + Table.HEADER_MARGIN;
+ int headerWidth = (int)OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + Table.HEADER_MARGIN;
if (OS.IsAppThemed ()) headerWidth += Table.HEADER_EXTRA;
boolean hasHeaderImage = false;
if (image != null || parent.sortColumn == this) {
@@ -352,25 +421,25 @@ public void pack () {
Rectangle bounds = image.getBoundsInPixels ();
headerWidth += bounds.width;
}
- long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
- int margin = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
+ long hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ int margin = (int)OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
headerWidth += margin * 4;
}
parent.ignoreColumnResize = true;
int columnWidth = 0;
if (parent.hooks (SWT.MeasureItem)) {
RECT headerRect = new RECT ();
- long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
- long /*int*/ hDC = OS.GetDC (hwnd);
- long /*int*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (hwnd);
+ long oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- int count = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETITEMCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (hwnd, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i=0; i<count; i++) {
TableItem item = parent._getItem (i, false);
if (item != null) {
- long /*int*/ hFont = item.fontHandle (index);
+ long hFont = item.fontHandle (index);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
Event event = parent.sendMeasureItemEvent (item, i, index, hDC);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
@@ -381,10 +450,8 @@ public void pack () {
}
if (newFont != 0) OS.SelectObject (hDC, oldFont);
OS.ReleaseDC (hwnd, hDC);
- OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, columnWidth);
} else {
- OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, OS.LVSCW_AUTOSIZE);
- columnWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
+ columnWidth = calcAutoWidth (index, false);
if (index == 0) {
/*
* Bug in Windows. When LVM_SETCOLUMNWIDTH is used with LVSCW_AUTOSIZE
@@ -401,7 +468,7 @@ public void pack () {
* width by the width of the image list.
*/
if ((parent.style & SWT.CHECK) != 0) {
- long /*int*/ hStateList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
+ long hStateList = OS.SendMessage (hwnd, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);
if (hStateList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
@@ -412,48 +479,28 @@ public void pack () {
}
if (headerWidth > columnWidth) {
if (!hasHeaderImage) {
- /*
- * Feature in Windows. When LVSCW_AUTOSIZE_USEHEADER is used
- * with LVM_SETCOLUMNWIDTH to resize the last column, the last
- * column is expanded to fill the client area. The fix is to
- * resize the table to be small, set the column width and then
- * restore the table to its original size.
- */
- RECT rect = null;
- boolean fixWidth = index == parent.getColumnCount () - 1;
- if (fixWidth) {
- rect = new RECT ();
- OS.GetWindowRect (hwnd, rect);
- OS.UpdateWindow (hwnd);
- int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOREDRAW | OS.SWP_NOZORDER;
- OS.SetWindowPos (hwnd, 0, 0, 0, 0, rect.bottom - rect.top, flags);
- }
- OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, OS.LVSCW_AUTOSIZE_USEHEADER);
- if (fixWidth) {
- int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOZORDER;
- OS.SetWindowPos (hwnd, 0, 0, 0, rect.right - rect.left, rect.bottom - rect.top, flags);
- }
+ // The code has been there for years and it's no longer clear why
+ // not just use 'headerWidth' here. Maybe because SWT's size
+ // calculation is imperfect and WINAPI will do it better?
+ columnWidth = calcAutoWidth (index, true);
} else {
- OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, headerWidth);
- }
- } else {
- if (index == 0) {
- OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, columnWidth);
+ columnWidth = headerWidth;
}
}
+
+ OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, columnWidth);
+
parent.ignoreColumnResize = false;
- int newWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0);
- if (oldWidth != newWidth) {
+ if (oldWidth != columnWidth) {
updateToolTip (index);
sendEvent (SWT.Resize);
if (isDisposed ()) return;
boolean moved = false;
- int [] order = parent.getColumnOrder ();
TableColumn [] columns = parent.getColumns ();
- for (int i=0; i<order.length; i++) {
- TableColumn column = columns [order [i]];
+ for (int columnindex : parent.getColumnOrder ()) {
+ TableColumn column = columns [columnindex];
if (moved && !column.isDisposed ()) {
- column.updateToolTip (order [i]);
+ column.updateToolTip (columnindex);
column.sendEvent (SWT.Move);
}
if (column == this) moved = true;
@@ -547,7 +594,7 @@ public void setAlignment (int alignment) {
if (index == -1 || index == 0) return;
style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -568,7 +615,7 @@ public void setAlignment (int alignment) {
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
- long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
rect.left = headerRect.left;
@@ -592,7 +639,7 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT | OS.LVCF_IMAGE;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -656,8 +703,8 @@ public void setResizable (boolean resizable) {
void setSortDirection (int direction) {
int index = parent.indexOf (this);
if (index == -1) return;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long hwnd = parent.handle;
+ long hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE;
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
@@ -700,8 +747,8 @@ void setSortDirection (int direction) {
parent.forceResize ();
RECT rect = new RECT ();
OS.GetClientRect (hwnd, rect);
- if ((int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
- int oldColumn = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
+ if ((int)OS.SendMessage (hwnd, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
+ int oldColumn = (int)OS.SendMessage (hwnd, OS.LVM_GETSELECTEDCOLUMN, 0, 0);
int newColumn = direction == SWT.NONE ? -1 : index;
OS.SendMessage (hwnd, OS.LVM_SETSELECTEDCOLUMN, newColumn, 0);
RECT headerRect = new RECT ();
@@ -739,7 +786,7 @@ public void setText (String string) {
* text does not draw. The fix is to query and then
* set the alignment.
*/
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
LVCOLUMN lvColumn = new LVCOLUMN ();
lvColumn.mask = OS.LVCF_FMT;
OS.SendMessage (hwnd, OS.LVM_GETCOLUMN, index, lvColumn);
@@ -751,14 +798,14 @@ public void setText (String string) {
* at the end of the text. The fix is to remove
* mnemonic characters.
*/
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
char [] buffer = fixMnemonic (string);
int byteCount = buffer.length * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
lvColumn.mask |= OS.LVCF_TEXT;
lvColumn.pszText = pszText;
- long /*int*/ result = OS.SendMessage (hwnd, OS.LVM_SETCOLUMN, index, lvColumn);
+ long result = OS.SendMessage (hwnd, OS.LVM_SETCOLUMN, index, lvColumn);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
if (result == 0) error (SWT.ERROR_CANNOT_SET_TEXT);
}
@@ -793,7 +840,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -819,17 +866,17 @@ void setWidthInPixels (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- long /*int*/ hwnd = parent.handle;
- if (width != (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0)) {
+ long hwnd = parent.handle;
+ if (width != (int)OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0)) {
OS.SendMessage (hwnd, OS.LVM_SETCOLUMNWIDTH, index, width);
}
}
void updateToolTip (int index) {
- long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long hwnd = parent.handle;
+ long hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
RECT rect = new RECT ();
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
index c58affa272..0206d30cb3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
@@ -152,7 +152,7 @@ void destroyWidget () {
releaseHandle ();
}
-long /*int*/ fontHandle (int index) {
+long fontHandle (int index) {
if (cellFont != null && cellFont [index] != null) return cellFont [index].handle;
if (font != null) return font.handle;
return -1;
@@ -256,7 +256,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
return getBounds (row, column, getText, getImage, fullText, false, 0);
}
-RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean fullText, boolean fullImage, long /*int*/ hDC) {
+RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean fullText, boolean fullImage, long hDC) {
if (!getText && !getImage) return new RECT ();
int columnCount = parent.getColumnCount ();
if (!(0 <= column && column < Math.max (1, columnCount))) {
@@ -264,24 +264,24 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (parent.fixScrollWidth) parent.setScrollWidth (null, true);
RECT rect = new RECT ();
- long /*int*/ hwnd = parent.handle;
- int bits = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+ long hwnd = parent.handle;
+ int bits = (int)OS.SendMessage (hwnd, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
if (column == 0 && (bits & OS.LVS_EX_FULLROWSELECT) == 0) {
if (parent.explorerTheme) {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
+ long code = OS.SendMessage (hwnd, OS. LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (getText) {
int width = 0;
- long /*int*/ hFont = fontHandle (column);
+ long hFont = fontHandle (column);
if (hFont == -1 && hDC == 0) {
TCHAR buffer = new TCHAR (parent.getCodePage (), text, true);
- width = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer);
+ width = (int)OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer);
} else {
char [] buffer = text.toCharArray ();
- long /*int*/ textDC = hDC != 0 ? hDC : OS.GetDC (hwnd), oldFont = -1;
+ long textDC = hDC != 0 ? hDC : OS.GetDC (hwnd), oldFont = -1;
if (hDC == 0) {
if (hFont == -1) hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
oldFont = OS.SelectObject (textDC, hFont);
@@ -302,7 +302,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
if (getText) {
rect.left = OS.LVIR_SELECTBOUNDS;
parent.ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ long code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!getImage) {
@@ -316,14 +316,14 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
+ long code = OS.SendMessage (hwnd, OS.LVM_GETITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
}
}
if (fullText || fullImage) {
RECT headerRect = new RECT ();
- long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, 0, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
if (getText && fullText) rect.right = headerRect.right;
@@ -347,7 +347,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
*/
rect.left = getText ? OS.LVIR_LABEL : OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ long code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
/*
@@ -381,7 +381,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
if (column == 0 && fullImage) {
RECT headerRect = new RECT ();
- long /*int*/ hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
+ long hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, 0, headerRect);
OS.MapWindowPoints (hwndHeader, hwnd, headerRect, 2);
rect.left = headerRect.left;
@@ -389,7 +389,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
} else {
rect.left = OS.LVIR_ICON;
parent.ignoreCustomDraw = true;
- long /*int*/ code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
+ long code = OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, rect);
parent.ignoreCustomDraw = false;
if (code == 0) return new RECT ();
if (!hasImage) rect.right = rect.left;
@@ -706,7 +706,7 @@ Rectangle getTextBoundsInPixels (int index) {
void redraw () {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -715,7 +715,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
int index = parent.indexOf (this);
if (index == -1) return;
@@ -885,7 +885,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -949,7 +949,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
@@ -1159,7 +1159,7 @@ public void setImageIndent (int indent) {
} else {
int index = parent.indexOf (this);
if (index != -1) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_INDENT;
lvItem.iItem = index;
@@ -1246,7 +1246,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && cached) {
int itemIndex = parent.indexOf (this);
if (itemIndex != -1) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
LVITEM lvItem = new LVITEM ();
lvItem.mask = OS.LVIF_TEXT;
lvItem.iItem = itemIndex;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
index ed3c218b2c..e0bc571bad 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
+ * Copyright (c) 2010, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -15,9 +15,12 @@
package org.eclipse.swt.widgets;
+import java.io.*;
+
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.ole.win32.*;
import org.eclipse.swt.internal.win32.*;
/**
@@ -40,45 +43,17 @@ import org.eclipse.swt.internal.win32.*;
public class TaskBar extends Widget {
int itemCount;
TaskItem [] items = new TaskItem [4];
- long /*int*/ mTaskbarList3;
+ ITaskbarList3 mTaskbarList3;
+ String iconsDir;
static final char [] EXE_PATH;
- static final char [] ICO_DIR = {'i','c','o','_','d','i','r','\0'};
static final PROPERTYKEY PKEY_Title = new PROPERTYKEY ();
static final PROPERTYKEY PKEY_AppUserModel_IsDestListSeparator = new PROPERTYKEY ();
static final String EXE_PATH_KEY = "org.eclipse.swt.win32.taskbar.executable"; //$NON-NLS-1$
static final String EXE_ARGS_KEY = "org.eclipse.swt.win32.taskbar.arguments"; //$NON-NLS-1$
static final String ICON_KEY = "org.eclipse.swt.win32.taskbar.icon"; //$NON-NLS-1$
static final String ICON_INDEX_KEY = "org.eclipse.swt.win32.taskbar.icon.index"; //$NON-NLS-1$
- static final byte [] CLSID_TaskbarList = new byte [16];
- static final byte [] CLSID_DestinationList = new byte[16];
- static final byte [] CLSID_EnumerableObjectCollection = new byte[16];
- static final byte [] CLSID_ShellLink = new byte[16];
- static final byte [] CLSID_FileOperation = new byte [16];
- static final byte [] IID_ITaskbarList3 = new byte [16];
- static final byte [] IID_ICustomDestinationList = new byte[16];
- static final byte [] IID_IObjectArray = new byte[16];
- static final byte [] IID_IObjectCollection = new byte[16];
- static final byte [] IID_IShellLinkW = new byte[16];
- static final byte [] IID_IPropertyStore = new byte[16];
- static final byte [] IID_IShellItem = new byte [16];
- static final byte [] IID_IFileOperation = new byte [16];
- static final byte [] FOLDERID_LocalAppData = new byte [16];
static {
- OS.IIDFromString ("{56FDF344-FD6D-11d0-958A-006097C9A090}\0".toCharArray (), CLSID_TaskbarList); //$NON-NLS-1$
- OS.IIDFromString ("{77f10cf0-3db5-4966-b520-b7c54fd35ed6}\0".toCharArray (), CLSID_DestinationList); //$NON-NLS-1$
- OS.IIDFromString ("{2d3468c1-36a7-43b6-ac24-d3f02fd9607a}\0".toCharArray (), CLSID_EnumerableObjectCollection); //$NON-NLS-1$
- OS.IIDFromString ("{00021401-0000-0000-C000-000000000046}\0".toCharArray (), CLSID_ShellLink); //$NON-NLS-1$
- OS.IIDFromString ("{3ad05575-8857-4850-9277-11b85bdb8e09}\0".toCharArray (), CLSID_FileOperation);
- OS.IIDFromString ("{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}\0".toCharArray (), IID_ITaskbarList3); //$NON-NLS-1$
- OS.IIDFromString ("{6332debf-87b5-4670-90c0-5e57b408a49e}\0".toCharArray (), IID_ICustomDestinationList); //$NON-NLS-1$
- OS.IIDFromString ("{92CA9DCD-5622-4bba-A805-5E9F541BD8C9}\0".toCharArray (), IID_IObjectArray); //$NON-NLS-1$
- OS.IIDFromString ("{5632b1a4-e38a-400a-928a-d4cd63230295}\0".toCharArray (), IID_IObjectCollection); //$NON-NLS-1$
- OS.IIDFromString ("{000214F9-0000-0000-C000-000000000046}\0".toCharArray (), IID_IShellLinkW); //$NON-NLS-1$
- OS.IIDFromString ("{886d8eeb-8cf2-4446-8d02-cdba1dbdcf99}\0".toCharArray (), IID_IPropertyStore); //$NON-NLS-1$
- OS.IIDFromString ("{43826d1e-e718-42ee-bc55-a1e261c37bfe}\0".toCharArray (), IID_IShellItem); //$NON-NLS-1$
- OS.IIDFromString ("{947aab5f-0a5c-4c13-b4d6-4bf7836fc9f8}\0".toCharArray (), IID_IFileOperation); //$NON-NLS-1$
- OS.IIDFromString ("{F1B32785-6FBA-4FCF-9D55-7B8E7F157091}\0".toCharArray (), FOLDERID_LocalAppData); //$NON-NLS-1$
OS.PSPropertyKeyFromString ("{F29F85E0-4FF9-1068-AB91-08002B27B3D9} 2\0".toCharArray (), PKEY_Title); //$NON-NLS-1$
OS.PSPropertyKeyFromString ("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 6\0".toCharArray (), PKEY_AppUserModel_IsDestListSeparator); //$NON-NLS-1$
char [] buffer = new char [OS.MAX_PATH];
@@ -95,10 +70,11 @@ TaskBar (Display display, int style) {
}
void createHandle () {
- long /*int*/[] ppv = new long /*int*/ [1];
- int hr = OS.CoCreateInstance (CLSID_TaskbarList, 0, OS.CLSCTX_INPROC_SERVER, IID_ITaskbarList3, ppv);
+ long[] ppv = new long [1];
+ int hr = COM.CoCreateInstance (COM.CLSID_TaskbarList, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_ITaskbarList3, ppv);
+ if (hr == COM.REGDB_E_CLASSNOTREG) error (SWT.ERROR_NOT_IMPLEMENTED);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- mTaskbarList3 = ppv [0];
+ mTaskbarList3 = new ITaskbarList3 (ppv [0]);
}
void createItem (TaskItem item, int index) {
@@ -114,24 +90,23 @@ void createItem (TaskItem item, int index) {
}
void createItems () {
- Shell [] shells = display.getShells ();
- for (int i = 0; i < shells.length; i++) {
- getItem (shells[i]);
+ for (Shell shell : display.getShells ()) {
+ getItem (shell);
}
getItem (null);
}
-long /*int*/ createShellLink (MenuItem item, String directory) {
+IShellLink createShellLink (MenuItem item) {
int style = item.getStyle ();
- if ((style & SWT.CASCADE) != 0) return 0;
- long /*int*/ [] ppv = new long /*int*/ [1];
- int hr = OS.CoCreateInstance (CLSID_ShellLink, 0, OS.CLSCTX_INPROC_SERVER, IID_IShellLinkW, ppv);
+ if ((style & SWT.CASCADE) != 0) return null;
+ long [] ppv = new long [1];
+ int hr = COM.CoCreateInstance (COM.CLSID_ShellLink, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_IShellLinkW, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ pLink = ppv [0];
+ IShellLink pLink = new IShellLink (ppv [0]);
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pv = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, OS.PROPVARIANT_sizeof());
- long /*int*/ titlePtr = 0;
+ long hHeap = OS.GetProcessHeap ();
+ long pv = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, OS.PROPVARIANT_sizeof());
+ long titlePtr = 0;
PROPERTYKEY key;
if ((style & SWT.SEPARATOR) != 0) {
OS.MoveMemory (pv, new short [] {OS.VT_BOOL}, 2);
@@ -145,10 +120,9 @@ long /*int*/ createShellLink (MenuItem item, String directory) {
titlePtr = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
OS.MoveMemory (titlePtr, buffer, buffer.length * 2);
OS.MoveMemory (pv, new short [] {OS.VT_LPWSTR}, 2);
- OS.MoveMemory (pv + 8, new long /*int*/ [] {titlePtr}, C.PTR_SIZEOF);
+ OS.MoveMemory (pv + 8, new long [] {titlePtr}, C.PTR_SIZEOF);
key = PKEY_Title;
- /*IShellLink::SetPath*/
String exePath = (String)item.getData (EXE_PATH_KEY);
if (exePath != null) {
length = exePath.length ();
@@ -157,16 +131,15 @@ long /*int*/ createShellLink (MenuItem item, String directory) {
} else {
buffer = EXE_PATH;
}
- hr = OS.VtblCall (20, pLink, buffer);
+ hr = pLink.SetPath(buffer);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
- text = (String)item.getData (EXE_ARGS_KEY);
+ text = (String)item.getData (EXE_ARGS_KEY);
if (text == null) text = Display.LAUNCHER_PREFIX + Display.TASKBAR_EVENT + item.id;
length = text.length ();
buffer = new char [length + 1];
text.getChars (0, length, buffer, 0);
- /*IShellLink::SetArguments*/
- hr = OS.VtblCall (11, pLink, buffer);
+ hr = pLink.SetArguments(buffer);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
/* This code is intentionally commented */
@@ -175,8 +148,7 @@ long /*int*/ createShellLink (MenuItem item, String directory) {
// length = tooltip.length ();
// buffer = new char [length + 1];
// tooltip.getChars (0, length, buffer, 0);
-// /*IShellLink::SetDescription*/
-// hr = OS.VtblCall (7, pLink, buffer);
+// hr = pLink.SetDescription (buffer);
// if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
// }
@@ -186,13 +158,20 @@ long /*int*/ createShellLink (MenuItem item, String directory) {
text = (String)item.getData (ICON_INDEX_KEY);
if (text != null) index = Integer.parseInt (text);
} else {
+ String directory = null;
Image image = item.getImage ();
- if (image != null && directory != null) {
- icon = directory + "\\menu" + item.id + ".ico" ;
+ if (image != null) directory = getIconsDir ();
+ if (directory != null) {
+ icon = directory + "\\" + "menu" + item.id + ".ico";
ImageData data;
if (item.hBitmap != 0) {
Image image2 = Image.win32_new (display, SWT.BITMAP, item.hBitmap);
data = image2.getImageData (DPIUtil.getDeviceZoom ());
+ /*
+ * image2 instance doesn't own the handle and shall not be disposed. Make it
+ * appear disposed to cause leak trackers to ignore it.
+ */
+ image2.handle = 0;
} else {
data = image.getImageData (DPIUtil.getDeviceZoom ());
}
@@ -205,52 +184,43 @@ long /*int*/ createShellLink (MenuItem item, String directory) {
length = icon.length ();
buffer = new char [length + 1];
icon.getChars (0, length, buffer, 0);
- /*IShellLink::SetIconLocation*/
- hr = OS.VtblCall (17, pLink, buffer, index);
+ hr = pLink.SetIconLocation(buffer, index);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
}
}
- /*IUnknown::QueryInterface*/
- hr = OS.VtblCall (0, pLink, IID_IPropertyStore, ppv);
+ hr = pLink.QueryInterface(COM.IID_IPropertyStore, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ pPropStore = ppv [0];
- /*IPropertyStore::SetValue*/
- hr = OS.VtblCall (6, pPropStore, key, pv);
+ IPropertyStore pPropStore = new IPropertyStore (ppv [0]);
+ hr = pPropStore.SetValue(key, pv);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
- /*IPropertyStore::Commit*/
- OS.VtblCall (7, pPropStore);
- /*IUnknown::Release*/
- OS.VtblCall (2, pPropStore);
+ pPropStore.Commit();
+ pPropStore.Release();
OS.HeapFree (hHeap, 0, pv);
if (titlePtr != 0) OS.HeapFree (hHeap, 0, titlePtr);
return pLink;
}
-long /*int*/ createShellLinkArray (MenuItem [] items, String directory) {
- if (items == null) return 0;
- if (items.length == 0) return 0;
- long /*int*/ [] ppv = new long /*int*/ [1];
- int hr = OS.CoCreateInstance (CLSID_EnumerableObjectCollection, 0, OS.CLSCTX_INPROC_SERVER, IID_IObjectCollection, ppv);
+IObjectArray createShellLinkArray (MenuItem [] items) {
+ if (items == null) return null;
+ if (items.length == 0) return null;
+ long [] ppv = new long [1];
+ int hr = COM.CoCreateInstance (COM.CLSID_EnumerableObjectCollection, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_IObjectCollection, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ pObjColl = ppv [0];
- for (int i = 0; i < items.length; i++) {
- long /*int*/ pLink = createShellLink (items[i], directory);
- if (pLink != 0) {
- /*IObjectCollection::AddObject*/
- hr = OS.VtblCall (5, pObjColl, pLink);
+ IObjectCollection pObjColl = new IObjectCollection (ppv [0]);
+ for (MenuItem item : items) {
+ IShellLink pLink = createShellLink (item);
+ if (pLink != null) {
+ pObjColl.AddObject (pLink);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
- /*IUnknown::Release*/
- OS.VtblCall (2, pLink);
+ pLink.Release ();
}
}
- /*IUnknown::QueryInterface*/
- hr = OS.VtblCall (0, pObjColl, IID_IObjectArray, ppv);
+ hr = pObjColl.QueryInterface(COM.IID_IObjectArray, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ poa = ppv [0];
- /*IUnknown::Release*/
- OS.VtblCall (2, pObjColl);
+ IObjectArray poa = new IObjectArray (ppv [0]);
+ pObjColl.Release ();
return poa;
}
@@ -265,108 +235,16 @@ void destroyItem (TaskItem item) {
items [itemCount] = null;
}
-String getDirectory (char[] appName) {
- char [] appDir = new char [appName.length];
- for (int i = 0; i < appName.length; i++) {
- char c = appName [i];
- switch (c) {
- case '\\':
- case '/':
- case ':':
- case '*':
- case '?':
- case '\"':
- case '<':
- case '>':
- case '|':
- appDir [i] = '_';
- break;
- default:
- appDir [i] = c;
- }
- }
- String result = null;
- long /*int*/ [] ppv = new long /*int*/ [1];
- int hr = OS.SHCreateItemInKnownFolder (FOLDERID_LocalAppData, 0, null, IID_IShellItem, ppv);
- if (hr == OS.S_OK) {
- long /*int*/ psiRoot = ppv [0];
- hr = OS.CoCreateInstance (CLSID_FileOperation, 0, OS.CLSCTX_INPROC_SERVER, IID_IFileOperation, ppv);
- if (hr == OS.S_OK) {
- long /*int*/ pfo = ppv [0];
- /*IFileOperation.SetOperationFlags*/
- hr = OS.VtblCall (5, pfo, OS.FOF_NO_UI);
- if (hr == OS.S_OK) {
- long /*int*/ psiAppDir = getDirectory (psiRoot, pfo, appDir, false);
- if (psiAppDir != 0) {
- long /*int*/ psiIcoDir = getDirectory (psiAppDir, pfo, ICO_DIR, true);
- if (psiIcoDir != 0) {
- /*IShellItem::GetDisplayName*/
- hr = OS.VtblCall (5, psiIcoDir, OS.SIGDN_FILESYSPATH, ppv);
- if (hr == OS.S_OK) {
- long /*int*/ wstr = ppv [0];
- int length = OS.wcslen (wstr);
- char [] buffer = new char [length];
- OS.MoveMemory (buffer, wstr, length * 2);
- result = new String (buffer);
- OS.CoTaskMemFree (wstr);
- }
- /*IUnknown::Release*/
- OS.VtblCall (2, psiIcoDir);
- }
- /*IUnknown::Release*/
- OS.VtblCall (2, psiAppDir);
- }
- }
- /*IUnknown::Release*/
- OS.VtblCall(2, pfo);
- }
- /*IUnknown::Release*/
- OS.VtblCall (2, psiRoot);
+String getIconsDir() {
+ if (iconsDir != null) return iconsDir;
+ File dir = new File(display.appLocalDir + "\\ico_dir");
+ if (dir.exists()) {
+ // remove old icons
+ for (File file : dir.listFiles()) file.delete();
+ } else if (!dir.mkdirs()) {
+ return null;
}
- return result;
-}
-
-long /*int*/ getDirectory (long /*int*/ parent, long /*int*/ pfo, char [] name, boolean delete) {
- long /*int*/ [] ppv = new long /*int*/ [1];
- int hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
- if (hr == OS.S_OK) {
- if (delete) {
- /*IFileOperation.Delete*/
- hr = OS.VtblCall (18, pfo, ppv [0], 0);
- /*IUnknown::Release*/
- OS.VtblCall (2, ppv [0]);
- if (hr == OS.S_OK) {
- /*IFileOperation.NewItem */
- hr = OS.VtblCall (20, pfo, parent, OS.FILE_ATTRIBUTE_DIRECTORY, name, null, 0);
- if (hr == OS.S_OK) {
- /*IFileOperation.PerformOperations */
- hr = OS.VtblCall (21, pfo);
- if (hr == OS.S_OK) {
- hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
- if (hr == OS.S_OK) {
- return ppv [0];
- }
- }
- }
- }
- } else {
- return ppv [0];
- }
- } else {
- /*IFileOperation.NewItem */
- hr = OS.VtblCall (20, pfo, parent, OS.FILE_ATTRIBUTE_DIRECTORY, name, null, 0);
- if (hr == OS.S_OK) {
- /*IFileOperation.PerformOperations */
- hr = OS.VtblCall (21, pfo);
- if (hr == OS.S_OK) {
- hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
- if (hr == OS.S_OK) {
- return ppv [0];
- }
- }
- }
- }
- return 0;
+ return iconsDir = dir.getPath();
}
/**
@@ -406,9 +284,9 @@ public TaskItem getItem (int index) {
*/
public TaskItem getItem (Shell shell) {
checkWidget ();
- for (int i = 0; i < items.length; i++) {
- if (items [i] != null && items [i].shell == shell) {
- return items [i];
+ for (TaskItem item : items) {
+ if (item != null && item.shell == shell) {
+ return item;
}
}
TaskItem item = new TaskItem (this, SWT.NONE);
@@ -459,8 +337,7 @@ public TaskItem [] getItems () {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TaskItem item = items [i];
+ for (TaskItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -479,18 +356,14 @@ void releaseParent () {
@Override
void releaseWidget () {
super.releaseWidget ();
- if (mTaskbarList3 != 0) {
- /* Release() */
- OS.VtblCall (2, mTaskbarList3);
- mTaskbarList3 = 0;
- }
+ mTaskbarList3.Release();
+ mTaskbarList3 = null;
}
@Override
void reskinChildren (int flags) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TaskItem item = items [i];
+ for (TaskItem item : items) {
if (item != null) item.reskin (flags);
}
}
@@ -498,10 +371,10 @@ void reskinChildren (int flags) {
}
void setMenu (Menu menu) {
- long /*int*/ [] ppv = new long /*int*/ [1];
- int hr = OS.CoCreateInstance (CLSID_DestinationList, 0, OS.CLSCTX_INPROC_SERVER, IID_ICustomDestinationList, ppv);
+ long [] ppv = new long [1];
+ int hr = COM.CoCreateInstance (COM.CLSID_DestinationList, 0, COM.CLSCTX_INPROC_SERVER, COM.IID_ICustomDestinationList, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ pDestList = ppv[0];
+ ICustomDestinationList pDestList = new ICustomDestinationList (ppv [0]);
String appName = Display.APP_NAME;
char [] buffer = {'S', 'W', 'T', '\0'};
if (appName != null && appName.length () > 0) {
@@ -509,90 +382,56 @@ void setMenu (Menu menu) {
buffer = new char [length + 1];
appName.getChars (0, length, buffer, 0);
}
-
MenuItem [] items = null;
if (menu != null && (items = menu.getItems ()).length != 0) {
- String directory = null;
- for (int i = 0; i < items.length; i++) {
- MenuItem item = items [i];
- if (item.getImage () != null && item.getData (ICON_KEY) == null) {
- directory = getDirectory (buffer);
- break;
- }
- }
- long /*int*/ poa = createShellLinkArray (items, directory);
- if (poa != 0) {
-
- /*ICustomDestinationList::SetAppID*/
- hr = OS.VtblCall (3, pDestList, buffer);
+ IObjectArray poa = createShellLinkArray (items);
+ if (poa != null) {
+ hr = pDestList.SetAppID (buffer);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
- /*ICustomDestinationList::BeginList*/
int [] cMaxSlots = new int [1];
- OS.VtblCall (4, pDestList, cMaxSlots, IID_IObjectArray, ppv);
+ pDestList.BeginList(cMaxSlots, COM.IID_IObjectArray, ppv);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ pRemovedItems = ppv [0];
+ IObjectArray pRemovedItems = new IObjectArray (ppv [0]);
int [] count = new int [1];
- /*IObjectArray::GetCount*/
- OS.VtblCall (3, poa, count);
+ poa.GetCount (count);
if (count [0] != 0) {
- /*ICustomDestinationList::AddUserTasks*/
- hr = OS.VtblCall (7, pDestList, poa);
+ hr = pDestList.AddUserTasks (poa);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
}
- for (int i = 0; i < items.length; i++) {
- MenuItem item = items [i];
+ for (MenuItem item : items) {
if ((item.getStyle () & SWT.CASCADE) != 0) {
Menu subMenu = item.getMenu ();
if (subMenu != null) {
MenuItem [] subItems = subMenu.getItems ();
- if (directory == null) {
- for (int j = 0; j < subItems.length; j++) {
- MenuItem subItem = subItems [j];
- if (subItem.getImage () != null && subItem.getData (ICON_KEY) == null) {
- directory = getDirectory (buffer);
- break;
- }
- }
- }
- long /*int*/ poa2 = createShellLinkArray (subItems, directory);
- if (poa2 != 0) {
- /*IObjectArray::GetCount*/
- OS.VtblCall (3, poa2, count);
+ IObjectArray poa2 = createShellLinkArray (subItems);
+ if (poa2 != null) {
+ poa2.GetCount (count);
if (count [0] != 0) {
String text = item.getText ();
int length = text.length ();
char [] buffer2 = new char [length + 1];
text.getChars (0, length, buffer2, 0);
- /*ICustomDestinationList::AppendCategory*/
- hr = OS.VtblCall (5, pDestList, buffer2, poa2);
+ hr = pDestList.AppendCategory (buffer2, poa2);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
}
- /*IUnknown::Release*/
- OS.VtblCall (2, poa2);
+ poa2.Release ();
}
}
}
}
-
- /*ICustomDestinationList::CommitList*/
- hr = OS.VtblCall (8, pDestList);
+ poa.Release();
+ hr = pDestList.CommitList ();
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
-
- /*IUnknown::Release*/
- if (pRemovedItems != 0) OS.VtblCall (2, pRemovedItems);
- /*IUnknown::Release*/
- OS.VtblCall (2, poa);
+ pRemovedItems.Release ();
}
} else {
- /*ICustomDestinationList::DeleteList*/
- hr = OS.VtblCall (10, pDestList, buffer);
+ hr = pDestList.DeleteList (buffer);
if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
}
- /*IUnknown::Release*/
- OS.VtblCall (2, pDestList);
+ pDestList.Release ();
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
index 575c6fdd02..e1c26b5a82 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
@@ -15,9 +15,9 @@
package org.eclipse.swt.widgets;
-import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.win32.*;
/**
* Instances of this class represent a task item.
@@ -293,10 +293,7 @@ public void setOverlayImage (Image overlayImage) {
if (overlayText.length () != 0) {
updateText ();
} else {
- long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
- long /*int*/ hwnd = shell.handle;
- /* ITaskbarList3::SetOverlayIcon */
- OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
+ parent.mTaskbarList3.SetOverlayIcon(shell.handle, 0, 0);
}
}
}
@@ -338,10 +335,7 @@ public void setOverlayText (String overlayText) {
if (overlayImage != null) {
updateImage ();
} else {
- long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
- long /*int*/ hwnd = shell.handle;
- /* ITaskbarList3::SetOverlayIcon */
- OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
+ parent.mTaskbarList3.SetOverlayIcon(shell.handle, 0, 0);
}
}
}
@@ -437,7 +431,7 @@ void setShell (Shell shell) {
void updateImage () {
showingText = false;
Image image2 = null;
- long /*int*/ hIcon = 0;
+ long hIcon = 0;
switch (overlayImage.type) {
case SWT.BITMAP:
image2 = Display.createIcon (overlayImage);
@@ -447,20 +441,14 @@ void updateImage () {
hIcon = overlayImage.handle;
break;
}
- long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
- long /*int*/ hwnd = shell.handle;
- /* ITaskbarList3::SetOverlayIcon */
- OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
+ parent.mTaskbarList3.SetOverlayIcon(shell.handle, hIcon, 0);
if (image2 != null) image2.dispose ();
}
void updateProgress () {
if (progressState == SWT.INDETERMINATE) return;
if (progressState == SWT.DEFAULT) return;
- long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
- long /*int*/ hwnd = shell.handle;
- /* ITaskbarList3::SetProgressValue */
- OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
+ parent.mTaskbarList3.SetProgressValue(shell.handle, progress, PROGRESS_MAX);
}
void updateProgressState () {
@@ -471,19 +459,15 @@ void updateProgressState () {
case SWT.PAUSED: tbpFlags = OS.TBPF_PAUSED; break;
case SWT.INDETERMINATE: tbpFlags = OS.TBPF_INDETERMINATE; break;
}
- long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
- long /*int*/ hwnd = shell.handle;
- /* ITaskbarList3::SetProgressValue */
- OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
- /* ITaskbarList3::SetProgressState */
- OS.VtblCall (10, mTaskbarList3, hwnd, tbpFlags);
+ parent.mTaskbarList3.SetProgressValue(shell.handle, progress, PROGRESS_MAX);
+ parent.mTaskbarList3.SetProgressState(shell.handle, tbpFlags);
}
void updateText () {
showingText = true;
/* Create resources */
int width = 16, height = 16;
- long /*int*/ hdc = OS.GetDC (0);
+ long hdc = OS.GetDC (0);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = width;
@@ -493,23 +477,23 @@ void updateText () {
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (hBitmap == 0) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ dstHdc = OS.CreateCompatibleDC (hdc);
- long /*int*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
- long /*int*/ hMask = OS.CreateBitmap (width, height, 1, 1, null);
+ long dstHdc = OS.CreateCompatibleDC (hdc);
+ long oldBitmap = OS.SelectObject (dstHdc, hBitmap);
+ long hMask = OS.CreateBitmap (width, height, 1, 1, null);
if (hMask == 0) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ maskHdc = OS.CreateCompatibleDC (hdc);
- long /*int*/ oldMask = OS.SelectObject (maskHdc, hMask);
+ long maskHdc = OS.CreateCompatibleDC (hdc);
+ long oldMask = OS.SelectObject (maskHdc, hMask);
/* Draw content */
OS.PatBlt (maskHdc, 0, 0, width, height, OS.WHITENESS);
- long /*int*/ oldBrush = OS.SelectObject (maskHdc, OS.GetStockObject (OS.BLACK_BRUSH));
+ long oldBrush = OS.SelectObject (maskHdc, OS.GetStockObject (OS.BLACK_BRUSH));
OS.RoundRect (maskHdc, 0, 0, width, height, 8, 8);
OS.SelectObject (maskHdc, oldBrush);
- long /*int*/ brush = OS.CreateSolidBrush (OS.GetSysColor (OS.COLOR_HIGHLIGHT));
+ long brush = OS.CreateSolidBrush (OS.GetSysColor (OS.COLOR_HIGHLIGHT));
oldBrush = OS.SelectObject (dstHdc, brush);
OS.RoundRect (dstHdc, 0, 0, width, height, 8, 8);
OS.SelectObject (dstHdc, oldBrush);
@@ -519,7 +503,7 @@ void updateText () {
RECT rect = new RECT ();
char [] buffer = overlayText.toCharArray ();
int length = buffer.length;
- long /*int*/ hFont = 0, oldHFont = 0;
+ long hFont = 0, oldHFont = 0;
NONCLIENTMETRICS info = new NONCLIENTMETRICS ();
info.cbSize = NONCLIENTMETRICS.sizeof;
if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, info, 0)) {
@@ -558,15 +542,12 @@ void updateText () {
iconInfo.fIcon = true;
iconInfo.hbmColor = hBitmap;
iconInfo.hbmMask = hMask;
- long /*int*/ hIcon = OS.CreateIconIndirect (iconInfo);
+ long hIcon = OS.CreateIconIndirect (iconInfo);
if (hIcon == 0) error (SWT.ERROR_NO_HANDLES);
OS.DeleteObject (hBitmap);
OS.DeleteObject (hMask);
- long /*int*/ mTaskbarList3 = parent.mTaskbarList3;
- long /*int*/ hwnd = shell.handle;
- /* ITaskbarList3::SetOverlayIcon */
- OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
+ parent.mTaskbarList3.SetOverlayIcon(shell.handle, hIcon, 0);
OS.DestroyIcon (hIcon);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 020f5bf972..0fc6ce5b26 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -68,10 +68,15 @@ public class Text extends Scrollable {
String message;
int[] segments;
int clearSegmentsCount = 0;
+ long hwndActiveIcon;
static final char LTR_MARK = '\u200e';
static final char RTL_MARK = '\u200f';
+ /* Custom icons defined in swt.rc */
+ static final int IDI_SEARCH = 101;
+ static final int IDI_CANCEL = 102;
+
/**
* The maximum number of characters that can be entered
* into a text widget.
@@ -90,11 +95,6 @@ public class Text extends Scrollable {
public static final String DELIMITER;
/*
- * This code is intentionally commented.
- */
-// static final char PASSWORD;
-
- /*
* These values can be different on different platforms.
* Therefore they are not initialized in the declaration
* to stop the compiler from inlining.
@@ -104,27 +104,12 @@ public class Text extends Scrollable {
DELIMITER = "\r\n";
}
- static final long /*int*/ EditProc;
+ static final long EditProc;
static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
OS.GetClassInfo (0, EditClass, lpWndClass);
EditProc = lpWndClass.lpfnWndProc;
- /*
- * This code is intentionally commented.
- */
-// long /*int*/ hwndText = OS.CreateWindowEx (0,
-// EditClass,
-// null,
-// OS.WS_OVERLAPPED | OS.ES_PASSWORD,
-// 0, 0, 0, 0,
-// 0,
-// 0,
-// OS.GetModuleHandle (null),
-// null);
-// char echo = (char) OS.SendMessage (hwndText, OS.EM_GETPASSWORDCHAR, 0, 0);
-// OS.DestroyWindow (hwndText);
-// PASSWORD = echo != 0 ? echo : '*';
}
/**
@@ -170,7 +155,7 @@ public Text (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
boolean redraw = false;
switch (msg) {
@@ -191,13 +176,13 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
drawMessage = hwnd != OS.GetFocus () && OS.GetWindowTextLength (handle) == 0;
}
if (doubleBuffer || drawMessage) {
- long /*int*/ paintDC = 0;
+ long paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
paintDC = OS.BeginPaint (handle, ps);
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- long /*int*/ hDC = paintDC, hBitmap = 0, hOldBitmap = 0;
+ long hDC = paintDC, hBitmap = 0, hOldBitmap = 0;
POINT lpPoint1 = null, lpPoint2 = null;
if (doubleBuffer) {
hDC = OS.CreateCompatibleDC (paintDC);
@@ -220,7 +205,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
if (drawMessage) {
RECT rect = new RECT();
OS.GetClientRect(handle, rect);
- long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
rect.left += OS.LOWORD (margins);
rect.right -= OS.HIWORD (margins);
if ((style & SWT.BORDER) != 0) {
@@ -239,8 +224,8 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
case SWT.CENTER: uFormat |= OS.DT_CENTER;
case SWT.RIGHT: uFormat |= (rtl ? OS.DT_LEFT : OS.DT_RIGHT); break;
}
- long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
- long /*int*/ hOldFont = OS.SelectObject (hDC, hFont);
+ long hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long hOldFont = OS.SelectObject (hDC, hFont);
OS.SetTextColor (hDC, OS.GetSysColor (OS.COLOR_GRAYTEXT));
OS.SetBkMode (hDC, OS.TRANSPARENT);
OS.DrawText (hDC, buffer, buffer.length, rect, uFormat);
@@ -262,7 +247,50 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
break;
}
}
- long /*int*/ code = OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
+ if ((style & SWT.SEARCH) != 0) {
+ switch (msg) {
+ case OS.WM_MOUSEMOVE: {
+ POINT pt = new POINT ();
+ OS.POINTSTOPOINT(pt, lParam);
+ long hwndIcon = OS.ChildWindowFromPointEx (handle, pt, OS.CWP_SKIPINVISIBLE);
+ if (hwndIcon == handle) hwndIcon = 0;
+ if (hwndIcon != hwndActiveIcon) {
+ if (hwndActiveIcon != 0) OS.InvalidateRect (hwndActiveIcon, null, false);
+ if (hwndIcon != 0) OS.InvalidateRect (hwndIcon, null, false);
+ hwndActiveIcon = hwndIcon;
+ }
+ break;
+ }
+ case OS.WM_MOUSELEAVE:
+ if (hwndActiveIcon != 0) {
+ OS.InvalidateRect (hwndActiveIcon, null, false);
+ hwndActiveIcon = 0;
+ }
+ break;
+ case OS.WM_LBUTTONDOWN:
+ if (hwndActiveIcon != 0) {
+ OS.InvalidateRect (hwndActiveIcon, null, false);
+ return 0; // prevent mouse selection
+ }
+ break;
+ case OS.WM_LBUTTONUP: {
+ if (hwndActiveIcon != 0) {
+ Event e = new Event();
+ if (hwndActiveIcon == OS.GetDlgItem (handle, SWT.ICON_SEARCH)) {
+ e.detail = SWT.ICON_SEARCH;
+ } else {
+ e.detail = SWT.ICON_CANCEL;
+ setText ("");
+ }
+ setFocus ();
+ selectAll ();
+ sendSelectionEvent (SWT.DefaultSelection, e, false);
+ }
+ break;
+ }
+ }
+ }
+ long code = OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam);
switch (msg) {
case OS.WM_HSCROLL:
case OS.WM_VSCROLL: {
@@ -278,13 +306,71 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
@Override
void createHandle () {
- super.createHandle ();
+ long editStyle = widgetStyle ();
+ if ((editStyle & OS.WS_BORDER) == 0)
+ super.createHandle ();
+ else {
+ /*
+ * Feature on Windows: when `Edit` control is created, it removes
+ * `WS_BORDER`, but then internally draws the border over the client
+ * area. This is undesirable because all SWT coordinates will then
+ * need to be adjusted by the border size. The workaround is to create
+ * control without `WS_BORDER` and add it just after creating.
+ */
+ style &= ~SWT.BORDER;
+ super.createHandle ();
+ style |= SWT.BORDER;
+
+ editStyle = OS.GetWindowLongPtr(handle, OS.GWL_STYLE);
+ editStyle |= OS.WS_BORDER;
+ OS.SetWindowLongPtr(handle, OS.GWL_STYLE, editStyle);
+
+ OS.SetWindowPos(handle, 0, 0, 0, 0, 0, OS.SWP_NOMOVE | OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_FRAMECHANGED);
+ }
+
OS.SendMessage (handle, OS.EM_LIMITTEXT, 0, 0);
if ((style & SWT.READ_ONLY) != 0) {
if (applyThemeBackground () == 1) {
state |= THEME_BACKGROUND;
}
}
+ if ((style & SWT.SEARCH) != 0) {
+ if (display.hIconSearch == 0) {
+ long [] phicon = new long [1];
+ int hresult = OS.LoadIconMetric (OS.GetLibraryHandle (), IDI_SEARCH, OS.LIM_SMALL, phicon);
+ if (hresult != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+ display.hIconSearch = phicon [0];
+ hresult = OS.LoadIconMetric (OS.GetLibraryHandle (), IDI_CANCEL, OS.LIM_SMALL, phicon);
+ if (hresult != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+ display.hIconCancel = phicon [0];
+ }
+ if ((style & SWT.ICON_SEARCH) != 0) {
+ long hwndSearch = OS.CreateWindowEx (
+ 0,
+ Label.LabelClass,
+ null,
+ OS.WS_CHILD | OS.WS_VISIBLE | OS.WS_CLIPSIBLINGS | OS.SS_OWNERDRAW,
+ 0, 0, 0, 0,
+ handle,
+ SWT.ICON_SEARCH,
+ OS.GetModuleHandle (null),
+ null);
+ if (hwndSearch == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+ if ((style & SWT.ICON_CANCEL) != 0) {
+ state |= TRACK_MOUSE;
+ long hwndCancel = OS.CreateWindowEx (
+ 0,
+ Label.LabelClass, null,
+ OS.WS_CHILD | OS.WS_CLIPSIBLINGS | OS.SS_OWNERDRAW,
+ 0, 0, 0, 0,
+ handle,
+ SWT.ICON_CANCEL,
+ OS.GetModuleHandle (null),
+ null);
+ if (hwndCancel == 0) error (SWT.ERROR_NO_HANDLES);
+ }
+ }
}
@Override
@@ -515,7 +601,7 @@ void applySegments () {
segmentsChars = segmentsCharsCrLf;
}
- int/*64*/ limit = (int/*64*/)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
+ int limit = (int)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
OS.SendMessage (handle, OS.EM_SETLIMITTEXT, limit + Math.min (nSegments, LIMIT - limit), 0);
length += nSegments;
char [] newChars = new char [length + 1];
@@ -547,7 +633,7 @@ void applySegments () {
*/
newChars [length] = 0;
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
- long /*int*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
+ long undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (handle, OS.EM_REPLACESEL, undo, newChars);
/* Restore selection */
start [0] = translateOffset (start [0]);
@@ -559,20 +645,20 @@ void applySegments () {
}
static int checkStyle (int style) {
- if ((style & SWT.SEARCH) != 0) {
- style |= SWT.SINGLE | SWT.BORDER;
- style &= ~SWT.PASSWORD;
- /*
- * NOTE: ICON_CANCEL has the same value as H_SCROLL and
- * ICON_SEARCH has the same value as V_SCROLL so they are
- * cleared because SWT.SINGLE is set.
- */
- }
if ((style & SWT.SINGLE) != 0 && (style & SWT.MULTI) != 0) {
style &= ~SWT.MULTI;
}
style = checkBits (style, SWT.LEFT, SWT.CENTER, SWT.RIGHT, 0, 0, 0);
- if ((style & SWT.SINGLE) != 0) style &= ~(SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP);
+ /*
+ * NOTE: ICON_CANCEL and ICON_SEARCH have the same value as H_SCROLL and
+ * V_SCROLL. The meaning is determined by whether SWT.SEARCH is set.
+ */
+ if ((style & SWT.SEARCH) != 0) {
+ style |= SWT.SINGLE | SWT.BORDER;
+ style &= ~(SWT.PASSWORD | SWT.WRAP);
+ } else if ((style & SWT.SINGLE) != 0) {
+ style &= ~(SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP);
+ }
if ((style & SWT.WRAP) != 0) {
style |= SWT.MULTI;
style &= ~SWT.H_SCROLL;
@@ -588,7 +674,7 @@ void clearSegments (boolean applyText) {
if (segments == null) return;
int nSegments = segments.length;
if (nSegments == 0) return;
- int/*64*/ limit = (int/*64*/)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
+ int limit = (int)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
if (limit < LIMIT) {
OS.SendMessage (handle, OS.EM_SETLIMITTEXT, Math.max (1, limit - nSegments), 0);
}
@@ -614,7 +700,7 @@ void clearSegments (boolean applyText) {
* menu. Sending OS.EM_REPLACESEL message instead.
*/
OS.SendMessage (handle, OS.EM_SETSEL, 0, -1);
- long /*int*/ undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
+ long undo = OS.SendMessage (handle, OS.EM_CANUNDO, 0, 0);
OS.SendMessage (handle, OS.EM_REPLACESEL, undo, buffer);
OS.SendMessage (handle, OS.EM_SETSEL, start [0], end [0]);
ignoreCharacter = oldIgnoreCharacter;
@@ -639,13 +725,13 @@ public void clearSelection () {
checkWidget ();
int height = 0, width = 0;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = new TEXTMETRIC ();
OS.GetTextMetrics (hDC, tm);
- int count = (style & SWT.SINGLE) != 0 ? 1 : (int)/*64*/OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
+ int count = (style & SWT.SINGLE) != 0 ? 1 : (int)OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
height = count * tm.tmHeight;
RECT rect = new RECT ();
int flags = OS.DT_CALCRECT | OS.DT_EDITCONTROL | OS.DT_NOPREFIX;
@@ -692,7 +778,7 @@ public void clearSelection () {
* the single-line text widget in an editable combo
* box.
*/
- long /*int*/ margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
+ long margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
rect.x -= OS.LOWORD (margins);
rect.width += OS.LOWORD (margins) + OS.HIWORD (margins);
if ((style & SWT.H_SCROLL) != 0) rect.width++;
@@ -701,7 +787,18 @@ public void clearSelection () {
rect.y -= 1;
rect.width += 2;
rect.height += 2;
+
+ // When WS_BORDER is used instead of WS_EX_CLIENTEDGE, compensate the size difference
+ if (isUseWsBorder ()) {
+ int dx = OS.GetSystemMetrics (OS.SM_CXEDGE) - OS.GetSystemMetrics (OS.SM_CXBORDER);
+ int dy = OS.GetSystemMetrics (OS.SM_CYEDGE) - OS.GetSystemMetrics (OS.SM_CYBORDER);
+ rect.x -= dx;
+ rect.y -= dy;
+ rect.width += 2*dx;
+ rect.height += 2*dy;
+ }
}
+
return rect;
}
@@ -722,6 +819,11 @@ public void copy () {
}
@Override
+ScrollBar createScrollBar (int type) {
+ return (style & SWT.SEARCH) == 0 ? super.createScrollBar(type) : null;
+}
+
+@Override
void createWidget () {
super.createWidget ();
message = "";
@@ -751,7 +853,10 @@ public void cut () {
@Override
int defaultBackground () {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- return OS.GetSysColor ((bits & OS.ES_READONLY) != 0 ? OS.COLOR_3DFACE : OS.COLOR_WINDOW);
+ if ((bits & OS.ES_READONLY) != 0 || !OS.IsWindowEnabled (handle)) {
+ return OS.GetSysColor (OS.COLOR_3DFACE);
+ }
+ return OS.GetSysColor (OS.COLOR_WINDOW);
}
TCHAR deprocessText (TCHAR text, int start, int end, boolean terminate) {
@@ -787,12 +892,12 @@ TCHAR deprocessText (TCHAR text, int start, int end, boolean terminate) {
}
@Override
-boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (filter) {
int [] start = new int [1], end = new int [1];
OS.SendMessage (handle, OS.EM_GETSEL, start, end);
if (start [0] != end [0]) {
- long /*int*/ lParam = OS.MAKELPARAM (x, y);
+ long lParam = OS.MAKELPARAM (x, y);
int position = OS.LOWORD (OS.SendMessage (handle, OS.EM_CHARFROMPOS, 0, lParam));
if (start [0] <= position && position < end [0]) {
if (super.dragDetect (hwnd, x, y, filter, detect, consume)) {
@@ -806,6 +911,18 @@ boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean []
return super.dragDetect (hwnd, x, y, filter, detect, consume);
}
+@Override
+void maybeEnableDarkSystemTheme() {
+ /*
+ * Feature in Windows. If the control has default foreground and
+ * background, the background gets black without focus and white with
+ * focus, but the foreground color always stays black.
+ */
+ if (hasCustomBackground() || hasCustomForeground()) {
+ super.maybeEnableDarkSystemTheme();
+ }
+}
+
void fixAlignment () {
/*
* Feature in Windows. When the edit control is not
@@ -880,7 +997,7 @@ void fixAlignment () {
*/
public int getCaretLineNumber () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, -1, 0);
+ return (int)OS.SendMessage (handle, OS.EM_LINEFROMCHAR, -1, 0);
}
/**
@@ -912,7 +1029,7 @@ Point getCaretLocationInPixels () {
* pixel coordinates (0,0).
*/
int position = translateOffset (getCaretPosition ());
- long /*int*/ caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
+ long caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0);
if (caretPos == -1) {
caretPos = 0;
if (position >= OS.GetWindowTextLength (handle)) {
@@ -972,8 +1089,8 @@ public int getCaretPosition () {
*/
int caret = start [0];
if (start [0] != end [0]) {
- int startLine = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, start [0], 0);
- int endLine = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
+ int startLine = (int)OS.SendMessage (handle, OS.EM_LINEFROMCHAR, start [0], 0);
+ int endLine = (int)OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
if (startLine == endLine) {
int idThread = OS.GetWindowThreadProcessId (handle, null);
GUITHREADINFO lpgui = new GUITHREADINFO ();
@@ -982,9 +1099,9 @@ public int getCaretPosition () {
if (lpgui.hwndCaret == handle || lpgui.hwndCaret == 0) {
POINT ptCurrentPos = new POINT ();
if (OS.GetCaretPos (ptCurrentPos)) {
- long /*int*/ endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
+ long endPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, end [0], 0);
if (endPos == -1) {
- long /*int*/ startPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
+ long startPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, start [0], 0);
int startX = OS.GET_X_LPARAM (startPos);
if (ptCurrentPos.x > startX) caret = end [0];
} else {
@@ -995,8 +1112,8 @@ public int getCaretPosition () {
}
}
} else {
- int caretPos = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
- int caretLine = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, caretPos, 0);
+ int caretPos = (int)OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
+ int caretLine = (int)OS.SendMessage (handle, OS.EM_LINEFROMCHAR, caretPos, 0);
if (caretLine == endLine) caret = end [0];
}
}
@@ -1089,7 +1206,7 @@ public boolean getEditable () {
*/
public int getLineCount () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
}
/**
@@ -1125,8 +1242,8 @@ public int getLineHeight () {
}
int getLineHeightInPixels () {
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = new TEXTMETRIC ();
@@ -1196,7 +1313,7 @@ public String getMessage () {
/*public*/ int getPosition (Point point) {
checkWidget();
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
- long /*int*/ lParam = OS.MAKELPARAM (point.x, point.y);
+ long lParam = OS.MAKELPARAM (point.x, point.y);
int position = OS.LOWORD (OS.SendMessage (handle, OS.EM_CHARFROMPOS, 0, lParam));
return untranslateOffset (position);
}
@@ -1289,10 +1406,10 @@ public int getTabs () {
}
int getTabWidth (int tabs) {
- long /*int*/ oldFont = 0;
+ long oldFont = 0;
RECT rect = new RECT ();
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (handle);
+ long newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
OS.DrawText (hDC, new char [] {' '}, 1, rect, flags);
@@ -1417,7 +1534,7 @@ public String getText (int start, int end) {
*/
public int getTextLimit () {
checkWidget ();
- int/*64*/ limit = (int)/*64*/OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ int limit = (int)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
if (segments != null && limit < LIMIT) limit = Math.max (1, limit - segments.length);
return limit;
}
@@ -1439,7 +1556,7 @@ public int getTextLimit () {
public int getTopIndex () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
- return (int)/*64*/OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
+ return (int)OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
}
/**
@@ -1474,7 +1591,7 @@ int getTopPixelInPixels () {
* of Rich Edit return zero.
*/
int [] buffer = new int [2];
- long /*int*/ code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
+ long code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer);
if (code == 1) return buffer [1];
return getTopIndex () * getLineHeightInPixels ();
}
@@ -1527,6 +1644,11 @@ public void insert (String string) {
applySegments ();
}
+@Override
+boolean isUseWsBorder () {
+ return super.isUseWsBorder () || ((display != null) && display.useWsBorderText);
+}
+
/**
* Pastes text from clipboard.
* <p>
@@ -1689,7 +1811,7 @@ public void selectAll () {
}
@Override
-boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long wParam, long lParam, Event event) {
if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) {
return false;
}
@@ -1736,7 +1858,7 @@ boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lPara
case 0x08: /* Bs */
if (start [0] == end [0]) {
if (start [0] == 0) return true;
- int lineStart = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
+ int lineStart = (int)OS.SendMessage (handle, OS.EM_LINEINDEX, -1, 0);
if (start [0] == lineStart) {
start [0] = start [0] - DELIMITER.length ();
} else {
@@ -1749,8 +1871,8 @@ boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lPara
if (start [0] == end [0]) {
int length = OS.GetWindowTextLength (handle);
if (start [0] == length) return true;
- int line = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
- int lineStart = (int)/*64*/OS.SendMessage (handle, OS.EM_LINEINDEX, line + 1, 0);
+ int line = (int)OS.SendMessage (handle, OS.EM_LINEFROMCHAR, end [0], 0);
+ int lineStart = (int)OS.SendMessage (handle, OS.EM_LINEINDEX, line + 1, 0);
if (end [0] == lineStart - DELIMITER.length ()) {
end [0] = end [0] + DELIMITER.length ();
} else {
@@ -1792,6 +1914,19 @@ boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lPara
}
@Override
+void setBackgroundImage (long hBitmap) {
+ int flags = OS.RDW_ERASE | OS.RDW_ALLCHILDREN | OS.RDW_INVALIDATE;
+ OS.RedrawWindow (handle, null, 0, flags);
+}
+
+@Override
+void setBackgroundPixel (int pixel) {
+ maybeEnableDarkSystemTheme();
+ int flags = OS.RDW_ERASE | OS.RDW_ALLCHILDREN | OS.RDW_INVALIDATE;
+ OS.RedrawWindow (handle, null, 0, flags);
+}
+
+@Override
void setBoundsInPixels (int x, int y, int width, int height, int flags) {
/*
* Feature in Windows. When the caret is moved,
@@ -1811,7 +1946,7 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags) {
if ((flags & OS.SWP_NOSIZE) == 0 && width != 0) {
RECT rect = new RECT ();
OS.GetWindowRect (handle, rect);
- long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
int marginWidth = OS.LOWORD (margins) + OS.HIWORD (margins);
if (rect.right - rect.left <= marginWidth) {
int [] start = new int [1], end = new int [1];
@@ -1835,8 +1970,8 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags) {
if ((flags & OS.SWP_NOSIZE) == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.ES_MULTILINE) != 0) {
- long /*int*/ newFont, oldFont = 0;
- long /*int*/ hDC = OS.GetDC (handle);
+ long newFont, oldFont = 0;
+ long hDC = OS.GetDC (handle);
newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TEXTMETRIC tm = new TEXTMETRIC ();
@@ -1846,7 +1981,7 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags) {
RECT rect = new RECT();
OS.GetClientRect (handle, rect);
if ((rect.bottom - rect.top) < tm.tmHeight) {
- long /*int*/ margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
+ long margins = OS.SendMessage (handle, OS.EM_GETMARGINS, 0, 0);
rect.left += OS.LOWORD (margins);
rect.right -= OS.HIWORD (margins);
rect.top = 0;
@@ -1946,15 +2081,24 @@ public void setFont (Font font) {
setMargins ();
}
+@Override
+void setForegroundPixel (int pixel) {
+ maybeEnableDarkSystemTheme();
+ super.setForegroundPixel(pixel);
+}
+
void setMargins () {
- /*
- * Bug in Windows. When EM_SETCUEBANNER is used to set the
- * banner text, the control does not take into account the
- * margins, causing the first character to be clipped. The
- * fix is to set the margins to zero.
- */
if ((style & SWT.SEARCH) != 0) {
- OS.SendMessage (handle, OS.EM_SETMARGINS, OS.EC_LEFTMARGIN | OS.EC_RIGHTMARGIN, 0);
+ boolean rtl = (style & SWT.RIGHT_TO_LEFT) != 0;
+ int fLeading = rtl ? OS.EC_RIGHTMARGIN : OS.EC_LEFTMARGIN;
+ int fTrailing = rtl ? OS.EC_LEFTMARGIN : OS.EC_RIGHTMARGIN;
+ int flags = 0;
+ if ((style & SWT.ICON_SEARCH) != 0) flags |= fLeading;
+ if ((style & SWT.ICON_CANCEL) != 0) flags |= fTrailing;
+ if (flags != 0) {
+ int iconWidth = OS.GetSystemMetrics (OS.SM_CXSMICON);
+ OS.SendMessage (handle, OS.EM_SETMARGINS, flags, OS.MAKELPARAM(iconWidth, iconWidth));
+ }
}
}
@@ -2192,7 +2336,7 @@ public void setText (String string) {
if (string == null) return;
}
clearSegments (false);
- int limit = (int)/*64*/OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ int limit = (int)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
if (string.length () > limit) string = string.substring (0, limit);
TCHAR buffer = new TCHAR (getCodePage (), string, true);
OS.SetWindowText (handle, buffer);
@@ -2252,10 +2396,10 @@ public void setTextChars (char[] text) {
string.getChars (0, text.length, text, 0);
}
clearSegments (false);
- int limit = (int)/*64*/OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
+ int limit = (int)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF;
if (text.length > limit) {
char [] temp = new char [limit];
- for (int i = 0; i < limit; i++) temp [i] = text [i];
+ System.arraycopy(text, 0, temp, 0, limit);
text = temp;
}
TCHAR buffer = new TCHAR (getCodePage (), text, true);
@@ -2328,9 +2472,9 @@ public void setTextLimit (int limit) {
public void setTopIndex (int index) {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return;
- int count = (int)/*64*/OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
index = Math.min (Math.max (index, 0), count - 1);
- int topIndex = (int)/*64*/OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
+ int topIndex = (int)OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
OS.SendMessage (handle, OS.EM_LINESCROLL, 0, index - topIndex);
}
@@ -2424,10 +2568,19 @@ String verifyText (String string, int start, int end, Event keyEvent) {
@Override
int widgetStyle () {
int bits = super.widgetStyle () | OS.ES_AUTOHSCROLL;
+ /*
+ * NOTE: ICON_CANCEL and ICON_SEARCH have the same value as H_SCROLL and
+ * V_SCROLL. The meaning is determined by whether SWT.SEARCH is set.
+ */
+ if ((style & SWT.SEARCH) != 0) {
+ bits &= ~OS.WS_HSCROLL;
+ bits &= ~OS.WS_VSCROLL;
+ }
if ((style & SWT.PASSWORD) != 0) bits |= OS.ES_PASSWORD;
if ((style & SWT.CENTER) != 0) bits |= OS.ES_CENTER;
if ((style & SWT.RIGHT) != 0) bits |= OS.ES_RIGHT;
if ((style & SWT.READ_ONLY) != 0) bits |= OS.ES_READONLY;
+ if ((style & SWT.SEARCH) != 0) bits |= OS.WS_CLIPCHILDREN;
if ((style & SWT.SINGLE) != 0) {
/*
* Feature in Windows. When a text control is read-only,
@@ -2460,14 +2613,14 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return EditProc;
}
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
boolean processSegments = hooks (SWT.Segments) || filters (SWT.Segments), redraw = false, updateDirection = (state & HAS_AUTO_DIRECTION) != 0;
- long /*int*/ code;
+ long code;
if (processSegments || updateDirection) {
switch (msg) {
case OS.EM_CANUNDO:
@@ -2541,7 +2694,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
if (ignoreCharacter) return null;
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
@@ -2553,7 +2706,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* is inserted into the control. The fix is to detect
* this case and not call the window proc.
*/
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case SWT.DEL:
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
if ((style & SWT.READ_ONLY) != 0 || (style & SWT.PASSWORD) != 0) return LRESULT.ZERO;
@@ -2561,8 +2714,8 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
int x = selection.x;
int y = selection.y;
if (x == y) {
- String actText = getText (0, x - 1);
- java.util.regex.Matcher m = CTRL_BS_PATTERN.matcher (actText);
+ String actText = getText (0, x - 1);
+ java.util.regex.Matcher m = CTRL_BS_PATTERN.matcher (actText);
if (m.find ()) {
x = m.start ();
y = m.end ();
@@ -2588,7 +2741,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* the window proc.
*/
if ((style & SWT.SINGLE) != 0) {
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case SWT.CR:
sendSelectionEvent (SWT.DefaultSelection);
// FALL THROUGH
@@ -2600,21 +2753,40 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_CLEAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CLEAR (long wParam, long lParam) {
LRESULT result = super.WM_CLEAR (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CLEAR, wParam, lParam);
}
@Override
-LRESULT WM_CUT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CUT (long wParam, long lParam) {
LRESULT result = super.WM_CUT (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_CUT, wParam, lParam);
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_DRAWITEM (long wParam, long lParam) {
+ DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
+ OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
+ RECT rect = new RECT ();
+ OS.SetRect (rect, struct.left, struct.top, struct.right, struct.bottom);
+ POINT pt = new POINT ();
+ OS.MapWindowPoints (struct.hwndItem, handle, pt, 1);
+ drawBackground (struct.hDC, rect, -1, pt.x, pt.y);
+ if (struct.CtlID == SWT.ICON_CANCEL && struct.hwndItem == hwndActiveIcon && OS.IsAppThemed()) {
+ int state = OS.GetKeyState (OS.VK_LBUTTON) < 0 ? OS.PBS_PRESSED : OS.PBS_HOT;
+ OS.DrawThemeBackground (display.hButtonTheme (), struct.hDC, OS.BP_PUSHBUTTON, state, rect, null);
+ }
+ long hIcon = (struct.CtlID == SWT.ICON_SEARCH) ? display.hIconSearch : display.hIconCancel;
+ int y = (rect.bottom - rect.right) / 2;
+ OS.DrawIconEx (struct.hDC, 0, y, hIcon, 0, 0, 0, 0, OS.DI_NORMAL);
+ return LRESULT.ONE;
+}
+
+@Override
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if ((style & SWT.READ_ONLY) != 0) {
if ((style & (SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
@@ -2641,7 +2813,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
if (result != null) return result;
@@ -2655,7 +2827,7 @@ LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
* so DLGC_WANTARROWS should not be cleared.
*/
if ((style & SWT.READ_ONLY) != 0) {
- long /*int*/ code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam);
code &= ~(OS.DLGC_WANTALLKEYS | OS.DLGC_WANTTAB);
return new LRESULT (code);
}
@@ -2663,7 +2835,7 @@ LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETOBJECT (long wParam, long lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for search text accessibility is
@@ -2676,12 +2848,12 @@ LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_IME_CHAR (long wParam, long lParam) {
/* Process a DBCS character */
Display display = this.display;
display.lastKey = 0;
- display.lastAscii = (int)/*64*/wParam;
+ display.lastAscii = (int)wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ZERO;
@@ -2695,7 +2867,7 @@ LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* them to the application.
*/
ignoreCharacter = true;
- long /*int*/ result = callWindowProc (handle, OS.WM_IME_CHAR, wParam, lParam);
+ long result = callWindowProc (handle, OS.WM_IME_CHAR, wParam, lParam);
MSG msg = new MSG ();
int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
while (OS.PeekMessage (msg, handle, OS.WM_CHAR, OS.WM_CHAR, flags)) {
@@ -2711,15 +2883,15 @@ LRESULT WM_IME_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long wParam, long lParam) {
/*
* Prevent Windows from processing WM_LBUTTONDBLCLK
* when double clicking behavior is disabled by not
* calling the window proc.
*/
LRESULT result = null;
- sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam);
- if (!sendMouseEvent (SWT.MouseDoubleClick, 1, handle, OS.WM_LBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, 1, handle, lParam);
+ if (!sendMouseEvent (SWT.MouseDoubleClick, 1, handle, lParam)) {
result = LRESULT.ZERO;
}
if (!display.captureChanged && !isDisposed ()) {
@@ -2742,7 +2914,7 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
if (start [0] == end [0]) {
int length = OS.GetWindowTextLength (handle);
if (length == start [0]) {
- int code = (int)/*64*/OS.SendMessage (handle, OS.EM_LINELENGTH, length, 0);
+ int code = (int)OS.SendMessage (handle, OS.EM_LINELENGTH, length, 0);
if (code == 0) return LRESULT.ZERO;
}
}
@@ -2750,20 +2922,59 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PASTE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PASTE (long wParam, long lParam) {
LRESULT result = super.WM_PASTE (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_PASTE, wParam, lParam);
}
@Override
-LRESULT WM_UNDO (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETCURSOR (long wParam, long lParam) {
+ LRESULT result = super.WM_SETCURSOR(wParam, lParam);
+ if (result != null) return result;
+ if ((style & SWT.SEARCH) != 0) {
+ int hitTest = (short) OS.LOWORD (lParam);
+ if (hitTest == OS.HTCLIENT) {
+ POINT pt = new POINT ();
+ OS.GetCursorPos (pt);
+ OS.ScreenToClient (handle, pt);
+ long hwndIcon = OS.ChildWindowFromPointEx (handle, pt, OS.CWP_SKIPINVISIBLE);
+ if (hwndIcon != handle) {
+ OS.SetCursor (OS.LoadCursor (0, OS.IDC_ARROW));
+ return LRESULT.ONE;
+ }
+ }
+ }
+ return null;
+}
+
+@Override
+LRESULT WM_SIZE(long wParam, long lParam) {
+ LRESULT result = super.WM_SIZE (wParam, lParam);
+ if (isDisposed ()) return result;
+ if ((style & SWT.SEARCH) != 0) {
+ /* NOTE: EDIT controls don't support mirrored layout. */
+ boolean rtl = (style & SWT.RIGHT_TO_LEFT) != 0;
+ long hwndLeading = OS.GetDlgItem (handle, rtl ? SWT.ICON_CANCEL : SWT.ICON_SEARCH);
+ long hwndTrailing = OS.GetDlgItem (handle, rtl ? SWT.ICON_SEARCH : SWT.ICON_CANCEL);
+ int width = OS.LOWORD (lParam);
+ int height = OS.HIWORD (lParam);
+ int iconWidth = OS.GetSystemMetrics (OS.SM_CXSMICON);
+ int flags = OS.SWP_NOZORDER | OS.SWP_NOACTIVATE | OS.SWP_NOCOPYBITS;
+ if (hwndLeading != 0) OS.SetWindowPos (hwndLeading, 0, 0, 0, iconWidth, height, flags);
+ if (hwndTrailing != 0) OS.SetWindowPos (hwndTrailing, 0, width - iconWidth, 0, iconWidth, height, flags);
+ }
+ return result;
+}
+
+@Override
+LRESULT WM_UNDO (long wParam, long lParam) {
LRESULT result = super.WM_UNDO (wParam, lParam);
if (result != null) return result;
return wmClipboard (OS.WM_UNDO, wParam, lParam);
}
-LRESULT wmClipboard (int msg, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmClipboard (int msg, long wParam, long lParam) {
if ((style & SWT.READ_ONLY) != 0) return null;
if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return null;
boolean call = false;
@@ -2840,7 +3051,7 @@ LRESULT wmClipboard (int msg, long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmColorChild (long wParam, long lParam) {
if ((style & SWT.READ_ONLY) != 0) {
if ((style & (SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
@@ -2866,13 +3077,18 @@ LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
int code = OS.HIWORD (wParam);
switch (code) {
case OS.EN_CHANGE:
if (findImageControl () != null) {
OS.InvalidateRect (handle, null, true);
}
+ if ((style & SWT.SEARCH) != 0) {
+ boolean showCancel = OS.GetWindowTextLength (handle) != 0;
+ long hwndCancel = OS.GetDlgItem (handle, SWT.ICON_CANCEL);
+ if (hwndCancel != 0) OS.ShowWindow (hwndCancel, showCancel ? OS.SW_SHOW : OS.SW_HIDE);
+ }
if (ignoreModify) break;
/*
* It is possible (but unlikely), that application
@@ -2924,17 +3140,17 @@ LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmKeyDown (long hwnd, long wParam, long lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
if (segments != null) {
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_LEFT:
case OS.VK_UP:
case OS.VK_RIGHT:
case OS.VK_DOWN:
- long /*int*/ code = 0;
+ long code = 0;
int [] start = new int [1], end = new int [1], newStart = new int [1], newEnd = new int [1];
OS.SendMessage (handle, OS.EM_GETSEL, start, end);
while (true) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
index 1fddaf9833..9b01250ba7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -48,12 +48,13 @@ import org.eclipse.swt.internal.win32.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public class ToolBar extends Composite {
- int lastFocusId, lastArrowId, lastHotId;
+ int lastFocusId, lastArrowId, lastHotId, _width, _height, _count = -1, _wHint = -1, _hHint = -1;
+ long currentToolItemToolTip;
ToolItem [] items;
ToolItem [] tabItemList;
boolean ignoreResize, ignoreMouse;
ImageList imageList, disabledImageList, hotImageList;
- static final long /*int*/ ToolBarProc;
+ static final long ToolBarProc;
static final TCHAR ToolBarClass = new TCHAR (0, OS.TOOLBARCLASSNAME, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -143,7 +144,7 @@ public ToolBar (Composite parent, int style) {
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
/*
* Bug in Windows. For some reason, during the processing
@@ -191,12 +192,33 @@ protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
}
+@Override
+public void layout (boolean changed) {
+ checkWidget ();
+ clearSizeCache(changed);
+ super.layout(changed);
+}
+
+void clearSizeCache(boolean changed) {
+ // If changed, discard the cached layout information
+ if (changed) {
+ _count = _wHint = _hHint = -1;
+ }
+}
+
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
+ int count = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ if (count == this._count && wHint == this._wHint && hHint == this._hHint) {
+ // Return already cached values calculated previously
+ return new Point (_width, _height);
+ }
+ this._count = count;
+ this._wHint = wHint;
+ this._hHint = hHint;
int width = 0, height = 0;
if ((style & SWT.VERTICAL) != 0) {
RECT rect = new RECT ();
TBBUTTON lpButton = new TBBUTTON ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
for (int i=0; i<count; i++) {
OS.SendMessage (handle, OS.TB_GETITEMRECT, i, rect);
height = Math.max (height, rect.bottom);
@@ -224,7 +246,6 @@ protected void checkSubclass () {
if (redraw) OS.UpdateWindow (handle);
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOREDRAW | OS.SWP_NOZORDER;
OS.SetWindowPos (handle, 0, 0, 0, newWidth, newHeight, flags);
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (count != 0) {
RECT rect = new RECT ();
OS.SendMessage (handle, OS.TB_GETITEMRECT, count - 1, rect);
@@ -249,6 +270,12 @@ protected void checkSubclass () {
if (hHint != SWT.DEFAULT) height = hHint;
Rectangle trim = computeTrimInPixels (0, 0, width, height);
width = trim.width; height = trim.height;
+ /*
+ * Cache this size information for possible re-use as this method gets called
+ * too many times, for more details see performance Bug 574641
+ */
+ this._width = width;
+ this._height = height;
return new Point (width, height);
}
@@ -267,7 +294,7 @@ Widget computeTabGroup () {
while (i < items.length && items [i].control == null) i++;
if (i == items.length) return super.computeTabGroup ();
}
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
if (index == -1) index = lastHotId;
while (index >= 0) {
ToolItem item = items [index];
@@ -288,8 +315,7 @@ Widget [] computeTabList () {
Widget result [] = {};
if (!isTabGroup () || !isEnabled () || !isVisible ()) return result;
ToolItem [] list = tabList != null ? _getTabItemList () : items;
- for (int i=0; i<list.length; i++) {
- ToolItem child = list [i];
+ for (ToolItem child : list) {
Widget [] childList = child.computeTabList ();
if (childList.length != 0) {
Widget [] newResult = new Widget [result.length + childList.length];
@@ -337,7 +363,7 @@ void createHandle () {
* bar currently sets this value to 300 so it is not
* necessary to set TTM_SETMAXTIPWIDTH.
*/
-// long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+// long hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
// OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
/*
@@ -352,7 +378,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/* Set the button struct, bitmap and button sizes */
@@ -361,12 +387,12 @@ void createHandle () {
OS.SendMessage (handle, OS.TB_SETBUTTONSIZE, 0, 0);
/* Set the extended style bits */
- int bits = OS.TBSTYLE_EX_DRAWDDARROWS | OS.TBSTYLE_EX_MIXEDBUTTONS | OS.TBSTYLE_EX_HIDECLIPPEDBUTTONS | OS.TBSTYLE_EX_DOUBLEBUFFER;
+ int bits = OS.TBSTYLE_EX_DRAWDDARROWS | OS.TBSTYLE_EX_MIXEDBUTTONS | OS.TBSTYLE_EX_DOUBLEBUFFER;
OS.SendMessage (handle, OS.TB_SETEXTENDEDSTYLE, 0, bits);
}
void createItem (ToolItem item, int index) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
int id = 0;
while (id < items.length && items [id] != null) id++;
@@ -418,7 +444,7 @@ void destroyItem (ToolItem item) {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETBUTTONINFO, item.id, info);
+ int index = (int)OS.SendMessage (handle, OS.TB_GETBUTTONINFO, item.id, info);
/*
* Feature in Windows. For some reason, a tool item that has
* the style BTNS_SEP does not return I_IMAGENONE when queried
@@ -440,7 +466,7 @@ void destroyItem (ToolItem item) {
if (item.id == lastHotId) lastHotId = -1;
items [item.id] = null;
item.id = -1;
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (count == 0) {
if (imageList != null) {
OS.SendMessage (handle, OS.TB_SETIMAGELIST, 0, 0);
@@ -476,8 +502,7 @@ void enableWidget (boolean enabled) {
* The fix is to use the disabled image in all image
* lists for all items.
*/
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null) {
if ((item.style & SWT.SEPARATOR) == 0) {
item.updateImages (enabled && item.getEnabled ());
@@ -515,10 +540,10 @@ ImageList getImageList () {
*/
public ToolItem getItem (int index) {
checkWidget ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
TBBUTTON lpButton = new TBBUTTON ();
- long /*int*/ result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long result = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);
return items [lpButton.idCommand];
}
@@ -546,10 +571,9 @@ public ToolItem getItem (Point point) {
}
ToolItem getItemInPixels (Point point) {
- ToolItem [] items = getItems ();
- for (int i=0; i<items.length; i++) {
- Rectangle rect = items [i].getBoundsInPixels ();
- if (rect.contains (point)) return items [i];
+ for (ToolItem item : getItems ()) {
+ Rectangle rect = item.getBoundsInPixels ();
+ if (rect.contains (point)) return item;
}
return null;
}
@@ -566,7 +590,7 @@ ToolItem getItemInPixels (Point point) {
*/
public int getItemCount () {
checkWidget ();
- return (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
}
/**
@@ -591,7 +615,7 @@ public ToolItem [] getItems () {
}
ToolItem [] _getItems () {
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
TBBUTTON lpButton = new TBBUTTON ();
ToolItem [] result = new ToolItem [count];
for (int i=0; i<count; i++) {
@@ -617,23 +641,23 @@ ToolItem [] _getItems () {
public int getRowCount () {
checkWidget ();
if ((style & SWT.VERTICAL) != 0) {
- return (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
}
- return (int)/*64*/OS.SendMessage (handle, OS.TB_GETROWS, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TB_GETROWS, 0, 0);
}
ToolItem [] _getTabItemList () {
if (tabItemList == null) return tabItemList;
int count = 0;
- for (int i=0; i<tabItemList.length; i++) {
- if (!tabItemList [i].isDisposed ()) count++;
+ for (ToolItem item : tabItemList) {
+ if (!item.isDisposed ()) count++;
}
if (count == tabItemList.length) return tabItemList;
ToolItem [] newList = new ToolItem [count];
int index = 0;
- for (int i=0; i<tabItemList.length; i++) {
- if (!tabItemList [i].isDisposed ()) {
- newList [index++] = tabItemList [i];
+ for (ToolItem item : tabItemList) {
+ if (!item.isDisposed ()) {
+ newList [index++] = item;
}
}
tabItemList = newList;
@@ -662,10 +686,11 @@ public int indexOf (ToolItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- return (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, item.id, 0);
+ return (int)OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, item.id, 0);
}
void layoutItems () {
+ clearSizeCache(true);
/*
* Feature in Windows. When a tool bar has the style
* TBSTYLE_LIST and has a drop down item, Window leaves
@@ -682,8 +707,7 @@ void layoutItems () {
if (OS.IsAppThemed ()) {
if ((style & SWT.RIGHT) != 0 && (style & SWT.VERTICAL) == 0) {
boolean hasText = false, hasImage = false;
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null) {
if (!hasText) hasText = item.text.length () != 0;
if (!hasImage) hasImage = item.image != null;
@@ -705,7 +729,7 @@ void layoutItems () {
* the tool items. The fix is to use WM_SETFONT to force
* the tool bar to redraw and lay out.
*/
- long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
setDropDownItems (true);
}
@@ -722,12 +746,12 @@ void layoutItems () {
* into account extra padding.
*/
if ((style & SWT.VERTICAL) != 0) {
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
if (itemCount > 1) {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
- long /*int*/ size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
+ long size = OS.SendMessage (handle, OS.TB_GETBUTTONSIZE, 0, 0);
info.cx = (short) OS.LOWORD (size);
int index = 0, extraPadding = 0;
while (index < items.length) {
@@ -745,11 +769,10 @@ void layoutItems () {
index++;
}
if (index < items.length) {
- long /*int*/ padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
+ long padding = OS.SendMessage (handle, OS.TB_GETPADDING, 0, 0);
info.cx += OS.LOWORD (padding + extraPadding) * 2;
}
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null && (item.style & SWT.SEPARATOR) == 0) {
OS.SendMessage (handle, OS.TB_SETBUTTONINFO, item.id, info);
}
@@ -773,8 +796,7 @@ void layoutItems () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null && item.cx > 0) {
info.cx = item.cx;
OS.SendMessage (handle, OS.TB_SETBUTTONINFO, item.id, info);
@@ -783,8 +805,7 @@ void layoutItems () {
}
}
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null) item.resizeControl ();
}
}
@@ -796,7 +817,7 @@ boolean mnemonicHit (char ch) {
return false;
}
if ((style & SWT.FLAT) != 0 && !setTabGroupFocus ()) return false;
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
+ int index = (int)OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
if (index == -1) return false;
OS.SendMessage (handle, OS.TB_SETHOTITEM, index, 0);
items [id [0]].click (false);
@@ -815,7 +836,7 @@ boolean mnemonicMatch (char ch) {
* undocumented and unwanted. The fix is to ensure that the tool item
* contains a mnemonic when TB_MAPACCELERATOR returns true.
*/
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
+ int index = (int)OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
if (index == -1) return false;
return findMnemonic (items [id [0]].text) != '\0';
}
@@ -823,8 +844,7 @@ boolean mnemonicMatch (char ch) {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -855,8 +875,7 @@ void releaseWidget () {
@Override
void removeControl (Control control) {
super.removeControl (control);
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null && item.control == control) {
item.setControl (null);
}
@@ -866,8 +885,7 @@ void removeControl (Control control) {
@Override
void reskinChildren (int flags) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null) item.reskin (flags);
}
}
@@ -875,7 +893,7 @@ void reskinChildren (int flags) {
}
@Override
-void setBackgroundImage (long /*int*/ hBitmap) {
+void setBackgroundImage (long hBitmap) {
super.setBackgroundImage (hBitmap);
setBackgroundTransparent (hBitmap != 0);
}
@@ -952,8 +970,7 @@ void setDropDownItems (boolean set) {
*/
if (OS.IsAppThemed ()) {
boolean hasText = false, hasImage = false;
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null) {
if (!hasText) hasText = item.text.length () != 0;
if (!hasImage) hasImage = item.image != null;
@@ -961,8 +978,7 @@ void setDropDownItems (boolean set) {
}
}
if (hasImage && !hasText) {
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null && (item.style & SWT.DROP_DOWN) != 0) {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
@@ -982,7 +998,7 @@ void setDropDownItems (boolean set) {
void setDisabledImageList (ImageList imageList) {
if (disabledImageList == imageList) return;
- long /*int*/ hImageList = 0;
+ long hImageList = 0;
if ((disabledImageList = imageList) != null) {
hImageList = disabledImageList.getHandle ();
}
@@ -1019,7 +1035,7 @@ public void setFont (Font font) {
void setHotImageList (ImageList imageList) {
if (hotImageList == imageList) return;
- long /*int*/ hImageList = 0;
+ long hImageList = 0;
if ((hotImageList = imageList) != null) {
hImageList = hotImageList.getHandle ();
}
@@ -1030,7 +1046,7 @@ void setHotImageList (ImageList imageList) {
void setImageList (ImageList imageList) {
if (this.imageList == imageList) return;
- long /*int*/ hImageList = 0;
+ long hImageList = 0;
if ((this.imageList = imageList) != null) {
hImageList = imageList.getHandle ();
}
@@ -1043,7 +1059,7 @@ void setImageList (ImageList imageList) {
public boolean setParent (Composite parent) {
checkWidget ();
if (!super.setParent (parent)) return false;
- long /*int*/ hwndParent = parent.handle;
+ long hwndParent = parent.handle;
OS.SendMessage (handle, OS.TB_SETPARENT, hwndParent, 0);
/*
* Bug in Windows. When a tool bar is reparented, the tooltip
@@ -1052,8 +1068,8 @@ public boolean setParent (Composite parent) {
* over using SetWindowLongPtr(). Note that for some reason,
* SetParent() does not work.
*/
- long /*int*/ hwndShell = parent.getShell ().handle;
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long hwndShell = parent.getShell ().handle;
+ long hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
OS.SetWindowLongPtr (hwndToolTip, OS.GWLP_HWNDPARENT, hwndShell);
return true;
}
@@ -1104,8 +1120,7 @@ void setRowCount (int count) {
/*public*/ void setTabItemList (ToolItem [] tabList) {
checkWidget ();
if (tabList != null) {
- for (int i=0; i<tabList.length; i++) {
- ToolItem item = tabList [i];
+ for (ToolItem item : tabList) {
if (item == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (item.parent != this) error (SWT.ERROR_INVALID_PARENT);
@@ -1157,9 +1172,13 @@ String toolTipText (NMTTDISPINFO hdr) {
* provide the string, causing no tool tip to be displayed.
*/
if (!hasCursor ()) return ""; //$NON-NLS-1$
- int index = (int)/*64*/hdr.idFrom;
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ int index = (int)hdr.idFrom;
+ long hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom) {
+ if (currentToolItemToolTip != hwndToolTip) {
+ maybeEnableDarkSystemTheme(hdr.hwndFrom);
+ currentToolItemToolTip = hdr.hwndFrom;
+ }
/*
* Bug in Windows. For some reason the reading order
* in NMTTDISPINFO is sometimes set incorrectly. The
@@ -1203,7 +1222,7 @@ void updateOrientation () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
for (int i=0; i<count; i++) {
ToolItem item = items [i];
if ((item.style & SWT.SEPARATOR) != 0) continue;
@@ -1267,12 +1286,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return ToolBarProc;
}
@Override
-LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CAPTURECHANGED (long wParam, long lParam) {
LRESULT result = super.WM_CAPTURECHANGED (wParam, lParam);
if (result != null) return result;
/*
@@ -1280,10 +1299,9 @@ LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
* item is pressed, the item remains pressed. The fix is
* unpress all items using TB_SETSTATE and TBSTATE_PRESSED.
*/
- for (int i=0; i<items.length; i++) {
- ToolItem item = items [i];
+ for (ToolItem item : items) {
if (item != null) {
- int fsState = (int)/*64*/OS.SendMessage (handle, OS.TB_GETSTATE, item.id, 0);
+ int fsState = (int)OS.SendMessage (handle, OS.TB_GETSTATE, item.id, 0);
if ((fsState & OS.TBSTATE_PRESSED) != 0) {
fsState &= ~OS.TBSTATE_PRESSED;
OS.SendMessage (handle, OS.TB_SETSTATE, item.id, fsState);
@@ -1294,15 +1312,15 @@ LRESULT WM_CAPTURECHANGED (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case ' ':
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
+ int index = (int)OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
if (index != -1) {
TBBUTTON lpButton = new TBBUTTON ();
- long /*int*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (code != 0) {
items [lpButton.idCommand].click (false);
return LRESULT.ZERO;
@@ -1313,7 +1331,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_COMMAND (long wParam, long lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_COMMAND, it forwards this
@@ -1338,7 +1356,7 @@ LRESULT WM_COMMAND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETDLGCODE (long wParam, long lParam) {
LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
/*
* Return DLGC_BUTTON so that mnemonics will be
@@ -1350,10 +1368,10 @@ LRESULT WM_GETDLGCODE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_SPACE:
/*
* Ensure that the window proc does not process VK_SPACE
@@ -1366,28 +1384,28 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
+ int index = (int)OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
TBBUTTON lpButton = new TBBUTTON ();
- long /*int*/ code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
+ long code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);
if (code != 0) lastFocusId = lpButton.idCommand;
return super.WM_KILLFOCUS (wParam, lParam);
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONDOWN (wParam, lParam);
}
@Override
-LRESULT WM_LBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONUP (long wParam, long lParam) {
if (ignoreMouse) return null;
return super.WM_LBUTTONUP (wParam, lParam);
}
@Override
-LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSELEAVE (long wParam, long lParam) {
LRESULT result = super.WM_MOUSELEAVE (wParam, lParam);
if (result != null) return result;
/*
@@ -1403,7 +1421,7 @@ LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
*/
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
if ((lpti.uFlags & OS.TTF_IDISHWND) == 0) {
OS.SendMessage (hwndToolTip, OS.TTM_DELTOOL, 0, lpti);
@@ -1414,13 +1432,13 @@ LRESULT WM_MOUSELEAVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEMOVE (long wParam, long lParam) {
if (OS.GetMessagePos () != display.lastMouse) lastArrowId = -1;
return super.WM_MOUSEMOVE (wParam, lParam);
}
@Override
-LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_NOTIFY (long wParam, long lParam) {
/*
* Feature in Windows. When the toolbar window
* proc processes WM_NOTIFY, it forwards this
@@ -1445,19 +1463,19 @@ LRESULT WM_NOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
LRESULT result = super.WM_SETFOCUS (wParam, lParam);
if (lastFocusId != -1 && handle == OS.GetFocus ()) {
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0);
+ int index = (int)OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0);
OS.SendMessage (handle, OS.TB_SETHOTITEM, index, 0);
}
return result;
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
if (ignoreResize) {
- long /*int*/ code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam);
if (code == 0) return LRESULT.ZERO;
return new LRESULT (code);
}
@@ -1478,14 +1496,14 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
OS.GetWindowRect (handle, windowRect);
int index = 0, border = getBorderWidthInPixels () * 2;
RECT rect = new RECT ();
- int count = (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
while (index < count) {
OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);
OS.MapWindowPoints (handle, 0, rect, 2);
if (rect.right > windowRect.right - border * 2) break;
index++;
}
- int bits = (int)/*64*/OS.SendMessage (handle, OS.TB_GETEXTENDEDSTYLE, 0, 0);
+ int bits = (int)OS.SendMessage (handle, OS.TB_GETEXTENDEDSTYLE, 0, 0);
if (index == count) {
bits |= OS.TBSTYLE_EX_HIDECLIPPEDBUTTONS;
} else {
@@ -1498,7 +1516,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_WINDOWPOSCHANGING (long wParam, long lParam) {
LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);
if (result != null) return result;
if (ignoreResize) return result;
@@ -1541,7 +1559,7 @@ LRESULT WM_WINDOWPOSCHANGING (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
ToolItem child = items [OS.LOWORD (wParam)];
if (child == null) return null;
return child.wmCommandChild (wParam, lParam);
@@ -1552,7 +1570,7 @@ private boolean customDrawing() {
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.TBN_DROPDOWN:
NMTOOLBAR lpnmtb = new NMTOOLBAR ();
@@ -1561,7 +1579,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (child != null) {
Event event = new Event ();
event.detail = SWT.ARROW;
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmtb.iItem, 0);
+ int index = (int)OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmtb.iItem, 0);
RECT rect = new RECT ();
OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);
event.setLocationInPixels(rect.left, rect.bottom);
@@ -1631,7 +1649,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
case OS.HICF_ARROWKEYS: {
RECT client = new RECT ();
OS.GetClientRect (handle, client);
- int index = (int)/*64*/OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmhi.idNew, 0);
+ int index = (int)OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmhi.idNew, 0);
RECT rect = new RECT ();
OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);
if (rect.right > client.right || rect.bottom > client.bottom) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
index 690810de79..736e479880 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -180,12 +180,12 @@ protected void checkSubclass () {
}
void click (boolean dropDown) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if (OS.GetKeyState (OS.VK_LBUTTON) < 0) return;
- int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
+ int index = (int)OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
- int hotIndex = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETHOTITEM, 0, 0);
+ int hotIndex = (int)OS.SendMessage (hwnd, OS.TB_GETHOTITEM, 0, 0);
/*
* In order to emulate all the processing that
@@ -195,7 +195,7 @@ void click (boolean dropDown) {
* properly.
*/
int y = rect.top + (rect.bottom - rect.top) / 2;
- long /*int*/ lParam = OS.MAKELPARAM (dropDown ? rect.right - 1 : rect.left, y);
+ long lParam = OS.MAKELPARAM (dropDown ? rect.right - 1 : rect.left, y);
parent.ignoreMouse = true;
OS.SendMessage (hwnd, OS.WM_LBUTTONDOWN, 0, lParam);
OS.SendMessage (hwnd, OS.WM_LBUTTONUP, 0, lParam);
@@ -242,8 +242,8 @@ public Rectangle getBounds () {
}
Rectangle getBoundsInPixels () {
- long /*int*/ hwnd = parent.handle;
- int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
+ long hwnd = parent.handle;
+ int index = (int)OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
int width = rect.right - rect.left;
@@ -306,8 +306,8 @@ public boolean getEnabled () {
if ((style & SWT.SEPARATOR) != 0) {
return (state & DISABLED) == 0;
}
- long /*int*/ hwnd = parent.handle;
- long /*int*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long hwnd = parent.handle;
+ long fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_ENABLED) != 0;
}
@@ -331,6 +331,22 @@ public Image getHotImage () {
}
/**
+ * Returns the receiver's enabled image if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's enabled image
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+@Override
+public Image getImage () {
+ return super.getImage();
+}
+
+/**
* Returns the receiver's parent, which must be a <code>ToolBar</code>.
*
* @return the receiver's parent
@@ -365,8 +381,8 @@ public ToolBar getParent () {
public boolean getSelection () {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long hwnd = parent.handle;
+ long fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
return (fsState & OS.TBSTATE_CHECKED) != 0;
}
@@ -401,8 +417,8 @@ public int getWidth () {
}
int getWidthInPixels () {
- long /*int*/ hwnd = parent.handle;
- int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
+ long hwnd = parent.handle;
+ int index = (int)OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);
return rect.right - rect.left;
@@ -431,8 +447,8 @@ public boolean isEnabled () {
boolean isTabGroup () {
ToolItem [] tabList = parent._getTabItemList ();
if (tabList != null) {
- for (int i=0; i<tabList.length; i++) {
- if (tabList [i] == this) return true;
+ for (ToolItem item : tabList) {
+ if (item == this) return true;
}
}
if ((style & SWT.SEPARATOR) != 0) return true;
@@ -464,7 +480,7 @@ void releaseImages () {
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
OS.SendMessage (hwnd, OS.TB_GETBUTTONINFO, id, info);
/*
* Feature in Windows. For some reason, a tool item that has
@@ -563,6 +579,7 @@ public void setControl (Control control) {
if (control.parent != parent) error (SWT.ERROR_INVALID_PARENT);
}
if ((style & SWT.SEPARATOR) == 0) return;
+ parent.layout(true);
this.control = control;
/*
* Feature in Windows. When a tool bar wraps, tool items
@@ -580,7 +597,7 @@ public void setControl (Control control) {
*/
if ((parent.style & (SWT.WRAP | SWT.VERTICAL)) != 0) {
boolean changed = false;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_STYLE | OS.TBIF_STATE;
@@ -643,8 +660,8 @@ public void setControl (Control control) {
*/
public void setEnabled (boolean enabled) {
checkWidget();
- long /*int*/ hwnd = parent.handle;
- int fsState = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long hwnd = parent.handle;
+ int fsState = (int)OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
/*
* Feature in Windows. When TB_SETSTATE is used to set the
* state of a tool item, the item redraws even when the state
@@ -663,6 +680,9 @@ public void setEnabled (boolean enabled) {
if ((style & SWT.SEPARATOR) == 0) {
if (image != null) updateImages (enabled && parent.getEnabled ());
}
+ if (!enabled && parent.lastFocusId == id) {
+ parent.lastFocusId = -1;
+ }
}
/**
@@ -684,8 +704,10 @@ public void setEnabled (boolean enabled) {
*/
public void setDisabledImage (Image image) {
checkWidget();
+ if (this.disabledImage == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ parent.layout(isImageSizeChanged(disabledImage, image));
disabledImage = image;
updateImages (getEnabled () && parent.getEnabled ());
}
@@ -709,8 +731,10 @@ public void setDisabledImage (Image image) {
*/
public void setHotImage (Image image) {
checkWidget();
+ if (this.hotImage == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ parent.layout(isImageSizeChanged(hotImage, image));
hotImage = image;
updateImages (getEnabled () && parent.getEnabled ());
}
@@ -718,12 +742,23 @@ public void setHotImage (Image image) {
@Override
public void setImage (Image image) {
checkWidget();
+ if (this.image == image) return;
if ((style & SWT.SEPARATOR) != 0) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ parent.layout(isImageSizeChanged(super.image, image));
super.setImage (image);
updateImages (getEnabled () && parent.getEnabled ());
}
+boolean isImageSizeChanged(Image oldImage, Image image) {
+ boolean changed = true;
+ // check if image size really changed for old and new images
+ if (oldImage != null && !oldImage.isDisposed() && image != null && !image.isDisposed()) {
+ changed = !oldImage.getBounds().equals(image.getBounds());
+ }
+ return changed;
+}
+
boolean setRadioSelection (boolean value) {
if ((style & SWT.RADIO) == 0) return false;
if (getSelection () != value) {
@@ -751,8 +786,8 @@ boolean setRadioSelection (boolean value) {
public void setSelection (boolean selected) {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;
- long /*int*/ hwnd = parent.handle;
- int fsState = (int)/*64*/OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
+ long hwnd = parent.handle;
+ int fsState = (int)OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);
/*
* Feature in Windows. When TB_SETSTATE is used to set the
* state of a tool item, the item redraws even when the state
@@ -787,8 +822,8 @@ public void setSelection (boolean selected) {
@Override
boolean setTabItemFocus () {
if (parent.setTabItemFocus ()) {
- long /*int*/ hwnd = parent.handle;
- int index = (int)/*64*/OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
+ long hwnd = parent.handle;
+ int index = (int)OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);
OS.SendMessage (hwnd, OS.TB_SETHOTITEM, index, 0);
return true;
}
@@ -796,12 +831,12 @@ boolean setTabItemFocus () {
}
void _setText (String string) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_TEXT | OS.TBIF_STYLE;
info.fsStyle = (byte) (widgetStyle () | OS.BTNS_AUTOSIZE);
- long /*int*/ hHeap = OS.GetProcessHeap (), pszText = 0;
+ long hHeap = OS.GetProcessHeap (), pszText = 0;
if (string.length () != 0) {
info.fsStyle |= OS.BTNS_SHOWTEXT;
TCHAR buffer;
@@ -857,6 +892,7 @@ public void setText (String string) {
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
if (string.equals (text)) return;
+ parent.layout(true);
super.setText (string);
if ((state & HAS_AUTO_DIRECTION) == 0 || !updateTextDirection (AUTO_TEXT_DIRECTION)) {
_setText (string);
@@ -870,8 +906,8 @@ public void setText (String string) {
* the tool bar to redraw and layout.
*/
parent.setDropDownItems (false);
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long hwnd = parent.handle;
+ long hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.setDropDownItems (true);
parent.layoutItems ();
@@ -942,7 +978,7 @@ public void setWidth (int width) {
void setWidthInPixels (int width) {
if ((style & SWT.SEPARATOR) == 0) return;
if (width < 0) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
@@ -953,7 +989,7 @@ void setWidthInPixels (int width) {
void updateImages (boolean enabled) {
if ((style & SWT.SEPARATOR) != 0) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_IMAGE;
@@ -1043,7 +1079,7 @@ void updateImages (boolean enabled) {
info.dwMask |= OS.TBIF_SIZE;
info.cx = 0;
OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO, id, info);
- long /*int*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.layoutItems ();
}
@@ -1063,7 +1099,7 @@ int widgetStyle () {
return OS.BTNS_BUTTON;
}
-LRESULT wmCommandChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCommandChild (long wParam, long lParam) {
if ((style & SWT.RADIO) != 0) {
if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) {
selectRadio ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
index d7aaca1ce5..78c2a55472 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
@@ -217,7 +217,7 @@ public String getText () {
public boolean getVisible () {
checkWidget();
if (item != null) return visible;
- long /*int*/ hwndToolTip = hwndToolTip ();
+ long hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -229,8 +229,8 @@ public boolean getVisible () {
}
int getWidth () {
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
+ long hwnd = parent.handle;
+ long hmonitor = OS.MonitorFromWindow (hwnd, OS.MONITOR_DEFAULTTONEAREST);
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
@@ -238,7 +238,7 @@ int getWidth () {
return maxWidth / 4;
}
-long /*int*/ hwndToolTip () {
+long hwndToolTip () {
return (style & SWT.BALLOON) != 0 ? parent.balloonTipHandle () : parent.toolTipHandle ();
}
@@ -275,7 +275,7 @@ void releaseWidget () {
super.releaseWidget ();
if (item == null) {
if (autoHide) {
- long /*int*/ hwndToolTip = hwndToolTip ();
+ long hwndToolTip = hwndToolTip ();
if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
@@ -443,13 +443,13 @@ public void setText (String string) {
}
void updateMessage () {
- long /*int*/ hwnd = hwndToolTip();
+ long hwnd = hwndToolTip();
if (OS.SendMessage (hwnd, OS.TTM_GETCURRENTTOOL, 0, 0) != 0) {
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
if (OS.SendMessage (hwnd, OS.TTM_GETCURRENTTOOL, 0, lpti) != 0) {
if (message != null && message.length() > 0) {
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
TCHAR buffer = new TCHAR (0, message, true);
int byteCount = buffer.length () * TCHAR.sizeof;
lpti.lpszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
@@ -493,12 +493,12 @@ public void setVisible (boolean visible) {
checkWidget ();
if (visible == getVisible ()) return;
if (item == null) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.uId = id;
lpti.hwnd = hwnd;
- long /*int*/ hwndToolTip = hwndToolTip ();
+ long hwndToolTip = hwndToolTip ();
Shell shell = parent.getShell ();
if (text.length () != 0) {
int icon = OS.TTI_NONE;
@@ -519,7 +519,7 @@ public void setVisible (boolean visible) {
nY = pt.y;
}
}
- long /*int*/ lParam = OS.MAKELPARAM (nX, nY);
+ long lParam = OS.MAKELPARAM (nX, nY);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKPOSITION, 0, lParam);
/*
@@ -535,7 +535,7 @@ public void setVisible (boolean visible) {
OS.GetClientRect (hwnd, rect);
OS.MapWindowPoints (hwnd, 0, rect, 2);
if (!OS.PtInRect (rect, pt)) {
- long /*int*/ hCursor = OS.GetCursor ();
+ long hCursor = OS.GetCursor ();
OS.SetCursor (0);
OS.SetCursorPos (rect.left, rect.top);
OS.SendMessage (hwndToolTip, OS.TTM_TRACKACTIVATE, 1, lpti);
@@ -545,7 +545,7 @@ public void setVisible (boolean visible) {
OS.SendMessage (hwndToolTip, OS.TTM_TRACKACTIVATE, 1, lpti);
}
- int time = (int)/*64*/OS.SendMessage (hwndToolTip, OS.TTM_GETDELAYTIME, OS.TTDT_AUTOPOP, 0);
+ int time = (int)OS.SendMessage (hwndToolTip, OS.TTM_GETDELAYTIME, OS.TTDT_AUTOPOP, 0);
OS.SetTimer (hwndToolTip, TIMER_ID, time, 0);
updateMessage();
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
index 49d85ecd1d..c6c88c56c1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
@@ -48,12 +48,12 @@ public class Tracker extends Widget {
boolean tracking, cancelled, stippled;
Rectangle [] rectangles = new Rectangle [0], proportions = rectangles;
Rectangle bounds;
- long /*int*/ resizeCursor;
+ long resizeCursor;
Cursor clientCursor;
int cursorOrientation = SWT.NONE;
boolean inEvent = false;
boolean drawn;
- long /*int*/ hwndTransparent, hwndOpaque, oldTransparentProc, oldOpaqueProc;
+ long hwndTransparent, hwndOpaque, oldTransparentProc, oldOpaqueProc;
int oldX, oldY;
/*
@@ -207,7 +207,7 @@ Point adjustMoveCursor () {
pt.x = newX; pt.y = newY;
/*
* Convert to screen coordinates iff needed
- */
+ */
if (parent != null) {
OS.ClientToScreen (parent.handle, pt);
}
@@ -250,7 +250,7 @@ Point adjustResizeCursor () {
* the appropriate resize cursor.
*/
if (clientCursor == null) {
- long /*int*/ newCursor = 0;
+ long newCursor = 0;
switch (cursorOrientation) {
case SWT.UP:
newCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
@@ -361,8 +361,7 @@ void drawRectangles (Rectangle [] rects, boolean stippled) {
if (hwndOpaque != 0) {
RECT rect1 = new RECT();
int bandWidth = stippled ? 3 : 1;
- for (int i = 0; i < rects.length; i++) {
- Rectangle rect = rects[i];
+ for (Rectangle rect : rects) {
rect1.left = rect.x - bandWidth;
rect1.top = rect.y - bandWidth;
rect1.right = rect.x + rect.width + bandWidth * 2;
@@ -373,9 +372,9 @@ void drawRectangles (Rectangle [] rects, boolean stippled) {
return;
}
int bandWidth = 1;
- long /*int*/ hwndTrack = parent == null ? OS.GetDesktopWindow () : parent.handle;
- long /*int*/ hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
- long /*int*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
+ long hwndTrack = parent == null ? OS.GetDesktopWindow () : parent.handle;
+ long hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);
+ long hBitmap = 0, hBrush = 0, oldBrush = 0;
if (stippled) {
bandWidth = 3;
byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};
@@ -383,8 +382,7 @@ void drawRectangles (Rectangle [] rects, boolean stippled) {
hBrush = OS.CreatePatternBrush (hBitmap);
oldBrush = OS.SelectObject (hDC, hBrush);
}
- for (int i=0; i<rects.length; i++) {
- Rectangle rect = rects [i];
+ for (Rectangle rect : rects) {
OS.PatBlt (hDC, rect.x, rect.y, rect.width, bandWidth, OS.PATINVERT);
OS.PatBlt (hDC, rect.x, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2), OS.PATINVERT);
OS.PatBlt (hDC, rect.x + rect.width - bandWidth, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2), OS.PATINVERT);
@@ -451,9 +449,9 @@ void moveRectangles (int xChange, int yChange) {
if (yChange > 0 && ((style & SWT.DOWN) == 0)) yChange = 0;
if (xChange == 0 && yChange == 0) return;
bounds.x += xChange; bounds.y += yChange;
- for (int i = 0; i < rectangles.length; i++) {
- rectangles [i].x += xChange;
- rectangles [i].y += yChange;
+ for (Rectangle rectangle : rectangles) {
+ rectangle.x += xChange;
+ rectangle.y += yChange;
}
}
@@ -524,8 +522,7 @@ public boolean open () {
OS.SetLayeredWindowAttributes (hwndOpaque, 0xFFFFFF, (byte)0, OS.LWA_COLORKEY | OS.LWA_ALPHA);
drawn = false;
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
- long /*int*/ newProcAddress = newProc.getAddress ();
- if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long newProcAddress = newProc.getAddress ();
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
oldOpaqueProc = OS.GetWindowLongPtr (hwndOpaque, OS.GWLP_WNDPROC);
@@ -553,8 +550,7 @@ public boolean open () {
OS.GetModuleHandle (null),
null);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
- long /*int*/ newProcAddress = newProc.getAddress ();
- if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+ long newProcAddress = newProc.getAddress ();
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
OS.ShowWindow (hwndTransparent, OS.SW_SHOWNOACTIVATE);
@@ -745,8 +741,7 @@ void resizeRectangles (int xChange, int yChange) {
xChange -= bounds.width;
bounds.width = 0;
if (proportions.length > 1) {
- for (int i = 0; i < proportions.length; i++) {
- Rectangle proportion = proportions [i];
+ for (Rectangle proportion : proportions) {
proportion.x = 100 - proportion.x - proportion.width;
}
}
@@ -759,8 +754,7 @@ void resizeRectangles (int xChange, int yChange) {
xChange += bounds.width;
bounds.width = 0;
if (proportions.length > 1) {
- for (int i = 0; i < proportions.length; i++) {
- Rectangle proportion = proportions [i];
+ for (Rectangle proportion : proportions) {
proportion.x = 100 - proportion.x - proportion.width;
}
}
@@ -775,8 +769,7 @@ void resizeRectangles (int xChange, int yChange) {
yChange -= bounds.height;
bounds.height = 0;
if (proportions.length > 1) {
- for (int i = 0; i < proportions.length; i++) {
- Rectangle proportion = proportions [i];
+ for (Rectangle proportion : proportions) {
proportion.y = 100 - proportion.y - proportion.height;
}
}
@@ -789,8 +782,7 @@ void resizeRectangles (int xChange, int yChange) {
yChange += bounds.height;
bounds.height = 0;
if (proportions.length > 1) {
- for (int i = 0; i < proportions.length; i++) {
- Rectangle proportion = proportions [i];
+ for (Rectangle proportion : proportions) {
proportion.y = 100 - proportion.y - proportion.height;
}
}
@@ -891,8 +883,8 @@ public void setStippled (boolean stippled) {
this.stippled = stippled;
}
-long /*int*/ transparentProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) {
- switch ((int)/*64*/msg) {
+long transparentProc (long hwnd, long msg, long wParam, long lParam) {
+ switch ((int)msg) {
/*
* We typically do not want to answer that the transparent window is
* transparent to hits since doing so negates the effect of having it
@@ -918,9 +910,9 @@ long /*int*/ transparentProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/
case OS.WM_PAINT:
if (hwndOpaque == hwnd) {
PAINTSTRUCT ps = new PAINTSTRUCT();
- long /*int*/ hDC = OS.BeginPaint (hwnd, ps);
- long /*int*/ hBitmap = 0, hBrush = 0, oldBrush = 0;
- long /*int*/ transparentBrush = OS.CreateSolidBrush(0xFFFFFF);
+ long hDC = OS.BeginPaint (hwnd, ps);
+ long hBitmap = 0, hBrush = 0, oldBrush = 0;
+ long transparentBrush = OS.CreateSolidBrush(0xFFFFFF);
oldBrush = OS.SelectObject (hDC, transparentBrush);
OS.PatBlt (hDC, ps.left, ps.top, ps.right - ps.left, ps.bottom - ps.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
@@ -936,10 +928,8 @@ long /*int*/ transparentProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/
} else {
oldBrush = OS.SelectObject (hDC, OS.GetStockObject(OS.BLACK_BRUSH));
}
- Rectangle[] rects = this.rectangles;
RECT rect1 = new RECT ();
- for (int i=0; i<rects.length; i++) {
- Rectangle rect = rects [i];
+ for (Rectangle rect : this.rectangles) {
rect1.left = rect.x;
rect1.top = rect.y;
rect1.right = rect.x + rect.width;
@@ -965,7 +955,7 @@ long /*int*/ transparentProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/
return 0;
}
}
- return OS.CallWindowProc (hwnd == hwndTransparent ? oldTransparentProc : oldOpaqueProc, hwnd, (int)/*64*/msg, wParam, lParam);
+ return OS.CallWindowProc (hwnd == hwndTransparent ? oldTransparentProc : oldOpaqueProc, hwnd, (int)msg, wParam, lParam);
}
void update () {
@@ -980,13 +970,13 @@ void update () {
}
@Override
-LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmKeyDown (long hwnd, long wParam, long lParam) {
LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
boolean isMirrored = parent != null && (parent.style & SWT.MIRRORED) != 0;
int stepSize = OS.GetKeyState (OS.VK_CONTROL) < 0 ? STEPSIZE_SMALL : STEPSIZE_LARGE;
int xChange = 0, yChange = 0;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_ESCAPE:
cancelled = true;
tracking = false;
@@ -1114,7 +1104,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
}
@Override
-LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmSysKeyDown (long hwnd, long wParam, long lParam) {
LRESULT result = super.wmSysKeyDown (hwnd, wParam, lParam);
if (result != null) return result;
cancelled = true;
@@ -1122,7 +1112,7 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
return result;
}
-LRESULT wmMouse (int message, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMouse (int message, long wParam, long lParam) {
boolean isMirrored = parent != null && (parent.style & SWT.MIRRORED) != 0;
int newPos = OS.GetMessagePos ();
int newX = OS.GET_X_LPARAM (newPos);
@@ -1139,9 +1129,9 @@ LRESULT wmMouse (int message, long /*int*/ wParam, long /*int*/ lParam) {
event.setLocationInPixels(newX, newY);
if ((style & SWT.RESIZE) != 0) {
if (isMirrored) {
- resizeRectangles (oldX - newX, newY - oldY);
+ resizeRectangles (oldX - newX, newY - oldY);
} else {
- resizeRectangles (newX - oldX, newY - oldY);
+ resizeRectangles (newX - oldX, newY - oldY);
}
inEvent = true;
sendEvent (SWT.Resize, event);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
index 2126b9ca37..ea39f2614c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
@@ -262,7 +262,7 @@ public boolean getVisible () {
return visible;
}
-long /*int*/ messageProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long messageProc (long hwnd, int msg, long wParam, long lParam) {
/*
* Feature in Windows. When the user clicks on the tray
* icon, another application may be the foreground window.
@@ -274,7 +274,7 @@ long /*int*/ messageProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long
* menu is not hidden. The fix is to force the tray icon
* message window to the foreground when sending an event.
*/
- switch ((int)/*64*/lParam) {
+ switch ((int)lParam) {
case OS.WM_LBUTTONDOWN:
if (hooks (SWT.Selection)) {
OS.SetForegroundWindow (hwnd);
@@ -459,7 +459,7 @@ public void setImage (Image image) {
super.setImage (image);
if (image2 != null) image2.dispose ();
image2 = null;
- long /*int*/ hIcon = 0;
+ long hIcon = 0;
Image icon = image;
if (icon != null) {
switch (icon.type) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 877edcd18d..7334a6698e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -64,7 +64,7 @@ import org.eclipse.swt.internal.win32.*;
* <dt><b>Styles:</b></dt>
* <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL</dd>
* <dt><b>Events:</b></dt>
- * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem</dd>
+ * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem, EmptinessChanged</dd>
* </dl>
* <p>
* Note: Only one of the styles SINGLE and MULTI may be specified.
@@ -85,9 +85,9 @@ public class Tree extends Composite {
TreeItem currentItem;
TreeColumn sortColumn;
RECT focusRect;
- long /*int*/ hwndParent, hwndHeader, hAnchor, hInsert, hSelect;
+ long hwndParent, hwndHeader, hAnchor, hInsert, hSelect;
int lastID;
- long /*int*/ hFirstIndexOf, hLastIndexOf;
+ long hFirstIndexOf, hLastIndexOf;
int lastIndexOf, itemCount, sortDirection;
boolean dragStarted, gestureCompleted, insertAfter, shrink, ignoreShrink;
boolean ignoreSelect, ignoreExpand, ignoreDeselect, ignoreResize;
@@ -98,8 +98,8 @@ public class Tree extends Composite {
boolean createdAsRTL;
boolean headerItemDragging;
int scrollWidth, selectionForeground;
- long /*int*/ headerToolTipHandle, itemToolTipHandle;
- long /*int*/ lastTimerID = -1;
+ long headerToolTipHandle, itemToolTipHandle;
+ long lastTimerID = -1;
int lastTimerCount;
int headerBackground = -1;
int headerForeground = -1;
@@ -113,9 +113,9 @@ public class Tree extends Composite {
static final int INCREMENT = 5;
static final int EXPLORER_EXTRA = 2;
static final int DRAG_IMAGE_SIZE = 301;
- static final long /*int*/ TreeProc;
+ static final long TreeProc;
static final TCHAR TreeClass = new TCHAR (0, OS.WC_TREEVIEW, true);
- static final long /*int*/ HeaderProc;
+ static final long HeaderProc;
static final TCHAR HeaderClass = new TCHAR (0, OS.WC_HEADER, true);
static {
WNDCLASS lpWndClass = new WNDCLASS ();
@@ -205,14 +205,6 @@ void _addListener (int eventType, Listener listener) {
OS.SendMessage (handle, OS.TVM_SETSCROLLTIME, 0, 0);
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if (eventType == SWT.MeasureItem) {
- /*
- * This code is intentionally commented.
- */
-// if (explorerTheme) {
-// int bits1 = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
-// bits1 &= ~OS.TVS_EX_AUTOHSCROLL;
-// OS.SendMessage (handle, OS.TVM_SETEXTENDEDSTYLE, 0, bits1);
-// }
bits |= OS.TVS_NOHSCROLL;
}
/*
@@ -236,7 +228,7 @@ void _addListener (int eventType, Listener listener) {
* scroll bar. The fix is to check for this case and
* explicitly hide the scroll bar.
*/
- int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (count != 0 && (bits & OS.TVS_NOHSCROLL) != 0) {
OS.ShowScrollBar (handle, OS.SB_HORZ, false);
}
@@ -246,17 +238,17 @@ void _addListener (int eventType, Listener listener) {
}
}
-TreeItem _getItem (long /*int*/ hItem) {
+TreeItem _getItem (long hItem) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = hItem;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {
- return _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ return _getItem (tvItem.hItem, (int)tvItem.lParam);
}
return null;
}
-TreeItem _getItem (long /*int*/ hItem, int id) {
+TreeItem _getItem (long hItem, int id) {
if ((style & SWT.VIRTUAL) == 0) return items [id];
return id != -1 ? items [id] : new TreeItem (this, SWT.NONE, -1, -1, hItem);
}
@@ -282,7 +274,7 @@ void _removeListener (int eventType, Listener listener) {
}
void _setBackgroundPixel (int newPixel) {
- int oldPixel = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETBKCOLOR, 0, 0);
+ int oldPixel = (int)OS.SendMessage (handle, OS.TVM_GETBKCOLOR, 0, 0);
if (oldPixel != newPixel) {
/*
* Bug in Windows. When TVM_SETBKCOLOR is used more
@@ -305,7 +297,7 @@ void _setBackgroundPixel (int newPixel) {
* animation draws badly. The fix is to clear the effect.
*/
if (explorerTheme && ENABLE_TVS_EX_FADEINOUTEXPANDOS) {
- int bits2 = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ int bits2 = (int)OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if (newPixel == -1 && findImageControl () == null) {
bits2 |= OS.TVS_EX_FADEINOUTEXPANDOS;
} else {
@@ -382,14 +374,14 @@ public void addTreeListener(TreeListener listener) {
}
@Override
-long /*int*/ borderHandle () {
+long borderHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
-LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long wParam, long lParam) {
if (ignoreCustomDraw) return null;
if (nmcd.left == nmcd.right) return new LRESULT (OS.CDRF_DODEFAULT);
- long /*int*/ hDC = nmcd.hdc;
+ long hDC = nmcd.hdc;
OS.RestoreDC (hDC, -1);
TreeItem item = getItem (nmcd);
@@ -427,11 +419,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
if (explorerTheme) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.TVS_TRACKSELECT) != 0) {
- if ((style & SWT.FULL_SELECTION) != 0 && (selected || hot)) {
- OS.SetTextColor (hDC, OS.GetSysColor (OS.COLOR_WINDOWTEXT));
- } else {
- OS.SetTextColor (hDC, getForegroundPixel ());
- }
+ OS.SetTextColor (hDC, getForegroundPixel ());
}
}
}
@@ -504,7 +492,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
}
}
draw = false;
- long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, pClipRect);
@@ -574,7 +562,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
backgroundRect = rect;
}
int clrText = -1, clrTextBk = -1;
- long /*int*/ hFont = item.fontHandle (index);
+ long hFont = item.fontHandle (index);
if (selectionForeground != -1) clrText = selectionForeground;
if (OS.IsWindowEnabled (handle)) {
boolean drawForeground = false;
@@ -632,7 +620,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
if (clrTextBk != -1) data.background = clrTextBk;
}
data.font = item.getFont (index);
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (hDC, data);
Event event = new Event ();
event.item = item;
@@ -647,7 +635,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
//if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
if (OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0) == nmcd.dwItemSpec) {
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -717,7 +705,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
backgroundRect = selectionRect;
}
}
- long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, backgroundRect);
@@ -772,7 +760,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
if (size == null) size = DPIUtil.autoScaleDown (getImageSize ()); // To Points
if (!ignoreDrawForeground) {
//int y1 = rect.top + (index == 0 ? (getItemHeight () - size.y) / 2 : 0);
- int y1 = rect.top;
+ int y1 = rect.top + DPIUtil.autoScaleUp((getItemHeight () - size.y) / 2);
int x1 = Math.max (rect.left, rect.left - inset + 1);
GCData data = new GCData();
data.device = display;
@@ -782,7 +770,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
OS.SelectClipRgn (hDC, 0);
gc.dispose ();
}
- OS.SetRect (rect, rect.left + size.x + offset, rect.top, rect.right - inset, rect.bottom);
+ OS.SetRect (rect, rect.left + DPIUtil.autoScaleUp(size.x) + offset, rect.top, rect.right - inset, rect.bottom);
} else {
if (i == 0) {
if (OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0) != 0) {
@@ -848,7 +836,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
if (clrText != -1) data.foreground = clrText;
if (clrTextBk != -1) data.background = clrTextBk;
}
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (hDC, data);
Event event = new Event ();
event.item = item;
@@ -865,7 +853,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
if (OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0) == nmcd.dwItemSpec) {
if (i == 0 /*nmcd.iSubItem == 0*/ || (style & SWT.FULL_SELECTION) != 0) {
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) event.detail |= SWT.FOCUSED;
}
}
@@ -908,9 +896,9 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
} else {
if (!explorerTheme) {
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == item.handle) {
if (!ignoreDrawFocus && findImageControl () != null) {
if ((style & SWT.FULL_SELECTION) != 0) {
@@ -918,7 +906,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
OS.SetRect (focusRect, 0, nmcd.top, clientRect.right + 1, nmcd.bottom);
OS.DrawFocusRect (hDC, focusRect);
} else {
- int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ int index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
RECT focusRect = item.getBounds (index, true, false, false, false, false, hDC);
RECT clipRect = item.getBounds (index, true, false, false, false, true, hDC);
OS.IntersectClipRect (hDC, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
@@ -934,7 +922,7 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long wParam, long lParam) {
/*
* Even when custom draw is being ignored, the font needs
* to be selected into the HDC so that the item bounds are
@@ -952,9 +940,9 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
* COMCTL32.DLL,
*/
if (item == null) return null;
- long /*int*/ hDC = nmcd.hdc;
- int index = hwndHeader != 0 ? (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) : 0;
- long /*int*/ hFont = item.fontHandle (index);
+ long hDC = nmcd.hdc;
+ int index = hwndHeader != 0 ? (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0) : 0;
+ long hFont = item.fontHandle (index);
if (hFont != -1) OS.SelectObject (hDC, hFont);
if (ignoreCustomDraw || nmcd.left == nmcd.right) {
return new LRESULT (hFont == -1 ? OS.CDRF_DODEFAULT : OS.CDRF_NEWFONT);
@@ -1031,7 +1019,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
if (clrText != -1) data.foreground = clrText;
if (clrTextBk != -1) data.background = clrTextBk;
}
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
data.font = item.getFont (index);
GC gc = GC.win32_new (hDC, data);
Event event = new Event ();
@@ -1045,7 +1033,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
//if ((nmcd.uItemState & OS.CDIS_FOCUS) != 0) {
if (OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0) == nmcd.dwItemSpec) {
if (handle == OS.GetFocus ()) {
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) == 0) {
if (!explorerTheme || !selected) {
focused = true;
@@ -1109,7 +1097,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
}
pRect.left -= EXPLORER_EXTRA;
pClipRect.left -= EXPLORER_EXTRA;
- long /*int*/ hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
+ long hTheme = OS.OpenThemeData (handle, Display.TREEVIEW);
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
OS.DrawThemeBackground (hTheme, hDC, OS.TVP_TREEITEM, iStateId, pRect, pClipRect);
@@ -1324,7 +1312,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
}
OS.SaveDC (hDC);
if (clipRect != null) {
- long /*int*/ hRgn = OS.CreateRectRgn (clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
+ long hRgn = OS.CreateRectRgn (clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
POINT lpPoint = new POINT ();
OS.GetWindowOrgEx (hDC, lpPoint);
OS.OffsetRgn (hRgn, -lpPoint.x, -lpPoint.y);
@@ -1334,7 +1322,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*
return result;
}
-LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long wParam, long lParam) {
if (ignoreCustomDraw) return null;
if (OS.IsWindowVisible (handle)) {
if (OS.IsAppThemed ()) {
@@ -1359,7 +1347,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- long /*int*/ hItem = 0;
+ long hItem = 0;
if (OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1383,14 +1371,14 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
}
}
if (linesVisible) {
- long /*int*/ hDC = nmcd.hdc;
+ long hDC = nmcd.hdc;
if (hwndHeader != 0) {
int x = 0;
RECT rect = new RECT ();
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
for (int i=0; i<columnCount; i++) {
- int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0);
+ int index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0);
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
OS.SetRect (rect, x, nmcd.top, x + hdItem.cxy, nmcd.bottom);
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_RIGHT);
@@ -1415,7 +1403,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
* NOTE: This problem only happens on Vista during
* WM_NOTIFY with NM_CUSTOMDRAW and CDDS_POSTPAINT.
*/
- long /*int*/ hItem = 0;
+ long hItem = 0;
if (OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
hItem = getBottomItem ();
} else {
@@ -1427,7 +1415,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
}
}
if (height == 0) {
- height = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
+ height = (int)OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
OS.GetClientRect (handle, rect);
OS.SetRect (rect, rect.left, rect.top, rect.right, rect.top + height);
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM);
@@ -1444,7 +1432,7 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ l
return new LRESULT (OS.CDRF_DODEFAULT);
}
-LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, long wParam, long lParam) {
if (explorerTheme) {
if ((OS.IsWindowEnabled (handle) && hooks (SWT.EraseItem)) || hasCustomBackground() || findImageControl () != null) {
RECT rect = new RECT ();
@@ -1456,7 +1444,7 @@ LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, long /*int*/ wParam, long /*int*/ lP
}
@Override
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
if (handle == 0) return 0;
if (hwndParent != 0 && hwnd == hwndParent) {
return OS.DefWindowProc (hwnd, msg, wParam, lParam);
@@ -1475,7 +1463,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
* only the focus is assigned.
*/
if ((style & SWT.SINGLE) != 0) break;
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem != 0) {
@@ -1496,7 +1484,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
break;
}
}
- long /*int*/ hItem = 0;
+ long hItem = 0;
boolean redraw = false;
switch (msg) {
/* Keyboard messages */
@@ -1551,7 +1539,7 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
break;
}
}
- long /*int*/ code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
+ long code = OS.CallWindowProc (TreeProc, hwnd, msg, wParam, lParam);
switch (msg) {
/* Keyboard messages */
case OS.WM_KEYDOWN:
@@ -1625,7 +1613,7 @@ void checkBuffered () {
OS.SendMessage (handle, OS.TVM_SETSCROLLTIME, 0, 0);
}
if (OS.IsAppThemed ()) {
- int exStyle = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ int exStyle = (int)OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if ((exStyle & OS.TVS_EX_DOUBLEBUFFER) != 0) style |= SWT.DOUBLE_BUFFERED;
}
}
@@ -1654,7 +1642,7 @@ boolean checkData (TreeItem item, int index, boolean redraw) {
* is to detect that the top item has changed and redraw
* the entire tree.
*/
- long /*int*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
sendEvent (SWT.SetData, event);
//widget could be disposed at this point
currentItem = oldItem;
@@ -1667,12 +1655,7 @@ boolean checkData (TreeItem item, int index, boolean redraw) {
return true;
}
-@Override
-boolean checkHandle (long /*int*/ hwnd) {
- return hwnd == handle || (hwndParent != 0 && hwnd == hwndParent) || (hwndHeader != 0 && hwnd == hwndHeader);
-}
-
-boolean checkScroll (long /*int*/ hItem) {
+boolean checkScroll (long hItem) {
/*
* Feature in Windows. If redraw is turned off using WM_SETREDRAW
* and a tree item that is not a child of the first root is selected or
@@ -1685,8 +1668,8 @@ boolean checkScroll (long /*int*/ hItem) {
* callers of this method.
*/
if (getDrawing ()) return false;
- long /*int*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ long hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
while (hParent != hRoot && hParent != 0) {
hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hParent);
}
@@ -1723,7 +1706,7 @@ protected void checkSubclass () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
hItem = findItem (hItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
@@ -1736,11 +1719,11 @@ public void clear (int index, boolean all) {
}
}
-void clear (long /*int*/ hItem, TVITEM tvItem) {
+void clear (long hItem, TVITEM tvItem) {
tvItem.hItem = hItem;
TreeItem item = null;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {
- item = tvItem.lParam != -1 ? items [(int)/*64*/tvItem.lParam] : null;
+ item = tvItem.lParam != -1 ? items [(int)tvItem.lParam] : null;
}
if (item != null) {
if ((style & SWT.VIRTUAL) != 0 && !item.cached) return;
@@ -1770,12 +1753,11 @@ void clear (long /*int*/ hItem, TVITEM tvItem) {
*/
public void clearAll (boolean all) {
checkWidget ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return;
if (all) {
boolean redraw = false;
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null && item != currentItem) {
item.clear ();
redraw = true;
@@ -1789,20 +1771,20 @@ public void clearAll (boolean all) {
}
}
-void clearAll (long /*int*/ hItem, TVITEM tvItem, boolean all) {
+void clearAll (long hItem, TVITEM tvItem, boolean all) {
while (hItem != 0) {
clear (hItem, tvItem);
if (all) {
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
clearAll (hFirstItem, tvItem, all);
}
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
}
-long /*int*/ CompareFunc (long /*int*/ lParam1, long /*int*/ lParam2, long /*int*/ lParamSort) {
- TreeItem item1 = items [(int)/*64*/lParam1], item2 = items [(int)/*64*/lParam2];
- String text1 = item1.getText ((int)/*64*/lParamSort), text2 = item2.getText ((int)/*64*/lParamSort);
+long CompareFunc (long lParam1, long lParam2, long lParamSort) {
+ TreeItem item1 = items [(int)lParam1], item2 = items [(int)lParam2];
+ String text1 = item1.getText ((int)lParamSort), text2 = item2.getText ((int)lParamSort);
return sortDirection == SWT.UP ? text1.compareTo (text2) : text2.compareTo (text1);
}
@@ -1820,7 +1802,7 @@ long /*int*/ CompareFunc (long /*int*/ lParam1, long /*int*/ lParam2, long /*int
height += rect.bottom - rect.top;
}
RECT rect = new RECT ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
while (hItem != 0) {
if ((style & SWT.VIRTUAL) == 0 && !painted) {
TVITEM tvItem = new TVITEM ();
@@ -1864,10 +1846,6 @@ void createHandle () {
OS.SetWindowTheme (handle, Display.EXPLORER, null);
int bits = OS.TVS_EX_DOUBLEBUFFER | OS.TVS_EX_RICHTOOLTIP;
if (ENABLE_TVS_EX_FADEINOUTEXPANDOS) bits |= OS.TVS_EX_FADEINOUTEXPANDOS;
- /*
- * This code is intentionally commented.
- */
-// if ((style & SWT.FULL_SELECTION) == 0) bits |= OS.TVS_EX_AUTOHSCROLL;
OS.SendMessage (handle, OS.TVM_SETEXTENDEDSTYLE, 0, bits);
/*
* Bug in Windows. When the tree is using the explorer
@@ -1893,7 +1871,7 @@ void createHandle () {
* The control will not destroy a font that it did not
* create.
*/
- long /*int*/ hFont = OS.GetStockObject (OS.SYSTEM_FONT);
+ long hFont = OS.GetStockObject (OS.SYSTEM_FONT);
OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);
/*
@@ -1923,6 +1901,7 @@ void createHeaderToolTips () {
OS.GetModuleHandle (null),
null);
if (headerToolTipHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ maybeEnableDarkSystemTheme(headerToolTipHandle);
/*
* Feature in Windows. Despite the fact that the
* tool tip text contains \r\n, the tooltip will
@@ -1941,8 +1920,7 @@ void createItem (TreeColumn column, int index) {
System.arraycopy (columns, 0, newColumns, 0, columns.length);
columns = newColumns;
}
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null) {
String [] strings = item.strings;
if (strings != null) {
@@ -2006,8 +1984,8 @@ void createItem (TreeColumn column, int index) {
* if is not possible to set the text at a later time.
* The fix is to insert the item with an empty string.
*/
- long /*int*/ hHeap = OS.GetProcessHeap ();
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
+ long hHeap = OS.GetProcessHeap ();
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, TCHAR.sizeof);
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_TEXT | OS.HDI_FORMAT;
hdItem.pszText = pszText;
@@ -2031,7 +2009,7 @@ void createItem (TreeColumn column, int index) {
* scroll bar. The fix is to check for this case and
* explicitly hide the scroll bar explicitly.
*/
- int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (count != 0) {
OS.ShowScrollBar (handle, OS.SB_HORZ, false);
}
@@ -2068,7 +2046,11 @@ void createItem (TreeColumn column, int index) {
}
}
-void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter, long /*int*/ hItem) {
+/**
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
+ */
+void createItem (TreeItem item, long hParent, long hInsertAfter, long hItem) {
int id = -1;
if (item != null) {
id = lastID < items.length ? lastID : 0;
@@ -2087,14 +2069,13 @@ void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter,
shrink = true;
length = Math.max (4, items.length * 3 / 2);
}
- TreeItem [] newItems = new TreeItem [length];
- System.arraycopy (items, 0, newItems, 0, items.length);
- items = newItems;
+
+ itemsGrowArray (length);
}
lastID = id + 1;
}
- long /*int*/ hNewItem = 0;
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ long hNewItem = 0;
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
boolean fixParent = hFirstItem == 0;
if (hItem == 0) {
TVINSERTSTRUCT tvInsert = new TVINSERTSTRUCT ();
@@ -2113,14 +2094,6 @@ void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter,
hNewItem = OS.SendMessage (handle, OS.TVM_INSERTITEM, 0, tvInsert);
ignoreCustomDraw = false;
if (hNewItem == 0) error (SWT.ERROR_ITEM_NOT_ADDED);
- /*
- * This code is intentionally commented.
- */
-// if (hParent != 0) {
-// int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
-// bits |= OS.TVS_LINESATROOT;
-// OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
-// }
} else {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
@@ -2141,13 +2114,14 @@ void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter,
if (hFirstItem == hFirstIndexOf && itemCount != -1) itemCount++;
if (hItem == 0) {
/*
- * Bug in Windows. When a child item is added to a parent item
- * that has no children outside of WM_NOTIFY with control code
- * TVN_ITEMEXPANDED, the tree widget does not redraw the +/-
- * indicator. The fix is to detect the case when the first
- * child is added to a visible parent item and redraw the parent.
+ * Bug in Windows. When a child item is added to a collapsed
+ * parent item that has no children, Tree does not draw [-]
+ * indicator and the parent item continues to look as if it
+ * has no children. Reportedly this doesn't happen when item
+ * is added during WM_NOTIFY(TVN_ITEMEXPANDED). The workaround
+ * is to force redraw parent item.
*/
- if (fixParent) {
+ if (fixParent && (hParent != OS.TVI_ROOT)) {
if (getDrawing () && OS.IsWindowVisible (handle)) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (handle, hParent, rect, false)) {
@@ -2169,7 +2143,7 @@ void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter,
RECT damageRect = new RECT ();
boolean damaged = OS.GetUpdateRect (handle, damageRect, true);
if (damaged && damageRect.top < rect.bottom) {
- long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long rgn = OS.CreateRectRgn (0, 0, 0, 0);
int result = OS.GetUpdateRgn (handle, rgn, true);
if (result != OS.NULLREGION) {
OS.OffsetRgn (rgn, 0, rect.bottom - rect.top);
@@ -2180,7 +2154,21 @@ void createItem (TreeItem item, long /*int*/ hParent, long /*int*/ hInsertAfter,
}
}
}
- updateScrollBar ();
+
+ /*
+ Note: Don't update scrollbars when drawing is disabled.
+ This gives significant improvement for bulk insert scenarios.
+ Later, setRedraw(true) will update scrollbars once.
+ */
+ if (getDrawing ()) updateScrollBar ();
+ /*
+ If this is the first item added fire an EmptinessChanged event.
+ */
+ if (item != null && id == 0) {
+ Event event = new Event ();
+ event.detail = 0;
+ sendEvent (SWT.EmptinessChanged, event);
+ }
}
}
@@ -2210,6 +2198,7 @@ void createItemToolTips () {
OS.GetModuleHandle (null),
null);
if (itemToolTipHandle == 0) error (SWT.ERROR_NO_HANDLES);
+ maybeEnableDarkSystemTheme(itemToolTipHandle);
OS.SendMessage (itemToolTipHandle, OS.TTM_SETDELAYTIME, OS.TTDT_INITIAL, 0);
/*
* Feature in Windows. Despite the fact that the
@@ -2228,15 +2217,36 @@ void createItemToolTips () {
OS.SendMessage (itemToolTipHandle, OS.TTM_ADDTOOL, 0, lpti);
}
+/**
+ * On Windows, Tree does not support columns. The workaround is to emulate it
+ * by adding a Header control and custom-drawing Tree items.
+ *
+ * Creates Header (for columns) and wraps (Tree+Header) into an intermediate
+ * parent, so that (Tree+Header) behave as one whole. The wrapper is designed
+ * to mimic original Tree as much as possible. For that reason, all sorts of
+ * settings are copied over.
+ */
void createParent () {
forceResize ();
+
+ /* Copy Tree position to hwndParent */
RECT rect = new RECT ();
OS.GetWindowRect (handle, rect);
OS.MapWindowPoints (0, parent.handle, rect, 2);
- int oldStyle = OS.GetWindowLong (handle, OS.GWL_STYLE);
- int newStyle = super.widgetStyle () & ~OS.WS_VISIBLE;
+
+ /* Copy Tree styles to hwndParent */
+ final int oldStyle = OS.GetWindowLong (handle, OS.GWL_STYLE);
+ int newStyle = super.widgetStyle ();
+ newStyle &= ~OS.WS_VISIBLE; /* Show control once everything is configured */
if ((oldStyle & OS.WS_DISABLED) != 0) newStyle |= OS.WS_DISABLED;
-// if ((oldStyle & OS.WS_VISIBLE) != 0) newStyle |= OS.WS_VISIBLE;
+
+ /* Get rid of internal borders; hwndParent will have the borders now */
+ if ((oldStyle & OS.WS_BORDER) != 0) {
+ int noBorderStyle = oldStyle & ~OS.WS_BORDER;
+ OS.SetWindowLong (handle, OS.GWL_STYLE, noBorderStyle);
+ }
+
+ /* Create hwndParent */
hwndParent = OS.CreateWindowEx (
super.widgetExtStyle (),
super.windowClass (),
@@ -2251,7 +2261,14 @@ void createParent () {
OS.GetModuleHandle (null),
null);
if (hwndParent == 0) error (SWT.ERROR_NO_HANDLES);
+
+ /* Old code, not sure if needed */
OS.SetWindowLongPtr (hwndParent, OS.GWLP_ID, hwndParent);
+
+ /* Copy dark scrollbar settings to hwndParent */
+ maybeEnableDarkSystemTheme(hwndParent);
+
+ /* Create header */
int bits = OS.WS_EX_NOINHERITLAYOUT;
if ((style & SWT.RIGHT_TO_LEFT) != 0) bits |= OS.WS_EX_LAYOUTRTL;
hwndHeader = OS.CreateWindowEx (
@@ -2265,26 +2282,21 @@ void createParent () {
OS.GetModuleHandle (null),
null);
if (hwndHeader == 0) error (SWT.ERROR_NO_HANDLES);
+
+ /* Old code, not sure if needed */
OS.SetWindowLongPtr (hwndHeader, OS.GWLP_ID, hwndHeader);
- if (OS.IsDBLocale) {
- long /*int*/ hIMC = OS.ImmGetContext (handle);
- OS.ImmAssociateContext (hwndParent, hIMC);
- OS.ImmAssociateContext (hwndHeader, hIMC);
- OS.ImmReleaseContext (handle, hIMC);
- }
- //This code is intentionally commented
-// if (!OS.IsPPC) {
-// if ((style & SWT.BORDER) != 0) {
-// int oldExStyle = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
-// oldExStyle &= ~OS.WS_EX_CLIENTEDGE;
-// OS.SetWindowLong (handle, OS.GWL_EXSTYLE, oldExStyle);
-// }
-// }
- long /*int*/ hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+
+ maybeEnableDarkSystemTheme(hwndHeader);
+ /* Copy Tree's font to header */
+ long hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (hFont != 0) OS.SendMessage (hwndHeader, OS.WM_SETFONT, hFont, 0);
- long /*int*/ hwndInsertAfter = OS.GetWindow (handle, OS.GW_HWNDPREV);
+
+ /* Copy Tree's tab-order to hwndParent */
+ long hwndInsertAfter = OS.GetWindow (handle, OS.GW_HWNDPREV);
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
OS.SetWindowPos (hwndParent, hwndInsertAfter, 0, 0, 0, 0, flags);
+
+ /* Copy Tree's scrollbar settings to hwndParent */
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_RANGE | OS.SIF_PAGE;
@@ -2294,12 +2306,16 @@ void createParent () {
OS.GetScrollInfo (hwndParent, OS.SB_VERT, info);
info.nPage = info.nMax + 1;
OS.SetScrollInfo (hwndParent, OS.SB_VERT, info, true);
+
+ /* Columns are emulated by custom drawing items */
customDraw = true;
+
deregister ();
if ((oldStyle & OS.WS_VISIBLE) != 0) {
+ /* All set, show the new hwndParent wrapper */
OS.ShowWindow (hwndParent, OS.SW_SHOW);
}
- long /*int*/ hwndFocus = OS.GetFocus ();
+ long hwndFocus = OS.GetFocus ();
if (hwndFocus == handle) OS.SetFocus (hwndParent);
OS.SetParent (handle, hwndParent);
if (hwndFocus == handle) OS.SetFocus (handle);
@@ -2331,13 +2347,13 @@ void deregister () {
if (hwndHeader != 0) display.removeControl (hwndHeader);
}
-void deselect (long /*int*/ hItem, TVITEM tvItem, long /*int*/ hIgnoreItem) {
+void deselect (long hItem, TVITEM tvItem, long hIgnoreItem) {
while (hItem != 0) {
if (hItem != hIgnoreItem) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
deselect (hFirstItem, tvItem, hIgnoreItem);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -2385,20 +2401,19 @@ public void deselectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
if ((style & SWT.SINGLE) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
} else {
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, 0);
} else {
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null) {
tvItem.hItem = item.handle;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
@@ -2430,8 +2445,7 @@ void destroyItem (TreeColumn column) {
}
System.arraycopy (columns, index + 1, columns, index, --columnCount - index);
columns [columnCount] = null;
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null) {
if (columnCount == 0) {
item.strings = null;
@@ -2530,9 +2544,9 @@ void destroyItem (TreeColumn column) {
newColumns [i - orderIndex] = columns [newOrder [i]];
newColumns [i - orderIndex].updateToolTip (newOrder [i]);
}
- for (int i=0; i<newColumns.length; i++) {
- if (!newColumns [i].isDisposed ()) {
- newColumns [i].sendEvent (SWT.Move);
+ for (TreeColumn newColumn : newColumns) {
+ if (!newColumn.isDisposed ()) {
+ newColumn.sendEvent (SWT.Move);
}
}
}
@@ -2547,7 +2561,7 @@ void destroyItem (TreeColumn column) {
}
}
-void destroyItem (TreeItem item, long /*int*/ hItem) {
+void destroyItem (TreeItem item, long hItem) {
hFirstIndexOf = hLastIndexOf = 0;
itemCount = -1;
/*
@@ -2565,7 +2579,7 @@ void destroyItem (TreeItem item, long /*int*/ hItem) {
* allowing application code to add or remove items during
* this remove operation.
*/
- long /*int*/ hParent = 0;
+ long hParent = 0;
boolean fixRedraw = false;
if ((style & SWT.DOUBLE_BUFFERED) == 0) {
if (getDrawing () && OS.IsWindowVisible (handle)) {
@@ -2577,14 +2591,8 @@ void destroyItem (TreeItem item, long /*int*/ hItem) {
hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
OS.UpdateWindow (handle);
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
- /*
- * This code is intentionally commented.
- */
-// OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
- }
- if ((style & SWT.MULTI) != 0) {
- ignoreDeselect = ignoreSelect = lockSelection = true;
}
+ ignoreDeselect = ignoreSelect = lockSelection = true;
/*
* Feature in Windows. When an item is deleted and a tool tip
@@ -2596,15 +2604,17 @@ void destroyItem (TreeItem item, long /*int*/ hItem) {
*
* NOTE: This only happens on Vista.
*/
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip != 0) OS.SendMessage (hwndToolTip, OS.TTM_POP, 0 ,0);
shrink = ignoreShrink = true;
OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, hItem);
ignoreShrink = false;
- if ((style & SWT.MULTI) != 0) {
- ignoreDeselect = ignoreSelect = lockSelection = false;
- }
+ /*
+ * Bug 546333: When TVGN_CARET item is deleted, Windows automatically
+ * sets selection to some other item. We do not want that.
+ */
+ ignoreDeselect = ignoreSelect = lockSelection = false;
if (fixRedraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
OS.ValidateRect (handle, null);
@@ -2619,7 +2629,7 @@ void destroyItem (TreeItem item, long /*int*/ hItem) {
}
}
}
- int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int count = (int)OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (count == 0) {
if (imageList != null) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, 0, 0);
@@ -2635,7 +2645,22 @@ void destroyItem (TreeItem item, long /*int*/ hItem) {
scrollWidth = 0;
setScrollWidth ();
}
- updateScrollBar ();
+
+ /*
+ Note: Don't update scrollbars when drawing is disabled.
+ This gives significant improvement for bulk remove scenarios.
+ Later, setRedraw(true) will update scrollbars once.
+ */
+ if (getDrawing ()) updateScrollBar ();
+
+ /*
+ If this is the last item removed fire an EmptinessChanged event.
+ */
+ if (count == 0) {
+ Event event = new Event ();
+ event.detail = 1;
+ sendEvent (SWT.EmptinessChanged, event);
+ }
}
@Override
@@ -2703,8 +2728,8 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
POINT pt = new POINT ();
pt.x = x;
pt.y = y;
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (handle);
+ long oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
RECT rect = new RECT ();
if (hwndParent != 0) {
@@ -2719,7 +2744,7 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
index [0] = 0;
boolean quit = false;
while (index [0] < count && !quit) {
- long /*int*/ hFont = item [0].fontHandle (order [index [0]]);
+ long hFont = item [0].fontHandle (order [index [0]]);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
cellRect [0] = item [0].getBounds (order [index [0]], true, false, true, false, true, hDC);
if (cellRect [0].left > rect.right) {
@@ -2728,7 +2753,7 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
cellRect [0].right = Math.min (cellRect [0].right, rect.right);
if (OS.PtInRect (cellRect [0], pt)) {
if (isCustomToolTip ()) {
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, lpht.hItem, OS.TVIS_SELECTED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, lpht.hItem, OS.TVIS_SELECTED);
int detail = (state & OS.TVIS_SELECTED) != 0 ? SWT.SELECTED : 0;
Event event = sendMeasureItemEvent (item [0], order [index [0]], hDC, detail);
if (isDisposed () || item [0].isDisposed ()) break;
@@ -2754,7 +2779,7 @@ boolean findCell (int x, int y, TreeItem [] item, int [] index, RECT [] cellRect
return found;
}
-int findIndex (long /*int*/ hFirstItem, long /*int*/ hItem) {
+int findIndex (long hFirstItem, long hItem) {
if (hFirstItem == 0) return -1;
if (hFirstItem == hFirstIndexOf) {
if (hFirstIndexOf == hItem) {
@@ -2762,12 +2787,12 @@ int findIndex (long /*int*/ hFirstItem, long /*int*/ hItem) {
return lastIndexOf = 0;
}
if (hLastIndexOf == hItem) return lastIndexOf;
- long /*int*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ long hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
if (hPrevItem == hItem) {
hLastIndexOf = hPrevItem;
return --lastIndexOf;
}
- long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ long hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
if (hNextItem == hItem) {
hLastIndexOf = hNextItem;
return ++lastIndexOf;
@@ -2793,7 +2818,7 @@ int findIndex (long /*int*/ hFirstItem, long /*int*/ hItem) {
return -1;
}
int index = 0;
- long /*int*/ hNextItem = hFirstItem;
+ long hNextItem = hFirstItem;
while (hNextItem != 0 && hNextItem != hItem) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
index++;
@@ -2808,11 +2833,11 @@ int findIndex (long /*int*/ hFirstItem, long /*int*/ hItem) {
}
@Override
-Widget findItem (long /*int*/ hItem) {
+Widget findItem (long hItem) {
return _getItem (hItem);
}
-long /*int*/ findItem (long /*int*/ hFirstItem, int index) {
+long findItem (long hFirstItem, int index) {
if (hFirstItem == 0) return 0;
if (hFirstItem == hFirstIndexOf) {
if (index == 0) {
@@ -2830,7 +2855,7 @@ long /*int*/ findItem (long /*int*/ hFirstItem, int index) {
}
if (index < lastIndexOf) {
int previousIndex = lastIndexOf - 1;
- long /*int*/ hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
+ long hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hLastIndexOf);
while (hPrevItem != 0 && index < previousIndex) {
hPrevItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUS, hPrevItem);
--previousIndex;
@@ -2841,7 +2866,7 @@ long /*int*/ findItem (long /*int*/ hFirstItem, int index) {
}
} else {
int nextIndex = lastIndexOf + 1;
- long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
+ long hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hLastIndexOf);
while (hNextItem != 0 && nextIndex < index) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
nextIndex++;
@@ -2854,7 +2879,7 @@ long /*int*/ findItem (long /*int*/ hFirstItem, int index) {
return 0;
}
int nextIndex = 0;
- long /*int*/ hNextItem = hFirstItem;
+ long hNextItem = hFirstItem;
while (hNextItem != 0 && nextIndex < index) {
hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hNextItem);
nextIndex++;
@@ -2870,7 +2895,7 @@ long /*int*/ findItem (long /*int*/ hFirstItem, int index) {
TreeItem getFocusItem () {
// checkWidget ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
@@ -2990,12 +3015,12 @@ Point getImageSize () {
return new Point (0, getItemHeightInPixels ());
}
-long /*int*/ getBottomItem () {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+long getBottomItem () {
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == 0) return 0;
- int index = 0, count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
+ int index = 0, count = (int)OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
while (index <= count) {
- long /*int*/ hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
+ long hNextItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hItem);
if (hNextItem == 0) return hItem;
hItem = hNextItem;
index++;
@@ -3151,9 +3176,9 @@ public TreeColumn [] getColumns () {
public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- long /*int*/ hItem = findItem (hFirstItem, index);
+ long hItem = findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return _getItem (hItem);
}
@@ -3167,14 +3192,14 @@ TreeItem getItem (NMTVCUSTOMDRAW nmcd) {
* fix is to query the field from the item instead
* of using the struct.
*/
- int id = (int)/*64*/nmcd.lItemlParam;
+ int id = (int)nmcd.lItemlParam;
if ((style & SWT.VIRTUAL) != 0) {
if (id == -1) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = nmcd.dwItemSpec;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
- id = (int)/*64*/tvItem.lParam;
+ id = (int)tvItem.lParam;
}
}
return _getItem (nmcd.dwItemSpec, id);
@@ -3246,14 +3271,14 @@ TreeItem getItemInPixels (Point point) {
*/
public int getItemCount () {
checkWidget ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return 0;
return getItemCount (hItem);
}
-int getItemCount (long /*int*/ hItem) {
+int getItemCount (long hItem) {
int count = 0;
- long /*int*/ hFirstItem = hItem;
+ long hFirstItem = hItem;
if (hItem == hFirstIndexOf) {
if (itemCount != -1) return itemCount;
hFirstItem = hLastIndexOf;
@@ -3284,7 +3309,7 @@ public int getItemHeight () {
}
int getItemHeightInPixels () {
- return (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
+ return (int)OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0);
}
/**
@@ -3306,14 +3331,14 @@ int getItemHeightInPixels () {
*/
public TreeItem [] getItems () {
checkWidget ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
if (hItem == 0) return new TreeItem [0];
return getItems (hItem);
}
-TreeItem [] getItems (long /*int*/ hTreeItem) {
+TreeItem [] getItems (long hTreeItem) {
int count = 0;
- long /*int*/ hItem = hTreeItem;
+ long hItem = hTreeItem;
while (hItem != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
count++;
@@ -3332,7 +3357,7 @@ TreeItem [] getItems (long /*int*/ hTreeItem) {
*/
while (tvItem.hItem != 0) {
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
- TreeItem item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ TreeItem item = _getItem (tvItem.hItem, (int)tvItem.lParam);
if (item != null) result [index++] = item;
tvItem.hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, tvItem.hItem);
}
@@ -3369,12 +3394,12 @@ public boolean getLinesVisible () {
return linesVisible;
}
-long /*int*/ getNextSelection (long /*int*/ hItem) {
+long getNextSelection (long hItem) {
while (hItem != 0) {
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) != 0) return hItem;
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
- long /*int*/ hSelected = getNextSelection (hFirstItem);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long hSelected = getNextSelection (hFirstItem);
if (hSelected != 0) return hSelected;
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -3398,7 +3423,7 @@ public TreeItem getParentItem () {
return null;
}
-int getSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
+int getSelection (long hItem, TVITEM tvItem, TreeItem [] selection, int index, int count, boolean bigSelection, boolean all) {
while (hItem != 0) {
boolean expanded = true;
if (bigSelection) {
@@ -3406,7 +3431,7 @@ int getSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection, int
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
if ((tvItem.state & OS.TVIS_SELECTED) != 0) {
if (selection != null && index < selection.length) {
- TreeItem item = _getItem (hItem, (int)/*64*/tvItem.lParam);
+ TreeItem item = _getItem (hItem, (int)tvItem.lParam);
if (item != null) {
selection [index] = item;
} else {
@@ -3417,12 +3442,12 @@ int getSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection, int
}
expanded = (tvItem.state & OS.TVIS_EXPANDED) != 0;
} else {
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED | OS.TVIS_EXPANDED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED | OS.TVIS_EXPANDED);
if ((state & OS.TVIS_SELECTED) != 0) {
if (tvItem != null && selection != null && index < selection.length) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
- TreeItem item = _getItem (hItem, (int)/*64*/tvItem.lParam);
+ TreeItem item = _getItem (hItem, (int)tvItem.lParam);
if (item != null) {
selection [index] = item;
} else {
@@ -3436,7 +3461,7 @@ int getSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection, int
if (index == count) break;
if (all) {
if (expanded) {
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
if ((index = getSelection (hFirstItem, tvItem, selection, index, count, bigSelection, all)) == count) {
break;
}
@@ -3468,32 +3493,31 @@ int getSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection, int
public TreeItem [] getSelection () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return new TreeItem [0];
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
if ((tvItem.state & OS.TVIS_SELECTED) == 0) return new TreeItem [0];
- TreeItem item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ TreeItem item = _getItem (tvItem.hItem, (int)tvItem.lParam);
if (item == null) return new TreeItem [0];
return new TreeItem [] {item};
}
int count = 0;
TreeItem [] guess = new TreeItem [(style & SWT.VIRTUAL) != 0 ? 8 : 1];
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
count = getSelection (hItem, tvItem, guess, 0, -1, false, true);
} else {
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null) {
- long /*int*/ hItem = item.handle;
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ long hItem = item.handle;
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) != 0) {
if (count < guess.length) guess [count] = item;
count++;
@@ -3512,8 +3536,8 @@ public TreeItem [] getSelection () {
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
boolean bigSelection = result.length > itemCount / 2;
if (count != getSelection (hItem, tvItem, result, 0, count, bigSelection, false)) {
count = getSelection (hItem, tvItem, result, 0, count, bigSelection, true);
@@ -3540,23 +3564,22 @@ public TreeItem [] getSelection () {
public int getSelectionCount () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return 0;
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
return (state & OS.TVIS_SELECTED) == 0 ? 0 : 1;
}
int count = 0;
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
count = getSelection (hItem, null, null, 0, -1, false, true);
} else {
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null) {
- long /*int*/ hItem = item.handle;
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ long hItem = item.handle;
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) != 0) count++;
}
}
@@ -3628,11 +3651,11 @@ public int getSortDirection () {
*/
public TreeItem getTopItem () {
checkWidget ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
return hItem != 0 ? _getItem (hItem) : null;
}
-boolean hitTestSelection (long /*int*/ hItem, int x, int y) {
+boolean hitTestSelection (long hItem, int x, int y) {
if (hItem == 0) return false;
TreeItem item = _getItem (hItem);
if (item == null) return false;
@@ -3643,12 +3666,12 @@ boolean hitTestSelection (long /*int*/ hItem, int x, int y) {
//BUG? - check drag detect
int [] order = new int [1], index = new int [1];
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (handle);
+ long oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- long /*int*/ hFont = item.fontHandle (order [index [0]]);
+ long hFont = item.fontHandle (order [index [0]]);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
int detail = (state & OS.TVIS_SELECTED) != 0 ? SWT.SELECTED : 0;
Event event = sendMeasureItemEvent (item, order [index [0]], hDC, detail);
if (event.getBoundsInPixels ().contains (x, y)) result = true;
@@ -3672,8 +3695,8 @@ int imageIndex (Image image, int index) {
* times, Windows does work making this operation slow. The fix
* is to test for the same image list before setting the new one.
*/
- long /*int*/ hImageList = imageList.getHandle ();
- long /*int*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ long hImageList = imageList.getHandle ();
+ long hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (hOldImageList != hImageList) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
updateScrollBar ();
@@ -3689,7 +3712,7 @@ int imageIndexHeader (Image image) {
headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height);
int index = headerImageList.indexOf (image);
if (index == -1) index = headerImageList.add (image);
- long /*int*/ hImageList = headerImageList.getHandle ();
+ long hImageList = headerImageList.getHandle ();
if (hwndHeader != 0) {
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageList);
}
@@ -3754,7 +3777,7 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
return hItem == 0 ? -1 : findIndex (hItem, item.handle);
}
@@ -3826,9 +3849,30 @@ boolean isItemSelected (NMTVCUSTOMDRAW nmcd) {
return selected;
}
+@Override
+boolean isUseWsBorder () {
+ return true;
+}
+
+int itemsGetFreeCapacity() {
+ int count = 0;
+ for (TreeItem item : items) {
+ if (item == null)
+ count++;
+ }
+
+ return count;
+}
+
+void itemsGrowArray (int newCapacity) {
+ TreeItem [] newItems = new TreeItem [newCapacity];
+ System.arraycopy (items, 0, newItems, 0, items.length);
+ items = newItems;
+}
+
void redrawSelection () {
if ((style & SWT.SINGLE) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
@@ -3836,12 +3880,12 @@ void redrawSelection () {
}
}
} else {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem != 0) {
RECT rect = new RECT ();
- int index = 0, count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
+ int index = 0, count = (int)OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0);
while (index <= count && hItem != 0) {
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) != 0) {
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
OS.InvalidateRect (handle, rect, true);
@@ -3861,23 +3905,23 @@ void register () {
if (hwndHeader != 0) display.addControl (hwndHeader, this);
}
-void releaseItem (long /*int*/ hItem, TVITEM tvItem, boolean release) {
+void releaseItem (long hItem, TVITEM tvItem, boolean release) {
if (hItem == hAnchor) hAnchor = 0;
if (hItem == hInsert) hInsert = 0;
tvItem.hItem = hItem;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {
if (tvItem.lParam != -1) {
- if (tvItem.lParam < lastID) lastID = (int)/*64*/tvItem.lParam;
+ if (tvItem.lParam < lastID) lastID = (int)tvItem.lParam;
if (release) {
- TreeItem item = items [(int)/*64*/tvItem.lParam];
+ TreeItem item = items [(int)tvItem.lParam];
if (item != null) item.release (false);
}
- items [(int)/*64*/tvItem.lParam] = null;
+ items [(int)tvItem.lParam] = null;
}
}
}
-void releaseItems (long /*int*/ hItem, TVITEM tvItem) {
+void releaseItems (long hItem, TVITEM tvItem) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
while (hItem != 0) {
releaseItems (hItem, tvItem);
@@ -3895,8 +3939,7 @@ void releaseHandle () {
@Override
void releaseChildren (boolean destroy) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -3904,8 +3947,7 @@ void releaseChildren (boolean destroy) {
items = null;
}
if (columns != null) {
- for (int i=0; i<columns.length; i++) {
- TreeColumn column = columns [i];
+ for (TreeColumn column : columns) {
if (column != null && !column.isDisposed ()) {
column.release (false);
}
@@ -3939,7 +3981,7 @@ void releaseWidget () {
display.releaseImageList (headerImageList);
}
imageList = headerImageList = null;
- long /*int*/ hStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ long hStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_STATE, 0);
if (hStateList != 0) OS.ImageList_Destroy (hStateList);
if (itemToolTipHandle != 0) OS.DestroyWindow (itemToolTipHandle);
@@ -3959,8 +4001,7 @@ public void removeAll () {
checkWidget ();
hFirstIndexOf = hLastIndexOf = 0;
itemCount = -1;
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null && !item.isDisposed ()) {
item.release (false);
}
@@ -3969,7 +4010,7 @@ public void removeAll () {
boolean redraw = getDrawing () && OS.IsWindowVisible (handle);
if (redraw) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
shrink = ignoreShrink = true;
- long /*int*/ result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
+ long result = OS.SendMessage (handle, OS.TVM_DELETEITEM, 0, OS.TVI_ROOT);
ignoreShrink = false;
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -4047,14 +4088,12 @@ public void removeTreeListener(TreeListener listener) {
@Override
void reskinChildren (int flags) {
if (items != null) {
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null) item.reskinChildren (flags);
}
}
if (columns != null) {
- for (int i=0; i<columns.length; i++) {
- TreeColumn column = columns [i];
+ for (TreeColumn column : columns) {
if (column != null) column.reskinChildren (flags);
}
}
@@ -4081,7 +4120,7 @@ void reskinChildren (int flags) {
*/
public void setInsertMark (TreeItem item, boolean before) {
checkWidget ();
- long /*int*/ hItem = 0;
+ long hItem = 0;
if (item != null) {
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hItem = item.handle;
@@ -4093,6 +4132,9 @@ public void setInsertMark (TreeItem item, boolean before) {
/**
* Sets the number of root-level items contained in the receiver.
+ * <p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param count the number of items
*
@@ -4106,60 +4148,101 @@ public void setInsertMark (TreeItem item, boolean before) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- setItemCount (count, OS.TVGN_ROOT, hItem);
-}
+ setItemCount (count, OS.TVI_ROOT);
+}
+
+void setItemCount (int count, long hParent) {
+ // Investigate existing items and decide what to do
+ long itemInsertAfter = 0;
+ int numInserted = 0;
+ long itemDeleteFrom = 0;
+ {
+ // Iterate to position #count and find prev/next items at this position
+ int itemCount = 0;
+ long itemPrev = OS.TVI_FIRST;
+ long itemNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ while (itemNext != 0 && itemCount < count)
+ {
+ itemPrev = itemNext;
+ itemNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, itemNext);
+ itemCount++;
+ }
+
+ if ((itemCount == count) && (itemNext == 0)) {
+ // Exactly 'count' items, no need to do anything.
+ return;
+ } else if (itemCount == count) {
+ // Too many items, going to delete some
+ itemDeleteFrom = itemNext;
+ } else if (itemNext == 0) {
+ // Counted all items, and there is not enough, going to insert some.
+ itemInsertAfter = itemPrev;
+ numInserted = count - itemCount;
+ }
+ }
-void setItemCount (int count, long /*int*/ hParent, long /*int*/ hItem) {
boolean redraw = false;
if (OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0) == 0) {
redraw = getDrawing () && OS.IsWindowVisible (handle);
if (redraw) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
}
- int itemCount = 0;
- while (hItem != 0 && itemCount < count) {
- hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
- itemCount++;
- }
+
boolean expanded = false;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
- if (!redraw && (style & SWT.VIRTUAL) != 0) {
+ if (!redraw && (style & SWT.VIRTUAL) != 0 && (hParent != OS.TVI_ROOT)) {
/*
* Bug in Windows. Despite the fact that TVM_GETITEMSTATE claims
* to return only the bits specified by the stateMask, when called
* with TVIS_EXPANDED, the entire state is returned. The fix is
* to explicitly check for the TVIS_EXPANDED bit.
*/
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hParent, OS.TVIS_EXPANDED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hParent, OS.TVIS_EXPANDED);
expanded = (state & OS.TVIS_EXPANDED) != 0;
}
- while (hItem != 0) {
- tvItem.hItem = hItem;
- OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
- hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
- TreeItem item = tvItem.lParam != -1 ? items [(int)/*64*/tvItem.lParam] : null;
- if (item != null && !item.isDisposed ()) {
- item.dispose ();
- } else {
- releaseItem (tvItem.hItem, tvItem, false);
- destroyItem (null, tvItem.hItem);
- }
- }
- if ((style & SWT.VIRTUAL) != 0) {
- for (int i=itemCount; i<count; i++) {
- if (expanded) ignoreShrink = true;
- createItem (null, hParent, OS.TVI_LAST, 0);
- if (expanded) ignoreShrink = false;
+
+ if (itemDeleteFrom != 0) {
+ while (itemDeleteFrom != 0) {
+ tvItem.hItem = itemDeleteFrom;
+ OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
+ itemDeleteFrom = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, itemDeleteFrom);
+ TreeItem item = tvItem.lParam != -1 ? items [(int)tvItem.lParam] : null;
+ if (item != null && !item.isDisposed ()) {
+ item.dispose ();
+ } else {
+ releaseItem (tvItem.hItem, tvItem, false);
+ destroyItem (null, tvItem.hItem);
+ }
}
} else {
- shrink = true;
- int extra = Math.max (4, (count + 3) / 4 * 4);
- TreeItem [] newItems = new TreeItem [items.length + extra];
- System.arraycopy (items, 0, newItems, 0, items.length);
- items = newItems;
- for (int i=itemCount; i<count; i++) {
- new TreeItem (this, SWT.NONE, hParent, OS.TVI_LAST, 0);
+ // For performance reasons, reserve the necessary space in items[]
+ int freeCapacity = itemsGetFreeCapacity();
+ if (numInserted > freeCapacity)
+ itemsGrowArray (items.length + numInserted - freeCapacity);
+
+ // Note: on Windows, insert complexity is O(pos), so for performance
+ // reasons, all items are inserted at minimum possible position, that
+ // is, all at the same position.
+
+ if ((style & SWT.VIRTUAL) != 0) {
+ for (int i = 0; i < numInserted; i++) {
+ /*
+ * Bug 206806: Windows sends 'TVN_GETDISPINFO' when item is
+ * being inserted. This causes 'SWT.SetData' to be sent to
+ * user code. If it happens to query 'getItemCount()', it will
+ * get wrong number of items because we're still inserting. The
+ * workaround is to temporarily suppress 'SWT.SetData'. Note
+ * that the boolean flag is misleadingly used for multiple
+ * purposes.
+ */
+ if (expanded) ignoreShrink = true;
+ createItem (null, hParent, itemInsertAfter, 0);
+ if (expanded) ignoreShrink = false;
+ }
+ } else {
+ for (int i = 0; i < numInserted; i++) {
+ new TreeItem (this, SWT.NONE, hParent, itemInsertAfter, 0);
+ }
}
}
if (redraw) {
@@ -4216,18 +4299,18 @@ public void setLinesVisible (boolean show) {
}
@Override
-long /*int*/ scrolledHandle () {
+long scrolledHandle () {
if (hwndHeader == 0) return handle;
return columnCount == 0 && scrollWidth == 0 ? handle : hwndParent;
}
-void select (long /*int*/ hItem, TVITEM tvItem) {
+void select (long hItem, TVITEM tvItem) {
while (hItem != 0) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_EXPANDED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_EXPANDED);
if ((state & OS.TVIS_EXPANDED) != 0) {
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
select (hFirstItem, tvItem);
}
@@ -4257,8 +4340,8 @@ public void select (TreeItem item) {
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if ((style & SWT.SINGLE) != 0) {
- long /*int*/ hItem = item.handle;
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ long hItem = item.handle;
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) != 0) return;
/*
* Feature in Windows. When an item is selected with
@@ -4289,7 +4372,7 @@ public void select (TreeItem item) {
}
setSelection (item);
if (hInfo != null) {
- long /*int*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
+ long hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
OS.SendMessage (handle, OS.WM_HSCROLL, hThumb, 0);
}
/*
@@ -4302,7 +4385,7 @@ public void select (TreeItem item) {
* NOTE: This code is only necessary on Windows Vista.
*/
OS.SetScrollInfo (handle, OS.SB_VERT, vInfo, true);
- long /*int*/ vThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, vInfo.nPos);
+ long vThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, vInfo.nPos);
OS.SendMessage (handle, OS.WM_VSCROLL, vThumb, 0);
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -4343,9 +4426,9 @@ public void selectAll () {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.state = OS.TVIS_SELECTED;
tvItem.stateMask = OS.TVIS_SELECTED;
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
select (hItem, tvItem);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, oldProc);
}
@@ -4359,7 +4442,7 @@ Event sendEraseItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT c
data.foreground = OS.GetTextColor (nmcd.hdc);
data.background = OS.GetBkColor (nmcd.hdc);
data.font = item.getFont (column);
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (nmcd.hdc, data);
Event event = new Event ();
event.item = item;
@@ -4376,7 +4459,7 @@ Event sendEraseItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT c
return event;
}
-Event sendMeasureItemEvent (TreeItem item, int index, long /*int*/ hDC, int detail) {
+Event sendMeasureItemEvent (TreeItem item, int index, long hDC, int detail) {
RECT itemRect = item.getBounds (index, true, true, false, false, false, hDC);
int nSavedDC = OS.SaveDC (hDC);
GCData data = new GCData ();
@@ -4415,7 +4498,7 @@ Event sendPaintItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT i
data.font = item.getFont (column);
data.foreground = OS.GetTextColor (nmcd.hdc);
data.background = OS.GetBkColor (nmcd.hdc);
- data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
GC gc = GC.win32_new (nmcd.hdc, data);
Event event = new Event ();
event.item = item;
@@ -4432,7 +4515,7 @@ Event sendPaintItemEvent (TreeItem item, NMTTCUSTOMDRAW nmcd, int column, RECT i
}
@Override
-void setBackgroundImage (long /*int*/ hBitmap) {
+void setBackgroundImage (long hBitmap) {
super.setBackgroundImage (hBitmap);
if (hBitmap != 0) {
/*
@@ -4499,7 +4582,7 @@ void setCursor () {
* is IDC_ARROW.
*/
Cursor cursor = findCursor ();
- long /*int*/ hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
+ long hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle;
OS.SetCursor (hCursor);
}
@@ -4576,12 +4659,12 @@ void setCheckboxImageList () {
int count = 5, flags = OS.ILC_COLOR32;
if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR;
if (!OS.IsAppThemed ()) flags |= OS.ILC_MASK;
- int height = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0), width = height;
- long /*int*/ hStateList = OS.ImageList_Create (width, height, flags, count, count);
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ memDC = OS.CreateCompatibleDC (hDC);
- long /*int*/ hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
- long /*int*/ hOldBitmap = OS.SelectObject (memDC, hBitmap);
+ int height = (int)OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0), width = height;
+ long hStateList = OS.ImageList_Create (width, height, flags, count, count);
+ long hDC = OS.GetDC (handle);
+ long memDC = OS.CreateCompatibleDC (hDC);
+ long hBitmap = OS.CreateCompatibleBitmap (hDC, width * count, height);
+ long hOldBitmap = OS.SelectObject (memDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, 0, 0, width * count, height);
/*
@@ -4601,10 +4684,10 @@ void setCheckboxImageList () {
clrBackground = 0x0200FF00;
}
}
- long /*int*/ hBrush = OS.CreateSolidBrush (clrBackground);
+ long hBrush = OS.CreateSolidBrush (clrBackground);
OS.FillRect (memDC, rect, hBrush);
OS.DeleteObject (hBrush);
- long /*int*/ oldFont = OS.SelectObject (hDC, defaultFont ());
+ long oldFont = OS.SelectObject (hDC, defaultFont ());
TEXTMETRIC tm = new TEXTMETRIC ();
OS.GetTextMetrics (hDC, tm);
OS.SelectObject (hDC, oldFont);
@@ -4624,7 +4707,7 @@ void setCheckboxImageList () {
int left = (width - itemWidth) / 2, top = (height - itemHeight) / 2 + 1;
OS.SetRect (rect, left + width, top, left + width + itemWidth, top + itemHeight);
if (OS.IsAppThemed ()) {
- long /*int*/ hTheme = display.hButtonTheme ();
+ long hTheme = display.hButtonTheme ();
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_UNCHECKEDNORMAL, rect, null);
rect.left += width; rect.right += width;
OS.DrawThemeBackground (hTheme, memDC, OS.BP_CHECKBOX, OS.CBS_CHECKEDNORMAL, rect, null);
@@ -4650,7 +4733,7 @@ void setCheckboxImageList () {
OS.ImageList_AddMasked (hStateList, hBitmap, clrBackground);
}
OS.DeleteObject (hBitmap);
- long /*int*/ hOldStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
+ long hOldStateList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_STATE, 0);
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_STATE, hStateList);
if (hOldStateList != 0) OS.ImageList_Destroy (hOldStateList);
}
@@ -4804,22 +4887,24 @@ public void setRedraw (boolean redraw) {
* when redraw is turned on and there are no items in
* the tree.
*/
- long /*int*/ hItem = 0;
- if (redraw) {
- if (drawCount == 1) {
- int count = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
- if (count == 0) {
- TVINSERTSTRUCT tvInsert = new TVINSERTSTRUCT ();
- tvInsert.hInsertAfter = OS.TVI_FIRST;
- hItem = OS.SendMessage (handle, OS.TVM_INSERTITEM, 0, tvInsert);
- }
- OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
- updateScrollBar ();
+ long hItem = 0;
+ boolean willEnableDraw = redraw && (drawCount == 1);
+ if (willEnableDraw) {
+ int count = (int)OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ if (count == 0) {
+ TVINSERTSTRUCT tvInsert = new TVINSERTSTRUCT ();
+ tvInsert.hInsertAfter = OS.TVI_FIRST;
+ hItem = OS.SendMessage (handle, OS.TVM_INSERTITEM, 0, tvInsert);
}
+ OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
+ updateScrollBar ();
}
+
super.setRedraw (redraw);
- if (!redraw) {
- if (drawCount == 1) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
+
+ boolean haveDisabledDraw = !redraw && (drawCount == 1);
+ if (haveDisabledDraw) {
+ OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
}
if (hItem != 0) {
ignoreShrink = true;
@@ -4873,7 +4958,7 @@ void setScrollWidth (int width) {
horizontalBar.setPageIncrement (info.nPage);
}
OS.GetClientRect (hwndParent, rect);
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
HDLAYOUT playout = new HDLAYOUT ();
playout.prc = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, RECT.sizeof);
playout.pwpos = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, WINDOWPOS.sizeof);
@@ -4884,17 +4969,15 @@ void setScrollWidth (int width) {
if (playout.prc != 0) OS.HeapFree (hHeap, 0, playout.prc);
if (playout.pwpos != 0) OS.HeapFree (hHeap, 0, playout.pwpos);
OS.SetWindowPos (hwndHeader, OS.HWND_TOP, pos.x - left, pos.y, pos.cx + left, pos.cy, OS.SWP_NOACTIVATE);
- int bits = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
- int b = (bits & OS.WS_EX_CLIENTEDGE) != 0 ? OS.GetSystemMetrics (OS.SM_CXEDGE) : 0;
int w = pos.cx + (columnCount == 0 && width == 0 ? 0 : OS.GetSystemMetrics (OS.SM_CXVSCROLL));
int h = rect.bottom - rect.top - pos.cy;
boolean oldIgnore = ignoreResize;
ignoreResize = true;
- OS.SetWindowPos (handle, 0, pos.x - left - b, pos.y + pos.cy - b, w + left + b * 2, h + b * 2, OS.SWP_NOACTIVATE | OS.SWP_NOZORDER);
+ OS.SetWindowPos (handle, 0, pos.x - left, pos.y + pos.cy, w + left, h, OS.SWP_NOACTIVATE | OS.SWP_NOZORDER);
ignoreResize = oldIgnore;
}
-void setSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection) {
+void setSelection (long hItem, TVITEM tvItem, TreeItem [] selection) {
while (hItem != 0) {
int index = 0;
while (index < selection.length) {
@@ -4916,7 +4999,7 @@ void setSelection (long /*int*/ hItem, TVITEM tvItem, TreeItem [] selection) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
}
}
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem);
setSelection (hFirstItem, tvItem, selection);
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);
}
@@ -4985,8 +5068,8 @@ public void setSelection (TreeItem [] items) {
TreeItem item = items [0];
if (item != null) {
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
- long /*int*/ hNewItem = hAnchor = item.handle;
+ long hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hNewItem = hAnchor = item.handle;
/*
* Bug in Windows. When TVM_SELECTITEM is used to select and
@@ -5010,7 +5093,7 @@ public void setSelection (TreeItem [] items) {
ignoreSelect = false;
if (OS.SendMessage (handle, OS.TVM_GETVISIBLECOUNT, 0, 0) == 0) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hNewItem);
- long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hNewItem);
+ long hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hNewItem);
if (hParent == 0) OS.SendMessage (handle, OS.WM_HSCROLL, OS.SB_TOP, 0);
}
if (fixScroll) {
@@ -5041,14 +5124,14 @@ public void setSelection (TreeItem [] items) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
setSelection (hItem, tvItem, items);
} else {
- for (int i=0; i<this.items.length; i++) {
- item = this.items [i];
+ for (TreeItem item2 : this.items) {
+ item = item2;
if (item != null) {
int index = 0;
while (index < length) {
@@ -5161,8 +5244,8 @@ public void setTopItem (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ hItem = item.handle;
- long /*int*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long hItem = item.handle;
+ long hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == hTopItem) return;
boolean fixScroll = checkScroll (hItem), redraw = false;
if (fixScroll) {
@@ -5174,7 +5257,7 @@ public void setTopItem (TreeItem item) {
}
SCROLLINFO hInfo = null;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- long /*int*/ hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
+ long hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
if (hParent != 0 && (bits & (OS.TVS_NOHSCROLL | OS.TVS_NOSCROLL)) == 0) {
hInfo = new SCROLLINFO ();
hInfo.cbSize = SCROLLINFO.sizeof;
@@ -5184,7 +5267,7 @@ public void setTopItem (TreeItem item) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hItem);
if (hParent != 0) {
if (hInfo != null) {
- long /*int*/ hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
+ long hThumb = OS.MAKELPARAM (OS.SB_THUMBPOSITION, hInfo.nPos);
OS.SendMessage (handle, OS.WM_HSCROLL, hThumb, 0);
}
} else {
@@ -5202,7 +5285,7 @@ public void setTopItem (TreeItem item) {
updateScrollBar ();
}
-void showItem (long /*int*/ hItem) {
+void showItem (long hItem) {
/*
* Bug in Windows. When TVM_ENSUREVISIBLE is used to ensure
* that an item is visible and the client area of the tree is
@@ -5219,9 +5302,6 @@ void showItem (long /*int*/ hItem) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
}
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hItem);
- /* This code is intentionally commented */
- //int hParent = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
- //if (hParent == 0) OS.SendMessage (handle, OS.WM_HSCROLL, OS.SB_TOP, 0);
OS.SendMessage (handle, OS.WM_HSCROLL, OS.SB_TOP, 0);
if (fixScroll) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
@@ -5255,29 +5335,6 @@ void showItem (long /*int*/ hItem) {
}
}
}
- if (hwndParent != 0) {
- RECT itemRect = new RECT ();
- if (OS.TreeView_GetItemRect (handle, hItem, itemRect, true)) {
- forceResize ();
- RECT rect = new RECT ();
- OS.GetClientRect (hwndParent, rect);
- OS.MapWindowPoints (hwndParent, handle, rect, 2);
- POINT pt = new POINT ();
- pt.x = itemRect.left;
- pt.y = itemRect.top;
- if (!OS.PtInRect (rect, pt)) {
- pt.y = itemRect.bottom;
- if (!OS.PtInRect (rect, pt)) {
- SCROLLINFO info = new SCROLLINFO ();
- info.cbSize = SCROLLINFO.sizeof;
- info.fMask = OS.SIF_POS;
- info.nPos = Math.max (0, pt.x - Tree.INSET / 2);
- OS.SetScrollInfo (hwndParent, OS.SB_HORZ, info, true);
- setScrollWidth ();
- }
- }
- }
- }
updateScrollBar ();
}
@@ -5313,18 +5370,49 @@ public void showColumn (TreeColumn column) {
OS.MapWindowPoints (hwndParent, handle, rect, 2);
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
- boolean scroll = headerRect.left < rect.left;
- if (!scroll) {
- int width = Math.min (rect.right - rect.left, headerRect.right - headerRect.left);
- scroll = headerRect.left + width > rect.right;
- }
- if (scroll) {
- SCROLLINFO info = new SCROLLINFO ();
+ /* bugfix for bug 566936: before this change, scroll to the right end was not implemented.
+ * Now it will be distinguished between
+ * (i) the left header is not in the client area
+ * (ii) the right header is not in the client area
+ * (iii) the client area is smaller than the header
+ *
+ * in case of (i),(iii) the scrollbar should be scrolled, so that the left side of the header is set to the begin of the client area
+ * in case of (ii) the scrollbar will be set, so that the right side of the header is set to the end of the client area.
+ *
+ * With this behaviour the header will only be moved so much, that it will be visible in the client area and not more than necessary.
+ * This is the same behaviour like in linux and on mac.*/
+ boolean scrollBecauseLeft = headerRect.left < rect.left;
+ boolean scrollBecauseRight = false;
+ if (!scrollBecauseLeft) {
+ int width = Math.min(rect.right - rect.left,
+ headerRect.right - headerRect.left);
+ scrollBecauseRight = headerRect.left + width > rect.right;
+ }
+ // in case header is wider than visual area, scroll to left position
+ if (scrollBecauseLeft || (headerRect.right
+ - headerRect.left > rect.right - rect.left)) {
+ SCROLLINFO info = new SCROLLINFO();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_POS;
- info.nPos = Math.max (0, headerRect.left - Tree.INSET / 2);
- OS.SetScrollInfo (hwndParent, OS.SB_HORZ, info, true);
- setScrollWidth ();
+ info.nPos = Math.max(0, headerRect.left - Tree.INSET / 2);
+ OS.SetScrollInfo(hwndParent, OS.SB_HORZ, info, true);
+ setScrollWidth();
+ } else if (scrollBecauseRight) {
+ SCROLLINFO info = new SCROLLINFO();
+ info.cbSize = SCROLLINFO.sizeof;
+ info.fMask = OS.SIF_POS;
+ int wideRect = rect.right - rect.left;
+ int wideHeader = headerRect.right - headerRect.left;
+ // calculation to scroll to the right
+ // info.nPos + wideRect = headerRect.right
+ // info.nPos + wideRect = headerRect.left + wideHeader
+ // info.nPos = headerRect.left + wideHeader - wideRect
+ info.nPos = Math.max(0, wideHeader + headerRect.left - wideRect
+ - Tree.INSET / 2);
+ info.nPos = Math.min(rect.right - Tree.INSET / 2, info.nPos);
+
+ OS.SetScrollInfo(hwndParent, OS.SB_HORZ, info, true);
+ setScrollWidth();
}
}
}
@@ -5368,17 +5456,17 @@ public void showItem (TreeItem item) {
*/
public void showSelection () {
checkWidget ();
- long /*int*/ hItem = 0;
+ long hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) == 0) return;
} else {
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- long /*int*/ hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hRoot = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
hItem = getNextSelection (hRoot);
} else {
//FIXME - this code expands first selected item it finds
@@ -5386,7 +5474,7 @@ public void showSelection () {
while (index <items.length) {
TreeItem item = items [index];
if (item != null) {
- int state = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETITEMSTATE, item.handle, OS.TVIS_SELECTED);
+ int state = (int)OS.SendMessage (handle, OS.TVM_GETITEMSTATE, item.handle, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) != 0) {
hItem = item.handle;
break;
@@ -5406,8 +5494,8 @@ public void showSelection () {
sort (OS.TVI_ROOT, false);
}
-void sort (long /*int*/ hParent, boolean all) {
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+void sort (long hParent, boolean all) {
+ int itemCount = (int)OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (itemCount == 0 || itemCount == 1) return;
hFirstIndexOf = hLastIndexOf = 0;
itemCount = -1;
@@ -5415,7 +5503,7 @@ void sort (long /*int*/ hParent, boolean all) {
OS.SendMessage (handle, OS.TVM_SORTCHILDREN, all ? 1 : 0, hParent);
} else {
Callback compareCallback = new Callback (this, "CompareFunc", 3);
- long /*int*/ lpfnCompare = compareCallback.getAddress ();
+ long lpfnCompare = compareCallback.getAddress ();
TVSORTCB psort = new TVSORTCB ();
psort.hParent = hParent;
psort.lpfnCompare = lpfnCompare;
@@ -5447,7 +5535,7 @@ RECT toolTipRect (RECT rect) {
@Override
String toolTipText (NMTTDISPINFO hdr) {
- long /*int*/ hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
+ long hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTipText != null) return ""; //$NON-NLS-1$
if (headerToolTipHandle == hdr.hwndFrom) {
for (int i=0; i<columnCount; i++) {
@@ -5482,7 +5570,7 @@ String toolTipText (NMTTDISPINFO hdr) {
}
@Override
-long /*int*/ topHandle () {
+long topHandle () {
return hwndParent != 0 ? hwndParent : handle;
}
@@ -5531,7 +5619,7 @@ void updateHeaderToolTips () {
void updateImageList () {
if (imageList == null) return;
if (hwndHeader == 0) return;
- int i = 0, index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ int i = 0, index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
while (i < items.length) {
TreeItem item = items [i];
if (item != null) {
@@ -5551,8 +5639,8 @@ void updateImageList () {
* times, Windows does work making this operation slow. The fix
* is to test for the same image list before setting the new one.
*/
- long /*int*/ hImageList = i == items.length ? 0 : imageList.getHandle ();
- long /*int*/ hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
+ long hImageList = i == items.length ? 0 : imageList.getHandle ();
+ long hOldImageList = OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0);
if (hImageList != hOldImageList) {
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
}
@@ -5615,8 +5703,7 @@ void updateOrientation () {
Point size = imageList.getImageSize ();
display.releaseImageList (imageList);
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, size.x, size.y);
- for (int i = 0; i < items.length; i++) {
- TreeItem item = items[i];
+ for (TreeItem item : items) {
if (item != null) {
Image image = item.image;
if (image != null) {
@@ -5625,7 +5712,7 @@ void updateOrientation () {
}
}
}
- long /*int*/ hImageList = imageList.getHandle ();
+ long hImageList = imageList.getHandle ();
OS.SendMessage (handle, OS.TVM_SETIMAGELIST, OS.TVSIL_NORMAL, hImageList);
}
if (hwndHeader != 0) {
@@ -5653,19 +5740,29 @@ void updateOrientation () {
}
}
}
- long /*int*/ hImageListHeader = headerImageList.getHandle ();
+ long hImageListHeader = headerImageList.getHandle ();
OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hImageListHeader);
}
}
}
+/**
+ * Copies Tree's scrollbar state to intermediate parent.
+ *
+ * If Tree has a header, then (Tree+header) get wrapped into intermediate
+ * parent. This parent also has scrollbar, and it is configured to
+ * obscure the Tree's scrollbar - I think this is due to aesthetic
+ * reasons where the new scrollbar also extends over header. Since it
+ * obscures the true scrollbar, it always needs to be in sync with the
+ * true scrollbar.
+ */
void updateScrollBar () {
if (hwndParent != 0) {
if (columnCount != 0 || scrollWidth != 0) {
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_ALL;
- int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
+ int itemCount = (int)OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0);
if (itemCount == 0) {
OS.GetScrollInfo (hwndParent, OS.SB_VERT, info);
info.nPage = info.nMax + 1;
@@ -5726,12 +5823,12 @@ TCHAR windowClass () {
}
@Override
-long /*int*/ windowProc () {
+long windowProc () {
return TreeProc;
}
@Override
-long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long windowProc (long hwnd, int msg, long wParam, long lParam) {
if (hwndHeader != 0 && hwnd == hwndHeader) {
switch (msg) {
case OS.WM_CONTEXTMENU: {
@@ -5773,7 +5870,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
OS.ScreenToClient (hwnd, pt);
pinfo.x = pt.x;
pinfo.y = pt.y;
- int index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
+ int index = (int)OS.SendMessage (hwndHeader, OS.HDM_HITTEST, 0, pinfo);
if (0 <= index && index < columnCount && !columns [index].resizable) {
if ((pinfo.flags & (OS.HHT_ONDIVIDER | OS.HHT_ONDIVOPEN)) != 0) {
OS.SetCursor (OS.LoadCursor (0, OS.IDC_ARROW));
@@ -5797,7 +5894,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
setScrollWidth ();
if (ignoreResize) return 0;
setResizeChildren (false);
- long /*int*/ code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
+ long code = callWindowProc (hwnd, OS.WM_SIZE, wParam, lParam);
sendEvent (SWT.Resize);
if (isDisposed ()) return 0;
if (layout != null) {
@@ -5854,7 +5951,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
info.nPos = info.nTrackPos;
}
OS.SetScrollInfo (handle, OS.SB_VERT, info, true);
- long /*int*/ code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
+ long code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
OS.GetScrollInfo (handle, OS.SB_VERT, info);
OS.SetScrollInfo (hwndParent, OS.SB_VERT, info, true);
return code;
@@ -5871,7 +5968,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
* selected.
*/
if ((style & SWT.MULTI) != 0 || hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
TreeItem [] items = new TreeItem [10];
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
@@ -5896,7 +5993,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
rect.left = Math.max (rect.left, clientRect.left);
rect.right = Math.min (rect.right, clientRect.right);
}
- long /*int*/ hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ long hRgn = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
for (int i = 1; i < count; i++) {
if (rect.bottom - rect.top > DRAG_IMAGE_SIZE) break;
if (rect.bottom > clientRect.bottom) break;
@@ -5908,7 +6005,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
itemRect.left = Math.max (itemRect.left, clientRect.left);
itemRect.right = Math.min (itemRect.right, clientRect.right);
}
- long /*int*/ rectRgn = OS.CreateRectRgn (itemRect.left, itemRect.top, itemRect.right, itemRect.bottom);
+ long rectRgn = OS.CreateRectRgn (itemRect.left, itemRect.top, itemRect.right, itemRect.bottom);
OS.CombineRgn (hRgn, hRgn, rectRgn, OS.RGN_OR);
OS.DeleteObject (rectRgn);
rect.bottom = itemRect.bottom;
@@ -5917,8 +6014,8 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
OS.GetRgnBox (hRgn, rect);
/* Create resources */
- long /*int*/ hdc = OS.GetDC (handle);
- long /*int*/ memHdc = OS.CreateCompatibleDC (hdc);
+ long hdc = OS.GetDC (handle);
+ long memHdc = OS.CreateCompatibleDC (hdc);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = rect.right - rect.left;
@@ -5928,10 +6025,10 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
bmiHeader.biCompression = OS.BI_RGB;
byte [] bmi = new byte [BITMAPINFOHEADER.sizeof];
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
- long /*int*/ [] pBits = new long /*int*/ [1];
- long /*int*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+ long [] pBits = new long [1];
+ long memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
- long /*int*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
+ long oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT ();
OS.SetWindowOrgEx (memHdc, rect.left, rect.top, pt);
@@ -5963,7 +6060,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
}
@Override
-LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_CHAR (long wParam, long lParam) {
LRESULT result = super.WM_CHAR (wParam, lParam);
if (result != null) return result;
/*
@@ -5975,9 +6072,9 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to avoid calling the tree window
* proc in these cases.
*/
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case ' ': {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
hAnchor = hItem;
OS.SendMessage (handle, OS.TVM_ENSUREVISIBLE, 0, hItem);
@@ -5995,8 +6092,8 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- long /*int*/ id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, hItem, 0);
- OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)/*64*/id);
+ long id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, hItem, 0);
+ OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)id);
}
tvItem.stateMask = OS.TVIS_SELECTED;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
@@ -6010,7 +6107,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
tvItem.state |= OS.TVIS_SELECTED;
}
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- TreeItem item = _getItem (hItem, (int)/*64*/tvItem.lParam);
+ TreeItem item = _getItem (hItem, (int)tvItem.lParam);
Event event = new Event ();
event.item = item;
sendSelectionEvent (SWT.Selection, event, false);
@@ -6033,7 +6130,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
* using NM_RETURN.
*/
Event event = new Event ();
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) event.item = _getItem (hItem);
sendSelectionEvent (SWT.DefaultSelection, event, false);
return LRESULT.ZERO;
@@ -6045,7 +6142,7 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_ERASEBKGND (long wParam, long lParam) {
LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
if ((style & SWT.DOUBLE_BUFFERED) != 0) return LRESULT.ONE;
if (findImageControl () != null) return LRESULT.ONE;
@@ -6053,7 +6150,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_GETOBJECT (long wParam, long lParam) {
/*
* Ensure that there is an accessible object created for this
* control because support for checked item and tree column
@@ -6067,7 +6164,7 @@ LRESULT WM_GETOBJECT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_HSCROLL (long wParam, long lParam) {
boolean fixScroll = false;
if ((style & SWT.DOUBLE_BUFFERED) != 0) {
fixScroll = (style & SWT.VIRTUAL) != 0 || hooks (SWT.EraseItem) || hooks (SWT.PaintItem);
@@ -6090,10 +6187,10 @@ LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KEYDOWN (long wParam, long lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_LEFT:
case OS.VK_RIGHT:
/*
@@ -6102,13 +6199,13 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to replace VK_LEFT by VK_RIGHT and VK_RIGHT by VK_LEFT
* when the current orientation differs from the orientation used to
* create the control.
- */
- boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
- if (isRTL != createdAsRTL) {
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
- return new LRESULT (code);
- }
- break;
+ */
+ boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
+ if (isRTL != createdAsRTL) {
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ return new LRESULT (code);
+ }
+ break;
case OS.VK_SPACE:
/*
* Ensure that the window proc does not process VK_SPACE
@@ -6141,17 +6238,17 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
if ((style & SWT.SINGLE) != 0) break;
if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
if (hAnchor == 0) hAnchor = hItem;
ignoreSelect = ignoreDeselect = true;
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
ignoreSelect = ignoreDeselect = false;
- long /*int*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_SELECTED;
- long /*int*/ hDeselectItem = hItem;
+ long hDeselectItem = hItem;
RECT rect1 = new RECT ();
if (!OS.TreeView_GetItemRect (handle, hAnchor, rect1, false)) {
hAnchor = hItem;
@@ -6165,7 +6262,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
hDeselectItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, flags, hDeselectItem);
}
- long /*int*/ hSelectItem = hAnchor;
+ long hSelectItem = hAnchor;
OS.TreeView_GetItemRect (handle, hNewItem, rect1, false);
OS.TreeView_GetItemRect (handle, hSelectItem, rect2, false);
tvItem.state = OS.TVIS_SELECTED;
@@ -6181,13 +6278,13 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
tvItem.hItem = hNewItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
Event event = new Event ();
- event.item = _getItem (hNewItem, (int)/*64*/tvItem.lParam);
+ event.item = _getItem (hNewItem, (int)tvItem.lParam);
sendSelectionEvent (SWT.Selection, event, false);
return new LRESULT (code);
}
}
if (OS.GetKeyState (OS.VK_CONTROL) < 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
@@ -6195,8 +6292,8 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
boolean oldSelected = (tvItem.state & OS.TVIS_SELECTED) != 0;
- long /*int*/ hNewItem = 0;
- switch ((int)/*64*/wParam) {
+ long hNewItem = 0;
+ switch ((int)wParam) {
case OS.VK_UP:
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PREVIOUSVISIBLE, hItem);
break;
@@ -6218,7 +6315,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
OS.GetClientRect (handle, clientRect);
hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
do {
- long /*int*/ hVisible = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNewItem);
+ long hVisible = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNewItem);
if (hVisible == 0) break;
if (!OS.TreeView_GetItemRect (handle, hVisible, rect, false)) break;
if (rect.bottom > clientRect.bottom) break;
@@ -6269,7 +6366,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
}
}
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_KEYDOWN, wParam, lParam);
hAnchor = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
return new LRESULT (code);
}
@@ -6278,7 +6375,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_KILLFOCUS (long wParam, long lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -6305,7 +6402,7 @@ LRESULT WM_KILLFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDBLCLK (long wParam, long lParam) {
TVHITTESTINFO lpht = new TVHITTESTINFO ();
lpht.x = OS.GET_X_LPARAM (lParam);
lpht.y = OS.GET_Y_LPARAM (lParam);
@@ -6315,8 +6412,8 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
if ((lpht.flags & OS.TVHT_ONITEMSTATEICON) != 0) {
Display display = this.display;
display.captureChanged = false;
- sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam);
- if (!sendMouseEvent (SWT.MouseDoubleClick, 1, handle, OS.WM_LBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, 1, handle, lParam);
+ if (!sendMouseEvent (SWT.MouseDoubleClick, 1, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
@@ -6339,10 +6436,10 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
}
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- long /*int*/ id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
- OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)/*64*/id);
+ long id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
+ OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)id);
Event event = new Event ();
- event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ event.item = _getItem (tvItem.hItem, (int)tvItem.lParam);
event.detail = SWT.CHECK;
sendSelectionEvent (SWT.Selection, event, false);
return LRESULT.ZERO;
@@ -6373,7 +6470,7 @@ LRESULT WM_LBUTTONDBLCLK (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_LBUTTONDOWN (long wParam, long lParam) {
/*
* In a multi-select tree, if the user is collapsing a subtree that
* contains selected items, clear the selection from these items and
@@ -6388,14 +6485,14 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (lpht.hItem == 0 || (lpht.flags & OS.TVHT_ONITEMBUTTON) != 0) {
Display display = this.display;
display.captureChanged = false;
- if (!sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseDown, 1, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
return LRESULT.ZERO;
}
boolean fixSelection = false, deselected = false;
- long /*int*/ hOldSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hOldSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (lpht.hItem != 0 && (style & SWT.MULTI) != 0) {
if (hOldSelection != 0) {
TVITEM tvItem = new TVITEM ();
@@ -6405,7 +6502,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if ((tvItem.state & OS.TVIS_EXPANDED) != 0) {
fixSelection = true;
tvItem.stateMask = OS.TVIS_SELECTED;
- long /*int*/ hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
+ long hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, lpht.hItem);
while (hNext != 0) {
if (hNext == hAnchor) hAnchor = 0;
tvItem.hItem = hNext;
@@ -6413,7 +6510,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if ((tvItem.state & OS.TVIS_SELECTED) != 0) deselected = true;
tvItem.state = 0;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- long /*int*/ hItem = hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNext);
+ long hItem = hNext = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_NEXTVISIBLE, hNext);
while (hItem != 0 && hItem != lpht.hItem) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, hItem);
}
@@ -6427,14 +6524,14 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
hSelect = lpht.hItem;
ignoreDeselect = ignoreSelect = lockSelection = true;
}
- long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
/* Bug 225404 */
if (OS.GetFocus () != handle) OS.SetFocus (handle);
if (fixSelection) {
hSelect = 0;
ignoreDeselect = ignoreSelect = lockSelection = false;
}
- long /*int*/ hNewSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hNewSelection = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hOldSelection != hNewSelection) hAnchor = hNewSelection;
if (dragStarted) {
if (!display.captureChanged && !isDisposed ()) {
@@ -6455,7 +6552,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.TVS_FULLROWSELECT) == 0) {
if (OS.SendMessage (handle, OS.TVM_GETIMAGELIST, OS.TVSIL_NORMAL, 0) == 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) {
RECT rect = new RECT ();
if (OS.TreeView_GetItemRect (handle, hItem, rect, false)) {
@@ -6478,7 +6575,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if ((lpht.flags & OS.TVHT_ONITEMSTATEICON) != 0) {
Display display = this.display;
display.captureChanged = false;
- if (!sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseDown, 1, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
@@ -6501,10 +6598,10 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
tvItem.state = state << 12;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
- long /*int*/ id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
- OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)/*64*/id);
+ long id = OS.SendMessage (handle, OS.TVM_MAPHTREEITEMTOACCID, tvItem.hItem, 0);
+ OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, handle, OS.OBJID_CLIENT, (int)id);
Event event = new Event ();
- event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ event.item = _getItem (tvItem.hItem, (int)tvItem.lParam);
event.detail = SWT.CHECK;
sendSelectionEvent (SWT.Selection, event, false);
return LRESULT.ZERO;
@@ -6539,13 +6636,13 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if ((lpht.flags & OS.TVHT_ONITEM) == 0) {
Display display = this.display;
display.captureChanged = false;
- if (!sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseDown, 1, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
return LRESULT.ZERO;
}
- long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
/* Bug 225404 */
if (OS.GetFocus () != handle) OS.SetFocus (handle);
if (!display.captureChanged && !isDisposed ()) {
@@ -6567,7 +6664,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
/* Get the selected state of the last selected item */
- long /*int*/ hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hOldItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if ((style & SWT.MULTI) != 0) {
tvItem.hItem = hOldItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
@@ -6597,7 +6694,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* In SWT, the InvalidateRect() that caused the pixel corruption
* is found in Composite.WM_UPDATEUISTATE().
*/
- int uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
+ int uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
if ((uiState & OS.UISF_HIDEFOCUS) != 0) {
OS.SendMessage (handle, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
}
@@ -6611,7 +6708,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
/* Do the selection */
Display display = this.display;
display.captureChanged = false;
- if (!sendMouseEvent (SWT.MouseDown, 1, handle, OS.WM_LBUTTONDOWN, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseDown, 1, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
@@ -6620,10 +6717,10 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
hSelect = lpht.hItem;
dragStarted = gestureCompleted = false;
ignoreDeselect = ignoreSelect = true;
- long /*int*/ code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
+ long code = callWindowProc (handle, OS.WM_LBUTTONDOWN, wParam, lParam);
/* Bug 225404 */
if (OS.GetFocus () != handle) OS.SetFocus (handle);
- long /*int*/ hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hNewItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (fakeSelection) {
if (hOldItem == 0 || (hNewItem == hOldItem && lpht.hItem != hOldItem)) {
OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_CARET, lpht.hItem);
@@ -6696,14 +6793,13 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if ((wParam & OS.MK_CONTROL) == 0) {
if (!hittestSelected || !dragStarted) {
tvItem.state = 0;
- long /*int*/ oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
+ long oldProc = OS.GetWindowLongPtr (handle, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (handle, OS.GWLP_WNDPROC, TreeProc);
if ((style & SWT.VIRTUAL) != 0) {
- long /*int*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
deselect (hItem, tvItem, hNewItem);
} else {
- for (int i=0; i<items.length; i++) {
- TreeItem item = items [i];
+ for (TreeItem item : items) {
if (item != null && item.handle != hNewItem) {
tvItem.hItem = item.handle;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
@@ -6722,7 +6818,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
if (OS.TreeView_GetItemRect (handle, hNewItem, rect2, false)) {
int flags = rect1.top < rect2.top ? OS.TVGN_NEXTVISIBLE : OS.TVGN_PREVIOUSVISIBLE;
tvItem.state = OS.TVIS_SELECTED;
- long /*int*/ hItem = tvItem.hItem = hAnchor;
+ long hItem = tvItem.hItem = hAnchor;
OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem);
while (hItem != hNewItem) {
tvItem.hItem = hItem;
@@ -6743,7 +6839,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
Event event = new Event ();
- event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ event.item = _getItem (tvItem.hItem, (int)tvItem.lParam);
sendSelectionEvent (SWT.Selection, event, false);
}
gestureCompleted = false;
@@ -6761,7 +6857,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
} else {
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.TVS_DISABLEDRAGDROP) == 0) {
- sendMouseEvent (SWT.MouseUp, 1, handle, OS.WM_LBUTTONUP, wParam, lParam);
+ sendMouseEvent (SWT.MouseUp, 1, handle, lParam);
}
}
dragStarted = false;
@@ -6769,7 +6865,7 @@ LRESULT WM_LBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEMOVE (long wParam, long lParam) {
Display display = this.display;
LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);
if (result != null) return result;
@@ -6819,21 +6915,21 @@ LRESULT WM_MOUSEMOVE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_MOUSEWHEEL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOUSEWHEEL (long wParam, long lParam) {
LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
return result;
}
@Override
-LRESULT WM_MOVE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_MOVE (long wParam, long lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
if (ignoreResize) return null;
return super.WM_MOVE (wParam, lParam);
}
@Override
-LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_RBUTTONDOWN (long wParam, long lParam) {
/*
* Feature in Windows. The receiver uses WM_RBUTTONDOWN
* to initiate a drag/drop operation depending on how the
@@ -6844,7 +6940,7 @@ LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
*/
Display display = this.display;
display.captureChanged = false;
- if (!sendMouseEvent (SWT.MouseDown, 3, handle, OS.WM_RBUTTONDOWN, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseDown, 3, handle, lParam)) {
if (!display.captureChanged && !isDisposed ()) {
if (OS.GetCapture () != handle) OS.SetCapture (handle);
}
@@ -6904,7 +7000,7 @@ LRESULT WM_RBUTTONDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_PAINT (long wParam, long lParam) {
if ((state & DISPOSE_SENT) != 0) return LRESULT.ZERO;
if (shrink && !ignoreShrink && items != null) {
@@ -6926,12 +7022,12 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
if ((style & SWT.DOUBLE_BUFFERED) != 0 || findImageControl () != null) {
boolean doubleBuffer = true;
if (explorerTheme) {
- int exStyle = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ int exStyle = (int)OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if ((exStyle & OS.TVS_EX_DOUBLEBUFFER) != 0) doubleBuffer = false;
}
if (doubleBuffer) {
GC gc = null;
- long /*int*/ paintDC = 0;
+ long paintDC = 0;
PAINTSTRUCT ps = new PAINTSTRUCT ();
boolean hooksPaint = hooks (SWT.Paint) || filters (SWT.Paint);
if (hooksPaint) {
@@ -6946,12 +7042,12 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
int width = ps.right - ps.left;
int height = ps.bottom - ps.top;
if (width != 0 && height != 0) {
- long /*int*/ hDC = OS.CreateCompatibleDC (paintDC);
+ long hDC = OS.CreateCompatibleDC (paintDC);
POINT lpPoint1 = new POINT (), lpPoint2 = new POINT ();
OS.SetWindowOrgEx (hDC, ps.left, ps.top, lpPoint1);
OS.SetBrushOrgEx (hDC, ps.left, ps.top, lpPoint2);
- long /*int*/ hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
- long /*int*/ hOldBitmap = OS.SelectObject (hDC, hBitmap);
+ long hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height);
+ long hOldBitmap = OS.SelectObject (hDC, hBitmap);
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
drawBackground (hDC, rect);
@@ -6983,7 +7079,7 @@ LRESULT WM_PAINT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETCURSOR (long wParam, long lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
@@ -7006,7 +7102,7 @@ LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFOCUS (long wParam, long lParam) {
/*
* Bug in Windows. When a tree item that has an image
* with alpha is expanded or collapsed, the area where
@@ -7033,7 +7129,7 @@ LRESULT WM_SETFOCUS (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETFONT (long wParam, long lParam) {
LRESULT result = super.WM_SETFONT (wParam, lParam);
if (result != null) return result;
if (hwndHeader != 0) {
@@ -7059,7 +7155,7 @@ LRESULT WM_SETFONT (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SETREDRAW (long wParam, long lParam) {
LRESULT result = super.WM_SETREDRAW (wParam, lParam);
if (result != null) return result;
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
@@ -7074,12 +7170,12 @@ LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
* NOTE: This problem is intermittent and happens on
* Windows Vista running under the theme manager.
*/
- long /*int*/ code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ long code = OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
return code == 0 ? LRESULT.ZERO : new LRESULT (code);
}
@Override
-LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SIZE (long wParam, long lParam) {
if (itemToolTipHandle != 0) OS.ShowWindow (itemToolTipHandle, OS.SW_HIDE);
/*
* Bug in Windows. When TVS_NOHSCROLL is set when the
@@ -7106,7 +7202,7 @@ LRESULT WM_SIZE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_SYSCOLORCHANGE (long wParam, long lParam) {
LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam);
if (result != null) return result;
/*
@@ -7123,7 +7219,7 @@ LRESULT WM_SYSCOLORCHANGE (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_VSCROLL (long wParam, long lParam) {
boolean fixScroll = false;
if ((style & SWT.DOUBLE_BUFFERED) != 0) {
int code = OS.LOWORD (wParam);
@@ -7156,7 +7252,7 @@ LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT WM_TIMER (long wParam, long lParam) {
LRESULT result = super.WM_TIMER (wParam, lParam);
if (result != null) return result;
@@ -7170,7 +7266,7 @@ LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
* Note: Just killing the timer could cause some internal clean up task related to the
* animation not to run.
*/
- long /*int*/ bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+ long bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
if ((bits & OS.TVS_EX_FADEINOUTEXPANDOS) != 0) {
if (!OS.IsWindowVisible (handle)) {
if (lastTimerID == wParam) {
@@ -7193,7 +7289,7 @@ LRESULT WM_TIMER (long /*int*/ wParam, long /*int*/ lParam) {
};
@Override
-LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmColorChild (long wParam, long lParam) {
if (findImageControl () != null) {
return new LRESULT (OS.GetStockObject (OS.NULL_BRUSH));
}
@@ -7208,12 +7304,12 @@ LRESULT wmColorChild (long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
- if (hdr.hwndFrom == itemToolTipHandle) {
+LRESULT wmNotify (NMHDR hdr, long wParam, long lParam) {
+ if (hdr.hwndFrom == itemToolTipHandle && itemToolTipHandle != 0) {
LRESULT result = wmNotifyToolTip (hdr, wParam, lParam);
if (result != null) return result;
}
- if (hdr.hwndFrom == hwndHeader) {
+ if (hdr.hwndFrom == hwndHeader && hwndHeader != 0) {
LRESULT result = wmNotifyHeader (hdr, wParam, lParam);
if (result != null) return result;
}
@@ -7221,7 +7317,7 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
@Override
-LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.TVN_GETDISPINFO: {
NMTVDISPINFO lptvdi = new NMTVDISPINFO ();
@@ -7248,7 +7344,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
*/
if (!ignoreShrink) {
if (items != null && lptvdi.lParam != -1) {
- if (items [(int)/*64*/lptvdi.lParam] != null && items [(int)/*64*/lptvdi.lParam].cached) {
+ if (items [(int)lptvdi.lParam] != null && items [(int)lptvdi.lParam].cached) {
checkVisible = false;
}
}
@@ -7277,14 +7373,14 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
* fix is to query the field from the item instead
* of using the struct.
*/
- int id = (int)/*64*/lptvdi.lParam;
+ int id = (int)lptvdi.lParam;
if ((style & SWT.VIRTUAL) != 0) {
if (id == -1) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = lptvdi.hItem;
OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
- id = (int)/*64*/tvItem.lParam;
+ id = (int)tvItem.lParam;
}
}
TreeItem item = _getItem (lptvdi.hItem, id);
@@ -7313,7 +7409,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
}
int index = 0;
if (hwndHeader != 0) {
- index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+ index = (int)OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
}
if ((lptvdi.mask & OS.TVIF_TEXT) != 0) {
String string = null;
@@ -7475,7 +7571,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
TVITEM tvItem = treeView.itemNew;
hAnchor = tvItem.hItem;
Event event = new Event ();
- event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ event.item = _getItem (tvItem.hItem, (int)tvItem.lParam);
sendSelectionEvent (SWT.Selection, event, false);
}
updateScrollBar ();
@@ -7511,7 +7607,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
* items. The fix is to check for null.
*/
if (items == null) break;
- TreeItem item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
+ TreeItem item = _getItem (tvItem.hItem, (int)tvItem.lParam);
if (item == null) break;
Event event = new Event ();
event.item = item;
@@ -7541,7 +7637,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to detect this case and run the TVN_ITEMEXPANDED
* code in this method.
*/
- long /*int*/ hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
+ long hFirstItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, tvItem.hItem);
runExpanded = hFirstItem == 0;
}
if (!runExpanded) break;
@@ -7609,7 +7705,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return super.wmNotifyChild (hdr, wParam, lParam);
}
-LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyHeader (NMHDR hdr, long wParam, long lParam) {
/*
* Feature in Windows. On NT, the automatically created
* header control is created as a UNICODE window, not an
@@ -7655,10 +7751,16 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
int pixel = getHeaderBackgroundPixel();
if ((nmcd.uItemState & OS.CDIS_SELECTED) != 0) {
pixel = getDifferentColor(pixel);
- } else if (columns[(int) nmcd.dwItemSpec] == sortColumn && sortDirection != SWT.NONE) {
- pixel = getSlightlyDifferentColor(pixel);
}
- long /*int*/ brush = OS.CreateSolidBrush(pixel);
+ /*
+ * Don't change the header background color for set selected column, similar to
+ * Windows 10 which itself does not use any different color for sort header. For
+ * more details refer bug 570468
+ */
+// else if (columns[(int) nmcd.dwItemSpec] == sortColumn && sortDirection != SWT.NONE) {
+// pixel = getSlightlyDifferentColor(pixel);
+// }
+ long brush = OS.CreateSolidBrush(pixel);
OS.FillRect(nmcd.hdc, rect, brush);
OS.DeleteObject(brush);
@@ -7683,8 +7785,8 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if (columns[i] == sortColumn && sortDirection != SWT.NONE) {
// the display.getSortImage looks terrible after scaling up.
- long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, 1, getHeaderForegroundPixel());
- long /*int*/ oldPen = OS.SelectObject (nmcd.hdc, pen);
+ long pen = OS.CreatePen (OS.PS_SOLID, 1, getHeaderForegroundPixel());
+ long oldPen = OS.SelectObject (nmcd.hdc, pen);
int center = rects[i].left + (rects[i].right - rects[i].left) / 2;
/*
* Sort indicator size needs to scale as per the Native Windows OS DPI level
@@ -7705,8 +7807,8 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
/* Windows 7 and 10 always draw a nearly invisible vertical line between the columns, even if lines are disabled.
This line uses no fixed color constant, but calculates it from the background color.
The method getSlightlyDifferentColor gives us a color, that is near enough to the windows algorithm. */
- long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, getGridLineWidthInPixels(), getSlightlyDifferentColor(getHeaderBackgroundPixel()));
- long /*int*/ oldPen = OS.SelectObject (nmcd.hdc, pen);
+ long pen = OS.CreatePen (OS.PS_SOLID, getGridLineWidthInPixels(), getSlightlyDifferentColor(getHeaderBackgroundPixel()));
+ long oldPen = OS.SelectObject (nmcd.hdc, pen);
OS.Polyline(nmcd.hdc, new int[] {rects[i].right-1, rects[i].top, rects[i].right-1, rects[i].bottom}, 2);
OS.SelectObject (nmcd.hdc, oldPen);
OS.DeleteObject (pen);
@@ -7760,15 +7862,15 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
// draw background of the 'no column' area
RECT rect = new RECT();
OS.SetRect(rect, lastColumnRight, nmcd.top, nmcd.right, nmcd.bottom-1);
- long /*int*/ brush = OS.CreateSolidBrush(getHeaderBackgroundPixel());
+ long brush = OS.CreateSolidBrush(getHeaderBackgroundPixel());
OS.FillRect(nmcd.hdc, rect, brush);
OS.DeleteObject(brush);
}
// always draw the highlighted border at the end, to avoid overdrawing by other borders.
if (highlightedHeaderDividerX != -1) {
- long /*int*/ pen = OS.CreatePen (OS.PS_SOLID, 4, OS.GetSysColor(OS.COLOR_HIGHLIGHT));
- long /*int*/ oldPen = OS.SelectObject (nmcd.hdc, pen);
+ long pen = OS.CreatePen (OS.PS_SOLID, 4, OS.GetSysColor(OS.COLOR_HIGHLIGHT));
+ long oldPen = OS.SelectObject (nmcd.hdc, pen);
OS.Polyline(nmcd.hdc, new int[] {highlightedHeaderDividerX, nmcd.top, highlightedHeaderDividerX, nmcd.bottom}, 2);
OS.SelectObject (nmcd.hdc, oldPen);
OS.DeleteObject (pen);
@@ -7816,7 +7918,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, columnCount, order);
int index = 0;
while (index < order.length) {
- if (order [index] == phdn.iItem) break;
+ if (order [index] == phdn.iItem) break;
index++;
}
if (index == order.length) index = 0;
@@ -7936,7 +8038,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNotifyToolTip (NMHDR hdr, long wParam, long lParam) {
switch (hdr.code) {
case OS.NM_CUSTOMDRAW: {
NMTTCUSTOMDRAW nmcd = new NMTTCUSTOMDRAW ();
@@ -7969,7 +8071,7 @@ LRESULT wmNotifyToolTip (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
+LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long lParam) {
switch (nmcd.dwDrawStage) {
case OS.CDDS_PREPAINT: {
if (isCustomToolTip ()) {
@@ -7993,10 +8095,10 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long /*int*/ lParam) {
OS.POINTSTOPOINT (pt, pos);
OS.ScreenToClient (handle, pt);
if (findCell (pt.x, pt.y, item, index, cellRect, itemRect)) {
- long /*int*/ hDC = OS.GetDC (handle);
- long /*int*/ hFont = item [0].fontHandle (index [0]);
+ long hDC = OS.GetDC (handle);
+ long hFont = item [0].fontHandle (index [0]);
if (hFont == -1) hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- long /*int*/ oldFont = OS.SelectObject (hDC, hFont);
+ long oldFont = OS.SelectObject (hDC, hFont);
boolean drawForeground = true;
cellRect [0] = item [0].getBounds (index [0], true, true, false, false, false, hDC);
if (hooks (SWT.EraseItem)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
index 1cd30929ad..495b10a756 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java
@@ -321,7 +321,7 @@ public int getWidth () {
int getWidthInPixels () {
int index = parent.indexOf (this);
if (index == -1) return 0;
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return 0;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -345,18 +345,18 @@ public void pack () {
int index = parent.indexOf (this);
if (index == -1) return;
int columnWidth = 0;
- long /*int*/ hwnd = parent.handle, hwndHeader = parent.hwndHeader;
+ long hwnd = parent.handle, hwndHeader = parent.hwndHeader;
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
- long /*int*/ hDC = OS.GetDC (hwnd);
- long /*int*/ oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+ long hDC = OS.GetDC (hwnd);
+ long oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM | OS.TVIF_STATE;
tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
while (tvItem.hItem != 0) {
OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
- TreeItem item = tvItem.lParam != -1 ? parent.items [(int)/*64*/tvItem.lParam] : null;
+ TreeItem item = tvItem.lParam != -1 ? parent.items [(int)tvItem.lParam] : null;
if (item != null) {
int itemRight = 0;
if (parent.hooks (SWT.MeasureItem)) {
@@ -366,7 +366,7 @@ public void pack () {
Rectangle bounds = event.getBoundsInPixels();
itemRight = bounds.x + bounds.width;
} else {
- long /*int*/ hFont = item.fontHandle (index);
+ long hFont = item.fontHandle (index);
if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
RECT itemRect = item.getBounds (index, true, true, false, false, false, hDC);
if (hFont != -1) OS.SelectObject (hDC, hFont);
@@ -395,7 +395,7 @@ public void pack () {
}
int margin = 0;
if (hwndHeader != 0) {
- margin = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
+ margin = (int)OS.SendMessage (hwndHeader, OS.HDM_GETBITMAPMARGIN, 0, 0);
} else {
margin = OS.GetSystemMetrics (OS.SM_CXEDGE) * 3;
}
@@ -493,7 +493,7 @@ public void setAlignment (int alignment) {
if (index == -1 || index == 0) return;
style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT;
@@ -504,7 +504,7 @@ public void setAlignment (int alignment) {
if ((style & SWT.RIGHT) == SWT.RIGHT) hdItem.fmt |= OS.HDF_RIGHT;
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (index != 0) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -530,7 +530,7 @@ public void setImage (Image image) {
void setImage (Image image, boolean sort, boolean right) {
int index = parent.indexOf (this);
if (index == -1) return;
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_FORMAT | OS.HDI_IMAGE | OS.HDI_BITMAP;
@@ -600,7 +600,7 @@ public void setResizable (boolean resizable) {
}
void setSortDirection (int direction) {
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
int index = parent.indexOf (this);
if (index == -1) return;
@@ -631,7 +631,7 @@ void setSortDirection (int direction) {
}
OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (OS.IsAppThemed ()) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
parent.forceResize ();
RECT rect = new RECT (), headerRect = new RECT ();
OS.GetClientRect (hwnd, rect);
@@ -658,17 +658,17 @@ public void setText (String string) {
* at the end of the text. The fix is to remove
* mnemonic characters.
*/
- long /*int*/ hHeap = OS.GetProcessHeap ();
+ long hHeap = OS.GetProcessHeap ();
char [] buffer = fixMnemonic (string);
int byteCount = buffer.length * TCHAR.sizeof;
- long /*int*/ pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ long pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
OS.MoveMemory (pszText, buffer, byteCount);
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_TEXT;
hdItem.pszText = pszText;
- long /*int*/ result = OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
+ long result = OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);
if (result == 0) error (SWT.ERROR_CANNOT_SET_TEXT);
}
@@ -703,7 +703,7 @@ public void setText (String string) {
public void setToolTipText (String string) {
checkWidget();
toolTipText = string;
- long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip == 0) {
parent.createHeaderToolTips ();
parent.updateHeaderToolTips ();
@@ -729,7 +729,7 @@ void setWidthInPixels (int width) {
if (width < 0) return;
int index = parent.indexOf (this);
if (index == -1) return;
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
@@ -738,7 +738,7 @@ void setWidthInPixels (int width) {
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
parent.forceResize ();
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
RECT rect = new RECT ();
OS.GetClientRect (hwnd, rect);
rect.left = headerRect.left;
@@ -747,9 +747,9 @@ void setWidthInPixels (int width) {
}
void updateToolTip (int index) {
- long /*int*/ hwndHeaderToolTip = parent.headerToolTipHandle;
+ long hwndHeaderToolTip = parent.headerToolTipHandle;
if (hwndHeaderToolTip != 0) {
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
RECT rect = new RECT ();
if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, rect) != 0) {
TOOLINFO lpti = new TOOLINFO ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index 1dd27b6dd0..308ab3297f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -50,7 +50,7 @@ public class TreeItem extends Item {
*
* @noreference This field is not intended to be referenced by clients.
*/
- public long /*int*/ handle;
+ public long handle;
Tree parent;
String [] strings;
Image [] images;
@@ -61,22 +61,14 @@ public class TreeItem extends Item {
int [] cellBackground, cellForeground;
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>)
- * and a style value describing its behavior and appearance.
- * The item is added to the end of the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as last direct child of the tree.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parent a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
@@ -91,26 +83,22 @@ public class TreeItem extends Item {
* @see Widget#getStyle
*/
public TreeItem (Tree parent, int style) {
- this (parent, style, OS.TVGN_ROOT, OS.TVI_LAST, 0);
+ this (parent, style, OS.TVI_ROOT, OS.TVI_LAST, 0);
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>),
- * a style value describing its behavior and appearance, and the index
- * at which to place it in the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as <code>index</code> direct child of the tree.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is:
+ * <ol>
+ * <li>Use {@link Tree#setRedraw} to disable drawing during bulk insert</li>
+ * <li>Insert every item at index 0 (insert them in reverse to get the same result)</li>
+ * <li>Collapse the parent item before inserting (gives massive improvement on Windows)</li>
+ * </ol>
*
* @param parent a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
* @param index the zero-relative index to store the receiver in its parent
*
* @exception IllegalArgumentException <ul>
@@ -125,28 +113,21 @@ public TreeItem (Tree parent, int style) {
* @see SWT
* @see Widget#checkSubclass
* @see Widget#getStyle
+ * @see Tree#setRedraw
*/
public TreeItem (Tree parent, int style, int index) {
- this (parent, style, OS.TVGN_ROOT, findPrevious (parent, index), 0);
+ this (parent, style, OS.TVI_ROOT, findPrevious (parent, index), 0);
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>)
- * and a style value describing its behavior and appearance.
- * The item is added to the end of the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as last direct child of the specified <code>TreeItem</code>.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parentItem a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
@@ -165,22 +146,14 @@ public TreeItem (TreeItem parentItem, int style) {
}
/**
- * Constructs a new instance of this class given its parent
- * (which must be a <code>Tree</code> or a <code>TreeItem</code>),
- * a style value describing its behavior and appearance, and the index
- * at which to place it in the items maintained by its parent.
+ * Constructs <code>TreeItem</code> and <em>inserts</em> it into <code>Tree</code>.
+ * Item is inserted as <code>index</code> direct child of the specified <code>TreeItem</code>.
* <p>
- * The style value is either one of the style constants defined in
- * class <code>SWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together
- * (that is, using the <code>int</code> "|" operator) two or more
- * of those <code>SWT</code> style constants. The class description
- * lists the style constants that are applicable to the class.
- * Style bits are also inherited from superclasses.
- * </p>
+ * The fastest way to insert many items is documented in {@link TreeItem#TreeItem(Tree,int,int)}
+ * and {@link TreeItem#setItemCount}
*
* @param parentItem a tree control which will be the parent of the new instance (cannot be null)
- * @param style the style of control to construct
+ * @param style no styles are currently supported, pass SWT.NONE
* @param index the zero-relative index to store the receiver in its parent
*
* @exception IllegalArgumentException <ul>
@@ -195,12 +168,13 @@ public TreeItem (TreeItem parentItem, int style) {
* @see SWT
* @see Widget#checkSubclass
* @see Widget#getStyle
+ * @see Tree#setRedraw
*/
public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, style, parentItem.handle, findPrevious (parentItem, index), 0);
}
-TreeItem (Tree parent, int style, long /*int*/ hParent, long /*int*/ hInsertAfter, long /*int*/ hItem) {
+TreeItem (Tree parent, int style, long hParent, long hInsertAfter, long hItem) {
super (parent, style);
this.parent = parent;
parent.createItem (this, hParent, hInsertAfter, hItem);
@@ -211,25 +185,25 @@ static TreeItem checkNull (TreeItem item) {
return item;
}
-static long /*int*/ findPrevious (Tree parent, int index) {
+static long findPrevious (Tree parent, int index) {
if (parent == null) return 0;
if (index < 0) SWT.error (SWT.ERROR_INVALID_RANGE);
if (index == 0) return OS.TVI_FIRST;
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- long /*int*/ hItem = parent.findItem (hFirstItem, index - 1);
+ long hwnd = parent.handle;
+ long hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
+ long hItem = parent.findItem (hFirstItem, index - 1);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
-static long /*int*/ findPrevious (TreeItem parentItem, int index) {
+static long findPrevious (TreeItem parentItem, int index) {
if (parentItem == null) return 0;
if (index < 0) SWT.error (SWT.ERROR_INVALID_RANGE);
if (index == 0) return OS.TVI_FIRST;
Tree parent = parentItem.parent;
- long /*int*/ hwnd = parent.handle, hParent = parentItem.handle;
- long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
- long /*int*/ hItem = parent.findItem (hFirstItem, index - 1);
+ long hwnd = parent.handle, hParent = parentItem.handle;
+ long hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);
+ long hItem = parent.findItem (hFirstItem, index - 1);
if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
return hItem;
}
@@ -245,7 +219,7 @@ void clear () {
strings = null;
images = null;
if ((parent.style & SWT.CHECK) != 0) {
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -285,8 +259,8 @@ void clear () {
*/
public void clear (int index, boolean all) {
checkWidget ();
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long hwnd = parent.handle;
+ long hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
hItem = parent.findItem (hItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
@@ -320,8 +294,8 @@ public void clear (int index, boolean all) {
*/
public void clearAll (boolean all) {
checkWidget ();
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long hwnd = parent.handle;
+ long hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
@@ -337,7 +311,7 @@ void destroyWidget () {
releaseHandle ();
}
-long /*int*/ fontHandle (int index) {
+long fontHandle (int index) {
if (cellFont != null && cellFont [index] != null) return cellFont [index].handle;
if (font != null) return font.handle;
return -1;
@@ -439,9 +413,9 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText)
}
//TODO - take into account grid (add boolean arg) to damage less during redraw
-RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText, boolean fullImage, boolean clip, long /*int*/ hDC) {
+RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText, boolean fullImage, boolean clip, long hDC) {
if (!getText && !getImage) return new RECT ();
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
@@ -453,7 +427,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
}
boolean firstColumn = index == 0;
int columnCount = 0;
- long /*int*/ hwndHeader = parent.hwndHeader;
+ long hwndHeader = parent.hwndHeader;
if (hwndHeader != 0) {
columnCount = parent.columnCount;
firstColumn = index == OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
@@ -525,7 +499,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
RECT textRect = new RECT ();
char [] buffer = string.toCharArray ();
int flags = OS.DT_NOPREFIX | OS.DT_SINGLELINE | OS.DT_CALCRECT;
- long /*int*/ hNewDC = hDC, hFont = 0;
+ long hNewDC = hDC, hFont = 0;
if (hDC == 0) {
hNewDC = OS.GetDC (hwnd);
hFont = fontHandle (index);
@@ -575,12 +549,12 @@ public boolean getChecked () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- long /*int*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ long result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && (((tvItem.state >> 12) & 1) == 0);
}
@@ -598,14 +572,14 @@ public boolean getChecked () {
*/
public boolean getExpanded () {
checkWidget ();
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
/*
* Bug in Windows. Despite the fact that TVM_GETITEMSTATE claims
* to return only the bits specified by the stateMask, when called
* with TVIS_EXPANDED, the entire state is returned. The fix is
* to explicitly check for the TVIS_EXPANDED bit.
*/
- int state = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
+ int state = (int)OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
return (state & OS.TVIS_EXPANDED) != 0;
}
@@ -709,12 +683,12 @@ public boolean getGrayed () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
tvItem.hItem = handle;
- long /*int*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ long result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
return (result != 0) && ((tvItem.state >> 12) > 2);
}
@@ -739,10 +713,10 @@ public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long hwnd = parent.handle;
+ long hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hFirstItem == 0) error (SWT.ERROR_INVALID_RANGE);
- long /*int*/ hItem = parent.findItem (hFirstItem, index);
+ long hItem = parent.findItem (hFirstItem, index);
if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);
return parent._getItem (hItem);
}
@@ -761,8 +735,8 @@ public TreeItem getItem (int index) {
public int getItemCount () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long hwnd = parent.handle;
+ long hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return 0;
return parent.getItemCount (hItem);
}
@@ -786,8 +760,8 @@ public int getItemCount () {
public TreeItem [] getItems () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long hwnd = parent.handle;
+ long hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return new TreeItem [0];
return parent.getItems (hItem);
}
@@ -879,8 +853,8 @@ public Tree getParent () {
*/
public TreeItem getParentItem () {
checkWidget ();
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
+ long hwnd = parent.handle;
+ long hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle);
return hItem != 0 ? parent._getItem (hItem) : null;
}
@@ -943,7 +917,7 @@ Rectangle getTextBoundsInPixels (int index) {
RECT rect = getBounds (index, true, false, true);
if (index == 0) rect.left += Tree.INSET - 1;
rect.left = Math.min (rect.left, rect.right);
- rect.right = rect.right - Tree.INSET;
+ rect.right = rect.right - Tree.INSET + 1; // Add 1 px margin to avoid truncation of text seen with "Segoe UI" font
int width = Math.max (0, rect.right - rect.left);
int height = Math.max (0, rect.bottom - rect.top);
return new Rectangle (rect.left, rect.top, width, height);
@@ -973,14 +947,14 @@ public int indexOf (TreeItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ long hwnd = parent.handle;
+ long hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
return hItem == 0 ? -1 : parent.findIndex (hItem, item.handle);
}
void redraw () {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
/*
* When there are no columns and the tree is not
@@ -1004,7 +978,7 @@ void redraw () {
void redraw (int column, boolean drawText, boolean drawImage) {
if (parent.currentItem == this || !parent.getDrawing ()) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if (!OS.IsWindowVisible (hwnd)) return;
boolean fullImage = column == 0 && drawText && drawImage;
RECT rect = getBounds (column, drawText, drawImage, true, fullImage, true, 0);
@@ -1049,20 +1023,33 @@ void releaseWidget () {
*/
public void removeAll () {
checkWidget ();
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM;
tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
- while (tvItem.hItem != 0) {
- OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
- TreeItem item = tvItem.lParam != -1 ? parent.items [(int)/*64*/tvItem.lParam] : null;
- if (item != null && !item.isDisposed ()) {
- item.dispose ();
- } else {
- parent.releaseItem (tvItem.hItem, tvItem, false);
- parent.destroyItem (null, tvItem.hItem);
+ /**
+ * Performance optimization, switch off redraw for high amount of elements
+ */
+ boolean disableRedraw = parent.itemCount > 30;
+ if (disableRedraw) {
+ parent.setRedraw(false);
+ }
+ try {
+ while (tvItem.hItem != 0) {
+ OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+ TreeItem item = tvItem.lParam != -1 ? parent.items [(int)tvItem.lParam] : null;
+ if (item != null && !item.isDisposed ()) {
+ item.dispose ();
+ } else {
+ parent.releaseItem (tvItem.hItem, tvItem, false);
+ parent.destroyItem (null, tvItem.hItem);
+ }
+ tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
+ }
+ } finally {
+ if (disableRedraw) {
+ parent.setRedraw(true);
}
- tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
}
}
@@ -1157,7 +1144,7 @@ public void setBackground (int index, Color color) {
public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1205,7 +1192,7 @@ public void setExpanded (boolean expanded) {
checkWidget ();
/* Do nothing when the item is a leaf or already expanded */
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
if (OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle) == 0) {
return;
}
@@ -1215,7 +1202,7 @@ public void setExpanded (boolean expanded) {
* with TVIS_EXPANDED, the entire state is returned. The fix is
* to explicitly check for the TVIS_EXPANDED bit.
*/
- int state = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
+ int state = (int)OS.SendMessage (hwnd, OS.TVM_GETITEMSTATE, handle, OS.TVIS_EXPANDED);
if (((state & OS.TVIS_EXPANDED) != 0) == expanded) return;
/*
@@ -1235,9 +1222,9 @@ public void setExpanded (boolean expanded) {
RECT [] rects = null;
SCROLLINFO oldInfo = null;
int count = 0;
- long /*int*/ hBottomItem = 0;
+ long hBottomItem = 0;
boolean redraw = false, noScroll = true;
- long /*int*/ hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
+ long hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (noScroll && hTopItem != 0) {
oldInfo = new SCROLLINFO ();
oldInfo.cbSize = SCROLLINFO.sizeof;
@@ -1247,9 +1234,9 @@ public void setExpanded (boolean expanded) {
}
if (parent.getDrawing () && OS.IsWindowVisible (hwnd)) {
boolean noAnimate = true;
- count = (int)/*64*/OS.SendMessage (hwnd, OS.TVM_GETVISIBLECOUNT, 0, 0);
+ count = (int)OS.SendMessage (hwnd, OS.TVM_GETVISIBLECOUNT, 0, 0);
rects = new RECT [count + 1];
- long /*int*/ hItem = hTopItem;
+ long hItem = hTopItem;
int index = 0;
while (hItem != 0 && (noAnimate || hItem != handle) && index < count) {
RECT rect = new RECT ();
@@ -1264,17 +1251,13 @@ public void setExpanded (boolean expanded) {
hBottomItem = hItem;
oldRect = new RECT ();
OS.GetClientRect (hwnd, oldRect);
- long /*int*/ topHandle = parent.topHandle ();
+ long topHandle = parent.topHandle ();
OS.UpdateWindow (topHandle);
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 0, 0);
if (hwnd != topHandle) {
OS.UpdateWindow (hwnd);
OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 0, 0);
}
- /*
- * This code is intentionally commented.
- */
-// OS.SendMessage (hwnd, OS.WM_SETREDRAW, 0, 0);
}
}
}
@@ -1291,7 +1274,7 @@ public void setExpanded (boolean expanded) {
* check whether the selection has changed and issue
* the event.
*/
- long /*int*/ hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hOldItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
/* Expand or collapse the item */
parent.ignoreExpand = true;
@@ -1319,7 +1302,7 @@ public void setExpanded (boolean expanded) {
newInfo.fMask = OS.SIF_ALL;
if (OS.GetScrollInfo (hwnd, OS.SB_HORZ, newInfo)) {
if (oldInfo.nPos != newInfo.nPos) {
- long /*int*/ lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
+ long lParam = OS.MAKELPARAM (OS.SB_THUMBPOSITION, oldInfo.nPos);
OS.SendMessage (hwnd, OS.WM_HSCROLL, lParam, 0);
}
}
@@ -1330,7 +1313,7 @@ public void setExpanded (boolean expanded) {
RECT newRect = new RECT ();
OS.GetClientRect (hwnd, newRect);
if (OS.EqualRect (oldRect, newRect)) {
- long /*int*/ hItem = hTopItem;
+ long hItem = hTopItem;
int index = 0;
while (hItem != 0 && index < count) {
RECT rect = new RECT ();
@@ -1345,15 +1328,11 @@ public void setExpanded (boolean expanded) {
fixScroll = index == count && hItem == hBottomItem;
}
}
- long /*int*/ topHandle = parent.topHandle ();
+ long topHandle = parent.topHandle ();
OS.DefWindowProc (topHandle, OS.WM_SETREDRAW, 1, 0);
if (hwnd != topHandle) {
OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
}
- /*
- * This code is intentionally commented.
- */
-// OS.SendMessage (hwnd, OS.WM_SETREDRAW, 1, 0);
if (fixScroll) {
parent.updateScrollBar ();
SCROLLINFO info = new SCROLLINFO ();
@@ -1376,7 +1355,7 @@ public void setExpanded (boolean expanded) {
}
/* Check for a selection event */
- long /*int*/ hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
+ long hNewItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hNewItem != hOldItem) {
Event event = new Event ();
if (hNewItem != 0) {
@@ -1424,7 +1403,7 @@ public void setFont (Font font){
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1479,7 +1458,7 @@ public void setFont (int index, Font font) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1581,7 +1560,7 @@ public void setForeground (int index, Color color){
public void setGrayed (boolean grayed) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
@@ -1690,7 +1669,7 @@ public void setImage (int index, Image image) {
if ((parent.style & SWT.VIRTUAL) == 0 &&!cached && !parent.painted) {
return;
}
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_IMAGE | OS.TVIF_SELECTEDIMAGE;
tvItem.hItem = handle;
@@ -1718,6 +1697,12 @@ public void setImage (Image image) {
/**
* Sets the number of child items contained in the receiver.
+ * <p>
+ * The fastest way to insert many items is:
+ * <ol>
+ * <li>Use {@link Tree#setRedraw} to disable drawing during bulk insert</li>
+ * <li>Collapse the parent item before inserting (gives massive improvement on Windows)</li>
+ * </ol>
*
* @param count the number of items
*
@@ -1731,9 +1716,7 @@ public void setImage (Image image) {
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
- long /*int*/ hwnd = parent.handle;
- long /*int*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
- parent.setItemCount (count, handle, hItem);
+ parent.setItemCount (count, handle);
}
/**
@@ -1804,7 +1787,7 @@ public void setText (int index, String string) {
if ((parent.style & SWT.VIRTUAL) == 0 && !cached && !parent.painted) {
return;
}
- long /*int*/ hwnd = parent.handle;
+ long hwnd = parent.handle;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;
tvItem.hItem = handle;
@@ -1827,4 +1810,12 @@ public void setText (String string) {
parent.sort (handle, false);
}
+@Override
+String getNameText () {
+ if ((parent.style & SWT.VIRTUAL) != 0) {
+ if (!cached) return "*virtual*"; //$NON-NLS-1$
+ }
+ return super.getNameText ();
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index d8b2584dcb..488cf58683 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Pierre-Yves B., pyvesdev@gmail.com - Bug 219750: [styled text] Typing ~~ inserts é~~
*******************************************************************************/
package org.eclipse.swt.widgets;
@@ -98,6 +99,9 @@ public abstract class Widget {
/* Bidi "auto" text direction */
static final int HAS_AUTO_DIRECTION = 1<<22;
+ /* Mouse cursor is over the widget flag */
+ static final int MOUSE_OVER = 1<<23;
+
/* Default size for widgets */
static final int DEFAULT_WIDTH = 64;
static final int DEFAULT_HEIGHT = 64;
@@ -111,13 +115,17 @@ public abstract class Widget {
/* Initialize the Common Controls DLL */
static {
- OS.InitCommonControls ();
+ INITCOMMONCONTROLSEX icce = new INITCOMMONCONTROLSEX ();
+ icce.dwSize = INITCOMMONCONTROLSEX.sizeof;
+ icce.dwICC = 0xffff;
+ OS.InitCommonControlsEx (icce);
}
/**
* Prevents uninitialized instances from being created outside the package.
*/
Widget () {
+ notifyCreationTracker();
}
/**
@@ -155,6 +163,7 @@ public Widget (Widget parent, int style) {
this.style = style;
display = parent.display;
reskinWidget ();
+ notifyCreationTracker();
}
void _addListener (int eventType, Listener listener) {
@@ -223,7 +232,7 @@ public void addDisposeListener (DisposeListener listener) {
addListener (SWT.Dispose, typedListener);
}
-long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+long callWindowProc (long hwnd, int msg, long wParam, long lParam) {
return 0;
}
@@ -290,6 +299,13 @@ void checkParent (Widget parent) {
parent.checkOpened ();
}
+void maybeEnableDarkSystemTheme(long handle) {
+ if (display.useDarkModeExplorerTheme) {
+ OS.AllowDarkModeForWindow(handle, true);
+ OS.SetWindowTheme(handle, Display.EXPLORER, null);
+ }
+}
+
/**
* Checks that this class can be subclassed.
* <p>
@@ -348,27 +364,7 @@ protected void checkSubclass () {
protected void checkWidget () {
Display display = this.display;
if (display == null) error (SWT.ERROR_WIDGET_DISPOSED);
- if (display.thread != Thread.currentThread ()) {
- /*
- * Bug in IBM JVM 1.6. For some reason, under
- * conditions that are yet to be full understood,
- * Thread.currentThread() is either returning null
- * or a different instance from the one that was
- * saved when the Display was created. This is
- * possibly a JIT problem because modifying this
- * method to print logging information when the
- * error happens seems to fix the problem. The
- * fix is to use operating system calls to verify
- * that the current thread is not the Display thread.
- *
- * NOTE: Despite the fact that Thread.currentThread()
- * is used in other places, the failure has not been
- * observed in all places where it is called.
- */
- if (display.threadId != OS.GetCurrentThreadId ()) {
- error (SWT.ERROR_THREAD_INVALID_ACCESS);
- }
- }
+ if (display.thread != Thread.currentThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED);
}
@@ -429,7 +425,7 @@ public void dispose () {
release (true);
}
-boolean dragDetect (long /*int*/ hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
+boolean dragDetect (long hwnd, int x, int y, boolean filter, boolean [] detect, boolean [] consume) {
if (consume != null) consume [0] = false;
if (detect != null) detect [0] = true;
POINT pt = new POINT ();
@@ -455,7 +451,7 @@ boolean filters (int eventType) {
return display.filters (eventType);
}
-Widget findItem (long /*int*/ id) {
+Widget findItem (long id) {
return null;
}
@@ -746,7 +742,7 @@ boolean isValidThread () {
return getDisplay ().isValidThread ();
}
-void mapEvent (long /*int*/ hwnd, Event event) {
+void mapEvent (long hwnd, Event event) {
}
GC new_GC (GCData data) {
@@ -808,23 +804,34 @@ void postEvent (int eventType, Event event) {
* @see #releaseWidget
*/
void release (boolean destroy) {
- if ((state & DISPOSE_SENT) == 0) {
- state |= DISPOSE_SENT;
- sendEvent (SWT.Dispose);
- }
- if ((state & DISPOSED) == 0) {
- releaseChildren (destroy);
- }
- if ((state & RELEASED) == 0) {
- state |= RELEASED;
- if (destroy) {
- releaseParent ();
- releaseWidget ();
- destroyWidget ();
- } else {
- releaseWidget ();
- releaseHandle ();
+ try (ExceptionStash exceptions = new ExceptionStash ()) {
+ if ((state & DISPOSE_SENT) == 0) {
+ state |= DISPOSE_SENT;
+ try {
+ sendEvent (SWT.Dispose);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
+ }
+ if ((state & DISPOSED) == 0) {
+ try {
+ releaseChildren (destroy);
+ } catch (Error | RuntimeException ex) {
+ exceptions.stash (ex);
+ }
}
+ if ((state & RELEASED) == 0) {
+ state |= RELEASED;
+ if (destroy) {
+ releaseParent ();
+ releaseWidget ();
+ destroyWidget ();
+ } else {
+ releaseWidget ();
+ releaseHandle ();
+ }
+ }
+ notifyDisposalTracker();
}
}
@@ -1097,23 +1104,23 @@ void sendSelectionEvent (int type, Event event, boolean send) {
sendEvent (type, event, send);
}
-boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+boolean sendKeyEvent (int type, int msg, long wParam, long lParam) {
Event event = new Event ();
if (!setKeyState (event, type, wParam, lParam)) return true;
return sendKeyEvent (type, msg, wParam, lParam, event);
}
-boolean sendKeyEvent (int type, int msg, long /*int*/ wParam, long /*int*/ lParam, Event event) {
+boolean sendKeyEvent (int type, int msg, long wParam, long lParam, Event event) {
sendEvent (type, event);
if (isDisposed ()) return false;
return event.doit;
}
-boolean sendMouseEvent (int type, int button, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
- return sendMouseEvent (type, button, display.getClickCount (type, button, hwnd, lParam), 0, false, hwnd, msg, wParam, lParam);
+boolean sendMouseEvent (int type, int button, long hwnd, long lParam) {
+ return sendMouseEvent (type, button, display.getClickCount (type, button, hwnd, lParam), 0, false, hwnd, lParam);
}
-boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, long /*int*/ hwnd, int msg, long /*int*/ wParam, long /*int*/ lParam) {
+boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, long hwnd, long lParam) {
if (!hooks (type) && !filters (type)) return true;
Event event = new Event ();
event.button = button;
@@ -1131,36 +1138,78 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
return event.doit;
}
-boolean sendMouseWheelEvent (int type, long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
- int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
- int detail = 0;
- if (type == SWT.MouseWheel) {
- int [] linesToScroll = new int [1];
- OS.SystemParametersInfo (OS.SPI_GETWHEELSCROLLLINES, 0, linesToScroll, 0);
- if (linesToScroll [0] == OS.WHEEL_PAGESCROLL) {
- detail = SWT.SCROLL_PAGE;
+class MouseWheelData {
+ MouseWheelData (boolean isVertical, ScrollBar scrollBar, long wParam, Point remainder) {
+ /* WHEEL_DELTA is expressed in precision units, see OS.WHEEL_DELTA */
+ int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
+
+ /* Wheel speed can be configured in Windows mouse settings */
+ if (isVertical) {
+ int [] wheelSpeed = new int [1];
+ OS.SystemParametersInfo (OS.SPI_GETWHEELSCROLLLINES, 0, wheelSpeed, 0);
+ if (wheelSpeed [0] == OS.WHEEL_PAGESCROLL) {
+ detail = SWT.SCROLL_PAGE;
+ } else {
+ delta *= wheelSpeed [0];
+ detail = SWT.SCROLL_LINE;
+ }
} else {
- detail = SWT.SCROLL_LINE;
- delta *= linesToScroll [0];
+ int [] wheelSpeed = new int [1];
+ OS.SystemParametersInfo (OS.SPI_GETWHEELSCROLLCHARS, 0, wheelSpeed, 0);
+ delta *= wheelSpeed [0];
+
+ /* For legacy compatibility reasons, detail is set to 0 here */
+ detail = 0;
}
- /* Check if the delta and the remainder have the same direction (sign) */
- if ((delta ^ display.scrollRemainder) >= 0) delta += display.scrollRemainder;
- display.scrollRemainder = delta % OS.WHEEL_DELTA;
- } else {
- /* Check if the delta and the remainder have the same direction (sign) */
- if ((delta ^ display.scrollHRemainder) >= 0) delta += display.scrollHRemainder;
- display.scrollHRemainder = delta % OS.WHEEL_DELTA;
- delta = -delta;
+ /* Take scrollbar scrolling speed into account */
+ if (scrollBar != null) {
+ if (detail == SWT.SCROLL_PAGE) {
+ delta *= scrollBar.getPageIncrement ();
+ } else {
+ delta *= scrollBar.getIncrement ();
+ }
+ }
+
+ /*
+ * Accumulate remainder to deal with fractional scrolls. This is only seen
+ * on some devices which support "smooth scrolling". MSDN also says:
+ * The remainder must be zeroed when the wheel rotation switches
+ * directions or when window focus changes.
+ */
+ if (isVertical) {
+ if ((delta ^ remainder.y) >= 0) delta += remainder.y;
+ remainder.y = delta % OS.WHEEL_DELTA;
+ } else {
+ if ((delta ^ remainder.x) >= 0) delta += remainder.x;
+ remainder.x = delta % OS.WHEEL_DELTA;
+ }
+
+ /* Finally, divide by WHEEL_DELTA */
+ count = delta / OS.WHEEL_DELTA;
}
+ int count; // lines or pages scrolled
+ int detail; // {0, SWT.SCROLL_PAGE, SWT.SCROLL_LINE}
+}
+
+boolean sendMouseWheelEvent (int type, long hwnd, long wParam, long lParam) {
if (!hooks (type) && !filters (type)) return true;
- int count = delta / OS.WHEEL_DELTA;
+
+ boolean vertical = (type == SWT.MouseWheel);
+ MouseWheelData wheelData = new MouseWheelData (vertical, null, wParam, display.scrollRemainderEvt);
+
+ if (wheelData.count == 0) return true;
+
+ /* Legacy code. I wonder if any SWT application actually cares? */
+ if (!vertical)
+ wheelData.count = -wheelData.count;
+
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, lParam);
OS.ScreenToClient (hwnd, pt);
lParam = OS.MAKELPARAM (pt.x, pt.y);
- return sendMouseEvent (type, 0, count, detail, true, hwnd, OS.WM_MOUSEWHEEL, wParam, lParam);
+ return sendMouseEvent (type, 0, wheelData.count, wheelData.detail, true, hwnd, lParam);
}
/**
@@ -1318,7 +1367,7 @@ boolean setInputState (Event event, int type) {
return true;
}
-boolean setKeyState (Event event, int type, long /*int*/ wParam, long /*int*/ lParam) {
+boolean setKeyState (Event event, int type, long wParam, long lParam) {
/*
* Feature in Windows. When the user presses Ctrl+Backspace
@@ -1382,7 +1431,7 @@ boolean setKeyState (Event event, int type, long /*int*/ wParam, long /*int*/ lP
return setInputState (event, type);
}
-int setLocationMask (Event event, int type, long /*int*/ wParam, long /*int*/ lParam) {
+int setLocationMask (Event event, int type, long wParam, long lParam) {
int location = SWT.NONE;
if (display.lastVirtual) {
switch (display.lastKey) {
@@ -1479,13 +1528,13 @@ void updateMenuLocation (Event event) {
/* Do nothing */
}
-LRESULT wmCaptureChanged (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmCaptureChanged (long hwnd, long wParam, long lParam) {
display.captureChanged = true;
return null;
}
-LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
- display.lastAscii = (int)/*64*/wParam;
+LRESULT wmChar (long hwnd, long wParam, long lParam) {
+ display.lastAscii = (int)wParam;
display.lastNull = wParam == 0;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_CHAR, wParam, lParam)) {
return LRESULT.ONE;
@@ -1494,7 +1543,7 @@ LRESULT wmChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmContextMenu (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmContextMenu (long hwnd, long wParam, long lParam) {
if (wParam != hwnd) return null;
/*
@@ -1530,10 +1579,10 @@ LRESULT wmContextMenu (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPar
return showMenu (x, y, detail) ? LRESULT.ZERO : null;
}
-LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmIMEChar (long hwnd, long wParam, long lParam) {
Display display = this.display;
display.lastKey = 0;
- display.lastAscii = (int)/*64*/wParam;
+ display.lastAscii = (int)wParam;
display.lastVirtual = display.lastNull = display.lastDead = false;
if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
return LRESULT.ONE;
@@ -1544,10 +1593,10 @@ LRESULT wmIMEChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
return LRESULT.ONE;
}
-LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmKeyDown (long hwnd, long wParam, long lParam) {
/* Ignore repeating modifier keys by testing key down state */
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -1562,7 +1611,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
display.lastVirtual = display.lastNull = display.lastDead = false;
/* Map the virtual key */
- int mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
+ int mapKey = OS.MapVirtualKey ((int)wParam, 2);
/*
* Feature in Windows. For Devanagari and Bengali numbers,
* MapVirtualKey() returns the localized number instead of
@@ -1575,7 +1624,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* NOTE: VK_0 to VK_9 are the same as ASCII.
*/
if (('\u09e6' <= mapKey && mapKey <= '\u09ef') || ('\u0966' <= mapKey && mapKey <= '\u096f')) {
- mapKey = (int)/*64*/wParam;
+ mapKey = (int)wParam;
}
/*
@@ -1596,11 +1645,11 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
if ((mapKey & 0x80000000) != 0) return null;
MSG msg = new MSG ();
- int flags = OS.PM_NOREMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
+ int flags = OS.PM_NOREMOVE | OS.PM_NOYIELD;
if (OS.PeekMessage (msg, hwnd, OS.WM_DEADCHAR, OS.WM_DEADCHAR, flags)) {
display.lastDead = true;
display.lastVirtual = mapKey == 0;
- display.lastKey = display.lastVirtual ? (int)/*64*/wParam : mapKey;
+ display.lastKey = display.lastVirtual ? (int)wParam : mapKey;
return null;
}
@@ -1637,9 +1686,9 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* they are not virtual. Therefore it is necessary to force
* numeric keypad keys to be virtual.
*/
- display.lastVirtual = mapKey == 0 || display.numpadKey ((int)/*64*/wParam) != 0;
+ display.lastVirtual = mapKey == 0 || display.numpadKey ((int)wParam) != 0;
if (display.lastVirtual) {
- display.lastKey = (int)/*64*/wParam;
+ display.lastKey = (int)wParam;
/*
* Feature in Windows. The virtual key VK_DELETE is not
* treated as both a virtual key and an ASCII key by Windows.
@@ -1677,7 +1726,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* upper case values in WM_KEYDOWN despite the fact that the
* Shift was not pressed.
*/
- display.lastKey = (int)/*64*/OS.CharLower ((short) mapKey);
+ display.lastKey = (int)OS.CharLower ((short) mapKey);
/*
* Feature in Windows. The virtual key VK_CANCEL is treated
@@ -1696,7 +1745,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* WM_CHAR. If this is the case, issue the key down event from
* inside WM_CHAR.
*/
- int asciiKey = display.asciiKey ((int)/*64*/wParam);
+ int asciiKey = display.asciiKey ((int)wParam);
if (asciiKey != 0) {
/*
* When the user types Ctrl+Space, ToAscii () maps this to
@@ -1706,7 +1755,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* issue the event from WM_CHAR.
*/
if (asciiKey == ' ') return null;
- if (asciiKey != (int)/*64*/wParam) return null;
+ if (asciiKey != (int)wParam) return null;
/*
* Feature in Windows. The virtual key VK_CANCEL is treated
* as both a virtual key and ASCII key by Windows. This
@@ -1732,12 +1781,12 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* If the user types Ctrl+Shift+6, the value of LastAscii will
* depend on the international keyboard.
*/
- if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
- display.lastAscii = display.shiftedKey ((int)/*64*/wParam);
+ if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
+ display.lastAscii = display.shiftedKey ((int)wParam);
if (display.lastAscii == 0) display.lastAscii = mapKey;
- } else {
- display.lastAscii = (int)/*64*/OS.CharLower ((short) mapKey);
- }
+ } else {
+ display.lastAscii = (int)OS.CharLower ((short) mapKey);
+ }
/* Note that Ctrl+'@' is ASCII NUL and is delivered in WM_CHAR */
if (display.lastAscii == '@') return null;
@@ -1750,7 +1799,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
return null;
}
-LRESULT wmKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmKeyUp (long hwnd, long wParam, long lParam) {
Display display = this.display;
/*
@@ -1764,7 +1813,7 @@ LRESULT wmKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
}
/* Map the virtual key. */
- int mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
+ int mapKey = OS.MapVirtualKey ((int)wParam, 2);
/*
* Bug in Windows 95 and NT. When the user types an accent key such
@@ -1784,9 +1833,9 @@ LRESULT wmKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
* they are not virtual. Therefore it is necessary to force
* numeric keypad keys to be virtual.
*/
- display.lastVirtual = mapKey == 0 || display.numpadKey ((int)/*64*/wParam) != 0;
+ display.lastVirtual = mapKey == 0 || display.numpadKey ((int)wParam) != 0;
if (display.lastVirtual) {
- display.lastKey = (int)/*64*/wParam;
+ display.lastKey = (int)wParam;
} else {
/*
* Feature in Windows. The virtual key VK_CANCEL is treated
@@ -1812,9 +1861,17 @@ LRESULT wmKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return result;
}
-LRESULT wmKillFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
- display.scrollRemainder = display.scrollHRemainder = 0;
- long /*int*/ code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
+LRESULT wmKillFocus (long hwnd, long wParam, long lParam) {
+ /*
+ * MSDN says: The remainder must be zeroed when the wheel rotation switches
+ * directions or when window focus changes.
+ */
+ display.scrollRemainderEvt.x = 0;
+ display.scrollRemainderEvt.y = 0;
+ display.scrollRemainderBar.x = 0;
+ display.scrollRemainderBar.y = 0;
+
+ long code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusOut);
// widget could be disposed at this point
@@ -1830,7 +1887,7 @@ LRESULT wmKillFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam
return new LRESULT (code);
}
-LRESULT wmLButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmLButtonDblClk (long hwnd, long wParam, long lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -1847,8 +1904,8 @@ LRESULT wmLButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
- sendMouseEvent (SWT.MouseDown, 1, hwnd, OS.WM_LBUTTONDOWN, wParam, lParam);
- if (sendMouseEvent (SWT.MouseDoubleClick, 1, hwnd, OS.WM_LBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, 1, hwnd, lParam);
+ if (sendMouseEvent (SWT.MouseDoubleClick, 1, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_LBUTTONDBLCLK, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -1859,7 +1916,7 @@ LRESULT wmLButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
return result;
}
-LRESULT wmLButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmLButtonDown (long hwnd, long wParam, long lParam) {
Display display = this.display;
LRESULT result = null;
int x = OS.GET_X_LPARAM (lParam);
@@ -1883,7 +1940,7 @@ LRESULT wmLButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPar
mouseDown = OS.GetKeyState (OS.VK_LBUTTON) < 0;
}
display.captureChanged = false;
- boolean dispatch = sendMouseEvent (SWT.MouseDown, 1, count, 0, false, hwnd, OS.WM_LBUTTONDOWN, wParam, lParam);
+ boolean dispatch = sendMouseEvent (SWT.MouseDown, 1, count, 0, false, hwnd, lParam);
if (dispatch && (consume == null || !consume [0])) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_LBUTTONDOWN, wParam, lParam));
} else {
@@ -1926,10 +1983,10 @@ LRESULT wmLButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPar
return result;
}
-LRESULT wmLButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmLButtonUp (long hwnd, long wParam, long lParam) {
Display display = this.display;
LRESULT result = null;
- if (sendMouseEvent (SWT.MouseUp, 1, hwnd, OS.WM_LBUTTONUP, wParam, lParam)) {
+ if (sendMouseEvent (SWT.MouseUp, 1, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_LBUTTONUP, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -1948,7 +2005,7 @@ LRESULT wmLButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam
return result;
}
-LRESULT wmMButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMButtonDblClk (long hwnd, long wParam, long lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -1965,8 +2022,8 @@ LRESULT wmMButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
- sendMouseEvent (SWT.MouseDown, 2, hwnd, OS.WM_MBUTTONDOWN, wParam, lParam);
- if (sendMouseEvent (SWT.MouseDoubleClick, 2, hwnd, OS.WM_MBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, 2, hwnd, lParam);
+ if (sendMouseEvent (SWT.MouseDoubleClick, 2, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_MBUTTONDBLCLK, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -1977,11 +2034,11 @@ LRESULT wmMButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
return result;
}
-LRESULT wmMButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMButtonDown (long hwnd, long wParam, long lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
- if (sendMouseEvent (SWT.MouseDown, 2, hwnd, OS.WM_MBUTTONDOWN, wParam, lParam)) {
+ if (sendMouseEvent (SWT.MouseDown, 2, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_MBUTTONDOWN, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -1992,10 +2049,10 @@ LRESULT wmMButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPar
return result;
}
-LRESULT wmMButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMButtonUp (long hwnd, long wParam, long lParam) {
Display display = this.display;
LRESULT result = null;
- if (sendMouseEvent (SWT.MouseUp, 2, hwnd, OS.WM_MBUTTONUP, wParam, lParam)) {
+ if (sendMouseEvent (SWT.MouseUp, 2, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_MBUTTONUP, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -2014,27 +2071,28 @@ LRESULT wmMButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam
return result;
}
-LRESULT wmMouseHover (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
- if (!sendMouseEvent (SWT.MouseHover, 0, hwnd, OS.WM_MOUSEHOVER, wParam, lParam)) {
+LRESULT wmMouseHover (long hwnd, long wParam, long lParam) {
+ if (!sendMouseEvent (SWT.MouseHover, 0, hwnd, lParam)) {
return LRESULT.ZERO;
}
return null;
}
-LRESULT wmMouseLeave (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMouseLeave (long hwnd, long wParam, long lParam) {
+ state &= ~MOUSE_OVER;
if (!hooks (SWT.MouseExit) && !filters (SWT.MouseExit)) return null;
int pos = OS.GetMessagePos ();
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, pos);
OS.ScreenToClient (hwnd, pt);
lParam = OS.MAKELPARAM (pt.x, pt.y);
- if (!sendMouseEvent (SWT.MouseExit, 0, hwnd, OS.WM_MOUSELEAVE, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseExit, 0, hwnd, lParam)) {
return LRESULT.ZERO;
}
return null;
}
-LRESULT wmMouseMove (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMouseMove (long hwnd, long wParam, long lParam) {
LRESULT result = null;
Display display = this.display;
int pos = OS.GetMessagePos ();
@@ -2046,36 +2104,29 @@ LRESULT wmMouseMove (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam
if (trackMouse || mouseEnter || mouseExit || mouseHover) {
TRACKMOUSEEVENT lpEventTrack = new TRACKMOUSEEVENT ();
lpEventTrack.cbSize = TRACKMOUSEEVENT.sizeof;
- lpEventTrack.dwFlags = OS.TME_QUERY;
+ lpEventTrack.dwFlags = OS.TME_LEAVE | OS.TME_HOVER;
lpEventTrack.hwndTrack = hwnd;
OS.TrackMouseEvent (lpEventTrack);
- if (lpEventTrack.dwFlags == 0) {
- lpEventTrack.dwFlags = OS.TME_LEAVE | OS.TME_HOVER;
- lpEventTrack.hwndTrack = hwnd;
- OS.TrackMouseEvent (lpEventTrack);
- if (mouseEnter) {
- /*
- * Force all outstanding WM_MOUSELEAVE messages to be dispatched before
- * issuing a mouse enter. This causes mouse exit events to be processed
- * before mouse enter events. Note that WM_MOUSELEAVE is posted to the
- * event queue by TrackMouseEvent().
- */
- MSG msg = new MSG ();
- int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
- while (OS.PeekMessage (msg, 0, OS.WM_MOUSELEAVE, OS.WM_MOUSELEAVE, flags)) {
- OS.TranslateMessage (msg);
- OS.DispatchMessage (msg);
- }
- sendMouseEvent (SWT.MouseEnter, 0, hwnd, OS.WM_MOUSEMOVE, wParam, lParam);
+ if (mouseEnter && (state & MOUSE_OVER) == 0) {
+ /*
+ * Force all outstanding WM_MOUSELEAVE messages to be dispatched before
+ * issuing a mouse enter. This causes mouse exit events to be processed
+ * before mouse enter events. Note that WM_MOUSELEAVE is posted to the
+ * event queue by TrackMouseEvent().
+ */
+ MSG msg = new MSG ();
+ int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
+ while (OS.PeekMessage (msg, 0, OS.WM_MOUSELEAVE, OS.WM_MOUSELEAVE, flags)) {
+ OS.TranslateMessage (msg);
+ OS.DispatchMessage (msg);
}
- } else {
- lpEventTrack.dwFlags = OS.TME_HOVER;
- OS.TrackMouseEvent (lpEventTrack);
+ sendMouseEvent (SWT.MouseEnter, 0, hwnd, lParam);
}
+ state |= MOUSE_OVER;
}
if (pos != display.lastMouse) {
display.lastMouse = pos;
- if (!sendMouseEvent (SWT.MouseMove, 0, hwnd, OS.WM_MOUSEMOVE, wParam, lParam)) {
+ if (!sendMouseEvent (SWT.MouseMove, 0, hwnd, lParam)) {
result = LRESULT.ZERO;
}
}
@@ -2084,19 +2135,19 @@ LRESULT wmMouseMove (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam
return result;
}
-LRESULT wmMouseWheel (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMouseWheel (long hwnd, long wParam, long lParam) {
return sendMouseWheelEvent(SWT.MouseWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
}
-LRESULT wmMouseHWheel (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmMouseHWheel (long hwnd, long wParam, long lParam) {
return sendMouseWheelEvent(SWT.MouseHorizontalWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
}
-LRESULT wmNCPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmNCPaint (long hwnd, long wParam, long lParam) {
return null;
}
-LRESULT wmPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmPaint (long hwnd, long wParam, long lParam) {
/* Exit early - don't draw the background */
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) {
@@ -2104,9 +2155,9 @@ LRESULT wmPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
}
/* Issue a paint event */
- long /*int*/ rgn = OS.CreateRectRgn (0, 0, 0, 0);
+ long rgn = OS.CreateRectRgn (0, 0, 0, 0);
OS.GetUpdateRgn (hwnd, rgn, false);
- long /*int*/ result = callWindowProc (hwnd, OS.WM_PAINT, wParam, lParam);
+ long result = callWindowProc (hwnd, OS.WM_PAINT, wParam, lParam);
GCData data = new GCData ();
data.hwnd = hwnd;
GC gc = new_GC (data);
@@ -2117,7 +2168,7 @@ LRESULT wmPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
if (width != 0 && height != 0) {
- long /*int*/ hDC = gc.handle;
+ long hDC = gc.handle;
OS.SelectClipRgn (hDC, rgn);
OS.SetMetaRgn (hDC);
Event event = new Event ();
@@ -2135,7 +2186,7 @@ LRESULT wmPaint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return new LRESULT (result);
}
-LRESULT wmPrint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmPrint (long hwnd, long wParam, long lParam) {
/*
* Bug in Windows. When WM_PRINT is used to print the contents
* of a control that has WS_EX_CLIENTEDGE, the old 3D border is
@@ -2146,7 +2197,7 @@ LRESULT wmPrint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
if (OS.IsAppThemed ()) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
if ((bits & OS.WS_EX_CLIENTEDGE) != 0) {
- long /*int*/ code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
+ long code = callWindowProc (hwnd, OS.WM_PRINT, wParam, lParam);
RECT rect = new RECT ();
OS.GetWindowRect (hwnd, rect);
rect.right -= rect.left;
@@ -2162,7 +2213,7 @@ LRESULT wmPrint (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
return null;
}
-LRESULT wmRButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmRButtonDblClk (long hwnd, long wParam, long lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2179,8 +2230,8 @@ LRESULT wmRButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
- sendMouseEvent (SWT.MouseDown, 3, hwnd, OS.WM_RBUTTONDOWN, wParam, lParam);
- if (sendMouseEvent (SWT.MouseDoubleClick, 3, hwnd, OS.WM_RBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, 3, hwnd, lParam);
+ if (sendMouseEvent (SWT.MouseDoubleClick, 3, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_RBUTTONDBLCLK, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -2191,11 +2242,11 @@ LRESULT wmRButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
return result;
}
-LRESULT wmRButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmRButtonDown (long hwnd, long wParam, long lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
- if (sendMouseEvent (SWT.MouseDown, 3, hwnd, OS.WM_RBUTTONDOWN, wParam, lParam)) {
+ if (sendMouseEvent (SWT.MouseDown, 3, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_RBUTTONDOWN, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -2206,10 +2257,10 @@ LRESULT wmRButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPar
return result;
}
-LRESULT wmRButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmRButtonUp (long hwnd, long wParam, long lParam) {
Display display = this.display;
LRESULT result = null;
- if (sendMouseEvent (SWT.MouseUp, 3, hwnd, OS.WM_RBUTTONUP, wParam, lParam)) {
+ if (sendMouseEvent (SWT.MouseUp, 3, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_RBUTTONUP, wParam, lParam));
} else {
/* Call the DefWindowProc() to support WM_CONTEXTMENU */
@@ -2230,8 +2281,8 @@ LRESULT wmRButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam
return result;
}
-LRESULT wmSetFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
- long /*int*/ code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
+LRESULT wmSetFocus (long hwnd, long wParam, long lParam) {
+ long code = callWindowProc (hwnd, OS.WM_SETFOCUS, wParam, lParam);
sendFocusEvent (SWT.FocusIn);
// widget could be disposed at this point
@@ -2247,9 +2298,9 @@ LRESULT wmSetFocus (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
return new LRESULT (code);
}
-LRESULT wmSysChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmSysChar (long hwnd, long wParam, long lParam) {
Display display = this.display;
- display.lastAscii = (int)/*64*/wParam;
+ display.lastAscii = (int)wParam;
display.lastNull = wParam == 0;
/* Do not issue a key down if a menu bar mnemonic was invoked */
@@ -2260,7 +2311,7 @@ LRESULT wmSysChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
/* Call the window proc to determine whether it is a system key or mnemonic */
boolean oldKeyHit = display.mnemonicKeyHit;
display.mnemonicKeyHit = true;
- long /*int*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
+ long result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
boolean consumed = false;
if (!display.mnemonicKeyHit) {
consumed = !sendKeyEvent (SWT.KeyDown, OS.WM_SYSCHAR, wParam, lParam);
@@ -2271,7 +2322,7 @@ LRESULT wmSysChar (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
return consumed ? LRESULT.ONE : new LRESULT (result);
}
-LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmSysKeyDown (long hwnd, long wParam, long lParam) {
/*
* Feature in Windows. When WM_SYSKEYDOWN is sent,
* the user pressed ALT+<key> or F10 to get to the
@@ -2286,9 +2337,9 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
}
/* Ignore well known system keys */
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_F4: {
- long /*int*/ hwndShell = hwnd;
+ long hwndShell = hwnd;
while (OS.GetParent (hwndShell) != 0) {
if (OS.GetWindow (hwndShell, OS.GW_OWNER) != 0) break;
hwndShell = OS.GetParent (hwndShell);
@@ -2299,7 +2350,7 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
}
/* Ignore repeating modifier keys by testing key down state */
- switch ((int)/*64*/wParam) {
+ switch ((int)wParam) {
case OS.VK_SHIFT:
case OS.VK_MENU:
case OS.VK_CONTROL:
@@ -2314,11 +2365,11 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
display.lastVirtual = display.lastNull = display.lastDead = false;
/* If are going to get a WM_SYSCHAR, ignore this message. */
- int mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
+ int mapKey = OS.MapVirtualKey ((int)wParam, 2);
- display.lastVirtual = mapKey == 0 || display.numpadKey ((int)/*64*/wParam) != 0;
+ display.lastVirtual = mapKey == 0 || display.numpadKey ((int)wParam) != 0;
if (display.lastVirtual) {
- display.lastKey = (int)/*64*/wParam;
+ display.lastKey = (int)wParam;
/*
* Feature in Windows. The virtual key VK_DELETE is not
* treated as both a virtual key and an ASCII key by Windows.
@@ -2355,7 +2406,7 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
* upper case values in WM_SYSKEYDOWN despite the fact that the
* Shift was not pressed.
*/
- display.lastKey = (int)/*64*/OS.CharLower ((short) mapKey);
+ display.lastKey = (int)OS.CharLower ((short) mapKey);
return null;
}
@@ -2366,11 +2417,11 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
return null;
}
-LRESULT wmSysKeyUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmSysKeyUp (long hwnd, long wParam, long lParam) {
return wmKeyUp (hwnd, wParam, lParam);
}
-LRESULT wmXButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmXButtonDblClk (long hwnd, long wParam, long lParam) {
/*
* Feature in Windows. Windows sends the following
* messages when the user double clicks the mouse:
@@ -2388,8 +2439,8 @@ LRESULT wmXButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
Display display = this.display;
display.captureChanged = false;
int button = OS.HIWORD (wParam) == OS.XBUTTON1 ? 4 : 5;
- sendMouseEvent (SWT.MouseDown, button, hwnd, OS.WM_XBUTTONDOWN, wParam, lParam);
- if (sendMouseEvent (SWT.MouseDoubleClick, button, hwnd, OS.WM_XBUTTONDBLCLK, wParam, lParam)) {
+ sendMouseEvent (SWT.MouseDown, button, hwnd, lParam);
+ if (sendMouseEvent (SWT.MouseDoubleClick, button, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_XBUTTONDBLCLK, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -2400,13 +2451,13 @@ LRESULT wmXButtonDblClk (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lP
return result;
}
-LRESULT wmXButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmXButtonDown (long hwnd, long wParam, long lParam) {
LRESULT result = null;
Display display = this.display;
display.captureChanged = false;
display.xMouse = true;
int button = OS.HIWORD (wParam) == OS.XBUTTON1 ? 4 : 5;
- if (sendMouseEvent (SWT.MouseDown, button, hwnd, OS.WM_XBUTTONDOWN, wParam, lParam)) {
+ if (sendMouseEvent (SWT.MouseDown, button, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_XBUTTONDOWN, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -2417,11 +2468,11 @@ LRESULT wmXButtonDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPar
return result;
}
-LRESULT wmXButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam) {
+LRESULT wmXButtonUp (long hwnd, long wParam, long lParam) {
Display display = this.display;
LRESULT result = null;
int button = OS.HIWORD (wParam) == OS.XBUTTON1 ? 4 : 5;
- if (sendMouseEvent (SWT.MouseUp, button, hwnd, OS.WM_XBUTTONUP, wParam, lParam)) {
+ if (sendMouseEvent (SWT.MouseUp, button, hwnd, lParam)) {
result = new LRESULT (callWindowProc (hwnd, OS.WM_XBUTTONUP, wParam, lParam));
} else {
result = LRESULT.ZERO;
@@ -2439,4 +2490,17 @@ LRESULT wmXButtonUp (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam
}
return result;
}
+
+void notifyCreationTracker() {
+ if (WidgetSpy.isEnabled) {
+ WidgetSpy.getInstance().widgetCreated(this);
+ }
+}
+
+void notifyDisposalTracker() {
+ if (WidgetSpy.isEnabled) {
+ WidgetSpy.getInstance().widgetDisposed(this);
+ }
+}
+
}
diff --git a/bundles/org.eclipse.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt/META-INF/MANIFEST.MF
index 9bced32983..e17013ede2 100644
--- a/bundles/org.eclipse.swt/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt; singleton:=true
-Bundle-Version: 3.110.100.qualifier
+Bundle-Version: 3.119.100.qualifier
Bundle-ManifestVersion: 2
Bundle-Localization: plugin
DynamicImport-Package: org.eclipse.swt.accessibility2
@@ -15,13 +15,13 @@ Export-Package:
org.eclipse.swt.dnd,
org.eclipse.swt.events,
org.eclipse.swt.graphics,
+ org.eclipse.swt.internal;x-friends:="org.eclipse.ui,org.eclipse.swt.tools.spies",
+ org.eclipse.swt.internal.image;x-internal:=true,
org.eclipse.swt.layout,
org.eclipse.swt.opengl,
org.eclipse.swt.printing,
org.eclipse.swt.program,
- org.eclipse.swt.widgets,
- org.eclipse.swt.internal; x-friends:="org.eclipse.ui",
- org.eclipse.swt.internal.image; x-internal:=true
+ org.eclipse.swt.widgets
Eclipse-ExtensibleAPI: true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.swt
diff --git a/bundles/org.eclipse.swt/META-INF/p2.inf b/bundles/org.eclipse.swt/META-INF/p2.inf
index 9fe76ac2ca..110a883181 100644
--- a/bundles/org.eclipse.swt/META-INF/p2.inf
+++ b/bundles/org.eclipse.swt/META-INF/p2.inf
@@ -24,3 +24,13 @@ requires.5.namespace = org.eclipse.equinox.p2.iu
requires.5.name = org.eclipse.swt.gtk.linux.ppc64le
requires.5.range = [$version$,$version$]
requires.5.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=ppc64le)(!(org.eclipse.swt.buildtime=true)))
+
+requires.6.namespace = org.eclipse.equinox.p2.iu
+requires.6.name = org.eclipse.swt.gtk.linux.aarch64
+requires.6.range = [$version$,$version$]
+requires.6.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=aarch64)(!(org.eclipse.swt.buildtime=true)))
+
+requires.7.namespace = org.eclipse.equinox.p2.iu
+requires.7.name = org.eclipse.swt.cocoa.macosx.aarch64
+requires.7.range = [$version$,$version$]
+requires.7.filter = (&(osgi.os=macosx)(osgi.ws=cocoa)(osgi.arch=aarch64)(!(org.eclipse.swt.buildtime=true)))
diff --git a/bundles/org.eclipse.swt/Readme.Linux.md b/bundles/org.eclipse.swt/Readme.Linux.md
new file mode 100644
index 0000000000..e5503abf54
--- /dev/null
+++ b/bundles/org.eclipse.swt/Readme.Linux.md
@@ -0,0 +1,44 @@
+# About
+
+The SWT Linux port is based on the GTK.
+
+The natives are build using make and (by default) gcc.
+
+# Development overview
+SWT is made up of 2 parts, Java and the natives (written in C).
+
+* **Java Part**
+If you only make changes in the Java part or need to configure SWT for running
+snippets, then you don't need to recompile the natives, instead, you can just
+use the pre-compiled libraries in the binary repository.
+
+* **Natives Part**
+Make sure the binary project for your platform is imported and open in your
+workspace.
+
+## Building Natives
+
+### Building 64bit natives for GTK3
+
+You need to install the following on your system:
+
+* make
+* gcc
+* GTK+ development files (gtk3-devel)
+* Java 8 or 11 JDK
+* (optional) Webkit for GTK development files (webkit2gtk3-devel)
+
+### Building and Testing locally
+
+Import and build the SWT project `bundles/org.eclipse.swt` in Eclipse. See the
+platform independent Readme for how to set the .classpath. This will populate
+the `bundles/org.eclipse.swt/bin/library` with the native code and build files.
+
+To build SWT natives run the `build.sh` script in `./bin/library` directory. To
+use the locally build natives run the build script with the 'install' argument
+(`./build.sh install`) or --help to see more options.
+
+You can find additional information on GTK SWT development can be found in
+Eclipse Wiki.
+
+https://wiki.eclipse.org/SWT/Devel/Gtk/Dev_guide
diff --git a/bundles/org.eclipse.swt/Readme.WebView2.md b/bundles/org.eclipse.swt/Readme.WebView2.md
new file mode 100644
index 0000000000..55b52d210c
--- /dev/null
+++ b/bundles/org.eclipse.swt/Readme.WebView2.md
@@ -0,0 +1,162 @@
+# WebView2 Support for SWT
+
+WebView2 is a runtime component that provides an embeddable version of
+Microsoft Edge.
+
+WebView2 component is available from multiple sources:
+
+* A stand-alone auto-updating runtime component with a choice of
+ web and offline installers.
+ (https://developer.microsoft.com/en-us/microsoft-edge/webview2/)
+
+* A fixed-version archive with all the necessary files that can be bundled
+ with the application.
+ (Same link as above).
+
+* Beta/Dev/Canary version of the Edge browser.
+ (https://www.microsoftedgeinsider.com/en-us/download). This isn't suitable
+ for production use, but might be necessary to test new pre-release
+ features.
+
+ _Note_: Stable Edge browser installations *don't* provide a WebView2 component.
+
+See also: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution.
+
+## Using WebView2
+
+There are no extra dependencies beyond the WebView2 runtime itself.
+
+On Windows, the default `Browser` backend is Internet Explorer.
+To use the WebView2 backend, pass the `SWT.EDGE` style flag when creating
+a `Browser` instance. Alternatively, set the system property
+`org.eclipse.swt.browser.DefaultType` to `edge` to globally change the
+default. (Non-Windows platforms will ignore this value).
+
+_Note_: If WebView2 backend is requested but the runtime isn't found,
+the `Browser` will automatically fall back to the Internet Explorer backend.
+
+### Browser Directory
+
+WebView2 backend will automatically locate runtimes and Edge installations.
+The path to the Edge binary directory can also be set manually using the
+`org.eclipse.swt.browser.EdgeDir` system property. This is also
+required when bundling fixed-version WebView2 binaries.
+
+### User Directory
+
+WebView creates a user data directory to stores caches and
+persistent data like cookies and localStorage. All WebView2 instances in
+an application and all instances of the same application share this directory.
+
+The default user directory location is `%LOCALAPPDATA%\<AppName>\WebView2`,
+where `<AppName>` is defined with `Display.setAppName()`. This location can
+be overridden on a per-process basis by setting the
+`org.eclipse.swt.browser.EdgeDataDir` system property.
+
+See also: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/userdatafolder
+
+### Other System Properties
+
+The property `org.eclipse.swt.browser.EdgeArgs` defines command line
+arguments to be passed directly to the Chromium process.
+For a list of available arguments (unofficial) see
+https://peter.sh/experiments/chromium-command-line-switches/.
+
+The property `org.eclipse.swt.browser.EdgeLanguage` is a language or
+language+country code that defines the browser UI language and preferred
+language for HTTP requests (`Accept-Languages` header).
+Example values: `en`, `ja`, `en-GB`, `de-AT`.
+
+_Note_: All of the properties described above must be set before the first
+instance of the `Browser` with `SWT.EDGE` style is created.
+
+Informational property `org.eclipse.swt.browser.EdgeVersion` contains the
+version of the browser currently in use.
+
+## Limitation and Caveats
+
+Due to API mismatch between SWT and WebView2, some features are limited or
+not available.
+
+* `AuthenticationListener`<br/>
+ Unsupported. Missing upstream API.
+ (https://github.com/MicrosoftEdge/WebView2Feedback/issues/120).
+
+* `StatusTextListener`<br/>
+ Unsupported. Conceptually obsolete.
+
+* `VisibilityWindowListener.hide`<br/>
+ Unsupported. Conceptually obsolete.
+
+* `ProgressListener.changed`<br/>
+ Unsupported. Missing upstream API.
+
+* `ProgressListener.completed`<br/>
+ Fires for the top level document only.
+ On Edge version 88 and later it matches the `DOMContentLoaded` event, on earlier
+ versions it matches the `load` event.
+
+* `LocationListener.changing`, `OpenWindowListener.open`<br/>
+ These events may return values and have to run synchronously.
+ Calling `evaluate()` and `getText()` from their handlers is impossible
+ and will throw an exception.
+ (This can only be fixed by exposing the asynchronous `evaluate()` method).
+
+* `LocationListener.changed`<br/>
+ Fires for the top document only. Doesn't fire when using `setText()` (TODO).
+
+* `KeyListener`, `MouseListener`<br/>
+ Unsupported. Missing upstream API.
+ (https://github.com/MicrosoftEdge/WebView2Feedback/issues/112).
+ Emulation with script callbacks is possible.
+
+* `evaluate(String script, boolean trusted)`<br/>
+ The parameter `trusted` is ignored. Everything runs in the same security
+ context scoped to a given user directory.
+
+* `execute(String script)`<br/>
+ Execution is always asynchronous. You can't observe evaluation effects
+ immediately after the `execute()` call. See `evaluate()` for synchronous
+ script evaluation.
+
+* `getText()`<br/>
+ Returns the live contents of HTML document as seen by the browser.
+ This can differ from what was set with `setText()` due to browser processing
+ and script execution.<br/>
+ _Note_: Implemented as `evaluate("return document.documentElement.outerHTML")`.
+
+* `setText()`<br/>
+ This method uses `data:` URLs internally (WebView2 implementation detail)
+ and these URLs might appear in the `LocationEvent.url` field.
+
+* `getCookie()`, `setCookie()`<br/>
+ Unsupported. WebView doesn't have a global cookie manager. Cookie access
+ is provided by individual browser views and required `Browser` API additions.
+
+* `setUrl(String url, String postData, String[] headers)`<br/>
+ The parameters `headers` and `postData` require Edge 88 or later
+ (currently in Beta).
+
+* `close()`<br/>
+ Unsupported. Missing upstream API.
+
+## Known issues in WebView2
+
+* When using `OpenWindowListener`, calling `window.open()` with an invalid URL
+ might glitch the WebView.
+ (https://github.com/MicrosoftEdge/WebView2Feedback/issues/762).
+
+## Potential API additions
+
+Here are some potentially useful WebView2 features that could be exposed through
+API additions, `Widget.setData` or system properties:
+
+* An option to delete the user data directory on exit.
+* Getting and setting page zoom.
+* Options to disable: page zoom, dev tools, built-in context menus,
+ built-in error pages, microphone, camera, geolocation, notifications, sensors,
+ clipboard access.
+* An option to provide own script dialogs (alert/confirm/prompt).
+* `Window.postMessage()` communication as a clean, asynchronous alternative
+ to `BrowserFunction`.
+* Access to request/response headers and body.
diff --git a/bundles/org.eclipse.swt/Readme.Win32.md b/bundles/org.eclipse.swt/Readme.Win32.md
index 696f3a0bbd..a0764e3d31 100644
--- a/bundles/org.eclipse.swt/Readme.Win32.md
+++ b/bundles/org.eclipse.swt/Readme.Win32.md
@@ -4,7 +4,7 @@ The document is structured so that you only need to read up to the point that yo
The SWT windows port is based on the Win32 api.
-The natives are compiled via an ant build.xml script with the Microsoft Visual Studio (2017) C++ compiler.
+The natives are compiled via an ant build.xml script with the Microsoft Visual Studio (2019) C++ compiler.
# Development overview
SWT is made up of 2 parts, Java and the natives (written in C).
@@ -21,7 +21,7 @@ libraries in the binary repository.
* Download & install Java *JDK* (Last tested on JDK9) http://www.oracle.com/technetwork/java/javase/downloads/index.html
* Download and install Eclipse. Either the "Eclipse IDE for Eclipse Committers" or a recent integration build:
- http://download.eclipse.org/eclipse/downloads/
+ https://download.eclipse.org/eclipse/downloads/
* (Optionally) install CDT from marketplace if you want to work on C/Native parts of SWT.
* (if not already installed) installed EGit integration.
* Open the git perspective. Add the following two repositories, which can be found on: (use git protocol)
@@ -37,16 +37,16 @@ libraries in the binary repository.
## (Advanced) Building Natives.
### Building just 64bit natives with no Webkit
-(Last Tested on Win10 64 bit & Java 9. March 2018):
+(Last tested on Win10 64 bit & Java 11. May 2019):
You need to install the following on your system:
* Microsoft Visual Studio - Community and Windows 10 SDK: (1*)
- https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15
- (I can't remember which components I installed, I cliked on items that seemed relevant for C/C++ development.
- I also installed the linux, but that might not be needed. My installation was around 20GB).
+ https://visualstudio.microsoft.com/vs/community/
+ Either select the components "MSVC C++-x64/x86-Buildtools" and "Windows 10 SDK"
+ or the workload "Desktop development with C++" which includes the required components and some more.
* (Optional) Install Cygwin
-* Install Java 8 or 9. Oracle JDK or IBM JDK:
+* Install Java 8 or 11. Oracle JDK or IBM JDK:
http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html
https://developer.ibm.com/javasdk/downloads/
@@ -56,7 +56,7 @@ In the binary git repo, in the windows project, you can build the natives via th
* In Eclipse, in the binary project org.eclipse.swt.win32.win32.x86_64, right click on build.xml:
* Run As -> Ant Build ...
-* on the Targets tab check the build_libraries target (it should be the only one check for just the natives).
+* On the Targets tab check the build_libraries target (it should be the only one check for just the natives).
* On the JRE tab select "Run in the same JRE as the workspace"
* On the Refresh tab check "Refresh resources upon completion" to refresh your workspace after running the build; this ensures that Eclipse will pick up the fresh binaries
* Press the "Run" button to begin.
diff --git a/bundles/org.eclipse.swt/Readme.macOS.md b/bundles/org.eclipse.swt/Readme.macOS.md
index c3f1cfa3e7..7d03cac9ce 100644
--- a/bundles/org.eclipse.swt/Readme.macOS.md
+++ b/bundles/org.eclipse.swt/Readme.macOS.md
@@ -54,6 +54,7 @@ Once done with that, go back into the `org.eclipse.swt` bundle directory and exe
gen_bridge_metadata_complete CoreFoundation > '<org.eclipse.swt>/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport'
gen_bridge_metadata_complete CoreText > '<org.eclipse.swt>/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport'
gen_bridge_metadata_complete Foundation > '<org.eclipse.swt>/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport'
+ gen_bridge_metadata_complete QuartzCore > '<org.eclipse.swt>/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/QuartzCoreFull.bridgesupport'
gen_bridge_metadata_complete SecurityInterface > '<org.eclipse.swt>/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SecurityInterfaceFull.bridgesupport'
gen_bridge_metadata_complete WebKit.framework > '<org.eclipse.swt>/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport'
diff --git a/bundles/org.eclipse.swt/build.xml b/bundles/org.eclipse.swt/build.xml
index 479b69e7df..1f827e446b 100644
--- a/bundles/org.eclipse.swt/build.xml
+++ b/bundles/org.eclipse.swt/build.xml
@@ -18,7 +18,7 @@
<target name="init">
<property name="plugin" value="org.eclipse.swt" />
- <property name="version.suffix" value="3.110.0" />
+ <property name="version.suffix" value="3.118.100" />
<property name="full.name" value="${plugin}_${version.suffix}" />
<property name="temp.folder" value="${basedir}/temp.folder" />
<property name="plugin.destination" value="${basedir}" />
diff --git a/bundles/org.eclipse.swt/buildFragment.xml b/bundles/org.eclipse.swt/buildFragment.xml
index 180c92ca32..5a12f3e94e 100644
--- a/bundles/org.eclipse.swt/buildFragment.xml
+++ b/bundles/org.eclipse.swt/buildFragment.xml
@@ -8,7 +8,7 @@
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
-
+
Contributors:
IBM Corporation - initial API and implementation
-->
@@ -28,20 +28,7 @@
<property name="destination" value="${fragmentdir}/target" />
<property name="javacVerbose" value="false" />
<property name="logExtension" value=".xml" />
- <property name="javacSource" value="1.8" />
- <property name="javacTarget" value="1.8" />
- <condition property="bootclasspath" value="">
- <equals arg1="${swt.os}" arg2="macosx"/>
- </condition>
- <path id="path_bootclasspath">
- <fileset dir="${java.home}/lib">
- <include name="*.jar" />
- </fileset>
- </path>
- <property name="bootclasspath" refid="path_bootclasspath" />
- <property name="bundleJavacSource" value="${javacSource}" />
- <property name="bundleJavacTarget" value="${javacTarget}" />
- <property name="bundleBootClasspath" value="${bootclasspath}" />
+ <property name="javacRelease" value="11" />
<condition property="p2.publish.parts" value="true">
<istrue value="${p2.gathering}" />
</condition>
@@ -66,12 +53,14 @@
<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
<property name="destdir" value="${temp.folder}/@dot.bin" />
<property name="debug" value="true" />
- <property name="jar.filename" value="swt.jar" />
+ <property name="swtbasename" value="swt" />
+ <property name="jar.filename" value="${swtbasename}.jar" />
<delete dir="${temp.folder}/@dot.bin" />
<mkdir dir="${temp.folder}/@dot.bin" />
<antcall target="copy.${swt.ws}.src"/>
- <javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
+ <javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="yes" release="${javacRelease}" encoding="UTF-8" includeantruntime="false">
<src path="${temp.folder}/@dot.src/"/>
+ <classpath path="${dotcp}" />
<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
</javac>
@@ -90,6 +79,8 @@
<attribute name="SWT-OS" value="${swt.os}"/>
<attribute name="SWT-WS" value="${swt.ws}"/>
<attribute name="SWT-Arch" value="${arch}"/>
+ <attribute name="Implementation-Version" value="${version.suffix}"/>
+ <attribute name="Eclipse-Version" value="${eclipse.version}"/>
</manifest>
</jar>
</target>
@@ -130,8 +121,7 @@
<delete dir="${copy.src.dir}" quiet="true"/>
<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
<fileset dir="${plugindir}/Eclipse SWT/cocoa/"/>
- <fileset dir="${plugindir}/Eclipse SWT/common/"/>
- <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+ <fileset dir="${plugindir}/Eclipse SWT/common/" excludes="**/*._properties"/>
<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/"/>
<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/"/>
<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/"/>
@@ -163,8 +153,7 @@
<delete dir="${copy.src.dir}" quiet="true"/>
<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
<fileset dir="${plugindir}/Eclipse SWT/cairo/"/>
- <fileset dir="${plugindir}/Eclipse SWT/common/"/>
- <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+ <fileset dir="${plugindir}/Eclipse SWT/common/" excludes="**/*._properties"/>
<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/"/>
<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/"/>
<fileset dir="${plugindir}/Eclipse SWT/emulated/taskbar/"/>
@@ -192,13 +181,12 @@
</copy>
<antcall target="copy.translationfiles"/>
</target>
-
+
<target name="copy.win32.src">
<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
<delete dir="${copy.src.dir}" quiet="true"/>
<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
- <fileset dir="${plugindir}/Eclipse SWT/common/"/>
- <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+ <fileset dir="${plugindir}/Eclipse SWT/common/" excludes="**/*._properties"/>
<fileset dir="${plugindir}/Eclipse SWT/win32/"/>
<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/"/>
@@ -206,7 +194,6 @@
<fileset dir="${plugindir}/Eclipse SWT AWT/win32/"/>
<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
<fileset dir="${plugindir}/Eclipse SWT Browser/win32/"/>
- <fileset dir="${plugindir}/Eclipse SWT WebKit/win32/"/>
<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/"/>
@@ -225,7 +212,7 @@
<target name="copy.translationfiles" if="includetranslationfiles">
<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
- <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties"/>
+ <fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*._properties"/>
<mapper type="glob" from="*._properties" to="*.properties" />
</copy>
</target>
@@ -271,9 +258,9 @@
<fileset dir="${build.result.folder}/@dot" includes="**" />
</copy>
<copy todir="${destination.temp.folder}/${full.name}">
- <fileset dir="${fragmentdir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,META-INF/" />
+ <fileset dir="${fragmentdir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,META-INF/,WebView2Loader.dll" />
</copy>
- <chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
+ <chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,WebView2Loader.dll" />
<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
</target>
@@ -282,9 +269,10 @@
<delete dir="${build.result.folder}/@dot" />
<mkdir dir="${temp.folder}/swtdownload/" />
<property name="includetranslationfiles" value="true" />
+ <property name="swtbasename" value="swt" />
<antcall target="build.jars" />
- <jar jarfile="${build.result.folder}/swt.jar" basedir="${fragmentdir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
- <move file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
+ <jar jarfile="${build.result.folder}/${swtbasename}.jar" basedir="${fragmentdir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,WebView2Loader.dll" />
+ <move file="${build.result.folder}/${swtbasename}.jar" todir="${temp.folder}/swtdownload" />
<delete dir="${build.result.folder}/@dot" />
<antcall target="build.sources" />
<move file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
@@ -293,7 +281,7 @@
<copy todir="${temp.folder}/swtdownload">
<fileset dir="${fragmentdir}" includes="about.html,about_files/" />
</copy>
- <condition property="zipfilename" value="swt-${buildid}-${swt.ws}-${swt.os}-${swt.arch}.zip" else="swt-${buildid}-${swt.ws}-${swt.os}.zip">
+ <condition property="zipfilename" value="${swtbasename}-${buildid}-${swt.ws}-${swt.os}-${swt.arch}.zip" else="swt-${buildid}-${swt.ws}-${swt.os}.zip">
<isset property="swt.arch"/>
</condition>
<zip zipfile="${destination}/${zipfilename}">
diff --git a/bundles/org.eclipse.swt/buildInternal.xml b/bundles/org.eclipse.swt/buildInternal.xml
index 865d0fa32d..65615806c7 100644
--- a/bundles/org.eclipse.swt/buildInternal.xml
+++ b/bundles/org.eclipse.swt/buildInternal.xml
@@ -16,9 +16,6 @@
<!--
Build file used only by internal SWT build that generates the libraries & tags.
-
- lib.dir is set to point to xmltask.jar on the internal hudson used to build SWT libraries.
- This can be overriden by setting the property on commandline.
-->
<project name="swtinternalbuild" basedir=".">
@@ -27,24 +24,27 @@
<property name="file_bin_parent_pom" value="bundles/binaries-parent/pom.xml"/>
<property name="lib.dir" value="/var/lib/hudson/antlib"/>
- <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
- <classpath>
- <pathelement location="${lib.dir}/xmltask.jar"/>
- </classpath>
- </taskdef>
-
<!-- When there are build changes, generates the time-stamp qualifiers and updates the pom files in source and binaries repo -->
<target name="generate_qualifier" depends="check_build_changed" if="build_changed">
<tstamp><format property="build.qualifier" pattern="yyyyMMdd-HHmm"/></tstamp>
<echo>${build.qualifier}</echo>
</target>
+ <!--
+ Update forceContextQualifier property in <SWT source repo>/bundles/org.eclipse.swt/pom.xml and
+ <SWT binaries repo>/bundles/binaries-parent/pom.xml
+
+ We match existing forceContextQualifier in the format vyyyyMMdd-HHmm and replace this with v${build.qualifier}
+
+ See https://bugs.eclipse.org/bugs/show_bug.cgi?id=577391
+ -->
+
<target name="write_qualifier" depends="generate_qualifier" if="build.qualifier" description="writes the generated qualifier in pom.xml in src and binaries repo">
- <xmltask source="${repo.src}/${file_src_pom}" dest="${repo.src}/${file_src_pom}" failWithoutMatch="true">
- <replace path="/:project/:properties/:forceContextQualifier/text()" withText="v${build.qualifier}"/>
- </xmltask>
- <xmltask source="${repo.bin}/${file_bin_parent_pom}" dest="${repo.bin}/${file_bin_parent_pom}" failWithoutMatch="true">
- <replace path="/:project/:properties/:forceContextQualifier/text()" withText="v${build.qualifier}"/>
- </xmltask>
+ <replaceregexp file="${repo.src}/${file_src_pom}"
+ match="v\d+-\d+"
+ replace="v${build.qualifier}"/>
+ <replaceregexp file="${repo.bin}/${file_bin_parent_pom}"
+ match="v\d+-\d+"
+ replace="v${build.qualifier}"/>
</target>
</project>
diff --git a/bundles/org.eclipse.swt/buildSWT.xml b/bundles/org.eclipse.swt/buildSWT.xml
index 9d4bb1b6fe..07a871d77b 100644
--- a/bundles/org.eclipse.swt/buildSWT.xml
+++ b/bundles/org.eclipse.swt/buildSWT.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2018 IBM Corporation and others.
+ Copyright (c) 2009, 2020 IBM Corporation and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
@@ -41,7 +41,7 @@
<property name="repo.bin" value="../../../eclipse.platform.swt.binaries"/>
<property name="src_common" value="'bundles/org.eclipse.swt/Eclipse SWT/common/library' 'bundles/org.eclipse.swt/Eclipse SWT PI/common/library'"/>
- <property name="src_win32" value="${src_common} 'bundles/org.eclipse.swt/Eclipse SWT PI/win32/library' 'bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library' 'bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library' 'bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library'"/>
+ <property name="src_win32" value="${src_common} 'bundles/org.eclipse.swt/Eclipse SWT PI/win32/library' 'bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library' 'bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/library'"/>
<property name="src_gtk" value="${src_common} 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library' 'bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/library' 'bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library' 'bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library' 'bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library' "/>
<property name="src_cocoa" value="${src_common} 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library' 'bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library'"/>
<property name="file_library" value="bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java"/>
@@ -59,14 +59,22 @@
<target name="check_libraries" depends="get_version">
<antcall target="check_fragment_libraries">
<param name="library_count" value="3"/>
+ <param name="fragment" value="org.eclipse.swt.cocoa.macosx.aarch64"/>
+ </antcall>
+ <antcall target="check_fragment_libraries">
+ <param name="library_count" value="3"/>
<param name="fragment" value="org.eclipse.swt.cocoa.macosx.x86_64"/>
</antcall>
<antcall target="check_fragment_libraries">
- <param name="library_count" value="8"/>
+ <param name="library_count" value="7"/>
+ <param name="fragment" value="org.eclipse.swt.gtk.linux.aarch64"/>
+ </antcall>
+ <antcall target="check_fragment_libraries">
+ <param name="library_count" value="7"/>
<param name="fragment" value="org.eclipse.swt.gtk.linux.ppc64le"/>
</antcall>
<antcall target="check_fragment_libraries">
- <param name="library_count" value="8"/>
+ <param name="library_count" value="7"/>
<param name="fragment" value="org.eclipse.swt.gtk.linux.x86_64"/>
</antcall>
<antcall target="check_fragment_libraries">
@@ -78,18 +86,20 @@
<target name="check_fragment_libraries" depends="get_version">
<echo>Checking ${fragment}</echo>
<property name="checkdir" value="~/build/check_libraries"/>
- <property name="library_count" value="23"/>
+ <property name="library_count" value="31"/>
<property name="fragment" value=""/>
- <fileset id="match" dir="${repo.bin}/bundles/${fragment}" includes="**/org.eclipse.swt.gtk.linux.ppc64le/**, **/org.eclipse.swt.gtk.linux.x86_64/**, **/org.eclipse.swt.win32.win32.x86_64/**, **/org.eclipse.swt.cocoa.macosx.*/**">
- <filename regex="[0-9][0-9][0-9][0-9]."/>
- <filename regex="${swt_version}."/>
+ <fileset id="match" dir="${repo.bin}/bundles/${fragment}" includes="**/org.eclipse.swt.gtk.linux.aarch64/**, **/org.eclipse.swt.gtk.linux.ppc64le/**, **/org.eclipse.swt.gtk.linux.x86_64/**, **/org.eclipse.swt.win32.win32.x86_64/**, **/org.eclipse.swt.cocoa.macosx.aarch64/**, **/org.eclipse.swt.cocoa.macosx.x86_64/**">
+ <filename regex="[0-9][0-9][0-9][0-9]"/>
+ <filename regex="${swt_version}"/>
<exclude name="**/.git/**"/>
</fileset>
- <fileset id="not_match" dir="${repo.bin}/bundles/${fragment}" includes="**/org.eclipse.swt.gtk.linux.ppc64le/**, **/org.eclipse.swt.gtk.linux.x86_64/**, **/org.eclipse.swt.win32.win32.x86_64/**, **/org.eclipse.swt.cocoa.macosx.*/**">
- <filename regex="[0-9][0-9][0-9][0-9]."/>
- <filename regex="${swt_version}." negate="true"/>
+ <echo>Matched files ${toString:match}</echo>
+ <fileset id="not_match" dir="${repo.bin}/bundles/${fragment}" includes="**/org.eclipse.swt.gtk.linux.aarch64/**, **/org.eclipse.swt.gtk.linux.ppc64le/**, **/org.eclipse.swt.gtk.linux.x86_64/**, **/org.eclipse.swt.win32.win32.x86_64/**, **/org.eclipse.swt.cocoa.macosx.aarch64/**, **/org.eclipse.swt.cocoa.macosx.x86_64/**">
+ <filename regex="[0-9][0-9][0-9][0-9]"/>
+ <filename regex="${swt_version}" negate="true"/>
<exclude name="**/.git/**"/>
</fileset>
+ <property name="match_text" refid="not_match"/>
<property name="not_match_text" refid="not_match"/>
<resourcecount refid="match" property="match_count"/>
<resourcecount refid="not_match" property="not_match_count"/>
@@ -102,7 +112,7 @@
</and>
</not>
</condition>
- <fail if="m_fail" message="Failed. Expecting ${library_count} and 0. Old libraries: ${not_match_text}"/>
+ <fail if="m_fail" message="Failed. Expecting ${library_count} and 0. New libraries: ${match_text}. Old libraries: ${not_match_text}"/>
<echo>Success</echo>
</target>
@@ -123,6 +133,14 @@
trust="true"
outputproperty="m_linux_ppc64le_output"
command="hostname"/>
+ <sshexec host="${m_linux_aarch64}"
+ port="2256"
+ username="swtbuild"
+ keyfile="${keyfile}"
+ failonerror="false"
+ trust="true"
+ outputproperty="m_linux_aarch64_output"
+ command="hostname"/>
<sshexec host="${m_mac}"
username="swtbuild"
keyfile="${keyfile}"
@@ -145,6 +163,12 @@
<matches pattern="x${m_linux_ppc64le_output}*" string="x${m_linux_ppc64le}"/>
</and>
</condition>
+ <condition property="m_linux_aarch64_test" value="${success_msg}" else="${fail_msg}">
+ <and>
+ <length string="${m_linux_aarch64_output}" when="greater" length="0"/>
+ <matches pattern="x${m_linux_aarch64_output}*" string="x${m_linux_aarch64}"/>
+ </and>
+ </condition>
<condition property="m_mac_test" value="${success_msg}" else="${fail_msg}">
<and>
<length string="${m_mac_output}" when="greater" length="0"/>
@@ -156,10 +180,11 @@
<echo></echo>
<echo>${m_linux_x86_64} - ${m_linux_x86_64_test}</echo>
<echo>${m_linux_ppc64le} - ${m_linux_ppc64le_test}</echo>
+ <echo>${m_linux_aarch64} - ${m_linux_aarch64_test}</echo>
<echo>${m_mac} - ${m_mac_test}</echo>
<echo>-------------------------</echo>
<condition property="m_fail">
- <matches pattern="Fail" string="${m_linux_x86_64_test} ${m_linux_ppc64le_test} ${m_mac_test}"/>
+ <matches pattern="Fail" string="${m_linux_x86_64_test} ${m_linux_ppc64le_test} ${m_linux_aarch64_test} ${m_mac_test}"/>
</condition>
<fail if="m_fail" message="Failed"/>
</target>
@@ -219,7 +244,7 @@
<!-- <property name="tmpdir" value="${tmphome}/check.compile.${TAG}"/> -->
<property name="buildDir" value="${tmpdir}/build"/>
<property name="projectDir" value="${repo.src}/bundles/org.eclipse.swt"/>
-
+
<!-- 64 bit -->
<antcall target="build_classes">
<param name="cp" value=".classpath_cocoa"/>
@@ -257,7 +282,7 @@
</xslt>
<ant antfile="${tmpdir}/copy.xml" target="copy_files"/>
- <javac includeantruntime="false" srcdir="${buildDir}"></javac>
+ <javac includeantruntime="false" srcdir="${buildDir}" encoding="utf8"></javac>
</target>
<!-- common build tasks -->
@@ -304,7 +329,7 @@
<arg line="commit -m 'v${swt_version}'"/>
</exec>
</target>
-
+
<target name="increment_version" depends="get_version" if="natives_changed">
<antcall target="increment_version_impl"/>
</target>
@@ -318,7 +343,7 @@
<replace file="${repo.src}/${file_library}" token="MAJOR_VERSION = ${maj_ver}" value="MAJOR_VERSION = ${new_maj_ver}"/>
<replace file="${repo.src}/${file_library}" token="MINOR_VERSION = ${min_ver}" value="MINOR_VERSION = ${new_min_ver}"/>
<replace file="${repo.src}/${file_library}" token="REVISION = ${rev}" value="REVISION = ${new_rev}"/>
- <replace file="${repo.src}/${file_version}" token="version ${maj_ver}.${min_ver}.${rev}.0" value="version ${new_maj_ver}.${new_min_ver}.${new_rev}.0"/>
+ <replace file="${repo.src}/${file_version}" token="version ${maj_ver}.${min_ver}" value="version ${new_maj_ver}.${new_min_ver}"/>
<replace file="${repo.src}/${file_make_common}" token="min_ver=${min_ver}" value="min_ver=${new_min_ver}"/>
<replace file="${repo.src}/${file_make_common}" token="maj_ver=${maj_ver}" value="maj_ver=${new_maj_ver}"/>
<replace file="${repo.src}/${file_make_common}" token="rev=${rev}" value="rev=${new_rev}"/>
@@ -526,7 +551,7 @@
<script language="javascript">
<![CDATA[
project.setProperty("library_src", project.getProperty("src_" + project.getProperty("swt.ws")));
- ]]>
+ ]]>
</script>
</target>
@@ -571,11 +596,14 @@
<!-- Params: fragment, swt_version -->
<target name="commit_binaries" depends="get_version">
<!-- Get libraries to remove from repo -->
+ <echo>swt_version is ${swt_version}</echo>
<fileset id="removeid" dir="${repo.bin}">
- <filename regex="[0-9][0-9][0-9][0-9]r[0-9]."/>
- <filename regex="${swt_version}." negate="true"/>
+ <filename regex="[0-9][0-9][0-9][0-9]r[0-9]"/>
+ <filename regex="${swt_version}" negate="true"/>
<exclude name="**/.git/**"/>
</fileset>
+
+ <echo>Files to remove is ${toString:removeid}</echo>
<!-- Rename libraries that were not built -->
<copy todir="${repo.bin}" overwrite="false">
@@ -587,12 +615,13 @@
<!-- Get list of files to commit -->
<fileset id="addid" dir="${repo.bin}">
<include name="bundles/*/*${swt_version}*"/>
- <include name="bundles/*/webkitextensions${swt_version}/*${swt_version}*"/>
<include name="bundles/*/build.sha1"/>
<exclude name="**/.git/**"/>
<exclude name="**/tmpdir/**"/>
</fileset>
<property name="afiles" refid="addid"/>
+
+ <echo>Files to add is ${toString:addid}</echo>
<script language="javascript">
<![CDATA[
@@ -608,13 +637,18 @@
<fileset dir="${repo.bin}" includes="*${swt_version}*"/>
</chmod>
+ <echo>Removing files</echo>
<antcall target="git_rm"/>
+
+ <echo>Adding files</echo>
<exec dir="${repo.bin}" executable="git" failonerror="true">
<arg line="add ${added_files}"/>
</exec>
+
<exec dir="${repo.bin}" executable="git" failonerror="true" outputproperty="diffs">
<arg line="diff HEAD"/>
</exec>
+
<condition property="commit_bin_changes">
<length string="${diffs}" trim="true" when="greater" length="0"/>
</condition>
@@ -676,7 +710,7 @@
task.addFileset(fileset);
}
task.execute();
- ]]>
+ ]]>
</script>
</target>
@@ -753,12 +787,6 @@
port="${port}"
keyfile="${keyfile}"
trust="true"/>
- <scp file="swtbuild@${build_machine}:${lib_output}/webkitextensions${swt_version}/*"
- todir="${output_dir}/webkitextensions${swt_version}/"
- port="${port}"
- keyfile="${keyfile}"
- trust="true"
- failonerror="false"/>
<sshexec host="${build_machine}"
username="swtbuild"
port="${port}"
@@ -769,10 +797,6 @@
<target name="build_local">
<property name="gtk_version" value="3.0" />
- <exec executable="mkdir">
- <arg value="-p"/>
- <arg value="${output_dir}/webkitextensions${swt_version}/"/>
- </exec>
<exec dir="${build_dir}" executable="sh" failonerror="true">
<arg line="build.sh"/>
<env key="GTK_VERSION" value="${gtk_version}"/>
@@ -931,6 +955,9 @@
<arg line="fetch"/>
</exec>
<exec dir="${repo.src}" executable="git" failonerror="true">
+ <arg line="status"/>
+ </exec>
+ <exec dir="${repo.src}" executable="git" failonerror="true">
<arg line="rebase origin/${TAG}"/>
</exec>
<exec dir="${repo.src}" executable="git" failonerror="true">
@@ -940,6 +967,9 @@
<arg line="fetch"/>
</exec>
<exec dir="${repo.bin}" executable="git" failonerror="true">
+ <arg line="status"/>
+ </exec>
+ <exec dir="${repo.bin}" executable="git" failonerror="true">
<arg line="rebase origin/${TAG}"/>
</exec>
<exec dir="${repo.bin}" executable="git" failonerror="true">
diff --git a/bundles/org.eclipse.swt/pom.xml b/bundles/org.eclipse.swt/pom.xml
index 767f235ca8..51cbee8974 100644
--- a/bundles/org.eclipse.swt/pom.xml
+++ b/bundles/org.eclipse.swt/pom.xml
@@ -9,24 +9,30 @@
Contributors:
Igor Fedorenko - initial implementation
Krzysztof Daniel, Red Hat, Inc. - building native SWT parts.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>eclipse.platform.swt</artifactId>
<groupId>eclipse.platform.swt</groupId>
- <version>4.12.0-SNAPSHOT</version>
+ <version>4.24.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt</artifactId>
- <version>3.110.100-SNAPSHOT</version>
+ <version>3.119.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-
+
<properties>
- <forceContextQualifier>v20190424-1802</forceContextQualifier>
- <sonar.sources>Eclipse SWT Accessibility/cocoa,Eclipse SWT Accessibility/common,Eclipse SWT Accessibility/gtk,Eclipse SWT Accessibility/win32,Eclipse SWT AWT/cocoa,Eclipse SWT AWT/common,Eclipse SWT AWT/gtk,Eclipse SWT AWT/win32,Eclipse SWT Browser/cocoa,Eclipse SWT Browser/common,Eclipse SWT Browser/gtk,Eclipse SWT Browser/win32,Eclipse SWT Custom Widgets/common,Eclipse SWT Drag and Drop/cocoa,Eclipse SWT Drag and Drop/common,Eclipse SWT Drag and Drop/gtk,Eclipse SWT Drag and Drop/win32,Eclipse SWT OLE Win32/win32,Eclipse SWT OpenGL/cocoa,Eclipse SWT OpenGL/common,Eclipse SWT OpenGL/glx,Eclipse SWT OpenGL/gtk,Eclipse SWT OpenGL/win32,Eclipse SWT PI/cairo,Eclipse SWT PI/cocoa,Eclipse SWT PI/common,Eclipse SWT PI/gtk,Eclipse SWT PI/win32,Eclipse SWT Printing/cocoa,Eclipse SWT Printing/common,Eclipse SWT Printing/gtk,Eclipse SWT Printing/win32,Eclipse SWT Program/cocoa,Eclipse SWT Program/common,Eclipse SWT Program/gtk,Eclipse SWT Program/win32,Eclipse SWT WebKit/cocoa,Eclipse SWT WebKit/gtk,Eclipse SWT WebKit/win32,Eclipse SWT/cairo,Eclipse SWT/cocoa,Eclipse SWT/common_j2se,Eclipse SWT/common,Eclipse SWT/emulated/bidi,Eclipse SWT/emulated/coolbar,Eclipse SWT/emulated/expand,Eclipse SWT/emulated/taskbar,Eclipse SWT/emulated/tooltip,Eclipse SWT/gtk,Eclipse SWT/win32</sonar.sources>
+ <!--
+ forceContextQualifier gets updated during build input process using
+ ant script <SWT source repo>/bundles/org.eclipse.swt/buildInternal.xml
+ -->
+ <forceContextQualifier>v20220326-2203</forceContextQualifier>
+ <sonar.sources>Eclipse SWT Accessibility/cocoa,Eclipse SWT Accessibility/common,Eclipse SWT Accessibility/gtk,Eclipse SWT Accessibility/win32,Eclipse SWT AWT/cocoa,Eclipse SWT AWT/common,Eclipse SWT AWT/gtk,Eclipse SWT AWT/win32,Eclipse SWT Browser/cocoa,Eclipse SWT Browser/common,Eclipse SWT Browser/gtk,Eclipse SWT Browser/win32,Eclipse SWT Custom Widgets/common,Eclipse SWT Drag and Drop/cocoa,Eclipse SWT Drag and Drop/common,Eclipse SWT Drag and Drop/gtk,Eclipse SWT Drag and Drop/win32,Eclipse SWT OLE Win32/win32,Eclipse SWT OpenGL/cocoa,Eclipse SWT OpenGL/common,Eclipse SWT OpenGL/glx,Eclipse SWT OpenGL/gtk,Eclipse SWT OpenGL/win32,Eclipse SWT PI/cairo,Eclipse SWT PI/cocoa,Eclipse SWT PI/common,Eclipse SWT PI/gtk,Eclipse SWT PI/win32,Eclipse SWT Printing/cocoa,Eclipse SWT Printing/common,Eclipse SWT Printing/gtk,Eclipse SWT Printing/win32,Eclipse SWT Program/cocoa,Eclipse SWT Program/common,Eclipse SWT Program/gtk,Eclipse SWT Program/win32,Eclipse SWT WebKit/cocoa,Eclipse SWT WebKit/gtk,Eclipse SWT/cairo,Eclipse SWT/cocoa,Eclipse SWT/common,Eclipse SWT/emulated/bidi,Eclipse SWT/emulated/coolbar,Eclipse SWT/emulated/expand,Eclipse SWT/emulated/taskbar,Eclipse SWT/emulated/tooltip,Eclipse SWT/gtk,Eclipse SWT/win32</sonar.sources>
</properties>
-
+
<build>
<plugins>
<plugin>
@@ -50,7 +56,7 @@
</plugin>
</plugins>
</build>
-
+
<profiles>
<profile>
<id>build-all</id>
@@ -81,11 +87,9 @@
</executions>
<dependencies>
<dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>0.0.0</version>
- <scope>system</scope>
- <systemPath>${toolsjar}</systemPath>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.10.9</version>
</dependency>
</dependencies>
</plugin>

Back to the top